flatpak-builder-tools icon indicating copy to clipboard operation
flatpak-builder-tools copied to clipboard

[node] support @electron/get's mirror options

Open Lctrs opened this issue 5 years ago • 0 comments

From @electron/get's documentation :

Specifying a mirror

To specify another location to download Electron assets from, the following options are available:

  • mirrorOptions Object
    • mirror String (optional) - The base URL of the mirror to download from.
    • nightlyMirror String (optional) - The Electron nightly-specific mirror URL.
    • customDir String (optional) - The name of the directory to download from, often scoped by version number.
    • customFilename String (optional) - The name of the asset to download.
    • resolveAssetURL Function (optional) - A function allowing customization of the url used to download the asset.

This package is often used by electron-packager during build time to download the electron binary. It supports caching using XDG layout so we're already good when no mirror is specified. But when there is one, it starts to fail because the actual script version doesn't create an entry cache for it. So it would be cool if we could have a new argument which can receive the base mirror's URL. From one of my test, both electron binaries from official release and the mirror for one version should be available.

Lctrs avatar Nov 04 '20 01:11 Lctrs