@contentstack/cli-cm-bulk-publish 0.1.1-beta.2 → 0.1.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,30 +1,33 @@
1
- @contentstack/cli-cm-bulk-publish
2
- ============
1
+ # @contentstack/cli-cm-bulk-publish
3
2
 
4
3
  It is Contentstack’s CLI plugin to perform bulk publish/unpublish operations on entries and assets in Contentstack. Refer to the [Bulk Publish and Unpublish documentation](https://www.contentstack.com/docs/developers/cli/bulk-publish-and-unpublish) to learn more about its commands.
5
4
 
6
5
  [![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE)
7
6
 
8
-
9
7
  <!-- toc -->
8
+ * [@contentstack/cli-cm-bulk-publish](#contentstackcli-cm-bulk-publish)
10
9
  * [Usage](#usage)
11
10
  * [Commands](#commands)
12
11
  <!-- tocstop -->
12
+
13
13
  # Usage
14
+
14
15
  <!-- usage -->
15
16
  ```sh-session
16
17
  $ npm install -g @contentstack/cli-cm-bulk-publish
17
18
  $ csdx COMMAND
18
19
  running command...
19
20
  $ csdx (-v|--version|version)
20
- @contentstack/cli-cm-bulk-publish/0.1.1-beta.2 darwin-x64 node-v14.9.0
21
+ @contentstack/cli-cm-bulk-publish/0.1.1-beta.3 darwin-x64 node-v14.16.0
21
22
  $ csdx --help [COMMAND]
22
23
  USAGE
23
24
  $ csdx COMMAND
24
25
  ...
25
26
  ```
26
27
  <!-- usagestop -->
28
+
27
29
  # Commands
30
+
28
31
  <!-- commands -->
29
32
  * [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
30
33
  * [`csdx cm:bulk-publish:add-fields`](#csdx-cmbulk-publishadd-fields)
@@ -48,7 +51,7 @@ USAGE
48
51
  $ csdx cm:bulk-publish
49
52
  ```
50
53
 
51
- _See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_
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)_
52
55
 
53
56
  ## `csdx cm:bulk-publish:add-fields`
54
57
 
@@ -99,7 +102,7 @@ EXAMPLES
99
102
  csdx cm:bulk-publish:add-fields -r [LOG FILE NAME]
100
103
  ```
101
104
 
102
- _See code: [src/commands/cm/bulk-publish/add-fields.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/add-fields.js)_
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)_
103
106
 
104
107
  ## `csdx cm:bulk-publish:assets`
105
108
 
@@ -148,7 +151,7 @@ EXAMPLES
148
151
  csdx cm:bulk-publish:assets -r [LOG FILE NAME]
149
152
  ```
150
153
 
151
- _See code: [src/commands/cm/bulk-publish/assets.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/assets.js)_
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)_
152
155
 
153
156
  ## `csdx cm:bulk-publish:clear`
154
157
 
@@ -163,7 +166,7 @@ OPTIONS
163
166
  -y, --yes Delete all files without asking for confirmation
164
167
  ```
165
168
 
166
- _See code: [src/commands/cm/bulk-publish/clear.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/clear.js)_
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)_
167
170
 
168
171
  ## `csdx cm:bulk-publish:configure`
169
172
 
@@ -188,7 +191,7 @@ DESCRIPTION
188
191
  EXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]
189
192
  ```
190
193
 
191
- _See code: [src/commands/cm/bulk-publish/configure.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/configure.js)_
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)_
192
195
 
193
196
  ## `csdx cm:bulk-publish:cross-publish`
194
197
 
@@ -221,6 +224,10 @@ OPTIONS
221
224
 
222
225
  -y, --yes Agree to process the command with the current configuration
223
226
 
227
+ --onlyAssets Unpublish only assets
228
+
229
+ --onlyEntries Unpublish only entries
230
+
224
231
  DESCRIPTION
225
232
  The cross-publish command is used for publishing entries and assets from one evironment to other environments
226
233
 
@@ -242,7 +249,7 @@ EXAMPLES
242
249
  csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]
243
250
  ```
244
251
 
245
- _See code: [src/commands/cm/bulk-publish/cross-publish.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
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)_
246
253
 
247
254
  ## `csdx cm:bulk-publish:entries`
248
255
 
@@ -297,7 +304,7 @@ EXAMPLES
297
304
  csdx cm:bulk-publish:entries -r [LOG FILE NAME]
298
305
  ```
299
306
 
300
- _See code: [src/commands/cm/bulk-publish/entries.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/entries.js)_
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)_
301
308
 
302
309
  ## `csdx cm:bulk-publish:entry-edits`
303
310
 
@@ -351,7 +358,7 @@ EXAMPLES
351
358
  csdx cm:bulk-publish:entry-edits -r [LOG FILE NAME]
352
359
  ```
353
360
 
354
- _See code: [src/commands/cm/bulk-publish/entry-edits.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/entry-edits.js)_
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)_
355
362
 
356
363
  ## `csdx cm:bulk-publish:nonlocalized-field-changes`
357
364
 
@@ -402,7 +409,7 @@ EXAMPLES
402
409
  csdx cm:bulk-publish:nonlocalized-field-changes -r [LOG FILE NAME]
403
410
  ```
404
411
 
405
- _See code: [src/commands/cm/bulk-publish/nonlocalized-field-changes.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/nonlocalized-field-changes.js)_
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)_
406
413
 
407
414
  ## `csdx cm:bulk-publish:revert`
408
415
 
@@ -430,7 +437,7 @@ EXAMPLES
430
437
  cm:bulk-publish:revert -r [LOG FILE NAME]
431
438
  ```
432
439
 
433
- _See code: [src/commands/cm/bulk-publish/revert.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/revert.js)_
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)_
434
441
 
435
442
  ## `csdx cm:bulk-publish:unpublish`
436
443
 
@@ -506,7 +513,7 @@ EXAMPLES
506
513
  (Will unpublish only entries, (from CONTENT TYPE) from the source environment)
507
514
  ```
508
515
 
509
- _See code: [src/commands/cm/bulk-publish/unpublish.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/unpublish.js)_
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)_
510
517
 
511
518
  ## `csdx cm:bulk-publish:unpublished-entries`
512
519
 
@@ -558,5 +565,5 @@ EXAMPLES
558
565
  csdx cm:bulk-publish:unpublished-entries -r [LOG FILE NAME]
559
566
  ```
560
567
 
561
- _See code: [src/commands/cm/bulk-publish/unpublished-entries.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.2/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/unpublished-entries.js)_
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)_
562
569
  <!-- commandsstop -->
@@ -1 +1 @@
1
- {"version":"0.1.1-beta.2","commands":{"cm:bulk-publish:add-fields":{"id":"cm:bulk-publish:add-fields","description":"Add fields from updated content types to their respective entries\nThe add-fields command is used for updating already existing entries with the updated schema of their respective Content Type\n\nContent Types, Environments and Locales are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:add-fields -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:add-fields --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:add-fields -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:add-fields --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:add-fields -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which entries need to be published"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:assets":{"id":"cm:bulk-publish:assets","description":"Publish assets to specified environments\nThe assets command is used for publishing assets from the specified stack, to the specified environments\n\nEnvironment(s) and Locale(s) are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:assets -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:assets --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:assets -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:assets --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:assets -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which assets need to be published"},"folderUid":{"name":"folderUid","type":"option","char":"u","description":"[default: cs_root] Folder-uid from which the assets need to be published"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which assets need to be published"}},"args":[]},"cm:bulk-publish:clear":{"id":"cm:bulk-publish:clear","description":"Clear the log folder\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{"list":{"name":"list","type":"boolean","char":"l","description":"List number of log files","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Delete all files without asking for confirmation","allowNo":false}},"args":[]},"cm:bulk-publish:configure":{"id":"cm:bulk-publish:configure","description":"Generate configuration template\nThe configure command is used for generating a configuration file for bulk-publish script.\n\nHere is a detailed description for all the available flags\n\n-----------------------------------------------------------------------------------------------------------\n--alias or -a : Management token Alias for the stack in use.\n\nEXAMPLE : cm:bulk-publish:configure --alias [MANAGEMENT TOKEN Alias]\nEXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Management token alias for the stack"}},"args":[]},"cm:bulk-publish:cross-publish":{"id":"cm:bulk-publish:cross-publish","description":"Publish entries and assets from one environment to other environments\nThe cross-publish command is used for publishing entries and assets from one evironment to other environments\n\nContent Type, Environment, Destination Environment(s) and Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:cross-publish -t [CONTENT TYPE] -e [SOURCE ENV] -d [DESTINATION ENVIRONMENT] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:cross-publish --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content-Type filter"},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment"},"destEnv":{"name":"destEnv","type":"option","char":"d","description":"Destination Environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:entries":{"id":"cm:bulk-publish:entries","description":"Publish entries from multiple content-types to multiple environments and locales\nThe entries command is used for publishing entries from the specified content types, to the\nspecified environments and locales \n\nContent Types, Environments and Locales are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:entries -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:entries --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:entries -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:entries --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:entries -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry failed entries from the logfile (optional, overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"publishAllContentTypes":{"name":"publishAllContentTypes","type":"boolean","char":"o","description":"Publish all content-types (optional, cannot be set when contentTypes flag is set)","allowNo":false},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-types from which entries need to be published"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which entries need to be published"},"config":{"name":"config","type":"option","char":"c","description":"Path for the external config file to be used (A new config file can be generated at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:entry-edits":{"id":"cm:bulk-publish:entry-edits","description":"Publish edited entries from a specified Content Type to given locales and environments\nThe entry-edits command is used for publishing entries from the specified content types, to the\nspecified environments and locales\n\nContent Type(s), Source Environment, Destination Environment(s) and Locale(s) are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:entry-edits -t [CONTENT TYPE 1] [CONTENT TYPE 2] -s [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:entry-edits --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:entry-edits -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:entry-edits --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:entry-edits -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Environment from which edited entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types which will be checked for edited entries"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which edited entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish":{"id":"cm:bulk-publish","description":"Bulk Publish script for managing entries and assets\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{},"args":[]},"cm:bulk-publish:nonlocalized-field-changes":{"id":"cm:bulk-publish:nonlocalized-field-changes","description":"Publish non-localized-fields for given Content Types, from a particular source environment to specified environments\nThe nonlocalized-field-changes command is used for publishing nonlocalized field changes from the given Content Types to\nthe specified Environments\n\nContent Types, Environments and Source Environment are required for executing this command successfully.\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:nonlocalized-field-changes -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:nonlocalized-field-changes --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:nonlocalized-field-changes -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:nonlocalized-field-changes --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:nonlocalized-field-changes -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Environment"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:revert":{"id":"cm:bulk-publish:revert","description":"Revert publish operations by using a log file\nThe revert command is used for reverting all publish operations performed using bulk-publish script.\nA log file name is required to execute revert command\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["Using --logFile","cm:bulk-publish:revert --logFile [LOG FILE NAME]","cm:bulk-publish:revert -l [LOG FILE NAME]","","Using --retryFailed","cm:bulk-publish:revert --retryFailed [LOG FILE NAME]","cm:bulk-publish:revert -r [LOG FILE NAME]"],"flags":{"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"retry publishing failed entries from the logfile"},"logFile":{"name":"logFile","type":"option","char":"l","description":"logfile to be used to revert"}},"args":[]},"cm:bulk-publish:unpublish":{"id":"cm:bulk-publish:unpublish","description":"Unpublish entries of given Content Types from given environment\nThe unpublish command is used for unpublishing entries from given environment\n\nEnvironment (Source Environment) and Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n\nA Content Type can be specified for publishing entries, but if no content-type(s) is/are specified and --onlyAssets is not used,\nthen all entries from all content types will be unpublished from the source environment\n\n--onlyAssets can be used to unpublish only assets and --onlyEntries can be used to unpublish only entries.\n(--onlyAssets and --onlyEntries cannot be used together at the same time)\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:unpublish -b -t [CONTENT TYPE] -e [SOURCE ENV] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:unpublish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:unpublish -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:unpublish --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:unpublish -r [LOG FILE NAME]","","No content type","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content types and assets from the source environment)","","Using --onlyAssets","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyAssets (Will unpublish only assets from the source environment)","","Using --onlyEntries","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only entries, all entries, from the source environment)","csdx cm:bulk-publish:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only entries, (from CONTENT TYPE) from the source environment)"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkUnpublish":{"name":"bulkUnpublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content Type filter"},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","allowNo":false}},"args":[]},"cm:bulk-publish:unpublished-entries":{"id":"cm:bulk-publish:unpublished-entries","description":"Publish unpublished entries from the source environment, to other environments and locales\nThe unpublished-entries command is used for publishing unpublished entries from the source environment, to other environments and locales\n\nContent Type(s), Source Environment, Destination Environment(s) and Source Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:unpublished-entries -b -t [CONTENT TYPES] -e [ENVIRONMENTS] -l LOCALE -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:unpublished-entries --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:unpublished-entries -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:unpublished-entries --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:unpublished-entries -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Env"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]}}}
1
+ {"version":"0.1.1-beta.3","commands":{"cm:bulk-publish:add-fields":{"id":"cm:bulk-publish:add-fields","description":"Add fields from updated content types to their respective entries\nThe add-fields command is used for updating already existing entries with the updated schema of their respective Content Type\n\nContent Types, Environments and Locales are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:add-fields -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:add-fields --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:add-fields -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:add-fields --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:add-fields -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which entries need to be published"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:assets":{"id":"cm:bulk-publish:assets","description":"Publish assets to specified environments\nThe assets command is used for publishing assets from the specified stack, to the specified environments\n\nEnvironment(s) and Locale(s) are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:assets -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:assets --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:assets -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:assets --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:assets -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which assets need to be published"},"folderUid":{"name":"folderUid","type":"option","char":"u","description":"[default: cs_root] Folder-uid from which the assets need to be published"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which assets need to be published"}},"args":[]},"cm:bulk-publish:clear":{"id":"cm:bulk-publish:clear","description":"Clear the log folder\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{"list":{"name":"list","type":"boolean","char":"l","description":"List number of log files","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Delete all files without asking for confirmation","allowNo":false}},"args":[]},"cm:bulk-publish:configure":{"id":"cm:bulk-publish:configure","description":"Generate configuration template\nThe configure command is used for generating a configuration file for bulk-publish script.\n\nHere is a detailed description for all the available flags\n\n-----------------------------------------------------------------------------------------------------------\n--alias or -a : Management token Alias for the stack in use.\n\nEXAMPLE : cm:bulk-publish:configure --alias [MANAGEMENT TOKEN Alias]\nEXAMPLE : cm:bulk-publish:configure -a [MANAGEMENT TOKEN Alias]\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Management token alias for the stack"}},"args":[]},"cm:bulk-publish:cross-publish":{"id":"cm:bulk-publish:cross-publish","description":"Publish entries and assets from one environment to other environments\nThe cross-publish command is used for publishing entries and assets from one evironment to other environments\n\nContent Type, Environment, Destination Environment(s) and Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:cross-publish -t [CONTENT TYPE] -e [SOURCE ENV] -d [DESTINATION ENVIRONMENT] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:cross-publish --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content-Type filter"},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment"},"destEnv":{"name":"destEnv","type":"option","char":"d","description":"Destination Environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","allowNo":false}},"args":[]},"cm:bulk-publish:entries":{"id":"cm:bulk-publish:entries","description":"Publish entries from multiple content-types to multiple environments and locales\nThe entries command is used for publishing entries from the specified content types, to the\nspecified environments and locales \n\nContent Types, Environments and Locales are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:entries -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:entries --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:entries -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:entries --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:entries -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry failed entries from the logfile (optional, overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"publishAllContentTypes":{"name":"publishAllContentTypes","type":"boolean","char":"o","description":"Publish all content-types (optional, cannot be set when contentTypes flag is set)","allowNo":false},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-types from which entries need to be published"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments to which entries need to be published"},"config":{"name":"config","type":"option","char":"c","description":"Path for the external config file to be used (A new config file can be generated at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:entry-edits":{"id":"cm:bulk-publish:entry-edits","description":"Publish edited entries from a specified Content Type to given locales and environments\nThe entry-edits command is used for publishing entries from the specified content types, to the\nspecified environments and locales\n\nContent Type(s), Source Environment, Destination Environment(s) and Locale(s) are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:entry-edits -t [CONTENT TYPE 1] [CONTENT TYPE 2] -s [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:entry-edits --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:entry-edits -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:entry-edits --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:entry-edits -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Environment from which edited entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types which will be checked for edited entries"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to which edited entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish":{"id":"cm:bulk-publish","description":"Bulk Publish script for managing entries and assets\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{},"args":[]},"cm:bulk-publish:nonlocalized-field-changes":{"id":"cm:bulk-publish:nonlocalized-field-changes","description":"Publish non-localized-fields for given Content Types, from a particular source environment to specified environments\nThe nonlocalized-field-changes command is used for publishing nonlocalized field changes from the given Content Types to\nthe specified Environments\n\nContent Types, Environments and Source Environment are required for executing this command successfully.\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:nonlocalized-field-changes -t [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] -l [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:nonlocalized-field-changes --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:nonlocalized-field-changes -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:nonlocalized-field-changes --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:nonlocalized-field-changes -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Environment"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]},"cm:bulk-publish:revert":{"id":"cm:bulk-publish:revert","description":"Revert publish operations by using a log file\nThe revert command is used for reverting all publish operations performed using bulk-publish script.\nA log file name is required to execute revert command\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["Using --logFile","cm:bulk-publish:revert --logFile [LOG FILE NAME]","cm:bulk-publish:revert -l [LOG FILE NAME]","","Using --retryFailed","cm:bulk-publish:revert --retryFailed [LOG FILE NAME]","cm:bulk-publish:revert -r [LOG FILE NAME]"],"flags":{"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"retry publishing failed entries from the logfile"},"logFile":{"name":"logFile","type":"option","char":"l","description":"logfile to be used to revert"}},"args":[]},"cm:bulk-publish:unpublish":{"id":"cm:bulk-publish:unpublish","description":"Unpublish entries of given Content Types from given environment\nThe unpublish command is used for unpublishing entries from given environment\n\nEnvironment (Source Environment) and Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n\nA Content Type can be specified for publishing entries, but if no content-type(s) is/are specified and --onlyAssets is not used,\nthen all entries from all content types will be unpublished from the source environment\n\n--onlyAssets can be used to unpublish only assets and --onlyEntries can be used to unpublish only entries.\n(--onlyAssets and --onlyEntries cannot be used together at the same time)\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:unpublish -b -t [CONTENT TYPE] -e [SOURCE ENV] -l [LOCALE] -a [MANAGEMENT TOKEN ALIAS] -x [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:unpublish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:unpublish -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:unpublish --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:unpublish -r [LOG FILE NAME]","","No content type","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content types and assets from the source environment)","","Using --onlyAssets","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyAssets (Will unpublish only assets from the source environment)","","Using --onlyEntries","csdx cm:bulk-publish:unpublish --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only entries, all entries, from the source environment)","csdx cm:bulk-publish:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --onlyEntries (Will unpublish only entries, (from CONTENT TYPE) from the source environment)"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkUnpublish":{"name":"bulkUnpublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content Type filter"},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","allowNo":false}},"args":[]},"cm:bulk-publish:unpublished-entries":{"id":"cm:bulk-publish:unpublished-entries","description":"Publish unpublished entries from the source environment, to other environments and locales\nThe unpublished-entries command is used for publishing unpublished entries from the source environment, to other environments and locales\n\nContent Type(s), Source Environment, Destination Environment(s) and Source Locale are required for executing the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:unpublished-entries -b -t [CONTENT TYPES] -e [ENVIRONMENTS] -l LOCALE -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:unpublished-entries --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:unpublished-entries -c [PATH TO CONFIG FILE]","","Using --retryFailed or -r flag","csdx cm:bulk-publish:unpublished-entries --retryFailed [LOG FILE NAME]","csdx cm:bulk-publish:unpublished-entries -r [LOG FILE NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias for the management token to be used"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Env"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to config file to be used"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-bulk-publish",
3
3
  "description": "Contentstack CLI plugin for bulk publish actions",
4
- "version": "0.1.1-beta.2",
4
+ "version": "0.1.1-beta.3",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
@@ -24,7 +24,7 @@
24
24
  "eslint": "^5.16.0",
25
25
  "eslint-config-oclif": "^3.1.0",
26
26
  "globby": "^10.0.2",
27
- "mocha": "^5.2.0",
27
+ "mocha": "^8.2.1",
28
28
  "nyc": "^14.1.1"
29
29
  },
30
30
  "engines": {
@@ -38,7 +38,9 @@
38
38
  ],
39
39
  "homepage": "https://github.com/contentstack/cli",
40
40
  "keywords": [
41
- "contentstack","cli","plugin"
41
+ "contentstack",
42
+ "cli",
43
+ "plugin"
42
44
  ],
43
45
  "license": "MIT",
44
46
  "oclif": {
@@ -54,7 +56,6 @@
54
56
  },
55
57
  "repository": "https://github.com/contentstack/cli",
56
58
  "scripts": {
57
- "pack": "npm pack && mv *.tgz ../../build",
58
59
  "postpack": "rm -f oclif.manifest.json",
59
60
  "prepack": "oclif-dev manifest && oclif-dev readme",
60
61
  "test": "nyc mocha --forbid-only \"test/**/*.test.js\"",
@@ -42,19 +42,6 @@ class CrossPublishCommand extends Command {
42
42
  }
43
43
 
44
44
  if (await this.confirmFlags(updatedFlags)) {
45
- updatedFlags.filter = {}
46
- updatedFlags.filter.locale = updatedFlags.locale
47
- delete updatedFlags.locale
48
-
49
- if (updatedFlags.contentType && updatedFlags.contentType.length > 0) {
50
- updatedFlags.filter.content_type_uid = updatedFlags.contentType
51
- delete updatedFlags.contentType
52
- }
53
-
54
- if (updatedFlags.environment && updatedFlags.environment.length > 0) {
55
- updatedFlags.filter.environment = updatedFlags.environment
56
- delete updatedFlags.environment
57
- }
58
45
  try {
59
46
  if (!updatedFlags.retryFailed) {
60
47
  await start(updatedFlags, stack, config)
@@ -71,12 +58,20 @@ class CrossPublishCommand extends Command {
71
58
  }
72
59
  }
73
60
 
74
- validate({environment, retryFailed, contentType, destEnv, locale}) {
61
+ validate({environment, retryFailed, destEnv, onlyAssets, contentType, onlyEntries, locale}) {
75
62
  let missing = []
76
63
  if (retryFailed) {
77
64
  return true
78
65
  }
79
66
 
67
+ if (onlyAssets && onlyEntries) {
68
+ this.error(`The flags onlyAssets and onlyEntries need not be used at the same time. Unpublish command unpublishes entries and assts at the same time by default`)
69
+ }
70
+
71
+ if (onlyAssets && contentType) {
72
+ this.error(`Specifying content-type and onlyAssets together will have unexpected results. Please do not use these 2 flags together. Thank you.`)
73
+ }
74
+
80
75
  if (!environment) {
81
76
  missing.push('Environment')
82
77
  }
@@ -85,10 +80,6 @@ class CrossPublishCommand extends Command {
85
80
  missing.push('Destination Environment')
86
81
  }
87
82
 
88
- if (!contentType) {
89
- missing.push('ContentType')
90
- }
91
-
92
83
  if (!locale) {
93
84
  missing.push('Locale')
94
85
  }
@@ -102,7 +93,7 @@ class CrossPublishCommand extends Command {
102
93
 
103
94
  async confirmFlags(flags) {
104
95
  prettyPrint(flags)
105
- if(flags.yes) {
96
+ if (flags.yes) {
106
97
  return true
107
98
  }
108
99
  const confirmation = await cli.confirm('Do you want to continue with this configuration ? [yes or no]')
@@ -127,7 +118,9 @@ CrossPublishCommand.flags = {
127
118
  deliveryToken: flags.string({char: 'x', description: 'Delivery Token for source environment'}),
128
119
  destEnv: flags.string({char: 'd', description: 'Destination Environments', multiple: true}),
129
120
  config: flags.string({char: 'c', description: 'Path to config file to be used'}),
130
- yes: flags.boolean({char: 'y', description: 'Agree to process the command with the current configuration' }),
121
+ yes: flags.boolean({char: 'y', description: 'Agree to process the command with the current configuration'}),
122
+ onlyAssets: flags.boolean({description: 'Unpublish only assets', default: false}),
123
+ onlyEntries: flags.boolean({description: 'Unpublish only entries', default: false}),
131
124
  }
132
125
 
133
126
  CrossPublishCommand.examples = [
@@ -58,7 +58,7 @@ class UnpublishCommand extends Command {
58
58
  }
59
59
  }
60
60
 
61
- validate({environment, retryFailed, locale, onlyAssets, onlyEntries}) {
61
+ validate({environment, retryFailed, locale, contentType, onlyAssets, onlyEntries}) {
62
62
  let missing = []
63
63
  if (retryFailed) {
64
64
  return true
@@ -68,6 +68,10 @@ class UnpublishCommand extends Command {
68
68
  this.error(`The flags onlyAssets and onlyEntries need not be used at the same time. Unpublish command unpublishes entries and assts at the same time by default`)
69
69
  }
70
70
 
71
+ if (onlyAssets && contentType) {
72
+ this.error(`Specifying content-type and onlyAssets together will have unexpected results. Please do not use these 2 flags together. Thank you.`)
73
+ }
74
+
71
75
  if (!environment) {
72
76
  missing.push('Environment')
73
77
  }
@@ -90,19 +94,19 @@ class UnpublishCommand extends Command {
90
94
  }
91
95
  }
92
96
 
93
- async confirmFlags(flags) {
97
+ async confirmFlags(flags) {
94
98
  let confirmation
95
99
  prettyPrint(flags)
96
- if(flags.yes) {
97
- return true
98
- }
100
+ if (flags.yes) {
101
+ return true
102
+ }
99
103
 
100
- if(!flags.contentType && !flags.onlyAssets) {
104
+ if (!flags.contentType && !flags.onlyAssets) {
101
105
  confirmation = await cli.confirm('Do you want to continue with this configuration. This will unpublish all the entries from all content types? [yes or no]')
102
106
  } else {
103
- confirmation = await cli.confirm('Do you want to continue with this configuration ? [yes or no]')
107
+ confirmation = await cli.confirm('Do you want to continue with this configuration ? [yes or no]')
104
108
  }
105
- return confirmation
109
+ return confirmation
106
110
  }
107
111
  }
108
112
 
@@ -11,7 +11,6 @@ const {
11
11
  } = require('../consumer/publish')
12
12
  const retryFailedLogs = require('../util/retryfailed')
13
13
  const {validateFile} = require('../util/fs')
14
- const types = 'asset_published,entry_published'
15
14
  const queue = getQueue()
16
15
  const entryQueue = getQueue()
17
16
  const assetQueue = getQueue()
@@ -140,8 +139,8 @@ async function getSyncEntries(stack, config, queryParams, bulkPublish, filter, d
140
139
  } catch (error) {
141
140
  reject(error)
142
141
  }
142
+ return resolve()
143
143
  })
144
- return resolve()
145
144
  }
146
145
 
147
146
  function setConfig(conf, bp) {
@@ -154,14 +153,13 @@ function setConfig(conf, bp) {
154
153
  assetQueue.consumer = publishAsset
155
154
  }
156
155
 
157
- config = conf
158
156
  queue.config = conf
159
157
  entryQueue.config = conf
160
158
  assetQueue.config = conf
161
159
  filePath = initializeLogger(logFileName)
162
160
  }
163
161
 
164
- async function start({retryFailed, bulkPublish, filter, deliveryToken, destEnv, f_types}, stack, config) {
162
+ async function start({retryFailed, bulkPublish, filter, deliveryToken, contentType, environment, locale, onlyAssets, onlyEntries, destEnv, f_types}, stack, config) {
165
163
  process.on('beforeExit', async () => {
166
164
  const isErrorLogEmpty = await isEmpty(`${filePath}.error`)
167
165
  const isSuccessLogEmpty = await isEmpty(`${filePath}.success`)
@@ -190,8 +188,25 @@ async function start({retryFailed, bulkPublish, filter, deliveryToken, destEnv,
190
188
  }
191
189
  }
192
190
  } else {
193
- setConfig(config, bulkPublish)
194
- filter.type = (f_types) ? f_types : types // types mentioned in the config file (f_types) are given preference
191
+ let filter = {
192
+ environment,
193
+ locale,
194
+ }
195
+ if (f_types)
196
+ filter.type = f_types
197
+ // filter.type = (f_types) ? f_types : types // types mentioned in the config file (f_types) are given preference
198
+ if (contentType) {
199
+ filter.content_type_uid = contentType
200
+ filter.type = 'entry_published'
201
+ }
202
+ if (onlyAssets) {
203
+ filter.type = 'asset_published'
204
+ delete filter.content_type_uid
205
+ }
206
+ if (onlyEntries) {
207
+ filter.type = 'entry_published'
208
+ }
209
+ setConfig(config, bulkPublish)
195
210
  const queryParams = getQueryParams(filter)
196
211
  try {
197
212
  await getSyncEntries(stack, config, queryParams, bulkPublish, filter, deliveryToken, destEnv)
@@ -199,7 +214,7 @@ async function start({retryFailed, bulkPublish, filter, deliveryToken, destEnv,
199
214
  throw error
200
215
  }
201
216
  }
202
- } catch(error) {
217
+ } catch (error) {
203
218
  throw error
204
219
  }
205
220
  }
@@ -11,7 +11,6 @@ const {
11
11
  } = require('../consumer/publish')
12
12
  const retryFailedLogs = require('../util/retryfailed')
13
13
  const {validateFile} = require('../util/fs')
14
- const types = 'asset_published,entry_published'
15
14
  const queue = getQueue()
16
15
  const entryQueue = getQueue()
17
16
  const assetQueue = getQueue()
@@ -193,9 +192,12 @@ async function start({retryFailed, bulkUnpublish, contentType, locale, environme
193
192
  environment,
194
193
  locale,
195
194
  }
196
- filter.type = (f_types) ? f_types : types // types mentioned in the config file (f_types) are given preference
195
+ if (f_types)
196
+ filter.type = f_types
197
+ // filter.type = (f_types) ? f_types : types // types mentioned in the config file (f_types) are given preference
197
198
  if (contentType) {
198
199
  filter.content_type_uid = contentType
200
+ filter.type = 'entry_published'
199
201
  }
200
202
  if (onlyAssets) {
201
203
  filter.type = 'asset_published'
@@ -212,7 +214,7 @@ async function start({retryFailed, bulkUnpublish, contentType, locale, environme
212
214
  throw error
213
215
  }
214
216
  }
215
- } catch(error) {
217
+ } catch (error) {
216
218
  throw error
217
219
  }
218
220
  }