app-builder-lib 27.0.0-alpha.4 → 27.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appInfo.d.ts +1 -1
- package/dist/appInfo.d.ts.map +1 -1
- package/dist/appInfo.js +3 -3
- package/dist/appInfo.js.map +1 -1
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +3 -6
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +6 -4
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +31 -21
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/configuration.d.ts +84 -44
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +11 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +2 -1
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +32 -28
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/electronArchSupport.d.ts +12 -0
- package/dist/electron/electronArchSupport.d.ts.map +1 -0
- package/dist/electron/electronArchSupport.js +58 -0
- package/dist/electron/electronArchSupport.js.map +1 -0
- package/dist/electron/electronVersion.d.ts.map +1 -1
- package/dist/electron/electronVersion.js +1 -11
- package/dist/electron/electronVersion.js.map +1 -1
- package/dist/electron/mac/electronMac.js +12 -21
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +24 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
- package/dist/electron/mac/electronMacUtils.js +42 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -0
- package/dist/fileMatcher.d.ts +27 -2
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +204 -16
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +8 -5
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +8 -4
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +15 -3
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +3 -1
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +9 -1
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +17 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +67 -1
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +5 -5
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/types.d.ts +2 -0
- package/dist/node-module-collector/types.d.ts.map +1 -1
- package/dist/node-module-collector/types.js.map +1 -1
- package/dist/options/MsixOptions.d.ts +126 -0
- package/dist/options/MsixOptions.d.ts.map +1 -0
- package/dist/options/MsixOptions.js +2 -0
- package/dist/options/MsixOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +0 -6
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +15 -13
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +4 -4
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +166 -36
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +2 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +26 -21
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +2 -0
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +6 -0
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +1 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +20 -6
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +20 -22
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/archive.d.ts +11 -0
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +40 -22
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +3 -3
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +5 -6
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
- package/dist/targets/linux/snap/SnapTarget.js +23 -1
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +1 -1
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +3 -2
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreCustom.js +2 -2
- package/dist/targets/linux/snap/coreCustom.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +2 -1
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
- package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraft.js +11 -0
- package/dist/targets/linux/snap/snapcraft.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +6 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +22 -1
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/targetFactory.d.ts +7 -0
- package/dist/targets/targetFactory.d.ts.map +1 -1
- package/dist/targets/targetFactory.js +28 -0
- package/dist/targets/targetFactory.js.map +1 -1
- package/dist/targets/win/AppxTarget.d.ts +0 -2
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +37 -317
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/MsixTarget.d.ts +22 -0
- package/dist/targets/win/MsixTarget.d.ts.map +1 -0
- package/dist/targets/win/MsixTarget.js +214 -0
- package/dist/targets/win/MsixTarget.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +3 -2
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +28 -46
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +2 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts +5 -2
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +46 -22
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/targets/win/nsis/progId.d.ts +21 -0
- package/dist/targets/win/nsis/progId.d.ts.map +1 -0
- package/dist/targets/win/nsis/progId.js +60 -0
- package/dist/targets/win/nsis/progId.js.map +1 -0
- package/dist/targets/win/winAppUtil.d.ts +115 -0
- package/dist/targets/win/winAppUtil.d.ts.map +1 -0
- package/dist/targets/win/winAppUtil.js +407 -0
- package/dist/targets/win/winAppUtil.js.map +1 -0
- package/dist/toolsets/7zip.d.ts.map +1 -1
- package/dist/toolsets/7zip.js +3 -1
- package/dist/toolsets/7zip.js.map +1 -1
- package/dist/toolsets/appimage.d.ts +3 -3
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +9 -6
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/custom.d.ts +1 -3
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +4 -133
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/fpm.d.ts.map +1 -1
- package/dist/toolsets/fpm.js +11 -5
- package/dist/toolsets/fpm.js.map +1 -1
- package/dist/toolsets/icons.d.ts.map +1 -1
- package/dist/toolsets/icons.js +4 -1
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
- package/dist/toolsets/linuxToolsMac.js +4 -1
- package/dist/toolsets/linuxToolsMac.js.map +1 -1
- package/dist/toolsets/nsis.d.ts.map +1 -1
- package/dist/toolsets/nsis.js +6 -3
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/version.d.ts +12 -0
- package/dist/toolsets/version.d.ts.map +1 -0
- package/dist/toolsets/version.js +13 -0
- package/dist/toolsets/version.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +20 -3
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +56 -27
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wine.d.ts +2 -1
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +15 -13
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/NodeModuleCopyHelper.js +3 -3
- package/dist/util/NodeModuleCopyHelper.js.map +1 -1
- package/dist/util/appFileCopier.d.ts +39 -0
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +88 -22
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/config/config.d.ts +1 -0
- package/dist/util/config/config.d.ts.map +1 -1
- package/dist/util/config/config.js +4 -1
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/load.d.ts +2 -2
- package/dist/util/config/load.d.ts.map +1 -1
- package/dist/util/config/load.js +3 -12
- package/dist/util/config/load.js.map +1 -1
- package/dist/util/config/schemaValidator.js +1 -1
- package/dist/util/config/schemaValidator.js.map +1 -1
- package/dist/util/electronGet.d.ts +6 -3
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +40 -20
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +0 -2
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +0 -6
- package/dist/util/flags.js.map +1 -1
- package/dist/util/hash.d.ts +1 -1
- package/dist/util/hash.d.ts.map +1 -1
- package/dist/util/hash.js +1 -15
- package/dist/util/hash.js.map +1 -1
- package/dist/util/packageMetadata.js +0 -10
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +18 -5
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +3 -0
- package/dist/winPackager.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +556 -133
- package/templates/appx/appxmanifest.xml +1 -1
- package/templates/msix/appxmanifest.xml +45 -0
- package/templates/nsis/installSection.nsh +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { FileAssociation } from \"./FileAssociation.js\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](https://www.electron.build/configuration#directories) for `files`,\n * - the project directory for `extraResources` and `extraFiles`.\n * If you don't use two-package.json structure and don't set custom app directory, app directory equals to project directory.\n */\n from?: string\n /**\n * The destination path relative to and defaults to:\n *\n * - the asar archive root for `files`,\n * - the app's content directory for `extraFiles`,\n * - the app's resource directory for `extraResources`.\n */\n to?: string\n /**\n * The [glob patterns](https://www.electron.build/file-patterns). Defaults to \"**\\/*\"\n */\n filter?: Array<string> | string\n}\n\nexport interface AsarOptions {\n /**\n * Whether to automatically unpack executables files.\n * @default true\n */\n smartUnpack?: boolean\n\n /**\n * Path to a file containing the order in which files should be packed into the asar archive.\n * Each line of the file is a relative path from the app directory. Files listed first are\n * packed first, which can improve app startup time by front-loading frequently accessed modules.\n * See the [asar documentation](https://github.com/electron/asar) for details.\n */\n ordering?: string | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](#directories),\n * which specifies which files to unpack when creating the asar archive.\n */\n unpack?: Array<string> | string | null\n\n /**\n * Whether to skip the ASAR package integrity sanity check.\n *\n * Set to `true` only when using a custom Electron fork that implements its own encrypted or\n * non-standard ASAR integrity validation that is not compatible with electron-builder's default\n * check. Standard builds should leave this `false`.\n *\n * @default false\n */\n disableSanityCheck?: boolean\n\n /**\n * Whether to skip computing the ASAR integrity hash.\n *\n * Normally electron-builder computes and embeds a SHA-256 hash of `app.asar` so that Electron\n * can verify it at startup (when the `embeddedAsarIntegrityValidation` fuse is enabled). Set to\n * `true` only for custom Electron forks with encrypted ASAR support where the header is not\n * readable by standard tools.\n *\n * @default false\n */\n disableIntegrity?: boolean\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](https://www.electron.build/configuration#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](https://www.electron.build/mac)).\n\nYou may also specify custom source and destination directories by using `FileSet` objects instead of simple glob patterns.\n\n```json\n[\n {\n \"from\": \"path/to/source\",\n \"to\": \"path/to/destination\",\n \"filter\": [\"**\\/*\", \"!foo/*.js\"]\n }\n]\n```\n\nYou can use [file macros](https://www.electron.build/file-patterns#file-macros) in the `from` and `to` fields as well. `from` and `to` can be files and you can use this to [rename](https://github.com/electron-userland/electron-builder/issues/1119) a file while packaging.\n */\n files?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](https://www.electron.build/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).\n */\n readonly artifactName?: string | null\n\n /**\n * The executable name. Defaults to `productName`\n * Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068\n */\n readonly executableName?: string | null\n\n /**\n * 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.\n * @default normal\n */\n readonly compression?: CompressionLevel | null\n\n /**\n * Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to `false`.\n *\n * @default false\n */\n disableDefaultIgnoredFiles?: boolean | null\n\n /**\n * 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 *\n * Node modules that must be unpacked will be detected automatically. Use {@link AsarOptions.unpack} to specify additional files to unpack.\n * @default true\n */\n readonly asar?: AsarOptions | boolean | null\n\n /** @private */\n readonly icon?: string | null\n\n /**\n * The file associations.\n */\n readonly fileAssociations?: Array<FileAssociation> | FileAssociation\n /**\n * The URL protocol schemes.\n */\n readonly protocols?: Array<Protocol> | Protocol\n\n /**\n * The electron locales to keep. By default, all Electron locales used as-is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /**\n * Whether to fail if app will be not code signed.\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](https://www.electron.build/auto-update#compatibility) semver range.\n */\n readonly electronUpdaterCompatibility?: string | null\n\n /**\n * Publisher configuration. See [Auto Update](https://www.electron.build/publish) for more information.\n */\n publish?: Publish\n\n /**\n * 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`.\n * This does *not* apply to github publishing, which will [never auto-detect the update channel](https://github.com/electron-userland/electron-builder/issues/8589).\n * @default true\n */\n readonly detectUpdateChannel?: boolean\n\n /**\n * Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).\n * @default false\n */\n readonly generateUpdatesFilesForAllChannels?: boolean\n\n /**\n * The release info. Intended for command line usage:\n *\n * ```\n * -c.releaseInfo.releaseNotes=\"new features\"\n * ```\n */\n readonly releaseInfo?: ReleaseInfo\n\n /**\n * The build target(s) for this platform. Can be a target name string, a {@link TargetConfiguration}\n * object, or an array of either. Available targets depend on the platform — see platform-specific\n * options (e.g. {@link MacConfiguration.target}, {@link WindowsConfiguration.target},\n * {@link LinuxConfiguration.target}).\n */\n readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\n /** @private */\n cscLink?: string | null\n\n /** @private */\n cscKeyPassword?: string | null\n\n /**\n * The default architecture to build for when no `--arch` flag is specified.\n * Defaults to the current machine's architecture.\n */\n readonly defaultArch?: string\n}\n\nexport interface ReleaseInfo {\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes.\n */\n releaseNotes?: string | null\n\n /**\n * The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](https://www.electron.build/contents#extraresources).\n */\n releaseNotesFile?: string | null\n\n /**\n * The release date.\n */\n releaseDate?: string\n\n /**\n * Vendor specific information.\n */\n vendor?: { [key: string]: any } | null\n}\n\n/**\n * URL Protocol Schemes. Protocols to associate the app with. macOS only.\n *\n * Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).\n */\nexport interface Protocol {\n /**\n * The name. e.g. `IRC server URL`.\n */\n readonly name: string\n\n /**\n * The schemes. e.g. `[\"irc\", \"ircs\"]`.\n */\n readonly schemes: Array<string>\n\n /**\n * *macOS-only* The app’s role with respect to the type.\n * @default Editor\n */\n readonly role?: \"Editor\" | \"Viewer\" | \"Shell\" | \"None\"\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { FileAssociation } from \"./FileAssociation.js\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](https://www.electron.build/configuration#directories) for `files`,\n * - the project directory for `extraResources` and `extraFiles`.\n * If you don't use two-package.json structure and don't set custom app directory, app directory equals to project directory.\n */\n from?: string\n /**\n * The destination path relative to and defaults to:\n *\n * - the asar archive root for `files`,\n * - the app's content directory for `extraFiles`,\n * - the app's resource directory for `extraResources`.\n */\n to?: string\n /**\n * The [glob patterns](https://www.electron.build/file-patterns). Defaults to \"**\\/*\"\n */\n filter?: Array<string> | string\n}\n\nexport interface AsarOptions {\n /**\n * Whether to automatically unpack executables files.\n * @default true\n */\n smartUnpack?: boolean\n\n /**\n * Path to a file containing the order in which files should be packed into the asar archive.\n * Each line of the file is a relative path from the app directory. Files listed first are\n * packed first, which can improve app startup time by front-loading frequently accessed modules.\n * See the [asar documentation](https://github.com/electron/asar) for details.\n */\n ordering?: string | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](#directories),\n * which specifies which files to unpack when creating the asar archive.\n */\n unpack?: Array<string> | string | null\n\n /**\n * Whether to skip the ASAR package integrity sanity check.\n *\n * Set to `true` only when using a custom Electron fork that implements its own encrypted or\n * non-standard ASAR integrity validation that is not compatible with electron-builder's default\n * check. Standard builds should leave this `false`.\n *\n * @default false\n */\n disableSanityCheck?: boolean\n\n /**\n * Whether to skip computing the ASAR integrity hash.\n *\n * Normally electron-builder computes and embeds a SHA-256 hash of `app.asar` so that Electron\n * can verify it at startup (when the `embeddedAsarIntegrityValidation` fuse is enabled). Set to\n * `true` only for custom Electron forks with encrypted ASAR support where the header is not\n * readable by standard tools.\n *\n * @default false\n */\n disableIntegrity?: boolean\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](https://www.electron.build/configuration#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](https://www.electron.build/mac)).\n\nYou may also specify custom source and destination directories by using `FileSet` objects instead of simple glob patterns.\n\n```json\n[\n {\n \"from\": \"path/to/source\",\n \"to\": \"path/to/destination\",\n \"filter\": [\"**\\/*\", \"!foo/*.js\"]\n }\n]\n```\n\nYou can use [file macros](https://www.electron.build/file-patterns#file-macros) in the `from` and `to` fields as well. `from` and `to` can be files and you can use this to [rename](https://github.com/electron-userland/electron-builder/issues/1119) a file while packaging.\n */\n files?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](https://www.electron.build/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).\n */\n readonly artifactName?: string | null\n\n /**\n * The executable name. Defaults to `productName`\n * Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068\n */\n readonly executableName?: string | null\n\n /**\n * 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.\n * @default normal\n */\n readonly compression?: CompressionLevel | null\n\n /**\n * 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 *\n * Node modules that must be unpacked will be detected automatically. Use {@link AsarOptions.unpack} to specify additional files to unpack.\n * @default true\n */\n readonly asar?: AsarOptions | boolean | null\n\n /** @private */\n readonly icon?: string | null\n\n /**\n * The file associations.\n */\n readonly fileAssociations?: Array<FileAssociation> | FileAssociation\n /**\n * The URL protocol schemes.\n */\n readonly protocols?: Array<Protocol> | Protocol\n\n /**\n * The electron locales to keep. By default, all Electron locales used as-is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /**\n * Whether to fail if app will be not code signed.\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](https://www.electron.build/auto-update#compatibility) semver range.\n */\n readonly electronUpdaterCompatibility?: string | null\n\n /**\n * Publisher configuration. See [Auto Update](https://www.electron.build/publish) for more information.\n */\n publish?: Publish\n\n /**\n * 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`.\n * This does *not* apply to github publishing, which will [never auto-detect the update channel](https://github.com/electron-userland/electron-builder/issues/8589).\n * @default true\n */\n readonly detectUpdateChannel?: boolean\n\n /**\n * Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).\n * @default false\n */\n readonly generateUpdatesFilesForAllChannels?: boolean\n\n /**\n * The release info. Intended for command line usage:\n *\n * ```\n * -c.releaseInfo.releaseNotes=\"new features\"\n * ```\n */\n readonly releaseInfo?: ReleaseInfo\n\n /**\n * The build target(s) for this platform. Can be a target name string, a {@link TargetConfiguration}\n * object, or an array of either. Available targets depend on the platform — see platform-specific\n * options (e.g. {@link MacConfiguration.target}, {@link WindowsConfiguration.target},\n * {@link LinuxConfiguration.target}).\n */\n readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\n /** @private */\n cscLink?: string | null\n\n /** @private */\n cscKeyPassword?: string | null\n\n /**\n * The default architecture to build for when no `--arch` flag is specified.\n * Defaults to the current machine's architecture.\n */\n readonly defaultArch?: string\n}\n\nexport interface ReleaseInfo {\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes.\n */\n releaseNotes?: string | null\n\n /**\n * The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](https://www.electron.build/contents#extraresources).\n */\n releaseNotesFile?: string | null\n\n /**\n * The release date.\n */\n releaseDate?: string\n\n /**\n * Vendor specific information.\n */\n vendor?: { [key: string]: any } | null\n}\n\n/**\n * URL Protocol Schemes. Protocols to associate the app with. macOS only.\n *\n * Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).\n */\nexport interface Protocol {\n /**\n * The name. e.g. `IRC server URL`.\n */\n readonly name: string\n\n /**\n * The schemes. e.g. `[\"irc\", \"ircs\"]`.\n */\n readonly schemes: Array<string>\n\n /**\n * *macOS-only* The app’s role with respect to the type.\n * @default Editor\n */\n readonly role?: \"Editor\" | \"Viewer\" | \"Shell\" | \"None\"\n}\n"]}
|
|
@@ -40,16 +40,14 @@ export interface SnapcraftOptions extends TargetSpecificOptions {
|
|
|
40
40
|
*/
|
|
41
41
|
readonly core22?: SnapOptionsLegacy | null;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Options for building a core24 snap. Uses the snapcraft CLI directly.
|
|
44
44
|
* Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.
|
|
45
|
-
* @beta
|
|
46
45
|
*/
|
|
47
46
|
readonly core24?: SnapOptions24 | null;
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* Pass-through custom snap configuration. electron-builder will read the
|
|
50
49
|
* snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,
|
|
51
50
|
* organize mappings, or desktop files are injected.
|
|
52
|
-
* @beta
|
|
53
51
|
*/
|
|
54
52
|
readonly custom?: SnapOptionsCustom | null;
|
|
55
53
|
}
|
|
@@ -241,15 +239,21 @@ export interface RemoteBuildOptions {
|
|
|
241
239
|
*/
|
|
242
240
|
launchpadUsername?: string;
|
|
243
241
|
/**
|
|
244
|
-
* Target architecture for the remote build.
|
|
245
|
-
*
|
|
242
|
+
* Target architecture (or architectures) for the remote build.
|
|
243
|
+
*
|
|
244
|
+
* - **Single string** (e.g. `"amd64"`): one Launchpad job, one output snap.
|
|
245
|
+
* - **Array** (e.g. `["amd64", "arm64"]`): one Launchpad job that builds all listed
|
|
246
|
+
* architectures and downloads each resulting snap. All produced snaps are emitted as
|
|
247
|
+
* separate build artifacts.
|
|
248
|
+
*
|
|
249
|
+
* Using an array here is mutually exclusive with setting `arch: ["x64", "arm64"]` at the
|
|
250
|
+
* electron-builder top level — the top-level `arch` option spawns a separate remote-build
|
|
251
|
+
* job per architecture, which would duplicate work.
|
|
246
252
|
*
|
|
247
|
-
* To build for multiple architectures, configure electron-builder's top-level `arch` option
|
|
248
|
-
* (e.g. `arch: ["x64", "arm64"]`) — each arch spawns a separate remote-build job on Launchpad,
|
|
249
|
-
* keeping the one-build-per-artifact contract intact.
|
|
250
253
|
* @example "amd64"
|
|
254
|
+
* @example ["amd64", "arm64"]
|
|
251
255
|
*/
|
|
252
|
-
buildFor?: string;
|
|
256
|
+
buildFor?: string | string[];
|
|
253
257
|
/**
|
|
254
258
|
* Suppress the Launchpad public-upload consent prompt by automatically accepting it.
|
|
255
259
|
* Your source code will be uploaded to a **public** Launchpad repository.
|
|
@@ -280,15 +284,13 @@ export interface RemoteBuildOptions {
|
|
|
280
284
|
strategy?: "disable-fallback" | "force-fallback";
|
|
281
285
|
}
|
|
282
286
|
/**
|
|
283
|
-
*
|
|
287
|
+
* Options for building a core24 snap. This interface does not extend the legacy
|
|
284
288
|
* `SnapBaseOptions` — it uses the snapcraft CLI directly.
|
|
285
289
|
*
|
|
286
290
|
* Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,
|
|
287
291
|
* `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`
|
|
288
292
|
* configuration. You do not need to duplicate them here; values set directly on this interface
|
|
289
293
|
* take precedence over the cascaded `linux.*` values.
|
|
290
|
-
*
|
|
291
|
-
* @beta
|
|
292
294
|
*/
|
|
293
295
|
export interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {
|
|
294
296
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.d.ts","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;I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AG,IAAI,CAAA;CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * **[Beta]** Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n * @beta\n */\n readonly core24?: SnapOptions24 | null\n /**\n * **[Beta]** Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n * @beta\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * Each electron-builder build invocation targets exactly one architecture — to build for multiple\n * architectures, configure the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`); each arch\n * spawns a separate `snapcraft remote-build` job on Launchpad.\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture for the remote build. Accepts a single snapcraft arch string\n * (e.g. `\"amd64\"`, `\"arm64\"`, `\"armhf\"`).\n *\n * To build for multiple architectures, configure electron-builder's top-level `arch` option\n * (e.g. `arch: [\"x64\", \"arm64\"]`) — each arch spawns a separate remote-build job on Launchpad,\n * keeping the one-build-per-artifact contract intact.\n * @example \"amd64\"\n */\n buildFor?: string\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * **[Beta]** Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n *\n * @beta\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Each build invocation targets one arch; use `arch: [\"x64\", \"arm64\"]` to build for multiple.\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n */\n readonly core24?: SnapOptions24 | null\n /**\n * Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * Each electron-builder build invocation targets exactly one architecture — to build for multiple\n * architectures, configure the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`); each arch\n * spawns a separate `snapcraft remote-build` job on Launchpad.\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture (or architectures) for the remote build.\n *\n * - **Single string** (e.g. `\"amd64\"`): one Launchpad job, one output snap.\n * - **Array** (e.g. `[\"amd64\", \"arm64\"]`): one Launchpad job that builds all listed\n * architectures and downloads each resulting snap. All produced snaps are emitted as\n * separate build artifacts.\n *\n * Using an array here is mutually exclusive with setting `arch: [\"x64\", \"arm64\"]` at the\n * electron-builder top level — the top-level `arch` option spawns a separate remote-build\n * job per architecture, which would duplicate work.\n *\n * @example \"amd64\"\n * @example [\"amd64\", \"arm64\"]\n */\n buildFor?: string | string[]\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Each build invocation targets one arch; use `arch: [\"x64\", \"arm64\"]` to build for multiple.\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
@@ -239,14 +239,14 @@ export interface DmgOptions extends TargetSpecificOptions {
|
|
|
239
239
|
*/
|
|
240
240
|
contents?: Array<DmgContent>;
|
|
241
241
|
/**
|
|
242
|
-
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).
|
|
242
|
+
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).
|
|
243
243
|
* @default UDZO
|
|
244
244
|
*/
|
|
245
|
-
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO";
|
|
245
|
+
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO" | "ULMO";
|
|
246
246
|
/**
|
|
247
247
|
* The filesystem for the DMG volume (e.g. `"APFS"` or `"HFS+"`)
|
|
248
|
-
*
|
|
249
|
-
* @default
|
|
248
|
+
* As of v27 this defaults to APFS. Set it explicitly to `"HFS+"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).
|
|
249
|
+
* @default APFS
|
|
250
250
|
*/
|
|
251
251
|
readonly filesystem?: "HFS+" | "APFS" | null;
|
|
252
252
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
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CAAC,EAAE,MAAM,CAAA;IACT,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAGD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, `optionsForFile`, and `type` (derived from the\n * build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\" | \"type\"> {\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for `mas-dev`.\n *\n * @see https://github.com/electron/fuses\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * 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.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * This will be changed to APFS in the next major release, so it is recommended to set it explicitly to HFS+ if you want to keep using HFS+ (e.g. for better compatibility with older macOS versions).\n * @default HFS+\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * 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).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
|
|
1
|
+
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, `optionsForFile`, and `type` (derived from the\n * build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\" | \"type\"> {\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for `mas-dev`.\n *\n * @see https://github.com/electron/fuses\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * 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.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\" | \"ULMO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * As of v27 this defaults to APFS. Set it explicitly to `\"HFS+\"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).\n * @default APFS\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * 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).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
|