mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade deps
This commit is contained in:
17 files changed
+60
-56
No files matched your search
@@ -20,7 +20,7 @@
|
||||
"devDependencies": {
|
||||
"@types/diff": "^8.0.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/lodash": "^4.17.19",
|
||||
"@types/lodash": "^4.17.20",
|
||||
"sass": "^1.89.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "^9.0.2"
|
||||
"@elastic/elasticsearch": "^9.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"hydrooj": ">=5.0.0-alpha.1"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"maxmind": "^4.3.27"
|
||||
"maxmind": "^4.3.28"
|
||||
},
|
||||
"preferUnplugged": true
|
||||
}
|
||||
@@ -8,13 +8,13 @@
|
||||
"dependencies": {
|
||||
"@hydrooj/common": "workspace:^",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@zip.js/zip.js": "^2.7.62",
|
||||
"@zip.js/zip.js": "^2.7.64",
|
||||
"cac": "^6.7.14",
|
||||
"p-queue": "^8.1.0",
|
||||
"schemastery": "^3.16.1",
|
||||
"semver": "^7.7.2",
|
||||
"shell-quote": "^1.8.3",
|
||||
"superagent": "^10.2.1",
|
||||
"superagent": "^10.2.2",
|
||||
"ws": "^8.18.3"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
"@hydrooj/common": "workspace:^",
|
||||
"@hydrooj/framework": "workspace:^",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@simplewebauthn/server": "13.1.1",
|
||||
"@simplewebauthn/server": "13.1.2",
|
||||
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
||||
"@zip.js/zip.js": "^2.7.62",
|
||||
"@zip.js/zip.js": "^2.7.64",
|
||||
"adm-zip": "0.5.16",
|
||||
"cac": "^6.7.14",
|
||||
"cordis": "4.0.0-beta.5",
|
||||
"csv-stringify": "^6.5.2",
|
||||
"csv-stringify": "^6.6.0",
|
||||
"emoji-regex": "^10.4.0",
|
||||
"emojis-list": "2.1.0",
|
||||
"fs-extra": "^11.3.0",
|
||||
@@ -41,7 +41,7 @@
|
||||
"mongodb": "^6.17.0",
|
||||
"mongodb-uri": "^0.9.7",
|
||||
"nanoid": "^5.1.5",
|
||||
"nodemailer": "^7.0.4",
|
||||
"nodemailer": "^7.0.5",
|
||||
"notp": "^2.0.3",
|
||||
"p-queue": "^8.1.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
@@ -49,7 +49,7 @@
|
||||
"schemastery": "^3.16.1",
|
||||
"semver": "^7.7.2",
|
||||
"shorty.js": "^1.0.1",
|
||||
"superagent": "^10.2.1",
|
||||
"superagent": "^10.2.2",
|
||||
"tar": "6.2.1",
|
||||
"thirty-two": "^1.0.2",
|
||||
"ua-parser-js": "^2.0.4"
|
||||
@@ -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.19",
|
||||
"@types/lodash": "^4.17.20",
|
||||
"@types/mime-types": "^3.0.1",
|
||||
"@types/mongodb-uri": "^0.9.4",
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
|
||||
@@ -194,27 +194,28 @@ export class ProblemMainHandler extends Handler {
|
||||
async postCopy(domainId: string, pids: number[], target: string, hidden?: boolean) {
|
||||
let t = `,${this.domain.share || ''},`;
|
||||
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(this.domain._id, target);
|
||||
let ddoc = await domain.get(target);
|
||||
const ddoc = await domain.get(target);
|
||||
if (!ddoc) throw new NotFoundError(target);
|
||||
const dudoc = await user.getById(target, this.user._id);
|
||||
if (!dudoc.hasPerm(PERM.PERM_CREATE_PROBLEM)) throw new PermissionError(PERM.PERM_CREATE_PROBLEM);
|
||||
// Check if user can access all those problems
|
||||
const pdict = await problem.getList(
|
||||
domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id,
|
||||
true, ['docId'], true,
|
||||
true, ['domainId', 'docId', 'reference'], true,
|
||||
);
|
||||
const ids = [];
|
||||
for (const pid of pids) {
|
||||
let pdoc = pdict[pid];
|
||||
if (pdoc.reference) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
[pdoc, ddoc] = await Promise.all([
|
||||
const [sourcePdoc, sourceDdoc] = await Promise.all([
|
||||
problem.get(pdoc.reference.domainId, pdoc.reference.pid),
|
||||
domain.get(pdoc.reference.domainId),
|
||||
]);
|
||||
if (!pdoc) throw new ProblemNotFoundError(pdoc.reference.domainId, pdoc.reference.pid);
|
||||
t = `,${ddoc.share || ''},`;
|
||||
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(ddoc._id, target);
|
||||
if (!sourcePdoc) throw new ProblemNotFoundError(pdoc.reference.domainId, pdoc.reference.pid);
|
||||
else pdoc = sourcePdoc;
|
||||
t = `,${sourceDdoc.share || ''},`;
|
||||
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(sourceDdoc._id, target);
|
||||
}
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
ids.push(await problem.copy(pdoc.domainId, pdoc.docId, target, undefined, hidden));
|
||||
@@ -317,7 +318,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
if (this.pdoc.config.langs) t.push(this.pdoc.config.langs);
|
||||
if (ddoc.langs) t.push(ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||
if (this.domain.langs) t.push(this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i));
|
||||
if (this.tdoc?.langs) t.push(this.tdoc.langs);
|
||||
if (this.tdoc?.langs?.length) t.push(this.tdoc.langs);
|
||||
if (this.pdoc.config.type === 'remote_judge') {
|
||||
const p = this.pdoc.config.subType;
|
||||
const dl = Object.keys(setting.langs).filter((i) => i.startsWith(`${p}.`) || setting.langs[i].validAs[p]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"mariadb": "^3.4.2",
|
||||
"mariadb": "^3.4.4",
|
||||
"mongodb": "^6.17.0",
|
||||
"turndown": "^7.2.0",
|
||||
"xml2js": "^0.6.2"
|
||||
|
||||
@@ -4,7 +4,7 @@ import mongodb, { Db, FindCursor } from 'mongodb';
|
||||
import {
|
||||
db as dst,
|
||||
DiscussionModel, DiscussionTailReplyDoc, DocumentModel,
|
||||
MessageDoc, RecordDoc, TestCase, TrainingNode,
|
||||
RecordDoc, TestCase, TrainingNode,
|
||||
} from 'hydrooj';
|
||||
|
||||
const map = {};
|
||||
@@ -359,15 +359,14 @@ async function message(src: Db, report: Function) {
|
||||
.toArray();
|
||||
for (const doc of docs) {
|
||||
for (const msg of doc.reply) {
|
||||
const mdoc: MessageDoc = {
|
||||
await dst.collection('message').insertOne({
|
||||
_id: objid(msg.at),
|
||||
from: msg.sender_uid,
|
||||
to: msg.sender_uid === doc.sender_uid ? doc.sendee_uid : doc.sender_uid,
|
||||
content: msg.content,
|
||||
// Mark all as read
|
||||
flag: 0,
|
||||
};
|
||||
await dst.collection('message').insertOne(mdoc);
|
||||
});
|
||||
}
|
||||
}
|
||||
await report({ progress: Math.round(100 * ((i + 1) / (total + 1))) });
|
||||
|
||||
@@ -126,8 +126,6 @@ export async function prompt<T extends string>(title: string, fields: Record<T,
|
||||
const defaultValues = Object.fromEntries(Object.entries(fields)
|
||||
.map(([name, field]: [T, Field]) => [name, field.default || ''])) as Record<T, string | number | boolean>;
|
||||
|
||||
console.log(valueCache, defaultValues);
|
||||
|
||||
const Component = () => {
|
||||
const [values, setValues] = React.useState(defaultValues);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ async function handlerSwitchAccount(ev) {
|
||||
const target = await selectUser('Hint::icon::switch_account');
|
||||
if (!target) return;
|
||||
try {
|
||||
const res = await request.get(`/account/${target._id}`);
|
||||
const res = await request.get(`/account/${target}`);
|
||||
if (res.url) window.location.href = res.url;
|
||||
else window.location.reload();
|
||||
} catch (error) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"cli": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "^6.0.0",
|
||||
"@blueprintjs/core": "^6.1.0",
|
||||
"@fontsource/dm-mono": "^5.2.6",
|
||||
"@fontsource/fira-code": "^5.2.6",
|
||||
"@fontsource/inconsolata": "^5.2.6",
|
||||
@@ -21,9 +21,9 @@
|
||||
"@fontsource/source-code-pro": "^5.2.6",
|
||||
"@fontsource/ubuntu-mono": "^5.2.6",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@sentry/browser": "^9.33.0",
|
||||
"@sentry/webpack-plugin": "^3.5.0",
|
||||
"@simplewebauthn/browser": "13.1.0",
|
||||
"@sentry/browser": "^9.40.0",
|
||||
"@sentry/webpack-plugin": "^4.0.0",
|
||||
"@simplewebauthn/browser": "13.1.2",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@types/html-to-text": "^9.0.4",
|
||||
"@types/jquery": "^3.5.32",
|
||||
@@ -39,19 +39,19 @@
|
||||
"@types/redux-logger": "^3.0.13",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@types/webpack-env": "^1.18.8",
|
||||
"@vscode/codicons": "^0.0.36",
|
||||
"@vscode/codicons": "^0.0.38",
|
||||
"ajv": "^8.17.1",
|
||||
"allotment": "^1.20.4",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"browser-update": "^3.3.55",
|
||||
"browser-update": "^3.3.60",
|
||||
"chalk": "^5.4.1",
|
||||
"classnames": "^2.5.1",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"clipboard": "^2.0.11",
|
||||
"copy-webpack-plugin": "^13.0.0",
|
||||
"cordis": "4.0.0-beta.5",
|
||||
"core-js": "^3.43.0",
|
||||
"core-js-compat": "^3.43.0",
|
||||
"core-js": "^3.44.0",
|
||||
"core-js-compat": "^3.44.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"diff": "^8.0.2",
|
||||
"diff-dom": "^5.2.0",
|
||||
@@ -66,7 +66,7 @@
|
||||
"jquery.easing": "^1.4.1",
|
||||
"jquery.transit": "^0.9.12",
|
||||
"matchmedia-polyfill": "^0.3.2",
|
||||
"md-editor-rt": "^5.7.1",
|
||||
"md-editor-rt": "^5.8.2",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
"moment": "^2.30.1",
|
||||
"monaco-editor": "0.52.2",
|
||||
@@ -114,7 +114,7 @@
|
||||
"timeago.js": "^4.0.2",
|
||||
"ts-loader": "^9.5.2",
|
||||
"web-streams-polyfill": "^4.1.0",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack": "^5.100.2",
|
||||
"webpack-bundle-analyzer": "^4.10.2",
|
||||
"webpack-dev-server": "^5.2.2",
|
||||
"webpack-manifest-plugin": "^5.0.1",
|
||||
@@ -140,7 +140,7 @@
|
||||
"markdown-it-merge-cells": "^2.0.0",
|
||||
"markdown-it-table-of-contents": "^0.9.0",
|
||||
"nunjucks": "^3.2.4",
|
||||
"schemastery-jsonschema": "^1.1.0",
|
||||
"schemastery-jsonschema": "^1.1.1",
|
||||
"streamsaver": "^2.0.6",
|
||||
"uuid": "^11.1.0",
|
||||
"xss": "^1.0.15"
|
||||
|
||||
@@ -28,9 +28,9 @@ const page = new NamedPage([
|
||||
autofocus: true,
|
||||
},
|
||||
});
|
||||
if (!res) return;
|
||||
if (!res?.target) return;
|
||||
try {
|
||||
const { url } = await request.post('..', {
|
||||
const { url } = await request.post('.', {
|
||||
operation: 'copy',
|
||||
pids: [UiContext.pdoc.docId],
|
||||
target: res.target,
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vitejs/plugin-react": "^4.6.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.23",
|
||||
"@types/react-dom": "^18.3.7",
|
||||
"@vitejs/plugin-react-swc": "^3.10.2",
|
||||
"vite": "^7.0.0"
|
||||
"@vitejs/plugin-react-swc": "^3.11.0",
|
||||
"vite": "^7.0.5"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user