@contentstack/cli 1.52.0 → 1.53.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.52.0 linux-x64 node-v22.21.1
21
+ @contentstack/cli/1.53.1 linux-x64 node-v22.21.1
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -2201,7 +2201,7 @@ FLAGS
2201
2201
  -m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
2202
2202
  the modules to the stack. The available modules are assets, content-types, entries,
2203
2203
  environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2204
- workflows, custom-roles, and taxonomies.
2204
+ workflows, custom-roles, taxonomies, and studio.
2205
2205
  -t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
2206
2206
  of multiple content types, specify the IDs separated by spaces.
2207
2207
  -y, --yes [optional] Force override all Marketplace prompts.
@@ -2372,39 +2372,68 @@ USAGE
2372
2372
  [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]
2373
2373
 
2374
2374
  FLAGS
2375
- -B, --branch=<value> The name of the branch where you want to import your content. If you don't
2376
- mention the branch name, then by default the content will be imported to the
2377
- main branch.
2378
- -a, --alias=<value> The management token of the destination stack where you will import the
2379
- content.
2380
- -b, --backup-dir=<value> [optional] Backup directory name when using specific module.
2381
- -c, --config=<value> [optional] The path of the configuration JSON file containing all the options
2382
- for a single run.
2383
- -d, --data-dir=<value> The path or the location in your file system where the content, you intend to
2384
- import, is stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the
2385
- export folder has branches involved, then the path should point till the
2386
- particular branch. For example, “-d
2387
- "C:\Users\Name\Desktop\cli\content\branch_name"
2388
- -k, --stack-api-key=<value> API Key of the target stack
2389
- -m, --module=<value> [optional] Specify the module to import into the target stack. If not
2390
- specified, the import command will import all the modules into the stack. The
2391
- available modules are assets, content-types, entries, environments,
2392
- extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2393
- workflows, custom-roles, personalize projects, and taxonomies.
2394
- -y, --yes [optional] Force override all Marketplace prompts.
2395
- --branch-alias=<value> Specify the branch alias where you want to import your content. If not
2396
- specified, the content is imported into the main branch by default.
2397
- --exclude-global-modules Excludes the branch-independent module from the import operation.
2398
- --import-webhook-status=<option> [default: disable] [default: disable] (optional) This webhook state keeps the
2399
- same state of webhooks as the source stack. <options: disable|current>
2400
- <options: disable|current>
2401
- --personalize-project-name=<value> (optional) Provide a unique name for the Personalize project.
2402
- --replace-existing Replaces the existing module in the target stack.
2403
- --skip-app-recreation (optional) Skips the recreation of private apps if they already exist.
2404
- --skip-assets-publish Skips asset publishing during the import process.
2405
- --skip-audit Skips the audit fix that occurs during an import operation.
2406
- --skip-entries-publish Skips entry publishing during the import process
2407
- --skip-existing Skips the module exists warning messages.
2375
+ -B, --branch=<value>
2376
+ The name of the branch where you want to import your content. If you don't mention the branch name, then by default
2377
+ the content will be imported to the main branch.
2378
+
2379
+ -a, --alias=<value>
2380
+ The management token of the destination stack where you will import the content.
2381
+
2382
+ -b, --backup-dir=<value>
2383
+ [optional] Backup directory name when using specific module.
2384
+
2385
+ -c, --config=<value>
2386
+ [optional] The path of the configuration JSON file containing all the options for a single run.
2387
+
2388
+ -d, --data-dir=<value>
2389
+ The path or the location in your file system where the content, you intend to import, is stored. For example, -d
2390
+ "C:\Users\Name\Desktop\cli\content". If the export folder has branches involved, then the path should point till the
2391
+ particular branch. For example, “-d "C:\Users\Name\Desktop\cli\content\branch_name"
2392
+
2393
+ -k, --stack-api-key=<value>
2394
+ API Key of the target stack
2395
+
2396
+ -m, --module=<value>
2397
+ [optional] Specify the module to import into the target stack. If not specified, the import command will import all
2398
+ the modules into the stack. The available modules are assets, content-types, entries, environments, extensions,
2399
+ marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, personalize projects,
2400
+ taxonomies, and composable-studio.
2401
+
2402
+ -y, --yes
2403
+ [optional] Force override all Marketplace prompts.
2404
+
2405
+ --branch-alias=<value>
2406
+ Specify the branch alias where you want to import your content. If not specified, the content is imported into the
2407
+ main branch by default.
2408
+
2409
+ --exclude-global-modules
2410
+ Excludes the branch-independent module from the import operation.
2411
+
2412
+ --import-webhook-status=<option>
2413
+ [default: disable] [default: disable] (optional) This webhook state keeps the same state of webhooks as the source
2414
+ stack. <options: disable|current>
2415
+ <options: disable|current>
2416
+
2417
+ --personalize-project-name=<value>
2418
+ (optional) Provide a unique name for the Personalize project.
2419
+
2420
+ --replace-existing
2421
+ Replaces the existing module in the target stack.
2422
+
2423
+ --skip-app-recreation
2424
+ (optional) Skips the recreation of private apps if they already exist.
2425
+
2426
+ --skip-assets-publish
2427
+ Skips asset publishing during the import process.
2428
+
2429
+ --skip-audit
2430
+ Skips the audit fix that occurs during an import operation.
2431
+
2432
+ --skip-entries-publish
2433
+ Skips entry publishing during the import process
2434
+
2435
+ --skip-existing
2436
+ Skips the module exists warning messages.
2408
2437
 
