zcatalyst-cli 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api-timer.d.ts +17 -0
- package/lib/api-timer.js +2 -2
- package/lib/apig-utils.d.ts +41 -0
- package/lib/apig-utils.js +32 -32
- package/lib/appsail-utils.d.ts +3 -0
- package/lib/appsail-utils.js +116 -12
- package/lib/archiver.d.ts +47 -0
- package/lib/archiver.js +6 -6
- package/lib/authentication/constants/auth.d.ts +21 -0
- package/lib/authentication/constants/auth.js +37 -0
- package/lib/authentication/constants/scopes.d.ts +81 -0
- package/lib/{util_modules/constants/lib → authentication/constants}/scopes.js +1 -0
- package/lib/authentication/credential.d.ts +39 -0
- package/lib/{internal → authentication}/credential.js +63 -46
- package/lib/authentication/crypt.d.ts +13 -0
- package/lib/authentication/error.d.ts +4 -0
- package/lib/authentication/error.js +14 -0
- package/lib/authentication/index.d.ts +5 -0
- package/lib/authentication/index.js +65 -63
- package/lib/authentication/login.d.ts +46 -0
- package/lib/authentication/login.js +147 -105
- package/lib/authentication/revoke.d.ts +9 -0
- package/lib/bin/catalyst.d.ts +2 -0
- package/lib/bin/catalyst.js +80 -36
- package/lib/cli_table/index.js +3 -2
- package/lib/client-utils.d.ts +16 -0
- package/lib/client-utils.js +57 -50
- package/lib/client.d.ts +21 -0
- package/lib/client.js +93 -6
- package/lib/code-deck.d.ts +21 -0
- package/lib/command_needs/auth.d.ts +2 -0
- package/lib/command_needs/auth.js +25 -24
- package/lib/command_needs/config.d.ts +4 -0
- package/lib/command_needs/rc.d.ts +8 -0
- package/lib/command_needs/rc.js +24 -24
- package/lib/commands/apig/disable.d.ts +3 -0
- package/lib/commands/apig/disable.js +8 -8
- package/lib/commands/apig/enable.d.ts +3 -0
- package/lib/commands/apig/enable.js +8 -8
- package/lib/commands/apig/status.d.ts +18 -0
- package/lib/commands/apig/status.js +12 -12
- package/lib/commands/appsail/add.d.ts +3 -0
- package/lib/commands/appsail/add.js +7 -6
- package/lib/commands/appsail/unlink.d.ts +3 -0
- package/lib/commands/appsail/unlink.js +43 -0
- package/lib/commands/client/delete.d.ts +3 -0
- package/lib/commands/client/delete.js +19 -19
- package/lib/commands/client/setup.d.ts +3 -0
- package/lib/commands/client/setup.js +6 -5
- package/lib/commands/codelib/install.d.ts +3 -0
- package/lib/commands/codelib/install.js +15 -15
- package/lib/commands/config/delete.d.ts +3 -0
- package/lib/commands/config/delete.js +2 -2
- package/lib/commands/config/get.d.ts +3 -0
- package/lib/commands/config/get.js +2 -2
- package/lib/commands/config/list.d.ts +3 -0
- package/lib/commands/config/list.js +2 -2
- package/lib/commands/config/set.d.ts +3 -0
- package/lib/commands/config/set.js +2 -2
- package/lib/commands/deploy/appsail.d.ts +3 -0
- package/lib/commands/deploy/appsail.js +11 -9
- package/lib/commands/deploy/index.d.ts +3 -0
- package/lib/commands/deploy/index.js +43 -25
- package/lib/commands/deploy/slate.d.ts +3 -0
- package/lib/commands/deploy/slate.js +1 -1
- package/lib/commands/ds/export.d.ts +3 -0
- package/lib/commands/ds/export.js +9 -9
- package/lib/commands/ds/import.d.ts +3 -0
- package/lib/commands/ds/import.js +13 -13
- package/lib/commands/ds/status.d.ts +23 -0
- package/lib/commands/ds/status.js +12 -11
- package/lib/commands/event/generate/index.d.ts +3 -0
- package/lib/commands/event/generate/index.js +5 -186
- package/lib/commands/event/generate/integ.d.ts +3 -0
- package/lib/commands/event/generate/integ.js +4 -4
- package/lib/commands/event/generate/job.d.ts +3 -0
- package/lib/commands/functions/add.d.ts +3 -0
- package/lib/commands/functions/add.js +6 -5
- package/lib/commands/functions/config.d.ts +3 -0
- package/lib/commands/functions/config.js +5 -5
- package/lib/commands/functions/delete.d.ts +3 -0
- package/lib/commands/functions/delete.js +19 -18
- package/lib/commands/functions/execute.d.ts +3 -0
- package/lib/commands/functions/execute.js +202 -0
- package/lib/commands/functions/setup.d.ts +3 -0
- package/lib/commands/functions/setup.js +6 -5
- package/lib/commands/functions/shell.d.ts +3 -0
- package/lib/commands/functions/shell.js +32 -28
- package/lib/commands/help.d.ts +3 -0
- package/lib/commands/help.js +4 -4
- package/lib/commands/iac/export.d.ts +3 -0
- package/lib/commands/iac/export.js +9 -8
- package/lib/commands/iac/import.d.ts +6 -0
- package/lib/commands/iac/import.js +23 -22
- package/lib/commands/iac/pack.d.ts +3 -0
- package/lib/commands/iac/pack.js +13 -13
- package/lib/commands/iac/status.d.ts +3 -0
- package/lib/commands/iac/status.js +4 -4
- package/lib/commands/index.d.ts +3 -0
- package/lib/commands/index.js +74 -64
- package/lib/commands/init.d.ts +3 -0
- package/lib/commands/init.js +13 -11
- package/lib/commands/login.d.ts +3 -0
- package/lib/commands/login.js +2 -2
- package/lib/commands/logout.d.ts +3 -0
- package/lib/commands/logout.js +1 -1
- package/lib/commands/project/list.d.ts +3 -0
- package/lib/commands/project/list.js +7 -6
- package/lib/commands/project/reset.d.ts +3 -0
- package/lib/commands/project/reset.js +5 -5
- package/lib/commands/project/use.d.ts +3 -0
- package/lib/commands/project/use.js +13 -11
- package/lib/commands/pull.d.ts +3 -0
- package/lib/commands/pull.js +16 -15
- package/lib/commands/run.d.ts +3 -0
- package/lib/commands/run.js +9 -9
- package/lib/commands/serve.d.ts +3 -0
- package/lib/commands/signals/generate/index.d.ts +3 -0
- package/lib/commands/slate/create.d.ts +3 -0
- package/lib/commands/slate/link.d.ts +3 -0
- package/lib/commands/slate/unlink.d.ts +3 -0
- package/lib/commands/slate/unlink.js +1 -1
- package/lib/commands/token/generate.d.ts +3 -0
- package/lib/commands/token/generate.js +4 -3
- package/lib/commands/token/list.d.ts +3 -0
- package/lib/commands/token/list.js +4 -3
- package/lib/commands/token/revoke.d.ts +3 -0
- package/lib/commands/token/revoke.js +3 -3
- package/lib/commands/whoami.d.ts +3 -0
- package/lib/commands/whoami.js +8 -8
- package/lib/commands/zest/generate/index.d.ts +14 -0
- package/lib/commands/zest/generate/index.js +1 -2
- package/lib/deploy/features/apig.d.ts +2 -0
- package/lib/deploy/features/apig.js +11 -11
- package/lib/deploy/features/appsail/index.d.ts +3 -0
- package/lib/deploy/features/appsail/index.js +82 -194
- package/lib/deploy/features/appsail/pack.d.ts +14 -0
- package/lib/deploy/features/appsail/pack.js +130 -0
- package/lib/deploy/features/appsail/utils.d.ts +15 -0
- package/lib/deploy/features/appsail/utils.js +163 -17
- package/lib/deploy/features/client.d.ts +2 -0
- package/lib/deploy/features/client.js +5 -4
- package/lib/deploy/features/functions/index.d.ts +2 -0
- package/lib/deploy/features/functions/index.js +41 -32
- package/lib/deploy/features/functions/languages/index.d.ts +4 -0
- package/lib/deploy/features/functions/languages/index.js +14 -1
- package/lib/deploy/features/functions/utils.d.ts +1 -0
- package/lib/deploy/features/functions/utils.js +136 -0
- package/lib/deploy/features/index.d.ts +8 -0
- package/lib/deploy/features/slate.d.ts +5 -0
- package/lib/deploy/features/slate.js +5 -5
- package/lib/deploy/index.d.ts +6 -0
- package/lib/deploy/index.js +12 -11
- package/lib/deploy/util.d.ts +7 -0
- package/lib/deploy/util.js +22 -0
- package/lib/docs/commands/functions/execute.toml +29 -0
- package/lib/docs/endpoints/lib/git-hub.toml +3 -0
- package/lib/docs/fn-utils/lib/java/classpath.toml +9 -0
- package/lib/docs/fn-utils/lib/java/ensure-java-userconfig.toml +24 -0
- package/lib/docs/fn-utils/lib/java/index.toml +15 -0
- package/{docs → lib/docs}/option-filter.toml +12 -3
- package/lib/docs/util_modules/container.toml +6 -0
- package/{docs → lib/docs}/util_modules/project.toml +1 -1
- package/lib/endpoints/index.d.ts +119 -0
- package/lib/endpoints/index.js +32 -25
- package/lib/endpoints/lib/apig.d.ts +17 -0
- package/lib/endpoints/lib/apig.js +12 -12
- package/lib/endpoints/lib/applogic.d.ts +21 -0
- package/lib/endpoints/lib/applogic.js +10 -10
- package/lib/endpoints/lib/appsail.d.ts +64 -0
- package/lib/endpoints/lib/appsail.js +94 -5
- package/lib/endpoints/lib/cache.d.ts +12 -0
- package/lib/endpoints/lib/cache.js +8 -8
- package/lib/endpoints/lib/catalyst-details.d.ts +8 -0
- package/lib/endpoints/lib/catalyst-details.js +2 -2
- package/lib/endpoints/lib/client.d.ts +16 -0
- package/lib/endpoints/lib/client.js +12 -12
- package/lib/endpoints/lib/code-deck.d.ts +10 -0
- package/lib/endpoints/lib/code-deck.js +3 -3
- package/lib/endpoints/lib/common.d.ts +5 -0
- package/lib/endpoints/lib/common.js +2 -2
- package/lib/endpoints/lib/datastore.d.ts +11 -0
- package/lib/endpoints/lib/datastore.js +6 -6
- package/lib/endpoints/lib/ds-bulk.d.ts +46 -0
- package/lib/endpoints/lib/ds-bulk.js +12 -12
- package/lib/endpoints/lib/env.d.ts +8 -0
- package/lib/endpoints/lib/env.js +5 -5
- package/lib/endpoints/lib/event-bus.d.ts +10 -0
- package/lib/endpoints/lib/event-bus.js +4 -4
- package/lib/endpoints/lib/filestore.d.ts +13 -0
- package/lib/endpoints/lib/filestore.js +6 -6
- package/lib/endpoints/lib/functions.d.ts +24 -0
- package/lib/endpoints/lib/functions.js +14 -14
- package/lib/endpoints/lib/git-hub.d.ts +16 -0
- package/lib/endpoints/lib/git-hub.js +15 -2
- package/lib/endpoints/lib/iac.d.ts +43 -0
- package/lib/endpoints/lib/iac.js +20 -20
- package/lib/endpoints/lib/job-scheduling.d.ts +43 -0
- package/lib/endpoints/lib/job-scheduling.js +2 -2
- package/lib/endpoints/lib/log.d.ts +10 -0
- package/lib/endpoints/lib/org.d.ts +13 -0
- package/lib/endpoints/lib/org.js +2 -2
- package/lib/endpoints/lib/project.d.ts +18 -0
- package/lib/endpoints/lib/project.js +11 -11
- package/lib/endpoints/lib/queue.d.ts +14 -0
- package/lib/endpoints/lib/queue.js +8 -8
- package/lib/endpoints/lib/sdk.d.ts +10 -0
- package/lib/endpoints/lib/sdk.js +5 -5
- package/lib/endpoints/lib/slate.d.ts +16 -0
- package/lib/endpoints/lib/stratus.d.ts +15 -0
- package/lib/endpoints/lib/tunnel.d.ts +38 -0
- package/lib/endpoints/lib/tunnel.js +5 -5
- package/lib/endpoints/lib/user.d.ts +8 -0
- package/lib/endpoints/lib/user.js +46 -0
- package/lib/endpoints/lib/zcql.d.ts +12 -0
- package/lib/endpoints/lib/zcql.js +4 -4
- package/lib/endpoints/lib/zest.d.ts +73 -0
- package/lib/error/context-help.d.ts +1 -0
- package/lib/{util_modules → error}/context-help.js +15 -18
- package/lib/error/index.d.ts +27 -0
- package/lib/{error.js → error/index.js} +18 -14
- package/lib/error/utils.d.ts +2 -0
- package/lib/error/utils.js +8 -0
- package/lib/errorOut.d.ts +3 -0
- package/lib/errorOut.js +10 -9
- package/lib/errorResponse.d.ts +4 -0
- package/lib/event_generate/cache.d.ts +2 -0
- package/lib/event_generate/cache.js +3 -3
- package/lib/event_generate/custom.d.ts +1 -0
- package/lib/event_generate/custom.js +2 -2
- package/lib/event_generate/datastore.d.ts +7 -0
- package/lib/event_generate/datastore.js +6 -6
- package/lib/event_generate/filestore.d.ts +2 -0
- package/lib/event_generate/filestore.js +2 -2
- package/lib/event_generate/github.d.ts +2 -0
- package/lib/event_generate/index.d.ts +2 -0
- package/lib/event_generate/index.js +196 -0
- package/lib/event_generate/integration/cliq.d.ts +2 -0
- package/lib/event_generate/integration/cliq.js +4 -4
- package/lib/event_generate/stratus.d.ts +2 -0
- package/lib/event_generate/user.d.ts +2 -0
- package/lib/event_generate/webapp.d.ts +2 -0
- package/lib/execute/caller.d.ts +14 -0
- package/lib/execute/caller.js +155 -0
- package/lib/execute/index.d.ts +3 -0
- package/lib/execute/index.js +87 -0
- package/lib/execute-script.d.ts +6 -0
- package/lib/execute-script.js +62 -32
- package/lib/express_middlewares/apig-matcher.d.ts +3 -0
- package/lib/express_middlewares/auth-checker.d.ts +3 -0
- package/lib/express_middlewares/authenticator.d.ts +3 -0
- package/lib/express_middlewares/authenticator.js +3 -2
- package/lib/express_middlewares/cookie-parser.d.ts +3 -0
- package/lib/express_middlewares/error-handler.d.ts +3 -0
- package/lib/express_middlewares/logger.d.ts +5 -0
- package/lib/express_middlewares/logger.js +3 -2
- package/lib/express_middlewares/project.d.ts +6 -0
- package/lib/express_middlewares/url-rewriter.d.ts +3 -0
- package/lib/fn-utils/index.d.ts +10 -0
- package/lib/fn-utils/lib/browserLogic.d.ts +2 -0
- package/lib/fn-utils/lib/browserLogic.js +7 -6
- package/lib/fn-utils/lib/common.d.ts +85 -0
- package/lib/fn-utils/lib/common.js +79 -90
- package/lib/fn-utils/lib/integ.d.ts +2 -0
- package/lib/fn-utils/lib/integ.js +10 -4
- package/lib/fn-utils/lib/java/classpath.d.ts +2 -0
- package/lib/fn-utils/lib/java/classpath.js +107 -0
- package/lib/fn-utils/lib/java/compile.d.ts +4 -0
- package/lib/fn-utils/lib/java/compile.js +222 -0
- package/lib/fn-utils/lib/java/ensure-java-userconfig.d.ts +22 -0
- package/lib/fn-utils/lib/java/ensure-java-userconfig.js +264 -0
- package/lib/fn-utils/lib/java/index.d.ts +16 -0
- package/lib/fn-utils/lib/java/index.js +254 -0
- package/lib/fn-utils/lib/java/keywords.d.ts +2 -0
- package/lib/fn-utils/lib/java/keywords.js +71 -0
- package/lib/fn-utils/lib/node.d.ts +5 -0
- package/lib/fn-utils/lib/node.js +30 -10
- package/lib/fn-utils/lib/python.d.ts +3 -0
- package/lib/fn-utils/lib/python.js +9 -4
- package/lib/fn-watcher.d.ts +8 -0
- package/lib/fn-watcher.js +18 -23
- package/lib/iac/status/bundle.d.ts +2 -0
- package/lib/iac/status/bundle.js +10 -7
- package/lib/iac/status/deploy.d.ts +2 -0
- package/lib/iac/status/deploy.js +10 -10
- package/lib/iac/status/util/index.d.ts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -4
- package/lib/init/dependencies/npm-install.d.ts +3 -0
- package/lib/init/dependencies/npm-install.js +4 -3
- package/lib/init/dependencies/package-json.d.ts +2 -0
- package/lib/init/dependencies/package-json.js +3 -3
- package/lib/init/dependencies/python/ensure-python.d.ts +2 -0
- package/lib/init/dependencies/python/pip-install.d.ts +7 -0
- package/lib/init/dependencies/python/pip-install.js +3 -3
- package/lib/init/features/appsail/index.d.ts +2 -0
- package/lib/init/features/appsail/index.js +48 -124
- package/lib/init/features/appsail/utils.d.ts +16 -0
- package/lib/init/features/appsail/utils.js +264 -0
- package/lib/init/features/client/index.d.ts +2 -0
- package/lib/init/features/client/index.js +1 -0
- package/lib/init/features/client/initializers/angular.d.ts +2 -0
- package/lib/init/features/client/initializers/angular.js +42 -12
- package/lib/init/features/client/initializers/basic.d.ts +2 -0
- package/lib/init/features/client/initializers/basic.js +2 -2
- package/lib/init/features/client/initializers/lyte.d.ts +2 -0
- package/lib/init/features/client/initializers/lyte.js +1 -1
- package/lib/init/features/client/initializers/react.d.ts +2 -0
- package/lib/init/features/client/initializers/react.js +5 -4
- package/lib/init/features/client/types.d.ts +10 -0
- package/lib/init/features/client/types.js +2 -0
- package/lib/init/features/functions/index.d.ts +17 -0
- package/lib/init/features/functions/index.js +60 -8
- package/lib/init/features/functions/languages/index.d.ts +6 -0
- package/lib/init/features/functions/languages/java.d.ts +2 -0
- package/lib/init/features/functions/languages/java.js +9 -7
- package/lib/init/features/functions/languages/node.d.ts +2 -0
- package/lib/init/features/functions/languages/node.js +6 -4
- package/lib/init/features/functions/languages/python.d.ts +2 -0
- package/lib/init/features/functions/languages/python.js +9 -7
- package/lib/init/features/index.d.ts +14 -0
- package/lib/init/features/index.js +13 -13
- package/lib/init/features/project.d.ts +2 -0
- package/lib/init/features/project.js +19 -22
- package/lib/init/features/slate/index.d.ts +2 -0
- package/lib/init/features/slate/index.js +2 -2
- package/lib/init/index.d.ts +2 -0
- package/lib/init/index.js +5 -5
- package/lib/init/util/client.d.ts +8 -0
- package/lib/init/util/client.js +10 -10
- package/lib/init/util/common.d.ts +12 -0
- package/lib/init/util/common.js +17 -16
- package/lib/init/util/functions.d.ts +7 -0
- package/lib/init/util/functions.js +3 -3
- package/lib/init/util/project.d.ts +3 -0
- package/lib/init/util/project.js +4 -4
- package/lib/internal/api.d.ts +78 -0
- package/lib/internal/api.js +32 -22
- package/lib/internal/command.d.ts +40 -0
- package/lib/internal/command.js +27 -11
- package/lib/internal/config.d.ts +19 -0
- package/lib/internal/config.js +4 -5
- package/lib/internal/rc.d.ts +44 -0
- package/lib/internal/rc.js +9 -9
- package/lib/migration/global/1.4.0.d.ts +2 -0
- package/lib/migration/global/1.4.0.js +4 -4
- package/lib/migration/global/1.6.2.d.ts +2 -0
- package/lib/migration/global/1.6.2.js +13 -13
- package/lib/migration/index.d.ts +6 -0
- package/lib/migration/index.js +19 -18
- package/lib/option-filter.d.ts +5 -0
- package/lib/option-filter.js +57 -30
- package/lib/optional-import.d.ts +2 -0
- package/lib/optional-import.js +3 -3
- package/lib/plugin-loader.d.ts +6 -0
- package/lib/plugin-loader.js +2 -2
- package/lib/port-resolver.d.ts +24 -0
- package/lib/port-resolver.js +14 -13
- package/lib/progress.d.ts +34 -0
- package/lib/prompt/index.d.ts +34 -0
- package/lib/prompt/index.js +49 -9
- package/lib/prompt/types/file-path.d.ts +25 -0
- package/lib/prompt/types/search-box.d.ts +56 -0
- package/lib/prompt/types/search-box.js +84 -46
- package/lib/prompt/types/tree.d.ts +65 -0
- package/lib/prompt/types/with-description.d.ts +15 -0
- package/lib/prompt/types/with-description.js +74 -0
- package/lib/pull/features/apig.d.ts +2 -0
- package/lib/pull/features/apig.js +10 -10
- package/lib/pull/features/client.d.ts +2 -0
- package/lib/pull/features/client.js +11 -10
- package/lib/pull/features/functions/index.d.ts +2 -0
- package/lib/pull/features/functions/index.js +38 -41
- package/lib/pull/features/functions/languages.d.ts +4 -0
- package/lib/pull/features/functions/languages.js +3 -3
- package/lib/pull/features/index.d.ts +6 -0
- package/lib/pull/index.d.ts +2 -0
- package/lib/pull/index.js +8 -8
- package/lib/repl-server.d.ts +32 -0
- package/lib/repl-server.js +8 -8
- package/lib/runtime-store.d.ts +3 -0
- package/lib/runtime-store.js +6 -12
- package/lib/serve/features/apig.d.ts +3 -0
- package/lib/serve/features/apig.js +3 -3
- package/lib/serve/features/appsail.d.ts +16 -0
- package/lib/serve/features/appsail.js +52 -10
- package/lib/serve/features/client.d.ts +2 -0
- package/lib/serve/features/client.js +1 -1
- package/lib/serve/features/index.d.ts +7 -0
- package/lib/serve/features/index.js +4 -4
- package/lib/serve/features/slate.d.ts +12 -0
- package/lib/serve/index.d.ts +2 -0
- package/lib/serve/index.js +65 -67
- package/lib/serve/server/index.d.ts +37 -0
- package/lib/serve/server/index.js +215 -121
- package/lib/serve/server/lib/appsail/index.d.ts +6 -0
- package/lib/serve/server/lib/appsail/index.js +214 -117
- package/lib/serve/server/lib/appsail/start.js +14 -5
- package/lib/serve/server/lib/java/index.d.ts +6 -0
- package/lib/serve/server/lib/java/index.js +52 -22
- package/lib/serve/server/lib/master/appsail.d.ts +5 -0
- package/lib/serve/server/lib/master/appsail.js +16 -5
- package/lib/serve/server/lib/master/functions.d.ts +5 -0
- package/lib/serve/server/lib/master/functions.js +27 -0
- package/lib/serve/server/lib/master/index.d.ts +10 -0
- package/lib/serve/server/lib/master/index.js +11 -3
- package/lib/serve/server/lib/master/slate.d.ts +5 -0
- package/lib/serve/server/lib/master/slate.js +3 -0
- package/lib/serve/server/lib/master/unknown-req-proxy.d.ts +4 -0
- package/lib/serve/server/lib/master/unknown-req-proxy.js +3 -5
- package/lib/serve/server/lib/master/utils.d.ts +24 -0
- package/lib/serve/server/lib/master/utils.js +8 -4
- package/lib/serve/server/lib/master/web-client.d.ts +5 -0
- package/lib/serve/server/lib/node/index.d.ts +6 -0
- package/lib/serve/server/lib/node/index.js +54 -43
- package/lib/serve/server/lib/node/server/bio.js +133 -0
- package/lib/serve/server/lib/node/server/browserlogic/browserlogic-puppeteer.js +1 -1
- package/lib/serve/server/lib/node/server/index.js +22 -1
- package/lib/serve/server/lib/python/index.d.ts +6 -0
- package/lib/serve/server/lib/python/index.js +63 -8
- package/lib/serve/server/lib/slate/index.d.ts +6 -0
- package/lib/serve/server/lib/slate/static-server.d.ts +7 -0
- package/lib/serve/server/lib/slate/static-server.js +24 -24
- package/lib/serve/server/lib/web_client/index.d.ts +5 -0
- package/lib/serve/server/lib/web_client/index.js +11 -8
- package/lib/serve/server/lib/web_client/server.d.ts +7 -0
- package/lib/serve/server/lib/web_client/server.js +22 -22
- package/lib/serve/server/lib/web_client/types.d.ts +15 -0
- package/lib/serve/server/lib/web_client/types.js +2 -0
- package/lib/shell/dependencies/http-functions.d.ts +35 -0
- package/lib/shell/dependencies/http-functions.js +59 -26
- package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +1 -1
- package/lib/shell/dependencies/invoker/job/java/JavajobInvoker.java +51 -10
- package/lib/shell/dependencies/invoker/job/node.mjs +2 -2
- package/lib/shell/dependencies/non-http-function/fn-execution-handler.d.ts +13 -0
- package/lib/shell/dependencies/non-http-function/fn-execution-handler.js +260 -0
- package/lib/shell/dependencies/non-http-function/fn-handler.d.ts +30 -0
- package/lib/shell/dependencies/non-http-function/fn-handler.js +258 -0
- package/lib/shell/dependencies/non-http-function/index.d.ts +20 -0
- package/lib/shell/dependencies/non-http-function/index.js +62 -0
- package/lib/shell/dependencies/non-http-function/java.d.ts +9 -0
- package/lib/shell/dependencies/non-http-function/java.js +42 -0
- package/lib/shell/dependencies/non-http-function/node.d.ts +8 -0
- package/lib/shell/dependencies/non-http-function/node.js +36 -0
- package/lib/shell/dependencies/non-http-function/python.d.ts +5 -0
- package/lib/shell/dependencies/non-http-function/python.js +47 -0
- package/lib/shell/dependencies/non-http-function/slave-manager.d.ts +23 -0
- package/lib/shell/dependencies/non-http-function/slave-manager.js +173 -0
- package/lib/shell/dependencies/tunnel-server.d.ts +23 -0
- package/lib/shell/dependencies/tunnel-server.js +4 -4
- package/lib/shell/index.d.ts +2 -0
- package/lib/shell/index.js +31 -25
- package/lib/shell/prepare/index.d.ts +4 -0
- package/lib/shell/prepare/index.js +9 -27
- package/lib/shell/prepare/languages/index.d.ts +6 -0
- package/lib/shell/prepare/languages/index.js +20 -5
- package/lib/shell/prepare/languages/java.d.ts +3 -0
- package/lib/shell/prepare/languages/java.js +6 -14
- package/lib/shell/prepare/languages/node.d.ts +3 -0
- package/lib/shell/prepare/languages/node.js +14 -1
- package/lib/shell/prepare/languages/python.d.ts +3 -0
- package/lib/shell/prepare/languages/python.js +13 -2
- package/lib/slate-utils.d.ts +12 -0
- package/lib/throbber/index.d.ts +36 -0
- package/lib/throbber/index.js +11 -7
- package/lib/throbber/utils.d.ts +23 -0
- package/lib/track.d.ts +2 -0
- package/lib/track.js +13 -13
- package/lib/userConfig.d.ts +22 -0
- package/lib/userConfig.js +18 -8
- package/lib/util_modules/config/index.d.ts +6 -0
- package/lib/util_modules/config/lib/apig.d.ts +15 -0
- package/lib/util_modules/config/lib/apig.js +4 -4
- package/lib/util_modules/config/lib/appsail.d.ts +50 -0
- package/lib/util_modules/config/lib/appsail.js +96 -26
- package/lib/util_modules/config/lib/client.d.ts +20 -0
- package/lib/util_modules/config/lib/client.js +19 -6
- package/lib/util_modules/config/lib/functions.d.ts +48 -0
- package/lib/util_modules/config/lib/functions.js +27 -16
- package/lib/util_modules/config/lib/slate.d.ts +106 -0
- package/lib/util_modules/config/lib/slate.js +1 -1
- package/lib/util_modules/config-store.d.ts +12 -0
- package/lib/util_modules/config-store.js +55 -0
- package/lib/util_modules/constants/index.d.ts +24 -0
- package/lib/util_modules/constants/index.js +1 -5
- package/lib/util_modules/constants/lib/apig-rules.d.ts +3 -0
- package/lib/util_modules/constants/lib/apig-rules.js +1 -1
- package/lib/util_modules/constants/lib/browserLogic.d.ts +20 -0
- package/lib/util_modules/constants/lib/cliq-handlers.d.ts +32 -0
- package/lib/util_modules/constants/lib/dc-type.d.ts +59 -0
- package/lib/util_modules/constants/lib/default.d.ts +48 -0
- package/lib/util_modules/constants/lib/default.js +4 -0
- package/lib/util_modules/constants/lib/env-path.d.ts +6 -0
- package/lib/util_modules/constants/lib/event-action.d.ts +11 -0
- package/lib/util_modules/constants/lib/event-source.d.ts +11 -0
- package/lib/util_modules/constants/lib/file-names.d.ts +37 -0
- package/lib/util_modules/constants/lib/file-names.js +1 -0
- package/lib/util_modules/constants/lib/fn-type.d.ts +11 -0
- package/lib/util_modules/constants/lib/folder-names.d.ts +9 -0
- package/lib/util_modules/constants/lib/iac.d.ts +7 -0
- package/lib/util_modules/constants/lib/integ.d.ts +13 -0
- package/lib/util_modules/constants/lib/needed-scopes.d.ts +4 -0
- package/lib/util_modules/constants/lib/needed-scopes.js +3 -4
- package/lib/util_modules/constants/lib/placeholders.d.ts +65 -0
- package/lib/util_modules/constants/lib/placeholders.js +2 -1
- package/lib/util_modules/constants/lib/plugin.d.ts +27 -0
- package/lib/util_modules/constants/lib/ref-mapping.d.ts +15 -0
- package/lib/util_modules/constants/lib/regex.d.ts +20 -0
- package/lib/util_modules/constants/lib/regex.js +3 -0
- package/lib/util_modules/constants/lib/remote-mapping.d.ts +15 -0
- package/lib/util_modules/constants/lib/runtime.d.ts +18 -0
- package/lib/util_modules/constants/lib/signals-api-names.d.ts +9 -0
- package/lib/util_modules/constants/lib/signals-publishers-type.d.ts +7 -0
- package/lib/util_modules/constants/lib/signals-publishers.d.ts +9 -0
- package/lib/util_modules/constants/lib/template.d.ts +65 -0
- package/lib/util_modules/constants/lib/urls.d.ts +26 -0
- package/lib/util_modules/constants/lib/urls.js +12 -1
- package/lib/util_modules/constants/project.d.ts +4 -0
- package/lib/util_modules/container.d.ts +3 -0
- package/lib/util_modules/container.js +176 -0
- package/lib/util_modules/dc.d.ts +10 -0
- package/lib/{dc.js → util_modules/dc.js} +14 -18
- package/lib/util_modules/env.d.ts +7 -0
- package/lib/util_modules/env.js +3 -2
- package/lib/util_modules/fs/index.d.ts +3 -0
- package/lib/util_modules/fs/lib/async.d.ts +53 -0
- package/lib/util_modules/fs/lib/async.js +30 -1
- package/lib/util_modules/fs/lib/sync.d.ts +39 -0
- package/lib/util_modules/fs/lib/sync.js +24 -16
- package/lib/util_modules/fs/utils.d.ts +1 -0
- package/lib/util_modules/global-space.d.ts +1 -0
- package/lib/util_modules/js.d.ts +10 -0
- package/lib/util_modules/logger/index.d.ts +19 -0
- package/lib/util_modules/logger/index.js +80 -0
- package/lib/util_modules/logger/utils.d.ts +29 -0
- package/lib/util_modules/logger/utils.js +66 -0
- package/lib/util_modules/logger/winston.d.ts +9 -0
- package/lib/util_modules/logger/winston.js +90 -0
- package/lib/util_modules/option.d.ts +5 -0
- package/lib/util_modules/option.js +5 -5
- package/lib/util_modules/project.d.ts +70 -0
- package/lib/util_modules/project.js +26 -20
- package/lib/util_modules/runtime-store.d.ts +11 -0
- package/lib/util_modules/runtime-store.js +16 -0
- package/lib/util_modules/server.d.ts +13 -0
- package/lib/util_modules/server.js +78 -1
- package/lib/util_modules/shell.d.ts +21 -0
- package/lib/util_modules/shell.js +19 -4
- package/lib/util_modules/toml.d.ts +2 -0
- package/lib/util_modules/{parser/toml.js → toml.js} +3 -3
- package/package.json +6 -5
- package/templates/init/functions/java/event/sample.java +5 -8
- package/templates/init/functions/node/cron/types/cron.d.ts +1 -1
- package/templates/init/functions/node/event/sample.js +1 -12
- package/templates/init/functions/python/event/sample.py +0 -9
- package/templates/init/functions/python/integ/cliq/sample.py +1 -12
- package/docs/commands/signals/generate/index.toml +0 -19
- package/docs/commands/slate/unlink.toml +0 -9
- package/docs/commands/zest/generate/index.toml +0 -4
- package/docs/fn-utils/lib/ensure-java-userconfig.toml +0 -15
- package/docs/fn-utils/lib/java.toml +0 -34
- package/docs/serve/server/lib/slate/index.toml +0 -15
- package/docs/slate-utils.toml +0 -9
- package/lib/config-store.js +0 -10
- package/lib/fn-utils/lib/ensure-java-userconfig.js +0 -145
- package/lib/fn-utils/lib/java.js +0 -512
- package/lib/shell/dependencies/local-function.js +0 -483
- package/lib/util_modules/char.js +0 -12
- package/lib/util_modules/constants/lib/auth.js +0 -37
- package/lib/util_modules/logger.js +0 -51
- package/lib/winston.js +0 -75
- /package/lib/{internal → authentication}/crypt.js +0 -0
- /package/{docs/internal → lib/authentication/docs}/credential.toml +0 -0
- /package/{docs/authentication → lib/authentication/docs}/index.toml +0 -0
- /package/{docs/authentication → lib/authentication/docs}/login.toml +0 -0
- /package/{docs → lib/docs}/apig-utils.toml +0 -0
- /package/{docs → lib/docs}/client-utils.toml +0 -0
- /package/{docs → lib/docs}/command_needs/auth.toml +0 -0
- /package/{docs → lib/docs}/command_needs/rc.toml +0 -0
- /package/{docs → lib/docs}/commands/apig/disable.toml +0 -0
- /package/{docs → lib/docs}/commands/apig/enable.toml +0 -0
- /package/{docs → lib/docs}/commands/apig/status.toml +0 -0
- /package/{docs → lib/docs}/commands/client/delete.toml +0 -0
- /package/{docs → lib/docs}/commands/ds/export.toml +0 -0
- /package/{docs → lib/docs}/commands/ds/import.toml +0 -0
- /package/{docs → lib/docs}/commands/ds/status.toml +0 -0
- /package/{docs → lib/docs}/commands/event/generate/index.toml +0 -0
- /package/{docs → lib/docs}/commands/event/generate/integ.toml +0 -0
- /package/{docs → lib/docs}/commands/event/generate/job.toml +0 -0
- /package/{docs → lib/docs}/commands/functions/config.toml +0 -0
- /package/{docs → lib/docs}/commands/functions/delete.toml +0 -0
- /package/{docs → lib/docs}/commands/functions/shell.toml +0 -0
- /package/{docs → lib/docs}/commands/iac/export.toml +0 -0
- /package/{docs → lib/docs}/commands/iac/import.toml +0 -0
- /package/{docs → lib/docs}/commands/iac/status.toml +0 -0
- /package/{docs → lib/docs}/commands/project/use.toml +0 -0
- /package/{docs → lib/docs}/dc.toml +0 -0
- /package/{docs → lib/docs}/deploy/features/apig.toml +0 -0
- /package/{docs → lib/docs}/deploy/features/functions/index.toml +0 -0
- /package/{docs → lib/docs}/endpoints/lib/env.toml +0 -0
- /package/{docs → lib/docs}/endpoints/lib/job-scheduling.toml +0 -0
- /package/{docs → lib/docs}/event_generate/cache.toml +0 -0
- /package/{docs → lib/docs}/event_generate/custom.toml +0 -0
- /package/{docs → lib/docs}/event_generate/datastore.toml +0 -0
- /package/{docs → lib/docs}/event_generate/filestore.toml +0 -0
- /package/{docs → lib/docs}/event_generate/integration/cliq.toml +0 -0
- /package/{docs → lib/docs}/execute-script.toml +0 -0
- /package/{docs → lib/docs}/fn-utils/lib/common.toml +0 -0
- /package/{docs → lib/docs}/fn-utils/lib/node.toml +0 -0
- /package/{docs → lib/docs}/fn-utils/lib/python.toml +0 -0
- /package/{docs → lib/docs}/iac/status/bundle.toml +0 -0
- /package/{docs → lib/docs}/init/dependencies/python/ensure-python.toml +0 -0
- /package/{docs → lib/docs}/init/dependencies/python/pip-install.toml +0 -0
- /package/{docs → lib/docs}/init/index.toml +0 -0
- /package/{docs → lib/docs}/internal/command.toml +0 -0
- /package/{docs → lib/docs}/internal/config.toml +0 -0
- /package/{docs → lib/docs}/optional-import.toml +0 -0
- /package/{docs → lib/docs}/plugin-loader.toml +0 -0
- /package/{docs → lib/docs}/port-resolver.toml +0 -0
- /package/{docs → lib/docs}/pull/index.toml +0 -0
- /package/{docs → lib/docs}/serve/index.toml +0 -0
- /package/{docs → lib/docs}/serve/server/index.toml +0 -0
- /package/{docs → lib/docs}/serve/server/lib/appsail/index.toml +0 -0
- /package/{docs → lib/docs}/serve/server/lib/web_client/server.toml +0 -0
- /package/{docs → lib/docs}/shell/dependencies/tunnel-server.toml +0 -0
- /package/{docs → lib/docs}/shell/index.toml +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/playwright/.classpath +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/playwright/.project +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/playwright/catalyst-config.json +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/playwright/sample.java +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/selenium/.classpath +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/selenium/.project +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/selenium/catalyst-config.json +0 -0
- /package/templates/init/functions/java/{browserLogic → browserlogic}/selenium/sample.java +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: ({ optional, resolveOnNotFound, skipOrgCheck, skipProjectCheck, generateRc }?: {
|
|
2
|
+
optional?: boolean | undefined;
|
|
3
|
+
resolveOnNotFound?: boolean | undefined;
|
|
4
|
+
skipOrgCheck?: boolean | undefined;
|
|
5
|
+
skipProjectCheck?: boolean | undefined;
|
|
6
|
+
generateRc?: boolean | undefined;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export default _default;
|
package/lib/command_needs/rc.js
CHANGED
|
@@ -14,18 +14,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const ansi_colors_1 = require("ansi-colors");
|
|
16
16
|
const endpoints_1 = require("../endpoints");
|
|
17
|
-
const
|
|
17
|
+
const index_js_1 = __importDefault(require("../error/index.js"));
|
|
18
18
|
const rc_1 = __importDefault(require("../internal/rc"));
|
|
19
19
|
const prompt_1 = __importDefault(require("../prompt"));
|
|
20
20
|
const runtime_store_1 = __importDefault(require("../runtime-store"));
|
|
21
21
|
const constants_1 = require("../util_modules/constants");
|
|
22
22
|
const project_1 = __importDefault(require("../util_modules/constants/project"));
|
|
23
23
|
const js_1 = require("../util_modules/js");
|
|
24
|
-
const
|
|
24
|
+
const index_1 = require("../util_modules/logger/index");
|
|
25
25
|
const option_1 = require("../util_modules/option");
|
|
26
26
|
const project_2 = require("../util_modules/project");
|
|
27
|
-
const config_store_1 = __importDefault(require("../config-store"));
|
|
28
|
-
const dc_1 = require("../dc");
|
|
27
|
+
const config_store_1 = __importDefault(require("../util_modules/config-store"));
|
|
28
|
+
const dc_1 = require("../util_modules/dc");
|
|
29
29
|
const env_1 = require("../util_modules/env");
|
|
30
30
|
const features_1 = require("../init/features");
|
|
31
31
|
exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck = true, skipProjectCheck = true, generateRc = false } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -43,7 +43,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
43
43
|
runtime_store_1.default.set('project.env.id', orgOpt + '');
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
throw new
|
|
46
|
+
throw new index_js_1.default('Org and Project Id cannot be empty.', {
|
|
47
47
|
exit: 1
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -52,7 +52,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
52
52
|
const orgList = yield orgApi.getAllOrgs();
|
|
53
53
|
const found = orgList.find((org) => org.id + '' === orgOpt);
|
|
54
54
|
if (!found) {
|
|
55
|
-
throw new
|
|
55
|
+
throw new index_js_1.default('Invalid "org" option supplied', {
|
|
56
56
|
exit: 2
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -70,7 +70,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
70
70
|
const convertEnvToProperties = (envArr) => {
|
|
71
71
|
const envObj = js_1.JS.find(envArr, { env_name: constants_1.DEFAULT.env_name });
|
|
72
72
|
if (envObj === undefined) {
|
|
73
|
-
throw new
|
|
73
|
+
throw new index_js_1.default('Unable to find the development environment for this project', {
|
|
74
74
|
exit: 2
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -92,7 +92,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
92
92
|
const allOrgs = yield orgApi.getAllOrgs();
|
|
93
93
|
const orgId = (0, project_2.getEnvId)();
|
|
94
94
|
const orgDetails = allOrgs.find((org) => (!orgId && org.is_default) || org.name === orgId || org.id === orgId);
|
|
95
|
-
throw new
|
|
95
|
+
throw new index_js_1.default('invalid project provided with the --project option', {
|
|
96
96
|
exit: 1,
|
|
97
97
|
errorId: 'RC-1',
|
|
98
98
|
arg: [
|
|
@@ -119,11 +119,11 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
119
119
|
}
|
|
120
120
|
const rcInstance = yield rc_1.default.load().catch((err) => {
|
|
121
121
|
if (optional || ignoreRC) {
|
|
122
|
-
(0,
|
|
123
|
-
(0,
|
|
122
|
+
(0, index_1.debug)('Unable to load RC file');
|
|
123
|
+
(0, index_1.debug)('Reason: ' + err);
|
|
124
124
|
return { loaded: false };
|
|
125
125
|
}
|
|
126
|
-
throw new
|
|
126
|
+
throw new index_js_1.default('Unable to load the ' + constants_1.FILENAME.rc + 'file', {
|
|
127
127
|
exit: 1,
|
|
128
128
|
original: err,
|
|
129
129
|
errorId: 'RC-2',
|
|
@@ -133,10 +133,10 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
133
133
|
runtime_store_1.default.set('rc', rcInstance);
|
|
134
134
|
if (!rcInstance.loaded) {
|
|
135
135
|
if (!ignoreRC && orgOpt === null && !skipOrgCheck) {
|
|
136
|
-
(0,
|
|
136
|
+
(0, index_1.warning)('Not in Catalyst app directory!!!');
|
|
137
137
|
const orgList = yield orgApi.getAllOrgs();
|
|
138
138
|
if (orgList.length === 0) {
|
|
139
|
-
throw new
|
|
139
|
+
throw new index_js_1.default('Visit ' +
|
|
140
140
|
(0, ansi_colors_1.underline)(constants_1.ORIGIN.console) +
|
|
141
141
|
' for creation of your first project before you continue.', { exit: 1 });
|
|
142
142
|
}
|
|
@@ -167,7 +167,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
167
167
|
runtime_store_1.default.set('project.id', selectedProject.id);
|
|
168
168
|
}
|
|
169
169
|
if (generateRc) {
|
|
170
|
-
(0,
|
|
170
|
+
(0, index_1.warning)('Not in Catalyst app directory!!!');
|
|
171
171
|
const stagedAns = yield prompt_1.default.ask(prompt_1.default.question('consent', 'Do you wish to initialize the catalyst project in this directory?', {
|
|
172
172
|
type: 'confirm',
|
|
173
173
|
defaultAns: true
|
|
@@ -179,7 +179,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
179
179
|
if (optional || ignoreRC) {
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
throw new
|
|
182
|
+
throw new index_js_1.default('Not in a Catalyst app directory run catalyst init', {
|
|
183
183
|
exit: 0,
|
|
184
184
|
errorId: 'RC-3',
|
|
185
185
|
arg: [(0, ansi_colors_1.bold)(constants_1.FILENAME.rc), (0, ansi_colors_1.bold)('catalyst init'), (0, ansi_colors_1.bold)('--project')]
|
|
@@ -191,16 +191,16 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
191
191
|
let finalProjectObj;
|
|
192
192
|
let finalEnvObj;
|
|
193
193
|
if (!(rcInstance instanceof rc_1.default)) {
|
|
194
|
-
throw new
|
|
194
|
+
throw new index_js_1.default('RC is undefined', { exit: 2 });
|
|
195
195
|
}
|
|
196
196
|
const defaultRCProject = rcInstance.defaultProject;
|
|
197
197
|
const defaultRCEnv = rcInstance.defaultEnv;
|
|
198
198
|
if (defaultRCProject === undefined || js_1.JS.isEmpty(defaultRCProject)) {
|
|
199
|
-
(0,
|
|
199
|
+
(0, index_1.debug)('default project details is not defined or is empty in RC file');
|
|
200
200
|
if (optional) {
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
throw new
|
|
203
|
+
throw new index_js_1.default(constants_1.FILENAME.rc + ' file is corrupted', {
|
|
204
204
|
exit: 1,
|
|
205
205
|
errorId: 'RC-4',
|
|
206
206
|
arg: [(0, ansi_colors_1.bold)(constants_1.FILENAME.rc), (0, ansi_colors_1.bold)('catalyst init project'), (0, ansi_colors_1.bold)('--option')]
|
|
@@ -221,8 +221,8 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
221
221
|
finalEnvObj = defaultRCEnv;
|
|
222
222
|
}
|
|
223
223
|
if (finalProjectObj === undefined) {
|
|
224
|
-
(0,
|
|
225
|
-
throw new
|
|
224
|
+
(0, index_1.debug)('finalProject came to be empty, default project details is possibly not defined in RC file');
|
|
225
|
+
throw new index_js_1.default(constants_1.FILENAME.rc + ' file is corrupted', {
|
|
226
226
|
exit: 1,
|
|
227
227
|
errorId: 'RC-4',
|
|
228
228
|
arg: [(0, ansi_colors_1.bold)(constants_1.FILENAME.rc), (0, ansi_colors_1.bold)('catalyst init project'), (0, ansi_colors_1.bold)('--option')]
|
|
@@ -243,7 +243,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
243
243
|
finalProjectObj = undefined;
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
|
-
throw new
|
|
246
|
+
throw new index_js_1.default('no access to project: ' + (finalProjectObj === null || finalProjectObj === void 0 ? void 0 : finalProjectObj.id), {
|
|
247
247
|
exit: 1,
|
|
248
248
|
errorId: 'RC-5',
|
|
249
249
|
arg: [
|
|
@@ -255,7 +255,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
255
255
|
case 403: {
|
|
256
256
|
const activeDC = (0, dc_1.getActiveDC)();
|
|
257
257
|
const user = config_store_1.default.get(`${activeDC}.user`);
|
|
258
|
-
throw new
|
|
258
|
+
throw new index_js_1.default('Invalid org identifier: ' + (finalEnvObj === null || finalEnvObj === void 0 ? void 0 : finalEnvObj.id), {
|
|
259
259
|
original: err,
|
|
260
260
|
errorId: 'RC-6',
|
|
261
261
|
arg: [
|
|
@@ -292,7 +292,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
292
292
|
if (finalEnvObj === undefined || js_1.JS.isEmpty(finalEnvObj)) {
|
|
293
293
|
const envObj = js_1.JS.find(envs, { env_name: constants_1.DEFAULT.env_name });
|
|
294
294
|
if (envObj === undefined || js_1.JS.isEmpty(envObj)) {
|
|
295
|
-
throw new
|
|
295
|
+
throw new index_js_1.default('Unable to find the development environment for this project', {
|
|
296
296
|
exit: 2
|
|
297
297
|
});
|
|
298
298
|
}
|
|
@@ -305,7 +305,7 @@ exports.default = ({ optional = false, resolveOnNotFound = false, skipOrgCheck =
|
|
|
305
305
|
if (defaultRCProject.id + '' !== finalProjectObj.id + '' &&
|
|
306
306
|
(0, option_1.getCurrentCommand)() !== 'project:reset' &&
|
|
307
307
|
!process.env.CATALYST_SUB_PROCESS) {
|
|
308
|
-
(0,
|
|
308
|
+
(0, index_1.message)('Using project other than the default project for this folder. Use ' +
|
|
309
309
|
(0, ansi_colors_1.bold)('catalyst project:reset') +
|
|
310
310
|
' in order to reset.');
|
|
311
311
|
}
|
|
@@ -14,22 +14,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const ansi_colors_1 = require("ansi-colors");
|
|
16
16
|
const endpoints_1 = require("../../endpoints");
|
|
17
|
-
const
|
|
17
|
+
const index_js_1 = __importDefault(require("../../error/index.js"));
|
|
18
18
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
19
19
|
const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const scopes_js_1 = __importDefault(require("../../authentication/constants/scopes.js"));
|
|
21
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
22
22
|
exports.default = new command_1.default('apig:disable')
|
|
23
23
|
.description('Disable API Gateway for your project')
|
|
24
|
-
.needs('auth', [
|
|
24
|
+
.needs('auth', [scopes_js_1.default.projects])
|
|
25
25
|
.needs('config')
|
|
26
26
|
.needs('rc')
|
|
27
27
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
28
|
const api = yield (0, endpoints_1.apigAPI)();
|
|
29
29
|
const response = (yield api.getAPIGStatus());
|
|
30
|
-
(0,
|
|
30
|
+
(0, index_1.info)();
|
|
31
31
|
if (response.scheduled) {
|
|
32
|
-
throw new
|
|
32
|
+
throw new index_js_1.default('Scheduler in progress', {
|
|
33
33
|
exit: 0,
|
|
34
34
|
errorId: 'DIS-1',
|
|
35
35
|
arg: [(0, ansi_colors_1.bold)('catalyst apig:status')]
|
|
@@ -39,8 +39,8 @@ exports.default = new command_1.default('apig:disable')
|
|
|
39
39
|
yield api.updateAPIGStatus(false);
|
|
40
40
|
}
|
|
41
41
|
const config = runtime_store_1.default.get('config');
|
|
42
|
-
(0,
|
|
42
|
+
(0, index_1.info)('Updating local config');
|
|
43
43
|
config.set('apig.enabled', false);
|
|
44
44
|
yield config.save();
|
|
45
|
-
(0,
|
|
45
|
+
(0, index_1.success)('Catalyst API Gateway successfully disabled!');
|
|
46
46
|
}));
|
|
@@ -14,22 +14,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const ansi_colors_1 = require("ansi-colors");
|
|
16
16
|
const endpoints_1 = require("../../endpoints");
|
|
17
|
-
const
|
|
17
|
+
const index_js_1 = __importDefault(require("../../error/index.js"));
|
|
18
18
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
19
19
|
const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const scopes_js_1 = __importDefault(require("../../authentication/constants/scopes.js"));
|
|
21
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
22
22
|
exports.default = new command_1.default('apig:enable')
|
|
23
23
|
.description('Enable API Gateway for your project')
|
|
24
|
-
.needs('auth', [
|
|
24
|
+
.needs('auth', [scopes_js_1.default.projects])
|
|
25
25
|
.needs('config')
|
|
26
26
|
.needs('rc')
|
|
27
27
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
28
|
const api = yield (0, endpoints_1.apigAPI)();
|
|
29
29
|
const response = (yield api.getAPIGStatus());
|
|
30
|
-
(0,
|
|
30
|
+
(0, index_1.info)();
|
|
31
31
|
if (response.scheduled) {
|
|
32
|
-
throw new
|
|
32
|
+
throw new index_js_1.default('Scheduler in progress', {
|
|
33
33
|
exit: 0,
|
|
34
34
|
errorId: 'EN-1',
|
|
35
35
|
arg: [(0, ansi_colors_1.bold)('catalyst apig:status')]
|
|
@@ -39,8 +39,8 @@ exports.default = new command_1.default('apig:enable')
|
|
|
39
39
|
yield api.updateAPIGStatus(true);
|
|
40
40
|
}
|
|
41
41
|
const config = runtime_store_1.default.get('config');
|
|
42
|
-
(0,
|
|
42
|
+
(0, index_1.info)('Updating local config');
|
|
43
43
|
config.set('apig.enabled', true);
|
|
44
44
|
yield config.save();
|
|
45
|
-
(0,
|
|
45
|
+
(0, index_1.success)('Catalyst API Gateway successfully enabled!');
|
|
46
46
|
}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import command from '../../internal/command';
|
|
2
|
+
interface IAPIGScheduleStatus {
|
|
3
|
+
success_count: number;
|
|
4
|
+
fail_count: number;
|
|
5
|
+
fail_details: Array<{
|
|
6
|
+
[x: string]: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export interface IAPIGScheduleReport {
|
|
10
|
+
state: number;
|
|
11
|
+
total?: number;
|
|
12
|
+
create?: IAPIGScheduleStatus;
|
|
13
|
+
update?: IAPIGScheduleStatus;
|
|
14
|
+
delete?: IAPIGScheduleStatus;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: command;
|
|
18
|
+
export default _default;
|
|
@@ -15,40 +15,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const ansi_colors_1 = require("ansi-colors");
|
|
16
16
|
const cli_table_1 = __importDefault(require("../../cli_table"));
|
|
17
17
|
const endpoints_1 = require("../../endpoints");
|
|
18
|
-
const
|
|
18
|
+
const index_js_1 = __importDefault(require("../../error/index.js"));
|
|
19
19
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
20
20
|
const throbber_1 = __importDefault(require("../../throbber"));
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const scopes_js_1 = __importDefault(require("../../authentication/constants/scopes.js"));
|
|
22
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
23
23
|
const option_1 = require("../../util_modules/option");
|
|
24
24
|
exports.default = new command_1.default('apig:status')
|
|
25
25
|
.description('Obtain the current status of API Gateway for your project and the schedule progress')
|
|
26
26
|
.option('--previous', 'show previous schedule status instead of current one')
|
|
27
|
-
.needs('auth', [
|
|
27
|
+
.needs('auth', [scopes_js_1.default.projects])
|
|
28
28
|
.needs('config')
|
|
29
29
|
.needs('rc')
|
|
30
30
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
31
|
const api = yield (0, endpoints_1.apigAPI)();
|
|
32
32
|
const apigStatus = (yield api.getAPIGStatus());
|
|
33
33
|
if (!apigStatus.status) {
|
|
34
|
-
(0,
|
|
35
|
-
(0,
|
|
34
|
+
(0, index_1.info)(`${(0, ansi_colors_1.bold)('API Gateway')}: ${(0, ansi_colors_1.red)('DISABLED')}`);
|
|
35
|
+
(0, index_1.info)();
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
(0,
|
|
38
|
+
(0, index_1.info)(`${(0, ansi_colors_1.bold)('API Gateway')}: ${(0, ansi_colors_1.green)('ENABLED')}`);
|
|
39
39
|
const previousOpt = (0, option_1.getOptionValue)('previous', false);
|
|
40
40
|
if (apigStatus.scheduled === false && !previousOpt) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.info)();
|
|
44
44
|
let report;
|
|
45
45
|
try {
|
|
46
46
|
report = (yield api.getScheduleReport(previousOpt));
|
|
47
47
|
}
|
|
48
48
|
catch (e) {
|
|
49
|
-
const err =
|
|
49
|
+
const err = index_js_1.default.getErrorInstance(e);
|
|
50
50
|
if (err.status && err.status === 404) {
|
|
51
|
-
throw new
|
|
51
|
+
throw new index_js_1.default('There is no report available.', {
|
|
52
52
|
exit: 0,
|
|
53
53
|
errorId: 'STAT-1'
|
|
54
54
|
});
|
|
@@ -181,7 +181,7 @@ exports.default = new command_1.default('apig:status')
|
|
|
181
181
|
break;
|
|
182
182
|
default:
|
|
183
183
|
needIteration = false;
|
|
184
|
-
reject(new
|
|
184
|
+
reject(new index_js_1.default('unknown state received', { exit: 2 }));
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
if (report.state !== 4 && report.state !== 5) {
|
|
@@ -193,7 +193,7 @@ exports.default = new command_1.default('apig:status')
|
|
|
193
193
|
report = (yield api.getScheduleReport(false));
|
|
194
194
|
}
|
|
195
195
|
catch (ex) {
|
|
196
|
-
const err =
|
|
196
|
+
const err = index_js_1.default.getErrorInstance(ex);
|
|
197
197
|
if (err.status && err.status === 404) {
|
|
198
198
|
report = (yield api.getScheduleReport(true));
|
|
199
199
|
}
|
|
@@ -39,10 +39,11 @@ const ansi_colors_1 = require("ansi-colors");
|
|
|
39
39
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
40
40
|
const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
41
41
|
const constants_1 = require("../../util_modules/constants");
|
|
42
|
-
const
|
|
42
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
43
|
+
const scopes_1 = __importDefault(require("../../authentication/constants/scopes"));
|
|
43
44
|
exports.default = new command_1.default('appsail:add')
|
|
44
|
-
.description('Link an already existing AppSail
|
|
45
|
-
.needs('auth', [
|
|
45
|
+
.description('Link an already existing AppSail to Catalyst Project')
|
|
46
|
+
.needs('auth', [scopes_1.default.functions])
|
|
46
47
|
.needs('config', { optional: true })
|
|
47
48
|
.needs('rc')
|
|
48
49
|
.ci(false)
|
|
@@ -50,7 +51,7 @@ exports.default = new command_1.default('appsail:add')
|
|
|
50
51
|
const config = runtime_store_1.default.get('config');
|
|
51
52
|
yield (yield Promise.resolve().then(() => __importStar(require('../../init/features')))).appsail();
|
|
52
53
|
yield config.save();
|
|
53
|
-
(0,
|
|
54
|
-
(0,
|
|
55
|
-
(0,
|
|
54
|
+
(0, index_1.message)((0, ansi_colors_1.bold)(constants_1.FILENAME.config) + ' file has been successfully updated with appsail details.');
|
|
55
|
+
(0, index_1.info)();
|
|
56
|
+
(0, index_1.success)('AppSail successfully linked');
|
|
56
57
|
}));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const error_1 = __importDefault(require("../../error"));
|
|
16
|
+
const command_1 = __importDefault(require("../../internal/command"));
|
|
17
|
+
const prompt_1 = __importDefault(require("../../prompt"));
|
|
18
|
+
const config_1 = require("../../util_modules/config");
|
|
19
|
+
exports.default = new command_1.default('appsail:unlink [appsail_name]')
|
|
20
|
+
.description('Unlink an AppSail from the current project folder')
|
|
21
|
+
.needs('auth')
|
|
22
|
+
.needs('config')
|
|
23
|
+
.needs('rc')
|
|
24
|
+
.ci(false)
|
|
25
|
+
.action((appSailName) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
const allAppSails = config_1.appSailConfig.raw(false) || [];
|
|
27
|
+
if (allAppSails.length === 0) {
|
|
28
|
+
throw new error_1.default('No AppSails found linked to this project directory', {
|
|
29
|
+
exit: 1
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (!appSailName) {
|
|
33
|
+
const nameQ = yield prompt_1.default.ask(prompt_1.default.question('name', 'Please select an AppSail to unlink', {
|
|
34
|
+
type: 'list',
|
|
35
|
+
choices: allAppSails.map((sail) => prompt_1.default.choice(sail.name, { value: sail.name, short: sail.name }))
|
|
36
|
+
}));
|
|
37
|
+
if (!nameQ.name) {
|
|
38
|
+
throw new error_1.default('Unable to get the AppSail name from user', { exit: 2 });
|
|
39
|
+
}
|
|
40
|
+
appSailName = nameQ.name;
|
|
41
|
+
}
|
|
42
|
+
yield config_1.appSailConfig.unlinkAppSail(appSailName);
|
|
43
|
+
}));
|
|
@@ -16,33 +16,33 @@ const ansi_colors_1 = require("ansi-colors");
|
|
|
16
16
|
const path_1 = require("path");
|
|
17
17
|
const client_utils_1 = require("../../client-utils");
|
|
18
18
|
const endpoints_1 = require("../../endpoints");
|
|
19
|
-
const
|
|
19
|
+
const index_js_1 = __importDefault(require("../../error/index.js"));
|
|
20
20
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
21
21
|
const prompt_1 = __importDefault(require("../../prompt"));
|
|
22
22
|
const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
23
23
|
const config_1 = require("../../util_modules/config");
|
|
24
24
|
const constants_1 = require("../../util_modules/constants");
|
|
25
|
+
const scopes_js_1 = __importDefault(require("../../authentication/constants/scopes.js"));
|
|
25
26
|
const fs_1 = require("../../util_modules/fs");
|
|
26
27
|
const js_1 = require("../../util_modules/js");
|
|
27
|
-
const
|
|
28
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
28
29
|
const option_1 = require("../../util_modules/option");
|
|
29
|
-
const project_1 = require("../../util_modules/project");
|
|
30
30
|
exports.default = new command_1.default('client:delete [client_version]')
|
|
31
31
|
.description('Delete a version of the client from the remote console or the local directory')
|
|
32
32
|
.option('--local', 'removes the client from local machine')
|
|
33
33
|
.option('--remote', 'removes the selected client from remote console')
|
|
34
|
-
.needs('auth', [
|
|
34
|
+
.needs('auth', [scopes_js_1.default.webapp])
|
|
35
35
|
.needs('config')
|
|
36
36
|
.needs('rc')
|
|
37
37
|
.action((clientVersion) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
38
|
const { local = 'LOCAL', remote = 'REMOTE' } = {};
|
|
39
|
-
const clientDir =
|
|
39
|
+
const clientDir = config_1.clientConfig.source();
|
|
40
40
|
const clientApi = yield (0, endpoints_1.clientAPI)();
|
|
41
41
|
let localOpt = (0, option_1.getOptionValue)('local', false);
|
|
42
42
|
let remoteOpt = (0, option_1.getOptionValue)('remote', false);
|
|
43
43
|
const appsToBeDeleted = [];
|
|
44
44
|
if (localOpt && remoteOpt) {
|
|
45
|
-
throw new
|
|
45
|
+
throw new index_js_1.default('both options specified', {
|
|
46
46
|
exit: 1,
|
|
47
47
|
errorId: 'CDEL-1',
|
|
48
48
|
arg: [(0, ansi_colors_1.bold)('--local'), (0, ansi_colors_1.bold)('--remote')]
|
|
@@ -81,18 +81,18 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
81
81
|
checkpath: true
|
|
82
82
|
});
|
|
83
83
|
if (configFile === undefined) {
|
|
84
|
-
throw new
|
|
84
|
+
throw new index_js_1.default('File not found', { exit: 2 });
|
|
85
85
|
}
|
|
86
86
|
const version = js_1.JS.get(configFile, 'version', '[unknown]');
|
|
87
87
|
localDel.version = version;
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
90
|
-
const err =
|
|
90
|
+
const err = index_js_1.default.getErrorInstance(error);
|
|
91
91
|
err.exit = 2;
|
|
92
|
-
(0,
|
|
92
|
+
(0, index_1.debug)('Failed to read ' + constants_1.FILENAME.client.package_json + ' Reason: ' + err.message);
|
|
93
93
|
}
|
|
94
94
|
if (clientVersion !== undefined && clientVersion !== localDel.version) {
|
|
95
|
-
throw new
|
|
95
|
+
throw new index_js_1.default('version unavailable in local', {
|
|
96
96
|
exit: 1,
|
|
97
97
|
errorId: 'CDEL-2',
|
|
98
98
|
arg: [(0, ansi_colors_1.bold)(localDel.version)]
|
|
@@ -103,12 +103,12 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
103
103
|
else {
|
|
104
104
|
const conf = runtime_store_1.default.get('config');
|
|
105
105
|
if (conf.get('client') !== undefined) {
|
|
106
|
-
(0,
|
|
106
|
+
(0, index_1.debug)('No client directory found. Removing the entry for client in ' +
|
|
107
107
|
constants_1.FILENAME.config);
|
|
108
108
|
conf.unset('client');
|
|
109
109
|
yield conf.save();
|
|
110
110
|
}
|
|
111
|
-
throw new
|
|
111
|
+
throw new index_js_1.default('No client directory found in local', {
|
|
112
112
|
exit: 0,
|
|
113
113
|
errorId: 'CDEL-3',
|
|
114
114
|
arg: [(0, ansi_colors_1.bold)('catalyst client:setup')]
|
|
@@ -119,7 +119,7 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
119
119
|
const choicesArray = [];
|
|
120
120
|
let historyArr = (yield clientApi.getAllHistory());
|
|
121
121
|
if (js_1.JS.isEmpty(historyArr)) {
|
|
122
|
-
throw new
|
|
122
|
+
throw new index_js_1.default('No clients available', {
|
|
123
123
|
exit: 0,
|
|
124
124
|
errorId: 'CDEL-4',
|
|
125
125
|
arg: [(0, ansi_colors_1.bold)('catalyst deploy --only client')]
|
|
@@ -136,7 +136,7 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
136
136
|
.map((his) => {
|
|
137
137
|
return '* ' + his.app_version;
|
|
138
138
|
});
|
|
139
|
-
throw new
|
|
139
|
+
throw new index_js_1.default('Version unavailble in remote', {
|
|
140
140
|
exit: 1,
|
|
141
141
|
errorId: 'CDEL-5',
|
|
142
142
|
arg: [
|
|
@@ -146,7 +146,7 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
if (ipVersion.status) {
|
|
149
|
-
throw new
|
|
149
|
+
throw new index_js_1.default('attempt to delete a live web client', {
|
|
150
150
|
exit: 0,
|
|
151
151
|
errorId: 'CDEL-6',
|
|
152
152
|
arg: [(0, ansi_colors_1.bold)(ipVersion.app_version)]
|
|
@@ -191,14 +191,14 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
191
191
|
appsToBeDeleted.push(choicesArray[1].value);
|
|
192
192
|
}
|
|
193
193
|
else if (choicesArray.length === 2 && choicesArray[1].disabled) {
|
|
194
|
-
throw new
|
|
194
|
+
throw new index_js_1.default('Only live client available', {
|
|
195
195
|
exit: 1,
|
|
196
196
|
errorId: 'CDEL-7',
|
|
197
197
|
arg: [(0, ansi_colors_1.bold)(historyArr[0].app_version)]
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
else {
|
|
201
|
-
throw new
|
|
201
|
+
throw new index_js_1.default('No clients selected from remote', { exit: 2 });
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
const consentAns = yield prompt_1.default.ask(prompt_1.default.question('consent', 'Are you sure you want to delete the clients : ' +
|
|
@@ -210,7 +210,7 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
210
210
|
}
|
|
211
211
|
}));
|
|
212
212
|
if (!consentAns.consent) {
|
|
213
|
-
(0,
|
|
213
|
+
(0, index_1.message)('Aborted by user');
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
216
|
yield Promise.all(appsToBeDeleted.map((app) => {
|
|
@@ -222,5 +222,5 @@ exports.default = new command_1.default('client:delete [client_version]')
|
|
|
222
222
|
}
|
|
223
223
|
return;
|
|
224
224
|
}));
|
|
225
|
-
(0,
|
|
225
|
+
(0, index_1.success)('Catalyst client delete complete!');
|
|
226
226
|
}));
|
|
@@ -39,10 +39,11 @@ const ansi_colors_1 = require("ansi-colors");
|
|
|
39
39
|
const command_1 = __importDefault(require("../../internal/command"));
|
|
40
40
|
const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
41
41
|
const constants_1 = require("../../util_modules/constants");
|
|
42
|
-
const
|
|
42
|
+
const scopes_js_1 = __importDefault(require("../../authentication/constants/scopes.js"));
|
|
43
|
+
const index_1 = require("../../util_modules/logger/index");
|
|
43
44
|
exports.default = new command_1.default('client:setup')
|
|
44
45
|
.description('Set up and configure the client directory in your project directory')
|
|
45
|
-
.needs('auth', [
|
|
46
|
+
.needs('auth', [scopes_js_1.default.webapp])
|
|
46
47
|
.needs('config', { optional: true })
|
|
47
48
|
.needs('rc')
|
|
48
49
|
.ci(false)
|
|
@@ -50,7 +51,7 @@ exports.default = new command_1.default('client:setup')
|
|
|
50
51
|
const config = runtime_store_1.default.get('config');
|
|
51
52
|
yield (yield Promise.resolve().then(() => __importStar(require('../../init/features')))).client();
|
|
52
53
|
yield config.save();
|
|
53
|
-
(0,
|
|
54
|
-
(0,
|
|
55
|
-
(0,
|
|
54
|
+
(0, index_1.message)((0, ansi_colors_1.bold)(constants_1.FILENAME.config) + ' file has been successfully created with client details.');
|
|
55
|
+
(0, index_1.info)();
|
|
56
|
+
(0, index_1.success)('Catalyst client setup complete!');
|
|
56
57
|
}));
|