@contentstack/cli-cm-bootstrap 1.8.0 → 1.9.0
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/bootstrap/utils.js +9 -7
- package/lib/config.js +6 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
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.9.0 linux-x64 node-v18.19.1
|
|
19
19
|
$ csdx --help [COMMAND]
|
|
20
20
|
USAGE
|
|
21
21
|
$ csdx COMMAND
|
package/lib/bootstrap/utils.js
CHANGED
|
@@ -148,27 +148,29 @@ const envFileHandler = async (appConfigKey, environmentVariables, clonedDirector
|
|
|
148
148
|
fileName = `.env.${environmentVariables.environment}`;
|
|
149
149
|
filePath = path.join(clonedDirectory, fileName);
|
|
150
150
|
content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken}\n${livePreviewEnabled
|
|
151
|
-
? `\nCONTENTSTACK_PREVIEW_TOKEN=${environmentVariables.preview_token || `''`}\nCONTENTSTACK_PREVIEW_HOST=${previewHost}\nCONTENTSTACK_APP_HOST=${appHost}\n`
|
|
151
|
+
? `\nCONTENTSTACK_PREVIEW_TOKEN=${environmentVariables.preview_token || `''`}\nCONTENTSTACK_PREVIEW_HOST=${previewHost}\nCONTENTSTACK_APP_HOST=${appHost}\n`
|
|
152
|
+
: '\n'}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_API_HOST=${managementAPIHost}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`;
|
|
152
153
|
result = await writeEnvFile(content, filePath);
|
|
153
154
|
break;
|
|
154
155
|
case 'angular':
|
|
155
156
|
content = `export const environment = { \n\tproduction:${environmentVariables.environment === 'production' ? true : false}, \n\tconfig : { \n\t\tapi_key: '${environmentVariables.api_key}', \n\t\tdelivery_token: '${environmentVariables.deliveryToken}',\n${livePreviewEnabled
|
|
156
157
|
? `\n\tpreivew_token:'${environmentVariables.preview_token || `''`}'\n\tpreview_host:'${previewHost}'\n\tapp_host:'${appHost}'\n`
|
|
157
158
|
: '\n'},\n\t\tenvironment: '${environmentVariables.environment}'${!isUSRegion && !customHost ? `,\n\t\tregion: '${region.name}'` : ''} \n\t } \n };`;
|
|
158
|
-
fileName =
|
|
159
|
+
fileName = `.env${environmentVariables.environment === 'production' ? '.prod' : ''}`;
|
|
159
160
|
filePath = path.join(clonedDirectory, 'src', 'environments', fileName);
|
|
160
161
|
result = await writeEnvFile(content, filePath);
|
|
161
162
|
break;
|
|
162
163
|
case 'angular-starter':
|
|
163
|
-
content = `
|
|
164
|
-
? `\
|
|
165
|
-
: '\n'}
|
|
166
|
-
fileName =
|
|
167
|
-
filePath = path.join(clonedDirectory,
|
|
164
|
+
content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken}\n${livePreviewEnabled
|
|
165
|
+
? `\nCONTENTSTACK_PREVIEW_TOKEN=${environmentVariables.preview_token || `''`}\nCONTENTSTACK_PREVIEW_HOST=${previewHost}\nCONTENTSTACK_APP_HOST=${appHost}\n`
|
|
166
|
+
: '\n'}CONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_API_HOST=${customHost ? customHost : managementAPIHost}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_LIVE_EDIT_TAGS=false`;
|
|
167
|
+
fileName = `.env${environmentVariables.environment === 'production' ? '.prod' : ''}`;
|
|
168
|
+
filePath = path.join(clonedDirectory, fileName);
|
|
168
169
|
result = await writeEnvFile(content, filePath);
|
|
169
170
|
break;
|
|
170
171
|
case 'nuxtjs':
|
|
171
172
|
case 'nuxt-starter':
|
|
173
|
+
case 'nuxt3-starter':
|
|
172
174
|
case 'stencil-starter':
|
|
173
175
|
fileName = production ? '.env.production' : '.env';
|
|
174
176
|
filePath = path.join(clonedDirectory, fileName);
|
package/lib/config.js
CHANGED
|
@@ -14,9 +14,10 @@ const config = {
|
|
|
14
14
|
{ displayName: 'Next JS', configKey: 'nextjs-starter' },
|
|
15
15
|
{ displayName: 'Gatsby', configKey: 'gatsby-starter' },
|
|
16
16
|
{ displayName: 'Angular', configKey: 'angular-starter' },
|
|
17
|
-
{ displayName: 'Nuxt JS', configKey: 'nuxt-starter' },
|
|
17
|
+
{ displayName: 'Nuxt JS (To be Deprecated)', configKey: 'nuxt-starter' },
|
|
18
18
|
{ displayName: 'Vue JS', configKey: 'vue-starter' },
|
|
19
19
|
{ displayName: 'Stencil', configKey: 'stencil-starter' },
|
|
20
|
+
{ displayName: 'Nuxt3', configKey: 'nuxt3-starter' },
|
|
20
21
|
],
|
|
21
22
|
appLevelConfig: {
|
|
22
23
|
nextjs: {
|
|
@@ -67,6 +68,10 @@ const config = {
|
|
|
67
68
|
source: 'contentstack/contentstack-stencil-starter-app',
|
|
68
69
|
stack: 'contentstack/stack-starter-app',
|
|
69
70
|
},
|
|
71
|
+
'nuxt3-starter': {
|
|
72
|
+
source: 'contentstack/contentstack-nuxt3-starter-app',
|
|
73
|
+
stack: 'contentstack/stack-starter-app',
|
|
74
|
+
},
|
|
70
75
|
},
|
|
71
76
|
};
|
|
72
77
|
exports.default = config;
|
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.9.0",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@contentstack/cli-cm-seed": "~1.7.0",
|
|
21
21
|
"@contentstack/cli-command": "~1.2.16",
|
|
22
|
-
"@contentstack/cli-utilities": "~1.5.
|
|
22
|
+
"@contentstack/cli-utilities": "~1.5.12",
|
|
23
23
|
"inquirer": "8.2.4",
|
|
24
24
|
"mkdirp": "^1.0.4",
|
|
25
25
|
"tar": "^6.1.13"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"nyc": "^15.1.0",
|
|
40
40
|
"oclif": "^3.8.1",
|
|
41
41
|
"rimraf": "^2.7.1",
|
|
42
|
-
"tmp": "^0.2.
|
|
42
|
+
"tmp": "^0.2.2",
|
|
43
43
|
"ts-node": "^8.10.2",
|
|
44
44
|
"typescript": "^4.9.3"
|
|
45
45
|
},
|