diff --git a/amplify-plugin.json b/amplify-plugin.json index 72fef72e..2e5ca383 100644 --- a/amplify-plugin.json +++ b/amplify-plugin.json @@ -3,14 +3,15 @@ "type": "category", "commands": [ "add", - "help", "get-info", + "help", "push", "remove", - "setup-obs", "setup", + "setup-obs", "start", "stop", - "update" + "update", + "version" ] } \ No newline at end of file diff --git a/commands/video.js b/commands/video.js index 9cee31a5..79ec343f 100644 --- a/commands/video.js +++ b/commands/video.js @@ -20,16 +20,20 @@ module.exports = { description: `Takes you through a CLI flow to add a ${featureName} resource to your local backend`, }, { - name: 'update', - description: `Takes you through a CLI flow to update a ${featureName} resource`, + name: 'get-info', + description: `Gets info for ${featureName} resource from the CloudFormation template`, }, { name: 'push', description: `Provisions ${featureName} cloud resources and it's dependencies with the latest local developments`, }, { - name: 'get-info', - description: `Gets info for ${featureName} resource from the CloudFormation template`, + name: 'remove', + description: `Removes ${featureName} resource from your local backend and will remove them on amplify push`, + }, + { + name: 'setup-obs', + description: 'Sets up OBS with your stream settings.', }, { name: 'start', @@ -40,12 +44,12 @@ module.exports = { description: `Puts your ${featureName} stream into an idle state`, }, { - name: 'remove', - description: `Removes ${featureName} resource from your local backend and will remove them on amplify push`, + name: 'update', + description: `Takes you through a CLI flow to update a ${featureName} resource`, }, { - name: 'setup-obs', - description: 'Sets up OBS with your stream settings.', + name: 'version', + description: `Prints the version of Amplify Video that you are using`, }, ]; diff --git a/commands/video/version.js b/commands/video/version.js new file mode 100644 index 00000000..5ec2e8b6 --- /dev/null +++ b/commands/video/version.js @@ -0,0 +1,11 @@ +const fs = require('fs'); +const serviceMetadata = JSON.parse(fs.readFileSync(`${__dirname}/../../package.json`)); +const subcommand = 'version'; +const category = 'video'; + +module.exports = { + name: subcommand, + run: async (context) => { + context.print.info('amplify-category-video@' + serviceMetadata.version); + } +} \ No newline at end of file