app-builder-lib 27.0.0-alpha.11 → 27.0.0-alpha.13
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/asar/asarUtil.js +1 -1
- package/dist/asar/asarUtil.js.map +1 -1
- package/dist/codeSign/certInfo.d.ts +4 -1
- package/dist/codeSign/certInfo.d.ts.map +1 -1
- package/dist/codeSign/certInfo.js +5 -3
- package/dist/codeSign/certInfo.js.map +1 -1
- package/dist/codeSign/forceCodeSigning.d.ts +22 -0
- package/dist/codeSign/forceCodeSigning.d.ts.map +1 -0
- package/dist/codeSign/forceCodeSigning.js +18 -0
- package/dist/codeSign/forceCodeSigning.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +13 -1
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +29 -2
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/mac/macSignatureVerifier.d.ts +23 -0
- package/dist/codeSign/mac/macSignatureVerifier.d.ts.map +1 -0
- package/dist/codeSign/mac/macSignatureVerifier.js +96 -0
- package/dist/codeSign/mac/macSignatureVerifier.js.map +1 -0
- package/dist/codeSign/win/authenticodeSignature.d.ts +83 -0
- package/dist/codeSign/win/authenticodeSignature.d.ts.map +1 -0
- package/dist/codeSign/win/authenticodeSignature.js +289 -0
- package/dist/codeSign/win/authenticodeSignature.js.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -1
- package/dist/codeSign/win/pkcs11SignManager.js +4 -3
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -1
- package/dist/codeSign/win/publisherName.d.ts +31 -0
- package/dist/codeSign/win/publisherName.d.ts.map +1 -0
- package/dist/codeSign/win/publisherName.js +78 -0
- package/dist/codeSign/win/publisherName.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +27 -9
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +80 -49
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts +25 -0
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts.map +1 -0
- package/dist/codeSign/win/verifyUpdatePublisher.js +101 -0
- package/dist/codeSign/win/verifyUpdatePublisher.js.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +24 -6
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/configuration.d.ts +56 -12
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +15 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +33 -2
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/mac/asarIntegrityDigest.d.ts +10 -0
- package/dist/electron/mac/asarIntegrityDigest.d.ts.map +1 -0
- package/dist/electron/mac/asarIntegrityDigest.js +122 -0
- package/dist/electron/mac/asarIntegrityDigest.js.map +1 -0
- package/dist/electron/mac/electronMac.js +1 -28
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +9 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -1
- package/dist/electron/mac/electronMacUtils.js +37 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -1
- package/dist/fileMatcher.d.ts +34 -11
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +125 -36
- package/dist/fileMatcher.js.map +1 -1
- package/dist/forge-maker.d.ts +64 -0
- package/dist/forge-maker.d.ts.map +1 -1
- package/dist/forge-maker.js +104 -2
- package/dist/forge-maker.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +9 -3
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +8 -3
- package/dist/indexInternal.js.map +1 -1
- package/dist/linuxPackager.js +1 -1
- package/dist/linuxPackager.js.map +1 -1
- package/dist/macPackager.d.ts +32 -0
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +215 -13
- package/dist/macPackager.js.map +1 -1
- package/dist/options/FuseOptionsV1.d.ts +4 -0
- package/dist/options/FuseOptionsV1.d.ts.map +1 -1
- package/dist/options/FuseOptionsV1.js.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts +93 -21
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SquirrelWindowsOptions.d.ts +3 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
- package/dist/options/SquirrelWindowsOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +22 -3
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +68 -19
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js +20 -0
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +3 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +11 -2
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +18 -7
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +56 -15
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +4 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +106 -28
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/manifestUploadCheck.d.ts +10 -0
- package/dist/publish/manifestUploadCheck.d.ts.map +1 -0
- package/dist/publish/manifestUploadCheck.js +75 -0
- package/dist/publish/manifestUploadCheck.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +51 -17
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/publish/updateManifestVerifier.d.ts +22 -0
- package/dist/publish/updateManifestVerifier.d.ts.map +1 -0
- package/dist/publish/updateManifestVerifier.js +65 -0
- package/dist/publish/updateManifestVerifier.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -1
- package/dist/targets/ArchiveTarget.js +6 -2
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts +6 -0
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +15 -5
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +4 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +5 -5
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +12 -17
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +6 -1
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +9 -9
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/flatpakBundle.d.ts.map +1 -1
- package/dist/targets/linux/flatpakBundle.js +25 -20
- package/dist/targets/linux/flatpakBundle.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +2 -9
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +22 -6
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapPlugs.d.ts +2 -2
- package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapPlugs.js +1 -1
- package/dist/targets/linux/snap/snapPlugs.js.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.js +19 -17
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +21 -3
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +140 -13
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +8 -5
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +15 -3
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/toolsets/nsis.js +1 -1
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/winCodeSign.d.ts +14 -1
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +14 -1
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wine.d.ts +3 -0
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +14 -5
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +15 -11
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/buildOutputVerifier.d.ts +40 -0
- package/dist/util/buildOutputVerifier.d.ts.map +1 -0
- package/dist/util/buildOutputVerifier.js +420 -0
- package/dist/util/buildOutputVerifier.js.map +1 -0
- package/dist/util/config/config.d.ts.map +1 -1
- package/dist/util/config/config.js +9 -1
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/fileOptions.d.ts +22 -0
- package/dist/util/config/fileOptions.d.ts.map +1 -1
- package/dist/util/config/fileOptions.js +92 -2
- package/dist/util/config/fileOptions.js.map +1 -1
- package/dist/util/config/legacyConfigGuard.d.ts.map +1 -1
- package/dist/util/config/legacyConfigGuard.js +2 -2
- package/dist/util/config/legacyConfigGuard.js.map +1 -1
- package/dist/util/config/legacyOptions.d.ts +9 -2
- package/dist/util/config/legacyOptions.d.ts.map +1 -1
- package/dist/util/config/legacyOptions.js +20 -2
- package/dist/util/config/legacyOptions.js.map +1 -1
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +3 -1
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +3 -9
- package/dist/util/flags.js.map +1 -1
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
- package/dist/util/mac/macosIconComposer.js +6 -5
- package/dist/util/mac/macosIconComposer.js.map +1 -1
- package/dist/util/macroExpander.js +1 -1
- package/dist/util/macroExpander.js.map +1 -1
- package/dist/util/nativeBinaryVerifier.d.ts.map +1 -1
- package/dist/util/nativeBinaryVerifier.js +3 -1
- package/dist/util/nativeBinaryVerifier.js.map +1 -1
- package/dist/util/packageMetadata.js +1 -1
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/util/removedEnvVars.d.ts +2 -0
- package/dist/util/removedEnvVars.d.ts.map +1 -1
- package/dist/util/removedEnvVars.js +15 -1
- package/dist/util/removedEnvVars.js.map +1 -1
- package/dist/util/streamSpawnToFile.d.ts +3 -1
- package/dist/util/streamSpawnToFile.d.ts.map +1 -1
- package/dist/util/streamSpawnToFile.js +6 -2
- package/dist/util/streamSpawnToFile.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 +10 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +22 -8
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/vm/PwshVm.d.ts +0 -1
- package/dist/vm/PwshVm.d.ts.map +1 -1
- package/dist/vm/PwshVm.js +10 -15
- package/dist/vm/PwshVm.js.map +1 -1
- package/dist/vm/WineVm.d.ts.map +1 -1
- package/dist/vm/WineVm.js +4 -4
- package/dist/vm/WineVm.js.map +1 -1
- package/dist/vm/vm.d.ts +9 -3
- package/dist/vm/vm.d.ts.map +1 -1
- package/dist/vm/vm.js +40 -32
- package/dist/vm/vm.js.map +1 -1
- package/dist/winPackager.d.ts +16 -1
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +77 -19
- package/dist/winPackager.js.map +1 -1
- package/package.json +12 -10
- package/scheme.json +662 -50
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +14 -9
- package/templates/nsis/installSection.nsh +5 -0
- package/dist/vm/MonoVm.d.ts +0 -9
- package/dist/vm/MonoVm.d.ts.map +0 -1
- package/dist/vm/MonoVm.js +0 -16
- package/dist/vm/MonoVm.js.map +0 -1
|
@@ -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 * Lines use the same syntax `@electron/asar` accepts: the path may carry a leading `/` or a\n * `<count>:` prefix (as written by a load counter), and blank lines are ignored. There is no comment\n * syntax, and `\\` separators are accepted. Directory entries are moved to the front in their original\n * relative order (they hold no data), listed files follow in the order of the file, and every other\n * file keeps its original order after them. Lines naming a directory are ignored, and listed files\n * that are not in the archive are skipped.\n *\n * The path is resolved like other build resources: relative to the [build resources directory](#directories)\n * first, then to the project directory. A missing file fails the build. Packing files ahead of the default\n * dependencies-first layout can increase differential update download size.\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 * Align the start of every packed file's content inside `app.asar` to a multiple of this many bytes\n * (zero padding between files). Off when unset or `0`.\n *\n * Meant for differential updates with `nsis.differentialPackage: \"store-asar\"`: the asar header stores\n * every file's absolute content offset, so without alignment a change that grows a file by a single byte\n * shifts the offset of every later file and most of the header has to be re-downloaded. With alignment\n * a file can grow within its slot and no other offset moves. Measured on a 32 MB asar with 3,000 files:\n * `512` cut a small length-changing edit from 414 KB to 139 KB of differential download for 2.2 % more\n * asar size. Padding does not help when a file is added or removed (a new header entry shifts all later\n * offsets) or when growth crosses the slot. File order, sizes and per-file integrity are unchanged;\n * Electron and `@electron/asar` read files by offset + size and ignore the gaps.\n *\n * Must be a positive integer; values above 64 KiB log a warning because every file is padded up to the\n * boundary. The alignment is applied when electron-builder packs `app.asar`, so it is lost when the\n * archive is rebuilt afterwards: macOS universal builds with `mac.universal.mergeASARs` (the default)\n * repack the merged asar, and `--prepackaged` skips packing entirely.\n * @default 0\n */\n contentAlignment?: number | 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\n/**\n * Which files are copied into the packaged app, and which symlinks among them may lead outside it, set under `fileOptions` at the\n * configuration root or per platform (e.g. `mac.fileOptions`). A platform's lists are added to the root ones; a platform's\n * `allowExternalLinks` replaces the root one.\n * See [file options](https://www.electron.build/docs/migration/v27-breaking-changes#file-options-fileoptions).\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,slnx,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 as well (e.g. `mac.fileOptions.files`, see [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 /**\n * Whether symlinks among the packaged files may lead outside the app, the workspace and the package-manager store.\n *\n * Only the build configuration is trusted, not the files it packages: by default (`false`) electron-builder refuses\n * - a file of the app (`app.asar` or `asar: false`) that is a symlink, or is reached through one, whose real path is outside the workspace\n * root, the project and app directories and the package-manager store (`npm link`, a `file:../lib` dependency outside the repository,\n * a symlink into the home or temp directory),\n * - a copied symlink that resolves outside the app: one in `extraResources` / `extraFiles` (other than into the workspace or the store),\n * one kept by an `asar: false` copy, and any symlink leaving the app in a target that stores what symlinks point to (Windows `zip` / `7z`,\n * the NSIS app package, AppX/MSIX, Squirrel.Windows).\n *\n * Without these checks, a symlink planted in a dependency or a copied directory could package files from elsewhere on the build machine (SSH keys,\n * credentials) into the artifact, which is why this is off by default.\n *\n * - `true` allows any such symlink.\n * - A list of paths, relative to the project directory or absolute, allows a symlink only when the real path of what it points to is\n * inside the real path of one of them (e.g. `[\"../shared-lib\"]`). A listed path that does not exist fails the build.\n *\n * An allowed symlink is packaged: what it points to is copied (or stored by the archive), and a copied symlink is kept\n * as it is. A warning is logged once when this allows a symlink.\n *\n * Set it under `fileOptions`, at the configuration root or per platform; a platform's value (`false` included) replaces the root one\n * rather than being added to it:\n * ```json\n * { \"fileOptions\": { \"allowExternalLinks\": [\"../shared-lib\"] }, \"linux\": { \"fileOptions\": { \"allowExternalLinks\": true } } }\n * ```\n *\n * This does not allow writing through a symlink: a copy or a file written by electron-builder whose destination leads outside the\n * output directory through a symlink is always refused, and a symlink at such a file name is replaced, never followed.\n * See [Symbolic links](https://www.electron.build/docs/contents#symbolic-links).\n * @default false\n */\n allowExternalLinks?: boolean | Array<string> | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions {\n /**\n * Which files to copy into the packaged app (`files`, the app sources, `extraResources` and `extraFiles`), and whether symlinks among\n * them may lead outside the app and the workspace (`allowExternalLinks`).\n * Set at the configuration root, per platform (e.g. `mac.fileOptions`), or both: a platform's lists are added to the root ones,\n * and a platform's `allowExternalLinks` replaces the root one.\n *\n * ```json\n * {\n * \"fileOptions\": {\n * \"files\": [\"dist/**\\/*\", \"package.json\"],\n * \"extraResources\": [{ \"from\": \"assets/bin\", \"to\": \"bin\" }]\n * }\n * }\n * ```\n *\n * `files`, `extraResources` and `extraFiles` set directly on the configuration or a platform section are moved here\n * when the configuration is loaded, with a warning. Run `electron-builder migrate-schema` to update the configuration.\n */\n fileOptions?: FilesBuildOptions | null\n\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](https://www.electronjs.org/docs/latest/tutorial/asar-archives).\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/docs/features/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 * Ed25519 signing of the auto-update manifest (`latest*.yml`). Each manifest is signed and its public key is\n * embedded into `app-update.yml`, so electron-updater verifies the signature before downloading an update.\n *\n * **Signing is required.** Publishing a build that emits auto-update metadata fails unless a signing key\n * resolves. Generate one once with `electron-builder create-update-key`, then supply it via\n * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` / `ELECTRON_BUILDER_UPDATE_SIGN_KEY_FILE` (preferred in CI) or via\n * `signingKey` / `signingKeyFile` below. Leaving this option unset — or `null` — keeps signing required and\n * resolves the key from the environment; `null` is not an opt-out.\n *\n * Set to `false`, the only opt-out, to ship **unsigned** manifests. Every build that produces a manifest then\n * logs a warning. `false` also short-circuits the environment variables, so a leftover\n * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` in CI cannot re-enable signing by accident.\n *\n * The requirement is only enforced when a publish policy is in effect (`--publish`); a build without one\n * warns instead, so local builds and pipelines that sign the manifest in a later step of their own are\n * unaffected. It is also waived when every publish provider has `publishAutoUpdate: false`, since no manifest is\n * emitted then, and for a build whose targets write no update info (e.g. only snap, flatpak, MSI/MSIX, portable,\n * mas/pkg or plain archives). A publishing build checks for the key at build start, before anything is packed\n * or uploaded.\n *\n * See [Signed Update Manifests](https://www.electron.build/features/signed-update-manifests).\n */\n readonly updateManifest?: UpdateManifestSigningOptions | false | null\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 UpdateManifestSigningOptions {\n /**\n * Ed25519 private key(s) in PEM (PKCS#8) format used to sign the update manifest. A single PEM string may\n * contain several concatenated keys, or pass an array with one key each; the manifest is signed by every key\n * (dual-signing for [key rotation](https://www.electron.build/features/key-rotation)) and the first key also\n * fills the legacy single `signature` field.\n * Secret — prefer the `ELECTRON_BUILDER_UPDATE_SIGN_KEY` environment variable in CI over committing this to config.\n */\n readonly signingKey?: string | Array<string> | null\n\n /**\n * Path(s) to file(s) containing the Ed25519 private key (PEM, PKCS#8). Alternative to `signingKey`.\n * An array signs with every listed key, in order. Relative paths are resolved against the project directory.\n */\n readonly signingKeyFile?: string | Array<string> | null\n\n /**\n * The Ed25519 public key(s) (PEM or base64 SPKI) embedded into `app-update.yml` as the updater's trust list.\n * The updater accepts a manifest when any listed key validates one of its signatures. Optional — when\n * omitted the public key of every configured signing key is derived and embedded. Set it explicitly to trust\n * additional keys ahead of a rotation (for example `[current, next]`).\n *\n * A `publicKey` on its own does not satisfy the signing requirement — electron-builder still has no key to\n * sign with. An external signer (HSM/KMS) that signs `latest*.yml` in a later step therefore either builds\n * without a publish policy, where the requirement only warns and the unsigned manifest is written locally, or\n * keeps publishing with `publishAutoUpdate: false` on every publish provider - electron-builder then uploads the\n * artifacts and embeds this key, but writes no `latest*.yml`, so the external step has to produce it too.\n */\n readonly publicKey?: string | Array<string> | null\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 * Lines use the same syntax `@electron/asar` accepts: the path may carry a leading `/` or a\n * `<count>:` prefix (as written by a load counter), and blank lines are ignored. There is no comment\n * syntax, and `\\` separators are accepted. Directory entries are moved to the front in their original\n * relative order (they hold no data), listed files follow in the order of the file, and every other\n * file keeps its original order after them. Lines naming a directory are ignored, and listed files\n * that are not in the archive are skipped.\n *\n * The path is resolved like other build resources: relative to the [build resources directory](#directories)\n * first, then to the project directory. A missing file fails the build. Packing files ahead of the default\n * dependencies-first layout can increase differential update download size.\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 * Align the start of every packed file's content inside `app.asar` to a multiple of this many bytes\n * (zero padding between files). Off when unset or `0`.\n *\n * Meant for differential updates with `nsis.differentialPackage: \"store-asar\"`: the asar header stores\n * every file's absolute content offset, so without alignment a change that grows a file by a single byte\n * shifts the offset of every later file and most of the header has to be re-downloaded. With alignment\n * a file can grow within its slot and no other offset moves. Measured on a 32 MB asar with 3,000 files:\n * `512` cut a small length-changing edit from 414 KB to 139 KB of differential download for 2.2 % more\n * asar size. Padding does not help when a file is added or removed (a new header entry shifts all later\n * offsets) or when growth crosses the slot. File order, sizes and per-file integrity are unchanged;\n * Electron and `@electron/asar` read files by offset + size and ignore the gaps.\n *\n * Must be a positive integer; values above 64 KiB log a warning because every file is padded up to the\n * boundary. The alignment is applied when electron-builder packs `app.asar`, so it is lost when the\n * archive is rebuilt afterwards: macOS universal builds with `mac.universal.mergeASARs` (the default)\n * repack the merged asar, and `--prepackaged` skips packing entirely.\n * @default 0\n */\n contentAlignment?: number | 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 `enableEmbeddedAsarIntegrityValidation` 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. It also skips the macOS ASAR integrity digest (`mac.asarIntegrityDigest`).\n *\n * @default false\n */\n disableIntegrity?: boolean\n}\n\n/**\n * Which files are copied into the packaged app, which file extensions are excluded from it, and which symlinks among them may lead outside it,\n * set under `fileOptions` at the configuration root or per platform (e.g. `mac.fileOptions`). A platform's file lists are added to the root\n * ones; a platform's `excludedExts` and `allowExternalLinks` replace the root ones.\n * See [file options](https://www.electron.build/docs/migration/v27-config-changes#file-options-fileoptions).\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,slnx,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 as well (e.g. `mac.fileOptions.files`, see [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 /**\n * File extensions (without the leading dot) excluded from the packaged app files and the copied `node_modules`.\n *\n * - `\"default\"` expands to the built-in list of excluded extensions (see the table below).\n * - Any other entry adds that extension, e.g. `\"map\"`.\n * - An entry starting with `!` removes that extension from the others listed, e.g. `[\"default\", \"!pdb\"]` to keep `.pdb` (Program Database)\n * symbol files for Windows crash-dump analysis. `.pdb` files contain symbol names and the source paths of the build machine:\n * keep them only in internal builds or builds for a symbol server, or upload them to a symbol server instead of shipping them.\n * A list of removals only, such as `[\"!pdb\"]`, is rejected because it would exclude no extension at all: write `[\"default\", \"!pdb\"]`. A `\"!ext\"` in a list that does not otherwise list that extension (e.g. `[\"map\", \"!pdb\"]`) has no effect and logs a warning.\n *\n * The built-in list (`\"default\"`):\n *\n * | Extension | Typically used for |\n * | --- | --- |\n * | `.iml` | IntelliJ IDEA / WebStorm module file |\n * | `.hprof` | Java heap dump |\n * | `.orig` | Original copy of a file, left behind by merge tools and `patch` |\n * | `.pyc` | Compiled Python bytecode |\n * | `.pyo` | Optimized compiled Python bytecode (Python 2) |\n * | `.rbc` | Compiled Ruby bytecode (Rubinius) |\n * | `.swp` | Vim swap file |\n * | `.csproj` | C# (MSBuild) project file |\n * | `.sln` | Visual Studio solution file |\n * | `.slnx` | Visual Studio XML solution file |\n * | `.suo` | Visual Studio solution user options |\n * | `.xproj` | .NET Core project file (Visual Studio 2015) |\n * | `.cc` | C++ source file, e.g. of a native module |\n * | `.d.ts` | TypeScript declaration file |\n * | `.mk` | Makefile fragment generated by node-gyp |\n * | `.a` | Static library archive from a native build |\n * | `.o` | Object file from a native build |\n * | `.obj` | Object file from an MSVC native build; also used for Wavefront 3D models, which a `files` pattern can re-include |\n * | `.forge-meta` | Metadata `@electron/rebuild` writes next to a rebuilt native module |\n * | `.pdb` | Program Database: Windows debug symbols, with symbol names and the build machine's source paths |\n *\n * The list replaces the defaults: list `\"default\"` to extend them rather than replace them. `null` (or omitting it) is `[\"default\"]`,\n * and an empty array `[]` excludes no extension.\n *\n * An invalid list (an entry that is not a file extension, `\"!default\"`, or removals only) fails the build when the configuration is validated, at the root and in every platform section, before anything is packed.\n *\n * ```json\n * { \"fileOptions\": { \"excludedExts\": [\"default\", \"!pdb\", \"map\"] } }\n * ```\n *\n * Set it under `fileOptions`, at the configuration root or per platform. Unlike the other lists, a later list replaces an earlier one rather\n * than being merged with it. For the root and for each platform section, the last layer that sets the list wins: the `extends` parents in\n * order, then the configuration file, then the programmatic or `-c` configuration. For the `mas` and `mas-dev` targets, a `mas` list then\n * replaces the `mac` one, and a `masDev` list (for `mas-dev`) replaces both. A platform's list then replaces the root one, whichever layer\n * set either. A `null` value keeps the earlier list.\n *\n * A `files` pattern that names an excluded extension includes only the app files it matches: `**\\/*.obj` every `.obj` file outside\n * `node_modules` and the build resources and output directories, `models/teapot.obj` only that file.\n *\n * A single entry may be given as a string, e.g. on the command line: `-c.fileOptions.excludedExts=default`. For several entries, repeat the flag:\n * `-c.fileOptions.excludedExts=default -c.fileOptions.excludedExts=!pdb` (in an interactive bash or zsh, write the second one as `'-c.fileOptions.excludedExts=!pdb'`, single-quoted, so that `!pdb` is not expanded).\n * @default [\"default\"]\n */\n excludedExts?: Array<string> | string | null\n\n /**\n * Whether symlinks among the packaged files may lead outside the app, the workspace and the package-manager store.\n *\n * Only the build configuration is trusted, not the files it packages: by default (`false`) electron-builder refuses\n * - a file of the app (`app.asar` or `asar: false`) that is a symlink, or is reached through one, whose real path is outside the workspace\n * root, the project and app directories and the package-manager store (`npm link`, a `file:../lib` dependency outside the repository,\n * a symlink into the home or temp directory),\n * - a copied symlink that resolves outside the app: one in `extraResources` / `extraFiles` (other than into the workspace or the store),\n * one kept by an `asar: false` copy, and any symlink leaving the app in a target that stores what symlinks point to (Windows `zip` / `7z`,\n * the NSIS app package, AppX/MSIX, Squirrel.Windows).\n *\n * Without these checks, a symlink planted in a dependency or a copied directory could package files from elsewhere on the build machine (SSH keys,\n * credentials) into the artifact, which is why this is off by default.\n *\n * - `true` allows any such symlink.\n * - A list of paths, relative to the project directory or absolute, allows a symlink only when the real path of what it points to is\n * inside the real path of one of them (e.g. `[\"../shared-lib\"]`). A listed path that does not exist fails the build.\n *\n * An allowed symlink is packaged: what it points to is copied (or stored by the archive), and a copied symlink is kept\n * as it is. A warning is logged once when this allows a symlink.\n *\n * Set it under `fileOptions`, at the configuration root or per platform; a platform's value (`false` included) replaces the root one\n * rather than being added to it:\n * ```json\n * { \"fileOptions\": { \"allowExternalLinks\": [\"../shared-lib\"] }, \"linux\": { \"fileOptions\": { \"allowExternalLinks\": true } } }\n * ```\n *\n * This does not allow writing through a symlink: a copy or a file written by electron-builder whose destination leads outside the\n * output directory through a symlink is always refused, and a symlink at such a file name is replaced, never followed.\n * See [Symbolic links](https://www.electron.build/docs/contents#symbolic-links).\n * @default false\n */\n allowExternalLinks?: boolean | Array<string> | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions {\n /**\n * Which files to copy into the packaged app (`files`, the app sources, `extraResources` and `extraFiles`), which file extensions to exclude\n * from it (`excludedExts`), and whether symlinks among them may lead outside the app and the workspace (`allowExternalLinks`).\n * Set at the configuration root, per platform (e.g. `mac.fileOptions`), or both: a platform's file lists are added to the root ones,\n * and a platform's `excludedExts` and `allowExternalLinks` replace the root ones.\n *\n * ```json\n * {\n * \"fileOptions\": {\n * \"files\": [\"dist/**\\/*\", \"package.json\"],\n * \"extraResources\": [{ \"from\": \"assets/bin\", \"to\": \"bin\" }]\n * }\n * }\n * ```\n *\n * `files`, `extraResources` and `extraFiles` set directly on the configuration or a platform section are moved here\n * when the configuration is loaded, with a warning. Run `electron-builder migrate-schema` to update the configuration.\n */\n fileOptions?: FilesBuildOptions | null\n\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](https://www.electronjs.org/docs/latest/tutorial/asar-archives).\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 * Overrides the root `forceCodeSigning` for this platform: whether to fail the build if the app could not be code-signed,\n * notarized, or have its auto-update manifests signed, and to verify the signatures it produces. See the root option for\n * what is enforced. Mac App Store builds cascade `mac` → `mas` (→ `masDev` for `mas-dev`), like every other option, so `mas.forceCodeSigning` / `masDev.forceCodeSigning` apply to their targets only.\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](https://www.electron.build/docs/features/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 * Ed25519 signing of the auto-update manifest (`latest*.yml`). Each manifest is signed and its public key is\n * embedded into `app-update.yml`, so electron-updater verifies the signature before downloading an update.\n *\n * **Signing is required.** Publishing a build that emits auto-update metadata fails unless a signing key\n * resolves. Generate one once with `electron-builder create-update-key`, then supply it via\n * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` (the PEM file, base64-encoded) / `ELECTRON_BUILDER_UPDATE_SIGN_KEY_FILE` (its path),\n * preferred in CI, or via `signingKey` / `signingKeyFile` below. Leaving this option unset — or `null` — keeps signing required and\n * resolves the key from the environment; `null` is not an opt-out.\n *\n * Set to `false`, the only opt-out, to ship **unsigned** manifests. Every build that produces a manifest then\n * logs a warning. `false` also short-circuits the environment variables, so a leftover\n * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` in CI cannot re-enable signing by accident.\n *\n * The requirement is enforced when a publish policy is in effect (`--publish`) or `forceCodeSigning` is set; any other\n * build warns instead, so local builds and pipelines that sign the manifest in a later step of their own are\n * unaffected. It is also waived when every publish provider has `publishAutoUpdate: false`, since no manifest is\n * emitted then, and for a build whose targets write no update info (e.g. only snap, flatpak, MSI/MSIX, portable,\n * mas/pkg or plain archives). A publishing (or `forceCodeSigning`) build checks for the key at build start, before\n * anything is packed or uploaded. Every signed manifest is read back and verified before it is written.\n *\n * See [Signed Update Manifests](https://www.electron.build/features/signed-update-manifests).\n */\n readonly updateManifest?: UpdateManifestSigningOptions | false | null\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 UpdateManifestSigningOptions {\n /**\n * Ed25519 private key(s) in PEM (PKCS#8) format used to sign the update manifest. A single PEM string may\n * contain several concatenated keys, or pass an array with one key each; the manifest is signed by every key\n * (dual-signing for [key rotation](https://www.electron.build/features/key-rotation)) and the first key also\n * fills the legacy single `signature` field.\n * Secret — prefer the `ELECTRON_BUILDER_UPDATE_SIGN_KEY` environment variable (the PEM file, base64-encoded) in CI over committing this to config.\n */\n readonly signingKey?: string | Array<string> | null\n\n /**\n * Path(s) to file(s) containing the Ed25519 private key (PEM, PKCS#8). Alternative to `signingKey`.\n * An array signs with every listed key, in order. Relative paths are resolved against the project directory.\n */\n readonly signingKeyFile?: string | Array<string> | null\n\n /**\n * The Ed25519 public key(s) (PEM or base64 SPKI) embedded into `app-update.yml` as the updater's trust list.\n * The updater accepts a manifest when any listed key validates one of its signatures. Optional — when\n * omitted the public key of every configured signing key is derived and embedded. Set it explicitly to trust\n * additional keys ahead of a rotation (for example `[current, next]`).\n *\n * A `publicKey` on its own does not satisfy the signing requirement — electron-builder still has no key to\n * sign with. An external signer (HSM/KMS) that signs `latest*.yml` in a later step therefore either builds\n * without a publish policy and without `forceCodeSigning`, where the requirement only warns and the unsigned\n * manifest is written locally, or keeps publishing with `publishAutoUpdate: false` on every publish provider -\n * electron-builder then uploads the artifacts and embeds this key, but writes no `latest*.yml`, so the external\n * step has to produce it too.\n *\n * When set, it must contain at least one of the signing keys: a publishing (or `forceCodeSigning`) build signed only by\n * keys outside this list fails, since its installs would reject manifests signed with them. See `allowSigningKeyOutsideTrustList`.\n */\n readonly publicKey?: string | Array<string> | null\n\n /**\n * Allows a publishing build to sign its manifests only with keys that are not in `publicKey` - a deliberate\n * cutover release that is verified by installs with the old key, but hands them over to the keys listed in\n * `publicKey`. Every later release must then be signed by a listed key. Without it such a build fails; a build\n * without a publish policy or `forceCodeSigning` only warns. Has no effect when `publicKey` is not set.\n * @default false\n */\n readonly allowSigningKeyOutsideTrustList?: boolean | null\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"]}
|
|
@@ -19,6 +19,9 @@ export interface SquirrelWindowsOptions extends TargetSpecificOptions {
|
|
|
19
19
|
readonly loadingGif?: string | null;
|
|
20
20
|
/**
|
|
21
21
|
* Whether to create an MSI installer. Defaults to `false` (MSI is not created).
|
|
22
|
+
*
|
|
23
|
+
* Squirrel.Windows builds the MSI around Setup.exe before electron-builder signs Setup.exe, so the installer inside the MSI is
|
|
24
|
+
* unsigned: the build warns, and fails with `forceCodeSigning`. For a signed MSI use the `msi` target instead.
|
|
22
25
|
*/
|
|
23
26
|
readonly msi?: boolean;
|
|
24
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SquirrelWindowsOptions.d.ts","sourceRoot":"","sources":["../../src/options/SquirrelWindowsOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEnC
|
|
1
|
+
{"version":3,"file":"SquirrelWindowsOptions.d.ts","sourceRoot":"","sources":["../../src/options/SquirrelWindowsOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;IAEjD;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEpC;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAE/B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SquirrelWindowsOptions.js","sourceRoot":"","sources":["../../src/options/SquirrelWindowsOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Squirrel.Windows options.\n */\nimport { TargetSpecificOptions } from \"../core.js\"\n\nexport interface SquirrelWindowsOptions extends TargetSpecificOptions {\n /**\n * A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.\n *\n * Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.\n *\n * If you don't plan to build windows installer, you can omit it.\n * If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default.\n */\n readonly iconUrl?: string | null\n\n /**\n * The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set)\n * (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)).\n */\n readonly loadingGif?: string | null\n\n /**\n * Whether to create an MSI installer. Defaults to `false` (MSI is not created).\n */\n readonly msi?: boolean\n\n /**\n * A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.\n */\n readonly remoteReleases?: string | boolean | null\n\n /**\n * Authentication token for remote updates\n */\n readonly remoteToken?: string | null\n\n /**\n * Use `appId` to identify package instead of `name`.\n */\n readonly useAppIdAsId?: boolean\n\n /**\n * https://github.com/electron-userland/electron-builder/issues/1743\n * @private\n */\n readonly name?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SquirrelWindowsOptions.js","sourceRoot":"","sources":["../../src/options/SquirrelWindowsOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Squirrel.Windows options.\n */\nimport { TargetSpecificOptions } from \"../core.js\"\n\nexport interface SquirrelWindowsOptions extends TargetSpecificOptions {\n /**\n * A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.\n *\n * Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.\n *\n * If you don't plan to build windows installer, you can omit it.\n * If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default.\n */\n readonly iconUrl?: string | null\n\n /**\n * The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set)\n * (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)).\n */\n readonly loadingGif?: string | null\n\n /**\n * Whether to create an MSI installer. Defaults to `false` (MSI is not created).\n *\n * Squirrel.Windows builds the MSI around Setup.exe before electron-builder signs Setup.exe, so the installer inside the MSI is\n * unsigned: the build warns, and fails with `forceCodeSigning`. For a signed MSI use the `msi` target instead.\n */\n readonly msi?: boolean\n\n /**\n * A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.\n */\n readonly remoteReleases?: string | boolean | null\n\n /**\n * Authentication token for remote updates\n */\n readonly remoteToken?: string | null\n\n /**\n * Use `appId` to identify package instead of `name`.\n */\n readonly useAppIdAsId?: boolean\n\n /**\n * https://github.com/electron-userland/electron-builder/issues/1743\n * @private\n */\n readonly name?: string\n}\n"]}
|
|
@@ -199,17 +199,36 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
199
199
|
*/
|
|
200
200
|
readonly universal?: ElectronUniversalOptions | null;
|
|
201
201
|
/**
|
|
202
|
-
* Whether to
|
|
202
|
+
* Whether to notarize the app with [@electron/notarize](https://github.com/electron/notarize).
|
|
203
203
|
*
|
|
204
|
-
*
|
|
204
|
+
* - unset (the default): notarize when notarization credentials are set, otherwise skip it with a warning.
|
|
205
|
+
* - `true`: notarization is required: the build fails when no credentials are set, wherever notarization would run (a macOS host,
|
|
206
|
+
* outside a pull-request build, with signing not turned off), at build start and when notarizing.
|
|
207
|
+
* - `false`: never notarize (for an ad-hoc or development-signed app, or one notarized in an `afterSign` hook).
|
|
205
208
|
*
|
|
206
|
-
*
|
|
209
|
+
* The credentials are one of the following sets of environment variables:
|
|
210
|
+
*
|
|
211
|
+
* 1. `APPLE_API_KEY` (path to the `.p8` file, or its contents base64-encoded), `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.
|
|
207
212
|
* 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`
|
|
208
213
|
* 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`
|
|
209
214
|
*
|
|
210
215
|
* For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)
|
|
211
216
|
*/
|
|
212
217
|
readonly notarize?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Whether to embed the [ASAR integrity](https://www.electronjs.org/docs/latest/tutorial/asar-integrity) digest into the Electron Framework binary.
|
|
220
|
+
*
|
|
221
|
+
* The digest covers the `ElectronAsarIntegrity` entries of `Info.plist`, so with the `enableEmbeddedAsarIntegrityValidation` fuse (see `electronFuses`) the app refuses to launch if those entries are changed, for example to match a modified `app.asar`. Embedding the digest modifies the Electron Framework, which is then signed again ad hoc; code signing the app replaces that signature.
|
|
222
|
+
*
|
|
223
|
+
* Applies only when:
|
|
224
|
+
* - Electron is 41 or later
|
|
225
|
+
* - the build runs on macOS (`codesign` signs the modified framework again)
|
|
226
|
+
* - `asar` is enabled and `asar.disableIntegrity` is not `true`
|
|
227
|
+
*
|
|
228
|
+
* Set to `false` if you change `app.asar` or `Info.plist` after the `afterPack` hook, sign the app yourself in `afterPack`, or merge separately built `x64` and `arm64` apps with `@electron/universal` yourself (build the `universal` arch instead).
|
|
229
|
+
* @default true
|
|
230
|
+
*/
|
|
231
|
+
readonly asarIntegrityDigest?: boolean;
|
|
213
232
|
}
|
|
214
233
|
export interface DmgOptions extends TargetSpecificOptions {
|
|
215
234
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.d.ts","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB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hD;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAA;IAE3C;;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, SigningDistributionType } 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`, and `optionsForFile` — 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\"> {\n /**\n * The type of certificate to use when signing: `development` or `distribution`.\n *\n * Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.\n * Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or\n * `Apple Development` certificate instead of `Developer ID Application` and embeds a matching\n * development provisioning profile.\n *\n * Development-signed apps are blocked by Gatekeeper on other machines; users must use the\n * right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.\n * Such builds are not suitable for production distribution and cannot be notarized.\n */\n readonly type?: SigningDistributionType\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. Resolved relative to the build resources directory, then the project directory.\n * Falls back to `build/entitlements.mac.plist` (or `build/entitlements.mas.plist` for MAS targets) if it exists.\n * Otherwise `mac` builds use the bundled default, which grants only `com.apple.security.cs.allow-jit`\n * (ad-hoc builds use a bundled ad-hoc template that also disables library validation), and MAS builds use\n * `@electron/osx-sign`'s built-in sandboxed `default.mas.plist`.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles. Resolved relative to the build resources directory, then the project directory.\n * Falls back to `build/entitlements.mac.inherit.plist` (or `build/entitlements.mas.inherit.plist` for MAS targets) if it exists.\n * Otherwise nested binaries receive `@electron/osx-sign`'s per-file defaults (renderer/GPU helpers: `allow-jit`;\n * plugin helper: Chromium's looser set; everything else: `default.darwin.plist`); ad-hoc `mac` builds use the\n * bundled ad-hoc template instead.\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 builds (`mas` and `mas-dev`).\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/docs/features/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\" | \"position\"\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, SigningDistributionType } 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`, and `optionsForFile` — 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\"> {\n /**\n * The type of certificate to use when signing: `development` or `distribution`.\n *\n * Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.\n * Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or\n * `Apple Development` certificate instead of `Developer ID Application` and embeds a matching\n * development provisioning profile.\n *\n * Development-signed apps are blocked by Gatekeeper on other machines; users must use the\n * right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.\n * Such builds are not suitable for production distribution and cannot be notarized.\n */\n readonly type?: SigningDistributionType\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. Resolved relative to the build resources directory, then the project directory.\n * Falls back to `build/entitlements.mac.plist` (or `build/entitlements.mas.plist` for MAS targets) if it exists.\n * Otherwise `mac` builds use the bundled default, which grants only `com.apple.security.cs.allow-jit`\n * (ad-hoc builds use a bundled ad-hoc template that also disables library validation), and MAS builds use\n * `@electron/osx-sign`'s built-in sandboxed `default.mas.plist`.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles. Resolved relative to the build resources directory, then the project directory.\n * Falls back to `build/entitlements.mac.inherit.plist` (or `build/entitlements.mas.inherit.plist` for MAS targets) if it exists.\n * Otherwise nested binaries receive `@electron/osx-sign`'s per-file defaults (renderer/GPU helpers: `allow-jit`;\n * plugin helper: Chromium's looser set; everything else: `default.darwin.plist`); ad-hoc `mac` builds use the\n * bundled ad-hoc template instead.\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 builds (`mas` and `mas-dev`).\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/docs/features/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 notarize the app with [@electron/notarize](https://github.com/electron/notarize).\n *\n * - unset (the default): notarize when notarization credentials are set, otherwise skip it with a warning.\n * - `true`: notarization is required: the build fails when no credentials are set, wherever notarization would run (a macOS host,\n * outside a pull-request build, with signing not turned off), at build start and when notarizing.\n * - `false`: never notarize (for an ad-hoc or development-signed app, or one notarized in an `afterSign` hook).\n *\n * The credentials are one of the following sets of environment variables:\n *\n * 1. `APPLE_API_KEY` (path to the `.p8` file, or its contents base64-encoded), `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 /**\n * Whether to embed the [ASAR integrity](https://www.electronjs.org/docs/latest/tutorial/asar-integrity) digest into the Electron Framework binary.\n *\n * The digest covers the `ElectronAsarIntegrity` entries of `Info.plist`, so with the `enableEmbeddedAsarIntegrityValidation` fuse (see `electronFuses`) the app refuses to launch if those entries are changed, for example to match a modified `app.asar`. Embedding the digest modifies the Electron Framework, which is then signed again ad hoc; code signing the app replaces that signature.\n *\n * Applies only when:\n * - Electron is 41 or later\n * - the build runs on macOS (`codesign` signs the modified framework again)\n * - `asar` is enabled and `asar.disableIntegrity` is not `true`\n *\n * Set to `false` if you change `app.asar` or `Info.plist` after the `afterPack` hook, sign the app yourself in `afterPack`, or merge separately built `x64` and `arm64` apps with `@electron/universal` yourself (build the `universal` arch instead).\n * @default true\n */\n readonly asarIntegrityDigest?: 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\" | \"position\"\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"]}
|
|
@@ -31,7 +31,10 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
31
31
|
* `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`). `WIN_CSC_LINK` accepts a file path, an
|
|
32
32
|
* `https://` URL, or a base64-encoded certificate. This is the recommended setup for CI.
|
|
33
33
|
* - Set to `false` or `null` to **disable** code signing entirely (executable resources such as
|
|
34
|
-
* the icon and metadata are still edited).
|
|
34
|
+
* the icon and metadata are still edited). A build that writes `app-update.yml` then also needs
|
|
35
|
+
* [verifyUpdateCodeSignature](#verifyUpdateCodeSignature) set to `false`, since no publisher
|
|
36
|
+
* name is derived; if you sign outside electron-builder, use `{ type: "signtool", publisherName: [...] }`
|
|
37
|
+
* instead.
|
|
35
38
|
* - Set to an **object** to configure signing explicitly. The **required** `type` field selects the
|
|
36
39
|
* signing backend (`signtool`, `hsm`, `pkcs11`, or `azure`) and dispatches to a dedicated sign
|
|
37
40
|
* manager; provide exactly one of the modes below. When `win.sign` is left unset, the `signtool`
|
|
@@ -55,21 +58,48 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
55
58
|
readonly sign?: WindowsSigningConfiguration | false | null;
|
|
56
59
|
/**
|
|
57
60
|
* Whether the NSIS auto-updater should verify the Authenticode signature of a downloaded update
|
|
58
|
-
* before installing it.
|
|
59
|
-
* not a build-time check.
|
|
61
|
+
* before installing it. The verification itself runs in your app, via electron-updater.
|
|
60
62
|
*
|
|
61
63
|
* When enabled (the default), the resolved [publisher name](#publisherName) is embedded into
|
|
62
64
|
* `app-update.yml` at build time. At update time electron-updater inspects the certificate that
|
|
63
|
-
* signed the downloaded installer and compares its subject (Distinguished Name
|
|
64
|
-
*
|
|
65
|
-
* maliciously substituted update from being installed.
|
|
65
|
+
* signed the downloaded installer and compares its subject (Distinguished Name) against that
|
|
66
|
+
* publisher name, refusing to install on a mismatch or when the signature cannot be verified.
|
|
67
|
+
* This prevents a tampered or maliciously substituted update from being installed.
|
|
66
68
|
*
|
|
67
|
-
*
|
|
69
|
+
* While enabled, electron-builder also checks at build time that the signed NSIS installer (or
|
|
70
|
+
* nsis-web stub) is signed by a certificate matching that publisher name, using the same matching
|
|
71
|
+
* rules, and fails the build otherwise.
|
|
72
|
+
*
|
|
73
|
+
* Since v27 a build that writes `app-update.yml` (an `nsis`, `nsis-web` or `electronUpdaterAware`
|
|
74
|
+
* `appx` target with a publish configuration) fails while this is enabled and no publisher name
|
|
75
|
+
* resolves (`sign: false` / `null`, no certificate, `publisherName: null`): electron-updater 7
|
|
76
|
+
* rejects every update of an app whose `app-update.yml` has no publisher name. Sign the build, set
|
|
77
|
+
* [publisherName](#publisherName), or set this to `false`.
|
|
78
|
+
*
|
|
79
|
+
* Set to `false` to skip verification explicitly — the publisher name is then **not** embedded, and
|
|
80
|
+
* `app-update.yml` carries `verifyUpdateCodeSignature: false` instead, which tells electron-updater
|
|
81
|
+
* to install updates without verifying their signature. This is the only opt-out.
|
|
68
82
|
* Disable this only if your updates are not Authenticode-signed.
|
|
69
83
|
*
|
|
70
84
|
* @default true
|
|
71
85
|
*/
|
|
72
86
|
readonly verifyUpdateCodeSignature?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether electron-updater accepts an update installer whose signature Windows reports from a security catalog (a signed list of
|
|
89
|
+
* file hashes) instead of one embedded in the installer — for update installers that are catalog-signed on purpose, such as an
|
|
90
|
+
* enterprise deployment that adds their hashes to a catalog. The catalog signer must still match the [publisher name](#publisherName).
|
|
91
|
+
*
|
|
92
|
+
* When `true`, the `latest.yml` written for the `nsis` and `nsis-web` targets carries `allowCatalogSignature: true`. electron-updater
|
|
93
|
+
* honors it only when the [signature of that update manifest](https://www.electron.build/docs/features/signed-update-manifests)
|
|
94
|
+
* was verified against a trusted key; in an unsigned manifest (or one signed by an untrusted key) it is ignored with a warning, and
|
|
95
|
+
* catalog signatures stay rejected unless the app sets `autoUpdater.allowCatalogSignature = true`. Since it is covered by the manifest
|
|
96
|
+
* signature, changing it for a published release means signing `latest.yml` again or republishing it.
|
|
97
|
+
*
|
|
98
|
+
* Installs running electron-updater 7.0.0-alpha.8 to alpha.11 with an update key configured reject a signed manifest that sets it
|
|
99
|
+
* (`ERR_UPDATER_MANIFEST_SIGNATURE_INVALID`).
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
readonly allowCatalogSignature?: boolean;
|
|
73
103
|
/**
|
|
74
104
|
* The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.
|
|
75
105
|
* Cannot be specified per target, allowed only in the `win`.
|
|
@@ -100,9 +130,14 @@ export type RequestedExecutionLevel = "asInvoker" | "highestAvailable" | "requir
|
|
|
100
130
|
*/
|
|
101
131
|
interface WindowsSigningSharedOptions {
|
|
102
132
|
/**
|
|
103
|
-
* The publisher name(s) to associate with the signature
|
|
104
|
-
*
|
|
105
|
-
*
|
|
133
|
+
* The publisher name(s) to associate with the signature: a Distinguished Name (DN) of your code
|
|
134
|
+
* signing certificate's subject, written with the attribute names Windows uses (e.g.
|
|
135
|
+
* `CN=My Company, O=My Company, C=US`). Every attribute you list must equal the certificate's;
|
|
136
|
+
* attributes you leave out are not compared. A bare name (`My Company`) fails the build since v27,
|
|
137
|
+
* because electron-updater 7 never matches it — see
|
|
138
|
+
* [the migration guide](https://www.electron.build/docs/migration/v27-build-changes#windows-publishername-must-be-a-distinguished-name).
|
|
139
|
+
* May be a single string or an array — an array is useful when rotating certificates, so updates
|
|
140
|
+
* signed by either the old or the new certificate still verify.
|
|
106
141
|
*
|
|
107
142
|
* This value is not a `signtool` argument; it is consumed in two places:
|
|
108
143
|
* - **Update verification** — when [verifyUpdateCodeSignature](#verifyUpdateCodeSignature) is
|
|
@@ -112,10 +147,16 @@ interface WindowsSigningSharedOptions {
|
|
|
112
147
|
* subject, so electron-builder derives it from this value (or the certificate) to keep them
|
|
113
148
|
* in sync; a mismatch makes packaging fail with `ERROR_BAD_FORMAT`.
|
|
114
149
|
*
|
|
115
|
-
* Defaults to
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
150
|
+
* Defaults to `CN=<common name>` of your code signing certificate, so a renewed certificate with the
|
|
151
|
+
* same common name keeps updates working even when its other subject attributes change. For a stricter
|
|
152
|
+
* pin, set a fuller DN explicitly (a renewal that changes a configured attribute then needs a release,
|
|
153
|
+
* signed with the old certificate, that lists both DNs).
|
|
154
|
+
* **Required** (while `verifyUpdateCodeSignature` is enabled and `app-update.yml` is written) whenever
|
|
155
|
+
* no certificate supplies it: with a custom [sign](#sign) hook, even if a certificate is configured,
|
|
156
|
+
* for a certificate without a CN, and when no certificate is configured (e.g. the build is signed
|
|
157
|
+
* outside electron-builder) — otherwise the build fails. `null` is no opt-out since v27: a build that
|
|
158
|
+
* writes `app-update.yml` with it fails; set [verifyUpdateCodeSignature](#verifyUpdateCodeSignature)
|
|
159
|
+
* to `false` instead.
|
|
119
160
|
*
|
|
120
161
|
* @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073
|
|
121
162
|
*/
|
|
@@ -127,8 +168,8 @@ interface WindowsSigningSharedOptions {
|
|
|
127
168
|
* (signtool `/as`). Signing with both `sha1` and `sha256` lets a single binary validate on
|
|
128
169
|
* legacy (pre-SHA-2) Windows as well as modern Windows.
|
|
129
170
|
*
|
|
130
|
-
* Some targets override this: `.msi` cannot be dual-signed
|
|
131
|
-
* is always `sha256` only.
|
|
171
|
+
* Some targets override this: `.msi` cannot be dual-signed, so it is signed once, with `sha256`
|
|
172
|
+
* unless `sha1` is the only algorithm listed, and AppX/MSIX is always `sha256` only.
|
|
132
173
|
*
|
|
133
174
|
* @default ['sha1', 'sha256']
|
|
134
175
|
*/
|
|
@@ -315,10 +356,13 @@ export interface WindowsAzureSigningConfig {
|
|
|
315
356
|
/** Discriminator selecting Azure Trusted Signing (cloud signing — no local certificate). */
|
|
316
357
|
readonly type: "azure";
|
|
317
358
|
/**
|
|
318
|
-
* The publisher name to associate with the signature
|
|
319
|
-
* issued by your Trusted Signing certificate profile
|
|
359
|
+
* The publisher name to associate with the signature: a Distinguished Name (DN) of the subject of
|
|
360
|
+
* the certificate issued by your Trusted Signing certificate profile (e.g.
|
|
361
|
+
* `CN=My Company, O=My Company, C=US`). Required. Used for
|
|
320
362
|
* [update verification](#verifyUpdateCodeSignature) (embedded in `app-update.yml` and checked by
|
|
321
|
-
* electron-updater) and must match the certificate subject.
|
|
363
|
+
* electron-updater) and must match the certificate subject. A bare name fails the build since
|
|
364
|
+
* v27 — see
|
|
365
|
+
* [the migration guide](https://www.electron.build/docs/migration/v27-build-changes#windows-publishername-must-be-a-distinguished-name).
|
|
322
366
|
*
|
|
323
367
|
* @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073
|
|
324
368
|
*/
|
|
@@ -374,5 +418,10 @@ export type WindowsSigntoolFamilyConfig = WindowsSigntoolSigningConfig | Windows
|
|
|
374
418
|
export declare function resolveWindowsSigningConfiguration(config: WindowsConfiguration): WindowsSigningConfiguration | null;
|
|
375
419
|
/** Whether Windows code signing has been explicitly disabled via `sign: false | null`. */
|
|
376
420
|
export declare function isWindowsSigningDisabled(config: WindowsConfiguration): boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Whether `file` is signed according to `signExts`: a listed extension is signed, a `!`-negated one is not, and
|
|
423
|
+
* otherwise `.exe` files (or every file, with `fallbackValue`) are.
|
|
424
|
+
*/
|
|
425
|
+
export declare function shouldSignWindowsFile(file: string, signExts: ReadonlyArray<string> | null | undefined, fallbackValue?: boolean): boolean;
|
|
377
426
|
export {};
|
|
378
427
|
//# sourceMappingURL=winOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IACxE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExC
|
|
1
|
+
{"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IACxE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;O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}
|
|
@@ -10,4 +10,24 @@ export function resolveWindowsSigningConfiguration(config) {
|
|
|
10
10
|
export function isWindowsSigningDisabled(config) {
|
|
11
11
|
return config.sign === false || config.sign === null;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Whether `file` is signed according to `signExts`: a listed extension is signed, a `!`-negated one is not, and
|
|
15
|
+
* otherwise `.exe` files (or every file, with `fallbackValue`) are.
|
|
16
|
+
*/
|
|
17
|
+
export function shouldSignWindowsFile(file, signExts, fallbackValue = false) {
|
|
18
|
+
const isExe = file.endsWith(".exe");
|
|
19
|
+
if (!signExts?.length) {
|
|
20
|
+
return isExe || fallbackValue;
|
|
21
|
+
}
|
|
22
|
+
// process patterns ( !exe => exclude .exe, .dll => include .dll )
|
|
23
|
+
// we process first to allow literal negatives in case a filename matches "help!.txt" or similar
|
|
24
|
+
if (signExts.some(ext => file.endsWith(ext))) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
// process negative patterns
|
|
28
|
+
if (signExts.some(ext => ext.startsWith("!") && file.endsWith(ext.substring(1)))) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return isExe || fallbackValue;
|
|
32
|
+
}
|
|
13
33
|
//# sourceMappingURL=winOptions.js.map
|