@modern-js/repo-generator 0.0.0-next-20241016025808 → 0.0.0-next-20241016073741

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 +65 -54
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -33203,7 +33203,7 @@ __export(src_exports, {
33203
33203
  });
33204
33204
  module.exports = __toCommonJS(src_exports);
33205
33205
 
33206
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
33206
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
33207
33207
  var LoggerLevel;
33208
33208
  (function(LoggerLevel2) {
33209
33209
  LoggerLevel2["Error"] = "error";
@@ -33215,10 +33215,10 @@ var LoggerLevel;
33215
33215
  LoggerLevel2["Timing"] = "timing";
33216
33216
  })(LoggerLevel || (LoggerLevel = {}));
33217
33217
 
33218
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js
33218
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js
33219
33219
  var import_chalk = __toESM(require_source());
33220
33220
 
33221
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
33221
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
33222
33222
  var import_debug = __toESM(require_src());
33223
33223
  var Logger = class {
33224
33224
  info(...meta) {
@@ -33276,26 +33276,26 @@ var Logger = class {
33276
33276
  }
33277
33277
  };
33278
33278
 
33279
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
33279
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
33280
33280
  var import_path7 = __toESM(require("path"));
33281
33281
 
33282
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
33282
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
33283
33283
  var import_events2 = require("events");
33284
33284
  var import_path5 = __toESM(require("path"));
33285
33285
 
33286
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
33286
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
33287
33287
  var import_path2 = __toESM(require("path"));
33288
33288
 
33289
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/glob.js
33289
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/glob.js
33290
33290
  var import_glob = __toESM(require_glob());
33291
33291
 
33292
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
33292
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
33293
33293
  var import_path = __toESM(require("path"));
33294
33294
 
33295
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
33295
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
33296
33296
  var import_fs_extra = __toESM(require_lib());
33297
33297
 
33298
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
33298
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
33299
33299
  var IMAGE_EXT_LIST = [
33300
33300
  ".jpg",
33301
33301
  ".jpeg",
@@ -33309,7 +33309,7 @@ var IMAGE_EXT_LIST = [
33309
33309
  ".wmf"
33310
33310
  ];
33311
33311
 
33312
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
33312
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
33313
33313
  var FS_RESOURCE = "_codesmith_core_fs_resource";
33314
33314
  var FsResource = class {
33315
33315
  value() {
@@ -33334,7 +33334,7 @@ var FsResource = class {
33334
33334
  }
33335
33335
  };
33336
33336
 
33337
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
33337
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
33338
33338
  var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
33339
33339
  (0, import_glob.default)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
33340
33340
  });
@@ -33361,7 +33361,7 @@ var FsMaterial = class {
33361
33361
  }
33362
33362
  };
33363
33363
 
