electron-update-host-adapter
Drop in replacement for electron autoUpdater
, which makes it super easy to connect your app to an electron-update-host instance.
So far, this package is not downloading updates in the background (yet). Read API Documentation for more information about this.
Installation
Install the package via npm:
# with npm npm install electron-update-host-adapter # with yarn yarn add electron-update-host-adapter
API Documentation
This module is a drop in replacement, which means that it offers the same API as the original Electron autoUpdater module.
There are some important difference though:
- Event
update-downloaded
is not emitted after the update has been downloaded. It fires at the same time asupdate-available
but passes the documented arguments into the callback. - Method
autoUpdater.quitAndInstall()
does nothing.
All the rest should behave pretty much as expected.
Usage example
The following real world example connects an electron app to an electron-update-host instance.
const app Menu BrowserWindow dialog = ;const autoUpdater = ;const open = ; // electron-update-host expects version to be 1-0-0 instad of 1.0.0const appVersion = app; // We set the feed like we would do with the standard autoUpdaterconst server = 'http://<electron-update-host>.com';const feed = `/check-update//`;autoUpdater; // update-downloaded fires if there is a new app version available.// We just show an message box which offers a download button.autoUpdater; autoUpdater; autoUpdater;