@useblacksmith/cache
Version:
Blacksmith Actions cache lib
14 lines (13 loc) • 1.29 kB
TypeScript
import { HttpClient } from '@actions/http-client';
import { CompressionMethod } from './constants';
import { ArtifactCacheEntry, InternalCacheOptions, ReserveCacheResponse, ITypedResponseWithError } from './contracts';
import { DownloadOptions } from '../options';
export declare function getCacheRequestHeaders(): Record<string, string>;
export declare function getCacheApiUrl(resource: string): string;
export declare function createHttpClient(): HttpClient;
export declare function getCacheVersion(paths: string[], compressionMethod?: CompressionMethod, enableCrossOsArchive?: boolean): string;
export declare function getCacheEntry(keys: string[], paths: string[], options?: InternalCacheOptions): Promise<ArtifactCacheEntry | null>;
export declare function getCacheEntryAxios(keys: string[], paths: string[], options?: InternalCacheOptions): Promise<ArtifactCacheEntry | null>;
export declare function downloadCache(archiveLocation: string, archivePath: string, options?: DownloadOptions): Promise<void>;
export declare function reserveCache(key: string, paths: string[], options?: InternalCacheOptions): Promise<ITypedResponseWithError<ReserveCacheResponse>>;
export declare function saveCache(cacheId: number, archivePath: string, urls: string[], uploadId: string): Promise<void>;