@contentstack/cli-cm-bootstrap 1.14.0 → 1.14.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.14.0 linux-x64 node-v22.14.0
18
+ @contentstack/cli-cm-bootstrap/1.14.1 linux-x64 node-v22.15.0
19
19
  $ csdx --help [COMMAND]
20
20
  USAGE
21
21
  $ csdx COMMAND
@@ -23,30 +23,28 @@ const setupEnvironments = async (managementAPIClient, api_key, appConfig, cloned
23
23
  //create management token if not present
24
24
  if (!managementToken) {
25
25
  const managementBody = {
26
- "token": {
27
- "name": "sample app",
28
- "description": "This is a sample management token.",
29
- "scope": [
26
+ token: {
27
+ name: 'sample app',
28
+ description: 'This is a sample management token.',
29
+ scope: [
30
30
  {
31
- "module": "content_type",
32
- "acl": {
33
- "read": true,
34
- "write": true
35
- }
31
+ module: 'content_type',
32
+ acl: {
33
+ read: true,
34
+ write: true,
35
+ },
36
36
  },
37
37
  {
38
- "module": "branch",
39
- "branches": [
40
- "main"
41
- ],
42
- "acl": {
43
- "read": true
44
- }
45
- }
38
+ module: 'branch',
39
+ branches: ['main'],
40
+ acl: {
41
+ read: true,
42
+ },
43
+ },
46
44
  ],
47
- "expires_on": "3000-01-01",
48
- "is_email_notification_enabled": false
49
- }
45
+ expires_on: '3000-01-01',
46
+ is_email_notification_enabled: false,
47
+ },
50
48
  };
51
49
  managementTokenResult = await managementAPIClient
52
50
  .stack({ api_key: api_key })
@@ -155,13 +153,11 @@ const envFileHandler = async (appConfigKey, environmentVariables, clonedDirector
155
153
  let filePath;
156
154
  let fileName;
157
155
  let customHost;
158
- let previewHost;
159
- let appHost;
160
156
  const managementAPIHost = (_a = region === null || region === void 0 ? void 0 : region.cma) === null || _a === void 0 ? void 0 : _a.substring('8');
161
157
  const regionName = region && region.name && region.name.toLowerCase();
162
- previewHost = (_c = (_b = region === null || region === void 0 ? void 0 : region.uiHost) === null || _b === void 0 ? void 0 : _b.substring(8)) === null || _c === void 0 ? void 0 : _c.replace('app', 'rest-preview');
158
+ const previewHost = (_c = (_b = region === null || region === void 0 ? void 0 : region.uiHost) === null || _b === void 0 ? void 0 : _b.substring(8)) === null || _c === void 0 ? void 0 : _c.replace('app', 'rest-preview');
163
159
  const cdnHost = (_d = region === null || region === void 0 ? void 0 : region.cda) === null || _d === void 0 ? void 0 : _d.substring('8');
164
- appHost = (_e = region === null || region === void 0 ? void 0 : region.uiHost) === null || _e === void 0 ? void 0 : _e.substring(8);
160
+ const appHost = (_e = region === null || region === void 0 ? void 0 : region.uiHost) === null || _e === void 0 ? void 0 : _e.substring(8);
165
161
  const isUSRegion = regionName === 'us' || regionName === 'na';
166
162
  if (regionName !== 'eu' && !isUSRegion) {
167
163
  customHost = (_f = region === null || region === void 0 ? void 0 : region.cma) === null || _f === void 0 ? void 0 : _f.substring(8);
@@ -193,6 +189,7 @@ const envFileHandler = async (appConfigKey, environmentVariables, clonedDirector
193
189
  ? `\nCONTENTSTACK_PREVIEW_TOKEN=${environmentVariables.preview_token || `''`}\nCONTENTSTACK_PREVIEW_HOST=${previewHost}\n`
194
190
  : '\n'}CONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_LIVE_EDIT_TAGS=false\nCONTENTSTACK_API_HOST=${customHost ? customHost : managementAPIHost}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''}\nCONTENTSTACK_APP_HOST=${appHost}\nCONTENTSTACK_MANAGEMENT_TOKEN=${managementTokenResult.uid}\nCONTENTSTACK_HOST=${cdnHost}`;
195
191
  result = await writeEnvFile(content, filePath);
192
+ break;
196
193
  case 'gatsby':
197
194
  case 'gatsby-starter':
198
195
  fileName = `.env.${environmentVariables.environment}`;
@@ -48,7 +48,7 @@ class BootstrapCommand extends cli_command_1.Command {
48
48
  }
49
49
  const yes = bootstrapCommandFlags.yes;
50
50
  const appConfig = (0, config_1.getAppLevelConfigByName)(selectedAppName || selectedApp.configKey);
51
- let master_locale = appConfig.master_locale || exports.DEFAULT_MASTER_LOCALE;
51
+ const master_locale = appConfig.master_locale || exports.DEFAULT_MASTER_LOCALE;
52
52
  let cloneDirectory = bootstrapCommandFlags.directory || bootstrapCommandFlags['project-dir'];
53
53
  if (!cloneDirectory) {
54
54
  cloneDirectory = await (0, interactive_1.inquireCloneDirectory)();
@@ -137,5 +137,5 @@
137
137
  ]
138
138
  }
139
139
  },
140
- "version": "1.14.0"
140
+ "version": "1.14.1"
141
141
  }
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.14.0",
4
+ "version": "1.14.1",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "scripts": {
@@ -17,26 +17,26 @@
17
17
  "test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
18
18
  },
19
19
  "dependencies": {
20
- "@contentstack/cli-cm-seed": "~1.11.0",
20
+ "@contentstack/cli-cm-seed": "~1.11.1",
21
21
  "@contentstack/cli-command": "~1.5.0",
22
- "@contentstack/cli-utilities": "~1.11.0",
22
+ "@contentstack/cli-utilities": "~1.12.0",
23
23
  "inquirer": "8.2.6",
24
24
  "mkdirp": "^1.0.4",
25
25
  "tar": "^6.2.1 "
26
26
  },
27
27
  "devDependencies": {
28
- "@oclif/test": "^4.1.6",
29
- "@types/inquirer": "^9.0.7",
28
+ "@oclif/test": "^4.1.13",
29
+ "@types/inquirer": "^9.0.8",
30
30
  "@types/mkdirp": "^1.0.2",
31
31
  "@types/node": "^14.18.63",
32
32
  "@types/tar": "^6.1.13",
33
33
  "chai": "^4.5.0",
34
34
  "eslint": "^8.57.1",
35
- "eslint-config-oclif": "^6.0.15",
36
- "eslint-config-oclif-typescript": "^3.1.13",
35
+ "eslint-config-oclif": "^6.0.62",
36
+ "eslint-config-oclif-typescript": "^3.1.14",
37
37
  "mocha": "10.8.2",
38
38
  "nyc": "^15.1.0",
39
- "oclif": "^4.17.30",
39
+ "oclif": "^4.17.46",
40
40
  "tmp": "^0.2.3",
41
41
  "ts-node": "^8.10.2",
42
42
  "typescript": "^4.9.5"