diff --git a/lib/gateway/index.ts b/lib/gateway/index.ts deleted file mode 100644 index 717179059..000000000 --- a/lib/gateway/index.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { NowRequest, NowResponse } from '@now/node/dist'; -import path from 'path'; -import Koa from 'koa'; -import Router from 'koa-router'; -import util from 'util'; -import { DEP001 } from '../misc/deprecation'; -import { CommandConfig, CreateServerOptions } from '../types'; - -import { loadConfig } from '../utils/config'; -import { Server as SurgioServer } from './server'; -import { FcRequest, FcResponse } from './types'; - -class SurgioKoaApplication extends Koa { - constructor(public readonly surgioConfig: CommandConfig) { - super(); - } -} - -export const createKoaApp = (surgioServer: SurgioServer): SurgioKoaApplication => { - const app = new SurgioKoaApplication(surgioServer.config); - const router = new Router(); - - const authMiddleware = () => { - return async (ctx, next) => { - const accessToken = ctx.query.access_token; - const config = ctx.app.surgioConfig; - const needAuth = config.gateway && config.gateway.auth; - - if (!needAuth || (needAuth && accessToken === config.gateway.accessToken)) { - await next(); - } else { - ctx.throw(401, 'invalid access_token'); - } - }; - }; - - const prepareArtifact = () => { - return async (_, next) => { - await surgioServer.init(); - await next(); - }; - }; - - router.use(async (ctx, next) => { - await next(); - ctx.set('x-powered-by', `surgio@${require('../../package.json').version}`); - ctx.set('x-robots-tag', 'noindex'); - }); - router.get('/', ctx => { - ctx.body = 'Surgio Gateway'; - }); - router.get('/get-artifact/:name', authMiddleware(), prepareArtifact(), surgioServer.koaGetArtifact.bind(surgioServer)); - router.get('/list-artifact', authMiddleware(), surgioServer.koaListArtifact.bind(surgioServer)); - router.get('/qx-script', surgioServer.processQuanXScript.bind(surgioServer)); - router.get('/qx-rewrite-remote', surgioServer.processQuanXRewriteRemote.bind(surgioServer)); - router.get('/robot.txt', ctx => { - ctx.body = 'User-agent: *\n' + - 'Disallow: /'; - }); - - app.use(async (ctx, next) => { - const { - url, - method, - } = ctx; - const clientIP = ctx.get('x-real-ip') || '-'; - - try { - await next(); - - console.log('[request] [%s] %s %s %s "%s"', clientIP, method, ctx.status, url, ctx.get('user-agent') || '-'); - } catch (err) { - console.log('[request] [%s] %s %s %s "%s"', clientIP, method, err.status || 500, url, ctx.get('user-agent') || '-'); - - ctx.status = err.status || 500; - ctx.body = ` -

Error

-

Message:

-

${err.name}: ${err.message}

- ${ctx.status >= 500 ? ` -

Stack:

-
${err.stack}
- ` : ''} - `; - ctx.app.emit('error', err, ctx); - } - }); - - app - .use(router.routes()) - .use(router.allowedMethods()); - - return app; -}; - -export const createSurgioServer = (cwd: string): SurgioServer => { - const configFile = path.join(cwd, 'surgio.conf.js'); - const config = loadConfig(cwd, configFile, { - ...(['development', 'test'].indexOf(process.env.NODE_ENV as string) > -1 ? { - urlBase: '/get-artifact/', - } : null), - }); - return new SurgioServer(cwd, config); -}; - -export const createHttpServer = ( - options: CreateServerOptions = { cwd: process.cwd() } - ) => { - process.env.KOA_SERVER = 'true'; - - const surgioServer = createSurgioServer(options.cwd as string); - const app = createKoaApp(surgioServer); - - return app.callback(); -}; - -// istanbul ignore next -let server; - -// istanbul ignore next -export function initializer(_, callback): void { - const cwd = process.cwd(); - const configFile = path.join(cwd, '/surgio.conf.js'); - const config = loadConfig(cwd, configFile); - - server = new SurgioServer(cwd, config); - - server.init() - .then(() => { - callback(null, ''); - }) - .catch(err => { - callback(err, ''); - }); -} - -// istanbul ignore next -export function handler(request: FcRequest, response: FcResponse): void { - const { url, clientIP, headers, method } = request; - const artifactName = path.basename(url); - - if (!artifactName) { - server.fcNotFound(response); - return; - } - - console.log('[request] [%s] %s %s "%s"', clientIP, method, url, headers['user-agent'] || '-'); - - server.getArtifact(artifactName) - .then(result => { - if (result) { - response.setStatusCode(200); - response.setHeader('content-type', 'text/plain; charset=utf-8'); - response.setHeader('cache-control', 'private, no-cache, no-store'); - response.send(result); - } else { - server.fcNotFound(response); - } - }) - .catch(err => { - server.fcErrorHandler(response, err); - }); -} - -// istanbul ignore next -export const nowHandler = util.deprecate(async (req: NowRequest, res: NowResponse): Promise => { - if (!server) { - const cwd = process.cwd(); - const configFile = path.join(cwd, '/surgio.conf.js'); - const config = loadConfig(cwd, configFile); - - server = new SurgioServer(cwd, config); - - await server.init(); - } - - const { - headers, - url, - method, - } = req; - const gatewayAction = req.query.action || 'get-artifact'; - const clientIP = headers['x-real-ip'] || '-'; - - console.log('[request] [%s] %s %s "%s"', clientIP, method, url, headers['user-agent'] || '-'); - - switch (gatewayAction) { - case 'get-artifact': - server.nowGetArtifact(req, res); - break; - case 'list-artifact': - server.nowListArtifact(req, res); - break; - } -}, DEP001, 'DEP001'); diff --git a/lib/gateway/server.ts b/lib/gateway/server.ts deleted file mode 100644 index 573b93b39..000000000 --- a/lib/gateway/server.ts +++ /dev/null @@ -1,329 +0,0 @@ -import { NowRequest, NowResponse } from '@now/node/dist'; -import { Context } from 'koa'; -import createError from 'http-errors'; -import fs from 'fs-extra'; -import nunjucks, { Environment } from 'nunjucks'; -import path from "path"; -import { PackageJson } from 'type-fest'; -import legacyUrl from 'url'; -import got from 'got'; -import { transformQxRewriteRemote } from '../utils/qx-helper'; - -import { getEngine } from '../generator/template'; -import { ArtifactConfig, CommandConfig, RemoteSnippet } from '../types'; -import { getDownloadUrl } from '../utils'; -import { loadRemoteSnippetList } from '../utils/remote-snippet'; -import * as filters from '../utils/filter'; -import { generate } from '../generate'; -import { FcResponse } from './types'; - -export class Server { - public static getEditUrl(repository: PackageJson['repository'], p: string): string { - if (repository) { - const base = typeof repository === 'string' ? - repository : - repository.url; - - return legacyUrl.resolve(base.endsWith('/') ? base : `${base}/`, p); - } else { - return ''; - } - } - - public remoteSnippetList: ReadonlyArray; - public artifactList: ReadonlyArray; - private readonly pkgFile?: PackageJson; - private readonly templateEngine: Environment; - - constructor(public cwd: string, public readonly config: CommandConfig) { - const pkgFile = path.join(cwd, 'package.json'); - - this.config = config; - this.artifactList = config.artifacts; - this.templateEngine = getEngine(config.templateDir); - if (fs.existsSync(pkgFile)) { - this.pkgFile = require(pkgFile); - } - } - - public async init(): Promise { - const remoteSnippetsConfig = this.config.remoteSnippets || []; - - this.remoteSnippetList = await loadRemoteSnippetList(remoteSnippetsConfig); - } - - public async getArtifact(artifactName: string): Promise { - const target = this.artifactList.filter(item => item.name === artifactName); - - if (!target.length) { - return undefined; - } - - return await generate(this.config, target[0], this.remoteSnippetList, this.templateEngine); - } - - public async transformArtifact(artifactName: string, format: string, filter?: string): Promise { - const target = this.artifactList.filter(item => item.name === artifactName); - let filterName; - - if (!target.length) { - return undefined; - } - if (filter) { - filterName = filters.hasOwnProperty(filter) ? filter : `customFilters.${filter}`; - } - - switch (format) { - case 'surge-policy': { - const artifact = { - ...target[0], - template: undefined, - templateString: `{{ getSurgeNodes(nodeList${filterName ? `, ${filterName}` : ''}) }}`, - }; - return await generate(this.config, artifact, this.remoteSnippetList, this.templateEngine); - } - - case 'qx-server': { - const artifact = { - ...target[0], - template: undefined, - templateString: `{{ getQuantumultXNodes(nodeList${filterName ? `, ${filterName}` : ''}) }}`, - }; - return await generate(this.config, artifact, this.remoteSnippetList, this.templateEngine); - } - - case 'clash-provider': { - const artifact = { - ...target[0], - template: undefined, - templateString: [ - '---', - 'proxies:', - `{{ getClashNodes(nodeList${filterName ? `, ${filterName}` : ''}) | yaml }}`, - '...' - ].join('\n') - }; - return await generate(this.config, artifact, this.remoteSnippetList, this.templateEngine); - } - - default: - return createError(400, 'unsupported format'); - } - } - - public async koaGetArtifact(ctx: Context): Promise { - const dl = ctx.query.dl; - const format = ctx.query.format; - const filter = ctx.query.filter; - const artifactName = ctx.params.name; - const result = format !== void 0 ? - await this.transformArtifact(artifactName as string, format as string, filter as string) : - await this.getArtifact(artifactName as string); - - if (result instanceof createError.HttpError) { - ctx.throw(result); - return; - } - - if (typeof result === 'string') { - ctx.set('content-type', 'text/plain; charset=utf-8'); - ctx.set('cache-control', 'private, no-cache, no-store'); - - if (dl === '1') { - ctx.set('content-disposition', `attachment; filename="${artifactName}"`); - } - - ctx.body = result; - } else { - ctx.throw(404); - } - } - - public async koaListArtifact(ctx: Context): Promise { - const engine = nunjucks.configure({ - autoescape: false, - }); - const artifactListTpl = require('./template/artifact-list').default; - const accessToken = this.config.gateway && this.config.gateway.accessToken; - - ctx.body = engine.renderString(artifactListTpl, { - artifactList: this.artifactList, - getPreviewUrl: (name: string) => getDownloadUrl(this.config.urlBase, name, true, accessToken), - getDownloadUrl: (name: string) => getDownloadUrl(this.config.urlBase, name, false, accessToken), - supportEdit: !!(this?.pkgFile?.repository), - getEditUrl: p => Server.getEditUrl(this?.pkgFile?.repository, p), - encodeURIComponent, - surgioVersion: require('../../package.json').version, - }); - } - - public async processQuanXScript(ctx: Context): Promise { - const { url, id: idFromUrl } = ctx.query; - const idFromConfig = this.config?.quantumultXConfig?.deviceIds; - const deviceIds = idFromUrl ? idFromUrl.split(',') : (idFromConfig || []); - - if (!url) { - ctx.throw(400, 'invalid url'); - } - - const content = await got.get(url) - // istanbul ignore next - .catch(err => { - throw createError(500, `请求文件时出错: ${err.message}`); - }); - const contentType: string|undefined = content.headers['content-type']; - - if ( - !contentType || - ( - !contentType.includes('text/plain') && - !contentType.includes('application/javascript') - ) - ) { - ctx.throw(400, '该文件不是一个可转换的脚本文件'); - } - - const insertion = '' + - '/**\n' + - ' * @supported ' + `${deviceIds.join(' ')}` + '\n' + - ' * THIS COMMENT IS GENERATED BY SURGIO\n' + - ' */\n\n'; - - ctx.set('content-type', contentType); - ctx.set('content-disposition', 'attachment;filename=script.js'); - ctx.set('cache-control', 'max-age=3600, s-maxage=3600'); - ctx.body = insertion + content.body; - } - - public async processQuanXRewriteRemote(ctx: Context): Promise { - const { url, id: idFromUrl } = ctx.query; - const deviceIds = idFromUrl ? idFromUrl.split(',') : undefined; - const publicUrl = this.config.publicUrl; - - if (!url) { - ctx.throw(400, 'invalid url'); - } - - const content = await got.get({ - url, - }) - // istanbul ignore next - .catch(err => { - throw createError(500, `请求文件时出错: ${err.message}`); - }); - const contentType: string|undefined = content.headers['content-type']; - - if ( - !contentType || - !contentType.includes('text/plain') - ) { - ctx.throw(400, '该文件不是一个可转换的文件'); - return; - } - - ctx.set('content-type', contentType); - ctx.set('cache-control', 'max-age=3600, s-maxage=3600'); - ctx.set('content-disposition', 'attachment;filename=rewrite-remote.conf'); - ctx.body = transformQxRewriteRemote(content.body, publicUrl, deviceIds); - } - - // istanbul ignore next - public fcErrorHandler(response: FcResponse, err: Error): void { - response.setStatusCode(500); - response.setHeader('content-type', 'text/html; charset=UTF-8'); - response.send( - '

