zcatalyst-cli 1.11.1 → 1.13.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/docs/optional-import.toml +10 -0
- package/lib/apig-utils.js +39 -39
- package/lib/archiver.js +13 -9
- package/lib/authentication/index.js +22 -18
- package/lib/authentication/login.js +37 -39
- package/lib/bin/catalyst.js +15 -15
- package/lib/cli_table/src/cell.js +26 -26
- package/lib/cli_table/src/layout-manager.js +44 -45
- package/lib/cli_table/src/table.js +9 -9
- package/lib/cli_table/src/utils.js +35 -36
- package/lib/client-utils.js +18 -18
- package/lib/client.js +1 -1
- package/lib/command_needs/auth.js +7 -7
- package/lib/command_needs/rc.js +24 -24
- package/lib/commands/apig/disable.js +5 -5
- package/lib/commands/apig/enable.js +5 -5
- package/lib/commands/apig/status.js +9 -9
- package/lib/commands/client/delete.js +19 -19
- package/lib/commands/client/setup.js +8 -4
- package/lib/commands/deploy.js +18 -14
- package/lib/commands/ds/export.js +11 -11
- package/lib/commands/ds/import.js +12 -12
- package/lib/commands/ds/status.js +15 -15
- package/lib/commands/event/generate/index.js +21 -17
- package/lib/commands/event/generate/integ.js +7 -3
- package/lib/commands/functions/add.js +8 -4
- package/lib/commands/functions/config.js +5 -5
- package/lib/commands/functions/delete.js +22 -22
- package/lib/commands/functions/setup.js +8 -4
- package/lib/commands/functions/shell.js +12 -5
- package/lib/commands/help.js +4 -4
- package/lib/commands/iac/export.js +8 -8
- package/lib/commands/iac/import.js +29 -21
- package/lib/commands/iac/pack.js +15 -11
- package/lib/commands/iac/status.js +6 -2
- package/lib/commands/index.js +5 -1
- package/lib/commands/init.js +14 -10
- package/lib/commands/login.js +5 -1
- package/lib/commands/logout.js +5 -1
- package/lib/commands/project/list.js +14 -10
- package/lib/commands/project/reset.js +5 -5
- package/lib/commands/project/use.js +9 -9
- package/lib/commands/pull.js +18 -14
- package/lib/commands/run.js +13 -9
- package/lib/commands/serve.js +5 -1
- package/lib/commands/token/generate.js +6 -2
- package/lib/commands/token/list.js +7 -3
- package/lib/commands/token/revoke.js +6 -2
- package/lib/commands/whoami.js +3 -3
- package/lib/dc.js +2 -2
- package/lib/deploy/features/apig.js +6 -6
- package/lib/deploy/features/client.js +1 -1
- package/lib/deploy/features/functions/index.js +9 -9
- package/lib/deploy/features/index.js +5 -1
- package/lib/deploy/index.js +2 -2
- package/lib/endpoints/index.js +17 -13
- package/lib/endpoints/lib/apig.js +5 -5
- package/lib/endpoints/lib/applogic.js +4 -4
- package/lib/endpoints/lib/cache.js +3 -3
- package/lib/endpoints/lib/catalyst-details.js +1 -1
- package/lib/endpoints/lib/client.js +5 -5
- package/lib/endpoints/lib/datastore.js +2 -2
- package/lib/endpoints/lib/ds-bulk.js +5 -5
- package/lib/endpoints/lib/env.js +1 -1
- package/lib/endpoints/lib/event-bus.js +1 -1
- package/lib/endpoints/lib/filestore.js +2 -2
- package/lib/endpoints/lib/functions.js +4 -4
- package/lib/endpoints/lib/iac.js +10 -10
- package/lib/endpoints/lib/project.js +20 -5
- package/lib/endpoints/lib/queue.js +3 -3
- package/lib/endpoints/lib/sdk.js +1 -1
- package/lib/endpoints/lib/zcql.js +1 -1
- package/lib/error.js +11 -9
- package/lib/errorOut.js +2 -2
- package/lib/event_generate/cache.js +5 -5
- package/lib/event_generate/custom.js +2 -2
- package/lib/event_generate/datastore.js +5 -5
- package/lib/event_generate/filestore.js +5 -5
- package/lib/event_generate/integration/cliq.js +3 -3
- package/lib/event_generate/user.js +1 -1
- package/lib/event_generate/webapp.js +5 -5
- package/lib/execute-script.js +19 -15
- package/lib/express_middlewares/authenticator.js +32 -5
- package/lib/express_middlewares/logger.js +2 -2
- package/lib/express_middlewares/unknownReqProxy.js +1 -1
- package/lib/fn-utils/index.js +5 -1
- package/lib/fn-utils/lib/common.js +44 -44
- package/lib/fn-utils/lib/integ.js +9 -9
- package/lib/fn-utils/lib/java.js +48 -46
- package/lib/fn-utils/lib/node.js +8 -8
- package/lib/fn-watcher.js +9 -11
- package/lib/iac/status/bundle.js +5 -5
- package/lib/iac/status/deploy.js +4 -4
- package/lib/index.js +2 -2
- package/lib/init/dependencies/npm-install.js +8 -1
- package/lib/init/dependencies/package-json.js +6 -6
- package/lib/init/features/client/index.js +5 -1
- package/lib/init/features/client/initializers/angular.js +29 -27
- package/lib/init/features/client/initializers/basic.js +10 -6
- package/lib/init/features/client/initializers/lyte.js +12 -13
- package/lib/init/features/client/initializers/react.js +23 -18
- package/lib/init/features/functions/index.js +23 -14
- package/lib/init/features/functions/languages/java.js +10 -10
- package/lib/init/features/functions/languages/node.js +9 -9
- package/lib/init/features/index.js +12 -8
- package/lib/init/features/project.js +20 -20
- package/lib/init/index.js +2 -2
- package/lib/init/util/client.js +12 -7
- package/lib/init/util/functions.js +1 -1
- package/lib/init/util/project.js +4 -4
- package/lib/internal/api.js +19 -19
- package/lib/internal/command.js +20 -16
- package/lib/internal/config.js +5 -5
- package/lib/internal/credential.js +10 -10
- package/lib/internal/crypt.js +5 -5
- package/lib/internal/rc.js +5 -5
- package/lib/migration/global/1.6.2.js +3 -3
- package/lib/migration/index.js +22 -18
- package/lib/option-filter.js +34 -30
- package/lib/optional-import.js +30 -11
- package/lib/plugin-loader.js +28 -13
- package/lib/port-resolver.js +4 -4
- package/lib/progress.js +2 -2
- package/lib/prompt/index.js +6 -2
- package/lib/prompt/types/file-path.js +1 -1
- package/lib/pull/features/apig.js +9 -9
- package/lib/pull/features/client.js +7 -7
- package/lib/pull/features/functions/index.js +15 -15
- package/lib/pull/features/index.js +5 -1
- package/lib/pull/index.js +4 -4
- package/lib/repl-server.js +2 -2
- package/lib/serve/features/apig.js +1 -1
- package/lib/serve/features/index.js +8 -4
- package/lib/serve/index.js +15 -11
- package/lib/serve/server/index.js +34 -27
- package/lib/serve/server/lib/java/JavaaioServer.java +5 -3
- package/lib/serve/server/lib/java/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
- package/lib/serve/server/lib/java/lib/catalyst-java-runtime-1.0.0.jar +0 -0
- package/lib/serve/server/lib/java/lib/zip4j-2.5.0.jar +0 -0
- package/lib/serve/server/lib/master.js +33 -36
- package/lib/serve/server/lib/node.js +7 -3
- package/lib/serve/server/lib/web_client/index.js +3 -3
- package/lib/serve/server/lib/web_client/server.js +33 -30
- package/lib/shell/dependencies/http-functions.js +38 -33
- package/lib/shell/dependencies/invoker/bio/java/JavabioInvoker.java +14 -3
- package/lib/shell/dependencies/invoker/bio/node.js +5 -2
- package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/event/java/JavaeventInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/integ/node.js +8 -4
- package/lib/shell/dependencies/local-function.js +44 -40
- package/lib/shell/index.js +16 -12
- package/lib/shell/prepare/index.js +2 -2
- package/lib/shell/prepare/languages/index.js +5 -1
- package/lib/shell/prepare/languages/java.js +1 -1
- package/lib/throbber/index.js +17 -17
- package/lib/throbber/utils.js +9 -9
- package/lib/track.js +7 -7
- package/lib/util_modules/config/index.js +5 -1
- package/lib/util_modules/config/lib/client.js +18 -21
- package/lib/util_modules/constants/lib/auth.js +6 -6
- package/lib/util_modules/constants/lib/cliq-handlers.js +2 -2
- package/lib/util_modules/constants/lib/template.js +21 -21
- package/lib/util_modules/constants/lib/urls.js +20 -12
- package/lib/util_modules/context-help.js +15 -15
- package/lib/util_modules/fs/index.js +5 -1
- package/lib/util_modules/fs/lib/async.js +4 -4
- package/lib/util_modules/fs/utils.js +1 -1
- package/lib/util_modules/global-space.js +0 -97
- package/lib/util_modules/logger.js +2 -2
- package/lib/util_modules/parser/toml.js +1 -1
- package/lib/util_modules/project.js +6 -6
- package/lib/util_modules/server.js +53 -0
- package/lib/util_modules/shell.js +4 -4
- package/lib/winston.js +5 -5
- package/package.json +40 -40
- package/scripts/postInstall.js +7 -6
- package/templates/init/functions/java/integ/cliq/com/handlers/BotHandler.java +23 -5
- package/templates/init/functions/node/integ/cliq/handlers/bot-handler.js +23 -8
- package/templates/init/functions/node/integ/cliq/handlers/command-handler.js +3 -3
- package/templates/init/functions/node/integ/cliq/package.json +2 -1
- package/templates/init/functions/node/integ/cliq/sample.js +3 -1
- package/docs/.DS_Store +0 -0
- package/lib/serve/server/lib/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
- package/templates/.DS_Store +0 -0
- package/templates/init/.DS_Store +0 -0
- package/templates/init/client/.DS_Store +0 -0
- package/templates/init/client/react/.DS_Store +0 -0
|
@@ -25,11 +25,11 @@ const option_1 = require("../../util_modules/option");
|
|
|
25
25
|
const project_1 = require("../../util_modules/project");
|
|
26
26
|
const shell_1 = require("../../util_modules/shell");
|
|
27
27
|
const getExportProjectId = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
-
const projectId = project_1.getProjectId(null);
|
|
28
|
+
const projectId = (0, project_1.getProjectId)(null);
|
|
29
29
|
if (projectId !== null) {
|
|
30
30
|
return projectId;
|
|
31
31
|
}
|
|
32
|
-
const allProjects = (yield (yield endpoints_1.projectAPI()).getAllProjects());
|
|
32
|
+
const allProjects = (yield (yield (0, endpoints_1.projectAPI)()).getAllProjects());
|
|
33
33
|
if (allProjects.length === 0) {
|
|
34
34
|
throw new error_1.default('No projects found', {
|
|
35
35
|
exit: 0,
|
|
@@ -37,7 +37,7 @@ const getExportProjectId = () => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
if (allProjects.length === 1) {
|
|
40
|
-
logger_1.message('only one project found in remote, using that');
|
|
40
|
+
(0, logger_1.message)('only one project found in remote, using that');
|
|
41
41
|
return allProjects[0].id;
|
|
42
42
|
}
|
|
43
43
|
const projectAns = yield prompt_1.default.ask(prompt_1.default.question('project', 'Which project do you wish to export ? ', {
|
|
@@ -58,12 +58,12 @@ exports.default = new command_1.default('iac:export')
|
|
|
58
58
|
.needs('config', { optional: true })
|
|
59
59
|
.needs('rc', { optional: true })
|
|
60
60
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
|
-
const env = option_1.getOptionValue('production', false) ? 'Production' : 'Development';
|
|
61
|
+
const env = (0, option_1.getOptionValue)('production', false) ? 'Production' : 'Development';
|
|
62
62
|
const projectId = yield getExportProjectId();
|
|
63
63
|
const bundleResp = yield new iac_1.default(projectId, { env }).bundle(constants_1.IAC.template_format.json);
|
|
64
|
-
logger_1.info();
|
|
65
|
-
logger_1.success(`Successfully scheduled export job for project "${project_1.getProjectName(projectId)}" with jobid "${bundleResp.id}"`);
|
|
66
|
-
if (env_1.isPrimaryShell()) {
|
|
64
|
+
(0, logger_1.info)();
|
|
65
|
+
(0, logger_1.success)(`Successfully scheduled export job for project "${(0, project_1.getProjectName)(projectId)}" with jobid "${bundleResp.id}"`);
|
|
66
|
+
if ((0, env_1.isPrimaryShell)()) {
|
|
67
67
|
const exitListeners = process.listeners('exit');
|
|
68
68
|
process.removeAllListeners('exit');
|
|
69
69
|
const allGlobalOpts = runtime_store_1.default.get('opts.globalOpts', {});
|
|
@@ -74,7 +74,7 @@ exports.default = new command_1.default('iac:export')
|
|
|
74
74
|
}
|
|
75
75
|
return arr;
|
|
76
76
|
}, (env === 'Production' ? ['--production'] : []));
|
|
77
|
-
shell_1.spawn('catalyst', ['iac:status', 'export', ...optsArr], {
|
|
77
|
+
(0, shell_1.spawn)('catalyst', ['iac:status', 'export', ...optsArr], {
|
|
78
78
|
shell: true,
|
|
79
79
|
stdio: 'inherit'
|
|
80
80
|
}).SYNC();
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -53,9 +57,10 @@ const js_1 = require("../../util_modules/js");
|
|
|
53
57
|
const logger_1 = require("../../util_modules/logger");
|
|
54
58
|
const option_1 = require("../../util_modules/option");
|
|
55
59
|
const shell_1 = require("../../util_modules/shell");
|
|
60
|
+
const server_js_1 = require("../../util_modules/server.js");
|
|
56
61
|
const getZipAndTemplate = (filePath, stagedDeploy) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
62
|
const zipFile = filePath
|
|
58
|
-
? yield ASYNC.readFile(utils_js_1.untildify(filePath), 'buffer')
|
|
63
|
+
? yield ASYNC.readFile((0, utils_js_1.untildify)(filePath), 'buffer')
|
|
59
64
|
: (stagedDeploy === null || stagedDeploy === void 0 ? void 0 : stagedDeploy.id)
|
|
60
65
|
? yield new iac_1.default().deployDownload(stagedDeploy.id)
|
|
61
66
|
: undefined;
|
|
@@ -79,32 +84,35 @@ const ensureUserAction = (deployRes) => __awaiter(void 0, void 0, void 0, functi
|
|
|
79
84
|
const callbackPort = yield port_resolver_1.default.getFreePort(3000, 10, false);
|
|
80
85
|
const accessUrl = new url_1.URL(`/baas/v1/project/import/${deployRes.id}/deploy`, `${constants_1.ORIGIN.admin}`);
|
|
81
86
|
accessUrl.searchParams.set('redirect_url', `http://localhost:${callbackPort}/success`);
|
|
82
|
-
const server = http_1.createServer((req, resp) => __awaiter(void 0, void 0, void 0, function* () {
|
|
87
|
+
const server = (0, http_1.createServer)((req, resp) => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
88
|
try {
|
|
84
89
|
if (req.url !== '/success') {
|
|
85
90
|
resp.writeHead(404);
|
|
86
91
|
resp.end();
|
|
87
92
|
return;
|
|
88
93
|
}
|
|
89
|
-
const htmlFile = yield ASYNC.readFile(path_1.join(__dirname, '../../../templates/iacSuccess.html'));
|
|
94
|
+
const htmlFile = yield ASYNC.readFile((0, path_1.join)(__dirname, '../../../templates/iacSuccess.html'));
|
|
90
95
|
resp.setHeader('Content-Type', 'text/html');
|
|
91
96
|
resp.writeHead(200);
|
|
92
|
-
resp.end(htmlFile, () => {
|
|
97
|
+
resp.end(htmlFile, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
98
|
req.socket.destroy();
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
yield destroyer.destroy().catch((err) => (0, logger_1.debug)(err));
|
|
100
|
+
res();
|
|
101
|
+
}));
|
|
96
102
|
}
|
|
97
103
|
catch (e) {
|
|
98
|
-
|
|
104
|
+
yield destroyer.destroy().catch((err) => (0, logger_1.debug)(err));
|
|
105
|
+
res(e);
|
|
99
106
|
}
|
|
100
107
|
}));
|
|
108
|
+
const destroyer = new server_js_1.ConnectionDestroyer(server);
|
|
101
109
|
server.listen(callbackPort, () => {
|
|
102
110
|
const urlString = accessUrl.toString();
|
|
103
|
-
logger_1.info();
|
|
104
|
-
logger_1.info('Visit this URL on this device to proceed:');
|
|
105
|
-
logger_1.info(ansi_colors_1.bold.underline(urlString));
|
|
106
|
-
logger_1.info();
|
|
107
|
-
open_1.default(urlString).catch();
|
|
111
|
+
(0, logger_1.info)();
|
|
112
|
+
(0, logger_1.info)('Visit this URL on this device to proceed:');
|
|
113
|
+
(0, logger_1.info)(ansi_colors_1.bold.underline(urlString));
|
|
114
|
+
(0, logger_1.info)();
|
|
115
|
+
(0, open_1.default)(urlString).catch();
|
|
108
116
|
});
|
|
109
117
|
server.on('error', (err) => {
|
|
110
118
|
rej(err);
|
|
@@ -116,9 +124,9 @@ const ensureUserAction = (deployRes) => __awaiter(void 0, void 0, void 0, functi
|
|
|
116
124
|
exit: 2
|
|
117
125
|
});
|
|
118
126
|
}
|
|
119
|
-
logger_1.info();
|
|
120
|
-
logger_1.success(`Successfully scheduled import job for project "${deployRes.project_details.project_name}" with jobid "${deployRes.id}"`);
|
|
121
|
-
if (option_1.getCurrentCommand() === 'init' || env_1.isPrimaryShell()) {
|
|
127
|
+
(0, logger_1.info)();
|
|
128
|
+
(0, logger_1.success)(`Successfully scheduled import job for project "${deployRes.project_details.project_name}" with jobid "${deployRes.id}"`);
|
|
129
|
+
if ((0, option_1.getCurrentCommand)() === 'init' || (0, env_1.isPrimaryShell)()) {
|
|
122
130
|
const exitListeners = process.listeners('exit');
|
|
123
131
|
process.removeAllListeners('exit');
|
|
124
132
|
const allGlobalOpts = runtime_store_1.default.get('opts.globalOpts', {});
|
|
@@ -129,12 +137,12 @@ const ensureUserAction = (deployRes) => __awaiter(void 0, void 0, void 0, functi
|
|
|
129
137
|
}
|
|
130
138
|
return arr;
|
|
131
139
|
}, ['--id', deployRes.id]);
|
|
132
|
-
yield shell_1.spawn('catalyst', ['iac:status', 'import', ...optsArr], {
|
|
140
|
+
yield (0, shell_1.spawn)('catalyst', ['iac:status', 'import', ...optsArr], {
|
|
133
141
|
shell: true,
|
|
134
142
|
stdio: 'inherit'
|
|
135
143
|
})
|
|
136
144
|
.ASYNC()
|
|
137
|
-
.catch((err) => logger_1.debug(err));
|
|
145
|
+
.catch((err) => (0, logger_1.debug)(err));
|
|
138
146
|
(exitListeners || []).forEach((listner) => {
|
|
139
147
|
process.addListener('exit', listner);
|
|
140
148
|
});
|
|
@@ -157,7 +165,7 @@ const iacImport = (filePath, projectName) => __awaiter(void 0, void 0, void 0, f
|
|
|
157
165
|
}
|
|
158
166
|
if (stagedDeploy && !(stagedAns === null || stagedAns === void 0 ? void 0 : stagedAns.consent)) {
|
|
159
167
|
yield iacAPI.deployDelete(stagedDeploy.id);
|
|
160
|
-
logger_1.message(`Successfully deleted project ${stagedDeploy === null || stagedDeploy === void 0 ? void 0 : stagedDeploy.project_details.project_name} from console.`);
|
|
168
|
+
(0, logger_1.message)(`Successfully deleted project ${stagedDeploy === null || stagedDeploy === void 0 ? void 0 : stagedDeploy.project_details.project_name} from console.`);
|
|
161
169
|
}
|
|
162
170
|
if (!filePath) {
|
|
163
171
|
yield prompt_1.default.register('file-path');
|
|
@@ -202,9 +210,9 @@ exports.default = new command_1.default('iac:import [file_path]')
|
|
|
202
210
|
.needs('config', { optional: true })
|
|
203
211
|
.needs('rc', { optional: true })
|
|
204
212
|
.action((filePath) => __awaiter(void 0, void 0, void 0, function* () {
|
|
205
|
-
const nameOptValue = option_1.getOptionValue('name');
|
|
213
|
+
const nameOptValue = (0, option_1.getOptionValue)('name');
|
|
206
214
|
if (nameOptValue && !nameOptValue.match(constants_1.REGEX.project.name)) {
|
|
207
215
|
throw new error_1.default(`Project Name is invalid, it should match ${constants_1.REGEX.project.name}`);
|
|
208
216
|
}
|
|
209
|
-
yield exports.iacImport(filePath, nameOptValue);
|
|
217
|
+
yield (0, exports.iacImport)(filePath, nameOptValue);
|
|
210
218
|
}));
|
package/lib/commands/iac/pack.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -44,7 +48,7 @@ const runtime_1 = __importDefault(require("../../util_modules/constants/lib/runt
|
|
|
44
48
|
const fs_1 = require("../../util_modules/fs");
|
|
45
49
|
const js_1 = require("../../util_modules/js");
|
|
46
50
|
const logger_1 = require("../../util_modules/logger");
|
|
47
|
-
const yaml_1 =
|
|
51
|
+
const yaml_1 = require("yaml");
|
|
48
52
|
const ansi_colors_1 = require("ansi-colors");
|
|
49
53
|
exports.default = new command_1.default('iac:pack [zip_name]')
|
|
50
54
|
.description('Creates a import ready zip file')
|
|
@@ -53,7 +57,7 @@ exports.default = new command_1.default('iac:pack [zip_name]')
|
|
|
53
57
|
.action((userZipName) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
58
|
var _a, _b;
|
|
55
59
|
const config = runtime_store_1.default.get('config');
|
|
56
|
-
const rootDir = path_1.dirname(config.configPath);
|
|
60
|
+
const rootDir = (0, path_1.dirname)(config.configPath);
|
|
57
61
|
const filesAtRoot = yield fs_1.ASYNC.walk(rootDir, { excludeDir: true, depth: 1 });
|
|
58
62
|
const templateFilePth = filesAtRoot.find((fileName) => fileName.match(constants_1.REGEX.project.template));
|
|
59
63
|
if (templateFilePth === undefined) {
|
|
@@ -63,7 +67,7 @@ exports.default = new command_1.default('iac:pack [zip_name]')
|
|
|
63
67
|
if (templateFile === undefined) {
|
|
64
68
|
throw new error_1.default('Unable to read template file', { exit: 1 });
|
|
65
69
|
}
|
|
66
|
-
const templateJson = js_1.JS.parseJSON(templateFile) || yaml_1.
|
|
70
|
+
const templateJson = js_1.JS.parseJSON(templateFile) || (0, yaml_1.parse)(templateFile);
|
|
67
71
|
const templateFns = ((_a = templateJson.components) === null || _a === void 0 ? void 0 : _a.Functions) || [];
|
|
68
72
|
const templateClient = ((_b = templateJson.components) === null || _b === void 0 ? void 0 : _b.WebClient) || [];
|
|
69
73
|
const hrTime = process.hrtime();
|
|
@@ -95,8 +99,8 @@ exports.default = new command_1.default('iac:pack [zip_name]')
|
|
|
95
99
|
}
|
|
96
100
|
return acc;
|
|
97
101
|
}, [[], []]);
|
|
98
|
-
const packedNodeFns = yield languages_1.node(nodeFns);
|
|
99
|
-
const packedJavaFns = yield languages_1.java(javaFns);
|
|
102
|
+
const packedNodeFns = yield (0, languages_1.node)(nodeFns);
|
|
103
|
+
const packedJavaFns = yield (0, languages_1.java)(javaFns);
|
|
100
104
|
const packedFns = [...(packedNodeFns || []), ...(packedJavaFns || [])];
|
|
101
105
|
packedFns.forEach((fn) => {
|
|
102
106
|
if (!fn.valid) {
|
|
@@ -116,14 +120,14 @@ exports.default = new command_1.default('iac:pack [zip_name]')
|
|
|
116
120
|
finalZip.add(clientTeamplateConfig.properties.code.path, clientZipStream);
|
|
117
121
|
break;
|
|
118
122
|
default:
|
|
119
|
-
logger_1.debug(`skipping ${component} since there is no processing needed`);
|
|
123
|
+
(0, logger_1.debug)(`skipping ${component} since there is no processing needed`);
|
|
120
124
|
break;
|
|
121
125
|
}
|
|
122
126
|
})));
|
|
123
|
-
finalZip.add(path_1.parse(templateFilePth).name + '.json', JSON.stringify(templateJson, null, 2) + '\n');
|
|
127
|
+
finalZip.add((0, path_1.parse)(templateFilePth).name + '.json', JSON.stringify(templateJson, null, 2) + '\n');
|
|
124
128
|
yield (yield finalZip.finalize()).writeZip(rootDir);
|
|
125
|
-
logger_1.message(ansi_colors_1.bold(path_1.relative(runtime_store_1.default.get('cwd'), path_1.join(rootDir, archiveName))) +
|
|
129
|
+
(0, logger_1.message)((0, ansi_colors_1.bold)((0, path_1.relative)(runtime_store_1.default.get('cwd'), (0, path_1.join)(rootDir, archiveName))) +
|
|
126
130
|
'.zip file has been successfully created.');
|
|
127
|
-
logger_1.info();
|
|
128
|
-
logger_1.success('Catalyst pack complete');
|
|
131
|
+
(0, logger_1.info)();
|
|
132
|
+
(0, logger_1.success)('Catalyst pack complete');
|
|
129
133
|
}));
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -56,7 +60,7 @@ exports.default = new command_1.default('iac:status <operation>')
|
|
|
56
60
|
throw new error_1.default('Unsupported operation', {
|
|
57
61
|
exit: 1,
|
|
58
62
|
errorId: 'S-1',
|
|
59
|
-
arg: [ansi_colors_1.bold(operation)]
|
|
63
|
+
arg: [(0, ansi_colors_1.bold)(operation)]
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
return;
|
package/lib/commands/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/commands/init.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -44,9 +48,9 @@ const logger_1 = require("../util_modules/logger");
|
|
|
44
48
|
const shell_1 = require("../util_modules/shell");
|
|
45
49
|
const saveAndComplete = (config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
50
|
yield config.save();
|
|
47
|
-
logger_1.message(ansi_colors_1.bold(constants_1.FILENAME.config) + ' file has been successfully created with feature details.');
|
|
48
|
-
logger_1.info();
|
|
49
|
-
logger_1.success('Catalyst initialization complete!');
|
|
51
|
+
(0, logger_1.message)((0, ansi_colors_1.bold)(constants_1.FILENAME.config) + ' file has been successfully created with feature details.');
|
|
52
|
+
(0, logger_1.info)();
|
|
53
|
+
(0, logger_1.success)('Catalyst initialization complete!');
|
|
50
54
|
});
|
|
51
55
|
exports.default = new command_1.default('init [feature]')
|
|
52
56
|
.description('Initialize a Catalyst project, function, and client resources in the local directory')
|
|
@@ -82,12 +86,12 @@ exports.default = new command_1.default('init [feature]')
|
|
|
82
86
|
warnings.join('\n ' + ansi_colors_1.yellow.bold('* ')) +
|
|
83
87
|
'\n';
|
|
84
88
|
}
|
|
85
|
-
shell_1.clearStdout(true);
|
|
89
|
+
(0, shell_1.clearStdout)(true);
|
|
86
90
|
const bannerString = yield fs_1.ASYNC.readFile(constants_1.TEMPLATE.banner);
|
|
87
|
-
logger_1.info('\n' +
|
|
91
|
+
(0, logger_1.info)('\n' +
|
|
88
92
|
ansi_colors_1.blueBright.bold(bannerString) +
|
|
89
93
|
"\nYou're about to initialize a Catalyst project in this directory:\n\n " +
|
|
90
|
-
ansi_colors_1.bold(runtime_store_1.default.get('project.root')) +
|
|
94
|
+
(0, ansi_colors_1.bold)(runtime_store_1.default.get('project.root')) +
|
|
91
95
|
'\n' +
|
|
92
96
|
warningText);
|
|
93
97
|
const windownConfirmation = env_1.isWindows
|
|
@@ -96,12 +100,12 @@ exports.default = new command_1.default('init [feature]')
|
|
|
96
100
|
}))
|
|
97
101
|
: { confirmation: true };
|
|
98
102
|
if (!windownConfirmation.confirmation) {
|
|
99
|
-
logger_1.message('Aborted by user.');
|
|
103
|
+
(0, logger_1.message)('Aborted by user.');
|
|
100
104
|
return;
|
|
101
105
|
}
|
|
102
|
-
yield features_1.project();
|
|
106
|
+
yield (0, features_1.project)();
|
|
103
107
|
const featureAns = yield prompt_1.default.ask(prompt_1.default.question('features', 'Which are the features you want to setup for this folder?\n This step is optional! Press ' +
|
|
104
|
-
ansi_colors_1.cyan('<return> ') +
|
|
108
|
+
(0, ansi_colors_1.cyan)('<return> ') +
|
|
105
109
|
'to proceed.\n', {
|
|
106
110
|
type: 'checkbox',
|
|
107
111
|
choices: [
|
package/lib/commands/login.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/commands/logout.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -44,11 +48,11 @@ exports.default = new command_1.default('project:list')
|
|
|
44
48
|
.needs('config', { optional: true, resolveOnNotFound: true })
|
|
45
49
|
.needs('rc', { optional: true })
|
|
46
50
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
-
const cliTable3 = (yield Promise.resolve().then(() => __importStar(require('
|
|
48
|
-
const projects = (yield (yield endpoints_1.projectAPI()).getAllProjects());
|
|
51
|
+
const cliTable3 = (yield Promise.resolve().then(() => __importStar(require('../../cli_table')))).default;
|
|
52
|
+
const projects = (yield (yield (0, endpoints_1.projectAPI)()).getAllProjects());
|
|
49
53
|
if (projects === undefined || projects.length === 0) {
|
|
50
|
-
logger_1.info(ansi_colors_1.bold('No projects found.'));
|
|
51
|
-
logger_1.info();
|
|
54
|
+
(0, logger_1.info)((0, ansi_colors_1.bold)('No projects found.'));
|
|
55
|
+
(0, logger_1.info)();
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
54
58
|
const listTable = new cliTable3();
|
|
@@ -56,8 +60,8 @@ exports.default = new command_1.default('project:list')
|
|
|
56
60
|
{ hAlign: 'center', content: ansi_colors_1.red.bold('Project Name') },
|
|
57
61
|
{ hAlign: 'center', content: ansi_colors_1.red.bold('Project ID') }
|
|
58
62
|
]);
|
|
59
|
-
const activeProjectId = project_2.getProjectId(null);
|
|
60
|
-
const defaultProjectId = project_2.getDefaultProjectId(null);
|
|
63
|
+
const activeProjectId = (0, project_2.getProjectId)(null);
|
|
64
|
+
const defaultProjectId = (0, project_2.getDefaultProjectId)(null);
|
|
61
65
|
projects.forEach((project) => {
|
|
62
66
|
let displayId = project.id + '';
|
|
63
67
|
let displayName = project.project_name;
|
|
@@ -72,10 +76,10 @@ exports.default = new command_1.default('project:list')
|
|
|
72
76
|
enhance += `(${project.project_type})`;
|
|
73
77
|
}
|
|
74
78
|
if (enhance !== '') {
|
|
75
|
-
displayName = ansi_colors_1.cyan(displayName + enhance);
|
|
76
|
-
displayId = ansi_colors_1.cyan(displayId + '');
|
|
79
|
+
displayName = (0, ansi_colors_1.cyan)(displayName + enhance);
|
|
80
|
+
displayId = (0, ansi_colors_1.cyan)(displayId + '');
|
|
77
81
|
}
|
|
78
82
|
listTable.push([displayName, displayId]);
|
|
79
83
|
});
|
|
80
|
-
logger_1.info('\n' + listTable.toString());
|
|
84
|
+
(0, logger_1.info)('\n' + listTable.toString());
|
|
81
85
|
}));
|
|
@@ -22,12 +22,12 @@ exports.default = new command_1.default('project:reset')
|
|
|
22
22
|
.needs('config', { optional: true, resolveOnNotFound: true })
|
|
23
23
|
.needs('rc')
|
|
24
24
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
-
const currentProjectId = project_1.getProjectId();
|
|
26
|
-
const defaultProjectId = project_1.getDefaultProjectId();
|
|
25
|
+
const currentProjectId = (0, project_1.getProjectId)();
|
|
26
|
+
const defaultProjectId = (0, project_1.getDefaultProjectId)();
|
|
27
27
|
if (defaultProjectId === currentProjectId) {
|
|
28
|
-
logger_1.message('No need to reset already using base project for this directory');
|
|
28
|
+
(0, logger_1.message)('No need to reset already using base project for this directory');
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
yield project_1.makeDefaultProjectActive();
|
|
32
|
-
logger_1.success('Successfully made project active');
|
|
31
|
+
yield (0, project_1.makeDefaultProjectActive)();
|
|
32
|
+
(0, logger_1.success)('Successfully made project active');
|
|
33
33
|
}));
|
|
@@ -23,11 +23,11 @@ const js_1 = require("../../util_modules/js");
|
|
|
23
23
|
const logger_1 = require("../../util_modules/logger");
|
|
24
24
|
const project_2 = require("../../util_modules/project");
|
|
25
25
|
const makeActive = (currentProjectId, optedProject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
yield project_2.upsertProject(optedProject, {
|
|
26
|
+
yield (0, project_2.upsertProject)(optedProject, {
|
|
27
27
|
active: true,
|
|
28
28
|
base: js_1.JS.isNull(currentProjectId)
|
|
29
29
|
});
|
|
30
|
-
logger_1.success('Successfully made project active');
|
|
30
|
+
(0, logger_1.success)('Successfully made project active');
|
|
31
31
|
});
|
|
32
32
|
exports.default = new command_1.default('project:use [name_or_project_id]')
|
|
33
33
|
.description('Set an active Catalyst project for your working directory')
|
|
@@ -35,8 +35,8 @@ exports.default = new command_1.default('project:use [name_or_project_id]')
|
|
|
35
35
|
.needs('config', { optional: true, resolveOnNotFound: true })
|
|
36
36
|
.needs('rc', { optional: true, resolveOnNotFound: true })
|
|
37
37
|
.action((newActive) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
-
const currentProjectId = project_2.getProjectId(null);
|
|
39
|
-
const allProjects = (yield (yield endpoints_1.projectAPI()).getAllProjects().catch(() => {
|
|
38
|
+
const currentProjectId = (0, project_2.getProjectId)(null);
|
|
39
|
+
const allProjects = (yield (yield (0, endpoints_1.projectAPI)()).getAllProjects().catch(() => {
|
|
40
40
|
throw new error_1.default('Unable to get projects', {
|
|
41
41
|
exit: 2
|
|
42
42
|
});
|
|
@@ -48,7 +48,7 @@ exports.default = new command_1.default('project:use [name_or_project_id]')
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
if (allProjects.length === 1) {
|
|
51
|
-
logger_1.message('only one project found in remote, ignoring user input and making it as active');
|
|
51
|
+
(0, logger_1.message)('only one project found in remote, ignoring user input and making it as active');
|
|
52
52
|
return makeActive(currentProjectId, allProjects[0]);
|
|
53
53
|
}
|
|
54
54
|
const transformedProjects = allProjects.map(project_2.transformProject);
|
|
@@ -61,8 +61,8 @@ exports.default = new command_1.default('project:use [name_or_project_id]')
|
|
|
61
61
|
exit: 1,
|
|
62
62
|
errorId: 'PROJ-USE-3',
|
|
63
63
|
arg: [
|
|
64
|
-
ansi_colors_1.bold(newActive),
|
|
65
|
-
ansi_colors_1.bold(allProjects
|
|
64
|
+
(0, ansi_colors_1.bold)(newActive),
|
|
65
|
+
(0, ansi_colors_1.bold)(allProjects
|
|
66
66
|
.filter((proj) => proj.project_type &&
|
|
67
67
|
project_1.default.accepted_types.includes(proj.project_type))
|
|
68
68
|
.map((project) => '* ' + project.project_name)
|
|
@@ -75,8 +75,8 @@ exports.default = new command_1.default('project:use [name_or_project_id]')
|
|
|
75
75
|
exit: 1,
|
|
76
76
|
errorId: 'PROJ-USE-2',
|
|
77
77
|
arg: [
|
|
78
|
-
ansi_colors_1.bold(newActive),
|
|
79
|
-
ansi_colors_1.bold(allProjects.map((project) => '* ' + project.project_name).join('\n'))
|
|
78
|
+
(0, ansi_colors_1.bold)(newActive),
|
|
79
|
+
(0, ansi_colors_1.bold)(allProjects.map((project) => '* ' + project.project_name).join('\n'))
|
|
80
80
|
]
|
|
81
81
|
});
|
|
82
82
|
}
|
package/lib/commands/pull.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -67,9 +71,9 @@ exports.default = new command_1.default('pull [feature]')
|
|
|
67
71
|
warnings.join('\n ' + ansi_colors_1.yellow.bold('* ')) +
|
|
68
72
|
'\n';
|
|
69
73
|
}
|
|
70
|
-
logger_1.info('\n' +
|
|
74
|
+
(0, logger_1.info)('\n' +
|
|
71
75
|
"\nYou're about to pull your Catalyst project in this directory:\n\n " +
|
|
72
|
-
ansi_colors_1.bold(runtime_store_1.default.get('project.root')) +
|
|
76
|
+
(0, ansi_colors_1.bold)(runtime_store_1.default.get('project.root')) +
|
|
73
77
|
'\n' +
|
|
74
78
|
warningText);
|
|
75
79
|
const ans = env_1.isWindows
|
|
@@ -78,7 +82,7 @@ exports.default = new command_1.default('pull [feature]')
|
|
|
78
82
|
}))
|
|
79
83
|
: { confirmation: true };
|
|
80
84
|
if (!ans.confirmation) {
|
|
81
|
-
logger_1.message('Aborted by user.');
|
|
85
|
+
(0, logger_1.message)('Aborted by user.');
|
|
82
86
|
return;
|
|
83
87
|
}
|
|
84
88
|
let featureAns = { features: [feature] };
|
|
@@ -104,11 +108,11 @@ exports.default = new command_1.default('pull [feature]')
|
|
|
104
108
|
if (js_1.JS.isEmpty(ansArr)) {
|
|
105
109
|
return ('Must select at least one feature.\n' +
|
|
106
110
|
'(Press ' +
|
|
107
|
-
ansi_colors_1.cyan('<space>') +
|
|
111
|
+
(0, ansi_colors_1.cyan)('<space>') +
|
|
108
112
|
' to select, ' +
|
|
109
|
-
ansi_colors_1.cyan('<a>') +
|
|
113
|
+
(0, ansi_colors_1.cyan)('<a>') +
|
|
110
114
|
' to toggle all, ' +
|
|
111
|
-
ansi_colors_1.cyan('<i>') +
|
|
115
|
+
(0, ansi_colors_1.cyan)('<i>') +
|
|
112
116
|
' to invert selection)');
|
|
113
117
|
}
|
|
114
118
|
return true;
|
|
@@ -121,16 +125,16 @@ exports.default = new command_1.default('pull [feature]')
|
|
|
121
125
|
yield PULL();
|
|
122
126
|
const payload = runtime_store_1.default.get('payload.features', []);
|
|
123
127
|
if (payload.length === 0) {
|
|
124
|
-
logger_1.info();
|
|
125
|
-
logger_1.error('No catalyst resources pulled !!!');
|
|
128
|
+
(0, logger_1.info)();
|
|
129
|
+
(0, logger_1.error)('No catalyst resources pulled !!!');
|
|
126
130
|
return;
|
|
127
131
|
}
|
|
128
132
|
payload.forEach((featureName) => {
|
|
129
|
-
logger_1.debug(`Updating ${featureName} in ${constants_1.FILENAME.config} with respect to the pulled resouce`);
|
|
130
|
-
features_1.setFnConfig(featureName, true);
|
|
133
|
+
(0, logger_1.debug)(`Updating ${featureName} in ${constants_1.FILENAME.config} with respect to the pulled resouce`);
|
|
134
|
+
(0, features_1.setFnConfig)(featureName, true);
|
|
131
135
|
});
|
|
132
136
|
yield config.save();
|
|
133
|
-
logger_1.message(ansi_colors_1.bold(constants_1.FILENAME.config) + ' file has been successfully updated with feature details.');
|
|
134
|
-
logger_1.info();
|
|
135
|
-
logger_1.success('Catalyst pull complete!');
|
|
137
|
+
(0, logger_1.message)((0, ansi_colors_1.bold)(constants_1.FILENAME.config) + ' file has been successfully updated with feature details.');
|
|
138
|
+
(0, logger_1.info)();
|
|
139
|
+
(0, logger_1.success)('Catalyst pull complete!');
|
|
136
140
|
}));
|
package/lib/commands/run.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -64,17 +68,17 @@ exports.default = new command_1.default('run-script [command]')
|
|
|
64
68
|
}
|
|
65
69
|
});
|
|
66
70
|
if (lifeCycleScripts.length !== 0) {
|
|
67
|
-
logger_1.info(`Lifecycle scripts for ${ansi_colors_1.cyan(key)} :`);
|
|
68
|
-
logger_1.info(lifeCycleScripts.join(','));
|
|
69
|
-
logger_1.info();
|
|
71
|
+
(0, logger_1.info)(`Lifecycle scripts for ${(0, ansi_colors_1.cyan)(key)} :`);
|
|
72
|
+
(0, logger_1.info)(lifeCycleScripts.join(','));
|
|
73
|
+
(0, logger_1.info)();
|
|
70
74
|
}
|
|
71
75
|
if (otherScripts.length !== 0) {
|
|
72
|
-
logger_1.info(`Other scripts for ${ansi_colors_1.cyan(key)} :`);
|
|
73
|
-
logger_1.info(otherScripts.join('\n'));
|
|
74
|
-
logger_1.info();
|
|
76
|
+
(0, logger_1.info)(`Other scripts for ${(0, ansi_colors_1.cyan)(key)} :`);
|
|
77
|
+
(0, logger_1.info)(otherScripts.join('\n'));
|
|
78
|
+
(0, logger_1.info)();
|
|
75
79
|
}
|
|
76
80
|
});
|
|
77
|
-
logger_1.info('To run a specific script, execute ' + ansi_colors_1.bold('catalyst run [feature:script]'));
|
|
78
|
-
logger_1.info('For example ' + ansi_colors_1.bold('catalyst run functions:predeploy'));
|
|
81
|
+
(0, logger_1.info)('To run a specific script, execute ' + (0, ansi_colors_1.bold)('catalyst run [feature:script]'));
|
|
82
|
+
(0, logger_1.info)('For example ' + (0, ansi_colors_1.bold)('catalyst run functions:predeploy'));
|
|
79
83
|
return;
|
|
80
84
|
}));
|
package/lib/commands/serve.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -42,6 +46,6 @@ exports.default = new command_1.default('token:generate')
|
|
|
42
46
|
const AUTH = yield Promise.resolve().then(() => __importStar(require('../../authentication')));
|
|
43
47
|
const token = yield AUTH.create();
|
|
44
48
|
if (token !== null) {
|
|
45
|
-
logger_1.success('Token generated successfully : ' + token);
|
|
49
|
+
(0, logger_1.success)('Token generated successfully : ' + token);
|
|
46
50
|
}
|
|
47
51
|
}));
|