@vltpkg/pick-manifest
Type Aliases
ManiCheck<T>
type ManiCheck<T> = objectDefined in: index.ts:34
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'> | Pick<RevDocEntry, 'engines' | 'os' | 'cpu'>Defined in: index.ts:28
Packumentish
type Packumentish = Packument | RevDocDefined in: index.ts:31
PickManifestish<T>
type PickManifestish<T> = T extends RevDoc ? RevDocEntry : ManifestDefined in: index.ts:32
Type Parameters
• T extends Packumentish
PickManifestOptions
type PickManifestOptions = objectDefined in: index.ts:20
Type declaration
arch?
optional arch: string;before?
optional before: Date | number | string;node-version?
optional node-version: string;os?
optional os: string;tag?
optional tag: string;Functions
pickManifest()
function pickManifest<T>( packument, wanted, opts,): undefined | PickManifestish<T>Defined in: index.ts:127
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?): booleanDefined in: index.ts:84
Call with a manifest and the node version and process platform/arch to check whether a version is suitable for the current platform.
Parameters
mani
nodeVersion
string | Version
wantOs?
string
wantArch?
string
Returns
boolean