MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pageWsFor

Function pageWsFor

e2e/desktop-packaged/linux-vm/repro.mjs:114–120  ·  view source on GitHub ↗
(debugPort)

Source from the content-addressed store, hash-verified

112}
113
114const pageWsFor = async (debugPort) => {
115 const targets = await fetch(`http://127.0.0.1:${debugPort}/json/list`).then((r) => r.json());
116 const page = targets.find(
117 (t) => t.type === "page" && t.webSocketDebuggerUrl && !t.url.startsWith("devtools://"),
118 );
119 return page?.webSocketDebuggerUrl ?? null;
120};
121
122const launchApp = async (home, extraEnv = {}) => {
123 const child = spawn(appExe, ["--no-sandbox", "--remote-debugging-port=0"], {

Callers 1

launchAppFunction · 0.85

Calls 2

jsonMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected