@modern-js/server-generator 3.1.23 → 3.1.25
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 +2 -39
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -36212,11 +36212,10 @@ var require_config2 = __commonJS({
|
|
|
36212
36212
|
}
|
|
36213
36213
|
});
|
|
36214
36214
|
var _is = require_is();
|
|
36215
|
-
var
|
|
36216
|
-
var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
36215
|
+
var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
|
|
36217
36216
|
if (optionsByEntries) {
|
|
36218
36217
|
let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
|
|
36219
|
-
if (optionsByEntry === void 0 &&
|
|
36218
|
+
if (optionsByEntry === void 0 && isMainEntry && packageName) {
|
|
36220
36219
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
|
36221
36220
|
}
|
|
36222
36221
|
return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
|
@@ -37217,41 +37216,6 @@ var require_require = __commonJS({
|
|
|
37217
37216
|
}
|
|
37218
37217
|
});
|
|
37219
37218
|
|
|
37220
|
-
// ../../../toolkit/utils/dist/cjs/cli/routes.js
|
|
37221
|
-
var require_routes = __commonJS({
|
|
37222
|
-
"../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
|
|
37223
|
-
"use strict";
|
|
37224
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37225
|
-
value: true
|
|
37226
|
-
});
|
|
37227
|
-
Object.defineProperty(exports, "getRouteId", {
|
|
37228
|
-
enumerable: true,
|
|
37229
|
-
get: function() {
|
|
37230
|
-
return getRouteId;
|
|
37231
|
-
}
|
|
37232
|
-
});
|
|
37233
|
-
var _interop_require_default = require_interop_require_default();
|
|
37234
|
-
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
37235
|
-
var _constants = require_constants();
|
|
37236
|
-
var _path1 = require_path();
|
|
37237
|
-
var getPathWithoutExt = (filename) => {
|
|
37238
|
-
const extname = _path.default.extname(filename);
|
|
37239
|
-
return filename.slice(0, -extname.length);
|
|
37240
|
-
};
|
|
37241
|
-
var getRouteId = (componentPath, routesDir, entryName) => {
|
|
37242
|
-
const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
|
|
37243
|
-
const pathWithoutExt = getPathWithoutExt(relativePath);
|
|
37244
|
-
let id = ``;
|
|
37245
|
-
if (entryName === _constants.MAIN_ENTRY_NAME) {
|
|
37246
|
-
id = pathWithoutExt;
|
|
37247
|
-
} else {
|
|
37248
|
-
id = `${entryName}_${pathWithoutExt}`;
|
|
37249
|
-
}
|
|
37250
|
-
return id.replace(/\[(.*?)\]/g, "($1)");
|
|
37251
|
-
};
|
|
37252
|
-
}
|
|
37253
|
-
});
|
|
37254
|
-
|
|
37255
37219
|
// ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
|
|
37256
37220
|
var require_runtimeExports = __commonJS({
|
|
37257
37221
|
"../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
|
|
@@ -37398,7 +37362,6 @@ var require_cli = __commonJS({
|
|
|
37398
37362
|
_export_star._(require_prettyInstructions(), exports);
|
|
37399
37363
|
_export_star._(require_print(), exports);
|
|
37400
37364
|
_export_star._(require_require(), exports);
|
|
37401
|
-
_export_star._(require_routes(), exports);
|
|
37402
37365
|
_export_star._(require_runtimeExports(), exports);
|
|
37403
37366
|
_export_star._(require_watch(), exports);
|
|
37404
37367
|
}
|
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.25",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@types/node": "^14",
|
|
32
32
|
"jest": "^29",
|
|
33
33
|
"typescript": "^5",
|
|
34
|
-
"@modern-js/generator-common": "3.1.
|
|
35
|
-
"@
|
|
36
|
-
"@modern-js/dependence-generator": "3.1.
|
|
37
|
-
"@scripts/build": "2.
|
|
38
|
-
"@
|
|
34
|
+
"@modern-js/generator-common": "3.1.25",
|
|
35
|
+
"@scripts/jest-config": "2.24.1",
|
|
36
|
+
"@modern-js/dependence-generator": "3.1.25",
|
|
37
|
+
"@scripts/build": "2.24.1",
|
|
38
|
+
"@modern-js/generator-utils": "3.1.25"
|
|
39
39
|
},
|
|
40
40
|
"sideEffects": false,
|
|
41
41
|
"publishConfig": {
|