@modern-js/entry-generator 3.2.11 → 3.3.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 +67 -54
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -14524,9 +14524,9 @@ var require_ejs = __commonJS({
|
|
|
14524
14524
|
}
|
|
14525
14525
|
});
|
|
14526
14526
|
|
|
14527
|
-
// ../../../../node_modules/.pnpm/@modern-js+utils@2.
|
|
14527
|
+
// ../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
|
|
14528
14528
|
var require_chalk = __commonJS({
|
|
14529
|
-
"../../../../node_modules/.pnpm/@modern-js+utils@2.
|
|
14529
|
+
"../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
|
|
14530
14530
|
"use strict";
|
|
14531
14531
|
(() => {
|
|
14532
14532
|
var e = { 44: (e2, t2, n2) => {
|
|
@@ -51062,7 +51062,7 @@ var import_lodash8 = require("@modern-js/utils/lodash");
|
|
|
51062
51062
|
var import_path = __toESM(require("path"));
|
|
51063
51063
|
var import_utils2 = require("@modern-js/utils");
|
|
51064
51064
|
|
|
51065
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
51065
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
|
51066
51066
|
function _define_property(obj, key, value) {
|
|
51067
51067
|
if (key in obj) {
|
|
51068
51068
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
@@ -51171,7 +51171,8 @@ var ZH_LOCALE = {
|
|
|
51171
51171
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
51172
51172
|
proxy: "启用「全局代理」",
|
|
51173
51173
|
swc: "启用「SWC 编译」",
|
|
51174
|
-
rspack: "启用「Rspack 构建」(实验性)"
|
|
51174
|
+
rspack: "启用「Rspack 构建」(实验性)",
|
|
51175
|
+
module_doc: "启动「模块文档」功能"
|
|
51175
51176
|
},
|
|
51176
51177
|
element: {
|
|
51177
51178
|
self: "创建工程元素",
|
|
@@ -51269,7 +51270,8 @@ var EN_LOCALE = {
|
|
|
51269
51270
|
polyfill: "Enable UA-based Polyfill Feature",
|
|
51270
51271
|
proxy: "Enable Global Proxy",
|
|
51271
51272
|
swc: "Enable SWC Compile",
|
|
51272
|
-
rspack: "Enable Rspack Build (experimental)"
|
|
51273
|
+
rspack: "Enable Rspack Build (experimental)",
|
|
51274
|
+
module_doc: "Enable Module Doc"
|
|
51273
51275
|
},
|
|
51274
51276
|
element: {
|
|
51275
51277
|
self: "Create Element",
|
|
@@ -51342,10 +51344,6 @@ var BooleanConfig;
|
|
|
51342
51344
|
BooleanConfig2["NO"] = "no";
|
|
51343
51345
|
BooleanConfig2["YES"] = "yes";
|
|
51344
51346
|
})(BooleanConfig || (BooleanConfig = {}));
|
|
51345
|
-
var BooleanConfigName = {
|
|
51346
|
-
[BooleanConfig.NO]: () => i18n.t(localeKeys.boolean.no),
|
|
51347
|
-
[BooleanConfig.YES]: () => i18n.t(localeKeys.boolean.yes)
|
|
51348
|
-
};
|
|
51349
51347
|
|
|
51350
51348
|
// ../../generator-common/dist/esm-node/mwa/entry.js
|
|
51351
51349
|
var getEntryNameSchema = (extra = {}) => {
|
|
@@ -51399,12 +51397,21 @@ async function getPackageObj(context) {
|
|
|
51399
51397
|
return JSON.parse(pkgStr);
|
|
51400
51398
|
}
|
|
51401
51399
|
|
|
51402
|
-
// ../../../../node_modules/.pnpm/@
|
|
51400
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
|
|
51401
|
+
function _define_property2(obj, key, value) {
|
|
51402
|
+
if (key in obj) {
|
|
51403
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
51404
|
+
} else
|
|
51405
|
+
obj[key] = value;
|
|
51406
|
+
return obj;
|
|
51407
|
+
}
|
|
51408
|
+
|
|
51409
|
+
// ../../../../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
|
|
51403
51410
|
var import_utils16 = require("@modern-js/utils");
|
|
51404
51411
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
51405
51412
|
var import_comment_json = __toESM(require_src2());
|
|
51406
51413
|
|
|
51407
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51414
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
51408
51415
|
var import_utils4 = require("@modern-js/utils");
|
|
51409
51416
|
async function canUseNvm() {
|
|
51410
51417
|
try {
|
|
@@ -51454,7 +51461,7 @@ async function canUsePnpm3() {
|
|
|
51454
51461
|
}
|
|
51455
51462
|
}
|
|
51456
51463
|
|
|
51457
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51464
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
51458
51465
|
var import_utils5 = require("@modern-js/utils");
|
|
51459
51466
|
function execaWithStreamLog(command, args, options) {
|
|
51460
51467
|
const promise = (0, import_utils5.execa)(command, args, {
|
|
@@ -51550,7 +51557,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
51550
51557
|
throw new Error("please install pnpm first");
|
|
51551
51558
|
}
|
|
51552
51559
|
|
|
51553
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
51560
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
51554
51561
|
var NpmAPI = class {
|
|
51555
51562
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
51556
51563
|
return npmInstall({
|
|
@@ -51574,12 +51581,12 @@ var NpmAPI = class {
|
|
|
51574
51581
|
});
|
|
51575
51582
|
}
|
|
51576
51583
|
constructor(generatorCore) {
|
|
51577
|
-
|
|
51584
|
+
_define_property2(this, "generatorCore", void 0);
|
|
51578
51585
|
this.generatorCore = generatorCore;
|
|
51579
51586
|
}
|
|
51580
51587
|
};
|
|
51581
51588
|
|
|
51582
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51589
|
+
// ../../../../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
|
|
51583
51590
|
var import_utils7 = require("@modern-js/utils");
|
|
51584
51591
|
async function canUseGit() {
|
|
51585
51592
|
try {
|
|
@@ -51654,7 +51661,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
51654
51661
|
});
|
|
51655
51662
|
}
|
|
51656
51663
|
|
|
51657
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
51664
|
+
// ../../../../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
|
|
51658
51665
|
var GitAPI = class {
|
|
51659
51666
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
51660
51667
|
const canUse = await canUseGit();
|
|
@@ -51699,19 +51706,19 @@ var GitAPI = class {
|
|
|
51699
51706
|
}
|
|
51700
51707
|
}
|
|
51701
51708
|
constructor(generatorCore, generatorContext) {
|
|
51702
|
-
|
|
51703
|
-
|
|
51709
|
+
_define_property2(this, "generatorCore", void 0);
|
|
51710
|
+
_define_property2(this, "generatorContext", void 0);
|
|
51704
51711
|
this.generatorCore = generatorCore;
|
|
51705
51712
|
this.generatorContext = generatorContext;
|
|
51706
51713
|
}
|
|
51707
51714
|
};
|
|
51708
51715
|
|
|
51709
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51716
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
51710
51717
|
var import_path2 = __toESM(require("path"));
|
|
51711
51718
|
var import_utils9 = require("@modern-js/utils");
|
|
51712
51719
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
51713
51720
|
|
|
51714
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
51721
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
51715
51722
|
var import_utils10 = require("@modern-js/utils");
|
|
51716
51723
|
async function fsExists(path7) {
|
|
51717
51724
|
try {
|
|
@@ -51722,7 +51729,7 @@ async function fsExists(path7) {
|
|
|
51722
51729
|
}
|
|
51723
51730
|
}
|
|
51724
51731
|
|
|
51725
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51732
|
+
// ../../../../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
|
|
51726
51733
|
var import_handlebars = __toESM(require_lib());
|
|
51727
51734
|
function renderString(template, fullData, registers) {
|
|
51728
51735
|
const helpers = {
|
|
@@ -51736,7 +51743,7 @@ function renderString(template, fullData, registers) {
|
|
|
51736
51743
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
51737
51744
|
}
|
|
51738
51745
|
|
|
51739
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
51746
|
+
// ../../../../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
|
|
51740
51747
|
var HandlebarsAPI = class {
|
|
51741
51748
|
async registerHelp(helpers) {
|
|
51742
51749
|
this.registers.helpers = {
|
|
@@ -51776,8 +51783,8 @@ var HandlebarsAPI = class {
|
|
|
51776
51783
|
);
|
|
51777
51784
|
}
|
|
51778
51785
|
constructor(generatorCore, registers) {
|
|
51779
|
-
|
|
51780
|
-
|
|
51786
|
+
_define_property2(this, "generatorCore", void 0);
|
|
51787
|
+
_define_property2(this, "registers", void 0);
|
|
51781
51788
|
this.generatorCore = generatorCore;
|
|
51782
51789
|
this.registers = registers || {
|
|
51783
51790
|
helpers: {},
|
|
@@ -51786,13 +51793,13 @@ var HandlebarsAPI = class {
|
|
|
51786
51793
|
}
|
|
51787
51794
|
};
|
|
51788
51795
|
|
|
51789
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51796
|
+
// ../../../../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
|
|
51790
51797
|
var import_ejs = __toESM(require_ejs());
|
|
51791
51798
|
function renderString2(template, fullData) {
|
|
51792
51799
|
return import_ejs.default.render(template, fullData) || "";
|
|
51793
51800
|
}
|
|
51794
51801
|
|
|
51795
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
51802
|
+
// ../../../../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
|
|
51796
51803
|
var EjsAPI = class {
|
|
51797
51804
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
51798
51805
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -51820,12 +51827,12 @@ var EjsAPI = class {
|
|
|
51820
51827
|
);
|
|
51821
51828
|
}
|
|
51822
51829
|
constructor(generatorCore) {
|
|
51823
|
-
|
|
51830
|
+
_define_property2(this, "generatorCore", void 0);
|
|
51824
51831
|
this.generatorCore = generatorCore;
|
|
51825
51832
|
}
|
|
51826
51833
|
};
|
|
51827
51834
|
|
|
51828
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
51835
|
+
// ../../../../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
|
|
51829
51836
|
var import_path3 = __toESM(require("path"));
|
|
51830
51837
|
var import_utils13 = require("@modern-js/utils");
|
|
51831
51838
|
var FsAPI = class {
|
|
@@ -51848,7 +51855,7 @@ var FsAPI = class {
|
|
|
51848
51855
|
}));
|
|
51849
51856
|
}
|
|
51850
51857
|
constructor(generatorCore) {
|
|
51851
|
-
|
|
51858
|
+
_define_property2(this, "generatorCore", void 0);
|
|
51852
51859
|
this.generatorCore = generatorCore;
|
|
51853
51860
|
}
|
|
51854
51861
|
};
|
|
@@ -61409,10 +61416,10 @@ var Schema = (
|
|
|
61409
61416
|
}()
|
|
61410
61417
|
);
|
|
61411
61418
|
|
|
61412
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61419
|
+
// ../../../../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
|
|
61413
61420
|
var import_inquirer = __toESM(require_inquirer());
|
|
61414
61421
|
|
|
61415
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61422
|
+
// ../../../../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
|
|
61416
61423
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
61417
61424
|
function validateSchema(schema) {
|
|
61418
61425
|
const { type, properties } = schema;
|
|
@@ -61504,7 +61511,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
61504
61511
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
61505
61512
|
}
|
|
61506
61513
|
|
|
61507
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61514
|
+
// ../../../../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
|
|
61508
61515
|
var compileRule = (rule, scope) => {
|
|
61509
61516
|
const state = Schema.compile(rule, {
|
|
61510
61517
|
$self: {},
|
|
@@ -61608,7 +61615,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
61608
61615
|
return answers;
|
|
61609
61616
|
}
|
|
61610
61617
|
|
|
61611
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
61618
|
+
// ../../../../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
|
|
61612
61619
|
var CLIReader = class {
|
|
61613
61620
|
getAnswers() {
|
|
61614
61621
|
return this.answers;
|
|
@@ -61628,10 +61635,10 @@ var CLIReader = class {
|
|
|
61628
61635
|
return answers;
|
|
61629
61636
|
}
|
|
61630
61637
|
constructor(options) {
|
|
61631
|
-
|
|
61632
|
-
|
|
61633
|
-
|
|
61634
|
-
|
|
61638
|
+
_define_property2(this, "schema", null);
|
|
61639
|
+
_define_property2(this, "validateMap", void 0);
|
|
61640
|
+
_define_property2(this, "initValue", void 0);
|
|
61641
|
+
_define_property2(this, "answers", {});
|
|
61635
61642
|
const { schema, validateMap, initValue } = options;
|
|
61636
61643
|
this.schema = schema;
|
|
61637
61644
|
this.validateMap = validateMap || {};
|
|
@@ -61639,7 +61646,7 @@ var CLIReader = class {
|
|
|
61639
61646
|
}
|
|
61640
61647
|
};
|
|
61641
61648
|
|
|
61642
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61649
|
+
// ../../../../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
|
|
61643
61650
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
61644
61651
|
|
|
61645
61652
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -61700,12 +61707,12 @@ var I18n2 = class {
|
|
|
61700
61707
|
};
|
|
61701
61708
|
}
|
|
61702
61709
|
constructor() {
|
|
61703
|
-
|
|
61704
|
-
|
|
61710
|
+
_define_property2(this, "language", "en");
|
|
61711
|
+
_define_property2(this, "languageMap", {});
|
|
61705
61712
|
}
|
|
61706
61713
|
};
|
|
61707
61714
|
|
|
61708
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61715
|
+
// ../../../../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
|
|
61709
61716
|
var ZH_LOCALE2 = {
|
|
61710
61717
|
environment: {
|
|
61711
61718
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -61732,7 +61739,7 @@ var ZH_LOCALE2 = {
|
|
|
61732
61739
|
}
|
|
61733
61740
|
};
|
|
61734
61741
|
|
|
61735
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61742
|
+
// ../../../../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
|
|
61736
61743
|
var EN_LOCALE2 = {
|
|
61737
61744
|
environment: {
|
|
61738
61745
|
node_version: "please upgrade node to lts version",
|
|
@@ -61759,14 +61766,14 @@ var EN_LOCALE2 = {
|
|
|
61759
61766
|
}
|
|
61760
61767
|
};
|
|
61761
61768
|
|
|
61762
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61769
|
+
// ../../../../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
|
|
61763
61770
|
var i18n2 = new I18n2();
|
|
61764
61771
|
var localeKeys2 = i18n2.init("zh", {
|
|
61765
61772
|
zh: ZH_LOCALE2,
|
|
61766
61773
|
en: EN_LOCALE2
|
|
61767
61774
|
});
|
|
61768
61775
|
|
|
61769
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61776
|
+
// ../../../../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
|
|
61770
61777
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
61771
61778
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
61772
61779
|
for (const question of questions) {
|
|
@@ -61794,7 +61801,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
61794
61801
|
return questions;
|
|
61795
61802
|
}
|
|
61796
61803
|
|
|
61797
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61804
|
+
// ../../../../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
|
|
61798
61805
|
var import_path5 = __toESM(require("path"));
|
|
61799
61806
|
var import_utils15 = require("@modern-js/utils");
|
|
61800
61807
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -61842,7 +61849,7 @@ async function checkUseNvm(cwd, logger) {
|
|
|
61842
61849
|
}
|
|
61843
61850
|
}
|
|
61844
61851
|
|
|
61845
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
61852
|
+
// ../../../../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
|
|
61846
61853
|
var AppAPI = class {
|
|
61847
61854
|
async checkEnvironment(nodeVersion) {
|
|
61848
61855
|
if (import_utils16.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -61931,6 +61938,7 @@ var AppAPI = class {
|
|
|
61931
61938
|
}
|
|
61932
61939
|
async forgeTemplate(templatePattern, filter, rename, parameters, type = "handlebars") {
|
|
61933
61940
|
try {
|
|
61941
|
+
this.generatorCore.logger.timing(`forgeTemplate`);
|
|
61934
61942
|
const { material } = this.generatorContext.current;
|
|
61935
61943
|
const resourceMap = await material.find(templatePattern, {
|
|
61936
61944
|
nodir: true,
|
|
@@ -61951,10 +61959,13 @@ var AppAPI = class {
|
|
|
61951
61959
|
this.generatorCore.logger.debug("base forging failed:", e);
|
|
61952
61960
|
this.generatorCore.logger.warn(i18n2.t(localeKeys2.templated.failed));
|
|
61953
61961
|
throw new Error("base forging failed");
|
|
61962
|
+
} finally {
|
|
61963
|
+
this.generatorCore.logger.timing(`forgeTemplate`, true);
|
|
61954
61964
|
}
|
|
61955
61965
|
}
|
|
61956
61966
|
async renderTemplateByFileType(templatePattern, filter, rename, parameters) {
|
|
61957
61967
|
try {
|
|
61968
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`);
|
|
61958
61969
|
const { material } = this.generatorContext.current;
|
|
61959
61970
|
const resourceMap = await material.find(templatePattern, {
|
|
61960
61971
|
nodir: true,
|
|
@@ -61985,6 +61996,8 @@ var AppAPI = class {
|
|
|
61985
61996
|
this.generatorCore.logger.debug("base forging failed:", e);
|
|
61986
61997
|
this.generatorCore.logger.warn(i18n2.t(localeKeys2.templated.failed));
|
|
61987
61998
|
throw new Error("base forging failed");
|
|
61999
|
+
} finally {
|
|
62000
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`, true);
|
|
61988
62001
|
}
|
|
61989
62002
|
}
|
|
61990
62003
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
|
@@ -62054,14 +62067,14 @@ var AppAPI = class {
|
|
|
62054
62067
|
}
|
|
62055
62068
|
}
|
|
62056
62069
|
constructor(generatorContext, generatorCore) {
|
|
62057
|
-
|
|
62058
|
-
|
|
62059
|
-
|
|
62060
|
-
|
|
62061
|
-
|
|
62062
|
-
|
|
62063
|
-
|
|
62064
|
-
|
|
62070
|
+
_define_property2(this, "i18n", i18n2);
|
|
62071
|
+
_define_property2(this, "npmApi", void 0);
|
|
62072
|
+
_define_property2(this, "gitApi", void 0);
|
|
62073
|
+
_define_property2(this, "handlebarsAPI", void 0);
|
|
62074
|
+
_define_property2(this, "ejsAPI", void 0);
|
|
62075
|
+
_define_property2(this, "fsAPI", void 0);
|
|
62076
|
+
_define_property2(this, "generatorCore", void 0);
|
|
62077
|
+
_define_property2(this, "generatorContext", void 0);
|
|
62065
62078
|
this.generatorCore = generatorCore;
|
|
62066
62079
|
this.generatorContext = generatorContext;
|
|
62067
62080
|
this.npmApi = new NpmAPI(generatorCore);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.3.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/utils": "2.
|
|
26
|
+
"@modern-js/utils": "2.42.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@modern-js/codesmith": "2.3.
|
|
30
|
-
"@modern-js/codesmith-api-app": "2.3.
|
|
31
|
-
"@modern-js/codesmith-api-handlebars": "2.3.
|
|
29
|
+
"@modern-js/codesmith": "2.3.1",
|
|
30
|
+
"@modern-js/codesmith-api-app": "2.3.1",
|
|
31
|
+
"@modern-js/codesmith-api-handlebars": "2.3.1",
|
|
32
32
|
"@types/jest": "^29",
|
|
33
33
|
"@types/node": "^14",
|
|
34
34
|
"jest": "^29",
|
|
35
35
|
"typescript": "^5",
|
|
36
|
-
"@modern-js/generator-common": "3.
|
|
37
|
-
"@modern-js/generator-utils": "3.
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@scripts/jest-config": "2.
|
|
36
|
+
"@modern-js/generator-common": "3.3.1",
|
|
37
|
+
"@modern-js/generator-utils": "3.3.1",
|
|
38
|
+
"@scripts/build": "2.42.0",
|
|
39
|
+
"@modern-js/plugin-i18n": "2.42.0",
|
|
40
|
+
"@scripts/jest-config": "2.42.0"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"publishConfig": {
|