/**
 * Detection utilities shared across framework detectors.
 */
import type { PackageJsonData, PackageManager } from './types.ts';
/**
 * Check if a file exists (any of the given names) in a directory.
 * Returns the first matching filename, or null.
 */
export declare function findFile(dir: string, names: string[]): Promise<string | null>;
/**
 * Check if a dependency exists in package.json (dependencies or devDependencies).
 */
export declare function hasDependency(pkg: PackageJsonData, name: string): boolean;
/**
 * Get the version of a dependency from package.json.
 * Returns the version range string, or null if not found.
 */
export declare function getDependencyVersion(pkg: PackageJsonData, name: string): string | null;
/**
 * Check if any dependency matching a pattern exists.
 */
export declare function hasDependencyMatching(pkg: PackageJsonData, pattern: RegExp): boolean;
/**
 * Detect which package manager the project uses by checking lockfiles.
 */
export declare function detectPackageManager(projectDir: string): Promise<PackageManager>;
/**
 * Get the run command prefix for a package manager.
 * e.g., 'npm run', 'bun run', 'pnpm run', 'yarn'
 */
export declare function getRunCommand(pm: PackageManager): string;
/**
 * Get the exec command prefix for a package manager (npx/bunx/etc.).
 */
export declare function getExecCommand(pm: PackageManager): string;
/**
 * Read and parse package.json from a directory.
 * Returns null if not found or unparseable.
 */
export declare function readPackageJson(dir: string): Promise<PackageJsonData | null>;
//# sourceMappingURL=util.d.ts.map