@contentstack/cli-cm-bulk-publish 1.3.13 → 1.3.15

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.3.13 darwin-arm64 node-v20.8.0
21
+ @contentstack/cli-cm-bulk-publish/1.3.14 darwin-arm64 node-v21.1.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-bulk-publish",
3
3
  "description": "Contentstack CLI plugin for bulk publish actions",
4
- "version": "1.3.13",
4
+ "version": "1.3.15",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-command": "~1.2.14",
9
- "@contentstack/cli-utilities": "~1.5.4",
8
+ "@contentstack/cli-command": "~1.2.16",
9
+ "@contentstack/cli-utilities": "~1.5.7",
10
10
  "bluebird": "^3.7.2",
11
11
  "chalk": "^4.1.2",
12
12
  "dotenv": "^16.1.4",
@@ -5,8 +5,14 @@ module.exports = async (filename, queue, Type) => {
5
5
  const logs = await getAllLogs(filename);
6
6
  if (logs.file.length > 0) {
7
7
  logs.file.forEach(async (log) => {
8
- if (Type === 'bulk') {
9
- log.message.options.stack = await getStack({ alias: log.message.alias, host: log.message.host });
8
+ const stackOptions = {host: log.message.host };
9
+ if(log.message.alias) {
10
+ stackOptions["alias"] = log.message.alias
11
+ } else {
12
+ stackOptions["stackApiKey"] = log.message.api_key
13
+ }
14
+ if (Type === 'bulk') {
15
+ log.message.options.stack = await getStack(stackOptions);
10
16
  queue.Enqueue(log.message.options);
11
17
  }
12
18
  if (Type === 'publish') {
@@ -18,7 +24,7 @@ module.exports = async (filename, queue, Type) => {
18
24
  entryUid: log.message.options.entryUid,
19
25
  locale: log.message.options.locale,
20
26
  Type: 'entry',
21
- stack: await getStack({ alias: log.message.alias, host: log.message.host }),
27
+ stack: await getStack(stackOptions),
22
28
  });
23
29
  } else {
24
30
  queue.assetQueue.Enqueue({
@@ -26,7 +32,7 @@ module.exports = async (filename, queue, Type) => {
26
32
  publish_details: log.message.options.publish_assets,
27
33
  environments: log.message.options.environments,
28
34
  Type: 'asset',
29
- stack: await getStack({ alias: log.message.alias, host: log.message.host }),
35
+ stack: await getStack(stackOptions),
30
36
  });
31
37
  }
32
38
  }