修复tsconfig

This commit is contained in:
undefined committed 2020-08-06 17:51:09 +08:00
1 parent a5886ecb99
commit e8ba53e8ec
17 files changed
+73 -54

No files matched your search

+1
View File
@@ -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) {
+1 -1
View File
@@ -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"
+1
View File
@@ -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';
+1 -3
View File
@@ -6,9 +6,7 @@
"author": "undefined <masnn0@outlook.com>", "author": "undefined <masnn0@outlook.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"hydrooj": "^2.12.0",
"maxmind": "^4.1.3" "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": []
} }
+1
View File
@@ -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
View File
@@ -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';
+13 -5
View File
@@ -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"
] ]
} }
+2 -5
View File
@@ -11,13 +11,10 @@
}, },
"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"
} }
+10 -2
View File
@@ -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"
+2 -2
View File
@@ -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,
+2 -5
View File
@@ -11,13 +11,10 @@
}, },
"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"
} }
+10 -2
View File
@@ -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"
+2 -5
View File
@@ -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"
} }
+9 -1
View File
@@ -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": "."
}, },
-13
View File
@@ -1,13 +0,0 @@
{
"extends": "./tsconfig.base",
"compilerOptions": {
"outDir": "build",
"rootDir": "build",
},
"include": [
"build"
],
"exclude": [
"packages"
]
}
+11 -7
View File
@@ -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": [],
} }