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

Function materialise

packages/computerd/src/exec/log.ts:210–219  ·  view source on GitHub ↗
(id: string, row: EventRow)

Source from the content-addressed store, hash-verified

208}
209
210function materialise(id: string, row: EventRow): ExecEvent {
211 if (row.kind === KIND_EXIT) {
212 // node:sqlite returns BLOB as Uint8Array; we need the bytes
213 // view to read the int32.
214 const view = new DataView(row.value.buffer, row.value.byteOffset, row.value.byteLength);
215 return { id, seq: row.seq, name: "exit", value: view.getInt32(0, true) };
216 }
217 const name = row.kind === KIND_STDOUT ? "stdout" : "stderr";
218 return { id, seq: row.seq, name, value: row.value };
219}

Callers 1

replayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected