LarpixClient/electron/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.d.ts
olcxja cca8b02fea
Some checks failed
Android Build / publish (push) Successful in 33s
Linux Build / publish (push) Failing after 25s
Update gitignore (sorry)
2026-05-10 14:02:17 +02:00

31 lines
1.4 KiB
TypeScript

/// <reference types="node" />
import { BlockMapDataHolder, HttpExecutor } from "builder-util-runtime";
import { BlockMap } from "builder-util-runtime/out/blockMapApi";
import { OutgoingHttpHeaders, RequestOptions } from "http";
import { ProgressInfo, CancellationToken } from "builder-util-runtime";
import { Logger } from "../main";
import { URL } from "url";
export interface DifferentialDownloaderOptions {
readonly oldFile: string;
readonly newUrl: URL;
readonly logger: Logger;
readonly newFile: string;
readonly requestHeaders: OutgoingHttpHeaders | null;
readonly isUseMultipleRangeRequest?: boolean;
readonly cancellationToken: CancellationToken;
onProgress?: (progress: ProgressInfo) => void;
}
export declare abstract class DifferentialDownloader {
protected readonly blockAwareFileInfo: BlockMapDataHolder;
readonly httpExecutor: HttpExecutor<any>;
readonly options: DifferentialDownloaderOptions;
fileMetadataBuffer: Buffer | null;
private readonly logger;
constructor(blockAwareFileInfo: BlockMapDataHolder, httpExecutor: HttpExecutor<any>, options: DifferentialDownloaderOptions);
createRequestOptions(): RequestOptions;
protected doDownload(oldBlockMap: BlockMap, newBlockMap: BlockMap): Promise<any>;
private downloadFile;
private doDownloadFile;
protected readRemoteBytes(start: number, endInclusive: number): Promise<Buffer>;
private request;
}