zcatalyst-cli 1.9.0 → 1.9.1

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/README.md CHANGED
@@ -70,36 +70,36 @@ Certain command are project specific and for it to work you must be inside a pro
70
70
 
71
71
  Command | Description
72
72
  ------- | -----------
73
- **login** | Authenticate your CLI to access Catalyst Details. *Requires access to a web browser*.
74
- **whoami** | Prints the current logged in user email Id.
75
- **token:generate** | Create a CLI token in order to use in CI systems.
76
- **token:revoke** | Revoke the token created from this CLI.
77
- **token:list** | List all the available tokens created from this CLI.
78
- **project:list** | List the Catalyst projects you have access to.
73
+ **login** | Log the CLI in to your Catalyst account. *Requires access to a web browser*.
74
+ **whoami** | Print the email address of the user currently logged in.
75
+ **token:generate** | Generate a token to authenticate accessing the CLI from a remote system.
76
+ **token:revoke** | Revoke a token generated in this CLI.
77
+ **token:list** | List all the available tokens generated in this CLI.
78
+ **project:list** | List all the Catalyst projects you have access to.
79
79
  **project:use** | Set an active Catalyst project for your working directory.
80
- **project:reset** | Clear an active selection of project and reset to base project.
81
- **init** | Initialize a Catalyst sample project in the current directory.
82
- **pull** | Pull an existing project from Catalyst.
83
- **apig:status** | Displays the status of Catalyst API Gateway and schedule progress.
84
- **apig:enable** | Enables API Gateway if not already enabled. *in both Console and Local*
85
- **apig:disable** | Disable API Gateway if not already disabled. *in both Console and Local*
86
- **ds:import** | Write bulk data to table in Catalyst datastore.
87
- **ds:export** | Read bulk data from table in Catalyst datastore.
88
- **ds:status** | Displays the status of Catalyst datastore bulk schedule progress.
89
- **client:setup** | Setup and configure Client files.
90
- **client:delete** | Removes the selected version of Client.
91
- **functions:setup** | Setup and configure function files for Catalyst functions.
92
- **functions:delete** | Removes the selected functions.
93
- **functions:add** | Add single function of desirable stack to catalyst functions.
94
- **functions:shell** | Launch a node shell with emulated functions for any stack pointing to production or local.
95
- **functions:config** | Configure the resources for the functions deployed to the Catalyst remote console.
96
- **event:generate \| generate:event** | Generate sample payloads from different event sources of Catalyst
97
- **event:generate:integ** | Generate sample payload for testing your integration functions in local.
98
- **serve** | Serve your code for local testing without affecting the production.
99
- **deploy** | Deploy your code from working directory to your Catalyst Project.
100
- **help** | Display help information.
101
- **run-script \| run** | Run a particular command script.
102
- **logout** | Log the CLI out of your Zoho Catalyst account.
80
+ **project:reset** | Clear an active project selection and reset to the base project.
81
+ **init** | Initialize a Catalyst project, function, and client resources in the local directory.
82
+ **pull** | Pull resources of your project from the remote console to the local directory.
83
+ **apig:status** | Obtain the current status of API Gateway for your project and the schedule progress.
84
+ **apig:enable** | Enable API Gateway for your project. *In both Console and Local*.
85
+ **apig:disable** | Disable API Gateway for your project. *In both Console and Local*.
86
+ **ds:import** | Bulk write records to a table in the Catalyst Data Store.
87
+ **ds:export** | Bulk read records from a table in the Catalyst Data Store.
88
+ **ds:status** | Display the job status of a Data Store import or export operation.
89
+ **client:setup** | Set up the client directory in your project directory.
90
+ **client:delete** | Delete a version of the client from the remote console or the local directory.
91
+ **functions:setup** | Set up the function directory in your project directory.
92
+ **functions:add** | Add a function of the required stack to the function directory.
93
+ **functions:shell** | Launch a node shell to test emulated functions of any stack or type, other than Advanced I/O functions.
94
+ **functions:config** | Configure the memory allocation of a function in your project.
95
+ **functions:delete** | Delete a function from the remote console or the local directory.
96
+ **event:generate \| generate:event** | Generate sample payloads from different components or custom event sources to test Event functions.
97
+ **event:generate:integ** | Generate sample payloads for the required integration service to test Integration functions.
98
+ **serve** | Serve Basic I/O and Advanced I/O functions, and the client, to test them locally.
99
+ **deploy** | Deploy the Catalyst project and project resources to the remote console from the local directory.
100
+ **help** | Display the command reference or help for a specific command.
101
+ **run-script \| run** | Run a particular command script defined in *catalyst.json*.
102
+ **logout** | Log the CLI out of your Catalyst account.
103
103
 
