Class: Upgrader

Upgrader()

The Upgrader class controls the update process using the info passed down from the parent application. It ensures that all the fs interactions occur that are necessary to treat a local directory as an update stream for nuget packages.

Constructor

new Upgrader()

Source:

Methods

(async) _getLatestUpdate(currentVersion, environment) → {Promise.<Object>}

Retrieve and cache the updates available for electron based on the specified current version and environment.

Parameters:
Name Type Description
currentVersion
environment
Source:
Returns:
Type
Promise.<Object>

(private) _init()

Initialize the upgrader and ensure the appropriate file directories are accessible.

Source:

getFeedURL() → {string}

Get the path to use as the feed url for the electron autoUpdater module.

Source:
Returns:
Type
string

(async) prepareElectronUpgrade(electronUpdate, onDownloadProgress) → {Promise.<void>}

Download the electron upgrade to the file system and prepare it for installation.

Parameters:
Name Type Description
electronUpdate
onDownloadProgress
Source:
Returns:
Type
Promise.<void>

(async) shouldUpgrade(latestUpdate, currentVersion, environment) → {Promise.<boolean>}

Returns true if the next electron update is a major version upgrade.

Parameters:
Name Type Description
latestUpdate
currentVersion
environment
Source:
Returns:
Type
Promise.<boolean>