@modern-js/server-generator 3.3.2 → 3.3.4
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 +42 -38
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -53171,12 +53171,12 @@ function _define_property2(obj, key, value) {
|
|
|
53171
53171
|
return obj;
|
|
53172
53172
|
}
|
|
53173
53173
|
|
|
53174
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
53174
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
53175
53175
|
var import_utils17 = require("@modern-js/utils");
|
|
53176
53176
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
53177
53177
|
var import_comment_json = __toESM(require_src2());
|
|
53178
53178
|
|
|
53179
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53179
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53180
53180
|
var import_utils5 = require("@modern-js/utils");
|
|
53181
53181
|
async function canUseNvm() {
|
|
53182
53182
|
try {
|
|
@@ -53226,7 +53226,7 @@ async function canUsePnpm3() {
|
|
|
53226
53226
|
}
|
|
53227
53227
|
}
|
|
53228
53228
|
|
|
53229
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53229
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53230
53230
|
var import_utils6 = require("@modern-js/utils");
|
|
53231
53231
|
function execaWithStreamLog(command, args, options) {
|
|
53232
53232
|
const promise = (0, import_utils6.execa)(command, args, {
|
|
@@ -53322,7 +53322,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53322
53322
|
throw new Error("please install pnpm first");
|
|
53323
53323
|
}
|
|
53324
53324
|
|
|
53325
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53325
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53326
53326
|
var NpmAPI = class {
|
|
53327
53327
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53328
53328
|
return npmInstall({
|
|
@@ -53351,7 +53351,7 @@ var NpmAPI = class {
|
|
|
53351
53351
|
}
|
|
53352
53352
|
};
|
|
53353
53353
|
|
|
53354
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53354
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
53355
53355
|
var import_utils8 = require("@modern-js/utils");
|
|
53356
53356
|
async function canUseGit() {
|
|
53357
53357
|
try {
|
|
@@ -53426,7 +53426,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53426
53426
|
});
|
|
53427
53427
|
}
|
|
53428
53428
|
|
|
53429
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53429
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
53430
53430
|
var GitAPI = class {
|
|
53431
53431
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53432
53432
|
const canUse = await canUseGit();
|
|
@@ -53478,12 +53478,12 @@ var GitAPI = class {
|
|
|
53478
53478
|
}
|
|
53479
53479
|
};
|
|
53480
53480
|
|
|
53481
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53481
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53482
53482
|
var import_path2 = __toESM(require("path"));
|
|
53483
53483
|
var import_utils10 = require("@modern-js/utils");
|
|
53484
53484
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53485
53485
|
|
|
53486
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53486
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53487
53487
|
var import_utils11 = require("@modern-js/utils");
|
|
53488
53488
|
async function fsExists(path6) {
|
|
53489
53489
|
try {
|
|
@@ -53494,7 +53494,7 @@ async function fsExists(path6) {
|
|
|
53494
53494
|
}
|
|
53495
53495
|
}
|
|
53496
53496
|
|
|
53497
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53497
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
53498
53498
|
var import_handlebars = __toESM(require_lib());
|
|
53499
53499
|
function renderString(template, fullData, registers) {
|
|
53500
53500
|
const helpers = {
|
|
@@ -53508,7 +53508,7 @@ function renderString(template, fullData, registers) {
|
|
|
53508
53508
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53509
53509
|
}
|
|
53510
53510
|
|
|
53511
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53511
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
53512
53512
|
var HandlebarsAPI = class {
|
|
53513
53513
|
async registerHelp(helpers) {
|
|
53514
53514
|
this.registers.helpers = {
|
|
@@ -53558,13 +53558,13 @@ var HandlebarsAPI = class {
|
|
|
53558
53558
|
}
|
|
53559
53559
|
};
|
|
53560
53560
|
|
|
53561
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53561
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
53562
53562
|
var import_ejs = __toESM(require_ejs());
|
|
53563
53563
|
function renderString2(template, fullData) {
|
|
53564
53564
|
return import_ejs.default.render(template, fullData) || "";
|
|
53565
53565
|
}
|
|
53566
53566
|
|
|
53567
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53567
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
53568
53568
|
var EjsAPI = class {
|
|
53569
53569
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53570
53570
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53597,7 +53597,7 @@ var EjsAPI = class {
|
|
|
53597
53597
|
}
|
|
53598
53598
|
};
|
|
53599
53599
|
|
|
53600
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
53600
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
53601
53601
|
var import_path3 = __toESM(require("path"));
|
|
53602
53602
|
var import_utils14 = require("@modern-js/utils");
|
|
53603
53603
|
var FsAPI = class {
|
|
@@ -53946,7 +53946,7 @@ function isEmpty(val, strict) {
|
|
|
53946
53946
|
return false;
|
|
53947
53947
|
}
|
|
53948
53948
|
|
|
53949
|
-
// ../../../../node_modules/.pnpm/tslib@2.
|
|
53949
|
+
// ../../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
|
|
53950
53950
|
var __assign = function() {
|
|
53951
53951
|
__assign = Object.assign || function __assign11(t) {
|
|
53952
53952
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -57560,7 +57560,7 @@ var observe = function(target, observer, deep) {
|
|
|
57560
57560
|
return addListener(target);
|
|
57561
57561
|
};
|
|
57562
57562
|
|
|
57563
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
57563
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/shared.js
|
|
57564
57564
|
var REVA_ACTIONS_KEY = Symbol.for("__REVA_ACTIONS");
|
|
57565
57565
|
var SchemaNestedMap = {
|
|
57566
57566
|
parent: true,
|
|
@@ -57747,7 +57747,7 @@ var patchStateFormSchema = function(targetState, pattern, compiled) {
|
|
|
57747
57747
|
});
|
|
57748
57748
|
};
|
|
57749
57749
|
|
|
57750
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
57750
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/compiler.js
|
|
57751
57751
|
var ExpRE = /^\s*\{\{([\s\S]*)\}\}\s*$/;
|
|
57752
57752
|
var Registry = {
|
|
57753
57753
|
silent: false,
|
|
@@ -62514,7 +62514,7 @@ function onFieldInit(pattern, callback) {
|
|
|
62514
62514
|
}
|
|
62515
62515
|
}
|
|
62516
62516
|
|
|
62517
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
62517
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/transformer.js
|
|
62518
62518
|
var __read7 = function(o, n) {
|
|
62519
62519
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62520
62520
|
if (!m)
|
|
@@ -62739,7 +62739,7 @@ var transformFieldProps = function(schema, options) {
|
|
|
62739
62739
|
};
|
|
62740
62740
|
};
|
|
62741
62741
|
|
|
62742
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
62742
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/patches.js
|
|
62743
62743
|
var __assign9 = function() {
|
|
62744
62744
|
__assign9 = Object.assign || function(t) {
|
|
62745
62745
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -62788,7 +62788,7 @@ var enablePolyfills = function(versions) {
|
|
|
62788
62788
|
}
|
|
62789
62789
|
};
|
|
62790
62790
|
|
|
62791
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
62791
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/polyfills/SPECIFICATION_1_0.js
|
|
62792
62792
|
var __assign10 = function() {
|
|
62793
62793
|
__assign10 = Object.assign || function(t) {
|
|
62794
62794
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -62945,7 +62945,7 @@ var registerTypeDefaultComponents = function(maps) {
|
|
|
62945
62945
|
Object.assign(TYPE_DEFAULT_COMPONENTS, maps);
|
|
62946
62946
|
};
|
|
62947
62947
|
|
|
62948
|
-
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.
|
|
62948
|
+
// ../../../../node_modules/.pnpm/@formily+json-schema@2.2.24_typescript@5.3.3/node_modules/@formily/json-schema/esm/schema.js
|
|
62949
62949
|
var Schema = (
|
|
62950
62950
|
/** @class */
|
|
62951
62951
|
function() {
|
|
@@ -63181,10 +63181,10 @@ var Schema = (
|
|
|
63181
63181
|
}()
|
|
63182
63182
|
);
|
|
63183
63183
|
|
|
63184
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63184
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63185
63185
|
var import_inquirer = __toESM(require_inquirer());
|
|
63186
63186
|
|
|
63187
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63187
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
63188
63188
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63189
63189
|
function validateSchema(schema) {
|
|
63190
63190
|
const { type, properties } = schema;
|
|
@@ -63276,7 +63276,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63276
63276
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63277
63277
|
}
|
|
63278
63278
|
|
|
63279
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63279
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63280
63280
|
var compileRule = (rule, scope) => {
|
|
63281
63281
|
const state = Schema.compile(rule, {
|
|
63282
63282
|
$self: {},
|
|
@@ -63380,7 +63380,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63380
63380
|
return answers;
|
|
63381
63381
|
}
|
|
63382
63382
|
|
|
63383
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63383
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
63384
63384
|
var CLIReader = class {
|
|
63385
63385
|
getAnswers() {
|
|
63386
63386
|
return this.answers;
|
|
@@ -63411,7 +63411,7 @@ var CLIReader = class {
|
|
|
63411
63411
|
}
|
|
63412
63412
|
};
|
|
63413
63413
|
|
|
63414
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63414
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63415
63415
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
63416
63416
|
|
|
63417
63417
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -63477,7 +63477,7 @@ var I18n2 = class {
|
|
|
63477
63477
|
}
|
|
63478
63478
|
};
|
|
63479
63479
|
|
|
63480
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63480
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
63481
63481
|
var ZH_LOCALE2 = {
|
|
63482
63482
|
environment: {
|
|
63483
63483
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63504,7 +63504,7 @@ var ZH_LOCALE2 = {
|
|
|
63504
63504
|
}
|
|
63505
63505
|
};
|
|
63506
63506
|
|
|
63507
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63507
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
63508
63508
|
var EN_LOCALE2 = {
|
|
63509
63509
|
environment: {
|
|
63510
63510
|
node_version: "please upgrade node to lts version",
|
|
@@ -63531,14 +63531,14 @@ var EN_LOCALE2 = {
|
|
|
63531
63531
|
}
|
|
63532
63532
|
};
|
|
63533
63533
|
|
|
63534
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63534
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
63535
63535
|
var i18n2 = new I18n2();
|
|
63536
63536
|
var localeKeys2 = i18n2.init("zh", {
|
|
63537
63537
|
zh: ZH_LOCALE2,
|
|
63538
63538
|
en: EN_LOCALE2
|
|
63539
63539
|
});
|
|
63540
63540
|
|
|
63541
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63541
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
63542
63542
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63543
63543
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63544
63544
|
for (const question of questions) {
|
|
@@ -63566,7 +63566,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63566
63566
|
return questions;
|
|
63567
63567
|
}
|
|
63568
63568
|
|
|
63569
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63569
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
63570
63570
|
var import_path5 = __toESM(require("path"));
|
|
63571
63571
|
var import_utils16 = require("@modern-js/utils");
|
|
63572
63572
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63614,7 +63614,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63614
63614
|
}
|
|
63615
63615
|
}
|
|
63616
63616
|
|
|
63617
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63617
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63618
63618
|
var AppAPI = class {
|
|
63619
63619
|
async checkEnvironment(nodeVersion) {
|
|
63620
63620
|
if (import_utils17.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -63703,7 +63703,8 @@ var AppAPI = class {
|
|
|
63703
63703
|
}
|
|
63704
63704
|
async forgeTemplate(templatePattern, filter, rename, parameters, type = "handlebars") {
|
|
63705
63705
|
try {
|
|
63706
|
-
|
|
63706
|
+
var _this_generatorCore_logger_timing, _this_generatorCore_logger;
|
|
63707
|
+
(_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`);
|
|
63707
63708
|
const { material } = this.generatorContext.current;
|
|
63708
63709
|
const resourceMap = await material.find(templatePattern, {
|
|
63709
63710
|
nodir: true,
|
|
@@ -63725,12 +63726,14 @@ var AppAPI = class {
|
|
|
63725
63726
|
this.generatorCore.logger.warn(i18n2.t(localeKeys2.templated.failed));
|
|
63726
63727
|
throw new Error("base forging failed");
|
|
63727
63728
|
} finally {
|
|
63728
|
-
|
|
63729
|
+
var _this_generatorCore_logger_timing1, _this_generatorCore_logger1;
|
|
63730
|
+
(_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);
|
|
63729
63731
|
}
|
|
63730
63732
|
}
|
|
63731
63733
|
async renderTemplateByFileType(templatePattern, filter, rename, parameters) {
|
|
63732
63734
|
try {
|
|
63733
|
-
|
|
63735
|
+
var _this_generatorCore_logger_timing, _this_generatorCore_logger;
|
|
63736
|
+
(_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`);
|
|
63734
63737
|
const { material } = this.generatorContext.current;
|
|
63735
63738
|
const resourceMap = await material.find(templatePattern, {
|
|
63736
63739
|
nodir: true,
|
|
@@ -63762,7 +63765,8 @@ var AppAPI = class {
|
|
|
63762
63765
|
this.generatorCore.logger.warn(i18n2.t(localeKeys2.templated.failed));
|
|
63763
63766
|
throw new Error("base forging failed");
|
|
63764
63767
|
} finally {
|
|
63765
|
-
|
|
63768
|
+
var _this_generatorCore_logger_timing1, _this_generatorCore_logger1;
|
|
63769
|
+
(_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);
|
|
63766
63770
|
}
|
|
63767
63771
|
}
|
|
63768
63772
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
|
@@ -63850,11 +63854,11 @@ var AppAPI = class {
|
|
|
63850
63854
|
}
|
|
63851
63855
|
};
|
|
63852
63856
|
|
|
63853
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63857
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63854
63858
|
var import_comment_json2 = __toESM(require_src2());
|
|
63855
63859
|
var declarationUpdate = __toESM(require_dist());
|
|
63856
63860
|
|
|
63857
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63861
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
63858
63862
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63859
63863
|
const originJsonValue = await resource.value();
|
|
63860
63864
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -63867,7 +63871,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
63867
63871
|
return newJsonString;
|
|
63868
63872
|
}
|
|
63869
63873
|
|
|
63870
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63874
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63871
63875
|
var JsonAPI = class {
|
|
63872
63876
|
async get(resource) {
|
|
63873
63877
|
const originJsonValue = await resource.value();
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.3.
|
|
18
|
+
"version": "3.3.4",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"/dist/index.js"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modern-js/utils": "2.
|
|
27
|
+
"@modern-js/utils": "2.43.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@modern-js/codesmith": "2.3.
|
|
31
|
-
"@modern-js/codesmith-api-app": "2.3.
|
|
32
|
-
"@modern-js/codesmith-api-json": "2.3.
|
|
30
|
+
"@modern-js/codesmith": "2.3.2",
|
|
31
|
+
"@modern-js/codesmith-api-app": "2.3.2",
|
|
32
|
+
"@modern-js/codesmith-api-json": "2.3.2",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/generator-common": "3.3.
|
|
38
|
-
"@modern-js/dependence-generator": "3.3.
|
|
39
|
-
"@scripts/
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
37
|
+
"@modern-js/generator-common": "3.3.4",
|
|
38
|
+
"@modern-js/dependence-generator": "3.3.4",
|
|
39
|
+
"@scripts/jest-config": "2.43.0",
|
|
40
|
+
"@scripts/build": "2.43.0",
|
|
41
|
+
"@modern-js/generator-utils": "3.3.4"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|