export interface NpxResolution { binPath: string; extraArgs: string[]; isJs: boolean; } export interface ResolveOptions { /** Override for the global node_modules root (tests / custom environments). */ globalRoot?: string | null; /** Override for the npm cache dir (tests / custom environments). */ npmCacheDir?: string | null; /** Override for the registry "latest version" lookup (tests / offline). */ latestVersionFetcher?: (packageName: string) => Promise; /** Override for the npx-cache population step (tests). */ forceInstall?: () => Promise; } interface ParsedInvocation { packageSpec: string; binName?: string; extraArgs: string[]; } export declare function resolveNpxBinary(command: string, args: string[], options?: ResolveOptions): Promise; export declare function parseNpxArgs(args: string[]): ParsedInvocation | null; export declare function parseNpmExecArgs(args: string[]): ParsedInvocation | null; export declare function extractPackageName(spec: string): string | null; /** * A "floating" spec is one without a version pin: bare name, `@latest` or `@*`. * Only floating specs may resolve from the global tree and only they get the * registry freshness check — a pinned spec must match its exact version. */ export declare function isFloatingSpec(spec: string): boolean; /** Reset per-process memoizations (used by tests). */ export declare function resetNpxResolverCachesForTests(): void; /** Semver-ish comparison; release beats prerelease, identifiers compare numerically when both numeric. */ export declare function compareVersions(a: string, b: string): number; export {}; //# sourceMappingURL=npx-resolver.d.ts.map