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

Function makeStream

packages/computer/src/shell.test.ts:92–103  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

90 };
91
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
105 const sync: SyncRPC = {
106 async push() {

Callers 2

execFunction · 0.85
getExecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected