@modern-js/monorepo-generator 3.1.21 → 3.1.22
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 +17 -271
- package/package.json +11 -10
package/dist/index.js
CHANGED
@@ -42252,7 +42252,7 @@ var require_parse = __commonJS({
|
|
42252
42252
|
return current.type === "Punctuator" ? current.value : current.type;
|
42253
42253
|
};
|
42254
42254
|
var is = (t) => type() === t;
|
42255
|
-
var
|
42255
|
+
var expect = (a) => {
|
42256
42256
|
if (!is(a)) {
|
42257
42257
|
unexpected();
|
42258
42258
|
}
|
@@ -42334,7 +42334,7 @@ var require_parse = __commonJS({
|
|
42334
42334
|
while (!is(CURLY_BRACKET_CLOSE)) {
|
42335
42335
|
if (started) {
|
42336
42336
|
assign_comments(PREFIX_AFTER_VALUE);
|
42337
|
-
|
42337
|
+
expect(COMMA);
|
42338
42338
|
next();
|
42339
42339
|
parse_comments();
|
42340
42340
|
assign_after_comments();
|
@@ -42343,13 +42343,13 @@ var require_parse = __commonJS({
|
|
42343
42343
|
}
|
42344
42344
|
}
|
42345
42345
|
started = true;
|
42346
|
-
|
42346
|
+
expect("String");
|
42347
42347
|
name = JSON.parse(current.value);
|
42348
42348
|
set_prop(name);
|
42349
42349
|
assign_comments(PREFIX_BEFORE);
|
42350
42350
|
next();
|
42351
42351
|
parse_comments(PREFIX_AFTER_PROP);
|
42352
|
-
|
42352
|
+
expect(COLON);
|
42353
42353
|
next();
|
42354
42354
|
parse_comments(PREFIX_AFTER_COLON);
|
42355
42355
|
obj[name] = transform(name, walk());
|
@@ -42377,7 +42377,7 @@ var require_parse = __commonJS({
|
|
42377
42377
|
while (!is(BRACKET_CLOSE)) {
|
42378
42378
|
if (started) {
|
42379
42379
|
assign_comments(PREFIX_AFTER_VALUE);
|
42380
|
-
|
42380
|
+
expect(COMMA);
|
42381
42381
|
next();
|
42382
42382
|
parse_comments();
|
42383
42383
|
assign_after_comments();
|
@@ -115511,6 +115511,9 @@ var require_constants = __commonJS({
|
|
115511
115511
|
ROUTE_SPEC_FILE: function() {
|
115512
115512
|
return ROUTE_SPEC_FILE;
|
115513
115513
|
},
|
115514
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
115515
|
+
return NESTED_ROUTE_SPEC_FILE;
|
115516
|
+
},
|
115514
115517
|
MAIN_ENTRY_NAME: function() {
|
115515
115518
|
return MAIN_ENTRY_NAME;
|
115516
115519
|
},
|
@@ -115595,9 +115598,6 @@ var require_constants = __commonJS({
|
|
115595
115598
|
INTERNAL_SERVER_PLUGINS: function() {
|
115596
115599
|
return INTERNAL_SERVER_PLUGINS;
|
115597
115600
|
},
|
115598
|
-
PLUGIN_SCHEMAS: function() {
|
115599
|
-
return PLUGIN_SCHEMAS;
|
115600
|
-
},
|
115601
115601
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
115602
115602
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
115603
115603
|
}
|
@@ -115605,6 +115605,7 @@ var require_constants = __commonJS({
|
|
115605
115605
|
var _export_star = require_export_star();
|
115606
115606
|
_export_star._(require_chainId(), exports);
|
115607
115607
|
var ROUTE_SPEC_FILE = "route.json";
|
115608
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
115608
115609
|
var MAIN_ENTRY_NAME = "main";
|
115609
115610
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
115610
115611
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
@@ -115651,8 +115652,6 @@ var require_constants = __commonJS({
|
|
115651
115652
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
115652
115653
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
115653
115654
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
115654
|
-
// TODO: Maybe can remove it
|
115655
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
115656
115655
|
// legacy router (inner react-router-dom v5)
|
115657
115656
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
115658
115657
|
};
|
@@ -115683,8 +115682,6 @@ var require_constants = __commonJS({
|
|
115683
115682
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
115684
115683
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
115685
115684
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
115686
|
-
// TODO: Maybe can remove it
|
115687
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
115688
115685
|
// legacy router (inner react-router-dom v5)
|
115689
115686
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
115690
115687
|
};
|
@@ -115700,214 +115697,6 @@ var require_constants = __commonJS({
|
|
115700
115697
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
115701
115698
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
115702
115699
|
};
|
115703
|
-
var PLUGIN_SCHEMAS = {
|
115704
|
-
"@modern-js/runtime": [
|
115705
|
-
{
|
115706
|
-
target: "runtime",
|
115707
|
-
schema: {
|
115708
|
-
type: "object",
|
115709
|
-
additionalProperties: false
|
115710
|
-
}
|
115711
|
-
},
|
115712
|
-
{
|
115713
|
-
target: "runtimeByEntries",
|
115714
|
-
schema: {
|
115715
|
-
type: "object",
|
115716
|
-
patternProperties: {
|
115717
|
-
[ENTRY_NAME_PATTERN]: {
|
115718
|
-
type: "object"
|
115719
|
-
}
|
115720
|
-
},
|
115721
|
-
additionalProperties: false
|
115722
|
-
}
|
115723
|
-
}
|
115724
|
-
],
|
115725
|
-
"@modern-js/plugin-swc": [
|
115726
|
-
{
|
115727
|
-
target: "tools.swc",
|
115728
|
-
schema: {
|
115729
|
-
typeof: [
|
115730
|
-
"object"
|
115731
|
-
]
|
115732
|
-
}
|
115733
|
-
}
|
115734
|
-
],
|
115735
|
-
"@modern-js/plugin-bff": [
|
115736
|
-
{
|
115737
|
-
target: "bff",
|
115738
|
-
schema: {
|
115739
|
-
type: "object",
|
115740
|
-
properties: {
|
115741
|
-
prefix: {
|
115742
|
-
type: [
|
115743
|
-
"string",
|
115744
|
-
"array"
|
115745
|
-
],
|
115746
|
-
items: {
|
115747
|
-
type: "string"
|
115748
|
-
}
|
115749
|
-
},
|
115750
|
-
fetcher: {
|
115751
|
-
type: "string"
|
115752
|
-
},
|
115753
|
-
proxy: {
|
115754
|
-
type: "object"
|
115755
|
-
},
|
115756
|
-
requestCreator: {
|
115757
|
-
type: "string"
|
115758
|
-
}
|
115759
|
-
}
|
115760
|
-
}
|
115761
|
-
}
|
115762
|
-
],
|
115763
|
-
"@modern-js/plugin-tailwindcss": [
|
115764
|
-
{
|
115765
|
-
target: "tools.tailwindcss",
|
115766
|
-
schema: {
|
115767
|
-
typeof: [
|
115768
|
-
"object",
|
115769
|
-
"function"
|
115770
|
-
]
|
115771
|
-
}
|
115772
|
-
}
|
115773
|
-
],
|
115774
|
-
"@modern-js/plugin-proxy": [
|
115775
|
-
{
|
115776
|
-
target: "dev.proxy",
|
115777
|
-
schema: {
|
115778
|
-
typeof: [
|
115779
|
-
"string",
|
115780
|
-
"object"
|
115781
|
-
]
|
115782
|
-
}
|
115783
|
-
}
|
115784
|
-
],
|
115785
|
-
"@modern-js/plugin-ssg": [
|
115786
|
-
{
|
115787
|
-
target: "output.ssg",
|
115788
|
-
schema: {
|
115789
|
-
oneOf: [
|
115790
|
-
{
|
115791
|
-
type: "boolean"
|
115792
|
-
},
|
115793
|
-
{
|
115794
|
-
type: "object"
|
115795
|
-
},
|
115796
|
-
{
|
115797
|
-
instanceof: "Function"
|
115798
|
-
}
|
115799
|
-
]
|
115800
|
-
}
|
115801
|
-
}
|
115802
|
-
],
|
115803
|
-
"@modern-js/plugin-state": [
|
115804
|
-
{
|
115805
|
-
target: "runtime.state",
|
115806
|
-
schema: {
|
115807
|
-
type: [
|
115808
|
-
"boolean",
|
115809
|
-
"object"
|
115810
|
-
]
|
115811
|
-
}
|
115812
|
-
}
|
115813
|
-
],
|
115814
|
-
"@modern-js/plugin-design-token": [
|
115815
|
-
// Legacy Features
|
115816
|
-
{
|
115817
|
-
target: "source.designSystem",
|
115818
|
-
schema: {
|
115819
|
-
typeof: [
|
115820
|
-
"object"
|
115821
|
-
]
|
115822
|
-
}
|
115823
|
-
},
|
115824
|
-
{
|
115825
|
-
target: "source.designSystem.supportStyledComponents",
|
115826
|
-
schema: {
|
115827
|
-
type: [
|
115828
|
-
"boolean"
|
115829
|
-
]
|
115830
|
-
}
|
115831
|
-
},
|
115832
|
-
{
|
115833
|
-
target: "designSystem",
|
115834
|
-
schema: {
|
115835
|
-
typeof: [
|
115836
|
-
"object"
|
115837
|
-
]
|
115838
|
-
}
|
115839
|
-
}
|
115840
|
-
],
|
115841
|
-
"@modern-js/plugin-router": [
|
115842
|
-
{
|
115843
|
-
target: "runtime.router",
|
115844
|
-
schema: {
|
115845
|
-
type: [
|
115846
|
-
"boolean",
|
115847
|
-
"object"
|
115848
|
-
]
|
115849
|
-
}
|
115850
|
-
}
|
115851
|
-
],
|
115852
|
-
"@modern-js/plugin-testing": [
|
115853
|
-
{
|
115854
|
-
target: "testing",
|
115855
|
-
schema: {
|
115856
|
-
typeof: [
|
115857
|
-
"object"
|
115858
|
-
]
|
115859
|
-
}
|
115860
|
-
},
|
115861
|
-
{
|
115862
|
-
target: "tools.jest",
|
115863
|
-
schema: {
|
115864
|
-
typeof: [
|
115865
|
-
"object",
|
115866
|
-
"function"
|
115867
|
-
]
|
115868
|
-
}
|
115869
|
-
}
|
115870
|
-
],
|
115871
|
-
"@modern-js/plugin-garfish": [
|
115872
|
-
{
|
115873
|
-
target: "runtime.masterApp",
|
115874
|
-
schema: {
|
115875
|
-
type: [
|
115876
|
-
"boolean",
|
115877
|
-
"object"
|
115878
|
-
]
|
115879
|
-
}
|
115880
|
-
},
|
115881
|
-
{
|
115882
|
-
target: "dev.withMasterApp",
|
115883
|
-
schema: {
|
115884
|
-
type: [
|
115885
|
-
"object"
|
115886
|
-
]
|
115887
|
-
}
|
115888
|
-
},
|
115889
|
-
{
|
115890
|
-
target: "deploy.microFrontend",
|
115891
|
-
schema: {
|
115892
|
-
type: [
|
115893
|
-
"boolean",
|
115894
|
-
"object"
|
115895
|
-
]
|
115896
|
-
}
|
115897
|
-
}
|
115898
|
-
],
|
115899
|
-
"@modern-js/plugin-nocode": [],
|
115900
|
-
"@modern-js/plugin-worker": [
|
115901
|
-
{
|
115902
|
-
target: "deploy.worker.ssr",
|
115903
|
-
schema: {
|
115904
|
-
type: [
|
115905
|
-
"boolean"
|
115906
|
-
]
|
115907
|
-
}
|
115908
|
-
}
|
115909
|
-
]
|
115910
|
-
};
|
115911
115700
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
115912
115701
|
allowNamespaces: true,
|
115913
115702
|
allExtensions: true,
|
@@ -116362,11 +116151,14 @@ var require_project = __commonJS({
|
|
116362
116151
|
return false;
|
116363
116152
|
}
|
116364
116153
|
};
|
116365
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
116366
|
-
const
|
116367
|
-
const existSrc = yield _compiled.fs.pathExists(
|
116154
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
116155
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
116156
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
116368
116157
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
116369
|
-
|
116158
|
+
if (options["api-only"]) {
|
116159
|
+
return true;
|
116160
|
+
}
|
116161
|
+
return existApi && !existSrc;
|
116370
116162
|
});
|
116371
116163
|
var isWebOnly = () => __async(exports, null, function* () {
|
116372
116164
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
@@ -116700,21 +116492,6 @@ var require_get2 = __commonJS({
|
|
116700
116492
|
}
|
116701
116493
|
});
|
116702
116494
|
|
116703
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
116704
|
-
var require_define_property = __commonJS({
|
116705
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
116706
|
-
"use strict";
|
116707
|
-
exports._ = exports._define_property = _define_property15;
|
116708
|
-
function _define_property15(obj, key, value) {
|
116709
|
-
if (key in obj) {
|
116710
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
116711
|
-
} else
|
116712
|
-
obj[key] = value;
|
116713
|
-
return obj;
|
116714
|
-
}
|
116715
|
-
}
|
116716
|
-
});
|
116717
|
-
|
116718
116495
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
116719
116496
|
var require_logger2 = __commonJS({
|
116720
116497
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
@@ -116737,7 +116514,6 @@ var require_logger2 = __commonJS({
|
|
116737
116514
|
return logger;
|
116738
116515
|
}
|
116739
116516
|
});
|
116740
|
-
var _define_property15 = require_define_property();
|
116741
116517
|
var _interop_require_default = require_interop_require_default();
|
116742
116518
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
116743
116519
|
var LOG_LEVEL = {
|
@@ -116823,10 +116599,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
116823
116599
|
return longestLabel;
|
116824
116600
|
}
|
116825
116601
|
constructor(options = {}) {
|
116826
|
-
_define_property15._(this, "level", void 0);
|
116827
|
-
_define_property15._(this, "config", void 0);
|
116828
|
-
_define_property15._(this, "types", void 0);
|
116829
|
-
_define_property15._(this, "longestLabel", void 0);
|
116830
116602
|
this.level = options.level || LOG_TYPES.log.level;
|
116831
116603
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
116832
116604
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
@@ -117756,31 +117528,6 @@ var require_runtimeExports = __commonJS({
|
|
117756
117528
|
}
|
117757
117529
|
});
|
117758
117530
|
|
117759
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
117760
|
-
var require_test = __commonJS({
|
117761
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
117762
|
-
"use strict";
|
117763
|
-
Object.defineProperty(exports, "__esModule", {
|
117764
|
-
value: true
|
117765
|
-
});
|
117766
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
117767
|
-
enumerable: true,
|
117768
|
-
get: function() {
|
117769
|
-
return initSnapshotSerializer;
|
117770
|
-
}
|
117771
|
-
});
|
117772
|
-
var initSnapshotSerializer = (root) => {
|
117773
|
-
expect.addSnapshotSerializer({
|
117774
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
117775
|
-
print: (val) => (
|
117776
|
-
// eslint-disable-next-line no-nested-ternary
|
117777
|
-
typeof val === "string" ? val.includes("node_modules") ? `"${val.replace(/.+node_modules/, ``).replace(/\\/g, "/")}"` : val.includes("modern.js") ? `"${val.replace(/.+modern\.js/, ``).replace(/\\/g, "/")}"` : `"${val.replace(root, "").replace(/\\/g, "/")}"` : val
|
117778
|
-
)
|
117779
|
-
});
|
117780
|
-
};
|
117781
|
-
}
|
117782
|
-
});
|
117783
|
-
|
117784
117531
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
117785
117532
|
var require_watch = __commonJS({
|
117786
117533
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
@@ -117877,7 +117624,6 @@ var require_cli = __commonJS({
|
|
117877
117624
|
_export_star._(require_require(), exports);
|
117878
117625
|
_export_star._(require_routes(), exports);
|
117879
117626
|
_export_star._(require_runtimeExports(), exports);
|
117880
|
-
_export_star._(require_test(), exports);
|
117881
117627
|
_export_star._(require_watch(), exports);
|
117882
117628
|
}
|
117883
117629
|
});
|
@@ -133498,7 +133244,7 @@ var ZH_LOCALE2 = {
|
|
133498
133244
|
function: {
|
133499
133245
|
self: "启用可选功能",
|
133500
133246
|
question: "请选择功能名称",
|
133501
|
-
tailwindcss: "
|
133247
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
133502
133248
|
bff: "启用「BFF」功能",
|
133503
133249
|
micro_frontend: "启用「微前端」模式",
|
133504
133250
|
i18n: "启用「国际化(i18n)」功能",
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.1.
|
18
|
+
"version": "3.1.22",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -30,19 +30,20 @@
|
|
30
30
|
"@types/node": "^14",
|
31
31
|
"jest": "^29",
|
32
32
|
"typescript": "^5",
|
33
|
-
"@modern-js/base-generator": "3.1.
|
34
|
-
"@modern-js/
|
35
|
-
"@modern-js/
|
36
|
-
"@modern-js/generator
|
37
|
-
"@modern-js/generator-common": "3.1.
|
38
|
-
"@modern-js/changeset-generator": "3.1.
|
39
|
-
"@scripts/
|
40
|
-
"@scripts/
|
33
|
+
"@modern-js/base-generator": "3.1.22",
|
34
|
+
"@modern-js/generator-utils": "3.1.22",
|
35
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
36
|
+
"@modern-js/packages-generator": "3.1.22",
|
37
|
+
"@modern-js/generator-common": "3.1.22",
|
38
|
+
"@modern-js/changeset-generator": "3.1.22",
|
39
|
+
"@scripts/jest-config": "2.23.0",
|
40
|
+
"@scripts/build": "2.23.0"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|
44
44
|
"registry": "https://registry.npmjs.org/",
|
45
|
-
"access": "public"
|
45
|
+
"access": "public",
|
46
|
+
"provenance": true
|
46
47
|
},
|
47
48
|
"types": "./src/index.ts",
|
48
49
|
"scripts": {
|