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

Method setRecords

github-actions/browserstack/set-browserstack-env.js:11992–12008  ·  view source on GitHub ↗
(origin, addresses)

Source from the content-addressed store, hash-verified

11990 }
11991 this.setRecords(origin, addresses);
11992 const records = __privateGet(this, _records).get(origin.hostname);
11993 const ip = this.pick(
11994 origin,
11995 records,
11996 newOpts.affinity
11997 );
11998 let port;
11999 if (typeof ip.port === "number") {
12000 port = `:${ip.port}`;
12001 } else if (origin.port !== "") {
12002 port = `:${origin.port}`;
12003 } else {
12004 port = "";
12005 }
12006 cb(
12007 null,
12008 `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`
12009 );
12010 });
12011 } else {

Callers 1

runLookupMethod · 0.45

Calls 3

__privateGetFunction · 0.70
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected