@contentstack/cli 0.1.1-beta.8 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1149 -631
- package/bin/run +1 -4
- package/lib/config/index.js +9 -0
- package/lib/help.js +38 -0
- package/lib/hooks/init/context-init.js +10 -0
- package/lib/hooks/init/utils-init.js +12 -0
- package/lib/hooks/prerun/auth-guard.js +40 -0
- package/lib/hooks/prerun/command-deprecation-check.js +10 -0
- package/lib/index.js +3 -0
- package/lib/interfaces/index.js +2 -0
- package/lib/utils/context-handler.js +39 -0
- package/lib/utils/index.js +5 -0
- package/oclif.manifest.json +1 -1
- package/package.json +98 -64
- package/src/commands/config/get/region.js +0 -17
- package/src/commands/config/set/region.js +0 -70
- package/src/help.js +0 -20
- package/src/hooks/init.js +0 -21
- package/src/hooks/prerun/analytics.js +0 -40
- package/src/hooks/prerun/print-region.js +0 -11
- package/src/hooks/validate-auth-token.js +0 -7
- package/src/hooks/validate-management-token.js +0 -19
- package/src/index.js +0 -1
- package/src/util/analytics.js +0 -61
- package/src/util/contentstack-client.js +0 -17
- package/src/util/custom-errors.js +0 -7
- package/src/util/request.js +0 -71
- package/src/util/user-config.js +0 -128
package/README.md
CHANGED
|
@@ -1,58 +1,66 @@
|
|
|
1
|
-
@contentstack/cli
|
|
2
|
-
===
|
|
1
|
+
# @contentstack/cli-auth
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
It is Contentstack’s CLI plugin to perform authentication-related activities. To get started with authenticating yourself with the CLI, refer to the [CLI’s Authentication documentation](https://www.contentstack.com/docs/developers/cli/authentication)
|
|
5
4
|
|
|
6
5
|
[](https://github.com/contentstack/cli/blob/main/LICENSE)
|
|
7
6
|
|
|
8
7
|
<!-- toc -->
|
|
8
|
+
* [@contentstack/cli-auth](#contentstackcli-auth)
|
|
9
9
|
* [Usage](#usage)
|
|
10
10
|
* [Commands](#commands)
|
|
11
11
|
<!-- tocstop -->
|
|
12
|
+
|
|
12
13
|
# Usage
|
|
14
|
+
|
|
13
15
|
<!-- usage -->
|
|
14
16
|
```sh-session
|
|
15
17
|
$ npm install -g @contentstack/cli
|
|
16
18
|
$ csdx COMMAND
|
|
17
19
|
running command...
|
|
18
20
|
$ csdx (-v|--version|version)
|
|
19
|
-
@contentstack/cli/0.1
|
|
21
|
+
@contentstack/cli/1.0.1 linux-x64 node-v16.15.1
|
|
20
22
|
$ csdx --help [COMMAND]
|
|
21
23
|
USAGE
|
|
22
24
|
$ csdx COMMAND
|
|
23
25
|
...
|
|
24
26
|
```
|
|
25
27
|
<!-- usagestop -->
|
|
28
|
+
|
|
26
29
|
# Commands
|
|
30
|
+
|
|
27
31
|
<!-- commands -->
|
|
28
32
|
* [`csdx auth:login`](#csdx-authlogin)
|
|
29
33
|
* [`csdx auth:logout`](#csdx-authlogout)
|
|
30
34
|
* [`csdx auth:tokens`](#csdx-authtokens)
|
|
31
|
-
* [`csdx auth:tokens:add`](#csdx-authtokensadd)
|
|
35
|
+
* [`csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]`](#csdx-authtokensadd--a-value---delivery---management--e-value--k-value--y---token-value)
|
|
32
36
|
* [`csdx auth:tokens:remove`](#csdx-authtokensremove)
|
|
33
37
|
* [`csdx auth:whoami`](#csdx-authwhoami)
|
|
38
|
+
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>] [--content-types <value>]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value---content-types-value)
|
|
39
|
+
* [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish)
|
|
40
|
+
* [`csdx cm:bootstrap`](#csdx-cmbootstrap)
|
|
34
41
|
* [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
|
|
35
|
-
* [`csdx cm:bulk-publish:
|
|
36
|
-
* [`csdx cm:
|
|
37
|
-
* [`csdx cm:bulk-publish
|
|
38
|
-
* [`csdx cm:bulk-publish
|
|
39
|
-
* [`csdx cm:bulk-publish
|
|
40
|
-
* [`csdx cm:bulk-publish
|
|
41
|
-
* [`csdx cm:
|
|
42
|
-
* [`csdx cm:bulk-publish
|
|
43
|
-
* [`csdx cm:bulk-publish:revert`](#csdx-cmbulk-publishrevert)
|
|
44
|
-
* [`csdx cm:bulk-publish:unpublish`](#csdx-cmbulk-publishunpublish)
|
|
45
|
-
* [`csdx cm:bulk-publish:unpublished-entries`](#csdx-cmbulk-publishunpublished-entries)
|
|
46
|
-
* [`csdx cm:export`](#csdx-cmexport)
|
|
42
|
+
* [`csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]`](#csdx-cmbulk-publishcross-publish--a-value---retry-failed-value---bulk-publish-value---content-type-value---locales-value---source-env-value---environments-value---delivery-token-value--c-value--y---branch-value---onlyassets---onlyentries)
|
|
43
|
+
* [`csdx cm:entries:migrate-html-rte`](#csdx-cmentriesmigrate-html-rte)
|
|
44
|
+
* [`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>]`](#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)
|
|
45
|
+
* [`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)
|
|
46
|
+
* [`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)
|
|
47
|
+
* [`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)
|
|
48
|
+
* [`csdx cm:entries:unpublish`](#csdx-cmentriesunpublish)
|
|
49
|
+
* [`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)
|
|
47
50
|
* [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
|
|
48
|
-
* [`csdx cm:import`](#csdx-
|
|
49
|
-
* [`csdx cm:
|
|
50
|
-
* [`csdx cm:
|
|
51
|
+
* [`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)
|
|
52
|
+
* [`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)
|
|
53
|
+
* [`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)
|
|
54
|
+
* [`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)
|
|
55
|
+
* [`csdx cm:stacks:publish`](#csdx-cmstackspublish)
|
|
56
|
+
* [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs)
|
|
57
|
+
* [`csdx cm:stacks:publish-configure`](#csdx-cmstackspublish-configure)
|
|
58
|
+
* [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert)
|
|
59
|
+
* [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value)
|
|
60
|
+
* [`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)
|
|
51
61
|
* [`csdx config:get:region`](#csdx-configgetregion)
|
|
52
62
|
* [`csdx config:set:region [REGION]`](#csdx-configsetregion-region)
|
|
53
|
-
* [`csdx help [COMMAND]`](#csdx-help-command)
|
|
54
63
|
* [`csdx plugins`](#csdx-plugins)
|
|
55
|
-
* [`csdx plugins:create`](#csdx-pluginscreate)
|
|
56
64
|
* [`csdx plugins:inspect PLUGIN...`](#csdx-pluginsinspect-plugin)
|
|
57
65
|
* [`csdx plugins:install PLUGIN...`](#csdx-pluginsinstall-plugin)
|
|
58
66
|
* [`csdx plugins:link PLUGIN`](#csdx-pluginslink-plugin)
|
|
@@ -61,1031 +69,1537 @@ USAGE
|
|
|
61
69
|
|
|
62
70
|
## `csdx auth:login`
|
|
63
71
|
|
|
64
|
-
|
|
72
|
+
User sessions login
|
|
65
73
|
|
|
66
74
|
```
|
|
67
|
-
Login to Contentstack and save the session for further use
|
|
68
|
-
|
|
69
75
|
USAGE
|
|
70
|
-
$ csdx auth:login
|
|
76
|
+
$ csdx auth:login [-u <value>] [-p <value>]
|
|
71
77
|
|
|
72
|
-
|
|
73
|
-
-
|
|
78
|
+
FLAGS
|
|
79
|
+
-p, --password=<value> Password
|
|
80
|
+
-u, --username=<value> User name
|
|
81
|
+
|
|
82
|
+
DESCRIPTION
|
|
83
|
+
User sessions login
|
|
74
84
|
|
|
75
85
|
ALIASES
|
|
76
86
|
$ csdx login
|
|
87
|
+
|
|
88
|
+
EXAMPLES
|
|
89
|
+
$ csdx auth:login
|
|
90
|
+
|
|
91
|
+
$ csdx auth:login -u <username>
|
|
92
|
+
|
|
93
|
+
$ csdx auth:login -u <username> -p <password>
|
|
94
|
+
|
|
95
|
+
$ csdx auth:login --username <username>
|
|
96
|
+
|
|
97
|
+
$ csdx auth:login --username <username> --password <password>
|
|
77
98
|
```
|
|
78
99
|
|
|
79
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
100
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/login.ts)_
|
|
80
101
|
|
|
81
102
|
## `csdx auth:logout`
|
|
82
103
|
|
|
83
|
-
|
|
104
|
+
User session logout
|
|
84
105
|
|
|
85
106
|
```
|
|
86
|
-
Log out from Contentstack and clear the session
|
|
87
|
-
|
|
88
107
|
USAGE
|
|
89
|
-
$ csdx auth:logout
|
|
108
|
+
$ csdx auth:logout [-y]
|
|
109
|
+
|
|
110
|
+
FLAGS
|
|
111
|
+
-y, --yes Force log out by skipping the confirmation
|
|
90
112
|
|
|
91
|
-
|
|
92
|
-
|
|
113
|
+
DESCRIPTION
|
|
114
|
+
User session logout
|
|
93
115
|
|
|
94
116
|
ALIASES
|
|
95
117
|
$ csdx logout
|
|
118
|
+
|
|
119
|
+
EXAMPLES
|
|
120
|
+
$ csdx auth:logout
|
|
121
|
+
|
|
122
|
+
$ csdx auth:logout -y
|
|
123
|
+
|
|
124
|
+
$ csdx auth:logout --yes
|
|
96
125
|
```
|
|
97
126
|
|
|
98
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
127
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/logout.ts)_
|
|
99
128
|
|
|
100
129
|
## `csdx auth:tokens`
|
|
101
130
|
|
|
102
131
|
Lists all existing tokens added to the session
|
|
103
132
|
|
|
104
133
|
```
|
|
105
|
-
Lists all existing tokens added to the session
|
|
106
|
-
|
|
107
|
-
|
|
108
134
|
USAGE
|
|
109
|
-
$ csdx auth:tokens
|
|
135
|
+
$ csdx auth:tokens [--columns <value>] [--sort <value>] [--filter <value>] [--csv] [--output csv|json|yaml]
|
|
136
|
+
[-x] [--no-truncate] [--no-header]
|
|
137
|
+
|
|
138
|
+
FLAGS
|
|
139
|
+
-x, --extended show extra columns
|
|
140
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
141
|
+
--csv output is csv format [alias: --output=csv]
|
|
142
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
143
|
+
--no-header hide table header from output
|
|
144
|
+
--no-truncate do not truncate output to fit screen
|
|
145
|
+
--output=<option> output in a more machine friendly format
|
|
146
|
+
<options: csv|json|yaml>
|
|
147
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
110
148
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
--columns=columns only show provided columns (comma-separated)
|
|
114
|
-
--csv output is csv format [alias: --output=csv]
|
|
115
|
-
--filter=filter filter property by partial string matching, ex: name=foo
|
|
116
|
-
--no-header hide table header from output
|
|
117
|
-
--no-truncate do not truncate output to fit screen
|
|
118
|
-
--output=csv|json|yaml output in a more machine friendly format
|
|
119
|
-
--sort=sort property to sort by (prepend '-' for descending)
|
|
149
|
+
DESCRIPTION
|
|
150
|
+
Lists all existing tokens added to the session
|
|
120
151
|
|
|
121
152
|
ALIASES
|
|
122
153
|
$ csdx tokens
|
|
154
|
+
|
|
155
|
+
EXAMPLES
|
|
156
|
+
$ csdx auth:tokens
|
|
123
157
|
```
|
|
124
158
|
|
|
125
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
159
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/tokens/index.ts)_
|
|
126
160
|
|
|
127
|
-
## `csdx auth:tokens:add`
|
|
161
|
+
## `csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]`
|
|
128
162
|
|
|
129
|
-
Adds management/delivery tokens to your session to use it with
|
|
163
|
+
Adds management/delivery tokens to your session to use it with other CLI commands
|
|
130
164
|
|
|
131
165
|
```
|
|
132
|
-
Adds management/delivery tokens to your session to use it with further CLI command
|
|
133
|
-
by default it adds management token if either of management or delivery flags are not set
|
|
134
|
-
|
|
135
166
|
USAGE
|
|
167
|
+
$ csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]
|
|
168
|
+
|
|
169
|
+
FLAGS
|
|
170
|
+
-a, --alias=<value> Name of the token alias
|
|
171
|
+
-d, --delivery Set this flag to save delivery token
|
|
172
|
+
-e, --environment=<value> Environment name for delivery token
|
|
173
|
+
-k, --stack-api-key=<value> Stack API Key
|
|
174
|
+
-m, --management Set this flag to save management token
|
|
175
|
+
-t, --token=<value> Add the token name
|
|
176
|
+
-y, --yes Use this flag to skip confirmation
|
|
177
|
+
|
|
178
|
+
DESCRIPTION
|
|
179
|
+
Adds management/delivery tokens to your session to use it with other CLI commands
|
|
180
|
+
|
|
181
|
+
EXAMPLES
|
|
136
182
|
$ csdx auth:tokens:add
|
|
137
183
|
|
|
138
|
-
|
|
139
|
-
-a, --alias=alias
|
|
140
|
-
-d, --delivery Set this while saving delivery token
|
|
141
|
-
-e, --environment=environment Environment name for delivery token
|
|
142
|
-
-f, --force Exclude confirmation to replace existing alias
|
|
143
|
-
-k, --api-key=api-key Stack API key for the token
|
|
144
|
-
-m, --management Set this while saving management token
|
|
184
|
+
$ csdx auth:tokens:add -a <alias>
|
|
145
185
|
|
|
146
|
-
|
|
147
|
-
variable
|
|
186
|
+
$ csdx auth:tokens:add -k <stack api key>
|
|
148
187
|
|
|
149
|
-
|
|
150
|
-
by default it adds management token if either of management or delivery flags are not set
|
|
188
|
+
$ csdx auth:tokens:add --delivery
|
|
151
189
|
|
|
152
|
-
|
|
153
|
-
|
|
190
|
+
$ csdx auth:tokens:add --management
|
|
191
|
+
|
|
192
|
+
$ csdx auth:tokens:add -e <environment>
|
|
193
|
+
|
|
194
|
+
$ csdx auth:tokens:add --token <token>
|
|
195
|
+
|
|
196
|
+
$ csdx auth:tokens:add -a <alias> -k <stack api key> --management --token <management token>
|
|
197
|
+
|
|
198
|
+
$ csdx auth:tokens:add -a <alias> -k <stack api key> --delivery -e <environment> --token <delivery token>
|
|
199
|
+
|
|
200
|
+
$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --management --token <management token>
|
|
201
|
+
|
|
202
|
+
$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --delivery -e <environment> --token <delivery token>
|
|
154
203
|
```
|
|
155
204
|
|
|
156
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
205
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/tokens/add.ts)_
|
|
157
206
|
|
|
158
207
|
## `csdx auth:tokens:remove`
|
|
159
208
|
|
|
160
|
-
Removes
|
|
209
|
+
Removes selected tokens
|
|
161
210
|
|
|
162
211
|
```
|
|
163
|
-
Removes stored tokens
|
|
164
|
-
|
|
165
212
|
USAGE
|
|
166
|
-
$ csdx auth:tokens:remove
|
|
213
|
+
$ csdx auth:tokens:remove [-a <value>] [-i]
|
|
167
214
|
|
|
168
|
-
|
|
169
|
-
-a, --alias
|
|
215
|
+
FLAGS
|
|
216
|
+
-a, --alias=<value> Token alias
|
|
217
|
+
-i, --ignore Ignore
|
|
170
218
|
|
|
171
|
-
|
|
172
|
-
|
|
219
|
+
DESCRIPTION
|
|
220
|
+
Removes selected tokens
|
|
173
221
|
|
|
174
|
-
|
|
175
|
-
$ csdx tokens:remove
|
|
222
|
+
EXAMPLES
|
|
223
|
+
$ csdx auth:tokens:remove
|
|
224
|
+
|
|
225
|
+
$ csdx auth:tokens:remove -a <alias>
|
|
176
226
|
```
|
|
177
227
|
|
|
178
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
228
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/tokens/remove.ts)_
|
|
179
229
|
|
|
180
230
|
## `csdx auth:whoami`
|
|
181
231
|
|
|
182
232
|
Display current users email address
|
|
183
233
|
|
|
184
234
|
```
|
|
185
|
-
Display current users email address
|
|
186
|
-
|
|
187
|
-
|
|
188
235
|
USAGE
|
|
189
236
|
$ csdx auth:whoami
|
|
190
237
|
|
|
238
|
+
DESCRIPTION
|
|
239
|
+
Display current users email address
|
|
240
|
+
|
|
191
241
|
ALIASES
|
|
192
242
|
$ csdx whoami
|
|
243
|
+
|
|
244
|
+
EXAMPLES
|
|
245
|
+
$ csdx auth:whoami
|
|
193
246
|
```
|
|
194
247
|
|
|
195
|
-
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/
|
|
248
|
+
_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/auth/whoami.ts)_
|
|
196
249
|
|
|
197
|
-
## `csdx cm:bulk-publish`
|
|
250
|
+
## `csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>] [--content-types <value>]`
|
|
198
251
|
|
|
199
|
-
|
|
252
|
+
Publish assets to the specified environments
|
|
200
253
|
|
|
201
254
|
```
|
|
202
|
-
|
|
255
|
+
USAGE
|
|
256
|
+
$ csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish
|
|
257
|
+
<value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
|
|
258
|
+
[--content-types <value>]
|
|
259
|
+
|
|
260
|
+
FLAGS
|
|
261
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
262
|
+
selected)
|
|
263
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
264
|
+
-c, --config=<value> Path to the config file
|
|
265
|
+
-e, --environments=<value> Environments where assets will be published
|
|
266
|
+
-l, --locales=<value> Locales to where assets will be published
|
|
267
|
+
-y, --yes Agree to process the command with the current configuration
|
|
268
|
+
--bulk-publish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
|
|
269
|
+
bulkpublish API will be used to publish the assets
|
|
270
|
+
--content-types=<value> Content types
|
|
271
|
+
--delivery-token=<value> Delivery token for source environment
|
|
272
|
+
--folder-uid=<value> [default: cs_root] Folder-uid from where the assets will be published
|
|
273
|
+
--retry-failed=<value> Retry publishing failed assets from the logfile (optional, will override all other flags)
|
|
274
|
+
--source-env=<value> Source environment
|
|
203
275
|
|
|
276
|
+
DESCRIPTION
|
|
277
|
+
Publish assets to the specified environments
|
|
204
278
|
|
|
205
|
-
|
|
206
|
-
|
|
279
|
+
The assets command is used to publish assets from the specified stack, to the specified environments
|
|
280
|
+
|
|
281
|
+
Note: Environment(s) and Locale(s) are required to execute the command successfully
|
|
282
|
+
|
|
283
|
+
But, if retryFailed flag is set, then only a logfile is required
|
|
284
|
+
|
|
285
|
+
ALIASES
|
|
286
|
+
$ csdx cm:bulk-publish:assets
|
|
287
|
+
|
|
288
|
+
EXAMPLES
|
|
289
|
+
General Usage
|
|
290
|
+
|
|
291
|
+
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
Using --config or -c flag
|
|
296
|
+
|
|
297
|
+
Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
|
|
298
|
+
|
|
299
|
+
$ csdx cm:assets:publish --config [PATH TO CONFIG FILE]
|
|
300
|
+
|
|
301
|
+
$ csdx cm:assets:publish -c [PATH TO CONFIG FILE]
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
Using --retry-failed flag
|
|
306
|
+
|
|
307
|
+
$ csdx cm:assets:publish --retry-failed [LOG FILE NAME]
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
Using --branch flag
|
|
312
|
+
|
|
313
|
+
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
Using --source-env
|
|
318
|
+
|
|
319
|
+
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
207
320
|
```
|
|
208
321
|
|
|
209
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
322
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/assets/publish.js)_
|
|
210
323
|
|
|
211
|
-
## `csdx cm:
|
|
324
|
+
## `csdx cm:assets:unpublish`
|
|
212
325
|
|
|
213
|
-
|
|
326
|
+
Unpublish assets from given environment
|
|
214
327
|
|
|
215
328
|
```
|
|
216
|
-
|
|
217
|
-
|
|
329
|
+
USAGE
|
|
330
|
+
$ csdx cm:assets:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
|
|
331
|
+
[--retry-failed <value>] [--bulk-unpublish <value>] [--delivery-token <value>]
|
|
332
|
+
|
|
333
|
+
FLAGS
|
|
334
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
335
|
+
-c, --config=<value> Path to the config file
|
|
336
|
+
-e, --environment=<value> Source Environment
|
|
337
|
+
-y, --yes Agree to process the command with the current configuration
|
|
338
|
+
--branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
339
|
+
selected)
|
|
340
|
+
--bulk-unpublish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
|
|
341
|
+
bulkpublish API will be used to unpublish the assets
|
|
342
|
+
--delivery-token=<value> Delivery Token for source environment
|
|
343
|
+
--locale=<value> Locale filter
|
|
344
|
+
--retry-failed=<value> Retry unpublishing failed assets from the logfile
|
|
345
|
+
|
|
346
|
+
DESCRIPTION
|
|
347
|
+
Unpublish assets from given environment
|
|
348
|
+
|
|
349
|
+
The unpublish command is used for unpublishing assets from the given environment
|
|
350
|
+
|
|
351
|
+
Note: Environment (Source Environment) and Locale are required to execute the command successfully
|
|
352
|
+
|
|
353
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
354
|
+
|
|
355
|
+
EXAMPLES
|
|
356
|
+
General Usage
|
|
357
|
+
|
|
358
|
+
$ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
Using --config or -c flag
|
|
363
|
+
|
|
364
|
+
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
|
|
365
|
+
|
|
366
|
+
$ csdx cm:assets:unpublish --config [PATH TO CONFIG FILE]
|
|
367
|
+
|
|
368
|
+
$ csdx cm:assets:unpublish -c [PATH TO CONFIG FILE]
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
Using --retry-failed flag
|
|
373
|
+
|
|
374
|
+
$ csdx cm:assets:unpublish --retry-failed [LOG FILE NAME]
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
Using --branch flag
|
|
379
|
+
|
|
380
|
+
$ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
381
|
+
```
|
|
218
382
|
|
|
219
|
-
|
|
220
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
383
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_
|
|
221
384
|
|
|
385
|
+
## `csdx cm:bootstrap`
|
|
222
386
|
|
|
387
|
+
Bootstrap contentstack apps
|
|
388
|
+
|
|
389
|
+
```
|
|
223
390
|
USAGE
|
|
224
|
-
$ csdx cm:
|
|
391
|
+
$ csdx cm:bootstrap [--app-name <value>] [--project-dir <value>] [-k <value>] [--org <value>] [-n <value>] [-y
|
|
392
|
+
<value>]
|
|
393
|
+
|
|
394
|
+
FLAGS
|
|
395
|
+
-k, --stack-api-key=<value> Provide stack API key to seed content
|
|
396
|
+
-n, --stack-name=<value> Name of a new stack that will be created.
|
|
397
|
+
-y, --yes=<value>
|
|
398
|
+
--app-name=<value> App name, reactjs-starter, nextjs-starter, gatsby-starter, angular-starter, nuxt-starter
|
|
399
|
+
--org=<value> Provide organization UID to create a new stack
|
|
400
|
+
--project-dir=<value> Directory to setup the project. If directory name has a space then provide the path as a
|
|
401
|
+
string or escap the space using back slash eg: "../../test space" or ../../test\ space
|
|
225
402
|
|
|
226
|
-
|
|
227
|
-
|
|
403
|
+
DESCRIPTION
|
|
404
|
+
Bootstrap contentstack apps
|
|
228
405
|
|
|
229
|
-
|
|
230
|
-
|
|
406
|
+
EXAMPLES
|
|
407
|
+
$ csdx cm:bootstrap
|
|
231
408
|
|
|
232
|
-
|
|
409
|
+
$ csdx cm:bootstrap --project-dir <path/to/setup/the/app>
|
|
233
410
|
|
|
234
|
-
|
|
411
|
+
$ csdx cm:bootstrap --app-name "reactjs-starter" --project-dir <path/to/setup/the/app>
|
|
235
412
|
|
|
236
|
-
|
|
413
|
+
$ csdx cm:bootstrap --app-name "reactjs-starter" --project-dir <path/to/setup/the/app> --stack-api-key "stack-api-key"
|
|
237
414
|
|
|
238
|
-
|
|
239
|
-
|
|
415
|
+
$ csdx cm:bootstrap --app-name "reactjs-starter" --project-dir <path/to/setup/the/app> --org "your-org-uid" --stack-name "stack-name"
|
|
416
|
+
```
|
|
240
417
|
|
|
241
|
-
|
|
418
|
+
_See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/v1.1.0/src/commands/cm/bootstrap.ts)_
|
|
242
419
|
|
|
243
|
-
|
|
420
|
+
## `csdx cm:bulk-publish`
|
|
421
|
+
|
|
422
|
+
Bulk Publish script for managing entries and assets
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
USAGE
|
|
426
|
+
$ csdx cm:bulk-publish
|
|
244
427
|
|
|
245
428
|
DESCRIPTION
|
|
246
|
-
|
|
247
|
-
|
|
429
|
+
Bulk Publish script for managing entries and assets
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_
|
|
433
|
+
|
|
434
|
+
## `csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]`
|
|
435
|
+
|
|
436
|
+
Publish entries and assets from one environment to other environments
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
USAGE
|
|
440
|
+
$ csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type
|
|
441
|
+
<value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>]
|
|
442
|
+
[-y] [--branch <value>] [--onlyAssets] [--onlyEntries]
|
|
443
|
+
|
|
444
|
+
FLAGS
|
|
445
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
446
|
+
selected)
|
|
447
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
448
|
+
-c, --config=<value> Path to the config file
|
|
449
|
+
-y, --yes Agree to process the command with the current configuration
|
|
450
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
451
|
+
bulkpublish API will be used to publish the entries
|
|
452
|
+
--content-type=<value> The Contenttypes from which entries will be published
|
|
453
|
+
--delivery-token=<value> Delivery token for source environment
|
|
454
|
+
--environments=<value> Destination Environments
|
|
455
|
+
--locales=<value> Source locale
|
|
456
|
+
--onlyAssets Unpublish only assets
|
|
457
|
+
--onlyEntries Unpublish only entries
|
|
458
|
+
--retry-failed=<value> (optional) Retry publishing failed entries from the logfile (this flag overrides all other
|
|
459
|
+
flags)
|
|
460
|
+
--source-env=<value> Source Env
|
|
461
|
+
|
|
462
|
+
DESCRIPTION
|
|
463
|
+
Publish entries and assets from one environment to other environments
|
|
464
|
+
|
|
465
|
+
The cross-publish command is used to publish entries and assets from one environment to other environments
|
|
466
|
+
|
|
467
|
+
Note: Content Type, Environment, Destination Environment(s) and Locale are required to execute the command
|
|
468
|
+
successfully
|
|
248
469
|
|
|
249
|
-
Content Types, Environments and Locales are required for executing the command successfully
|
|
250
470
|
But, if retryFailed flag is set, then only a logfile is required
|
|
251
471
|
|
|
252
472
|
EXAMPLES
|
|
253
473
|
General Usage
|
|
254
|
-
|
|
255
|
-
[
|
|
474
|
+
|
|
475
|
+
$ csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]
|
|
476
|
+
|
|
477
|
+
|
|
256
478
|
|
|
257
479
|
Using --config or -c flag
|
|
480
|
+
|
|
258
481
|
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
259
|
-
csdx cm:bulk-publish:add-fields --config [PATH TO CONFIG FILE]
|
|
260
|
-
csdx cm:bulk-publish:add-fields -c [PATH TO CONFIG FILE]
|
|
261
482
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
csdx cm:bulk-publish:
|
|
483
|
+
$ csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]
|
|
484
|
+
|
|
485
|
+
$ csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
Using --retry-failed flag
|
|
490
|
+
|
|
491
|
+
$ csdx cm:bulk-publish:cross-publish --retry-failed [LOG FILE NAME]
|
|
492
|
+
|
|
493
|
+
$ csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
Using --branch flag
|
|
498
|
+
|
|
499
|
+
$ csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
265
500
|
```
|
|
266
501
|
|
|
267
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
502
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
|
|
268
503
|
|
|
269
|
-
## `csdx cm:
|
|
504
|
+
## `csdx cm:entries:migrate-html-rte`
|
|
270
505
|
|
|
271
|
-
|
|
506
|
+
Migration script to migrate content from HTML RTE to JSON RTE
|
|
272
507
|
|
|
273
508
|
```
|
|
274
|
-
|
|
275
|
-
|
|
509
|
+
USAGE
|
|
510
|
+
$ csdx cm:entries:migrate-html-rte [-c <value>] [-a <value>] [--content-type <value>] [--global-field] [-y] [--html-path
|
|
511
|
+
<value>] [--json-path <value>] [--delay <value>] [--locale <value>] [--batch-limit <value>]
|
|
512
|
+
|
|
513
|
+
FLAGS
|
|
514
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
515
|
+
-c, --config-path=<value> Path to config file
|
|
516
|
+
-y, --yes Agree to process the command with the current configuration
|
|
517
|
+
--batch-limit=<value> [default: 50] Provide batch limit for updating entries
|
|
518
|
+
--content-type=<value> The content type from which entries will be migrated
|
|
519
|
+
--delay=<value> [default: 1000] Provide delay in ms between two entry update
|
|
520
|
+
--global-field This flag is set to false by default. It indicates that current content type is a
|
|
521
|
+
globalfield
|
|
522
|
+
--html-path=<value> Provide path of HTML RTE to migrate
|
|
523
|
+
--json-path=<value> Provide path of JSON RTE to migrate
|
|
524
|
+
--locale=<value> The locale from which entries will be migrated
|
|
276
525
|
|
|
277
|
-
|
|
278
|
-
|
|
526
|
+
DESCRIPTION
|
|
527
|
+
Migration script to migrate content from HTML RTE to JSON RTE
|
|
528
|
+
|
|
529
|
+
ALIASES
|
|
530
|
+
$ csdx cm:migrate-rte
|
|
531
|
+
|
|
532
|
+
EXAMPLES
|
|
533
|
+
General Usage
|
|
534
|
+
|
|
535
|
+
$ csdx cm:entries:migrate-html-rte --config-path path/to/config.json
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
Using Flags
|
|
540
|
+
|
|
541
|
+
$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path
|
|
279
542
|
|
|
280
543
|
|
|
544
|
+
|
|
545
|
+
Nested RTE
|
|
546
|
+
|
|
547
|
+
$ 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
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
$ 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
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
Global Field
|
|
556
|
+
|
|
557
|
+
$ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
_See code: [@contentstack/cli-cm-migrate-rte](https://github.com/contentstack/cli/blob/v1.1.1/src/commands/cm/entries/migrate-html-rte.js)_
|
|
561
|
+
|
|
562
|
+
## `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>]`
|
|
563
|
+
|
|
564
|
+
Publish entries from multiple contenttypes to multiple environments and locales
|
|
565
|
+
|
|
566
|
+
```
|
|
281
567
|
USAGE
|
|
282
|
-
$ csdx cm:bulk-publish
|
|
568
|
+
$ csdx cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>]
|
|
569
|
+
[--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch
|
|
570
|
+
<value>] [--delivery-token <value>] [--source-env <value>]
|
|
571
|
+
|
|
572
|
+
FLAGS
|
|
573
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
574
|
+
selected)
|
|
575
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
576
|
+
-c, --config=<value> Path for the external config file (A new config file can be generated at the current
|
|
577
|
+
working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)
|
|
578
|
+
-e, --environments=<value> Environments where entries will be published
|
|
579
|
+
-l, --locales=<value> Locales where entries will be published
|
|
580
|
+
-y, --yes Agree to process the command with the current configuration
|
|
581
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
582
|
+
bulkpublish API will be used to publish the entries
|
|
583
|
+
--content-types=<value> The Contenttypes from which entries need to be published
|
|
584
|
+
--delivery-token=<value> Delivery token for source environment
|
|
585
|
+
--publish-all-content-types (optional) Publish all contenttypes (cannot be set when contentTypes flag is set)
|
|
586
|
+
--retry-failed=<value> (optional) Retry failed entries from the logfile (overrides all other flags) This flag is
|
|
587
|
+
used to retry publishing entries that failed to publish in a previous attempt. A log file
|
|
588
|
+
for the previous session will be required for processing the failed entries
|
|
589
|
+
--source-env=<value> Source environment
|
|
590
|
+
|
|
591
|
+
DESCRIPTION
|
|
592
|
+
Publish entries from multiple contenttypes to multiple environments and locales
|
|
593
|
+
|
|
594
|
+
The publish command is used to publish entries from the specified content types, to the
|
|
595
|
+
|
|
596
|
+
specified environments and locales
|
|
597
|
+
|
|
598
|
+
Note: Content Types, Environments and Locales are required to execute the command successfully
|
|
599
|
+
|
|
600
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
601
|
+
|
|
602
|
+
ALIASES
|
|
603
|
+
$ csdx cm:bulk-publish:entries
|
|
604
|
+
|
|
605
|
+
EXAMPLES
|
|
606
|
+
General Usage
|
|
607
|
+
|
|
608
|
+
$ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
Using --config or -c flag
|
|
613
|
+
|
|
614
|
+
Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
|
|
615
|
+
|
|
616
|
+
$ csdx cm:entries:publish --config [PATH TO CONFIG FILE]
|
|
617
|
+
|
|
618
|
+
$ csdx cm:entries:publish -c [PATH TO CONFIG FILE]
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
Using --retry-failed
|
|
623
|
+
|
|
624
|
+
$ csdx cm:entries:publish --retry-failed [LOG FILE NAME]
|
|
625
|
+
|
|
626
|
+
$ csdx cm:entries:publish -r [LOG FILE NAME]
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
Using --branch
|
|
631
|
+
|
|
632
|
+
$ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
Using --source-env
|
|
637
|
+
|
|
638
|
+
$ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish.js)_
|
|
642
|
+
|
|
643
|
+
## `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>]`
|
|
644
|
+
|
|
645
|
+
Publish edited entries from a specified content type to the given locales and environments
|
|
646
|
+
|
|
647
|
+
```
|
|
648
|
+
USAGE
|
|
649
|
+
$ csdx cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env
|
|
650
|
+
<value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]
|
|
651
|
+
|
|
652
|
+
FLAGS
|
|
653
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
654
|
+
selected)
|
|
655
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
656
|
+
-c, --config=<value> Path to the config file
|
|
657
|
+
-e, --environments=<value> Destination environments
|
|
658
|
+
-l, --locales=<value> Locales where edited entries will be published
|
|
659
|
+
-y, --yes Agree to process the command with the current configuration
|
|
660
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
661
|
+
bulkpublish API will be used to publish the entries
|
|
662
|
+
--content-types=<value> The Contenttypes which will be checked for edited entries
|
|
663
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile (optional, overrides all other flags)
|
|
664
|
+
--source-env=<value> Environment from which edited entries will be published
|
|
665
|
+
|
|
666
|
+
DESCRIPTION
|
|
667
|
+
Publish edited entries from a specified content type to the given locales and environments
|
|
668
|
+
|
|
669
|
+
The publish-modified command is used to publish entries from the specified content types, to the
|
|
670
|
+
|
|
671
|
+
specified environments and locales
|
|
672
|
+
|
|
673
|
+
Note: Content type(s), Source Environment, Destination Environment(s) and Locale(s) are required to execute the
|
|
674
|
+
command successfully
|
|
675
|
+
|
|
676
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
677
|
+
|
|
678
|
+
ALIASES
|
|
679
|
+
$ csdx cm:bulk-publish:entry-edits
|
|
680
|
+
|
|
681
|
+
EXAMPLES
|
|
682
|
+
General Usage
|
|
283
683
|
|
|
284
|
-
|
|
285
|
-
-a, --alias=alias Alias for the management token to be used
|
|
684
|
+
$ csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
286
685
|
|
|
287
|
-
-b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
288
|
-
bulkpublish API will be used for publishing the entries
|
|
289
686
|
|
|
290
|
-
-c, --config=config Path to config file to be used
|
|
291
687
|
|
|
292
|
-
|
|
688
|
+
Using --config or -c flag
|
|
689
|
+
|
|
690
|
+
Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
|
|
691
|
+
|
|
692
|
+
$ csdx cm:entries:publish-modified --config [PATH TO CONFIG FILE]
|
|
693
|
+
|
|
694
|
+
$ csdx cm:entries:publish-modified -c [PATH TO CONFIG FILE]
|
|
695
|
+
|
|
696
|
+
|
|
293
697
|
|
|
294
|
-
|
|
698
|
+
Using --retry-failed
|
|
295
699
|
|
|
296
|
-
-
|
|
297
|
-
flags)
|
|
700
|
+
$ csdx cm:entries:publish-modified --retry-failed [LOG FILE NAME]
|
|
298
701
|
|
|
299
|
-
|
|
702
|
+
$ csdx cm:entries:publish-modified -r [LOG FILE NAME]
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
Using --branch
|
|
707
|
+
|
|
708
|
+
$ csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
709
|
+
```
|
|
300
710
|
|
|
301
|
-
|
|
711
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-modified.js)_
|
|
712
|
+
|
|
713
|
+
## `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>]`
|
|
714
|
+
|
|
715
|
+
Publish non-localized fields for the given content types, from a particular source environment to the specified environments
|
|
716
|
+
|
|
717
|
+
```
|
|
718
|
+
USAGE
|
|
719
|
+
$ csdx cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>]
|
|
720
|
+
[--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]
|
|
721
|
+
|
|
722
|
+
FLAGS
|
|
723
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
724
|
+
selected)
|
|
725
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
726
|
+
-c, --config=<value> Path to the config file
|
|
727
|
+
-e, --environments=<value> Destination environments
|
|
728
|
+
-y, --yes Agree to process the command with the current configuration
|
|
729
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
730
|
+
bulkpublish API will be used to publish the entries
|
|
731
|
+
--content-types=<value> The Contenttypes from which entries will be published
|
|
732
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile
|
|
733
|
+
--source-env=<value> Source Environment
|
|
302
734
|
|
|
303
735
|
DESCRIPTION
|
|
304
|
-
|
|
736
|
+
Publish non-localized fields for the given content types, from a particular source environment to the specified
|
|
737
|
+
environments
|
|
738
|
+
|
|
739
|
+
The non-localized field changes command is used to publish non-localized field changes from the given content types to
|
|
740
|
+
the specified environments
|
|
741
|
+
|
|
742
|
+
Note: Content types, Environments and Source Environment are required to execute this command successfully.
|
|
305
743
|
|
|
306
|
-
Environment(s) and Locale(s) are required for executing the command successfully
|
|
307
744
|
But, if retryFailed flag is set, then only a logfile is required
|
|
308
745
|
|
|
746
|
+
ALIASES
|
|
747
|
+
$ csdx cm:bulk-publish:nonlocalized-field-changes
|
|
748
|
+
|
|
309
749
|
EXAMPLES
|
|
310
750
|
General Usage
|
|
311
|
-
|
|
751
|
+
|
|
752
|
+
$ csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV]
|
|
753
|
+
|
|
754
|
+
|
|
312
755
|
|
|
313
756
|
Using --config or -c flag
|
|
757
|
+
|
|
314
758
|
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
315
|
-
csdx cm:bulk-publish:assets --config [PATH TO CONFIG FILE]
|
|
316
|
-
csdx cm:bulk-publish:assets -c [PATH TO CONFIG FILE]
|
|
317
759
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
csdx cm:
|
|
760
|
+
$ csdx cm:entries:publish-non-localized-fields --config [PATH TO CONFIG FILE]
|
|
761
|
+
|
|
762
|
+
$ csdx cm:entries:publish-non-localized-fields -c [PATH TO CONFIG FILE]
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
Using --retry-failed flag
|
|
767
|
+
|
|
768
|
+
$ csdx cm:entries:publish-non-localized-fields --retry-failed [LOG FILE NAME]
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
Using --branch flag
|
|
773
|
+
|
|
774
|
+
$ csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV] --branch [BRANCH NAME]
|
|
321
775
|
```
|
|
322
776
|
|
|
323
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
777
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-non-localized-fields.js)_
|
|
324
778
|
|
|
325
|
-
## `csdx cm:bulk-publish
|
|
779
|
+
## `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>]`
|
|
326
780
|
|
|
327
|
-
|
|
781
|
+
Publish unpublished entries from the source environment, to other environments and locales
|
|
328
782
|
|
|
329
783
|
```
|
|
330
|
-
|
|
784
|
+
USAGE
|
|
785
|
+
$ csdx cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>]
|
|
786
|
+
[--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch
|
|
787
|
+
<value>]
|
|
788
|
+
|
|
789
|
+
FLAGS
|
|
790
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
791
|
+
selected)
|
|
792
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
793
|
+
-b, --bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
794
|
+
bulkpublish API will be used to publish the entries
|
|
795
|
+
-c, --config=<value> Path to the config file
|
|
796
|
+
-e, --environments=<value> Destination environments
|
|
797
|
+
-y, --yes Agree to process the command with the current configuration
|
|
798
|
+
--content-types=<value> The Contenttypes from which entries will be published
|
|
799
|
+
--locales=<value> Source locale
|
|
800
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile
|
|
801
|
+
--source-env=<value> Source Env
|
|
802
|
+
|
|
803
|
+
DESCRIPTION
|
|
804
|
+
Publish unpublished entries from the source environment, to other environments and locales
|
|
805
|
+
|
|
806
|
+
The publish-only-unpublished command is used to publish unpublished entries from the source environment, to other
|
|
807
|
+
environments and locales
|
|
808
|
+
|
|
809
|
+
Note: Content type(s), Source Environment, Destination Environment(s) and Source Locale are required to execute the
|
|
810
|
+
command successfully
|
|
811
|
+
|
|
812
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
813
|
+
|
|
814
|
+
ALIASES
|
|
815
|
+
$ csdx cm:bulk-publish:unpublished-entries
|
|
816
|
+
|
|
817
|
+
EXAMPLES
|
|
818
|
+
General Usage
|
|
819
|
+
|
|
820
|
+
$ csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] -source-env [SOURCE ENV]
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
Using --config or -c flag
|
|
825
|
+
|
|
826
|
+
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
827
|
+
|
|
828
|
+
$ csdx cm:entries:publish-only-unpublished --config [PATH TO CONFIG FILE]
|
|
829
|
+
|
|
830
|
+
$ csdx cm:entries:publish-only-unpublished -c [PATH TO CONFIG FILE]
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
Using --retry-failed
|
|
835
|
+
|
|
836
|
+
$ csdx cm:entries:publish-only-unpublished --retry-failed [LOG FILE NAME]
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
Using --branch
|
|
841
|
+
|
|
842
|
+
$ csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME] -source-env [SOURCE ENV]
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-only-unpublished.js)_
|
|
846
|
+
|
|
847
|
+
## `csdx cm:entries:unpublish`
|
|
848
|
+
|
|
849
|
+
Unpublish entries from the given environment
|
|
850
|
+
|
|
851
|
+
```
|
|
852
|
+
USAGE
|
|
853
|
+
$ csdx cm:entries:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
|
|
854
|
+
[--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>]
|
|
855
|
+
|
|
856
|
+
FLAGS
|
|
857
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
858
|
+
-c, --config=<value> Path to the config file
|
|
859
|
+
-e, --environment=<value> Source Environment
|
|
860
|
+
-y, --yes Agree to process the command with the current configuration
|
|
861
|
+
--branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
862
|
+
selected)
|
|
863
|
+
--bulk-unpublish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
864
|
+
bulkpublish API will be used to unpublish the entries
|
|
865
|
+
--content-type=<value> Content type filter
|
|
866
|
+
--delivery-token=<value> Delivery token for source environment
|
|
867
|
+
--locale=<value> Locale filter
|
|
868
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile
|
|
869
|
+
|
|
870
|
+
DESCRIPTION
|
|
871
|
+
Unpublish entries from the given environment
|
|
872
|
+
|
|
873
|
+
The unpublish command is used to unpublish entries from the given environment
|
|
874
|
+
|
|
875
|
+
Note: Environment (Source Environment) and Locale are required to execute the command successfully
|
|
876
|
+
|
|
877
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
878
|
+
|
|
879
|
+
EXAMPLES
|
|
880
|
+
General Usage
|
|
331
881
|
|
|
882
|
+
$ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]
|
|
332
883
|
|
|
333
|
-
USAGE
|
|
334
|
-
$ csdx cm:bulk-publish:clear
|
|
335
884
|
|
|
336
|
-
OPTIONS
|
|
337
|
-
-l, --list List number of log files
|
|
338
|
-
-y, --yes Delete all files without asking for confirmation
|
|
339
|
-
```
|
|
340
885
|
|
|
341
|
-
|
|
886
|
+
Using --config or -c flag
|
|
342
887
|
|
|
343
|
-
|
|
888
|
+
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
|
|
344
889
|
|
|
345
|
-
|
|
890
|
+
$ csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]
|
|
346
891
|
|
|
347
|
-
|
|
348
|
-
Generate configuration template
|
|
349
|
-
The configure command is used for generating a configuration file for bulk-publish script.
|
|
892
|
+
$ csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]
|
|
350
893
|
|
|
351
|
-
Here is a detailed description for all the available flags
|
|
352
894
|
|
|
353
|
-
-----------------------------------------------------------------------------------------------------------
|
|
354
|
-
--alias or -a : Management token Alias for the stack in use.
|
|
355
895
|
|
|
356
|
-
|
|
357
|
-
EXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]
|
|
896
|
+
Using --retry-failed flag
|
|
358
897
|
|
|
898
|
+
$ csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]
|
|
359
899
|
|
|
360
|
-
USAGE
|
|
361
|
-
$ csdx cm:bulk-publish:configure
|
|
362
900
|
|
|
363
|
-
OPTIONS
|
|
364
|
-
-a, --alias=alias Management token alias for the stack
|
|
365
901
|
|
|
366
|
-
DESCRIPTION
|
|
367
|
-
The configure command is used for generating a configuration file for bulk-publish script.
|
|
368
902
|
|
|
369
|
-
Here is a detailed description for all the available flags
|
|
370
903
|
|
|
371
|
-
|
|
372
|
-
--alias or -a : Management token Alias for the stack in use.
|
|
904
|
+
Using --branch flag
|
|
373
905
|
|
|
374
|
-
|
|
375
|
-
EXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]
|
|
906
|
+
$ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
376
907
|
```
|
|
377
908
|
|
|
378
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
909
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/unpublish.js)_
|
|
379
910
|
|
|
380
|
-
## `csdx cm:bulk-publish
|
|
911
|
+
## `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>]`
|
|
381
912
|
|
|
382
|
-
|
|
913
|
+
Add fields from updated content types to their respective entries
|
|
383
914
|
|
|
384
915
|
```
|
|
385
|
-
|
|
386
|
-
|
|
916
|
+
USAGE
|
|
917
|
+
$ csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types
|
|
918
|
+
<value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]
|
|
919
|
+
|
|
920
|
+
FLAGS
|
|
921
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
922
|
+
selected)
|
|
923
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
924
|
+
-c, --config=<value> Path to the config file
|
|
925
|
+
-e, --environments=<value> Environments where entries will be published
|
|
926
|
+
-l, --locales=<value> Locales where entries will be published
|
|
927
|
+
-t, --contentTypes=<value> The Contenttypes from which entries will be published
|
|
928
|
+
-y, --yes Agree to process the command with the current configuration
|
|
929
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
930
|
+
bulkpublish API will be used to publish the entries
|
|
931
|
+
--content-types=<value> The Contenttypes from which entries will be published
|
|
932
|
+
--force Update and publish all entries even if no fields have been added
|
|
933
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile (optional, overrides all other flags)
|
|
934
|
+
|
|
935
|
+
DESCRIPTION
|
|
936
|
+
Add fields from updated content types to their respective entries
|
|
387
937
|
|
|
388
|
-
|
|
389
|
-
|
|
938
|
+
The update-and-publish command is used to update existing entries with the updated schema of the respective content
|
|
939
|
+
type
|
|
390
940
|
|
|
941
|
+
Note: Content types, Environments and Locales are required to execute the command successfully
|
|
391
942
|
|
|
392
|
-
|
|
393
|
-
$ csdx cm:bulk-publish:cross-publish
|
|
943
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
394
944
|
|
|
395
|
-
|
|
396
|
-
|
|
945
|
+
ALIASES
|
|
946
|
+
$ csdx cm:bulk-publish:add-fields
|
|
397
947
|
|
|
398
|
-
|
|
399
|
-
|
|
948
|
+
EXAMPLES
|
|
949
|
+
General Usage
|
|
400
950
|
|
|
401
|
-
-
|
|
951
|
+
$ csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
402
952
|
|
|
403
|
-
-d, --destEnv=destEnv Destination Environments
|
|
404
953
|
|
|
405
|
-
-e, --environment=environment Source Environment
|
|
406
954
|
|
|
407
|
-
|
|
955
|
+
Using --config or -c flag
|
|
408
956
|
|
|
409
|
-
|
|
410
|
-
flags)
|
|
957
|
+
Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
|
|
411
958
|
|
|
412
|
-
-
|
|
959
|
+
$ csdx cm:entries:update-and-publish --config [PATH TO CONFIG FILE]
|
|
413
960
|
|
|
414
|
-
-
|
|
961
|
+
$ csdx cm:entries:update-and-publish -c [PATH TO CONFIG FILE]
|
|
415
962
|
|
|
416
|
-
-y, --yes Agree to process the command with the current configuration
|
|
417
963
|
|
|
418
|
-
DESCRIPTION
|
|
419
|
-
The cross-publish command is used for publishing entries and assets from one evironment to other environments
|
|
420
964
|
|
|
421
|
-
|
|
422
|
-
|
|
965
|
+
Using --retry-failed
|
|
966
|
+
|
|
967
|
+
$ csdx cm:entries:update-and-publish --retry-failed [LOG FILE NAME]
|
|
423
968
|
|
|
424
|
-
EXAMPLES
|
|
425
|
-
General Usage
|
|
426
|
-
csdx cm:bulk-publish:cross-publish -t [CONTENT TYPE] -e [SOURCE ENV] -d [DESTINATION ENVIRONMENT] -l [LOCALE] -a
|
|
427
|
-
[MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]
|
|
428
969
|
|
|
429
|
-
Using --config or -c flag
|
|
430
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
431
|
-
csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]
|
|
432
|
-
csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]
|
|
433
970
|
|
|
434
|
-
Using --
|
|
435
|
-
|
|
436
|
-
csdx cm:
|
|
971
|
+
Using --branch
|
|
972
|
+
|
|
973
|
+
$ csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
437
974
|
```
|
|
438
975
|
|
|
439
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
976
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/update-and-publish.js)_
|
|
440
977
|
|
|
441
|
-
## `csdx cm:
|
|
978
|
+
## `csdx cm:export-to-csv`
|
|
442
979
|
|
|
443
|
-
|
|
980
|
+
Export entries or organization users to csv using this command
|
|
444
981
|
|
|
445
982
|
```
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
983
|
+
USAGE
|
|
984
|
+
$ csdx cm:export-to-csv [--action entries|users] [-a <value>] [--org <value>] [-n <value>] [--org-name <value>]
|
|
985
|
+
[--locale <value>] [--content-type <value>]
|
|
986
|
+
|
|
987
|
+
FLAGS
|
|
988
|
+
-a, --alias=<value> Alias of the management token
|
|
989
|
+
-n, --stack-name=<value> Name of the stack that needs to be created as csv filename.
|
|
990
|
+
--action=<option> Option to export data (entries, users)
|
|
991
|
+
<options: entries|users>
|
|
992
|
+
--content-type=<value> Content type for which entries needs to be exported
|
|
993
|
+
--locale=<value> Locale for which entries need to be exported
|
|
994
|
+
--org=<value> Provide organization UID to clone org users
|
|
995
|
+
--org-name=<value> Name of the organization that needs to be created as csv filename.
|
|
449
996
|
|
|
450
|
-
|
|
451
|
-
|
|
997
|
+
DESCRIPTION
|
|
998
|
+
Export entries or organization users to csv using this command
|
|
452
999
|
|
|
1000
|
+
EXAMPLES
|
|
1001
|
+
$ csdx cm:export-to-csv
|
|
453
1002
|
|
|
454
|
-
USAGE
|
|
455
|
-
$ csdx cm:bulk-publish:entries
|
|
456
1003
|
|
|
457
|
-
OPTIONS
|
|
458
|
-
-a, --alias=alias Alias for the management token to be used
|
|
459
1004
|
|
|
460
|
-
|
|
461
|
-
bulkpublish API will be used for publishing the entries
|
|
1005
|
+
Exporting entries to csv
|
|
462
1006
|
|
|
463
|
-
|
|
464
|
-
the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)
|
|
1007
|
+
$ csdx cm:export-to-csv --action <entries> --locale <locale> --alias <management-token-alias> --content-type <content-type>
|
|
465
1008
|
|
|
466
|
-
-e, --environments=environments Environments to which entries need to be published
|
|
467
1009
|
|
|
468
|
-
-l, --locales=locales Locales to which entries need to be published
|
|
469
1010
|
|
|
470
|
-
|
|
1011
|
+
Exporting entries to csv with stack name provided
|
|
471
1012
|
|
|
472
|
-
-
|
|
473
|
-
is used to retry publishing entries that failed to publish in a previous attempt. A
|
|
474
|
-
log file for the previous session will be required for processing the failed entries
|
|
1013
|
+
$ csdx cm:export-to-csv --action <entries> --locale <locale> --alias <management-token-alias> --content-type <content-type> --stack-name <stack-name>
|
|
475
1014
|
|
|
476
|
-
-t, --contentTypes=contentTypes The Content-types from which entries need to be published
|
|
477
1015
|
|
|
478
|
-
-y, --yes Agree to process the command with the current configuration
|
|
479
1016
|
|
|
480
|
-
|
|
481
|
-
The entries command is used for publishing entries from the specified content types, to the
|
|
482
|
-
specified environments and locales
|
|
1017
|
+
Exporting organization users to csv
|
|
483
1018
|
|
|
484
|
-
|
|
485
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1019
|
+
$ csdx cm:export-to-csv --action <users> --org <org-uid>
|
|
486
1020
|
|
|
487
|
-
EXAMPLES
|
|
488
|
-
General Usage
|
|
489
|
-
csdx cm:bulk-publish:entries -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1]
|
|
490
|
-
[LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
491
1021
|
|
|
492
|
-
Using --config or -c flag
|
|
493
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
494
|
-
csdx cm:bulk-publish:entries --config [PATH TO CONFIG FILE]
|
|
495
|
-
csdx cm:bulk-publish:entries -c [PATH TO CONFIG FILE]
|
|
496
1022
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
csdx cm:
|
|
1023
|
+
Exporting organization users to csv with organization name provided
|
|
1024
|
+
|
|
1025
|
+
$ csdx cm:export-to-csv --action <users> --org <org-uid> --org-name <org-name>
|
|
500
1026
|
```
|
|
501
1027
|
|
|
502
|
-
_See code: [@contentstack/cli-cm-
|
|
1028
|
+
_See code: [@contentstack/cli-cm-export-to-csv](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/cm/export-to-csv.js)_
|
|
503
1029
|
|
|
504
|
-
## `csdx cm:
|
|
1030
|
+
## `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]`
|
|
505
1031
|
|
|
506
|
-
|
|
1032
|
+
Clone data (structure/content or both) of a stack into another stack
|
|
507
1033
|
|
|
508
1034
|
```
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
1035
|
+
USAGE
|
|
1036
|
+
$ csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>]
|
|
1037
|
+
[--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>]
|
|
1038
|
+
[--destination-stack-api-key <value>] [--import-webhook-status disable|current]
|
|
1039
|
+
|
|
1040
|
+
FLAGS
|
|
1041
|
+
-n, --stack-name=<value> Name for the new stack to store the cloned content.
|
|
1042
|
+
--destination-management-token-alias=<value> Source API key of the target stack token alias.
|
|
1043
|
+
--destination-stack-api-key=<value> Destination stack API Key
|
|
1044
|
+
--import-webhook-status=<option> [default: disable] Webhook state
|
|
1045
|
+
<options: disable|current>
|
|
1046
|
+
--source-branch=<value> Branch of the source stack.
|
|
1047
|
+
--source-management-token-alias=<value> Source API key of the target stack token alias.
|
|
1048
|
+
--source-stack-api-key=<value> Source stack API Key
|
|
1049
|
+
--target-branch=<value> Branch of the target stack.
|
|
1050
|
+
--type=<option> Type of data to clone
|
|
1051
|
+
a) Structure (all modules except entries & assets)
|
|
1052
|
+
b) Structure with content (all modules including entries & assets)
|
|
1053
|
+
|
|
1054
|
+
<options: a|b>
|
|
512
1055
|
|
|
513
|
-
|
|
514
|
-
|
|
1056
|
+
DESCRIPTION
|
|
1057
|
+
Clone data (structure/content or both) of a stack into another stack
|
|
515
1058
|
|
|
1059
|
+
Use this plugin to automate the process of cloning a stack in few steps.
|
|
516
1060
|
|
|
517
|
-
|
|
518
|
-
$ csdx cm:
|
|
1061
|
+
ALIASES
|
|
1062
|
+
$ csdx cm:stack-clone
|
|
1063
|
+
|
|
1064
|
+
EXAMPLES
|
|
1065
|
+
$ csdx cm:stacks:clone
|
|
519
1066
|
|
|
520
|
-
|
|
521
|
-
-a, --alias=alias Alias for the management token to be used
|
|
1067
|
+
$ csdx cm:stacks:clone --source-branch <source-branch-name> --target-branch <target-branch-name>
|
|
522
1068
|
|
|
523
|
-
|
|
524
|
-
bulkpublish API will be used for publishing the entries
|
|
1069
|
+
$ csdx cm:stacks:clone --source-stack-api-key <apiKey> --destination-stack-api-key <apiKey>
|
|
525
1070
|
|
|
526
|
-
|
|
1071
|
+
$ csdx cm:stacks:clone --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>
|
|
527
1072
|
|
|
528
|
-
-
|
|
1073
|
+
$ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>
|
|
529
1074
|
|
|
530
|
-
-
|
|
1075
|
+
$ 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>
|
|
1076
|
+
```
|
|
531
1077
|
|
|
532
|
-
|
|
533
|
-
flags)
|
|
1078
|
+
_See code: [@contentstack/cli-cm-clone](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/cm/stacks/clone.js)_
|
|
534
1079
|
|
|
535
|
-
|
|
1080
|
+
## `csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`
|
|
536
1081
|
|
|
537
|
-
|
|
1082
|
+
Export content from a stack
|
|
538
1083
|
|
|
539
|
-
|
|
1084
|
+
```
|
|
1085
|
+
USAGE
|
|
1086
|
+
$ csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types
|
|
1087
|
+
<value>] [--branch <value>] [--secured-assets]
|
|
1088
|
+
|
|
1089
|
+
FLAGS
|
|
1090
|
+
-B, --branch=<value> [optional] branch name
|
|
1091
|
+
-a, --alias=<value> alias of the management token
|
|
1092
|
+
-c, --config=<value> [optional] path of the config
|
|
1093
|
+
-d, --data-dir=<value> path or location to store the data
|
|
1094
|
+
-k, --stack-api-key=<value> API key of the source stack
|
|
1095
|
+
-m, --module=<value> [optional] specific module name
|
|
1096
|
+
-t, --content-types=<value> [optional] content type
|
|
1097
|
+
--secured-assets [optional] use when assets are secured
|
|
540
1098
|
|
|
541
1099
|
DESCRIPTION
|
|
542
|
-
|
|
543
|
-
specified environments and locales
|
|
1100
|
+
Export content from a stack
|
|
544
1101
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1102
|
+
ALIASES
|
|
1103
|
+
$ csdx cm:export
|
|
548
1104
|
|
|
549
1105
|
EXAMPLES
|
|
550
|
-
|
|
551
|
-
csdx cm:bulk-publish:entry-edits -t [CONTENT TYPE 1] [CONTENT TYPE 2] -s [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT
|
|
552
|
-
2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
1106
|
+
$ csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
|
|
553
1107
|
|
|
554
|
-
|
|
555
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
556
|
-
csdx cm:bulk-publish:entry-edits --config [PATH TO CONFIG FILE]
|
|
557
|
-
csdx cm:bulk-publish:entry-edits -c [PATH TO CONFIG FILE]
|
|
1108
|
+
$ csdx cm:stacks:export --config <path/to/config/dir>
|
|
558
1109
|
|
|
559
|
-
|
|
560
|
-
csdx cm:bulk-publish:entry-edits --retryFailed [LOG FILE NAME]
|
|
561
|
-
csdx cm:bulk-publish:entry-edits -r [LOG FILE NAME]
|
|
562
|
-
```
|
|
1110
|
+
$ csdx cm:stacks:export --alias <management_token_alias>
|
|
563
1111
|
|
|
564
|
-
|
|
1112
|
+
$ csdx cm:stacks:export --alias <management_token_alias> --data-dir <path/to/export/destination/dir>
|
|
565
1113
|
|
|
566
|
-
|
|
1114
|
+
$ csdx cm:stacks:export --alias <management_token_alias> --config <path/to/config/file>
|
|
567
1115
|
|
|
568
|
-
|
|
1116
|
+
$ csdx cm:stacks:export --module <single module name>
|
|
569
1117
|
|
|
1118
|
+
$ csdx cm:stacks:export --branch [optional] branch name
|
|
570
1119
|
```
|
|
571
|
-
Publish non-localized-fields for given Content Types, from a particular source environment to specified environments
|
|
572
|
-
The nonlocalized-field-changes command is used for publishing nonlocalized field changes from the given Content Types to
|
|
573
|
-
the specified Environments
|
|
574
1120
|
|
|
575
|
-
|
|
576
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1121
|
+
_See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-export/src/commands/cm/stacks/export.js)_
|
|
577
1122
|
|
|
1123
|
+
## `csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
|
|
578
1124
|
|
|
579
|
-
|
|
580
|
-
$ csdx cm:bulk-publish:nonlocalized-field-changes
|
|
1125
|
+
Import script for importing the content into the new stack
|
|
581
1126
|
|
|
582
|
-
|
|
583
|
-
|
|
1127
|
+
```
|
|
1128
|
+
USAGE
|
|
1129
|
+
$ csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>]
|
|
1130
|
+
[--branch <value>] [--import-webhook-status disable|current]
|
|
1131
|
+
|
|
1132
|
+
FLAGS
|
|
1133
|
+
-B, --branch=<value> [optional] branch name
|
|
1134
|
+
-a, --alias=<value> alias of the management token
|
|
1135
|
+
-b, --backup-dir=<value> [optional] backup directory name when using specific module
|
|
1136
|
+
-c, --config=<value> [optional] path of config file
|
|
1137
|
+
-d, --data-dir=<value> path and location where data is stored
|
|
1138
|
+
-k, --stack-api-key=<value> API key of the target stack
|
|
1139
|
+
-m, --module=<value> [optional] specific module name
|
|
1140
|
+
--import-webhook-status=<option> [default: disable] Webhook state
|
|
1141
|
+
<options: disable|current>
|
|
584
1142
|
|
|
585
|
-
|
|
586
|
-
|
|
1143
|
+
DESCRIPTION
|
|
1144
|
+
Import script for importing the content into the new stack
|
|
587
1145
|
|
|
588
|
-
|
|
1146
|
+
...
|
|
589
1147
|
|
|
590
|
-
|
|
1148
|
+
Once you export content from the source stack, import it to your destination stack by using the cm:stacks:import
|
|
1149
|
+
command.
|
|
591
1150
|
|
|
592
|
-
|
|
1151
|
+
ALIASES
|
|
1152
|
+
$ csdx cm:import
|
|
593
1153
|
|
|
594
|
-
|
|
1154
|
+
EXAMPLES
|
|
1155
|
+
$ csdx cm:stacks:import --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>
|
|
595
1156
|
|
|
596
|
-
|
|
1157
|
+
$ csdx cm:stacks:import --config <path/of/config/dir>
|
|
597
1158
|
|
|
598
|
-
|
|
1159
|
+
$ csdx cm:stacks:import --module <single module name>
|
|
599
1160
|
|
|
600
|
-
|
|
601
|
-
The nonlocalized-field-changes command is used for publishing nonlocalized field changes from the given Content Types
|
|
602
|
-
to
|
|
603
|
-
the specified Environments
|
|
1161
|
+
$ csdx cm:stacks:import --module <single module name> --backup-dir <backup dir>
|
|
604
1162
|
|
|
605
|
-
|
|
606
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1163
|
+
$ csdx cm:stacks:import --alias <management_token_alias>
|
|
607
1164
|
|
|
608
|
-
|
|
609
|
-
General Usage
|
|
610
|
-
csdx cm:bulk-publish:nonlocalized-field-changes -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT
|
|
611
|
-
2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
|
|
1165
|
+
$ csdx cm:stacks:import --alias <management_token_alias> --data-dir <path/of/export/destination/dir>
|
|
612
1166
|
|
|
613
|
-
|
|
614
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
615
|
-
csdx cm:bulk-publish:nonlocalized-field-changes --config [PATH TO CONFIG FILE]
|
|
616
|
-
csdx cm:bulk-publish:nonlocalized-field-changes -c [PATH TO CONFIG FILE]
|
|
1167
|
+
$ csdx cm:stacks:import --alias <management_token_alias> --config <path/of/config/file>
|
|
617
1168
|
|
|
618
|
-
|
|
619
|
-
csdx cm:bulk-publish:nonlocalized-field-changes --retryFailed [LOG FILE NAME]
|
|
620
|
-
csdx cm:bulk-publish:nonlocalized-field-changes -r [LOG FILE NAME]
|
|
1169
|
+
$ csdx cm:stacks:import --branch <branch name>
|
|
621
1170
|
```
|
|
622
1171
|
|
|
623
|
-
_See code: [@contentstack/cli-cm-
|
|
1172
|
+
_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-import/src/commands/cm/stacks/import.js)_
|
|
624
1173
|
|
|
625
|
-
## `csdx cm:
|
|
1174
|
+
## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
|
|
626
1175
|
|
|
627
|
-
|
|
1176
|
+
Contentstack migration script.
|
|
628
1177
|
|
|
629
1178
|
```
|
|
630
|
-
Revert publish operations by using a log file
|
|
631
|
-
The revert command is used for reverting all publish operations performed using bulk-publish script.
|
|
632
|
-
A log file name is required to execute revert command
|
|
633
|
-
|
|
634
|
-
|
|
635
1179
|
USAGE
|
|
636
|
-
$ csdx cm:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
-
|
|
1180
|
+
$ csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>]
|
|
1181
|
+
[--config <value>] [--multiple]
|
|
1182
|
+
|
|
1183
|
+
FLAGS
|
|
1184
|
+
-B, --branch=<value> Use this flag to add the branch name where you want to perform the migration.
|
|
1185
|
+
-a, --alias=<value> Use this flag to add the management token alias.
|
|
1186
|
+
-k, --stack-api-key=<value> With this flag add the API key of your stack.
|
|
1187
|
+
--config=<value> [optional] inline configuration, <key1>:<value1>
|
|
1188
|
+
--config-file=<value> [optional] Path of the JSON configuration file
|
|
1189
|
+
--file-path=<value> Use this flag to provide the path of the file of the migration script provided by the
|
|
1190
|
+
user.
|
|
1191
|
+
--multiple This flag helps you to migrate multiple content files in a single instance.
|
|
641
1192
|
|
|
642
1193
|
DESCRIPTION
|
|
643
|
-
|
|
644
|
-
|
|
1194
|
+
Contentstack migration script.
|
|
1195
|
+
|
|
1196
|
+
ALIASES
|
|
1197
|
+
$ csdx cm:migration
|
|
645
1198
|
|
|
646
1199
|
EXAMPLES
|
|
647
|
-
|
|
648
|
-
cm:bulk-publish:revert --logFile [LOG FILE NAME]
|
|
649
|
-
cm:bulk-publish:revert -l [LOG FILE NAME]
|
|
1200
|
+
$ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>
|
|
650
1201
|
|
|
651
|
-
|
|
652
|
-
cm:bulk-publish:revert --retryFailed [LOG FILE NAME]
|
|
653
|
-
cm:bulk-publish:revert -r [LOG FILE NAME]
|
|
654
|
-
```
|
|
1202
|
+
$ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>
|
|
655
1203
|
|
|
656
|
-
|
|
1204
|
+
$ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>
|
|
657
1205
|
|
|
658
|
-
|
|
1206
|
+
$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
|
|
659
1207
|
|
|
660
|
-
|
|
1208
|
+
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
|
|
661
1209
|
|
|
1210
|
+
$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
|
|
662
1211
|
```
|
|
663
|
-
Unpublish entries of given Content Types from given environment
|
|
664
|
-
The unpublish command is used for unpublishing entries from given environment
|
|
665
1212
|
|
|
666
|
-
|
|
667
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1213
|
+
_See code: [@contentstack/cli-migration](https://github.com/contentstack/cli-migration/blob/v1.0.0/src/commands/cm/stacks/migration.js)_
|
|
668
1214
|
|
|
669
|
-
|
|
670
|
-
then all entries from all content types will be unpublished from the source environment
|
|
671
|
-
|
|
672
|
-
--onlyAssets can be used to unpublish only assets and --onlyEntries can be used to unpublish only entries.
|
|
673
|
-
(--onlyAssets and --onlyEntries cannot be used together at the same time)
|
|
1215
|
+
## `csdx cm:stacks:publish`
|
|
674
1216
|
|
|
1217
|
+
Publish entries and assets to multiple environments and locales
|
|
675
1218
|
|
|
1219
|
+
```
|
|
676
1220
|
USAGE
|
|
677
|
-
$ csdx cm:
|
|
1221
|
+
$ csdx cm:stacks:publish
|
|
678
1222
|
|
|
679
|
-
|
|
680
|
-
|
|
1223
|
+
DESCRIPTION
|
|
1224
|
+
Publish entries and assets to multiple environments and locales
|
|
681
1225
|
|
|
682
|
-
|
|
683
|
-
contentstack's bulkpublish API will be used for publishing the entries
|
|
1226
|
+
The publish command is used to publish entries and assets, to the specified environments and locales.
|
|
684
1227
|
|
|
685
|
-
|
|
1228
|
+
Note: Content types, Environments and Locales are required to execute the publish entries command successfully.
|
|
686
1229
|
|
|
687
|
-
|
|
1230
|
+
Note: Environments and Locales are required to execute the publish assets command successfully.
|
|
688
1231
|
|
|
689
|
-
-
|
|
1232
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
690
1233
|
|
|
691
|
-
|
|
1234
|
+
EXAMPLES
|
|
1235
|
+
General Usage
|
|
692
1236
|
|
|
693
|
-
|
|
1237
|
+
$ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]
|
|
694
1238
|
|
|
695
|
-
-x, --deliveryToken=deliveryToken Delivery Token for source environment
|
|
696
1239
|
|
|
697
|
-
-y, --yes Agree to process the command with the current configuration
|
|
698
1240
|
|
|
699
|
-
--
|
|
1241
|
+
Using --config or -c flag
|
|
700
1242
|
|
|
701
|
-
|
|
1243
|
+
Generate a config file in the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
|
|
702
1244
|
|
|
703
|
-
|
|
704
|
-
The unpublish command is used for unpublishing entries from given environment
|
|
1245
|
+
$ csdx cm:stacks:publish --config [PATH TO CONFIG FILE]
|
|
705
1246
|
|
|
706
|
-
|
|
707
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1247
|
+
$ csdx cm:stacks:publish -c [PATH TO CONFIG FILE]
|
|
708
1248
|
|
|
709
|
-
A Content Type can be specified for publishing entries, but if no content-type(s) is/are specified and --onlyAssets is
|
|
710
|
-
not used,
|
|
711
|
-
then all entries from all content types will be unpublished from the source environment
|
|
712
1249
|
|
|
713
|
-
--onlyAssets can be used to unpublish only assets and --onlyEntries can be used to unpublish only entries.
|
|
714
|
-
(--onlyAssets and --onlyEntries cannot be used together at the same time)
|
|
715
1250
|
|
|
716
|
-
|
|
717
|
-
General Usage
|
|
718
|
-
csdx cm:bulk-publish:unpublish -b -t [CONTENT TYPE] -e [SOURCE ENV] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x
|
|
719
|
-
[DELIVERY TOKEN]
|
|
1251
|
+
Using --retry-failed flag
|
|
720
1252
|
|
|
721
|
-
|
|
722
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
723
|
-
csdx cm:bulk-publish:unpublish --config [PATH TO CONFIG FILE]
|
|
724
|
-
csdx cm:bulk-publish:unpublish -c [PATH TO CONFIG FILE]
|
|
1253
|
+
$ csdx cm:stacks:publish --retry-failed [LOG FILE NAME]
|
|
725
1254
|
|
|
726
|
-
Using --retryFailed or -r flag
|
|
727
|
-
csdx cm:bulk-publish:unpublish --retryFailed [LOG FILE NAME]
|
|
728
|
-
csdx cm:bulk-publish:unpublish -r [LOG FILE NAME]
|
|
729
1255
|
|
|
730
|
-
No content type
|
|
731
|
-
csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all
|
|
732
|
-
content types and assets from the source environment)
|
|
733
1256
|
|
|
734
|
-
Using --
|
|
735
|
-
csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyAssets (Will unpublish only assets
|
|
736
|
-
from the source environment)
|
|
1257
|
+
Using --branch flag
|
|
737
1258
|
|
|
738
|
-
|
|
739
|
-
csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only
|
|
740
|
-
entries, all entries, from the source environment)
|
|
741
|
-
csdx cm:bulk-publish:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries
|
|
742
|
-
(Will unpublish only entries, (from CONTENT TYPE) from the source environment)
|
|
1259
|
+
$ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
743
1260
|
```
|
|
744
1261
|
|
|
745
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
1262
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish.js)_
|
|
746
1263
|
|
|
747
|
-
## `csdx cm:
|
|
1264
|
+
## `csdx cm:stacks:publish-clear-logs`
|
|
748
1265
|
|
|
749
|
-
|
|
1266
|
+
Clear the log folder
|
|
750
1267
|
|
|
751
1268
|
```
|
|
752
|
-
|
|
753
|
-
|
|
1269
|
+
USAGE
|
|
1270
|
+
$ csdx cm:stacks:publish-clear-logs [--log-files-count] [-y]
|
|
754
1271
|
|
|
755
|
-
|
|
756
|
-
|
|
1272
|
+
FLAGS
|
|
1273
|
+
-y, --yes Delete all files without asking for confirmation
|
|
1274
|
+
--log-files-count List number of log files
|
|
757
1275
|
|
|
1276
|
+
DESCRIPTION
|
|
1277
|
+
Clear the log folder
|
|
758
1278
|
|
|
759
|
-
|
|
760
|
-
$ csdx cm:bulk-publish:
|
|
1279
|
+
ALIASES
|
|
1280
|
+
$ csdx cm:bulk-publish:clear
|
|
761
1281
|
|
|
762
|
-
|
|
763
|
-
|
|
1282
|
+
EXAMPLES
|
|
1283
|
+
$ csdx cm:stacks:publish-clear-logs
|
|
764
1284
|
|
|
765
|
-
-
|
|
766
|
-
bulkpublish API will be used for publishing the entries
|
|
1285
|
+
$ csdx cm:stacks:publish-clear-logs --log-files-count
|
|
767
1286
|
|
|
768
|
-
-
|
|
1287
|
+
$ csdx cm:stacks:publish-clear-logs --yes
|
|
769
1288
|
|
|
770
|
-
-
|
|
1289
|
+
$ csdx cm:stacks:publish-clear-logs -y
|
|
1290
|
+
```
|
|
771
1291
|
|
|
772
|
-
|
|
1292
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-clear-logs.js)_
|
|
773
1293
|
|
|
774
|
-
|
|
1294
|
+
## `csdx cm:stacks:publish-configure`
|
|
775
1295
|
|
|
776
|
-
|
|
1296
|
+
The configure command is used to generate a configuration file for publish scripts.
|
|
777
1297
|
|
|
778
|
-
|
|
1298
|
+
```
|
|
1299
|
+
USAGE
|
|
1300
|
+
$ csdx cm:stacks:publish-configure [-a <value>]
|
|
779
1301
|
|
|
780
|
-
|
|
1302
|
+
FLAGS
|
|
1303
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
781
1304
|
|
|
782
1305
|
DESCRIPTION
|
|
783
|
-
The
|
|
784
|
-
environments and locales
|
|
1306
|
+
The configure command is used to generate a configuration file for publish scripts.
|
|
785
1307
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
But, if retryFailed flag is set, then only a logfile is required
|
|
1308
|
+
ALIASES
|
|
1309
|
+
$ csdx cm:bulk-publish:configure
|
|
789
1310
|
|
|
790
1311
|
EXAMPLES
|
|
791
|
-
|
|
792
|
-
csdx cm:bulk-publish:unpublished-entries -b -t [CONTENT TYPES] -e [ENVIRONMENTS] -l LOCALE -a [MANAGEMENT TOKEN ALIAS]
|
|
1312
|
+
$ csdx cm:stacks:publish-configure
|
|
793
1313
|
|
|
794
|
-
|
|
795
|
-
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
|
|
796
|
-
csdx cm:bulk-publish:unpublished-entries --config [PATH TO CONFIG FILE]
|
|
797
|
-
csdx cm:bulk-publish:unpublished-entries -c [PATH TO CONFIG FILE]
|
|
1314
|
+
$ csdx cm:stacks:publish-configure -a <management_token_alias>
|
|
798
1315
|
|
|
799
|
-
|
|
800
|
-
csdx cm:bulk-publish:unpublished-entries --retryFailed [LOG FILE NAME]
|
|
801
|
-
csdx cm:bulk-publish:unpublished-entries -r [LOG FILE NAME]
|
|
1316
|
+
$ csdx cm:stacks:publish-configure --alias <management_token_alias>
|
|
802
1317
|
```
|
|
803
1318
|
|
|
804
|
-
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/
|
|
1319
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-configure.js)_
|
|
805
1320
|
|
|
806
|
-
## `csdx cm:
|
|
1321
|
+
## `csdx cm:stacks:publish-revert`
|
|
807
1322
|
|
|
808
|
-
|
|
1323
|
+
Revert publish operations by using a log file
|
|
809
1324
|
|
|
810
1325
|
```
|
|
811
|
-
Export content from a stack
|
|
812
|
-
...
|
|
813
|
-
Export content from one stack to another
|
|
814
|
-
|
|
815
|
-
|
|
816
1326
|
USAGE
|
|
817
|
-
$ csdx cm:
|
|
1327
|
+
$ csdx cm:stacks:publish-revert [--retry-failed <value>] [--log-file <value>]
|
|
818
1328
|
|
|
819
|
-
|
|
820
|
-
-
|
|
821
|
-
|
|
822
|
-
-c, --config=config [optional] path of the config
|
|
823
|
-
-d, --data=data path or location to store the data
|
|
824
|
-
-m, --module=module [optional] specific module name
|
|
825
|
-
-s, --stack-uid=stack-uid API key of the source stack
|
|
1329
|
+
FLAGS
|
|
1330
|
+
--log-file=<value> logfile to be used to revert
|
|
1331
|
+
--retry-failed=<value> retry publishing failed entries from the logfile
|
|
826
1332
|
|
|
827
1333
|
DESCRIPTION
|
|
828
|
-
|
|
829
|
-
Export content from one stack to another
|
|
1334
|
+
Revert publish operations by using a log file
|
|
830
1335
|
|
|
831
|
-
|
|
832
|
-
csdx cm:export -A
|
|
833
|
-
csdx cm:export -A -s <stack_ApiKey> -d <path/of/export/destination/dir>
|
|
834
|
-
csdx cm:export -A -c <path/to/config/dir>
|
|
835
|
-
csdx cm:export -a <management_token_alias>
|
|
836
|
-
csdx cm:export -a <management_token_alias> -d <path/to/export/destination/dir>
|
|
837
|
-
csdx cm:export -a <management_token_alias> -c <path/to/config/file>
|
|
838
|
-
csdx cm:export -A -m <single module name>
|
|
839
|
-
```
|
|
1336
|
+
The revert command is used to revert all publish operations performed using bulk-publish script.
|
|
840
1337
|
|
|
841
|
-
|
|
1338
|
+
A log file name is required to execute revert command
|
|
842
1339
|
|
|
843
|
-
|
|
1340
|
+
ALIASES
|
|
1341
|
+
$ csdx cm:bulk-publish:revert
|
|
844
1342
|
|
|
845
|
-
|
|
1343
|
+
EXAMPLES
|
|
1344
|
+
Using --log-file
|
|
846
1345
|
|
|
847
|
-
|
|
848
|
-
Export entries or organization users to csv using this command
|
|
1346
|
+
cm:bulk-publish:revert --log-file [LOG FILE NAME]
|
|
849
1347
|
|
|
850
1348
|
|
|
851
|
-
USAGE
|
|
852
|
-
$ csdx cm:export-to-csv
|
|
853
|
-
```
|
|
854
1349
|
|
|
855
|
-
|
|
1350
|
+
Using --retry-failed
|
|
856
1351
|
|
|
857
|
-
|
|
1352
|
+
cm:bulk-publish:revert --retry-failed [LOG FILE NAME]
|
|
1353
|
+
```
|
|
858
1354
|
|
|
859
|
-
|
|
1355
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-revert.js)_
|
|
860
1356
|
|
|
861
|
-
|
|
862
|
-
Import script for importing the content into new stack
|
|
863
|
-
...
|
|
864
|
-
Once you export content from the source stack, import it to your destination stack by using the cm:import command.
|
|
1357
|
+
## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]`
|
|
865
1358
|
|
|
1359
|
+
Create a stack from existing content types, entries, assets, etc
|
|
866
1360
|
|
|
1361
|
+
```
|
|
867
1362
|
USAGE
|
|
868
|
-
$ csdx cm:
|
|
1363
|
+
$ csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]
|
|
869
1364
|
|
|
870
|
-
|
|
871
|
-
-
|
|
872
|
-
-
|
|
873
|
-
-
|
|
874
|
-
-
|
|
875
|
-
-
|
|
876
|
-
-
|
|
877
|
-
-s, --stack-uid=stack-uid API key of the target stack
|
|
1365
|
+
FLAGS
|
|
1366
|
+
-k, --stack-api-key=<value> Provide stack api key to seed content to
|
|
1367
|
+
-n, --stack-name=<value> Name of a new stack that needs to be created.
|
|
1368
|
+
-o, --org=<value> Provide Organization UID to create a new stack
|
|
1369
|
+
-r, --repo=<value> GitHub account or GitHub account/repository
|
|
1370
|
+
-s, --stack=<value> Provide stack UID to seed content to
|
|
1371
|
+
-y, --yes=<value>
|
|
878
1372
|
|
|
879
1373
|
DESCRIPTION
|
|
880
|
-
|
|
881
|
-
|
|
1374
|
+
Create a stack from existing content types, entries, assets, etc
|
|
1375
|
+
|
|
1376
|
+
ALIASES
|
|
1377
|
+
$ csdx cm:seed
|
|
882
1378
|
|
|
883
1379
|
EXAMPLES
|
|
884
|
-
csdx cm:
|
|
885
|
-
csdx cm:import -A -s <stack_ApiKey> -d <path/of/export/destination/dir>
|
|
886
|
-
csdx cm:import -A -c <path/of/config/dir>
|
|
887
|
-
csdx cm:import -a <management_token_alias>
|
|
888
|
-
csdx cm:import -a <management_token_alias> -d <path/of/export/destination/dir>
|
|
889
|
-
csdx cm:import -a <management_token_alias> -c <path/of/config/file>
|
|
890
|
-
csdx cm:import -A -m <single module name>
|
|
891
|
-
```
|
|
1380
|
+
$ csdx cm:stacks:seed
|
|
892
1381
|
|
|
893
|
-
|
|
1382
|
+
$ csdx cm:stacks:seed --repo "account"
|
|
894
1383
|
|
|
895
|
-
|
|
1384
|
+
$ csdx cm:stacks:seed --repo "account/repository"
|
|
896
1385
|
|
|
897
|
-
|
|
1386
|
+
$ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack
|
|
898
1387
|
|
|
1388
|
+
$ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid
|
|
899
1389
|
```
|
|
900
|
-
Create a Stack from existing content types, entries, assets, etc
|
|
901
1390
|
|
|
1391
|
+
_See code: [@contentstack/cli-cm-seed](https://github.com/contentstack/cli/blob/v1.1.0/src/commands/cm/stacks/seed.ts)_
|
|
1392
|
+
|
|
1393
|
+
## `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]`
|
|
1394
|
+
|
|
1395
|
+
Unpublish entries or assets of given content types from the specified environment
|
|
1396
|
+
|
|
1397
|
+
```
|
|
902
1398
|
USAGE
|
|
903
|
-
$ csdx cm:
|
|
1399
|
+
$ csdx csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
|
|
1400
|
+
[--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>]
|
|
1401
|
+
[--only-assets] [--only-entries]
|
|
1402
|
+
|
|
1403
|
+
FLAGS
|
|
1404
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content from (default is main branch)
|
|
1405
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
1406
|
+
-c, --config=<value> Path to the config file
|
|
1407
|
+
-e, --environment=<value> Source Environment
|
|
1408
|
+
-l, --locale=<value> Locale filter
|
|
1409
|
+
-y, --yes Agree to process the command with the current configuration
|
|
1410
|
+
--bulk-unpublish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
1411
|
+
bulkpublish API will be used to unpublish the entries and assets
|
|
1412
|
+
--content-type=<value> Content type filter
|
|
1413
|
+
--delivery-token=<value> Delivery token for source environment
|
|
1414
|
+
--retry-failed=<value> Retry publishing failed entries from the logfile (optional, overrides all other flags)
|
|
1415
|
+
|
|
1416
|
+
DESCRIPTION
|
|
1417
|
+
Unpublish entries or assets of given content types from the specified environment
|
|
1418
|
+
|
|
1419
|
+
The unpublish command is used to unpublish entries or assets from given environment
|
|
1420
|
+
|
|
1421
|
+
Environment (Source Environment) and Locale are required to execute the command successfully
|
|
1422
|
+
|
|
1423
|
+
But, if retry-failed flag is set, then only a logfile is required
|
|
1424
|
+
|
|
1425
|
+
A content type can be specified for unpublishing entries, but if no content-type(s) is/are specified and --only-assets
|
|
1426
|
+
is not used,
|
|
904
1427
|
|
|
905
|
-
|
|
906
|
-
|
|
1428
|
+
then all entries from all content types will be unpublished from the source environment
|
|
1429
|
+
|
|
1430
|
+
Note: --only-assets can be used to unpublish only assets and --only-entries can be used to unpublish only entries.
|
|
1431
|
+
|
|
1432
|
+
(--only-assets and --only-entries cannot be used together at the same time)
|
|
1433
|
+
|
|
1434
|
+
ALIASES
|
|
1435
|
+
$ csdx cm:bulk-publish:unpublish
|
|
907
1436
|
|
|
908
1437
|
EXAMPLES
|
|
909
|
-
|
|
910
|
-
$ csdx cm:seed -r "account"
|
|
911
|
-
$ csdx cm:seed -r "account/repository"
|
|
912
|
-
```
|
|
1438
|
+
General Usage
|
|
913
1439
|
|
|
914
|
-
|
|
1440
|
+
$ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] ----delivery-token [DELIVERY TOKEN]
|
|
915
1441
|
|
|
916
|
-
## `csdx cm:stack-clone`
|
|
917
1442
|
|
|
918
|
-
Clone data (structure or content or both) of a stack into another stack
|
|
919
1443
|
|
|
920
|
-
|
|
921
|
-
Clone data (structure or content or both) of a stack into another stack
|
|
922
|
-
Use this plugin to automate the process of cloning a stack in a few steps.
|
|
1444
|
+
Using --config or -c flag
|
|
923
1445
|
|
|
1446
|
+
Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
|
|
924
1447
|
|
|
925
|
-
|
|
926
|
-
$ csdx cm:stack-clone
|
|
1448
|
+
$ csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]
|
|
927
1449
|
|
|
928
|
-
|
|
929
|
-
Use this plugin to automate the process of cloning a stack in a few steps.
|
|
1450
|
+
$ csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]
|
|
930
1451
|
|
|
931
|
-
EXAMPLE
|
|
932
|
-
csdx cm:stack-clone
|
|
933
|
-
```
|
|
934
1452
|
|
|
935
|
-
_See code: [@contentstack/cli-cm-clone](https://github.com/contentstack/cli/blob/v0.1.0-beta.1/src/commands/cm/stack-clone.js)_
|
|
936
1453
|
|
|
937
|
-
|
|
1454
|
+
Using --retry-failed flag
|
|
938
1455
|
|
|
939
|
-
|
|
1456
|
+
$ csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]
|
|
940
1457
|
|
|
941
|
-
```
|
|
942
|
-
Get current region set for CLI
|
|
943
1458
|
|
|
944
1459
|
|
|
945
|
-
|
|
946
|
-
$ csdx config:get:region
|
|
947
|
-
```
|
|
1460
|
+
No content type
|
|
948
1461
|
|
|
949
|
-
|
|
1462
|
+
$ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content types and assets from the source environment)
|
|
950
1463
|
|
|
951
|
-
## `csdx config:set:region [REGION]`
|
|
952
1464
|
|
|
953
|
-
Set region for CLI
|
|
954
1465
|
|
|
955
|
-
|
|
956
|
-
Set region for CLI
|
|
1466
|
+
Using --only-assets
|
|
957
1467
|
|
|
1468
|
+
$ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-assets (Will unpublish only assets from the source environment)
|
|
958
1469
|
|
|
959
|
-
USAGE
|
|
960
|
-
$ csdx config:set:region [REGION]
|
|
961
1470
|
|
|
962
|
-
ARGUMENTS
|
|
963
|
-
REGION (EU|NA) North America(NA), Europe (EU)
|
|
964
1471
|
|
|
965
|
-
|
|
966
|
-
-d, --cda=cda Custom host to set for content delivery API, if this flag is added then cma and name flags are
|
|
967
|
-
required
|
|
1472
|
+
Using --only-entries
|
|
968
1473
|
|
|
969
|
-
|
|
970
|
-
required
|
|
1474
|
+
$ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, all entries, from the source environment)
|
|
971
1475
|
|
|
972
|
-
|
|
1476
|
+
$ csdx cm:stacks:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, (from CONTENT TYPE) from the source environment)
|
|
973
1477
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
--
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
Using --branch flag
|
|
1481
|
+
|
|
1482
|
+
$ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
979
1483
|
```
|
|
980
1484
|
|
|
981
|
-
_See code: [
|
|
1485
|
+
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/unpublish.js)_
|
|
982
1486
|
|
|
983
|
-
## `csdx
|
|
1487
|
+
## `csdx config:get:region`
|
|
984
1488
|
|
|
985
|
-
|
|
1489
|
+
Get current region set for CLI
|
|
986
1490
|
|
|
987
1491
|
```
|
|
988
|
-
display help for <%= config.bin %>
|
|
989
|
-
|
|
990
1492
|
USAGE
|
|
991
|
-
$ csdx
|
|
1493
|
+
$ csdx config:get:region
|
|
992
1494
|
|
|
993
|
-
|
|
994
|
-
|
|
1495
|
+
DESCRIPTION
|
|
1496
|
+
Get current region set for CLI
|
|
995
1497
|
|
|
996
|
-
|
|
997
|
-
|
|
1498
|
+
EXAMPLES
|
|
1499
|
+
$ csdx config:get:region
|
|
998
1500
|
```
|
|
999
1501
|
|
|
1000
|
-
_See code: [@
|
|
1502
|
+
_See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/config/get/region.ts)_
|
|
1001
1503
|
|
|
1002
|
-
## `csdx
|
|
1504
|
+
## `csdx config:set:region [REGION]`
|
|
1003
1505
|
|
|
1004
|
-
|
|
1506
|
+
Set region for CLI
|
|
1005
1507
|
|
|
1006
1508
|
```
|
|
1007
|
-
list installed plugins
|
|
1008
|
-
|
|
1009
1509
|
USAGE
|
|
1010
|
-
$ csdx
|
|
1510
|
+
$ csdx config:set:region [REGION] [-d <value>] [-m <value>] [-n <value>]
|
|
1011
1511
|
|
|
1012
|
-
|
|
1013
|
-
--
|
|
1512
|
+
FLAGS
|
|
1513
|
+
-d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma and name flags are
|
|
1514
|
+
required
|
|
1515
|
+
-m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda and name flags are
|
|
1516
|
+
required
|
|
1517
|
+
-n, --name=<value> Name for the region, if this flag is added then cda and cma flags are required
|
|
1014
1518
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
```
|
|
1519
|
+
DESCRIPTION
|
|
1520
|
+
Set region for CLI
|
|
1018
1521
|
|
|
1019
|
-
|
|
1522
|
+
EXAMPLES
|
|
1523
|
+
$ csdx config:set:region
|
|
1020
1524
|
|
|
1021
|
-
|
|
1525
|
+
$ csdx config:set:region NA
|
|
1022
1526
|
|
|
1023
|
-
|
|
1527
|
+
$ csdx config:set:region NA
|
|
1024
1528
|
|
|
1529
|
+
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --name "India"
|
|
1025
1530
|
```
|
|
1026
|
-
generate plugin starter code
|
|
1027
1531
|
|
|
1532
|
+
_See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/v1.0.0/src/commands/config/set/region.ts)_
|
|
1028
1533
|
|
|
1534
|
+
## `csdx plugins`
|
|
1535
|
+
|
|
1536
|
+
List installed plugins.
|
|
1537
|
+
|
|
1538
|
+
```
|
|
1029
1539
|
USAGE
|
|
1030
|
-
$ csdx plugins
|
|
1540
|
+
$ csdx plugins [--core]
|
|
1541
|
+
|
|
1542
|
+
FLAGS
|
|
1543
|
+
--core Show core plugins.
|
|
1544
|
+
|
|
1545
|
+
DESCRIPTION
|
|
1546
|
+
List installed plugins.
|
|
1547
|
+
|
|
1548
|
+
EXAMPLES
|
|
1549
|
+
$ csdx plugins
|
|
1031
1550
|
```
|
|
1032
1551
|
|
|
1033
|
-
_See code: [@
|
|
1552
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/index.ts)_
|
|
1034
1553
|
|
|
1035
1554
|
## `csdx plugins:inspect PLUGIN...`
|
|
1036
1555
|
|
|
1037
|
-
|
|
1556
|
+
Displays installation properties of a plugin.
|
|
1038
1557
|
|
|
1039
1558
|
```
|
|
1040
|
-
displays installation properties of a plugin
|
|
1041
|
-
|
|
1042
1559
|
USAGE
|
|
1043
1560
|
$ csdx plugins:inspect PLUGIN...
|
|
1044
1561
|
|
|
1045
1562
|
ARGUMENTS
|
|
1046
|
-
PLUGIN [default: .]
|
|
1563
|
+
PLUGIN [default: .] Plugin to inspect.
|
|
1047
1564
|
|
|
1048
|
-
|
|
1049
|
-
-h, --help
|
|
1565
|
+
FLAGS
|
|
1566
|
+
-h, --help Show CLI help.
|
|
1050
1567
|
-v, --verbose
|
|
1051
1568
|
|
|
1052
|
-
|
|
1569
|
+
DESCRIPTION
|
|
1570
|
+
Displays installation properties of a plugin.
|
|
1571
|
+
|
|
1572
|
+
EXAMPLES
|
|
1053
1573
|
$ csdx plugins:inspect myplugin
|
|
1054
1574
|
```
|
|
1055
1575
|
|
|
1056
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
1576
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/inspect.ts)_
|
|
1057
1577
|
|
|
1058
1578
|
## `csdx plugins:install PLUGIN...`
|
|
1059
1579
|
|
|
1060
|
-
|
|
1580
|
+
Installs a plugin into the CLI.
|
|
1061
1581
|
|
|
1062
1582
|
```
|
|
1063
|
-
installs a plugin into the CLI
|
|
1064
|
-
Can be installed from npm or a git url.
|
|
1065
|
-
|
|
1066
|
-
Installation of a user-installed plugin will override a core plugin.
|
|
1067
|
-
|
|
1068
|
-
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in the CLI without the need to patch and update the whole CLI.
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
1583
|
USAGE
|
|
1072
1584
|
$ csdx plugins:install PLUGIN...
|
|
1073
1585
|
|
|
1074
1586
|
ARGUMENTS
|
|
1075
|
-
PLUGIN
|
|
1587
|
+
PLUGIN Plugin to install.
|
|
1076
1588
|
|
|
1077
|
-
|
|
1078
|
-
-f, --force yarn install with force flag
|
|
1079
|
-
-h, --help
|
|
1589
|
+
FLAGS
|
|
1590
|
+
-f, --force Run yarn install with force flag.
|
|
1591
|
+
-h, --help Show CLI help.
|
|
1080
1592
|
-v, --verbose
|
|
1081
1593
|
|
|
1082
1594
|
DESCRIPTION
|
|
1595
|
+
Installs a plugin into the CLI.
|
|
1596
|
+
|
|
1083
1597
|
Can be installed from npm or a git url.
|
|
1084
1598
|
|
|
1085
1599
|
Installation of a user-installed plugin will override a core plugin.
|
|
1086
1600
|
|
|
1087
|
-
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
|
1088
|
-
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
|
1601
|
+
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
|
|
1602
|
+
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
|
|
1089
1603
|
the CLI without the need to patch and update the whole CLI.
|
|
1090
1604
|
|
|
1091
1605
|
ALIASES
|
|
@@ -1093,83 +1607,87 @@ ALIASES
|
|
|
1093
1607
|
|
|
1094
1608
|
EXAMPLES
|
|
1095
1609
|
$ csdx plugins:install myplugin
|
|
1610
|
+
|
|
1096
1611
|
$ csdx plugins:install https://github.com/someuser/someplugin
|
|
1612
|
+
|
|
1097
1613
|
$ csdx plugins:install someuser/someplugin
|
|
1098
1614
|
```
|
|
1099
1615
|
|
|
1100
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
1616
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/install.ts)_
|
|
1101
1617
|
|
|
1102
1618
|
## `csdx plugins:link PLUGIN`
|
|
1103
1619
|
|
|
1104
|
-
|
|
1620
|
+
Links a plugin into the CLI for development.
|
|
1105
1621
|
|
|
1106
1622
|
```
|
|
1107
|
-
links a plugin into the CLI for development
|
|
1108
|
-
Installation of a linked plugin will override a user-installed or core plugin.
|
|
1109
|
-
|
|
1110
|
-
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
1623
|
USAGE
|
|
1114
1624
|
$ csdx plugins:link PLUGIN
|
|
1115
1625
|
|
|
1116
1626
|
ARGUMENTS
|
|
1117
1627
|
PATH [default: .] path to plugin
|
|
1118
1628
|
|
|
1119
|
-
|
|
1120
|
-
-h, --help
|
|
1629
|
+
FLAGS
|
|
1630
|
+
-h, --help Show CLI help.
|
|
1121
1631
|
-v, --verbose
|
|
1122
1632
|
|
|
1123
1633
|
DESCRIPTION
|
|
1634
|
+
Links a plugin into the CLI for development.
|
|
1635
|
+
|
|
1124
1636
|
Installation of a linked plugin will override a user-installed or core plugin.
|
|
1125
1637
|
|
|
1126
|
-
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
1638
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
|
|
1127
1639
|
command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
1128
1640
|
|
|
1129
|
-
|
|
1641
|
+
EXAMPLES
|
|
1130
1642
|
$ csdx plugins:link myplugin
|
|
1131
1643
|
```
|
|
1132
1644
|
|
|
1133
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
1645
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/link.ts)_
|
|
1134
1646
|
|
|
1135
1647
|
## `csdx plugins:uninstall PLUGIN...`
|
|
1136
1648
|
|
|
1137
|
-
|
|
1649
|
+
Removes a plugin from the CLI.
|
|
1138
1650
|
|
|
1139
1651
|
```
|
|
1140
|
-
removes a plugin from the CLI
|
|
1141
|
-
|
|
1142
1652
|
USAGE
|
|
1143
1653
|
$ csdx plugins:uninstall PLUGIN...
|
|
1144
1654
|
|
|
1145
1655
|
ARGUMENTS
|
|
1146
1656
|
PLUGIN plugin to uninstall
|
|
1147
1657
|
|
|
1148
|
-
|
|
1149
|
-
-h, --help
|
|
1658
|
+
FLAGS
|
|
1659
|
+
-h, --help Show CLI help.
|
|
1150
1660
|
-v, --verbose
|
|
1151
1661
|
|
|
1662
|
+
DESCRIPTION
|
|
1663
|
+
Removes a plugin from the CLI.
|
|
1664
|
+
|
|
1152
1665
|
ALIASES
|
|
1153
1666
|
$ csdx plugins:unlink
|
|
1154
1667
|
$ csdx plugins:remove
|
|
1155
1668
|
```
|
|
1156
1669
|
|
|
1157
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
1670
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/uninstall.ts)_
|
|
1158
1671
|
|
|
1159
1672
|
## `csdx plugins:update`
|
|
1160
1673
|
|
|
1161
|
-
|
|
1674
|
+
Update installed plugins.
|
|
1162
1675
|
|
|
1163
1676
|
```
|
|
1164
|
-
update installed plugins
|
|
1165
|
-
|
|
1166
1677
|
USAGE
|
|
1167
|
-
$ csdx plugins:update
|
|
1678
|
+
$ csdx plugins:update [-h] [-v]
|
|
1168
1679
|
|
|
1169
|
-
|
|
1170
|
-
-h, --help
|
|
1680
|
+
FLAGS
|
|
1681
|
+
-h, --help Show CLI help.
|
|
1171
1682
|
-v, --verbose
|
|
1683
|
+
|
|
1684
|
+
DESCRIPTION
|
|
1685
|
+
Update installed plugins.
|
|
1172
1686
|
```
|
|
1173
1687
|
|
|
1174
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
|
|
1688
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.1.0/src/commands/plugins/update.ts)_
|
|
1175
1689
|
<!-- commandsstop -->
|
|
1690
|
+
|
|
1691
|
+
```
|
|
1692
|
+
|
|
1693
|
+
```
|