diff --git a/install/install.js b/install/install.js
index 5373ee5e7..2c1e6d48d 100644
--- a/install/install.js
+++ b/install/install.js
@@ -86,6 +86,8 @@ log.info('install.start');
const MINIO_ACCESS_KEY = randomstring(32);
const MINIO_SECRET_KEY = randomstring(32);
let DATABASE_PASSWORD = randomstring(32);
+// TODO read from args
+const CN = true;
const nixBin = `${__env.HOME}/.nix-profile/bin`;
const mount = `\
@@ -162,7 +164,14 @@ To disable this feature, checkout our sourcecode.`);
init: 'install.mongodb',
skip: () => !exec('mongod --version').code,
operations: [
- `nix-env -iA hydro.mongodb${avx2 ? 5 : 4} hydro.mongosh${avx2 ? 5 : 4}`,
+ `nix-env -iA hydro.mongodb${avx2 ? 5 : 4}${CN ? '-cn' : ''}`,
+ ],
+ },
+ {
+ init: 'install.mongo',
+ skip: () => !exec('mongo --version').code,
+ operations: [
+ `nix-env -iA hydro.mongosh${avx2 ? 5 : 4}${CN ? '-cn' : ''}`,
],
},
{
@@ -231,6 +240,7 @@ To disable this feature, checkout our sourcecode.`);
{
init: 'install.starting',
operations: [
+ 'pm2 stop all',
() => fs.writefile(`${__env.HOME}/.hydro/mount.yaml`, mount),
`echo "MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}\nMINIO_SECRET_KEY=${MINIO_SECRET_KEY}" >/root/.hydro/env`,
`pm2 start "MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY} MINIO_SECRET_KEY=${MINIO_SECRET_KEY} minio server /data/file" --name minio`,
diff --git a/package.json b/package.json
index dcefba9f9..37ef45433 100644
--- a/package.json
+++ b/package.json
@@ -33,23 +33,23 @@
"@types/autocannon": "^7.6.1",
"@types/cross-spawn": "^6.0.2",
"@types/mocha": "^9.1.1",
- "@types/node": "^18.6.5",
- "@types/semver": "^7.3.10",
+ "@types/node": "^18.7.3",
+ "@types/semver": "^7.3.12",
"@types/supertest": "^2.0.12",
- "@typescript-eslint/eslint-plugin": "^5.29.0",
- "@typescript-eslint/parser": "^5.29.0",
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
+ "@typescript-eslint/parser": "^5.33.0",
"autocannon": "^7.9.0",
"cac": "^6.7.12",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
- "esbuild": "0.14.3",
- "eslint": "^8.18.0",
+ "esbuild": "0.15.2",
+ "eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-import-resolver-typescript": "^3.1.0",
+ "eslint-import-resolver-typescript": "^3.4.1",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "2.26.0",
- "eslint-plugin-jsx-a11y": "^6.6.0",
+ "eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-simple-import-sort": "7.0.0",
"fs-extra": "^10.1.0",
@@ -62,9 +62,6 @@
"semver": "^7.3.7",
"supertest": "^6.2.4",
"typedoc": "^0.23.10",
- "typescript": "4.6.4"
- },
- "resolutions": {
- "esbuild": "0.14.3"
+ "typescript": "4.7.4"
}
}
diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json
index c3e5cb752..484ecd0fe 100644
--- a/packages/hydrooj/package.json
+++ b/packages/hydrooj/package.json
@@ -39,7 +39,7 @@
"moment-timezone": "^0.5.34",
"mongodb": "^3.7.3",
"nanoid": "^4.0.0",
- "nodemailer": "^6.7.7",
+ "nodemailer": "^6.7.8",
"notp": "^2.0.3",
"p-queue": "^7.3.0",
"path-to-regexp": "^6.2.1",
@@ -66,7 +66,7 @@
"@types/mongodb": "^3.6.20",
"@types/nodemailer": "^6.4.5",
"@types/notp": "^2.0.2",
- "@types/semver": "^7.3.10",
+ "@types/semver": "^7.3.12",
"@types/serialize-javascript": "^5.0.2",
"@types/superagent": "^4.1.15",
"moment": "^2.29.4",
diff --git a/packages/hydrooj/src/entry/setup.ts b/packages/hydrooj/src/entry/setup.ts
index 3039d07e1..e8f052933 100644
--- a/packages/hydrooj/src/entry/setup.ts
+++ b/packages/hydrooj/src/entry/setup.ts
@@ -21,7 +21,7 @@ async function get(ctx: Context) {
-
+
Setup
diff --git a/packages/hydrooj/src/model/document.ts b/packages/hydrooj/src/model/document.ts
index e8623e3ef..98d314ab8 100644
--- a/packages/hydrooj/src/model/document.ts
+++ b/packages/hydrooj/src/model/document.ts
@@ -233,7 +233,7 @@ export async function getSub>(
+export async function setSub>(
domainId: string, docType: T, docId: DocType[T]['docId'],
key: K, subId: DocType[T][K][0]['_id'], args: Partial,
): Promise {
@@ -367,7 +367,7 @@ export async function incStatus(
export async function revPushStatus(
domainId: string, docType: T, docId: DocStatusType[T]['docId'], uid: number,
- key: ArrayKeys, value: any, id = '_id',
+ key: string & ArrayKeys, value: any, id = '_id',
): Promise {
let res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid, [`${key}.${id}`]: value[id] },
diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json
index dba03fa51..069187916 100644
--- a/packages/ui-default/package.json
+++ b/packages/ui-default/package.json
@@ -10,15 +10,15 @@
"lint": "eslint"
},
"devDependencies": {
- "@blueprintjs/core": "^4.7.0",
- "@fontsource/dm-mono": "^4.5.8",
- "@fontsource/fira-code": "^4.5.10",
- "@fontsource/inconsolata": "^4.5.6",
- "@fontsource/jetbrains-mono": "^4.5.9",
- "@fontsource/pt-mono": "^4.5.9",
- "@fontsource/roboto-mono": "^4.5.7",
- "@fontsource/source-code-pro": "^4.5.10",
- "@fontsource/ubuntu-mono": "^4.5.10",
+ "@blueprintjs/core": "^4.8.0",
+ "@fontsource/dm-mono": "^4.5.9",
+ "@fontsource/fira-code": "^4.5.11",
+ "@fontsource/inconsolata": "^4.5.7",
+ "@fontsource/jetbrains-mono": "^4.5.10",
+ "@fontsource/pt-mono": "^4.5.10",
+ "@fontsource/roboto-mono": "^4.5.8",
+ "@fontsource/source-code-pro": "^4.5.11",
+ "@fontsource/ubuntu-mono": "^4.5.11",
"@hydrooj/utils": "workspace:*",
"@svgr/webpack": "^6.3.1",
"@types/gulp-if": "^0.0.34",
@@ -94,7 +94,7 @@
"speed-measure-webpack-plugin": "^1.5.0",
"sticky-kit": "^1.1.3",
"style-loader": "^3.3.1",
- "stylus": "^0.58.1",
+ "stylus": "^0.59.0",
"stylus-loader": "^7.0.0",
"tether": "1.4.7",
"tether-drop": "^1.4.2",
@@ -107,12 +107,12 @@
"web-streams-polyfill": "^3.2.1",
"webpack": "^5.74.0",
"webpack-bundle-analyzer": "^4.5.0",
- "webpack-dev-server": "^4.9.3",
+ "webpack-dev-server": "^4.10.0",
"webpackbar": "^5.0.2"
},
"dependencies": {
"ansi_up": "^5.1.0",
- "esbuild": "0.14.3",
+ "esbuild": "0.15.2",
"fs-extra": "^10.1.0",
"js-yaml": "^4.1.0",
"jsesc": "^3.0.2",
diff --git a/packages/utils/package.json b/packages/utils/package.json
index ef0f75608..b0d8b85b0 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -9,13 +9,13 @@
"preferUnplugged": true,
"dependencies": {
"cac": "^6.7.12",
- "esbuild": "0.14.3",
+ "esbuild": "0.15.2",
"fs-extra": "^10.1.0",
"js-yaml": "^4.1.0",
"moment-timezone": "^0.5.34",
"mongodb": "^3.7.3",
"source-map-support": "^0.5.21",
- "systeminformation": "^5.12.3"
+ "systeminformation": "^5.12.5"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
diff --git a/packages/vjudge/package.json b/packages/vjudge/package.json
index b1c683fe2..884585bc7 100644
--- a/packages/vjudge/package.json
+++ b/packages/vjudge/package.json
@@ -10,9 +10,9 @@
"dependencies": {
"@hydrooj/utils": "workspace:*",
"chrome-finder": "^1.0.7",
- "jsdom": "^19.0.0",
+ "jsdom": "^20.0.0",
"lodash": "^4.17.21",
- "puppeteer-core": "^15.3.2",
+ "puppeteer-core": "^15.5.0",
"puppeteer-extra": "3.3.0",
"puppeteer-extra-plugin-portal": "3.1.0",
"puppeteer-extra-plugin-stealth": "2.10.1",
@@ -20,7 +20,7 @@
"superagent-proxy": "^3.0.0"
},
"devDependencies": {
- "@types/jsdom": "^16.2.15",
+ "@types/jsdom": "^20.0.0",
"@types/lodash": "^4.14.182",
"@types/superagent": "^4.1.15",
"@types/superagent-proxy": "^3.0.0"