Skip to content

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
ParameterType
metadataUpdateMetadata
Returns

Update

Overrides

Resource.constructor

Properties

PropertyTypeDefined in
body?string
currentVersionstring
date?string
kind"app" | "assets"
versionstring

Accessors

rid
Get Signature
get rid(): number
Returns

number

Inherited from

Resource.rid

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

Resource.close

download()
download(onEvent?, options?): Promise<void>

Download the updater package

Parameters
ParameterType
onEvent?(progress) => void
options?DownloadOptions
Returns

Promise<void>

downloadAndInstall()
downloadAndInstall(onEvent?, options?): Promise<void>

Downloads the updater package and installs it

Parameters
ParameterType
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

PropertyTypeDescriptionDefined in
timeout?numberTimeout in milliseconds

DownloadOptions

Options used when downloading an update

Properties

PropertyTypeDescriptionDefined in
timeout?numberTimeout 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

ParameterType
options?CheckOptions

Returns

Promise<Update | null>