2409
2438
  DESCRIPTION
2410
2439
  Import content from a stack
@@ -2851,7 +2880,7 @@ FLAGS
2851
2880
  -m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
2852
2881
  the modules to the stack. The available modules are assets, content-types, entries,
2853
2882
  environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2854
- workflows, custom-roles, and taxonomies.
2883
+ workflows, custom-roles, taxonomies, and studio.
2855
2884
  -t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
2856
2885
  of multiple content types, specify the IDs separated by spaces.
2857
2886
  -y, --yes [optional] Force override all Marketplace prompts.
@@ -2892,39 +2921,68 @@ USAGE
2892
2921
  <value>] [--branch <value>] [--import-webhook-status disable|current]
2893
2922
 
2894
2923
  FLAGS
2895
- -B, --branch=<value> The name of the branch where you want to import your content. If you don't
2896
- mention the branch name, then by default the content will be imported to the
2897
- main branch.
2898
- -a, --alias=<value> The management token of the destination stack where you will import the
2899
- content.
2900
- -b, --backup-dir=<value> [optional] Backup directory name when using specific module.
2901
- -c, --config=<value> [optional] The path of the configuration JSON file containing all the options
2902
- for a single run.
2903
- -d, --data-dir=<value> The path or the location in your file system where the content, you intend to
2904
- import, is stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the
2905
- export folder has branches involved, then the path should point till the
2906
- particular branch. For example, “-d
2907
- "C:\Users\Name\Desktop\cli\content\branch_name"
2908
- -k, --stack-api-key=<value> API Key of the target stack
2909
- -m, --module=<value> [optional] Specify the module to import into the target stack. If not
2910
- specified, the import command will import all the modules into the stack. The
2911
- available modules are assets, content-types, entries, environments,
2912
- extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2913
- workflows, custom-roles, personalize projects, and taxonomies.
2914
- -y, --yes [optional] Force override all Marketplace prompts.
2915
- --branch-alias=<value> Specify the branch alias where you want to import your content. If not
2916
- specified, the content is imported into the main branch by default.
2917
- --exclude-global-modules Excludes the branch-independent module from the import operation.
2918
- --import-webhook-status=<option> [default: disable] [default: disable] (optional) This webhook state keeps the
2919
- same state of webhooks as the source stack. <options: disable|current>
2920
- <options: disable|current>
2921
- --personalize-project-name=<value> (optional) Provide a unique name for the Personalize project.
2922
- --replace-existing Replaces the existing module in the target stack.
2923
- --skip-app-recreation (optional) Skips the recreation of private apps if they already exist.
2924
- --skip-assets-publish Skips asset publishing during the import process.
2925
- --skip-audit Skips the audit fix that occurs during an import operation.
2926
- --skip-entries-publish Skips entry publishing during the import process
2927
- --skip-existing Skips the module exists warning messages.
2924
+ -B, --branch=<value>
2925
+ The name of the branch where you want to import your content. If you don't mention the branch name, then by default
2926
+ the content will be imported to the main branch.
2927
+
2928
+ -a, --alias=<value>
2929
+ The management token of the destination stack where you will import the content.
2930
+
2931
+ -b, --backup-dir=<value>
2932
+ [optional] Backup directory name when using specific module.
2933
+
2934
+ -c, --config=<value>
2935
+ [optional] The path of the configuration JSON file containing all the options for a single run.
2936
+
2937
+ -d, --data-dir=<value>
2938
+ The path or the location in your file system where the content, you intend to import, is stored. For example, -d
2939
+ "C:\Users\Name\Desktop\cli\content". If the export folder has branches involved, then the path should point till the
2940
+ particular branch. For example, “-d "C:\Users\Name\Desktop\cli\content\branch_name"
2941
+
2942
+ -k, --stack-api-key=<value>
2943
+ API Key of the target stack
2944
+
2945
+ -m, --module=<value>
2946
+ [optional] Specify the module to import into the target stack. If not specified, the import command will import all
2947
+ the modules into the stack. The available modules are assets, content-types, entries, environments, extensions,
2948
+ marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, personalize projects,
2949
+ taxonomies, and composable-studio.
2950
+
2951
+ -y, --yes
2952
+ [optional] Force override all Marketplace prompts.
2953
+
2954
+ --branch-alias=<value>
2955
+ Specify the branch alias where you want to import your content. If not specified, the content is imported into the
2956
+ main branch by default.
2957
+
2958
+ --exclude-global-modules
2959
+ Excludes the branch-independent module from the import operation.
2960
+
2961
+ --import-webhook-status=<option>
2962
+ [default: disable] [default: disable] (optional) This webhook state keeps the same state of webhooks as the source
2963
+ stack. <options: disable|current>
2964
+ <options: disable|current>
2965
+
2966
+ --personalize-project-name=<value>
2967
+ (optional) Provide a unique name for the Personalize project.
2968
+
2969
+ --replace-existing
2970
+ Replaces the existing module in the target stack.
2971
+
2972
+ --skip-app-recreation
2973
+ (optional) Skips the recreation of private apps if they already exist.
2974
+
2975
+ --skip-assets-publish
2976
+ Skips asset publishing during the import process.
2977
+
2978
+ --skip-audit
2979
+ Skips the audit fix that occurs during an import operation.
2980
+
2981
+ --skip-entries-publish
2982
+ Skips entry publishing during the import process
2983
+
2984
+ --skip-existing
2985
+ Skips the module exists warning messages.
2928
2986
 
