function proxyPolicy(proxySettings = getDefaultProxySettings(), options) {
    if (!noProxyListLoaded) {
        globalNoProxyList.push(...loadNoProxy());
    }
    return {
        name: proxyPolicyName,
        async sendRequest(request, next) {
            var _a;
            if (!request.proxySettings &&
                !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) {
                request.proxySettings = proxySettings;
            }
            if (request.proxySettings) {
                setProxyAgentOnRequest(request);
            }
            return next(request);
        }
    };
}
/**
 * A policy that allows one to apply proxy settings to all requests.
 * If not passed static settings, they will be retrieved from the HTTPS_PROXY
 * or HTTP_PROXY environment variables.
 * @param proxySettings - ProxySettings to use on each request.
 * @param options - additional settings, for example, custom NO_PROXY patterns
 */
A policy that allows one to apply proxy settings to all requests.
If not passed static settings, they will be retrieved from the HTTPS_PROXY
or HTTP_PROXY environment variables.
@param proxySettings - ProxySettings to use on each request.
@param options - additional settings, for example, custom NO_PROXY patterns
A policy that allows one to apply proxy settings to all requests . If not passed static settings they will be retrieved from the HTTPS_PROXY or HTTP_PROXY environment variables . @param proxySettings - ProxySettings to use on each request . @param options - additional settings for example custom NO_PROXY patterns
function proxyPolicy(proxySettings = getDefaultProxySettings(), options) {
    if (!noProxyListLoaded) {
        globalNoProxyList.push(...loadNoProxy());
    }
    return {
        name: proxyPolicyName,
        async sendRequest(request, next) {
            var _a;
            if (!request.proxySettings &&
                !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) {
                request.proxySettings = proxySettings;
            }
            if (request.proxySettings) {
                setProxyAgentOnRequest(request);
            }
            return next(request);
        }
    };
}
function proxyPolicy ( proxySettings = getDefaultProxySettings ( ) , options ) { if ( ! noProxyListLoaded ) { globalNoProxyList . push ( ... loadNoProxy ( ) ) ; } return { name : proxyPolicyName , async sendRequest ( request , next ) { var _a ; if ( ! request . proxySettings && ! isBypassed ( request . url , ( _a = options === null || options === void 0 ? void 0 : options . customNoProxyList ) !== null && _a !== void 0 ? _a : globalNoProxyList , ( options === null || options === void 0 ? void 0 : options . customNoProxyList ) ? undefined : globalBypassedMap ) ) { request . proxySettings = proxySettings ; } if ( request . proxySettings ) { setProxyAgentOnRequest ( request ) ; } return next ( request ) ; } } ; }
A policy that allows one to apply proxy settings to all requests.
A policy that allows one to apply proxy settings to all requests .