(chunk: Buffer)
| 283 | fn(); |
| 284 | }; |
| 285 | const collectOutput = (chunk: Buffer) => { |
| 286 | const text = chunk.toString(); |
| 287 | output = (output + text).slice(-16_384); |
| 288 | const match = output.match(/DevTools listening on (ws:\/\/[^\s]+)/); |
| 289 | if (match) settle(() => resolve(match[1]!)); |
| 290 | }; |
| 291 | child.stdout?.on("data", collectOutput); |
| 292 | child.stderr?.on("data", collectOutput); |
| 293 | // oxlint-disable-next-line executor/no-promise-reject -- boundary: packaged-app launch promise adapter |