@commercetools-frontend/create-mc-app 22.14.0 → 22.14.2

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,13 @@
1
1
  # @commercetools-frontend/create-mc-app
2
2
 
3
+ ## 22.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3337](https://github.com/commercetools/merchant-center-application-kit/pull/3337) [`3d4d5028f`](https://github.com/commercetools/merchant-center-application-kit/commit/3d4d5028fa26c13d0a9f5a3d3d01128536de1f26) Thanks [@emmenko](https://github.com/emmenko)! - Fix docs link
8
+
9
+ ## 22.14.1
10
+
3
11
  ## 22.14.0
4
12
 
5
13
  ## 22.13.2
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
7
  var cac = require('cac');
7
8
  var listr2 = require('listr2');
8
9
  var execa = require('execa');
9
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
10
  var semver = require('semver');
11
11
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
12
12
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
@@ -40,8 +40,8 @@ var prettier = require('prettier');
40
40
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
41
41
 
42
42
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
43
- var execa__default = /*#__PURE__*/_interopDefault(execa);
44
43
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
44
+ var execa__default = /*#__PURE__*/_interopDefault(execa);
45
45
  var semver__default = /*#__PURE__*/_interopDefault(semver);
46
46
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
47
47
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
@@ -71,7 +71,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
71
71
 
