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