@pnpm/tarball-fetcher
Version:
Fetcher for packages hosted as tarballs
20 lines (19 loc) • 895 B
TypeScript
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;