33364
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
33364
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
33365
33365
  function fsExists(path9) {
33366
33366
  return __async(this, null, function* () {
33367
33367
  try {
@@ -33373,7 +33373,7 @@ function fsExists(path9) {
33373
33373
  });
33374
33374
  }
33375
33375
 
33376
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
33376
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
33377
33377
  var nodeRequire = (path9) => {
33378
33378
  try {
33379
33379
  const module2 = __non_webpack_require__(path9);
@@ -33390,13 +33390,13 @@ var nodeRequire = (path9) => {
33390
33390
  }
33391
33391
  };
33392
33392
 
33393
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
33393
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
33394
33394
  var import_path3 = __toESM(require("path"));
33395
33395
 
33396
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
33396
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
33397
33397
  var import_execa = __toESM(require_execa());
33398
33398
 
33399
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
33399
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
33400
33400
  function canUseYarn() {
33401
33401
  return __async(this, null, function* () {
33402
33402
  try {
@@ -33480,7 +33480,7 @@ function runInstall(targetDir, registryUrl, logger) {
33480
33480
  });
33481
33481
  }
33482
33482
 
33483
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
33483
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
33484
33484
  function timeoutPromise(promise, ms, reason = "Operation") {
33485
33485
  return __async(this, null, function* () {
33486
33486
  let timeoutId = null;
@@ -33504,14 +33504,14 @@ function timeoutPromise(promise, ms, reason = "Operation") {
33504
33504
  });
33505
33505
  }
33506
33506
 
33507
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
33507
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
33508
33508
  var import_os = __toESM(require("os"));
33509
33509
 
33510
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
33510
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
33511
33511
  var NPM_API_TIMEOUT = 3e4;
33512
33512
  var CATCHE_VALIDITY_PREIOD = 7 * 24 * 3600 * 1e3;
33513
33513
 
33514
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
33514
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
33515
33515
  var import_semver = __toESM(require_semver2());
33516
33516
 
33517
33517
  // ../../../../node_modules/.pnpm/axios@1.7.7_debug@4.3.7/node_modules/axios/lib/helpers/bind.js
@@ -36858,45 +36858,56 @@ var {
36858
36858
  mergeConfig: mergeConfig2
36859
36859
  } = axios_default;
36860
36860
 
36861
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
36861
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
36862
36862
  var import_tar = __toESM(require_tar());
36863
36863
 
36864
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
36864
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmRegistry.js
36865
+ function getNpmRegistry() {
36866
+ return __async(this, null, function* () {
36867
+ const { stdout } = yield (0, import_execa.default)("npm", [
36868
+ "config",
36869
+ "get",
36870
+ "registry"
36871
+ ]);
36872
+ return stdout.replace(/\/$/, "") || "https://registry.npmjs.org";
36873
+ });
36874
+ }
36875
+
36876
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmPackageInfo.js
36877
+ var NpmPackageInfoCache = /* @__PURE__ */ new Map();
36878
+ function getNpmPackageInfo(pkgName, pkgVersion, options) {
36879
+ return __async(this, null, function* () {
36880
+ const packageName = `${pkgName}/${pkgVersion}`;
36881
+ const packageInfo = NpmPackageInfoCache.get(packageName);
36882
+ if (packageInfo) {
36883
+ return packageInfo;
36884
+ }
36885
+ const { registryUrl = yield getNpmRegistry() } = options || {};
36886
+ const url2 = `${registryUrl.replace(/\/$/, "")}/${pkgName}/${pkgVersion}`;
36887
+ const response = yield timeoutPromise(axios_default.get(url2), NPM_API_TIMEOUT, `Get npm package info of '${pkgName}'`);
36888
+ NpmPackageInfoCache.set(packageName, response.data);
36889
+ return response.data;
36890
+ });
36891
+ }
36892
+
36893
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
36865
36894
  function getNpmTarballUrl(pkgName, pkgVersion, options) {
36866
36895
  return __async(this, null, function* () {
36867
- const { registryUrl } = options || {};
36868
- const params = [
36869
- "view",
36870
- `${pkgName}@${pkgVersion}`,
36871
- "dist",
36872
- "--json"
36873
- ];
36874
- if (registryUrl) {
36875
- params.push("--registry");
36876
- params.push(registryUrl);
36877
- }
36878
- const getPkgInfoPromise = (0, import_execa.default)("npm", params);
36879
- const { stdout } = yield timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm tarball of '${pkgName}'`);
36880
- try {
36881
- const pkgDistInfo = JSON.parse(stdout);
36882
- return pkgDistInfo.tarball;
36883
- } catch (e) {
36884
- throw new Error(`Version \`${pkgVersion}\` for package \`${pkgName}\` could not be found`);
36885
- }
36896
+ const packageInfo = yield getNpmPackageInfo(pkgName, pkgVersion, options);
36897
+ return packageInfo.dist.tarball;
36886
36898
  });
36887
36899
  }
36888
36900
 
36889
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
36901
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
36890
36902
  function getNpmVersion(packageName, options) {
36891
36903
  return __async(this, null, function* () {
36892
- const { version = "latest", registryUrl = "https://registry.npmjs.org" } = options || {};
36893
- const url2 = `${registryUrl}/${packageName}/${version}`;
36894
- const response = yield timeoutPromise(axios_default.get(url2), NPM_API_TIMEOUT, `Get npm version of '${packageName}'`);
36895
- return response.data.version;
36904
+ const { version = "latest" } = options || {};
36905
+ const packageInfo = yield getNpmPackageInfo(packageName, version, options);
36906
+ return packageInfo.version;
36896
36907
  });
36897
36908
  }
36898
36909
 
36899
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
36910
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
36900
36911
  var GeneratorVersionMap = /* @__PURE__ */ new Map();
36901
36912
  function getGeneratorVersion(_0) {
36902
36913
  return __async(this, arguments, function* (pkgName, pkgVersion = "latest", options = {}) {
@@ -37026,7 +37037,7 @@ function downloadPackage(_0) {
37026
37037
  });
37027
37038
  }
37028
37039
 
37029
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
37040
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
37030
37041
  function getPackageInfo(packageName) {
37031
37042
  if (!packageName) {
37032
37043
  throw new Error("package is not exisit");
@@ -37050,7 +37061,7 @@ function getPackageInfo(packageName) {
37050
37061
  };
37051
37062
  }
37052
37063
 
37053
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
37064
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
37054
37065
  var import_path4 = __toESM(require("path"));
37055
37066
  var MaxTimes = 5;
37056
37067
  function getGeneratorDir(generator) {
@@ -37072,10 +37083,10 @@ function getGeneratorDir(generator) {
37072
37083
  });
37073
37084
  }
37074
37085
 
37075
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.0/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js
37086
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.3/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js
37076
37087
  var import_ora = __toESM(require_ora());
37077
37088
 
37078
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
37089
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
37079
37090
  var GeneratorCore = class {
37080
37091
  get lifeCycleMethod() {
37081
37092
  return {
@@ -37291,7 +37302,7 @@ check path: ${import_chalk.default.blue.underline(generator)} exist a package.js
37291
37302
  }
37292
37303
  };
37293
37304
 
37294
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
37305
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
37295
37306
  var import_path6 = __toESM(require("path"));
37296
37307
  var MaterialsManager = class {
37297
37308
  loadLocalGenerator(generator) {
@@ -37357,7 +37368,7 @@ var MaterialsManager = class {
37357
37368
  }
37358
37369
  };
37359
37370
 
37360
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.0/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
37371
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.3/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
37361
37372
  var CodeSmith = class {
37362
37373
  forge(_0) {
37363
37374
  return __async(this, arguments, function* ({ tasks, pwd }) {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-20241016025808",
18
+ "version": "0.0.0-next-20241016073741",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,12 +23,12 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "devDependencies": {
26
- "@modern-js/codesmith": "2.6.0",
26
+ "@modern-js/codesmith": "2.6.3",
27
27
  "@types/node": "^14",
28
28
  "typescript": "^5",
29
- "@modern-js/generator-utils": "0.0.0-next-20241016025808",
30
- "@modern-js/repo-next-generator": "0.0.0-next-20241016025808",
31
- "@scripts/build": "0.0.0-next-20241016025808"
29
+ "@modern-js/repo-next-generator": "0.0.0-next-20241016073741",
30
+ "@scripts/build": "0.0.0-next-20241016073741",
31
+ "@modern-js/generator-utils": "0.0.0-next-20241016073741"
32
32
  },
33
33
  "sideEffects": false,
34
34
  "publishConfig": {