@contentstack/cli-cm-bulk-publish 1.7.0 → 1.7.2

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
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
18
18
  $ csdx COMMAND
19
19
  running command...
20
20
  $ csdx (--version)
21
- @contentstack/cli-cm-bulk-publish/1.7.0 darwin-arm64 node-v22.2.0
21
+ @contentstack/cli-cm-bulk-publish/1.7.2 darwin-arm64 node-v22.2.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -470,7 +470,7 @@ FLAGS
470
470
  selected)
471
471
  -a, --alias=<value> Alias(name) for the management token
472
472
  -c, --config=<value> Path to the config file
473
- -k, --stack-api-key=<value> Stack api key to be used
473
+ -k, --stack-api-key=<value> Stack API key to be used
474
474
  -y, --yes Agree to process the command with the current configuration
475
475
  --api-version=<value> API version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
476
476
  --bulk-publish=<value> [default: true] Set this flag to use Contentstack’s Bulk Publish APIs. It is true, by
@@ -856,7 +856,7 @@ FLAGS
856
856
  -a, --alias=<value> Alias(name) for the management token
857
857
  -c, --config=<value> Path to the config file
858
858
  -e, --environment=<value> Source Environment
859
- -k, --stack-api-key=<value> Stack api key to be used
859
+ -k, --stack-api-key=<value> Stack API key to be used
860
860
  -l, --locale=<value> Locale filter
861
861
  -y, --yes Agree to process the command with the current configuration
862
862
  --api-version=<value> API version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
@@ -1705,7 +1705,7 @@ FLAGS
1705
1705
  -a, --alias=<value> Alias(name) for the management token
1706
1706
  -c, --config=<value> Path to the config file
1707
1707
  -e, --environment=<value> Source Environment
1708
- -k, --stack-api-key=<value> Stack api key to be used
1708
+ -k, --stack-api-key=<value> Stack API key to be used
1709
1709
  -l, --locale=<value> Locale filter
1710
1710
  -y, --yes Agree to process the command with the current configuration
1711
1711
  --api-version=<value> API version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
package/package.json CHANGED
@@ -1,31 +1,26 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-bulk-publish",
3
3
  "description": "Contentstack CLI plugin for bulk publish actions",
4
- "version": "1.7.0",
4
+ "version": "1.7.2",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-command": "~1.3.2",
9
- "@contentstack/cli-utilities": "~1.8.0",
10
- "bluebird": "^3.7.2",
8
+ "@contentstack/cli-command": "~1.3.3",
9
+ "@contentstack/cli-utilities": "~1.8.1",
11
10
  "chalk": "^4.1.2",
12
- "dotenv": "^16.4.5",
11
+ "dotenv": "^16.4.7",
13
12
  "inquirer": "8.2.6",
14
13
  "lodash": "^4.17.21",
15
- "mkdirp": "^1.0.4",
16
- "nock": "^13.5.5",
17
- "winston": "^3.16.0"
14
+ "winston": "^3.17.0"
18
15
  },
19
16
  "devDependencies": {
20
- "@oclif/test": "^4.1.0",
17
+ "@oclif/test": "^4.1.6",
21
18
  "chai": "^4.5.0",
22
19
  "eslint": "^8.57.1",
23
20
  "eslint-config-oclif": "^4.0.0",
24
- "globby": "^10.0.2",
25
21
  "mocha": "^10.8.2",
26
22
  "nyc": "^15.1.0",
27
- "oclif": "^3.17.2",
28
- "tslib": "^1.14.1"
23
+ "oclif": "^3.17.2"
29
24
  },
