( workflowId: string, entries: ConsoleEntry[], entryIdsByBlockExecution: Record<string, string[]>, entryLocationById: Record<string, ConsoleEntryLocation> )
| 152 | } |
| 153 | |
| 154 | function indexWorkflowEntries( |
| 155 | workflowId: string, |
| 156 | entries: ConsoleEntry[], |
| 157 | entryIdsByBlockExecution: Record<string, string[]>, |
| 158 | entryLocationById: Record<string, ConsoleEntryLocation> |
| 159 | ): void { |
| 160 | entries.forEach((entry, index) => { |
| 161 | entryLocationById[entry.id] = { workflowId, index } |
| 162 | const blockExecutionKey = getBlockExecutionKey(entry.blockId, entry.executionId) |
| 163 | const existingIds = entryIdsByBlockExecution[blockExecutionKey] |
| 164 | if (existingIds) { |
| 165 | entryIdsByBlockExecution[blockExecutionKey] = [...existingIds, entry.id] |
| 166 | } else { |
| 167 | entryIdsByBlockExecution[blockExecutionKey] = [entry.id] |
| 168 | } |
| 169 | }) |
| 170 | } |
| 171 | |
| 172 | function rebuildWorkflowStateMaps(workflowEntries: Record<string, ConsoleEntry[]>) { |
| 173 | const entryIdsByBlockExecution: Record<string, string[]> = {} |
no test coverage detected