14 lines
399 B
TypeScript
14 lines
399 B
TypeScript
import path from "node:path";
|
|
|
|
export function repoRoot() {
|
|
return path.resolve(process.env.CAD_AGENT_STUDIO_REPO_ROOT || path.join(/* turbopackIgnore: true */ process.cwd(), "..", ".."));
|
|
}
|
|
|
|
export function repoPath(...segments: string[]) {
|
|
return path.join(repoRoot(), ...segments);
|
|
}
|
|
|
|
export function relativeToRepo(absolutePath: string) {
|
|
return path.relative(repoRoot(), absolutePath);
|
|
}
|