@contentstack/cli-cm-bulk-publish 0.1.1-beta.3 → 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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +533 -281
  3. package/oclif.manifest.json +1 -1
  4. package/package.json +27 -12
  5. package/src/commands/cm/assets/publish.js +233 -0
  6. package/src/commands/cm/assets/unpublish.js +179 -0
  7. package/src/commands/cm/bulk-publish/cross-publish.js +187 -68
  8. package/src/commands/cm/bulk-publish/index.js +5 -6
  9. package/src/commands/cm/entries/publish-modified.js +197 -0
  10. package/src/commands/cm/entries/publish-non-localized-fields.js +208 -0
  11. package/src/commands/cm/entries/publish-only-unpublished.js +109 -0
  12. package/src/commands/cm/entries/publish.js +254 -0
  13. package/src/commands/cm/entries/unpublish.js +184 -0
  14. package/src/commands/cm/entries/update-and-publish.js +191 -0
  15. package/src/commands/cm/stacks/publish-clear-logs.js +82 -0
  16. package/src/commands/cm/stacks/publish-configure.js +46 -0
  17. package/src/commands/cm/stacks/publish-revert.js +102 -0
  18. package/src/commands/cm/stacks/publish.js +110 -0
  19. package/src/commands/cm/stacks/unpublish.js +282 -0
  20. package/src/config/index.js +60 -99
  21. package/src/consumer/publish.js +600 -377
  22. package/src/producer/add-fields.js +209 -189
  23. package/src/producer/cross-publish.js +195 -136
  24. package/src/producer/nonlocalized-field-changes.js +235 -216
  25. package/src/producer/publish-assets.js +104 -98
  26. package/src/producer/publish-edits.js +126 -113
  27. package/src/producer/publish-entries.js +135 -112
  28. package/src/producer/publish-unpublished-env.js +126 -114
  29. package/src/producer/revert.js +261 -230
  30. package/src/producer/unpublish.js +175 -137
  31. package/src/services/publish-only-unpublished.js +130 -0
  32. package/src/util/client.js +21 -17
  33. package/src/util/command-helper.js +25 -0
  34. package/src/util/fs.js +10 -11
  35. package/src/util/index.js +15 -16
  36. package/src/util/logger.js +21 -25
  37. package/src/util/queue.js +13 -13
  38. package/src/util/retryfailed.js +8 -4
  39. package/src/util/store.js +44 -52
  40. package/src/commands/cm/bulk-publish/add-fields.js +0 -117
  41. package/src/commands/cm/bulk-publish/assets.js +0 -117
  42. package/src/commands/cm/bulk-publish/clear.js +0 -63
  43. package/src/commands/cm/bulk-publish/configure.js +0 -46
  44. package/src/commands/cm/bulk-publish/entries.js +0 -125
  45. package/src/commands/cm/bulk-publish/entry-edits.js +0 -123
  46. package/src/commands/cm/bulk-publish/nonlocalized-field-changes.js +0 -116
  47. package/src/commands/cm/bulk-publish/revert.js +0 -81
  48. package/src/commands/cm/bulk-publish/unpublish.js +0 -164
  49. package/src/commands/cm/bulk-publish/unpublished-entries.js +0 -122
  50. package/src/util/request.js +0 -57
package/README.md CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (-v|--version|version)
21
- @contentstack/cli-cm-bulk-publish/0.1.1-beta.3 darwin-x64 node-v14.16.0
21
+ @contentstack/cli-cm-bulk-publish/1.0.0 linux-x64 node-v16.14.2
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -29,541 +29,793 @@ USAGE
29
29
  # Commands
30
30
 
31
31
  <!-- commands -->
32
+ * [`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)
33
+ * [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish)
32
34
  * [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
33
- * [`csdx cm:bulk-publish:add-fields`](#csdx-cmbulk-publishadd-fields)
34
- * [`csdx cm:bulk-publish:assets`](#csdx-cmbulk-publishassets)
35
- * [`csdx cm:bulk-publish:clear`](#csdx-cmbulk-publishclear)
36
- * [`csdx cm:bulk-publish:configure`](#csdx-cmbulk-publishconfigure)
37
- * [`csdx cm:bulk-publish:cross-publish`](#csdx-cmbulk-publishcross-publish)
38
- * [`csdx cm:bulk-publish:entries`](#csdx-cmbulk-publishentries)
39
- * [`csdx cm:bulk-publish:entry-edits`](#csdx-cmbulk-publishentry-edits)
40
- * [`csdx cm:bulk-publish:nonlocalized-field-changes`](#csdx-cmbulk-publishnonlocalized-field-changes)
41
- * [`csdx cm:bulk-publish:revert`](#csdx-cmbulk-publishrevert)
42
- * [`csdx cm:bulk-publish:unpublish`](#csdx-cmbulk-publishunpublish)
43
- * [`csdx cm:bulk-publish:unpublished-entries`](#csdx-cmbulk-publishunpublished-entries)
44
-
45
- ## `csdx cm:bulk-publish`
46
-
47
- Bulk Publish script for managing entries and assets
35
+ * [`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)
36
+ * [`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)
37
+ * [`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)
38
+ * [`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)
39
+ * [`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)
40
+ * [`csdx cm:entries:unpublish`](#csdx-cmentriesunpublish)
41
+ * [`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)
42
+ * [`csdx cm:stacks:publish`](#csdx-cmstackspublish)
43
+ * [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs)
44
+ * [`csdx cm:stacks:publish-configure`](#csdx-cmstackspublish-configure)
45
+ * [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert)
46
+ * [`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)
47
+
48
+ ## `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>]`
49
+
50
+ Publish assets to the specified environments
48
51
 
49
52
  ```
50
53
  USAGE
51
- $ csdx cm:bulk-publish
52
- ```
54
+ $ csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish
55
+ <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
56
+ [--content-types <value>]
53
57
 
54
- _See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_
58
+ OPTIONS
59
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
60
+ is selected)
55
61
 
56
- ## `csdx cm:bulk-publish:add-fields`
62
+ -a, --alias=alias Alias(name) for the management token
57
63
 
