@modern-js/repo-generator 3.6.4-next.1 → 3.7.0
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/dist/index.js +72 -57
- package/package.json +7 -6
- package/src/index.ts +2 -3
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.
|
33206
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33218
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/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.
|
33221
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33279
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33282
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33286
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33289
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/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.
|
33292
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33295
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/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.
|
33298
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33312
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33337
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33364
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33376
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33393
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33396
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/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.
|
33399
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33483
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33507
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33510
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
33514
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/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,57 @@ var {
|
|
36858
36858
|
mergeConfig: mergeConfig2
|
36859
36859
|
} = axios_default;
|
36860
36860
|
|
36861
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
36861
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.
|
36864
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/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.4/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
|
+
const { version } = response.data;
|
36889
|
+
NpmPackageInfoCache.set(`${pkgName}@${version || pkgVersion}`, response.data);
|
36890
|
+
return response.data;
|
36891
|
+
});
|
36892
|
+
}
|
36893
|
+
|
36894
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
36865
36895
|
function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
36866
36896
|
return __async(this, null, function* () {
|
36867
|
-
const
|
36868
|
-
|
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
|
-
}
|
36897
|
+
const packageInfo = yield getNpmPackageInfo(pkgName, pkgVersion, options);
|
36898
|
+
return packageInfo.dist.tarball;
|
36886
36899
|
});
|
36887
36900
|
}
|
36888
36901
|
|
36889
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
36902
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
36890
36903
|
function getNpmVersion(packageName, options) {
|
36891
36904
|
return __async(this, null, function* () {
|
36892
|
-
const { version = "latest"
|
36893
|
-
const
|
36894
|
-
|
36895
|
-
return response.data.version;
|
36905
|
+
const { version = "latest" } = options || {};
|
36906
|
+
const packageInfo = yield getNpmPackageInfo(packageName, version, options);
|
36907
|
+
return packageInfo.version;
|
36896
36908
|
});
|
36897
36909
|
}
|
36898
36910
|
|
36899
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
36911
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
36900
36912
|
var GeneratorVersionMap = /* @__PURE__ */ new Map();
|
36901
36913
|
function getGeneratorVersion(_0) {
|
36902
36914
|
return __async(this, arguments, function* (pkgName, pkgVersion = "latest", options = {}) {
|
@@ -36929,9 +36941,12 @@ function getGeneratorVersion(_0) {
|
|
36929
36941
|
return version;
|
36930
36942
|
});
|
36931
36943
|
}
|
36932
|
-
function isValidCache(cacheDir) {
|
36944
|
+
function isValidCache(cacheDir, pkgName) {
|
36933
36945
|
return __async(this, null, function* () {
|
36934
36946
|
if (yield fsExists(`${cacheDir}/.codesmith.completed`)) {
|
36947
|
+
if (pkgName === "@modern-js/codesmith-global") {
|
36948
|
+
return true;
|
36949
|
+
}
|
36935
36950
|
const preCacheTimeStr = yield import_fs_extra.default.readFile(`${cacheDir}/.codesmith.completed`, {
|
36936
36951
|
encoding: "utf-8"
|
36937
36952
|
});
|
@@ -36999,7 +37014,7 @@ function downloadPackage(_0) {
|
|
36999
37014
|
}
|
37000
37015
|
const targetDir = `${import_os.default.tmpdir()}/csmith-generator/${pkgName}@${version}`;
|
37001
37016
|
logger === null || logger === void 0 ? void 0 : (_logger_debug = logger.debug) === null || _logger_debug === void 0 ? void 0 : _logger_debug.call(logger, `💡 [Download Generator Package]: ${pkgName}@${version} to ${targetDir}`);
|
37002
|
-
if ((yield fsExists(targetDir)) && (yield isValidCache(targetDir))) {
|
37017
|
+
if ((yield fsExists(targetDir)) && (yield isValidCache(targetDir, pkgName))) {
|
37003
37018
|
return targetDir;
|
37004
37019
|
}
|
37005
37020
|
yield import_fs_extra.default.remove(targetDir);
|
@@ -37026,7 +37041,7 @@ function downloadPackage(_0) {
|
|
37026
37041
|
});
|
37027
37042
|
}
|
37028
37043
|
|
37029
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
37044
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
37030
37045
|
function getPackageInfo(packageName) {
|
37031
37046
|
if (!packageName) {
|
37032
37047
|
throw new Error("package is not exisit");
|
@@ -37050,7 +37065,7 @@ function getPackageInfo(packageName) {
|
|
37050
37065
|
};
|
37051
37066
|
}
|
37052
37067
|
|
37053
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
37068
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
37054
37069
|
var import_path4 = __toESM(require("path"));
|
37055
37070
|
var MaxTimes = 5;
|
37056
37071
|
function getGeneratorDir(generator) {
|
@@ -37072,10 +37087,10 @@ function getGeneratorDir(generator) {
|
|
37072
37087
|
});
|
37073
37088
|
}
|
37074
37089
|
|
37075
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
37090
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.4/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js
|
37076
37091
|
var import_ora = __toESM(require_ora());
|
37077
37092
|
|
37078
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
37093
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
37079
37094
|
var GeneratorCore = class {
|
37080
37095
|
get lifeCycleMethod() {
|
37081
37096
|
return {
|
@@ -37291,7 +37306,7 @@ check path: ${import_chalk.default.blue.underline(generator)} exist a package.js
|
|
37291
37306
|
}
|
37292
37307
|
};
|
37293
37308
|
|
37294
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
37309
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
37295
37310
|
var import_path6 = __toESM(require("path"));
|
37296
37311
|
var MaterialsManager = class {
|
37297
37312
|
loadLocalGenerator(generator) {
|
@@ -37357,7 +37372,7 @@ var MaterialsManager = class {
|
|
37357
37372
|
}
|
37358
37373
|
};
|
37359
37374
|
|
37360
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
37375
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.4/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
37361
37376
|
var CodeSmith = class {
|
37362
37377
|
forge(_0) {
|
37363
37378
|
return __async(this, arguments, function* ({ tasks, pwd }) {
|
@@ -37434,6 +37449,7 @@ var getGeneratorPath = (generator, distTag, paths) => {
|
|
37434
37449
|
// src/index.ts
|
37435
37450
|
var src_default = (context, generator) => __async(void 0, null, function* () {
|
37436
37451
|
process.setMaxListeners(20);
|
37452
|
+
generator.logger.debug(`🚀 [Start Run Repo Generator]`);
|
37437
37453
|
if (!global.codesmith) {
|
37438
37454
|
generator.logger.warn(
|
37439
37455
|
"🟡 Please use the latest @modern-js/create version to run generator"
|
@@ -37447,7 +37463,6 @@ var src_default = (context, generator) => __async(void 0, null, function* () {
|
|
37447
37463
|
void 0,
|
37448
37464
|
context.config
|
37449
37465
|
);
|
37450
|
-
generator.logger.debug(`🚀 [Start Run Repo Generator]`);
|
37451
37466
|
generator.logger.debug(`🚀 [End Run Repo Generator]`);
|
37452
37467
|
});
|
37453
37468
|
/*! Bundled license information:
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.
|
18
|
+
"version": "3.7.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -23,17 +23,18 @@
|
|
23
23
|
"/dist/index.js"
|
24
24
|
],
|
25
25
|
"devDependencies": {
|
26
|
-
"@modern-js/codesmith": "2.6.
|
26
|
+
"@modern-js/codesmith": "2.6.4",
|
27
27
|
"@types/node": "^14",
|
28
28
|
"typescript": "^5",
|
29
|
-
"@modern-js/generator-utils": "3.
|
30
|
-
"@scripts/build": "2.60.
|
31
|
-
"@modern-js/repo-next-generator": "3.
|
29
|
+
"@modern-js/generator-utils": "3.7.0",
|
30
|
+
"@scripts/build": "2.60.4",
|
31
|
+
"@modern-js/repo-next-generator": "3.7.0"
|
32
32
|
},
|
33
33
|
"sideEffects": false,
|
34
34
|
"publishConfig": {
|
35
35
|
"registry": "https://registry.npmjs.org/",
|
36
|
-
"access": "public"
|
36
|
+
"access": "public",
|
37
|
+
"provenance": true
|
37
38
|
},
|
38
39
|
"types": "./src/index.ts",
|
39
40
|
"scripts": {
|
package/src/index.ts
CHANGED
@@ -8,8 +8,9 @@ import { getGeneratorPath } from '@modern-js/generator-utils';
|
|
8
8
|
export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
9
9
|
process.setMaxListeners(20);
|
10
10
|
|
11
|
-
|
11
|
+
generator.logger.debug(`🚀 [Start Run Repo Generator]`);
|
12
12
|
|
13
|
+
// check prepare global
|
13
14
|
if (!(global as any).codesmith) {
|
14
15
|
generator.logger.warn(
|
15
16
|
'🟡 Please use the latest @modern-js/create version to run generator',
|
@@ -26,7 +27,5 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
|
|
26
27
|
context.config,
|
27
28
|
);
|
28
29
|
|
29
|
-
generator.logger.debug(`🚀 [Start Run Repo Generator]`);
|
30
|
-
|
31
30
|
generator.logger.debug(`🚀 [End Run Repo Generator]`);
|
32
31
|
};
|