(debugPort)
| 112 | } |
| 113 | |
| 114 | const 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 | |
| 122 | const launchApp = async (home, extraEnv = {}) => { |
| 123 | const child = spawn(appExe, ["--no-sandbox", "--remote-debugging-port=0"], { |