(result: Record<string, unknown>)
| 56 | } |
| 57 | |
| 58 | export function toDaemonGetData(result: Record<string, unknown>): Record<string, unknown> { |
| 59 | const target = getResolvedTarget(result); |
| 60 | return { |
| 61 | ...(target?.kind === 'ref' ? { ref: normalizeDaemonRef(target.ref) } : {}), |
| 62 | ...(target?.kind === 'selector' ? { selector: target.selector } : {}), |
| 63 | ...(typeof result.text === 'string' ? { text: result.text } : {}), |
| 64 | ...(result.node && typeof result.node === 'object' ? { node: result.node } : {}), |
| 65 | }; |
| 66 | } |
| 67 | |
| 68 | export function toDaemonWaitData(result: Record<string, unknown>): Record<string, unknown> { |
| 69 | return { |
no test coverage detected