@contentstack/cli-cm-bootstrap 1.6.3 → 1.7.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 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.6.3 linux-x64 node-v18.18.2
18
+ @contentstack/cli-cm-bootstrap/1.7.1 linux-x64 node-v18.19.0
19
19
  $ csdx --help [COMMAND]
20
20
  USAGE
21
21
  $ csdx COMMAND
@@ -71,6 +71,11 @@ class Bootstrap {
71
71
  else {
72
72
  throw new Error(messages_1.default.parse('CLI_BOOTSTRAP_NO_API_KEY_FOUND'));
73
73
  }
74
+ if (this.options.livePreviewEnabled) {
75
+ cli_utilities_1.cliux.print('Important: set management token and app host in the environment file before running the application', {
76
+ color: 'yellow',
77
+ });
78
+ }
74
79
  cli_utilities_1.cliux.print(messages_1.default.parse('CLI_BOOTSTRAP_SUCCESS'));
75
80
  }
76
81
  catch (error) {
@@ -117,7 +117,7 @@ const envFileHandler = async (appConfigKey, environmentVariables, clonedDirector
117
117
  case 'nextjs-starter':
118
118
  fileName = `.env.${environmentVariables.environment}.local`;
119
119
  filePath = path.join(clonedDirectory, fileName);
120
- content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}${customHost ? '\nCONTENTSTACK_API_HOST=' + customHost : ''}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`;
120
+ content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_API_HOST=${customHost ? customHost : managementAPIHost}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_MANAGEMENT_TOKEN=''\nCONTENTSTACK_APP_HOST=''\nCONTENTSTACK_LIVE_EDIT_TAGS=false`;
121
121
  result = await writeEnvFile(content, filePath);
122
122
  break;
123
123
  case 'gatsby':
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.3",
2
+ "version": "1.7.1",
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.6.3",
4
+ "version": "1.7.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.6.3",
20
+ "@contentstack/cli-cm-seed": "~1.7.0",
21
21
  "@contentstack/cli-command": "~1.2.16",
22
- "@contentstack/cli-utilities": "~1.5.7",
22
+ "@contentstack/cli-utilities": "~1.5.8",
23
23
  "inquirer": "8.2.4",
24
24
  "mkdirp": "^1.0.4",
25
25
  "tar": "^6.1.13"