Optional
cache{@link ElectronDownloadCacheMode.ReadWrite}
Optional
cacheThe directory that caches Electron artifact downloads.
The default value is dependent upon the host platform:
$XDG_CACHE_HOME
or ~/.cache/electron/
~/Library/Caches/electron/
%LOCALAPPDATA%/electron/Cache
or ~/AppData/Local/electron/Cache/
Optional
checksumsProvides 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.
{
"electron-v4.0.4-linux-x64.zip": "877617029f4c0f2b24f3805a1c3554ba166fda65c4e88df9480ae7b6ffa26a22"
}
Optional
downloadOptions passed to the downloader module.
GotDownloaderOptions for options for the default GotDownloader.
Optional
downloaderA custom Downloader class used to download artifacts. Defaults to the built-in GotDownloader.
Optional
mirrorOptions related to specifying an artifact mirror.
Optional
tempA temporary directory for downloads. It is used before artifacts are put into cache.
the OS default temporary directory via os.tmpdir()
Optional
unsafelyWhen set to true
, disables checking that the artifact download completed successfully
with the correct payload.
false
Controls the cache read and write behavior.
When set to either ReadOnly or Bypass, the caller is responsible for cleaning up the returned file path once they are done using it (e.g. via
fs.remove(path.dirname(pathFromElectronGet))
).When set to either WriteOnly or ReadWrite (the default), the caller should not move or delete the file path that is returned as the path points directly to the disk cache.