(params: {
req: DaemonRequest;
sessionName: string;
logPath: string;
sessionStore: SessionStore;
})
| 51 | } |
| 52 | |
| 53 | export async function dispatchSnapshotDiffViaRuntime(params: { |
| 54 | req: DaemonRequest; |
| 55 | sessionName: string; |
| 56 | logPath: string; |
| 57 | sessionStore: SessionStore; |
| 58 | }): Promise<DaemonResponse> { |
| 59 | return await dispatchSnapshotRuntimeCommand({ |
| 60 | ...params, |
| 61 | command: 'diff', |
| 62 | unsupportedMessage: 'diff is not supported on this device', |
| 63 | execute: async ({ runtime, sessionName, req, snapshotScope }) => { |
| 64 | const result = await runtime.capture.diffSnapshot({ |
| 65 | session: sessionName, |
| 66 | interactiveOnly: req.flags?.snapshotInteractiveOnly, |
| 67 | depth: req.flags?.snapshotDepth, |
| 68 | scope: snapshotScope, |
| 69 | raw: req.flags?.snapshotRaw, |
| 70 | }); |
| 71 | return { |
| 72 | data: result, |
| 73 | record: { |
| 74 | kind: 'diff', |
| 75 | mode: 'snapshot', |
| 76 | baselineInitialized: result.baselineInitialized, |
| 77 | summary: result.summary, |
| 78 | }, |
| 79 | }; |
| 80 | }, |
| 81 | }); |
| 82 | } |
| 83 | |
| 84 | type SnapshotRuntimeCommandParams = { |
| 85 | req: DaemonRequest; |
no test coverage detected