@modern-js/app-tools 2.60.4-alpha.2 → 2.60.4
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/cjs/plugins/analyze/getServerRoutes.js +4 -1
- package/dist/cjs/utils/register.js +3 -1
- package/dist/esm/plugins/analyze/getServerRoutes.js +6 -1
- package/dist/esm/utils/register.js +3 -1
- package/dist/esm-node/plugins/analyze/getServerRoutes.js +4 -1
- package/dist/esm-node/utils/register.js +3 -1
- package/package.json +16 -16
|
@@ -145,7 +145,10 @@ const collectStaticRoutes = (appContext, config) => {
|
|
|
145
145
|
const { appDirectory } = appContext;
|
|
146
146
|
const { source: { configDir }, server: { publicRoutes = {} } } = config;
|
|
147
147
|
const publicFolder = import_path.default.resolve(appDirectory, configDir || "", "public");
|
|
148
|
-
|
|
148
|
+
const ignoreFiles = [
|
|
149
|
+
".gitkeep"
|
|
150
|
+
];
|
|
151
|
+
return import_fs.default.existsSync(publicFolder) ? (0, import_utils2.walkDirectory)(publicFolder).filter((filePath) => !ignoreFiles.includes(import_path.default.basename(filePath))).map((filePath) => {
|
|
149
152
|
const urlPath = `${(0, import_utils.urlJoin)(toPosix(filePath).slice(toPosix(publicFolder).length))}`;
|
|
150
153
|
return {
|
|
151
154
|
urlPath: publicRoutes[(0, import_utils.removeLeadingSlash)(urlPath)] || urlPath,
|
|
@@ -104,7 +104,9 @@ const registerCompiler = async (appDir, distDir, alias) => {
|
|
|
104
104
|
...tsNodeOptions
|
|
105
105
|
});
|
|
106
106
|
} catch (error) {
|
|
107
|
-
|
|
107
|
+
if (process.env.DEBUG) {
|
|
108
|
+
import_utils.logger.error(error);
|
|
109
|
+
}
|
|
108
110
|
await registerEsbuild({
|
|
109
111
|
isTsProject,
|
|
110
112
|
tsConfig,
|
|
@@ -110,7 +110,12 @@ var collectStaticRoutes = function(appContext, config) {
|
|
|
110
110
|
var appDirectory = appContext.appDirectory;
|
|
111
111
|
var configDir = config.source.configDir, _config_server = config.server, _config_server_publicRoutes = _config_server.publicRoutes, publicRoutes = _config_server_publicRoutes === void 0 ? {} : _config_server_publicRoutes;
|
|
112
112
|
var publicFolder = path.resolve(appDirectory, configDir || "", "public");
|
|
113
|
-
|
|
113
|
+
var ignoreFiles = [
|
|
114
|
+
".gitkeep"
|
|
115
|
+
];
|
|
116
|
+
return fs.existsSync(publicFolder) ? walkDirectory(publicFolder).filter(function(filePath) {
|
|
117
|
+
return !ignoreFiles.includes(path.basename(filePath));
|
|
118
|
+
}).map(function(filePath) {
|
|
114
119
|
var urlPath = "".concat(urlJoin(toPosix(filePath).slice(toPosix(publicFolder).length)));
|
|
115
120
|
return {
|
|
116
121
|
urlPath: publicRoutes[removeLeadingSlash(urlPath)] || urlPath,
|
|
@@ -112,7 +112,10 @@ const collectStaticRoutes = (appContext, config) => {
|
|
|
112
112
|
const { appDirectory } = appContext;
|
|
113
113
|
const { source: { configDir }, server: { publicRoutes = {} } } = config;
|
|
114
114
|
const publicFolder = path.resolve(appDirectory, configDir || "", "public");
|
|
115
|
-
|
|
115
|
+
const ignoreFiles = [
|
|
116
|
+
".gitkeep"
|
|
117
|
+
];
|
|
118
|
+
return fs.existsSync(publicFolder) ? walkDirectory(publicFolder).filter((filePath) => !ignoreFiles.includes(path.basename(filePath))).map((filePath) => {
|
|
116
119
|
const urlPath = `${urlJoin(toPosix(filePath).slice(toPosix(publicFolder).length))}`;
|
|
117
120
|
return {
|
|
118
121
|
urlPath: publicRoutes[removeLeadingSlash(urlPath)] || urlPath,
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.60.4
|
|
18
|
+
"version": "2.60.4",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -88,19 +88,19 @@
|
|
|
88
88
|
"mlly": "^1.6.1",
|
|
89
89
|
"pkg-types": "^1.1.0",
|
|
90
90
|
"std-env": "^3.7.0",
|
|
91
|
-
"@modern-js/
|
|
92
|
-
"@modern-js/plugin
|
|
93
|
-
"@modern-js/
|
|
94
|
-
"@modern-js/
|
|
95
|
-
"@modern-js/
|
|
96
|
-
"@modern-js/
|
|
97
|
-
"@modern-js/
|
|
98
|
-
"@modern-js/
|
|
99
|
-
"@modern-js/server": "2.60.
|
|
100
|
-
"@modern-js/
|
|
101
|
-
"@modern-js/server-
|
|
102
|
-
"@modern-js/
|
|
103
|
-
"@modern-js/
|
|
91
|
+
"@modern-js/core": "2.60.4",
|
|
92
|
+
"@modern-js/plugin": "2.60.4",
|
|
93
|
+
"@modern-js/plugin-data-loader": "2.60.4",
|
|
94
|
+
"@modern-js/node-bundle-require": "2.60.4",
|
|
95
|
+
"@modern-js/prod-server": "2.60.4",
|
|
96
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.60.4",
|
|
97
|
+
"@modern-js/plugin-i18n": "2.60.4",
|
|
98
|
+
"@modern-js/server": "2.60.4",
|
|
99
|
+
"@modern-js/server-utils": "2.60.4",
|
|
100
|
+
"@modern-js/types": "2.60.4",
|
|
101
|
+
"@modern-js/server-core": "2.60.4",
|
|
102
|
+
"@modern-js/uni-builder": "2.60.4",
|
|
103
|
+
"@modern-js/utils": "2.60.4"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@rsbuild/plugin-webpack-swc": "~1.0.3",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"tsconfig-paths": "^4.2.0",
|
|
113
113
|
"typescript": "^5",
|
|
114
114
|
"webpack": "^5.95.0",
|
|
115
|
-
"@scripts/build": "2.60.
|
|
116
|
-
"@scripts/jest-config": "2.60.
|
|
115
|
+
"@scripts/build": "2.60.4",
|
|
116
|
+
"@scripts/jest-config": "2.60.4"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"ts-node": "^10.7.0",
|