@modern-js/repo-generator 0.0.0-next-20231215061130 → 0.0.0-next-20231215080115
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 +75 -85
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -60919,12 +60919,12 @@ function _define_property(obj, key, value) {
|
|
|
60919
60919
|
return obj;
|
|
60920
60920
|
}
|
|
60921
60921
|
|
|
60922
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
60922
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
60923
60923
|
var import_utils23 = require("@modern-js/utils");
|
|
60924
60924
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
60925
60925
|
var import_comment_json = __toESM(require_src2());
|
|
60926
60926
|
|
|
60927
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
60927
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
60928
60928
|
var import_utils = require("@modern-js/utils");
|
|
60929
60929
|
async function canUseNvm() {
|
|
60930
60930
|
try {
|
|
@@ -60974,7 +60974,7 @@ async function canUsePnpm() {
|
|
|
60974
60974
|
}
|
|
60975
60975
|
}
|
|
60976
60976
|
|
|
60977
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
60977
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
60978
60978
|
var import_utils2 = require("@modern-js/utils");
|
|
60979
60979
|
function execaWithStreamLog(command, args, options) {
|
|
60980
60980
|
const promise = (0, import_utils2.execa)(command, args, {
|
|
@@ -61070,7 +61070,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
61070
61070
|
throw new Error("please install pnpm first");
|
|
61071
61071
|
}
|
|
61072
61072
|
|
|
61073
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
61073
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
61074
61074
|
var NpmAPI = class {
|
|
61075
61075
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
61076
61076
|
return npmInstall({
|
|
@@ -61099,7 +61099,7 @@ var NpmAPI = class {
|
|
|
61099
61099
|
}
|
|
61100
61100
|
};
|
|
61101
61101
|
|
|
61102
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
61102
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
61103
61103
|
var import_utils4 = require("@modern-js/utils");
|
|
61104
61104
|
async function canUseGit() {
|
|
61105
61105
|
try {
|
|
@@ -61174,7 +61174,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
61174
61174
|
});
|
|
61175
61175
|
}
|
|
61176
61176
|
|
|
61177
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
61177
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
61178
61178
|
var GitAPI = class {
|
|
61179
61179
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
61180
61180
|
const canUse = await canUseGit();
|
|
@@ -61226,7 +61226,7 @@ var GitAPI = class {
|
|
|
61226
61226
|
}
|
|
61227
61227
|
};
|
|
61228
61228
|
|
|
61229
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61229
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
|
61230
61230
|
var LoggerLevel;
|
|
61231
61231
|
(function(LoggerLevel2) {
|
|
61232
61232
|
LoggerLevel2["Error"] = "error";
|
|
@@ -61247,7 +61247,7 @@ var LevelPriority = [
|
|
|
61247
61247
|
LoggerLevel.Stream
|
|
61248
61248
|
];
|
|
61249
61249
|
|
|
61250
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61250
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
|
61251
61251
|
var import_utils6 = require("@modern-js/utils");
|
|
61252
61252
|
var Logger = class {
|
|
61253
61253
|
get currentLevelIndex() {
|
|
@@ -61308,23 +61308,23 @@ var Logger = class {
|
|
|
61308
61308
|
}
|
|
61309
61309
|
};
|
|
61310
61310
|
|
|
61311
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61311
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
61312
61312
|
var import_path7 = __toESM(require("path"));
|
|
61313
61313
|
|
|
61314
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61314
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
61315
61315
|
var import_path4 = __toESM(require("path"));
|
|
61316
61316
|
var import_events = require("events");
|
|
61317
61317
|
var import_utils11 = require("@modern-js/utils");
|
|
61318
61318
|
|
|
61319
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61319
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
61320
61320
|
var import_path2 = __toESM(require("path"));
|
|
61321
61321
|
var import_utils8 = require("@modern-js/utils");
|
|
61322
61322
|
|
|
61323
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61323
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
61324
61324
|
var import_path = __toESM(require("path"));
|
|
61325
61325
|
var import_utils7 = require("@modern-js/utils");
|
|
61326
61326
|
|
|
61327
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61327
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
|
61328
61328
|
var IMAGE_EXT_LIST = [
|
|
61329
61329
|
".jpg",
|
|
61330
61330
|
".jpeg",
|
|
@@ -61338,7 +61338,7 @@ var IMAGE_EXT_LIST = [
|
|
|
61338
61338
|
".wmf"
|
|
61339
61339
|
];
|
|
61340
61340
|
|
|
61341
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61341
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
61342
61342
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
61343
61343
|
var FsResource = class {
|
|
61344
61344
|
async value() {
|
|
@@ -61364,7 +61364,7 @@ var FsResource = class {
|
|
|
61364
61364
|
}
|
|
61365
61365
|
};
|
|
61366
61366
|
|
|
61367
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61367
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
61368
61368
|
var promisifyGlob = function(pattern, options) {
|
|
61369
61369
|
return new Promise((resolve, reject) => {
|
|
61370
61370
|
(0, import_utils8.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
|
@@ -61392,7 +61392,7 @@ var FsMaterial = class {
|
|
|
61392
61392
|
}
|
|
61393
61393
|
};
|
|
61394
61394
|
|
|
61395
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61395
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
|
61396
61396
|
var nodeRequire = (path18) => {
|
|
61397
61397
|
try {
|
|
61398
61398
|
const module2 = __non_webpack_require__(path18);
|
|
@@ -61409,11 +61409,11 @@ var nodeRequire = (path18) => {
|
|
|
61409
61409
|
}
|
|
61410
61410
|
};
|
|
61411
61411
|
|
|
61412
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61412
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
|
61413
61413
|
var import_path3 = __toESM(require("path"));
|
|
61414
61414
|
var import_utils10 = require("@modern-js/utils");
|
|
61415
61415
|
|
|
61416
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61416
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
61417
61417
|
var import_utils9 = require("@modern-js/utils");
|
|
61418
61418
|
async function fsExists(path18) {
|
|
61419
61419
|
try {
|
|
@@ -61424,7 +61424,7 @@ async function fsExists(path18) {
|
|
|
61424
61424
|
}
|
|
61425
61425
|
}
|
|
61426
61426
|
|
|
61427
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61427
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
|
61428
61428
|
var MaxTimes = 5;
|
|
61429
61429
|
async function getGeneratorDir(generator) {
|
|
61430
61430
|
let result = generator;
|
|
@@ -61443,7 +61443,7 @@ async function getGeneratorDir(generator) {
|
|
|
61443
61443
|
return result;
|
|
61444
61444
|
}
|
|
61445
61445
|
|
|
61446
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61446
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
61447
61447
|
var GeneratorCore = class {
|
|
61448
61448
|
get lifeCycleMethod() {
|
|
61449
61449
|
return {
|
|
@@ -61535,8 +61535,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61535
61535
|
return Promise.resolve();
|
|
61536
61536
|
}
|
|
61537
61537
|
async loadGenerator(generator) {
|
|
61538
|
-
|
|
61539
|
-
(_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : (_this_logger_timing = _this_logger.timing) === null || _this_logger_timing === void 0 ? void 0 : _this_logger_timing.call(_this_logger, `loadGenerator ${generator}`);
|
|
61538
|
+
this.logger.timing(`loadGenerator ${generator}`);
|
|
61540
61539
|
let generatorPath = generator;
|
|
61541
61540
|
if (generator.startsWith("file:")) {
|
|
61542
61541
|
generatorPath = import_path4.default.join(this.basePath, generator.slice(5));
|
|
@@ -61547,7 +61546,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61547
61546
|
return {};
|
|
61548
61547
|
}
|
|
61549
61548
|
this.logger.debug("[runGenerator] task.generator loaded");
|
|
61550
|
-
|
|
61549
|
+
this.logger.timing(`loadGenerator ${generator}`, true);
|
|
61551
61550
|
const generatorScript = nodeRequire(generatorPkg.basePath);
|
|
61552
61551
|
if (typeof generatorScript !== "function") {
|
|
61553
61552
|
this.logger.debug(`generator module [${pkgJson.name}] export default is not a function`, generatorScript);
|
|
@@ -61560,8 +61559,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61560
61559
|
};
|
|
61561
61560
|
}
|
|
61562
61561
|
async runGenerator(generator, config = {}) {
|
|
61563
|
-
|
|
61564
|
-
(_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : (_this_logger_timing = _this_logger.timing) === null || _this_logger_timing === void 0 ? void 0 : _this_logger_timing.call(_this_logger, `runGenerator ${generator}`);
|
|
61562
|
+
this.logger.timing(`runGenerator ${generator}`);
|
|
61565
61563
|
const spinner = (0, import_utils11.ora)({
|
|
61566
61564
|
text: "Load Generator...",
|
|
61567
61565
|
spinner: "runner"
|
|
@@ -61579,11 +61577,10 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61579
61577
|
this.setbasePath(this._context.current.material.basePath);
|
|
61580
61578
|
await generatorScript(this._context, this);
|
|
61581
61579
|
this.setCurrent(null);
|
|
61582
|
-
|
|
61580
|
+
this.logger.timing(`runGenerator ${generator}`, true);
|
|
61583
61581
|
}
|
|
61584
61582
|
async runSubGenerator(subGenerator, relativePwdPath = "", config) {
|
|
61585
|
-
|
|
61586
|
-
(_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : (_this_logger_timing = _this_logger.timing) === null || _this_logger_timing === void 0 ? void 0 : _this_logger_timing.call(_this_logger, `runSubGenerator ${subGenerator}`);
|
|
61583
|
+
this.logger.timing(`runSubGenerator ${subGenerator}`);
|
|
61587
61584
|
const spinner = (0, import_utils11.ora)({
|
|
61588
61585
|
text: "Load Generator...",
|
|
61589
61586
|
spinner: "runner"
|
|
@@ -61616,7 +61613,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61616
61613
|
await generatorScript(subContext, this);
|
|
61617
61614
|
this.setOutputPath(preOutputPath);
|
|
61618
61615
|
this.setbasePath(preBasePath);
|
|
61619
|
-
|
|
61616
|
+
this.logger.timing(`runSubGenerator ${subGenerator}`, true);
|
|
61620
61617
|
}
|
|
61621
61618
|
constructor({ logger: logger2, materialsManager, outputPath }) {
|
|
61622
61619
|
_define_property(this, "logger", void 0);
|
|
@@ -61648,10 +61645,10 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61648
61645
|
}
|
|
61649
61646
|
};
|
|
61650
61647
|
|
|
61651
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61648
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
|
61652
61649
|
var import_path6 = __toESM(require("path"));
|
|
61653
61650
|
|
|
61654
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61651
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
|
61655
61652
|
var import_path5 = __toESM(require("path"));
|
|
61656
61653
|
var import_utils12 = require("@modern-js/utils");
|
|
61657
61654
|
async function canUseYarn2() {
|
|
@@ -61732,7 +61729,7 @@ async function runInstall(targetDir, registryUrl) {
|
|
|
61732
61729
|
}
|
|
61733
61730
|
}
|
|
61734
61731
|
|
|
61735
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61732
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
|
61736
61733
|
async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
61737
61734
|
let timeoutId = null;
|
|
61738
61735
|
const delayPromise = (ms2) => new Promise((resolve) => {
|
|
@@ -61754,20 +61751,20 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
|
61754
61751
|
}
|
|
61755
61752
|
}
|
|
61756
61753
|
|
|
61757
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61754
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
61758
61755
|
var import_os = __toESM(require("os"));
|
|
61759
61756
|
var import_utils15 = require("@modern-js/utils");
|
|
61760
61757
|
var import_axios = __toESM(require_axios2());
|
|
61761
61758
|
var import_tar = __toESM(require_tar());
|
|
61762
61759
|
|
|
61763
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61760
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
|
61764
61761
|
var import_utils13 = require("@modern-js/utils");
|
|
61765
61762
|
|
|
61766
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61763
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
|
61767
61764
|
var NPM_API_TIMEOUT = 3e4;
|
|
61768
61765
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
|
61769
61766
|
|
|
61770
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61767
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
|
61771
61768
|
async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
61772
61769
|
const { registryUrl } = options || {};
|
|
61773
61770
|
const params = [
|
|
@@ -61790,7 +61787,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
|
61790
61787
|
}
|
|
61791
61788
|
}
|
|
61792
61789
|
|
|
61793
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61790
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
|
61794
61791
|
var import_utils14 = require("@modern-js/utils");
|
|
61795
61792
|
async function getNpmVersion(packageName, options) {
|
|
61796
61793
|
const { version, registryUrl } = options || {};
|
|
@@ -61812,7 +61809,7 @@ async function getNpmVersion(packageName, options) {
|
|
|
61812
61809
|
return stdout;
|
|
61813
61810
|
}
|
|
61814
61811
|
|
|
61815
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61812
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
61816
61813
|
async function isValidCache(cacheDir) {
|
|
61817
61814
|
if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
|
|
61818
61815
|
const preCacheTimeStr = await import_utils15.fs.readFile(`${cacheDir}/.codesmith.completed`, {
|
|
@@ -61892,7 +61889,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
|
61892
61889
|
return targetDir;
|
|
61893
61890
|
}
|
|
61894
61891
|
|
|
61895
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61892
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
|
61896
61893
|
var import_utils16 = require("@modern-js/utils");
|
|
61897
61894
|
function getPackageInfo(packageName) {
|
|
61898
61895
|
if (!packageName) {
|
|
@@ -61917,7 +61914,7 @@ function getPackageInfo(packageName) {
|
|
|
61917
61914
|
};
|
|
61918
61915
|
}
|
|
61919
61916
|
|
|
61920
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61917
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
|
61921
61918
|
var MaterialsManager = class {
|
|
61922
61919
|
loadLocalGenerator(generator) {
|
|
61923
61920
|
if (!import_path6.default.isAbsolute(generator)) {
|
|
@@ -61948,11 +61945,10 @@ var MaterialsManager = class {
|
|
|
61948
61945
|
}
|
|
61949
61946
|
};
|
|
61950
61947
|
|
|
61951
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61948
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
61952
61949
|
var CodeSmith = class {
|
|
61953
61950
|
async forge({ tasks, pwd }) {
|
|
61954
|
-
|
|
61955
|
-
(_this_logger = this.logger) === null || _this_logger === void 0 ? void 0 : (_this_logger_timing = _this_logger.timing) === null || _this_logger_timing === void 0 ? void 0 : _this_logger_timing.call(_this_logger, "CodeSmith all tasks");
|
|
61951
|
+
this.logger.timing("CodeSmith all tasks");
|
|
61956
61952
|
this.core = new GeneratorCore({
|
|
61957
61953
|
logger: this.logger,
|
|
61958
61954
|
materialsManager: this.materialsManager,
|
|
@@ -61967,19 +61963,17 @@ var CodeSmith = class {
|
|
|
61967
61963
|
this.logger.error("run task error:", e);
|
|
61968
61964
|
throw new Error("run task error");
|
|
61969
61965
|
} finally {
|
|
61970
|
-
|
|
61971
|
-
(_this_logger1 = this.logger) === null || _this_logger1 === void 0 ? void 0 : (_this_logger_timing1 = _this_logger1.timing) === null || _this_logger_timing1 === void 0 ? void 0 : _this_logger_timing1.call(_this_logger1, "CodeSmith all tasks", true);
|
|
61966
|
+
this.logger.timing("CodeSmith all tasks", true);
|
|
61972
61967
|
}
|
|
61973
61968
|
}
|
|
61974
61969
|
async runTask(task) {
|
|
61975
|
-
var _this_logger_timing, _this_logger, _this_logger_timing1, _this_logger1;
|
|
61976
61970
|
if (!this.core) {
|
|
61977
61971
|
throw new Error("no core in 'runTask'");
|
|
61978
61972
|
}
|
|
61979
61973
|
const { generator, config } = task;
|
|
61980
|
-
|
|
61974
|
+
this.logger.timing(`runTask ${generator}`);
|
|
61981
61975
|
await this.core.runGenerator(generator, config);
|
|
61982
|
-
|
|
61976
|
+
this.logger.timing(`runTask ${generator}`, true);
|
|
61983
61977
|
}
|
|
61984
61978
|
constructor({ debug, logger: logger2, registryUrl }) {
|
|
61985
61979
|
_define_property(this, "core", void 0);
|
|
@@ -61992,7 +61986,7 @@ var CodeSmith = class {
|
|
|
61992
61986
|
}
|
|
61993
61987
|
};
|
|
61994
61988
|
|
|
61995
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
61989
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
61996
61990
|
var import_handlebars = __toESM(require_lib());
|
|
61997
61991
|
function renderString(template, fullData, registers) {
|
|
61998
61992
|
const helpers = {
|
|
@@ -62006,7 +62000,7 @@ function renderString(template, fullData, registers) {
|
|
|
62006
62000
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
62007
62001
|
}
|
|
62008
62002
|
|
|
62009
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
62003
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
62010
62004
|
var HandlebarsAPI = class {
|
|
62011
62005
|
async registerHelp(helpers) {
|
|
62012
62006
|
this.registers.helpers = {
|
|
@@ -62056,13 +62050,13 @@ var HandlebarsAPI = class {
|
|
|
62056
62050
|
}
|
|
62057
62051
|
};
|
|
62058
62052
|
|
|
62059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
62053
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
62060
62054
|
var import_ejs = __toESM(require_ejs());
|
|
62061
62055
|
function renderString2(template, fullData) {
|
|
62062
62056
|
return import_ejs.default.render(template, fullData) || "";
|
|
62063
62057
|
}
|
|
62064
62058
|
|
|
62065
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
62059
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
62066
62060
|
var EjsAPI = class {
|
|
62067
62061
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
62068
62062
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -62095,7 +62089,7 @@ var EjsAPI = class {
|
|
|
62095
62089
|
}
|
|
62096
62090
|
};
|
|
62097
62091
|
|
|
62098
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
62092
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
62099
62093
|
var import_path8 = __toESM(require("path"));
|
|
62100
62094
|
var import_utils20 = require("@modern-js/utils");
|
|
62101
62095
|
var FsAPI = class {
|
|
@@ -62123,7 +62117,7 @@ var FsAPI = class {
|
|
|
62123
62117
|
}
|
|
62124
62118
|
};
|
|
62125
62119
|
|
|
62126
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
62120
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
|
62127
62121
|
var import_lodash2 = require("@modern-js/utils/lodash");
|
|
62128
62122
|
|
|
62129
62123
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
|
@@ -62447,7 +62441,7 @@ function isEmpty(val, strict) {
|
|
|
62447
62441
|
return false;
|
|
62448
62442
|
}
|
|
62449
62443
|
|
|
62450
|
-
// ../../../../node_modules/.pnpm/tslib@2.
|
|
62444
|
+
// ../../../../node_modules/.pnpm/tslib@2.4.0/node_modules/tslib/tslib.es6.js
|
|
62451
62445
|
var __assign = function() {
|
|
62452
62446
|
__assign = Object.assign || function __assign11(t) {
|
|
62453
62447
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -62477,7 +62471,7 @@ function __generator(thisArg, body) {
|
|
|
62477
62471
|
function step(op) {
|
|
62478
62472
|
if (f)
|
|
62479
62473
|
throw new TypeError("Generator is already executing.");
|
|
62480
|
-
while (
|
|
62474
|
+
while (_)
|
|
62481
62475
|
try {
|
|
62482
62476
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
62483
62477
|
return t;
|
|
@@ -66137,7 +66131,7 @@ var observe = function(target, observer, deep) {
|
|
|
66137
66131
|
return addListener(target);
|
|
66138
66132
|
};
|
|
66139
66133
|
|
|
66140
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
66134
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/shared.js
|
|
66141
66135
|
var REVA_ACTIONS_KEY = Symbol.for("__REVA_ACTIONS");
|
|
66142
66136
|
var SchemaNestedMap = {
|
|
66143
66137
|
parent: true,
|
|
@@ -66324,7 +66318,7 @@ var patchStateFormSchema = function(targetState, pattern, compiled) {
|
|
|
66324
66318
|
});
|
|
66325
66319
|
};
|
|
66326
66320
|
|
|
66327
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
66321
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/compiler.js
|
|
66328
66322
|
var ExpRE = /^\s*\{\{([\s\S]*)\}\}\s*$/;
|
|
66329
66323
|
var Registry = {
|
|
66330
66324
|
silent: false,
|
|
@@ -71091,7 +71085,7 @@ function onFieldInit(pattern, callback) {
|
|
|
71091
71085
|
}
|
|
71092
71086
|
}
|
|
71093
71087
|
|
|
71094
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
71088
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/transformer.js
|
|
71095
71089
|
var __read7 = function(o, n) {
|
|
71096
71090
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71097
71091
|
if (!m)
|
|
@@ -71316,7 +71310,7 @@ var transformFieldProps = function(schema, options) {
|
|
|
71316
71310
|
};
|
|
71317
71311
|
};
|
|
71318
71312
|
|
|
71319
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
71313
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/patches.js
|
|
71320
71314
|
var __assign9 = function() {
|
|
71321
71315
|
__assign9 = Object.assign || function(t) {
|
|
71322
71316
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -71365,7 +71359,7 @@ var enablePolyfills = function(versions) {
|
|
|
71365
71359
|
}
|
|
71366
71360
|
};
|
|
71367
71361
|
|
|
71368
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
71362
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/polyfills/SPECIFICATION_1_0.js
|
|
71369
71363
|
var __assign10 = function() {
|
|
71370
71364
|
__assign10 = Object.assign || function(t) {
|
|
71371
71365
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -71522,7 +71516,7 @@ var registerTypeDefaultComponents = function(maps) {
|
|
|
71522
71516
|
Object.assign(TYPE_DEFAULT_COMPONENTS, maps);
|
|
71523
71517
|
};
|
|
71524
71518
|
|
|
71525
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
71519
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.0.4/node_modules/@formily/json-schema/esm/schema.js
|
|
71526
71520
|
var Schema = (
|
|
71527
71521
|
/** @class */
|
|
71528
71522
|
function() {
|
|
@@ -71758,10 +71752,10 @@ var Schema = (
|
|
|
71758
71752
|
}()
|
|
71759
71753
|
);
|
|
71760
71754
|
|
|
71761
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71755
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
71762
71756
|
var import_inquirer = __toESM(require_inquirer());
|
|
71763
71757
|
|
|
71764
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71758
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
71765
71759
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
71766
71760
|
function validateSchema(schema) {
|
|
71767
71761
|
const { type, properties } = schema;
|
|
@@ -71853,7 +71847,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
71853
71847
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
71854
71848
|
}
|
|
71855
71849
|
|
|
71856
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71850
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
71857
71851
|
var compileRule = (rule, scope) => {
|
|
71858
71852
|
const state = Schema.compile(rule, {
|
|
71859
71853
|
$self: {},
|
|
@@ -71957,7 +71951,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
71957
71951
|
return answers;
|
|
71958
71952
|
}
|
|
71959
71953
|
|
|
71960
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71954
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
71961
71955
|
var CLIReader = class {
|
|
71962
71956
|
getAnswers() {
|
|
71963
71957
|
return this.answers;
|
|
@@ -71988,7 +71982,7 @@ var CLIReader = class {
|
|
|
71988
71982
|
}
|
|
71989
71983
|
};
|
|
71990
71984
|
|
|
71991
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71985
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
|
71992
71986
|
var FormilyAPI = class {
|
|
71993
71987
|
mergeAnswers(answers, configValue) {
|
|
71994
71988
|
const inputData = (0, import_lodash2.merge)(answers, configValue);
|
|
@@ -72011,7 +72005,7 @@ var FormilyAPI = class {
|
|
|
72011
72005
|
}
|
|
72012
72006
|
};
|
|
72013
72007
|
|
|
72014
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72008
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
72015
72009
|
var import_inquirer3 = __toESM(require_inquirer2());
|
|
72016
72010
|
|
|
72017
72011
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -72077,7 +72071,7 @@ var I18n = class {
|
|
|
72077
72071
|
}
|
|
72078
72072
|
};
|
|
72079
72073
|
|
|
72080
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72074
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
72081
72075
|
var ZH_LOCALE = {
|
|
72082
72076
|
environment: {
|
|
72083
72077
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -72104,7 +72098,7 @@ var ZH_LOCALE = {
|
|
|
72104
72098
|
}
|
|
72105
72099
|
};
|
|
72106
72100
|
|
|
72107
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72101
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
72108
72102
|
var EN_LOCALE = {
|
|
72109
72103
|
environment: {
|
|
72110
72104
|
node_version: "please upgrade node to lts version",
|
|
@@ -72131,14 +72125,14 @@ var EN_LOCALE = {
|
|
|
72131
72125
|
}
|
|
72132
72126
|
};
|
|
72133
72127
|
|
|
72134
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72128
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
72135
72129
|
var i18n = new I18n();
|
|
72136
72130
|
var localeKeys = i18n.init("zh", {
|
|
72137
72131
|
zh: ZH_LOCALE,
|
|
72138
72132
|
en: EN_LOCALE
|
|
72139
72133
|
});
|
|
72140
72134
|
|
|
72141
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72135
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
72142
72136
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
72143
72137
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
72144
72138
|
for (const question of questions) {
|
|
@@ -72166,7 +72160,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
72166
72160
|
return questions;
|
|
72167
72161
|
}
|
|
72168
72162
|
|
|
72169
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72163
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
72170
72164
|
var import_path10 = __toESM(require("path"));
|
|
72171
72165
|
var import_utils22 = require("@modern-js/utils");
|
|
72172
72166
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -72214,7 +72208,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
72214
72208
|
}
|
|
72215
72209
|
}
|
|
72216
72210
|
|
|
72217
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72211
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
72218
72212
|
var AppAPI = class {
|
|
72219
72213
|
async checkEnvironment(nodeVersion) {
|
|
72220
72214
|
if (import_utils23.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -72303,8 +72297,7 @@ var AppAPI = class {
|
|
|
72303
72297
|
}
|
|
72304
72298
|
async forgeTemplate(templatePattern, filter, rename, parameters, type = "handlebars") {
|
|
72305
72299
|
try {
|
|
72306
|
-
|
|
72307
|
-
(_this_generatorCore_logger = this.generatorCore.logger) === null || _this_generatorCore_logger === void 0 ? void 0 : (_this_generatorCore_logger_timing = _this_generatorCore_logger.timing) === null || _this_generatorCore_logger_timing === void 0 ? void 0 : _this_generatorCore_logger_timing.call(_this_generatorCore_logger, `forgeTemplate`);
|
|
72300
|
+
this.generatorCore.logger.timing(`forgeTemplate`);
|
|
72308
72301
|
const { material } = this.generatorContext.current;
|
|
72309
72302
|
const resourceMap = await material.find(templatePattern, {
|
|
72310
72303
|
nodir: true,
|
|
@@ -72326,14 +72319,12 @@ var AppAPI = class {
|
|
|
72326
72319
|
this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
|
|
72327
72320
|
throw new Error("base forging failed");
|
|
72328
72321
|
} finally {
|
|
72329
|
-
|
|
72330
|
-
(_this_generatorCore_logger1 = this.generatorCore.logger) === null || _this_generatorCore_logger1 === void 0 ? void 0 : (_this_generatorCore_logger_timing1 = _this_generatorCore_logger1.timing) === null || _this_generatorCore_logger_timing1 === void 0 ? void 0 : _this_generatorCore_logger_timing1.call(_this_generatorCore_logger1, `forgeTemplate`, true);
|
|
72322
|
+
this.generatorCore.logger.timing(`forgeTemplate`, true);
|
|
72331
72323
|
}
|
|
72332
72324
|
}
|
|
72333
72325
|
async renderTemplateByFileType(templatePattern, filter, rename, parameters) {
|
|
72334
72326
|
try {
|
|
72335
|
-
|
|
72336
|
-
(_this_generatorCore_logger = this.generatorCore.logger) === null || _this_generatorCore_logger === void 0 ? void 0 : (_this_generatorCore_logger_timing = _this_generatorCore_logger.timing) === null || _this_generatorCore_logger_timing === void 0 ? void 0 : _this_generatorCore_logger_timing.call(_this_generatorCore_logger, `renderTemplateByFileType`);
|
|
72327
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`);
|
|
72337
72328
|
const { material } = this.generatorContext.current;
|
|
72338
72329
|
const resourceMap = await material.find(templatePattern, {
|
|
72339
72330
|
nodir: true,
|
|
@@ -72365,8 +72356,7 @@ var AppAPI = class {
|
|
|
72365
72356
|
this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
|
|
72366
72357
|
throw new Error("base forging failed");
|
|
72367
72358
|
} finally {
|
|
72368
|
-
|
|
72369
|
-
(_this_generatorCore_logger1 = this.generatorCore.logger) === null || _this_generatorCore_logger1 === void 0 ? void 0 : (_this_generatorCore_logger_timing1 = _this_generatorCore_logger1.timing) === null || _this_generatorCore_logger_timing1 === void 0 ? void 0 : _this_generatorCore_logger_timing1.call(_this_generatorCore_logger1, `renderTemplateByFileType`, true);
|
|
72359
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`, true);
|
|
72370
72360
|
}
|
|
72371
72361
|
}
|
|
72372
72362
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
|
@@ -73814,11 +73804,11 @@ var import_lodash14 = require("@modern-js/utils/lodash");
|
|
|
73814
73804
|
// ../../generator-plugin/dist/esm/context/file.js
|
|
73815
73805
|
var import_path13 = __toESM(require("path"));
|
|
73816
73806
|
|
|
73817
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73807
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
73818
73808
|
var import_comment_json2 = __toESM(require_src2());
|
|
73819
73809
|
var declarationUpdate = __toESM(require_dist());
|
|
73820
73810
|
|
|
73821
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73811
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
73822
73812
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
73823
73813
|
const originJsonValue = await resource.value();
|
|
73824
73814
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -73831,7 +73821,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
73831
73821
|
return newJsonString;
|
|
73832
73822
|
}
|
|
73833
73823
|
|
|
73834
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73824
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
73835
73825
|
var JsonAPI = class {
|
|
73836
73826
|
async get(resource) {
|
|
73837
73827
|
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-
|
|
18
|
+
"version": "0.0.0-next-20231215080115",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/utils": "0.0.0-next-
|
|
26
|
+
"@modern-js/utils": "0.0.0-next-20231215080115"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@modern-js/codesmith": "2.3.
|
|
30
|
-
"@modern-js/codesmith-api-app": "2.3.
|
|
29
|
+
"@modern-js/codesmith": "2.3.1",
|
|
30
|
+
"@modern-js/codesmith-api-app": "2.3.1",
|
|
31
31
|
"@types/jest": "^29",
|
|
32
32
|
"@types/node": "^14",
|
|
33
33
|
"jest": "^29",
|
|
34
34
|
"typescript": "^5",
|
|
35
|
-
"@modern-js/
|
|
36
|
-
"@modern-js/generator-
|
|
37
|
-
"@modern-js/generator
|
|
38
|
-
"@modern-js/
|
|
39
|
-
"@modern-js/monorepo-generator": "0.0.0-next-
|
|
40
|
-
"@modern-js/
|
|
41
|
-
"@scripts/build": "0.0.0-next-
|
|
42
|
-
"@modern-js/generator
|
|
43
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
35
|
+
"@modern-js/generator-utils": "0.0.0-next-20231215080115",
|
|
36
|
+
"@modern-js/generator-common": "0.0.0-next-20231215080115",
|
|
37
|
+
"@modern-js/module-generator": "0.0.0-next-20231215080115",
|
|
38
|
+
"@modern-js/generator-plugin": "0.0.0-next-20231215080115",
|
|
39
|
+
"@modern-js/monorepo-generator": "0.0.0-next-20231215080115",
|
|
40
|
+
"@modern-js/base-generator": "0.0.0-next-20231215080115",
|
|
41
|
+
"@scripts/build": "0.0.0-next-20231215080115",
|
|
42
|
+
"@modern-js/mwa-generator": "0.0.0-next-20231215080115",
|
|
43
|
+
"@scripts/jest-config": "0.0.0-next-20231215080115"
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"publishConfig": {
|