2929
2987
  DESCRIPTION
2930
2988
  Import content from a stack
@@ -3670,7 +3728,7 @@ Set region for CLI
3670
3728
  ```
3671
3729
  USAGE
3672
3730
  $ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>] [--developer-hub <value>]
3673
- [--personalize <value>] [--launch <value>]
3731
+ [--personalize <value>] [--launch <value>] [--studio <value>]
3674
3732
 
3675
3733
  ARGUMENTS
3676
3734
  [REGION] Name for the region
@@ -3684,6 +3742,7 @@ FLAGS
3684
3742
  --developer-hub=<value> Custom host to set for Developer hub API
3685
3743
  --launch=<value> Custom host to set for Launch API
3686
3744
  --personalize=<value> Custom host to set for Personalize API
3745
+ --studio=<value> Custom host to set for Studio API
3687
3746
  --ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are
3688
3747
  required
3689
3748
 
@@ -3715,7 +3774,9 @@ EXAMPLES
3715
3774
 
3716
3775
  $ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --launch <custom_launch_url>
3717
3776
 
3718
- $ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name "India" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url>
3777
+ $ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --studio <custom_studio_url>
3778
+
3779
+ $ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name "India" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url> --studio <custom_studio_url>
3719
3780
  ```
3720
3781
 
3721
3782
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/region.ts)_
@@ -3738,7 +3799,7 @@ DESCRIPTION
3738
3799
  Display help for csdx.
