import { Range, Version } from '@vltpkg/semver'; import { Spec } from '@vltpkg/spec'; import type { Manifest, Packument, RevDoc, RevDocEntry } from '@vltpkg/types'; export type PickManifestOptions = { tag?: string; before?: Date | number | string; 'node-version'?: string; os?: string; arch?: string; libc?: string; }; export type Manifestish = Pick | Pick; export type Packumentish = Packument | RevDoc; export type PickManifestish = T extends RevDoc ? RevDocEntry : Manifest; export type ManiCheck = { version: Version; deprecated: boolean; platform: boolean; prerelease: boolean; mani: PickManifestish; }; /** * Path to the ldd binary used for filesystem-based libc detection. */ export declare const LDD_PATH = "/usr/bin/ldd"; /** * Detect libc family by reading the /usr/bin/ldd file. * Returns 'glibc', 'musl', null (detection ran but unknown) * or undefined (file not readable). */ export declare const getFamilyFromFilesystem: () => string | null | undefined; /** * Detect libc family by using process.report.getReport(). * Returns 'glibc', 'musl', or null if detection fails. */ export declare const getFamilyFromReport: () => string | null; /** Reset the cached libc detection result. For testing only. */ export declare const resetLibcCache: () => void; /** * Detect the libc family (glibc or musl) on Linux systems. * First tries filesystem-based detection (/usr/bin/ldd), * then falls back to process.report. * Returns undefined on non-Linux platforms or if detection fails. */ export declare const detectLibc: () => string | undefined; /** * Call with a manifest and the node version and process platform/arch/libc * to check whether a version is suitable for the current platform. */ export declare const platformCheck: (mani: Manifestish, nodeVersion: Version | string, wantOs?: string, wantArch?: string, wantLibc?: string) => boolean; /** * Choose the most appropriate manifest from a packument. * * If `before` is set in the options, then the packument MUST * be a full non-minified Packument object. Otherwise, a minified packument * is fine. */ export declare function pickManifest(packument: T, wanted: Range | Spec | string, opts?: PickManifestOptions): PickManifestish | undefined;