mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix ci warnings
This commit is contained in:
13 files changed
+30
-22
No files matched your search
@@ -8,9 +8,9 @@
|
|||||||
"@eslint-react/eslint-plugin": "^1.52.3",
|
"@eslint-react/eslint-plugin": "^1.52.3",
|
||||||
"@eslint/compat": "^1.3.1",
|
"@eslint/compat": "^1.3.1",
|
||||||
"@eslint/eslintrc": "^3.3.1",
|
"@eslint/eslintrc": "^3.3.1",
|
||||||
"@stylistic/eslint-plugin": "^5.2.1",
|
"@stylistic/eslint-plugin": "^5.2.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.37.0",
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||||
"@typescript-eslint/parser": "^8.37.0",
|
"@typescript-eslint/parser": "^8.38.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-plugin-de-morgan": "^1.3.0",
|
"eslint-plugin-de-morgan": "^1.3.0",
|
||||||
"eslint-plugin-github": "^6.0.0",
|
"eslint-plugin-github": "^6.0.0",
|
||||||
|
|||||||
+2
-2
@@ -53,11 +53,11 @@
|
|||||||
"mongodb-memory-server": "10.1.4",
|
"mongodb-memory-server": "10.1.4",
|
||||||
"nyc": "^17.1.0",
|
"nyc": "^17.1.0",
|
||||||
"ora": "^8.2.0",
|
"ora": "^8.2.0",
|
||||||
"oxlint": "^1.7.0",
|
"oxlint": "^1.8.0",
|
||||||
"package-json": "^10.0.1",
|
"package-json": "^10.0.1",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.2",
|
||||||
"simple-git": "^3.28.0",
|
"simple-git": "^3.28.0",
|
||||||
"supertest": "^7.1.3",
|
"supertest": "^7.1.4",
|
||||||
"supports-hyperlinks": "^4.1.0",
|
"supports-hyperlinks": "^4.1.0",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"wtfnode": "^0.10.0"
|
"wtfnode": "^0.10.0"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default class ElasticSearchService extends Service {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
let hits = res.hits.hits.map((i) => i._id);
|
let hits = res.hits.hits.map((i) => i._id);
|
||||||
if (!opts.skip) {
|
if (!opts?.skip) {
|
||||||
let pdoc = await ProblemModel.get(domainId, +q || q, ProblemModel.PROJECTION_LIST);
|
let pdoc = await ProblemModel.get(domainId, +q || q, ProblemModel.PROJECTION_LIST);
|
||||||
if (pdoc) {
|
if (pdoc) {
|
||||||
hits = hits.filter((i) => i !== `${pdoc.domainId}/${pdoc.docId}`);
|
hits = hits.filter((i) => i !== `${pdoc.domainId}/${pdoc.docId}`);
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hydrooj/common": "workspace:^",
|
"@hydrooj/common": "workspace:^",
|
||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@zip.js/zip.js": "^2.7.64",
|
"@zip.js/zip.js": "^2.7.68",
|
||||||
"cac": "^6.7.14",
|
"cac": "^6.7.14",
|
||||||
"p-queue": "^8.1.0",
|
"p-queue": "^8.1.0",
|
||||||
"schemastery": "^3.16.1",
|
"schemastery": "^3.16.1",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.2",
|
||||||
"shell-quote": "^1.8.3",
|
"shell-quote": "^1.8.3",
|
||||||
"superagent": "^10.2.2",
|
"superagent": "^10.2.3",
|
||||||
"ws": "^8.18.3"
|
"ws": "^8.18.3"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
|||||||
@@ -127,7 +127,10 @@ export class JudgeTask {
|
|||||||
if (filenames.length) {
|
if (filenames.length) {
|
||||||
logger.info(`Getting problem data: ${this.session?.config.host || 'local'}/${source}`);
|
logger.info(`Getting problem data: ${this.session?.config.host || 'local'}/${source}`);
|
||||||
this.next({ message: 'Syncing testdata, please wait...' });
|
this.next({ message: 'Syncing testdata, please wait...' });
|
||||||
await this.session.fetchFile(source, Object.fromEntries(files.map((i) => [i.name, join(filePath, i.name)])));
|
await this.session.fetchFile(source, Object.fromEntries(
|
||||||
|
files.filter((i) => filenames.includes(i.name))
|
||||||
|
.map((i) => [i.name, join(filePath, i.name)]),
|
||||||
|
));
|
||||||
await fs.writeFile(join(filePath, 'etags'), JSON.stringify(version));
|
await fs.writeFile(join(filePath, 'etags'), JSON.stringify(version));
|
||||||
this.compileCache = {};
|
this.compileCache = {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"@hydrooj/utils": "workspace:^",
|
"@hydrooj/utils": "workspace:^",
|
||||||
"@simplewebauthn/server": "13.1.2",
|
"@simplewebauthn/server": "13.1.2",
|
||||||
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
"@undefined-moe/require-resolve-hook": "^1.1.0",
|
||||||
"@zip.js/zip.js": "^2.7.64",
|
"@zip.js/zip.js": "^2.7.68",
|
||||||
"adm-zip": "0.5.16",
|
"adm-zip": "0.5.16",
|
||||||
"cac": "^6.7.14",
|
"cac": "^6.7.14",
|
||||||
"cordis": "4.0.0-beta.5",
|
"cordis": "4.0.0-beta.5",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"lru-cache": "^11.1.0",
|
"lru-cache": "^11.1.0",
|
||||||
"mime-types": "^3.0.1",
|
"mime-types": "^3.0.1",
|
||||||
"moment-timezone": "^0.6.0",
|
"moment-timezone": "^0.6.0",
|
||||||
"mongodb": "^6.17.0",
|
"mongodb": "^6.18.0",
|
||||||
"mongodb-uri": "^0.9.7",
|
"mongodb-uri": "^0.9.7",
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"nodemailer": "^7.0.5",
|
"nodemailer": "^7.0.5",
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
"schemastery": "^3.16.1",
|
"schemastery": "^3.16.1",
|
||||||
"semver": "^7.7.2",
|
"semver": "^7.7.2",
|
||||||
"shorty.js": "^1.0.1",
|
"shorty.js": "^1.0.1",
|
||||||
"superagent": "^10.2.2",
|
"superagent": "^10.2.3",
|
||||||
"tar": "6.2.1",
|
"tar": "6.2.1",
|
||||||
"thirty-two": "^1.0.2",
|
"thirty-two": "^1.0.2",
|
||||||
"ua-parser-js": "^2.0.4"
|
"ua-parser-js": "^2.0.4"
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export async function apply(ctx: Context) {
|
|||||||
if (overrideLimit) maxOperations = overrideLimit;
|
if (overrideLimit) maxOperations = overrideLimit;
|
||||||
// deprecated: remove boolean support in future
|
// deprecated: remove boolean support in future
|
||||||
if (typeof defaultKey === 'boolean') defaultKey = defaultKey ? '{{user}}' : '{{ip}}';
|
if (typeof defaultKey === 'boolean') defaultKey = defaultKey ? '{{user}}' : '{{ip}}';
|
||||||
const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user._id);
|
const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user?._id?.toString() || '0');
|
||||||
await opcount.inc(op, id, periodSecs, maxOperations);
|
await opcount.inc(op, id, periodSecs, maxOperations);
|
||||||
},
|
},
|
||||||
renderTitle(str: string) {
|
renderTitle(str: string) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mariadb": "^3.4.4",
|
"mariadb": "^3.4.5",
|
||||||
"mongodb": "^6.17.0",
|
"mongodb": "^6.18.0",
|
||||||
"turndown": "^7.2.0",
|
"turndown": "^7.2.0",
|
||||||
"xml2js": "^0.6.2"
|
"xml2js": "^0.6.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import ReactDOM from 'react-dom/client';
|
|||||||
import { AutoloadPage } from 'vj/misc/Page';
|
import { AutoloadPage } from 'vj/misc/Page';
|
||||||
import { request } from 'vj/utils';
|
import { request } from 'vj/utils';
|
||||||
|
|
||||||
function renderReactions(reactions, self, rootEle) {
|
function renderReactions(reactions = {}, self = {}, rootEle) {
|
||||||
let html = '';
|
let html = '';
|
||||||
for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) {
|
for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) {
|
||||||
if (!v) continue;
|
if (!v) continue;
|
||||||
|
|||||||
@@ -50,12 +50,17 @@ export default new AutoloadPage('omnibar', () => {
|
|||||||
href={`${base}/p/${pid || docId}`}
|
href={`${base}/p/${pid || docId}`}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<a
|
<p
|
||||||
href={psdict[`${domainId}#${docId}`]?.rid && `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`}
|
onClick={(ev) => {
|
||||||
|
if (psdict[`${domainId}#${docId}`]?.rid) {
|
||||||
|
window.location.href = `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`;
|
||||||
|
}
|
||||||
|
ev.preventDefault();
|
||||||
|
}}
|
||||||
className={`record-status--text ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}
|
className={`record-status--text ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}
|
||||||
>
|
>
|
||||||
<span className={`icon record-status--icon ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}></span>
|
<span className={`icon record-status--icon ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}></span>
|
||||||
</a>
|
</p>
|
||||||
<div>{title}</div>
|
<div>{title}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"monaco-editor": "0.52.2",
|
"monaco-editor": "0.52.2",
|
||||||
"monaco-editor-nls": "^3.1.0",
|
"monaco-editor-nls": "^3.1.0",
|
||||||
"monaco-editor-webpack-plugin": "^7.1.0",
|
"monaco-editor-webpack-plugin": "^7.1.0",
|
||||||
"monaco-themes": "^0.4.5",
|
"monaco-themes": "^0.4.6",
|
||||||
"monaco-yaml": "5.1.1",
|
"monaco-yaml": "5.1.1",
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const page = new NamedPage(['contest_edit', 'contest_create', 'homework_create',
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const message = `Confirm deleting this ${pagename.split('_')[0]}? Its files and status will be deleted as well.`;
|
const message = `Confirm deleting this ${pagename.split('_')[0]}? Its files and status will be deleted as well.`;
|
||||||
confirm(i18n(message)).then((yes) => {
|
return confirm(i18n(message)).then((yes) => {
|
||||||
if (yes) {
|
if (yes) {
|
||||||
confirmed = true;
|
confirmed = true;
|
||||||
ev.target.click();
|
ev.target.click();
|
||||||
|
|||||||
@@ -16,6 +16,6 @@
|
|||||||
"@types/react": "^18.3.23",
|
"@types/react": "^18.3.23",
|
||||||
"@types/react-dom": "^18.3.7",
|
"@types/react-dom": "^18.3.7",
|
||||||
"@vitejs/plugin-react-swc": "^3.11.0",
|
"@vitejs/plugin-react-swc": "^3.11.0",
|
||||||
"vite": "^7.0.5"
|
"vite": "^7.0.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user