()
| 3256 | */ |
| 3257 | let _webhookProviderConstantsCache: string | null = null |
| 3258 | function getWebhookProviderConstants(): string { |
| 3259 | if (_webhookProviderConstantsCache === null) { |
| 3260 | const dir = path.join(rootDir, 'apps/sim/lib/webhooks/providers') |
| 3261 | if (fs.existsSync(dir)) { |
| 3262 | _webhookProviderConstantsCache = fs |
| 3263 | .readdirSync(dir) |
| 3264 | .filter((f) => f.endsWith('.ts')) |
| 3265 | .map((f) => fs.readFileSync(path.join(dir, f), 'utf-8')) |
| 3266 | .join('\n') |
| 3267 | } else { |
| 3268 | _webhookProviderConstantsCache = '' |
| 3269 | } |
| 3270 | } |
| 3271 | return _webhookProviderConstantsCache |
| 3272 | } |
| 3273 | |
| 3274 | /** |
| 3275 | * Try to resolve a SCREAMING_SNAKE_CASE constant to its string value by |
no test coverage detected