app-builder-lib 26.15.3 → 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 -105
  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 -524
  907. package/out/util/electronGet.js.map +0 -1
  908. package/out/util/envPath.d.ts +0 -2
  909. package/out/util/envPath.js +0 -28
  910. package/out/util/envPath.js.map +0 -1
  911. package/out/util/filter.d.ts +0 -1
  912. package/out/util/filter.js +0 -68
  913. package/out/util/filter.js.map +0 -1
  914. package/out/util/flags.d.ts +0 -3
  915. package/out/util/flags.js +0 -16
  916. package/out/util/flags.js.map +0 -1
  917. package/out/util/hash.d.ts +0 -1
  918. package/out/util/hash.js +0 -19
  919. package/out/util/hash.js.map +0 -1
  920. package/out/util/iconConverter.d.ts +0 -25
  921. package/out/util/iconConverter.js +0 -260
  922. package/out/util/iconConverter.js.map +0 -1
  923. package/out/util/langs.d.ts +0 -189
  924. package/out/util/langs.js +0 -436
  925. package/out/util/langs.js.map +0 -1
  926. package/out/util/license.d.ts +0 -16
  927. package/out/util/license.js +0 -47
  928. package/out/util/license.js.map +0 -1
  929. package/out/util/macosIconComposer.d.ts +0 -10
  930. package/out/util/macosIconComposer.js +0 -102
  931. package/out/util/macosIconComposer.js.map +0 -1
  932. package/out/util/macosVersion.d.ts +0 -3
  933. package/out/util/macosVersion.js +0 -36
  934. package/out/util/macosVersion.js.map +0 -1
  935. package/out/util/macroExpander.d.ts +0 -3
  936. package/out/util/macroExpander.js +0 -64
  937. package/out/util/macroExpander.js.map +0 -1
  938. package/out/util/normalizePackageData.d.ts +0 -1
  939. package/out/util/normalizePackageData.js +0 -328
  940. package/out/util/normalizePackageData.js.map +0 -1
  941. package/out/util/packageDependencies.d.ts +0 -6
  942. package/out/util/packageDependencies.js +0 -3
  943. package/out/util/packageDependencies.js.map +0 -1
  944. package/out/util/packageMetadata.d.ts +0 -1
  945. package/out/util/packageMetadata.js +0 -124
  946. package/out/util/packageMetadata.js.map +0 -1
  947. package/out/util/pathManager.d.ts +0 -3
  948. package/out/util/pathManager.js +0 -23
  949. package/out/util/pathManager.js.map +0 -1
  950. package/out/util/plist.d.ts +0 -7
  951. package/out/util/plist.js +0 -31
  952. package/out/util/plist.js.map +0 -1
  953. package/out/util/rebuild.d.ts +0 -2
  954. package/out/util/rebuild.js +0 -60
  955. package/out/util/rebuild.js.map +0 -1
  956. package/out/util/repositoryInfo.d.ts +0 -3
  957. package/out/util/repositoryInfo.js +0 -79
  958. package/out/util/repositoryInfo.js.map +0 -1
  959. package/out/util/resEdit.d.ts +0 -10
  960. package/out/util/resEdit.js +0 -49
  961. package/out/util/resEdit.js.map +0 -1
  962. package/out/util/resolve.d.ts +0 -2
  963. package/out/util/resolve.js +0 -59
  964. package/out/util/resolve.js.map +0 -1
  965. package/out/util/timer.d.ts +0 -11
  966. package/out/util/timer.js +0 -28
  967. package/out/util/timer.js.map +0 -1
  968. package/out/util/toolsetLock.d.ts +0 -1
  969. package/out/util/toolsetLock.js +0 -23
  970. package/out/util/toolsetLock.js.map +0 -1
  971. package/out/util/yarn.d.ts +0 -22
  972. package/out/util/yarn.js +0 -160
  973. package/out/util/yarn.js.map +0 -1
  974. package/out/version.d.ts +0 -1
  975. package/out/version.js +0 -5
  976. package/out/version.js.map +0 -1
  977. package/out/vm/MonoVm.d.ts +0 -8
  978. package/out/vm/MonoVm.js +0 -20
  979. package/out/vm/MonoVm.js.map +0 -1
  980. package/out/vm/ParallelsVm.d.ts +0 -23
  981. package/out/vm/ParallelsVm.js +0 -102
  982. package/out/vm/ParallelsVm.js.map +0 -1
  983. package/out/vm/PwshVm.d.ts +0 -6
  984. package/out/vm/PwshVm.js +0 -25
  985. package/out/vm/PwshVm.js.map +0 -1
  986. package/out/vm/WineVm.d.ts +0 -12
  987. package/out/vm/WineVm.js +0 -38
  988. package/out/vm/WineVm.js.map +0 -1
  989. package/out/vm/vm.d.ts +0 -14
  990. package/out/vm/vm.js +0 -88
  991. package/out/vm/vm.js.map +0 -1
  992. package/out/winPackager.d.ts +0 -29
  993. package/out/winPackager.js +0 -271
  994. package/out/winPackager.js.map +0 -1
  995. /package/{out → dist}/node-module-collector/types.js.map +0 -0
  996. /package/{out → dist}/options/FileAssociation.js.map +0 -0
  997. /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
