* Try to resolve a SCREAMING_SNAKE_CASE constant to its string value by * searching in the given content AND the webhook provider constants cache.
(constName: string, content: string)
| 3276 | * searching in the given content AND the webhook provider constants cache. |
| 3277 | */ |
| 3278 | function resolveConstStringValue(constName: string, content: string): string | null { |
| 3279 | const pattern = new RegExp(`\\b${constName}\\s*=\\s*['"]([^'"]+)['"]`) |
| 3280 | return pattern.exec(content)?.[1] ?? pattern.exec(getWebhookProviderConstants())?.[1] ?? null |
| 3281 | } |
| 3282 | |
| 3283 | /** |
| 3284 | * Parse a single SubBlockConfig object literal into a TriggerConfigField. |
no test coverage detected