@contentstack/cli 1.5.0 → 1.5.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
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (--version|-v)
21
- @contentstack/cli/1.5.0 linux-x64 node-v16.20.0
21
+ @contentstack/cli/1.5.1 linux-x64 node-v16.20.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -97,11 +97,12 @@ User sessions login
97
97
 
98
98
  ```
99
99
  USAGE
100
- $ csdx auth:login [-u <value>] [-p <value>]
100
+ $ csdx auth:login [-u <value> | --oauth] [-p <value> | ]
101
101
 
102
102
  FLAGS
103
103
  -p, --password=<value> Password
104
104
  -u, --username=<value> User name
105
+ --oauth Enables single sign-on (SSO) in Contentstack CLI
105
106
 
106
107
  DESCRIPTION
107
108
  User sessions login
@@ -2360,17 +2361,18 @@ Set region for CLI
2360
2361
 
2361
2362
  ```
2362
2363
  USAGE
2363
- $ csdx config:set:region [REGION] [-d <value> -m <value> -n <value>]
2364
+ $ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>]
2364
2365
 
2365
2366
  ARGUMENTS
2366
2367
  REGION Name for the region
2367
2368
 
2368
2369
  FLAGS
2369
- -d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma and name flags are
2370
- required
2371
- -m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda and name flags are
2372
- required
2373
- -n, --name=<value> Name for the region, if this flag is added then cda and cma flags are required
2370
+ -d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and name
2371
+ flags are required
2372
+ -m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host and name
2373
+ flags are required
2374
+ -n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
2375
+ --ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are required
2374
2376
 
2375
2377
  DESCRIPTION
2376
2378
  Set region for CLI
@@ -2380,9 +2382,9 @@ EXAMPLES
2380
2382
 
2381
2383
  $ csdx config:set:region NA
2382
2384
 
2383
- $ csdx config:set:region NA
2385
+ $ csdx config:set:region EU
2384
2386
 
2385
- $ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name "India"
2387
+ $ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India"
2386
2388
  ```
2387
2389
 
2388
2390
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/region.ts)_
@@ -2405,7 +2407,7 @@ DESCRIPTION
2405
2407
  Display help for csdx.
2406
2408
  ```
2407
2409
 
2408
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.8/src/commands/help.ts)_
2410
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.9/src/commands/help.ts)_
2409
2411
 
2410
2412
  ## `csdx login`
2411
2413
 
@@ -2413,11 +2415,12 @@ User sessions login
2413
2415
 
2414
2416
  ```
2415
2417
  USAGE
2416
- $ csdx login [-u <value>] [-p <value>]
2418
+ $ csdx login [-u <value> | --oauth] [-p <value> | ]
2417
2419
 
2418
2420
  FLAGS
2419
2421
  -p, --password=<value> Password
2420
2422
  -u, --username=<value> User name
2423
+ --oauth Enables single sign-on (SSO) in Contentstack CLI
2421
2424
 
2422
2425
  DESCRIPTION
2423
2426
  User sessions login
@@ -2480,7 +2483,7 @@ EXAMPLES
2480
2483
  $ csdx plugins
2481
2484
  ```
2482
2485
 
2483
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/index.ts)_
2486
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/index.ts)_
2484
2487
 
2485
2488
  ## `csdx plugins:install PLUGIN...`
2486
2489
 
@@ -2545,7 +2548,7 @@ EXAMPLES
2545
2548
  $ csdx plugins:inspect myplugin
2546
2549
  ```
2547
2550
 
2548
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/inspect.ts)_
2551
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/inspect.ts)_
2549
2552
 
2550
2553
  ## `csdx plugins:install PLUGIN...`
2551
2554
 
@@ -2585,7 +2588,7 @@ EXAMPLES
2585
2588
  $ csdx plugins:install someuser/someplugin
2586
2589
  ```
2587
2590
 
2588
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/install.ts)_
2591
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/install.ts)_
2589
2592
 
2590
2593
  ## `csdx plugins:link PLUGIN`
2591
2594
 
@@ -2614,7 +2617,7 @@ EXAMPLES
2614
2617
  $ csdx plugins:link myplugin
2615
2618
  ```
2616
2619
 
2617
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/link.ts)_
2620
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/link.ts)_
2618
2621
 
2619
2622
  ## `csdx plugins:uninstall PLUGIN...`
2620
2623
 
@@ -2662,7 +2665,7 @@ ALIASES
2662
2665
  $ csdx plugins:remove
2663
2666
  ```
2664
2667
 
2665
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/uninstall.ts)_
2668
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/uninstall.ts)_
2666
2669
 
2667
2670
  ## `csdx plugins:uninstall PLUGIN...`
