chore: update http-proxy-agent (#10190)

This commit is contained in:
jrandolf 2023-05-16 15:11:11 +02:00 committed by GitHub
parent 372d12172b
commit 354ac3bfc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 8 deletions

50
package-lock.json generated
View File

@ -1646,6 +1646,7 @@
},
"node_modules/@tootallnate/once": {
"version": "2.0.0",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 10"
@ -4640,6 +4641,7 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
"integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
"dev": true,
"dependencies": {
"@tootallnate/once": "2",
"agent-base": "6",
@ -9399,7 +9401,7 @@
"dependencies": {
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "5.0.0",
"http-proxy-agent": "6.0.1",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
@ -9431,6 +9433,29 @@
"dev": true,
"license": "MIT"
},
"packages/browsers/node_modules/agent-base": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.1.tgz",
"integrity": "sha512-V9to8gr2GK7eA+xskWGAFUX/TLSQKuH2TI06c/jGLL6yLp3oEjtnqM7a5tPV9fC1rabLeAgThZeBwsYX+WWHpw==",
"dependencies": {
"debug": "^4.3.4"
},
"engines": {
"node": ">= 14"
}
},
"packages/browsers/node_modules/http-proxy-agent": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-6.0.1.tgz",
"integrity": "sha512-rD8wrfJHbnVll9lkIpQH3vDbKON1Ssciggwydom/r89HLBXEqdMhL6wx7QF5WePDPSr0OdoztdXoojbrXadG5Q==",
"dependencies": {
"agent-base": "^7.0.1",
"debug": "^4.3.4"
},
"engines": {
"node": ">= 14"
}
},
"packages/ng-schematics": {
"name": "@puppeteer/ng-schematics",
"version": "0.2.0",
@ -10520,7 +10545,7 @@
"@types/yargs": "17.0.22",
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "5.0.0",
"http-proxy-agent": "6.0.1",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
@ -10532,6 +10557,23 @@
"@types/node": {
"version": "14.18.36",
"dev": true
},
"agent-base": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.1.tgz",
"integrity": "sha512-V9to8gr2GK7eA+xskWGAFUX/TLSQKuH2TI06c/jGLL6yLp3oEjtnqM7a5tPV9fC1rabLeAgThZeBwsYX+WWHpw==",
"requires": {
"debug": "^4.3.4"
}
},
"http-proxy-agent": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-6.0.1.tgz",
"integrity": "sha512-rD8wrfJHbnVll9lkIpQH3vDbKON1Ssciggwydom/r89HLBXEqdMhL6wx7QF5WePDPSr0OdoztdXoojbrXadG5Q==",
"requires": {
"agent-base": "^7.0.1",
"debug": "^4.3.4"
}
}
}
},
@ -10740,7 +10782,8 @@
"dev": true
},
"@tootallnate/once": {
"version": "2.0.0"
"version": "2.0.0",
"dev": true
},
"@tsconfig/node10": {
"version": "1.0.9",
@ -12701,6 +12744,7 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
"integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
"dev": true,
"requires": {
"@tootallnate/once": "2",
"agent-base": "6",

View File

@ -99,7 +99,7 @@
"dependencies": {
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "5.0.0",
"http-proxy-agent": "6.0.1",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",

View File

@ -19,10 +19,13 @@ import * as http from 'http';
import * as https from 'https';
import {URL} from 'url';
import createHttpProxyAgent from 'http-proxy-agent';
import createHttpsProxyAgent from 'https-proxy-agent';
import * as httpProxyAgent from 'http-proxy-agent';
import * as httpsProxyAgent from 'https-proxy-agent';
import {getProxyForUrl} from 'proxy-from-env';
const {HttpProxyAgent} = httpProxyAgent;
const {HttpsProxyAgent} = httpsProxyAgent;
export function headHttpRequest(url: URL): Promise<boolean> {
return new Promise(resolve => {
const request = httpRequest(
@ -58,9 +61,9 @@ export function httpRequest(
if (proxyURL) {
const proxy = new URL(proxyURL);
if (proxy.protocol === 'http:') {
options.agent = createHttpProxyAgent(proxyURL);
options.agent = new HttpProxyAgent(proxyURL);
} else {
options.agent = createHttpsProxyAgent({
options.agent = new HttpsProxyAgent({
host: proxy.host,
path: proxy.pathname,
port: proxy.port,