@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 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.8.0 linux-x64 node-v18.19.0
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
@@ -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` : '\n'}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_API_HOST=${managementAPIHost}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`;
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 = `environment${environmentVariables.environment === 'production' ? '.prod.' : '.'}ts`;
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 = `export const environment = { \n\tproduction: true \n}; \nexport const Config = { \n\tapi_key: '${environmentVariables.api_key}', \n\tdelivery_token: '${environmentVariables.deliveryToken}',\n\t${livePreviewEnabled
164
- ? `\npreview_token:'${environmentVariables.preview_token || ''}',\npreview_host:'${previewHost}',\napp_host:'${appHost}'`
165
- : '\n'},\n\tenvironment: '${environmentVariables.environment}'${!isUSRegion && !customHost ? `,\n\tregion: '${region.name}'` : ''},\n\tapi_host: '${customHost ? customHost : managementAPIHost}',\n\tlive_preview: ${livePreviewEnabled}\n};`;
166
- fileName = `environment${environmentVariables.environment === 'production' ? '.prod.' : '.'}ts`;
167
- filePath = path.join(clonedDirectory, 'src', 'environments', fileName);
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;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.0",
2
+ "version": "1.9.0",
3
3
  "commands": {
4
4
  "cm:bootstrap": {
5
5
  "id": "cm:bootstrap",
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.8.0",
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.11",
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.1",
42
+ "tmp": "^0.2.2",
43
43
  "ts-node": "^8.10.2",
44
44
  "typescript": "^4.9.3"
45
45
  },