From 49132ba8a46ec6da6b78b26036c534e91d59da47 Mon Sep 17 00:00:00 2001 From: wizage Date: Fri, 6 Sep 2019 11:12:01 -0700 Subject: [PATCH 1/4] Testing new plugin structure --- amplify-plugin.json | 12 ++++++++++++ index.js | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 amplify-plugin.json diff --git a/amplify-plugin.json b/amplify-plugin.json new file mode 100644 index 00000000..45d1463b --- /dev/null +++ b/amplify-plugin.json @@ -0,0 +1,12 @@ +{ + "name": "video", + "type": "category", + "commands": [ + "add", + "remove", + "update", + "push", + "console", + "help" + ] +} \ No newline at end of file diff --git a/index.js b/index.js index acf8b945..182a58ff 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ const category = 'video'; +const path = require('path'); async function add(context, providerName, service) { const options = { @@ -51,9 +52,22 @@ async function migrate(context) { await Promise.all(migrateResourcePromises); } +async function executeAmplifyCommand(context) { + let commandPath = path.normalize(path.join(__dirname, 'commands')); + if (context.input.command === 'help') { + commandPath = path.join(commandPath, category); + } else { + commandPath = path.join(commandPath, category, context.input.command); + } + + const commandModule = require(commandPath); + await commandModule.run(context); +} + module.exports = { add, console, migrate, onAmplifyCategoryOutputChange, + executeAmplifyCommand, }; From d0ddf460149f8dd2dfb1b7860eaf7ff0857183d8 Mon Sep 17 00:00:00 2001 From: wizage Date: Fri, 6 Sep 2019 14:58:07 -0700 Subject: [PATCH 2/4] Added rest of commands --- amplify-plugin.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/amplify-plugin.json b/amplify-plugin.json index 45d1463b..e916667d 100644 --- a/amplify-plugin.json +++ b/amplify-plugin.json @@ -7,6 +7,11 @@ "update", "push", "console", - "help" + "start", + "stop", + "help", + "setup-obs", + "setup", + "get-info" ] } \ No newline at end of file From 63f445b385322af027c882d8c8c39bd99b6d4556 Mon Sep 17 00:00:00 2001 From: wizage Date: Fri, 8 Nov 2019 16:33:47 -0500 Subject: [PATCH 3/4] Fixes #40 --- index.js | 1 - provider-utils/livestream-questions.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index f312996f..3adb8835 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ -const path = require('path'); const category = 'video'; const path = require('path'); diff --git a/provider-utils/livestream-questions.json b/provider-utils/livestream-questions.json index dbfe7a38..89c73af4 100644 --- a/provider-utils/livestream-questions.json +++ b/provider-utils/livestream-questions.json @@ -190,7 +190,7 @@ "required": true }, { - "key": "enableDistrubtion", + "key": "enableDistribution", "question": "Create distribution: ", "type":"list", "options": [ From 22c5c74463b4c42af89b3444168125d173d76bcb Mon Sep 17 00:00:00 2001 From: wizage Date: Fri, 8 Nov 2019 16:35:05 -0500 Subject: [PATCH 4/4] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49d278c7..29a269cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amplify-category-video", - "version": "2.0.0", + "version": "2.1.0", "description": "Plugin for Amplify to add support for live streaming. Made for Unicorn Trivia Workshop", "main": "index.js", "scripts": {