(source: EnvSource)
| 281 | }); |
| 282 | |
| 283 | const readBackground = (source: EnvSource) => ({ |
| 284 | /* |
| 285 | * Schema defaults for QUEUES_ENABLED, CACHE_ENABLED, and |
| 286 | * NOTIFICATIONS_SSE_ENABLED are all `true` — see schema.ts. Calling |
| 287 | * `toBool` alone would collapse an unset variable to `false`, silently |
| 288 | * weakening JWT revocation (cache-backed) and SSE delivery for any |
| 289 | * deploy that didn't explicitly set them. `toBoolWithDefault` keeps |
| 290 | * the resolved config aligned with the documented schema. |
| 291 | */ |
| 292 | QUEUES_ENABLED: toBoolWithDefault( |
| 293 | source.QUEUES_ENABLED, |
| 294 | true, |
| 295 | "QUEUES_ENABLED" |
| 296 | ), |
| 297 | CACHE_ENABLED: toBoolWithDefault(source.CACHE_ENABLED, true, "CACHE_ENABLED"), |
| 298 | CACHE_PROVIDER: source.CACHE_PROVIDER ?? "memory", |
| 299 | NOTIFICATIONS_SSE_ENABLED: toBoolWithDefault( |
| 300 | source.NOTIFICATIONS_SSE_ENABLED, |
| 301 | true, |
| 302 | "NOTIFICATIONS_SSE_ENABLED" |
| 303 | ), |
| 304 | }); |
| 305 | |
| 306 | const readWebPush = (source: EnvSource) => ({ |
| 307 | WEB_PUSH_VAPID_PUBLIC: source.WEB_PUSH_VAPID_PUBLIC ?? "", |
no test coverage detected