@modern-js/bff-generator 3.3.6 → 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 +28 -29
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -53126,8 +53126,7 @@ var MWAActionFunctionsDevDependencies = {
|
|
|
53126
53126
|
[ActionFunction.StorybookV7]: "@modern-js/storybook",
|
|
53127
53127
|
[ActionFunction.Proxy]: "@modern-js/plugin-proxy",
|
|
53128
53128
|
[ActionFunction.TailwindCSS]: "tailwindcss",
|
|
53129
|
-
[ActionFunction.SWC]: "@modern-js/plugin-swc"
|
|
53130
|
-
[ActionFunction.Rspack]: "@modern-js/builder-rspack-provider"
|
|
53129
|
+
[ActionFunction.SWC]: "@modern-js/plugin-swc"
|
|
53131
53130
|
};
|
|
53132
53131
|
var MWAActionFunctionsDependencies = {
|
|
53133
53132
|
[ActionFunction.BFF]: "@modern-js/plugin-bff",
|
|
@@ -53416,12 +53415,12 @@ function _define_property2(obj, key, value) {
|
|
|
53416
53415
|
return obj;
|
|
53417
53416
|
}
|
|
53418
53417
|
|
|
53419
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
53418
|
+
// ../../../../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
|
|
53420
53419
|
var import_utils18 = require("@modern-js/utils");
|
|
53421
53420
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
53422
53421
|
var import_comment_json = __toESM(require_src2());
|
|
53423
53422
|
|
|
53424
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53423
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
53425
53424
|
var import_utils6 = require("@modern-js/utils");
|
|
53426
53425
|
async function canUseNvm() {
|
|
53427
53426
|
try {
|
|
@@ -53471,7 +53470,7 @@ async function canUsePnpm3() {
|
|
|
53471
53470
|
}
|
|
53472
53471
|
}
|
|
53473
53472
|
|
|
53474
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53473
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
53475
53474
|
var import_utils7 = require("@modern-js/utils");
|
|
53476
53475
|
function execaWithStreamLog(command, args, options) {
|
|
53477
53476
|
const promise = (0, import_utils7.execa)(command, args, {
|
|
@@ -53567,7 +53566,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
53567
53566
|
throw new Error("please install pnpm first");
|
|
53568
53567
|
}
|
|
53569
53568
|
|
|
53570
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
53569
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
53571
53570
|
var NpmAPI = class {
|
|
53572
53571
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
53573
53572
|
return npmInstall({
|
|
@@ -53596,7 +53595,7 @@ var NpmAPI = class {
|
|
|
53596
53595
|
}
|
|
53597
53596
|
};
|
|
53598
53597
|
|
|
53599
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53598
|
+
// ../../../../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
|
|
53600
53599
|
var import_utils9 = require("@modern-js/utils");
|
|
53601
53600
|
async function canUseGit() {
|
|
53602
53601
|
try {
|
|
@@ -53671,7 +53670,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
53671
53670
|
});
|
|
53672
53671
|
}
|
|
53673
53672
|
|
|
53674
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
53673
|
+
// ../../../../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
|
|
53675
53674
|
var GitAPI = class {
|
|
53676
53675
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
53677
53676
|
const canUse = await canUseGit();
|
|
@@ -53723,12 +53722,12 @@ var GitAPI = class {
|
|
|
53723
53722
|
}
|
|
53724
53723
|
};
|
|
53725
53724
|
|
|
53726
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53725
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
53727
53726
|
var import_path2 = __toESM(require("path"));
|
|
53728
53727
|
var import_utils11 = require("@modern-js/utils");
|
|
53729
53728
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
53730
53729
|
|
|
53731
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
53730
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
53732
53731
|
var import_utils12 = require("@modern-js/utils");
|
|
53733
53732
|
async function fsExists(path6) {
|
|
53734
53733
|
try {
|
|
@@ -53739,7 +53738,7 @@ async function fsExists(path6) {
|
|
|
53739
53738
|
}
|
|
53740
53739
|
}
|
|
53741
53740
|
|
|
53742
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53741
|
+
// ../../../../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
|
|
53743
53742
|
var import_handlebars = __toESM(require_lib());
|
|
53744
53743
|
function renderString(template, fullData, registers) {
|
|
53745
53744
|
const helpers = {
|
|
@@ -53753,7 +53752,7 @@ function renderString(template, fullData, registers) {
|
|
|
53753
53752
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
53754
53753
|
}
|
|
53755
53754
|
|
|
53756
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
53755
|
+
// ../../../../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
|
|
53757
53756
|
var HandlebarsAPI = class {
|
|
53758
53757
|
async registerHelp(helpers) {
|
|
53759
53758
|
this.registers.helpers = {
|
|
@@ -53803,13 +53802,13 @@ var HandlebarsAPI = class {
|
|
|
53803
53802
|
}
|
|
53804
53803
|
};
|
|
53805
53804
|
|
|
53806
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53805
|
+
// ../../../../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
|
|
53807
53806
|
var import_ejs = __toESM(require_ejs());
|
|
53808
53807
|
function renderString2(template, fullData) {
|
|
53809
53808
|
return import_ejs.default.render(template, fullData) || "";
|
|
53810
53809
|
}
|
|
53811
53810
|
|
|
53812
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
53811
|
+
// ../../../../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
|
|
53813
53812
|
var EjsAPI = class {
|
|
53814
53813
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
53815
53814
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -53842,7 +53841,7 @@ var EjsAPI = class {
|
|
|
53842
53841
|
}
|
|
53843
53842
|
};
|
|
53844
53843
|
|
|
53845
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
53844
|
+
// ../../../../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
|
|
53846
53845
|
var import_path3 = __toESM(require("path"));
|
|
53847
53846
|
var import_utils15 = require("@modern-js/utils");
|
|
53848
53847
|
var FsAPI = class {
|
|
@@ -63426,10 +63425,10 @@ var Schema = (
|
|
|
63426
63425
|
}()
|
|
63427
63426
|
);
|
|
63428
63427
|
|
|
63429
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63428
|
+
// ../../../../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
|
|
63430
63429
|
var import_inquirer = __toESM(require_inquirer());
|
|
63431
63430
|
|
|
63432
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63431
|
+
// ../../../../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
|
|
63433
63432
|
var import_lodash3 = require("@modern-js/utils/lodash");
|
|
63434
63433
|
function validateSchema(schema) {
|
|
63435
63434
|
const { type, properties } = schema;
|
|
@@ -63521,7 +63520,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
63521
63520
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
63522
63521
|
}
|
|
63523
63522
|
|
|
63524
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63523
|
+
// ../../../../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
|
|
63525
63524
|
var compileRule = (rule, scope) => {
|
|
63526
63525
|
const state = Schema.compile(rule, {
|
|
63527
63526
|
$self: {},
|
|
@@ -63625,7 +63624,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
63625
63624
|
return answers;
|
|
63626
63625
|
}
|
|
63627
63626
|
|
|
63628
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
63627
|
+
// ../../../../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
|
|
63629
63628
|
var CLIReader = class {
|
|
63630
63629
|
getAnswers() {
|
|
63631
63630
|
return this.answers;
|
|
@@ -63656,7 +63655,7 @@ var CLIReader = class {
|
|
|
63656
63655
|
}
|
|
63657
63656
|
};
|
|
63658
63657
|
|
|
63659
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63658
|
+
// ../../../../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
|
|
63660
63659
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
63661
63660
|
|
|
63662
63661
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -63722,7 +63721,7 @@ var I18n2 = class {
|
|
|
63722
63721
|
}
|
|
63723
63722
|
};
|
|
63724
63723
|
|
|
63725
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63724
|
+
// ../../../../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
|
|
63726
63725
|
var ZH_LOCALE2 = {
|
|
63727
63726
|
environment: {
|
|
63728
63727
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -63749,7 +63748,7 @@ var ZH_LOCALE2 = {
|
|
|
63749
63748
|
}
|
|
63750
63749
|
};
|
|
63751
63750
|
|
|
63752
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63751
|
+
// ../../../../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
|
|
63753
63752
|
var EN_LOCALE2 = {
|
|
63754
63753
|
environment: {
|
|
63755
63754
|
node_version: "please upgrade node to lts version",
|
|
@@ -63776,14 +63775,14 @@ var EN_LOCALE2 = {
|
|
|
63776
63775
|
}
|
|
63777
63776
|
};
|
|
63778
63777
|
|
|
63779
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63778
|
+
// ../../../../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
|
|
63780
63779
|
var i18n2 = new I18n2();
|
|
63781
63780
|
var localeKeys2 = i18n2.init("zh", {
|
|
63782
63781
|
zh: ZH_LOCALE2,
|
|
63783
63782
|
en: EN_LOCALE2
|
|
63784
63783
|
});
|
|
63785
63784
|
|
|
63786
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63785
|
+
// ../../../../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
|
|
63787
63786
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
63788
63787
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
63789
63788
|
for (const question of questions) {
|
|
@@ -63811,7 +63810,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
63811
63810
|
return questions;
|
|
63812
63811
|
}
|
|
63813
63812
|
|
|
63814
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63813
|
+
// ../../../../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
|
|
63815
63814
|
var import_path5 = __toESM(require("path"));
|
|
63816
63815
|
var import_utils17 = require("@modern-js/utils");
|
|
63817
63816
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -63859,7 +63858,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
63859
63858
|
}
|
|
63860
63859
|
}
|
|
63861
63860
|
|
|
63862
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
63861
|
+
// ../../../../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
|
|
63863
63862
|
var AppAPI = class {
|
|
63864
63863
|
async checkEnvironment(nodeVersion) {
|
|
63865
63864
|
if (import_utils18.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -64099,11 +64098,11 @@ var AppAPI = class {
|
|
|
64099
64098
|
}
|
|
64100
64099
|
};
|
|
64101
64100
|
|
|
64102
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64101
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64103
64102
|
var import_comment_json2 = __toESM(require_src2());
|
|
64104
64103
|
var declarationUpdate = __toESM(require_dist());
|
|
64105
64104
|
|
|
64106
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64105
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
64107
64106
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
64108
64107
|
const originJsonValue = await resource.value();
|
|
64109
64108
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -64116,7 +64115,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
64116
64115
|
return newJsonString;
|
|
64117
64116
|
}
|
|
64118
64117
|
|
|
64119
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
64118
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
64120
64119
|
var JsonAPI = class {
|
|
64121
64120
|
async get(resource) {
|
|
64122
64121
|
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-common": "3.3.
|
|
38
|
-
"@modern-js/generator-utils": "3.3.
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@scripts/jest-config": "2.
|
|
37
|
+
"@modern-js/generator-common": "3.3.7",
|
|
38
|
+
"@modern-js/generator-utils": "3.3.7",
|
|
39
|
+
"@scripts/build": "2.46.0",
|
|
40
|
+
"@modern-js/plugin-i18n": "2.46.0",
|
|
41
|
+
"@scripts/jest-config": "2.46.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|