import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; import type { TargetKey, ToolName } from "./types"; export function getPackageRoot(): string { return dirname(dirname(fileURLToPath(import.meta.url))); } export function getManifestPath(): string { return join(getPackageRoot(), "manifest.json"); } export function getBundleDir(targetKey: TargetKey): string { return join(getPackageRoot(), "bin", targetKey); } export function getBundledBinaryPath(tool: ToolName, targetKey: TargetKey, binaryName: string): string { return join(getBundleDir(targetKey), binaryName); }