zcatalyst-cli 1.18.0-beta.12 → 1.18.0-beta.13

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
@@ -1,5 +1,5 @@
1
1
  <center>
2
- <a href="https://www.zoho.com/catalyst/">
2
+ <a href="https://catalyst.zoho.com/
3
3
  <img width="200" height="200" src="https://www.zohowebstatic.com/sites/default/files/catalyst/catalyst-logo.svg">
4
4
  </a>
5
5
  </center>
@@ -25,7 +25,7 @@ This is the Catalyst Command Line Interface (CLI) Tool. They can be used to:
25
25
  - Interact with data in your Catalyst projects via console
26
26
  - Deploy code and assets to your Catalyst projects
27
27
 
28
- To get started with the Catalyst CLI, you can go through our documentation [CLI documentation](https://www.zoho.com/catalyst/help/cli-command-reference.html).
28
+ To get started with the Catalyst CLI, you can go through our documentation [CLI documentation](https://docs.catalyst.zoho.com/en/cli/v1/cli-command-reference/).
29
29
 
30
30
  ## Installation
31
31
 
@@ -37,7 +37,7 @@ Then you need to install [Node.js](http://nodejs.org/) and [npm](https://npmjs.o
37
37
  **NOTE**
38
38
 
39
39
  1. Installing Node.js should install npm as well.
40
- 2. The ZCatalyst-CLI is compatible only with node versions >=12.
40
+ 2. The ZCatalyst-CLI is compatible only with node versions >=14.
41
41
 
42
42
  ---
43
43
 
@@ -55,7 +55,7 @@ This will provide you with the globally accessible `catalyst` command.
55
55
 
56
56
  1. If you need to setup the cli in current directory alone use the same command without `-g` option.
57
57
 
58
- 2. Alternatively you can visit [CLI Installation Documentation](https://www.zoho.com/catalyst/help/installing-catalyst-cli.html) for installation instructions.
58
+ 2. Alternatively you can visit [CLI Installation Documentation](https://docs.catalyst.zoho.com/en/getting-started/installing-catalyst-cli/) for installation instructions.
59
59
 
60
60
  ---
61
61
 
@@ -69,6 +69,7 @@ Certain command are project specific and for it to work you must be inside a pro
69
69
 
70
70
  Command | Description
71
71
  ------- | -----------
72
+ **help** | Display the command reference or help for a specific command.
72
73
  **login** | Log the CLI in to your Catalyst account. *Requires access to a web browser*.
73
74
  **whoami** | Print the email address of the user currently logged in.
74
75
  **token:generate** | Generate a token to authenticate accessing the CLI from a remote system.
@@ -96,13 +97,16 @@ Command | Description
96
97
  **functions:shell** | Launch a node shell to test emulated functions of any stack or type, other than Advanced I/O functions.
97
98
  **functions:config** | Perform advanced configurations such as memory allocation on a function in your project.
98
99
  **functions:delete** | Delete a function from the remote console or the local directory.
99
- **appsail:add** | Link an already existing AppSail service to Catalyst Project.
100
+ **appsail:add** | Link an already existing AppSail app to Catalyst Project.
101
+ **slate:link** | Configure your existing app in slate service
102
+ **slate:create** | Create a new slate app
103
+ **slate:unlink** | Unlink your existing slate app
100
104
  **codelib:install** | Install the code library functionalities into your project.
101
105
  **event:generate \| generate:event** | Generate sample payloads from different components or custom event sources to test Event functions.
102
106
  **event:generate:integ** | Generate sample payloads for the required integration service to test Integration functions.
107
+ **event:generate:job** | Generate sample payloads to test the job functions
103
108
  **serve** | Serve Basic I/O and Advanced I/O functions, and the client, to test them locally.
104
109
  **deploy** | Deploy the Catalyst project and project resources to the remote console from the local directory.
105
- **help** | Display the command reference or help for a specific command.
106
110
  **run-script \| run** | Run a particular command script defined in *catalyst.json*.
107
111
  **config:set** | Set catalyst configuration as a key value pair.
108
112
  **config:get** | Get catalyst config value for the specified key.
@@ -122,3 +126,7 @@ This is to make sure your local project is upto date with the CLI version that i
122
126
  ### **v1.4.0**
123
127
 
124
128
  - Global configuration file (zcatalyst-cli-nodejs/zcatalyst-cli.json) structure change.
129
+
130
+ ### **v1.6.2**
131
+
132
+ - Global configuration file (zcatalyst-cli-nodejs/zcatalyst-cli.json) structure change.
@@ -49,6 +49,7 @@ exports.default = (client) => {
49
49
  });
50
50
  }
51
51
  return Promise.all([
52
+ loadCommand('help'),
52
53
  loadCommand('login'),
53
54
  loadCommand('whoami'),
54
55
  loadCommand('token:generate'),
@@ -72,10 +73,10 @@ exports.default = (client) => {
72
73
  loadCommand('client:setup'),
73
74
  loadCommand('client:delete'),
74
75
  loadCommand('functions:setup'),
75
- loadCommand('functions:delete'),
76
76
  loadCommand('functions:add'),
77
77
  loadCommand('functions:shell'),
78
78
  loadCommand('functions:config'),
79
+ loadCommand('functions:delete'),
79
80
  loadCommand('appsail:add'),
80
81
  loadCommand('slate:link'),
81
82
  loadCommand('slate:create'),
@@ -83,11 +84,10 @@ exports.default = (client) => {
83
84
  loadCommand('codelib:install'),
84
85
  loadCommand('event:generate'),
85
86
  loadCommand('event:generate:integ'),
86
- loadCommand('zest:generate'),
87
87
  loadCommand('event:generate:job'),
88
+ loadCommand('zest:generate'),
88
89
  loadCommand('serve'),
89
90
  loadCommand('deploy'),
90
- loadCommand('help'),
91
91
  loadCommand('run'),
92
92
  loadCommand('config:set'),
93
93
  loadCommand('config:get'),
@@ -41,7 +41,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
41
41
  const constants_1 = require("../../util_modules/constants");
42
42
  const logger_1 = require("../../util_modules/logger");
43
43
  exports.default = new command_1.default('slate:create')
44
- .description('Configure a new slate service in catalyst')
44
+ .description('Configure a new slate app in catalyst')
45
45
  .option('--name <app_name>', 'Please provide name for your slate')
46
46
  .option('--framework <framework_name>', 'Specify framework name for your slate')
47
47
  .option('--template <template_url>', 'Provide template url for your slate')
package/lib/index.js CHANGED
@@ -23,6 +23,6 @@ program.helpOption('-h, --help', 'Display help for a Catalyst command');
23
23
  program.showSuggestionAfterError();
24
24
  program.showHelpAfterError(`For more usage information use the ${(0, ansi_colors_1.bold)('catalyst help')} command`);
25
25
  program.addHelpText('before', fs_1.SYNC.readFile(constants_1.TEMPLATE.banner, 'utf-8') || '');
26
- program.addHelpText('afterAll', `\nFor detailed documentations please visit ${(0, ansi_colors_1.underline)('https://www.zoho.com/catalyst/help/cli-command-reference.html')}`);
26
+ program.addHelpText('afterAll', `\nFor detailed documentations please visit ${(0, ansi_colors_1.underline)('https://docs.catalyst.zoho.com/en/cli/v1/cli-command-reference/')}`);
27
27
  const cli = new client_1.Client(program);
28
28
  exports.default = cli;
@@ -7,86 +7,55 @@ const env_js_1 = require("../../env.js");
7
7
  const dc_js_1 = require("../../../dc.js");
8
8
  const dc_type_js_1 = __importDefault(require("./dc-type.js"));
9
9
  class URL {
10
+ static get zohoCDN() {
11
+ return (0, env_js_1.envOverride)('ZOHO_CDN', mapDataCenterUrl(URL._zohoCDNBase));
12
+ }
10
13
  static get auth() {
11
- const dc = (0, dc_js_1.getActiveDCType)();
12
- if (dc === undefined) {
13
- return URL._auth;
14
- }
15
- if (dc.value === dc_type_js_1.default.ca.value) {
16
- return URL._auth.replace('.zoho.com', '.zohocloud.ca');
17
- }
18
- return URL._auth.replace('.com', dc.ext);
14
+ return (0, env_js_1.envOverride)('CATALYST_AUTH_URL', mapDataCenterUrl(URL._authBase));
19
15
  }
20
16
  static get iamPortal() {
21
- const dc = (0, dc_js_1.getActiveDCType)();
22
- if (dc === undefined) {
23
- return URL._portal;
24
- }
25
- return URL._portal.replace('.com', dc.ext);
17
+ return (0, env_js_1.envOverride)('CATALYST_PORTAL_DOMAIN', mapDataCenterUrl(URL._portalBase));
26
18
  }
27
19
  static get admin() {
28
- const dc = (0, dc_js_1.getActiveDCType)();
29
- if (dc === undefined) {
30
- return URL._admin;
31
- }
32
- if (dc.value === dc_type_js_1.default.ca.value) {
33
- return URL._admin.replace('.zoho.com', '.zohocloud.ca');
34
- }
35
- return URL._admin.replace('.com', dc.ext);
20
+ return (0, env_js_1.envOverride)('CATALYST_ADMIN_URL', mapDataCenterUrl(URL._adminBase));
36
21
  }
37
22
  static get app() {
38
- const dc = (0, dc_js_1.getActiveDCType)();
39
- if (dc === undefined) {
40
- return URL._app;
41
- }
42
- return URL._app.replace('.com', dc.ext);
23
+ return (0, env_js_1.envOverride)('CATALYST_APP_URL', mapDataCenterUrl(URL._appBase));
43
24
  }
44
25
  static get appSailDomain() {
45
- const dc = (0, dc_js_1.getActiveDCType)();
46
- if (dc === undefined) {
47
- return URL._appSailDomain;
48
- }
49
- return URL._appSailDomain.replace('.com', dc.ext);
26
+ return (0, env_js_1.envOverride)('CATALYST_APPSAIL_URL', mapDataCenterUrl(URL._appSailDomainBase));
50
27
  }
51
28
  static get catalystStatic() {
52
- const dc = (0, dc_js_1.getActiveDCType)();
53
- if (dc === undefined) {
54
- return URL._zohoStatic;
55
- }
56
- if (dc.value === dc_type_js_1.default.ca.value) {
57
- return URL._zohoStatic.replace('.zoho.com', '.zohocloud.ca');
58
- }
59
- return URL._zohoStatic.replace(dc_type_js_1.default.us.ext, dc.ext);
29
+ return (0, env_js_1.envOverride)('ZOHO_STATIC', mapDataCenterUrl(URL._zohoStaticBase));
60
30
  }
61
31
  static get console() {
62
- const dc = (0, dc_js_1.getActiveDCType)();
63
- if (dc === undefined) {
64
- return URL._console;
65
- }
66
- if (dc.value === dc_type_js_1.default.ca.value) {
67
- return URL._console.replace('.zoho.com', '.zohocloud.ca');
68
- }
69
- return URL._console.replace('.com', dc.ext);
32
+ return (0, env_js_1.envOverride)('CATALYST_CONSOLE_URL', mapDataCenterUrl(URL._consoleBase));
70
33
  }
71
34
  static get stratusSuffix() {
72
- const dc = (0, dc_js_1.getActiveDCType)();
73
- if (dc === undefined) {
74
- return URL._stratusSuffix;
75
- }
76
- return URL._stratusSuffix.replace('.com', dc.ext);
35
+ return (0, env_js_1.envOverride)('CATALYST_STRATUS_RESOURCE_SUFFIX', mapDataCenterUrl(URL._stratusSuffixBase));
77
36
  }
78
37
  }
79
38
  exports.default = URL;
80
- URL._auth = (0, env_js_1.envOverride)('CATALYST_AUTH_URL', 'https://accounts.zoho.com');
81
- URL._portal = (0, env_js_1.envOverride)('CATALYST_PORTAL_DOMAIN', 'https://accounts.zohoportal.com');
82
- URL._admin = (0, env_js_1.envOverride)('CATALYST_ADMIN_URL', 'https://api.catalyst.zoho.com');
83
- URL._app = (0, env_js_1.envOverride)('CATALYST_APP_URL', 'https://catalystserverless.com');
84
- URL._appSailDomain = (0, env_js_1.envOverride)('CATALYST_APPSAIL_URL', 'https://catalystappsail.com');
85
- URL._zohoStatic = (0, env_js_1.envOverride)('ZOHO_STATIC', 'https://www.zoho.com/catalyst');
86
- URL._console = (0, env_js_1.envOverride)('CATALYST_CONSOLE_URL', 'https://console.catalyst.zoho.com');
87
- URL._stratusSuffix = (0, env_js_1.envOverride)('CATALYST_STRATUS_RESOURCE_SUFFIX', '.zohostratus.com');
88
- URL.zohoCDN = (0, env_js_1.envOverride)('ZOHO_CDN', 'https://static.zohocdn.com');
39
+ URL._authBase = 'https://accounts.zoho.com';
40
+ URL._portalBase = 'https://accounts.zohoportal.com';
41
+ URL._adminBase = 'https://api.catalyst.zoho.com';
42
+ URL._appBase = 'https://catalystserverless.com';
43
+ URL._appSailDomainBase = 'https://catalystappsail.com';
44
+ URL._zohoStaticBase = 'https://www.zoho.com/catalyst';
45
+ URL._consoleBase = 'https://console.catalyst.zoho.com';
46
+ URL._stratusSuffixBase = '.zohostratus.com';
47
+ URL._zohoCDNBase = 'https://static.zohocdn.com';
89
48
  URL.external = Object.freeze({
90
49
  gitHubAPI: 'https://api.github.com',
91
50
  gitHubWeb: 'https://github.com'
92
51
  });
52
+ function mapDataCenterUrl(url) {
53
+ const dc = (0, dc_js_1.getActiveDCType)();
54
+ if (dc === undefined) {
55
+ return url;
56
+ }
57
+ if (dc.value === dc_type_js_1.default.ca.value && url.includes('.zoho.com')) {
58
+ return url.replace('.zoho.com', '.zohocloud.ca');
59
+ }
60
+ return url.replace(dc_type_js_1.default.us.ext, dc.ext);
61
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.18.0-beta.12",
3
+ "version": "1.18.0-beta.13",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "functions",
22
22
  "zcatalyst"
23
23
  ],
24
- "author": "Catalyst (https://catalyst.zoho.com)",
24
+ "author": "Catalyst (https://github.com/catalystbyzoho)",
25
25
  "homepage": "https://catalyst.zoho.com",
26
26
  "license": "MIT",
27
27
  "dependencies": {