Developer API only. See Configuration for user documentation.
- electron-builder
.Arch
:enum
.build(rawOptions)
⇒Promise<Array<String>>
.createTargets(platforms, type, arch)
⇒Map<Platform | Map<Arch | Array<String>>>
Kind: enum of electron-builder
Properties
ia32
x64
armv7l
arm64
universal
Kind: method of electron-builder
Param | Type |
---|---|
rawOptions | CliOptions |
electron-builder.createTargets(platforms, type, arch)
⇒ Map<Platform | Map<Arch | Array<String>>>
Kind: method of electron-builder
Param | Type |
---|---|
platforms | Array<Platform> |
type | String | “undefined” |
arch | String | “undefined” |
- app-builder-lib
.ArtifactBuildStarted
.ArtifactCreated
⇐module:packages/electron-publish/out/publisher.UploadTask
.BeforeBuildContext
.BuildResult
.CertificateFromStoreInfo
.FileCodeSigningInfo
.Framework
.afterPack(context)
⇒Promise<any>
.beforeCopyExtraFiles(options)
⇒Promise<any>
.createTransformer()
⇒null
|module:packages/builder-util/out/fs.__type
.getDefaultIcon(platform)
⇒null
|String
.getExcludedDependencies(platform)
⇒null
|Array
.getMainFile(platform)
⇒null
|String
.prepareApplicationStageDirectory(options)
⇒Promise<any>
.SourceRepositoryInfo
- .AppInfo
.computePackageUrl()
⇒Promise< | String>
.getVersionInWeirdWindowsForm(isSetBuildNumber)
⇒String
- .Packager
._build(configuration, metadata, devMetadata, repositoryInfo)
⇒Promise<BuildResult>
.addAfterPackHandler(handler)
.afterPack(context)
⇒Promise<any>
.artifactCreated(handler)
⇒Packager
.build()
⇒Promise<BuildResult>
.callAppxManifestCreated(path)
⇒Promise<void>
.callArtifactBuildCompleted(event)
⇒Promise<void>
.callArtifactBuildStarted(event, logFields)
⇒Promise<void>
.callMsiProjectCreated(path)
⇒Promise<void>
.dispatchArtifactCreated(event)
.disposeOnBuildFinish(disposer)
.installAppDependencies(platform, arch)
⇒Promise<any>
.getNodeDependencyInfo(platform)
⇒Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>
- .Platform
.createTarget(type, archs)
⇒Map<Platform | Map<Arch | Array<String>>>
.current()
⇒Platform
.fromString(name)
⇒Platform
.toString()
⇒String
- .PlatformPackager
.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒module:app-builder-lib/out/platformPackager.__object
.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒null
|String
.createTargets(targets, mapper)
.getDefaultFrameworkIcon()
⇒null
|String
.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒Promise<void>
.getElectronDestinationDir(appOutDir)
⇒String
.getElectronSrcDir(dist)
⇒String
.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒String
.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒String
.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒String
.generateName2(ext, classifier, deployment)
⇒String
.getIconPath()
⇒Promise< | String>
.getMacOsResourcesDir(appOutDir)
⇒String
.pack(outDir, arch, targets, taskManager)
⇒Promise<any>
.resolveIcon(sources, fallbackSources, outputFormat)
⇒Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
.getResource(custom, names)
⇒Promise< | String>
.getResourcesDir(appOutDir)
⇒String
.getTempFile(suffix)
⇒Promise<String>
- .PublishManager ⇐
module:packages/electron-publish/out/publisher.PublishContext
.awaitTasks()
⇒Promise<void>
.cancelTasks()
.getGlobalPublishConfigurations()
⇒Promise< | Array>
- .Target
.build(appOutDir, arch)
⇒Promise<any>
.finishBuild()
⇒Promise<any>
.build(options, packager)
⇒Promise<Array<String>>
.buildForge(forgeOptions, options)
⇒Promise<Array<String>>
Kind: interface of app-builder-lib
Properties
targetPresentableName
Stringfile
Stringarch
Arch | “undefined”
Kind: interface of app-builder-lib
Extends: module:packages/electron-publish/out/publisher.UploadTask
Properties
packager
PlatformPackager<any>target
Target | “undefined”updateInfo
anysafeArtifactName
String | “undefined”publishConfig
PublishConfiguration | “undefined”isWriteUpdateInfo
Boolean
Kind: interface of app-builder-lib
Properties
appDir
StringelectronVersion
Stringplatform
Platformarch
String
Kind: interface of app-builder-lib
Properties
outDir
StringartifactPaths
Array<String>platformToTargets
Map<Platform | Map<String | Target>>configuration
Configuration
Kind: interface of app-builder-lib
Properties
thumbprint
Stringsubject
Stringstore
StringisLocalMachineStore
Boolean
Kind: interface of app-builder-lib
Properties
file
Stringpassword
String | “undefined”
Kind: interface of app-builder-lib
Properties
name
Stringversion
StringdistMacOsAppName
StringmacOsDefaultTargets
Array<String>defaultAppIdPrefix
StringisNpmRebuildRequired
BooleanisCopyElevateHelper
Boolean
Methods
.Framework
.afterPack(context)
⇒Promise<any>
.beforeCopyExtraFiles(options)
⇒Promise<any>
.createTransformer()
⇒null
|module:packages/builder-util/out/fs.__type
.getDefaultIcon(platform)
⇒null
|String
.getExcludedDependencies(platform)
⇒null
|Array
.getMainFile(platform)
⇒null
|String
.prepareApplicationStageDirectory(options)
⇒Promise<any>
Param | Type |
---|---|
context | module:app-builder-lib/out/configuration.PackContext |
Param | Type |
---|---|
options | module:app-builder-lib/out/Framework.BeforeCopyExtraFilesOptions |
Param | Type |
---|---|
platform | Platform |
Param | Type |
---|---|
platform | Platform |
Param | Type |
---|---|
platform | Platform |
Param | Type |
---|---|
options | PrepareApplicationStageDirectoryOptions |
Kind: interface of app-builder-lib
Properties
type
Stringdomain
Stringuser
Stringproject
String
Kind: class of app-builder-lib
Properties
description
=smarten(this.info.metadata.description || "")
Stringversion
StringshortVersion
String | undefinedshortVersionWindows
String | undefinedbuildNumber
String | undefinedbuildVersion
StringproductName
StringsanitizedProductName
StringproductFilename
Stringchannel
String | “undefined”companyName
String | “undefined”id
StringmacBundleIdentifier
Stringname
StringlinuxPackageName
StringsanitizedName
StringupdaterCacheDirName
Stringcopyright
String
Methods
- .AppInfo
.computePackageUrl()
⇒Promise< | String>
.getVersionInWeirdWindowsForm(isSetBuildNumber)
⇒String
Param |
---|
isSetBuildNumber |
Kind: class of app-builder-lib
Properties
projectDir
StringappDir
Stringmetadata
MetadataareNodeModulesHandledExternally
BooleanisPrepackedAppAsar
BooleandevMetadata
Metadata | “undefined”config
ConfigurationisTwoPackageJsonProjectLayoutUsed
=false
BooleaneventEmitter
=new EventEmitter()
module:events.EventEmitter_appInfo
AppInfo | “undefined”appInfo
AppInfotempDirManager
=new TmpDir("packager")
TmpDiroptions
PackagerOptionsdebugLogger
=new DebugLogger(log.isDebugEnabled)
DebugLoggerrepositoryInfo
Promise< | SourceRepositoryInfo>[stageDirPathCustomizer=(target, packager, arch) => { return path.join(target.outDir,
callback__${target.name}-${getArtifactArchName(arch, target.name)}
) }]buildResourcesDir
StringrelativeBuildResourcesDirname
Stringframework
Framework
Methods
- .Packager
._build(configuration, metadata, devMetadata, repositoryInfo)
⇒Promise<BuildResult>
.addAfterPackHandler(handler)
.afterPack(context)
⇒Promise<any>
.artifactCreated(handler)
⇒Packager
.build()
⇒Promise<BuildResult>
.callAppxManifestCreated(path)
⇒Promise<void>
.callArtifactBuildCompleted(event)
⇒Promise<void>
.callArtifactBuildStarted(event, logFields)
⇒Promise<void>
.callMsiProjectCreated(path)
⇒Promise<void>
.dispatchArtifactCreated(event)
.disposeOnBuildFinish(disposer)
.installAppDependencies(platform, arch)
⇒Promise<any>
.getNodeDependencyInfo(platform)
⇒Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>
packager._build(configuration, metadata, devMetadata, repositoryInfo)
⇒ Promise<BuildResult>
Param | Type |
---|---|
configuration | Configuration |
metadata | Metadata |
devMetadata | Metadata | “undefined” |
repositoryInfo | SourceRepositoryInfo |
Param | Type |
---|---|
handler | callback |
Param | Type |
---|---|
context | module:app-builder-lib/out/configuration.PackContext |
packager.artifactCreated(handler)
⇒ Packager
Param | Type |
---|---|
handler | callback |
packager.build()
⇒ Promise<BuildResult>
Param | Type |
---|---|
path | String |
Param | Type |
---|---|
event | ArtifactCreated |
Param | Type |
---|---|
event | ArtifactBuildStarted |
logFields | any |
Param | Type |
---|---|
path | String |
Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted
.
Param | Type |
---|---|
event | ArtifactCreated |
Param | Type |
---|---|
disposer | callback |
Param | Type |
---|---|
platform | Platform |
arch | Arch |
packager.getNodeDependencyInfo(platform)
⇒ Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>
Param | Type |
---|---|
platform | Platform | “undefined” |
Kind: class of app-builder-lib
Properties
MAC
=new Platform("mac", "mac", "darwin")
PlatformLINUX
=new Platform("linux", "linux", "linux")
PlatformWINDOWS
=new Platform("windows", "win", "win32")
Platform
Methods
- .Platform
.createTarget(type, archs)
⇒Map<Platform | Map<Arch | Array<String>>>
.current()
⇒Platform
.fromString(name)
⇒Platform
.toString()
⇒String
Param | Type |
---|---|
type | String | Array<String> | “undefined” |
archs | Array<Arch> |
platform.current()
⇒ Platform
platform.fromString(name)
⇒ Platform
Param | Type |
---|---|
name | String |
Kind: class of app-builder-lib
Properties
packagerOptions
PackagerOptionsbuildResourcesDir
StringprojectDir
Stringconfig
ConfigurationplatformSpecificBuildOptions
module:app-builder-lib/out/platformPackager.DCresourceList
Promise<Array<String>>appInfo
AppInfocompression
“store” | “normal” | “maximum”debugLogger
DebugLoggerdefaultTarget
Array<String>fileAssociations
Array<FileAssociation>forceCodeSigning
Boolean
Methods
- .PlatformPackager
.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒module:app-builder-lib/out/platformPackager.__object
.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒null
|String
.createTargets(targets, mapper)
.getDefaultFrameworkIcon()
⇒null
|String
.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒Promise<void>
.getElectronDestinationDir(appOutDir)
⇒String
.getElectronSrcDir(dist)
⇒String
.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒String
.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒String
.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒String
.generateName2(ext, classifier, deployment)
⇒String
.getIconPath()
⇒Promise< | String>
.getMacOsResourcesDir(appOutDir)
⇒String
.pack(outDir, arch, targets, taskManager)
⇒Promise<any>
.resolveIcon(sources, fallbackSources, outputFormat)
⇒Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
.getResource(custom, names)
⇒Promise< | String>
.getResourcesDir(appOutDir)
⇒String
.getTempFile(suffix)
⇒Promise<String>
platformPackager.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
Param | Type |
---|---|
targetSpecificOptions | TargetSpecificOptions | “undefined” | undefined |
defaultPattern | String | undefined |
platformPackager.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
Param | Type |
---|---|
suggestedName | String | “undefined” |
ext | String |
arch | Arch | “undefined” |
skipDefaultArch | |
defaultArch | String |
safePattern |
Param | Type |
---|---|
targets | Array<String> |
mapper | callback |
Param | Type |
---|---|
file | String |
target | Target | “undefined” |
arch | Arch | “undefined” |
safeArtifactName | String | “undefined” |
Param | Type |
---|---|
appOutDir | String |
Param | Type |
---|---|
dist | String |
Param | Type |
---|---|
targetSpecificOptions | TargetSpecificOptions | “undefined” | undefined |
ext | String |
arch | Arch | “undefined” |
platformPackager.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
Param | Type |
---|---|
targetSpecificOptions | TargetSpecificOptions | “undefined” | undefined |
ext | String |
arch | Arch | “undefined” |
defaultPattern | String |
skipDefaultArch | |
defaultArch | String |
Param | Type |
---|---|
pattern | String |
arch | String | “undefined” |
extra | any |
isProductNameSanitized |
Param | Type |
---|---|
ext | String | “undefined” |
classifier | String | “undefined” | undefined |
deployment | Boolean |
Param | Type |
---|---|
appOutDir | String |
Param | Type |
---|---|
outDir | String |
arch | Arch |
targets | Array<Target> |
taskManager | AsyncTaskManager |
platformPackager.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
Param | Type |
---|---|
sources | Array<String> |
fallbackSources | Array<String> |
outputFormat | “icns” | “ico” | “set” |
Param | Type |
---|---|
custom | String | “undefined” | undefined |
names | Array<String> |
Param | Type |
---|---|
appOutDir | String |
Param | Type |
---|---|
suffix | String |
Kind: class of app-builder-lib
Extends: module:packages/electron-publish/out/publisher.PublishContext
Properties
isPublish
=false
Booleanprogress
=(process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : null
MultiProgress
Methods
- .PublishManager ⇐
module:packages/electron-publish/out/publisher.PublishContext
.awaitTasks()
⇒Promise<void>
.cancelTasks()
.getGlobalPublishConfigurations()
⇒Promise< | Array>
Kind: class of app-builder-lib
Properties
outDir
Stringoptions
TargetSpecificOptions | “undefined” | undefined
Methods
- .Target
.build(appOutDir, arch)
⇒Promise<any>
.finishBuild()
⇒Promise<any>
Param | Type |
---|---|
appOutDir | String |
arch | Arch |
Kind: method of app-builder-lib
Param | Type |
---|---|
options | PackagerOptions | module:packages/electron-publish/out/publisher.PublishOptions |
packager | Packager |
Kind: method of app-builder-lib
Param | Type |
---|---|
forgeOptions | ForgeOptions |
options | PackagerOptions |
- electron-publish
.PublishContext
.UploadTask
- .HttpPublisher ⇐
Publisher
.upload(task)
⇒Promise<any>
.toString()
⇒String
- .ProgressCallback
- .Publisher
.toString()
⇒String
.upload(task)
⇒Promise<any>
.getCiTag()
⇒null
|String
Kind: interface of electron-publish
Properties
cancellationToken
CancellationTokenprogress
module:electron-publish/out/multiProgress.MultiProgress | “undefined”
Kind: interface of electron-publish
Properties
file
StringfileContent
module:global.Buffer | “undefined”arch
Arch | “undefined”safeArtifactName
String | “undefined”timeout
Number | “undefined”
HttpPublisher ⇐ Publisher
Kind: class of electron-publish
Extends: Publisher
- .HttpPublisher ⇐
Publisher
.upload(task)
⇒Promise<any>
.toString()
⇒String
Overrides: upload
Param | Type |
---|---|
task | UploadTask |
Kind: class of electron-publish
Param | Type |
---|---|
transferred | Number |
total | Number |
Kind: class of electron-publish
Properties
providerName
“github” | “s3” | “spaces” | “generic” | “custom” | “snapStore” | “keygen” | “bitbucket”
Methods
- .Publisher
.toString()
⇒String
.upload(task)
⇒Promise<any>
Param | Type |
---|---|
task | UploadTask |
Kind: method of electron-publish
- electron-updater
.Logger
.ResolvedUpdateFileInfo
.UpdateCheckResult
.UpdateDownloadedEvent
⇐module:builder-util-runtime.UpdateInfo
- .AppImageUpdater ⇐
module:electron-updater/out/BaseUpdater.BaseUpdater
.isUpdaterActive()
⇒Boolean
- .AppUpdater ⇐
module:typed-emitter/index.TypedEventEmitter
.addAuthHeader(token)
.checkForUpdates()
⇒Promise< | UpdateCheckResult>
.checkForUpdatesAndNotify(downloadNotification)
⇒Promise< | UpdateCheckResult>
.downloadUpdate(cancellationToken)
⇒Promise<Array<String>>
.getFeedURL()
⇒undefined
|null
|String
.setFeedURL(options)
.isUpdaterActive()
⇒Boolean
.quitAndInstall(isSilent, isForceRunAfter)
.quitAppAndInstall(isForceRunAfter)
- .MacUpdater ⇐
AppUpdater
.quitAndInstall()
.quitAppAndInstall()
.addAuthHeader(token)
.checkForUpdates()
⇒Promise< | UpdateCheckResult>
.checkForUpdatesAndNotify(downloadNotification)
⇒Promise< | UpdateCheckResult>
.downloadUpdate(cancellationToken)
⇒Promise<Array<String>>
.getFeedURL()
⇒undefined
|null
|String
.setFeedURL(options)
.isUpdaterActive()
⇒Boolean
- .NsisUpdater ⇐
module:electron-updater/out/BaseUpdater.BaseUpdater
- .Provider
.getLatestVersion()
⇒Promise<module:electron-updater/out/providers/Provider.T>
.setRequestHeaders(value)
.resolveFiles(updateInfo)
⇒Array<ResolvedUpdateFileInfo>
- .UpdaterSignal
.autoUpdater
:AppUpdater
Kind: interface of electron-updater
Param | Type |
---|---|
message | String |
Param | Type |
---|---|
message | any |
Param | Type |
---|---|
message | any |
Param | Type |
---|---|
message | any |
Kind: interface of electron-updater
Properties
url
module:url.URLinfo
module:builder-util-runtime.UpdateFileInfopackageInfo
module:builder-util-runtime.PackageFileInfo
Kind: interface of electron-updater
Properties
updateInfo
module:builder-util-runtime.UpdateInfodownloadPromise
Promise<Array<String>> | “undefined”cancellationToken
CancellationTokenversionInfo
module:builder-util-runtime.UpdateInfo - Deprecated:
Kind: interface of electron-updater
Extends: module:builder-util-runtime.UpdateInfo
Properties
downloadedFile
String
Kind: class of electron-updater
Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
Kind: class of electron-updater
Extends: module:typed-emitter/index.TypedEventEmitter
Properties
-
autoDownload
=true
Boolean - Whether to automatically download an update when it is found. -
autoInstallOnAppQuit
=true
Boolean - Whether to automatically install a downloaded update on app quit (ifquitAndInstall
was not called before). -
allowPrerelease
=false
Boolean - GitHub provider only. Whether to allow update to pre-release versions. Defaults totrue
if application version contains prerelease components (e.g.0.12.1-alpha.1
, herealpha
is a prerelease component), otherwisefalse
.If
true
, downgrade will be allowed (allowDowngrade
will be set totrue
). -
fullChangelog
=false
Boolean - GitHub provider only. Get all release notes (from current version to latest), not just the latest. -
allowDowngrade
=false
Boolean - Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel).Taken in account only if channel differs (pre-release version component in terms of semantic versioning).
-
disableWebInstaller
=false
Boolean - Web installer files might not have signature verification, this switch prevents to load them unless it is needed.Currently false to prevent breaking the current API, but it should be changed to default true at some point that breaking changes are allowed.
-
forceDevUpdateConfig
=false
Boolean - Allows developer to force the updater to work in “dev” mode, looking for “dev-app-update.yml” instead of “app-update.yml” Dev:path.join(this.app.getAppPath(), "dev-app-update.yml")
Prod:path.join(process.resourcesPath!, "app-update.yml")
-
currentVersion
SemVer - The current application version. -
channel
String | “undefined” - Get the update channel. Not applicable for GitHub. Doesn’t returnchannel
from the update configuration, only if was previously set. -
requestHeaders
[key: string]: string | “undefined” - The request headers. -
netSession
Electron:Session -
logger
Logger | “undefined” - The logger. You can pass electron-log, winston or another logger with the following interface:{ info(), warn(), error() }
. Set it tonull
if you would like to disable a logging feature. -
signals
=new UpdaterSignal(this)
UpdaterSignal -
configOnDisk
=new Lazy<any>(() => this.loadUpdateConfig())
Lazy<any> -
httpExecutor
module:electron-updater/out/electronHttpExecutor.ElectronHttpExecutor -
isAddNoCacheQuery
Boolean
Methods
- .AppUpdater ⇐
module:typed-emitter/index.TypedEventEmitter
.addAuthHeader(token)
.checkForUpdates()
⇒Promise< | UpdateCheckResult>
.checkForUpdatesAndNotify(downloadNotification)
⇒Promise< | UpdateCheckResult>
.downloadUpdate(cancellationToken)
⇒Promise<Array<String>>
.getFeedURL()
⇒undefined
|null
|String
.setFeedURL(options)
.isUpdaterActive()
⇒Boolean
.quitAndInstall(isSilent, isForceRunAfter)
.quitAppAndInstall(isForceRunAfter)
Shortcut for explicitly adding auth tokens to request headers
Param | Type |
---|---|
token | String |
appUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
appUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
Param | Type |
---|---|
downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
Start downloading update manually. You can use this method if autoDownload
option is set to false
.
Returns: Promise<Array<String>>
- Paths to downloaded files.
Param | Type |
---|---|
cancellationToken | CancellationToken |
Configure update provider. If value is string
, GenericServerOptions will be set with value as url
.
Param | Type | Description |
---|---|---|
options | PublishConfiguration | String | GithubOptions | S3Options | SpacesOptions | GenericServerOptions | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | SnapStoreOptions | module:builder-util-runtime/out/publishOptions.BitbucketOptions | String |
If you want to override configuration in the app-update.yml . |
Restarts the app and installs the update after it has been downloaded.
It should only be called after update-downloaded
has been emitted.
Note: autoUpdater.quitAndInstall()
will close all application windows first and only emit before-quit
event on app
after that.
This is different from the normal quit event sequence.
Param | Type | Description |
---|---|---|
isSilent | Boolean |
windows-only Runs the installer in silent mode. Defaults to false . |
isForceRunAfter | Boolean |
Run the app after finish even on silent install. Not applicable for macOS. Ignored if isSilent is set to false . |
Quit the app and explicit installs the update after it has been downloaded.
It should only be called after update-downloaded
has been emitted.
Note: autoUpdater.quitAppAndInstall()
will close all application windows first and only emit before-quit
event on app
after that.
This is different from the normal quit event sequence.
Param | Type | Description |
---|---|---|
isForceRunAfter | Boolean |
Run the app after finish even on silent install. Not applicable for macOS. |
MacUpdater ⇐ AppUpdater
Kind: class of electron-updater
Extends: AppUpdater
- .MacUpdater ⇐
AppUpdater
.quitAndInstall()
.quitAppAndInstall()
.addAuthHeader(token)
.checkForUpdates()
⇒Promise< | UpdateCheckResult>
.checkForUpdatesAndNotify(downloadNotification)
⇒Promise< | UpdateCheckResult>
.downloadUpdate(cancellationToken)
⇒Promise<Array<String>>
.getFeedURL()
⇒undefined
|null
|String
.setFeedURL(options)
.isUpdaterActive()
⇒Boolean
Overrides: quitAndInstall
Overrides: quitAppAndInstall
Shortcut for explicitly adding auth tokens to request headers
Param | Type |
---|---|
token | String |
macUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
macUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
Param | Type |
---|---|
downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
Start downloading update manually. You can use this method if autoDownload
option is set to false
.
Returns: Promise<Array<String>>
- Paths to downloaded files.
Param | Type |
---|---|
cancellationToken | CancellationToken |
Configure update provider. If value is string
, GenericServerOptions will be set with value as url
.
Param | Type | Description |
---|---|---|
options | PublishConfiguration | String | GithubOptions | S3Options | SpacesOptions | GenericServerOptions | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | SnapStoreOptions | module:builder-util-runtime/out/publishOptions.BitbucketOptions | String |
If you want to override configuration in the app-update.yml . |
Kind: class of electron-updater
Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
Properties
installDirectory
String - Specify custom install directory path
Kind: class of electron-updater
Properties
isUseMultipleRangeRequest
BooleanfileExtraDownloadHeaders
[key: string]: string | “undefined”
Methods
- .Provider
.getLatestVersion()
⇒Promise<module:electron-updater/out/providers/Provider.T>
.setRequestHeaders(value)
.resolveFiles(updateInfo)
⇒Array<ResolvedUpdateFileInfo>
Param | Type |
---|---|
value | [key: string]: string | “undefined” |
provider.resolveFiles(updateInfo)
⇒ Array<ResolvedUpdateFileInfo>
Param | Type |
---|---|
updateInfo | module:electron-updater/out/providers/Provider.T |
Kind: class of electron-updater
Emitted when an authenticating proxy is asking for user credentials.
Param | Type |
---|---|
handler | module:electron-updater.__type |
Param | Type |
---|---|
handler | callback |
Param | Type |
---|---|
handler | callback |
Param | Type |
---|---|
handler | callback |
electron-updater.autoUpdater
: AppUpdater
Kind: constant of electron-updater