@contentstack/cli-cm-bootstrap 1.3.0 → 1.4.1
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/lib/commands/cm/bootstrap.js +6 -10
- package/oclif.manifest.json +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
|
|
|
15
15
|
$ csdx COMMAND
|
|
16
16
|
running command...
|
|
17
17
|
$ csdx (--version)
|
|
18
|
-
@contentstack/cli-cm-bootstrap/1.
|
|
18
|
+
@contentstack/cli-cm-bootstrap/1.4.1 linux-x64 node-v16.20.0
|
|
19
19
|
$ csdx --help [COMMAND]
|
|
20
20
|
USAGE
|
|
21
21
|
$ csdx COMMAND
|
|
@@ -8,22 +8,18 @@ const cli_utilities_1 = require("@contentstack/cli-utilities");
|
|
|
8
8
|
const config_1 = require("../../config");
|
|
9
9
|
const messages_1 = require("../../messages");
|
|
10
10
|
class BootstrapCommand extends cli_command_1.Command {
|
|
11
|
-
get managementAPIClient() {
|
|
12
|
-
return (async () => {
|
|
13
|
-
const managementAPIClient = await (0, cli_utilities_1.managementSDKClient)({ host: this.cmaHost });
|
|
14
|
-
this.bootstrapManagementAPIClient = managementAPIClient;
|
|
15
|
-
return this.bootstrapManagementAPIClient;
|
|
16
|
-
})();
|
|
17
|
-
}
|
|
18
11
|
async run() {
|
|
19
12
|
const { flags: bootstrapCommandFlags } = await this.parse(BootstrapCommand);
|
|
20
13
|
try {
|
|
21
|
-
if (!
|
|
14
|
+
if (!(0, cli_utilities_1.isAuthenticated)()) {
|
|
22
15
|
this.error(messages_1.default.parse('CLI_BOOTSTRAP_LOGIN_FAILED'), {
|
|
23
16
|
exit: 2,
|
|
24
17
|
suggestions: ['https://www.contentstack.com/docs/developers/cli/authentication/'],
|
|
25
18
|
});
|
|
26
19
|
}
|
|
20
|
+
this.bootstrapManagementAPIClient = await (0, cli_utilities_1.managementSDKClient)({
|
|
21
|
+
host: this.cmaHost,
|
|
22
|
+
});
|
|
27
23
|
// inquire user inputs
|
|
28
24
|
let appType = bootstrapCommandFlags.appType || bootstrapCommandFlags['app-type'] || 'starterapp';
|
|
29
25
|
if (!appType) {
|
|
@@ -54,7 +50,7 @@ class BootstrapCommand extends cli_command_1.Command {
|
|
|
54
50
|
cloneDirectory = await (0, interactive_1.inquireCloneDirectory)();
|
|
55
51
|
}
|
|
56
52
|
cloneDirectory = (0, path_1.resolve)(cloneDirectory);
|
|
57
|
-
const livePreviewEnabled =
|
|
53
|
+
const livePreviewEnabled = bootstrapCommandFlags.yes ? true : await (0, interactive_1.inquireLivePreviewSupport)();
|
|
58
54
|
const seedParams = {};
|
|
59
55
|
const stackAPIKey = bootstrapCommandFlags['stack-api-key'];
|
|
60
56
|
const org = bootstrapCommandFlags['org'];
|
|
@@ -72,7 +68,7 @@ class BootstrapCommand extends cli_command_1.Command {
|
|
|
72
68
|
appConfig,
|
|
73
69
|
seedParams,
|
|
74
70
|
cloneDirectory,
|
|
75
|
-
managementAPIClient:
|
|
71
|
+
managementAPIClient: this.bootstrapManagementAPIClient,
|
|
76
72
|
region: this.region,
|
|
77
73
|
appType,
|
|
78
74
|
livePreviewEnabled,
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-bootstrap",
|
|
3
3
|
"description": "Bootstrap contentstack apps",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"scripts": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contentstack/cli-cm-seed": "^1.
|
|
21
|
-
"@contentstack/cli-command": "^1.2.
|
|
22
|
-
"@contentstack/cli-utilities": "^1.
|
|
20
|
+
"@contentstack/cli-cm-seed": "^1.4.1",
|
|
21
|
+
"@contentstack/cli-command": "^1.2.2",
|
|
22
|
+
"@contentstack/cli-utilities": "^1.3.1",
|
|
23
23
|
"@contentstack/management": "^1.6.1",
|
|
24
24
|
"inquirer": "8.2.4",
|
|
25
25
|
"mkdirp": "^1.0.4",
|
|
@@ -68,5 +68,10 @@
|
|
|
68
68
|
],
|
|
69
69
|
"repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-bootstrap/<%- commandPath %>"
|
|
70
70
|
},
|
|
71
|
+
"csdxConfig": {
|
|
72
|
+
"shortCommandName": {
|
|
73
|
+
"cm:bootstrap": "BTSTRP"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
71
76
|
"repository": "contentstack/cli"
|
|
72
|
-
}
|
|
77
|
+
}
|