(proxySettings, options)
| 76319 | request3.agent = cachedAgents.httpProxyAgent; |
| 76320 | } else { |
| 76321 | if (!cachedAgents.httpsProxyAgent) { |
| 76322 | cachedAgents.httpsProxyAgent = new import_https_proxy_agent2.HttpsProxyAgent(proxyUrl, { headers }); |
| 76323 | } |
| 76324 | request3.agent = cachedAgents.httpsProxyAgent; |
| 76325 | } |
| 76326 | } |
| 76327 | function proxyPolicy(proxySettings, options) { |
| 76328 | if (!noProxyListLoaded) { |
| 76329 | globalNoProxyList.push(...loadNoProxy()); |
| 76330 | } |
| 76331 | const defaultProxy = proxySettings ? getUrlFromProxySettings(proxySettings) : getDefaultProxySettingsInternal(); |
| 76332 | const cachedAgents = {}; |
| 76333 | return { |
| 76334 | name: proxyPolicyName, |
| 76335 | async sendRequest(request3, next) { |
| 76336 | var _a5; |
| 76337 | if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a5 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a5 !== void 0 ? _a5 : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { |
| 76338 | setProxyAgentOnRequest(request3, cachedAgents, defaultProxy); |
| 76339 | } else if (request3.proxySettings) { |
| 76340 | setProxyAgentOnRequest(request3, cachedAgents, getUrlFromProxySettings(request3.proxySettings)); |
| 76341 | } |
| 76342 | return next(request3); |
no test coverage detected
searching dependent graphs…