@modern-js/mwa-generator 3.1.20 → 3.1.21
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 +59 -47
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -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 {
|
|
@@ -117496,9 +117507,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
117496
117507
|
}, []);
|
|
117497
117508
|
};
|
|
117498
117509
|
var prettyInstructions = (appContext, config) => {
|
|
117499
|
-
var _config_dev;
|
|
117510
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117500
117511
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117501
|
-
const
|
|
117512
|
+
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);
|
|
117513
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117502
117514
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117503
117515
|
let message = "App running at:\n\n";
|
|
117504
117516
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -117936,7 +117948,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
117936
117948
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
117937
117949
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
117938
117950
|
|
|
117939
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
117951
|
+
// ../../../../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
117952
|
var import_lodash6 = __toESM(require_lodash2());
|
|
117941
117953
|
var import_comment_json = __toESM(require_src2());
|
|
117942
117954
|
|
|
@@ -130037,10 +130049,10 @@ var Schema = (
|
|
|
130037
130049
|
}()
|
|
130038
130050
|
);
|
|
130039
130051
|
|
|
130040
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130052
|
+
// ../../../../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
130053
|
var import_inquirer = __toESM(require_inquirer());
|
|
130042
130054
|
|
|
130043
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130055
|
+
// ../../../../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
130056
|
var import_lodash2 = __toESM(require_lodash2());
|
|
130045
130057
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130046
130058
|
try {
|
|
@@ -130387,7 +130399,7 @@ function transformForm(schema) {
|
|
|
130387
130399
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
130388
130400
|
}
|
|
130389
130401
|
|
|
130390
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130402
|
+
// ../../../../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
130403
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130392
130404
|
try {
|
|
130393
130405
|
var info = gen[key](arg);
|
|
@@ -130911,7 +130923,7 @@ function _prompt() {
|
|
|
130911
130923
|
return _prompt.apply(this, arguments);
|
|
130912
130924
|
}
|
|
130913
130925
|
|
|
130914
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130926
|
+
// ../../../../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
130927
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130916
130928
|
try {
|
|
130917
130929
|
var info = gen[key](arg);
|
|
@@ -131151,7 +131163,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
131151
131163
|
return CLIReader2;
|
|
131152
131164
|
}();
|
|
131153
131165
|
|
|
131154
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131166
|
+
// ../../../../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
131167
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
131156
131168
|
|
|
131157
131169
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -131230,7 +131242,7 @@ var I18n = class {
|
|
|
131230
131242
|
}
|
|
131231
131243
|
};
|
|
131232
131244
|
|
|
131233
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131245
|
+
// ../../../../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
131246
|
var ZH_LOCALE = {
|
|
131235
131247
|
environment: {
|
|
131236
131248
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -131257,7 +131269,7 @@ var ZH_LOCALE = {
|
|
|
131257
131269
|
}
|
|
131258
131270
|
};
|
|
131259
131271
|
|
|
131260
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131272
|
+
// ../../../../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
131273
|
var EN_LOCALE = {
|
|
131262
131274
|
environment: {
|
|
131263
131275
|
node_version: "please upgrade node to lts version",
|
|
@@ -131284,14 +131296,14 @@ var EN_LOCALE = {
|
|
|
131284
131296
|
}
|
|
131285
131297
|
};
|
|
131286
131298
|
|
|
131287
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131299
|
+
// ../../../../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
131300
|
var i18n = new I18n();
|
|
131289
131301
|
var localeKeys = i18n.init("zh", {
|
|
131290
131302
|
zh: ZH_LOCALE,
|
|
131291
131303
|
en: EN_LOCALE
|
|
131292
131304
|
});
|
|
131293
131305
|
|
|
131294
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131306
|
+
// ../../../../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
131307
|
var import_lodash5 = __toESM(require_lodash2());
|
|
131296
131308
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131297
131309
|
try {
|
|
@@ -131500,7 +131512,7 @@ function transformInquirerSchema(questions) {
|
|
|
131500
131512
|
return questions;
|
|
131501
131513
|
}
|
|
131502
131514
|
|
|
131503
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131515
|
+
// ../../../../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
131516
|
var import_path4 = __toESM(require("path"));
|
|
131505
131517
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131506
131518
|
try {
|
|
@@ -131764,7 +131776,7 @@ function _checkUseNvm() {
|
|
|
131764
131776
|
return _checkUseNvm.apply(this, arguments);
|
|
131765
131777
|
}
|
|
131766
131778
|
|
|
131767
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131779
|
+
// ../../../../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
131780
|
function _array_like_to_array(arr, len) {
|
|
131769
131781
|
if (len == null || len > arr.length)
|
|
131770
131782
|
len = arr.length;
|
|
@@ -133824,7 +133836,7 @@ var ZH_LOCALE4 = {
|
|
|
133824
133836
|
var EN_LOCALE4 = {
|
|
133825
133837
|
get_packages_error: "get all packages failed,please check this environment and try again",
|
|
133826
133838
|
success: `Success!
|
|
133827
|
-
You can run the following command in the directory of the new project
|
|
133839
|
+
You can run the following command in the directory of the new project:
|
|
133828
133840
|
{packageManager} dev # Starting the dev server
|
|
133829
133841
|
{packageManager} build # Build the app for production
|
|
133830
133842
|
{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.21",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-common": "3.1.
|
|
34
|
-
"@modern-js/
|
|
35
|
-
"@modern-js/generator-utils": "3.1.
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@modern-js/
|
|
38
|
-
"@modern-js/plugin-i18n": "2.22.
|
|
39
|
-
"@modern-js/
|
|
40
|
-
"@modern-js/entry-generator": "3.1.
|
|
41
|
-
"@scripts/jest-config": "2.22.
|
|
42
|
-
"@scripts/build": "2.22.
|
|
33
|
+
"@modern-js/generator-common": "3.1.21",
|
|
34
|
+
"@modern-js/base-generator": "3.1.21",
|
|
35
|
+
"@modern-js/generator-utils": "3.1.21",
|
|
36
|
+
"@modern-js/packages-generator": "3.1.21",
|
|
37
|
+
"@modern-js/rspack-generator": "3.1.21",
|
|
38
|
+
"@modern-js/plugin-i18n": "2.22.1",
|
|
39
|
+
"@modern-js/dependence-generator": "3.1.21",
|
|
40
|
+
"@modern-js/entry-generator": "3.1.21",
|
|
41
|
+
"@scripts/jest-config": "2.22.1",
|
|
42
|
+
"@scripts/build": "2.22.1"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|