( workflowId: string, entries: ConsoleEntry[], entryIdsByBlockExecution: Record<string, string[]>, entryLocationById: Record<string, ConsoleEntryLocation> )
| 129 | } |
| 130 | |
| 131 | function removeWorkflowIndexes( |
| 132 | workflowId: string, |
| 133 | entries: ConsoleEntry[], |
| 134 | entryIdsByBlockExecution: Record<string, string[]>, |
| 135 | entryLocationById: Record<string, ConsoleEntryLocation> |
| 136 | ): void { |
| 137 | for (const entry of entries) { |
| 138 | delete entryLocationById[entry.id] |
| 139 | const blockExecutionKey = getBlockExecutionKey(entry.blockId, entry.executionId) |
| 140 | const existingIds = entryIdsByBlockExecution[blockExecutionKey] |
| 141 | if (!existingIds) { |
| 142 | continue |
| 143 | } |
| 144 | |
| 145 | const nextIds = existingIds.filter((entryId) => entryId !== entry.id) |
| 146 | if (nextIds.length === 0) { |
| 147 | delete entryIdsByBlockExecution[blockExecutionKey] |
| 148 | } else { |
| 149 | entryIdsByBlockExecution[blockExecutionKey] = nextIds |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | function indexWorkflowEntries( |
| 155 | workflowId: string, |
no test coverage detected