nsis-compat-updater
nsis-compat-updater
is an auto updater implementation for NW.js, inspired by electron-updater
.
API
Imports
;// Or// const { NsisCompatUpdater } = require('nsis-compat-updater');
Types
new NsisCompatUpdater(feed: string, version: string, arch: 'x86' | 'x64')
const updater = feed version arch;
updater.onDownloadProgress.subscribe((state: IStreamProgress) => void)
updater.onDownloadProgress.unsubscribe((state: IStreamProgress) => void)
updater.checkForUpdates(): Promise<IVersion | null>
Returns an instance of IVersion
if new version is available, otherwise null
.
updater.downloadUpdate(version: string): Promise<string>
Returns the temporary path of the downloaded update.
updater.quitAndInstall(path: string)
updater.installWhenQuit(path: string)
updater.installWhenQuit(path: string)