app-builder-lib 26.15.2 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Framework.d.ts +40 -0
- package/dist/Framework.d.ts.map +1 -0
- package/dist/Framework.js +4 -0
- package/dist/Framework.js.map +1 -0
- package/dist/appInfo.d.ts +32 -0
- package/dist/appInfo.d.ts.map +1 -0
- package/dist/appInfo.js +145 -0
- package/dist/appInfo.js.map +1 -0
- package/dist/asar/asar.d.ts +39 -0
- package/dist/asar/asar.d.ts.map +1 -0
- package/dist/asar/asar.js +155 -0
- package/dist/asar/asar.js.map +1 -0
- package/dist/asar/asarFileChecker.d.ts +3 -0
- package/dist/asar/asarFileChecker.d.ts.map +1 -0
- package/dist/asar/asarFileChecker.js +22 -0
- package/dist/asar/asarFileChecker.js.map +1 -0
- package/dist/asar/asarUtil.d.ts +2 -0
- package/dist/asar/asarUtil.d.ts.map +1 -0
- package/dist/asar/asarUtil.js +278 -0
- package/dist/asar/asarUtil.js.map +1 -0
- package/dist/asar/integrity.d.ts +16 -0
- package/dist/asar/integrity.d.ts.map +1 -0
- package/dist/asar/integrity.js +59 -0
- package/dist/asar/integrity.js.map +1 -0
- package/dist/asar/unpackDetector.d.ts +2 -0
- package/dist/asar/unpackDetector.d.ts.map +1 -0
- package/dist/asar/unpackDetector.js +39 -0
- package/dist/asar/unpackDetector.js.map +1 -0
- package/dist/codeSign/certInfo.d.ts +55 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -0
- package/dist/codeSign/certInfo.js +459 -0
- package/dist/codeSign/certInfo.js.map +1 -0
- package/dist/codeSign/codesign.d.ts +4 -0
- package/dist/codeSign/codesign.d.ts.map +1 -0
- package/dist/codeSign/codesign.js +32 -0
- package/dist/codeSign/codesign.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +29 -0
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -0
- package/dist/codeSign/mac/macCodeSign.js +273 -0
- package/dist/codeSign/mac/macCodeSign.js.map +1 -0
- package/dist/codeSign/signManager.d.ts +14 -0
- package/dist/codeSign/signManager.d.ts.map +1 -0
- package/dist/codeSign/signManager.js +2 -0
- package/dist/codeSign/signManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +8 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.js +34 -0
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +18 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.js +68 -0
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts +59 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.js +364 -0
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -0
- package/dist/configuration.d.ts +1010 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +2 -0
- package/dist/configuration.js.map +1 -0
- package/dist/core.d.ts +61 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +61 -0
- package/dist/core.js.map +1 -0
- package/dist/electron/ElectronFramework.d.ts +17 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -0
- package/dist/electron/ElectronFramework.js +236 -0
- package/dist/electron/ElectronFramework.js.map +1 -0
- package/dist/electron/electronVersion.d.ts +7 -0
- package/dist/electron/electronVersion.d.ts.map +1 -0
- package/dist/electron/electronVersion.js +119 -0
- package/dist/electron/electronVersion.js.map +1 -0
- package/dist/electron/injectFFMPEG.d.ts +12 -0
- package/dist/electron/injectFFMPEG.d.ts.map +1 -0
- package/dist/electron/injectFFMPEG.js +53 -0
- package/dist/electron/injectFFMPEG.js.map +1 -0
- package/dist/electron/mac/electronMac.d.ts +2 -0
- package/dist/electron/mac/electronMac.d.ts.map +1 -0
- package/dist/electron/mac/electronMac.js +254 -0
- package/dist/electron/mac/electronMac.js.map +1 -0
- package/dist/electron/search-module.d.ts +24 -0
- package/dist/electron/search-module.d.ts.map +1 -0
- package/dist/electron/search-module.js +68 -0
- package/dist/electron/search-module.js.map +1 -0
- package/dist/electron/win/electronWin.d.ts +2 -0
- package/dist/electron/win/electronWin.d.ts.map +1 -0
- package/dist/electron/win/electronWin.js +36 -0
- package/dist/electron/win/electronWin.js.map +1 -0
- package/dist/errorMessages.d.ts +2 -0
- package/dist/errorMessages.d.ts.map +1 -0
- package/dist/errorMessages.js +8 -0
- package/dist/errorMessages.js.map +1 -0
- package/dist/fileMatcher.d.ts +31 -0
- package/dist/fileMatcher.d.ts.map +1 -0
- package/dist/fileMatcher.js +277 -0
- package/dist/fileMatcher.js.map +1 -0
- package/dist/fileTransformer.d.ts +2 -0
- package/dist/fileTransformer.d.ts.map +1 -0
- package/dist/fileTransformer.js +82 -0
- package/dist/fileTransformer.js.map +1 -0
- package/dist/forge-maker.d.ts +6 -0
- package/dist/forge-maker.d.ts.map +1 -0
- package/dist/forge-maker.js +20 -0
- package/dist/forge-maker.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/indexInternal.d.ts +46 -0
- package/dist/indexInternal.d.ts.map +1 -0
- package/dist/indexInternal.js +39 -0
- package/dist/indexInternal.js.map +1 -0
- package/dist/linuxPackager.d.ts +13 -0
- package/dist/linuxPackager.d.ts.map +1 -0
- package/dist/linuxPackager.js +75 -0
- package/dist/linuxPackager.js.map +1 -0
- package/dist/macPackager.d.ts +50 -0
- package/dist/macPackager.d.ts.map +1 -0
- package/dist/macPackager.js +442 -0
- package/dist/macPackager.js.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js +14 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/hoist.d.ts +124 -0
- package/dist/node-module-collector/hoist.d.ts.map +1 -0
- package/dist/node-module-collector/hoist.js +880 -0
- package/dist/node-module-collector/hoist.js.map +1 -0
- package/dist/node-module-collector/index.d.ts +21 -0
- package/dist/node-module-collector/index.d.ts.map +1 -0
- package/dist/node-module-collector/index.js +124 -0
- package/dist/node-module-collector/index.js.map +1 -0
- package/dist/node-module-collector/moduleManager.d.ts +94 -0
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -0
- package/dist/node-module-collector/moduleManager.js +314 -0
- package/dist/node-module-collector/moduleManager.js.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts +138 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.js +421 -0
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts +15 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js +75 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/packageManager.d.ts +18 -0
- package/dist/node-module-collector/packageManager.d.ts.map +1 -0
- package/dist/node-module-collector/packageManager.js +137 -0
- package/dist/node-module-collector/packageManager.js.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +45 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +184 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js +118 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/types.d.ts +53 -0
- package/dist/node-module-collector/types.d.ts.map +1 -0
- package/dist/node-module-collector/types.js +2 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts +16 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js +87 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js +18 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js.map +1 -0
- package/dist/options/AppXOptions.d.ts +106 -0
- package/dist/options/AppXOptions.d.ts.map +1 -0
- package/dist/options/AppXOptions.js +2 -0
- package/dist/options/AppXOptions.js.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts +48 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js +47 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js.map +1 -0
- package/dist/options/FileAssociation.d.ts +46 -0
- package/dist/options/FileAssociation.d.ts.map +1 -0
- package/dist/options/FileAssociation.js +2 -0
- package/dist/options/MsiOptions.d.ts +27 -0
- package/dist/options/MsiOptions.d.ts.map +1 -0
- package/dist/options/MsiOptions.js +2 -0
- package/dist/options/MsiOptions.js.map +1 -0
- package/dist/options/MsiWrappedOptions.d.ts +27 -0
- package/dist/options/MsiWrappedOptions.d.ts.map +1 -0
- package/dist/options/MsiWrappedOptions.js +2 -0
- package/dist/options/MsiWrappedOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +261 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.js +2 -0
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -0
- package/dist/options/SnapOptions.d.ts +480 -0
- package/dist/options/SnapOptions.d.ts.map +1 -0
- package/dist/options/SnapOptions.js +2 -0
- package/dist/options/SnapOptions.js.map +1 -0
- package/dist/options/SquirrelWindowsOptions.d.ts +47 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -0
- package/dist/options/SquirrelWindowsOptions.js +2 -0
- package/dist/options/SquirrelWindowsOptions.js.map +1 -0
- package/dist/options/linuxOptions.d.ts +289 -0
- package/dist/options/linuxOptions.d.ts.map +1 -0
- package/dist/options/linuxOptions.js +2 -0
- package/dist/options/linuxOptions.js.map +1 -0
- package/dist/options/macOptions.d.ts +390 -0
- package/dist/options/macOptions.d.ts.map +1 -0
- package/dist/options/macOptions.js +2 -0
- package/dist/options/macOptions.js.map +1 -0
- package/dist/options/metadata.d.ts +54 -0
- package/dist/options/metadata.d.ts.map +1 -0
- package/dist/options/metadata.js +2 -0
- package/dist/options/metadata.js.map +1 -0
- package/dist/options/pkgOptions.d.ts +137 -0
- package/dist/options/pkgOptions.d.ts.map +1 -0
- package/dist/options/pkgOptions.js +2 -0
- package/dist/options/pkgOptions.js.map +1 -0
- package/dist/options/winOptions.d.ts +166 -0
- package/dist/options/winOptions.d.ts.map +1 -0
- package/dist/options/winOptions.js +2 -0
- package/dist/options/winOptions.js.map +1 -0
- package/dist/packager.d.ts +100 -0
- package/dist/packager.d.ts.map +1 -0
- package/dist/packager.js +491 -0
- package/dist/packager.js.map +1 -0
- package/dist/packagerApi.d.ts +32 -0
- package/dist/packagerApi.d.ts.map +1 -0
- package/dist/packagerApi.js +2 -0
- package/dist/packagerApi.js.map +1 -0
- package/dist/platformPackager.d.ts +132 -0
- package/dist/platformPackager.d.ts.map +1 -0
- package/dist/platformPackager.js +761 -0
- package/dist/platformPackager.js.map +1 -0
- package/dist/presets/rectCra.d.ts +2 -0
- package/dist/presets/rectCra.d.ts.map +1 -0
- package/dist/presets/rectCra.js +19 -0
- package/dist/presets/rectCra.js.map +1 -0
- package/dist/publish/PublishManager.d.ts +33 -0
- package/dist/publish/PublishManager.d.ts.map +1 -0
- package/dist/publish/PublishManager.js +470 -0
- package/dist/publish/PublishManager.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts +15 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -0
- package/dist/publish/updateInfoBuilder.js +221 -0
- package/dist/publish/updateInfoBuilder.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts +12 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -0
- package/dist/targets/ArchiveTarget.js +93 -0
- package/dist/targets/ArchiveTarget.js.map +1 -0
- package/dist/targets/archive.d.ts +27 -0
- package/dist/targets/archive.d.ts.map +1 -0
- package/dist/targets/archive.js +174 -0
- package/dist/targets/archive.js.map +1 -0
- package/dist/targets/blockmap/blockmap.d.ts +17 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmap.js +150 -0
- package/dist/targets/blockmap/blockmap.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +16 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.js +73 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -0
- package/dist/targets/linux/FlatpakTarget.d.ts +21 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -0
- package/dist/targets/linux/FlatpakTarget.js +156 -0
- package/dist/targets/linux/FlatpakTarget.js.map +1 -0
- package/dist/targets/linux/FpmTarget.d.ts +23 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -0
- package/dist/targets/linux/FpmTarget.js +365 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts +24 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.js +332 -0
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +16 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.js +141 -0
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts +57 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.js +317 -0
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts +4 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.js +91 -0
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts +37 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.js +96 -0
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -0
- package/dist/targets/linux/snap/core24.d.ts +53 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -0
- package/dist/targets/linux/snap/core24.js +444 -0
- package/dist/targets/linux/snap/core24.js.map +1 -0
- package/dist/targets/linux/snap/coreCustom.d.ts +29 -0
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreCustom.js +60 -0
- package/dist/targets/linux/snap/coreCustom.js.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts +46 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.js +402 -0
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +40 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js +414 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +30 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -0
- package/dist/targets/mac/MacTargetHelper.js +267 -0
- package/dist/targets/mac/MacTargetHelper.js.map +1 -0
- package/dist/targets/mac/pkg.d.ts +31 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -0
- package/dist/targets/mac/pkg.js +271 -0
- package/dist/targets/mac/pkg.js.map +1 -0
- package/dist/targets/targetFactory.d.ts +13 -0
- package/dist/targets/targetFactory.d.ts.map +1 -0
- package/dist/targets/targetFactory.js +94 -0
- package/dist/targets/targetFactory.js.map +1 -0
- package/dist/targets/targetUtil.d.ts +16 -0
- package/dist/targets/targetUtil.d.ts.map +1 -0
- package/dist/targets/targetUtil.js +40 -0
- package/dist/targets/targetUtil.js.map +1 -0
- package/dist/targets/win/AppxCapabilities.d.ts +9 -0
- package/dist/targets/win/AppxCapabilities.d.ts.map +1 -0
- package/dist/targets/win/AppxCapabilities.js +254 -0
- package/dist/targets/win/AppxCapabilities.js.map +1 -0
- package/dist/targets/win/AppxTarget.d.ts +18 -0
- package/dist/targets/win/AppxTarget.d.ts.map +1 -0
- package/dist/targets/win/AppxTarget.js +398 -0
- package/dist/targets/win/AppxTarget.js.map +1 -0
- package/dist/targets/win/MsiTarget.d.ts +29 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiTarget.js +268 -0
- package/dist/targets/win/MsiTarget.js.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts +20 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.js +77 -0
- package/dist/targets/win/MsiWrappedTarget.js.map +1 -0
- package/dist/targets/win/nsis/Commands.d.ts +10 -0
- package/dist/targets/win/nsis/Commands.d.ts.map +1 -0
- package/dist/targets/win/nsis/Commands.js +2 -0
- package/dist/targets/win/nsis/Commands.js.map +1 -0
- package/dist/targets/win/nsis/Defines.d.ts +81 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -0
- package/dist/targets/win/nsis/Defines.js +2 -0
- package/dist/targets/win/nsis/Defines.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +43 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.js +726 -0
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts +14 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js +43 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -0
- package/dist/targets/win/nsis/nsisLang.d.ts +11 -0
- package/dist/targets/win/nsis/nsisLang.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLang.js +94 -0
- package/dist/targets/win/nsis/nsisLang.js.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts +5 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.js +73 -0
- package/dist/targets/win/nsis/nsisLicense.js.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts +275 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.js +2 -0
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +13 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js +59 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts +26 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.js +218 -0
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts +19 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.js +49 -0
- package/dist/targets/win/nsis/nsisValidation.js.map +1 -0
- package/dist/toolsets/7zip.d.ts +9 -0
- package/dist/toolsets/7zip.d.ts.map +1 -0
- package/dist/toolsets/7zip.js +80 -0
- package/dist/toolsets/7zip.js.map +1 -0
- package/dist/toolsets/appimage.d.ts +20 -0
- package/dist/toolsets/appimage.d.ts.map +1 -0
- package/dist/toolsets/appimage.js +67 -0
- package/dist/toolsets/appimage.js.map +1 -0
- package/dist/toolsets/custom.d.ts +5 -0
- package/dist/toolsets/custom.d.ts.map +1 -0
- package/dist/toolsets/custom.js +200 -0
- package/dist/toolsets/custom.js.map +1 -0
- package/dist/toolsets/fpm.d.ts +3 -0
- package/dist/toolsets/fpm.d.ts.map +1 -0
- package/dist/toolsets/fpm.js +49 -0
- package/dist/toolsets/fpm.js.map +1 -0
- package/dist/toolsets/icons.d.ts +12 -0
- package/dist/toolsets/icons.d.ts.map +1 -0
- package/dist/toolsets/icons.js +36 -0
- package/dist/toolsets/icons.js.map +1 -0
- package/dist/toolsets/linuxToolsMac.d.ts +8 -0
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -0
- package/dist/toolsets/linuxToolsMac.js +31 -0
- package/dist/toolsets/linuxToolsMac.js.map +1 -0
- package/dist/toolsets/nsis.d.ts +13 -0
- package/dist/toolsets/nsis.d.ts.map +1 -0
- package/dist/toolsets/nsis.js +100 -0
- package/dist/toolsets/nsis.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +42 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -0
- package/dist/toolsets/winCodeSign.js +142 -0
- package/dist/toolsets/winCodeSign.js.map +1 -0
- package/dist/toolsets/wine.d.ts +6 -0
- package/dist/toolsets/wine.d.ts.map +1 -0
- package/dist/toolsets/wine.js +79 -0
- package/dist/toolsets/wine.js.map +1 -0
- package/dist/util/AppFileWalker.d.ts +14 -0
- package/dist/util/AppFileWalker.d.ts.map +1 -0
- package/dist/util/AppFileWalker.js +69 -0
- package/dist/util/AppFileWalker.js.map +1 -0
- package/dist/util/NodeModuleCopyHelper.d.ts +2 -0
- package/dist/util/NodeModuleCopyHelper.d.ts.map +1 -0
- package/dist/util/NodeModuleCopyHelper.js +160 -0
- package/dist/util/NodeModuleCopyHelper.js.map +1 -0
- package/dist/util/appFileCopier.d.ts +17 -0
- package/dist/util/appFileCopier.d.ts.map +1 -0
- package/dist/util/appFileCopier.js +190 -0
- package/dist/util/appFileCopier.js.map +1 -0
- package/dist/util/asyncEventEmitter.d.ts +34 -0
- package/dist/util/asyncEventEmitter.d.ts.map +1 -0
- package/dist/util/asyncEventEmitter.js +56 -0
- package/dist/util/asyncEventEmitter.js.map +1 -0
- package/dist/util/bundledTool.d.ts +8 -0
- package/dist/util/bundledTool.d.ts.map +1 -0
- package/dist/util/bundledTool.js +16 -0
- package/dist/util/bundledTool.js.map +1 -0
- package/dist/util/cacheManager.d.ts +19 -0
- package/dist/util/cacheManager.d.ts.map +1 -0
- package/dist/util/cacheManager.js +65 -0
- package/dist/util/cacheManager.js.map +1 -0
- package/dist/util/cacheState.d.ts +29 -0
- package/dist/util/cacheState.d.ts.map +1 -0
- package/dist/util/cacheState.js +134 -0
- package/dist/util/cacheState.js.map +1 -0
- package/dist/util/config/config.d.ts +13 -0
- package/dist/util/config/config.d.ts.map +1 -0
- package/dist/util/config/config.js +236 -0
- package/dist/util/config/config.js.map +1 -0
- package/dist/util/config/load.d.ts +20 -0
- package/dist/util/config/load.d.ts.map +1 -0
- package/dist/util/config/load.js +122 -0
- package/dist/util/config/load.js.map +1 -0
- package/dist/util/config/schemaValidator.d.ts +8 -0
- package/dist/util/config/schemaValidator.d.ts.map +1 -0
- package/dist/util/config/schemaValidator.js +161 -0
- package/dist/util/config/schemaValidator.js.map +1 -0
- package/dist/util/dynamicImport.d.ts +2 -0
- package/dist/util/dynamicImport.d.ts.map +1 -0
- package/dist/util/dynamicImport.js +9 -0
- package/dist/util/dynamicImport.js.map +1 -0
- package/dist/util/electronGet.d.ts +68 -0
- package/dist/util/electronGet.d.ts.map +1 -0
- package/dist/util/electronGet.js +560 -0
- package/dist/util/electronGet.js.map +1 -0
- package/dist/util/filter.d.ts +2 -0
- package/dist/util/filter.d.ts.map +1 -0
- package/dist/util/filter.js +64 -0
- package/dist/util/filter.js.map +1 -0
- package/dist/util/flags.d.ts +16 -0
- package/dist/util/flags.d.ts.map +1 -0
- package/dist/util/flags.js +53 -0
- package/dist/util/flags.js.map +1 -0
- package/dist/util/hash.d.ts +2 -0
- package/dist/util/hash.d.ts.map +1 -0
- package/dist/util/hash.js +16 -0
- package/dist/util/hash.js.map +1 -0
- package/dist/util/iconConverter.d.ts +29 -0
- package/dist/util/iconConverter.d.ts.map +1 -0
- package/dist/util/iconConverter.js +255 -0
- package/dist/util/iconConverter.js.map +1 -0
- package/dist/util/langs.d.ts +190 -0
- package/dist/util/langs.d.ts.map +1 -0
- package/dist/util/langs.js +432 -0
- package/dist/util/langs.js.map +1 -0
- package/dist/util/license.d.ts +17 -0
- package/dist/util/license.d.ts.map +1 -0
- package/dist/util/license.js +42 -0
- package/dist/util/license.js.map +1 -0
- package/dist/util/mac/macosIconComposer.d.ts +11 -0
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -0
- package/dist/util/mac/macosIconComposer.js +99 -0
- package/dist/util/mac/macosIconComposer.js.map +1 -0
- package/dist/util/mac/macosVersion.d.ts +4 -0
- package/dist/util/mac/macosVersion.d.ts.map +1 -0
- package/dist/util/mac/macosVersion.js +31 -0
- package/dist/util/mac/macosVersion.js.map +1 -0
- package/dist/util/mac/plist.d.ts +8 -0
- package/dist/util/mac/plist.d.ts.map +1 -0
- package/dist/util/mac/plist.js +27 -0
- package/dist/util/mac/plist.js.map +1 -0
- package/dist/util/macroExpander.d.ts +4 -0
- package/dist/util/macroExpander.d.ts.map +1 -0
- package/dist/util/macroExpander.js +61 -0
- package/dist/util/macroExpander.js.map +1 -0
- package/dist/util/normalizePackageData.d.ts +2 -0
- package/dist/util/normalizePackageData.d.ts.map +1 -0
- package/dist/util/normalizePackageData.js +323 -0
- package/dist/util/normalizePackageData.js.map +1 -0
- package/dist/util/packageMetadata.d.ts +2 -0
- package/dist/util/packageMetadata.d.ts.map +1 -0
- package/dist/util/packageMetadata.js +118 -0
- package/dist/util/packageMetadata.js.map +1 -0
- package/dist/util/pathManager.d.ts +4 -0
- package/dist/util/pathManager.d.ts.map +1 -0
- package/dist/util/pathManager.js +17 -0
- package/dist/util/pathManager.js.map +1 -0
- package/dist/util/rebuild.d.ts +3 -0
- package/dist/util/rebuild.d.ts.map +1 -0
- package/dist/util/rebuild.js +54 -0
- package/dist/util/rebuild.js.map +1 -0
- package/dist/util/repositoryInfo.d.ts +4 -0
- package/dist/util/repositoryInfo.d.ts.map +1 -0
- package/dist/util/repositoryInfo.js +76 -0
- package/dist/util/repositoryInfo.js.map +1 -0
- package/dist/util/resolve.d.ts +3 -0
- package/dist/util/resolve.d.ts.map +1 -0
- package/dist/util/resolve.js +56 -0
- package/dist/util/resolve.js.map +1 -0
- package/dist/util/timer.d.ts +12 -0
- package/dist/util/timer.d.ts.map +1 -0
- package/dist/util/timer.js +23 -0
- package/dist/util/timer.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -0
- package/dist/util/toolsetLock.js +20 -0
- package/dist/util/toolsetLock.js.map +1 -0
- package/dist/util/win/resEdit.d.ts +11 -0
- package/dist/util/win/resEdit.d.ts.map +1 -0
- package/dist/util/win/resEdit.js +46 -0
- package/dist/util/win/resEdit.js.map +1 -0
- package/dist/util/yarn.d.ts +23 -0
- package/dist/util/yarn.d.ts.map +1 -0
- package/dist/util/yarn.js +153 -0
- package/dist/util/yarn.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/vm/MonoVm.d.ts +9 -0
- package/dist/vm/MonoVm.d.ts.map +1 -0
- package/dist/vm/MonoVm.js +16 -0
- package/dist/vm/MonoVm.js.map +1 -0
- package/dist/vm/ParallelsVm.d.ts +24 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -0
- package/dist/vm/ParallelsVm.js +107 -0
- package/dist/vm/ParallelsVm.js.map +1 -0
- package/dist/vm/PwshVm.d.ts +7 -0
- package/dist/vm/PwshVm.d.ts.map +1 -0
- package/dist/vm/PwshVm.js +21 -0
- package/dist/vm/PwshVm.js.map +1 -0
- package/dist/vm/WineVm.d.ts +14 -0
- package/dist/vm/WineVm.d.ts.map +1 -0
- package/dist/vm/WineVm.js +35 -0
- package/dist/vm/WineVm.js.map +1 -0
- package/dist/vm/vm.d.ts +15 -0
- package/dist/vm/vm.d.ts.map +1 -0
- package/dist/vm/vm.js +81 -0
- package/dist/vm/vm.js.map +1 -0
- package/dist/winPackager.d.ts +30 -0
- package/dist/winPackager.d.ts.map +1 -0
- package/dist/winPackager.js +270 -0
- package/dist/winPackager.js.map +1 -0
- package/helpers/package.json +6 -0
- package/helpers/remote-rebuild.js +2 -4
- package/package.json +30 -33
- package/scheme.json +379 -721
- package/out/Framework.d.ts +0 -36
- package/out/Framework.js +0 -7
- package/out/Framework.js.map +0 -1
- package/out/ProtonFramework.d.ts +0 -10
- package/out/ProtonFramework.js +0 -94
- package/out/ProtonFramework.js.map +0 -1
- package/out/appInfo.d.ts +0 -31
- package/out/appInfo.js +0 -152
- package/out/appInfo.js.map +0 -1
- package/out/asar/asar.d.ts +0 -38
- package/out/asar/asar.js +0 -163
- package/out/asar/asar.js.map +0 -1
- package/out/asar/asarFileChecker.d.ts +0 -2
- package/out/asar/asarFileChecker.js +0 -25
- package/out/asar/asarFileChecker.js.map +0 -1
- package/out/asar/asarUtil.d.ts +0 -1
- package/out/asar/asarUtil.js +0 -285
- package/out/asar/asarUtil.js.map +0 -1
- package/out/asar/integrity.d.ts +0 -15
- package/out/asar/integrity.js +0 -62
- package/out/asar/integrity.js.map +0 -1
- package/out/asar/unpackDetector.d.ts +0 -1
- package/out/asar/unpackDetector.js +0 -43
- package/out/asar/unpackDetector.js.map +0 -1
- package/out/binDownload.d.ts +0 -5
- package/out/binDownload.js +0 -104
- package/out/binDownload.js.map +0 -1
- package/out/codeSign/certInfo.d.ts +0 -54
- package/out/codeSign/certInfo.js +0 -466
- package/out/codeSign/certInfo.js.map +0 -1
- package/out/codeSign/codesign.d.ts +0 -3
- package/out/codeSign/codesign.js +0 -33
- package/out/codeSign/codesign.js.map +0 -1
- package/out/codeSign/macCodeSign.d.ts +0 -28
- package/out/codeSign/macCodeSign.js +0 -284
- package/out/codeSign/macCodeSign.js.map +0 -1
- package/out/codeSign/signManager.d.ts +0 -13
- package/out/codeSign/signManager.js +0 -3
- package/out/codeSign/signManager.js.map +0 -1
- package/out/codeSign/windowsCodeSign.d.ts +0 -7
- package/out/codeSign/windowsCodeSign.js +0 -38
- package/out/codeSign/windowsCodeSign.js.map +0 -1
- package/out/codeSign/windowsSignAzureManager.d.ts +0 -17
- package/out/codeSign/windowsSignAzureManager.js +0 -73
- package/out/codeSign/windowsSignAzureManager.js.map +0 -1
- package/out/codeSign/windowsSignToolManager.d.ts +0 -58
- package/out/codeSign/windowsSignToolManager.js +0 -376
- package/out/codeSign/windowsSignToolManager.js.map +0 -1
- package/out/configuration.d.ts +0 -532
- package/out/configuration.js +0 -3
- package/out/configuration.js.map +0 -1
- package/out/core.d.ts +0 -60
- package/out/core.js +0 -66
- package/out/core.js.map +0 -1
- package/out/electron/ElectronFramework.d.ts +0 -16
- package/out/electron/ElectronFramework.js +0 -242
- package/out/electron/ElectronFramework.js.map +0 -1
- package/out/electron/electronMac.d.ts +0 -1
- package/out/electron/electronMac.js +0 -262
- package/out/electron/electronMac.js.map +0 -1
- package/out/electron/electronVersion.d.ts +0 -6
- package/out/electron/electronVersion.js +0 -125
- package/out/electron/electronVersion.js.map +0 -1
- package/out/electron/electronWin.d.ts +0 -1
- package/out/electron/electronWin.js +0 -38
- package/out/electron/electronWin.js.map +0 -1
- package/out/electron/injectFFMPEG.d.ts +0 -11
- package/out/electron/injectFFMPEG.js +0 -57
- package/out/electron/injectFFMPEG.js.map +0 -1
- package/out/electron/search-module.d.ts +0 -23
- package/out/electron/search-module.js +0 -73
- package/out/electron/search-module.js.map +0 -1
- package/out/errorMessages.d.ts +0 -1
- package/out/errorMessages.js +0 -11
- package/out/errorMessages.js.map +0 -1
- package/out/fileMatcher.d.ts +0 -29
- package/out/fileMatcher.js +0 -292
- package/out/fileMatcher.js.map +0 -1
- package/out/fileTransformer.d.ts +0 -1
- package/out/fileTransformer.js +0 -107
- package/out/fileTransformer.js.map +0 -1
- package/out/forge-maker.d.ts +0 -5
- package/out/forge-maker.js +0 -23
- package/out/forge-maker.js.map +0 -1
- package/out/frameworks/LibUiFramework.d.ts +0 -47
- package/out/frameworks/LibUiFramework.js +0 -197
- package/out/frameworks/LibUiFramework.js.map +0 -1
- package/out/index.d.ts +0 -39
- package/out/index.js +0 -99
- package/out/index.js.map +0 -1
- package/out/linuxPackager.d.ts +0 -12
- package/out/linuxPackager.js +0 -77
- package/out/linuxPackager.js.map +0 -1
- package/out/mac/MacTargetHelper.d.ts +0 -29
- package/out/mac/MacTargetHelper.js +0 -273
- package/out/mac/MacTargetHelper.js.map +0 -1
- package/out/macPackager.d.ts +0 -49
- package/out/macPackager.js +0 -445
- package/out/macPackager.js.map +0 -1
- package/out/node-module-collector/bunNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/bunNodeModulesCollector.js +0 -18
- package/out/node-module-collector/bunNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/hoist.d.ts +0 -123
- package/out/node-module-collector/hoist.js +0 -884
- package/out/node-module-collector/hoist.js.map +0 -1
- package/out/node-module-collector/index.d.ts +0 -18
- package/out/node-module-collector/index.js +0 -130
- package/out/node-module-collector/index.js.map +0 -1
- package/out/node-module-collector/moduleManager.d.ts +0 -93
- package/out/node-module-collector/moduleManager.js +0 -321
- package/out/node-module-collector/moduleManager.js.map +0 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +0 -137
- package/out/node-module-collector/nodeModulesCollector.js +0 -428
- package/out/node-module-collector/nodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -14
- package/out/node-module-collector/npmNodeModulesCollector.js +0 -80
- package/out/node-module-collector/npmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/packageManager.d.ts +0 -17
- package/out/node-module-collector/packageManager.js +0 -144
- package/out/node-module-collector/packageManager.js.map +0 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +0 -44
- package/out/node-module-collector/pnpmNodeModulesCollector.js +0 -191
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/traversalNodeModulesCollector.d.ts +0 -18
- package/out/node-module-collector/traversalNodeModulesCollector.js +0 -122
- package/out/node-module-collector/traversalNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/types.d.ts +0 -52
- package/out/node-module-collector/types.js +0 -3
- package/out/node-module-collector/yarnBerryNodeModulesCollector.d.ts +0 -15
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js +0 -93
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/yarnNodeModulesCollector.js +0 -22
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +0 -1
- package/out/options/AppXOptions.d.ts +0 -105
- package/out/options/AppXOptions.js +0 -3
- package/out/options/AppXOptions.js.map +0 -1
- package/out/options/CommonWindowsInstallerConfiguration.d.ts +0 -47
- package/out/options/CommonWindowsInstallerConfiguration.js +0 -51
- package/out/options/CommonWindowsInstallerConfiguration.js.map +0 -1
- package/out/options/FileAssociation.d.ts +0 -45
- package/out/options/FileAssociation.js +0 -3
- package/out/options/MsiOptions.d.ts +0 -26
- package/out/options/MsiOptions.js +0 -3
- package/out/options/MsiOptions.js.map +0 -1
- package/out/options/MsiWrappedOptions.d.ts +0 -26
- package/out/options/MsiWrappedOptions.js +0 -3
- package/out/options/MsiWrappedOptions.js.map +0 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +0 -238
- package/out/options/PlatformSpecificBuildOptions.js +0 -3
- package/out/options/PlatformSpecificBuildOptions.js.map +0 -1
- package/out/options/SnapOptions.d.ts +0 -500
- package/out/options/SnapOptions.js +0 -3
- package/out/options/SnapOptions.js.map +0 -1
- package/out/options/SquirrelWindowsOptions.d.ts +0 -46
- package/out/options/SquirrelWindowsOptions.js +0 -3
- package/out/options/SquirrelWindowsOptions.js.map +0 -1
- package/out/options/linuxOptions.d.ts +0 -287
- package/out/options/linuxOptions.js +0 -3
- package/out/options/linuxOptions.js.map +0 -1
- package/out/options/macOptions.d.ts +0 -388
- package/out/options/macOptions.js +0 -3
- package/out/options/macOptions.js.map +0 -1
- package/out/options/metadata.d.ts +0 -53
- package/out/options/metadata.js +0 -3
- package/out/options/metadata.js.map +0 -1
- package/out/options/pkgOptions.d.ts +0 -136
- package/out/options/pkgOptions.js +0 -3
- package/out/options/pkgOptions.js.map +0 -1
- package/out/options/winOptions.d.ts +0 -164
- package/out/options/winOptions.js +0 -3
- package/out/options/winOptions.js.map +0 -1
- package/out/packager.d.ts +0 -99
- package/out/packager.js +0 -515
- package/out/packager.js.map +0 -1
- package/out/packagerApi.d.ts +0 -31
- package/out/packagerApi.js +0 -3
- package/out/packagerApi.js.map +0 -1
- package/out/platformPackager.d.ts +0 -101
- package/out/platformPackager.js +0 -714
- package/out/platformPackager.js.map +0 -1
- package/out/presets/rectCra.d.ts +0 -1
- package/out/presets/rectCra.js +0 -22
- package/out/presets/rectCra.js.map +0 -1
- package/out/publish/PublishManager.d.ts +0 -30
- package/out/publish/PublishManager.js +0 -497
- package/out/publish/PublishManager.js.map +0 -1
- package/out/publish/updateInfoBuilder.d.ts +0 -14
- package/out/publish/updateInfoBuilder.js +0 -226
- package/out/publish/updateInfoBuilder.js.map +0 -1
- package/out/targets/AppxCapabilities.d.ts +0 -8
- package/out/targets/AppxCapabilities.js +0 -258
- package/out/targets/AppxCapabilities.js.map +0 -1
- package/out/targets/AppxTarget.d.ts +0 -17
- package/out/targets/AppxTarget.js +0 -403
- package/out/targets/AppxTarget.js.map +0 -1
- package/out/targets/ArchiveTarget.d.ts +0 -11
- package/out/targets/ArchiveTarget.js +0 -88
- package/out/targets/ArchiveTarget.js.map +0 -1
- package/out/targets/FlatpakTarget.d.ts +0 -20
- package/out/targets/FlatpakTarget.js +0 -159
- package/out/targets/FlatpakTarget.js.map +0 -1
- package/out/targets/FpmTarget.d.ts +0 -22
- package/out/targets/FpmTarget.js +0 -372
- package/out/targets/FpmTarget.js.map +0 -1
- package/out/targets/LinuxTargetHelper.d.ts +0 -23
- package/out/targets/LinuxTargetHelper.js +0 -346
- package/out/targets/LinuxTargetHelper.js.map +0 -1
- package/out/targets/MsiTarget.d.ts +0 -28
- package/out/targets/MsiTarget.js +0 -268
- package/out/targets/MsiTarget.js.map +0 -1
- package/out/targets/MsiWrappedTarget.d.ts +0 -19
- package/out/targets/MsiWrappedTarget.js +0 -80
- package/out/targets/MsiWrappedTarget.js.map +0 -1
- package/out/targets/appimage/AppImageTarget.d.ts +0 -15
- package/out/targets/appimage/AppImageTarget.js +0 -147
- package/out/targets/appimage/AppImageTarget.js.map +0 -1
- package/out/targets/appimage/appImageUtil.d.ts +0 -56
- package/out/targets/appimage/appImageUtil.js +0 -323
- package/out/targets/appimage/appImageUtil.js.map +0 -1
- package/out/targets/appimage/appLauncher.d.ts +0 -3
- package/out/targets/appimage/appLauncher.js +0 -95
- package/out/targets/appimage/appLauncher.js.map +0 -1
- package/out/targets/archive.d.ts +0 -26
- package/out/targets/archive.js +0 -178
- package/out/targets/archive.js.map +0 -1
- package/out/targets/blockmap/blockmap.d.ts +0 -16
- package/out/targets/blockmap/blockmap.js +0 -153
- package/out/targets/blockmap/blockmap.js.map +0 -1
- package/out/targets/differentialUpdateInfoBuilder.d.ts +0 -15
- package/out/targets/differentialUpdateInfoBuilder.js +0 -80
- package/out/targets/differentialUpdateInfoBuilder.js.map +0 -1
- package/out/targets/nsis/Commands.d.ts +0 -9
- package/out/targets/nsis/Commands.js +0 -3
- package/out/targets/nsis/Commands.js.map +0 -1
- package/out/targets/nsis/Defines.d.ts +0 -80
- package/out/targets/nsis/Defines.js +0 -3
- package/out/targets/nsis/Defines.js.map +0 -1
- package/out/targets/nsis/NsisTarget.d.ts +0 -37
- package/out/targets/nsis/NsisTarget.js +0 -729
- package/out/targets/nsis/NsisTarget.js.map +0 -1
- package/out/targets/nsis/WebInstallerTarget.d.ts +0 -13
- package/out/targets/nsis/WebInstallerTarget.js +0 -47
- package/out/targets/nsis/WebInstallerTarget.js.map +0 -1
- package/out/targets/nsis/nsisLang.d.ts +0 -10
- package/out/targets/nsis/nsisLang.js +0 -100
- package/out/targets/nsis/nsisLang.js.map +0 -1
- package/out/targets/nsis/nsisLicense.d.ts +0 -4
- package/out/targets/nsis/nsisLicense.js +0 -77
- package/out/targets/nsis/nsisLicense.js.map +0 -1
- package/out/targets/nsis/nsisOptions.d.ts +0 -274
- package/out/targets/nsis/nsisOptions.js +0 -3
- package/out/targets/nsis/nsisOptions.js.map +0 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +0 -12
- package/out/targets/nsis/nsisScriptGenerator.js +0 -64
- package/out/targets/nsis/nsisScriptGenerator.js.map +0 -1
- package/out/targets/nsis/nsisUtil.d.ts +0 -25
- package/out/targets/nsis/nsisUtil.js +0 -225
- package/out/targets/nsis/nsisUtil.js.map +0 -1
- package/out/targets/nsis/nsisValidation.d.ts +0 -18
- package/out/targets/nsis/nsisValidation.js +0 -53
- package/out/targets/nsis/nsisValidation.js.map +0 -1
- package/out/targets/pkg.d.ts +0 -30
- package/out/targets/pkg.js +0 -279
- package/out/targets/pkg.js.map +0 -1
- package/out/targets/snap/SnapTarget.d.ts +0 -36
- package/out/targets/snap/SnapTarget.js +0 -105
- package/out/targets/snap/SnapTarget.js.map +0 -1
- package/out/targets/snap/core24.d.ts +0 -52
- package/out/targets/snap/core24.js +0 -449
- package/out/targets/snap/core24.js.map +0 -1
- package/out/targets/snap/coreCustom.d.ts +0 -28
- package/out/targets/snap/coreCustom.js +0 -63
- package/out/targets/snap/coreCustom.js.map +0 -1
- package/out/targets/snap/coreLegacy.d.ts +0 -43
- package/out/targets/snap/coreLegacy.js +0 -416
- package/out/targets/snap/coreLegacy.js.map +0 -1
- package/out/targets/snap/snapcraftBuilder.d.ts +0 -39
- package/out/targets/snap/snapcraftBuilder.js +0 -419
- package/out/targets/snap/snapcraftBuilder.js.map +0 -1
- package/out/targets/targetFactory.d.ts +0 -12
- package/out/targets/targetFactory.js +0 -101
- package/out/targets/targetFactory.js.map +0 -1
- package/out/targets/targetUtil.d.ts +0 -14
- package/out/targets/targetUtil.js +0 -47
- package/out/targets/targetUtil.js.map +0 -1
- package/out/toolsets/7zip.d.ts +0 -2
- package/out/toolsets/7zip.js +0 -72
- package/out/toolsets/7zip.js.map +0 -1
- package/out/toolsets/icons.d.ts +0 -8
- package/out/toolsets/icons.js +0 -37
- package/out/toolsets/icons.js.map +0 -1
- package/out/toolsets/linux.d.ts +0 -26
- package/out/toolsets/linux.js +0 -146
- package/out/toolsets/linux.js.map +0 -1
- package/out/toolsets/windows.d.ts +0 -61
- package/out/toolsets/windows.js +0 -259
- package/out/toolsets/windows.js.map +0 -1
- package/out/toolsets/wine.d.ts +0 -5
- package/out/toolsets/wine.js +0 -100
- package/out/toolsets/wine.js.map +0 -1
- package/out/util/AppFileWalker.d.ts +0 -13
- package/out/util/AppFileWalker.js +0 -74
- package/out/util/AppFileWalker.js.map +0 -1
- package/out/util/NodeModuleCopyHelper.d.ts +0 -1
- package/out/util/NodeModuleCopyHelper.js +0 -165
- package/out/util/NodeModuleCopyHelper.js.map +0 -1
- package/out/util/appFileCopier.d.ts +0 -16
- package/out/util/appFileCopier.js +0 -251
- package/out/util/appFileCopier.js.map +0 -1
- package/out/util/asyncEventEmitter.d.ts +0 -33
- package/out/util/asyncEventEmitter.js +0 -63
- package/out/util/asyncEventEmitter.js.map +0 -1
- package/out/util/bundledTool.d.ts +0 -7
- package/out/util/bundledTool.js +0 -20
- package/out/util/bundledTool.js.map +0 -1
- package/out/util/cacheManager.d.ts +0 -18
- package/out/util/cacheManager.js +0 -70
- package/out/util/cacheManager.js.map +0 -1
- package/out/util/cacheState.d.ts +0 -28
- package/out/util/cacheState.js +0 -143
- package/out/util/cacheState.js.map +0 -1
- package/out/util/config/config.d.ts +0 -12
- package/out/util/config/config.js +0 -256
- package/out/util/config/config.js.map +0 -1
- package/out/util/config/load.d.ts +0 -19
- package/out/util/config/load.js +0 -129
- package/out/util/config/load.js.map +0 -1
- package/out/util/config/schemaValidator.d.ts +0 -7
- package/out/util/config/schemaValidator.js +0 -154
- package/out/util/config/schemaValidator.js.map +0 -1
- package/out/util/dynamicImport.d.ts +0 -1
- package/out/util/dynamicImport.js +0 -12
- package/out/util/dynamicImport.js.map +0 -1
- package/out/util/electronGet.d.ts +0 -61
- package/out/util/electronGet.js +0 -464
- package/out/util/electronGet.js.map +0 -1
- package/out/util/envPath.d.ts +0 -2
- package/out/util/envPath.js +0 -28
- package/out/util/envPath.js.map +0 -1
- package/out/util/filter.d.ts +0 -1
- package/out/util/filter.js +0 -68
- package/out/util/filter.js.map +0 -1
- package/out/util/flags.d.ts +0 -3
- package/out/util/flags.js +0 -16
- package/out/util/flags.js.map +0 -1
- package/out/util/hash.d.ts +0 -1
- package/out/util/hash.js +0 -19
- package/out/util/hash.js.map +0 -1
- package/out/util/iconConverter.d.ts +0 -25
- package/out/util/iconConverter.js +0 -260
- package/out/util/iconConverter.js.map +0 -1
- package/out/util/langs.d.ts +0 -189
- package/out/util/langs.js +0 -436
- package/out/util/langs.js.map +0 -1
- package/out/util/license.d.ts +0 -16
- package/out/util/license.js +0 -47
- package/out/util/license.js.map +0 -1
- package/out/util/macosIconComposer.d.ts +0 -10
- package/out/util/macosIconComposer.js +0 -102
- package/out/util/macosIconComposer.js.map +0 -1
- package/out/util/macosVersion.d.ts +0 -3
- package/out/util/macosVersion.js +0 -36
- package/out/util/macosVersion.js.map +0 -1
- package/out/util/macroExpander.d.ts +0 -3
- package/out/util/macroExpander.js +0 -64
- package/out/util/macroExpander.js.map +0 -1
- package/out/util/normalizePackageData.d.ts +0 -1
- package/out/util/normalizePackageData.js +0 -328
- package/out/util/normalizePackageData.js.map +0 -1
- package/out/util/packageDependencies.d.ts +0 -6
- package/out/util/packageDependencies.js +0 -3
- package/out/util/packageDependencies.js.map +0 -1
- package/out/util/packageMetadata.d.ts +0 -1
- package/out/util/packageMetadata.js +0 -124
- package/out/util/packageMetadata.js.map +0 -1
- package/out/util/pathManager.d.ts +0 -3
- package/out/util/pathManager.js +0 -23
- package/out/util/pathManager.js.map +0 -1
- package/out/util/plist.d.ts +0 -7
- package/out/util/plist.js +0 -31
- package/out/util/plist.js.map +0 -1
- package/out/util/rebuild.d.ts +0 -2
- package/out/util/rebuild.js +0 -60
- package/out/util/rebuild.js.map +0 -1
- package/out/util/repositoryInfo.d.ts +0 -3
- package/out/util/repositoryInfo.js +0 -79
- package/out/util/repositoryInfo.js.map +0 -1
- package/out/util/resEdit.d.ts +0 -10
- package/out/util/resEdit.js +0 -49
- package/out/util/resEdit.js.map +0 -1
- package/out/util/resolve.d.ts +0 -2
- package/out/util/resolve.js +0 -59
- package/out/util/resolve.js.map +0 -1
- package/out/util/timer.d.ts +0 -11
- package/out/util/timer.js +0 -28
- package/out/util/timer.js.map +0 -1
- package/out/util/toolsetLock.d.ts +0 -1
- package/out/util/toolsetLock.js +0 -23
- package/out/util/toolsetLock.js.map +0 -1
- package/out/util/yarn.d.ts +0 -22
- package/out/util/yarn.js +0 -160
- package/out/util/yarn.js.map +0 -1
- package/out/version.d.ts +0 -1
- package/out/version.js +0 -5
- package/out/version.js.map +0 -1
- package/out/vm/MonoVm.d.ts +0 -8
- package/out/vm/MonoVm.js +0 -20
- package/out/vm/MonoVm.js.map +0 -1
- package/out/vm/ParallelsVm.d.ts +0 -23
- package/out/vm/ParallelsVm.js +0 -102
- package/out/vm/ParallelsVm.js.map +0 -1
- package/out/vm/PwshVm.d.ts +0 -6
- package/out/vm/PwshVm.js +0 -25
- package/out/vm/PwshVm.js.map +0 -1
- package/out/vm/WineVm.d.ts +0 -12
- package/out/vm/WineVm.js +0 -38
- package/out/vm/WineVm.js.map +0 -1
- package/out/vm/vm.d.ts +0 -14
- package/out/vm/vm.js +0 -88
- package/out/vm/vm.js.map +0 -1
- package/out/winPackager.d.ts +0 -29
- package/out/winPackager.js +0 -271
- package/out/winPackager.js.map +0 -1
- /package/{out → dist}/node-module-collector/types.js.map +0 -0
- /package/{out → dist}/options/FileAssociation.js.map +0 -0
- /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
package/out/codeSign/codesign.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importCertificate = importCertificate;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const binDownload_1 = require("../binDownload");
|
|
7
|
-
/** @private */
|
|
8
|
-
async function importCertificate(cscLink, tmpDir, currentDir) {
|
|
9
|
-
cscLink = cscLink.trim();
|
|
10
|
-
if (cscLink.startsWith("https://")) {
|
|
11
|
-
const tempFile = await tmpDir.getTempFile({ suffix: ".p12" });
|
|
12
|
-
await (0, binDownload_1.download)(cscLink, tempFile);
|
|
13
|
-
return tempFile;
|
|
14
|
-
}
|
|
15
|
-
const decoded = (0, builder_util_1.decodeCscLinkBase64)(cscLink);
|
|
16
|
-
if (decoded) {
|
|
17
|
-
const tempFile = await tmpDir.getTempFile({ suffix: ".p12" });
|
|
18
|
-
await (0, fs_extra_1.outputFile)(tempFile, decoded);
|
|
19
|
-
return tempFile;
|
|
20
|
-
}
|
|
21
|
-
const file = (0, builder_util_1.resolveCscLinkPath)(cscLink, currentDir);
|
|
22
|
-
const stat = await (0, builder_util_1.statOrNull)(file);
|
|
23
|
-
if (stat == null) {
|
|
24
|
-
throw new builder_util_1.InvalidConfigurationError(`${file} doesn't exist`);
|
|
25
|
-
}
|
|
26
|
-
else if (!stat.isFile()) {
|
|
27
|
-
throw new builder_util_1.InvalidConfigurationError(`${file} not a file`);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return file;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=codesign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codesign.js","sourceRoot":"","sources":["../../src/codeSign/codesign.ts"],"names":[],"mappings":";;AAMA,8CAyBC;AA/BD,+CAA6G;AAC7G,uCAAqC;AAErC,gDAAyC;AAEzC,eAAe;AACR,KAAK,UAAU,iBAAiB,CAAC,OAAe,EAAE,MAAc,EAAE,UAAkB;IACzF,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;IAExB,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAC7D,MAAM,IAAA,sBAAQ,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;QACjC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,kCAAmB,EAAC,OAAO,CAAC,CAAA;IAC5C,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAC7D,MAAM,IAAA,qBAAU,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACnC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,IAAI,GAAG,IAAA,iCAAkB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IACpD,MAAM,IAAI,GAAG,MAAM,IAAA,yBAAU,EAAC,IAAI,CAAC,CAAA;IACnC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,wCAAyB,CAAC,GAAG,IAAI,gBAAgB,CAAC,CAAA;IAC9D,CAAC;SAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,wCAAyB,CAAC,GAAG,IAAI,aAAa,CAAC,CAAA;IAC3D,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC","sourcesContent":["import { decodeCscLinkBase64, InvalidConfigurationError, resolveCscLinkPath, statOrNull } from \"builder-util\"\nimport { outputFile } from \"fs-extra\"\nimport { TmpDir } from \"temp-file\"\nimport { download } from \"../binDownload\"\n\n/** @private */\nexport async function importCertificate(cscLink: string, tmpDir: TmpDir, currentDir: string): Promise<string> {\n cscLink = cscLink.trim()\n\n if (cscLink.startsWith(\"https://\")) {\n const tempFile = await tmpDir.getTempFile({ suffix: \".p12\" })\n await download(cscLink, tempFile)\n return tempFile\n }\n\n const decoded = decodeCscLinkBase64(cscLink)\n if (decoded) {\n const tempFile = await tmpDir.getTempFile({ suffix: \".p12\" })\n await outputFile(tempFile, decoded)\n return tempFile\n }\n\n const file = resolveCscLinkPath(cscLink, currentDir)\n const stat = await statOrNull(file)\n if (stat == null) {\n throw new InvalidConfigurationError(`${file} doesn't exist`)\n } else if (!stat.isFile()) {\n throw new InvalidConfigurationError(`${file} not a file`)\n } else {\n return file\n }\n}\n"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { SignOptions } from "@electron/osx-sign/dist/cjs/types";
|
|
2
|
-
import { TmpDir } from "builder-util";
|
|
3
|
-
import { Nullish } from "builder-util-runtime";
|
|
4
|
-
export declare const appleCertificatePrefixes: string[];
|
|
5
|
-
export type CertType = "Developer ID Application" | "Developer ID Installer" | "3rd Party Mac Developer Application" | "3rd Party Mac Developer Installer" | "Mac Developer" | "Apple Development" | "Apple Distribution";
|
|
6
|
-
export interface CodeSigningInfo {
|
|
7
|
-
keychainFile?: string | null;
|
|
8
|
-
}
|
|
9
|
-
export declare function isSignAllowed(isPrintWarn?: boolean): boolean;
|
|
10
|
-
export declare function reportError(isMas: boolean, certificateTypes: CertType[], qualifier: string | Nullish, keychainFile: string | Nullish, isForceCodeSigning: boolean): Promise<void>;
|
|
11
|
-
export interface CreateKeychainOptions {
|
|
12
|
-
tmpDir: TmpDir;
|
|
13
|
-
cscLink: string;
|
|
14
|
-
cscKeyPassword: string;
|
|
15
|
-
cscILink?: string | null;
|
|
16
|
-
cscIKeyPassword?: string | null;
|
|
17
|
-
currentDir: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function removeKeychain(keychainFile: string, printWarn?: boolean): Promise<any>;
|
|
20
|
-
export declare function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }: CreateKeychainOptions): Promise<CodeSigningInfo>;
|
|
21
|
-
export declare function sign(opts: SignOptions): Promise<void>;
|
|
22
|
-
export declare let findIdentityRawResult: Promise<Array<string>> | null;
|
|
23
|
-
export declare class Identity {
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly hash?: string;
|
|
26
|
-
constructor(name: string, hash?: string);
|
|
27
|
-
}
|
|
28
|
-
export declare function findIdentity(certType: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null>;
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findIdentityRawResult = exports.appleCertificatePrefixes = void 0;
|
|
4
|
-
exports.isSignAllowed = isSignAllowed;
|
|
5
|
-
exports.reportError = reportError;
|
|
6
|
-
exports.removeKeychain = removeKeychain;
|
|
7
|
-
exports.createKeychain = createKeychain;
|
|
8
|
-
exports.sign = sign;
|
|
9
|
-
exports.findIdentity = findIdentity;
|
|
10
|
-
const builder_util_1 = require("builder-util");
|
|
11
|
-
const dynamicImport_1 = require("../util/dynamicImport");
|
|
12
|
-
const crypto_1 = require("crypto");
|
|
13
|
-
const promises_1 = require("fs/promises");
|
|
14
|
-
const lazy_val_1 = require("lazy-val");
|
|
15
|
-
const os_1 = require("os");
|
|
16
|
-
const path = require("path");
|
|
17
|
-
const temp_file_1 = require("temp-file");
|
|
18
|
-
const flags_1 = require("../util/flags");
|
|
19
|
-
const codesign_1 = require("./codesign");
|
|
20
|
-
exports.appleCertificatePrefixes = ["Developer ID Application:", "Developer ID Installer:", "3rd Party Mac Developer Application:", "3rd Party Mac Developer Installer:"];
|
|
21
|
-
function isSignAllowed(isPrintWarn = true) {
|
|
22
|
-
if (process.platform !== "darwin") {
|
|
23
|
-
if (isPrintWarn) {
|
|
24
|
-
builder_util_1.log.warn({ reason: "supported only on macOS" }, "skipped macOS application code signing");
|
|
25
|
-
}
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
if ((0, builder_util_1.isPullRequest)()) {
|
|
29
|
-
const buildForPrWarning = "There are serious security concerns with CSC_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)" +
|
|
30
|
-
"\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.";
|
|
31
|
-
if ((0, builder_util_1.isEnvTrue)(process.env.CSC_FOR_PULL_REQUEST)) {
|
|
32
|
-
if (isPrintWarn) {
|
|
33
|
-
builder_util_1.log.warn(buildForPrWarning);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
if (isPrintWarn) {
|
|
38
|
-
// https://github.com/electron-userland/electron-builder/issues/1524
|
|
39
|
-
builder_util_1.log.warn("Current build is a part of pull request, code signing will be skipped." + "\nSet env CSC_FOR_PULL_REQUEST to true to force code signing." + `\n${buildForPrWarning}`);
|
|
40
|
-
}
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
async function reportError(isMas, certificateTypes, qualifier, keychainFile, isForceCodeSigning) {
|
|
47
|
-
const logFields = {};
|
|
48
|
-
if (qualifier == null) {
|
|
49
|
-
logFields.reason = "";
|
|
50
|
-
if ((0, flags_1.isAutoDiscoveryCodeSignIdentity)()) {
|
|
51
|
-
logFields.reason += `cannot find valid "${certificateTypes.join(", ")}" identity${isMas ? "" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible`}`;
|
|
52
|
-
}
|
|
53
|
-
logFields.reason += ", see https://electron.build/code-signing";
|
|
54
|
-
if (!(0, flags_1.isAutoDiscoveryCodeSignIdentity)()) {
|
|
55
|
-
logFields.CSC_IDENTITY_AUTO_DISCOVERY = false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
logFields.reason = "Identity name is specified, but no valid identity with this name in the keychain";
|
|
60
|
-
logFields.identity = qualifier;
|
|
61
|
-
}
|
|
62
|
-
const args = ["find-identity"];
|
|
63
|
-
if (keychainFile != null) {
|
|
64
|
-
args.push(keychainFile);
|
|
65
|
-
}
|
|
66
|
-
if (qualifier != null || (0, flags_1.isAutoDiscoveryCodeSignIdentity)()) {
|
|
67
|
-
logFields.allIdentities = (await (0, builder_util_1.exec)("/usr/bin/security", args))
|
|
68
|
-
.trim()
|
|
69
|
-
.split("\n")
|
|
70
|
-
.filter(it => !(it.includes("Policy: X.509 Basic") || it.includes("Matching identities")))
|
|
71
|
-
.join("\n");
|
|
72
|
-
}
|
|
73
|
-
const skipMessage = "skipped macOS application code signing";
|
|
74
|
-
if (isMas || isForceCodeSigning) {
|
|
75
|
-
throw new Error(builder_util_1.Logger.createMessage(skipMessage, logFields, "error", it => it));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
builder_util_1.log.warn(logFields, skipMessage);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// "Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list."
|
|
82
|
-
// but "security list-keychains" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list
|
|
83
|
-
// "overly complicated and introduces a race condition."
|
|
84
|
-
// https://github.com/electron-userland/electron-builder/issues/398
|
|
85
|
-
const bundledCertKeychainAdded = new lazy_val_1.Lazy(async () => {
|
|
86
|
-
// copy to temp and then atomic rename to final path
|
|
87
|
-
const cacheDir = getCacheDirectory();
|
|
88
|
-
const tmpKeychainPath = path.join(cacheDir, (0, temp_file_1.getTempName)("electron-builder-root-certs"));
|
|
89
|
-
const keychainPath = path.join(cacheDir, "electron-builder-root-certs.keychain");
|
|
90
|
-
const results = await Promise.all([
|
|
91
|
-
listUserKeychains(),
|
|
92
|
-
(0, builder_util_1.copyFile)(path.join(__dirname, "..", "..", "certs", "root_certs.keychain"), tmpKeychainPath).then(() => (0, promises_1.rename)(tmpKeychainPath, keychainPath)),
|
|
93
|
-
]);
|
|
94
|
-
const list = results[0];
|
|
95
|
-
if (!list.includes(keychainPath)) {
|
|
96
|
-
await (0, builder_util_1.exec)("/usr/bin/security", ["list-keychains", "-d", "user", "-s", keychainPath].concat(list));
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
function getCacheDirectory() {
|
|
100
|
-
const env = process.env.ELECTRON_BUILDER_CACHE;
|
|
101
|
-
return (0, builder_util_1.isEmptyOrSpaces)(env) ? path.join((0, os_1.homedir)(), "Library", "Caches", "electron-builder") : path.resolve(env);
|
|
102
|
-
}
|
|
103
|
-
function listUserKeychains() {
|
|
104
|
-
return (0, builder_util_1.exec)("/usr/bin/security", ["list-keychains", "-d", "user"]).then(it => it
|
|
105
|
-
.split("\n")
|
|
106
|
-
.map(it => {
|
|
107
|
-
const r = it.trim();
|
|
108
|
-
return r.substring(1, r.length - 1);
|
|
109
|
-
})
|
|
110
|
-
.filter(it => it.length > 0));
|
|
111
|
-
}
|
|
112
|
-
function removeKeychain(keychainFile, printWarn = true) {
|
|
113
|
-
return (0, builder_util_1.exec)("/usr/bin/security", ["delete-keychain", keychainFile]).catch((e) => {
|
|
114
|
-
if (printWarn) {
|
|
115
|
-
builder_util_1.log.warn({ file: keychainFile, error: e.stack || e }, "cannot delete keychain");
|
|
116
|
-
}
|
|
117
|
-
return (0, builder_util_1.unlinkIfExists)(keychainFile);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
async function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }) {
|
|
121
|
-
// travis has correct AppleWWDRCA cert
|
|
122
|
-
if (process.env.TRAVIS !== "true") {
|
|
123
|
-
await bundledCertKeychainAdded.value;
|
|
124
|
-
}
|
|
125
|
-
// https://github.com/electron-userland/electron-builder/issues/3685
|
|
126
|
-
// use constant file
|
|
127
|
-
const keychainFile = path.join(process.env.APP_BUILDER_TMP_DIR || (0, os_1.tmpdir)(), `${(0, crypto_1.createHash)("sha256").update(currentDir).update("app-builder").digest("hex")}.keychain`);
|
|
128
|
-
// noinspection JSUnusedLocalSymbols
|
|
129
|
-
await removeKeychain(keychainFile, false).catch(_ => {
|
|
130
|
-
/* ignore*/
|
|
131
|
-
});
|
|
132
|
-
const certLinks = [cscLink];
|
|
133
|
-
if (cscILink != null) {
|
|
134
|
-
certLinks.push(cscILink);
|
|
135
|
-
}
|
|
136
|
-
const certPaths = new Array(certLinks.length);
|
|
137
|
-
const keychainPassword = (0, crypto_1.randomBytes)(32).toString("base64");
|
|
138
|
-
const securityCommands = [
|
|
139
|
-
["create-keychain", "-p", keychainPassword, keychainFile],
|
|
140
|
-
["unlock-keychain", "-p", keychainPassword, keychainFile],
|
|
141
|
-
["set-keychain-settings", keychainFile],
|
|
142
|
-
];
|
|
143
|
-
// https://stackoverflow.com/questions/42484678/codesign-keychain-gets-ignored
|
|
144
|
-
// https://github.com/electron-userland/electron-builder/issues/1457
|
|
145
|
-
const list = await listUserKeychains();
|
|
146
|
-
if (!list.includes(keychainFile)) {
|
|
147
|
-
securityCommands.push(["list-keychains", "-d", "user", "-s", keychainFile].concat(list));
|
|
148
|
-
}
|
|
149
|
-
await Promise.all([
|
|
150
|
-
// we do not clear downloaded files - will be removed on tmpDir cleanup automatically. not a security issue since in any case data is available as env variables and protected by password.
|
|
151
|
-
...certLinks.map((link, i) => (0, codesign_1.importCertificate)(link, tmpDir, currentDir).then(it => (certPaths[i] = it))),
|
|
152
|
-
// queue each security command
|
|
153
|
-
securityCommands.reduce((promise, cmd) => promise.then(() => (0, builder_util_1.exec)("/usr/bin/security", cmd)), new Promise(resolve => resolve(null))),
|
|
154
|
-
]);
|
|
155
|
-
const cscPasswords = [cscKeyPassword];
|
|
156
|
-
if (cscIKeyPassword != null) {
|
|
157
|
-
cscPasswords.push(cscIKeyPassword);
|
|
158
|
-
}
|
|
159
|
-
return await importCerts(keychainFile, certPaths, cscPasswords);
|
|
160
|
-
}
|
|
161
|
-
async function importCerts(keychainFile, paths, keyPasswords) {
|
|
162
|
-
var _a;
|
|
163
|
-
for (let i = 0; i < paths.length; i++) {
|
|
164
|
-
const password = (_a = keyPasswords[i]) !== null && _a !== void 0 ? _a : "";
|
|
165
|
-
await (0, builder_util_1.exec)("/usr/bin/security", ["import", paths[i], "-k", keychainFile, "-T", "/usr/bin/codesign", "-T", "/usr/bin/productbuild", "-P", password]);
|
|
166
|
-
// https://stackoverflow.com/questions/39868578/security-codesign-in-sierra-keychain-ignores-access-control-settings-and-ui-p
|
|
167
|
-
// https://github.com/electron-userland/electron-packager/issues/701#issuecomment-322315996
|
|
168
|
-
await (0, builder_util_1.exec)("/usr/bin/security", ["set-key-partition-list", "-S", "apple-tool:,apple:", "-s", "-k", password, keychainFile]);
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
keychainFile,
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
async function sign(opts) {
|
|
175
|
-
const { signAsync } = await (0, dynamicImport_1.dynamicImport)("@electron/osx-sign");
|
|
176
|
-
return (0, builder_util_1.retry)(() => signAsync(opts), {
|
|
177
|
-
retries: 3,
|
|
178
|
-
interval: 5000,
|
|
179
|
-
backoff: 5000,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
exports.findIdentityRawResult = null;
|
|
183
|
-
async function getValidIdentities(keychain) {
|
|
184
|
-
function addKeychain(args) {
|
|
185
|
-
if (keychain != null) {
|
|
186
|
-
args.push(keychain);
|
|
187
|
-
}
|
|
188
|
-
return args;
|
|
189
|
-
}
|
|
190
|
-
let result = exports.findIdentityRawResult;
|
|
191
|
-
if (result == null || keychain != null) {
|
|
192
|
-
// https://github.com/electron-userland/electron-builder/issues/481
|
|
193
|
-
// https://github.com/electron-userland/electron-builder/issues/535
|
|
194
|
-
result = Promise.all([
|
|
195
|
-
(0, builder_util_1.exec)("/usr/bin/security", addKeychain(["find-identity", "-v"])).then(it => it
|
|
196
|
-
.trim()
|
|
197
|
-
.split("\n")
|
|
198
|
-
.filter(it => {
|
|
199
|
-
for (const prefix of exports.appleCertificatePrefixes) {
|
|
200
|
-
if (it.includes(prefix)) {
|
|
201
|
-
return true;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return false;
|
|
205
|
-
})),
|
|
206
|
-
(0, builder_util_1.exec)("/usr/bin/security", addKeychain(["find-identity", "-v", "-p", "codesigning"])).then(it => it.trim().split("\n")),
|
|
207
|
-
]).then(it => {
|
|
208
|
-
const array = it[0]
|
|
209
|
-
.concat(it[1])
|
|
210
|
-
.filter(it => !it.includes("(Missing required extension)") && !it.includes("valid identities found") && !it.includes("iPhone ") && !it.includes("com.apple.idms.appleid.prd."))
|
|
211
|
-
// remove 1)
|
|
212
|
-
.map(it => it.substring(it.indexOf(")") + 1).trim());
|
|
213
|
-
return Array.from(new Set(array));
|
|
214
|
-
});
|
|
215
|
-
if (keychain == null) {
|
|
216
|
-
exports.findIdentityRawResult = result;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return result;
|
|
220
|
-
}
|
|
221
|
-
async function _findIdentity(type, qualifier, keychain) {
|
|
222
|
-
// https://github.com/electron-userland/electron-builder/issues/484
|
|
223
|
-
//noinspection SpellCheckingInspection
|
|
224
|
-
const lines = await getValidIdentities(keychain);
|
|
225
|
-
const namePrefix = `${type}:`;
|
|
226
|
-
for (const line of lines) {
|
|
227
|
-
if (qualifier != null && !line.includes(qualifier)) {
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
if (line.includes(namePrefix)) {
|
|
231
|
-
return await parseIdentity(line);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
if (type === "Developer ID Application") {
|
|
235
|
-
// find non-Apple certificate
|
|
236
|
-
// https://github.com/electron-userland/electron-builder/issues/458
|
|
237
|
-
l: for (const line of lines) {
|
|
238
|
-
if (qualifier != null && !line.includes(qualifier)) {
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
if (line.includes("Mac Developer:")) {
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
for (const prefix of exports.appleCertificatePrefixes) {
|
|
245
|
-
if (line.includes(prefix)) {
|
|
246
|
-
continue l;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return await parseIdentity(line);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
async function parseIdentity(line) {
|
|
255
|
-
const firstQuoteIndex = line.indexOf('"');
|
|
256
|
-
const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('"'));
|
|
257
|
-
const hash = line.substring(0, firstQuoteIndex - 1);
|
|
258
|
-
const { Identity: IdentityClass } = await (0, dynamicImport_1.dynamicImport)("@electron/osx-sign/dist/cjs/util-identities");
|
|
259
|
-
return new IdentityClass(name, hash);
|
|
260
|
-
}
|
|
261
|
-
function findIdentity(certType, qualifier, keychain) {
|
|
262
|
-
let identity = qualifier || process.env.CSC_NAME;
|
|
263
|
-
if ((0, builder_util_1.isEmptyOrSpaces)(identity)) {
|
|
264
|
-
if ((0, flags_1.isAutoDiscoveryCodeSignIdentity)()) {
|
|
265
|
-
return _findIdentity(certType, null, keychain);
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
return Promise.resolve(null);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
identity = identity.trim();
|
|
273
|
-
for (const prefix of exports.appleCertificatePrefixes) {
|
|
274
|
-
checkPrefix(identity, prefix);
|
|
275
|
-
}
|
|
276
|
-
return _findIdentity(certType, identity, keychain);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
function checkPrefix(name, prefix) {
|
|
280
|
-
if (name.startsWith(prefix)) {
|
|
281
|
-
throw new builder_util_1.InvalidConfigurationError(`Please remove prefix "${prefix}" from the specified name — appropriate certificate will be chosen automatically`);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
//# sourceMappingURL=macCodeSign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"macCodeSign.js","sourceRoot":"","sources":["../../src/codeSign/macCodeSign.ts"],"names":[],"mappings":";;;AA4BA,sCA6BC;AAED,kCAqCC;AA+CD,wCAOC;AAED,wCA8CC;AAiBD,oBAOC;AAuGD,oCAeC;AAnVD,+CAAuK;AACvK,yDAAqD;AAErD,mCAAgD;AAChD,0CAAoC;AACpC,uCAA+B;AAC/B,2BAAoC;AACpC,6BAA4B;AAC5B,yCAAuC;AACvC,yCAA+D;AAC/D,yCAA8C;AAEjC,QAAA,wBAAwB,GAAG,CAAC,2BAA2B,EAAE,yBAAyB,EAAE,sCAAsC,EAAE,oCAAoC,CAAC,CAAA;AAe9K,SAAgB,aAAa,CAAC,WAAW,GAAG,IAAI;IAC9C,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC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AA;IACnD,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,6BAAa,EAA8D,6CAA6C,CAAC,CAAA;IACnK,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACtC,CAAC;AAED,SAAgB,YAAY,CAAC,QAAkB,EAAE,SAAyB,EAAE,QAAwB;IAClG,IAAI,QAAQ,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;IAChD,IAAI,IAAA,8BAAe,EAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,IAAI,IAAA,uCAA+B,GAAE,EAAE,CAAC;YACtC,OAAO,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAChD,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC9B,CAAC;IACH,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;QAC1B,KAAK,MAAM,MAAM,IAAI,gCAAwB,EAAE,CAAC;YAC9C,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC/B,CAAC;QACD,OAAO,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACpD,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,MAAc;IAC/C,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,wCAAyB,CAAC,yBAAyB,MAAM,kFAAkF,CAAC,CAAA;IACxJ,CAAC;AACH,CAAC","sourcesContent":["import type { SignOptions } from \"@electron/osx-sign/dist/cjs/types\"\nimport { copyFile, exec, Fields, InvalidConfigurationError, isEmptyOrSpaces, isEnvTrue, isPullRequest, log, Logger, retry, TmpDir, unlinkIfExists } from \"builder-util\"\nimport { dynamicImport } from \"../util/dynamicImport\"\nimport { Nullish } from \"builder-util-runtime\"\nimport { createHash, randomBytes } from \"crypto\"\nimport { rename } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport { homedir, tmpdir } from \"os\"\nimport * as path from \"path\"\nimport { getTempName } from \"temp-file\"\nimport { isAutoDiscoveryCodeSignIdentity } from \"../util/flags\"\nimport { importCertificate } from \"./codesign\"\n\nexport const appleCertificatePrefixes = [\"Developer ID Application:\", \"Developer ID Installer:\", \"3rd Party Mac Developer Application:\", \"3rd Party Mac Developer Installer:\"]\n\nexport type CertType =\n | \"Developer ID Application\"\n | \"Developer ID Installer\"\n | \"3rd Party Mac Developer Application\"\n | \"3rd Party Mac Developer Installer\"\n | \"Mac Developer\"\n | \"Apple Development\"\n | \"Apple Distribution\"\n\nexport interface CodeSigningInfo {\n keychainFile?: string | null\n}\n\nexport function isSignAllowed(isPrintWarn = true): boolean {\n if (process.platform !== \"darwin\") {\n if (isPrintWarn) {\n log.warn({ reason: \"supported only on macOS\" }, \"skipped macOS application code signing\")\n }\n return false\n }\n\n if (isPullRequest()) {\n const buildForPrWarning =\n \"There are serious security concerns with CSC_FOR_PULL_REQUEST=true (see the CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)\" +\n \"\\nIf you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.\"\n\n if (isEnvTrue(process.env.CSC_FOR_PULL_REQUEST)) {\n if (isPrintWarn) {\n log.warn(buildForPrWarning)\n }\n } else {\n if (isPrintWarn) {\n // https://github.com/electron-userland/electron-builder/issues/1524\n log.warn(\n \"Current build is a part of pull request, code signing will be skipped.\" + \"\\nSet env CSC_FOR_PULL_REQUEST to true to force code signing.\" + `\\n${buildForPrWarning}`\n )\n }\n return false\n }\n }\n\n return true\n}\n\nexport async function reportError(isMas: boolean, certificateTypes: CertType[], qualifier: string | Nullish, keychainFile: string | Nullish, isForceCodeSigning: boolean) {\n const logFields: Fields = {}\n if (qualifier == null) {\n logFields.reason = \"\"\n if (isAutoDiscoveryCodeSignIdentity()) {\n logFields.reason += `cannot find valid \"${certificateTypes.join(\", \")}\" identity${\n isMas ? \"\" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible`\n }`\n }\n logFields.reason += \", see https://electron.build/code-signing\"\n if (!isAutoDiscoveryCodeSignIdentity()) {\n logFields.CSC_IDENTITY_AUTO_DISCOVERY = false\n }\n } else {\n logFields.reason = \"Identity name is specified, but no valid identity with this name in the keychain\"\n logFields.identity = qualifier\n }\n\n const args = [\"find-identity\"]\n if (keychainFile != null) {\n args.push(keychainFile)\n }\n\n if (qualifier != null || isAutoDiscoveryCodeSignIdentity()) {\n logFields.allIdentities = (await exec(\"/usr/bin/security\", args))\n .trim()\n .split(\"\\n\")\n .filter(it => !(it.includes(\"Policy: X.509 Basic\") || it.includes(\"Matching identities\")))\n .join(\"\\n\")\n }\n\n const skipMessage = \"skipped macOS application code signing\"\n if (isMas || isForceCodeSigning) {\n throw new Error(Logger.createMessage(skipMessage, logFields, \"error\", it => it))\n } else {\n log.warn(logFields, skipMessage)\n }\n}\n\n// \"Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list.\"\n// but \"security list-keychains\" doesn't support add - we should 1) get current list 2) set new list - it is very bad http://stackoverflow.com/questions/10538942/add-a-keychain-to-search-list\n// \"overly complicated and introduces a race condition.\"\n// https://github.com/electron-userland/electron-builder/issues/398\nconst bundledCertKeychainAdded = new Lazy<void>(async () => {\n // copy to temp and then atomic rename to final path\n const cacheDir = getCacheDirectory()\n const tmpKeychainPath = path.join(cacheDir, getTempName(\"electron-builder-root-certs\"))\n const keychainPath = path.join(cacheDir, \"electron-builder-root-certs.keychain\")\n const results = await Promise.all<any>([\n listUserKeychains(),\n copyFile(path.join(__dirname, \"..\", \"..\", \"certs\", \"root_certs.keychain\"), tmpKeychainPath).then(() => rename(tmpKeychainPath, keychainPath)),\n ])\n const list = results[0]\n if (!list.includes(keychainPath)) {\n await exec(\"/usr/bin/security\", [\"list-keychains\", \"-d\", \"user\", \"-s\", keychainPath].concat(list))\n }\n})\n\nfunction getCacheDirectory(): string {\n const env = process.env.ELECTRON_BUILDER_CACHE\n return isEmptyOrSpaces(env) ? path.join(homedir(), \"Library\", \"Caches\", \"electron-builder\") : path.resolve(env)\n}\n\nfunction listUserKeychains(): Promise<Array<string>> {\n return exec(\"/usr/bin/security\", [\"list-keychains\", \"-d\", \"user\"]).then(it =>\n it\n .split(\"\\n\")\n .map(it => {\n const r = it.trim()\n return r.substring(1, r.length - 1)\n })\n .filter(it => it.length > 0)\n )\n}\n\nexport interface CreateKeychainOptions {\n tmpDir: TmpDir\n cscLink: string\n cscKeyPassword: string\n cscILink?: string | null\n cscIKeyPassword?: string | null\n currentDir: string\n}\n\nexport function removeKeychain(keychainFile: string, printWarn = true): Promise<any> {\n return exec(\"/usr/bin/security\", [\"delete-keychain\", keychainFile]).catch((e: any) => {\n if (printWarn) {\n log.warn({ file: keychainFile, error: e.stack || e }, \"cannot delete keychain\")\n }\n return unlinkIfExists(keychainFile)\n })\n}\n\nexport async function createKeychain({ tmpDir, cscLink, cscKeyPassword, cscILink, cscIKeyPassword, currentDir }: CreateKeychainOptions): Promise<CodeSigningInfo> {\n // travis has correct AppleWWDRCA cert\n if (process.env.TRAVIS !== \"true\") {\n await bundledCertKeychainAdded.value\n }\n\n // https://github.com/electron-userland/electron-builder/issues/3685\n // use constant file\n const keychainFile = path.join(process.env.APP_BUILDER_TMP_DIR || tmpdir(), `${createHash(\"sha256\").update(currentDir).update(\"app-builder\").digest(\"hex\")}.keychain`)\n // noinspection JSUnusedLocalSymbols\n\n await removeKeychain(keychainFile, false).catch(_ => {\n /* ignore*/\n })\n\n const certLinks = [cscLink]\n if (cscILink != null) {\n certLinks.push(cscILink)\n }\n\n const certPaths = new Array(certLinks.length)\n const keychainPassword = randomBytes(32).toString(\"base64\")\n const securityCommands = [\n [\"create-keychain\", \"-p\", keychainPassword, keychainFile],\n [\"unlock-keychain\", \"-p\", keychainPassword, keychainFile],\n [\"set-keychain-settings\", keychainFile],\n ]\n\n // https://stackoverflow.com/questions/42484678/codesign-keychain-gets-ignored\n // https://github.com/electron-userland/electron-builder/issues/1457\n const list = await listUserKeychains()\n if (!list.includes(keychainFile)) {\n securityCommands.push([\"list-keychains\", \"-d\", \"user\", \"-s\", keychainFile].concat(list))\n }\n\n await Promise.all([\n // we do not clear downloaded files - will be removed on tmpDir cleanup automatically. not a security issue since in any case data is available as env variables and protected by password.\n ...certLinks.map((link, i) => importCertificate(link, tmpDir, currentDir).then(it => (certPaths[i] = it))),\n // queue each security command\n securityCommands.reduce((promise, cmd) => promise.then(() => exec(\"/usr/bin/security\", cmd)), new Promise(resolve => resolve(null))),\n ])\n const cscPasswords: Array<string> = [cscKeyPassword]\n if (cscIKeyPassword != null) {\n cscPasswords.push(cscIKeyPassword)\n }\n return await importCerts(keychainFile, certPaths, cscPasswords)\n}\n\nasync function importCerts(keychainFile: string, paths: Array<string>, keyPasswords: Array<string>): Promise<CodeSigningInfo> {\n for (let i = 0; i < paths.length; i++) {\n const password = keyPasswords[i] ?? \"\"\n await exec(\"/usr/bin/security\", [\"import\", paths[i], \"-k\", keychainFile, \"-T\", \"/usr/bin/codesign\", \"-T\", \"/usr/bin/productbuild\", \"-P\", password])\n\n // https://stackoverflow.com/questions/39868578/security-codesign-in-sierra-keychain-ignores-access-control-settings-and-ui-p\n // https://github.com/electron-userland/electron-packager/issues/701#issuecomment-322315996\n await exec(\"/usr/bin/security\", [\"set-key-partition-list\", \"-S\", \"apple-tool:,apple:\", \"-s\", \"-k\", password, keychainFile])\n }\n\n return {\n keychainFile,\n }\n}\n\nexport async function sign(opts: SignOptions): Promise<void> {\n const { signAsync } = await dynamicImport<typeof import(\"@electron/osx-sign\")>(\"@electron/osx-sign\")\n return retry(() => signAsync(opts), {\n retries: 3,\n interval: 5000,\n backoff: 5000,\n })\n}\n\nexport let findIdentityRawResult: Promise<Array<string>> | null = null\n\nasync function getValidIdentities(keychain?: string | null): Promise<Array<string>> {\n function addKeychain(args: Array<string>) {\n if (keychain != null) {\n args.push(keychain)\n }\n return args\n }\n\n let result = findIdentityRawResult\n if (result == null || keychain != null) {\n // https://github.com/electron-userland/electron-builder/issues/481\n // https://github.com/electron-userland/electron-builder/issues/535\n result = Promise.all<Array<string>>([\n exec(\"/usr/bin/security\", addKeychain([\"find-identity\", \"-v\"])).then(it =>\n it\n .trim()\n .split(\"\\n\")\n .filter(it => {\n for (const prefix of appleCertificatePrefixes) {\n if (it.includes(prefix)) {\n return true\n }\n }\n return false\n })\n ),\n exec(\"/usr/bin/security\", addKeychain([\"find-identity\", \"-v\", \"-p\", \"codesigning\"])).then(it => it.trim().split(\"\\n\")),\n ]).then(it => {\n const array = it[0]\n .concat(it[1])\n .filter(\n it => !it.includes(\"(Missing required extension)\") && !it.includes(\"valid identities found\") && !it.includes(\"iPhone \") && !it.includes(\"com.apple.idms.appleid.prd.\")\n )\n // remove 1)\n .map(it => it.substring(it.indexOf(\")\") + 1).trim())\n return Array.from(new Set(array))\n })\n\n if (keychain == null) {\n findIdentityRawResult = result\n }\n }\n return result\n}\n\nasync function _findIdentity(type: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null> {\n // https://github.com/electron-userland/electron-builder/issues/484\n //noinspection SpellCheckingInspection\n const lines = await getValidIdentities(keychain)\n const namePrefix = `${type}:`\n for (const line of lines) {\n if (qualifier != null && !line.includes(qualifier)) {\n continue\n }\n\n if (line.includes(namePrefix)) {\n return await parseIdentity(line)\n }\n }\n\n if (type === \"Developer ID Application\") {\n // find non-Apple certificate\n // https://github.com/electron-userland/electron-builder/issues/458\n l: for (const line of lines) {\n if (qualifier != null && !line.includes(qualifier)) {\n continue\n }\n\n if (line.includes(\"Mac Developer:\")) {\n continue\n }\n\n for (const prefix of appleCertificatePrefixes) {\n if (line.includes(prefix)) {\n continue l\n }\n }\n\n return await parseIdentity(line)\n }\n }\n return null\n}\n\nexport declare class Identity {\n readonly name: string\n readonly hash?: string\n\n constructor(name: string, hash?: string)\n}\n\nasync function parseIdentity(line: string): Promise<Identity> {\n const firstQuoteIndex = line.indexOf('\"')\n const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('\"'))\n const hash = line.substring(0, firstQuoteIndex - 1)\n const { Identity: IdentityClass } = await dynamicImport<{ Identity: new (name: string, hash?: string) => Identity }>(\"@electron/osx-sign/dist/cjs/util-identities\")\n return new IdentityClass(name, hash)\n}\n\nexport function findIdentity(certType: CertType, qualifier?: string | null, keychain?: string | null): Promise<Identity | null> {\n let identity = qualifier || process.env.CSC_NAME\n if (isEmptyOrSpaces(identity)) {\n if (isAutoDiscoveryCodeSignIdentity()) {\n return _findIdentity(certType, null, keychain)\n } else {\n return Promise.resolve(null)\n }\n } else {\n identity = identity.trim()\n for (const prefix of appleCertificatePrefixes) {\n checkPrefix(identity, prefix)\n }\n return _findIdentity(certType, identity, keychain)\n }\n}\n\nfunction checkPrefix(name: string, prefix: string) {\n if (name.startsWith(prefix)) {\n throw new InvalidConfigurationError(`Please remove prefix \"${prefix}\" from the specified name — appropriate certificate will be chosen automatically`)\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MemoLazy, Nullish } from "builder-util-runtime";
|
|
2
|
-
import { Lazy } from "lazy-val";
|
|
3
|
-
import { Target } from "../core";
|
|
4
|
-
import { WindowsConfiguration } from "../options/winOptions";
|
|
5
|
-
import { WindowsSignOptions } from "./windowsCodeSign";
|
|
6
|
-
import { CertificateFromStoreInfo, FileCodeSigningInfo } from "./windowsSignToolManager";
|
|
7
|
-
export interface SignManager {
|
|
8
|
-
readonly computedPublisherName: Lazy<Array<string> | null>;
|
|
9
|
-
readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>;
|
|
10
|
-
computePublisherName(target: Target, publisherName: string | Nullish): Promise<string>;
|
|
11
|
-
initialize(): Promise<void>;
|
|
12
|
-
signFile(options: WindowsSignOptions): Promise<boolean>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signManager.js","sourceRoot":"","sources":["../../src/codeSign/signManager.ts"],"names":[],"mappings":"","sourcesContent":["import { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport { Lazy } from \"lazy-val\"\nimport { Target } from \"../core\"\nimport { WindowsConfiguration } from \"../options/winOptions\"\nimport { WindowsSignOptions } from \"./windowsCodeSign\"\nimport { CertificateFromStoreInfo, FileCodeSigningInfo } from \"./windowsSignToolManager\"\n\nexport interface SignManager {\n readonly computedPublisherName: Lazy<Array<string> | null>\n readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>\n computePublisherName(target: Target, publisherName: string | Nullish): Promise<string>\n initialize(): Promise<void>\n signFile(options: WindowsSignOptions): Promise<boolean>\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WindowsConfiguration } from "../options/winOptions";
|
|
2
|
-
import { WinPackager } from "../winPackager";
|
|
3
|
-
export interface WindowsSignOptions {
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly options: WindowsConfiguration;
|
|
6
|
-
}
|
|
7
|
-
export declare function signWindows(options: WindowsSignOptions, packager: WinPackager): Promise<boolean>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.signWindows = signWindows;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
async function signWindows(options, packager) {
|
|
6
|
-
if (options.options.azureSignOptions) {
|
|
7
|
-
if (options.options.signtoolOptions) {
|
|
8
|
-
builder_util_1.log.warn(null, "ignoring signtool options, using Azure Trusted Signing; please only configure one");
|
|
9
|
-
}
|
|
10
|
-
builder_util_1.log.info({ path: builder_util_1.log.filePath(options.path) }, "signing with Azure Trusted Signing");
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
builder_util_1.log.info({ path: builder_util_1.log.filePath(options.path) }, "signing with signtool.exe");
|
|
14
|
-
}
|
|
15
|
-
const packageManager = await packager.signingManager.value;
|
|
16
|
-
return signWithRetry(async () => packageManager.signFile(options));
|
|
17
|
-
}
|
|
18
|
-
function signWithRetry(signer) {
|
|
19
|
-
return (0, builder_util_1.retry)(signer, {
|
|
20
|
-
retries: 3,
|
|
21
|
-
interval: 1000,
|
|
22
|
-
backoff: 1000,
|
|
23
|
-
shouldRetry: (e) => {
|
|
24
|
-
const message = e.message;
|
|
25
|
-
if (
|
|
26
|
-
// https://github.com/electron-userland/electron-builder/issues/1414
|
|
27
|
-
(message === null || message === void 0 ? void 0 : message.includes("Couldn't resolve host name")) ||
|
|
28
|
-
(
|
|
29
|
-
// https://github.com/electron-userland/electron-builder/issues/8615
|
|
30
|
-
message === null || message === void 0 ? void 0 : message.includes("being used by another process."))) {
|
|
31
|
-
builder_util_1.log.warn({ error: message }, "attempt to sign failed, another attempt will be made");
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=windowsCodeSign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"windowsCodeSign.js","sourceRoot":"","sources":["../../src/codeSign/windowsCodeSign.ts"],"names":[],"mappings":";;AASA,kCAWC;AApBD,+CAAyC;AASlC,KAAK,UAAU,WAAW,CAAC,OAA2B,EAAE,QAAqB;IAClF,IAAI,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;YACpC,kBAAG,CAAC,IAAI,CAAC,IAAI,EAAE,mFAAmF,CAAC,CAAA;QACrG,CAAC;QACD,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,oCAAoC,CAAC,CAAA;IACtF,CAAC;SAAM,CAAC;QACN,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kBAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAA;IAC7E,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAA;IAC1D,OAAO,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA;AACpE,CAAC;AAED,SAAS,aAAa,CAAC,MAA8B;IACnD,OAAO,IAAA,oBAAK,EAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,CAAC,CAAM,EAAE,EAAE;YACtB,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAA;YACzB;YACE,oEAAoE;YACpE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,4BAA4B,CAAC;;gBAC/C,oEAAoE;gBACpE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,gCAAgC,CAAC,CAAA,EACnD,CAAC;gBACD,kBAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,sDAAsD,CAAC,CAAA;gBACpF,OAAO,IAAI,CAAA;YACb,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { log, retry } from \"builder-util\"\nimport { WindowsConfiguration } from \"../options/winOptions\"\nimport { WinPackager } from \"../winPackager\"\n\nexport interface WindowsSignOptions {\n readonly path: string\n readonly options: WindowsConfiguration\n}\n\nexport async function signWindows(options: WindowsSignOptions, packager: WinPackager): Promise<boolean> {\n if (options.options.azureSignOptions) {\n if (options.options.signtoolOptions) {\n log.warn(null, \"ignoring signtool options, using Azure Trusted Signing; please only configure one\")\n }\n log.info({ path: log.filePath(options.path) }, \"signing with Azure Trusted Signing\")\n } else {\n log.info({ path: log.filePath(options.path) }, \"signing with signtool.exe\")\n }\n const packageManager = await packager.signingManager.value\n return signWithRetry(async () => packageManager.signFile(options))\n}\n\nfunction signWithRetry(signer: () => Promise<boolean>): Promise<boolean> {\n return retry(signer, {\n retries: 3,\n interval: 1000,\n backoff: 1000,\n shouldRetry: (e: any) => {\n const message = e.message\n if (\n // https://github.com/electron-userland/electron-builder/issues/1414\n message?.includes(\"Couldn't resolve host name\") ||\n // https://github.com/electron-userland/electron-builder/issues/8615\n message?.includes(\"being used by another process.\")\n ) {\n log.warn({ error: message }, \"attempt to sign failed, another attempt will be made\")\n return true\n }\n return false\n },\n })\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MemoLazy } from "builder-util-runtime";
|
|
2
|
-
import { Lazy } from "lazy-val";
|
|
3
|
-
import { WindowsConfiguration } from "../options/winOptions";
|
|
4
|
-
import { WinPackager } from "../winPackager";
|
|
5
|
-
import { SignManager } from "./signManager";
|
|
6
|
-
import { WindowsSignOptions } from "./windowsCodeSign";
|
|
7
|
-
import { CertificateFromStoreInfo, FileCodeSigningInfo } from "./windowsSignToolManager";
|
|
8
|
-
export declare class WindowsSignAzureManager implements SignManager {
|
|
9
|
-
private readonly packager;
|
|
10
|
-
private readonly platformSpecificBuildOptions;
|
|
11
|
-
readonly computedPublisherName: Lazy<string[] | null>;
|
|
12
|
-
constructor(packager: WinPackager);
|
|
13
|
-
initialize(): Promise<void>;
|
|
14
|
-
computePublisherName(): Promise<string>;
|
|
15
|
-
readonly cscInfo: MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>;
|
|
16
|
-
signFile(options: WindowsSignOptions): Promise<boolean>;
|
|
17
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WindowsSignAzureManager = void 0;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
6
|
-
const lazy_val_1 = require("lazy-val");
|
|
7
|
-
class WindowsSignAzureManager {
|
|
8
|
-
constructor(packager) {
|
|
9
|
-
this.packager = packager;
|
|
10
|
-
this.computedPublisherName = new lazy_val_1.Lazy(() => {
|
|
11
|
-
var _a;
|
|
12
|
-
const publisherName = (_a = this.platformSpecificBuildOptions.azureSignOptions) === null || _a === void 0 ? void 0 : _a.publisherName;
|
|
13
|
-
if (publisherName === null) {
|
|
14
|
-
return Promise.resolve(null);
|
|
15
|
-
}
|
|
16
|
-
else if (publisherName != null) {
|
|
17
|
-
return Promise.resolve((0, builder_util_1.asArray)(publisherName));
|
|
18
|
-
}
|
|
19
|
-
// TODO: Is there another way to automatically pull Publisher Name from AzureTrusted service?
|
|
20
|
-
// For now return null.
|
|
21
|
-
return Promise.resolve(null);
|
|
22
|
-
});
|
|
23
|
-
this.cscInfo = new builder_util_runtime_1.MemoLazy(() => this.packager.platformSpecificBuildOptions, _selected => Promise.resolve(null));
|
|
24
|
-
this.platformSpecificBuildOptions = packager.platformSpecificBuildOptions;
|
|
25
|
-
}
|
|
26
|
-
async initialize() {
|
|
27
|
-
const vm = await this.packager.vm.value;
|
|
28
|
-
const ps = await vm.powershellCommand.value;
|
|
29
|
-
builder_util_1.log.info(null, "installing required module (TrustedSigning) with scope CurrentUser");
|
|
30
|
-
try {
|
|
31
|
-
await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser"]);
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
// Might not be needed, seems GH runners already have NuGet set up.
|
|
35
|
-
// Logging to debug just in case users run into this. If NuGet isn't present, Install-Module -Name TrustedSigning will fail, so we'll get the logs at that point
|
|
36
|
-
builder_util_1.log.debug({ message: error.message || error.stack }, "unable to install PackageProvider Nuget. Might be a false alarm though as some systems already have it installed");
|
|
37
|
-
}
|
|
38
|
-
await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", "Install-Module -Name TrustedSigning -MinimumVersion 0.5.0 -Force -Repository PSGallery -Scope CurrentUser"]);
|
|
39
|
-
// If signing has been misconfigured it, the error from the TrustedSigning module should be descriptive enough to help them fix their configuration.
|
|
40
|
-
// Options: https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition
|
|
41
|
-
}
|
|
42
|
-
computePublisherName() {
|
|
43
|
-
return Promise.resolve(this.packager.platformSpecificBuildOptions.azureSignOptions.publisherName);
|
|
44
|
-
}
|
|
45
|
-
// prerequisite: requires `initializeProviderModules` to already have been executed
|
|
46
|
-
async signFile(options) {
|
|
47
|
-
const vm = await this.packager.vm.value;
|
|
48
|
-
const ps = await vm.powershellCommand.value;
|
|
49
|
-
const { publisherName: _publisher, // extract from `extraSigningArgs`
|
|
50
|
-
endpoint, certificateProfileName, codeSigningAccountName, fileDigest, timestampRfc3161, timestampDigest, ...extraSigningArgs } = options.options.azureSignOptions;
|
|
51
|
-
const params = {
|
|
52
|
-
...extraSigningArgs,
|
|
53
|
-
Endpoint: endpoint,
|
|
54
|
-
CertificateProfileName: certificateProfileName,
|
|
55
|
-
CodeSigningAccountName: codeSigningAccountName,
|
|
56
|
-
TimestampRfc3161: timestampRfc3161 || "http://timestamp.acs.microsoft.com",
|
|
57
|
-
TimestampDigest: timestampDigest || "SHA256",
|
|
58
|
-
FileDigest: fileDigest || "SHA256",
|
|
59
|
-
Files: vm.toVmFile(options.path),
|
|
60
|
-
};
|
|
61
|
-
const paramsString = Object.entries(params)
|
|
62
|
-
.filter(([_, value]) => value != null)
|
|
63
|
-
.reduce((res, [field, value]) => {
|
|
64
|
-
const escapedValue = String(value).replace(/'/g, "''");
|
|
65
|
-
return [...res, `-${field}`, `'${escapedValue}'`];
|
|
66
|
-
}, [])
|
|
67
|
-
.join(" ");
|
|
68
|
-
await vm.exec(ps, ["-NoProfile", "-NonInteractive", "-Command", `Invoke-TrustedSigning ${paramsString}`]);
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.WindowsSignAzureManager = WindowsSignAzureManager;
|
|
73
|
-
//# sourceMappingURL=windowsSignAzureManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"windowsSignAzureManager.js","sourceRoot":"","sources":["../../src/codeSign/windowsSignAzureManager.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,+DAA+C;AAC/C,uCAA+B;AAO/B,MAAa,uBAAuB;IAgBlC,YAA6B,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAbzC,0BAAqB,GAAG,IAAI,eAAI,CAAuB,GAAG,EAAE;;YACnE,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,0CAAE,aAAa,CAAA;YACvF,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;gBAC3B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC9B,CAAC;iBAAM,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;gBACjC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAA,sBAAO,EAAC,aAAa,CAAC,CAAC,CAAA;YAChD,CAAC;YAED,6FAA6F;YAC7F,uBAAuB;YACvB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAC9B,CAAC,CAAC,CAAA;QA2BO,YAAO,GAAG,IAAI,+BAAQ,CAC7B,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,4BAA4B,EAChD,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CACnC,CAAA;QA3BC,IAAI,CAAC,4BAA4B,GAAG,QAAQ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EAChB,eAAe,EACf,GAAG,gBAAgB,EACpB,GAAqC,OAAO,CAAC,OAAO,CAAC,gBAAiB,CAAA;QACvE,MAAM,MAAM,GAAG;YACb,GAAG,gBAAgB;YACnB,QAAQ,EAAE,QAAQ;YAClB,sBAAsB,EAAE,sBAAsB;YAC9C,sBAAsB,EAAE,sBAAsB;YAC9C,gBAAgB,EAAE,gBAAgB,IAAI,oCAAoC;YAC1E,eAAe,EAAE,eAAe,IAAI,QAAQ;YAC5C,UAAU,EAAE,UAAU,IAAI,QAAQ;YAClC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;SACjC,CAAA;QACD,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;aACxC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC;aACrC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9B,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;YACtD,OAAO,CAAC,GAAG,GAAG,EAAE,IAAI,KAAK,EAAE,EAAE,IAAI,YAAY,GAAG,CAAC,CAAA;QACnD,CAAC,EAAE,EAAc,CAAC;aACjB,IAAI,CAAC,GAAG,CAAC,CAAA;QACZ,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,yBAAyB,YAAY,EAAE,CAAC,CAAC,CAAA;QAEzG,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAjFD,0DAiFC","sourcesContent":["import { asArray, log } from \"builder-util\"\nimport { MemoLazy } from \"builder-util-runtime\"\nimport { Lazy } from \"lazy-val\"\nimport { WindowsAzureSigningConfiguration, WindowsConfiguration } from \"../options/winOptions\"\nimport { WinPackager } from \"../winPackager\"\nimport { SignManager } from \"./signManager\"\nimport { WindowsSignOptions } from \"./windowsCodeSign\"\nimport { CertificateFromStoreInfo, FileCodeSigningInfo } from \"./windowsSignToolManager\"\n\nexport class WindowsSignAzureManager implements SignManager {\n private readonly platformSpecificBuildOptions: WindowsConfiguration\n\n readonly computedPublisherName = new Lazy<Array<string> | null>(() => {\n const publisherName = this.platformSpecificBuildOptions.azureSignOptions?.publisherName\n if (publisherName === null) {\n return Promise.resolve(null)\n } else if (publisherName != null) {\n return Promise.resolve(asArray(publisherName))\n }\n\n // TODO: Is there another way to automatically pull Publisher Name from AzureTrusted service?\n // For now return null.\n return Promise.resolve(null)\n })\n\n constructor(private readonly packager: WinPackager) {\n this.platformSpecificBuildOptions = packager.platformSpecificBuildOptions\n }\n\n async initialize() {\n const vm = await this.packager.vm.value\n const ps = await vm.powershellCommand.value\n\n log.info(null, \"installing required module (TrustedSigning) with scope CurrentUser\")\n try {\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", \"Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser\"])\n } catch (error: any) {\n // Might not be needed, seems GH runners already have NuGet set up.\n // Logging to debug just in case users run into this. If NuGet isn't present, Install-Module -Name TrustedSigning will fail, so we'll get the logs at that point\n log.debug({ message: error.message || error.stack }, \"unable to install PackageProvider Nuget. Might be a false alarm though as some systems already have it installed\")\n }\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", \"Install-Module -Name TrustedSigning -MinimumVersion 0.5.0 -Force -Repository PSGallery -Scope CurrentUser\"])\n\n // If signing has been misconfigured it, the error from the TrustedSigning module should be descriptive enough to help them fix their configuration.\n // Options: https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition\n }\n\n computePublisherName(): Promise<string> {\n return Promise.resolve(this.packager.platformSpecificBuildOptions.azureSignOptions!.publisherName)\n }\n readonly cscInfo = new MemoLazy<WindowsConfiguration, FileCodeSigningInfo | CertificateFromStoreInfo | null>(\n () => this.packager.platformSpecificBuildOptions,\n _selected => Promise.resolve(null)\n )\n // prerequisite: requires `initializeProviderModules` to already have been executed\n async signFile(options: WindowsSignOptions): Promise<boolean> {\n const vm = await this.packager.vm.value\n const ps = await vm.powershellCommand.value\n\n const {\n publisherName: _publisher, // extract from `extraSigningArgs`\n endpoint,\n certificateProfileName,\n codeSigningAccountName,\n fileDigest,\n timestampRfc3161,\n timestampDigest,\n ...extraSigningArgs\n }: WindowsAzureSigningConfiguration = options.options.azureSignOptions!\n const params = {\n ...extraSigningArgs,\n Endpoint: endpoint,\n CertificateProfileName: certificateProfileName,\n CodeSigningAccountName: codeSigningAccountName,\n TimestampRfc3161: timestampRfc3161 || \"http://timestamp.acs.microsoft.com\",\n TimestampDigest: timestampDigest || \"SHA256\",\n FileDigest: fileDigest || \"SHA256\",\n Files: vm.toVmFile(options.path),\n }\n const paramsString = Object.entries(params)\n .filter(([_, value]) => value != null)\n .reduce((res, [field, value]) => {\n const escapedValue = String(value).replace(/'/g, \"''\")\n return [...res, `-${field}`, `'${escapedValue}'`]\n }, [] as string[])\n .join(\" \")\n await vm.exec(ps, [\"-NoProfile\", \"-NonInteractive\", \"-Command\", `Invoke-TrustedSigning ${paramsString}`])\n\n return true\n }\n}\n"]}
|