(projectRootPath: string, logger: Logger)
| 20 | } |
| 21 | |
| 22 | export async function getJsRuntime(projectRootPath: string, logger: Logger): Promise<JsRuntime> { |
| 23 | if (await NodeJsRuntime.isNodeJsRuntime(projectRootPath)) { |
| 24 | return new NodeJsRuntime(projectRootPath, logger); |
| 25 | } else if (await DenoRuntime.isDenoJsRuntime(projectRootPath)) { |
| 26 | return new DenoRuntime(projectRootPath, logger); |
| 27 | } |
| 28 | throw new Error("Unsupported runtime"); |
| 29 | } |
| 30 | |
| 31 | class NodeJsRuntime extends JsRuntime { |
| 32 | static async isNodeJsRuntime(projectRootPath: string): Promise<boolean> { |
no test coverage detected
searching dependent graphs…