MCPcopy Index your code
hub / github.com/callstack/agent-device / normalizeProxyOptions

Function normalizeProxyOptions

src/remote/daemon-proxy.ts:242–254  ·  view source on GitHub ↗
(options: DaemonProxyOptions)

Source from the content-addressed store, hash-verified

240}
241
242function normalizeProxyOptions(options: DaemonProxyOptions): Required<DaemonProxyOptions> {
243 const upstreamBaseUrl = normalizeBaseUrl(options.upstreamBaseUrl, 'upstreamBaseUrl');
244 const upstreamToken = normalizeToken(options.upstreamToken, 'upstreamToken');
245 const clientToken = normalizeToken(options.clientToken, 'clientToken');
246 return {
247 upstreamBaseUrl,
248 upstreamToken,
249 clientToken,
250 maxRpcBodyBytes: options.maxRpcBodyBytes ?? DEFAULT_MAX_RPC_BODY_BYTES,
251 upstreamTimeoutMs: options.upstreamTimeoutMs ?? DEFAULT_UPSTREAM_TIMEOUT_MS,
252 fetchImpl: options.fetchImpl ?? fetch,
253 };
254}
255
256function normalizeBaseUrl(value: string, label: string): string {
257 try {

Callers 1

createDaemonProxyServerFunction · 0.85

Calls 2

normalizeTokenFunction · 0.85
normalizeBaseUrlFunction · 0.70

Tested by

no test coverage detected