mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
upgrade deps
This commit is contained in:
12 files changed
+33
-31
No files matched your search
@@ -5,14 +5,14 @@
|
||||
"main": "base.mjs",
|
||||
"repository": "https://github.com/hydro-dev/Hydro",
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config": "^6.6.1",
|
||||
"@antfu/eslint-config": "^6.7.1",
|
||||
"@eslint-react/eslint-plugin": "^2.3.13",
|
||||
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
||||
"@typescript-eslint/parser": "^8.49.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
||||
"@typescript-eslint/parser": "^8.50.0",
|
||||
"eslint-plugin-de-morgan": "^2.0.0",
|
||||
"eslint-plugin-github": "^6.0.0",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.4.24",
|
||||
"eslint-plugin-react-refresh": "^0.4.26",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"globals": "^16.5.0"
|
||||
},
|
||||
|
||||
@@ -18,12 +18,15 @@ export default (logger, xff, xhost) => async (ctx: KoaContext, next: Next) => {
|
||||
method: ctx.request.method.toLowerCase(),
|
||||
host: ctx.request.headers[xhost?.toLowerCase() || ''] as string || ctx.request.host,
|
||||
ip: (ctx.request.headers[xff?.toLowerCase() || ''] as string || ctx.request.ip).split(',')[0].trim(),
|
||||
...pick(ctx, ['cookies', 'query', 'path', 'params', 'originalPath', 'querystring']),
|
||||
...pick(ctx, ['cookies', 'query', 'path', 'originalPath', 'querystring']),
|
||||
...pick(ctx.request, ['headers', 'body', 'hostname']),
|
||||
files: ctx.request.files as any,
|
||||
referer: ctx.request.headers.referer || '',
|
||||
json: (ctx.request.headers.accept || '').includes('application/json'),
|
||||
websocket: ctx.request.headers.upgrade === 'websocket',
|
||||
get params() {
|
||||
return ctx.params;
|
||||
},
|
||||
};
|
||||
const response: HydroResponse = {
|
||||
body: {},
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@koa/router": "^14.0.0",
|
||||
"@mongodb-js/saslprep": "^1.4.0",
|
||||
"@koa/router": "^15.1.0",
|
||||
"@mongodb-js/saslprep": "^1.4.4",
|
||||
"emoji-regex": "^10.6.0",
|
||||
"fs-extra": "^11.3.2",
|
||||
"koa": "^3.1.1",
|
||||
"koa-body": "^7.0.0",
|
||||
"koa-body": "^7.0.1",
|
||||
"koa-compress": "^5.1.1",
|
||||
"path-to-regexp": "^8.3.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IncomingMessage } from 'http';
|
||||
import KoaRouter from '@koa/router';
|
||||
import KoaRouter, { type RouterInstance } from '@koa/router';
|
||||
import { Keys, pathToRegexp } from 'path-to-regexp';
|
||||
import type WebSocket from 'ws';
|
||||
import type { KoaContext } from './server';
|
||||
@@ -51,7 +51,7 @@ export class Router extends KoaRouter {
|
||||
/**
|
||||
* hack into router methods to make sure that koa middlewares are disposable
|
||||
*/
|
||||
register(...args: Parameters<KoaRouter['register']>) {
|
||||
register(...args: Parameters<RouterInstance['register']>) {
|
||||
const layer = super.register(...args);
|
||||
this.disposeLastOp = () => remove(this.stack, layer);
|
||||
return layer;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"js-yaml": "^4.1.1",
|
||||
"reggol": "^2.1.0",
|
||||
"search-query-parser": "^1.6.0",
|
||||
"systeminformation": "^5.27.13"
|
||||
"systeminformation": "^5.27.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.4"
|
||||
|
||||
Reference in new issue
Block a user