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

Method addUpstream

github-actions/browserstack/set-browserstack-env.js:8707–8733  ·  view source on GitHub ↗
(upstream)

Source from the content-addressed store, hash-verified

8705 } = _b, options = __objRest(_b, [
8706 "connections",
8707 "factory",
8708 "connect",
8709 "connectTimeout",
8710 "tls",
8711 "maxCachedSessions",
8712 "socketPath",
8713 "autoSelectFamily",
8714 "autoSelectFamilyAttemptTimeout",
8715 "allowH2"
8716 ]);
8717 var _a2;
8718 if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
8719 throw new InvalidArgumentError("invalid connections");
8720 }
8721 if (typeof factory !== "function") {
8722 throw new InvalidArgumentError("factory must be a function.");
8723 }
8724 if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
8725 throw new InvalidArgumentError("connect must be a function or an object");
8726 }
8727 if (typeof connect !== "function") {
8728 connect = buildConnector(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, tls), {
8729 maxCachedSessions,
8730 allowH2,
8731 socketPath,
8732 timeout: connectTimeout
8733 }), autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0), connect));
8734 }
8735 super(options);
8736 this[kInterceptors] = ((_a2 = options.interceptors) == null ? void 0 : _a2.Pool) && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : [];

Callers 1

constructorMethod · 0.45

Calls 3

parseOriginFunction · 0.70
onMethod · 0.45

Tested by

no test coverage detected