MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / onChunk

Function onChunk

__tests__/cli-ui-command.test.ts:90–97  ·  view source on GitHub ↗
(chunk: Buffer)

Source from the content-addressed store, hash-verified

88 }, 30_000);
89
90 const onChunk = (chunk: Buffer): void => {
91 output += chunk.toString('utf-8');
92 const match = output.match(/http:\/\/127\.0\.0\.1:(\d+)/);
93 if (match?.[1]) {
94 clearTimeout(timer);
95 resolve({ child, port: Number(match[1]), output: () => output });
96 }
97 };
98 child.stdout?.on('data', onChunk);
99 child.stderr?.on('data', onChunk);
100 child.on('error', (err) => {

Callers

nothing calls this directly

Calls 2

NumberInterface · 0.85
resolveFunction · 0.70

Tested by

no test coverage detected