@@ -0,0 +1,273 @@
1
+ import { copyFile, exec, InvalidConfigurationError, isEmptyOrSpaces, isPullRequest, log, Logger, retry, unlinkIfExists } from "builder-util";
2
+ import { createHash, randomBytes } from "crypto";
3
+ import { rename } from "fs/promises";
4
+ import { Lazy } from "lazy-val";
5
+ import { homedir, tmpdir } from "os";
6
+ import * as path from "path";
7
+ import { getTempName } from "temp-file";
8
+ import { dynamicImport } from "../../util/dynamicImport.js";
9
+ import { isAutoDiscoveryCodeSignIdentity, isCscForPullRequest, isTravis } from "../../util/flags.js";
10
+ import { importCertificate } from "../codesign.js";
11
+ export const appleCertificatePrefixes = ["Developer ID Application:", "Developer ID Installer:", "3rd Party Mac Developer Application:", "3rd Party Mac Developer Installer:"];
12
+ export function isSignAllowed(isPrintWarn = true) {
13
+ if (process.platform !== "darwin") {
14
+ if (isPrintWarn) {
15
+ log.warn({ reason: "supported only on macOS" }, "skipped macOS application code signing");
16
+ }
17
+ return false;
18
+ }
19
+ if (isPullRequest()) {
20
+ const buildForPrWarning = "There are serious security concerns with CSC_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)" +
21
+ "\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.";
22
+ if (isCscForPullRequest()) {
23
+ if (isPrintWarn) {
24
+ log.warn(buildForPrWarning);
25
+ }
26
+ }
27
+ else {
28
+ if (isPrintWarn) {
29
+ // https://github.com/electron-userland/electron-builder/issues/1524
30
+ log.warn("Current build is a part of pull request, code signing will be skipped." + "\nSet env CSC_FOR_PULL_REQUEST to true to force code signing." + `\n${buildForPrWarning}`);
31
+ }
32
+ return false;
33
+ }
34
+ }
35
+ return true;
36
+ }
37
+ export async function reportError(isMas, certificateTypes, qualifier, keychainFile, isForceCodeSigning) {
38
+ const logFields = {};
39
+ if (qualifier == null) {
40
+ logFields.reason = "";
41
+ if (isAutoDiscoveryCodeSignIdentity()) {
42
+ logFields.reason += `cannot find valid "${certificateTypes.join(", ")}" identity${isMas ? "" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible`}`;
43
+ }
44
+ logFields.reason += ", see https://electron.build/code-signing";
45
+ if (!isAutoDiscoveryCodeSignIdentity()) {
46
+ logFields.CSC_IDENTITY_AUTO_DISCOVERY = false;
47
+ }
48
+ }
49
+ else {
50
+ logFields.reason = "Identity name is specified, but no valid identity with this name in the keychain";
51
+ logFields.identity = qualifier;
52
+ }
53
+ const args = ["find-identity"];
54
+ if (keychainFile != null) {
55
+ args.push(keychainFile);
56
+ }
57
+ if (qualifier != null || isAutoDiscoveryCodeSignIdentity()) {
58
+ logFields.allIdentities = (await exec("/usr/bin/security", args))
59
+ .trim()
60
+ .split("\n")
61
+ .filter(it => !(it.includes("Policy: X.509 Basic") || it.includes("Matching identities")))
62
+ .join("\n");
63
+ }
64
+ const skipMessage = "skipped macOS application code signing";
65
+ if (isMas || isForceCodeSigning) {
66
+ throw new Error(Logger.createMessage(skipMessage, logFields, "error", it => it));
67
+ }
68
+ else {
69
+ log.warn(logFields, skipMessage);
70
+ }
71
+ }
72
+ // "Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list."
73
+ // but "security list-keychains" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list
74
+ // "overly complicated and introduces a race condition."
75
+ // https://github.com/electron-userland/electron-builder/issues/398
76
+ const bundledCertKeychainAdded = new Lazy(async () => {
77
+ // copy to temp and then atomic rename to final path
78
+ const cacheDir = getCacheDirectory();
79
+ const tmpKeychainPath = path.join(cacheDir, getTempName("electron-builder-root-certs"));
80
+ const keychainPath = path.join(cacheDir, "electron-builder-root-certs.keychain");
81
+ const results = await Promise.all([
82
+ listUserKeychains(),
83
+ copyFile(path.join(import.meta.dirname, "..", "..", "certs", "root_certs.keychain"), tmpKeychainPath).then(() => rename(tmpKeychainPath, keychainPath)),
84
+ ]);
85
+ const list = results[0];
86
+ if (!list.includes(keychainPath)) {
87
+ await exec("/usr/bin/security", ["list-keychains", "-d", "user", "-s", keychainPath].concat(list));
88
+ }
89
+ });
90
+ function getCacheDirectory() {
91
+ const env = process.env.ELECTRON_BUILDER_CACHE;
92
+ return isEmptyOrSpaces(env) ? path.join(homedir(), "Library", "Caches", "electron-builder") : path.resolve(env);
93
+ }
94
+ function listUserKeychains() {
95
+ return exec("/usr/bin/security", ["list-keychains", "-d", "user"]).then(it => it
96
+ .split("\n")
97
+ .map(it => {
98
+ const r = it.trim();
99
+ return r.substring(1, r.length - 1);
100
+ })
101
+ .filter(it => it.length > 0));
102
+ }
103
+ export function removeKeychain(keychainFile, printWarn = true) {
104
+ return exec("/usr/bin/security", ["delete-keychain", keychainFile]).catch((e) => {
105
+ if (printWarn) {
106
+ log.warn({ file: keychainFile, error: e.stack || e }, "cannot delete keychain");
107
+ }
108
+ return unlinkIfExists(keychainFile);
109
+ });
110
+ }
111
+ export async function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }) {
112
+ // travis has correct AppleWWDRCA cert
113
+ if (!isTravis()) {
114
+ await bundledCertKeychainAdded.value;
115
+ }
116
+ // https://github.com/electron-userland/electron-builder/issues/3685
117
+ // use constant file
118
+ const keychainFile = path.join(process.env.APP_BUILDER_TMP_DIR || tmpdir(), `${createHash("sha256").update(currentDir).update("app-builder").digest("hex")}.keychain`);
119
+ // noinspection JSUnusedLocalSymbols
120
+ await removeKeychain(keychainFile, false).catch(_ => {
121
+ /* ignore*/
122
+ });
123
+ const certLinks = [cscLink];
124
+ if (cscILink != null) {
125
+ certLinks.push(cscILink);
126
+ }
127
+ const certPaths = new Array(certLinks.length);
128
+ const keychainPassword = randomBytes(32).toString("base64");
129
+ const securityCommands = [
130
+ ["create-keychain", "-p", keychainPassword, keychainFile],
131
+ ["unlock-keychain", "-p", keychainPassword, keychainFile],
132
+ ["set-keychain-settings", keychainFile],
133
+ ];
134
+ // https://stackoverflow.com/questions/42484678/codesign-keychain-gets-ignored
135
+ // https://github.com/electron-userland/electron-builder/issues/1457
136
+ const list = await listUserKeychains();
137
+ if (!list.includes(keychainFile)) {
138
+ securityCommands.push(["list-keychains", "-d", "user", "-s", keychainFile].concat(list));
139
+ }
140
+ // Import all certs in parallel, then run security commands sequentially.
141
+ await Promise.all(certLinks.map((link, i) => importCertificate(link, tmpDir, currentDir).then(it => (certPaths[i] = it))));
142
+ for (const cmd of securityCommands) {
143
+ await exec("/usr/bin/security", cmd);
144
+ }
145
+ const cscPasswords = [cscKeyPassword];
146
+ if (cscIKeyPassword != null) {
147
+ cscPasswords.push(cscIKeyPassword);
148
+ }
149
+ return await importCerts(keychainFile, certPaths, cscPasswords);
150
+ }
151
+ async function importCerts(keychainFile, paths, keyPasswords) {
152
+ for (let i = 0; i < paths.length; i++) {
153
+ const password = keyPasswords[i] ?? "";
154
+ await exec("/usr/bin/security", ["import", paths[i], "-k", keychainFile, "-T", "/usr/bin/codesign", "-T", "/usr/bin/productbuild", "-P", password]);
155
+ // https://stackoverflow.com/questions/39868578/security-codesign-in-sierra-keychain-ignores-access-control-settings-and-ui-p
156
+ // https://github.com/electron-userland/electron-packager/issues/701#issuecomment-322315996
157
+ await exec("/usr/bin/security", ["set-key-partition-list", "-S", "apple-tool:,apple:", "-s", "-k", password, keychainFile]);
158
+ }
159
+ return {
160
+ keychainFile,
161
+ };
162
+ }
163
+ export async function sign(opts) {
164
+ const { signAsync } = await dynamicImport("@electron/osx-sign");
165
+ return retry(() => signAsync(opts), {
166
+ retries: 3,
167
+ interval: 5000,
168
+ backoff: 5000,
169
+ });
170
+ }
171
+ export let findIdentityRawResult = null;
172
+ async function getValidIdentities(keychain) {
173
+ function addKeychain(args) {
174
+ if (keychain != null) {
175
+ args.push(keychain);
176
+ }
177
+ return args;
178
+ }
179
+ let result = findIdentityRawResult;
180
+ if (result == null || keychain != null) {
181
+ // https://github.com/electron-userland/electron-builder/issues/481
182
+ // https://github.com/electron-userland/electron-builder/issues/535
183
+ result = Promise.all([
184
+ exec("/usr/bin/security", addKeychain(["find-identity", "-v"])).then(it => it
185
+ .trim()
186
+ .split("\n")
187
+ .filter(it => {
188
+ for (const prefix of appleCertificatePrefixes) {
189
+ if (it.includes(prefix)) {
190
+ return true;
191
+ }
192
+ }
193
+ return false;
194
+ })),
195
+ exec("/usr/bin/security", addKeychain(["find-identity", "-v", "-p", "codesigning"])).then(it => it.trim().split("\n")),
196
+ ]).then(it => {
197
+ const array = it[0]
198
+ .concat(it[1])
199
+ .filter(it => !it.includes("(Missing required extension)") && !it.includes("valid identities found") && !it.includes("iPhone ") && !it.includes("com.apple.idms.appleid.prd."))
200
+ // remove 1)
201
+ .map(it => it.substring(it.indexOf(")") + 1).trim());
202
+ return Array.from(new Set(array));
203
+ });
204
+ if (keychain == null) {
205
+ findIdentityRawResult = result;
206
+ }
207
+ }
208
+ return result;
209
+ }
210
+ async function _findIdentity(type, qualifier, keychain) {
211
+ // https://github.com/electron-userland/electron-builder/issues/484
212
+ //noinspection SpellCheckingInspection
213
+ const lines = await getValidIdentities(keychain);
214
+ const namePrefix = `${type}:`;
215
+ for (const line of lines) {
216
+ if (qualifier != null && !line.includes(qualifier)) {
217
+ continue;
218
+ }
219
+ if (line.includes(namePrefix)) {
220
+ return await parseIdentity(line);
221
+ }
222
+ }
223
+ if (type === "Developer ID Application") {
224
+ // find non-Apple certificate
225
+ // https://github.com/electron-userland/electron-builder/issues/458
226
+ l: for (const line of lines) {
227
+ if (qualifier != null && !line.includes(qualifier)) {
228
+ continue;
229
+ }
230
+ if (line.includes("Mac Developer:")) {
231
+ continue;
232
+ }
233
+ for (const prefix of appleCertificatePrefixes) {
234
+ if (line.includes(prefix)) {
235
+ continue l;
236
+ }
237
+ }
238
+ return await parseIdentity(line);
239
+ }
240
+ }
241
+ return null;
242
+ }
243
+ async function parseIdentity(line) {
244
+ const firstQuoteIndex = line.indexOf('"');
245
+ const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('"'));
246
+ const hash = line.substring(0, firstQuoteIndex - 1);
247
+ const { Identity: IdentityClass } = await dynamicImport("@electron/osx-sign/dist/cjs/util-identities");
248
+ return new IdentityClass(name, hash);
249
+ }
250
+ export function findIdentity(certType, qualifier, keychain) {
251
+ let identity = qualifier || process.env.CSC_NAME;
252
+ if (isEmptyOrSpaces(identity)) {
253
+ if (isAutoDiscoveryCodeSignIdentity()) {
254
+ return _findIdentity(certType, null, keychain);
255
+ }
256
+ else {
257
+ return Promise.resolve(null);
258
+ }
259
+ }
260
+ else {
261
+ identity = identity.trim();
262
+ for (const prefix of appleCertificatePrefixes) {
263
+ checkPrefix(identity, prefix);
264
+ }
265
+ return _findIdentity(certType, identity, keychain);
266
+ }
267
+ }
268
+ function checkPrefix(name, prefix) {
269
+ if (name.startsWith(prefix)) {
270
+ throw new InvalidConfigurationError(`Please remove prefix "${prefix}" from the specified name — appropriate certificate will be chosen automatically`);
271
+ }
272
+ }
273
+ //# sourceMappingURL=macCodeSign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macCodeSign.js","sourceRoot":"","sources":["../../../src/codeSign/mac/macCodeSign.ts"],"names":[],"m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MAAM,CAAC,CAAA;QAC/B,CAAC;QACD,OAAO,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACpD,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,MAAc;IAC/C,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,yBAAyB,CAAC,yBAAyB,MAAM,kFAAkF,CAAC,CAAA;IACxJ,CAAC;AACH,CAAC","sourcesContent":["import type { SignOptions } from \"@electron/osx-sign/dist/cjs/types\"\nimport { copyFile, exec, Fields, InvalidConfigurationError, isEmptyOrSpaces, isPullRequest, log, Logger, retry, TmpDir, unlinkIfExists } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport { createHash, randomBytes } from \"crypto\"\nimport { rename } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport { homedir, tmpdir } from \"os\"\nimport * as path from \"path\"\nimport { getTempName } from \"temp-file\"\nimport { dynamicImport } from \"../../util/dynamicImport.js\"\nimport { isAutoDiscoveryCodeSignIdentity, isCscForPullRequest, isTravis } from \"../../util/flags.js\"\nimport { importCertificate } from \"../codesign.js\"\n\nexport const appleCertificatePrefixes = [\"Developer ID Application:\", \"Developer ID Installer:\", \"3rd Party Mac Developer Application:\", \"3rd Party Mac Developer Installer:\"]\n\nexport type CertType =\n | \"Developer ID Application\"\n | \"Developer ID Installer\"\n | \"3rd Party Mac Developer Application\"\n | \"3rd Party Mac Developer Installer\"\n | \"Mac Developer\"\n | \"Apple Development\"\n | \"Apple Distribution\"\n\nexport interface CodeSigningInfo {\n keychainFile?: string | null\n}\n\nexport function isSignAllowed(isPrintWarn = true): boolean {\n if (process.platform !== \"darwin\") {\n if (isPrintWarn) {\n log.warn({ reason: \"supported only on macOS\" }, \"skipped macOS application code signing\")\n }\n return false\n }\n\n if (isPullRequest()) {\n const buildForPrWarning =\n \"There are serious security concerns with CSC_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)\" +\n \"\\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.\"\n\n if (isCscForPullRequest()) {\n if (isPrintWarn) {\n log.warn(buildForPrWarning)\n }\n } else {\n if (isPrintWarn) {\n // https://github.com/electron-userland/electron-builder/issues/1524\n log.warn(\n \"Current build is a part of pull request, code signing will be skipped.\" + \"\\nSet env CSC_FOR_PULL_REQUEST to true to force code signing.\" + `\\n${buildForPrWarning}`\n )\n }\n return false\n }\n }\n\n return true\n}\n\nexport async function reportError(isMas: boolean, certificateTypes: CertType[], qualifier: string | Nullish, keychainFile: string | Nullish, isForceCodeSigning: boolean) {\n const logFields: Fields = {}\n if (qualifier == null) {\n logFields.reason = \"\"\n if (isAutoDiscoveryCodeSignIdentity()) {\n logFields.reason += `cannot find valid \"${certificateTypes.join(\", \")}\" identity${\n isMas ? \"\" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible`\n }`\n }\n logFields.reason += \", see https://electron.build/code-signing\"\n if (!isAutoDiscoveryCodeSignIdentity()) {\n logFields.CSC_IDENTITY_AUTO_DISCOVERY = false\n }\n } else {\n logFields.reason = \"Identity name is specified, but no valid identity with this name in the keychain\"\n logFields.identity = qualifier\n }\n\n const args = [\"find-identity\"]\n if (keychainFile != null) {\n args.push(keychainFile)\n }\n\n if (qualifier != null || isAutoDiscoveryCodeSignIdentity()) {\n logFields.allIdentities = (await exec(\"/usr/bin/security\", args))\n .trim()\n .split(\"\\n\")\n .filter(it => !(it.includes(\"Policy: X.509 Basic\") || it.includes(\"Matching identities\")))\n .join(\"\\n\")\n }\n\n const skipMessage = \"skipped macOS application code signing\"\n if (isMas || isForceCodeSigning) {\n throw new Error(Logger.createMessage(skipMessage, logFields, \"error\", it => it))\n } else {\n log.warn(logFields, skipMessage)\n }\n}\n\n// \"Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list.\"\n// but \"security list-keychains\" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list\n// \"overly complicated and introduces a race condition.\"\n// https://github.com/electron-userland/electron-builder/issues/398\nconst bundledCertKeychainAdded = new Lazy<void>(async () => {\n // copy to temp and then atomic rename to final path\n const cacheDir = getCacheDirectory()\n const tmpKeychainPath = path.join(cacheDir, getTempName(\"electron-builder-root-certs\"))\n const keychainPath = path.join(cacheDir, \"electron-builder-root-certs.keychain\")\n const results = await Promise.all<any>([\n listUserKeychains(),\n copyFile(path.join(import.meta.dirname, \"..\", \"..\", \"certs\", \"root_certs.keychain\"), tmpKeychainPath).then(() => rename(tmpKeychainPath, keychainPath)),\n ])\n const list = results[0]\n if (!list.includes(keychainPath)) {\n await exec(\"/usr/bin/security\", [\"list-keychains\", \"-d\", \"user\", \"-s\", keychainPath].concat(list))\n }\n})\n\nfunction getCacheDirectory(): string {\n const env = process.env.ELECTRON_BUILDER_CACHE\n return isEmptyOrSpaces(env) ? path.join(homedir(), \"Library\", \"Caches\", \"electron-builder\") : path.resolve(env)\n}\n\nfunction listUserKeychains(): Promise<Array<string>> {\n return exec(\"/usr/bin/security\", [\"list-keychains\", \"-d\", \"user\"]).then(it =>\n it\n .split(\"\\n\")\n .map(it => {\n const r = it.trim()\n return r.substring(1, r.length - 1)\n })\n .filter(it => it.length > 0)\n )\n}\n\nexport interface CreateKeychainOptions {\n tmpDir: TmpDir\n cscLink: string\n cscKeyPassword: string\n cscILink?: string | null\n cscIKeyPassword?: string | null\n currentDir: string\n}\n\nexport function removeKeychain(keychainFile: string, printWarn = true): Promise<any> {\n return exec(\"/usr/bin/security\", [\"delete-keychain\", keychainFile]).catch((e: any) => {\n if (printWarn) {\n log.warn({ file: keychainFile, error: e.stack || e }, \"cannot delete keychain\")\n }\n return unlinkIfExists(keychainFile)\n })\n}\n\nexport async function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }: CreateKeychainOptions): Promise<CodeSigningInfo> {\n // travis has correct AppleWWDRCA cert\n if (!isTravis()) {\n await bundledCertKeychainAdded.value\n }\n\n // https://github.com/electron-userland/electron-builder/issues/3685\n // use constant file\n const keychainFile = path.join(process.env.APP_BUILDER_TMP_DIR || tmpdir(), `${createHash(\"sha256\").update(currentDir).update(\"app-builder\").digest(\"hex\")}.keychain`)\n // noinspection JSUnusedLocalSymbols\n\n await removeKeychain(keychainFile, false).catch(_ => {\n /* ignore*/\n })\n\n const certLinks = [cscLink]\n if (cscILink != null) {\n certLinks.push(cscILink)\n }\n\n const certPaths = new Array(certLinks.length)\n const keychainPassword = randomBytes(32).toString(\"base64\")\n const securityCommands = [\n [\"create-keychain\", \"-p\", keychainPassword, keychainFile],\n [\"unlock-keychain\", \"-p\", keychainPassword, keychainFile],\n [\"set-keychain-settings\", keychainFile],\n ]\n\n // https://stackoverflow.com/questions/42484678/codesign-keychain-gets-ignored\n // https://github.com/electron-userland/electron-builder/issues/1457\n const list = await listUserKeychains()\n if (!list.includes(keychainFile)) {\n securityCommands.push([\"list-keychains\", \"-d\", \"user\", \"-s\", keychainFile].concat(list))\n }\n\n // Import all certs in parallel, then run security commands sequentially.\n await Promise.all(certLinks.map((link, i) => importCertificate(link, tmpDir, currentDir).then(it => (certPaths[i] = it))))\n for (const cmd of securityCommands) {\n await exec(\"/usr/bin/security\", cmd)\n }\n const cscPasswords: Array<string> = [cscKeyPassword]\n if (cscIKeyPassword != null) {\n cscPasswords.push(cscIKeyPassword)\n }\n return await importCerts(keychainFile, certPaths, cscPasswords)\n}\n\nasync function importCerts(keychainFile: string, paths: Array<string>, keyPasswords: Array<string>): Promise<CodeSigningInfo> {\n for (let i = 0; i < paths.length; i++) {\n const password = keyPasswords[i] ?? \"\"\n await exec(\"/usr/bin/security\", [\"import\", paths[i], \"-k\", keychainFile, \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/productbuild\", \"-P\", password])\n\n // https://stackoverflow.com/questions/39868578/security-codesign-in-sierra-keychain-ignores-access-control-settings-and-ui-p\n // https://github.com/electron-userland/electron-packager/issues/701#issuecomment-322315996\n await exec(\"/usr/bin/security\", [\"set-key-partition-list\", \"-S\", \"apple-tool:,apple:\", \"-s\", \"-k\", password, keychainFile])\n }\n\n return {\n keychainFile,\n }\n}\n\nexport async function sign(opts: SignOptions): Promise<void> {\n const { signAsync } = await dynamicImport<typeof import(\"@electron/osx-sign\")>(\"@electron/osx-sign\")\n return retry(() => signAsync(opts), {\n retries: 3,\n interval: 5000,\n backoff: 5000,\n })\n}\n\nexport let findIdentityRawResult: Promise<Array<string>> | null = null\n\nasync function getValidIdentities(keychain?: string | null): Promise<Array<string>> {\n function addKeychain(args: Array<string>) {\n if (keychain != null) {\n args.push(keychain)\n }\n return args\n }\n\n let result = findIdentityRawResult\n if (result == null || keychain != null) {\n // https://github.com/electron-userland/electron-builder/issues/481\n // https://github.com/electron-userland/electron-builder/issues/535\n result = Promise.all<Array<string>>([\n exec(\"/usr/bin/security\", addKeychain([\"find-identity\", \"-v\"])).then(it =>\n it\n .trim()\n .split(\"\\n\")\n .filter(it => {\n for (const prefix of appleCertificatePrefixes) {\n if (it.includes(prefix)) {\n return true\n }\n }\n return false\n })\n ),\n exec(\"/usr/bin/security\", addKeychain([\"find-identity\", \"-v\", \"-p\", \"codesigning\"])).then(it => it.trim().split(\"\\n\")),\n ]).then(it => {\n const array = it[0]\n .concat(it[1])\n .filter(\n it => !it.includes(\"(Missing required extension)\") && !it.includes(\"valid identities found\") && !it.includes(\"iPhone \") && !it.includes(\"com.apple.idms.appleid.prd.\")\n )\n // remove 1)\n .map(it => it.substring(it.indexOf(\")\") + 1).trim())\n return Array.from(new Set(array))\n })\n\n if (keychain == null) {\n findIdentityRawResult = result\n }\n }\n return result\n}\n\nasync function _findIdentity(type: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null> {\n // https://github.com/electron-userland/electron-builder/issues/484\n //noinspection SpellCheckingInspection\n const lines = await getValidIdentities(keychain)\n const namePrefix = `${type}:`\n for (const line of lines) {\n if (qualifier != null && !line.includes(qualifier)) {\n continue\n }\n\n if (line.includes(namePrefix)) {\n return await parseIdentity(line)\n }\n }\n\n if (type === \"Developer ID Application\") {\n // find non-Apple certificate\n // https://github.com/electron-userland/electron-builder/issues/458\n l: for (const line of lines) {\n if (qualifier != null && !line.includes(qualifier)) {\n continue\n }\n\n if (line.includes(\"Mac Developer:\")) {\n continue\n }\n\n for (const prefix of appleCertificatePrefixes) {\n if (line.includes(prefix)) {\n continue l\n }\n }\n\n return await parseIdentity(line)\n }\n }\n return null\n}\n\nexport declare class Identity {\n readonly name: string\n readonly hash?: string\n\n constructor(name: string, hash?: string)\n}\n\nasync function parseIdentity(line: string): Promise<Identity> {\n const firstQuoteIndex = line.indexOf('\"')\n const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('\"'))\n const hash = line.substring(0, firstQuoteIndex - 1)\n const { Identity: IdentityClass } = await dynamicImport<{ Identity: new (name: string, hash?: string) => Identity }>(\"@electron/osx-sign/dist/cjs/util-identities\")\n return new IdentityClass(name, hash)\n}\n\nexport function findIdentity(certType: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null> {\n let identity = qualifier || process.env.CSC_NAME\n if (isEmptyOrSpaces(identity)) {\n if (isAutoDiscoveryCodeSignIdentity()) {\n return _findIdentity(certType, null, keychain)\n } else {\n return Promise.resolve(null)\n }\n } else {\n identity = identity.trim()\n for (const prefix of appleCertificatePrefixes) {\n checkPrefix(identity, prefix)\n }\n return _findIdentity(certType, identity, keychain)\n }\n}\n\nfunction checkPrefix(name: string, prefix: string) {\n if (name.startsWith(prefix)) {\n throw new InvalidConfigurationError(`Please remove prefix \"${prefix}\" from the specified name — appropriate certificate will be chosen automatically`)\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { MemoLazy, Nullish } from "builder-util-runtime";
2
+ import { Lazy } from "lazy-val";
3
+ import { Target } from "../core.js";
4
+ import { WindowsConfiguration } from "../options/winOptions.js";
5
+ import { WindowsSignOptions } from "./win/windowsCodeSign.js";
6
+ import { CertificateFromStoreInfo, FileCodeSigningInfo } from "./win/windowsSignToolManager.js";
7
+ export interface SignManager {
8
+ readonly computedPublisherName: Lazy<Array<string> | null>;
9
+ readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>;
10
+ computePublisherName(target: Target, publisherName: string | Nullish): Promise<string>;
11
+ initialize(): Promise<void>;
12
+ signFile(options: WindowsSignOptions): Promise<boolean>;
13
+ }
14
+ //# sourceMappingURL=signManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signManager.d.ts","sourceRoot":"","sources":["../../src/codeSign/signManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAE/F,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAA;IAC1D,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,oBAAoB,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,IAAI,CAAC,CAAA;IACvG,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACtF,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACxD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signManager.js","sourceRoot":"","sources":["../../src/codeSign/signManager.ts"],"names":[],"mappings":"","sourcesContent":["import { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport { Lazy } from \"lazy-val\"\nimport { Target } from \"../core.js\"\nimport { WindowsConfiguration } from \"../options/winOptions.js\"\nimport { WindowsSignOptions } from \"./win/windowsCodeSign.js\"\nimport { CertificateFromStoreInfo, FileCodeSigningInfo } from \"./win/windowsSignToolManager.js\"\n\nexport interface SignManager {\n readonly computedPublisherName: Lazy<Array<string> | null>\n readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>\n computePublisherName(target: Target, publisherName: string | Nullish): Promise<string>\n initialize(): Promise<void>\n signFile(options: WindowsSignOptions): Promise<boolean>\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { WindowsConfiguration } from "../../options/winOptions.js";
2
+ import { WinPackager } from "../../winPackager.js";
3
+ export interface WindowsSignOptions {
4
+ readonly path: string;
5
+ readonly options: WindowsConfiguration;
6
+ }
7
+ export declare function signWindows(options: WindowsSignOptions, packager: WinPackager): Promise<boolean>;
8
+ //# sourceMappingURL=windowsCodeSign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsCodeSign.d.ts","sourceRoot":"","sources":["../../../src/codeSign/win/windowsCodeSign.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAA;CACvC;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAWtG"}
@@ -0,0 +1,34 @@
1
+ import { log, retry } from "builder-util";
2
+ export async function signWindows(options, packager) {
3
+ if (options.options.azureSignOptions) {
4
+ if (options.options.signtoolOptions) {
5
+ log.warn(null, "ignoring signtool options, using Azure Trusted Signing; please only configure one");
6
+ }
7
+ log.info({ path: log.filePath(options.path) }, "signing with Azure Trusted Signing");
8
+ }
9
+ else {
10
+ log.info({ path: log.filePath(options.path) }, "signing with signtool.exe");
11
+ }
12
+ const packageManager = await packager.signingManager.value;
13
+ return signWithRetry(async () => packageManager.signFile(options));
14
+ }
15
+ function signWithRetry(signer) {
16
+ return retry(signer, {
17
+ retries: 3,
18
+ interval: 1000,
19
+ backoff: 1000,
20
+ shouldRetry: (e) => {
21
+ const message = e.message;
22
+ if (
23
+ // https://github.com/electron-userland/electron-builder/issues/1414
24
+ message?.includes("Couldn't resolve host name") ||
25
+ // https://github.com/electron-userland/electron-builder/issues/8615
26
+ message?.includes("being used by another process.")) {
27
+ log.warn({ error: message }, "attempt to sign failed, another attempt will be made");
28
+ return true;
29
+ }
30
+ return false;
31
+ },
32
+ });
33
+ }
34
+ //# sourceMappingURL=windowsCodeSign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsCodeSign.js","sourceRoot":"","sources":["../../../src/codeSign/win/windowsCodeSign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AASzC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAqB;IAClF,IAAI,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACpC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,mFAAmF,CAAC,CAAA;QACrG,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,oCAAoC,CAAC,CAAA;IACtF,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAA;IAC7E,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAA;IAC1D,OAAO,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;AACpE,CAAC;AAED,SAAS,aAAa,CAAC,MAA8B;IACnD,OAAO,KAAK,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,CAAM,EAAE,EAAE;YACtB,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAA;YACzB;YACE,oEAAoE;YACpE,OAAO,EAAE,QAAQ,CAAC,4BAA4B,CAAC;gBAC/C,oEAAoE;gBACpE,OAAO,EAAE,QAAQ,CAAC,gCAAgC,CAAC,EACnD,CAAC;gBACD,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,sDAAsD,CAAC,CAAA;gBACpF,OAAO,IAAI,CAAA;YACb,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { log, retry } from \"builder-util\"\nimport { WindowsConfiguration } from \"../../options/winOptions.js\"\nimport { WinPackager } from \"../../winPackager.js\"\n\nexport interface WindowsSignOptions {\n readonly path: string\n readonly options: WindowsConfiguration\n}\n\nexport async function signWindows(options: WindowsSignOptions, packager: WinPackager): Promise<boolean> {\n if (options.options.azureSignOptions) {\n if (options.options.signtoolOptions) {\n log.warn(null, \"ignoring signtool options, using Azure Trusted Signing; please only configure one\")\n }\n log.info({ path: log.filePath(options.path) }, \"signing with Azure Trusted Signing\")\n } else {\n log.info({ path: log.filePath(options.path) }, \"signing with signtool.exe\")\n }\n const packageManager = await packager.signingManager.value\n return signWithRetry(async () => packageManager.signFile(options))\n}\n\nfunction signWithRetry(signer: () => Promise<boolean>): Promise<boolean> {\n return retry(signer, {\n retries: 3,\n interval: 1000,\n backoff: 1000,\n shouldRetry: (e: any) => {\n const message = e.message\n if (\n // https://github.com/electron-userland/electron-builder/issues/1414\n message?.includes(\"Couldn't resolve host name\") ||\n // https://github.com/electron-userland/electron-builder/issues/8615\n message?.includes(\"being used by another process.\")\n ) {\n log.warn({ error: message }, \"attempt to sign failed, another attempt will be made\")\n return true\n }\n return false\n },\n })\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { MemoLazy } from "builder-util-runtime";
2
+ import { Lazy } from "lazy-val";
3
+ import { WindowsConfiguration } from "../../options/winOptions.js";
4
+ import { WinPackager } from "../../winPackager.js";
5
+ import { SignManager } from "../signManager.js";
6
+ import { WindowsSignOptions } from "./windowsCodeSign.js";
7
+ import { CertificateFromStoreInfo, FileCodeSigningInfo } from "./windowsSignToolManager.js";
8
+ export declare class WindowsSignAzureManager implements SignManager {
9
+ private readonly packager;
10
+ private readonly platformOptions;
11
+ readonly computedPublisherName: Lazy<string[] | null>;
12
+ constructor(packager: WinPackager);
13
+ initialize(): Promise<void>;
14
+ computePublisherName(): Promise<string>;
15
+ readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>;
16
+ signFile(options: WindowsSignOptions): Promise<boolean>;
17
+ }
18
+ //# sourceMappingURL=windowsSignAzureManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsSignAzureManager.d.ts","sourceRoot":"","sources":["../../../src/codeSign/win/windowsSignAzureManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAoC,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAE3F,qBAAa,uBAAwB,YAAW,WAAW;IAgB7C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAfrC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsB;IAEtD,QAAQ,CAAC,qBAAqB,wBAW5B;gBAE2B,QAAQ,EAAE,WAAW;IAI5C,UAAU;IAkBhB,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAGvC,QAAQ,CAAC,OAAO,wFAGf;IAEK,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;CAmC9D"}
@@ -0,0 +1,68 @@
1
+ import { asArray, log } from "builder-util";
2
+ import { MemoLazy } from "builder-util-runtime";
3
+ import { Lazy } from "lazy-val";
4
+ export class WindowsSignAzureManager {
5
+ constructor(packager) {
6
+ this.packager = packager;
7
+ this.computedPublisherName = new Lazy(() => {
8
+ const publisherName = this.platformOptions.azureSignOptions?.publisherName;
9
+ if (publisherName === null) {
10
+ return Promise.resolve(null);
11
+ }
12
+ else if (publisherName != null) {
13
+ return Promise.resolve(asArray(publisherName));
14
+ }
15
+ // TODO: Is there another way to automatically pull Publisher Name from AzureTrusted service?
16
+ // For now return null.
17
+ return Promise.resolve(null);
18
+ });
19
+ this.cscInfo = new MemoLazy(() => this.packager.platformOptions, _selected => Promise.resolve(null));
20
+ this.platformOptions = packager.platformOptions;
21
+ }
22
+ async initialize() {
23
+ const vm = await this.packager.vm.value;
24
+ const ps = await vm.powershellCommand.value;
25
+ log.info(null, "installing required module (TrustedSigning) with scope CurrentUser");
26
+ try {
27
+ await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser"]);
28
+ }
29
+ catch (error) {
30
+ // Might not be needed, seems GH runners already have NuGet set up.
31
+ // Logging to debug just in case users run into this. If NuGet isn't present, Install-Module -Name TrustedSigning will fail, so we'll get the logs at that point
32
+ log.debug({ message: error.message || error.stack }, "unable to install PackageProvider Nuget. Might be a false alarm though as some systems already have it installed");
33
+ }
34
+ await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", "Install-Module -Name TrustedSigning -MinimumVersion 0.5.0 -Force -Repository PSGallery -Scope CurrentUser"]);
35
+ // If signing has been misconfigured it, the error from the TrustedSigning module should be descriptive enough to help them fix their configuration.
36
+ // Options: https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition
37
+ }
38
+ computePublisherName() {
39
+ return Promise.resolve(this.packager.platformOptions.azureSignOptions.publisherName);
40
+ }
41
+ // prerequisite: requires `initializeProviderModules` to already have been executed
42
+ async signFile(options) {
43
+ const vm = await this.packager.vm.value;
44
+ const ps = await vm.powershellCommand.value;
45
+ const { publisherName: _publisher, // extract from `extraSigningArgs`
46
+ endpoint, certificateProfileName, codeSigningAccountName, fileDigest, timestampRfc3161, timestampDigest, ...extraSigningArgs } = options.options.azureSignOptions;
47
+ const params = {
48
+ ...extraSigningArgs,
49
+ Endpoint: endpoint,
50
+ CertificateProfileName: certificateProfileName,
51
+ CodeSigningAccountName: codeSigningAccountName,
52
+ TimestampRfc3161: timestampRfc3161 || "http://timestamp.acs.microsoft.com",
53
+ TimestampDigest: timestampDigest || "SHA256",
54
+ FileDigest: fileDigest || "SHA256",
55
+ Files: vm.toVmFile(options.path),
56
+ };
57
+ const paramsString = Object.entries(params)
58
+ .filter(([_, value]) => value != null)
59
+ .reduce((res, [field, value]) => {
60
+ const escapedValue = String(value).replace(/'/g, "''");
61
+ return [...res, `-${field}`, `'${escapedValue}'`];
62
+ }, [])
63
+ .join(" ");
64
+ await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", `Invoke-TrustedSigning ${paramsString}`]);
65
+ return true;
66
+ }
67
+ }
68
+ //# sourceMappingURL=windowsSignAzureManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsSignAzureManager.js","sourceRoot":"","sources":["../../../src/codeSign/win/windowsSignAzureManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAO/B,MAAM,OAAO,uBAAuB;IAgBlC,YAA6B,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAbzC,0BAAqB,GAAG,IAAI,IAAI,CAAuB,GAAG,EAAE;YACnE,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,aAAa,CAAA;YAC1E,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;gBAC3B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC9B,CAAC;iBAAM,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;gBACjC,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAA;YAChD,CAAC;YAED,6FAA6F;YAC7F,uBAAuB;YACvB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC9B,CAAC,CAAC,CAAA;QA2BO,YAAO,GAAG,IAAI,QAAQ,CAC7B,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,EACnC,SAAS,CAAC,EAAE,CAAC,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"\nimport { WindowsAzureSigningConfiguration, WindowsConfiguration } from \"../../options/winOptions.js\"\nimport { WinPackager } from \"../../winPackager.js\"\nimport { SignManager } from \"../signManager.js\"\nimport { WindowsSignOptions } from \"./windowsCodeSign.js\"\nimport { CertificateFromStoreInfo, FileCodeSigningInfo } from \"./windowsSignToolManager.js\"\n\nexport class WindowsSignAzureManager implements SignManager {\n private readonly platformOptions: WindowsConfiguration\n\n readonly computedPublisherName = new Lazy<Array<string> | null>(() => {\n const publisherName = this.platformOptions.azureSignOptions?.publisherName\n if (publisherName === null) {\n return Promise.resolve(null)\n } else if (publisherName != null) {\n return Promise.resolve(asArray(publisherName))\n }\n\n // TODO: Is there another way to automatically pull Publisher Name from AzureTrusted service?\n // For now return null.\n return Promise.resolve(null)\n })\n\n constructor(private readonly packager: WinPackager) {\n this.platformOptions = packager.platformOptions\n }\n\n async initialize() {\n const vm = await this.packager.vm.value\n const ps = await vm.powershellCommand.value\n\n log.info(null, \"installing required module (TrustedSigning) with scope CurrentUser\")\n try {\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", \"Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser\"])\n } catch (error: any) {\n // Might not be needed, seems GH runners already have NuGet set up.\n // Logging to debug just in case users run into this. If NuGet isn't present, Install-Module -Name TrustedSigning will fail, so we'll get the logs at that point\n log.debug({ message: error.message || error.stack }, \"unable to install PackageProvider Nuget. Might be a false alarm though as some systems already have it installed\")\n }\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", \"Install-Module -Name TrustedSigning -MinimumVersion 0.5.0 -Force -Repository PSGallery -Scope CurrentUser\"])\n\n // If signing has been misconfigured it, the error from the TrustedSigning module should be descriptive enough to help them fix their configuration.\n // Options: https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition\n }\n\n computePublisherName(): Promise<string> {\n return Promise.resolve(this.packager.platformOptions.azureSignOptions!.publisherName)\n }\n readonly cscInfo = new MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>(\n () => this.packager.platformOptions,\n _selected => Promise.resolve(null)\n )\n // prerequisite: requires `initializeProviderModules` to already have been executed\n async signFile(options: WindowsSignOptions): Promise<boolean> {\n const vm = await this.packager.vm.value\n const ps = await vm.powershellCommand.value\n\n const {\n publisherName: _publisher, // extract from `extraSigningArgs`\n endpoint,\n certificateProfileName,\n codeSigningAccountName,\n fileDigest,\n timestampRfc3161,\n timestampDigest,\n ...extraSigningArgs\n }: WindowsAzureSigningConfiguration = options.options.azureSignOptions!\n const params = {\n ...extraSigningArgs,\n Endpoint: endpoint,\n CertificateProfileName: certificateProfileName,\n CodeSigningAccountName: codeSigningAccountName,\n TimestampRfc3161: timestampRfc3161 || \"http://timestamp.acs.microsoft.com\",\n TimestampDigest: timestampDigest || \"SHA256\",\n FileDigest: fileDigest || \"SHA256\",\n Files: vm.toVmFile(options.path),\n }\n const paramsString = Object.entries(params)\n .filter(([_, value]) => value != null)\n .reduce((res, [field, value]) => {\n const escapedValue = String(value).replace(/'/g, \"''\")\n return [...res, `-${field}`, `'${escapedValue}'`]\n }, [] as string[])\n .join(\" \")\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", `Invoke-TrustedSigning ${paramsString}`])\n\n return true\n }\n}\n"]}
@@ -0,0 +1,59 @@
1
+ import { MemoLazy } from "builder-util-runtime";
2
+ import { Lazy } from "lazy-val";
3
+ import { Target } from "../../core.js";
4
+ import { WindowsConfiguration } from "../../options/winOptions.js";
5
+ import { ToolInfo } from "../../util/bundledTool.js";
6
+ import { VmManager } from "../../vm/vm.js";
7
+ import { WinPackager } from "../../winPackager.js";
8
+ import { SignManager } from "../signManager.js";
9
+ import { WindowsSignOptions } from "./windowsCodeSign.js";
10
+ export type CustomWindowsSign = (configuration: CustomWindowsSignTaskConfiguration, packager?: WinPackager) => Promise<any>;
11
+ export interface WindowsSignToolOptions extends WindowsSignOptions {
12
+ readonly name: string;
13
+ readonly site: string | null;
14
+ }
15
+ export interface FileCodeSigningInfo {
16
+ readonly file: string;
17
+ readonly password: string | null;
18
+ }
19
+ export interface WindowsSignTaskConfiguration extends WindowsSignToolOptions {
20
+ readonly cscInfo: FileCodeSigningInfo | CertificateFromStoreInfo | null;
21
+ resultOutputPath?: string;
22
+ hash: string;
23
+ isNest: boolean;
24
+ }
25
+ export interface CustomWindowsSignTaskConfiguration extends WindowsSignTaskConfiguration {
26
+ computeSignToolArgs(isWin: boolean): Array<string>;
27
+ }
28
+ export interface CertificateInfo {
29
+ readonly commonName: string;
30
+ readonly bloodyMicrosoftSubjectDn: string;
31
+ }
32
+ export interface CertificateFromStoreInfo {
33
+ thumbprint: string;
34
+ subject: string;
35
+ store: string;
36
+ isLocalMachineStore: boolean;
37
+ }
38
+ export declare class WindowsSignToolManager implements SignManager {
39
+ private readonly packager;
40
+ private readonly platformOptions;
41
+ constructor(packager: WinPackager);
42
+ readonly computedPublisherName: Lazy<string[] | null>;
43
+ readonly lazyCertInfo: MemoLazy<MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>, CertificateInfo | null>;
44
+ readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>;
45
+ initialize(): Promise<void>;
46
+ computePublisherName(target: Target, publisherName: string): Promise<string>;
47
+ signFile(options: WindowsSignOptions): Promise<boolean>;
48
+ getCertInfo(file: string, password: string): Promise<CertificateInfo>;
49
+ computeSignToolArgs(options: WindowsSignTaskConfiguration, isWin: boolean, vm?: VmManager): Array<string>;
50
+ private computeWindowsSignArgs;
51
+ private computeOsslsigncodeArgs;
52
+ private addCertificateArgs;
53
+ private addCommonSigningArgs;
54
+ getOutputPath(inputPath: string, hash: string): string;
55
+ getCertificateFromStoreInfo(options: WindowsConfiguration, vm: VmManager): Promise<CertificateFromStoreInfo>;
56
+ getToolPath(isWin?: boolean): Promise<ToolInfo>;
57
+ doSign(configuration: CustomWindowsSignTaskConfiguration, packager: WinPackager): Promise<void>;
58
+ }
59
+ //# sourceMappingURL=windowsSignToolManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsSignToolManager.d.ts","sourceRoot":"","sources":["../../../src/codeSign/win/windowsSignToolManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAW,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAGpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGzD,MAAM,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,kCAAkC,EAAE,QAAQ,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;AAE3H,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,WAAW,4BAA6B,SAAQ,sBAAsB;IAC1E,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,IAAI,CAAA;IAGvE,gBAAgB,CAAC,EAAE,MAAM,C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