MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getUrlFromProxySettings

Function getUrlFromProxySettings

out/cli.cjs:76283–76298  ·  view source on GitHub ↗
(settings)

Source from the content-addressed store, hash-verified

76281 return noProxy.split(",").map((item) => item.trim()).filter((item) => item.length);
76282 }
76283 return [];
76284}
76285function getDefaultProxySettingsInternal() {
76286 const envProxy = loadEnvironmentProxyValue();
76287 return envProxy ? new URL(envProxy) : void 0;
76288}
76289function getUrlFromProxySettings(settings) {
76290 let parsedProxyUrl;
76291 try {
76292 parsedProxyUrl = new URL(settings.host);
76293 } catch (_error) {
76294 throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`);
76295 }
76296 parsedProxyUrl.port = String(settings.port);
76297 if (settings.username) {
76298 parsedProxyUrl.username = settings.username;
76299 }
76300 if (settings.password) {
76301 parsedProxyUrl.password = settings.password;

Callers 2

proxyPolicyFunction · 0.85
sendRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…