@modern-js/monorepo-generator 0.0.0-nightly-20230926160605 → 0.0.0-nightly-20230927160620
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 +19 -31
- package/package.json +10 -10
package/dist/index.js
CHANGED
@@ -125788,12 +125788,11 @@ var require_config4 = __commonJS({
|
|
125788
125788
|
var import_constants10 = require_constants3();
|
125789
125789
|
var import_type = require_type2();
|
125790
125790
|
var isSSR = (config) => {
|
125791
|
-
var _server, _server1;
|
125792
125791
|
const { server } = config;
|
125793
|
-
if (
|
125792
|
+
if (server === null || server === void 0 ? void 0 : server.ssr) {
|
125794
125793
|
return true;
|
125795
125794
|
}
|
125796
|
-
if ((
|
125795
|
+
if ((server === null || server === void 0 ? void 0 : server.ssrByEntries) && !(0, import_type.isEmpty)(server.ssrByEntries)) {
|
125797
125796
|
for (const name of Object.keys(server.ssrByEntries)) {
|
125798
125797
|
if (server.ssrByEntries[name]) {
|
125799
125798
|
return true;
|
@@ -125803,29 +125802,28 @@ var require_config4 = __commonJS({
|
|
125803
125802
|
return false;
|
125804
125803
|
};
|
125805
125804
|
var isUseSSRBundle = (config) => {
|
125806
|
-
var _output;
|
125807
125805
|
const { output: output2 } = config;
|
125808
|
-
if (
|
125806
|
+
if (output2 === null || output2 === void 0 ? void 0 : output2.ssg) {
|
125809
125807
|
return true;
|
125810
125808
|
}
|
125811
125809
|
return isSSR(config);
|
125812
125810
|
};
|
125813
125811
|
var isServiceWorker = (config) => {
|
125814
|
-
var _deploy_worker
|
125812
|
+
var _deploy_worker;
|
125815
125813
|
const { output: output2, deploy } = config;
|
125816
|
-
if ((
|
125814
|
+
if ((deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr) && ((output2 === null || output2 === void 0 ? void 0 : output2.ssg) || isSSR(config))) {
|
125817
125815
|
return true;
|
125818
125816
|
}
|
125819
125817
|
return false;
|
125820
125818
|
};
|
125821
125819
|
var isRouterV5 = (config) => {
|
125822
|
-
var _config_runtime, _config_runtime_router, _config_runtime1
|
125823
|
-
return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (
|
125820
|
+
var _config_runtime, _config_runtime_router, _config_runtime1;
|
125821
|
+
return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (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";
|
125824
125822
|
};
|
125825
125823
|
var isSSGEntry = (config, entryName, entrypoints) => {
|
125826
|
-
var _config_source
|
125824
|
+
var _config_source;
|
125827
125825
|
const ssgConfig = config.output.ssg;
|
125828
|
-
const useSSG = isSingleEntry(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) ? Boolean(ssgConfig) : ssgConfig === true || typeof (
|
125826
|
+
const useSSG = isSingleEntry(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[0]) === "function" || Boolean(ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[entryName]);
|
125829
125827
|
return useSSG;
|
125830
125828
|
};
|
125831
125829
|
var isSingleEntry = (entrypoints, mainEntryName = import_constants10.MAIN_ENTRY_NAME) => entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
|
@@ -126690,7 +126688,7 @@ var require_alias2 = __commonJS({
|
|
126690
126688
|
};
|
126691
126689
|
var mergeAlias = (alias) => (0, import_applyOptionsChain.applyOptionsChain)({}, alias);
|
126692
126690
|
var getAliasConfig = (aliasOption, option) => {
|
126693
|
-
var _tsconfig_compilerOptions,
|
126691
|
+
var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
|
126694
126692
|
const isTsProject = import_fs.default.existsSync(option.tsconfigPath);
|
126695
126693
|
const alias = mergeAlias(aliasOption);
|
126696
126694
|
if (!isTsProject) {
|
@@ -126702,12 +126700,12 @@ var require_alias2 = __commonJS({
|
|
126702
126700
|
};
|
126703
126701
|
}
|
126704
126702
|
const tsconfig = (0, import_get.readTsConfigByFile)(option.tsconfigPath);
|
126705
|
-
const baseUrl =
|
126703
|
+
const baseUrl = tsconfig === null || tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions = tsconfig.compilerOptions) === null || _tsconfig_compilerOptions === void 0 ? void 0 : _tsconfig_compilerOptions.baseUrl;
|
126706
126704
|
return {
|
126707
126705
|
absoluteBaseUrl: baseUrl ? import_path13.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
126708
126706
|
paths: {
|
126709
126707
|
...alias,
|
126710
|
-
...
|
126708
|
+
...tsconfig === null || tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions1 = tsconfig.compilerOptions) === null || _tsconfig_compilerOptions1 === void 0 ? void 0 : _tsconfig_compilerOptions1.paths
|
126711
126709
|
},
|
126712
126710
|
isTsPath: true,
|
126713
126711
|
isTsProject
|
@@ -127195,10 +127193,7 @@ var require_prettyInstructions2 = __commonJS({
|
|
127195
127193
|
var getAddressUrls = (protocol = "http", port, host) => {
|
127196
127194
|
const LOCAL_LABEL = "Local: ";
|
127197
127195
|
const NETWORK_LABEL = "Network: ";
|
127198
|
-
const isLocalhost = (url) =>
|
127199
|
-
var _url;
|
127200
|
-
return (_url = url) === null || _url === void 0 ? void 0 : _url.includes("localhost");
|
127201
|
-
};
|
127196
|
+
const isLocalhost = (url) => url === null || url === void 0 ? void 0 : url.includes("localhost");
|
127202
127197
|
if (host && host !== import_constants10.DEFAULT_DEV_HOST) {
|
127203
127198
|
return [
|
127204
127199
|
{
|
@@ -127288,9 +127283,8 @@ var require_require2 = __commonJS({
|
|
127288
127283
|
module2.exports = __toCommonJS2(require_exports);
|
127289
127284
|
var import_fs = require_fs2();
|
127290
127285
|
var compatRequire = (filePath, interop = true) => {
|
127291
|
-
var _mod;
|
127292
127286
|
const mod = require(filePath);
|
127293
|
-
const rtnESMDefault = interop && (
|
127287
|
+
const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
|
127294
127288
|
return rtnESMDefault ? mod.default : mod;
|
127295
127289
|
};
|
127296
127290
|
var dynamicImport = new Function("modulePath", "return import(modulePath)");
|
@@ -143498,14 +143492,10 @@ var PackageManagerName = {
|
|
143498
143492
|
[PackageManager.Npm]: "npm"
|
143499
143493
|
};
|
143500
143494
|
var getPackageManagerSchema = (extra = {}) => {
|
143501
|
-
var _extra, _extra1;
|
143502
143495
|
return {
|
143503
143496
|
type: "string",
|
143504
143497
|
title: i18n2.t(localeKeys2.packageManager.self),
|
143505
|
-
enum: Object.values(PackageManager).filter((packageManager) => {
|
143506
|
-
var _extra2;
|
143507
|
-
return ((_extra2 = extra) === null || _extra2 === void 0 ? void 0 : _extra2.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true;
|
143508
|
-
}).map((packageManager) => ({
|
143498
|
+
enum: Object.values(PackageManager).filter((packageManager) => (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true).map((packageManager) => ({
|
143509
143499
|
value: packageManager,
|
143510
143500
|
label: PackageManagerName[packageManager]
|
143511
143501
|
})),
|
@@ -143514,7 +143504,7 @@ var getPackageManagerSchema = (extra = {}) => {
|
|
143514
143504
|
dependencies: [],
|
143515
143505
|
fulfill: {
|
143516
143506
|
state: {
|
143517
|
-
visible: !(
|
143507
|
+
visible: !(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) && !(extra === null || extra === void 0 ? void 0 : extra.isSubProject)
|
143518
143508
|
}
|
143519
143509
|
}
|
143520
143510
|
}
|
@@ -143524,16 +143514,15 @@ var getPackageManagerSchema = (extra = {}) => {
|
|
143524
143514
|
|
143525
143515
|
// ../../generator-common/dist/esm-node/common/packageName.js
|
143526
143516
|
var getPackageNameSchema = (extra = {}) => {
|
143527
|
-
var _extra, _extra1, _extra2;
|
143528
143517
|
return {
|
143529
143518
|
type: "string",
|
143530
|
-
title: (
|
143519
|
+
title: (extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? i18n2.t(localeKeys2.packageName.sub_name) : i18n2.t(localeKeys2.packageName.self),
|
143531
143520
|
"x-reactions": [
|
143532
143521
|
{
|
143533
143522
|
dependencies: [],
|
143534
143523
|
fulfill: {
|
143535
143524
|
state: {
|
143536
|
-
visible: Boolean(
|
143525
|
+
visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) || !(extra === null || extra === void 0 ? void 0 : extra.isMwa)
|
143537
143526
|
}
|
143538
143527
|
}
|
143539
143528
|
}
|
@@ -143550,7 +143539,6 @@ var getPackageNameSchema = (extra = {}) => {
|
|
143550
143539
|
// ../../generator-common/dist/esm-node/common/packagePath.js
|
143551
143540
|
var PackagePathRegex = new RegExp("^[a-z0-9-_]+[a-z0-9-/_]*$");
|
143552
143541
|
var getPackagePathSchema = (extra) => {
|
143553
|
-
var _extra;
|
143554
143542
|
return {
|
143555
143543
|
type: "string",
|
143556
143544
|
title: i18n2.t(localeKeys2.packagePath.self),
|
@@ -143562,7 +143550,7 @@ var getPackagePathSchema = (extra) => {
|
|
143562
143550
|
fulfill: {
|
143563
143551
|
state: {
|
143564
143552
|
value: "{{$deps[0]}}",
|
143565
|
-
visible: Boolean(
|
143553
|
+
visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject)
|
143566
143554
|
}
|
143567
143555
|
}
|
143568
143556
|
}
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "0.0.0-nightly-
|
18
|
+
"version": "0.0.0-nightly-20230927160620",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -30,15 +30,15 @@
|
|
30
30
|
"@types/node": "^14",
|
31
31
|
"jest": "^29",
|
32
32
|
"typescript": "^5",
|
33
|
-
"@modern-js/base-generator": "0.0.0-nightly-
|
34
|
-
"@modern-js/changeset-generator": "0.0.0-nightly-
|
35
|
-
"@modern-js/generator-common": "0.0.0-nightly-
|
36
|
-
"@modern-js/generator-utils": "0.0.0-nightly-
|
37
|
-
"@modern-js/plugin-i18n": "0.0.0-nightly-
|
38
|
-
"@modern-js/packages-generator": "0.0.0-nightly-
|
39
|
-
"@modern-js/utils": "0.0.0-nightly-
|
40
|
-
"@scripts/build": "0.0.0-nightly-
|
41
|
-
"@scripts/jest-config": "0.0.0-nightly-
|
33
|
+
"@modern-js/base-generator": "0.0.0-nightly-20230927160620",
|
34
|
+
"@modern-js/changeset-generator": "0.0.0-nightly-20230927160620",
|
35
|
+
"@modern-js/generator-common": "0.0.0-nightly-20230927160620",
|
36
|
+
"@modern-js/generator-utils": "0.0.0-nightly-20230927160620",
|
37
|
+
"@modern-js/plugin-i18n": "0.0.0-nightly-20230927160620",
|
38
|
+
"@modern-js/packages-generator": "0.0.0-nightly-20230927160620",
|
39
|
+
"@modern-js/utils": "0.0.0-nightly-20230927160620",
|
40
|
+
"@scripts/build": "0.0.0-nightly-20230927160620",
|
41
|
+
"@scripts/jest-config": "0.0.0-nightly-20230927160620"
|
42
42
|
},
|
43
43
|
"sideEffects": false,
|
44
44
|
"publishConfig": {
|