58
- Add fields from updated content types to their respective entries
64
+ -c, --config=config Path to the config file
59
65
 
60
- ```
61
- USAGE
62
- $ csdx cm:bulk-publish:add-fields
66
+ -e, --environments=environments Environments where assets will be published
63
67
 
64
- OPTIONS
65
- -a, --alias=alias Alias for the management token to be used
68
+ -l, --locales=locales Locales to where assets will be published
66
69
 
67
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
68
- bulkpublish API will be used for publishing the entries
70
+ -y, --yes Agree to process the command with the current configuration
69
71
 
70
- -c, --config=config Path to config file to be used
72
+ --bulk-publish=bulk-publish [default: true] By default this flag is set as true. It indicates that contentstack's
73
+ bulkpublish API will be used to publish the assets
71
74
 
72
- -e, --environments=environments Environments to which entries need to be published
75
+ --content-types=content-types Content types
73
76
 
74
- -l, --locales=locales Locales to which entries need to be published
77
+ --delivery-token=delivery-token Delivery token for source environment
75
78
 
76
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile (optional, overrides all other
77
- flags)
79
+ --folder-uid=folder-uid [default: cs_root] Folder-uid from where the assets will be published
78
80
 
79
- -t, --contentTypes=contentTypes The Content-Types from which entries need to be published
81
+ --retry-failed=retry-failed Retry publishing failed assets from the logfile (optional, will override all other
82
+ flags)
80
83
 
81
- -y, --yes Agree to process the command with the current configuration
84
+ --source-env=source-env Source environment
82
85
 
83
86
  DESCRIPTION
84
- The add-fields command is used for updating already existing entries with the updated schema of their respective
85
- Content Type
87
+ The assets command is used to publish assets from the specified stack, to the specified environments
86
88
 
87
- Content Types, Environments and Locales are required for executing the command successfully
89
+ Note: Environment(s) and Locale(s) are required to execute the command successfully
88
90
  But, if retryFailed flag is set, then only a logfile is required
89
91
 
92
+ ALIASES
93
+ $ csdx cm:bulk-publish:assets
94
+
90
95
  EXAMPLES
91
96
  General Usage
92
- csdx cm:bulk-publish:add-fields -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1]
93
- [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
97
+ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN
98
+ ALIAS]
94
99
 
95
100
  Using --config or -c flag
96
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
97
- csdx cm:bulk-publish:add-fields --config [PATH TO CONFIG FILE]
98
- csdx cm:bulk-publish:add-fields -c [PATH TO CONFIG FILE]
101
+ Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
102
+ csdx cm:assets:publish --config [PATH TO CONFIG FILE]
103
+ csdx cm:assets:publish -c [PATH TO CONFIG FILE]
104
+
105
+ Using --retry-failed flag
106
+ csdx cm:assets:publish --retry-failed [LOG FILE NAME]
107
+
108
+ Using --branch flag
109
+ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN
110
+ ALIAS] --branch [BRANCH NAME]
99
111
 
100
- Using --retryFailed or -r flag
101
- csdx cm:bulk-publish:add-fields --retryFailed [LOG FILE NAME]
102
- csdx cm:bulk-publish:add-fields -r [LOG FILE NAME]
112
+ Using --source-env
113
+ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN
114
+ ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
103
115
  ```
104
116
 
105
- _See code: [src/commands/cm/bulk-publish/add-fields.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/add-fields.js)_
117
+ _See code: [src/commands/cm/assets/publish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/assets/publish.js)_
106
118
 
107
- ## `csdx cm:bulk-publish:assets`
119
+ ## `csdx cm:assets:unpublish`
108
120
 
109
- Publish assets to specified environments
121
+ Unpublish assets from given environment
110
122
 
111
123
  ```
112
124
  USAGE
113
- $ csdx cm:bulk-publish:assets
125
+ $ csdx cm:assets:unpublish
114
126
 
115
127
  OPTIONS
116
- -a, --alias=alias Alias for the management token to be used
117
-
118
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
119
- bulkpublish API will be used for publishing the entries
120
-
121
- -c, --config=config Path to config file to be used
128
+ -a, --alias=alias Alias(name) for the management token
129
+ -c, --config=config Path to the config file
130
+ -e, --environment=environment Source Environment
131
+ -y, --yes Agree to process the command with the current configuration
122
132
 
123
- -e, --environments=environments Environments to which assets need to be published
133
+ --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
134
+ is selected)
124
135
 
125
- -l, --locales=locales Locales to which assets need to be published
136
+ --bulk-unpublish=bulk-unpublish [default: true] By default this flag is set as true. It indicates that contentstack's
137
+ bulkpublish API will be used to unpublish the assets
126
138
 
127
- -r, --retryFailed=retryFailed Retry publishing failed assets from the logfile (optional, will override all other
128
- flags)
139
+ --delivery-token=delivery-token Delivery Token for source environment
129
140
 
130
- -u, --folderUid=folderUid [default: cs_root] Folder-uid from which the assets need to be published
141
+ --locale=locale Locale filter
131
142
 
132
- -y, --yes Agree to process the command with the current configuration
143
+ --retry-failed=retry-failed Retry unpublishing failed assets from the logfile
133
144
 
134
145
  DESCRIPTION
135
- The assets command is used for publishing assets from the specified stack, to the specified environments
146
+ The unpublish command is used for unpublishing assets from the given environment
136
147
 
137
- Environment(s) and Locale(s) are required for executing the command successfully
138
- But, if retryFailed flag is set, then only a logfile is required
148
+ Note: Environment (Source Environment) and Locale are required to execute the command successfully
149
+ But, if retry-failed flag is set, then only a logfile is required
139
150
 
140
151
  EXAMPLES
141
152
  General Usage
142
- csdx cm:bulk-publish:assets -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS]
153
+ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN
154
+ ALIAS] --delivery-token [DELIVERY TOKEN]
143
155
 
144
156
  Using --config or -c flag
145
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
146
- csdx cm:bulk-publish:assets --config [PATH TO CONFIG FILE]
147
- csdx cm:bulk-publish:assets -c [PATH TO CONFIG FILE]
157
+ Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
158
+ csdx cm:assets:unpublish --config [PATH TO CONFIG FILE]
159
+ csdx cm:assets:unpublish -c [PATH TO CONFIG FILE]
148
160
 
149
- Using --retryFailed or -r flag
150
- csdx cm:bulk-publish:assets --retryFailed [LOG FILE NAME]
151
- csdx cm:bulk-publish:assets -r [LOG FILE NAME]
161
+ Using --retry-failed flag
162
+ csdx cm:assets:unpublish --retry-failed [LOG FILE NAME]
163
+
164
+ Using --branch flag
165
+ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN
166
+ ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
152
167
  ```
