MCPcopy
hub / github.com/di-sukharev/opencommit / resolveProxy

Function resolveProxy

src/utils/proxy.ts:7–17  ·  view source on GitHub ↗
(proxySetting?: ProxySetting)

Source from the content-addressed store, hash-verified

5export type ProxySetting = string | null | undefined;
6
7export function resolveProxy(proxySetting?: ProxySetting): ProxySetting {
8 if (proxySetting === null) {
9 return null;
10 }
11
12 if (typeof proxySetting === 'string' && proxySetting.trim().length > 0) {
13 return proxySetting;
14 }
15
16 return process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
17}
18
19function resetProxySetup(disableEnvProxy: boolean) {
20 setGlobalDispatcher(new Agent());

Callers 3

proxy.test.tsFile · 0.90
cli.tsFile · 0.90
getEngineFunction · 0.90

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…