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

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 (997) hide show
  1. package/dist/Framework.d.ts +40 -0
  2. package/dist/Framework.d.ts.map +1 -0
  3. package/dist/Framework.js +4 -0
  4. package/dist/Framework.js.map +1 -0
  5. package/dist/appInfo.d.ts +32 -0
  6. package/dist/appInfo.d.ts.map +1 -0
  7. package/dist/appInfo.js +145 -0
  8. package/dist/appInfo.js.map +1 -0
  9. package/dist/asar/asar.d.ts +39 -0
  10. package/dist/asar/asar.d.ts.map +1 -0
  11. package/dist/asar/asar.js +155 -0
  12. package/dist/asar/asar.js.map +1 -0
  13. package/dist/asar/asarFileChecker.d.ts +3 -0
  14. package/dist/asar/asarFileChecker.d.ts.map +1 -0
  15. package/dist/asar/asarFileChecker.js +22 -0
  16. package/dist/asar/asarFileChecker.js.map +1 -0
  17. package/dist/asar/asarUtil.d.ts +2 -0
  18. package/dist/asar/asarUtil.d.ts.map +1 -0
  19. package/dist/asar/asarUtil.js +278 -0
  20. package/dist/asar/asarUtil.js.map +1 -0
  21. package/dist/asar/integrity.d.ts +16 -0
  22. package/dist/asar/integrity.d.ts.map +1 -0
  23. package/dist/asar/integrity.js +59 -0
  24. package/dist/asar/integrity.js.map +1 -0
  25. package/dist/asar/unpackDetector.d.ts +2 -0
  26. package/dist/asar/unpackDetector.d.ts.map +1 -0
  27. package/dist/asar/unpackDetector.js +39 -0
  28. package/dist/asar/unpackDetector.js.map +1 -0
  29. package/dist/codeSign/certInfo.d.ts +55 -0
  30. package/dist/codeSign/certInfo.d.ts.map +1 -0
  31. package/dist/codeSign/certInfo.js +459 -0
  32. package/dist/codeSign/certInfo.js.map +1 -0
  33. package/dist/codeSign/codesign.d.ts +4 -0
  34. package/dist/codeSign/codesign.d.ts.map +1 -0
  35. package/dist/codeSign/codesign.js +32 -0
  36. package/dist/codeSign/codesign.js.map +1 -0
  37. package/dist/codeSign/mac/macCodeSign.d.ts +29 -0
  38. package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -0
  39. package/dist/codeSign/mac/macCodeSign.js +273 -0
  40. package/dist/codeSign/mac/macCodeSign.js.map +1 -0
  41. package/dist/codeSign/signManager.d.ts +14 -0
  42. package/dist/codeSign/signManager.d.ts.map +1 -0
  43. package/dist/codeSign/signManager.js +2 -0
  44. package/dist/codeSign/signManager.js.map +1 -0
  45. package/dist/codeSign/win/windowsCodeSign.d.ts +8 -0
  46. package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -0
  47. package/dist/codeSign/win/windowsCodeSign.js +34 -0
  48. package/dist/codeSign/win/windowsCodeSign.js.map +1 -0
  49. package/dist/codeSign/win/windowsSignAzureManager.d.ts +18 -0
  50. package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -0
  51. package/dist/codeSign/win/windowsSignAzureManager.js +68 -0
  52. package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -0
  53. package/dist/codeSign/win/windowsSignToolManager.d.ts +59 -0
  54. package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -0
  55. package/dist/codeSign/win/windowsSignToolManager.js +364 -0
  56. package/dist/codeSign/win/windowsSignToolManager.js.map +1 -0
  57. package/dist/configuration.d.ts +1010 -0
  58. package/dist/configuration.d.ts.map +1 -0
  59. package/dist/configuration.js +2 -0
  60. package/dist/configuration.js.map +1 -0
  61. package/dist/core.d.ts +61 -0
  62. package/dist/core.d.ts.map +1 -0
  63. package/dist/core.js +61 -0
  64. package/dist/core.js.map +1 -0
  65. package/dist/electron/ElectronFramework.d.ts +17 -0
  66. package/dist/electron/ElectronFramework.d.ts.map +1 -0
  67. package/dist/electron/ElectronFramework.js +236 -0
  68. package/dist/electron/ElectronFramework.js.map +1 -0
  69. package/dist/electron/electronVersion.d.ts +7 -0
  70. package/dist/electron/electronVersion.d.ts.map +1 -0
  71. package/dist/electron/electronVersion.js +119 -0
  72. package/dist/electron/electronVersion.js.map +1 -0
  73. package/dist/electron/injectFFMPEG.d.ts +12 -0
  74. package/dist/electron/injectFFMPEG.d.ts.map +1 -0
  75. package/dist/electron/injectFFMPEG.js +53 -0
  76. package/dist/electron/injectFFMPEG.js.map +1 -0
  77. package/dist/electron/mac/electronMac.d.ts +2 -0
  78. package/dist/electron/mac/electronMac.d.ts.map +1 -0
  79. package/dist/electron/mac/electronMac.js +254 -0
  80. package/dist/electron/mac/electronMac.js.map +1 -0
  81. package/dist/electron/search-module.d.ts +24 -0
  82. package/dist/electron/search-module.d.ts.map +1 -0
  83. package/dist/electron/search-module.js +68 -0
  84. package/dist/electron/search-module.js.map +1 -0
  85. package/dist/electron/win/electronWin.d.ts +2 -0
  86. package/dist/electron/win/electronWin.d.ts.map +1 -0
  87. package/dist/electron/win/electronWin.js +36 -0
  88. package/dist/electron/win/electronWin.js.map +1 -0
  89. package/dist/errorMessages.d.ts +2 -0
  90. package/dist/errorMessages.d.ts.map +1 -0
  91. package/dist/errorMessages.js +8 -0
  92. package/dist/errorMessages.js.map +1 -0
  93. package/dist/fileMatcher.d.ts +31 -0
  94. package/dist/fileMatcher.d.ts.map +1 -0
  95. package/dist/fileMatcher.js +277 -0
  96. package/dist/fileMatcher.js.map +1 -0
  97. package/dist/fileTransformer.d.ts +2 -0
  98. package/dist/fileTransformer.d.ts.map +1 -0
  99. package/dist/fileTransformer.js +82 -0
  100. package/dist/fileTransformer.js.map +1 -0
  101. package/dist/forge-maker.d.ts +6 -0
  102. package/dist/forge-maker.d.ts.map +1 -0
  103. package/dist/forge-maker.js +20 -0
  104. package/dist/forge-maker.js.map +1 -0
  105. package/dist/index.d.ts +40 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +77 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/indexInternal.d.ts +46 -0
  110. package/dist/indexInternal.d.ts.map +1 -0
  111. package/dist/indexInternal.js +39 -0
  112. package/dist/indexInternal.js.map +1 -0
  113. package/dist/linuxPackager.d.ts +13 -0
  114. package/dist/linuxPackager.d.ts.map +1 -0
  115. package/dist/linuxPackager.js +75 -0
  116. package/dist/linuxPackager.js.map +1 -0
  117. package/dist/macPackager.d.ts +50 -0
  118. package/dist/macPackager.d.ts.map +1 -0
  119. package/dist/macPackager.js +442 -0
  120. package/dist/macPackager.js.map +1 -0
  121. package/dist/node-module-collector/bunNodeModulesCollector.d.ts +11 -0
  122. package/dist/node-module-collector/bunNodeModulesCollector.d.ts.map +1 -0
  123. package/dist/node-module-collector/bunNodeModulesCollector.js +14 -0
  124. package/dist/node-module-collector/bunNodeModulesCollector.js.map +1 -0
  125. package/dist/node-module-collector/hoist.d.ts +124 -0
  126. package/dist/node-module-collector/hoist.d.ts.map +1 -0
  127. package/dist/node-module-collector/hoist.js +880 -0
  128. package/dist/node-module-collector/hoist.js.map +1 -0
  129. package/dist/node-module-collector/index.d.ts +21 -0
  130. package/dist/node-module-collector/index.d.ts.map +1 -0
  131. package/dist/node-module-collector/index.js +124 -0
  132. package/dist/node-module-collector/index.js.map +1 -0
  133. package/dist/node-module-collector/moduleManager.d.ts +94 -0
  134. package/dist/node-module-collector/moduleManager.d.ts.map +1 -0
  135. package/dist/node-module-collector/moduleManager.js +314 -0
  136. package/dist/node-module-collector/moduleManager.js.map +1 -0
  137. package/dist/node-module-collector/nodeModulesCollector.d.ts +138 -0
  138. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -0
  139. package/dist/node-module-collector/nodeModulesCollector.js +421 -0
  140. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -0
  141. package/dist/node-module-collector/npmNodeModulesCollector.d.ts +15 -0
  142. package/dist/node-module-collector/npmNodeModulesCollector.d.ts.map +1 -0
  143. package/dist/node-module-collector/npmNodeModulesCollector.js +75 -0
  144. package/dist/node-module-collector/npmNodeModulesCollector.js.map +1 -0
  145. package/dist/node-module-collector/packageManager.d.ts +18 -0
  146. package/dist/node-module-collector/packageManager.d.ts.map +1 -0
  147. package/dist/node-module-collector/packageManager.js +137 -0
  148. package/dist/node-module-collector/packageManager.js.map +1 -0
  149. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +45 -0
  150. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -0
  151. package/dist/node-module-collector/pnpmNodeModulesCollector.js +184 -0
  152. package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -0
  153. package/dist/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
  154. package/dist/node-module-collector/traversalNodeModulesCollector.d.ts.map +1 -0
  155. package/dist/node-module-collector/traversalNodeModulesCollector.js +118 -0
  156. package/dist/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
  157. package/dist/node-module-collector/types.d.ts +53 -0
  158. package/dist/node-module-collector/types.d.ts.map +1 -0
  159. package/dist/node-module-collector/types.js +2 -0
  160. package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts +16 -0
  161. package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts.map +1 -0
  162. package/dist/node-module-collector/yarnBerryNodeModulesCollector.js +87 -0
  163. package/dist/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -0
  164. package/dist/node-module-collector/yarnNodeModulesCollector.d.ts +11 -0
  165. package/dist/node-module-collector/yarnNodeModulesCollector.d.ts.map +1 -0
  166. package/dist/node-module-collector/yarnNodeModulesCollector.js +18 -0
  167. package/dist/node-module-collector/yarnNodeModulesCollector.js.map +1 -0
  168. package/dist/options/AppXOptions.d.ts +106 -0
  169. package/dist/options/AppXOptions.d.ts.map +1 -0
  170. package/dist/options/AppXOptions.js +2 -0
  171. package/dist/options/AppXOptions.js.map +1 -0
  172. package/dist/options/CommonWindowsInstallerConfiguration.d.ts +48 -0
  173. package/dist/options/CommonWindowsInstallerConfiguration.d.ts.map +1 -0
  174. package/dist/options/CommonWindowsInstallerConfiguration.js +47 -0
  175. package/dist/options/CommonWindowsInstallerConfiguration.js.map +1 -0
  176. package/dist/options/FileAssociation.d.ts +46 -0
  177. package/dist/options/FileAssociation.d.ts.map +1 -0
  178. package/dist/options/FileAssociation.js +2 -0
  179. package/dist/options/MsiOptions.d.ts +27 -0
  180. package/dist/options/MsiOptions.d.ts.map +1 -0
  181. package/dist/options/MsiOptions.js +2 -0
  182. package/dist/options/MsiOptions.js.map +1 -0
  183. package/dist/options/MsiWrappedOptions.d.ts +27 -0
  184. package/dist/options/MsiWrappedOptions.d.ts.map +1 -0
  185. package/dist/options/MsiWrappedOptions.js +2 -0
  186. package/dist/options/MsiWrappedOptions.js.map +1 -0
  187. package/dist/options/PlatformSpecificBuildOptions.d.ts +261 -0
  188. package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -0
  189. package/dist/options/PlatformSpecificBuildOptions.js +2 -0
  190. package/dist/options/PlatformSpecificBuildOptions.js.map +1 -0
  191. package/dist/options/SnapOptions.d.ts +480 -0
  192. package/dist/options/SnapOptions.d.ts.map +1 -0
  193. package/dist/options/SnapOptions.js +2 -0
  194. package/dist/options/SnapOptions.js.map +1 -0
  195. package/dist/options/SquirrelWindowsOptions.d.ts +47 -0
  196. package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -0
  197. package/dist/options/SquirrelWindowsOptions.js +2 -0
  198. package/dist/options/SquirrelWindowsOptions.js.map +1 -0
  199. package/dist/options/linuxOptions.d.ts +289 -0
  200. package/dist/options/linuxOptions.d.ts.map +1 -0
  201. package/dist/options/linuxOptions.js +2 -0
  202. package/dist/options/linuxOptions.js.map +1 -0
  203. package/dist/options/macOptions.d.ts +390 -0
  204. package/dist/options/macOptions.d.ts.map +1 -0
  205. package/dist/options/macOptions.js +2 -0
  206. package/dist/options/macOptions.js.map +1 -0
  207. package/dist/options/metadata.d.ts +54 -0
  208. package/dist/options/metadata.d.ts.map +1 -0
  209. package/dist/options/metadata.js +2 -0
  210. package/dist/options/metadata.js.map +1 -0
  211. package/dist/options/pkgOptions.d.ts +137 -0
  212. package/dist/options/pkgOptions.d.ts.map +1 -0
  213. package/dist/options/pkgOptions.js +2 -0
  214. package/dist/options/pkgOptions.js.map +1 -0
  215. package/dist/options/winOptions.d.ts +166 -0
  216. package/dist/options/winOptions.d.ts.map +1 -0
  217. package/dist/options/winOptions.js +2 -0
  218. package/dist/options/winOptions.js.map +1 -0
  219. package/dist/packager.d.ts +100 -0
  220. package/dist/packager.d.ts.map +1 -0
  221. package/dist/packager.js +491 -0
  222. package/dist/packager.js.map +1 -0
  223. package/dist/packagerApi.d.ts +32 -0
  224. package/dist/packagerApi.d.ts.map +1 -0
  225. package/dist/packagerApi.js +2 -0
  226. package/dist/packagerApi.js.map +1 -0
  227. package/dist/platformPackager.d.ts +132 -0
  228. package/dist/platformPackager.d.ts.map +1 -0
  229. package/dist/platformPackager.js +761 -0
  230. package/dist/platformPackager.js.map +1 -0
  231. package/dist/presets/rectCra.d.ts +2 -0
  232. package/dist/presets/rectCra.d.ts.map +1 -0
  233. package/dist/presets/rectCra.js +19 -0
  234. package/dist/presets/rectCra.js.map +1 -0
  235. package/dist/publish/PublishManager.d.ts +33 -0
  236. package/dist/publish/PublishManager.d.ts.map +1 -0
  237. package/dist/publish/PublishManager.js +470 -0
  238. package/dist/publish/PublishManager.js.map +1 -0
  239. package/dist/publish/updateInfoBuilder.d.ts +15 -0
  240. package/dist/publish/updateInfoBuilder.d.ts.map +1 -0
  241. package/dist/publish/updateInfoBuilder.js +221 -0
  242. package/dist/publish/updateInfoBuilder.js.map +1 -0
  243. package/dist/targets/ArchiveTarget.d.ts +12 -0
  244. package/dist/targets/ArchiveTarget.d.ts.map +1 -0
  245. package/dist/targets/ArchiveTarget.js +93 -0
  246. package/dist/targets/ArchiveTarget.js.map +1 -0
  247. package/dist/targets/archive.d.ts +27 -0
  248. package/dist/targets/archive.d.ts.map +1 -0
  249. package/dist/targets/archive.js +174 -0
  250. package/dist/targets/archive.js.map +1 -0
  251. package/dist/targets/blockmap/blockmap.d.ts +17 -0
  252. package/dist/targets/blockmap/blockmap.d.ts.map +1 -0
  253. package/dist/targets/blockmap/blockmap.js +150 -0
  254. package/dist/targets/blockmap/blockmap.js.map +1 -0
  255. package/dist/targets/differentialUpdateInfoBuilder.d.ts +16 -0
  256. package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -0
  257. package/dist/targets/differentialUpdateInfoBuilder.js +73 -0
  258. package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -0
  259. package/dist/targets/linux/FlatpakTarget.d.ts +21 -0
  260. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -0
  261. package/dist/targets/linux/FlatpakTarget.js +156 -0
  262. package/dist/targets/linux/FlatpakTarget.js.map +1 -0
  263. package/dist/targets/linux/FpmTarget.d.ts +23 -0
  264. package/dist/targets/linux/FpmTarget.d.ts.map +1 -0
  265. package/dist/targets/linux/FpmTarget.js +365 -0
  266. package/dist/targets/linux/FpmTarget.js.map +1 -0
  267. package/dist/targets/linux/LinuxTargetHelper.d.ts +24 -0
  268. package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -0
  269. package/dist/targets/linux/LinuxTargetHelper.js +332 -0
  270. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -0
  271. package/dist/targets/linux/appimage/AppImageTarget.d.ts +16 -0
  272. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -0
  273. package/dist/targets/linux/appimage/AppImageTarget.js +141 -0
  274. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -0
  275. package/dist/targets/linux/appimage/appImageUtil.d.ts +57 -0
  276. package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -0
  277. package/dist/targets/linux/appimage/appImageUtil.js +317 -0
  278. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -0
  279. package/dist/targets/linux/appimage/appLauncher.d.ts +4 -0
  280. package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -0
  281. package/dist/targets/linux/appimage/appLauncher.js +91 -0
  282. package/dist/targets/linux/appimage/appLauncher.js.map +1 -0
  283. package/dist/targets/linux/snap/SnapTarget.d.ts +37 -0
  284. package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -0
  285. package/dist/targets/linux/snap/SnapTarget.js +96 -0
  286. package/dist/targets/linux/snap/SnapTarget.js.map +1 -0
  287. package/dist/targets/linux/snap/core24.d.ts +53 -0
  288. package/dist/targets/linux/snap/core24.d.ts.map +1 -0
  289. package/dist/targets/linux/snap/core24.js +444 -0
  290. package/dist/targets/linux/snap/core24.js.map +1 -0
  291. package/dist/targets/linux/snap/coreCustom.d.ts +29 -0
  292. package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -0
  293. package/dist/targets/linux/snap/coreCustom.js +60 -0
  294. package/dist/targets/linux/snap/coreCustom.js.map +1 -0
  295. package/dist/targets/linux/snap/coreLegacy.d.ts +46 -0
  296. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -0
  297. package/dist/targets/linux/snap/coreLegacy.js +402 -0
  298. package/dist/targets/linux/snap/coreLegacy.js.map +1 -0
  299. package/dist/targets/linux/snap/snapcraftBuilder.d.ts +40 -0
  300. package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -0
  301. package/dist/targets/linux/snap/snapcraftBuilder.js +414 -0
  302. package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -0
  303. package/dist/targets/mac/MacTargetHelper.d.ts +30 -0
  304. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -0
  305. package/dist/targets/mac/MacTargetHelper.js +267 -0
  306. package/dist/targets/mac/MacTargetHelper.js.map +1 -0
  307. package/dist/targets/mac/pkg.d.ts +31 -0
  308. package/dist/targets/mac/pkg.d.ts.map +1 -0
  309. package/dist/targets/mac/pkg.js +271 -0
  310. package/dist/targets/mac/pkg.js.map +1 -0
  311. package/dist/targets/targetFactory.d.ts +13 -0
  312. package/dist/targets/targetFactory.d.ts.map +1 -0
  313. package/dist/targets/targetFactory.js +94 -0
  314. package/dist/targets/targetFactory.js.map +1 -0
  315. package/dist/targets/targetUtil.d.ts +16 -0
  316. package/dist/targets/targetUtil.d.ts.map +1 -0
  317. package/dist/targets/targetUtil.js +40 -0
  318. package/dist/targets/targetUtil.js.map +1 -0
  319. package/dist/targets/win/AppxCapabilities.d.ts +9 -0
  320. package/dist/targets/win/AppxCapabilities.d.ts.map +1 -0
  321. package/dist/targets/win/AppxCapabilities.js +254 -0
  322. package/dist/targets/win/AppxCapabilities.js.map +1 -0
  323. package/dist/targets/win/AppxTarget.d.ts +18 -0
  324. package/dist/targets/win/AppxTarget.d.ts.map +1 -0
  325. package/dist/targets/win/AppxTarget.js +398 -0
  326. package/dist/targets/win/AppxTarget.js.map +1 -0
  327. package/dist/targets/win/MsiTarget.d.ts +29 -0
  328. package/dist/targets/win/MsiTarget.d.ts.map +1 -0
  329. package/dist/targets/win/MsiTarget.js +268 -0
  330. package/dist/targets/win/MsiTarget.js.map +1 -0
  331. package/dist/targets/win/MsiWrappedTarget.d.ts +20 -0
  332. package/dist/targets/win/MsiWrappedTarget.d.ts.map +1 -0
  333. package/dist/targets/win/MsiWrappedTarget.js +77 -0
  334. package/dist/targets/win/MsiWrappedTarget.js.map +1 -0
  335. package/dist/targets/win/nsis/Commands.d.ts +10 -0
  336. package/dist/targets/win/nsis/Commands.d.ts.map +1 -0
  337. package/dist/targets/win/nsis/Commands.js +2 -0
  338. package/dist/targets/win/nsis/Commands.js.map +1 -0
  339. package/dist/targets/win/nsis/Defines.d.ts +81 -0
  340. package/dist/targets/win/nsis/Defines.d.ts.map +1 -0
  341. package/dist/targets/win/nsis/Defines.js +2 -0
  342. package/dist/targets/win/nsis/Defines.js.map +1 -0
  343. package/dist/targets/win/nsis/NsisTarget.d.ts +43 -0
  344. package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -0
  345. package/dist/targets/win/nsis/NsisTarget.js +726 -0
  346. package/dist/targets/win/nsis/NsisTarget.js.map +1 -0
  347. package/dist/targets/win/nsis/WebInstallerTarget.d.ts +14 -0
  348. package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -0
  349. package/dist/targets/win/nsis/WebInstallerTarget.js +43 -0
  350. package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -0
  351. package/dist/targets/win/nsis/nsisLang.d.ts +11 -0
  352. package/dist/targets/win/nsis/nsisLang.d.ts.map +1 -0
  353. package/dist/targets/win/nsis/nsisLang.js +94 -0
  354. package/dist/targets/win/nsis/nsisLang.js.map +1 -0
  355. package/dist/targets/win/nsis/nsisLicense.d.ts +5 -0
  356. package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -0
  357. package/dist/targets/win/nsis/nsisLicense.js +73 -0
  358. package/dist/targets/win/nsis/nsisLicense.js.map +1 -0
  359. package/dist/targets/win/nsis/nsisOptions.d.ts +275 -0
  360. package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -0
  361. package/dist/targets/win/nsis/nsisOptions.js +2 -0
  362. package/dist/targets/win/nsis/nsisOptions.js.map +1 -0
  363. package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +13 -0
  364. package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -0
  365. package/dist/targets/win/nsis/nsisScriptGenerator.js +59 -0
  366. package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -0
  367. package/dist/targets/win/nsis/nsisUtil.d.ts +26 -0
  368. package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -0
  369. package/dist/targets/win/nsis/nsisUtil.js +218 -0
  370. package/dist/targets/win/nsis/nsisUtil.js.map +1 -0
  371. package/dist/targets/win/nsis/nsisValidation.d.ts +19 -0
  372. package/dist/targets/win/nsis/nsisValidation.d.ts.map +1 -0
  373. package/dist/targets/win/nsis/nsisValidation.js +49 -0
  374. package/dist/targets/win/nsis/nsisValidation.js.map +1 -0
  375. package/dist/toolsets/7zip.d.ts +9 -0
  376. package/dist/toolsets/7zip.d.ts.map +1 -0
  377. package/dist/toolsets/7zip.js +80 -0
  378. package/dist/toolsets/7zip.js.map +1 -0
  379. package/dist/toolsets/appimage.d.ts +20 -0
  380. package/dist/toolsets/appimage.d.ts.map +1 -0
  381. package/dist/toolsets/appimage.js +67 -0
  382. package/dist/toolsets/appimage.js.map +1 -0
  383. package/dist/toolsets/custom.d.ts +5 -0
  384. package/dist/toolsets/custom.d.ts.map +1 -0
  385. package/dist/toolsets/custom.js +200 -0
  386. package/dist/toolsets/custom.js.map +1 -0
  387. package/dist/toolsets/fpm.d.ts +3 -0
  388. package/dist/toolsets/fpm.d.ts.map +1 -0
  389. package/dist/toolsets/fpm.js +49 -0
  390. package/dist/toolsets/fpm.js.map +1 -0
  391. package/dist/toolsets/icons.d.ts +12 -0
  392. package/dist/toolsets/icons.d.ts.map +1 -0
  393. package/dist/toolsets/icons.js +36 -0
  394. package/dist/toolsets/icons.js.map +1 -0
  395. package/dist/toolsets/linuxToolsMac.d.ts +8 -0
  396. package/dist/toolsets/linuxToolsMac.d.ts.map +1 -0
  397. package/dist/toolsets/linuxToolsMac.js +31 -0
  398. package/dist/toolsets/linuxToolsMac.js.map +1 -0
  399. package/dist/toolsets/nsis.d.ts +13 -0
  400. package/dist/toolsets/nsis.d.ts.map +1 -0
  401. package/dist/toolsets/nsis.js +100 -0
  402. package/dist/toolsets/nsis.js.map +1 -0
  403. package/dist/toolsets/winCodeSign.d.ts +42 -0
  404. package/dist/toolsets/winCodeSign.d.ts.map +1 -0
  405. package/dist/toolsets/winCodeSign.js +142 -0
  406. package/dist/toolsets/winCodeSign.js.map +1 -0
  407. package/dist/toolsets/wine.d.ts +6 -0
  408. package/dist/toolsets/wine.d.ts.map +1 -0
  409. package/dist/toolsets/wine.js +79 -0
  410. package/dist/toolsets/wine.js.map +1 -0
  411. package/dist/util/AppFileWalker.d.ts +14 -0
  412. package/dist/util/AppFileWalker.d.ts.map +1 -0
  413. package/dist/util/AppFileWalker.js +69 -0
  414. package/dist/util/AppFileWalker.js.map +1 -0
  415. package/dist/util/NodeModuleCopyHelper.d.ts +2 -0
  416. package/dist/util/NodeModuleCopyHelper.d.ts.map +1 -0
  417. package/dist/util/NodeModuleCopyHelper.js +160 -0
  418. package/dist/util/NodeModuleCopyHelper.js.map +1 -0
  419. package/dist/util/appFileCopier.d.ts +17 -0
  420. package/dist/util/appFileCopier.d.ts.map +1 -0
  421. package/dist/util/appFileCopier.js +190 -0
  422. package/dist/util/appFileCopier.js.map +1 -0
  423. package/dist/util/asyncEventEmitter.d.ts +34 -0
  424. package/dist/util/asyncEventEmitter.d.ts.map +1 -0
  425. package/dist/util/asyncEventEmitter.js +56 -0
  426. package/dist/util/asyncEventEmitter.js.map +1 -0
  427. package/dist/util/bundledTool.d.ts +8 -0
  428. package/dist/util/bundledTool.d.ts.map +1 -0
  429. package/dist/util/bundledTool.js +16 -0
  430. package/dist/util/bundledTool.js.map +1 -0
  431. package/dist/util/cacheManager.d.ts +19 -0
  432. package/dist/util/cacheManager.d.ts.map +1 -0
  433. package/dist/util/cacheManager.js +65 -0
  434. package/dist/util/cacheManager.js.map +1 -0
  435. package/dist/util/cacheState.d.ts +29 -0
  436. package/dist/util/cacheState.d.ts.map +1 -0
  437. package/dist/util/cacheState.js +134 -0
  438. package/dist/util/cacheState.js.map +1 -0
  439. package/dist/util/config/config.d.ts +13 -0
  440. package/dist/util/config/config.d.ts.map +1 -0
  441. package/dist/util/config/config.js +236 -0
  442. package/dist/util/config/config.js.map +1 -0
  443. package/dist/util/config/load.d.ts +20 -0
  444. package/dist/util/config/load.d.ts.map +1 -0
  445. package/dist/util/config/load.js +122 -0
  446. package/dist/util/config/load.js.map +1 -0
  447. package/dist/util/config/schemaValidator.d.ts +8 -0
  448. package/dist/util/config/schemaValidator.d.ts.map +1 -0
  449. package/dist/util/config/schemaValidator.js +161 -0
  450. package/dist/util/config/schemaValidator.js.map +1 -0
  451. package/dist/util/dynamicImport.d.ts +2 -0
  452. package/dist/util/dynamicImport.d.ts.map +1 -0
  453. package/dist/util/dynamicImport.js +9 -0
  454. package/dist/util/dynamicImport.js.map +1 -0
  455. package/dist/util/electronGet.d.ts +68 -0
  456. package/dist/util/electronGet.d.ts.map +1 -0
  457. package/dist/util/electronGet.js +560 -0
  458. package/dist/util/electronGet.js.map +1 -0
  459. package/dist/util/filter.d.ts +2 -0
  460. package/dist/util/filter.d.ts.map +1 -0
  461. package/dist/util/filter.js +64 -0
  462. package/dist/util/filter.js.map +1 -0
  463. package/dist/util/flags.d.ts +16 -0
  464. package/dist/util/flags.d.ts.map +1 -0
  465. package/dist/util/flags.js +53 -0
  466. package/dist/util/flags.js.map +1 -0
  467. package/dist/util/hash.d.ts +2 -0
  468. package/dist/util/hash.d.ts.map +1 -0
  469. package/dist/util/hash.js +16 -0
  470. package/dist/util/hash.js.map +1 -0
  471. package/dist/util/iconConverter.d.ts +29 -0
  472. package/dist/util/iconConverter.d.ts.map +1 -0
  473. package/dist/util/iconConverter.js +255 -0
  474. package/dist/util/iconConverter.js.map +1 -0
  475. package/dist/util/langs.d.ts +190 -0
  476. package/dist/util/langs.d.ts.map +1 -0
  477. package/dist/util/langs.js +432 -0
  478. package/dist/util/langs.js.map +1 -0
  479. package/dist/util/license.d.ts +17 -0
  480. package/dist/util/license.d.ts.map +1 -0
  481. package/dist/util/license.js +42 -0
  482. package/dist/util/license.js.map +1 -0
  483. package/dist/util/mac/macosIconComposer.d.ts +11 -0
  484. package/dist/util/mac/macosIconComposer.d.ts.map +1 -0
  485. package/dist/util/mac/macosIconComposer.js +99 -0
  486. package/dist/util/mac/macosIconComposer.js.map +1 -0
  487. package/dist/util/mac/macosVersion.d.ts +4 -0
  488. package/dist/util/mac/macosVersion.d.ts.map +1 -0
  489. package/dist/util/mac/macosVersion.js +31 -0
  490. package/dist/util/mac/macosVersion.js.map +1 -0
  491. package/dist/util/mac/plist.d.ts +8 -0
  492. package/dist/util/mac/plist.d.ts.map +1 -0
  493. package/dist/util/mac/plist.js +27 -0
  494. package/dist/util/mac/plist.js.map +1 -0
  495. package/dist/util/macroExpander.d.ts +4 -0
  496. package/dist/util/macroExpander.d.ts.map +1 -0
  497. package/dist/util/macroExpander.js +61 -0
  498. package/dist/util/macroExpander.js.map +1 -0
  499. package/dist/util/normalizePackageData.d.ts +2 -0
  500. package/dist/util/normalizePackageData.d.ts.map +1 -0
  501. package/dist/util/normalizePackageData.js +323 -0
  502. package/dist/util/normalizePackageData.js.map +1 -0
  503. package/dist/util/packageMetadata.d.ts +2 -0
  504. package/dist/util/packageMetadata.d.ts.map +1 -0
  505. package/dist/util/packageMetadata.js +118 -0
  506. package/dist/util/packageMetadata.js.map +1 -0
  507. package/dist/util/pathManager.d.ts +4 -0
  508. package/dist/util/pathManager.d.ts.map +1 -0
  509. package/dist/util/pathManager.js +17 -0
  510. package/dist/util/pathManager.js.map +1 -0
  511. package/dist/util/rebuild.d.ts +3 -0
  512. package/dist/util/rebuild.d.ts.map +1 -0
  513. package/dist/util/rebuild.js +54 -0
  514. package/dist/util/rebuild.js.map +1 -0
  515. package/dist/util/repositoryInfo.d.ts +4 -0
  516. package/dist/util/repositoryInfo.d.ts.map +1 -0
  517. package/dist/util/repositoryInfo.js +76 -0
  518. package/dist/util/repositoryInfo.js.map +1 -0
  519. package/dist/util/resolve.d.ts +3 -0
  520. package/dist/util/resolve.d.ts.map +1 -0
  521. package/dist/util/resolve.js +56 -0
  522. package/dist/util/resolve.js.map +1 -0
  523. package/dist/util/timer.d.ts +12 -0
  524. package/dist/util/timer.d.ts.map +1 -0
  525. package/dist/util/timer.js +23 -0
  526. package/dist/util/timer.js.map +1 -0
  527. package/dist/util/toolsetLock.d.ts +2 -0
  528. package/dist/util/toolsetLock.d.ts.map +1 -0
  529. package/dist/util/toolsetLock.js +20 -0
  530. package/dist/util/toolsetLock.js.map +1 -0
  531. package/dist/util/win/resEdit.d.ts +11 -0
  532. package/dist/util/win/resEdit.d.ts.map +1 -0
  533. package/dist/util/win/resEdit.js +46 -0
  534. package/dist/util/win/resEdit.js.map +1 -0
  535. package/dist/util/yarn.d.ts +23 -0
  536. package/dist/util/yarn.d.ts.map +1 -0
  537. package/dist/util/yarn.js +153 -0
  538. package/dist/util/yarn.js.map +1 -0
  539. package/dist/version.d.ts +2 -0
  540. package/dist/version.d.ts.map +1 -0
  541. package/dist/version.js +2 -0
  542. package/dist/version.js.map +1 -0
  543. package/dist/vm/MonoVm.d.ts +9 -0
  544. package/dist/vm/MonoVm.d.ts.map +1 -0
  545. package/dist/vm/MonoVm.js +16 -0
  546. package/dist/vm/MonoVm.js.map +1 -0
  547. package/dist/vm/ParallelsVm.d.ts +24 -0
  548. package/dist/vm/ParallelsVm.d.ts.map +1 -0
  549. package/dist/vm/ParallelsVm.js +107 -0
  550. package/dist/vm/ParallelsVm.js.map +1 -0
  551. package/dist/vm/PwshVm.d.ts +7 -0
  552. package/dist/vm/PwshVm.d.ts.map +1 -0
  553. package/dist/vm/PwshVm.js +21 -0
  554. package/dist/vm/PwshVm.js.map +1 -0
  555. package/dist/vm/WineVm.d.ts +14 -0
  556. package/dist/vm/WineVm.d.ts.map +1 -0
  557. package/dist/vm/WineVm.js +35 -0
  558. package/dist/vm/WineVm.js.map +1 -0
  559. package/dist/vm/vm.d.ts +15 -0
  560. package/dist/vm/vm.d.ts.map +1 -0
  561. package/dist/vm/vm.js +81 -0
  562. package/dist/vm/vm.js.map +1 -0
  563. package/dist/winPackager.d.ts +30 -0
  564. package/dist/winPackager.d.ts.map +1 -0
  565. package/dist/winPackager.js +270 -0
  566. package/dist/winPackager.js.map +1 -0
  567. package/helpers/package.json +6 -0
  568. package/helpers/remote-rebuild.js +2 -4
  569. package/package.json +30 -33
  570. package/scheme.json +379 -721
  571. package/out/Framework.d.ts +0 -36
  572. package/out/Framework.js +0 -7
  573. package/out/Framework.js.map +0 -1
  574. package/out/ProtonFramework.d.ts +0 -10
  575. package/out/ProtonFramework.js +0 -94
  576. package/out/ProtonFramework.js.map +0 -1
  577. package/out/appInfo.d.ts +0 -31
  578. package/out/appInfo.js +0 -152
  579. package/out/appInfo.js.map +0 -1
  580. package/out/asar/asar.d.ts +0 -38
  581. package/out/asar/asar.js +0 -163
  582. package/out/asar/asar.js.map +0 -1
  583. package/out/asar/asarFileChecker.d.ts +0 -2
  584. package/out/asar/asarFileChecker.js +0 -25
  585. package/out/asar/asarFileChecker.js.map +0 -1
  586. package/out/asar/asarUtil.d.ts +0 -1
  587. package/out/asar/asarUtil.js +0 -285
  588. package/out/asar/asarUtil.js.map +0 -1
  589. package/out/asar/integrity.d.ts +0 -15
  590. package/out/asar/integrity.js +0 -62
  591. package/out/asar/integrity.js.map +0 -1
  592. package/out/asar/unpackDetector.d.ts +0 -1
  593. package/out/asar/unpackDetector.js +0 -43
  594. package/out/asar/unpackDetector.js.map +0 -1
  595. package/out/binDownload.d.ts +0 -5
  596. package/out/binDownload.js +0 -104
  597. package/out/binDownload.js.map +0 -1
  598. package/out/codeSign/certInfo.d.ts +0 -54
  599. package/out/codeSign/certInfo.js +0 -466
  600. package/out/codeSign/certInfo.js.map +0 -1
  601. package/out/codeSign/codesign.d.ts +0 -3
  602. package/out/codeSign/codesign.js +0 -33
  603. package/out/codeSign/codesign.js.map +0 -1
  604. package/out/codeSign/macCodeSign.d.ts +0 -28
  605. package/out/codeSign/macCodeSign.js +0 -284
  606. package/out/codeSign/macCodeSign.js.map +0 -1
  607. package/out/codeSign/signManager.d.ts +0 -13
  608. package/out/codeSign/signManager.js +0 -3
  609. package/out/codeSign/signManager.js.map +0 -1
  610. package/out/codeSign/windowsCodeSign.d.ts +0 -7
  611. package/out/codeSign/windowsCodeSign.js +0 -38
  612. package/out/codeSign/windowsCodeSign.js.map +0 -1
  613. package/out/codeSign/windowsSignAzureManager.d.ts +0 -17
  614. package/out/codeSign/windowsSignAzureManager.js +0 -73
  615. package/out/codeSign/windowsSignAzureManager.js.map +0 -1
  616. package/out/codeSign/windowsSignToolManager.d.ts +0 -58
  617. package/out/codeSign/windowsSignToolManager.js +0 -376
  618. package/out/codeSign/windowsSignToolManager.js.map +0 -1
  619. package/out/configuration.d.ts +0 -532
  620. package/out/configuration.js +0 -3
  621. package/out/configuration.js.map +0 -1
  622. package/out/core.d.ts +0 -60
  623. package/out/core.js +0 -66
  624. package/out/core.js.map +0 -1
  625. package/out/electron/ElectronFramework.d.ts +0 -16
  626. package/out/electron/ElectronFramework.js +0 -242
  627. package/out/electron/ElectronFramework.js.map +0 -1
  628. package/out/electron/electronMac.d.ts +0 -1
  629. package/out/electron/electronMac.js +0 -262
  630. package/out/electron/electronMac.js.map +0 -1
  631. package/out/electron/electronVersion.d.ts +0 -6
  632. package/out/electron/electronVersion.js +0 -125
  633. package/out/electron/electronVersion.js.map +0 -1
  634. package/out/electron/electronWin.d.ts +0 -1
  635. package/out/electron/electronWin.js +0 -38
  636. package/out/electron/electronWin.js.map +0 -1
  637. package/out/electron/injectFFMPEG.d.ts +0 -11
  638. package/out/electron/injectFFMPEG.js +0 -57
  639. package/out/electron/injectFFMPEG.js.map +0 -1
  640. package/out/electron/search-module.d.ts +0 -23
  641. package/out/electron/search-module.js +0 -73
  642. package/out/electron/search-module.js.map +0 -1
  643. package/out/errorMessages.d.ts +0 -1
  644. package/out/errorMessages.js +0 -11
  645. package/out/errorMessages.js.map +0 -1
  646. package/out/fileMatcher.d.ts +0 -29
  647. package/out/fileMatcher.js +0 -292
  648. package/out/fileMatcher.js.map +0 -1
  649. package/out/fileTransformer.d.ts +0 -1
  650. package/out/fileTransformer.js +0 -107
  651. package/out/fileTransformer.js.map +0 -1
  652. package/out/forge-maker.d.ts +0 -5
  653. package/out/forge-maker.js +0 -23
  654. package/out/forge-maker.js.map +0 -1
  655. package/out/frameworks/LibUiFramework.d.ts +0 -47
  656. package/out/frameworks/LibUiFramework.js +0 -197
  657. package/out/frameworks/LibUiFramework.js.map +0 -1
  658. package/out/index.d.ts +0 -39
  659. package/out/index.js +0 -99
  660. package/out/index.js.map +0 -1
  661. package/out/linuxPackager.d.ts +0 -12
  662. package/out/linuxPackager.js +0 -77
  663. package/out/linuxPackager.js.map +0 -1
  664. package/out/mac/MacTargetHelper.d.ts +0 -29
  665. package/out/mac/MacTargetHelper.js +0 -273
  666. package/out/mac/MacTargetHelper.js.map +0 -1
  667. package/out/macPackager.d.ts +0 -49
  668. package/out/macPackager.js +0 -445
  669. package/out/macPackager.js.map +0 -1
  670. package/out/node-module-collector/bunNodeModulesCollector.d.ts +0 -10
  671. package/out/node-module-collector/bunNodeModulesCollector.js +0 -18
  672. package/out/node-module-collector/bunNodeModulesCollector.js.map +0 -1
  673. package/out/node-module-collector/hoist.d.ts +0 -123
  674. package/out/node-module-collector/hoist.js +0 -884
  675. package/out/node-module-collector/hoist.js.map +0 -1
  676. package/out/node-module-collector/index.d.ts +0 -18
  677. package/out/node-module-collector/index.js +0 -130
  678. package/out/node-module-collector/index.js.map +0 -1
  679. package/out/node-module-collector/moduleManager.d.ts +0 -93
  680. package/out/node-module-collector/moduleManager.js +0 -321
  681. package/out/node-module-collector/moduleManager.js.map +0 -1
  682. package/out/node-module-collector/nodeModulesCollector.d.ts +0 -137
  683. package/out/node-module-collector/nodeModulesCollector.js +0 -428
  684. package/out/node-module-collector/nodeModulesCollector.js.map +0 -1
  685. package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -14
  686. package/out/node-module-collector/npmNodeModulesCollector.js +0 -80
  687. package/out/node-module-collector/npmNodeModulesCollector.js.map +0 -1
  688. package/out/node-module-collector/packageManager.d.ts +0 -17
  689. package/out/node-module-collector/packageManager.js +0 -144
  690. package/out/node-module-collector/packageManager.js.map +0 -1
  691. package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +0 -44
  692. package/out/node-module-collector/pnpmNodeModulesCollector.js +0 -191
  693. package/out/node-module-collector/pnpmNodeModulesCollector.js.map +0 -1
  694. package/out/node-module-collector/traversalNodeModulesCollector.d.ts +0 -18
  695. package/out/node-module-collector/traversalNodeModulesCollector.js +0 -122
  696. package/out/node-module-collector/traversalNodeModulesCollector.js.map +0 -1
  697. package/out/node-module-collector/types.d.ts +0 -52
  698. package/out/node-module-collector/types.js +0 -3
  699. package/out/node-module-collector/yarnBerryNodeModulesCollector.d.ts +0 -15
  700. package/out/node-module-collector/yarnBerryNodeModulesCollector.js +0 -93
  701. package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +0 -1
  702. package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -10
  703. package/out/node-module-collector/yarnNodeModulesCollector.js +0 -22
  704. package/out/node-module-collector/yarnNodeModulesCollector.js.map +0 -1
  705. package/out/options/AppXOptions.d.ts +0 -105
  706. package/out/options/AppXOptions.js +0 -3
  707. package/out/options/AppXOptions.js.map +0 -1
  708. package/out/options/CommonWindowsInstallerConfiguration.d.ts +0 -47
  709. package/out/options/CommonWindowsInstallerConfiguration.js +0 -51
  710. package/out/options/CommonWindowsInstallerConfiguration.js.map +0 -1
  711. package/out/options/FileAssociation.d.ts +0 -45
  712. package/out/options/FileAssociation.js +0 -3
  713. package/out/options/MsiOptions.d.ts +0 -26
  714. package/out/options/MsiOptions.js +0 -3
  715. package/out/options/MsiOptions.js.map +0 -1
  716. package/out/options/MsiWrappedOptions.d.ts +0 -26
  717. package/out/options/MsiWrappedOptions.js +0 -3
  718. package/out/options/MsiWrappedOptions.js.map +0 -1
  719. package/out/options/PlatformSpecificBuildOptions.d.ts +0 -238
  720. package/out/options/PlatformSpecificBuildOptions.js +0 -3
  721. package/out/options/PlatformSpecificBuildOptions.js.map +0 -1
  722. package/out/options/SnapOptions.d.ts +0 -500
  723. package/out/options/SnapOptions.js +0 -3
  724. package/out/options/SnapOptions.js.map +0 -1
  725. package/out/options/SquirrelWindowsOptions.d.ts +0 -46
  726. package/out/options/SquirrelWindowsOptions.js +0 -3
  727. package/out/options/SquirrelWindowsOptions.js.map +0 -1
  728. package/out/options/linuxOptions.d.ts +0 -287
  729. package/out/options/linuxOptions.js +0 -3
  730. package/out/options/linuxOptions.js.map +0 -1
  731. package/out/options/macOptions.d.ts +0 -388
  732. package/out/options/macOptions.js +0 -3
  733. package/out/options/macOptions.js.map +0 -1
  734. package/out/options/metadata.d.ts +0 -53
  735. package/out/options/metadata.js +0 -3
  736. package/out/options/metadata.js.map +0 -1
  737. package/out/options/pkgOptions.d.ts +0 -136
  738. package/out/options/pkgOptions.js +0 -3
  739. package/out/options/pkgOptions.js.map +0 -1
  740. package/out/options/winOptions.d.ts +0 -164
  741. package/out/options/winOptions.js +0 -3
  742. package/out/options/winOptions.js.map +0 -1
  743. package/out/packager.d.ts +0 -99
  744. package/out/packager.js +0 -515
  745. package/out/packager.js.map +0 -1
  746. package/out/packagerApi.d.ts +0 -31
  747. package/out/packagerApi.js +0 -3
  748. package/out/packagerApi.js.map +0 -1
  749. package/out/platformPackager.d.ts +0 -101
  750. package/out/platformPackager.js +0 -714
  751. package/out/platformPackager.js.map +0 -1
  752. package/out/presets/rectCra.d.ts +0 -1
  753. package/out/presets/rectCra.js +0 -22
  754. package/out/presets/rectCra.js.map +0 -1
  755. package/out/publish/PublishManager.d.ts +0 -30
  756. package/out/publish/PublishManager.js +0 -497
  757. package/out/publish/PublishManager.js.map +0 -1
  758. package/out/publish/updateInfoBuilder.d.ts +0 -14
  759. package/out/publish/updateInfoBuilder.js +0 -226
  760. package/out/publish/updateInfoBuilder.js.map +0 -1
  761. package/out/targets/AppxCapabilities.d.ts +0 -8
  762. package/out/targets/AppxCapabilities.js +0 -258
  763. package/out/targets/AppxCapabilities.js.map +0 -1
  764. package/out/targets/AppxTarget.d.ts +0 -17
  765. package/out/targets/AppxTarget.js +0 -403
  766. package/out/targets/AppxTarget.js.map +0 -1
  767. package/out/targets/ArchiveTarget.d.ts +0 -11
  768. package/out/targets/ArchiveTarget.js +0 -88
  769. package/out/targets/ArchiveTarget.js.map +0 -1
  770. package/out/targets/FlatpakTarget.d.ts +0 -20
  771. package/out/targets/FlatpakTarget.js +0 -159
  772. package/out/targets/FlatpakTarget.js.map +0 -1
  773. package/out/targets/FpmTarget.d.ts +0 -22
  774. package/out/targets/FpmTarget.js +0 -372
  775. package/out/targets/FpmTarget.js.map +0 -1
  776. package/out/targets/LinuxTargetHelper.d.ts +0 -23
  777. package/out/targets/LinuxTargetHelper.js +0 -346
  778. package/out/targets/LinuxTargetHelper.js.map +0 -1
  779. package/out/targets/MsiTarget.d.ts +0 -28
  780. package/out/targets/MsiTarget.js +0 -268
  781. package/out/targets/MsiTarget.js.map +0 -1
  782. package/out/targets/MsiWrappedTarget.d.ts +0 -19
  783. package/out/targets/MsiWrappedTarget.js +0 -80
  784. package/out/targets/MsiWrappedTarget.js.map +0 -1
  785. package/out/targets/appimage/AppImageTarget.d.ts +0 -15
  786. package/out/targets/appimage/AppImageTarget.js +0 -147
  787. package/out/targets/appimage/AppImageTarget.js.map +0 -1
  788. package/out/targets/appimage/appImageUtil.d.ts +0 -56
  789. package/out/targets/appimage/appImageUtil.js +0 -323
  790. package/out/targets/appimage/appImageUtil.js.map +0 -1
  791. package/out/targets/appimage/appLauncher.d.ts +0 -3
  792. package/out/targets/appimage/appLauncher.js +0 -95
  793. package/out/targets/appimage/appLauncher.js.map +0 -1
  794. package/out/targets/archive.d.ts +0 -26
  795. package/out/targets/archive.js +0 -178
  796. package/out/targets/archive.js.map +0 -1
  797. package/out/targets/blockmap/blockmap.d.ts +0 -16
  798. package/out/targets/blockmap/blockmap.js +0 -153
  799. package/out/targets/blockmap/blockmap.js.map +0 -1
  800. package/out/targets/differentialUpdateInfoBuilder.d.ts +0 -15
  801. package/out/targets/differentialUpdateInfoBuilder.js +0 -80
  802. package/out/targets/differentialUpdateInfoBuilder.js.map +0 -1
  803. package/out/targets/nsis/Commands.d.ts +0 -9
  804. package/out/targets/nsis/Commands.js +0 -3
  805. package/out/targets/nsis/Commands.js.map +0 -1
  806. package/out/targets/nsis/Defines.d.ts +0 -80
  807. package/out/targets/nsis/Defines.js +0 -3
  808. package/out/targets/nsis/Defines.js.map +0 -1
  809. package/out/targets/nsis/NsisTarget.d.ts +0 -37
  810. package/out/targets/nsis/NsisTarget.js +0 -729
  811. package/out/targets/nsis/NsisTarget.js.map +0 -1
  812. package/out/targets/nsis/WebInstallerTarget.d.ts +0 -13
  813. package/out/targets/nsis/WebInstallerTarget.js +0 -47
  814. package/out/targets/nsis/WebInstallerTarget.js.map +0 -1
  815. package/out/targets/nsis/nsisLang.d.ts +0 -10
  816. package/out/targets/nsis/nsisLang.js +0 -100
  817. package/out/targets/nsis/nsisLang.js.map +0 -1
  818. package/out/targets/nsis/nsisLicense.d.ts +0 -4
  819. package/out/targets/nsis/nsisLicense.js +0 -77
  820. package/out/targets/nsis/nsisLicense.js.map +0 -1
  821. package/out/targets/nsis/nsisOptions.d.ts +0 -274
  822. package/out/targets/nsis/nsisOptions.js +0 -3
  823. package/out/targets/nsis/nsisOptions.js.map +0 -1
  824. package/out/targets/nsis/nsisScriptGenerator.d.ts +0 -12
  825. package/out/targets/nsis/nsisScriptGenerator.js +0 -64
  826. package/out/targets/nsis/nsisScriptGenerator.js.map +0 -1
  827. package/out/targets/nsis/nsisUtil.d.ts +0 -25
  828. package/out/targets/nsis/nsisUtil.js +0 -225
  829. package/out/targets/nsis/nsisUtil.js.map +0 -1
  830. package/out/targets/nsis/nsisValidation.d.ts +0 -18
  831. package/out/targets/nsis/nsisValidation.js +0 -53
  832. package/out/targets/nsis/nsisValidation.js.map +0 -1
  833. package/out/targets/pkg.d.ts +0 -30
  834. package/out/targets/pkg.js +0 -279
  835. package/out/targets/pkg.js.map +0 -1
  836. package/out/targets/snap/SnapTarget.d.ts +0 -36
  837. package/out/targets/snap/SnapTarget.js +0 -105
  838. package/out/targets/snap/SnapTarget.js.map +0 -1
  839. package/out/targets/snap/core24.d.ts +0 -52
  840. package/out/targets/snap/core24.js +0 -449
  841. package/out/targets/snap/core24.js.map +0 -1
  842. package/out/targets/snap/coreCustom.d.ts +0 -28
  843. package/out/targets/snap/coreCustom.js +0 -63
  844. package/out/targets/snap/coreCustom.js.map +0 -1
  845. package/out/targets/snap/coreLegacy.d.ts +0 -43
  846. package/out/targets/snap/coreLegacy.js +0 -416
  847. package/out/targets/snap/coreLegacy.js.map +0 -1
  848. package/out/targets/snap/snapcraftBuilder.d.ts +0 -39
  849. package/out/targets/snap/snapcraftBuilder.js +0 -419
  850. package/out/targets/snap/snapcraftBuilder.js.map +0 -1
  851. package/out/targets/targetFactory.d.ts +0 -12
  852. package/out/targets/targetFactory.js +0 -101
  853. package/out/targets/targetFactory.js.map +0 -1
  854. package/out/targets/targetUtil.d.ts +0 -14
  855. package/out/targets/targetUtil.js +0 -47
  856. package/out/targets/targetUtil.js.map +0 -1
  857. package/out/toolsets/7zip.d.ts +0 -2
  858. package/out/toolsets/7zip.js +0 -72
  859. package/out/toolsets/7zip.js.map +0 -1
  860. package/out/toolsets/icons.d.ts +0 -8
  861. package/out/toolsets/icons.js +0 -37
  862. package/out/toolsets/icons.js.map +0 -1
  863. package/out/toolsets/linux.d.ts +0 -26
  864. package/out/toolsets/linux.js +0 -146
  865. package/out/toolsets/linux.js.map +0 -1
  866. package/out/toolsets/windows.d.ts +0 -61
  867. package/out/toolsets/windows.js +0 -259
  868. package/out/toolsets/windows.js.map +0 -1
  869. package/out/toolsets/wine.d.ts +0 -5
  870. package/out/toolsets/wine.js +0 -100
  871. package/out/toolsets/wine.js.map +0 -1
  872. package/out/util/AppFileWalker.d.ts +0 -13
  873. package/out/util/AppFileWalker.js +0 -74
  874. package/out/util/AppFileWalker.js.map +0 -1
  875. package/out/util/NodeModuleCopyHelper.d.ts +0 -1
  876. package/out/util/NodeModuleCopyHelper.js +0 -165
  877. package/out/util/NodeModuleCopyHelper.js.map +0 -1
  878. package/out/util/appFileCopier.d.ts +0 -16
  879. package/out/util/appFileCopier.js +0 -251
  880. package/out/util/appFileCopier.js.map +0 -1
  881. package/out/util/asyncEventEmitter.d.ts +0 -33
  882. package/out/util/asyncEventEmitter.js +0 -63
  883. package/out/util/asyncEventEmitter.js.map +0 -1
  884. package/out/util/bundledTool.d.ts +0 -7
  885. package/out/util/bundledTool.js +0 -20
  886. package/out/util/bundledTool.js.map +0 -1
  887. package/out/util/cacheManager.d.ts +0 -18
  888. package/out/util/cacheManager.js +0 -70
  889. package/out/util/cacheManager.js.map +0 -1
  890. package/out/util/cacheState.d.ts +0 -28
  891. package/out/util/cacheState.js +0 -143
  892. package/out/util/cacheState.js.map +0 -1
  893. package/out/util/config/config.d.ts +0 -12
  894. package/out/util/config/config.js +0 -256
  895. package/out/util/config/config.js.map +0 -1
  896. package/out/util/config/load.d.ts +0 -19
  897. package/out/util/config/load.js +0 -129
  898. package/out/util/config/load.js.map +0 -1
  899. package/out/util/config/schemaValidator.d.ts +0 -7
  900. package/out/util/config/schemaValidator.js +0 -154
  901. package/out/util/config/schemaValidator.js.map +0 -1
  902. package/out/util/dynamicImport.d.ts +0 -1
  903. package/out/util/dynamicImport.js +0 -12
  904. package/out/util/dynamicImport.js.map +0 -1
  905. package/out/util/electronGet.d.ts +0 -61
  906. package/out/util/electronGet.js +0 -464
  907. package/out/util/electronGet.js.map +0 -1
  908. package/out/util/envPath.d.ts +0 -2
  909. package/out/util/envPath.js +0 -28
  910. package/out/util/envPath.js.map +0 -1
  911. package/out/util/filter.d.ts +0 -1
  912. package/out/util/filter.js +0 -68
  913. package/out/util/filter.js.map +0 -1
  914. package/out/util/flags.d.ts +0 -3
  915. package/out/util/flags.js +0 -16
  916. package/out/util/flags.js.map +0 -1
  917. package/out/util/hash.d.ts +0 -1
  918. package/out/util/hash.js +0 -19
  919. package/out/util/hash.js.map +0 -1
  920. package/out/util/iconConverter.d.ts +0 -25
  921. package/out/util/iconConverter.js +0 -260
  922. package/out/util/iconConverter.js.map +0 -1
  923. package/out/util/langs.d.ts +0 -189
  924. package/out/util/langs.js +0 -436
  925. package/out/util/langs.js.map +0 -1
  926. package/out/util/license.d.ts +0 -16
  927. package/out/util/license.js +0 -47
  928. package/out/util/license.js.map +0 -1
  929. package/out/util/macosIconComposer.d.ts +0 -10
  930. package/out/util/macosIconComposer.js +0 -102
  931. package/out/util/macosIconComposer.js.map +0 -1
  932. package/out/util/macosVersion.d.ts +0 -3
  933. package/out/util/macosVersion.js +0 -36
  934. package/out/util/macosVersion.js.map +0 -1
  935. package/out/util/macroExpander.d.ts +0 -3
  936. package/out/util/macroExpander.js +0 -64
  937. package/out/util/macroExpander.js.map +0 -1
  938. package/out/util/normalizePackageData.d.ts +0 -1
  939. package/out/util/normalizePackageData.js +0 -328
  940. package/out/util/normalizePackageData.js.map +0 -1
  941. package/out/util/packageDependencies.d.ts +0 -6
  942. package/out/util/packageDependencies.js +0 -3
  943. package/out/util/packageDependencies.js.map +0 -1
  944. package/out/util/packageMetadata.d.ts +0 -1
  945. package/out/util/packageMetadata.js +0 -124
  946. package/out/util/packageMetadata.js.map +0 -1
  947. package/out/util/pathManager.d.ts +0 -3
  948. package/out/util/pathManager.js +0 -23
  949. package/out/util/pathManager.js.map +0 -1
  950. package/out/util/plist.d.ts +0 -7
  951. package/out/util/plist.js +0 -31
  952. package/out/util/plist.js.map +0 -1
  953. package/out/util/rebuild.d.ts +0 -2
  954. package/out/util/rebuild.js +0 -60
  955. package/out/util/rebuild.js.map +0 -1
  956. package/out/util/repositoryInfo.d.ts +0 -3
  957. package/out/util/repositoryInfo.js +0 -79
  958. package/out/util/repositoryInfo.js.map +0 -1
  959. package/out/util/resEdit.d.ts +0 -10
  960. package/out/util/resEdit.js +0 -49
  961. package/out/util/resEdit.js.map +0 -1
  962. package/out/util/resolve.d.ts +0 -2
  963. package/out/util/resolve.js +0 -59
  964. package/out/util/resolve.js.map +0 -1
  965. package/out/util/timer.d.ts +0 -11
  966. package/out/util/timer.js +0 -28
  967. package/out/util/timer.js.map +0 -1
  968. package/out/util/toolsetLock.d.ts +0 -1
  969. package/out/util/toolsetLock.js +0 -23
  970. package/out/util/toolsetLock.js.map +0 -1
  971. package/out/util/yarn.d.ts +0 -22
  972. package/out/util/yarn.js +0 -160
  973. package/out/util/yarn.js.map +0 -1
  974. package/out/version.d.ts +0 -1
  975. package/out/version.js +0 -5
  976. package/out/version.js.map +0 -1
  977. package/out/vm/MonoVm.d.ts +0 -8
  978. package/out/vm/MonoVm.js +0 -20
  979. package/out/vm/MonoVm.js.map +0 -1
  980. package/out/vm/ParallelsVm.d.ts +0 -23
  981. package/out/vm/ParallelsVm.js +0 -102
  982. package/out/vm/ParallelsVm.js.map +0 -1
  983. package/out/vm/PwshVm.d.ts +0 -6
  984. package/out/vm/PwshVm.js +0 -25
  985. package/out/vm/PwshVm.js.map +0 -1
  986. package/out/vm/WineVm.d.ts +0 -12
  987. package/out/vm/WineVm.js +0 -38
  988. package/out/vm/WineVm.js.map +0 -1
  989. package/out/vm/vm.d.ts +0 -14
  990. package/out/vm/vm.js +0 -88
  991. package/out/vm/vm.js.map +0 -1
  992. package/out/winPackager.d.ts +0 -29
  993. package/out/winPackager.js +0 -271
  994. package/out/winPackager.js.map +0 -1
  995. /package/{out → dist}/node-module-collector/types.js.map +0 -0
  996. /package/{out → dist}/options/FileAssociation.js.map +0 -0
  997. /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nsisUtil.js","sourceRoot":"","sources":["../../../../src/targets/win/nsis/nsisUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAE3D,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAG9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AAOvD,MAAM,OAAO,gBAAgB;IAO3B,YAA6B,aAAgC;QAAhC,kBAAa,GAAb,aAAa,CAAmB;QAN5C,iBAAY,GAAG,IAAI,GAAG,EAAiC,CAAA;QACvD,mBAAc,GAAG,IAAI,GAAG,EAA4B,CAAA;QAErE,eAAe;QACf,aAAQ,GAAG,CAAC,CAAA;IAEoD,CAAC;IAEjE,KAAK,CAA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AAwB,CAAC,CAAA;QAC3C,CAAC;QACD,MAAM,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;QAC/C,MAAM,EAAE,CAAC,UAAU,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA;IACnD,CAAC;CACF","sourcesContent":["import { Arch, copyFile, dirSize, log } from \"builder-util\"\nimport { PackageFileInfo } from \"builder-util-runtime\"\nimport * as fs from \"fs/promises\"\nimport * as path from \"path\"\nimport * as zlib from \"zlib\"\nimport { getNsisElevatePath } from \"../../../toolsets/nsis.js\"\nimport { getTemplatePath } from \"../../../util/pathManager.js\"\nimport { NsisTarget } from \"./NsisTarget.js\"\n\nexport const nsisTemplatesDir = getTemplatePath(\"nsis\")\n\nexport interface PackArchResult {\n fileInfo: PackageFileInfo\n unpackedSize: number\n}\n\nexport class AppPackageHelper {\n private readonly archToResult = new Map<Arch, Promise<PackArchResult>>()\n private readonly infoToIsDelete = new Map<PackageFileInfo, boolean>()\n\n /** @private */\n refCount = 0\n\n constructor(private readonly elevateHelper: CopyElevateHelper) {}\n\n async packArch(arch: Arch, target: NsisTarget): Promise<PackArchResult> {\n let resultPromise = this.archToResult.get(arch)\n if (resultPromise == null) {\n const appOutDir = target.archs.get(arch)!\n resultPromise = this.elevateHelper\n .copy(appOutDir, target)\n .then(() => target.buildAppPackage(appOutDir, arch))\n .then(async fileInfo => ({\n fileInfo,\n unpackedSize: await dirSize(appOutDir),\n }))\n this.archToResult.set(arch, resultPromise)\n }\n\n const result = await resultPromise\n const { fileInfo: info } = result\n if (target.isWebInstaller) {\n this.infoToIsDelete.set(info, false)\n } else if (!this.infoToIsDelete.has(info)) {\n this.infoToIsDelete.set(info, true)\n }\n return result\n }\n\n async finishBuild(): Promise<any> {\n if (--this.refCount > 0) {\n return\n }\n\n const filesToDelete: Array<string> = []\n for (const [info, isDelete] of this.infoToIsDelete.entries()) {\n if (isDelete) {\n filesToDelete.push(info.path)\n }\n }\n\n await Promise.all(filesToDelete.map(it => fs.unlink(it)))\n }\n}\n\nexport class CopyElevateHelper {\n private readonly copied = new Map<string, Promise<any>>()\n\n copy(appOutDir: string, target: NsisTarget): Promise<any> {\n if (!target.packager.framework.isCopyElevateHelper) {\n return Promise.resolve()\n }\n\n let isPackElevateHelper = target.options.packElevateHelper\n if (isPackElevateHelper === false && target.options.perMachine === true) {\n isPackElevateHelper = true\n log.warn(\"`packElevateHelper = false` is ignored, because `perMachine` is set to `true`\")\n }\n\n if (isPackElevateHelper === false) {\n return Promise.resolve()\n }\n\n let promise = this.copied.get(appOutDir)\n if (promise != null) {\n return promise\n }\n\n promise = getNsisElevatePath(target.packager.config.toolsets?.nsis, target.packager.buildResourcesDir).then(elevatePath => {\n const outFile = path.join(appOutDir, \"resources\", \"elevate.exe\")\n const promise = copyFile(elevatePath, outFile, false)\n const { signAndEditExecutable, signExecutable } = target.packager.platformOptions\n if (signAndEditExecutable !== false && signExecutable !== false) {\n return promise.then(() => target.packager.signIf(outFile))\n }\n return promise\n })\n this.copied.set(appOutDir, promise)\n return promise\n }\n}\n\nclass BinaryReader {\n private readonly _buffer: Buffer\n private _position: number\n\n constructor(buffer: Buffer) {\n this._buffer = buffer\n this._position = 0\n }\n\n get length(): number {\n return this._buffer.length\n }\n\n get position(): number {\n return this._position\n }\n\n match(signature: Array<number>): boolean {\n if (signature.every((v, i) => this._buffer[this._position + i] === v)) {\n this._position += signature.length\n return true\n }\n return false\n }\n\n skip(offset: number) {\n this._position += offset\n }\n\n bytes(size: number): Buffer {\n const value = this._buffer.subarray(this._position, this._position + size)\n this._position += size\n return value\n }\n\n uint16(): number {\n const value = this._buffer[this._position] | (this._buffer[this._position + 1] << 8)\n this._position += 2\n return value\n }\n\n uint32(): number {\n return this.uint16() | (this.uint16() << 16)\n }\n\n string(length: number): string {\n let value = \"\"\n for (let i = 0; i < length; i++) {\n const c = this._buffer[this._position + i]\n if (c === 0x00) {\n break\n }\n value += String.fromCharCode(c)\n }\n this._position += length\n return value\n }\n}\n\nexport class UninstallerReader {\n // noinspection SpellCheckingInspection\n static async exec(installerPath: string, uninstallerPath: string) {\n const buffer = await fs.readFile(installerPath)\n const reader = new BinaryReader(buffer)\n // IMAGE_DOS_HEADER\n if (!reader.match([0x4d, 0x5a])) {\n throw new Error(\"Invalid 'MZ' signature.\")\n }\n reader.skip(58)\n // e_lfanew\n reader.skip(reader.uint32() - reader.position)\n // IMAGE_FILE_HEADER\n if (!reader.match([0x50, 0x45, 0x00, 0x00])) {\n throw new Error(\"Invalid 'PE' signature.\")\n }\n reader.skip(2)\n const numberOfSections = reader.uint16()\n reader.skip(12)\n const sizeOfOptionalHeader = reader.uint16()\n reader.skip(2)\n reader.skip(sizeOfOptionalHeader)\n // IMAGE_SECTION_HEADER\n let nsisOffset = 0\n for (let i = 0; i < numberOfSections; i++) {\n const name = reader.string(8)\n reader.skip(8)\n const rawSize = reader.uint32()\n const rawPointer = reader.uint32()\n reader.skip(16)\n switch (name) {\n case \".text\":\n case \".rdata\":\n case \".data\":\n case \".rsrc\": {\n nsisOffset = Math.max(rawPointer + rawSize, nsisOffset)\n break\n }\n default: {\n if (rawPointer !== 0 && rawSize !== 0) {\n throw new Error(\"Unsupported section '\" + name + \"'.\")\n }\n break\n }\n }\n }\n const executable = buffer.subarray(0, nsisOffset)\n const nsisSize = buffer.length - nsisOffset\n const nsisReader = new BinaryReader(buffer.subarray(nsisOffset, nsisOffset + nsisSize))\n const nsisSignature = [0xef, 0xbe, 0xad, 0xde, 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x6f, 0x66, 0x74, 0x49, 0x6e, 0x73, 0x74]\n nsisReader.uint32() // ?\n if (!nsisReader.match(nsisSignature)) {\n throw new Error(\"Invalid signature.\")\n }\n nsisReader.uint32() // ?\n if (nsisSize !== nsisReader.uint32()) {\n throw new Error(\"Size mismatch.\")\n }\n\n let innerBuffer = null\n while (true) {\n let size = nsisReader.uint32()\n const compressed = (size & 0x80000000) !== 0\n size = size & 0x7fffffff\n if (size === 0 || nsisReader.position + size > nsisReader.length || nsisReader.position >= nsisReader.length) {\n break\n }\n let buffer = nsisReader.bytes(size)\n if (compressed) {\n buffer = zlib.inflateRawSync(buffer)\n }\n const innerReader = new BinaryReader(buffer)\n innerReader.uint32() // ?\n if (innerReader.match(nsisSignature)) {\n if (innerBuffer) {\n throw new Error(\"Multiple inner blocks.\")\n }\n innerBuffer = buffer\n }\n }\n if (!innerBuffer) {\n throw new Error(\"Inner block not found.\")\n }\n await fs.writeFile(uninstallerPath, executable)\n await fs.appendFile(uninstallerPath, innerBuffer)\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import type { Defines } from "./Defines.js";
