( cwd: string, )
| 21 | }; |
| 22 | |
| 23 | export async function detectMonorepoTool( |
| 24 | cwd: string, |
| 25 | ): Promise<MonorepoTool | null> { |
| 26 | // eslint-disable-next-line functional/no-loop-statements |
| 27 | for (const tool of MONOREPO_TOOLS) { |
| 28 | if (await MONOREPO_TOOL_DETECTORS[tool](cwd)) { |
| 29 | return tool; |
| 30 | } |
| 31 | } |
| 32 | return null; |
| 33 | } |
| 34 | |
| 35 | export function isMonorepoTool(value: string): value is MonorepoTool { |
| 36 | return MONOREPO_TOOLS.includes(value as MonorepoTool); |
no outgoing calls
no test coverage detected