UNPKG

@pnpm/tarball-fetcher

Version:
20 lines (19 loc) 895 B
import { type FetchFunction } from '@pnpm/fetcher-base'; import { type FetchFromRegistry, type GetAuthHeader, type RetryTimeoutOptions } from '@pnpm/fetching-types'; import { TarballIntegrityError } from '@pnpm/worker'; import { type CreateDownloaderOptions } from './remoteTarballFetcher.js'; export { BadTarballError } from './errorTypes/index.js'; export { TarballIntegrityError }; export interface TarballFetchers { localTarball: FetchFunction; remoteTarball: FetchFunction; gitHostedTarball: FetchFunction; } export declare function createTarballFetcher(fetchFromRegistry: FetchFromRegistry, getAuthHeader: GetAuthHeader, opts: { rawConfig: Record<string, unknown>; unsafePerm?: boolean; ignoreScripts?: boolean; timeout?: number; retry?: RetryTimeoutOptions; offline?: boolean; } & Pick<CreateDownloaderOptions, 'fetchMinSpeedKiBps'>): TarballFetchers;