@modern-js/upgrade-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 {
|
|
@@ -115481,6 +115492,9 @@ var require_constants = __commonJS({
|
|
|
115481
115492
|
ROUTE_SPEC_FILE: function() {
|
|
115482
115493
|
return ROUTE_SPEC_FILE;
|
|
115483
115494
|
},
|
|
115495
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
|
115496
|
+
return NESTED_ROUTE_SPEC_FILE;
|
|
115497
|
+
},
|
|
115484
115498
|
MAIN_ENTRY_NAME: function() {
|
|
115485
115499
|
return MAIN_ENTRY_NAME;
|
|
115486
115500
|
},
|
|
@@ -115565,9 +115579,6 @@ var require_constants = __commonJS({
|
|
|
115565
115579
|
INTERNAL_SERVER_PLUGINS: function() {
|
|
115566
115580
|
return INTERNAL_SERVER_PLUGINS;
|
|
115567
115581
|
},
|
|
115568
|
-
PLUGIN_SCHEMAS: function() {
|
|
115569
|
-
return PLUGIN_SCHEMAS;
|
|
115570
|
-
},
|
|
115571
115582
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
|
115572
115583
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
|
115573
115584
|
}
|
|
@@ -115575,6 +115586,7 @@ var require_constants = __commonJS({
|
|
|
115575
115586
|
var _export_star = require_export_star();
|
|
115576
115587
|
_export_star._(require_chainId(), exports);
|
|
115577
115588
|
var ROUTE_SPEC_FILE = "route.json";
|
|
115589
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
|
115578
115590
|
var MAIN_ENTRY_NAME = "main";
|
|
115579
115591
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
115580
115592
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
|
@@ -115621,8 +115633,6 @@ var require_constants = __commonJS({
|
|
|
115621
115633
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
115622
115634
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
115623
115635
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115624
|
-
// TODO: Maybe can remove it
|
|
115625
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115626
115636
|
// legacy router (inner react-router-dom v5)
|
|
115627
115637
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
115628
115638
|
};
|
|
@@ -115653,8 +115663,6 @@ var require_constants = __commonJS({
|
|
|
115653
115663
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
115654
115664
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115655
115665
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
115656
|
-
// TODO: Maybe can remove it
|
|
115657
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115658
115666
|
// legacy router (inner react-router-dom v5)
|
|
115659
115667
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
115660
115668
|
};
|
|
@@ -115670,214 +115678,6 @@ var require_constants = __commonJS({
|
|
|
115670
115678
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
|
115671
115679
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
|
115672
115680
|
};
|
|
115673
|
-
var PLUGIN_SCHEMAS = {
|
|
115674
|
-
"@modern-js/runtime": [
|
|
115675
|
-
{
|
|
115676
|
-
target: "runtime",
|
|
115677
|
-
schema: {
|
|
115678
|
-
type: "object",
|
|
115679
|
-
additionalProperties: false
|
|
115680
|
-
}
|
|
115681
|
-
},
|
|
115682
|
-
{
|
|
115683
|
-
target: "runtimeByEntries",
|
|
115684
|
-
schema: {
|
|
115685
|
-
type: "object",
|
|
115686
|
-
patternProperties: {
|
|
115687
|
-
[ENTRY_NAME_PATTERN]: {
|
|
115688
|
-
type: "object"
|
|
115689
|
-
}
|
|
115690
|
-
},
|
|
115691
|
-
additionalProperties: false
|
|
115692
|
-
}
|
|
115693
|
-
}
|
|
115694
|
-
],
|
|
115695
|
-
"@modern-js/plugin-swc": [
|
|
115696
|
-
{
|
|
115697
|
-
target: "tools.swc",
|
|
115698
|
-
schema: {
|
|
115699
|
-
typeof: [
|
|
115700
|
-
"object"
|
|
115701
|
-
]
|
|
115702
|
-
}
|
|
115703
|
-
}
|
|
115704
|
-
],
|
|
115705
|
-
"@modern-js/plugin-bff": [
|
|
115706
|
-
{
|
|
115707
|
-
target: "bff",
|
|
115708
|
-
schema: {
|
|
115709
|
-
type: "object",
|
|
115710
|
-
properties: {
|
|
115711
|
-
prefix: {
|
|
115712
|
-
type: [
|
|
115713
|
-
"string",
|
|
115714
|
-
"array"
|
|
115715
|
-
],
|
|
115716
|
-
items: {
|
|
115717
|
-
type: "string"
|
|
115718
|
-
}
|
|
115719
|
-
},
|
|
115720
|
-
fetcher: {
|
|
115721
|
-
type: "string"
|
|
115722
|
-
},
|
|
115723
|
-
proxy: {
|
|
115724
|
-
type: "object"
|
|
115725
|
-
},
|
|
115726
|
-
requestCreator: {
|
|
115727
|
-
type: "string"
|
|
115728
|
-
}
|
|
115729
|
-
}
|
|
115730
|
-
}
|
|
115731
|
-
}
|
|
115732
|
-
],
|
|
115733
|
-
"@modern-js/plugin-tailwindcss": [
|
|
115734
|
-
{
|
|
115735
|
-
target: "tools.tailwindcss",
|
|
115736
|
-
schema: {
|
|
115737
|
-
typeof: [
|
|
115738
|
-
"object",
|
|
115739
|
-
"function"
|
|
115740
|
-
]
|
|
115741
|
-
}
|
|
115742
|
-
}
|
|
115743
|
-
],
|
|
115744
|
-
"@modern-js/plugin-proxy": [
|
|
115745
|
-
{
|
|
115746
|
-
target: "dev.proxy",
|
|
115747
|
-
schema: {
|
|
115748
|
-
typeof: [
|
|
115749
|
-
"string",
|
|
115750
|
-
"object"
|
|
115751
|
-
]
|
|
115752
|
-
}
|
|
115753
|
-
}
|
|
115754
|
-
],
|
|
115755
|
-
"@modern-js/plugin-ssg": [
|
|
115756
|
-
{
|
|
115757
|
-
target: "output.ssg",
|
|
115758
|
-
schema: {
|
|
115759
|
-
oneOf: [
|
|
115760
|
-
{
|
|
115761
|
-
type: "boolean"
|
|
115762
|
-
},
|
|
115763
|
-
{
|
|
115764
|
-
type: "object"
|
|
115765
|
-
},
|
|
115766
|
-
{
|
|
115767
|
-
instanceof: "Function"
|
|
115768
|
-
}
|
|
115769
|
-
]
|
|
115770
|
-
}
|
|
115771
|
-
}
|
|
115772
|
-
],
|
|
115773
|
-
"@modern-js/plugin-state": [
|
|
115774
|
-
{
|
|
115775
|
-
target: "runtime.state",
|
|
115776
|
-
schema: {
|
|
115777
|
-
type: [
|
|
115778
|
-
"boolean",
|
|
115779
|
-
"object"
|
|
115780
|
-
]
|
|
115781
|
-
}
|
|
115782
|
-
}
|
|
115783
|
-
],
|
|
115784
|
-
"@modern-js/plugin-design-token": [
|
|
115785
|
-
// Legacy Features
|
|
115786
|
-
{
|
|
115787
|
-
target: "source.designSystem",
|
|
115788
|
-
schema: {
|
|
115789
|
-
typeof: [
|
|
115790
|
-
"object"
|
|
115791
|
-
]
|
|
115792
|
-
}
|
|
115793
|
-
},
|
|
115794
|
-
{
|
|
115795
|
-
target: "source.designSystem.supportStyledComponents",
|
|
115796
|
-
schema: {
|
|
115797
|
-
type: [
|
|
115798
|
-
"boolean"
|
|
115799
|
-
]
|
|
115800
|
-
}
|
|
115801
|
-
},
|
|
115802
|
-
{
|
|
115803
|
-
target: "designSystem",
|
|
115804
|
-
schema: {
|
|
115805
|
-
typeof: [
|
|
115806
|
-
"object"
|
|
115807
|
-
]
|
|
115808
|
-
}
|
|
115809
|
-
}
|
|
115810
|
-
],
|
|
115811
|
-
"@modern-js/plugin-router": [
|
|
115812
|
-
{
|
|
115813
|
-
target: "runtime.router",
|
|
115814
|
-
schema: {
|
|
115815
|
-
type: [
|
|
115816
|
-
"boolean",
|
|
115817
|
-
"object"
|
|
115818
|
-
]
|
|
115819
|
-
}
|
|
115820
|
-
}
|
|
115821
|
-
],
|
|
115822
|
-
"@modern-js/plugin-testing": [
|
|
115823
|
-
{
|
|
115824
|
-
target: "testing",
|
|
115825
|
-
schema: {
|
|
115826
|
-
typeof: [
|
|
115827
|
-
"object"
|
|
115828
|
-
]
|
|
115829
|
-
}
|
|
115830
|
-
},
|
|
115831
|
-
{
|
|
115832
|
-
target: "tools.jest",
|
|
115833
|
-
schema: {
|
|
115834
|
-
typeof: [
|
|
115835
|
-
"object",
|
|
115836
|
-
"function"
|
|
115837
|
-
]
|
|
115838
|
-
}
|
|
115839
|
-
}
|
|
115840
|
-
],
|
|
115841
|
-
"@modern-js/plugin-garfish": [
|
|
115842
|
-
{
|
|
115843
|
-
target: "runtime.masterApp",
|
|
115844
|
-
schema: {
|
|
115845
|
-
type: [
|
|
115846
|
-
"boolean",
|
|
115847
|
-
"object"
|
|
115848
|
-
]
|
|
115849
|
-
}
|
|
115850
|
-
},
|
|
115851
|
-
{
|
|
115852
|
-
target: "dev.withMasterApp",
|
|
115853
|
-
schema: {
|
|
115854
|
-
type: [
|
|
115855
|
-
"object"
|
|
115856
|
-
]
|
|
115857
|
-
}
|
|
115858
|
-
},
|
|
115859
|
-
{
|
|
115860
|
-
target: "deploy.microFrontend",
|
|
115861
|
-
schema: {
|
|
115862
|
-
type: [
|
|
115863
|
-
"boolean",
|
|
115864
|
-
"object"
|
|
115865
|
-
]
|
|
115866
|
-
}
|
|
115867
|
-
}
|
|
115868
|
-
],
|
|
115869
|
-
"@modern-js/plugin-nocode": [],
|
|
115870
|
-
"@modern-js/plugin-worker": [
|
|
115871
|
-
{
|
|
115872
|
-
target: "deploy.worker.ssr",
|
|
115873
|
-
schema: {
|
|
115874
|
-
type: [
|
|
115875
|
-
"boolean"
|
|
115876
|
-
]
|
|
115877
|
-
}
|
|
115878
|
-
}
|
|
115879
|
-
]
|
|
115880
|
-
};
|
|
115881
115681
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
115882
115682
|
allowNamespaces: true,
|
|
115883
115683
|
allExtensions: true,
|
|
@@ -116332,11 +116132,14 @@ var require_project = __commonJS({
|
|
|
116332
116132
|
return false;
|
|
116333
116133
|
}
|
|
116334
116134
|
};
|
|
116335
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
|
116336
|
-
const
|
|
116337
|
-
const existSrc = yield _compiled.fs.pathExists(
|
|
116135
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
|
116136
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
|
116137
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
|
116338
116138
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
116339
|
-
|
|
116139
|
+
if (options["api-only"]) {
|
|
116140
|
+
return true;
|
|
116141
|
+
}
|
|
116142
|
+
return existApi && !existSrc;
|
|
116340
116143
|
});
|
|
116341
116144
|
var isWebOnly = () => __async(exports, null, function* () {
|
|
116342
116145
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
@@ -116670,21 +116473,6 @@ var require_get2 = __commonJS({
|
|
|
116670
116473
|
}
|
|
116671
116474
|
});
|
|
116672
116475
|
|
|
116673
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
|
116674
|
-
var require_define_property = __commonJS({
|
|
116675
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
|
116676
|
-
"use strict";
|
|
116677
|
-
exports._ = exports._define_property = _define_property15;
|
|
116678
|
-
function _define_property15(obj, key, value) {
|
|
116679
|
-
if (key in obj) {
|
|
116680
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
116681
|
-
} else
|
|
116682
|
-
obj[key] = value;
|
|
116683
|
-
return obj;
|
|
116684
|
-
}
|
|
116685
|
-
}
|
|
116686
|
-
});
|
|
116687
|
-
|
|
116688
116476
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
|
116689
116477
|
var require_logger2 = __commonJS({
|
|
116690
116478
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
|
@@ -116707,7 +116495,6 @@ var require_logger2 = __commonJS({
|
|
|
116707
116495
|
return logger2;
|
|
116708
116496
|
}
|
|
116709
116497
|
});
|
|
116710
|
-
var _define_property15 = require_define_property();
|
|
116711
116498
|
var _interop_require_default = require_interop_require_default();
|
|
116712
116499
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
|
116713
116500
|
var LOG_LEVEL = {
|
|
@@ -116793,10 +116580,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
116793
116580
|
return longestLabel;
|
|
116794
116581
|
}
|
|
116795
116582
|
constructor(options = {}) {
|
|
116796
|
-
_define_property15._(this, "level", void 0);
|
|
116797
|
-
_define_property15._(this, "config", void 0);
|
|
116798
|
-
_define_property15._(this, "types", void 0);
|
|
116799
|
-
_define_property15._(this, "longestLabel", void 0);
|
|
116800
116583
|
this.level = options.level || LOG_TYPES.log.level;
|
|
116801
116584
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
|
116802
116585
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
|
@@ -117477,9 +117260,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
117477
117260
|
}, []);
|
|
117478
117261
|
};
|
|
117479
117262
|
var prettyInstructions = (appContext, config) => {
|
|
117480
|
-
var _config_dev;
|
|
117263
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117481
117264
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117482
|
-
const
|
|
117265
|
+
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);
|
|
117266
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117483
117267
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117484
117268
|
let message = "App running at:\n\n";
|
|
117485
117269
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -117725,31 +117509,6 @@ var require_runtimeExports = __commonJS({
|
|
|
117725
117509
|
}
|
|
117726
117510
|
});
|
|
117727
117511
|
|
|
117728
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
|
117729
|
-
var require_test = __commonJS({
|
|
117730
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
|
117731
|
-
"use strict";
|
|
117732
|
-
Object.defineProperty(exports, "__esModule", {
|
|
117733
|
-
value: true
|
|
117734
|
-
});
|
|
117735
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
|
117736
|
-
enumerable: true,
|
|
117737
|
-
get: function() {
|
|
117738
|
-
return initSnapshotSerializer;
|
|
117739
|
-
}
|
|
117740
|
-
});
|
|
117741
|
-
var initSnapshotSerializer = (root) => {
|
|
117742
|
-
expect.addSnapshotSerializer({
|
|
117743
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
|
117744
|
-
print: (val) => (
|
|
117745
|
-
// eslint-disable-next-line no-nested-ternary
|
|
117746
|
-
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
|
|
117747
|
-
)
|
|
117748
|
-
});
|
|
117749
|
-
};
|
|
117750
|
-
}
|
|
117751
|
-
});
|
|
117752
|
-
|
|
117753
117512
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
|
117754
117513
|
var require_watch = __commonJS({
|
|
117755
117514
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
|
@@ -117846,7 +117605,6 @@ var require_cli = __commonJS({
|
|
|
117846
117605
|
_export_star._(require_require(), exports);
|
|
117847
117606
|
_export_star._(require_routes(), exports);
|
|
117848
117607
|
_export_star._(require_runtimeExports(), exports);
|
|
117849
|
-
_export_star._(require_test(), exports);
|
|
117850
117608
|
_export_star._(require_watch(), exports);
|
|
117851
117609
|
}
|
|
117852
117610
|
});
|
|
@@ -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;
|
|
@@ -133256,7 +133014,7 @@ var ZH_LOCALE2 = {
|
|
|
133256
133014
|
function: {
|
|
133257
133015
|
self: "启用可选功能",
|
|
133258
133016
|
question: "请选择功能名称",
|
|
133259
|
-
tailwindcss: "
|
|
133017
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
133260
133018
|
bff: "启用「BFF」功能",
|
|
133261
133019
|
micro_frontend: "启用「微前端」模式",
|
|
133262
133020
|
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
|
-
"@
|
|
34
|
-
"@scripts/jest-config": "2.
|
|
35
|
-
"@modern-js/generator-
|
|
36
|
-
"@
|
|
37
|
-
"@modern-js/generator-
|
|
33
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
|
34
|
+
"@scripts/jest-config": "2.23.0",
|
|
35
|
+
"@modern-js/generator-utils": "3.1.22",
|
|
36
|
+
"@scripts/build": "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": {
|