app-builder-lib 27.0.0-alpha.12 → 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 +14 -2
- package/dist/codeSign/win/authenticodeSignature.d.ts.map +1 -1
- package/dist/codeSign/win/authenticodeSignature.js +78 -30
- package/dist/codeSign/win/authenticodeSignature.js.map +1 -1
- 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 +16 -9
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +46 -35
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.js +7 -4
- package/dist/codeSign/win/verifyUpdatePublisher.js.map +1 -1
- 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 +46 -3
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/mac/asarIntegrityDigest.js +2 -2
- package/dist/electron/mac/asarIntegrityDigest.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +3 -2
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -1
- package/dist/electron/mac/electronMacUtils.js +3 -2
- package/dist/electron/mac/electronMacUtils.js.map +1 -1
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +4 -2
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +7 -2
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +6 -2
- 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 +26 -0
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +168 -12
- package/dist/macPackager.js.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts +15 -12
- 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 +7 -2
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +61 -15
- 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 +1 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +7 -2
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +14 -5
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +44 -13
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +3 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +50 -16
- 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.map +1 -1
- package/dist/targets/archive.js +3 -3
- package/dist/targets/archive.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 +10 -7
- 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/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 +15 -3
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +96 -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 +7 -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 +8 -2
- 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/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 +9 -3
- 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/fileOptions.js +2 -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 +8 -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 +9 -9
- package/scheme.json +497 -23
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +14 -9
- 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
package/dist/macPackager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macPackager.js","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CA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AAC;CACF","sourcesContent":["import { createRequire } from \"node:module\"\nimport type { SignOptions } from \"@electron/osx-sign\"\n\nconst _require = createRequire(import.meta.url)\nimport {\n Arch,\n AsyncTaskManager,\n copyFile,\n deepAssign,\n exec,\n exists,\n getArchSuffix,\n InvalidConfigurationError,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n unlinkIfExists,\n use,\n} from \"builder-util\"\nimport { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport * as fs from \"fs/promises\"\nimport { mkdir, readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { AppInfo } from \"./appInfo.js\"\nimport { embedAsarIntegrityDigest, FIRST_ELECTRON_MAJOR_WITH_ASAR_INTEGRITY_DIGEST } from \"./electron/mac/asarIntegrityDigest.js\"\nimport { assertSafeHelperName } from \"./electron/mac/electronMacUtils.js\"\nimport { CodeSigningInfo, createKeychain, CreateKeychainOptions, Identity, isSignAllowed, removeKeychain, sign } from \"./codeSign/mac/macCodeSign.js\"\nimport { combineSignResults, isSignResultSigned, SigningResult } from \"./codeSign/signResult.js\"\nimport { DIR_TARGET, Platform, Target } from \"./core.js\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index.js\"\nimport { MacTargetHelper, MasPlatformType, PlatformType } from \"./targets/mac/MacTargetHelper.js\"\nimport { ElectronSignOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions.js\"\nimport { AsarOptions } from \"./options/PlatformSpecificBuildOptions.js\"\nimport { Packager } from \"./packager.js\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager.js\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget.js\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/mac/pkg.js\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory.js\"\nimport { isPlainObject, replaceMergedExcludedExts } from \"./util/config/fileOptions.js\"\nimport { isMacOsHighSierra } from \"./util/mac/macosVersion.js\"\nimport { buildSingleArchFilesPattern, collectIdenticalSingleArchMachOFiles, collectSingleArchPackageNames } from \"./util/archCompatibility.js\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander.js\"\nimport { resolveFunction } from \"./util/resolve.js\"\nimport { makeUniversalApp } from \"@electron/universal\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nfunction isElectronSignOptions(sign: MacConfiguration[\"sign\"]): sign is ElectronSignOptions {\n return typeof sign === \"object\" && sign !== null\n}\n\n/**\n * Merges the mac → mas (→ masDev) cascade. `deepAssign` merges a later layer into a nested object it took from an earlier one, so each\n * layer's `fileOptions` is copied first: merging the mas configuration must not change the `fileOptions` of the mac one. A later layer's\n * `fileOptions.excludedExts` replaces an earlier one (see replaceMergedExcludedExts).\n */\nfunction mergeMasConfig(...layers: Array<MacConfiguration | MasConfiguration | Nullish>): MasConfiguration {\n const config: MasConfiguration = deepAssign({}, ...layers.map(it => (it != null && isPlainObject(it.fileOptions) ? { ...it, fileOptions: { ...it.fileOptions } } : it)))\n replaceMergedExcludedExts(config, layers)\n return config\n}\n\ninterface PlatformConfig<C extends MacConfiguration | MasConfiguration = MacConfiguration | MasConfiguration> {\n type: PlatformType\n config: C\n platformName: ElectronPlatformName\n}\n\nexport class MacPackager extends PlatformPackager<MacConfiguration | MasConfiguration> {\n readonly codeSigningInfo = new MemoLazy<CreateKeychainOptions | null, CodeSigningInfo>(\n () => {\n const cscLink = this.getCscLink()\n if (cscLink == null || process.platform !== \"darwin\") {\n return null\n }\n\n const selected = {\n tmpDir: this.tempDirManager,\n cscLink,\n cscKeyPassword: this.getCscPassword(),\n cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),\n cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),\n currentDir: this.projectDir,\n }\n\n return selected\n },\n async selected => {\n if (selected) {\n return createKeychain(selected).then(result => {\n const keychainFile = result.keychainFile\n if (keychainFile != null) {\n this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))\n }\n return result\n })\n }\n\n return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })\n }\n )\n\n private _iconPath = new Lazy(() => this.getOrConvertIcon(\"icns\"))\n\n readonly helper = new MacTargetHelper(this)\n\n constructor(info: Packager) {\n super(info, Platform.MAC)\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\n }\n\n /**\n * Get the merged configuration for a specific platform type. Calls statically known to be a MAS\n * flavor (`mas` / `mas-dev`) get a `MasConfiguration` back, so no cast is needed downstream.\n */\n getPlatformConfig(platformType: MasPlatformType): PlatformConfig<MasConfiguration>\n getPlatformConfig(platformType: PlatformType): PlatformConfig\n getPlatformConfig(platformType: PlatformType): PlatformConfig {\n let config: MacConfiguration | MasConfiguration\n let platformName: ElectronPlatformName\n\n switch (platformType) {\n case \"mas\":\n config = mergeMasConfig(this.platformSpecificBuildOptions, this.config.mas)\n platformName = \"mas\"\n break\n\n case \"mas-dev\":\n // `mas-dev` cascades mac → mas → masDev. The development/distribution distinction is no longer\n // carried as a config field; it is derived from `platformType` wherever signing happens.\n config = mergeMasConfig(this.platformSpecificBuildOptions, this.config.mas, this.config.masDev)\n platformName = \"mas\"\n break\n\n case \"mac\":\n default:\n config = this.platformSpecificBuildOptions\n platformName = this.platform.nodeName as ElectronPlatformName\n break\n }\n\n return { type: platformType, config, platformName }\n }\n\n expandArch(pattern: string, arch?: Arch | null): string[] {\n if (arch === Arch.universal) {\n // Universal build has `app-x64.asar.unpacked` & `app-arm64.asar.unpacked`\n return [doExpandMacro(pattern, Arch[Arch.arm64], this.appInfo, {}, false), doExpandMacro(pattern, Arch[Arch.x64], this.appInfo, {}, false)]\n }\n // Every other build keeps the name as `app.asar.unpacked`\n return [doExpandMacro(pattern, null, this.appInfo, {}, false)]\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected prepareAppInfo(appInfo: AppInfo): AppInfo {\n const macAppInfo = new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions)\n // Electron discovers its helper apps via `${CFBundleName} Helper.app`. We use the product name\n // verbatim for `CFBundleName` and for the on-disk helper/app bundle names, so a name that\n // filename sanitization would change must be rejected (otherwise the two would diverge and break\n // helper discovery). Fail fast during setup.\n assertSafeHelperName(macAppInfo.productName, \"productName\")\n const executableName = this.platformSpecificBuildOptions.executableName ?? this.info.config.executableName\n if (executableName != null) {\n assertSafeHelperName(executableName, \"executableName\")\n }\n return macAppInfo\n }\n\n async getIconPath(): Promise<string | null> {\n return this._iconPath.value\n }\n\n createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void {\n for (const name of targets) {\n switch (name) {\n case DIR_TARGET:\n break\n\n case \"dmg\": {\n mapper(name, outDir => {\n const { DmgTarget } = _require(\"dmg-builder\")\n return new DmgTarget(this, outDir)\n })\n break\n }\n\n case \"zip\":\n // https://github.com/electron-userland/electron-builder/issues/2313\n mapper(name, outDir => new ArchiveTarget(name, outDir, this, true))\n break\n\n case \"pkg\":\n mapper(name, outDir => new PkgTarget(this, outDir))\n break\n\n default:\n mapper(name, outDir => (MacTargetHelper.isMasTarget(name) ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n if (config.arch === Arch.universal) {\n return this.doUniversalPack(config)\n }\n return await super.doPack(config)\n }\n\n /**\n * Handle universal build packing\n */\n private async doUniversalPack(config: DoPackOptions<MacConfiguration>): Promise<void> {\n const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets } = config\n\n const outDirName = (arch: Arch) => `${appOutDir}-${Arch[arch]}-temp`\n const options = {\n ...config,\n options: {\n sign: false,\n disableAsarIntegrity: true,\n disableFuses: true,\n // Keep both slices symmetric: don't drop platform-mismatched modules per-arch (that asymmetry breaks\n // the universal merge). Single-arch binaries are reconciled below via `computeSingleArchFiles`.\n disableArchFilter: true,\n },\n }\n\n const x64Arch = Arch.x64\n const x64AppOutDir = outDirName(x64Arch)\n await super.doPack({ ...options, appOutDir: x64AppOutDir, arch: x64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const arm64Arch = Arch.arm64\n const arm64AppOutPath = outDirName(arm64Arch)\n await super.doPack({ ...options, appOutDir: arm64AppOutPath, arch: arm64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n const appFile = `${this.appInfo.productFilename}.app`\n\n // Make sure the Assets.car file is the same for both architectures\n const safeX64AppOutDir = sanitizeDirPath(x64AppOutDir)\n const safeArm64AppOutPath = sanitizeDirPath(arm64AppOutPath)\n const safeAppOutDir = sanitizeDirPath(appOutDir)\n\n const sourceCatalogPath = path.join(safeX64AppOutDir, appFile, \"Contents/Resources/Assets.car\")\n if (await exists(sourceCatalogPath)) {\n const targetCatalogPath = path.join(safeArm64AppOutPath, appFile, \"Contents/Resources/Assets.car\")\n await fs.copyFile(sourceCatalogPath, targetCatalogPath)\n }\n\n const universalOpts = platformSpecificBuildOptions.universal\n\n // Single-arch binaries that can't be merged into a universal Mach-O. Two sources:\n // 1. `cpu`/`os`-declared platform packages (e.g. `@esbuild/darwin-arm64`), which the collection filter\n // confines to their native slice — mark the whole package so unique non-binary siblings don't trip the merge.\n // 2. Host binaries identical in both slices inside packages that declare no `cpu`/`os` (e.g. esbuild's\n // install script overwriting `esbuild/bin/esbuild` with the platform binary) — mark the file.\n // Both are reported to `@electron/universal` via `singleArchFiles`; otherwise it aborts on the arch mismatch.\n const singleArchFiles = await this.computeSingleArchFiles(\n path.join(safeX64AppOutDir, appFile),\n path.join(safeArm64AppOutPath, appFile),\n universalOpts?.singleArchFiles ?? undefined\n )\n\n await makeUniversalApp({\n mergeASARs: true, // preserve electron-builder v2 default; user can override via mac.universal.mergeASARs\n ...universalOpts,\n singleArchFiles,\n x64AppPath: path.join(safeX64AppOutDir, appFile),\n arm64AppPath: path.join(safeArm64AppOutPath, appFile),\n outAppPath: path.join(safeAppOutDir, appFile),\n force: true,\n })\n await fs.rm(x64AppOutDir, { recursive: true, force: true })\n await fs.rm(arm64AppOutPath, { recursive: true, force: true })\n\n // Give users a final opportunity to perform things on the combined universal package before signing\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n await this.info.emitAfterPack(packContext)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.doAddAsarIntegrityDigest(packContext, platformSpecificBuildOptions, await this.computeAsarOptions(platformSpecificBuildOptions))\n await this.doAddElectronFuses(packContext)\n\n // Mirror the base-class guard: skip signing when the caller explicitly set sign:false\n // (e.g. packMasTargets passes sign:false so that its own sign() call is the sole signing step).\n if (config.options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n /**\n * Embeds the ASAR integrity digest into the Electron Framework, see `mac.asarIntegrityDigest`. A universal app gets it after the slices are merged: they\n * have no `ElectronAsarIntegrity` entries, and re-signing the framework of a slice would make the slices differ in a way `@electron/universal` rejects.\n */\n protected async doAddAsarIntegrityDigest(\n packContext: AfterPackContext,\n platformSpecificBuildOptions: MacConfiguration | MasConfiguration,\n asarOptions: AsarOptions | null\n ): Promise<void> {\n // nothing to protect without the entries electron-builder computes: a stock Electron Info.plist still lists the removed default_app.asar\n if (asarOptions == null || asarOptions.disableIntegrity) {\n return\n }\n if (platformSpecificBuildOptions.asarIntegrityDigest === false) {\n log.info({ reason: \"asarIntegrityDigest is set to false\" }, \"skipped ASAR integrity digest\")\n return\n }\n const electronVersion = semver.coerce(this.info.framework.version)\n if (electronVersion == null || semver.major(electronVersion) < FIRST_ELECTRON_MAJOR_WITH_ASAR_INTEGRITY_DIGEST) {\n return\n }\n if (process.platform !== \"darwin\") {\n log.warn({ reason: \"supported only on macOS, where codesign can sign the modified Electron Framework again\" }, \"skipped ASAR integrity digest\")\n return\n }\n const frameworkName = `${path.basename(this.info.framework.distMacOsAppName, \".app\")} Framework`\n const embedded = await embedAsarIntegrityDigest(path.join(packContext.appOutDir, `${this.appInfo.productFilename}.app`), frameworkName)\n // an afterPack hook that signs the app or changes it in ways the digest must not cover is where this change bites\n if (embedded && this.info.filterPackagerEventListeners(\"afterPack\", \"user\").length > 0) {\n log\n .once(\"asar-integrity-digest-after-afterpack\")\n .warn(\n { solution: \"set mac.asarIntegrityDigest to false if your afterPack hook signs the app\" },\n \"electron-builder v27 embeds the ASAR integrity digest into the Electron Framework after the afterPack hook and signs the framework again ad hoc, replacing a signature applied in afterPack. \" +\n \"Changing app.asar or Info.plist after afterPack now fails the app at launch when the enableEmbeddedAsarIntegrityValidation fuse is on. \" +\n \"See https://www.electron.build/docs/migration/v27-breaking-changes#macos-asar-integrity-digest\"\n )\n }\n }\n\n /**\n * Builds the `singleArchFiles` glob passed to `@electron/universal` by scanning both packed slices for\n * single-architecture binaries that can't be lipo-merged. Merges any user-provided `mac.universal.singleArchFiles`.\n */\n private async computeSingleArchFiles(x64AppPath: string, arm64AppPath: string, userPattern: string | undefined): Promise<string | undefined> {\n const unpacked = (appPath: string) => path.join(appPath, \"Contents\", \"Resources\", \"app.asar.unpacked\")\n const x64Unpacked = unpacked(x64AppPath)\n const arm64Unpacked = unpacked(arm64AppPath)\n\n // (1) `cpu`/`os`-declared platform packages confined to one slice — mark the whole package.\n const packageNames = new Set<string>()\n await collectSingleArchPackageNames(path.join(x64Unpacked, \"node_modules\"), packageNames)\n await collectSingleArchPackageNames(path.join(arm64Unpacked, \"node_modules\"), packageNames)\n\n // (2) undeclared host binaries identical in both slices (e.g. `esbuild/bin/esbuild`) — mark the file.\n const machOFiles = await collectIdenticalSingleArchMachOFiles(x64Unpacked, arm64Unpacked)\n\n const patterns = [...Array.from(packageNames).map(name => `**/${name}/**`), ...machOFiles]\n if (patterns.length === 0) {\n return userPattern\n }\n\n log.warn(\n { packages: Array.from(packageNames).sort().join(\", \") || \"(none)\", files: machOFiles.sort().join(\", \") || \"(none)\" },\n \"Universal build contains single-architecture binaries; they are copied as-is per slice (not lipo-merged), so each is only usable on architectures whose platform package was installed on this build host. \" +\n \"If these are build-only tools (e.g. esbuild), move them to `devDependencies` or exclude them via `files` to omit them entirely. \" +\n \"If they are needed at runtime, install every target architecture's variant so the universal app works on both Intel and Apple Silicon (pnpm/yarn: `supportedArchitectures`; npm: `--cpu`/`--os`).\"\n )\n return buildSingleArchFilesPattern(patterns, userPattern)\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const masTargets = targets.filter(it => MacTargetHelper.isMasTarget(it.name))\n const nonMasTargets = targets.filter(it => !MacTargetHelper.isMasTarget(it.name))\n const prepackaged = this.packagerOptions.prepackaged\n const hasMas = masTargets.length > 0\n\n // mas always first\n await this.packMasTargets(outDir, arch, masTargets, prepackaged)\n\n // Mirror master's condition: skip the non-MAS darwin pack only when there are exclusively MAS\n // targets (hasMas=true, targets.length=1). DIR_TARGET passes targets=[] to pack() because\n // MacPackager.createTargets() doesn't call mapper() for it, so hasMas=false and doPack still runs.\n if (!hasMas || targets.length > 1) {\n await this.packMacTargets(outDir, arch, nonMasTargets, prepackaged, taskManager)\n }\n }\n\n private async packMasTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined): Promise<void> {\n const resolvedOutDir = path.resolve(outDir)\n MacTargetHelper.assertSafePathForCommandUsage(resolvedOutDir, \"output directory\")\n\n for (const target of targets) {\n const platformType = MacTargetHelper.getPlatformTypeFromTarget(target.name)\n const platformConfig = this.getPlatformConfig(platformType)\n const targetOutDir = path.resolve(resolvedOutDir, `${target.name}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n MacTargetHelper.assertSafePathForCommandUsage(targetOutDir, \"target output directory\")\n\n const relativeTargetOutDir = path.relative(resolvedOutDir, targetOutDir)\n if (relativeTargetOutDir.startsWith(\"..\") || path.isAbsolute(relativeTargetOutDir)) {\n throw new InvalidConfigurationError(`Invalid target output directory: ${targetOutDir}`)\n }\n\n let appPath: string = path.join(targetOutDir, `${this.appInfo.productFilename}.app`)\n if (prepackaged != null) {\n appPath = prepackaged\n } else {\n await this.doPack({\n outDir: resolvedOutDir,\n appOutDir: targetOutDir,\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets: [target],\n options: { sign: false },\n })\n MacTargetHelper.assertSafePathForCommandUsage(this.appInfo.productFilename, \"product filename\")\n }\n const signResult = await this.sign(appPath, arch, platformType)\n const signed = isSignResultSigned(signResult)\n\n // The MAS flow packs with sign:false and signs here, bypassing doSignAfterPack — the only other\n // emitAfterSign site. Mirror its contract: fire afterSign after codesigning succeeded, but before\n // the .pkg installer is built, and warn when signing was skipped (#9997).\n const packContext: AfterPackContext = {\n appOutDir: path.dirname(appPath),\n outDir: resolvedOutDir,\n arch,\n targets: [target],\n packager: this,\n electronPlatformName: platformConfig.platformName,\n }\n if (signed) {\n await this.info.emitAfterSign(packContext)\n } else if (this.info.filterPackagerEventListeners(\"afterSign\", \"user\").length) {\n log.warn(null, `skipping \"afterSign\" hook as no signing occurred, perhaps you intended \"afterPack\"?`)\n }\n\n // test-only early exit (see PackagerOptions.afterPackTestHook); a no-op unless the option is set\n if (await this.info.shouldSkipTargetsAfterPack(packContext)) {\n continue\n }\n\n // A development-signed build (mas-dev, or an explicit sign.type \"development\" — see\n // MacTargetHelper.shouldCreateMasInstaller) produces no installer\n const masSignConfig = platformConfig.config.sign\n const masSignOpts = isElectronSignOptions(masSignConfig) ? masSignConfig : undefined\n if (signed && MacTargetHelper.shouldCreateMasInstaller(platformType, masSignOpts?.type)) {\n await this.createMasInstaller(appPath, targetOutDir, arch, platformType)\n }\n }\n }\n\n private async packMacTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined, taskManager: AsyncTaskManager): Promise<void> {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${path.basename(this.appInfo.productFilename)}.app`) : prepackaged\n\n if (prepackaged == null) {\n const platformConfig = this.getPlatformConfig(\"mac\")\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets,\n })\n }\n\n // test-only early exit (see PackagerOptions.afterPackTestHook); a no-op unless the option is set\n if (\n await this.info.shouldSkipTargetsAfterPack({\n appOutDir: path.dirname(appPath),\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: this.platform.nodeName,\n })\n ) {\n return\n }\n\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n\n /**\n * Creates the signed MAS installer .pkg for an already codesigned app. Kept separate from `sign()`\n * so that the `afterSign` hook can run between codesigning and installer creation (see `packMasTargets`).\n */\n protected async createMasInstaller(appPath: string, outDir: string, arch: Arch, targetPlatform: MasPlatformType): Promise<void> {\n const config = this.getPlatformConfig(targetPlatform).config\n const signConfig = config.sign\n const signOpts = isElectronSignOptions(signConfig) ? signConfig : undefined\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n await this.helper.createMasInstaller(appPath, outDir, config, keychainFile, targetPlatform, arch, signOpts?.identity)\n }\n\n /**\n * Main signing method with platform awareness. Protected so tests can stub signing\n * (`isSignAllowed()` short-circuits it on non-mac hosts). Failures are thrown, never returned.\n */\n protected async sign(appPath: string, arch: Arch, targetPlatform: PlatformType): Promise<SigningResult> {\n if (!isSignAllowed()) {\n // non-mac host, or the pull-request CI guard — signing cannot happen in this environment\n return \"skipped:unsupported\"\n }\n\n // getPlatformConfig cascades mac → mas → masDev, so `sign` (and `sign.identity`) is already merged for this flavor.\n const config = this.getPlatformConfig(targetPlatform).config.sign\n\n // sign: null → user explicitly disabled signing\n if (config === null) {\n return this.helper.handleNullIdentity()\n }\n\n const signOpts = isElectronSignOptions(config) ? config : undefined\n // sign.identity: null → explicit skip; undefined → auto-discover\n const qualifier = signOpts?.identity\n if (qualifier === null) {\n return this.helper.handleNullIdentity()\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n // `config` is a custom fn/string module path when it's non-null and not an options object\n const hasCustomSign = config != null && !signOpts\n const isMas = MacTargetHelper.isMasTarget(targetPlatform)\n\n const identity = await this.helper.findSigningIdentity(targetPlatform, qualifier, keychainFile, hasCustomSign, signOpts)\n\n if (!identity) {\n return \"skipped:no-certificate\"\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n const signOptions = await this.helper.buildSignOptions(appPath, identity, signOpts, keychainFile, arch, targetPlatform, hasCustomSign)\n await this.doSign(signOptions, config, identity)\n\n // now that everything is signed, flag binaries that still carry a foreign (or missing) signature and would\n // fail library validation at launch — the case the old blanket entitlements default used to mask\n if (!hasCustomSign) {\n await this.helper.warnAboutForeignSignedBinaries(appPath, identity, targetPlatform, signOpts)\n }\n\n // Handle notarization for non-MAS builds\n if (!isMas) {\n await this.helper.notarizeIfProvided(appPath)\n }\n\n return hasCustomSign ? \"signed:custom\" : \"signed\"\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, signConfig: MacConfiguration[\"sign\"], identity: Identity | null): Promise<void> {\n // Resolve a custom signer only when signConfig is a function or string module path.\n // ElectronSignOptions objects and undefined use @electron/osx-sign directly.\n const customSign =\n signConfig == null || isElectronSignOptions(signConfig) ? null : await resolveFunction(this.appInfo.type, signConfig, \"sign\", await this.info.getWorkspaceRoot())\n\n const { app, platform, type, provisioningProfile } = opts\n log.info(\n {\n file: log.filePath(app),\n platform,\n type,\n identityName: identity?.name || \"none\",\n identityHash: identity?.hash || \"none\",\n provisioningProfile: provisioningProfile || \"none\",\n },\n customSign ? \"executing custom sign\" : \"signing\"\n )\n\n // `opts.identity` is resolved once, in MacTargetHelper.resolveSignIdentity — never re-derive it here, or a\n // custom signer and @electron/osx-sign end up signing with different forms of the same certificate\n return customSign ? Promise.resolve(customSign(opts, this)) : sign(opts)\n }\n\n //noinspection JSMethodCanBeStatic\n public async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n const safeAppPath = sanitizeDirPath(appPath)\n const safeOutFile = sanitizeDirPath(outFile)\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(safeOutFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", safeAppPath, \"/Applications\")\n args.push(safeOutFile)\n return await exec(\"productbuild\", args)\n }\n\n public getElectronSrcDir(dist: string) {\n return path.resolve(this.projectDir, dist, this.info.framework.distMacOsAppName)\n }\n\n public getElectronDestinationDir(appOutDir: string) {\n return path.join(appOutDir, this.info.framework.distMacOsAppName)\n }\n\n // todo fileAssociations\n async applyCommonInfo(appPlist: any, contentsPath: string, cascadedOptions: MacConfiguration | MasConfiguration): Promise<void> {\n const appInfo = this.appInfo\n const appFilename = appInfo.productFilename\n\n // https://github.com/electron-userland/electron-builder/issues/1278\n appPlist.CFBundleExecutable = appFilename.endsWith(\" Helper\") ? appFilename.substring(0, appFilename.length - \" Helper\".length) : appFilename\n\n const resourcesPath = path.join(contentsPath, \"Resources\")\n\n // Support both legacy `.icns` and modern `.icon` (Icon Composer) inputs via `mac.icon`.\n // Prefer `.icon` if provided; still accept `.icns`.\n const configuredIcon = this.platformSpecificBuildOptions.icon\n const isIconComposer = typeof configuredIcon === \"string\" && configuredIcon.toLowerCase().endsWith(\".icon\")\n\n // Set the app name. The product name is used verbatim (it is validated in `prepareAppInfo` to\n // require no filename sanitization), so `CFBundleName` matches the on-disk helper bundle names\n // that Electron resolves as `${CFBundleName} Helper.app`.\n appPlist.CFBundleName = appInfo.productName\n appPlist.CFBundleDisplayName = appInfo.productName\n\n // Bundle legacy `icns` format - this should also run when `.icon` is provided\n const setIcnsFile = async (iconPath: string) => {\n const oldIcon = appPlist.CFBundleIconFile\n if (oldIcon != null) {\n await unlinkIfExists(path.join(resourcesPath, oldIcon))\n }\n const iconFileName = \"icon.icns\"\n appPlist.CFBundleIconFile = iconFileName\n await copyFile(iconPath, path.join(resourcesPath, iconFileName))\n }\n\n const icnsFilePath = await this.getIconPath()\n if (icnsFilePath != null) {\n await setIcnsFile(icnsFilePath)\n }\n\n // Bundle new `icon` format\n if (isIconComposer && configuredIcon) {\n const iconComposerPath = await this.getResource(configuredIcon)\n if (iconComposerPath) {\n const { assetCatalog } = await this.generateAssetCatalogData(iconComposerPath)\n\n // Create and setup the asset catalog\n appPlist.CFBundleIconName = \"Icon\"\n await fs.writeFile(path.join(resourcesPath, \"Assets.car\"), assetCatalog)\n }\n }\n\n const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion\n if (minimumSystemVersion != null) {\n appPlist.LSMinimumSystemVersion = minimumSystemVersion\n }\n\n // const activeOpts = this.getPlatformConfig(distType).config\n appPlist.CFBundleShortVersionString = cascadedOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = cascadedOptions.bundleVersion || appInfo.buildVersion\n\n use(this.platformSpecificBuildOptions.category || (this.config as any).category, it => (appPlist.LSApplicationCategoryType = it))\n appPlist.NSHumanReadableCopyright = appInfo.copyright\n\n if (this.platformSpecificBuildOptions.darkModeSupport) {\n appPlist.NSRequiresAquaSystemAppearance = false\n }\n\n const extendInfo = this.platformSpecificBuildOptions.extendInfo\n if (extendInfo != null) {\n deepAssign(appPlist, extendInfo)\n }\n for (const [k, v] of Object.entries(appPlist)) {\n if (v === null || v === undefined) {\n delete appPlist[k]\n }\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean, platformType?: PlatformType): Promise<SigningResult> {\n const targetPlatform: PlatformType = platformType ?? (packContext.electronPlatformName === \"mas\" ? \"mas\" : \"mac\")\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<Array<SigningResult>> => {\n const normalizedSourceDirectory = path.resolve(sourceDirectory)\n MacTargetHelper.assertSafePathForCommandUsage(normalizedSourceDirectory, \"application output directory\")\n return await Promise.all(\n directories\n .filter(file => shouldSign(file))\n .map(async (file: string) => {\n const entryName = path.basename(file)\n if (file !== entryName) {\n throw new InvalidConfigurationError(`Invalid entry name in source directory: ${file}`)\n }\n const signTarget = path.resolve(normalizedSourceDirectory, entryName)\n const safeSignTarget = sanitizeDirPath(signTarget, normalizedSourceDirectory)\n return await this.sign(safeSignTarget, packContext.arch, targetPlatform)\n })\n )\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n // the combined result gates the `afterSign` hook — a signed result wins (see PlatformPackager.doSignAfterPack)\n const results = await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return combineSignResults(results)\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n results.push(...(await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))))\n\n return combineSignResults(results)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macPackager.js","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC/C,OAAO,EACL,IAAI,EAEJ,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,WAAW,EACX,MAAM,EACN,aAAa,EACb,yBAAyB,EACzB,eAAe,EACf,GAAG,EACH,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,GAAG,GACJ,MAAM,cAAc,CAAA;AACrB,OAAO,E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BAAkB,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC;QAED,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAA;QAC1F,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,oBAAoB,CAAC,eAAe,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QAEnJ,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;CACF","sourcesContent":["import { createRequire } from \"node:module\"\nimport type { SignOptions } from \"@electron/osx-sign\"\n\nconst _require = createRequire(import.meta.url)\nimport {\n Arch,\n AsyncTaskManager,\n copyFile,\n deepAssign,\n exec,\n Executables,\n exists,\n getArchSuffix,\n InvalidConfigurationError,\n isEmptyOrSpaces,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n unlinkIfExists,\n use,\n} from \"builder-util\"\nimport { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport * as fs from \"fs/promises\"\nimport { mkdir, readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { AppInfo } from \"./appInfo.js\"\nimport { embedAsarIntegrityDigest, FIRST_ELECTRON_MAJOR_WITH_ASAR_INTEGRITY_DIGEST } from \"./electron/mac/asarIntegrityDigest.js\"\nimport { assertSafeHelperName } from \"./electron/mac/electronMacUtils.js\"\nimport { forceCodeSigningError, forceCodeSigningOverrideHint, VERIFICATION_FAILED_ERROR_CODE } from \"./codeSign/forceCodeSigning.js\"\nimport { isAutoDiscoveryCodeSignIdentity } from \"./util/flags.js\"\nimport { CodeSigningInfo, createKeychain, CreateKeychainOptions, Identity, isSignAllowed, macSigningUnavailableError, removeKeychain, sign } from \"./codeSign/mac/macCodeSign.js\"\nimport { validateStapledTicket, verifyMacCodeSignature } from \"./codeSign/mac/macSignatureVerifier.js\"\nimport { combineSignResults, isSignResultSigned, SigningResult } from \"./codeSign/signResult.js\"\nimport { DIR_TARGET, Platform, Target } from \"./core.js\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index.js\"\nimport { MacTargetHelper, MasPlatformType, PlatformType } from \"./targets/mac/MacTargetHelper.js\"\nimport { ElectronSignOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions.js\"\nimport { AsarOptions } from \"./options/PlatformSpecificBuildOptions.js\"\nimport { Packager } from \"./packager.js\"\nimport type { PlannedTargets } from \"./packagerApi.js\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager.js\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget.js\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/mac/pkg.js\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory.js\"\nimport { isPlainObject, replaceMergedExcludedExts } from \"./util/config/fileOptions.js\"\nimport { isMacOsHighSierra } from \"./util/mac/macosVersion.js\"\nimport { buildSingleArchFilesPattern, collectIdenticalSingleArchMachOFiles, collectSingleArchPackageNames } from \"./util/archCompatibility.js\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander.js\"\nimport { resolveFunction } from \"./util/resolve.js\"\nimport { makeUniversalApp } from \"@electron/universal\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nfunction isElectronSignOptions(sign: MacConfiguration[\"sign\"]): sign is ElectronSignOptions {\n return typeof sign === \"object\" && sign !== null\n}\n\n/**\n * Merges the mac → mas (→ masDev) cascade. `deepAssign` merges a later layer into a nested object it took from an earlier one, so each\n * layer's `fileOptions` is copied first: merging the mas configuration must not change the `fileOptions` of the mac one. A later layer's\n * `fileOptions.excludedExts` replaces an earlier one (see replaceMergedExcludedExts).\n */\nfunction mergeMasConfig(...layers: Array<MacConfiguration | MasConfiguration | Nullish>): MasConfiguration {\n const config: MasConfiguration = deepAssign({}, ...layers.map(it => (it != null && isPlainObject(it.fileOptions) ? { ...it, fileOptions: { ...it.fileOptions } } : it)))\n replaceMergedExcludedExts(config, layers)\n return config\n}\n\ninterface PlatformConfig<C extends MacConfiguration | MasConfiguration = MacConfiguration | MasConfiguration> {\n type: PlatformType\n config: C\n platformName: ElectronPlatformName\n}\n\nexport class MacPackager extends PlatformPackager<MacConfiguration | MasConfiguration> {\n readonly codeSigningInfo = new MemoLazy<CreateKeychainOptions | null, CodeSigningInfo>(\n () => {\n const cscLink = this.getCscLink()\n if (cscLink == null || process.platform !== \"darwin\") {\n return null\n }\n\n const selected = {\n tmpDir: this.tempDirManager,\n cscLink,\n cscKeyPassword: this.getCscPassword(),\n cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),\n cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),\n currentDir: this.projectDir,\n }\n\n return selected\n },\n async selected => {\n if (selected) {\n return createKeychain(selected).then(result => {\n const keychainFile = result.keychainFile\n if (keychainFile != null) {\n this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))\n }\n return result\n })\n }\n\n return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })\n }\n )\n\n private _iconPath = new Lazy(() => this.getOrConvertIcon(\"icns\"))\n\n readonly helper = new MacTargetHelper(this)\n\n constructor(info: Packager) {\n super(info, Platform.MAC)\n info.onTargetsCreated(plans => this.checkForceCodeSigningAtBuildStart(plans))\n }\n\n /**\n * Fails a forceCodeSigning build at build start, before anything is packed, when the macOS app could not be signed or\n * notarized: on a host other than macOS, in a pull-request build without CSC_FOR_PULL_REQUEST, or without notarization\n * credentials; and a build with `mac.notarize: true` without notarization credentials, where notarization can happen.\n * sign() and notarizeIfProvided keep their own checks for callers that never emit `targetsCreated`.\n */\n private checkForceCodeSigningAtBuildStart(plans: ReadonlyArray<PlannedTargets>): void {\n const ownPlans = plans.filter(it => it.packager === this)\n // each flavor that is built, with its own forceCodeSigning: the macOS app (and its pkg), and every MAS target\n const flavors = new Set<PlatformType>()\n for (const { targets } of ownPlans) {\n if (MacPackager.packsNonMasApp(targets) || targets.some(it => it.name === \"pkg\")) {\n flavors.add(\"mac\")\n }\n for (const target of targets) {\n if (MacTargetHelper.isMasTarget(target.name)) {\n flavors.add(MacTargetHelper.getPlatformTypeFromTarget(target.name))\n }\n }\n }\n for (const flavor of flavors) {\n if (!this.forceCodeSigningFor(flavor)) {\n continue\n }\n const unavailable = macSigningUnavailableError(flavor === \"mac\" ? \"the macOS app\" : `the ${flavor} app`, this.forceCodeSigningOverrideHintFor(flavor))\n if (unavailable != null) {\n throw unavailable\n }\n }\n if (!flavors.has(\"mac\")) {\n return\n }\n // the non-MAS app is notarized when it is packed (never for a prepackaged one), and the pkg installer always\n const prepackaged = this.packagerOptions.prepackaged != null\n const packsApp = ownPlans.some(({ targets }) => !prepackaged && MacPackager.packsNonMasApp(targets))\n const packsPkg = ownPlans.some(({ targets }) => targets.some(it => it.name === \"pkg\"))\n const notarize = this.platformSpecificBuildOptions.notarize\n if ((!packsApp && !packsPkg) || notarize === false) {\n return\n }\n // the credentials are read (getNotarizeOptions also rejects an incomplete set) only where they are required\n if (this.forceCodeSigning) {\n if (MacTargetHelper.getNotarizeOptions(\"\") == null) {\n throw MacTargetHelper.missingNotarizationCredentialsError()\n }\n return\n }\n // notarize: true requires notarization where it runs: the app only when sign() signs it, the pkg installer whenever it is built\n if (!MacTargetHelper.isNotarizationRequired(notarize) || (!packsPkg && this.isMacSigningSkippedByConfiguration())) {\n return\n }\n if (MacTargetHelper.getNotarizeOptions(\"\") == null) {\n throw MacTargetHelper.notarizeTrueWithoutCredentialsError()\n }\n }\n\n /**\n * `forceCodeSigning` of a flavor: `mas` and `mas-dev` cascade `mac` → `mas` → `masDev` like every other option (see\n * getPlatformConfig), then the root value. For `mac` it is {@link forceCodeSigning}.\n */\n forceCodeSigningFor(platformType: PlatformType): boolean {\n if (platformType === \"mac\") {\n return this.forceCodeSigning\n }\n return this.getPlatformConfig(platformType).config.forceCodeSigning ?? this.config.forceCodeSigning ?? false\n }\n\n /** The `-c` override that turns `forceCodeSigning` off for a flavor: on the most specific block that sets it. */\n forceCodeSigningOverrideHintFor(platformType: PlatformType): string {\n if (platformType === \"mas-dev\" && this.config.masDev?.forceCodeSigning != null) {\n return \"-c.masDev.forceCodeSigning=false\"\n }\n if (platformType !== \"mac\" && this.config.mas?.forceCodeSigning != null) {\n return \"-c.mas.forceCodeSigning=false\"\n }\n return forceCodeSigningOverrideHint(this)\n }\n\n /**\n * Whether sign() skips the macOS app because of the configuration, before it would notarize it: `sign: null`, `sign.identity: null`,\n * or `CSC_IDENTITY_AUTO_DISCOVERY=false` without an identity (`sign.identity` or `CSC_NAME`) or a custom signer.\n */\n private isMacSigningSkippedByConfiguration(): boolean {\n const signConfig = this.platformSpecificBuildOptions.sign\n if (signConfig === null) {\n return true\n }\n const signOpts = isElectronSignOptions(signConfig) ? signConfig : undefined\n if (signConfig != null && signOpts == null) {\n // a custom signer is called without an identity too\n return false\n }\n if (signOpts?.identity === null) {\n return true\n }\n return isEmptyOrSpaces(signOpts?.identity ?? process.env.CSC_NAME) && !isAutoDiscoveryCodeSignIdentity()\n }\n\n /** Whether `pack` builds the non-MAS app: unless every target is a MAS one. No target at all is a dir build. */\n private static packsNonMasApp(targets: ReadonlyArray<Target>): boolean {\n // Mirror master's condition: skip the non-MAS darwin pack only when there are exclusively MAS\n // targets (hasMas=true, targets.length=1). DIR_TARGET passes targets=[] to pack() because\n // MacPackager.createTargets() doesn't call mapper() for it, so hasMas=false and doPack still runs.\n return !targets.some(it => MacTargetHelper.isMasTarget(it.name)) || targets.length > 1\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\n }\n\n /**\n * Get the merged configuration for a specific platform type. Calls statically known to be a MAS\n * flavor (`mas` / `mas-dev`) get a `MasConfiguration` back, so no cast is needed downstream.\n */\n getPlatformConfig(platformType: MasPlatformType): PlatformConfig<MasConfiguration>\n getPlatformConfig(platformType: PlatformType): PlatformConfig\n getPlatformConfig(platformType: PlatformType): PlatformConfig {\n let config: MacConfiguration | MasConfiguration\n let platformName: ElectronPlatformName\n\n switch (platformType) {\n case \"mas\":\n config = mergeMasConfig(this.platformSpecificBuildOptions, this.config.mas)\n platformName = \"mas\"\n break\n\n case \"mas-dev\":\n // `mas-dev` cascades mac → mas → masDev. The development/distribution distinction is no longer\n // carried as a config field; it is derived from `platformType` wherever signing happens.\n config = mergeMasConfig(this.platformSpecificBuildOptions, this.config.mas, this.config.masDev)\n platformName = \"mas\"\n break\n\n case \"mac\":\n default:\n config = this.platformSpecificBuildOptions\n platformName = this.platform.nodeName as ElectronPlatformName\n break\n }\n\n return { type: platformType, config, platformName }\n }\n\n expandArch(pattern: string, arch?: Arch | null): string[] {\n if (arch === Arch.universal) {\n // Universal build has `app-x64.asar.unpacked` & `app-arm64.asar.unpacked`\n return [doExpandMacro(pattern, Arch[Arch.arm64], this.appInfo, {}, false), doExpandMacro(pattern, Arch[Arch.x64], this.appInfo, {}, false)]\n }\n // Every other build keeps the name as `app.asar.unpacked`\n return [doExpandMacro(pattern, null, this.appInfo, {}, false)]\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected prepareAppInfo(appInfo: AppInfo): AppInfo {\n const macAppInfo = new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions)\n // Electron discovers its helper apps via `${CFBundleName} Helper.app`. We use the product name\n // verbatim for `CFBundleName` and for the on-disk helper/app bundle names, so a name that\n // filename sanitization would change must be rejected (otherwise the two would diverge and break\n // helper discovery). Fail fast during setup.\n assertSafeHelperName(macAppInfo.productName, \"productName\")\n const executableName = this.platformSpecificBuildOptions.executableName ?? this.info.config.executableName\n if (executableName != null) {\n assertSafeHelperName(executableName, \"executableName\")\n }\n return macAppInfo\n }\n\n async getIconPath(): Promise<string | null> {\n return this._iconPath.value\n }\n\n createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void {\n for (const name of targets) {\n switch (name) {\n case DIR_TARGET:\n break\n\n case \"dmg\": {\n mapper(name, outDir => {\n const { DmgTarget } = _require(\"dmg-builder\")\n return new DmgTarget(this, outDir)\n })\n break\n }\n\n case \"zip\":\n // https://github.com/electron-userland/electron-builder/issues/2313\n mapper(name, outDir => new ArchiveTarget(name, outDir, this, true))\n break\n\n case \"pkg\":\n mapper(name, outDir => new PkgTarget(this, outDir))\n break\n\n default:\n mapper(name, outDir => (MacTargetHelper.isMasTarget(name) ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n if (config.arch === Arch.universal) {\n return this.doUniversalPack(config)\n }\n return await super.doPack(config)\n }\n\n /**\n * Handle universal build packing\n */\n private async doUniversalPack(config: DoPackOptions<MacConfiguration>): Promise<void> {\n const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets } = config\n\n const outDirName = (arch: Arch) => `${appOutDir}-${Arch[arch]}-temp`\n const options = {\n ...config,\n options: {\n sign: false,\n disableAsarIntegrity: true,\n disableFuses: true,\n // Keep both slices symmetric: don't drop platform-mismatched modules per-arch (that asymmetry breaks\n // the universal merge). Single-arch binaries are reconciled below via `computeSingleArchFiles`.\n disableArchFilter: true,\n },\n }\n\n const x64Arch = Arch.x64\n const x64AppOutDir = outDirName(x64Arch)\n await super.doPack({ ...options, appOutDir: x64AppOutDir, arch: x64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const arm64Arch = Arch.arm64\n const arm64AppOutPath = outDirName(arm64Arch)\n await super.doPack({ ...options, appOutDir: arm64AppOutPath, arch: arm64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n const appFile = `${this.appInfo.productFilename}.app`\n\n // Make sure the Assets.car file is the same for both architectures\n const safeX64AppOutDir = sanitizeDirPath(x64AppOutDir)\n const safeArm64AppOutPath = sanitizeDirPath(arm64AppOutPath)\n const safeAppOutDir = sanitizeDirPath(appOutDir)\n\n const sourceCatalogPath = path.join(safeX64AppOutDir, appFile, \"Contents/Resources/Assets.car\")\n if (await exists(sourceCatalogPath)) {\n const targetCatalogPath = path.join(safeArm64AppOutPath, appFile, \"Contents/Resources/Assets.car\")\n await fs.copyFile(sourceCatalogPath, targetCatalogPath)\n }\n\n const universalOpts = platformSpecificBuildOptions.universal\n\n // Single-arch binaries that can't be merged into a universal Mach-O. Two sources:\n // 1. `cpu`/`os`-declared platform packages (e.g. `@esbuild/darwin-arm64`), which the collection filter\n // confines to their native slice — mark the whole package so unique non-binary siblings don't trip the merge.\n // 2. Host binaries identical in both slices inside packages that declare no `cpu`/`os` (e.g. esbuild's\n // install script overwriting `esbuild/bin/esbuild` with the platform binary) — mark the file.\n // Both are reported to `@electron/universal` via `singleArchFiles`; otherwise it aborts on the arch mismatch.\n const singleArchFiles = await this.computeSingleArchFiles(\n path.join(safeX64AppOutDir, appFile),\n path.join(safeArm64AppOutPath, appFile),\n universalOpts?.singleArchFiles ?? undefined\n )\n\n await makeUniversalApp({\n mergeASARs: true, // preserve electron-builder v2 default; user can override via mac.universal.mergeASARs\n ...universalOpts,\n singleArchFiles,\n x64AppPath: path.join(safeX64AppOutDir, appFile),\n arm64AppPath: path.join(safeArm64AppOutPath, appFile),\n outAppPath: path.join(safeAppOutDir, appFile),\n force: true,\n })\n await fs.rm(x64AppOutDir, { recursive: true, force: true })\n await fs.rm(arm64AppOutPath, { recursive: true, force: true })\n\n // Give users a final opportunity to perform things on the combined universal package before signing\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n await this.info.emitAfterPack(packContext)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.doAddAsarIntegrityDigest(packContext, platformSpecificBuildOptions, await this.computeAsarOptions(platformSpecificBuildOptions))\n await this.doAddElectronFuses(packContext)\n\n // Mirror the base-class guard: skip signing when the caller explicitly set sign:false\n // (e.g. packMasTargets passes sign:false so that its own sign() call is the sole signing step).\n if (config.options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n /**\n * Embeds the ASAR integrity digest into the Electron Framework, see `mac.asarIntegrityDigest`. A universal app gets it after the slices are merged: they\n * have no `ElectronAsarIntegrity` entries, and re-signing the framework of a slice would make the slices differ in a way `@electron/universal` rejects.\n */\n protected async doAddAsarIntegrityDigest(\n packContext: AfterPackContext,\n platformSpecificBuildOptions: MacConfiguration | MasConfiguration,\n asarOptions: AsarOptions | null\n ): Promise<void> {\n // nothing to protect without the entries electron-builder computes: a stock Electron Info.plist still lists the removed default_app.asar\n if (asarOptions == null || asarOptions.disableIntegrity) {\n return\n }\n if (platformSpecificBuildOptions.asarIntegrityDigest === false) {\n log.info({ reason: \"asarIntegrityDigest is set to false\" }, \"skipped ASAR integrity digest\")\n return\n }\n const electronVersion = semver.coerce(this.info.framework.version)\n if (electronVersion == null || semver.major(electronVersion) < FIRST_ELECTRON_MAJOR_WITH_ASAR_INTEGRITY_DIGEST) {\n return\n }\n if (process.platform !== \"darwin\") {\n log.warn({ reason: \"supported only on macOS, where codesign can sign the modified Electron Framework again\" }, \"skipped ASAR integrity digest\")\n return\n }\n const frameworkName = `${path.basename(this.info.framework.distMacOsAppName, \".app\")} Framework`\n const embedded = await embedAsarIntegrityDigest(path.join(packContext.appOutDir, `${this.appInfo.productFilename}.app`), frameworkName)\n // an afterPack hook that signs the app or changes it in ways the digest must not cover is where this change bites\n if (embedded && this.info.filterPackagerEventListeners(\"afterPack\", \"user\").length > 0) {\n log\n .once(\"asar-integrity-digest-after-afterpack\")\n .warn(\n { solution: \"set mac.asarIntegrityDigest to false if your afterPack hook signs the app\" },\n \"electron-builder v27 embeds the ASAR integrity digest into the Electron Framework after the afterPack hook and signs the framework again ad hoc, replacing a signature applied in afterPack. \" +\n \"Changing app.asar or Info.plist after afterPack now fails the app at launch when the enableEmbeddedAsarIntegrityValidation fuse is on. \" +\n \"See https://www.electron.build/docs/migration/v27-runtime-changes#macos-asar-integrity-digest\"\n )\n }\n }\n\n /**\n * Builds the `singleArchFiles` glob passed to `@electron/universal` by scanning both packed slices for\n * single-architecture binaries that can't be lipo-merged. Merges any user-provided `mac.universal.singleArchFiles`.\n */\n private async computeSingleArchFiles(x64AppPath: string, arm64AppPath: string, userPattern: string | undefined): Promise<string | undefined> {\n const unpacked = (appPath: string) => path.join(appPath, \"Contents\", \"Resources\", \"app.asar.unpacked\")\n const x64Unpacked = unpacked(x64AppPath)\n const arm64Unpacked = unpacked(arm64AppPath)\n\n // (1) `cpu`/`os`-declared platform packages confined to one slice — mark the whole package.\n const packageNames = new Set<string>()\n await collectSingleArchPackageNames(path.join(x64Unpacked, \"node_modules\"), packageNames)\n await collectSingleArchPackageNames(path.join(arm64Unpacked, \"node_modules\"), packageNames)\n\n // (2) undeclared host binaries identical in both slices (e.g. `esbuild/bin/esbuild`) — mark the file.\n const machOFiles = await collectIdenticalSingleArchMachOFiles(x64Unpacked, arm64Unpacked)\n\n const patterns = [...Array.from(packageNames).map(name => `**/${name}/**`), ...machOFiles]\n if (patterns.length === 0) {\n return userPattern\n }\n\n log.warn(\n { packages: Array.from(packageNames).sort().join(\", \") || \"(none)\", files: machOFiles.sort().join(\", \") || \"(none)\" },\n \"Universal build contains single-architecture binaries; they are copied as-is per slice (not lipo-merged), so each is only usable on architectures whose platform package was installed on this build host. \" +\n \"If these are build-only tools (e.g. esbuild), move them to `devDependencies` or exclude them via `files` to omit them entirely. \" +\n \"If they are needed at runtime, install every target architecture's variant so the universal app works on both Intel and Apple Silicon (pnpm/yarn: `supportedArchitectures`; npm: `--cpu`/`--os`).\"\n )\n return buildSingleArchFilesPattern(patterns, userPattern)\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const masTargets = targets.filter(it => MacTargetHelper.isMasTarget(it.name))\n const nonMasTargets = targets.filter(it => !MacTargetHelper.isMasTarget(it.name))\n const prepackaged = this.packagerOptions.prepackaged\n\n // mas always first\n await this.packMasTargets(outDir, arch, masTargets, prepackaged)\n\n if (MacPackager.packsNonMasApp(targets)) {\n await this.packMacTargets(outDir, arch, nonMasTargets, prepackaged, taskManager)\n }\n }\n\n private async packMasTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined): Promise<void> {\n const resolvedOutDir = path.resolve(outDir)\n MacTargetHelper.assertSafePathForCommandUsage(resolvedOutDir, \"output directory\")\n\n for (const target of targets) {\n const platformType = MacTargetHelper.getPlatformTypeFromTarget(target.name)\n const platformConfig = this.getPlatformConfig(platformType)\n const targetOutDir = path.resolve(resolvedOutDir, `${target.name}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n MacTargetHelper.assertSafePathForCommandUsage(targetOutDir, \"target output directory\")\n\n const relativeTargetOutDir = path.relative(resolvedOutDir, targetOutDir)\n if (relativeTargetOutDir.startsWith(\"..\") || path.isAbsolute(relativeTargetOutDir)) {\n throw new InvalidConfigurationError(`Invalid target output directory: ${targetOutDir}`)\n }\n\n let appPath: string = path.join(targetOutDir, `${this.appInfo.productFilename}.app`)\n if (prepackaged != null) {\n appPath = prepackaged\n } else {\n await this.doPack({\n outDir: resolvedOutDir,\n appOutDir: targetOutDir,\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets: [target],\n options: { sign: false },\n })\n MacTargetHelper.assertSafePathForCommandUsage(this.appInfo.productFilename, \"product filename\")\n }\n const signResult = await this.sign(appPath, arch, platformType)\n const signed = isSignResultSigned(signResult)\n\n // The MAS flow packs with sign:false and signs here, bypassing doSignAfterPack — the only other\n // emitAfterSign site. Mirror its contract: fire afterSign after codesigning succeeded, but before\n // the .pkg installer is built, and warn when signing was skipped (#9997).\n const packContext: AfterPackContext = {\n appOutDir: path.dirname(appPath),\n outDir: resolvedOutDir,\n arch,\n targets: [target],\n packager: this,\n electronPlatformName: platformConfig.platformName,\n }\n if (signed) {\n await this.info.emitAfterSign(packContext)\n } else if (this.info.filterPackagerEventListeners(\"afterSign\", \"user\").length) {\n log.warn(null, `skipping \"afterSign\" hook as no signing occurred, perhaps you intended \"afterPack\"?`)\n }\n\n // test-only early exit (see PackagerOptions.afterPackTestHook); a no-op unless the option is set\n if (await this.info.shouldSkipTargetsAfterPack(packContext)) {\n continue\n }\n\n // A development-signed build (mas-dev, or an explicit sign.type \"development\" — see\n // MacTargetHelper.shouldCreateMasInstaller) produces no installer\n const masSignConfig = platformConfig.config.sign\n const masSignOpts = isElectronSignOptions(masSignConfig) ? masSignConfig : undefined\n if (signed && MacTargetHelper.shouldCreateMasInstaller(platformType, masSignOpts?.type)) {\n await this.createMasInstaller(appPath, targetOutDir, arch, platformType)\n }\n }\n }\n\n private async packMacTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined, taskManager: AsyncTaskManager): Promise<void> {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${path.basename(this.appInfo.productFilename)}.app`) : prepackaged\n\n if (prepackaged == null) {\n const platformConfig = this.getPlatformConfig(\"mac\")\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets,\n })\n } else if (this.forceCodeSigning) {\n await this.verifyPrepackagedApp(appPath)\n }\n\n // test-only early exit (see PackagerOptions.afterPackTestHook); a no-op unless the option is set\n if (\n await this.info.shouldSkipTargetsAfterPack({\n appOutDir: path.dirname(appPath),\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: this.platform.nodeName,\n })\n ) {\n return\n }\n\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n\n /**\n * electron-builder neither signs nor notarizes a prepackaged app, so under forceCodeSigning the app it packages must\n * already carry a valid signature - and a stapled notarization ticket, unless `mac.notarize` is false.\n */\n private async verifyPrepackagedApp(appPath: string): Promise<void> {\n const unavailable = macSigningUnavailableError(`the prepackaged app ${log.filePath(appPath)}`, forceCodeSigningOverrideHint(this))\n if (unavailable != null) {\n throw unavailable\n }\n const signConfig = this.platformSpecificBuildOptions.sign\n const problem = await verifyMacCodeSignature(appPath, { deep: true, strict: isElectronSignOptions(signConfig) ? signConfig.strictVerify : undefined })\n if (problem != null) {\n throw forceCodeSigningError(\n `forceCodeSigning is enabled, but the prepackaged app ${log.filePath(appPath)} has no valid code signature (codesign --verify --deep: ${problem}). ` +\n \"electron-builder does not sign a prepackaged app: sign it before packaging it.\",\n VERIFICATION_FAILED_ERROR_CODE\n )\n }\n if (this.platformSpecificBuildOptions.notarize === false) {\n log.warn(\n { file: log.filePath(appPath), reason: \"`notarize` is set to false\" },\n \"the notarization of the prepackaged app is not verified although forceCodeSigning is enabled\"\n )\n return\n }\n const ticketProblem = await validateStapledTicket(appPath)\n if (ticketProblem != null) {\n throw forceCodeSigningError(\n `forceCodeSigning is enabled, but the prepackaged app ${log.filePath(appPath)} has no valid stapled notarization ticket (stapler validate: ${ticketProblem}). ` +\n \"Notarize and staple it before packaging it, or set mac.notarize: false.\",\n VERIFICATION_FAILED_ERROR_CODE\n )\n }\n }\n\n /**\n * Creates the signed MAS installer .pkg for an already codesigned app. Kept separate from `sign()`\n * so that the `afterSign` hook can run between codesigning and installer creation (see `packMasTargets`).\n */\n protected async createMasInstaller(appPath: string, outDir: string, arch: Arch, targetPlatform: MasPlatformType): Promise<void> {\n const config = this.getPlatformConfig(targetPlatform).config\n const signConfig = config.sign\n const signOpts = isElectronSignOptions(signConfig) ? signConfig : undefined\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n await this.helper.createMasInstaller(appPath, outDir, config, keychainFile, targetPlatform, arch, signOpts?.identity)\n }\n\n /**\n * Main signing method with platform awareness. Protected so tests can stub signing\n * (`isSignAllowed()` short-circuits it on non-mac hosts). Failures are thrown, never returned.\n */\n protected async sign(appPath: string, arch: Arch, targetPlatform: PlatformType): Promise<SigningResult> {\n const forceCodeSigning = this.forceCodeSigningFor(targetPlatform)\n if (forceCodeSigning) {\n // checked before isSignAllowed, which would log that signing is skipped right before this fails the build\n const unavailable = macSigningUnavailableError(`the ${targetPlatform} app ${log.filePath(appPath)}`, this.forceCodeSigningOverrideHintFor(targetPlatform))\n if (unavailable != null) {\n throw unavailable\n }\n }\n if (!isSignAllowed()) {\n // non-mac host, or the pull-request CI guard — signing cannot happen in this environment\n return \"skipped:unsupported\"\n }\n\n // getPlatformConfig cascades mac → mas → masDev, so `sign` (and `sign.identity`) is already merged for this flavor.\n const config = this.getPlatformConfig(targetPlatform).config.sign\n\n // sign: null → user explicitly disabled signing\n if (config === null) {\n return this.helper.handleNullIdentity(targetPlatform)\n }\n\n const signOpts = isElectronSignOptions(config) ? config : undefined\n // sign.identity: null → explicit skip; undefined → auto-discover\n const qualifier = signOpts?.identity\n if (qualifier === null) {\n return this.helper.handleNullIdentity(targetPlatform)\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n // `config` is a custom fn/string module path when it's non-null and not an options object\n const hasCustomSign = config != null && !signOpts\n const isMas = MacTargetHelper.isMasTarget(targetPlatform)\n\n const identity = await this.helper.findSigningIdentity(targetPlatform, qualifier, keychainFile, hasCustomSign, signOpts)\n\n // A custom signer is called without a keychain identity too (a remote or HSM signer needs none); under forceCodeSigning\n // its output is verified below. @electron/osx-sign needs one, and so does the installer of a MAS app (createMasInstaller), so\n // a MAS app is only signed without one under forceCodeSigning, which fails on the missing installer identity instead.\n if (!identity) {\n if (!hasCustomSign) {\n return \"skipped:no-certificate\"\n }\n // mas-dev builds no installer, so its custom signer is called without an identity too\n if (!forceCodeSigning && MacTargetHelper.shouldCreateMasInstaller(targetPlatform, undefined)) {\n log.warn(\n { file: log.filePath(appPath), reason: \"no keychain identity was found, and the MAS installer needs one\" },\n \"the custom mac.sign signer is not called for the MAS app, which is left unsigned\"\n )\n return \"skipped:no-certificate\"\n }\n log.info({ file: log.filePath(appPath), reason: \"no keychain identity was found\" }, \"calling the custom mac.sign signer without an identity\")\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n const signOptions = await this.helper.buildSignOptions(appPath, identity, signOpts, keychainFile, arch, targetPlatform, hasCustomSign)\n await this.doSign(signOptions, config, identity)\n\n // @electron/osx-sign verifies the signatures it makes; a custom signer replaces it, so its output is checked here\n if (hasCustomSign && forceCodeSigning) {\n const problem = await verifyMacCodeSignature(appPath, { deep: true })\n if (problem != null) {\n throw forceCodeSigningError(\n `forceCodeSigning is enabled, but the custom mac.sign signer left ${log.filePath(appPath)} without a valid code signature (codesign --verify --deep --strict: ${problem}). ` +\n \"The signer must sign the app at configuration.app in place.\",\n VERIFICATION_FAILED_ERROR_CODE\n )\n }\n }\n\n // now that everything is signed, flag binaries that still carry a foreign (or missing) signature and would\n // fail library validation at launch — the case the old blanket entitlements default used to mask\n if (!hasCustomSign) {\n await this.helper.warnAboutForeignSignedBinaries(appPath, identity, targetPlatform, signOpts)\n }\n\n // Handle notarization for non-MAS builds\n if (!isMas) {\n await this.helper.notarizeIfProvided(appPath)\n }\n\n return hasCustomSign ? \"signed:custom\" : \"signed\"\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, signConfig: MacConfiguration[\"sign\"], identity: Identity | null): Promise<void> {\n // Resolve a custom signer only when signConfig is a function or string module path.\n // ElectronSignOptions objects and undefined use @electron/osx-sign directly.\n const customSign =\n signConfig == null || isElectronSignOptions(signConfig) ? null : await resolveFunction(this.appInfo.type, signConfig, \"sign\", await this.info.getWorkspaceRoot())\n\n const { app, platform, type, provisioningProfile } = opts\n log.info(\n {\n file: log.filePath(app),\n platform,\n type,\n identityName: identity?.name || \"none\",\n identityHash: identity?.hash || \"none\",\n provisioningProfile: provisioningProfile || \"none\",\n },\n customSign ? \"executing custom sign\" : \"signing\"\n )\n\n // `opts.identity` is resolved once, in MacTargetHelper.resolveSignIdentity — never re-derive it here, or a\n // custom signer and @electron/osx-sign end up signing with different forms of the same certificate\n return customSign ? Promise.resolve(customSign(opts, this)) : sign(opts)\n }\n\n //noinspection JSMethodCanBeStatic\n public async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n const safeAppPath = sanitizeDirPath(appPath)\n const safeOutFile = sanitizeDirPath(outFile)\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(safeOutFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", safeAppPath, \"/Applications\")\n args.push(safeOutFile)\n return await exec(Executables.resolve(\"productbuild\"), args)\n }\n\n public getElectronSrcDir(dist: string) {\n return path.resolve(this.projectDir, dist, this.info.framework.distMacOsAppName)\n }\n\n public getElectronDestinationDir(appOutDir: string) {\n return path.join(appOutDir, this.info.framework.distMacOsAppName)\n }\n\n // todo fileAssociations\n async applyCommonInfo(appPlist: any, contentsPath: string, cascadedOptions: MacConfiguration | MasConfiguration): Promise<void> {\n const appInfo = this.appInfo\n const appFilename = appInfo.productFilename\n\n // https://github.com/electron-userland/electron-builder/issues/1278\n appPlist.CFBundleExecutable = appFilename.endsWith(\" Helper\") ? appFilename.substring(0, appFilename.length - \" Helper\".length) : appFilename\n\n const resourcesPath = path.join(contentsPath, \"Resources\")\n\n // Support both legacy `.icns` and modern `.icon` (Icon Composer) inputs via `mac.icon`.\n // Prefer `.icon` if provided; still accept `.icns`.\n const configuredIcon = this.platformSpecificBuildOptions.icon\n const isIconComposer = typeof configuredIcon === \"string\" && configuredIcon.toLowerCase().endsWith(\".icon\")\n\n // Set the app name. The product name is used verbatim (it is validated in `prepareAppInfo` to\n // require no filename sanitization), so `CFBundleName` matches the on-disk helper bundle names\n // that Electron resolves as `${CFBundleName} Helper.app`.\n appPlist.CFBundleName = appInfo.productName\n appPlist.CFBundleDisplayName = appInfo.productName\n\n // Bundle legacy `icns` format - this should also run when `.icon` is provided\n const setIcnsFile = async (iconPath: string) => {\n const oldIcon = appPlist.CFBundleIconFile\n if (oldIcon != null) {\n await unlinkIfExists(path.join(resourcesPath, oldIcon))\n }\n const iconFileName = \"icon.icns\"\n appPlist.CFBundleIconFile = iconFileName\n await copyFile(iconPath, path.join(resourcesPath, iconFileName))\n }\n\n const icnsFilePath = await this.getIconPath()\n if (icnsFilePath != null) {\n await setIcnsFile(icnsFilePath)\n }\n\n // Bundle new `icon` format\n if (isIconComposer && configuredIcon) {\n const iconComposerPath = await this.getResource(configuredIcon)\n if (iconComposerPath) {\n const { assetCatalog } = await this.generateAssetCatalogData(iconComposerPath)\n\n // Create and setup the asset catalog\n appPlist.CFBundleIconName = \"Icon\"\n await fs.writeFile(path.join(resourcesPath, \"Assets.car\"), assetCatalog)\n }\n }\n\n const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion\n if (minimumSystemVersion != null) {\n appPlist.LSMinimumSystemVersion = minimumSystemVersion\n }\n\n // const activeOpts = this.getPlatformConfig(distType).config\n appPlist.CFBundleShortVersionString = cascadedOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = cascadedOptions.bundleVersion || appInfo.buildVersion\n\n use(this.platformSpecificBuildOptions.category || (this.config as any).category, it => (appPlist.LSApplicationCategoryType = it))\n appPlist.NSHumanReadableCopyright = appInfo.copyright\n\n if (this.platformSpecificBuildOptions.darkModeSupport) {\n appPlist.NSRequiresAquaSystemAppearance = false\n }\n\n const extendInfo = this.platformSpecificBuildOptions.extendInfo\n if (extendInfo != null) {\n deepAssign(appPlist, extendInfo)\n }\n for (const [k, v] of Object.entries(appPlist)) {\n if (v === null || v === undefined) {\n delete appPlist[k]\n }\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean, platformType?: PlatformType): Promise<SigningResult> {\n const targetPlatform: PlatformType = platformType ?? (packContext.electronPlatformName === \"mas\" ? \"mas\" : \"mac\")\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<Array<SigningResult>> => {\n const normalizedSourceDirectory = path.resolve(sourceDirectory)\n MacTargetHelper.assertSafePathForCommandUsage(normalizedSourceDirectory, \"application output directory\")\n return await Promise.all(\n directories\n .filter(file => shouldSign(file))\n .map(async (file: string) => {\n const entryName = path.basename(file)\n if (file !== entryName) {\n throw new InvalidConfigurationError(`Invalid entry name in source directory: ${file}`)\n }\n const signTarget = path.resolve(normalizedSourceDirectory, entryName)\n const safeSignTarget = sanitizeDirPath(signTarget, normalizedSourceDirectory)\n return await this.sign(safeSignTarget, packContext.arch, targetPlatform)\n })\n )\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n // the combined result gates the `afterSign` hook — a signed result wins (see PlatformPackager.doSignAfterPack)\n const results = await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return combineSignResults(results)\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n results.push(...(await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))))\n\n return combineSignResults(results)\n }\n}\n"]}
|
|
@@ -97,7 +97,7 @@ export interface AsarOptions {
|
|
|
97
97
|
* Which files are copied into the packaged app, which file extensions are excluded from it, and which symlinks among them may lead outside it,
|
|
98
98
|
* set under `fileOptions` at the configuration root or per platform (e.g. `mac.fileOptions`). A platform's file lists are added to the root
|
|
99
99
|
* ones; a platform's `excludedExts` and `allowExternalLinks` replace the root ones.
|
|
100
|
-
* See [file options](https://www.electron.build/docs/migration/v27-
|
|
100
|
+
* See [file options](https://www.electron.build/docs/migration/v27-config-changes#file-options-fileoptions).
|
|
101
101
|
*/
|
|
102
102
|
export interface FilesBuildOptions {
|
|
103
103
|
/**
|
|
@@ -307,7 +307,9 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions {
|
|
|
307
307
|
*/
|
|
308
308
|
readonly electronLanguages?: Array<string> | string;
|
|
309
309
|
/**
|
|
310
|
-
*
|
|
310
|
+
* Overrides the root `forceCodeSigning` for this platform: whether to fail the build if the app could not be code-signed,
|
|
311
|
+
* notarized, or have its auto-update manifests signed, and to verify the signatures it produces. See the root option for
|
|
312
|
+
* 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.
|
|
311
313
|
* @default false
|
|
312
314
|
*/
|
|
313
315
|
readonly forceCodeSigning?: boolean;
|
|
@@ -344,12 +346,12 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions {
|
|
|
344
346
|
* logs a warning. `false` also short-circuits the environment variables, so a leftover
|
|
345
347
|
* `ELECTRON_BUILDER_UPDATE_SIGN_KEY` in CI cannot re-enable signing by accident.
|
|
346
348
|
*
|
|
347
|
-
* The requirement is
|
|
348
|
-
* warns instead, so local builds and pipelines that sign the manifest in a later step of their own are
|
|
349
|
+
* The requirement is enforced when a publish policy is in effect (`--publish`) or `forceCodeSigning` is set; any other
|
|
350
|
+
* build warns instead, so local builds and pipelines that sign the manifest in a later step of their own are
|
|
349
351
|
* unaffected. It is also waived when every publish provider has `publishAutoUpdate: false`, since no manifest is
|
|
350
352
|
* emitted then, and for a build whose targets write no update info (e.g. only snap, flatpak, MSI/MSIX, portable,
|
|
351
|
-
* mas/pkg or plain archives). A publishing build checks for the key at build start, before
|
|
352
|
-
* or uploaded.
|
|
353
|
+
* mas/pkg or plain archives). A publishing (or `forceCodeSigning`) build checks for the key at build start, before
|
|
354
|
+
* anything is packed or uploaded. Every signed manifest is read back and verified before it is written.
|
|
353
355
|
*
|
|
354
356
|
* See [Signed Update Manifests](https://www.electron.build/features/signed-update-manifests).
|
|
355
357
|
*/
|
|
@@ -401,19 +403,20 @@ export interface UpdateManifestSigningOptions {
|
|
|
401
403
|
*
|
|
402
404
|
* A `publicKey` on its own does not satisfy the signing requirement — electron-builder still has no key to
|
|
403
405
|
* sign with. An external signer (HSM/KMS) that signs `latest*.yml` in a later step therefore either builds
|
|
404
|
-
* without a publish policy
|
|
405
|
-
* keeps publishing with `publishAutoUpdate: false` on every publish provider -
|
|
406
|
-
* artifacts and embeds this key, but writes no `latest*.yml`, so the external
|
|
406
|
+
* without a publish policy and without `forceCodeSigning`, where the requirement only warns and the unsigned
|
|
407
|
+
* manifest is written locally, or keeps publishing with `publishAutoUpdate: false` on every publish provider -
|
|
408
|
+
* electron-builder then uploads the artifacts and embeds this key, but writes no `latest*.yml`, so the external
|
|
409
|
+
* step has to produce it too.
|
|
407
410
|
*
|
|
408
|
-
* When set, it must contain at least one of the signing keys: a publishing build signed only by
|
|
409
|
-
* list fails, since its installs would reject manifests signed with them. See `allowSigningKeyOutsideTrustList`.
|
|
411
|
+
* When set, it must contain at least one of the signing keys: a publishing (or `forceCodeSigning`) build signed only by
|
|
412
|
+
* keys outside this list fails, since its installs would reject manifests signed with them. See `allowSigningKeyOutsideTrustList`.
|
|
410
413
|
*/
|
|
411
414
|
readonly publicKey?: string | Array<string> | null;
|
|
412
415
|
/**
|
|
413
416
|
* Allows a publishing build to sign its manifests only with keys that are not in `publicKey` - a deliberate
|
|
414
417
|
* cutover release that is verified by installs with the old key, but hands them over to the keys listed in
|
|
415
418
|
* `publicKey`. Every later release must then be signed by a listed key. Without it such a build fails; a build
|
|
416
|
-
* without a publish policy only warns. Has no effect when `publicKey` is not set.
|
|
419
|
+
* without a publish policy or `forceCodeSigning` only warns. Has no effect when `publicKey` is not set.
|
|
417
420
|
* @default false
|
|
418
421
|
*/
|
|
419
422
|
readonly allowSigningKeyOutsideTrustList?: boolean | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformSpecificBuildOptions.d.ts","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,WAAW,OAAO;IACtB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAEtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;IAEzD;;;;;OAKG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAA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IAEvD;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAElD;;;;;;OAMG;IACH,QAAQ,CAAC,+BAA+B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAC1D;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAA;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAE/B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvD"}
|
|
@@ -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 `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-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 * 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 * 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` (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 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 (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, 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 * When set, it must contain at least one of the signing keys: a publishing build signed only by keys outside this\n * 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 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"]}
|
|
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,9 +199,14 @@ 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).
|
|
208
|
+
*
|
|
209
|
+
* The credentials are one of the following sets of environment variables:
|
|
205
210
|
*
|
|
206
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`
|