| 21 | } |
| 22 | |
| 23 | export function computeScopedDerivedDataPath(anchorPath: string, cwd?: string): string { |
| 24 | const resolvedCwd = cwd ?? process.cwd(); |
| 25 | const resolved = resolvePathFromCwd(anchorPath, resolvedCwd); |
| 26 | const name = path.basename(resolved, path.extname(resolved)); |
| 27 | return path.join( |
| 28 | resolveWorkspaceDerivedDataRoot(resolvedCwd), |
| 29 | `${name}-${shortWorkspaceHash(resolved)}`, |
| 30 | ); |
| 31 | } |
| 32 | |
| 33 | export function resolveEffectiveDerivedDataPath(input: DerivedDataPathInput = {}): string { |
| 34 | const cwd = input.cwd ?? process.cwd(); |