UNPKG

electron-builder-lib

Version:
1,217 lines (1,216 loc) 204 kB
{ "$schema": "http://json-schema.org/draft-04/schema#", "additionalProperties": false, "definitions": { "AppImageOptions": { "additionalProperties": false, "properties": { "artifactName": { "description": "The [artifact file name template](/configuration/configuration.md#artifact-file-name-template).", "type": [ "null", "string" ] }, "category": { "description": "The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).", "type": [ "null", "string" ] }, "description": { "description": "As [description](/configuration/configuration.md#Metadata-description) from application package.json, but allows you to specify different for Linux.", "type": [ "null", "string" ] }, "desktop": { "description": "The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value)." }, "publish": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "items": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "synopsis": { "description": "The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).", "type": [ "null", "string" ] }, "systemIntegration": { "default": "ask", "description": "The system integration installation.", "enum": [ "ask", "doNotAsk" ], "type": "string" } }, "title": "AppImageOptions", "type": "object" }, "AppXOptions": { "additionalProperties": false, "properties": { "applicationId": { "description": "The application id. Defaults to `identityName`. Can’t start with numbers.", "type": "string" }, "artifactName": { "description": "The [artifact file name template](/configuration/configuration.md#artifact-file-name-template).", "type": [ "null", "string" ] }, "backgroundColor": { "default": "#464646", "description": "The background color of the app tile. See [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx).", "type": [ "null", "string" ] }, "displayName": { "description": "A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).\nDefaults to the application product name.", "type": [ "null", "string" ] }, "electronUpdaterAware": { "default": false, "type": "boolean" }, "identityName": { "description": "The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](/configuration/configuration#Metadata-name).", "type": [ "null", "string" ] }, "languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": [ "null", "string" ] } ], "description": "The list of [supported languages](https://docs.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region#specify-the-supported-languages-in-the-apps-manifest) that will be listed in the Windows Store.\nThe first entry (index 0) will be the default language.\nDefaults to en-US if omitted." }, "makeappxArgs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "publish": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "items": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "publisher": { "description": "The Windows Store publisher. Not used if AppX is build for testing. See [AppX Package Code Signing](#appx-package-code-signing) below.", "type": [ "null", "string" ] }, "publisherDisplayName": { "description": "A friendly name for the publisher that can be displayed to users. Corresponds to [Properties.PublisherDisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211460.aspx).\nDefaults to company name from the application metadata.", "type": [ "null", "string" ] } }, "title": "AppXOptions", "type": "object" }, "AsarOptions": { "additionalProperties": false, "properties": { "externalAllowed": { "default": false, "description": "Allows external asar files.", "type": "boolean" }, "ordering": { "type": [ "null", "string" ] }, "smartUnpack": { "default": true, "description": "Whether to automatically unpack executables files.", "type": "boolean" } }, "title": "AsarOptions", "type": "object" }, "BintrayOptions": { "additionalProperties": false, "description": "[Bintray](https://bintray.com/) options. Requires an API key. An API key can be obtained from the user [profile](https://bintray.com/profile/edit) page (\"Edit Your Profile\" -> API Key).\nDefine `BT_TOKEN` environment variable.", "properties": { "component": { "description": "The Bintray component (Debian only).", "type": [ "null", "string" ] }, "distribution": { "default": "stable", "description": "The Bintray distribution (Debian only).", "type": [ "null", "string" ] }, "owner": { "description": "The owner.", "type": [ "null", "string" ] }, "package": { "description": "The Bintray package name.", "type": [ "null", "string" ] }, "provider": { "description": "The provider. Must be `bintray`.", "enum": [ "bintray" ], "type": "string" }, "publisherName": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "repo": { "default": "generic", "description": "The Bintray repository name.", "type": [ "null", "string" ] }, "token": { "type": [ "null", "string" ] }, "user": { "description": "The Bintray user account. Used in cases where the owner is an organization.", "type": [ "null", "string" ] } }, "required": [ "provider" ], "title": "BintrayOptions", "type": "object" }, "DebOptions": { "additionalProperties": false, "properties": { "afterInstall": { "type": [ "null", "string" ] }, "afterRemove": { "type": [ "null", "string" ] }, "artifactName": { "description": "The [artifact file name template](/configuration/configuration.md#artifact-file-name-template).", "type": [ "null", "string" ] }, "category": { "description": "The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).", "type": [ "null", "string" ] }, "compression": { "anyOf": [ { "enum": [ "bzip2", "gz", "xz" ], "type": "string" }, { "type": "null" } ], "default": "xz", "description": "The compression type." }, "depends": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "Package dependencies. Defaults to `[\"gconf2\", \"gconf-service\", \"libnotify4\", \"libappindicator1\", \"libxtst6\", \"libnss3\"]`." }, "description": { "description": "As [description](/configuration/configuration.md#Metadata-description) from application package.json, but allows you to specify different for Linux.", "type": [ "null", "string" ] }, "desktop": { "description": "The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value)." }, "fpm": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "description": "should be not documented, only to experiment" }, "icon": { "type": "string" }, "maintainer": { "type": [ "null", "string" ] }, "packageCategory": { "description": "The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).", "type": [ "null", "string" ] }, "priority": { "description": "The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.", "type": [ "null", "string" ] }, "publish": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "items": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "synopsis": { "description": "The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).", "type": [ "null", "string" ] }, "vendor": { "type": [ "null", "string" ] } }, "title": "DebOptions", "type": "object" }, "DmgContent": { "additionalProperties": false, "properties": { "name": { "description": "The name of the file within the DMG. Defaults to basename of `path`.", "type": "string" }, "path": { "description": "The path of the file within the DMG.", "type": "string" }, "type": { "enum": [ "dir", "file", "link" ], "type": "string" }, "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "x", "y" ], "title": "DmgContent", "type": "object" }, "DmgOptions": { "additionalProperties": false, "properties": { "artifactName": { "description": "The [artifact file name template](/configuration/configuration.md#artifact-file-name-template).", "type": [ "null", "string" ] }, "background": { "description": "The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\nIf background is not specified, use `window.size`. Default locations expected background size to be 540x380.", "type": [ "null", "string" ] }, "backgroundColor": { "description": "The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.", "type": [ "null", "string" ] }, "contents": { "description": "The content — to customize icon locations.", "items": { "$ref": "#/definitions/DmgContent" }, "type": "array" }, "format": { "default": "UDZO", "description": "The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).", "enum": [ "UDBZ", "UDCO", "UDRO", "UDRW", "UDZO", "ULFO" ], "type": "string" }, "icon": { "description": "The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](/configuration/configuration.md#MetadataDirectories-buildResources) or to the project directory.\nDefaults to the application icon (`build/icon.icns`).", "type": [ "null", "string" ] }, "iconSize": { "default": 80, "description": "The size of all the icons inside the DMG.", "type": [ "null", "number" ] }, "iconTextSize": { "default": 12, "description": "The size of all the icon texts inside the DMG.", "type": [ "null", "number" ] }, "internetEnabled": { "default": false, "description": "Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).", "type": "boolean" }, "publish": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "items": { "anyOf": [ { "$ref": "#/definitions/GithubOptions" }, { "$ref": "#/definitions/S3Options" }, { "$ref": "#/definitions/SpacesOptions" }, { "$ref": "#/definitions/GenericServerOptions" }, { "$ref": "#/definitions/BintrayOptions" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "title": { "default": "${productName} ${version}", "description": "The title of the produced DMG, which will be shown when mounted (volume name).\n\nMacro `${productName}`, `${version}` and `${name}` are supported.", "type": [ "null", "string" ] }, "window": { "$ref": "#/definitions/DmgWindow", "description": "The DMG windows position and size." } }, "title": "DmgOptions", "type": "object" }, "DmgWindow": { "additionalProperties": false, "properties": { "height": { "description": "The height. Defaults to background image height or 380.", "type": "number" }, "width": { "description": "The width. Defaults to background image width or 540.", "type": "number" }, "x": { "default": 400, "description": "The X position relative to left of the screen.", "type": "number" }, "y": { "default": 100, "description": "The Y position relative to top of the screen.", "type": "number" } }, "title": "DmgWindow", "type": "object" }, "ElectronDownloadOptions": { "additionalProperties": false, "properties": { "cache": { "description": "The [cache location](https://github.com/electron-userland/electron-download#cache-location).", "type": [ "null", "string" ] }, "customDir": { "type": [ "null", "string" ] }, "customFilename": { "type": [ "null", "string" ] }, "force": { "type": "boolean" }, "mirror": { "description": "The mirror.", "type": [ "null", "string" ] }, "quiet": { "type": "boolean" }, "strictSSL": { "type": "boolean" }, "verifyChecksum": { "type": "boolean" } }, "title": "ElectronDownloadOptions", "type": "object" }, "FileAssociation": { "additionalProperties": false, "description": "File associations.\n\nmacOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)) and NSIS only.\n\nOn Windows works only if [nsis.perMachine](https://electron.build/configuration/configuration#NsisOptions-perMachine) is set to `true`.", "properties": { "description": { "description": "*windows-only.* The description.", "type": [ "null", "string" ] }, "ext": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "The extension (minus the leading period). e.g. `png`." }, "icon": { "description": "The path to icon (`.icns` for MacOS and `.ico` for Windows), relative to `build` (build resources directory). Defaults to `${firstExt}.icns`/`${firstExt}.ico` (if several extensions specified, first is used) or to application icon.", "type": [ "null", "string" ] }, "isPackage": { "description": "*macOS-only* Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`.", "type": "boolean" }, "name": { "description": "The name. e.g. `PNG`. Defaults to `ext`.", "type": [ "null", "string" ] }, "role": { "default": "Editor", "description": "*macOS-only* The app’s role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.", "type": "string" } }, "required": [ "ext" ], "title": "FileAssociation", "type": "object" }, "FileSet": { "additionalProperties": false, "properties": { "filter": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "The [glob patterns](/file-patterns.md)." }, "from": { "description": "The source path relative to the project directory.", "type": "string" }, "to": { "description": "The destination path relative to the app's content directory for `extraFiles` and the app's resource directory for `extraResources`.", "type": "string" } }, "title": "FileSet", "type": "object" }, "GenericServerOptions": { "additionalProperties": false, "description": "Generic (any HTTP(S) server) options.", "properties": { "channel": { "default": "latest", "description": "The channel.", "type": [ "null", "string" ] }, "provider": { "description": "The provider. Must be `generic`.", "enum": [ "generic" ], "type": "string" }, "publisherName": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "url": { "description": "The base url. e.g. `https://bucket_name.s3.amazonaws.com`. You can use `${os}` (expanded to `mac`, `linux` or `win` according to target platform) and `${arch}` macros.", "type": "string" }, "useMultipleRangeRequest": { "description": "Whether to use multiple range requests for differential update. Defaults to `true` if `url` doesn't contain `s3.amazonaws.com`.", "type": "boolean" } }, "required": [ "provider", "url" ], "title": "GenericServerOptions", "type": "object" }, "GithubOptions": { "additionalProperties": false, "description": "[GitHub](https://help.github.com/articles/about-releases/) options.\n\nGitHub [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) is required. You can generate by going to [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new). The access token should have the repo scope/permission.\nDefine `GH_TOKEN` environment variable.", "properties": { "host": { "default": "github.com", "description": "The host (including the port if need).", "type": [ "null", "string" ] }, "owner": { "description": "The owner.", "type": [ "null", "string" ] }, "private": { "description": "Whether to use private github auto-update provider if `GH_TOKEN` environment variable is defined. See [Private GitHub Update Repo](/auto-update.md#private-github-update-repo).", "type": [ "null", "boolean" ] }, "protocol": { "anyOf": [ { "enum": [ "http", "https" ], "type": "string" }, { "type": "null" } ], "default": "https", "description": "The protocol. GitHub Publisher supports only `https`." }, "provider": { "description": "The provider. Must be `github`.", "enum": [ "github" ], "type": "string" }, "publisherName": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "releaseType": { "anyOf": [ { "enum": [ "draft", "prerelease", "release" ], "type": "string" }, { "type": "null" } ], "default": "draft", "description": "The type of release. By default `draft` release will be created.\n\nAlso you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRELEASE`is set to `true` — `prerelease`." }, "repo": { "description": "The repository name. [Detected automatically](#github-repository-and-bintray-package).", "type": [ "null", "string" ] }, "token": { "description": "The access token to support auto-update from private github repositories. Never specify it in the configuration files. Only for [setFeedURL](/auto-update.md#appupdatersetfeedurloptions).", "type": [ "null", "string" ] }, "vPrefixedTagName": { "default": true, "description": "Whether to use `v`-prefixed tag name.", "type": "boolean" } }, "required": [ "provider" ], "title": "GithubOptions", "type": "object" }, "LinuxConfiguration": { "additionalProperties": false, "properties": { "artifactName": { "description": "The [artifact file name template](/configuration/configuration.md#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).", "type": [ "null", "string" ] }, "asar": { "anyOf": [ { "$ref": "#/definitions/AsarOptions" }, { "type": [ "null", "boolean" ] } ], "default": true, "description": "Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).\n\nNode modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#configuration-asarUnpack) - please file an issue if this doesn't work." }, "asarUnpack": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": [ "null", "string" ] } ], "description": "A [glob patterns](/file-patterns.md) relative to the [app directory](#MetadataDirectories-app), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive." }, "category": { "description": "The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).", "type": [ "null", "string" ] }, "compression": { "anyOf": [ { "enum": [ "maximum", "normal", "store" ], "type": "string" }, { "type": "null" } ], "default": "normal", "description": "The compression level. If you want to rapidly test build, `store` can reduce build time significantly. `maximum` doesn't lead to noticeable size difference, but increase build time." }, "depends": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ] }, "description": { "description": "As [description](/configuration/configuration.md#Metadata-description) from application package.json, but allows you to specify different for Linux.", "type": [ "null", "string" ] }, "desktop": { "description": "The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value)." }, "detectUpdateChannel": { "default": true, "description": "Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.", "type": "boolean" }, "executableName": { "description": "The executable name. Defaults to `productName`.\nCannot be specified per target, allowed only in the `linux`.", "type": [ "null", "string" ] }, "extraFiles": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "items": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "extraResources": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "items": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "fileAssociations": { "anyOf": [ { "$ref": "#/definitions/FileAssociation" }, { "items": { "$ref": "#/definitions/FileAssociation" }, "type": "array" } ], "description": "The file associations." }, "files": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "items": { "anyOf": [ { "$ref": "#/definitions/FileSet" }, { "type": "string" } ] }, "type": "array" }, { "type": [ "null", "string" ] } ] }, "forceCodeSigning": { "type": "boolean" }, "generateUpdatesFilesForAllChannels": { "default": false, "description": "Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).", "type": "boolean" }, "icon": { "description": "The path to icon set directory, relative to the [build resources](/configuration/configuration.md#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\nBy default will be generated automatically based on the macOS icns file.", "type": "string" }, "maintainer": { "description": "The maintainer. Defaults to [author](/configuration/configuration.md#Metadata-author).", "type": [ "null", "string" ] }, "packageCategory": { "description": "backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place", "type": [ "null", "string" ] }, "protocols": { "anyOf": [