MCPcopy Create free account
hub / github.com/cloudflare/computer / start

Function start

packages/computer/src/shell.test.ts:94–101  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

92 function makeStream(id: string): ReadableStream<ExecEvent> {
93 return new ReadableStream<ExecEvent>({
94 start(c) {
95 for (const e of events) c.enqueue({ ...e, id });
96 if (options.streamError !== undefined) {
97 c.error(options.streamError);
98 return;
99 }
100 c.close();
101 },
102 });
103 }
104

Callers

nothing calls this directly

Calls 2

errorMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected