@contentstack/cli-cm-branches 1.0.24 → 1.0.26
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
|
@@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
|
|
|
37
37
|
$ csdx COMMAND
|
|
38
38
|
running command...
|
|
39
39
|
$ csdx (--version)
|
|
40
|
-
@contentstack/cli-cm-branches/1.0.
|
|
40
|
+
@contentstack/cli-cm-branches/1.0.26 linux-x64 node-v18.20.3
|
|
41
41
|
$ csdx --help [COMMAND]
|
|
42
42
|
USAGE
|
|
43
43
|
$ csdx COMMAND
|
|
@@ -69,7 +69,7 @@ function assetFolderCreateScript(contentType) {
|
|
|
69
69
|
if (branch === element.parent_uid) {
|
|
70
70
|
let childUid = element.uid;
|
|
71
71
|
tree[branch][childUid] = {};
|
|
72
|
-
|
|
72
|
+
findBranches(tree[branch], [childUid], coll);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
});
|
package/lib/utils/index.js
CHANGED
|
@@ -39,7 +39,7 @@ exports.refreshbranchConfig = refreshbranchConfig;
|
|
|
39
39
|
const writeFile = (filePath, data) => {
|
|
40
40
|
return new Promise((resolve, reject) => {
|
|
41
41
|
data = typeof data === 'object' ? JSON.stringify(data, null, 2) : data || '{}';
|
|
42
|
-
fs_1.default.writeFile(path_1.default.resolve(filePath), data, (error) => {
|
|
42
|
+
fs_1.default.writeFile(path_1.default.resolve((0, cli_utilities_1.sanitizePath)(filePath)), data, (error) => {
|
|
43
43
|
if (error) {
|
|
44
44
|
return reject(error);
|
|
45
45
|
}
|
|
@@ -51,7 +51,7 @@ exports.writeFile = writeFile;
|
|
|
51
51
|
// by default file type is json
|
|
52
52
|
const readFile = (filePath, options = { type: 'json' }) => {
|
|
53
53
|
return new Promise((resolve, reject) => {
|
|
54
|
-
filePath = path_1.default.resolve(filePath);
|
|
54
|
+
filePath = path_1.default.resolve((0, cli_utilities_1.sanitizePath)(filePath));
|
|
55
55
|
fs_1.default.readFile(filePath, 'utf-8', (error, data) => {
|
|
56
56
|
if (error) {
|
|
57
57
|
reject(error);
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.26",
|
|
3
3
|
"commands": {
|
|
4
4
|
"cm:branches:create": {
|
|
5
5
|
"id": "cm:branches:create",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"pluginAlias": "@contentstack/cli-cm-branches",
|
|
15
15
|
"pluginType": "core",
|
|
16
16
|
"aliases": [],
|
|
17
|
+
"hiddenAliases": [],
|
|
17
18
|
"examples": [
|
|
18
19
|
"csdx cm:branches:create",
|
|
19
20
|
"csdx cm:branches:create --source main -uid new_branch -k bltxxxxxxxx",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"pluginAlias": "@contentstack/cli-cm-branches",
|
|
55
56
|
"pluginType": "core",
|
|
56
57
|
"aliases": [],
|
|
58
|
+
"hiddenAliases": [],
|
|
57
59
|
"examples": [
|
|
58
60
|
"csdx cm:branches:delete",
|
|
59
61
|
"csdx cm:branches:delete --uid main -k bltxxxxxxxx",
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
"pluginAlias": "@contentstack/cli-cm-branches",
|
|
94
96
|
"pluginType": "core",
|
|
95
97
|
"aliases": [],
|
|
98
|
+
"hiddenAliases": [],
|
|
96
99
|
"examples": [
|
|
97
100
|
"csdx cm:branches:diff",
|
|
98
101
|
"csdx cm:branches:diff --stack-api-key \"bltxxxxxxxx\"",
|
|
@@ -161,6 +164,7 @@
|
|
|
161
164
|
"pluginAlias": "@contentstack/cli-cm-branches",
|
|
162
165
|
"pluginType": "core",
|
|
163
166
|
"aliases": [],
|
|
167
|
+
"hiddenAliases": [],
|
|
164
168
|
"examples": [
|
|
165
169
|
"csdx cm:branches",
|
|
166
170
|
"csdx cm:branches --verbose",
|
|
@@ -192,6 +196,7 @@
|
|
|
192
196
|
"pluginAlias": "@contentstack/cli-cm-branches",
|
|
193
197
|
"pluginType": "core",
|
|
194
198
|
"aliases": [],
|
|
199
|
+
"hiddenAliases": [],
|
|
195
200
|
"examples": [
|
|
196
201
|
"csdx cm:branches:merge --stack-api-key bltxxxxxxxx --compare-branch feature-branch",
|
|
197
202
|
"csdx cm:branches:merge --stack-api-key bltxxxxxxxx --comment \"merge comment\"",
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-branches",
|
|
3
3
|
"description": "Contentstack CLI plugin to do branches operations",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.26",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "~1.2.
|
|
9
|
-
"@contentstack/cli-utilities": "~1.6.
|
|
8
|
+
"@contentstack/cli-command": "~1.2.18",
|
|
9
|
+
"@contentstack/cli-utilities": "~1.6.2",
|
|
10
10
|
"@oclif/core": "^2.9.3",
|
|
11
11
|
"async": "^3.2.4",
|
|
12
12
|
"big-json": "^3.2.0",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"winston": "^3.7.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@contentstack/cli-auth": "~1.3.
|
|
29
|
-
"@contentstack/cli-config": "~1.6.
|
|
28
|
+
"@contentstack/cli-auth": "~1.3.18",
|
|
29
|
+
"@contentstack/cli-config": "~1.6.4",
|
|
30
30
|
"@contentstack/cli-dev-dependencies": "~1.2.4",
|
|
31
31
|
"@oclif/plugin-help": "^5.1.19",
|
|
32
32
|
"@oclif/test": "^2.5.6",
|