app-builder-lib 27.0.0-alpha.0 → 27.0.0-alpha.10

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.
Files changed (458) hide show
  1. package/dist/Framework.d.ts +2 -0
  2. package/dist/Framework.d.ts.map +1 -1
  3. package/dist/Framework.js.map +1 -1
  4. package/dist/appInfo.d.ts +1 -1
  5. package/dist/appInfo.d.ts.map +1 -1
  6. package/dist/appInfo.js +3 -3
  7. package/dist/appInfo.js.map +1 -1
  8. package/dist/asar/asar.js +1 -1
  9. package/dist/asar/asar.js.map +1 -1
  10. package/dist/asar/asarFileChecker.d.ts +4 -2
  11. package/dist/asar/asarFileChecker.d.ts.map +1 -1
  12. package/dist/asar/asarFileChecker.js +2 -3
  13. package/dist/asar/asarFileChecker.js.map +1 -1
  14. package/dist/asar/asarUtil.js +21 -11
  15. package/dist/asar/asarUtil.js.map +1 -1
  16. package/dist/codeSign/certInfo.d.ts +14 -0
  17. package/dist/codeSign/certInfo.d.ts.map +1 -1
  18. package/dist/codeSign/certInfo.js +49 -0
  19. package/dist/codeSign/certInfo.js.map +1 -1
  20. package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
  21. package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
  22. package/dist/codeSign/mac/macCodeSign.js +50 -25
  23. package/dist/codeSign/mac/macCodeSign.js.map +1 -1
  24. package/dist/codeSign/signResult.d.ts +26 -0
  25. package/dist/codeSign/signResult.d.ts.map +1 -0
  26. package/dist/codeSign/signResult.js +12 -0
  27. package/dist/codeSign/signResult.js.map +1 -0
  28. package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
  29. package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
  30. package/dist/codeSign/win/hsmSignManager.js +50 -0
  31. package/dist/codeSign/win/hsmSignManager.js.map +1 -0
  32. package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
  33. package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
  34. package/dist/codeSign/win/pkcs11SignManager.js +82 -0
  35. package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
  36. package/dist/codeSign/win/signManager.d.ts +17 -0
  37. package/dist/codeSign/win/signManager.d.ts.map +1 -0
  38. package/dist/codeSign/win/signManager.js +19 -0
  39. package/dist/codeSign/win/signManager.js.map +1 -0
  40. package/dist/codeSign/win/signtoolBaseSignManager.d.ts +95 -0
  41. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
  42. package/dist/codeSign/win/signtoolBaseSignManager.js +507 -0
  43. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
  44. package/dist/codeSign/win/windowsCodeSign.d.ts +2 -1
  45. package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
  46. package/dist/codeSign/win/windowsCodeSign.js +22 -8
  47. package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
  48. package/dist/codeSign/win/windowsSignAzureManager.d.ts +11 -4
  49. package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
  50. package/dist/codeSign/win/windowsSignAzureManager.js +142 -37
  51. package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
  52. package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
  53. package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
  54. package/dist/codeSign/win/windowsSignToolManager.js +3 -363
  55. package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
  56. package/dist/configuration.d.ts +228 -163
  57. package/dist/configuration.d.ts.map +1 -1
  58. package/dist/configuration.js +11 -1
  59. package/dist/configuration.js.map +1 -1
  60. package/dist/core.d.ts +14 -0
  61. package/dist/core.d.ts.map +1 -1
  62. package/dist/core.js +11 -0
  63. package/dist/core.js.map +1 -1
  64. package/dist/electron/ElectronFramework.d.ts +3 -3
  65. package/dist/electron/ElectronFramework.d.ts.map +1 -1
  66. package/dist/electron/ElectronFramework.js +60 -61
  67. package/dist/electron/ElectronFramework.js.map +1 -1
  68. package/dist/electron/electronArchSupport.d.ts +12 -0
  69. package/dist/electron/electronArchSupport.d.ts.map +1 -0
  70. package/dist/electron/electronArchSupport.js +58 -0
  71. package/dist/electron/electronArchSupport.js.map +1 -0
  72. package/dist/electron/electronVersion.d.ts.map +1 -1
  73. package/dist/electron/electronVersion.js +1 -11
  74. package/dist/electron/electronVersion.js.map +1 -1
  75. package/dist/electron/injectFFMPEG.js +2 -2
  76. package/dist/electron/injectFFMPEG.js.map +1 -1
  77. package/dist/electron/mac/electronMac.js +24 -35
  78. package/dist/electron/mac/electronMac.js.map +1 -1
  79. package/dist/electron/mac/electronMacUtils.d.ts +24 -0
  80. package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
  81. package/dist/electron/mac/electronMacUtils.js +42 -0
  82. package/dist/electron/mac/electronMacUtils.js.map +1 -0
  83. package/dist/electron/win/electronWin.js +2 -2
  84. package/dist/electron/win/electronWin.js.map +1 -1
  85. package/dist/fileMatcher.d.ts +42 -2
  86. package/dist/fileMatcher.d.ts.map +1 -1
  87. package/dist/fileMatcher.js +246 -18
  88. package/dist/fileMatcher.js.map +1 -1
  89. package/dist/index.d.ts +11 -5
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +17 -1
  92. package/dist/index.js.map +1 -1
  93. package/dist/indexInternal.d.ts +19 -8
  94. package/dist/indexInternal.d.ts.map +1 -1
  95. package/dist/indexInternal.js +18 -7
  96. package/dist/indexInternal.js.map +1 -1
  97. package/dist/linuxPackager.d.ts.map +1 -1
  98. package/dist/linuxPackager.js +19 -1
  99. package/dist/linuxPackager.js.map +1 -1
  100. package/dist/macPackager.d.ts +31 -14
  101. package/dist/macPackager.d.ts.map +1 -1
  102. package/dist/macPackager.js +236 -147
  103. package/dist/macPackager.js.map +1 -1
  104. package/dist/node-module-collector/index.d.ts.map +1 -1
  105. package/dist/node-module-collector/index.js +47 -16
  106. package/dist/node-module-collector/index.js.map +1 -1
  107. package/dist/node-module-collector/moduleManager.d.ts +11 -2
  108. package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
  109. package/dist/node-module-collector/moduleManager.js +34 -14
  110. package/dist/node-module-collector/moduleManager.js.map +1 -1
  111. package/dist/node-module-collector/nodeModulesCollector.d.ts +47 -26
  112. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
  113. package/dist/node-module-collector/nodeModulesCollector.js +157 -142
  114. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
  115. package/dist/node-module-collector/packageManager.js +1 -1
  116. package/dist/node-module-collector/packageManager.js.map +1 -1
  117. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +90 -1
  118. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
  119. package/dist/node-module-collector/pnpmNodeModulesCollector.js +325 -25
  120. package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
  121. package/dist/node-module-collector/types.d.ts +4 -0
  122. package/dist/node-module-collector/types.d.ts.map +1 -1
  123. package/dist/node-module-collector/types.js.map +1 -1
  124. package/dist/options/FuseOptionsV1.d.ts +137 -0
  125. package/dist/options/FuseOptionsV1.d.ts.map +1 -0
  126. package/dist/options/FuseOptionsV1.js +2 -0
  127. package/dist/options/FuseOptionsV1.js.map +1 -0
  128. package/dist/options/MsixOptions.d.ts +126 -0
  129. package/dist/options/MsixOptions.d.ts.map +1 -0
  130. package/dist/options/MsixOptions.js +2 -0
  131. package/dist/options/MsixOptions.js.map +1 -0
  132. package/dist/options/PlatformSpecificBuildOptions.d.ts +55 -9
  133. package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
  134. package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
  135. package/dist/options/SnapOptions.d.ts +23 -17
  136. package/dist/options/SnapOptions.d.ts.map +1 -1
  137. package/dist/options/SnapOptions.js.map +1 -1
  138. package/dist/options/SquirrelWindowsOptions.d.ts +0 -5
  139. package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
  140. package/dist/options/SquirrelWindowsOptions.js.map +1 -1
  141. package/dist/options/linuxOptions.d.ts +8 -12
  142. package/dist/options/linuxOptions.d.ts.map +1 -1
  143. package/dist/options/linuxOptions.js.map +1 -1
  144. package/dist/options/macOptions.d.ts +113 -131
  145. package/dist/options/macOptions.d.ts.map +1 -1
  146. package/dist/options/macOptions.js.map +1 -1
  147. package/dist/options/pkgOptions.d.ts +1 -1
  148. package/dist/options/pkgOptions.js.map +1 -1
  149. package/dist/options/winOptions.d.ts +282 -70
  150. package/dist/options/winOptions.d.ts.map +1 -1
  151. package/dist/options/winOptions.js +12 -1
  152. package/dist/options/winOptions.js.map +1 -1
  153. package/dist/packager.d.ts +6 -1
  154. package/dist/packager.d.ts.map +1 -1
  155. package/dist/packager.js +121 -40
  156. package/dist/packager.js.map +1 -1
  157. package/dist/packagerApi.d.ts +10 -1
  158. package/dist/packagerApi.d.ts.map +1 -1
  159. package/dist/packagerApi.js.map +1 -1
  160. package/dist/platformPackager.d.ts +49 -3
  161. package/dist/platformPackager.d.ts.map +1 -1
  162. package/dist/platformPackager.js +130 -17
  163. package/dist/platformPackager.js.map +1 -1
  164. package/dist/publish/PublishManager.d.ts +36 -2
  165. package/dist/publish/PublishManager.d.ts.map +1 -1
  166. package/dist/publish/PublishManager.js +387 -23
  167. package/dist/publish/PublishManager.js.map +1 -1
  168. package/dist/publish/updateInfoBuilder.d.ts +1 -1
  169. package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
  170. package/dist/publish/updateInfoBuilder.js +110 -32
  171. package/dist/publish/updateInfoBuilder.js.map +1 -1
  172. package/dist/targets/ArchiveTarget.d.ts +1 -0
  173. package/dist/targets/ArchiveTarget.d.ts.map +1 -1
  174. package/dist/targets/ArchiveTarget.js +6 -3
  175. package/dist/targets/ArchiveTarget.js.map +1 -1
  176. package/dist/targets/archive.d.ts +33 -2
  177. package/dist/targets/archive.d.ts.map +1 -1
  178. package/dist/targets/archive.js +109 -29
  179. package/dist/targets/archive.js.map +1 -1
  180. package/dist/targets/blockmap/blockmap.d.ts +43 -3
  181. package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
  182. package/dist/targets/blockmap/blockmap.js +141 -15
  183. package/dist/targets/blockmap/blockmap.js.map +1 -1
  184. package/dist/targets/blockmap/verbatimRange.d.ts +44 -0
  185. package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -0
  186. package/dist/targets/blockmap/verbatimRange.js +117 -0
  187. package/dist/targets/blockmap/verbatimRange.js.map +1 -0
  188. package/dist/targets/differentialUpdateInfoBuilder.d.ts +28 -2
  189. package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
  190. package/dist/targets/differentialUpdateInfoBuilder.js +75 -6
  191. package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
  192. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
  193. package/dist/targets/linux/FlatpakTarget.js +13 -3
  194. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  195. package/dist/targets/linux/FpmTarget.d.ts +14 -0
  196. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  197. package/dist/targets/linux/FpmTarget.js +86 -10
  198. package/dist/targets/linux/FpmTarget.js.map +1 -1
  199. package/dist/targets/linux/LinuxTargetHelper.d.ts +15 -0
  200. package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
  201. package/dist/targets/linux/LinuxTargetHelper.js +54 -59
  202. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
  203. package/dist/targets/linux/appimage/AppImageTarget.d.ts +2 -0
  204. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
  205. package/dist/targets/linux/appimage/AppImageTarget.js +16 -15
  206. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
  207. package/dist/targets/linux/appimage/appImageUtil.d.ts +5 -1
  208. package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
  209. package/dist/targets/linux/appimage/appImageUtil.js +14 -7
  210. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  211. package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
  212. package/dist/targets/linux/appimage/appLauncher.js +5 -11
  213. package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
  214. package/dist/targets/linux/launcherScript.d.ts +32 -0
  215. package/dist/targets/linux/launcherScript.d.ts.map +1 -0
  216. package/dist/targets/linux/launcherScript.js +24 -0
  217. package/dist/targets/linux/launcherScript.js.map +1 -0
  218. package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
  219. package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
  220. package/dist/targets/linux/snap/SnapTarget.js +23 -1
  221. package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
  222. package/dist/targets/linux/snap/core24.d.ts +30 -1
  223. package/dist/targets/linux/snap/core24.d.ts.map +1 -1
  224. package/dist/targets/linux/snap/core24.js +146 -70
  225. package/dist/targets/linux/snap/core24.js.map +1 -1
  226. package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
  227. package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
  228. package/dist/targets/linux/snap/coreCustom.js +2 -2
  229. package/dist/targets/linux/snap/coreCustom.js.map +1 -1
  230. package/dist/targets/linux/snap/coreLegacy.d.ts +3 -3
  231. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
  232. package/dist/targets/linux/snap/coreLegacy.js +12 -12
  233. package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
  234. package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
  235. package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
  236. package/dist/targets/linux/snap/snapCommand.js +21 -0
  237. package/dist/targets/linux/snap/snapCommand.js.map +1 -0
  238. package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
  239. package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
  240. package/dist/targets/linux/snap/snapcraft.js +11 -0
  241. package/dist/targets/linux/snap/snapcraft.js.map +1 -0
  242. package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
  243. package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
  244. package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
  245. package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
  246. package/dist/targets/mac/MacTargetHelper.d.ts +146 -14
  247. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
  248. package/dist/targets/mac/MacTargetHelper.js +485 -91
  249. package/dist/targets/mac/MacTargetHelper.js.map +1 -1
  250. package/dist/targets/mac/pkg.d.ts +16 -0
  251. package/dist/targets/mac/pkg.d.ts.map +1 -1
  252. package/dist/targets/mac/pkg.js +31 -5
  253. package/dist/targets/mac/pkg.js.map +1 -1
  254. package/dist/targets/targetFactory.d.ts +7 -0
  255. package/dist/targets/targetFactory.d.ts.map +1 -1
  256. package/dist/targets/targetFactory.js +28 -0
  257. package/dist/targets/targetFactory.js.map +1 -1
  258. package/dist/targets/win/AppxTarget.d.ts +1 -2
  259. package/dist/targets/win/AppxTarget.d.ts.map +1 -1
  260. package/dist/targets/win/AppxTarget.js +37 -314
  261. package/dist/targets/win/AppxTarget.js.map +1 -1
  262. package/dist/targets/win/MsiTarget.d.ts.map +1 -1
  263. package/dist/targets/win/MsiTarget.js +13 -13
  264. package/dist/targets/win/MsiTarget.js.map +1 -1
  265. package/dist/targets/win/MsixTarget.d.ts +22 -0
  266. package/dist/targets/win/MsixTarget.d.ts.map +1 -0
  267. package/dist/targets/win/MsixTarget.js +214 -0
  268. package/dist/targets/win/MsixTarget.js.map +1 -0
  269. package/dist/targets/win/nsis/Defines.d.ts +3 -0
  270. package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
  271. package/dist/targets/win/nsis/Defines.js.map +1 -1
  272. package/dist/targets/win/nsis/NsisTarget.d.ts +57 -3
  273. package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
  274. package/dist/targets/win/nsis/NsisTarget.js +252 -113
  275. package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
  276. package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -1
  277. package/dist/targets/win/nsis/WebInstallerTarget.js +23 -12
  278. package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -1
  279. package/dist/targets/win/nsis/nsisOptions.d.ts +56 -48
  280. package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
  281. package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
  282. package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
  283. package/dist/targets/win/nsis/nsisScriptGenerator.js +4 -3
  284. package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
  285. package/dist/targets/win/nsis/nsisUtil.d.ts +17 -2
  286. package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
  287. package/dist/targets/win/nsis/nsisUtil.js +143 -41
  288. package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
  289. package/dist/targets/win/nsis/progId.d.ts +21 -0
  290. package/dist/targets/win/nsis/progId.d.ts.map +1 -0
  291. package/dist/targets/win/nsis/progId.js +60 -0
  292. package/dist/targets/win/nsis/progId.js.map +1 -0
  293. package/dist/targets/win/winAppUtil.d.ts +115 -0
  294. package/dist/targets/win/winAppUtil.d.ts.map +1 -0
  295. package/dist/targets/win/winAppUtil.js +407 -0
  296. package/dist/targets/win/winAppUtil.js.map +1 -0
  297. package/dist/toolsets/7zip.d.ts +32 -0
  298. package/dist/toolsets/7zip.d.ts.map +1 -1
  299. package/dist/toolsets/7zip.js +39 -11
  300. package/dist/toolsets/7zip.js.map +1 -1
  301. package/dist/toolsets/appimage.d.ts +3 -3
  302. package/dist/toolsets/appimage.d.ts.map +1 -1
  303. package/dist/toolsets/appimage.js +9 -6
  304. package/dist/toolsets/appimage.js.map +1 -1
  305. package/dist/toolsets/custom.d.ts +2 -3
  306. package/dist/toolsets/custom.d.ts.map +1 -1
  307. package/dist/toolsets/custom.js +67 -149
  308. package/dist/toolsets/custom.js.map +1 -1
  309. package/dist/toolsets/fpm.d.ts.map +1 -1
  310. package/dist/toolsets/fpm.js +11 -5
  311. package/dist/toolsets/fpm.js.map +1 -1
  312. package/dist/toolsets/icons.d.ts.map +1 -1
  313. package/dist/toolsets/icons.js +17 -3
  314. package/dist/toolsets/icons.js.map +1 -1
  315. package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
  316. package/dist/toolsets/linuxToolsMac.js +17 -4
  317. package/dist/toolsets/linuxToolsMac.js.map +1 -1
  318. package/dist/toolsets/nsis.d.ts +5 -0
  319. package/dist/toolsets/nsis.d.ts.map +1 -1
  320. package/dist/toolsets/nsis.js +20 -4
  321. package/dist/toolsets/nsis.js.map +1 -1
  322. package/dist/toolsets/version.d.ts +12 -0
  323. package/dist/toolsets/version.d.ts.map +1 -0
  324. package/dist/toolsets/version.js +13 -0
  325. package/dist/toolsets/version.js.map +1 -0
  326. package/dist/toolsets/winCodeSign.d.ts +56 -3
  327. package/dist/toolsets/winCodeSign.d.ts.map +1 -1
  328. package/dist/toolsets/winCodeSign.js +125 -42
  329. package/dist/toolsets/winCodeSign.js.map +1 -1
  330. package/dist/toolsets/wine.d.ts +2 -1
  331. package/dist/toolsets/wine.d.ts.map +1 -1
  332. package/dist/toolsets/wine.js +31 -15
  333. package/dist/toolsets/wine.js.map +1 -1
  334. package/dist/util/NodeModuleCopyHelper.js +14 -6
  335. package/dist/util/NodeModuleCopyHelper.js.map +1 -1
  336. package/dist/util/appFileCopier.d.ts +52 -0
  337. package/dist/util/appFileCopier.d.ts.map +1 -1
  338. package/dist/util/appFileCopier.js +221 -21
  339. package/dist/util/appFileCopier.js.map +1 -1
  340. package/dist/util/archCompatibility.d.ts +42 -0
  341. package/dist/util/archCompatibility.d.ts.map +1 -0
  342. package/dist/util/archCompatibility.js +202 -0
  343. package/dist/util/archCompatibility.js.map +1 -0
  344. package/dist/util/checksum.d.ts +36 -0
  345. package/dist/util/checksum.d.ts.map +1 -0
  346. package/dist/util/checksum.js +48 -0
  347. package/dist/util/checksum.js.map +1 -0
  348. package/dist/util/config/config.d.ts +1 -0
  349. package/dist/util/config/config.d.ts.map +1 -1
  350. package/dist/util/config/config.js +8 -1
  351. package/dist/util/config/config.js.map +1 -1
  352. package/dist/util/config/legacyConfigGuard.d.ts +7 -0
  353. package/dist/util/config/legacyConfigGuard.d.ts.map +1 -0
  354. package/dist/util/config/legacyConfigGuard.js +187 -0
  355. package/dist/util/config/legacyConfigGuard.js.map +1 -0
  356. package/dist/util/config/legacyOptions.d.ts +75 -0
  357. package/dist/util/config/legacyOptions.d.ts.map +1 -0
  358. package/dist/util/config/legacyOptions.js +399 -0
  359. package/dist/util/config/legacyOptions.js.map +1 -0
  360. package/dist/util/config/load.d.ts +2 -2
  361. package/dist/util/config/load.d.ts.map +1 -1
  362. package/dist/util/config/load.js +3 -12
  363. package/dist/util/config/load.js.map +1 -1
  364. package/dist/util/config/schemaValidator.d.ts.map +1 -1
  365. package/dist/util/config/schemaValidator.js +26 -3
  366. package/dist/util/config/schemaValidator.js.map +1 -1
  367. package/dist/util/electronGet.d.ts +30 -32
  368. package/dist/util/electronGet.d.ts.map +1 -1
  369. package/dist/util/electronGet.js +359 -129
  370. package/dist/util/electronGet.js.map +1 -1
  371. package/dist/util/flags.d.ts +5 -5
  372. package/dist/util/flags.d.ts.map +1 -1
  373. package/dist/util/flags.js +124 -16
  374. package/dist/util/flags.js.map +1 -1
  375. package/dist/util/hash.d.ts +1 -1
  376. package/dist/util/hash.d.ts.map +1 -1
  377. package/dist/util/hash.js +1 -15
  378. package/dist/util/hash.js.map +1 -1
  379. package/dist/util/installOrRebuild.d.ts +44 -0
  380. package/dist/util/installOrRebuild.d.ts.map +1 -0
  381. package/dist/util/installOrRebuild.js +276 -0
  382. package/dist/util/installOrRebuild.js.map +1 -0
  383. package/dist/util/langs.d.ts.map +1 -1
  384. package/dist/util/langs.js +1 -0
  385. package/dist/util/langs.js.map +1 -1
  386. package/dist/util/license.d.ts.map +1 -1
  387. package/dist/util/license.js +4 -1
  388. package/dist/util/license.js.map +1 -1
  389. package/dist/util/mac/macosIconComposer.d.ts +2 -1
  390. package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
  391. package/dist/util/mac/macosIconComposer.js +41 -59
  392. package/dist/util/mac/macosIconComposer.js.map +1 -1
  393. package/dist/util/mac/macosVersion.d.ts +0 -1
  394. package/dist/util/mac/macosVersion.d.ts.map +1 -1
  395. package/dist/util/mac/macosVersion.js +0 -3
  396. package/dist/util/mac/macosVersion.js.map +1 -1
  397. package/dist/util/mac/plist.d.ts +1 -1
  398. package/dist/util/mac/plist.d.ts.map +1 -1
  399. package/dist/util/mac/plist.js +6 -1
  400. package/dist/util/mac/plist.js.map +1 -1
  401. package/dist/util/nativeBinaryVerifier.d.ts +40 -0
  402. package/dist/util/nativeBinaryVerifier.d.ts.map +1 -0
  403. package/dist/util/nativeBinaryVerifier.js +381 -0
  404. package/dist/util/nativeBinaryVerifier.js.map +1 -0
  405. package/dist/util/packageMetadata.js +57 -31
  406. package/dist/util/packageMetadata.js.map +1 -1
  407. package/dist/util/repositoryInfo.js +6 -3
  408. package/dist/util/repositoryInfo.js.map +1 -1
  409. package/dist/util/resolve.js +1 -1
  410. package/dist/util/resolve.js.map +1 -1
  411. package/dist/util/streamSpawnToFile.d.ts +47 -0
  412. package/dist/util/streamSpawnToFile.d.ts.map +1 -0
  413. package/dist/util/streamSpawnToFile.js +110 -0
  414. package/dist/util/streamSpawnToFile.js.map +1 -0
  415. package/dist/util/toolsetLock.d.ts +2 -0
  416. package/dist/util/toolsetLock.d.ts.map +1 -1
  417. package/dist/util/toolsetLock.js +31 -5
  418. package/dist/util/toolsetLock.js.map +1 -1
  419. package/dist/version.d.ts +1 -1
  420. package/dist/version.d.ts.map +1 -1
  421. package/dist/version.js +1 -1
  422. package/dist/version.js.map +1 -1
  423. package/dist/vm/ParallelsVm.d.ts.map +1 -1
  424. package/dist/vm/ParallelsVm.js +29 -3
  425. package/dist/vm/ParallelsVm.js.map +1 -1
  426. package/dist/vm/vm.d.ts +2 -0
  427. package/dist/vm/vm.d.ts.map +1 -1
  428. package/dist/vm/vm.js +29 -6
  429. package/dist/vm/vm.js.map +1 -1
  430. package/dist/winPackager.d.ts +6 -5
  431. package/dist/winPackager.d.ts.map +1 -1
  432. package/dist/winPackager.js +45 -39
  433. package/dist/winPackager.js.map +1 -1
  434. package/package.json +19 -18
  435. package/scheme.json +1731 -961
  436. package/templates/appx/appxmanifest.xml +2 -3
  437. package/templates/entitlements.mac.adhoc.plist +15 -0
  438. package/templates/entitlements.mac.plist +9 -6
  439. package/templates/msix/appxmanifest.xml +45 -0
  440. package/templates/nsis/assistedMessages.yml +17 -0
  441. package/templates/nsis/common.nsh +2 -2
  442. package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +96 -13
  443. package/templates/nsis/include/extractAppPackage.nsh +5 -2
  444. package/templates/nsis/include/installUtil.nsh +2 -2
  445. package/templates/nsis/include/installer.nsh +88 -50
  446. package/templates/nsis/include/webPackage.nsh +52 -27
  447. package/templates/nsis/installSection.nsh +29 -0
  448. package/templates/nsis/installer.nsi +1 -1
  449. package/templates/nsis/messages.yml +5 -0
  450. package/templates/nsis/multiUserUi.nsh +1 -1
  451. package/dist/codeSign/signManager.d.ts +0 -14
  452. package/dist/codeSign/signManager.d.ts.map +0 -1
  453. package/dist/codeSign/signManager.js +0 -2
  454. package/dist/codeSign/signManager.js.map +0 -1
  455. package/dist/util/yarn.d.ts +0 -23
  456. package/dist/util/yarn.d.ts.map +0 -1
  457. package/dist/util/yarn.js +0 -153
  458. package/dist/util/yarn.js.map +0 -1
@@ -1,11 +1,10 @@
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";
5
4
  export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
6
5
  /**
7
- * 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`.
8
- * AppX package can be built only on Windows 10.
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.
9
8
  *
10
9
  * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.
11
10
  *
@@ -22,18 +21,51 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
22
21
  */
23
22
  readonly legalTrademarks?: string | null;
24
23
  /**
25
- * Options for usage with signtool.exe
26
- * Cannot be used in conjunction with `azureSignOptions`, signing will default to Azure Trusted Signing
27
- */
28
- readonly signtoolOptions?: WindowsSigntoolConfiguration | null;
29
- /**
30
- * Options for usage of Azure Trusted Signing service
31
- * Cannot be used in conjunction with `signtoolOptions`, signing will default to Azure Trusted Signing
24
+ * Code signing configuration. Code signing stamps every installer and executable
25
+ * electron-builder produces with an Authenticode signature, so that Windows (SmartScreen / UAC)
26
+ * and your auto-updater can verify the publisher and that the files were not tampered with.
27
+ *
28
+ * How this option behaves:
29
+ * - Leave **unset** to sign using credentials discovered from the environment — primarily a
30
+ * certificate supplied via `WIN_CSC_LINK` (or `CSC_LINK`) with its password in
31
+ * `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`). `WIN_CSC_LINK` accepts a file path, an
32
+ * `https://` URL, or a base64-encoded certificate. This is the recommended setup for CI.
33
+ * - Set to `false` or `null` to **disable** code signing entirely (executable resources such as
34
+ * the icon and metadata are still edited).
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`).
40
+ *
41
+ * - `{ type: "signtool", ... }` — Sign with a local certificate file (.pfx/.p12) or a
42
+ * certificate from the Windows certificate store. Uses Microsoft `signtool.exe` on Windows and
43
+ * `osslsigncode` on macOS/Linux.
44
+ * - `{ type: "hsm", ... }` — Sign using a Hardware Security Module (HSM) or FIPS-compliant
45
+ * hardware token via signtool's `/csp` (cryptographic service provider) and `/kc` (key
46
+ * container) flags. Requires a modern `winCodeSign` toolset (the default — only the legacy
47
+ * `"0.0.0"` pin is unsupported). Windows-only.
48
+ * - `{ type: "pkcs11", ... }` — Sign using a PKCS#11 hardware token via osslsigncode.
49
+ * Available on macOS and Linux CI without a Windows VM.
50
+ * - `{ type: "azure", ... }` — Sign via Azure Trusted Signing (cloud service). Requires
51
+ * Azure Entra ID environment variables for authentication.
52
+ *
53
+ * See [Code Signing](https://www.electron.build/docs/features/code-signing).
32
54
  */
