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
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.computeEnv = computeEnv;
4
- exports.computeToolEnv = computeToolEnv;
5
- const builder_util_1 = require("builder-util");
6
- function computeEnv(oldValue, newValues) {
7
- const parsedOldValue = oldValue ? oldValue.split(":") : [];
8
- return newValues
9
- .concat(parsedOldValue)
10
- .filter(it => it.length > 0)
11
- .join(":");
12
- }
13
- function computeToolEnv(libPath) {
14
- // noinspection SpellCheckingInspection
15
- return {
16
- ...(0, builder_util_1.stripSensitiveEnvVars)(process.env),
17
- DYLD_LIBRARY_PATH: computeEnv(process.env.DYLD_LIBRARY_PATH, libPath),
18
- };
19
- }
20
- //# sourceMappingURL=bundledTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundledTool.js","sourceRoot":"","sources":["../../src/util/bundledTool.ts"],"names":[],"mappings":";;AAQA,gCAMC;AAED,wCAMC;AAtBD,+CAAoD;AAQpD,SAAgB,UAAU,CAAC,QAA0B,EAAE,SAAwB;IAC7E,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1D,OAAO,SAAS;SACb,MAAM,CAAC,cAAc,CAAC;SACtB,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;SAC3B,IAAI,CAAC,GAAG,CAAC,CAAA;AACd,CAAC;AAED,SAAgB,cAAc,CAAC,OAAsB;IACnD,uCAAuC;IACvC,OAAO;QACL,GAAG,IAAA,oCAAqB,EAAC,OAAO,CAAC,GAAG,CAAC;QACrC,iBAAiB,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACtE,CAAA;AACH,CAAC","sourcesContent":["import { stripSensitiveEnvVars } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\n\nexport interface ToolInfo {\n path: string\n env?: any\n}\n\nexport function computeEnv(oldValue: string | Nullish, newValues: Array<string>): string {\n const parsedOldValue = oldValue ? oldValue.split(\":\") : []\n return newValues\n .concat(parsedOldValue)\n .filter(it => it.length > 0)\n .join(\":\")\n}\n\nexport function computeToolEnv(libPath: Array<string>): any {\n // noinspection SpellCheckingInspection\n return {\n ...stripSensitiveEnvVars(process.env),\n DYLD_LIBRARY_PATH: computeEnv(process.env.DYLD_LIBRARY_PATH, libPath),\n }\n}\n"]}
@@ -1,18 +0,0 @@
1
- import { Arch } from "builder-util";
2
- import { Hash } from "crypto";
3
- export interface BuildCacheInfo {
4
- executableDigest: string;
5
- }
6
- export declare class BuildCacheManager {
7
- private readonly executableFile;
8
- static VERSION: string;
9
- readonly cacheDir: string;
10
- readonly cacheInfoFile: string;
11
- readonly cacheFile: string;
12
- cacheInfo: BuildCacheInfo | null;
13
- private newDigest;
14
- constructor(outDir: string, executableFile: string, arch: Arch);
15
- copyIfValid(digest: string): Promise<boolean>;
16
- save(): Promise<void>;
17
- }
18
- export declare function digest(hash: Hash, files: Array<string>): Promise<string>;
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuildCacheManager = void 0;
4
- exports.digest = digest;
5
- const builder_util_1 = require("builder-util");
6
- const fs_extra_1 = require("fs-extra");
7
- const promises_1 = require("fs/promises");
8
- const path = require("path");
9
- class BuildCacheManager {
10
- constructor(outDir, executableFile, arch) {
11
- this.executableFile = executableFile;
12
- this.cacheInfo = null;
13
- this.newDigest = null;
14
- this.cacheDir = path.join(outDir, ".cache", builder_util_1.Arch[arch]);
15
- this.cacheFile = path.join(this.cacheDir, "app.exe");
16
- this.cacheInfoFile = path.join(this.cacheDir, "info.json");
17
- }
18
- async copyIfValid(digest) {
19
- this.newDigest = digest;
20
- this.cacheInfo = await (0, builder_util_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(this.cacheInfoFile));
21
- const oldDigest = this.cacheInfo == null ? null : this.cacheInfo.executableDigest;
22
- if (oldDigest !== digest) {
23
- builder_util_1.log.debug({ oldDigest, newDigest: digest }, "no valid cached executable found");
24
- return false;
25
- }
26
- builder_util_1.log.debug({ cacheFile: this.cacheFile, file: this.executableFile }, `copying cached executable`);
27
- try {
28
- await (0, builder_util_1.copyFile)(this.cacheFile, this.executableFile, false);
29
- return true;
30
- }
31
- catch (e) {
32
- if (e.code === "ENOENT" || e.code === "ENOTDIR") {
33
- builder_util_1.log.debug({ error: e.code }, "copy cached executable failed");
34
- }
35
- else {
36
- builder_util_1.log.warn({ error: e.stack || e }, `cannot copy cached executable`);
37
- }
38
- }
39
- return false;
40
- }
41
- async save() {
42
- if (this.newDigest == null) {
43
- throw new Error("call copyIfValid before");
44
- }
45
- if (this.cacheInfo == null) {
46
- this.cacheInfo = { executableDigest: this.newDigest };
47
- }
48
- else {
49
- this.cacheInfo.executableDigest = this.newDigest;
50
- }
51
- try {
52
- await (0, promises_1.mkdir)(this.cacheDir, { recursive: true });
53
- await Promise.all([(0, fs_extra_1.writeJson)(this.cacheInfoFile, this.cacheInfo), (0, builder_util_1.copyFile)(this.executableFile, this.cacheFile, false)]);
54
- }
55
- catch (e) {
56
- builder_util_1.log.warn({ error: e.stack || e }, `cannot save build cache`);
57
- }
58
- }
59
- }
60
- exports.BuildCacheManager = BuildCacheManager;
61
- BuildCacheManager.VERSION = "0";
62
- async function digest(hash, files) {
63
- // do not use pipe - better do bulk file read (https://github.com/yarnpkg/yarn/commit/7a63e0d23c46a4564bc06645caf8a59690f04d01)
64
- for (const content of await Promise.all(files.map(it => (0, promises_1.readFile)(it)))) {
65
- hash.update(content);
66
- }
67
- hash.update(BuildCacheManager.VERSION);
68
- return hash.digest("base64");
69
- }
70
- //# sourceMappingURL=cacheManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cacheManager.js","sourceRoot":"","sources":["../../src/util/cacheManager.ts"],"names":[],"mappings":";;;AA2EA,wBAQC;AAnFD,+CAAwE;AAExE,uCAA8C;AAC9C,0CAA6C;AAC7C,6BAA4B;AAM5B,MAAa,iBAAiB;IAW5B,YACE,MAAc,EACG,cAAsB,EACvC,IAAU;QADO,mBAAc,GAAd,cAAc,CAAQ;QANzC,cAAS,GAA0B,IAAI,CAAA;QAE/B,cAAS,GAAkB,IAAI,CAAA;QAOrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,mBAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;QACpD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAc;QAC9B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAA;QAEvB,IAAI,CAAC,SAAS,GAAG,MAAM,IAAA,mCAAoB,EAAC,IAAA,mBAAQ,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;QACzE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son } from \"fs-extra\"\nimport { mkdir, readFile } from \"fs/promises\"\nimport * as path from \"path\"\n\nexport interface BuildCacheInfo {\n executableDigest: string\n}\n\nexport class BuildCacheManager {\n static VERSION = \"0\"\n\n readonly cacheDir: string\n readonly cacheInfoFile: string\n readonly cacheFile: string\n\n cacheInfo: BuildCacheInfo | null = null\n\n private newDigest: string | null = null\n\n constructor(\n outDir: string,\n private readonly executableFile: string,\n arch: Arch\n ) {\n this.cacheDir = path.join(outDir, \".cache\", Arch[arch])\n this.cacheFile = path.join(this.cacheDir, \"app.exe\")\n this.cacheInfoFile = path.join(this.cacheDir, \"info.json\")\n }\n\n async copyIfValid(digest: string): Promise<boolean> {\n this.newDigest = digest\n\n this.cacheInfo = await orNullIfFileNotExist(readJson(this.cacheInfoFile))\n const oldDigest = this.cacheInfo == null ? null : this.cacheInfo.executableDigest\n if (oldDigest !== digest) {\n log.debug({ oldDigest, newDigest: digest }, \"no valid cached executable found\")\n return false\n }\n\n log.debug({ cacheFile: this.cacheFile, file: this.executableFile }, `copying cached executable`)\n try {\n await copyFile(this.cacheFile, this.executableFile, false)\n return true\n } catch (e: any) {\n if (e.code === \"ENOENT\" || e.code === \"ENOTDIR\") {\n log.debug({ error: e.code }, \"copy cached executable failed\")\n } else {\n log.warn({ error: e.stack || e }, `cannot copy cached executable`)\n }\n }\n return false\n }\n\n async save() {\n if (this.newDigest == null) {\n throw new Error(\"call copyIfValid before\")\n }\n\n if (this.cacheInfo == null) {\n this.cacheInfo = { executableDigest: this.newDigest }\n } else {\n this.cacheInfo.executableDigest = this.newDigest\n }\n\n try {\n await mkdir(this.cacheDir, { recursive: true })\n await Promise.all([writeJson(this.cacheInfoFile, this.cacheInfo), copyFile(this.executableFile, this.cacheFile, false)])\n } catch (e: any) {\n log.warn({ error: e.stack || e }, `cannot save build cache`)\n }\n }\n}\n\nexport async function digest(hash: Hash, files: Array<string>) {\n // do not use pipe - better do bulk file read (https://github.com/yarnpkg/yarn/commit/7a63e0d23c46a4564bc06645caf8a59690f04d01)\n for (const content of await Promise.all(files.map(it => readFile(it)))) {\n hash.update(content)\n }\n\n hash.update(BuildCacheManager.VERSION)\n return hash.digest(\"base64\")\n}\n"]}
@@ -1,28 +0,0 @@
1
- export declare enum CacheState {
2
- pending = "pending",
3
- downloaded = "downloaded",
4
- extracting = "extracting",
5
- extracted = "extracted",
6
- complete = "complete",
7
- corrupted = "corrupted"
8
- }
9
- export interface CacheStateFile {
10
- version: number;
11
- state: CacheState;
12
- timestamp: number;
13
- fileCount: number;
14
- extractedSize: number;
15
- }
16
- export declare function readCacheStateFile(extractDir: string): Promise<CacheStateFile | null>;
17
- export declare function writeCacheState(extractDir: string, state: CacheState, metadata?: {
18
- fileCount?: number;
19
- extractedSize?: number;
20
- }, throwOnError?: boolean): Promise<void>;
21
- export declare function computeCacheMetadata(dir: string): Promise<{
22
- fileCount: number;
23
- extractedSize: number;
24
- }>;
25
- export declare function validateCacheDirectory(extractDir: string, expectedFileCount?: number): Promise<boolean>;
26
- export declare function cleanupCacheDirectory(extractDir: string, { skipLockFiles }?: {
27
- skipLockFiles?: boolean | undefined;
28
- }): Promise<void>;
@@ -1,143 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CacheState = void 0;
4
- exports.readCacheStateFile = readCacheStateFile;
5
- exports.writeCacheState = writeCacheState;
6
- exports.computeCacheMetadata = computeCacheMetadata;
7
- exports.validateCacheDirectory = validateCacheDirectory;
8
- exports.cleanupCacheDirectory = cleanupCacheDirectory;
9
- const builder_util_1 = require("builder-util");
10
- const fs = require("fs/promises");
11
- const path = require("path");
12
- var CacheState;
13
- (function (CacheState) {
14
- CacheState["pending"] = "pending";
15
- CacheState["downloaded"] = "downloaded";
16
- CacheState["extracting"] = "extracting";
17
- CacheState["extracted"] = "extracted";
18
- CacheState["complete"] = "complete";
19
- CacheState["corrupted"] = "corrupted";
20
- })(CacheState || (exports.CacheState = CacheState = {}));
21
- const STATE_FILE_VERSION = 1;
22
- const STALE_EXTRACTING_TIMEOUT_MS = 120000; // 120 seconds
23
- function getStateFilePath(extractDir) {
24
- return `${extractDir}.state`;
25
- }
26
- async function readCacheStateFile(extractDir) {
27
- const stateFile = getStateFilePath(extractDir);
28
- let content;
29
- try {
30
- content = await fs.readFile(stateFile, "utf-8");
31
- }
32
- catch (e) {
33
- if (e.code !== "ENOENT") {
34
- builder_util_1.log.warn({ stateFile, error: e.message }, "Failed to read cache state file");
35
- }
36
- return null;
37
- }
38
- try {
39
- const data = JSON.parse(content);
40
- if (data.version !== STATE_FILE_VERSION) {
41
- builder_util_1.log.warn({ stateFile, version: data.version, expected: STATE_FILE_VERSION }, "Cache state file version mismatch, ignoring");
42
- return null;
43
- }
44
- if (data.state === CacheState.extracting) {
45
- const age = Date.now() - data.timestamp;
46
- if (age > STALE_EXTRACTING_TIMEOUT_MS) {
47
- builder_util_1.log.warn({ stateFile, age }, "Detected stale extracting state, marking as corrupted");
48
- return { ...data, state: CacheState.corrupted };
49
- }
50
- }
51
- return data;
52
- }
53
- catch (e) {
54
- builder_util_1.log.warn({ stateFile, error: e.message }, "Failed to parse cache state file");
55
- return null;
56
- }
57
- }
58
- async function writeCacheState(extractDir, state, metadata, throwOnError = false) {
59
- var _a, _b;
60
- const stateFile = getStateFilePath(extractDir);
61
- const stateData = {
62
- version: STATE_FILE_VERSION,
63
- state,
64
- timestamp: Date.now(),
65
- fileCount: (_a = metadata === null || metadata === void 0 ? void 0 : metadata.fileCount) !== null && _a !== void 0 ? _a : 0,
66
- extractedSize: (_b = metadata === null || metadata === void 0 ? void 0 : metadata.extractedSize) !== null && _b !== void 0 ? _b : 0,
67
- };
68
- try {
69
- await fs.writeFile(stateFile, JSON.stringify(stateData, null, 2), "utf-8");
70
- }
71
- catch (e) {
72
- builder_util_1.log.warn({ stateFile, error: e.message }, "Failed to write cache state file");
73
- if (throwOnError) {
74
- throw e;
75
- }
76
- }
77
- }
78
- async function computeCacheMetadata(dir) {
79
- let fileCount = 0;
80
- let extractedSize = 0;
81
- const stack = [dir];
82
- while (stack.length > 0) {
83
- const current = stack.pop();
84
- let entries;
85
- try {
86
- entries = await fs.readdir(current, { withFileTypes: true });
87
- }
88
- catch {
89
- continue;
90
- }
91
- for (const entry of entries) {
92
- const fullPath = path.join(current, entry.name);
93
- if (entry.isDirectory()) {
94
- stack.push(fullPath);
95
- }
96
- else {
97
- fileCount++;
98
- if (entry.isFile()) {
99
- try {
100
- const stat = await fs.stat(fullPath);
101
- extractedSize += stat.size;
102
- }
103
- catch {
104
- // ignore stat errors for individual files
105
- }
106
- }
107
- }
108
- }
109
- }
110
- return { fileCount, extractedSize };
111
- }
112
- async function validateCacheDirectory(extractDir, expectedFileCount) {
113
- try {
114
- const topLevel = await fs.readdir(extractDir);
115
- if (topLevel.length === 0) {
116
- return false;
117
- }
118
- if (expectedFileCount != null && expectedFileCount > 0) {
119
- const { fileCount: actual } = await computeCacheMetadata(extractDir);
120
- if (actual < expectedFileCount) {
121
- builder_util_1.log.warn({ extractDir, expected: expectedFileCount, actual }, "Cache file count mismatch (fewer files than expected), treating as invalid");
122
- return false;
123
- }
124
- }
125
- return true;
126
- }
127
- catch (e) {
128
- builder_util_1.log.warn({ extractDir, error: e.message }, "Failed to validate cache directory");
129
- return false;
130
- }
131
- }
132
- async function cleanupCacheDirectory(extractDir, { skipLockFiles = false } = {}) {
133
- const filesToClean = [extractDir, `${extractDir}.state`, `${extractDir}.tmp`, ...(!skipLockFiles ? [`${extractDir}.lock`, `${extractDir}.tmp.lock`] : [])];
134
- for (const file of filesToClean) {
135
- try {
136
- await fs.rm(file, { recursive: true, force: true });
137
- }
138
- catch (e) {
139
- builder_util_1.log.warn({ file, error: e.message }, "Failed to clean up cache file");
140
- }
141
- }
142
- }
143
- //# sourceMappingURL=cacheState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cacheState.js","sourceRoot":"","sources":["../../src/util/cacheState.ts"],"names":[],"mappings":";;;AA4BA,gDA6BC;AAED,0CAkBC;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A;IAE1J,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QACrD,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,+BAA+B,CAAC,CAAA;QACvE,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import { log } from \"builder-util\"\nimport * as fs from \"fs/promises\"\nimport * as path from \"path\"\n\nexport enum CacheState {\n pending = \"pending\",\n downloaded = \"downloaded\",\n extracting = \"extracting\",\n extracted = \"extracted\",\n complete = \"complete\",\n corrupted = \"corrupted\",\n}\n\nexport interface CacheStateFile {\n version: number\n state: CacheState\n timestamp: number\n fileCount: number\n extractedSize: number\n}\n\nconst STATE_FILE_VERSION = 1\nconst STALE_EXTRACTING_TIMEOUT_MS = 120000 // 120 seconds\n\nfunction getStateFilePath(extractDir: string): string {\n return `${extractDir}.state`\n}\n\nexport async function readCacheStateFile(extractDir: string): Promise<CacheStateFile | null> {\n const stateFile = getStateFilePath(extractDir)\n let content: string\n try {\n content = await fs.readFile(stateFile, \"utf-8\")\n } catch (e: any) {\n if (e.code !== \"ENOENT\") {\n log.warn({ stateFile, error: e.message }, \"Failed to read cache state file\")\n }\n return null\n }\n try {\n const data: CacheStateFile = JSON.parse(content)\n if (data.version !== STATE_FILE_VERSION) {\n log.warn({ stateFile, version: data.version, expected: STATE_FILE_VERSION }, \"Cache state file version mismatch, ignoring\")\n return null\n }\n if (data.state === CacheState.extracting) {\n const age = Date.now() - data.timestamp\n if (age > STALE_EXTRACTING_TIMEOUT_MS) {\n log.warn({ stateFile, age }, \"Detected stale extracting state, marking as corrupted\")\n return { ...data, state: CacheState.corrupted }\n }\n }\n return data\n } catch (e: any) {\n log.warn({ stateFile, error: e.message }, \"Failed to parse cache state file\")\n return null\n }\n}\n\nexport async function writeCacheState(extractDir: string, state: CacheState, metadata?: { fileCount?: number; extractedSize?: number }, throwOnError = false): Promise<void> {\n const stateFile = getStateFilePath(extractDir)\n const stateData: CacheStateFile = {\n version: STATE_FILE_VERSION,\n state,\n timestamp: Date.now(),\n fileCount: metadata?.fileCount ?? 0,\n extractedSize: metadata?.extractedSize ?? 0,\n }\n\n try {\n await fs.writeFile(stateFile, JSON.stringify(stateData, null, 2), \"utf-8\")\n } catch (e: any) {\n log.warn({ stateFile, error: e.message }, \"Failed to write cache state file\")\n if (throwOnError) {\n throw e\n }\n }\n}\n\nexport async function computeCacheMetadata(dir: string): Promise<{ fileCount: number; extractedSize: number }> {\n let fileCount = 0\n let extractedSize = 0\n const stack: string[] = [dir]\n while (stack.length > 0) {\n const current = stack.pop()!\n let entries\n try {\n entries = await fs.readdir(current, { withFileTypes: true })\n } catch {\n continue\n }\n for (const entry of entries) {\n const fullPath = path.join(current, entry.name)\n if (entry.isDirectory()) {\n stack.push(fullPath)\n } else {\n fileCount++\n if (entry.isFile()) {\n try {\n const stat = await fs.stat(fullPath)\n extractedSize += stat.size\n } catch {\n // ignore stat errors for individual files\n }\n }\n }\n }\n }\n return { fileCount, extractedSize }\n}\n\nexport async function validateCacheDirectory(extractDir: string, expectedFileCount?: number): Promise<boolean> {\n try {\n const topLevel = await fs.readdir(extractDir)\n if (topLevel.length === 0) {\n return false\n }\n\n if (expectedFileCount != null && expectedFileCount > 0) {\n const { fileCount: actual } = await computeCacheMetadata(extractDir)\n if (actual < expectedFileCount) {\n log.warn({ extractDir, expected: expectedFileCount, actual }, \"Cache file count mismatch (fewer files than expected), treating as invalid\")\n return false\n }\n }\n\n return true\n } catch (e: any) {\n log.warn({ extractDir, error: e.message }, \"Failed to validate cache directory\")\n return false\n }\n}\n\nexport async function cleanupCacheDirectory(extractDir: string, { skipLockFiles = false } = {}): Promise<void> {\n const filesToClean = [extractDir, `${extractDir}.state`, `${extractDir}.tmp`, ...(!skipLockFiles ? [`${extractDir}.lock`, `${extractDir}.tmp.lock`] : [])]\n\n for (const file of filesToClean) {\n try {\n await fs.rm(file, { recursive: true, force: true })\n } catch (e: any) {\n log.warn({ file, error: e.message }, \"Failed to clean up cache file\")\n }\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { DebugLogger } from "builder-util";
2
- import { Nullish } from "builder-util-runtime";
3
- import { Lazy } from "lazy-val";
4
- import { Configuration } from "../../configuration";
5
- export declare function getConfig(projectDir: string, configPath: string | null, configFromOptions: Configuration | Nullish, packageMetadata?: Lazy<Record<string, any> | null>): Promise<Configuration>;
6
- /**
7
- * `doMergeConfigs` takes configs in the order you would pass them to
8
- * Object.assign as sources.
9
- */
10
- export declare function doMergeConfigs(configs: Configuration[]): Configuration;
11
- export declare function validateConfiguration(config: Configuration, debugLogger: DebugLogger): Promise<void>;
12
- export declare function computeDefaultAppDirectory(projectDir: string, userAppDir: string | Nullish): Promise<string>;
@@ -1,256 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConfig = getConfig;
4
- exports.doMergeConfigs = doMergeConfigs;
5
- exports.validateConfiguration = validateConfiguration;
6
- exports.computeDefaultAppDirectory = computeDefaultAppDirectory;
7
- const builder_util_1 = require("builder-util");
8
- const builder_util_runtime_1 = require("builder-util-runtime");
9
- const fs_extra_1 = require("fs-extra");
10
- const lazy_val_1 = require("lazy-val");
11
- const path = require("path");
12
- const rectCra_1 = require("../../presets/rectCra");
13
- const version_1 = require("../../version");
14
- const load_1 = require("./load");
15
- const schemaValidator_1 = require("./schemaValidator");
16
- // https://github.com/electron-userland/electron-builder/issues/1847
17
- function mergePublish(config, configFromOptions) {
18
- // if config from disk doesn't have publish (or object), no need to handle, it will be simply merged by deepAssign
19
- const publish = Array.isArray(config.publish) ? configFromOptions.publish : null;
20
- if (publish != null) {
21
- delete configFromOptions.publish;
22
- }
23
- (0, builder_util_runtime_1.deepAssign)(config, configFromOptions);
24
- if (publish == null) {
25
- return;
26
- }
27
- const listOnDisk = config.publish;
28
- if (listOnDisk.length === 0) {
29
- config.publish = publish;
30
- }
31
- else {
32
- // apply to first
33
- (0, builder_util_runtime_1.deepAssign)(listOnDisk[0], publish);
34
- }
35
- }
36
- async function getConfig(projectDir, configPath, configFromOptions, packageMetadata = new lazy_val_1.Lazy(() => (0, load_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(projectDir, "package.json"))))) {
37
- const configRequest = { packageKey: "build", configFilename: "electron-builder", projectDir, packageMetadata };
38
- const configAndEffectiveFile = await (0, load_1.getConfig)(configRequest, configPath);
39
- const config = configAndEffectiveFile == null ? {} : configAndEffectiveFile.result;
40
- if (configFromOptions != null) {
41
- mergePublish(config, configFromOptions);
42
- }
43
- if (configAndEffectiveFile != null) {
44
- builder_util_1.log.info({ file: configAndEffectiveFile.configFile == null ? 'package.json ("build" field)' : configAndEffectiveFile.configFile }, "loaded configuration");
45
- }
46
- if (config.extends == null && config.extends !== null) {
47
- const metadata = (await packageMetadata.value) || {};
48
- const devDependencies = metadata.devDependencies;
49
- const dependencies = metadata.dependencies;
50
- if ((dependencies != null && "react-scripts" in dependencies) || (devDependencies != null && "react-scripts" in devDependencies)) {
51
- config.extends = "react-cra";
52
- }
53
- else if (devDependencies != null && "electron-webpack" in devDependencies) {
54
- let file = "electron-webpack/out/electron-builder.js";
55
- try {
56
- file = require.resolve(file);
57
- }
58
- catch (_ignore) {
59
- file = require.resolve("electron-webpack/electron-builder.yml");
60
- }
61
- config.extends = `file:${file}`;
62
- }
63
- }
64
- const parentConfigs = await loadParentConfigsRecursively(config.extends, async (configExtend) => {
65
- if (configExtend === "react-cra") {
66
- const result = await (0, rectCra_1.reactCra)(projectDir);
67
- builder_util_1.log.info({ preset: configExtend }, "loaded parent configuration");
68
- return result;
69
- }
70
- else {
71
- const { configFile, result } = await (0, load_1.loadParentConfig)(configRequest, configExtend);
72
- builder_util_1.log.info({ file: configFile }, "loaded parent configuration");
73
- return result;
74
- }
75
- });
76
- return doMergeConfigs([...parentConfigs, config]);
77
- }
78
- function asArray(value) {
79
- return Array.isArray(value) ? value : typeof value === "string" ? [value] : [];
80
- }
81
- async function loadParentConfigsRecursively(configExtends, loader) {
82
- const configs = [];
83
- for (const configExtend of asArray(configExtends)) {
84
- const result = await loader(configExtend);
85
- const parentConfigs = await loadParentConfigsRecursively(result.extends, loader);
86
- configs.push(...parentConfigs, result);
87
- }
88
- return configs;
89
- }
90
- // normalize for easy merge
91
- function normalizeFiles(configuration, name) {
92
- let value = configuration[name];
93
- if (value == null) {
94
- return;
95
- }
96
- if (!Array.isArray(value)) {
97
- value = [value];
98
- }
99
- itemLoop: for (let i = 0; i < value.length; i++) {
100
- let item = value[i];
101
- if (typeof item === "string") {
102
- // merge with previous if possible
103
- if (i !== 0) {
104
- let prevItemIndex = i - 1;
105
- let prevItem;
106
- do {
107
- prevItem = value[prevItemIndex--];
108
- } while (prevItem == null);
109
- if (prevItem.from == null && prevItem.to == null) {
110
- if (prevItem.filter == null) {
111
- prevItem.filter = [item];
112
- }
113
- else {
114
- ;
115
- prevItem.filter.push(item);
116
- }
117
- value[i] = null;
118
- continue itemLoop;
119
- }
120
- }
121
- item = {
122
- filter: [item],
123
- };
124
- value[i] = item;
125
- }
126
- else if (Array.isArray(item)) {
127
- throw new Error(`${name} configuration is invalid, nested array not expected for index ${i}: ${item}`);
128
- }
129
- // make sure that merge logic is not complex - unify different presentations
130
- if (item.from === ".") {
131
- item.from = undefined;
132
- }
133
- if (item.to === ".") {
134
- item.to = undefined;
135
- }
136
- if (item.filter != null && typeof item.filter === "string") {
137
- item.filter = [item.filter];
138
- }
139
- }
140
- configuration[name] = value.filter(it => it != null);
141
- }
142
- function isSimilarFileSet(value, other) {
143
- return value.from === other.from && value.to === other.to;
144
- }
145
- function mergeFilters(value, other) {
146
- return asArray(value).concat(asArray(other));
147
- }
148
- function mergeFileSets(lists) {
149
- const result = [];
150
- for (const list of lists) {
151
- for (const item of list) {
152
- const existingItem = result.find(i => isSimilarFileSet(i, item));
153
- if (existingItem) {
154
- existingItem.filter = mergeFilters(item.filter, existingItem.filter);
155
- }
156
- else {
157
- result.push(item);
158
- }
159
- }
160
- }
161
- return result;
162
- }
163
- /**
164
- * `doMergeConfigs` takes configs in the order you would pass them to
165
- * Object.assign as sources.
166
- */
167
- function doMergeConfigs(configs) {
168
- for (const config of configs) {
169
- normalizeFiles(config, "files");
170
- normalizeFiles(config, "extraFiles");
171
- normalizeFiles(config, "extraResources");
172
- }
173
- const result = (0, builder_util_runtime_1.deepAssign)(getDefaultConfig(), ...configs);
174
- // `deepAssign` prioritises latter configs, while `mergeFilesSets` prioritises
175
- // former configs, so we have to reverse the order, because latter configs
176
- // must have higher priority.
177
- configs = configs.slice().reverse();
178
- result.files = mergeFileSets(configs.map(config => { var _a; return ((_a = config.files) !== null && _a !== void 0 ? _a : []); }));
179
- return result;
180
- }
181
- function getDefaultConfig() {
182
- return {
183
- directories: {
184
- output: "dist",
185
- buildResources: "build",
186
- },
187
- };
188
- }
189
- const schemeDataPromise = new lazy_val_1.Lazy(() => (0, fs_extra_1.readJson)(path.join(__dirname, "..", "..", "..", "scheme.json")));
190
- async function validateConfiguration(config, debugLogger) {
191
- const extraMetadata = config.extraMetadata;
192
- if (extraMetadata != null) {
193
- if (extraMetadata.build != null) {
194
- throw new builder_util_1.InvalidConfigurationError(`--em.build is deprecated, please specify as -c"`);
195
- }
196
- if (extraMetadata.directories != null) {
197
- throw new builder_util_1.InvalidConfigurationError(`--em.directories is deprecated, please specify as -c.directories"`);
198
- }
199
- }
200
- const oldConfig = config;
201
- if (oldConfig.npmSkipBuildFromSource === false) {
202
- throw new builder_util_1.InvalidConfigurationError(`npmSkipBuildFromSource is deprecated, please use buildDependenciesFromSource"`);
203
- }
204
- if (oldConfig.appImage != null && oldConfig.appImage.systemIntegration != null) {
205
- throw new builder_util_1.InvalidConfigurationError(`appImage.systemIntegration is deprecated, https://github.com/TheAssassin/AppImageLauncher is used for desktop integration"`);
206
- }
207
- (0, schemaValidator_1.validateSchema)(await schemeDataPromise.value, config, {
208
- name: `electron-builder ${version_1.PACKAGE_VERSION}`,
209
- postFormatter: (formattedError, error) => {
210
- var _a, _b;
211
- if (debugLogger.isEnabled) {
212
- debugLogger.add("invalidConfig", (0, builder_util_1.safeStringifyJson)(error));
213
- }
214
- const site = "https://www.electron.build";
215
- let url = `${site}/configuration`;
216
- const targets = new Set(["mac", "dmg", "pkg", "mas", "win", "nsis", "appx", "linux", "appimage", "snap"]);
217
- const firstSegment = (_b = ((_a = error.instancePath) !== null && _a !== void 0 ? _a : "").split("/").filter(Boolean)[0]) === null || _b === void 0 ? void 0 : _b.toLowerCase();
218
- if (firstSegment != null && targets.has(firstSegment)) {
219
- url = `${site}/${firstSegment}`;
220
- }
221
- return `${formattedError}\n How to fix:
222
- 1. Open ${url}
223
- 2. Search the option name on the page (or type in into Search to find across the docs).
224
- * Not found? The option was deprecated or not exists (check spelling).
225
- * Found? Check that the option in the appropriate place. e.g. "title" only in the "dmg", not in the root.
226
- `;
227
- },
228
- });
229
- }
230
- const DEFAULT_APP_DIR_NAMES = ["app", "www"];
231
- async function computeDefaultAppDirectory(projectDir, userAppDir) {
232
- if (userAppDir != null) {
233
- const absolutePath = path.resolve(projectDir, userAppDir);
234
- const stat = await (0, builder_util_1.statOrNull)(absolutePath);
235
- if (stat == null) {
236
- throw new builder_util_1.InvalidConfigurationError(`Application directory ${userAppDir} doesn't exist`);
237
- }
238
- else if (!stat.isDirectory()) {
239
- throw new builder_util_1.InvalidConfigurationError(`Application directory ${userAppDir} is not a directory`);
240
- }
241
- else if (projectDir === absolutePath) {
242
- builder_util_1.log.warn({ appDirectory: userAppDir }, `Specified application directory equals to project dir — superfluous or wrong configuration`);
243
- }
244
- return absolutePath;
245
- }
246
- for (const dir of DEFAULT_APP_DIR_NAMES) {
247
- const absolutePath = path.join(projectDir, dir);
248
- const packageJson = path.join(absolutePath, "package.json");
249
- const stat = await (0, builder_util_1.statOrNull)(packageJson);
250
- if (stat != null && stat.isFile()) {
251
- return absolutePath;
252
- }
253
- }
254
- return projectDir;
255
- }
256
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/util/config/config.ts"],"names":[],"mappings":";;AAmCA,8BA+CC;AA2GD,wCAgBC;AAaD,sDA0CC;AAID,gEAuBC;AA/RD,+CAAyG;AACzG,+DAA0D;AAC1D,uCAAmC;AACnC,uCAA+B;AAC/B,6BAA4B;AAG5B,mDAAgD;AAChD,2CAA+C;AAC/C,iCAA2G;AAC3G,uDAAkD;AAElD,oEAAoE;AACpE,SAAS,YAAY,CAAC,MAAqB,EAAE,iBAAgC;IAC3E,kHAAkH;IAClH,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;IAChF,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,OAAQ,iBAAyB,CAAC,OAAO,CAAA;IAC3C,CAAC;IAED,IAAA,iCAAU,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAErC,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,OAAM;IACR,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,OAAqB,CAAA;IAC/C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;SAAM,CAAC;QACN,iBAAiB;QACjB,IAAA,iCAAU,EAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IACpC,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,SAAS,CAC7B,UAAkB,EAClB,UAAyB,EACzB,iBAA0C,EAC1C,kBAAoD,IAAI,e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AA0B,CAAC,UAAkB,EAAE,UAA4B;IAC/F,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;QACzD,MAAM,IAAI,GAAG,MAAM,IAAA,yBAAU,EAAC,YAAY,CAAC,CAAA;QAC3C,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;YACjB,MAAM,IAAI,wCAAyB,CAAC,yBAAyB,UAAU,gBAAgB,CAAC,CAAA;QAC1F,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/B,MAAM,IAAI,wCAAyB,CAAC,yBAAyB,UAAU,qBAAqB,CAAC,CAAA;QAC/F,CAAC;aAAM,IAAI,UAAU,KAAK,YAAY,EAAE,CAAC;YACvC,kBAAG,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,4FAA4F,CAAC,CAAA;QACtI,CAAC;QACD,OAAO,YAAY,CAAA;IACrB,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;QACxC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;QAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAA;QAC3D,MAAM,IAAI,GAAG,MAAM,IAAA,yBAAU,EAAC,WAAW,CAAC,CAAA;QAC1C,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClC,OAAO,YAAY,CAAA;QACrB,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { DebugLogger, InvalidConfigurationError, log, safeStringifyJson, statOrNull } from \"builder-util\"\nimport { deepAssign, Nullish } from \"builder-util-runtime\"\nimport { readJson } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { Configuration } from \"../../configuration\"\nimport { FileSet } from \"../../options/PlatformSpecificBuildOptions\"\nimport { reactCra } from \"../../presets/rectCra\"\nimport { PACKAGE_VERSION } from \"../../version\"\nimport { getConfig as _getConfig, loadParentConfig, orNullIfFileNotExist, ReadConfigRequest } from \"./load\"\nimport { validateSchema } from \"./schemaValidator\"\n\n// https://github.com/electron-userland/electron-builder/issues/1847\nfunction mergePublish(config: Configuration, configFromOptions: Configuration) {\n // if config from disk doesn't have publish (or object), no need to handle, it will be simply merged by deepAssign\n const publish = Array.isArray(config.publish) ? configFromOptions.publish : null\n if (publish != null) {\n delete (configFromOptions as any).publish\n }\n\n deepAssign(config, configFromOptions)\n\n if (publish == null) {\n return\n }\n\n const listOnDisk = config.publish as Array<any>\n if (listOnDisk.length === 0) {\n config.publish = publish\n } else {\n // apply to first\n deepAssign(listOnDisk[0], publish)\n }\n}\n\nexport async function getConfig(\n projectDir: string,\n configPath: string | null,\n configFromOptions: Configuration | Nullish,\n packageMetadata: Lazy<Record<string, any> | null> = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, \"package.json\"))))\n): Promise<Configuration> {\n const configRequest: ReadConfigRequest = { packageKey: \"build\", configFilename: \"electron-builder\", projectDir, packageMetadata }\n const configAndEffectiveFile = await _getConfig<Configuration>(configRequest, configPath)\n const config = configAndEffectiveFile == null ? {} : configAndEffectiveFile.result\n if (configFromOptions != null) {\n mergePublish(config, configFromOptions)\n }\n\n if (configAndEffectiveFile != null) {\n log.info({ file: configAndEffectiveFile.configFile == null ? 'package.json (\"build\" field)' : configAndEffectiveFile.configFile }, \"loaded configuration\")\n }\n\n if (config.extends == null && config.extends !== null) {\n const metadata = (await packageMetadata.value) || {}\n const devDependencies = metadata.devDependencies\n const dependencies = metadata.dependencies\n if ((dependencies != null && \"react-scripts\" in dependencies) || (devDependencies != null && \"react-scripts\" in devDependencies)) {\n config.extends = \"react-cra\"\n } else if (devDependencies != null && \"electron-webpack\" in devDependencies) {\n let file = \"electron-webpack/out/electron-builder.js\"\n try {\n file = require.resolve(file)\n } catch (_ignore) {\n file = require.resolve(\"electron-webpack/electron-builder.yml\")\n }\n config.extends = `file:${file}`\n }\n }\n\n const parentConfigs = await loadParentConfigsRecursively(config.extends, async configExtend => {\n if (configExtend === \"react-cra\") {\n const result = await reactCra(projectDir)\n log.info({ preset: configExtend }, \"loaded parent configuration\")\n return result\n } else {\n const { configFile, result } = await loadParentConfig<Configuration>(configRequest, configExtend)\n log.info({ file: configFile }, \"loaded parent configuration\")\n return result\n }\n })\n\n return doMergeConfigs([...parentConfigs, config])\n}\n\nfunction asArray(value: string[] | string | Nullish): string[] {\n return Array.isArray(value) ? value : typeof value === \"string\" ? [value] : []\n}\n\nasync function loadParentConfigsRecursively(configExtends: Configuration[\"extends\"], loader: (configExtend: string) => Promise<Configuration>): Promise<Configuration[]> {\n const configs = []\n\n for (const configExtend of asArray(configExtends)) {\n const result = await loader(configExtend)\n const parentConfigs = await loadParentConfigsRecursively(result.extends, loader)\n configs.push(...parentConfigs, result)\n }\n\n return configs\n}\n\n// normalize for easy merge\nfunction normalizeFiles(configuration: Configuration, name: \"files\" | \"extraFiles\" | \"extraResources\") {\n let value = configuration[name]\n if (value == null) {\n return\n }\n\n if (!Array.isArray(value)) {\n value = [value]\n }\n\n itemLoop: for (let i = 0; i < value.length; i++) {\n let item = value[i]\n if (typeof item === \"string\") {\n // merge with previous if possible\n if (i !== 0) {\n let prevItemIndex = i - 1\n let prevItem: FileSet\n do {\n prevItem = value[prevItemIndex--] as FileSet\n } while (prevItem == null)\n\n if (prevItem.from == null && prevItem.to == null) {\n if (prevItem.filter == null) {\n prevItem.filter = [item]\n } else {\n ;(prevItem.filter as Array<string>).push(item)\n }\n value[i] = null as any\n continue itemLoop\n }\n }\n\n item = {\n filter: [item],\n }\n value[i] = item\n } else if (Array.isArray(item)) {\n throw new Error(`${name} configuration is invalid, nested array not expected for index ${i}: ${item}`)\n }\n\n // make sure that merge logic is not complex - unify different presentations\n if (item.from === \".\") {\n item.from = undefined\n }\n\n if (item.to === \".\") {\n item.to = undefined\n }\n\n if (item.filter != null && typeof item.filter === \"string\") {\n item.filter = [item.filter]\n }\n }\n\n configuration[name] = value.filter(it => it != null)\n}\n\nfunction isSimilarFileSet(value: FileSet, other: FileSet): boolean {\n return value.from === other.from && value.to === other.to\n}\n\ntype Filter = FileSet[\"filter\"]\n\nfunction mergeFilters(value: Filter, other: Filter): string[] {\n return asArray(value).concat(asArray(other))\n}\n\nfunction mergeFileSets(lists: FileSet[][]): FileSet[] {\n const result: FileSet[] = []\n\n for (const list of lists) {\n for (const item of list) {\n const existingItem = result.find(i => isSimilarFileSet(i, item))\n if (existingItem) {\n existingItem.filter = mergeFilters(item.filter, existingItem.filter)\n } else {\n result.push(item)\n }\n }\n }\n\n return result\n}\n\n/**\n * `doMergeConfigs` takes configs in the order you would pass them to\n * Object.assign as sources.\n */\nexport function doMergeConfigs(configs: Configuration[]): Configuration {\n for (const config of configs) {\n normalizeFiles(config, \"files\")\n normalizeFiles(config, \"extraFiles\")\n normalizeFiles(config, \"extraResources\")\n }\n\n const result = deepAssign(getDefaultConfig(), ...configs)\n\n // `deepAssign` prioritises latter configs, while `mergeFilesSets` prioritises\n // former configs, so we have to reverse the order, because latter configs\n // must have higher priority.\n configs = configs.slice().reverse()\n\n result.files = mergeFileSets(configs.map(config => (config.files ?? []) as FileSet[]))\n return result\n}\n\nfunction getDefaultConfig(): Configuration {\n return {\n directories: {\n output: \"dist\",\n buildResources: \"build\",\n },\n }\n}\n\nconst schemeDataPromise = new Lazy(() => readJson(path.join(__dirname, \"..\", \"..\", \"..\", \"scheme.json\")))\n\nexport async function validateConfiguration(config: Configuration, debugLogger: DebugLogger) {\n const extraMetadata = config.extraMetadata\n if (extraMetadata != null) {\n if (extraMetadata.build != null) {\n throw new InvalidConfigurationError(`--em.build is deprecated, please specify as -c\"`)\n }\n if (extraMetadata.directories != null) {\n throw new InvalidConfigurationError(`--em.directories is deprecated, please specify as -c.directories\"`)\n }\n }\n\n const oldConfig: any = config\n if (oldConfig.npmSkipBuildFromSource === false) {\n throw new InvalidConfigurationError(`npmSkipBuildFromSource is deprecated, please use buildDependenciesFromSource\"`)\n }\n if (oldConfig.appImage != null && oldConfig.appImage.systemIntegration != null) {\n throw new InvalidConfigurationError(`appImage.systemIntegration is deprecated, https://github.com/TheAssassin/AppImageLauncher is used for desktop integration\"`)\n }\n\n validateSchema(await schemeDataPromise.value, config, {\n name: `electron-builder ${PACKAGE_VERSION}`,\n postFormatter: (formattedError, error): string => {\n if (debugLogger.isEnabled) {\n debugLogger.add(\"invalidConfig\", safeStringifyJson(error))\n }\n\n const site = \"https://www.electron.build\"\n let url = `${site}/configuration`\n const targets = new Set([\"mac\", \"dmg\", \"pkg\", \"mas\", \"win\", \"nsis\", \"appx\", \"linux\", \"appimage\", \"snap\"])\n const firstSegment = (error.instancePath ?? \"\").split(\"/\").filter(Boolean)[0]?.toLowerCase()\n if (firstSegment != null && targets.has(firstSegment)) {\n url = `${site}/${firstSegment}`\n }\n\n return `${formattedError}\\n How to fix:\n 1. Open ${url}\n 2. Search the option name on the page (or type in into Search to find across the docs).\n * Not found? The option was deprecated or not exists (check spelling).\n * Found? Check that the option in the appropriate place. e.g. \"title\" only in the \"dmg\", not in the root.\n`\n },\n })\n}\n\nconst DEFAULT_APP_DIR_NAMES = [\"app\", \"www\"]\n\nexport async function computeDefaultAppDirectory(projectDir: string, userAppDir: string | Nullish): Promise<string> {\n if (userAppDir != null) {\n const absolutePath = path.resolve(projectDir, userAppDir)\n const stat = await statOrNull(absolutePath)\n if (stat == null) {\n throw new InvalidConfigurationError(`Application directory ${userAppDir} doesn't exist`)\n } else if (!stat.isDirectory()) {\n throw new InvalidConfigurationError(`Application directory ${userAppDir} is not a directory`)\n } else if (projectDir === absolutePath) {\n log.warn({ appDirectory: userAppDir }, `Specified application directory equals to project dir — superfluous or wrong configuration`)\n }\n return absolutePath\n }\n\n for (const dir of DEFAULT_APP_DIR_NAMES) {\n const absolutePath = path.join(projectDir, dir)\n const packageJson = path.join(absolutePath, \"package.json\")\n const stat = await statOrNull(packageJson)\n if (stat != null && stat.isFile()) {\n return absolutePath\n }\n }\n return projectDir\n}\n"]}