@modern-js/bff-generator 3.2.10 → 3.3.0
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 +43 -91
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -52693,7 +52693,7 @@ var import_path6 = __toESM(require("path"));
|
|
|
52693
52693
|
var import_path = __toESM(require("path"));
|
|
52694
52694
|
var import_utils4 = require("@modern-js/utils");
|
|
52695
52695
|
|
|
52696
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
52696
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
|
52697
52697
|
function _define_property(obj, key, value) {
|
|
52698
52698
|
if (key in obj) {
|
|
52699
52699
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
@@ -52802,7 +52802,8 @@ var ZH_LOCALE = {
|
|
|
52802
52802
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
52803
52803
|
proxy: "启用「全局代理」",
|
|
52804
52804
|
swc: "启用「SWC 编译」",
|
|
52805
|
-
rspack: "启用「Rspack 构建」(实验性)"
|
|
52805
|
+
rspack: "启用「Rspack 构建」(实验性)",
|
|
52806
|
+
module_doc: "启动「模块文档」功能"
|
|
52806
52807
|
},
|
|
52807
52808
|
element: {
|
|
52808
52809
|
self: "创建工程元素",
|
|
@@ -52900,7 +52901,8 @@ var EN_LOCALE = {
|
|
|
52900
52901
|
polyfill: "Enable UA-based Polyfill Feature",
|
|
52901
52902
|
proxy: "Enable Global Proxy",
|
|
52902
52903
|
swc: "Enable SWC Compile",
|
|
52903
|
-
rspack: "Enable Rspack Build (experimental)"
|
|
52904
|
+
rspack: "Enable Rspack Build (experimental)",
|
|
52905
|
+
module_doc: "Enable Module Doc"
|
|
52904
52906
|
},
|
|
52905
52907
|
element: {
|
|
52906
52908
|
self: "Create Element",
|
|
@@ -52979,28 +52981,10 @@ var SubSolution;
|
|
|
52979
52981
|
SubSolution2["MWA"] = "mwa";
|
|
52980
52982
|
SubSolution2["Module"] = "module";
|
|
52981
52983
|
})(SubSolution || (SubSolution = {}));
|
|
52982
|
-
var SolutionText = {
|
|
52983
|
-
[Solution.MWA]: () => i18n.t(localeKeys.solution.mwa),
|
|
52984
|
-
[Solution.Module]: () => i18n.t(localeKeys.solution.module),
|
|
52985
|
-
[Solution.Monorepo]: () => i18n.t(localeKeys.solution.monorepo)
|
|
52986
|
-
};
|
|
52987
|
-
var SubSolutionText = {
|
|
52988
|
-
[SubSolution.MWA]: () => i18n.t(localeKeys.sub_solution.mwa),
|
|
52989
|
-
[SubSolution.Module]: () => i18n.t(localeKeys.sub_solution.module)
|
|
52990
|
-
};
|
|
52991
52984
|
var SolutionToolsMap = {
|
|
52992
|
-
[
|
|
52993
|
-
[
|
|
52994
|
-
[
|
|
52995
|
-
};
|
|
52996
|
-
var SolutionGenerator = {
|
|
52997
|
-
[Solution.MWA]: "@modern-js/mwa-generator",
|
|
52998
|
-
[Solution.Module]: "@modern-js/module-generator",
|
|
52999
|
-
[Solution.Monorepo]: "@modern-js/monorepo-generator"
|
|
53000
|
-
};
|
|
53001
|
-
var SubSolutionGenerator = {
|
|
53002
|
-
[SubSolution.MWA]: "@modern-js/mwa-generator",
|
|
53003
|
-
[SubSolution.Module]: "@modern-js/module-generator"
|
|
52985
|
+
["mwa"]: "@modern-js/app-tools",
|
|
52986
|
+
["module"]: "@modern-js/module-tools",
|
|
52987
|
+
["monorepo"]: "@modern-js/monorepo-tools"
|
|
53004
52988
|
};
|
|
53005
52989
|
|
|
53006
52990
|
// ../../generator-common/dist/esm-node/common/language.js
|
|
@@ -53009,10 +52993,6 @@ var Language;
|
|
|
53009
52993
|
Language2["TS"] = "ts";
|
|
53010
52994
|
Language2["JS"] = "js";
|
|
53011
52995
|
})(Language || (Language = {}));
|
|
53012
|
-
var LanguageName = {
|
|
53013
|
-
[Language.TS]: "TS",
|
|
53014
|
-
[Language.JS]: "ES6+"
|
|
53015
|
-
};
|
|
53016
52996
|
|
|
53017
52997
|
// ../../generator-common/dist/esm-node/mwa/common.js
|
|
53018
52998
|
var Framework;
|
|
@@ -53036,8 +53016,8 @@ var getFrameworkSchema = (_extra = {}) => {
|
|
|
53036
53016
|
};
|
|
53037
53017
|
};
|
|
53038
53018
|
var FrameworkAppendTypeContent = {
|
|
53039
|
-
[
|
|
53040
|
-
[
|
|
53019
|
+
["express"]: `/// <reference types='@modern-js/plugin-express/types' />`,
|
|
53020
|
+
["koa"]: `/// <reference types='@modern-js/plugin-koa/types' />`
|
|
53041
53021
|
};
|
|
53042
53022
|
|
|
53043
53023
|
// ../../generator-common/dist/esm-node/mwa/bff.js
|
|
@@ -53069,7 +53049,7 @@ var getBFFSchema = (extra = {}) => {
|
|
|
53069
53049
|
};
|
|
53070
53050
|
};
|
|
53071
53051
|
var MWADefaultBffConfig = {
|
|
53072
|
-
bffType:
|
|
53052
|
+
bffType: "func",
|
|
53073
53053
|
frameWork: Framework.Express
|
|
53074
53054
|
};
|
|
53075
53055
|
|
|
@@ -53101,49 +53081,12 @@ var ActionFunction;
|
|
|
53101
53081
|
ActionFunction2["Proxy"] = "proxy";
|
|
53102
53082
|
ActionFunction2["SWC"] = "swc";
|
|
53103
53083
|
ActionFunction2["Rspack"] = "rspack";
|
|
53084
|
+
ActionFunction2["ModuleDoc"] = "module_doc";
|
|
53104
53085
|
})(ActionFunction || (ActionFunction = {}));
|
|
53105
53086
|
var ActionRefactor;
|
|
53106
53087
|
(function(ActionRefactor2) {
|
|
53107
53088
|
ActionRefactor2["ReactRouter5"] = "react_router_5";
|
|
53108
53089
|
})(ActionRefactor || (ActionRefactor = {}));
|
|
53109
|
-
var ActionTypeText = {
|
|
53110
|
-
[ActionType.Function]: () => i18n.t(localeKeys.action.function.self),
|
|
53111
|
-
[ActionType.Element]: () => i18n.t(localeKeys.action.element.self),
|
|
53112
|
-
[ActionType.Refactor]: () => i18n.t(localeKeys.action.refactor.self)
|
|
53113
|
-
};
|
|
53114
|
-
var ActionTypeQuestionText = {
|
|
53115
|
-
[ActionType.Function]: () => i18n.t(localeKeys.action.function.question),
|
|
53116
|
-
[ActionType.Element]: () => i18n.t(localeKeys.action.element.question),
|
|
53117
|
-
[ActionType.Refactor]: () => i18n.t(localeKeys.action.refactor.question)
|
|
53118
|
-
};
|
|
53119
|
-
var ActionElementText = {
|
|
53120
|
-
[ActionElement.Entry]: () => i18n.t(localeKeys.action.element.entry),
|
|
53121
|
-
[ActionElement.Server]: () => i18n.t(localeKeys.action.element.server)
|
|
53122
|
-
};
|
|
53123
|
-
var ActionFunctionText = {
|
|
53124
|
-
[ActionFunction.TailwindCSS]: () => i18n.t(localeKeys.action.function.tailwindcss),
|
|
53125
|
-
[ActionFunction.BFF]: () => i18n.t(localeKeys.action.function.bff),
|
|
53126
|
-
[ActionFunction.MicroFrontend]: () => i18n.t(localeKeys.action.function.micro_frontend),
|
|
53127
|
-
[ActionFunction.I18n]: () => i18n.t(localeKeys.action.function.i18n),
|
|
53128
|
-
[ActionFunction.Test]: () => i18n.t(localeKeys.action.function.test),
|
|
53129
|
-
[ActionFunction.E2ETest]: () => i18n.t(localeKeys.action.function.e2e_test),
|
|
53130
|
-
[ActionFunction.Storybook]: () => i18n.t(localeKeys.action.function.storybook),
|
|
53131
|
-
[ActionFunction.StorybookV7]: () => i18n.t(localeKeys.action.function.storybookV7),
|
|
53132
|
-
[ActionFunction.RuntimeApi]: () => i18n.t(localeKeys.action.function.runtime_api),
|
|
53133
|
-
[ActionFunction.SSG]: () => i18n.t(localeKeys.action.function.ssg),
|
|
53134
|
-
[ActionFunction.Polyfill]: () => i18n.t(localeKeys.action.function.polyfill),
|
|
53135
|
-
[ActionFunction.Proxy]: () => i18n.t(localeKeys.action.function.proxy),
|
|
53136
|
-
[ActionFunction.SWC]: () => i18n.t(localeKeys.action.function.swc),
|
|
53137
|
-
[ActionFunction.Rspack]: () => i18n.t(localeKeys.action.function.rspack)
|
|
53138
|
-
};
|
|
53139
|
-
var ActionRefactorText = {
|
|
53140
|
-
[ActionRefactor.ReactRouter5]: () => i18n.t(localeKeys.action.refactor.react_router_5)
|
|
53141
|
-
};
|
|
53142
|
-
var ActionTypeTextMap = {
|
|
53143
|
-
[ActionType.Element]: ActionElementText,
|
|
53144
|
-
[ActionType.Function]: ActionFunctionText,
|
|
53145
|
-
[ActionType.Refactor]: ActionRefactorText
|
|
53146
|
-
};
|
|
53147
53090
|
|
|
53148
53091
|
// ../../generator-common/dist/esm-node/newAction/mwa/index.js
|
|
53149
53092
|
var MWAActionTypes = [
|
|
@@ -53464,6 +53407,15 @@ async function getModernConfigFile(appDir) {
|
|
|
53464
53407
|
return isTsProject(appDir) ? "modern.config.ts" : "modern.config.js";
|
|
53465
53408
|
}
|
|
53466
53409
|
|
|
53410
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_define_property.js
|
|
53411
|
+
function _define_property2(obj, key, value) {
|
|
53412
|
+
if (key in obj) {
|
|
53413
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
53414
|
+
} else
|
|
53415
|
+
obj[key] = value;
|
|
53416
|
+
return obj;
|
|
53417
|
+
}
|
|
53418
|
+
|
|
53467
53419
|
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
53468
53420
|
var import_utils18 = require("@modern-js/utils");
|
|
53469
53421
|
var import_lodash7 = require("@modern-js/utils/lodash");
|
|
@@ -53639,7 +53591,7 @@ var NpmAPI = class {
|
|
|
53639
53591
|
});
|
|
53640
53592
|
}
|
|
53641
53593
|
constructor(generatorCore) {
|
|
53642
|
-
|
|
53594
|
+
_define_property2(this, "generatorCore", void 0);
|
|
53643
53595
|
this.generatorCore = generatorCore;
|
|
53644
53596
|
}
|
|
53645
53597
|
};
|
|
@@ -53764,8 +53716,8 @@ var GitAPI = class {
|
|
|
53764
53716
|
}
|
|
53765
53717
|
}
|
|
53766
53718
|
constructor(generatorCore, generatorContext) {
|
|
53767
|
-
|
|
53768
|
-
|
|
53719
|
+
_define_property2(this, "generatorCore", void 0);
|
|
53720
|
+
_define_property2(this, "generatorContext", void 0);
|
|
53769
53721
|
this.generatorCore = generatorCore;
|
|
53770
53722
|
this.generatorContext = generatorContext;
|
|
53771
53723
|
}
|
|
@@ -53841,8 +53793,8 @@ var HandlebarsAPI = class {
|
|
|
53841
53793
|
);
|
|
53842
53794
|
}
|
|
53843
53795
|
constructor(generatorCore, registers) {
|
|
53844
|
-
|
|
53845
|
-
|
|
53796
|
+
_define_property2(this, "generatorCore", void 0);
|
|
53797
|
+
_define_property2(this, "registers", void 0);
|
|
53846
53798
|
this.generatorCore = generatorCore;
|
|
53847
53799
|
this.registers = registers || {
|
|
53848
53800
|
helpers: {},
|
|
@@ -53885,7 +53837,7 @@ var EjsAPI = class {
|
|
|
53885
53837
|
);
|
|
53886
53838
|
}
|
|
53887
53839
|
constructor(generatorCore) {
|
|
53888
|
-
|
|
53840
|
+
_define_property2(this, "generatorCore", void 0);
|
|
53889
53841
|
this.generatorCore = generatorCore;
|
|
53890
53842
|
}
|
|
53891
53843
|
};
|
|
@@ -53913,7 +53865,7 @@ var FsAPI = class {
|
|
|
53913
53865
|
}));
|
|
53914
53866
|
}
|
|
53915
53867
|
constructor(generatorCore) {
|
|
53916
|
-
|
|
53868
|
+
_define_property2(this, "generatorCore", void 0);
|
|
53917
53869
|
this.generatorCore = generatorCore;
|
|
53918
53870
|
}
|
|
53919
53871
|
};
|
|
@@ -63693,10 +63645,10 @@ var CLIReader = class {
|
|
|
63693
63645
|
return answers;
|
|
63694
63646
|
}
|
|
63695
63647
|
constructor(options) {
|
|
63696
|
-
|
|
63697
|
-
|
|
63698
|
-
|
|
63699
|
-
|
|
63648
|
+
_define_property2(this, "schema", null);
|
|
63649
|
+
_define_property2(this, "validateMap", void 0);
|
|
63650
|
+
_define_property2(this, "initValue", void 0);
|
|
63651
|
+
_define_property2(this, "answers", {});
|
|
63700
63652
|
const { schema, validateMap, initValue } = options;
|
|
63701
63653
|
this.schema = schema;
|
|
63702
63654
|
this.validateMap = validateMap || {};
|
|
@@ -63765,8 +63717,8 @@ var I18n2 = class {
|
|
|
63765
63717
|
};
|
|
63766
63718
|
}
|
|
63767
63719
|
constructor() {
|
|
63768
|
-
|
|
63769
|
-
|
|
63720
|
+
_define_property2(this, "language", "en");
|
|
63721
|
+
_define_property2(this, "languageMap", {});
|
|
63770
63722
|
}
|
|
63771
63723
|
};
|
|
63772
63724
|
|
|
@@ -64119,14 +64071,14 @@ var AppAPI = class {
|
|
|
64119
64071
|
}
|
|
64120
64072
|
}
|
|
64121
64073
|
constructor(generatorContext, generatorCore) {
|
|
64122
|
-
|
|
64123
|
-
|
|
64124
|
-
|
|
64125
|
-
|
|
64126
|
-
|
|
64127
|
-
|
|
64128
|
-
|
|
64129
|
-
|
|
64074
|
+
_define_property2(this, "i18n", i18n2);
|
|
64075
|
+
_define_property2(this, "npmApi", void 0);
|
|
64076
|
+
_define_property2(this, "gitApi", void 0);
|
|
64077
|
+
_define_property2(this, "handlebarsAPI", void 0);
|
|
64078
|
+
_define_property2(this, "ejsAPI", void 0);
|
|
64079
|
+
_define_property2(this, "fsAPI", void 0);
|
|
64080
|
+
_define_property2(this, "generatorCore", void 0);
|
|
64081
|
+
_define_property2(this, "generatorContext", void 0);
|
|
64130
64082
|
this.generatorCore = generatorCore;
|
|
64131
64083
|
this.generatorContext = generatorContext;
|
|
64132
64084
|
this.npmApi = new NpmAPI(generatorCore);
|
|
@@ -64194,7 +64146,7 @@ var JsonAPI = class {
|
|
|
64194
64146
|
});
|
|
64195
64147
|
}
|
|
64196
64148
|
constructor(generatorCore) {
|
|
64197
|
-
|
|
64149
|
+
_define_property2(this, "generatorCore", void 0);
|
|
64198
64150
|
this.generatorCore = generatorCore;
|
|
64199
64151
|
}
|
|
64200
64152
|
};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.3.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"/dist/index.js"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modern-js/utils": "2.
|
|
27
|
+
"@modern-js/utils": "2.41.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@modern-js/codesmith": "2.3.0",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@types/node": "^14",
|
|
35
35
|
"jest": "^29",
|
|
36
36
|
"typescript": "^5",
|
|
37
|
-
"@modern-js/generator-common": "3.
|
|
38
|
-
"@modern-js/plugin-i18n": "2.
|
|
39
|
-
"@modern-js/generator-utils": "3.
|
|
40
|
-
"@scripts/jest-config": "2.
|
|
41
|
-
"@scripts/build": "2.
|
|
37
|
+
"@modern-js/generator-common": "3.3.0",
|
|
38
|
+
"@modern-js/plugin-i18n": "2.41.0",
|
|
39
|
+
"@modern-js/generator-utils": "3.3.0",
|
|
40
|
+
"@scripts/jest-config": "2.41.0",
|
|
41
|
+
"@scripts/build": "2.41.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"publishConfig": {
|