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:
1 parent
96fa6cc7b9
commit
80e3abf27b
12 files changed
+65
-70
No files matched your search
@@ -27,6 +27,7 @@ globalConfig.json
|
||||
/config.yaml
|
||||
/config.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
tsconfig.json
|
||||
tsconfig.*.json
|
||||
|
||||
|
||||
+27
-11
@@ -21,8 +21,8 @@
|
||||
"lint:ci": "eslint packages plugins --ext ts",
|
||||
"lint:ui": "yarn workspace @hydrooj/ui-default lint --ext .js,.ts,.jsx,.tsx . --fix",
|
||||
"lint:ui:ci": "yarn workspace @hydrooj/ui-default lint --ext .js,.ts,.jsx,.tsx .",
|
||||
"debug": "node --trace-warnings --async-stack-traces --trace-deprecation node_modules/hydrooj/bin/hydrooj --debug --template",
|
||||
"start": "node_modules/.bin/hydrooj",
|
||||
"debug": "node --trace-warnings --async-stack-traces --trace-deprecation packages/hydrooj/bin/hydrooj --debug --template",
|
||||
"start": "packages/hydrooj/bin/hydrooj",
|
||||
"postinstall": "node build/prepare.js"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
@@ -34,14 +34,18 @@
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/semver": "^7.3.13",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
||||
"@typescript-eslint/parser": "^5.44.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
||||
"@typescript-eslint/parser": "^5.46.0",
|
||||
"autocannon": "^7.10.0",
|
||||
"cac": "^6.7.14",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"css-loader": "^6.7.2",
|
||||
"esbuild": "0.15.2",
|
||||
"eslint": "^8.28.0",
|
||||
"esbuild-loader": "^2.20.0",
|
||||
"eslint": "^8.29.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
@@ -51,17 +55,29 @@
|
||||
"eslint-plugin-react": "^7.31.11",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-simple-import-sort": "8.0.0",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"globby": "13.1.2",
|
||||
"latest-version": "7.0.0",
|
||||
"mocha": "^10.1.0",
|
||||
"mini-css-extract-plugin": "^2.7.2",
|
||||
"mocha": "^10.2.0",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"mongodb": "^3.7.3",
|
||||
"mongodb-memory-server": "^8.10.1",
|
||||
"mongodb-memory-server": "^8.10.2",
|
||||
"nyc": "^15.1.0",
|
||||
"ora": "^6.1.2",
|
||||
"postcss-loader": "^7.0.1",
|
||||
"semver": "^7.3.8",
|
||||
"supertest": "^6.3.1",
|
||||
"typescript": "4.9.3"
|
||||
},
|
||||
"packageManager": "yarn@3.2.3"
|
||||
"style-loader": "^3.3.1",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.0",
|
||||
"supertest": "^6.3.3",
|
||||
"ts-loader": "^9.4.2",
|
||||
"typescript": "4.9.4",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-bundle-analyzer": "^4.7.0",
|
||||
"webpack-dev-server": "^4.11.1",
|
||||
"webpack-manifest-plugin": "^5.0.0",
|
||||
"webpackbar": "^5.0.2"
|
||||
}
|
||||
}
|
||||
@@ -9,21 +9,17 @@
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"cac": "^6.7.14",
|
||||
"fs-extra": "^10.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mongodb": "^3.7.3",
|
||||
"p-queue": "^7.3.0",
|
||||
"schemastery": "^3.5.4",
|
||||
"schemastery": "^3.6.1",
|
||||
"shell-quote": "^1.7.4",
|
||||
"superagent": "^8.0.4",
|
||||
"superagent": "^8.0.6",
|
||||
"ws": "^8.11.0"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/lodash": "^4.14.190",
|
||||
"@types/shell-quote": "^1.7.1",
|
||||
"@types/ws": "^8.5.3"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import yaml from 'js-yaml';
|
||||
import { max, sum } from 'lodash';
|
||||
import readYamlCases, { convertIniConfig } from '@hydrooj/utils/lib/cases';
|
||||
import { normalizeSubtasks, readSubtasksFromFiles } from '@hydrooj/utils/lib/common';
|
||||
import { changeErrorType } from '@hydrooj/utils/lib/utils';
|
||||
import { changeErrorType, yaml } from '@hydrooj/utils/lib/utils';
|
||||
import { ProblemConfigFile } from 'hydrooj';
|
||||
import { getConfig } from './config';
|
||||
import { FormatError, SystemError } from './error';
|
||||
@@ -16,11 +14,11 @@ function isValidConfig(config) {
|
||||
if (config.count > (getConfig('testcases_max') || 100)) {
|
||||
throw new FormatError('Too many testcases. Cancelled.');
|
||||
}
|
||||
const time = sum(config.subtasks.map((subtask) => sum(subtask.cases.map((c) => c.time))));
|
||||
const time = Math.sum(config.subtasks.map((subtask) => Math.sum(subtask.cases.map((c) => c.time))));
|
||||
if (time > (getConfig('total_time_limit') || 60) * 1000) {
|
||||
throw new FormatError('Total time limit longer than {0}s. Cancelled.', [+getConfig('total_time_limit') || 60]);
|
||||
}
|
||||
const memMax = max(config.subtasks.map((subtask) => max(subtask.cases.map((c) => c.memory))));
|
||||
const memMax = Math.max(config.subtasks.map((subtask) => Math.max(subtask.cases.map((c) => c.memory))));
|
||||
if (memMax > parseMemoryMB(getConfig('memoryMax'))) throw new FormatError('Memory limit larger than memory_max');
|
||||
if (!['default', 'strict'].includes(config.checker_type || 'default') && !config.checker) {
|
||||
throw new FormatError('You did not specify a checker.');
|
||||
|
||||
@@ -2,8 +2,8 @@ import os from 'os';
|
||||
import path from 'path';
|
||||
import cac from 'cac';
|
||||
import fs from 'fs-extra';
|
||||
import yaml from 'js-yaml';
|
||||
import Schema from 'schemastery';
|
||||
import { yaml } from '@hydrooj/utils';
|
||||
|
||||
const argv = cac().parse();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import assert from 'assert';
|
||||
import { readFile } from 'fs-extra';
|
||||
import yaml from 'js-yaml';
|
||||
import { yaml } from '@hydrooj/utils';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import { FormatError } from '../error';
|
||||
import { Context } from './interface';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { noop } from 'lodash';
|
||||
import { LangConfig } from '@hydrooj/utils/lib/lang';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import type {
|
||||
@@ -40,7 +39,7 @@ export class JudgeTask {
|
||||
folder: string;
|
||||
config: ParsedConfig;
|
||||
meta: JudgeMeta;
|
||||
files?:Record<string, string>;
|
||||
files?: Record<string, string>;
|
||||
next: (data: Partial<JudgeResultBody>) => void;
|
||||
end: (data: Partial<JudgeResultBody>) => void;
|
||||
env: Record<string, string>;
|
||||
@@ -103,7 +102,7 @@ export class JudgeTask {
|
||||
} finally {
|
||||
Lock.release(`${host}/${this.source}/${this.rid}`);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
for (const clean of this.clean) await clean()?.catch(noop);
|
||||
for (const clean of this.clean) await clean()?.catch(() => null);
|
||||
tmpfs.umount(this.tmpdir);
|
||||
fs.removeSync(this.tmpdir);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.216.0",
|
||||
"@aws-sdk/lib-storage": "^3.216.0",
|
||||
"@aws-sdk/middleware-endpoint": "^3.215.0",
|
||||
"@aws-sdk/s3-presigned-post": "^3.216.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.216.0",
|
||||
"@graphql-tools/schema": "^9.0.10",
|
||||
"@aws-sdk/client-s3": "^3.226.0",
|
||||
"@aws-sdk/lib-storage": "^3.226.0",
|
||||
"@aws-sdk/middleware-endpoint": "^3.226.0",
|
||||
"@aws-sdk/s3-presigned-post": "^3.226.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.226.0",
|
||||
"@graphql-tools/schema": "^9.0.12",
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"adm-zip": "0.5.5",
|
||||
"cac": "^6.7.14",
|
||||
@@ -30,16 +30,16 @@
|
||||
"graphql-scalars": "1.20.1",
|
||||
"isbinaryfile": "^5.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"koa": "^2.13.4",
|
||||
"koa": "^2.14.1",
|
||||
"koa-body": "^6.0.1",
|
||||
"koa-compress": "^5.1.0",
|
||||
"koa-proxies": "^0.12.2",
|
||||
"koa-proxies": "^0.12.3",
|
||||
"koa-router": "^12.0.0",
|
||||
"koa-static-cache": "^5.1.4",
|
||||
"lodash": "^4.17.21",
|
||||
"lru-cache": "7.14.1",
|
||||
"mime-types": "^2.1.35",
|
||||
"moment-timezone": "^0.5.39",
|
||||
"moment-timezone": "^0.5.40",
|
||||
"mongodb": "^3.7.3",
|
||||
"nanoid": "^4.0.0",
|
||||
"nodemailer": "^6.8.0",
|
||||
@@ -48,11 +48,11 @@
|
||||
"path-to-regexp": "^6.2.1",
|
||||
"require-resolve-hook": "^1.1.0",
|
||||
"saslprep": "^1.0.3",
|
||||
"schemastery": "^3.5.4",
|
||||
"schemastery": "^3.6.1",
|
||||
"semver": "^7.3.8",
|
||||
"serialize-javascript": "^6.0.0",
|
||||
"superagent": "^8.0.4",
|
||||
"tar": "^6.1.12",
|
||||
"superagent": "^8.0.6",
|
||||
"tar": "^6.1.13",
|
||||
"thirty-two": "^1.0.2",
|
||||
"ws": "^8.11.0"
|
||||
},
|
||||
@@ -64,7 +64,7 @@
|
||||
"@types/koa-compress": "^4.0.3",
|
||||
"@types/koa-router": "^7.4.4",
|
||||
"@types/koa-static-cache": "^5.1.1",
|
||||
"@types/lodash": "^4.14.190",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/mime-types": "^2.1.1",
|
||||
"@types/mongodb": "^3.6.20",
|
||||
"@types/nodemailer": "^6.4.6",
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"lint": "eslint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "4.12.0",
|
||||
"@blueprintjs/select": "4.8.11",
|
||||
"@blueprintjs/core": "4.13.0",
|
||||
"@blueprintjs/select": "4.8.12",
|
||||
"@fontsource/dm-mono": "^4.5.10",
|
||||
"@fontsource/fira-code": "^4.5.12",
|
||||
"@fontsource/inconsolata": "^4.5.9",
|
||||
@@ -33,27 +33,22 @@
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@types/redux-logger": "^3.0.9",
|
||||
"@types/serviceworker": "^0.0.57",
|
||||
"@types/sharedworker": "^0.0.86",
|
||||
"@types/serviceworker": "^0.0.58",
|
||||
"@types/sharedworker": "^0.0.87",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@vscode/codicons": "^0.0.32",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"browser-update": "^3.3.44",
|
||||
"chalk": "^5.1.2",
|
||||
"chalk": "^5.2.0",
|
||||
"classnames": "^2.3.2",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"clipboard": "^2.0.11",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"css-loader": "^6.7.2",
|
||||
"diff": "^5.1.0",
|
||||
"diff-dom": "^4.2.8",
|
||||
"echarts": "^5.4.0",
|
||||
"echarts": "^5.4.1",
|
||||
"emojis-keywords": "2.0.0",
|
||||
"emojis-list": "2.1.0",
|
||||
"esbuild-loader": "^2.20.0",
|
||||
"fancy-log": "^2.0.0",
|
||||
"flatpickr": "^4.6.13",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
"graphiql": "2.2.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-iconfont": "^11.0.1",
|
||||
@@ -65,11 +60,9 @@
|
||||
"jquery.easing": "^1.4.1",
|
||||
"jquery.transit": "^0.9.12",
|
||||
"matchmedia-polyfill": "^0.3.2",
|
||||
"mini-css-extract-plugin": "^2.7.0",
|
||||
"moment": "^2.29.4",
|
||||
"monaco-editor": "0.33.0",
|
||||
"monaco-editor-nls": "^2.0.0",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"monaco-themes": "^0.4.3",
|
||||
"monaco-yaml": "^4.0.2",
|
||||
"nanoid": "^4.0.0",
|
||||
@@ -77,8 +70,7 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"p-queue": "^7.3.0",
|
||||
"pickadate": "^3.6.4",
|
||||
"plugin-error": "^2.0.0",
|
||||
"postcss-loader": "^7.0.1",
|
||||
"plugin-error": "^2.0.1",
|
||||
"prism-themes": "^1.9.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"prop-types": "^15.8.1",
|
||||
@@ -99,23 +91,14 @@
|
||||
"rupture": "^0.7.1",
|
||||
"slideout": "^1.0.1",
|
||||
"sticky-kit": "^1.1.3",
|
||||
"style-loader": "^3.3.1",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.0",
|
||||
"tether": "1.4.7",
|
||||
"tether-drop": "^1.4.2",
|
||||
"through2": "^4.0.2",
|
||||
"timeago-react": "^3.0.5",
|
||||
"timeago.js": "^4.0.2",
|
||||
"ts-loader": "^9.4.1",
|
||||
"vditor": "^3.8.18",
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
"web-streams-polyfill": "^3.2.1",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-bundle-analyzer": "^4.7.0",
|
||||
"webpack-dev-server": "^4.11.1",
|
||||
"webpack-manifest-plugin": "^5.0.0",
|
||||
"webpackbar": "^5.0.2"
|
||||
"web-streams-polyfill": "^3.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi_up": "^5.1.0",
|
||||
@@ -123,11 +106,11 @@
|
||||
"fs-extra": "^10.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsesc": "^3.0.2",
|
||||
"katex": "^0.16.3",
|
||||
"katex": "^0.16.4",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-anchor": "^8.6.5",
|
||||
"markdown-it-attrs": "^4.1.4",
|
||||
"markdown-it-attrs": "^4.1.6",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-imsize": "^2.0.1",
|
||||
"markdown-it-mark": "^3.0.1",
|
||||
|
||||
@@ -7,6 +7,8 @@ import fs from 'fs-extra';
|
||||
import { isMoment, Moment } from 'moment-timezone';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import Logger from 'reggol';
|
||||
export * as yaml from 'js-yaml';
|
||||
export * as fs from 'fs-extra';
|
||||
|
||||
Logger.levels.base = process.env.DEV ? 3 : 2;
|
||||
Logger.targets[0].showTime = 'dd hh:mm:ss';
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
"esbuild": "0.15.2",
|
||||
"fs-extra": "^10.1.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"moment-timezone": "^0.5.39",
|
||||
"moment-timezone": "^0.5.40",
|
||||
"mongodb": "^3.7.3",
|
||||
"reggol": "^1.3.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"systeminformation": "^5.14.4"
|
||||
"systeminformation": "^5.16.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"puppeteer-extra": "3.3.0",
|
||||
"puppeteer-extra-plugin-portal": "3.1.0",
|
||||
"puppeteer-extra-plugin-stealth": "2.10.1",
|
||||
"superagent": "^8.0.4",
|
||||
"superagent": "^8.0.6",
|
||||
"superagent-proxy": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in new issue
Block a user