@modern-js/dependence-generator 3.1.20 → 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 +75 -317
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -42240,7 +42240,7 @@ var require_parse = __commonJS({
|
|
|
42240
42240
|
return current.type === "Punctuator" ? current.value : current.type;
|
|
42241
42241
|
};
|
|
42242
42242
|
var is = (t) => type() === t;
|
|
42243
|
-
var
|
|
42243
|
+
var expect = (a) => {
|
|
42244
42244
|
if (!is(a)) {
|
|
42245
42245
|
unexpected();
|
|
42246
42246
|
}
|
|
@@ -42322,7 +42322,7 @@ var require_parse = __commonJS({
|
|
|
42322
42322
|
while (!is(CURLY_BRACKET_CLOSE)) {
|
|
42323
42323
|
if (started) {
|
|
42324
42324
|
assign_comments(PREFIX_AFTER_VALUE);
|
|
42325
|
-
|
|
42325
|
+
expect(COMMA);
|
|
42326
42326
|
next();
|
|
42327
42327
|
parse_comments();
|
|
42328
42328
|
assign_after_comments();
|
|
@@ -42331,13 +42331,13 @@ var require_parse = __commonJS({
|
|
|
42331
42331
|
}
|
|
42332
42332
|
}
|
|
42333
42333
|
started = true;
|
|
42334
|
-
|
|
42334
|
+
expect("String");
|
|
42335
42335
|
name = JSON.parse(current.value);
|
|
42336
42336
|
set_prop(name);
|
|
42337
42337
|
assign_comments(PREFIX_BEFORE);
|
|
42338
42338
|
next();
|
|
42339
42339
|
parse_comments(PREFIX_AFTER_PROP);
|
|
42340
|
-
|
|
42340
|
+
expect(COLON);
|
|
42341
42341
|
next();
|
|
42342
42342
|
parse_comments(PREFIX_AFTER_COLON);
|
|
42343
42343
|
obj[name] = transform(name, walk());
|
|
@@ -42365,7 +42365,7 @@ var require_parse = __commonJS({
|
|
|
42365
42365
|
while (!is(BRACKET_CLOSE)) {
|
|
42366
42366
|
if (started) {
|
|
42367
42367
|
assign_comments(PREFIX_AFTER_VALUE);
|
|
42368
|
-
|
|
42368
|
+
expect(COMMA);
|
|
42369
42369
|
next();
|
|
42370
42370
|
parse_comments();
|
|
42371
42371
|
assign_after_comments();
|
|
@@ -84457,9 +84457,9 @@ var require_ms = __commonJS({
|
|
|
84457
84457
|
}
|
|
84458
84458
|
});
|
|
84459
84459
|
|
|
84460
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84460
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
|
|
84461
84461
|
var require_common2 = __commonJS({
|
|
84462
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84462
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
84463
84463
|
function setup(env) {
|
|
84464
84464
|
createDebug.debug = createDebug;
|
|
84465
84465
|
createDebug.default = createDebug;
|
|
@@ -84620,9 +84620,9 @@ var require_common2 = __commonJS({
|
|
|
84620
84620
|
}
|
|
84621
84621
|
});
|
|
84622
84622
|
|
|
84623
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84623
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
|
|
84624
84624
|
var require_browser = __commonJS({
|
|
84625
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84625
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
84626
84626
|
exports.formatArgs = formatArgs;
|
|
84627
84627
|
exports.save = save;
|
|
84628
84628
|
exports.load = load;
|
|
@@ -84802,27 +84802,29 @@ var require_has_flag = __commonJS({
|
|
|
84802
84802
|
}
|
|
84803
84803
|
});
|
|
84804
84804
|
|
|
84805
|
-
// ../../../../node_modules/.pnpm/supports-color@
|
|
84805
|
+
// ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
84806
84806
|
var require_supports_color = __commonJS({
|
|
84807
|
-
"../../../../node_modules/.pnpm/supports-color@
|
|
84807
|
+
"../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
|
|
84808
84808
|
"use strict";
|
|
84809
84809
|
var os = require("os");
|
|
84810
84810
|
var tty = require("tty");
|
|
84811
84811
|
var hasFlag = require_has_flag();
|
|
84812
84812
|
var { env } = process;
|
|
84813
|
-
var
|
|
84813
|
+
var flagForceColor;
|
|
84814
84814
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
84815
|
-
|
|
84815
|
+
flagForceColor = 0;
|
|
84816
84816
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
84817
|
-
|
|
84817
|
+
flagForceColor = 1;
|
|
84818
84818
|
}
|
|
84819
|
-
|
|
84820
|
-
if (
|
|
84821
|
-
|
|
84822
|
-
|
|
84823
|
-
|
|
84824
|
-
|
|
84825
|
-
|
|
84819
|
+
function envForceColor() {
|
|
84820
|
+
if ("FORCE_COLOR" in env) {
|
|
84821
|
+
if (env.FORCE_COLOR === "true") {
|
|
84822
|
+
return 1;
|
|
84823
|
+
}
|
|
84824
|
+
if (env.FORCE_COLOR === "false") {
|
|
84825
|
+
return 0;
|
|
84826
|
+
}
|
|
84827
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
84826
84828
|
}
|
|
84827
84829
|
}
|
|
84828
84830
|
function translateLevel(level) {
|
|
@@ -84836,15 +84838,22 @@ var require_supports_color = __commonJS({
|
|
|
84836
84838
|
has16m: level >= 3
|
|
84837
84839
|
};
|
|
84838
84840
|
}
|
|
84839
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
84841
|
+
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
84842
|
+
const noFlagForceColor = envForceColor();
|
|
84843
|
+
if (noFlagForceColor !== void 0) {
|
|
84844
|
+
flagForceColor = noFlagForceColor;
|
|
84845
|
+
}
|
|
84846
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
84840
84847
|
if (forceColor === 0) {
|
|
84841
84848
|
return 0;
|
|
84842
84849
|
}
|
|
84843
|
-
if (
|
|
84844
|
-
|
|
84845
|
-
|
|
84846
|
-
|
|
84847
|
-
|
|
84850
|
+
if (sniffFlags) {
|
|
84851
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
84852
|
+
return 3;
|
|
84853
|
+
}
|
|
84854
|
+
if (hasFlag("color=256")) {
|
|
84855
|
+
return 2;
|
|
84856
|
+
}
|
|
84848
84857
|
}
|
|
84849
84858
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
84850
84859
|
return 0;
|
|
@@ -84861,7 +84870,7 @@ var require_supports_color = __commonJS({
|
|
|
84861
84870
|
return 1;
|
|
84862
84871
|
}
|
|
84863
84872
|
if ("CI" in env) {
|
|
84864
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
84873
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
84865
84874
|
return 1;
|
|
84866
84875
|
}
|
|
84867
84876
|
return min;
|
|
@@ -84873,7 +84882,7 @@ var require_supports_color = __commonJS({
|
|
|
84873
84882
|
return 3;
|
|
84874
84883
|
}
|
|
84875
84884
|
if ("TERM_PROGRAM" in env) {
|
|
84876
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84885
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84877
84886
|
switch (env.TERM_PROGRAM) {
|
|
84878
84887
|
case "iTerm.app":
|
|
84879
84888
|
return version >= 3 ? 3 : 2;
|
|
@@ -84892,21 +84901,23 @@ var require_supports_color = __commonJS({
|
|
|
84892
84901
|
}
|
|
84893
84902
|
return min;
|
|
84894
84903
|
}
|
|
84895
|
-
function getSupportLevel(stream) {
|
|
84896
|
-
const level = supportsColor(stream,
|
|
84904
|
+
function getSupportLevel(stream, options = {}) {
|
|
84905
|
+
const level = supportsColor(stream, __spreadValues({
|
|
84906
|
+
streamIsTTY: stream && stream.isTTY
|
|
84907
|
+
}, options));
|
|
84897
84908
|
return translateLevel(level);
|
|
84898
84909
|
}
|
|
84899
84910
|
module2.exports = {
|
|
84900
84911
|
supportsColor: getSupportLevel,
|
|
84901
|
-
stdout:
|
|
84902
|
-
stderr:
|
|
84912
|
+
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
84913
|
+
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
84903
84914
|
};
|
|
84904
84915
|
}
|
|
84905
84916
|
});
|
|
84906
84917
|
|
|
84907
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84918
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
|
|
84908
84919
|
var require_node2 = __commonJS({
|
|
84909
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84920
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
84910
84921
|
var tty = require("tty");
|
|
84911
84922
|
var util = require("util");
|
|
84912
84923
|
exports.init = init;
|
|
@@ -85078,9 +85089,9 @@ var require_node2 = __commonJS({
|
|
|
85078
85089
|
}
|
|
85079
85090
|
});
|
|
85080
85091
|
|
|
85081
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
85092
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
|
|
85082
85093
|
var require_src3 = __commonJS({
|
|
85083
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
85094
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
85084
85095
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
85085
85096
|
module2.exports = require_browser();
|
|
85086
85097
|
} else {
|
|
@@ -115488,6 +115499,9 @@ var require_constants = __commonJS({
|
|
|
115488
115499
|
ROUTE_SPEC_FILE: function() {
|
|
115489
115500
|
return ROUTE_SPEC_FILE;
|
|
115490
115501
|
},
|
|
115502
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
|
115503
|
+
return NESTED_ROUTE_SPEC_FILE;
|
|
115504
|
+
},
|
|
115491
115505
|
MAIN_ENTRY_NAME: function() {
|
|
115492
115506
|
return MAIN_ENTRY_NAME;
|
|
115493
115507
|
},
|
|
@@ -115572,9 +115586,6 @@ var require_constants = __commonJS({
|
|
|
115572
115586
|
INTERNAL_SERVER_PLUGINS: function() {
|
|
115573
115587
|
return INTERNAL_SERVER_PLUGINS;
|
|
115574
115588
|
},
|
|
115575
|
-
PLUGIN_SCHEMAS: function() {
|
|
115576
|
-
return PLUGIN_SCHEMAS;
|
|
115577
|
-
},
|
|
115578
115589
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
|
115579
115590
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
|
115580
115591
|
}
|
|
@@ -115582,6 +115593,7 @@ var require_constants = __commonJS({
|
|
|
115582
115593
|
var _export_star = require_export_star();
|
|
115583
115594
|
_export_star._(require_chainId(), exports);
|
|
115584
115595
|
var ROUTE_SPEC_FILE = "route.json";
|
|
115596
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
|
115585
115597
|
var MAIN_ENTRY_NAME = "main";
|
|
115586
115598
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
115587
115599
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
|
@@ -115628,8 +115640,6 @@ var require_constants = __commonJS({
|
|
|
115628
115640
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
115629
115641
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
115630
115642
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115631
|
-
// TODO: Maybe can remove it
|
|
115632
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115633
115643
|
// legacy router (inner react-router-dom v5)
|
|
115634
115644
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
115635
115645
|
};
|
|
@@ -115660,8 +115670,6 @@ var require_constants = __commonJS({
|
|
|
115660
115670
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
115661
115671
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115662
115672
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
115663
|
-
// TODO: Maybe can remove it
|
|
115664
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115665
115673
|
// legacy router (inner react-router-dom v5)
|
|
115666
115674
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
115667
115675
|
};
|
|
@@ -115677,214 +115685,6 @@ var require_constants = __commonJS({
|
|
|
115677
115685
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
|
115678
115686
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
|
115679
115687
|
};
|
|
115680
|
-
var PLUGIN_SCHEMAS = {
|
|
115681
|
-
"@modern-js/runtime": [
|
|
115682
|
-
{
|
|
115683
|
-
target: "runtime",
|
|
115684
|
-
schema: {
|
|
115685
|
-
type: "object",
|
|
115686
|
-
additionalProperties: false
|
|
115687
|
-
}
|
|
115688
|
-
},
|
|
115689
|
-
{
|
|
115690
|
-
target: "runtimeByEntries",
|
|
115691
|
-
schema: {
|
|
115692
|
-
type: "object",
|
|
115693
|
-
patternProperties: {
|
|
115694
|
-
[ENTRY_NAME_PATTERN]: {
|
|
115695
|
-
type: "object"
|
|
115696
|
-
}
|
|
115697
|
-
},
|
|
115698
|
-
additionalProperties: false
|
|
115699
|
-
}
|
|
115700
|
-
}
|
|
115701
|
-
],
|
|
115702
|
-
"@modern-js/plugin-swc": [
|
|
115703
|
-
{
|
|
115704
|
-
target: "tools.swc",
|
|
115705
|
-
schema: {
|
|
115706
|
-
typeof: [
|
|
115707
|
-
"object"
|
|
115708
|
-
]
|
|
115709
|
-
}
|
|
115710
|
-
}
|
|
115711
|
-
],
|
|
115712
|
-
"@modern-js/plugin-bff": [
|
|
115713
|
-
{
|
|
115714
|
-
target: "bff",
|
|
115715
|
-
schema: {
|
|
115716
|
-
type: "object",
|
|
115717
|
-
properties: {
|
|
115718
|
-
prefix: {
|
|
115719
|
-
type: [
|
|
115720
|
-
"string",
|
|
115721
|
-
"array"
|
|
115722
|
-
],
|
|
115723
|
-
items: {
|
|
115724
|
-
type: "string"
|
|
115725
|
-
}
|
|
115726
|
-
},
|
|
115727
|
-
fetcher: {
|
|
115728
|
-
type: "string"
|
|
115729
|
-
},
|
|
115730
|
-
proxy: {
|
|
115731
|
-
type: "object"
|
|
115732
|
-
},
|
|
115733
|
-
requestCreator: {
|
|
115734
|
-
type: "string"
|
|
115735
|
-
}
|
|
115736
|
-
}
|
|
115737
|
-
}
|
|
115738
|
-
}
|
|
115739
|
-
],
|
|
115740
|
-
"@modern-js/plugin-tailwindcss": [
|
|
115741
|
-
{
|
|
115742
|
-
target: "tools.tailwindcss",
|
|
115743
|
-
schema: {
|
|
115744
|
-
typeof: [
|
|
115745
|
-
"object",
|
|
115746
|
-
"function"
|
|
115747
|
-
]
|
|
115748
|
-
}
|
|
115749
|
-
}
|
|
115750
|
-
],
|
|
115751
|
-
"@modern-js/plugin-proxy": [
|
|
115752
|
-
{
|
|
115753
|
-
target: "dev.proxy",
|
|
115754
|
-
schema: {
|
|
115755
|
-
typeof: [
|
|
115756
|
-
"string",
|
|
115757
|
-
"object"
|
|
115758
|
-
]
|
|
115759
|
-
}
|
|
115760
|
-
}
|
|
115761
|
-
],
|
|
115762
|
-
"@modern-js/plugin-ssg": [
|
|
115763
|
-
{
|
|
115764
|
-
target: "output.ssg",
|
|
115765
|
-
schema: {
|
|
115766
|
-
oneOf: [
|
|
115767
|
-
{
|
|
115768
|
-
type: "boolean"
|
|
115769
|
-
},
|
|
115770
|
-
{
|
|
115771
|
-
type: "object"
|
|
115772
|
-
},
|
|
115773
|
-
{
|
|
115774
|
-
instanceof: "Function"
|
|
115775
|
-
}
|
|
115776
|
-
]
|
|
115777
|
-
}
|
|
115778
|
-
}
|
|
115779
|
-
],
|
|
115780
|
-
"@modern-js/plugin-state": [
|
|
115781
|
-
{
|
|
115782
|
-
target: "runtime.state",
|
|
115783
|
-
schema: {
|
|
115784
|
-
type: [
|
|
115785
|
-
"boolean",
|
|
115786
|
-
"object"
|
|
115787
|
-
]
|
|
115788
|
-
}
|
|
115789
|
-
}
|
|
115790
|
-
],
|
|
115791
|
-
"@modern-js/plugin-design-token": [
|
|
115792
|
-
// Legacy Features
|
|
115793
|
-
{
|
|
115794
|
-
target: "source.designSystem",
|
|
115795
|
-
schema: {
|
|
115796
|
-
typeof: [
|
|
115797
|
-
"object"
|
|
115798
|
-
]
|
|
115799
|
-
}
|
|
115800
|
-
},
|
|
115801
|
-
{
|
|
115802
|
-
target: "source.designSystem.supportStyledComponents",
|
|
115803
|
-
schema: {
|
|
115804
|
-
type: [
|
|
115805
|
-
"boolean"
|
|
115806
|
-
]
|
|
115807
|
-
}
|
|
115808
|
-
},
|
|
115809
|
-
{
|
|
115810
|
-
target: "designSystem",
|
|
115811
|
-
schema: {
|
|
115812
|
-
typeof: [
|
|
115813
|
-
"object"
|
|
115814
|
-
]
|
|
115815
|
-
}
|
|
115816
|
-
}
|
|
115817
|
-
],
|
|
115818
|
-
"@modern-js/plugin-router": [
|
|
115819
|
-
{
|
|
115820
|
-
target: "runtime.router",
|
|
115821
|
-
schema: {
|
|
115822
|
-
type: [
|
|
115823
|
-
"boolean",
|
|
115824
|
-
"object"
|
|
115825
|
-
]
|
|
115826
|
-
}
|
|
115827
|
-
}
|
|
115828
|
-
],
|
|
115829
|
-
"@modern-js/plugin-testing": [
|
|
115830
|
-
{
|
|
115831
|
-
target: "testing",
|
|
115832
|
-
schema: {
|
|
115833
|
-
typeof: [
|
|
115834
|
-
"object"
|
|
115835
|
-
]
|
|
115836
|
-
}
|
|
115837
|
-
},
|
|
115838
|
-
{
|
|
115839
|
-
target: "tools.jest",
|
|
115840
|
-
schema: {
|
|
115841
|
-
typeof: [
|
|
115842
|
-
"object",
|
|
115843
|
-
"function"
|
|
115844
|
-
]
|
|
115845
|
-
}
|
|
115846
|
-
}
|
|
115847
|
-
],
|
|
115848
|
-
"@modern-js/plugin-garfish": [
|
|
115849
|
-
{
|
|
115850
|
-
target: "runtime.masterApp",
|
|
115851
|
-
schema: {
|
|
115852
|
-
type: [
|
|
115853
|
-
"boolean",
|
|
115854
|
-
"object"
|
|
115855
|
-
]
|
|
115856
|
-
}
|
|
115857
|
-
},
|
|
115858
|
-
{
|
|
115859
|
-
target: "dev.withMasterApp",
|
|
115860
|
-
schema: {
|
|
115861
|
-
type: [
|
|
115862
|
-
"object"
|
|
115863
|
-
]
|
|
115864
|
-
}
|
|
115865
|
-
},
|
|
115866
|
-
{
|
|
115867
|
-
target: "deploy.microFrontend",
|
|
115868
|
-
schema: {
|
|
115869
|
-
type: [
|
|
115870
|
-
"boolean",
|
|
115871
|
-
"object"
|
|
115872
|
-
]
|
|
115873
|
-
}
|
|
115874
|
-
}
|
|
115875
|
-
],
|
|
115876
|
-
"@modern-js/plugin-nocode": [],
|
|
115877
|
-
"@modern-js/plugin-worker": [
|
|
115878
|
-
{
|
|
115879
|
-
target: "deploy.worker.ssr",
|
|
115880
|
-
schema: {
|
|
115881
|
-
type: [
|
|
115882
|
-
"boolean"
|
|
115883
|
-
]
|
|
115884
|
-
}
|
|
115885
|
-
}
|
|
115886
|
-
]
|
|
115887
|
-
};
|
|
115888
115688
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
115889
115689
|
allowNamespaces: true,
|
|
115890
115690
|
allExtensions: true,
|
|
@@ -116339,11 +116139,14 @@ var require_project = __commonJS({
|
|
|
116339
116139
|
return false;
|
|
116340
116140
|
}
|
|
116341
116141
|
};
|
|
116342
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
|
116343
|
-
const
|
|
116344
|
-
const existSrc = yield _compiled.fs.pathExists(
|
|
116142
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
|
116143
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
|
116144
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
|
116345
116145
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
116346
|
-
|
|
116146
|
+
if (options["api-only"]) {
|
|
116147
|
+
return true;
|
|
116148
|
+
}
|
|
116149
|
+
return existApi && !existSrc;
|
|
116347
116150
|
});
|
|
116348
116151
|
var isWebOnly = () => __async(exports, null, function* () {
|
|
116349
116152
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
@@ -116677,21 +116480,6 @@ var require_get2 = __commonJS({
|
|
|
116677
116480
|
}
|
|
116678
116481
|
});
|
|
116679
116482
|
|
|
116680
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
|
116681
|
-
var require_define_property = __commonJS({
|
|
116682
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
|
116683
|
-
"use strict";
|
|
116684
|
-
exports._ = exports._define_property = _define_property15;
|
|
116685
|
-
function _define_property15(obj, key, value) {
|
|
116686
|
-
if (key in obj) {
|
|
116687
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
116688
|
-
} else
|
|
116689
|
-
obj[key] = value;
|
|
116690
|
-
return obj;
|
|
116691
|
-
}
|
|
116692
|
-
}
|
|
116693
|
-
});
|
|
116694
|
-
|
|
116695
116483
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
|
116696
116484
|
var require_logger2 = __commonJS({
|
|
116697
116485
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
|
@@ -116714,7 +116502,6 @@ var require_logger2 = __commonJS({
|
|
|
116714
116502
|
return logger;
|
|
116715
116503
|
}
|
|
116716
116504
|
});
|
|
116717
|
-
var _define_property15 = require_define_property();
|
|
116718
116505
|
var _interop_require_default = require_interop_require_default();
|
|
116719
116506
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
|
116720
116507
|
var LOG_LEVEL = {
|
|
@@ -116800,10 +116587,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
116800
116587
|
return longestLabel;
|
|
116801
116588
|
}
|
|
116802
116589
|
constructor(options = {}) {
|
|
116803
|
-
_define_property15._(this, "level", void 0);
|
|
116804
|
-
_define_property15._(this, "config", void 0);
|
|
116805
|
-
_define_property15._(this, "types", void 0);
|
|
116806
|
-
_define_property15._(this, "longestLabel", void 0);
|
|
116807
116590
|
this.level = options.level || LOG_TYPES.log.level;
|
|
116808
116591
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
|
116809
116592
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
|
@@ -117484,9 +117267,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
117484
117267
|
}, []);
|
|
117485
117268
|
};
|
|
117486
117269
|
var prettyInstructions = (appContext, config) => {
|
|
117487
|
-
var _config_dev;
|
|
117270
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117488
117271
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117489
|
-
const
|
|
117272
|
+
const isHttps = (0, _is.isDev)() && ((_appContext_builder_context_devServer = (_appContext_builder = appContext.builder) === null || _appContext_builder === void 0 ? void 0 : _appContext_builder.context.devServer) === null || _appContext_builder_context_devServer === void 0 ? void 0 : _appContext_builder_context_devServer.https);
|
|
117273
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117490
117274
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117491
117275
|
let message = "App running at:\n\n";
|
|
117492
117276
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -117732,31 +117516,6 @@ var require_runtimeExports = __commonJS({
|
|
|
117732
117516
|
}
|
|
117733
117517
|
});
|
|
117734
117518
|
|
|
117735
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
|
117736
|
-
var require_test = __commonJS({
|
|
117737
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
|
117738
|
-
"use strict";
|
|
117739
|
-
Object.defineProperty(exports, "__esModule", {
|
|
117740
|
-
value: true
|
|
117741
|
-
});
|
|
117742
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
|
117743
|
-
enumerable: true,
|
|
117744
|
-
get: function() {
|
|
117745
|
-
return initSnapshotSerializer;
|
|
117746
|
-
}
|
|
117747
|
-
});
|
|
117748
|
-
var initSnapshotSerializer = (root) => {
|
|
117749
|
-
expect.addSnapshotSerializer({
|
|
117750
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
|
117751
|
-
print: (val) => (
|
|
117752
|
-
// eslint-disable-next-line no-nested-ternary
|
|
117753
|
-
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
|
|
117754
|
-
)
|
|
117755
|
-
});
|
|
117756
|
-
};
|
|
117757
|
-
}
|
|
117758
|
-
});
|
|
117759
|
-
|
|
117760
117519
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
|
117761
117520
|
var require_watch = __commonJS({
|
|
117762
117521
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
|
@@ -117853,7 +117612,6 @@ var require_cli = __commonJS({
|
|
|
117853
117612
|
_export_star._(require_require(), exports);
|
|
117854
117613
|
_export_star._(require_routes(), exports);
|
|
117855
117614
|
_export_star._(require_runtimeExports(), exports);
|
|
117856
|
-
_export_star._(require_test(), exports);
|
|
117857
117615
|
_export_star._(require_watch(), exports);
|
|
117858
117616
|
}
|
|
117859
117617
|
});
|
|
@@ -117924,7 +117682,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
117924
117682
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
117925
117683
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
117926
117684
|
|
|
117927
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
117685
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
117928
117686
|
var import_lodash6 = __toESM(require_lodash2());
|
|
117929
117687
|
var import_comment_json = __toESM(require_src2());
|
|
117930
117688
|
|
|
@@ -130025,10 +129783,10 @@ var Schema = (
|
|
|
130025
129783
|
}()
|
|
130026
129784
|
);
|
|
130027
129785
|
|
|
130028
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
129786
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
|
|
130029
129787
|
var import_inquirer = __toESM(require_inquirer());
|
|
130030
129788
|
|
|
130031
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
129789
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
|
|
130032
129790
|
var import_lodash2 = __toESM(require_lodash2());
|
|
130033
129791
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130034
129792
|
try {
|
|
@@ -130375,7 +130133,7 @@ function transformForm(schema) {
|
|
|
130375
130133
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
130376
130134
|
}
|
|
130377
130135
|
|
|
130378
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130136
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
|
|
130379
130137
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130380
130138
|
try {
|
|
130381
130139
|
var info = gen[key](arg);
|
|
@@ -130899,7 +130657,7 @@ function _prompt() {
|
|
|
130899
130657
|
return _prompt.apply(this, arguments);
|
|
130900
130658
|
}
|
|
130901
130659
|
|
|
130902
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130660
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
|
|
130903
130661
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130904
130662
|
try {
|
|
130905
130663
|
var info = gen[key](arg);
|
|
@@ -131139,7 +130897,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
131139
130897
|
return CLIReader2;
|
|
131140
130898
|
}();
|
|
131141
130899
|
|
|
131142
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
130900
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
131143
130901
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
131144
130902
|
|
|
131145
130903
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -131218,7 +130976,7 @@ var I18n = class {
|
|
|
131218
130976
|
}
|
|
131219
130977
|
};
|
|
131220
130978
|
|
|
131221
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
130979
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
|
|
131222
130980
|
var ZH_LOCALE = {
|
|
131223
130981
|
environment: {
|
|
131224
130982
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -131245,7 +131003,7 @@ var ZH_LOCALE = {
|
|
|
131245
131003
|
}
|
|
131246
131004
|
};
|
|
131247
131005
|
|
|
131248
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131006
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
|
|
131249
131007
|
var EN_LOCALE = {
|
|
131250
131008
|
environment: {
|
|
131251
131009
|
node_version: "please upgrade node to lts version",
|
|
@@ -131272,14 +131030,14 @@ var EN_LOCALE = {
|
|
|
131272
131030
|
}
|
|
131273
131031
|
};
|
|
131274
131032
|
|
|
131275
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131033
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
|
|
131276
131034
|
var i18n = new I18n();
|
|
131277
131035
|
var localeKeys = i18n.init("zh", {
|
|
131278
131036
|
zh: ZH_LOCALE,
|
|
131279
131037
|
en: EN_LOCALE
|
|
131280
131038
|
});
|
|
131281
131039
|
|
|
131282
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131040
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
|
|
131283
131041
|
var import_lodash5 = __toESM(require_lodash2());
|
|
131284
131042
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131285
131043
|
try {
|
|
@@ -131488,7 +131246,7 @@ function transformInquirerSchema(questions) {
|
|
|
131488
131246
|
return questions;
|
|
131489
131247
|
}
|
|
131490
131248
|
|
|
131491
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131249
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
|
|
131492
131250
|
var import_path4 = __toESM(require("path"));
|
|
131493
131251
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131494
131252
|
try {
|
|
@@ -131752,7 +131510,7 @@ function _checkUseNvm() {
|
|
|
131752
131510
|
return _checkUseNvm.apply(this, arguments);
|
|
131753
131511
|
}
|
|
131754
131512
|
|
|
131755
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131513
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_@modern-js+codesmith@2.2.5_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
131756
131514
|
function _array_like_to_array(arr, len) {
|
|
131757
131515
|
if (len == null || len > arr.length)
|
|
131758
131516
|
len = arr.length;
|
|
@@ -133252,7 +133010,7 @@ var ZH_LOCALE2 = {
|
|
|
133252
133010
|
function: {
|
|
133253
133011
|
self: "启用可选功能",
|
|
133254
133012
|
question: "请选择功能名称",
|
|
133255
|
-
tailwindcss: "
|
|
133013
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
133256
133014
|
bff: "启用「BFF」功能",
|
|
133257
133015
|
micro_frontend: "启用「微前端」模式",
|
|
133258
133016
|
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,16 +30,17 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@scripts/build": "2.
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@modern-js/plugin-i18n": "2.
|
|
37
|
-
"@modern-js/generator-common": "3.1.
|
|
33
|
+
"@scripts/build": "2.23.0",
|
|
34
|
+
"@modern-js/generator-utils": "3.1.22",
|
|
35
|
+
"@scripts/jest-config": "2.23.0",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
|
37
|
+
"@modern-js/generator-common": "3.1.22"
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"registry": "https://registry.npmjs.org/",
|
|
42
|
-
"access": "public"
|
|
42
|
+
"access": "public",
|
|
43
|
+
"provenance": true
|
|
43
44
|
},
|
|
44
45
|
"types": "./src/index.ts",
|
|
45
46
|
"scripts": {
|