@contentstack/cli 2.0.0-beta.2 → 2.0.0-beta.3
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 +167 -230
- package/lib/hooks/init/context-init.js +5 -0
- package/lib/hooks/prerun/auth-guard.js +8 -8
- package/oclif.manifest.json +1 -1
- package/package.json +11 -13
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/2.0.0-beta.
|
|
21
|
+
@contentstack/cli/2.0.0-beta.3 linux-x64 node-v22.21.1
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -57,7 +57,6 @@ USAGE
|
|
|
57
57
|
* [`csdx cm:bulk-publish:revert`](#csdx-cmbulk-publishrevert)
|
|
58
58
|
* [`csdx csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>] [--only-assets] [--only-entries]`](#csdx-csdx-cmstacksunpublish--a-value--e-value--c-value--y---locale-value---branch-value---retry-failed-value---bulk-unpublish-value---content-type-value---delivery-token-value---only-assets---only-entries)
|
|
59
59
|
* [`csdx cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`](#csdx-cmentriespublish-only-unpublished--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value)
|
|
60
|
-
* [`csdx cm:entries:migrate-html-rte`](#csdx-cmentriesmigrate-html-rte)
|
|
61
60
|
* [`csdx cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token <value>] [--source-env <value>] [--entry-uid <value>] [--include-variants]`](#csdx-cmentriespublish--a-value---retry-failed-value---bulk-publish-value---publish-all-content-types---content-types-value---locales-value--e-value--c-value--y---branch-value---delivery-token-value---source-env-value---entry-uid-value---include-variants)
|
|
62
61
|
* [`csdx cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`](#csdx-cmentriespublish-modified--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value)
|
|
63
62
|
* [`csdx cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`](#csdx-cmentriespublish-non-localized-fields--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value--e-value--c-value--y---branch-value)
|
|
@@ -68,7 +67,6 @@ USAGE
|
|
|
68
67
|
* [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
|
|
69
68
|
* [`csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksimport--c-value--k-value--d-value--a-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent)
|
|
70
69
|
* [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue)
|
|
71
|
-
* [`csdx cm:migrate-rte`](#csdx-cmmigrate-rte)
|
|
72
70
|
* [`csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple)
|
|
73
71
|
* [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value)
|
|
74
72
|
* [`csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksclone---source-branch-value---target-branch-value---source-management-token-alias-value---destination-management-token-alias-value--n-value---type-ab---source-stack-api-key-value---destination-stack-api-key-value---import-webhook-status-disablecurrent)
|
|
@@ -1596,69 +1594,6 @@ EXAMPLES
|
|
|
1596
1594
|
$ csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] --stack-api-key [STACK API KEY] -source-env [SOURCE ENV]
|
|
1597
1595
|
```
|
|
1598
1596
|
|
|
1599
|
-
## `csdx cm:entries:migrate-html-rte`
|
|
1600
|
-
|
|
1601
|
-
Migration script to migrate content from HTML RTE to JSON RTE
|
|
1602
|
-
|
|
1603
|
-
```
|
|
1604
|
-
USAGE
|
|
1605
|
-
$ csdx cm:entries:migrate-html-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>]
|
|
1606
|
-
[--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale
|
|
1607
|
-
<value>] [--batch-limit <value>]
|
|
1608
|
-
|
|
1609
|
-
FLAGS
|
|
1610
|
-
-a, --alias=<value> Enter the alias name. You must use either the --alias flag or the --stack-api-key flag.
|
|
1611
|
-
-c, --config-path=<value> Specify the path where your config file is located.
|
|
1612
|
-
-y, --yes Avoids reconfirmation of your configuration.
|
|
1613
|
-
--batch-limit=<value> [default: 50] Provide batch limit for updating entries (default: 50).
|
|
1614
|
-
--branch=<value> The name of the branch to be used.
|
|
1615
|
-
--content-type=<value> Specify the UID of the content type for which you want to migrate HTML RTE content.
|
|
1616
|
-
--delay=<value> [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in
|
|
1617
|
-
subsequent entries of a content type. The default value is 1,000 milliseconds.
|
|
1618
|
-
--global-field Checks whether the specified UID belongs to a content type or a global field. This flag
|
|
1619
|
-
is set to false by default.
|
|
1620
|
-
--html-path=<value> Enter the path to the HTML RTE whose content you want to migrate.
|
|
1621
|
-
--json-path=<value> Enter the path to the JSON RTE to which you want to migrate the HTML RTE content.
|
|
1622
|
-
--locale=<value> The locale from which entries will be migrated.
|
|
1623
|
-
--stack-api-key=<value> API key of the source stack. You must use either the --stack-api-key flag or the --alias
|
|
1624
|
-
flag.
|
|
1625
|
-
|
|
1626
|
-
DESCRIPTION
|
|
1627
|
-
Migration script to migrate content from HTML RTE to JSON RTE
|
|
1628
|
-
|
|
1629
|
-
ALIASES
|
|
1630
|
-
$ csdx cm:migrate-rte
|
|
1631
|
-
|
|
1632
|
-
EXAMPLES
|
|
1633
|
-
General Usage
|
|
1634
|
-
|
|
1635
|
-
$ csdx cm:entries:migrate-html-rte --config-path path/to/config.json
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
Using Flags
|
|
1640
|
-
|
|
1641
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
Nested RTE
|
|
1646
|
-
|
|
1647
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path modular_block_uid.block_uid.html_rte_uid --json-path modular_block_uid.block_uid.json_rte_uid
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path group_uid.html_rte_uid --json-path group_uid.json_rte_uid
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
Global Field
|
|
1656
|
-
|
|
1657
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path
|
|
1658
|
-
```
|
|
1659
|
-
|
|
1660
|
-
_See code: [@contentstack/cli-cm-migrate-rte](https://github.com/contentstack/cli/blob/main/packages/contentstack-migrate-rte/src/commands/cm/entries/migrate-html-rte.js)_
|
|
1661
|
-
|
|
1662
1597
|
## `csdx cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token <value>] [--source-env <value>] [--entry-uid <value>] [--include-variants]`
|
|
1663
1598
|
|
|
1664
1599
|
Publish entries from multiple contenttypes to multiple environments and locales
|
|
@@ -2201,7 +2136,7 @@ FLAGS
|
|
|
2201
2136
|
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
|
|
2202
2137
|
the modules to the stack. The available modules are assets, content-types, entries,
|
|
2203
2138
|
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
2204
|
-
workflows, custom-roles, and
|
|
2139
|
+
workflows, custom-roles, taxonomies, and studio.
|
|
2205
2140
|
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
|
|
2206
2141
|
of multiple content types, specify the IDs separated by spaces.
|
|
2207
2142
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
@@ -2372,39 +2307,68 @@ USAGE
|
|
|
2372
2307
|
[--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]
|
|
2373
2308
|
|
|
2374
2309
|
FLAGS
|
|
2375
|
-
-B, --branch=<value>
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2310
|
+
-B, --branch=<value>
|
|
2311
|
+
The name of the branch where you want to import your content. If you don't mention the branch name, then by default
|
|
2312
|
+
the content will be imported to the main branch.
|
|
2313
|
+
|
|
2314
|
+
-a, --alias=<value>
|
|
2315
|
+
The management token of the destination stack where you will import the content.
|
|
2316
|
+
|
|
2317
|
+
-b, --backup-dir=<value>
|
|
2318
|
+
[optional] Backup directory name when using specific module.
|
|
2319
|
+
|
|
2320
|
+
-c, --config=<value>
|
|
2321
|
+
[optional] The path of the configuration JSON file containing all the options for a single run.
|
|
2322
|
+
|
|
2323
|
+
-d, --data-dir=<value>
|
|
2324
|
+
The path or the location in your file system where the content, you intend to import, is stored. For example, -d
|
|
2325
|
+
"C:\Users\Name\Desktop\cli\content". If the export folder has branches involved, then the path should point till the
|
|
2326
|
+
particular branch. For example, “-d "C:\Users\Name\Desktop\cli\content\branch_name"
|
|
2327
|
+
|
|
2328
|
+
-k, --stack-api-key=<value>
|
|
2329
|
+
API Key of the target stack
|
|
2330
|
+
|
|
2331
|
+
-m, --module=<value>
|
|
2332
|
+
[optional] Specify the module to import into the target stack. If not specified, the import command will import all
|
|
2333
|
+
the modules into the stack. The available modules are assets, content-types, entries, environments, extensions,
|
|
2334
|
+
marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, personalize projects,
|
|
2335
|
+
taxonomies, and composable-studio.
|
|
2336
|
+
|
|
2337
|
+
-y, --yes
|
|
2338
|
+
[optional] Force override all Marketplace prompts.
|
|
2339
|
+
|
|
2340
|
+
--branch-alias=<value>
|
|
2341
|
+
Specify the branch alias where you want to import your content. If not specified, the content is imported into the
|
|
2342
|
+
main branch by default.
|
|
2343
|
+
|
|
2344
|
+
--exclude-global-modules
|
|
2345
|
+
Excludes the branch-independent module from the import operation.
|
|
2346
|
+
|
|
2347
|
+
--import-webhook-status=<option>
|
|
2348
|
+
[default: disable] [default: disable] (optional) This webhook state keeps the same state of webhooks as the source
|
|
2349
|
+
stack. <options: disable|current>
|
|
2350
|
+
<options: disable|current>
|
|
2351
|
+
|
|
2352
|
+
--personalize-project-name=<value>
|
|
2353
|
+
(optional) Provide a unique name for the Personalize project.
|
|
2354
|
+
|
|
2355
|
+
--replace-existing
|
|
2356
|
+
Replaces the existing module in the target stack.
|
|
2357
|
+
|
|
2358
|
+
--skip-app-recreation
|
|
2359
|
+
(optional) Skips the recreation of private apps if they already exist.
|
|
2360
|
+
|
|
2361
|
+
--skip-assets-publish
|
|
2362
|
+
Skips asset publishing during the import process.
|
|
2363
|
+
|
|
2364
|
+
--skip-audit
|
|
2365
|
+
Skips the audit fix that occurs during an import operation.
|
|
2366
|
+
|
|
2367
|
+
--skip-entries-publish
|
|
2368
|
+
Skips entry publishing during the import process
|
|
2369
|
+
|
|
2370
|
+
--skip-existing
|
|
2371
|
+
Skips the module exists warning messages.
|
|
2408
2372
|
|
|
2409
2373
|
DESCRIPTION
|
|
2410
2374
|
Import content from a stack
|
|
@@ -2467,67 +2431,6 @@ EXAMPLES
|
|
|
2467
2431
|
$ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name> -b <branch_name>
|
|
2468
2432
|
```
|
|
2469
2433
|
|
|
2470
|
-
## `csdx cm:migrate-rte`
|
|
2471
|
-
|
|
2472
|
-
Migration script to migrate content from HTML RTE to JSON RTE
|
|
2473
|
-
|
|
2474
|
-
```
|
|
2475
|
-
USAGE
|
|
2476
|
-
$ csdx cm:migrate-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>]
|
|
2477
|
-
[--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale
|
|
2478
|
-
<value>] [--batch-limit <value>]
|
|
2479
|
-
|
|
2480
|
-
FLAGS
|
|
2481
|
-
-a, --alias=<value> Enter the alias name. You must use either the --alias flag or the --stack-api-key flag.
|
|
2482
|
-
-c, --config-path=<value> Specify the path where your config file is located.
|
|
2483
|
-
-y, --yes Avoids reconfirmation of your configuration.
|
|
2484
|
-
--batch-limit=<value> [default: 50] Provide batch limit for updating entries (default: 50).
|
|
2485
|
-
--branch=<value> The name of the branch to be used.
|
|
2486
|
-
--content-type=<value> Specify the UID of the content type for which you want to migrate HTML RTE content.
|
|
2487
|
-
--delay=<value> [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in
|
|
2488
|
-
subsequent entries of a content type. The default value is 1,000 milliseconds.
|
|
2489
|
-
--global-field Checks whether the specified UID belongs to a content type or a global field. This flag
|
|
2490
|
-
is set to false by default.
|
|
2491
|
-
--html-path=<value> Enter the path to the HTML RTE whose content you want to migrate.
|
|
2492
|
-
--json-path=<value> Enter the path to the JSON RTE to which you want to migrate the HTML RTE content.
|
|
2493
|
-
--locale=<value> The locale from which entries will be migrated.
|
|
2494
|
-
--stack-api-key=<value> API key of the source stack. You must use either the --stack-api-key flag or the --alias
|
|
2495
|
-
flag.
|
|
2496
|
-
|
|
2497
|
-
DESCRIPTION
|
|
2498
|
-
Migration script to migrate content from HTML RTE to JSON RTE
|
|
2499
|
-
|
|
2500
|
-
ALIASES
|
|
2501
|
-
$ csdx cm:migrate-rte
|
|
2502
|
-
|
|
2503
|
-
EXAMPLES
|
|
2504
|
-
General Usage
|
|
2505
|
-
|
|
2506
|
-
$ csdx cm:entries:migrate-html-rte --config-path path/to/config.json
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
Using Flags
|
|
2511
|
-
|
|
2512
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
Nested RTE
|
|
2517
|
-
|
|
2518
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path modular_block_uid.block_uid.html_rte_uid --json-path modular_block_uid.block_uid.json_rte_uid
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path group_uid.html_rte_uid --json-path group_uid.json_rte_uid
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
Global Field
|
|
2527
|
-
|
|
2528
|
-
$ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path
|
|
2529
|
-
```
|
|
2530
|
-
|
|
2531
2434
|
## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
|
|
2532
2435
|
|
|
2533
2436
|
Contentstack migration script.
|
|
@@ -2851,7 +2754,7 @@ FLAGS
|
|
|
2851
2754
|
-m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
|
|
2852
2755
|
the modules to the stack. The available modules are assets, content-types, entries,
|
|
2853
2756
|
environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
2854
|
-
workflows, custom-roles, and
|
|
2757
|
+
workflows, custom-roles, taxonomies, and studio.
|
|
2855
2758
|
-t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
|
|
2856
2759
|
of multiple content types, specify the IDs separated by spaces.
|
|
2857
2760
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
@@ -2892,39 +2795,68 @@ USAGE
|
|
|
2892
2795
|
<value>] [--branch <value>] [--import-webhook-status disable|current]
|
|
2893
2796
|
|
|
2894
2797
|
FLAGS
|
|
2895
|
-
-B, --branch=<value>
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2798
|
+
-B, --branch=<value>
|
|
2799
|
+
The name of the branch where you want to import your content. If you don't mention the branch name, then by default
|
|
2800
|
+
the content will be imported to the main branch.
|
|
2801
|
+
|
|
2802
|
+
-a, --alias=<value>
|
|
2803
|
+
The management token of the destination stack where you will import the content.
|
|
2804
|
+
|
|
2805
|
+
-b, --backup-dir=<value>
|
|
2806
|
+
[optional] Backup directory name when using specific module.
|
|
2807
|
+
|
|
2808
|
+
-c, --config=<value>
|
|
2809
|
+
[optional] The path of the configuration JSON file containing all the options for a single run.
|
|
2810
|
+
|
|
2811
|
+
-d, --data-dir=<value>
|
|
2812
|
+
The path or the location in your file system where the content, you intend to import, is stored. For example, -d
|
|
2813
|
+
"C:\Users\Name\Desktop\cli\content". If the export folder has branches involved, then the path should point till the
|
|
2814
|
+
particular branch. For example, “-d "C:\Users\Name\Desktop\cli\content\branch_name"
|
|
2815
|
+
|
|
2816
|
+
-k, --stack-api-key=<value>
|
|
2817
|
+
API Key of the target stack
|
|
2818
|
+
|
|
2819
|
+
-m, --module=<value>
|
|
2820
|
+
[optional] Specify the module to import into the target stack. If not specified, the import command will import all
|
|
2821
|
+
the modules into the stack. The available modules are assets, content-types, entries, environments, extensions,
|
|
2822
|
+
marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, personalize projects,
|
|
2823
|
+
taxonomies, and composable-studio.
|
|
2824
|
+
|
|
2825
|
+
-y, --yes
|
|
2826
|
+
[optional] Force override all Marketplace prompts.
|
|
2827
|
+
|
|
2828
|
+
--branch-alias=<value>
|
|
2829
|
+
Specify the branch alias where you want to import your content. If not specified, the content is imported into the
|
|
2830
|
+
main branch by default.
|
|
2831
|
+
|
|
2832
|
+
--exclude-global-modules
|
|
2833
|
+
Excludes the branch-independent module from the import operation.
|
|
2834
|
+
|
|
2835
|
+
--import-webhook-status=<option>
|
|
2836
|
+
[default: disable] [default: disable] (optional) This webhook state keeps the same state of webhooks as the source
|
|
2837
|
+
stack. <options: disable|current>
|
|
2838
|
+
<options: disable|current>
|
|
2839
|
+
|
|
2840
|
+
--personalize-project-name=<value>
|
|
2841
|
+
(optional) Provide a unique name for the Personalize project.
|
|
2842
|
+
|
|
2843
|
+
--replace-existing
|
|
2844
|
+
Replaces the existing module in the target stack.
|
|
2845
|
+
|
|
2846
|
+
--skip-app-recreation
|
|
2847
|
+
(optional) Skips the recreation of private apps if they already exist.
|
|
2848
|
+
|
|
2849
|
+
--skip-assets-publish
|
|
2850
|
+
Skips asset publishing during the import process.
|
|
2851
|
+
|
|
2852
|
+
--skip-audit
|
|
2853
|
+
Skips the audit fix that occurs during an import operation.
|
|
2854
|
+
|
|
2855
|
+
--skip-entries-publish
|
|
2856
|
+
Skips entry publishing during the import process
|
|
2857
|
+
|
|
2858
|
+
--skip-existing
|
|
2859
|
+
Skips the module exists warning messages.
|
|
2928
2860
|
|
|
2929
2861
|
DESCRIPTION
|
|
2930
2862
|
Import content from a stack
|
|
@@ -3670,7 +3602,7 @@ Set region for CLI
|
|
|
3670
3602
|
```
|
|
3671
3603
|
USAGE
|
|
3672
3604
|
$ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>] [--developer-hub <value>]
|
|
3673
|
-
[--personalize <value>] [--launch <value>]
|
|
3605
|
+
[--personalize <value>] [--launch <value>] [--studio <value>]
|
|
3674
3606
|
|
|
3675
3607
|
ARGUMENTS
|
|
3676
3608
|
[REGION] Name for the region
|
|
@@ -3684,6 +3616,7 @@ FLAGS
|
|
|
3684
3616
|
--developer-hub=<value> Custom host to set for Developer hub API
|
|
3685
3617
|
--launch=<value> Custom host to set for Launch API
|
|
3686
3618
|
--personalize=<value> Custom host to set for Personalize API
|
|
3619
|
+
--studio=<value> Custom host to set for Studio API
|
|
3687
3620
|
--ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are
|
|
3688
3621
|
required
|
|
3689
3622
|
|
|
@@ -3715,7 +3648,9 @@ EXAMPLES
|
|
|
3715
3648
|
|
|
3716
3649
|
$ 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
3650
|
|
|
3718
|
-
$ csdx config:set:region --
|
|
3651
|
+
$ 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>
|
|
3652
|
+
|
|
3653
|
+
$ 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
3654
|
```
|
|
3720
3655
|
|
|
3721
3656
|
_See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/region.ts)_
|
|
@@ -3738,7 +3673,7 @@ DESCRIPTION
|
|
|
3738
3673
|
Display help for csdx.
|
|
3739
3674
|
```
|
|
3740
3675
|
|
|
3741
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
3676
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
|
|
3742
3677
|
|
|
3743
3678
|
## `csdx launch`
|
|
3744
3679
|
|
|
@@ -3750,33 +3685,33 @@ USAGE
|
|
|
3750
3685
|
React App)|CSR (Client-Side Rendered)|Angular|Nuxt|VueJs|Remix|Other] [--org <value>] [-n <value>] [-e <value>]
|
|
3751
3686
|
[--branch <value>] [--build-command <value>] [--out-dir <value>] [--server-command <value>] [--variable-type Import
|
|
3752
3687
|
variables from a stack|Manually add custom variables to the list|Import variables from the .env.local file|Skip
|
|
3753
|
-
adding environment variables] [-a <value>] [--env-variables <value>] [--redeploy-latest] [--redeploy-last-upload]
|
|
3688
|
+
adding environment variables...] [-a <value>] [--env-variables <value>] [--redeploy-latest] [--redeploy-last-upload]
|
|
3754
3689
|
|
|
3755
3690
|
FLAGS
|
|
3756
|
-
-a, --alias=<value>
|
|
3757
|
-
-c, --config=<value>
|
|
3758
|
-
-d, --data-dir=<value>
|
|
3759
|
-
-e, --environment=<value>
|
|
3760
|
-
-n, --name=<value>
|
|
3761
|
-
--branch=<value>
|
|
3762
|
-
--build-command=<value>
|
|
3763
|
-
--env-variables=<value>
|
|
3764
|
-
|
|
3765
|
-
--framework=<option>
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
--org=<value>
|
|
3769
|
-
--out-dir=<value>
|
|
3770
|
-
--redeploy-last-upload
|
|
3771
|
-
--redeploy-latest
|
|
3772
|
-
--server-command=<value>
|
|
3773
|
-
--type=<option>
|
|
3774
|
-
|
|
3775
|
-
--variable-type=<option
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3691
|
+
-a, --alias=<value> [optional] Alias (name) for the delivery token.
|
|
3692
|
+
-c, --config=<value> Path to the local '.cs-launch.json' file
|
|
3693
|
+
-d, --data-dir=<value> Current working directory
|
|
3694
|
+
-e, --environment=<value> [optional] Environment name for the Launch project.
|
|
3695
|
+
-n, --name=<value> [optional] Name of the project.
|
|
3696
|
+
--branch=<value> [optional] GitHub branch name.
|
|
3697
|
+
--build-command=<value> [optional] Build Command.
|
|
3698
|
+
--env-variables=<value> [optional] Provide the environment variables in the key:value format, separated by
|
|
3699
|
+
comma. For example: APP_ENV:prod, TEST_ENV:testVal.
|
|
3700
|
+
--framework=<option> [optional] Type of framework. <options: Gatsby|NextJS|Other>
|
|
3701
|
+
<options: Gatsby|NextJs|CRA (Create React App)|CSR (Client-Side
|
|
3702
|
+
Rendered)|Angular|Nuxt|VueJs|Remix|Other>
|
|
3703
|
+
--org=<value> [optional] Provide the organization UID to create a new project or deployment.
|
|
3704
|
+
--out-dir=<value> [optional] Output Directory.
|
|
3705
|
+
--redeploy-last-upload [optional] Redeploy with last file upload
|
|
3706
|
+
--redeploy-latest [optional] Redeploy latest commit/code
|
|
3707
|
+
--server-command=<value> [optional] Server Command.
|
|
3708
|
+
--type=<option> [optional] Type of adapters. <options: GitHub|FileUpload>
|
|
3709
|
+
<options: GitHub|FileUpload>
|
|
3710
|
+
--variable-type=<option>... [optional] Provide a variable type (can specify multiple times). <options: Import
|
|
3711
|
+
variables from a stack|Manually add custom variables to the list|Import variables
|
|
3712
|
+
from the .env.local file|Skip adding environment variables>
|
|
3713
|
+
<options: Import variables from a stack|Manually add custom variables to the
|
|
3714
|
+
list|Import variables from the .env.local file|Skip adding environment variables>
|
|
3780
3715
|
|
|
3781
3716
|
DESCRIPTION
|
|
3782
3717
|
Launch related operations
|
|
@@ -3807,6 +3742,8 @@ EXAMPLES
|
|
|
3807
3742
|
$ csdx launch --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --variable-type="Import variables from a stack" --alias=<value>
|
|
3808
3743
|
|
|
3809
3744
|
$ csdx launch --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --variable-type="Manually add custom variables to the list" --env-variables="APP_ENV:prod, TEST_ENV:testVal"
|
|
3745
|
+
|
|
3746
|
+
$ csdx launch --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --variable-type="Import variables from a stack" --variable-type="Manually add custom variables to the list" --alias=<value>
|
|
3810
3747
|
```
|
|
3811
3748
|
|
|
3812
3749
|
_See code: [@contentstack/cli-launch](https://github.com/contentstack/launch-cli/blob/main/packages/contentstack-launch/src/commands/launch/index.ts)_
|
|
@@ -4055,7 +3992,7 @@ EXAMPLES
|
|
|
4055
3992
|
$ csdx plugins
|
|
4056
3993
|
```
|
|
4057
3994
|
|
|
4058
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
3995
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/index.ts)_
|
|
4059
3996
|
|
|
4060
3997
|
## `csdx plugins:add PLUGIN`
|
|
4061
3998
|
|
|
@@ -4129,7 +4066,7 @@ EXAMPLES
|
|
|
4129
4066
|
$ csdx plugins:inspect myplugin
|
|
4130
4067
|
```
|
|
4131
4068
|
|
|
4132
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4069
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/inspect.ts)_
|
|
4133
4070
|
|
|
4134
4071
|
## `csdx plugins:install PLUGIN`
|
|
4135
4072
|
|
|
@@ -4178,7 +4115,7 @@ EXAMPLES
|
|
|
4178
4115
|
$ csdx plugins:install someuser/someplugin
|
|
4179
4116
|
```
|
|
4180
4117
|
|
|
4181
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4118
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/install.ts)_
|
|
4182
4119
|
|
|
4183
4120
|
## `csdx plugins:link PATH`
|
|
4184
4121
|
|
|
@@ -4209,7 +4146,7 @@ EXAMPLES
|
|
|
4209
4146
|
$ csdx plugins:link myplugin
|
|
4210
4147
|
```
|
|
4211
4148
|
|
|
4212
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4149
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/link.ts)_
|
|
4213
4150
|
|
|
4214
4151
|
## `csdx plugins:remove [PLUGIN]`
|
|
4215
4152
|
|
|
@@ -4250,7 +4187,7 @@ FLAGS
|
|
|
4250
4187
|
--reinstall Reinstall all plugins after uninstalling.
|
|
4251
4188
|
```
|
|
4252
4189
|
|
|
4253
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4190
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/reset.ts)_
|
|
4254
4191
|
|
|
4255
4192
|
## `csdx plugins:uninstall [PLUGIN]`
|
|
4256
4193
|
|
|
@@ -4278,7 +4215,7 @@ EXAMPLES
|
|
|
4278
4215
|
$ csdx plugins:uninstall myplugin
|
|
4279
4216
|
```
|
|
4280
4217
|
|
|
4281
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4218
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/uninstall.ts)_
|
|
4282
4219
|
|
|
4283
4220
|
## `csdx plugins:unlink [PLUGIN]`
|
|
4284
4221
|
|
|
@@ -4322,7 +4259,7 @@ DESCRIPTION
|
|
|
4322
4259
|
Update installed plugins.
|
|
4323
4260
|
```
|
|
4324
4261
|
|
|
4325
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
4262
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
|
|
4326
4263
|
|
|
4327
4264
|
## `csdx tokens`
|
|
4328
4265
|
|
|
@@ -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(
|
|
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
|
|
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('
|
|
29
|
-
cli_utilities_1.cliux.error('Please
|
|
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('
|
|
32
|
+
newLogger.debug('Logged-in user', result.data);
|
|
33
33
|
}
|
|
34
34
|
catch (error) {
|
|
35
|
-
newLogger.error('
|
|
36
|
-
cli_utilities_1.cliux.error('Please
|
|
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
|
}
|
package/oclif.manifest.json
CHANGED
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": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.3",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bin": {
|
|
7
7
|
"csdx": "./bin/run.js"
|
|
@@ -22,24 +22,23 @@
|
|
|
22
22
|
"prepack": "pnpm compile && oclif manifest && oclif readme"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@contentstack/cli-audit": "~
|
|
25
|
+
"@contentstack/cli-audit": "~2.0.0-beta",
|
|
26
26
|
"@contentstack/cli-auth": "~1.6.2",
|
|
27
27
|
"@contentstack/cli-cm-bootstrap": "~2.0.0-beta.2",
|
|
28
28
|
"@contentstack/cli-cm-branches": "~1.6.1",
|
|
29
|
-
"@contentstack/cli-cm-bulk-publish": "~1.10.
|
|
30
|
-
"@contentstack/cli-cm-clone": "~2.0.0-beta.
|
|
31
|
-
"@contentstack/cli-cm-export": "~2.0.0-beta.
|
|
32
|
-
"@contentstack/cli-cm-export-to-csv": "~1.10.
|
|
29
|
+
"@contentstack/cli-cm-bulk-publish": "~1.10.3",
|
|
30
|
+
"@contentstack/cli-cm-clone": "~2.0.0-beta.3",
|
|
31
|
+
"@contentstack/cli-cm-export": "~2.0.0-beta.3",
|
|
32
|
+
"@contentstack/cli-cm-export-to-csv": "~1.10.1",
|
|
33
33
|
"@contentstack/cli-cm-import": "~2.0.0-beta.2",
|
|
34
|
-
"@contentstack/cli-cm-import-setup": "
|
|
35
|
-
"@contentstack/cli-cm-migrate-rte": "~1.6.2",
|
|
34
|
+
"@contentstack/cli-cm-import-setup": "~2.0.0-beta.1",
|
|
36
35
|
"@contentstack/cli-cm-seed": "~2.0.0-beta.2",
|
|
37
|
-
"@contentstack/cli-command": "~1.
|
|
38
|
-
"@contentstack/cli-config": "~1.
|
|
36
|
+
"@contentstack/cli-command": "~1.7.0",
|
|
37
|
+
"@contentstack/cli-config": "~1.16.1",
|
|
39
38
|
"@contentstack/cli-launch": "^1.9.2",
|
|
40
|
-
"@contentstack/cli-migration": "~
|
|
39
|
+
"@contentstack/cli-migration": "~2.0.0-beta",
|
|
41
40
|
"@contentstack/cli-utilities": "~1.15.0",
|
|
42
|
-
"@contentstack/cli-variants": "~2.0.0-beta.
|
|
41
|
+
"@contentstack/cli-variants": "~2.0.0-beta.3",
|
|
43
42
|
"@contentstack/management": "~1.22.0",
|
|
44
43
|
"@oclif/core": "^4.3.0",
|
|
45
44
|
"@oclif/plugin-help": "^6.2.28",
|
|
@@ -148,7 +147,6 @@
|
|
|
148
147
|
"@contentstack/cli-cm-bootstrap",
|
|
149
148
|
"@contentstack/cli-cm-export-to-csv",
|
|
150
149
|
"@contentstack/cli-cm-clone",
|
|
151
|
-
"@contentstack/cli-cm-migrate-rte",
|
|
152
150
|
"@contentstack/cli-migration",
|
|
153
151
|
"@contentstack/cli-cm-bulk-publish",
|
|
154
152
|
"@contentstack/cli-cm-branches",
|