3739
3800
  ```
3740
3801
 
3741
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.35/src/commands/help.ts)_
3802
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
3742
3803
 
3743
3804
  ## `csdx launch`
3744
3805
 
@@ -4055,7 +4116,7 @@ EXAMPLES
4055
4116
  $ csdx plugins
4056
4117
  ```
4057
4118
 
4058
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/index.ts)_
4119
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/index.ts)_
4059
4120
 
4060
4121
  ## `csdx plugins:add PLUGIN`
4061
4122
 
@@ -4129,7 +4190,7 @@ EXAMPLES
4129
4190
  $ csdx plugins:inspect myplugin
4130
4191
  ```
4131
4192
 
4132
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/inspect.ts)_
4193
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/inspect.ts)_
4133
4194
 
4134
4195
  ## `csdx plugins:install PLUGIN`
4135
4196
 
@@ -4178,7 +4239,7 @@ EXAMPLES
4178
4239
  $ csdx plugins:install someuser/someplugin
4179
4240
  ```
4180
4241
 
4181
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/install.ts)_
4242
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/install.ts)_
4182
4243
 
4183
4244
  ## `csdx plugins:link PATH`
4184
4245
 
@@ -4209,7 +4270,7 @@ EXAMPLES
4209
4270
  $ csdx plugins:link myplugin
4210
4271
  ```
4211
4272
 
4212
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/link.ts)_
4273
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/link.ts)_
4213
4274
 
4214
4275
  ## `csdx plugins:remove [PLUGIN]`
4215
4276
 
@@ -4250,7 +4311,7 @@ FLAGS
4250
4311
  --reinstall Reinstall all plugins after uninstalling.
4251
4312
  ```
4252
4313
 
4253
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/reset.ts)_
4314
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/reset.ts)_
4254
4315
 
4255
4316
  ## `csdx plugins:uninstall [PLUGIN]`
4256
4317
 
@@ -4278,7 +4339,7 @@ EXAMPLES
4278
4339
  $ csdx plugins:uninstall myplugin
4279
4340
  ```
4280
4341
 
4281
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/uninstall.ts)_
4342
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/uninstall.ts)_
4282
4343
 
4283
4344
  ## `csdx plugins:unlink [PLUGIN]`
4284
4345
 
@@ -4322,7 +4383,7 @@ DESCRIPTION
4322
4383
  Update installed plugins.
4323
4384
  ```
4324
4385
 
4325
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/update.ts)_
4386
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
4326
4387
 
4327
4388
  ## `csdx tokens`
4328
4389
 
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const utils_1 = require("../../utils");
4
+ const cli_utilities_1 = require("@contentstack/cli-utilities");
4
5
  /**
5
6
  * Set the cli context
6
7
  */
7
8
  function default_1(opts) {
9
+ // Store command ID for session-based log organization
10
+ if (opts.id) {
11
+ cli_utilities_1.configHandler.set('currentCommandId', opts.id);
12
+ }
8
13
  this.config.context = new utils_1.CsdxContext(opts, this.config);
9
14
  }
10
15
  exports.default = default_1;
@@ -12,28 +12,28 @@ async function default_1(opts) {
12
12
  this.exit();
13
13
  return;
14
14
  }
15
- cli_utilities_1.cliux.print(`\n Currently using ${region.name} region \n`, { color: 'grey' });
15
+ cli_utilities_1.cliux.print(`Currently using region: ${region.name}`, { color: 'grey' });
16
16
  }
17
17
  // Auth guard