153
168
 
154
- _See code: [src/commands/cm/bulk-publish/assets.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/assets.js)_
169
+ _See code: [src/commands/cm/assets/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_
155
170
 
156
- ## `csdx cm:bulk-publish:clear`
171
+ ## `csdx cm:bulk-publish`
157
172
 
158
- Clear the log folder
173
+ Bulk Publish script for managing entries and assets
159
174
 
160
175
  ```
161
176
  USAGE
162
- $ csdx cm:bulk-publish:clear
163
-
164
- OPTIONS
165
- -l, --list List number of log files
166
- -y, --yes Delete all files without asking for confirmation
177
+ $ csdx cm:bulk-publish
167
178
  ```
168
179
 
169
- _See code: [src/commands/cm/bulk-publish/clear.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/clear.js)_
180
+ _See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_
170
181
 
171
- ## `csdx cm:bulk-publish:configure`
182
+ ## `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]`
172
183
 
173
- Generate configuration template
184
+ Publish entries and assets from one environment to other environments
174
185
 
175
186
  ```
176
187
  USAGE
177
- $ csdx cm:bulk-publish:configure
188
+ $ csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type
189
+ <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>]
190
+ [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]
178
191
 
179
192
  OPTIONS
180
- -a, --alias=alias Management token alias for the stack
193
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
194
+ is selected)
195
+
196
+ -a, --alias=alias Alias(name) for the management token
197
+
198
+ -c, --config=config Path to the config file
199
+
200
+ -y, --yes Agree to process the command with the current configuration
201
+
202
+ --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
203
+ bulkpublish API will be used to publish the entries
204
+
205
+ --content-type=content-type The Contenttypes from which entries will be published
206
+
207
+ --delivery-token=delivery-token Delivery token for source environment
208
+
209
+ --environments=environments Destination Environments
210
+
211
+ --locales=locales Source locale
212
+
213
+ --onlyAssets Unpublish only assets
214
+
215
+ --onlyEntries Unpublish only entries
216
+
217
+ --retry-failed=retry-failed (optional) Retry publishing failed entries from the logfile (this flag overrides all
218
+ other flags)
219
+
220
+ --source-env=source-env Source Env
181
221
 
182
222
  DESCRIPTION
183
- The configure command is used for generating a configuration file for bulk-publish script.
223
+ The cross-publish command is used to publish entries and assets from one environment to other environments
184
224
 
185
- Here is a detailed description for all the available flags
225
+ Note: Content Type, Environment, Destination Environment(s) and Locale are required to execute the command
226
+ successfully
227
+ But, if retryFailed flag is set, then only a logfile is required
186
228
 
187
- -----------------------------------------------------------------------------------------------------------
188
- --alias or -a : Management token Alias for the stack in use.
229
+ EXAMPLES
230
+ General Usage
231
+ csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION
232
+ ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]
189
233
 
190
- EXAMPLE : cm:bulk-publish:configure --alias [MANAGEMENT TOKEN Alias]
191
- EXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]
234
+ Using --config or -c flag
235
+ Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
236
+ csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]
237
+ csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]
238
+
239
+ Using --retry-failed flag
240
+ csdx cm:bulk-publish:cross-publish --retry-failed [LOG FILE NAME]
241
+ csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]
242
+
243
+ Using --branch flag
244
+ csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION
245
+ ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
192
246
  ```
193
247
 
194
- _See code: [src/commands/cm/bulk-publish/configure.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/configure.js)_
248
+ _See code: [src/commands/cm/bulk-publish/cross-publish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
195
249
 
196
- ## `csdx cm:bulk-publish:cross-publish`
250
+ ## `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>]`
197
251
 
198
- Publish entries and assets from one environment to other environments
252
+ Publish entries from multiple contenttypes to multiple environments and locales
199
253
 
200
254
  ```
201
255
  USAGE
202
- $ csdx cm:bulk-publish:cross-publish
256
+ $ csdx cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types]
257
+ [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token
258
+ <value>] [--source-env <value>]
203
259
 
204
260
  OPTIONS
205
- -a, --alias=alias Alias for the management token to be used
261
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
262
+ is selected)
206
263
 
207
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that
208
- contentstack's bulkpublish API will be used for publishing the entries
264
+ -a, --alias=alias Alias(name) for the management token
209
265
 
210
- -c, --config=config Path to config file to be used
266
+ -c, --config=config Path for the external config file (A new config file can be generated at the current
267
+ working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)
211
268
 
212
- -d, --destEnv=destEnv Destination Environments
269
+ -e, --environments=environments Environments where entries will be published
213
270
 
214
- -e, --environment=environment Source Environment
271
+ -l, --locales=locales Locales where entries will be published
215
272
 
216
- -l, --locale=locale Locale filter
273
+ -y, --yes Agree to process the command with the current configuration
217
274
 
218
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile (optional, overrides all other
219
- flags)
275
+ --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
276
+ bulkpublish API will be used to publish the entries
220
277
 
221
- -t, --contentType=contentType Content-Type filter
278
+ --content-types=content-types The Contenttypes from which entries need to be published
222
279
 
223
- -x, --deliveryToken=deliveryToken Delivery Token for source environment
280
+ --delivery-token=delivery-token Delivery token for source environment
224
281
 
225
- -y, --yes Agree to process the command with the current configuration
282
+ --publish-all-content-types (optional) Publish all contenttypes (cannot be set when contentTypes flag is set)
226
283
 
227
- --onlyAssets Unpublish only assets
284
+ --retry-failed=retry-failed (optional) Retry failed entries from the logfile (overrides all other flags) This
285
+ flag is used to retry publishing entries that failed to publish in a previous
286
+ attempt. A log file for the previous session will be required for processing the
287
+ failed entries
228
288
 
229
- --onlyEntries Unpublish only entries
289
+ --source-env=source-env Source environment
230
290
 
231
291
  DESCRIPTION
232
- The cross-publish command is used for publishing entries and assets from one evironment to other environments
292
+ The publish command is used to publish entries from the specified content types, to the
293
+ specified environments and locales
233
294
 
234
- Content Type, Environment, Destination Environment(s) and Locale are required for executing the command successfully
235
- But, if retryFailed flag is set, then only a logfile is required
295
+ Note: Content Types, Environments and Locales are required to execute the command successfully
296
+ But, if retry-failed flag is set, then only a logfile is required
297
+
298
+ ALIASES
299
+ $ csdx cm:bulk-publish:entries
236
300
 
237
301
  EXAMPLES
238
302
  General Usage
239
- csdx cm:bulk-publish:cross-publish -t [CONTENT TYPE] -e [SOURCE ENV] -d [DESTINATION ENVIRONMENT] -l [LOCALE] -a
240
- [MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]
303
+ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales
304
+ [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
241
305
 
242
306
  Using --config or -c flag
243
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
244
- csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]
245
- csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]
307
+ Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
308
+ csdx cm:entries:publish --config [PATH TO CONFIG FILE]
309
+ csdx cm:entries:publish -c [PATH TO CONFIG FILE]
246
310
 
247
- Using --retryFailed or -r flag
248
- csdx cm:bulk-publish:cross-publish --retryFailed [LOG FILE NAME]
249
- csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]
311
+ Using --retry-failed
312
+ csdx cm:entries:publish --retry-failed [LOG FILE NAME]
313
+ csdx cm:entries:publish -r [LOG FILE NAME]
314
+
315
+ Using --branch
316
+ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales
317
+ [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
318
+
319
+ Using --source-env
320
+ csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales
321
+ [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
250
322
  ```
251
323
 
252
- _See code: [src/commands/cm/bulk-publish/cross-publish.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
324
+ _See code: [src/commands/cm/entries/publish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish.js)_
253
325
 
254
- ## `csdx cm:bulk-publish:entries`
326
+ ## `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>]`
255
327
 
256
- Publish entries from multiple content-types to multiple environments and locales
328
+ Publish edited entries from a specified content type to the given locales and environments
257
329
 
258
330
  ```
259
331
  USAGE
260
- $ csdx cm:bulk-publish:entries
332
+ $ csdx cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env
333
+ <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]
261
334
 
262
335
  OPTIONS
263
- -a, --alias=alias Alias for the management token to be used
336
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
337
+ is selected)
264
338
 
265
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
266
- bulkpublish API will be used for publishing the entries
339
+ -a, --alias=alias Alias(name) for the management token
267
340
 
268
- -c, --config=config Path for the external config file to be used (A new config file can be generated at
269
- the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)
341
+ -c, --config=config Path to the config file
270
342
 
271
- -e, --environments=environments Environments to which entries need to be published
343
+ -e, --environments=environments Destination environments
272
344
 
273
- -l, --locales=locales Locales to which entries need to be published
345
+ -l, --locales=locales Locales where edited entries will be published
274
346
 
275
- -o, --publishAllContentTypes Publish all content-types (optional, cannot be set when contentTypes flag is set)
347
+ -y, --yes Agree to process the command with the current configuration
276
348
 
277
- -r, --retryFailed=retryFailed Retry failed entries from the logfile (optional, overrides all other flags) This flag
278
- is used to retry publishing entries that failed to publish in a previous attempt. A
279
- log file for the previous session will be required for processing the failed entries
349
+ --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
350
+ bulkpublish API will be used to publish the entries
280
351
 
281
- -t, --contentTypes=contentTypes The Content-types from which entries need to be published
352
+ --content-types=content-types The Contenttypes which will be checked for edited entries
282
353
 
283
- -y, --yes Agree to process the command with the current configuration
354
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile (optional, overrides all other
355
+ flags)
356
+
357
+ --source-env=source-env Environment from which edited entries will be published
284
358
 
285
359
  DESCRIPTION
286
- The entries command is used for publishing entries from the specified content types, to the
287
- specified environments and locales
360
+ The publish-modified command is used to publish entries from the specified content types, to the
361
+ specified environments and locales
288
362
 
289
- Content Types, Environments and Locales are required for executing the command successfully
290
- But, if retryFailed flag is set, then only a logfile is required
363
+ Note: Content type(s), Source Environment, Destination Environment(s) and Locale(s) are required to execute the
364
+ command successfully
365
+ But, if retry-failed flag is set, then only a logfile is required
366
+
367
+ ALIASES
368
+ $ csdx cm:bulk-publish:entry-edits
291
369
 
292
370
  EXAMPLES
293
371
  General Usage
294
- csdx cm:bulk-publish:entries -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1]
295
- [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
372
+ csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e
373
+ [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
296
374
 
297
375
  Using --config or -c flag
298
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
299
- csdx cm:bulk-publish:entries --config [PATH TO CONFIG FILE]
300
- csdx cm:bulk-publish:entries -c [PATH TO CONFIG FILE]
376
+ Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
377
+ csdx cm:entries:publish-modified --config [PATH TO CONFIG FILE]
378
+ csdx cm:entries:publish-modified -c [PATH TO CONFIG FILE]
379
+
380
+ Using --retry-failed
381
+ csdx cm:entries:publish-modified --retry-failed [LOG FILE NAME]
382
+ csdx cm:entries:publish-modified -r [LOG FILE NAME]
301
383
 
302
- Using --retryFailed or -r flag
303
- csdx cm:bulk-publish:entries --retryFailed [LOG FILE NAME]
304
- csdx cm:bulk-publish:entries -r [LOG FILE NAME]
384
+ Using --branch
385
+ csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e
386
+ [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
305
387
  ```
306
388
 
307
- _See code: [src/commands/cm/bulk-publish/entries.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/entries.js)_
389
+ _See code: [src/commands/cm/entries/publish-modified.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-modified.js)_
308
390
 
309
- ## `csdx cm:bulk-publish:entry-edits`
391
+ ## `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>]`
310
392
 
311
- Publish edited entries from a specified Content Type to given locales and environments
393
+ Publish non-localized fields for the given content types, from a particular source environment to the specified environments
312
394
 
313
395
  ```
314
396
  USAGE
315
- $ csdx cm:bulk-publish:entry-edits
397
+ $ csdx cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>]
398
+ [--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]
316
399
 
317
400
  OPTIONS
318
- -a, --alias=alias Alias for the management token to be used
401
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
402
+ is selected)
319
403
 
320
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
321
- bulkpublish API will be used for publishing the entries
404
+ -a, --alias=alias Alias(name) for the management token
322
405
 
323
- -c, --config=config Path to config file to be used
406
+ -c, --config=config Path to the config file
324
407
 
325
408
  -e, --environments=environments Destination environments
326
409
 
327
- -l, --locales=locales Locales to which edited entries need to be published
410
+ -y, --yes Agree to process the command with the current configuration
328
411
 
329
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile (optional, overrides all other
330
- flags)
412
+ --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
413
+ bulkpublish API will be used to publish the entries
331
414
 
332
- -s, --sourceEnv=sourceEnv Environment from which edited entries will be published
415
+ --content-types=content-types The Contenttypes from which entries will be published
333
416
 
334
- -t, --contentTypes=contentTypes The Content-Types which will be checked for edited entries
417
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile
335
418
 
336
- -y, --yes Agree to process the command with the current configuration
419
+ --source-env=source-env Source Environment
337
420
 
338
421
  DESCRIPTION
339
- The entry-edits command is used for publishing entries from the specified content types, to the
340
- specified environments and locales
422
+ The non-localized field changes command is used to publish non-localized field changes from the given content types to
423
+ the specified environments
341
424
 
342
- Content Type(s), Source Environment, Destination Environment(s) and Locale(s) are required for executing the command
343
- successfully
425
+ Note: Content types, Environments and Source Environment are required to execute this command successfully.
344
426
  But, if retryFailed flag is set, then only a logfile is required
345
427
 
428
+ ALIASES
429
+ $ csdx cm:bulk-publish:nonlocalized-field-changes
430
+
346
431
  EXAMPLES
347
432
  General Usage
348
- csdx cm:bulk-publish:entry-edits -t [CONTENT TYPE 1] [CONTENT TYPE 2] -s [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT
349
- 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
433
+ csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments
434
+ [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV]
350
435
 
351
436
  Using --config or -c flag
352
437
  Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
353
- csdx cm:bulk-publish:entry-edits --config [PATH TO CONFIG FILE]
354
- csdx cm:bulk-publish:entry-edits -c [PATH TO CONFIG FILE]
438
+ csdx cm:entries:publish-non-localized-fields --config [PATH TO CONFIG FILE]
439
+ csdx cm:entries:publish-non-localized-fields -c [PATH TO CONFIG FILE]
440
+
441
+ Using --retry-failed flag
442
+ csdx cm:entries:publish-non-localized-fields --retry-failed [LOG FILE NAME]
355
443
 
356
- Using --retryFailed or -r flag
357
- csdx cm:bulk-publish:entry-edits --retryFailed [LOG FILE NAME]
358
- csdx cm:bulk-publish:entry-edits -r [LOG FILE NAME]
444
+ Using --branch flag
445
+ csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments
446
+ [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV] --branch [BRANCH NAME]
359
447
  ```
360
448
 
361
- _See code: [src/commands/cm/bulk-publish/entry-edits.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/entry-edits.js)_
449
+ _See code: [src/commands/cm/entries/publish-non-localized-fields.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-non-localized-fields.js)_
362
450
 
363
- ## `csdx cm:bulk-publish:nonlocalized-field-changes`
451
+ ## `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>]`
364
452
 
365
- Publish non-localized-fields for given Content Types, from a particular source environment to specified environments
453
+ Publish unpublished entries from the source environment, to other environments and locales
366
454
 
367
455
  ```
368
456
  USAGE
369
- $ csdx cm:bulk-publish:nonlocalized-field-changes
457
+ $ csdx cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>]
458
+ [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]
370
459
 
371
460
  OPTIONS
372
- -a, --alias=alias Alias for the management token to be used
461
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
462
+ is selected)
463
+
464
+ -a, --alias=alias Alias(name) for the management token
373
465
 
374
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
375
- bulkpublish API will be used for publishing the entries
466
+ -b, --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
467
+ bulkpublish API will be used to publish the entries
376
468
 
377
- -c, --config=config Path to config file to be used
469
+ -c, --config=config Path to the config file
378
470
 
379
471
  -e, --environments=environments Destination environments
380
472
 
381
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile
473
+ -y, --yes Agree to process the command with the current configuration
474
+
475
+ --content-types=content-types The Contenttypes from which entries will be published
382
476
 
383
- -s, --sourceEnv=sourceEnv Source Environment
477
+ --locales=locales Source locale
384
478
 
385
- -t, --contentTypes=contentTypes The Content-Types from which entries need to be published
479
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile
386
480
 
387
- -y, --yes Agree to process the command with the current configuration
481
+ --source-env=source-env Source Env
388
482
 
389
483
  DESCRIPTION
390
- The nonlocalized-field-changes command is used for publishing nonlocalized field changes from the given Content Types
391
- to
392
- the specified Environments
484
+ The publish-only-unpublished command is used to publish unpublished entries from the source environment, to other
485
+ environments and locales
393
486
 
394
- Content Types, Environments and Source Environment are required for executing this command successfully.
395
- But, if retryFailed flag is set, then only a logfile is required
487
+ Note: Content type(s), Source Environment, Destination Environment(s) and Source Locale are required to execute the
488
+ command successfully
489
+ But, if retry-failed flag is set, then only a logfile is required
490
+
491
+ ALIASES
492
+ $ csdx cm:bulk-publish:unpublished-entries
396
493
 
397
494
  EXAMPLES
398
495
  General Usage
399
- csdx cm:bulk-publish:nonlocalized-field-changes -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT
400
- 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
496
+ csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a
497
+ [MANAGEMENT TOKEN ALIAS] -source-env [SOURCE ENV]
401
498
 
402
499
  Using --config or -c flag
403
500
  Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
404
- csdx cm:bulk-publish:nonlocalized-field-changes --config [PATH TO CONFIG FILE]
405
- csdx cm:bulk-publish:nonlocalized-field-changes -c [PATH TO CONFIG FILE]
501
+ csdx cm:entries:publish-only-unpublished --config [PATH TO CONFIG FILE]
502
+ csdx cm:entries:publish-only-unpublished -c [PATH TO CONFIG FILE]
406
503
 
407
- Using --retryFailed or -r flag
408
- csdx cm:bulk-publish:nonlocalized-field-changes --retryFailed [LOG FILE NAME]
409
- csdx cm:bulk-publish:nonlocalized-field-changes -r [LOG FILE NAME]
504
+ Using --retry-failed
505
+ csdx cm:entries:publish-only-unpublished --retry-failed [LOG FILE NAME]
506
+
507
+ Using --branch
508
+ csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a
509
+ [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME] -source-env [SOURCE ENV]
410
510
  ```
411
511
 
412
- _See code: [src/commands/cm/bulk-publish/nonlocalized-field-changes.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/nonlocalized-field-changes.js)_
512
+ _See code: [src/commands/cm/entries/publish-only-unpublished.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-only-unpublished.js)_
413
513
 
414
- ## `csdx cm:bulk-publish:revert`
514
+ ## `csdx cm:entries:unpublish`
415
515
 
416
- Revert publish operations by using a log file
516
+ Unpublish entries from the given environment
417
517
 
418
518
  ```
419
519
  USAGE
420
- $ csdx cm:bulk-publish:revert
520
+ $ csdx cm:entries:unpublish
421
521
 
422
522
  OPTIONS
423
- -l, --logFile=logFile logfile to be used to revert
424
- -r, --retryFailed=retryFailed retry publishing failed entries from the logfile
523
+ -a, --alias=alias Alias(name) for the management token
524
+ -c, --config=config Path to the config file
525
+ -e, --environment=environment Source Environment
526
+ -y, --yes Agree to process the command with the current configuration
527
+
528
+ --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
529
+ is selected)
530
+
531
+ --bulk-unpublish=bulk-unpublish [default: true] This flag is set to true by default. It indicates that contentstack's
532
+ bulkpublish API will be used to unpublish the entries
533
+
534
+ --content-type=content-type Content type filter
535
+
536
+ --delivery-token=delivery-token Delivery token for source environment
537
+
538
+ --locale=locale Locale filter
539
+
540
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile
425
541
 
426
542
  DESCRIPTION
427
- The revert command is used for reverting all publish operations performed using bulk-publish script.
428
- A log file name is required to execute revert command
543
+ The unpublish command is used to unpublish entries from the given environment
544
+
545
+ Note: Environment (Source Environment) and Locale are required to execute the command successfully
546
+ But, if retry-failed flag is set, then only a logfile is required
429
547
 
430
548
  EXAMPLES
431
- Using --logFile
432
- cm:bulk-publish:revert --logFile [LOG FILE NAME]
433
- cm:bulk-publish:revert -l [LOG FILE NAME]
549
+ General Usage
550
+ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE]
551
+ --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]
552
+
553
+ Using --config or -c flag
554
+ Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
555
+ csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]
556
+ csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]
557
+
558
+ Using --retry-failed flag
559
+ csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]
560
+
434
561
 
435
- Using --retryFailed
436
- cm:bulk-publish:revert --retryFailed [LOG FILE NAME]
437
- cm:bulk-publish:revert -r [LOG FILE NAME]
562
+ Using --branch flag
563
+ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE]
564
+ --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
438
565
  ```
439
566
 
440
- _See code: [src/commands/cm/bulk-publish/revert.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/revert.js)_
567
+ _See code: [src/commands/cm/entries/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/unpublish.js)_
441
568
 
442
- ## `csdx cm:bulk-publish:unpublish`
569
+ ## `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>]`
443
570
 
444
- Unpublish entries of given Content Types from given environment
571
+ Add fields from updated content types to their respective entries
445
572
 
446
573
  ```
447
574
  USAGE
448
- $ csdx cm:bulk-publish:unpublish
575
+ $ csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types
576
+ <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]
449
577
 
450
578
  OPTIONS
451
- -a, --alias=alias Alias for the management token to be used
579
+ -B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
580
+ is selected)
452
581
 
453
- -b, --bulkUnpublish=bulkUnpublish [default: true] This flag is set to true by default. It indicates that
454
- contentstack's bulkpublish API will be used for publishing the entries
582
+ -a, --alias=alias Alias(name) for the management token
455
583
 
456
- -c, --config=config Path to config file to be used
584
+ -c, --config=config Path to the config file
457
585
 
458
- -e, --environment=environment Source Environment
586
+ -e, --environments=environments Environments where entries will be published
459
587
 
460
- -l, --locale=locale Locale filter
588
+ -l, --locales=locales Locales where entries will be published
461
589
 
462
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile
590
+ -t, --contentTypes=contentTypes The Contenttypes from which entries will be published
463
591
 
464
- -t, --contentType=contentType Content Type filter
592
+ -y, --yes Agree to process the command with the current configuration
465
593
 
466
- -x, --deliveryToken=deliveryToken Delivery Token for source environment
594
+ --bulk-publish=bulk-publish [default: true] This flag is set to true by default. It indicates that contentstack's
595
+ bulkpublish API will be used to publish the entries
467
596
 
468
- -y, --yes Agree to process the command with the current configuration
597
+ --content-types=content-types The Contenttypes from which entries will be published
469
598
 
470
- --onlyAssets Unpublish only assets
599
+ --force Update and publish all entries even if no fields have been added
471
600
 
472
- --onlyEntries Unpublish only entries
601
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile (optional, overrides all other
602
+ flags)
473
603
 
474
604
  DESCRIPTION
475
- The unpublish command is used for unpublishing entries from given environment
605
+ The update-and-publish command is used to update existing entries with the updated schema of the respective content
606
+ type
476
607
 
477
- Environment (Source Environment) and Locale are required for executing the command successfully
478
- But, if retryFailed flag is set, then only a logfile is required
608
+ Note: Content types, Environments and Locales are required to execute the command successfully
609
+ But, if retry-failed flag is set, then only a logfile is required
479
610
 
480
- A Content Type can be specified for publishing entries, but if no content-type(s) is/are specified and --onlyAssets is
481
- not used,
482
- then all entries from all content types will be unpublished from the source environment
611
+ ALIASES
612
+ $ csdx cm:bulk-publish:add-fields
613
+
614
+ EXAMPLES
615
+ General Usage
616
+ csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT
617
+ 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]
618
+
619
+ Using --config or -c flag
620
+ Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
621
+ csdx cm:entries:update-and-publish --config [PATH TO CONFIG FILE]
622
+ csdx cm:entries:update-and-publish -c [PATH TO CONFIG FILE]
623
+
624
+ Using --retry-failed
625
+ csdx cm:entries:update-and-publish --retry-failed [LOG FILE NAME]
626
+
627
+ Using --branch
628
+ csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT
629
+ 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
630
+ ```
631
+
632
+ _See code: [src/commands/cm/entries/update-and-publish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/entries/update-and-publish.js)_
633
+
634
+ ## `csdx cm:stacks:publish`
635
+
636
+ Publish entries and assets to multiple environments and locales
637
+
638
+ ```
639
+ USAGE
640
+ $ csdx cm:stacks:publish
641
+
642
+ DESCRIPTION
643
+ The publish command is used to publish entries and assets, to the specified environments and locales.
483
644
 
484
- --onlyAssets can be used to unpublish only assets and --onlyEntries can be used to unpublish only entries.
485
- (--onlyAssets and --onlyEntries cannot be used together at the same time)
645
+ Note: Content types, Environments and Locales are required to execute the publish entries command successfully.
646
+ Note: Environments and Locales are required to execute the publish assets command successfully.
647
+ But, if retry-failed flag is set, then only a logfile is required
486
648
 
487
649
  EXAMPLES
488
650
  General Usage
489
- csdx cm:bulk-publish:unpublish -b -t [CONTENT TYPE] -e [SOURCE ENV] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x
490
- [DELIVERY TOKEN]
651
+ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN
652
+ ALIAS]
491
653
 
492
654
  Using --config or -c flag
493
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
494
- csdx cm:bulk-publish:unpublish --config [PATH TO CONFIG FILE]
495
- csdx cm:bulk-publish:unpublish -c [PATH TO CONFIG FILE]
655
+ Generate a config file in the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`
656
+ csdx cm:stacks:publish --config [PATH TO CONFIG FILE]
657
+ csdx cm:stacks:publish -c [PATH TO CONFIG FILE]
496
658
 
497
- Using --retryFailed or -r flag
498
- csdx cm:bulk-publish:unpublish --retryFailed [LOG FILE NAME]
499
- csdx cm:bulk-publish:unpublish -r [LOG FILE NAME]
659
+ Using --retry-failed flag
660
+ csdx cm:stacks:publish --retry-failed [LOG FILE NAME]
500
661
 
501
- No content type
502
- csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all
503
- content types and assets from the source environment)
662
+ Using --branch flag
663
+ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN
664
+ ALIAS] --branch [BRANCH NAME]
665
+ ```
504
666
 
505
- Using --onlyAssets
506
- csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyAssets (Will unpublish only assets
507
- from the source environment)
667
+ _See code: [src/commands/cm/stacks/publish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish.js)_
668
+
669
+ ## `csdx cm:stacks:publish-clear-logs`
670
+
671
+ Clear the log folder
508
672
 
509
- Using --onlyEntries
510
- csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only
511
- entries, all entries, from the source environment)
512
- csdx cm:bulk-publish:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries
513
- (Will unpublish only entries, (from CONTENT TYPE) from the source environment)
514
673
  ```
674
+ USAGE
675
+ $ csdx cm:stacks:publish-clear-logs
515
676
 
516
- _See code: [src/commands/cm/bulk-publish/unpublish.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/unpublish.js)_
677
+ OPTIONS
678
+ -y, --yes Delete all files without asking for confirmation
679
+ --log-files-count List number of log files
517
680
 
518
- ## `csdx cm:bulk-publish:unpublished-entries`
681
+ ALIASES
682
+ $ csdx cm:bulk-publish:clear
519
683
 
520
- Publish unpublished entries from the source environment, to other environments and locales
684
+ EXAMPLES
685
+ csdx cm:stacks:publish-clear-logs
686
+ csdx cm:stacks:publish-clear-logs --log-files-count
687
+ csdx cm:stacks:publish-clear-logs --yes
688
+ csdx cm:stacks:publish-clear-logs -y
689
+ ```
690
+
691
+ _See code: [src/commands/cm/stacks/publish-clear-logs.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-clear-logs.js)_
692
+
693
+ ## `csdx cm:stacks:publish-configure`
694
+
695
+ The configure command is used to generate a configuration file for publish scripts.
521
696
 
522
697
  ```
523
698
  USAGE
524
- $ csdx cm:bulk-publish:unpublished-entries
699
+ $ csdx cm:stacks:publish-configure
525
700
 
526
701
  OPTIONS
527
- -a, --alias=alias Alias for the management token to be used
702
+ -a, --alias=alias Alias(name) for the management token
703
+
704
+ ALIASES
705
+ $ csdx cm:bulk-publish:configure
528
706
 
529
- -b, --bulkPublish=bulkPublish [default: true] This flag is set to true by default. It indicates that contentstack's
530
- bulkpublish API will be used for publishing the entries
707
+ EXAMPLES
708
+ csdx cm:stacks:publish-configure
709
+ csdx cm:stacks:publish-configure -a <management_token_alias>
710
+ csdx cm:stacks:publish-configure --alias <management_token_alias>
711
+ ```
531
712
 
532
- -c, --config=config Path to config file to be used
713
+ _See code: [src/commands/cm/stacks/publish-configure.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-configure.js)_
533
714
 
534
- -e, --environments=environments Destination environments
715
+ ## `csdx cm:stacks:publish-revert`
716
+
717
+ Revert publish operations by using a log file
718
+
719
+ ```
720
+ USAGE
721
+ $ csdx cm:stacks:publish-revert
722
+
723
+ OPTIONS
724
+ --log-file=log-file logfile to be used to revert
725
+ --retry-failed=retry-failed retry publishing failed entries from the logfile
726
+
727
+ DESCRIPTION
728
+ The revert command is used to revert all publish operations performed using bulk-publish script.
729
+ A log file name is required to execute revert command
730
+
731
+ ALIASES
732
+ $ csdx cm:bulk-publish:revert
733
+
734
+ EXAMPLES
735
+ Using --log-file
736
+ cm:bulk-publish:revert --log-file [LOG FILE NAME]
535
737
 
536
- -l, --locale=locale Source locale
738
+ Using --retry-failed
739
+ cm:bulk-publish:revert --retry-failed [LOG FILE NAME]
740
+ ```
537
741
 
538
- -r, --retryFailed=retryFailed Retry publishing failed entries from the logfile
742
+ _See code: [src/commands/cm/stacks/publish-revert.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-revert.js)_
539
743
 
540
- -s, --sourceEnv=sourceEnv Source Env
744
+ ## `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]`
541
745
 
542
- -t, --contentTypes=contentTypes The Content-Types from which entries need to be published
746
+ Unpublish entries or assets of given content types from the specified environment
543
747
 
748
+ ```
749
+ USAGE
750
+ $ csdx csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
751
+ [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>]
752
+ [--only-assets] [--only-entries]
753
+
754
+ OPTIONS
755
+ -B, --branch=branch [default: main] Specify the branch to fetch the content from (default is main branch)
756
+ -a, --alias=alias Alias(name) for the management token
757
+ -c, --config=config Path to the config file
758
+ -e, --environment=environment Source Environment
759
+ -l, --locale=locale Locale filter
544
760
  -y, --yes Agree to process the command with the current configuration
