MCPcopy
hub / github.com/vercel/next.js / onStdout

Function onStdout

test/e2e/next-analyze/next-analyze.test.ts:101–110  ·  view source on GitHub ↗
(data: Buffer)

Source from the content-addressed store, hash-verified

99 }, timeoutMs)
100
101 function onStdout(data: Buffer) {
102 const urlMatch = data.toString().match(/http:\/\/[^\s]+/)
103 if (urlMatch) {
104 clearTimeout(timeout)
105 process.stdout.off('data', onStdout)
106 process.off('error', onError)
107 process.off('exit', onExit)
108 resolve(urlMatch[0])
109 }
110 }
111
112 function onError(error: Error) {
113 clearTimeout(timeout)

Callers

nothing calls this directly

Calls 5

matchMethod · 0.65
clearTimeoutFunction · 0.50
resolveFunction · 0.50
toStringMethod · 0.45
offMethod · 0.45

Tested by

no test coverage detected