@contentstack/cli-cm-export 0.1.1-beta.13 → 0.1.1-beta.14
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/app.js +1 -1
- package/src/lib/util/contentstack-management-sdk.js +21 -1
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.14 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.14/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.14","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.14",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
package/src/app.js
CHANGED
|
@@ -90,7 +90,7 @@ var singleExport = async (moduleName, types, config, branchName) => {
|
|
|
90
90
|
const result = await exportedModule.start(config, branchName);
|
|
91
91
|
if (result && iterateList[i] === "stack") {
|
|
92
92
|
let master_locale = {
|
|
93
|
-
master_locale: { code: result.
|
|
93
|
+
master_locale: { code: result.code },
|
|
94
94
|
};
|
|
95
95
|
config = _.merge(config, master_locale);
|
|
96
96
|
}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
const contentstacksdk = require('@contentstack/management')
|
|
2
|
+
const https = require('https');
|
|
3
|
+
|
|
4
|
+
const { addlogs } = require('./log');
|
|
2
5
|
|
|
3
6
|
exports.Client = function (config) {
|
|
4
7
|
const option = {
|
|
5
8
|
host: config.host,
|
|
6
9
|
authtoken: config.auth_token,
|
|
7
10
|
api_key: config.source_stack,
|
|
8
|
-
|
|
11
|
+
maxRequests: 10,
|
|
12
|
+
retryLimit: 5,
|
|
13
|
+
timeout: 60000,
|
|
14
|
+
httpsAgent: new https.Agent({
|
|
15
|
+
maxSockets: 100,
|
|
16
|
+
maxFreeSockets: 10,
|
|
17
|
+
keepAlive: true,
|
|
18
|
+
timeout: 60000, // active socket keepalive for 60 seconds
|
|
19
|
+
freeSocketTimeout: 30000, // free socket keepalive for 30 seconds
|
|
20
|
+
}),
|
|
21
|
+
retryDelay: Math.floor(Math.random() * (8000 - 3000 + 1) + 3000),
|
|
22
|
+
logHandler: (level, data) => { },
|
|
23
|
+
retryCondition: (error) => {
|
|
24
|
+
if (error.response.status === 408) {
|
|
25
|
+
addlogs({ data: error.response }, 'Timeout error', 'error');
|
|
26
|
+
}
|
|
27
|
+
return false
|
|
28
|
+
}
|
|
9
29
|
}
|
|
10
30
|
|
|
11
31
|
if (typeof config.branchName === 'string') {
|