zcatalyst-cli 1.9.1 → 1.10.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.
Files changed (86) hide show
  1. package/README.md +3 -3
  2. package/docs/command_needs/auth.toml +5 -0
  3. package/docs/commands/iac/export.toml +4 -0
  4. package/docs/commands/iac/import.toml +4 -0
  5. package/docs/commands/iac/status.toml +4 -0
  6. package/docs/commands/project/use.toml +6 -0
  7. package/docs/iac/status/bundle.toml +4 -0
  8. package/lib/api-timer.js +81 -0
  9. package/lib/apig-utils.js +16 -14
  10. package/lib/archiver.js +83 -45
  11. package/lib/authentication/login.js +4 -2
  12. package/lib/bin/catalyst.js +0 -1
  13. package/lib/client-utils.js +22 -22
  14. package/lib/client.js +0 -3
  15. package/lib/command_needs/auth.js +12 -3
  16. package/lib/command_needs/rc.js +12 -7
  17. package/lib/commands/apig/status.js +6 -4
  18. package/lib/commands/client/delete.js +2 -4
  19. package/lib/commands/client/setup.js +1 -1
  20. package/lib/commands/deploy.js +3 -1
  21. package/lib/commands/ds/export.js +3 -1
  22. package/lib/commands/ds/import.js +3 -1
  23. package/lib/commands/ds/status.js +145 -149
  24. package/lib/commands/functions/config.js +1 -1
  25. package/lib/commands/functions/setup.js +1 -1
  26. package/lib/commands/help.js +1 -23
  27. package/lib/commands/iac/export.js +85 -0
  28. package/lib/commands/iac/import.js +187 -0
  29. package/lib/commands/iac/pack.js +129 -0
  30. package/lib/commands/iac/status.js +63 -0
  31. package/lib/commands/index.js +4 -0
  32. package/lib/commands/init.js +33 -26
  33. package/lib/commands/project/list.js +10 -6
  34. package/lib/commands/project/use.js +42 -25
  35. package/lib/deploy/features/functions/index.js +2 -1
  36. package/lib/deploy/index.js +3 -1
  37. package/lib/endpoints/lib/iac.js +134 -0
  38. package/lib/error.js +29 -0
  39. package/lib/errorOut.js +3 -2
  40. package/lib/fn-utils/lib/common.js +32 -12
  41. package/lib/fn-utils/lib/java.js +6 -8
  42. package/lib/fn-utils/lib/node.js +7 -1
  43. package/lib/iac/status/bundle.js +82 -0
  44. package/lib/iac/status/deploy.js +74 -0
  45. package/lib/iac/status/util/index.js +26 -0
  46. package/lib/index.js +8 -14
  47. package/lib/init/features/client.js +2 -3
  48. package/lib/init/features/functions/languages/java.js +2 -5
  49. package/lib/init/features/functions/languages/node.js +2 -5
  50. package/lib/init/features/index.js +8 -3
  51. package/lib/init/features/project.js +70 -33
  52. package/lib/init/util/client.js +12 -0
  53. package/lib/init/util/functions.js +20 -0
  54. package/lib/init/util/project.js +35 -0
  55. package/lib/internal/api.js +6 -9
  56. package/lib/internal/command.js +2 -2
  57. package/lib/internal/config.js +6 -4
  58. package/lib/migration/index.js +10 -6
  59. package/lib/option-filter.js +4 -1
  60. package/lib/port-resolver.js +18 -16
  61. package/lib/prompt/index.js +92 -0
  62. package/lib/prompt/types/file-path.js +95 -0
  63. package/lib/pull/features/client.js +1 -1
  64. package/lib/pull/features/functions/index.js +5 -7
  65. package/lib/pull/index.js +4 -1
  66. package/lib/serve/features/index.js +3 -1
  67. package/lib/shell/dependencies/http-functions.js +1 -1
  68. package/lib/shell/index.js +3 -1
  69. package/lib/track.js +3 -1
  70. package/lib/util_modules/constants/index.js +3 -1
  71. package/lib/util_modules/constants/lib/file-names.js +2 -1
  72. package/lib/util_modules/constants/lib/iac.js +8 -0
  73. package/lib/util_modules/constants/lib/regex.js +2 -1
  74. package/lib/util_modules/constants/lib/scopes.js +5 -0
  75. package/lib/util_modules/constants/project.js +6 -0
  76. package/lib/util_modules/contextHelp.js +5 -1
  77. package/lib/util_modules/env.js +2 -5
  78. package/lib/util_modules/fs/index.js +9 -1
  79. package/lib/util_modules/fs/lib/async.js +29 -22
  80. package/lib/util_modules/js.js +6 -0
  81. package/lib/util_modules/parser/toml.js +5 -1
  82. package/lib/util_modules/project.js +3 -0
  83. package/lib/util_modules/shell.js +3 -6
  84. package/package.json +7 -4
  85. package/templates/iacSuccess.html +391 -0
  86. package/lib/prompt.js +0 -49
