import type { SupportedArchitectures } from '@pnpm/types'; import { UnsupportedEngineError, type WantedEngine } from './checkEngine.js'; import { UnsupportedPlatformError } from './checkPlatform.js'; export type { Engine } from './checkEngine.js'; export type { Platform, WantedPlatform } from './checkPlatform.js'; export { inferPlatformFromPackageName } from './inferPlatformFromPackageName.js'; export { UnsupportedEngineError, UnsupportedPlatformError, type WantedEngine, }; export interface InstallabilityManifest { name: string; version: string; engines?: WantedEngine; cpu?: string[]; os?: string[]; libc?: string[]; } /** * The installability verdict on its own — `null` when the package is * installable — without the logging and the `engineStrict` throw that * [packageIsInstallable] wraps around it. Callers that have to classify a * package before they know how to report it use this, so the report is * emitted exactly once. */ export declare function checkPackageInstallability(pkgId: string, pkg: InstallabilityManifest, options: { nodeVersion?: string; optional: boolean; pnpmVersion?: string; supportedArchitectures?: SupportedArchitectures; }): null | UnsupportedEngineError | UnsupportedPlatformError; export declare function packageIsInstallable(pkgId: string, pkg: InstallabilityManifest, options: { engineStrict?: boolean; nodeVersion?: string; optional: boolean; pnpmVersion?: string; lockfileDir: string; supportedArchitectures?: SupportedArchitectures; }): boolean | null; export declare function checkPackage(pkgId: string, manifest: { engines?: WantedEngine; cpu?: string[]; os?: string[]; libc?: string[]; }, options: { nodeVersion?: string; pnpmVersion?: string; supportedArchitectures?: SupportedArchitectures; }): null | UnsupportedEngineError | UnsupportedPlatformError;