From 59f0e9700464143da8f8302bc1759a93e89e3a5d Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Thu, 7 Jan 2021 13:52:08 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Export=20CLI=20commands=20(#130)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows for invoking commands via Node scripts without needing to invoke a subprocess. --- packages/cli-build/src/index.js | 5 ++++- packages/cli-config/src/index.js | 6 +++++- packages/cli-exec/src/index.js | 10 +++++++++- packages/cli-snapshot/src/index.js | 2 +- packages/cli-upload/src/index.js | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/cli-build/src/index.js b/packages/cli-build/src/index.js index ff8b4c563..437f9dfaa 100644 --- a/packages/cli-build/src/index.js +++ b/packages/cli-build/src/index.js @@ -1 +1,4 @@ -export default {}; +const { Finalize } = require('./commands/build/finalize'); +const { Wait } = require('./commands/build/wait'); + +module.exports = { Finalize, Wait }; diff --git a/packages/cli-config/src/index.js b/packages/cli-config/src/index.js index ff8b4c563..3cf5b10be 100644 --- a/packages/cli-config/src/index.js +++ b/packages/cli-config/src/index.js @@ -1 +1,5 @@ -export default {}; +const { Create } = require('./commands/config/create'); +const { Migrate } = require('./commands/build/migrate'); +const { Validate } = require('./commands/build/validate'); + +module.exports = { Create, Migrate, Validate }; diff --git a/packages/cli-exec/src/index.js b/packages/cli-exec/src/index.js index ff8b4c563..53b256cab 100644 --- a/packages/cli-exec/src/index.js +++ b/packages/cli-exec/src/index.js @@ -1 +1,9 @@ -export default {}; +const { Exec } = require('./commands/exec'); +const { Ping } = require('./commands/exec/ping'); +const { Start } = require('./commands/exec/start'); +const { Stop } = require('./commands/exec/stop'); + +module.exports = Exec; +module.exports.Ping = Ping; +module.exports.Start = Start; +module.exports.Stop = Stop; diff --git a/packages/cli-snapshot/src/index.js b/packages/cli-snapshot/src/index.js index ff8b4c563..aa15ea145 100644 --- a/packages/cli-snapshot/src/index.js +++ b/packages/cli-snapshot/src/index.js @@ -1 +1 @@ -export default {}; +module.exports = require('./commands/snapshot').Snapshot; diff --git a/packages/cli-upload/src/index.js b/packages/cli-upload/src/index.js index ff8b4c563..383aa2bb0 100644 --- a/packages/cli-upload/src/index.js +++ b/packages/cli-upload/src/index.js @@ -1 +1 @@ -export default {}; +module.exports = require('./commands/upload').Upload;