@@ -26,6 +26,7 @@ const js_1 = require("../../../util_modules/js");
26
26
  const logger_1 = require("../../../util_modules/logger");
27
27
  const project_1 = require("../../../util_modules/project");
28
28
  const runtime_1 = __importDefault(require("../../../util_modules/constants/lib/runtime"));
29
+ const error_1 = __importDefault(require("../../../error"));
29
30
  exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
30
31
  const fnAPI = yield endpoints_1.functionsAPI();
31
32
  const fnDirName = config_1.functionsConfig.source();
@@ -108,10 +109,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
108
109
  var _a, _b;
109
110
  yield fs_1.ASYNC.ensureDir(fn.source);
110
111
  const buffer = (yield fnAPI.download(fn.id));
111
- yield new archiver_1.default()
112
- .load(buffer)
113
- .extract('/', path_1.join(fnDirPath, fn.name), { isFolder: true })
114
- .finalize();
112
+ yield new archiver_1.default().load(buffer).extract(path_1.join(fnDirPath, fn.name)).finalize();
115
113
  if ((_a = fn.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.nodejs)) {
116
114
  yield languages_1.node(fn);
117
115
  }
@@ -122,9 +120,9 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
122
120
  })));
123
121
  targets = targets.filter((target) => {
124
122
  if (!target.valid) {
125
- logger_1.debug('Invalid target : ' + target + ' reason : ' + target.failure_reason);
126
- process.exitCode = 2;
127
- logger_1.warning('skipping pull of functions since the package is invalid. \nContact catalyst support with debug log');
123
+ logger_1.debug('Invalid target : ' + target.name + ' reason : ' + target.failure_reason);
124
+ logger_1.warning(`skipping pull of function(${target.name}) since the package is invalid. \nContact catalyst support with debug log.`);
125
+ new error_1.default('invalid package: ' + target.name, { exit: 2 });
128
126
  }
129
127
  return target.valid;
130
128
  });
package/lib/pull/index.js CHANGED
@@ -39,7 +39,10 @@ function pull() {
39
39
  }
40
40
  const MODULE = features_1.default[feature];
41
41
  logger_1.info(ansi_colors_1.bold('\n' + ansi_colors_1.white('===> ') + js_1.JS.capitalize(feature) + ' Setup'));
42
- yield MODULE();
42
+ yield MODULE().catch((err) => {
43
+ logger_1.info();
44
+ logger_1.warning(`Skipping pull of ${feature}. Since ${err.message}.\nContact Catalyst Support with catalyst-debug.log file.`);
45
+ });
43
46
  if (runtime_store_1.default.get('payload.' + feature, false)) {
44
47
  runtime_store_1.default.set('payload.features', runtime_store_1.default.get('payload.features', []).concat(feature));
45
48
  }
@@ -32,6 +32,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
34
  exports.apig = exports.functions = exports.client = void 0;
35
+ const error_1 = __importDefault(require("../../error"));
35
36
  const port_resolver_1 = __importDefault(require("../../port-resolver"));
36
37
  const runtime_store_1 = __importDefault(require("../../runtime-store"));
37
38
  const constants_1 = require("../../util_modules/constants");