2
+ /**
3
+ * Validates makensis stdout/stderr after a zero-exit run.
4
+ *
5
+ * NSIS can emit "Error:" lines on stderr and still exit 0 (e.g. disk-full
6
+ * scenarios where the OS silently drops writes). Also checks the
7
+ * "Install data: <written> / <expected> bytes" progress line for truncation.
8
+ */
9
+ export declare function checkMakensisOutput(stdout: string, stderr: string): void;
10
+ /**
11
+ * Verifies the generated installer is at least as large as the sum of the
12
+ * embedded archive(s). An installer smaller than its payload is definitively
13
+ * truncated regardless of the makensis exit code.
14
+ *
15
+ * Only runs when APP_64/APP_32/APP_ARM64 defines are present (i.e. normal,
16
+ * non-portable installers). Skipped for the intermediate uninstaller build.
17
+ */
18
+ export declare function verifyInstallerSize(outFile: string, defines: Defines): Promise<void>;
19
+ //# sourceMappingURL=nsisValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nsisValidation.d.ts","sourceRoot":"","sources":["../../../../src/targets/win/nsis/nsisValidation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CASxE;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B1F"}
@@ -0,0 +1,49 @@
1
+ import { ExecError, statOrNull } from "builder-util";
2
+ /**
3
+ * Validates makensis stdout/stderr after a zero-exit run.
4
+ *
5
+ * NSIS can emit "Error:" lines on stderr and still exit 0 (e.g. disk-full
6
+ * scenarios where the OS silently drops writes). Also checks the
7
+ * "Install data: <written> / <expected> bytes" progress line for truncation.
8
+ */
9
+ export function checkMakensisOutput(stdout, stderr) {
10
+ const errorLines = stderr
11
+ .split("\n")
12
+ .map(l => l.trim())
13
+ .filter(l => /^Error:/i.test(l));
14
+ if (errorLines.length > 0) {
15
+ throw new ExecError("makensis", 0, stdout, stderr);
16
+ }
17
+ }
18
+ /**
19
+ * Verifies the generated installer is at least as large as the sum of the
20
+ * embedded archive(s). An installer smaller than its payload is definitively
21
+ * truncated regardless of the makensis exit code.
22
+ *
23
+ * Only runs when APP_64/APP_32/APP_ARM64 defines are present (i.e. normal,
24
+ * non-portable installers). Skipped for the intermediate uninstaller build.
25
+ */
26
+ export async function verifyInstallerSize(outFile, defines) {
27
+ let archiveSize = 0;
28
+ for (const key of ["APP_64", "APP_32", "APP_ARM64"]) {
29
+ const p = defines[key];
30
+ if (typeof p === "string") {
31
+ const s = await statOrNull(p);
32
+ if (s != null) {
33
+ archiveSize += s.size;
34
+ }
35
+ }
36
+ }
37
+ if (archiveSize === 0) {
38
+ return;
39
+ }
40
+ const outStat = await statOrNull(outFile);
41
+ if (outStat == null) {
42
+ throw new Error(`Generated installer was not created at "${outFile}" — output may be incomplete. Check available disk space and try again.`);
43
+ }
44
+ if (outStat.size < archiveSize) {
45
+ throw new Error(`Generated installer (${outStat.size} bytes) is smaller than the embedded archive(s) (${archiveSize} bytes) — ` +
46
+ `output may be incomplete. Check available disk space and try again.`);
47
+ }
48
+ }
49
+ //# sourceMappingURL=nsisValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nsisValidation.js","sourceRoot":"","s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KAAK,CAAC,2CAA2C,OAAO,yEAAyE,CAAC,CAAA;IAC9I,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,GAAG,WAAW,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,wBAAwB,OAAO,CAAC,IAAI,oDAAoD,WAAW,YAAY;YAC7G,qEAAqE,CACxE,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["import { ExecError, statOrNull } from \"builder-util\"\nimport type { Defines } from \"./Defines.js\"\n\n/**\n * Validates makensis stdout/stderr after a zero-exit run.\n *\n * NSIS can emit \"Error:\" lines on stderr and still exit 0 (e.g. disk-full\n * scenarios where the OS silently drops writes). Also checks the\n * \"Install data: <written> / <expected> bytes\" progress line for truncation.\n */\nexport function checkMakensisOutput(stdout: string, stderr: string): void {\n const errorLines = stderr\n .split(\"\\n\")\n .map(l => l.trim())\n .filter(l => /^Error:/i.test(l))\n\n if (errorLines.length > 0) {\n throw new ExecError(\"makensis\", 0, stdout, stderr)\n }\n}\n\n/**\n * Verifies the generated installer is at least as large as the sum of the\n * embedded archive(s). An installer smaller than its payload is definitively\n * truncated regardless of the makensis exit code.\n *\n * Only runs when APP_64/APP_32/APP_ARM64 defines are present (i.e. normal,\n * non-portable installers). Skipped for the intermediate uninstaller build.\n */\nexport async function verifyInstallerSize(outFile: string, defines: Defines): Promise<void> {\n let archiveSize = 0\n for (const key of [\"APP_64\", \"APP_32\", \"APP_ARM64\"] as const) {\n const p = defines[key]\n if (typeof p === \"string\") {\n const s = await statOrNull(p)\n if (s != null) {\n archiveSize += s.size\n }\n }\n }\n\n if (archiveSize === 0) {\n return\n }\n\n const outStat = await statOrNull(outFile)\n if (outStat == null) {\n throw new Error(`Generated installer was not created at \"${outFile}\" — output may be incomplete. Check available disk space and try again.`)\n }\n if (outStat.size < archiveSize) {\n throw new Error(\n `Generated installer (${outStat.size} bytes) is smaller than the embedded archive(s) (${archiveSize} bytes) — ` +\n `output may be incomplete. Check available disk space and try again.`\n )\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Override the 7za binary path with a pre-resolved absolute path.
3
+ * Called by the packager when `toolsets.sevenZip` is a `ToolsetCustom` config.
4
+ * Resets the resolution cache so the next `getPath7za()` call uses this path.
5
+ */
6
+ export declare function setSevenZipPath(customPath: string): void;
7
+ /** Returns the path to the 7za executable, downloading it on first call. Resets on failure so callers can retry. */
8
+ export declare function getPath7za(): Promise<string>;
9
+ //# sourceMappingURL=7zip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"7zip.d.ts","sourceRoot":"","sources":["../../src/toolsets/7zip.ts"],"names":[],"mappings":"AA4CA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAGxD;AAED,oHAAoH;AACpH,wBAAgB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ5C"}
@@ -0,0 +1,80 @@
1
+ import { chmod } from "node:fs/promises";
2
+ import * as path from "path";
3
+ import { downloadBuilderToolset } from "../util/electronGet.js";
4
+ const checksums = {
5
+ "7zip-linux-ia32.tar.gz": "24a5d5bfe81506d0bfe21a812588119ae3deb757e8ba084b2339d8e899543686",
6
+ "7zip-darwin-arm64.tar.gz": "496a341abe210aae1a25bc202ee97f6de6c76a3dc80f91d96616be05502d72c1",
7
+ "7zip-darwin-x86_64.tar.gz": "496a341abe210aae1a25bc202ee97f6de6c76a3dc80f91d96616be05502d72c1",
8
+ "7zip-linux-arm64.tar.gz": "5aff5034206b78f8261249ceb922b5c7e04c9bdb733784d8f5b6df9732cf1f79",
9
+ "7zip-win-arm64.tar.gz": "ac3f38f96ce7498096a123bb0862dd6db863a7353c9e9e1c15f73c183adf6620",
10
+ "7zip-win-ia32.tar.gz": "ac3f38f96ce7498096a123bb0862dd6db863a7353c9e9e1c15f73c183adf6620",
11
+ "7zip-win-x64.tar.gz": "be071f15bd6da2f78fe81c6ddef2009b0c4d8a51f36b780cb806c7e6df95e1b3",
12
+ "7zip-linux-x64.tar.gz": "d151bb44b2a9d9bfc52813ce4cac042916394a0ab8a56bd5d221a5dc9ef8d5d7",
13
+ };
14
+ function getFilename() {
15
+ const { platform, arch } = process;
16
+ if (platform === "darwin") {
17
+ return arch === "arm64" ? "7zip-darwin-arm64.tar.gz" : "7zip-darwin-x86_64.tar.gz";
18
+ }
19
+ if (platform === "linux") {
20
+ if (arch === "arm64") {
21
+ return "7zip-linux-arm64.tar.gz";
22
+ }
23
+ if (arch === "ia32") {
24
+ return "7zip-linux-ia32.tar.gz";
25
+ }
26
+ return "7zip-linux-x64.tar.gz";
27
+ }
28
+ if (platform === "win32") {
29
+ if (arch === "arm64") {
30
+ return "7zip-win-arm64.tar.gz";
31
+ }
32
+ if (arch === "ia32") {
33
+ return "7zip-win-ia32.tar.gz";
34
+ }
35
+ return "7zip-win-x64.tar.gz";
36
+ }
37
+ throw new Error(`Unsupported platform for 7zip toolset: ${platform}/${arch}`);
38
+ }
39
+ let _customPath = null;
40
+ let _resolvedPath = null;
41
+ /**
42
+ * Override the 7za binary path with a pre-resolved absolute path.
43
+ * Called by the packager when `toolsets.sevenZip` is a `ToolsetCustom` config.
44
+ * Resets the resolution cache so the next `getPath7za()` call uses this path.
45
+ */
46
+ export function setSevenZipPath(customPath) {
47
+ _customPath = customPath;
48
+ _resolvedPath = null;
49
+ }
50
+ /** Returns the path to the 7za executable, downloading it on first call. Resets on failure so callers can retry. */
51
+ export function getPath7za() {
52
+ if (_resolvedPath == null) {
53
+ _resolvedPath = resolve().catch(err => {
54
+ _resolvedPath = null;
55
+ throw err;
56
+ });
57
+ }
58
+ return _resolvedPath;
59
+ }
60
+ async function resolve() {
61
+ if (_customPath != null) {
62
+ if (process.platform !== "win32") {
63
+ await chmod(_customPath, 0o755);
64
+ }
65
+ return _customPath;
66
+ }
67
+ const filename = getFilename();
68
+ const toolDir = await downloadBuilderToolset({
69
+ releaseName: `7zip@1.0.0`,
70
+ filenameWithExt: filename,
71
+ checksums: checksums,
72
+ githubOrgRepo: "electron-userland/electron-builder-binaries",
73
+ });
74
+ const bin = path.join(toolDir, "bin", process.platform === "win32" ? "7za.exe" : "7za");
75
+ if (process.platform !== "win32") {
76
+ await chmod(bin, 0o755);
77
+ }
78
+ return bin;
79
+ }
80
+ //# sourceMappingURL=7zip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"7zip.js","sourceRoot":"","sources":["../../src/toolsets/7zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,MAAM,SAAS,GAAG;IAChB,wBAAwB,EAAE,kEAAkE;IAC5F,0BAA0B,EAAE,kEAAkE;IAC9F,2BAA2B,EAAE,kEAAkE;IAC/F,yBAAyB,EAAE,kEAAkE;IAC7F,uBAAuB,EAAE,kEAAkE;IAC3F,sBAAsB,EAAE,kEAAkE;IAC1F,qBAAqB,EAAE,kEAAkE;IACzF,uBAAuB,EAAE,kEAAkE;CACnF,CAAA;AAEV,SAAS,WAAW;IAClB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IAClC,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,2BAA2B,CAAA;IACpF,CAAC;IACD,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACrB,OAAO,yBAAyB,CAAA;QAClC,CAAC;QACD,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YACpB,OAAO,wBAAwB,CAAA;QACjC,CAAC;QACD,OAAO,uBAAuB,CAAA;IAChC,CAAC;IACD,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,IAAI,IAAI,KAAK,OAAO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AO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IACvF,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC","sourcesContent":["import { chmod } from \"node:fs/promises\"\nimport * as path from \"path\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\n\nconst checksums = {\n \"7zip-linux-ia32.tar.gz\": \"24a5d5bfe81506d0bfe21a812588119ae3deb757e8ba084b2339d8e899543686\",\n \"7zip-darwin-arm64.tar.gz\": \"496a341abe210aae1a25bc202ee97f6de6c76a3dc80f91d96616be05502d72c1\",\n \"7zip-darwin-x86_64.tar.gz\": \"496a341abe210aae1a25bc202ee97f6de6c76a3dc80f91d96616be05502d72c1\",\n \"7zip-linux-arm64.tar.gz\": \"5aff5034206b78f8261249ceb922b5c7e04c9bdb733784d8f5b6df9732cf1f79\",\n \"7zip-win-arm64.tar.gz\": \"ac3f38f96ce7498096a123bb0862dd6db863a7353c9e9e1c15f73c183adf6620\",\n \"7zip-win-ia32.tar.gz\": \"ac3f38f96ce7498096a123bb0862dd6db863a7353c9e9e1c15f73c183adf6620\",\n \"7zip-win-x64.tar.gz\": \"be071f15bd6da2f78fe81c6ddef2009b0c4d8a51f36b780cb806c7e6df95e1b3\",\n \"7zip-linux-x64.tar.gz\": \"d151bb44b2a9d9bfc52813ce4cac042916394a0ab8a56bd5d221a5dc9ef8d5d7\",\n} as const\n\nfunction getFilename(): keyof typeof checksums {\n const { platform, arch } = process\n if (platform === \"darwin\") {\n return arch === \"arm64\" ? \"7zip-darwin-arm64.tar.gz\" : \"7zip-darwin-x86_64.tar.gz\"\n }\n if (platform === \"linux\") {\n if (arch === \"arm64\") {\n return \"7zip-linux-arm64.tar.gz\"\n }\n if (arch === \"ia32\") {\n return \"7zip-linux-ia32.tar.gz\"\n }\n return \"7zip-linux-x64.tar.gz\"\n }\n if (platform === \"win32\") {\n if (arch === \"arm64\") {\n return \"7zip-win-arm64.tar.gz\"\n }\n if (arch === \"ia32\") {\n return \"7zip-win-ia32.tar.gz\"\n }\n return \"7zip-win-x64.tar.gz\"\n }\n throw new Error(`Unsupported platform for 7zip toolset: ${platform}/${arch}`)\n}\n\nlet _customPath: string | null = null\nlet _resolvedPath: Promise<string> | null = null\n\n/**\n * Override the 7za binary path with a pre-resolved absolute path.\n * Called by the packager when `toolsets.sevenZip` is a `ToolsetCustom` config.\n * Resets the resolution cache so the next `getPath7za()` call uses this path.\n */\nexport function setSevenZipPath(customPath: string): void {\n _customPath = customPath\n _resolvedPath = null\n}\n\n/** Returns the path to the 7za executable, downloading it on first call. Resets on failure so callers can retry. */\nexport function getPath7za(): Promise<string> {\n if (_resolvedPath == null) {\n _resolvedPath = resolve().catch(err => {\n _resolvedPath = null\n throw err\n })\n }\n return _resolvedPath\n}\n\nasync function resolve(): Promise<string> {\n if (_customPath != null) {\n if (process.platform !== \"win32\") {\n await chmod(_customPath, 0o755)\n }\n return _customPath\n }\n\n const filename = getFilename()\n const toolDir = await downloadBuilderToolset({\n releaseName: `7zip@1.0.0`,\n filenameWithExt: filename,\n checksums: checksums,\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n\n const bin = path.join(toolDir, \"bin\", process.platform === \"win32\" ? \"7za.exe\" : \"7za\")\n if (process.platform !== \"win32\") {\n await chmod(bin, 0o755)\n }\n return bin\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { Arch } from "builder-util";
2
+ import { ToolsetConfig } from "../configuration.js";
3
+ export declare const appimageChecksums: {
4
+ readonly "0.0.0": {
5
+ readonly "appimage-12.0.1.7z": "d12ff7eb8f1d1ec4652ca5237a7fbdca33acc0c758045636feca62dc6ecb8ec4";
6
+ };
7
+ readonly "1.0.2": {
8
+ readonly "appimage-tools-runtime-20251108.tar.gz": "a784a8c26331ec2e945c23d6bdb14af5c9df27f5939825d84b8709c61dc81eb0";
9
+ };
10
+ readonly "1.0.3": {
11
+ readonly "appimage-tools-runtime-20251108.tar.gz": "84021a78ee214ae6fd33a2d62a92ba25542dd10bc86bf117a9b2d0bba44e7665";
12
+ };
13
+ };
14
+ export declare function getAppImageTools(toolset: ToolsetConfig["appimage"], targetArch: Arch, resourcesDir: string): Promise<{
15
+ mksquashfs: string;
16
+ desktopFileValidate: string;
17
+ runtime: string;
18
+ runtimeLibraries: string;
19
+ }>;
20
+ //# sourceMappingURL=appimage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appimage.d.ts","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAInD,eAAO,MAAM,iBAAiB;;;;;;;;;;CAUpB,CAAA;AAEV,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM;;;;;GAwDhH"}
@@ -0,0 +1,67 @@
1
+ import { Arch } from "builder-util";
2
+ import * as path from "path";
3
+ import { downloadBuilderToolset } from "../util/electronGet.js";
4
+ import { getCustomToolsetPath } from "./custom.js";
5
+ export const appimageChecksums = {
6
+ "0.0.0": {
7
+ "appimage-12.0.1.7z": "d12ff7eb8f1d1ec4652ca5237a7fbdca33acc0c758045636feca62dc6ecb8ec4",
8
+ },
9
+ "1.0.2": {
10
+ "appimage-tools-runtime-20251108.tar.gz": "a784a8c26331ec2e945c23d6bdb14af5c9df27f5939825d84b8709c61dc81eb0",
11
+ },
12
+ "1.0.3": {
13
+ "appimage-tools-runtime-20251108.tar.gz": "84021a78ee214ae6fd33a2d62a92ba25542dd10bc86bf117a9b2d0bba44e7665",
14
+ },
15
+ };
16
+ export async function getAppImageTools(toolset, targetArch, resourcesDir) {
17
+ const runtimeArch = targetArch === Arch.armv7l ? "arm32" : targetArch === Arch.arm64 ? "arm64" : targetArch === Arch.ia32 ? "ia32" : "x64";
18
+ // Static-runtime layout: tools at root, runtimes/ subdir, lib/{arch}/ subdir
19
+ const getPaths = (artifactPath) => ({
20
+ mksquashfs: path.resolve(artifactPath, "mksquashfs"),
21
+ desktopFileValidate: path.resolve(artifactPath, "desktop-file-validate"),
22
+ runtime: path.resolve(artifactPath, "runtimes", `runtime-${runtimeArch}`),
23
+ runtimeLibraries: path.resolve(artifactPath, "lib", runtimeArch),
24
+ });
25
+ // FUSE2 layout: tools under a host-platform subdir; runtime files at root with target-arch suffix
26
+ const getFuse2Paths = (artifactPath) => {
27
+ // mksquashfs/desktop-file-validate are HOST binaries — use process.arch, not targetArch
28
+ const hostArch = process.arch === "arm" ? "arm32" : process.arch === "arm64" ? "arm64" : process.arch === "ia32" ? "ia32" : "x64";
29
+ const toolRoot = process.platform === "linux" ? `linux-${hostArch}` : "darwin";
30
+ // Runtime files live at root; armv7l target uses "armv7l" filename, not the internal "arm32" alias
31
+ const runtimeSuffix = targetArch === Arch.armv7l ? "armv7l" : runtimeArch;
32
+ // FUSE2 tree only ships lib/ia32 and lib/x64; arm targets fall back to x64 here
33
+ const libArch = targetArch === Arch.ia32 ? "ia32" : "x64";
34
+ return {
35
+ mksquashfs: path.resolve(artifactPath, toolRoot, "mksquashfs"),
36
+ desktopFileValidate: path.resolve(artifactPath, toolRoot, "desktop-file-validate"),
37
+ runtime: path.resolve(artifactPath, `runtime-${runtimeSuffix}`),
38
+ runtimeLibraries: path.resolve(artifactPath, "lib", libArch),
39
+ };
40
+ };
41
+ // null → modern default "1.0.3"
42
+ const isFuse2 = (toolset ?? "1.0.3") === "0.0.0";
43
+ if (isFuse2) {
44
+ const filenameWithExt = "appimage-12.0.1.7z";
45
+ const artifactPath = await downloadBuilderToolset({
46
+ releaseName: "appimage-12.0.1",
47
+ filenameWithExt,
48
+ checksums: { [filenameWithExt]: appimageChecksums["0.0.0"][filenameWithExt] },
49
+ githubOrgRepo: "electron-userland/electron-builder-binaries",
50
+ });
51
+ return getFuse2Paths(artifactPath);
52
+ }
53
+ if (typeof toolset === "object" && toolset != null) {
54
+ const vendorPath = await getCustomToolsetPath(toolset, resourcesDir);
55
+ return getPaths(vendorPath);
56
+ }
57
+ const effectiveVersion = (toolset ?? "1.0.3");
58
+ const filenameWithExt = "appimage-tools-runtime-20251108.tar.gz";
59
+ const artifactPath = await downloadBuilderToolset({
60
+ releaseName: `appimage@${effectiveVersion}`,
61
+ filenameWithExt,
62
+ checksums: { [filenameWithExt]: appimageChecksums[effectiveVersion][filenameWithExt] },
63
+ githubOrgRepo: "electron-userland/electron-builder-binaries",
64
+ });
65
+ return getPaths(artifactPath);
66
+ }
67
+ //# sourceMappingURL=appimage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appimage.js","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE;QACP,oBAAoB,EAAE,kEAAkE;KACzF;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;CACO,CAAA;AAEV,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAkC,EAAE,UAAgB,EAAE,YAAoB;IAC/G,MAAM,WAAW,GAAG,UAAU,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,KAAK,CAAC,CAA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AAe,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,eAAe,CAAC,EAAE;QACtF,aAAa,EAAE,6CAA6C;KAC7D,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,YAAY,CAAC,CAAA;AAC/B,CAAC","sourcesContent":["import { Arch } from \"builder-util\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\n\nexport const appimageChecksums = {\n \"0.0.0\": {\n \"appimage-12.0.1.7z\": \"d12ff7eb8f1d1ec4652ca5237a7fbdca33acc0c758045636feca62dc6ecb8ec4\",\n },\n \"1.0.2\": {\n \"appimage-tools-runtime-20251108.tar.gz\": \"a784a8c26331ec2e945c23d6bdb14af5c9df27f5939825d84b8709c61dc81eb0\",\n },\n \"1.0.3\": {\n \"appimage-tools-runtime-20251108.tar.gz\": \"84021a78ee214ae6fd33a2d62a92ba25542dd10bc86bf117a9b2d0bba44e7665\",\n },\n} as const\n\nexport async function getAppImageTools(toolset: ToolsetConfig[\"appimage\"], targetArch: Arch, resourcesDir: string) {\n const runtimeArch = targetArch === Arch.armv7l ? \"arm32\" : targetArch === Arch.arm64 ? \"arm64\" : targetArch === Arch.ia32 ? \"ia32\" : \"x64\"\n\n // Static-runtime layout: tools at root, runtimes/ subdir, lib/{arch}/ subdir\n const getPaths = (artifactPath: string) => ({\n mksquashfs: path.resolve(artifactPath, \"mksquashfs\"),\n desktopFileValidate: path.resolve(artifactPath, \"desktop-file-validate\"),\n runtime: path.resolve(artifactPath, \"runtimes\", `runtime-${runtimeArch}`),\n runtimeLibraries: path.resolve(artifactPath, \"lib\", runtimeArch),\n })\n\n // FUSE2 layout: tools under a host-platform subdir; runtime files at root with target-arch suffix\n const getFuse2Paths = (artifactPath: string) => {\n // mksquashfs/desktop-file-validate are HOST binaries — use process.arch, not targetArch\n const hostArch = process.arch === \"arm\" ? \"arm32\" : process.arch === \"arm64\" ? \"arm64\" : process.arch === \"ia32\" ? \"ia32\" : \"x64\"\n const toolRoot = process.platform === \"linux\" ? `linux-${hostArch}` : \"darwin\"\n // Runtime files live at root; armv7l target uses \"armv7l\" filename, not the internal \"arm32\" alias\n const runtimeSuffix = targetArch === Arch.armv7l ? \"armv7l\" : runtimeArch\n // FUSE2 tree only ships lib/ia32 and lib/x64; arm targets fall back to x64 here\n const libArch = targetArch === Arch.ia32 ? \"ia32\" : \"x64\"\n return {\n mksquashfs: path.resolve(artifactPath, toolRoot, \"mksquashfs\"),\n desktopFileValidate: path.resolve(artifactPath, toolRoot, \"desktop-file-validate\"),\n runtime: path.resolve(artifactPath, `runtime-${runtimeSuffix}`),\n runtimeLibraries: path.resolve(artifactPath, \"lib\", libArch),\n }\n }\n\n // null → modern default \"1.0.3\"\n const isFuse2 = (toolset ?? \"1.0.3\") === \"0.0.0\"\n\n if (isFuse2) {\n const filenameWithExt = \"appimage-12.0.1.7z\"\n const artifactPath = await downloadBuilderToolset({\n releaseName: \"appimage-12.0.1\",\n filenameWithExt,\n checksums: { [filenameWithExt]: appimageChecksums[\"0.0.0\"][filenameWithExt] },\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n return getFuse2Paths(artifactPath)\n }\n\n if (typeof toolset === \"object\" && toolset != null) {\n const vendorPath = await getCustomToolsetPath(toolset, resourcesDir)\n return getPaths(vendorPath)\n }\n\n const effectiveVersion = (toolset ?? \"1.0.3\") as \"1.0.2\" | \"1.0.3\"\n const filenameWithExt = \"appimage-tools-runtime-20251108.tar.gz\"\n const artifactPath = await downloadBuilderToolset({\n releaseName: `appimage@${effectiveVersion}`,\n filenameWithExt,\n checksums: { [filenameWithExt]: appimageChecksums[effectiveVersion][filenameWithExt] },\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n return getPaths(artifactPath)\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { ToolsetCustom } from "../configuration.js";
2
+ export declare function getCustomToolsetPath(custom: ToolsetCustom, resourcesDir: string): Promise<string>;
3
+ export declare function hashUrlSafe(input: string, length?: number): string;
4
+ export declare function extractArchive(file: string, dir: string): Promise<void>;
5
+ //# sourceMappingURL=custom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/toolsets/custom.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAsCnD,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkCvG;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAQ7D;AA8CD,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAmE7D"}
@@ -0,0 +1,200 @@
1
+ import { exec, exists, log, sanitizeDirPath, to7zaOutputSwitch, validateSecuredUrl } from "builder-util";
2
+ import { createReadStream, createWriteStream } from "fs";
3
+ import * as fs from "fs/promises";
4
+ import { mkdir, rmdir, stat } from "fs/promises";
5
+ import * as path from "path";
6
+ import * as lockfile from "proper-lockfile";
7
+ import { pipeline } from "stream/promises";
8
+ import * as tar from "tar";
9
+ import * as unzipper from "unzipper";
10
+ import { downloadBuilderToolset, getCacheDirectory } from "../util/electronGet.js";
11
+ import { getPath7za } from "./7zip.js";
12
+ async function validateCustomToolset(custom, resourcesDir) {
13
+ const url = custom.url.trim();
14
+ try {
15
+ const parsed = validateSecuredUrl(url);
16
+ if (parsed.pathname.endsWith("/")) {
17
+ throw new Error(`URL must point to a file, but got ${parsed.href}`);
18
+ }
19
+ return { toolset: custom, type: "url" };
20
+ }
21
+ catch {
22
+ // Ignore. If the URL is invalid, validate it as a file path
23
+ }
24
+ if (url.startsWith("file://")) {
25
+ const p = url.slice("file://".length);
26
+ const isWithinResources = path.normalize(p).startsWith(path.normalize(resourcesDir + path.sep));
27
+ const isValid = path.isAbsolute(p) || isWithinResources;
28
+ const type = isValid &&
29
+ (await exists(p)) &&
30
+ (await stat(p)
31
+ .then(s => (s.isDirectory() ? "directory" : s.isFile() ? "file" : false))
32
+ .catch(() => false));
33
+ if (type) {
34
+ return { toolset: custom, type };
35
+ }
36
+ }
37
+ throw new Error(`Invalid custom toolset: ${url}. Must be a valid https:// URL or a file:// path.`);
38
+ }
39
+ // Strip the file:// prefix and sanitize the path against resourcesDir (relative paths must be within it)
40
+ function resolveFilePath(url, resourcesDir) {
41
+ const p = url.startsWith("file://") ? url.slice("file://".length) : url;
42
+ return path.isAbsolute(p) ? sanitizeDirPath(p) : sanitizeDirPath(p, resourcesDir);
43
+ }
44
+ export async function getCustomToolsetPath(custom, resourcesDir) {
45
+ const { type, toolset } = await validateCustomToolset(custom, resourcesDir);
46
+ if (type !== "directory" && !toolset.checksum) {
47
+ throw new Error(`ToolsetCustom.checksum is required for ${type} toolsets (url: ${toolset.url})`);
48
+ }
49
+ const binaryVersion = toolset.version ?? toolset.checksum.substring(0, 8);
50
+ const releaseName = `${binaryVersion}-${hashUrlSafe(toolset.url)}`;
51
+ if (type === "url") {
52
+ return downloadBuilderToolset({
53
+ releaseName: releaseName,
54
+ filenameWithExt: path.basename(toolset.url),
55
+ checksums: { [path.basename(toolset.url)]: toolset.checksum },
56
+ overrideUrl: toolset.url,
57
+ });
58
+ }
59
+ else if (type === "file") {
60
+ const cacheDir = getCacheDirectory({ isAvoidSystemOnWindows: true, allowEnvVarOverride: true });
61
+ const customToolsetDir = path.join(cacheDir, "custom-toolsets");
62
+ await mkdir(customToolsetDir, { recursive: true });
63
+ // wipe first to ensure idempotent extraction if the source file changed since last extraction
64
+ const toolsetTarget = path.join(customToolsetDir, releaseName);
65
+ if (await exists(toolsetTarget)) {
66
+ await rmdir(toolsetTarget, { recursive: true });
67
+ }
68
+ await extractArchive(resolveFilePath(toolset.url, resourcesDir), toolsetTarget);
69
+ return toolsetTarget;
70
+ }
71
+ else if (type === "directory") {
72
+ return resolveFilePath(toolset.url, resourcesDir);
73
+ }
74
+ else {
75
+ throw new Error(`Unsupported custom toolset type: ${type}`);
76
+ }
77
+ }
78
+ export function hashUrlSafe(input, length = 6) {
79
+ let hash = 5381;
80
+ for (let i = 0; i < input.length; i++) {
81
+ hash = ((hash << 5) + hash) ^ input.charCodeAt(i);
82
+ }
83
+ hash >>>= 0;
84
+ const out = hash.toString(36);
85
+ return out.length >= length ? out.slice(0, length) : out.padStart(length, "0");
86
+ }
87
+ async function extractZipStreaming(file, dir) {
88
+ // Pass 1: read central directory once to collect Unix modes (one seek to EOF)
89
+ const zipDir = await unzipper.Open.file(file);
90
+ const entryModes = new Map();
91
+ for (const entry of zipDir.files) {
92
+ const mode = (entry.externalFileAttributes >> 16) & 0xffff;
93
+ if (mode > 0) {
94
+ entryModes.set(entry.path, mode);
95
+ }
96
+ }
97
+ const isSymlink = (mode) => (mode & 0o170000) === 0o120000;
98
+ // Pass 2: stream from byte 0 — no per-entry seeks, no Docker hang
99
+ const entries = createReadStream(file).pipe(unzipper.Parse({ forceStream: true }));
100
+ for await (const entry of entries) {
101
+ const destPath = path.resolve(dir, entry.path);
102
+ if (!destPath.startsWith(dir + path.sep) && destPath !== dir) {
103
+ throw new Error(`Path traversal blocked: ${entry.path}`);
104
+ }
105
+ const mode = entryModes.get(entry.path) ?? 0;
106
+ if (mode > 0 && isSymlink(mode)) {
107
+ const target = (await entry.buffer()).toString();
108
+ if (path.isAbsolute(target)) {
109
+ throw new Error(`Absolute symlink target blocked: ${target}`);
110
+ }
111
+ const resolvedTarget = path.resolve(path.dirname(destPath), target);
112
+ if (!resolvedTarget.startsWith(dir + path.sep) && resolvedTarget !== dir) {
113
+ throw new Error(`Symlink target escapes extraction dir: ${target}`);
114
+ }
115
+ await fs.mkdir(path.dirname(destPath), { recursive: true });
116
+ await fs.symlink(target, destPath);
117
+ }
118
+ else if (entry.type === "Directory") {
119
+ await fs.mkdir(destPath, { recursive: true });
120
+ entry.autodrain();
121
+ }
122
+ else {
123
+ await fs.mkdir(path.dirname(destPath), { recursive: true });
124
+ await pipeline(entry, createWriteStream(destPath));
125
+ if (mode > 0) {
126
+ await fs.chmod(destPath, mode & 0o7777);
127
+ }
128
+ }
129
+ }
130
+ }
131
+ export async function extractArchive(file, dir) {
132
+ const tmpDir = `${dir}.tmp`;
133
+ await fs.mkdir(tmpDir, { recursive: true });
134
+ const release = await lockfile.lock(tmpDir, {
135
+ retries: { retries: 100, minTimeout: 1000, maxTimeout: 5000 },
136
+ stale: 120000,
137
+ });
138
+ try {
139
+ await fs.rm(tmpDir, { recursive: true, force: true });
140
+ await fs.mkdir(tmpDir, { recursive: true });
141
+ // Guard against transient window in @electron/get's non-atomic putFileInCache (remove → move).
142
+ for (let i = 0; !(await exists(file)); i++) {
143
+ if (i >= 4) {
144
+ throw Object.assign(new Error(`Source archive not found after retries: ${file}`), { code: "ENOENT", path: file });
145
+ }
146
+ log.warn({ file, attempt: i + 1 }, "source archive transiently missing, retrying");
147
+ await new Promise(r => setTimeout(r, 300 * (i + 1)));
148
+ }
149
+ if (file.endsWith(".tar.gz") || file.endsWith(".tgz")) {
150
+ await tar.extract({ file, cwd: tmpDir, strip: 1 });
151
+ }
152
+ else if (file.endsWith(".tar.xz") || file.endsWith(".txz")) {
153
+ const cmd7za = await getPath7za();
154
+ const xzOutDir = `${tmpDir}.xz`;
155
+ await fs.rm(xzOutDir, { recursive: true, force: true });
156
+ await fs.mkdir(xzOutDir, { recursive: true });
157
+ try {
158
+ await exec(cmd7za, ["x", "-bd", file, to7zaOutputSwitch(sanitizeDirPath(xzOutDir)), "-y"]);
159
+ const innerTar = (await fs.readdir(xzOutDir)).find(f => f.endsWith(".tar"));
160
+ if (innerTar == null) {
161
+ throw new Error(`xz decompression of ${path.basename(file)} produced no .tar archive`);
162
+ }
163
+ await tar.extract({ file: path.join(xzOutDir, innerTar), cwd: tmpDir, strip: 1 });
164
+ }
165
+ finally {
166
+ await fs.rm(xzOutDir, { recursive: true, force: true });
167
+ }
168
+ }
169
+ else if (file.endsWith(".zip")) {
170
+ await extractZipStreaming(file, tmpDir);
171
+ }
172
+ else if (file.endsWith(".7z")) {
173
+ const cmd7za = await getPath7za();
174
+ try {
175
+ await exec(cmd7za, ["x", "-bd", file, to7zaOutputSwitch(sanitizeDirPath(tmpDir)), "-y"]);
176
+ }
177
+ catch (e) {
178
+ const files = await fs.readdir(tmpDir);
179
+ if (files.length === 0) {
180
+ log.warn({ file, tmpDir, error: e.message }, "7z extraction produced no output");
181
+ throw new Error(`7z extraction failed for ${file}: ${e.message}`);
182
+ }
183
+ log.warn({ error: e.message, filesExtracted: files.length }, "7z reported error but extracted files");
184
+ }
185
+ }
186
+ else {
187
+ throw new Error(`Unsupported archive format: ${path.basename(file)}`);
188
+ }
189
+ const extractedFiles = await fs.readdir(tmpDir);
190
+ if (extractedFiles.length === 0) {
191
+ throw new Error(`Extraction of ${path.basename(file)} produced no files`);
192
+ }
193
+ await fs.rm(dir, { recursive: true, force: true });
194
+ await fs.rename(tmpDir, dir);
195
+ }
196
+ finally {
197
+ await release().catch(err => log.warn({ err }, "failed to release lockfile"));
198
+ }
199
+ }
200
+ //# sourceMappingURL=custom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/toolsets/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACxG,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC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AAE,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAClD,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,4BAA4B,CAAC,CAAC,CAAA;IAC/E,CAAC;AACH,CAAC","sourcesContent":["import { exec, exists, log, sanitizeDirPath, to7zaOutputSwitch, validateSecuredUrl } from \"builder-util\"\nimport { createReadStream, createWriteStream } from \"fs\"\nimport * as fs from \"fs/promises\"\nimport { mkdir, rmdir, stat } from \"fs/promises\"\nimport * as path from \"path\"\nimport * as lockfile from \"proper-lockfile\"\nimport { pipeline } from \"stream/promises\"\nimport * as tar from \"tar\"\nimport * as unzipper from \"unzipper\"\nimport { ToolsetCustom } from \"../configuration.js\"\nimport { downloadBuilderToolset, getCacheDirectory } from \"../util/electronGet.js\"\nimport { getPath7za } from \"./7zip.js\"\n\nasync function validateCustomToolset(custom: ToolsetCustom, resourcesDir: string) {\n const url = custom.url.trim()\n try {\n const parsed = validateSecuredUrl(url)\n if (parsed.pathname.endsWith(\"/\")) {\n throw new Error(`URL must point to a file, but got ${parsed.href}`)\n }\n return { toolset: custom, type: \"url\" }\n } catch {\n // Ignore. If the URL is invalid, validate it as a file path\n }\n if (url.startsWith(\"file://\")) {\n const p = url.slice(\"file://\".length)\n const isWithinResources = path.normalize(p).startsWith(path.normalize(resourcesDir + path.sep))\n const isValid = path.isAbsolute(p) || isWithinResources\n const type =\n isValid &&\n (await exists(p)) &&\n (await stat(p)\n .then(s => (s.isDirectory() ? \"directory\" : s.isFile() ? \"file\" : false))\n .catch(() => false))\n if (type) {\n return { toolset: custom, type }\n }\n }\n throw new Error(`Invalid custom toolset: ${url}. Must be a valid https:// URL or a file:// path.`)\n}\n\n// Strip the file:// prefix and sanitize the path against resourcesDir (relative paths must be within it)\nfunction resolveFilePath(url: string, resourcesDir: string): string {\n const p = url.startsWith(\"file://\") ? url.slice(\"file://\".length) : url\n return path.isAbsolute(p) ? sanitizeDirPath(p) : sanitizeDirPath(p, resourcesDir)\n}\n\nexport async function getCustomToolsetPath(custom: ToolsetCustom, resourcesDir: string): Promise<string> {\n const { type, toolset } = await validateCustomToolset(custom, resourcesDir)\n\n if (type !== \"directory\" && !toolset.checksum) {\n throw new Error(`ToolsetCustom.checksum is required for ${type} toolsets (url: ${toolset.url})`)\n }\n\n const binaryVersion = toolset.version ?? toolset.checksum!.substring(0, 8)\n const releaseName = `${binaryVersion}-${hashUrlSafe(toolset.url)}`\n\n if (type === \"url\") {\n return downloadBuilderToolset({\n releaseName: releaseName,\n filenameWithExt: path.basename(toolset.url),\n checksums: { [path.basename(toolset.url)]: toolset.checksum! },\n overrideUrl: toolset.url,\n })\n } else if (type === \"file\") {\n const cacheDir = getCacheDirectory({ isAvoidSystemOnWindows: true, allowEnvVarOverride: true })\n const customToolsetDir = path.join(cacheDir, \"custom-toolsets\")\n await mkdir(customToolsetDir, { recursive: true })\n\n // wipe first to ensure idempotent extraction if the source file changed since last extraction\n const toolsetTarget = path.join(customToolsetDir, releaseName)\n if (await exists(toolsetTarget)) {\n await rmdir(toolsetTarget, { recursive: true })\n }\n await extractArchive(resolveFilePath(toolset.url, resourcesDir), toolsetTarget)\n return toolsetTarget\n } else if (type === \"directory\") {\n return resolveFilePath(toolset.url, resourcesDir)\n } else {\n throw new Error(`Unsupported custom toolset type: ${type}`)\n }\n}\n\nexport function hashUrlSafe(input: string, length = 6): string {\n let hash = 5381\n for (let i = 0; i < input.length; i++) {\n hash = ((hash << 5) + hash) ^ input.charCodeAt(i)\n }\n hash >>>= 0\n const out = hash.toString(36)\n return out.length >= length ? out.slice(0, length) : out.padStart(length, \"0\")\n}\n\nasync function extractZipStreaming(file: string, dir: string): Promise<void> {\n // Pass 1: read central directory once to collect Unix modes (one seek to EOF)\n const zipDir = await unzipper.Open.file(file)\n const entryModes = new Map<string, number>()\n for (const entry of zipDir.files) {\n const mode = (entry.externalFileAttributes >> 16) & 0xffff\n if (mode > 0) {\n entryModes.set(entry.path, mode)\n }\n }\n const isSymlink = (mode: number) => (mode & 0o170000) === 0o120000\n\n // Pass 2: stream from byte 0 — no per-entry seeks, no Docker hang\n const entries = createReadStream(file).pipe(unzipper.Parse({ forceStream: true }))\n for await (const entry of entries as AsyncIterable<unzipper.Entry>) {\n const destPath = path.resolve(dir, entry.path)\n if (!destPath.startsWith(dir + path.sep) && destPath !== dir) {\n throw new Error(`Path traversal blocked: ${entry.path}`)\n }\n const mode = entryModes.get(entry.path) ?? 0\n if (mode > 0 && isSymlink(mode)) {\n const target = (await entry.buffer()).toString()\n if (path.isAbsolute(target)) {\n throw new Error(`Absolute symlink target blocked: ${target}`)\n }\n const resolvedTarget = path.resolve(path.dirname(destPath), target)\n if (!resolvedTarget.startsWith(dir + path.sep) && resolvedTarget !== dir) {\n throw new Error(`Symlink target escapes extraction dir: ${target}`)\n }\n await fs.mkdir(path.dirname(destPath), { recursive: true })\n await fs.symlink(target, destPath)\n } else if (entry.type === \"Directory\") {\n await fs.mkdir(destPath, { recursive: true })\n entry.autodrain()\n } else {\n await fs.mkdir(path.dirname(destPath), { recursive: true })\n await pipeline(entry, createWriteStream(destPath))\n if (mode > 0) {\n await fs.chmod(destPath, mode & 0o7777)\n }\n }\n }\n}\n\nexport async function extractArchive(file: string, dir: string) {\n const tmpDir = `${dir}.tmp`\n await fs.mkdir(tmpDir, { recursive: true })\n\n const release = await lockfile.lock(tmpDir, {\n retries: { retries: 100, minTimeout: 1000, maxTimeout: 5000 },\n stale: 120000,\n })\n\n try {\n await fs.rm(tmpDir, { recursive: true, force: true })\n await fs.mkdir(tmpDir, { recursive: true })\n\n // Guard against transient window in @electron/get's non-atomic putFileInCache (remove → move).\n for (let i = 0; !(await exists(file)); i++) {\n if (i >= 4) {\n throw Object.assign(new Error(`Source archive not found after retries: ${file}`), { code: \"ENOENT\", path: file })\n }\n log.warn({ file, attempt: i + 1 }, \"source archive transiently missing, retrying\")\n await new Promise(r => setTimeout(r, 300 * (i + 1)))\n }\n\n if (file.endsWith(\".tar.gz\") || file.endsWith(\".tgz\")) {\n await tar.extract({ file, cwd: tmpDir, strip: 1 })\n } else if (file.endsWith(\".tar.xz\") || file.endsWith(\".txz\")) {\n const cmd7za = await getPath7za()\n const xzOutDir = `${tmpDir}.xz`\n await fs.rm(xzOutDir, { recursive: true, force: true })\n await fs.mkdir(xzOutDir, { recursive: true })\n try {\n await exec(cmd7za, [\"x\", \"-bd\", file, to7zaOutputSwitch(sanitizeDirPath(xzOutDir)), \"-y\"])\n const innerTar = (await fs.readdir(xzOutDir)).find(f => f.endsWith(\".tar\"))\n if (innerTar == null) {\n throw new Error(`xz decompression of ${path.basename(file)} produced no .tar archive`)\n }\n await tar.extract({ file: path.join(xzOutDir, innerTar), cwd: tmpDir, strip: 1 })\n } finally {\n await fs.rm(xzOutDir, { recursive: true, force: true })\n }\n } else if (file.endsWith(\".zip\")) {\n await extractZipStreaming(file, tmpDir)\n } else if (file.endsWith(\".7z\")) {\n const cmd7za = await getPath7za()\n try {\n await exec(cmd7za, [\"x\", \"-bd\", file, to7zaOutputSwitch(sanitizeDirPath(tmpDir)), \"-y\"])\n } catch (e: any) {\n const files = await fs.readdir(tmpDir)\n if (files.length === 0) {\n log.warn({ file, tmpDir, error: e.message }, \"7z extraction produced no output\")\n throw new Error(`7z extraction failed for ${file}: ${e.message}`)\n }\n log.warn({ error: e.message, filesExtracted: files.length }, \"7z reported error but extracted files\")\n }\n } else {\n throw new Error(`Unsupported archive format: ${path.basename(file)}`)\n }\n\n const extractedFiles = await fs.readdir(tmpDir)\n if (extractedFiles.length === 0) {\n throw new Error(`Extraction of ${path.basename(file)} produced no files`)\n }\n\n await fs.rm(dir, { recursive: true, force: true })\n await fs.rename(tmpDir, dir)\n } finally {\n await release().catch(err => log.warn({ err }, \"failed to release lockfile\"))\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { ToolsetConfig } from "../configuration.js";
2
+ export declare function getFpmPath(toolset: ToolsetConfig["fpm"], resourcesDir: string): Promise<string>;
3
+ //# sourceMappingURL=fpm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fpm.d.ts","sourceRoot":"","sources":["../../src/toolsets/fpm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAenD,wBAAsB,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,MAAM,mBAoCnF"}