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