@modern-js/mwa-generator 2.0.2 → 2.0.3

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.
@@ -286634,7 +286634,8 @@ exports.handleTemplateFile = handleTemplateFile;
286634
286634
  var _default = async (context, generator) => {
286635
286635
  const appApi = new _codesmithApiApp.AppAPI(context, generator);
286636
286636
  const {
286637
- locale
286637
+ locale,
286638
+ successInfo
286638
286639
  } = context.config;
286639
286640
 
286640
286641
  _generatorCommon.i18n.changeLanguage({
@@ -286687,16 +286688,22 @@ var _default = async (context, generator) => {
286687
286688
  process.exit(1);
286688
286689
  }
286689
286690
 
286690
- if (isElectron) {
286691
+ const {
286692
+ packageManager
286693
+ } = context.config;
286694
+
286695
+ if (successInfo) {
286696
+ appApi.showSuccessInfo(successInfo);
286697
+ } else if (isElectron) {
286691
286698
  appApi.showSuccessInfo(`${_locale.i18n.t(_locale.localeKeys.success, {
286692
- packageManager: (0, _generatorUtils.getPackageManagerText)(context.config.packageManager)
286699
+ packageManager: (0, _generatorUtils.getPackageManagerText)(packageManager)
286693
286700
  })}
286694
286701
  ${_locale.i18n.t(_locale.localeKeys.electron.success, {
286695
- packageManager: (0, _generatorUtils.getPackageManagerText)(context.config.packageManager)
286702
+ packageManager: (0, _generatorUtils.getPackageManagerText)(packageManager)
286696
286703
  })}`);
286697
286704
  } else {
286698
286705
  appApi.showSuccessInfo(_locale.i18n.t(_locale.localeKeys.success, {
286699
- packageManager: (0, _generatorUtils.getPackageManagerText)(context.config.packageManager)
286706
+ packageManager: (0, _generatorUtils.getPackageManagerText)(packageManager)
286700
286707
  }));
286701
286708
  }
286702
286709
 
@@ -287362,7 +287369,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
287362
287369
  exports.applyOptionsChain = void 0;
287363
287370
  // eslint-disable-next-line import/no-useless-path-segments
287364
287371
  const index_1 = __webpack_require__(10163);
287365
- const applyOptionsChain = (defaults, options, utils, mergeFn = Object.assign) => {
287372
+ function applyOptionsChain(defaults, options, utils, mergeFn = Object.assign) {
287366
287373
  if (!options) {
287367
287374
  return defaults;
287368
287375
  }
@@ -287379,13 +287386,13 @@ const applyOptionsChain = (defaults, options, utils, mergeFn = Object.assign) =>
287379
287386
  }
287380
287387
  }
287381
287388
  else if (Array.isArray(options)) {
287382
- return options.reduce((memo, cur) => (0, exports.applyOptionsChain)(memo, cur, utils, mergeFn), defaults);
287389
+ return options.reduce((memo, cur) => applyOptionsChain(memo, cur, utils, mergeFn), defaults);
287383
287390
  }
287384
287391
  else {
287385
287392
  throw new Error(`applyOptionsChain error:\ndefault options is: ${JSON.stringify(defaults)}`);
287386
287393
  }
287387
287394
  return defaults;
287388
- };
287395
+ }
287389
287396
  exports.applyOptionsChain = applyOptionsChain;
287390
287397
 
287391
287398
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.2",
14
+ "version": "2.0.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/js/node/main.js",
17
17
  "files": [