72
72
  var pkgJson = {
73
73
  name: "@commercetools-frontend/create-mc-app",
74
- version: "22.14.0",
74
+ version: "22.14.2",
75
75
  description: "Create Merchant Center applications to quickly get up and running",
76
76
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
77
77
  repository: {
@@ -533,9 +533,19 @@ const cli = cac.cac('create-mc-app');
533
533
  process.on('unhandledRejection', err => {
534
534
  throw err;
535
535
  });
536
+ const messagesByApplicationType = {
537
+ [applicationTypes['custom-application']]: {
538
+ docsLink: 'https://docs.commercetools.com/custom-applications',
539
+ featureName: 'Custom Application'
540
+ },
541
+ [applicationTypes['custom-view']]: {
542
+ docsLink: 'https://docs-beta-custom-views.commercetools.vercel.app/custom-views',
543
+ featureName: 'Custom View'
544
+ }
545
+ };
536
546
  const run = () => {
537
547
  // Default command
538
- cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new Custom Application project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
548
+ cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
539
549
  default: applicationTypes['custom-application']
540
550
  }).option('--template <name>', '(optional) The name of the template to install.', {
541
551
  default: availableTemplates.starter
@@ -546,18 +556,18 @@ const run = () => {
546
556
  }).option('--yes', '(optional) If set, the prompt options with default values will be skipped.', {
547
557
  default: false
548
558
  }).option('--entry-point-uri-path <value>', '(optional) The version of the template to install. (default: starter-<hash>)').option('--initial-project-key <value>', '(optional) A commercetools project key used for the initial login in development. By default, the value is prompted in the terminal.').option('--package-manager <value>', '(optional) The preferred package manager to use: npm, yarn, pnpm.').action(async (projectDirectory, options) => {
549
- var _context;
559
+ var _context, _context2, _context3;
550
560
  if (!projectDirectory) {
551
561
  cli.outputHelp();
552
562
  return;
553
563
  }
554
564
  const releaseVersion = await getLatestReleaseVersion();
555
565
  hintOutdatedVersion(pkgJson.version, releaseVersion);
566
+ const taskOptions = await processOptions(projectDirectory, options);
567
+ const messages = messagesByApplicationType[taskOptions.applicationType];
556
568
  console.log('');
557
- console.log( // TODO: Use link based on the application type
558
- "Documentation available at https://docs.commercetools.com/custom-applications");
569
+ console.log("Documentation available at ".concat(messages.docsLink));
559
570
  console.log('');
560
- const taskOptions = await processOptions(projectDirectory, options);
561
571
  const shouldInstallDependencies = !options.skipInstall ||
562
572
  // TODO: remove once we manage to ensure the package manager is installed, for example via Corepack.
563
573
  options.packageManager === 'pnpm';
@@ -565,7 +575,7 @@ const run = () => {
565
575
  await taskList.run();
566
576
  const packageManager = getPreferredPackageManager(taskOptions);
567
577
  console.log('');
568
- console.log("\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The application has been created in the \"".concat(taskOptions.projectDirectoryName, "\" folder."));
578
+ console.log(_concatInstanceProperty__default["default"](_context2 = "\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The ".concat(messages.featureName, " has been created in the \"")).call(_context2, taskOptions.projectDirectoryName, "\" folder."));
569
579
  console.log('');
570
580
  console.log("To get started:");
571
581
  console.log("$ cd ".concat(taskOptions.projectDirectoryName));
@@ -574,8 +584,7 @@ const run = () => {
574
584
  }
575
585
  console.log("$ ".concat(packageManager, " start"));
576
586
  console.log('');
577
- console.log( // TODO: Use link based on the application type
578
- "Visit https://docs.commercetools.com/custom-applications for more info about developing Custom Applications. Enjoy \uD83D\uDE80");
587
+ console.log(_concatInstanceProperty__default["default"](_context3 = "Visit ".concat(messages.docsLink, " for more info about developing ")).call(_context3, messages.featureName, ". Enjoy \uD83D\uDE80"));
579
588
  });
580
589
  cli.help();
581
590
  cli.version(pkgJson.version);
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
7
  var cac = require('cac');
7
8
  var listr2 = require('listr2');
8
9
  var execa = require('execa');
9
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
10
  var semver = require('semver');
11
11
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
12
12
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
@@ -40,8 +40,8 @@ var prettier = require('prettier');
40
40
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
41
41
 
42
42
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
43
- var execa__default = /*#__PURE__*/_interopDefault(execa);
44
43
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
44
+ var execa__default = /*#__PURE__*/_interopDefault(execa);
45
45
  var semver__default = /*#__PURE__*/_interopDefault(semver);
46
46
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
47
47
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
@@ -71,7 +71,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
71
71
 
72
72
  var pkgJson = {
73
73
  name: "@commercetools-frontend/create-mc-app",
74
- version: "22.14.0",
74
+ version: "22.14.2",
75
75
  description: "Create Merchant Center applications to quickly get up and running",
76
76
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
77
77
  repository: {
@@ -533,9 +533,19 @@ const cli = cac.cac('create-mc-app');
533
533
  process.on('unhandledRejection', err => {
534
534
  throw err;
535
535
  });
536
+ const messagesByApplicationType = {
537
+ [applicationTypes['custom-application']]: {
538
+ docsLink: 'https://docs.commercetools.com/custom-applications',
539
+ featureName: 'Custom Application'
540
+ },
541
+ [applicationTypes['custom-view']]: {
542
+ docsLink: 'https://docs-beta-custom-views.commercetools.vercel.app/custom-views',
543
+ featureName: 'Custom View'
544
+ }
545
+ };
536
546
  const run = () => {
537
547
  // Default command
538
- cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new Custom Application project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
548
+ cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
539
549
  default: applicationTypes['custom-application']
540
550
  }).option('--template <name>', '(optional) The name of the template to install.', {
541
551
  default: availableTemplates.starter
@@ -546,18 +556,18 @@ const run = () => {
546
556
  }).option('--yes', '(optional) If set, the prompt options with default values will be skipped.', {
547
557
  default: false
548
558
  }).option('--entry-point-uri-path <value>', '(optional) The version of the template to install. (default: starter-<hash>)').option('--initial-project-key <value>', '(optional) A commercetools project key used for the initial login in development. By default, the value is prompted in the terminal.').option('--package-manager <value>', '(optional) The preferred package manager to use: npm, yarn, pnpm.').action(async (projectDirectory, options) => {
549
- var _context;
559
+ var _context, _context2, _context3;
550
560
  if (!projectDirectory) {
551
561
  cli.outputHelp();
552
562
  return;
553
563
  }
554
564
  const releaseVersion = await getLatestReleaseVersion();
555
565
  hintOutdatedVersion(pkgJson.version, releaseVersion);
566
+ const taskOptions = await processOptions(projectDirectory, options);
567
+ const messages = messagesByApplicationType[taskOptions.applicationType];
556
568
  console.log('');
557
- console.log( // TODO: Use link based on the application type
558
- "Documentation available at https://docs.commercetools.com/custom-applications");
569
+ console.log("Documentation available at ".concat(messages.docsLink));
559
570
  console.log('');
560
- const taskOptions = await processOptions(projectDirectory, options);
561
571
  const shouldInstallDependencies = !options.skipInstall ||
562
572
  // TODO: remove once we manage to ensure the package manager is installed, for example via Corepack.
563
573
  options.packageManager === 'pnpm';
@@ -565,7 +575,7 @@ const run = () => {
565
575
  await taskList.run();
566
576
  const packageManager = getPreferredPackageManager(taskOptions);
567
577
  console.log('');
568
- console.log("\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The application has been created in the \"".concat(taskOptions.projectDirectoryName, "\" folder."));
578
+ console.log(_concatInstanceProperty__default["default"](_context2 = "\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The ".concat(messages.featureName, " has been created in the \"")).call(_context2, taskOptions.projectDirectoryName, "\" folder."));
569
579
  console.log('');
570
580
  console.log("To get started:");
571
581
  console.log("$ cd ".concat(taskOptions.projectDirectoryName));
@@ -574,8 +584,7 @@ const run = () => {
574
584
  }
575
585
  console.log("$ ".concat(packageManager, " start"));
576
586
  console.log('');
577
- console.log( // TODO: Use link based on the application type
578
- "Visit https://docs.commercetools.com/custom-applications for more info about developing Custom Applications. Enjoy \uD83D\uDE80");
587
+ console.log(_concatInstanceProperty__default["default"](_context3 = "Visit ".concat(messages.docsLink, " for more info about developing ")).call(_context3, messages.featureName, ". Enjoy \uD83D\uDE80"));
579
588
  });
580
589
  cli.help();
581
590
  cli.version(pkgJson.version);
@@ -1,8 +1,8 @@
1
1
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
2
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
2
3
  import { cac } from 'cac';
3
4
  import { Listr } from 'listr2';
4
5
  import execa from 'execa';
5
- import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
6
6
  import semver from 'semver';
7
7
  import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
8
8
  import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
@@ -35,7 +35,7 @@ import prettier from 'prettier';
35
35
 
36
36
  var pkgJson = {
37
37
  name: "@commercetools-frontend/create-mc-app",
38
- version: "22.14.0",
38
+ version: "22.14.2",
39
39
  description: "Create Merchant Center applications to quickly get up and running",
40
40
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
41
41
  repository: {
@@ -497,9 +497,19 @@ const cli = cac('create-mc-app');
497
497
  process.on('unhandledRejection', err => {
498
498
  throw err;
499
499
  });
500
+ const messagesByApplicationType = {
501
+ [applicationTypes['custom-application']]: {
502
+ docsLink: 'https://docs.commercetools.com/custom-applications',
503
+ featureName: 'Custom Application'
504
+ },
505
+ [applicationTypes['custom-view']]: {
506
+ docsLink: 'https://docs-beta-custom-views.commercetools.vercel.app/custom-views',
507
+ featureName: 'Custom View'
508
+ }
509
+ };
500
510
  const run = () => {
501
511
  // Default command
502
- cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new Custom Application project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
512
+ cli.command('[project-directory]').usage('[project-directory]\n\n Bootstraps a new project using one of the predefined templates.').option('--application-type <type>', '(optional) The type of the application to create: custom-application (default) or custom-view.', {
503
513
  default: applicationTypes['custom-application']
504
514
  }).option('--template <name>', '(optional) The name of the template to install.', {
505
515
  default: availableTemplates.starter
@@ -510,18 +520,18 @@ const run = () => {
510
520
  }).option('--yes', '(optional) If set, the prompt options with default values will be skipped.', {
511
521
  default: false
512
522
  }).option('--entry-point-uri-path <value>', '(optional) The version of the template to install. (default: starter-<hash>)').option('--initial-project-key <value>', '(optional) A commercetools project key used for the initial login in development. By default, the value is prompted in the terminal.').option('--package-manager <value>', '(optional) The preferred package manager to use: npm, yarn, pnpm.').action(async (projectDirectory, options) => {
513
- var _context;
523
+ var _context, _context2, _context3;
514
524
  if (!projectDirectory) {
515
525
  cli.outputHelp();
516
526
  return;
517
527
  }
518
528
  const releaseVersion = await getLatestReleaseVersion();
519
529
  hintOutdatedVersion(pkgJson.version, releaseVersion);
530
+ const taskOptions = await processOptions(projectDirectory, options);
531
+ const messages = messagesByApplicationType[taskOptions.applicationType];
520
532
  console.log('');
521
- console.log( // TODO: Use link based on the application type
522
- "Documentation available at https://docs.commercetools.com/custom-applications");
533
+ console.log("Documentation available at ".concat(messages.docsLink));
523
534
  console.log('');
524
- const taskOptions = await processOptions(projectDirectory, options);
525
535
  const shouldInstallDependencies = !options.skipInstall ||
526
536
  // TODO: remove once we manage to ensure the package manager is installed, for example via Corepack.
527
537
  options.packageManager === 'pnpm';
@@ -529,7 +539,7 @@ const run = () => {
529
539
  await taskList.run();
530
540
  const packageManager = getPreferredPackageManager(taskOptions);
531
541
  console.log('');
532
- console.log("\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The application has been created in the \"".concat(taskOptions.projectDirectoryName, "\" folder."));
542
+ console.log(_concatInstanceProperty(_context2 = "\uD83C\uDF89 \uD83C\uDF89 \uD83C\uDF89 The ".concat(messages.featureName, " has been created in the \"")).call(_context2, taskOptions.projectDirectoryName, "\" folder."));
533
543
  console.log('');
534
544
  console.log("To get started:");
535
545
  console.log("$ cd ".concat(taskOptions.projectDirectoryName));
@@ -538,8 +548,7 @@ const run = () => {
538
548
  }
539
549
  console.log("$ ".concat(packageManager, " start"));
540
550
  console.log('');
541
- console.log( // TODO: Use link based on the application type
542
- "Visit https://docs.commercetools.com/custom-applications for more info about developing Custom Applications. Enjoy \uD83D\uDE80");
551
+ console.log(_concatInstanceProperty(_context3 = "Visit ".concat(messages.docsLink, " for more info about developing ")).call(_context3, messages.featureName, ". Enjoy \uD83D\uDE80"));
543
552
  });
544
553
  cli.help();
545
554
  cli.version(pkgJson.version);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/create-mc-app",
3
- "version": "22.14.0",
3
+ "version": "22.14.2",
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": {
package/src/cli.ts CHANGED
@@ -21,12 +21,24 @@ process.on('unhandledRejection', (err) => {
21
21
  throw err;
22
22
  });
23
23
 
24
+ const messagesByApplicationType = {
25
+ [applicationTypes['custom-application']]: {
26
+ docsLink: 'https://docs.commercetools.com/custom-applications',
27
+ featureName: 'Custom Application',
28
+ },
29
+ [applicationTypes['custom-view']]: {
30
+ docsLink:
31
+ 'https://docs-beta-custom-views.commercetools.vercel.app/custom-views',
32
+ featureName: 'Custom View',
33
+ },
34
+ } as const;
35
+
24
36
  const run = () => {
25
37
  // Default command
26
38
  cli
27
39
  .command('[project-directory]')
28
40
  .usage(
29
- '[project-directory]\n\n Bootstraps a new Custom Application project using one of the predefined templates.'
41
+ '[project-directory]\n\n Bootstraps a new project using one of the predefined templates.'
30
42
  )
31
43
  .option(
32
44
  '--application-type <type>',
@@ -75,15 +87,13 @@ const run = () => {
75
87
 
76
88
  hintOutdatedVersion(pkgJson.version, releaseVersion);
77
89
 
90
+ const taskOptions = await processOptions(projectDirectory, options);
91
+ const messages = messagesByApplicationType[taskOptions.applicationType];
92
+
78
93
  console.log('');
79
- console.log(
80
- // TODO: Use link based on the application type
81
- `Documentation available at https://docs.commercetools.com/custom-applications`
82
- );
94
+ console.log(`Documentation available at ${messages.docsLink}`);
83
95
  console.log('');
84
96
 
85
- const taskOptions = await processOptions(projectDirectory, options);
86
-
87
97
  const shouldInstallDependencies =
88
98
  !options.skipInstall ||
89
99
  // TODO: remove once we manage to ensure the package manager is installed, for example via Corepack.
@@ -104,7 +114,7 @@ const run = () => {
104
114
 
105
115
  console.log('');
106
116
  console.log(
107
- `🎉 🎉 🎉 The application has been created in the "${taskOptions.projectDirectoryName}" folder.`
117
+ `🎉 🎉 🎉 The ${messages.featureName} has been created in the "${taskOptions.projectDirectoryName}" folder.`
108
118
  );
109
119
  console.log('');
110
120
  console.log(`To get started:`);
@@ -115,8 +125,7 @@ const run = () => {
115
125
  console.log(`$ ${packageManager} start`);
116
126
  console.log('');
117
127
  console.log(
118
- // TODO: Use link based on the application type
119
- `Visit https://docs.commercetools.com/custom-applications for more info about developing Custom Applications. Enjoy 🚀`
128
+ `Visit ${messages.docsLink} for more info about developing ${messages.featureName}. Enjoy 🚀`
120
129
  );
121
130
  });
122
131