30
25
  "engines": {
31
26
  "node": ">=14.0.0"
@@ -174,7 +174,7 @@ CrossPublishCommand.flags = {
174
174
  alias: flags.string({ char: 'a', description: 'Alias(name) for the management token' }),
175
175
  'stack-api-key': flags.string({
176
176
  char: 'k',
177
- description: 'Stack api key to be used',
177
+ description: 'Stack API key to be used',
178
178
  required: false,
179
179
  }),
180
180
  retryFailed: flags.string({
@@ -1,7 +1,7 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
  const { Command } = require('@contentstack/cli-command');
4
- const { cliux, flags } = require('@contentstack/cli-utilities');
4
+ const { flags } = require('@contentstack/cli-utilities');
5
5
 
6
6
  let config = require('../../../config/index.js');
7
7
 
@@ -169,7 +169,7 @@ UnpublishCommand.flags = {
169
169
  }),
170
170
  'stack-api-key': flags.string({
171
171
  char: 'k',
172
- description: 'Stack api key to be used',
172
+ description: 'Stack API key to be used',
173
173
  }),
174
174
  environment: flags.string({
175
175
  char: 'e',
@@ -5,7 +5,6 @@
5
5
  /* eslint-disable max-params */
6
6
  const { configHandler } = require('@contentstack/cli-utilities');
7
7
  const { getQueue } = require('../util/queue');
8
- const defaults = require('../config/defaults.json');
9
8
  const { performBulkPublish, publishEntry, publishAsset, initializeLogger } = require('../consumer/publish');
10
9
  const retryFailedLogs = require('../util/retryfailed');
11
10
  const { validateFile } = require('../util/fs');
@@ -313,7 +312,6 @@ async function start(
313
312
  {
314
313
  retryFailed,
315
314
  bulkPublish,
316
- _filter,
317
315
  deliveryToken,
318
316
  contentTypes,
319
317
  environment,
@@ -148,8 +148,8 @@ async function start({ retryFailed, bulkPublish, environments, folderUid, locale
148
148
  } else if (folderUid) {
149
149
  setConfig(config, bulkPublish);
150
150
  const bulkPublishLimit = fetchBulkPublishLimit(stack?.org_uid);
151
- for (const element of locales) {
152
- await getAssets(stack, folderUid, bulkPublish, environments, element, apiVersion, bulkPublishLimit);
151
+ for (const locale of locales) {
152
+ await getAssets(stack, folderUid, bulkPublish, environments, locale, apiVersion, bulkPublishLimit);
153
153
  }
154
154
  }
155
155
  }
@@ -8,7 +8,6 @@ const { getQueue } = require('../util/queue');
8
8
  const { performBulkPublish, publishEntry, initializeLogger } = require('../consumer/publish');
9
9
  const retryFailedLogs = require('../util/retryfailed');
10
10
  const { validateFile } = require('../util/fs');
11
- const { setDelayForBulkPublish } = require('../util');
12
11
  const { isEmpty } = require('../util');
13
12
  const { fetchBulkPublishLimit } = require('../util/common-utility');
14
13
 
@@ -5,7 +5,6 @@
5
5
  /* eslint-disable camelcase */
6
6
  const { configHandler } = require('@contentstack/cli-utilities');
7
7
  const { getQueue } = require('../util/queue');
8
- const defaults = require('../config/defaults.json');
9
8
  const { performBulkUnPublish, UnpublishEntry, UnpublishAsset, initializeLogger } = require('../consumer/publish');
10
9
  const retryFailedLogs = require('../util/retryfailed');
11
10
  const { validateFile } = require('../util/fs');
@@ -213,6 +212,9 @@ async function getSyncEntries(
213
212
  if (queryParamsObj.type) {
214
213
  syncData['type'] = queryParamsObj.type;
215
214
  }
215
+ if(queryParamsObj.content_type_uid) {
216
+ syncData['content_type_uid'] = queryParamsObj.content_type_uid;
217
+ }
216
218
 
217
219
  const entriesResponse = await Stack.sync(syncData);
218
220
  if (entriesResponse.items.length > 0) {
package/src/util/fs.js CHANGED
@@ -1,6 +1,4 @@
1
1
  const fs = require('fs');
2
- const chalk = require('chalk');
3
- const path = require('path');
4
2
  const { getLogsDirPath } = require('../util/logger.js');
5
3
 
6
4
  const logsDir = getLogsDirPath();
package/src/util/store.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const fs = require('fs');
2
- const path = require('path');
3
2
  const config = require('../config/index.js');
4
3
  const chalk = require('chalk');
5
4
  const {pathValidator} = require('@contentstack/cli-utilities')