app-builder-lib 26.15.3 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -105
- 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 -524
- package/out/util/electronGet.js.map +0 -1
- package/out/util/envPath.d.ts +0 -2
- package/out/util/envPath.js +0 -28
- package/out/util/envPath.js.map +0 -1
- package/out/util/filter.d.ts +0 -1
- package/out/util/filter.js +0 -68
- package/out/util/filter.js.map +0 -1
- package/out/util/flags.d.ts +0 -3
- package/out/util/flags.js +0 -16
- package/out/util/flags.js.map +0 -1
- package/out/util/hash.d.ts +0 -1
- package/out/util/hash.js +0 -19
- package/out/util/hash.js.map +0 -1
- package/out/util/iconConverter.d.ts +0 -25
- package/out/util/iconConverter.js +0 -260
- package/out/util/iconConverter.js.map +0 -1
- package/out/util/langs.d.ts +0 -189
- package/out/util/langs.js +0 -436
- package/out/util/langs.js.map +0 -1
- package/out/util/license.d.ts +0 -16
- package/out/util/license.js +0 -47
- package/out/util/license.js.map +0 -1
- package/out/util/macosIconComposer.d.ts +0 -10
- package/out/util/macosIconComposer.js +0 -102
- package/out/util/macosIconComposer.js.map +0 -1
- package/out/util/macosVersion.d.ts +0 -3
- package/out/util/macosVersion.js +0 -36
- package/out/util/macosVersion.js.map +0 -1
- package/out/util/macroExpander.d.ts +0 -3
- package/out/util/macroExpander.js +0 -64
- package/out/util/macroExpander.js.map +0 -1
- package/out/util/normalizePackageData.d.ts +0 -1
- package/out/util/normalizePackageData.js +0 -328
- package/out/util/normalizePackageData.js.map +0 -1
- package/out/util/packageDependencies.d.ts +0 -6
- package/out/util/packageDependencies.js +0 -3
- package/out/util/packageDependencies.js.map +0 -1
- package/out/util/packageMetadata.d.ts +0 -1
- package/out/util/packageMetadata.js +0 -124
- package/out/util/packageMetadata.js.map +0 -1
- package/out/util/pathManager.d.ts +0 -3
- package/out/util/pathManager.js +0 -23
- package/out/util/pathManager.js.map +0 -1
- package/out/util/plist.d.ts +0 -7
- package/out/util/plist.js +0 -31
- package/out/util/plist.js.map +0 -1
- package/out/util/rebuild.d.ts +0 -2
- package/out/util/rebuild.js +0 -60
- package/out/util/rebuild.js.map +0 -1
- package/out/util/repositoryInfo.d.ts +0 -3
- package/out/util/repositoryInfo.js +0 -79
- package/out/util/repositoryInfo.js.map +0 -1
- package/out/util/resEdit.d.ts +0 -10
- package/out/util/resEdit.js +0 -49
- package/out/util/resEdit.js.map +0 -1
- package/out/util/resolve.d.ts +0 -2
- package/out/util/resolve.js +0 -59
- package/out/util/resolve.js.map +0 -1
- package/out/util/timer.d.ts +0 -11
- package/out/util/timer.js +0 -28
- package/out/util/timer.js.map +0 -1
- package/out/util/toolsetLock.d.ts +0 -1
- package/out/util/toolsetLock.js +0 -23
- package/out/util/toolsetLock.js.map +0 -1
- package/out/util/yarn.d.ts +0 -22
- package/out/util/yarn.js +0 -160
- package/out/util/yarn.js.map +0 -1
- package/out/version.d.ts +0 -1
- package/out/version.js +0 -5
- package/out/version.js.map +0 -1
- package/out/vm/MonoVm.d.ts +0 -8
- package/out/vm/MonoVm.js +0 -20
- package/out/vm/MonoVm.js.map +0 -1
- package/out/vm/ParallelsVm.d.ts +0 -23
- package/out/vm/ParallelsVm.js +0 -102
- package/out/vm/ParallelsVm.js.map +0 -1
- package/out/vm/PwshVm.d.ts +0 -6
- package/out/vm/PwshVm.js +0 -25
- package/out/vm/PwshVm.js.map +0 -1
- package/out/vm/WineVm.d.ts +0 -12
- package/out/vm/WineVm.js +0 -38
- package/out/vm/WineVm.js.map +0 -1
- package/out/vm/vm.d.ts +0 -14
- package/out/vm/vm.js +0 -88
- package/out/vm/vm.js.map +0 -1
- package/out/winPackager.d.ts +0 -29
- package/out/winPackager.js +0 -271
- package/out/winPackager.js.map +0 -1
- /package/{out → dist}/node-module-collector/types.js.map +0 -0
- /package/{out → dist}/options/FileAssociation.js.map +0 -0
- /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { httpExecutor, InvalidConfigurationError, log } from "builder-util";
|
|
2
|
+
import { parseXml } from "builder-util-runtime";
|
|
3
|
+
import fsExtra from "fs-extra";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import * as semver from "semver";
|
|
6
|
+
import { getConfig } from "../util/config/config.js";
|
|
7
|
+
import { orNullIfFileNotExist } from "../util/config/load.js";
|
|
8
|
+
import { getProjectRootPath } from "./search-module.js";
|
|
9
|
+
const electronPackages = ["electron", "electron-prebuilt", "electron-prebuilt-compile", "electron-nightly"];
|
|
10
|
+
export async function getElectronVersion(projectDir, config) {
|
|
11
|
+
if (config == null) {
|
|
12
|
+
config = await getConfig(projectDir, null, null);
|
|
13
|
+
}
|
|
14
|
+
if (config.electronVersion != null) {
|
|
15
|
+
return config.electronVersion;
|
|
16
|
+
}
|
|
17
|
+
return computeElectronVersion(projectDir);
|
|
18
|
+
}
|
|
19
|
+
export async function getElectronVersionFromInstalled(projectDir) {
|
|
20
|
+
for (const name of electronPackages) {
|
|
21
|
+
try {
|
|
22
|
+
return (await fsExtra.readJson(path.join(projectDir, "node_modules", name, "package.json"))).version;
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
if (e.code !== "ENOENT") {
|
|
26
|
+
log.warn({ name, error: e }, `cannot read electron version package.json`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
export async function getElectronPackage(projectDir) {
|
|
33
|
+
for (const name of electronPackages) {
|
|
34
|
+
try {
|
|
35
|
+
return await fsExtra.readJson(path.join(projectDir, "node_modules", name, "package.json"));
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
if (e.code !== "ENOENT") {
|
|
39
|
+
log.warn({ name, error: e }, `cannot find electron in package.json`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
export async function computeElectronVersion(projectDir) {
|
|
47
|
+
const result = await getElectronVersionFromInstalled(projectDir);
|
|
48
|
+
if (result != null) {
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
const potentialRootDirs = [projectDir, await getProjectRootPath(projectDir)];
|
|
52
|
+
let dependency = null;
|
|
53
|
+
for (const dir of potentialRootDirs) {
|
|
54
|
+
const metadata = await orNullIfFileNotExist(fsExtra.readJson(path.join(dir, "package.json")));
|
|
55
|
+
dependency = metadata ? findFromPackageMetadata(metadata) : null;
|
|
56
|
+
if (dependency) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (dependency?.name === "electron-nightly") {
|
|
61
|
+
log.info("You are using a nightly version of electron, be warned that those builds are highly unstable.");
|
|
62
|
+
const feedXml = await httpExecutor.request({
|
|
63
|
+
hostname: "github.com",
|
|
64
|
+
path: `/electron/nightlies/releases.atom`,
|
|
65
|
+
headers: {
|
|
66
|
+
accept: "application/xml, application/atom+xml, text/xml, */*",
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const feed = parseXml(feedXml);
|
|
70
|
+
const latestRelease = feed.element("entry", false, `No published versions on GitHub`);
|
|
71
|
+
const v = /\/tag\/v?([^/]+)$/.exec(latestRelease.element("link").attribute("href"))[1];
|
|
72
|
+
return v.startsWith("v") ? v.substring(1) : v;
|
|
73
|
+
}
|
|
74
|
+
else if (dependency?.version === "latest") {
|
|
75
|
+
log.warn('Electron version is set to "latest", but it is recommended to set it to some more restricted version range.');
|
|
76
|
+
try {
|
|
77
|
+
const releaseInfo = JSON.parse((await httpExecutor.request({
|
|
78
|
+
hostname: "github.com",
|
|
79
|
+
path: `/electron/${dependency.name === "electron-nightly" ? "nightlies" : "electron"}/releases/latest`,
|
|
80
|
+
headers: {
|
|
81
|
+
accept: "application/json",
|
|
82
|
+
},
|
|
83
|
+
})));
|
|
84
|
+
const version = releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name;
|
|
85
|
+
log.info({ version }, `resolve ${dependency.name}@${dependency.version}`);
|
|
86
|
+
return version;
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
log.warn(e);
|
|
90
|
+
}
|
|
91
|
+
throw new InvalidConfigurationError(`Cannot find electron dependency to get electron version in the '${path.join(projectDir, "package.json")}'`);
|
|
92
|
+
}
|
|
93
|
+
const version = dependency?.version;
|
|
94
|
+
if (version == null) {
|
|
95
|
+
throw new InvalidConfigurationError(`Cannot compute electron version from installed node modules - none of the possible electron modules are installed.\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`);
|
|
96
|
+
}
|
|
97
|
+
const pinnedVersion = semver.valid(version);
|
|
98
|
+
if (pinnedVersion === null) {
|
|
99
|
+
log.error({ version }, `Electron version "${version}" is a range, not a fixed version. electron-builder requires an exact version because it downloads platform-specific binaries for a specific release — a range cannot be resolved without electron installed in node_modules. ` +
|
|
100
|
+
`Pin the version in package.json (e.g. "15.3.0" instead of "^15.3.0") or set "electronVersion" explicitly in your electron-builder config.`);
|
|
101
|
+
throw new InvalidConfigurationError(`Cannot compute electron version from installed node modules - version ("${version}") is not fixed in project.\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`);
|
|
102
|
+
}
|
|
103
|
+
return pinnedVersion;
|
|
104
|
+
}
|
|
105
|
+
function findFromPackageMetadata(packageData) {
|
|
106
|
+
for (const name of electronPackages) {
|
|
107
|
+
const devDependencies = packageData.devDependencies;
|
|
108
|
+
let dep = devDependencies == null ? null : devDependencies[name];
|
|
109
|
+
if (dep == null) {
|
|
110
|
+
const dependencies = packageData.dependencies;
|
|
111
|
+
dep = dependencies == null ? null : dependencies[name];
|
|
112
|
+
}
|
|
113
|
+
if (dep != null) {
|
|
114
|
+
return { name, version: dep };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=electronVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electronVersion.js","sourceRoot":"","sources":["../../src/electron/electronVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,OAAO,MAAM,UAAU,CAAA;AAE9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAIvD,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,kBAAkB,CAAC,CAAA;AAE3G,MAAM,CAAC,KAAK,UAAU,k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AAI,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;IAClJ,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,EAAE,OAAO,CAAA;IACnC,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,yBAAyB,CACjC,kNAAkN,CACnN,CAAA;IACH,CAAC;IAED,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;QAC3B,GAAG,CAAC,KAAK,CACP,EAAE,OAAO,EAAE,EACX,qBAAqB,OAAO,gOAAgO;YAC1P,2IAA2I,CAC9I,CAAA;QACD,MAAM,IAAI,yBAAyB,CACjC,2EAA2E,OAAO,2HAA2H,CAC9M,CAAA;IACH,CAAC;IAED,OAAO,aAAa,CAAA;AACtB,CAAC;AAOD,SAAS,uBAAuB,CAAC,WAAgB;IAC/C,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;QACpC,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAA;QACnD,IAAI,GAAG,GAAG,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QAChE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAA;YAC7C,GAAG,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QACxD,CAAC;QACD,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { httpExecutor, InvalidConfigurationError, log } from \"builder-util\"\nimport { parseXml } from \"builder-util-runtime\"\nimport fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { Configuration } from \"../configuration.js\"\nimport { getConfig } from \"../util/config/config.js\"\nimport { orNullIfFileNotExist } from \"../util/config/load.js\"\nimport { getProjectRootPath } from \"./search-module.js\"\n\nexport type MetadataValue = Lazy<Record<string, any> | null>\n\nconst electronPackages = [\"electron\", \"electron-prebuilt\", \"electron-prebuilt-compile\", \"electron-nightly\"]\n\nexport async function getElectronVersion(projectDir: string, config?: Configuration): Promise<string> {\n if (config == null) {\n config = await getConfig(projectDir, null, null)\n }\n if (config.electronVersion != null) {\n return config.electronVersion\n }\n return computeElectronVersion(projectDir)\n}\n\nexport async function getElectronVersionFromInstalled(projectDir: string): Promise<string | null> {\n for (const name of electronPackages) {\n try {\n return (await fsExtra.readJson(path.join(projectDir, \"node_modules\", name, \"package.json\"))).version\n } catch (e: any) {\n if (e.code !== \"ENOENT\") {\n log.warn({ name, error: e }, `cannot read electron version package.json`)\n }\n }\n }\n return null\n}\n\nexport async function getElectronPackage(projectDir: string) {\n for (const name of electronPackages) {\n try {\n return await fsExtra.readJson(path.join(projectDir, \"node_modules\", name, \"package.json\"))\n } catch (e: any) {\n if (e.code !== \"ENOENT\") {\n log.warn({ name, error: e }, `cannot find electron in package.json`)\n }\n }\n }\n return null\n}\n\n/** @internal */\nexport async function computeElectronVersion(projectDir: string): Promise<string> {\n const result = await getElectronVersionFromInstalled(projectDir)\n if (result != null) {\n return result\n }\n\n const potentialRootDirs = [projectDir, await getProjectRootPath(projectDir)]\n let dependency: NameAndVersion | null = null\n for (const dir of potentialRootDirs) {\n const metadata = await orNullIfFileNotExist(fsExtra.readJson(path.join(dir, \"package.json\")))\n dependency = metadata ? findFromPackageMetadata(metadata) : null\n if (dependency) {\n break\n }\n }\n if (dependency?.name === \"electron-nightly\") {\n log.info(\"You are using a nightly version of electron, be warned that those builds are highly unstable.\")\n const feedXml = await httpExecutor.request({\n hostname: \"github.com\",\n path: `/electron/nightlies/releases.atom`,\n headers: {\n accept: \"application/xml, application/atom+xml, text/xml, */*\",\n },\n })\n const feed = parseXml(feedXml!)\n const latestRelease = feed.element(\"entry\", false, `No published versions on GitHub`)\n const v = /\\/tag\\/v?([^/]+)$/.exec(latestRelease.element(\"link\").attribute(\"href\"))![1]\n return v.startsWith(\"v\") ? v.substring(1) : v\n } else if (dependency?.version === \"latest\") {\n log.warn('Electron version is set to \"latest\", but it is recommended to set it to some more restricted version range.')\n try {\n const releaseInfo = JSON.parse(\n (await httpExecutor.request({\n hostname: \"github.com\",\n path: `/electron/${dependency.name === \"electron-nightly\" ? \"nightlies\" : \"electron\"}/releases/latest`,\n headers: {\n accept: \"application/json\",\n },\n }))!\n )\n const version = releaseInfo.tag_name.startsWith(\"v\") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name\n log.info({ version }, `resolve ${dependency.name}@${dependency.version}`)\n return version\n } catch (e: any) {\n log.warn(e)\n }\n\n throw new InvalidConfigurationError(`Cannot find electron dependency to get electron version in the '${path.join(projectDir, \"package.json\")}'`)\n }\n const version = dependency?.version\n if (version == null) {\n throw new InvalidConfigurationError(\n `Cannot compute electron version from installed node modules - none of the possible electron modules are installed.\\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`\n )\n }\n\n const pinnedVersion = semver.valid(version)\n if (pinnedVersion === null) {\n log.error(\n { version },\n `Electron version \"${version}\" is a range, not a fixed version. electron-builder requires an exact version because it downloads platform-specific binaries for a specific release — a range cannot be resolved without electron installed in node_modules. ` +\n `Pin the version in package.json (e.g. \"15.3.0\" instead of \"^15.3.0\") or set \"electronVersion\" explicitly in your electron-builder config.`\n )\n throw new InvalidConfigurationError(\n `Cannot compute electron version from installed node modules - version (\"${version}\") is not fixed in project.\\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`\n )\n }\n\n return pinnedVersion\n}\n\ninterface NameAndVersion {\n readonly name: string\n readonly version: string\n}\n\nfunction findFromPackageMetadata(packageData: any): NameAndVersion | null {\n for (const name of electronPackages) {\n const devDependencies = packageData.devDependencies\n let dep = devDependencies == null ? null : devDependencies[name]\n if (dep == null) {\n const dependencies = packageData.dependencies\n dep = dependencies == null ? null : dependencies[name]\n }\n if (dep != null) {\n return { name, version: dep }\n }\n }\n return null\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PrepareApplicationStageDirectoryOptions } from "../Framework.js";
|
|
2
|
+
import { ElectronBrandingOptions } from "./ElectronFramework.js";
|
|
3
|
+
export declare class FFMPEGInjector {
|
|
4
|
+
private readonly options;
|
|
5
|
+
private readonly electronVersion;
|
|
6
|
+
private readonly branding;
|
|
7
|
+
constructor(options: PrepareApplicationStageDirectoryOptions, electronVersion: string, branding: Required<ElectronBrandingOptions>);
|
|
8
|
+
inject(): Promise<string>;
|
|
9
|
+
private downloadFFMPEG;
|
|
10
|
+
private copyFFMPEG;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=injectFFMPEG.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectFFMPEG.d.ts","sourceRoot":"","sources":["../../src/electron/injectFFMPEG.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAFR,OAAO,EAAE,uCAAuC,EAChD,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,QAAQ,CAAC,uBAAuB,CAAC;IAGxD,MAAM;YAmBE,cAAc;YAsBd,UAAU;CAuBzB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { log } from "builder-util";
|
|
2
|
+
import fs from "fs-extra";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import { Platform } from "../core.js";
|
|
5
|
+
import { downloadElectronArtifact } from "../util/electronGet.js";
|
|
6
|
+
export class FFMPEGInjector {
|
|
7
|
+
constructor(options, electronVersion, branding) {
|
|
8
|
+
this.options = options;
|
|
9
|
+
this.electronVersion = electronVersion;
|
|
10
|
+
this.branding = branding;
|
|
11
|
+
}
|
|
12
|
+
async inject() {
|
|
13
|
+
const libPath = this.options.platformName === Platform.MAC.nodeName
|
|
14
|
+
? path.join(this.options.appOutDir, `${this.branding.productName}.app`, "Contents", "Frameworks", `${this.branding.productName} Framework.framework`, "Versions", "A", "Libraries")
|
|
15
|
+
: this.options.appOutDir;
|
|
16
|
+
const ffmpegDir = await this.downloadFFMPEG();
|
|
17
|
+
return this.copyFFMPEG(libPath, ffmpegDir);
|
|
18
|
+
}
|
|
19
|
+
async downloadFFMPEG() {
|
|
20
|
+
const ffmpegFileName = `ffmpeg-v${this.electronVersion}-${this.options.platformName}-${this.options.arch}`;
|
|
21
|
+
log.info({ ffmpegFileName }, "downloading");
|
|
22
|
+
const { packager: { config: { electronDownload }, }, platformName, arch, } = this.options;
|
|
23
|
+
return downloadElectronArtifact({
|
|
24
|
+
electronDownload,
|
|
25
|
+
artifactName: "ffmpeg",
|
|
26
|
+
platformName,
|
|
27
|
+
arch,
|
|
28
|
+
version: this.electronVersion,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async copyFFMPEG(targetPath, sourcePath) {
|
|
32
|
+
let fileName = "ffmpeg.dll";
|
|
33
|
+
if (["darwin", "mas"].includes(this.options.platformName)) {
|
|
34
|
+
fileName = "libffmpeg.dylib";
|
|
35
|
+
}
|
|
36
|
+
else if (this.options.platformName === "linux") {
|
|
37
|
+
fileName = "libffmpeg.so";
|
|
38
|
+
}
|
|
39
|
+
const libPath = path.resolve(sourcePath, fileName);
|
|
40
|
+
const libTargetPath = path.resolve(targetPath, fileName);
|
|
41
|
+
log.info({ lib: log.filePath(libPath), target: libTargetPath }, "copying non-proprietary FFMPEG");
|
|
42
|
+
// If the source doesn't exist we have a problem
|
|
43
|
+
if (!fs.existsSync(libPath)) {
|
|
44
|
+
throw new Error(`Failed to find FFMPEG library file at path: ${libPath}`);
|
|
45
|
+
}
|
|
46
|
+
// If we are copying to the source we can stop immediately
|
|
47
|
+
if (libPath !== libTargetPath) {
|
|
48
|
+
await fs.copyFile(libPath, libTargetPath);
|
|
49
|
+
}
|
|
50
|
+
return libTargetPath;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=injectFFMPEG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectFFMPEG.js","sourceRoot":"","sources":["../../src/electron/injectFFMPEG.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGjE,MAAM,OAAO,cAAc;IACzB,YACmB,OAAgD,EAChD,eAAuB,EACvB,QAA2C;QAF3C,YAAO,GAAP,OAAO,CAAyC;QAChD,oBAAe,GAAf,eAAe,CAAQ;QACvB,aAAQ,GAAR,QAAQ,CAAmC;IAC3D,CAAC;IAEJ,KAAK,CAAC,MAAM;QACV,MAAM,OAAO,GACX,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,QAAQ,CAAC,GAAG,CAAC,QAAQ;YACjD,CAAC,CAAC,IAAI,CAAC,IAAI,CACP,IAAI,CAAC,OAAO,CAAC,SAAS,EACtB,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,MAAM,EAClC,UAAU,EACV,YAAY,EACZ,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,sBAAsB,EAClD,UAAU,EACV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AAU,EAAE,QAAQ,CAAC,CAAA;QACxD,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,gCAAgC,CAAC,CAAA;QAEjG,gDAAgD;QAChD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,+CAA+C,OAAO,EAAE,CAAC,CAAA;QAC3E,CAAC;QAED,0DAA0D;QAC1D,IAAI,OAAO,KAAK,aAAa,EAAE,CAAC;YAC9B,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;QAC3C,CAAC;QACD,OAAO,aAAa,CAAA;IACtB,CAAC;CACF","sourcesContent":["import { log } from \"builder-util\"\nimport fs from \"fs-extra\"\nimport * as path from \"path\"\nimport { Platform } from \"../core.js\"\nimport { PrepareApplicationStageDirectoryOptions } from \"../Framework.js\"\nimport { downloadElectronArtifact } from \"../util/electronGet.js\"\nimport { ElectronBrandingOptions } from \"./ElectronFramework.js\"\n\nexport class FFMPEGInjector {\n constructor(\n private readonly options: PrepareApplicationStageDirectoryOptions,\n private readonly electronVersion: string,\n private readonly branding: Required<ElectronBrandingOptions>\n ) {}\n\n async inject() {\n const libPath =\n this.options.platformName === Platform.MAC.nodeName\n ? path.join(\n this.options.appOutDir,\n `${this.branding.productName}.app`,\n \"Contents\",\n \"Frameworks\",\n `${this.branding.productName} Framework.framework`,\n \"Versions\",\n \"A\",\n \"Libraries\"\n )\n : this.options.appOutDir\n\n const ffmpegDir = await this.downloadFFMPEG()\n return this.copyFFMPEG(libPath, ffmpegDir)\n }\n\n private async downloadFFMPEG(): Promise<string> {\n const ffmpegFileName = `ffmpeg-v${this.electronVersion}-${this.options.platformName}-${this.options.arch}`\n\n log.info({ ffmpegFileName }, \"downloading\")\n\n const {\n packager: {\n config: { electronDownload },\n },\n platformName,\n arch,\n } = this.options\n\n return downloadElectronArtifact({\n electronDownload,\n artifactName: \"ffmpeg\",\n platformName,\n arch,\n version: this.electronVersion,\n })\n }\n\n private async copyFFMPEG(targetPath: string, sourcePath: string) {\n let fileName = \"ffmpeg.dll\"\n if ([\"darwin\", \"mas\"].includes(this.options.platformName)) {\n fileName = \"libffmpeg.dylib\"\n } else if (this.options.platformName === \"linux\") {\n fileName = \"libffmpeg.so\"\n }\n\n const libPath = path.resolve(sourcePath, fileName)\n const libTargetPath = path.resolve(targetPath, fileName)\n log.info({ lib: log.filePath(libPath), target: libTargetPath }, \"copying non-proprietary FFMPEG\")\n\n // If the source doesn't exist we have a problem\n if (!fs.existsSync(libPath)) {\n throw new Error(`Failed to find FFMPEG library file at path: ${libPath}`)\n }\n\n // If we are copying to the source we can stop immediately\n if (libPath !== libTargetPath) {\n await fs.copyFile(libPath, libTargetPath)\n }\n return libTargetPath\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electronMac.d.ts","sourceRoot":"","sources":["../../../src/electron/mac/electronMac.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { asArray, copyOrLinkFile, getPlatformIconFileName, InvalidConfigurationError, unlinkIfExists } from "builder-util";
|
|
2
|
+
import { rename, utimes } from "fs/promises";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import * as fs from "fs";
|
|
5
|
+
import { filterCFBundleIdentifier } from "../../appInfo.js";
|
|
6
|
+
import { normalizeExt } from "../../platformPackager.js";
|
|
7
|
+
import { savePlistFile, parsePlistFile } from "../../util/mac/plist.js";
|
|
8
|
+
import { createBrandingOpts } from "../ElectronFramework.js";
|
|
9
|
+
function doRename(basePath, oldName, newName) {
|
|
10
|
+
return rename(path.join(basePath, oldName), path.join(basePath, newName));
|
|
11
|
+
}
|
|
12
|
+
function moveHelpers(helperSuffixes, frameworksPath, appName, prefix) {
|
|
13
|
+
return Promise.all(helperSuffixes.map(suffix => {
|
|
14
|
+
const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
|
15
|
+
return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`));
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist) {
|
|
19
|
+
const result = [" Helper"];
|
|
20
|
+
if (helperEHPlist != null) {
|
|
21
|
+
result.push(" Helper EH");
|
|
22
|
+
}
|
|
23
|
+
if (helperNPPlist != null) {
|
|
24
|
+
result.push(" Helper NP");
|
|
25
|
+
}
|
|
26
|
+
if (helperRendererPlist != null) {
|
|
27
|
+
result.push(" Helper (Renderer)");
|
|
28
|
+
}
|
|
29
|
+
if (helperPluginPlist != null) {
|
|
30
|
+
result.push(" Helper (Plugin)");
|
|
31
|
+
}
|
|
32
|
+
if (helperGPUPlist != null) {
|
|
33
|
+
result.push(" Helper (GPU)");
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
export async function createMacApp(packager, appOutDir, asarIntegrity, isMas) {
|
|
39
|
+
const appInfo = packager.appInfo;
|
|
40
|
+
// Electon uses the application name (CFBundleName) to resolve helper apps
|
|
41
|
+
// https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm
|
|
42
|
+
// https://github.com/electron-userland/electron-builder/issues/6962
|
|
43
|
+
const appFilename = appInfo.sanitizedProductName;
|
|
44
|
+
const electronBranding = createBrandingOpts(packager.config);
|
|
45
|
+
const contentsPath = path.join(appOutDir, packager.framework.distMacOsAppName, "Contents");
|
|
46
|
+
const frameworksPath = path.join(contentsPath, "Frameworks");
|
|
47
|
+
const loginItemPath = path.join(contentsPath, "Library", "LoginItems");
|
|
48
|
+
const appPlistFilename = path.join(contentsPath, "Info.plist");
|
|
49
|
+
const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, "Contents", "Info.plist");
|
|
50
|
+
const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, "Contents", "Info.plist");
|
|
51
|
+
const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, "Contents", "Info.plist");
|
|
52
|
+
const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, "Contents", "Info.plist");
|
|
53
|
+
const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, "Contents", "Info.plist");
|
|
54
|
+
const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, "Contents", "Info.plist");
|
|
55
|
+
const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, "Contents", "Info.plist");
|
|
56
|
+
const safeParsePlistFile = async (filePath) => {
|
|
57
|
+
if (!fs.existsSync(filePath)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return await parsePlistFile(filePath);
|
|
61
|
+
};
|
|
62
|
+
const appPlist = (await safeParsePlistFile(appPlistFilename));
|
|
63
|
+
if (appPlist == null) {
|
|
64
|
+
throw new Error("corrupted Electron dist");
|
|
65
|
+
}
|
|
66
|
+
// Replace the multiple parsePlistFile calls with:
|
|
67
|
+
const helperPlist = await safeParsePlistFile(helperPlistFilename);
|
|
68
|
+
const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename);
|
|
69
|
+
const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename);
|
|
70
|
+
const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename);
|
|
71
|
+
const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename);
|
|
72
|
+
const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename);
|
|
73
|
+
const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename);
|
|
74
|
+
const buildMetadata = packager.config;
|
|
75
|
+
/**
|
|
76
|
+
* Configure bundleIdentifier for the generic Electron Helper process
|
|
77
|
+
*
|
|
78
|
+
* This was the only Helper in Electron 5 and before. Allow users to configure
|
|
79
|
+
* the bundleIdentifier for continuity.
|
|
80
|
+
*/
|
|
81
|
+
const defaultAppId = packager.platformOptions.appId;
|
|
82
|
+
const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier);
|
|
83
|
+
const defaultHelperId = packager.platformOptions.helperBundleId;
|
|
84
|
+
const helperBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.helperBundleId : defaultHelperId) || defaultHelperId || `${cfBundleIdentifier}.helper`);
|
|
85
|
+
appPlist.CFBundleIdentifier = cfBundleIdentifier;
|
|
86
|
+
await packager.applyCommonInfo(appPlist, contentsPath);
|
|
87
|
+
// required for electron-updater proxy
|
|
88
|
+
if (!isMas) {
|
|
89
|
+
configureLocalhostAts(appPlist);
|
|
90
|
+
}
|
|
91
|
+
if (helperPlist != null) {
|
|
92
|
+
helperPlist.CFBundleExecutable = `${appFilename} Helper`;
|
|
93
|
+
helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`;
|
|
94
|
+
helperPlist.CFBundleIdentifier = helperBundleIdentifier;
|
|
95
|
+
helperPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Configure bundleIdentifier for Electron 5+ Helper processes
|
|
99
|
+
*
|
|
100
|
+
* In Electron 6, parts of the generic Electron Helper process were split into
|
|
101
|
+
* individual helper processes. Allow users to configure the bundleIdentifiers
|
|
102
|
+
* for continuity, specifically because macOS keychain access relies on
|
|
103
|
+
* bundleIdentifiers not changing (i.e. across versions of Electron).
|
|
104
|
+
*/
|
|
105
|
+
function configureHelper(helper, postfix, userProvidedBundleIdentifier) {
|
|
106
|
+
helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`;
|
|
107
|
+
helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`;
|
|
108
|
+
helper.CFBundleIdentifier = userProvidedBundleIdentifier
|
|
109
|
+
? filterCFBundleIdentifier(userProvidedBundleIdentifier)
|
|
110
|
+
: filterCFBundleIdentifier(`${helperBundleIdentifier}.${postfix}`);
|
|
111
|
+
helper.CFBundleVersion = appPlist.CFBundleVersion;
|
|
112
|
+
}
|
|
113
|
+
if (helperRendererPlist != null) {
|
|
114
|
+
configureHelper(helperRendererPlist, "(Renderer)", packager.platformOptions.helperRendererBundleId);
|
|
115
|
+
}
|
|
116
|
+
if (helperPluginPlist != null) {
|
|
117
|
+
configureHelper(helperPluginPlist, "(Plugin)", packager.platformOptions.helperPluginBundleId);
|
|
118
|
+
}
|
|
119
|
+
if (helperGPUPlist != null) {
|
|
120
|
+
configureHelper(helperGPUPlist, "(GPU)", packager.platformOptions.helperGPUBundleId);
|
|
121
|
+
}
|
|
122
|
+
if (helperEHPlist != null) {
|
|
123
|
+
configureHelper(helperEHPlist, "EH", packager.platformOptions.helperEHBundleId);
|
|
124
|
+
}
|
|
125
|
+
if (helperNPPlist != null) {
|
|
126
|
+
configureHelper(helperNPPlist, "NP", packager.platformOptions.helperNPBundleId);
|
|
127
|
+
}
|
|
128
|
+
if (helperLoginPlist != null) {
|
|
129
|
+
helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`;
|
|
130
|
+
helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`;
|
|
131
|
+
// noinspection SpellCheckingInspection
|
|
132
|
+
helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`;
|
|
133
|
+
helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
|
134
|
+
}
|
|
135
|
+
const protocols = asArray(buildMetadata.protocols).concat(asArray(packager.platformOptions.protocols));
|
|
136
|
+
if (protocols.length > 0) {
|
|
137
|
+
appPlist.CFBundleURLTypes = protocols.map(protocol => {
|
|
138
|
+
const schemes = asArray(protocol.schemes);
|
|
139
|
+
if (schemes.length === 0) {
|
|
140
|
+
throw new InvalidConfigurationError(`Protocol "${protocol.name}": must be at least one scheme specified`);
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
CFBundleURLName: protocol.name,
|
|
144
|
+
CFBundleTypeRole: protocol.role || "Editor",
|
|
145
|
+
CFBundleURLSchemes: schemes.slice(),
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const fileAssociations = packager.fileAssociations;
|
|
150
|
+
if (fileAssociations.length > 0) {
|
|
151
|
+
const documentTypes = await Promise.all(fileAssociations.map(async (fileAssociation) => {
|
|
152
|
+
const extensions = asArray(fileAssociation.ext).map(normalizeExt);
|
|
153
|
+
const customIcon = await packager.getResource(getPlatformIconFileName(fileAssociation.icon, true), `${extensions[0]}.icns`);
|
|
154
|
+
let iconFile = appPlist.CFBundleIconFile;
|
|
155
|
+
if (customIcon != null) {
|
|
156
|
+
iconFile = path.basename(customIcon);
|
|
157
|
+
await copyOrLinkFile(customIcon, path.join(path.join(contentsPath, "Resources"), iconFile));
|
|
158
|
+
}
|
|
159
|
+
const result = {
|
|
160
|
+
CFBundleTypeExtensions: extensions,
|
|
161
|
+
CFBundleTypeName: fileAssociation.name || extensions[0],
|
|
162
|
+
CFBundleTypeRole: fileAssociation.role || "Editor",
|
|
163
|
+
LSHandlerRank: fileAssociation.rank || "Default",
|
|
164
|
+
CFBundleTypeIconFile: iconFile,
|
|
165
|
+
};
|
|
166
|
+
if (fileAssociation.isPackage) {
|
|
167
|
+
result.LSTypeIsPackage = true;
|
|
168
|
+
}
|
|
169
|
+
return result;
|
|
170
|
+
}));
|
|
171
|
+
// `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case
|
|
172
|
+
appPlist.CFBundleDocumentTypes = [...(appPlist.CFBundleDocumentTypes || []), ...documentTypes];
|
|
173
|
+
}
|
|
174
|
+
const toPlistObject = (asarIntegrity) => {
|
|
175
|
+
const result = {};
|
|
176
|
+
for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {
|
|
177
|
+
result[filePath] = {
|
|
178
|
+
algorithm: headerHash.algorithm,
|
|
179
|
+
hash: headerHash.hash,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
return result;
|
|
183
|
+
};
|
|
184
|
+
if (asarIntegrity != null) {
|
|
185
|
+
appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity);
|
|
186
|
+
}
|
|
187
|
+
if (helperEHPlist != null) {
|
|
188
|
+
await savePlistFile(helperEHPlistFilename, helperEHPlist);
|
|
189
|
+
}
|
|
190
|
+
if (helperNPPlist != null) {
|
|
191
|
+
await savePlistFile(helperNPPlistFilename, helperNPPlist);
|
|
192
|
+
}
|
|
193
|
+
if (helperRendererPlist != null) {
|
|
194
|
+
await savePlistFile(helperRendererPlistFilename, helperRendererPlist);
|
|
195
|
+
}
|
|
196
|
+
if (helperPluginPlist != null) {
|
|
197
|
+
await savePlistFile(helperPluginPlistFilename, helperPluginPlist);
|
|
198
|
+
}
|
|
199
|
+
if (helperGPUPlist != null) {
|
|
200
|
+
await savePlistFile(helperGPUPlistFilename, helperGPUPlist);
|
|
201
|
+
}
|
|
202
|
+
if (helperLoginPlist != null) {
|
|
203
|
+
await savePlistFile(helperLoginPlistFilename, helperLoginPlist);
|
|
204
|
+
}
|
|
205
|
+
await savePlistFile(appPlistFilename, appPlist);
|
|
206
|
+
if (helperPlist != null) {
|
|
207
|
+
await savePlistFile(helperPlistFilename, helperPlist);
|
|
208
|
+
}
|
|
209
|
+
await Promise.all([
|
|
210
|
+
doRename(path.join(contentsPath, "MacOS"), electronBranding.productName, appPlist.CFBundleExecutable),
|
|
211
|
+
unlinkIfExists(path.join(appOutDir, "LICENSE")),
|
|
212
|
+
unlinkIfExists(path.join(appOutDir, "LICENSES.chromium.html")),
|
|
213
|
+
]);
|
|
214
|
+
await moveHelpers(getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist), frameworksPath, appFilename, electronBranding.productName);
|
|
215
|
+
if (helperLoginPlist != null) {
|
|
216
|
+
const prefix = electronBranding.productName;
|
|
217
|
+
const suffix = " Login Helper";
|
|
218
|
+
const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
|
219
|
+
await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`));
|
|
220
|
+
}
|
|
221
|
+
const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`);
|
|
222
|
+
await rename(path.dirname(contentsPath), appPath);
|
|
223
|
+
// https://github.com/electron-userland/electron-builder/issues/840
|
|
224
|
+
const now = Date.now() / 1000;
|
|
225
|
+
await utimes(appPath, now, now);
|
|
226
|
+
}
|
|
227
|
+
function configureLocalhostAts(appPlist) {
|
|
228
|
+
// https://bencoding.com/2015/07/20/app-transport-security-and-localhost/
|
|
229
|
+
let ats = appPlist.NSAppTransportSecurity;
|
|
230
|
+
if (ats == null) {
|
|
231
|
+
ats = {};
|
|
232
|
+
appPlist.NSAppTransportSecurity = ats;
|
|
233
|
+
}
|
|
234
|
+
ats.NSAllowsLocalNetworking = true;
|
|
235
|
+
// https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814
|
|
236
|
+
ats.NSAllowsArbitraryLoads = true;
|
|
237
|
+
let exceptionDomains = ats.NSExceptionDomains;
|
|
238
|
+
if (exceptionDomains == null) {
|
|
239
|
+
exceptionDomains = {};
|
|
240
|
+
ats.NSExceptionDomains = exceptionDomains;
|
|
241
|
+
}
|
|
242
|
+
if (exceptionDomains.localhost == null) {
|
|
243
|
+
const allowHttp = {
|
|
244
|
+
NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,
|
|
245
|
+
NSIncludesSubdomains: false,
|
|
246
|
+
NSTemporaryExceptionAllowsInsecureHTTPLoads: true,
|
|
247
|
+
NSTemporaryExceptionMinimumTLSVersion: "1.0",
|
|
248
|
+
NSTemporaryExceptionRequiresForwardSecrecy: false,
|
|
249
|
+
};
|
|
250
|
+
exceptionDomains.localhost = allowHttp;
|
|
251
|
+
exceptionDomains["127.0.0.1"] = allowHttp;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=electronMac.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electronMac.js","sourceRoot":"","sources":["../../../src/electron/mac/electronMac.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC1H,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,EAA2B,MAAM,yBAAyB,CAAA;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,SAAS,QAAQ,CAAC,QAAgB,EAAE,OAAe,EAAE,OAAe;IAClE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED,SAAS,WAAW,CAAC,cAA6B,EAAE,cAAsB,EAAE,OAAe,EAAE,MAAc;IACzG,OAAO,OAAO,CAAC,GAAG,CAChB,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QAC1B,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,c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G,GAAG,CAAA;IACvC,CAAC;IAED,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAA;IAClC,2FAA2F;IAC3F,GAAG,CAAC,sBAAsB,GAAG,IAAI,CAAA;IAEjC,IAAI,gBAAgB,GAAG,GAAG,CAAC,kBAAkB,CAAA;IAC7C,IAAI,gBAAgB,IAAI,IAAI,EAAE,CAAC;QAC7B,gBAAgB,GAAG,EAAE,CAAA;QACrB,GAAG,CAAC,kBAAkB,GAAG,gBAAgB,CAAA;IAC3C,CAAC;IAED,IAAI,gBAAgB,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG;YAChB,4CAA4C,EAAE,KAAK;YACnD,oBAAoB,EAAE,KAAK;YAC3B,2CAA2C,EAAE,IAAI;YACjD,qCAAqC,EAAE,KAAK;YAC5C,0CAA0C,EAAE,KAAK;SAClD,CAAA;QACD,gBAAgB,CAAC,SAAS,GAAG,SAAS,CAAA;QACtC,gBAAgB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAA;IAC3C,CAAC;AACH,CAAC","sourcesContent":["import { asArray, copyOrLinkFile, getPlatformIconFileName, InvalidConfigurationError, unlinkIfExists } from \"builder-util\"\nimport { rename, utimes } from \"fs/promises\"\nimport * as path from \"path\"\nimport * as fs from \"fs\"\nimport { filterCFBundleIdentifier } from \"../../appInfo.js\"\nimport { AsarIntegrity } from \"../../asar/integrity.js\"\nimport { MacPackager } from \"../../macPackager.js\"\nimport { normalizeExt } from \"../../platformPackager.js\"\nimport { savePlistFile, parsePlistFile, PlistObject, PlistValue } from \"../../util/mac/plist.js\"\nimport { createBrandingOpts } from \"../ElectronFramework.js\"\n\nfunction doRename(basePath: string, oldName: string, newName: string) {\n return rename(path.join(basePath, oldName), path.join(basePath, newName))\n}\n\nfunction moveHelpers(helperSuffixes: Array<string>, frameworksPath: string, appName: string, prefix: string): Promise<any> {\n return Promise.all(\n helperSuffixes.map(suffix => {\n const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`))\n })\n )\n}\n\nfunction getAvailableHelperSuffixes(\n helperEHPlist: PlistObject | null,\n helperNPPlist: PlistObject | null,\n helperRendererPlist: PlistObject | null,\n helperPluginPlist: PlistObject | null,\n helperGPUPlist: PlistObject | null\n) {\n const result = [\" Helper\"]\n if (helperEHPlist != null) {\n result.push(\" Helper EH\")\n }\n if (helperNPPlist != null) {\n result.push(\" Helper NP\")\n }\n if (helperRendererPlist != null) {\n result.push(\" Helper (Renderer)\")\n }\n if (helperPluginPlist != null) {\n result.push(\" Helper (Plugin)\")\n }\n if (helperGPUPlist != null) {\n result.push(\" Helper (GPU)\")\n }\n return result\n}\n\n/** @internal */\nexport async function createMacApp(packager: MacPackager, appOutDir: string, asarIntegrity: AsarIntegrity | null, isMas: boolean) {\n const appInfo = packager.appInfo\n // Electon uses the application name (CFBundleName) to resolve helper apps\n // https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm\n // https://github.com/electron-userland/electron-builder/issues/6962\n const appFilename = appInfo.sanitizedProductName\n const electronBranding = createBrandingOpts(packager.config)\n\n const contentsPath = path.join(appOutDir, packager.framework.distMacOsAppName, \"Contents\")\n const frameworksPath = path.join(contentsPath, \"Frameworks\")\n const loginItemPath = path.join(contentsPath, \"Library\", \"LoginItems\")\n\n const appPlistFilename = path.join(contentsPath, \"Info.plist\")\n const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, \"Contents\", \"Info.plist\")\n const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, \"Contents\", \"Info.plist\")\n const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, \"Contents\", \"Info.plist\")\n const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, \"Contents\", \"Info.plist\")\n const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, \"Contents\", \"Info.plist\")\n const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, \"Contents\", \"Info.plist\")\n const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, \"Contents\", \"Info.plist\")\n\n const safeParsePlistFile = async (filePath: string): Promise<PlistObject | null> => {\n if (!fs.existsSync(filePath)) {\n return null\n }\n return await parsePlistFile(filePath)\n }\n\n const appPlist = (await safeParsePlistFile(appPlistFilename))!\n if (appPlist == null) {\n throw new Error(\"corrupted Electron dist\")\n }\n\n // Replace the multiple parsePlistFile calls with:\n const helperPlist = await safeParsePlistFile(helperPlistFilename)\n const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename)\n const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename)\n const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename)\n const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename)\n const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename)\n const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename)\n\n const buildMetadata = packager.config\n\n /**\n * Configure bundleIdentifier for the generic Electron Helper process\n *\n * This was the only Helper in Electron 5 and before. Allow users to configure\n * the bundleIdentifier for continuity.\n */\n\n const defaultAppId = packager.platformOptions.appId\n const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier)\n\n const defaultHelperId = packager.platformOptions.helperBundleId\n const helperBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.helperBundleId : defaultHelperId) || defaultHelperId || `${cfBundleIdentifier}.helper`)\n\n appPlist.CFBundleIdentifier = cfBundleIdentifier\n\n await packager.applyCommonInfo(appPlist, contentsPath)\n\n // required for electron-updater proxy\n if (!isMas) {\n configureLocalhostAts(appPlist)\n }\n\n if (helperPlist != null) {\n helperPlist.CFBundleExecutable = `${appFilename} Helper`\n helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`\n helperPlist.CFBundleIdentifier = helperBundleIdentifier\n helperPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n /**\n * Configure bundleIdentifier for Electron 5+ Helper processes\n *\n * In Electron 6, parts of the generic Electron Helper process were split into\n * individual helper processes. Allow users to configure the bundleIdentifiers\n * for continuity, specifically because macOS keychain access relies on\n * bundleIdentifiers not changing (i.e. across versions of Electron).\n */\n\n function configureHelper(helper: any, postfix: string, userProvidedBundleIdentifier?: string | null) {\n helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`\n helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`\n helper.CFBundleIdentifier = userProvidedBundleIdentifier\n ? filterCFBundleIdentifier(userProvidedBundleIdentifier)\n : filterCFBundleIdentifier(`${helperBundleIdentifier}.${postfix}`)\n helper.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n if (helperRendererPlist != null) {\n configureHelper(helperRendererPlist, \"(Renderer)\", packager.platformOptions.helperRendererBundleId)\n }\n if (helperPluginPlist != null) {\n configureHelper(helperPluginPlist, \"(Plugin)\", packager.platformOptions.helperPluginBundleId)\n }\n if (helperGPUPlist != null) {\n configureHelper(helperGPUPlist, \"(GPU)\", packager.platformOptions.helperGPUBundleId)\n }\n if (helperEHPlist != null) {\n configureHelper(helperEHPlist, \"EH\", packager.platformOptions.helperEHBundleId)\n }\n if (helperNPPlist != null) {\n configureHelper(helperNPPlist, \"NP\", packager.platformOptions.helperNPBundleId)\n }\n if (helperLoginPlist != null) {\n helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`\n helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`\n // noinspection SpellCheckingInspection\n helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`\n helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n const protocols = asArray(buildMetadata.protocols).concat(asArray(packager.platformOptions.protocols))\n if (protocols.length > 0) {\n appPlist.CFBundleURLTypes = protocols.map(protocol => {\n const schemes = asArray(protocol.schemes)\n if (schemes.length === 0) {\n throw new InvalidConfigurationError(`Protocol \"${protocol.name}\": must be at least one scheme specified`)\n }\n return {\n CFBundleURLName: protocol.name,\n CFBundleTypeRole: protocol.role || \"Editor\",\n CFBundleURLSchemes: schemes.slice(),\n }\n })\n }\n\n const fileAssociations = packager.fileAssociations\n if (fileAssociations.length > 0) {\n const documentTypes = await Promise.all(\n fileAssociations.map(async fileAssociation => {\n const extensions = asArray(fileAssociation.ext).map(normalizeExt)\n const customIcon = await packager.getResource(getPlatformIconFileName(fileAssociation.icon, true), `${extensions[0]}.icns`)\n let iconFile = appPlist.CFBundleIconFile\n if (customIcon != null) {\n iconFile = path.basename(customIcon)\n await copyOrLinkFile(customIcon, path.join(path.join(contentsPath, \"Resources\"), iconFile))\n }\n\n const result = {\n CFBundleTypeExtensions: extensions,\n CFBundleTypeName: fileAssociation.name || extensions[0],\n CFBundleTypeRole: fileAssociation.role || \"Editor\",\n LSHandlerRank: fileAssociation.rank || \"Default\",\n CFBundleTypeIconFile: iconFile,\n } as any\n\n if (fileAssociation.isPackage) {\n result.LSTypeIsPackage = true\n }\n return result\n })\n )\n\n // `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case\n appPlist.CFBundleDocumentTypes = [...((appPlist.CFBundleDocumentTypes as PlistValue[]) || []), ...documentTypes]\n }\n\n const toPlistObject = (asarIntegrity: AsarIntegrity): PlistObject => {\n const result: PlistObject = {}\n for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {\n result[filePath] = {\n algorithm: headerHash.algorithm,\n hash: headerHash.hash,\n }\n }\n return result\n }\n\n if (asarIntegrity != null) {\n appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity)\n }\n\n if (helperEHPlist != null) {\n await savePlistFile(helperEHPlistFilename, helperEHPlist)\n }\n\n if (helperNPPlist != null) {\n await savePlistFile(helperNPPlistFilename, helperNPPlist)\n }\n\n if (helperRendererPlist != null) {\n await savePlistFile(helperRendererPlistFilename, helperRendererPlist)\n }\n\n if (helperPluginPlist != null) {\n await savePlistFile(helperPluginPlistFilename, helperPluginPlist)\n }\n\n if (helperGPUPlist != null) {\n await savePlistFile(helperGPUPlistFilename, helperGPUPlist)\n }\n\n if (helperLoginPlist != null) {\n await savePlistFile(helperLoginPlistFilename, helperLoginPlist)\n }\n\n await savePlistFile(appPlistFilename, appPlist)\n if (helperPlist != null) {\n await savePlistFile(helperPlistFilename, helperPlist)\n }\n\n await Promise.all([\n doRename(path.join(contentsPath, \"MacOS\"), electronBranding.productName, appPlist.CFBundleExecutable as string),\n unlinkIfExists(path.join(appOutDir, \"LICENSE\")),\n unlinkIfExists(path.join(appOutDir, \"LICENSES.chromium.html\")),\n ])\n\n await moveHelpers(\n getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist),\n frameworksPath,\n appFilename,\n electronBranding.productName\n )\n\n if (helperLoginPlist != null) {\n const prefix = electronBranding.productName\n const suffix = \" Login Helper\"\n const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`))\n }\n\n const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`)\n await rename(path.dirname(contentsPath), appPath)\n // https://github.com/electron-userland/electron-builder/issues/840\n const now = Date.now() / 1000\n await utimes(appPath, now, now)\n}\n\nfunction configureLocalhostAts(appPlist: any) {\n // https://bencoding.com/2015/07/20/app-transport-security-and-localhost/\n let ats = appPlist.NSAppTransportSecurity\n if (ats == null) {\n ats = {}\n appPlist.NSAppTransportSecurity = ats\n }\n\n ats.NSAllowsLocalNetworking = true\n // https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814\n ats.NSAllowsArbitraryLoads = true\n\n let exceptionDomains = ats.NSExceptionDomains\n if (exceptionDomains == null) {\n exceptionDomains = {}\n ats.NSExceptionDomains = exceptionDomains\n }\n\n if (exceptionDomains.localhost == null) {\n const allowHttp = {\n NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,\n NSIncludesSubdomains: false,\n NSTemporaryExceptionAllowsInsecureHTTPLoads: true,\n NSTemporaryExceptionMinimumTLSVersion: \"1.0\",\n NSTemporaryExceptionRequiresForwardSecrecy: false,\n }\n exceptionDomains.localhost = allowHttp\n exceptionDomains[\"127.0.0.1\"] = allowHttp\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find all instances of a given module in node_modules subdirectories while traversing up
|
|
3
|
+
* ancestor directories.
|
|
4
|
+
*
|
|
5
|
+
* @param cwd the initial directory to traverse
|
|
6
|
+
* @param moduleName the Node module name (should work for scoped modules as well)
|
|
7
|
+
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
8
|
+
*/
|
|
9
|
+
export declare function searchForModule(cwd: string, moduleName: string, rootPath?: string): Promise<string[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Find all instances of node_modules subdirectories while traversing up ancestor directories.
|
|
12
|
+
*
|
|
13
|
+
* @param cwd the initial directory to traverse
|
|
14
|
+
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
15
|
+
*/
|
|
16
|
+
export declare function searchForNodeModules(cwd: string, rootPath?: string): Promise<string[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Determine the root directory of a given project, by looking for a directory with an
|
|
19
|
+
* NPM or yarn lockfile or pnpm lockfile.
|
|
20
|
+
*
|
|
21
|
+
* @param cwd the initial directory to traverse
|
|
22
|
+
*/
|
|
23
|
+
export declare function getProjectRootPath(cwd: string): Promise<string>;
|
|
24
|
+
//# sourceMappingURL=search-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-module.d.ts","sourceRoot":"","sources":["../../src/electron/search-module.ts"],"names":[],"mappings":"AAyCA;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAG3G;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAG5F;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAUrE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import fs from "fs-extra";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
async function shouldContinueSearch(traversedPath, rootPath, stopAtPackageJSON) {
|
|
4
|
+
if (rootPath) {
|
|
5
|
+
return Promise.resolve(traversedPath !== path.dirname(rootPath));
|
|
6
|
+
}
|
|
7
|
+
else if (stopAtPackageJSON) {
|
|
8
|
+
return fs.existsSync(path.join(traversedPath, "package.json"));
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
async function traverseAncestorDirectories(cwd, pathGenerator, rootPath, maxItems, stopAtPackageJSON) {
|
|
15
|
+
const paths = [];
|
|
16
|
+
let traversedPath = path.resolve(cwd);
|
|
17
|
+
while (await shouldContinueSearch(traversedPath, rootPath, stopAtPackageJSON)) {
|
|
18
|
+
const generatedPath = pathGenerator(traversedPath);
|
|
19
|
+
if (fs.existsSync(generatedPath)) {
|
|
20
|
+
paths.push(generatedPath);
|
|
21
|
+
}
|
|
22
|
+
const parentPath = path.dirname(traversedPath);
|
|
23
|
+
if (parentPath === traversedPath || (maxItems && paths.length >= maxItems)) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
traversedPath = parentPath;
|
|
27
|
+
}
|
|
28
|
+
return paths;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Find all instances of a given module in node_modules subdirectories while traversing up
|
|
32
|
+
* ancestor directories.
|
|
33
|
+
*
|
|
34
|
+
* @param cwd the initial directory to traverse
|
|
35
|
+
* @param moduleName the Node module name (should work for scoped modules as well)
|
|
36
|
+
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
37
|
+
*/
|
|
38
|
+
export async function searchForModule(cwd, moduleName, rootPath) {
|
|
39
|
+
const pathGenerator = traversedPath => path.join(traversedPath, "node_modules", moduleName);
|
|
40
|
+
return traverseAncestorDirectories(cwd, pathGenerator, rootPath, undefined, true);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Find all instances of node_modules subdirectories while traversing up ancestor directories.
|
|
44
|
+
*
|
|
45
|
+
* @param cwd the initial directory to traverse
|
|
46
|
+
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
47
|
+
*/
|
|
48
|
+
export async function searchForNodeModules(cwd, rootPath) {
|
|
49
|
+
const pathGenerator = traversedPath => path.join(traversedPath, "node_modules");
|
|
50
|
+
return traverseAncestorDirectories(cwd, pathGenerator, rootPath, undefined, true);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Determine the root directory of a given project, by looking for a directory with an
|
|
54
|
+
* NPM or yarn lockfile or pnpm lockfile.
|
|
55
|
+
*
|
|
56
|
+
* @param cwd the initial directory to traverse
|
|
57
|
+
*/
|
|
58
|
+
export async function getProjectRootPath(cwd) {
|
|
59
|
+
for (const lockFilename of ["yarn.lock", "package-lock.json", "pnpm-lock.yaml", "bun.lock", "bun.lockb"]) {
|
|
60
|
+
const pathGenerator = traversedPath => path.join(traversedPath, lockFilename);
|
|
61
|
+
const lockPaths = await traverseAncestorDirectories(cwd, pathGenerator, undefined, 1);
|
|
62
|
+
if (lockPaths.length > 0) {
|
|
63
|
+
return path.dirname(lockPaths[0]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return cwd;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=search-module.js.map
|