From 6db61bcc8dc6dbc5788eb48ba622888442a84f3b Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 27 Jun 2022 12:57:40 +0800 Subject: [PATCH 1/4] workspace: add CLA.md --- CLA.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CLA.md diff --git a/CLA.md b/CLA.md new file mode 100644 index 000000000..82abb3d9d --- /dev/null +++ b/CLA.md @@ -0,0 +1,29 @@ +# Contribution License Agreement + +Version: 2022-06-27 + +This Contribution License Agreement (**“Agreement”**) is agreed to by the party signing below (**“You”**), and conveys certain license rights to hydro-dev Organization for Your contributions to hydro-dev open source projects. This Agreement is effective as of the latest signature date below. + +1. **Definitions**. **“Code”** means the computer software code, whether in human-readable or machine-executable form, that is delivered by You to hydro-dev under this Agreement. **“Project”** means any of the projects owned or managed by hydro-dev. **“Submit”** is the act of uploading, submitting, transmitting, or distributing code or other content to any Project, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving that Project, but excluding communication that is conspicuously marked or otherwise designated in writing by You as “Not a Submission.” **“Submission”** means the Code and any other copyrightable material Submitted by You, including any associated comments and documentation. + +2. **Your Submission**. You must agree to the terms of this Agreement before making a Submission to any Project. This Agreement covers any and all Submissions that You, now or in the future (except as described in Section 4 below), Submit to any Project. + +3. **Originality of Work**. You represent that each of Your Submissions is entirely Your original work. Should You wish to Submit materials that are not Your original work, You may Submit them separately to the Project if You (a) retain all copyright and license information that was in the materials as You received them, (b) in the description accompanying Your Submission, include the phrase “Submission containing materials of a third party:” followed by the names of the third party and any licenses or other restrictions of which You are aware, and (c) follow any other instructions in the Project’s written guidelines concerning Submissions. + +4. **Your Employer**. References to “employer” in this Agreement include Your employer or anyone else for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your Submission is made in the course of Your work for an employer or Your employer has intellectual property rights in Your Submission by contract or applicable law, You must secure permission from Your employer to make the Submission before signing this Agreement. In that case, the term “You” in this Agreement will refer to You and the employer collectively. If You change employers in the future and desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement and secure permission from the new employer before Submitting those Submissions. + +5. **Licenses**. + +- **Copyright License**. You grant hydro-dev, and those who receive the Submission directly or indirectly from hydro-dev, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third parties. + +- **Patent License**. You grant hydro-dev, and those who receive the Submission directly or indirectly from hydro-dev, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under Your patent claims that are necessarily infringed by the Submission or the combination of the Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and import or otherwise dispose of the Submission alone or with the Project. + +- **Other Rights Reserved**. Each party reserves all rights not expressly granted in this Agreement. No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are granted by implication, exhaustion, estoppel or otherwise. + +6. **Representations and Warranties**. You represent that You are legally entitled to grant the above licenses. You represent that each of Your Submissions is entirely Your original work (except as You may have disclosed under Section 3). You represent that You have secured permission from Your employer to make the Submission in cases where Your Submission is made in the course of Your work for Your employer or Your employer has intellectual property rights in Your Submission by contract or applicable law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You have the necessary authority to bind the listed employer to the obligations contained in this Agreement. You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. + +7. **Notice to hydro-dev**. You agree to notify hydro-dev in writing of any facts or circumstances of which You later become aware that would make Your representations in this Agreement inaccurate in any respect. + +8. **Information about Submissions**. You agree that contributions to Projects and information about contributions may be maintained indefinitely and disclosed publicly, including Your name and other information that You submit with Your Submission. + +9. **Entire Agreement/Assignment**. This Agreement is the entire agreement between the parties, and supersedes any and all prior agreements, understandings or communications, written or oral, between the parties relating to the subject matter hereof. This Agreement may be assigned by hydro-dev. From dd3a54f57c30e1a8600cac4d72e0bce8b888e634 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 27 Jun 2022 13:27:07 +0800 Subject: [PATCH 2/4] workspace: bump version --- package.json | 24 +++++++-------- packages/center/package.json | 2 +- packages/elastic/package.json | 2 +- packages/hydrojudge/package.json | 2 +- packages/hydrooj/package.json | 12 ++++---- packages/hydrooj/src/service/server.ts | 2 +- packages/login-with-github/package.json | 2 +- packages/login-with-google/package.json | 2 +- packages/recaptcha/package.json | 2 +- packages/sonic/package.json | 4 +-- packages/ui-default/package.json | 39 +++++++++++++------------ packages/ui-default/pages/api.page.tsx | 4 +-- packages/utils/package.json | 4 +-- packages/vjudge/package.json | 8 ++--- 14 files changed, 55 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 83e46dce6..ba389a4a6 100644 --- a/package.json +++ b/package.json @@ -33,36 +33,36 @@ "@types/autocannon": "^7.6.1", "@types/cross-spawn": "^6.0.2", "@types/mocha": "^9.1.1", - "@types/node": "^17.0.35", - "@types/semver": "^7.3.9", + "@types/node": "^18.0.0", + "@types/semver": "^7.3.10", "@types/supertest": "^2.0.12", - "@typescript-eslint/eslint-plugin": "^5.25.0", - "@typescript-eslint/parser": "^5.25.0", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.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.16.0", + "eslint": "^8.18.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-import-resolver-typescript": "^2.7.1", + "eslint-import-resolver-typescript": "^3.1.0", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-jsx-a11y": "^6.6.0", + "eslint-plugin-react": "^7.30.1", "eslint-plugin-simple-import-sort": "7.0.0", "fs-extra": "^10.1.0", "globby": "11.1.0", - "latest-version": "^6.0.0", + "latest-version": "^7.0.0", "mocha": "^10.0.0", "mongodb": "^3.7.3", - "mongodb-memory-server": "^8.5.2", + "mongodb-memory-server": "^8.7.1", "ora": "5.4.1", "semver": "^7.3.7", "supertest": "^6.2.3", - "typedoc": "^0.22.15", - "typescript": "^4.6.4" + "typedoc": "^0.22.18", + "typescript": "4.6.4" }, "resolutions": { "esbuild": "0.14.3" diff --git a/packages/center/package.json b/packages/center/package.json index c4a01711f..1ca3adce4 100644 --- a/packages/center/package.json +++ b/packages/center/package.json @@ -8,7 +8,7 @@ "preferUnplugged": true, "dependencies": { "js-yaml": "^4.1.0", - "superagent": "^7.1.3" + "superagent": "^7.1.5" }, "devDependencies": { "@types/js-yaml": "^4.0.5" diff --git a/packages/elastic/package.json b/packages/elastic/package.json index 6c6507332..f287c9967 100644 --- a/packages/elastic/package.json +++ b/packages/elastic/package.json @@ -6,6 +6,6 @@ "author": "undefined ", "license": "AGPL-3.0-or-later", "dependencies": { - "@elastic/elasticsearch": "^8.2.0-patch.1" + "@elastic/elasticsearch": "^8.2.1" } } diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index bf038cea1..6825f8540 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -16,7 +16,7 @@ "mongodb": "^3.7.3", "p-queue": "^7.2.0", "shell-quote": "^1.7.3", - "ws": "^8.6.0" + "ws": "^8.8.0" }, "preferUnplugged": true, "license": "AGPL-3.0-or-later", diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 69b25cbd6..7bd4a20bb 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "3.13.18", + "version": "3.13.19", "bin": "bin/hydrooj.js", "main": "src/loader", "module": "src/loader", @@ -12,7 +12,7 @@ }, "preferUnplugged": true, "dependencies": { - "@graphql-tools/schema": "^8.3.13", + "@graphql-tools/schema": "^8.4.0", "@hydrooj/utils": "workspace:*", "adm-zip": "0.5.5", "ajv": "^8.11.0", @@ -40,7 +40,7 @@ "minio": "7.0.25", "moment-timezone": "^0.5.34", "mongodb": "^3.7.3", - "nanoid": "^3.3.4", + "nanoid": "^4.0.0", "nodemailer": "^6.7.5", "notp": "^2.0.3", "p-queue": "^7.2.0", @@ -48,7 +48,7 @@ "semver": "^7.3.7", "serialize-javascript": "^6.0.0", "source-map-support": "^0.5.21", - "superagent": "^7.1.3", + "superagent": "^7.1.5", "thirty-two": "^1.0.2", "tx2": "^1.0.5" }, @@ -63,11 +63,11 @@ "@types/lodash": "^4.14.182", "@types/lru-cache": "^7.6.1", "@types/mime-types": "^2.1.1", - "@types/minio": "^7.0.12", + "@types/minio": "^7.0.13", "@types/mongodb": "^3.6.20", "@types/nodemailer": "^6.4.4", "@types/notp": "^2.0.2", - "@types/semver": "^7.3.9", + "@types/semver": "^7.3.10", "@types/serialize-javascript": "^5.0.2", "@types/source-map-support": "^0.5.4", "@types/superagent": "^4.1.15", diff --git a/packages/hydrooj/src/service/server.ts b/packages/hydrooj/src/service/server.ts index d89bb5521..93bc2d6ca 100644 --- a/packages/hydrooj/src/service/server.ts +++ b/packages/hydrooj/src/service/server.ts @@ -137,7 +137,7 @@ ${ctx.response.status} ${endTime - startTime}ms ${ctx.response.length}`); maxFileSize: parseMemoryMB(system.get('server.upload') || '256m') * 1024 * 1024, }, })); - const layers = [baseLayer, rendererLayer(router, logger), responseLayer(router), userLayer]; + const layers = [baseLayer, rendererLayer(router, logger), responseLayer(logger), userLayer]; app.use(async (ctx, next) => await next().catch(console.error)).use(domainLayer); layers.forEach((layer) => router.use(layer as any)); wsServer.on('connection', async (socket, request) => { diff --git a/packages/login-with-github/package.json b/packages/login-with-github/package.json index 7df12780e..685e48571 100644 --- a/packages/login-with-github/package.json +++ b/packages/login-with-github/package.json @@ -13,6 +13,6 @@ "hydrooj": "*" }, "dependencies": { - "superagent": "^7.1.3" + "superagent": "^7.1.5" } } diff --git a/packages/login-with-google/package.json b/packages/login-with-google/package.json index c4e588642..6d762843b 100644 --- a/packages/login-with-google/package.json +++ b/packages/login-with-google/package.json @@ -13,6 +13,6 @@ "hydrooj": "*" }, "dependencies": { - "superagent": "^7.1.3" + "superagent": "^7.1.5" } } diff --git a/packages/recaptcha/package.json b/packages/recaptcha/package.json index daefa1486..30dfa0151 100644 --- a/packages/recaptcha/package.json +++ b/packages/recaptcha/package.json @@ -8,6 +8,6 @@ "license": "AGPL-3.0-or-later", "preferUnplugged": true, "dependencies": { - "superagent": "^7.1.3" + "superagent": "^7.1.5" } } diff --git a/packages/sonic/package.json b/packages/sonic/package.json index cd7ea2ed2..2f218f3fb 100644 --- a/packages/sonic/package.json +++ b/packages/sonic/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/sonic", - "version": "1.2.5", + "version": "1.2.6", "description": "Sonic search service", "main": "service.js", "typings": "service.d.ts", @@ -9,6 +9,6 @@ "author": "undefined ", "license": "AGPL-3.0-or-later", "dependencies": { - "sonic-channel": "^1.2.7" + "sonic-channel": "^1.2.14" } } diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 838d305a0..e636b1416 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.37.23", + "version": "4.37.24", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", @@ -10,15 +10,15 @@ "lint": "eslint" }, "devDependencies": { - "@blueprintjs/core": "^4.3.2", + "@blueprintjs/core": "^4.5.1", "@fontsource/dm-mono": "^4.5.8", - "@fontsource/fira-code": "^4.5.9", + "@fontsource/fira-code": "^4.5.10", "@fontsource/inconsolata": "^4.5.6", - "@fontsource/jetbrains-mono": "^4.5.8", - "@fontsource/pt-mono": "^4.5.8", + "@fontsource/jetbrains-mono": "^4.5.9", + "@fontsource/pt-mono": "^4.5.9", "@fontsource/roboto-mono": "^4.5.7", - "@fontsource/source-code-pro": "^4.5.9", - "@fontsource/ubuntu-mono": "^4.5.9", + "@fontsource/source-code-pro": "^4.5.10", + "@fontsource/ubuntu-mono": "^4.5.10", "@hydrooj/utils": "workspace:*", "@types/gulp-if": "^0.0.34", "@types/jquery": "^3.5.14", @@ -27,7 +27,7 @@ "@types/markdown-it": "^12.2.3", "@types/pickadate": "^3.5.32", "@types/qrcode": "^1.4.2", - "@types/react-dom": "^18.0.4", + "@types/react-dom": "^18.0.5", "@types/redux-logger": "^3.0.9", "ansi_up": "^5.1.0", "autoprefixer": "^9.8.8", @@ -39,9 +39,9 @@ "clipboard": "^2.0.11", "copy-webpack-plugin": "^6.4.1", "css-loader": "^4.3.0", - "diff": "^5.0.0", + "diff": "^5.1.0", "diff-dom": "^4.2.3", - "echarts": "^5.3.2", + "echarts": "^5.3.3", "emojis-keywords": "2.0.0", "emojis-list": "2.1.0", "esbuild-loader": "^2.19.0", @@ -66,8 +66,8 @@ "monaco-editor-nls": "^2.0.0", "monaco-editor-webpack-plugin": "^7.0.1", "monaco-themes": "^0.4.2", - "monaco-yaml": "^4.0.0-alpha.3", - "nanoid": "^3.3.4", + "monaco-yaml": "^4.0.0", + "nanoid": "^4.0.0", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "pickadate": "^3.6.4", @@ -79,11 +79,11 @@ "qrcode": "^1.5.0", "queue-microtask": "^1.2.3", "raw-loader": "^4.0.2", - "react": "^18.1.0", + "react": "^18.2.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", - "react-dom": "^18.1.0", - "react-redux": "^8.0.1", + "react-dom": "^18.2.0", + "react-redux": "^8.0.2", "react-split-pane": "^0.1.92", "reconnecting-websocket": "^4.4.0", "redux": "^4.2.0", @@ -95,13 +95,13 @@ "speed-measure-webpack-plugin": "^1.5.0", "sticky-kit": "^1.1.3", "style-loader": "^2.0.0", - "stylus": "^0.57.0", + "stylus": "^0.58.1", "stylus-loader": "^3.0.2", "tether": "^1.4.7", "tether-drop": "^1.4.2", "thirty-two": "^1.0.2", "through2": "^4.0.2", - "timeago-react": "^3.0.4", + "timeago-react": "^3.0.5", "timeago.js": "^4.0.2", "vditor": "^3.8.15", "vinyl-buffer": "^1.0.1", @@ -116,10 +116,11 @@ "fs-extra": "^10.1.0", "js-yaml": "^4.1.0", "jsesc": "^3.0.2", - "katex": "^0.15.6", + "katex": "^0.16.0", "lodash": "^4.17.21", "markdown-it": "^13.0.1", "markdown-it-anchor": "^8.6.4", + "markdown-it-attrs": "^4.1.4", "markdown-it-footnote": "^3.0.3", "markdown-it-imsize": "^2.0.1", "markdown-it-mark": "^3.0.1", @@ -129,6 +130,6 @@ "nunjucks": "^3.2.3", "p-queue": "^7.2.0", "streamsaver": "^2.0.6", - "xss": "^1.0.11" + "xss": "^1.0.13" } } diff --git a/packages/ui-default/pages/api.page.tsx b/packages/ui-default/pages/api.page.tsx index 87f5ab589..06732dd2e 100644 --- a/packages/ui-default/pages/api.page.tsx +++ b/packages/ui-default/pages/api.page.tsx @@ -3,6 +3,7 @@ import { NamedPage } from 'vj/misc/Page'; import request from 'vj/utils/request'; import React from 'react'; import ReactDOM from 'react-dom/client'; +import 'graphiql/graphiql.css'; const Logo = () => Hydro API Console ; const defaultQuery = `\ @@ -14,10 +15,9 @@ query { const page = new NamedPage('api', async () => { const [{ default: GraphiQL }, { buildSchema }, res] = await Promise.all([ - import('graphiql'), + import('graphiql/esm/index.js'), import('graphql'), request.get('/api?schema'), - import('graphiql/graphiql.css'), ]); // @ts-ignore GraphiQL.Logo = Logo; diff --git a/packages/utils/package.json b/packages/utils/package.json index 6c7cf4830..5515d9607 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/utils", - "version": "1.2.6", + "version": "1.2.7", "description": "hydrooj utils", "main": "package.json", "repository": "https://github.com/hydro-dev/Hydro.git", @@ -12,7 +12,7 @@ "js-yaml": "^4.1.0", "moment-timezone": "^0.5.34", "mongodb": "^3.7.3", - "systeminformation": "^5.11.15" + "systeminformation": "^5.11.22" }, "devDependencies": { "@types/fs-extra": "^9.0.13" diff --git a/packages/vjudge/package.json b/packages/vjudge/package.json index 450b51d7e..f60372008 100644 --- a/packages/vjudge/package.json +++ b/packages/vjudge/package.json @@ -12,11 +12,11 @@ "chrome-finder": "^1.0.7", "jsdom": "^19.0.0", "lodash": "^4.17.21", - "puppeteer-core": "^14.1.1", - "puppeteer-extra": "^3.2.3", + "puppeteer-core": "^15.1.1", + "puppeteer-extra": "^3.3.0", "puppeteer-extra-plugin-portal": "^3.1.0", - "puppeteer-extra-plugin-stealth": "^2.9.0", - "superagent": "^7.1.3", + "puppeteer-extra-plugin-stealth": "^2.10.1", + "superagent": "^7.1.5", "superagent-proxy": "^3.0.0" }, "devDependencies": { From f80ec720deec36418a16f48e0727107133d0f76b Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 27 Jun 2022 15:04:47 +0800 Subject: [PATCH 3/4] deps: downgrade nanoid to 3.3.4 --- packages/hydrooj/package.json | 2 +- packages/ui-default/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 7bd4a20bb..816df4d5d 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -40,7 +40,7 @@ "minio": "7.0.25", "moment-timezone": "^0.5.34", "mongodb": "^3.7.3", - "nanoid": "^4.0.0", + "nanoid": "^3.3.4", "nodemailer": "^6.7.5", "notp": "^2.0.3", "p-queue": "^7.2.0", diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index e636b1416..f5a98ccf9 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -67,7 +67,7 @@ "monaco-editor-webpack-plugin": "^7.0.1", "monaco-themes": "^0.4.2", "monaco-yaml": "^4.0.0", - "nanoid": "^4.0.0", + "nanoid": "^3.3.4", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "pickadate": "^3.6.4", From 4ac9f8fef7b13a214f5100eee9a4868f9ec12802 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 27 Jun 2022 15:11:18 +0800 Subject: [PATCH 4/4] deps: downgrade latest-version to 6.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba389a4a6..c2b4972ba 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "eslint-plugin-simple-import-sort": "7.0.0", "fs-extra": "^10.1.0", "globby": "11.1.0", - "latest-version": "^7.0.0", + "latest-version": "6.0.0", "mocha": "^10.0.0", "mongodb": "^3.7.3", "mongodb-memory-server": "^8.7.1",