@modern-js/dependence-generator 3.1.28 → 3.1.30
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 +23 -15
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -115356,6 +115356,8 @@ var require_chainId = __commonJS({
|
|
|
115356
115356
|
YAML: "yaml",
|
|
115357
115357
|
/** Rule for wasm */
|
|
115358
115358
|
WASM: "wasm",
|
|
115359
|
+
/** Rule for node */
|
|
115360
|
+
NODE: "node",
|
|
115359
115361
|
/** Rule for bff */
|
|
115360
115362
|
JS_BFF_API: "js-bff-api"
|
|
115361
115363
|
},
|
|
@@ -115394,6 +115396,8 @@ var require_chainId = __commonJS({
|
|
|
115394
115396
|
TOML: "toml",
|
|
115395
115397
|
/** html-loader */
|
|
115396
115398
|
HTML: "html",
|
|
115399
|
+
/** node-loader */
|
|
115400
|
+
NODE: "html",
|
|
115397
115401
|
/** babel-loader */
|
|
115398
115402
|
BABEL: "babel",
|
|
115399
115403
|
/** esbuild-loader */
|
|
@@ -115654,7 +115658,6 @@ var require_constants = __commonJS({
|
|
|
115654
115658
|
};
|
|
115655
115659
|
var INTERNAL_MODULE_TOOLS_PLUGINS = {
|
|
115656
115660
|
"@modern-js/module-tools": "@modern-js/module-tools",
|
|
115657
|
-
"@modern-js/doc-tools": "@modern-js/doc-tools",
|
|
115658
115661
|
"@modern-js/runtime": "@modern-js/runtime/cli",
|
|
115659
115662
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
|
115660
115663
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
@@ -115932,11 +115935,12 @@ var require_config2 = __commonJS({
|
|
|
115932
115935
|
});
|
|
115933
115936
|
var _type = require_type();
|
|
115934
115937
|
var isSSR = (config) => {
|
|
115938
|
+
var _server, _server1;
|
|
115935
115939
|
const { server } = config;
|
|
115936
|
-
if (server === null ||
|
|
115940
|
+
if ((_server = server) === null || _server === void 0 ? void 0 : _server.ssr) {
|
|
115937
115941
|
return true;
|
|
115938
115942
|
}
|
|
115939
|
-
if ((server === null ||
|
|
115943
|
+
if (((_server1 = server) === null || _server1 === void 0 ? void 0 : _server1.ssrByEntries) && !(0, _type.isEmpty)(server.ssrByEntries)) {
|
|
115940
115944
|
for (const name of Object.keys(server.ssrByEntries)) {
|
|
115941
115945
|
if (server.ssrByEntries[name]) {
|
|
115942
115946
|
return true;
|
|
@@ -115946,27 +115950,29 @@ var require_config2 = __commonJS({
|
|
|
115946
115950
|
return false;
|
|
115947
115951
|
};
|
|
115948
115952
|
var isUseSSRBundle = (config) => {
|
|
115953
|
+
var _output;
|
|
115949
115954
|
const { output: output2 } = config;
|
|
115950
|
-
if (output2 === null ||
|
|
115955
|
+
if ((_output = output2) === null || _output === void 0 ? void 0 : _output.ssg) {
|
|
115951
115956
|
return true;
|
|
115952
115957
|
}
|
|
115953
115958
|
return isSSR(config);
|
|
115954
115959
|
};
|
|
115955
115960
|
var isServiceWorker = (config) => {
|
|
115956
|
-
var _deploy_worker;
|
|
115961
|
+
var _deploy_worker, _deploy, _output;
|
|
115957
115962
|
const { output: output2, deploy } = config;
|
|
115958
|
-
if ((deploy === null ||
|
|
115963
|
+
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))) {
|
|
115959
115964
|
return true;
|
|
115960
115965
|
}
|
|
115961
115966
|
return false;
|
|
115962
115967
|
};
|
|
115963
115968
|
var isRouterV5 = (config) => {
|
|
115964
|
-
var _config_runtime, _config_runtime1,
|
|
115965
|
-
return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null ||
|
|
115969
|
+
var _config_runtime, _config_runtime_router, _config_runtime1, _config;
|
|
115970
|
+
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";
|
|
115966
115971
|
};
|
|
115967
115972
|
var isSSGEntry = (config, entryName, entrypoints) => {
|
|
115973
|
+
var _ssgConfig, _ssgConfig1;
|
|
115968
115974
|
const ssgConfig = config.output.ssg;
|
|
115969
|
-
const useSSG = isSingleEntry(entrypoints) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig === null ||
|
|
115975
|
+
const useSSG = isSingleEntry(entrypoints) ? 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]);
|
|
115970
115976
|
return useSSG;
|
|
115971
115977
|
};
|
|
115972
115978
|
var isSingleEntry = (entrypoints) => entrypoints.length === 1 && entrypoints[0].entryName === "main";
|
|
@@ -116713,7 +116719,7 @@ var require_alias = __commonJS({
|
|
|
116713
116719
|
};
|
|
116714
116720
|
var mergeAlias = (alias) => (0, _applyOptionsChain.applyOptionsChain)({}, alias);
|
|
116715
116721
|
var getAliasConfig = (aliasOption, option) => {
|
|
116716
|
-
var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
|
|
116722
|
+
var _tsconfig_compilerOptions, _tsconfig, _tsconfig_compilerOptions1, _tsconfig1;
|
|
116717
116723
|
const isTsProject2 = _fs.default.existsSync(option.tsconfigPath);
|
|
116718
116724
|
const alias = mergeAlias(aliasOption);
|
|
116719
116725
|
if (!isTsProject2) {
|
|
@@ -116725,10 +116731,10 @@ var require_alias = __commonJS({
|
|
|
116725
116731
|
};
|
|
116726
116732
|
}
|
|
116727
116733
|
const tsconfig = (0, _get.readTsConfigByFile)(option.tsconfigPath);
|
|
116728
|
-
const baseUrl = tsconfig === null ||
|
|
116734
|
+
const baseUrl = (_tsconfig = tsconfig) === null || _tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions = _tsconfig.compilerOptions) === null || _tsconfig_compilerOptions === void 0 ? void 0 : _tsconfig_compilerOptions.baseUrl;
|
|
116729
116735
|
return {
|
|
116730
116736
|
absoluteBaseUrl: baseUrl ? _path.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
|
116731
|
-
paths: __spreadValues(__spreadValues({}, alias), tsconfig === null ||
|
|
116737
|
+
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),
|
|
116732
116738
|
isTsPath: true,
|
|
116733
116739
|
isTsProject: isTsProject2
|
|
116734
116740
|
};
|
|
@@ -117267,7 +117273,8 @@ var require_prettyInstructions = __commonJS({
|
|
|
117267
117273
|
const LOCAL_LABEL = "Local: ";
|
|
117268
117274
|
const NETWORK_LABEL = "Network: ";
|
|
117269
117275
|
const isLocalhost = (url) => {
|
|
117270
|
-
|
|
117276
|
+
var _url;
|
|
117277
|
+
return (_url = url) === null || _url === void 0 ? void 0 : _url.includes("localhost");
|
|
117271
117278
|
};
|
|
117272
117279
|
if (host && host !== _constants.DEFAULT_DEV_HOST) {
|
|
117273
117280
|
return [
|
|
@@ -117296,7 +117303,7 @@ var require_prettyInstructions = __commonJS({
|
|
|
117296
117303
|
var prettyInstructions = (appContext, config) => {
|
|
117297
117304
|
var _appContext_builder_context_devServer, _appContext_builder, _config_dev;
|
|
117298
117305
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
117299
|
-
const isHttps = (0, _is.isDev)() && ((
|
|
117306
|
+
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);
|
|
117300
117307
|
const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
|
|
117301
117308
|
const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
|
|
117302
117309
|
let message = "App running at:\n\n";
|
|
@@ -117361,8 +117368,9 @@ var require_require = __commonJS({
|
|
|
117361
117368
|
});
|
|
117362
117369
|
var _fs = require_fs();
|
|
117363
117370
|
var compatRequire = (filePath, interop = true) => {
|
|
117371
|
+
var _mod;
|
|
117364
117372
|
const mod = require(filePath);
|
|
117365
|
-
const rtnESMDefault = interop && (mod === null ||
|
|
117373
|
+
const rtnESMDefault = interop && ((_mod = mod) === null || _mod === void 0 ? void 0 : _mod.__esModule);
|
|
117366
117374
|
return rtnESMDefault ? mod.default : mod;
|
|
117367
117375
|
};
|
|
117368
117376
|
var dynamicImport = new Function("modulePath", "return import(modulePath)");
|
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.30",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@types/node": "^14",
|
|
31
31
|
"jest": "^29",
|
|
32
32
|
"typescript": "^5",
|
|
33
|
-
"@modern-js/generator-utils": "3.1.
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
33
|
+
"@modern-js/generator-utils": "3.1.30",
|
|
34
|
+
"@scripts/jest-config": "2.28.0",
|
|
35
|
+
"@modern-js/plugin-i18n": "2.28.0",
|
|
36
|
+
"@scripts/build": "2.28.0",
|
|
37
|
+
"@modern-js/generator-common": "3.1.30"
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"publishConfig": {
|