@modern-js/bff-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
|
@@ -35276,6 +35276,9 @@ var require_constants = __commonJS({
|
|
|
35276
35276
|
ROUTE_SPEC_FILE: function() {
|
|
35277
35277
|
return ROUTE_SPEC_FILE;
|
|
35278
35278
|
},
|
|
35279
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
|
35280
|
+
return NESTED_ROUTE_SPEC_FILE;
|
|
35281
|
+
},
|
|
35279
35282
|
MAIN_ENTRY_NAME: function() {
|
|
35280
35283
|
return MAIN_ENTRY_NAME;
|
|
35281
35284
|
},
|
|
@@ -35360,9 +35363,6 @@ var require_constants = __commonJS({
|
|
|
35360
35363
|
INTERNAL_SERVER_PLUGINS: function() {
|
|
35361
35364
|
return INTERNAL_SERVER_PLUGINS;
|
|
35362
35365
|
},
|
|
35363
|
-
PLUGIN_SCHEMAS: function() {
|
|
35364
|
-
return PLUGIN_SCHEMAS;
|
|
35365
|
-
},
|
|
35366
35366
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
|
35367
35367
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
|
35368
35368
|
}
|
|
@@ -35370,6 +35370,7 @@ var require_constants = __commonJS({
|
|
|
35370
35370
|
var _export_star = require_export_star();
|
|
35371
35371
|
_export_star._(require_chainId(), exports);
|
|
35372
35372
|
var ROUTE_SPEC_FILE = "route.json";
|
|
35373
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
|
35373
35374
|
var MAIN_ENTRY_NAME = "main";
|
|
35374
35375
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
35375
35376
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
|
@@ -35416,8 +35417,6 @@ var require_constants = __commonJS({
|
|
|
35416
35417
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
35417
35418
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
35418
35419
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
35419
|
-
// TODO: Maybe can remove it
|
|
35420
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
35421
35420
|
// legacy router (inner react-router-dom v5)
|
|
35422
35421
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
35423
35422
|
};
|
|
@@ -35448,8 +35447,6 @@ var require_constants = __commonJS({
|
|
|
35448
35447
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
35449
35448
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
35450
35449
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
35451
|
-
// TODO: Maybe can remove it
|
|
35452
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
|
35453
35450
|
// legacy router (inner react-router-dom v5)
|
|
35454
35451
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
35455
35452
|
};
|
|
@@ -35465,214 +35462,6 @@ var require_constants = __commonJS({
|
|
|
35465
35462
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
|
35466
35463
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
|
35467
35464
|
};
|
|
35468
|
-
var PLUGIN_SCHEMAS = {
|
|
35469
|
-
"@modern-js/runtime": [
|
|
35470
|
-
{
|
|
35471
|
-
target: "runtime",
|
|
35472
|
-
schema: {
|
|
35473
|
-
type: "object",
|
|
35474
|
-
additionalProperties: false
|
|
35475
|
-
}
|
|
35476
|
-
},
|
|
35477
|
-
{
|
|
35478
|
-
target: "runtimeByEntries",
|
|
35479
|
-
schema: {
|
|
35480
|
-
type: "object",
|
|
35481
|
-
patternProperties: {
|
|
35482
|
-
[ENTRY_NAME_PATTERN]: {
|
|
35483
|
-
type: "object"
|
|
35484
|
-
}
|
|
35485
|
-
},
|
|
35486
|
-
additionalProperties: false
|
|
35487
|
-
}
|
|
35488
|
-
}
|
|
35489
|
-
],
|
|
35490
|
-
"@modern-js/plugin-swc": [
|
|
35491
|
-
{
|
|
35492
|
-
target: "tools.swc",
|
|
35493
|
-
schema: {
|
|
35494
|
-
typeof: [
|
|
35495
|
-
"object"
|
|
35496
|
-
]
|
|
35497
|
-
}
|
|
35498
|
-
}
|
|
35499
|
-
],
|
|
35500
|
-
"@modern-js/plugin-bff": [
|
|
35501
|
-
{
|
|
35502
|
-
target: "bff",
|
|
35503
|
-
schema: {
|
|
35504
|
-
type: "object",
|
|
35505
|
-
properties: {
|
|
35506
|
-
prefix: {
|
|
35507
|
-
type: [
|
|
35508
|
-
"string",
|
|
35509
|
-
"array"
|
|
35510
|
-
],
|
|
35511
|
-
items: {
|
|
35512
|
-
type: "string"
|
|
35513
|
-
}
|
|
35514
|
-
},
|
|
35515
|
-
fetcher: {
|
|
35516
|
-
type: "string"
|
|
35517
|
-
},
|
|
35518
|
-
proxy: {
|
|
35519
|
-
type: "object"
|
|
35520
|
-
},
|
|
35521
|
-
requestCreator: {
|
|
35522
|
-
type: "string"
|
|
35523
|
-
}
|
|
35524
|
-
}
|
|
35525
|
-
}
|
|
35526
|
-
}
|
|
35527
|
-
],
|
|
35528
|
-
"@modern-js/plugin-tailwindcss": [
|
|
35529
|
-
{
|
|
35530
|
-
target: "tools.tailwindcss",
|
|
35531
|
-
schema: {
|
|
35532
|
-
typeof: [
|
|
35533
|
-
"object",
|
|
35534
|
-
"function"
|
|
35535
|
-
]
|
|
35536
|
-
}
|
|
35537
|
-
}
|
|
35538
|
-
],
|
|
35539
|
-
"@modern-js/plugin-proxy": [
|
|
35540
|
-
{
|
|
35541
|
-
target: "dev.proxy",
|
|
35542
|
-
schema: {
|
|
35543
|
-
typeof: [
|
|
35544
|
-
"string",
|
|
35545
|
-
"object"
|
|
35546
|
-
]
|
|
35547
|
-
}
|
|
35548
|
-
}
|
|
35549
|
-
],
|
|
35550
|
-
"@modern-js/plugin-ssg": [
|
|
35551
|
-
{
|
|
35552
|
-
target: "output.ssg",
|
|
35553
|
-
schema: {
|
|
35554
|
-
oneOf: [
|
|
35555
|
-
{
|
|
35556
|
-
type: "boolean"
|
|
35557
|
-
},
|
|
35558
|
-
{
|
|
35559
|
-
type: "object"
|
|
35560
|
-
},
|
|
35561
|
-
{
|
|
35562
|
-
instanceof: "Function"
|
|
35563
|
-
}
|
|
35564
|
-
]
|
|
35565
|
-
}
|
|
35566
|
-
}
|
|
35567
|
-
],
|
|
35568
|
-
"@modern-js/plugin-state": [
|
|
35569
|
-
{
|
|
35570
|
-
target: "runtime.state",
|
|
35571
|
-
schema: {
|
|
35572
|
-
type: [
|
|
35573
|
-
"boolean",
|
|
35574
|
-
"object"
|
|
35575
|
-
]
|
|
35576
|
-
}
|
|
35577
|
-
}
|
|
35578
|
-
],
|
|
35579
|
-
"@modern-js/plugin-design-token": [
|
|
35580
|
-
// Legacy Features
|
|
35581
|
-
{
|
|
35582
|
-
target: "source.designSystem",
|
|
35583
|
-
schema: {
|
|
35584
|
-
typeof: [
|
|
35585
|
-
"object"
|
|
35586
|
-
]
|
|
35587
|
-
}
|
|
35588
|
-
},
|
|
35589
|
-
{
|
|
35590
|
-
target: "source.designSystem.supportStyledComponents",
|
|
35591
|
-
schema: {
|
|
35592
|
-
type: [
|
|
35593
|
-
"boolean"
|
|
35594
|
-
]
|
|
35595
|
-
}
|
|
35596
|
-
},
|
|
35597
|
-
{
|
|
35598
|
-
target: "designSystem",
|
|
35599
|
-
schema: {
|
|
35600
|
-
typeof: [
|
|
35601
|
-
"object"
|
|
35602
|
-
]
|
|
35603
|
-
}
|
|
35604
|
-
}
|
|
35605
|
-
],
|
|
35606
|
-
"@modern-js/plugin-router": [
|
|
35607
|
-
{
|
|
35608
|
-
target: "runtime.router",
|
|
35609
|
-
schema: {
|
|
35610
|
-
type: [
|
|
35611
|
-
"boolean",
|
|
35612
|
-
"object"
|
|
35613
|
-
]
|
|
35614
|
-
}
|
|
35615
|
-
}
|
|
35616
|
-
],
|
|
35617
|
-
"@modern-js/plugin-testing": [
|
|
35618
|
-
{
|
|
35619
|
-
target: "testing",
|
|
35620
|
-
schema: {
|
|
35621
|
-
typeof: [
|
|
35622
|
-
"object"
|
|
35623
|
-
]
|
|
35624
|
-
}
|
|
35625
|
-
},
|
|
35626
|
-
{
|
|
35627
|
-
target: "tools.jest",
|
|
35628
|
-
schema: {
|
|
35629
|
-
typeof: [
|
|
35630
|
-
"object",
|
|
35631
|
-
"function"
|
|
35632
|
-
]
|
|
35633
|
-
}
|
|
35634
|
-
}
|
|
35635
|
-
],
|
|
35636
|
-
"@modern-js/plugin-garfish": [
|
|
35637
|
-
{
|
|
35638
|
-
target: "runtime.masterApp",
|
|
35639
|
-
schema: {
|
|
35640
|
-
type: [
|
|
35641
|
-
"boolean",
|
|
35642
|
-
"object"
|
|
35643
|
-
]
|
|
35644
|
-
}
|
|
35645
|
-
},
|
|
35646
|
-
{
|
|
35647
|
-
target: "dev.withMasterApp",
|
|
35648
|
-
schema: {
|
|
35649
|
-
type: [
|
|
35650
|
-
"object"
|
|
35651
|
-
]
|
|
35652
|
-
}
|
|
35653
|
-
},
|
|
35654
|
-
{
|
|
35655
|
-
target: "deploy.microFrontend",
|
|
35656
|
-
schema: {
|
|
35657
|
-
type: [
|
|
35658
|
-
"boolean",
|
|
35659
|
-
"object"
|
|
35660
|
-
]
|
|
35661
|
-
}
|
|
35662
|
-
}
|
|
35663
|
-
],
|
|
35664
|
-
"@modern-js/plugin-nocode": [],
|
|
35665
|
-
"@modern-js/plugin-worker": [
|
|
35666
|
-
{
|
|
35667
|
-
target: "deploy.worker.ssr",
|
|
35668
|
-
schema: {
|
|
35669
|
-
type: [
|
|
35670
|
-
"boolean"
|
|
35671
|
-
]
|
|
35672
|
-
}
|
|
35673
|
-
}
|
|
35674
|
-
]
|
|
35675
|
-
};
|
|
35676
35465
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
35677
35466
|
allowNamespaces: true,
|
|
35678
35467
|
allExtensions: true,
|
|
@@ -36127,11 +35916,14 @@ var require_project = __commonJS({
|
|
|
36127
35916
|
return false;
|
|
36128
35917
|
}
|
|
36129
35918
|
};
|
|
36130
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
|
36131
|
-
const
|
|
36132
|
-
const existSrc = yield _compiled.fs.pathExists(
|
|
35919
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
|
35920
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
|
35921
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
|
36133
35922
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
36134
|
-
|
|
35923
|
+
if (options["api-only"]) {
|
|
35924
|
+
return true;
|
|
35925
|
+
}
|
|
35926
|
+
return existApi && !existSrc;
|
|
36135
35927
|
});
|
|
36136
35928
|
var isWebOnly = () => __async(exports, null, function* () {
|
|
36137
35929
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
|
@@ -36465,21 +36257,6 @@ var require_get = __commonJS({
|
|
|
36465
36257
|
}
|
|
36466
36258
|
});
|
|
36467
36259
|
|
|
36468
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
|
36469
|
-
var require_define_property = __commonJS({
|
|
36470
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
|
36471
|
-
"use strict";
|
|
36472
|
-
exports._ = exports._define_property = _define_property15;
|
|
36473
|
-
function _define_property15(obj, key, value) {
|
|
36474
|
-
if (key in obj) {
|
|
36475
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
36476
|
-
} else
|
|
36477
|
-
obj[key] = value;
|
|
36478
|
-
return obj;
|
|
36479
|
-
}
|
|
36480
|
-
}
|
|
36481
|
-
});
|
|
36482
|
-
|
|
36483
36260
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
|
36484
36261
|
var require_logger = __commonJS({
|
|
36485
36262
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
|
@@ -36502,7 +36279,6 @@ var require_logger = __commonJS({
|
|
|
36502
36279
|
return logger2;
|
|
36503
36280
|
}
|
|
36504
36281
|
});
|
|
36505
|
-
var _define_property15 = require_define_property();
|
|
36506
36282
|
var _interop_require_default = require_interop_require_default();
|
|
36507
36283
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk());
|
|
36508
36284
|
var LOG_LEVEL = {
|
|
@@ -36588,10 +36364,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
36588
36364
|
return longestLabel;
|
|
36589
36365
|
}
|
|
36590
36366
|
constructor(options = {}) {
|
|
36591
|
-
_define_property15._(this, "level", void 0);
|
|
36592
|
-
_define_property15._(this, "config", void 0);
|
|
36593
|
-
_define_property15._(this, "types", void 0);
|
|
36594
|
-
_define_property15._(this, "longestLabel", void 0);
|
|
36595
36367
|
this.level = options.level || LOG_TYPES.log.level;
|
|
36596
36368
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
|
36597
36369
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
|
@@ -37272,9 +37044,10 @@ var require_prettyInstructions = __commonJS({
|
|
|
37272
37044
|
}, []);
|
|
37273
37045
|
};
|
|
37274
37046
|
var prettyInstructions = (appContext, config) => {
|
|
37275
|
-
var _config_dev;
|
|
37047
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
37276
37048
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
37277
|
-
const
|
|
37049
|
+
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);
|
|
37050
|
+
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
37278
37051
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
37279
37052
|
let message = "App running at:\n\n";
|
|
37280
37053
|
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
@@ -37520,31 +37293,6 @@ var require_runtimeExports = __commonJS({
|
|
|
37520
37293
|
}
|
|
37521
37294
|
});
|
|
37522
37295
|
|
|
37523
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
|
37524
|
-
var require_test = __commonJS({
|
|
37525
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
|
37526
|
-
"use strict";
|
|
37527
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37528
|
-
value: true
|
|
37529
|
-
});
|
|
37530
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
|
37531
|
-
enumerable: true,
|
|
37532
|
-
get: function() {
|
|
37533
|
-
return initSnapshotSerializer;
|
|
37534
|
-
}
|
|
37535
|
-
});
|
|
37536
|
-
var initSnapshotSerializer = (root) => {
|
|
37537
|
-
expect.addSnapshotSerializer({
|
|
37538
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
|
37539
|
-
print: (val) => (
|
|
37540
|
-
// eslint-disable-next-line no-nested-ternary
|
|
37541
|
-
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
|
|
37542
|
-
)
|
|
37543
|
-
});
|
|
37544
|
-
};
|
|
37545
|
-
}
|
|
37546
|
-
});
|
|
37547
|
-
|
|
37548
37296
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
|
37549
37297
|
var require_watch = __commonJS({
|
|
37550
37298
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
|
@@ -37641,7 +37389,6 @@ var require_cli = __commonJS({
|
|
|
37641
37389
|
_export_star._(require_require(), exports);
|
|
37642
37390
|
_export_star._(require_routes(), exports);
|
|
37643
37391
|
_export_star._(require_runtimeExports(), exports);
|
|
37644
|
-
_export_star._(require_test(), exports);
|
|
37645
37392
|
_export_star._(require_watch(), exports);
|
|
37646
37393
|
}
|
|
37647
37394
|
});
|
|
@@ -74168,7 +73915,7 @@ var require_parse = __commonJS({
|
|
|
74168
73915
|
return current.type === "Punctuator" ? current.value : current.type;
|
|
74169
73916
|
};
|
|
74170
73917
|
var is = (t) => type() === t;
|
|
74171
|
-
var
|
|
73918
|
+
var expect = (a) => {
|
|
74172
73919
|
if (!is(a)) {
|
|
74173
73920
|
unexpected();
|
|
74174
73921
|
}
|
|
@@ -74250,7 +73997,7 @@ var require_parse = __commonJS({
|
|
|
74250
73997
|
while (!is(CURLY_BRACKET_CLOSE)) {
|
|
74251
73998
|
if (started) {
|
|
74252
73999
|
assign_comments(PREFIX_AFTER_VALUE);
|
|
74253
|
-
|
|
74000
|
+
expect(COMMA);
|
|
74254
74001
|
next();
|
|
74255
74002
|
parse_comments();
|
|
74256
74003
|
assign_after_comments();
|
|
@@ -74259,13 +74006,13 @@ var require_parse = __commonJS({
|
|
|
74259
74006
|
}
|
|
74260
74007
|
}
|
|
74261
74008
|
started = true;
|
|
74262
|
-
|
|
74009
|
+
expect("String");
|
|
74263
74010
|
name = JSON.parse(current.value);
|
|
74264
74011
|
set_prop(name);
|
|
74265
74012
|
assign_comments(PREFIX_BEFORE);
|
|
74266
74013
|
next();
|
|
74267
74014
|
parse_comments(PREFIX_AFTER_PROP);
|
|
74268
|
-
|
|
74015
|
+
expect(COLON);
|
|
74269
74016
|
next();
|
|
74270
74017
|
parse_comments(PREFIX_AFTER_COLON);
|
|
74271
74018
|
obj[name] = transform(name, walk());
|
|
@@ -74293,7 +74040,7 @@ var require_parse = __commonJS({
|
|
|
74293
74040
|
while (!is(BRACKET_CLOSE)) {
|
|
74294
74041
|
if (started) {
|
|
74295
74042
|
assign_comments(PREFIX_AFTER_VALUE);
|
|
74296
|
-
|
|
74043
|
+
expect(COMMA);
|
|
74297
74044
|
next();
|
|
74298
74045
|
parse_comments();
|
|
74299
74046
|
assign_after_comments();
|
|
@@ -116385,9 +116132,9 @@ var require_ms = __commonJS({
|
|
|
116385
116132
|
}
|
|
116386
116133
|
});
|
|
116387
116134
|
|
|
116388
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
116135
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js
|
|
116389
116136
|
var require_common3 = __commonJS({
|
|
116390
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
116137
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module2) {
|
|
116391
116138
|
function setup(env) {
|
|
116392
116139
|
createDebug.debug = createDebug;
|
|
116393
116140
|
createDebug.default = createDebug;
|
|
@@ -116548,9 +116295,9 @@ var require_common3 = __commonJS({
|
|
|
116548
116295
|
}
|
|
116549
116296
|
});
|
|
116550
116297
|
|
|
116551
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
116298
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js
|
|
116552
116299
|
var require_browser = __commonJS({
|
|
116553
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
116300
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module2) {
|
|
116554
116301
|
exports.formatArgs = formatArgs;
|
|
116555
116302
|
exports.save = save;
|
|
116556
116303
|
exports.load = load;
|
|
@@ -116730,27 +116477,29 @@ var require_has_flag = __commonJS({
|
|
|
116730
116477
|
}
|
|
116731
116478
|
});
|
|
116732
116479
|
|
|
116733
|
-
// ../../../../node_modules/.pnpm/supports-color@
|
|
116480
|
+
// ../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
116734
116481
|
var require_supports_color = __commonJS({
|
|
116735
|
-
"../../../../node_modules/.pnpm/supports-color@
|
|
116482
|
+
"../../../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
|
|
116736
116483
|
"use strict";
|
|
116737
116484
|
var os = require("os");
|
|
116738
116485
|
var tty = require("tty");
|
|
116739
116486
|
var hasFlag = require_has_flag();
|
|
116740
116487
|
var { env } = process;
|
|
116741
|
-
var
|
|
116488
|
+
var flagForceColor;
|
|
116742
116489
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
116743
|
-
|
|
116490
|
+
flagForceColor = 0;
|
|
116744
116491
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
116745
|
-
|
|
116492
|
+
flagForceColor = 1;
|
|
116746
116493
|
}
|
|
116747
|
-
|
|
116748
|
-
if (
|
|
116749
|
-
|
|
116750
|
-
|
|
116751
|
-
|
|
116752
|
-
|
|
116753
|
-
|
|
116494
|
+
function envForceColor() {
|
|
116495
|
+
if ("FORCE_COLOR" in env) {
|
|
116496
|
+
if (env.FORCE_COLOR === "true") {
|
|
116497
|
+
return 1;
|
|
116498
|
+
}
|
|
116499
|
+
if (env.FORCE_COLOR === "false") {
|
|
116500
|
+
return 0;
|
|
116501
|
+
}
|
|
116502
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
116754
116503
|
}
|
|
116755
116504
|
}
|
|
116756
116505
|
function translateLevel(level) {
|
|
@@ -116764,15 +116513,22 @@ var require_supports_color = __commonJS({
|
|
|
116764
116513
|
has16m: level >= 3
|
|
116765
116514
|
};
|
|
116766
116515
|
}
|
|
116767
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
116516
|
+
function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
116517
|
+
const noFlagForceColor = envForceColor();
|
|
116518
|
+
if (noFlagForceColor !== void 0) {
|
|
116519
|
+
flagForceColor = noFlagForceColor;
|
|
116520
|
+
}
|
|
116521
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
116768
116522
|
if (forceColor === 0) {
|
|
116769
116523
|
return 0;
|
|
116770
116524
|
}
|
|
116771
|
-
if (
|
|
116772
|
-
|
|
116773
|
-
|
|
116774
|
-
|
|
116775
|
-
|
|
116525
|
+
if (sniffFlags) {
|
|
116526
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
116527
|
+
return 3;
|
|
116528
|
+
}
|
|
116529
|
+
if (hasFlag("color=256")) {
|
|
116530
|
+
return 2;
|
|
116531
|
+
}
|
|
116776
116532
|
}
|
|
116777
116533
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
116778
116534
|
return 0;
|
|
@@ -116789,7 +116545,7 @@ var require_supports_color = __commonJS({
|
|
|
116789
116545
|
return 1;
|
|
116790
116546
|
}
|
|
116791
116547
|
if ("CI" in env) {
|
|
116792
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
116548
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
116793
116549
|
return 1;
|
|
116794
116550
|
}
|
|
116795
116551
|
return min;
|
|
@@ -116801,7 +116557,7 @@ var require_supports_color = __commonJS({
|
|
|
116801
116557
|
return 3;
|
|
116802
116558
|
}
|
|
116803
116559
|
if ("TERM_PROGRAM" in env) {
|
|
116804
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
116560
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
116805
116561
|
switch (env.TERM_PROGRAM) {
|
|
116806
116562
|
case "iTerm.app":
|
|
116807
116563
|
return version >= 3 ? 3 : 2;
|
|
@@ -116820,21 +116576,23 @@ var require_supports_color = __commonJS({
|
|
|
116820
116576
|
}
|
|
116821
116577
|
return min;
|
|
116822
116578
|
}
|
|
116823
|
-
function getSupportLevel(stream) {
|
|
116824
|
-
const level = supportsColor(stream,
|
|
116579
|
+
function getSupportLevel(stream, options = {}) {
|
|
116580
|
+
const level = supportsColor(stream, __spreadValues({
|
|
116581
|
+
streamIsTTY: stream && stream.isTTY
|
|
116582
|
+
}, options));
|
|
116825
116583
|
return translateLevel(level);
|
|
116826
116584
|
}
|
|
116827
116585
|
module2.exports = {
|
|
116828
116586
|
supportsColor: getSupportLevel,
|
|
116829
|
-
stdout:
|
|
116830
|
-
stderr:
|
|
116587
|
+
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
116588
|
+
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
116831
116589
|
};
|
|
116832
116590
|
}
|
|
116833
116591
|
});
|
|
116834
116592
|
|
|
116835
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
116593
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js
|
|
116836
116594
|
var require_node2 = __commonJS({
|
|
116837
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
116595
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module2) {
|
|
116838
116596
|
var tty = require("tty");
|
|
116839
116597
|
var util = require("util");
|
|
116840
116598
|
exports.init = init;
|
|
@@ -117006,9 +116764,9 @@ var require_node2 = __commonJS({
|
|
|
117006
116764
|
}
|
|
117007
116765
|
});
|
|
117008
116766
|
|
|
117009
|
-
// ../../../../node_modules/.pnpm/debug@4.3.
|
|
116767
|
+
// ../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js
|
|
117010
116768
|
var require_src3 = __commonJS({
|
|
117011
|
-
"../../../../node_modules/.pnpm/debug@4.3.
|
|
116769
|
+
"../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module2) {
|
|
117012
116770
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
117013
116771
|
module2.exports = require_browser();
|
|
117014
116772
|
} else {
|
|
@@ -117983,7 +117741,7 @@ var ZH_LOCALE = {
|
|
|
117983
117741
|
function: {
|
|
117984
117742
|
self: "启用可选功能",
|
|
117985
117743
|
question: "请选择功能名称",
|
|
117986
|
-
tailwindcss: "
|
|
117744
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
|
117987
117745
|
bff: "启用「BFF」功能",
|
|
117988
117746
|
micro_frontend: "启用「微前端」模式",
|
|
117989
117747
|
i18n: "启用「国际化(i18n)」功能",
|
|
@@ -118718,7 +118476,7 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
118718
118476
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
118719
118477
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
118720
118478
|
|
|
118721
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
118479
|
+
// ../../../../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
|
|
118722
118480
|
var import_lodash8 = __toESM(require_lodash4());
|
|
118723
118481
|
var import_comment_json = __toESM(require_src2());
|
|
118724
118482
|
|
|
@@ -130819,10 +130577,10 @@ var Schema = (
|
|
|
130819
130577
|
}()
|
|
130820
130578
|
);
|
|
130821
130579
|
|
|
130822
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130580
|
+
// ../../../../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
|
|
130823
130581
|
var import_inquirer = __toESM(require_inquirer());
|
|
130824
130582
|
|
|
130825
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130583
|
+
// ../../../../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
|
|
130826
130584
|
var import_lodash4 = __toESM(require_lodash4());
|
|
130827
130585
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130828
130586
|
try {
|
|
@@ -131169,7 +130927,7 @@ function transformForm(schema) {
|
|
|
131169
130927
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
131170
130928
|
}
|
|
131171
130929
|
|
|
131172
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
130930
|
+
// ../../../../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
|
|
131173
130931
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131174
130932
|
try {
|
|
131175
130933
|
var info = gen[key](arg);
|
|
@@ -131693,7 +131451,7 @@ function _prompt() {
|
|
|
131693
131451
|
return _prompt.apply(this, arguments);
|
|
131694
131452
|
}
|
|
131695
131453
|
|
|
131696
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
131454
|
+
// ../../../../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
|
|
131697
131455
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131698
131456
|
try {
|
|
131699
131457
|
var info = gen[key](arg);
|
|
@@ -131933,7 +131691,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
131933
131691
|
return CLIReader2;
|
|
131934
131692
|
}();
|
|
131935
131693
|
|
|
131936
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131694
|
+
// ../../../../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
|
|
131937
131695
|
var import_inquirer2 = __toESM(require_inquirer2());
|
|
131938
131696
|
|
|
131939
131697
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -132012,7 +131770,7 @@ var I18n2 = class {
|
|
|
132012
131770
|
}
|
|
132013
131771
|
};
|
|
132014
131772
|
|
|
132015
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131773
|
+
// ../../../../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
|
|
132016
131774
|
var ZH_LOCALE2 = {
|
|
132017
131775
|
environment: {
|
|
132018
131776
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -132039,7 +131797,7 @@ var ZH_LOCALE2 = {
|
|
|
132039
131797
|
}
|
|
132040
131798
|
};
|
|
132041
131799
|
|
|
132042
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131800
|
+
// ../../../../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
|
|
132043
131801
|
var EN_LOCALE2 = {
|
|
132044
131802
|
environment: {
|
|
132045
131803
|
node_version: "please upgrade node to lts version",
|
|
@@ -132066,14 +131824,14 @@ var EN_LOCALE2 = {
|
|
|
132066
131824
|
}
|
|
132067
131825
|
};
|
|
132068
131826
|
|
|
132069
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131827
|
+
// ../../../../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
|
|
132070
131828
|
var i18n2 = new I18n2();
|
|
132071
131829
|
var localeKeys2 = i18n2.init("zh", {
|
|
132072
131830
|
zh: ZH_LOCALE2,
|
|
132073
131831
|
en: EN_LOCALE2
|
|
132074
131832
|
});
|
|
132075
131833
|
|
|
132076
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
131834
|
+
// ../../../../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
|
|
132077
131835
|
var import_lodash7 = __toESM(require_lodash4());
|
|
132078
131836
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
132079
131837
|
try {
|
|
@@ -132282,7 +132040,7 @@ function transformInquirerSchema(questions) {
|
|
|
132282
132040
|
return questions;
|
|
132283
132041
|
}
|
|
132284
132042
|
|
|
132285
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
132043
|
+
// ../../../../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
|
|
132286
132044
|
var import_path5 = __toESM(require("path"));
|
|
132287
132045
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
132288
132046
|
try {
|
|
@@ -132546,7 +132304,7 @@ function _checkUseNvm() {
|
|
|
132546
132304
|
return _checkUseNvm.apply(this, arguments);
|
|
132547
132305
|
}
|
|
132548
132306
|
|
|
132549
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
132307
|
+
// ../../../../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
|
|
132550
132308
|
function _array_like_to_array(arr, len) {
|
|
132551
132309
|
if (len == null || len > arr.length)
|
|
132552
132310
|
len = arr.length;
|
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
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -31,16 +31,17 @@
|
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@
|
|
35
|
-
"@scripts/jest-config": "2.
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@
|
|
38
|
-
"@modern-js/generator-
|
|
34
|
+
"@modern-js/generator-utils": "3.1.22",
|
|
35
|
+
"@scripts/jest-config": "2.23.0",
|
|
36
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
|
37
|
+
"@scripts/build": "2.23.0",
|
|
38
|
+
"@modern-js/generator-common": "3.1.22"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"registry": "https://registry.npmjs.org/",
|
|
43
|
-
"access": "public"
|
|
43
|
+
"access": "public",
|
|
44
|
+
"provenance": true
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
47
|
"new": "modern-lib new",
|