@commercetools-frontend/create-mc-app 22.12.0 → 22.13.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @commercetools-frontend/create-mc-app
2
2
 
3
+ ## 22.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3295](https://github.com/commercetools/merchant-center-application-kit/pull/3295) [`83eb0f4e1`](https://github.com/commercetools/merchant-center-application-kit/commit/83eb0f4e176f583fdbada2cdc9797d895ddd1408) Thanks [@CarlosCortizasCT](https://github.com/CarlosCortizasCT)! - Enable bootstraping Custom Views without locally setting an environment variable
8
+
3
9
  ## 22.12.0
4
10
 
5
11
  ## 22.11.0
@@ -18,6 +18,8 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
18
18
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
19
19
  var fs = require('node:fs');
20
20
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
21
+ var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
22
+ var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
21
23
  var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
22
24
  var os = require('node:os');
23
25
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -51,6 +53,8 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
51
53
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
52
54
  var fs__default = /*#__PURE__*/_interopDefault(fs);
53
55
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
56
+ var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
57
+ var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
54
58
  var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
55
59
  var os__default = /*#__PURE__*/_interopDefault(os);
56
60
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
@@ -67,7 +71,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
67
71
 
68
72
  var pkgJson = {
69
73
  name: "@commercetools-frontend/create-mc-app",
70
- version: "22.12.0",
74
+ version: "22.13.0",
71
75
  description: "Create Merchant Center applications to quickly get up and running",
72
76
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
73
77
  repository: {
@@ -186,22 +190,11 @@ const resolveFilePathByExtension = requestedModule => {
186
190
  };
187
191
 
188
192
  const throwIfApplicationTypeIsNotSupported = applicationType => {
189
- switch (applicationType) {
190
- case applicationTypes['custom-view']:
191
- {
192
- if (process.env.ENABLE_EXPERIMENTAL_CUSTOM_VIEWS !== 'true') {
193
- throw new Error("Custom Views generation is not yet supported.");
194
- }
195
- break;
196
- }
197
- case applicationTypes['custom-application']:
198
- break;
199
- default:
200
- {
201
- var _context;
202
- const applicationTypesList = _Object$keys__default["default"](applicationTypes).toString();
203
- throw new Error(_concatInstanceProperty__default["default"](_context = "The provided application type \"".concat(applicationType, "\" does not exist. Available types are \"")).call(_context, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
204
- }
193
+ var _context;
194
+ const applicationTypesList = _Object$keys__default["default"](applicationTypes);
195
+ if (!_includesInstanceProperty__default["default"](_context = _Object$values__default["default"](applicationTypesList)).call(_context, applicationType)) {
196
+ var _context2;
197
+ throw new Error(_concatInstanceProperty__default["default"](_context2 = "The provided application type \"".concat(applicationType.toString(), "\" does not exist. Available types are \"")).call(_context2, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
205
198
  }
206
199
  };
207
200
  const throwIfTemplateIsNotSupported = templateName => {
@@ -211,22 +204,22 @@ const throwIfTemplateIsNotSupported = templateName => {
211
204
  break;
212
205
  default:
213
206
  {
214
- var _context2;
207
+ var _context3;
215
208
  const templateNamesList = _Object$keys__default["default"](availableTemplates).toString();
216
- throw new Error(_concatInstanceProperty__default["default"](_context2 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context2, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
209
+ throw new Error(_concatInstanceProperty__default["default"](_context3 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context3, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
217
210
  }
218
211
  }
219
212
  };
220
213
  const throwIfProjectDirectoryExists = (dirName, dirPath) => {
221
214
  if (fs__default["default"].existsSync(dirPath)) {
222
- var _context3;
223
- throw new Error(_concatInstanceProperty__default["default"](_context3 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context3, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
215
+ var _context4;
216
+ throw new Error(_concatInstanceProperty__default["default"](_context4 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context4, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
224
217
  }
225
218
  };
226
219
  const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, versionToCheck) => {
227
220
  if (!fs__default["default"].existsSync(templateFolderPath)) {
228
- var _context4;
229
- throw new Error(_concatInstanceProperty__default["default"](_context4 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context4, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
221
+ var _context5;
222
+ throw new Error(_concatInstanceProperty__default["default"](_context5 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context5, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
230
223
  }
231
224
  // In case the version is semver (usually release tags) we check that
232
225
  // the cloned repository contains the template matching the given version
@@ -236,8 +229,8 @@ const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, ve
236
229
  }));
237
230
  const versionAsNumber = versionToCheck.replace('v', '');
238
231
  if (templatePackageJson.version !== versionAsNumber) {
239
- var _context5, _context6;
240
- throw new Error(_concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context6, versionAsNumber, "\", instead got \"")).call(_context5, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
232
+ var _context6, _context7;
233
+ throw new Error(_concatInstanceProperty__default["default"](_context6 = _concatInstanceProperty__default["default"](_context7 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context7, versionAsNumber, "\", instead got \"")).call(_context6, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
241
234
  }
242
235
  }
243
236
  };
@@ -249,8 +242,8 @@ const throwIfInitialProjectKeyIsMissing = initialProjectKey => {
249
242
  const throwIfNodeVersionIsNotSupported = (currentNodeVersion, expectedVersionRange) => {
250
243
  const hasValidNodeVersion = semver__default["default"].satisfies(currentNodeVersion, expectedVersionRange);
251
244
  if (!hasValidNodeVersion) {
252
- var _context7;
253
- throw new Error(_concatInstanceProperty__default["default"](_context7 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context7, expectedVersionRange, ". Please update your version of Node."));
245
+ var _context8;
246
+ throw new Error(_concatInstanceProperty__default["default"](_context8 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context8, expectedVersionRange, ". Please update your version of Node."));
254
247
  }
255
248
  };
256
249
 
@@ -18,6 +18,8 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
18
18
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
19
19
  var fs = require('node:fs');
20
20
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
21
+ var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
22
+ var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
21
23
  var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
22
24
  var os = require('node:os');
23
25
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -51,6 +53,8 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
51
53
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
52
54
  var fs__default = /*#__PURE__*/_interopDefault(fs);
53
55
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
56
+ var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
57
+ var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
54
58
  var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
55
59
  var os__default = /*#__PURE__*/_interopDefault(os);
56
60
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
@@ -67,7 +71,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
67
71
 
68
72
  var pkgJson = {
69
73
  name: "@commercetools-frontend/create-mc-app",
70
- version: "22.12.0",
74
+ version: "22.13.0",
71
75
  description: "Create Merchant Center applications to quickly get up and running",
72
76
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
73
77
  repository: {
@@ -186,22 +190,11 @@ const resolveFilePathByExtension = requestedModule => {
186
190
  };
187
191
 
188
192
  const throwIfApplicationTypeIsNotSupported = applicationType => {
189
- switch (applicationType) {
190
- case applicationTypes['custom-view']:
191
- {
192
- if (process.env.ENABLE_EXPERIMENTAL_CUSTOM_VIEWS !== 'true') {
193
- throw new Error("Custom Views generation is not yet supported.");
194
- }
195
- break;
196
- }
197
- case applicationTypes['custom-application']:
198
- break;
199
- default:
200
- {
201
- var _context;
202
- const applicationTypesList = _Object$keys__default["default"](applicationTypes).toString();
203
- throw new Error(_concatInstanceProperty__default["default"](_context = "The provided application type \"".concat(applicationType, "\" does not exist. Available types are \"")).call(_context, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
204
- }
193
+ var _context;
194
+ const applicationTypesList = _Object$keys__default["default"](applicationTypes);
195
+ if (!_includesInstanceProperty__default["default"](_context = _Object$values__default["default"](applicationTypesList)).call(_context, applicationType)) {
196
+ var _context2;
197
+ throw new Error(_concatInstanceProperty__default["default"](_context2 = "The provided application type \"".concat(applicationType.toString(), "\" does not exist. Available types are \"")).call(_context2, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
205
198
  }
206
199
  };
207
200
  const throwIfTemplateIsNotSupported = templateName => {
@@ -211,22 +204,22 @@ const throwIfTemplateIsNotSupported = templateName => {
211
204
  break;
212
205
  default:
213
206
  {
214
- var _context2;
207
+ var _context3;
215
208
  const templateNamesList = _Object$keys__default["default"](availableTemplates).toString();
216
- throw new Error(_concatInstanceProperty__default["default"](_context2 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context2, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
209
+ throw new Error(_concatInstanceProperty__default["default"](_context3 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context3, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
217
210
  }
218
211
  }
219
212
  };
220
213
  const throwIfProjectDirectoryExists = (dirName, dirPath) => {
221
214
  if (fs__default["default"].existsSync(dirPath)) {
222
- var _context3;
223
- throw new Error(_concatInstanceProperty__default["default"](_context3 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context3, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
215
+ var _context4;
216
+ throw new Error(_concatInstanceProperty__default["default"](_context4 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context4, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
224
217
  }
225
218
  };
226
219
  const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, versionToCheck) => {
227
220
  if (!fs__default["default"].existsSync(templateFolderPath)) {
228
- var _context4;
229
- throw new Error(_concatInstanceProperty__default["default"](_context4 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context4, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
221
+ var _context5;
222
+ throw new Error(_concatInstanceProperty__default["default"](_context5 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context5, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
230
223
  }
231
224
  // In case the version is semver (usually release tags) we check that
232
225
  // the cloned repository contains the template matching the given version
@@ -236,8 +229,8 @@ const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, ve
236
229
  }));
237
230
  const versionAsNumber = versionToCheck.replace('v', '');
238
231
  if (templatePackageJson.version !== versionAsNumber) {
239
- var _context5, _context6;
240
- throw new Error(_concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context6, versionAsNumber, "\", instead got \"")).call(_context5, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
232
+ var _context6, _context7;
233
+ throw new Error(_concatInstanceProperty__default["default"](_context6 = _concatInstanceProperty__default["default"](_context7 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context7, versionAsNumber, "\", instead got \"")).call(_context6, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
241
234
  }
242
235
  }
243
236
  };
@@ -249,8 +242,8 @@ const throwIfInitialProjectKeyIsMissing = initialProjectKey => {
249
242
  const throwIfNodeVersionIsNotSupported = (currentNodeVersion, expectedVersionRange) => {
250
243
  const hasValidNodeVersion = semver__default["default"].satisfies(currentNodeVersion, expectedVersionRange);
251
244
  if (!hasValidNodeVersion) {
252
- var _context7;
253
- throw new Error(_concatInstanceProperty__default["default"](_context7 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context7, expectedVersionRange, ". Please update your version of Node."));
245
+ var _context8;
246
+ throw new Error(_concatInstanceProperty__default["default"](_context8 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context8, expectedVersionRange, ". Please update your version of Node."));
254
247
  }
255
248
  };
256
249
 
@@ -14,6 +14,8 @@ import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance
14
14
  import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
15
15
  import fs from 'node:fs';
16
16
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
17
+ import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
18
+ import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
17
19
  import _Date$now from '@babel/runtime-corejs3/core-js-stable/date/now';
18
20
  import os from 'node:os';
19
21
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
@@ -33,7 +35,7 @@ import prettier from 'prettier';
33
35
 
34
36
  var pkgJson = {
35
37
  name: "@commercetools-frontend/create-mc-app",
36
- version: "22.12.0",
38
+ version: "22.13.0",
37
39
  description: "Create Merchant Center applications to quickly get up and running",
38
40
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
39
41
  repository: {
@@ -152,22 +154,11 @@ const resolveFilePathByExtension = requestedModule => {
152
154
  };
153
155
 
154
156
  const throwIfApplicationTypeIsNotSupported = applicationType => {
155
- switch (applicationType) {
156
- case applicationTypes['custom-view']:
157
- {
158
- if (process.env.ENABLE_EXPERIMENTAL_CUSTOM_VIEWS !== 'true') {
159
- throw new Error("Custom Views generation is not yet supported.");
160
- }
161
- break;
162
- }
163
- case applicationTypes['custom-application']:
164
- break;
165
- default:
166
- {
167
- var _context;
168
- const applicationTypesList = _Object$keys(applicationTypes).toString();
169
- throw new Error(_concatInstanceProperty(_context = "The provided application type \"".concat(applicationType, "\" does not exist. Available types are \"")).call(_context, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
170
- }
157
+ var _context;
158
+ const applicationTypesList = _Object$keys(applicationTypes);
159
+ if (!_includesInstanceProperty(_context = _Object$values(applicationTypesList)).call(_context, applicationType)) {
160
+ var _context2;
161
+ throw new Error(_concatInstanceProperty(_context2 = "The provided application type \"".concat(applicationType.toString(), "\" does not exist. Available types are \"")).call(_context2, applicationTypesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
171
162
  }
172
163
  };
173
164
  const throwIfTemplateIsNotSupported = templateName => {
@@ -177,22 +168,22 @@ const throwIfTemplateIsNotSupported = templateName => {
177
168
  break;
178
169
  default:
179
170
  {
180
- var _context2;
171
+ var _context3;
181
172
  const templateNamesList = _Object$keys(availableTemplates).toString();
182
- throw new Error(_concatInstanceProperty(_context2 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context2, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
173
+ throw new Error(_concatInstanceProperty(_context3 = "The provided template name \"".concat(templateName, "\" does not exist. Available templates are \"")).call(_context3, templateNamesList, "\". Make sure you are also using the latest version of \"@commercetools-frontend/create-mc-app\"."));
183
174
  }
184
175
  }
185
176
  };
186
177
  const throwIfProjectDirectoryExists = (dirName, dirPath) => {
187
178
  if (fs.existsSync(dirPath)) {
188
- var _context3;
189
- throw new Error(_concatInstanceProperty(_context3 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context3, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
179
+ var _context4;
180
+ throw new Error(_concatInstanceProperty(_context4 = "A directory named \"".concat(dirName, "\" already exists at this location \"")).call(_context4, dirPath, "\". Please choose a different project name or remove the directory, then try running the command again."));
190
181
  }
191
182
  };
192
183
  const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, versionToCheck) => {
193
184
  if (!fs.existsSync(templateFolderPath)) {
194
- var _context4;
195
- throw new Error(_concatInstanceProperty(_context4 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context4, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
185
+ var _context5;
186
+ throw new Error(_concatInstanceProperty(_context5 = "The downloaded template \"".concat(templateName, "\" does not exist for the given version \"")).call(_context5, versionToCheck, "\". Check the releases page if you are looking for a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
196
187
  }
197
188
  // In case the version is semver (usually release tags) we check that
198
189
  // the cloned repository contains the template matching the given version
@@ -202,8 +193,8 @@ const throwIfTemplateVersionDoesNotExist = (templateName, templateFolderPath, ve
202
193
  }));
203
194
  const versionAsNumber = versionToCheck.replace('v', '');
204
195
  if (templatePackageJson.version !== versionAsNumber) {
205
- var _context5, _context6;
206
- throw new Error(_concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context6, versionAsNumber, "\", instead got \"")).call(_context5, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
196
+ var _context6, _context7;
197
+ throw new Error(_concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = "The downloaded template \"".concat(templateName, "\" does not match the version \"")).call(_context7, versionAsNumber, "\", instead got \"")).call(_context6, templatePackageJson.version, "\". Check the releases page if you want to provide a specific version: https://github.com/commercetools/merchant-center-application-kit/releases"));
207
198
  }
208
199
  }
209
200
  };
@@ -215,8 +206,8 @@ const throwIfInitialProjectKeyIsMissing = initialProjectKey => {
215
206
  const throwIfNodeVersionIsNotSupported = (currentNodeVersion, expectedVersionRange) => {
216
207
  const hasValidNodeVersion = semver.satisfies(currentNodeVersion, expectedVersionRange);
217
208
  if (!hasValidNodeVersion) {
218
- var _context7;
219
- throw new Error(_concatInstanceProperty(_context7 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context7, expectedVersionRange, ". Please update your version of Node."));
209
+ var _context8;
210
+ throw new Error(_concatInstanceProperty(_context8 = "You are running Node ".concat(currentNodeVersion, " but create-mc-app requires Node ")).call(_context8, expectedVersionRange, ". Please update your version of Node."));
220
211
  }
221
212
  };
222
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/create-mc-app",
3
- "version": "22.12.0",
3
+ "version": "22.13.0",
4
4
  "description": "Create Merchant Center applications to quickly get up and running",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -8,21 +8,11 @@ import { isSemVer } from './utils';
8
8
  const throwIfApplicationTypeIsNotSupported = (
9
9
  applicationType: TApplicationType
10
10
  ) => {
11
- switch (applicationType) {
12
- case applicationTypes['custom-view']: {
13
- if (process.env.ENABLE_EXPERIMENTAL_CUSTOM_VIEWS !== 'true') {
14
- throw new Error(`Custom Views generation is not yet supported.`);
15
- }
16
- break;
17
- }
18
- case applicationTypes['custom-application']:
19
- break;
20
- default: {
21
- const applicationTypesList = Object.keys(applicationTypes).toString();
22
- throw new Error(
23
- `The provided application type "${applicationType}" does not exist. Available types are "${applicationTypesList}". Make sure you are also using the latest version of "@commercetools-frontend/create-mc-app".`
24
- );
25
- }
11
+ const applicationTypesList = Object.keys(applicationTypes);
12
+ if (!Object.values(applicationTypesList).includes(applicationType)) {
13
+ throw new Error(
14
+ `The provided application type "${applicationType.toString()}" does not exist. Available types are "${applicationTypesList}". Make sure you are also using the latest version of "@commercetools-frontend/create-mc-app".`
15
+ );
26
16
  }
27
17
  };
28
18