104
104
  ---
105
105
 
@@ -20,7 +20,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
20
20
  const constants_1 = require("../../util_modules/constants");
21
21
  const logger_1 = require("../../util_modules/logger");
22
22
  exports.default = new command_1.default('apig:disable')
23
- .description('disable api gateway if not already disabled')
23
+ .description('Disable API Gateway for your project')
24
24
  .needs('auth', [constants_1.SCOPE.projects])
25
25
  .needs('config')
26
26
  .needs('rc')
@@ -20,7 +20,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
20
20
  const constants_1 = require("../../util_modules/constants");
21
21
  const logger_1 = require("../../util_modules/logger");
22
22
  exports.default = new command_1.default('apig:enable')
23
- .description('enables api gateway if not already enabled')
23
+ .description('Enable API Gateway for your project')
24
24
  .needs('auth', [constants_1.SCOPE.projects])
25
25
  .needs('config')
26
26
  .needs('rc')
@@ -22,7 +22,7 @@ const constants_1 = require("../../util_modules/constants");
22
22
  const logger_1 = require("../../util_modules/logger");
23
23
  const option_1 = require("../../util_modules/option");
24
24
  exports.default = new command_1.default('apig:status')
25
- .description('Displays the status of catalyst api gateway and schedule progress')
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
27
  .needs('auth', [constants_1.SCOPE.projects])
28
28
  .needs('config')
@@ -28,7 +28,7 @@ const logger_1 = require("../../util_modules/logger");
28
28
  const option_1 = require("../../util_modules/option");
29
29
  const project_1 = require("../../util_modules/project");
30
30
  exports.default = new command_1.default('client:delete [client_version]')
31
- .description('Removes the selected version of client')
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
34
  .needs('auth', [constants_1.SCOPE.webapp])
@@ -37,7 +37,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
37
37
  const constants_1 = require("../../util_modules/constants");
38
38
  const logger_1 = require("../../util_modules/logger");
39
39
  exports.default = new command_1.default('client:setup')
40
- .description('Setup and configure Client files')
40
+ .description('Set up the client directory in your project directory')
41
41
  .needs('auth', [constants_1.SCOPE.webapp])
42
42
  .needs('config')
43
43
  .needs('rc')
@@ -36,7 +36,7 @@ const runtime_store_1 = __importDefault(require("../runtime-store"));
36
36
  const constants_1 = require("../util_modules/constants");
37
37
  const logger_1 = require("../util_modules/logger");
38
38
  exports.default = new command_1.default('deploy')
39
- .description('Deploy your code from working directory to your Catalyst Project')
39
+ .description('Deploy the Catalyst project and project resources to the remote console from the local directory')
40
40
  .option('--only <targets>', 'only deploy specified, comma-separated targets (e.g. "functions,client").' +
41
41
  ' For Functions you can specify which functions to deploy with colon notation' +
42
42
  ' (e.g. "--only functions:<function_name>,functions:<function_name>"). ')
@@ -35,7 +35,7 @@ const getReadConfigFromPath = (pth) => __awaiter(void 0, void 0, void 0, functio
35
35
  return configJSON;
36
36
  });
37
37
  exports.default = new command_1.default('ds:export [table]')
38
- .description('Read bulk data from table in catalyst datastore')
38
+ .description('Bulk read records from a table in the Catalyst Data Store')
39
39
  .option('--table <name|id>', 'Name or ID of the table from which data is to be read (eg. "UserDetails")')
40
40
  .option('--config <path>', 'Path of the configuration json file to be used for export.')
41
41
  .option('--page <page>', 'Number which denotes the range of rows to be fetched (eg. "1")')
