(environments?: EnvironmentsWithHealth)
| 346 | |
| 347 | /** True once every enabled environment is healthy. */ |
| 348 | const allEnvironmentsHealthy = (environments?: EnvironmentsWithHealth) => { |
| 349 | const enabled = [...(environments?.values() ?? [])].filter( |
| 350 | (env): env is EnabledEnvironment => env.state === "enabled", |
| 351 | ); |
| 352 | return ( |
| 353 | enabled.length > 0 && enabled.every((e) => e.status.health === "healthy") |
| 354 | ); |
| 355 | }; |
| 356 | |
| 357 | /** |
| 358 | * Polls for region information and environment health. |
no test coverage detected