mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复tsconfig
This commit is contained in:
1 parent
a5886ecb99
commit
e8ba53e8ec
17 files changed
+85
-66
No files matched your search
@@ -5,6 +5,7 @@ import cluster from 'cluster';
|
|||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import { filter } from 'lodash';
|
import { filter } from 'lodash';
|
||||||
import { argv } from 'yargs';
|
import { argv } from 'yargs';
|
||||||
|
// @ts-ignore
|
||||||
import * as hydro from 'hydrooj';
|
import * as hydro from 'hydrooj';
|
||||||
|
|
||||||
if (!cluster.isMaster) {
|
if (!cluster.isMaster) {
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b",
|
"build": "tsc -b",
|
||||||
"build:watch": "tsc -b --watch",
|
"build:watch": "tsc -b --watch",
|
||||||
"lint": "eslint packages/**/*.ts --fix",
|
"lint": "eslint packages --ext ts --fix",
|
||||||
"pub": "node build/publish",
|
"pub": "node build/publish",
|
||||||
"jest": "node build/jest",
|
"jest": "node build/jest",
|
||||||
"start": "node_modules/.bin/hydrooj"
|
"start": "node_modules/.bin/hydrooj"
|
||||||
@@ -36,4 +36,4 @@
|
|||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.0.1",
|
||||||
"yargs": "^15.4.1"
|
"yargs": "^15.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'hydrooj';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { Reader } from 'maxmind';
|
import { Reader } from 'maxmind';
|
||||||
|
|||||||
+10
-12
@@ -1,14 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/geoip",
|
"name": "@hydrooj/geoip",
|
||||||
"version": "1.1.6",
|
"version": "1.1.6",
|
||||||
"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>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"maxmind": "^4.1.3"
|
"hydrooj": "^2.12.0",
|
||||||
},
|
"maxmind": "^4.1.3"
|
||||||
"peerDependencies": {
|
}
|
||||||
"hydrooj": "^2.12.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,18 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"composite": true,
|
|
||||||
"incremental": true,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
"strictBindCallApply": true,
|
"strictBindCallApply": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
"outDir": ".",
|
||||||
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
|
"include": [
|
||||||
|
"*.ts"
|
||||||
|
],
|
||||||
|
"exclude": []
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
"version": "2.12.3",
|
"version": "2.12.3",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
|
"typings": "dist/loader.d.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// TODO check more
|
// TODO check more
|
||||||
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import superagent from 'superagent';
|
|
||||||
import { Dictionary } from 'lodash';
|
import { Dictionary } from 'lodash';
|
||||||
import * as system from './model/system';
|
import * as system from './model/system';
|
||||||
import * as db from './service/db';
|
import * as db from './service/db';
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "es2019",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"rootDir": "src",
|
"rootDir": "src"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src",
|
"src"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist",
|
"bin",
|
||||||
"bin"
|
"dist"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -11,14 +11,11 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/superagent": "^4.1.8",
|
"@types/superagent": "^4.1.8",
|
||||||
"@types/superagent-proxy": "^2.0.0",
|
"@types/superagent-proxy": "^2.0.0"
|
||||||
"hydrooj": "2.12.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "^2.12.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"hydrooj": "^2.12.1",
|
||||||
"superagent": "^5.3.1",
|
"superagent": "^5.3.1",
|
||||||
"superagent-proxy": "^2.0.0"
|
"superagent-proxy": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,16 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "es2019",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
"outDir": ".",
|
"outDir": ".",
|
||||||
"rootDir": ".",
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"*.ts"
|
"*.ts"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ async function callback({
|
|||||||
const { UserFacingError } = global.Hydro.error;
|
const { UserFacingError } = global.Hydro.error;
|
||||||
if (error) throw new UserFacingError(error);
|
if (error) throw new UserFacingError(error);
|
||||||
const [
|
const [
|
||||||
[appid, secret, url, proxy],
|
[appid, secret, url, proxyUrl],
|
||||||
s,
|
s,
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
system.getMany([
|
system.getMany([
|
||||||
@@ -30,7 +30,7 @@ async function callback({
|
|||||||
token.get(state, token.TYPE_OAUTH),
|
token.get(state, token.TYPE_OAUTH),
|
||||||
]);
|
]);
|
||||||
const res = await superagent.post('https://oauth2.googleapis.com/token')
|
const res = await superagent.post('https://oauth2.googleapis.com/token')
|
||||||
.proxy(proxy)
|
.proxy(proxyUrl)
|
||||||
.send({
|
.send({
|
||||||
client_id: appid,
|
client_id: appid,
|
||||||
client_secret: secret,
|
client_secret: secret,
|
||||||
|
|||||||
@@ -11,14 +11,11 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/superagent": "^4.1.8",
|
"@types/superagent": "^4.1.8",
|
||||||
"@types/superagent-proxy": "^2.0.0",
|
"@types/superagent-proxy": "^2.0.0"
|
||||||
"hydrooj": "2.12.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "^2.12.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"hydrooj": "^2.12.1",
|
||||||
"superagent": "^5.3.1",
|
"superagent": "^5.3.1",
|
||||||
"superagent-proxy": "^2.0.0"
|
"superagent-proxy": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,16 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "es2019",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
"outDir": ".",
|
"outDir": ".",
|
||||||
"rootDir": ".",
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"*.ts"
|
"*.ts"
|
||||||
|
|||||||
@@ -11,13 +11,10 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-yaml": "^3.12.5",
|
"@types/js-yaml": "^3.12.5",
|
||||||
"@types/mongodb": "^3.5.25",
|
"@types/mongodb": "^3.5.25"
|
||||||
"hydrooj": "2.11.5"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"hydrooj": "^2.11.3"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"hydrooj": "^2.12.3",
|
||||||
"js-yaml": "^3.14.0",
|
"js-yaml": "^3.14.0",
|
||||||
"mongodb": "^3.6.0"
|
"mongodb": "^3.6.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base",
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "es2019",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
"outDir": ".",
|
"outDir": ".",
|
||||||
"rootDir": "."
|
"rootDir": "."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.base",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "build",
|
|
||||||
"rootDir": "build",
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"build"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"packages"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+11
-7
@@ -2,16 +2,20 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"composite": true,
|
"esModuleInterop": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"esModuleInterop": true
|
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.build.json" },
|
{ "path": "packages/hydrooj" },
|
||||||
{ "path": "./packages/hydrooj" },
|
{ "path": "packages/geoip" },
|
||||||
{ "path": "./packages/login-with-github" },
|
{ "path": "packages/login-with-github" },
|
||||||
{ "path": "./packages/login-with-google" },
|
{ "path": "packages/login-with-google" },
|
||||||
{ "path": "./packages/migrate-vijos" },
|
{ "path": "packages/migrate-vijos" },
|
||||||
],
|
],
|
||||||
|
"files": [],
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user