mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
vjudge: handle superagent proxy change
This commit is contained in:
1 parent
b8deb8a572
commit
dca8e28361
5 files changed
+13
-7
No files matched your search
@@ -17,7 +17,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jsdom": "^16.2.13",
|
||||
"@types/lodash": "^4.14.173",
|
||||
"@types/superagent": "4.1.12",
|
||||
"@types/superagent": "^4.1.13",
|
||||
"@types/superagent-proxy": "^2.0.1"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import { PassThrough } from 'stream';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import * as superagent from 'superagent';
|
||||
import superagent from 'superagent';
|
||||
import proxy from 'superagent-proxy';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import { sleep } from '@hydrooj/utils/lib/utils';
|
||||
@@ -10,7 +10,7 @@ import { Logger } from 'hydrooj/src/logger';
|
||||
import * as setting from 'hydrooj/src/model/setting';
|
||||
import { IBasicProvider, RemoteAccount } from '../interface';
|
||||
|
||||
proxy(superagent as any);
|
||||
proxy(superagent);
|
||||
const logger = new Logger('codeforces');
|
||||
|
||||
const VERDICT = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { flattenDeep } from 'lodash';
|
||||
import * as superagent from 'superagent';
|
||||
import superagent from 'superagent';
|
||||
import proxy from 'superagent-proxy';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import { sleep } from '@hydrooj/utils/lib/utils';
|
||||
@@ -9,7 +9,7 @@ import { Logger } from 'hydrooj/src/logger';
|
||||
import * as setting from 'hydrooj/src/model/setting';
|
||||
import { IBasicProvider, RemoteAccount } from '../interface';
|
||||
|
||||
proxy(superagent as any);
|
||||
proxy(superagent);
|
||||
const logger = new Logger('remote/luogu');
|
||||
|
||||
const STATUS_MAP = [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import { PassThrough } from 'stream';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import * as superagent from 'superagent';
|
||||
import superagent from 'superagent';
|
||||
import proxy from 'superagent-proxy';
|
||||
import { STATUS } from '@hydrooj/utils/lib/status';
|
||||
import { parseMemoryMB, sleep } from '@hydrooj/utils/lib/utils';
|
||||
@@ -9,7 +9,7 @@ import { Logger } from 'hydrooj/src/logger';
|
||||
import * as setting from 'hydrooj/src/model/setting';
|
||||
import { IBasicProvider, RemoteAccount } from '../interface';
|
||||
|
||||
proxy(superagent as any);
|
||||
proxy(superagent);
|
||||
const logger = new Logger('spoj');
|
||||
|
||||
const VERDICT = {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
declare module 'superagent' {
|
||||
interface Request {
|
||||
proxy(url: string): this;
|
||||
}
|
||||
}
|
||||
export default {};
|
||||
Reference in new issue
Block a user