(workspaceRoot: string)
| 295 | |
| 296 | /** Detect whether this workspace is the core Valdi repo */ |
| 297 | export function isValdiWorkspace(workspaceRoot: string): boolean { |
| 298 | const wsFile = path.join(workspaceRoot, 'WORKSPACE'); |
| 299 | if (!fs.existsSync(wsFile)) return false; |
| 300 | const content = fs.readFileSync(wsFile, 'utf8'); |
| 301 | return /workspace\s*\(\s*name\s*=\s*"valdi"\s*\)/.test(content); |
| 302 | } |
| 303 | |
| 304 | /** Compute the Bazel label for a module given its directory and workspace root */ |
| 305 | export function computeModuleLabel(moduleDir: string, workspaceRoot: string): string { |
no test coverage detected