1 | import { Progress as GotProgress, Options as GotOptions } from 'got';
|
2 | import { Downloader } from './Downloader';
|
3 | /**
|
4 | * Options for the default [`got`](https://github.com/sindresorhus/got) Downloader implementation.
|
5 | *
|
6 | * @category Downloader
|
7 | * @see {@link https://github.com/sindresorhus/got/tree/v11.8.5?tab=readme-ov-file#options | `got#options`} for possible keys/values.
|
8 | */
|
9 | export type GotDownloaderOptions = (GotOptions) & {
|
10 | isStream?: true;
|
11 | } & {
|
12 | /**
|
13 | * if defined, triggers every time `got`'s
|
14 | * {@link https://github.com/sindresorhus/got/tree/v11.8.5?tab=readme-ov-file#downloadprogress | `downloadProgress``} event callback is triggered.
|
15 | */
|
16 | getProgressCallback?: (progress: GotProgress) => Promise<void>;
|
17 | /**
|
18 | * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
|
19 | * environment variable to a non-empty value also does this).
|
20 | */
|
21 | quiet?: boolean;
|
22 | };
|
23 | /**
|
24 | * Default {@link Downloader} implemented with {@link https://npmjs.com/package/got | `got`}.
|
25 | * @category Downloader
|
26 | */
|
27 | export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
|
28 | download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
|
29 | }
|