@modern-js/mwa-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 +76 -318
- package/package.json +13 -12
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();
|
|
@@ -84469,9 +84469,9 @@ var require_ms = __commonJS({
|
|
|
84469
84469
|
}
|
|
84470
84470
|
});
|
|
84471
84471
|
|
|
84472
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84472
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
|
|
84473
84473
|
var require_common2 = __commonJS({
|
|
84474
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84474
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
84475
84475
|
function setup(env) {
|
|
84476
84476
|
createDebug.debug = createDebug;
|
|
84477
84477
|
createDebug.default = createDebug;
|
|
@@ -84632,9 +84632,9 @@ var require_common2 = __commonJS({
|
|
|
84632
84632
|
}
|
|
84633
84633
|
});
|
|
84634
84634
|
|
|
84635
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84635
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
|
|
84636
84636
|
var require_browser = __commonJS({
|
|
84637
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84637
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
84638
84638
|
exports.formatArgs = formatArgs;
|
|
84639
84639
|
exports.save = save;
|
|
84640
84640
|
exports.load = load;
|
|
@@ -84814,27 +84814,29 @@ var require_has_flag = __commonJS({
|
|
|
84814
84814
|
}
|
|
84815
84815
|
});
|
|
84816
84816
|
|
|
84817
|
-
// ../../../../node_modules/.pnpm/supports-color@
|
|
84817
|
+
// ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
84818
84818
|
var require_supports_color = __commonJS({
|
|
84819
|
-
"../../../../node_modules/.pnpm/supports-color@
|
|
84819
|
+
"../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
|
|
84820
84820
|
"use strict";
|
|
84821
84821
|
var os = require("os");
|
|
84822
84822
|
var tty = require("tty");
|
|
84823
84823
|
var hasFlag = require_has_flag();
|
|
84824
84824
|
var { env } = process;
|
|
84825
|
-
var
|
|
84825
|
+
var flagForceColor;
|
|
84826
84826
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
84827
|
-
|
|
84827
|
+
flagForceColor = 0;
|
|
84828
84828
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
84829
|
-
|
|
84829
|
+
flagForceColor = 1;
|
|
84830
84830
|
}
|
|
84831
|
-
|
|
84832
|
-
if (
|
|
84833
|
-
|
|
84834
|
-
|
|
84835
|
-
|
|
84836
|
-
|
|
84837
|
-
|
|
84831
|
+
function envForceColor() {
|
|
84832
|
+
if ("FORCE_COLOR" in env) {
|
|
84833
|
+
if (env.FORCE_COLOR === "true") {
|
|
84834
|
+
return 1;
|
|
84835
|
+
}
|
|
84836
|
+
if (env.FORCE_COLOR === "false") {
|
|
84837
|
+
return 0;
|
|
84838
|
+
}
|
|
84839
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
84838
84840
|
}
|
|
84839
84841
|
}
|
|
84840
84842
|
function translateLevel(level) {
|
|
@@ -84848,15 +84850,22 @@ var require_supports_color = __commonJS({
|
|
|
84848
84850
|
has16m: level >= 3
|
|
84849
84851
|
};
|
|
84850
84852
|
}
|
|
84851
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
84853
|
+
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
84854
|
+
const noFlagForceColor = envForceColor();
|
|
84855
|
+
if (noFlagForceColor !== void 0) {
|
|
84856
|
+
flagForceColor = noFlagForceColor;
|
|
84857
|
+
}
|
|
84858
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
84852
84859
|
if (forceColor === 0) {
|
|
84853
84860
|
return 0;
|
|
84854
84861
|
}
|
|
84855
|
-
if (
|
|
84856
|
-
|
|
84857
|
-
|
|
84858
|
-
|
|
84859
|
-
|
|
84862
|
+
if (sniffFlags) {
|
|
84863
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
84864
|
+
return 3;
|
|
84865
|
+
}
|
|
84866
|
+
if (hasFlag("color=256")) {
|
|
84867
|
+
return 2;
|
|
84868
|
+
}
|
|
84860
84869
|
}
|
|
84861
84870
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
84862
84871
|
return 0;
|
|
@@ -84873,7 +84882,7 @@ var require_supports_color = __commonJS({
|
|
|
84873
84882
|
return 1;
|
|
84874
84883
|
}
|
|
84875
84884
|
if ("CI" in env) {
|
|
84876
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
84885
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
84877
84886
|
return 1;
|
|
84878
84887
|
}
|
|
84879
84888
|
return min;
|
|
@@ -84885,7 +84894,7 @@ var require_supports_color = __commonJS({
|
|
|
84885
84894
|
return 3;
|
|
84886
84895
|
}
|
|
84887
84896
|
if ("TERM_PROGRAM" in env) {
|
|
84888
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84897
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
84889
84898
|
switch (env.TERM_PROGRAM) {
|
|
84890
84899
|
case "iTerm.app":
|
|
84891
84900
|
return version >= 3 ? 3 : 2;
|
|
@@ -84904,21 +84913,23 @@ var require_supports_color = __commonJS({
|
|
|
84904
84913
|
}
|
|
84905
84914
|
return min;
|
|
84906
84915
|
}
|
|
84907
|
-
function getSupportLevel(stream) {
|
|
84908
|
-
const level = supportsColor(stream,
|
|
84916
|
+
function getSupportLevel(stream, options = {}) {
|
|
84917
|
+
const level = supportsColor(stream, __spreadValues({
|
|
84918
|
+
streamIsTTY: stream && stream.isTTY
|
|
84919
|
+
}, options));
|
|
84909
84920
|
return translateLevel(level);
|
|
84910
84921
|
}
|
|
84911
84922
|
module2.exports = {
|
|
84912
84923
|
supportsColor: getSupportLevel,
|
|
84913
|
-
stdout:
|
|
84914
|
-
stderr:
|
|
84924
|
+
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
84925
|
+
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
84915
84926
|
};
|
|
84916
84927
|
}
|
|
84917
84928
|
});
|
|
84918
84929
|
|
|
84919
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84930
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
|
|
84920
84931
|
var require_node2 = __commonJS({
|
|
84921
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84932
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
84922
84933
|
var tty = require("tty");
|
|
84923
84934
|
var util = require("util");
|
|
84924
84935
|
exports.init = init;
|
|
@@ -85090,9 +85101,9 @@ var require_node2 = __commonJS({
|
|
|
85090
85101
|
}
|
|
85091
85102
|
});
|
|
85092
85103
|
|
|
85093
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
85104
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
|
|
85094
85105
|
var require_src3 = __commonJS({
|
|
85095
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
85106
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
85096
85107
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
85097
85108
|
module2.exports = require_browser();
|
|
85098
85109
|
} else {
|
|
@@ -115500,6 +115511,9 @@ var require_constants = __commonJS({
|
|
|
115500
115511
|
ROUTE_SPEC_FILE: function() {
|
|
115501
115512
|
return ROUTE_SPEC_FILE;
|
|
115502
115513
|
},
|
|
115514
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
|
115515
|
+
return NESTED_ROUTE_SPEC_FILE;
|
|
115516
|
+
},
|
|
115503
115517
|
MAIN_ENTRY_NAME: function() {
|
|
115504
115518
|
return MAIN_ENTRY_NAME;
|
|
115505
115519
|
},
|
|
@@ -115584,9 +115598,6 @@ var require_constants = __commonJS({
|
|
|
115584
115598
|
INTERNAL_SERVER_PLUGINS: function() {
|
|
115585
115599
|
return INTERNAL_SERVER_PLUGINS;
|
|
115586
115600
|
},
|
|
115587
|
-
PLUGIN_SCHEMAS: function() {
|
|
115588
|
-
return PLUGIN_SCHEMAS;
|
|
115589
|
-
},
|
|
115590
115601
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
|
115591
115602
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
|
115592
115603
|
}
|
|
@@ -115594,6 +115605,7 @@ var require_constants = __commonJS({
|
|
|
115594
115605
|
var _export_star = require_export_star();
|
|
115595
115606
|
_export_star._(require_chainId(), exports);
|
|
115596
115607
|
var ROUTE_SPEC_FILE = "route.json";
|
|
115608
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
|
115597
115609
|
var MAIN_ENTRY_NAME = "main";
|
|
115598
115610
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
115599
115611
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
|
@@ -115640,8 +115652,6 @@ var require_constants = __commonJS({
|
|
|
115640
115652
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
115641
115653
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
115642
115654
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115643
|
-
// TODO: Maybe can remove it
|
|
115644
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115645
115655
|
// legacy router (inner react-router-dom v5)
|
|
115646
115656
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
115647
115657
|
};
|
|
@@ -115672,8 +115682,6 @@ var require_constants = __commonJS({
|
|
|
115672
115682
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
115673
115683
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115674
115684
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
115675
|
-
// TODO: Maybe can remove it
|
|
115676
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115677
115685
|
// legacy router (inner react-router-dom v5)
|
|
115678
115686
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
115679
115687
|
};
|
|
@@ -115689,214 +115697,6 @@ var require_constants = __commonJS({
|
|
|
115689
115697
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
|
115690
115698
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
|
115691
115699
|
};
|
|
115692
|
-
var PLUGIN_SCHEMAS = {
|
|
115693
|
-
"@modern-js/runtime": [
|
|
115694
|
-
{
|
|
115695
|
-
target: "runtime",
|
|
115696
|
-
schema: {
|
|
115697
|
-
type: "object",
|
|
115698
|
-
additionalProperties: false
|
|
115699
|
-
}
|
|
115700
|
-
},
|
|
115701
|
-
{
|
|
115702
|
-
target: "runtimeByEntries",
|
|
115703
|
-
schema: {
|
|
115704
|
-
type: "object",
|
|
115705
|
-
patternProperties: {
|
|
115706
|
-
[ENTRY_NAME_PATTERN]: {
|
|
115707
|
-
type: "object"
|
|
115708
|
-
}
|
|
115709
|
-
},
|
|
115710
|
-
additionalProperties: false
|
|
115711
|
-
}
|
|
115712
|
-
}
|
|
115713
|
-
],
|
|
115714
|
-
"@modern-js/plugin-swc": [
|
|
115715
|
-
{
|
|
115716
|
-
target: "tools.swc",
|
|
115717
|
-
schema: {
|
|
115718
|
-
typeof: [
|
|
115719
|
-
"object"
|
|
115720
|
-
]
|
|
115721
|
-
}
|
|
115722
|
-
}
|
|
115723
|
-
],
|
|
115724
|
-
"@modern-js/plugin-bff": [
|
|
115725
|
-
{
|
|
115726
|
-
target: "bff",
|
|
115727
|
-
schema: {
|
|
115728
|
-
type: "object",
|
|
115729
|
-
properties: {
|
|
115730
|
-
prefix: {
|
|
115731
|
-
type: [
|
|
115732
|
-
"string",
|
|
115733
|
-
"array"
|
|
115734
|
-
],
|
|
115735
|
-
items: {
|
|
115736
|
-
type: "string"
|
|
115737
|
-
}
|
|
115738
|
-
},
|
|
115739
|
-
fetcher: {
|
|
115740
|
-
type: "string"
|
|
115741
|
-
},
|
|
115742
|
-
proxy: {
|
|
115743
|
-
type: "object"
|
|
115744
|
-
},
|
|
115745
|
-
requestCreator: {
|
|
115746
|
-
type: "string"
|
|
115747
|
-
}
|
|
115748
|
-
}
|
|
115749
|
-
}
|
|
115750
|
-
}
|
|
115751
|
-
],
|
|
115752
|
-
"@modern-js/plugin-tailwindcss": [
|
|
115753
|
-
{
|
|
115754
|
-
target: "tools.tailwindcss",
|
|
115755
|
-
schema: {
|
|
115756
|
-
typeof: [
|
|
115757
|
-
"object",
|
|
115758
|
-
"function"
|
|
115759
|
-
]
|
|
115760
|
-
}
|
|
115761
|
-
}
|
|
115762
|
-
],
|
|
115763
|
-
"@modern-js/plugin-proxy": [
|
|
115764
|
-
{
|
|
115765
|
-
target: "dev.proxy",
|
|
115766
|
-
schema: {
|
|
115767
|
-
typeof: [
|
|
115768
|
-
"string",
|
|
115769
|
-
"object"
|
|
115770
|
-
]
|
|
115771
|
-
}
|
|
115772
|
-
}
|
|
115773
|
-
],
|
|
115774
|
-
"@modern-js/plugin-ssg": [
|
|
115775
|
-
{
|
|
115776
|
-
target: "output.ssg",
|
|
115777
|
-
schema: {
|
|
115778
|
-
oneOf: [
|
|
115779
|
-
{
|
|
115780
|
-
type: "boolean"
|
|
115781
|
-
},
|
|
115782
|
-
{
|
|
115783
|
-
type: "object"
|
|
115784
|
-
},
|
|
115785
|
-
{
|
|
115786
|
-
instanceof: "Function"
|
|
115787
|
-
}
|
|
115788
|
-
]
|
|
115789
|
-
}
|
|
115790
|
-
}
|
|
115791
|
-
],
|
|
115792
|
-
"@modern-js/plugin-state": [
|
|
115793
|
-
{
|
|
115794
|
-
target: "runtime.state",
|
|
115795
|
-
schema: {
|
|
115796
|
-
type: [
|
|
115797
|
-
"boolean",
|
|
115798
|
-
"object"
|
|
115799
|
-
]
|
|
115800
|
-
}
|
|
115801
|
-
}
|
|
115802
|
-
],
|
|
115803
|
-
"@modern-js/plugin-design-token": [
|
|
115804
|
-
// Legacy Features
|
|
115805
|
-
{
|
|
115806
|
-
target: "source.designSystem",
|
|
115807
|
-
schema: {
|
|
115808
|
-
typeof: [
|
|
115809
|
-
"object"
|
|
115810
|
-
]
|
|
115811
|
-
}
|
|
115812
|
-
},
|
|
115813
|
-
{
|
|
115814
|
-
target: "source.designSystem.supportStyledComponents",
|
|
115815
|
-
schema: {
|
|
115816
|
-
type: [
|
|
115817
|
-
"boolean"
|
|
115818
|
-
]
|
|
115819
|
-
}
|
|
115820
|
-
},
|
|
115821
|
-
{
|
|
115822
|
-
target: "designSystem",
|
|
115823
|
-
schema: {
|
|
115824
|
-
typeof: [
|
|
115825
|
-
"object"
|
|
115826
|
-
]
|
|
115827
|
-
}
|
|
115828
|
-
}
|
|
115829
|
-
],
|
|
115830
|
-
"@modern-js/plugin-router": [
|
|
115831
|
-
{
|
|
115832
|
-
target: "runtime.router",
|
|
115833
|
-
schema: {
|
|
115834
|
-
type: [
|
|
115835
|
-
"boolean",
|
|
115836
|
-
"object"
|
|
115837
|
-
]
|
|
115838
|
-
}
|
|
115839
|
-
}
|
|
115840
|
-
],
|
|
115841
|
-
"@modern-js/plugin-testing": [
|
|
115842
|
-
{
|
|
115843
|
-
target: "testing",
|
|
115844
|
-
schema: {
|
|
115845
|
-
typeof: [
|
|
115846
|
-
"object"
|
|
115847
|
-
]
|
|
115848
|
-
}
|
|
115849
|
-
},
|
|
115850
|
-
{
|
|
115851
|
-
target: "tools.jest",
|
|
115852
|
-
schema: {
|
|
115853
|
-
typeof: [
|
|
115854
|
-
"object",
|
|
115855
|
-
"function"
|
|
115856
|
-
]
|
|
115857
|
-
}
|
|
115858
|
-
}
|
|
115859
|
-
],
|
|
115860
|
-
"@modern-js/plugin-garfish": [
|
|
115861
|
-
{
|
|
115862
|
-
target: "runtime.masterApp",
|
|
115863
|
-
schema: {
|
|
115864
|
-
type: [
|
|
115865
|
-
"boolean",
|
|
115866
|
-
"object"
|
|
115867
|
-
]
|
|
115868
|
-
}
|
|
115869
|
-
},
|
|
115870
|
-
{
|
|
115871
|
-
target: "dev.withMasterApp",
|
|
115872
|
-
schema: {
|
|
115873
|
-
type: [
|
|
115874
|
-
"object"
|
|
115875
|
-
]
|
|
115876
|
-
}
|
|
115877
|
-
},
|
|
115878
|
-
{
|
|
115879
|
-
target: "deploy.microFrontend",
|
|
115880
|
-
schema: {
|
|
115881
|
-
type: [
|
|
115882
|
-
"boolean",
|
|
115883
|
-
"object"
|
|
115884
|
-
]
|
|
115885
|
-
}
|
|
115886
|
-
}
|
|
115887
|
-
],
|
|
115888
|
-
"@modern-js/plugin-nocode": [],
|
|
115889
|
-
"@modern-js/plugin-worker": [
|
|
115890
|
-
{
|
|
115891
|
-
target: "deploy.worker.ssr",
|
|
115892
|
-
schema: {
|
|
115893
|
-
type: [
|
|
115894
|
-
"boolean"
|
|
115895
|
-
]
|
|
115896
|
-
}
|
|
115897
|
-
}
|
|
115898
|
-
]
|
|
115899
|
-
};
|
|
115900
115700
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
115901
115701
|
allowNamespaces: true,
|
|
115902
115702
|
allExtensions: true,
|
|
@@ -116351,11 +116151,14 @@ var require_project = __commonJS({
|
|
|
116351
116151
|
return false;
|
|
116352
116152
|
}
|
|
116353
116153
|
};
|
|
116354
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
|
116355
|
-
const
|
|
116356
|
-
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"));
|
|
116357
116157
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
116358
|
-
|
|
116158
|
+
if (options["api-only"]) {
|
|
116159
|
+
return true;
|
|
116160
|
+
}
|
|
116161
|
+
return existApi && !existSrc;
|
|
116359
116162
|
});
|
|
116360
116163
|
var isWebOnly = () => __async(exports, null, function* () {
|
|
116361
116164
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
@@ -116689,21 +116492,6 @@ var require_get2 = __commonJS({
|
|
|
116689
116492
|
}
|
|
116690
116493
|
});
|
|
116691
116494
|
|
|
116692
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
|
116693
|
-
var require_define_property = __commonJS({
|
|
116694
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
|
116695
|
-
"use strict";
|
|
116696
|
-
exports._ = exports._define_property = _define_property15;
|
|
116697
|
-
function _define_property15(obj, key, value) {
|
|
116698
|
-
if (key in obj) {
|
|
116699
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
116700
|
-
} else
|
|
116701
|
-
obj[key] = value;
|
|
116702
|
-
return obj;
|
|
116703
|
-
}
|
|
116704
|
-
}
|
|
116705
|
-
});
|
|
116706
|
-
|
|
116707
116495
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
|
116708
116496
|
var require_logger2 = __commonJS({
|
|
116709
116497
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
|
@@ -116726,7 +116514,6 @@ var require_logger2 = __commonJS({
|
|
|
116726
116514
|
return logger;
|
|
116727
116515
|
}
|
|
116728
116516
|
});
|
|
116729
|
-
var _define_property15 = require_define_property();
|
|
116730
116517
|
var _interop_require_default = require_interop_require_default();
|
|
116731
116518
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
|
116732
116519
|
var LOG_LEVEL = {
|
|
@@ -116812,10 +116599,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
116812
116599
|
return longestLabel;
|
|
116813
116600
|
}
|
|
116814
116601
|
constructor(options = {}) {
|
|
116815
|
-
_define_property15._(this, "level", void 0);
|
|
116816
|
-
_define_property15._(this, "config", void 0);
|
|
116817
|
-
_define_property15._(this, "types", void 0);
|
|
116818
|
-
_define_property15._(this, "longestLabel", void 0);
|
|
116819
116602
|
this.level = options.level || LOG_TYPES.log.level;
|
|
116820
116603
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
|
116821
116604
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
|
@@ -117496,9 +117279,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
117496
117279
|
}, []);
|
|
117497
117280
|
};
|
|
117498
117281
|
var prettyInstructions = (appContext, config) => {
|
|
117499
|
-
var _config_dev;
|
|
117282
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117500
117283
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117501
|
-
const
|
|
117284
|
+
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);
|
|
117285
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117502
117286
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117503
117287
|
let message = "App running at:\n\n";
|
|
117504
117288
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -117744,31 +117528,6 @@ var require_runtimeExports = __commonJS({
|
|
|
117744
117528
|
}
|
|
117745
117529
|
});
|
|
117746
117530
|
|
|
117747
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
|
117748
|
-
var require_test = __commonJS({
|
|
117749
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
|
117750
|
-
"use strict";
|
|
117751
|
-
Object.defineProperty(exports, "__esModule", {
|
|
117752
|
-
value: true
|
|
117753
|
-
});
|
|
117754
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
|
117755
|
-
enumerable: true,
|
|
117756
|
-
get: function() {
|
|
117757
|
-
return initSnapshotSerializer;
|
|
117758
|
-
}
|
|
117759
|
-
});
|
|
117760
|
-
var initSnapshotSerializer = (root) => {
|
|
117761
|
-
expect.addSnapshotSerializer({
|
|
117762
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
|
117763
|
-
print: (val) => (
|
|
117764
|
-
// eslint-disable-next-line no-nested-ternary
|
|
117765
|
-
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
|
|
117766
|
-
)
|
|
117767
|
-
});
|
|
117768
|
-
};
|
|
117769
|
-
}
|
|
117770
|
-
});
|
|
117771
|
-
|
|
117772
117531
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
|
117773
117532
|
var require_watch = __commonJS({
|
|
117774
117533
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
|
@@ -117865,7 +117624,6 @@ var require_cli = __commonJS({
|
|
|
117865
117624
|
_export_star._(require_require(), exports);
|
|
117866
117625
|
_export_star._(require_routes(), exports);
|
|
117867
117626
|
_export_star._(require_runtimeExports(), exports);
|
|
117868
|
-
_export_star._(require_test(), exports);
|
|
117869
117627
|
_export_star._(require_watch(), exports);
|
|
117870
117628
|
}
|
|
117871
117629
|
});
|
|
@@ -117936,7 +117694,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
117936
117694
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
117937
117695
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
117938
117696
|
|
|
117939
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
117697
|
+
// ../../../../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
|
|
117940
117698
|
var import_lodash6 = __toESM(require_lodash2());
|
|
117941
117699
|
var import_comment_json = __toESM(require_src2());
|
|
117942
117700
|
|
|
@@ -130037,10 +129795,10 @@ var Schema = (
|
|
|
130037
129795
|
}()
|
|
130038
129796
|
);
|
|
130039
129797
|
|
|
130040
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
129798
|
+
// ../../../../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
|
|
130041
129799
|
var import_inquirer = __toESM(require_inquirer());
|
|
130042
129800
|
|
|
130043
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
129801
|
+
// ../../../../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
|
|
130044
129802
|
var import_lodash2 = __toESM(require_lodash2());
|
|
130045
129803
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130046
129804
|
try {
|
|
@@ -130387,7 +130145,7 @@ function transformForm(schema) {
|
|
|
130387
130145
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
130388
130146
|
}
|
|
130389
130147
|
|
|
130390
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130148
|
+
// ../../../../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
|
|
130391
130149
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130392
130150
|
try {
|
|
130393
130151
|
var info = gen[key](arg);
|
|
@@ -130911,7 +130669,7 @@ function _prompt() {
|
|
|
130911
130669
|
return _prompt.apply(this, arguments);
|
|
130912
130670
|
}
|
|
130913
130671
|
|
|
130914
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130672
|
+
// ../../../../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
|
|
130915
130673
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130916
130674
|
try {
|
|
130917
130675
|
var info = gen[key](arg);
|
|
@@ -131151,7 +130909,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
131151
130909
|
return CLIReader2;
|
|
131152
130910
|
}();
|
|
131153
130911
|
|
|
131154
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
130912
|
+
// ../../../../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
|
|
131155
130913
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
131156
130914
|
|
|
131157
130915
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -131230,7 +130988,7 @@ var I18n = class {
|
|
|
131230
130988
|
}
|
|
131231
130989
|
};
|
|
131232
130990
|
|
|
131233
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
130991
|
+
// ../../../../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
|
|
131234
130992
|
var ZH_LOCALE = {
|
|
131235
130993
|
environment: {
|
|
131236
130994
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -131257,7 +131015,7 @@ var ZH_LOCALE = {
|
|
|
131257
131015
|
}
|
|
131258
131016
|
};
|
|
131259
131017
|
|
|
131260
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131018
|
+
// ../../../../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
|
|
131261
131019
|
var EN_LOCALE = {
|
|
131262
131020
|
environment: {
|
|
131263
131021
|
node_version: "please upgrade node to lts version",
|
|
@@ -131284,14 +131042,14 @@ var EN_LOCALE = {
|
|
|
131284
131042
|
}
|
|
131285
131043
|
};
|
|
131286
131044
|
|
|
131287
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131045
|
+
// ../../../../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
|
|
131288
131046
|
var i18n = new I18n();
|
|
131289
131047
|
var localeKeys = i18n.init("zh", {
|
|
131290
131048
|
zh: ZH_LOCALE,
|
|
131291
131049
|
en: EN_LOCALE
|
|
131292
131050
|
});
|
|
131293
131051
|
|
|
131294
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131052
|
+
// ../../../../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
|
|
131295
131053
|
var import_lodash5 = __toESM(require_lodash2());
|
|
131296
131054
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131297
131055
|
try {
|
|
@@ -131500,7 +131258,7 @@ function transformInquirerSchema(questions) {
|
|
|
131500
131258
|
return questions;
|
|
131501
131259
|
}
|
|
131502
131260
|
|
|
131503
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131261
|
+
// ../../../../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
|
|
131504
131262
|
var import_path4 = __toESM(require("path"));
|
|
131505
131263
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131506
131264
|
try {
|
|
@@ -131764,7 +131522,7 @@ function _checkUseNvm() {
|
|
|
131764
131522
|
return _checkUseNvm.apply(this, arguments);
|
|
131765
131523
|
}
|
|
131766
131524
|
|
|
131767
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131525
|
+
// ../../../../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
|
|
131768
131526
|
function _array_like_to_array(arr, len) {
|
|
131769
131527
|
if (len == null || len > arr.length)
|
|
131770
131528
|
len = arr.length;
|
|
@@ -133264,7 +133022,7 @@ var ZH_LOCALE2 = {
|
|
|
133264
133022
|
function: {
|
|
133265
133023
|
self: "启用可选功能",
|
|
133266
133024
|
question: "请选择功能名称",
|
|
133267
|
-
tailwindcss: "
|
|
133025
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
133268
133026
|
bff: "启用「BFF」功能",
|
|
133269
133027
|
micro_frontend: "启用「微前端」模式",
|
|
133270
133028
|
i18n: "启用「国际化(i18n)」功能",
|
|
@@ -133824,7 +133582,7 @@ var ZH_LOCALE4 = {
|
|
|
133824
133582
|
var EN_LOCALE4 = {
|
|
133825
133583
|
get_packages_error: "get all packages failed,please check this environment and try again",
|
|
133826
133584
|
success: `Success!
|
|
133827
|
-
You can run the following command in the directory of the new project
|
|
133585
|
+
You can run the following command in the directory of the new project:
|
|
133828
133586
|
{packageManager} dev # Starting the dev server
|
|
133829
133587
|
{packageManager} build # Build the app for production
|
|
133830
133588
|
{packageManager} serve # Preview the production build locally
|
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,21 +30,22 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator
|
|
34
|
-
"@modern-js/
|
|
35
|
-
"@modern-js/generator-
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@modern-js/
|
|
38
|
-
"@modern-js/
|
|
39
|
-
"@modern-js/
|
|
40
|
-
"@modern-js/
|
|
41
|
-
"@scripts/
|
|
42
|
-
"@scripts/
|
|
33
|
+
"@modern-js/base-generator": "3.1.22",
|
|
34
|
+
"@modern-js/generator-utils": "3.1.22",
|
|
35
|
+
"@modern-js/generator-common": "3.1.22",
|
|
36
|
+
"@modern-js/packages-generator": "3.1.22",
|
|
37
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
|
38
|
+
"@modern-js/rspack-generator": "3.1.22",
|
|
39
|
+
"@modern-js/entry-generator": "3.1.22",
|
|
40
|
+
"@modern-js/dependence-generator": "3.1.22",
|
|
41
|
+
"@scripts/build": "2.23.0",
|
|
42
|
+
"@scripts/jest-config": "2.23.0"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"registry": "https://registry.npmjs.org/",
|
|
47
|
-
"access": "public"
|
|
47
|
+
"access": "public",
|
|
48
|
+
"provenance": true
|
|
48
49
|
},
|
|
49
50
|
"types": "./src/index.ts",
|
|
50
51
|
"scripts": {
|