Interface MirrorOptions

Options for specifying an alternative download mirror for Electron.

Example

To download the Electron v4.0.4 release for x64 Linux from https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip

const opts = {
mirror: 'https://github.com/electron/electron/releases/download',
customDir: 'v4.0.4',
customFilename: 'electron-v4.0.4-linux-x64.zip',
}
interface MirrorOptions {
    customDir?: string;
    customFilename?: string;
    customVersion?: string;
    mirror?: string;
    nightlyMirror?: string;
    resolveAssetURL?: ((opts) => Promise<string>);
}

Properties

customDir?: string

The name of the directory to download from, often scoped by version number e.g 'v4.0.4'

customFilename?: string

The name of the asset to download, e.g 'electron-v4.0.4-linux-x64.zip'

customVersion?: string

The version of the asset to download, e.g '4.0.4'

mirror?: string

The base URL of the mirror to download from. e.g https://github.com/electron/electron/releases/download

nightlyMirror?: string

The mirror URL for electron-nightly, which lives in a separate npm package.

resolveAssetURL?: ((opts) => Promise<string>)

A function allowing customization of the url returned from getArtifactRemoteURL().

Type declaration

    • (opts): Promise<string>
    • Parameters

      • opts: any

      Returns Promise<string>