@contentstack/cli-cm-bulk-publish 1.4.0 → 1.4.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 +1 -1
- package/package.json +4 -4
- package/src/consumer/publish.js +2 -0
- package/src/producer/cross-publish.js +3 -0
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.4.
|
|
21
|
+
@contentstack/cli-cm-bulk-publish/1.4.2 darwin-arm64 node-v20.8.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.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@contentstack/cli-command": "~1.2.16",
|
|
9
|
-
"@contentstack/cli-utilities": "~1.5.
|
|
9
|
+
"@contentstack/cli-utilities": "~1.5.12",
|
|
10
10
|
"bluebird": "^3.7.2",
|
|
11
11
|
"chalk": "^4.1.2",
|
|
12
12
|
"dotenv": "^16.1.4",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"winston": "^3.7.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@oclif/test": "^
|
|
20
|
+
"@oclif/test": "^2.5.6",
|
|
21
21
|
"chai": "^4.2.0",
|
|
22
22
|
"eslint": "^8.18.0",
|
|
23
23
|
"eslint-config-oclif": "^4.0.0",
|
|
@@ -99,4 +99,4 @@
|
|
|
99
99
|
"version": "oclif readme && git add README.md",
|
|
100
100
|
"clean": "rm -rf ./node_modules tsconfig.build.tsbuildinfo"
|
|
101
101
|
}
|
|
102
|
-
}
|
|
102
|
+
}
|
package/src/consumer/publish.js
CHANGED
|
@@ -43,6 +43,7 @@ async function publishEntry(data, _config, queue) {
|
|
|
43
43
|
.publish({
|
|
44
44
|
publishDetails: { environments: entryObj.environments, locales: lang },
|
|
45
45
|
locale: entryObj.locale || 'en-us',
|
|
46
|
+
version: entryObj.version
|
|
46
47
|
})
|
|
47
48
|
.then((publishEntryResponse) => {
|
|
48
49
|
if (!publishEntryResponse.error_message) {
|
|
@@ -231,6 +232,7 @@ async function performBulkPublish(data, _config, queue) {
|
|
|
231
232
|
if (bulkPublishObj.apiVersion) {
|
|
232
233
|
if (!isNaN(bulkPublishObj.apiVersion) && bulkPublishObj.apiVersion === apiVersionForNRP) {
|
|
233
234
|
payload['api_version'] = bulkPublishObj.apiVersion
|
|
235
|
+
payload.details.publish_with_reference = true;
|
|
234
236
|
} else {
|
|
235
237
|
if (bulkPublishObj.apiVersion !== '3') { // because 3 is the default value for api-version, and it exists for the purpose of display only
|
|
236
238
|
console.log(
|
|
@@ -44,6 +44,7 @@ async function bulkAction(stack, items, bulkPublish, filter, destEnv, apiVersion
|
|
|
44
44
|
uid: items[index].data.uid,
|
|
45
45
|
content_type: items[index].content_type_uid,
|
|
46
46
|
locale: items[index].data.locale || 'en-us',
|
|
47
|
+
version: items[index].data._version,
|
|
47
48
|
publish_details: [items[index].data.publish_details] || [],
|
|
48
49
|
});
|
|
49
50
|
}
|
|
@@ -110,7 +111,9 @@ async function bulkAction(stack, items, bulkPublish, filter, destEnv, apiVersion
|
|
|
110
111
|
publish_details: [items[index].data.publish_details],
|
|
111
112
|
environments: destEnv,
|
|
112
113
|
entryUid: items[index].data.uid,
|
|
114
|
+
version: items[index].data._version,
|
|
113
115
|
locale: items[index].data.locale || 'en-us',
|
|
116
|
+
version: items[index].data._version,
|
|
114
117
|
Type: 'entry',
|
|
115
118
|
stack: stack,
|
|
116
119
|
});
|