@modern-js/packages-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 +153 -295
- package/package.json +7 -6
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();
|
|
@@ -84902,9 +84902,9 @@ var require_ms = __commonJS({
|
|
|
84902
84902
|
}
|
|
84903
84903
|
});
|
|
84904
84904
|
|
|
84905
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
84905
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
|
|
84906
84906
|
var require_common2 = __commonJS({
|
|
84907
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
84907
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
84908
84908
|
function setup(env) {
|
|
84909
84909
|
createDebug.debug = createDebug;
|
|
84910
84910
|
createDebug.default = createDebug;
|
|
@@ -85065,9 +85065,9 @@ var require_common2 = __commonJS({
|
|
|
85065
85065
|
}
|
|
85066
85066
|
});
|
|
85067
85067
|
|
|
85068
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
85068
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
|
|
85069
85069
|
var require_browser = __commonJS({
|
|
85070
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
85070
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
85071
85071
|
exports.formatArgs = formatArgs;
|
|
85072
85072
|
exports.save = save;
|
|
85073
85073
|
exports.load = load;
|
|
@@ -85234,9 +85234,122 @@ var require_browser = __commonJS({
|
|
|
85234
85234
|
}
|
|
85235
85235
|
});
|
|
85236
85236
|
|
|
85237
|
-
// ../../../../node_modules/.pnpm/
|
|
85237
|
+
// ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
85238
|
+
var require_supports_color2 = __commonJS({
|
|
85239
|
+
"../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
|
|
85240
|
+
"use strict";
|
|
85241
|
+
var os = require("os");
|
|
85242
|
+
var tty = require("tty");
|
|
85243
|
+
var hasFlag = require_has_flag();
|
|
85244
|
+
var { env } = process;
|
|
85245
|
+
var flagForceColor;
|
|
85246
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
85247
|
+
flagForceColor = 0;
|
|
85248
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
85249
|
+
flagForceColor = 1;
|
|
85250
|
+
}
|
|
85251
|
+
function envForceColor() {
|
|
85252
|
+
if ("FORCE_COLOR" in env) {
|
|
85253
|
+
if (env.FORCE_COLOR === "true") {
|
|
85254
|
+
return 1;
|
|
85255
|
+
}
|
|
85256
|
+
if (env.FORCE_COLOR === "false") {
|
|
85257
|
+
return 0;
|
|
85258
|
+
}
|
|
85259
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
85260
|
+
}
|
|
85261
|
+
}
|
|
85262
|
+
function translateLevel(level) {
|
|
85263
|
+
if (level === 0) {
|
|
85264
|
+
return false;
|
|
85265
|
+
}
|
|
85266
|
+
return {
|
|
85267
|
+
level,
|
|
85268
|
+
hasBasic: true,
|
|
85269
|
+
has256: level >= 2,
|
|
85270
|
+
has16m: level >= 3
|
|
85271
|
+
};
|
|
85272
|
+
}
|
|
85273
|
+
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
85274
|
+
const noFlagForceColor = envForceColor();
|
|
85275
|
+
if (noFlagForceColor !== void 0) {
|
|
85276
|
+
flagForceColor = noFlagForceColor;
|
|
85277
|
+
}
|
|
85278
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
85279
|
+
if (forceColor === 0) {
|
|
85280
|
+
return 0;
|
|
85281
|
+
}
|
|
85282
|
+
if (sniffFlags) {
|
|
85283
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
85284
|
+
return 3;
|
|
85285
|
+
}
|
|
85286
|
+
if (hasFlag("color=256")) {
|
|
85287
|
+
return 2;
|
|
85288
|
+
}
|
|
85289
|
+
}
|
|
85290
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
85291
|
+
return 0;
|
|
85292
|
+
}
|
|
85293
|
+
const min = forceColor || 0;
|
|
85294
|
+
if (env.TERM === "dumb") {
|
|
85295
|
+
return min;
|
|
85296
|
+
}
|
|
85297
|
+
if (process.platform === "win32") {
|
|
85298
|
+
const osRelease = os.release().split(".");
|
|
85299
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
85300
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
85301
|
+
}
|
|
85302
|
+
return 1;
|
|
85303
|
+
}
|
|
85304
|
+
if ("CI" in env) {
|
|
85305
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
85306
|
+
return 1;
|
|
85307
|
+
}
|
|
85308
|
+
return min;
|
|
85309
|
+
}
|
|
85310
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
85311
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
85312
|
+
}
|
|
85313
|
+
if (env.COLORTERM === "truecolor") {
|
|
85314
|
+
return 3;
|
|
85315
|
+
}
|
|
85316
|
+
if ("TERM_PROGRAM" in env) {
|
|
85317
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
85318
|
+
switch (env.TERM_PROGRAM) {
|
|
85319
|
+
case "iTerm.app":
|
|
85320
|
+
return version >= 3 ? 3 : 2;
|
|
85321
|
+
case "Apple_Terminal":
|
|
85322
|
+
return 2;
|
|
85323
|
+
}
|
|
85324
|
+
}
|
|
85325
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
85326
|
+
return 2;
|
|
85327
|
+
}
|
|
85328
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
85329
|
+
return 1;
|
|
85330
|
+
}
|
|
85331
|
+
if ("COLORTERM" in env) {
|
|
85332
|
+
return 1;
|
|
85333
|
+
}
|
|
85334
|
+
return min;
|
|
85335
|
+
}
|
|
85336
|
+
function getSupportLevel(stream, options = {}) {
|
|
85337
|
+
const level = supportsColor(stream, __spreadValues({
|
|
85338
|
+
streamIsTTY: stream && stream.isTTY
|
|
85339
|
+
}, options));
|
|
85340
|
+
return translateLevel(level);
|
|
85341
|
+
}
|
|
85342
|
+
module2.exports = {
|
|
85343
|
+
supportsColor: getSupportLevel,
|
|
85344
|
+
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
85345
|
+
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
85346
|
+
};
|
|
85347
|
+
}
|
|
85348
|
+
});
|
|
85349
|
+
|
|
85350
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
|
|
85238
85351
|
var require_node2 = __commonJS({
|
|
85239
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
85352
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
85240
85353
|
var tty = require("tty");
|
|
85241
85354
|
var util = require("util");
|
|
85242
85355
|
exports.init = init;
|
|
@@ -85252,7 +85365,7 @@ var require_node2 = __commonJS({
|
|
|
85252
85365
|
);
|
|
85253
85366
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
85254
85367
|
try {
|
|
85255
|
-
const supportsColor =
|
|
85368
|
+
const supportsColor = require_supports_color2();
|
|
85256
85369
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
85257
85370
|
exports.colors = [
|
|
85258
85371
|
20,
|
|
@@ -85408,9 +85521,9 @@ var require_node2 = __commonJS({
|
|
|
85408
85521
|
}
|
|
85409
85522
|
});
|
|
85410
85523
|
|
|
85411
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
85524
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
|
|
85412
85525
|
var require_src3 = __commonJS({
|
|
85413
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
85526
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
85414
85527
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
85415
85528
|
module2.exports = require_browser();
|
|
85416
85529
|
} else {
|
|
@@ -115811,6 +115924,9 @@ var require_constants = __commonJS({
|
|
|
115811
115924
|
ROUTE_SPEC_FILE: function() {
|
|
115812
115925
|
return ROUTE_SPEC_FILE;
|
|
115813
115926
|
},
|
|
115927
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
|
115928
|
+
return NESTED_ROUTE_SPEC_FILE;
|
|
115929
|
+
},
|
|
115814
115930
|
MAIN_ENTRY_NAME: function() {
|
|
115815
115931
|
return MAIN_ENTRY_NAME;
|
|
115816
115932
|
},
|
|
@@ -115895,9 +116011,6 @@ var require_constants = __commonJS({
|
|
|
115895
116011
|
INTERNAL_SERVER_PLUGINS: function() {
|
|
115896
116012
|
return INTERNAL_SERVER_PLUGINS;
|
|
115897
116013
|
},
|
|
115898
|
-
PLUGIN_SCHEMAS: function() {
|
|
115899
|
-
return PLUGIN_SCHEMAS;
|
|
115900
|
-
},
|
|
115901
116014
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
|
115902
116015
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
|
115903
116016
|
}
|
|
@@ -115905,6 +116018,7 @@ var require_constants = __commonJS({
|
|
|
115905
116018
|
var _export_star = require_export_star();
|
|
115906
116019
|
_export_star._(require_chainId(), exports);
|
|
115907
116020
|
var ROUTE_SPEC_FILE = "route.json";
|
|
116021
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
|
115908
116022
|
var MAIN_ENTRY_NAME = "main";
|
|
115909
116023
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
115910
116024
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
|
@@ -115951,8 +116065,6 @@ var require_constants = __commonJS({
|
|
|
115951
116065
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
115952
116066
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
115953
116067
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115954
|
-
// TODO: Maybe can remove it
|
|
115955
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115956
116068
|
// legacy router (inner react-router-dom v5)
|
|
115957
116069
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
115958
116070
|
};
|
|
@@ -115983,8 +116095,6 @@ var require_constants = __commonJS({
|
|
|
115983
116095
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
115984
116096
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
115985
116097
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
115986
|
-
// TODO: Maybe can remove it
|
|
115987
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
115988
116098
|
// legacy router (inner react-router-dom v5)
|
|
115989
116099
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
115990
116100
|
};
|
|
@@ -116000,214 +116110,6 @@ var require_constants = __commonJS({
|
|
|
116000
116110
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
|
116001
116111
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
|
116002
116112
|
};
|
|
116003
|
-
var PLUGIN_SCHEMAS = {
|
|
116004
|
-
"@modern-js/runtime": [
|
|
116005
|
-
{
|
|
116006
|
-
target: "runtime",
|
|
116007
|
-
schema: {
|
|
116008
|
-
type: "object",
|
|
116009
|
-
additionalProperties: false
|
|
116010
|
-
}
|
|
116011
|
-
},
|
|
116012
|
-
{
|
|
116013
|
-
target: "runtimeByEntries",
|
|
116014
|
-
schema: {
|
|
116015
|
-
type: "object",
|
|
116016
|
-
patternProperties: {
|
|
116017
|
-
[ENTRY_NAME_PATTERN]: {
|
|
116018
|
-
type: "object"
|
|
116019
|
-
}
|
|
116020
|
-
},
|
|
116021
|
-
additionalProperties: false
|
|
116022
|
-
}
|
|
116023
|
-
}
|
|
116024
|
-
],
|
|
116025
|
-
"@modern-js/plugin-swc": [
|
|
116026
|
-
{
|
|
116027
|
-
target: "tools.swc",
|
|
116028
|
-
schema: {
|
|
116029
|
-
typeof: [
|
|
116030
|
-
"object"
|
|
116031
|
-
]
|
|
116032
|
-
}
|
|
116033
|
-
}
|
|
116034
|
-
],
|
|
116035
|
-
"@modern-js/plugin-bff": [
|
|
116036
|
-
{
|
|
116037
|
-
target: "bff",
|
|
116038
|
-
schema: {
|
|
116039
|
-
type: "object",
|
|
116040
|
-
properties: {
|
|
116041
|
-
prefix: {
|
|
116042
|
-
type: [
|
|
116043
|
-
"string",
|
|
116044
|
-
"array"
|
|
116045
|
-
],
|
|
116046
|
-
items: {
|
|
116047
|
-
type: "string"
|
|
116048
|
-
}
|
|
116049
|
-
},
|
|
116050
|
-
fetcher: {
|
|
116051
|
-
type: "string"
|
|
116052
|
-
},
|
|
116053
|
-
proxy: {
|
|
116054
|
-
type: "object"
|
|
116055
|
-
},
|
|
116056
|
-
requestCreator: {
|
|
116057
|
-
type: "string"
|
|
116058
|
-
}
|
|
116059
|
-
}
|
|
116060
|
-
}
|
|
116061
|
-
}
|
|
116062
|
-
],
|
|
116063
|
-
"@modern-js/plugin-tailwindcss": [
|
|
116064
|
-
{
|
|
116065
|
-
target: "tools.tailwindcss",
|
|
116066
|
-
schema: {
|
|
116067
|
-
typeof: [
|
|
116068
|
-
"object",
|
|
116069
|
-
"function"
|
|
116070
|
-
]
|
|
116071
|
-
}
|
|
116072
|
-
}
|
|
116073
|
-
],
|
|
116074
|
-
"@modern-js/plugin-proxy": [
|
|
116075
|
-
{
|
|
116076
|
-
target: "dev.proxy",
|
|
116077
|
-
schema: {
|
|
116078
|
-
typeof: [
|
|
116079
|
-
"string",
|
|
116080
|
-
"object"
|
|
116081
|
-
]
|
|
116082
|
-
}
|
|
116083
|
-
}
|
|
116084
|
-
],
|
|
116085
|
-
"@modern-js/plugin-ssg": [
|
|
116086
|
-
{
|
|
116087
|
-
target: "output.ssg",
|
|
116088
|
-
schema: {
|
|
116089
|
-
oneOf: [
|
|
116090
|
-
{
|
|
116091
|
-
type: "boolean"
|
|
116092
|
-
},
|
|
116093
|
-
{
|
|
116094
|
-
type: "object"
|
|
116095
|
-
},
|
|
116096
|
-
{
|
|
116097
|
-
instanceof: "Function"
|
|
116098
|
-
}
|
|
116099
|
-
]
|
|
116100
|
-
}
|
|
116101
|
-
}
|
|
116102
|
-
],
|
|
116103
|
-
"@modern-js/plugin-state": [
|
|
116104
|
-
{
|
|
116105
|
-
target: "runtime.state",
|
|
116106
|
-
schema: {
|
|
116107
|
-
type: [
|
|
116108
|
-
"boolean",
|
|
116109
|
-
"object"
|
|
116110
|
-
]
|
|
116111
|
-
}
|
|
116112
|
-
}
|
|
116113
|
-
],
|
|
116114
|
-
"@modern-js/plugin-design-token": [
|
|
116115
|
-
// Legacy Features
|
|
116116
|
-
{
|
|
116117
|
-
target: "source.designSystem",
|
|
116118
|
-
schema: {
|
|
116119
|
-
typeof: [
|
|
116120
|
-
"object"
|
|
116121
|
-
]
|
|
116122
|
-
}
|
|
116123
|
-
},
|
|
116124
|
-
{
|
|
116125
|
-
target: "source.designSystem.supportStyledComponents",
|
|
116126
|
-
schema: {
|
|
116127
|
-
type: [
|
|
116128
|
-
"boolean"
|
|
116129
|
-
]
|
|
116130
|
-
}
|
|
116131
|
-
},
|
|
116132
|
-
{
|
|
116133
|
-
target: "designSystem",
|
|
116134
|
-
schema: {
|
|
116135
|
-
typeof: [
|
|
116136
|
-
"object"
|
|
116137
|
-
]
|
|
116138
|
-
}
|
|
116139
|
-
}
|
|
116140
|
-
],
|
|
116141
|
-
"@modern-js/plugin-router": [
|
|
116142
|
-
{
|
|
116143
|
-
target: "runtime.router",
|
|
116144
|
-
schema: {
|
|
116145
|
-
type: [
|
|
116146
|
-
"boolean",
|
|
116147
|
-
"object"
|
|
116148
|
-
]
|
|
116149
|
-
}
|
|
116150
|
-
}
|
|
116151
|
-
],
|
|
116152
|
-
"@modern-js/plugin-testing": [
|
|
116153
|
-
{
|
|
116154
|
-
target: "testing",
|
|
116155
|
-
schema: {
|
|
116156
|
-
typeof: [
|
|
116157
|
-
"object"
|
|
116158
|
-
]
|
|
116159
|
-
}
|
|
116160
|
-
},
|
|
116161
|
-
{
|
|
116162
|
-
target: "tools.jest",
|
|
116163
|
-
schema: {
|
|
116164
|
-
typeof: [
|
|
116165
|
-
"object",
|
|
116166
|
-
"function"
|
|
116167
|
-
]
|
|
116168
|
-
}
|
|
116169
|
-
}
|
|
116170
|
-
],
|
|
116171
|
-
"@modern-js/plugin-garfish": [
|
|
116172
|
-
{
|
|
116173
|
-
target: "runtime.masterApp",
|
|
116174
|
-
schema: {
|
|
116175
|
-
type: [
|
|
116176
|
-
"boolean",
|
|
116177
|
-
"object"
|
|
116178
|
-
]
|
|
116179
|
-
}
|
|
116180
|
-
},
|
|
116181
|
-
{
|
|
116182
|
-
target: "dev.withMasterApp",
|
|
116183
|
-
schema: {
|
|
116184
|
-
type: [
|
|
116185
|
-
"object"
|
|
116186
|
-
]
|
|
116187
|
-
}
|
|
116188
|
-
},
|
|
116189
|
-
{
|
|
116190
|
-
target: "deploy.microFrontend",
|
|
116191
|
-
schema: {
|
|
116192
|
-
type: [
|
|
116193
|
-
"boolean",
|
|
116194
|
-
"object"
|
|
116195
|
-
]
|
|
116196
|
-
}
|
|
116197
|
-
}
|
|
116198
|
-
],
|
|
116199
|
-
"@modern-js/plugin-nocode": [],
|
|
116200
|
-
"@modern-js/plugin-worker": [
|
|
116201
|
-
{
|
|
116202
|
-
target: "deploy.worker.ssr",
|
|
116203
|
-
schema: {
|
|
116204
|
-
type: [
|
|
116205
|
-
"boolean"
|
|
116206
|
-
]
|
|
116207
|
-
}
|
|
116208
|
-
}
|
|
116209
|
-
]
|
|
116210
|
-
};
|
|
116211
116113
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
116212
116114
|
allowNamespaces: true,
|
|
116213
116115
|
allExtensions: true,
|
|
@@ -116662,11 +116564,14 @@ var require_project = __commonJS({
|
|
|
116662
116564
|
return false;
|
|
116663
116565
|
}
|
|
116664
116566
|
};
|
|
116665
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
|
116666
|
-
const
|
|
116667
|
-
const existSrc = yield _compiled.fs.pathExists(
|
|
116567
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
|
116568
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
|
116569
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
|
116668
116570
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
116669
|
-
|
|
116571
|
+
if (options["api-only"]) {
|
|
116572
|
+
return true;
|
|
116573
|
+
}
|
|
116574
|
+
return existApi && !existSrc;
|
|
116670
116575
|
});
|
|
116671
116576
|
var isWebOnly = () => __async(exports, null, function* () {
|
|
116672
116577
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
@@ -117000,21 +116905,6 @@ var require_get2 = __commonJS({
|
|
|
117000
116905
|
}
|
|
117001
116906
|
});
|
|
117002
116907
|
|
|
117003
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
|
117004
|
-
var require_define_property = __commonJS({
|
|
117005
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
|
117006
|
-
"use strict";
|
|
117007
|
-
exports._ = exports._define_property = _define_property14;
|
|
117008
|
-
function _define_property14(obj, key, value) {
|
|
117009
|
-
if (key in obj) {
|
|
117010
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
117011
|
-
} else
|
|
117012
|
-
obj[key] = value;
|
|
117013
|
-
return obj;
|
|
117014
|
-
}
|
|
117015
|
-
}
|
|
117016
|
-
});
|
|
117017
|
-
|
|
117018
116908
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
|
117019
116909
|
var require_logger2 = __commonJS({
|
|
117020
116910
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
|
@@ -117037,7 +116927,6 @@ var require_logger2 = __commonJS({
|
|
|
117037
116927
|
return logger;
|
|
117038
116928
|
}
|
|
117039
116929
|
});
|
|
117040
|
-
var _define_property14 = require_define_property();
|
|
117041
116930
|
var _interop_require_default = require_interop_require_default();
|
|
117042
116931
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
|
117043
116932
|
var LOG_LEVEL = {
|
|
@@ -117123,10 +117012,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
117123
117012
|
return longestLabel;
|
|
117124
117013
|
}
|
|
117125
117014
|
constructor(options = {}) {
|
|
117126
|
-
_define_property14._(this, "level", void 0);
|
|
117127
|
-
_define_property14._(this, "config", void 0);
|
|
117128
|
-
_define_property14._(this, "types", void 0);
|
|
117129
|
-
_define_property14._(this, "longestLabel", void 0);
|
|
117130
117015
|
this.level = options.level || LOG_TYPES.log.level;
|
|
117131
117016
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
|
117132
117017
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
|
@@ -117807,9 +117692,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
117807
117692
|
}, []);
|
|
117808
117693
|
};
|
|
117809
117694
|
var prettyInstructions = (appContext, config) => {
|
|
117810
|
-
var _config_dev;
|
|
117695
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117811
117696
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117812
|
-
const
|
|
117697
|
+
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);
|
|
117698
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117813
117699
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117814
117700
|
let message = "App running at:\n\n";
|
|
117815
117701
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -118055,31 +117941,6 @@ var require_runtimeExports = __commonJS({
|
|
|
118055
117941
|
}
|
|
118056
117942
|
});
|
|
118057
117943
|
|
|
118058
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
|
118059
|
-
var require_test = __commonJS({
|
|
118060
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
|
118061
|
-
"use strict";
|
|
118062
|
-
Object.defineProperty(exports, "__esModule", {
|
|
118063
|
-
value: true
|
|
118064
|
-
});
|
|
118065
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
|
118066
|
-
enumerable: true,
|
|
118067
|
-
get: function() {
|
|
118068
|
-
return initSnapshotSerializer;
|
|
118069
|
-
}
|
|
118070
|
-
});
|
|
118071
|
-
var initSnapshotSerializer = (root) => {
|
|
118072
|
-
expect.addSnapshotSerializer({
|
|
118073
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
|
118074
|
-
print: (val) => (
|
|
118075
|
-
// eslint-disable-next-line no-nested-ternary
|
|
118076
|
-
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
|
|
118077
|
-
)
|
|
118078
|
-
});
|
|
118079
|
-
};
|
|
118080
|
-
}
|
|
118081
|
-
});
|
|
118082
|
-
|
|
118083
117944
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
|
118084
117945
|
var require_watch = __commonJS({
|
|
118085
117946
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
|
@@ -118176,7 +118037,6 @@ var require_cli = __commonJS({
|
|
|
118176
118037
|
_export_star._(require_require(), exports);
|
|
118177
118038
|
_export_star._(require_routes(), exports);
|
|
118178
118039
|
_export_star._(require_runtimeExports(), exports);
|
|
118179
|
-
_export_star._(require_test(), exports);
|
|
118180
118040
|
_export_star._(require_watch(), exports);
|
|
118181
118041
|
}
|
|
118182
118042
|
});
|
|
@@ -118246,7 +118106,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
118246
118106
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
118247
118107
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
118248
118108
|
|
|
118249
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
118109
|
+
// ../../../../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
|
|
118250
118110
|
var import_lodash6 = __toESM(require_lodash2());
|
|
118251
118111
|
var import_comment_json = __toESM(require_src2());
|
|
118252
118112
|
|
|
@@ -130347,10 +130207,10 @@ var Schema = (
|
|
|
130347
130207
|
}()
|
|
130348
130208
|
);
|
|
130349
130209
|
|
|
130350
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130210
|
+
// ../../../../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
|
|
130351
130211
|
var import_inquirer = __toESM(require_inquirer());
|
|
130352
130212
|
|
|
130353
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130213
|
+
// ../../../../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
|
|
130354
130214
|
var import_lodash2 = __toESM(require_lodash2());
|
|
130355
130215
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130356
130216
|
try {
|
|
@@ -130697,7 +130557,7 @@ function transformForm(schema) {
|
|
|
130697
130557
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
130698
130558
|
}
|
|
130699
130559
|
|
|
130700
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130560
|
+
// ../../../../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
|
|
130701
130561
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130702
130562
|
try {
|
|
130703
130563
|
var info = gen[key](arg);
|
|
@@ -131221,7 +131081,7 @@ function _prompt() {
|
|
|
131221
131081
|
return _prompt.apply(this, arguments);
|
|
131222
131082
|
}
|
|
131223
131083
|
|
|
131224
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
131084
|
+
// ../../../../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
|
|
131225
131085
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131226
131086
|
try {
|
|
131227
131087
|
var info = gen[key](arg);
|
|
@@ -131461,7 +131321,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
131461
131321
|
return CLIReader2;
|
|
131462
131322
|
}();
|
|
131463
131323
|
|
|
131464
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131324
|
+
// ../../../../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
|
|
131465
131325
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
131466
131326
|
|
|
131467
131327
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -131540,7 +131400,7 @@ var I18n = class {
|
|
|
131540
131400
|
}
|
|
131541
131401
|
};
|
|
131542
131402
|
|
|
131543
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131403
|
+
// ../../../../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
|
|
131544
131404
|
var ZH_LOCALE = {
|
|
131545
131405
|
environment: {
|
|
131546
131406
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -131567,7 +131427,7 @@ var ZH_LOCALE = {
|
|
|
131567
131427
|
}
|
|
131568
131428
|
};
|
|
131569
131429
|
|
|
131570
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131430
|
+
// ../../../../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
|
|
131571
131431
|
var EN_LOCALE = {
|
|
131572
131432
|
environment: {
|
|
131573
131433
|
node_version: "please upgrade node to lts version",
|
|
@@ -131594,14 +131454,14 @@ var EN_LOCALE = {
|
|
|
131594
131454
|
}
|
|
131595
131455
|
};
|
|
131596
131456
|
|
|
131597
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131457
|
+
// ../../../../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
|
|
131598
131458
|
var i18n = new I18n();
|
|
131599
131459
|
var localeKeys = i18n.init("zh", {
|
|
131600
131460
|
zh: ZH_LOCALE,
|
|
131601
131461
|
en: EN_LOCALE
|
|
131602
131462
|
});
|
|
131603
131463
|
|
|
131604
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131464
|
+
// ../../../../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
|
|
131605
131465
|
var import_lodash5 = __toESM(require_lodash2());
|
|
131606
131466
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131607
131467
|
try {
|
|
@@ -131810,7 +131670,7 @@ function transformInquirerSchema(questions) {
|
|
|
131810
131670
|
return questions;
|
|
131811
131671
|
}
|
|
131812
131672
|
|
|
131813
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131673
|
+
// ../../../../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
|
|
131814
131674
|
var import_path4 = __toESM(require("path"));
|
|
131815
131675
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131816
131676
|
try {
|
|
@@ -132074,7 +131934,7 @@ function _checkUseNvm() {
|
|
|
132074
131934
|
return _checkUseNvm.apply(this, arguments);
|
|
132075
131935
|
}
|
|
132076
131936
|
|
|
132077
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131937
|
+
// ../../../../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
|
|
132078
131938
|
function _array_like_to_array(arr, len) {
|
|
132079
131939
|
if (len == null || len > arr.length)
|
|
132080
131940
|
len = arr.length;
|
|
@@ -133567,8 +133427,6 @@ var src_default = (context, generator) => __async(void 0, null, function* () {
|
|
|
133567
133427
|
yield handleTemplateFile(context, generator);
|
|
133568
133428
|
generator.logger.debug(`forge @modern-js/packages-generator succeed `);
|
|
133569
133429
|
});
|
|
133570
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
133571
|
-
0 && (module.exports = {});
|
|
133572
133430
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
133573
133431
|
/*!
|
|
133574
133432
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
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,15 +30,16 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
33
|
+
"@scripts/build": "2.23.0",
|
|
34
|
+
"@scripts/jest-config": "2.23.0",
|
|
35
|
+
"@modern-js/generator-common": "3.1.22",
|
|
36
|
+
"@modern-js/generator-utils": "3.1.22"
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"registry": "https://registry.npmjs.org/",
|
|
41
|
-
"access": "public"
|
|
41
|
+
"access": "public",
|
|
42
|
+
"provenance": true
|
|
42
43
|
},
|
|
43
44
|
"types": "./src/index.ts",
|
|
44
45
|
"scripts": {
|