@modern-js/server-generator 3.3.5 → 3.3.7
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 +27 -27
- 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.3_@modern-js+codesmith@2.3.3_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.3/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.3/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.3/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.3_@modern-js+codesmith@2.3.3/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.3_@modern-js+codesmith@2.3.3/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.3/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.3/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.3_@modern-js+codesmith@2.3.3/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.3_@modern-js+codesmith@2.3.3/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.3_@modern-js+codesmith@2.3.3/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.3_@modern-js+codesmith@2.3.3/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.3_@modern-js+codesmith@2.3.3/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 {
|
|
@@ -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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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.3_@modern-js+codesmith@2.3.3_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")) {
|
|
@@ -63854,11 +63854,11 @@ var AppAPI = class {
|
|
|
63854
63854
|
}
|
|
63855
63855
|
};
|
|
63856
63856
|
|
|
63857
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63857
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63858
63858
|
var import_comment_json2 = __toESM(require_src2());
|
|
63859
63859
|
var declarationUpdate = __toESM(require_dist());
|
|
63860
63860
|
|
|
63861
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63861
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
63862
63862
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
63863
63863
|
const originJsonValue = await resource.value();
|
|
63864
63864
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -63871,7 +63871,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
63871
63871
|
return newJsonString;
|
|
63872
63872
|
}
|
|
63873
63873
|
|
|
63874
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
63874
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
63875
63875
|
var JsonAPI = class {
|
|
63876
63876
|
async get(resource) {
|
|
63877
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.7",
|
|
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.46.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.3",
|
|
31
|
+
"@modern-js/codesmith-api-app": "2.3.3",
|
|
32
|
+
"@modern-js/codesmith-api-json": "2.3.3",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/generator-
|
|
38
|
-
"@modern-js/
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@scripts/jest-config": "2.
|
|
37
|
+
"@modern-js/generator-common": "3.3.7",
|
|
38
|
+
"@modern-js/generator-utils": "3.3.7",
|
|
39
|
+
"@modern-js/dependence-generator": "3.3.7",
|
|
40
|
+
"@scripts/build": "2.46.0",
|
|
41
|
+
"@scripts/jest-config": "2.46.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|