@@ -42,7 +43,8 @@ function client() {
42
43
  try {
43
44
  yield clientModule.default();
44
45
  }
45
- catch (err) {
46
+ catch (e) {
47
+ const err = error_1.default.getErrorInstance(e);
46
48
  logger_1.info();
47
49
  logger_1.warning('Skipping the serve of Client because of the error: ' + err.message);
48
50
  logger_1.info();
@@ -235,7 +235,7 @@ class HttpFunctions {
235
235
  };
236
236
  shell_1.clearLine(process.stdout);
237
237
  const masterPort = runtime_store_1.default.get(`context.port.http.master`, -1);
238
- const fnTargets = runtime_store_1.default.get('context.functions.targets');
238
+ const fnTargets = runtime_store_1.default.get('context.functions.targets', []);
239
239
  fnTargets
240
240
  .filter((t) => t.url !== undefined && t.type === constants_1.FN_TYPE.basic)
241
241
  .map((t) => {
@@ -46,7 +46,9 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
46
46
  const httpServer = new http_functions_1.default(replServer);
47
47
  try {
48
48
  yield prepare_1.default([constants_1.FN_TYPE.basic, constants_1.FN_TYPE.cron, constants_1.FN_TYPE.event, constants_1.FN_TYPE.integration]);
49
- const targets = runtime_store_1.default.get('context.functions.targets', []).filter((target) => {
49
+ const targets = runtime_store_1.default
50
+ .get('context.functions.targets', [])
51
+ .filter((target) => {
50
52
  if (!target.valid) {
51
53
  logger_1.warning('target [' +
52
54
  target.name +
package/lib/track.js CHANGED
@@ -16,6 +16,7 @@ const path_1 = require("path");
16
16
  const readline_1 = require("readline");
17
17
  const config_store_1 = __importDefault(require("./config-store"));
18
18
  const endpoints_1 = require("./endpoints");
19
+ const error_1 = __importDefault(require("./error"));
19
20
  const runtime_store_1 = __importDefault(require("./runtime-store"));
20
21
  const fs_1 = require("./util_modules/fs");
21
22
  const logger_1 = require("./util_modules/logger");
@@ -52,7 +53,8 @@ exports.default = (event, message, duration) => __awaiter(void 0, void 0, void 0
52
53
  yield httpLogger.log(logInput);
53
54
  }
54
55
  }
55
- catch (err) {
56
+ catch (e) {
57
+ const err = error_1.default.getErrorInstance(e);
56
58
  logger_1.debug('Unable to send debug log to server: ' + err.message);
57
59
  }
58
60
  });
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ORIGIN = exports.TEMPLATE = exports.SCOPE = exports.REMOTE_REF = exports.REGEX = exports.REFERENCE = exports.PLACEHOLDER = exports.INTEG = exports.FOLDERNAME = exports.FN_TYPE = exports.DC_TYPE = exports.FILENAME = exports.EVENT_SOURCE = exports.EVENT_REF = exports.DEFAULT = exports.CLIQ = exports.AUTH = exports.APIG_RULES = void 0;
6
+ exports.IAC = exports.ORIGIN = exports.TEMPLATE = exports.SCOPE = exports.REMOTE_REF = exports.REGEX = exports.REFERENCE = exports.PLACEHOLDER = exports.INTEG = exports.FOLDERNAME = exports.FN_TYPE = exports.DC_TYPE = exports.FILENAME = exports.EVENT_SOURCE = exports.EVENT_REF = exports.DEFAULT = exports.CLIQ = exports.AUTH = exports.APIG_RULES = void 0;
7
7
  var apig_rules_1 = require("./lib/apig-rules");
8
8
  Object.defineProperty(exports, "APIG_RULES", { enumerable: true, get: function () { return __importDefault(apig_rules_1).default; } });
9
9
  var auth_1 = require("./lib/auth");
@@ -40,3 +40,5 @@ var template_1 = require("./lib/template");
40
40
  Object.defineProperty(exports, "TEMPLATE", { enumerable: true, get: function () { return __importDefault(template_1).default; } });
41
41
  var urls_1 = require("./lib/urls");
42
42
  Object.defineProperty(exports, "ORIGIN", { enumerable: true, get: function () { return __importDefault(urls_1).default; } });
43
+ var iac_1 = require("./lib/iac");
44
+ Object.defineProperty(exports, "IAC", { enumerable: true, get: function () { return __importDefault(iac_1).default; } });
@@ -20,5 +20,6 @@ exports.default = Object.freeze({
20
20
  system_rules: 'catalyst-system-rules.json'
21
21
  },
22
22
  catalyst_config: 'catalyst-config.json',
23
- command_log: '.command.log'
23
+ command_log: '.command.log',
24
+ node_modules: 'node_modules'
24
25
  });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = Object.freeze({
4
+ template_format: {
5
+ json: 'JSON',
6
+ yml: 'YAML'
7
+ }
8
+ });
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const functionName = /(?!^\d+$)^(\w|-)+$/g;
4
4
  exports.default = Object.freeze({
5
5
  project: {
6
- name: /^[a-zA-Z0-9][a-zA-Z0-9-]*$/g
6
+ name: /^[a-zA-Z0-9][a-zA-Z0-9-]*$/g,
7
+ template: /project-template-\d{1,2}\.\d{1,2}\.\d{1,2}.(yml|json)/g
7
8
  },
8
9
  client: {
9
10
  package_name: /^[a-zA-Z0-9][a-zA-Z0-9-]*$/g
@@ -15,6 +15,11 @@ exports.default = Object.freeze({
15
15
  queue_data_read: 'ZohoCatalyst.queue.data.READ',
16
16
  queue_data_create: 'ZohoCatalyst.queue.data.CREATE',
17
17
  projects: 'ZohoCatalyst.projects.ALL',
18
+ project_export_read: 'ZohoCatalyst.project.export.READ',
19
+ project_export_create: 'ZohoCatalyst.project.export.CREATE',
20
+ project_import_read: 'ZohoCatalyst.project.import.READ',
21
+ project_import_create: 'ZohoCatalyst.project.import.CREATE',
22
+ project_import_delete: 'ZohoCatalyst.project.import.DELETE',
18
23
  cron: 'ZohoCatalyst.cron.ALL',
19
24
  zcql: 'ZohoCatalyst.zcql.CREATE',
20
25
  webapp: 'ZohoCatalyst.webapp.ALL',
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const PROJECT = Object.freeze({
4
+ accepted_types: ['Live', 'Demo']
5
+ });
6
+ exports.default = PROJECT;
@@ -10,10 +10,11 @@ const fs_1 = require("./fs");
10
10
  const logger_1 = require("./logger");
11
11
  const toml_1 = __importDefault(require("./parser/toml"));
12
12
  function help() {
13
+ let exitCode = 0;
13
14
  const logs = runtime_store_1.default.get('log');
14
15
  if (logs === undefined) {
15
16
  logger_1.debug('NO ERRORS REGISTERED');
16
- return;
17
+ return exitCode;
17
18
  }
18
19
  const logKeys = Object.keys(logs);
19
20
  const fillTemplate = (...arg) => {
@@ -28,6 +29,7 @@ function help() {
28
29
  const errQueue = logs[key];
29
30
  if (key === 'faultyError') {
30
31
  errQueue.forEach((err) => {
32
+ exitCode = err.exit > exitCode ? err.exit : exitCode;
31
33
  outputError(err, errQueue);
32
34
  return;
33
35
  });
@@ -36,6 +38,7 @@ function help() {
36
38
  const doc = fs_1.SYNC.readFile(docPath) || '';
37
39
  const catHelp = toml_1.default(doc);
38
40
  errQueue.forEach((err) => {
41
+ exitCode = err.exit > exitCode ? err.exit : exitCode;
39
42
  if (err.errorId === undefined || catHelp === undefined || catHelp === {}) {
40
43
  outputError(err, errQueue);
41
44
  return;
@@ -59,6 +62,7 @@ function help() {
59
62
  errQueue.shift();
60
63
  });
61
64
  });
65
+ return exitCode;
62
66
  }
63
67
  exports.default = help;
64
68
  function outputError(err, errQueue) {
@@ -12,13 +12,10 @@ function isWindows() {
12
12
  }
13
13
  exports.isWindows = isWindows;
14
14
  function isPrimaryShell() {
15
- if (!process) {
15
+ if (!process || process.env.CATALYST_SUB_PROCESS) {
16
16
  return false;
17
17
  }
18
- if (process.env.CATALYST_SUB_PROCESS) {
19
- return !process.env.CATALYST_SUB_PROCESS;
20
- }
21
- if (process.env.SHLVL) {
18
+ if (!isWindows() && process.env.SHLVL) {
22
19
  return parseInt(process.env.SHLVL) <= 1;
23
20
  }
24
21
  return false;
@@ -18,9 +18,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
21
24
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.ASYNC = exports.SYNC = void 0;
25
+ exports.ASYNC = exports.SYNC = exports.untildify = void 0;
26
+ const os_1 = __importDefault(require("os"));
23
27
  const ASYNC = __importStar(require("./lib/async"));
24
28
  exports.ASYNC = ASYNC;
25
29
  const SYNC = __importStar(require("./lib/sync"));
26
30
  exports.SYNC = SYNC;
31
+ const tildRegex = /^~(?=$|\/|\\)/;
32
+ const homeDirectory = os_1.default.homedir();
33
+ const untildify = (pth) => homeDirectory ? pth.replace(tildRegex, homeDirectory) : pth;
34
+ exports.untildify = untildify;
@@ -17,26 +17,31 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
17
17
  const minimatch_1 = __importDefault(require("minimatch"));
18
18
  const os_1 = __importDefault(require("os"));
19
19
  const path_1 = __importDefault(require("path"));
20
+ const __1 = require("..");
20
21
  function dirExists(pth) {
21
22
  return __awaiter(this, void 0, void 0, function* () {
22
- const stats = yield fs_extra_1.default.stat(pth).catch(() => false);
23
+ const stats = yield fs_extra_1.default.stat(__1.untildify(pth)).catch(() => false);
23
24
  return stats && stats.isDirectory();
24
25
  });
25
26
  }
26
27
  exports.dirExists = dirExists;
27
28
  function fileExists(pth) {
28
29
  return __awaiter(this, void 0, void 0, function* () {
29
- const stats = yield fs_extra_1.default.stat(pth).catch(() => false);
30
+ const stats = yield fs_extra_1.default.stat(__1.untildify(pth)).catch(() => false);
30
31
  return stats && stats.isFile();
31
32
  });
32
33
  }
33
34
  exports.fileExists = fileExists;
34
- function readFile(pth, encoding = 'utf8') {
35
+ function readFile(pth, type) {
35
36
  return __awaiter(this, void 0, void 0, function* () {
36
- if (yield fileExists(pth)) {
37
- return fs_extra_1.default.readFile(pth, encoding);
37
+ if (!(yield fileExists(pth))) {
38
+ return undefined;
38
39
  }
39
- return undefined;
40
+ return (type === 'buffer'
41
+ ? fs_extra_1.default.readFile(pth)
42
+ : type
43
+ ? fs_extra_1.default.readFile(pth, type)
44
+ : fs_extra_1.default.readFile(pth, 'utf8'));
40
45
  });
41
46
  }
42
47
  exports.readFile = readFile;
@@ -70,27 +75,29 @@ function dirList(dir) {
70
75
  });
71
76
  }
72
77
  exports.dirList = dirList;
73
- function walk(dir, exclude = []) {
78
+ function walk(dir, { exclude = [], excludeDir = true, depth = -1 } = {}) {
74
79
  return __awaiter(this, void 0, void 0, function* () {
80
+ if (depth === 0) {
81
+ return [];
82
+ }
75
83
  const isDir = yield fs_extra_1.default.stat(dir).then((stat) => stat.isDirectory());
76
84
  const files = isDir ? yield fs_extra_1.default.readdir(dir) : [path_1.default.basename(dir)];
77
- const folderContentPromise = files
78
- .map((entry) => {
79
- return isDir ? path_1.default.join(dir, entry) : dir;
80
- })
81
- .filter((entryPath) => {
82
- let match = false;
83
- for (const glob of exclude) {
84
- match = minimatch_1.default(entryPath, glob);
85
- if (match) {
86
- return false;
85
+ const folderContentPromise = files.map((entry) => __awaiter(this, void 0, void 0, function* () {
86
+ const entryPath = isDir ? path_1.default.join(dir, entry) : dir;
87
+ const stats = yield fs_extra_1.default.stat(entryPath);
88
+ const isEntryPthDir = stats.isDirectory();
89
+ let excludeMatch = false;
90
+ if (!(isEntryPthDir && !excludeDir)) {
91
+ for (const glob of exclude) {
92
+ excludeMatch = excludeMatch || minimatch_1.default(entryPath, glob);
87
93
  }
88
94
  }
89
- return true;
90
- })
91
- .map((entryPath) => __awaiter(this, void 0, void 0, function* () {
92
- const stats = yield fs_extra_1.default.stat(entryPath);
93
- return stats.isDirectory() ? walk(entryPath, exclude) : [entryPath];
95
+ if (excludeMatch) {
96
+ return [];
97
+ }
98
+ return isEntryPthDir
99
+ ? walk(entryPath, { exclude, excludeDir, depth: --depth })
100
+ : [entryPath];
94
101
  }));
95
102
  const folderContents = yield Promise.all(folderContentPromise);
96
103
  return folderContents.reduce((all, folderContent) => all.concat(folderContent), []);
@@ -42,5 +42,11 @@ exports.JS = lodash_1.default.mixin({
42
42
  exports.JS.removeNullAndUndefined(val)) ||
43
43
  ((val === null || val === undefined) && delete copy[key]));
44
44
  return copy;
45
+ },
46
+ parseJSON: (str) => {
47
+ try {
48
+ return JSON.parse(str);
49
+ }
50
+ catch (e) { }
45
51
  }
46
52
  });
@@ -10,6 +10,10 @@ exports.default = (str) => {
10
10
  return toml_1.parse(str);
11
11
  }
12
12
  catch (e) {
13
- throw new error_1.default('TOML Parsing error on line ' + e.line + ', column ' + e.column + ': ' + e.message, { exit: 2 });
13
+ const err = error_1.default.getErrorInstance(e, {
14
+ message: 'TOML Parsing error'
15
+ });
16
+ err.exit = 2;
17
+ throw err;
14
18
  }
15
19
  };
@@ -199,6 +199,9 @@ function transformProject(projectObj) {
199
199
  name: value.project_domain_name
200
200
  };
201
201
  break;
202
+ case 'project_type':
203
+ key = 'type';
204
+ break;
202
205
  default:
203
206
  break;
204
207
  }
@@ -47,16 +47,14 @@ function spawn(command, opts, _a = {}) {
47
47
  ASYNC: () => {
48
48
  const childProcess = cross_spawn_1.default(command, opts, Object.assign({ cwd,
49
49
  stdio,
50
- shell }, otherOpts));
50
+ shell }, otherOpts)).on('error', logger_1.debug);
51
51
  return new Promise((res, rej) => {
52
52
  let message = '';
53
- childProcess.on('error', (err) => {
54
- rej(err);
55
- });
56
53
  childProcess.on('message', (msg) => {
57
54
  message += msg.toString();
58
55
  logger_1.debug(msg.toString());
59
56
  });
57
+ childProcess.on('error', rej);
60
58
  childProcess.on('exit', (code) => {
61
59
  if (code !== 0) {
62
60
  rej(code);
@@ -66,8 +64,7 @@ function spawn(command, opts, _a = {}) {
66
64
  });
67
65
  },
68
66
  RAW: () => {
69
- const child = cross_spawn_1.default(command, opts, Object.assign({ cwd, stdio, shell }, otherOpts));
70
- child.on('error', (err) => logger_1.debug(err));
67
+ const child = cross_spawn_1.default(command, opts, Object.assign({ cwd, stdio, shell }, otherOpts)).on('error', logger_1.debug);
71
68
  return child;
72
69
  }
73
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -30,17 +30,18 @@
30
30
  "chokidar": "^3.5.2",
31
31
  "cli-cursor": "^3.1.0",
32
32
  "cli-table3": "^0.6.0",
33
- "commander": "^8.1.0",
33
+ "commander": "^8.2.0",
34
34
  "conf": "^10.0.2",
35
35
  "cross-spawn": "^7.0.3",
36
36
  "express": "^4.17.1",
37
37
  "fs-extra": "^10.0.0",
38
+ "fuzzy": "^0.1.3",
38
39
  "global-dirs": "^3.0.0",
39
40
  "http-proxy": "^1.18.1",
40
41
  "inquirer": "^8.1.2",
42
+ "inquirer-autocomplete-prompt": "^1.4.0",
41
43
  "jszip": "^3.7.1",
42
44
  "lodash": "^4.17.21",
43
- "meant": "^2.0.1",
44
45
  "minimatch": "^3.0.4",
45
46
  "moment": "^2.29.1",
46
47
  "open": "^8.2.1",
@@ -52,7 +53,8 @@
52
53
  "toml": "^3.0.0",
53
54
  "update-notifier": "^5.1.0",
54
55
  "winston": "^3.3.3",
55
- "xml2js": "^0.4.23"
56
+ "xml2js": "^0.4.23",
57
+ "yaml": "^1.10.2"
56
58
  },
57
59
  "devDependencies": {
58
60
  "@types/app-module-path": "^2.2.0",
@@ -62,6 +64,7 @@
62
64
  "@types/fs-extra": "^9.0.12",
63
65
  "@types/http-proxy": "^1.17.7",
64
66
  "@types/inquirer": "^7.3.3",
67
+ "@types/inquirer-autocomplete-prompt": "^1.3.3",
65
68
  "@types/jest": "^26.0.24",
66
69
  "@types/lodash": "^4.14.172",
67
70
  "@types/minimatch": "^3.0.5",