@@ -36,7 +36,7 @@ const getWriteConfigFromPath = (pth) => __awaiter(void 0, void 0, void 0, functi
36
36
  return configJSON;
37
37
  });
38
38
  exports.default = new command_1.default('ds:import [file]')
39
- .description('Write bulk data to table in catalyst datastore')
39
+ .description('Bulk write records to a table in the Catalyst Data Store')
40
40
  .option('--table <name|id>', 'Name or ID of the table to which data to be written (e.g. "UserDetails")')
41
41
  .option('--config <path>', 'Path of the configuration json file to be used for import.')
42
42
  .option('--production', 'flag for pointing to production environment')
@@ -25,7 +25,7 @@ const fs_1 = require("../../util_modules/fs");
25
25
  const logger_1 = require("../../util_modules/logger");
26
26
  const option_1 = require("../../util_modules/option");
27
27
  exports.default = new command_1.default('ds:status <operation> [jobid]')
28
- .description('Displays the status of catalyst datastore bulk schedule progress')
28
+ .description('Display the job status of a Data Store import or export operation')
29
29
  .option('--production', 'flag for pointing to production environment.')
30
30
  .needs('auth', [constants_1.SCOPE.projects, constants_1.SCOPE.datastore, constants_1.SCOPE.row])
31
31
  .needs('config')
@@ -42,7 +42,7 @@ const option_1 = require("../../../util_modules/option");
42
42
  const project_1 = require("../../../util_modules/project");
43
43
  exports.default = new command_1.default('event:generate <source> <action>')
44
44
  .alias('generate:event')
45
- .description('Generate sample payloads from different event sources of catalyst')
45
+ .description('Generate sample payloads from different components or custom event sources to test Event functions')
46
46
  .option('-rid, --rule-id <rule_identifier>', 'rule_identifier that will be used if the source is custom')
47
47
  .option('-e, --event-bus <event_bus_name>', 'event bus name that should be used')
48
48
  .allowUnknownOpts()
@@ -37,7 +37,7 @@ const command_1 = __importDefault(require("../../../internal/command"));
37
37
  const constants_1 = require("../../../util_modules/constants");
38
38
  const option_1 = require("../../../util_modules/option");
39
39
  exports.default = new command_1.default('event:generate:integ <service>')
40
- .description('Generate sample payload for testing your integration functions in local')
40
+ .description('Generate sample payloads for the required integration service to test Integration functions')
41
41
  .option('--inputs <inputs>', 'inputs to generate the integ event provided as comma seperated values')
42
42
  .needs('rc')
43
43
  .needs('auth')
@@ -37,7 +37,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
37
37
  const constants_1 = require("../../util_modules/constants");
38
38
  const logger_1 = require("../../util_modules/logger");
39
39
  exports.default = new command_1.default('functions:add')
40
- .description('Add single function of desirable stack to catalyst functions')
40
+ .description('Add a function of the required stack to the function directory')
41
41
  .needs('auth', [constants_1.SCOPE.functions])
42
42
  .needs('config')
43
43
  .needs('rc')
@@ -20,7 +20,7 @@ const ansi_colors_1 = require("ansi-colors");
20
20
  const prompt_1 = __importDefault(require("../../prompt"));
21
21
  const common_1 = require("../../fn-utils/lib/common");
22
22
  exports.default = new command_1.default('functions:config [function_name_or_id]')
23
- .description('Configure the resources for the functions deployed to the Catalyst remote console')
23
+ .description('Configure the memory allocation of a function in your project')
24
24
  .option('--memory <value>', 'use this option to configure the memory for the function. ex: --memory 128')
25
25
  .needs('auth', [constants_1.SCOPE.functions])
26
26
  .needs('config')
@@ -26,7 +26,7 @@ const logger_1 = require("../../util_modules/logger");
26
26
  const option_1 = require("../../util_modules/option");
27
27
  const project_1 = require("../../util_modules/project");
28
28
  exports.default = new command_1.default('functions:delete [function_name_or_id]')
29
- .description('Removes the selected functions')
29
+ .description('Delete a function from the remote console or the local directory')
30
30
  .option('--local', 'delete the functions in local machine.')
