workspace: upgrade toolchain

This commit is contained in:
undefined committed 2022-08-13 21:19:41 +08:00
1 parent 7df24629dd
commit 267455667f
8 files changed
+42 -35

No files matched your search

+11 -1
View File
@@ -86,6 +86,8 @@ log.info('install.start');
const MINIO_ACCESS_KEY = randomstring(32); const MINIO_ACCESS_KEY = randomstring(32);
const MINIO_SECRET_KEY = randomstring(32); const MINIO_SECRET_KEY = randomstring(32);
let DATABASE_PASSWORD = randomstring(32); let DATABASE_PASSWORD = randomstring(32);
// TODO read from args
const CN = true;
const nixBin = `${__env.HOME}/.nix-profile/bin`; const nixBin = `${__env.HOME}/.nix-profile/bin`;
const mount = `\ const mount = `\
@@ -162,7 +164,14 @@ To disable this feature, checkout our sourcecode.`);
init: 'install.mongodb', init: 'install.mongodb',
skip: () => !exec('mongod --version').code, skip: () => !exec('mongod --version').code,
operations: [ 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', init: 'install.starting',
operations: [ operations: [
'pm2 stop all',
() => fs.writefile(`${__env.HOME}/.hydro/mount.yaml`, mount), () => fs.writefile(`${__env.HOME}/.hydro/mount.yaml`, mount),
`echo "MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}\nMINIO_SECRET_KEY=${MINIO_SECRET_KEY}" >/root/.hydro/env`, `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`, `pm2 start "MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY} MINIO_SECRET_KEY=${MINIO_SECRET_KEY} minio server /data/file" --name minio`,
+9 -12
View File
@@ -33,23 +33,23 @@
"@types/autocannon": "^7.6.1", "@types/autocannon": "^7.6.1",
"@types/cross-spawn": "^6.0.2", "@types/cross-spawn": "^6.0.2",
"@types/mocha": "^9.1.1", "@types/mocha": "^9.1.1",
"@types/node": "^18.6.5", "@types/node": "^18.7.3",
"@types/semver": "^7.3.10", "@types/semver": "^7.3.12",
"@types/supertest": "^2.0.12", "@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.33.0",
"autocannon": "^7.9.0", "autocannon": "^7.9.0",
"cac": "^6.7.12", "cac": "^6.7.12",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
"esbuild": "0.14.3", "esbuild": "0.15.2",
"eslint": "^8.18.0", "eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0", "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-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "2.26.0", "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-react": "^7.30.1",
"eslint-plugin-simple-import-sort": "7.0.0", "eslint-plugin-simple-import-sort": "7.0.0",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
@@ -62,9 +62,6 @@
"semver": "^7.3.7", "semver": "^7.3.7",
"supertest": "^6.2.4", "supertest": "^6.2.4",
"typedoc": "^0.23.10", "typedoc": "^0.23.10",
"typescript": "4.6.4" "typescript": "4.7.4"
},
"resolutions": {
"esbuild": "0.14.3"
} }
} }
+2 -2
View File
@@ -39,7 +39,7 @@
"moment-timezone": "^0.5.34", "moment-timezone": "^0.5.34",
"mongodb": "^3.7.3", "mongodb": "^3.7.3",
"nanoid": "^4.0.0", "nanoid": "^4.0.0",
"nodemailer": "^6.7.7", "nodemailer": "^6.7.8",
"notp": "^2.0.3", "notp": "^2.0.3",
"p-queue": "^7.3.0", "p-queue": "^7.3.0",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.1",
@@ -66,7 +66,7 @@
"@types/mongodb": "^3.6.20", "@types/mongodb": "^3.6.20",
"@types/nodemailer": "^6.4.5", "@types/nodemailer": "^6.4.5",
"@types/notp": "^2.0.2", "@types/notp": "^2.0.2",
"@types/semver": "^7.3.10", "@types/semver": "^7.3.12",
"@types/serialize-javascript": "^5.0.2", "@types/serialize-javascript": "^5.0.2",
"@types/superagent": "^4.1.15", "@types/superagent": "^4.1.15",
"moment": "^2.29.4", "moment": "^2.29.4",
+1 -1
View File
@@ -21,7 +21,7 @@ async function get(ctx: Context) {
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="msapplication-TileColor" content="#579e9a"> <meta name="msapplication-TileColor" content="#579e9a">
<meta name="theme-color" content="#56758f"> <meta name="theme-color" content="#56758f">
<link rel="stylesheet" media="all" href="/vj4.css"> <link rel="stylesheet" media="all" href="/default.theme.css">
<title>Setup</title> <title>Setup</title>
</head> </head>
<body> <body>
+2 -2
View File
@@ -233,7 +233,7 @@ export async function getSub<T extends keyof DocType, K extends ArrayKeys<DocTyp
return [doc, null]; return [doc, null];
} }
export async function setSub<T extends keyof DocType, K extends ArrayKeys<DocType[T]>>( export async function setSub<T extends keyof DocType, K extends string & ArrayKeys<DocType[T]>>(
domainId: string, docType: T, docId: DocType[T]['docId'], domainId: string, docType: T, docId: DocType[T]['docId'],
key: K, subId: DocType[T][K][0]['_id'], args: Partial<DocType[T][K][0]>, key: K, subId: DocType[T][K][0]['_id'], args: Partial<DocType[T][K][0]>,
): Promise<DocType[T]> { ): Promise<DocType[T]> {
@@ -367,7 +367,7 @@ export async function incStatus<T extends keyof DocStatusType>(
export async function revPushStatus<T extends keyof DocStatusType>( export async function revPushStatus<T extends keyof DocStatusType>(
domainId: string, docType: T, docId: DocStatusType[T]['docId'], uid: number, domainId: string, docType: T, docId: DocStatusType[T]['docId'], uid: number,
key: ArrayKeys<DocStatusType[T]>, value: any, id = '_id', key: string & ArrayKeys<DocStatusType[T]>, value: any, id = '_id',
): Promise<DocStatusType[T]> { ): Promise<DocStatusType[T]> {
let res = await collStatus.findOneAndUpdate( let res = await collStatus.findOneAndUpdate(
{ domainId, docType, docId, uid, [`${key}.${id}`]: value[id] }, { domainId, docType, docId, uid, [`${key}.${id}`]: value[id] },
+12 -12
View File
@@ -10,15 +10,15 @@
"lint": "eslint" "lint": "eslint"
}, },
"devDependencies": { "devDependencies": {
"@blueprintjs/core": "^4.7.0", "@blueprintjs/core": "^4.8.0",
"@fontsource/dm-mono": "^4.5.8", "@fontsource/dm-mono": "^4.5.9",
"@fontsource/fira-code": "^4.5.10", "@fontsource/fira-code": "^4.5.11",
"@fontsource/inconsolata": "^4.5.6", "@fontsource/inconsolata": "^4.5.7",
"@fontsource/jetbrains-mono": "^4.5.9", "@fontsource/jetbrains-mono": "^4.5.10",
"@fontsource/pt-mono": "^4.5.9", "@fontsource/pt-mono": "^4.5.10",
"@fontsource/roboto-mono": "^4.5.7", "@fontsource/roboto-mono": "^4.5.8",
"@fontsource/source-code-pro": "^4.5.10", "@fontsource/source-code-pro": "^4.5.11",
"@fontsource/ubuntu-mono": "^4.5.10", "@fontsource/ubuntu-mono": "^4.5.11",
"@hydrooj/utils": "workspace:*", "@hydrooj/utils": "workspace:*",
"@svgr/webpack": "^6.3.1", "@svgr/webpack": "^6.3.1",
"@types/gulp-if": "^0.0.34", "@types/gulp-if": "^0.0.34",
@@ -94,7 +94,7 @@
"speed-measure-webpack-plugin": "^1.5.0", "speed-measure-webpack-plugin": "^1.5.0",
"sticky-kit": "^1.1.3", "sticky-kit": "^1.1.3",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"stylus": "^0.58.1", "stylus": "^0.59.0",
"stylus-loader": "^7.0.0", "stylus-loader": "^7.0.0",
"tether": "1.4.7", "tether": "1.4.7",
"tether-drop": "^1.4.2", "tether-drop": "^1.4.2",
@@ -107,12 +107,12 @@
"web-streams-polyfill": "^3.2.1", "web-streams-polyfill": "^3.2.1",
"webpack": "^5.74.0", "webpack": "^5.74.0",
"webpack-bundle-analyzer": "^4.5.0", "webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-server": "^4.9.3", "webpack-dev-server": "^4.10.0",
"webpackbar": "^5.0.2" "webpackbar": "^5.0.2"
}, },
"dependencies": { "dependencies": {
"ansi_up": "^5.1.0", "ansi_up": "^5.1.0",
"esbuild": "0.14.3", "esbuild": "0.15.2",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jsesc": "^3.0.2", "jsesc": "^3.0.2",
+2 -2
View File
@@ -9,13 +9,13 @@
"preferUnplugged": true, "preferUnplugged": true,
"dependencies": { "dependencies": {
"cac": "^6.7.12", "cac": "^6.7.12",
"esbuild": "0.14.3", "esbuild": "0.15.2",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"moment-timezone": "^0.5.34", "moment-timezone": "^0.5.34",
"mongodb": "^3.7.3", "mongodb": "^3.7.3",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"systeminformation": "^5.12.3" "systeminformation": "^5.12.5"
}, },
"devDependencies": { "devDependencies": {
"@types/fs-extra": "^9.0.13", "@types/fs-extra": "^9.0.13",
+3 -3
View File
@@ -10,9 +10,9 @@
"dependencies": { "dependencies": {
"@hydrooj/utils": "workspace:*", "@hydrooj/utils": "workspace:*",
"chrome-finder": "^1.0.7", "chrome-finder": "^1.0.7",
"jsdom": "^19.0.0", "jsdom": "^20.0.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"puppeteer-core": "^15.3.2", "puppeteer-core": "^15.5.0",
"puppeteer-extra": "3.3.0", "puppeteer-extra": "3.3.0",
"puppeteer-extra-plugin-portal": "3.1.0", "puppeteer-extra-plugin-portal": "3.1.0",
"puppeteer-extra-plugin-stealth": "2.10.1", "puppeteer-extra-plugin-stealth": "2.10.1",
@@ -20,7 +20,7 @@
"superagent-proxy": "^3.0.0" "superagent-proxy": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jsdom": "^16.2.15", "@types/jsdom": "^20.0.0",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/superagent": "^4.1.15", "@types/superagent": "^4.1.15",
"@types/superagent-proxy": "^3.0.0" "@types/superagent-proxy": "^3.0.0"