@vltpkg/pick-manifest
Type Aliases
ManiCheck<T>
type ManiCheck<T> = object
Defined in: index.ts:25
Type Parameters
• T extends Packumentish
Type declaration
deprecated
deprecated: boolean
mani
mani: PickManifestish<T>
platform
platform: boolean
prerelease
prerelease: boolean
version
version: Version
Manifestish
type Manifestish = Manifest | RevDocEntry
Defined in: index.ts:21
Packumentish
type Packumentish = Packument | RevDoc
Defined in: index.ts:22
PickManifestish<T>
type PickManifestish<T> = T extends RevDoc ? RevDocEntry : Manifest
Defined in: index.ts:23
Type Parameters
• T extends Packumentish
PickManifestOptions
type PickManifestOptions = object
Defined in: index.ts:13
Type declaration
arch?
optional arch: NodeJS.Architecture;
before?
optional before: Date | number | string;
node-version?
optional node-version: string;
os?
optional os: NodeJS.Platform;
tag?
optional tag: string;
Functions
pickManifest()
function pickManifest<T>( packument, wanted, opts,): PickManifestish<T> | undefined
Defined in: index.ts:118
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
PickManifestish
<T
> | undefined
platformCheck()
function platformCheck(mani, nodeVersion, wantOs?, wantArch?): boolean
Defined in: index.ts:75
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?
Platform
wantArch?
Architecture
Returns
boolean