fast-proxy-lite
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -5,8 +5,8 @@ import * as Http from 'http'; | ||
type Options = { | ||
export type Options = { | ||
base?: string; | ||
cacheURLs?: number; | ||
requests?: { | ||
http?: Http.Agent, | ||
https?: Https.Agent | ||
http?: Http.Agent; | ||
https?: Https.Agent; | ||
}; | ||
@@ -16,11 +16,21 @@ keepAliveMsecs?: number; | ||
rejectUnauthorized?: boolean; | ||
} | ||
}; | ||
type ProxyRequestResponse = { | ||
export type ProxyRequestResponse = { | ||
statusCode: Number; | ||
headers: Http.OutgoingHttpHeaders; | ||
stream: Stream; | ||
}; | ||
export type ProxyOptions = { | ||
base?: string; | ||
onClientConnectionTerminated?(res: Http.ServerResponse, err: Error, response: ProxyRequestResponse): void; | ||
onResponse?(req: Http.IncomingMessage, res: Http.ServerResponse, stream: Stream): void; | ||
rewriteRequestHeaders?(req: Http.IncomingMessage, headers: Http.IncomingHttpHeaders): Http.IncomingHttpHeaders; | ||
rewriteHeaders?(headers: Http.OutgoingHttpHeaders): Http.OutgoingHttpHeaders; | ||
request?: Http.RequestOptions; | ||
queryString?: string; | ||
} | ||
declare function fastProxy(options?: Options): { | ||
export type FastProxy = { | ||
proxy( | ||
@@ -30,11 +40,3 @@ originReq: Http.IncomingMessage, | ||
source: string, | ||
opts?: { | ||
base?: string; | ||
onClientConnectionTerminated?(res: Http.ServerResponse, err: Error, response: ProxyRequestResponse): void; | ||
onResponse?(req: Http.IncomingMessage, res: Http.ServerResponse, stream: Stream): void; | ||
rewriteRequestHeaders?(req: Http.IncomingMessage, headers: Http.IncomingHttpHeaders): Http.IncomingHttpHeaders; | ||
rewriteHeaders?(headers: Http.OutgoingHttpHeaders): Http.OutgoingHttpHeaders; | ||
request?: Http.RequestOptions; | ||
queryString?: string; | ||
} | ||
opts?: ProxyOptions | ||
): void; | ||
@@ -44,2 +46,4 @@ close(): void; | ||
declare function fastProxy(options?: Options): FastProxy | ||
export default fastProxy |
{ | ||
"name": "fast-proxy-lite", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Forward your HTTP request to another server.", | ||
@@ -38,18 +38,18 @@ "main": "index.js", | ||
"devDependencies": { | ||
"0http": "^3.1.1", | ||
"body-parser": "^1.19.0", | ||
"chai": "^4.3.4", | ||
"follow-redirects": "^1.14.5", | ||
"0http": "^3.4.1", | ||
"body-parser": "^1.20.0", | ||
"chai": "^4.3.6", | ||
"follow-redirects": "^1.15.2", | ||
"http-proxy": "^1.18.1", | ||
"mocha": "^9.1.3", | ||
"nock": "^13.2.0", | ||
"mocha": "^10.0.0", | ||
"nock": "^13.2.9", | ||
"nyc": "^15.1.0", | ||
"pem": "^1.14.4", | ||
"restana": "^4.9.2", | ||
"supertest": "^6.1.6" | ||
"pem": "^1.14.6", | ||
"restana": "^4.9.6", | ||
"supertest": "^6.2.4" | ||
}, | ||
"dependencies": { | ||
"pump": "^3.0.0", | ||
"tiny-lru": "^7.0.6" | ||
"tiny-lru": "^8.0.2" | ||
} | ||
} |
17193
351
+ Addedtiny-lru@8.0.2(transitive)
- Removedtiny-lru@7.0.6(transitive)
Updatedtiny-lru@^8.0.2