(checks: CheckFunction[])
| 14 | export type CheckFunction = () => Promise<string | null>; |
| 15 | |
| 16 | export async function check(checks: CheckFunction[]): Promise<void> { |
| 17 | const results = await Promise.all(checks.map((f) => f())); |
| 18 | const errors = results.filter((r) => r != null) as string[]; |
| 19 | if (errors.length > 0) { |
| 20 | throw errors.join('\n'); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export async function checkWebDir(config: Config): Promise<string | null> { |
| 25 | // We can skip checking the web dir if a server URL is set. |
no test coverage detected