(command, cwd, timeoutMs = 120_000)
| 562 | merged.push(structuredClone(currentJob)); |
| 563 | continue; |
| 564 | } |
| 565 | merged.push(mergeStateJob(baseJob, intendedJob, currentJob)); |
| 566 | } |
| 567 | for (const intendedJob of intendedJobs || []) { |
| 568 | const id = intendedJob?.id; |
| 569 | if (!id || base.has(id) || current.has(id)) |
| 570 | continue; |
| 571 | merged.push(structuredClone(intendedJob)); |
| 572 | } |
| 573 | return merged; |
| 574 | } |
| 575 | async function writeState(directory, sessionID, state) { |
| 576 | await withStateWriteLock(directory, sessionID, async () => { |
| 577 | await ensureDir(stateDir(directory)); |
| 578 | const target = statePath(directory, sessionID); |
no outgoing calls
no test coverage detected