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

Function formatResultDebug

test/integration/cli-json.ts:40–54  ·  view source on GitHub ↗
(step: string, args: string[], result: CliJsonResult)

Source from the content-addressed store, hash-verified

38}
39
40export function formatResultDebug(step: string, args: string[], result: CliJsonResult): string {
41 const jsonText =
42 result.json === undefined ? '(unparseable)' : JSON.stringify(result.json, null, 2);
43 return [
44 `step: ${step}`,
45 `command: agent-device ${args.join(' ')}`,
46 `status: ${result.status}`,
47 `stderr:`,
48 result.stderr || '(empty)',
49 `stdout:`,
50 result.stdout || '(empty)',
51 `json:`,
52 jsonText,
53 ].join('\n');
54}
55
56function cliJsonResult(result: ExecResult): CliJsonResult {
57 let json: any;

Callers 6

openProviderAppFunction · 0.90
assertNoActiveConnectionFunction · 0.90
buildFailureDebugFunction · 0.90
buildFailureDebugFunction · 0.90

Calls

no outgoing calls

Tested by 5

openProviderAppFunction · 0.72
assertNoActiveConnectionFunction · 0.72
buildFailureDebugFunction · 0.72