@modern-js/bff-generator 3.3.9 → 3.3.10
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
|
@@ -53380,12 +53380,12 @@ function _define_property2(obj, key, value) {
|
|
|
53380
53380
|
return obj;
|
|
53381
53381
|
}
|
|
53382
53382
|
|
|
53383
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
53383
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
53384
53384
|
var import_utils18 = require("@modern-js/utils");
|
|
53385
53385
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
53386
53386
|
var import_comment_json = __toESM(require_src2());
|
|
53387
53387
|
|
|
53388
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53388
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53389
53389
|
var import_utils6 = require("@modern-js/utils");
|
|
53390
53390
|
async function canUseNvm() {
|
|
53391
53391
|
try {
|
|
@@ -53435,7 +53435,7 @@ async function canUsePnpm3() {
|
|
|
53435
53435
|
}
|
|
53436
53436
|
}
|
|
53437
53437
|
|
|
53438
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53438
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53439
53439
|
var import_utils7 = require("@modern-js/utils");
|
|
53440
53440
|
function execaWithStreamLog(command, args, options) {
|
|
53441
53441
|
const promise = (0, import_utils7.execa)(command, args, {
|
|
@@ -53531,7 +53531,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53531
53531
|
throw new Error("please install pnpm first");
|
|
53532
53532
|
}
|
|
53533
53533
|
|
|
53534
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53534
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.5/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53535
53535
|
var NpmAPI = class {
|
|
53536
53536
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53537
53537
|
return npmInstall({
|
|
@@ -53560,7 +53560,7 @@ var NpmAPI = class {
|
|
|
53560
53560
|
}
|
|
53561
53561
|
};
|
|
53562
53562
|
|
|
53563
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53563
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
53564
53564
|
var import_utils9 = require("@modern-js/utils");
|
|
53565
53565
|
async function canUseGit() {
|
|
53566
53566
|
try {
|
|
@@ -53635,7 +53635,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53635
53635
|
});
|
|
53636
53636
|
}
|
|
53637
53637
|
|
|
53638
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53638
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
53639
53639
|
var GitAPI = class {
|
|
53640
53640
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53641
53641
|
const canUse = await canUseGit();
|
|
@@ -53687,12 +53687,12 @@ var GitAPI = class {
|
|
|
53687
53687
|
}
|
|
53688
53688
|
};
|
|
53689
53689
|
|
|
53690
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53690
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53691
53691
|
var import_path2 = __toESM(require("path"));
|
|
53692
53692
|
var import_utils11 = require("@modern-js/utils");
|
|
53693
53693
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53694
53694
|
|
|
53695
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53695
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53696
53696
|
var import_utils12 = require("@modern-js/utils");
|
|
53697
53697
|
async function fsExists(path6) {
|
|
53698
53698
|
try {
|
|
@@ -53703,7 +53703,7 @@ async function fsExists(path6) {
|
|
|
53703
53703
|
}
|
|
53704
53704
|
}
|
|
53705
53705
|
|
|
53706
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53706
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
53707
53707
|
var import_handlebars = __toESM(require_lib());
|
|
53708
53708
|
function renderString(template, fullData, registers) {
|
|
53709
53709
|
const helpers = {
|
|
@@ -53717,7 +53717,7 @@ function renderString(template, fullData, registers) {
|
|
|
53717
53717
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53718
53718
|
}
|
|
53719
53719
|
|
|
53720
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53720
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
53721
53721
|
var HandlebarsAPI = class {
|
|
53722
53722
|
async registerHelp(helpers) {
|
|
53723
53723
|
this.registers.helpers = {
|
|
@@ -53767,13 +53767,13 @@ var HandlebarsAPI = class {
|
|
|
53767
53767
|
}
|
|
53768
53768
|
};
|
|
53769
53769
|
|
|
53770
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53770
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
53771
53771
|
var import_ejs = __toESM(require_ejs());
|
|
53772
53772
|
function renderString2(template, fullData) {
|
|
53773
53773
|
return import_ejs.default.render(template, fullData) || "";
|
|
53774
53774
|
}
|
|
53775
53775
|
|
|
53776
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53776
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
53777
53777
|
var EjsAPI = class {
|
|
53778
53778
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53779
53779
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53806,7 +53806,7 @@ var EjsAPI = class {
|
|
|
53806
53806
|
}
|
|
53807
53807
|
};
|
|
53808
53808
|
|
|
53809
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
53809
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.5_@modern-js+codesmith@2.3.5/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
53810
53810
|
var import_path3 = __toESM(require("path"));
|
|
53811
53811
|
var import_utils15 = require("@modern-js/utils");
|
|
53812
53812
|
var FsAPI = class {
|
|
@@ -63390,10 +63390,10 @@ var Schema = (
|
|
|
63390
63390
|
}()
|
|
63391
63391
|
);
|
|
63392
63392
|
|
|
63393
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63393
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63394
63394
|
var import_inquirer = __toESM(require_inquirer());
|
|
63395
63395
|
|
|
63396
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63396
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
63397
63397
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63398
63398
|
function validateSchema(schema) {
|
|
63399
63399
|
const { type, properties } = schema;
|
|
@@ -63485,7 +63485,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63485
63485
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63486
63486
|
}
|
|
63487
63487
|
|
|
63488
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63488
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
63489
63489
|
var compileRule = (rule, scope) => {
|
|
63490
63490
|
const state = Schema.compile(rule, {
|
|
63491
63491
|
$self: {},
|
|
@@ -63589,7 +63589,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63589
63589
|
return answers;
|
|
63590
63590
|
}
|
|
63591
63591
|
|
|
63592
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63592
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
63593
63593
|
var CLIReader = class {
|
|
63594
63594
|
getAnswers() {
|
|
63595
63595
|
return this.answers;
|
|
@@ -63620,7 +63620,7 @@ var CLIReader = class {
|
|
|
63620
63620
|
}
|
|
63621
63621
|
};
|
|
63622
63622
|
|
|
63623
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63623
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63624
63624
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
63625
63625
|
|
|
63626
63626
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -63686,7 +63686,7 @@ var I18n2 = class {
|
|
|
63686
63686
|
}
|
|
63687
63687
|
};
|
|
63688
63688
|
|
|
63689
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63689
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
63690
63690
|
var ZH_LOCALE2 = {
|
|
63691
63691
|
environment: {
|
|
63692
63692
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63713,7 +63713,7 @@ var ZH_LOCALE2 = {
|
|
|
63713
63713
|
}
|
|
63714
63714
|
};
|
|
63715
63715
|
|
|
63716
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63716
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
63717
63717
|
var EN_LOCALE2 = {
|
|
63718
63718
|
environment: {
|
|
63719
63719
|
node_version: "please upgrade node to lts version",
|
|
@@ -63740,14 +63740,14 @@ var EN_LOCALE2 = {
|
|
|
63740
63740
|
}
|
|
63741
63741
|
};
|
|
63742
63742
|
|
|
63743
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63743
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
63744
63744
|
var i18n2 = new I18n2();
|
|
63745
63745
|
var localeKeys2 = i18n2.init("zh", {
|
|
63746
63746
|
zh: ZH_LOCALE2,
|
|
63747
63747
|
en: EN_LOCALE2
|
|
63748
63748
|
});
|
|
63749
63749
|
|
|
63750
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63750
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
63751
63751
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63752
63752
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63753
63753
|
for (const question of questions) {
|
|
@@ -63775,7 +63775,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63775
63775
|
return questions;
|
|
63776
63776
|
}
|
|
63777
63777
|
|
|
63778
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63778
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
63779
63779
|
var import_path5 = __toESM(require("path"));
|
|
63780
63780
|
var import_utils17 = require("@modern-js/utils");
|
|
63781
63781
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63823,7 +63823,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63823
63823
|
}
|
|
63824
63824
|
}
|
|
63825
63825
|
|
|
63826
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63826
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.5_@modern-js+codesmith@2.3.5_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
63827
63827
|
var AppAPI = class {
|
|
63828
63828
|
async checkEnvironment(nodeVersion) {
|
|
63829
63829
|
if (import_utils18.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -64063,11 +64063,11 @@ var AppAPI = class {
|
|
|
64063
64063
|
}
|
|
64064
64064
|
};
|
|
64065
64065
|
|
|
64066
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64066
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64067
64067
|
var import_comment_json2 = __toESM(require_src2());
|
|
64068
64068
|
var declarationUpdate = __toESM(require_dist());
|
|
64069
64069
|
|
|
64070
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64070
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
64071
64071
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
64072
64072
|
const originJsonValue = await resource.value();
|
|
64073
64073
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -64080,7 +64080,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
64080
64080
|
return newJsonString;
|
|
64081
64081
|
}
|
|
64082
64082
|
|
|
64083
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64083
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.5/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64084
64084
|
var JsonAPI = class {
|
|
64085
64085
|
async get(resource) {
|
|
64086
64086
|
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.10",
|
|
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.47.
|
|
27
|
+
"@modern-js/utils": "2.47.1"
|
|
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.5",
|
|
31
|
+
"@modern-js/codesmith-api-app": "2.3.5",
|
|
32
|
+
"@modern-js/codesmith-api-json": "2.3.5",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/generator-
|
|
38
|
-
"@
|
|
39
|
-
"@modern-js/
|
|
40
|
-
"@scripts/
|
|
41
|
-
"@
|
|
37
|
+
"@modern-js/generator-utils": "3.3.10",
|
|
38
|
+
"@scripts/build": "2.47.1",
|
|
39
|
+
"@modern-js/plugin-i18n": "2.47.1",
|
|
40
|
+
"@scripts/jest-config": "2.47.1",
|
|
41
|
+
"@modern-js/generator-common": "3.3.10"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|