UNPKG

aico-pack

Version:

A tool to pack repository contents to single file for AI consumption

30 lines 1.15 kB
import { createWriteStream } from 'node:fs'; import * as fs from 'node:fs/promises'; import { Transform } from 'node:stream'; import { pipeline } from 'node:stream/promises'; 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; /** * Downloads and extracts a GitHub repository archive */ export declare const downloadGitHubArchive: (repoInfo: GitHubRepoInfo, targetDirectory: string, options?: ArchiveDownloadOptions, onProgress?: ProgressCallback, deps?: { fetch: typeof fetch; fs: typeof fs; pipeline: typeof pipeline; Transform: typeof Transform; createWriteStream: typeof createWriteStream; }) => Promise<void>; /** * Checks if archive download is supported for the given repository info */ export declare const isArchiveDownloadSupported: (_repoInfo: GitHubRepoInfo) => boolean; //# sourceMappingURL=gitHubArchive.d.ts.map