@modern-js/app-tools 2.34.1-alpha.0 → 2.34.1-alpha.1
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.
@@ -124,6 +124,7 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
124
124
|
let splatData = "";
|
125
125
|
let splatRoute = null;
|
126
126
|
let pageConfigFile = "";
|
127
|
+
let splatConfigFile = "";
|
127
128
|
const items = await _utils.fs.readdir(dirname);
|
128
129
|
for (const item of items) {
|
129
130
|
const itemPath = _path.join(dirname, item);
|
@@ -192,7 +193,7 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
192
193
|
}
|
193
194
|
if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
194
195
|
if (!route.config) {
|
195
|
-
|
196
|
+
splatConfigFile = itemPath;
|
196
197
|
}
|
197
198
|
}
|
198
199
|
if (itemWithoutExt === _constants.NESTED_ROUTE.SPLATE_DATA_FILE) {
|
@@ -213,6 +214,9 @@ const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldVersion)
|
|
213
214
|
if (splatData) {
|
214
215
|
splatRoute.data = splatData;
|
215
216
|
}
|
217
|
+
if (splatConfigFile) {
|
218
|
+
splatRoute.config = splatConfigFile;
|
219
|
+
}
|
216
220
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
217
221
|
}
|
218
222
|
if (itemWithoutExt === _constants.NESTED_ROUTE.LOADING_FILE) {
|
@@ -73,7 +73,7 @@ export var optimizeRoute = function(routeTree) {
|
|
73
73
|
};
|
74
74
|
export var walk = function() {
|
75
75
|
var _ref = _async_to_generator(function(dirname, rootDir, alias, entryName, isMainEntry, oldVersion) {
|
76
|
-
var _routePath, _finalRoute_children, isDirectory, relativeDir, pathSegments, lastSegment, isRoot, isPathlessLayout, isWithoutLayoutPath, routePath, route, pageLoaderFile, pageRoute, splatLoaderFile, splatClientData, splatData, splatRoute, pageConfigFile, items, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, item, itemPath, extname, itemWithoutExt, isDirectory1, childRoute, _route_children, _route_children1, _route_children2, err, finalRoute, childRoutes, childRoute1, _$path, optimizedRoutes;
|
76
|
+
var _routePath, _finalRoute_children, isDirectory, relativeDir, pathSegments, lastSegment, isRoot, isPathlessLayout, isWithoutLayoutPath, routePath, route, pageLoaderFile, pageRoute, splatLoaderFile, splatClientData, splatData, splatRoute, pageConfigFile, splatConfigFile, items, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, item, itemPath, extname, itemWithoutExt, isDirectory1, childRoute, _route_children, _route_children1, _route_children2, err, finalRoute, childRoutes, childRoute1, _$path, optimizedRoutes;
|
77
77
|
return _ts_generator(this, function(_state) {
|
78
78
|
switch (_state.label) {
|
79
79
|
case 0:
|
@@ -123,6 +123,7 @@ export var walk = function() {
|
|
123
123
|
splatData = "";
|
124
124
|
splatRoute = null;
|
125
125
|
pageConfigFile = "";
|
126
|
+
splatConfigFile = "";
|
126
127
|
return [
|
127
128
|
4,
|
128
129
|
fs.readdir(dirname)
|
@@ -231,7 +232,7 @@ export var walk = function() {
|
|
231
232
|
}
|
232
233
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
233
234
|
if (!route.config) {
|
234
|
-
|
235
|
+
splatConfigFile = itemPath;
|
235
236
|
}
|
236
237
|
}
|
237
238
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
|
@@ -252,6 +253,9 @@ export var walk = function() {
|
|
252
253
|
if (splatData) {
|
253
254
|
splatRoute.data = splatData;
|
254
255
|
}
|
256
|
+
if (splatConfigFile) {
|
257
|
+
splatRoute.config = splatConfigFile;
|
258
|
+
}
|
255
259
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
256
260
|
}
|
257
261
|
if (itemWithoutExt === NESTED_ROUTE.LOADING_FILE) {
|
@@ -101,6 +101,7 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
101
101
|
let splatData = "";
|
102
102
|
let splatRoute = null;
|
103
103
|
let pageConfigFile = "";
|
104
|
+
let splatConfigFile = "";
|
104
105
|
const items = await fs.readdir(dirname);
|
105
106
|
for (const item of items) {
|
106
107
|
const itemPath = path.join(dirname, item);
|
@@ -169,7 +170,7 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
169
170
|
}
|
170
171
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_CONFIG_FILE) {
|
171
172
|
if (!route.config) {
|
172
|
-
|
173
|
+
splatConfigFile = itemPath;
|
173
174
|
}
|
174
175
|
}
|
175
176
|
if (itemWithoutExt === NESTED_ROUTE.SPLATE_DATA_FILE) {
|
@@ -190,6 +191,9 @@ export const walk = async (dirname, rootDir, alias, entryName, isMainEntry, oldV
|
|
190
191
|
if (splatData) {
|
191
192
|
splatRoute.data = splatData;
|
192
193
|
}
|
194
|
+
if (splatConfigFile) {
|
195
|
+
splatRoute.config = splatConfigFile;
|
196
|
+
}
|
193
197
|
(_route_children2 = route.children) === null || _route_children2 === void 0 ? void 0 : _route_children2.push(splatRoute);
|
194
198
|
}
|
195
199
|
if (itemWithoutExt === NESTED_ROUTE.LOADING_FILE) {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.34.1-alpha.
|
18
|
+
"version": "2.34.1-alpha.1",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -73,22 +73,22 @@
|
|
73
73
|
"esbuild": "0.17.19",
|
74
74
|
"rspack-plugin-virtual-module": "0.1.7",
|
75
75
|
"@swc/helpers": "0.5.1",
|
76
|
-
"@modern-js/builder": "2.34.0",
|
77
|
-
"@modern-js/builder-shared": "2.34.0",
|
76
|
+
"@modern-js/builder-webpack-provider": "2.34.0",
|
78
77
|
"@modern-js/builder-plugin-node-polyfill": "2.34.0",
|
79
78
|
"@modern-js/core": "2.34.0",
|
79
|
+
"@modern-js/builder": "2.34.0",
|
80
|
+
"@modern-js/builder-shared": "2.34.0",
|
80
81
|
"@modern-js/new-action": "2.34.0",
|
81
82
|
"@modern-js/node-bundle-require": "2.34.0",
|
82
|
-
"@modern-js/builder-webpack-provider": "2.34.0",
|
83
83
|
"@modern-js/plugin": "2.34.0",
|
84
|
-
"@modern-js/builder-plugin-esbuild": "2.34.0",
|
85
84
|
"@modern-js/plugin-data-loader": "2.34.0",
|
86
|
-
"@modern-js/
|
85
|
+
"@modern-js/plugin-i18n": "2.34.0",
|
86
|
+
"@modern-js/builder-plugin-esbuild": "2.34.0",
|
87
87
|
"@modern-js/prod-server": "2.34.0",
|
88
88
|
"@modern-js/plugin-lint": "2.34.0",
|
89
|
-
"@modern-js/plugin-i18n": "2.34.0",
|
90
|
-
"@modern-js/upgrade": "2.34.0",
|
91
89
|
"@modern-js/types": "2.34.0",
|
90
|
+
"@modern-js/upgrade": "2.34.0",
|
91
|
+
"@modern-js/server": "2.34.0",
|
92
92
|
"@modern-js/server-core": "2.34.0",
|
93
93
|
"@modern-js/utils": "2.34.0"
|
94
94
|
},
|
@@ -99,9 +99,9 @@
|
|
99
99
|
"jest": "^29",
|
100
100
|
"typescript": "^5",
|
101
101
|
"webpack": "^5.88.1",
|
102
|
-
"@modern-js/builder-rspack-provider": "2.34.0",
|
103
|
-
"@scripts/build": "2.34.0",
|
104
102
|
"@modern-js/builder-plugin-swc": "2.34.0",
|
103
|
+
"@scripts/build": "2.34.0",
|
104
|
+
"@modern-js/builder-rspack-provider": "2.34.0",
|
105
105
|
"@scripts/jest-config": "2.34.0"
|
106
106
|
},
|
107
107
|
"peerDependencies": {
|