545
761
 
762
+ --bulk-unpublish=bulk-unpublish [default: true] This flag is set to true by default. It indicates that contentstack's
763
+ bulkpublish API will be used to unpublish the entries and assets
764
+
765
+ --content-type=content-type Content type filter
766
+
767
+ --delivery-token=delivery-token Delivery token for source environment
768
+
769
+ --retry-failed=retry-failed Retry publishing failed entries from the logfile (optional, overrides all other
770
+ flags)
771
+
546
772
  DESCRIPTION
547
- The unpublished-entries command is used for publishing unpublished entries from the source environment, to other
548
- environments and locales
773
+ The unpublish command is used to unpublish entries or assets from given environment
549
774
 
550
- Content Type(s), Source Environment, Destination Environment(s) and Source Locale are required for executing the
551
- command successfully
552
- But, if retryFailed flag is set, then only a logfile is required
775
+ Environment (Source Environment) and Locale are required to execute the command successfully
776
+ But, if retry-failed flag is set, then only a logfile is required
777
+
778
+ A content type can be specified for unpublishing entries, but if no content-type(s) is/are specified and --only-assets
779
+ is not used,
780
+ then all entries from all content types will be unpublished from the source environment
781
+
782
+ Note: --only-assets can be used to unpublish only assets and --only-entries can be used to unpublish only entries.
783
+ (--only-assets and --only-entries cannot be used together at the same time)
784
+
785
+ ALIASES
786
+ $ csdx cm:bulk-publish:unpublish
553
787
 
