mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
upgrade dep
This commit is contained in:
1 parent
9887deca6a
commit
ce79bfab8b
12 files changed
+31
-29
No files matched your search
@@ -24,6 +24,7 @@ module.exports = {
|
||||
'import/prefer-default-export': 'off',
|
||||
indent: ['warn', 4],
|
||||
'max-classes-per-file': 'off',
|
||||
'max-len': ['warn', 150],
|
||||
'no-bitwise': 'off',
|
||||
'no-console': 'off',
|
||||
'no-extend-native': 'off',
|
||||
|
||||
+6
-6
@@ -17,14 +17,14 @@
|
||||
"devDependencies": {
|
||||
"@shelf/jest-mongodb": "^1.2.2",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/jest": "^26.0.9",
|
||||
"@types/node": "^14.0.27",
|
||||
"@typescript-eslint/eslint-plugin": "^3.9.0",
|
||||
"@typescript-eslint/parser": "^3.9.0",
|
||||
"@types/jest": "^26.0.10",
|
||||
"@types/node": "^14.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.9.1",
|
||||
"@typescript-eslint/parser": "^3.9.1",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint": "^7.7.0",
|
||||
"eslint-config-airbnb-base": "^14.2.0",
|
||||
"eslint-import-resolver-typescript": "^2.2.0",
|
||||
"eslint-import-resolver-typescript": "^2.2.1",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"globby": "^11.0.1",
|
||||
"jest": "^26.4.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"main": "package.json",
|
||||
"author": "masnn",
|
||||
"os": [
|
||||
@@ -12,8 +12,8 @@
|
||||
"fs-extra": "^9.0.1",
|
||||
"hydrooj": "^2.12.0",
|
||||
"js-yaml": "^3.14.0",
|
||||
"lodash": "^4.17.19",
|
||||
"p-queue": "^6.6.0",
|
||||
"lodash": "^4.17.20",
|
||||
"p-queue": "^6.6.1",
|
||||
"shell-quote": "^1.7.2",
|
||||
"systeminformation": "^4.26.10"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.12.16",
|
||||
"version": "2.12.17",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
@@ -20,9 +20,9 @@
|
||||
"koa": "^2.13.0",
|
||||
"koa-body": "^4.2.0",
|
||||
"koa-morgan": "^1.0.1",
|
||||
"koa-router": "^8.0.8",
|
||||
"koa-router": "^9.4.0",
|
||||
"koa-static-cache": "^5.1.3",
|
||||
"lodash": "^4.17.19",
|
||||
"lodash": "^4.17.20",
|
||||
"lru-cache": "^6.0.0",
|
||||
"moment-timezone": "^0.5.31",
|
||||
"mongodb": "^3.5.9",
|
||||
@@ -38,13 +38,13 @@
|
||||
"@types/adm-zip": "^0.4.33",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/js-yaml": "^3.12.5",
|
||||
"@types/koa": "^2.11.3",
|
||||
"@types/koa": "^2.11.4",
|
||||
"@types/koa-morgan": "^1.0.4",
|
||||
"@types/koa-router": "^7.4.1",
|
||||
"@types/koa-static-cache": "^5.1.0",
|
||||
"@types/lodash": "^4.14.158",
|
||||
"@types/lru-cache": "^5.1.0",
|
||||
"@types/mongodb": "^3.5.25",
|
||||
"@types/mongodb": "^3.5.26",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"@types/serialize-javascript": "^4.0.0",
|
||||
"@types/sockjs": "^0.3.32",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable max-len */
|
||||
/* eslint-disable func-names */
|
||||
import { isClass } from './utils';
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ async function get() {
|
||||
system.get('server.url'),
|
||||
token.add(token.TYPE_OAUTH, 600, { redirect: this.request.referer }),
|
||||
]);
|
||||
// eslint-disable-next-line max-len
|
||||
this.response.redirect = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${appid}&response_type=code&redirect_uri=${url}oauth/google/callback&scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile&state=${state}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/login-with-google",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"main": "package.json",
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <masnn0@outlook.com>",
|
||||
@@ -18,4 +18,4 @@
|
||||
"superagent": "^6.0.0",
|
||||
"superagent-proxy": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import superagentProxy from 'superagent-proxy';
|
||||
|
||||
superagentProxy(superagent);
|
||||
|
||||
const BASE_URL = 'https://osu.ppy.sh/';
|
||||
|
||||
async function get() {
|
||||
const { system, token } = global.Hydro.model;
|
||||
const [[appid, url], [state]] = await Promise.all([
|
||||
@@ -13,7 +15,7 @@ async function get() {
|
||||
]),
|
||||
token.add(token.TYPE_OAUTH, 600, { redirect: this.request.referer }),
|
||||
]);
|
||||
this.response.redirect = `https://osu.ppy.sh/oauth/authorize?client_id=${appid}&state=${state}&redirect_uri=${url}oauth/osu/callback&response_type=code`;
|
||||
this.response.redirect = `${BASE_URL}oauth/authorize?client_id=${appid}&state=${state}&redirect_uri=${url}oauth/osu/callback&response_type=code`;
|
||||
}
|
||||
|
||||
async function callback({ state, code }) {
|
||||
@@ -28,7 +30,7 @@ async function callback({ state, code }) {
|
||||
]),
|
||||
token.get(state, token.TYPE_OAUTH),
|
||||
]);
|
||||
const res = await superagent.post('https://osu.ppy.sh/oauth/token')
|
||||
const res = await superagent.post(`${BASE_URL}oauth/token`)
|
||||
.proxy(proxy)
|
||||
.send({
|
||||
client_id: appid,
|
||||
@@ -44,7 +46,7 @@ async function callback({ state, code }) {
|
||||
);
|
||||
}
|
||||
const t = res.body.access_token;
|
||||
const userInfo = await superagent.get('https://osu.ppy.sh/api/v2/me')
|
||||
const userInfo = await superagent.get(`${BASE_URL}api/v2/me`)
|
||||
.proxy(proxy)
|
||||
.set('User-Agent', 'Hydro-OAuth')
|
||||
.set('Authorization', `Bearer ${t}`);
|
||||
|
||||
@@ -1 +1 @@
|
||||
Login With Osu: 使用 Osu 登录
|
||||
Login with Osu: 使用 Osu 登录
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/login-with-osu",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"main": "package.json",
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <masnn0@outlook.com>",
|
||||
@@ -18,4 +18,4 @@
|
||||
"superagent": "^6.0.0",
|
||||
"superagent-proxy": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^3.12.5",
|
||||
"@types/mongodb": "^3.5.25"
|
||||
"@types/mongodb": "^3.5.26"
|
||||
},
|
||||
"dependencies": {
|
||||
"hydrooj": "^2.12.3",
|
||||
"js-yaml": "^3.14.0",
|
||||
"mongodb": "^3.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,6 +250,7 @@ const tasks = {
|
||||
doc_id: 'docId',
|
||||
doc_type: 'docType',
|
||||
owner_uid: 'owner',
|
||||
owner: 'owner',
|
||||
name: 'name',
|
||||
roles: {
|
||||
field: 'roles',
|
||||
@@ -528,11 +529,7 @@ export async function run({
|
||||
}
|
||||
await dst.collection('system').updateOne(
|
||||
{ _id: 'user' },
|
||||
{
|
||||
$set: {
|
||||
value: userCounter.value,
|
||||
},
|
||||
},
|
||||
{ $set: { value: userCounter.value } },
|
||||
{ upsert: true },
|
||||
);
|
||||
await report({ progress: 1, message: 'Collection:system done.' });
|
||||
|
||||
Reference in new issue
Block a user