@modern-js/repo-generator 0.0.0-next-20240923075127 → 0.0.0-next-20240925200803

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 +87 -68
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -16975,9 +16975,9 @@ var require_tar = __commonJS({
16975
16975
  }
16976
16976
  });
16977
16977
 
16978
- // ../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/utils.js
16978
+ // ../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/utils.js
16979
16979
  var require_utils = __commonJS({
16980
- "../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/utils.js"(exports) {
16980
+ "../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/utils.js"(exports) {
16981
16981
  "use strict";
16982
16982
  var regExpChars = /[|\\{}()[\]^$+*?.]/g;
16983
16983
  var hasOwnProperty7 = Object.prototype.hasOwnProperty;
@@ -17097,12 +17097,21 @@ function encode_char(c) {
17097
17097
  return {};
17098
17098
  };
17099
17099
  }();
17100
+ exports.hasOwnOnlyObject = function(obj) {
17101
+ var o = exports.createNullProtoObjWherePossible();
17102
+ for (var p in obj) {
17103
+ if (hasOwn(obj, p)) {
17104
+ o[p] = obj[p];
17105
+ }
17106
+ }
17107
+ return o;
17108
+ };
17100
17109
  }
17101
17110
  });
17102
17111
 
17103
- // ../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/package.json
17112
+ // ../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/package.json
17104
17113
  var require_package = __commonJS({
17105
- "../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/package.json"(exports, module2) {
17114
+ "../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/package.json"(exports, module2) {
17106
17115
  module2.exports = {
17107
17116
  name: "ejs",
17108
17117
  description: "Embedded JavaScript templates",
@@ -17111,7 +17120,7 @@ var require_package = __commonJS({
17111
17120
  "engine",
17112
17121
  "ejs"
17113
17122
  ],
17114
- version: "3.1.9",
17123
+ version: "3.1.10",
17115
17124
  author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
17116
17125
  license: "Apache-2.0",
17117
17126
  bin: {
@@ -17142,15 +17151,15 @@ var require_package = __commonJS({
17142
17151
  node: ">=0.10.0"
17143
17152
  },
17144
17153
  scripts: {
17145
- test: "mocha -u tdd"
17154
+ test: "npx jake test"
17146
17155
  }
17147
17156
  };
17148
17157
  }
17149
17158
  });
17150
17159
 
17151
- // ../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js
17160
+ // ../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/ejs.js
17152
17161
  var require_ejs = __commonJS({
17153
- "../../../../node_modules/.pnpm/ejs@3.1.9/node_modules/ejs/lib/ejs.js"(exports) {
17162
+ "../../../../node_modules/.pnpm/ejs@3.1.10/node_modules/ejs/lib/ejs.js"(exports) {
17154
17163
  "use strict";
17155
17164
  var fs11 = require("fs");
17156
17165
  var path17 = require("path");
@@ -17379,8 +17388,8 @@ var require_ejs = __commonJS({
17379
17388
  exports.clearCache = function() {
17380
17389
  exports.cache.reset();
17381
17390
  };
17382
- function Template(text, opts) {
17383
- opts = opts || utils.createNullProtoObjWherePossible();
17391
+ function Template(text, optsParam) {
17392
+ var opts = utils.hasOwnOnlyObject(optsParam);
17384
17393
  var options = utils.createNullProtoObjWherePossible();
17385
17394
  this.templateText = text;
17386
17395
  this.mode = null;
@@ -23565,9 +23574,9 @@ var require_lib = __commonJS({
23565
23574
  }
23566
23575
  });
23567
23576
 
23568
- // ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
23577
+ // ../../../../node_modules/.pnpm/@modern-js+utils@2.60.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
23569
23578
  var require_chalk = __commonJS({
23570
- "../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
23579
+ "../../../../node_modules/.pnpm/@modern-js+utils@2.60.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
23571
23580
  "use strict";
23572
23581
  (() => {
23573
23582
  var e = { 44: (e2, t2, n2) => {
@@ -69629,7 +69638,7 @@ __export(src_exports, {
69629
69638
  });
69630
69639
  module.exports = __toCommonJS(src_exports);
69631
69640
 
69632
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
69641
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
69633
69642
  var LoggerLevel;
69634
69643
  (function(LoggerLevel2) {
69635
69644
  LoggerLevel2["Error"] = "error";
@@ -69641,7 +69650,7 @@ var LoggerLevel;
69641
69650
  LoggerLevel2["Timing"] = "timing";
69642
69651
  })(LoggerLevel || (LoggerLevel = {}));
69643
69652
 
69644
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
69653
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
69645
69654
  var import_utils = require("@modern-js/utils");
69646
69655
  var import_debug = __toESM(require_src());
69647
69656
  var Logger = class {
@@ -69700,22 +69709,22 @@ var Logger = class {
69700
69709
  }
69701
69710
  };
69702
69711
 
69703
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
69712
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
69704
69713
  var import_path7 = __toESM(require("path"));
69705
69714
 
69706
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69715
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69707
69716
  var import_events = require("events");
69708
69717
  var import_path4 = __toESM(require("path"));
69709
69718
 
69710
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69719
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69711
69720
  var import_path2 = __toESM(require("path"));
69712
69721
  var import_utils3 = require("@modern-js/utils");
69713
69722
 
69714
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69723
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69715
69724
  var import_path = __toESM(require("path"));
69716
69725
  var import_utils2 = require("@modern-js/utils");
69717
69726
 
69718
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
69727
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
69719
69728
  var IMAGE_EXT_LIST = [
69720
69729
  ".jpg",
69721
69730
  ".jpeg",
@@ -69729,7 +69738,7 @@ var IMAGE_EXT_LIST = [
69729
69738
  ".wmf"
69730
69739
  ];
69731
69740
 
69732
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69741
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
69733
69742
  var FS_RESOURCE = "_codesmith_core_fs_resource";
69734
69743
  var FsResource = class {
69735
69744
  async value() {
@@ -69752,7 +69761,7 @@ var FsResource = class {
69752
69761
  }
69753
69762
  };
69754
69763
 
69755
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69764
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
69756
69765
  var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
69757
69766
  (0, import_utils3.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
69758
69767
  });
@@ -69777,11 +69786,11 @@ var FsMaterial = class {
69777
69786
  }
69778
69787
  };
69779
69788
 
69780
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69789
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69781
69790
  var import_path3 = __toESM(require("path"));
69782
69791
  var import_utils5 = require("@modern-js/utils");
69783
69792
 
69784
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69793
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
69785
69794
  var import_utils4 = require("@modern-js/utils");
69786
69795
  async function fsExists(path17) {
69787
69796
  try {
@@ -69792,7 +69801,7 @@ async function fsExists(path17) {
69792
69801
  }
69793
69802
  }
69794
69803
 
69795
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69804
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
69796
69805
  var MaxTimes = 5;
69797
69806
  async function getGeneratorDir(generator) {
69798
69807
  let result = generator;
@@ -69811,7 +69820,7 @@ async function getGeneratorDir(generator) {
69811
69820
  return result;
69812
69821
  }
69813
69822
 
69814
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69823
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
69815
69824
  var nodeRequire = (path17) => {
69816
69825
  try {
69817
69826
  const module2 = __non_webpack_require__(path17);
@@ -69828,7 +69837,7 @@ var nodeRequire = (path17) => {
69828
69837
  }
69829
69838
  };
69830
69839
 
69831
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69840
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
69832
69841
  var import_utils6 = require("@modern-js/utils");
69833
69842
  var GeneratorCore = class {
69834
69843
  get lifeCycleMethod() {
@@ -70025,10 +70034,10 @@ check path: ${import_utils6.chalk.blue.underline(generator)} exist a package.jso
70025
70034
  }
70026
70035
  };
70027
70036
 
70028
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
70037
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
70029
70038
  var import_path6 = __toESM(require("path"));
70030
70039
 
70031
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
70040
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
70032
70041
  var import_path5 = __toESM(require("path"));
70033
70042
  var import_utils7 = require("@modern-js/utils");
70034
70043
  async function canUseYarn() {
@@ -70108,7 +70117,7 @@ async function runInstall(targetDir, registryUrl, logger2) {
70108
70117
  }
70109
70118
  }
70110
70119
 
70111
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
70120
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
70112
70121
  async function timeoutPromise(promise, ms, reason = "Operation") {
70113
70122
  let timeoutId = null;
70114
70123
  const delayPromise = (ms2) => new Promise((resolve) => {
@@ -70130,14 +70139,14 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
70130
70139
  }
70131
70140
  }
70132
70141
 
70133
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
70142
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
70134
70143
  var import_os = __toESM(require("os"));
70135
70144
 
70136
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
70145
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
70137
70146
  var NPM_API_TIMEOUT = 3e4;
70138
70147
  var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
70139
70148
 
70140
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
70149
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
70141
70150
  var import_utils36 = require("@modern-js/utils");
70142
70151
 
70143
70152
  // ../../../../node_modules/.pnpm/axios@1.7.4_debug@4.3.7/node_modules/axios/lib/helpers/bind.js
@@ -73426,10 +73435,10 @@ var {
73426
73435
  mergeConfig: mergeConfig2
73427
73436
  } = axios_default;
73428
73437
 
73429
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
73438
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
73430
73439
  var import_tar = __toESM(require_tar());
73431
73440
 
73432
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
73441
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
73433
73442
  var import_utils34 = require("@modern-js/utils");
73434
73443
  async function getNpmTarballUrl(pkgName, pkgVersion, options) {
73435
73444
  const { registryUrl } = options || {};
@@ -73453,7 +73462,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
73453
73462
  }
73454
73463
  }
73455
73464
 
73456
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
73465
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
73457
73466
  var import_utils35 = require("@modern-js/utils");
73458
73467
  async function getNpmVersion(packageName, options) {
73459
73468
  const { version, registryUrl } = options || {};
@@ -73475,7 +73484,7 @@ async function getNpmVersion(packageName, options) {
73475
73484
  return stdout;
73476
73485
  }
73477
73486
 
73478
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
73487
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
73479
73488
  async function isValidCache(cacheDir) {
73480
73489
  if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
73481
73490
  const preCacheTimeStr = await import_utils36.fs.readFile(`${cacheDir}/.codesmith.completed`, {
@@ -73527,10 +73536,12 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
73527
73536
  const { registryUrl, install, logger: logger2 } = options;
73528
73537
  let version;
73529
73538
  if (!import_utils36.semver.valid(pkgVersion)) {
73539
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 get ${pkgName} version`);
73530
73540
  version = await getNpmVersion(pkgName, {
73531
73541
  registryUrl,
73532
73542
  version: pkgVersion
73533
73543
  });
73544
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 get ${pkgName} version`, true);
73534
73545
  if (version === void 0) {
73535
73546
  throw new Error(`package ${pkgName}@${pkgVersion} not found in registry`);
73536
73547
  }
@@ -73544,20 +73555,28 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
73544
73555
  }
73545
73556
  await import_utils36.fs.remove(targetDir);
73546
73557
  await import_utils36.fs.mkdirp(targetDir);
73558
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 get ${pkgName}@${version} tarball url`);
73547
73559
  const tarballPkg = await getNpmTarballUrl(pkgName, version, {
73548
73560
  registryUrl
73549
73561
  });
73562
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 get ${pkgName}@${version} tarball url`, true);
73563
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 download ${pkgName}@${version} tarball`);
73550
73564
  await downloadAndDecompressTargz(tarballPkg, targetDir);
73565
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 download ${pkgName}@${version} tarball`, true);
73551
73566
  if (install) {
73567
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 install ${pkgName}@${version}`);
73552
73568
  await runInstall(targetDir, registryUrl, logger2);
73569
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 install ${pkgName}@${version}`, true);
73553
73570
  }
73571
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 write ${pkgName}@${version} cache`);
73554
73572
  await import_utils36.fs.writeFile(`${targetDir}/.codesmith.completed`, (/* @__PURE__ */ new Date()).toISOString(), {
73555
73573
  encoding: "utf-8"
73556
73574
  });
73575
+ logger2 === null || logger2 === void 0 ? void 0 : logger2.timing(`🕒 write ${pkgName}@${version} cache`, true);
73557
73576
  return targetDir;
73558
73577
  }
73559
73578
 
73560
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
73579
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
73561
73580
  var import_utils37 = require("@modern-js/utils");
73562
73581
  function getPackageInfo(packageName) {
73563
73582
  if (!packageName) {
@@ -73582,7 +73601,7 @@ function getPackageInfo(packageName) {
73582
73601
  };
73583
73602
  }
73584
73603
 
73585
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
73604
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
73586
73605
  var MaterialsManager = class {
73587
73606
  loadLocalGenerator(generator) {
73588
73607
  if (!import_path6.default.isAbsolute(generator)) {
@@ -73611,7 +73630,7 @@ var MaterialsManager = class {
73611
73630
  }
73612
73631
  };
73613
73632
 
73614
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
73633
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
73615
73634
  var CodeSmith = class {
73616
73635
  async forge({ tasks, pwd }) {
73617
73636
  var _this_logger_timing, _this_logger;
@@ -73652,13 +73671,13 @@ var CodeSmith = class {
73652
73671
  }
73653
73672
  };
73654
73673
 
73655
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
73674
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
73656
73675
  var import_ejs = __toESM(require_ejs());
73657
73676
  function renderString(template, fullData) {
73658
73677
  return import_ejs.default.render(template, fullData) || "";
73659
73678
  }
73660
73679
 
73661
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
73680
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
73662
73681
  var EjsAPI = class {
73663
73682
  async renderTemplate(templateResource, target, parameters = {}) {
73664
73683
  if (templateResource._type !== FS_RESOURCE) {
@@ -73690,7 +73709,7 @@ var EjsAPI = class {
73690
73709
  }
73691
73710
  };
73692
73711
 
73693
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
73712
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
73694
73713
  var import_path8 = __toESM(require("path"));
73695
73714
  var import_utils40 = require("@modern-js/utils");
73696
73715
  var FsAPI = class {
@@ -73717,7 +73736,7 @@ var FsAPI = class {
73717
73736
  }
73718
73737
  };
73719
73738
 
73720
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
73739
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
73721
73740
  var import_utils41 = require("@modern-js/utils");
73722
73741
  async function canUseGit() {
73723
73742
  try {
@@ -73792,7 +73811,7 @@ async function gitCommit(cwd, commitMessage) {
73792
73811
  });
73793
73812
  }
73794
73813
 
73795
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
73814
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
73796
73815
  var GitAPI = class {
73797
73816
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
73798
73817
  const canUse = await canUseGit();
@@ -73842,7 +73861,7 @@ var GitAPI = class {
73842
73861
  }
73843
73862
  };
73844
73863
 
73845
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
73864
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
73846
73865
  var import_handlebars = __toESM(require_lib());
73847
73866
  function renderString2(template, fullData, registers) {
73848
73867
  const helpers = {
@@ -73856,7 +73875,7 @@ function renderString2(template, fullData, registers) {
73856
73875
  return import_handlebars.default.compile(template)(fullData) || "";
73857
73876
  }
73858
73877
 
73859
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.5.0_@modern-js+codesmith@2.5.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
73878
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.5.1_@modern-js+codesmith@2.5.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
73860
73879
  var HandlebarsAPI = class {
73861
73880
  async registerHelp(helpers) {
73862
73881
  this.registers.helpers = {
@@ -73904,7 +73923,7 @@ var HandlebarsAPI = class {
73904
73923
  }
73905
73924
  };
73906
73925
 
73907
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
73926
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
73908
73927
  var import_utils44 = require("@modern-js/utils");
73909
73928
  async function canUseNvm() {
73910
73929
  try {
@@ -73954,7 +73973,7 @@ async function canUsePnpm2() {
73954
73973
  }
73955
73974
  }
73956
73975
 
73957
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
73976
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
73958
73977
  var import_utils45 = require("@modern-js/utils");
73959
73978
  function execaWithStreamLog(command, args, options) {
73960
73979
  const promise = (0, import_utils45.execa)(command, args, {
@@ -74050,7 +74069,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
74050
74069
  throw new Error("please install pnpm first");
74051
74070
  }
74052
74071
 
74053
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
74072
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.5.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
74054
74073
  var NpmAPI = class {
74055
74074
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
74056
74075
  return npmInstall({
@@ -74078,7 +74097,7 @@ var NpmAPI = class {
74078
74097
  }
74079
74098
  };
74080
74099
 
74081
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
74100
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
74082
74101
  var import_lodash2 = require("@modern-js/utils/lodash");
74083
74102
 
74084
74103
  // ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
@@ -83713,10 +83732,10 @@ var Schema = (
83713
83732
  }()
83714
83733
  );
83715
83734
 
83716
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
83735
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
83717
83736
  var import_inquirer = __toESM(require_inquirer());
83718
83737
 
83719
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
83738
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
83720
83739
  var import_lodash = require("@modern-js/utils/lodash");
83721
83740
  function validateSchema(schema) {
83722
83741
  const { type, properties } = schema;
@@ -83808,7 +83827,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
83808
83827
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
83809
83828
  }
83810
83829
 
83811
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
83830
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
83812
83831
  var compileRule = (rule, scope) => {
83813
83832
  const state = Schema.compile(rule, {
83814
83833
  $self: {},
@@ -83912,7 +83931,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
83912
83931
  return answers;
83913
83932
  }
83914
83933
 
83915
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
83934
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
83916
83935
  var CLIReader = class {
83917
83936
  getAnswers() {
83918
83937
  return this.answers;
@@ -83941,7 +83960,7 @@ var CLIReader = class {
83941
83960
  }
83942
83961
  };
83943
83962
 
83944
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
83963
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
83945
83964
  var FormilyAPI = class {
83946
83965
  mergeAnswers(answers, configValue) {
83947
83966
  const inputData = (0, import_lodash2.merge)(answers, configValue);
@@ -83963,16 +83982,16 @@ var FormilyAPI = class {
83963
83982
  }
83964
83983
  };
83965
83984
 
83966
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83985
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
83967
83986
  var import_utils49 = require("@modern-js/utils");
83968
83987
  var import_lodash6 = require("@modern-js/utils/lodash");
83969
83988
  var import_comment_json = __toESM(require_src3());
83970
83989
  var import_inquirer3 = __toESM(require_inquirer2());
83971
83990
 
83972
- // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.58.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
83991
+ // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.60.1/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
83973
83992
  var import_lodash4 = require("@modern-js/utils/lodash");
83974
83993
 
83975
- // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.58.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/utils/index.js
83994
+ // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.60.1/node_modules/@modern-js/plugin-i18n/dist/esm-node/utils/index.js
83976
83995
  var import_lodash3 = require("@modern-js/utils/lodash");
83977
83996
  function getObjKeyMap(obj, prefix = "") {
83978
83997
  const result = {};
@@ -83986,7 +84005,7 @@ function getObjKeyMap(obj, prefix = "") {
83986
84005
  return result;
83987
84006
  }
83988
84007
 
83989
- // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.58.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
84008
+ // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.60.1/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
83990
84009
  var I18n = class {
83991
84010
  format(msg, vars) {
83992
84011
  return msg.replace(/\{(\w+)\}/g, (_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture);
@@ -84032,7 +84051,7 @@ var I18n = class {
84032
84051
  }
84033
84052
  };
84034
84053
 
84035
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
84054
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
84036
84055
  var EN_LOCALE = {
84037
84056
  environment: {
84038
84057
  node_version: "please upgrade node to lts version",
@@ -84059,7 +84078,7 @@ var EN_LOCALE = {
84059
84078
  }
84060
84079
  };
84061
84080
 
84062
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
84081
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
84063
84082
  var ZH_LOCALE = {
84064
84083
  environment: {
84065
84084
  node_version: "请升级 Node 版本至 LIS",
@@ -84086,14 +84105,14 @@ var ZH_LOCALE = {
84086
84105
  }
84087
84106
  };
84088
84107
 
84089
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
84108
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
84090
84109
  var i18n = new I18n();
84091
84110
  var localeKeys = i18n.init("zh", {
84092
84111
  zh: ZH_LOCALE,
84093
84112
  en: EN_LOCALE
84094
84113
  });
84095
84114
 
84096
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
84115
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
84097
84116
  var import_path10 = __toESM(require("path"));
84098
84117
  var import_utils48 = require("@modern-js/utils");
84099
84118
  var NODE_MAJOR_VERSION_MAP = {
@@ -84141,7 +84160,7 @@ async function checkUseNvm(cwd, logger2) {
84141
84160
  }
84142
84161
  }
84143
84162
 
84144
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
84163
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
84145
84164
  var import_lodash5 = require("@modern-js/utils/lodash");
84146
84165
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
84147
84166
  for (const question of questions) {
@@ -84169,7 +84188,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
84169
84188
  return questions;
84170
84189
  }
84171
84190
 
84172
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.0_@modern-js+codesmith@2.5.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
84191
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.5.1_@modern-js+codesmith@2.5.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
84173
84192
  var AppAPI = class {
84174
84193
  async checkEnvironment(nodeVersion) {
84175
84194
  if (import_utils49.semver.lt(process.versions.node, nodeVersion || "16.20.2")) {
@@ -85656,11 +85675,11 @@ function _create_class(Constructor, protoProps, staticProps) {
85656
85675
  // ../../generator-plugin/dist/esm/context/file.js
85657
85676
  var import_path14 = __toESM(require("path"));
85658
85677
 
85659
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
85678
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
85660
85679
  var import_comment_json2 = __toESM(require_src3());
85661
85680
  var declarationUpdate = __toESM(require_dist());
85662
85681
 
85663
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
85682
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
85664
85683
  async function editJson(generatorCore, resource, getNewJsonValue) {
85665
85684
  const originJsonValue = await resource.value();
85666
85685
  const newJsonString = await getNewJsonValue(originJsonValue.content);
@@ -85673,7 +85692,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
85673
85692
  return newJsonString;
85674
85693
  }
85675
85694
 
85676
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.0/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
85695
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.5.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
85677
85696
  var JsonAPI = class {
85678
85697
  async get(resource) {
85679
85698
  const originJsonValue = await resource.value();
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20240923075127",
18
+ "version": "0.0.0-next-20240925200803",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,23 +23,23 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "0.0.0-next-20240923075127"
26
+ "@modern-js/utils": "0.0.0-next-20240925200803"
27
27
  },
28
28
  "devDependencies": {
29
- "@modern-js/codesmith": "2.5.0",
30
- "@modern-js/codesmith-api-app": "2.5.0",
29
+ "@modern-js/codesmith": "2.5.1",
30
+ "@modern-js/codesmith-api-app": "2.5.1",
31
31
  "@types/jest": "^29",
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/base-generator": "0.0.0-next-20240923075127",
36
- "@modern-js/generator-common": "0.0.0-next-20240923075127",
37
- "@modern-js/generator-plugin": "0.0.0-next-20240923075127",
38
- "@modern-js/generator-utils": "0.0.0-next-20240923075127",
39
- "@modern-js/mwa-generator": "0.0.0-next-20240923075127",
40
- "@modern-js/module-generator": "0.0.0-next-20240923075127",
41
- "@scripts/build": "0.0.0-next-20240923075127",
42
- "@scripts/jest-config": "0.0.0-next-20240923075127"
35
+ "@modern-js/base-generator": "0.0.0-next-20240925200803",
36
+ "@modern-js/generator-common": "0.0.0-next-20240925200803",
37
+ "@modern-js/generator-plugin": "0.0.0-next-20240925200803",
38
+ "@modern-js/generator-utils": "0.0.0-next-20240925200803",
39
+ "@modern-js/module-generator": "0.0.0-next-20240925200803",
40
+ "@modern-js/mwa-generator": "0.0.0-next-20240925200803",
41
+ "@scripts/build": "0.0.0-next-20240925200803",
42
+ "@scripts/jest-config": "0.0.0-next-20240925200803"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {