ipull
Version:
The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.
32 lines (31 loc) • 1.55 kB
TypeScript
import DownloadEngineMultiDownload from "../../download-engine/engine/download-engine-multi-download.js";
import { BaseMultiProgressBar } from "./multiProgressBars/BaseMultiProgressBar.js";
import { AvailableCLIProgressStyle } from "./progress-bars/switch-cli-progress-style.js";
import { CliFormattedStatus } from "./progress-bars/base-transfer-cli-progress-bar.js";
import cliSpinners from "cli-spinners";
import BaseDownloadEngine from "../../download-engine/engine/base-download-engine.js";
import { DownloadEngineRemote } from "../../download-engine/engine/DownloadEngineRemote.js";
type AllowedDownloadEngine = DownloadEngineMultiDownload | BaseDownloadEngine | DownloadEngineRemote;
export type CliProgressDownloadEngineOptions = {
truncateName?: boolean | number;
cliProgress?: boolean;
maxViewDownloads?: number;
createMultiProgressBar?: typeof BaseMultiProgressBar;
cliStyle?: AvailableCLIProgressStyle | ((status: CliFormattedStatus) => string);
cliName?: string;
loadingAnimation?: cliSpinners.SpinnerName;
};
declare class GlobalCLI {
private _multiDownloadEngine;
private _eventsRegistered;
private _transferCLI;
private _cliActive;
private _downloadOptions;
constructor();
addDownload(engine: AllowedDownloadEngine | Promise<AllowedDownloadEngine>, cliOptions?: CliProgressDownloadEngineOptions): Promise<void>;
private _createMultiDownloadEngine;
private _registerCLIEvents;
private static _createOptions;
}
export declare const globalCLI: GlobalCLI;
export {};