mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
upgrade dep
This commit is contained in:
1 parent
96006d88b1
commit
1e0f651dea
8 files changed
+27
-61
No files matched your search
+7
-9
@@ -21,26 +21,24 @@
|
||||
"devDependencies": {
|
||||
"@shelf/jest-mongodb": "^1.2.3",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/jest": "^26.0.21",
|
||||
"@types/node": "^14.14.35",
|
||||
"@types/jest": "^26.0.22",
|
||||
"@types/node": "^14.14.37",
|
||||
"@types/semver": "^7.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
||||
"@typescript-eslint/parser": "^4.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.20.0",
|
||||
"@typescript-eslint/parser": "^4.20.0",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"eslint": "^7.22.0",
|
||||
"eslint": "^7.23.0",
|
||||
"eslint-config-airbnb-typescript": "^12.0.0",
|
||||
"eslint-import-resolver-typescript": "^2.4.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"fs-extra": "^9.1.0",
|
||||
"globby": "^11.0.3",
|
||||
"jest": "^26.6.3",
|
||||
"latest-version": "^5.1.0",
|
||||
"ora": "^5.4.0",
|
||||
"semver": "^7.3.5",
|
||||
"ts-jest": "^26.5.4",
|
||||
"typescript": "4.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^9.1.0",
|
||||
"typescript": "4.2.3",
|
||||
"yargs": "^16.2.0"
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class FpsProblemImportHandler extends Handler {
|
||||
try {
|
||||
const file = await fs.stat(this.request.files.file.path);
|
||||
if (file.size > 64 * 1024 * 1024) throw new FileTooLargeError('64m');
|
||||
const content = fs.readFile(this.request.files.file.path).toString();
|
||||
const content = fs.readFileSync(this.request.files.file.path, 'utf-8');
|
||||
const result = await xml2js.parseStringPromise(content);
|
||||
tasks.push(result);
|
||||
} catch (e) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@hydrooj/fps-importer",
|
||||
"version": "1.1.10",
|
||||
"version": "1.1.11",
|
||||
"description": "Import FPS problems",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.4",
|
||||
"adm-zip": "^0.5.5",
|
||||
"decode-html": "^2.0.0",
|
||||
"fs-extra": "^9.1.0",
|
||||
"xml2js": "^0.4.23"
|
||||
@@ -18,9 +18,5 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.20.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "eslint . --ext ts --fix"
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.4",
|
||||
"adm-zip": "^0.5.5",
|
||||
"axios": "^0.21.1",
|
||||
"bson": "^4.2.3",
|
||||
"fs-extra": "^9.1.0",
|
||||
@@ -17,22 +17,15 @@
|
||||
"lodash": "^4.17.21",
|
||||
"p-queue": "^6.6.1",
|
||||
"shell-quote": "^1.7.2",
|
||||
"systeminformation": "5.6.8",
|
||||
"systeminformation": "5.6.10",
|
||||
"ws": "^7.4.4",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.15.0"
|
||||
},
|
||||
"license": "AGPL-3.0-only",
|
||||
"devDependencies": {
|
||||
"@types/bson": "^4.0.2",
|
||||
"@types/fs-extra": "^9.0.8",
|
||||
"@types/fs-extra": "^9.0.9",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/shell-quote": "^1.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "eslint . --ext ts --fix"
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.4",
|
||||
"adm-zip": "^0.5.5",
|
||||
"ansi_up": "^5.0.0",
|
||||
"cookies": "^0.8.0",
|
||||
"detect-browser": "^5.1.1",
|
||||
@@ -34,12 +34,12 @@
|
||||
"serialize-javascript": "^5.0.1",
|
||||
"sockjs": "^0.3.20",
|
||||
"superagent": "^6.1.0",
|
||||
"systeminformation": "5.6.8",
|
||||
"systeminformation": "5.6.10",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/adm-zip": "^0.4.33",
|
||||
"@types/fs-extra": "^9.0.8",
|
||||
"@types/fs-extra": "^9.0.9",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/koa": "^2.13.1",
|
||||
@@ -47,16 +47,12 @@
|
||||
"@types/koa-static-cache": "^5.1.0",
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/minio": "^7.0.7",
|
||||
"@types/mongodb": "^3.6.10",
|
||||
"@types/mongodb": "^3.6.11",
|
||||
"@types/nodemailer": "^6.4.1",
|
||||
"@types/serialize-javascript": "^5.0.0",
|
||||
"@types/sockjs": "^0.3.32",
|
||||
"@types/superagent": "^4.1.8",
|
||||
"@types/yargs": "^16.0.0",
|
||||
"@types/yargs": "^16.0.1",
|
||||
"formidable": "^1.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc --watch"
|
||||
}
|
||||
}
|
||||
@@ -198,15 +198,15 @@ class RecordDetailConnectionHandler extends contest.ContestHandlerMixin(Connecti
|
||||
this.onRecordChange(rdoc);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
async onRecordChange(rdoc: Rdoc, $set?: any, $push?: any) {
|
||||
if (rdoc._id.toString() !== this.rid) return;
|
||||
if ($set) this.send({ $set, $push });
|
||||
else {
|
||||
this.send({
|
||||
status_html: await this.renderHTML('record_detail_status.html', { rdoc }),
|
||||
summary_html: await this.renderHTML('record_detail_summary.html', { rdoc }),
|
||||
});
|
||||
}
|
||||
// TODO: frontend doesn't support incremental update
|
||||
// if ($set) this.send({ $set, $push });
|
||||
this.send({
|
||||
status_html: await this.renderHTML('record_detail_status.html', { rdoc }),
|
||||
summary_html: await this.renderHTML('record_detail_summary.html', { rdoc }),
|
||||
});
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
|
||||
@@ -7,18 +7,8 @@
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.4",
|
||||
"adm-zip": "^0.5.5",
|
||||
"decode-html": "^2.0.0",
|
||||
"fs-extra": "^9.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bson": "^4.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.15.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "eslint . --ext ts --fix"
|
||||
}
|
||||
}
|
||||
@@ -5,15 +5,8 @@
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint": "eslint lib.ts script.ts --fix",
|
||||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongodb": "^3.6.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.17.22"
|
||||
"@types/mongodb": "^3.6.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"mongodb": "^3.6.5"
|
||||
|
||||
Reference in new issue
Block a user