Server Error

' + - `

${err.name}: ${err.message}

` + - `
${err.stack}
` - ); - console.error(err); - } - - // istanbul ignore next - public fcNotFound(res: FcResponse): void { - res.setStatusCode(404); - res.setHeader('content-type', 'text/html; charset=UTF-8'); - res.send( - '

Not Found

' - ); - } - - // istanbul ignore next - public nowErrorHandler(response: NowResponse, err: Error): void { - response.setHeader('content-type', 'text/html; charset=UTF-8'); - response - .status(500) - .send( - '

Server Error

' + - `

${err.name}: ${err.message}

` + - `
${err.stack}
` - ); - console.error(err); - } - - // istanbul ignore next - public nowNotFound(res: NowResponse): void { - res.setHeader('content-type', 'text/html; charset=UTF-8'); - res - .status(404) - .send( - '

Not Found

' - ); - } - - // istanbul ignore next - public nowGetArtifact(req: NowRequest, res: NowResponse): void { - const { - query: { name: artifactName, dl }, - } = req; - - if (!artifactName) { - this.nowNotFound(res); - return; - } - - this.getArtifact(artifactName as string) - .then(result => { - if (result) { - res.setHeader('content-type', 'text/plain; charset=utf-8'); - res.setHeader('cache-control', 'private, no-cache, no-store'); - - if (dl === '1'){ - res.setHeader('content-disposition', `attachment; filename="${artifactName}"`); - } - - res.send(result); - } else { - this.nowNotFound(res); - } - }) - .catch(err => { - this.nowErrorHandler(res, err); - }); - } - - // istanbul ignore next - public nowListArtifact(_: NowRequest, res: NowResponse): void { - const engine = nunjucks.configure({ - autoescape: false, - }); - const artifactListTpl = require('./template/artifact-list').default; - const result = engine.renderString(artifactListTpl, { - artifactList: this.artifactList, - getPreviewUrl: (name: string) => getDownloadUrl(this.config.urlBase, name), - getDownloadUrl: (name: string) => ( - legacyUrl.format({ - pathname: '/gateway.js', - query: { - name, - action: 'get-artifact', - dl: '1', - }, - }) - ), - encodeURIComponent, - surgioVersion: require('../../package.json').version, - }); - res.send(result); - } -} diff --git a/lib/gateway/template/artifact-list.ts b/lib/gateway/template/artifact-list.ts deleted file mode 100644 index e96b7b76f..000000000 --- a/lib/gateway/template/artifact-list.ts +++ /dev/null @@ -1,140 +0,0 @@ -export default ` - - - - - - - - - - - 所有 Artifact - - - -
-
-

