app-builder-lib 26.15.2 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Framework.d.ts +40 -0
- package/dist/Framework.d.ts.map +1 -0
- package/dist/Framework.js +4 -0
- package/dist/Framework.js.map +1 -0
- package/dist/appInfo.d.ts +32 -0
- package/dist/appInfo.d.ts.map +1 -0
- package/dist/appInfo.js +145 -0
- package/dist/appInfo.js.map +1 -0
- package/dist/asar/asar.d.ts +39 -0
- package/dist/asar/asar.d.ts.map +1 -0
- package/dist/asar/asar.js +155 -0
- package/dist/asar/asar.js.map +1 -0
- package/dist/asar/asarFileChecker.d.ts +3 -0
- package/dist/asar/asarFileChecker.d.ts.map +1 -0
- package/dist/asar/asarFileChecker.js +22 -0
- package/dist/asar/asarFileChecker.js.map +1 -0
- package/dist/asar/asarUtil.d.ts +2 -0
- package/dist/asar/asarUtil.d.ts.map +1 -0
- package/dist/asar/asarUtil.js +278 -0
- package/dist/asar/asarUtil.js.map +1 -0
- package/dist/asar/integrity.d.ts +16 -0
- package/dist/asar/integrity.d.ts.map +1 -0
- package/dist/asar/integrity.js +59 -0
- package/dist/asar/integrity.js.map +1 -0
- package/dist/asar/unpackDetector.d.ts +2 -0
- package/dist/asar/unpackDetector.d.ts.map +1 -0
- package/dist/asar/unpackDetector.js +39 -0
- package/dist/asar/unpackDetector.js.map +1 -0
- package/dist/codeSign/certInfo.d.ts +55 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -0
- package/dist/codeSign/certInfo.js +459 -0
- package/dist/codeSign/certInfo.js.map +1 -0
- package/dist/codeSign/codesign.d.ts +4 -0
- package/dist/codeSign/codesign.d.ts.map +1 -0
- package/dist/codeSign/codesign.js +32 -0
- package/dist/codeSign/codesign.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +29 -0
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -0
- package/dist/codeSign/mac/macCodeSign.js +273 -0
- package/dist/codeSign/mac/macCodeSign.js.map +1 -0
- package/dist/codeSign/signManager.d.ts +14 -0
- package/dist/codeSign/signManager.d.ts.map +1 -0
- package/dist/codeSign/signManager.js +2 -0
- package/dist/codeSign/signManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +8 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.js +34 -0
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +18 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.js +68 -0
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts +59 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.js +364 -0
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -0
- package/dist/configuration.d.ts +1010 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +2 -0
- package/dist/configuration.js.map +1 -0
- package/dist/core.d.ts +61 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +61 -0
- package/dist/core.js.map +1 -0
- package/dist/electron/ElectronFramework.d.ts +17 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -0
- package/dist/electron/ElectronFramework.js +236 -0
- package/dist/electron/ElectronFramework.js.map +1 -0
- package/dist/electron/electronVersion.d.ts +7 -0
- package/dist/electron/electronVersion.d.ts.map +1 -0
- package/dist/electron/electronVersion.js +119 -0
- package/dist/electron/electronVersion.js.map +1 -0
- package/dist/electron/injectFFMPEG.d.ts +12 -0
- package/dist/electron/injectFFMPEG.d.ts.map +1 -0
- package/dist/electron/injectFFMPEG.js +53 -0
- package/dist/electron/injectFFMPEG.js.map +1 -0
- package/dist/electron/mac/electronMac.d.ts +2 -0
- package/dist/electron/mac/electronMac.d.ts.map +1 -0
- package/dist/electron/mac/electronMac.js +254 -0
- package/dist/electron/mac/electronMac.js.map +1 -0
- package/dist/electron/search-module.d.ts +24 -0
- package/dist/electron/search-module.d.ts.map +1 -0
- package/dist/electron/search-module.js +68 -0
- package/dist/electron/search-module.js.map +1 -0
- package/dist/electron/win/electronWin.d.ts +2 -0
- package/dist/electron/win/electronWin.d.ts.map +1 -0
- package/dist/electron/win/electronWin.js +36 -0
- package/dist/electron/win/electronWin.js.map +1 -0
- package/dist/errorMessages.d.ts +2 -0
- package/dist/errorMessages.d.ts.map +1 -0
- package/dist/errorMessages.js +8 -0
- package/dist/errorMessages.js.map +1 -0
- package/dist/fileMatcher.d.ts +31 -0
- package/dist/fileMatcher.d.ts.map +1 -0
- package/dist/fileMatcher.js +277 -0
- package/dist/fileMatcher.js.map +1 -0
- package/dist/fileTransformer.d.ts +2 -0
- package/dist/fileTransformer.d.ts.map +1 -0
- package/dist/fileTransformer.js +82 -0
- package/dist/fileTransformer.js.map +1 -0
- package/dist/forge-maker.d.ts +6 -0
- package/dist/forge-maker.d.ts.map +1 -0
- package/dist/forge-maker.js +20 -0
- package/dist/forge-maker.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/indexInternal.d.ts +46 -0
- package/dist/indexInternal.d.ts.map +1 -0
- package/dist/indexInternal.js +39 -0
- package/dist/indexInternal.js.map +1 -0
- package/dist/linuxPackager.d.ts +13 -0
- package/dist/linuxPackager.d.ts.map +1 -0
- package/dist/linuxPackager.js +75 -0
- package/dist/linuxPackager.js.map +1 -0
- package/dist/macPackager.d.ts +50 -0
- package/dist/macPackager.d.ts.map +1 -0
- package/dist/macPackager.js +442 -0
- package/dist/macPackager.js.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js +14 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/hoist.d.ts +124 -0
- package/dist/node-module-collector/hoist.d.ts.map +1 -0
- package/dist/node-module-collector/hoist.js +880 -0
- package/dist/node-module-collector/hoist.js.map +1 -0
- package/dist/node-module-collector/index.d.ts +21 -0
- package/dist/node-module-collector/index.d.ts.map +1 -0
- package/dist/node-module-collector/index.js +124 -0
- package/dist/node-module-collector/index.js.map +1 -0
- package/dist/node-module-collector/moduleManager.d.ts +94 -0
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -0
- package/dist/node-module-collector/moduleManager.js +314 -0
- package/dist/node-module-collector/moduleManager.js.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts +138 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.js +421 -0
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts +15 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js +75 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/packageManager.d.ts +18 -0
- package/dist/node-module-collector/packageManager.d.ts.map +1 -0
- package/dist/node-module-collector/packageManager.js +137 -0
- package/dist/node-module-collector/packageManager.js.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +45 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +184 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js +118 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/types.d.ts +53 -0
- package/dist/node-module-collector/types.d.ts.map +1 -0
- package/dist/node-module-collector/types.js +2 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts +16 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js +87 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js +18 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js.map +1 -0
- package/dist/options/AppXOptions.d.ts +106 -0
- package/dist/options/AppXOptions.d.ts.map +1 -0
- package/dist/options/AppXOptions.js +2 -0
- package/dist/options/AppXOptions.js.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts +48 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js +47 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js.map +1 -0
- package/dist/options/FileAssociation.d.ts +46 -0
- package/dist/options/FileAssociation.d.ts.map +1 -0
- package/dist/options/FileAssociation.js +2 -0
- package/dist/options/MsiOptions.d.ts +27 -0
- package/dist/options/MsiOptions.d.ts.map +1 -0
- package/dist/options/MsiOptions.js +2 -0
- package/dist/options/MsiOptions.js.map +1 -0
- package/dist/options/MsiWrappedOptions.d.ts +27 -0
- package/dist/options/MsiWrappedOptions.d.ts.map +1 -0
- package/dist/options/MsiWrappedOptions.js +2 -0
- package/dist/options/MsiWrappedOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +261 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.js +2 -0
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -0
- package/dist/options/SnapOptions.d.ts +480 -0
- package/dist/options/SnapOptions.d.ts.map +1 -0
- package/dist/options/SnapOptions.js +2 -0
- package/dist/options/SnapOptions.js.map +1 -0
- package/dist/options/SquirrelWindowsOptions.d.ts +47 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -0
- package/dist/options/SquirrelWindowsOptions.js +2 -0
- package/dist/options/SquirrelWindowsOptions.js.map +1 -0
- package/dist/options/linuxOptions.d.ts +289 -0
- package/dist/options/linuxOptions.d.ts.map +1 -0
- package/dist/options/linuxOptions.js +2 -0
- package/dist/options/linuxOptions.js.map +1 -0
- package/dist/options/macOptions.d.ts +390 -0
- package/dist/options/macOptions.d.ts.map +1 -0
- package/dist/options/macOptions.js +2 -0
- package/dist/options/macOptions.js.map +1 -0
- package/dist/options/metadata.d.ts +54 -0
- package/dist/options/metadata.d.ts.map +1 -0
- package/dist/options/metadata.js +2 -0
- package/dist/options/metadata.js.map +1 -0
- package/dist/options/pkgOptions.d.ts +137 -0
- package/dist/options/pkgOptions.d.ts.map +1 -0
- package/dist/options/pkgOptions.js +2 -0
- package/dist/options/pkgOptions.js.map +1 -0
- package/dist/options/winOptions.d.ts +166 -0
- package/dist/options/winOptions.d.ts.map +1 -0
- package/dist/options/winOptions.js +2 -0
- package/dist/options/winOptions.js.map +1 -0
- package/dist/packager.d.ts +100 -0
- package/dist/packager.d.ts.map +1 -0
- package/dist/packager.js +491 -0
- package/dist/packager.js.map +1 -0
- package/dist/packagerApi.d.ts +32 -0
- package/dist/packagerApi.d.ts.map +1 -0
- package/dist/packagerApi.js +2 -0
- package/dist/packagerApi.js.map +1 -0
- package/dist/platformPackager.d.ts +132 -0
- package/dist/platformPackager.d.ts.map +1 -0
- package/dist/platformPackager.js +761 -0
- package/dist/platformPackager.js.map +1 -0
- package/dist/presets/rectCra.d.ts +2 -0
- package/dist/presets/rectCra.d.ts.map +1 -0
- package/dist/presets/rectCra.js +19 -0
- package/dist/presets/rectCra.js.map +1 -0
- package/dist/publish/PublishManager.d.ts +33 -0
- package/dist/publish/PublishManager.d.ts.map +1 -0
- package/dist/publish/PublishManager.js +470 -0
- package/dist/publish/PublishManager.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts +15 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -0
- package/dist/publish/updateInfoBuilder.js +221 -0
- package/dist/publish/updateInfoBuilder.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts +12 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -0
- package/dist/targets/ArchiveTarget.js +93 -0
- package/dist/targets/ArchiveTarget.js.map +1 -0
- package/dist/targets/archive.d.ts +27 -0
- package/dist/targets/archive.d.ts.map +1 -0
- package/dist/targets/archive.js +174 -0
- package/dist/targets/archive.js.map +1 -0
- package/dist/targets/blockmap/blockmap.d.ts +17 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmap.js +150 -0
- package/dist/targets/blockmap/blockmap.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +16 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.js +73 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -0
- package/dist/targets/linux/FlatpakTarget.d.ts +21 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -0
- package/dist/targets/linux/FlatpakTarget.js +156 -0
- package/dist/targets/linux/FlatpakTarget.js.map +1 -0
- package/dist/targets/linux/FpmTarget.d.ts +23 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -0
- package/dist/targets/linux/FpmTarget.js +365 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts +24 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.js +332 -0
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +16 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.js +141 -0
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts +57 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.js +317 -0
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts +4 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.js +91 -0
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts +37 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.js +96 -0
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -0
- package/dist/targets/linux/snap/core24.d.ts +53 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -0
- package/dist/targets/linux/snap/core24.js +444 -0
- package/dist/targets/linux/snap/core24.js.map +1 -0
- package/dist/targets/linux/snap/coreCustom.d.ts +29 -0
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreCustom.js +60 -0
- package/dist/targets/linux/snap/coreCustom.js.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts +46 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.js +402 -0
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +40 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js +414 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +30 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -0
- package/dist/targets/mac/MacTargetHelper.js +267 -0
- package/dist/targets/mac/MacTargetHelper.js.map +1 -0
- package/dist/targets/mac/pkg.d.ts +31 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -0
- package/dist/targets/mac/pkg.js +271 -0
- package/dist/targets/mac/pkg.js.map +1 -0
- package/dist/targets/targetFactory.d.ts +13 -0
- package/dist/targets/targetFactory.d.ts.map +1 -0
- package/dist/targets/targetFactory.js +94 -0
- package/dist/targets/targetFactory.js.map +1 -0
- package/dist/targets/targetUtil.d.ts +16 -0
- package/dist/targets/targetUtil.d.ts.map +1 -0
- package/dist/targets/targetUtil.js +40 -0
- package/dist/targets/targetUtil.js.map +1 -0
- package/dist/targets/win/AppxCapabilities.d.ts +9 -0
- package/dist/targets/win/AppxCapabilities.d.ts.map +1 -0
- package/dist/targets/win/AppxCapabilities.js +254 -0
- package/dist/targets/win/AppxCapabilities.js.map +1 -0
- package/dist/targets/win/AppxTarget.d.ts +18 -0
- package/dist/targets/win/AppxTarget.d.ts.map +1 -0
- package/dist/targets/win/AppxTarget.js +398 -0
- package/dist/targets/win/AppxTarget.js.map +1 -0
- package/dist/targets/win/MsiTarget.d.ts +29 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiTarget.js +268 -0
- package/dist/targets/win/MsiTarget.js.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts +20 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.js +77 -0
- package/dist/targets/win/MsiWrappedTarget.js.map +1 -0
- package/dist/targets/win/nsis/Commands.d.ts +10 -0
- package/dist/targets/win/nsis/Commands.d.ts.map +1 -0
- package/dist/targets/win/nsis/Commands.js +2 -0
- package/dist/targets/win/nsis/Commands.js.map +1 -0
- package/dist/targets/win/nsis/Defines.d.ts +81 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -0
- package/dist/targets/win/nsis/Defines.js +2 -0
- package/dist/targets/win/nsis/Defines.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +43 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.js +726 -0
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts +14 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js +43 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -0
- package/dist/targets/win/nsis/nsisLang.d.ts +11 -0
- package/dist/targets/win/nsis/nsisLang.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLang.js +94 -0
- package/dist/targets/win/nsis/nsisLang.js.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts +5 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.js +73 -0
- package/dist/targets/win/nsis/nsisLicense.js.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts +275 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.js +2 -0
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +13 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js +59 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts +26 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.js +218 -0
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts +19 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.js +49 -0
- package/dist/targets/win/nsis/nsisValidation.js.map +1 -0
- package/dist/toolsets/7zip.d.ts +9 -0
- package/dist/toolsets/7zip.d.ts.map +1 -0
- package/dist/toolsets/7zip.js +80 -0
- package/dist/toolsets/7zip.js.map +1 -0
- package/dist/toolsets/appimage.d.ts +20 -0
- package/dist/toolsets/appimage.d.ts.map +1 -0
- package/dist/toolsets/appimage.js +67 -0
- package/dist/toolsets/appimage.js.map +1 -0
- package/dist/toolsets/custom.d.ts +5 -0
- package/dist/toolsets/custom.d.ts.map +1 -0
- package/dist/toolsets/custom.js +200 -0
- package/dist/toolsets/custom.js.map +1 -0
- package/dist/toolsets/fpm.d.ts +3 -0
- package/dist/toolsets/fpm.d.ts.map +1 -0
- package/dist/toolsets/fpm.js +49 -0
- package/dist/toolsets/fpm.js.map +1 -0
- package/dist/toolsets/icons.d.ts +12 -0
- package/dist/toolsets/icons.d.ts.map +1 -0
- package/dist/toolsets/icons.js +36 -0
- package/dist/toolsets/icons.js.map +1 -0
- package/dist/toolsets/linuxToolsMac.d.ts +8 -0
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -0
- package/dist/toolsets/linuxToolsMac.js +31 -0
- package/dist/toolsets/linuxToolsMac.js.map +1 -0
- package/dist/toolsets/nsis.d.ts +13 -0
- package/dist/toolsets/nsis.d.ts.map +1 -0
- package/dist/toolsets/nsis.js +100 -0
- package/dist/toolsets/nsis.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +42 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -0
- package/dist/toolsets/winCodeSign.js +142 -0
- package/dist/toolsets/winCodeSign.js.map +1 -0
- package/dist/toolsets/wine.d.ts +6 -0
- package/dist/toolsets/wine.d.ts.map +1 -0
- package/dist/toolsets/wine.js +79 -0
- package/dist/toolsets/wine.js.map +1 -0
- package/dist/util/AppFileWalker.d.ts +14 -0
- package/dist/util/AppFileWalker.d.ts.map +1 -0
- package/dist/util/AppFileWalker.js +69 -0
- package/dist/util/AppFileWalker.js.map +1 -0
- package/dist/util/NodeModuleCopyHelper.d.ts +2 -0
- package/dist/util/NodeModuleCopyHelper.d.ts.map +1 -0
- package/dist/util/NodeModuleCopyHelper.js +160 -0
- package/dist/util/NodeModuleCopyHelper.js.map +1 -0
- package/dist/util/appFileCopier.d.ts +17 -0
- package/dist/util/appFileCopier.d.ts.map +1 -0
- package/dist/util/appFileCopier.js +190 -0
- package/dist/util/appFileCopier.js.map +1 -0
- package/dist/util/asyncEventEmitter.d.ts +34 -0
- package/dist/util/asyncEventEmitter.d.ts.map +1 -0
- package/dist/util/asyncEventEmitter.js +56 -0
- package/dist/util/asyncEventEmitter.js.map +1 -0
- package/dist/util/bundledTool.d.ts +8 -0
- package/dist/util/bundledTool.d.ts.map +1 -0
- package/dist/util/bundledTool.js +16 -0
- package/dist/util/bundledTool.js.map +1 -0
- package/dist/util/cacheManager.d.ts +19 -0
- package/dist/util/cacheManager.d.ts.map +1 -0
- package/dist/util/cacheManager.js +65 -0
- package/dist/util/cacheManager.js.map +1 -0
- package/dist/util/cacheState.d.ts +29 -0
- package/dist/util/cacheState.d.ts.map +1 -0
- package/dist/util/cacheState.js +134 -0
- package/dist/util/cacheState.js.map +1 -0
- package/dist/util/config/config.d.ts +13 -0
- package/dist/util/config/config.d.ts.map +1 -0
- package/dist/util/config/config.js +236 -0
- package/dist/util/config/config.js.map +1 -0
- package/dist/util/config/load.d.ts +20 -0
- package/dist/util/config/load.d.ts.map +1 -0
- package/dist/util/config/load.js +122 -0
- package/dist/util/config/load.js.map +1 -0
- package/dist/util/config/schemaValidator.d.ts +8 -0
- package/dist/util/config/schemaValidator.d.ts.map +1 -0
- package/dist/util/config/schemaValidator.js +161 -0
- package/dist/util/config/schemaValidator.js.map +1 -0
- package/dist/util/dynamicImport.d.ts +2 -0
- package/dist/util/dynamicImport.d.ts.map +1 -0
- package/dist/util/dynamicImport.js +9 -0
- package/dist/util/dynamicImport.js.map +1 -0
- package/dist/util/electronGet.d.ts +68 -0
- package/dist/util/electronGet.d.ts.map +1 -0
- package/dist/util/electronGet.js +560 -0
- package/dist/util/electronGet.js.map +1 -0
- package/dist/util/filter.d.ts +2 -0
- package/dist/util/filter.d.ts.map +1 -0
- package/dist/util/filter.js +64 -0
- package/dist/util/filter.js.map +1 -0
- package/dist/util/flags.d.ts +16 -0
- package/dist/util/flags.d.ts.map +1 -0
- package/dist/util/flags.js +53 -0
- package/dist/util/flags.js.map +1 -0
- package/dist/util/hash.d.ts +2 -0
- package/dist/util/hash.d.ts.map +1 -0
- package/dist/util/hash.js +16 -0
- package/dist/util/hash.js.map +1 -0
- package/dist/util/iconConverter.d.ts +29 -0
- package/dist/util/iconConverter.d.ts.map +1 -0
- package/dist/util/iconConverter.js +255 -0
- package/dist/util/iconConverter.js.map +1 -0
- package/dist/util/langs.d.ts +190 -0
- package/dist/util/langs.d.ts.map +1 -0
- package/dist/util/langs.js +432 -0
- package/dist/util/langs.js.map +1 -0
- package/dist/util/license.d.ts +17 -0
- package/dist/util/license.d.ts.map +1 -0
- package/dist/util/license.js +42 -0
- package/dist/util/license.js.map +1 -0
- package/dist/util/mac/macosIconComposer.d.ts +11 -0
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -0
- package/dist/util/mac/macosIconComposer.js +99 -0
- package/dist/util/mac/macosIconComposer.js.map +1 -0
- package/dist/util/mac/macosVersion.d.ts +4 -0
- package/dist/util/mac/macosVersion.d.ts.map +1 -0
- package/dist/util/mac/macosVersion.js +31 -0
- package/dist/util/mac/macosVersion.js.map +1 -0
- package/dist/util/mac/plist.d.ts +8 -0
- package/dist/util/mac/plist.d.ts.map +1 -0
- package/dist/util/mac/plist.js +27 -0
- package/dist/util/mac/plist.js.map +1 -0
- package/dist/util/macroExpander.d.ts +4 -0
- package/dist/util/macroExpander.d.ts.map +1 -0
- package/dist/util/macroExpander.js +61 -0
- package/dist/util/macroExpander.js.map +1 -0
- package/dist/util/normalizePackageData.d.ts +2 -0
- package/dist/util/normalizePackageData.d.ts.map +1 -0
- package/dist/util/normalizePackageData.js +323 -0
- package/dist/util/normalizePackageData.js.map +1 -0
- package/dist/util/packageMetadata.d.ts +2 -0
- package/dist/util/packageMetadata.d.ts.map +1 -0
- package/dist/util/packageMetadata.js +118 -0
- package/dist/util/packageMetadata.js.map +1 -0
- package/dist/util/pathManager.d.ts +4 -0
- package/dist/util/pathManager.d.ts.map +1 -0
- package/dist/util/pathManager.js +17 -0
- package/dist/util/pathManager.js.map +1 -0
- package/dist/util/rebuild.d.ts +3 -0
- package/dist/util/rebuild.d.ts.map +1 -0
- package/dist/util/rebuild.js +54 -0
- package/dist/util/rebuild.js.map +1 -0
- package/dist/util/repositoryInfo.d.ts +4 -0
- package/dist/util/repositoryInfo.d.ts.map +1 -0
- package/dist/util/repositoryInfo.js +76 -0
- package/dist/util/repositoryInfo.js.map +1 -0
- package/dist/util/resolve.d.ts +3 -0
- package/dist/util/resolve.d.ts.map +1 -0
- package/dist/util/resolve.js +56 -0
- package/dist/util/resolve.js.map +1 -0
- package/dist/util/timer.d.ts +12 -0
- package/dist/util/timer.d.ts.map +1 -0
- package/dist/util/timer.js +23 -0
- package/dist/util/timer.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -0
- package/dist/util/toolsetLock.js +20 -0
- package/dist/util/toolsetLock.js.map +1 -0
- package/dist/util/win/resEdit.d.ts +11 -0
- package/dist/util/win/resEdit.d.ts.map +1 -0
- package/dist/util/win/resEdit.js +46 -0
- package/dist/util/win/resEdit.js.map +1 -0
- package/dist/util/yarn.d.ts +23 -0
- package/dist/util/yarn.d.ts.map +1 -0
- package/dist/util/yarn.js +153 -0
- package/dist/util/yarn.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/vm/MonoVm.d.ts +9 -0
- package/dist/vm/MonoVm.d.ts.map +1 -0
- package/dist/vm/MonoVm.js +16 -0
- package/dist/vm/MonoVm.js.map +1 -0
- package/dist/vm/ParallelsVm.d.ts +24 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -0
- package/dist/vm/ParallelsVm.js +107 -0
- package/dist/vm/ParallelsVm.js.map +1 -0
- package/dist/vm/PwshVm.d.ts +7 -0
- package/dist/vm/PwshVm.d.ts.map +1 -0
- package/dist/vm/PwshVm.js +21 -0
- package/dist/vm/PwshVm.js.map +1 -0
- package/dist/vm/WineVm.d.ts +14 -0
- package/dist/vm/WineVm.d.ts.map +1 -0
- package/dist/vm/WineVm.js +35 -0
- package/dist/vm/WineVm.js.map +1 -0
- package/dist/vm/vm.d.ts +15 -0
- package/dist/vm/vm.d.ts.map +1 -0
- package/dist/vm/vm.js +81 -0
- package/dist/vm/vm.js.map +1 -0
- package/dist/winPackager.d.ts +30 -0
- package/dist/winPackager.d.ts.map +1 -0
- package/dist/winPackager.js +270 -0
- package/dist/winPackager.js.map +1 -0
- package/helpers/package.json +6 -0
- package/helpers/remote-rebuild.js +2 -4
- package/package.json +30 -33
- package/scheme.json +379 -721
- package/out/Framework.d.ts +0 -36
- package/out/Framework.js +0 -7
- package/out/Framework.js.map +0 -1
- package/out/ProtonFramework.d.ts +0 -10
- package/out/ProtonFramework.js +0 -94
- package/out/ProtonFramework.js.map +0 -1
- package/out/appInfo.d.ts +0 -31
- package/out/appInfo.js +0 -152
- package/out/appInfo.js.map +0 -1
- package/out/asar/asar.d.ts +0 -38
- package/out/asar/asar.js +0 -163
- package/out/asar/asar.js.map +0 -1
- package/out/asar/asarFileChecker.d.ts +0 -2
- package/out/asar/asarFileChecker.js +0 -25
- package/out/asar/asarFileChecker.js.map +0 -1
- package/out/asar/asarUtil.d.ts +0 -1
- package/out/asar/asarUtil.js +0 -285
- package/out/asar/asarUtil.js.map +0 -1
- package/out/asar/integrity.d.ts +0 -15
- package/out/asar/integrity.js +0 -62
- package/out/asar/integrity.js.map +0 -1
- package/out/asar/unpackDetector.d.ts +0 -1
- package/out/asar/unpackDetector.js +0 -43
- package/out/asar/unpackDetector.js.map +0 -1
- package/out/binDownload.d.ts +0 -5
- package/out/binDownload.js +0 -104
- package/out/binDownload.js.map +0 -1
- package/out/codeSign/certInfo.d.ts +0 -54
- package/out/codeSign/certInfo.js +0 -466
- package/out/codeSign/certInfo.js.map +0 -1
- package/out/codeSign/codesign.d.ts +0 -3
- package/out/codeSign/codesign.js +0 -33
- package/out/codeSign/codesign.js.map +0 -1
- package/out/codeSign/macCodeSign.d.ts +0 -28
- package/out/codeSign/macCodeSign.js +0 -284
- package/out/codeSign/macCodeSign.js.map +0 -1
- package/out/codeSign/signManager.d.ts +0 -13
- package/out/codeSign/signManager.js +0 -3
- package/out/codeSign/signManager.js.map +0 -1
- package/out/codeSign/windowsCodeSign.d.ts +0 -7
- package/out/codeSign/windowsCodeSign.js +0 -38
- package/out/codeSign/windowsCodeSign.js.map +0 -1
- package/out/codeSign/windowsSignAzureManager.d.ts +0 -17
- package/out/codeSign/windowsSignAzureManager.js +0 -73
- package/out/codeSign/windowsSignAzureManager.js.map +0 -1
- package/out/codeSign/windowsSignToolManager.d.ts +0 -58
- package/out/codeSign/windowsSignToolManager.js +0 -376
- package/out/codeSign/windowsSignToolManager.js.map +0 -1
- package/out/configuration.d.ts +0 -532
- package/out/configuration.js +0 -3
- package/out/configuration.js.map +0 -1
- package/out/core.d.ts +0 -60
- package/out/core.js +0 -66
- package/out/core.js.map +0 -1
- package/out/electron/ElectronFramework.d.ts +0 -16
- package/out/electron/ElectronFramework.js +0 -242
- package/out/electron/ElectronFramework.js.map +0 -1
- package/out/electron/electronMac.d.ts +0 -1
- package/out/electron/electronMac.js +0 -262
- package/out/electron/electronMac.js.map +0 -1
- package/out/electron/electronVersion.d.ts +0 -6
- package/out/electron/electronVersion.js +0 -125
- package/out/electron/electronVersion.js.map +0 -1
- package/out/electron/electronWin.d.ts +0 -1
- package/out/electron/electronWin.js +0 -38
- package/out/electron/electronWin.js.map +0 -1
- package/out/electron/injectFFMPEG.d.ts +0 -11
- package/out/electron/injectFFMPEG.js +0 -57
- package/out/electron/injectFFMPEG.js.map +0 -1
- package/out/electron/search-module.d.ts +0 -23
- package/out/electron/search-module.js +0 -73
- package/out/electron/search-module.js.map +0 -1
- package/out/errorMessages.d.ts +0 -1
- package/out/errorMessages.js +0 -11
- package/out/errorMessages.js.map +0 -1
- package/out/fileMatcher.d.ts +0 -29
- package/out/fileMatcher.js +0 -292
- package/out/fileMatcher.js.map +0 -1
- package/out/fileTransformer.d.ts +0 -1
- package/out/fileTransformer.js +0 -107
- package/out/fileTransformer.js.map +0 -1
- package/out/forge-maker.d.ts +0 -5
- package/out/forge-maker.js +0 -23
- package/out/forge-maker.js.map +0 -1
- package/out/frameworks/LibUiFramework.d.ts +0 -47
- package/out/frameworks/LibUiFramework.js +0 -197
- package/out/frameworks/LibUiFramework.js.map +0 -1
- package/out/index.d.ts +0 -39
- package/out/index.js +0 -99
- package/out/index.js.map +0 -1
- package/out/linuxPackager.d.ts +0 -12
- package/out/linuxPackager.js +0 -77
- package/out/linuxPackager.js.map +0 -1
- package/out/mac/MacTargetHelper.d.ts +0 -29
- package/out/mac/MacTargetHelper.js +0 -273
- package/out/mac/MacTargetHelper.js.map +0 -1
- package/out/macPackager.d.ts +0 -49
- package/out/macPackager.js +0 -445
- package/out/macPackager.js.map +0 -1
- package/out/node-module-collector/bunNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/bunNodeModulesCollector.js +0 -18
- package/out/node-module-collector/bunNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/hoist.d.ts +0 -123
- package/out/node-module-collector/hoist.js +0 -884
- package/out/node-module-collector/hoist.js.map +0 -1
- package/out/node-module-collector/index.d.ts +0 -18
- package/out/node-module-collector/index.js +0 -130
- package/out/node-module-collector/index.js.map +0 -1
- package/out/node-module-collector/moduleManager.d.ts +0 -93
- package/out/node-module-collector/moduleManager.js +0 -321
- package/out/node-module-collector/moduleManager.js.map +0 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +0 -137
- package/out/node-module-collector/nodeModulesCollector.js +0 -428
- package/out/node-module-collector/nodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -14
- package/out/node-module-collector/npmNodeModulesCollector.js +0 -80
- package/out/node-module-collector/npmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/packageManager.d.ts +0 -17
- package/out/node-module-collector/packageManager.js +0 -144
- package/out/node-module-collector/packageManager.js.map +0 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +0 -44
- package/out/node-module-collector/pnpmNodeModulesCollector.js +0 -191
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/traversalNodeModulesCollector.d.ts +0 -18
- package/out/node-module-collector/traversalNodeModulesCollector.js +0 -122
- package/out/node-module-collector/traversalNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/types.d.ts +0 -52
- package/out/node-module-collector/types.js +0 -3
- package/out/node-module-collector/yarnBerryNodeModulesCollector.d.ts +0 -15
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js +0 -93
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/yarnNodeModulesCollector.js +0 -22
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +0 -1
- package/out/options/AppXOptions.d.ts +0 -105
- package/out/options/AppXOptions.js +0 -3
- package/out/options/AppXOptions.js.map +0 -1
- package/out/options/CommonWindowsInstallerConfiguration.d.ts +0 -47
- package/out/options/CommonWindowsInstallerConfiguration.js +0 -51
- package/out/options/CommonWindowsInstallerConfiguration.js.map +0 -1
- package/out/options/FileAssociation.d.ts +0 -45
- package/out/options/FileAssociation.js +0 -3
- package/out/options/MsiOptions.d.ts +0 -26
- package/out/options/MsiOptions.js +0 -3
- package/out/options/MsiOptions.js.map +0 -1
- package/out/options/MsiWrappedOptions.d.ts +0 -26
- package/out/options/MsiWrappedOptions.js +0 -3
- package/out/options/MsiWrappedOptions.js.map +0 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +0 -238
- package/out/options/PlatformSpecificBuildOptions.js +0 -3
- package/out/options/PlatformSpecificBuildOptions.js.map +0 -1
- package/out/options/SnapOptions.d.ts +0 -500
- package/out/options/SnapOptions.js +0 -3
- package/out/options/SnapOptions.js.map +0 -1
- package/out/options/SquirrelWindowsOptions.d.ts +0 -46
- package/out/options/SquirrelWindowsOptions.js +0 -3
- package/out/options/SquirrelWindowsOptions.js.map +0 -1
- package/out/options/linuxOptions.d.ts +0 -287
- package/out/options/linuxOptions.js +0 -3
- package/out/options/linuxOptions.js.map +0 -1
- package/out/options/macOptions.d.ts +0 -388
- package/out/options/macOptions.js +0 -3
- package/out/options/macOptions.js.map +0 -1
- package/out/options/metadata.d.ts +0 -53
- package/out/options/metadata.js +0 -3
- package/out/options/metadata.js.map +0 -1
- package/out/options/pkgOptions.d.ts +0 -136
- package/out/options/pkgOptions.js +0 -3
- package/out/options/pkgOptions.js.map +0 -1
- package/out/options/winOptions.d.ts +0 -164
- package/out/options/winOptions.js +0 -3
- package/out/options/winOptions.js.map +0 -1
- package/out/packager.d.ts +0 -99
- package/out/packager.js +0 -515
- package/out/packager.js.map +0 -1
- package/out/packagerApi.d.ts +0 -31
- package/out/packagerApi.js +0 -3
- package/out/packagerApi.js.map +0 -1
- package/out/platformPackager.d.ts +0 -101
- package/out/platformPackager.js +0 -714
- package/out/platformPackager.js.map +0 -1
- package/out/presets/rectCra.d.ts +0 -1
- package/out/presets/rectCra.js +0 -22
- package/out/presets/rectCra.js.map +0 -1
- package/out/publish/PublishManager.d.ts +0 -30
- package/out/publish/PublishManager.js +0 -497
- package/out/publish/PublishManager.js.map +0 -1
- package/out/publish/updateInfoBuilder.d.ts +0 -14
- package/out/publish/updateInfoBuilder.js +0 -226
- package/out/publish/updateInfoBuilder.js.map +0 -1
- package/out/targets/AppxCapabilities.d.ts +0 -8
- package/out/targets/AppxCapabilities.js +0 -258
- package/out/targets/AppxCapabilities.js.map +0 -1
- package/out/targets/AppxTarget.d.ts +0 -17
- package/out/targets/AppxTarget.js +0 -403
- package/out/targets/AppxTarget.js.map +0 -1
- package/out/targets/ArchiveTarget.d.ts +0 -11
- package/out/targets/ArchiveTarget.js +0 -88
- package/out/targets/ArchiveTarget.js.map +0 -1
- package/out/targets/FlatpakTarget.d.ts +0 -20
- package/out/targets/FlatpakTarget.js +0 -159
- package/out/targets/FlatpakTarget.js.map +0 -1
- package/out/targets/FpmTarget.d.ts +0 -22
- package/out/targets/FpmTarget.js +0 -372
- package/out/targets/FpmTarget.js.map +0 -1
- package/out/targets/LinuxTargetHelper.d.ts +0 -23
- package/out/targets/LinuxTargetHelper.js +0 -346
- package/out/targets/LinuxTargetHelper.js.map +0 -1
- package/out/targets/MsiTarget.d.ts +0 -28
- package/out/targets/MsiTarget.js +0 -268
- package/out/targets/MsiTarget.js.map +0 -1
- package/out/targets/MsiWrappedTarget.d.ts +0 -19
- package/out/targets/MsiWrappedTarget.js +0 -80
- package/out/targets/MsiWrappedTarget.js.map +0 -1
- package/out/targets/appimage/AppImageTarget.d.ts +0 -15
- package/out/targets/appimage/AppImageTarget.js +0 -147
- package/out/targets/appimage/AppImageTarget.js.map +0 -1
- package/out/targets/appimage/appImageUtil.d.ts +0 -56
- package/out/targets/appimage/appImageUtil.js +0 -323
- package/out/targets/appimage/appImageUtil.js.map +0 -1
- package/out/targets/appimage/appLauncher.d.ts +0 -3
- package/out/targets/appimage/appLauncher.js +0 -95
- package/out/targets/appimage/appLauncher.js.map +0 -1
- package/out/targets/archive.d.ts +0 -26
- package/out/targets/archive.js +0 -178
- package/out/targets/archive.js.map +0 -1
- package/out/targets/blockmap/blockmap.d.ts +0 -16
- package/out/targets/blockmap/blockmap.js +0 -153
- package/out/targets/blockmap/blockmap.js.map +0 -1
- package/out/targets/differentialUpdateInfoBuilder.d.ts +0 -15
- package/out/targets/differentialUpdateInfoBuilder.js +0 -80
- package/out/targets/differentialUpdateInfoBuilder.js.map +0 -1
- package/out/targets/nsis/Commands.d.ts +0 -9
- package/out/targets/nsis/Commands.js +0 -3
- package/out/targets/nsis/Commands.js.map +0 -1
- package/out/targets/nsis/Defines.d.ts +0 -80
- package/out/targets/nsis/Defines.js +0 -3
- package/out/targets/nsis/Defines.js.map +0 -1
- package/out/targets/nsis/NsisTarget.d.ts +0 -37
- package/out/targets/nsis/NsisTarget.js +0 -729
- package/out/targets/nsis/NsisTarget.js.map +0 -1
- package/out/targets/nsis/WebInstallerTarget.d.ts +0 -13
- package/out/targets/nsis/WebInstallerTarget.js +0 -47
- package/out/targets/nsis/WebInstallerTarget.js.map +0 -1
- package/out/targets/nsis/nsisLang.d.ts +0 -10
- package/out/targets/nsis/nsisLang.js +0 -100
- package/out/targets/nsis/nsisLang.js.map +0 -1
- package/out/targets/nsis/nsisLicense.d.ts +0 -4
- package/out/targets/nsis/nsisLicense.js +0 -77
- package/out/targets/nsis/nsisLicense.js.map +0 -1
- package/out/targets/nsis/nsisOptions.d.ts +0 -274
- package/out/targets/nsis/nsisOptions.js +0 -3
- package/out/targets/nsis/nsisOptions.js.map +0 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +0 -12
- package/out/targets/nsis/nsisScriptGenerator.js +0 -64
- package/out/targets/nsis/nsisScriptGenerator.js.map +0 -1
- package/out/targets/nsis/nsisUtil.d.ts +0 -25
- package/out/targets/nsis/nsisUtil.js +0 -225
- package/out/targets/nsis/nsisUtil.js.map +0 -1
- package/out/targets/nsis/nsisValidation.d.ts +0 -18
- package/out/targets/nsis/nsisValidation.js +0 -53
- package/out/targets/nsis/nsisValidation.js.map +0 -1
- package/out/targets/pkg.d.ts +0 -30
- package/out/targets/pkg.js +0 -279
- package/out/targets/pkg.js.map +0 -1
- package/out/targets/snap/SnapTarget.d.ts +0 -36
- package/out/targets/snap/SnapTarget.js +0 -105
- package/out/targets/snap/SnapTarget.js.map +0 -1
- package/out/targets/snap/core24.d.ts +0 -52
- package/out/targets/snap/core24.js +0 -449
- package/out/targets/snap/core24.js.map +0 -1
- package/out/targets/snap/coreCustom.d.ts +0 -28
- package/out/targets/snap/coreCustom.js +0 -63
- package/out/targets/snap/coreCustom.js.map +0 -1
- package/out/targets/snap/coreLegacy.d.ts +0 -43
- package/out/targets/snap/coreLegacy.js +0 -416
- package/out/targets/snap/coreLegacy.js.map +0 -1
- package/out/targets/snap/snapcraftBuilder.d.ts +0 -39
- package/out/targets/snap/snapcraftBuilder.js +0 -419
- package/out/targets/snap/snapcraftBuilder.js.map +0 -1
- package/out/targets/targetFactory.d.ts +0 -12
- package/out/targets/targetFactory.js +0 -101
- package/out/targets/targetFactory.js.map +0 -1
- package/out/targets/targetUtil.d.ts +0 -14
- package/out/targets/targetUtil.js +0 -47
- package/out/targets/targetUtil.js.map +0 -1
- package/out/toolsets/7zip.d.ts +0 -2
- package/out/toolsets/7zip.js +0 -72
- package/out/toolsets/7zip.js.map +0 -1
- package/out/toolsets/icons.d.ts +0 -8
- package/out/toolsets/icons.js +0 -37
- package/out/toolsets/icons.js.map +0 -1
- package/out/toolsets/linux.d.ts +0 -26
- package/out/toolsets/linux.js +0 -146
- package/out/toolsets/linux.js.map +0 -1
- package/out/toolsets/windows.d.ts +0 -61
- package/out/toolsets/windows.js +0 -259
- package/out/toolsets/windows.js.map +0 -1
- package/out/toolsets/wine.d.ts +0 -5
- package/out/toolsets/wine.js +0 -100
- package/out/toolsets/wine.js.map +0 -1
- package/out/util/AppFileWalker.d.ts +0 -13
- package/out/util/AppFileWalker.js +0 -74
- package/out/util/AppFileWalker.js.map +0 -1
- package/out/util/NodeModuleCopyHelper.d.ts +0 -1
- package/out/util/NodeModuleCopyHelper.js +0 -165
- package/out/util/NodeModuleCopyHelper.js.map +0 -1
- package/out/util/appFileCopier.d.ts +0 -16
- package/out/util/appFileCopier.js +0 -251
- package/out/util/appFileCopier.js.map +0 -1
- package/out/util/asyncEventEmitter.d.ts +0 -33
- package/out/util/asyncEventEmitter.js +0 -63
- package/out/util/asyncEventEmitter.js.map +0 -1
- package/out/util/bundledTool.d.ts +0 -7
- package/out/util/bundledTool.js +0 -20
- package/out/util/bundledTool.js.map +0 -1
- package/out/util/cacheManager.d.ts +0 -18
- package/out/util/cacheManager.js +0 -70
- package/out/util/cacheManager.js.map +0 -1
- package/out/util/cacheState.d.ts +0 -28
- package/out/util/cacheState.js +0 -143
- package/out/util/cacheState.js.map +0 -1
- package/out/util/config/config.d.ts +0 -12
- package/out/util/config/config.js +0 -256
- package/out/util/config/config.js.map +0 -1
- package/out/util/config/load.d.ts +0 -19
- package/out/util/config/load.js +0 -129
- package/out/util/config/load.js.map +0 -1
- package/out/util/config/schemaValidator.d.ts +0 -7
- package/out/util/config/schemaValidator.js +0 -154
- package/out/util/config/schemaValidator.js.map +0 -1
- package/out/util/dynamicImport.d.ts +0 -1
- package/out/util/dynamicImport.js +0 -12
- package/out/util/dynamicImport.js.map +0 -1
- package/out/util/electronGet.d.ts +0 -61
- package/out/util/electronGet.js +0 -464
- package/out/util/electronGet.js.map +0 -1
- package/out/util/envPath.d.ts +0 -2
- package/out/util/envPath.js +0 -28
- package/out/util/envPath.js.map +0 -1
- package/out/util/filter.d.ts +0 -1
- package/out/util/filter.js +0 -68
- package/out/util/filter.js.map +0 -1
- package/out/util/flags.d.ts +0 -3
- package/out/util/flags.js +0 -16
- package/out/util/flags.js.map +0 -1
- package/out/util/hash.d.ts +0 -1
- package/out/util/hash.js +0 -19
- package/out/util/hash.js.map +0 -1
- package/out/util/iconConverter.d.ts +0 -25
- package/out/util/iconConverter.js +0 -260
- package/out/util/iconConverter.js.map +0 -1
- package/out/util/langs.d.ts +0 -189
- package/out/util/langs.js +0 -436
- package/out/util/langs.js.map +0 -1
- package/out/util/license.d.ts +0 -16
- package/out/util/license.js +0 -47
- package/out/util/license.js.map +0 -1
- package/out/util/macosIconComposer.d.ts +0 -10
- package/out/util/macosIconComposer.js +0 -102
- package/out/util/macosIconComposer.js.map +0 -1
- package/out/util/macosVersion.d.ts +0 -3
- package/out/util/macosVersion.js +0 -36
- package/out/util/macosVersion.js.map +0 -1
- package/out/util/macroExpander.d.ts +0 -3
- package/out/util/macroExpander.js +0 -64
- package/out/util/macroExpander.js.map +0 -1
- package/out/util/normalizePackageData.d.ts +0 -1
- package/out/util/normalizePackageData.js +0 -328
- package/out/util/normalizePackageData.js.map +0 -1
- package/out/util/packageDependencies.d.ts +0 -6
- package/out/util/packageDependencies.js +0 -3
- package/out/util/packageDependencies.js.map +0 -1
- package/out/util/packageMetadata.d.ts +0 -1
- package/out/util/packageMetadata.js +0 -124
- package/out/util/packageMetadata.js.map +0 -1
- package/out/util/pathManager.d.ts +0 -3
- package/out/util/pathManager.js +0 -23
- package/out/util/pathManager.js.map +0 -1
- package/out/util/plist.d.ts +0 -7
- package/out/util/plist.js +0 -31
- package/out/util/plist.js.map +0 -1
- package/out/util/rebuild.d.ts +0 -2
- package/out/util/rebuild.js +0 -60
- package/out/util/rebuild.js.map +0 -1
- package/out/util/repositoryInfo.d.ts +0 -3
- package/out/util/repositoryInfo.js +0 -79
- package/out/util/repositoryInfo.js.map +0 -1
- package/out/util/resEdit.d.ts +0 -10
- package/out/util/resEdit.js +0 -49
- package/out/util/resEdit.js.map +0 -1
- package/out/util/resolve.d.ts +0 -2
- package/out/util/resolve.js +0 -59
- package/out/util/resolve.js.map +0 -1
- package/out/util/timer.d.ts +0 -11
- package/out/util/timer.js +0 -28
- package/out/util/timer.js.map +0 -1
- package/out/util/toolsetLock.d.ts +0 -1
- package/out/util/toolsetLock.js +0 -23
- package/out/util/toolsetLock.js.map +0 -1
- package/out/util/yarn.d.ts +0 -22
- package/out/util/yarn.js +0 -160
- package/out/util/yarn.js.map +0 -1
- package/out/version.d.ts +0 -1
- package/out/version.js +0 -5
- package/out/version.js.map +0 -1
- package/out/vm/MonoVm.d.ts +0 -8
- package/out/vm/MonoVm.js +0 -20
- package/out/vm/MonoVm.js.map +0 -1
- package/out/vm/ParallelsVm.d.ts +0 -23
- package/out/vm/ParallelsVm.js +0 -102
- package/out/vm/ParallelsVm.js.map +0 -1
- package/out/vm/PwshVm.d.ts +0 -6
- package/out/vm/PwshVm.js +0 -25
- package/out/vm/PwshVm.js.map +0 -1
- package/out/vm/WineVm.d.ts +0 -12
- package/out/vm/WineVm.js +0 -38
- package/out/vm/WineVm.js.map +0 -1
- package/out/vm/vm.d.ts +0 -14
- package/out/vm/vm.js +0 -88
- package/out/vm/vm.js.map +0 -1
- package/out/winPackager.d.ts +0 -29
- package/out/winPackager.js +0 -271
- package/out/winPackager.js.map +0 -1
- /package/{out → dist}/node-module-collector/types.js.map +0 -0
- /package/{out → dist}/options/FileAssociation.js.map +0 -0
- /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { exists, InvalidConfigurationError, sanitizeDirPath } from "builder-util";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
4
|
+
import { isUseSystemWine } from "../util/flags.js";
|
|
5
|
+
import { getCustomToolsetPath } from "./custom.js";
|
|
6
|
+
const wineToolsChecksums = {
|
|
7
|
+
"0.0.0": {
|
|
8
|
+
"wine-4.0.1-mac.7z": "1baac808a67975b68b9226beea7b64ad0acc3e598a4b45c25bb5d2ae8cac655e",
|
|
9
|
+
},
|
|
10
|
+
"1.0.1": {
|
|
11
|
+
"wine-11.0-darwin-x86_64.tar.xz": "0a4a43867ef225c70ed8d4198aaba24a55cb0e52e5d67b0ac99563e6351a3c61",
|
|
12
|
+
"wine-11.0-linux-x86_64.tar.xz": "d8cf95442957b75c07166540142c96d8f7be6a68a572cc656194e7b42e8a0f13",
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export async function getWineToolset(wine, resourcesDir) {
|
|
16
|
+
if (process.platform === "win32") {
|
|
17
|
+
throw new InvalidConfigurationError(`Wine toolset is not supported on Windows, but got: ${wine}`);
|
|
18
|
+
}
|
|
19
|
+
const defaultEnv = { WINEDEBUG: "-all,err+all", WINEDLLOVERRIDES: "winemenubuilder.exe=d" };
|
|
20
|
+
// null / undefined / "0.0.0" all mean "default wine" — always use system wine on Linux
|
|
21
|
+
// and use the legacy macOS bundle on darwin. Only an explicit ToolsetCustom object
|
|
22
|
+
// (or a future non-legacy string version) triggers a bundle download.
|
|
23
|
+
const useSystemWine = isUseSystemWine();
|
|
24
|
+
const isDefault = wine == null || wine === "0.0.0";
|
|
25
|
+
if (useSystemWine || (isDefault && process.platform === "linux")) {
|
|
26
|
+
return { execPath: "wine", env: defaultEnv };
|
|
27
|
+
}
|
|
28
|
+
let toolsetPath;
|
|
29
|
+
let execSubPath;
|
|
30
|
+
if (typeof wine === "object" && wine != null) {
|
|
31
|
+
toolsetPath = await getCustomToolsetPath(wine, resourcesDir);
|
|
32
|
+
// Custom bundles: probe for the wine binary location
|
|
33
|
+
execSubPath = (await exists(path.join(toolsetPath, "bin", "wine"))) ? "bin/wine" : "bin/wine64";
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// isDefault on macOS → download the legacy wine-4.0.1-mac bundle
|
|
37
|
+
toolsetPath = await downloadBuilderToolset({
|
|
38
|
+
releaseName: "wine-4.0.1-mac",
|
|
39
|
+
filenameWithExt: "wine-4.0.1-mac.7z",
|
|
40
|
+
checksums: wineToolsChecksums["0.0.0"],
|
|
41
|
+
githubOrgRepo: "electron-userland/electron-builder-binaries",
|
|
42
|
+
});
|
|
43
|
+
execSubPath = path.join("bin", "wine64");
|
|
44
|
+
}
|
|
45
|
+
const { execPath, winePrefix, wineLibPath } = await createWineEnvironment(toolsetPath, execSubPath);
|
|
46
|
+
return {
|
|
47
|
+
execPath,
|
|
48
|
+
env: {
|
|
49
|
+
...defaultEnv,
|
|
50
|
+
WINEPREFIX: winePrefix,
|
|
51
|
+
DYLD_FALLBACK_LIBRARY_PATH: [wineLibPath, process.env.DYLD_FALLBACK_LIBRARY_PATH].filter(Boolean).join(path.delimiter),
|
|
52
|
+
LD_LIBRARY_PATH: [wineLibPath, process.env.LD_LIBRARY_PATH].filter(Boolean).join(path.delimiter),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
async function createWineEnvironment(toolsetPath, execSubPath) {
|
|
57
|
+
const sanitizedWinePath = sanitizeDirPath(toolsetPath);
|
|
58
|
+
const execPath = path.resolve(sanitizedWinePath, execSubPath);
|
|
59
|
+
const winePrefix = path.resolve(sanitizedWinePath, "wine-home");
|
|
60
|
+
for (const p of [execPath, winePrefix]) {
|
|
61
|
+
if (!(await exists(p))) {
|
|
62
|
+
throw new InvalidConfigurationError(`Wine toolset at "${toolsetPath}" is missing expected path: ${p}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Modern bundles ship a `lib` dir; the legacy wine-4.0.1-mac bundle ships `lib64` instead.
|
|
66
|
+
let wineLibPath = null;
|
|
67
|
+
for (const libDir of ["lib", "lib64"]) {
|
|
68
|
+
const candidate = path.resolve(sanitizedWinePath, libDir);
|
|
69
|
+
if (await exists(candidate)) {
|
|
70
|
+
wineLibPath = candidate;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (wineLibPath == null) {
|
|
75
|
+
throw new InvalidConfigurationError(`Wine toolset at "${toolsetPath}" is missing expected library directory (lib or lib64)`);
|
|
76
|
+
}
|
|
77
|
+
return { execPath, winePrefix, wineLibPath };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=wine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wine.js","sourceRoot":"","sources":["../../src/toolsets/wine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACjF,OAAO,KAAK,IAAI,MAAM,MAAM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,EAAE,UAAU,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,yBAAyB,CAAC,oBAAoB,WAAW,+BAA+B,CAAC,EAAE,CAAC,CAAA;QACxG,CAAC;IACH,CAAC;IAED,2FAA2F;IAC3F,IAAI,WAAW,GAAkB,IAAI,CAAA;IACrC,KAAK,MAAM,MAAM,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;QACzD,IAAI,MAAM,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,WAAW,GAAG,SAAS,CAAA;YACvB,MAAK;QACP,CAAC;IACH,CAAC;IACD,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,IAAI,yBAAyB,CAAC,oBAAoB,WAAW,wDAAwD,CAAC,CAAA;IAC9H,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA;AAC9C,CAAC","sourcesContent":["import { exists, InvalidConfigurationError, sanitizeDirPath } from \"builder-util\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { isUseSystemWine } from \"../util/flags.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\n\nconst wineToolsChecksums: Record<string, Record<string, string>> = {\n \"0.0.0\": {\n \"wine-4.0.1-mac.7z\": \"1baac808a67975b68b9226beea7b64ad0acc3e598a4b45c25bb5d2ae8cac655e\",\n },\n \"1.0.1\": {\n \"wine-11.0-darwin-x86_64.tar.xz\": \"0a4a43867ef225c70ed8d4198aaba24a55cb0e52e5d67b0ac99563e6351a3c61\",\n \"wine-11.0-linux-x86_64.tar.xz\": \"d8cf95442957b75c07166540142c96d8f7be6a68a572cc656194e7b42e8a0f13\",\n },\n}\n\nexport async function getWineToolset(wine: ToolsetConfig[\"wine\"], resourcesDir: string): Promise<{ execPath: string; env: Record<string, string> }> {\n if (process.platform === \"win32\") {\n throw new InvalidConfigurationError(`Wine toolset is not supported on Windows, but got: ${wine}`)\n }\n\n const defaultEnv = { WINEDEBUG: \"-all,err+all\", WINEDLLOVERRIDES: \"winemenubuilder.exe=d\" }\n\n // null / undefined / \"0.0.0\" all mean \"default wine\" — always use system wine on Linux\n // and use the legacy macOS bundle on darwin. Only an explicit ToolsetCustom object\n // (or a future non-legacy string version) triggers a bundle download.\n const useSystemWine = isUseSystemWine()\n const isDefault = wine == null || wine === \"0.0.0\"\n\n if (useSystemWine || (isDefault && process.platform === \"linux\")) {\n return { execPath: \"wine\", env: defaultEnv }\n }\n\n let toolsetPath: string\n let execSubPath: string\n\n if (typeof wine === \"object\" && wine != null) {\n toolsetPath = await getCustomToolsetPath(wine, resourcesDir)\n // Custom bundles: probe for the wine binary location\n execSubPath = (await exists(path.join(toolsetPath, \"bin\", \"wine\"))) ? \"bin/wine\" : \"bin/wine64\"\n } else {\n // isDefault on macOS → download the legacy wine-4.0.1-mac bundle\n toolsetPath = await downloadBuilderToolset({\n releaseName: \"wine-4.0.1-mac\",\n filenameWithExt: \"wine-4.0.1-mac.7z\",\n checksums: wineToolsChecksums[\"0.0.0\"],\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n execSubPath = path.join(\"bin\", \"wine64\")\n }\n\n const { execPath, winePrefix, wineLibPath } = await createWineEnvironment(toolsetPath, execSubPath)\n return {\n execPath,\n env: {\n ...defaultEnv,\n WINEPREFIX: winePrefix,\n DYLD_FALLBACK_LIBRARY_PATH: [wineLibPath, process.env.DYLD_FALLBACK_LIBRARY_PATH].filter(Boolean).join(path.delimiter),\n LD_LIBRARY_PATH: [wineLibPath, process.env.LD_LIBRARY_PATH].filter(Boolean).join(path.delimiter),\n },\n }\n}\n\nasync function createWineEnvironment(toolsetPath: string, execSubPath: string) {\n const sanitizedWinePath = sanitizeDirPath(toolsetPath)\n\n const execPath = path.resolve(sanitizedWinePath, execSubPath)\n const winePrefix = path.resolve(sanitizedWinePath, \"wine-home\")\n\n for (const p of [execPath, winePrefix]) {\n if (!(await exists(p))) {\n throw new InvalidConfigurationError(`Wine toolset at \"${toolsetPath}\" is missing expected path: ${p}`)\n }\n }\n\n // Modern bundles ship a `lib` dir; the legacy wine-4.0.1-mac bundle ships `lib64` instead.\n let wineLibPath: string | null = null\n for (const libDir of [\"lib\", \"lib64\"]) {\n const candidate = path.resolve(sanitizedWinePath, libDir)\n if (await exists(candidate)) {\n wineLibPath = candidate\n break\n }\n }\n if (wineLibPath == null) {\n throw new InvalidConfigurationError(`Wine toolset at \"${toolsetPath}\" is missing expected library directory (lib or lib64)`)\n }\n\n return { execPath, winePrefix, wineLibPath }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Filter } from "builder-util";
|
|
2
|
+
import fsExtra from "fs-extra";
|
|
3
|
+
import { FileMatcher } from "../fileMatcher.js";
|
|
4
|
+
import { PlatformPackager } from "../platformPackager.js";
|
|
5
|
+
export declare abstract class FileCopyHelper {
|
|
6
|
+
protected readonly matcher: FileMatcher;
|
|
7
|
+
readonly filter: Filter | null;
|
|
8
|
+
protected readonly packager: PlatformPackager<any>;
|
|
9
|
+
readonly metadata: Map<string, fsExtra.Stats>;
|
|
10
|
+
protected constructor(matcher: FileMatcher, filter: Filter | null, packager: PlatformPackager<any>);
|
|
11
|
+
protected handleFile(file: string, parent: string, fileStat: fsExtra.Stats): Promise<fsExtra.Stats | null> | null;
|
|
12
|
+
private handleSymlink;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=AppFileWalker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppFileWalker.d.ts","sourceRoot":"","sources":["../../src/util/AppFileWalker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAe,MAAM,cAAc,CAAA;AAChE,OAAO,OAAO,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AASzD,8BAAsB,cAAc;IAIhC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAC9B,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC;IALpD,QAAQ,CAAC,QAAQ,6BAAmC;IAEpD,SAAS,aACY,OAAO,EAAE,WAAW,EAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,EACX,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAGpD,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI;IAWjH,OAAO,CAAC,aAAa;CAgBtB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import fsExtra from "fs-extra";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
function addAllPatternIfNeed(matcher) {
|
|
4
|
+
if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {
|
|
5
|
+
matcher.prependPattern("**/*");
|
|
6
|
+
}
|
|
7
|
+
return matcher;
|
|
8
|
+
}
|
|
9
|
+
export class FileCopyHelper {
|
|
10
|
+
constructor(matcher, filter, packager) {
|
|
11
|
+
this.matcher = matcher;
|
|
12
|
+
this.filter = filter;
|
|
13
|
+
this.packager = packager;
|
|
14
|
+
this.metadata = new Map();
|
|
15
|
+
}
|
|
16
|
+
handleFile(file, parent, fileStat) {
|
|
17
|
+
if (!fileStat.isSymbolicLink()) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return fsExtra.readlink(file).then((linkTarget) => {
|
|
21
|
+
// http://unix.stackexchange.com/questions/105637/is-symlinks-target-relative-to-the-destinations-parent-directory-and-if-so-wh
|
|
22
|
+
return this.handleSymlink(fileStat, file, parent, linkTarget);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
handleSymlink(fileStat, file, parent, linkTarget) {
|
|
26
|
+
const resolvedLinkTarget = path.resolve(parent, linkTarget);
|
|
27
|
+
const link = path.relative(this.matcher.from, resolvedLinkTarget);
|
|
28
|
+
if (link.startsWith("..")) {
|
|
29
|
+
// outside of project, linked module (https://github.com/electron-userland/electron-builder/issues/675)
|
|
30
|
+
return fsExtra.stat(resolvedLinkTarget).then(targetFileStat => {
|
|
31
|
+
this.metadata.set(file, targetFileStat);
|
|
32
|
+
return targetFileStat;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const s = fileStat;
|
|
37
|
+
s.relativeLink = link;
|
|
38
|
+
s.linkRelativeToFile = path.relative(parent, resolvedLinkTarget);
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function createAppFilter(matcher, packager) {
|
|
44
|
+
if (packager.areNodeModulesHandledExternally) {
|
|
45
|
+
return matcher.isEmpty() ? null : matcher.createFilter();
|
|
46
|
+
}
|
|
47
|
+
return matcher.createFilter();
|
|
48
|
+
}
|
|
49
|
+
/** @internal */
|
|
50
|
+
export class AppFileWalker extends FileCopyHelper {
|
|
51
|
+
constructor(matcher, packager) {
|
|
52
|
+
super(addAllPatternIfNeed(matcher), createAppFilter(matcher, packager), packager);
|
|
53
|
+
this.matcherFilter = matcher.createFilter();
|
|
54
|
+
}
|
|
55
|
+
// noinspection JSUnusedGlobalSymbols
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
57
|
+
consume(file, fileStat, parent, siblingNames) {
|
|
58
|
+
if (fileStat.isDirectory()) {
|
|
59
|
+
const matchesFilter = this.matcherFilter(file, fileStat);
|
|
60
|
+
return !matchesFilter;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// save memory - no need to store stat for directory
|
|
64
|
+
this.metadata.set(file, fileStat);
|
|
65
|
+
}
|
|
66
|
+
return this.handleFile(file, parent, fileStat);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=AppFileWalker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppFileWalker.js","sourceRoot":"","sources":["../../src/util/AppFileWalker.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAI5B,SAAS,mBAAmB,CAAC,OAAoB;IAC/C,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC;QAC5F,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,OAAgB,cAAc;IAGlC,YACqB,OAAoB,EAC9B,MAAqB,EACX,QAA+B;QAF/B,YAAO,GAAP,OAAO,CAAa;QAC9B,WAAM,GAAN,MAAM,CAAe;QACX,aAAQ,GAAR,QAAQ,CAAuB;QAL3C,aAAQ,GAAG,IAAI,GAAG,EAAyB,CAAA;IAMjD,CAAC;IAEM,UAAU,CAAC,IAAY,EAAE,MAAc,EAAE,QAAuB;QACxE,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAO,EAAE;YACrD,+HAA+H;YAC/H,OAAO,IAAI,CAAC,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,QAA+B;QAC/D,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;QACjF,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,EAAE,CAAA;IAC7C,CAAC;IAED,qCAAqC;IACrC,6DAA6D;IAC7D,OAAO,CAAC,IAAY,EAAE,QAAuB,EAAE,MAAc,EAAE,YAA2B;QACxF,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;YAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;YACxD,OAAO,CAAC,aAAa,CAAA;QACvB,CAAC;aAAM,CAAC;YACN,oDAAoD;YACpD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACnC,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["import { FileConsumer, Filter, FilterStats } from \"builder-util\"\nimport fsExtra from \"fs-extra\"\nimport * as path from \"path\"\nimport { FileMatcher } from \"../fileMatcher.js\"\nimport { PlatformPackager } from \"../platformPackager.js\"\n\nfunction addAllPatternIfNeed(matcher: FileMatcher) {\n if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {\n matcher.prependPattern(\"**/*\")\n }\n return matcher\n}\n\nexport abstract class FileCopyHelper {\n readonly metadata = new Map<string, fsExtra.Stats>()\n\n protected constructor(\n protected readonly matcher: FileMatcher,\n readonly filter: Filter | null,\n protected readonly packager: PlatformPackager<any>\n ) {}\n\n protected handleFile(file: string, parent: string, fileStat: fsExtra.Stats): Promise<fsExtra.Stats | null> | null {\n if (!fileStat.isSymbolicLink()) {\n return null\n }\n\n return fsExtra.readlink(file).then((linkTarget): any => {\n // http://unix.stackexchange.com/questions/105637/is-symlinks-target-relative-to-the-destinations-parent-directory-and-if-so-wh\n return this.handleSymlink(fileStat, file, parent, linkTarget)\n })\n }\n\n private handleSymlink(fileStat: fsExtra.Stats, file: string, parent: string, linkTarget: string): Promise<fsExtra.Stats> | null {\n const resolvedLinkTarget = path.resolve(parent, linkTarget)\n const link = path.relative(this.matcher.from, resolvedLinkTarget)\n if (link.startsWith(\"..\")) {\n // outside of project, linked module (https://github.com/electron-userland/electron-builder/issues/675)\n return fsExtra.stat(resolvedLinkTarget).then(targetFileStat => {\n this.metadata.set(file, targetFileStat)\n return targetFileStat\n })\n } else {\n const s: FilterStats = fileStat\n s.relativeLink = link\n s.linkRelativeToFile = path.relative(parent, resolvedLinkTarget)\n }\n return null\n }\n}\n\nfunction createAppFilter(matcher: FileMatcher, packager: PlatformPackager<any>): Filter | null {\n if (packager.areNodeModulesHandledExternally) {\n return matcher.isEmpty() ? null : matcher.createFilter()\n }\n return matcher.createFilter()\n}\n\n/** @internal */\nexport class AppFileWalker extends FileCopyHelper implements FileConsumer {\n readonly matcherFilter: any\n constructor(matcher: FileMatcher, packager: PlatformPackager<any>) {\n super(addAllPatternIfNeed(matcher), createAppFilter(matcher, packager), packager)\n this.matcherFilter = matcher.createFilter()\n }\n\n // noinspection JSUnusedGlobalSymbols\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n consume(file: string, fileStat: fsExtra.Stats, parent: string, siblingNames: Array<string>): any {\n if (fileStat.isDirectory()) {\n const matchesFilter = this.matcherFilter(file, fileStat)\n return !matchesFilter\n } else {\n // save memory - no need to store stat for directory\n this.metadata.set(file, fileStat)\n }\n\n return this.handleFile(file, parent, fileStat)\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeModuleCopyHelper.d.ts","sourceRoot":"","sources":["../../src/util/NodeModuleCopyHelper.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { MAX_FILE_REQUESTS } from "builder-util";
|
|
2
|
+
import { realpathSync } from "fs";
|
|
3
|
+
import fsExtra from "fs-extra";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import asyncPool from "tiny-async-pool";
|
|
6
|
+
import { excludedNames } from "../fileMatcher.js";
|
|
7
|
+
import { FileCopyHelper } from "./AppFileWalker.js";
|
|
8
|
+
import { resolveFunction } from "./resolve.js";
|
|
9
|
+
const excludedFiles = new Set([
|
|
10
|
+
".DS_Store",
|
|
11
|
+
"node_modules" /* already in the queue */,
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"ChangeLog",
|
|
14
|
+
"changelog.md",
|
|
15
|
+
"Changelog.md",
|
|
16
|
+
"Changelog",
|
|
17
|
+
"binding.gyp",
|
|
18
|
+
".npmignore",
|
|
19
|
+
"node_gyp_bins",
|
|
20
|
+
].concat(excludedNames.split(",")));
|
|
21
|
+
const topLevelExcludedFiles = new Set([
|
|
22
|
+
"karma.conf.js",
|
|
23
|
+
".coveralls.yml",
|
|
24
|
+
"README.md",
|
|
25
|
+
"readme.markdown",
|
|
26
|
+
"README",
|
|
27
|
+
"readme.md",
|
|
28
|
+
"Readme.md",
|
|
29
|
+
"Readme",
|
|
30
|
+
"readme",
|
|
31
|
+
"test",
|
|
32
|
+
"tests",
|
|
33
|
+
"__tests__",
|
|
34
|
+
"powered-test",
|
|
35
|
+
"example",
|
|
36
|
+
"examples",
|
|
37
|
+
".bin",
|
|
38
|
+
]);
|
|
39
|
+
/** @internal */
|
|
40
|
+
export class NodeModuleCopyHelper extends FileCopyHelper {
|
|
41
|
+
constructor(matcher, packager) {
|
|
42
|
+
super(matcher, matcher.isEmpty() ? null : matcher.createFilter(), packager);
|
|
43
|
+
}
|
|
44
|
+
async collectNodeModules(moduleInfo, nodeModuleExcludedExts, destination) {
|
|
45
|
+
const filter = this.filter;
|
|
46
|
+
const metadata = this.metadata;
|
|
47
|
+
const onNodeModuleFile = await resolveFunction(this.packager.appInfo.type, this.packager.config.onNodeModuleFile, "onNodeModuleFile", await this.packager.getWorkspaceRoot());
|
|
48
|
+
const result = [];
|
|
49
|
+
const queue = [];
|
|
50
|
+
const emptyDirs = new Set();
|
|
51
|
+
const symlinkFiles = new Map();
|
|
52
|
+
const tmpPath = moduleInfo.dir;
|
|
53
|
+
const moduleName = moduleInfo.name;
|
|
54
|
+
queue.length = 1;
|
|
55
|
+
// The path should be corrected in Windows that when the moduleName is Scoped packages named.
|
|
56
|
+
const depPath = path.normalize(tmpPath);
|
|
57
|
+
queue[0] = depPath;
|
|
58
|
+
while (queue.length > 0) {
|
|
59
|
+
const dirPath = queue.pop();
|
|
60
|
+
const childNames = await fsExtra.readdir(dirPath);
|
|
61
|
+
childNames.sort();
|
|
62
|
+
const isTopLevel = dirPath === depPath;
|
|
63
|
+
const dirs = [];
|
|
64
|
+
// our handler is async, but we should add sorted files, so, we add file to result not in the mapper, but after map
|
|
65
|
+
const sortedFilePaths = await asyncPool(MAX_FILE_REQUESTS, childNames, async (name) => {
|
|
66
|
+
const filePath = path.join(dirPath, name);
|
|
67
|
+
const forceIncluded = onNodeModuleFile != null && !!onNodeModuleFile(filePath);
|
|
68
|
+
if (excludedFiles.has(name) || name.startsWith("._")) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
// check if filematcher matches the files array as more important than the default excluded files.
|
|
72
|
+
const fileMatched = filter != null && filter(dirPath, fsExtra.lstatSync(dirPath));
|
|
73
|
+
if (!fileMatched || !forceIncluded || !!this.packager.config.disableDefaultIgnoredFiles) {
|
|
74
|
+
for (const ext of nodeModuleExcludedExts) {
|
|
75
|
+
if (name.endsWith(ext)) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// noinspection SpellCheckingInspection
|
|
80
|
+
if (isTopLevel && (topLevelExcludedFiles.has(name) || (moduleName === "libui-node" && (name === "build" || name === "docs" || name === "src")))) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
if (dirPath.endsWith("build")) {
|
|
84
|
+
if (name === "gyp-mac-tool" || name === "Makefile" || name.endsWith(".mk") || name.endsWith(".gypi") || name.endsWith(".Makefile")) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (dirPath.endsWith("Release") && (name === ".deps" || name === "obj.target")) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
else if (name === "src" && (dirPath.endsWith("keytar") || dirPath.endsWith("keytar-prebuild"))) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
else if (dirPath.endsWith("lzma-native") && (name === "build" || name === "deps")) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return fsExtra.lstat(filePath).then((stat) => {
|
|
99
|
+
stat.moduleName = moduleName;
|
|
100
|
+
stat.moduleRootPath = destination;
|
|
101
|
+
stat.moduleFullFilePath = path.join(destination, path.relative(depPath, filePath));
|
|
102
|
+
if (filter != null && !filter(filePath, stat)) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
if (!stat.isDirectory()) {
|
|
106
|
+
metadata.set(filePath, stat);
|
|
107
|
+
}
|
|
108
|
+
const consumerResult = this.handleFile(filePath, dirPath, stat);
|
|
109
|
+
if (consumerResult == null) {
|
|
110
|
+
if (stat.isDirectory()) {
|
|
111
|
+
dirs.push(name);
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
return filePath;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return consumerResult.then(it => {
|
|
120
|
+
// asarUtil can return modified stat (symlink handling)
|
|
121
|
+
if ((it == null ? stat : it).isDirectory()) {
|
|
122
|
+
dirs.push(name);
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return filePath;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
let isEmpty = true;
|
|
133
|
+
for (const child of sortedFilePaths) {
|
|
134
|
+
if (child != null) {
|
|
135
|
+
result.push(child);
|
|
136
|
+
if (this.metadata.get(child)?.isSymbolicLink()) {
|
|
137
|
+
symlinkFiles.set(child, result.length - 1);
|
|
138
|
+
}
|
|
139
|
+
isEmpty = false;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (isEmpty) {
|
|
143
|
+
emptyDirs.add(dirPath);
|
|
144
|
+
}
|
|
145
|
+
dirs.sort();
|
|
146
|
+
for (const child of dirs) {
|
|
147
|
+
queue.push(dirPath + path.sep + child);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
for (const [file, index] of symlinkFiles) {
|
|
151
|
+
const resolvedPath = realpathSync(file);
|
|
152
|
+
if (emptyDirs.has(resolvedPath)) {
|
|
153
|
+
// delete symlink file if target is a empty dir
|
|
154
|
+
result[index] = undefined;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return result.filter((it) => it !== undefined);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=NodeModuleCopyHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeModuleCopyHelper.js","sourceRoot":"","sources":["../../src/util/NodeModuleCopyHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACjC,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAe,MAAM,mBAAmB,CAAA;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,MAAM,aAAa,GAAG,IAAI,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,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAA;IAC9D,CAAC;CACF","sourcesContent":["import { FilterStats, MAX_FILE_REQUESTS } from \"builder-util\"\nimport { realpathSync } from \"fs\"\nimport fsExtra from \"fs-extra\"\nimport * as path from \"path\"\nimport asyncPool from \"tiny-async-pool\"\nimport { excludedNames, FileMatcher } from \"../fileMatcher.js\"\nimport { PlatformPackager } from \"../platformPackager.js\"\nimport { FileCopyHelper } from \"./AppFileWalker.js\"\nimport { NodeModuleInfo } from \"../node-module-collector/types.js\"\nimport { resolveFunction } from \"./resolve.js\"\n\nconst excludedFiles = new Set(\n [\n \".DS_Store\",\n \"node_modules\" /* already in the queue */,\n \"CHANGELOG.md\",\n \"ChangeLog\",\n \"changelog.md\",\n \"Changelog.md\",\n \"Changelog\",\n \"binding.gyp\",\n \".npmignore\",\n \"node_gyp_bins\",\n ].concat(excludedNames.split(\",\"))\n)\n\nconst topLevelExcludedFiles = new Set([\n \"karma.conf.js\",\n \".coveralls.yml\",\n \"README.md\",\n \"readme.markdown\",\n \"README\",\n \"readme.md\",\n \"Readme.md\",\n \"Readme\",\n \"readme\",\n \"test\",\n \"tests\",\n \"__tests__\",\n \"powered-test\",\n \"example\",\n \"examples\",\n \".bin\",\n])\n\n/** @internal */\nexport class NodeModuleCopyHelper extends FileCopyHelper {\n constructor(matcher: FileMatcher, packager: PlatformPackager<any>) {\n super(matcher, matcher.isEmpty() ? null : matcher.createFilter(), packager)\n }\n\n async collectNodeModules(moduleInfo: NodeModuleInfo, nodeModuleExcludedExts: Array<string>, destination: string): Promise<Array<string>> {\n const filter = this.filter\n const metadata = this.metadata\n\n const onNodeModuleFile = await resolveFunction(this.packager.appInfo.type, this.packager.config.onNodeModuleFile, \"onNodeModuleFile\", await this.packager.getWorkspaceRoot())\n\n const result: Array<string | undefined> = []\n const queue: Array<string> = []\n const emptyDirs: Set<string> = new Set()\n const symlinkFiles: Map<string, number> = new Map()\n const tmpPath = moduleInfo.dir\n const moduleName = moduleInfo.name\n queue.length = 1\n // The path should be corrected in Windows that when the moduleName is Scoped packages named.\n const depPath = path.normalize(tmpPath)\n queue[0] = depPath\n\n while (queue.length > 0) {\n const dirPath = queue.pop()!\n\n const childNames = await fsExtra.readdir(dirPath)\n childNames.sort()\n\n const isTopLevel = dirPath === depPath\n const dirs: Array<string> = []\n // our handler is async, but we should add sorted files, so, we add file to result not in the mapper, but after map\n const sortedFilePaths = await asyncPool(MAX_FILE_REQUESTS, childNames, async name => {\n const filePath = path.join(dirPath, name)\n\n const forceIncluded = onNodeModuleFile != null && !!onNodeModuleFile(filePath)\n\n if (excludedFiles.has(name) || name.startsWith(\"._\")) {\n return null\n }\n\n // check if filematcher matches the files array as more important than the default excluded files.\n const fileMatched = filter != null && filter(dirPath, fsExtra.lstatSync(dirPath))\n if (!fileMatched || !forceIncluded || !!this.packager.config.disableDefaultIgnoredFiles) {\n for (const ext of nodeModuleExcludedExts) {\n if (name.endsWith(ext)) {\n return null\n }\n }\n\n // noinspection SpellCheckingInspection\n if (isTopLevel && (topLevelExcludedFiles.has(name) || (moduleName === \"libui-node\" && (name === \"build\" || name === \"docs\" || name === \"src\")))) {\n return null\n }\n\n if (dirPath.endsWith(\"build\")) {\n if (name === \"gyp-mac-tool\" || name === \"Makefile\" || name.endsWith(\".mk\") || name.endsWith(\".gypi\") || name.endsWith(\".Makefile\")) {\n return null\n }\n } else if (dirPath.endsWith(\"Release\") && (name === \".deps\" || name === \"obj.target\")) {\n return null\n } else if (name === \"src\" && (dirPath.endsWith(\"keytar\") || dirPath.endsWith(\"keytar-prebuild\"))) {\n return null\n } else if (dirPath.endsWith(\"lzma-native\") && (name === \"build\" || name === \"deps\")) {\n return null\n }\n }\n\n return fsExtra.lstat(filePath).then((stat: FilterStats) => {\n stat.moduleName = moduleName\n stat.moduleRootPath = destination\n stat.moduleFullFilePath = path.join(destination, path.relative(depPath, filePath))\n if (filter != null && !filter(filePath, stat)) {\n return null\n }\n\n if (!stat.isDirectory()) {\n metadata.set(filePath, stat)\n }\n const consumerResult = this.handleFile(filePath, dirPath, stat)\n if (consumerResult == null) {\n if (stat.isDirectory()) {\n dirs.push(name)\n return null\n } else {\n return filePath\n }\n } else {\n return consumerResult.then(it => {\n // asarUtil can return modified stat (symlink handling)\n if ((it == null ? stat : it).isDirectory()) {\n dirs.push(name)\n return null\n } else {\n return filePath\n }\n })\n }\n })\n })\n\n let isEmpty = true\n for (const child of sortedFilePaths) {\n if (child != null) {\n result.push(child)\n if (this.metadata.get(child)?.isSymbolicLink()) {\n symlinkFiles.set(child, result.length - 1)\n }\n isEmpty = false\n }\n }\n\n if (isEmpty) {\n emptyDirs.add(dirPath)\n }\n\n dirs.sort()\n for (const child of dirs) {\n queue.push(dirPath + path.sep + child)\n }\n }\n\n for (const [file, index] of symlinkFiles) {\n const resolvedPath = realpathSync(file)\n if (emptyDirs.has(resolvedPath)) {\n // delete symlink file if target is a empty dir\n result[index] = undefined\n }\n }\n return result.filter((it): it is string => it !== undefined)\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FileTransformer } from "builder-util";
|
|
2
|
+
import { Stats } from "fs";
|
|
3
|
+
import { FileMatcher } from "../fileMatcher.js";
|
|
4
|
+
import { Packager } from "../packager.js";
|
|
5
|
+
import { PlatformPackager } from "../platformPackager.js";
|
|
6
|
+
export declare function getDestinationPath(file: string, fileSet: ResolvedFileSet): string;
|
|
7
|
+
export declare function copyAppFiles(fileSet: ResolvedFileSet, packager: Packager, transformer: FileTransformer): Promise<void>;
|
|
8
|
+
export interface ResolvedFileSet {
|
|
9
|
+
src: string;
|
|
10
|
+
destination: string;
|
|
11
|
+
files: Array<string>;
|
|
12
|
+
metadata: Map<string, Stats>;
|
|
13
|
+
transformedFiles?: Map<number, string | Buffer> | null;
|
|
14
|
+
}
|
|
15
|
+
export declare function transformFiles(transformer: FileTransformer, fileSet: ResolvedFileSet): Promise<void>;
|
|
16
|
+
export declare function computeFileSets(matchers: Array<FileMatcher>, transformer: FileTransformer | null, platformPackager: PlatformPackager<any>): Promise<Array<ResolvedFileSet>>;
|
|
17
|
+
//# sourceMappingURL=appFileCopier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appFileCopier.d.ts","sourceRoot":"","sources":["../../src/util/appFileCopier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,eAAe,EAAmE,MAAM,cAAc,CAAA;AAC7I,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAA;AAO1B,OAAO,EAAgB,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAKzD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,UAYxE;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,iBAyC5G;AAGD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IAEnB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC5B,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAAA;CACvD;AAGD,wBAAsB,cAAc,CAAC,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC1G;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,eAAe,GAAG,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAkBjL"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { AsyncTaskManager, FileCopier, isEmptyOrSpaces, log, MAX_FILE_REQUESTS, statOrNull, walk } from "builder-util";
|
|
2
|
+
import fsExtra from "fs-extra";
|
|
3
|
+
import { mkdir, readlink } from "fs/promises";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import asyncPool from "tiny-async-pool";
|
|
6
|
+
import { isLibOrExe } from "../asar/unpackDetector.js";
|
|
7
|
+
import { Platform } from "../core.js";
|
|
8
|
+
import { excludedExts, FileMatcher } from "../fileMatcher.js";
|
|
9
|
+
import { getCollectorByPackageManager, PM } from "../node-module-collector/index.js";
|
|
10
|
+
import { logMessageLevelByKey } from "../node-module-collector/moduleManager.js";
|
|
11
|
+
import { AppFileWalker } from "./AppFileWalker.js";
|
|
12
|
+
import { NodeModuleCopyHelper } from "./NodeModuleCopyHelper.js";
|
|
13
|
+
export function getDestinationPath(file, fileSet) {
|
|
14
|
+
if (file === fileSet.src) {
|
|
15
|
+
return fileSet.destination;
|
|
16
|
+
}
|
|
17
|
+
const src = fileSet.src;
|
|
18
|
+
const dest = fileSet.destination;
|
|
19
|
+
// get node_modules path relative to src and then append to dest
|
|
20
|
+
if (file.startsWith(src)) {
|
|
21
|
+
return path.join(dest, path.relative(src, file));
|
|
22
|
+
}
|
|
23
|
+
return dest;
|
|
24
|
+
}
|
|
25
|
+
export async function copyAppFiles(fileSet, packager, transformer) {
|
|
26
|
+
const metadata = fileSet.metadata;
|
|
27
|
+
// search auto unpacked dir
|
|
28
|
+
const taskManager = new AsyncTaskManager(packager.cancellationToken);
|
|
29
|
+
const createdParentDirs = new Set();
|
|
30
|
+
const fileCopier = new FileCopier(file => {
|
|
31
|
+
return !isLibOrExe(file);
|
|
32
|
+
}, transformer);
|
|
33
|
+
const links = [];
|
|
34
|
+
for (let i = 0, n = fileSet.files.length; i < n; i++) {
|
|
35
|
+
const sourceFile = fileSet.files[i];
|
|
36
|
+
const stat = metadata.get(sourceFile);
|
|
37
|
+
if (stat == null) {
|
|
38
|
+
// dir
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const destinationFile = getDestinationPath(sourceFile, fileSet);
|
|
42
|
+
if (stat.isSymbolicLink()) {
|
|
43
|
+
links.push({ file: destinationFile, link: await readlink(sourceFile) });
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const fileParent = path.dirname(destinationFile);
|
|
47
|
+
if (!createdParentDirs.has(fileParent)) {
|
|
48
|
+
createdParentDirs.add(fileParent);
|
|
49
|
+
await mkdir(fileParent, { recursive: true });
|
|
50
|
+
}
|
|
51
|
+
taskManager.addTask(fileCopier.copy(sourceFile, destinationFile, stat));
|
|
52
|
+
if (taskManager.tasks.length > MAX_FILE_REQUESTS) {
|
|
53
|
+
await taskManager.awaitTasks();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (taskManager.tasks.length > 0) {
|
|
57
|
+
await taskManager.awaitTasks();
|
|
58
|
+
}
|
|
59
|
+
await asyncPool(MAX_FILE_REQUESTS, links, it => fsExtra.ensureSymlink(it.link, it.file));
|
|
60
|
+
}
|
|
61
|
+
// used only for ASAR, if no asar, file transformed on the fly
|
|
62
|
+
export async function transformFiles(transformer, fileSet) {
|
|
63
|
+
if (transformer == null) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let transformedFiles = fileSet.transformedFiles;
|
|
67
|
+
if (fileSet.transformedFiles == null) {
|
|
68
|
+
transformedFiles = new Map();
|
|
69
|
+
fileSet.transformedFiles = transformedFiles;
|
|
70
|
+
}
|
|
71
|
+
const metadata = fileSet.metadata;
|
|
72
|
+
const filesPromise = fileSet.files.map(async (it, index) => {
|
|
73
|
+
const fileStat = metadata.get(it);
|
|
74
|
+
if (fileStat == null || !fileStat.isFile()) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const transformedValue = transformer(it);
|
|
78
|
+
if (transformedValue == null) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (typeof transformedValue === "object" && "then" in transformedValue) {
|
|
82
|
+
return transformedValue.then(it => {
|
|
83
|
+
if (it != null) {
|
|
84
|
+
transformedFiles.set(index, it);
|
|
85
|
+
}
|
|
86
|
+
return;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
transformedFiles.set(index, transformedValue);
|
|
90
|
+
return;
|
|
91
|
+
});
|
|
92
|
+
// `asyncPool` doesn't provide `index` in it's handler, so we `map` first before using it
|
|
93
|
+
await asyncPool(MAX_FILE_REQUESTS, filesPromise, promise => promise);
|
|
94
|
+
}
|
|
95
|
+
export async function computeFileSets(matchers, transformer, platformPackager) {
|
|
96
|
+
const fileSets = [];
|
|
97
|
+
for (const matcher of matchers) {
|
|
98
|
+
const fileWalker = new AppFileWalker(matcher, platformPackager);
|
|
99
|
+
const fromStat = await statOrNull(matcher.from);
|
|
100
|
+
if (fromStat == null) {
|
|
101
|
+
log.debug({ directory: matcher.from, reason: "doesn't exist" }, `skipped copying`);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const files = await walk(matcher.from, fileWalker.filter, fileWalker);
|
|
105
|
+
const metadata = fileWalker.metadata;
|
|
106
|
+
fileSets.push(validateFileSet({ src: matcher.from, files, metadata, destination: matcher.to }));
|
|
107
|
+
}
|
|
108
|
+
return fileSets;
|
|
109
|
+
}
|
|
110
|
+
function getNodeModuleExcludedExts(platformPackager) {
|
|
111
|
+
// do not exclude *.h files (https://github.com/electron-userland/electron-builder/issues/2852)
|
|
112
|
+
const result = [".o", ".obj"].concat(excludedExts.split(",").map(it => `.${it}`));
|
|
113
|
+
if (platformPackager.config.includePdb !== true) {
|
|
114
|
+
result.push(".pdb");
|
|
115
|
+
}
|
|
116
|
+
if (platformPackager.platform !== Platform.WINDOWS) {
|
|
117
|
+
// https://github.com/electron-userland/electron-builder/issues/1738
|
|
118
|
+
result.push(".dll");
|
|
119
|
+
result.push(".exe");
|
|
120
|
+
}
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
function validateFileSet(fileSet) {
|
|
124
|
+
if (fileSet.src == null || fileSet.src.length === 0) {
|
|
125
|
+
throw new Error("fileset src is empty");
|
|
126
|
+
}
|
|
127
|
+
return fileSet;
|
|
128
|
+
}
|
|
129
|
+
/** @internal */
|
|
130
|
+
export async function computeNodeModuleFileSets(platformPackager, mainMatcher) {
|
|
131
|
+
const deps = await collectNodeModulesWithLogging(platformPackager);
|
|
132
|
+
const nodeModuleExcludedExts = getNodeModuleExcludedExts(platformPackager);
|
|
133
|
+
// serial execution because copyNodeModules is concurrent and so, no need to increase queue/pressure
|
|
134
|
+
const result = new Array();
|
|
135
|
+
let index = 0;
|
|
136
|
+
const NODE_MODULES = "node_modules";
|
|
137
|
+
const collectNodeModules = async (dep, destination) => {
|
|
138
|
+
const source = dep.dir;
|
|
139
|
+
const matcher = new FileMatcher(source, destination, mainMatcher.macroExpander, mainMatcher.patterns);
|
|
140
|
+
const copier = new NodeModuleCopyHelper(matcher, platformPackager);
|
|
141
|
+
const files = await copier.collectNodeModules(dep, nodeModuleExcludedExts, path.relative(mainMatcher.to, destination));
|
|
142
|
+
result[index++] = validateFileSet({ src: source, destination, files, metadata: copier.metadata });
|
|
143
|
+
log.debug({ dep: dep.name, from: log.filePath(source), to: log.filePath(destination), filesCount: files.length }, "identified module");
|
|
144
|
+
if (dep.dependencies) {
|
|
145
|
+
for (const c of dep.dependencies) {
|
|
146
|
+
await collectNodeModules(c, path.join(destination, NODE_MODULES, c.name));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
for (const dep of deps) {
|
|
151
|
+
const destination = path.join(mainMatcher.to, NODE_MODULES, dep.name);
|
|
152
|
+
await collectNodeModules(dep, destination);
|
|
153
|
+
}
|
|
154
|
+
return result;
|
|
155
|
+
}
|
|
156
|
+
async function collectNodeModulesWithLogging(platformPackager) {
|
|
157
|
+
const { tempDirManager, appDir, projectDir } = platformPackager;
|
|
158
|
+
let deps = undefined;
|
|
159
|
+
const searchDirectories = Array.from(new Set([appDir, projectDir, await platformPackager.getWorkspaceRoot()])).filter((it) => isEmptyOrSpaces(it) === false);
|
|
160
|
+
const pmApproaches = [await platformPackager.getPackageManager(), PM.TRAVERSAL];
|
|
161
|
+
for (const pm of pmApproaches) {
|
|
162
|
+
for (const dir of searchDirectories) {
|
|
163
|
+
log.info({ pm, searchDir: dir }, "searching for node modules");
|
|
164
|
+
const collector = getCollectorByPackageManager(pm, dir, tempDirManager);
|
|
165
|
+
deps = await collector.getNodeModules({ packageName: platformPackager.nodePackageName });
|
|
166
|
+
if (deps.nodeModules.length > 0) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
const attempt = searchDirectories.indexOf(dir);
|
|
170
|
+
if (attempt < searchDirectories.length - 1) {
|
|
171
|
+
log.info({ searchDir: dir, attempt }, "no node modules found in collection, trying next search directory");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (deps?.nodeModules?.length) {
|
|
175
|
+
log.debug({ pm, nodeModules: deps.nodeModules }, "collected node modules");
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (!deps?.nodeModules?.length) {
|
|
180
|
+
log.warn({ searchDirectories: searchDirectories.map(it => log.filePath(it)) }, "no node modules returned while searching directories");
|
|
181
|
+
return [];
|
|
182
|
+
}
|
|
183
|
+
const summary = Object.entries(deps.logSummary ?? {}).filter(([, dependencies]) => Array.isArray(dependencies) && dependencies.length > 0);
|
|
184
|
+
for (const [errorMessage, dependencies] of summary) {
|
|
185
|
+
const logLevel = logMessageLevelByKey[errorMessage] || "debug";
|
|
186
|
+
log[logLevel]({ dependencies }, errorMessage);
|
|
187
|
+
}
|
|
188
|
+
return deps.nodeModules;
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=appFileCopier.js.map
|