MCPcopy Create free account
hub / github.com/angular/dev-infra / fill

Function fill

github-actions/browserstack/set-browserstack-env.js:12225–12249  ·  view source on GitHub ↗
(headers, object)

Source from the content-addressed store, hash-verified

12223 // Expressed in ms
12224 lookup: (_e = interceptorOpts == null ? void 0 : interceptorOpts.lookup) != null ? _e : null,
12225 pick: (_f = interceptorOpts == null ? void 0 : interceptorOpts.pick) != null ? _f : null,
12226 dualStack,
12227 affinity,
12228 maxItems: (_g = interceptorOpts == null ? void 0 : interceptorOpts.maxItems) != null ? _g : Infinity
12229 };
12230 const instance = new DNSInstance(opts);
12231 return (dispatch) => {
12232 return function dnsInterceptor(origDispatchOpts, handler) {
12233 const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin);
12234 if (isIP(origin.hostname) !== 0) {
12235 return dispatch(origDispatchOpts, handler);
12236 }
12237 instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
12238 if (err) {
12239 return handler.onError(err);
12240 }
12241 let dispatchOpts = null;
12242 dispatchOpts = __spreadProps(__spreadValues({}, origDispatchOpts), {
12243 servername: origin.hostname,
12244 // For SNI on TLS
12245 origin: newOrigin,
12246 headers: __spreadValues({
12247 host: origin.hostname
12248 }, origDispatchOpts.headers)
12249 });
12250 dispatch(
12251 dispatchOpts,
12252 instance.getHandler({ origin, dispatch, handler }, origDispatchOpts)

Callers 2

constructorMethod · 0.70
initializeResponseFunction · 0.70

Calls 2

appendHeaderFunction · 0.70
keysMethod · 0.45

Tested by

no test coverage detected