( settings: Settings, options: MonorepoHandlerOptions, )
| 60 | } |
| 61 | |
| 62 | async function resolveMonorepoTool( |
| 63 | settings: Settings, |
| 64 | options: MonorepoHandlerOptions, |
| 65 | ): Promise<MonorepoTool | null> { |
| 66 | if (!settings.monorepo) { |
| 67 | // shouldn't happen, handled by caller |
| 68 | throw new Error('Monorepo mode not enabled'); |
| 69 | } |
| 70 | |
| 71 | if (typeof settings.monorepo === 'string') { |
| 72 | logInfo(`Using monorepo tool "${settings.monorepo}" from inputs`); |
| 73 | return settings.monorepo; |
| 74 | } |
| 75 | |
| 76 | const tool = await detectMonorepoTool(options.cwd); |
| 77 | if (tool) { |
| 78 | logInfo(`Auto-detected monorepo tool ${tool}`); |
| 79 | } else { |
| 80 | logInfo("Couldn't auto-detect any supported monorepo tool"); |
| 81 | } |
| 82 | |
| 83 | return tool; |
| 84 | } |
| 85 | |
| 86 | function createMonorepoHandlerOptions({ |
| 87 | task, |
no test coverage detected