(args: string[], result: CliJsonResult)
| 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, |
no outgoing calls
no test coverage detected