vscode-proxy-agent
Advanced tools
Comparing version 0.11.0 to 0.12.0
# Change Log | ||
Notable changes will be documented here. | ||
## [0.12.0] | ||
- Avoid buffer deprecation warning (fixes [microsoft/vscode#136874](https://github.com/microsoft/vscode/issues/136874)) | ||
## [0.11.0] | ||
@@ -5,0 +8,0 @@ - Override original agent again (fixes [microsoft/vscode#117054](https://github.com/microsoft/vscode/issues/117054)) |
@@ -43,7 +43,3 @@ /// <reference types="node" /> | ||
const PacProxyAgent: typeof _PacProxyAgent; | ||
/** | ||
* Supported "protocols". Delegates out to the `get-uri` module. | ||
*/ | ||
const protocols: string[]; | ||
} | ||
export = createPacProxyAgent; |
@@ -17,3 +17,2 @@ "use strict"; | ||
const once_1 = __importDefault(require("@tootallnate/once")); | ||
const get_uri_1 = __importDefault(require("get-uri")); | ||
const debug_1 = __importDefault(require("debug")); | ||
@@ -157,6 +156,2 @@ const url_1 = require("url"); | ||
createPacProxyAgent.PacProxyAgent = _PacProxyAgent; | ||
/** | ||
* Supported "protocols". Delegates out to the `get-uri` module. | ||
*/ | ||
createPacProxyAgent.protocols = Object.keys(get_uri_1.default.protocols); | ||
createPacProxyAgent.prototype = _PacProxyAgent.prototype; | ||
@@ -163,0 +158,0 @@ })(createPacProxyAgent || (createPacProxyAgent = {})); |
@@ -5,2 +5,3 @@ /// <reference types="node" /> | ||
import * as tls from 'tls'; | ||
import * as nodeurl from 'url'; | ||
export declare enum LogLevel { | ||
@@ -53,5 +54,8 @@ Trace = 0, | ||
}, onRequest: boolean): { | ||
get: (url?: string | URL | null | undefined, options?: http.RequestOptions | null | undefined, callback?: ((res: http.IncomingMessage) => void) | undefined) => http.ClientRequest; | ||
request: (url?: string | URL | null | undefined, options?: http.RequestOptions | null | undefined, callback?: ((res: http.IncomingMessage) => void) | undefined) => http.ClientRequest; | ||
get: (url?: string | nodeurl.URL | null | undefined, options?: http.RequestOptions | null | undefined, callback?: ((res: http.IncomingMessage) => void) | undefined) => http.ClientRequest; | ||
request: (url?: string | nodeurl.URL | null | undefined, options?: http.RequestOptions | null | undefined, callback?: ((res: http.IncomingMessage) => void) | undefined) => http.ClientRequest; | ||
}; | ||
export interface SecureContextOptionsPatch { | ||
_vscodeAdditionalCaCerts?: string[]; | ||
} | ||
export declare function createTlsPatch(originals: typeof tls): { | ||
@@ -58,0 +62,0 @@ createSecureContext: typeof tls.createSecureContext; |
@@ -172,4 +172,5 @@ "use strict"; | ||
errorCount++; | ||
callback(); | ||
log(LogLevel.Error, 'ProxyResolver#resolveProxy', toErrorMessage(err), stackText); | ||
const fallback = cache.values().next().value; // fall back to any proxy (https://github.com/microsoft/vscode/issues/122825) | ||
callback(fallback); | ||
log(LogLevel.Error, 'ProxyResolver#resolveProxy', fallback, toErrorMessage(err), stackText); | ||
}); | ||
@@ -308,18 +309,18 @@ } | ||
return { | ||
createSecureContext: patch(originals.createSecureContext) | ||
createSecureContext: patchCreateSecureContext(originals.createSecureContext), | ||
}; | ||
function patch(original) { | ||
return function (details) { | ||
const context = original.apply(null, arguments); | ||
const certs = details._vscodeAdditionalCaCerts; | ||
if (certs) { | ||
for (const cert of certs) { | ||
context.context.addCACert(cert); | ||
} | ||
} | ||
exports.createTlsPatch = createTlsPatch; | ||
function patchCreateSecureContext(original) { | ||
return function (details) { | ||
const context = original.apply(null, arguments); | ||
const certs = details._vscodeAdditionalCaCerts; | ||
if (certs) { | ||
for (const cert of certs) { | ||
context.context.addCACert(cert); | ||
} | ||
return context; | ||
}; | ||
} | ||
} | ||
return context; | ||
}; | ||
} | ||
exports.createTlsPatch = createTlsPatch; | ||
function useSystemCertificates(params, useSystemCertificates, opts, callback) { | ||
@@ -326,0 +327,0 @@ if (useSystemCertificates) { |
{ | ||
"name": "vscode-proxy-agent", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "NodeJS http(s) agent implementation for VS Code", | ||
@@ -34,3 +34,2 @@ "main": "out/index.js", | ||
"debug": "^4.3.1", | ||
"get-uri": "^3.0.2", | ||
"http-proxy-agent": "^4.0.1", | ||
@@ -37,0 +36,0 @@ "https-proxy-agent": "^5.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
55059
8
717
- Removedget-uri@^3.0.2
- Removedcore-util-is@1.0.3(transitive)
- Removeddata-uri-to-buffer@3.0.1(transitive)
- Removedfile-uri-to-path@2.0.0(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedftp@0.3.10(transitive)
- Removedget-uri@3.0.2(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedxregexp@2.0.0(transitive)