@contentstack/cli-cm-bulk-publish 1.7.3 → 1.8.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.
@@ -105,7 +105,7 @@ class UpdateAndPublishCommand extends Command {
105
105
  if (data.yes) {
106
106
  return true;
107
107
  }
108
- return cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
108
+ return await cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
109
109
  }
110
110
  }
111
111
 
@@ -119,34 +119,39 @@ But, if retry-failed flag is set, then only a logfile is required
119
119
  UpdateAndPublishCommand.flags = {
120
120
  alias: flags.string({
121
121
  char: 'a',
122
- description: 'Alias (name) of the management token. You must use either the --alias flag or the --stack-api-key flag.',
122
+ description:
123
+ 'Alias (name) of the management token. You must use either the --alias flag or the --stack-api-key flag.',
123
124
  }),
124
125
  'stack-api-key': flags.string({
125
126
  char: 'k',
126
127
  description: 'API key of the source stack. You must use either the --stack-api-key flag or the --alias flag.',
127
128
  }),
128
129
  'retry-failed': flags.string({
129
- description: 'Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.',
130
+ description:
131
+ 'Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.',
130
132
  }),
131
133
  'bulk-publish': flags.string({
132
- description: "Set this flag to use Contentstack’s Bulk Publish APIs. It is true, by default.",
134
+ description: 'Set this flag to use Contentstack’s Bulk Publish APIs. It is true, by default.',
133
135
  default: 'true',
134
136
  }),
135
137
  'api-version': flags.string({
136
- description: "API version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].",
138
+ description: 'API version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].',
137
139
  }),
138
140
  'content-types': flags.string({
139
- description: 'The UID of the content type ID whose entries you want to publish in bulk. In case of multiple content types, specify their IDs separated by spaces.',
141
+ description:
142
+ 'The UID of the content type ID whose entries you want to publish in bulk. In case of multiple content types, specify their IDs separated by spaces.',
140
143
  multiple: true,
141
144
  }),
142
145
  environments: flags.string({
143
146
  char: 'e',
144
- description: 'The name of the environment on which entries will be published. In case of multiple environments, specify their names separated by spaces.',
147
+ description:
148
+ 'The name of the environment on which entries will be published. In case of multiple environments, specify their names separated by spaces.',
145
149
  multiple: true,
146
150
  }),
147
151
  config: flags.string({
148
152
  char: 'c',
149
- description: '(optional) The path of the optional configuration JSON file containing all the options for a single run. Refer to the configure command to create a configuration file.',
153
+ description:
154
+ '(optional) The path of the optional configuration JSON file containing all the options for a single run. Refer to the configure command to create a configuration file.',
150
155
  }),
151
156
  yes: flags.boolean({
152
157
  char: 'y',
@@ -154,14 +159,16 @@ UpdateAndPublishCommand.flags = {
154
159
  }),
155
160
  locales: flags.string({
156
161
  char: 'l',
157
- description: 'Locales in which entries will be published, e.g., en-us. In the case of multiple locales, specify the codes separated by spaces.',
162
+ description:
163
+ 'Locales in which entries will be published, e.g., en-us. In the case of multiple locales, specify the codes separated by spaces.',
158
164
  multiple: true,
159
165
  parse: printFlagDeprecation(['-l'], ['--locales']),
160
166
  }),
161
167
  branch: flags.string({
162
168
  char: 'B',
163
169
  default: 'main',
164
- description: 'The name of the branch where you want to perform the bulk publish operation. If you don’t mention the branch name, then by default the content from the main branch will be published.',
170
+ description:
171
+ 'The name of the branch where you want to perform the bulk publish operation. If you don’t mention the branch name, then by default the content from the main branch will be published.',
165
172
  parse: printFlagDeprecation(['-B'], ['--branch']),
166
173
  }),
167
174
  force: flags.boolean({
@@ -178,7 +185,8 @@ UpdateAndPublishCommand.flags = {
178
185
  }),
179
186
  bulkPublish: flags.string({
180
187
  char: 'b',
181
- description: "This flag is set to true by default. It indicates that contentstack's bulk publish API will be used to publish the entries.",
188
+ description:
189
+ "This flag is set to true by default. It indicates that contentstack's bulk publish API will be used to publish the entries.",
182
190
  hidden: true,
183
191
  parse: printFlagDeprecation(['-b', '--bulkPublish'], ['--bulk-publish']),
184
192
  }),
@@ -61,7 +61,7 @@ class RevertCommand extends Command {
61
61
  if (data.yes) {
62
62
  return true;
63
63
  }
64
- return cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
64
+ return await cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
65
65
  }
66
66
  }
67
67
 
@@ -71,13 +71,17 @@ A log file name is required to execute revert command
71
71
  `;
72
72
 
73
73
  RevertCommand.flags = {
74
- 'retry-failed': flags.string({ description: '(optional) Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.' }),
74
+ 'retry-failed': flags.string({
75
+ description:
76
+ '(optional) Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.',
77
+ }),
75
78
  'log-file': flags.string({ description: 'Path of the success logfile of a particular publish action.' }),
76
79
 
77
80
  //To be deprecated
78
81
  retryFailed: flags.string({
79
82
  char: 'r',
80
- description: '(optional) Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.',
83
+ description:
84
+ '(optional) Use this option to retry publishing the failed entries from the logfile. Specify the name of the logfile that lists failed publish calls. If this option is used, it will override all other flags.',
81
85
  hidden: true,
82
86
  parse: printFlagDeprecation(['-r', '--retryFailed'], ['--retry-failed']),
83
87
  }),
@@ -100,7 +100,7 @@ async function confirmFlags(data) {
100
100
  if (data.yes) {
101
101
  return true;
102
102
  }
103
- return cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
103
+ return await cliux.confirm('Do you want to continue with this configuration ? [yes or no]');
104
104
  }
105
105
 
106
106
  function flagsAdapter(flags) {