minor patches & bump deps

This commit is contained in:
undefined committed 2025-05-28 14:32:30 +08:00
1 parent 80a9c6a399
commit d9b578d56a
19 files changed
+80 -61

No files matched your search

+5 -5
View File
@@ -4,12 +4,12 @@
"license": "MIT",
"main": "base.mjs",
"dependencies": {
"@eslint-react/eslint-plugin": "^1.49.0",
"@eslint-react/eslint-plugin": "^1.50.0",
"@eslint/compat": "^1.2.9",
"@eslint/eslintrc": "^3.3.1",
"@stylistic/eslint-plugin": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^8.32.0",
"@typescript-eslint/parser": "^8.32.0",
"@stylistic/eslint-plugin": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^8.33.0",
"@typescript-eslint/parser": "^8.33.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-de-morgan": "^1.2.1",
"eslint-plugin-github": "^6.0.0",
@@ -18,7 +18,7 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^16.1.0"
"globals": "^16.2.0"
},
"peerDependencies": {
"eslint": ">= 9"
+3 -2
View File
@@ -10,7 +10,7 @@
"@hydrooj/utils": "workspace:^",
"emoji-regex": "^10.4.0",
"fs-extra": "^11.3.0",
"koa": "^2.16.1",
"koa": "^3.0.0",
"koa-body": "^6.0.1",
"koa-compress": "^5.1.1",
"koa-router": "^13.0.1",
@@ -19,6 +19,7 @@
"path-to-regexp": "^8.2.0",
"sanitize-filename": "^1.6.3",
"saslprep": "^1.0.3",
"schemastery": "^3.16.1",
"shorty.js": "^1.0.1",
"ws": "^8.18.2"
},
@@ -27,7 +28,7 @@
"@types/koa": "^2.15.0",
"@types/koa-compress": "^4.0.6",
"@types/koa-router": "^7.4.8",
"@types/lodash": "^4.17.16",
"@types/lodash": "^4.17.17",
"@types/saslprep": "^1.0.3",
"@types/ws": "^8.18.1"
}
+14 -13
View File
@@ -8,6 +8,7 @@ import fs from 'fs-extra';
import Koa from 'koa';
import Body from 'koa-body';
import Compress from 'koa-compress';
import Schema from 'schemastery';
import { Shorty } from 'shorty.js';
import { WebSocket, WebSocketServer } from 'ws';
import {
@@ -324,19 +325,19 @@ function executeMiddlewareStack(context: any, middlewares: { name: string, func:
return dispatch(0);
}
export interface WebServiceConfig {
keys: string[];
proxy: boolean;
cors?: string;
upload?: string;
port: number;
host?: string;
xff?: string;
xhost?: string;
enableSSE?: boolean;
}
export class WebService<C extends CordisContext = CordisContext> extends Service<never, C> {
static Config = Schema.object({
keys: Schema.array(Schema.string()),
proxy: Schema.boolean(),
cors: Schema.string(),
upload: Schema.string(),
port: Schema.number(),
host: Schema.string(),
xff: Schema.string(),
xhost: Schema.string(),
enableSSE: Schema.boolean(),
});
private registry: Record<string, any> = Object.create(null);
private registrationCount = Counter();
private serverLayers = [];
@@ -352,7 +353,7 @@ export class WebService<C extends CordisContext = CordisContext> extends Service
Handler = Handler;
ConnectionHandler = ConnectionHandler;
constructor(ctx: C, public config: WebServiceConfig) {
constructor(ctx: C, public config: ReturnType<typeof WebService.Config>) {
super(ctx, 'server');
ctx.mixin('server', ['Route', 'Connection', 'withHandlerClass']);
this.server.keys = this.config.keys;
+7 -7
View File
@@ -43,22 +43,22 @@
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.6",
"esbuild": "0.25.2",
"eslint": "^9.26.0",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint": "^9.27.0",
"eslint-import-resolver-typescript": "^4.4.1",
"eslint-import-resolver-webpack": "^0.13.10",
"fs-extra": "^11.3.0",
"globals": "^16.1.0",
"globals": "^16.2.0",
"globby": "~14.0.2",
"inspectpack": "^4.7.1",
"mongodb-memory-server": "10.1.4",
"nyc": "^17.1.0",
"ora": "^8.2.0",
"oxlint": "^0.16.9",
"oxlint": "^0.16.12",
"package-json": "^10.0.1",
"semver": "^7.7.1",
"semver": "^7.7.2",
"simple-git": "^3.27.0",
"supertest": "^7.1.0",
"supports-hyperlinks": "^3.2.0",
"supertest": "^7.1.1",
"supports-hyperlinks": "^4.1.0",
"typescript": "5.8.3",
"wtfnode": "^0.10.0"
},
+1 -1
View File
@@ -11,6 +11,6 @@
},
"dependencies": {
"crypto-js": "^4.2.0",
"semver": "^7.7.1"
"semver": "^7.7.2"
}
}
+4 -4
View File
@@ -4,7 +4,7 @@
"main": "./frontend/index.ts",
"dependencies": {
"allotment": "^1.20.3",
"diff": "^7.0.0",
"diff": "^8.0.2",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"react-dnd": "^16.0.1",
@@ -13,10 +13,10 @@
"schemastery-react": "^0.1.2"
},
"devDependencies": {
"@types/diff": "^7.0.2",
"@types/diff": "^8.0.0",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.16",
"sass": "^1.87.0"
"@types/lodash": "^4.17.17",
"sass": "^1.89.0"
},
"peerDependencies": {
"react": "*",
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@elastic/elasticsearch": "^8.18.2"
"@elastic/elasticsearch": "^9.0.2"
},
"engines": {
"hydrooj": ">=5.0.0-alpha.1"
+2 -2
View File
@@ -8,11 +8,11 @@
"dependencies": {
"@hydrooj/common": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@zip.js/zip.js": "^2.7.60",
"@zip.js/zip.js": "^2.7.62",
"cac": "^6.7.14",
"p-queue": "^8.1.0",
"schemastery": "^3.16.1",
"semver": "^7.7.1",
"semver": "^7.7.2",
"shell-quote": "^1.8.2",
"superagent": "^10.2.1",
"ws": "^8.18.2"
+5 -5
View File
@@ -23,10 +23,10 @@
"@hydrooj/utils": "workspace:^",
"@simplewebauthn/server": "13.1.1",
"@undefined-moe/require-resolve-hook": "^1.1.0",
"@zip.js/zip.js": "^2.7.60",
"@zip.js/zip.js": "^2.7.62",
"adm-zip": "0.5.16",
"cac": "^6.7.14",
"cordis": "4.0.0-beta.2",
"cordis": "4.0.0-beta.4",
"csv-stringify": "^6.5.2",
"emoji-regex": "^10.4.0",
"emojis-list": "2.1.0",
@@ -35,7 +35,7 @@
"koa-proxies": "^0.12.4",
"koa-static-cache": "^5.1.4",
"lodash": "^4.17.21",
"lru-cache": "^10.4.3",
"lru-cache": "^11.1.0",
"mime-types": "^3.0.1",
"moment-timezone": "^0.5.48",
"mongodb": "^6.16.0",
@@ -47,7 +47,7 @@
"sanitize-filename": "^1.6.3",
"saslprep": "^1.0.3",
"schemastery": "^3.16.1",
"semver": "^7.7.1",
"semver": "^7.7.2",
"shorty.js": "^1.0.1",
"superagent": "^10.2.1",
"tar": "6.2.1",
@@ -60,7 +60,7 @@
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/koa-static-cache": "^5.1.4",
"@types/lodash": "^4.17.16",
"@types/lodash": "^4.17.17",
"@types/mime-types": "^2.1.4",
"@types/mongodb-uri": "^0.9.4",
"@types/nodemailer": "^6.4.17",
+12 -1
View File
@@ -71,6 +71,17 @@ export class Context extends cordis.Context {
super();
this.plugin(ApiMixin);
this.plugin(TimerService);
this.plugin(LoggerService);
this.plugin(LoggerService, {
console: {
showDiff: false,
showTime: 'dd hh:mm:ss',
label: {
align: 'right',
width: 9,
margin: 1,
},
levels: { default: process.env.DEV ? 3 : 2 },
},
});
}
}
+2 -1
View File
@@ -54,7 +54,8 @@ inject('Nav', 'record_main', {
query: (handler) => (handler.user.hasPriv(PRIV.PRIV_USER_PROFILE)
? ({ uidOrName: handler.user._id })
: ({})),
});
}, (handler) => (handler.user.hasPriv(PRIV.PRIV_USER_PROFILE)
? true : handler.user.hasPerm(PERM.PERM_VIEW_RECORD)));
inject('Nav', 'ranking', { prefix: 'ranking' }, PERM.PERM_VIEW_RANKING);
inject('Nav', 'domain_dashboard', { prefix: 'domain' }, PERM.PERM_EDIT_DOMAIN);
inject('Nav', 'manage_dashboard', { prefix: 'manage' }, PRIV.PRIV_EDIT_SYSTEM);
+1
View File
@@ -189,6 +189,7 @@ async function initAndCache(udoc: Udoc, dudoc, scope: bigint = PERM.PERM_ALL) {
class UserModel {
static coll = coll;
static collGroup = collGroup;
static User = User;
static cache = cache;
static defaultUser: Udoc = {
+4 -1
View File
@@ -26,7 +26,10 @@ const ProblemSchema = Schema.object({
})),
hint: StringValue,
source: Schema.union([StringValue, Schema.string()]),
display_id: Schema.string(),
display_id: Schema.transform(
Schema.union([Schema.number(), Schema.string()]),
(value) => (typeof value === 'number' ? `P${value.toString()}` : value),
),
time_limit: Schema.union([Schema.number(), Schema.string()]).required(),
memory_limit: Schema.union([Schema.number(), Schema.string()]).required(),
spj: Schema.union([
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "@hydrooj/onsite-toolkit",
"version": "0.1.0-beta.1",
"dependencies": {
"@react-spring/web": "^9.7.5",
"@react-spring/web": "^10.0.1",
"react-use": "^17.6.0"
}
}
+11 -11
View File
@@ -21,8 +21,8 @@
"@fontsource/source-code-pro": "^5.2.5",
"@fontsource/ubuntu-mono": "^5.2.5",
"@hydrooj/utils": "workspace:^",
"@sentry/browser": "^9.17.0",
"@sentry/webpack-plugin": "^3.4.0",
"@sentry/browser": "^9.22.0",
"@sentry/webpack-plugin": "^3.5.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.3",
"@types/react-dom": "^19.1.3",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.5",
"@types/redux-logger": "^3.0.13",
"@types/uuid": "^10.0.0",
"@types/webpack-env": "^1.18.8",
@@ -49,12 +49,12 @@
"clean-webpack-plugin": "^4.0.0",
"clipboard": "^2.0.11",
"copy-webpack-plugin": "^13.0.0",
"cordis": "4.0.0-beta.2",
"cordis": "4.0.0-beta.4",
"core-js": "^3.42.0",
"core-js-compat": "^3.42.0",
"css-loader": "^7.1.2",
"diff": "^7.0.0",
"diff-dom": "^5.1.4",
"diff": "^8.0.2",
"diff-dom": "^5.2.0",
"echarts": "^5.6.0",
"emojis-keywords": "2.0.0",
"emojis-list": "2.1.0",
@@ -66,7 +66,7 @@
"jquery.easing": "^1.4.1",
"jquery.transit": "^0.9.12",
"matchmedia-polyfill": "^0.3.2",
"md-editor-rt": "^5.5.1",
"md-editor-rt": "^5.6.0",
"mini-css-extract-plugin": "^2.9.2",
"moment": "^2.30.1",
"monaco-editor": "0.52.2",
@@ -98,7 +98,7 @@
"redux-promise-middleware": "^6.2.0",
"redux-thunk": "^3.1.0",
"rupture": "^0.7.1",
"sass": "^1.87.0",
"sass": "^1.89.0",
"sass-loader": "^16.0.5",
"schemastery": "^3.16.1",
"schemastery-react": "^0.1.2",
@@ -115,7 +115,7 @@
"timeago.js": "^4.0.2",
"ts-loader": "^9.5.2",
"web-streams-polyfill": "^4.1.0",
"webpack": "^5.99.8",
"webpack": "^5.99.9",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-server": "^5.2.1",
"webpack-manifest-plugin": "^5.0.1",
@@ -123,7 +123,7 @@
},
"dependencies": {
"@hydrooj/common": "workspace:^",
"ansi_up": "^6.0.5",
"ansi_up": "^6.0.6",
"cssfilter": "^0.0.11",
"esbuild": "0.25.2",
"fs-extra": "^11.3.0",
+1
View File
@@ -95,6 +95,7 @@ function shouldCachePath(path: string) {
if (!path.split('?')[0].split('/').pop()) return false;
if (!path.split('?')[0].split('/').pop().includes('.')) return false;
if (process.env.NODE_ENV !== 'production' && (path.includes('.hot-update.') || path.includes('?version='))) return false;
if (path.includes('?v=')) return false;
return true;
}
function shouldCache(request: Request) {
+4 -4
View File
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@vitejs/plugin-react": "^4.4.1",
"@vitejs/plugin-react": "^4.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"@vitejs/plugin-react-swc": "^3.9.0",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.5",
"@vitejs/plugin-react-swc": "^3.10.0",
"vite": "^6.3.5"
}
}
+1 -1
View File
@@ -25,8 +25,8 @@ factory.addExporter(new Exporter.Console({
margin: 1,
},
timestamp: Date.now(),
levels: { default: process.env.DEV ? 3 : 2 },
}));
factory.exporters.get(1).levels = { default: process.env.DEV ? 3 : 2 };
function createLogger(name: string) {
return factory.createLogger(name);
+1 -1
View File
@@ -16,7 +16,7 @@
"mongodb": "^6.16.0",
"reggol": "^2.1.0",
"search-query-parser": "^1.6.0",
"systeminformation": "^5.25.11"
"systeminformation": "^5.27.1"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4"