@contentstack/cli-cm-export 0.1.1-beta.16 → 0.1.1-beta.17
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 +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/lib/export/entries.js +1 -1
- package/src/lib/export/locales.js +3 -0
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-export
|
|
|
37
37
|
$ csdx COMMAND
|
|
38
38
|
running command...
|
|
39
39
|
$ csdx (-v|--version|version)
|
|
40
|
-
@contentstack/cli-cm-export/0.1.1-beta.
|
|
40
|
+
@contentstack/cli-cm-export/0.1.1-beta.17 linux-x64 node-v16.14.2
|
|
41
41
|
$ csdx --help [COMMAND]
|
|
42
42
|
USAGE
|
|
43
43
|
$ csdx COMMAND
|
|
@@ -87,5 +87,5 @@ EXAMPLES
|
|
|
87
87
|
csdx cm:export -A -B [optional] branch name
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
_See code: [src/commands/cm/export.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.
|
|
90
|
+
_See code: [src/commands/cm/export.js](https://github.com/contentstack/cli/blob/v0.1.1-beta.17/packages/contentstack-export/src/commands/cm/export.js)_
|
|
91
91
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.1-beta.
|
|
1
|
+
{"version":"0.1.1-beta.17","commands":{"cm:export":{"id":"cm:export","description":"Export content from a stack\n...\nExport content from one stack to another\n","pluginName":"@contentstack/cli-cm-export","pluginType":"core","aliases":[],"examples":["csdx cm:export -A","csdx cm:export -A -s <stack_ApiKey> -d <path/of/export/destination/dir>","csdx cm:export -A -c <path/to/config/dir>","csdx cm:export -A -m <single module name>","csdx cm:export -A --secured-assets","csdx cm:export -a <management_token_alias>","csdx cm:export -a <management_token_alias> -d <path/to/export/destination/dir>","csdx cm:export -a <management_token_alias> -c <path/to/config/file>","csdx cm:export -A -m <single module name>","csdx cm:export -A -m <single module name> -t <content type>","csdx cm:export -A -B [optional] branch name"],"flags":{"config":{"name":"config","type":"option","char":"c","description":"[optional] path of the config"},"stack-uid":{"name":"stack-uid","type":"option","char":"s","description":"API key of the source stack"},"data":{"name":"data","type":"option","char":"d","description":"path or location to store the data"},"management-token-alias":{"name":"management-token-alias","type":"option","char":"a","description":"alias of the management token"},"auth-token":{"name":"auth-token","type":"boolean","char":"A","description":"to use auth token","allowNo":false},"module":{"name":"module","type":"option","char":"m","description":"[optional] specific module name"},"content-type":{"name":"content-type","type":"option","char":"t","description":"[optional] content type"},"branch":{"name":"branch","type":"option","char":"B","description":"[optional] branch name"},"secured-assets":{"name":"secured-assets","type":"boolean","description":"[optional] use when assets are secured","allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-export",
|
|
3
3
|
"description": "Contentstack CLI plugin to export content from stack",
|
|
4
|
-
"version": "0.1.1-beta.
|
|
4
|
+
"version": "0.1.1-beta.17",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -48,7 +48,7 @@ exportEntries.prototype.start = function (credentialConfig) {
|
|
|
48
48
|
client = stack.Client(config)
|
|
49
49
|
addlogs(config, 'Starting entry migration', 'success')
|
|
50
50
|
return new Promise(function (resolve, reject) {
|
|
51
|
-
locales = helper.readFile(localesFilePath)
|
|
51
|
+
locales = helper.readFile(localesFilePath) || {};
|
|
52
52
|
let apiBucket = []
|
|
53
53
|
content_types = helper.readFile(schemaFilePath)
|
|
54
54
|
if (content_types.length !== 0) {
|
|
@@ -91,6 +91,9 @@ ExportLocales.prototype.getLocales = function (apiDetails) {
|
|
|
91
91
|
|
|
92
92
|
} else if (localeResponse.items.length === 0) {
|
|
93
93
|
addlogs(config, 'No languages found except the master language', 'success');
|
|
94
|
+
helper.writeFile(path.join(self.localesFolderPath, localeConfig.fileName), self.locales);
|
|
95
|
+
return resolve();
|
|
96
|
+
|
|
94
97
|
}
|
|
95
98
|
})
|
|
96
99
|
.catch((error) => {
|