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:
8 files changed
+32
-23
No files matched your search
@@ -5,10 +5,10 @@
|
|||||||
"main": "react.yaml",
|
"main": "react.yaml",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stylistic/eslint-plugin": "^2.12.1",
|
"@stylistic/eslint-plugin": "^2.12.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
||||||
"@typescript-eslint/parser": "^8.19.0",
|
"@typescript-eslint/parser": "^8.19.1",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-plugin-github": "^5.1.4",
|
"eslint-plugin-github": "^5.1.5",
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
"eslint-plugin-react": "^7.37.3",
|
"eslint-plugin-react": "^7.37.3",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"@types/koa": "^2.15.0",
|
"@types/koa": "^2.15.0",
|
||||||
"@types/koa-compress": "^4.0.6",
|
"@types/koa-compress": "^4.0.6",
|
||||||
"@types/koa-router": "^7.4.8",
|
"@types/koa-router": "^7.4.8",
|
||||||
"@types/lodash": "^4.17.13",
|
"@types/lodash": "^4.17.14",
|
||||||
"@types/saslprep": "^1.0.3",
|
"@types/saslprep": "^1.0.3",
|
||||||
"@types/ws": "^8.5.13"
|
"@types/ws": "^8.5.13"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "3.717.0",
|
"@aws-sdk/client-s3": "3.726.0",
|
||||||
"@aws-sdk/lib-storage": "3.717.0",
|
"@aws-sdk/lib-storage": "3.726.0",
|
||||||
"@aws-sdk/s3-presigned-post": "3.717.0",
|
"@aws-sdk/s3-presigned-post": "3.726.0",
|
||||||
"@aws-sdk/s3-request-presigner": "3.717.0",
|
"@aws-sdk/s3-request-presigner": "3.726.0",
|
||||||
"@graphql-tools/schema": "^10.0.15",
|
"@graphql-tools/schema": "^10.0.16",
|
||||||
"@hydrooj/framework": "workspace:^",
|
"@hydrooj/framework": "workspace:^",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@simplewebauthn/server": "9.0.3",
|
"@simplewebauthn/server": "9.0.3",
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"@types/fs-extra": "^11.0.4",
|
"@types/fs-extra": "^11.0.4",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/koa-static-cache": "^5.1.4",
|
"@types/koa-static-cache": "^5.1.4",
|
||||||
"@types/lodash": "^4.17.13",
|
"@types/lodash": "^4.17.14",
|
||||||
"@types/mime-types": "^2.1.4",
|
"@types/mime-types": "^2.1.4",
|
||||||
"@types/mongodb-uri": "^0.9.4",
|
"@types/mongodb-uri": "^0.9.4",
|
||||||
"@types/nodemailer": "^6.4.17",
|
"@types/nodemailer": "^6.4.17",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import AdmZip from 'adm-zip';
|
import AdmZip from 'adm-zip';
|
||||||
import { readFile, statSync } from 'fs-extra';
|
import { readFile } from 'fs-extra';
|
||||||
import {
|
import {
|
||||||
escapeRegExp, flattenDeep, intersection, pick,
|
escapeRegExp, flattenDeep, intersection, pick,
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
|
|||||||
@@ -317,12 +317,17 @@ hydrooj install https://hydro.ac/hydroac-client.zip
|
|||||||
const source = await query(`SELECT \`source\` FROM \`source_code\` WHERE \`solution_id\` = ${rdoc.solution_id}`);
|
const source = await query(`SELECT \`source\` FROM \`source_code\` WHERE \`solution_id\` = ${rdoc.solution_id}`);
|
||||||
if (source[0]?.source) data.code = source[0].source;
|
if (source[0]?.source) data.code = source[0].source;
|
||||||
if (rdoc.contest_id) {
|
if (rdoc.contest_id) {
|
||||||
data.contest = new ObjectId(tidMap[rdoc.contest_id]);
|
if (!tidMap[rdoc.contest_id]) {
|
||||||
await ContestModel.attend(domainId, data.contest, uidMap[rdoc.user_id]).catch(noop);
|
report({ message: `warning: contest_id ${rdoc.contest_id} for submission ${rdoc.solution_id} not found` });
|
||||||
|
} else {
|
||||||
|
data.contest = new ObjectId(tidMap[rdoc.contest_id]);
|
||||||
|
await ContestModel.attend(domainId, data.contest, uidMap[rdoc.user_id]).catch(noop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await RecordModel.coll.insertOne(data);
|
await RecordModel.coll.insertOne(data);
|
||||||
await postJudge(data).catch((err) => report({ message: err.message }));
|
await postJudge(data).catch((err) => report({ message: err.message }));
|
||||||
}
|
}
|
||||||
|
if (pageId % 10 === 0) report({ message: `record finished ${pageId * step} / ${rcount} (${Math.round(((pageId * step) / rcount) * 100)}%)` });
|
||||||
}
|
}
|
||||||
report({ message: 'record finished' });
|
report({ message: 'record finished' });
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"@fontsource/source-code-pro": "^5.1.1",
|
"@fontsource/source-code-pro": "^5.1.1",
|
||||||
"@fontsource/ubuntu-mono": "^5.1.1",
|
"@fontsource/ubuntu-mono": "^5.1.1",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@sentry/browser": "^8.47.0",
|
"@sentry/browser": "^8.48.0",
|
||||||
"@sentry/webpack-plugin": "^2.22.7",
|
"@sentry/webpack-plugin": "^2.22.7",
|
||||||
"@simplewebauthn/browser": "9.0.1",
|
"@simplewebauthn/browser": "9.0.1",
|
||||||
"@svgr/webpack": "^8.1.0",
|
"@svgr/webpack": "^8.1.0",
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"copy-webpack-plugin": "^12.0.2",
|
"copy-webpack-plugin": "^12.0.2",
|
||||||
"core-js": "^3.39.0",
|
"core-js": "^3.40.0",
|
||||||
"core-js-compat": "^3.39.0",
|
"core-js-compat": "^3.40.0",
|
||||||
"css-loader": "^6.11.0",
|
"css-loader": "^6.11.0",
|
||||||
"diff": "^7.0.0",
|
"diff": "^7.0.0",
|
||||||
"diff-dom": "^5.1.4",
|
"diff-dom": "^5.1.4",
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"jquery.easing": "^1.4.1",
|
"jquery.easing": "^1.4.1",
|
||||||
"jquery.transit": "^0.9.12",
|
"jquery.transit": "^0.9.12",
|
||||||
"matchmedia-polyfill": "^0.3.2",
|
"matchmedia-polyfill": "^0.3.2",
|
||||||
"md-editor-rt": "^5.1.1",
|
"md-editor-rt": "^5.2.0",
|
||||||
"mini-css-extract-plugin": "^2.9.2",
|
"mini-css-extract-plugin": "^2.9.2",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"monaco-editor": "0.50.0",
|
"monaco-editor": "0.50.0",
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
"timeago-react": "^3.0.6",
|
"timeago-react": "^3.0.6",
|
||||||
"timeago.js": "^4.0.2",
|
"timeago.js": "^4.0.2",
|
||||||
"ts-loader": "^9.5.1",
|
"ts-loader": "^9.5.1",
|
||||||
"web-streams-polyfill": "^4.0.0",
|
"web-streams-polyfill": "^4.1.0",
|
||||||
"webpack": "^5.97.1",
|
"webpack": "^5.97.1",
|
||||||
"webpack-bundle-analyzer": "^4.10.2",
|
"webpack-bundle-analyzer": "^4.10.2",
|
||||||
"webpack-dev-server": "^5.2.0",
|
"webpack-dev-server": "^5.2.0",
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
"nunjucks": "^3.2.4",
|
"nunjucks": "^3.2.4",
|
||||||
"schemastery-jsonschema": "^1.1.0",
|
"schemastery-jsonschema": "^1.1.0",
|
||||||
"streamsaver": "^2.0.6",
|
"streamsaver": "^2.0.6",
|
||||||
"uuid": "^11.0.3",
|
"uuid": "^11.0.5",
|
||||||
"xss": "^1.0.15"
|
"xss": "^1.0.15"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"mongodb": "^5.9.2",
|
"mongodb": "^5.9.2",
|
||||||
"reggol": "^1.7.1",
|
"reggol": "^1.7.1",
|
||||||
"search-query-parser": "^1.6.0",
|
"search-query-parser": "^1.6.0",
|
||||||
"systeminformation": "^5.24.6"
|
"systeminformation": "^5.25.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/fs-extra": "^11.0.4"
|
"@types/fs-extra": "^11.0.4"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class BasicFetcher {
|
|||||||
|
|
||||||
get(url: string) {
|
get(url: string) {
|
||||||
this.logger.debug('get', url);
|
this.logger.debug('get', url);
|
||||||
url = new URL(url, this.account.endpoint || this.defaultEndpoint).toString();
|
url = new URL(url, this.endpoint).toString();
|
||||||
let req = superagent.get(url).set('Cookie', this.cookie).set('User-Agent', this.UA);
|
let req = superagent.get(url).set('Cookie', this.cookie).set('User-Agent', this.UA);
|
||||||
if (this.fetchOptions.headers) req = req.set(this.fetchOptions.headers);
|
if (this.fetchOptions.headers) req = req.set(this.fetchOptions.headers);
|
||||||
if (this.fetchOptions.get?.headers) req = req.set(this.fetchOptions.get.headers);
|
if (this.fetchOptions.get?.headers) req = req.set(this.fetchOptions.get.headers);
|
||||||
@@ -46,7 +46,7 @@ export class BasicFetcher {
|
|||||||
|
|
||||||
post(url: string) {
|
post(url: string) {
|
||||||
this.logger.debug('post', url, this.cookie);
|
this.logger.debug('post', url, this.cookie);
|
||||||
url = new URL(url, this.account.endpoint || this.defaultEndpoint).toString();
|
url = new URL(url, this.endpoint).toString();
|
||||||
let req = superagent.post(url).set('Cookie', this.cookie).set('User-Agent', this.UA).type(this.formType);
|
let req = superagent.post(url).set('Cookie', this.cookie).set('User-Agent', this.UA).type(this.formType);
|
||||||
if (this.fetchOptions.headers) req = req.set(this.fetchOptions.headers);
|
if (this.fetchOptions.headers) req = req.set(this.fetchOptions.headers);
|
||||||
if (this.fetchOptions.post?.headers) req = req.set(this.fetchOptions.post.headers);
|
if (this.fetchOptions.post?.headers) req = req.set(this.fetchOptions.post.headers);
|
||||||
@@ -60,7 +60,11 @@ export class BasicFetcher {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
setEndpoint(endpoint: string) {
|
get endpoint() {
|
||||||
|
return this.account.endpoint || this.defaultEndpoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
set endpoint(endpoint: string) {
|
||||||
this.defaultEndpoint = endpoint;
|
this.defaultEndpoint = endpoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user