@modern-js/entry-generator 3.7.31 → 3.7.33
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 +29 -28
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -63498,13 +63498,13 @@ __export(src_exports, {
|
|
|
63498
63498
|
module.exports = __toCommonJS(src_exports);
|
|
63499
63499
|
var import_path6 = __toESM(require("path"));
|
|
63500
63500
|
|
|
63501
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63501
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.8/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
|
|
63502
63502
|
var import_fs_extra = __toESM(require_lib());
|
|
63503
63503
|
|
|
63504
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63504
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
63505
63505
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
63506
63506
|
|
|
63507
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
63507
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
63508
63508
|
function fsExists(path6) {
|
|
63509
63509
|
return __async(this, null, function* () {
|
|
63510
63510
|
try {
|
|
@@ -63516,19 +63516,19 @@ function fsExists(path6) {
|
|
|
63516
63516
|
});
|
|
63517
63517
|
}
|
|
63518
63518
|
|
|
63519
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63519
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.8/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
|
|
63520
63520
|
var import_execa = __toESM(require_execa());
|
|
63521
63521
|
|
|
63522
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63522
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.8/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
|
|
63523
63523
|
var import_semver = __toESM(require_semver2());
|
|
63524
63524
|
|
|
63525
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63525
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
63526
63526
|
var import_ejs = __toESM(require_ejs());
|
|
63527
63527
|
function renderString(template, fullData) {
|
|
63528
63528
|
return import_ejs.default.render(template, fullData) || "";
|
|
63529
63529
|
}
|
|
63530
63530
|
|
|
63531
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.
|
|
63531
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
63532
63532
|
var EjsAPI = class {
|
|
63533
63533
|
renderTemplate(_0, _1) {
|
|
63534
63534
|
return __async(this, arguments, function* (templateResource, target, parameters = {}) {
|
|
@@ -63563,7 +63563,7 @@ var EjsAPI = class {
|
|
|
63563
63563
|
}
|
|
63564
63564
|
};
|
|
63565
63565
|
|
|
63566
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.6.
|
|
63566
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
63567
63567
|
var import_path = __toESM(require("path"));
|
|
63568
63568
|
var FsAPI = class {
|
|
63569
63569
|
renderFile(resource, target) {
|
|
@@ -63592,7 +63592,7 @@ var FsAPI = class {
|
|
|
63592
63592
|
}
|
|
63593
63593
|
};
|
|
63594
63594
|
|
|
63595
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63595
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
63596
63596
|
function canUseGit() {
|
|
63597
63597
|
return __async(this, null, function* () {
|
|
63598
63598
|
try {
|
|
@@ -63676,7 +63676,7 @@ function gitCommit(cwd, commitMessage) {
|
|
|
63676
63676
|
});
|
|
63677
63677
|
}
|
|
63678
63678
|
|
|
63679
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.
|
|
63679
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
63680
63680
|
var GitAPI = class {
|
|
63681
63681
|
isInGitRepo() {
|
|
63682
63682
|
return __async(this, arguments, function* (cwd = this.generatorCore.outputPath) {
|
|
@@ -63732,7 +63732,7 @@ var GitAPI = class {
|
|
|
63732
63732
|
}
|
|
63733
63733
|
};
|
|
63734
63734
|
|
|
63735
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63735
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
63736
63736
|
var import_handlebars = __toESM(require_lib2());
|
|
63737
63737
|
function renderString2(template, fullData, registers) {
|
|
63738
63738
|
const helpers = __spreadValues({}, registers === null || registers === void 0 ? void 0 : registers.helpers);
|
|
@@ -63742,7 +63742,7 @@ function renderString2(template, fullData, registers) {
|
|
|
63742
63742
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
63743
63743
|
}
|
|
63744
63744
|
|
|
63745
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.
|
|
63745
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
63746
63746
|
var HandlebarsAPI = class {
|
|
63747
63747
|
registerHelp(helpers) {
|
|
63748
63748
|
return __async(this, null, function* () {
|
|
@@ -63899,7 +63899,7 @@ function __generator(thisArg, body) {
|
|
|
63899
63899
|
}
|
|
63900
63900
|
}
|
|
63901
63901
|
|
|
63902
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
63902
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.8/node_modules/@modern-js/codesmith-utils/dist/esm/npm.js
|
|
63903
63903
|
var import_execa3 = __toESM(require_execa());
|
|
63904
63904
|
function canUseNvm() {
|
|
63905
63905
|
return _canUseNvm.apply(this, arguments);
|
|
@@ -64120,7 +64120,7 @@ function _canUsePnpm() {
|
|
|
64120
64120
|
return _canUsePnpm.apply(this, arguments);
|
|
64121
64121
|
}
|
|
64122
64122
|
|
|
64123
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64123
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
64124
64124
|
function execaWithStreamLog(command, args, options) {
|
|
64125
64125
|
const promise = (0, import_execa.default)(command, args, __spreadProps(__spreadValues({}, options), {
|
|
64126
64126
|
stdin: "inherit",
|
|
@@ -64221,7 +64221,7 @@ function pnpmInstall(_0) {
|
|
|
64221
64221
|
});
|
|
64222
64222
|
}
|
|
64223
64223
|
|
|
64224
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.
|
|
64224
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.6.8_@modern-js+codesmith@2.6.8/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
64225
64225
|
var NpmAPI = class {
|
|
64226
64226
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
64227
64227
|
return npmInstall({
|
|
@@ -64249,7 +64249,7 @@ var NpmAPI = class {
|
|
|
64249
64249
|
}
|
|
64250
64250
|
};
|
|
64251
64251
|
|
|
64252
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
64252
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.8/node_modules/@modern-js/codesmith-utils/dist/esm/lodash.js
|
|
64253
64253
|
var import_lodash = __toESM(require_lodash());
|
|
64254
64254
|
var import_lodash2 = __toESM(require_lodash2());
|
|
64255
64255
|
var import_lodash3 = __toESM(require_lodash3());
|
|
@@ -70016,10 +70016,10 @@ var Schema = (
|
|
|
70016
70016
|
}()
|
|
70017
70017
|
);
|
|
70018
70018
|
|
|
70019
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70019
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
70020
70020
|
var import_inquirer = __toESM(require_inquirer());
|
|
70021
70021
|
|
|
70022
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70022
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
70023
70023
|
function validateSchema(schema) {
|
|
70024
70024
|
const { type, properties } = schema;
|
|
70025
70025
|
if (type !== "object") {
|
|
@@ -70106,7 +70106,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
70106
70106
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
70107
70107
|
}
|
|
70108
70108
|
|
|
70109
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70109
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
70110
70110
|
var compileRule = (rule, scope) => {
|
|
70111
70111
|
const state = Schema.compile(rule, __spreadValues({
|
|
70112
70112
|
$self: {},
|
|
@@ -70206,7 +70206,7 @@ function prompt(_0) {
|
|
|
70206
70206
|
});
|
|
70207
70207
|
}
|
|
70208
70208
|
|
|
70209
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.
|
|
70209
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
70210
70210
|
var CLIReader = class {
|
|
70211
70211
|
getAnswers() {
|
|
70212
70212
|
return this.answers;
|
|
@@ -70234,7 +70234,7 @@ var CLIReader = class {
|
|
|
70234
70234
|
}
|
|
70235
70235
|
};
|
|
70236
70236
|
|
|
70237
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70237
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
70238
70238
|
var import_comment_json = __toESM(require_src2());
|
|
70239
70239
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
70240
70240
|
|
|
@@ -70301,7 +70301,7 @@ var I18n = class {
|
|
|
70301
70301
|
}
|
|
70302
70302
|
};
|
|
70303
70303
|
|
|
70304
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70304
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
70305
70305
|
var EN_LOCALE = {
|
|
70306
70306
|
environment: {
|
|
70307
70307
|
node_version: "The version of Node.js is too low. Please upgrade to the LTS version: https://nodejs.org/",
|
|
@@ -70328,7 +70328,7 @@ var EN_LOCALE = {
|
|
|
70328
70328
|
}
|
|
70329
70329
|
};
|
|
70330
70330
|
|
|
70331
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70331
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
70332
70332
|
var ZH_LOCALE = {
|
|
70333
70333
|
environment: {
|
|
70334
70334
|
node_version: "Node.js 版本太低,请升级至 LTS 版本: https://nodejs.org/",
|
|
@@ -70355,14 +70355,14 @@ var ZH_LOCALE = {
|
|
|
70355
70355
|
}
|
|
70356
70356
|
};
|
|
70357
70357
|
|
|
70358
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70358
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
70359
70359
|
var i18n = new I18n();
|
|
70360
70360
|
var localeKeys = i18n.init("zh", {
|
|
70361
70361
|
zh: ZH_LOCALE,
|
|
70362
70362
|
en: EN_LOCALE
|
|
70363
70363
|
});
|
|
70364
70364
|
|
|
70365
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70365
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
70366
70366
|
var import_path3 = __toESM(require("path"));
|
|
70367
70367
|
var NODE_MAJOR_VERSION_MAP = {
|
|
70368
70368
|
"lts/*": 18,
|
|
@@ -70373,7 +70373,8 @@ var NODE_MAJOR_VERSION_MAP = {
|
|
|
70373
70373
|
"lts/erbium": 12,
|
|
70374
70374
|
"lts/fermium": 14,
|
|
70375
70375
|
"lts/gallium": 16,
|
|
70376
|
-
"lts/hydrogen": 18
|
|
70376
|
+
"lts/hydrogen": 18,
|
|
70377
|
+
"lts/jod": 22
|
|
70377
70378
|
};
|
|
70378
70379
|
function getNoteVersion() {
|
|
70379
70380
|
return __async(this, null, function* () {
|
|
@@ -70413,7 +70414,7 @@ function checkUseNvm(cwd, logger) {
|
|
|
70413
70414
|
});
|
|
70414
70415
|
}
|
|
70415
70416
|
|
|
70416
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70417
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
70417
70418
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
70418
70419
|
for (const question of questions) {
|
|
70419
70420
|
question.default = initValue[question.name] || question.default;
|
|
@@ -70440,7 +70441,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
70440
70441
|
return questions;
|
|
70441
70442
|
}
|
|
70442
70443
|
|
|
70443
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.
|
|
70444
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.6.8_@modern-js+codesmith@2.6.8_typescript@5.6.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
70444
70445
|
var AppAPI = class {
|
|
70445
70446
|
checkEnvironment(nodeVersion) {
|
|
70446
70447
|
return __async(this, null, function* () {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.7.
|
|
18
|
+
"version": "3.7.33",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@modern-js/codesmith": "2.6.
|
|
27
|
-
"@modern-js/codesmith-api-app": "2.6.
|
|
28
|
-
"@modern-js/codesmith-api-handlebars": "2.6.
|
|
29
|
-
"@modern-js/codesmith-utils": "2.6.
|
|
26
|
+
"@modern-js/codesmith": "2.6.8",
|
|
27
|
+
"@modern-js/codesmith-api-app": "2.6.8",
|
|
28
|
+
"@modern-js/codesmith-api-handlebars": "2.6.8",
|
|
29
|
+
"@modern-js/codesmith-utils": "2.6.8",
|
|
30
30
|
"@types/jest": "^29",
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@modern-js/generator-common": "3.7.
|
|
35
|
-
"@modern-js/
|
|
34
|
+
"@modern-js/generator-common": "3.7.33",
|
|
35
|
+
"@modern-js/generator-utils": "3.7.33",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.67.8",
|
|
36
37
|
"@scripts/build": "2.66.0",
|
|
37
|
-
"@modern-js/generator-utils": "3.7.31",
|
|
38
38
|
"@scripts/jest-config": "2.66.0"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|