app-builder-lib 27.0.0-alpha.2 → 27.0.0-alpha.3
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/Framework.d.ts +2 -0
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js.map +1 -1
- package/dist/asar/asarFileChecker.d.ts +4 -2
- package/dist/asar/asarFileChecker.d.ts.map +1 -1
- package/dist/asar/asarFileChecker.js +2 -3
- package/dist/asar/asarFileChecker.js.map +1 -1
- package/dist/codeSign/certInfo.d.ts +14 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -1
- package/dist/codeSign/certInfo.js +49 -0
- package/dist/codeSign/certInfo.js.map +1 -1
- package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +40 -14
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
- package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/hsmSignManager.js +50 -0
- package/dist/codeSign/win/hsmSignManager.js.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.js +82 -0
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
- package/dist/codeSign/{signManager.d.ts → win/signManager.d.ts} +8 -6
- package/dist/codeSign/win/signManager.d.ts.map +1 -0
- package/dist/codeSign/win/signManager.js +19 -0
- package/dist/codeSign/win/signManager.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +71 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js +407 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
- package/dist/codeSign/win/windowsCodeSign.js +9 -4
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +9 -3
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +130 -36
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.js +3 -363
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
- package/dist/configuration.d.ts +19 -120
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +0 -2
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +15 -27
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/injectFFMPEG.js +2 -2
- package/dist/electron/injectFFMPEG.js.map +1 -1
- package/dist/electron/mac/electronMac.js +10 -8
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/win/electronWin.js +1 -2
- package/dist/electron/win/electronWin.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +2 -2
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +1 -1
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts +14 -10
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +114 -121
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +7 -1
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +2 -2
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +48 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +216 -17
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/options/FuseOptionsV1.d.ts +137 -0
- package/dist/options/FuseOptionsV1.d.ts.map +1 -0
- package/dist/options/FuseOptionsV1.js +2 -0
- package/dist/options/FuseOptionsV1.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +93 -126
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +137 -63
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js +12 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/platformPackager.d.ts +4 -2
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +11 -7
- package/dist/platformPackager.js.map +1 -1
- package/dist/targets/ArchiveTarget.js +2 -2
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts +10 -2
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +25 -6
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +2 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +48 -8
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +2 -2
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +3 -4
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
- package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapCommand.js +27 -0
- package/dist/targets/linux/snap/snapCommand.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +12 -12
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +72 -67
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +4 -4
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +4 -4
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +2 -2
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +2 -2
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/toolsets/custom.d.ts +1 -0
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +19 -8
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/icons.js +1 -1
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/winCodeSign.d.ts +36 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +84 -30
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +20 -12
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/config/schemaValidator.d.ts.map +1 -1
- package/dist/util/config/schemaValidator.js +1 -1
- package/dist/util/config/schemaValidator.js.map +1 -1
- package/dist/util/electronGet.d.ts +8 -25
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +107 -87
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +0 -3
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +0 -9
- package/dist/util/flags.js.map +1 -1
- package/dist/util/license.d.ts.map +1 -1
- package/dist/util/license.js +4 -1
- package/dist/util/license.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 +13 -2
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/vm/vm.d.ts.map +1 -1
- package/dist/vm/vm.js +4 -1
- package/dist/vm/vm.js.map +1 -1
- package/dist/winPackager.d.ts +1 -2
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +17 -22
- package/dist/winPackager.js.map +1 -1
- package/package.json +15 -14
- package/scheme.json +484 -432
- package/dist/codeSign/signManager.d.ts.map +0 -1
- package/dist/codeSign/signManager.js +0 -2
- package/dist/codeSign/signManager.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Nullish } from "builder-util-runtime";
|
|
2
1
|
import { CustomWindowsSign } from "../codeSign/win/windowsSignToolManager.js";
|
|
3
2
|
import { TargetConfigType } from "../core.js";
|
|
4
3
|
import { PlatformSpecificBuildOptions } from "./PlatformSpecificBuildOptions.js";
|
|
@@ -22,15 +21,22 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
22
21
|
*/
|
|
23
22
|
readonly legalTrademarks?: string | null;
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
* Code signing configuration. Set to `false` or `null` to disable Windows code signing
|
|
25
|
+
* (executable resources such as the icon and metadata are still edited). Leave unset to
|
|
26
|
+
* sign using credentials discovered from the environment (e.g. `WIN_CSC_LINK`). Otherwise
|
|
27
|
+
* provide exactly one of the following signing modes:
|
|
28
|
+
*
|
|
29
|
+
* - `{ type: "signtool", ... }` — Sign with a local certificate file (.pfx/.p12) or a
|
|
30
|
+
* certificate from the Windows certificate store.
|
|
31
|
+
* - `{ type: "hsm", ... }` — Sign using a Hardware Security Module (HSM) or FIPS-compliant
|
|
32
|
+
* hardware token via signtool's `/csp` (cryptographic service provider) and `/kc` (key
|
|
33
|
+
* container) flags. Requires `toolsets.winCodeSign: "1.x"`. Windows-only.
|
|
34
|
+
* - `{ type: "pkcs11", ... }` — Sign using a PKCS#11 hardware token via osslsigncode.
|
|
35
|
+
* Available on macOS and Linux CI without a Windows VM.
|
|
36
|
+
* - `{ type: "azure", ... }` — Sign via Azure Trusted Signing (cloud service). Requires
|
|
37
|
+
* Azure Entra ID environment variables for authentication.
|
|
38
|
+
*/
|
|
39
|
+
readonly sign?: WindowsSigningConfiguration | false | null;
|
|
34
40
|
/**
|
|
35
41
|
* Whether to verify the signature of an available update before installation.
|
|
36
42
|
* The [publisher name](#publisherName) will be used for the signature verification.
|
|
@@ -44,24 +50,6 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
44
50
|
* @default asInvoker
|
|
45
51
|
*/
|
|
46
52
|
readonly requestedExecutionLevel?: RequestedExecutionLevel | null;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to sign and add metadata to executable via [`resedit`](https://www.npmjs.com/package/resedit).
|
|
49
|
-
* Metadata includes information about the app name/description/version, publisher, copyright, etc.
|
|
50
|
-
* This property also is responsible for adding the app icon and setting execution level.
|
|
51
|
-
* Set to `false` only if you need to fully disable resedit-based resource editing.
|
|
52
|
-
* To skip only code signing while keeping resource editing, use `signExecutable: false` instead.
|
|
53
|
-
* @default true
|
|
54
|
-
*/
|
|
55
|
-
readonly signAndEditExecutable?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Whether to sign Windows executables and any additional files matched by `signExts`.
|
|
58
|
-
* Set to `false` to skip Windows code signing while still editing executable resources
|
|
59
|
-
* (icon, metadata, etc. via [`resedit`](https://www.npmjs.com/package/resedit)).
|
|
60
|
-
* This option is not limited to the main executable edit/sign flow and can also affect
|
|
61
|
-
* signing of Windows installers or other artifacts that use the standard signing path.
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
readonly signExecutable?: boolean;
|
|
65
53
|
/**
|
|
66
54
|
* Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.
|
|
67
55
|
* Supports negative patterns, e.g. example that excludes `.appx` files: `["somefilename", ".dll", "!.appx"]`.
|
|
@@ -71,96 +59,182 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
71
59
|
readonly signExts?: string[] | null;
|
|
72
60
|
}
|
|
73
61
|
export type RequestedExecutionLevel = "asInvoker" | "highestAvailable" | "requireAdministrator";
|
|
74
|
-
|
|
62
|
+
interface WindowsSigningSharedOptions {
|
|
75
63
|
/**
|
|
76
|
-
* The
|
|
64
|
+
* [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.
|
|
65
|
+
* Defaults to common name from your code signing certificate.
|
|
77
66
|
*/
|
|
78
|
-
readonly
|
|
67
|
+
readonly publisherName?: string | Array<string> | null;
|
|
79
68
|
/**
|
|
80
69
|
* Array of signing algorithms used. For AppX `sha256` is always used.
|
|
81
70
|
* @default ['sha1', 'sha256']
|
|
82
71
|
*/
|
|
83
72
|
readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
|
|
84
73
|
/**
|
|
85
|
-
* The
|
|
86
|
-
*
|
|
74
|
+
* The URL of the RFC 3161 time stamp server.
|
|
75
|
+
* @default http://timestamp.digicert.com
|
|
76
|
+
*/
|
|
77
|
+
readonly rfc3161TimeStampServer?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* The URL of the time stamp server.
|
|
80
|
+
* @default http://timestamp.digicert.com
|
|
81
|
+
*/
|
|
82
|
+
readonly timeStampServer?: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* The path to an additional certificate file you want to add to the signature block.
|
|
85
|
+
*/
|
|
86
|
+
readonly additionalCertificateFile?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* The custom function (or path to file or module id) to sign Windows executables.
|
|
89
|
+
*/
|
|
90
|
+
readonly sign?: CustomWindowsSign | string | null;
|
|
91
|
+
}
|
|
92
|
+
export interface WindowsSigntoolSigningConfig extends WindowsSigningSharedOptions {
|
|
93
|
+
readonly type: "signtool";
|
|
94
|
+
/**
|
|
95
|
+
* The path to the *.pfx or *.p12 certificate file. Prefer the `WIN_CSC_LINK` environment
|
|
96
|
+
* variable when possible. See [Code Signing](https://www.electron.build/code-signing).
|
|
87
97
|
*/
|
|
88
98
|
readonly certificateFile?: string | null;
|
|
89
99
|
/**
|
|
90
|
-
* The password to the certificate provided in `certificateFile`.
|
|
91
|
-
*
|
|
100
|
+
* The password to the certificate provided in `certificateFile`. Prefer the
|
|
101
|
+
* `WIN_CSC_KEY_PASSWORD` environment variable when possible.
|
|
92
102
|
*/
|
|
93
103
|
readonly certificatePassword?: string | null;
|
|
94
104
|
/**
|
|
95
|
-
* The name of the subject of the signing certificate
|
|
105
|
+
* The name of the subject of the signing certificate. Required for EV Code Signing.
|
|
106
|
+
* Works only on Windows (or macOS with Parallels Desktop).
|
|
96
107
|
*/
|
|
97
108
|
readonly certificateSubjectName?: string | null;
|
|
98
109
|
/**
|
|
99
|
-
* The SHA1 hash of the signing certificate.
|
|
110
|
+
* The SHA1 hash of the signing certificate. Works only on Windows (or macOS with Parallels Desktop).
|
|
100
111
|
*/
|
|
101
112
|
readonly certificateSha1?: string | null;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @beta HSM signing is available in v27 as a beta feature. The interface is stable but
|
|
116
|
+
* real-hardware test coverage is limited.
|
|
117
|
+
*/
|
|
118
|
+
export interface WindowsHsmSigningConfig extends WindowsSigningSharedOptions {
|
|
119
|
+
readonly type: "hsm";
|
|
120
|
+
/**
|
|
121
|
+
* The name of the cryptographic service provider (CSP) that holds the private key.
|
|
122
|
+
* Maps to signtool's `/csp` flag. Examples:
|
|
123
|
+
* - Google Cloud KMS: `"Google Cloud KMS Provider"`
|
|
124
|
+
* - Smart card / FIPS token: `"Microsoft Base Smart Card Crypto Provider"`
|
|
125
|
+
*
|
|
126
|
+
* Requires `toolsets.winCodeSign: "1.x"`. Windows-only — use `type: "pkcs11"` on macOS/Linux.
|
|
127
|
+
*/
|
|
128
|
+
readonly cryptoServiceProvider: string;
|
|
102
129
|
/**
|
|
103
|
-
* The
|
|
130
|
+
* The key container name within the CSP. Maps to signtool's `/kc` flag.
|
|
131
|
+
*
|
|
132
|
+
* Example for Google Cloud KMS:
|
|
133
|
+
* `"projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY_NAME/cryptoKeyVersions/1"`
|
|
104
134
|
*/
|
|
105
|
-
readonly
|
|
135
|
+
readonly keyContainer: string;
|
|
106
136
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
137
|
+
* Path to the certificate file containing the public certificate chain (.crt / .cer / .pfx).
|
|
138
|
+
* The private key is NOT read from this file — it is provided by the HSM via `cryptoServiceProvider`.
|
|
109
139
|
*/
|
|
110
|
-
readonly
|
|
140
|
+
readonly certificateFile?: string | null;
|
|
111
141
|
/**
|
|
112
|
-
* The
|
|
113
|
-
* @default http://timestamp.digicert.com
|
|
142
|
+
* The SHA1 thumbprint of the certificate in the Windows certificate store.
|
|
114
143
|
*/
|
|
115
|
-
readonly
|
|
144
|
+
readonly certificateSha1?: string | null;
|
|
116
145
|
/**
|
|
117
|
-
*
|
|
118
|
-
* Defaults to common name from your code signing certificate.
|
|
146
|
+
* The subject name of the certificate in the Windows certificate store.
|
|
119
147
|
*/
|
|
120
|
-
readonly
|
|
148
|
+
readonly certificateSubjectName?: string | null;
|
|
121
149
|
}
|
|
122
|
-
|
|
150
|
+
/**
|
|
151
|
+
* @beta PKCS#11 signing is available in v27 as a beta feature. The interface is stable but
|
|
152
|
+
* real-hardware test coverage is limited.
|
|
153
|
+
*/
|
|
154
|
+
export interface WindowsPkcs11SigningConfig extends WindowsSigningSharedOptions {
|
|
155
|
+
readonly type: "pkcs11";
|
|
156
|
+
/**
|
|
157
|
+
* Path to the PKCS#11 shared library (`.so` on Linux, `.dylib` on macOS).
|
|
158
|
+
* The library must be installed separately — electron-builder does not bundle it.
|
|
159
|
+
*
|
|
160
|
+
* Example: `"/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so"`
|
|
161
|
+
*
|
|
162
|
+
* Must be paired with `pkcs11KeyUri`.
|
|
163
|
+
*/
|
|
164
|
+
readonly pkcs11Module: string;
|
|
165
|
+
/**
|
|
166
|
+
* RFC 7512 PKCS#11 URI identifying the private key within the module.
|
|
167
|
+
* Maps to osslsigncode's `-key` parameter.
|
|
168
|
+
*
|
|
169
|
+
* Example: `"pkcs11:token=MyToken;object=MyKey;type=private"`
|
|
170
|
+
*
|
|
171
|
+
* Must be paired with `pkcs11Module`.
|
|
172
|
+
*/
|
|
173
|
+
readonly pkcs11KeyUri: string;
|
|
174
|
+
/**
|
|
175
|
+
* Optional path to a certificate chain file to accompany the PKCS#11 key.
|
|
176
|
+
* If omitted the certificate embedded in the token is used.
|
|
177
|
+
*/
|
|
178
|
+
readonly certificateFile?: string | null;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @beta The `signtool /dlib` Azure Trusted Signing integration introduced in v27 is a beta
|
|
182
|
+
* feature. The legacy PowerShell fallback (triggered when `toolsets.winCodeSign` is unset or
|
|
183
|
+
* `"0.0.0"`) remains supported for migration.
|
|
184
|
+
*/
|
|
185
|
+
export interface WindowsAzureSigningConfig {
|
|
186
|
+
readonly type: "azure";
|
|
123
187
|
/**
|
|
124
188
|
* [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.
|
|
125
189
|
*/
|
|
126
190
|
readonly publisherName: string;
|
|
127
191
|
/**
|
|
128
|
-
* The Trusted Signing Account endpoint. The URI value must
|
|
129
|
-
*
|
|
130
|
-
* in during the setup of these resources.
|
|
131
|
-
*
|
|
132
|
-
* Translates to field: Endpoint
|
|
192
|
+
* The Trusted Signing Account endpoint. The URI value must align to the region your Trusted
|
|
193
|
+
* Signing Account and Certificate Profile were created in.
|
|
133
194
|
*
|
|
134
|
-
* Requires
|
|
195
|
+
* Requires Azure Entra ID environment variables per
|
|
196
|
+
* [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition).
|
|
135
197
|
*/
|
|
136
198
|
readonly endpoint: string;
|
|
137
199
|
/**
|
|
138
|
-
* The Certificate Profile name. Translates to field: CertificateProfileName
|
|
200
|
+
* The Certificate Profile name. Translates to field: CertificateProfileName.
|
|
139
201
|
*/
|
|
140
202
|
readonly certificateProfileName: string;
|
|
141
203
|
/**
|
|
142
|
-
* The Code Signing
|
|
204
|
+
* The Code Signing Account name. Translates to field: CodeSigningAccountName.
|
|
143
205
|
*/
|
|
144
206
|
readonly codeSigningAccountName: string;
|
|
145
207
|
/**
|
|
146
|
-
* The
|
|
208
|
+
* The file digest algorithm. Translates to field: FileDigest.
|
|
147
209
|
* @default SHA256
|
|
148
210
|
*/
|
|
149
211
|
readonly fileDigest?: string;
|
|
150
212
|
/**
|
|
151
|
-
* The
|
|
213
|
+
* The RFC3161 timestamp server. Translates to field: TimestampRfc3161.
|
|
152
214
|
* @default http://timestamp.acs.microsoft.com
|
|
153
215
|
*/
|
|
154
216
|
readonly timestampRfc3161?: string;
|
|
155
217
|
/**
|
|
156
|
-
* The
|
|
218
|
+
* The timestamp digest algorithm. Translates to field: TimestampDigest.
|
|
157
219
|
* @default SHA256
|
|
158
220
|
*/
|
|
159
221
|
readonly timestampDigest?: string;
|
|
160
222
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
223
|
+
* Additional fields to include verbatim in the `metadata.json` file passed to
|
|
224
|
+
* `Azure.CodeSigning.Dlib.dll` via `signtool /dmdf`. Use this for DLib-specific options
|
|
225
|
+
* not covered by the typed fields above (e.g. `ExcludeCredentials`, `CorrelationId`).
|
|
163
226
|
*/
|
|
164
|
-
|
|
227
|
+
readonly additionalMetadata?: Record<string, string>;
|
|
165
228
|
}
|
|
229
|
+
export type WindowsSigningConfiguration = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig | WindowsAzureSigningConfig;
|
|
230
|
+
/** Signing modes that use signtool.exe or osslsigncode (not Azure). */
|
|
231
|
+
export type WindowsSigntoolFamilyConfig = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig;
|
|
232
|
+
/**
|
|
233
|
+
* Resolves the active signing configuration object. `false`, `null`, and unset all mean
|
|
234
|
+
* "no explicit signing config object" (env-based discovery still applies when unset).
|
|
235
|
+
*/
|
|
236
|
+
export declare function resolveWindowsSigningConfiguration(config: WindowsConfiguration): WindowsSigningConfiguration | null;
|
|
237
|
+
/** Whether Windows code signing has been explicitly disabled via `sign: false | null`. */
|
|
238
|
+
export declare function isWindowsSigningDisabled(config: WindowsConfiguration): boolean;
|
|
239
|
+
export {};
|
|
166
240
|
//# sourceMappingURL=winOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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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IAAI,EAAE,OAAO,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAE9B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAA;IAEvC;;OAEG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAA;IAEvC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAE5B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrD;AAID,MAAM,MAAM,2BAA2B,GAAG,4BAA4B,GAAG,uBAAuB,GAAG,0BAA0B,GAAG,yBAAyB,CAAA;AAEzJ,uEAAuE;AACvE,MAAM,MAAM,2BAA2B,GAAG,4BAA4B,GAAG,uBAAuB,GAAG,0BAA0B,CAAA;AAE7H;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,oBAAoB,GAAG,2BAA2B,GAAG,IAAI,CAGnH;AAED,0FAA0F;AAC1F,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAE9E"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the active signing configuration object. `false`, `null`, and unset all mean
|
|
3
|
+
* "no explicit signing config object" (env-based discovery still applies when unset).
|
|
4
|
+
*/
|
|
5
|
+
export function resolveWindowsSigningConfiguration(config) {
|
|
6
|
+
const { sign } = config;
|
|
7
|
+
return sign == null || sign === false ? null : sign;
|
|
8
|
+
}
|
|
9
|
+
/** Whether Windows code signing has been explicitly disabled via `sign: false | null`. */
|
|
10
|
+
export function isWindowsSigningDisabled(config) {
|
|
11
|
+
return config.sign === false || config.sign === null;
|
|
12
|
+
}
|
|
2
13
|
//# sourceMappingURL=winOptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullish } from \"builder-util-runtime\"\nimport { CustomWindowsSign } from \"../codeSign/win/windowsSignToolManager.js\"\nimport { TargetConfigType } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]https://www.electron.build/nsis#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * AppX package can be built only on Windows 10.\n *\n * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.\n *\n * @default nsis\n */\n readonly target?: TargetConfigType\n\n /**\n * The path to application icon.\n * @default build/icon.ico\n */\n readonly icon?: string | null\n\n /**\n * The trademarks and registered trademarks.\n */\n readonly legalTrademarks?: string | null\n\n /**\n * Options for usage with signtool.exe\n * Cannot be used in conjunction with `azureSignOptions`, signing will default to Azure Trusted Signing\n */\n readonly signtoolOptions?: WindowsSigntoolConfiguration | null\n\n /**\n * Options for usage of Azure Trusted Signing service\n * Cannot be used in conjunction with `signtoolOptions`, signing will default to Azure Trusted Signing\n */\n readonly azureSignOptions?: WindowsAzureSigningConfiguration | null\n\n /**\n * Whether to verify the signature of an available update before installation.\n * The [publisher name](#publisherName) will be used for the signature verification.\n *\n * @default true\n */\n readonly verifyUpdateCodeSignature?: boolean\n\n /**\n * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.\n * Cannot be specified per target, allowed only in the `win`.\n * @default asInvoker\n */\n readonly requestedExecutionLevel?: RequestedExecutionLevel | null\n\n /**\n * Whether to sign and add metadata to executable via [`resedit`](https://www.npmjs.com/package/resedit).\n * Metadata includes information about the app name/description/version, publisher, copyright, etc.\n * This property also is responsible for adding the app icon and setting execution level.\n * Set to `false` only if you need to fully disable resedit-based resource editing.\n * To skip only code signing while keeping resource editing, use `signExecutable: false` instead.\n * @default true\n */\n readonly signAndEditExecutable?: boolean\n\n /**\n * Whether to sign Windows executables and any additional files matched by `signExts`.\n * Set to `false` to skip Windows code signing while still editing executable resources\n * (icon, metadata, etc. via [`resedit`](https://www.npmjs.com/package/resedit)).\n * This option is not limited to the main executable edit/sign flow and can also affect\n * signing of Windows installers or other artifacts that use the standard signing path.\n * @default true\n */\n readonly signExecutable?: boolean\n\n /**\n * Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.\n * Supports negative patterns, e.g. example that excludes `.appx` files: `[\"somefilename\", \".dll\", \"!.appx\"]`.\n * @see https://github.com/electron-userland/electron-builder/issues/7329\n * @default null\n */\n readonly signExts?: string[] | null\n}\n\nexport type RequestedExecutionLevel = \"asInvoker\" | \"highestAvailable\" | \"requireAdministrator\"\n\nexport interface WindowsSigntoolConfiguration {\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n */\n readonly sign?: CustomWindowsSign | string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.\n * Please see [Code Signing](https://www.electron.build/code-signing).\n */\n readonly certificateFile?: string | null\n\n /**\n * The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.\n * Please see [Code Signing](https://www.electron.build/code-signing).\n */\n readonly certificatePassword?: string | null\n\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).\n */\n readonly certificateSha1?: string | null\n\n /**\n * The path to an additional certificate file you want to add to the signature block.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n */\n readonly publisherName?: string | Array<string> | null\n}\n\n// https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations\nexport interface WindowsAzureSigningConfiguration {\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n */\n readonly publisherName: string\n /**\n * The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the\n * region your Trusted Signing Account and Certificate Profile you are specifying were created\n * in during the setup of these resources.\n *\n * Translates to field: Endpoint\n *\n * Requires one of environment variable configurations for authenticating to Microsoft Entra ID per [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition)\n */\n readonly endpoint: string\n /**\n * The Certificate Profile name. Translates to field: CertificateProfileName\n */\n readonly certificateProfileName: string\n /**\n * The Code Signing Signing Account name. Translates to field: CodeSigningAccountName\n */\n readonly codeSigningAccountName: string\n /**\n * The File Digest for signing each file. Translates to field: FileDigest\n * @default SHA256\n */\n readonly fileDigest?: string\n /**\n * The Timestamp rfc3161 server. Translates to field: TimestampRfc3161\n * @default http://timestamp.acs.microsoft.com\n */\n readonly timestampRfc3161?: string\n /**\n * The Timestamp Digest. Translates to field: TimestampDigest\n * @default SHA256\n */\n readonly timestampDigest?: string\n /**\n * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning`\n * Note: Key-Value pairs with `undefined`/`null` value are filtered out of the command.\n */\n [k: string]: string | Nullish\n}\n"]}
|
|
1
|
+
{"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AA4RA;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,MAA4B;IAC7E,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;IACvB,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AACrD,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,wBAAwB,CAAC,MAA4B;IACnE,OAAO,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,CAAA;AACtD,CAAC","sourcesContent":["import { CustomWindowsSign } from \"../codeSign/win/windowsSignToolManager.js\"\nimport { TargetConfigType } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]https://www.electron.build/nsis#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * AppX package can be built only on Windows 10.\n *\n * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.\n *\n * @default nsis\n */\n readonly target?: TargetConfigType\n\n /**\n * The path to application icon.\n * @default build/icon.ico\n */\n readonly icon?: string | null\n\n /**\n * The trademarks and registered trademarks.\n */\n readonly legalTrademarks?: string | null\n\n /**\n * Code signing configuration. Set to `false` or `null` to disable Windows code signing\n * (executable resources such as the icon and metadata are still edited). Leave unset to\n * sign using credentials discovered from the environment (e.g. `WIN_CSC_LINK`). Otherwise\n * provide exactly one of the following signing modes:\n *\n * - `{ type: \"signtool\", ... }` — Sign with a local certificate file (.pfx/.p12) or a\n * certificate from the Windows certificate store.\n * - `{ type: \"hsm\", ... }` — Sign using a Hardware Security Module (HSM) or FIPS-compliant\n * hardware token via signtool's `/csp` (cryptographic service provider) and `/kc` (key\n * container) flags. Requires `toolsets.winCodeSign: \"1.x\"`. Windows-only.\n * - `{ type: \"pkcs11\", ... }` — Sign using a PKCS#11 hardware token via osslsigncode.\n * Available on macOS and Linux CI without a Windows VM.\n * - `{ type: \"azure\", ... }` — Sign via Azure Trusted Signing (cloud service). Requires\n * Azure Entra ID environment variables for authentication.\n */\n readonly sign?: WindowsSigningConfiguration | false | null\n\n /**\n * Whether to verify the signature of an available update before installation.\n * The [publisher name](#publisherName) will be used for the signature verification.\n *\n * @default true\n */\n readonly verifyUpdateCodeSignature?: boolean\n\n /**\n * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.\n * Cannot be specified per target, allowed only in the `win`.\n * @default asInvoker\n */\n readonly requestedExecutionLevel?: RequestedExecutionLevel | null\n\n /**\n * Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.\n * Supports negative patterns, e.g. example that excludes `.appx` files: `[\"somefilename\", \".dll\", \"!.appx\"]`.\n * @see https://github.com/electron-userland/electron-builder/issues/7329\n * @default null\n */\n readonly signExts?: string[] | null\n}\n\nexport type RequestedExecutionLevel = \"asInvoker\" | \"highestAvailable\" | \"requireAdministrator\"\n\n// ─── Shared base for signtool-family signing modes ───────────────────────────\n\ninterface WindowsSigningSharedOptions {\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n * Defaults to common name from your code signing certificate.\n */\n readonly publisherName?: string | Array<string> | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * The path to an additional certificate file you want to add to the signature block.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * The custom function (or path to file or module id) to sign Windows executables.\n */\n readonly sign?: CustomWindowsSign | string | null\n}\n\n// ─── Signing mode: signtool (file or Windows certificate store) ──────────────\n\nexport interface WindowsSigntoolSigningConfig extends WindowsSigningSharedOptions {\n readonly type: \"signtool\"\n\n /**\n * The path to the *.pfx or *.p12 certificate file. Prefer the `WIN_CSC_LINK` environment\n * variable when possible. See [Code Signing](https://www.electron.build/code-signing).\n */\n readonly certificateFile?: string | null\n\n /**\n * The password to the certificate provided in `certificateFile`. Prefer the\n * `WIN_CSC_KEY_PASSWORD` environment variable when possible.\n */\n readonly certificatePassword?: string | null\n\n /**\n * The name of the subject of the signing certificate. Required for EV Code Signing.\n * Works only on Windows (or macOS with Parallels Desktop).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * The SHA1 hash of the signing certificate. Works only on Windows (or macOS with Parallels Desktop).\n */\n readonly certificateSha1?: string | null\n}\n\n// ─── Signing mode: hsm (Hardware Security Module via signtool /csp /kc) ──────\n\n/**\n * @beta HSM signing is available in v27 as a beta feature. The interface is stable but\n * real-hardware test coverage is limited.\n */\nexport interface WindowsHsmSigningConfig extends WindowsSigningSharedOptions {\n readonly type: \"hsm\"\n\n /**\n * The name of the cryptographic service provider (CSP) that holds the private key.\n * Maps to signtool's `/csp` flag. Examples:\n * - Google Cloud KMS: `\"Google Cloud KMS Provider\"`\n * - Smart card / FIPS token: `\"Microsoft Base Smart Card Crypto Provider\"`\n *\n * Requires `toolsets.winCodeSign: \"1.x\"`. Windows-only — use `type: \"pkcs11\"` on macOS/Linux.\n */\n readonly cryptoServiceProvider: string\n\n /**\n * The key container name within the CSP. Maps to signtool's `/kc` flag.\n *\n * Example for Google Cloud KMS:\n * `\"projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY_NAME/cryptoKeyVersions/1\"`\n */\n readonly keyContainer: string\n\n /**\n * Path to the certificate file containing the public certificate chain (.crt / .cer / .pfx).\n * The private key is NOT read from this file — it is provided by the HSM via `cryptoServiceProvider`.\n */\n readonly certificateFile?: string | null\n\n /**\n * The SHA1 thumbprint of the certificate in the Windows certificate store.\n */\n readonly certificateSha1?: string | null\n\n /**\n * The subject name of the certificate in the Windows certificate store.\n */\n readonly certificateSubjectName?: string | null\n}\n\n// ─── Signing mode: pkcs11 (cross-platform PKCS#11 via osslsigncode) ──────────\n\n/**\n * @beta PKCS#11 signing is available in v27 as a beta feature. The interface is stable but\n * real-hardware test coverage is limited.\n */\nexport interface WindowsPkcs11SigningConfig extends WindowsSigningSharedOptions {\n readonly type: \"pkcs11\"\n\n /**\n * Path to the PKCS#11 shared library (`.so` on Linux, `.dylib` on macOS).\n * The library must be installed separately — electron-builder does not bundle it.\n *\n * Example: `\"/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so\"`\n *\n * Must be paired with `pkcs11KeyUri`.\n */\n readonly pkcs11Module: string\n\n /**\n * RFC 7512 PKCS#11 URI identifying the private key within the module.\n * Maps to osslsigncode's `-key` parameter.\n *\n * Example: `\"pkcs11:token=MyToken;object=MyKey;type=private\"`\n *\n * Must be paired with `pkcs11Module`.\n */\n readonly pkcs11KeyUri: string\n\n /**\n * Optional path to a certificate chain file to accompany the PKCS#11 key.\n * If omitted the certificate embedded in the token is used.\n */\n readonly certificateFile?: string | null\n}\n\n// ─── Signing mode: azure (Azure Trusted Signing) ──────────────────────────────\n\n/**\n * @beta The `signtool /dlib` Azure Trusted Signing integration introduced in v27 is a beta\n * feature. The legacy PowerShell fallback (triggered when `toolsets.winCodeSign` is unset or\n * `\"0.0.0\"`) remains supported for migration.\n */\nexport interface WindowsAzureSigningConfig {\n readonly type: \"azure\"\n\n /**\n * [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.\n */\n readonly publisherName: string\n\n /**\n * The Trusted Signing Account endpoint. The URI value must align to the region your Trusted\n * Signing Account and Certificate Profile were created in.\n *\n * Requires Azure Entra ID environment variables per\n * [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition).\n */\n readonly endpoint: string\n\n /**\n * The Certificate Profile name. Translates to field: CertificateProfileName.\n */\n readonly certificateProfileName: string\n\n /**\n * The Code Signing Account name. Translates to field: CodeSigningAccountName.\n */\n readonly codeSigningAccountName: string\n\n /**\n * The file digest algorithm. Translates to field: FileDigest.\n * @default SHA256\n */\n readonly fileDigest?: string\n\n /**\n * The RFC3161 timestamp server. Translates to field: TimestampRfc3161.\n * @default http://timestamp.acs.microsoft.com\n */\n readonly timestampRfc3161?: string\n\n /**\n * The timestamp digest algorithm. Translates to field: TimestampDigest.\n * @default SHA256\n */\n readonly timestampDigest?: string\n\n /**\n * Additional fields to include verbatim in the `metadata.json` file passed to\n * `Azure.CodeSigning.Dlib.dll` via `signtool /dmdf`. Use this for DLib-specific options\n * not covered by the typed fields above (e.g. `ExcludeCredentials`, `CorrelationId`).\n */\n readonly additionalMetadata?: Record<string, string>\n}\n\n// ─── Discriminated union ──────────────────────────────────────────────────────\n\nexport type WindowsSigningConfiguration = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig | WindowsAzureSigningConfig\n\n/** Signing modes that use signtool.exe or osslsigncode (not Azure). */\nexport type WindowsSigntoolFamilyConfig = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig\n\n/**\n * Resolves the active signing configuration object. `false`, `null`, and unset all mean\n * \"no explicit signing config object\" (env-based discovery still applies when unset).\n */\nexport function resolveWindowsSigningConfiguration(config: WindowsConfiguration): WindowsSigningConfiguration | null {\n const { sign } = config\n return sign == null || sign === false ? null : sign\n}\n\n/** Whether Windows code signing has been explicitly disabled via `sign: false | null`. */\nexport function isWindowsSigningDisabled(config: WindowsConfiguration): boolean {\n return config.sign === false || config.sign === null\n}\n"]}
|
|
@@ -9,12 +9,14 @@ import { GetFileMatchersOptions } from "./fileMatcher.js";
|
|
|
9
9
|
import { Framework } from "./Framework.js";
|
|
10
10
|
import { Platform, SourceRepositoryInfo } from "./core.js";
|
|
11
11
|
import type { AfterPackContext, CompressionLevel, Configuration, ElectronPlatformName, FileAssociation, Packager, PackagerOptions, PlatformSpecificBuildOptions, Target, TargetSpecificOptions } from "./index.js";
|
|
12
|
+
import type { PlatformType } from "./targets/mac/MacTargetHelper.js";
|
|
12
13
|
import { IconFormat, IconInfo } from "./util/iconConverter.js";
|
|
13
14
|
import { AssetCatalogResult } from "./util/mac/macosIconComposer.js";
|
|
14
15
|
export type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {
|
|
15
16
|
outDir: string;
|
|
16
17
|
appOutDir: string;
|
|
17
18
|
platformName: ElectronPlatformName;
|
|
19
|
+
platformType?: PlatformType;
|
|
18
20
|
arch: Arch;
|
|
19
21
|
platformSpecificBuildOptions: DC;
|
|
20
22
|
targets: Array<Target>;
|
|
@@ -90,10 +92,10 @@ export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildO
|
|
|
90
92
|
* ```
|
|
91
93
|
*/
|
|
92
94
|
addElectronFuses(context: AfterPackContext, fuses: FuseConfig): Promise<number>;
|
|
93
|
-
protected doSignAfterPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>): Promise<void>;
|
|
95
|
+
protected doSignAfterPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, platformType: PlatformType | undefined, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>): Promise<void>;
|
|
94
96
|
protected createTransformerForExtraFiles(packContext: AfterPackContext): FileTransformer | null;
|
|
95
97
|
private copyAppFiles;
|
|
96
|
-
protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean>;
|
|
98
|
+
protected signApp(packContext: AfterPackContext, isAsar: boolean, _platformType?: PlatformType): Promise<boolean>;
|
|
97
99
|
getIconPath(): Promise<string | null>;
|
|
98
100
|
private computeAsarOptions;
|
|
99
101
|
getElectronSrcDir(dist: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformPackager.d.ts","sourceRoot":"","sources":["../src/platformPackager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EACL,IAAI,EAEJ,gBAAgB,EAChB,WAAW,EAEX,eAAe,EAShB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAc,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAO7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAKtC,OAAO,EAA2C,sBAAsB,EAAiD,MAAM,kBAAkB,CAAA;AAEjJ,OAAO,EAAE,SAAS,EAAmB,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAG1D,OAAO,KAAK,EACV,gBAAgB,EAEhB,gBAAgB,EAChB,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,IAAI,EAAE,gBAAgB,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,IAAI,CAe3H;AAGD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAEvC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,GAAG,CAAC,GAAG,OAAO,CAE9E"}
|
package/dist/platformPackager.js
CHANGED
|
@@ -208,7 +208,7 @@ export class PlatformPackager {
|
|
|
208
208
|
}
|
|
209
209
|
// Due to node-gyp rewriting GYP_MSVS_VERSION when reused across the same session, we must reset the env var: https://github.com/electron-userland/electron-builder/issues/7256
|
|
210
210
|
delete process.env.GYP_MSVS_VERSION;
|
|
211
|
-
const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets, options } = packOptions;
|
|
211
|
+
const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets, options } = packOptions;
|
|
212
212
|
await this.info.emitBeforePack({
|
|
213
213
|
appOutDir,
|
|
214
214
|
outDir,
|
|
@@ -288,6 +288,7 @@ export class PlatformPackager {
|
|
|
288
288
|
appOutDir,
|
|
289
289
|
asarIntegrity,
|
|
290
290
|
platformName,
|
|
291
|
+
platformType,
|
|
291
292
|
});
|
|
292
293
|
}
|
|
293
294
|
if (this.info.cancellationToken.cancelled) {
|
|
@@ -309,7 +310,7 @@ export class PlatformPackager {
|
|
|
309
310
|
await this.doAddElectronFuses(packContext);
|
|
310
311
|
}
|
|
311
312
|
if (options?.sign ?? true) {
|
|
312
|
-
await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets);
|
|
313
|
+
await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets);
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
// the fuses MUST be flipped right before signing
|
|
@@ -351,6 +352,9 @@ export class PlatformPackager {
|
|
|
351
352
|
if (fuses.grantFileProtocolExtraPrivileges != null) {
|
|
352
353
|
config[FuseV1Options.GrantFileProtocolExtraPrivileges] = fuses.grantFileProtocolExtraPrivileges;
|
|
353
354
|
}
|
|
355
|
+
if (fuses.wasmTrapHandlers != null) {
|
|
356
|
+
config[FuseV1Options.WasmTrapHandlers] = fuses.wasmTrapHandlers;
|
|
357
|
+
}
|
|
354
358
|
return config;
|
|
355
359
|
}
|
|
356
360
|
/**
|
|
@@ -379,7 +383,7 @@ export class PlatformPackager {
|
|
|
379
383
|
const { flipFuses } = await dynamicImport("@electron/fuses");
|
|
380
384
|
return flipFuses(electronBinaryPath, fuses);
|
|
381
385
|
}
|
|
382
|
-
async doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets) {
|
|
386
|
+
async doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets) {
|
|
383
387
|
const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions);
|
|
384
388
|
const isAsar = asarOptions != null;
|
|
385
389
|
const packContext = {
|
|
@@ -390,7 +394,7 @@ export class PlatformPackager {
|
|
|
390
394
|
packager: this,
|
|
391
395
|
electronPlatformName: platformName,
|
|
392
396
|
};
|
|
393
|
-
const didSign = await this.signApp(packContext, isAsar);
|
|
397
|
+
const didSign = await this.signApp(packContext, isAsar, platformType);
|
|
394
398
|
if (didSign) {
|
|
395
399
|
await this.info.emitAfterSign(packContext);
|
|
396
400
|
}
|
|
@@ -474,7 +478,7 @@ export class PlatformPackager {
|
|
|
474
478
|
}
|
|
475
479
|
}
|
|
476
480
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
477
|
-
signApp(packContext, isAsar) {
|
|
481
|
+
signApp(packContext, isAsar, _platformType) {
|
|
478
482
|
return Promise.resolve(false);
|
|
479
483
|
}
|
|
480
484
|
getIconPath() {
|
|
@@ -529,7 +533,7 @@ export class PlatformPackager {
|
|
|
529
533
|
}
|
|
530
534
|
const relativeFile = path.relative(this.info.appDir, path.resolve(this.info.appDir, file));
|
|
531
535
|
if (isAsar) {
|
|
532
|
-
|
|
536
|
+
checkFileInArchive(path.join(resourcesDir, "app.asar"), relativeFile, messagePrefix);
|
|
533
537
|
return;
|
|
534
538
|
}
|
|
535
539
|
const pathParsed = path.parse(file);
|
|
@@ -548,7 +552,7 @@ export class PlatformPackager {
|
|
|
548
552
|
const asarPath = path.join(...pathSplit.slice(0, partWithAsarIndex + 1));
|
|
549
553
|
let mainPath = pathSplit.length > partWithAsarIndex + 1 ? path.join.apply(pathSplit.slice(partWithAsarIndex + 1)) : "";
|
|
550
554
|
mainPath += path.join(mainPath, pathParsed.base);
|
|
551
|
-
|
|
555
|
+
checkFileInArchive(path.join(resourcesDir, "app", asarPath), mainPath, messagePrefix);
|
|
552
556
|
}
|
|
553
557
|
else {
|
|
554
558
|
const fullPath = path.join(resourcesDir, "app", relativeFile);
|