app-builder-lib 27.0.0-alpha.5 → 27.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appInfo.d.ts +1 -1
- package/dist/appInfo.d.ts.map +1 -1
- package/dist/appInfo.js +3 -3
- package/dist/appInfo.js.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +23 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +75 -3
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/configuration.d.ts +89 -5
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +11 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +2 -1
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +30 -26
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/electronArchSupport.d.ts +12 -0
- package/dist/electron/electronArchSupport.d.ts.map +1 -0
- package/dist/electron/electronArchSupport.js +58 -0
- package/dist/electron/electronArchSupport.js.map +1 -0
- package/dist/electron/mac/electronMac.js +12 -21
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +24 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
- package/dist/electron/mac/electronMacUtils.js +42 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -0
- package/dist/fileMatcher.d.ts +15 -0
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +41 -2
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +5 -2
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +5 -1
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +17 -6
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +2 -1
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +2 -0
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +28 -2
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +95 -6
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +3 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/types.d.ts +2 -0
- package/dist/node-module-collector/types.d.ts.map +1 -1
- package/dist/node-module-collector/types.js.map +1 -1
- package/dist/options/MsixOptions.d.ts +126 -0
- package/dist/options/MsixOptions.d.ts.map +1 -0
- package/dist/options/MsixOptions.js +2 -0
- package/dist/options/MsixOptions.js.map +1 -0
- package/dist/options/SnapOptions.d.ts +8 -4
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +21 -11
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +7 -6
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +8 -1
- package/dist/packager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +13 -4
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +23 -23
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/archive.d.ts +11 -0
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +40 -22
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +4 -1
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +9 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +3 -3
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +27 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +92 -57
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
- package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraft.js +11 -0
- package/dist/targets/linux/snap/snapcraft.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +18 -2
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +42 -12
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/win/AppxTarget.d.ts +0 -2
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +37 -325
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/MsiTarget.js +2 -2
- package/dist/targets/win/MsiTarget.js.map +1 -1
- package/dist/targets/win/MsixTarget.d.ts +22 -0
- package/dist/targets/win/MsixTarget.d.ts.map +1 -0
- package/dist/targets/win/MsixTarget.js +214 -0
- package/dist/targets/win/MsixTarget.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +5 -0
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/winAppUtil.d.ts +115 -0
- package/dist/targets/win/winAppUtil.d.ts.map +1 -0
- package/dist/targets/win/winAppUtil.js +407 -0
- package/dist/targets/win/winAppUtil.js.map +1 -0
- package/dist/toolsets/custom.js +4 -2
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/icons.d.ts.map +1 -1
- package/dist/toolsets/icons.js +4 -1
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/winCodeSign.d.ts +9 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +11 -0
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +85 -4
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/electronGet.d.ts +5 -0
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +124 -18
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +0 -1
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +0 -3
- package/dist/util/flags.js.map +1 -1
- package/dist/util/packageMetadata.js +46 -31
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +18 -5
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +3 -0
- package/dist/winPackager.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +498 -18
- package/templates/appx/appxmanifest.xml +1 -1
- package/templates/msix/appxmanifest.xml +45 -0
- package/templates/nsis/installSection.nsh +14 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { TargetSpecificOptions } from "../core.js";
|
|
2
|
+
export interface MsixWindowsService {
|
|
3
|
+
/** The service name used in the Windows Service Control Manager. */
|
|
4
|
+
readonly name: string;
|
|
5
|
+
/**
|
|
6
|
+
* Relative path to the service executable within the package.
|
|
7
|
+
* Defaults to the main app executable.
|
|
8
|
+
*/
|
|
9
|
+
readonly executable?: string;
|
|
10
|
+
/**
|
|
11
|
+
* How Windows starts the service. Required by the desktop6 schema.
|
|
12
|
+
* @default "manual"
|
|
13
|
+
*/
|
|
14
|
+
readonly startupType?: "auto" | "manual" | "disabled";
|
|
15
|
+
/**
|
|
16
|
+
* The account the service runs under. Required by the desktop6 schema.
|
|
17
|
+
* @default "localSystem"
|
|
18
|
+
*/
|
|
19
|
+
readonly startAccount?: "localSystem" | "localService" | "networkService";
|
|
20
|
+
/**
|
|
21
|
+
* Optional command-line arguments passed to the service executable.
|
|
22
|
+
*/
|
|
23
|
+
readonly arguments?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface MsixOptions extends TargetSpecificOptions {
|
|
26
|
+
/**
|
|
27
|
+
* The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods.
|
|
28
|
+
* Each field must begin with an ASCII alphabetic character.
|
|
29
|
+
*/
|
|
30
|
+
readonly applicationId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The background color of the app tile.
|
|
33
|
+
* @default #464646
|
|
34
|
+
*/
|
|
35
|
+
readonly backgroundColor?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* A friendly name displayed to users. Corresponds to Properties.DisplayName. Defaults to the application product name.
|
|
38
|
+
*/
|
|
39
|
+
readonly displayName?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* The package identity name. Corresponds to Identity.Name. Defaults to the application name.
|
|
42
|
+
*/
|
|
43
|
+
readonly identityName?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The Windows Store publisher. Not used if MSIX is built for testing.
|
|
46
|
+
*/
|
|
47
|
+
readonly publisher?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* A friendly name for the publisher displayed to users. Corresponds to Properties.PublisherDisplayName.
|
|
50
|
+
* Defaults to company name from the application metadata.
|
|
51
|
+
*/
|
|
52
|
+
readonly publisherDisplayName?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* The list of supported languages listed in the Windows Store. The first entry (index 0) will be the default language.
|
|
55
|
+
* @default ["en-US"]
|
|
56
|
+
*/
|
|
57
|
+
readonly languages?: Array<string> | string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Whether to add auto launch extension. Defaults to `true` if electron-winstore-auto-launch is in the dependencies.
|
|
60
|
+
*/
|
|
61
|
+
readonly addAutoLaunchExtension?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Relative path to custom extensions xml to be included in the AppxManifest.xml.
|
|
64
|
+
*/
|
|
65
|
+
readonly customExtensionsPath?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The list of capabilities to be added to the AppxManifest.xml.
|
|
68
|
+
* The `runFullTrust` capability is obligatory for Electron apps and will be auto-added if not specified.
|
|
69
|
+
* @default ["runFullTrust"]
|
|
70
|
+
*/
|
|
71
|
+
readonly capabilities?: Array<string> | null;
|
|
72
|
+
/**
|
|
73
|
+
* Relative path to a custom AppxManifest.xml template located in the build resources directory.
|
|
74
|
+
* Supports the same `${}` template macros as the default template, including the MSIX-specific
|
|
75
|
+
* `${packageIntegrity}` macro. Windows services are injected via the `${extensions}` macro
|
|
76
|
+
* alongside protocol/file-association extensions.
|
|
77
|
+
*/
|
|
78
|
+
readonly customManifestPath?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to overlay the app's name on top of tile images on the Start screen.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
readonly showNameOnTiles?: boolean;
|
|
84
|
+
/** @private */
|
|
85
|
+
readonly electronUpdaterAware?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Whether to set the build number in the version field.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
readonly setBuildNumber?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Set the MinVersion field in the AppxManifest.xml.
|
|
93
|
+
* @default "10.0.17763.0" (Windows 10 version 1809 — minimum for Store submissions)
|
|
94
|
+
*/
|
|
95
|
+
readonly minVersion?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Set the MaxVersionTested field in the AppxManifest.xml.
|
|
98
|
+
* @default same as minVersion
|
|
99
|
+
*/
|
|
100
|
+
readonly maxVersionTested?: string | null;
|
|
101
|
+
/** @private */
|
|
102
|
+
readonly makeappxArgs?: Array<string> | null;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to produce a .msixbundle when more than one architecture is built.
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
readonly createMsixbundle?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether to produce a .msixupload archive suitable for submission to the Microsoft Store Partner Center.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
readonly createMsixupload?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Enforce package integrity (uap10:PackageIntegrity). Requires Windows 10 version 2004 (build 19041) or later.
|
|
115
|
+
* When enabled, Windows verifies that no files have been tampered with after the package was signed.
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
readonly enforcePackageIntegrity?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Windows Services to register with the MSIX package (desktop6 namespace).
|
|
121
|
+
* Requires Windows 10 version 1903 or later, and the `packagedServices` (or `localSystemServices`)
|
|
122
|
+
* restricted capability declared via `capabilities`.
|
|
123
|
+
*/
|
|
124
|
+
readonly windowsServices?: Array<MsixWindowsService>;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=MsixOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsixOptions.d.ts","sourceRoot":"","sources":["../../src/options/MsixOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,o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;IAEpC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAElC,eAAe;IACf,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAEvC;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IAEjC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzC,eAAe;IACf,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAE5C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsixOptions.js","sourceRoot":"","sources":["../../src/options/MsixOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\n\nexport interface MsixWindowsService {\n /** The service name used in the Windows Service Control Manager. */\n readonly name: string\n /**\n * Relative path to the service executable within the package.\n * Defaults to the main app executable.\n */\n readonly executable?: string\n /**\n * How Windows starts the service. Required by the desktop6 schema.\n * @default \"manual\"\n */\n readonly startupType?: \"auto\" | \"manual\" | \"disabled\"\n /**\n * The account the service runs under. Required by the desktop6 schema.\n * @default \"localSystem\"\n */\n readonly startAccount?: \"localSystem\" | \"localService\" | \"networkService\"\n /**\n * Optional command-line arguments passed to the service executable.\n */\n readonly arguments?: string\n}\n\nexport interface MsixOptions extends TargetSpecificOptions {\n /**\n * The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods.\n * Each field must begin with an ASCII alphabetic character.\n */\n readonly applicationId?: string\n\n /**\n * The background color of the app tile.\n * @default #464646\n */\n readonly backgroundColor?: string | null\n\n /**\n * A friendly name displayed to users. Corresponds to Properties.DisplayName. Defaults to the application product name.\n */\n readonly displayName?: string | null\n\n /**\n * The package identity name. Corresponds to Identity.Name. Defaults to the application name.\n */\n readonly identityName?: string | null\n\n /**\n * The Windows Store publisher. Not used if MSIX is built for testing.\n */\n readonly publisher?: string | null\n\n /**\n * A friendly name for the publisher displayed to users. Corresponds to Properties.PublisherDisplayName.\n * Defaults to company name from the application metadata.\n */\n readonly publisherDisplayName?: string | null\n\n /**\n * The list of supported languages listed in the Windows Store. The first entry (index 0) will be the default language.\n * @default [\"en-US\"]\n */\n readonly languages?: Array<string> | string | null\n\n /**\n * Whether to add auto launch extension. Defaults to `true` if electron-winstore-auto-launch is in the dependencies.\n */\n readonly addAutoLaunchExtension?: boolean\n\n /**\n * Relative path to custom extensions xml to be included in the AppxManifest.xml.\n */\n readonly customExtensionsPath?: string\n\n /**\n * The list of capabilities to be added to the AppxManifest.xml.\n * The `runFullTrust` capability is obligatory for Electron apps and will be auto-added if not specified.\n * @default [\"runFullTrust\"]\n */\n readonly capabilities?: Array<string> | null\n\n /**\n * Relative path to a custom AppxManifest.xml template located in the build resources directory.\n * Supports the same `${}` template macros as the default template, including the MSIX-specific\n * `${packageIntegrity}` macro. Windows services are injected via the `${extensions}` macro\n * alongside protocol/file-association extensions.\n */\n readonly customManifestPath?: string\n\n /**\n * Whether to overlay the app's name on top of tile images on the Start screen.\n * @default false\n */\n readonly showNameOnTiles?: boolean\n\n /** @private */\n readonly electronUpdaterAware?: boolean\n\n /**\n * Whether to set the build number in the version field.\n * @default false\n */\n readonly setBuildNumber?: boolean\n\n /**\n * Set the MinVersion field in the AppxManifest.xml.\n * @default \"10.0.17763.0\" (Windows 10 version 1809 — minimum for Store submissions)\n */\n readonly minVersion?: string | null\n\n /**\n * Set the MaxVersionTested field in the AppxManifest.xml.\n * @default same as minVersion\n */\n readonly maxVersionTested?: string | null\n\n /** @private */\n readonly makeappxArgs?: Array<string> | null\n\n /**\n * Whether to produce a .msixbundle when more than one architecture is built.\n * @default true\n */\n readonly createMsixbundle?: boolean\n\n /**\n * Whether to produce a .msixupload archive suitable for submission to the Microsoft Store Partner Center.\n * @default false\n */\n readonly createMsixupload?: boolean\n\n /**\n * Enforce package integrity (uap10:PackageIntegrity). Requires Windows 10 version 2004 (build 19041) or later.\n * When enabled, Windows verifies that no files have been tampered with after the package was signed.\n * @default false\n */\n readonly enforcePackageIntegrity?: boolean\n\n /**\n * Windows Services to register with the MSIX package (desktop6 namespace).\n * Requires Windows 10 version 1903 or later, and the `packagedServices` (or `localSystemServices`)\n * restricted capability declared via `capabilities`.\n */\n readonly windowsServices?: Array<MsixWindowsService>\n}\n"]}
|
|
@@ -210,9 +210,11 @@ export interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOpt
|
|
|
210
210
|
* Configuration for a remote snap build on [Launchpad](https://launchpad.net/).
|
|
211
211
|
* Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.
|
|
212
212
|
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
213
|
+
* A single remote build can target one or more architectures. Set `buildFor` to a string for one
|
|
214
|
+
* arch, or to an array (e.g. `["amd64", "arm64"]`) to build several architectures in a single
|
|
215
|
+
* `snapcraft remote-build` job on Launchpad that emits a separate snap artifact per arch.
|
|
216
|
+
* Alternatively, the top-level `arch` option (e.g. `arch: ["x64", "arm64"]`) spawns a separate
|
|
217
|
+
* remote-build job per architecture — do not combine that with a `buildFor` array (mutually exclusive).
|
|
216
218
|
*
|
|
217
219
|
* Authentication is resolved in this order:
|
|
218
220
|
* 1. `cscLink` config field — base64-encoded credentials or a file path
|
|
@@ -325,7 +327,9 @@ export interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions
|
|
|
325
327
|
/**
|
|
326
328
|
* Configuration for a remote build on [Launchpad](https://launchpad.net/).
|
|
327
329
|
* Enables cross-architecture builds in CI without native hardware or nested virtualisation.
|
|
328
|
-
*
|
|
330
|
+
* Set `remoteBuild.buildFor: ["amd64", "arm64"]` to build several architectures in one Launchpad
|
|
331
|
+
* job, or the top-level `arch: ["x64", "arm64"]` option to spawn a separate job per architecture
|
|
332
|
+
* (the two are mutually exclusive).
|
|
329
333
|
*/
|
|
330
334
|
readonly remoteBuild?: RemoteBuildOptions | null;
|
|
331
335
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.d.ts","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAEnE;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC1C;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC1C;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAE1C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACtC;;;;OAIG;IACH,QAAQ,CAAC,MAAM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AAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAIlC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAA;CAC7C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAA;CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n */\n readonly core24?: SnapOptions24 | null\n /**\n * Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * Each electron-builder build invocation targets exactly one architecture — to build for multiple\n * architectures, configure the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`); each arch\n * spawns a separate `snapcraft remote-build` job on Launchpad.\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture (or architectures) for the remote build.\n *\n * - **Single string** (e.g. `\"amd64\"`): one Launchpad job, one output snap.\n * - **Array** (e.g. `[\"amd64\", \"arm64\"]`): one Launchpad job that builds all listed\n * architectures and downloads each resulting snap. All produced snaps are emitted as\n * separate build artifacts.\n *\n * Using an array here is mutually exclusive with setting `arch: [\"x64\", \"arm64\"]` at the\n * electron-builder top level — the top-level `arch` option spawns a separate remote-build\n * job per architecture, which would duplicate work.\n *\n * @example \"amd64\"\n * @example [\"amd64\", \"arm64\"]\n */\n buildFor?: string | string[]\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Each build invocation targets one arch; use `arch: [\"x64\", \"arm64\"]` to build for multiple.\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n */\n readonly core24?: SnapOptions24 | null\n /**\n * Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * A single remote build can target one or more architectures. Set `buildFor` to a string for one\n * arch, or to an array (e.g. `[\"amd64\", \"arm64\"]`) to build several architectures in a single\n * `snapcraft remote-build` job on Launchpad that emits a separate snap artifact per arch.\n * Alternatively, the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`) spawns a separate\n * remote-build job per architecture — do not combine that with a `buildFor` array (mutually exclusive).\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture (or architectures) for the remote build.\n *\n * - **Single string** (e.g. `\"amd64\"`): one Launchpad job, one output snap.\n * - **Array** (e.g. `[\"amd64\", \"arm64\"]`): one Launchpad job that builds all listed\n * architectures and downloads each resulting snap. All produced snaps are emitted as\n * separate build artifacts.\n *\n * Using an array here is mutually exclusive with setting `arch: [\"x64\", \"arm64\"]` at the\n * electron-builder top level — the top-level `arch` option spawns a separate remote-build\n * job per architecture, which would duplicate work.\n *\n * @example \"amd64\"\n * @example [\"amd64\", \"arm64\"]\n */\n buildFor?: string | string[]\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Set `remoteBuild.buildFor: [\"amd64\", \"arm64\"]` to build several architectures in one Launchpad\n * job, or the top-level `arch: [\"x64\", \"arm64\"]` option to spawn a separate job per architecture\n * (the two are mutually exclusive).\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TargetConfiguration, TargetSpecificOptions } from "../core.js";
|
|
2
2
|
import { PlatformSpecificBuildOptions } from "./PlatformSpecificBuildOptions.js";
|
|
3
3
|
import { CustomMacSign } from "../macPackager.js";
|
|
4
|
-
import type { OnlySignOptions } from "@electron/osx-sign";
|
|
4
|
+
import type { OnlySignOptions, SigningDistributionType } from "@electron/osx-sign";
|
|
5
5
|
import type { MakeUniversalOpts } from "@electron/universal";
|
|
6
6
|
/**
|
|
7
7
|
* Options forwarded to `@electron/universal`'s `makeUniversalApp`.
|
|
@@ -20,15 +20,27 @@ export interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, "x64Ap
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control
|
|
23
|
-
* itself — `app`, `keychain`, `platform`, `version`, `optionsForFile
|
|
24
|
-
* build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.
|
|
23
|
+
* itself — `app`, `keychain`, `platform`, `version`, and `optionsForFile` — and forwards everything else.
|
|
25
24
|
*
|
|
26
25
|
* Additionally exposes a small set of per-file convenience fields that electron-builder maps
|
|
27
26
|
* internally through `optionsForFile`.
|
|
28
27
|
*
|
|
29
28
|
* @see https://packages.electronjs.org/osx-sign
|
|
30
29
|
*/
|
|
31
|
-
export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFile" | "version"
|
|
30
|
+
export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFile" | "version"> {
|
|
31
|
+
/**
|
|
32
|
+
* The type of certificate to use when signing: `development` or `distribution`.
|
|
33
|
+
*
|
|
34
|
+
* Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.
|
|
35
|
+
* Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or
|
|
36
|
+
* `Apple Development` certificate instead of `Developer ID Application` and embeds a matching
|
|
37
|
+
* development provisioning profile.
|
|
38
|
+
*
|
|
39
|
+
* Development-signed apps are blocked by Gatekeeper on other machines; users must use the
|
|
40
|
+
* right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.
|
|
41
|
+
* Such builds are not suitable for production distribution and cannot be notarized.
|
|
42
|
+
*/
|
|
43
|
+
readonly type?: SigningDistributionType;
|
|
32
44
|
/**
|
|
33
45
|
* The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.
|
|
34
46
|
* Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.
|
|
@@ -59,9 +71,7 @@ export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFi
|
|
|
59
71
|
* Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).
|
|
60
72
|
*
|
|
61
73
|
* Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).
|
|
62
|
-
* Defaults to `true` for `darwin` builds and `false` for `mas-dev
|
|
63
|
-
*
|
|
64
|
-
* @see https://github.com/electron/fuses
|
|
74
|
+
* Defaults to `true` for `darwin` builds and `false` for MAS builds (`mas` and `mas-dev`).
|
|
65
75
|
*/
|
|
66
76
|
readonly hardenedRuntime?: boolean;
|
|
67
77
|
/**
|
|
@@ -239,14 +249,14 @@ export interface DmgOptions extends TargetSpecificOptions {
|
|
|
239
249
|
*/
|
|
240
250
|
contents?: Array<DmgContent>;
|
|
241
251
|
/**
|
|
242
|
-
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).
|
|
252
|
+
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).
|
|
243
253
|
* @default UDZO
|
|
244
254
|
*/
|
|
245
|
-
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO";
|
|
255
|
+
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO" | "ULMO";
|
|
246
256
|
/**
|
|
247
257
|
* The filesystem for the DMG volume (e.g. `"APFS"` or `"HFS+"`)
|
|
248
|
-
*
|
|
249
|
-
* @default
|
|
258
|
+
* As of v27 this defaults to APFS. Set it explicitly to `"HFS+"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).
|
|
259
|
+
* @default APFS
|
|
250
260
|
*/
|
|
251
261
|
readonly filesystem?: "HFS+" | "APFS" | null;
|
|
252
262
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.d.ts","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"macOptions.d.ts","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,GAAG,OAAO,CAAC;IAC/H;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,SAAS,CAAC;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;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IAEhD;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAGD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, `optionsForFile`, and `type` (derived from the\n * build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\" | \"type\"> {\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for `mas-dev`.\n *\n * @see https://github.com/electron/fuses\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * This will be changed to APFS in the next major release, so it is recommended to set it explicitly to HFS+ if you want to keep using HFS+ (e.g. for better compatibility with older macOS versions).\n * @default HFS+\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
|
|
1
|
+
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions, SigningDistributionType } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, and `optionsForFile` — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\"> {\n /**\n * The type of certificate to use when signing: `development` or `distribution`.\n *\n * Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.\n * Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or\n * `Apple Development` certificate instead of `Developer ID Application` and embeds a matching\n * development provisioning profile.\n *\n * Development-signed apps are blocked by Gatekeeper on other machines; users must use the\n * right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.\n * Such builds are not suitable for production distribution and cannot be notarized.\n */\n readonly type?: SigningDistributionType\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for MAS builds (`mas` and `mas-dev`).\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\" | \"ULMO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * As of v27 this defaults to APFS. Set it explicitly to `\"HFS+\"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).\n * @default APFS\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
|
|
@@ -3,8 +3,8 @@ import { TargetConfigType } from "../core.js";
|
|
|
3
3
|
import { PlatformSpecificBuildOptions } from "./PlatformSpecificBuildOptions.js";
|
|
4
4
|
export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
5
5
|
/**
|
|
6
|
-
* The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]https://www.electron.build/nsis#portable)
|
|
7
|
-
* AppX
|
|
6
|
+
* The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable app](https://www.electron.build/nsis#portable) without installation), `appx`, `msix`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
|
7
|
+
* AppX and MSIX packages can be built on Windows 10 or Windows Server 2012 R2 (version 6.3+) or later, and on macOS via Parallels Desktop.
|
|
8
8
|
*
|
|
9
9
|
* To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.
|
|
10
10
|
*
|
|
@@ -32,10 +32,11 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
32
32
|
* `https://` URL, or a base64-encoded certificate. This is the recommended setup for CI.
|
|
33
33
|
* - Set to `false` or `null` to **disable** code signing entirely (executable resources such as
|
|
34
34
|
* the icon and metadata are still edited).
|
|
35
|
-
* - Set to an **object** to configure signing explicitly. The `type` field selects the
|
|
36
|
-
* backend (`signtool`
|
|
37
|
-
* provide exactly one of the modes below.
|
|
38
|
-
*
|
|
35
|
+
* - Set to an **object** to configure signing explicitly. The **required** `type` field selects the
|
|
36
|
+
* signing backend (`signtool`, `hsm`, `pkcs11`, or `azure`) and dispatches to a dedicated sign
|
|
37
|
+
* manager; provide exactly one of the modes below. When `win.sign` is left unset, the `signtool`
|
|
38
|
+
* backend is used with env-discovered credentials. Each output artifact is signed individually,
|
|
39
|
+
* and by default executables are dual-signed (see `signingHashAlgorithms`).
|
|
39
40
|
*
|
|
40
41
|
* - `{ type: "signtool", ... }` — Sign with a local certificate file (.pfx/.p12) or a
|
|
41
42
|
* certificate from the Windows certificate store. Uses Microsoft `signtool.exe` on Windows and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IACxE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExC
|
|
1
|
+
{"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IACxE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,QAAQ,CAAC,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