@vltpkg/pick-manifest
Type Aliases
ManiCheck<T>
type ManiCheck<T> = objectDefined in: index.ts:36
Type Parameters
• T extends Packumentish
Type declaration
deprecated
deprecated: booleanmani
mani: PickManifestish<T>platform
platform: booleanprerelease
prerelease: booleanversion
version: VersionManifestish
type Manifestish = | Pick<Manifest, 'engines' | 'os' | 'cpu' | 'libc'> | Pick<RevDocEntry, 'engines' | 'os' | 'cpu' | 'libc'>Defined in: index.ts:30
Packumentish
type Packumentish = Packument | RevDocDefined in: index.ts:33
PickManifestish<T>
type PickManifestish<T> = T extends RevDoc ? RevDocEntry : ManifestDefined in: index.ts:34
Type Parameters
• T extends Packumentish
PickManifestOptions
type PickManifestOptions = objectDefined in: index.ts:21
Type declaration
arch?
optional arch: string;before?
optional before: Date | number | string;libc?
optional libc: string;node-version?
optional node-version: string;os?
optional os: string;tag?
optional tag: string;Variables
LDD_PATH
const LDD_PATH: '/usr/bin/ldd' = '/usr/bin/ldd'Defined in: index.ts:90
Path to the ldd binary used for filesystem-based libc detection.
Functions
detectLibc()
function detectLibc(): undefined | stringDefined in: index.ts:174
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.
Returns
undefined | string
getFamilyFromFilesystem()
function getFamilyFromFilesystem(): undefined | null | stringDefined in: index.ts:97
Detect libc family by reading the /usr/bin/ldd file. Returns ‘glibc’, ‘musl’, null (detection ran but unknown) or undefined (file not readable).
Returns
undefined | null | string
getFamilyFromReport()
function getFamilyFromReport(): null | stringDefined in: index.ts:123
Detect libc family by using process.report.getReport(). Returns ‘glibc’, ‘musl’, or null if detection fails.
Returns
null | string
pickManifest()
function pickManifest<T>( packument, wanted, opts,): undefined | PickManifestish<T>Defined in: index.ts:259
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.
Type Parameters
• T extends Packumentish
Parameters
packument
T
wanted
opts
PickManifestOptions = {}
Returns
undefined | PickManifestish<T>
platformCheck()
function platformCheck( mani, nodeVersion, wantOs?, wantArch?, wantLibc?,): booleanDefined in: index.ts:204
Call with a manifest and the node version and process platform/arch/libc to check whether a version is suitable for the current platform.
Parameters
mani
nodeVersion
string | Version
wantOs?
string
wantArch?
string
wantLibc?
string
Returns
boolean
resetLibcCache()
function resetLibcCache(): voidDefined in: index.ts:163
Reset the cached libc detection result. For testing only.
Returns
void