import { Transform } from 'node:stream'; import { pipeline } from 'node:stream/promises'; import * as zlib from 'node:zlib'; import { extract as tarExtract } from 'tar'; import { createArchiveEntryFilter } from './archiveEntryFilter.js'; import type { GitHubRepoInfo } from './gitRemoteParse.js'; export interface ArchiveDownloadOptions { timeout?: number; retries?: number; } export interface ArchiveDownloadProgress { downloaded: number; total: number | null; percentage: number | null; } export type ProgressCallback = (progress: ArchiveDownloadProgress) => void; export interface ArchiveDownloadDeps { fetch: typeof globalThis.fetch; pipeline: typeof pipeline; Transform: typeof Transform; tarExtract: typeof tarExtract; createGunzip: typeof zlib.createGunzip; createArchiveEntryFilter: typeof createArchiveEntryFilter; } export declare const downloadGitHubArchive: (repoInfo: GitHubRepoInfo, targetDirectory: string, options?: ArchiveDownloadOptions, onProgress?: ProgressCallback, deps?: ArchiveDownloadDeps) => Promise; export declare const isArchiveDownloadSupported: (_repoInfo: GitHubRepoInfo) => boolean;