mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix
This commit is contained in:
1 parent
85b12f245d
commit
d73ab6833e
6 files changed
+13
-13
No files matched your search
+3
-3
@@ -21,7 +21,7 @@
|
|||||||
"@shelf/jest-mongodb": "^1.2.3",
|
"@shelf/jest-mongodb": "^1.2.3",
|
||||||
"@types/cross-spawn": "^6.0.2",
|
"@types/cross-spawn": "^6.0.2",
|
||||||
"@types/jest": "^26.0.20",
|
"@types/jest": "^26.0.20",
|
||||||
"@types/node": "^14.14.21",
|
"@types/node": "^14.14.22",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.9.1",
|
"@typescript-eslint/eslint-plugin": "^3.9.1",
|
||||||
"@typescript-eslint/parser": "^3.9.1",
|
"@typescript-eslint/parser": "^3.9.1",
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
"globby": "^11.0.2",
|
"globby": "^11.0.2",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"latest-version": "^5.1.0",
|
"latest-version": "^5.1.0",
|
||||||
"ora": "^5.2.0",
|
"ora": "^5.3.0",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^26.4.4",
|
||||||
"typescript": "4.1.3"
|
"typescript": "4.1.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.1.0",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "^0.5.1",
|
"adm-zip": "^0.5.1",
|
||||||
"decode-html": "^2.0.0",
|
"decode-html": "^2.0.0",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.1.0",
|
||||||
"xml2js": "^0.4.23"
|
"xml2js": "^0.4.23"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
"adm-zip": "^0.5.1",
|
"adm-zip": "^0.5.1",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"bson": "^4.2.2",
|
"bson": "^4.2.2",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.1.0",
|
||||||
"js-yaml": "^4.0.0",
|
"js-yaml": "^4.0.0",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"p-queue": "^6.6.1",
|
"p-queue": "^6.6.1",
|
||||||
"shell-quote": "^1.7.2",
|
"shell-quote": "^1.7.2",
|
||||||
"systeminformation": "^4.34.7",
|
"systeminformation": "^4.34.9",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.17.4",
|
"version": "2.17.5",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"ansi_up": "^4.0.4",
|
"ansi_up": "^4.0.4",
|
||||||
"cookies": "^0.8.0",
|
"cookies": "^0.8.0",
|
||||||
"detect-browser": "^5.1.1",
|
"detect-browser": "^5.1.1",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.1.0",
|
||||||
"js-yaml": "^4.0.0",
|
"js-yaml": "^4.0.0",
|
||||||
"koa": "^2.13.1",
|
"koa": "^2.13.1",
|
||||||
"koa-body": "^4.2.0",
|
"koa-body": "^4.2.0",
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
"serialize-javascript": "^5.0.1",
|
"serialize-javascript": "^5.0.1",
|
||||||
"sockjs": "^0.3.20",
|
"sockjs": "^0.3.20",
|
||||||
"superagent": "^6.1.0",
|
"superagent": "^6.1.0",
|
||||||
"systeminformation": "^4.34.7",
|
"systeminformation": "^4.34.9",
|
||||||
"terminal-kit": "^1.45.4",
|
"terminal-kit": "^1.45.8",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -147,13 +147,13 @@ export function del(domainId: string, docId: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function addTestdata(domainId: string, pid: number, name: string, f: Readable | Buffer | string) {
|
export async function addTestdata(domainId: string, pid: number, name: string, f: Readable | Buffer | string) {
|
||||||
const [current] = await Promise.all([
|
const [[, fileinfo]] = await Promise.all([
|
||||||
document.getSub(domainId, document.TYPE_PROBLEM, pid, 'data', name),
|
document.getSub(domainId, document.TYPE_PROBLEM, pid, 'data', name),
|
||||||
storage.put(`problem/${domainId}/${pid}/testdata/${name}`, f),
|
storage.put(`problem/${domainId}/${pid}/testdata/${name}`, f),
|
||||||
]);
|
]);
|
||||||
const meta = await storage.getMeta(`problem/${domainId}/${pid}/testdata/${name}`);
|
const meta = await storage.getMeta(`problem/${domainId}/${pid}/testdata/${name}`);
|
||||||
const payload = { name, ...pick(meta, ['size', 'lastModified', 'etag']) };
|
const payload = { name, ...pick(meta, ['size', 'lastModified', 'etag']) };
|
||||||
if (!current) await push(domainId, pid, 'data', { _id: name, ...payload });
|
if (!fileinfo) await push(domainId, pid, 'data', { _id: name, ...payload });
|
||||||
else await document.setSub(domainId, document.TYPE_PROBLEM, pid, 'data', name, payload);
|
else await document.setSub(domainId, document.TYPE_PROBLEM, pid, 'data', name, payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "^0.5.1",
|
"adm-zip": "^0.5.1",
|
||||||
"decode-html": "^2.0.0",
|
"decode-html": "^2.0.0",
|
||||||
"fs-extra": "^9.0.1"
|
"fs-extra": "^9.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bson": "^4.2.2"
|
"bson": "^4.2.2"
|
||||||
|
|||||||
Reference in new issue
Block a user