mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
workspace: upgrade to cordis@4.0.0-beta.1, fix #975
This commit is contained in:
34 files changed
+87
-88
No files matched your search
@@ -4,12 +4,12 @@
|
||||
"license": "MIT",
|
||||
"main": "base.mjs",
|
||||
"dependencies": {
|
||||
"@eslint-react/eslint-plugin": "^1.40.1",
|
||||
"@eslint-react/eslint-plugin": "^1.45.0",
|
||||
"@eslint/compat": "^1.2.8",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@stylistic/eslint-plugin": "^4.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.29.0",
|
||||
"@typescript-eslint/parser": "^8.29.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
||||
"@typescript-eslint/parser": "^8.29.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-plugin-de-morgan": "^1.2.1",
|
||||
"eslint-plugin-github": "^6.0.0",
|
||||
@@ -24,6 +24,6 @@
|
||||
"eslint": ">= 9"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"typescript": "^5.8.2"
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Context } from '@cordisjs/core';
|
||||
import { Context } from 'cordis';
|
||||
import { ValidationError } from './error';
|
||||
import type { Handler } from './server';
|
||||
import { Converter, Type, Validator } from './validator';
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface ServerEvents<C> extends KnownHandlerEvents, HandlerEvents<C> {
|
||||
[k: `handler/error/${string}`]: (thisArg: Handler<C>, e: Error) => VoidReturn
|
||||
}
|
||||
|
||||
declare module '@cordisjs/core' {
|
||||
declare module 'cordis' {
|
||||
interface Events<C> extends ServerEvents<C> {
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,13 @@
|
||||
"main": "index.ts",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@cordisjs/core": "*"
|
||||
"cordis": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"emoji-regex": "^10.4.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
"koa": "^2.16.0",
|
||||
"koa": "^2.16.1",
|
||||
"koa-body": "^6.0.1",
|
||||
"koa-compress": "^5.1.1",
|
||||
"koa-router": "^13.0.1",
|
||||
|
||||
@@ -2,7 +2,7 @@ import http from 'http';
|
||||
import { tmpdir } from 'os';
|
||||
import { join } from 'path';
|
||||
import { PassThrough } from 'stream';
|
||||
import { Context as CordisContext, Service } from '@cordisjs/core';
|
||||
import { Context as CordisContext, Service } from 'cordis';
|
||||
import type { Files } from 'formidable';
|
||||
import fs from 'fs-extra';
|
||||
import Koa from 'koa';
|
||||
@@ -625,7 +625,7 @@ ${c.response.status} ${endTime - startTime}ms ${c.response.length}`);
|
||||
for (const { name, target } of h.__subscribe || []) sub.ctx.on(name, target.bind(h));
|
||||
if (layer) {
|
||||
let lastHeartbeat = Date.now();
|
||||
sub.ctx.setInterval(() => {
|
||||
sub.ctx.interval(() => {
|
||||
if (Date.now() - lastHeartbeat > 80000) {
|
||||
clean();
|
||||
conn.terminate();
|
||||
@@ -841,7 +841,7 @@ ${c.response.status} ${endTime - startTime}ms ${c.response.length}`);
|
||||
}
|
||||
}
|
||||
|
||||
declare module '@cordisjs/core' {
|
||||
declare module 'cordis' {
|
||||
interface Context {
|
||||
server: WebService<this>;
|
||||
Route: WebService<this>['Route'];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"node": ">=16"
|
||||
},
|
||||
"dependencies": {
|
||||
"esbuild": "0.25.0",
|
||||
"esbuild": "0.25.2",
|
||||
"source-map-support": "^0.5.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in new issue
Block a user