* Internal: Initialize metadata map for O(1) lookups * Converts array of options to Map for fast access
()
| 83 | * Converts array of options to Map for fast access |
| 84 | */ |
| 85 | function initializeTriggerMetadataMap(): Map<string, { label: string; color: string }> { |
| 86 | if (cachedTriggerMetadataMap) { |
| 87 | return cachedTriggerMetadataMap |
| 88 | } |
| 89 | |
| 90 | const options = getTriggerOptions() |
| 91 | cachedTriggerMetadataMap = new Map( |
| 92 | options.map((opt) => [opt.value, { label: opt.label, color: opt.color }]) |
| 93 | ) |
| 94 | |
| 95 | return cachedTriggerMetadataMap |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Gets integration metadata (label and color) for a specific trigger type. |
no test coverage detected