Developer API only. See Configuration for user documentation.
Modules
electron-builder
- electron-builder
.Arch:enum.build(rawOptions)⇒Promise<Array<String>>.createTargets(platforms, type, arch)⇒Map<Platform | Map<Arch | Array<String>>>
electron-builder.Arch : enum
Kind: enum of electron-builder
Properties
ia32x64armv7larm64universal
electron-builder.build(rawOptions) ⇒ Promise<Array<String>>
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
- 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>
.PlugDescriptor.SlotDescriptor.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>>
ArtifactBuildStarted
Kind: interface of app-builder-lib
Properties
targetPresentableNameStringfileStringarchArch | “undefined”
ArtifactCreated ⇐ module:packages/electron-publish/out/publisher.UploadTask
Kind: interface of app-builder-lib
Extends: module:packages/electron-publish/out/publisher.UploadTask
Properties
packagerPlatformPackager<any>targetTarget | “undefined”updateInfoanysafeArtifactNameString | “undefined”publishConfigPublishConfiguration | “undefined”isWriteUpdateInfoBoolean
BeforeBuildContext
Kind: interface of app-builder-lib
Properties
appDirStringelectronVersionStringplatformPlatformarchString
BuildResult
Kind: interface of app-builder-lib
Properties
outDirStringartifactPathsArray<String>platformToTargetsMap<Platform | Map<String | Target>>configurationConfiguration
CertificateFromStoreInfo
Kind: interface of app-builder-lib
Properties
thumbprintStringsubjectStringstoreStringisLocalMachineStoreBoolean
FileCodeSigningInfo
Kind: interface of app-builder-lib
Properties
fileStringpasswordString | “undefined”
Framework
Kind: interface of app-builder-lib
Properties
nameStringversionStringdistMacOsAppNameStringmacOsDefaultTargetsArray<String>defaultAppIdPrefixStringisNpmRebuildRequiredBooleanisCopyElevateHelperBoolean
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>
framework.afterPack(context) ⇒ Promise<any>
| Param | Type |
|---|---|
| context | module:app-builder-lib/out/configuration.PackContext |
framework.beforeCopyExtraFiles(options) ⇒ Promise<any>
| Param | Type |
|---|---|
| options | module:app-builder-lib/out/Framework.BeforeCopyExtraFilesOptions |
framework.createTransformer() ⇒ null | module:packages/builder-util/out/fs.__type
framework.getDefaultIcon(platform) ⇒ null | String
| Param | Type |
|---|---|
| platform | Platform |
framework.getExcludedDependencies(platform) ⇒ null | Array
| Param | Type |
|---|---|
| platform | Platform |
framework.getMainFile(platform) ⇒ null | String
| Param | Type |
|---|---|
| platform | Platform |
framework.prepareApplicationStageDirectory(options) ⇒ Promise<any>
| Param | Type |
|---|---|
| options | PrepareApplicationStageDirectoryOptions |
PlugDescriptor
Kind: interface of app-builder-lib
SlotDescriptor
Kind: interface of app-builder-lib
SourceRepositoryInfo
Kind: interface of app-builder-lib
Properties
typeStringdomainStringuserStringprojectString
AppInfo
Kind: class of app-builder-lib
Properties
description=smarten(this.info.metadata.description || "")StringversionStringtypeString | undefinedshortVersionString | undefinedshortVersionWindowsString | undefinedbuildNumberString | undefinedbuildVersionStringproductNameStringsanitizedProductNameStringproductFilenameStringchannelString | “undefined”companyNameString | “undefined”idStringmacBundleIdentifierStringnameStringlinuxPackageNameStringsanitizedNameStringupdaterCacheDirNameStringcopyrightString
Methods
- .AppInfo
.computePackageUrl()⇒Promise< | String>.getVersionInWeirdWindowsForm(isSetBuildNumber)⇒String
appInfo.computePackageUrl() ⇒ Promise< | String>
appInfo.getVersionInWeirdWindowsForm(isSetBuildNumber) ⇒ String
| Param |
|---|
| isSetBuildNumber |
Packager
Kind: class of app-builder-lib
Properties
projectDirStringappDirStringmetadataMetadataareNodeModulesHandledExternallyBooleanisPrepackedAppAsarBooleandevMetadataMetadata | “undefined”configConfigurationisTwoPackageJsonProjectLayoutUsed=falseBooleaneventEmitter=new EventEmitter()module:events.EventEmitter_appInfoAppInfo | “undefined”appInfoAppInfotempDirManager=new TmpDir("packager")TmpDiroptionsPackagerOptionsdebugLogger=new DebugLogger(log.isDebugEnabled)DebugLoggerrepositoryInfoPromise< | SourceRepositoryInfo>[stageDirPathCustomizer=(target, packager, arch) => { return path.join(target.outDir,callback__${target.name}-${getArtifactArchName(arch, target.name)}) }]buildResourcesDirStringrelativeBuildResourcesDirnameStringframeworkFramework
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 |
packager.addAfterPackHandler(handler)
| Param | Type |
|---|---|
| handler | callback |
packager.afterPack(context) ⇒ Promise<any>
| Param | Type |
|---|---|
| context | module:app-builder-lib/out/configuration.PackContext |
packager.artifactCreated(handler) ⇒ Packager
| Param | Type |
|---|---|
| handler | callback |
packager.build() ⇒ Promise<BuildResult>
packager.callAppxManifestCreated(path) ⇒ Promise<void>
| Param | Type |
|---|---|
| path | String |
packager.callArtifactBuildCompleted(event) ⇒ Promise<void>
| Param | Type |
|---|---|
| event | ArtifactCreated |
packager.callArtifactBuildStarted(event, logFields) ⇒ Promise<void>
| Param | Type |
|---|---|
| event | ArtifactBuildStarted |
| logFields | any |
packager.callMsiProjectCreated(path) ⇒ Promise<void>
| Param | Type |
|---|---|
| path | String |
packager.dispatchArtifactCreated(event)
Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted.
| Param | Type |
|---|---|
| event | ArtifactCreated |
packager.disposeOnBuildFinish(disposer)
| Param | Type |
|---|---|
| disposer | callback |
packager.installAppDependencies(platform, arch) ⇒ Promise<any>
| Param | Type |
|---|---|
| platform | Platform |
| arch | Arch |
packager.getNodeDependencyInfo(platform) ⇒ Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>
| Param | Type |
|---|---|
| platform | Platform | “undefined” |
Platform
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
platform.createTarget(type, archs) ⇒ Map<Platform | Map<Arch | Array<String>>>
| Param | Type |
|---|---|
| type | String | Array<String> | “undefined” |
| archs | Array<Arch> |
platform.current() ⇒ Platform
platform.fromString(name) ⇒ Platform
| Param | Type |
|---|---|
| name | String |
platform.toString() ⇒ String
PlatformPackager
Kind: class of app-builder-lib
Properties
packagerOptionsPackagerOptionsbuildResourcesDirStringprojectDirStringconfigConfigurationplatformSpecificBuildOptionsmodule:app-builder-lib/out/platformPackager.DCresourceListPromise<Array<String>>appInfoAppInfocompression“store” | “normal” | “maximum”debugLoggerDebugLoggerdefaultTargetArray<String>fileAssociationsArray<FileAssociation>forceCodeSigningBoolean
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 |
platformPackager.createTargets(targets, mapper)
| Param | Type |
|---|---|
| targets | Array<String> |
| mapper | callback |
platformPackager.getDefaultFrameworkIcon() ⇒ null | String
platformPackager.dispatchArtifactCreated(file, target, arch, safeArtifactName) ⇒ Promise<void>
| Param | Type |
|---|---|
| file | String |
| target | Target | “undefined” |
| arch | Arch | “undefined” |
| safeArtifactName | String | “undefined” |
platformPackager.getElectronDestinationDir(appOutDir) ⇒ String
| Param | Type |
|---|---|
| appOutDir | String |
platformPackager.getElectronSrcDir(dist) ⇒ String
| Param | Type |
|---|---|
| dist | String |
platformPackager.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch) ⇒ 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 |
platformPackager.expandMacro(pattern, arch, extra, isProductNameSanitized) ⇒ String
| Param | Type |
|---|---|
| pattern | String |
| arch | String | “undefined” |
| extra | any |
| isProductNameSanitized |
platformPackager.generateName2(ext, classifier, deployment) ⇒ String
| Param | Type |
|---|---|
| ext | String | “undefined” |
| classifier | String | “undefined” | undefined |
| deployment | Boolean |
platformPackager.getIconPath() ⇒ Promise< | String>
platformPackager.getMacOsResourcesDir(appOutDir) ⇒ String
| Param | Type |
|---|---|
| appOutDir | String |
platformPackager.pack(outDir, arch, targets, taskManager) ⇒ Promise<any>
| 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 | “set” | “icns” | “ico” |
platformPackager.getResource(custom, names) ⇒ Promise< | String>
| Param | Type |
|---|---|
| custom | String | “undefined” | undefined |
| names | Array<String> |
platformPackager.getResourcesDir(appOutDir) ⇒ String
| Param | Type |
|---|---|
| appOutDir | String |
platformPackager.getTempFile(suffix) ⇒ Promise<String>
| Param | Type |
|---|---|
| suffix | String |
PublishManager ⇐ module:packages/electron-publish/out/publisher.PublishContext
Kind: class of app-builder-lib
Extends: module:packages/electron-publish/out/publisher.PublishContext
Properties
isPublish=falseBooleanprogress=(process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : nullMultiProgress
Methods
- .PublishManager ⇐
module:packages/electron-publish/out/publisher.PublishContext.awaitTasks()⇒Promise<void>.cancelTasks().getGlobalPublishConfigurations()⇒Promise< | Array>
publishManager.awaitTasks() ⇒ Promise<void>
publishManager.cancelTasks()
publishManager.getGlobalPublishConfigurations() ⇒ Promise< | Array>
Target
Kind: class of app-builder-lib
Properties
outDirStringoptionsTargetSpecificOptions | “undefined” | undefined
Methods
- .Target
.build(appOutDir, arch)⇒Promise<any>.finishBuild()⇒Promise<any>
target.build(appOutDir, arch) ⇒ Promise<any>
| Param | Type |
|---|---|
| appOutDir | String |
| arch | Arch |
target.finishBuild() ⇒ Promise<any>
app-builder-lib.build(options, packager) ⇒ Promise<Array<String>>
Kind: method of app-builder-lib
| Param | Type |
|---|---|
| options | PackagerOptions | module:packages/electron-publish/out/publisher.PublishOptions |
| packager | Packager |
app-builder-lib.buildForge(forgeOptions, options) ⇒ Promise<Array<String>>
Kind: method of app-builder-lib
| Param | Type |
|---|---|
| forgeOptions | ForgeOptions |
| options | PackagerOptions |
dmg-builder
- dmg-builder
.attachAndExecute(dmgPath, readWrite, task)⇒Promise<any>.computeBackground(packager)⇒Promise<String>.detach(name)⇒Promise<void>.getDmgTemplatePath()⇒String.getDmgVendorPath()⇒String
dmg-builder.attachAndExecute(dmgPath, readWrite, task) ⇒ Promise<any>
Kind: method of dmg-builder
| Param | Type |
|---|---|
| dmgPath | String |
| readWrite | Boolean |
| task | callback |
dmg-builder.computeBackground(packager) ⇒ Promise<String>
Kind: method of dmg-builder
| Param | Type |
|---|---|
| packager | PlatformPackager<any> |
dmg-builder.detach(name) ⇒ Promise<void>
Kind: method of dmg-builder
| Param | Type |
|---|---|
| name | String |
dmg-builder.getDmgTemplatePath() ⇒ String
Kind: method of dmg-builder
dmg-builder.getDmgVendorPath() ⇒ String
Kind: method of dmg-builder
electron-publish
- electron-publish
.PublishContext.UploadTask- .HttpPublisher ⇐
Publisher.upload(task)⇒Promise<any>.toString()⇒String
- .ProgressCallback
- .Publisher
.toString()⇒String.upload(task)⇒Promise<any>
.getCiTag()⇒null|String
PublishContext
Kind: interface of electron-publish
Properties
cancellationTokenCancellationTokenprogressmodule:electron-publish/out/multiProgress.MultiProgress | “undefined”
UploadTask
Kind: interface of electron-publish
Properties
fileStringfileContentmodule:global.Buffer | “undefined”archArch | “undefined”safeArtifactNameString | “undefined”timeoutNumber | “undefined”
HttpPublisher ⇐ Publisher
Kind: class of electron-publish
Extends: Publisher
- .HttpPublisher ⇐
Publisher.upload(task)⇒Promise<any>.toString()⇒String
httpPublisher.upload(task) ⇒ Promise<any>
Overrides: upload
| Param | Type |
|---|---|
| task | UploadTask |
httpPublisher.toString() ⇒ String
ProgressCallback
Kind: class of electron-publish
progressCallback.update(transferred, total)
| Param | Type |
|---|---|
| transferred | Number |
| total | Number |
Publisher
Kind: class of electron-publish
Properties
providerName“github” | “s3” | “spaces” | “generic” | “custom” | “snapStore” | “keygen” | “bitbucket”
Methods
- .Publisher
.toString()⇒String.upload(task)⇒Promise<any>
publisher.toString() ⇒ String
publisher.upload(task) ⇒ Promise<any>
| Param | Type |
|---|---|
| task | UploadTask |
electron-publish.getCiTag() ⇒ null | String
Kind: method of electron-publish
electron-updater
- electron-updater
.Logger.ResolvedUpdateFileInfo.UpdateCheckResult.UpdateDownloadedEvent⇐module:builder-util-runtime.UpdateInfo- .AppImageUpdater ⇐
BaseUpdater - .AppUpdater ⇐
module:tiny-typed-emitter/lib/index.TypedEmitter.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)
- .BaseUpdater ⇐
AppUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
- .DebUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
- .MacUpdater ⇐
AppUpdater.quitAndInstall().addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
- .NsisUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
- .Provider
.getLatestVersion()⇒Promise<module:electron-updater/out/providers/Provider.T>.setRequestHeaders(value).resolveFiles(updateInfo)⇒Array<ResolvedUpdateFileInfo>
- .RpmUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
- .UpdaterSignal
.autoUpdater:AppUpdater
Logger
Kind: interface of electron-updater
logger.debug(message)
| Param | Type |
|---|---|
| message | String |
logger.error(message)
| Param | Type |
|---|---|
| message | any |
logger.info(message)
| Param | Type |
|---|---|
| message | any |
logger.warn(message)
| Param | Type |
|---|---|
| message | any |
ResolvedUpdateFileInfo
Kind: interface of electron-updater
Properties
urlmodule:url.URLinfomodule:builder-util-runtime.UpdateFileInfopackageInfomodule:builder-util-runtime.PackageFileInfo
UpdateCheckResult
Kind: interface of electron-updater
Properties
updateInfomodule:builder-util-runtime.UpdateInfodownloadPromisePromise<Array<String>> | “undefined”cancellationTokenCancellationTokenversionInfomodule:builder-util-runtime.UpdateInfo - Deprecated:
UpdateDownloadedEvent ⇐ module:builder-util-runtime.UpdateInfo
Kind: interface of electron-updater
Extends: module:builder-util-runtime.UpdateInfo
Properties
downloadedFileString
AppImageUpdater ⇐ BaseUpdater
Kind: class of electron-updater
Extends: BaseUpdater
appImageUpdater.isUpdaterActive() ⇒ Boolean
appImageUpdater.install(isSilent, isForceRunAfter) ⇒ Boolean
| Param |
|---|
| isSilent |
| isForceRunAfter |
appImageUpdater.quitAndInstall(isSilent, isForceRunAfter)
| Param |
|---|
| isSilent |
| isForceRunAfter |
AppUpdater ⇐ module:tiny-typed-emitter/lib/index.TypedEmitter
Kind: class of electron-updater
Extends: module:tiny-typed-emitter/lib/index.TypedEmitter
Properties
-
autoDownload=trueBoolean - Whether to automatically download an update when it is found. -
autoInstallOnAppQuit=trueBoolean - Whether to automatically install a downloaded update on app quit (ifquitAndInstallwas not called before). -
autoRunAppAfterInstall=trueBoolean - windows-only Whether to run the app after finish install when run the installer NOT in silent mode. -
allowPrerelease=falseBoolean - GitHub provider only. Whether to allow update to pre-release versions. Defaults totrueif application version contains prerelease components (e.g.0.12.1-alpha.1, herealphais a prerelease component), otherwisefalse.If
true, downgrade will be allowed (allowDowngradewill be set totrue). -
fullChangelog=falseBoolean - GitHub provider only. Get all release notes (from current version to latest), not just the latest. -
allowDowngrade=falseBoolean - 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=falseBoolean - 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.
-
disableDifferentialDownload=falseBoolean - NSIS only Disable differential downloads and always perform full download of installer. -
forceDevUpdateConfig=falseBoolean - 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") -
currentVersionSemVer - The current application version. -
channelString | “undefined” - Get the update channel. Not applicable for GitHub. Doesn’t returnchannelfrom the update configuration, only if was previously set. -
requestHeaders[key: string]: string | “undefined” - The request headers. -
netSessionElectron:Session -
loggerLogger | “undefined” - The logger. You can pass electron-log, winston or another logger with the following interface:{ info(), warn(), error() }. Set it tonullif you would like to disable a logging feature. -
signals=new UpdaterSignal(this)UpdaterSignal -
configOnDisk=new Lazy<any>(() => this.loadUpdateConfig())Lazy<any> -
httpExecutormodule:electron-updater/out/electronHttpExecutor.ElectronHttpExecutor -
isAddNoCacheQueryBoolean
Methods
- .AppUpdater ⇐
module:tiny-typed-emitter/lib/index.TypedEmitter.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)
appUpdater.addAuthHeader(token)
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 |
appUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
appUpdater.getFeedURL() ⇒ undefined | null | String
appUpdater.setFeedURL(options)
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. |
appUpdater.isUpdaterActive() ⇒ Boolean
appUpdater.quitAndInstall(isSilent, isForceRunAfter)
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(In this case you can still set autoRunAppAfterInstall to false to prevent run the app after finish). |
BaseUpdater ⇐ AppUpdater
Kind: class of electron-updater
Extends: AppUpdater
- .BaseUpdater ⇐
AppUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
baseUpdater.install(isSilent, isForceRunAfter) ⇒ Boolean
| Param |
|---|
| isSilent |
| isForceRunAfter |
baseUpdater.quitAndInstall(isSilent, isForceRunAfter)
Overrides: quitAndInstall
| Param |
|---|
| isSilent |
| isForceRunAfter |
baseUpdater.addAuthHeader(token)
Shortcut for explicitly adding auth tokens to request headers
| Param | Type |
|---|---|
| token | String |
baseUpdater.checkForUpdates() ⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
baseUpdater.checkForUpdatesAndNotify(downloadNotification) ⇒ Promise< | UpdateCheckResult>
| Param | Type |
|---|---|
| downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
baseUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
baseUpdater.getFeedURL() ⇒ undefined | null | String
baseUpdater.setFeedURL(options)
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. |
baseUpdater.isUpdaterActive() ⇒ Boolean
DebUpdater ⇐ BaseUpdater
Kind: class of electron-updater
Extends: BaseUpdater
- .DebUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
debUpdater.install(isSilent, isForceRunAfter) ⇒ Boolean
| Param |
|---|
| isSilent |
| isForceRunAfter |
debUpdater.quitAndInstall(isSilent, isForceRunAfter)
| Param |
|---|
| isSilent |
| isForceRunAfter |
debUpdater.addAuthHeader(token)
Shortcut for explicitly adding auth tokens to request headers
| Param | Type |
|---|---|
| token | String |
debUpdater.checkForUpdates() ⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
debUpdater.checkForUpdatesAndNotify(downloadNotification) ⇒ Promise< | UpdateCheckResult>
| Param | Type |
|---|---|
| downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
debUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
debUpdater.getFeedURL() ⇒ undefined | null | String
debUpdater.setFeedURL(options)
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. |
debUpdater.isUpdaterActive() ⇒ Boolean
MacUpdater ⇐ AppUpdater
Kind: class of electron-updater
Extends: AppUpdater
- .MacUpdater ⇐
AppUpdater.quitAndInstall().addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
macUpdater.quitAndInstall()
Overrides: quitAndInstall
macUpdater.addAuthHeader(token)
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 |
macUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
macUpdater.getFeedURL() ⇒ undefined | null | String
macUpdater.setFeedURL(options)
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. |
macUpdater.isUpdaterActive() ⇒ Boolean
NsisUpdater ⇐ BaseUpdater
Kind: class of electron-updater
Extends: BaseUpdater
Properties
installDirectoryString - Specify custom install directory pathverifyUpdateCodeSignaturemodule:electron-updater.__type - The verifyUpdateCodeSignature. You can pass win-verify-signature or another custom verify function:(publisherName: string[], path: string) => Promise<string | null>. The default verify function uses windowsExecutableCodeSignatureVerifier
Methods
- .NsisUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
nsisUpdater.install(isSilent, isForceRunAfter) ⇒ Boolean
| Param |
|---|
| isSilent |
| isForceRunAfter |
nsisUpdater.quitAndInstall(isSilent, isForceRunAfter)
| Param |
|---|
| isSilent |
| isForceRunAfter |
nsisUpdater.addAuthHeader(token)
Shortcut for explicitly adding auth tokens to request headers
| Param | Type |
|---|---|
| token | String |
nsisUpdater.checkForUpdates() ⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
nsisUpdater.checkForUpdatesAndNotify(downloadNotification) ⇒ Promise< | UpdateCheckResult>
| Param | Type |
|---|---|
| downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
nsisUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
nsisUpdater.getFeedURL() ⇒ undefined | null | String
nsisUpdater.setFeedURL(options)
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. |
nsisUpdater.isUpdaterActive() ⇒ Boolean
Provider
Kind: class of electron-updater
Properties
isUseMultipleRangeRequestBooleanfileExtraDownloadHeaders[key: string]: string | “undefined”
Methods
- .Provider
.getLatestVersion()⇒Promise<module:electron-updater/out/providers/Provider.T>.setRequestHeaders(value).resolveFiles(updateInfo)⇒Array<ResolvedUpdateFileInfo>
provider.getLatestVersion() ⇒ Promise<module:electron-updater/out/providers/Provider.T>
provider.setRequestHeaders(value)
| Param | Type |
|---|---|
| value | [key: string]: string | “undefined” |
provider.resolveFiles(updateInfo) ⇒ Array<ResolvedUpdateFileInfo>
| Param | Type |
|---|---|
| updateInfo | module:electron-updater/out/providers/Provider.T |
RpmUpdater ⇐ BaseUpdater
Kind: class of electron-updater
Extends: BaseUpdater
- .RpmUpdater ⇐
BaseUpdater.install(isSilent, isForceRunAfter)⇒Boolean.quitAndInstall(isSilent, isForceRunAfter).addAuthHeader(token).checkForUpdates()⇒Promise< | UpdateCheckResult>.checkForUpdatesAndNotify(downloadNotification)⇒Promise< | UpdateCheckResult>.downloadUpdate(cancellationToken)⇒Promise<Array<String>>.getFeedURL()⇒undefined|null|String.setFeedURL(options).isUpdaterActive()⇒Boolean
rpmUpdater.install(isSilent, isForceRunAfter) ⇒ Boolean
| Param |
|---|
| isSilent |
| isForceRunAfter |
rpmUpdater.quitAndInstall(isSilent, isForceRunAfter)
| Param |
|---|
| isSilent |
| isForceRunAfter |
rpmUpdater.addAuthHeader(token)
Shortcut for explicitly adding auth tokens to request headers
| Param | Type |
|---|---|
| token | String |
rpmUpdater.checkForUpdates() ⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
rpmUpdater.checkForUpdatesAndNotify(downloadNotification) ⇒ Promise< | UpdateCheckResult>
| Param | Type |
|---|---|
| downloadNotification | module:electron-updater/out/AppUpdater.DownloadNotification |
rpmUpdater.downloadUpdate(cancellationToken) ⇒ Promise<Array<String>>
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 |
rpmUpdater.getFeedURL() ⇒ undefined | null | String
rpmUpdater.setFeedURL(options)
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. |
rpmUpdater.isUpdaterActive() ⇒ Boolean
UpdaterSignal
Kind: class of electron-updater
updaterSignal.login(handler)
Emitted when an authenticating proxy is asking for user credentials.
| Param | Type |
|---|---|
| handler | module:electron-updater.__type |
updaterSignal.progress(handler)
| Param | Type |
|---|---|
| handler | callback |
updaterSignal.updateCancelled(handler)
| Param | Type |
|---|---|
| handler | callback |
updaterSignal.updateDownloaded(handler)
| Param | Type |
|---|---|
| handler | callback |
electron-updater.autoUpdater : AppUpdater
Kind: constant of electron-updater