@contentstack/cli-cm-bootstrap 1.1.3 → 1.1.5
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
|
@@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
|
|
|
15
15
|
$ csdx COMMAND
|
|
16
16
|
running command...
|
|
17
17
|
$ csdx (-v|--version|version)
|
|
18
|
-
@contentstack/cli-cm-bootstrap/1.1.
|
|
18
|
+
@contentstack/cli-cm-bootstrap/1.1.5 linux-x64 node-v16.18.1
|
|
19
19
|
$ csdx --help [COMMAND]
|
|
20
20
|
USAGE
|
|
21
21
|
$ csdx COMMAND
|
|
@@ -49,7 +49,7 @@ USAGE
|
|
|
49
49
|
OPTIONS
|
|
50
50
|
-k, --stack-api-key=stack-api-key Provide stack API key to seed content
|
|
51
51
|
-n, --stack-name=stack-name Name of a new stack that will be created.
|
|
52
|
-
-y, --yes=yes
|
|
52
|
+
-y, --yes=yes [Optional] Skip stack confirmation
|
|
53
53
|
|
|
54
54
|
--app-name=app-name App name, reactjs-starter, nextjs-starter, gatsby-starter, angular-starter,
|
|
55
55
|
nuxt-starter, vue-starter, stencil-starter
|
|
@@ -8,14 +8,6 @@ const github_error_1 = require("./github-error");
|
|
|
8
8
|
const messages_1 = require("../../messages");
|
|
9
9
|
const DEFAULT_BRANCH = 'cli-use';
|
|
10
10
|
class GitHubClient {
|
|
11
|
-
constructor(repo, privateRepo = false, token) {
|
|
12
|
-
this.repo = repo;
|
|
13
|
-
this.private = privateRepo;
|
|
14
|
-
if (privateRepo) {
|
|
15
|
-
this.accessToken = token;
|
|
16
|
-
}
|
|
17
|
-
this.gitTarBallUrl = `https://api.github.com/repos/${repo.user}/${repo.name}/tarball/${repo.branch || DEFAULT_BRANCH}`;
|
|
18
|
-
}
|
|
19
11
|
static parsePath(gitPath) {
|
|
20
12
|
const result = {
|
|
21
13
|
user: '',
|
|
@@ -30,6 +22,14 @@ class GitHubClient {
|
|
|
30
22
|
}
|
|
31
23
|
return result;
|
|
32
24
|
}
|
|
25
|
+
constructor(repo, privateRepo = false, token) {
|
|
26
|
+
this.repo = repo;
|
|
27
|
+
this.private = privateRepo;
|
|
28
|
+
if (privateRepo) {
|
|
29
|
+
this.accessToken = token;
|
|
30
|
+
}
|
|
31
|
+
this.gitTarBallUrl = `https://api.github.com/repos/${repo.user}/${repo.name}/tarball/${repo.branch || DEFAULT_BRANCH}`;
|
|
32
|
+
}
|
|
33
33
|
async getLatest(destination) {
|
|
34
34
|
const releaseStream = await this.streamRelease(this.gitTarBallUrl);
|
|
35
35
|
await mkdirp(destination);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.inquireLivePreviewSupport = exports.inquireAppType = exports.inquireGithubAccessToken = exports.inquireCloneDirectory = exports.inquireApp = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
|
-
const inquirer = require(
|
|
5
|
+
const inquirer = require('inquirer');
|
|
6
6
|
const cli_utilities_1 = require("@contentstack/cli-utilities");
|
|
7
7
|
const messages_1 = require("../messages");
|
|
8
8
|
/**
|
|
@@ -91,7 +91,7 @@ async function inquireLivePreviewSupport() {
|
|
|
91
91
|
const { livePreviewEnabled } = await inquirer.prompt({
|
|
92
92
|
type: 'confirm',
|
|
93
93
|
name: 'livePreviewEnabled',
|
|
94
|
-
message: 'Enable live preview?'
|
|
94
|
+
message: 'Enable live preview?',
|
|
95
95
|
});
|
|
96
96
|
return livePreviewEnabled;
|
|
97
97
|
}
|
package/lib/bootstrap/utils.js
CHANGED
|
@@ -138,7 +138,8 @@ const envFileHandler = async (appConfigKey, environmentVariables, clonedDirector
|
|
|
138
138
|
case 'stencil-starter':
|
|
139
139
|
fileName = (production ? '.env.production' : '.env');
|
|
140
140
|
filePath = path.join(clonedDirectory, fileName);
|
|
141
|
-
|
|
141
|
+
// Note: Stencil app needs all the env variables, even if they are not having values otherwise the rollup does not work properly and throws process in undefined error.
|
|
142
|
+
content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}${(!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : '')}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_MANAGEMENT_TOKEN=''\nCONTENTSTACK_API_HOST='${customHost ? customHost : managementAPIHost}'\nCONTENTSTACK_APP_HOST=''\nCONTENTSTACK_LIVE_EDIT_TAGS=false`;
|
|
142
143
|
result = await writeEnvFile(content, filePath);
|
|
143
144
|
break;
|
|
144
145
|
case 'vue-starter':
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.1.
|
|
1
|
+
{"version":"1.1.5","commands":{"cm:bootstrap":{"id":"cm:bootstrap","description":"Bootstrap contentstack apps","pluginName":"@contentstack/cli-cm-bootstrap","pluginType":"core","aliases":[],"examples":["$ csdx cm:bootstrap","$ csdx cm:bootstrap --project-dir <path/to/setup/the/app>","$ csdx cm:bootstrap --app-name \"reactjs-starter\" --project-dir <path/to/setup/the/app>","$ csdx cm:bootstrap --app-name \"reactjs-starter\" --project-dir <path/to/setup/the/app> --stack-api-key \"stack-api-key\"","$ csdx cm:bootstrap --app-name \"reactjs-starter\" --project-dir <path/to/setup/the/app> --org \"your-org-uid\" --stack-name \"stack-name\""],"flags":{"app-name":{"name":"app-name","type":"option","description":"App name, reactjs-starter, nextjs-starter, gatsby-starter, angular-starter, nuxt-starter, vue-starter, stencil-starter","required":false},"project-dir":{"name":"project-dir","type":"option","description":"Directory to setup the project. If directory name has a space then provide the path as a string or escap the space using back slash eg: \"../../test space\" or ../../test\\ space","required":false},"app-type":{"name":"app-type","type":"option","description":"Sample or Starter app","hidden":true,"required":false},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"Provide stack API key to seed content","required":false},"org":{"name":"org","type":"option","description":"Provide organization UID to create a new stack","required":false},"stack-name":{"name":"stack-name","type":"option","char":"n","description":"Name of a new stack that will be created.","required":false},"yes":{"name":"yes","type":"option","char":"y","description":"[Optional] Skip stack confirmation","required":false},"appName":{"name":"appName","type":"option","char":"a","description":"App name, reactjs-starter, nextjs-starter, gatsby-starter, angular-starter, nuxt-starter","hidden":true,"required":false},"directory":{"name":"directory","type":"option","char":"d","description":"Directory to set up the project. If directory name has a space then provide the path as a string or escape the space using backslash eg: \"../../test space\" or ../../test\\ space","hidden":true,"required":false},"appType":{"name":"appType","type":"option","char":"s","description":"Sample or Starter app","hidden":true,"required":false}},"args":[]}}}
|
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.1.
|
|
4
|
+
"version": "1.1.5",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"scripts": {
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contentstack/cli-cm-seed": "^1.1.
|
|
21
|
-
"@contentstack/cli-command": "^1.0.
|
|
22
|
-
"@contentstack/cli-utilities": "^1.0.
|
|
23
|
-
"@contentstack/management": "^1.
|
|
20
|
+
"@contentstack/cli-cm-seed": "^1.1.5",
|
|
21
|
+
"@contentstack/cli-command": "^1.0.3",
|
|
22
|
+
"@contentstack/cli-utilities": "^1.0.4",
|
|
23
|
+
"@contentstack/management": "^1.6.0",
|
|
24
24
|
"@oclif/command": "^1.8.16",
|
|
25
25
|
"@oclif/config": "^1.18.3",
|
|
26
|
-
"inquirer": "
|
|
26
|
+
"inquirer": "8.2.4",
|
|
27
27
|
"mkdirp": "^1.0.4",
|
|
28
28
|
"tar": "^6.0.5"
|
|
29
29
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@oclif/dev-cli": "^1.22.2",
|
|
32
32
|
"@oclif/plugin-help": "^5.1.12",
|
|
33
33
|
"@oclif/test": "^1.2.8",
|
|
34
|
-
"@types/inquirer": "^
|
|
34
|
+
"@types/inquirer": "^9.0.3",
|
|
35
35
|
"@types/mkdirp": "^1.0.1",
|
|
36
36
|
"@types/node": "^14.14.32",
|
|
37
37
|
"@types/tar": "^4.0.3",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"rimraf": "^2.7.1",
|
|
46
46
|
"tmp": "^0.2.1",
|
|
47
47
|
"ts-node": "^8.10.2",
|
|
48
|
-
"typescript": "^4.
|
|
48
|
+
"typescript": "^4.9.3"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=8.0.0"
|