18
18
  if (protectedCommands[opts.Command.id]) {
19
19
  if (!(0, cli_utilities_1.isAuthenticated)()) {
20
- newLogger.error('No auth token found for command', opts.Command.id);
21
- cli_utilities_1.cliux.error('Please login to execute the command');
20
+ newLogger.error('No auth token found for command.', opts.Command.id);
21
+ cli_utilities_1.cliux.error('Please log in to execute the command');
22
22
  this.exit();
23
23
  }
24
24
  const client = await (0, cli_utilities_1.managementSDKClient)({ host: region.cma });
25
25
  try {
26
26
  const result = await client.getUser();
27
27
  if (!result) {
28
- newLogger.error('error in auth validation');
29
- cli_utilities_1.cliux.error('Please login to execute the command');
28
+ newLogger.error('Error in auth validation');
29
+ cli_utilities_1.cliux.error('Please log in to execute the command');
30
30
  this.exit();
31
31
  }
32
- newLogger.debug('logged in user', result.data);
32
+ newLogger.debug('Logged-in user', result.data);
33
33
  }
34
34
  catch (error) {
35
- newLogger.error('error in auth validation', error);
36
- cli_utilities_1.cliux.error('Please login to execute the command');
35
+ newLogger.error('Error in auth validation', error);
36
+ cli_utilities_1.cliux.error('Please log in to execute the command');
37
37
  process.exit();
38
38
  }
39
39
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "commands": {},
3
- "version": "1.52.0"
3
+ "version": "1.53.1"
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.52.0",
4
+ "version": "1.53.1",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run.js"
@@ -22,24 +22,24 @@
22
22
  "prepack": "pnpm compile && oclif manifest && oclif readme"
23
23
  },
24
24
  "dependencies": {
25
- "@contentstack/cli-audit": "~1.16.0",
26
- "@contentstack/cli-auth": "~1.6.1",
27
- "@contentstack/cli-cm-bootstrap": "~1.17.0",
28
- "@contentstack/cli-cm-branches": "~1.6.0",
29
- "@contentstack/cli-cm-bulk-publish": "~1.10.2",
30
- "@contentstack/cli-cm-clone": "~1.17.0",
31
- "@contentstack/cli-cm-export": "~1.21.0",
32
- "@contentstack/cli-cm-export-to-csv": "~1.10.0",
33
- "@contentstack/cli-cm-import": "~1.29.0",
34
- "@contentstack/cli-cm-import-setup": "~1.7.0",
35
- "@contentstack/cli-cm-migrate-rte": "~1.6.1",
36
- "@contentstack/cli-cm-seed": "~1.13.0",
37
- "@contentstack/cli-command": "~1.6.1",
38
- "@contentstack/cli-config": "~1.15.2",
25
+ "@contentstack/cli-audit": "~1.16.1",
26
+ "@contentstack/cli-cm-export": "~1.22.1",
27
+ "@contentstack/cli-cm-import": "~1.30.1",
28
+ "@contentstack/cli-auth": "~1.6.2",
29
+ "@contentstack/cli-cm-bootstrap": "~1.17.1",
30
+ "@contentstack/cli-cm-branches": "~1.6.1",
31
+ "@contentstack/cli-cm-bulk-publish": "~1.10.3",
32
+ "@contentstack/cli-cm-clone": "~1.18.0",
33
+ "@contentstack/cli-cm-export-to-csv": "~1.10.1",
34
+ "@contentstack/cli-cm-import-setup": "~1.7.1",
35
+ "@contentstack/cli-cm-migrate-rte": "~1.6.2",
36
+ "@contentstack/cli-cm-seed": "~1.13.1",
37
+ "@contentstack/cli-command": "~1.7.0",
38
+ "@contentstack/cli-config": "~1.16.1",
39
39
  "@contentstack/cli-launch": "^1.9.2",
40
- "@contentstack/cli-migration": "~1.10.0",
41
- "@contentstack/cli-utilities": "~1.14.4",
42
- "@contentstack/cli-variants": "~1.3.4",
40
+ "@contentstack/cli-migration": "~1.10.1",
41
+ "@contentstack/cli-utilities": "~1.15.0",
42
+ "@contentstack/cli-variants": "~1.3.5",
43
43
  "@contentstack/management": "~1.22.0",
44
44
  "@oclif/core": "^4.3.0",
45
45
  "@oclif/plugin-help": "^6.2.28",