@puppeteer/browsers
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -40,5 +40,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -50,5 +47,3 @@ exports.getText = exports.getJSON = exports.downloadFile = exports.httpRequest = exports.headHttpRequest = void 0; | ||
const url_1 = require("url"); | ||
const http_proxy_agent_1 = __importDefault(require("http-proxy-agent")); | ||
const https_proxy_agent_1 = __importDefault(require("https-proxy-agent")); | ||
const proxy_from_env_1 = require("proxy-from-env"); | ||
const proxy_agent_1 = require("proxy-agent"); | ||
function headHttpRequest(url) { | ||
@@ -73,19 +68,4 @@ return new Promise(resolve => { | ||
headers: keepAlive ? { Connection: 'keep-alive' } : undefined, | ||
agent: new proxy_agent_1.ProxyAgent(), | ||
}; | ||
const proxyURL = (0, proxy_from_env_1.getProxyForUrl)(url.toString()); | ||
if (proxyURL) { | ||
const proxy = new url_1.URL(proxyURL); | ||
if (proxy.protocol === 'http:') { | ||
options.agent = (0, http_proxy_agent_1.default)(proxyURL); | ||
} | ||
else { | ||
options.agent = (0, https_proxy_agent_1.default)({ | ||
host: proxy.host, | ||
path: proxy.pathname, | ||
port: proxy.port, | ||
secureProxy: proxy.protocol === 'https:', | ||
headers: options.headers, | ||
}); | ||
} | ||
} | ||
const requestCallback = (res) => { | ||
@@ -92,0 +72,0 @@ if (res.statusCode && |
@@ -20,5 +20,3 @@ /** | ||
import { URL } from 'url'; | ||
import createHttpProxyAgent from 'http-proxy-agent'; | ||
import createHttpsProxyAgent from 'https-proxy-agent'; | ||
import { getProxyForUrl } from 'proxy-from-env'; | ||
import { ProxyAgent } from 'proxy-agent'; | ||
export function headHttpRequest(url) { | ||
@@ -42,19 +40,4 @@ return new Promise(resolve => { | ||
headers: keepAlive ? { Connection: 'keep-alive' } : undefined, | ||
agent: new ProxyAgent(), | ||
}; | ||
const proxyURL = getProxyForUrl(url.toString()); | ||
if (proxyURL) { | ||
const proxy = new URL(proxyURL); | ||
if (proxy.protocol === 'http:') { | ||
options.agent = createHttpProxyAgent(proxyURL); | ||
} | ||
else { | ||
options.agent = createHttpsProxyAgent({ | ||
host: proxy.host, | ||
path: proxy.pathname, | ||
port: proxy.port, | ||
secureProxy: proxy.protocol === 'https:', | ||
headers: options.headers, | ||
}); | ||
} | ||
} | ||
const requestCallback = (res) => { | ||
@@ -61,0 +44,0 @@ if (res.statusCode && |
{ | ||
"name": "@puppeteer/browsers", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Download and launch browsers", | ||
@@ -102,6 +102,4 @@ "scripts": { | ||
"extract-zip": "2.0.1", | ||
"http-proxy-agent": "5.0.0", | ||
"https-proxy-agent": "5.0.1", | ||
"progress": "2.0.3", | ||
"proxy-from-env": "1.1.0", | ||
"proxy-agent": "6.2.0", | ||
"tar-fs": "2.1.1", | ||
@@ -108,0 +106,0 @@ "unbzip2-stream": "1.4.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
8
8
344964
5162
+ Addedproxy-agent@6.2.0
+ Addedacorn@8.12.1(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedagent-base@7.1.1(transitive)
+ Addedast-types@0.13.4(transitive)
+ Addedbasic-ftp@5.0.5(transitive)
+ Addeddata-uri-to-buffer@6.0.2(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addeddegenerator@4.0.4(transitive)
+ Addedescodegen@1.14.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfs-extra@11.2.0(transitive)
+ Addedget-uri@6.0.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhttp-proxy-agent@6.1.17.0.2(transitive)
+ Addedhttps-proxy-agent@6.2.17.0.5(transitive)
+ Addedip@1.1.9(transitive)
+ Addedip-address@9.0.5(transitive)
+ Addedjsbn@1.1.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedlru-cache@7.18.3(transitive)
+ Addednetmask@2.0.2(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedpac-proxy-agent@6.0.4(transitive)
+ Addedpac-resolver@6.0.2(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedproxy-agent@6.2.0(transitive)
+ Addedsmart-buffer@4.2.0(transitive)
+ Addedsocks@2.8.3(transitive)
+ Addedsocks-proxy-agent@8.0.4(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsprintf-js@1.1.3(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addeduniversalify@2.0.1(transitive)
+ Addedvm2@3.9.19(transitive)
+ Addedword-wrap@1.2.5(transitive)
- Removedhttp-proxy-agent@5.0.0
- Removedhttps-proxy-agent@5.0.1
- Removedproxy-from-env@1.1.0
- Removed@tootallnate/once@2.0.0(transitive)
- Removedagent-base@6.0.2(transitive)
- Removedhttp-proxy-agent@5.0.0(transitive)
- Removedhttps-proxy-agent@5.0.1(transitive)