mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes
This commit is contained in:
13 files changed
+27
-25
No files matched your search
@@ -5,10 +5,10 @@
|
|||||||
"main": "base.mjs",
|
"main": "base.mjs",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro",
|
"repository": "https://github.com/hydro-dev/Hydro",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config": "^6.4.2",
|
"@antfu/eslint-config": "^6.6.1",
|
||||||
"@eslint-react/eslint-plugin": "^2.3.12",
|
"@eslint-react/eslint-plugin": "^2.3.13",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
||||||
"@typescript-eslint/parser": "^8.48.1",
|
"@typescript-eslint/parser": "^8.49.0",
|
||||||
"eslint-plugin-de-morgan": "^2.0.0",
|
"eslint-plugin-de-morgan": "^2.0.0",
|
||||||
"eslint-plugin-github": "^6.0.0",
|
"eslint-plugin-github": "^6.0.0",
|
||||||
"eslint-plugin-react-hooks": "^7.0.1",
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@koa/router": "^14.0.0",
|
"@koa/router": "^14.0.0",
|
||||||
"@mongodb-js/saslprep": "^1.3.2",
|
"@mongodb-js/saslprep": "^1.4.0",
|
||||||
"emoji-regex": "^10.6.0",
|
"emoji-regex": "^10.6.0",
|
||||||
"fs-extra": "^11.3.2",
|
"fs-extra": "^11.3.2",
|
||||||
"koa": "^3.1.1",
|
"koa": "^3.1.1",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"js-yaml": "^4.1.1",
|
"js-yaml": "^4.1.1",
|
||||||
"reggol": "^2.1.0",
|
"reggol": "^2.1.0",
|
||||||
"search-query-parser": "^1.6.0",
|
"search-query-parser": "^1.6.0",
|
||||||
"systeminformation": "^5.27.11"
|
"systeminformation": "^5.27.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/fs-extra": "^11.0.4"
|
"@types/fs-extra": "^11.0.4"
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@
|
|||||||
"mongodb-memory-server": "10.3.0",
|
"mongodb-memory-server": "10.3.0",
|
||||||
"nyc": "^17.1.0",
|
"nyc": "^17.1.0",
|
||||||
"ora": "^9.0.0",
|
"ora": "^9.0.0",
|
||||||
"oxlint": "^1.31.0",
|
"oxlint": "^1.32.0",
|
||||||
"package-json": "^10.0.1",
|
"package-json": "^10.0.1",
|
||||||
"semver": "^7.7.3",
|
"semver": "^7.7.3",
|
||||||
"simple-git": "^3.30.0",
|
"simple-git": "^3.30.0",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@types/diff": "^8.0.0",
|
"@types/diff": "^8.0.0",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/lodash": "^4.17.21",
|
"@types/lodash": "^4.17.21",
|
||||||
"sass": "^1.94.2"
|
"sass": "^1.95.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"@hydrooj/common": "workspace:^",
|
"@hydrooj/common": "workspace:^",
|
||||||
"@hydrooj/framework": "workspace:^",
|
"@hydrooj/framework": "workspace:^",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@mongodb-js/saslprep": "^1.3.2",
|
"@mongodb-js/saslprep": "^1.4.0",
|
||||||
"@simplewebauthn/server": "13.2.2",
|
"@simplewebauthn/server": "13.2.2",
|
||||||
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
||||||
"@zip.js/zip.js": "^2.8.11",
|
"@zip.js/zip.js": "^2.8.11",
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ export class ContestEditHandler extends Handler {
|
|||||||
@param('duration', Types.Float)
|
@param('duration', Types.Float)
|
||||||
@param('title', Types.Title)
|
@param('title', Types.Title)
|
||||||
@param('content', Types.Content)
|
@param('content', Types.Content)
|
||||||
@param('rule', Types.Range(Object.keys(contest.RULES).filter((i) => !contest.RULES[i].hidden)))
|
@param('rule', Types.String)
|
||||||
@param('pids', Types.Content)
|
@param('pids', Types.Content)
|
||||||
@param('rated', Types.Boolean)
|
@param('rated', Types.Boolean)
|
||||||
@param('code', Types.String, true)
|
@param('code', Types.String, true)
|
||||||
@@ -405,6 +405,7 @@ export class ContestEditHandler extends Handler {
|
|||||||
_code = '', autoHide = false, assign: string[] = [], lock: number = null,
|
_code = '', autoHide = false, assign: string[] = [], lock: number = null,
|
||||||
contestDuration: number = null, maintainer: number[] = [], allowViewCode = false, allowPrint = false, langs: string[] = [],
|
contestDuration: number = null, maintainer: number[] = [], allowViewCode = false, allowPrint = false, langs: string[] = [],
|
||||||
) {
|
) {
|
||||||
|
if (!Object.keys(contest.RULES).includes(rule) || contest.RULES[rule].hidden) throw new ValidationError('rule');
|
||||||
if (autoHide) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
|
if (autoHide) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
|
||||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
||||||
const beginAtMoment = moment.tz(`${beginAtDate} ${beginAtTime}`, this.user.timeZone);
|
const beginAtMoment = moment.tz(`${beginAtDate} ${beginAtTime}`, this.user.timeZone);
|
||||||
|
|||||||
@@ -165,13 +165,13 @@ export async function run({
|
|||||||
current ||= await UserModel.getByUname(domainId, udoc.username);
|
current ||= await UserModel.getByUname(domainId, udoc.username);
|
||||||
if (current) {
|
if (current) {
|
||||||
report({ message: `duplicate user with email ${udoc.email}: ${current.uname},${udoc.username}` });
|
report({ message: `duplicate user with email ${udoc.email}: ${current.uname},${udoc.username}` });
|
||||||
uidMap[udoc.username] = current._id;
|
uidMap[udoc.id] = current._id;
|
||||||
} else {
|
} else {
|
||||||
const uid = await UserModel.create(
|
const uid = await UserModel.create(
|
||||||
udoc.email || `${udoc.username}@jnoj.local`, udoc.username, '',
|
udoc.email || `${udoc.username}@jnoj.local`, udoc.username, '',
|
||||||
null, '127.0.0.1', udoc.status === 10 ? SystemModel.get('default.priv') : 0,
|
null, '127.0.0.1', udoc.status === 10 ? SystemModel.get('default.priv') : 0,
|
||||||
);
|
);
|
||||||
uidMap[udoc.username] = uid;
|
uidMap[udoc.id] = uid;
|
||||||
await UserModel.setById(uid, {
|
await UserModel.setById(uid, {
|
||||||
loginat: udoc.updated_at,
|
loginat: udoc.updated_at,
|
||||||
regat: udoc.created_at,
|
regat: udoc.created_at,
|
||||||
@@ -445,6 +445,7 @@ memory: ${pdoc.memory_limit}m
|
|||||||
: ddoc.entity_id === 'problem' ? pidMap[ddoc.entity_id] : new ObjectId(tidMap[ddoc.entity_id]);
|
: ddoc.entity_id === 'problem' ? pidMap[ddoc.entity_id] : new ObjectId(tidMap[ddoc.entity_id]);
|
||||||
if (!parentId) continue;
|
if (!parentId) continue;
|
||||||
const payload = {
|
const payload = {
|
||||||
|
_id,
|
||||||
domainId,
|
domainId,
|
||||||
content: ddoc.content,
|
content: ddoc.content,
|
||||||
owner: uidMap[ddoc.created_by] || 1,
|
owner: uidMap[ddoc.created_by] || 1,
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
"postinstall": "node -r @hydrooj/register install.ts"
|
"postinstall": "node -r @hydrooj/register install.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xcpcio/board-app": "^0.76.1"
|
"@xcpcio/board-app": "^0.76.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@xcpcio/types": "^0.76.1"
|
"@xcpcio/types": "^0.76.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
"@fontsource/source-code-pro": "^5.2.7",
|
"@fontsource/source-code-pro": "^5.2.7",
|
||||||
"@fontsource/ubuntu-mono": "^5.2.8",
|
"@fontsource/ubuntu-mono": "^5.2.8",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@mantine/core": "^8.3.9",
|
"@mantine/core": "^8.3.10",
|
||||||
"@mantine/hooks": "^8.3.9",
|
"@mantine/hooks": "^8.3.10",
|
||||||
"@mantine/notifications": "^8.3.9",
|
"@mantine/notifications": "^8.3.10",
|
||||||
"@sentry/browser": "^10.29.0",
|
"@sentry/browser": "^10.29.0",
|
||||||
"@sentry/webpack-plugin": "^4.6.1",
|
"@sentry/webpack-plugin": "^4.6.1",
|
||||||
"@simplewebauthn/browser": "13.2.2",
|
"@simplewebauthn/browser": "13.2.2",
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"jquery.transit": "^0.9.12",
|
"jquery.transit": "^0.9.12",
|
||||||
"mantine-contextmenu": "^8.3.11",
|
"mantine-contextmenu": "^8.3.11",
|
||||||
"matchmedia-polyfill": "^0.3.2",
|
"matchmedia-polyfill": "^0.3.2",
|
||||||
"md-editor-rt": "^6.2.0",
|
"md-editor-rt": "^6.2.1",
|
||||||
"mini-css-extract-plugin": "^2.9.4",
|
"mini-css-extract-plugin": "^2.9.4",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"monaco-editor": "0.52.2",
|
"monaco-editor": "0.52.2",
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
"redux-promise-middleware": "^6.2.0",
|
"redux-promise-middleware": "^6.2.0",
|
||||||
"redux-thunk": "^3.1.0",
|
"redux-thunk": "^3.1.0",
|
||||||
"rupture": "^0.7.1",
|
"rupture": "^0.7.1",
|
||||||
"sass": "^1.94.2",
|
"sass": "^1.95.1",
|
||||||
"sass-loader": "^16.0.6",
|
"sass-loader": "^16.0.6",
|
||||||
"schemastery": "^3.17.2",
|
"schemastery": "^3.17.2",
|
||||||
"shorty.js": "^1.0.1",
|
"shorty.js": "^1.0.1",
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
"html-to-text": "^9.0.5",
|
"html-to-text": "^9.0.5",
|
||||||
"js-yaml": "^4.1.1",
|
"js-yaml": "^4.1.1",
|
||||||
"jsesc": "^3.1.0",
|
"jsesc": "^3.1.0",
|
||||||
"katex": "^0.16.25",
|
"katex": "^0.16.27",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"markdown-it": "^14.1.0",
|
"markdown-it": "^14.1.0",
|
||||||
"markdown-it-anchor": "^9.2.0",
|
"markdown-it-anchor": "^9.2.0",
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
<span class="icon icon-{{ items[0].args.icon }}"></span> {{ _(family) }}
|
<span class="icon icon-{{ items[0].args.icon }}"></span> {{ _(family) }}
|
||||||
</div>
|
</div>
|
||||||
<ol class="menu collapsed">
|
<ol class="menu collapsed">
|
||||||
{%- for item in items -%}
|
{%- for item in items -%}{% if item.checker(handler) %}
|
||||||
{{ sidemenu.render_item(null, item.name) }}
|
{{ sidemenu.render_item(null, item.name) }}
|
||||||
{%- endfor -%}
|
{% endif %}{%- endfor -%}
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitejs/plugin-react": "^5.1.1",
|
"@vitejs/plugin-react": "^5.1.2",
|
||||||
"react": "^19.2.1",
|
"react": "^19.2.1",
|
||||||
"react-dom": "^19.2.1"
|
"react-dom": "^19.2.1"
|
||||||
},
|
},
|
||||||
@@ -16,6 +16,6 @@
|
|||||||
"@types/react": "^19.2.7",
|
"@types/react": "^19.2.7",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@vitejs/plugin-react-swc": "^4.2.2",
|
"@vitejs/plugin-react-swc": "^4.2.2",
|
||||||
"vite": "^7.2.6"
|
"vite": "^7.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"jsdom": "^27.2.0",
|
"jsdom": "^27.3.0",
|
||||||
"superagent-charset": "^1.2.0",
|
"superagent-charset": "^1.2.0",
|
||||||
"superagent-proxy": "^3.0.0"
|
"superagent-proxy": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user