所有 Artifact

-
    - {% for artifact in artifactList %} -
  • -
    -
    {{ artifact.name }}
    -
    {{ getPreviewUrl(artifact.name) }}
    -
    - {% if supportEdit %} - -
    Provider: {{ artifact.provider }}
    -
    - {% else %} -
    Provider: {{ artifact.provider }}
    - {% endif %} - - {% if artifact.combineProviders %} - {% for provider in artifact.combineProviders %} - {% if supportEdit %} - -
    Provider: {{ provider }}
    -
    - {% else %} -
    Provider: {{ provider }}
    - {% endif %} - {% endfor %} - {% endif %} -
    - -
    -
  • - {% endfor %} -
-
- surgio@v{{ surgioVersion }} -
-
-
- - - -`; diff --git a/lib/gateway/types.ts b/lib/gateway/types.ts deleted file mode 100644 index 08eafef1c..000000000 --- a/lib/gateway/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Readable } from 'stream'; - -export interface FcRequest { - readonly headers: Record; - readonly path: string; - readonly queries: Record; - readonly method: string; - readonly clientIP: string; - readonly url: string; -} - -export interface FcResponse { - readonly setStatusCode: (statusCode: number) => void; - readonly setHeader: (key: string, value: string) => void; - readonly deleteHeader: (key: string) => void; - readonly send: (body: Buffer|Readable|string) => void; -} diff --git a/package.json b/package.json index 3dafa06f2..048a9eb66 100644 --- a/package.json +++ b/package.json @@ -23,21 +23,17 @@ "@commitlint/cli": "^9.0.1", "@commitlint/config-angular": "^9.0.1", "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@now/node": "^1.5.1", "@types/bluebird": "^3.5.30", "@types/bytes": "^3.1.0", "@types/debug": "^4.1.5", "@types/fs-extra": "^9.0.1", "@types/hapi__joi": "^17.1.3", "@types/inquirer": "^6.0.3", - "@types/koa": "^2.11.3", - "@types/koa-router": "^7.0.42", "@types/listr": "^0.14.2", "@types/lodash": "^4.14.150", "@types/lru-cache": "^5.1.0", "@types/node": "^12", "@types/nunjucks": "^3.1.3", - "@types/supertest": "^2.0.8", "@types/urlsafe-base64": "^1.0.28", "@types/yaml": "^1.9.7", "@vuepress/plugin-google-analytics": "^1.5.1", @@ -57,7 +53,6 @@ "pkg": "^4.4.8", "sinon": "^9.0.2", "source-map-support": "^0.5.18", - "supertest": "^4.0.2", "ts-node": "^8.9.0", "tslint": "^6.1.1", "tslint-config-prettier": "^1.17.0", @@ -107,10 +102,7 @@ "get-port": "^5.1.0", "global-agent": "^2.1.7", "got": "11.4.0", - "http-errors": "^1.7.3", "inquirer": "^7.1.0", - "koa": "^2.11.0", - "koa-router": "^9.1.0", "listr": "^0.14.3", "lodash": "^4.17.17", "lru-cache": "^5.1.1", diff --git a/test/gateway/index.test.ts b/test/gateway/index.test.ts deleted file mode 100644 index 1a8d97c1e..000000000 --- a/test/gateway/index.test.ts +++ /dev/null @@ -1,299 +0,0 @@ -import test from 'ava'; -import path from 'path'; -import request from 'supertest'; -import { JSDOM } from 'jsdom'; -import sinon from 'sinon'; - -import * as gateway from '../../lib/gateway'; - -test('will work', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/') - .expect(200) - .then(res => { - t.is(res.text, 'Surgio Gateway'); - }); - - await request(httpServer) - .get('/robot.txt') - .expect(200) - .then(res => { - t.is(res.text, 'User-agent: *\n' + - 'Disallow: /'); - }); -}); - -test('koa application', t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - t.deepEqual(surgioServer.config, app.surgioConfig); -}); - -test('get artifact', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/get-artifact/test.conf') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); - - await request(httpServer) - .get('/get-artifact/test.conf?dl=1') - .expect(200) - .expect('content-disposition', 'attachment; filename="test.conf"'); - - await request(httpServer) - .get('/get-artifact/') - .expect(404); - - await request(httpServer) - .get('/get-artifact/notfound.conf') - .expect(404); -}); - -test('get artifact should be idempotent', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - const result1 = await request(httpServer) - .get('/get-artifact/test2.conf') - .expect(200) - .then(res => res.text); - const result2 = await request(httpServer) - .get('/get-artifact/test2.conf') - .expect(200) - .then(res => res.text); - const result3 = await request(httpServer) - .get('/get-artifact/test2.conf') - .expect(200) - .then(res => res.text); - - t.is(result1, result2); - t.is(result2, result3); -}); - -test('transform artifact surge', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=surge-policy') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=surge-policy&filter=usFilter') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); -}); - -test('transform artifact qx', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=qx-server') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=qx-server&filter=globalFilter') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); -}); - -test('transform artifact clash', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=clash-provider') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=clash-provider&filter=globalFilter') - .expect(200) - .then(res => { - t.snapshot(res.text); - }); -}); - -test('transform artifact unknown format and filter', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/get-artifact/notfound.conf') - .expect(404); - - await request(httpServer) - .get('/get-artifact/test.conf?format=unknown-format') - .expect(400) - .then(res => { - t.true(res.text.includes('unsupported format')); - }); - - await request(httpServer) - .get('/get-artifact/test.conf?format=surge-policy&filter=unknown-filter') - .expect(200); -}); - -test('list artifact', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const httpServer = gateway.createHttpServer({ - cwd: fixture, - }); - - await request(httpServer) - .get('/list-artifact') - .expect(200) - .then(res => { - const { window } = new JSDOM(res.text); - const $container = window.document.querySelector('.container'); - const $artifacts = $container.querySelectorAll('.artifact'); - - t.is($artifacts.length, 2); - t.snapshot($container.querySelector('ul').innerHTML); - }); -}); - -test('auth', async t => { - const sandbox = sinon.createSandbox(); - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - sandbox.stub(app.surgioConfig.gateway, 'auth').value(true); - - await request(app.callback()) - .get('/list-artifact') - .expect(401) - .then(res => { - t.true(res.text.includes('invalid access_token')); - }); - - await request(app.callback()) - .get('/list-artifact?access_token=abcd') - .expect(200); - - sandbox.restore(); -}); - -test('qx-script', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - const res1 = await request(app.callback()) - .get('/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js') - .expect(200); - const res2 = await request(app.callback()) - .get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js') - .expect(200); - const res3 = await request(app.callback()) - .get('/qx-script?id=abcdef,bcdefg&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js') - .expect(200); - const res4 = await request(app.callback()) - .get('/qx-script?id=abcdef&url=https%3A%2F%2Fraw.githubusercontent.com%2Fcrossutility%2FQuantumult-X%2Fb7c712ba0ce08bf8c0de9bccc52d1a0c21d4a2d1%2Fsample-rewrite-with-script.js') - .expect(200); - - t.snapshot(res1.text); - t.snapshot(res2.text); - t.snapshot(res3.text); - t.snapshot(res4.text); -}); - -test('qx-script error', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - await request(app.callback()) - .get('/qx-script?url=http://example.com/error') - .expect(500); - - await request(app.callback()) - .get('/qx-script') - .expect(400); - - await request(app.callback()) - .get('/qx-script?url=https://github.com/crossutility/Quantumult-X/blob/master/sample-rewrite-with-script.js') - .expect(400); - - t.pass(); -}); - -test('qx-rewrite-remote', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - const res = await request(app.callback()) - .get('/qx-rewrite-remote?url=https://gist.githubusercontent.com/geekdada/245b7de6af69a9d8e70e7c867c9fb0a9/raw/59303d7e8ee0e740f63cfff8946233f28909b1a8/Js.conf') - .expect(200) - .expect('content-type', 'text/plain; charset=utf-8') - .expect('cache-control', 'max-age=3600, s-maxage=3600'); - - t.snapshot(res.text); -}); - -test('qx-rewrite-remote with id', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - const res = await request(app.callback()) - .get('/qx-rewrite-remote?id=abcde,fghijk&url=https://gist.githubusercontent.com/geekdada/245b7de6af69a9d8e70e7c867c9fb0a9/raw/59303d7e8ee0e740f63cfff8946233f28909b1a8/Js.conf') - .expect(200); - - t.snapshot(res.text); -}); - -test('qx-rewrite-remote error', async t => { - const fixture = path.join(__dirname, '../fixture/gateway'); - const surgioServer = gateway.createSurgioServer(fixture); - const app = gateway.createKoaApp(surgioServer); - - await request(app.callback()) - .get('/qx-rewrite-remote?url=https://github.com/crossutility/Quantumult-X/blob/master/sample.conf') - .expect(400); - - await request(app.callback()) - .get('/qx-rewrite-remote') - .expect(400); - - t.pass(); -}); diff --git a/test/gateway/server.test.ts b/test/gateway/server.test.ts deleted file mode 100644 index 007098107..000000000 --- a/test/gateway/server.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import test from 'ava'; -import { Server } from '../../lib/gateway/server'; - -test('getEditUrl', t => { - t.is(Server.getEditUrl('http://example.com', 'name.conf'), 'http://example.com/name.conf'); - t.is(Server.getEditUrl('http://example.com/', 'name.conf'), 'http://example.com/name.conf'); - t.is(Server.getEditUrl({ - url: 'http://example.com/', - type: 'git', - }, 'name.conf'), 'http://example.com/name.conf'); - t.is(Server.getEditUrl(undefined, 'name.conf'), ''); -}); diff --git a/test/gateway/snapshots/index.test.ts.md b/test/gateway/snapshots/index.test.ts.md deleted file mode 100644 index 1394abcc2..000000000 --- a/test/gateway/snapshots/index.test.ts.md +++ /dev/null @@ -1,485 +0,0 @@ -# Snapshot report for `test/gateway/index.test.ts` - -The actual snapshot is saved in `index.test.ts.snap`. - -Generated by [AVA](https://avajs.dev). - -## get artifact - -> Snapshot 1 - - `🇺🇸US 1 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, obfs=tls, obfs-host=gateway-carry.icloud.com␊ - 🇺🇸US 2 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module␊ - 🇺🇲 US = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=true, obfs=tls, obfs-host=gateway-carry.icloud.com, tfo=true␊ - Snell = snell, us.example.com, 443, psk=password, obfs=tls␊ - HTTPS = https, us.example.com, 443, username, password␊ - ss1 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=true␊ - ss2 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=false, obfs=tls, obfs-host=www.bing.com␊ - vmess = vmess, server, 443, username=uuid␊ - vmess custom header = vmess, server, 443, username=uuid, ws=true, ws-path=/path, ws-headers="host:server|user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1|edge:www.baidu.com", tls=true, tls13=false, skip-cert-verify=false, sni=server␊ - http 1 = https, server, 443, username, password, tls13=false, skip-cert-verify=false␊ - http 2 = http, server, 443, username, password␊ - snell = snell, server, 44046, psk=yourpsk, obfs=http␊ - ss4 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=false, obfs=tls, obfs-host=example.com␊ - ----␊ - 🇺🇸US 1, 🇺🇸US 2, 🇺🇸US 3, 🇺🇲 US, Snell, HTTPS, ss1, ss2, ss3, vmess, vmess custom header, http 1, http 2, snell, ss4, ss-wss␊ - ` - -## list artifact - -> Snapshot 1 - - `␊ - ␊ -
  • ␊ -
    ␊ -
    test.conf
    ␊ -
    /get-artifact/test.conf?access_token=abcd
    ␊ -
    ␊ - ␊ -
    Provider: ss
    ␊ - ␊ - ␊ - ␊ - ␊ - ␊ -
    Provider: custom
    ␊ - ␊ - ␊ - ␊ -
    Provider: clash
    ␊ - ␊ - ␊ - ␊ -
    ␊ - ␊ -
    ␊ -
  • ␊ - ␊ -
  • ␊ -
    ␊ -
    test2.conf
    ␊ -
    /get-artifact/test2.conf?access_token=abcd
    ␊ -
    ␊ - ␊ -
    Provider: rename
    ␊ - ␊ - ␊ - ␊ -
    ␊ - ␊ -
    ␊ -
  • ␊ - ␊ - ` - -## qx-rewrite-remote - -> Snapshot 1 - - `hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, mp.weixin.qq.com, api.bilibili.com, app.bilibili.com, *.zhihu.com␊ - ␊ - # 去微博应用内广告 (By yichahucha)␊ - ^https?://m?api\\.weibo\\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\\!/photos/pic_recommend_status) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fyichahucha%2Fsurge%2Fmaster%2Fwb_ad.js␊ - ^https?://(sdk|wb)app\\.uve\\.weibo\\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fyichahucha%2Fsurge%2Fmaster%2Fwb_launch.js␊ - ␊ - # 去微信公众号广告 (By Choler)␊ - ^https?:\\/\\/mp\\.weixin\\.qq\\.com\\/mp\\/getappmsgad url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FWechat.js␊ - ␊ - # 知乎去广告 (By onewayticket255)␊ - ^https://api.zhihu.com/moments\\?(action|feed_type) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520feed.js␊ - ^https://api.zhihu.com/topstory/recommend url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520recommend.js␊ - ^https://api.zhihu.com/.*/questions url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FSurge%2FJS%2FZhihu-ad-answer.js␊ - ^https://api.zhihu.com/market/header url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520market.js␊ - ␊ - # 哔哩哔哩动画去广告 (By onewayticket255)␊ - ^https://app.bilibili.com/x/resource/show/tab\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FbilibiliTab.js␊ - ^https://app.bilibili.com/x/v2/feed/index\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520feed.js␊ - ^https://app.bilibili.com/x/v2/account/mine\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FbilibiliAccount.js␊ - ^https://app.bilibili.com/x/v2/view\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520view%2520relate.js␊ - ^https://app.bilibili.com/x/v2/rank url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520rank.js␊ - ^https://api.bilibili.com/x/v2/reply/main\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520reply.js␊ - ^https://app.bilibili.com/x/v2/show/popular/index\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520hot.js` - -## qx-rewrite-remote with id - -> Snapshot 1 - - `hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, mp.weixin.qq.com, api.bilibili.com, app.bilibili.com, *.zhihu.com␊ - ␊ - # 去微博应用内广告 (By yichahucha)␊ - ^https?://m?api\\.weibo\\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\\!/photos/pic_recommend_status) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fyichahucha%2Fsurge%2Fmaster%2Fwb_ad.js&id=abcde%2Cfghijk␊ - ^https?://(sdk|wb)app\\.uve\\.weibo\\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fyichahucha%2Fsurge%2Fmaster%2Fwb_launch.js&id=abcde%2Cfghijk␊ - ␊ - # 去微信公众号广告 (By Choler)␊ - ^https?:\\/\\/mp\\.weixin\\.qq\\.com\\/mp\\/getappmsgad url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FWechat.js&id=abcde%2Cfghijk␊ - ␊ - # 知乎去广告 (By onewayticket255)␊ - ^https://api.zhihu.com/moments\\?(action|feed_type) url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520feed.js&id=abcde%2Cfghijk␊ - ^https://api.zhihu.com/topstory/recommend url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520recommend.js&id=abcde%2Cfghijk␊ - ^https://api.zhihu.com/.*/questions url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FSurge%2FJS%2FZhihu-ad-answer.js&id=abcde%2Cfghijk␊ - ^https://api.zhihu.com/market/header url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520zhihu%2520market.js&id=abcde%2Cfghijk␊ - ␊ - # 哔哩哔哩动画去广告 (By onewayticket255)␊ - ^https://app.bilibili.com/x/resource/show/tab\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FbilibiliTab.js&id=abcde%2Cfghijk␊ - ^https://app.bilibili.com/x/v2/feed/index\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520feed.js&id=abcde%2Cfghijk␊ - ^https://app.bilibili.com/x/v2/account/mine\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2FNobyDa%2FScript%2Fmaster%2FQuantumultX%2FFile%2FbilibiliAccount.js&id=abcde%2Cfghijk␊ - ^https://app.bilibili.com/x/v2/view\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520view%2520relate.js&id=abcde%2Cfghijk␊ - ^https://app.bilibili.com/x/v2/rank url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520rank.js&id=abcde%2Cfghijk␊ - ^https://api.bilibili.com/x/v2/reply/main\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520reply.js&id=abcde%2Cfghijk␊ - ^https://app.bilibili.com/x/v2/show/popular/index\\?access_key url script-response-body https://example.com/qx-script?url=https%3A%2F%2Fraw.githubusercontent.com%2Fonewayticket255%2FSurge-Script%2Fmaster%2Fsurge%2520bilibili%2520hot.js&id=abcde%2Cfghijk` - -## qx-script - -> Snapshot 1 - - `/**␊ - * @supported 55BE3B10F8A1␊ - * THIS COMMENT IS GENERATED BY SURGIO␊ - */␊ - ␊ - // $request, $response, $notify(title, subtitle, message), console.log(message)␊ - // $request.scheme, $request.method, $request.url, $request.path, $request.headers␊ - // $response.statusCode, $response.headers, $response.body␊ - // You can optional change the response headers at the same time by using $done({body: modifiedBody, headers: modifiedHeaders}); only change the response headers is not allowed for script-response-body. The modifiedHeaders can be copied and modified from $response.headers, please do not change the content length, type and encoding field.␊ - // Response status can also be optional changed by using $done({body: modifiedBody, headers: modifiedHeaders, status: modifiedStatus}), the modifiedStatus should be like "HTTP/1.1 200 OK"␊ - ␊ - var body = $response.body;␊ - var obj = JSON.parse(body);␊ - ␊ - obj['result'] = 0;␊ - body = JSON.stringify(obj);␊ - ␊ - console.log(body);␊ - ␊ - $done(body);␊ - ` - -> Snapshot 2 - - `/**␊ - * @supported abcdef␊ - * THIS COMMENT IS GENERATED BY SURGIO␊ - */␊ - ␊ - // $request, $response, $notify(title, subtitle, message), console.log(message)␊ - // $request.scheme, $request.method, $request.url, $request.path, $request.headers␊ - // $response.statusCode, $response.headers, $response.body␊ - // You can optional change the response headers at the same time by using $done({body: modifiedBody, headers: modifiedHeaders}); only change the response headers is not allowed for script-response-body. The modifiedHeaders can be copied and modified from $response.headers, please do not change the content length, type and encoding field.␊ - // Response status can also be optional changed by using $done({body: modifiedBody, headers: modifiedHeaders, status: modifiedStatus}), the modifiedStatus should be like "HTTP/1.1 200 OK"␊ - ␊ - var body = $response.body;␊ - var obj = JSON.parse(body);␊ - ␊ - obj['result'] = 0;␊ - body = JSON.stringify(obj);␊ - ␊ - console.log(body);␊ - ␊ - $done(body);␊ - ` - -> Snapshot 3 - - `/**␊ - * @supported abcdef bcdefg␊ - * THIS COMMENT IS GENERATED BY SURGIO␊ - */␊ - ␊ - // $request, $response, $notify(title, subtitle, message), console.log(message)␊ - // $request.scheme, $request.method, $request.url, $request.path, $request.headers␊ - // $response.statusCode, $response.headers, $response.body␊ - // You can optional change the response headers at the same time by using $done({body: modifiedBody, headers: modifiedHeaders}); only change the response headers is not allowed for script-response-body. The modifiedHeaders can be copied and modified from $response.headers, please do not change the content length, type and encoding field.␊ - // Response status can also be optional changed by using $done({body: modifiedBody, headers: modifiedHeaders, status: modifiedStatus}), the modifiedStatus should be like "HTTP/1.1 200 OK"␊ - ␊ - var body = $response.body;␊ - var obj = JSON.parse(body);␊ - ␊ - obj['result'] = 0;␊ - body = JSON.stringify(obj);␊ - ␊ - console.log(body);␊ - ␊ - $done(body);␊ - ` - -> Snapshot 4 - - `/**␊ - * @supported abcdef␊ - * THIS COMMENT IS GENERATED BY SURGIO␊ - */␊ - ␊ - // $request, $response, $notify(title, subtitle, message), console.log(message)␊ - // $request.scheme, $request.method, $request.url, $request.path, $request.headers␊ - // $response.statusCode, $response.headers, $response.body␊ - // You can optional change the response headers at the same time by using $done({body: modifiedBody, headers: modifiedHeaders}); only change the response headers is not allowed for script-response-body. The modifiedHeaders can be copied and modified from $response.headers, please do not change the content length, type and encoding field.␊ - // Response status can also be optional changed by using $done({body: modifiedBody, headers: modifiedHeaders, status: modifiedStatus}), the modifiedStatus should be like "HTTP/1.1 200 OK"␊ - ␊ - var body = $response.body;␊ - var obj = JSON.parse(body);␊ - ␊ - obj['result'] = 0;␊ - body = JSON.stringify(obj);␊ - ␊ - console.log(body);␊ - ␊ - $done(body);␊ - ` - -## transform artifact clash - -> Snapshot 1 - - `---␊ - proxies:␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: 🇺🇸US 1␊ - password: password␊ - port: "443"␊ - server: us.example.com␊ - udp: false␊ - plugin: obfs␊ - plugin-opts:␊ - mode: tls␊ - host: gateway-carry.icloud.com␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: 🇺🇸US 2␊ - password: password␊ - port: "443"␊ - server: us.example.com␊ - udp: false␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: 🇺🇸US 3␊ - password: password␊ - port: "443"␊ - server: us.example.com␊ - udp: false␊ - plugin: v2ray-plugin␊ - plugin-opts:␊ - mode: websocket␊ - tls: true␊ - host: gateway-carry.icloud.com␊ - path: /␊ - mux: false␊ - headers: {}␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: 🇺🇲 US␊ - password: password␊ - port: "443"␊ - server: us.example.com␊ - udp: true␊ - plugin: obfs␊ - plugin-opts:␊ - mode: tls␊ - host: gateway-carry.icloud.com␊ - - type: snell␊ - name: Snell␊ - server: us.example.com␊ - port: "443"␊ - psk: password␊ - obfs-opts:␊ - mode: tls␊ - - type: http␊ - name: HTTPS␊ - server: us.example.com␊ - port: "443"␊ - username: username␊ - password: password␊ - tls: true␊ - skip-cert-verify: false␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: ss1␊ - password: password␊ - port: 443␊ - server: server␊ - udp: true␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: ss2␊ - password: password␊ - port: 443␊ - server: server␊ - udp: false␊ - plugin: obfs␊ - plugin-opts:␊ - mode: tls␊ - host: www.bing.com␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: ss3␊ - password: password␊ - port: 443␊ - server: server␊ - udp: false␊ - plugin: v2ray-plugin␊ - plugin-opts:␊ - mode: websocket␊ - tls: false␊ - host: server␊ - path: /␊ - mux: false␊ - headers: {}␊ - - type: vmess␊ - cipher: auto␊ - name: vmess␊ - server: server␊ - port: 443␊ - uuid: uuid␊ - alterId: "32"␊ - tls: false␊ - - type: vmess␊ - cipher: auto␊ - name: vmess custom header␊ - server: server␊ - port: 443␊ - uuid: uuid␊ - alterId: "32"␊ - network: ws␊ - tls: true␊ - skip-cert-verify: false␊ - ws-path: /path␊ - ws-headers:␊ - host: server␊ - edge: www.baidu.com␊ - - type: http␊ - name: http 1␊ - server: server␊ - port: 443␊ - username: username␊ - password: password␊ - tls: true␊ - skip-cert-verify: false␊ - - type: http␊ - name: http 2␊ - server: server␊ - port: 443␊ - username: username␊ - password: password␊ - - type: snell␊ - name: snell␊ - server: server␊ - port: 44046␊ - psk: yourpsk␊ - obfs-opts:␊ - mode: http␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: ss4␊ - password: password␊ - port: 443␊ - server: server␊ - udp: false␊ - plugin: obfs␊ - plugin-opts:␊ - mode: tls␊ - host: example.com␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: ss-wss␊ - password: password␊ - port: 443␊ - server: server␊ - udp: false␊ - plugin: v2ray-plugin␊ - plugin-opts:␊ - mode: websocket␊ - tls: true␊ - skip-cert-verify: false␊ - host: cloudflare.com␊ - path: /ws␊ - mux: false␊ - headers: {}␊ - ␊ - ...` - -> Snapshot 2 - - `---␊ - proxies:␊ - - type: ss␊ - cipher: chacha20-ietf-poly1305␊ - name: 🇺🇲 US␊ - password: password␊ - port: "443"␊ - server: us.example.com␊ - udp: true␊ - plugin: obfs␊ - plugin-opts:␊ - mode: tls␊ - host: gateway-carry.icloud.com␊ - ␊ - ...` - -## transform artifact qx - -> Snapshot 1 - - `shadowsocks=us.example.com:443, method=chacha20-ietf-poly1305, password=password, obfs=tls, obfs-host=gateway-carry.icloud.com, tag=🇺🇸US 1␊ - shadowsocks=us.example.com:443, method=chacha20-ietf-poly1305, password=password, tag=🇺🇸US 2␊ - shadowsocks=us.example.com:443, method=chacha20-ietf-poly1305, password=password, obfs=wss, obfs-host=gateway-carry.icloud.com, obfs-uri=/, tag=🇺🇸US 3␊ - shadowsocks=us.example.com:443, method=chacha20-ietf-poly1305, password=password, obfs=tls, obfs-host=gateway-carry.icloud.com, udp-relay=true, fast-open=true, tag=🇺🇲 US␊ - http=us.example.com:443, username=username, password=password, over-tls=true, tls-verification=true, tag=HTTPS␊ - shadowsocks=server:443, method=chacha20-ietf-poly1305, password=password, udp-relay=true, tag=ss1␊ - shadowsocks=server:443, method=chacha20-ietf-poly1305, password=password, obfs=tls, obfs-host=www.bing.com, tag=ss2␊ - shadowsocks=server:443, method=chacha20-ietf-poly1305, password=password, obfs=ws, obfs-host=server, obfs-uri=/, tag=ss3␊ - vmess=server:443, method=chacha20-ietf-poly1305, password=uuid, tag=vmess␊ - vmess=server:443, method=chacha20-ietf-poly1305, password=uuid, obfs=wss, obfs-uri=/path, obfs-host=server, tag=vmess custom header␊ - http=server:443, username=username, password=password, over-tls=true, tls-verification=true, tag=http 1␊ - http=server:443, username=username, password=password, tag=http 2␊ - shadowsocks=server:443, method=chacha20-ietf-poly1305, password=password, obfs=tls, obfs-host=example.com, tag=ss4␊ - shadowsocks=server:443, method=chacha20-ietf-poly1305, password=password, obfs=wss, obfs-host=cloudflare.com, obfs-uri=/ws, tag=ss-wss` - -> Snapshot 2 - - 'shadowsocks=us.example.com:443, method=chacha20-ietf-poly1305, password=password, obfs=tls, obfs-host=gateway-carry.icloud.com, udp-relay=true, fast-open=true, tag=🇺🇲 US' - -## transform artifact surge - -> Snapshot 1 - - `🇺🇸US 1 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, obfs=tls, obfs-host=gateway-carry.icloud.com␊ - 🇺🇸US 2 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module␊ - 🇺🇲 US = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=true, obfs=tls, obfs-host=gateway-carry.icloud.com, tfo=true␊ - Snell = snell, us.example.com, 443, psk=password, obfs=tls␊ - HTTPS = https, us.example.com, 443, username, password␊ - ss1 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=true␊ - ss2 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=false, obfs=tls, obfs-host=www.bing.com␊ - vmess = vmess, server, 443, username=uuid␊ - vmess custom header = vmess, server, 443, username=uuid, ws=true, ws-path=/path, ws-headers="host:server|user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1|edge:www.baidu.com", tls=true, tls13=false, skip-cert-verify=false, sni=server␊ - http 1 = https, server, 443, username, password, tls13=false, skip-cert-verify=false␊ - http 2 = http, server, 443, username, password␊ - snell = snell, server, 44046, psk=yourpsk, obfs=http␊ - ss4 = custom, server, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=false, obfs=tls, obfs-host=example.com` - -> Snapshot 2 - - `🇺🇸US 1 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, obfs=tls, obfs-host=gateway-carry.icloud.com␊ - 🇺🇸US 2 = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module␊ - 🇺🇲 US = custom, us.example.com, 443, chacha20-ietf-poly1305, password, https://raw.githubusercontent.com/ConnersHua/SSEncrypt/master/SSEncrypt.module, udp-relay=true, obfs=tls, obfs-host=gateway-carry.icloud.com, tfo=true␊ - vmess custom header = vmess, server, 443, username=uuid, ws=true, ws-path=/path, ws-headers="host:server|user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1|edge:www.baidu.com", tls=true, tls13=false, skip-cert-verify=false, sni=server` diff --git a/test/gateway/snapshots/index.test.ts.snap b/test/gateway/snapshots/index.test.ts.snap deleted file mode 100644 index 12eb28ae9..000000000 Binary files a/test/gateway/snapshots/index.test.ts.snap and /dev/null differ diff --git a/yarn.lock b/yarn.lock index 1e5a76b6d..7406bb594 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1084,15 +1084,6 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@now/node@^1.5.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@now/node/-/node-1.7.1.tgz#764a0c6bcb24967f8014c4f73ad238c292996fe3" - integrity sha512-+srVKopsVTPDR3u9eOjJryZroLTrPp8XEOuIDGBdfFcJuS7qpAomctSbfyA7WNyjC0ExtUxELqBg5sAedG5+2g== - dependencies: - "@types/node" "*" - ts-node "8.9.1" - typescript "3.9.3" - "@royli/hygen@^5.0.4": version "5.0.4" resolved "https://registry.yarnpkg.com/@royli/hygen/-/hygen-5.0.4.tgz#43e6f05e9c783ec3cd80f25792b036210fa540fc" @@ -1193,26 +1184,11 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@types/accepts@*": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" - integrity sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ== - dependencies: - "@types/node" "*" - "@types/bluebird@^3.5.30": version "3.5.32" resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.32.tgz#381e7b59e39f010d20bbf7e044e48f5caf1ab620" integrity sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g== -"@types/body-parser@*": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f" - integrity sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ== - dependencies: - "@types/connect" "*" - "@types/node" "*" - "@types/bytes@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@types/bytes/-/bytes-3.1.0.tgz#835a3e4aea3b4d7604aca216a78de372bff3ecc3" @@ -1233,33 +1209,6 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/connect@*": - version "3.4.33" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546" - integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== - dependencies: - "@types/node" "*" - -"@types/content-disposition@*": - version "0.5.3" - resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.3.tgz#0aa116701955c2faa0717fc69cd1596095e49d96" - integrity sha512-P1bffQfhD3O4LW0ioENXUhZ9OIa0Zn+P7M+pWgkCKaT53wVLSq0mrKksCID/FGHpFhRSxRGhgrQmfhRuzwtKdg== - -"@types/cookiejar@*": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.1.tgz#90b68446364baf9efd8e8349bb36bd3852b75b80" - integrity sha512-aRnpPa7ysx3aNW60hTiCtLHlQaIFsXFCgQlpakNgDNVFzbtusSY8PwjAQgRWfSk0ekNoBjO51eQRB6upA9uuyw== - -"@types/cookies@*": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.7.4.tgz#26dedf791701abc0e36b5b79a5722f40e455f87b" - integrity sha512-oTGtMzZZAVuEjTwCjIh8T8FrC8n/uwy+PG0yTvQcdZ7etoel7C7/3MSd7qrukENTgQtotG7gvBlBojuVs7X5rw== - dependencies: - "@types/connect" "*" - "@types/express" "*" - "@types/keygrip" "*" - "@types/node" "*" - "@types/dargs@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@types/dargs/-/dargs-5.1.0.tgz#06e2c943dadb9167967005ffd467a581a009d347" @@ -1270,25 +1219,6 @@ resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd" integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ== -"@types/express-serve-static-core@*": - version "4.17.8" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.8.tgz#b8f7b714138536742da222839892e203df569d1c" - integrity sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*": - version "4.17.6" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.6.tgz#6bce49e49570507b86ea1b07b806f04697fac45e" - integrity sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "*" - "@types/qs" "*" - "@types/serve-static" "*" - "@types/fs-extra@^9.0.1": version "9.0.1" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.1.tgz#91c8fc4c51f6d5dbe44c2ca9ab09310bd00c7918" @@ -1309,11 +1239,6 @@ resolved "https://registry.yarnpkg.com/@types/hapi__joi/-/hapi__joi-17.1.3.tgz#1b400fcf819e400949a4b4ec7fec73216c4f7088" integrity sha512-3+EUJ+haX1Ix/Lmn//qGE0l3dll7TouN+ukkorTroShhyQniOECd30psoxSUjcVE6vVjaS07mqhRkJ6lUZrrbw== -"@types/http-assert@*": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz#d775e93630c2469c2f980fc27e3143240335db3b" - integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ== - "@types/http-cache-semantics@*": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" @@ -1332,11 +1257,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== -"@types/keygrip@*": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72" - integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw== - "@types/keyv@*", "@types/keyv@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -1344,33 +1264,6 @@ dependencies: "@types/node" "*" -"@types/koa-compose@*": - version "3.2.5" - resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz#85eb2e80ac50be95f37ccf8c407c09bbe3468e9d" - integrity sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ== - dependencies: - "@types/koa" "*" - -"@types/koa-router@^7.0.42": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/koa-router/-/koa-router-7.4.1.tgz#3702a4cabe4558cc4eec70d5574acc04beecff7c" - integrity sha512-Hg78TXz78QYfEgdq3nTeRmQFEwJKZljsXb/DhtexmyrpRDRnl59oMglh9uPj3/WgKor0woANrYTnxA8gaWGK2A== - dependencies: - "@types/koa" "*" - -"@types/koa@*", "@types/koa@^2.11.3": - version "2.11.3" - resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.11.3.tgz#540ece376581b12beadf9a417dd1731bc31c16ce" - integrity sha512-ABxVkrNWa4O/Jp24EYI/hRNqEVRlhB9g09p48neQp4m3xL1TJtdWk2NyNQSMCU45ejeELMQZBYyfstyVvO2H3Q== - dependencies: - "@types/accepts" "*" - "@types/content-disposition" "*" - "@types/cookies" "*" - "@types/http-assert" "*" - "@types/keygrip" "*" - "@types/koa-compose" "*" - "@types/node" "*" - "@types/listr@^0.14.2": version "0.14.2" resolved "https://registry.yarnpkg.com/@types/listr/-/listr-0.14.2.tgz#2e5f80fbc3ca8dceb9940ce9bf8e3113ab452545" @@ -1389,11 +1282,6 @@ resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.0.tgz#57f228f2b80c046b4a1bd5cac031f81f207f4f03" integrity sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w== -"@types/mime@*": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.2.tgz#857a118d8634c84bba7ae14088e4508490cd5da5" - integrity sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q== - "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1439,16 +1327,6 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== -"@types/qs@*": - version "6.9.3" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.3.tgz#b755a0934564a200d3efdf88546ec93c369abd03" - integrity sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA== - -"@types/range-parser@*": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" - integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== - "@types/responselike@*", "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -1456,29 +1334,6 @@ dependencies: "@types/node" "*" -"@types/serve-static@*": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.4.tgz#6662a93583e5a6cabca1b23592eb91e12fa80e7c" - integrity sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug== - dependencies: - "@types/express-serve-static-core" "*" - "@types/mime" "*" - -"@types/superagent@*": - version "4.1.8" - resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-4.1.8.tgz#f663dcdd24705e07fce055003ace9b824f2a51c9" - integrity sha512-iol9KxQ7SLHatBJUiZ4uABrS4VS1frLjqPednxZz82eoCzo3Uy3TOH0p0ZIBbfBj8E/xqOtvizjBs9h7xi/l2g== - dependencies: - "@types/cookiejar" "*" - "@types/node" "*" - -"@types/supertest@^2.0.8": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@types/supertest/-/supertest-2.0.10.tgz#630d79b4d82c73e043e43ff777a9ca98d457cab7" - integrity sha512-Xt8TbEyZTnD5Xulw95GLMOkmjGICrOQyJ2jqgkSjAUR3mm7pAIzSR0NFBaMcwlzVvlpCjNwbATcWWwjNiZiFrQ== - dependencies: - "@types/superagent" "*" - "@types/through@*": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" @@ -1918,7 +1773,7 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -2181,7 +2036,7 @@ any-observable@^0.5.0: resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.5.1.tgz#ab7d49ff64ebe6dd3ae26760a3f5a881e8db791e" integrity sha512-8zv01bgDOp9PTmRTNCAHTw64TFP2rvlX4LvtNJLachaXY+AjmIvLT47fABNPCiIe89hKiSCo2n5zmPqI9CElPA== -any-promise@^1.0.0, any-promise@^1.1.0, any-promise@^1.3.0: +any-promise@^1.0.0, any-promise@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= @@ -2864,14 +2719,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cache-content-type@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-content-type/-/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c" - integrity sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA== - dependencies: - mime-types "^2.1.18" - ylru "^1.2.0" - cache-loader@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cache-loader/-/cache-loader-3.0.1.tgz#cee6cf4b3cdc7c610905b26bad6c2fc439c821af" @@ -3510,7 +3357,7 @@ compare-versions@^3.6.0: resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== -component-emitter@^1.2.0, component-emitter@^1.2.1: +component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== @@ -3611,14 +3458,14 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.3, content-disposition@~0.5.2: +content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== dependencies: safe-buffer "5.1.2" -content-type@^1.0.2, content-type@^1.0.4, content-type@~1.0.4: +content-type@^1.0.2, content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== @@ -3803,19 +3650,6 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== -cookiejar@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -cookies@~0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.8.0.tgz#1293ce4b391740a8406e3c9870e828c4b54f3f90" - integrity sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow== - dependencies: - depd "~2.0.0" - keygrip "~1.1.0" - copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -4353,11 +4187,6 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -4487,21 +4316,11 @@ delegate@^3.1.2: resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -depd@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -4782,7 +4601,7 @@ enabled@2.0.x: resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== -encodeurl@^1.0.2, encodeurl@~1.0.2: +encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= @@ -5217,7 +5036,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.2: +extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -5522,15 +5341,6 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@^2.3.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -5540,11 +5350,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -formidable@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" - integrity sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q== - formstream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/formstream/-/formstream-1.1.0.tgz#51f3970f26136eb0ad44304de4cebb50207b4479" @@ -5566,7 +5371,7 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@0.5.2, fresh@~0.5.2: +fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= @@ -6284,14 +6089,6 @@ htmlparser2@^3.3.0: inherits "^2.0.1" readable-stream "^3.1.1" -http-assert@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.4.1.tgz#c5f725d677aa7e873ef736199b89686cceb37878" - integrity sha512-rdw7q6GTlibqVVbXr0CKelfV5iY8G2HqEUkhSk297BMbSpSL8crXC+9rjKoMcZZEsksX30le6f/4ul4E28gegw== - dependencies: - deep-equal "~1.0.1" - http-errors "~1.7.2" - http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -6324,17 +6121,6 @@ http-errors@1.7.3, http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-errors@^1.6.3, http-errors@^1.7.3: - version "1.8.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz#75d1bbe497e1044f51e4ee9e704a62f28d336507" - integrity sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-errors@~1.6.2: version "1.6.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" @@ -6907,11 +6693,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522" - integrity sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== - is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -7435,13 +7216,6 @@ just-extend@^4.0.2: resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.1.0.tgz#7278a4027d889601640ee0ce0e5a00b992467da4" integrity sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA== -keygrip@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226" - integrity sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ== - dependencies: - tsscmp "1.0.6" - keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -7492,66 +7266,6 @@ ko-sleep@^1.0.3: dependencies: ms "^2.0.0" -koa-compose@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7" - integrity sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec= - dependencies: - any-promise "^1.1.0" - -koa-compose@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877" - integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw== - -koa-convert@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/koa-convert/-/koa-convert-1.2.0.tgz#da40875df49de0539098d1700b50820cebcd21d0" - integrity sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA= - dependencies: - co "^4.6.0" - koa-compose "^3.0.0" - -koa-router@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/koa-router/-/koa-router-9.1.0.tgz#47d1ce2109fd62b1d76eb42df90b635ff93b6831" - integrity sha512-5xakU0Ip2oFXPaA5882NTLopb5iaNfipBmTU5AoGbgDHOsHqRQDnaMnazj8DmDCt2rSxNB2TBBVLO9OiM0TvdA== - dependencies: - debug "^4.1.1" - http-errors "^1.7.3" - koa-compose "^4.1.0" - methods "^1.1.2" - path-to-regexp "^6.1.0" - -koa@^2.11.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/koa/-/koa-2.13.0.tgz#25217e05efd3358a7e5ddec00f0a380c9b71b501" - integrity sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ== - dependencies: - accepts "^1.3.5" - cache-content-type "^1.0.0" - content-disposition "~0.5.2" - content-type "^1.0.4" - cookies "~0.8.0" - debug "~3.1.0" - delegates "^1.0.0" - depd "^1.1.2" - destroy "^1.0.4" - encodeurl "^1.0.2" - escape-html "^1.0.3" - fresh "~0.5.2" - http-assert "^1.3.0" - http-errors "^1.6.3" - is-generator-function "^1.0.7" - koa-compose "^4.1.0" - koa-convert "^1.2.0" - on-finished "^2.3.0" - only "~0.0.2" - parseurl "^1.3.2" - statuses "^1.5.0" - type-is "^1.6.16" - vary "^1.1.2" - kuler@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" @@ -8277,7 +7991,7 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@^1.1.1, methods@^1.1.2, methods@~1.1.2: +methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= @@ -8322,14 +8036,14 @@ mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: mime-db "1.44.0" -mime@1.6.0, mime@^1.3.4, mime@^1.4.1: +mime@1.6.0, mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -8992,7 +8706,7 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -on-finished@^2.3.0, on-finished@~2.3.0: +on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= @@ -9032,11 +8746,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -only@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" - integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q= - open@^7.0.0: version "7.0.4" resolved "https://registry.yarnpkg.com/open/-/open-7.0.4.tgz#c28a9d315e5c98340bf979fdcb2e58664aa10d83" @@ -9404,7 +9113,7 @@ parse5@5.1.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parseurl@^1.3.2, parseurl@~1.3.2, parseurl@~1.3.3: +parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -9493,11 +9202,6 @@ path-to-regexp@^1.7.0: dependencies: isarray "0.0.1" -path-to-regexp@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.1.0.tgz#0b18f88b7a0ce0bfae6a25990c909ab86f512427" - integrity sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw== - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -10201,7 +9905,7 @@ qs@6.7.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@^6.4.0, qs@^6.5.1: +qs@^6.4.0: version "6.9.4" resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== @@ -10362,7 +10066,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@^2.3.7, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@^2.3.7, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -11058,11 +10762,6 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -11480,7 +11179,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@^1.3.1, statuses@^1.5.0, statuses@~1.5.0: +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@^1.3.1, statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -11787,22 +11486,6 @@ stylus@^0.54.5: semver "^6.0.0" source-map "^0.7.3" -superagent@^3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" - integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA== - dependencies: - component-emitter "^1.2.0" - cookiejar "^2.1.0" - debug "^3.1.0" - extend "^3.0.0" - form-data "^2.3.1" - formidable "^1.2.0" - methods "^1.1.1" - mime "^1.4.1" - qs "^6.5.1" - readable-stream "^2.3.5" - supertap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supertap/-/supertap-1.0.0.tgz#bd9751c7fafd68c68cf8222a29892206a119fa9e" @@ -11814,14 +11497,6 @@ supertap@^1.0.0: serialize-error "^2.1.0" strip-ansi "^4.0.0" -supertest@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/supertest/-/supertest-4.0.2.tgz#c2234dbdd6dc79b6f15b99c8d6577b90e4ce3f36" - integrity sha512-1BAbvrOZsGA3YTCWqbmh14L0YEq0EGICX/nBnfkfVJn7SrxQV1I3pMYjSzG9y/7ZU2V9dWqyqk2POwxlb09duQ== - dependencies: - methods "^1.1.2" - superagent "^3.8.3" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -12213,17 +11888,6 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== -ts-node@8.9.1: - version "8.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.1.tgz#2f857f46c47e91dcd28a14e052482eb14cfd65a5" - integrity sha512-yrq6ODsxEFTLz0R3BX2myf0WBCSQh9A+py8PBo1dCzWIOcvisbyH6akNKqDHMgXePF2kir5mm5JXJTH3OUJYOQ== - dependencies: - arg "^4.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.17" - yn "3.1.1" - ts-node@^8.9.0: version "8.10.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" @@ -12271,11 +11935,6 @@ tslint@^6.1.1: tslib "^1.10.0" tsutils "^2.29.0" -tsscmp@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" - integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== - "tsutils@^2.28.0 || ^3.0.0": version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -12366,7 +12025,7 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: +type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -12386,11 +12045,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.9.3: - version "3.9.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" - integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== - typescript@^3.8.3: version "3.9.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a" @@ -12733,7 +12387,7 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vary@^1.1.2, vary@~1.1.2: +vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= @@ -13416,11 +13070,6 @@ yargs@^15.0.2, yargs@^15.4.0: y18n "^4.0.0" yargs-parser "^18.1.2" -ylru@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.2.1.tgz#f576b63341547989c1de7ba288760923b27fe84f" - integrity sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ== - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"