33
- readonly azureSignOptions?: WindowsAzureSigningConfiguration | null;
55
+ readonly sign?: WindowsSigningConfiguration | false | null;
34
56
  /**
35
- * Whether to verify the signature of an available update before installation.
36
- * The [publisher name](#publisherName) will be used for the signature verification.
57
+ * Whether the NSIS auto-updater should verify the Authenticode signature of a downloaded update
58
+ * before installing it. This is a **runtime** check performed by your app via electron-updater,
59
+ * not a build-time check.
60
+ *
61
+ * When enabled (the default), the resolved [publisher name](#publisherName) is embedded into
62
+ * `app-update.yml` at build time. At update time electron-updater inspects the certificate that
63
+ * signed the downloaded installer and compares its subject (Distinguished Name / Common Name)
64
+ * against that publisher name, refusing to install on a mismatch. This prevents a tampered or
65
+ * maliciously substituted update from being installed.
66
+ *
67
+ * Set to `false` to skip verification — in which case the publisher name is **not** embedded.
68
+ * Disable this only if your updates are not Authenticode-signed.
37
69
  *
38
70
  * @default true
39
71
  */
@@ -45,122 +77,302 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
45
77
  */
46
78
  readonly requestedExecutionLevel?: RequestedExecutionLevel | null;
47
79
  /**
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
- /**
66
- * Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.
67
- * Supports negative patterns, e.g. example that excludes `.appx` files: `["somefilename", ".dll", "!.appx"]`.
80
+ * Additional file name suffixes to code sign, beyond the default. By default electron-builder
81
+ * only signs `.exe` files; list extra suffixes here to also sign e.g. `.dll`, `.node`, or
82
+ * specific file names. Advanced option — most apps do not need it.
83
+ *
84
+ * Each entry is matched with `String.endsWith`, so both bare extensions (`".dll"`) and full file
85
+ * names (`"mybinary.dll"`) work. Prefix a pattern with `!` to *exclude* a suffix that would
86
+ * otherwise be signed. Positive patterns are evaluated first, then negative ones. For example,
87
+ * `["somefilename", ".dll", "!.appx"]` signs `.dll` files (and anything ending in `somefilename`)
88
+ * but never signs `.appx` files.
89
+ *
68
90
  * @see https://github.com/electron-userland/electron-builder/issues/7329
69
91
  * @default null
70
92
  */
71
93
  readonly signExts?: string[] | null;
72
94
  }
73
95
  export type RequestedExecutionLevel = "asInvoker" | "highestAvailable" | "requireAdministrator";
74
- export interface WindowsSigntoolConfiguration {
96
+ /**
97
+ * Options shared by every certificate-based signing mode (`signtool`, `hsm`, `pkcs11`). These
98
+ * control the signature itself — publisher identity, digest algorithms, timestamping, and the
99
+ * extra certificates added to the signature block — independently of where the private key lives.
100
+ */
101
+ interface WindowsSigningSharedOptions {
75
102
  /**
76
- * The custom function (or path to file or module id) to sign Windows executables
103
+ * The publisher name(s) to associate with the signature, written exactly as the subject appears
104
+ * in your code signing certificate. May be a single string or an array — an array is useful when
105
+ * rotating certificates, so updates signed by either the old or the new certificate still verify.
106
+ *
107
+ * This value is not a `signtool` argument; it is consumed in two places:
108
+ * - **Update verification** — when [verifyUpdateCodeSignature](#verifyUpdateCodeSignature) is
109
+ * enabled, it is written into `app-update.yml` and electron-updater checks it against the
110
+ * certificate that signed each downloaded update.
111
+ * - **AppX / MSIX identity** — the package `Publisher` attribute must equal the certificate
112
+ * subject, so electron-builder derives it from this value (or the certificate) to keep them
113
+ * in sync; a mismatch makes packaging fail with `ERROR_BAD_FORMAT`.
114
+ *
115
+ * Defaults to the Common Name (CN) extracted from your code signing certificate. **Required**
116
+ * (while `verifyUpdateCodeSignature` is enabled and `app-update.yml` is written) with a custom
117
+ * [sign](#sign) hook, even if a certificate is configured, and for a certificate without a CN —
118
+ * otherwise the build fails. Set to `null` to opt out.
119
+ *
120
+ * @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073
77
121
  */
78
- readonly sign?: CustomWindowsSign | string | null;
122
+ readonly publisherName?: string | Array<string> | null;
79
123
  /**
80
- * Array of signing algorithms used. For AppX `sha256` is always used.
124
+ * The digest (hash) algorithms to sign with, applied via signtool's `/fd` flag (or
125
+ * osslsigncode's `-h`). One signing pass runs per entry, in order; listing more than one
126
+ * **dual-signs** the file, with each additional signature appended as a nested signature
127
+ * (signtool `/as`). Signing with both `sha1` and `sha256` lets a single binary validate on
128
+ * legacy (pre-SHA-2) Windows as well as modern Windows.
129
+ *
130
+ * Some targets override this: `.msi` cannot be dual-signed (a single hash is used) and AppX/MSIX
131
+ * is always `sha256` only.
132
+ *
81
133
  * @default ['sha1', 'sha256']
82
134
  */
83
135
  readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
84
136
  /**
85
- * 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.
86
- * Please see [Code Signing](https://www.electron.build/code-signing).
137
+ * The URL of the [RFC 3161](https://www.ietf.org/rfc/rfc3161.txt) timestamp server, used for
138
+ * SHA-256 and nested/appended signatures (signtool's `/tr` flag). Timestamping records *when*
139
+ * the file was signed so the signature stays valid after the signing certificate expires.
140
+ * Ignored when the build runs with `ELECTRON_BUILDER_OFFLINE=true`.
141
+ *
142
+ * @default http://timestamp.digicert.com
143
+ */
144
+ readonly rfc3161TimeStampServer?: string | null;
145
+ /**
146
+ * The URL of the legacy Authenticode timestamp server, used for SHA-1 signatures (signtool's
147
+ * `/t` flag). This is also the timestamp server used by `osslsigncode` (`-t`) when signing on
148
+ * macOS/Linux. See [rfc3161TimeStampServer](#rfc3161TimeStampServer) for SHA-256 / nested
149
+ * signatures. Ignored when the build runs with `ELECTRON_BUILDER_OFFLINE=true`.
150
+ *
151
+ * @default http://timestamp.digicert.com
152
+ */
153
+ readonly timeStampServer?: string | null;
154
+ /**
155
+ * Path to an additional certificate file (typically an intermediate / cross-signing CA
156
+ * certificate) whose contents are added to the signature block via signtool's `/ac` flag. Use
157
+ * this when the signing certificate's full chain is not already present on target machines and
158
+ * you want it embedded in the signature so the chain can be validated.
159
+ */
160
+ readonly additionalCertificateFile?: string | null;
161
+ /**
162
+ * A custom signing hook that **replaces** electron-builder's built-in `signtool` /
163
+ * `osslsigncode` invocation. Provide a function, or the path / module id of a file that exports
164
+ * a `sign` function (resolved relative to the project, then as a module).
165
+ *
166
+ * The hook is invoked once per signing pass (i.e. once per entry in
167
+ * [signingHashAlgorithms](#signingHashAlgorithms)) and receives a configuration object describing
168
+ * the file to sign (`path`), the resolved certificate info (`cscInfo`), the current `hash`, and
169
+ * whether this pass is a nested signature (`isNest`), plus a `computeSignToolArgs(isWin)` helper
170
+ * that returns the default arguments electron-builder would otherwise have used. Use this to
171
+ * integrate an external or cloud signing service. See
172
+ * [Code Signing](https://www.electron.build/docs/features/code-signing).
173
+ *
174
+ * electron-builder cannot tell which certificate the hook signs with, so also set
175
+ * [publisherName](#publisherName) to that certificate's subject: it is never derived from a
176
+ * certificate for a hook (not even one in the config), and without it a build that writes
177
+ * `app-update.yml` fails.
178
+ */
179
+ readonly sign?: CustomWindowsSign | string | null;
180
+ }
181
+ /**
182
+ * Sign with a certificate file (`.pfx` / `.p12`) or with a certificate from the Windows
183
+ * certificate store, using Microsoft `signtool.exe` on Windows and `osslsigncode` on macOS/Linux.
184
+ * This is the default mode when `win.sign` is unset. Supply the certificate one of four ways:
185
+ * a file via `certificateFile` (or the `WIN_CSC_LINK` env var), or a store lookup via
186
+ * `certificateSubjectName` or `certificateSha1`.
187
+ */
188
+ export interface WindowsSigntoolSigningConfig extends WindowsSigningSharedOptions {
189
+ /** Discriminator selecting the default file/store signing mode. */
190
+ readonly type: "signtool";
191
+ /**
192
+ * Path to the PKCS#12 certificate file (`.pfx` or `.p12`) holding both the signing certificate
193
+ * and its private key. Passed to signtool via `/f` (or osslsigncode via `-pkcs12`).
194
+ *
195
+ * Prefer supplying this out-of-band via the `WIN_CSC_LINK` (or `CSC_LINK`) environment variable
196
+ * instead of hardcoding a path — that variable also accepts an `https://` URL or a base64-encoded
197
+ * certificate, which is safer and more convenient on CI. See
198
+ * [Code Signing](https://www.electron.build/docs/features/code-signing).
87
199
  */
88
200
  readonly certificateFile?: string | null;
89
201
  /**
90
- * 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.
91
- * Please see [Code Signing](https://www.electron.build/code-signing).
202
+ * The password protecting the private key in `certificateFile`. Passed to signtool via `/p`
203
+ * (or osslsigncode via `-pass`).
204
+ *
205
+ * Prefer the `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`) environment variable so the secret
206
+ * never lands in your build configuration.
92
207
  */
93
208
  readonly certificatePassword?: string | null;
94
209
  /**
95
- * 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).
210
+ * Select the signing certificate from the Windows certificate store by (a substring of) its
211
+ * subject name, instead of pointing at a `.pfx` file. electron-builder enumerates the installed
212
+ * code-signing certificates, picks the match, and signs by its thumbprint
213
+ * (`/sha1 <thumbprint> /s <store>`). **Required for EV (Extended Validation) certificates**,
214
+ * whose private keys live on a hardware token and cannot be exported to a file.
215
+ *
216
+ * Works only on Windows (or macOS with Parallels Desktop, via the bundled Windows VM).
96
217
  */
97
218
  readonly certificateSubjectName?: string | null;
98
219
  /**
99
- * 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).
220
+ * Select the signing certificate from the Windows certificate store by its SHA-1 thumbprint,
221
+ * instead of pointing at a `.pfx` file. electron-builder looks the certificate up in the store
222
+ * and signs with `/sha1 <thumbprint> /s <store>`. Like
223
+ * [certificateSubjectName](#certificateSubjectName), this suits EV certificates backed by a
224
+ * hardware token; if both are set, both must resolve to the same certificate.
225
+ *
226
+ * Works only on Windows (or macOS with Parallels Desktop, via the bundled Windows VM).
100
227
  */
101
228
  readonly certificateSha1?: string | null;
229
+ }
230
+ /**
231
+ * @beta HSM signing is available in v27 as a beta feature. The interface is stable but
232
+ * real-hardware test coverage is limited.
233
+ */
234
+ export interface WindowsHsmSigningConfig extends WindowsSigningSharedOptions {
235
+ /** Discriminator selecting HSM / hardware-token signing via signtool's `/csp` and `/kc` flags. */
236
+ readonly type: "hsm";
102
237
  /**
103
- * The path to an additional certificate file you want to add to the signature block.
238
+ * The name of the cryptographic service provider (CSP) that holds the private key.
239
+ * Maps to signtool's `/csp` flag. Examples:
240
+ * - Google Cloud KMS: `"Google Cloud KMS Provider"`
241
+ * - Smart card / FIPS token: `"Microsoft Base Smart Card Crypto Provider"`
242
+ *
243
+ * Requires a modern `winCodeSign` toolset (the default; only the legacy `"0.0.0"` pin is
244
+ * unsupported). Windows-only — use `type: "pkcs11"` on macOS/Linux.
104
245
  */
105
- readonly additionalCertificateFile?: string | null;
246
+ readonly cryptoServiceProvider: string;
106
247
  /**
107
- * The URL of the RFC 3161 time stamp server.
108
- * @default http://timestamp.digicert.com
248
+ * The key container name within the CSP. Maps to signtool's `/kc` flag.
249
+ *
250
+ * Example for Google Cloud KMS:
251
+ * `"projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY_NAME/cryptoKeyVersions/1"`
109
252
  */
110
- readonly rfc3161TimeStampServer?: string | null;
253
+ readonly keyContainer: string;
111
254
  /**
112
- * The URL of the time stamp server.
113
- * @default http://timestamp.digicert.com
255
+ * Path to the certificate file containing the public certificate chain (.crt / .cer / .pfx).
256
+ * The private key is NOT read from this file — it is provided by the HSM via `cryptoServiceProvider`.
114
257
  */
115
- readonly timeStampServer?: string | null;
258
+ readonly certificateFile?: string | null;
116
259
  /**
117
- * [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.
118
- * Defaults to common name from your code signing certificate.
260
+ * Alternative to `certificateFile`: locate the public certificate in the Windows certificate
261
+ * store by its SHA-1 thumbprint. The private key still comes from the HSM via
262
+ * `cryptoServiceProvider` / `keyContainer`; this only identifies which public certificate to sign
263
+ * with.
119
264
  */
120
- readonly publisherName?: string | Array<string> | null;
265
+ readonly certificateSha1?: string | null;
266
+ /**
267
+ * Alternative to `certificateFile`: locate the public certificate in the Windows certificate
268
+ * store by (a substring of) its subject name. The private key still comes from the HSM via
269
+ * `cryptoServiceProvider` / `keyContainer`; this only identifies which public certificate to sign
270
+ * with.
271
+ */
272
+ readonly certificateSubjectName?: string | null;
121
273
  }
122
- export interface WindowsAzureSigningConfiguration {
274
+ /**
275
+ * Sign with a PKCS#11 hardware token (smart card, USB HSM, cloud KMS exposed via a PKCS#11
276
+ * provider) using `osslsigncode`. Unlike `hsm`, this mode does **not** require Windows or a
277
+ * Windows VM, so it can sign Windows binaries directly from macOS/Linux CI. The token PIN is read
278
+ * from the `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`) environment variable.
279
+ *
280
+ * @beta PKCS#11 signing is available in v27 as a beta feature. The interface is stable but
281
+ * real-hardware test coverage is limited.
282
+ */
283
+ export interface WindowsPkcs11SigningConfig extends WindowsSigningSharedOptions {
284
+ /** Discriminator selecting cross-platform PKCS#11 token signing via `osslsigncode`. */
285
+ readonly type: "pkcs11";
123
286
  /**
124
- * [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.
287
+ * Path to the PKCS#11 shared library (`.so` on Linux, `.dylib` on macOS).
288
+ * The library must be installed separately — electron-builder does not bundle it.
289
+ *
290
+ * Example: `"/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so"`
291
+ *
292
+ * Must be paired with `pkcs11KeyUri`.
125
293
  */
126
- readonly publisherName: string;
294
+ readonly pkcs11Module: string;
295
+ /**
296
+ * RFC 7512 PKCS#11 URI identifying the private key within the module.
297
+ * Maps to osslsigncode's `-key` parameter.
298
+ *
299
+ * Example: `"pkcs11:token=MyToken;object=MyKey;type=private"`
300
+ *
301
+ * Must be paired with `pkcs11Module`.
302
+ */
303
+ readonly pkcs11KeyUri: string;
127
304
  /**
128
- * The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the
129
- * region your Trusted Signing Account and Certificate Profile you are specifying were created
130
- * in during the setup of these resources.
305
+ * Optional path to a certificate chain file to accompany the PKCS#11 key.
306
+ * If omitted the certificate embedded in the token is used.
307
+ */
308
+ readonly certificateFile?: string | null;
309
+ }
310
+ /**
311
+ * The `signtool /dlib` Azure Trusted Signing integration was introduced in `toolsets.winCodeSign: 1.3.0`.
312
+ * The legacy PowerShell integration is deprecated, but leverages the same underlying Azure APIs, so both interfaces share the same config shape.
313
+ */
314
+ export interface WindowsAzureSigningConfig {
315
+ /** Discriminator selecting Azure Trusted Signing (cloud signing — no local certificate). */
316
+ readonly type: "azure";
317
+ /**
318
+ * The publisher name to associate with the signature, exactly as it appears in the certificate
319
+ * issued by your Trusted Signing certificate profile. Required. Used for
320
+ * [update verification](#verifyUpdateCodeSignature) (embedded in `app-update.yml` and checked by
321
+ * electron-updater) and must match the certificate subject.
131
322
  *
132
- * Translates to field: Endpoint
323
+ * @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073
324
+ */
325
+ readonly publisherName: string;
326
+ /**
327
+ * The Trusted Signing Account endpoint. The URI value must align to the region your Trusted
328
+ * Signing Account and Certificate Profile were created in.
133
329
  *
134
- * 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)
330
+ * Requires Azure Entra ID environment variables per
331
+ * [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition).
135
332
  */
136
333
  readonly endpoint: string;
137
334
  /**
138
- * The Certificate Profile name. Translates to field: CertificateProfileName
335
+ * The name of the Trusted Signing Certificate Profile to sign with, as created in your Azure
336
+ * Code Signing Account. Maps to the DLib metadata field `CertificateProfileName`.
139
337
  */
140
338
  readonly certificateProfileName: string;
141
339
  /**
142
- * The Code Signing Signing Account name. Translates to field: CodeSigningAccountName
340
+ * The name of the Azure Trusted Signing (Code Signing) Account that owns the certificate profile.
341
+ * Maps to the DLib metadata field `CodeSigningAccountName`.
143
342
  */
144
343
  readonly codeSigningAccountName: string;
145
344
  /**
146
- * The File Digest for signing each file. Translates to field: FileDigest
345
+ * The digest algorithm used to hash the files being signed. Maps to the DLib metadata field
346
+ * `FileDigest`.
147
347
  * @default SHA256
148
348
  */
149
349
  readonly fileDigest?: string;
150
350
  /**
151
- * The Timestamp rfc3161 server. Translates to field: TimestampRfc3161
351
+ * The RFC3161 timestamp server. Translates to field: TimestampRfc3161.
152
352
  * @default http://timestamp.acs.microsoft.com
153
353
  */
154
354
  readonly timestampRfc3161?: string;
155
355
  /**
156
- * The Timestamp Digest. Translates to field: TimestampDigest
356
+ * The timestamp digest algorithm. Translates to field: TimestampDigest.
157
357
  * @default SHA256
158
358
  */
159
359
  readonly timestampDigest?: string;
160
360
  /**
161
- * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning`
162
- * Note: Key-Value pairs with `undefined`/`null` value are filtered out of the command.
361
+ * Additional fields to include verbatim in the `metadata.json` file passed to
362
+ * `Azure.CodeSigning.Dlib.dll` via `signtool /dmdf`. Use this for DLib-specific options
363
+ * not covered by the typed fields above (e.g. `ExcludeCredentials`, `CorrelationId`).
163
364
  */
164
- [k: string]: string | Nullish;
365
+ readonly additionalMetadata?: Record<string, string>;
165
366
  }
367
+ export type WindowsSigningConfiguration = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig | WindowsAzureSigningConfig;
368
+ /** Signing modes that use signtool.exe or osslsigncode (not Azure). */
369
+ export type WindowsSigntoolFamilyConfig = WindowsSigntoolSigningConfig | WindowsHsmSigningConfig | WindowsPkcs11SigningConfig;
370
+ /**
371
+ * Resolves the active signing configuration object. `false`, `null`, and unset all mean
372
+ * "no explicit signing config object" (env-based discovery still applies when unset).
373
+ */
374
+ export declare function resolveWindowsSigningConfiguration(config: WindowsConfiguration): WindowsSigningConfiguration | null;
375
+ /** Whether Windows code signing has been explicitly disabled via `sign: false | null`. */
376
+ export declare function isWindowsSigningDisabled(config: WindowsConfiguration): boolean;
377
+ export {};
166
378
  //# sourceMappingURL=winOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":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AM,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
- export {};
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":"AAsaA;;;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 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`.\n * 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.\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. Code signing stamps every installer and executable\n * electron-builder produces with an Authenticode signature, so that Windows (SmartScreen / UAC)\n * and your auto-updater can verify the publisher and that the files were not tampered with.\n *\n * How this option behaves:\n * - Leave **unset** to sign using credentials discovered from the environment — primarily a\n * certificate supplied via `WIN_CSC_LINK` (or `CSC_LINK`) with its password in\n * `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`). `WIN_CSC_LINK` accepts a file path, an\n * `https://` URL, or a base64-encoded certificate. This is the recommended setup for CI.\n * - Set to `false` or `null` to **disable** code signing entirely (executable resources such as\n * the icon and metadata are still edited).\n * - Set to an **object** to configure signing explicitly. The **required** `type` field selects the\n * signing backend (`signtool`, `hsm`, `pkcs11`, or `azure`) and dispatches to a dedicated sign\n * manager; provide exactly one of the modes below. When `win.sign` is left unset, the `signtool`\n * backend is used with env-discovered credentials. Each output artifact is signed individually,\n * and by default executables are dual-signed (see `signingHashAlgorithms`).\n *\n * - `{ type: \"signtool\", ... }` — Sign with a local certificate file (.pfx/.p12) or a\n * certificate from the Windows certificate store. Uses Microsoft `signtool.exe` on Windows and\n * `osslsigncode` on macOS/Linux.\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 a modern `winCodeSign` toolset (the default — only the legacy\n * `\"0.0.0\"` pin is unsupported). 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 * See [Code Signing](https://www.electron.build/docs/features/code-signing).\n */\n readonly sign?: WindowsSigningConfiguration | false | null\n\n /**\n * Whether the NSIS auto-updater should verify the Authenticode signature of a downloaded update\n * before installing it. This is a **runtime** check performed by your app via electron-updater,\n * not a build-time check.\n *\n * When enabled (the default), the resolved [publisher name](#publisherName) is embedded into\n * `app-update.yml` at build time. At update time electron-updater inspects the certificate that\n * signed the downloaded installer and compares its subject (Distinguished Name / Common Name)\n * against that publisher name, refusing to install on a mismatch. This prevents a tampered or\n * maliciously substituted update from being installed.\n *\n * Set to `false` to skip verification — in which case the publisher name is **not** embedded.\n * Disable this only if your updates are not Authenticode-signed.\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 * Additional file name suffixes to code sign, beyond the default. By default electron-builder\n * only signs `.exe` files; list extra suffixes here to also sign e.g. `.dll`, `.node`, or\n * specific file names. Advanced option — most apps do not need it.\n *\n * Each entry is matched with `String.endsWith`, so both bare extensions (`\".dll\"`) and full file\n * names (`\"mybinary.dll\"`) work. Prefix a pattern with `!` to *exclude* a suffix that would\n * otherwise be signed. Positive patterns are evaluated first, then negative ones. For example,\n * `[\"somefilename\", \".dll\", \"!.appx\"]` signs `.dll` files (and anything ending in `somefilename`)\n * but never signs `.appx` files.\n *\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\n/**\n * Options shared by every certificate-based signing mode (`signtool`, `hsm`, `pkcs11`). These\n * control the signature itself — publisher identity, digest algorithms, timestamping, and the\n * extra certificates added to the signature block — independently of where the private key lives.\n */\ninterface WindowsSigningSharedOptions {\n /**\n * The publisher name(s) to associate with the signature, written exactly as the subject appears\n * in your code signing certificate. May be a single string or an array — an array is useful when\n * rotating certificates, so updates signed by either the old or the new certificate still verify.\n *\n * This value is not a `signtool` argument; it is consumed in two places:\n * - **Update verification** — when [verifyUpdateCodeSignature](#verifyUpdateCodeSignature) is\n * enabled, it is written into `app-update.yml` and electron-updater checks it against the\n * certificate that signed each downloaded update.\n * - **AppX / MSIX identity** — the package `Publisher` attribute must equal the certificate\n * subject, so electron-builder derives it from this value (or the certificate) to keep them\n * in sync; a mismatch makes packaging fail with `ERROR_BAD_FORMAT`.\n *\n * Defaults to the Common Name (CN) extracted from your code signing certificate. **Required**\n * (while `verifyUpdateCodeSignature` is enabled and `app-update.yml` is written) with a custom\n * [sign](#sign) hook, even if a certificate is configured, and for a certificate without a CN —\n * otherwise the build fails. Set to `null` to opt out.\n *\n * @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073\n */\n readonly publisherName?: string | Array<string> | null\n\n /**\n * The digest (hash) algorithms to sign with, applied via signtool's `/fd` flag (or\n * osslsigncode's `-h`). One signing pass runs per entry, in order; listing more than one\n * **dual-signs** the file, with each additional signature appended as a nested signature\n * (signtool `/as`). Signing with both `sha1` and `sha256` lets a single binary validate on\n * legacy (pre-SHA-2) Windows as well as modern Windows.\n *\n * Some targets override this: `.msi` cannot be dual-signed (a single hash is used) and AppX/MSIX\n * is always `sha256` only.\n *\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * The URL of the [RFC 3161](https://www.ietf.org/rfc/rfc3161.txt) timestamp server, used for\n * SHA-256 and nested/appended signatures (signtool's `/tr` flag). Timestamping records *when*\n * the file was signed so the signature stays valid after the signing certificate expires.\n * Ignored when the build runs with `ELECTRON_BUILDER_OFFLINE=true`.\n *\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the legacy Authenticode timestamp server, used for SHA-1 signatures (signtool's\n * `/t` flag). This is also the timestamp server used by `osslsigncode` (`-t`) when signing on\n * macOS/Linux. See [rfc3161TimeStampServer](#rfc3161TimeStampServer) for SHA-256 / nested\n * signatures. Ignored when the build runs with `ELECTRON_BUILDER_OFFLINE=true`.\n *\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * Path to an additional certificate file (typically an intermediate / cross-signing CA\n * certificate) whose contents are added to the signature block via signtool's `/ac` flag. Use\n * this when the signing certificate's full chain is not already present on target machines and\n * you want it embedded in the signature so the chain can be validated.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * A custom signing hook that **replaces** electron-builder's built-in `signtool` /\n * `osslsigncode` invocation. Provide a function, or the path / module id of a file that exports\n * a `sign` function (resolved relative to the project, then as a module).\n *\n * The hook is invoked once per signing pass (i.e. once per entry in\n * [signingHashAlgorithms](#signingHashAlgorithms)) and receives a configuration object describing\n * the file to sign (`path`), the resolved certificate info (`cscInfo`), the current `hash`, and\n * whether this pass is a nested signature (`isNest`), plus a `computeSignToolArgs(isWin)` helper\n * that returns the default arguments electron-builder would otherwise have used. Use this to\n * integrate an external or cloud signing service. See\n * [Code Signing](https://www.electron.build/docs/features/code-signing).\n *\n * electron-builder cannot tell which certificate the hook signs with, so also set\n * [publisherName](#publisherName) to that certificate's subject: it is never derived from a\n * certificate for a hook (not even one in the config), and without it a build that writes\n * `app-update.yml` fails.\n */\n readonly sign?: CustomWindowsSign | string | null\n}\n\n// ─── Signing mode: signtool (file or Windows certificate store) ──────────────\n\n/**\n * Sign with a certificate file (`.pfx` / `.p12`) or with a certificate from the Windows\n * certificate store, using Microsoft `signtool.exe` on Windows and `osslsigncode` on macOS/Linux.\n * This is the default mode when `win.sign` is unset. Supply the certificate one of four ways:\n * a file via `certificateFile` (or the `WIN_CSC_LINK` env var), or a store lookup via\n * `certificateSubjectName` or `certificateSha1`.\n */\nexport interface WindowsSigntoolSigningConfig extends WindowsSigningSharedOptions {\n /** Discriminator selecting the default file/store signing mode. */\n readonly type: \"signtool\"\n\n /**\n * Path to the PKCS#12 certificate file (`.pfx` or `.p12`) holding both the signing certificate\n * and its private key. Passed to signtool via `/f` (or osslsigncode via `-pkcs12`).\n *\n * Prefer supplying this out-of-band via the `WIN_CSC_LINK` (or `CSC_LINK`) environment variable\n * instead of hardcoding a path — that variable also accepts an `https://` URL or a base64-encoded\n * certificate, which is safer and more convenient on CI. See\n * [Code Signing](https://www.electron.build/docs/features/code-signing).\n */\n readonly certificateFile?: string | null\n\n /**\n * The password protecting the private key in `certificateFile`. Passed to signtool via `/p`\n * (or osslsigncode via `-pass`).\n *\n * Prefer the `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`) environment variable so the secret\n * never lands in your build configuration.\n */\n readonly certificatePassword?: string | null\n\n /**\n * Select the signing certificate from the Windows certificate store by (a substring of) its\n * subject name, instead of pointing at a `.pfx` file. electron-builder enumerates the installed\n * code-signing certificates, picks the match, and signs by its thumbprint\n * (`/sha1 <thumbprint> /s <store>`). **Required for EV (Extended Validation) certificates**,\n * whose private keys live on a hardware token and cannot be exported to a file.\n *\n * Works only on Windows (or macOS with Parallels Desktop, via the bundled Windows VM).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * Select the signing certificate from the Windows certificate store by its SHA-1 thumbprint,\n * instead of pointing at a `.pfx` file. electron-builder looks the certificate up in the store\n * and signs with `/sha1 <thumbprint> /s <store>`. Like\n * [certificateSubjectName](#certificateSubjectName), this suits EV certificates backed by a\n * hardware token; if both are set, both must resolve to the same certificate.\n *\n * Works only on Windows (or macOS with Parallels Desktop, via the bundled Windows VM).\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 /** Discriminator selecting HSM / hardware-token signing via signtool's `/csp` and `/kc` flags. */\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 a modern `winCodeSign` toolset (the default; only the legacy `\"0.0.0\"` pin is\n * unsupported). 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 * Alternative to `certificateFile`: locate the public certificate in the Windows certificate\n * store by its SHA-1 thumbprint. The private key still comes from the HSM via\n * `cryptoServiceProvider` / `keyContainer`; this only identifies which public certificate to sign\n * with.\n */\n readonly certificateSha1?: string | null\n\n /**\n * Alternative to `certificateFile`: locate the public certificate in the Windows certificate\n * store by (a substring of) its subject name. The private key still comes from the HSM via\n * `cryptoServiceProvider` / `keyContainer`; this only identifies which public certificate to sign\n * with.\n */\n readonly certificateSubjectName?: string | null\n}\n\n// ─── Signing mode: pkcs11 (cross-platform PKCS#11 via osslsigncode) ──────────\n\n/**\n * Sign with a PKCS#11 hardware token (smart card, USB HSM, cloud KMS exposed via a PKCS#11\n * provider) using `osslsigncode`. Unlike `hsm`, this mode does **not** require Windows or a\n * Windows VM, so it can sign Windows binaries directly from macOS/Linux CI. The token PIN is read\n * from the `WIN_CSC_KEY_PASSWORD` (or `CSC_KEY_PASSWORD`) environment variable.\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 /** Discriminator selecting cross-platform PKCS#11 token signing via `osslsigncode`. */\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 * The `signtool /dlib` Azure Trusted Signing integration was introduced in `toolsets.winCodeSign: 1.3.0`.\n * The legacy PowerShell integration is deprecated, but leverages the same underlying Azure APIs, so both interfaces share the same config shape.\n */\nexport interface WindowsAzureSigningConfig {\n /** Discriminator selecting Azure Trusted Signing (cloud signing — no local certificate). */\n readonly type: \"azure\"\n\n /**\n * The publisher name to associate with the signature, exactly as it appears in the certificate\n * issued by your Trusted Signing certificate profile. Required. Used for\n * [update verification](#verifyUpdateCodeSignature) (embedded in `app-update.yml` and checked by\n * electron-updater) and must match the certificate subject.\n *\n * @see https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073\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 name of the Trusted Signing Certificate Profile to sign with, as created in your Azure\n * Code Signing Account. Maps to the DLib metadata field `CertificateProfileName`.\n */\n readonly certificateProfileName: string\n\n /**\n * The name of the Azure Trusted Signing (Code Signing) Account that owns the certificate profile.\n * Maps to the DLib metadata field `CodeSigningAccountName`.\n */\n readonly codeSigningAccountName: string\n\n /**\n * The digest algorithm used to hash the files being signed. Maps to the DLib metadata field\n * `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"]}
@@ -5,7 +5,7 @@ import { AfterExtractContext, AfterPackContext, BeforePackContext, Configuration
5
5
  import { Platform, SourceRepositoryInfo, Target } from "./core.js";
6
6
  import { Framework } from "./Framework.js";
7
7
  import { Metadata } from "./options/metadata.js";
8
- import { ArtifactBuildStarted, ArtifactCreated, PackagerOptions } from "./packagerApi.js";
8
+ import { ArtifactBuildStarted, ArtifactCreated, PackagerOptions, PlannedTargets } from "./packagerApi.js";
9
9
  import { PlatformPackager } from "./platformPackager.js";
10
10
  import { HandlerType } from "./util/asyncEventEmitter.js";
11
11
  import { PM } from "./node-module-collector/index.js";
@@ -19,6 +19,7 @@ type PackagerEvents = {
19
19
  msiProjectCreated: Hook<string, void>;
20
20
  appxManifestCreated: Hook<string, void>;
21
21
  artifactCreated: Hook<ArtifactCreated, void>;
22
+ targetsCreated: Hook<ReadonlyArray<PlannedTargets>, void>;
22
23
  };
23
24
  export declare class Packager {
24
25
  readonly cancellationToken: CancellationToken;
@@ -49,6 +50,10 @@ export declare class Packager {
49
50
  _appInfo: AppInfo | null;
50
51
  get appInfo(): AppInfo;
51
52
  readonly tempDirManager: TmpDir;
53
+ private readonly buildFinalizeTasks;
54
+ addBuildFinalizeTask(task: () => Promise<void>): void;
55
+ private readonly targetsSkippedByTestHook;
56
+ private readonly targetsBuiltAfterPack;
52
57
  private _repositoryInfo;
53
58
  readonly options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