Deploy

View on Github

Deploy handles live deploys of the app. Downloading, extracting, and rolling back snapshots.

Properties

channelDeployChannel

The active deploy channel. Set this to change the channel on which Deploy operates.

pluginany

The deploy plugin. Full documentation and examples can be found on the plugin’s README, but we recommend using the Cloud Client.

Methods

check(): Promise<boolean>

Check for updates on the active channel.

The promise resolves with a boolean. When true, a new snapshot exists on the channel.

download(options?DeployDownloadOptions): Promise<void>

Download the available snapshot.

This should be used in conjunction with extract().

options (optional)

Options for this download, such as a progress callback.

extract(options?DeployExtractOptions): Promise<void>

Extract the downloaded snapshot.

This should be called after download() successfully resolves.

options (optional)

load(): void

Immediately reload the app with the latest deployed snapshot.

This is only necessary to call if you have downloaded and extracted a snapshot and wish to instantly reload the app with the latest deploy. The latest deploy will automatically be loaded when the app is started.

info(): Promise<any>

Get information about the current snapshot.

The promise is resolved with an object that has key/value pairs pertaining to the currently deployed snapshot.

getSnapshots(): Promise<any>

List the snapshots that have been installed on this device.

The promise is resolved with an array of snapshot UUIDs.

deleteSnapshot(uuidstring): Promise<any>

Remove a snapshot from this device.

uuid

The snapshot UUID to remove from the device.

getMetadata(uuid?string): Promise<any>

Fetches the metadata for a given snapshot. If no UUID is given, it will attempt to grab the metadata for the most recently known snapshot.

uuid (optional)

The snapshot from which to grab metadata.

Services

    API

      General