updater
Classes
Update
A rust-backed resource.
The resource lives in the main process and does not exist
in the Javascript world, and thus will not be cleaned up automatically
except on application exit. If you want to clean it up early, call Resource.close
Extends
Constructors
new Update()
new Update(metadata): Update
Parameters
Parameter | Type |
---|---|
metadata | UpdateMetadata |
Returns
Overrides
Properties
Property | Type | Defined in |
---|---|---|
body? | string | |
currentVersion | string | |
date? | string | |
kind | "app" | "assets" | |
version | string |
Accessors
rid
Get Signature
get rid(): number
Returns
number
Inherited from
Methods
close()
close(): Promise<void>
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Returns
Promise
<void
>
Overrides
download()
download(onEvent?, options?): Promise<void>
Download the updater package
Parameters
Parameter | Type |
---|---|
onEvent ? | (progress ) => void |
options ? | DownloadOptions |
Returns
Promise
<void
>
downloadAndInstall()
downloadAndInstall(onEvent?, options?): Promise<void>
Downloads the updater package and installs it
Parameters
Parameter | Type |
---|---|
onEvent ? | (progress ) => void |
options ? | DownloadOptions |
Returns
Promise
<void
>
install()
install(): Promise<void>
Install downloaded updater package
Returns
Promise
<void
>
Interfaces
CheckOptions
Options used when checking for updates
Properties
Property | Type | Description | Defined in |
---|---|---|---|
timeout? | number | Timeout in milliseconds |
DownloadOptions
Options used when downloading an update
Properties
Property | Type | Description | Defined in |
---|---|---|---|
timeout? | number | Timeout in milliseconds |
Type Aliases
DownloadEvent
type DownloadEvent: object | object | object;
Updater download event
Functions
check()
function check(options?): Promise<Update | null>
Check for updates, resolves to null
if no updates are available
Parameters
Parameter | Type |
---|---|
options ? | CheckOptions |