interface Options { storePath?: string; } interface ResolvedLockFileOptions { /** * @description Virtual store path * @default /<.vsit-store> */ storePath: string; /** * @description Virtual store lock file path * @default /<.vsit-store>/vsit-lock.yaml */ lockFilePath: string; } export interface Package { /** * @description Encoded url */ id: string; /** * @description Remote package url */ url: string; /** * @description Dependent packages * @todo not used currently, in the future, we will outdated the persist cache, and concurrent download the packages based on deps */ deps?: string[]; } interface LockFileYaml { version: string; packages?: Record; } export declare class LockFile { options: ResolvedLockFileOptions; lockFile: LockFileYaml; constructor(options: Options); resolveOptions(options: Options): ResolvedLockFileOptions; init(): Promise; read(): Promise; write(data: LockFileYaml): Promise; save(): Promise; writePackage(url: string, deps?: string[]): Promise; writePackages(packages?: Record): Promise; static create(options: Options): Promise; } interface ResolvedCacheOptions { storePath: string; packagesPath: string; } export declare class PersistCache { options: ResolvedCacheOptions; lockFile?: LockFile; constructor(options?: Options); resolveOptions(options: Options): ResolvedCacheOptions; static create(options?: Options): Promise; writePackages(packages?: Record): Promise; getCache(url: string): Promise; saveCache(url: string, content: string): Promise; } export {};