@contentstack/cli 2.0.0-beta.2 → 2.0.0-beta.4

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/2.0.0-beta.2 linux-x64 node-v22.21.1
21
+ @contentstack/cli/2.0.0-beta.4 linux-x64 node-v22.21.1
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -29,8 +29,6 @@ USAGE
29
29
  # Commands
30
30
 
31
31
  <!-- commands -->
32
- * [`csdx audit`](#csdx-audit)
33
- * [`csdx audit:fix`](#csdx-auditfix)
34
32
  * [`csdx auth:login`](#csdx-authlogin)
35
33
  * [`csdx auth:logout`](#csdx-authlogout)
36
34
  * [`csdx auth:tokens`](#csdx-authtokens)
@@ -57,33 +55,25 @@ USAGE
57
55
  * [`csdx cm:bulk-publish:revert`](#csdx-cmbulk-publishrevert)
58
56
  * [`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
57
  * [`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
58
  * [`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
59
  * [`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
60
  * [`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)
64
61
  * [`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)
65
62
  * [`csdx cm:entries:unpublish`](#csdx-cmentriesunpublish)
66
63
  * [`csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value)
67
- * [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets)
68
64
  * [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
69
- * [`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
- * [`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
- * [`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
- * [`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
- * [`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)
75
65
  * [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
76
66
  * [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
77
67
  * [`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)
78
- * [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets)
79
- * [`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)
68
+ * [`csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport---config-value---stack-api-key-value---data-dir-value---alias-value---module-value---content-types-value---branch-value---secured-assets)
69
+ * [`csdx cm:stacks:import [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksimport---config-value---stack-api-key-value---data-dir-value---alias-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent)
80
70
  * [`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)
81
71
  * [`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)
82
72
  * [`csdx cm:stacks:publish`](#csdx-cmstackspublish)
83
73
  * [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs)
84
74
  * [`csdx cm:stacks:publish-configure`](#csdx-cmstackspublish-configure)
85
75
  * [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert)
86
- * [`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)
76
+ * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value---stack-api-key-value---stack-name-value---yes-value---alias-value---locale-value)
87
77
  * [`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)
88
78
  * [`csdx config:get:base-branch`](#csdx-configgetbase-branch)
89
79
  * [`csdx config:get:ea-header`](#csdx-configgetea-header)
@@ -123,113 +113,6 @@ USAGE
123
113
  * [`csdx tokens`](#csdx-tokens)
124
114
  * [`csdx whoami`](#csdx-whoami)
125
115
 
126
- ## `csdx audit`
127
-
128
- Perform audits and find possible errors in the exported Contentstack data
129
-
130
- ```
131
- USAGE
132
- $ csdx audit [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
133
- content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--columns <value>]
134
- [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
135
-
136
- FLAGS
137
- --modules=<option>... Provide the list of modules to be audited
138
- <options:
139
- content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
140
- --report-path=<value> Path to store the audit reports
141
-
142
- COMMON FLAGS
143
- -c, --config=<value> Path of the external config
144
- -d, --data-dir=<value> Path where the data is stored
145
- --show-console-output Display the audit and audit fix result for individual modules
146
-
147
- TABLE FLAGS
148
- --columns=<value> Specify columns to display, comma-separated.
149
- --csv Output results in CSV format.
150
- --filter=<value> Filter rows by a column value (e.g., name=foo).
151
- --no-header Hide table headers in output.
152
- --no-truncate Prevent truncation of long text in columns.
153
- --output=<option> Specify output format: csv, json, or yaml.
154
- <options: csv|json|yaml>
155
- --sort=<value> Sort the table by a column. Use "-" for descending.
156
-
157
- DESCRIPTION
158
- Perform audits and find possible errors in the exported Contentstack data
159
-
160
- ALIASES
161
- $ csdx audit
162
- $ csdx cm:stacks:audit
163
-
164
- EXAMPLES
165
- $ csdx audit
166
-
167
- $ csdx audit --report-path=<path>
168
-
169
- $ csdx audit --report-path=<path> --csv
170
-
171
- $ csdx audit --report-path=<path> --filter="name=<filter-value>"
172
-
173
- $ csdx audit --report-path=<path> --modules=content-types --filter="name="<filter-value>"
174
- ```
175
-
176
- ## `csdx audit:fix`
177
-
178
- Perform audits and fix possible errors in the exported Contentstack data.
179
-
180
- ```
181
- USAGE
182
- $ csdx audit:fix [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
183
- content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules...] [--copy-path <value>
184
- --copy-dir] [--fix-only reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns
185
- <value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]
186
-
187
- FLAGS
188
- --copy-dir Create backup from the original data.
189
- --copy-path=<value> Provide the path to backup the copied data
190
- --fix-only=<option>... Provide the list of fix options
191
- <options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
192
- --modules=<option>... Provide the list of modules to be audited
193
- <options:
194
- content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules>
195
- --report-path=<value> Path to store the audit reports
196
-
197
- COMMON FLAGS
198
- -c, --config=<value> Path of the external config
199
- -d, --data-dir=<value> Path where the data is stored
200
- --show-console-output Display the audit and audit fix result for individual modules
201
-
202
- TABLE FLAGS
203
- --columns=<value> Specify columns to display, comma-separated.
204
- --csv Output results in CSV format.
205
- --filter=<value> Filter rows by a column value (e.g., name=foo).
206
- --no-header Hide table headers in output.
207
- --no-truncate Prevent truncation of long text in columns.
208
- --output=<option> Specify output format: csv, json, or yaml.
209
- <options: csv|json|yaml>
210
- --sort=<value> Sort the table by a column. Use "-" for descending.
211
-
212
- DESCRIPTION
213
- Perform audits and fix possible errors in the exported Contentstack data.
214
-
215
- ALIASES
216
- $ csdx audit:fix
217
- $ csdx cm:stacks:audit:fix
218
-
219
- EXAMPLES
220
- $ csdx audit:fix --copy-dir
221
-
222
- $ csdx audit:fix --report-path=<path> --copy-dir
223
-
224
- $ csdx audit:fix --report-path=<path> --copy-dir --csv
225
-
226
- $ csdx audit:fix --fix-only=reference,global_field --copy-dir
227
-
228
- $ csdx audit:fix --report-path=<path> --filter="name=<filter-value>"
229
-
230
- $ csdx audit:fix --report-path=<path> --modules=content-types --filter="name="<filter-value>" --copy-dir --copy-path=<path>
231
- ```
232
-
233
116
  ## `csdx auth:login`
234
117
 
235
118
  User sessions login
@@ -331,12 +214,12 @@ USAGE
331
214
 
332
215
  FLAGS
333
216
  -a, --alias=<value> Alias (name) you want to assign to the token
334
- -d, --delivery Set this flag to save delivery token
335
217
  -e, --environment=<value> Environment name for delivery token
336
218
  -k, --stack-api-key=<value> Stack API Key
337
- -m, --management Set this flag to save management token
338
- -t, --token=<value> [env: TOKEN] Add the token name
339
219
  -y, --yes Use this flag to skip confirmation
220
+ --delivery Set this flag to save delivery token
221
+ --management Set this flag to save management token
222
+ --token=<value> [env: TOKEN] Add the token name
340
223
 
341
224
  DESCRIPTION
342
225
  Adds management/delivery tokens to your session to use it with other CLI commands
@@ -1596,69 +1479,6 @@ EXAMPLES
1596
1479
  $ 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
1480
  ```
1598
1481
 
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
1482
  ## `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
1483
 
1664
1484
  Publish entries from multiple contenttypes to multiple environments and locales
@@ -2180,56 +2000,6 @@ EXAMPLES
2180
2000
 
2181
2001
  _See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/entries/update-and-publish.js)_
2182
2002
 
2183
- ## `csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
2184
-
2185
- Export content from a stack
2186
-
2187
- ```
2188
- USAGE
2189
- $ csdx cm:export cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>]
2190
- [--content-types <value>] [--branch <value>] [--secured-assets]
2191
-
2192
- FLAGS
2193
- -B, --branch=<value> [optional] The name of the branch where you want to export your content. If you don't
2194
- mention the branch name, then by default the content will be exported from all the
2195
- branches of your stack.
2196
- -a, --alias=<value> The management token alias of the source stack from which you will export content.
2197
- -c, --config=<value> [optional] Path of the config
2198
- -d, --data-dir=<value> The path or the location in your file system to store the exported content. For e.g.,
2199
- ./content
2200
- -k, --stack-api-key=<value> API Key of the source stack
2201
- -m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
2202
- the modules to the stack. The available modules are assets, content-types, entries,
2203
- environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2204
- workflows, custom-roles, and taxonomies.
2205
- -t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
2206
- of multiple content types, specify the IDs separated by spaces.
2207
- -y, --yes [optional] Force override all Marketplace prompts.
2208
- --branch-alias=<value> (Optional) The alias of the branch from which you want to export content.
2209
- --secured-assets [optional] Use this flag for assets that are secured.
2210
-
2211
- DESCRIPTION
2212
- Export content from a stack
2213
-
2214
- ALIASES
2215
- $ csdx cm:export
2216
-
2217
- EXAMPLES
2218
- $ csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
2219
-
2220
- $ csdx cm:stacks:export --config <path/to/config/dir>
2221
-
2222
- $ csdx cm:stacks:export --alias <management_token_alias>
2223
-
2224
- $ csdx cm:stacks:export --alias <management_token_alias> --data-dir <path/to/export/destination/dir>
2225
-
2226
- $ csdx cm:stacks:export --alias <management_token_alias> --config <path/to/config/file>
2227
-
2228
- $ csdx cm:stacks:export --module <single module name>
2229
-
2230
- $ csdx cm:stacks:export --branch [optional] branch name
2231
- ```
2232
-
2233
2003
  ## `csdx cm:export-to-csv`
2234
2004
 
2235
2005
  Export entries, taxonomies, terms or organization users to csv using this command
@@ -2362,306 +2132,6 @@ EXAMPLES
2362
2132
 
2363
2133
  _See code: [@contentstack/cli-cm-export-to-csv](https://github.com/contentstack/cli/blob/main/packages/contentstack-export-to-csv/src/commands/cm/export-to-csv.js)_
2364
2134
 
2365
- ## `csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
2366
-
2367
- Import content from a stack
2368
-
2369
- ```
2370
- USAGE
2371
- $ csdx cm:import cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>]
2372
- [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]
2373
-
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.
2408
-
2409
- DESCRIPTION
2410
- Import content from a stack
2411
-
2412
- ALIASES
2413
- $ csdx cm:import
2414
-
2415
- EXAMPLES
2416
- $ csdx cm:stacks:import --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
2417
-
2418
- $ csdx cm:stacks:import --config <path/of/config/dir>
2419
-
2420
- $ csdx cm:stacks:import --module <single module name>
2421
-
2422
- $ csdx cm:stacks:import --module <single module name> --backup-dir <backup dir>
2423
-
2424
- $ csdx cm:stacks:import --alias <management_token_alias>
2425
-
2426
- $ csdx cm:stacks:import --alias <management_token_alias> --data-dir <path/of/export/destination/dir>
2427
-
2428
- $ csdx cm:stacks:import --alias <management_token_alias> --config <path/of/config/file>
2429
-
2430
- $ csdx cm:stacks:import --branch <branch name> --yes --skip-audit
2431
- ```
2432
-
2433
- ## `csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`
2434
-
2435
- Helps to generate mappers and backup folder for importing (overwriting) specific modules
2436
-
2437
- ```
2438
- USAGE
2439
- $ csdx cm:import-setup cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]
2440
-
2441
- FLAGS
2442
- -B, --branch=<value> The name of the branch where you want to import your content. If you don't mention the
2443
- branch name, then by default the content will be imported to the main branch.
2444
- -a, --alias=<value> The management token of the destination stack where you will import the content.
2445
- -d, --data-dir=<value> The path or the location in your file system where the content, you intend to import, is
2446
- stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the export folder has
2447
- branches involved, then the path should point till the particular branch. For example,
2448
- “-d "C:\Users\Name\Desktop\cli\content\branch_name"
2449
- -k, --stack-api-key=<value> API key of the target stack
2450
- --branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
2451
- content is imported into the main branch by default.
2452
- --module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
2453
- are global-fields, content-types, entries
2454
- <options: global-fields|content-types|entries>
2455
-
2456
- DESCRIPTION
2457
- Helps to generate mappers and backup folder for importing (overwriting) specific modules
2458
-
2459
- ALIASES
2460
- $ csdx cm:import-setup
2461
-
2462
- EXAMPLES
2463
- $ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
2464
-
2465
- $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name>
2466
-
2467
- $ 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
- ```
2469
-
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
- ## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
2532
-
2533
- Contentstack migration script.
2534
-
2535
- ```
2536
- USAGE
2537
- $ csdx cm:migration cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>]
2538
- [--config-file <value>] [--config <value>] [--multiple]
2539
-
2540
- FLAGS
2541
- -B, --branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
2542
- branch name)
2543
- -a, --alias=<value> Use this flag to add the management token alias. You must use either the --alias flag or
2544
- the --stack-api-key flag.
2545
- -k, --stack-api-key=<value> Use this flag to add the API key of your stack. You must use either the --stack-api-key
2546
- flag or the --alias flag.
2547
- --config=<value>... [optional] Inline configuration, <key1>:<value1>. Passing an external configuration makes
2548
- the script re-usable.
2549
- --config-file=<value> [optional] Path of the JSON configuration file.
2550
- --file-path=<value> Use this flag to provide the path of the file of the migration script.
2551
- --multiple This flag helps you to migrate multiple content files in a single instance. Mention the
2552
- folder path where your migration script files are stored.
2553
-
2554
- DESCRIPTION
2555
- Contentstack migration script.
2556
-
2557
- ALIASES
2558
- $ csdx cm:migration
2559
-
2560
- EXAMPLES
2561
- $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>
2562
-
2563
- $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>
2564
-
2565
- $ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>
2566
-
2567
- $ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
2568
-
2569
- $ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
2570
-
2571
- $ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
2572
- ```
2573
-
2574
- ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`
2575
-
2576
- Create a stack from existing content types, entries, assets, etc
2577
-
2578
- ```
2579
- USAGE
2580
- $ csdx cm:seed cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s
2581
- <value>] [--locale <value>]
2582
-
2583
- FLAGS
2584
- -a, --alias=<value> Alias of the management token
2585
- -k, --stack-api-key=<value> Provide stack API key to seed content to
2586
- -n, --stack-name=<value> Name of a new stack that needs to be created.
2587
- -o, --org=<value> Provide Organization UID to create a new stack
2588
- -r, --repo=<value> GitHub organization name or GitHub user name/repository name.
2589
- -s, --stack=<value> Provide the stack UID to seed content.
2590
- -y, --yes=<value> [Optional] Skip the stack confirmation.
2591
-
2592
- DESCRIPTION
2593
- Create a stack from existing content types, entries, assets, etc
2594
-
2595
- ALIASES
2596
- $ csdx cm:seed
2597
-
2598
- EXAMPLES
2599
- $ csdx cm:stacks:seed
2600
-
2601
- $ csdx cm:stacks:seed --repo "account"
2602
-
2603
- $ csdx cm:stacks:seed --repo "account/repository"
2604
-
2605
- $ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack
2606
-
2607
- $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid
2608
- ```
2609
-
2610
- ## `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]`
2611
-
2612
- Clone data (structure/content or both) of a stack into another stack
2613
-
2614
- ```
2615
- USAGE
2616
- $ csdx cm:stack-clone cm:stacks:clone [--source-branch <value>] [--target-branch <value>]
2617
- [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b]
2618
- [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]
2619
-
2620
- FLAGS
2621
- -c, --config=<value> Path for the external configuration
2622
- -n, --stack-name=<value> Provide a name for the new stack to store the cloned content.
2623
- -y, --yes Force override all Marketplace prompts.
2624
- --destination-management-token-alias=<value> Destination management token alias.
2625
- --destination-stack-api-key=<value> Destination stack API key
2626
- --import-webhook-status=<option> [default: disable] [default: disable] (optional) The status of the
2627
- import webhook. <options: disable|current>
2628
- <options: disable|current>
2629
- --skip-audit (optional) Skips the audit fix that occurs during an import
2630
- operation.
2631
- --source-branch=<value> Branch of the source stack.
2632
- --source-branch-alias=<value> Alias of Branch of the source stack.
2633
- --source-management-token-alias=<value> Source management token alias.
2634
- --source-stack-api-key=<value> Source stack API key
2635
- --target-branch=<value> Branch of the target stack.
2636
- --target-branch-alias=<value> Alias of Branch of the target stack.
2637
- --type=<option> Type of data to clone. You can select option a or b.
2638
- a) Structure (all modules except entries & assets).
2639
- b) Structure with content (all modules including entries & assets).
2640
-
2641
- <options: a|b>
2642
-
2643
- DESCRIPTION
2644
- Clone data (structure/content or both) of a stack into another stack
2645
- Use this plugin to automate the process of cloning a stack in few steps.
2646
-
2647
-
2648
- ALIASES
2649
- $ csdx cm:stack-clone
2650
-
2651
- EXAMPLES
2652
- $ csdx cm:stacks:clone
2653
-
2654
- $ csdx cm:stacks:clone --source-branch <source-branch-name> --target-branch <target-branch-name> --yes
2655
-
2656
- $ csdx cm:stacks:clone --source-stack-api-key <apiKey> --destination-stack-api-key <apiKey>
2657
-
2658
- $ csdx cm:stacks:clone --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>
2659
-
2660
- $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>
2661
-
2662
- $ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias> --type <value a or b>
2663
- ```
2664
-
2665
2135
  ## `csdx cm:stacks:audit`
2666
2136
 
2667
2137
  Perform audits and find possible errors in the exported Contentstack data
@@ -2696,10 +2166,6 @@ TABLE FLAGS
2696
2166
  DESCRIPTION
2697
2167
  Perform audits and find possible errors in the exported Contentstack data
2698
2168
 
2699
- ALIASES
2700
- $ csdx audit
2701
- $ csdx cm:stacks:audit
2702
-
2703
2169
  EXAMPLES
2704
2170
  $ csdx cm:stacks:audit
2705
2171
 
@@ -2753,10 +2219,6 @@ TABLE FLAGS
2753
2219
  DESCRIPTION
2754
2220
  Perform audits and fix possible errors in the exported Contentstack data.
2755
2221
 
2756
- ALIASES
2757
- $ csdx audit:fix
2758
- $ csdx cm:stacks:audit:fix
2759
-
2760
2222
  EXAMPLES
2761
2223
  $ csdx cm:stacks:audit:fix --copy-dir
2762
2224
 
@@ -2811,9 +2273,6 @@ DESCRIPTION
2811
2273
  Use this plugin to automate the process of cloning a stack in few steps.
2812
2274
 
2813
2275
 
2814
- ALIASES
2815
- $ csdx cm:stack-clone
2816
-
2817
2276
  EXAMPLES
2818
2277
  $ csdx cm:stacks:clone
2819
2278
 
@@ -2830,40 +2289,37 @@ EXAMPLES
2830
2289
 
2831
2290
  _See code: [@contentstack/cli-cm-clone](https://github.com/contentstack/cli/blob/main/packages/contentstack-clone/src/commands/cm/stacks/clone.js)_
2832
2291
 
2833
- ## `csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
2292
+ ## `csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
2834
2293
 
2835
2294
  Export content from a stack
2836
2295
 
2837
2296
  ```
2838
2297
  USAGE
2839
- $ csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types
2840
- <value>] [--branch <value>] [--secured-assets]
2298
+ $ csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>]
2299
+ [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]
2841
2300
 
2842
2301
  FLAGS
2843
- -B, --branch=<value> [optional] The name of the branch where you want to export your content. If you don't
2844
- mention the branch name, then by default the content will be exported from all the
2845
- branches of your stack.
2846
2302
  -a, --alias=<value> The management token alias of the source stack from which you will export content.
2847
2303
  -c, --config=<value> [optional] Path of the config
2848
2304
  -d, --data-dir=<value> The path or the location in your file system to store the exported content. For e.g.,
2849
2305
  ./content
2850
2306
  -k, --stack-api-key=<value> API Key of the source stack
2851
- -m, --module=<value> [optional] Specific module name. If not specified, the export command will export all
2852
- the modules to the stack. The available modules are assets, content-types, entries,
2853
- environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2854
- workflows, custom-roles, and taxonomies.
2855
- -t, --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
2856
- of multiple content types, specify the IDs separated by spaces.
2857
2307
  -y, --yes [optional] Force override all Marketplace prompts.
2308
+ --branch=<value> [optional] The name of the branch where you want to export your content. If you don't
2309
+ mention the branch name, then by default the content will be exported from all the
2310
+ branches of your stack.
2858
2311
  --branch-alias=<value> (Optional) The alias of the branch from which you want to export content.
2312
+ --content-types=<value>... [optional] The UID of the content type(s) whose content you want to export. In case
2313
+ of multiple content types, specify the IDs separated by spaces.
2314
+ --module=<value> [optional] Specific module name. If not specified, the export command will export all
2315
+ the modules to the stack. The available modules are assets, content-types, entries,
2316
+ environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks,
2317
+ workflows, custom-roles, taxonomies, and studio.
2859
2318
  --secured-assets [optional] Use this flag for assets that are secured.
2860
2319
 
2861
2320
  DESCRIPTION
2862
2321
  Export content from a stack
2863
2322
 
2864
- ALIASES
2865
- $ csdx cm:export
2866
-
2867
2323
  EXAMPLES
2868
2324
  $ csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
2869
2325
 
@@ -2882,56 +2338,79 @@ EXAMPLES
2882
2338
 
2883
2339
  _See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/stacks/export.ts)_
2884
2340
 
2885
- ## `csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
2341
+ ## `csdx cm:stacks:import [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
2886
2342
 
2887
2343
  Import content from a stack
2888
2344
 
2889
2345
  ```
2890
2346
  USAGE
2891
- $ csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir
2892
- <value>] [--branch <value>] [--import-webhook-status disable|current]
2347
+ $ csdx cm:stacks:import [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>]
2348
+ [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]
2893
2349
 
2894
2350
  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.
2351
+ -a, --alias=<value>
2352
+ The management token of the destination stack where you will import the content.
2353
+
2354
+ -c, --config=<value>
2355
+ [optional] The path of the configuration JSON file containing all the options for a single run.
2356
+
2357
+ -d, --data-dir=<value>
2358
+ The path or the location in your file system where the content, you intend to import, is stored. For example, -d
2359
+ "C:\Users\Name\Desktop\cli\content". If the export folder has branches involved, then the path should point till the
2360
+ particular branch. For example, “-d "C:\Users\Name\Desktop\cli\content\branch_name"
2361
+
2362
+ -k, --stack-api-key=<value>
2363
+ API Key of the target stack
2364
+
2365
+ -y, --yes
2366
+ [optional] Force override all Marketplace prompts.
2367
+
2368
+ --backup-dir=<value>
2369
+ [optional] Backup directory name when using specific module.
2370
+
2371
+ --branch=<value>
2372
+ The name of the branch where you want to import your content. If you don't mention the branch name, then by default
2373
+ the content will be imported to the main branch.
2374
+
2375
+ --branch-alias=<value>
2376
+ Specify the branch alias where you want to import your content. If not specified, the content is imported into the
2377
+ main branch by default.
2378
+
2379
+ --exclude-global-modules
2380
+ Excludes the branch-independent module from the import operation.
2381
+
2382
+ --import-webhook-status=<option>
2383
+ [default: disable] [default: disable] (optional) This webhook state keeps the same state of webhooks as the source
2384
+ stack. <options: disable|current>
2385
+ <options: disable|current>
2386
+
2387
+ --module=<value>
2388
+ [optional] Specify the module to import into the target stack. If not specified, the import command will import all
2389
+ the modules into the stack. The available modules are assets, content-types, entries, environments, extensions,
2390
+ marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, personalize projects,
2391
+ taxonomies, and composable-studio.
2392
+
2393
+ --personalize-project-name=<value>
2394
+ (optional) Provide a unique name for the Personalize project.
2395
+
2396
+ --replace-existing
2397
+ Replaces the existing module in the target stack.
2398
+
2399
+ --skip-assets-publish
2400
+ Skips asset publishing during the import process.
2401
+
2402
+ --skip-audit
2403
+ Skips the audit fix that occurs during an import operation.
2404
+
2405
+ --skip-entries-publish
2406
+ Skips entry publishing during the import process
2407
+
2408
+ --skip-existing
2409
+ Skips the module exists warning messages.
2928
2410
 
2929
2411
  DESCRIPTION
2930
2412
  Import content from a stack
2931
2413
 
2932
- ALIASES
2933
- $ csdx cm:import
2934
-
2935
2414
  EXAMPLES
2936
2415
  $ csdx cm:stacks:import --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
2937
2416
 
@@ -2961,14 +2440,14 @@ USAGE
2961
2440
  $ csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]
2962
2441
 
2963
2442
  FLAGS
2964
- -B, --branch=<value> The name of the branch where you want to import your content. If you don't mention the
2965
- branch name, then by default the content will be imported to the main branch.
2966
2443
  -a, --alias=<value> The management token of the destination stack where you will import the content.
2967
2444
  -d, --data-dir=<value> The path or the location in your file system where the content, you intend to import, is
2968
2445
  stored. For example, -d "C:\Users\Name\Desktop\cli\content". If the export folder has
2969
2446
  branches involved, then the path should point till the particular branch. For example,
2970
2447
  “-d "C:\Users\Name\Desktop\cli\content\branch_name"
2971
2448
  -k, --stack-api-key=<value> API key of the target stack
2449
+ --branch=<value> The name of the branch where you want to import your content. If you don't mention the
2450
+ branch name, then by default the content will be imported to the main branch.
2972
2451
  --branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
2973
2452
  content is imported into the main branch by default.
2974
2453
  --module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
@@ -2978,15 +2457,8 @@ FLAGS
2978
2457
  DESCRIPTION
2979
2458
  Helps to generate mappers and backup folder for importing (overwriting) specific modules
2980
2459
 
2981
- ALIASES
2982
- $ csdx cm:import-setup
2983
-
2984
2460
  EXAMPLES
2985
- $ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
2986
-
2987
- $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name>
2988
-
2989
- $ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name> -b <branch_name>
2461
+ $ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name> --branch <branch_name>
2990
2462
  ```
2991
2463
 
2992
2464
  _See code: [@contentstack/cli-cm-import-setup](https://github.com/contentstack/cli/blob/main/packages/contentstack-import-setup/src/commands/cm/stacks/import-setup.ts)_
@@ -3001,12 +2473,12 @@ USAGE
3001
2473
  [--config <value>] [--multiple]
3002
2474
 
3003
2475
  FLAGS
3004
- -B, --branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
3005
- branch name)
3006
2476
  -a, --alias=<value> Use this flag to add the management token alias. You must use either the --alias flag or
3007
2477
  the --stack-api-key flag.
3008
2478
  -k, --stack-api-key=<value> Use this flag to add the API key of your stack. You must use either the --stack-api-key
3009
2479
  flag or the --alias flag.
2480
+ --branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
2481
+ branch name)
3010
2482
  --config=<value>... [optional] Inline configuration, <key1>:<value1>. Passing an external configuration makes
3011
2483
  the script re-usable.
3012
2484
  --config-file=<value> [optional] Path of the JSON configuration file.
@@ -3017,13 +2489,10 @@ FLAGS
3017
2489
  DESCRIPTION
3018
2490
  Contentstack migration script.
3019
2491
 
3020
- ALIASES
3021
- $ csdx cm:migration
3022
-
3023
2492
  EXAMPLES
3024
- $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>
2493
+ $ csdx cm:migration --file-path <migration/script/file/path> --stack-api-key <stack-api-key>
3025
2494
 
3026
- $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>
2495
+ $ csdx cm:migration --file-path <migration/script/file/path> --stack-api-key <stack-api-key> --branch <target branch name>
3027
2496
 
3028
2497
  $ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>
3029
2498
 
@@ -3031,7 +2500,7 @@ EXAMPLES
3031
2500
 
3032
2501
  $ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
3033
2502
 
3034
- $ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
2503
+ $ csdx cm:migration --alias <management-token-alias> --file-path <migration/script/file/path>
3035
2504
  ```
3036
2505
 
3037
2506
  _See code: [@contentstack/cli-migration](https://github.com/contentstack/cli/blob/main/packages/contentstack-migration/src/commands/cm/stacks/migration.js)_
@@ -3187,30 +2656,26 @@ EXAMPLES
3187
2656
 
3188
2657
  _See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-revert.js)_
3189
2658
 
3190
- ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`
2659
+ ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`
3191
2660
 
3192
2661
  Create a stack from existing content types, entries, assets, etc
3193
2662
 
3194
2663
  ```
3195
2664
  USAGE
3196
- $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]
3197
- [--locale <value>]
2665
+ $ csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes
2666
+ <value>] [--alias <value>] [--locale <value>]
3198
2667
 
3199
2668
  FLAGS
3200
2669
  -a, --alias=<value> Alias of the management token
3201
2670
  -k, --stack-api-key=<value> Provide stack API key to seed content to
3202
2671
  -n, --stack-name=<value> Name of a new stack that needs to be created.
3203
- -o, --org=<value> Provide Organization UID to create a new stack
3204
- -r, --repo=<value> GitHub organization name or GitHub user name/repository name.
3205
- -s, --stack=<value> Provide the stack UID to seed content.
3206
2672
  -y, --yes=<value> [Optional] Skip the stack confirmation.
2673
+ --org=<value> Provide Organization UID to create a new stack
2674
+ --repo=<value> GitHub organization name or GitHub user name/repository name.
3207
2675
 
3208
2676
  DESCRIPTION
3209
2677
  Create a stack from existing content types, entries, assets, etc
3210
2678
 
3211
- ALIASES
3212
- $ csdx cm:seed
3213
-
3214
2679
  EXAMPLES
3215
2680
  $ csdx cm:stacks:seed
3216
2681
 
@@ -3669,21 +3134,22 @@ Set region for CLI
3669
3134
 
3670
3135
  ```
3671
3136
  USAGE
3672
- $ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>] [--developer-hub <value>]
3673
- [--personalize <value>] [--launch <value>]
3137
+ $ csdx config:set:region [REGION] [--cda <value> --cma <value> --ui-host <value> -n <value>] [--developer-hub
3138
+ <value>] [--personalize <value>] [--launch <value>] [--studio <value>]
3674
3139
 
3675
3140
  ARGUMENTS
3676
3141
  [REGION] Name for the region
3677
3142
 
3678
3143
  FLAGS
3679
- -d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and
3144
+ -n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
3145
+ --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and
3680
3146
  name flags are required
3681
- -m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host
3147
+ --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host
3682
3148
  and name flags are required
3683
- -n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
3684
3149
  --developer-hub=<value> Custom host to set for Developer hub API
3685
3150
  --launch=<value> Custom host to set for Launch API
3686
3151
  --personalize=<value> Custom host to set for Personalize API
3152
+ --studio=<value> Custom host to set for Studio API
3687
3153
  --ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are
3688
3154
  required
3689
3155
 
@@ -3715,7 +3181,9 @@ EXAMPLES
3715
3181
 
3716
3182
  $ 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
3183
 
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>
3184
+ $ 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>
3185
+
3186
+ $ 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
3187
  ```
3720
3188
 
3721
3189
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/region.ts)_
@@ -3738,7 +3206,7 @@ DESCRIPTION
3738
3206
  Display help for csdx.
3739
3207
  ```
3740
3208
 
3741
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.35/src/commands/help.ts)_
3209
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
3742
3210
 
3743
3211
  ## `csdx launch`
3744
3212
 
@@ -4055,7 +3523,7 @@ EXAMPLES
4055
3523
  $ csdx plugins
4056
3524
  ```
4057
3525
 
4058
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/index.ts)_
3526
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/index.ts)_
4059
3527
 
4060
3528
  ## `csdx plugins:add PLUGIN`
4061
3529
 
@@ -4129,7 +3597,7 @@ EXAMPLES
4129
3597
  $ csdx plugins:inspect myplugin
4130
3598
  ```
4131
3599
 
4132
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/inspect.ts)_
3600
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/inspect.ts)_
4133
3601
 
4134
3602
  ## `csdx plugins:install PLUGIN`
4135
3603
 
@@ -4178,7 +3646,7 @@ EXAMPLES
4178
3646
  $ csdx plugins:install someuser/someplugin
4179
3647
  ```
4180
3648
 
4181
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/install.ts)_
3649
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/install.ts)_
4182
3650
 
4183
3651
  ## `csdx plugins:link PATH`
4184
3652
 
@@ -4209,7 +3677,7 @@ EXAMPLES
4209
3677
  $ csdx plugins:link myplugin
4210
3678
  ```
4211
3679
 
4212
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/link.ts)_
3680
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/link.ts)_
4213
3681
 
4214
3682
  ## `csdx plugins:remove [PLUGIN]`
4215
3683
 
@@ -4250,7 +3718,7 @@ FLAGS
4250
3718
  --reinstall Reinstall all plugins after uninstalling.
4251
3719
  ```
4252
3720
 
4253
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/reset.ts)_
3721
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/reset.ts)_
4254
3722
 
4255
3723
  ## `csdx plugins:uninstall [PLUGIN]`
4256
3724
 
@@ -4278,7 +3746,7 @@ EXAMPLES
4278
3746
  $ csdx plugins:uninstall myplugin
4279
3747
  ```
4280
3748
 
4281
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/uninstall.ts)_
3749
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/uninstall.ts)_
4282
3750
 
4283
3751
  ## `csdx plugins:unlink [PLUGIN]`
4284
3752
 
@@ -4322,7 +3790,7 @@ DESCRIPTION
4322
3790
  Update installed plugins.
4323
3791
  ```
4324
3792
 
4325
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/update.ts)_
3793
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
4326
3794
 
4327
3795
  ## `csdx tokens`
4328
3796
 
@@ -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": "2.0.0-beta.2"
3
+ "version": "2.0.0-beta.4"
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": "2.0.0-beta.2",
4
+ "version": "2.0.0-beta.4",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run.js"
@@ -22,29 +22,28 @@
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.2",
27
- "@contentstack/cli-cm-bootstrap": "~2.0.0-beta.2",
25
+ "@contentstack/cli-audit": "~2.0.0-beta.1",
26
+ "@contentstack/cli-auth": "~2.0.0-beta.1",
27
+ "@contentstack/cli-cm-bootstrap": "~2.0.0-beta.3",
28
28
  "@contentstack/cli-cm-branches": "~1.6.1",
29
- "@contentstack/cli-cm-bulk-publish": "~1.10.1",
30
- "@contentstack/cli-cm-clone": "~2.0.0-beta.2",
31
- "@contentstack/cli-cm-export": "~2.0.0-beta.2",
32
- "@contentstack/cli-cm-export-to-csv": "~1.10.0",
33
- "@contentstack/cli-cm-import": "~2.0.0-beta.2",
34
- "@contentstack/cli-cm-import-setup": "1.7.0",
35
- "@contentstack/cli-cm-migrate-rte": "~1.6.2",
36
- "@contentstack/cli-cm-seed": "~2.0.0-beta.2",
37
- "@contentstack/cli-command": "~1.6.2",
38
- "@contentstack/cli-config": "~1.15.3",
39
- "@contentstack/cli-launch": "^1.9.2",
40
- "@contentstack/cli-migration": "~1.8.2",
29
+ "@contentstack/cli-cm-bulk-publish": "~1.10.3",
30
+ "@contentstack/cli-cm-clone": "~2.0.0-beta.4",
31
+ "@contentstack/cli-cm-export": "~2.0.0-beta.4",
32
+ "@contentstack/cli-cm-export-to-csv": "~1.10.1",
33
+ "@contentstack/cli-cm-import": "~2.0.0-beta.3",
34
+ "@contentstack/cli-cm-import-setup": "~2.0.0-beta.2",
35
+ "@contentstack/cli-cm-seed": "~2.0.0-beta.3",
36
+ "@contentstack/cli-command": "~1.7.0",
37
+ "@contentstack/cli-config": "~1.16.1",
38
+ "@contentstack/cli-launch": "1.9.3",
39
+ "@contentstack/cli-migration": "~2.0.0-beta.1",
41
40
  "@contentstack/cli-utilities": "~1.15.0",
42
- "@contentstack/cli-variants": "~2.0.0-beta.2",
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",
46
45
  "@oclif/plugin-not-found": "^3.2.53",
47
- "@oclif/plugin-plugins": "^5.4.38",
46
+ "@oclif/plugin-plugins": "^5.4.54",
48
47
  "chalk": "^4.1.2",
49
48
  "cli-progress": "^3.12.0",
50
49
  "debug": "^4.4.1",
@@ -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",