diff --git a/docs/api/electron-builder.md b/docs/api/electron-builder.md index 597b1560207..81194229297 100644 --- a/docs/api/electron-builder.md +++ b/docs/api/electron-builder.md @@ -7,6 +7,8 @@ Developer API only. See [Configuration](../configuration/configuration.md) for u
.prepareApplicationStageDirectory(options)
⇒ Promise<any>
.PlugDescriptor
.SlotDescriptor
.SourceRepositoryInfo
PlugDescriptor
Kind: interface of app-builder-lib
+
SlotDescriptor
Kind: interface of app-builder-lib
+
SourceRepositoryInfo
Kind: interface of app-builder-lib
Properties
__${target.name}-${getArtifactArchName(arc
-
+
+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
@@ -1413,9 +1501,11 @@ return path.join(target.outDir,
__${target.name}-${getArtifactArchName(arc
.ResolvedUpdateFileInfo
.UpdateCheckResult
.UpdateDownloadedEvent
⇐ module:builder-util-runtime.UpdateInfo
-- .AppImageUpdater ⇐
module:electron-updater/out/BaseUpdater.BaseUpdater
+ - .AppImageUpdater ⇐
BaseUpdater
.isUpdaterActive()
⇒ Boolean
+.install(isSilent, isForceRunAfter)
⇒ Boolean
+.quitAndInstall(isSilent, isForceRunAfter)
- .AppUpdater ⇐
module:tiny-typed-emitter/lib/index.TypedEmitter
@@ -1430,7 +1520,32 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
.quitAndInstall(isSilent, isForceRunAfter)
module:electron-updater/out/BaseUpdater.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
.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
AppUpdater
.quitAndInstall()
__${target.name}-${getArtifactArchName(arc
.isUpdaterActive()
⇒ Boolean
module:electron-updater/out/BaseUpdater.BaseUpdater
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
.getLatestVersion()
⇒ Promise<module:electron-updater/out/providers/Provider.T>
__${target.name}-${getArtifactArchName(arc
.resolveFiles(updateInfo)
⇒ Array<ResolvedUpdateFileInfo>
module:electron-updater/out/BaseUpdater.BaseUpdater
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
.login(handler)
__${target.name}-${getArtifactArchName(arc
downloadedFile
String
module:electron-updater/out/BaseUpdater.BaseUpdater
BaseUpdater
Kind: class of electron-updater
-Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
-
BaseUpdater
+BaseUpdater
+.isUpdaterActive()
⇒ Boolean
.install(isSilent, isForceRunAfter)
⇒ Boolean
.quitAndInstall(isSilent, isForceRunAfter)
appImageUpdater.isUpdaterActive()
⇒ Boolean
appImageUpdater.install(isSilent, isForceRunAfter)
⇒ Boolean
Param | +
---|
isSilent | +
isForceRunAfter | +
appImageUpdater.quitAndInstall(isSilent, isForceRunAfter)
Param | +
---|
isSilent | +
isForceRunAfter | +
module:tiny-typed-emitter/lib/index.TypedEmitter
Kind: class of electron-updater
@@ -1754,18 +1936,15 @@ This is different from the normal quit event sequence.
module:electron-updater/out/BaseUpdater.BaseUpdater
Kind: class of electron-updater
-Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
-
AppUpdater
AppUpdater
Kind: class of electron-updater
Extends: AppUpdater
AppUpdater
+AppUpdater
.quitAndInstall()
.install(isSilent, isForceRunAfter)
⇒ Boolean
.quitAndInstall(isSilent, isForceRunAfter)
.addAuthHeader(token)
.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
macUpdater.quitAndInstall()
Overrides: quitAndInstall
-
macUpdater.addAuthHeader(token)
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
macUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
baseUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
-macUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
baseUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
macUpdater.downloadUpdate(cancellationToken)
⇒ Promise<Array<String>>
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.
macUpdater.getFeedURL()
⇒ undefined
| null
| String
baseUpdater.getFeedURL()
⇒ undefined
| null
| String
macUpdater.setFeedURL(options)
baseUpdater.setFeedURL(options)
Configure update provider. If value is string
, GenericServerOptions will be set with value as url
.
macUpdater.isUpdaterActive()
⇒ Boolean
module:electron-updater/out/BaseUpdater.BaseUpdater
Kind: class of electron-updater
-Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
-Properties
installDirectory
String - Specify custom install directory pathverifyUpdateCodeSignature
module: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 windowsExecutableCodeSignatureVerifierbaseUpdater.isUpdaterActive()
⇒ Boolean
BaseUpdater
Kind: class of electron-updater
-Properties
isUseMultipleRangeRequest
BooleanfileExtraDownloadHeaders
[key: string]: string | “undefined”Methods
+Extends:BaseUpdater
BaseUpdater
.getLatestVersion()
⇒ Promise<module:electron-updater/out/providers/Provider.T>
.setRequestHeaders(value)
.resolveFiles(updateInfo)
⇒ Array<ResolvedUpdateFileInfo>
.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>
provider.setRequestHeaders(value)
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
value | -[key: string]: string | “undefined” |
+token | +String |
provider.resolveFiles(updateInfo)
⇒ Array<ResolvedUpdateFileInfo>
debUpdater.checkForUpdates()
⇒ Promise< | UpdateCheckResult>
Asks the server whether there is an update.
+ +debUpdater.checkForUpdatesAndNotify(downloadNotification)
⇒ Promise< | UpdateCheckResult>
updateInfo | -module:electron-updater/out/providers/Provider.T |
+downloadNotification | +module:electron-updater/out/AppUpdater.DownloadNotification |
module:electron-updater/out/BaseUpdater.BaseUpdater
Kind: class of electron-updater
-Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
-
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
AppUpdater
Kind: class of electron-updater
+Extends: AppUpdater
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
BaseUpdater
Kind: class of electron-updater
+Extends: BaseUpdater
+Properties
installDirectory
String - Specify custom install directory pathverifyUpdateCodeSignature
module: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 windowsExecutableCodeSignatureVerifierMethods
+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
Kind: class of electron-updater
+Properties
isUseMultipleRangeRequest
BooleanfileExtraDownloadHeaders
[key: string]: string | “undefined”Methods
+.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 |
+
BaseUpdater
Kind: class of electron-updater
+Extends: BaseUpdater
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
Kind: class of electron-updater
undefined
category
String | “undefined” - The application category type, as shown in the Finder via View -> Arrange by Application Category when viewing the Applications directory.
This option has no effect unless building for “universal” arch and applies only if mergeASARs
is true
.
notarize
module:app-builder-lib/out/options/macOptions.NotarizeLegacyOptions | module:app-builder-lib/out/options/macOptions.NotarizeNotaryOptions | Boolean | “undefined” - Options to use for @electron/notarize (ref: https://github.com/electron/notarize). Supports both legacy
and notarytool
notarization tools. Use false
to explicitly disable
Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n1. APPLE_API_KEY
, APPLE_API_KEY_ID
and APPLE_API_ISSUER
\n2. APPLE_ID
and APPLE_APP_SPECIFIC_PASSWORD
\n3. APPLE_KEYCHAIN
and APPLE_KEYCHAIN_PROFILE
\n\nFor security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
notarize
NotarizeLegacyOptions | NotarizeNotaryOptions | Boolean | “undefined” - Options to use for @electron/notarize (ref: https://github.com/electron/notarize). Supports both legacy
and notarytool
notarization tools. Use false
to explicitly disable
Note: In order to activate the notarization step You MUST specify one of the following via environment variables: 1. APPLE_API_KEY
, APPLE_API_KEY_ID
and APPLE_API_ISSUER
. 2. APPLE_ID
and APPLE_APP_SPECIFIC_PASSWORD
3. APPLE_KEYCHAIN
and APPLE_KEYCHAIN_PROFILE
For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
undefined
+appBundleId
String | “undefined” - The app bundle identifier your Electron app is using. E.g. com.github.electron. Useful if notarization ID differs from app ID (unlikely). Only used by legacy
notarization toolascProvider
String | “undefined” - Your Team Short Name. Only used by legacy
notarization toolundefined
+teamId
String - The team ID you want to notarize under for when using notarytool
/
String | “undefined” - The directory path.
undefined
+provider
“custom” - The provider. Must be custom
.updateProvider
module:builder-util-runtime/out/publishOptions.__type - The Provider to provide UpdateInfo regarding available updates. Required to use custom providers with electron-updater.Inherited from PublishConfiguration
:
publishAutoUpdate
= true
Boolean - Whether to publish auto update info files.
Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.
+requestHeaders
module:http.OutgoingHttpHeaders - Any custom request headers
timeout
= 120000
Number | “undefined” - Request timeout in milliseconds. (Default is 2 minutes; O is ignored)
Additional attributes can be specified using object instead of just name of plug: [ { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true }, }, "another-simple-plug-name" ]
slots
Array<String | module:app-builder-lib/out/options/SnapOptions.SlotDescriptor> | module:app-builder-lib/out/options/SnapOptions.PlugDescriptor | “undefined” - The list of slots.
slots
Array<String | SlotDescriptor> | PlugDescriptor | “undefined” - The list of slots.
Additional attributes can be specified using object instead of just name of slot: ``` [ { “mpris”: { “name”: “chromium” }, } ]
In case you want your application to be a compliant MPris player, you will need to definie The mpris slot with “chromium” name. This electron has it hardcoded, and we need to pass this name so snap will allow it in strict confinement.