@modern-js/base-generator 3.1.29 → 3.1.31
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 +48 -124
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -113743,6 +113743,8 @@ var require_chainId = __commonJS({
|
|
|
113743
113743
|
YAML: "yaml",
|
|
113744
113744
|
/** Rule for wasm */
|
|
113745
113745
|
WASM: "wasm",
|
|
113746
|
+
/** Rule for node */
|
|
113747
|
+
NODE: "node",
|
|
113746
113748
|
/** Rule for bff */
|
|
113747
113749
|
JS_BFF_API: "js-bff-api"
|
|
113748
113750
|
},
|
|
@@ -113781,6 +113783,8 @@ var require_chainId = __commonJS({
|
|
|
113781
113783
|
TOML: "toml",
|
|
113782
113784
|
/** html-loader */
|
|
113783
113785
|
HTML: "html",
|
|
113786
|
+
/** node-loader */
|
|
113787
|
+
NODE: "html",
|
|
113784
113788
|
/** babel-loader */
|
|
113785
113789
|
BABEL: "babel",
|
|
113786
113790
|
/** esbuild-loader */
|
|
@@ -113799,6 +113803,8 @@ var require_chainId = __commonJS({
|
|
|
113799
113803
|
CSS_MODULES_TS: "css-modules-typescript",
|
|
113800
113804
|
/** mini-css-extract-plugin.loader */
|
|
113801
113805
|
MINI_CSS_EXTRACT: "mini-css-extract",
|
|
113806
|
+
/** resolve-url-loader */
|
|
113807
|
+
RESOLVE_URL_LOADER_FOR_SASS: "resolve-url-loader",
|
|
113802
113808
|
/** builder-plugin-image-compress.loader */
|
|
113803
113809
|
IMAGE_COMPRESS: "image-compress",
|
|
113804
113810
|
/** builder-plugin-image-compress svgo-loader */
|
|
@@ -113846,6 +113852,10 @@ var require_chainId = __commonJS({
|
|
|
113846
113852
|
HTML_NONCE: "html-nonce",
|
|
113847
113853
|
/** HtmlCrossOriginPlugin */
|
|
113848
113854
|
HTML_CROSS_ORIGIN: "html-cross-origin",
|
|
113855
|
+
/** htmlPreconnectPlugin */
|
|
113856
|
+
HTML_PRECONNECT: "html-preconnect-plugin",
|
|
113857
|
+
/** htmlDnsPrefetchPlugin */
|
|
113858
|
+
HTML_DNS_PREFETCH: "html-dns-prefetch-plugin",
|
|
113849
113859
|
/** MiniCssExtractPlugin */
|
|
113850
113860
|
MINI_CSS_EXTRACT: "mini-css-extract",
|
|
113851
113861
|
/** VueLoaderPlugin */
|
|
@@ -114009,7 +114019,7 @@ var require_constants = __commonJS({
|
|
|
114009
114019
|
var API_DIR = "api";
|
|
114010
114020
|
var SERVER_DIR = "server";
|
|
114011
114021
|
var SHARED_DIR = "shared";
|
|
114012
|
-
var CONFIG_CACHE_DIR = "./node_modules/.cache/
|
|
114022
|
+
var CONFIG_CACHE_DIR = "./node_modules/.cache/bundle-require";
|
|
114013
114023
|
var CONFIG_FILE_EXTENSIONS = [
|
|
114014
114024
|
".js",
|
|
114015
114025
|
".ts",
|
|
@@ -114041,7 +114051,6 @@ var require_constants = __commonJS({
|
|
|
114041
114051
|
};
|
|
114042
114052
|
var INTERNAL_MODULE_TOOLS_PLUGINS = {
|
|
114043
114053
|
"@modern-js/module-tools": "@modern-js/module-tools",
|
|
114044
|
-
"@modern-js/doc-tools": "@modern-js/doc-tools",
|
|
114045
114054
|
"@modern-js/runtime": "@modern-js/runtime/cli",
|
|
114046
114055
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
114047
114056
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
@@ -114317,13 +114326,15 @@ var require_config2 = __commonJS({
|
|
|
114317
114326
|
return isSingleEntry;
|
|
114318
114327
|
}
|
|
114319
114328
|
});
|
|
114329
|
+
var _constants = require_constants();
|
|
114320
114330
|
var _type = require_type();
|
|
114321
114331
|
var isSSR = (config) => {
|
|
114332
|
+
var _server, _server1;
|
|
114322
114333
|
const { server } = config;
|
|
114323
|
-
if (server === null ||
|
|
114334
|
+
if ((_server = server) === null || _server === void 0 ? void 0 : _server.ssr) {
|
|
114324
114335
|
return true;
|
|
114325
114336
|
}
|
|
114326
|
-
if ((server === null ||
|
|
114337
|
+
if (((_server1 = server) === null || _server1 === void 0 ? void 0 : _server1.ssrByEntries) && !(0, _type.isEmpty)(server.ssrByEntries)) {
|
|
114327
114338
|
for (const name of Object.keys(server.ssrByEntries)) {
|
|
114328
114339
|
if (server.ssrByEntries[name]) {
|
|
114329
114340
|
return true;
|
|
@@ -114333,30 +114344,32 @@ var require_config2 = __commonJS({
|
|
|
114333
114344
|
return false;
|
|
114334
114345
|
};
|
|
114335
114346
|
var isUseSSRBundle = (config) => {
|
|
114347
|
+
var _output;
|
|
114336
114348
|
const { output: output2 } = config;
|
|
114337
|
-
if (output2 === null ||
|
|
114349
|
+
if ((_output = output2) === null || _output === void 0 ? void 0 : _output.ssg) {
|
|
114338
114350
|
return true;
|
|
114339
114351
|
}
|
|
114340
114352
|
return isSSR(config);
|
|
114341
114353
|
};
|
|
114342
114354
|
var isServiceWorker = (config) => {
|
|
114343
|
-
var _deploy_worker;
|
|
114355
|
+
var _deploy_worker, _deploy, _output;
|
|
114344
114356
|
const { output: output2, deploy } = config;
|
|
114345
|
-
if ((deploy === null ||
|
|
114357
|
+
if (((_deploy = deploy) === null || _deploy === void 0 ? void 0 : (_deploy_worker = _deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr) && (((_output = output2) === null || _output === void 0 ? void 0 : _output.ssg) || isSSR(config))) {
|
|
114346
114358
|
return true;
|
|
114347
114359
|
}
|
|
114348
114360
|
return false;
|
|
114349
114361
|
};
|
|
114350
114362
|
var isRouterV5 = (config) => {
|
|
114351
|
-
var _config_runtime, _config_runtime1,
|
|
114352
|
-
return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null ||
|
|
114363
|
+
var _config_runtime, _config_runtime_router, _config_runtime1, _config;
|
|
114364
|
+
return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && ((_config = config) === null || _config === void 0 ? void 0 : (_config_runtime1 = _config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
|
|
114353
114365
|
};
|
|
114354
114366
|
var isSSGEntry = (config, entryName, entrypoints) => {
|
|
114367
|
+
var _config_source, _ssgConfig, _ssgConfig1;
|
|
114355
114368
|
const ssgConfig = config.output.ssg;
|
|
114356
|
-
const useSSG = isSingleEntry(entrypoints) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig === null ||
|
|
114369
|
+
const useSSG = isSingleEntry(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) ? Boolean(ssgConfig) : ssgConfig === true || typeof ((_ssgConfig = ssgConfig) === null || _ssgConfig === void 0 ? void 0 : _ssgConfig[0]) === "function" || Boolean((_ssgConfig1 = ssgConfig) === null || _ssgConfig1 === void 0 ? void 0 : _ssgConfig1[entryName]);
|
|
114357
114370
|
return useSSG;
|
|
114358
114371
|
};
|
|
114359
|
-
var isSingleEntry = (entrypoints) => entrypoints.length === 1 && entrypoints[0].entryName ===
|
|
114372
|
+
var isSingleEntry = (entrypoints, mainEntryName = _constants.MAIN_ENTRY_NAME) => entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
|
|
114360
114373
|
}
|
|
114361
114374
|
});
|
|
114362
114375
|
|
|
@@ -114903,6 +114916,9 @@ var require_logger2 = __commonJS({
|
|
|
114903
114916
|
});
|
|
114904
114917
|
}
|
|
114905
114918
|
_export(exports, {
|
|
114919
|
+
isErrorStackMessage: function() {
|
|
114920
|
+
return isErrorStackMessage;
|
|
114921
|
+
},
|
|
114906
114922
|
Logger: function() {
|
|
114907
114923
|
return Logger;
|
|
114908
114924
|
},
|
|
@@ -114953,6 +114969,9 @@ var require_logger2 = __commonJS({
|
|
|
114953
114969
|
displayLabel: true,
|
|
114954
114970
|
uppercaseLabel: false
|
|
114955
114971
|
};
|
|
114972
|
+
var errorStackRegExp = /^\s*at\s.*:\d+:\d+[\s)]*$/;
|
|
114973
|
+
var anonymousErrorStackRegExp = /^\s*at\s.*\(<anonymous>\)$/;
|
|
114974
|
+
var isErrorStackMessage = (message) => errorStackRegExp.test(message) || anonymousErrorStackRegExp.test(message);
|
|
114956
114975
|
var Logger = class {
|
|
114957
114976
|
_log(type, message, ...args) {
|
|
114958
114977
|
if (message === void 0 || message === null) {
|
|
@@ -114978,6 +114997,9 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
|
114978
114997
|
} else {
|
|
114979
114998
|
text = message.message;
|
|
114980
114999
|
}
|
|
115000
|
+
} else if (logType.level === "error" && typeof message === "string") {
|
|
115001
|
+
const lines = message.split("\n");
|
|
115002
|
+
text = lines.map((line) => isErrorStackMessage(line) ? _chalk.default.gray(line) : line).join("\n");
|
|
114981
115003
|
} else {
|
|
114982
115004
|
text = `${message}`;
|
|
114983
115005
|
}
|
|
@@ -115100,7 +115122,7 @@ var require_alias = __commonJS({
|
|
|
115100
115122
|
};
|
|
115101
115123
|
var mergeAlias = (alias) => (0, _applyOptionsChain.applyOptionsChain)({}, alias);
|
|
115102
115124
|
var getAliasConfig = (aliasOption, option) => {
|
|
115103
|
-
var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
|
|
115125
|
+
var _tsconfig_compilerOptions, _tsconfig, _tsconfig_compilerOptions1, _tsconfig1;
|
|
115104
115126
|
const isTsProject = _fs.default.existsSync(option.tsconfigPath);
|
|
115105
115127
|
const alias = mergeAlias(aliasOption);
|
|
115106
115128
|
if (!isTsProject) {
|
|
@@ -115112,10 +115134,10 @@ var require_alias = __commonJS({
|
|
|
115112
115134
|
};
|
|
115113
115135
|
}
|
|
115114
115136
|
const tsconfig = (0, _get.readTsConfigByFile)(option.tsconfigPath);
|
|
115115
|
-
const baseUrl = tsconfig === null ||
|
|
115137
|
+
const baseUrl = (_tsconfig = tsconfig) === null || _tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions = _tsconfig.compilerOptions) === null || _tsconfig_compilerOptions === void 0 ? void 0 : _tsconfig_compilerOptions.baseUrl;
|
|
115116
115138
|
return {
|
|
115117
115139
|
absoluteBaseUrl: baseUrl ? _path.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
|
115118
|
-
paths: __spreadValues(__spreadValues({}, alias), tsconfig === null ||
|
|
115140
|
+
paths: __spreadValues(__spreadValues({}, alias), (_tsconfig1 = tsconfig) === null || _tsconfig1 === void 0 ? void 0 : (_tsconfig_compilerOptions1 = _tsconfig1.compilerOptions) === null || _tsconfig_compilerOptions1 === void 0 ? void 0 : _tsconfig_compilerOptions1.paths),
|
|
115119
115141
|
isTsPath: true,
|
|
115120
115142
|
isTsProject
|
|
115121
115143
|
};
|
|
@@ -115159,15 +115181,6 @@ var require_path = __commonJS({
|
|
|
115159
115181
|
getTemplatePath: function() {
|
|
115160
115182
|
return getTemplatePath;
|
|
115161
115183
|
},
|
|
115162
|
-
compilePathMatcherRegExp: function() {
|
|
115163
|
-
return compilePathMatcherRegExp;
|
|
115164
|
-
},
|
|
115165
|
-
_joinPathParts: function() {
|
|
115166
|
-
return _joinPathParts;
|
|
115167
|
-
},
|
|
115168
|
-
upwardPaths: function() {
|
|
115169
|
-
return upwardPaths;
|
|
115170
|
-
},
|
|
115171
115184
|
getRealTemporaryDirectory: function() {
|
|
115172
115185
|
return getRealTemporaryDirectory;
|
|
115173
115186
|
},
|
|
@@ -115205,20 +115218,6 @@ var require_path = __commonJS({
|
|
|
115205
115218
|
parts.push((0, _compiled.nanoid)());
|
|
115206
115219
|
return _path.default.resolve(...parts);
|
|
115207
115220
|
};
|
|
115208
|
-
function compilePathMatcherRegExp(match) {
|
|
115209
|
-
if (typeof match !== "string") {
|
|
115210
|
-
return match;
|
|
115211
|
-
}
|
|
115212
|
-
const escaped = _compiled.lodash.escapeRegExp(match);
|
|
115213
|
-
return new RegExp(`(?<=\\W|^)${escaped}(?=\\W|$)`);
|
|
115214
|
-
}
|
|
115215
|
-
var _joinPathParts = (_part, i, parts) => (0, _compiled.lodash)(parts).filter((part) => ![
|
|
115216
|
-
"/",
|
|
115217
|
-
"\\"
|
|
115218
|
-
].includes(part)).tap((parts2) => parts2.unshift("")).slice(0, i + 2).join("/");
|
|
115219
|
-
function upwardPaths(start) {
|
|
115220
|
-
return (0, _compiled.lodash)(start).split(/[/\\]/).filter(Boolean).map(_joinPathParts).reverse().push("/").value();
|
|
115221
|
-
}
|
|
115222
115221
|
function getRealTemporaryDirectory() {
|
|
115223
115222
|
let ret = null;
|
|
115224
115223
|
try {
|
|
@@ -115470,84 +115469,6 @@ var require_monorepo = __commonJS({
|
|
|
115470
115469
|
}
|
|
115471
115470
|
});
|
|
115472
115471
|
|
|
115473
|
-
// ../../../toolkit/utils/dist/cjs/cli/pathSerializer.js
|
|
115474
|
-
var require_pathSerializer = __commonJS({
|
|
115475
|
-
"../../../toolkit/utils/dist/cjs/cli/pathSerializer.js"(exports) {
|
|
115476
|
-
"use strict";
|
|
115477
|
-
Object.defineProperty(exports, "__esModule", {
|
|
115478
|
-
value: true
|
|
115479
|
-
});
|
|
115480
|
-
function _export(target, all) {
|
|
115481
|
-
for (var name in all)
|
|
115482
|
-
Object.defineProperty(target, name, {
|
|
115483
|
-
enumerable: true,
|
|
115484
|
-
get: all[name]
|
|
115485
|
-
});
|
|
115486
|
-
}
|
|
115487
|
-
_export(exports, {
|
|
115488
|
-
matchUpwardPathsAsUnknown: function() {
|
|
115489
|
-
return matchUpwardPathsAsUnknown;
|
|
115490
|
-
},
|
|
115491
|
-
applyPathMatcher: function() {
|
|
115492
|
-
return applyPathMatcher;
|
|
115493
|
-
},
|
|
115494
|
-
applyMatcherReplacement: function() {
|
|
115495
|
-
return applyMatcherReplacement;
|
|
115496
|
-
},
|
|
115497
|
-
createDefaultPathMatchers: function() {
|
|
115498
|
-
return createDefaultPathMatchers;
|
|
115499
|
-
}
|
|
115500
|
-
});
|
|
115501
|
-
var _interop_require_default = require_interop_require_default();
|
|
115502
|
-
var _os = /* @__PURE__ */ _interop_require_default._(require("os"));
|
|
115503
|
-
var _lodash = /* @__PURE__ */ _interop_require_default._(require_lodash4());
|
|
115504
|
-
var _path = require_path();
|
|
115505
|
-
var matchUpwardPathsAsUnknown = (p) => (0, _lodash.default)((0, _path.upwardPaths)((0, _path.normalizeToPosixPath)(p))).map((match) => ({
|
|
115506
|
-
match,
|
|
115507
|
-
mark: "unknown"
|
|
115508
|
-
})).slice(1, -1).value();
|
|
115509
|
-
function applyPathMatcher(matcher, str, options = {}) {
|
|
115510
|
-
const regex2 = (0, _path.compilePathMatcherRegExp)(matcher.match);
|
|
115511
|
-
const replacer = (substring, ...args) => {
|
|
115512
|
-
if (options.minPartials && (0, _path.splitPathString)(substring).length < options.minPartials) {
|
|
115513
|
-
return substring;
|
|
115514
|
-
}
|
|
115515
|
-
const ret = typeof matcher.mark === "string" ? matcher.mark : matcher.mark(substring, ...args);
|
|
115516
|
-
return `<${_lodash.default.snakeCase(ret).toUpperCase()}>`;
|
|
115517
|
-
};
|
|
115518
|
-
return str.replace(regex2, replacer);
|
|
115519
|
-
}
|
|
115520
|
-
function applyMatcherReplacement(matchers, str, options = {}) {
|
|
115521
|
-
return matchers.reduce((ret, matcher) => {
|
|
115522
|
-
return applyPathMatcher(matcher, ret, options);
|
|
115523
|
-
}, str);
|
|
115524
|
-
}
|
|
115525
|
-
var createDefaultPathMatchers = (root) => {
|
|
115526
|
-
const ret = [
|
|
115527
|
-
{
|
|
115528
|
-
match: RegExp("(?<=\\/)(\\.pnpm\\/.+?\\/node_modules)(?=\\/)"),
|
|
115529
|
-
mark: "pnpmInner"
|
|
115530
|
-
}
|
|
115531
|
-
];
|
|
115532
|
-
const tmpdir = (0, _path.getRealTemporaryDirectory)();
|
|
115533
|
-
tmpdir && ret.push({
|
|
115534
|
-
match: tmpdir,
|
|
115535
|
-
mark: "temp"
|
|
115536
|
-
});
|
|
115537
|
-
ret.push({
|
|
115538
|
-
match: _os.default.tmpdir(),
|
|
115539
|
-
mark: "temp"
|
|
115540
|
-
});
|
|
115541
|
-
ret.push({
|
|
115542
|
-
match: _os.default.homedir(),
|
|
115543
|
-
mark: "home"
|
|
115544
|
-
});
|
|
115545
|
-
ret.push(...matchUpwardPathsAsUnknown(root));
|
|
115546
|
-
return ret;
|
|
115547
|
-
};
|
|
115548
|
-
}
|
|
115549
|
-
});
|
|
115550
|
-
|
|
115551
115472
|
// ../../../toolkit/utils/dist/cjs/cli/port.js
|
|
115552
115473
|
var require_port = __commonJS({
|
|
115553
115474
|
"../../../toolkit/utils/dist/cjs/cli/port.js"(exports) {
|
|
@@ -115654,7 +115575,8 @@ var require_prettyInstructions = __commonJS({
|
|
|
115654
115575
|
const LOCAL_LABEL = "Local: ";
|
|
115655
115576
|
const NETWORK_LABEL = "Network: ";
|
|
115656
115577
|
const isLocalhost = (url) => {
|
|
115657
|
-
|
|
115578
|
+
var _url;
|
|
115579
|
+
return (_url = url) === null || _url === void 0 ? void 0 : _url.includes("localhost");
|
|
115658
115580
|
};
|
|
115659
115581
|
if (host && host !== _constants.DEFAULT_DEV_HOST) {
|
|
115660
115582
|
return [
|
|
@@ -115681,19 +115603,19 @@ var require_prettyInstructions = __commonJS({
|
|
|
115681
115603
|
}, []);
|
|
115682
115604
|
};
|
|
115683
115605
|
var prettyInstructions = (appContext, config) => {
|
|
115684
|
-
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
115606
|
+
var _appContext_builder_context_devServer, _appContext_builder, _config_dev, _config_source;
|
|
115685
115607
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
115686
|
-
const isHttps = (0, _is.isDev)() && ((
|
|
115608
|
+
const isHttps = (0, _is.isDev)() && ((_appContext_builder = appContext.builder) === null || _appContext_builder === void 0 ? void 0 : (_appContext_builder_context_devServer = _appContext_builder.context.devServer) === null || _appContext_builder_context_devServer === void 0 ? void 0 : _appContext_builder_context_devServer.https);
|
|
115687
115609
|
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
115688
115610
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
115689
115611
|
let message = "App running at:\n\n";
|
|
115690
|
-
if ((0, _is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
115612
|
+
if ((0, _is.isSingleEntry)(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) || apiOnly) {
|
|
115691
115613
|
message += urls.map(({ label, url }) => ` ${_compiled.chalk.bold(`> ${label.padEnd(10)}`)}${_compiled.chalk.cyanBright(normalizeUrl(`${url}/${routes[0].urlPath}`))}
|
|
115692
115614
|
`).join("");
|
|
115693
115615
|
} else {
|
|
115694
115616
|
const maxNameLength = Math.max(...routes.map((r) => r.entryName.length));
|
|
115695
115617
|
urls.forEach(({ label, url }) => {
|
|
115696
|
-
message += ` ${_compiled.chalk.bold(`> ${label}`)}
|
|
115618
|
+
message += ` ${_compiled.chalk.bold(`> ${label}`)}${routes.length === 0 ? _compiled.chalk.cyanBright(url) : ""}
|
|
115697
115619
|
`;
|
|
115698
115620
|
routes.forEach(({ entryName, urlPath, isSSR }) => {
|
|
115699
115621
|
if (!checkedEntries.includes(entryName)) {
|
|
@@ -115748,8 +115670,9 @@ var require_require = __commonJS({
|
|
|
115748
115670
|
});
|
|
115749
115671
|
var _fs = require_fs();
|
|
115750
115672
|
var compatRequire = (filePath, interop = true) => {
|
|
115673
|
+
var _mod;
|
|
115751
115674
|
const mod = require(filePath);
|
|
115752
|
-
const rtnESMDefault = interop && (mod === null ||
|
|
115675
|
+
const rtnESMDefault = interop && ((_mod = mod) === null || _mod === void 0 ? void 0 : _mod.__esModule);
|
|
115753
115676
|
return rtnESMDefault ? mod.default : mod;
|
|
115754
115677
|
};
|
|
115755
115678
|
var dynamicImport = new Function("modulePath", "return import(modulePath)");
|
|
@@ -115941,7 +115864,6 @@ var require_cli = __commonJS({
|
|
|
115941
115864
|
_export_star._(require_monorepo(), exports);
|
|
115942
115865
|
_export_star._(require_package4(), exports);
|
|
115943
115866
|
_export_star._(require_path(), exports);
|
|
115944
|
-
_export_star._(require_pathSerializer(), exports);
|
|
115945
115867
|
_export_star._(require_port(), exports);
|
|
115946
115868
|
_export_star._(require_prettyInstructions(), exports);
|
|
115947
115869
|
_export_star._(require_require(), exports);
|
|
@@ -131066,11 +130988,13 @@ var PackageManagerName = {
|
|
|
131066
130988
|
[PackageManager.Npm]: "npm"
|
|
131067
130989
|
};
|
|
131068
130990
|
var getPackageManagerSchema = (extra = {}) => {
|
|
130991
|
+
var _extra, _extra1;
|
|
131069
130992
|
return {
|
|
131070
130993
|
type: "string",
|
|
131071
130994
|
title: i18n2.t(localeKeys2.packageManager.self),
|
|
131072
130995
|
enum: Object.values(PackageManager).filter((packageManager) => {
|
|
131073
|
-
|
|
130996
|
+
var _extra2;
|
|
130997
|
+
return ((_extra2 = extra) === null || _extra2 === void 0 ? void 0 : _extra2.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true;
|
|
131074
130998
|
}).map((packageManager) => ({
|
|
131075
130999
|
value: packageManager,
|
|
131076
131000
|
label: PackageManagerName[packageManager]
|
|
@@ -131080,7 +131004,7 @@ var getPackageManagerSchema = (extra = {}) => {
|
|
|
131080
131004
|
dependencies: [],
|
|
131081
131005
|
fulfill: {
|
|
131082
131006
|
state: {
|
|
131083
|
-
visible: !(extra === null ||
|
|
131007
|
+
visible: !((_extra = extra) === null || _extra === void 0 ? void 0 : _extra.isMonorepoSubProject) && !((_extra1 = extra) === null || _extra1 === void 0 ? void 0 : _extra1.isSubProject)
|
|
131084
131008
|
}
|
|
131085
131009
|
}
|
|
131086
131010
|
}
|
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.31",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@scripts/
|
|
33
|
+
"@modern-js/generator-utils": "3.1.31",
|
|
34
|
+
"@scripts/build": "2.29.0",
|
|
35
|
+
"@modern-js/generator-common": "3.1.31",
|
|
36
|
+
"@scripts/jest-config": "2.29.0"
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"publishConfig": {
|