31
31
  .option('--remote', 'delete the functions in remote console.')
32
32
  .needs('auth', [constants_1.SCOPE.projects])
@@ -37,7 +37,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
37
37
  const constants_1 = require("../../util_modules/constants");
38
38
  const logger_1 = require("../../util_modules/logger");
39
39
  exports.default = new command_1.default('functions:setup')
40
- .description('Setup and configure Function files for Catalyst functions')
40
+ .description('Set up the function directory in your project directory')
41
41
  .needs('auth', [constants_1.SCOPE.functions])
42
42
  .needs('config')
43
43
  .needs('rc')
@@ -36,7 +36,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
36
36
  const constants_1 = require("../../util_modules/constants");
37
37
  const option_1 = require("../../util_modules/option");
38
38
  exports.default = new command_1.default('functions:shell')
39
- .description('Launch a node shell with emulated functions for any stack pointing to production or local')
39
+ .description('Launch a node shell to test emulated functions of any stack or type, other than Advanced I/O functions')
40
40
  .option('--http [port]', 'enables http mode for the basicIO functions and start server at specified port' +
41
41
  `(default: ${constants_1.DEFAULT.serve_port.http.basicio})`)
42
42
  .option('--debug [port]', 'the functions are invoked from local environment enabling debugging options on provided port.' +
@@ -11,7 +11,7 @@ const logger_1 = require("../util_modules/logger");
11
11
  const option_1 = require("../util_modules/option");
12
12
  const project_1 = require("../util_modules/project");
13
13
  exports.default = new command_1.default('help [command]')
14
- .description('Display help information')
14
+ .description('Display the command reference or help for a specific command')
15
15
  .action(function help(commandName) {
16
16
  var _a, _b, _c;
17
17
  if (option_1.getOptionValue('info', false)) {
@@ -42,7 +42,7 @@ const js_1 = require("../util_modules/js");
42
42
  const logger_1 = require("../util_modules/logger");
43
43
  const shell_1 = require("../util_modules/shell");
44
44
  exports.default = new command_1.default('init [feature]')
45
- .description('Initialize a Catalyst sample project in the current directory')
45
+ .description('Initialize a Catalyst project, function, and client resources in the local directory')
46
46
  .option('--force', 'force initialise a project for this directory')
47
47
  .ignore(['project'])
48
48
  .needs('auth', [constants_1.SCOPE.projects, constants_1.SCOPE.stratus_create, constants_1.SCOPE.stratus_read])
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
34
  const command_1 = __importDefault(require("../internal/command"));
35
35
  exports.default = new command_1.default('login')
36
- .description('Log the CLI in to your Zoho Catalyst account')
36
+ .description('Log the CLI in to your Catalyst account')
37
37
  .option('--no-localhost', 'login without browser')
38
38
  .option('--force', 'force reauthentication')
39
39
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
34
  const command_1 = __importDefault(require("../internal/command"));
35
35
  exports.default = new command_1.default('logout')
36
- .description('Log the CLI out of your Zoho Catalyst account')
36
+ .description('Log the CLI out of your Catalyst account')
37
37
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
38
38
  const auth = yield Promise.resolve().then(() => __importStar(require('../authentication')));
39
39
  return auth.logout();
@@ -38,7 +38,7 @@ const constants_1 = require("../../util_modules/constants");
38
38
  const logger_1 = require("../../util_modules/logger");
39
39
  const project_1 = require("../../util_modules/project");
40
40
  exports.default = new command_1.default('project:list')
41
- .description('List the Catalyst projects you have access to')
41
+ .description('List all the Catalyst projects you have access to')
42
42
  .needs('auth', [constants_1.SCOPE.projects])
43
43
  .needs('config', { optional: true, resolveOnNotFound: true })
44
44
  .needs('rc', { optional: true })
@@ -17,7 +17,7 @@ const constants_1 = require("../../util_modules/constants");
17
17
  const logger_1 = require("../../util_modules/logger");
18
18
  const project_1 = require("../../util_modules/project");
19
19
  exports.default = new command_1.default('project:reset')
20
- .description('Clear an active selection of project and reset to base project')
20
+ .description('Clear an active project selection and reset to the base project')
21
21
  .needs('auth', [constants_1.SCOPE.projects])
22
22
  .needs('config', { optional: true, resolveOnNotFound: true })
23
23
  .needs('rc')
@@ -42,7 +42,7 @@ const fs_1 = require("../util_modules/fs");
42
42
  const js_1 = require("../util_modules/js");
43
43
  const logger_1 = require("../util_modules/logger");
44
44
  exports.default = new command_1.default('pull [feature]')
45
- .description('Pull an existing project from Catalyst')
45
+ .description('Pull resources of your project from the remote console to the local directory')
46
46
  .needs('auth', [constants_1.SCOPE.functions, constants_1.SCOPE.webapp])
47
47
  .needs('config', { optional: true })
48
48
  .needs('rc')
@@ -38,7 +38,7 @@ const constants_1 = require("../util_modules/constants");
38
38
  const logger_1 = require("../util_modules/logger");
39
39
  exports.default = new command_1.default('run-script [command]')
40
40
  .alias('run')
41
- .description('run a particular command script')
41
+ .description('Run a particular command script defined in catalyst.json')
42
42
  .needs('auth')
43
43
  .needs('config')
44
44
  .needs('rc', { optional: true, resolveOnNotFound: true })
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  const command_1 = __importDefault(require("../internal/command"));
35
35
  const constants_1 = require("../util_modules/constants");
36
36
  exports.default = new command_1.default('serve')
37
- .description('Serve your code for local testing without affecting the production')
37
+ .description('Serve Basic I/O and Advanced I/O functions, and the client, to test them locally')
38
38
  .option('--http <port>', 'start the server at specified port ')
39
39
  .option('--debug <type:port>', 'the functions are invoked from local environment enabling debugging options on provided ports ' +
40
40
  `(example: advancedio:<name>:${constants_1.DEFAULT.serve_port.debug.advancedio},basicio:${constants_1.DEFAULT.serve_port.debug.basicio})`)
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  const command_1 = __importDefault(require("../../internal/command"));
35
35
  const logger_1 = require("../../util_modules/logger");
36
36
  exports.default = new command_1.default('token:generate')
37
- .description('Create a CLI token in order to use in CI systems')
37
+ .description('Generate a token to authenticate accessing the CLI from a remote system')
38
38
  .option('--current', 'prints out the existing token used by this CLI')
39
39
  .needs('auth')
40
40
  .ignore(['token'])
@@ -35,7 +35,7 @@ const ansi_colors_1 = require("ansi-colors");
35
35
  const command_1 = __importDefault(require("../../internal/command"));
36
36
  const logger_1 = require("../../util_modules/logger");
37
37
  exports.default = new command_1.default('token:list')
38
- .description('List all the available tokens created from this cli')
38
+ .description('List all the available tokens generated in this CLI')
39
39
  .ignore(['token'])
40
40
  .needs('auth')
41
41
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  const command_1 = __importDefault(require("../../internal/command"));
35
35
  const logger_1 = require("../../util_modules/logger");
36
36
  exports.default = new command_1.default('token:revoke <id>')
37
- .description('Revoke the token created from this CLI')
37
+ .description('Revoke a token generated in this CLI')
38
38
  .needs('auth')
39
39
  .ignore(['token'])
40
40
  .action((input) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18,7 +18,7 @@ const dc_1 = require("../dc");
18
18
  const command_1 = __importDefault(require("../internal/command"));
19
19
  const logger_1 = require("../util_modules/logger");
20
20
  exports.default = new command_1.default('whoami')
21
- .description('prints out the current logged in user email id')
21
+ .description('Print the email address of the user currently logged in')
22
22
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
23
23
  const activeDC = dc_1.getActiveDC();
24
24
  const user = config_store_1.default.get(`${activeDC}.user`);
package/lib/index.js CHANGED
@@ -12,11 +12,11 @@ const packageJson = runtime_store_1.default.get('context.cli.package');
12
12
  const { description, version } = packageJson;
13
13
  const program = new commander_1.Command();
14
14
  program.description(description);
15
- program.version(version, '-v, --version');
16
- program.option('-p, --project <name|project_id>', 'the catalyst project to use for this command');
17
- program.option('--token <token>', 'supply an auth token for this command');
18
- program.option('--dc <us|eu|in>', 'supply a DC to use for this command');
19
- program.option('--verbose', 'changes the log level to verbose for debug purpose');
15
+ program.version(version, '-v, --version', 'Print the Catalyst CLI version number');
16
+ program.option('-p, --project <name|project_id>', 'Specify the Catalyst project to be used for a command');
17
+ program.option('--token <token>', 'Supply an authentication token for a command');
18
+ program.option('--dc <us|eu|in>', 'Supply a data center for a command');
19
+ program.option('--verbose', 'Change the log level to verbose for debugging purposes');
20
20
  const cli = new client_1.Client(program);
21
21
  cli.onUnknownCommand((_OPTS, cmd) => {
22
22
  const commandNames = cli.getAllCommandNames();
@@ -39,25 +39,26 @@ class Server {
39
39
  constructor() {
40
40
  this.targetDetailsArr = [];
41
41
  }
42
- _spinUpMaster(masterPort, fnTargets) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const httpPort = parseInt(runtime_store_1.default.get('context.port.http.' + constants_1.REMOTE_REF.functions.type[constants_1.FN_TYPE.basic]), 10);
45
- const debugPort = parseInt(runtime_store_1.default.get('context.port.debug.' + constants_1.REMOTE_REF.functions.type[constants_1.FN_TYPE.basic], '-1'), 10);
46
- if (!isNaN(httpPort)) {
47
- fnTargets
48
- .filter((t) => t.url !== undefined && t.type === constants_1.FN_TYPE.basic)
49
- .map((t) => js_1.JS.omit(t, ['zip_stream', 'localFn']))
50
- .forEach((t) => {
51
- this.targetDetailsArr.push({
52
- type: 'functions',
53
- httpPort,
54
- debugPort,
55
- target: t
56
- });
42
+ _addBasicFnDetails() {
43
+ const fnTargets = runtime_store_1.default.get('context.functions.targets', []);
44
+ if (fnTargets.length === 0) {
45
+ logger_1.debug('No basic functions to add');
46
+ }
47
+ const httpPort = parseInt(runtime_store_1.default.get('context.port.http.' + constants_1.REMOTE_REF.functions.type[constants_1.FN_TYPE.basic]), 10);
48
+ const debugPort = parseInt(runtime_store_1.default.get('context.port.debug.' + constants_1.REMOTE_REF.functions.type[constants_1.FN_TYPE.basic], '-1'), 10);
49
+ if (!isNaN(httpPort)) {
50
+ fnTargets
51
+ .filter((t) => t.url !== undefined && t.type === constants_1.FN_TYPE.basic)
52
+ .map((t) => js_1.JS.omit(t, ['zip_stream', 'localFn']))
53
+ .forEach((t) => {
54
+ this.targetDetailsArr.push({
55
+ type: 'functions',
56
+ httpPort,
57
+ debugPort,
58
+ target: t
57
59
  });
58
- }
59
- return master_1.default(masterPort, this.targetDetailsArr);
60
- });
60
+ });
61
+ }
61
62
  }
62
63
  _spinUpJavaServer(details, masterPort) {
63
64
  var _a, _b, _c, _d;
@@ -185,13 +186,13 @@ class Server {
185
186
  throw new error_1.default('master port cannot be undefined', { exit: 2 });
186
187
  }
187
188
  yield Promise.all(this.targetDetailsArr.map((details) => __awaiter(this, void 0, void 0, function* () { return this.startServer(details, masterPort); })));
188
- const fnTargets = runtime_store_1.default.get('context.functions.targets', []);
189
- if (fnTargets.length === 0) {
189
+ this._addBasicFnDetails();
190
+ if (this.targetDetailsArr.length === 0) {
190
191
  throw new error_1.default('Trying to start master server before other server', {
191
192
  exit: 2
192
193
  });
193
194
  }
194
- const server = yield this._spinUpMaster(masterPort, fnTargets);
195
+ const server = yield master_1.default(masterPort, this.targetDetailsArr);
195
196
  this.masterServer = server;
196
197
  return new Promise((res) => {
197
198
  server.on('listening', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {