(blockId: string, output: unknown)
| 718 | } |
| 719 | |
| 720 | const onBlockComplete = async (blockId: string, output: unknown): Promise<void> => { |
| 721 | const outputs = outputsByBlockId.get(blockId) |
| 722 | if (!outputs) return |
| 723 | |
| 724 | const blockResult = |
| 725 | output && typeof output === 'object' && 'output' in (output as object) |
| 726 | ? (output as { output: unknown }).output |
| 727 | : output |
| 728 | |
| 729 | const blockErrorMessage = |
| 730 | blockResult && |
| 731 | typeof blockResult === 'object' && |
| 732 | typeof (blockResult as { error?: unknown }).error === 'string' |
| 733 | ? (blockResult as { error: string }).error |
| 734 | : null |
| 735 | |
| 736 | if (blockErrorMessage) { |
| 737 | blockErrors[blockId] = blockErrorMessage |
| 738 | } else { |
| 739 | for (const out of outputs) { |
| 740 | const plucked = pluckByPath(blockResult, out.path) |
| 741 | if (plucked === undefined) continue |
| 742 | accumulatedData[out.columnName] = plucked as RowData[string] |
| 743 | } |
| 744 | } |
| 745 | runningBlockIds.delete(blockId) |
| 746 | schedulePartialWrite() |
| 747 | } |
| 748 | |
| 749 | // Enforce the per-plan execution timeout (from preprocessing), combined |
| 750 | // with the existing cancel signal so either a timeout or a Stop aborts. |
nothing calls this directly
no test coverage detected