app-builder-lib 26.1.0 → 26.2.0
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/out/codeSign/windowsCodeSign.js +1 -1
- package/out/codeSign/windowsCodeSign.js.map +1 -1
- package/out/linuxPackager.js +1 -1
- package/out/linuxPackager.js.map +1 -1
- package/out/macPackager.js +31 -6
- package/out/macPackager.js.map +1 -1
- package/out/node-module-collector/packageManager.js +9 -4
- package/out/node-module-collector/packageManager.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +2 -1
- package/out/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +2 -0
- package/out/options/macOptions.js.map +1 -1
- package/out/options/winOptions.d.ts +1 -1
- package/out/options/winOptions.js.map +1 -1
- package/out/platformPackager.d.ts +5 -0
- package/out/platformPackager.js +50 -0
- package/out/platformPackager.js.map +1 -1
- package/out/targets/LinuxTargetHelper.js +2 -1
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/nsis/nsisUtil.js +6 -0
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/targets/snap.js +13 -2
- package/out/targets/snap.js.map +1 -1
- package/out/util/macosIconComposer.d.ts +10 -0
- package/out/util/macosIconComposer.js +95 -0
- package/out/util/macosIconComposer.js.map +1 -0
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/package.json +7 -7
- package/scheme.json +8 -8
- package/templates/nsis/uninstaller.nsh +7 -0
|
@@ -7,7 +7,7 @@ async function signWindows(options, packager) {
|
|
|
7
7
|
if (options.options.signtoolOptions) {
|
|
8
8
|
builder_util_1.log.warn(null, "ignoring signtool options, using Azure Trusted Signing; please only configure one");
|
|
9
9
|
}
|
|
10
|
-
builder_util_1.log.info({ path: builder_util_1.log.filePath(options.path) }, "signing with Azure Trusted Signing
|
|
10
|
+
builder_util_1.log.info({ path: builder_util_1.log.filePath(options.path) }, "signing with Azure Trusted Signing");
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
13
|
builder_util_1.log.info({ path: builder_util_1.log.filePath(options.path) }, "signing with signtool.exe");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windowsCodeSign.js","sourceRoot":"","sources":["../../src/codeSign/windowsCodeSign.ts"],"names":[],"mappings":";;AASA,kCAWC;AApBD,+CAAyC;AASlC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAqB;IAClF,IAAI,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACpC,kBAAG,CAAC,IAAI,CAAC,IAAI,EAAE,mFAAmF,CAAC,CAAA;QACrG,CAAC;QACD,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"windowsCodeSign.js","sourceRoot":"","sources":["../../src/codeSign/windowsCodeSign.ts"],"names":[],"mappings":";;AASA,kCAWC;AApBD,+CAAyC;AASlC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAqB;IAClF,IAAI,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACpC,kBAAG,CAAC,IAAI,CAAC,IAAI,EAAE,mFAAmF,CAAC,CAAA;QACrG,CAAC;QACD,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,oCAAoC,CAAC,CAAA;IACtF,CAAC;SAAM,CAAC;QACN,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAA;IAC7E,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAA;IAC1D,OAAO,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;AACpE,CAAC;AAED,SAAS,aAAa,CAAC,MAA8B;IACnD,OAAO,IAAA,oBAAK,EAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,CAAM,EAAE,EAAE;YACtB,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAA;YACzB;YACE,oEAAoE;YACpE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,4BAA4B,CAAC;;gBAC/C,oEAAoE;gBACpE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,gCAAgC,CAAC,CAAA,EACnD,CAAC;gBACD,kBAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,sDAAsD,CAAC,CAAA;gBACpF,OAAO,IAAI,CAAA;YACb,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { log, retry } from \"builder-util\"\nimport { WindowsConfiguration } from \"../options/winOptions\"\nimport { WinPackager } from \"../winPackager\"\n\nexport interface WindowsSignOptions {\n readonly path: string\n readonly options: WindowsConfiguration\n}\n\nexport async function signWindows(options: WindowsSignOptions, packager: WinPackager): Promise<boolean> {\n if (options.options.azureSignOptions) {\n if (options.options.signtoolOptions) {\n log.warn(null, \"ignoring signtool options, using Azure Trusted Signing; please only configure one\")\n }\n log.info({ path: log.filePath(options.path) }, \"signing with Azure Trusted Signing\")\n } else {\n log.info({ path: log.filePath(options.path) }, \"signing with signtool.exe\")\n }\n const packageManager = await packager.signingManager.value\n return signWithRetry(async () => packageManager.signFile(options))\n}\n\nfunction signWithRetry(signer: () => Promise<boolean>): Promise<boolean> {\n return retry(signer, {\n retries: 3,\n interval: 1000,\n backoff: 1000,\n shouldRetry: (e: any) => {\n const message = e.message\n if (\n // https://github.com/electron-userland/electron-builder/issues/1414\n message?.includes(\"Couldn't resolve host name\") ||\n // https://github.com/electron-userland/electron-builder/issues/8615\n message?.includes(\"being used by another process.\")\n ) {\n log.warn({ error: message }, \"attempt to sign failed, another attempt will be made\")\n return true\n }\n return false\n },\n })\n}\n"]}
|
package/out/linuxPackager.js
CHANGED
|
@@ -13,7 +13,7 @@ class LinuxPackager extends platformPackager_1.PlatformPackager {
|
|
|
13
13
|
var _a;
|
|
14
14
|
super(info, core_1.Platform.LINUX);
|
|
15
15
|
const executableName = (_a = this.platformSpecificBuildOptions.executableName) !== null && _a !== void 0 ? _a : info.config.executableName;
|
|
16
|
-
this.executableName = executableName == null ? this.appInfo.
|
|
16
|
+
this.executableName = executableName == null ? this.appInfo.sanitizedName.toLowerCase() : (0, filename_1.sanitizeFileName)(executableName);
|
|
17
17
|
}
|
|
18
18
|
get defaultTarget() {
|
|
19
19
|
return ["snap", "appimage"];
|
package/out/linuxPackager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linuxPackager.js","sourceRoot":"","sources":["../src/linuxPackager.ts"],"names":[],"mappings":";;;AAyEA,oDAcC;AAvFD,+CAAmC;AACnC,wDAA4D;AAC5D,iCAAqD;AAGrD,yDAAqD;AAIrD,mEAA+D;AAE/D,2DAA4D;AAE5D,MAAa,aAAc,SAAQ,mCAAoC;IAGrE,YAAY,IAAc;;QACxB,KAAK,CAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,CAAC,CAAA;QAE3B,MAAM,cAAc,GAAG,MAAA,IAAI,CAAC,4BAA4B,CAAC,cAAc,mCAAI,IAAI,CAAC,MAAM,CAAC,cAAc,CAAA;QACrG,IAAI,CAAC,cAAc,GAAG,cA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util/out/filename\"\nimport { DIR_TARGET, Platform, Target } from \"./core\"\nimport { LinuxConfiguration } from \"./options/linuxOptions\"\nimport { Packager } from \"./packager\"\nimport { PlatformPackager } from \"./platformPackager\"\nimport AppImageTarget from \"./targets/AppImageTarget\"\nimport FlatpakTarget from \"./targets/FlatpakTarget\"\nimport FpmTarget from \"./targets/FpmTarget\"\nimport { LinuxTargetHelper } from \"./targets/LinuxTargetHelper\"\nimport SnapTarget from \"./targets/snap\"\nimport { createCommonTarget } from \"./targets/targetFactory\"\n\nexport class LinuxPackager extends PlatformPackager<LinuxConfiguration> {\n readonly executableName: string\n\n constructor(info: Packager) {\n super(info, Platform.LINUX)\n\n const executableName = this.platformSpecificBuildOptions.executableName ?? info.config.executableName\n this.executableName = executableName == null ? this.appInfo.sanitizedName.toLowerCase() : sanitizeFileName(executableName)\n }\n\n get defaultTarget(): Array<string> {\n return [\"snap\", \"appimage\"]\n }\n\n createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void {\n let helper: LinuxTargetHelper | null\n const getHelper = () => {\n if (helper == null) {\n helper = new LinuxTargetHelper(this)\n }\n return helper\n }\n\n for (const name of targets) {\n if (name === DIR_TARGET) {\n continue\n }\n\n const targetClass: typeof AppImageTarget | typeof SnapTarget | typeof FlatpakTarget | typeof FpmTarget | null = (() => {\n switch (name) {\n case \"appimage\":\n return require(\"./targets/AppImageTarget\").default\n case \"snap\":\n return require(\"./targets/snap\").default\n case \"flatpak\":\n return require(\"./targets/FlatpakTarget\").default\n case \"deb\":\n case \"rpm\":\n case \"sh\":\n case \"freebsd\":\n case \"pacman\":\n case \"apk\":\n case \"p5p\":\n return require(\"./targets/FpmTarget\").default\n default:\n return null\n }\n })()\n\n mapper(name, outDir => {\n if (targetClass === null) {\n return createCommonTarget(name, outDir, this)\n }\n\n return new targetClass(name, this, getHelper(), outDir)\n })\n }\n }\n}\n\nexport function toAppImageOrSnapArch(arch: Arch): string {\n switch (arch) {\n case Arch.x64:\n return \"x86_64\"\n case Arch.ia32:\n return \"i386\"\n case Arch.armv7l:\n return \"arm\"\n case Arch.arm64:\n return \"arm_aarch64\"\n\n default:\n throw new Error(`Unsupported arch ${arch}`)\n }\n}\n"]}
|
package/out/macPackager.js
CHANGED
|
@@ -130,6 +130,12 @@ class MacPackager extends platformPackager_1.PlatformPackager {
|
|
|
130
130
|
appOutDir: builder_util_1.log.filePath(appOutDir),
|
|
131
131
|
}, `packaging`);
|
|
132
132
|
const appFile = `${this.appInfo.productFilename}.app`;
|
|
133
|
+
// Make sure the Assets.car file is the same for both architectures
|
|
134
|
+
const sourceCatalogPath = path.join(x64AppOutDir, appFile, "Contents/Resources/Assets.car");
|
|
135
|
+
if (await (0, builder_util_1.exists)(sourceCatalogPath)) {
|
|
136
|
+
const targetCatalogPath = path.join(arm64AppOutPath, appFile, "Contents/Resources/Assets.car");
|
|
137
|
+
await fs.copyFile(sourceCatalogPath, targetCatalogPath);
|
|
138
|
+
}
|
|
133
139
|
const { makeUniversalApp } = require("@electron/universal");
|
|
134
140
|
await makeUniversalApp({
|
|
135
141
|
x64AppPath: path.join(x64AppOutDir, appFile),
|
|
@@ -422,19 +428,38 @@ class MacPackager extends platformPackager_1.PlatformPackager {
|
|
|
422
428
|
const appFilename = appInfo.productFilename;
|
|
423
429
|
// https://github.com/electron-userland/electron-builder/issues/1278
|
|
424
430
|
appPlist.CFBundleExecutable = appFilename.endsWith(" Helper") ? appFilename.substring(0, appFilename.length - " Helper".length) : appFilename;
|
|
425
|
-
const
|
|
426
|
-
|
|
431
|
+
const resourcesPath = path.join(contentsPath, "Resources");
|
|
432
|
+
// Support both legacy `.icns` and modern `.icon` (Icon Composer) inputs via `mac.icon`.
|
|
433
|
+
// Prefer `.icon` if provided; still accept `.icns`.
|
|
434
|
+
const configuredIcon = this.platformSpecificBuildOptions.icon;
|
|
435
|
+
const isIconComposer = typeof configuredIcon === "string" && configuredIcon.toLowerCase().endsWith(".icon");
|
|
436
|
+
// Set the app name
|
|
437
|
+
appPlist.CFBundleName = appInfo.productName;
|
|
438
|
+
appPlist.CFBundleDisplayName = appInfo.productName;
|
|
439
|
+
// Bundle legacy `icns` format - this should also run when `.icon` is provided
|
|
440
|
+
const setIcnsFile = async (iconPath) => {
|
|
427
441
|
const oldIcon = appPlist.CFBundleIconFile;
|
|
428
|
-
const resourcesPath = path.join(contentsPath, "Resources");
|
|
429
442
|
if (oldIcon != null) {
|
|
430
443
|
await (0, builder_util_1.unlinkIfExists)(path.join(resourcesPath, oldIcon));
|
|
431
444
|
}
|
|
432
445
|
const iconFileName = "icon.icns";
|
|
433
446
|
appPlist.CFBundleIconFile = iconFileName;
|
|
434
|
-
await (0, builder_util_1.copyFile)(
|
|
447
|
+
await (0, builder_util_1.copyFile)(iconPath, path.join(resourcesPath, iconFileName));
|
|
448
|
+
};
|
|
449
|
+
const icnsFilePath = await this.getIconPath();
|
|
450
|
+
if (icnsFilePath != null) {
|
|
451
|
+
await setIcnsFile(icnsFilePath);
|
|
452
|
+
}
|
|
453
|
+
// Bundle new `icon` format
|
|
454
|
+
if (isIconComposer && configuredIcon) {
|
|
455
|
+
const iconComposerPath = await this.getResource(configuredIcon);
|
|
456
|
+
if (iconComposerPath) {
|
|
457
|
+
const { assetCatalog } = await this.generateAssetCatalogData(iconComposerPath);
|
|
458
|
+
// Create and setup the asset catalog
|
|
459
|
+
appPlist.CFBundleIconName = "Icon";
|
|
460
|
+
await fs.writeFile(path.join(resourcesPath, "Assets.car"), assetCatalog);
|
|
461
|
+
}
|
|
435
462
|
}
|
|
436
|
-
appPlist.CFBundleName = appInfo.productName;
|
|
437
|
-
appPlist.CFBundleDisplayName = appInfo.productName;
|
|
438
463
|
const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion;
|
|
439
464
|
if (minimumSystemVersion != null) {
|
|
440
465
|
appPlist.LSMinimumSystemVersion = minimumSystemVersion;
|
package/out/macPackager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mac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C,CAAC;QAED,4CAA4C;QAC5C,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAnlBD,kCAmlBC;AAED,SAAS,mBAAmB,CAAC,KAAc,EAAE,aAAsB;IACjE,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,0BAA0B,CAAC,CAAA;IACvG,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,EAAE,qCAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAA;AAC7G,CAAC","sourcesContent":["import { notarize } from \"@electron/notarize\"\nimport { NotarizeOptionsNotaryTool, NotaryToolKeychainCredentials } from \"@electron/notarize/lib/types\"\nimport { PerFileSignOptions, SignOptions } from \"@electron/osx-sign/dist/cjs/types\"\nimport { Identity } from \"@electron/osx-sign/dist/cjs/util-identities\"\nimport { Arch, AsyncTaskManager, copyFile, deepAssign, exec, getArchSuffix, InvalidConfigurationError, log, orIfFileNotExist, statOrNull, unlinkIfExists, use } 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 { AppInfo } from \"./appInfo\"\nimport { CertType, CodeSigningInfo, createKeychain, CreateKeychainOptions, findIdentity, isSignAllowed, removeKeychain, reportError, sign } from \"./codeSign/macCodeSign\"\nimport { DIR_TARGET, Platform, Target } from \"./core\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index\"\nimport { MacConfiguration, MasConfiguration } from \"./options/macOptions\"\nimport { Packager } from \"./packager\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/pkg\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory\"\nimport { isMacOsHighSierra } from \"./util/macosVersion\"\nimport { getTemplatePath } from \"./util/pathManager\"\nimport { resolveFunction } from \"./util/resolve\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nexport class MacPackager extends PlatformPackager<MacConfiguration> {\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.info.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 constructor(info: Packager) {\n super(info, Platform.MAC)\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\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 // codesign requires the filename to be normalized to the NFD form\n return new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions, true)\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 const { DmgTarget } = require(\"dmg-builder\")\n mapper(name, outDir => new DmgTarget(this, outDir))\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 => (name === \"mas\" || name === \"mas-dev\" ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets } = config\n\n switch (arch) {\n default: {\n return super.doPack(config)\n }\n case Arch.universal: {\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 },\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 const { makeUniversalApp } = require(\"@electron/universal\")\n await makeUniversalApp({\n x64AppPath: path.join(x64AppOutDir, appFile),\n arm64AppPath: path.join(arm64AppOutPath, appFile),\n outAppPath: path.join(appOutDir, appFile),\n force: true,\n mergeASARs: platformSpecificBuildOptions.mergeASARs ?? true,\n singleArchFiles: platformSpecificBuildOptions.singleArchFiles,\n x64ArchFiles: platformSpecificBuildOptions.x64ArchFiles,\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.doAddElectronFuses(packContext)\n\n await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets)\n break\n }\n }\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const hasMas = targets.length !== 0 && targets.some(it => it.name === \"mas\" || it.name === \"mas-dev\")\n const prepackaged = this.packagerOptions.prepackaged\n\n for (const target of targets) {\n const targetName = target.name\n if (!(targetName === \"mas\" || targetName === \"mas-dev\")) {\n continue\n }\n\n const masBuildOptions = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas)\n if (targetName === \"mas-dev\") {\n deepAssign(masBuildOptions, this.config.masDev, {\n type: \"development\",\n })\n }\n\n const targetOutDir = path.join(outDir, `${targetName}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n if (prepackaged == null) {\n await this.doPack({ outDir, appOutDir: targetOutDir, platformName: \"mas\", arch, platformSpecificBuildOptions: masBuildOptions, targets: [target] })\n await this.sign(path.join(targetOutDir, `${this.appInfo.productFilename}.app`), targetOutDir, masBuildOptions, arch)\n } else {\n await this.sign(prepackaged, targetOutDir, masBuildOptions, arch)\n }\n }\n\n if (!hasMas || targets.length > 1) {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${this.appInfo.productFilename}.app`) : prepackaged\n if (prepackaged == null) {\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: this.platform.nodeName as ElectronPlatformName,\n arch,\n platformSpecificBuildOptions: this.platformSpecificBuildOptions,\n targets,\n })\n }\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n }\n\n private async sign(appPath: string, outDir: string | null, masOptions: MasConfiguration | null, arch: Arch): Promise<boolean> {\n if (!isSignAllowed()) {\n return false\n }\n\n const isMas = masOptions != null\n const options = masOptions == null ? this.platformSpecificBuildOptions : masOptions\n const qualifier = options.identity\n const fallBackToAdhoc = (arch === Arch.arm64 || arch === Arch.universal) && !this.forceCodeSigning\n\n if (qualifier === null) {\n if (this.forceCodeSigning) {\n throw new InvalidConfigurationError(\"identity explicitly is set to null, but forceCodeSigning is set to true\")\n }\n log.info({ reason: \"identity explicitly is set to null\" }, \"skipped macOS code signing\")\n if (fallBackToAdhoc) {\n log.warn(\"arm64 requires signing, but identity is set to null and signing is being skipped\")\n }\n return false\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n const explicitType = options.type\n const type = explicitType || \"distribution\"\n const isDevelopment = type === \"development\"\n const certificateTypes = getCertificateTypes(isMas, isDevelopment)\n\n let identity = null\n for (const certificateType of certificateTypes) {\n identity = await findIdentity(certificateType, qualifier, keychainFile)\n if (identity != null) {\n break\n }\n }\n\n if (identity == null) {\n if (!isMas && !isDevelopment && explicitType !== \"distribution\") {\n identity = await findIdentity(\"Mac Developer\", qualifier, keychainFile)\n if (identity != null) {\n log.warn(\"Mac Developer is used to sign app — it is only for development and testing, not for production\")\n }\n }\n\n const noIdentity = !options.sign && identity == null\n if (qualifier === \"-\") {\n identity = new Identity(\"-\", undefined)\n } else if (noIdentity && fallBackToAdhoc) {\n log.warn(null, \"falling back to ad-hoc signature for macOS application code signing\")\n identity = new Identity(\"-\", undefined)\n } else if (noIdentity) {\n await reportError(isMas, certificateTypes, qualifier, keychainFile, this.forceCodeSigning)\n return false\n }\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n let filter = options.signIgnore\n if (Array.isArray(filter)) {\n if (filter.length == 0) {\n filter = null\n }\n } else if (filter != null) {\n filter = filter.length === 0 ? null : [filter]\n }\n\n const filterRe = filter == null ? null : filter.map(it => new RegExp(it))\n\n let binaries = options.binaries || undefined\n if (binaries) {\n // Accept absolute paths for external binaries, else resolve relative paths from the artifact's app Contents path.\n binaries = (\n await Promise.all(\n binaries.flatMap(async destination => {\n const expandedDestination = this.expandArch(destination, arch)\n return await Promise.all(\n expandedDestination.map(async d => {\n if (await statOrNull(d)) {\n return d\n }\n return path.resolve(appPath, d)\n })\n )\n })\n )\n ).flat()\n log.info({ binaries, arch: arch == null ? null : Arch[arch] }, \"signing additional user-defined binaries for arch\")\n }\n const customSignOptions: MasConfiguration | MacConfiguration = (isMas ? masOptions : this.platformSpecificBuildOptions) || this.platformSpecificBuildOptions\n\n const signOptions: SignOptions = {\n identityValidation: false,\n // https://github.com/electron-userland/electron-builder/issues/1699\n // kext are signed by the chipset manufacturers. You need a special certificate (only available on request) from Apple to be able to sign kext.\n ignore: (file: string) => {\n if (filterRe != null) {\n for (const regExp of filterRe) {\n if (regExp.test(file)) {\n return true\n }\n }\n }\n return (\n file.endsWith(\".kext\") ||\n file.startsWith(\"/Contents/PlugIns\", appPath.length) ||\n file.includes(\"/node_modules/puppeteer/.local-chromium\") ||\n file.includes(\"/node_modules/playwright-firefox/.local-browsers\") ||\n file.includes(\"/node_modules/playwright/.local-browsers\")\n )\n\n /* Those are browser automating modules, browser (chromium, nightly) cannot be signed\n https://github.com/electron-userland/electron-builder/issues/2010\n https://github.com/electron-userland/electron-builder/issues/5383\n */\n },\n identity: identity ? identity.hash || identity.name : undefined,\n type,\n platform: isMas ? \"mas\" : \"darwin\",\n version: this.config.electronVersion || undefined,\n app: appPath,\n keychain: keychainFile || undefined,\n binaries,\n // https://github.com/electron-userland/electron-builder/issues/1480\n strictVerify: options.strictVerify,\n preAutoEntitlements: options.preAutoEntitlements,\n optionsForFile: await this.getOptionsForFile(appPath, isMas, customSignOptions),\n provisioningProfile: customSignOptions.provisioningProfile || undefined,\n }\n\n await this.doSign(signOptions, customSignOptions, identity)\n\n // https://github.com/electron-userland/electron-builder/issues/1196#issuecomment-312310209\n if (masOptions != null && !isDevelopment) {\n const certType = isDevelopment ? \"Mac Developer\" : \"3rd Party Mac Developer Installer\"\n const masInstallerIdentity = await findIdentity(certType, masOptions.identity, keychainFile)\n if (masInstallerIdentity == null) {\n throw new InvalidConfigurationError(`Cannot find valid \"${certType}\" identity to sign MAS installer, please see https://electron.build/code-signing`)\n }\n\n // mas uploaded to AppStore, so, use \"-\" instead of space for name\n const artifactName = this.expandArtifactNamePattern(masOptions, \"pkg\", arch)\n const artifactPath = path.join(outDir!, artifactName)\n await this.doFlat(appPath, artifactPath, masInstallerIdentity, keychainFile)\n await this.info.emitArtifactBuildCompleted({\n file: artifactPath,\n target: null,\n arch: Arch.x64,\n safeArtifactName: this.computeSafeArtifactName(artifactName, \"pkg\", arch, true, this.platformSpecificBuildOptions.defaultArch),\n packager: this,\n })\n }\n\n if (!isMas) {\n await this.notarizeIfProvided(appPath)\n }\n return true\n }\n\n private async getOptionsForFile(appPath: string, isMas: boolean, customSignOptions: MacConfiguration) {\n const resourceList = await this.resourceList\n const entitlementsSuffix = isMas ? \"mas\" : \"mac\"\n\n const getEntitlements = (filePath: string) => {\n // check if root app, then use main entitlements\n if (filePath === appPath) {\n if (customSignOptions.entitlements) {\n return customSignOptions.entitlements\n }\n const p = `entitlements.${entitlementsSuffix}.plist`\n if (resourceList.includes(p)) {\n return path.join(this.info.buildResourcesDir, p)\n } else {\n return getTemplatePath(\"entitlements.mac.plist\")\n }\n }\n\n // It's a login helper...\n if (filePath.includes(\"Library/LoginItems\")) {\n return customSignOptions.entitlementsLoginHelper\n }\n\n // Only remaining option is that it's inherited entitlements\n if (customSignOptions.entitlementsInherit) {\n return customSignOptions.entitlementsInherit\n }\n const p = `entitlements.${entitlementsSuffix}.inherit.plist`\n if (resourceList.includes(p)) {\n return path.join(this.info.buildResourcesDir, p)\n } else {\n return getTemplatePath(\"entitlements.mac.plist\")\n }\n }\n\n const requirements = isMas || this.platformSpecificBuildOptions.requirements == null ? undefined : await this.getResource(this.platformSpecificBuildOptions.requirements)\n\n // harden by default for mac builds. Only harden mas builds if explicitly true (backward compatibility)\n const hardenedRuntime = isMas ? customSignOptions.hardenedRuntime === true : customSignOptions.hardenedRuntime !== false\n\n const optionsForFile: (filePath: string) => PerFileSignOptions = filePath => {\n const entitlements = getEntitlements(filePath)\n const args = {\n entitlements: entitlements || undefined,\n hardenedRuntime: hardenedRuntime ?? undefined,\n timestamp: customSignOptions.timestamp || undefined,\n requirements: requirements || undefined,\n additionalArguments: customSignOptions.additionalArguments || [],\n }\n log.debug({ file: log.filePath(filePath), ...args }, \"selecting signing options\")\n return args\n }\n return optionsForFile\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, customSignOptions: MacConfiguration, identity: Identity | null): Promise<void> {\n const customSign = await resolveFunction(this.appInfo.type, customSignOptions.sign, \"sign\")\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 return customSign ? Promise.resolve(customSign(opts, this)) : sign({ ...opts, identity: identity ? identity.name : undefined })\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(outFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", appPath, \"/Applications\")\n args.push(outFile)\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) {\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 icon = await this.getIconPath()\n if (icon != null) {\n const oldIcon = appPlist.CFBundleIconFile\n const resourcesPath = path.join(contentsPath, \"Resources\")\n if (oldIcon != null) {\n await unlinkIfExists(path.join(resourcesPath, oldIcon))\n }\n const iconFileName = \"icon.icns\"\n appPlist.CFBundleIconFile = iconFileName\n await copyFile(icon, path.join(resourcesPath, iconFileName))\n }\n appPlist.CFBundleName = appInfo.productName\n appPlist.CFBundleDisplayName = appInfo.productName\n\n const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion\n if (minimumSystemVersion != null) {\n appPlist.LSMinimumSystemVersion = minimumSystemVersion\n }\n\n appPlist.CFBundleShortVersionString = this.platformSpecificBuildOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = 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 Object.assign(appPlist, extendInfo)\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean> {\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<boolean> => {\n await Promise.all(\n directories.map(async (file: string) => {\n if (shouldSign(file)) {\n await this.sign(path.join(sourceDirectory, file), null, null, packContext.arch)\n }\n })\n )\n return true\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return true\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))\n\n return true\n }\n\n async notarizeIfProvided(appPath: string) {\n const notarizeOptions = this.platformSpecificBuildOptions.notarize\n if (notarizeOptions === false) {\n log.info({ reason: \"`notarize` options were set explicitly `false`\" }, \"skipped macOS notarization\")\n return\n }\n const options = this.getNotarizeOptions(appPath)\n if (!options) {\n log.warn({ reason: \"`notarize` options were unable to be generated\" }, \"skipped macOS notarization\")\n return\n }\n await notarize(options)\n log.info(null, \"notarization successful\")\n }\n\n private getNotarizeOptions(appPath: string): NotarizeOptionsNotaryTool | undefined {\n const teamId = process.env.APPLE_TEAM_ID\n const appleId = process.env.APPLE_ID\n const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD\n const tool = \"notarytool\"\n\n // option 1: app specific password\n if (appleId || appleIdPassword) {\n if (!appleId) {\n throw new InvalidConfigurationError(`APPLE_ID env var needs to be set`)\n }\n if (!appleIdPassword) {\n throw new InvalidConfigurationError(`APPLE_APP_SPECIFIC_PASSWORD env var needs to be set`)\n }\n if (!teamId) {\n throw new InvalidConfigurationError(`APPLE_TEAM_ID env var needs to be set`)\n }\n return { tool, appPath, appleId, appleIdPassword, teamId }\n }\n\n // option 2: API key\n const appleApiKey = process.env.APPLE_API_KEY\n const appleApiKeyId = process.env.APPLE_API_KEY_ID\n const appleApiIssuer = process.env.APPLE_API_ISSUER\n if (appleApiKey || appleApiKeyId || appleApiIssuer) {\n if (!appleApiKey || !appleApiKeyId || !appleApiIssuer) {\n throw new InvalidConfigurationError(`Env vars APPLE_API_KEY, APPLE_API_KEY_ID and APPLE_API_ISSUER need to be set`)\n }\n return { tool, appPath, appleApiKey, appleApiKeyId, appleApiIssuer }\n }\n\n // option 3: keychain\n const keychain = process.env.APPLE_KEYCHAIN\n const keychainProfile = process.env.APPLE_KEYCHAIN_PROFILE\n if (keychainProfile) {\n let args: NotaryToolKeychainCredentials = { keychainProfile }\n if (keychain) {\n args = { ...args, keychain }\n }\n return { tool, appPath, ...args }\n }\n\n // if no credentials provided, skip silently\n return undefined\n }\n}\n\nfunction getCertificateTypes(isMas: boolean, isDevelopment: boolean): CertType[] {\n if (isDevelopment) {\n return isMas ? [\"Mac Developer\", \"Apple Development\"] : [\"Mac Developer\", \"Developer ID Application\"]\n }\n return isMas ? [\"Apple Distribution\", \"3rd Party Mac Developer Application\"] : [\"Developer ID Application\"]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macPackager.js","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAG7C,iFAAsE;AACtE,+CAcqB;AACrB,+DAAwD;AACxD,kCAAiC;AACjC,0CAA4C;AAC5C,uCAA+B;AAC/B,6BAA4B;AAC5B,uCAAmC;AACnC,wDAAyK;AACzK,iCAAqD;AAIrD,yDAAmF;AACnF,2DAAuD;AACvD,uCAAkE;AAClE,2DAAwE;AACxE,sDAAuD;AACvD,oDAAoD;AACpD,4CAAgD;AAChD,wDAAmE;AAKnE,MAAa,WAAY,SAAQ,mCAAkC;IAoCjE,YAAY,IAAc;QACxB,KAAK,CAAC,IAAI,EAAE,eAAQ,CAAC,GAAG,CAAC,CAAA;QApClB,oBAAe,GAAG,IAAI,+BAAQ,CACrC,GAAG,EAAE;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EA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nD,IAAI,CAAC,WAAW,IAAI,CAAC,aAAa,IAAI,CAAC,cAAc,EAAE,CAAC;gBACtD,MAAM,IAAI,wCAAyB,CAAC,8EAA8E,CAAC,CAAA;YACrH,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,CAAA;QACtE,CAAC;QAED,qBAAqB;QACrB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAA;QAC3C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAA;QAC1D,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,IAAI,GAAkC,EAAE,eAAe,EAAE,CAAA;YAC7D,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAA;YAC9B,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAA;QACnC,CAAC;QAED,4CAA4C;QAC5C,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AApnBD,kCAonBC;AAED,SAAS,mBAAmB,CAAC,KAAc,EAAE,aAAsB;IACjE,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,0BAA0B,CAAC,CAAA;IACvG,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,oBAAoB,EAAE,qCAAqC,CAAC,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAA;AAC7G,CAAC","sourcesContent":["import { notarize } from \"@electron/notarize\"\nimport { NotarizeOptionsNotaryTool, NotaryToolKeychainCredentials } from \"@electron/notarize/lib/types\"\nimport { PerFileSignOptions, SignOptions } from \"@electron/osx-sign/dist/cjs/types\"\nimport { Identity } from \"@electron/osx-sign/dist/cjs/util-identities\"\nimport {\n Arch,\n AsyncTaskManager,\n copyFile,\n deepAssign,\n exec,\n exists,\n getArchSuffix,\n InvalidConfigurationError,\n log,\n orIfFileNotExist,\n statOrNull,\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 { AppInfo } from \"./appInfo\"\nimport { CertType, CodeSigningInfo, createKeychain, CreateKeychainOptions, findIdentity, isSignAllowed, removeKeychain, reportError, sign } from \"./codeSign/macCodeSign\"\nimport { DIR_TARGET, Platform, Target } from \"./core\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index\"\nimport { MacConfiguration, MasConfiguration } from \"./options/macOptions\"\nimport { Packager } from \"./packager\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/pkg\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory\"\nimport { isMacOsHighSierra } from \"./util/macosVersion\"\nimport { getTemplatePath } from \"./util/pathManager\"\nimport { resolveFunction } from \"./util/resolve\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nexport class MacPackager extends PlatformPackager<MacConfiguration> {\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.info.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 constructor(info: Packager) {\n super(info, Platform.MAC)\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\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 // codesign requires the filename to be normalized to the NFD form\n return new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions, true)\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 const { DmgTarget } = require(\"dmg-builder\")\n mapper(name, outDir => new DmgTarget(this, outDir))\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 => (name === \"mas\" || name === \"mas-dev\" ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets } = config\n\n switch (arch) {\n default: {\n return super.doPack(config)\n }\n case Arch.universal: {\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 },\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 sourceCatalogPath = path.join(x64AppOutDir, appFile, \"Contents/Resources/Assets.car\")\n if (await exists(sourceCatalogPath)) {\n const targetCatalogPath = path.join(arm64AppOutPath, appFile, \"Contents/Resources/Assets.car\")\n await fs.copyFile(sourceCatalogPath, targetCatalogPath)\n }\n\n const { makeUniversalApp } = require(\"@electron/universal\")\n await makeUniversalApp({\n x64AppPath: path.join(x64AppOutDir, appFile),\n arm64AppPath: path.join(arm64AppOutPath, appFile),\n outAppPath: path.join(appOutDir, appFile),\n force: true,\n mergeASARs: platformSpecificBuildOptions.mergeASARs ?? true,\n singleArchFiles: platformSpecificBuildOptions.singleArchFiles,\n x64ArchFiles: platformSpecificBuildOptions.x64ArchFiles,\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.doAddElectronFuses(packContext)\n\n await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets)\n break\n }\n }\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const hasMas = targets.length !== 0 && targets.some(it => it.name === \"mas\" || it.name === \"mas-dev\")\n const prepackaged = this.packagerOptions.prepackaged\n\n for (const target of targets) {\n const targetName = target.name\n if (!(targetName === \"mas\" || targetName === \"mas-dev\")) {\n continue\n }\n\n const masBuildOptions = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas)\n if (targetName === \"mas-dev\") {\n deepAssign(masBuildOptions, this.config.masDev, {\n type: \"development\",\n })\n }\n\n const targetOutDir = path.join(outDir, `${targetName}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n if (prepackaged == null) {\n await this.doPack({ outDir, appOutDir: targetOutDir, platformName: \"mas\", arch, platformSpecificBuildOptions: masBuildOptions, targets: [target] })\n await this.sign(path.join(targetOutDir, `${this.appInfo.productFilename}.app`), targetOutDir, masBuildOptions, arch)\n } else {\n await this.sign(prepackaged, targetOutDir, masBuildOptions, arch)\n }\n }\n\n if (!hasMas || targets.length > 1) {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${this.appInfo.productFilename}.app`) : prepackaged\n if (prepackaged == null) {\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: this.platform.nodeName as ElectronPlatformName,\n arch,\n platformSpecificBuildOptions: this.platformSpecificBuildOptions,\n targets,\n })\n }\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n }\n\n private async sign(appPath: string, outDir: string | null, masOptions: MasConfiguration | null, arch: Arch): Promise<boolean> {\n if (!isSignAllowed()) {\n return false\n }\n\n const isMas = masOptions != null\n const options = masOptions == null ? this.platformSpecificBuildOptions : masOptions\n const qualifier = options.identity\n const fallBackToAdhoc = (arch === Arch.arm64 || arch === Arch.universal) && !this.forceCodeSigning\n\n if (qualifier === null) {\n if (this.forceCodeSigning) {\n throw new InvalidConfigurationError(\"identity explicitly is set to null, but forceCodeSigning is set to true\")\n }\n log.info({ reason: \"identity explicitly is set to null\" }, \"skipped macOS code signing\")\n if (fallBackToAdhoc) {\n log.warn(\"arm64 requires signing, but identity is set to null and signing is being skipped\")\n }\n return false\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n const explicitType = options.type\n const type = explicitType || \"distribution\"\n const isDevelopment = type === \"development\"\n const certificateTypes = getCertificateTypes(isMas, isDevelopment)\n\n let identity = null\n for (const certificateType of certificateTypes) {\n identity = await findIdentity(certificateType, qualifier, keychainFile)\n if (identity != null) {\n break\n }\n }\n\n if (identity == null) {\n if (!isMas && !isDevelopment && explicitType !== \"distribution\") {\n identity = await findIdentity(\"Mac Developer\", qualifier, keychainFile)\n if (identity != null) {\n log.warn(\"Mac Developer is used to sign app — it is only for development and testing, not for production\")\n }\n }\n\n const noIdentity = !options.sign && identity == null\n if (qualifier === \"-\") {\n identity = new Identity(\"-\", undefined)\n } else if (noIdentity && fallBackToAdhoc) {\n log.warn(null, \"falling back to ad-hoc signature for macOS application code signing\")\n identity = new Identity(\"-\", undefined)\n } else if (noIdentity) {\n await reportError(isMas, certificateTypes, qualifier, keychainFile, this.forceCodeSigning)\n return false\n }\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n let filter = options.signIgnore\n if (Array.isArray(filter)) {\n if (filter.length == 0) {\n filter = null\n }\n } else if (filter != null) {\n filter = filter.length === 0 ? null : [filter]\n }\n\n const filterRe = filter == null ? null : filter.map(it => new RegExp(it))\n\n let binaries = options.binaries || undefined\n if (binaries) {\n // Accept absolute paths for external binaries, else resolve relative paths from the artifact's app Contents path.\n binaries = (\n await Promise.all(\n binaries.flatMap(async destination => {\n const expandedDestination = this.expandArch(destination, arch)\n return await Promise.all(\n expandedDestination.map(async d => {\n if (await statOrNull(d)) {\n return d\n }\n return path.resolve(appPath, d)\n })\n )\n })\n )\n ).flat()\n log.info({ binaries, arch: arch == null ? null : Arch[arch] }, \"signing additional user-defined binaries for arch\")\n }\n const customSignOptions: MasConfiguration | MacConfiguration = (isMas ? masOptions : this.platformSpecificBuildOptions) || this.platformSpecificBuildOptions\n\n const signOptions: SignOptions = {\n identityValidation: false,\n // https://github.com/electron-userland/electron-builder/issues/1699\n // kext are signed by the chipset manufacturers. You need a special certificate (only available on request) from Apple to be able to sign kext.\n ignore: (file: string) => {\n if (filterRe != null) {\n for (const regExp of filterRe) {\n if (regExp.test(file)) {\n return true\n }\n }\n }\n return (\n file.endsWith(\".kext\") ||\n file.startsWith(\"/Contents/PlugIns\", appPath.length) ||\n file.includes(\"/node_modules/puppeteer/.local-chromium\") ||\n file.includes(\"/node_modules/playwright-firefox/.local-browsers\") ||\n file.includes(\"/node_modules/playwright/.local-browsers\")\n )\n\n /* Those are browser automating modules, browser (chromium, nightly) cannot be signed\n https://github.com/electron-userland/electron-builder/issues/2010\n https://github.com/electron-userland/electron-builder/issues/5383\n */\n },\n identity: identity ? identity.hash || identity.name : undefined,\n type,\n platform: isMas ? \"mas\" : \"darwin\",\n version: this.config.electronVersion || undefined,\n app: appPath,\n keychain: keychainFile || undefined,\n binaries,\n // https://github.com/electron-userland/electron-builder/issues/1480\n strictVerify: options.strictVerify,\n preAutoEntitlements: options.preAutoEntitlements,\n optionsForFile: await this.getOptionsForFile(appPath, isMas, customSignOptions),\n provisioningProfile: customSignOptions.provisioningProfile || undefined,\n }\n\n await this.doSign(signOptions, customSignOptions, identity)\n\n // https://github.com/electron-userland/electron-builder/issues/1196#issuecomment-312310209\n if (masOptions != null && !isDevelopment) {\n const certType = isDevelopment ? \"Mac Developer\" : \"3rd Party Mac Developer Installer\"\n const masInstallerIdentity = await findIdentity(certType, masOptions.identity, keychainFile)\n if (masInstallerIdentity == null) {\n throw new InvalidConfigurationError(`Cannot find valid \"${certType}\" identity to sign MAS installer, please see https://electron.build/code-signing`)\n }\n\n // mas uploaded to AppStore, so, use \"-\" instead of space for name\n const artifactName = this.expandArtifactNamePattern(masOptions, \"pkg\", arch)\n const artifactPath = path.join(outDir!, artifactName)\n await this.doFlat(appPath, artifactPath, masInstallerIdentity, keychainFile)\n await this.info.emitArtifactBuildCompleted({\n file: artifactPath,\n target: null,\n arch: Arch.x64,\n safeArtifactName: this.computeSafeArtifactName(artifactName, \"pkg\", arch, true, this.platformSpecificBuildOptions.defaultArch),\n packager: this,\n })\n }\n\n if (!isMas) {\n await this.notarizeIfProvided(appPath)\n }\n return true\n }\n\n private async getOptionsForFile(appPath: string, isMas: boolean, customSignOptions: MacConfiguration) {\n const resourceList = await this.resourceList\n const entitlementsSuffix = isMas ? \"mas\" : \"mac\"\n\n const getEntitlements = (filePath: string) => {\n // check if root app, then use main entitlements\n if (filePath === appPath) {\n if (customSignOptions.entitlements) {\n return customSignOptions.entitlements\n }\n const p = `entitlements.${entitlementsSuffix}.plist`\n if (resourceList.includes(p)) {\n return path.join(this.info.buildResourcesDir, p)\n } else {\n return getTemplatePath(\"entitlements.mac.plist\")\n }\n }\n\n // It's a login helper...\n if (filePath.includes(\"Library/LoginItems\")) {\n return customSignOptions.entitlementsLoginHelper\n }\n\n // Only remaining option is that it's inherited entitlements\n if (customSignOptions.entitlementsInherit) {\n return customSignOptions.entitlementsInherit\n }\n const p = `entitlements.${entitlementsSuffix}.inherit.plist`\n if (resourceList.includes(p)) {\n return path.join(this.info.buildResourcesDir, p)\n } else {\n return getTemplatePath(\"entitlements.mac.plist\")\n }\n }\n\n const requirements = isMas || this.platformSpecificBuildOptions.requirements == null ? undefined : await this.getResource(this.platformSpecificBuildOptions.requirements)\n\n // harden by default for mac builds. Only harden mas builds if explicitly true (backward compatibility)\n const hardenedRuntime = isMas ? customSignOptions.hardenedRuntime === true : customSignOptions.hardenedRuntime !== false\n\n const optionsForFile: (filePath: string) => PerFileSignOptions = filePath => {\n const entitlements = getEntitlements(filePath)\n const args = {\n entitlements: entitlements || undefined,\n hardenedRuntime: hardenedRuntime ?? undefined,\n timestamp: customSignOptions.timestamp || undefined,\n requirements: requirements || undefined,\n additionalArguments: customSignOptions.additionalArguments || [],\n }\n log.debug({ file: log.filePath(filePath), ...args }, \"selecting signing options\")\n return args\n }\n return optionsForFile\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, customSignOptions: MacConfiguration, identity: Identity | null): Promise<void> {\n const customSign = await resolveFunction(this.appInfo.type, customSignOptions.sign, \"sign\")\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 return customSign ? Promise.resolve(customSign(opts, this)) : sign({ ...opts, identity: identity ? identity.name : undefined })\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(outFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", appPath, \"/Applications\")\n args.push(outFile)\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) {\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\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 appPlist.CFBundleShortVersionString = this.platformSpecificBuildOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = 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 Object.assign(appPlist, extendInfo)\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean> {\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<boolean> => {\n await Promise.all(\n directories.map(async (file: string) => {\n if (shouldSign(file)) {\n await this.sign(path.join(sourceDirectory, file), null, null, packContext.arch)\n }\n })\n )\n return true\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return true\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))\n\n return true\n }\n\n async notarizeIfProvided(appPath: string) {\n const notarizeOptions = this.platformSpecificBuildOptions.notarize\n if (notarizeOptions === false) {\n log.info({ reason: \"`notarize` options were set explicitly `false`\" }, \"skipped macOS notarization\")\n return\n }\n const options = this.getNotarizeOptions(appPath)\n if (!options) {\n log.warn({ reason: \"`notarize` options were unable to be generated\" }, \"skipped macOS notarization\")\n return\n }\n await notarize(options)\n log.info(null, \"notarization successful\")\n }\n\n private getNotarizeOptions(appPath: string): NotarizeOptionsNotaryTool | undefined {\n const teamId = process.env.APPLE_TEAM_ID\n const appleId = process.env.APPLE_ID\n const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD\n const tool = \"notarytool\"\n\n // option 1: app specific password\n if (appleId || appleIdPassword) {\n if (!appleId) {\n throw new InvalidConfigurationError(`APPLE_ID env var needs to be set`)\n }\n if (!appleIdPassword) {\n throw new InvalidConfigurationError(`APPLE_APP_SPECIFIC_PASSWORD env var needs to be set`)\n }\n if (!teamId) {\n throw new InvalidConfigurationError(`APPLE_TEAM_ID env var needs to be set`)\n }\n return { tool, appPath, appleId, appleIdPassword, teamId }\n }\n\n // option 2: API key\n const appleApiKey = process.env.APPLE_API_KEY\n const appleApiKeyId = process.env.APPLE_API_KEY_ID\n const appleApiIssuer = process.env.APPLE_API_ISSUER\n if (appleApiKey || appleApiKeyId || appleApiIssuer) {\n if (!appleApiKey || !appleApiKeyId || !appleApiIssuer) {\n throw new InvalidConfigurationError(`Env vars APPLE_API_KEY, APPLE_API_KEY_ID and APPLE_API_ISSUER need to be set`)\n }\n return { tool, appPath, appleApiKey, appleApiKeyId, appleApiIssuer }\n }\n\n // option 3: keychain\n const keychain = process.env.APPLE_KEYCHAIN\n const keychainProfile = process.env.APPLE_KEYCHAIN_PROFILE\n if (keychainProfile) {\n let args: NotaryToolKeychainCredentials = { keychainProfile }\n if (keychain) {\n args = { ...args, keychain }\n }\n return { tool, appPath, ...args }\n }\n\n // if no credentials provided, skip silently\n return undefined\n }\n}\n\nfunction getCertificateTypes(isMas: boolean, isDevelopment: boolean): CertType[] {\n if (isDevelopment) {\n return isMas ? [\"Mac Developer\", \"Apple Development\"] : [\"Mac Developer\", \"Developer ID Application\"]\n }\n return isMas ? [\"Apple Distribution\", \"3rd Party Mac Developer Application\"] : [\"Developer ID Application\"]\n}\n"]}
|
|
@@ -86,10 +86,15 @@ function detectPackageManagerByLockfile(cwd) {
|
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
88
|
function detectYarnBerry() {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
try {
|
|
90
|
+
const version = (0, child_process_1.execSync)("yarn --version").toString().trim();
|
|
91
|
+
if (parseInt(version.split(".")[0]) > 1) {
|
|
92
|
+
return PM.YARN_BERRY;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (_e) {
|
|
96
|
+
// If `yarn` is not found or another error occurs, fallback to the regular Yarn
|
|
97
|
+
}
|
|
93
98
|
return PM.YARN;
|
|
94
99
|
}
|
|
95
100
|
//# sourceMappingURL=packageManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageManager.js","sourceRoot":"","sources":["../../src/node-module-collector/packageManager.ts"],"names":[],"mappings":";;;AAqCA,4DAQC;AAED,8DAmBC;AAED,wEAsBC;AAED,
|
|
1
|
+
{"version":3,"file":"packageManager.js","sourceRoot":"","sources":["../../src/node-module-collector/packageManager.ts"],"names":[],"mappings":";;;AAqCA,4DAQC;AAED,8DAmBC;AAED,wEAsBC;AAED,0CAUC;AAtGD,6BAA4B;AAC5B,yBAAwB;AACxB,+BAA8B;AAC9B,iDAAwC;AAExC,IAAY,EAMX;AAND,WAAY,EAAE;IACZ,iBAAW,CAAA;IACX,mBAAa,CAAA;IACb,mBAAa,CAAA;IACb,+BAAyB,CAAA;IACzB,iBAAW,CAAA;AACb,CAAC,EANW,EAAE,kBAAF,EAAE,QAMb;AAED,2BAA2B;AAC3B,MAAM,WAAW,GAA0C;IACzD,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS;IACnB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS;IACpB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS;IACpB,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS;IAC1B,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS;CACpB,CAAA;AAED,SAAS,cAAc,CAAC,EAAM;IAC5B,MAAM,QAAQ,GAAG,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IAEnD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,IAAI,CAAC;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,iE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IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,OAAO,EAAE,CAAC,UAAU,CAAA;QACtB,CAAC;IACH,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,+EAA+E;IACjF,CAAC;IACD,OAAO,EAAE,CAAC,IAAI,CAAA;AAChB,CAAC","sourcesContent":["import * as path from \"path\"\nimport * as fs from \"fs\"\nimport * as which from \"which\"\nimport { execSync } from \"child_process\"\n\nexport enum PM {\n NPM = \"npm\",\n YARN = \"yarn\",\n PNPM = \"pnpm\",\n YARN_BERRY = \"yarn-berry\",\n BUN = \"bun\",\n}\n\n// Cache for resolved paths\nconst pmPathCache: Record<PM, string | null | undefined> = {\n [PM.NPM]: undefined,\n [PM.YARN]: undefined,\n [PM.PNPM]: undefined,\n [PM.YARN_BERRY]: undefined,\n [PM.BUN]: undefined,\n}\n\nfunction resolveCommand(pm: PM): string {\n const fallback = pm === PM.YARN_BERRY ? \"yarn\" : pm\n\n if (process.platform !== \"win32\") {\n return fallback\n }\n\n try {\n return which.sync(fallback)\n } catch {\n // If `which` fails (not found), still return the fallback string\n return fallback\n }\n}\n\nexport function getPackageManagerCommand(pm: PM) {\n if (pmPathCache[pm] !== undefined) {\n return pmPathCache[pm]!\n }\n\n const resolved = resolveCommand(pm)\n pmPathCache[pm] = resolved\n return resolved\n}\n\nexport function detectPackageManagerByEnv(): PM | null {\n const packageJsonPath = path.join(process.cwd(), \"package.json\")\n const packageManager = fs.existsSync(packageJsonPath) ? JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"))?.packageManager : undefined\n\n const priorityChecklist = [\n (key: string) => process.env.npm_config_user_agent?.includes(key),\n (key: string) => process.env.npm_execpath?.includes(key),\n (key: string) => packageManager?.startsWith(`${key}@`),\n ]\n\n const pms = Object.values(PM).filter(pm => pm !== PM.YARN_BERRY)\n for (const checker of priorityChecklist) {\n for (const pm of pms) {\n if (checker(pm)) {\n return pm\n }\n }\n }\n return null\n}\n\nexport function detectPackageManagerByLockfile(cwd: string): PM | null {\n const has = (file: string) => fs.existsSync(path.join(cwd, file))\n\n const detected: PM[] = []\n if (has(\"yarn.lock\")) {\n detected.push(PM.YARN)\n }\n if (has(\"pnpm-lock.yaml\")) {\n detected.push(PM.PNPM)\n }\n if (has(\"package-lock.json\")) {\n detected.push(PM.NPM)\n }\n if (has(\"bun.lock\") || has(\"bun.lockb\")) {\n detected.push(PM.BUN)\n }\n\n if (detected.length === 1) {\n return detected[0]\n }\n\n return null\n}\n\nexport function detectYarnBerry() {\n try {\n const version = execSync(\"yarn --version\").toString().trim()\n if (parseInt(version.split(\".\")[0]) > 1) {\n return PM.YARN_BERRY\n }\n } catch (_e) {\n // If `yarn` is not found or another error occurs, fallback to the regular Yarn\n }\n return PM.YARN\n}\n"]}
|
|
@@ -97,7 +97,8 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions, Fil
|
|
|
97
97
|
*/
|
|
98
98
|
readonly artifactName?: string | null;
|
|
99
99
|
/**
|
|
100
|
-
* The executable name. Defaults to `productName
|
|
100
|
+
* The executable name. Defaults to `productName`
|
|
101
|
+
* 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
|
|
101
102
|
*/
|
|
102
103
|
readonly executableName?: string | null;
|
|
103
104
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core\"\nimport { FileAssociation } from \"./FileAssociation\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](configuration.md#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](./file-patterns.md). 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 ordering?: string | null\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](./file-patterns.md) relative to the [app directory](configuration.md#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](mac.md)).\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](./file-patterns.md#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](./file-patterns.md) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](./configuration.md#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
|
|
1
|
+
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core\"\nimport { FileAssociation } from \"./FileAssociation\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](configuration.md#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](./file-patterns.md). 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 ordering?: string | null\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](./file-patterns.md) relative to the [app directory](configuration.md#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](mac.md)).\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](./file-patterns.md#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](./file-patterns.md) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as\n * [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](./configuration.md#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).\n */\n readonly artifactName?: string | null\n\n /**\n * The executable name. Defaults to `productName`\n * Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068\n */\n readonly executableName?: string | null\n\n /**\n * The compression level. If you want to rapidly test build, `store` can reduce build time significantly. `maximum` doesn't lead to noticeable size difference, but increase build time.\n * @default normal\n */\n readonly compression?: CompressionLevel | null\n\n /**\n * Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to `false`.\n *\n * @default false\n */\n disableDefaultIgnoredFiles?: boolean | null\n\n /**\n * Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).\n *\n * Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#asarUnpack) - please file an issue if this doesn't work.\n * @default true\n */\n readonly asar?: AsarOptions | boolean | null\n\n /**\n * A [glob patterns](./file-patterns.md) relative to the [app directory](#directories), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive.\n */\n readonly asarUnpack?: Array<string> | string | 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 */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](./auto-update.md#compatibility) semver range.\n */\n readonly electronUpdaterCompatibility?: string | null\n\n /**\n * Publisher configuration. See [Auto Update](./publish.md) for more information.\n */\n publish?: Publish\n\n /**\n * Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.\n * This does *not* apply to github publishing, which will [never auto-detect the update channel](https://github.com/electron-userland/electron-builder/issues/8589).\n * @default true\n */\n readonly detectUpdateChannel?: boolean\n\n /**\n * Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).\n * @default false\n */\n readonly generateUpdatesFilesForAllChannels?: boolean\n\n /**\n * The release info. Intended for command line usage:\n *\n * ```\n * -c.releaseInfo.releaseNotes=\"new features\"\n * ```\n */\n readonly releaseInfo?: ReleaseInfo\n\n readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\n /* - @private */\n cscLink?: string | null\n\n /* - @private */\n cscKeyPassword?: string | null\n\n readonly defaultArch?: string\n}\n\nexport interface ReleaseInfo {\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes.\n */\n releaseNotes?: string | null\n\n /**\n * The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](./contents.md#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"]}
|
|
@@ -23,6 +23,8 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
23
23
|
readonly identity?: string | null;
|
|
24
24
|
/**
|
|
25
25
|
* The path to application icon.
|
|
26
|
+
* Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).
|
|
27
|
+
* If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.
|
|
26
28
|
* @default build/icon.icns
|
|
27
29
|
*/
|
|
28
30
|
readonly icon?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\nimport { CustomMacSign } from \"../macPackager\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (`dmg` and `zip` for Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](./code-signing.md) instead of specifying this option.\n * MAS installer identity is specified in the [mas](./mas.md).\n *\n * Set to `-` to use an ad-hoc identity for signing. Set to `null` to skip signing entirely.\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).\n * MAS entitlements is specified in the [mas](./mas.md).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` verify the contents or not.\n * @default true\n */\n readonly strictVerify?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string | null\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string | null\n\n /**\n * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](./contents.md#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\nimport { CustomMacSign } from \"../macPackager\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (`dmg` and `zip` for Squirrel.Mac). Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](./code-signing.md) instead of specifying this option.\n * MAS installer identity is specified in the [mas](./mas.md).\n *\n * Set to `-` to use an ad-hoc identity for signing. Set to `null` to skip signing entirely.\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).\n * MAS entitlements is specified in the [mas](./mas.md).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` verify the contents or not.\n * @default true\n */\n readonly strictVerify?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string | null\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string | null\n\n /**\n * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](./contents.md#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
|
@@ -26,7 +26,7 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
readonly signtoolOptions?: WindowsSigntoolConfiguration | null;
|
|
28
28
|
/**
|
|
29
|
-
* Options for usage of Azure Trusted Signing
|
|
29
|
+
* Options for usage of Azure Trusted Signing service
|
|
30
30
|
* Cannot be used in conjunction with `signtoolOptions`, signing will default to Azure Trusted Signing
|
|
31
31
|
*/
|
|
32
32
|
readonly azureSignOptions?: WindowsAzureSigningConfiguration | null;
|