app-builder-lib 27.0.0-alpha.1 → 27.0.0-alpha.11

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 (489) 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.map +1 -1
  9. package/dist/asar/asarAlign.d.ts +35 -0
  10. package/dist/asar/asarAlign.d.ts.map +1 -0
  11. package/dist/asar/asarAlign.js +149 -0
  12. package/dist/asar/asarAlign.js.map +1 -0
  13. package/dist/asar/asarFileChecker.d.ts +4 -2
  14. package/dist/asar/asarFileChecker.d.ts.map +1 -1
  15. package/dist/asar/asarFileChecker.js +2 -3
  16. package/dist/asar/asarFileChecker.js.map +1 -1
  17. package/dist/asar/asarUtil.d.ts +15 -1
  18. package/dist/asar/asarUtil.d.ts.map +1 -1
  19. package/dist/asar/asarUtil.js +132 -72
  20. package/dist/asar/asarUtil.js.map +1 -1
  21. package/dist/codeSign/certInfo.d.ts +14 -0
  22. package/dist/codeSign/certInfo.d.ts.map +1 -1
  23. package/dist/codeSign/certInfo.js +49 -0
  24. package/dist/codeSign/certInfo.js.map +1 -1
  25. package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
  26. package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
  27. package/dist/codeSign/mac/macCodeSign.js +50 -25
  28. package/dist/codeSign/mac/macCodeSign.js.map +1 -1
  29. package/dist/codeSign/signResult.d.ts +26 -0
  30. package/dist/codeSign/signResult.d.ts.map +1 -0
  31. package/dist/codeSign/signResult.js +12 -0
  32. package/dist/codeSign/signResult.js.map +1 -0
  33. package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
  34. package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
  35. package/dist/codeSign/win/hsmSignManager.js +50 -0
  36. package/dist/codeSign/win/hsmSignManager.js.map +1 -0
  37. package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
  38. package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
  39. package/dist/codeSign/win/pkcs11SignManager.js +82 -0
  40. package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
  41. package/dist/codeSign/win/signManager.d.ts +17 -0
  42. package/dist/codeSign/win/signManager.d.ts.map +1 -0
  43. package/dist/codeSign/win/signManager.js +19 -0
  44. package/dist/codeSign/win/signManager.js.map +1 -0
  45. package/dist/codeSign/win/signtoolBaseSignManager.d.ts +95 -0
  46. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
  47. package/dist/codeSign/win/signtoolBaseSignManager.js +507 -0
  48. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
  49. package/dist/codeSign/win/windowsCodeSign.d.ts +2 -1
  50. package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
  51. package/dist/codeSign/win/windowsCodeSign.js +22 -8
  52. package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
  53. package/dist/codeSign/win/windowsSignAzureManager.d.ts +11 -4
  54. package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
  55. package/dist/codeSign/win/windowsSignAzureManager.js +142 -37
  56. package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
  57. package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
  58. package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
  59. package/dist/codeSign/win/windowsSignToolManager.js +3 -363
  60. package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
  61. package/dist/configuration.d.ts +233 -166
  62. package/dist/configuration.d.ts.map +1 -1
  63. package/dist/configuration.js +11 -1
  64. package/dist/configuration.js.map +1 -1
  65. package/dist/core.d.ts +14 -0
  66. package/dist/core.d.ts.map +1 -1
  67. package/dist/core.js +11 -0
  68. package/dist/core.js.map +1 -1
  69. package/dist/electron/ElectronFramework.d.ts +3 -3
  70. package/dist/electron/ElectronFramework.d.ts.map +1 -1
  71. package/dist/electron/ElectronFramework.js +60 -61
  72. package/dist/electron/ElectronFramework.js.map +1 -1
  73. package/dist/electron/electronArchSupport.d.ts +12 -0
  74. package/dist/electron/electronArchSupport.d.ts.map +1 -0
  75. package/dist/electron/electronArchSupport.js +58 -0
  76. package/dist/electron/electronArchSupport.js.map +1 -0
  77. package/dist/electron/electronVersion.d.ts.map +1 -1
  78. package/dist/electron/electronVersion.js +1 -11
  79. package/dist/electron/electronVersion.js.map +1 -1
  80. package/dist/electron/injectFFMPEG.js +2 -2
  81. package/dist/electron/injectFFMPEG.js.map +1 -1
  82. package/dist/electron/mac/electronMac.js +24 -35
  83. package/dist/electron/mac/electronMac.js.map +1 -1
  84. package/dist/electron/mac/electronMacUtils.d.ts +24 -0
  85. package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
  86. package/dist/electron/mac/electronMacUtils.js +42 -0
  87. package/dist/electron/mac/electronMacUtils.js.map +1 -0
  88. package/dist/electron/win/electronWin.js +2 -2
  89. package/dist/electron/win/electronWin.js.map +1 -1
  90. package/dist/fileMatcher.d.ts +55 -3
  91. package/dist/fileMatcher.d.ts.map +1 -1
  92. package/dist/fileMatcher.js +274 -28
  93. package/dist/fileMatcher.js.map +1 -1
  94. package/dist/index.d.ts +13 -7
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +17 -1
  97. package/dist/index.js.map +1 -1
  98. package/dist/indexInternal.d.ts +20 -8
  99. package/dist/indexInternal.d.ts.map +1 -1
  100. package/dist/indexInternal.js +19 -7
  101. package/dist/indexInternal.js.map +1 -1
  102. package/dist/linuxPackager.d.ts.map +1 -1
  103. package/dist/linuxPackager.js +19 -1
  104. package/dist/linuxPackager.js.map +1 -1
  105. package/dist/macPackager.d.ts +31 -14
  106. package/dist/macPackager.d.ts.map +1 -1
  107. package/dist/macPackager.js +236 -147
  108. package/dist/macPackager.js.map +1 -1
  109. package/dist/node-module-collector/index.d.ts.map +1 -1
  110. package/dist/node-module-collector/index.js +47 -16
  111. package/dist/node-module-collector/index.js.map +1 -1
  112. package/dist/node-module-collector/moduleManager.d.ts +11 -2
  113. package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
  114. package/dist/node-module-collector/moduleManager.js +34 -14
  115. package/dist/node-module-collector/moduleManager.js.map +1 -1
  116. package/dist/node-module-collector/nodeModulesCollector.d.ts +47 -26
  117. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
  118. package/dist/node-module-collector/nodeModulesCollector.js +157 -142
  119. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
  120. package/dist/node-module-collector/packageManager.js +1 -1
  121. package/dist/node-module-collector/packageManager.js.map +1 -1
  122. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +90 -1
  123. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
  124. package/dist/node-module-collector/pnpmNodeModulesCollector.js +325 -25
  125. package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
  126. package/dist/node-module-collector/types.d.ts +4 -0
  127. package/dist/node-module-collector/types.d.ts.map +1 -1
  128. package/dist/node-module-collector/types.js.map +1 -1
  129. package/dist/options/FuseOptionsV1.d.ts +137 -0
  130. package/dist/options/FuseOptionsV1.d.ts.map +1 -0
  131. package/dist/options/FuseOptionsV1.js +2 -0
  132. package/dist/options/FuseOptionsV1.js.map +1 -0
  133. package/dist/options/MsixOptions.d.ts +126 -0
  134. package/dist/options/MsixOptions.d.ts.map +1 -0
  135. package/dist/options/MsixOptions.js +2 -0
  136. package/dist/options/MsixOptions.js.map +1 -0
  137. package/dist/options/PlatformSpecificBuildOptions.d.ts +147 -12
  138. package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
  139. package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
  140. package/dist/options/SnapOptions.d.ts +59 -32
  141. package/dist/options/SnapOptions.d.ts.map +1 -1
  142. package/dist/options/SnapOptions.js.map +1 -1
  143. package/dist/options/SquirrelWindowsOptions.d.ts +0 -5
  144. package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
  145. package/dist/options/SquirrelWindowsOptions.js.map +1 -1
  146. package/dist/options/linuxOptions.d.ts +61 -30
  147. package/dist/options/linuxOptions.d.ts.map +1 -1
  148. package/dist/options/linuxOptions.js.map +1 -1
  149. package/dist/options/macOptions.d.ts +113 -131
  150. package/dist/options/macOptions.d.ts.map +1 -1
  151. package/dist/options/macOptions.js.map +1 -1
  152. package/dist/options/pkgOptions.d.ts +1 -1
  153. package/dist/options/pkgOptions.js.map +1 -1
  154. package/dist/options/winOptions.d.ts +282 -70
  155. package/dist/options/winOptions.d.ts.map +1 -1
  156. package/dist/options/winOptions.js +12 -1
  157. package/dist/options/winOptions.js.map +1 -1
  158. package/dist/packager.d.ts +6 -1
  159. package/dist/packager.d.ts.map +1 -1
  160. package/dist/packager.js +123 -40
  161. package/dist/packager.js.map +1 -1
  162. package/dist/packagerApi.d.ts +10 -1
  163. package/dist/packagerApi.d.ts.map +1 -1
  164. package/dist/packagerApi.js.map +1 -1
  165. package/dist/platformPackager.d.ts +55 -4
  166. package/dist/platformPackager.d.ts.map +1 -1
  167. package/dist/platformPackager.js +160 -22
  168. package/dist/platformPackager.js.map +1 -1
  169. package/dist/presets/rectCra.js +3 -1
  170. package/dist/presets/rectCra.js.map +1 -1
  171. package/dist/publish/PublishManager.d.ts +40 -2
  172. package/dist/publish/PublishManager.d.ts.map +1 -1
  173. package/dist/publish/PublishManager.js +365 -23
  174. package/dist/publish/PublishManager.js.map +1 -1
  175. package/dist/publish/updateInfoBuilder.d.ts +1 -1
  176. package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
  177. package/dist/publish/updateInfoBuilder.js +108 -32
  178. package/dist/publish/updateInfoBuilder.js.map +1 -1
  179. package/dist/targets/ArchiveTarget.d.ts +1 -0
  180. package/dist/targets/ArchiveTarget.d.ts.map +1 -1
  181. package/dist/targets/ArchiveTarget.js +13 -4
  182. package/dist/targets/ArchiveTarget.js.map +1 -1
  183. package/dist/targets/archive.d.ts +39 -2
  184. package/dist/targets/archive.d.ts.map +1 -1
  185. package/dist/targets/archive.js +114 -30
  186. package/dist/targets/archive.js.map +1 -1
  187. package/dist/targets/blockmap/blockmap.d.ts +44 -3
  188. package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
  189. package/dist/targets/blockmap/blockmap.js +142 -15
  190. package/dist/targets/blockmap/blockmap.js.map +1 -1
  191. package/dist/targets/blockmap/verbatimRange.d.ts +44 -0
  192. package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -0
  193. package/dist/targets/blockmap/verbatimRange.js +117 -0
  194. package/dist/targets/blockmap/verbatimRange.js.map +1 -0
  195. package/dist/targets/differentialUpdateInfoBuilder.d.ts +28 -2
  196. package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
  197. package/dist/targets/differentialUpdateInfoBuilder.js +75 -6
  198. package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
  199. package/dist/targets/linux/FlatpakTarget.d.ts +17 -0
  200. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
  201. package/dist/targets/linux/FlatpakTarget.js +245 -45
  202. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  203. package/dist/targets/linux/FpmTarget.d.ts +14 -0
  204. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  205. package/dist/targets/linux/FpmTarget.js +92 -12
  206. package/dist/targets/linux/FpmTarget.js.map +1 -1
  207. package/dist/targets/linux/LinuxTargetHelper.d.ts +13 -0
  208. package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
  209. package/dist/targets/linux/LinuxTargetHelper.js +81 -61
  210. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
  211. package/dist/targets/linux/appimage/AppImageTarget.d.ts +2 -0
  212. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
  213. package/dist/targets/linux/appimage/AppImageTarget.js +20 -15
  214. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
  215. package/dist/targets/linux/appimage/appImageUtil.d.ts +8 -2
  216. package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
  217. package/dist/targets/linux/appimage/appImageUtil.js +16 -9
  218. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  219. package/dist/targets/linux/appimage/appLauncher.d.ts +6 -0
  220. package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
  221. package/dist/targets/linux/appimage/appLauncher.js +18 -20
  222. package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
  223. package/dist/targets/linux/flatpakBundle.d.ts +43 -0
  224. package/dist/targets/linux/flatpakBundle.d.ts.map +1 -0
  225. package/dist/targets/linux/flatpakBundle.js +210 -0
  226. package/dist/targets/linux/flatpakBundle.js.map +1 -0
  227. package/dist/targets/linux/launcherScript.d.ts +32 -0
  228. package/dist/targets/linux/launcherScript.d.ts.map +1 -0
  229. package/dist/targets/linux/launcherScript.js +24 -0
  230. package/dist/targets/linux/launcherScript.js.map +1 -0
  231. package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
  232. package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
  233. package/dist/targets/linux/snap/SnapTarget.js +23 -1
  234. package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
  235. package/dist/targets/linux/snap/core24.d.ts +13 -2
  236. package/dist/targets/linux/snap/core24.d.ts.map +1 -1
  237. package/dist/targets/linux/snap/core24.js +107 -95
  238. package/dist/targets/linux/snap/core24.js.map +1 -1
  239. package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
  240. package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
  241. package/dist/targets/linux/snap/coreCustom.js +2 -2
  242. package/dist/targets/linux/snap/coreCustom.js.map +1 -1
  243. package/dist/targets/linux/snap/coreLegacy.d.ts +10 -3
  244. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
  245. package/dist/targets/linux/snap/coreLegacy.js +37 -18
  246. package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
  247. package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
  248. package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
  249. package/dist/targets/linux/snap/snapCommand.js +21 -0
  250. package/dist/targets/linux/snap/snapCommand.js.map +1 -0
  251. package/dist/targets/linux/snap/snapPlugs.d.ts +76 -0
  252. package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -0
  253. package/dist/targets/linux/snap/snapPlugs.js +242 -0
  254. package/dist/targets/linux/snap/snapPlugs.js.map +1 -0
  255. package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
  256. package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
  257. package/dist/targets/linux/snap/snapcraft.js +11 -0
  258. package/dist/targets/linux/snap/snapcraft.js.map +1 -0
  259. package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
  260. package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
  261. package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
  262. package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
  263. package/dist/targets/mac/MacTargetHelper.d.ts +146 -14
  264. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
  265. package/dist/targets/mac/MacTargetHelper.js +485 -91
  266. package/dist/targets/mac/MacTargetHelper.js.map +1 -1
  267. package/dist/targets/mac/pkg.d.ts +16 -0
  268. package/dist/targets/mac/pkg.d.ts.map +1 -1
  269. package/dist/targets/mac/pkg.js +31 -5
  270. package/dist/targets/mac/pkg.js.map +1 -1
  271. package/dist/targets/targetFactory.d.ts +7 -0
  272. package/dist/targets/targetFactory.d.ts.map +1 -1
  273. package/dist/targets/targetFactory.js +28 -0
  274. package/dist/targets/targetFactory.js.map +1 -1
  275. package/dist/targets/win/AppxTarget.d.ts +1 -2
  276. package/dist/targets/win/AppxTarget.d.ts.map +1 -1
  277. package/dist/targets/win/AppxTarget.js +37 -314
  278. package/dist/targets/win/AppxTarget.js.map +1 -1
  279. package/dist/targets/win/MsiTarget.d.ts.map +1 -1
  280. package/dist/targets/win/MsiTarget.js +13 -13
  281. package/dist/targets/win/MsiTarget.js.map +1 -1
  282. package/dist/targets/win/MsixTarget.d.ts +22 -0
  283. package/dist/targets/win/MsixTarget.d.ts.map +1 -0
  284. package/dist/targets/win/MsixTarget.js +214 -0
  285. package/dist/targets/win/MsixTarget.js.map +1 -0
  286. package/dist/targets/win/nsis/Defines.d.ts +4 -0
  287. package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
  288. package/dist/targets/win/nsis/Defines.js.map +1 -1
  289. package/dist/targets/win/nsis/NsisTarget.d.ts +64 -3
  290. package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
  291. package/dist/targets/win/nsis/NsisTarget.js +277 -113
  292. package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
  293. package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -1
  294. package/dist/targets/win/nsis/WebInstallerTarget.js +23 -12
  295. package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -1
  296. package/dist/targets/win/nsis/nsisOptions.d.ts +58 -48
  297. package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
  298. package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
  299. package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
  300. package/dist/targets/win/nsis/nsisScriptGenerator.js +4 -3
  301. package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
  302. package/dist/targets/win/nsis/nsisUtil.d.ts +17 -2
  303. package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
  304. package/dist/targets/win/nsis/nsisUtil.js +148 -41
  305. package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
  306. package/dist/targets/win/nsis/progId.d.ts +21 -0
  307. package/dist/targets/win/nsis/progId.d.ts.map +1 -0
  308. package/dist/targets/win/nsis/progId.js +60 -0
  309. package/dist/targets/win/nsis/progId.js.map +1 -0
  310. package/dist/targets/win/winAppUtil.d.ts +115 -0
  311. package/dist/targets/win/winAppUtil.d.ts.map +1 -0
  312. package/dist/targets/win/winAppUtil.js +409 -0
  313. package/dist/targets/win/winAppUtil.js.map +1 -0
  314. package/dist/toolsets/7zip.d.ts +32 -0
  315. package/dist/toolsets/7zip.d.ts.map +1 -1
  316. package/dist/toolsets/7zip.js +39 -11
  317. package/dist/toolsets/7zip.js.map +1 -1
  318. package/dist/toolsets/appimage.d.ts +3 -3
  319. package/dist/toolsets/appimage.d.ts.map +1 -1
  320. package/dist/toolsets/appimage.js +24 -21
  321. package/dist/toolsets/appimage.js.map +1 -1
  322. package/dist/toolsets/custom.d.ts +2 -3
  323. package/dist/toolsets/custom.d.ts.map +1 -1
  324. package/dist/toolsets/custom.js +67 -149
  325. package/dist/toolsets/custom.js.map +1 -1
  326. package/dist/toolsets/fpm.d.ts.map +1 -1
  327. package/dist/toolsets/fpm.js +11 -5
  328. package/dist/toolsets/fpm.js.map +1 -1
  329. package/dist/toolsets/icons.d.ts.map +1 -1
  330. package/dist/toolsets/icons.js +17 -3
  331. package/dist/toolsets/icons.js.map +1 -1
  332. package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
  333. package/dist/toolsets/linuxToolsMac.js +17 -4
  334. package/dist/toolsets/linuxToolsMac.js.map +1 -1
  335. package/dist/toolsets/nsis.d.ts +5 -0
  336. package/dist/toolsets/nsis.d.ts.map +1 -1
  337. package/dist/toolsets/nsis.js +20 -4
  338. package/dist/toolsets/nsis.js.map +1 -1
  339. package/dist/toolsets/version.d.ts +12 -0
  340. package/dist/toolsets/version.d.ts.map +1 -0
  341. package/dist/toolsets/version.js +13 -0
  342. package/dist/toolsets/version.js.map +1 -0
  343. package/dist/toolsets/winCodeSign.d.ts +56 -3
  344. package/dist/toolsets/winCodeSign.d.ts.map +1 -1
  345. package/dist/toolsets/winCodeSign.js +125 -42
  346. package/dist/toolsets/winCodeSign.js.map +1 -1
  347. package/dist/toolsets/wine.d.ts +2 -1
  348. package/dist/toolsets/wine.d.ts.map +1 -1
  349. package/dist/toolsets/wine.js +31 -15
  350. package/dist/toolsets/wine.js.map +1 -1
  351. package/dist/util/AppFileWalker.js +9 -1
  352. package/dist/util/AppFileWalker.js.map +1 -1
  353. package/dist/util/NodeModuleCopyHelper.js +14 -6
  354. package/dist/util/NodeModuleCopyHelper.js.map +1 -1
  355. package/dist/util/appFileCopier.d.ts +67 -2
  356. package/dist/util/appFileCopier.d.ts.map +1 -1
  357. package/dist/util/appFileCopier.js +244 -32
  358. package/dist/util/appFileCopier.js.map +1 -1
  359. package/dist/util/archCompatibility.d.ts +42 -0
  360. package/dist/util/archCompatibility.d.ts.map +1 -0
  361. package/dist/util/archCompatibility.js +202 -0
  362. package/dist/util/archCompatibility.js.map +1 -0
  363. package/dist/util/checksum.d.ts +36 -0
  364. package/dist/util/checksum.d.ts.map +1 -0
  365. package/dist/util/checksum.js +48 -0
  366. package/dist/util/checksum.js.map +1 -0
  367. package/dist/util/config/config.d.ts +2 -1
  368. package/dist/util/config/config.d.ts.map +1 -1
  369. package/dist/util/config/config.js +42 -20
  370. package/dist/util/config/config.js.map +1 -1
  371. package/dist/util/config/fileOptions.d.ts +30 -0
  372. package/dist/util/config/fileOptions.d.ts.map +1 -0
  373. package/dist/util/config/fileOptions.js +120 -0
  374. package/dist/util/config/fileOptions.js.map +1 -0
  375. package/dist/util/config/legacyConfigGuard.d.ts +7 -0
  376. package/dist/util/config/legacyConfigGuard.d.ts.map +1 -0
  377. package/dist/util/config/legacyConfigGuard.js +214 -0
  378. package/dist/util/config/legacyConfigGuard.js.map +1 -0
  379. package/dist/util/config/legacyOptions.d.ts +86 -0
  380. package/dist/util/config/legacyOptions.d.ts.map +1 -0
  381. package/dist/util/config/legacyOptions.js +413 -0
  382. package/dist/util/config/legacyOptions.js.map +1 -0
  383. package/dist/util/config/load.d.ts +2 -2
  384. package/dist/util/config/load.d.ts.map +1 -1
  385. package/dist/util/config/load.js +3 -12
  386. package/dist/util/config/load.js.map +1 -1
  387. package/dist/util/config/schemaValidator.d.ts.map +1 -1
  388. package/dist/util/config/schemaValidator.js +26 -3
  389. package/dist/util/config/schemaValidator.js.map +1 -1
  390. package/dist/util/electronGet.d.ts +43 -32
  391. package/dist/util/electronGet.d.ts.map +1 -1
  392. package/dist/util/electronGet.js +390 -137
  393. package/dist/util/electronGet.js.map +1 -1
  394. package/dist/util/flags.d.ts +5 -5
  395. package/dist/util/flags.d.ts.map +1 -1
  396. package/dist/util/flags.js +124 -16
  397. package/dist/util/flags.js.map +1 -1
  398. package/dist/util/hash.d.ts +1 -1
  399. package/dist/util/hash.d.ts.map +1 -1
  400. package/dist/util/hash.js +1 -15
  401. package/dist/util/hash.js.map +1 -1
  402. package/dist/util/installOrRebuild.d.ts +44 -0
  403. package/dist/util/installOrRebuild.d.ts.map +1 -0
  404. package/dist/util/installOrRebuild.js +276 -0
  405. package/dist/util/installOrRebuild.js.map +1 -0
  406. package/dist/util/langs.d.ts.map +1 -1
  407. package/dist/util/langs.js +1 -0
  408. package/dist/util/langs.js.map +1 -1
  409. package/dist/util/license.d.ts.map +1 -1
  410. package/dist/util/license.js +4 -1
  411. package/dist/util/license.js.map +1 -1
  412. package/dist/util/mac/macosIconComposer.d.ts +2 -1
  413. package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
  414. package/dist/util/mac/macosIconComposer.js +40 -58
  415. package/dist/util/mac/macosIconComposer.js.map +1 -1
  416. package/dist/util/mac/macosVersion.d.ts +0 -1
  417. package/dist/util/mac/macosVersion.d.ts.map +1 -1
  418. package/dist/util/mac/macosVersion.js +0 -3
  419. package/dist/util/mac/macosVersion.js.map +1 -1
  420. package/dist/util/mac/plist.d.ts +1 -1
  421. package/dist/util/mac/plist.d.ts.map +1 -1
  422. package/dist/util/mac/plist.js +5 -0
  423. package/dist/util/mac/plist.js.map +1 -1
  424. package/dist/util/nativeBinaryVerifier.d.ts +40 -0
  425. package/dist/util/nativeBinaryVerifier.d.ts.map +1 -0
  426. package/dist/util/nativeBinaryVerifier.js +381 -0
  427. package/dist/util/nativeBinaryVerifier.js.map +1 -0
  428. package/dist/util/packageMetadata.js +57 -31
  429. package/dist/util/packageMetadata.js.map +1 -1
  430. package/dist/util/removedEnvVars.d.ts +25 -0
  431. package/dist/util/removedEnvVars.d.ts.map +1 -0
  432. package/dist/util/removedEnvVars.js +54 -0
  433. package/dist/util/removedEnvVars.js.map +1 -0
  434. package/dist/util/repositoryInfo.js +6 -3
  435. package/dist/util/repositoryInfo.js.map +1 -1
  436. package/dist/util/resolve.js +1 -1
  437. package/dist/util/resolve.js.map +1 -1
  438. package/dist/util/streamSpawnToFile.d.ts +47 -0
  439. package/dist/util/streamSpawnToFile.d.ts.map +1 -0
  440. package/dist/util/streamSpawnToFile.js +110 -0
  441. package/dist/util/streamSpawnToFile.js.map +1 -0
  442. package/dist/util/toolsetLock.d.ts +2 -0
  443. package/dist/util/toolsetLock.d.ts.map +1 -1
  444. package/dist/util/toolsetLock.js +31 -5
  445. package/dist/util/toolsetLock.js.map +1 -1
  446. package/dist/util/trustedSourceRoots.d.ts +59 -0
  447. package/dist/util/trustedSourceRoots.d.ts.map +1 -0
  448. package/dist/util/trustedSourceRoots.js +127 -0
  449. package/dist/util/trustedSourceRoots.js.map +1 -0
  450. package/dist/version.d.ts +1 -1
  451. package/dist/version.d.ts.map +1 -1
  452. package/dist/version.js +1 -1
  453. package/dist/version.js.map +1 -1
  454. package/dist/vm/ParallelsVm.d.ts.map +1 -1
  455. package/dist/vm/ParallelsVm.js +29 -3
  456. package/dist/vm/ParallelsVm.js.map +1 -1
  457. package/dist/vm/vm.d.ts +2 -0
  458. package/dist/vm/vm.d.ts.map +1 -1
  459. package/dist/vm/vm.js +29 -6
  460. package/dist/vm/vm.js.map +1 -1
  461. package/dist/winPackager.d.ts +6 -5
  462. package/dist/winPackager.d.ts.map +1 -1
  463. package/dist/winPackager.js +45 -39
  464. package/dist/winPackager.js.map +1 -1
  465. package/package.json +20 -20
  466. package/scheme.json +2112 -1495
  467. package/templates/appx/appxmanifest.xml +2 -3
  468. package/templates/entitlements.mac.adhoc.plist +15 -0
  469. package/templates/entitlements.mac.plist +9 -6
  470. package/templates/msix/appxmanifest.xml +45 -0
  471. package/templates/nsis/assistedMessages.yml +17 -0
  472. package/templates/nsis/common.nsh +2 -2
  473. package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +96 -13
  474. package/templates/nsis/include/extractAppPackage.nsh +5 -2
  475. package/templates/nsis/include/installUtil.nsh +2 -2
  476. package/templates/nsis/include/installer.nsh +94 -53
  477. package/templates/nsis/include/webPackage.nsh +52 -27
  478. package/templates/nsis/installSection.nsh +29 -0
  479. package/templates/nsis/installer.nsi +1 -1
  480. package/templates/nsis/messages.yml +5 -0
  481. package/templates/nsis/multiUserUi.nsh +1 -1
  482. package/dist/codeSign/signManager.d.ts +0 -14
  483. package/dist/codeSign/signManager.d.ts.map +0 -1
  484. package/dist/codeSign/signManager.js +0 -2
  485. package/dist/codeSign/signManager.js.map +0 -1
  486. package/dist/util/yarn.d.ts +0 -23
  487. package/dist/util/yarn.d.ts.map +0 -1
  488. package/dist/util/yarn.js +0 -153
  489. package/dist/util/yarn.js.map +0 -1
@@ -1,20 +1,25 @@
1
1
  import type { FuseConfig } from "@electron/fuses";
2
- import { Arch, AsyncTaskManager, DebugLogger, FileTransformer } from "builder-util";
3
- import { CancellationToken, Nullish } from "builder-util-runtime";
2
+ import { Arch, AsyncTaskManager, DebugLogger, ExternalLinkPolicy, FileTransformer } from "builder-util";
3
+ import { CancellationToken, MemoLazy, Nullish } from "builder-util-runtime";
4
+ import type { KeyObject } from "crypto";
4
5
  import type { TmpDir } from "temp-file";
5
6
  import type { Metadata } from "./options/metadata.js";
7
+ import type { UpdateManifestSigningOptions } from "./options/PlatformSpecificBuildOptions.js";
6
8
  import type { ArtifactBuildStarted, ArtifactCreated } from "./packagerApi.js";
7
9
  import { AppInfo } from "./appInfo.js";
10
+ import { SigningResult } from "./codeSign/signResult.js";
8
11
  import { GetFileMatchersOptions } from "./fileMatcher.js";
9
12
  import { Framework } from "./Framework.js";
10
13
  import { Platform, SourceRepositoryInfo } from "./core.js";
11
14
  import type { AfterPackContext, CompressionLevel, Configuration, ElectronPlatformName, FileAssociation, Packager, PackagerOptions, PlatformSpecificBuildOptions, Target, TargetSpecificOptions } from "./index.js";
15
+ import type { PlatformType } from "./targets/mac/MacTargetHelper.js";
12
16
  import { IconFormat, IconInfo } from "./util/iconConverter.js";
13
17
  import { AssetCatalogResult } from "./util/mac/macosIconComposer.js";
14
18
  export type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {
15
19
  outDir: string;
16
20
  appOutDir: string;
17
21
  platformName: ElectronPlatformName;
22
+ platformType?: PlatformType;
18
23
  arch: Arch;
19
24
  platformSpecificBuildOptions: DC;
20
25
  targets: Array<Target>;
@@ -22,6 +27,7 @@ export type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {
22
27
  sign?: boolean;
23
28
  disableAsarIntegrity?: boolean;
24
29
  disableFuses?: boolean;
30
+ disableArchFilter?: boolean;
25
31
  };
26
32
  };
27
33
  export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions> {
@@ -39,14 +45,58 @@ export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildO
39
45
  * Replaces the manual `deepAssign({}, packager.platformSpecificBuildOptions, config.X)` pattern.
40
46
  */
41
47
  getOptionsForTarget<T>(key: string): T;
48
+ private externalLinkPolicy;
49
+ /**
50
+ * The resolved `fileOptions.allowExternalLinks` option: the platform-level value (`config.mac.fileOptions.allowExternalLinks`, ...) or the
51
+ * root one (see {@link resolveAllowExternalLinks}). Computed once; a listed path that does not exist fails the build.
52
+ */
53
+ getExternalLinkPolicy(): Promise<ExternalLinkPolicy>;
42
54
  get resourceList(): Promise<Array<string>>;
43
55
  private readonly _resourceList;
56
+ /**
57
+ * The effective `updateManifest` option: a platform-level value (`config.mac.updateManifest`, ...) shadows the
58
+ * root one, and so does `false` - the explicit opt-out - because `??` only falls through on null/undefined.
59
+ * A platform-level `null` therefore still falls back to the root rather than disabling signing.
60
+ *
61
+ * Note that `mas` / `masDev` are not consulted: `platformOptions` is `config[platform.buildConfigurationKey]`,
62
+ * which is `mac` for every macOS flavor. MAS builds produce no auto-update metadata, so the opt-out belongs on
63
+ * `mac` or at the root.
64
+ */
65
+ get updateManifestOptions(): UpdateManifestSigningOptions | false | null;
66
+ /**
67
+ * Ed25519 private key(s) used to sign auto-update manifests; empty when signing is opted out of, or when
68
+ * nothing is configured. Single source of truth for both consumers - updateInfoBuilder (signing `latest*.yml`)
69
+ * and PublishManager (embedding the derived public keys in `app-update.yml`) - so the two can no longer
70
+ * disagree about whether signing is on or which keys are in play. Several keys mean every manifest is
71
+ * signed by each of them (dual-signing during key rotation); the first key is the one written to the
72
+ * legacy single `signature` field. MemoLazy rather than Lazy so a hook mutating `updateManifest`
73
+ * between packs re-resolves, while a normal build parses the PEMs once.
74
+ *
75
+ * Deliberately non-throwing: callers about to emit auto-update metadata go through
76
+ * {@link requireUpdateSigningKeys}, which enforces the requirement. Callers that only want the keys if they
77
+ * happen to exist - embedding a trust list for a publish target with `publishAutoUpdate: false` - read this.
78
+ */
79
+ readonly updateSigningKeys: MemoLazy<false | UpdateManifestSigningOptions | null, KeyObject[]>;
80
+ /**
81
+ * Resolves the signing keys for a build step that will emit auto-update metadata, enforcing that manifests are
82
+ * signed: an unsigned `latest*.yml` lets anyone who can write to the update feed point every install at an
83
+ * arbitrary installer.
84
+ *
85
+ * `required` is the publish gate - only a build with a publish policy fails. A build that merely writes a
86
+ * manifest (which includes any GitHub-hosted project, since the publish config is inferred from `repository`)
87
+ * gets an advisory warning instead, so local builds and external-signer pipelines keep working. The warning is
88
+ * emitted at most once per packager; the throw stays re-derivable, since the call sites run per arch and per
89
+ * manifest task.
90
+ */
91
+ requireUpdateSigningKeys(required: boolean): Promise<Array<KeyObject>>;
44
92
  readonly appInfo: AppInfo;
45
93
  protected constructor(info: Packager, platform: Platform);
46
94
  get compression(): CompressionLevel;
47
95
  get debugLogger(): DebugLogger;
48
96
  get tempDirManager(): TmpDir;
97
+ addBuildFinalizeTask(task: () => Promise<void>): void;
49
98
  get metadata(): Metadata;
99
+ get originalMetadata(): Metadata;
50
100
  get framework(): Framework;
51
101
  get cancellationToken(): CancellationToken;
52
102
  get repositoryInfo(): Promise<SourceRepositoryInfo | null>;
@@ -72,6 +122,7 @@ export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildO
72
122
  doGetCscPassword(): string | Nullish;
73
123
  protected computeAppOutDir(outDir: string, arch: Arch): string;
74
124
  pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any>;
125
+ private readonly packToTargets;
75
126
  protected packageInDistributableFormat(appOutDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): void;
76
127
  private static buildAsyncTargets;
77
128
  private getExtraFileMatchers;
@@ -90,10 +141,10 @@ export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildO
90
141
  * ```
91
142
  */
92
143
  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>;
144
+ protected doSignAfterPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, platformType: PlatformType | undefined, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>): Promise<void>;
94
145
  protected createTransformerForExtraFiles(packContext: AfterPackContext): FileTransformer | null;
95
146
  private copyAppFiles;
96
- protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean>;
147
+ protected signApp(packContext: AfterPackContext, isAsar: boolean, _platformType?: PlatformType): Promise<SigningResult>;
97
148
  getIconPath(): Promise<string | null>;
98
149
  private computeAsarOptions;
99
150
  getElectronSrcDir(dist: string): string;
@@ -1 +1 @@
1
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SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYjF,OAAO,CAAC,sBAAsB,CAAqC;IAC7D,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;cAqB7C,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IA0B5E,uBAAuB,IAAI,MAAM,GAAG,IAAI;IAMlC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;CA4B9H;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,WAE5C;AAED,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,MAAM,GAAG,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"}
@@ -1,12 +1,13 @@
1
1
  import { dynamicImport } from "./util/dynamicImport.js";
2
- import { Arch, asArray, AsyncTaskManager, defaultArchFromString, getArchSuffix, getArtifactArchName, InvalidConfigurationError, isEmptyOrSpaces, log, orIfFileNotExist, sanitizeDirPath, statOrNull, } from "builder-util";
3
- import { deepAssign } from "builder-util-runtime";
2
+ import { CONTENT_ALIGNMENT_WARN_THRESHOLD, validateContentAlignment } from "./asar/asarAlign.js";
3
+ import { Arch, asArray, AsyncTaskManager, defaultArchFromString, ExternalLinkPolicy, getArchSuffix, getArtifactArchName, InvalidConfigurationError, isEmptyOrSpaces, loadUpdateSigningKeys, log, orIfFileNotExist, parsePrivateKey, sanitizeDirPath, statOrNull, } from "builder-util";
4
+ import { deepAssign, MemoLazy } from "builder-util-runtime";
4
5
  import { readdir } from "fs/promises";
5
6
  import { Lazy } from "lazy-val";
6
7
  import * as path from "path";
7
8
  import * as fs from "fs/promises";
8
- import * as os from "os";
9
9
  import { AppInfo } from "./appInfo.js";
10
+ import { isSignResultSigned } from "./codeSign/signResult.js";
10
11
  import { checkFileInArchive } from "./asar/asarFileChecker.js";
11
12
  import { AsarPackager } from "./asar/asarUtil.js";
12
13
  import { computeData } from "./asar/integrity.js";
@@ -15,6 +16,8 @@ import { createTransformer } from "./fileTransformer.js";
15
16
  import { isElectronBased } from "./Framework.js";
16
17
  import { Platform } from "./core.js";
17
18
  import { computeFileSets, computeNodeModuleFileSets, copyAppFiles, transformFiles } from "./util/appFileCopier.js";
19
+ import { verifyNativeBinaries } from "./util/nativeBinaryVerifier.js";
20
+ import { getTrustedSourceRoots, resolveAllowExternalLinks } from "./util/trustedSourceRoots.js";
18
21
  import { convertIcon } from "./util/iconConverter.js";
19
22
  import { expandMacro as doExpandMacro } from "./util/macroExpander.js";
20
23
  import { generateAssetCatalogForIcon } from "./util/mac/macosIconComposer.js";
@@ -42,13 +45,105 @@ export class PlatformPackager {
42
45
  getOptionsForTarget(key) {
43
46
  return deepAssign({}, this.platformSpecificBuildOptions, this.config[key] ?? {});
44
47
  }
48
+ /**
49
+ * The resolved `fileOptions.allowExternalLinks` option: the platform-level value (`config.mac.fileOptions.allowExternalLinks`, ...) or the
50
+ * root one (see {@link resolveAllowExternalLinks}). Computed once; a listed path that does not exist fails the build.
51
+ */
52
+ getExternalLinkPolicy() {
53
+ if (this.externalLinkPolicy == null) {
54
+ const { value, optionPath } = resolveAllowExternalLinks(this.config, this.platformSpecificBuildOptions, this.platform.buildConfigurationKey);
55
+ this.externalLinkPolicy = ExternalLinkPolicy.create(value, this.projectDir, optionPath);
56
+ }
57
+ return this.externalLinkPolicy;
58
+ }
45
59
  get resourceList() {
46
60
  return this._resourceList.value;
47
61
  }
62
+ /**
63
+ * The effective `updateManifest` option: a platform-level value (`config.mac.updateManifest`, ...) shadows the
64
+ * root one, and so does `false` - the explicit opt-out - because `??` only falls through on null/undefined.
65
+ * A platform-level `null` therefore still falls back to the root rather than disabling signing.
66
+ *
67
+ * Note that `mas` / `masDev` are not consulted: `platformOptions` is `config[platform.buildConfigurationKey]`,
68
+ * which is `mac` for every macOS flavor. MAS builds produce no auto-update metadata, so the opt-out belongs on
69
+ * `mac` or at the root.
70
+ */
71
+ get updateManifestOptions() {
72
+ return this.platformOptions.updateManifest ?? this.config.updateManifest ?? null;
73
+ }
74
+ /**
75
+ * Resolves the signing keys for a build step that will emit auto-update metadata, enforcing that manifests are
76
+ * signed: an unsigned `latest*.yml` lets anyone who can write to the update feed point every install at an
77
+ * arbitrary installer.
78
+ *
79
+ * `required` is the publish gate - only a build with a publish policy fails. A build that merely writes a
80
+ * manifest (which includes any GitHub-hosted project, since the publish config is inferred from `repository`)
81
+ * gets an advisory warning instead, so local builds and external-signer pipelines keep working. The warning is
82
+ * emitted at most once per packager; the throw stays re-derivable, since the call sites run per arch and per
83
+ * manifest task.
84
+ */
85
+ async requireUpdateSigningKeys(required) {
86
+ const optedOut = this.updateManifestOptions === false;
87
+ const keys = optedOut ? [] : await this.updateSigningKeys.value;
88
+ if (keys.length > 0) {
89
+ return keys;
90
+ }
91
+ if (!optedOut && required) {
92
+ throw new InvalidConfigurationError(`auto-update manifests must be signed, but no Ed25519 signing key was found for ${this.platform.name}. ` +
93
+ "Generate one with `electron-builder create-update-key`, then supply it via the ELECTRON_BUILDER_UPDATE_SIGN_KEY (PEM contents) " +
94
+ "or ELECTRON_BUILDER_UPDATE_SIGN_KEY_FILE (path) environment variable, or via updateManifest.signingKey / " +
95
+ "updateManifest.signingKeyFile in the build configuration. To publish unsigned manifests anyway, opt out explicitly with " +
96
+ "`updateManifest: false`. See https://www.electron.build/features/signed-update-manifests");
97
+ }
98
+ log
99
+ .once("unsigned-update-manifest", this)
100
+ .warn({ platform: this.platform.name, reason: optedOut ? "updateManifest is set to false" : "no Ed25519 signing key is configured" }, "auto-update manifests will be unsigned: anyone who can overwrite latest*.yml on your update server can point installs at an arbitrary payload. " +
101
+ (optedOut
102
+ ? "Remove `updateManifest: false` and provide a key with `electron-builder create-update-key` to enable signing. "
103
+ : "Publishing this configuration will fail until you provide a key with `electron-builder create-update-key`, or opt out explicitly with `updateManifest: false`. ") +
104
+ "Note that installs which already embed a public key reject unsigned manifests (ERR_UPDATER_MANIFEST_NOT_SIGNED). " +
105
+ "See https://www.electron.build/features/signed-update-manifests");
106
+ return keys;
107
+ }
48
108
  constructor(info, platform) {
49
109
  this.info = info;
50
110
  this.platform = platform;
111
+ this.externalLinkPolicy = null;
51
112
  this._resourceList = new Lazy(() => orIfFileNotExist(readdir(this.info.buildResourcesDir), []));
113
+ /**
114
+ * Ed25519 private key(s) used to sign auto-update manifests; empty when signing is opted out of, or when
115
+ * nothing is configured. Single source of truth for both consumers - updateInfoBuilder (signing `latest*.yml`)
116
+ * and PublishManager (embedding the derived public keys in `app-update.yml`) - so the two can no longer
117
+ * disagree about whether signing is on or which keys are in play. Several keys mean every manifest is
118
+ * signed by each of them (dual-signing during key rotation); the first key is the one written to the
119
+ * legacy single `signature` field. MemoLazy rather than Lazy so a hook mutating `updateManifest`
120
+ * between packs re-resolves, while a normal build parses the PEMs once.
121
+ *
122
+ * Deliberately non-throwing: callers about to emit auto-update metadata go through
123
+ * {@link requireUpdateSigningKeys}, which enforces the requirement. Callers that only want the keys if they
124
+ * happen to exist - embedding a trust list for a publish target with `publishAutoUpdate: false` - read this.
125
+ */
126
+ this.updateSigningKeys = new MemoLazy(() => this.updateManifestOptions,
127
+ // resolution is fully synchronous (env/readFileSync + createPrivateKey); MemoLazy just wants a promise
128
+ selected => {
129
+ // `false` must short-circuit before loadUpdateSigningKeys, or an ELECTRON_BUILDER_UPDATE_SIGN_KEY left in
130
+ // the CI environment would keep signing - and keep embedding a public key - despite the explicit opt-out.
131
+ if (selected === false) {
132
+ return Promise.resolve([]);
133
+ }
134
+ // relative signingKeyFile paths are project-relative, like every other path in the configuration
135
+ const pems = loadUpdateSigningKeys(selected, this.projectDir);
136
+ if (pems.length === 0) {
137
+ return Promise.resolve([]);
138
+ }
139
+ log.info({ platform: this.platform.name, keys: pems.length }, "signing update manifests with Ed25519 key(s)");
140
+ return Promise.resolve(pems.map(parsePrivateKey));
141
+ });
142
+ // the targets built from each pack (app dir and arch): they ship its single app-update.yml, so a target that writes
143
+ // that file itself (AppImage, deb/rpm/pacman) resolves it for all of them - see getPackAppUpdatePublishConfiguration.
144
+ // Keyed by arch too: a prepackaged app dir is the same for every arch, and each arch may have other targets, whose
145
+ // builds can still be running when the next arch is packaged.
146
+ this.packToTargets = new Map();
52
147
  this.assetCatalogResults = new Map();
53
148
  this.cachedIcnsFromIconFile = new Map();
54
149
  this.platformSpecificBuildOptions = PlatformPackager.normalizePlatformSpecificBuildOptions(this.config[platform.buildConfigurationKey]);
@@ -68,9 +163,15 @@ export class PlatformPackager {
68
163
  get tempDirManager() {
69
164
  return this.info.tempDirManager;
70
165
  }
166
+ addBuildFinalizeTask(task) {
167
+ this.info.addBuildFinalizeTask(task);
168
+ }
71
169
  get metadata() {
72
170
  return this.info.metadata;
73
171
  }
172
+ get originalMetadata() {
173
+ return this.info.originalMetadata;
174
+ }
74
175
  get framework() {
75
176
  return this.info.framework;
76
177
  }
@@ -160,9 +261,18 @@ export class PlatformPackager {
160
261
  platformSpecificBuildOptions: this.platformSpecificBuildOptions,
161
262
  targets,
162
263
  });
264
+ // test-only early exit (see PackagerOptions.afterPackTestHook); a no-op unless the option is set
265
+ if (await this.info.shouldSkipTargetsAfterPack({ appOutDir, outDir, arch, targets, packager: this, electronPlatformName: this.platform.nodeName })) {
266
+ return;
267
+ }
163
268
  this.packageInDistributableFormat(appOutDir, arch, targets, taskManager);
164
269
  }
270
+ /** @internal the targets packaged from `appOutDir` for `arch`, as passed to their `build()` */
271
+ getPackTargets(appOutDir, arch) {
272
+ return this.packToTargets.get(packKey(appOutDir, arch));
273
+ }
165
274
  packageInDistributableFormat(appOutDir, arch, targets, taskManager) {
275
+ this.packToTargets.set(packKey(appOutDir, arch), targets);
166
276
  if (targets.find(it => !it.isAsyncSupported) == null) {
167
277
  PlatformPackager.buildAsyncTargets(targets, taskManager, appOutDir, arch);
168
278
  return;
@@ -208,7 +318,7 @@ export class PlatformPackager {
208
318
  }
209
319
  // 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
320
  delete process.env.GYP_MSVS_VERSION;
211
- const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets, options } = packOptions;
321
+ const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets, options } = packOptions;
212
322
  await this.info.emitBeforePack({
213
323
  appOutDir,
214
324
  outDir,
@@ -272,7 +382,7 @@ export class PlatformPackager {
272
382
  ? path.join(appOutDir, "resources")
273
383
  : appOutDir;
274
384
  const taskManager = new AsyncTaskManager(this.info.cancellationToken);
275
- this.copyAppFiles(taskManager, asarOptions, resourcesPath, path.join(resourcesPath, "app"), packContext, platformSpecificBuildOptions, excludePatterns, macroExpander);
385
+ this.copyAppFiles(taskManager, asarOptions, resourcesPath, path.join(resourcesPath, "app"), packContext, platformSpecificBuildOptions, excludePatterns, macroExpander, options?.disableArchFilter ?? false);
276
386
  await taskManager.awaitTasks();
277
387
  if (this.info.cancellationToken.cancelled) {
278
388
  return;
@@ -288,14 +398,17 @@ export class PlatformPackager {
288
398
  appOutDir,
289
399
  asarIntegrity,
290
400
  platformName,
401
+ platformType,
291
402
  });
292
403
  }
293
404
  if (this.info.cancellationToken.cancelled) {
294
405
  return;
295
406
  }
296
407
  const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext);
297
- await copyFiles(extraResourceMatchers, transformerForExtraFiles);
298
- await copyFiles(extraFileMatchers, transformerForExtraFiles);
408
+ // confined, by real path, to the app output directory (or the output directory, for a "to" that leaves it); a copied symlink may lead into the workspace or the package-manager store
409
+ const extraFilesContainment = { roots: [appOutDir, outDir], allowedSymlinkRoots: await getTrustedSourceRoots(this), externalLinks: await this.getExternalLinkPolicy() };
410
+ await copyFiles(extraResourceMatchers, transformerForExtraFiles, undefined, extraFilesContainment);
411
+ await copyFiles(extraFileMatchers, transformerForExtraFiles, undefined, extraFilesContainment);
299
412
  if (this.info.cancellationToken.cancelled) {
300
413
  return;
301
414
  }
@@ -305,11 +418,18 @@ export class PlatformPackager {
305
418
  }
306
419
  const isAsar = asarOptions != null;
307
420
  await this.sanityCheckPackage(appOutDir, isAsar, framework, !!asarOptions?.disableSanityCheck);
421
+ // before fuses/signing and, for a macOS universal build, before the per-arch slices are merged
422
+ await verifyNativeBinaries({
423
+ resourcesDir: this.getResourcesDir(appOutDir),
424
+ platform: this.platform.nodeName,
425
+ arch,
426
+ mode: this.config.nativeModules?.verifyNativeBinaries,
427
+ });
308
428
  if (!options?.disableFuses) {
309
429
  await this.doAddElectronFuses(packContext);
310
430
  }
311
431
  if (options?.sign ?? true) {
312
- await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets);
432
+ await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets);
313
433
  }
314
434
  }
315
435
  // the fuses MUST be flipped right before signing
@@ -351,6 +471,9 @@ export class PlatformPackager {
351
471
  if (fuses.grantFileProtocolExtraPrivileges != null) {
352
472
  config[FuseV1Options.GrantFileProtocolExtraPrivileges] = fuses.grantFileProtocolExtraPrivileges;
353
473
  }
474
+ if (fuses.wasmTrapHandlers != null) {
475
+ config[FuseV1Options.WasmTrapHandlers] = fuses.wasmTrapHandlers;
476
+ }
354
477
  return config;
355
478
  }
356
479
  /**
@@ -379,7 +502,7 @@ export class PlatformPackager {
379
502
  const { flipFuses } = await dynamicImport("@electron/fuses");
380
503
  return flipFuses(electronBinaryPath, fuses);
381
504
  }
382
- async doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets) {
505
+ async doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets) {
383
506
  const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions);
384
507
  const isAsar = asarOptions != null;
385
508
  const packContext = {
@@ -390,8 +513,8 @@ export class PlatformPackager {
390
513
  packager: this,
391
514
  electronPlatformName: platformName,
392
515
  };
393
- const didSign = await this.signApp(packContext, isAsar);
394
- if (didSign) {
516
+ const signResult = await this.signApp(packContext, isAsar, platformType);
517
+ if (isSignResultSigned(signResult)) {
395
518
  await this.info.emitAfterSign(packContext);
396
519
  }
397
520
  else if (this.info.filterPackagerEventListeners("afterSign", "user").length) {
@@ -402,7 +525,7 @@ export class PlatformPackager {
402
525
  createTransformerForExtraFiles(packContext) {
403
526
  return null;
404
527
  }
405
- copyAppFiles(taskManager, asarOptions, resourcePath, defaultDestination, packContext, platformSpecificBuildOptions, excludePatterns, macroExpander) {
528
+ copyAppFiles(taskManager, asarOptions, resourcePath, defaultDestination, packContext, platformSpecificBuildOptions, excludePatterns, macroExpander, disableArchFilter) {
406
529
  const appDir = this.info.appDir;
407
530
  const config = this.config;
408
531
  const mainMatchers = getMainFileMatchers(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this, packContext.outDir);
@@ -417,7 +540,7 @@ export class PlatformPackager {
417
540
  return computeFileSets(matchers, this.info.isPrepackedAppAsar ? null : transformer, this).then(async (result) => {
418
541
  if (!this.info.isPrepackedAppAsar && !this.info.areNodeModulesHandledExternally) {
419
542
  const moduleFileMatcher = getNodeModuleFileMatcher(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this.info);
420
- result = result.concat(await computeNodeModuleFileSets(this, moduleFileMatcher));
543
+ result = result.concat(await computeNodeModuleFileSets(this, moduleFileMatcher, packContext.arch, !disableArchFilter));
421
544
  }
422
545
  return result.filter(it => it.files.length > 0);
423
546
  });
@@ -425,7 +548,8 @@ export class PlatformPackager {
425
548
  if (this.info.isPrepackedAppAsar) {
426
549
  taskManager.add(async () => {
427
550
  const fileSets = await _computeFileSets([new FileMatcher(appDir, resourcePath, macroExpander)]);
428
- fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, transformer)));
551
+ const copyOptions = { containmentRoot: resourcePath, trustedSourceRoots: await getTrustedSourceRoots(this), externalLinks: await this.getExternalLinkPolicy() };
552
+ fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, transformer, copyOptions)));
429
553
  await taskManager.awaitTasks();
430
554
  });
431
555
  }
@@ -445,7 +569,8 @@ export class PlatformPackager {
445
569
  };
446
570
  taskManager.add(async () => {
447
571
  const fileSets = await _computeFileSets(mainMatchers);
448
- fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, combinedTransformer)));
572
+ const copyOptions = { containmentRoot: resourcePath, trustedSourceRoots: await getTrustedSourceRoots(this), externalLinks: await this.getExternalLinkPolicy() };
573
+ fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, combinedTransformer, copyOptions)));
449
574
  await taskManager.awaitTasks();
450
575
  });
451
576
  }
@@ -474,8 +599,9 @@ export class PlatformPackager {
474
599
  }
475
600
  }
476
601
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
477
- signApp(packContext, isAsar) {
478
- return Promise.resolve(false);
602
+ signApp(packContext, isAsar, _platformType) {
603
+ // the base packager implements no signing (e.g. Linux) — WinPackager and MacPackager override this
604
+ return Promise.resolve("skipped:unsupported");
479
605
  }
480
606
  getIconPath() {
481
607
  return Promise.resolve(null);
@@ -499,7 +625,16 @@ export class PlatformPackager {
499
625
  if (result == null || result === true) {
500
626
  return {};
501
627
  }
502
- return deepAssign({}, result);
628
+ const asarOptions = deepAssign({}, result);
629
+ const alignment = asarOptions.contentAlignment;
630
+ if (alignment != null && alignment !== 0) {
631
+ // fail before anything is packed, not after @electron/asar has written the archive
632
+ validateContentAlignment(alignment);
633
+ if (alignment > CONTENT_ALIGNMENT_WARN_THRESHOLD) {
634
+ log.warn({ contentAlignment: alignment, threshold: CONTENT_ALIGNMENT_WARN_THRESHOLD }, "asar.contentAlignment pads every packed file up to the next boundary; such a large alignment makes app.asar much bigger");
635
+ }
636
+ }
637
+ return asarOptions;
503
638
  }
504
639
  getElectronSrcDir(dist) {
505
640
  return path.resolve(this.projectDir, dist);
@@ -529,7 +664,7 @@ export class PlatformPackager {
529
664
  }
530
665
  const relativeFile = path.relative(this.info.appDir, path.resolve(this.info.appDir, file));
531
666
  if (isAsar) {
532
- await checkFileInArchive(path.join(resourcesDir, "app.asar"), relativeFile, messagePrefix);
667
+ checkFileInArchive(path.join(resourcesDir, "app.asar"), relativeFile, messagePrefix);
533
668
  return;
534
669
  }
535
670
  const pathParsed = path.parse(file);
@@ -548,7 +683,7 @@ export class PlatformPackager {
548
683
  const asarPath = path.join(...pathSplit.slice(0, partWithAsarIndex + 1));
549
684
  let mainPath = pathSplit.length > partWithAsarIndex + 1 ? path.join.apply(pathSplit.slice(partWithAsarIndex + 1)) : "";
550
685
  mainPath += path.join(mainPath, pathParsed.base);
551
- await checkFileInArchive(path.join(resourcesDir, "app", asarPath), mainPath, messagePrefix);
686
+ checkFileInArchive(path.join(resourcesDir, "app", asarPath), mainPath, messagePrefix);
552
687
  }
553
688
  else {
554
689
  const fullPath = path.join(resourcesDir, "app", relativeFile);
@@ -657,7 +792,7 @@ export class PlatformPackager {
657
792
  if (cachedPromise) {
658
793
  return cachedPromise;
659
794
  }
660
- const promise = generateAssetCatalogForIcon(iconPath);
795
+ const promise = generateAssetCatalogForIcon(this.tempDirManager, iconPath);
661
796
  this.assetCatalogResults.set(iconPath, promise);
662
797
  return promise;
663
798
  }
@@ -669,7 +804,7 @@ export class PlatformPackager {
669
804
  const runner = async () => {
670
805
  const { icnsFile } = await this.generateAssetCatalogData(iconPath);
671
806
  // Generate icns file
672
- const tempDir = await fs.mkdtemp(path.resolve(os.tmpdir(), "icon-compile-"));
807
+ const tempDir = await this.tempDirManager.createTempDir({ prefix: "icns-from-icon" });
673
808
  const tempIcnsPath = path.resolve(tempDir, "Icon.icns");
674
809
  await fs.writeFile(tempIcnsPath, icnsFile);
675
810
  return tempIcnsPath;
@@ -758,4 +893,7 @@ export function chooseNotNull(v1, v2) {
758
893
  function capitalizeFirstLetter(text) {
759
894
  return text.charAt(0).toUpperCase() + text.slice(1);
760
895
  }
896
+ function packKey(appOutDir, arch) {
897
+ return `${Arch[arch]}:${appOutDir}`;
898
+ }
761
899
  //# sourceMappingURL=platformPackager.js.map