This commit is contained in:
undefined committed 2021-01-26 13:41:58 +08:00
1 parent 85b12f245d
commit d73ab6833e
6 files changed
+13 -13

No files matched your search

+3 -3
View File
@@ -21,7 +21,7 @@
"@shelf/jest-mongodb": "^1.2.3",
"@types/cross-spawn": "^6.0.2",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.21",
"@types/node": "^14.14.22",
"@types/semver": "^7.3.4",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
@@ -33,13 +33,13 @@
"globby": "^11.0.2",
"jest": "^26.6.3",
"latest-version": "^5.1.0",
"ora": "^5.2.0",
"ora": "^5.3.0",
"semver": "^7.3.4",
"ts-jest": "^26.4.4",
"typescript": "4.1.3"
},
"dependencies": {
"fs-extra": "^9.0.1",
"fs-extra": "^9.1.0",
"yargs": "^16.2.0"
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
"dependencies": {
"adm-zip": "^0.5.1",
"decode-html": "^2.0.0",
"fs-extra": "^9.0.1",
"fs-extra": "^9.1.0",
"xml2js": "^0.4.23"
},
"devDependencies": {
+2 -2
View File
@@ -9,12 +9,12 @@
"adm-zip": "^0.5.1",
"axios": "^0.21.1",
"bson": "^4.2.2",
"fs-extra": "^9.0.1",
"fs-extra": "^9.1.0",
"js-yaml": "^4.0.0",
"lodash": "^4.17.20",
"p-queue": "^6.6.1",
"shell-quote": "^1.7.2",
"systeminformation": "^4.34.7",
"systeminformation": "^4.34.9",
"yargs": "^16.2.0"
},
"peerDependencies": {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.17.4",
"version": "2.17.5",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
@@ -15,7 +15,7 @@
"ansi_up": "^4.0.4",
"cookies": "^0.8.0",
"detect-browser": "^5.1.1",
"fs-extra": "^9.0.1",
"fs-extra": "^9.1.0",
"js-yaml": "^4.0.0",
"koa": "^2.13.1",
"koa-body": "^4.2.0",
@@ -32,8 +32,8 @@
"serialize-javascript": "^5.0.1",
"sockjs": "^0.3.20",
"superagent": "^6.1.0",
"systeminformation": "^4.34.7",
"terminal-kit": "^1.45.4",
"systeminformation": "^4.34.9",
"terminal-kit": "^1.45.8",
"yargs": "^16.2.0"
},
"devDependencies": {
+2 -2
View File
@@ -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) {
const [current] = await Promise.all([
const [[, fileinfo]] = await Promise.all([
document.getSub(domainId, document.TYPE_PROBLEM, pid, 'data', name),
storage.put(`problem/${domainId}/${pid}/testdata/${name}`, f),
]);
const meta = await storage.getMeta(`problem/${domainId}/${pid}/testdata/${name}`);
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);
}
+1 -1
View File
@@ -9,7 +9,7 @@
"dependencies": {
"adm-zip": "^0.5.1",
"decode-html": "^2.0.0",
"fs-extra": "^9.0.1"
"fs-extra": "^9.1.0"
},
"devDependencies": {
"bson": "^4.2.2"