@modern-js/base-generator 3.1.23 → 3.1.24
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 +5 -5
package/dist/index.js
CHANGED
|
@@ -114833,11 +114833,10 @@ var require_config3 = __commonJS({
|
|
|
114833
114833
|
}
|
|
114834
114834
|
});
|
|
114835
114835
|
var _is = require_is();
|
|
114836
|
-
var
|
|
114837
|
-
var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
114836
|
+
var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
|
|
114838
114837
|
if (optionsByEntries) {
|
|
114839
114838
|
let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
|
|
114840
|
-
if (optionsByEntry === void 0 &&
|
|
114839
|
+
if (optionsByEntry === void 0 && isMainEntry && packageName) {
|
|
114841
114840
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
|
114842
114841
|
}
|
|
114843
114842
|
return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
|
@@ -115838,41 +115837,6 @@ var require_require = __commonJS({
|
|
|
115838
115837
|
}
|
|
115839
115838
|
});
|
|
115840
115839
|
|
|
115841
|
-
// ../../../toolkit/utils/dist/cjs/cli/routes.js
|
|
115842
|
-
var require_routes = __commonJS({
|
|
115843
|
-
"../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
|
|
115844
|
-
"use strict";
|
|
115845
|
-
Object.defineProperty(exports, "__esModule", {
|
|
115846
|
-
value: true
|
|
115847
|
-
});
|
|
115848
|
-
Object.defineProperty(exports, "getRouteId", {
|
|
115849
|
-
enumerable: true,
|
|
115850
|
-
get: function() {
|
|
115851
|
-
return getRouteId;
|
|
115852
|
-
}
|
|
115853
|
-
});
|
|
115854
|
-
var _interop_require_default = require_interop_require_default();
|
|
115855
|
-
var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
115856
|
-
var _constants = require_constants();
|
|
115857
|
-
var _path1 = require_path();
|
|
115858
|
-
var getPathWithoutExt = (filename) => {
|
|
115859
|
-
const extname = _path.default.extname(filename);
|
|
115860
|
-
return filename.slice(0, -extname.length);
|
|
115861
|
-
};
|
|
115862
|
-
var getRouteId = (componentPath, routesDir, entryName) => {
|
|
115863
|
-
const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
|
|
115864
|
-
const pathWithoutExt = getPathWithoutExt(relativePath);
|
|
115865
|
-
let id = ``;
|
|
115866
|
-
if (entryName === _constants.MAIN_ENTRY_NAME) {
|
|
115867
|
-
id = pathWithoutExt;
|
|
115868
|
-
} else {
|
|
115869
|
-
id = `${entryName}_${pathWithoutExt}`;
|
|
115870
|
-
}
|
|
115871
|
-
return id.replace(/\[(.*?)\]/g, "($1)");
|
|
115872
|
-
};
|
|
115873
|
-
}
|
|
115874
|
-
});
|
|
115875
|
-
|
|
115876
115840
|
// ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
|
|
115877
115841
|
var require_runtimeExports = __commonJS({
|
|
115878
115842
|
"../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
|
|
@@ -116019,7 +115983,6 @@ var require_cli = __commonJS({
|
|
|
116019
115983
|
_export_star._(require_prettyInstructions(), exports);
|
|
116020
115984
|
_export_star._(require_print(), exports);
|
|
116021
115985
|
_export_star._(require_require(), exports);
|
|
116022
|
-
_export_star._(require_routes(), exports);
|
|
116023
115986
|
_export_star._(require_runtimeExports(), exports);
|
|
116024
115987
|
_export_star._(require_watch(), exports);
|
|
116025
115988
|
}
|
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.24",
|
|
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-common": "3.1.
|
|
34
|
-
"@modern-js/generator-utils": "3.1.
|
|
35
|
-
"@scripts/build": "2.
|
|
36
|
-
"@scripts/jest-config": "2.
|
|
33
|
+
"@modern-js/generator-common": "3.1.24",
|
|
34
|
+
"@modern-js/generator-utils": "3.1.24",
|
|
35
|
+
"@scripts/build": "2.24.0",
|
|
36
|
+
"@scripts/jest-config": "2.24.0"
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"publishConfig": {
|