@modern-js/repo-generator 3.5.0 → 3.6.1
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 -72
- package/package.json +12 -12
package/dist/index.js
CHANGED
@@ -68875,7 +68875,7 @@ __export(src_exports, {
|
|
68875
68875
|
});
|
68876
68876
|
module.exports = __toCommonJS(src_exports);
|
68877
68877
|
|
68878
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68878
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
68879
68879
|
var LoggerLevel;
|
68880
68880
|
(function(LoggerLevel2) {
|
68881
68881
|
LoggerLevel2["Error"] = "error";
|
@@ -68896,7 +68896,7 @@ var LevelPriority = [
|
|
68896
68896
|
"stream"
|
68897
68897
|
];
|
68898
68898
|
|
68899
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68899
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
68900
68900
|
var import_utils = require("@modern-js/utils");
|
68901
68901
|
var Logger = class {
|
68902
68902
|
get currentLevelIndex() {
|
@@ -68957,22 +68957,22 @@ var Logger = class {
|
|
68957
68957
|
}
|
68958
68958
|
};
|
68959
68959
|
|
68960
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68960
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
68961
68961
|
var import_path7 = __toESM(require("path"));
|
68962
68962
|
|
68963
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68963
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
68964
68964
|
var import_events = require("events");
|
68965
68965
|
var import_path4 = __toESM(require("path"));
|
68966
68966
|
|
68967
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68967
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
68968
68968
|
var import_path2 = __toESM(require("path"));
|
68969
68969
|
var import_utils3 = require("@modern-js/utils");
|
68970
68970
|
|
68971
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68971
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68972
68972
|
var import_path = __toESM(require("path"));
|
68973
68973
|
var import_utils2 = require("@modern-js/utils");
|
68974
68974
|
|
68975
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68975
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
68976
68976
|
var IMAGE_EXT_LIST = [
|
68977
68977
|
".jpg",
|
68978
68978
|
".jpeg",
|
@@ -68986,7 +68986,7 @@ var IMAGE_EXT_LIST = [
|
|
68986
68986
|
".wmf"
|
68987
68987
|
];
|
68988
68988
|
|
68989
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
68989
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
68990
68990
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
68991
68991
|
var FsResource = class {
|
68992
68992
|
async value() {
|
@@ -69009,7 +69009,7 @@ var FsResource = class {
|
|
69009
69009
|
}
|
69010
69010
|
};
|
69011
69011
|
|
69012
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69012
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
69013
69013
|
var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
|
69014
69014
|
(0, import_utils3.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
69015
69015
|
});
|
@@ -69034,11 +69034,11 @@ var FsMaterial = class {
|
|
69034
69034
|
}
|
69035
69035
|
};
|
69036
69036
|
|
69037
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69037
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69038
69038
|
var import_path3 = __toESM(require("path"));
|
69039
69039
|
var import_utils5 = require("@modern-js/utils");
|
69040
69040
|
|
69041
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69041
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
69042
69042
|
var import_utils4 = require("@modern-js/utils");
|
69043
69043
|
async function fsExists(path17) {
|
69044
69044
|
try {
|
@@ -69049,7 +69049,7 @@ async function fsExists(path17) {
|
|
69049
69049
|
}
|
69050
69050
|
}
|
69051
69051
|
|
69052
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69052
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
69053
69053
|
var MaxTimes = 5;
|
69054
69054
|
async function getGeneratorDir(generator) {
|
69055
69055
|
let result = generator;
|
@@ -69068,7 +69068,7 @@ async function getGeneratorDir(generator) {
|
|
69068
69068
|
return result;
|
69069
69069
|
}
|
69070
69070
|
|
69071
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69071
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
69072
69072
|
var nodeRequire = (path17) => {
|
69073
69073
|
try {
|
69074
69074
|
const module2 = __non_webpack_require__(path17);
|
@@ -69085,7 +69085,7 @@ var nodeRequire = (path17) => {
|
|
69085
69085
|
}
|
69086
69086
|
};
|
69087
69087
|
|
69088
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69088
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
69089
69089
|
var import_utils6 = require("@modern-js/utils");
|
69090
69090
|
var GeneratorCore = class {
|
69091
69091
|
get lifeCycleMethod() {
|
@@ -69285,10 +69285,10 @@ check path: ${import_utils6.chalk.blue.underline(generator)} exist a package.jso
|
|
69285
69285
|
}
|
69286
69286
|
};
|
69287
69287
|
|
69288
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69288
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
69289
69289
|
var import_path6 = __toESM(require("path"));
|
69290
69290
|
|
69291
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69291
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
69292
69292
|
var import_path5 = __toESM(require("path"));
|
69293
69293
|
var import_utils7 = require("@modern-js/utils");
|
69294
69294
|
async function canUseYarn() {
|
@@ -69368,7 +69368,7 @@ async function runInstall(targetDir, registryUrl, logger2) {
|
|
69368
69368
|
}
|
69369
69369
|
}
|
69370
69370
|
|
69371
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69371
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
69372
69372
|
async function timeoutPromise(promise, ms, reason = "Operation") {
|
69373
69373
|
let timeoutId = null;
|
69374
69374
|
const delayPromise = (ms2) => new Promise((resolve) => {
|
@@ -69390,14 +69390,14 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
69390
69390
|
}
|
69391
69391
|
}
|
69392
69392
|
|
69393
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69393
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69394
69394
|
var import_os = __toESM(require("os"));
|
69395
69395
|
|
69396
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69396
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
69397
69397
|
var NPM_API_TIMEOUT = 3e4;
|
69398
69398
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
69399
69399
|
|
69400
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
69400
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
69401
69401
|
var import_utils36 = require("@modern-js/utils");
|
69402
69402
|
|
69403
69403
|
// ../../../../node_modules/.pnpm/axios@1.7.4/node_modules/axios/lib/helpers/bind.js
|
@@ -72686,10 +72686,10 @@ var {
|
|
72686
72686
|
mergeConfig: mergeConfig2
|
72687
72687
|
} = axios_default;
|
72688
72688
|
|
72689
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72689
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72690
72690
|
var import_tar = __toESM(require_tar());
|
72691
72691
|
|
72692
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72692
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
72693
72693
|
var import_utils34 = require("@modern-js/utils");
|
72694
72694
|
async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
72695
72695
|
const { registryUrl } = options || {};
|
@@ -72713,7 +72713,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
72713
72713
|
}
|
72714
72714
|
}
|
72715
72715
|
|
72716
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72716
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
72717
72717
|
var import_utils35 = require("@modern-js/utils");
|
72718
72718
|
async function getNpmVersion(packageName, options) {
|
72719
72719
|
const { version, registryUrl } = options || {};
|
@@ -72735,7 +72735,7 @@ async function getNpmVersion(packageName, options) {
|
|
72735
72735
|
return stdout;
|
72736
72736
|
}
|
72737
72737
|
|
72738
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72738
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
72739
72739
|
async function isValidCache(cacheDir) {
|
72740
72740
|
if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
|
72741
72741
|
const preCacheTimeStr = await import_utils36.fs.readFile(`${cacheDir}/.codesmith.completed`, {
|
@@ -72817,7 +72817,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
72817
72817
|
return targetDir;
|
72818
72818
|
}
|
72819
72819
|
|
72820
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72820
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
72821
72821
|
var import_utils37 = require("@modern-js/utils");
|
72822
72822
|
function getPackageInfo(packageName) {
|
72823
72823
|
if (!packageName) {
|
@@ -72842,7 +72842,7 @@ function getPackageInfo(packageName) {
|
|
72842
72842
|
};
|
72843
72843
|
}
|
72844
72844
|
|
72845
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72845
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
72846
72846
|
var MaterialsManager = class {
|
72847
72847
|
loadLocalGenerator(generator) {
|
72848
72848
|
if (!import_path6.default.isAbsolute(generator)) {
|
@@ -72870,7 +72870,7 @@ var MaterialsManager = class {
|
|
72870
72870
|
}
|
72871
72871
|
};
|
72872
72872
|
|
72873
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
72873
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
72874
72874
|
var CodeSmith = class {
|
72875
72875
|
async forge({ tasks, pwd }) {
|
72876
72876
|
var _this_logger_timing, _this_logger;
|
@@ -72911,13 +72911,13 @@ var CodeSmith = class {
|
|
72911
72911
|
}
|
72912
72912
|
};
|
72913
72913
|
|
72914
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72914
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
72915
72915
|
var import_ejs = __toESM(require_ejs());
|
72916
72916
|
function renderString(template, fullData) {
|
72917
72917
|
return import_ejs.default.render(template, fullData) || "";
|
72918
72918
|
}
|
72919
72919
|
|
72920
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
72920
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
72921
72921
|
var EjsAPI = class {
|
72922
72922
|
async renderTemplate(templateResource, target, parameters = {}) {
|
72923
72923
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -72949,7 +72949,7 @@ var EjsAPI = class {
|
|
72949
72949
|
}
|
72950
72950
|
};
|
72951
72951
|
|
72952
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
72952
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
72953
72953
|
var import_path8 = __toESM(require("path"));
|
72954
72954
|
var import_utils40 = require("@modern-js/utils");
|
72955
72955
|
var FsAPI = class {
|
@@ -72976,7 +72976,7 @@ var FsAPI = class {
|
|
72976
72976
|
}
|
72977
72977
|
};
|
72978
72978
|
|
72979
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
72979
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
72980
72980
|
var import_utils41 = require("@modern-js/utils");
|
72981
72981
|
async function canUseGit() {
|
72982
72982
|
try {
|
@@ -73051,7 +73051,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
73051
73051
|
});
|
73052
73052
|
}
|
73053
73053
|
|
73054
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
73054
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
73055
73055
|
var GitAPI = class {
|
73056
73056
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
73057
73057
|
const canUse = await canUseGit();
|
@@ -73101,7 +73101,7 @@ var GitAPI = class {
|
|
73101
73101
|
}
|
73102
73102
|
};
|
73103
73103
|
|
73104
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73104
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
73105
73105
|
var import_handlebars = __toESM(require_lib());
|
73106
73106
|
function renderString2(template, fullData, registers) {
|
73107
73107
|
const helpers = {
|
@@ -73115,7 +73115,7 @@ function renderString2(template, fullData, registers) {
|
|
73115
73115
|
return import_handlebars.default.compile(template)(fullData) || "";
|
73116
73116
|
}
|
73117
73117
|
|
73118
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
73118
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
73119
73119
|
var HandlebarsAPI = class {
|
73120
73120
|
async registerHelp(helpers) {
|
73121
73121
|
this.registers.helpers = {
|
@@ -73163,7 +73163,7 @@ var HandlebarsAPI = class {
|
|
73163
73163
|
}
|
73164
73164
|
};
|
73165
73165
|
|
73166
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
73166
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
73167
73167
|
var import_utils44 = require("@modern-js/utils");
|
73168
73168
|
async function canUseNvm() {
|
73169
73169
|
try {
|
@@ -73213,7 +73213,7 @@ async function canUsePnpm2() {
|
|
73213
73213
|
}
|
73214
73214
|
}
|
73215
73215
|
|
73216
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
73216
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
73217
73217
|
var import_utils45 = require("@modern-js/utils");
|
73218
73218
|
function execaWithStreamLog(command, args, options) {
|
73219
73219
|
const promise = (0, import_utils45.execa)(command, args, {
|
@@ -73309,7 +73309,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
73309
73309
|
throw new Error("please install pnpm first");
|
73310
73310
|
}
|
73311
73311
|
|
73312
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
73312
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
73313
73313
|
var NpmAPI = class {
|
73314
73314
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
73315
73315
|
return npmInstall({
|
@@ -73337,7 +73337,7 @@ var NpmAPI = class {
|
|
73337
73337
|
}
|
73338
73338
|
};
|
73339
73339
|
|
73340
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
73340
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
73341
73341
|
var import_lodash2 = require("@modern-js/utils/lodash");
|
73342
73342
|
|
73343
73343
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
@@ -82972,10 +82972,10 @@ var Schema = (
|
|
82972
82972
|
}()
|
82973
82973
|
);
|
82974
82974
|
|
82975
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82975
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
82976
82976
|
var import_inquirer = __toESM(require_inquirer());
|
82977
82977
|
|
82978
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
82978
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
82979
82979
|
var import_lodash = require("@modern-js/utils/lodash");
|
82980
82980
|
function validateSchema(schema) {
|
82981
82981
|
const { type, properties } = schema;
|
@@ -83067,7 +83067,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
83067
83067
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
83068
83068
|
}
|
83069
83069
|
|
83070
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83070
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
83071
83071
|
var compileRule = (rule, scope) => {
|
83072
83072
|
const state = Schema.compile(rule, {
|
83073
83073
|
$self: {},
|
@@ -83171,7 +83171,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
83171
83171
|
return answers;
|
83172
83172
|
}
|
83173
83173
|
|
83174
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83174
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
83175
83175
|
var CLIReader = class {
|
83176
83176
|
getAnswers() {
|
83177
83177
|
return this.answers;
|
@@ -83200,7 +83200,7 @@ var CLIReader = class {
|
|
83200
83200
|
}
|
83201
83201
|
};
|
83202
83202
|
|
83203
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
83203
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
83204
83204
|
var FormilyAPI = class {
|
83205
83205
|
mergeAnswers(answers, configValue) {
|
83206
83206
|
const inputData = (0, import_lodash2.merge)(answers, configValue);
|
@@ -83222,7 +83222,7 @@ var FormilyAPI = class {
|
|
83222
83222
|
}
|
83223
83223
|
};
|
83224
83224
|
|
83225
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83225
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
83226
83226
|
var import_utils49 = require("@modern-js/utils");
|
83227
83227
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
83228
83228
|
var import_comment_json = __toESM(require_src3());
|
@@ -83291,7 +83291,7 @@ var I18n = class {
|
|
83291
83291
|
}
|
83292
83292
|
};
|
83293
83293
|
|
83294
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83294
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
83295
83295
|
var EN_LOCALE = {
|
83296
83296
|
environment: {
|
83297
83297
|
node_version: "please upgrade node to lts version",
|
@@ -83318,7 +83318,7 @@ var EN_LOCALE = {
|
|
83318
83318
|
}
|
83319
83319
|
};
|
83320
83320
|
|
83321
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83321
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
83322
83322
|
var ZH_LOCALE = {
|
83323
83323
|
environment: {
|
83324
83324
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -83345,14 +83345,14 @@ var ZH_LOCALE = {
|
|
83345
83345
|
}
|
83346
83346
|
};
|
83347
83347
|
|
83348
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83348
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
83349
83349
|
var i18n = new I18n();
|
83350
83350
|
var localeKeys = i18n.init("zh", {
|
83351
83351
|
zh: ZH_LOCALE,
|
83352
83352
|
en: EN_LOCALE
|
83353
83353
|
});
|
83354
83354
|
|
83355
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83355
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
83356
83356
|
var import_path10 = __toESM(require("path"));
|
83357
83357
|
var import_utils48 = require("@modern-js/utils");
|
83358
83358
|
var NODE_MAJOR_VERSION_MAP = {
|
@@ -83400,7 +83400,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
83400
83400
|
}
|
83401
83401
|
}
|
83402
83402
|
|
83403
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83403
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
83404
83404
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
83405
83405
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
83406
83406
|
for (const question of questions) {
|
@@ -83428,7 +83428,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
83428
83428
|
return questions;
|
83429
83429
|
}
|
83430
83430
|
|
83431
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
83431
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
83432
83432
|
var AppAPI = class {
|
83433
83433
|
async checkEnvironment(nodeVersion) {
|
83434
83434
|
if (import_utils49.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
@@ -84503,7 +84503,7 @@ var SolutionSchemas = {
|
|
84503
84503
|
custom: getBaseSchema
|
84504
84504
|
};
|
84505
84505
|
|
84506
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84506
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_async_to_generator.js
|
84507
84507
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
84508
84508
|
try {
|
84509
84509
|
var info = gen[key](arg);
|
@@ -84533,13 +84533,13 @@ function _async_to_generator(fn) {
|
|
84533
84533
|
};
|
84534
84534
|
}
|
84535
84535
|
|
84536
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84536
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_class_call_check.js
|
84537
84537
|
function _class_call_check(instance, Constructor) {
|
84538
84538
|
if (!(instance instanceof Constructor))
|
84539
84539
|
throw new TypeError("Cannot call a class as a function");
|
84540
84540
|
}
|
84541
84541
|
|
84542
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84542
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.js
|
84543
84543
|
function _define_property(obj, key, value) {
|
84544
84544
|
if (key in obj) {
|
84545
84545
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
@@ -84548,7 +84548,7 @@ function _define_property(obj, key, value) {
|
|
84548
84548
|
return obj;
|
84549
84549
|
}
|
84550
84550
|
|
84551
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84551
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_object_spread.js
|
84552
84552
|
function _object_spread(target) {
|
84553
84553
|
for (var i = 1; i < arguments.length; i++) {
|
84554
84554
|
var source = arguments[i] != null ? arguments[i] : {};
|
@@ -84567,7 +84567,7 @@ function _object_spread(target) {
|
|
84567
84567
|
return target;
|
84568
84568
|
}
|
84569
84569
|
|
84570
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84570
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_object_spread_props.js
|
84571
84571
|
function ownKeys(object, enumerableOnly) {
|
84572
84572
|
var keys = Object.keys(object);
|
84573
84573
|
if (Object.getOwnPropertySymbols) {
|
@@ -84593,7 +84593,7 @@ function _object_spread_props(target, source) {
|
|
84593
84593
|
return target;
|
84594
84594
|
}
|
84595
84595
|
|
84596
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84596
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
84597
84597
|
function _object_without_properties_loose(source, excluded) {
|
84598
84598
|
if (source == null)
|
84599
84599
|
return {};
|
@@ -84609,7 +84609,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
84609
84609
|
return target;
|
84610
84610
|
}
|
84611
84611
|
|
84612
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84612
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_object_without_properties.js
|
84613
84613
|
function _object_without_properties(source, excluded) {
|
84614
84614
|
if (source == null)
|
84615
84615
|
return {};
|
@@ -84629,7 +84629,7 @@ function _object_without_properties(source, excluded) {
|
|
84629
84629
|
return target;
|
84630
84630
|
}
|
84631
84631
|
|
84632
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84632
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
84633
84633
|
function _array_like_to_array(arr, len) {
|
84634
84634
|
if (len == null || len > arr.length)
|
84635
84635
|
len = arr.length;
|
@@ -84638,25 +84638,25 @@ function _array_like_to_array(arr, len) {
|
|
84638
84638
|
return arr2;
|
84639
84639
|
}
|
84640
84640
|
|
84641
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84641
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_array_without_holes.js
|
84642
84642
|
function _array_without_holes(arr) {
|
84643
84643
|
if (Array.isArray(arr))
|
84644
84644
|
return _array_like_to_array(arr);
|
84645
84645
|
}
|
84646
84646
|
|
84647
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84647
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
84648
84648
|
function _iterable_to_array(iter) {
|
84649
84649
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
84650
84650
|
return Array.from(iter);
|
84651
84651
|
}
|
84652
84652
|
}
|
84653
84653
|
|
84654
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84654
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
84655
84655
|
function _non_iterable_spread() {
|
84656
84656
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84657
84657
|
}
|
84658
84658
|
|
84659
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84659
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
84660
84660
|
function _unsupported_iterable_to_array(o, minLen) {
|
84661
84661
|
if (!o)
|
84662
84662
|
return;
|
@@ -84671,7 +84671,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
84671
84671
|
return _array_like_to_array(o, minLen);
|
84672
84672
|
}
|
84673
84673
|
|
84674
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84674
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
84675
84675
|
function _to_consumable_array(arr) {
|
84676
84676
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
84677
84677
|
}
|
@@ -84860,7 +84860,7 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84860
84860
|
const version = await getPackageVersion(`${packageName}@${tag || distTag || "latest"}`, registry2);
|
84861
84861
|
return version;
|
84862
84862
|
};
|
84863
|
-
if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck")) {
|
84863
|
+
if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck") || packageName.includes("eslint-config")) {
|
84864
84864
|
return getLatetPluginVersion("latest");
|
84865
84865
|
}
|
84866
84866
|
let pkgPath = import_path12.default.join(require.resolve(SolutionToolsMap[solution], {
|
@@ -84893,7 +84893,7 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84893
84893
|
// ../../generator-plugin/dist/esm/index.js
|
84894
84894
|
var import_lodash13 = require("@modern-js/utils/lodash");
|
84895
84895
|
|
84896
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
84896
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.13/node_modules/@swc/helpers/esm/_create_class.js
|
84897
84897
|
function _defineProperties(target, props) {
|
84898
84898
|
for (var i = 0; i < props.length; i++) {
|
84899
84899
|
var descriptor = props[i];
|
@@ -84915,11 +84915,11 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
84915
84915
|
// ../../generator-plugin/dist/esm/context/file.js
|
84916
84916
|
var import_path14 = __toESM(require("path"));
|
84917
84917
|
|
84918
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84918
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84919
84919
|
var import_comment_json2 = __toESM(require_src3());
|
84920
84920
|
var declarationUpdate = __toESM(require_dist());
|
84921
84921
|
|
84922
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84922
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
84923
84923
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
84924
84924
|
const originJsonValue = await resource.value();
|
84925
84925
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
@@ -84932,7 +84932,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
84932
84932
|
return newJsonString;
|
84933
84933
|
}
|
84934
84934
|
|
84935
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.
|
84935
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.4.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
84936
84936
|
var JsonAPI = class {
|
84937
84937
|
async get(resource) {
|
84938
84938
|
const originJsonValue = await resource.value();
|
@@ -84944,27 +84944,27 @@ var JsonAPI = class {
|
|
84944
84944
|
throw new Error("resource content is not a legal json");
|
84945
84945
|
}
|
84946
84946
|
}
|
84947
|
-
async extend(resource, obj) {
|
84947
|
+
async extend(resource, obj, endWithNewLine = false) {
|
84948
84948
|
await editJson(this.generatorCore, resource, async () => {
|
84949
84949
|
const originJsonValue = await resource.value();
|
84950
84950
|
try {
|
84951
84951
|
const origin2 = import_comment_json2.default.parse(originJsonValue.content);
|
84952
84952
|
const newObj = import_comment_json2.default.assign(origin2, obj);
|
84953
84953
|
const jsonIntent = 2;
|
84954
|
-
return import_comment_json2.default.stringify(newObj, void 0, jsonIntent);
|
84954
|
+
return import_comment_json2.default.stringify(newObj, void 0, jsonIntent) + (endWithNewLine ? "\n" : "");
|
84955
84955
|
} catch (e) {
|
84956
84956
|
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
84957
84957
|
throw new Error("resource content is not a legal json");
|
84958
84958
|
}
|
84959
84959
|
});
|
84960
84960
|
}
|
84961
|
-
async update(resource, operation) {
|
84961
|
+
async update(resource, operation, endWithNewLine = false) {
|
84962
84962
|
await editJson(this.generatorCore, resource, (text) => {
|
84963
84963
|
try {
|
84964
84964
|
const jsonContent = import_comment_json2.default.parse(text);
|
84965
84965
|
declarationUpdate.query(jsonContent, operation.query, operation.update);
|
84966
84966
|
const jsonIntent = 2;
|
84967
|
-
return Promise.resolve(import_comment_json2.default.stringify(jsonContent, void 0, jsonIntent));
|
84967
|
+
return Promise.resolve(import_comment_json2.default.stringify(jsonContent, void 0, jsonIntent) + (endWithNewLine ? "\n" : ""));
|
84968
84968
|
} catch (e) {
|
84969
84969
|
this.generatorCore.logger.debug("[JSON API] parse json error:", e);
|
84970
84970
|
throw new Error("resource content is not a legal json");
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.
|
18
|
+
"version": "3.6.1",
|
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": "2.
|
26
|
+
"@modern-js/utils": "2.60.1"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@modern-js/codesmith": "2.4.
|
30
|
-
"@modern-js/codesmith-api-app": "2.4.
|
29
|
+
"@modern-js/codesmith": "2.4.2",
|
30
|
+
"@modern-js/codesmith-api-app": "2.4.2",
|
31
31
|
"@types/jest": "^29",
|
32
32
|
"@types/node": "^14",
|
33
33
|
"jest": "^29",
|
34
34
|
"typescript": "^5",
|
35
|
-
"@modern-js/base-generator": "3.
|
36
|
-
"@modern-js/generator-plugin": "3.
|
37
|
-
"@modern-js/generator-common": "3.
|
38
|
-
"@modern-js/generator
|
39
|
-
"@modern-js/
|
40
|
-
"@modern-js/mwa-generator": "3.
|
41
|
-
"@scripts/
|
42
|
-
"@scripts/
|
35
|
+
"@modern-js/base-generator": "3.6.1",
|
36
|
+
"@modern-js/generator-plugin": "3.6.1",
|
37
|
+
"@modern-js/generator-common": "3.6.1",
|
38
|
+
"@modern-js/module-generator": "3.6.1",
|
39
|
+
"@modern-js/generator-utils": "3.6.1",
|
40
|
+
"@modern-js/mwa-generator": "3.6.1",
|
41
|
+
"@scripts/jest-config": "2.60.1",
|
42
|
+
"@scripts/build": "2.60.1"
|
43
43
|
},
|
44
44
|
"sideEffects": false,
|
45
45
|
"publishConfig": {
|