2668
2671
 
@@ -2703,7 +2706,7 @@ DESCRIPTION
2703
2706
  Update installed plugins.
2704
2707
  ```
2705
2708
 
2706
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.3/src/commands/plugins/update.ts)_
2709
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.4.7/src/commands/plugins/update.ts)_
2707
2710
 
2708
2711
  ## `csdx tokens`
2709
2712
 
package/bin/dev CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
-
2
+ require('dotenv').config({ path: './.env' });
3
3
  (async () => {
4
- const oclif = require('@oclif/core')
5
- await oclif.execute({type: 'cjs', development: true, dir: __dirname})
6
- })()
4
+ const oclif = require('@oclif/core');
5
+ await oclif.execute({ type: 'cjs', development: true, dir: __dirname });
6
+ })();
package/bin/run CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
-
3
2
  (async () => {
4
- const oclif = require('@oclif/core')
5
- await oclif.execute({type: 'cjs', dir: __dirname})
6
- })()
3
+ const oclif = require('@oclif/core');
4
+ await oclif.execute({ type: 'cjs', dir: __dirname });
5
+ })();
package/lib/help.js CHANGED
@@ -35,5 +35,24 @@ class MyHelpClass extends core_1.Help {
35
35
  }
36
36
  super.showCommandHelp(command);
37
37
  }
38
+ formatCommands(commands) {
39
+ if (commands.length === 0)
40
+ return '';
41
+ const body = this.renderList(commands
42
+ // if aliases do not contain the current command's id it is the main command
43
+ .filter(c => !c.aliases.some(a => a === c.id))
44
+ .map(c => {
45
+ if (this.config.topicSeparator !== ':')
46
+ c.id = c.id.replace(/:/g, this.config.topicSeparator);
47
+ // Add aliases at the end of summary
48
+ const summary = c.aliases.length > 0 ? `${this.summary(c)} (ALIASES: ${c.aliases.join(', ')})` : this.summary(c);
49
+ return [c.id, summary];
50
+ }), {
51
+ spacer: '\n',
52
+ stripAnsi: this.opts.stripAnsi,
53
+ indentation: 2
54
+ });
55
+ return this.section('COMMANDS', body);
56
+ }
38
57
  }
39
58
  exports.default = MyHelpClass;
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.5.0",
2
+ "version": "1.5.1",
3
3
  "commands": {}
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli",
3
3
  "description": "Command-line tool (CLI) to interact with Contentstack",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run"
@@ -21,19 +21,19 @@
21
21
  "prepack": "pnpm compile && oclif manifest && oclif readme"
22
22
  },
23
23
  "dependencies": {
24
- "@contentstack/cli-auth": "^1.3.0",
25
- "@contentstack/cli-cm-bootstrap": "^1.4.0",
26
- "@contentstack/cli-cm-bulk-publish": "^1.3.0",
27
- "@contentstack/cli-cm-clone": "^1.4.0",
28
- "@contentstack/cli-cm-export": "^1.5.0",
29
- "@contentstack/cli-cm-export-to-csv": "^1.3.0",
30
- "@contentstack/cli-cm-import": "^1.5.0",
31
- "@contentstack/cli-cm-migrate-rte": "^1.4.0",
32
- "@contentstack/cli-cm-seed": "^1.4.0",
33
- "@contentstack/cli-command": "^1.2.1",
34
- "@contentstack/cli-config": "^1.3.0",
35
- "@contentstack/cli-migration": "^1.3.0",
36
- "@contentstack/cli-utilities": "^1.3.0",
24
+ "@contentstack/cli-auth": "^1.3.1",
25
+ "@contentstack/cli-cm-bootstrap": "^1.4.1",
26
+ "@contentstack/cli-cm-bulk-publish": "^1.3.1",
27
+ "@contentstack/cli-cm-clone": "^1.4.1",
28
+ "@contentstack/cli-cm-export": "^1.5.1",
29
+ "@contentstack/cli-cm-export-to-csv": "^1.3.1",
30
+ "@contentstack/cli-cm-import": "^1.5.1",
31
+ "@contentstack/cli-cm-migrate-rte": "^1.4.1",
32
+ "@contentstack/cli-cm-seed": "^1.4.1",
33
+ "@contentstack/cli-command": "^1.2.2",
34
+ "@contentstack/cli-config": "^1.3.1",
35
+ "@contentstack/cli-migration": "^1.3.1",
36
+ "@contentstack/cli-utilities": "^1.3.1",
37
37
  "@contentstack/management": "^1.6.1",
38
38
  "@oclif/core": "^2.3.0",
39
39
  "@oclif/plugin-help": "^5",