app-builder-lib 26.15.2 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Framework.d.ts +40 -0
- package/dist/Framework.d.ts.map +1 -0
- package/dist/Framework.js +4 -0
- package/dist/Framework.js.map +1 -0
- package/dist/appInfo.d.ts +32 -0
- package/dist/appInfo.d.ts.map +1 -0
- package/dist/appInfo.js +145 -0
- package/dist/appInfo.js.map +1 -0
- package/dist/asar/asar.d.ts +39 -0
- package/dist/asar/asar.d.ts.map +1 -0
- package/dist/asar/asar.js +155 -0
- package/dist/asar/asar.js.map +1 -0
- package/dist/asar/asarFileChecker.d.ts +3 -0
- package/dist/asar/asarFileChecker.d.ts.map +1 -0
- package/dist/asar/asarFileChecker.js +22 -0
- package/dist/asar/asarFileChecker.js.map +1 -0
- package/dist/asar/asarUtil.d.ts +2 -0
- package/dist/asar/asarUtil.d.ts.map +1 -0
- package/dist/asar/asarUtil.js +278 -0
- package/dist/asar/asarUtil.js.map +1 -0
- package/dist/asar/integrity.d.ts +16 -0
- package/dist/asar/integrity.d.ts.map +1 -0
- package/dist/asar/integrity.js +59 -0
- package/dist/asar/integrity.js.map +1 -0
- package/dist/asar/unpackDetector.d.ts +2 -0
- package/dist/asar/unpackDetector.d.ts.map +1 -0
- package/dist/asar/unpackDetector.js +39 -0
- package/dist/asar/unpackDetector.js.map +1 -0
- package/dist/codeSign/certInfo.d.ts +55 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -0
- package/dist/codeSign/certInfo.js +459 -0
- package/dist/codeSign/certInfo.js.map +1 -0
- package/dist/codeSign/codesign.d.ts +4 -0
- package/dist/codeSign/codesign.d.ts.map +1 -0
- package/dist/codeSign/codesign.js +32 -0
- package/dist/codeSign/codesign.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +29 -0
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -0
- package/dist/codeSign/mac/macCodeSign.js +273 -0
- package/dist/codeSign/mac/macCodeSign.js.map +1 -0
- package/dist/codeSign/signManager.d.ts +14 -0
- package/dist/codeSign/signManager.d.ts.map +1 -0
- package/dist/codeSign/signManager.js +2 -0
- package/dist/codeSign/signManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +8 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.js +34 -0
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +18 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.js +68 -0
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts +59 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.js +364 -0
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -0
- package/dist/configuration.d.ts +1010 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +2 -0
- package/dist/configuration.js.map +1 -0
- package/dist/core.d.ts +61 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +61 -0
- package/dist/core.js.map +1 -0
- package/dist/electron/ElectronFramework.d.ts +17 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -0
- package/dist/electron/ElectronFramework.js +236 -0
- package/dist/electron/ElectronFramework.js.map +1 -0
- package/dist/electron/electronVersion.d.ts +7 -0
- package/dist/electron/electronVersion.d.ts.map +1 -0
- package/dist/electron/electronVersion.js +119 -0
- package/dist/electron/electronVersion.js.map +1 -0
- package/dist/electron/injectFFMPEG.d.ts +12 -0
- package/dist/electron/injectFFMPEG.d.ts.map +1 -0
- package/dist/electron/injectFFMPEG.js +53 -0
- package/dist/electron/injectFFMPEG.js.map +1 -0
- package/dist/electron/mac/electronMac.d.ts +2 -0
- package/dist/electron/mac/electronMac.d.ts.map +1 -0
- package/dist/electron/mac/electronMac.js +254 -0
- package/dist/electron/mac/electronMac.js.map +1 -0
- package/dist/electron/search-module.d.ts +24 -0
- package/dist/electron/search-module.d.ts.map +1 -0
- package/dist/electron/search-module.js +68 -0
- package/dist/electron/search-module.js.map +1 -0
- package/dist/electron/win/electronWin.d.ts +2 -0
- package/dist/electron/win/electronWin.d.ts.map +1 -0
- package/dist/electron/win/electronWin.js +36 -0
- package/dist/electron/win/electronWin.js.map +1 -0
- package/dist/errorMessages.d.ts +2 -0
- package/dist/errorMessages.d.ts.map +1 -0
- package/dist/errorMessages.js +8 -0
- package/dist/errorMessages.js.map +1 -0
- package/dist/fileMatcher.d.ts +31 -0
- package/dist/fileMatcher.d.ts.map +1 -0
- package/dist/fileMatcher.js +277 -0
- package/dist/fileMatcher.js.map +1 -0
- package/dist/fileTransformer.d.ts +2 -0
- package/dist/fileTransformer.d.ts.map +1 -0
- package/dist/fileTransformer.js +82 -0
- package/dist/fileTransformer.js.map +1 -0
- package/dist/forge-maker.d.ts +6 -0
- package/dist/forge-maker.d.ts.map +1 -0
- package/dist/forge-maker.js +20 -0
- package/dist/forge-maker.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/indexInternal.d.ts +46 -0
- package/dist/indexInternal.d.ts.map +1 -0
- package/dist/indexInternal.js +39 -0
- package/dist/indexInternal.js.map +1 -0
- package/dist/linuxPackager.d.ts +13 -0
- package/dist/linuxPackager.d.ts.map +1 -0
- package/dist/linuxPackager.js +75 -0
- package/dist/linuxPackager.js.map +1 -0
- package/dist/macPackager.d.ts +50 -0
- package/dist/macPackager.d.ts.map +1 -0
- package/dist/macPackager.js +442 -0
- package/dist/macPackager.js.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js +14 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/hoist.d.ts +124 -0
- package/dist/node-module-collector/hoist.d.ts.map +1 -0
- package/dist/node-module-collector/hoist.js +880 -0
- package/dist/node-module-collector/hoist.js.map +1 -0
- package/dist/node-module-collector/index.d.ts +21 -0
- package/dist/node-module-collector/index.d.ts.map +1 -0
- package/dist/node-module-collector/index.js +124 -0
- package/dist/node-module-collector/index.js.map +1 -0
- package/dist/node-module-collector/moduleManager.d.ts +94 -0
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -0
- package/dist/node-module-collector/moduleManager.js +314 -0
- package/dist/node-module-collector/moduleManager.js.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts +138 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.js +421 -0
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts +15 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js +75 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/packageManager.d.ts +18 -0
- package/dist/node-module-collector/packageManager.d.ts.map +1 -0
- package/dist/node-module-collector/packageManager.js +137 -0
- package/dist/node-module-collector/packageManager.js.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +45 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +184 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js +118 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/types.d.ts +53 -0
- package/dist/node-module-collector/types.d.ts.map +1 -0
- package/dist/node-module-collector/types.js +2 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts +16 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js +87 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js +18 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js.map +1 -0
- package/dist/options/AppXOptions.d.ts +106 -0
- package/dist/options/AppXOptions.d.ts.map +1 -0
- package/dist/options/AppXOptions.js +2 -0
- package/dist/options/AppXOptions.js.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts +48 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js +47 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js.map +1 -0
- package/dist/options/FileAssociation.d.ts +46 -0
- package/dist/options/FileAssociation.d.ts.map +1 -0
- package/dist/options/FileAssociation.js +2 -0
- package/dist/options/MsiOptions.d.ts +27 -0
- package/dist/options/MsiOptions.d.ts.map +1 -0
- package/dist/options/MsiOptions.js +2 -0
- package/dist/options/MsiOptions.js.map +1 -0
- package/dist/options/MsiWrappedOptions.d.ts +27 -0
- package/dist/options/MsiWrappedOptions.d.ts.map +1 -0
- package/dist/options/MsiWrappedOptions.js +2 -0
- package/dist/options/MsiWrappedOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +261 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.js +2 -0
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -0
- package/dist/options/SnapOptions.d.ts +480 -0
- package/dist/options/SnapOptions.d.ts.map +1 -0
- package/dist/options/SnapOptions.js +2 -0
- package/dist/options/SnapOptions.js.map +1 -0
- package/dist/options/SquirrelWindowsOptions.d.ts +47 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -0
- package/dist/options/SquirrelWindowsOptions.js +2 -0
- package/dist/options/SquirrelWindowsOptions.js.map +1 -0
- package/dist/options/linuxOptions.d.ts +289 -0
- package/dist/options/linuxOptions.d.ts.map +1 -0
- package/dist/options/linuxOptions.js +2 -0
- package/dist/options/linuxOptions.js.map +1 -0
- package/dist/options/macOptions.d.ts +390 -0
- package/dist/options/macOptions.d.ts.map +1 -0
- package/dist/options/macOptions.js +2 -0
- package/dist/options/macOptions.js.map +1 -0
- package/dist/options/metadata.d.ts +54 -0
- package/dist/options/metadata.d.ts.map +1 -0
- package/dist/options/metadata.js +2 -0
- package/dist/options/metadata.js.map +1 -0
- package/dist/options/pkgOptions.d.ts +137 -0
- package/dist/options/pkgOptions.d.ts.map +1 -0
- package/dist/options/pkgOptions.js +2 -0
- package/dist/options/pkgOptions.js.map +1 -0
- package/dist/options/winOptions.d.ts +166 -0
- package/dist/options/winOptions.d.ts.map +1 -0
- package/dist/options/winOptions.js +2 -0
- package/dist/options/winOptions.js.map +1 -0
- package/dist/packager.d.ts +100 -0
- package/dist/packager.d.ts.map +1 -0
- package/dist/packager.js +491 -0
- package/dist/packager.js.map +1 -0
- package/dist/packagerApi.d.ts +32 -0
- package/dist/packagerApi.d.ts.map +1 -0
- package/dist/packagerApi.js +2 -0
- package/dist/packagerApi.js.map +1 -0
- package/dist/platformPackager.d.ts +132 -0
- package/dist/platformPackager.d.ts.map +1 -0
- package/dist/platformPackager.js +761 -0
- package/dist/platformPackager.js.map +1 -0
- package/dist/presets/rectCra.d.ts +2 -0
- package/dist/presets/rectCra.d.ts.map +1 -0
- package/dist/presets/rectCra.js +19 -0
- package/dist/presets/rectCra.js.map +1 -0
- package/dist/publish/PublishManager.d.ts +33 -0
- package/dist/publish/PublishManager.d.ts.map +1 -0
- package/dist/publish/PublishManager.js +470 -0
- package/dist/publish/PublishManager.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts +15 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -0
- package/dist/publish/updateInfoBuilder.js +221 -0
- package/dist/publish/updateInfoBuilder.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts +12 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -0
- package/dist/targets/ArchiveTarget.js +93 -0
- package/dist/targets/ArchiveTarget.js.map +1 -0
- package/dist/targets/archive.d.ts +27 -0
- package/dist/targets/archive.d.ts.map +1 -0
- package/dist/targets/archive.js +174 -0
- package/dist/targets/archive.js.map +1 -0
- package/dist/targets/blockmap/blockmap.d.ts +17 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmap.js +150 -0
- package/dist/targets/blockmap/blockmap.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +16 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.js +73 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -0
- package/dist/targets/linux/FlatpakTarget.d.ts +21 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -0
- package/dist/targets/linux/FlatpakTarget.js +156 -0
- package/dist/targets/linux/FlatpakTarget.js.map +1 -0
- package/dist/targets/linux/FpmTarget.d.ts +23 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -0
- package/dist/targets/linux/FpmTarget.js +365 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts +24 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.js +332 -0
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +16 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.js +141 -0
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts +57 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.js +317 -0
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts +4 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.js +91 -0
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts +37 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.js +96 -0
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -0
- package/dist/targets/linux/snap/core24.d.ts +53 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -0
- package/dist/targets/linux/snap/core24.js +444 -0
- package/dist/targets/linux/snap/core24.js.map +1 -0
- package/dist/targets/linux/snap/coreCustom.d.ts +29 -0
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreCustom.js +60 -0
- package/dist/targets/linux/snap/coreCustom.js.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts +46 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.js +402 -0
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +40 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js +414 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +30 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -0
- package/dist/targets/mac/MacTargetHelper.js +267 -0
- package/dist/targets/mac/MacTargetHelper.js.map +1 -0
- package/dist/targets/mac/pkg.d.ts +31 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -0
- package/dist/targets/mac/pkg.js +271 -0
- package/dist/targets/mac/pkg.js.map +1 -0
- package/dist/targets/targetFactory.d.ts +13 -0
- package/dist/targets/targetFactory.d.ts.map +1 -0
- package/dist/targets/targetFactory.js +94 -0
- package/dist/targets/targetFactory.js.map +1 -0
- package/dist/targets/targetUtil.d.ts +16 -0
- package/dist/targets/targetUtil.d.ts.map +1 -0
- package/dist/targets/targetUtil.js +40 -0
- package/dist/targets/targetUtil.js.map +1 -0
- package/dist/targets/win/AppxCapabilities.d.ts +9 -0
- package/dist/targets/win/AppxCapabilities.d.ts.map +1 -0
- package/dist/targets/win/AppxCapabilities.js +254 -0
- package/dist/targets/win/AppxCapabilities.js.map +1 -0
- package/dist/targets/win/AppxTarget.d.ts +18 -0
- package/dist/targets/win/AppxTarget.d.ts.map +1 -0
- package/dist/targets/win/AppxTarget.js +398 -0
- package/dist/targets/win/AppxTarget.js.map +1 -0
- package/dist/targets/win/MsiTarget.d.ts +29 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiTarget.js +268 -0
- package/dist/targets/win/MsiTarget.js.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts +20 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.js +77 -0
- package/dist/targets/win/MsiWrappedTarget.js.map +1 -0
- package/dist/targets/win/nsis/Commands.d.ts +10 -0
- package/dist/targets/win/nsis/Commands.d.ts.map +1 -0
- package/dist/targets/win/nsis/Commands.js +2 -0
- package/dist/targets/win/nsis/Commands.js.map +1 -0
- package/dist/targets/win/nsis/Defines.d.ts +81 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -0
- package/dist/targets/win/nsis/Defines.js +2 -0
- package/dist/targets/win/nsis/Defines.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +43 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.js +726 -0
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts +14 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js +43 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -0
- package/dist/targets/win/nsis/nsisLang.d.ts +11 -0
- package/dist/targets/win/nsis/nsisLang.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLang.js +94 -0
- package/dist/targets/win/nsis/nsisLang.js.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts +5 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.js +73 -0
- package/dist/targets/win/nsis/nsisLicense.js.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts +275 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.js +2 -0
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +13 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js +59 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts +26 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.js +218 -0
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts +19 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.js +49 -0
- package/dist/targets/win/nsis/nsisValidation.js.map +1 -0
- package/dist/toolsets/7zip.d.ts +9 -0
- package/dist/toolsets/7zip.d.ts.map +1 -0
- package/dist/toolsets/7zip.js +80 -0
- package/dist/toolsets/7zip.js.map +1 -0
- package/dist/toolsets/appimage.d.ts +20 -0
- package/dist/toolsets/appimage.d.ts.map +1 -0
- package/dist/toolsets/appimage.js +67 -0
- package/dist/toolsets/appimage.js.map +1 -0
- package/dist/toolsets/custom.d.ts +5 -0
- package/dist/toolsets/custom.d.ts.map +1 -0
- package/dist/toolsets/custom.js +200 -0
- package/dist/toolsets/custom.js.map +1 -0
- package/dist/toolsets/fpm.d.ts +3 -0
- package/dist/toolsets/fpm.d.ts.map +1 -0
- package/dist/toolsets/fpm.js +49 -0
- package/dist/toolsets/fpm.js.map +1 -0
- package/dist/toolsets/icons.d.ts +12 -0
- package/dist/toolsets/icons.d.ts.map +1 -0
- package/dist/toolsets/icons.js +36 -0
- package/dist/toolsets/icons.js.map +1 -0
- package/dist/toolsets/linuxToolsMac.d.ts +8 -0
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -0
- package/dist/toolsets/linuxToolsMac.js +31 -0
- package/dist/toolsets/linuxToolsMac.js.map +1 -0
- package/dist/toolsets/nsis.d.ts +13 -0
- package/dist/toolsets/nsis.d.ts.map +1 -0
- package/dist/toolsets/nsis.js +100 -0
- package/dist/toolsets/nsis.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +42 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -0
- package/dist/toolsets/winCodeSign.js +142 -0
- package/dist/toolsets/winCodeSign.js.map +1 -0
- package/dist/toolsets/wine.d.ts +6 -0
- package/dist/toolsets/wine.d.ts.map +1 -0
- package/dist/toolsets/wine.js +79 -0
- package/dist/toolsets/wine.js.map +1 -0
- package/dist/util/AppFileWalker.d.ts +14 -0
- package/dist/util/AppFileWalker.d.ts.map +1 -0
- package/dist/util/AppFileWalker.js +69 -0
- package/dist/util/AppFileWalker.js.map +1 -0
- package/dist/util/NodeModuleCopyHelper.d.ts +2 -0
- package/dist/util/NodeModuleCopyHelper.d.ts.map +1 -0
- package/dist/util/NodeModuleCopyHelper.js +160 -0
- package/dist/util/NodeModuleCopyHelper.js.map +1 -0
- package/dist/util/appFileCopier.d.ts +17 -0
- package/dist/util/appFileCopier.d.ts.map +1 -0
- package/dist/util/appFileCopier.js +190 -0
- package/dist/util/appFileCopier.js.map +1 -0
- package/dist/util/asyncEventEmitter.d.ts +34 -0
- package/dist/util/asyncEventEmitter.d.ts.map +1 -0
- package/dist/util/asyncEventEmitter.js +56 -0
- package/dist/util/asyncEventEmitter.js.map +1 -0
- package/dist/util/bundledTool.d.ts +8 -0
- package/dist/util/bundledTool.d.ts.map +1 -0
- package/dist/util/bundledTool.js +16 -0
- package/dist/util/bundledTool.js.map +1 -0
- package/dist/util/cacheManager.d.ts +19 -0
- package/dist/util/cacheManager.d.ts.map +1 -0
- package/dist/util/cacheManager.js +65 -0
- package/dist/util/cacheManager.js.map +1 -0
- package/dist/util/cacheState.d.ts +29 -0
- package/dist/util/cacheState.d.ts.map +1 -0
- package/dist/util/cacheState.js +134 -0
- package/dist/util/cacheState.js.map +1 -0
- package/dist/util/config/config.d.ts +13 -0
- package/dist/util/config/config.d.ts.map +1 -0
- package/dist/util/config/config.js +236 -0
- package/dist/util/config/config.js.map +1 -0
- package/dist/util/config/load.d.ts +20 -0
- package/dist/util/config/load.d.ts.map +1 -0
- package/dist/util/config/load.js +122 -0
- package/dist/util/config/load.js.map +1 -0
- package/dist/util/config/schemaValidator.d.ts +8 -0
- package/dist/util/config/schemaValidator.d.ts.map +1 -0
- package/dist/util/config/schemaValidator.js +161 -0
- package/dist/util/config/schemaValidator.js.map +1 -0
- package/dist/util/dynamicImport.d.ts +2 -0
- package/dist/util/dynamicImport.d.ts.map +1 -0
- package/dist/util/dynamicImport.js +9 -0
- package/dist/util/dynamicImport.js.map +1 -0
- package/dist/util/electronGet.d.ts +68 -0
- package/dist/util/electronGet.d.ts.map +1 -0
- package/dist/util/electronGet.js +560 -0
- package/dist/util/electronGet.js.map +1 -0
- package/dist/util/filter.d.ts +2 -0
- package/dist/util/filter.d.ts.map +1 -0
- package/dist/util/filter.js +64 -0
- package/dist/util/filter.js.map +1 -0
- package/dist/util/flags.d.ts +16 -0
- package/dist/util/flags.d.ts.map +1 -0
- package/dist/util/flags.js +53 -0
- package/dist/util/flags.js.map +1 -0
- package/dist/util/hash.d.ts +2 -0
- package/dist/util/hash.d.ts.map +1 -0
- package/dist/util/hash.js +16 -0
- package/dist/util/hash.js.map +1 -0
- package/dist/util/iconConverter.d.ts +29 -0
- package/dist/util/iconConverter.d.ts.map +1 -0
- package/dist/util/iconConverter.js +255 -0
- package/dist/util/iconConverter.js.map +1 -0
- package/dist/util/langs.d.ts +190 -0
- package/dist/util/langs.d.ts.map +1 -0
- package/dist/util/langs.js +432 -0
- package/dist/util/langs.js.map +1 -0
- package/dist/util/license.d.ts +17 -0
- package/dist/util/license.d.ts.map +1 -0
- package/dist/util/license.js +42 -0
- package/dist/util/license.js.map +1 -0
- package/dist/util/mac/macosIconComposer.d.ts +11 -0
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -0
- package/dist/util/mac/macosIconComposer.js +99 -0
- package/dist/util/mac/macosIconComposer.js.map +1 -0
- package/dist/util/mac/macosVersion.d.ts +4 -0
- package/dist/util/mac/macosVersion.d.ts.map +1 -0
- package/dist/util/mac/macosVersion.js +31 -0
- package/dist/util/mac/macosVersion.js.map +1 -0
- package/dist/util/mac/plist.d.ts +8 -0
- package/dist/util/mac/plist.d.ts.map +1 -0
- package/dist/util/mac/plist.js +27 -0
- package/dist/util/mac/plist.js.map +1 -0
- package/dist/util/macroExpander.d.ts +4 -0
- package/dist/util/macroExpander.d.ts.map +1 -0
- package/dist/util/macroExpander.js +61 -0
- package/dist/util/macroExpander.js.map +1 -0
- package/dist/util/normalizePackageData.d.ts +2 -0
- package/dist/util/normalizePackageData.d.ts.map +1 -0
- package/dist/util/normalizePackageData.js +323 -0
- package/dist/util/normalizePackageData.js.map +1 -0
- package/dist/util/packageMetadata.d.ts +2 -0
- package/dist/util/packageMetadata.d.ts.map +1 -0
- package/dist/util/packageMetadata.js +118 -0
- package/dist/util/packageMetadata.js.map +1 -0
- package/dist/util/pathManager.d.ts +4 -0
- package/dist/util/pathManager.d.ts.map +1 -0
- package/dist/util/pathManager.js +17 -0
- package/dist/util/pathManager.js.map +1 -0
- package/dist/util/rebuild.d.ts +3 -0
- package/dist/util/rebuild.d.ts.map +1 -0
- package/dist/util/rebuild.js +54 -0
- package/dist/util/rebuild.js.map +1 -0
- package/dist/util/repositoryInfo.d.ts +4 -0
- package/dist/util/repositoryInfo.d.ts.map +1 -0
- package/dist/util/repositoryInfo.js +76 -0
- package/dist/util/repositoryInfo.js.map +1 -0
- package/dist/util/resolve.d.ts +3 -0
- package/dist/util/resolve.d.ts.map +1 -0
- package/dist/util/resolve.js +56 -0
- package/dist/util/resolve.js.map +1 -0
- package/dist/util/timer.d.ts +12 -0
- package/dist/util/timer.d.ts.map +1 -0
- package/dist/util/timer.js +23 -0
- package/dist/util/timer.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -0
- package/dist/util/toolsetLock.js +20 -0
- package/dist/util/toolsetLock.js.map +1 -0
- package/dist/util/win/resEdit.d.ts +11 -0
- package/dist/util/win/resEdit.d.ts.map +1 -0
- package/dist/util/win/resEdit.js +46 -0
- package/dist/util/win/resEdit.js.map +1 -0
- package/dist/util/yarn.d.ts +23 -0
- package/dist/util/yarn.d.ts.map +1 -0
- package/dist/util/yarn.js +153 -0
- package/dist/util/yarn.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/vm/MonoVm.d.ts +9 -0
- package/dist/vm/MonoVm.d.ts.map +1 -0
- package/dist/vm/MonoVm.js +16 -0
- package/dist/vm/MonoVm.js.map +1 -0
- package/dist/vm/ParallelsVm.d.ts +24 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -0
- package/dist/vm/ParallelsVm.js +107 -0
- package/dist/vm/ParallelsVm.js.map +1 -0
- package/dist/vm/PwshVm.d.ts +7 -0
- package/dist/vm/PwshVm.d.ts.map +1 -0
- package/dist/vm/PwshVm.js +21 -0
- package/dist/vm/PwshVm.js.map +1 -0
- package/dist/vm/WineVm.d.ts +14 -0
- package/dist/vm/WineVm.d.ts.map +1 -0
- package/dist/vm/WineVm.js +35 -0
- package/dist/vm/WineVm.js.map +1 -0
- package/dist/vm/vm.d.ts +15 -0
- package/dist/vm/vm.d.ts.map +1 -0
- package/dist/vm/vm.js +81 -0
- package/dist/vm/vm.js.map +1 -0
- package/dist/winPackager.d.ts +30 -0
- package/dist/winPackager.d.ts.map +1 -0
- package/dist/winPackager.js +270 -0
- package/dist/winPackager.js.map +1 -0
- package/helpers/package.json +6 -0
- package/helpers/remote-rebuild.js +2 -4
- package/package.json +30 -33
- package/scheme.json +379 -721
- package/out/Framework.d.ts +0 -36
- package/out/Framework.js +0 -7
- package/out/Framework.js.map +0 -1
- package/out/ProtonFramework.d.ts +0 -10
- package/out/ProtonFramework.js +0 -94
- package/out/ProtonFramework.js.map +0 -1
- package/out/appInfo.d.ts +0 -31
- package/out/appInfo.js +0 -152
- package/out/appInfo.js.map +0 -1
- package/out/asar/asar.d.ts +0 -38
- package/out/asar/asar.js +0 -163
- package/out/asar/asar.js.map +0 -1
- package/out/asar/asarFileChecker.d.ts +0 -2
- package/out/asar/asarFileChecker.js +0 -25
- package/out/asar/asarFileChecker.js.map +0 -1
- package/out/asar/asarUtil.d.ts +0 -1
- package/out/asar/asarUtil.js +0 -285
- package/out/asar/asarUtil.js.map +0 -1
- package/out/asar/integrity.d.ts +0 -15
- package/out/asar/integrity.js +0 -62
- package/out/asar/integrity.js.map +0 -1
- package/out/asar/unpackDetector.d.ts +0 -1
- package/out/asar/unpackDetector.js +0 -43
- package/out/asar/unpackDetector.js.map +0 -1
- package/out/binDownload.d.ts +0 -5
- package/out/binDownload.js +0 -104
- package/out/binDownload.js.map +0 -1
- package/out/codeSign/certInfo.d.ts +0 -54
- package/out/codeSign/certInfo.js +0 -466
- package/out/codeSign/certInfo.js.map +0 -1
- package/out/codeSign/codesign.d.ts +0 -3
- package/out/codeSign/codesign.js +0 -33
- package/out/codeSign/codesign.js.map +0 -1
- package/out/codeSign/macCodeSign.d.ts +0 -28
- package/out/codeSign/macCodeSign.js +0 -284
- package/out/codeSign/macCodeSign.js.map +0 -1
- package/out/codeSign/signManager.d.ts +0 -13
- package/out/codeSign/signManager.js +0 -3
- package/out/codeSign/signManager.js.map +0 -1
- package/out/codeSign/windowsCodeSign.d.ts +0 -7
- package/out/codeSign/windowsCodeSign.js +0 -38
- package/out/codeSign/windowsCodeSign.js.map +0 -1
- package/out/codeSign/windowsSignAzureManager.d.ts +0 -17
- package/out/codeSign/windowsSignAzureManager.js +0 -73
- package/out/codeSign/windowsSignAzureManager.js.map +0 -1
- package/out/codeSign/windowsSignToolManager.d.ts +0 -58
- package/out/codeSign/windowsSignToolManager.js +0 -376
- package/out/codeSign/windowsSignToolManager.js.map +0 -1
- package/out/configuration.d.ts +0 -532
- package/out/configuration.js +0 -3
- package/out/configuration.js.map +0 -1
- package/out/core.d.ts +0 -60
- package/out/core.js +0 -66
- package/out/core.js.map +0 -1
- package/out/electron/ElectronFramework.d.ts +0 -16
- package/out/electron/ElectronFramework.js +0 -242
- package/out/electron/ElectronFramework.js.map +0 -1
- package/out/electron/electronMac.d.ts +0 -1
- package/out/electron/electronMac.js +0 -262
- package/out/electron/electronMac.js.map +0 -1
- package/out/electron/electronVersion.d.ts +0 -6
- package/out/electron/electronVersion.js +0 -125
- package/out/electron/electronVersion.js.map +0 -1
- package/out/electron/electronWin.d.ts +0 -1
- package/out/electron/electronWin.js +0 -38
- package/out/electron/electronWin.js.map +0 -1
- package/out/electron/injectFFMPEG.d.ts +0 -11
- package/out/electron/injectFFMPEG.js +0 -57
- package/out/electron/injectFFMPEG.js.map +0 -1
- package/out/electron/search-module.d.ts +0 -23
- package/out/electron/search-module.js +0 -73
- package/out/electron/search-module.js.map +0 -1
- package/out/errorMessages.d.ts +0 -1
- package/out/errorMessages.js +0 -11
- package/out/errorMessages.js.map +0 -1
- package/out/fileMatcher.d.ts +0 -29
- package/out/fileMatcher.js +0 -292
- package/out/fileMatcher.js.map +0 -1
- package/out/fileTransformer.d.ts +0 -1
- package/out/fileTransformer.js +0 -107
- package/out/fileTransformer.js.map +0 -1
- package/out/forge-maker.d.ts +0 -5
- package/out/forge-maker.js +0 -23
- package/out/forge-maker.js.map +0 -1
- package/out/frameworks/LibUiFramework.d.ts +0 -47
- package/out/frameworks/LibUiFramework.js +0 -197
- package/out/frameworks/LibUiFramework.js.map +0 -1
- package/out/index.d.ts +0 -39
- package/out/index.js +0 -99
- package/out/index.js.map +0 -1
- package/out/linuxPackager.d.ts +0 -12
- package/out/linuxPackager.js +0 -77
- package/out/linuxPackager.js.map +0 -1
- package/out/mac/MacTargetHelper.d.ts +0 -29
- package/out/mac/MacTargetHelper.js +0 -273
- package/out/mac/MacTargetHelper.js.map +0 -1
- package/out/macPackager.d.ts +0 -49
- package/out/macPackager.js +0 -445
- package/out/macPackager.js.map +0 -1
- package/out/node-module-collector/bunNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/bunNodeModulesCollector.js +0 -18
- package/out/node-module-collector/bunNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/hoist.d.ts +0 -123
- package/out/node-module-collector/hoist.js +0 -884
- package/out/node-module-collector/hoist.js.map +0 -1
- package/out/node-module-collector/index.d.ts +0 -18
- package/out/node-module-collector/index.js +0 -130
- package/out/node-module-collector/index.js.map +0 -1
- package/out/node-module-collector/moduleManager.d.ts +0 -93
- package/out/node-module-collector/moduleManager.js +0 -321
- package/out/node-module-collector/moduleManager.js.map +0 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +0 -137
- package/out/node-module-collector/nodeModulesCollector.js +0 -428
- package/out/node-module-collector/nodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -14
- package/out/node-module-collector/npmNodeModulesCollector.js +0 -80
- package/out/node-module-collector/npmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/packageManager.d.ts +0 -17
- package/out/node-module-collector/packageManager.js +0 -144
- package/out/node-module-collector/packageManager.js.map +0 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +0 -44
- package/out/node-module-collector/pnpmNodeModulesCollector.js +0 -191
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/traversalNodeModulesCollector.d.ts +0 -18
- package/out/node-module-collector/traversalNodeModulesCollector.js +0 -122
- package/out/node-module-collector/traversalNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/types.d.ts +0 -52
- package/out/node-module-collector/types.js +0 -3
- package/out/node-module-collector/yarnBerryNodeModulesCollector.d.ts +0 -15
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js +0 -93
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/yarnNodeModulesCollector.js +0 -22
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +0 -1
- package/out/options/AppXOptions.d.ts +0 -105
- package/out/options/AppXOptions.js +0 -3
- package/out/options/AppXOptions.js.map +0 -1
- package/out/options/CommonWindowsInstallerConfiguration.d.ts +0 -47
- package/out/options/CommonWindowsInstallerConfiguration.js +0 -51
- package/out/options/CommonWindowsInstallerConfiguration.js.map +0 -1
- package/out/options/FileAssociation.d.ts +0 -45
- package/out/options/FileAssociation.js +0 -3
- package/out/options/MsiOptions.d.ts +0 -26
- package/out/options/MsiOptions.js +0 -3
- package/out/options/MsiOptions.js.map +0 -1
- package/out/options/MsiWrappedOptions.d.ts +0 -26
- package/out/options/MsiWrappedOptions.js +0 -3
- package/out/options/MsiWrappedOptions.js.map +0 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +0 -238
- package/out/options/PlatformSpecificBuildOptions.js +0 -3
- package/out/options/PlatformSpecificBuildOptions.js.map +0 -1
- package/out/options/SnapOptions.d.ts +0 -500
- package/out/options/SnapOptions.js +0 -3
- package/out/options/SnapOptions.js.map +0 -1
- package/out/options/SquirrelWindowsOptions.d.ts +0 -46
- package/out/options/SquirrelWindowsOptions.js +0 -3
- package/out/options/SquirrelWindowsOptions.js.map +0 -1
- package/out/options/linuxOptions.d.ts +0 -287
- package/out/options/linuxOptions.js +0 -3
- package/out/options/linuxOptions.js.map +0 -1
- package/out/options/macOptions.d.ts +0 -388
- package/out/options/macOptions.js +0 -3
- package/out/options/macOptions.js.map +0 -1
- package/out/options/metadata.d.ts +0 -53
- package/out/options/metadata.js +0 -3
- package/out/options/metadata.js.map +0 -1
- package/out/options/pkgOptions.d.ts +0 -136
- package/out/options/pkgOptions.js +0 -3
- package/out/options/pkgOptions.js.map +0 -1
- package/out/options/winOptions.d.ts +0 -164
- package/out/options/winOptions.js +0 -3
- package/out/options/winOptions.js.map +0 -1
- package/out/packager.d.ts +0 -99
- package/out/packager.js +0 -515
- package/out/packager.js.map +0 -1
- package/out/packagerApi.d.ts +0 -31
- package/out/packagerApi.js +0 -3
- package/out/packagerApi.js.map +0 -1
- package/out/platformPackager.d.ts +0 -101
- package/out/platformPackager.js +0 -714
- package/out/platformPackager.js.map +0 -1
- package/out/presets/rectCra.d.ts +0 -1
- package/out/presets/rectCra.js +0 -22
- package/out/presets/rectCra.js.map +0 -1
- package/out/publish/PublishManager.d.ts +0 -30
- package/out/publish/PublishManager.js +0 -497
- package/out/publish/PublishManager.js.map +0 -1
- package/out/publish/updateInfoBuilder.d.ts +0 -14
- package/out/publish/updateInfoBuilder.js +0 -226
- package/out/publish/updateInfoBuilder.js.map +0 -1
- package/out/targets/AppxCapabilities.d.ts +0 -8
- package/out/targets/AppxCapabilities.js +0 -258
- package/out/targets/AppxCapabilities.js.map +0 -1
- package/out/targets/AppxTarget.d.ts +0 -17
- package/out/targets/AppxTarget.js +0 -403
- package/out/targets/AppxTarget.js.map +0 -1
- package/out/targets/ArchiveTarget.d.ts +0 -11
- package/out/targets/ArchiveTarget.js +0 -88
- package/out/targets/ArchiveTarget.js.map +0 -1
- package/out/targets/FlatpakTarget.d.ts +0 -20
- package/out/targets/FlatpakTarget.js +0 -159
- package/out/targets/FlatpakTarget.js.map +0 -1
- package/out/targets/FpmTarget.d.ts +0 -22
- package/out/targets/FpmTarget.js +0 -372
- package/out/targets/FpmTarget.js.map +0 -1
- package/out/targets/LinuxTargetHelper.d.ts +0 -23
- package/out/targets/LinuxTargetHelper.js +0 -346
- package/out/targets/LinuxTargetHelper.js.map +0 -1
- package/out/targets/MsiTarget.d.ts +0 -28
- package/out/targets/MsiTarget.js +0 -268
- package/out/targets/MsiTarget.js.map +0 -1
- package/out/targets/MsiWrappedTarget.d.ts +0 -19
- package/out/targets/MsiWrappedTarget.js +0 -80
- package/out/targets/MsiWrappedTarget.js.map +0 -1
- package/out/targets/appimage/AppImageTarget.d.ts +0 -15
- package/out/targets/appimage/AppImageTarget.js +0 -147
- package/out/targets/appimage/AppImageTarget.js.map +0 -1
- package/out/targets/appimage/appImageUtil.d.ts +0 -56
- package/out/targets/appimage/appImageUtil.js +0 -323
- package/out/targets/appimage/appImageUtil.js.map +0 -1
- package/out/targets/appimage/appLauncher.d.ts +0 -3
- package/out/targets/appimage/appLauncher.js +0 -95
- package/out/targets/appimage/appLauncher.js.map +0 -1
- package/out/targets/archive.d.ts +0 -26
- package/out/targets/archive.js +0 -178
- package/out/targets/archive.js.map +0 -1
- package/out/targets/blockmap/blockmap.d.ts +0 -16
- package/out/targets/blockmap/blockmap.js +0 -153
- package/out/targets/blockmap/blockmap.js.map +0 -1
- package/out/targets/differentialUpdateInfoBuilder.d.ts +0 -15
- package/out/targets/differentialUpdateInfoBuilder.js +0 -80
- package/out/targets/differentialUpdateInfoBuilder.js.map +0 -1
- package/out/targets/nsis/Commands.d.ts +0 -9
- package/out/targets/nsis/Commands.js +0 -3
- package/out/targets/nsis/Commands.js.map +0 -1
- package/out/targets/nsis/Defines.d.ts +0 -80
- package/out/targets/nsis/Defines.js +0 -3
- package/out/targets/nsis/Defines.js.map +0 -1
- package/out/targets/nsis/NsisTarget.d.ts +0 -37
- package/out/targets/nsis/NsisTarget.js +0 -729
- package/out/targets/nsis/NsisTarget.js.map +0 -1
- package/out/targets/nsis/WebInstallerTarget.d.ts +0 -13
- package/out/targets/nsis/WebInstallerTarget.js +0 -47
- package/out/targets/nsis/WebInstallerTarget.js.map +0 -1
- package/out/targets/nsis/nsisLang.d.ts +0 -10
- package/out/targets/nsis/nsisLang.js +0 -100
- package/out/targets/nsis/nsisLang.js.map +0 -1
- package/out/targets/nsis/nsisLicense.d.ts +0 -4
- package/out/targets/nsis/nsisLicense.js +0 -77
- package/out/targets/nsis/nsisLicense.js.map +0 -1
- package/out/targets/nsis/nsisOptions.d.ts +0 -274
- package/out/targets/nsis/nsisOptions.js +0 -3
- package/out/targets/nsis/nsisOptions.js.map +0 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +0 -12
- package/out/targets/nsis/nsisScriptGenerator.js +0 -64
- package/out/targets/nsis/nsisScriptGenerator.js.map +0 -1
- package/out/targets/nsis/nsisUtil.d.ts +0 -25
- package/out/targets/nsis/nsisUtil.js +0 -225
- package/out/targets/nsis/nsisUtil.js.map +0 -1
- package/out/targets/nsis/nsisValidation.d.ts +0 -18
- package/out/targets/nsis/nsisValidation.js +0 -53
- package/out/targets/nsis/nsisValidation.js.map +0 -1
- package/out/targets/pkg.d.ts +0 -30
- package/out/targets/pkg.js +0 -279
- package/out/targets/pkg.js.map +0 -1
- package/out/targets/snap/SnapTarget.d.ts +0 -36
- package/out/targets/snap/SnapTarget.js +0 -105
- package/out/targets/snap/SnapTarget.js.map +0 -1
- package/out/targets/snap/core24.d.ts +0 -52
- package/out/targets/snap/core24.js +0 -449
- package/out/targets/snap/core24.js.map +0 -1
- package/out/targets/snap/coreCustom.d.ts +0 -28
- package/out/targets/snap/coreCustom.js +0 -63
- package/out/targets/snap/coreCustom.js.map +0 -1
- package/out/targets/snap/coreLegacy.d.ts +0 -43
- package/out/targets/snap/coreLegacy.js +0 -416
- package/out/targets/snap/coreLegacy.js.map +0 -1
- package/out/targets/snap/snapcraftBuilder.d.ts +0 -39
- package/out/targets/snap/snapcraftBuilder.js +0 -419
- package/out/targets/snap/snapcraftBuilder.js.map +0 -1
- package/out/targets/targetFactory.d.ts +0 -12
- package/out/targets/targetFactory.js +0 -101
- package/out/targets/targetFactory.js.map +0 -1
- package/out/targets/targetUtil.d.ts +0 -14
- package/out/targets/targetUtil.js +0 -47
- package/out/targets/targetUtil.js.map +0 -1
- package/out/toolsets/7zip.d.ts +0 -2
- package/out/toolsets/7zip.js +0 -72
- package/out/toolsets/7zip.js.map +0 -1
- package/out/toolsets/icons.d.ts +0 -8
- package/out/toolsets/icons.js +0 -37
- package/out/toolsets/icons.js.map +0 -1
- package/out/toolsets/linux.d.ts +0 -26
- package/out/toolsets/linux.js +0 -146
- package/out/toolsets/linux.js.map +0 -1
- package/out/toolsets/windows.d.ts +0 -61
- package/out/toolsets/windows.js +0 -259
- package/out/toolsets/windows.js.map +0 -1
- package/out/toolsets/wine.d.ts +0 -5
- package/out/toolsets/wine.js +0 -100
- package/out/toolsets/wine.js.map +0 -1
- package/out/util/AppFileWalker.d.ts +0 -13
- package/out/util/AppFileWalker.js +0 -74
- package/out/util/AppFileWalker.js.map +0 -1
- package/out/util/NodeModuleCopyHelper.d.ts +0 -1
- package/out/util/NodeModuleCopyHelper.js +0 -165
- package/out/util/NodeModuleCopyHelper.js.map +0 -1
- package/out/util/appFileCopier.d.ts +0 -16
- package/out/util/appFileCopier.js +0 -251
- package/out/util/appFileCopier.js.map +0 -1
- package/out/util/asyncEventEmitter.d.ts +0 -33
- package/out/util/asyncEventEmitter.js +0 -63
- package/out/util/asyncEventEmitter.js.map +0 -1
- package/out/util/bundledTool.d.ts +0 -7
- package/out/util/bundledTool.js +0 -20
- package/out/util/bundledTool.js.map +0 -1
- package/out/util/cacheManager.d.ts +0 -18
- package/out/util/cacheManager.js +0 -70
- package/out/util/cacheManager.js.map +0 -1
- package/out/util/cacheState.d.ts +0 -28
- package/out/util/cacheState.js +0 -143
- package/out/util/cacheState.js.map +0 -1
- package/out/util/config/config.d.ts +0 -12
- package/out/util/config/config.js +0 -256
- package/out/util/config/config.js.map +0 -1
- package/out/util/config/load.d.ts +0 -19
- package/out/util/config/load.js +0 -129
- package/out/util/config/load.js.map +0 -1
- package/out/util/config/schemaValidator.d.ts +0 -7
- package/out/util/config/schemaValidator.js +0 -154
- package/out/util/config/schemaValidator.js.map +0 -1
- package/out/util/dynamicImport.d.ts +0 -1
- package/out/util/dynamicImport.js +0 -12
- package/out/util/dynamicImport.js.map +0 -1
- package/out/util/electronGet.d.ts +0 -61
- package/out/util/electronGet.js +0 -464
- package/out/util/electronGet.js.map +0 -1
- package/out/util/envPath.d.ts +0 -2
- package/out/util/envPath.js +0 -28
- package/out/util/envPath.js.map +0 -1
- package/out/util/filter.d.ts +0 -1
- package/out/util/filter.js +0 -68
- package/out/util/filter.js.map +0 -1
- package/out/util/flags.d.ts +0 -3
- package/out/util/flags.js +0 -16
- package/out/util/flags.js.map +0 -1
- package/out/util/hash.d.ts +0 -1
- package/out/util/hash.js +0 -19
- package/out/util/hash.js.map +0 -1
- package/out/util/iconConverter.d.ts +0 -25
- package/out/util/iconConverter.js +0 -260
- package/out/util/iconConverter.js.map +0 -1
- package/out/util/langs.d.ts +0 -189
- package/out/util/langs.js +0 -436
- package/out/util/langs.js.map +0 -1
- package/out/util/license.d.ts +0 -16
- package/out/util/license.js +0 -47
- package/out/util/license.js.map +0 -1
- package/out/util/macosIconComposer.d.ts +0 -10
- package/out/util/macosIconComposer.js +0 -102
- package/out/util/macosIconComposer.js.map +0 -1
- package/out/util/macosVersion.d.ts +0 -3
- package/out/util/macosVersion.js +0 -36
- package/out/util/macosVersion.js.map +0 -1
- package/out/util/macroExpander.d.ts +0 -3
- package/out/util/macroExpander.js +0 -64
- package/out/util/macroExpander.js.map +0 -1
- package/out/util/normalizePackageData.d.ts +0 -1
- package/out/util/normalizePackageData.js +0 -328
- package/out/util/normalizePackageData.js.map +0 -1
- package/out/util/packageDependencies.d.ts +0 -6
- package/out/util/packageDependencies.js +0 -3
- package/out/util/packageDependencies.js.map +0 -1
- package/out/util/packageMetadata.d.ts +0 -1
- package/out/util/packageMetadata.js +0 -124
- package/out/util/packageMetadata.js.map +0 -1
- package/out/util/pathManager.d.ts +0 -3
- package/out/util/pathManager.js +0 -23
- package/out/util/pathManager.js.map +0 -1
- package/out/util/plist.d.ts +0 -7
- package/out/util/plist.js +0 -31
- package/out/util/plist.js.map +0 -1
- package/out/util/rebuild.d.ts +0 -2
- package/out/util/rebuild.js +0 -60
- package/out/util/rebuild.js.map +0 -1
- package/out/util/repositoryInfo.d.ts +0 -3
- package/out/util/repositoryInfo.js +0 -79
- package/out/util/repositoryInfo.js.map +0 -1
- package/out/util/resEdit.d.ts +0 -10
- package/out/util/resEdit.js +0 -49
- package/out/util/resEdit.js.map +0 -1
- package/out/util/resolve.d.ts +0 -2
- package/out/util/resolve.js +0 -59
- package/out/util/resolve.js.map +0 -1
- package/out/util/timer.d.ts +0 -11
- package/out/util/timer.js +0 -28
- package/out/util/timer.js.map +0 -1
- package/out/util/toolsetLock.d.ts +0 -1
- package/out/util/toolsetLock.js +0 -23
- package/out/util/toolsetLock.js.map +0 -1
- package/out/util/yarn.d.ts +0 -22
- package/out/util/yarn.js +0 -160
- package/out/util/yarn.js.map +0 -1
- package/out/version.d.ts +0 -1
- package/out/version.js +0 -5
- package/out/version.js.map +0 -1
- package/out/vm/MonoVm.d.ts +0 -8
- package/out/vm/MonoVm.js +0 -20
- package/out/vm/MonoVm.js.map +0 -1
- package/out/vm/ParallelsVm.d.ts +0 -23
- package/out/vm/ParallelsVm.js +0 -102
- package/out/vm/ParallelsVm.js.map +0 -1
- package/out/vm/PwshVm.d.ts +0 -6
- package/out/vm/PwshVm.js +0 -25
- package/out/vm/PwshVm.js.map +0 -1
- package/out/vm/WineVm.d.ts +0 -12
- package/out/vm/WineVm.js +0 -38
- package/out/vm/WineVm.js.map +0 -1
- package/out/vm/vm.d.ts +0 -14
- package/out/vm/vm.js +0 -88
- package/out/vm/vm.js.map +0 -1
- package/out/winPackager.d.ts +0 -29
- package/out/winPackager.js +0 -271
- package/out/winPackager.js.map +0 -1
- /package/{out → dist}/node-module-collector/types.js.map +0 -0
- /package/{out → dist}/options/FileAssociation.js.map +0 -0
- /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import asyncPool from "tiny-async-pool";
|
|
2
|
+
import { Arch, log, safeStringifyJson, serializeToYaml } from "builder-util";
|
|
3
|
+
import fsExtra from "fs-extra";
|
|
4
|
+
import { Lazy } from "lazy-val";
|
|
5
|
+
import * as path from "path";
|
|
6
|
+
import * as semver from "semver";
|
|
7
|
+
import { Platform } from "../core.js";
|
|
8
|
+
import { hashFile } from "../util/hash.js";
|
|
9
|
+
import { computeDownloadUrl, getPublishConfigsForUpdateInfo } from "./PublishManager.js";
|
|
10
|
+
async function getReleaseInfo(packager) {
|
|
11
|
+
const releaseInfo = { ...(packager.platformOptions.releaseInfo || packager.config.releaseInfo) };
|
|
12
|
+
if (releaseInfo.releaseNotes == null) {
|
|
13
|
+
const releaseNotesFile = await packager.getResource(releaseInfo.releaseNotesFile, `release-notes-${packager.platform.buildConfigurationKey}.md`, `release-notes-${packager.platform.name}.md`, `release-notes-${packager.platform.nodeName}.md`, "release-notes.md");
|
|
14
|
+
const releaseNotes = releaseNotesFile == null ? null : await fsExtra.readFile(releaseNotesFile, "utf-8");
|
|
15
|
+
// to avoid undefined in the file, check for null
|
|
16
|
+
if (releaseNotes != null) {
|
|
17
|
+
releaseInfo.releaseNotes = releaseNotes;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
delete releaseInfo.releaseNotesFile;
|
|
21
|
+
return releaseInfo;
|
|
22
|
+
}
|
|
23
|
+
function isGenerateUpdatesFilesForAllChannels(packager) {
|
|
24
|
+
const value = packager.platformOptions.generateUpdatesFilesForAllChannels;
|
|
25
|
+
return value == null ? packager.config.generateUpdatesFilesForAllChannels : value;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
if this is an "alpha" version, we need to generate only the "alpha" .yml file
|
|
29
|
+
if this is a "beta" version, we need to generate both the "alpha" and "beta" .yml file
|
|
30
|
+
if this is a "stable" version, we need to generate all the "alpha", "beta" and "stable" .yml file
|
|
31
|
+
*/
|
|
32
|
+
function computeChannelNames(packager, publishConfig) {
|
|
33
|
+
const currentChannel = publishConfig.channel || "latest";
|
|
34
|
+
// for GitHub should be pre-release way be used
|
|
35
|
+
if (currentChannel === "alpha" || publishConfig.provider === "github" || !isGenerateUpdatesFilesForAllChannels(packager)) {
|
|
36
|
+
return [currentChannel];
|
|
37
|
+
}
|
|
38
|
+
switch (currentChannel) {
|
|
39
|
+
case "beta":
|
|
40
|
+
return [currentChannel, "alpha"];
|
|
41
|
+
case "latest":
|
|
42
|
+
return [currentChannel, "alpha", "beta"];
|
|
43
|
+
default:
|
|
44
|
+
return [currentChannel];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function getUpdateInfoFileName(channel, packager, arch) {
|
|
48
|
+
const osSuffix = packager.platform === Platform.WINDOWS ? "" : `-${packager.platform.buildConfigurationKey}`;
|
|
49
|
+
return `${channel}${osSuffix}${getArchPrefixForUpdateFile(arch, packager)}.yml`;
|
|
50
|
+
}
|
|
51
|
+
function getArchPrefixForUpdateFile(arch, packager) {
|
|
52
|
+
if (arch == null || arch === Arch.x64 || packager.platform !== Platform.LINUX) {
|
|
53
|
+
return "";
|
|
54
|
+
}
|
|
55
|
+
return arch === Arch.armv7l ? "-arm" : `-${Arch[arch]}`;
|
|
56
|
+
}
|
|
57
|
+
function checkUpdaterCompatibility(updaterCompatibility, publishConfiguration, packager) {
|
|
58
|
+
if (updaterCompatibility != null) {
|
|
59
|
+
return semver.satisfies("1.0.0", updaterCompatibility);
|
|
60
|
+
}
|
|
61
|
+
// spaces is a new publish provider, no need to keep backward compatibility
|
|
62
|
+
if (publishConfiguration.provider === "spaces") {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
const updaterVersion = packager.metadata.dependencies == null ? null : packager.metadata.dependencies["electron-updater"];
|
|
66
|
+
return updaterVersion == null || semver.lt(updaterVersion, "4.0.0");
|
|
67
|
+
}
|
|
68
|
+
export async function createUpdateInfoTasks(event, _publishConfigs) {
|
|
69
|
+
const packager = event.packager;
|
|
70
|
+
const publishConfigs = await getPublishConfigsForUpdateInfo(packager, _publishConfigs, event.arch);
|
|
71
|
+
if (publishConfigs == null || publishConfigs.length === 0) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
const outDir = event.target.outDir;
|
|
75
|
+
const version = packager.appInfo.version;
|
|
76
|
+
const sha2 = new Lazy(() => hashFile(event.file, "sha256", "hex"));
|
|
77
|
+
const isMac = packager.platform === Platform.MAC;
|
|
78
|
+
const createdFiles = new Set();
|
|
79
|
+
const sharedInfo = await createUpdateInfo(version, event, await getReleaseInfo(packager));
|
|
80
|
+
const tasks = [];
|
|
81
|
+
const electronUpdaterCompatibility = packager.platformOptions.electronUpdaterCompatibility || packager.config.electronUpdaterCompatibility || ">=2.15";
|
|
82
|
+
for (const publishConfiguration of publishConfigs) {
|
|
83
|
+
let dir = outDir;
|
|
84
|
+
if (publishConfigs.length > 1 && publishConfiguration !== publishConfigs[0]) {
|
|
85
|
+
dir = path.join(outDir, publishConfiguration.provider);
|
|
86
|
+
}
|
|
87
|
+
let isElectronUpdater1xCompatibility = checkUpdaterCompatibility(electronUpdaterCompatibility, publishConfiguration, packager);
|
|
88
|
+
let info = sharedInfo;
|
|
89
|
+
// noinspection JSDeprecatedSymbols
|
|
90
|
+
if (isElectronUpdater1xCompatibility && packager.platform === Platform.WINDOWS) {
|
|
91
|
+
info = {
|
|
92
|
+
...info,
|
|
93
|
+
};
|
|
94
|
+
info.sha2 = await sha2.value;
|
|
95
|
+
}
|
|
96
|
+
if (event.safeArtifactName != null && publishConfiguration.provider === "github") {
|
|
97
|
+
const newFiles = info.files.slice();
|
|
98
|
+
newFiles[0].url = event.safeArtifactName;
|
|
99
|
+
info = {
|
|
100
|
+
...info,
|
|
101
|
+
files: newFiles,
|
|
102
|
+
path: event.safeArtifactName,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
for (const channel of computeChannelNames(packager, publishConfiguration)) {
|
|
106
|
+
if (isMac && isElectronUpdater1xCompatibility && event.file.endsWith(".zip")) {
|
|
107
|
+
// write only for first channel (generateUpdatesFilesForAllChannels is a new functionality, no need to generate old mac update info file)
|
|
108
|
+
isElectronUpdater1xCompatibility = false;
|
|
109
|
+
await writeOldMacInfo(publishConfiguration, outDir, dir, channel, createdFiles, version, packager);
|
|
110
|
+
}
|
|
111
|
+
const updateInfoFile = path.join(dir, getUpdateInfoFileName(channel, packager, event.arch));
|
|
112
|
+
if (createdFiles.has(updateInfoFile)) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
createdFiles.add(updateInfoFile);
|
|
116
|
+
// artifact should be uploaded only to designated publish provider
|
|
117
|
+
tasks.push({
|
|
118
|
+
file: updateInfoFile,
|
|
119
|
+
info,
|
|
120
|
+
publishConfiguration,
|
|
121
|
+
packager,
|
|
122
|
+
arch: event.arch,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return tasks;
|
|
127
|
+
}
|
|
128
|
+
async function createUpdateInfo(version, event, releaseInfo) {
|
|
129
|
+
const customUpdateInfo = event.updateInfo;
|
|
130
|
+
const url = path.basename(event.file);
|
|
131
|
+
const sha512 = (customUpdateInfo == null ? null : customUpdateInfo.sha512) || (await hashFile(event.file));
|
|
132
|
+
const files = [{ url, sha512 }];
|
|
133
|
+
const result = {
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
version,
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
files,
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
path: url /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
sha512 /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,
|
|
142
|
+
...releaseInfo,
|
|
143
|
+
};
|
|
144
|
+
if (customUpdateInfo != null) {
|
|
145
|
+
// file info or nsis web installer packages info
|
|
146
|
+
Object.assign("sha512" in customUpdateInfo ? files[0] : result, customUpdateInfo);
|
|
147
|
+
}
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
export async function writeUpdateInfoFiles(updateInfoFileTasks, packager) {
|
|
151
|
+
// zip must be first and zip info must be used for old path/sha512 properties in the update info
|
|
152
|
+
// universal installer (arch === null) must precede arch-specific ones so path:/sha512: point to the right artifact
|
|
153
|
+
updateInfoFileTasks.sort((a, b) => {
|
|
154
|
+
const zipDiff = (a.info.files[0].url.endsWith(".zip") ? 0 : 100) - (b.info.files[0].url.endsWith(".zip") ? 0 : 100);
|
|
155
|
+
if (zipDiff !== 0) {
|
|
156
|
+
return zipDiff;
|
|
157
|
+
}
|
|
158
|
+
// universal (arch === null) before arch-specific; tie-break by Arch enum value for full determinism
|
|
159
|
+
// undefined arch (external callers predating this field) treated as arch-specific via strict === null check
|
|
160
|
+
const aArch = a.arch === null ? -1 : (a.arch ?? Number.MAX_SAFE_INTEGER);
|
|
161
|
+
const bArch = b.arch === null ? -1 : (b.arch ?? Number.MAX_SAFE_INTEGER);
|
|
162
|
+
return aArch - bArch;
|
|
163
|
+
});
|
|
164
|
+
const updateChannelFileToInfo = new Map();
|
|
165
|
+
for (const task of updateInfoFileTasks) {
|
|
166
|
+
// https://github.com/electron-userland/electron-builder/pull/2994
|
|
167
|
+
const key = `${task.file}@${safeStringifyJson(task.publishConfiguration, new Set(["releaseType"]))}`;
|
|
168
|
+
const existingTask = updateChannelFileToInfo.get(key);
|
|
169
|
+
if (existingTask == null) {
|
|
170
|
+
updateChannelFileToInfo.set(key, task);
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
existingTask.info.files.push(...task.info.files);
|
|
174
|
+
}
|
|
175
|
+
const releaseDate = new Date().toISOString();
|
|
176
|
+
const concurrency = 4;
|
|
177
|
+
await asyncPool(concurrency, Array.from(updateChannelFileToInfo.values()), async (task) => {
|
|
178
|
+
const publishConfig = task.publishConfiguration;
|
|
179
|
+
if (publishConfig.publishAutoUpdate === false) {
|
|
180
|
+
log.debug({
|
|
181
|
+
provider: publishConfig.provider,
|
|
182
|
+
reason: "publishAutoUpdate is set to false",
|
|
183
|
+
}, "auto update metadata file not published");
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (task.info.releaseDate == null) {
|
|
187
|
+
task.info.releaseDate = releaseDate;
|
|
188
|
+
}
|
|
189
|
+
const fileContent = Buffer.from(serializeToYaml(task.info, false, true));
|
|
190
|
+
await fsExtra.outputFile(task.file, fileContent);
|
|
191
|
+
await packager.emitArtifactCreated({
|
|
192
|
+
file: task.file,
|
|
193
|
+
fileContent,
|
|
194
|
+
arch: null,
|
|
195
|
+
packager: task.packager,
|
|
196
|
+
target: null,
|
|
197
|
+
publishConfig,
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
// backward compatibility - write json file
|
|
202
|
+
async function writeOldMacInfo(publishConfig, outDir, dir, channel, createdFiles, version, packager) {
|
|
203
|
+
const isGitHub = publishConfig.provider === "github";
|
|
204
|
+
const updateInfoFile = isGitHub && outDir === dir ? path.join(dir, "github", `${channel}-mac.json`) : path.join(dir, `${channel}-mac.json`);
|
|
205
|
+
if (!createdFiles.has(updateInfoFile)) {
|
|
206
|
+
createdFiles.add(updateInfoFile);
|
|
207
|
+
await fsExtra.outputJson(updateInfoFile, {
|
|
208
|
+
version,
|
|
209
|
+
releaseDate: new Date().toISOString(),
|
|
210
|
+
url: computeDownloadUrl(publishConfig, packager.generateName2("zip", "mac", isGitHub), packager),
|
|
211
|
+
}, { spaces: 2 });
|
|
212
|
+
await packager.emitArtifactCreated({
|
|
213
|
+
file: updateInfoFile,
|
|
214
|
+
arch: null,
|
|
215
|
+
packager,
|
|
216
|
+
target: null,
|
|
217
|
+
publishConfig,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=updateInfoBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateInfoBuilder.js","sourceRoot":"","sources":["../../src/publish/updateInfoBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE5E,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AAExF,KAAK,UAAU,cAAc,CAAC,QAA+B;IAC3D,MAAM,WAAW,GAAgB,EAAE,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAA;IAC7G,IAAI,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d,CAAA;QAED,MAAM,QAAQ,CAAC,mBAAmB,CAAC;YACjC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,MAAM,EAAE,IAAI;YACZ,aAAa;SACd,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import asyncPool from \"tiny-async-pool\"\nimport { Arch, log, safeStringifyJson, serializeToYaml } from \"builder-util\"\nimport { GenericServerOptions, PublishConfiguration, UpdateInfo, WindowsUpdateInfo } from \"builder-util-runtime\"\nimport fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { Platform } from \"../core.js\"\nimport { ReleaseInfo } from \"../options/PlatformSpecificBuildOptions.js\"\nimport { Packager } from \"../packager.js\"\nimport { ArtifactCreated } from \"../packagerApi.js\"\nimport { PlatformPackager } from \"../platformPackager.js\"\nimport { hashFile } from \"../util/hash.js\"\nimport { computeDownloadUrl, getPublishConfigsForUpdateInfo } from \"./PublishManager.js\"\n\nasync function getReleaseInfo(packager: PlatformPackager<any>) {\n const releaseInfo: ReleaseInfo = { ...(packager.platformOptions.releaseInfo || packager.config.releaseInfo) }\n if (releaseInfo.releaseNotes == null) {\n const releaseNotesFile = await packager.getResource(\n releaseInfo.releaseNotesFile,\n `release-notes-${packager.platform.buildConfigurationKey}.md`,\n `release-notes-${packager.platform.name}.md`,\n `release-notes-${packager.platform.nodeName}.md`,\n \"release-notes.md\"\n )\n const releaseNotes = releaseNotesFile == null ? null : await fsExtra.readFile(releaseNotesFile, \"utf-8\")\n // to avoid undefined in the file, check for null\n if (releaseNotes != null) {\n releaseInfo.releaseNotes = releaseNotes\n }\n }\n delete releaseInfo.releaseNotesFile\n return releaseInfo\n}\n\nfunction isGenerateUpdatesFilesForAllChannels(packager: PlatformPackager<any>) {\n const value = packager.platformOptions.generateUpdatesFilesForAllChannels\n return value == null ? packager.config.generateUpdatesFilesForAllChannels : value\n}\n\n/**\n if this is an \"alpha\" version, we need to generate only the \"alpha\" .yml file\n if this is a \"beta\" version, we need to generate both the \"alpha\" and \"beta\" .yml file\n if this is a \"stable\" version, we need to generate all the \"alpha\", \"beta\" and \"stable\" .yml file\n */\nfunction computeChannelNames(packager: PlatformPackager<any>, publishConfig: PublishConfiguration): Array<string> {\n const currentChannel: string = (publishConfig as GenericServerOptions).channel || \"latest\"\n // for GitHub should be pre-release way be used\n if (currentChannel === \"alpha\" || publishConfig.provider === \"github\" || !isGenerateUpdatesFilesForAllChannels(packager)) {\n return [currentChannel]\n }\n\n switch (currentChannel) {\n case \"beta\":\n return [currentChannel, \"alpha\"]\n\n case \"latest\":\n return [currentChannel, \"alpha\", \"beta\"]\n\n default:\n return [currentChannel]\n }\n}\n\nfunction getUpdateInfoFileName(channel: string, packager: PlatformPackager<any>, arch: Arch | null): string {\n const osSuffix = packager.platform === Platform.WINDOWS ? \"\" : `-${packager.platform.buildConfigurationKey}`\n return `${channel}${osSuffix}${getArchPrefixForUpdateFile(arch, packager)}.yml`\n}\n\nfunction getArchPrefixForUpdateFile(arch: Arch | null, packager: PlatformPackager<any>) {\n if (arch == null || arch === Arch.x64 || packager.platform !== Platform.LINUX) {\n return \"\"\n }\n return arch === Arch.armv7l ? \"-arm\" : `-${Arch[arch]}`\n}\n\nexport interface UpdateInfoFileTask {\n readonly file: string\n readonly info: UpdateInfo\n readonly publishConfiguration: PublishConfiguration\n readonly packager: PlatformPackager<any>\n readonly arch?: Arch | null\n}\n\nfunction checkUpdaterCompatibility(updaterCompatibility: string | null, publishConfiguration: PublishConfiguration, packager: PlatformPackager<any>) {\n if (updaterCompatibility != null) {\n return semver.satisfies(\"1.0.0\", updaterCompatibility)\n }\n\n // spaces is a new publish provider, no need to keep backward compatibility\n if (publishConfiguration.provider === \"spaces\") {\n return false\n }\n\n const updaterVersion = packager.metadata.dependencies == null ? null : packager.metadata.dependencies[\"electron-updater\"]\n return updaterVersion == null || semver.lt(updaterVersion, \"4.0.0\")\n}\n\nexport async function createUpdateInfoTasks(event: ArtifactCreated, _publishConfigs: Array<PublishConfiguration>): Promise<Array<UpdateInfoFileTask>> {\n const packager = event.packager\n const publishConfigs = await getPublishConfigsForUpdateInfo(packager, _publishConfigs, event.arch)\n if (publishConfigs == null || publishConfigs.length === 0) {\n return []\n }\n\n const outDir = event.target!.outDir\n const version = packager.appInfo.version\n const sha2 = new Lazy<string>(() => hashFile(event.file, \"sha256\", \"hex\"))\n const isMac = packager.platform === Platform.MAC\n const createdFiles = new Set<string>()\n const sharedInfo = await createUpdateInfo(version, event, await getReleaseInfo(packager))\n const tasks: Array<UpdateInfoFileTask> = []\n const electronUpdaterCompatibility = packager.platformOptions.electronUpdaterCompatibility || packager.config.electronUpdaterCompatibility || \">=2.15\"\n for (const publishConfiguration of publishConfigs) {\n let dir = outDir\n if (publishConfigs.length > 1 && publishConfiguration !== publishConfigs[0]) {\n dir = path.join(outDir, publishConfiguration.provider)\n }\n\n let isElectronUpdater1xCompatibility = checkUpdaterCompatibility(electronUpdaterCompatibility, publishConfiguration, packager)\n\n let info = sharedInfo\n // noinspection JSDeprecatedSymbols\n if (isElectronUpdater1xCompatibility && packager.platform === Platform.WINDOWS) {\n info = {\n ...info,\n }\n // noinspection JSDeprecatedSymbols\n ;(info as WindowsUpdateInfo).sha2 = await sha2.value\n }\n\n if (event.safeArtifactName != null && publishConfiguration.provider === \"github\") {\n const newFiles = info.files.slice()\n newFiles[0].url = event.safeArtifactName\n info = {\n ...info,\n files: newFiles,\n path: event.safeArtifactName,\n }\n }\n\n for (const channel of computeChannelNames(packager, publishConfiguration)) {\n if (isMac && isElectronUpdater1xCompatibility && event.file.endsWith(\".zip\")) {\n // write only for first channel (generateUpdatesFilesForAllChannels is a new functionality, no need to generate old mac update info file)\n isElectronUpdater1xCompatibility = false\n await writeOldMacInfo(publishConfiguration, outDir, dir, channel, createdFiles, version, packager)\n }\n\n const updateInfoFile = path.join(dir, getUpdateInfoFileName(channel, packager, event.arch))\n if (createdFiles.has(updateInfoFile)) {\n continue\n }\n\n createdFiles.add(updateInfoFile)\n\n // artifact should be uploaded only to designated publish provider\n tasks.push({\n file: updateInfoFile,\n info,\n publishConfiguration,\n packager,\n arch: event.arch,\n })\n }\n }\n return tasks\n}\n\nasync function createUpdateInfo(version: string, event: ArtifactCreated, releaseInfo: ReleaseInfo): Promise<UpdateInfo> {\n const customUpdateInfo = event.updateInfo\n const url = path.basename(event.file)\n const sha512 = (customUpdateInfo == null ? null : customUpdateInfo.sha512) || (await hashFile(event.file))\n const files = [{ url, sha512 }]\n const result: UpdateInfo = {\n // @ts-ignore\n version,\n // @ts-ignore\n files,\n // @ts-ignore\n path: url /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,\n // @ts-ignore\n sha512 /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,\n ...(releaseInfo as UpdateInfo),\n }\n\n if (customUpdateInfo != null) {\n // file info or nsis web installer packages info\n Object.assign(\"sha512\" in customUpdateInfo ? files[0] : result, customUpdateInfo)\n }\n return result\n}\n\nexport async function writeUpdateInfoFiles(updateInfoFileTasks: Array<UpdateInfoFileTask>, packager: Packager) {\n // zip must be first and zip info must be used for old path/sha512 properties in the update info\n // universal installer (arch === null) must precede arch-specific ones so path:/sha512: point to the right artifact\n updateInfoFileTasks.sort((a, b) => {\n const zipDiff = (a.info.files[0].url.endsWith(\".zip\") ? 0 : 100) - (b.info.files[0].url.endsWith(\".zip\") ? 0 : 100)\n if (zipDiff !== 0) {\n return zipDiff\n }\n // universal (arch === null) before arch-specific; tie-break by Arch enum value for full determinism\n // undefined arch (external callers predating this field) treated as arch-specific via strict === null check\n const aArch = a.arch === null ? -1 : (a.arch ?? Number.MAX_SAFE_INTEGER)\n const bArch = b.arch === null ? -1 : (b.arch ?? Number.MAX_SAFE_INTEGER)\n return aArch - bArch\n })\n\n const updateChannelFileToInfo = new Map<string, UpdateInfoFileTask>()\n for (const task of updateInfoFileTasks) {\n // https://github.com/electron-userland/electron-builder/pull/2994\n const key = `${task.file}@${safeStringifyJson(task.publishConfiguration, new Set([\"releaseType\"]))}`\n const existingTask = updateChannelFileToInfo.get(key)\n if (existingTask == null) {\n updateChannelFileToInfo.set(key, task)\n continue\n }\n\n existingTask.info.files.push(...task.info.files)\n }\n\n const releaseDate = new Date().toISOString()\n const concurrency = 4\n await asyncPool<UpdateInfoFileTask, void>(concurrency, Array.from(updateChannelFileToInfo.values()), async task => {\n const publishConfig = task.publishConfiguration\n if (publishConfig.publishAutoUpdate === false) {\n log.debug(\n {\n provider: publishConfig.provider,\n reason: \"publishAutoUpdate is set to false\",\n },\n \"auto update metadata file not published\"\n )\n return\n }\n\n if (task.info.releaseDate == null) {\n task.info.releaseDate = releaseDate\n }\n\n const fileContent = Buffer.from(serializeToYaml(task.info, false, true))\n await fsExtra.outputFile(task.file, fileContent)\n await packager.emitArtifactCreated({\n file: task.file,\n fileContent,\n arch: null,\n packager: task.packager,\n target: null,\n publishConfig,\n })\n })\n}\n\n// backward compatibility - write json file\nasync function writeOldMacInfo(\n publishConfig: PublishConfiguration,\n outDir: string,\n dir: string,\n channel: string,\n createdFiles: Set<string>,\n version: string,\n packager: PlatformPackager<any>\n) {\n const isGitHub = publishConfig.provider === \"github\"\n const updateInfoFile = isGitHub && outDir === dir ? path.join(dir, \"github\", `${channel}-mac.json`) : path.join(dir, `${channel}-mac.json`)\n if (!createdFiles.has(updateInfoFile)) {\n createdFiles.add(updateInfoFile)\n await fsExtra.outputJson(\n updateInfoFile,\n {\n version,\n releaseDate: new Date().toISOString(),\n url: computeDownloadUrl(publishConfig, packager.generateName2(\"zip\", \"mac\", isGitHub), packager),\n },\n { spaces: 2 }\n )\n\n await packager.emitArtifactCreated({\n file: updateInfoFile,\n arch: null,\n packager,\n target: null,\n publishConfig,\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Arch } from "builder-util";
|
|
2
|
+
import { Target, TargetSpecificOptions } from "../core.js";
|
|
3
|
+
import { PlatformPackager } from "../platformPackager.js";
|
|
4
|
+
export declare class ArchiveTarget extends Target {
|
|
5
|
+
readonly outDir: string;
|
|
6
|
+
private readonly packager;
|
|
7
|
+
private readonly isWriteUpdateInfo;
|
|
8
|
+
readonly options: TargetSpecificOptions;
|
|
9
|
+
constructor(name: string, outDir: string, packager: PlatformPackager<any>, isWriteUpdateInfo?: boolean);
|
|
10
|
+
build(appOutDir: string, arch: Arch): Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ArchiveTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchiveTarget.d.ts","sourceRoot":"","sources":["../../src/targets/ArchiveTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAyB,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAY,MAAM,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAIzD,qBAAa,aAAc,SAAQ,MAAM;IAKrC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IANpC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;gBAGrC,IAAI,EAAE,MAAM,EACH,MAAM,EAAE,MAAM,EACN,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAC/B,iBAAiB,UAAQ;IAMtC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC;CAsFzD"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defaultArchFromString } from "builder-util";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { Platform, Target } from "../core.js";
|
|
4
|
+
import { copyFiles, getFileMatchers } from "../fileMatcher.js";
|
|
5
|
+
import { archive, tar } from "./archive.js";
|
|
6
|
+
import { appendBlockmap, createBlockmap } from "./differentialUpdateInfoBuilder.js";
|
|
7
|
+
export class ArchiveTarget extends Target {
|
|
8
|
+
constructor(name, outDir, packager, isWriteUpdateInfo = false) {
|
|
9
|
+
super(name);
|
|
10
|
+
this.outDir = outDir;
|
|
11
|
+
this.packager = packager;
|
|
12
|
+
this.isWriteUpdateInfo = isWriteUpdateInfo;
|
|
13
|
+
this.options = this.packager.config[this.name];
|
|
14
|
+
}
|
|
15
|
+
async build(appOutDir, arch) {
|
|
16
|
+
const packager = this.packager;
|
|
17
|
+
const isMac = packager.platform === Platform.MAC;
|
|
18
|
+
const format = this.name;
|
|
19
|
+
let defaultPattern;
|
|
20
|
+
const defaultArch = defaultArchFromString(packager.platformOptions.defaultArch);
|
|
21
|
+
if (packager.platform === Platform.LINUX) {
|
|
22
|
+
// tslint:disable-next-line:no-invalid-template-strings
|
|
23
|
+
defaultPattern = "${name}-${version}" + (arch === defaultArch ? "" : "-${arch}") + ".${ext}";
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// tslint:disable-next-line:no-invalid-template-strings
|
|
27
|
+
defaultPattern = "${productName}-${version}" + (arch === defaultArch ? "" : "-${arch}") + "-${os}.${ext}";
|
|
28
|
+
}
|
|
29
|
+
this.buildQueueManager.add(async () => {
|
|
30
|
+
const artifactName = packager.expandArtifactNamePattern(this.options, format, arch, defaultPattern, false);
|
|
31
|
+
const artifactPath = path.join(this.outDir, artifactName);
|
|
32
|
+
await packager.emitArtifactBuildStarted({
|
|
33
|
+
targetPresentableName: `${isMac ? "macOS " : ""}${format}`,
|
|
34
|
+
file: artifactPath,
|
|
35
|
+
arch,
|
|
36
|
+
});
|
|
37
|
+
let updateInfo = null;
|
|
38
|
+
if (format.startsWith("tar.")) {
|
|
39
|
+
await tar({
|
|
40
|
+
compression: packager.compression,
|
|
41
|
+
format,
|
|
42
|
+
outFile: artifactPath,
|
|
43
|
+
dirToArchive: appOutDir,
|
|
44
|
+
isMacApp: isMac,
|
|
45
|
+
tempDirManager: packager.tempDirManager,
|
|
46
|
+
linuxToolsMac: packager.config.toolsets?.linuxToolsMac,
|
|
47
|
+
buildResourcesDir: packager.buildResourcesDir,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
let withoutDir = !isMac;
|
|
52
|
+
let dirToArchive = appOutDir;
|
|
53
|
+
if (isMac) {
|
|
54
|
+
dirToArchive = path.dirname(appOutDir);
|
|
55
|
+
const fileMatchers = getFileMatchers(packager.config, "extraDistFiles", dirToArchive, packager.createGetFileMatchersOptions(this.outDir, arch, packager.platformOptions));
|
|
56
|
+
if (fileMatchers == null) {
|
|
57
|
+
dirToArchive = appOutDir;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
await copyFiles(fileMatchers, null, true);
|
|
61
|
+
withoutDir = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const archiveOptions = {
|
|
65
|
+
compression: packager.compression,
|
|
66
|
+
withoutDir,
|
|
67
|
+
preserveSymlinks: isMac,
|
|
68
|
+
};
|
|
69
|
+
await archive(format, artifactPath, dirToArchive, archiveOptions);
|
|
70
|
+
if (this.isWriteUpdateInfo && format === "zip") {
|
|
71
|
+
if (isMac) {
|
|
72
|
+
updateInfo = await createBlockmap(artifactPath, this, packager, artifactName);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
updateInfo = await appendBlockmap(artifactPath);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
await packager.emitArtifactBuildCompleted({
|
|
80
|
+
updateInfo,
|
|
81
|
+
file: artifactPath,
|
|
82
|
+
// tslint:disable-next-line:no-invalid-template-strings
|
|
83
|
+
safeArtifactName: packager.computeSafeArtifactName(artifactName, format, arch, false, packager.platformOptions.defaultArch, defaultPattern.replace("${productName}", "${name}")),
|
|
84
|
+
target: this,
|
|
85
|
+
arch,
|
|
86
|
+
packager,
|
|
87
|
+
isWriteUpdateInfo: this.isWriteUpdateInfo,
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
return Promise.resolve();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=ArchiveTarget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchiveTarget.js","sourceRoot":"","sources":["../../src/targets/ArchiveTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAyB,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAE9D,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAEnF,MAAM,OAAO,aAAc,SAAQ,MAAM;IAGvC,YACE,IAAY,EACH,MAAc,EACN,QAA+B,EAC/B,oBAAoB,KAAK;QAE1C,KAAK,CAAC,IAAI,CAAC,CAAA;QAJF,WAAM,GAAN,MAAM,CAAQ;QACN,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAQ;QAG1C,IAAI,CAAC,OAAO,GAAI,IAAI,CAAC,QAAQ,CAAC,MAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,SAAiB,EAAE,IAAU;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,GAAG,CAAA;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;QAExB,IAAI,cAAsB,CAAA;QAC1B,MAAM,WAAW,GAAS,qBAAqB,CAAC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QAAQ,CAAC,0BAA0B,CAAC;gBACxC,UAAU;gBACV,IAAI,EAAE,YAAY;gBAClB,uDAAuD;gBACvD,gBAAgB,EAAE,QAAQ,CAAC,uBAAuB,CAChD,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,QAAQ,CAAC,eAAe,CAAC,WAAW,EACpC,cAAc,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC,CACpD;gBACD,MAAM,EAAE,IAAI;gBACZ,IAAI;gBACJ,QAAQ;gBACR,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;aAC1C,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;CACF","sourcesContent":["import { Arch, defaultArchFromString } from \"builder-util\"\nimport * as path from \"path\"\nimport { Platform, Target, TargetSpecificOptions } from \"../core.js\"\nimport { copyFiles, getFileMatchers } from \"../fileMatcher.js\"\nimport { PlatformPackager } from \"../platformPackager.js\"\nimport { archive, tar } from \"./archive.js\"\nimport { appendBlockmap, createBlockmap } from \"./differentialUpdateInfoBuilder.js\"\n\nexport class ArchiveTarget extends Target {\n readonly options: TargetSpecificOptions\n\n constructor(\n name: string,\n readonly outDir: string,\n private readonly packager: PlatformPackager<any>,\n private readonly isWriteUpdateInfo = false\n ) {\n super(name)\n this.options = (this.packager.config as any)[this.name]\n }\n\n async build(appOutDir: string, arch: Arch): Promise<any> {\n const packager = this.packager\n const isMac = packager.platform === Platform.MAC\n const format = this.name\n\n let defaultPattern: string\n const defaultArch: Arch = defaultArchFromString(packager.platformOptions.defaultArch)\n if (packager.platform === Platform.LINUX) {\n // tslint:disable-next-line:no-invalid-template-strings\n defaultPattern = \"${name}-${version}\" + (arch === defaultArch ? \"\" : \"-${arch}\") + \".${ext}\"\n } else {\n // tslint:disable-next-line:no-invalid-template-strings\n defaultPattern = \"${productName}-${version}\" + (arch === defaultArch ? \"\" : \"-${arch}\") + \"-${os}.${ext}\"\n }\n\n this.buildQueueManager.add(async () => {\n const artifactName = packager.expandArtifactNamePattern(this.options, format, arch, defaultPattern, false)\n const artifactPath = path.join(this.outDir, artifactName)\n\n await packager.emitArtifactBuildStarted({\n targetPresentableName: `${isMac ? \"macOS \" : \"\"}${format}`,\n file: artifactPath,\n arch,\n })\n let updateInfo: any = null\n if (format.startsWith(\"tar.\")) {\n await tar({\n compression: packager.compression,\n format,\n outFile: artifactPath,\n dirToArchive: appOutDir,\n isMacApp: isMac,\n tempDirManager: packager.tempDirManager,\n linuxToolsMac: packager.config.toolsets?.linuxToolsMac,\n buildResourcesDir: packager.buildResourcesDir,\n })\n } else {\n let withoutDir = !isMac\n let dirToArchive = appOutDir\n if (isMac) {\n dirToArchive = path.dirname(appOutDir)\n const fileMatchers = getFileMatchers(packager.config, \"extraDistFiles\", dirToArchive, packager.createGetFileMatchersOptions(this.outDir, arch, packager.platformOptions))\n if (fileMatchers == null) {\n dirToArchive = appOutDir\n } else {\n await copyFiles(fileMatchers, null, true)\n withoutDir = true\n }\n }\n\n const archiveOptions = {\n compression: packager.compression,\n withoutDir,\n preserveSymlinks: isMac,\n }\n await archive(format, artifactPath, dirToArchive, archiveOptions)\n\n if (this.isWriteUpdateInfo && format === \"zip\") {\n if (isMac) {\n updateInfo = await createBlockmap(artifactPath, this, packager, artifactName)\n } else {\n updateInfo = await appendBlockmap(artifactPath)\n }\n }\n }\n\n await packager.emitArtifactBuildCompleted({\n updateInfo,\n file: artifactPath,\n // tslint:disable-next-line:no-invalid-template-strings\n safeArtifactName: packager.computeSafeArtifactName(\n artifactName,\n format,\n arch,\n false,\n packager.platformOptions.defaultArch,\n defaultPattern.replace(\"${productName}\", \"${name}\")\n ),\n target: this,\n arch,\n packager,\n isWriteUpdateInfo: this.isWriteUpdateInfo,\n })\n })\n return Promise.resolve()\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CompressionLevel } from "../core.js";
|
|
2
|
+
export interface ArchiveOptions {
|
|
3
|
+
compression?: CompressionLevel | null;
|
|
4
|
+
/**
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
withoutDir?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
solid?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
isArchiveHeaderCompressed?: boolean;
|
|
16
|
+
dictSize?: number;
|
|
17
|
+
excluded?: Array<string> | null;
|
|
18
|
+
method?: "Copy" | "LZMA" | "Deflate" | "DEFAULT";
|
|
19
|
+
isRegularFile?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Use native macOS `zip` to preserve symlinks. Required for .framework bundles.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
preserveSymlinks?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function compute7zCompressArgs(format: string, options?: ArchiveOptions): string[];
|
|
27
|
+
//# sourceMappingURL=archive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/targets/archive.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AA8D7C,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAA;IAEnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAG/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;IAEhD,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,YA8DjF"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { debug7z, exec, exists, log, statOrNull, unlinkIfExists } from "builder-util";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { create } from "tar";
|
|
4
|
+
import { getLinuxToolsMacToolset } from "../toolsets/linuxToolsMac.js";
|
|
5
|
+
import { getPath7za } from "../toolsets/7zip.js";
|
|
6
|
+
import _fsExtra from "fs-extra";
|
|
7
|
+
const { move } = _fsExtra;
|
|
8
|
+
const ALLOWED_7Z_FILTERS = new Set(["BCJ", "BCJ2", "ARM", "ARMT", "IA64", "PPC", "SPARC", "DELTA"]);
|
|
9
|
+
function validateCompressionLevel(level) {
|
|
10
|
+
if (!/^[0-9]$/.test(level)) {
|
|
11
|
+
throw new Error(`ELECTRON_BUILDER_COMPRESSION_LEVEL must be a single digit 0-9, got: "${level}"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export async function tar({ compression, format, outFile, dirToArchive, isMacApp, tempDirManager, linuxToolsMac, buildResourcesDir }) {
|
|
16
|
+
const tarFile = await tempDirManager.getTempFile({ suffix: ".tar" });
|
|
17
|
+
const tarArgs = {
|
|
18
|
+
file: tarFile,
|
|
19
|
+
portable: true,
|
|
20
|
+
cwd: dirToArchive,
|
|
21
|
+
prefix: path.basename(outFile, `.${format}`),
|
|
22
|
+
};
|
|
23
|
+
let tarDirectory = ".";
|
|
24
|
+
if (isMacApp) {
|
|
25
|
+
delete tarArgs.prefix;
|
|
26
|
+
tarArgs.cwd = path.dirname(dirToArchive);
|
|
27
|
+
tarDirectory = path.basename(dirToArchive);
|
|
28
|
+
}
|
|
29
|
+
await Promise.all([
|
|
30
|
+
create(tarArgs, [tarDirectory]),
|
|
31
|
+
// remove file before - 7z doesn't overwrite file, but update
|
|
32
|
+
unlinkIfExists(outFile),
|
|
33
|
+
]);
|
|
34
|
+
if (format === "tar.lz") {
|
|
35
|
+
const lzipPath = process.platform === "darwin" ? (await getLinuxToolsMacToolset(linuxToolsMac, buildResourcesDir)).lzip : "lzip";
|
|
36
|
+
await exec(lzipPath, [compression === "store" ? "-1" : "-9", "--keep" /* keep (don't delete) input files */, tarFile]);
|
|
37
|
+
// lzip creates the output file in the same directory as the input with a .lz suffix
|
|
38
|
+
await move(`${tarFile}.lz`, outFile);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const compressFormat = format === "tar.xz" ? "xz" : format === "tar.bz2" ? "bzip2" : "gzip";
|
|
42
|
+
const args = compute7zCompressArgs(compressFormat, { isRegularFile: true, method: "DEFAULT", compression });
|
|
43
|
+
args.push(outFile, tarFile);
|
|
44
|
+
await exec(await getPath7za(), args, { cwd: path.dirname(dirToArchive) }, debug7z.enabled);
|
|
45
|
+
}
|
|
46
|
+
export function compute7zCompressArgs(format, options = {}) {
|
|
47
|
+
let storeOnly = options.compression === "store";
|
|
48
|
+
const args = debug7zArgs("a");
|
|
49
|
+
const compressionLevel = process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL;
|
|
50
|
+
if (compressionLevel != null) {
|
|
51
|
+
validateCompressionLevel(compressionLevel);
|
|
52
|
+
storeOnly = false; // env var overrides "store" config
|
|
53
|
+
args.push(`-mx=${compressionLevel}`);
|
|
54
|
+
}
|
|
55
|
+
else if (storeOnly) {
|
|
56
|
+
// -mx=0 is the universal "no compression" flag across all formats (zip, 7z, gzip, xz, bzip2).
|
|
57
|
+
// -mm=Copy would only be valid for zip/7z and causes E_INVALIDARG on xz/gzip/bzip2.
|
|
58
|
+
args.push("-mx=0");
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const isZip = format === "zip";
|
|
62
|
+
// ZIP uses level 7 by default; everything else (7z, gzip, xz, bzip2) uses level 9
|
|
63
|
+
args.push("-mx=" + (isZip && options.compression !== "maximum" ? "7" : "9"));
|
|
64
|
+
if (isZip && options.compression === "maximum") {
|
|
65
|
+
// http://superuser.com/a/742034
|
|
66
|
+
args.push("-mfb=258", "-mpass=15");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (options.dictSize != null) {
|
|
70
|
+
args.push(`-md=${options.dictSize}m`);
|
|
71
|
+
}
|
|
72
|
+
// Disable NTFS timestamps for reproducible archives
|
|
73
|
+
if (!options.isRegularFile) {
|
|
74
|
+
args.push("-mtc=off");
|
|
75
|
+
}
|
|
76
|
+
if (format === "7z" || format.endsWith(".7z")) {
|
|
77
|
+
if (options.solid === false) {
|
|
78
|
+
args.push("-ms=off");
|
|
79
|
+
}
|
|
80
|
+
if (options.isArchiveHeaderCompressed === false) {
|
|
81
|
+
args.push("-mhc=off");
|
|
82
|
+
}
|
|
83
|
+
const sevenZFilter = process.env.ELECTRON_BUILDER_7Z_FILTER;
|
|
84
|
+
if (sevenZFilter) {
|
|
85
|
+
if (!ALLOWED_7Z_FILTERS.has(sevenZFilter.toUpperCase())) {
|
|
86
|
+
throw new Error(`ELECTRON_BUILDER_7Z_FILTER must be one of: ${[...ALLOWED_7Z_FILTERS].join(", ")}`);
|
|
87
|
+
}
|
|
88
|
+
args.push(`-mf=${sevenZFilter}`);
|
|
89
|
+
}
|
|
90
|
+
args.push("-mtm=off", "-mta=off");
|
|
91
|
+
}
|
|
92
|
+
if (options.method != null && options.method !== "DEFAULT") {
|
|
93
|
+
args.push(`-mm=${options.method}`);
|
|
94
|
+
}
|
|
95
|
+
else if (format === "zip") {
|
|
96
|
+
// -mm is only set explicitly for zip (Deflate/Copy) and includes the UTF-8 flag.
|
|
97
|
+
// For all other formats the codec is implicit from the output file extension.
|
|
98
|
+
args.push(`-mm=${storeOnly ? "Copy" : "Deflate"}`);
|
|
99
|
+
args.push("-mcu");
|
|
100
|
+
}
|
|
101
|
+
return args;
|
|
102
|
+
}
|
|
103
|
+
// 7z is very fast, so, use ultra compression
|
|
104
|
+
/** @internal */
|
|
105
|
+
export async function archive(format, outFile, dirToArchive, options = {}) {
|
|
106
|
+
const outFileStat = await statOrNull(outFile);
|
|
107
|
+
const dirStat = await statOrNull(dirToArchive);
|
|
108
|
+
if (outFileStat && dirStat && outFileStat.mtime > dirStat.mtime) {
|
|
109
|
+
log.info({ reason: "Archive file is up to date", outFile }, `skipped archiving`);
|
|
110
|
+
return outFile;
|
|
111
|
+
}
|
|
112
|
+
// On macOS, use native `zip` when symlink preservation is required (e.g. .framework bundles).
|
|
113
|
+
// 7zip dereferences symlinks, corrupting .framework structure and breaking codesign.
|
|
114
|
+
// Only opt in via preserveSymlinks — Windows zip targets built on macOS still use 7z
|
|
115
|
+
// so that the UTF-8 bit (-mcu) is set correctly in the zip header.
|
|
116
|
+
const use7z = !(process.platform === "darwin" && format === "zip" && options.preserveSymlinks);
|
|
117
|
+
if (use7z) {
|
|
118
|
+
const args = compute7zCompressArgs(format, options);
|
|
119
|
+
await unlinkIfExists(outFile);
|
|
120
|
+
args.push(outFile, options.withoutDir ? "." : path.basename(dirToArchive));
|
|
121
|
+
if (options.excluded != null) {
|
|
122
|
+
for (const mask of options.excluded) {
|
|
123
|
+
if (mask.includes("..")) {
|
|
124
|
+
throw new Error(`Excluded archive pattern contains path traversal sequence: "${mask}"`);
|
|
125
|
+
}
|
|
126
|
+
args.push(`-xr!${mask}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
await exec(await getPath7za(), args, { cwd: options.withoutDir ? dirToArchive : path.dirname(dirToArchive) }, debug7z.enabled);
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
if (e.code === "ENOENT" && !(await exists(dirToArchive))) {
|
|
134
|
+
throw new Error(`Cannot create archive: "${dirToArchive}" doesn't exist`);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
throw e;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
// macOS native zip: -y preserves symlinks (required for .framework bundles)
|
|
143
|
+
const args = ["-q", "-r", "-y"];
|
|
144
|
+
if (debug7z.enabled) {
|
|
145
|
+
args.push("-v");
|
|
146
|
+
}
|
|
147
|
+
if (options.compression === "store") {
|
|
148
|
+
args.push("-0");
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
args.push(options.compression === "maximum" ? "-9" : "-7");
|
|
152
|
+
}
|
|
153
|
+
await unlinkIfExists(outFile);
|
|
154
|
+
args.push(outFile, options.withoutDir ? "." : path.basename(dirToArchive));
|
|
155
|
+
if (options.excluded != null) {
|
|
156
|
+
for (const mask of options.excluded) {
|
|
157
|
+
if (mask.includes("..")) {
|
|
158
|
+
throw new Error(`Excluded archive pattern contains path traversal sequence: "${mask}"`);
|
|
159
|
+
}
|
|
160
|
+
args.push(`-x${mask}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
await exec("zip", args, { cwd: options.withoutDir ? dirToArchive : path.dirname(dirToArchive) }, debug7z.enabled);
|
|
164
|
+
}
|
|
165
|
+
return outFile;
|
|
166
|
+
}
|
|
167
|
+
function debug7zArgs(command) {
|
|
168
|
+
const args = [command, "-bd"];
|
|
169
|
+
if (debug7z.enabled) {
|
|
170
|
+
args.push("-bb");
|
|
171
|
+
}
|
|
172
|
+
return args;
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=archive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/targets/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACrF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAI5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,C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,CAAC;gBACpC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBACxB,MAAM,IAAI,KAAK,CAAC,+DAA+D,IAAI,GAAG,CAAC,CAAA;gBACzF,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;YACxB,CAAC;QACH,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;IACnH,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,OAAkB;IACrC,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAC7B,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClB,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { debug7z, exec, exists, log, statOrNull, unlinkIfExists } from \"builder-util\"\nimport * as path from \"path\"\nimport { create } from \"tar\"\nimport type { TarOptionsWithAliasesAsync } from \"tar\"\nimport { TmpDir } from \"temp-file\"\nimport { CompressionLevel } from \"../core.js\"\nimport { getLinuxToolsMacToolset } from \"../toolsets/linuxToolsMac.js\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { getPath7za } from \"../toolsets/7zip.js\"\nimport _fsExtra from \"fs-extra\"\nconst { move } = _fsExtra\n\nconst ALLOWED_7Z_FILTERS = new Set([\"BCJ\", \"BCJ2\", \"ARM\", \"ARMT\", \"IA64\", \"PPC\", \"SPARC\", \"DELTA\"])\n\nfunction validateCompressionLevel(level: string): void {\n if (!/^[0-9]$/.test(level)) {\n throw new Error(`ELECTRON_BUILDER_COMPRESSION_LEVEL must be a single digit 0-9, got: \"${level}\"`)\n }\n}\n\ntype TarConfig = {\n compression: CompressionLevel | null | undefined\n format: string\n outFile: string\n dirToArchive: string\n isMacApp: boolean\n tempDirManager: TmpDir\n linuxToolsMac: ToolsetConfig[\"linuxToolsMac\"]\n buildResourcesDir: string\n}\n\n/** @internal */\nexport async function tar({ compression, format, outFile, dirToArchive, isMacApp, tempDirManager, linuxToolsMac, buildResourcesDir }: TarConfig): Promise<void> {\n const tarFile = await tempDirManager.getTempFile({ suffix: \".tar\" })\n const tarArgs: TarOptionsWithAliasesAsync = {\n file: tarFile,\n portable: true,\n cwd: dirToArchive,\n prefix: path.basename(outFile, `.${format}`),\n }\n let tarDirectory = \".\"\n if (isMacApp) {\n delete tarArgs.prefix\n tarArgs.cwd = path.dirname(dirToArchive)\n tarDirectory = path.basename(dirToArchive)\n }\n\n await Promise.all([\n create(tarArgs, [tarDirectory]),\n // remove file before - 7z doesn't overwrite file, but update\n unlinkIfExists(outFile),\n ])\n\n if (format === \"tar.lz\") {\n const lzipPath = process.platform === \"darwin\" ? (await getLinuxToolsMacToolset(linuxToolsMac, buildResourcesDir)).lzip : \"lzip\"\n await exec(lzipPath, [compression === \"store\" ? \"-1\" : \"-9\", \"--keep\" /* keep (don't delete) input files */, tarFile])\n // lzip creates the output file in the same directory as the input with a .lz suffix\n await move(`${tarFile}.lz`, outFile)\n return\n }\n\n const compressFormat = format === \"tar.xz\" ? \"xz\" : format === \"tar.bz2\" ? \"bzip2\" : \"gzip\"\n const args = compute7zCompressArgs(compressFormat, { isRegularFile: true, method: \"DEFAULT\", compression })\n args.push(outFile, tarFile)\n await exec(await getPath7za(), args, { cwd: path.dirname(dirToArchive) }, debug7z.enabled)\n}\n\nexport interface ArchiveOptions {\n compression?: CompressionLevel | null\n\n /**\n * @default false\n */\n withoutDir?: boolean\n\n /**\n * @default true\n */\n solid?: boolean\n\n /**\n * @default true\n */\n isArchiveHeaderCompressed?: boolean\n\n dictSize?: number\n excluded?: Array<string> | null\n\n // DEFAULT allows to disable custom logic and do not pass method switch at all\n method?: \"Copy\" | \"LZMA\" | \"Deflate\" | \"DEFAULT\"\n\n isRegularFile?: boolean\n\n /**\n * Use native macOS `zip` to preserve symlinks. Required for .framework bundles.\n * @default false\n */\n preserveSymlinks?: boolean\n}\n\nexport function compute7zCompressArgs(format: string, options: ArchiveOptions = {}) {\n let storeOnly = options.compression === \"store\"\n const args = debug7zArgs(\"a\")\n\n const compressionLevel = process.env.ELECTRON_BUILDER_COMPRESSION_LEVEL\n if (compressionLevel != null) {\n validateCompressionLevel(compressionLevel)\n storeOnly = false // env var overrides \"store\" config\n args.push(`-mx=${compressionLevel}`)\n } else if (storeOnly) {\n // -mx=0 is the universal \"no compression\" flag across all formats (zip, 7z, gzip, xz, bzip2).\n // -mm=Copy would only be valid for zip/7z and causes E_INVALIDARG on xz/gzip/bzip2.\n args.push(\"-mx=0\")\n } else {\n const isZip = format === \"zip\"\n // ZIP uses level 7 by default; everything else (7z, gzip, xz, bzip2) uses level 9\n args.push(\"-mx=\" + (isZip && options.compression !== \"maximum\" ? \"7\" : \"9\"))\n if (isZip && options.compression === \"maximum\") {\n // http://superuser.com/a/742034\n args.push(\"-mfb=258\", \"-mpass=15\")\n }\n }\n\n if (options.dictSize != null) {\n args.push(`-md=${options.dictSize}m`)\n }\n\n // Disable NTFS timestamps for reproducible archives\n if (!options.isRegularFile) {\n args.push(\"-mtc=off\")\n }\n\n if (format === \"7z\" || format.endsWith(\".7z\")) {\n if (options.solid === false) {\n args.push(\"-ms=off\")\n }\n\n if (options.isArchiveHeaderCompressed === false) {\n args.push(\"-mhc=off\")\n }\n\n const sevenZFilter = process.env.ELECTRON_BUILDER_7Z_FILTER\n if (sevenZFilter) {\n if (!ALLOWED_7Z_FILTERS.has(sevenZFilter.toUpperCase())) {\n throw new Error(`ELECTRON_BUILDER_7Z_FILTER must be one of: ${[...ALLOWED_7Z_FILTERS].join(\", \")}`)\n }\n args.push(`-mf=${sevenZFilter}`)\n }\n\n args.push(\"-mtm=off\", \"-mta=off\")\n }\n\n if (options.method != null && options.method !== \"DEFAULT\") {\n args.push(`-mm=${options.method}`)\n } else if (format === \"zip\") {\n // -mm is only set explicitly for zip (Deflate/Copy) and includes the UTF-8 flag.\n // For all other formats the codec is implicit from the output file extension.\n args.push(`-mm=${storeOnly ? \"Copy\" : \"Deflate\"}`)\n args.push(\"-mcu\")\n }\n\n return args\n}\n\n// 7z is very fast, so, use ultra compression\n/** @internal */\nexport async function archive(format: string, outFile: string, dirToArchive: string, options: ArchiveOptions = {}): Promise<string> {\n const outFileStat = await statOrNull(outFile)\n const dirStat = await statOrNull(dirToArchive)\n if (outFileStat && dirStat && outFileStat.mtime > dirStat.mtime) {\n log.info({ reason: \"Archive file is up to date\", outFile }, `skipped archiving`)\n return outFile\n }\n\n // On macOS, use native `zip` when symlink preservation is required (e.g. .framework bundles).\n // 7zip dereferences symlinks, corrupting .framework structure and breaking codesign.\n // Only opt in via preserveSymlinks — Windows zip targets built on macOS still use 7z\n // so that the UTF-8 bit (-mcu) is set correctly in the zip header.\n const use7z = !(process.platform === \"darwin\" && format === \"zip\" && options.preserveSymlinks)\n\n if (use7z) {\n const args = compute7zCompressArgs(format, options)\n await unlinkIfExists(outFile)\n args.push(outFile, options.withoutDir ? \".\" : path.basename(dirToArchive))\n if (options.excluded != null) {\n for (const mask of options.excluded) {\n if (mask.includes(\"..\")) {\n throw new Error(`Excluded archive pattern contains path traversal sequence: \"${mask}\"`)\n }\n args.push(`-xr!${mask}`)\n }\n }\n\n try {\n await exec(await getPath7za(), args, { cwd: options.withoutDir ? dirToArchive : path.dirname(dirToArchive) }, debug7z.enabled)\n } catch (e: any) {\n if (e.code === \"ENOENT\" && !(await exists(dirToArchive))) {\n throw new Error(`Cannot create archive: \"${dirToArchive}\" doesn't exist`)\n } else {\n throw e\n }\n }\n } else {\n // macOS native zip: -y preserves symlinks (required for .framework bundles)\n const args = [\"-q\", \"-r\", \"-y\"]\n if (debug7z.enabled) {\n args.push(\"-v\")\n }\n if (options.compression === \"store\") {\n args.push(\"-0\")\n } else {\n args.push(options.compression === \"maximum\" ? \"-9\" : \"-7\")\n }\n await unlinkIfExists(outFile)\n args.push(outFile, options.withoutDir ? \".\" : path.basename(dirToArchive))\n if (options.excluded != null) {\n for (const mask of options.excluded) {\n if (mask.includes(\"..\")) {\n throw new Error(`Excluded archive pattern contains path traversal sequence: \"${mask}\"`)\n }\n args.push(`-x${mask}`)\n }\n }\n await exec(\"zip\", args, { cwd: options.withoutDir ? dirToArchive : path.dirname(dirToArchive) }, debug7z.enabled)\n }\n\n return outFile\n}\n\nfunction debug7zArgs(command: \"a\" | \"x\"): Array<string> {\n const args = [command, \"-bd\"]\n if (debug7z.enabled) {\n args.push(\"-bb\")\n }\n return args\n}\n"]}
|