ElectronAutoUpdater
Unofficial
Enables apps to automatically update themselves.
Import:
import type { ElectronAutoUpdater } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface ElectronAutoUpdater extends NodeJS.EventEmitterExtends: NodeJS.EventEmitter
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addListener(event, listener) | this | Registers a listener for the given auto updater event. | |
| addListener(event, listener) | this | Registers a listener for the checking-for-update event. | |
| addListener(event, listener) | this | Registers a listener for the error event. | |
| addListener(event, listener) | this | Registers a listener for the update-available event. | |
| addListener(event, listener) | this | Registers a listener for the update-downloaded event. | |
| addListener(event, listener) | this | Registers a listener for the update-not-available event. | |
| checkForUpdates() | void | Asks the server whether there is an update. You must call setFeedURL before using this API.**Note:** If an update is available it will be downloaded automatically. Calling autoUpdater.checkForUpdates() twice will download the update two times. | |
| getFeedURL() | string | The current update feed URL. | |
| on('before-quit-for-update', listener) | this | Registers a listener for the given auto updater event. | |
| on('checking-for-update', listener) | this | Registers a listener for the checking-for-update event. | |
| on('error', listener) | this | Registers a listener for the error event. | |
| on('update-available', listener) | this | Registers a listener for the update-available event. | |
| on('update-downloaded', listener) | this | Registers a listener for the update-downloaded event. | |
| on('update-not-available', listener) | this | Registers a listener for the update-not-available event. | |
| once(event, listener) | this | Registers a one-time listener for the given auto updater event. | |
| once(event, listener) | this | Registers a one-time listener for the checking-for-update event. | |
| once(event, listener) | this | Registers a one-time listener for the error event. | |
| once(event, listener) | this | Registers a one-time listener for the update-available event. | |
| once(event, listener) | this | Registers a one-time listener for the update-downloaded event. | |
| once(event, listener) | this | Registers a one-time listener for the update-not-available event. | |
| quitAndInstall() | void | Restarts the app and installs the update after it has been downloaded. It should only be called after update-downloaded has been emitted.Under the hood calling autoUpdater.quitAndInstall() will close all application windows first, and automatically call app.quit() after all windows have been closed. | |
| removeListener(event, listener) | this | Removes the given listener for the given auto updater event. | |
| removeListener(event, listener) | this | Removes the listener for the checking-for-update event. | |
| removeListener(event, listener) | this | Removes the listener for the error event. | |
| removeListener(event, listener) | this | Removes the listener for the update-available event. | |
| removeListener(event, listener) | this | Removes the listener for the update-downloaded event. | |
| removeListener(event, listener) | this | Removes the listener for the update-not-available event. | |
| setFeedURL(options) | void | Sets the url and initialize the auto updater. |
Links to this page: