MCPcopy
hub / github.com/callstack/agent-device / cliJsonResult

Function cliJsonResult

test/integration/cli-json.ts:56–69  ·  view source on GitHub ↗
(result: ExecResult)

Source from the content-addressed store, hash-verified

54}
55
56function cliJsonResult(result: ExecResult): CliJsonResult {
57 let json: any;
58 try {
59 json = JSON.parse(result.stdout ?? '');
60 } catch {
61 json = undefined;
62 }
63 return {
64 status: result.exitCode,
65 json,
66 stdout: json ? '<JSON output>' : (result.stdout ?? ''),
67 stderr: result.stderr ?? '',
68 };
69}

Callers 2

runSourceCliJsonSyncFunction · 0.85
runBuiltCliJsonFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected