MCPcopy Index your code
hub / github.com/callstack/agent-device / maybeCaptureSnapshot

Function maybeCaptureSnapshot

test/integration/test-helpers.ts:131–145  ·  view source on GitHub ↗
(args: string[], result: CliJsonResult)

Source from the content-addressed store, hash-verified

129 }
130
131 function maybeCaptureSnapshot(args: string[], result: CliJsonResult): void {
132 if (args[0] !== 'snapshot' || result.status !== 0) {
133 return;
134 }
135 const nodes = Array.isArray(result.json?.data?.nodes) ? result.json.data.nodes : null;
136 if (!nodes) {
137 return;
138 }
139 lastSnapshot = {
140 capturedAt: new Date().toISOString(),
141 command: `agent-device ${args.join(' ')}`,
142 nodes,
143 rawJson: result.json,
144 };
145 }
146
147 function buildFailureDebug(
148 step: string,

Callers 2

runStepFunction · 0.70
runCleanupStepFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected