@modern-js/mwa-generator 3.1.9 → 3.1.10

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.
Files changed (2) hide show
  1. package/dist/index.js +170 -123
  2. package/package.json +16 -12
package/dist/index.js CHANGED
@@ -133982,26 +133982,29 @@ function getObjKeyMap2(obj, prefix = "") {
133982
133982
  if ((0, import_lodash6.isString)(obj[key])) {
133983
133983
  result[key] = prefix ? `${prefix}.${key}` : key;
133984
133984
  } else if ((0, import_lodash6.isObject)(obj[key])) {
133985
- result[key] = getObjKeyMap2(
133986
- obj[key],
133987
- prefix ? `${prefix}.${key}` : key
133988
- );
133985
+ result[key] = getObjKeyMap2(obj[key], prefix ? `${prefix}.${key}` : key);
133989
133986
  }
133990
133987
  });
133991
133988
  return result;
133992
133989
  }
133993
133990
 
133994
133991
  // ../../../cli/plugin-i18n/dist/esm-node/index.js
133995
- var I18n2 = class {
133996
- constructor() {
133997
- this.language = "en";
133998
- this.languageMap = {};
133992
+ function _define_property(obj, key, value) {
133993
+ if (key in obj) {
133994
+ Object.defineProperty(obj, key, {
133995
+ value,
133996
+ enumerable: true,
133997
+ configurable: true,
133998
+ writable: true
133999
+ });
134000
+ } else {
134001
+ obj[key] = value;
133999
134002
  }
134003
+ return obj;
134004
+ }
134005
+ var I18n2 = class {
134000
134006
  format(msg, vars) {
134001
- return msg.replace(
134002
- /\{(\w+)\}/g,
134003
- (_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture
134004
- );
134007
+ return msg.replace(/\{(\w+)\}/g, (_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture);
134005
134008
  }
134006
134009
  getMessage(lang, key, vars, fallbackText) {
134007
134010
  const languages = Object.keys(this.languageMap);
@@ -134038,6 +134041,10 @@ var I18n2 = class {
134038
134041
  t: (key, vars, fallbackText) => this.getMessage(lang, key, vars, fallbackText)
134039
134042
  };
134040
134043
  }
134044
+ constructor() {
134045
+ _define_property(this, "language", "en");
134046
+ _define_property(this, "languageMap", {});
134047
+ }
134041
134048
  };
134042
134049
 
134043
134050
  // ../../generator-common/dist/esm-node/locale/zh.js
@@ -134237,61 +134244,81 @@ var EN_LOCALE2 = {
134237
134244
 
134238
134245
  // ../../generator-common/dist/esm-node/locale/index.js
134239
134246
  var i18n2 = new I18n2();
134240
- var localeKeys2 = i18n2.init("en", { zh: ZH_LOCALE2, en: EN_LOCALE2 });
134247
+ var localeKeys2 = i18n2.init("en", {
134248
+ zh: ZH_LOCALE2,
134249
+ en: EN_LOCALE2
134250
+ });
134241
134251
 
134242
134252
  // ../../generator-common/dist/esm-node/common/boolean.js
134243
- var BooleanConfig = /* @__PURE__ */ ((BooleanConfig2) => {
134253
+ var BooleanConfig;
134254
+ (function(BooleanConfig2) {
134244
134255
  BooleanConfig2["NO"] = "no";
134245
134256
  BooleanConfig2["YES"] = "yes";
134246
- return BooleanConfig2;
134247
- })(BooleanConfig || {});
134257
+ })(BooleanConfig || (BooleanConfig = {}));
134258
+ var BooleanConfigName = {
134259
+ [BooleanConfig.NO]: () => i18n2.t(localeKeys2.boolean.no),
134260
+ [BooleanConfig.YES]: () => i18n2.t(localeKeys2.boolean.yes)
134261
+ };
134248
134262
 
134249
134263
  // ../../generator-common/dist/esm-node/common/solution.js
134250
- var Solution = /* @__PURE__ */ ((Solution2) => {
134264
+ var Solution;
134265
+ (function(Solution2) {
134251
134266
  Solution2["MWA"] = "mwa";
134252
134267
  Solution2["Module"] = "module";
134253
134268
  Solution2["Doc"] = "doc";
134254
134269
  Solution2["Monorepo"] = "monorepo";
134255
- return Solution2;
134256
- })(Solution || {});
134270
+ })(Solution || (Solution = {}));
134271
+ var SubSolution;
134272
+ (function(SubSolution2) {
134273
+ SubSolution2["MWA"] = "mwa";
134274
+ SubSolution2["MWATest"] = "mwa_test";
134275
+ SubSolution2["Module"] = "module";
134276
+ SubSolution2["InnerModule"] = "inner_module";
134277
+ })(SubSolution || (SubSolution = {}));
134278
+ var SolutionText = {
134279
+ [Solution.MWA]: () => i18n2.t(localeKeys2.solution.mwa),
134280
+ [Solution.Module]: () => i18n2.t(localeKeys2.solution.module),
134281
+ [Solution.Doc]: () => i18n2.t(localeKeys2.solution.doc),
134282
+ [Solution.Monorepo]: () => i18n2.t(localeKeys2.solution.monorepo)
134283
+ };
134284
+ var SubSolutionText = {
134285
+ [SubSolution.MWA]: () => i18n2.t(localeKeys2.sub_solution.mwa),
134286
+ [SubSolution.MWATest]: () => i18n2.t(localeKeys2.sub_solution.mwa_test),
134287
+ [SubSolution.Module]: () => i18n2.t(localeKeys2.sub_solution.module),
134288
+ [SubSolution.InnerModule]: () => i18n2.t(localeKeys2.sub_solution.inner_module)
134289
+ };
134257
134290
  var SolutionToolsMap = {
134258
- [
134259
- "mwa"
134260
- /* MWA */
134261
- ]: "@modern-js/app-tools",
134262
- [
134263
- "module"
134264
- /* Module */
134265
- ]: "@modern-js/module-tools",
134266
- [
134267
- "doc"
134268
- /* Doc */
134269
- ]: "@modern-js/doc-tools",
134270
- [
134271
- "monorepo"
134272
- /* Monorepo */
134273
- ]: "@modern-js/monorepo-tools"
134291
+ [Solution.MWA]: "@modern-js/app-tools",
134292
+ [Solution.Module]: "@modern-js/module-tools",
134293
+ [Solution.Doc]: "@modern-js/doc-tools",
134294
+ [Solution.Monorepo]: "@modern-js/monorepo-tools"
134274
134295
  };
134275
134296
  var BaseGenerator = "@modern-js/base-generator";
134276
134297
  var PackagesGenerator = "@modern-js/packages-generator";
134277
134298
  var RspackGenerator = "@modern-js/rspack-generator";
134299
+ var SolutionGenerator = {
134300
+ [Solution.MWA]: "@modern-js/mwa-generator",
134301
+ [Solution.Module]: "@modern-js/module-generator",
134302
+ [Solution.Doc]: "@modern-js/doc-generator",
134303
+ [Solution.Monorepo]: "@modern-js/monorepo-generator"
134304
+ };
134305
+ var SubSolutionGenerator = {
134306
+ [SubSolution.MWA]: "@modern-js/mwa-generator",
134307
+ [SubSolution.MWATest]: "@modern-js/mwa-generator",
134308
+ [SubSolution.Module]: "@modern-js/module-generator",
134309
+ [SubSolution.InnerModule]: "@modern-js/module-generator"
134310
+ };
134278
134311
  var EntryGenerator = "@modern-js/entry-generator";
134279
134312
 
134280
134313
  // ../../generator-common/dist/esm-node/common/language.js
134281
- var Language = /* @__PURE__ */ ((Language2) => {
134314
+ var Language;
134315
+ (function(Language2) {
134282
134316
  Language2["TS"] = "ts";
134283
134317
  Language2["JS"] = "js";
134284
- return Language2;
134285
- })(Language || {});
134318
+ })(Language || (Language = {}));
134286
134319
  var LanguageName = {
134287
- [
134288
- "ts"
134289
- /* TS */
134290
- ]: "TS",
134291
- [
134292
- "js"
134293
- /* JS */
134294
- ]: "ES6+"
134320
+ [Language.TS]: "TS",
134321
+ [Language.JS]: "ES6+"
134295
134322
  };
134296
134323
  var getLanguageSchema = (_extra = {}) => {
134297
134324
  return {
@@ -134305,33 +134332,24 @@ var getLanguageSchema = (_extra = {}) => {
134305
134332
  };
134306
134333
 
134307
134334
  // ../../generator-common/dist/esm-node/common/packageManager.js
134308
- var PackageManager = /* @__PURE__ */ ((PackageManager2) => {
134335
+ var PackageManager;
134336
+ (function(PackageManager2) {
134309
134337
  PackageManager2["Pnpm"] = "pnpm";
134310
134338
  PackageManager2["Yarn"] = "yarn";
134311
134339
  PackageManager2["Npm"] = "npm";
134312
- return PackageManager2;
134313
- })(PackageManager || {});
134340
+ })(PackageManager || (PackageManager = {}));
134314
134341
  var PackageManagerName = {
134315
- [
134316
- "pnpm"
134317
- /* Pnpm */
134318
- ]: "pnpm",
134319
- [
134320
- "yarn"
134321
- /* Yarn */
134322
- ]: "Yarn",
134323
- [
134324
- "npm"
134325
- /* Npm */
134326
- ]: "npm"
134342
+ [PackageManager.Pnpm]: "pnpm",
134343
+ [PackageManager.Yarn]: "Yarn",
134344
+ [PackageManager.Npm]: "npm"
134327
134345
  };
134328
134346
  var getPackageManagerSchema = (extra = {}) => {
134329
134347
  return {
134330
134348
  type: "string",
134331
134349
  title: i18n2.t(localeKeys2.packageManager.self),
134332
- enum: Object.values(PackageManager).filter(
134333
- (packageManager) => (extra == null ? void 0 : extra.solution) === "monorepo" ? packageManager !== "npm" : true
134334
- ).map((packageManager) => ({
134350
+ enum: Object.values(PackageManager).filter((packageManager) => {
134351
+ return (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true;
134352
+ }).map((packageManager) => ({
134335
134353
  value: packageManager,
134336
134354
  label: PackageManagerName[packageManager]
134337
134355
  })),
@@ -134340,7 +134358,7 @@ var getPackageManagerSchema = (extra = {}) => {
134340
134358
  dependencies: [],
134341
134359
  fulfill: {
134342
134360
  state: {
134343
- visible: !(extra == null ? void 0 : extra.isMonorepoSubProject) && !(extra == null ? void 0 : extra.isSubProject)
134361
+ visible: !(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) && !(extra === null || extra === void 0 ? void 0 : extra.isSubProject)
134344
134362
  }
134345
134363
  }
134346
134364
  }
@@ -134352,13 +134370,13 @@ var getPackageManagerSchema = (extra = {}) => {
134352
134370
  var getPackageNameSchema = (extra = {}) => {
134353
134371
  return {
134354
134372
  type: "string",
134355
- title: (extra == null ? void 0 : extra.isMonorepoSubProject) ? i18n2.t(localeKeys2.packageName.sub_name) : i18n2.t(localeKeys2.packageName.self),
134373
+ title: (extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? i18n2.t(localeKeys2.packageName.sub_name) : i18n2.t(localeKeys2.packageName.self),
134356
134374
  "x-reactions": [
134357
134375
  {
134358
134376
  dependencies: [],
134359
134377
  fulfill: {
134360
134378
  state: {
134361
- visible: Boolean(extra == null ? void 0 : extra.isMonorepoSubProject) || !(extra == null ? void 0 : extra.isMwa) && !(extra == null ? void 0 : extra.isDoc)
134379
+ visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) || !(extra === null || extra === void 0 ? void 0 : extra.isMwa) && !(extra === null || extra === void 0 ? void 0 : extra.isDoc)
134362
134380
  }
134363
134381
  }
134364
134382
  }
@@ -134373,20 +134391,20 @@ var getPackageNameSchema = (extra = {}) => {
134373
134391
  };
134374
134392
 
134375
134393
  // ../../generator-common/dist/esm-node/common/packagePath.js
134376
- var PackagePathRegex = new RegExp(
134377
- "^[a-z0-9]*[-_/]?([a-z0-9]*[-_]?[a-z0-9]*)*[-_/]?[a-z0-9-_]+$"
134378
- );
134394
+ var PackagePathRegex = new RegExp("^[a-z0-9-_]+[a-z0-9-/_]*$");
134379
134395
  var getPackagePathSchema = (extra) => {
134380
134396
  return {
134381
134397
  type: "string",
134382
134398
  title: i18n2.t(localeKeys2.packagePath.self),
134383
134399
  "x-reactions": [
134384
134400
  {
134385
- dependencies: ["packageName"],
134401
+ dependencies: [
134402
+ "packageName"
134403
+ ],
134386
134404
  fulfill: {
134387
134405
  state: {
134388
134406
  value: "{{$deps[0]}}",
134389
- visible: Boolean(extra == null ? void 0 : extra.isMonorepoSubProject)
134407
+ visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject)
134390
134408
  }
134391
134409
  }
134392
134410
  }
@@ -134404,11 +134422,16 @@ var getPackagePathSchema = (extra) => {
134404
134422
  };
134405
134423
 
134406
134424
  // ../../generator-common/dist/esm-node/mwa/common.js
134407
- var BuildTools = /* @__PURE__ */ ((BuildTools2) => {
134425
+ var Framework;
134426
+ (function(Framework2) {
134427
+ Framework2["Express"] = "express";
134428
+ Framework2["Koa"] = "koa";
134429
+ })(Framework || (Framework = {}));
134430
+ var BuildTools;
134431
+ (function(BuildTools2) {
134408
134432
  BuildTools2["Webpack"] = "webpack";
134409
134433
  BuildTools2["Rspack"] = "rspack";
134410
- return BuildTools2;
134411
- })(BuildTools || {});
134434
+ })(BuildTools || (BuildTools = {}));
134412
134435
  var getBuildToolsSchema = (_extra = {}) => {
134413
134436
  return {
134414
134437
  type: "string",
@@ -134419,6 +134442,10 @@ var getBuildToolsSchema = (_extra = {}) => {
134419
134442
  }))
134420
134443
  };
134421
134444
  };
134445
+ var FrameworkAppendTypeContent = {
134446
+ [Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />`,
134447
+ [Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />`
134448
+ };
134422
134449
 
134423
134450
  // ../../generator-common/dist/esm-node/mwa/project.js
134424
134451
  var getMWASchemaProperties = (extra) => {
@@ -134451,7 +134478,9 @@ var lazy = (moduleName, requireFn) => {
134451
134478
  const importLazyLocal = require_import_lazy2()(requireFn);
134452
134479
  return importLazyLocal(moduleName);
134453
134480
  };
134454
- var Import = { lazy };
134481
+ var Import = {
134482
+ lazy
134483
+ };
134455
134484
 
134456
134485
  // ../../../toolkit/utils/dist/esm/compiled.js
134457
134486
  var import_fs_extra = __toESM(require_fs_extra2());
@@ -134483,18 +134512,9 @@ var import_browserslist = __toESM(require_browserslist2());
134483
134512
  var import_recursive_readdir = __toESM(require_recursive_readdir2());
134484
134513
  var import_commander = __toESM(require_commander2());
134485
134514
  var import_signale2 = __toESM(require_signale2());
134486
- var mime = Import.lazy(
134487
- "../compiled/mime-types",
134488
- require
134489
- );
134490
- var chokidar = Import.lazy(
134491
- "../compiled/chokidar",
134492
- require
134493
- );
134494
- var inquirer3 = Import.lazy(
134495
- "../compiled/inquirer",
134496
- require
134497
- );
134515
+ var mime = Import.lazy("../compiled/mime-types", require);
134516
+ var chokidar = Import.lazy("../compiled/chokidar", require);
134517
+ var inquirer3 = Import.lazy("../compiled/inquirer", require);
134498
134518
 
134499
134519
  // ../../../toolkit/utils/dist/esm/monorepo.js
134500
134520
  var import_fs = __toESM(require("fs"));
@@ -134506,44 +134526,36 @@ var WORKSPACE_FILES = {
134506
134526
  };
134507
134527
  var isLerna = (root) => import_fs.default.existsSync(import_path5.default.join(root, WORKSPACE_FILES.LERNA));
134508
134528
  var isYarnWorkspaces = (root) => {
134509
- var _a2;
134529
+ var _json_workspaces;
134510
134530
  const pkg = import_path5.default.join(root, WORKSPACE_FILES.YARN);
134511
134531
  if (!import_fs.default.existsSync(pkg)) {
134512
134532
  return false;
134513
134533
  }
134514
134534
  const json = JSON.parse(import_fs.default.readFileSync(pkg, "utf8"));
134515
- return Boolean((_a2 = json.workspaces) == null ? void 0 : _a2.packages);
134535
+ return Boolean((_json_workspaces = json.workspaces) === null || _json_workspaces === void 0 ? void 0 : _json_workspaces.packages);
134516
134536
  };
134517
134537
  var getMonorepoPackages = (root) => {
134518
134538
  let packages = [];
134519
134539
  if (isYarnWorkspaces(root)) {
134520
- const json = JSON.parse(
134521
- import_fs.default.readFileSync(import_path5.default.join(root, "package.json"), "utf8")
134522
- );
134540
+ const json = JSON.parse(import_fs.default.readFileSync(import_path5.default.join(root, "package.json"), "utf8"));
134523
134541
  ({ packages } = json.workspaces);
134524
134542
  } else if (isLerna(root)) {
134525
- const json = JSON.parse(
134526
- import_fs.default.readFileSync(import_path5.default.resolve(root, "lerna.json"), "utf8")
134527
- );
134543
+ const json = JSON.parse(import_fs.default.readFileSync(import_path5.default.resolve(root, "lerna.json"), "utf8"));
134528
134544
  ({ packages } = json);
134529
134545
  } else {
134530
- ({ packages } = import_js_yaml.default.load(
134531
- import_fs.default.readFileSync(import_path5.default.join(root, WORKSPACE_FILES.PNPM), "utf8")
134532
- ));
134546
+ ({ packages } = import_js_yaml.default.load(import_fs.default.readFileSync(import_path5.default.join(root, WORKSPACE_FILES.PNPM), "utf8")));
134533
134547
  }
134534
134548
  if (packages) {
134535
- return packages.map(
134536
- (name) => (
134537
- // The trailing / ensures only dirs are picked up
134538
- import_glob.default.sync(import_path5.default.join(root, `${name}/`), {
134539
- ignore: ["**/node_modules/**"]
134540
- })
134541
- )
134542
- ).reduce((acc, val) => acc.concat(val), []).filter((filepath) => import_fs.default.existsSync(import_path5.default.resolve(filepath, "package.json"))).map((filepath) => ({
134549
+ return packages.map((name) => (
134550
+ // The trailing / ensures only dirs are picked up
134551
+ import_glob.default.sync(import_path5.default.join(root, `${name}/`), {
134552
+ ignore: [
134553
+ "**/node_modules/**"
134554
+ ]
134555
+ })
134556
+ )).reduce((acc, val) => acc.concat(val), []).filter((filepath) => import_fs.default.existsSync(import_path5.default.resolve(filepath, "package.json"))).map((filepath) => ({
134543
134557
  path: filepath,
134544
- name: JSON.parse(
134545
- import_fs.default.readFileSync(import_path5.default.resolve(filepath, "package.json"), "utf8")
134546
- ).name
134558
+ name: JSON.parse(import_fs.default.readFileSync(import_path5.default.resolve(filepath, "package.json"), "utf8")).name
134547
134559
  }));
134548
134560
  }
134549
134561
  return [];
@@ -134553,7 +134565,11 @@ var getMonorepoPackages = (root) => {
134553
134565
  function canUseNpm2() {
134554
134566
  return __async(this, null, function* () {
134555
134567
  try {
134556
- yield (0, import_execa.default)("npm", ["--version"], { env: process.env });
134568
+ yield (0, import_execa.default)("npm", [
134569
+ "--version"
134570
+ ], {
134571
+ env: process.env
134572
+ });
134557
134573
  return true;
134558
134574
  } catch (e) {
134559
134575
  return false;
@@ -134563,7 +134579,11 @@ function canUseNpm2() {
134563
134579
  function canUsePnpm2() {
134564
134580
  return __async(this, null, function* () {
134565
134581
  try {
134566
- yield (0, import_execa.default)("pnpm", ["--version"], { env: process.env });
134582
+ yield (0, import_execa.default)("pnpm", [
134583
+ "--version"
134584
+ ], {
134585
+ env: process.env
134586
+ });
134567
134587
  return true;
134568
134588
  } catch (e) {
134569
134589
  return false;
@@ -134588,19 +134608,30 @@ function stripAnsi3(string) {
134588
134608
 
134589
134609
  // ../../generator-utils/dist/esm/locale/zh.js
134590
134610
  var ZH_LOCALE3 = {
134591
- packageName: { exit: "项目名称 {value} 已存在" },
134592
- packagePath: { exit: "目录 {value} 已存在" }
134611
+ packageName: {
134612
+ exit: "项目名称 {value} 已存在"
134613
+ },
134614
+ packagePath: {
134615
+ exit: "目录 {value} 已存在"
134616
+ }
134593
134617
  };
134594
134618
 
134595
134619
  // ../../generator-utils/dist/esm/locale/en.js
134596
134620
  var EN_LOCALE3 = {
134597
- packageName: { exit: "package name `{value}` is already exists" },
134598
- packagePath: { exit: "package path {value} is already exists" }
134621
+ packageName: {
134622
+ exit: "package name `{value}` is already exists"
134623
+ },
134624
+ packagePath: {
134625
+ exit: "package path {value} is already exists"
134626
+ }
134599
134627
  };
134600
134628
 
134601
134629
  // ../../generator-utils/dist/esm/locale/index.js
134602
134630
  var i18n3 = new I18n2();
134603
- var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
134631
+ var localeKeys3 = i18n3.init("en", {
134632
+ zh: ZH_LOCALE3,
134633
+ en: EN_LOCALE3
134634
+ });
134604
134635
 
134605
134636
  // ../../generator-utils/dist/esm/index.js
134606
134637
  function getPackageVersion(packageName, registry2) {
@@ -134610,7 +134641,11 @@ function getPackageVersion(packageName, registry2) {
134610
134641
  spinner: "runner"
134611
134642
  }).start();
134612
134643
  if (yield canUsePnpm2()) {
134613
- const args = ["info", packageName, "version"];
134644
+ const args = [
134645
+ "info",
134646
+ packageName,
134647
+ "version"
134648
+ ];
134614
134649
  if (registry2) {
134615
134650
  args.push(`--registry=${registry2}`);
134616
134651
  }
@@ -134619,7 +134654,11 @@ function getPackageVersion(packageName, registry2) {
134619
134654
  return stripAnsi3(result.stdout);
134620
134655
  }
134621
134656
  if (yield canUseNpm2()) {
134622
- const args = ["view", packageName, "version"];
134657
+ const args = [
134658
+ "view",
134659
+ packageName,
134660
+ "version"
134661
+ ];
134623
134662
  if (registry2) {
134624
134663
  args.push(`--registry=${registry2}`);
134625
134664
  }
@@ -134650,10 +134689,14 @@ function validatePackageName(value, packages, options) {
134650
134689
  if (isMonorepoSubProject && packages.includes(value)) {
134651
134690
  return {
134652
134691
  success: false,
134653
- error: i18n3.t(localeKeys3.packageName.exit, { value })
134692
+ error: i18n3.t(localeKeys3.packageName.exit, {
134693
+ value
134694
+ })
134654
134695
  };
134655
134696
  }
134656
- return { success: true };
134697
+ return {
134698
+ success: true
134699
+ };
134657
134700
  }
134658
134701
  function validatePackagePath(value, projectDir, options) {
134659
134702
  const { isMwa, isPublic, isTest, isDoc } = options || {};
@@ -134669,10 +134712,14 @@ function validatePackagePath(value, projectDir, options) {
134669
134712
  if (import_fs_extra.default.existsSync(packageDir)) {
134670
134713
  return {
134671
134714
  success: false,
134672
- error: i18n3.t(localeKeys3.packagePath.exit, { value })
134715
+ error: i18n3.t(localeKeys3.packagePath.exit, {
134716
+ value
134717
+ })
134673
134718
  };
134674
134719
  }
134675
- return { success: true };
134720
+ return {
134721
+ success: true
134722
+ };
134676
134723
  }
134677
134724
  function getMWAProjectPath(packagePath, isMonorepoSubProject, isTest = false) {
134678
134725
  if (isMonorepoSubProject && packagePath) {
package/package.json CHANGED
@@ -3,7 +3,11 @@
3
3
  "description": "A Progressive React Framework for modern web development.",
4
4
  "homepage": "https://modernjs.dev",
5
5
  "bugs": "https://github.com/web-infra-dev/modern.js/issues",
6
- "repository": "web-infra-dev/modern.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/web-infra-dev/modern.js",
9
+ "directory": "packages/generator/generators/mwa-generator"
10
+ },
7
11
  "license": "MIT",
8
12
  "keywords": [
9
13
  "react",
@@ -11,7 +15,7 @@
11
15
  "modern",
12
16
  "modern.js"
13
17
  ],
14
- "version": "3.1.9",
18
+ "version": "3.1.10",
15
19
  "jsnext:source": "./src/index.ts",
16
20
  "main": "./dist/index.js",
17
21
  "files": [
@@ -27,16 +31,16 @@
27
31
  "@types/node": "^14",
28
32
  "jest": "^29",
29
33
  "typescript": "^4",
30
- "@modern-js/base-generator": "3.1.9",
31
- "@modern-js/dependence-generator": "3.1.9",
32
- "@modern-js/entry-generator": "3.1.9",
33
- "@modern-js/generator-common": "3.1.9",
34
- "@modern-js/generator-utils": "3.1.9",
35
- "@modern-js/packages-generator": "3.1.9",
36
- "@modern-js/rspack-generator": "3.1.9",
37
- "@modern-js/plugin-i18n": "2.15.0",
38
- "@scripts/build": "2.15.0",
39
- "@scripts/jest-config": "2.15.0"
34
+ "@modern-js/base-generator": "3.1.10",
35
+ "@modern-js/dependence-generator": "3.1.10",
36
+ "@modern-js/entry-generator": "3.1.10",
37
+ "@modern-js/generator-common": "3.1.10",
38
+ "@modern-js/generator-utils": "3.1.10",
39
+ "@modern-js/packages-generator": "3.1.10",
40
+ "@modern-js/rspack-generator": "3.1.10",
41
+ "@modern-js/plugin-i18n": "2.16.0",
42
+ "@scripts/build": "2.16.0",
43
+ "@scripts/jest-config": "2.16.0"
40
44
  },
41
45
  "sideEffects": false,
42
46
  "publishConfig": {