* Checks if a node has received all required inputs
(waitingNode: IWaitingNode)
| 768 | * Checks if a node has received all required inputs |
| 769 | */ |
| 770 | function hasReceivedRequiredInputs(waitingNode: IWaitingNode): boolean { |
| 771 | logger.debug(`\n✨ Checking inputs for node: ${waitingNode.nodeId}`) |
| 772 | |
| 773 | // Check non-conditional required inputs |
| 774 | for (const required of waitingNode.expectedInputs) { |
| 775 | const hasInput = waitingNode.receivedInputs.has(required) |
| 776 | logger.debug(` 📊 Required input ${required}: ${hasInput ? '✅' : '❌'}`) |
| 777 | if (!hasInput) return false |
| 778 | } |
| 779 | |
| 780 | // Check conditional groups |
| 781 | for (const [groupId, possibleSources] of waitingNode.conditionalGroups) { |
| 782 | // Need at least one input from each conditional group |
| 783 | const hasInputFromGroup = possibleSources.some((source) => waitingNode.receivedInputs.has(source)) |
| 784 | logger.debug(` 📊 Conditional group ${groupId}: ${hasInputFromGroup ? '✅' : '❌'}`) |
| 785 | if (!hasInputFromGroup) return false |
| 786 | } |
| 787 | |
| 788 | return true |
| 789 | } |
| 790 | |
| 791 | /** |
| 792 | * Determines which nodes should be ignored based on condition results |
no outgoing calls
no test coverage detected