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
package/dist/packager.js
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import { addValue, Arch, archFromString, AsyncTaskManager, DebugLogger, executeFinally, getArtifactArchName, InvalidConfigurationError, log, MAX_FILE_REQUESTS, orNullIfFileNotExist, sanitizeDirPath, safeStringifyJson, serializeToYaml, TmpDir, } from "builder-util";
|
|
2
|
+
import { CancellationToken, deepAssign, retry } from "builder-util-runtime";
|
|
3
|
+
import { isCI } from "ci-info";
|
|
4
|
+
import { Lazy } from "lazy-val";
|
|
5
|
+
import { release as getOsRelease } from "os";
|
|
6
|
+
import * as path from "path";
|
|
7
|
+
import { AppInfo } from "./appInfo.js";
|
|
8
|
+
import { readAsarJson } from "./asar/asar.js";
|
|
9
|
+
import { Platform } from "./core.js";
|
|
10
|
+
import { createElectronFrameworkSupport } from "./electron/ElectronFramework.js";
|
|
11
|
+
import { computeArchToTargetNamesMap, createTargets, NoOpTarget } from "./targets/targetFactory.js";
|
|
12
|
+
import { computeDefaultAppDirectory, getConfig, validateConfiguration } from "./util/config/config.js";
|
|
13
|
+
import { expandMacro } from "./util/macroExpander.js";
|
|
14
|
+
import { checkMetadata, readPackageJson } from "./util/packageMetadata.js";
|
|
15
|
+
import { getRepositoryInfo } from "./util/repositoryInfo.js";
|
|
16
|
+
import { resolveFunction } from "./util/resolve.js";
|
|
17
|
+
import { installOrRebuild, nodeGypRebuild } from "./util/yarn.js";
|
|
18
|
+
import { PACKAGE_VERSION } from "./version.js";
|
|
19
|
+
import { AsyncEventEmitter } from "./util/asyncEventEmitter.js";
|
|
20
|
+
import asyncPool from "tiny-async-pool";
|
|
21
|
+
import { determinePackageManagerEnv } from "./node-module-collector/index.js";
|
|
22
|
+
import _fsExtra from "fs-extra";
|
|
23
|
+
const { chmod, mkdirs, outputFile } = _fsExtra;
|
|
24
|
+
import { setSevenZipPath } from "./toolsets/7zip.js";
|
|
25
|
+
import { getCustomToolsetPath } from "./toolsets/custom.js";
|
|
26
|
+
export class Packager {
|
|
27
|
+
get appDir() {
|
|
28
|
+
return this._appDir;
|
|
29
|
+
}
|
|
30
|
+
async getPackageManager() {
|
|
31
|
+
return (await this._packageManager.value).pm;
|
|
32
|
+
}
|
|
33
|
+
async getWorkspaceRoot() {
|
|
34
|
+
return (await (await this._packageManager.value).workspaceRoot) || this.projectDir;
|
|
35
|
+
}
|
|
36
|
+
get metadata() {
|
|
37
|
+
return this._metadata;
|
|
38
|
+
}
|
|
39
|
+
get originalMetadata() {
|
|
40
|
+
return this._originalMetadata;
|
|
41
|
+
}
|
|
42
|
+
/** The "name" field from package.json. */
|
|
43
|
+
get nodePackageName() {
|
|
44
|
+
return this.originalMetadata.name;
|
|
45
|
+
}
|
|
46
|
+
get areNodeModulesHandledExternally() {
|
|
47
|
+
return this._nodeModulesHandledExternally;
|
|
48
|
+
}
|
|
49
|
+
get isPrepackedAppAsar() {
|
|
50
|
+
return this._isPrepackedAppAsar;
|
|
51
|
+
}
|
|
52
|
+
get devMetadata() {
|
|
53
|
+
return this._devMetadata;
|
|
54
|
+
}
|
|
55
|
+
get config() {
|
|
56
|
+
return this._configuration;
|
|
57
|
+
}
|
|
58
|
+
get appInfo() {
|
|
59
|
+
return this._appInfo;
|
|
60
|
+
}
|
|
61
|
+
get repositoryInfo() {
|
|
62
|
+
return this._repositoryInfo.value;
|
|
63
|
+
}
|
|
64
|
+
get buildResourcesDir() {
|
|
65
|
+
let result = this._buildResourcesDir;
|
|
66
|
+
if (result == null) {
|
|
67
|
+
result = path.resolve(this.projectDir, this.relativeBuildResourcesDirname);
|
|
68
|
+
this._buildResourcesDir = result;
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
get relativeBuildResourcesDirname() {
|
|
73
|
+
return this.config.directories.buildResources;
|
|
74
|
+
}
|
|
75
|
+
get framework() {
|
|
76
|
+
return this._framework;
|
|
77
|
+
}
|
|
78
|
+
disposeOnBuildFinish(disposer) {
|
|
79
|
+
this.toDispose.push(disposer);
|
|
80
|
+
}
|
|
81
|
+
//noinspection JSUnusedGlobalSymbols
|
|
82
|
+
constructor(options, cancellationToken = new CancellationToken()) {
|
|
83
|
+
this.cancellationToken = cancellationToken;
|
|
84
|
+
/** Stores original metadata merged with extraMetadata from configuration. */
|
|
85
|
+
this._metadata = null;
|
|
86
|
+
/** Stores original metadata from package.json before merging with extraMetadata. */
|
|
87
|
+
this._originalMetadata = null;
|
|
88
|
+
this._nodeModulesHandledExternally = false;
|
|
89
|
+
this._isPrepackedAppAsar = false;
|
|
90
|
+
this._devMetadata = null;
|
|
91
|
+
this._configuration = null;
|
|
92
|
+
this.isTwoPackageJsonProjectLayoutUsed = false;
|
|
93
|
+
this.eventEmitter = new AsyncEventEmitter();
|
|
94
|
+
this._appInfo = null;
|
|
95
|
+
this.tempDirManager = new TmpDir("packager");
|
|
96
|
+
this._repositoryInfo = new Lazy(() => getRepositoryInfo(this.projectDir, this.metadata, this.devMetadata));
|
|
97
|
+
this.debugLogger = new DebugLogger(log.isDebugEnabled);
|
|
98
|
+
this.runtimeEnvironmentVariables = {};
|
|
99
|
+
this.stageDirPathCustomizer = (target, packager, arch) => {
|
|
100
|
+
return path.join(target.outDir, `__${target.name}-${getArtifactArchName(arch, target.name)}`);
|
|
101
|
+
};
|
|
102
|
+
this._buildResourcesDir = null;
|
|
103
|
+
this._framework = null;
|
|
104
|
+
this.toDispose = [];
|
|
105
|
+
const targets = options.targets || new Map();
|
|
106
|
+
if (options.targets == null) {
|
|
107
|
+
options.targets = targets;
|
|
108
|
+
}
|
|
109
|
+
function processTargets(platform, types) {
|
|
110
|
+
function commonArch(currentIfNotSpecified) {
|
|
111
|
+
const result = Array();
|
|
112
|
+
return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result;
|
|
113
|
+
}
|
|
114
|
+
let archToType = targets.get(platform);
|
|
115
|
+
if (archToType == null) {
|
|
116
|
+
archToType = new Map();
|
|
117
|
+
targets.set(platform, archToType);
|
|
118
|
+
}
|
|
119
|
+
if (types.length === 0) {
|
|
120
|
+
for (const arch of commonArch(false)) {
|
|
121
|
+
archToType.set(arch, []);
|
|
122
|
+
}
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
for (const type of types) {
|
|
126
|
+
const suffixPos = type.lastIndexOf(":");
|
|
127
|
+
if (suffixPos > 0) {
|
|
128
|
+
addValue(archToType, archFromString(type.substring(suffixPos + 1)), type.substring(0, suffixPos));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
for (const arch of commonArch(true)) {
|
|
132
|
+
addValue(archToType, arch, type);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (options.mac != null) {
|
|
138
|
+
processTargets(Platform.MAC, options.mac);
|
|
139
|
+
}
|
|
140
|
+
if (options.linux != null) {
|
|
141
|
+
processTargets(Platform.LINUX, options.linux);
|
|
142
|
+
}
|
|
143
|
+
if (options.win != null) {
|
|
144
|
+
processTargets(Platform.WINDOWS, options.win);
|
|
145
|
+
}
|
|
146
|
+
this.projectDir = sanitizeDirPath(options.projectDir == null ? process.cwd() : options.projectDir);
|
|
147
|
+
this._appDir = this.projectDir;
|
|
148
|
+
this._packageManager = determinePackageManagerEnv({ projectDir: this.projectDir, appDir: this.appDir, workspaceRoot: undefined });
|
|
149
|
+
this.options = {
|
|
150
|
+
...options,
|
|
151
|
+
prepackaged: options.prepackaged == null ? null : sanitizeDirPath(path.resolve(this.projectDir, options.prepackaged)),
|
|
152
|
+
};
|
|
153
|
+
log.info({ version: PACKAGE_VERSION, os: getOsRelease() }, "electron-builder");
|
|
154
|
+
}
|
|
155
|
+
async addPackagerEventHandlers() {
|
|
156
|
+
const { type } = this.appInfo;
|
|
157
|
+
const root = await this.getWorkspaceRoot();
|
|
158
|
+
this.eventEmitter.on("artifactBuildStarted", await resolveFunction(type, this.config.artifactBuildStarted, "artifactBuildStarted", root), "user");
|
|
159
|
+
this.eventEmitter.on("artifactBuildCompleted", await resolveFunction(type, this.config.artifactBuildCompleted, "artifactBuildCompleted", root), "user");
|
|
160
|
+
this.eventEmitter.on("appxManifestCreated", await resolveFunction(type, this.config.appxManifestCreated, "appxManifestCreated", root), "user");
|
|
161
|
+
this.eventEmitter.on("msiProjectCreated", await resolveFunction(type, this.config.msiProjectCreated, "msiProjectCreated", root), "user");
|
|
162
|
+
this.eventEmitter.on("beforePack", await resolveFunction(type, this.config.beforePack, "beforePack", root), "user");
|
|
163
|
+
this.eventEmitter.on("afterExtract", await resolveFunction(type, this.config.afterExtract, "afterExtract", root), "user");
|
|
164
|
+
this.eventEmitter.on("afterPack", await resolveFunction(type, this.config.afterPack, "afterPack", root), "user");
|
|
165
|
+
this.eventEmitter.on("afterSign", await resolveFunction(type, this.config.afterSign, "afterSign", root), "user");
|
|
166
|
+
}
|
|
167
|
+
onAfterPack(handler) {
|
|
168
|
+
this.eventEmitter.on("afterPack", handler);
|
|
169
|
+
return this;
|
|
170
|
+
}
|
|
171
|
+
onArtifactCreated(handler) {
|
|
172
|
+
this.eventEmitter.on("artifactCreated", handler);
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
filterPackagerEventListeners(event, type) {
|
|
176
|
+
return this.eventEmitter.filterListeners(event, type);
|
|
177
|
+
}
|
|
178
|
+
clearPackagerEventListeners() {
|
|
179
|
+
this.eventEmitter.clear();
|
|
180
|
+
}
|
|
181
|
+
async emitArtifactBuildStarted(event, logFields) {
|
|
182
|
+
log.info(logFields || {
|
|
183
|
+
target: event.targetPresentableName,
|
|
184
|
+
arch: event.arch == null ? null : Arch[event.arch],
|
|
185
|
+
file: log.filePath(event.file),
|
|
186
|
+
}, "building");
|
|
187
|
+
await this.eventEmitter.emit("artifactBuildStarted", event);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Only for sub artifacts (update info), for main artifacts use `callArtifactBuildCompleted`.
|
|
191
|
+
*/
|
|
192
|
+
async emitArtifactCreated(event) {
|
|
193
|
+
await this.eventEmitter.emit("artifactCreated", event);
|
|
194
|
+
}
|
|
195
|
+
async emitArtifactBuildCompleted(event) {
|
|
196
|
+
await this.eventEmitter.emit("artifactBuildCompleted", event);
|
|
197
|
+
await this.emitArtifactCreated(event);
|
|
198
|
+
}
|
|
199
|
+
async emitAppxManifestCreated(path) {
|
|
200
|
+
await this.eventEmitter.emit("appxManifestCreated", path);
|
|
201
|
+
}
|
|
202
|
+
async emitMsiProjectCreated(path) {
|
|
203
|
+
await this.eventEmitter.emit("msiProjectCreated", path);
|
|
204
|
+
}
|
|
205
|
+
async emitBeforePack(context) {
|
|
206
|
+
await this.eventEmitter.emit("beforePack", context);
|
|
207
|
+
}
|
|
208
|
+
async emitAfterPack(context) {
|
|
209
|
+
await this.eventEmitter.emit("afterPack", context);
|
|
210
|
+
}
|
|
211
|
+
async emitAfterSign(context) {
|
|
212
|
+
await this.eventEmitter.emit("afterSign", context);
|
|
213
|
+
}
|
|
214
|
+
async emitAfterExtract(context) {
|
|
215
|
+
await this.eventEmitter.emit("afterExtract", context);
|
|
216
|
+
}
|
|
217
|
+
async validateConfig() {
|
|
218
|
+
let configPath = null;
|
|
219
|
+
let configFromOptions = this.options.config;
|
|
220
|
+
if (typeof configFromOptions === "string") {
|
|
221
|
+
// it is a path to config file
|
|
222
|
+
configPath = configFromOptions;
|
|
223
|
+
configFromOptions = null;
|
|
224
|
+
}
|
|
225
|
+
else if (configFromOptions != null && typeof configFromOptions.extends === "string" && configFromOptions.extends.includes(".")) {
|
|
226
|
+
configPath = configFromOptions.extends;
|
|
227
|
+
delete configFromOptions.extends;
|
|
228
|
+
}
|
|
229
|
+
const projectDir = this.projectDir;
|
|
230
|
+
const devPackageFile = path.join(projectDir, "package.json");
|
|
231
|
+
this._devMetadata = await orNullIfFileNotExist(readPackageJson(devPackageFile));
|
|
232
|
+
const devMetadata = this.devMetadata;
|
|
233
|
+
const configuration = await getConfig(projectDir, configPath, configFromOptions, new Lazy(() => Promise.resolve(devMetadata)));
|
|
234
|
+
log.debug({ config: getSafeEffectiveConfig(configuration) }, "effective config");
|
|
235
|
+
this._appDir = await computeDefaultAppDirectory(projectDir, configuration.directories.app);
|
|
236
|
+
this.isTwoPackageJsonProjectLayoutUsed = this._appDir !== projectDir;
|
|
237
|
+
const appPackageFile = this.isTwoPackageJsonProjectLayoutUsed ? path.join(this.appDir, "package.json") : devPackageFile;
|
|
238
|
+
// tslint:disable:prefer-conditional-expression
|
|
239
|
+
if (this.devMetadata != null && !this.isTwoPackageJsonProjectLayoutUsed) {
|
|
240
|
+
this._metadata = this.devMetadata;
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
this._metadata = await this.readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile);
|
|
244
|
+
}
|
|
245
|
+
this._originalMetadata = deepAssign({}, this._metadata);
|
|
246
|
+
deepAssign(this._metadata, configuration.extraMetadata);
|
|
247
|
+
if (this.isTwoPackageJsonProjectLayoutUsed) {
|
|
248
|
+
log.debug({ devPackageFile, appPackageFile }, "two package.json structure is used");
|
|
249
|
+
}
|
|
250
|
+
checkMetadata(this.metadata, this.devMetadata, appPackageFile, devPackageFile);
|
|
251
|
+
await validateConfiguration(configuration, this.debugLogger);
|
|
252
|
+
this._configuration = configuration;
|
|
253
|
+
this._devMetadata = devMetadata;
|
|
254
|
+
}
|
|
255
|
+
// external caller of this method always uses isTwoPackageJsonProjectLayoutUsed=false and appDir=projectDir, no way (and need) to use another values
|
|
256
|
+
async build(repositoryInfo) {
|
|
257
|
+
await this.validateConfig();
|
|
258
|
+
if (repositoryInfo != null) {
|
|
259
|
+
this._repositoryInfo.value = Promise.resolve(repositoryInfo);
|
|
260
|
+
}
|
|
261
|
+
this._appInfo = new AppInfo(this, null);
|
|
262
|
+
await this.addPackagerEventHandlers();
|
|
263
|
+
this._framework = await createElectronFrameworkSupport(this.config, this);
|
|
264
|
+
const commonOutDirWithoutPossibleOsMacro = path.resolve(this.projectDir, expandMacro(this.config.directories.output, null, this._appInfo, {
|
|
265
|
+
os: "",
|
|
266
|
+
}));
|
|
267
|
+
if (!isCI && process.stdout.isTTY) {
|
|
268
|
+
const effectiveConfigFile = path.join(commonOutDirWithoutPossibleOsMacro, "builder-effective-config.yaml");
|
|
269
|
+
log.info({ file: log.filePath(effectiveConfigFile) }, "writing effective config");
|
|
270
|
+
await outputFile(effectiveConfigFile, getSafeEffectiveConfig(this.config));
|
|
271
|
+
}
|
|
272
|
+
// because artifact event maybe dispatched several times for different publish providers
|
|
273
|
+
const artifactPaths = new Set();
|
|
274
|
+
this.onArtifactCreated(event => {
|
|
275
|
+
if (event.file != null) {
|
|
276
|
+
artifactPaths.add(event.file);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
this.disposeOnBuildFinish(() => retry(() => this.tempDirManager.cleanup(), {
|
|
280
|
+
retries: 2,
|
|
281
|
+
interval: 2000,
|
|
282
|
+
backoff: 2000,
|
|
283
|
+
cancellationToken: this.cancellationToken,
|
|
284
|
+
shouldRetry: e => {
|
|
285
|
+
const message = e?.message || "";
|
|
286
|
+
const code = e?.code;
|
|
287
|
+
// windows file locks
|
|
288
|
+
const resourceIsBusy = message.includes("EBUSY") || code === "EBUSY";
|
|
289
|
+
if (resourceIsBusy) {
|
|
290
|
+
log.debug({ error: message || code }, "retrying temporary directory cleanup");
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
return false;
|
|
294
|
+
},
|
|
295
|
+
}));
|
|
296
|
+
const platformToTargets = await executeFinally(this.doBuild(), async () => {
|
|
297
|
+
if (this.debugLogger.isEnabled) {
|
|
298
|
+
await this.debugLogger.save(path.join(commonOutDirWithoutPossibleOsMacro, "builder-debug.yml"));
|
|
299
|
+
}
|
|
300
|
+
const toDispose = this.toDispose.slice();
|
|
301
|
+
this.toDispose.length = 0;
|
|
302
|
+
for (const disposer of toDispose) {
|
|
303
|
+
await disposer().catch((e) => {
|
|
304
|
+
log.warn({ error: e }, "cannot dispose");
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
outDir: commonOutDirWithoutPossibleOsMacro,
|
|
310
|
+
artifactPaths: Array.from(artifactPaths),
|
|
311
|
+
platformToTargets,
|
|
312
|
+
configuration: this.config,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
async readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile) {
|
|
316
|
+
let data = await orNullIfFileNotExist(readPackageJson(appPackageFile));
|
|
317
|
+
if (data != null) {
|
|
318
|
+
return data;
|
|
319
|
+
}
|
|
320
|
+
data = await orNullIfFileNotExist(readAsarJson(path.join(this.projectDir, "app.asar"), "package.json"));
|
|
321
|
+
if (data != null) {
|
|
322
|
+
this._isPrepackedAppAsar = true;
|
|
323
|
+
return data;
|
|
324
|
+
}
|
|
325
|
+
throw new Error(`Cannot find package.json in the ${path.dirname(appPackageFile)}`);
|
|
326
|
+
}
|
|
327
|
+
async doBuild() {
|
|
328
|
+
const sevenZipConfig = this.config.toolsets?.sevenZip;
|
|
329
|
+
if (typeof sevenZipConfig === "object" && sevenZipConfig != null) {
|
|
330
|
+
const toolDir = await getCustomToolsetPath(sevenZipConfig, this.buildResourcesDir);
|
|
331
|
+
const bin = path.join(toolDir, "bin", process.platform === "win32" ? "7za.exe" : "7za");
|
|
332
|
+
if (process.platform !== "win32") {
|
|
333
|
+
await chmod(bin, 0o755);
|
|
334
|
+
}
|
|
335
|
+
setSevenZipPath(bin);
|
|
336
|
+
}
|
|
337
|
+
const taskManager = new AsyncTaskManager(this.cancellationToken);
|
|
338
|
+
const syncTargetsIfAny = [];
|
|
339
|
+
const platformToTarget = new Map();
|
|
340
|
+
const createdOutDirs = new Set();
|
|
341
|
+
for (const [platform, archToType] of this.options.targets) {
|
|
342
|
+
if (this.cancellationToken.cancelled) {
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
if (platform === Platform.MAC && process.platform === Platform.WINDOWS.nodeName) {
|
|
346
|
+
throw new InvalidConfigurationError("Build for macOS is supported only on macOS, please see https://electron.build/multi-platform-build");
|
|
347
|
+
}
|
|
348
|
+
const packager = await this.createHelper(platform);
|
|
349
|
+
const nameToTarget = new Map();
|
|
350
|
+
platformToTarget.set(platform, nameToTarget);
|
|
351
|
+
let poolCount = Math.floor(packager.config.concurrency?.jobs || 1);
|
|
352
|
+
if (poolCount < 1) {
|
|
353
|
+
log.warn({ concurrency: poolCount }, "concurrency is invalid, overriding with job count: 1");
|
|
354
|
+
poolCount = 1;
|
|
355
|
+
}
|
|
356
|
+
else if (poolCount > MAX_FILE_REQUESTS) {
|
|
357
|
+
log.warn({ concurrency: poolCount, MAX_FILE_REQUESTS }, `job concurrency is greater than recommended MAX_FILE_REQUESTS, this may lead to File Descriptor errors (too many files open). Proceed with caution (e.g. this is an experimental feature)`);
|
|
358
|
+
}
|
|
359
|
+
const packPromises = [];
|
|
360
|
+
for (const [arch, targetNames] of computeArchToTargetNamesMap(archToType, packager, platform)) {
|
|
361
|
+
if (this.cancellationToken.cancelled) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
// support os and arch macro in output value
|
|
365
|
+
const outDir = path.resolve(this.projectDir, packager.expandMacro(this.config.directories.output, Arch[arch]));
|
|
366
|
+
const targetList = createTargets(nameToTarget, targetNames.length === 0 ? packager.defaultTarget : targetNames, outDir, packager);
|
|
367
|
+
await createOutDirIfNeed(targetList, createdOutDirs);
|
|
368
|
+
const promise = packager.pack(outDir, arch, targetList, taskManager);
|
|
369
|
+
if (poolCount < 2) {
|
|
370
|
+
await promise;
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
packPromises.push(promise);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
await asyncPool(poolCount, packPromises, async (it) => {
|
|
377
|
+
if (this.cancellationToken.cancelled) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
await it;
|
|
381
|
+
});
|
|
382
|
+
if (this.cancellationToken.cancelled) {
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
for (const target of nameToTarget.values()) {
|
|
386
|
+
if (target.isAsyncSupported) {
|
|
387
|
+
taskManager.addTask(target.finishBuild());
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
syncTargetsIfAny.push(target);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
await taskManager.awaitTasks();
|
|
395
|
+
for (const target of syncTargetsIfAny) {
|
|
396
|
+
if (this.cancellationToken.cancelled) {
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
await target.finishBuild();
|
|
400
|
+
}
|
|
401
|
+
return platformToTarget;
|
|
402
|
+
}
|
|
403
|
+
async createHelper(platform) {
|
|
404
|
+
if (this.options.platformPackagerFactory != null) {
|
|
405
|
+
return this.options.platformPackagerFactory(this, platform);
|
|
406
|
+
}
|
|
407
|
+
switch (platform) {
|
|
408
|
+
case Platform.MAC: {
|
|
409
|
+
const helperClass = (await import("./macPackager.js")).MacPackager;
|
|
410
|
+
return new helperClass(this);
|
|
411
|
+
}
|
|
412
|
+
case Platform.WINDOWS: {
|
|
413
|
+
const helperClass = (await import("./winPackager.js")).WinPackager;
|
|
414
|
+
return new helperClass(this);
|
|
415
|
+
}
|
|
416
|
+
case Platform.LINUX:
|
|
417
|
+
return new (await import("./linuxPackager.js")).LinuxPackager(this);
|
|
418
|
+
default:
|
|
419
|
+
throw new Error(`Unknown platform: ${platform}`);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
async installAppDependencies(platform, arch) {
|
|
423
|
+
if (this.options.prepackaged != null || !this.framework.isNpmRebuildRequired) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
const frameworkInfo = { version: this.framework.version, useCustomDist: true };
|
|
427
|
+
const config = this.config;
|
|
428
|
+
if (config.nativeModules?.nodeGypRebuild === true) {
|
|
429
|
+
await nodeGypRebuild(platform.nodeName, Arch[arch], frameworkInfo);
|
|
430
|
+
}
|
|
431
|
+
if (config.nativeModules?.npmRebuild === false) {
|
|
432
|
+
log.info({ reason: "nativeModules.npmRebuild is set to false" }, "skipped dependencies rebuild");
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
const beforeBuild = await resolveFunction(this.appInfo.type, config.beforeBuild, "beforeBuild", await this.getWorkspaceRoot());
|
|
436
|
+
if (beforeBuild != null) {
|
|
437
|
+
const performDependenciesInstallOrRebuild = await beforeBuild({
|
|
438
|
+
appDir: this.appDir,
|
|
439
|
+
electronVersion: this.config.electronVersion,
|
|
440
|
+
platform,
|
|
441
|
+
arch: Arch[arch],
|
|
442
|
+
});
|
|
443
|
+
// If beforeBuild resolves to false, it means that handling node_modules is done outside of electron-builder.
|
|
444
|
+
this._nodeModulesHandledExternally = !performDependenciesInstallOrRebuild;
|
|
445
|
+
if (!performDependenciesInstallOrRebuild) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (config.nativeModules?.buildDependenciesFromSource === true && platform.nodeName !== process.platform) {
|
|
450
|
+
log.info({ reason: "platform is different and nativeModules.buildDependenciesFromSource is set to true" }, "skipped dependencies rebuild");
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
await installOrRebuild(config, { appDir: this.appDir, projectDir: this.projectDir, workspaceRoot: await this.getWorkspaceRoot() }, {
|
|
454
|
+
frameworkInfo,
|
|
455
|
+
platform: platform.nodeName,
|
|
456
|
+
arch: Arch[arch],
|
|
457
|
+
}, false, this.runtimeEnvironmentVariables);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function createOutDirIfNeed(targetList, createdOutDirs) {
|
|
462
|
+
const ourDirs = new Set();
|
|
463
|
+
for (const target of targetList) {
|
|
464
|
+
// noinspection SuspiciousInstanceOfGuard
|
|
465
|
+
if (target instanceof NoOpTarget) {
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
const outDir = target.outDir;
|
|
469
|
+
if (!createdOutDirs.has(outDir)) {
|
|
470
|
+
ourDirs.add(outDir);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (ourDirs.size === 0) {
|
|
474
|
+
return Promise.resolve();
|
|
475
|
+
}
|
|
476
|
+
return Promise.all(Array.from(ourDirs)
|
|
477
|
+
.sort()
|
|
478
|
+
.map(dir => {
|
|
479
|
+
return mkdirs(dir)
|
|
480
|
+
.then(() => chmod(dir, 0o755) /* set explicitly */)
|
|
481
|
+
.then(() => createdOutDirs.add(dir));
|
|
482
|
+
}));
|
|
483
|
+
}
|
|
484
|
+
function getSafeEffectiveConfig(configuration) {
|
|
485
|
+
const o = JSON.parse(safeStringifyJson(configuration));
|
|
486
|
+
if (o.cscLink != null) {
|
|
487
|
+
o.cscLink = "<hidden by builder>";
|
|
488
|
+
}
|
|
489
|
+
return serializeToYaml(o, true);
|
|
490
|
+
}
|
|
491
|
+
//# sourceMappingURL=packager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packager.js","sourceRoot":"","sources":["../src/packager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,cA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AC,CAAC,OAAO,GAAG,qBAAqB,CAAA;IACnC,CAAC;IACD,OAAO,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import {\n addValue,\n Arch,\n archFromString,\n AsyncTaskManager,\n DebugLogger,\n executeFinally,\n getArtifactArchName,\n InvalidConfigurationError,\n log,\n MAX_FILE_REQUESTS,\n orNullIfFileNotExist,\n sanitizeDirPath,\n safeStringifyJson,\n serializeToYaml,\n TmpDir,\n} from \"builder-util\"\nimport { CancellationToken, deepAssign, retry } from \"builder-util-runtime\"\n\nimport { isCI } from \"ci-info\"\nimport { Lazy } from \"lazy-val\"\nimport { release as getOsRelease } from \"os\"\nimport * as path from \"path\"\nimport { AppInfo } from \"./appInfo.js\"\nimport { readAsarJson } from \"./asar/asar.js\"\nimport { AfterExtractContext, AfterPackContext, BeforePackContext, Configuration, Hook } from \"./configuration.js\"\nimport { Platform, SourceRepositoryInfo, Target } from \"./core.js\"\nimport { createElectronFrameworkSupport } from \"./electron/ElectronFramework.js\"\nimport { Framework } from \"./Framework.js\"\nimport { Metadata } from \"./options/metadata.js\"\nimport { ArtifactBuildStarted, ArtifactCreated, PackagerOptions } from \"./packagerApi.js\"\nimport { PlatformPackager } from \"./platformPackager.js\"\nimport { computeArchToTargetNamesMap, createTargets, NoOpTarget } from \"./targets/targetFactory.js\"\nimport { computeDefaultAppDirectory, getConfig, validateConfiguration } from \"./util/config/config.js\"\nimport { expandMacro } from \"./util/macroExpander.js\"\nimport { checkMetadata, readPackageJson } from \"./util/packageMetadata.js\"\nimport { getRepositoryInfo } from \"./util/repositoryInfo.js\"\nimport { resolveFunction } from \"./util/resolve.js\"\nimport { installOrRebuild, nodeGypRebuild } from \"./util/yarn.js\"\nimport { PACKAGE_VERSION } from \"./version.js\"\nimport { AsyncEventEmitter, HandlerType } from \"./util/asyncEventEmitter.js\"\nimport asyncPool from \"tiny-async-pool\"\nimport { determinePackageManagerEnv, PM } from \"./node-module-collector/index.js\"\nimport _fsExtra from \"fs-extra\"\nconst { chmod, mkdirs, outputFile } = _fsExtra\nimport { setSevenZipPath } from \"./toolsets/7zip.js\"\nimport { getCustomToolsetPath } from \"./toolsets/custom.js\"\n\ntype PackagerEvents = {\n artifactBuildStarted: Hook<ArtifactBuildStarted, void>\n\n beforePack: Hook<BeforePackContext, void>\n afterExtract: Hook<AfterExtractContext, void>\n afterPack: Hook<AfterPackContext, void>\n afterSign: Hook<AfterPackContext, void>\n\n artifactBuildCompleted: Hook<ArtifactCreated, void>\n\n msiProjectCreated: Hook<string, void>\n appxManifestCreated: Hook<string, void>\n\n // internal-use only, prefer usage of `artifactBuildCompleted`\n artifactCreated: Hook<ArtifactCreated, void>\n}\n\nexport class Packager {\n readonly projectDir: string\n\n private _appDir: string\n get appDir(): string {\n return this._appDir\n }\n\n private readonly _packageManager: Lazy<{ pm: PM; workspaceRoot: Promise<string | undefined> }>\n async getPackageManager(): Promise<PM> {\n return (await this._packageManager.value).pm\n }\n async getWorkspaceRoot(): Promise<string> {\n return (await (await this._packageManager.value).workspaceRoot) || this.projectDir\n }\n\n /** Stores original metadata merged with extraMetadata from configuration. */\n private _metadata: Metadata | null = null\n get metadata(): Metadata {\n return this._metadata!\n }\n\n /** Stores original metadata from package.json before merging with extraMetadata. */\n private _originalMetadata: Metadata | null = null\n get originalMetadata(): Metadata {\n return this._originalMetadata!\n }\n\n /** The \"name\" field from package.json. */\n get nodePackageName() {\n return this.originalMetadata.name!\n }\n\n private _nodeModulesHandledExternally = false\n\n get areNodeModulesHandledExternally(): boolean {\n return this._nodeModulesHandledExternally\n }\n\n private _isPrepackedAppAsar = false\n\n get isPrepackedAppAsar(): boolean {\n return this._isPrepackedAppAsar\n }\n\n private _devMetadata: Metadata | null = null\n get devMetadata(): Metadata | null {\n return this._devMetadata\n }\n\n private _configuration: Configuration | null = null\n\n get config(): Configuration {\n return this._configuration!\n }\n\n isTwoPackageJsonProjectLayoutUsed = false\n\n private readonly eventEmitter = new AsyncEventEmitter<PackagerEvents>()\n\n _appInfo: AppInfo | null = null\n get appInfo(): AppInfo {\n return this._appInfo!\n }\n\n readonly tempDirManager = new TmpDir(\"packager\")\n\n private _repositoryInfo = new Lazy<SourceRepositoryInfo | null>(() => getRepositoryInfo(this.projectDir, this.metadata, this.devMetadata))\n\n readonly options: PackagerOptions\n\n readonly debugLogger = new DebugLogger(log.isDebugEnabled)\n\n get repositoryInfo(): Promise<SourceRepositoryInfo | null> {\n return this._repositoryInfo.value\n }\n\n private runtimeEnvironmentVariables: NodeJS.ProcessEnv = {}\n\n stageDirPathCustomizer: (target: Target, packager: PlatformPackager<any>, arch: Arch) => string = (target, packager, arch) => {\n return path.join(target.outDir, `__${target.name}-${getArtifactArchName(arch, target.name)}`)\n }\n\n private _buildResourcesDir: string | null = null\n\n get buildResourcesDir(): string {\n let result = this._buildResourcesDir\n if (result == null) {\n result = path.resolve(this.projectDir, this.relativeBuildResourcesDirname)\n this._buildResourcesDir = result\n }\n return result\n }\n\n get relativeBuildResourcesDirname(): string {\n return this.config.directories!.buildResources!\n }\n\n private _framework: Framework | null = null\n get framework(): Framework {\n return this._framework!\n }\n\n private readonly toDispose: Array<() => Promise<void>> = []\n\n disposeOnBuildFinish(disposer: () => Promise<void>) {\n this.toDispose.push(disposer)\n }\n\n //noinspection JSUnusedGlobalSymbols\n constructor(\n options: PackagerOptions,\n readonly cancellationToken = new CancellationToken()\n ) {\n const targets = options.targets || new Map<Platform, Map<Arch, Array<string>>>()\n if (options.targets == null) {\n options.targets = targets\n }\n\n function processTargets(platform: Platform, types: Array<string>) {\n function commonArch(currentIfNotSpecified: boolean): Array<Arch> {\n const result = Array<Arch>()\n return result.length === 0 && currentIfNotSpecified ? [archFromString(process.arch)] : result\n }\n\n let archToType = targets.get(platform)\n if (archToType == null) {\n archToType = new Map<Arch, Array<string>>()\n targets.set(platform, archToType)\n }\n\n if (types.length === 0) {\n for (const arch of commonArch(false)) {\n archToType.set(arch, [])\n }\n return\n }\n\n for (const type of types) {\n const suffixPos = type.lastIndexOf(\":\")\n if (suffixPos > 0) {\n addValue(archToType, archFromString(type.substring(suffixPos + 1)), type.substring(0, suffixPos))\n } else {\n for (const arch of commonArch(true)) {\n addValue(archToType, arch, type)\n }\n }\n }\n }\n\n if (options.mac != null) {\n processTargets(Platform.MAC, options.mac)\n }\n if (options.linux != null) {\n processTargets(Platform.LINUX, options.linux)\n }\n if (options.win != null) {\n processTargets(Platform.WINDOWS, options.win)\n }\n\n this.projectDir = sanitizeDirPath(options.projectDir == null ? process.cwd() : options.projectDir)\n this._appDir = this.projectDir\n this._packageManager = determinePackageManagerEnv({ projectDir: this.projectDir, appDir: this.appDir, workspaceRoot: undefined })\n\n this.options = {\n ...options,\n prepackaged: options.prepackaged == null ? null : sanitizeDirPath(path.resolve(this.projectDir, options.prepackaged)),\n }\n\n log.info({ version: PACKAGE_VERSION, os: getOsRelease() }, \"electron-builder\")\n }\n\n private async addPackagerEventHandlers() {\n const { type } = this.appInfo\n const root = await this.getWorkspaceRoot()\n this.eventEmitter.on(\"artifactBuildStarted\", await resolveFunction(type, this.config.artifactBuildStarted, \"artifactBuildStarted\", root), \"user\")\n this.eventEmitter.on(\"artifactBuildCompleted\", await resolveFunction(type, this.config.artifactBuildCompleted, \"artifactBuildCompleted\", root), \"user\")\n\n this.eventEmitter.on(\"appxManifestCreated\", await resolveFunction(type, this.config.appxManifestCreated, \"appxManifestCreated\", root), \"user\")\n this.eventEmitter.on(\"msiProjectCreated\", await resolveFunction(type, this.config.msiProjectCreated, \"msiProjectCreated\", root), \"user\")\n\n this.eventEmitter.on(\"beforePack\", await resolveFunction(type, this.config.beforePack, \"beforePack\", root), \"user\")\n this.eventEmitter.on(\"afterExtract\", await resolveFunction(type, this.config.afterExtract, \"afterExtract\", root), \"user\")\n this.eventEmitter.on(\"afterPack\", await resolveFunction(type, this.config.afterPack, \"afterPack\", root), \"user\")\n this.eventEmitter.on(\"afterSign\", await resolveFunction(type, this.config.afterSign, \"afterSign\", root), \"user\")\n }\n\n onAfterPack(handler: PackagerEvents[\"afterPack\"]): Packager {\n this.eventEmitter.on(\"afterPack\", handler)\n return this\n }\n\n onArtifactCreated(handler: PackagerEvents[\"artifactCreated\"]): Packager {\n this.eventEmitter.on(\"artifactCreated\", handler)\n return this\n }\n\n filterPackagerEventListeners(event: keyof PackagerEvents, type: HandlerType | undefined) {\n return this.eventEmitter.filterListeners(event, type)\n }\n\n clearPackagerEventListeners() {\n this.eventEmitter.clear()\n }\n\n async emitArtifactBuildStarted(event: ArtifactBuildStarted, logFields?: any) {\n log.info(\n logFields || {\n target: event.targetPresentableName,\n arch: event.arch == null ? null : Arch[event.arch],\n file: log.filePath(event.file),\n },\n \"building\"\n )\n await this.eventEmitter.emit(\"artifactBuildStarted\", event)\n }\n\n /**\n * Only for sub artifacts (update info), for main artifacts use `callArtifactBuildCompleted`.\n */\n async emitArtifactCreated(event: ArtifactCreated) {\n await this.eventEmitter.emit(\"artifactCreated\", event)\n }\n\n async emitArtifactBuildCompleted(event: ArtifactCreated) {\n await this.eventEmitter.emit(\"artifactBuildCompleted\", event)\n await this.emitArtifactCreated(event)\n }\n\n async emitAppxManifestCreated(path: string) {\n await this.eventEmitter.emit(\"appxManifestCreated\", path)\n }\n\n async emitMsiProjectCreated(path: string) {\n await this.eventEmitter.emit(\"msiProjectCreated\", path)\n }\n\n async emitBeforePack(context: BeforePackContext) {\n await this.eventEmitter.emit(\"beforePack\", context)\n }\n\n async emitAfterPack(context: AfterPackContext) {\n await this.eventEmitter.emit(\"afterPack\", context)\n }\n\n async emitAfterSign(context: AfterPackContext) {\n await this.eventEmitter.emit(\"afterSign\", context)\n }\n\n async emitAfterExtract(context: AfterPackContext) {\n await this.eventEmitter.emit(\"afterExtract\", context)\n }\n\n async validateConfig(): Promise<void> {\n let configPath: string | null = null\n let configFromOptions = this.options.config\n if (typeof configFromOptions === \"string\") {\n // it is a path to config file\n configPath = configFromOptions\n configFromOptions = null\n } else if (configFromOptions != null && typeof configFromOptions.extends === \"string\" && configFromOptions.extends.includes(\".\")) {\n configPath = configFromOptions.extends\n delete configFromOptions.extends\n }\n\n const projectDir = this.projectDir\n\n const devPackageFile = path.join(projectDir, \"package.json\")\n this._devMetadata = await orNullIfFileNotExist(readPackageJson(devPackageFile))\n\n const devMetadata = this.devMetadata\n const configuration = await getConfig(projectDir, configPath, configFromOptions, new Lazy(() => Promise.resolve(devMetadata)))\n\n log.debug({ config: getSafeEffectiveConfig(configuration) }, \"effective config\")\n\n this._appDir = await computeDefaultAppDirectory(projectDir, configuration.directories!.app)\n this.isTwoPackageJsonProjectLayoutUsed = this._appDir !== projectDir\n\n const appPackageFile = this.isTwoPackageJsonProjectLayoutUsed ? path.join(this.appDir, \"package.json\") : devPackageFile\n\n // tslint:disable:prefer-conditional-expression\n if (this.devMetadata != null && !this.isTwoPackageJsonProjectLayoutUsed) {\n this._metadata = this.devMetadata\n } else {\n this._metadata = await this.readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile)\n }\n this._originalMetadata = deepAssign({}, this._metadata)\n deepAssign(this._metadata, configuration.extraMetadata)\n\n if (this.isTwoPackageJsonProjectLayoutUsed) {\n log.debug({ devPackageFile, appPackageFile }, \"two package.json structure is used\")\n }\n checkMetadata(this.metadata, this.devMetadata, appPackageFile, devPackageFile)\n\n await validateConfiguration(configuration, this.debugLogger)\n\n this._configuration = configuration\n this._devMetadata = devMetadata\n }\n\n // external caller of this method always uses isTwoPackageJsonProjectLayoutUsed=false and appDir=projectDir, no way (and need) to use another values\n async build(repositoryInfo?: SourceRepositoryInfo): Promise<BuildResult> {\n await this.validateConfig()\n\n if (repositoryInfo != null) {\n this._repositoryInfo.value = Promise.resolve(repositoryInfo)\n }\n\n this._appInfo = new AppInfo(this, null)\n await this.addPackagerEventHandlers()\n\n this._framework = await createElectronFrameworkSupport(this.config, this)\n\n const commonOutDirWithoutPossibleOsMacro = path.resolve(\n this.projectDir,\n expandMacro(this.config.directories!.output!, null, this._appInfo, {\n os: \"\",\n })\n )\n\n if (!isCI && (process.stdout as any).isTTY) {\n const effectiveConfigFile = path.join(commonOutDirWithoutPossibleOsMacro, \"builder-effective-config.yaml\")\n log.info({ file: log.filePath(effectiveConfigFile) }, \"writing effective config\")\n await outputFile(effectiveConfigFile, getSafeEffectiveConfig(this.config))\n }\n\n // because artifact event maybe dispatched several times for different publish providers\n const artifactPaths = new Set<string>()\n this.onArtifactCreated(event => {\n if (event.file != null) {\n artifactPaths.add(event.file)\n }\n })\n\n this.disposeOnBuildFinish(() =>\n retry(() => this.tempDirManager.cleanup(), {\n retries: 2,\n interval: 2000,\n backoff: 2000,\n cancellationToken: this.cancellationToken,\n shouldRetry: e => {\n const message: string = e?.message || \"\"\n const code = e?.code\n // windows file locks\n const resourceIsBusy = message.includes(\"EBUSY\") || code === \"EBUSY\"\n if (resourceIsBusy) {\n log.debug({ error: message || code }, \"retrying temporary directory cleanup\")\n return true\n }\n return false\n },\n })\n )\n\n const platformToTargets = await executeFinally(this.doBuild(), async () => {\n if (this.debugLogger.isEnabled) {\n await this.debugLogger.save(path.join(commonOutDirWithoutPossibleOsMacro, \"builder-debug.yml\"))\n }\n\n const toDispose = this.toDispose.slice()\n this.toDispose.length = 0\n for (const disposer of toDispose) {\n await disposer().catch((e: any) => {\n log.warn({ error: e }, \"cannot dispose\")\n })\n }\n })\n\n return {\n outDir: commonOutDirWithoutPossibleOsMacro,\n artifactPaths: Array.from(artifactPaths),\n platformToTargets,\n configuration: this.config,\n }\n }\n\n private async readProjectMetadataIfTwoPackageStructureOrPrepacked(appPackageFile: string): Promise<Metadata> {\n let data = await orNullIfFileNotExist(readPackageJson(appPackageFile))\n if (data != null) {\n return data\n }\n\n data = await orNullIfFileNotExist(readAsarJson(path.join(this.projectDir, \"app.asar\"), \"package.json\"))\n if (data != null) {\n this._isPrepackedAppAsar = true\n return data\n }\n\n throw new Error(`Cannot find package.json in the ${path.dirname(appPackageFile)}`)\n }\n\n private async doBuild(): Promise<Map<Platform, Map<string, Target>>> {\n const sevenZipConfig = this.config.toolsets?.sevenZip\n if (typeof sevenZipConfig === \"object\" && sevenZipConfig != null) {\n const toolDir = await getCustomToolsetPath(sevenZipConfig, this.buildResourcesDir)\n const bin = path.join(toolDir, \"bin\", process.platform === \"win32\" ? \"7za.exe\" : \"7za\")\n if (process.platform !== \"win32\") {\n await chmod(bin, 0o755)\n }\n setSevenZipPath(bin)\n }\n\n const taskManager = new AsyncTaskManager(this.cancellationToken)\n const syncTargetsIfAny = [] as Target[]\n\n const platformToTarget = new Map<Platform, Map<string, Target>>()\n const createdOutDirs = new Set<string>()\n\n for (const [platform, archToType] of this.options.targets!) {\n if (this.cancellationToken.cancelled) {\n break\n }\n\n if (platform === Platform.MAC && process.platform === Platform.WINDOWS.nodeName) {\n throw new InvalidConfigurationError(\"Build for macOS is supported only on macOS, please see https://electron.build/multi-platform-build\")\n }\n\n const packager = await this.createHelper(platform)\n const nameToTarget: Map<string, Target> = new Map()\n platformToTarget.set(platform, nameToTarget)\n\n let poolCount = Math.floor(packager.config.concurrency?.jobs || 1)\n if (poolCount < 1) {\n log.warn({ concurrency: poolCount }, \"concurrency is invalid, overriding with job count: 1\")\n poolCount = 1\n } else if (poolCount > MAX_FILE_REQUESTS) {\n log.warn(\n { concurrency: poolCount, MAX_FILE_REQUESTS },\n `job concurrency is greater than recommended MAX_FILE_REQUESTS, this may lead to File Descriptor errors (too many files open). Proceed with caution (e.g. this is an experimental feature)`\n )\n }\n const packPromises: Promise<any>[] = []\n\n for (const [arch, targetNames] of computeArchToTargetNamesMap(archToType, packager, platform)) {\n if (this.cancellationToken.cancelled) {\n break\n }\n\n // support os and arch macro in output value\n const outDir = path.resolve(this.projectDir, packager.expandMacro(this.config.directories!.output!, Arch[arch]))\n const targetList = createTargets(nameToTarget, targetNames.length === 0 ? packager.defaultTarget : targetNames, outDir, packager)\n await createOutDirIfNeed(targetList, createdOutDirs)\n const promise = packager.pack(outDir, arch, targetList, taskManager)\n if (poolCount < 2) {\n await promise\n } else {\n packPromises.push(promise)\n }\n }\n\n await asyncPool(poolCount, packPromises, async it => {\n if (this.cancellationToken.cancelled) {\n return\n }\n await it\n })\n\n if (this.cancellationToken.cancelled) {\n break\n }\n\n for (const target of nameToTarget.values()) {\n if (target.isAsyncSupported) {\n taskManager.addTask(target.finishBuild())\n } else {\n syncTargetsIfAny.push(target)\n }\n }\n }\n\n await taskManager.awaitTasks()\n\n for (const target of syncTargetsIfAny) {\n if (this.cancellationToken.cancelled) {\n break\n }\n await target.finishBuild()\n }\n return platformToTarget\n }\n\n private async createHelper(platform: Platform): Promise<PlatformPackager<any>> {\n if (this.options.platformPackagerFactory != null) {\n return this.options.platformPackagerFactory(this, platform)\n }\n\n switch (platform) {\n case Platform.MAC: {\n const helperClass = (await import(\"./macPackager.js\")).MacPackager\n return new helperClass(this)\n }\n\n case Platform.WINDOWS: {\n const helperClass = (await import(\"./winPackager.js\")).WinPackager\n return new helperClass(this)\n }\n\n case Platform.LINUX:\n return new (await import(\"./linuxPackager.js\")).LinuxPackager(this)\n\n default:\n throw new Error(`Unknown platform: ${platform}`)\n }\n }\n\n public async installAppDependencies(platform: Platform, arch: Arch): Promise<any> {\n if (this.options.prepackaged != null || !this.framework.isNpmRebuildRequired) {\n return\n }\n\n const frameworkInfo = { version: this.framework.version, useCustomDist: true }\n const config = this.config\n if (config.nativeModules?.nodeGypRebuild === true) {\n await nodeGypRebuild(platform.nodeName, Arch[arch], frameworkInfo)\n }\n\n if (config.nativeModules?.npmRebuild === false) {\n log.info({ reason: \"nativeModules.npmRebuild is set to false\" }, \"skipped dependencies rebuild\")\n return\n }\n\n const beforeBuild = await resolveFunction(this.appInfo.type, config.beforeBuild, \"beforeBuild\", await this.getWorkspaceRoot())\n if (beforeBuild != null) {\n const performDependenciesInstallOrRebuild = await beforeBuild({\n appDir: this.appDir,\n electronVersion: this.config.electronVersion!,\n platform,\n arch: Arch[arch],\n })\n\n // If beforeBuild resolves to false, it means that handling node_modules is done outside of electron-builder.\n this._nodeModulesHandledExternally = !performDependenciesInstallOrRebuild\n if (!performDependenciesInstallOrRebuild) {\n return\n }\n }\n\n if (config.nativeModules?.buildDependenciesFromSource === true && platform.nodeName !== process.platform) {\n log.info({ reason: \"platform is different and nativeModules.buildDependenciesFromSource is set to true\" }, \"skipped dependencies rebuild\")\n } else {\n await installOrRebuild(\n config,\n { appDir: this.appDir, projectDir: this.projectDir, workspaceRoot: await this.getWorkspaceRoot() },\n {\n frameworkInfo,\n platform: platform.nodeName,\n arch: Arch[arch],\n },\n false,\n this.runtimeEnvironmentVariables\n )\n }\n }\n}\n\nfunction createOutDirIfNeed(targetList: Array<Target>, createdOutDirs: Set<string>): Promise<any> {\n const ourDirs = new Set<string>()\n for (const target of targetList) {\n // noinspection SuspiciousInstanceOfGuard\n if (target instanceof NoOpTarget) {\n continue\n }\n\n const outDir = target.outDir\n if (!createdOutDirs.has(outDir)) {\n ourDirs.add(outDir)\n }\n }\n\n if (ourDirs.size === 0) {\n return Promise.resolve()\n }\n\n return Promise.all(\n Array.from(ourDirs)\n .sort()\n .map(dir => {\n return mkdirs(dir)\n .then(() => chmod(dir, 0o755) /* set explicitly */)\n .then(() => createdOutDirs.add(dir))\n })\n )\n}\n\nexport interface BuildResult {\n readonly outDir: string\n readonly artifactPaths: Array<string>\n readonly platformToTargets: Map<Platform, Map<string, Target>>\n readonly configuration: Configuration\n}\n\nfunction getSafeEffectiveConfig(configuration: Configuration): string {\n const o = JSON.parse(safeStringifyJson(configuration))\n if (o.cscLink != null) {\n o.cscLink = \"<hidden by builder>\"\n }\n return serializeToYaml(o, true)\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Arch } from "builder-util";
|
|
2
|
+
import { PublishConfiguration } from "builder-util-runtime";
|
|
3
|
+
import { UploadTask } from "electron-publish";
|
|
4
|
+
import { Configuration } from "./configuration.js";
|
|
5
|
+
import { Platform, Target } from "./core.js";
|
|
6
|
+
import { Packager } from "./packager.js";
|
|
7
|
+
import { PlatformPackager } from "./platformPackager.js";
|
|
8
|
+
export interface PackagerOptions {
|
|
9
|
+
targets?: Map<Platform, Map<Arch, Array<string>>>;
|
|
10
|
+
mac?: Array<string>;
|
|
11
|
+
linux?: Array<string>;
|
|
12
|
+
win?: Array<string>;
|
|
13
|
+
projectDir?: string | null;
|
|
14
|
+
platformPackagerFactory?: ((info: Packager, platform: Platform) => PlatformPackager<any>) | null;
|
|
15
|
+
readonly config?: Configuration | string | null;
|
|
16
|
+
readonly effectiveOptionComputed?: (options: any) => Promise<boolean>;
|
|
17
|
+
readonly prepackaged?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ArtifactCreated extends UploadTask {
|
|
20
|
+
readonly packager: PlatformPackager<any>;
|
|
21
|
+
readonly target: Target | null;
|
|
22
|
+
updateInfo?: any;
|
|
23
|
+
readonly safeArtifactName?: string | null;
|
|
24
|
+
readonly publishConfig?: PublishConfiguration | null;
|
|
25
|
+
readonly isWriteUpdateInfo?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ArtifactBuildStarted {
|
|
28
|
+
readonly targetPresentableName: string;
|
|
29
|
+
readonly file: string;
|
|
30
|
+
readonly arch: Arch | null;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=packagerApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packagerApi.d.ts","sourceRoot":"","sources":["../src/packagerApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE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AC,IAAI,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packagerApi.js","sourceRoot":"","sources":["../src/packagerApi.ts"],"names":[],"mappings":"","sourcesContent":["import { Arch } from \"builder-util\"\nimport { PublishConfiguration } from \"builder-util-runtime\"\nimport { UploadTask } from \"electron-publish\"\nimport { Configuration } from \"./configuration.js\"\nimport { Platform, Target } from \"./core.js\"\nimport { Packager } from \"./packager.js\"\nimport { PlatformPackager } from \"./platformPackager.js\"\n\nexport interface PackagerOptions {\n targets?: Map<Platform, Map<Arch, Array<string>>>\n\n mac?: Array<string>\n linux?: Array<string>\n win?: Array<string>\n\n projectDir?: string | null\n\n platformPackagerFactory?: ((info: Packager, platform: Platform) => PlatformPackager<any>) | null\n\n readonly config?: Configuration | string | null\n\n readonly effectiveOptionComputed?: (options: any) => Promise<boolean>\n\n readonly prepackaged?: string | null\n}\n\nexport interface ArtifactCreated extends UploadTask {\n readonly packager: PlatformPackager<any>\n readonly target: Target | null\n\n updateInfo?: any\n\n readonly safeArtifactName?: string | null\n\n readonly publishConfig?: PublishConfiguration | null\n\n readonly isWriteUpdateInfo?: boolean\n}\n\nexport interface ArtifactBuildStarted {\n readonly targetPresentableName: string\n\n readonly file: string\n // null for NSIS\n readonly arch: Arch | null\n}\n"]}
|