(value?: string | Buffer | any[])
| 158 | } |
| 159 | |
| 160 | async function readFileIfExists(value?: string | Buffer | any[]) { |
| 161 | if (typeof value === 'string') { |
| 162 | return fsp.readFile(path.resolve(value)).catch(() => value) |
| 163 | } |
| 164 | return value |
| 165 | } |
| 166 | |
| 167 | // Check if a port is available on wildcard addresses (0.0.0.0, ::) |
| 168 | async function isPortAvailable(port: number): Promise<boolean> { |
no test coverage detected