platform/updates/rollback
Classes
Section titled “Classes”AppImageRollback
Section titled “AppImageRollback”Defined in: app/src/platform/updates/rollback.ts:51
An AppImage keeps a copy of itself and swaps it back.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AppImageRollback(
appImage,directory,launch?):AppImageRollback
Defined in: app/src/platform/updates/rollback.ts:61
Parameters
Section titled “Parameters”appImage
Section titled “appImage”string
The running AppImage file.
directory
Section titled “directory”string
Where the copy is kept.
launch?
Section titled “launch?”Launcher = launchDetached
Starts the restored version.
Returns
Section titled “Returns”Methods
Section titled “Methods”keep()
Section titled “keep()”keep():
void
Defined in: app/src/platform/updates/rollback.ts:71
Keeps the running version, right before the update installs.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”prepare()
Section titled “prepare()”prepare():
Promise<void>
Defined in: app/src/platform/updates/rollback.ts:67
Fetches what a rollback needs while the browser runs, after an update was downloaded.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”restore()
Section titled “restore()”restore(
args):boolean
Defined in: app/src/platform/updates/rollback.ts:76
Brings the previous version back and starts it.
Parameters
Section titled “Parameters”readonly string[]
Command line arguments for the restored version, where it can take them.
Returns
Section titled “Returns”boolean
Whether the previous version could be restored.
Implementation of
Section titled “Implementation of”NsisRollback
Section titled “NsisRollback”Defined in: app/src/platform/updates/rollback.ts:91
An NSIS installation keeps the installer of the running version, verified against the signed feed, and reinstalls it silently.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NsisRollback(
directory,launch?):NsisRollback
Defined in: app/src/platform/updates/rollback.ts:99
Parameters
Section titled “Parameters”directory
Section titled “directory”string
Where the installer is kept.
launch?
Section titled “launch?”Launcher = launchDetached
Starts the installer.
Returns
Section titled “Returns”Methods
Section titled “Methods”keep()
Section titled “keep()”keep():
void
Defined in: app/src/platform/updates/rollback.ts:135
Keeps the running version, right before the update installs.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”prepare()
Section titled “prepare()”prepare(
version,download):Promise<void>
Defined in: app/src/platform/updates/rollback.ts:108
Fetches what a rollback needs while the browser runs, after an update was downloaded.
Parameters
Section titled “Parameters”version
Section titled “version”string
The running version.
download
Section titled “download”Fetches the package of a version.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”restore()
Section titled “restore()”restore(
_args):boolean
Defined in: app/src/platform/updates/rollback.ts:145
Reinstalls the previous version silently; the installer starts it afterwards, without arguments.
Parameters
Section titled “Parameters”readonly string[]
Not used, because the installer starts the browser.
Returns
Section titled “Returns”boolean
Whether an installer of the previous version was found.
Implementation of
Section titled “Implementation of”Interfaces
Section titled “Interfaces”Rollback
Section titled “Rollback”Defined in: app/src/platform/updates/rollback.ts:20
Keeps the running version so that a failed update can be undone without the network.
Methods
Section titled “Methods”keep()
Section titled “keep()”keep():
void
Defined in: app/src/platform/updates/rollback.ts:28
Keeps the running version, right before the update installs.
Returns
Section titled “Returns”void
prepare()
Section titled “prepare()”prepare(
version,download):Promise<void>
Defined in: app/src/platform/updates/rollback.ts:26
Fetches what a rollback needs while the browser runs, after an update was downloaded.
Parameters
Section titled “Parameters”version
Section titled “version”string
The running version.
download
Section titled “download”Fetches the package of a version.
Returns
Section titled “Returns”Promise<void>
restore()
Section titled “restore()”restore(
args):boolean
Defined in: app/src/platform/updates/rollback.ts:34
Brings the previous version back and starts it.
Parameters
Section titled “Parameters”readonly string[]
Command line arguments for the restored version, where it can take them.
Returns
Section titled “Returns”boolean
Whether the previous version could be restored.
RollbackOptions
Section titled “RollbackOptions”Defined in: app/src/platform/updates/rollback.ts:168
Where rollback files live, and the running AppImage, if any.
Properties
Section titled “Properties”appImage
Section titled “appImage”
readonlyappImage:string|undefined
Defined in: app/src/platform/updates/rollback.ts:170
directory
Section titled “directory”
readonlydirectory:string
Defined in: app/src/platform/updates/rollback.ts:169
Type Aliases
Section titled “Type Aliases”Launcher
Section titled “Launcher”Launcher = (
file,args) =>void
Defined in: app/src/platform/updates/rollback.ts:38
Starts a program detached from the browser.
Parameters
Section titled “Parameters”string
readonly string[]
Returns
Section titled “Returns”void
PackageDownloader
Section titled “PackageDownloader”PackageDownloader = (
version) =>Promise<{chunks:AsyncIterable<Uint8Array>;sha512:string; }>
Defined in: app/src/platform/updates/rollback.ts:45
Streams the package of a version, with its SHA-512 from the signed manifest.
Parameters
Section titled “Parameters”version
Section titled “version”string
Returns
Section titled “Returns”Promise<{ chunks: AsyncIterable<Uint8Array>; sha512: string; }>
Functions
Section titled “Functions”rollbackFor()
Section titled “rollbackFor()”rollbackFor(
type,options):Rollback|undefined
Defined in: app/src/platform/updates/rollback.ts:179
Picks the rollback for an installation type; other types are updated by IT or the package manager, or have no automatic rollback yet.
Parameters
Section titled “Parameters”The installation type.
options
Section titled “options”Where rollback files live and the running AppImage, if any.
Returns
Section titled “Returns”Rollback | undefined