import { PackageCache } from '../cache/PackageCache'; import { CurrentBuildClient } from '../current'; import { PackageDB } from '../db'; import { FindResourceInfoOptions, PackageInfo, ResourceInfo } from '../package'; import { RegistryClient } from '../registry'; import { LogFunction } from '../utils'; import { VirtualPackage } from '../virtual'; import { LoadStatus, PackageLoader } from './PackageLoader'; export declare enum SafeMode { OFF = "OFF", FREEZE = "FREEZE", CLONE = "CLONE" } export type BasePackageLoaderOptions = { log?: LogFunction; resourceCacheSize?: number; safeMode?: SafeMode; }; export declare class BasePackageLoader implements PackageLoader { private packageDB; private packageCache; private registryClient; private currentBuildClient; private log; private virtualPackages; private resourceCache?; private safeMode; constructor(packageDB: PackageDB, packageCache: PackageCache, registryClient: RegistryClient, currentBuildClient: CurrentBuildClient, options?: BasePackageLoaderOptions); loadPackage(name: string, version: string): Promise; loadVirtualPackage(pkg: VirtualPackage): Promise; private loadPackageFromCache; private loadResourcesFromCache; private loadResourceFromCache; private loadResource; private isCurrentVersionMissingOrStale; private getResourceAtPath; getPackageLoadStatus(name: string, version: string): LoadStatus; findPackageInfos(name: string): PackageInfo[]; findPackageInfo(name: string, version: string): PackageInfo; findPackageJSONs(name: string): any[]; findPackageJSON(name: string, version: string): any; findResourceInfos(key: string, options?: FindResourceInfoOptions): ResourceInfo[]; findResourceInfo(key: string, options?: FindResourceInfoOptions): ResourceInfo; findResourceJSONs(key: string, options?: FindResourceInfoOptions): any[]; findResourceJSON(key: string, options?: FindResourceInfoOptions): any; exportDB(): Promise<{ mimeType: string; data: Buffer; }>; optimize(): void; clear(): void; }