MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / parseEvent

Function parseEvent

apps/cli/scripts/integration/lib/stream-harness.ts:52–64  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

50const defaultCliRoot = path.resolve(__dirname, "../../..")
51
52function parseEvent(line: string): StreamEvent | null {
53 const trimmed = line.trim()
54
55 if (!trimmed.startsWith("{")) {
56 return null
57 }
58
59 try {
60 return JSON.parse(trimmed) as StreamEvent
61 } catch {
62 return null
63 }
64}
65
66export async function runStreamCase(options: RunStreamCaseOptions): Promise<void> {
67 const cliRoot = process.env.ROO_CLI_ROOT ? path.resolve(process.env.ROO_CLI_ROOT) : defaultCliRoot

Callers 1

runStreamCaseFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected