app-builder-lib 27.0.0-alpha.1 → 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 (457) 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/asarFileChecker.d.ts +4 -2
  10. package/dist/asar/asarFileChecker.d.ts.map +1 -1
  11. package/dist/asar/asarFileChecker.js +2 -3
  12. package/dist/asar/asarFileChecker.js.map +1 -1
  13. package/dist/asar/asarUtil.js +21 -11
  14. package/dist/asar/asarUtil.js.map +1 -1
  15. package/dist/codeSign/certInfo.d.ts +14 -0
  16. package/dist/codeSign/certInfo.d.ts.map +1 -1
  17. package/dist/codeSign/certInfo.js +49 -0
  18. package/dist/codeSign/certInfo.js.map +1 -1
  19. package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
  20. package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
  21. package/dist/codeSign/mac/macCodeSign.js +50 -25
  22. package/dist/codeSign/mac/macCodeSign.js.map +1 -1
  23. package/dist/codeSign/signResult.d.ts +26 -0
  24. package/dist/codeSign/signResult.d.ts.map +1 -0
  25. package/dist/codeSign/signResult.js +12 -0
  26. package/dist/codeSign/signResult.js.map +1 -0
  27. package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
  28. package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
  29. package/dist/codeSign/win/hsmSignManager.js +50 -0
  30. package/dist/codeSign/win/hsmSignManager.js.map +1 -0
  31. package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
  32. package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
  33. package/dist/codeSign/win/pkcs11SignManager.js +82 -0
  34. package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
  35. package/dist/codeSign/win/signManager.d.ts +17 -0
  36. package/dist/codeSign/win/signManager.d.ts.map +1 -0
  37. package/dist/codeSign/win/signManager.js +19 -0
  38. package/dist/codeSign/win/signManager.js.map +1 -0
  39. package/dist/codeSign/win/signtoolBaseSignManager.d.ts +95 -0
  40. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
  41. package/dist/codeSign/win/signtoolBaseSignManager.js +507 -0
  42. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
  43. package/dist/codeSign/win/windowsCodeSign.d.ts +2 -1
  44. package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
  45. package/dist/codeSign/win/windowsCodeSign.js +22 -8
  46. package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
  47. package/dist/codeSign/win/windowsSignAzureManager.d.ts +11 -4
  48. package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
  49. package/dist/codeSign/win/windowsSignAzureManager.js +142 -37
  50. package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
  51. package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
  52. package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
  53. package/dist/codeSign/win/windowsSignToolManager.js +3 -363
  54. package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
  55. package/dist/configuration.d.ts +228 -163
  56. package/dist/configuration.d.ts.map +1 -1
  57. package/dist/configuration.js +11 -1
  58. package/dist/configuration.js.map +1 -1
  59. package/dist/core.d.ts +14 -0
  60. package/dist/core.d.ts.map +1 -1
  61. package/dist/core.js +11 -0
  62. package/dist/core.js.map +1 -1
  63. package/dist/electron/ElectronFramework.d.ts +3 -3
  64. package/dist/electron/ElectronFramework.d.ts.map +1 -1
  65. package/dist/electron/ElectronFramework.js +60 -61
  66. package/dist/electron/ElectronFramework.js.map +1 -1
  67. package/dist/electron/electronArchSupport.d.ts +12 -0
  68. package/dist/electron/electronArchSupport.d.ts.map +1 -0
  69. package/dist/electron/electronArchSupport.js +58 -0
  70. package/dist/electron/electronArchSupport.js.map +1 -0
  71. package/dist/electron/electronVersion.d.ts.map +1 -1
  72. package/dist/electron/electronVersion.js +1 -11
  73. package/dist/electron/electronVersion.js.map +1 -1
  74. package/dist/electron/injectFFMPEG.js +2 -2
  75. package/dist/electron/injectFFMPEG.js.map +1 -1
  76. package/dist/electron/mac/electronMac.js +24 -35
  77. package/dist/electron/mac/electronMac.js.map +1 -1
  78. package/dist/electron/mac/electronMacUtils.d.ts +24 -0
  79. package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
  80. package/dist/electron/mac/electronMacUtils.js +42 -0
  81. package/dist/electron/mac/electronMacUtils.js.map +1 -0
  82. package/dist/electron/win/electronWin.js +2 -2
  83. package/dist/electron/win/electronWin.js.map +1 -1
  84. package/dist/fileMatcher.d.ts +42 -2
  85. package/dist/fileMatcher.d.ts.map +1 -1
  86. package/dist/fileMatcher.js +246 -18
  87. package/dist/fileMatcher.js.map +1 -1
  88. package/dist/index.d.ts +11 -5
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +17 -1
  91. package/dist/index.js.map +1 -1
  92. package/dist/indexInternal.d.ts +19 -8
  93. package/dist/indexInternal.d.ts.map +1 -1
  94. package/dist/indexInternal.js +18 -7
  95. package/dist/indexInternal.js.map +1 -1
  96. package/dist/linuxPackager.d.ts.map +1 -1
  97. package/dist/linuxPackager.js +19 -1
  98. package/dist/linuxPackager.js.map +1 -1
  99. package/dist/macPackager.d.ts +31 -14
  100. package/dist/macPackager.d.ts.map +1 -1
  101. package/dist/macPackager.js +236 -147
  102. package/dist/macPackager.js.map +1 -1
  103. package/dist/node-module-collector/index.d.ts.map +1 -1
  104. package/dist/node-module-collector/index.js +47 -16
  105. package/dist/node-module-collector/index.js.map +1 -1
  106. package/dist/node-module-collector/moduleManager.d.ts +11 -2
  107. package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
  108. package/dist/node-module-collector/moduleManager.js +34 -14
  109. package/dist/node-module-collector/moduleManager.js.map +1 -1
  110. package/dist/node-module-collector/nodeModulesCollector.d.ts +47 -26
  111. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
  112. package/dist/node-module-collector/nodeModulesCollector.js +157 -142
  113. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
  114. package/dist/node-module-collector/packageManager.js +1 -1
  115. package/dist/node-module-collector/packageManager.js.map +1 -1
  116. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +90 -1
  117. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
  118. package/dist/node-module-collector/pnpmNodeModulesCollector.js +325 -25
  119. package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
  120. package/dist/node-module-collector/types.d.ts +4 -0
  121. package/dist/node-module-collector/types.d.ts.map +1 -1
  122. package/dist/node-module-collector/types.js.map +1 -1
  123. package/dist/options/FuseOptionsV1.d.ts +137 -0
  124. package/dist/options/FuseOptionsV1.d.ts.map +1 -0
  125. package/dist/options/FuseOptionsV1.js +2 -0
  126. package/dist/options/FuseOptionsV1.js.map +1 -0
  127. package/dist/options/MsixOptions.d.ts +126 -0
  128. package/dist/options/MsixOptions.d.ts.map +1 -0
  129. package/dist/options/MsixOptions.js +2 -0
  130. package/dist/options/MsixOptions.js.map +1 -0
  131. package/dist/options/PlatformSpecificBuildOptions.d.ts +55 -9
  132. package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
  133. package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
  134. package/dist/options/SnapOptions.d.ts +23 -17
  135. package/dist/options/SnapOptions.d.ts.map +1 -1
  136. package/dist/options/SnapOptions.js.map +1 -1
  137. package/dist/options/SquirrelWindowsOptions.d.ts +0 -5
  138. package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
  139. package/dist/options/SquirrelWindowsOptions.js.map +1 -1
  140. package/dist/options/linuxOptions.d.ts +8 -12
  141. package/dist/options/linuxOptions.d.ts.map +1 -1
  142. package/dist/options/linuxOptions.js.map +1 -1
  143. package/dist/options/macOptions.d.ts +113 -131
  144. package/dist/options/macOptions.d.ts.map +1 -1
  145. package/dist/options/macOptions.js.map +1 -1
  146. package/dist/options/pkgOptions.d.ts +1 -1
  147. package/dist/options/pkgOptions.js.map +1 -1
  148. package/dist/options/winOptions.d.ts +282 -70
  149. package/dist/options/winOptions.d.ts.map +1 -1
  150. package/dist/options/winOptions.js +12 -1
  151. package/dist/options/winOptions.js.map +1 -1
  152. package/dist/packager.d.ts +6 -1
  153. package/dist/packager.d.ts.map +1 -1
  154. package/dist/packager.js +121 -40
  155. package/dist/packager.js.map +1 -1
  156. package/dist/packagerApi.d.ts +10 -1
  157. package/dist/packagerApi.d.ts.map +1 -1
  158. package/dist/packagerApi.js.map +1 -1
  159. package/dist/platformPackager.d.ts +49 -3
  160. package/dist/platformPackager.d.ts.map +1 -1
  161. package/dist/platformPackager.js +130 -17
  162. package/dist/platformPackager.js.map +1 -1
  163. package/dist/publish/PublishManager.d.ts +36 -2
  164. package/dist/publish/PublishManager.d.ts.map +1 -1
  165. package/dist/publish/PublishManager.js +387 -23
  166. package/dist/publish/PublishManager.js.map +1 -1
  167. package/dist/publish/updateInfoBuilder.d.ts +1 -1
  168. package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
  169. package/dist/publish/updateInfoBuilder.js +110 -32
  170. package/dist/publish/updateInfoBuilder.js.map +1 -1
  171. package/dist/targets/ArchiveTarget.d.ts +1 -0
  172. package/dist/targets/ArchiveTarget.d.ts.map +1 -1
  173. package/dist/targets/ArchiveTarget.js +6 -3
  174. package/dist/targets/ArchiveTarget.js.map +1 -1
  175. package/dist/targets/archive.d.ts +33 -2
  176. package/dist/targets/archive.d.ts.map +1 -1
  177. package/dist/targets/archive.js +109 -29
  178. package/dist/targets/archive.js.map +1 -1
  179. package/dist/targets/blockmap/blockmap.d.ts +43 -3
  180. package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
  181. package/dist/targets/blockmap/blockmap.js +141 -15
  182. package/dist/targets/blockmap/blockmap.js.map +1 -1
  183. package/dist/targets/blockmap/verbatimRange.d.ts +44 -0
  184. package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -0
  185. package/dist/targets/blockmap/verbatimRange.js +117 -0
  186. package/dist/targets/blockmap/verbatimRange.js.map +1 -0
  187. package/dist/targets/differentialUpdateInfoBuilder.d.ts +28 -2
  188. package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
  189. package/dist/targets/differentialUpdateInfoBuilder.js +75 -6
  190. package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
  191. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
  192. package/dist/targets/linux/FlatpakTarget.js +13 -3
  193. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  194. package/dist/targets/linux/FpmTarget.d.ts +14 -0
  195. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  196. package/dist/targets/linux/FpmTarget.js +86 -10
  197. package/dist/targets/linux/FpmTarget.js.map +1 -1
  198. package/dist/targets/linux/LinuxTargetHelper.d.ts +15 -0
  199. package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
  200. package/dist/targets/linux/LinuxTargetHelper.js +54 -59
  201. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
  202. package/dist/targets/linux/appimage/AppImageTarget.d.ts +2 -0
  203. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
  204. package/dist/targets/linux/appimage/AppImageTarget.js +16 -15
  205. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
  206. package/dist/targets/linux/appimage/appImageUtil.d.ts +5 -1
  207. package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
  208. package/dist/targets/linux/appimage/appImageUtil.js +14 -7
  209. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  210. package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
  211. package/dist/targets/linux/appimage/appLauncher.js +5 -11
  212. package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
  213. package/dist/targets/linux/launcherScript.d.ts +32 -0
  214. package/dist/targets/linux/launcherScript.d.ts.map +1 -0
  215. package/dist/targets/linux/launcherScript.js +24 -0
  216. package/dist/targets/linux/launcherScript.js.map +1 -0
  217. package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
  218. package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
  219. package/dist/targets/linux/snap/SnapTarget.js +23 -1
  220. package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
  221. package/dist/targets/linux/snap/core24.d.ts +30 -1
  222. package/dist/targets/linux/snap/core24.d.ts.map +1 -1
  223. package/dist/targets/linux/snap/core24.js +146 -70
  224. package/dist/targets/linux/snap/core24.js.map +1 -1
  225. package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
  226. package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
  227. package/dist/targets/linux/snap/coreCustom.js +2 -2
  228. package/dist/targets/linux/snap/coreCustom.js.map +1 -1
  229. package/dist/targets/linux/snap/coreLegacy.d.ts +3 -3
  230. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
  231. package/dist/targets/linux/snap/coreLegacy.js +12 -12
  232. package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
  233. package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
  234. package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
  235. package/dist/targets/linux/snap/snapCommand.js +21 -0
  236. package/dist/targets/linux/snap/snapCommand.js.map +1 -0
  237. package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
  238. package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
  239. package/dist/targets/linux/snap/snapcraft.js +11 -0
  240. package/dist/targets/linux/snap/snapcraft.js.map +1 -0
  241. package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
  242. package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
  243. package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
  244. package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
  245. package/dist/targets/mac/MacTargetHelper.d.ts +146 -14
  246. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
  247. package/dist/targets/mac/MacTargetHelper.js +485 -91
  248. package/dist/targets/mac/MacTargetHelper.js.map +1 -1
  249. package/dist/targets/mac/pkg.d.ts +16 -0
  250. package/dist/targets/mac/pkg.d.ts.map +1 -1
  251. package/dist/targets/mac/pkg.js +31 -5
  252. package/dist/targets/mac/pkg.js.map +1 -1
  253. package/dist/targets/targetFactory.d.ts +7 -0
  254. package/dist/targets/targetFactory.d.ts.map +1 -1
  255. package/dist/targets/targetFactory.js +28 -0
  256. package/dist/targets/targetFactory.js.map +1 -1
  257. package/dist/targets/win/AppxTarget.d.ts +1 -2
  258. package/dist/targets/win/AppxTarget.d.ts.map +1 -1
  259. package/dist/targets/win/AppxTarget.js +37 -314
  260. package/dist/targets/win/AppxTarget.js.map +1 -1
  261. package/dist/targets/win/MsiTarget.d.ts.map +1 -1
  262. package/dist/targets/win/MsiTarget.js +13 -13
  263. package/dist/targets/win/MsiTarget.js.map +1 -1
  264. package/dist/targets/win/MsixTarget.d.ts +22 -0
  265. package/dist/targets/win/MsixTarget.d.ts.map +1 -0
  266. package/dist/targets/win/MsixTarget.js +214 -0
  267. package/dist/targets/win/MsixTarget.js.map +1 -0
  268. package/dist/targets/win/nsis/Defines.d.ts +3 -0
  269. package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
  270. package/dist/targets/win/nsis/Defines.js.map +1 -1
  271. package/dist/targets/win/nsis/NsisTarget.d.ts +57 -3
  272. package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
  273. package/dist/targets/win/nsis/NsisTarget.js +252 -113
  274. package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
  275. package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -1
  276. package/dist/targets/win/nsis/WebInstallerTarget.js +23 -12
  277. package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -1
  278. package/dist/targets/win/nsis/nsisOptions.d.ts +56 -48
  279. package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
  280. package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
  281. package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
  282. package/dist/targets/win/nsis/nsisScriptGenerator.js +4 -3
  283. package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
  284. package/dist/targets/win/nsis/nsisUtil.d.ts +17 -2
  285. package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
  286. package/dist/targets/win/nsis/nsisUtil.js +143 -41
  287. package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
  288. package/dist/targets/win/nsis/progId.d.ts +21 -0
  289. package/dist/targets/win/nsis/progId.d.ts.map +1 -0
  290. package/dist/targets/win/nsis/progId.js +60 -0
  291. package/dist/targets/win/nsis/progId.js.map +1 -0
  292. package/dist/targets/win/winAppUtil.d.ts +115 -0
  293. package/dist/targets/win/winAppUtil.d.ts.map +1 -0
  294. package/dist/targets/win/winAppUtil.js +407 -0
  295. package/dist/targets/win/winAppUtil.js.map +1 -0
  296. package/dist/toolsets/7zip.d.ts +32 -0
  297. package/dist/toolsets/7zip.d.ts.map +1 -1
  298. package/dist/toolsets/7zip.js +39 -11
  299. package/dist/toolsets/7zip.js.map +1 -1
  300. package/dist/toolsets/appimage.d.ts +3 -3
  301. package/dist/toolsets/appimage.d.ts.map +1 -1
  302. package/dist/toolsets/appimage.js +9 -6
  303. package/dist/toolsets/appimage.js.map +1 -1
  304. package/dist/toolsets/custom.d.ts +2 -3
  305. package/dist/toolsets/custom.d.ts.map +1 -1
  306. package/dist/toolsets/custom.js +67 -149
  307. package/dist/toolsets/custom.js.map +1 -1
  308. package/dist/toolsets/fpm.d.ts.map +1 -1
  309. package/dist/toolsets/fpm.js +11 -5
  310. package/dist/toolsets/fpm.js.map +1 -1
  311. package/dist/toolsets/icons.d.ts.map +1 -1
  312. package/dist/toolsets/icons.js +17 -3
  313. package/dist/toolsets/icons.js.map +1 -1
  314. package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
  315. package/dist/toolsets/linuxToolsMac.js +17 -4
  316. package/dist/toolsets/linuxToolsMac.js.map +1 -1
  317. package/dist/toolsets/nsis.d.ts +5 -0
  318. package/dist/toolsets/nsis.d.ts.map +1 -1
  319. package/dist/toolsets/nsis.js +20 -4
  320. package/dist/toolsets/nsis.js.map +1 -1
  321. package/dist/toolsets/version.d.ts +12 -0
  322. package/dist/toolsets/version.d.ts.map +1 -0
  323. package/dist/toolsets/version.js +13 -0
  324. package/dist/toolsets/version.js.map +1 -0
  325. package/dist/toolsets/winCodeSign.d.ts +56 -3
  326. package/dist/toolsets/winCodeSign.d.ts.map +1 -1
  327. package/dist/toolsets/winCodeSign.js +125 -42
  328. package/dist/toolsets/winCodeSign.js.map +1 -1
  329. package/dist/toolsets/wine.d.ts +2 -1
  330. package/dist/toolsets/wine.d.ts.map +1 -1
  331. package/dist/toolsets/wine.js +31 -15
  332. package/dist/toolsets/wine.js.map +1 -1
  333. package/dist/util/NodeModuleCopyHelper.js +14 -6
  334. package/dist/util/NodeModuleCopyHelper.js.map +1 -1
  335. package/dist/util/appFileCopier.d.ts +52 -0
  336. package/dist/util/appFileCopier.d.ts.map +1 -1
  337. package/dist/util/appFileCopier.js +221 -21
  338. package/dist/util/appFileCopier.js.map +1 -1
  339. package/dist/util/archCompatibility.d.ts +42 -0
  340. package/dist/util/archCompatibility.d.ts.map +1 -0
  341. package/dist/util/archCompatibility.js +202 -0
  342. package/dist/util/archCompatibility.js.map +1 -0
  343. package/dist/util/checksum.d.ts +36 -0
  344. package/dist/util/checksum.d.ts.map +1 -0
  345. package/dist/util/checksum.js +48 -0
  346. package/dist/util/checksum.js.map +1 -0
  347. package/dist/util/config/config.d.ts +1 -0
  348. package/dist/util/config/config.d.ts.map +1 -1
  349. package/dist/util/config/config.js +8 -1
  350. package/dist/util/config/config.js.map +1 -1
  351. package/dist/util/config/legacyConfigGuard.d.ts +7 -0
  352. package/dist/util/config/legacyConfigGuard.d.ts.map +1 -0
  353. package/dist/util/config/legacyConfigGuard.js +187 -0
  354. package/dist/util/config/legacyConfigGuard.js.map +1 -0
  355. package/dist/util/config/legacyOptions.d.ts +75 -0
  356. package/dist/util/config/legacyOptions.d.ts.map +1 -0
  357. package/dist/util/config/legacyOptions.js +399 -0
  358. package/dist/util/config/legacyOptions.js.map +1 -0
  359. package/dist/util/config/load.d.ts +2 -2
  360. package/dist/util/config/load.d.ts.map +1 -1
  361. package/dist/util/config/load.js +3 -12
  362. package/dist/util/config/load.js.map +1 -1
  363. package/dist/util/config/schemaValidator.d.ts.map +1 -1
  364. package/dist/util/config/schemaValidator.js +26 -3
  365. package/dist/util/config/schemaValidator.js.map +1 -1
  366. package/dist/util/electronGet.d.ts +30 -32
  367. package/dist/util/electronGet.d.ts.map +1 -1
  368. package/dist/util/electronGet.js +359 -129
  369. package/dist/util/electronGet.js.map +1 -1
  370. package/dist/util/flags.d.ts +5 -5
  371. package/dist/util/flags.d.ts.map +1 -1
  372. package/dist/util/flags.js +124 -16
  373. package/dist/util/flags.js.map +1 -1
  374. package/dist/util/hash.d.ts +1 -1
  375. package/dist/util/hash.d.ts.map +1 -1
  376. package/dist/util/hash.js +1 -15
  377. package/dist/util/hash.js.map +1 -1
  378. package/dist/util/installOrRebuild.d.ts +44 -0
  379. package/dist/util/installOrRebuild.d.ts.map +1 -0
  380. package/dist/util/installOrRebuild.js +276 -0
  381. package/dist/util/installOrRebuild.js.map +1 -0
  382. package/dist/util/langs.d.ts.map +1 -1
  383. package/dist/util/langs.js +1 -0
  384. package/dist/util/langs.js.map +1 -1
  385. package/dist/util/license.d.ts.map +1 -1
  386. package/dist/util/license.js +4 -1
  387. package/dist/util/license.js.map +1 -1
  388. package/dist/util/mac/macosIconComposer.d.ts +2 -1
  389. package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
  390. package/dist/util/mac/macosIconComposer.js +40 -58
  391. package/dist/util/mac/macosIconComposer.js.map +1 -1
  392. package/dist/util/mac/macosVersion.d.ts +0 -1
  393. package/dist/util/mac/macosVersion.d.ts.map +1 -1
  394. package/dist/util/mac/macosVersion.js +0 -3
  395. package/dist/util/mac/macosVersion.js.map +1 -1
  396. package/dist/util/mac/plist.d.ts +1 -1
  397. package/dist/util/mac/plist.d.ts.map +1 -1
  398. package/dist/util/mac/plist.js +5 -0
  399. package/dist/util/mac/plist.js.map +1 -1
  400. package/dist/util/nativeBinaryVerifier.d.ts +40 -0
  401. package/dist/util/nativeBinaryVerifier.d.ts.map +1 -0
  402. package/dist/util/nativeBinaryVerifier.js +381 -0
  403. package/dist/util/nativeBinaryVerifier.js.map +1 -0
  404. package/dist/util/packageMetadata.js +57 -31
  405. package/dist/util/packageMetadata.js.map +1 -1
  406. package/dist/util/repositoryInfo.js +6 -3
  407. package/dist/util/repositoryInfo.js.map +1 -1
  408. package/dist/util/resolve.js +1 -1
  409. package/dist/util/resolve.js.map +1 -1
  410. package/dist/util/streamSpawnToFile.d.ts +47 -0
  411. package/dist/util/streamSpawnToFile.d.ts.map +1 -0
  412. package/dist/util/streamSpawnToFile.js +110 -0
  413. package/dist/util/streamSpawnToFile.js.map +1 -0
  414. package/dist/util/toolsetLock.d.ts +2 -0
  415. package/dist/util/toolsetLock.d.ts.map +1 -1
  416. package/dist/util/toolsetLock.js +31 -5
  417. package/dist/util/toolsetLock.js.map +1 -1
  418. package/dist/version.d.ts +1 -1
  419. package/dist/version.d.ts.map +1 -1
  420. package/dist/version.js +1 -1
  421. package/dist/version.js.map +1 -1
  422. package/dist/vm/ParallelsVm.d.ts.map +1 -1
  423. package/dist/vm/ParallelsVm.js +29 -3
  424. package/dist/vm/ParallelsVm.js.map +1 -1
  425. package/dist/vm/vm.d.ts +2 -0
  426. package/dist/vm/vm.d.ts.map +1 -1
  427. package/dist/vm/vm.js +29 -6
  428. package/dist/vm/vm.js.map +1 -1
  429. package/dist/winPackager.d.ts +6 -5
  430. package/dist/winPackager.d.ts.map +1 -1
  431. package/dist/winPackager.js +45 -39
  432. package/dist/winPackager.js.map +1 -1
  433. package/package.json +19 -18
  434. package/scheme.json +1731 -961
  435. package/templates/appx/appxmanifest.xml +2 -3
  436. package/templates/entitlements.mac.adhoc.plist +15 -0
  437. package/templates/entitlements.mac.plist +9 -6
  438. package/templates/msix/appxmanifest.xml +45 -0
  439. package/templates/nsis/assistedMessages.yml +17 -0
  440. package/templates/nsis/common.nsh +2 -2
  441. package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +96 -13
  442. package/templates/nsis/include/extractAppPackage.nsh +5 -2
  443. package/templates/nsis/include/installUtil.nsh +2 -2
  444. package/templates/nsis/include/installer.nsh +88 -50
  445. package/templates/nsis/include/webPackage.nsh +52 -27
  446. package/templates/nsis/installSection.nsh +29 -0
  447. package/templates/nsis/installer.nsi +1 -1
  448. package/templates/nsis/messages.yml +5 -0
  449. package/templates/nsis/multiUserUi.nsh +1 -1
  450. package/dist/codeSign/signManager.d.ts +0 -14
  451. package/dist/codeSign/signManager.d.ts.map +0 -1
  452. package/dist/codeSign/signManager.js +0 -2
  453. package/dist/codeSign/signManager.js.map +0 -1
  454. package/dist/util/yarn.d.ts +0 -23
  455. package/dist/util/yarn.d.ts.map +0 -1
  456. package/dist/util/yarn.js +0 -153
  457. package/dist/util/yarn.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pnpmNodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAgB,MAAM,oBAAoB,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,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;QACrD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;IAC1B,CAAC;CACF","sourcesContent":["import { Lazy } from \"lazy-val\"\nimport { LogMessageByKey, type Package } from \"./moduleManager.js\"\nimport { NodeModulesCollector } from \"./nodeModulesCollector.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport { PnpmDependency } from \"./types.js\"\n\nexport class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmDependency, PnpmDependency> {\n public readonly installOptions = {\n manager: PM.PNPM,\n lockfile: \"pnpm-lock.yaml\",\n }\n\n // Raw backing field — all entries from `pnpm list --json`\n private _allWorkspacePackages: PnpmDependency[] = []\n // Cached after parseDependenciesTree resolves the Lazy; 0 = safe default (treated as < v11)\n private _pnpmMajorVersion = 0\n // Runs `pnpm --version` once and caches the major version number\n private readonly pnpmVersion = new Lazy<number>(async () => {\n const result = await this.asyncExec(getPackageManagerCommand(PM.PNPM), [\"--version\"])\n const major = parseInt((result.stdout ?? \"0\").split(\".\")[0], 10)\n return isNaN(major) ? 0 : major\n })\n\n /**\n * Memo for `locateFromDepOrRoot`, keyed by `name@version`. pnpm's content-addressed virtual\n * store guarantees that any given `name@version` resolves to a single location on disk, so\n * once we've resolved a package we can short-circuit every subsequent lookup. This is the\n * dominant speedup for large workspaces where the `pnpm list --json` tree contains the same\n * `name@version` thousands of times (one entry per dependent).\n */\n private readonly locateMemo: Map<string, Promise<Package | null>> = new Map()\n\n /**\n * Visited set for `collectDepsRecursively`, keyed by `name@version`. Without this we re-walk\n * every shared subtree of the pnpm list output, exploding work in deep workspaces.\n */\n private readonly collectedDeps: Set<string> = new Set()\n\n /**\n * Returns the workspace packages to iterate over, gated by detected pnpm version:\n * - pnpm v11+: multi-entry workspace output → return the full parsed array\n * - pnpm < v11 / non-workspace / detection failure: single-tree behavior → return only [0]\n */\n private get allWorkspacePackages(): PnpmDependency[] {\n if (this._pnpmMajorVersion >= 11) {\n return this._allWorkspacePackages\n }\n return this._allWorkspacePackages.slice(0, 1)\n }\n\n protected getArgs(): string[] {\n return [\"list\", \"--prod\", \"--json\", \"--depth\", \"Infinity\", \"--silent\", \"--loglevel=error\"]\n }\n\n /**\n * Locate a package version, preferring the dep's own reported path before falling back to rootDir.\n * This is critical for pnpm non-hoisted (virtual store) setups where each package has its own\n * nested node_modules. Searching only from rootDir can resolve the wrong version when multiple\n * versions of a dep exist in the workspace.\n */\n private async locateFromDepOrRoot(pkgName: string, parentPath: string | undefined, requiredRange?: string) {\n // pnpm's virtual store is content-addressed: every `name@version` lookup is deterministic,\n // so memoize on the exact version. `requiredRange` is normally an exact version coming from\n // the pnpm list output (e.g. `value.version`), which makes this cache hit on duplicates.\n // Only memoize when we have a concrete version — semver ranges could resolve differently\n // depending on what's installed at `parentPath` vs root, so skip the cache for those.\n const memoKey = requiredRange && /^\\d/.test(requiredRange) ? `${pkgName}@${requiredRange}` : null\n if (memoKey != null) {\n const cached = this.locateMemo.get(memoKey)\n if (cached != null) {\n return cached\n }\n }\n\n // pnpm's default `.pnpm` virtual store is flat, so `downwardSearch` would burn thousands\n // of `readdir`/`lstat` calls finding nothing. With `nodeLinker: hoisted`, however, the\n // layout is a traditional nested `node_modules` tree where version-conflicted packages\n // land at `<root>/node_modules/A/node_modules/B` — downward BFS is needed to find them.\n const skipDownwardSearch = !(await this.isHoisted.value)\n const promise = (async (): Promise<Package | null> => {\n const fromDep = parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch }) : null\n if (fromDep) {\n return fromDep\n }\n return this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch })\n })()\n\n if (memoKey != null) {\n this.locateMemo.set(memoKey, promise)\n }\n return promise\n }\n\n // pnpm 10+ does not automatically preserve transitive optional platform-specific\n // packages (e.g. sass-embedded-linux-x64) across lock file regeneration. Users\n // must list them as direct optionalDependencies. Missing ones are emitted as\n // PKG_OPTIONAL_PLATFORM_NOT_INSTALLED warnings in the log summary.\n protected async extractProductionDependencyGraph(tree: PnpmDependency, dependencyId: string) {\n if (this.productionGraph[dependencyId]) {\n return\n }\n this.productionGraph[dependencyId] = { dependencies: [] }\n\n if ((tree.dedupedDependenciesCount ?? 0) > 0) {\n const realDep = this.allDependencies.get(dependencyId)\n if (realDep) {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF].push(dependencyId)\n tree = realDep\n } else {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF_UNRESOLVED].push(dependencyId)\n return\n }\n }\n\n const packageName = tree.name || tree.from\n const { packageJson } = (await this.locateFromDepOrRoot(packageName, tree.path, tree.version)) || {}\n\n const all = packageJson ? { ...packageJson.dependencies, ...packageJson.optionalDependencies } : { ...tree.dependencies, ...tree.optionalDependencies }\n const optional = packageJson ? { ...packageJson.optionalDependencies } : {}\n\n const deps = { ...(tree.dependencies || {}), ...(tree.optionalDependencies || {}) }\n this.productionGraph[dependencyId] = { dependencies: [] }\n const depPromises = Object.entries(deps).map(async ([packageName, dependency]) => {\n // First check if it's in production dependencies\n if (!all[packageName]) {\n return undefined\n }\n\n // Then check if optional dependency path exists (using actual resolved path)\n if (optional[packageName]) {\n const pkg = await this.locateFromDepOrRoot(packageName, tree.path, dependency.version)\n if (!pkg) {\n this.logMissingDependency(`${packageName}@${dependency.version}`)\n return undefined\n }\n }\n const { id: childDependencyId, pkgOverride } = this.normalizePackageVersion(packageName, dependency)\n await this.extractProductionDependencyGraph(pkgOverride, childDependencyId)\n return childDependencyId\n })\n\n const collectedDependencies: string[] = []\n for (const dep of depPromises) {\n const result = await dep\n if (result !== undefined) {\n collectedDependencies.push(result)\n }\n }\n this.productionGraph[dependencyId] = { dependencies: collectedDependencies }\n }\n\n protected async collectAllDependencies(_tree: PnpmDependency, _appPackageName: string): Promise<void> {\n for (const root of this.allWorkspacePackages) {\n await this.collectDepsRecursively(root)\n }\n }\n\n private async collectDepsRecursively(tree: PnpmDependency): Promise<void> {\n const visit = async (key: string, value: PnpmDependency) => {\n if ((value?.dedupedDependenciesCount ?? 0) > 0) {\n return\n }\n const id = `${key}@${value.version}`\n // The pnpm list output can include the same `name@version` thousands of times across a\n // deep workspace; without this guard we re-resolve and re-recurse each occurrence.\n if (this.collectedDeps.has(id)) {\n return\n }\n this.collectedDeps.add(id)\n const pkg = await this.locateFromDepOrRoot(key, value.path, value.version)\n this.allDependencies.set(id, { ...value, path: pkg?.packageDir ?? value.path })\n await this.collectDepsRecursively(value)\n }\n\n for (const [key, value] of Object.entries(tree.dependencies || {})) {\n await visit(key, value)\n }\n for (const [key, value] of Object.entries(tree.optionalDependencies || {})) {\n await visit(key, value)\n }\n }\n\n protected override getTreeFromWorkspaces(tree: PnpmDependency, packageName: string): PnpmDependency {\n // pnpm v10 workspace: app is nested as a dependency of root — handled by base class\n const result = super.getTreeFromWorkspaces(tree, packageName)\n if (result !== tree) {\n return result\n }\n // pnpm v11 workspace: each workspace package is a separate top-level array entry;\n // non-workspace (single-tree): find returns the one entry or undefined → falls back to tree\n const match = this.allWorkspacePackages.find(pkg => pkg.name === packageName || pkg.from === packageName)\n return match ?? tree\n }\n\n protected async parseDependenciesTree(jsonBlob: string): Promise<PnpmDependency> {\n const dependencyTree = this.extractJsonFromPollutedOutput<PnpmDependency[]>(jsonBlob)\n this._allWorkspacePackages = dependencyTree\n this._pnpmMajorVersion = await this.pnpmVersion.value\n return dependencyTree[0]\n }\n}\n"]}
1
+ {"version":3,"file":"pnpmNodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAgB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAA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AI,EAAE,QAAQ,CAAC,UAAU;gBACzB,YAAY,EAAE,EAAE;gBAChB,oBAAoB,EAAE,EAAE;aACI,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;IAEkB,qBAAqB,CAAC,IAAoB,EAAE,WAAmB;QAChF,oFAAoF;QACpF,MAAM,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;QAC7D,kFAAkF;QAClF,4FAA4F;QAC5F,IAAI,CAAC,QAAQ,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,IAAI,CAAC,CAAA;QAChJ,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAES,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QACpD,MAAM,cAAc,GAAG,IAAI,CAAC,6BAA6B,CAAmB,QAAQ,CAAC,CAAA;QACrF,IAAI,CAAC,qBAAqB,GAAG,cAAc,CAAA;QAC3C,IAAI,CAAC,iBAAiB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAA;QACrD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;IAC1B,CAAC;CACF","sourcesContent":["import _fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { LogMessageByKey, type Package, readJsonOrNull } from \"./moduleManager.js\"\nimport { NodeModulesCollector } from \"./nodeModulesCollector.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport type { PackageJson, PnpmDependency } from \"./types.js\"\nimport { exists, isValidKey } from \"builder-util\"\n\nexport class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmDependency, PnpmDependency> {\n public readonly installOptions = {\n manager: PM.PNPM,\n lockfile: \"pnpm-lock.yaml\",\n }\n\n // Raw backing field — all entries from `pnpm list --json`\n private _allWorkspacePackages: PnpmDependency[] = []\n // Cached after parseDependenciesTree resolves the Lazy; 0 = safe default (treated as < v11)\n private _pnpmMajorVersion = 0\n // Runs `pnpm --version` once and caches the major version number\n private readonly pnpmVersion = new Lazy<number>(async () => {\n const result = await this.asyncExec(getPackageManagerCommand(PM.PNPM), [\"--version\"])\n const major = parseInt((result.stdout ?? \"0\").split(\".\")[0], 10)\n return isNaN(major) ? 0 : major\n })\n\n /**\n * Detect pnpm's installed layout from the on-disk structure rather than from config.\n * pnpm 11 ignores `node-linker` in `.npmrc` (it moved to `nodeLinker` in `pnpm-workspace.yaml`),\n * so config parsing can report \"not hoisted\" for a hoisted install, which would disable the\n * downward search needed to find version-conflicted nested deps.\n *\n * In the default isolated store every regular top-level package resolves — through a symlink\n * on POSIX, a junction on Windows — into `node_modules/.pnpm/<name>@<ver>/node_modules/<name>`.\n * In a hoisted layout the same package is a real directory directly under `node_modules`.\n * `realpath` transparently follows both symlinks and junctions, so a layout is isolated iff\n * *any* top-level package's real path routes through `.pnpm`. We scan rather than sample the\n * first entry because `link:` packages resolve to their source (never under `.pnpm`) and could\n * otherwise mask an isolated store.\n */\n protected override isHoisted = new Lazy<boolean>(async () => {\n // A workspace package's own `node_modules` is often absent (or holds only its version\n // conflicts) in a hoisted workspace, so fall back to the workspace root's `node_modules`.\n let sawPackage = false\n for (const dir of await this.layoutRoots.value) {\n const isolated = await this.scanNodeModulesLayout(path.join(dir, \"node_modules\"))\n if (isolated != null) {\n if (isolated) {\n return false\n }\n sawPackage = true\n }\n }\n // Packages exist and none route through `.pnpm` → hoisted. No packages → flat default.\n return sawPackage\n })\n\n /**\n * The pnpm workspace root containing `rootDir` (nearest ancestor with `pnpm-workspace.yaml`, as pnpm\n * itself resolves it), or null outside a workspace or when `rootDir` is the workspace root.\n */\n private readonly workspaceRoot = new Lazy<string | null>(async () => {\n let current = path.resolve(this.rootDir)\n while (true) {\n if (await exists(path.join(current, \"pnpm-workspace.yaml\"))) {\n return current === path.resolve(this.rootDir) ? null : current\n }\n const parent = path.dirname(current)\n if (parent === current) {\n return null\n }\n current = parent\n }\n })\n\n /** `rootDir`, then the workspace root when `rootDir` is a workspace package. */\n private readonly layoutRoots = new Lazy<string[]>(async () => {\n const workspaceRoot = await this.workspaceRoot.value\n return workspaceRoot == null ? [this.rootDir] : [this.rootDir, workspaceRoot]\n })\n\n /** Returns true if `nmDir` is an isolated (`.pnpm`) store, false if hoisted, null if it holds no packages. */\n private async scanNodeModulesLayout(nmDir: string): Promise<boolean | null> {\n const entries = await _fsExtra.readdir(nmDir).catch(() => [] as string[])\n let sawPackage = false\n for (const name of entries) {\n if (name.startsWith(\".\")) {\n continue // .pnpm, .bin, .modules.yaml\n }\n const entryPath = path.join(nmDir, name)\n // A scoped dir (@scope) is not a package itself; descend to its packages.\n const candidates = name.startsWith(\"@\") ? (await _fsExtra.readdir(entryPath).catch(() => [] as string[])).map(s => path.join(entryPath, s)) : [entryPath]\n for (const candidate of candidates) {\n const real = await _fsExtra.realpath(candidate).catch(() => null)\n if (real == null) {\n continue\n }\n sawPackage = true\n if (real.split(path.sep).includes(\".pnpm\")) {\n return true // isolated store: a package routes through the virtual store\n }\n }\n }\n return sawPackage ? false : null\n }\n\n /**\n * Memo for `locateFromDepOrRoot`, keyed by `name@version`. pnpm's content-addressed virtual\n * store guarantees that any given `name@version` resolves to a single location on disk, so\n * once we've resolved a package we can short-circuit every subsequent lookup. This is the\n * dominant speedup for large workspaces where the `pnpm list --json` tree contains the same\n * `name@version` thousands of times (one entry per dependent).\n */\n private readonly locateMemo: Map<string, Promise<Package | null>> = new Map()\n\n /**\n * Visited set for `collectDepsRecursively`, keyed by `name@version`. Without this we re-walk\n * every shared subtree of the pnpm list output, exploding work in deep workspaces.\n */\n private readonly collectedDeps: Set<string> = new Set()\n\n /** Reverse index of `allDependencies` keyed by package name (without version). Built once on\n * first access inside `extractProductionDependencyGraph`, after `allDependencies` is settled. */\n private _allDepsByName: Map<string, PnpmDependency> | null = null\n\n /** The app's own node of the `pnpm list` output (the root of the production graph), set by `getTreeFromWorkspaces`. */\n private rootTree: PnpmDependency | null = null\n\n /**\n * Returns the workspace packages to iterate over, gated by detected pnpm version:\n * - pnpm v11+: multi-entry workspace output → return the full parsed array\n * - pnpm < v11 / non-workspace / detection failure: single-tree behavior → return only [0]\n */\n private get allWorkspacePackages(): PnpmDependency[] {\n if (this._pnpmMajorVersion >= 11) {\n return this._allWorkspacePackages\n }\n return this._allWorkspacePackages.slice(0, 1)\n }\n\n protected getArgs(): string[] {\n return [\"list\", \"--prod\", \"--json\", \"--depth\", \"Infinity\", \"--silent\", \"--loglevel=error\"]\n }\n\n private getAllDepsByName(): Map<string, PnpmDependency> {\n if (!this._allDepsByName) {\n this._allDepsByName = new Map()\n for (const [id, dep] of this.allDependencies.entries()) {\n const { name } = this.parseNameVersion(id)\n if (!this._allDepsByName.has(name)) {\n this._allDepsByName.set(name, dep)\n }\n }\n }\n return this._allDepsByName\n }\n\n /**\n * Locate a package version, preferring the dep's own reported path before falling back to rootDir.\n * This is critical for pnpm non-hoisted (virtual store) setups where each package has its own\n * nested node_modules. Searching only from rootDir can resolve the wrong version when multiple\n * versions of a dep exist in the workspace.\n */\n private async locateFromDepOrRoot(pkgName: string, parentPath: string | undefined, requiredRange?: string) {\n // pnpm's virtual store is content-addressed: every `name@version` lookup is deterministic,\n // so memoize on the exact version. `requiredRange` is normally an exact version coming from\n // the pnpm list output (e.g. `value.version`), which makes this cache hit on duplicates.\n // Only memoize when we have a concrete version — semver ranges could resolve differently\n // depending on what's installed at `parentPath` vs root, so skip the cache for those.\n const memoKey = requiredRange && /^\\d/.test(requiredRange) ? `${pkgName}@${requiredRange}` : null\n if (memoKey != null) {\n const cached = this.locateMemo.get(memoKey)\n if (cached != null) {\n return cached\n }\n }\n\n // pnpm's default `.pnpm` virtual store is flat, so `downwardSearch` would burn thousands\n // of `readdir`/`lstat` calls finding nothing. With `nodeLinker: hoisted`, however, the\n // layout is a traditional nested `node_modules` tree where version-conflicted packages\n // land at `<root>/node_modules/A/node_modules/B` — downward BFS is needed to find them.\n const skipDownwardSearch = !(await this.isHoisted.value)\n const promise = (async (): Promise<Package | null> => {\n // Phase 1: find a version that SATISFIES requiredRange, trying the dep's own location\n // first, then the workspace root. Crucially, neither pass accepts an out-of-range override\n // here — so a wrong-version copy reachable via upward search from `parentPath` (e.g. a\n // hoisted top-level dep) can't shadow the correct nested copy under root. Without this, a\n // package that pnpm deduped to a peer's node_modules resolves its transitive deps to the\n // wrong hoisted version (see jsonfile under two fs-extra majors). The root pass uses the\n // same `skipDownwardSearch` as everywhere else: in a hoisted layout it is already false, so\n // the nested `<root>/node_modules/A/node_modules/B` copy is found via BFS; in the flat\n // `.pnpm` virtual store it stays true (forcing it on there would burn thousands of\n // readdir/lstat calls — and on Windows, where pnpm uses junctions that `lstat` reports as\n // directories, the BFS walks the entire store and resolves the wrong paths).\n //\n // When `rootDir` is a workspace package, a hoisted install keeps the tree — including the\n // nested `<workspaceRoot>/node_modules/A/node_modules/B` copies — under the workspace root,\n // which the downward BFS from `rootDir` never reaches (its `node_modules` is often absent),\n // so search the workspace root last.\n let satisfying = parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch, skipOverrideFallback: true }) : null\n for (const dir of await this.layoutRoots.value) {\n satisfying ??= await this.cache.locatePackageVersion({ pkgName, parentDir: dir, requiredRange, skipDownwardSearch, skipOverrideFallback: true })\n }\n if (satisfying) {\n return satisfying\n }\n // Phase 2: no version satisfies requiredRange (package-manager override, or no range\n // given). Fall back to the original dep-then-root order, now allowing override versions.\n const fromDep = parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch }) : null\n if (fromDep) {\n return fromDep\n }\n return this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch })\n })().then(pkg => this.toRealPackage(pkg))\n\n if (memoKey != null) {\n this.locateMemo.set(memoKey, promise)\n }\n return promise\n }\n\n /**\n * Resolve a located package to its real directory (the symlink target), leaving a non-symlinked\n * hit untouched.\n *\n * `locatePackageVersion` returns the path it *walked*, which in pnpm's isolated store is the\n * `node_modules/<name>` symlink rather than `.pnpm/<name>@<ver>/node_modules/<name>`. That\n * distinction matters because the store keeps a package's dependencies as SIBLINGS inside\n * `.pnpm/<name>@<ver>/node_modules/`, reachable only from the real path: searching upward from\n * the symlink walks the *linking* project instead of the store and finds nothing. That is how\n * `fs-extra`'s `universalify`/`jsonfile` (and `js-yaml`'s `argparse`) were silently dropped from\n * the asar of an app whose `electron-updater` came from a `link:`ed checkout — pnpm reports such\n * packages with no dependency tree, so `visitDep` resolves their deps from disk through here.\n *\n * Resolving the link is what Node itself does (`--preserve-symlinks` is off by default), which is\n * why the same require works before packaging. `ModuleManager.locatePackageVersionFromCacheKey`\n * and `TraversalNodeModulesCollector` already normalize this way.\n */\n private async toRealPackage(pkg: Package | null): Promise<Package | null> {\n if (pkg == null) {\n return null\n }\n const packageDir = await this.cache.realPath[pkg.packageDir]\n return packageDir === pkg.packageDir ? pkg : { ...pkg, packageDir }\n }\n\n // pnpm 10+ does not automatically preserve transitive optional platform-specific\n // packages (e.g. sass-embedded-linux-x64) across lock file regeneration. Users\n // must list them as direct optionalDependencies. Missing ones are emitted as\n // PKG_OPTIONAL_PLATFORM_NOT_INSTALLED warnings in the log summary.\n protected async extractProductionDependencyGraph(tree: PnpmDependency, dependencyId: string) {\n if (this.productionGraph[dependencyId]) {\n return\n }\n this.productionGraph[dependencyId] = { dependencies: [] }\n\n if ((tree.dedupedDependenciesCount ?? 0) > 0) {\n const realDep = this.allDependencies.get(dependencyId)\n if (realDep) {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF].push(dependencyId)\n tree = realDep\n } else {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF_UNRESOLVED].push(dependencyId)\n return\n }\n }\n\n const packageName = tree.name || tree.from\n // The app root is never installed inside a node_modules directory, so it is read from its own\n // directory instead of being located by name. A by-name lookup finds a same-named dependency\n // whenever the app shares its name with one (an app called `debug` depending on `debug`), and\n // that dependency's package.json would then decide which of the app's dependencies are kept.\n const isRoot = tree === this.rootTree\n const { packageJson: locatedJson } = (isRoot ? null : await this.locateFromDepOrRoot(packageName, tree.path, tree.version)) || {}\n // Reading directly from tree.path for the root ensures that link: dependencies — which some\n // pnpm versions omit from `pnpm list --prod` output — still appear in `all` and therefore\n // reach the production graph.\n const packageJson = locatedJson ?? (tree.path ? await readJsonOrNull<PackageJson>(path.join(tree.path, \"package.json\")) : null)\n\n const all = packageJson ? { ...packageJson.dependencies, ...packageJson.optionalDependencies } : { ...tree.dependencies, ...tree.optionalDependencies }\n const optional = packageJson ? { ...packageJson.optionalDependencies } : {}\n\n const deps: Record<string, PnpmDependency> = { ...(tree.dependencies || {}), ...(tree.optionalDependencies || {}) }\n\n // pnpm --prod omits sub-deps for link: packages (and synthetic entries derived from them), and pnpm\n // 10.29.3+ prints a repeated subtree only once, so every later occurrence is a childless `deduped`\n // stub (which is what `tree` is when the stub was the first occurrence collected). For any dep\n // declared in the package.json (all) that pnpm left out of the tree, recover the resolved entry\n // from allDependencies so it lands in the production graph.\n for (const [depName, declaredRange] of Object.entries(all)) {\n if (!deps[depName]) {\n const dep = await this.resolveOmittedDependency(depName, declaredRange, tree.path)\n if (dep && isValidKey(depName)) {\n deps[depName] = dep\n }\n }\n }\n\n this.productionGraph[dependencyId] = { dependencies: [] }\n const depPromises = Object.entries(deps).map(async ([packageName, dependency]) => {\n // First check if it's in production dependencies\n if (!all[packageName]) {\n return undefined\n }\n\n // Then check if optional dependency path exists (using actual resolved path)\n if (optional[packageName]) {\n const pkg = await this.locateFromDepOrRoot(packageName, tree.path, dependency.version)\n if (!pkg) {\n // Declared in `optionalDependencies`, so a miss is an expected condition (e.g. fsevents\n // on Linux/Windows) — classify it as a missing optional dependency, not PKG_NOT_ON_DISK.\n this.logMissingDependency(`${packageName}@${dependency.version}`, true)\n return undefined\n }\n }\n const { id: childDependencyId, pkgOverride } = this.normalizePackageVersion(packageName, dependency)\n await this.extractProductionDependencyGraph(pkgOverride, childDependencyId)\n return childDependencyId\n })\n\n const collectedDependencies: string[] = []\n for (const dep of depPromises) {\n const result = await dep\n if (result !== undefined) {\n collectedDependencies.push(result)\n }\n }\n this.productionGraph[dependencyId] = { dependencies: collectedDependencies }\n }\n\n /**\n * Resolve a dependency that `pnpm list` left out of a package's tree to its `allDependencies` entry.\n * The lookup goes through the copy node itself would load from `parentPath` (the package's real store\n * directory), filtered by the declared range, and falls back to a name-only match only when nothing on\n * disk resolves to a collected entry (a `link:` dep, whose entry is keyed by its `link:` version).\n *\n * A name-only lookup returns whichever version was collected first, which is wrong as soon as two\n * versions of the package are installed: with the app pinning es5-ext@0.10.53 while its transitive\n * d@1.0.2 needs es5-ext ^0.10.64, `d` was wired to 0.10.53 and the nested 0.10.64 copy (with its own\n * esniff / event-emitter / next-tick@1.1.0 closure) vanished from the asar (#8493). pnpm 10.29.3+\n * made this common, because its deduped output routes every repeated package through this recovery.\n */\n private async resolveOmittedDependency(depName: string, declaredRange: unknown, parentPath: string | undefined): Promise<PnpmDependency | undefined> {\n const range = typeof declaredRange === \"string\" ? declaredRange : undefined\n const located = await this.locateFromDepOrRoot(depName, parentPath, range)\n const exact = located ? this.allDependencies.get(`${depName}@${located.packageJson.version}`) : undefined\n return exact ?? this.getAllDepsByName().get(depName)\n }\n\n protected async collectAllDependencies(_tree: PnpmDependency, _appPackageName: string): Promise<void> {\n for (const root of this.allWorkspacePackages) {\n await this.collectDepsRecursively(root)\n }\n // pnpm --prod omits link: packages from its JSON output entirely; pick them up from the\n // app's package.json so their transitive deps are included in allDependencies.\n await this.collectOmittedLinkPackages()\n }\n\n /**\n * Resolve a `link:` dependency to its real on-disk source directory — never the `node_modules`\n * junction pnpm creates for it. Returns null for non-link deps.\n *\n * Why this matters: resolving a link: dep through `node_modules` (locateFromDepOrRoot) yields the\n * junction, which CI cannot read across drives. CI checks out the repo on `D:` but installs the\n * app under `C:\\…\\Temp`, so the junction is a cross-volume link that `realpath`/`stat` fail on,\n * silently dropping the package from the asar. The link target is a plain directory that reads\n * fine from any drive, so we resolve straight to it.\n */\n private resolveLinkTarget(value: PnpmDependency): string | null {\n const version = value.version\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n return null\n }\n const spec = version.slice(\"link:\".length)\n // A cross-drive link cannot be expressed relative, so pnpm reports it as an absolute path —\n // use it directly. Otherwise prefer pnpm's already-resolved absolute `path` (the source dir,\n // never the junction), falling back to resolving the relative spec against the workspace root.\n if (path.isAbsolute(spec)) {\n return path.normalize(spec)\n }\n if (value.path && path.isAbsolute(value.path)) {\n return path.normalize(value.path)\n }\n return path.resolve(this.rootDir, spec)\n }\n\n private async readPackageJsonAt(dir: string): Promise<Package | null> {\n const packageJson = await readJsonOrNull<PackageJson>(path.join(dir, \"package.json\"))\n return packageJson ? { packageDir: dir, packageJson } : null\n }\n\n /**\n * Visit a single dependency node, adding it and its transitive deps to allDependencies.\n *\n * For packages that pnpm list did NOT expand (link: packages and the synthetic entries\n * derived from them), the tree has empty dependencies/optionalDependencies. In that case\n * we fall back to the on-disk package.json to discover transitive deps, resolving each one\n * from the package's own node_modules first (where pnpm placed them).\n */\n private async visitDep(key: string, value: PnpmDependency): Promise<void> {\n const id = `${key}@${value.version}`\n // The pnpm list output can include the same `name@version` thousands of times across a\n // deep workspace; without this guard we re-resolve and re-recurse each occurrence.\n if (this.collectedDeps.has(id)) {\n return\n }\n this.collectedDeps.add(id)\n\n const located = await this.locateFromDepOrRoot(key, value.path, value.version)\n // For a link: dep, store the real source dir (the link target) rather than the located path,\n // which is the node_modules junction. Across drives that junction is unreadable (see\n // resolveLinkTarget), so storing it makes the package vanish from the asar.\n const linkTarget = this.resolveLinkTarget(value)\n const resolvedPath = linkTarget ?? located?.packageDir ?? value.path\n this.allDependencies.set(id, { ...value, path: resolvedPath })\n\n // For transitive-dep discovery of entries pnpm did not expand (link: packages), use the\n // located package.json; fall back to reading it straight from the resolved directory when the\n // by-name lookup came up empty. That happens whenever the package does not sit inside a\n // `node_modules/<name>` directory it can find itself in: a cross-drive link target whose\n // junction is unreadable, and a workspace package such as `packages/builder-util-runtime`,\n // which nothing above it exposes under `node_modules/`. Without this fallback such a package\n // contributes no dependencies at all (its `debug`/`sax` would vanish from the asar).\n const pkg = located ?? (resolvedPath != null ? await this.readPackageJsonAt(resolvedPath) : null)\n const hasTreeDeps = Object.keys(value.dependencies ?? {}).length > 0 || Object.keys(value.optionalDependencies ?? {}).length > 0\n if (!hasTreeDeps && pkg?.packageJson) {\n // pnpm list omits sub-deps for link: packages and for entries where the reported path\n // doesn't expand transitive deps (e.g. a link: package's nested dep). Use the on-disk\n // package.json to discover what to include, and pass the declared version range so that\n // resolution skips wrong-version hoisted packages and finds the correct nested copy.\n const pkgOptionalDecl = pkg.packageJson.optionalDependencies || {}\n const pkgDepsDecl = { ...(pkg.packageJson.dependencies || {}), ...pkgOptionalDecl }\n for (const [depName, depRange] of Object.entries(pkgDepsDecl)) {\n const resolved = await this.locateFromDepOrRoot(depName, pkg.packageDir, typeof depRange === \"string\" ? depRange : undefined)\n if (!resolved) {\n // A miss here silently ships a broken app (the dependency is simply absent from the\n // asar and only fails at runtime with MODULE_NOT_FOUND), so surface it in the log\n // summary. Optional deps are an expected miss and get the quieter bucket.\n this.logMissingDependency(`${depName}@${depRange}`, pkgOptionalDecl[depName] != null)\n continue\n }\n await this.visitDep(depName, {\n from: depName,\n name: depName,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n } else {\n await this.collectDepsRecursively(value)\n }\n }\n\n private async collectDepsRecursively(tree: PnpmDependency): Promise<void> {\n for (const [key, value] of Object.entries(tree.dependencies || {})) {\n await this.visitDep(key, value)\n }\n for (const [key, value] of Object.entries(tree.optionalDependencies || {})) {\n await this.visitDep(key, value)\n }\n }\n\n /**\n * pnpm excludes link: packages from `pnpm list --prod` output. Read the app's package.json\n * directly to find any link: deps that were silently omitted and visit them so their\n * transitive deps end up in allDependencies.\n */\n private async collectOmittedLinkPackages(): Promise<void> {\n const appPkgJson = await readJsonOrNull<PackageJson>(path.join(this.rootDir, \"package.json\"))\n if (!appPkgJson) {\n return\n }\n const allDeps = { ...(appPkgJson.dependencies || {}), ...(appPkgJson.optionalDependencies || {}) }\n for (const [name, version] of Object.entries(allDeps)) {\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n continue\n }\n // Resolve the link: target path directly — bypasses potentially broken cross-drive\n // Windows junctions (C:→D:) that locateFromDepOrRoot would traverse through\n // node_modules and silently fail on (readJson returns null via .catch).\n const linkRelPath = version.slice(\"link:\".length)\n const linkTarget = path.isAbsolute(linkRelPath) ? linkRelPath : path.resolve(this.rootDir, linkRelPath)\n const directPkg = await readJsonOrNull<PackageJson>(path.join(linkTarget, \"package.json\"))\n const resolved = directPkg ? { packageDir: linkTarget, packageJson: directPkg } : await this.locateFromDepOrRoot(name, this.rootDir, undefined)\n if (!resolved) {\n continue\n }\n await this.visitDep(name, {\n from: name,\n name,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n }\n\n protected override getTreeFromWorkspaces(tree: PnpmDependency, packageName: string): PnpmDependency {\n // pnpm v10 workspace: app is nested as a dependency of root — handled by base class\n const result = super.getTreeFromWorkspaces(tree, packageName)\n // pnpm v11 workspace: each workspace package is a separate top-level array entry;\n // non-workspace (single-tree): find returns the one entry or undefined → falls back to tree\n this.rootTree = result !== tree ? result : (this.allWorkspacePackages.find(pkg => pkg.name === packageName || pkg.from === packageName) ?? tree)\n return this.rootTree\n }\n\n protected async parseDependenciesTree(jsonBlob: string): Promise<PnpmDependency> {\n const dependencyTree = this.extractJsonFromPollutedOutput<PnpmDependency[]>(jsonBlob)\n this._allWorkspacePackages = dependencyTree\n this._pnpmMajorVersion = await this.pnpmVersion.value\n return dependencyTree[0]\n }\n}\n"]}
@@ -8,12 +8,15 @@ export type PackageJson = {
8
8
  workspaces?: string[] | {
9
9
  packages: string[];
10
10
  };
11
+ os?: string | string[];
12
+ cpu?: string | string[];
11
13
  };
12
14
  export interface NodeModuleInfo {
13
15
  name: string;
14
16
  version: string;
15
17
  dir: string;
16
18
  dependencies?: Array<NodeModuleInfo>;
19
+ excluded?: boolean;
17
20
  }
18
21
  export type ParsedDependencyTree = {
19
22
  readonly name: string;
@@ -48,6 +51,7 @@ export type Dependencies<T, V> = {
48
51
  export interface DependencyGraph {
49
52
  [packageNameAndVersion: string]: {
50
53
  readonly dependencies: string[];
54
+ excluded?: boolean;
51
55
  };
52
56
  }
53
57
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAC/C,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,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AM,WAAW,cAAe,SAAQ,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAGzB,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAC3C;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU,CAAC,aAAa,EAAE,MAAM,CAAC;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAE1B,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;KAC9B,CAAA;CACF;AAGD,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAAG;AAEpG,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,oBAAoB,CAAA;AAExE,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,CAAA;KACzB,CAAA;IACD,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QAC9B,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,CAAA;KACzB,CAAA;CACF,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,qBAAqB,EAAE,MAAM,GAAG;QAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;KACnB,CAAA;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PackageJson = {\n name: string\n version: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n optionalDependencies?: Record<string, string>\n workspaces?: string[] | { packages: string[] }\n}\n\nexport interface NodeModuleInfo {\n name: string\n version: string\n dir: string\n dependencies?: Array<NodeModuleInfo>\n}\n\nexport type ParsedDependencyTree = {\n readonly name: string\n readonly version: string\n readonly path: string\n readonly workspaces?: string[] | { packages: string[] } // we only use this at root level\n}\n\n// Note: `PnpmDependency` and `NpmDependency` include the output of `JSON.parse(...)` of `pnpm list` and `npm list` respectively\n// This object has a TON of info - a majority, if not all, of each dependency's package.json\n// We extract only what we need when constructing DependencyTree in `extractProductionDependencyTree`\nexport interface PnpmDependency extends Dependency<PnpmDependency, PnpmDependency> {\n readonly from: string\n readonly resolved: string\n // Present in pnpm 10.29.3+ `pnpm list --json` output for deduped references.\n // Context: https://github.com/pnpm/pnpm/issues/10601\n readonly dedupedDependenciesCount?: number\n}\n\nexport interface NpmDependency extends Dependency<NpmDependency, string> {\n readonly resolved?: string\n // implicit dependencies, returned only through `npm list`\n readonly _dependencies?: {\n [packageName: string]: string\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TraversedDependency extends Dependency<TraversedDependency, TraversedDependency> {}\n\nexport type Dependency<T, V> = Dependencies<T, V> & ParsedDependencyTree\n\nexport type Dependencies<T, V> = {\n readonly dependencies?: {\n [packageName: string]: T\n }\n readonly optionalDependencies?: {\n [packageName: string]: V\n }\n}\n\nexport interface DependencyGraph {\n [packageNameAndVersion: string]: {\n readonly dependencies: string[]\n }\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PackageJson = {\n name: string\n version: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n optionalDependencies?: Record<string, string>\n workspaces?: string[] | { packages: string[] }\n // npm platform constraints (e.g. `@esbuild/darwin-arm64` declares `cpu: [\"arm64\"], os: [\"darwin\"]`)\n os?: string | string[]\n cpu?: string | string[]\n}\n\nexport interface NodeModuleInfo {\n name: string\n version: string\n dir: string\n dependencies?: Array<NodeModuleInfo>\n excluded?: boolean\n}\n\nexport type ParsedDependencyTree = {\n readonly name: string\n readonly version: string\n readonly path: string\n readonly workspaces?: string[] | { packages: string[] } // we only use this at root level\n}\n\n// Note: `PnpmDependency` and `NpmDependency` include the output of `JSON.parse(...)` of `pnpm list` and `npm list` respectively\n// This object has a TON of info - a majority, if not all, of each dependency's package.json\n// We extract only what we need when constructing DependencyTree in `extractProductionDependencyTree`\nexport interface PnpmDependency extends Dependency<PnpmDependency, PnpmDependency> {\n readonly from: string\n readonly resolved: string\n // Present in pnpm 10.29.3+ `pnpm list --json` output for deduped references.\n // Context: https://github.com/pnpm/pnpm/issues/10601\n readonly dedupedDependenciesCount?: number\n}\n\nexport interface NpmDependency extends Dependency<NpmDependency, string> {\n readonly resolved?: string\n // implicit dependencies, returned only through `npm list`\n readonly _dependencies?: {\n [packageName: string]: string\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TraversedDependency extends Dependency<TraversedDependency, TraversedDependency> {}\n\nexport type Dependency<T, V> = Dependencies<T, V> & ParsedDependencyTree\n\nexport type Dependencies<T, V> = {\n readonly dependencies?: {\n [packageName: string]: T\n }\n readonly optionalDependencies?: {\n [packageName: string]: V\n }\n}\n\nexport interface DependencyGraph {\n [packageNameAndVersion: string]: {\n readonly dependencies: string[]\n excluded?: boolean\n }\n}\n"]}
@@ -0,0 +1,137 @@
1
+ import type { FuseV1Options } from "@electron/fuses";
2
+ /**
3
+ * Feature flags ("fuses") baked into the Electron binary at build time.
4
+ *
5
+ * All options map 1:1 to the flags documented by
6
+ * [`@electron/fuses`](https://github.com/electron/fuses) and the upstream
7
+ * [Electron fuses guide](https://www.electronjs.org/docs/latest/tutorial/fuses).
8
+ *
9
+ * electron-builder flips fuses after packaging and **before** signing so that the final
10
+ * code signature covers the modified binary. On Apple Silicon, the ad-hoc signature is
11
+ * re-applied automatically after flipping fuses.
12
+ */
13
+ export interface FuseOptionsV1 extends Partial<Record<Uncapitalize<keyof typeof FuseV1Options>, boolean>> {
14
+ /**
15
+ * Controls whether the `ELECTRON_RUN_AS_NODE` environment variable is respected.
16
+ *
17
+ * When `true` (the Electron default), setting `ELECTRON_RUN_AS_NODE=1` in the environment
18
+ * makes Electron behave like a plain Node.js process, bypassing the app entirely. Disable
19
+ * this fuse in production apps to prevent that escape path.
20
+ *
21
+ * **Note:** Disabling this fuse also breaks `process.fork()` in the main process because
22
+ * it relies on `ELECTRON_RUN_AS_NODE` internally. Use
23
+ * [Utility Processes](https://www.electronjs.org/docs/latest/api/utility-process) as a
24
+ * replacement.
25
+ *
26
+ * @see https://github.com/electron/fuses
27
+ */
28
+ runAsNode?: boolean;
29
+ /**
30
+ * Controls whether the Chromium cookie store is encrypted using OS-level cryptography keys.
31
+ *
32
+ * When enabled, cookies are stored encrypted on disk (the same mechanism Chrome uses).
33
+ * **This is a one-way transition**: existing unencrypted cookies are re-encrypted on write, but
34
+ * disabling the fuse afterwards will leave the cookie database unreadable.
35
+ *
36
+ * Most production apps can safely enable this fuse.
37
+ *
38
+ * @see https://github.com/electron/fuses
39
+ */
40
+ enableCookieEncryption?: boolean;
41
+ /**
42
+ * Controls whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions)
43
+ * and `NODE_EXTRA_CA_CERTS` environment variables are respected.
44
+ *
45
+ * `NODE_OPTIONS` allows injecting arbitrary Node.js runtime flags (e.g. `--require`) and is
46
+ * rarely needed in production. Most apps can safely disable this fuse.
47
+ *
48
+ * @see https://github.com/electron/fuses
49
+ */
50
+ enableNodeOptionsEnvironmentVariable?: boolean;
51
+ /**
52
+ * Controls whether the `--inspect`, `--inspect-brk`, and related Node.js debugger flags are
53
+ * honoured.
54
+ *
55
+ * When disabled, `SIGUSR1` no longer opens the V8 inspector in the main process either.
56
+ * Most production apps can safely disable this fuse.
57
+ *
58
+ * @see https://github.com/electron/fuses
59
+ */
60
+ enableNodeCliInspectArguments?: boolean;
61
+ /**
62
+ * Enables ASAR integrity validation — Electron verifies the embedded SHA-256 hash of
63
+ * `app.asar` before loading it.
64
+ *
65
+ * Platform support:
66
+ * - macOS: Electron ≥ 16.0.0
67
+ * - Windows: Electron ≥ 30.0.0
68
+ *
69
+ * For this fuse to be meaningful, `asar.disableIntegrity` must **not** be
70
+ * `true` (otherwise the hash is not embedded).
71
+ *
72
+ * @see https://www.electronjs.org/docs/latest/tutorial/asar-integrity
73
+ */
74
+ enableEmbeddedAsarIntegrityValidation?: boolean;
75
+ /**
76
+ * When enabled, Electron searches for the app exclusively in `app.asar`, skipping the `app`
77
+ * directory and `default_app.asar` fallbacks.
78
+ *
79
+ * Combined with `enableEmbeddedAsarIntegrityValidation`, this makes it impossible to side-load
80
+ * unverified code by replacing `app.asar` with an unarchived `app/` directory.
81
+ *
82
+ * @see https://github.com/electron/fuses
83
+ */
84
+ onlyLoadAppFromAsar?: boolean;
85
+ /**
86
+ * When enabled, the browser (main) process uses a separate V8 snapshot file
87
+ * (`browser_v8_context_snapshot.bin`) instead of the shared one.
88
+ *
89
+ * This is only useful when you ship a custom V8 snapshot for the main process that differs
90
+ * from the renderer snapshot. Standard apps do not need this.
91
+ *
92
+ * @see https://github.com/electron/fuses
93
+ */
94
+ loadBrowserProcessSpecificV8Snapshot?: boolean;
95
+ /**
96
+ * Controls whether pages loaded from the `file://` protocol receive elevated privileges
97
+ * beyond what a standard web browser would grant.
98
+ *
99
+ * These extra privileges include `fetch` to other `file://` URLs, service workers, and
100
+ * universal frame access for child frames also on `file://`. This behaviour pre-dates modern
101
+ * Electron security best practices.
102
+ *
103
+ * Disable this fuse if your app does not load content directly from `file://` (i.e. you use
104
+ * a [custom protocol](https://www.electronjs.org/docs/latest/tutorial/security#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols)).
105
+ *
106
+ * @see https://github.com/electron/fuses
107
+ */
108
+ grantFileProtocolExtraPrivileges?: boolean;
109
+ /**
110
+ * Enables V8 signal-based trap handlers for out-of-bounds WebAssembly memory accesses.
111
+ *
112
+ * When enabled, Electron uses OS signals (e.g. `SIGSEGV` on Linux/macOS) to catch Wasm
113
+ * OOB accesses at the hardware level rather than inserting explicit bounds checks in JIT'd
114
+ * code. This improves Wasm performance and is enabled by default in Electron.
115
+ *
116
+ * Disable only if the host environment restricts signal handlers (e.g. certain sandboxing
117
+ * configurations) and you observe crashes in Wasm-heavy workloads.
118
+ *
119
+ * @see https://github.com/electron/fuses
120
+ */
121
+ wasmTrapHandlers?: boolean;
122
+ /**
123
+ * Re-applies the ad-hoc codesignature on macOS after fuses are flipped.
124
+ *
125
+ * electron-builder already re-signs the app after flipping fuses, so this flag is
126
+ * generally not needed and exists only as a compatibility shim for edge cases.
127
+ *
128
+ * @see https://github.com/electron/fuses?tab=readme-ov-file#apple-silicon
129
+ */
130
+ resetAdHocDarwinSignature?: boolean;
131
+ }
132
+ type _AssertTrue<T extends true> = T;
133
+ export type _FuseOptionsV1Exhaustive = _AssertTrue<[
134
+ Exclude<Uncapitalize<keyof typeof FuseV1Options>, keyof FuseOptionsV1>
135
+ ] extends [never] ? true : ["FuseOptionsV1 is missing documented key(s) — add them with JSDoc above", Exclude<Uncapitalize<keyof typeof FuseV1Options>, keyof FuseOptionsV1>]>;
136
+ export {};
137
+ //# sourceMappingURL=FuseOptionsV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FuseOptionsV1.d.ts","sourceRoot":"","sources":["../../src/options/FuseOptionsV1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,OAAO,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;IACvG;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAEhC;;;;;;;;OAQG;IACH,oCAAoC,CAAC,EAAE,OAAO,CAAA;IAE9C;;;;;;;;OAQG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAA;IAEvC;;;;;;;;;;;;OAYG;IACH,qCAAqC,CAAC,EAAE,OAAO,CAAA;IAE/C;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;;;;;;OAQG;IACH,oCAAoC,CAAC,EAAE,OAAO,CAAA;IAE9C;;;;;;;;;;;;OAYG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAA;IAE1C;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B;;;;;;;OAOG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACpC;AAID,KAAK,WAAW,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAA;AACpC,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAChD;IAAC,OAAO,CAAC,YAAY,CAAC,MAAM,OAAO,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC;CAAC,SAAS,CAAC,KAAK,CAAC,GACpF,IAAI,GACJ,CAAC,wEAAwE,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,OAAO,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC,CAAC,CACvJ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FuseOptionsV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FuseOptionsV1.js","sourceRoot":"","sources":["../../src/options/FuseOptionsV1.ts"],"names":[],"mappings":"","sourcesContent":["import type { FuseV1Options } from \"@electron/fuses\"\n\n/**\n * Feature flags (\"fuses\") baked into the Electron binary at build time.\n *\n * All options map 1:1 to the flags documented by\n * [`@electron/fuses`](https://github.com/electron/fuses) and the upstream\n * [Electron fuses guide](https://www.electronjs.org/docs/latest/tutorial/fuses).\n *\n * electron-builder flips fuses after packaging and **before** signing so that the final\n * code signature covers the modified binary. On Apple Silicon, the ad-hoc signature is\n * re-applied automatically after flipping fuses.\n */\n\nexport interface FuseOptionsV1 extends Partial<Record<Uncapitalize<keyof typeof FuseV1Options>, boolean>> {\n /**\n * Controls whether the `ELECTRON_RUN_AS_NODE` environment variable is respected.\n *\n * When `true` (the Electron default), setting `ELECTRON_RUN_AS_NODE=1` in the environment\n * makes Electron behave like a plain Node.js process, bypassing the app entirely. Disable\n * this fuse in production apps to prevent that escape path.\n *\n * **Note:** Disabling this fuse also breaks `process.fork()` in the main process because\n * it relies on `ELECTRON_RUN_AS_NODE` internally. Use\n * [Utility Processes](https://www.electronjs.org/docs/latest/api/utility-process) as a\n * replacement.\n *\n * @see https://github.com/electron/fuses\n */\n runAsNode?: boolean\n\n /**\n * Controls whether the Chromium cookie store is encrypted using OS-level cryptography keys.\n *\n * When enabled, cookies are stored encrypted on disk (the same mechanism Chrome uses).\n * **This is a one-way transition**: existing unencrypted cookies are re-encrypted on write, but\n * disabling the fuse afterwards will leave the cookie database unreadable.\n *\n * Most production apps can safely enable this fuse.\n *\n * @see https://github.com/electron/fuses\n */\n enableCookieEncryption?: boolean\n\n /**\n * Controls whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions)\n * and `NODE_EXTRA_CA_CERTS` environment variables are respected.\n *\n * `NODE_OPTIONS` allows injecting arbitrary Node.js runtime flags (e.g. `--require`) and is\n * rarely needed in production. Most apps can safely disable this fuse.\n *\n * @see https://github.com/electron/fuses\n */\n enableNodeOptionsEnvironmentVariable?: boolean\n\n /**\n * Controls whether the `--inspect`, `--inspect-brk`, and related Node.js debugger flags are\n * honoured.\n *\n * When disabled, `SIGUSR1` no longer opens the V8 inspector in the main process either.\n * Most production apps can safely disable this fuse.\n *\n * @see https://github.com/electron/fuses\n */\n enableNodeCliInspectArguments?: boolean\n\n /**\n * Enables ASAR integrity validation — Electron verifies the embedded SHA-256 hash of\n * `app.asar` before loading it.\n *\n * Platform support:\n * - macOS: Electron ≥ 16.0.0\n * - Windows: Electron ≥ 30.0.0\n *\n * For this fuse to be meaningful, `asar.disableIntegrity` must **not** be\n * `true` (otherwise the hash is not embedded).\n *\n * @see https://www.electronjs.org/docs/latest/tutorial/asar-integrity\n */\n enableEmbeddedAsarIntegrityValidation?: boolean\n\n /**\n * When enabled, Electron searches for the app exclusively in `app.asar`, skipping the `app`\n * directory and `default_app.asar` fallbacks.\n *\n * Combined with `enableEmbeddedAsarIntegrityValidation`, this makes it impossible to side-load\n * unverified code by replacing `app.asar` with an unarchived `app/` directory.\n *\n * @see https://github.com/electron/fuses\n */\n onlyLoadAppFromAsar?: boolean\n\n /**\n * When enabled, the browser (main) process uses a separate V8 snapshot file\n * (`browser_v8_context_snapshot.bin`) instead of the shared one.\n *\n * This is only useful when you ship a custom V8 snapshot for the main process that differs\n * from the renderer snapshot. Standard apps do not need this.\n *\n * @see https://github.com/electron/fuses\n */\n loadBrowserProcessSpecificV8Snapshot?: boolean\n\n /**\n * Controls whether pages loaded from the `file://` protocol receive elevated privileges\n * beyond what a standard web browser would grant.\n *\n * These extra privileges include `fetch` to other `file://` URLs, service workers, and\n * universal frame access for child frames also on `file://`. This behaviour pre-dates modern\n * Electron security best practices.\n *\n * Disable this fuse if your app does not load content directly from `file://` (i.e. you use\n * a [custom protocol](https://www.electronjs.org/docs/latest/tutorial/security#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols)).\n *\n * @see https://github.com/electron/fuses\n */\n grantFileProtocolExtraPrivileges?: boolean\n\n /**\n * Enables V8 signal-based trap handlers for out-of-bounds WebAssembly memory accesses.\n *\n * When enabled, Electron uses OS signals (e.g. `SIGSEGV` on Linux/macOS) to catch Wasm\n * OOB accesses at the hardware level rather than inserting explicit bounds checks in JIT'd\n * code. This improves Wasm performance and is enabled by default in Electron.\n *\n * Disable only if the host environment restricts signal handlers (e.g. certain sandboxing\n * configurations) and you observe crashes in Wasm-heavy workloads.\n *\n * @see https://github.com/electron/fuses\n */\n wasmTrapHandlers?: boolean\n\n /**\n * Re-applies the ad-hoc codesignature on macOS after fuses are flipped.\n *\n * electron-builder already re-signs the app after flipping fuses, so this flag is\n * generally not needed and exists only as a compatibility shim for edge cases.\n *\n * @see https://github.com/electron/fuses?tab=readme-ov-file#apple-silicon\n */\n resetAdHocDarwinSignature?: boolean\n}\n// Compile-time exhaustiveness guard (no runtime output — pure type).\n// When @electron/fuses adds a new FuseV1Options entry, the Exclude below becomes non-never,\n// the conditional resolves to the tuple, and TypeScript errors with the name of the missing key(s).\ntype _AssertTrue<T extends true> = T\nexport type _FuseOptionsV1Exhaustive = _AssertTrue<\n [Exclude<Uncapitalize<keyof typeof FuseV1Options>, keyof FuseOptionsV1>] extends [never]\n ? true\n : [\"FuseOptionsV1 is missing documented key(s) — add them with JSDoc above\", Exclude<Uncapitalize<keyof typeof FuseV1Options>, keyof FuseOptionsV1>]\n>\n"]}
@@ -0,0 +1,126 @@
1
+ import { TargetSpecificOptions } from "../core.js";
2
+ export interface MsixWindowsService {
3
+ /** The service name used in the Windows Service Control Manager. */
4
+ readonly name: string;
5
+ /**
6
+ * Relative path to the service executable within the package.
7
+ * Defaults to the main app executable.
8
+ */
9
+ readonly executable?: string;
10
+ /**
11
+ * How Windows starts the service. Required by the desktop6 schema.
12
+ * @default "manual"
13
+ */
14
+ readonly startupType?: "auto" | "manual" | "disabled";
15
+ /**
16
+ * The account the service runs under. Required by the desktop6 schema.
17
+ * @default "localSystem"
18
+ */
19
+ readonly startAccount?: "localSystem" | "localService" | "networkService";
20
+ /**
21
+ * Optional command-line arguments passed to the service executable.
22
+ */
23
+ readonly arguments?: string;
24
+ }
25
+ export interface MsixOptions extends TargetSpecificOptions {
26
+ /**
27
+ * The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods.
28
+ * Each field must begin with an ASCII alphabetic character.
29
+ */
30
+ readonly applicationId?: string;
31
+ /**
32
+ * The background color of the app tile.
33
+ * @default #464646
34
+ */
35
+ readonly backgroundColor?: string | null;
36
+ /**
37
+ * A friendly name displayed to users. Corresponds to Properties.DisplayName. Defaults to the application product name.
38
+ */
39
+ readonly displayName?: string | null;
40
+ /**
41
+ * The package identity name. Corresponds to Identity.Name. Defaults to the application name.
42
+ */
43
+ readonly identityName?: string | null;
44
+ /**
45
+ * The Windows Store publisher. Not used if MSIX is built for testing.
46
+ */
47
+ readonly publisher?: string | null;
48
+ /**
49
+ * A friendly name for the publisher displayed to users. Corresponds to Properties.PublisherDisplayName.
50
+ * Defaults to company name from the application metadata.
51
+ */
52
+ readonly publisherDisplayName?: string | null;
53
+ /**
54
+ * The list of supported languages listed in the Windows Store. The first entry (index 0) will be the default language.
55
+ * @default ["en-US"]
56
+ */
57
+ readonly languages?: Array<string> | string | null;
58
+ /**
59
+ * Whether to add auto launch extension. Defaults to `true` if electron-winstore-auto-launch is in the dependencies.
60
+ */
61
+ readonly addAutoLaunchExtension?: boolean;
62
+ /**
63
+ * Relative path to custom extensions xml to be included in the AppxManifest.xml.
64
+ */
65
+ readonly customExtensionsPath?: string;
66
+ /**
67
+ * The list of capabilities to be added to the AppxManifest.xml.
68
+ * The `runFullTrust` capability is obligatory for Electron apps and will be auto-added if not specified.
69
+ * @default ["runFullTrust"]
70
+ */
71
+ readonly capabilities?: Array<string> | null;
72
+ /**
73
+ * Relative path to a custom AppxManifest.xml template located in the build resources directory.
74
+ * Supports the same `${}` template macros as the default template, including the MSIX-specific
75
+ * `${packageIntegrity}` macro. Windows services are injected via the `${extensions}` macro
76
+ * alongside protocol/file-association extensions.
77
+ */
78
+ readonly customManifestPath?: string;
79
+ /**
80
+ * Whether to overlay the app's name on top of tile images on the Start screen.
81
+ * @default false
82
+ */
83
+ readonly showNameOnTiles?: boolean;
84
+ /** @private */
85
+ readonly electronUpdaterAware?: boolean;
86
+ /**
87
+ * Whether to set the build number in the version field.
88
+ * @default false
89
+ */
90
+ readonly setBuildNumber?: boolean;
91
+ /**
92
+ * Set the MinVersion field in the AppxManifest.xml.
93
+ * @default "10.0.17763.0" (Windows 10 version 1809 — minimum for Store submissions)
94
+ */
95
+ readonly minVersion?: string | null;
96
+ /**
97
+ * Set the MaxVersionTested field in the AppxManifest.xml.
98
+ * @default same as minVersion
99
+ */
100
+ readonly maxVersionTested?: string | null;
101
+ /** @private */
102
+ readonly makeappxArgs?: Array<string> | null;
103
+ /**
104
+ * Whether to produce a .msixbundle when more than one architecture is built.
105
+ * @default true
106
+ */
107
+ readonly createMsixbundle?: boolean;
108
+ /**
109
+ * Whether to produce a .msixupload archive suitable for submission to the Microsoft Store Partner Center.
110
+ * @default false
111
+ */
112
+ readonly createMsixupload?: boolean;
113
+ /**
114
+ * Enforce package integrity (uap10:PackageIntegrity). Requires Windows 10 version 2004 (build 19041) or later.
115
+ * When enabled, Windows verifies that no files have been tampered with after the package was signed.
116
+ * @default false
117
+ */
118
+ readonly enforcePackageIntegrity?: boolean;
119
+ /**
120
+ * Windows Services to register with the MSIX package (desktop6 namespace).
121
+ * Requires Windows 10 version 1903 or later, and the `packagedServices` (or `localSystemServices`)
122
+ * restricted capability declared via `capabilities`.
123
+ */
124
+ readonly windowsServices?: Array<MsixWindowsService>;
125
+ }
126
+ //# sourceMappingURL=MsixOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MsixOptions.d.ts","sourceRoot":"","sources":["../../src/options/MsixOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAA;IACrD;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,GAAG,cAA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AEnC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzC,eAAe;IACf,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAE5C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACrD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MsixOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MsixOptions.js","sourceRoot":"","sources":["../../src/options/MsixOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\n\nexport interface MsixWindowsService {\n /** The service name used in the Windows Service Control Manager. */\n readonly name: string\n /**\n * Relative path to the service executable within the package.\n * Defaults to the main app executable.\n */\n readonly executable?: string\n /**\n * How Windows starts the service. Required by the desktop6 schema.\n * @default \"manual\"\n */\n readonly startupType?: \"auto\" | \"manual\" | \"disabled\"\n /**\n * The account the service runs under. Required by the desktop6 schema.\n * @default \"localSystem\"\n */\n readonly startAccount?: \"localSystem\" | \"localService\" | \"networkService\"\n /**\n * Optional command-line arguments passed to the service executable.\n */\n readonly arguments?: string\n}\n\nexport interface MsixOptions extends TargetSpecificOptions {\n /**\n * The application id. Defaults to `identityName`. This string contains alpha-numeric fields separated by periods.\n * Each field must begin with an ASCII alphabetic character.\n */\n readonly applicationId?: string\n\n /**\n * The background color of the app tile.\n * @default #464646\n */\n readonly backgroundColor?: string | null\n\n /**\n * A friendly name displayed to users. Corresponds to Properties.DisplayName. Defaults to the application product name.\n */\n readonly displayName?: string | null\n\n /**\n * The package identity name. Corresponds to Identity.Name. Defaults to the application name.\n */\n readonly identityName?: string | null\n\n /**\n * The Windows Store publisher. Not used if MSIX is built for testing.\n */\n readonly publisher?: string | null\n\n /**\n * A friendly name for the publisher displayed to users. Corresponds to Properties.PublisherDisplayName.\n * Defaults to company name from the application metadata.\n */\n readonly publisherDisplayName?: string | null\n\n /**\n * The list of supported languages listed in the Windows Store. The first entry (index 0) will be the default language.\n * @default [\"en-US\"]\n */\n readonly languages?: Array<string> | string | null\n\n /**\n * Whether to add auto launch extension. Defaults to `true` if electron-winstore-auto-launch is in the dependencies.\n */\n readonly addAutoLaunchExtension?: boolean\n\n /**\n * Relative path to custom extensions xml to be included in the AppxManifest.xml.\n */\n readonly customExtensionsPath?: string\n\n /**\n * The list of capabilities to be added to the AppxManifest.xml.\n * The `runFullTrust` capability is obligatory for Electron apps and will be auto-added if not specified.\n * @default [\"runFullTrust\"]\n */\n readonly capabilities?: Array<string> | null\n\n /**\n * Relative path to a custom AppxManifest.xml template located in the build resources directory.\n * Supports the same `${}` template macros as the default template, including the MSIX-specific\n * `${packageIntegrity}` macro. Windows services are injected via the `${extensions}` macro\n * alongside protocol/file-association extensions.\n */\n readonly customManifestPath?: string\n\n /**\n * Whether to overlay the app's name on top of tile images on the Start screen.\n * @default false\n */\n readonly showNameOnTiles?: boolean\n\n /** @private */\n readonly electronUpdaterAware?: boolean\n\n /**\n * Whether to set the build number in the version field.\n * @default false\n */\n readonly setBuildNumber?: boolean\n\n /**\n * Set the MinVersion field in the AppxManifest.xml.\n * @default \"10.0.17763.0\" (Windows 10 version 1809 — minimum for Store submissions)\n */\n readonly minVersion?: string | null\n\n /**\n * Set the MaxVersionTested field in the AppxManifest.xml.\n * @default same as minVersion\n */\n readonly maxVersionTested?: string | null\n\n /** @private */\n readonly makeappxArgs?: Array<string> | null\n\n /**\n * Whether to produce a .msixbundle when more than one architecture is built.\n * @default true\n */\n readonly createMsixbundle?: boolean\n\n /**\n * Whether to produce a .msixupload archive suitable for submission to the Microsoft Store Partner Center.\n * @default false\n */\n readonly createMsixupload?: boolean\n\n /**\n * Enforce package integrity (uap10:PackageIntegrity). Requires Windows 10 version 2004 (build 19041) or later.\n * When enabled, Windows verifies that no files have been tampered with after the package was signed.\n * @default false\n */\n readonly enforcePackageIntegrity?: boolean\n\n /**\n * Windows Services to register with the MSIX package (desktop6 namespace).\n * Requires Windows 10 version 1903 or later, and the `packagedServices` (or `localSystemServices`)\n * restricted capability declared via `capabilities`.\n */\n readonly windowsServices?: Array<MsixWindowsService>\n}\n"]}
@@ -74,7 +74,7 @@ export interface FilesBuildOptions {
74
74
  "!**\/node_modules/*\/{test,__tests__,tests,powered-test,example,examples}",
75
75
  "!**\/node_modules/*.d.ts",
76
76
  "!**\/node_modules/.bin",
77
- "!**\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
77
+ "!**\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,slnx,xproj}",
78
78
  "!.editorconfig",
79
79
  "!**\/._*",
80
80
  "!**\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
@@ -138,19 +138,13 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions, Fil
138
138
  * @default normal
139
139
  */
140
140
  readonly compression?: CompressionLevel | null;
141
- /**
142
- * Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to `false`.
143
- *
144
- * @default false
145
- */
146
- disableDefaultIgnoredFiles?: boolean | null;
147
141
  /**
148
142
  * Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).
149
143
  *
150
144
  * Node modules that must be unpacked will be detected automatically. Use {@link AsarOptions.unpack} to specify additional files to unpack.
151
145
  * @default true
152
146
  */
153
- readonly asar?: AsarOptions | false | null;
147
+ readonly asar?: AsarOptions | boolean | null;
154
148
  /** @private */
155
149
  readonly icon?: string | null;
156
150
  /**
@@ -171,7 +165,7 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions, Fil
171
165
  */
172
166
  readonly forceCodeSigning?: boolean;
173
167
  /**
174
- * The [electron-updater compatibility](https://www.electron.build/auto-update#compatibility) semver range.
168
+ * The [electron-updater compatibility](https://www.electron.build/docs/features/auto-update#compatibility) semver range.
175
169
  */
176
170
  readonly electronUpdaterCompatibility?: string | null;
177
171
  /**
@@ -189,6 +183,30 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions, Fil
189
183
  * @default false
190
184
  */
191
185
  readonly generateUpdatesFilesForAllChannels?: boolean;
186
+ /**
187
+ * Ed25519 signing of the auto-update manifest (`latest*.yml`). Each manifest is signed and its public key is
188
+ * embedded into `app-update.yml`, so electron-updater verifies the signature before downloading an update.
189
+ *
190
+ * **Signing is required.** Publishing a build that emits auto-update metadata fails unless a signing key
191
+ * resolves. Generate one once with `electron-builder create-update-key`, then supply it via
192
+ * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` / `ELECTRON_BUILDER_UPDATE_SIGN_KEY_FILE` (preferred in CI) or via
193
+ * `signingKey` / `signingKeyFile` below. Leaving this option unset — or `null` — keeps signing required and
194
+ * resolves the key from the environment; `null` is not an opt-out.
195
+ *
196
+ * Set to `false`, the only opt-out, to ship **unsigned** manifests. Every build that produces a manifest then
197
+ * logs a warning. `false` also short-circuits the environment variables, so a leftover
198
+ * `ELECTRON_BUILDER_UPDATE_SIGN_KEY` in CI cannot re-enable signing by accident.
199
+ *
200
+ * The requirement is only enforced when a publish policy is in effect (`--publish`); a build without one
201
+ * warns instead, so local builds and pipelines that sign the manifest in a later step of their own are
202
+ * unaffected. It is also waived when every publish provider has `publishAutoUpdate: false`, since no manifest is
203
+ * emitted then, and for a build whose targets write no update info (e.g. only snap, flatpak, MSI/MSIX, portable,
204
+ * mas/pkg or plain archives). A publishing build checks for the key at build start, before anything is packed
205
+ * or uploaded.
206
+ *
207
+ * See [Signed Update Manifests](https://www.electron.build/features/signed-update-manifests).
208
+ */
209
+ readonly updateManifest?: UpdateManifestSigningOptions | false | null;
192
210
  /**
193
211
  * The release info. Intended for command line usage:
194
212
  *
@@ -214,6 +232,34 @@ export interface PlatformSpecificBuildOptions extends TargetSpecificOptions, Fil
214
232
  */
215
233
  readonly defaultArch?: string;
216
234
  }
235
+ export interface UpdateManifestSigningOptions {
236
+ /**
237
+ * Ed25519 private key(s) in PEM (PKCS#8) format used to sign the update manifest. A single PEM string may
238
+ * contain several concatenated keys, or pass an array with one key each; the manifest is signed by every key
239
+ * (dual-signing for [key rotation](https://www.electron.build/features/key-rotation)) and the first key also
240
+ * fills the legacy single `signature` field.
241
+ * Secret — prefer the `ELECTRON_BUILDER_UPDATE_SIGN_KEY` environment variable in CI over committing this to config.
242
+ */
243
+ readonly signingKey?: string | Array<string> | null;
244
+ /**
245
+ * Path(s) to file(s) containing the Ed25519 private key (PEM, PKCS#8). Alternative to `signingKey`.
246
+ * An array signs with every listed key, in order. Relative paths are resolved against the project directory.
247
+ */
248
+ readonly signingKeyFile?: string | Array<string> | null;
249
+ /**
250
+ * The Ed25519 public key(s) (PEM or base64 SPKI) embedded into `app-update.yml` as the updater's trust list.
251
+ * The updater accepts a manifest when any listed key validates one of its signatures. Optional — when
252
+ * omitted the public key of every configured signing key is derived and embedded. Set it explicitly to trust
253
+ * additional keys ahead of a rotation (for example `[current, next]`).
254
+ *
255
+ * A `publicKey` on its own does not satisfy the signing requirement — electron-builder still has no key to
256
+ * sign with. An external signer (HSM/KMS) that signs `latest*.yml` in a later step therefore either builds
257
+ * without a publish policy, where the requirement only warns and the unsigned manifest is written locally, or
258
+ * keeps publishing with `publishAutoUpdate: false` on every publish provider - electron-builder then uploads the
259
+ * artifacts and embeds this key, but writes no `latest*.yml`, so the external step has to produce it too.
260
+ */
261
+ readonly publicKey?: string | Array<string> | null;
262
+ }
217
263
  export interface ReleaseInfo {
218
264
  /**
219
265
  * The release name.