MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / buildProxyOptions

Function buildProxyOptions

out/cli.cjs:57909–57920  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

57907 var kClient = Symbol("proxy client");
57908 var kProxyHeaders = Symbol("proxy headers");
57909 var kRequestTls = Symbol("request tls settings");
57910 var kProxyTls = Symbol("proxy tls settings");
57911 var kConnectEndpoint = Symbol("connect endpoint function");
57912 function defaultProtocolPort(protocol) {
57913 return protocol === "https:" ? 443 : 80;
57914 }
57915 function buildProxyOptions(opts) {
57916 if (typeof opts === "string") {
57917 opts = { uri: opts };
57918 }
57919 if (!opts || !opts.uri) {
57920 throw new InvalidArgumentError("Proxy opts.uri is mandatory");
57921 }
57922 return {
57923 uri: opts.uri,

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected