core: fix 404 page display

This commit is contained in:
undefined committed 2025-05-07 21:37:52 +08:00
1 parent 83da1c8d66
commit cd56ffe55b
11 files changed
+48 -30

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"maxmind": "^4.3.24"
"maxmind": "^4.3.25"
},
"preferUnplugged": true
}
+2 -2
View File
@@ -14,8 +14,8 @@
"schemastery": "^3.16.1",
"semver": "^7.7.1",
"shell-quote": "^1.8.2",
"superagent": "^10.2.0",
"ws": "^8.18.1"
"superagent": "^10.2.1",
"ws": "^8.18.2"
},
"preferUnplugged": true,
"license": "AGPL-3.0-or-later",
+3 -3
View File
@@ -16,7 +16,7 @@
"@aws-sdk/lib-storage": "3.726.1",
"@aws-sdk/s3-presigned-post": "3.726.1",
"@aws-sdk/s3-request-presigner": "3.726.1",
"@babel/code-frame": "^7.26.2",
"@babel/code-frame": "^7.27.1",
"@cordisjs/plugin-timer": "1.1.1",
"@hydrooj/common": "workspace:^",
"@hydrooj/framework": "workspace:^",
@@ -41,7 +41,7 @@
"mongodb": "^6.16.0",
"mongodb-uri": "^0.9.7",
"nanoid": "^5.1.5",
"nodemailer": "^6.10.1",
"nodemailer": "^7.0.2",
"notp": "^2.0.3",
"p-queue": "^8.1.0",
"sanitize-filename": "^1.6.3",
@@ -49,7 +49,7 @@
"schemastery": "^3.16.1",
"semver": "^7.7.1",
"shorty.js": "^1.0.1",
"superagent": "^10.2.0",
"superagent": "^10.2.1",
"tar": "6.2.1",
"thirty-two": "^1.0.2",
"ua-parser-js": "^2.0.3"
+4 -2
View File
@@ -91,7 +91,8 @@ export async function apply(ctx: Context) {
xhost: system.get('server.xhost'),
});
if (process.env.HYDRO_CLI) return;
ctx.inject(['server', 'oauth'], ({ server, on, oauth }) => {
ctx.inject(['server', 'oauth', 'setting'], (childContext) => {
const { server, on, oauth } = childContext;
server.addHandlerLayer('init', async (c, next) => {
const init = Date.now();
try {
@@ -107,7 +108,8 @@ export async function apply(ctx: Context) {
}
});
applyApiHandler(ctx, 'api', '/api/:op');
applyApiHandler(childContext, 'api', '/api/:op');
server.setDefaultContext(childContext);
for (const addon of [...Object.values(global.addons)].reverse()) {
const dir = resolve(addon, 'public');
+1 -1
View File
@@ -243,7 +243,7 @@ export default async function (env: { watch?: boolean, production?: boolean, mea
name(module) {
const packageName = module.context.replace(/\\/g, '/').split('node_modules/').pop().split('/')[0];
if (packageName === 'monaco-editor-nls') {
return `i.monaco.${module.userRequest.replace(/\\/g, '/').split('/').pop().split('.')[0]}`;
return `i.monaco.${(module as any).userRequest.replace(/\\/g, '/').split('/').pop().split('.')[0]}`;
}
return `n.${packageName.replace('@', '')}`;
},
+7 -7
View File
@@ -13,7 +13,7 @@
"devDependencies": {
"@blueprintjs/core": "^5.19.0",
"@fontsource/dm-mono": "^5.2.5",
"@fontsource/fira-code": "^5.2.5",
"@fontsource/fira-code": "^5.2.6",
"@fontsource/inconsolata": "^5.2.5",
"@fontsource/jetbrains-mono": "^5.2.5",
"@fontsource/pt-mono": "^5.2.5",
@@ -22,7 +22,7 @@
"@fontsource/ubuntu-mono": "^5.2.5",
"@hydrooj/utils": "workspace:^",
"@sentry/browser": "^9.15.0",
"@sentry/webpack-plugin": "^3.3.1",
"@sentry/webpack-plugin": "^3.4.0",
"@simplewebauthn/browser": "13.1.0",
"@svgr/webpack": "^8.1.0",
"@types/html-to-text": "^9.0.4",
@@ -34,8 +34,8 @@
"@types/nunjucks": "^3.2.6",
"@types/pickadate": "^3.5.35",
"@types/qrcode": "^1.5.5",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"@types/redux-logger": "^3.0.13",
"@types/uuid": "^10.0.0",
"@types/webpack-env": "^1.18.8",
@@ -60,7 +60,7 @@
"emojis-list": "2.1.0",
"esbuild-loader": "^4.3.0",
"flatpickr": "^4.6.13",
"idb": "^8.0.2",
"idb": "^8.0.3",
"jquery": "^3.7.1",
"jquery-scroll-lock": "^3.1.3",
"jquery.easing": "^1.4.1",
@@ -72,7 +72,7 @@
"monaco-editor": "0.52.2",
"monaco-editor-nls": "^3.1.0",
"monaco-editor-webpack-plugin": "^7.1.0",
"monaco-themes": "^0.4.4",
"monaco-themes": "^0.4.5",
"monaco-yaml": "5.1.1",
"nanoid": "^5.1.5",
"normalize.css": "^8.0.1",
@@ -115,7 +115,7 @@
"timeago.js": "^4.0.2",
"ts-loader": "^9.5.2",
"web-streams-polyfill": "^4.1.0",
"webpack": "^5.99.7",
"webpack": "^5.99.8",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-server": "^5.2.1",
"webpack-manifest-plugin": "^5.0.1",
+3 -3
View File
@@ -13,9 +13,9 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"@vitejs/plugin-react-swc": "^3.9.0",
"vite": "^6.3.4"
"vite": "^6.3.5"
}
}