/** * `tdcv2 pack` — get data packs onto disk without the user hand-managing folders * or paths. * * In a real terminal it opens a small menu: browse the registry, tick the * bundles you want, and it downloads, verifies by hash, extracts into the pack * store, and wires the store into your config — so the data is usable by its * normal address the moment it lands. With no terminal it is scriptable: * `pack list` and `pack add `. * * Everything lands in ONE tree, at its address path: `/ru/…`, * `/countries/russia/…`. Which bundle owns which path is written down in * `/.tdcv2-installed.json` rather than implied by a folder name, so ten * languages and a hundred countries are one folder and one `dataPaths` entry. * * The wire (fetch) and the unzip live here; the decisions (what the index means, * whether a download is intact, what a bundle owns) are pure in `pack-core.ts`. * Inquirer and fflate are imported lazily so the ordinary generate path never * pays for them. */ import { type PackIndex } from './pack-core.js'; /** The public data-pack registry. Overridable with `--registry `. */ export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/NickLiapin/tdcv2-data-packs/master"; export interface PackContext { readonly cwd: string; readonly home?: string | undefined; readonly platform?: NodeJS.Platform | undefined; readonly env?: NodeJS.ProcessEnv | undefined; } /** Fetch the registry catalogue. */ export declare function fetchIndex(registry: string): Promise; /** * Download a URL to memory, reporting progress. `onProgress(received, total)` is * called as bytes arrive; `total` is 0 when the server sends no Content-Length. */ export declare function downloadWithProgress(url: string, onProgress: (received: number, total: number) => void): Promise; /** Run `tdcv2 pack`. Returns a process exit code. */ export declare function runPack(argv: readonly string[], ctx: PackContext): Promise; //# sourceMappingURL=pack.d.ts.map