554
788
  EXAMPLES
555
789
  General Usage
556
- csdx cm:bulk-publish:unpublished-entries -b -t [CONTENT TYPES] -e [ENVIRONMENTS] -l LOCALE -a [MANAGEMENT TOKEN ALIAS]
790
+ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE]
791
+ --alias [MANAGEMENT TOKEN ALIAS] ----delivery-token [DELIVERY TOKEN]
557
792
 
558
793
  Using --config or -c flag
559
- Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`
560
- csdx cm:bulk-publish:unpublished-entries --config [PATH TO CONFIG FILE]
561
- csdx cm:bulk-publish:unpublished-entries -c [PATH TO CONFIG FILE]
794
+ Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`
795
+ csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]
796
+ csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]
797
+
798
+ Using --retry-failed flag
799
+ csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]
800
+
801
+ No content type
802
+ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content
803
+ types and assets from the source environment)
804
+
805
+ Using --only-assets
806
+ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-assets (Will unpublish only assets from
807
+ the source environment)
808
+
809
+ Using --only-entries
810
+ csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, all
811
+ entries, from the source environment)
812
+ csdx cm:stacks:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --only-entries
813
+ (Will unpublish only entries, (from CONTENT TYPE) from the source environment)
562
814
 
563
- Using --retryFailed or -r flag
564
- csdx cm:bulk-publish:unpublished-entries --retryFailed [LOG FILE NAME]
565
- csdx cm:bulk-publish:unpublished-entries -r [LOG FILE NAME]
815
+ Using --branch flag
816
+ csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE]
817
+ --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
566
818
  ```
567
819
 
568
- _See code: [src/commands/cm/bulk-publish/unpublished-entries.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.3/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/unpublished-entries.js)_
820
+ _See code: [src/commands/cm/stacks/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.0/packages/contentstack-bulk-publish/src/commands/cm/stacks/unpublish.js)_
569
821
  <!-- commandsstop -->