15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import { Downloader } from './Downloader';
export declare type DownloadOptions = any;
export interface MirrorOptions {
    /**
     * DEPRECATED - see nightlyMirror.
     */
    nightly_mirror?: string;
    /**
     * The Electron nightly-specific mirror URL.
     */
    nightlyMirror?: string;
    /**
     * The base URL of the mirror to download from,
     * e.g https://github.com/electron/electron/releases/download
     */
    mirror?: string;
    /**
     * The name of the directory to download from,
     * often scoped by version number e.g 'v4.0.4'
     */
    customDir?: string;
    /**
     * The name of the asset to download,
     * e.g 'electron-v4.0.4-linux-x64.zip'
     */
    customFilename?: string;
    /**
     * A function allowing customization of the url returned
     * from getArtifactRemoteURL().
     */
    resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
}
export interface ElectronDownloadRequest {
    /**
     * The version of Electron associated with the artifact.
     */
    version: string;
    /**
     * The type of artifact. For example:
     * * `electron`
     * * `ffmpeg`
     */
    artifactName: string;
}
export interface ElectronDownloadRequestOptions {
    /**
     * Whether to download an artifact regardless of whether it's in the cache directory.
     *
     * Defaults to `false`.
     */
    force?: boolean;
    /**
     * When set to `true`, disables checking that the artifact download completed successfully
     * with the correct payload.
     *
     * Defaults to `false`.
     */
    unsafelyDisableChecksums?: boolean;
    /**
     * Provides checksums for the artifact as strings.
     * Can be used if you already know the checksums of the Electron artifact
     * you are downloading and want to skip the checksum file download
     * without skipping the checksum validation.
     *
     * This should be an object whose keys are the file names of the artifacts and
     * the values are their respective SHA256 checksums.
     */
    checksums?: Record<string, string>;
    /**
     * The directory that caches Electron artifact downloads.
     *
     * The default value is dependent upon the host platform:
     *
     * * Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
     * * MacOS: `~/Library/Caches/electron/`
     * * Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
     */
    cacheRoot?: string;
    /**
     * Options passed to the downloader module.
     */
    downloadOptions?: DownloadOptions;
    /**
     * Options related to specifying an artifact mirror.
     */
    mirrorOptions?: MirrorOptions;
    /**
     * The custom [[Downloader]] class used to download artifacts. Defaults to the
     * built-in [[GotDownloader]].
     */
    downloader?: Downloader<DownloadOptions>;
    /**
     * A temporary directory for downloads.
     * It is used before artifacts are put into cache.
     */
    tempDirectory?: string;
}
export declare type ElectronPlatformArtifactDetails = {
    /**
     * The target artifact platform. These are Node-style platform names, for example:
     * * `win32`
     * * `darwin`
     * * `linux`
     */
    platform: string;
    /**
     * The target artifact architecture. These are Node-style architecture names, for example:
     * * `ia32`
     * * `x64`
     * * `armv7l`
     */
    arch: string;
    artifactSuffix?: string;
    isGeneric?: false;
} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
export declare type ElectronGenericArtifactDetails = {
    isGeneric: true;
} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
export declare type ElectronArtifactDetails = ElectronPlatformArtifactDetails | ElectronGenericArtifactDetails;
export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export declare type ElectronPlatformArtifactDetailsWithDefaults = (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
    platform?: string;
    arch?: string;
}) | ElectronGenericArtifactDetails;