app-builder-lib 27.0.0-alpha.1 → 27.0.0-alpha.11
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 +2 -0
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js.map +1 -1
- package/dist/appInfo.d.ts +1 -1
- package/dist/appInfo.d.ts.map +1 -1
- package/dist/appInfo.js +3 -3
- package/dist/appInfo.js.map +1 -1
- package/dist/asar/asar.js.map +1 -1
- package/dist/asar/asarAlign.d.ts +35 -0
- package/dist/asar/asarAlign.d.ts.map +1 -0
- package/dist/asar/asarAlign.js +149 -0
- package/dist/asar/asarAlign.js.map +1 -0
- package/dist/asar/asarFileChecker.d.ts +4 -2
- package/dist/asar/asarFileChecker.d.ts.map +1 -1
- package/dist/asar/asarFileChecker.js +2 -3
- package/dist/asar/asarFileChecker.js.map +1 -1
- package/dist/asar/asarUtil.d.ts +15 -1
- package/dist/asar/asarUtil.d.ts.map +1 -1
- package/dist/asar/asarUtil.js +132 -72
- package/dist/asar/asarUtil.js.map +1 -1
- package/dist/codeSign/certInfo.d.ts +14 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -1
- package/dist/codeSign/certInfo.js +49 -0
- package/dist/codeSign/certInfo.js.map +1 -1
- package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +50 -25
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/signResult.d.ts +26 -0
- package/dist/codeSign/signResult.d.ts.map +1 -0
- package/dist/codeSign/signResult.js +12 -0
- package/dist/codeSign/signResult.js.map +1 -0
- package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
- package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/hsmSignManager.js +50 -0
- package/dist/codeSign/win/hsmSignManager.js.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.js +82 -0
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
- package/dist/codeSign/win/signManager.d.ts +17 -0
- package/dist/codeSign/win/signManager.d.ts.map +1 -0
- package/dist/codeSign/win/signManager.js +19 -0
- package/dist/codeSign/win/signManager.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +95 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js +507 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +2 -1
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
- package/dist/codeSign/win/windowsCodeSign.js +22 -8
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +11 -4
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +142 -37
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.js +3 -363
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
- package/dist/configuration.d.ts +233 -166
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +11 -1
- package/dist/configuration.js.map +1 -1
- package/dist/core.d.ts +14 -0
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +11 -0
- package/dist/core.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +3 -3
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +60 -61
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/electronArchSupport.d.ts +12 -0
- package/dist/electron/electronArchSupport.d.ts.map +1 -0
- package/dist/electron/electronArchSupport.js +58 -0
- package/dist/electron/electronArchSupport.js.map +1 -0
- package/dist/electron/electronVersion.d.ts.map +1 -1
- package/dist/electron/electronVersion.js +1 -11
- package/dist/electron/electronVersion.js.map +1 -1
- package/dist/electron/injectFFMPEG.js +2 -2
- package/dist/electron/injectFFMPEG.js.map +1 -1
- package/dist/electron/mac/electronMac.js +24 -35
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +24 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
- package/dist/electron/mac/electronMacUtils.js +42 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -0
- package/dist/electron/win/electronWin.js +2 -2
- package/dist/electron/win/electronWin.js.map +1 -1
- package/dist/fileMatcher.d.ts +55 -3
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +274 -28
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +13 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +20 -8
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +19 -7
- package/dist/indexInternal.js.map +1 -1
- package/dist/linuxPackager.d.ts.map +1 -1
- package/dist/linuxPackager.js +19 -1
- package/dist/linuxPackager.js.map +1 -1
- package/dist/macPackager.d.ts +31 -14
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +236 -147
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/index.d.ts.map +1 -1
- package/dist/node-module-collector/index.js +47 -16
- package/dist/node-module-collector/index.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +11 -2
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +34 -14
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +47 -26
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +157 -142
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/packageManager.js +1 -1
- package/dist/node-module-collector/packageManager.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +90 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +325 -25
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/types.d.ts +4 -0
- package/dist/node-module-collector/types.d.ts.map +1 -1
- package/dist/node-module-collector/types.js.map +1 -1
- package/dist/options/FuseOptionsV1.d.ts +137 -0
- package/dist/options/FuseOptionsV1.d.ts.map +1 -0
- package/dist/options/FuseOptionsV1.js +2 -0
- package/dist/options/FuseOptionsV1.js.map +1 -0
- package/dist/options/MsixOptions.d.ts +126 -0
- package/dist/options/MsixOptions.d.ts.map +1 -0
- package/dist/options/MsixOptions.js +2 -0
- package/dist/options/MsixOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +147 -12
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +59 -32
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/SquirrelWindowsOptions.d.ts +0 -5
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
- package/dist/options/SquirrelWindowsOptions.js.map +1 -1
- package/dist/options/linuxOptions.d.ts +61 -30
- package/dist/options/linuxOptions.d.ts.map +1 -1
- package/dist/options/linuxOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +113 -131
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/pkgOptions.d.ts +1 -1
- package/dist/options/pkgOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +282 -70
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js +12 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +6 -1
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +123 -40
- package/dist/packager.js.map +1 -1
- package/dist/packagerApi.d.ts +10 -1
- package/dist/packagerApi.d.ts.map +1 -1
- package/dist/packagerApi.js.map +1 -1
- package/dist/platformPackager.d.ts +55 -4
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +160 -22
- package/dist/platformPackager.js.map +1 -1
- package/dist/presets/rectCra.js +3 -1
- package/dist/presets/rectCra.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +40 -2
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +365 -23
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +108 -32
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/ArchiveTarget.d.ts +1 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -1
- package/dist/targets/ArchiveTarget.js +13 -4
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts +39 -2
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +114 -30
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/blockmap/blockmap.d.ts +44 -3
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
- package/dist/targets/blockmap/blockmap.js +142 -15
- package/dist/targets/blockmap/blockmap.js.map +1 -1
- package/dist/targets/blockmap/verbatimRange.d.ts +44 -0
- package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -0
- package/dist/targets/blockmap/verbatimRange.js +117 -0
- package/dist/targets/blockmap/verbatimRange.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +28 -2
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +75 -6
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.d.ts +17 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +245 -45
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts +14 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +92 -12
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.d.ts +13 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +81 -61
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +2 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +20 -15
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts +8 -2
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +16 -9
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.d.ts +6 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.js +18 -20
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
- package/dist/targets/linux/flatpakBundle.d.ts +43 -0
- package/dist/targets/linux/flatpakBundle.d.ts.map +1 -0
- package/dist/targets/linux/flatpakBundle.js +210 -0
- package/dist/targets/linux/flatpakBundle.js.map +1 -0
- package/dist/targets/linux/launcherScript.d.ts +32 -0
- package/dist/targets/linux/launcherScript.d.ts.map +1 -0
- package/dist/targets/linux/launcherScript.js +24 -0
- package/dist/targets/linux/launcherScript.js.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
- package/dist/targets/linux/snap/SnapTarget.js +23 -1
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +13 -2
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +107 -95
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreCustom.js +2 -2
- package/dist/targets/linux/snap/coreCustom.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +10 -3
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +37 -18
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
- package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapCommand.js +21 -0
- package/dist/targets/linux/snap/snapCommand.js.map +1 -0
- package/dist/targets/linux/snap/snapPlugs.d.ts +76 -0
- package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapPlugs.js +242 -0
- package/dist/targets/linux/snap/snapPlugs.js.map +1 -0
- package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
- package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraft.js +11 -0
- package/dist/targets/linux/snap/snapcraft.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +146 -14
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +485 -91
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts +16 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +31 -5
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/targetFactory.d.ts +7 -0
- package/dist/targets/targetFactory.d.ts.map +1 -1
- package/dist/targets/targetFactory.js +28 -0
- package/dist/targets/targetFactory.js.map +1 -1
- package/dist/targets/win/AppxTarget.d.ts +1 -2
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +37 -314
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/MsiTarget.d.ts.map +1 -1
- package/dist/targets/win/MsiTarget.js +13 -13
- package/dist/targets/win/MsiTarget.js.map +1 -1
- package/dist/targets/win/MsixTarget.d.ts +22 -0
- package/dist/targets/win/MsixTarget.d.ts.map +1 -0
- package/dist/targets/win/MsixTarget.js +214 -0
- package/dist/targets/win/MsixTarget.js.map +1 -0
- package/dist/targets/win/nsis/Defines.d.ts +4 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
- package/dist/targets/win/nsis/Defines.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts +64 -3
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +277 -113
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/WebInstallerTarget.js +23 -12
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +58 -48
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +4 -3
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts +17 -2
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +148 -41
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/targets/win/nsis/progId.d.ts +21 -0
- package/dist/targets/win/nsis/progId.d.ts.map +1 -0
- package/dist/targets/win/nsis/progId.js +60 -0
- package/dist/targets/win/nsis/progId.js.map +1 -0
- package/dist/targets/win/winAppUtil.d.ts +115 -0
- package/dist/targets/win/winAppUtil.d.ts.map +1 -0
- package/dist/targets/win/winAppUtil.js +409 -0
- package/dist/targets/win/winAppUtil.js.map +1 -0
- package/dist/toolsets/7zip.d.ts +32 -0
- package/dist/toolsets/7zip.d.ts.map +1 -1
- package/dist/toolsets/7zip.js +39 -11
- package/dist/toolsets/7zip.js.map +1 -1
- package/dist/toolsets/appimage.d.ts +3 -3
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +24 -21
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/custom.d.ts +2 -3
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +67 -149
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/fpm.d.ts.map +1 -1
- package/dist/toolsets/fpm.js +11 -5
- package/dist/toolsets/fpm.js.map +1 -1
- package/dist/toolsets/icons.d.ts.map +1 -1
- package/dist/toolsets/icons.js +17 -3
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
- package/dist/toolsets/linuxToolsMac.js +17 -4
- package/dist/toolsets/linuxToolsMac.js.map +1 -1
- package/dist/toolsets/nsis.d.ts +5 -0
- package/dist/toolsets/nsis.d.ts.map +1 -1
- package/dist/toolsets/nsis.js +20 -4
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/version.d.ts +12 -0
- package/dist/toolsets/version.d.ts.map +1 -0
- package/dist/toolsets/version.js +13 -0
- package/dist/toolsets/version.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +56 -3
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +125 -42
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wine.d.ts +2 -1
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +31 -15
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/AppFileWalker.js +9 -1
- package/dist/util/AppFileWalker.js.map +1 -1
- package/dist/util/NodeModuleCopyHelper.js +14 -6
- package/dist/util/NodeModuleCopyHelper.js.map +1 -1
- package/dist/util/appFileCopier.d.ts +67 -2
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +244 -32
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/archCompatibility.d.ts +42 -0
- package/dist/util/archCompatibility.d.ts.map +1 -0
- package/dist/util/archCompatibility.js +202 -0
- package/dist/util/archCompatibility.js.map +1 -0
- package/dist/util/checksum.d.ts +36 -0
- package/dist/util/checksum.d.ts.map +1 -0
- package/dist/util/checksum.js +48 -0
- package/dist/util/checksum.js.map +1 -0
- package/dist/util/config/config.d.ts +2 -1
- package/dist/util/config/config.d.ts.map +1 -1
- package/dist/util/config/config.js +42 -20
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/fileOptions.d.ts +30 -0
- package/dist/util/config/fileOptions.d.ts.map +1 -0
- package/dist/util/config/fileOptions.js +120 -0
- package/dist/util/config/fileOptions.js.map +1 -0
- package/dist/util/config/legacyConfigGuard.d.ts +7 -0
- package/dist/util/config/legacyConfigGuard.d.ts.map +1 -0
- package/dist/util/config/legacyConfigGuard.js +214 -0
- package/dist/util/config/legacyConfigGuard.js.map +1 -0
- package/dist/util/config/legacyOptions.d.ts +86 -0
- package/dist/util/config/legacyOptions.d.ts.map +1 -0
- package/dist/util/config/legacyOptions.js +413 -0
- package/dist/util/config/legacyOptions.js.map +1 -0
- package/dist/util/config/load.d.ts +2 -2
- package/dist/util/config/load.d.ts.map +1 -1
- package/dist/util/config/load.js +3 -12
- package/dist/util/config/load.js.map +1 -1
- package/dist/util/config/schemaValidator.d.ts.map +1 -1
- package/dist/util/config/schemaValidator.js +26 -3
- package/dist/util/config/schemaValidator.js.map +1 -1
- package/dist/util/electronGet.d.ts +43 -32
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +390 -137
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +5 -5
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +124 -16
- package/dist/util/flags.js.map +1 -1
- package/dist/util/hash.d.ts +1 -1
- package/dist/util/hash.d.ts.map +1 -1
- package/dist/util/hash.js +1 -15
- package/dist/util/hash.js.map +1 -1
- package/dist/util/installOrRebuild.d.ts +44 -0
- package/dist/util/installOrRebuild.d.ts.map +1 -0
- package/dist/util/installOrRebuild.js +276 -0
- package/dist/util/installOrRebuild.js.map +1 -0
- package/dist/util/langs.d.ts.map +1 -1
- package/dist/util/langs.js +1 -0
- package/dist/util/langs.js.map +1 -1
- package/dist/util/license.d.ts.map +1 -1
- package/dist/util/license.js +4 -1
- package/dist/util/license.js.map +1 -1
- package/dist/util/mac/macosIconComposer.d.ts +2 -1
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
- package/dist/util/mac/macosIconComposer.js +40 -58
- package/dist/util/mac/macosIconComposer.js.map +1 -1
- package/dist/util/mac/macosVersion.d.ts +0 -1
- package/dist/util/mac/macosVersion.d.ts.map +1 -1
- package/dist/util/mac/macosVersion.js +0 -3
- package/dist/util/mac/macosVersion.js.map +1 -1
- package/dist/util/mac/plist.d.ts +1 -1
- package/dist/util/mac/plist.d.ts.map +1 -1
- package/dist/util/mac/plist.js +5 -0
- package/dist/util/mac/plist.js.map +1 -1
- package/dist/util/nativeBinaryVerifier.d.ts +40 -0
- package/dist/util/nativeBinaryVerifier.d.ts.map +1 -0
- package/dist/util/nativeBinaryVerifier.js +381 -0
- package/dist/util/nativeBinaryVerifier.js.map +1 -0
- package/dist/util/packageMetadata.js +57 -31
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/util/removedEnvVars.d.ts +25 -0
- package/dist/util/removedEnvVars.d.ts.map +1 -0
- package/dist/util/removedEnvVars.js +54 -0
- package/dist/util/removedEnvVars.js.map +1 -0
- package/dist/util/repositoryInfo.js +6 -3
- package/dist/util/repositoryInfo.js.map +1 -1
- package/dist/util/resolve.js +1 -1
- package/dist/util/resolve.js.map +1 -1
- package/dist/util/streamSpawnToFile.d.ts +47 -0
- package/dist/util/streamSpawnToFile.d.ts.map +1 -0
- package/dist/util/streamSpawnToFile.js +110 -0
- package/dist/util/streamSpawnToFile.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -1
- package/dist/util/toolsetLock.js +31 -5
- package/dist/util/toolsetLock.js.map +1 -1
- package/dist/util/trustedSourceRoots.d.ts +59 -0
- package/dist/util/trustedSourceRoots.d.ts.map +1 -0
- package/dist/util/trustedSourceRoots.js +127 -0
- package/dist/util/trustedSourceRoots.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +29 -3
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/vm/vm.d.ts +2 -0
- package/dist/vm/vm.d.ts.map +1 -1
- package/dist/vm/vm.js +29 -6
- package/dist/vm/vm.js.map +1 -1
- package/dist/winPackager.d.ts +6 -5
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +45 -39
- package/dist/winPackager.js.map +1 -1
- package/package.json +20 -20
- package/scheme.json +2112 -1495
- package/templates/appx/appxmanifest.xml +2 -3
- package/templates/entitlements.mac.adhoc.plist +15 -0
- package/templates/entitlements.mac.plist +9 -6
- package/templates/msix/appxmanifest.xml +45 -0
- package/templates/nsis/assistedMessages.yml +17 -0
- package/templates/nsis/common.nsh +2 -2
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +96 -13
- package/templates/nsis/include/extractAppPackage.nsh +5 -2
- package/templates/nsis/include/installUtil.nsh +2 -2
- package/templates/nsis/include/installer.nsh +94 -53
- package/templates/nsis/include/webPackage.nsh +52 -27
- package/templates/nsis/installSection.nsh +29 -0
- package/templates/nsis/installer.nsi +1 -1
- package/templates/nsis/messages.yml +5 -0
- package/templates/nsis/multiUserUi.nsh +1 -1
- package/dist/codeSign/signManager.d.ts +0 -14
- package/dist/codeSign/signManager.d.ts.map +0 -1
- package/dist/codeSign/signManager.js +0 -2
- package/dist/codeSign/signManager.js.map +0 -1
- package/dist/util/yarn.d.ts +0 -23
- package/dist/util/yarn.d.ts.map +0 -1
- package/dist/util/yarn.js +0 -153
- package/dist/util/yarn.js.map +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { log } from "builder-util";
|
|
2
|
+
import { isValidKey } from "builder-util-runtime";
|
|
3
|
+
/** Plug resolution helpers shared by the snap cores. Kept pure (no packager state) so they can be unit tested. */
|
|
4
|
+
export const BROWSER_SUPPORT_INTERFACE = "browser-support";
|
|
5
|
+
/** Keyword in a `plugs` list that stands for electron-builder's default plug set. */
|
|
6
|
+
export const DEFAULT_PLUGS_KEYWORD = "default";
|
|
7
|
+
const MIGRATION_GUIDE = "https://www.electron.build/docs/migration/v27-breaking-changes";
|
|
8
|
+
export const CORE24_NO_ALLOW_SANDBOX_DOCS = `${MIGRATION_GUIDE}#snap-core24-no-allow-sandbox-by-default`;
|
|
9
|
+
export const CORE24_DEFAULT_PLUGS_MERGE_DOCS = `${MIGRATION_GUIDE}#snap-core24-default-in-plugs-merges-the-full-default-set`;
|
|
10
|
+
/** App-level plugs core24 declares when it is not delegating them to the `gnome` extension. */
|
|
11
|
+
export const CORE24_DEFAULT_APP_PLUGS = [
|
|
12
|
+
"desktop",
|
|
13
|
+
"desktop-legacy",
|
|
14
|
+
"home",
|
|
15
|
+
"x11",
|
|
16
|
+
"wayland",
|
|
17
|
+
"unity7",
|
|
18
|
+
"network",
|
|
19
|
+
"gsettings",
|
|
20
|
+
"audio-playback",
|
|
21
|
+
"pulseaudio",
|
|
22
|
+
"opengl",
|
|
23
|
+
];
|
|
24
|
+
/** Root-level content-snap plugs wiring up the GNOME platform, theme, and GPU content snaps manually (no extension). */
|
|
25
|
+
export function core24ContentPlugs() {
|
|
26
|
+
return {
|
|
27
|
+
"gtk-3-themes": {
|
|
28
|
+
interface: "content",
|
|
29
|
+
target: "$SNAP/data-dir/themes",
|
|
30
|
+
"default-provider": "gtk-common-themes",
|
|
31
|
+
},
|
|
32
|
+
"icon-themes": {
|
|
33
|
+
interface: "content",
|
|
34
|
+
target: "$SNAP/data-dir/icons",
|
|
35
|
+
"default-provider": "gtk-common-themes",
|
|
36
|
+
},
|
|
37
|
+
"sound-themes": {
|
|
38
|
+
interface: "content",
|
|
39
|
+
target: "$SNAP/data-dir/sounds",
|
|
40
|
+
"default-provider": "gtk-common-themes",
|
|
41
|
+
},
|
|
42
|
+
"gnome-46-2404": {
|
|
43
|
+
interface: "content",
|
|
44
|
+
target: "$SNAP/gnome-platform",
|
|
45
|
+
"default-provider": "gnome-46-2404",
|
|
46
|
+
},
|
|
47
|
+
"gpu-2404": {
|
|
48
|
+
interface: "content",
|
|
49
|
+
target: "$SNAP/gpu-2404",
|
|
50
|
+
"default-provider": "mesa-2404",
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The plugs core24 declares when `plugs` is unset.
|
|
56
|
+
*
|
|
57
|
+
* `browser-support` is requested *without* `allow-sandbox`: the snap store reserves that attribute for
|
|
58
|
+
* vetted publishers (browsers) and rejects other uploads that request it. Without it the app is launched
|
|
59
|
+
* with `--no-sandbox` and relies on the snap confinement (see SnapCore24).
|
|
60
|
+
*/
|
|
61
|
+
export function core24GeneratedPlugs(flavor, appDefaults = CORE24_DEFAULT_APP_PLUGS) {
|
|
62
|
+
const browserSupport = { [BROWSER_SUPPORT_INTERFACE]: { interface: BROWSER_SUPPORT_INTERFACE } };
|
|
63
|
+
switch (flavor) {
|
|
64
|
+
case "classic":
|
|
65
|
+
return { root: undefined, app: undefined };
|
|
66
|
+
case "gnome-extension":
|
|
67
|
+
return { root: browserSupport, app: [BROWSER_SUPPORT_INTERFACE] };
|
|
68
|
+
case "host":
|
|
69
|
+
return { root: browserSupport, app: [...appDefaults, BROWSER_SUPPORT_INTERFACE] };
|
|
70
|
+
case "strict":
|
|
71
|
+
return { root: { ...core24ContentPlugs(), ...browserSupport }, app: [...appDefaults, BROWSER_SUPPORT_INTERFACE] };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Resolve core24 plugs from the user's `plugs` option.
|
|
76
|
+
*
|
|
77
|
+
* - unset: the generated set for the build flavor (see core24GeneratedPlugs)
|
|
78
|
+
* - a list containing `"default"`: the full default set — the app-level default plugs plus everything the
|
|
79
|
+
* flavor generates — with the user's other entries added to it, deduplicated by plug name. A descriptor
|
|
80
|
+
* whose name matches a default plug overrides that plug's attributes (shallow merge). `null` resets a default
|
|
81
|
+
* plug named like its interface (e.g. `browser-support`) to the snapd defaults for that interface, and removes a
|
|
82
|
+
* content-snap plug (not named like its interface) from both the root and the app plugs.
|
|
83
|
+
* - anything else: the user's plugs replace the defaults.
|
|
84
|
+
*/
|
|
85
|
+
export function resolveCore24Plugs(plugs, flavor, appDefaults = CORE24_DEFAULT_APP_PLUGS) {
|
|
86
|
+
if (!plugs) {
|
|
87
|
+
return { ...core24GeneratedPlugs(flavor, appDefaults), source: "generated", addedByDefaultExpansion: [] };
|
|
88
|
+
}
|
|
89
|
+
if (!Array.isArray(plugs) || !plugs.includes(DEFAULT_PLUGS_KEYWORD)) {
|
|
90
|
+
return { ...normalizeSnapPlugs(plugs), source: "explicit", addedByDefaultExpansion: [] };
|
|
91
|
+
}
|
|
92
|
+
const generated = core24GeneratedPlugs(flavor, appDefaults);
|
|
93
|
+
const defaultAppPlugs = [...appDefaults, ...(generated.app ?? [])];
|
|
94
|
+
const defaultRoot = { ...generated.root };
|
|
95
|
+
const app = [];
|
|
96
|
+
const appSeen = new Set();
|
|
97
|
+
const addApp = (name) => {
|
|
98
|
+
if (!appSeen.has(name)) {
|
|
99
|
+
appSeen.add(name);
|
|
100
|
+
app.push(name);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const userRoot = {};
|
|
104
|
+
const userNames = new Set();
|
|
105
|
+
for (const item of plugs) {
|
|
106
|
+
if (item === DEFAULT_PLUGS_KEYWORD) {
|
|
107
|
+
defaultAppPlugs.forEach(addApp);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (typeof item === "string") {
|
|
111
|
+
assertValidPlugName(item);
|
|
112
|
+
userNames.add(item);
|
|
113
|
+
addApp(item);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
for (const [name, config] of Object.entries(item)) {
|
|
117
|
+
assertValidPlugName(name);
|
|
118
|
+
userNames.add(name);
|
|
119
|
+
userRoot[name] = config;
|
|
120
|
+
addApp(name);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const root = { ...defaultRoot };
|
|
124
|
+
const contentPlugs = core24ContentPlugs();
|
|
125
|
+
const removed = new Set();
|
|
126
|
+
for (const [name, config] of Object.entries(userRoot)) {
|
|
127
|
+
const base = defaultRoot[name];
|
|
128
|
+
// `null` drops the root definition, which leaves snapd to treat the plug name as the interface. A content-snap
|
|
129
|
+
// plug (e.g. `gpu-2404`, interface `content`) is not named like its interface, so the app would reference an
|
|
130
|
+
// undefined plug — remove it entirely instead. The content plugs are checked even when this flavor does not
|
|
131
|
+
// declare them (host builds, the gnome extension), so `null` never leaves such a reference behind.
|
|
132
|
+
if (config == null && isRenamedPlug(name, base ?? contentPlugs[name])) {
|
|
133
|
+
removed.add(name);
|
|
134
|
+
delete root[name];
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
root[name] = isPlainObject(base) && isPlainObject(config) ? { ...base, ...config } : config;
|
|
138
|
+
}
|
|
139
|
+
const appPlugs = app.filter(name => !removed.has(name));
|
|
140
|
+
// Before v27, "default" expanded to the app-level default list only, followed by the user's own entries.
|
|
141
|
+
const previousExpansion = new Set([...appDefaults, ...userNames]);
|
|
142
|
+
const addedByDefaultExpansion = [...new Set([...appPlugs, ...Object.keys(root)])].filter(name => !previousExpansion.has(name));
|
|
143
|
+
return {
|
|
144
|
+
root: Object.keys(root).length > 0 ? root : undefined,
|
|
145
|
+
app: appPlugs.length > 0 ? appPlugs : undefined,
|
|
146
|
+
source: "merged",
|
|
147
|
+
addedByDefaultExpansion,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/** Split a plugs config (no `"default"` expansion) into root-level definitions and app-level references. */
|
|
151
|
+
export function normalizeSnapPlugs(plugs) {
|
|
152
|
+
if (!plugs || (Array.isArray(plugs) && plugs.length === 0)) {
|
|
153
|
+
return { root: undefined, app: undefined };
|
|
154
|
+
}
|
|
155
|
+
const root = {};
|
|
156
|
+
const app = [];
|
|
157
|
+
if (!Array.isArray(plugs)) {
|
|
158
|
+
for (const [name, config] of Object.entries(plugs)) {
|
|
159
|
+
assertValidPlugName(name);
|
|
160
|
+
root[name] = config;
|
|
161
|
+
app.push(name);
|
|
162
|
+
}
|
|
163
|
+
return { root, app };
|
|
164
|
+
}
|
|
165
|
+
for (const item of plugs) {
|
|
166
|
+
if (typeof item === "string") {
|
|
167
|
+
app.push(item);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
for (const [name, config] of Object.entries(item)) {
|
|
171
|
+
assertValidPlugName(name);
|
|
172
|
+
root[name] = config;
|
|
173
|
+
app.push(name);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return { root: Object.keys(root).length > 0 ? root : undefined, app: app.length > 0 ? app : undefined };
|
|
177
|
+
}
|
|
178
|
+
/** Whether the resolved root plugs grant Chromium's own sandbox (`browser-support` with `allow-sandbox: true`). */
|
|
179
|
+
export function isBrowserSandboxAllowed(rootPlugs) {
|
|
180
|
+
if (!rootPlugs) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
return Object.values(rootPlugs).some(plug => plug?.interface === BROWSER_SUPPORT_INTERFACE && plug["allow-sandbox"] === true);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Names of the root-level plugs that request `browser-support` with `allow-sandbox: true`. A plug without an
|
|
187
|
+
* explicit `interface` uses its name as the interface, as snapd does.
|
|
188
|
+
*/
|
|
189
|
+
export function findAllowSandboxPlugs(rootPlugs) {
|
|
190
|
+
if (!rootPlugs) {
|
|
191
|
+
return [];
|
|
192
|
+
}
|
|
193
|
+
return Object.entries(rootPlugs)
|
|
194
|
+
.filter(([name, plug]) => isPlainObject(plug) && (plug.interface ?? name) === BROWSER_SUPPORT_INTERFACE && plug["allow-sandbox"] === true)
|
|
195
|
+
.map(([name]) => name);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Log a snap plug notice once per `scope` (the build's packager) and `key`, so a multi-arch build of one app warns once
|
|
199
|
+
* while every project built in the same process (programmatic API, watch tooling) still gets its own warning.
|
|
200
|
+
*/
|
|
201
|
+
function warnOncePerBuild(key, scope, fields, message) {
|
|
202
|
+
log.once(`snap-plugs:${key}`, scope).warn(fields, message);
|
|
203
|
+
}
|
|
204
|
+
/** Warn that the snap store reserves `allow-sandbox` for vetted publishers. The configuration is left as is. */
|
|
205
|
+
export function warnAboutAllowSandboxPlugs(rootPlugs, optionPath, scope) {
|
|
206
|
+
const plugNames = findAllowSandboxPlugs(rootPlugs);
|
|
207
|
+
if (plugNames.length === 0) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
warnOncePerBuild(`allow-sandbox:${optionPath}:${plugNames.join(",")}`, scope, { plugs: plugNames.join(", "), option: optionPath }, `${optionPath} requests the browser-support interface with "allow-sandbox: true". ` +
|
|
211
|
+
"The Snap Store reserves allow-sandbox for vetted publishers (browsers), so store review rejects this snap unless your publisher has been granted it. " +
|
|
212
|
+
"Remove the attribute to launch with --no-sandbox under snap confinement instead. " +
|
|
213
|
+
`See ${CORE24_NO_ALLOW_SANDBOX_DOCS}`);
|
|
214
|
+
}
|
|
215
|
+
/** v27 behaviour-change notice: default core24 plugs no longer keep Chromium's sandbox. */
|
|
216
|
+
export function warnAboutCore24NoSandboxDefault(scope) {
|
|
217
|
+
warnOncePerBuild("core24-no-sandbox-default", scope, { reason: "the Snap Store rejects allow-sandbox from non-vetted publishers", solution: "no action needed unless you are a vetted publisher" }, `snapcraft.core24 now requests the plain browser-support interface by default (electron-builder <= 26 added "allow-sandbox: true", which the Snap Store rejects for most publishers). ` +
|
|
218
|
+
"The app is launched with --no-sandbox and chrome-sandbox is left out of the snap; snap confinement isolates the app instead. " +
|
|
219
|
+
`See ${CORE24_NO_ALLOW_SANDBOX_DOCS}`);
|
|
220
|
+
}
|
|
221
|
+
/** v27 behaviour-change notice: `"default"` in core24 `plugs` now expands to the full default set. */
|
|
222
|
+
export function warnAboutCore24DefaultPlugsExpansion(added, scope) {
|
|
223
|
+
if (added.length === 0) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
warnOncePerBuild(`core24-default-plugs:${added.join(",")}`, scope, { added: added.join(", ") }, `"default" in snapcraft.core24.plugs now expands to the full default plug set, so these plugs are added to your snap. ` +
|
|
227
|
+
`electron-builder <= 26 expanded it to the app-level desktop plugs only. ` +
|
|
228
|
+
`See ${CORE24_DEFAULT_PLUGS_MERGE_DOCS}`);
|
|
229
|
+
}
|
|
230
|
+
function assertValidPlugName(name) {
|
|
231
|
+
if (!isValidKey(name)) {
|
|
232
|
+
throw new Error(`Invalid plug/slot name: ${name}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/** Whether a default plug definition declares an interface other than its own name (the content-snap plugs). */
|
|
236
|
+
function isRenamedPlug(name, definition) {
|
|
237
|
+
return isPlainObject(definition) && typeof definition.interface === "string" && definition.interface !== name;
|
|
238
|
+
}
|
|
239
|
+
function isPlainObject(value) {
|
|
240
|
+
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=snapPlugs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapPlugs.js","sourceRoot":"","sources":["../../../../src/targets/linux/snap/snapPlugs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,UAAU,EAAW,MAAM,sBAAsB,CAAA;AAG1D,kHAAkH;AAElH,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAA;AAE1D,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAA;AAE9C,MAAM,eAAe,GAAG,gEAAgE,CAAA;AACxF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,eAAe,0CAA0C,CAAA;AACxG,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,eAAe,2DAA2D,CAAA;AAE5H,+FAA+F;AAC/F,MAAM,CAAC,MAAM,wBAAwB,GAA0B;IAC7D,SAAS;IACT,gBAAgB;IAChB,MAAM;IACN,KAAK;IACL,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,YAAY;IACZ,QAAQ;CACT,CAAA;AAkCD,wHAAwH;AACxH,MAA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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC5E,CAAC","sourcesContent":["import { log } from \"builder-util\"\nimport { isValidKey, Nullish } from \"builder-util-runtime\"\nimport { PlugDescriptor } from \"../../../options/SnapOptions.js\"\n\n/** Plug resolution helpers shared by the snap cores. Kept pure (no packager state) so they can be unit tested. */\n\nexport const BROWSER_SUPPORT_INTERFACE = \"browser-support\"\n\n/** Keyword in a `plugs` list that stands for electron-builder's default plug set. */\nexport const DEFAULT_PLUGS_KEYWORD = \"default\"\n\nconst MIGRATION_GUIDE = \"https://www.electron.build/docs/migration/v27-breaking-changes\"\nexport const CORE24_NO_ALLOW_SANDBOX_DOCS = `${MIGRATION_GUIDE}#snap-core24-no-allow-sandbox-by-default`\nexport const CORE24_DEFAULT_PLUGS_MERGE_DOCS = `${MIGRATION_GUIDE}#snap-core24-default-in-plugs-merges-the-full-default-set`\n\n/** App-level plugs core24 declares when it is not delegating them to the `gnome` extension. */\nexport const CORE24_DEFAULT_APP_PLUGS: ReadonlyArray<string> = [\n \"desktop\",\n \"desktop-legacy\",\n \"home\",\n \"x11\",\n \"wayland\",\n \"unity7\",\n \"network\",\n \"gsettings\",\n \"audio-playback\",\n \"pulseaudio\",\n \"opengl\",\n]\n\nexport type SnapPlugsConfig = Array<string | PlugDescriptor> | PlugDescriptor | Nullish\n\n/** Root-level plug definitions plus the app-level plug references for a snap. */\nexport interface ResolvedSnapPlugs {\n root: Record<string, any> | undefined\n app: string[] | undefined\n}\n\n/**\n * Which plugs core24 generates on its own:\n * - `classic`: none — the snap store review rejects classic snaps that declare plugs\n * - `gnome-extension`: only `browser-support` — the extension supplies the desktop plugs and content snaps\n * (gnome-46-2404, gtk-3-themes, icon-themes, sound-themes) itself\n * - `host`: the app-level default plugs plus `browser-support`, no content-snap root plugs\n * - `strict`: the content-snap root plugs, the app-level default plugs and `browser-support`\n */\nexport type Core24PlugFlavor = \"classic\" | \"gnome-extension\" | \"host\" | \"strict\"\n\nexport interface Core24PlugResolution extends ResolvedSnapPlugs {\n /**\n * `generated` — `plugs` is unset, so electron-builder's own set is used;\n * `merged` — the `plugs` list contains `\"default\"`, so the user's entries are merged into the default set;\n * `explicit` — the user's `plugs` replace the defaults.\n */\n source: \"generated\" | \"merged\" | \"explicit\"\n /**\n * Only for `merged`: plugs the v27 `\"default\"` expansion adds that the previous expansion (the app-level\n * default list plus the user's own entries) did not, e.g. `browser-support` and the content-snap plugs.\n */\n addedByDefaultExpansion: string[]\n}\n\n/** Root-level content-snap plugs wiring up the GNOME platform, theme, and GPU content snaps manually (no extension). */\nexport function core24ContentPlugs(): Record<string, any> {\n return {\n \"gtk-3-themes\": {\n interface: \"content\",\n target: \"$SNAP/data-dir/themes\",\n \"default-provider\": \"gtk-common-themes\",\n },\n \"icon-themes\": {\n interface: \"content\",\n target: \"$SNAP/data-dir/icons\",\n \"default-provider\": \"gtk-common-themes\",\n },\n \"sound-themes\": {\n interface: \"content\",\n target: \"$SNAP/data-dir/sounds\",\n \"default-provider\": \"gtk-common-themes\",\n },\n \"gnome-46-2404\": {\n interface: \"content\",\n target: \"$SNAP/gnome-platform\",\n \"default-provider\": \"gnome-46-2404\",\n },\n \"gpu-2404\": {\n interface: \"content\",\n target: \"$SNAP/gpu-2404\",\n \"default-provider\": \"mesa-2404\",\n },\n }\n}\n\n/**\n * The plugs core24 declares when `plugs` is unset.\n *\n * `browser-support` is requested *without* `allow-sandbox`: the snap store reserves that attribute for\n * vetted publishers (browsers) and rejects other uploads that request it. Without it the app is launched\n * with `--no-sandbox` and relies on the snap confinement (see SnapCore24).\n */\nexport function core24GeneratedPlugs(flavor: Core24PlugFlavor, appDefaults: ReadonlyArray<string> = CORE24_DEFAULT_APP_PLUGS): ResolvedSnapPlugs {\n const browserSupport = { [BROWSER_SUPPORT_INTERFACE]: { interface: BROWSER_SUPPORT_INTERFACE } }\n switch (flavor) {\n case \"classic\":\n return { root: undefined, app: undefined }\n case \"gnome-extension\":\n return { root: browserSupport, app: [BROWSER_SUPPORT_INTERFACE] }\n case \"host\":\n return { root: browserSupport, app: [...appDefaults, BROWSER_SUPPORT_INTERFACE] }\n case \"strict\":\n return { root: { ...core24ContentPlugs(), ...browserSupport }, app: [...appDefaults, BROWSER_SUPPORT_INTERFACE] }\n }\n}\n\n/**\n * Resolve core24 plugs from the user's `plugs` option.\n *\n * - unset: the generated set for the build flavor (see core24GeneratedPlugs)\n * - a list containing `\"default\"`: the full default set — the app-level default plugs plus everything the\n * flavor generates — with the user's other entries added to it, deduplicated by plug name. A descriptor\n * whose name matches a default plug overrides that plug's attributes (shallow merge). `null` resets a default\n * plug named like its interface (e.g. `browser-support`) to the snapd defaults for that interface, and removes a\n * content-snap plug (not named like its interface) from both the root and the app plugs.\n * - anything else: the user's plugs replace the defaults.\n */\nexport function resolveCore24Plugs(plugs: SnapPlugsConfig, flavor: Core24PlugFlavor, appDefaults: ReadonlyArray<string> = CORE24_DEFAULT_APP_PLUGS): Core24PlugResolution {\n if (!plugs) {\n return { ...core24GeneratedPlugs(flavor, appDefaults), source: \"generated\", addedByDefaultExpansion: [] }\n }\n if (!Array.isArray(plugs) || !plugs.includes(DEFAULT_PLUGS_KEYWORD)) {\n return { ...normalizeSnapPlugs(plugs), source: \"explicit\", addedByDefaultExpansion: [] }\n }\n\n const generated = core24GeneratedPlugs(flavor, appDefaults)\n const defaultAppPlugs = [...appDefaults, ...(generated.app ?? [])]\n const defaultRoot: Record<string, any> = { ...generated.root }\n\n const app: string[] = []\n const appSeen = new Set<string>()\n const addApp = (name: string) => {\n if (!appSeen.has(name)) {\n appSeen.add(name)\n app.push(name)\n }\n }\n const userRoot: Record<string, any> = {}\n const userNames = new Set<string>()\n\n for (const item of plugs) {\n if (item === DEFAULT_PLUGS_KEYWORD) {\n defaultAppPlugs.forEach(addApp)\n continue\n }\n if (typeof item === \"string\") {\n assertValidPlugName(item)\n userNames.add(item)\n addApp(item)\n continue\n }\n for (const [name, config] of Object.entries(item)) {\n assertValidPlugName(name)\n userNames.add(name)\n userRoot[name] = config\n addApp(name)\n }\n }\n\n const root: Record<string, any> = { ...defaultRoot }\n const contentPlugs = core24ContentPlugs()\n const removed = new Set<string>()\n for (const [name, config] of Object.entries(userRoot)) {\n const base = defaultRoot[name]\n // `null` drops the root definition, which leaves snapd to treat the plug name as the interface. A content-snap\n // plug (e.g. `gpu-2404`, interface `content`) is not named like its interface, so the app would reference an\n // undefined plug — remove it entirely instead. The content plugs are checked even when this flavor does not\n // declare them (host builds, the gnome extension), so `null` never leaves such a reference behind.\n if (config == null && isRenamedPlug(name, base ?? contentPlugs[name])) {\n removed.add(name)\n delete root[name]\n continue\n }\n root[name] = isPlainObject(base) && isPlainObject(config) ? { ...base, ...config } : config\n }\n const appPlugs = app.filter(name => !removed.has(name))\n\n // Before v27, \"default\" expanded to the app-level default list only, followed by the user's own entries.\n const previousExpansion = new Set<string>([...appDefaults, ...userNames])\n const addedByDefaultExpansion = [...new Set([...appPlugs, ...Object.keys(root)])].filter(name => !previousExpansion.has(name))\n\n return {\n root: Object.keys(root).length > 0 ? root : undefined,\n app: appPlugs.length > 0 ? appPlugs : undefined,\n source: \"merged\",\n addedByDefaultExpansion,\n }\n}\n\n/** Split a plugs config (no `\"default\"` expansion) into root-level definitions and app-level references. */\nexport function normalizeSnapPlugs(plugs: SnapPlugsConfig): ResolvedSnapPlugs {\n if (!plugs || (Array.isArray(plugs) && plugs.length === 0)) {\n return { root: undefined, app: undefined }\n }\n const root: Record<string, any> = {}\n const app: string[] = []\n\n if (!Array.isArray(plugs)) {\n for (const [name, config] of Object.entries(plugs)) {\n assertValidPlugName(name)\n root[name] = config\n app.push(name)\n }\n return { root, app }\n }\n\n for (const item of plugs) {\n if (typeof item === \"string\") {\n app.push(item)\n continue\n }\n for (const [name, config] of Object.entries(item)) {\n assertValidPlugName(name)\n root[name] = config\n app.push(name)\n }\n }\n return { root: Object.keys(root).length > 0 ? root : undefined, app: app.length > 0 ? app : undefined }\n}\n\n/** Whether the resolved root plugs grant Chromium's own sandbox (`browser-support` with `allow-sandbox: true`). */\nexport function isBrowserSandboxAllowed(rootPlugs: Record<string, any> | Nullish): boolean {\n if (!rootPlugs) {\n return false\n }\n return Object.values(rootPlugs).some(plug => plug?.interface === BROWSER_SUPPORT_INTERFACE && plug[\"allow-sandbox\"] === true)\n}\n\n/**\n * Names of the root-level plugs that request `browser-support` with `allow-sandbox: true`. A plug without an\n * explicit `interface` uses its name as the interface, as snapd does.\n */\nexport function findAllowSandboxPlugs(rootPlugs: Record<string, any> | Nullish): string[] {\n if (!rootPlugs) {\n return []\n }\n return Object.entries(rootPlugs)\n .filter(([name, plug]) => isPlainObject(plug) && (plug.interface ?? name) === BROWSER_SUPPORT_INTERFACE && plug[\"allow-sandbox\"] === true)\n .map(([name]) => name)\n}\n\n/**\n * Log a snap plug notice once per `scope` (the build's packager) and `key`, so a multi-arch build of one app warns once\n * while every project built in the same process (programmatic API, watch tooling) still gets its own warning.\n */\nfunction warnOncePerBuild(key: string, scope: object, fields: Record<string, any>, message: string): void {\n log.once(`snap-plugs:${key}`, scope).warn(fields, message)\n}\n\n/** Warn that the snap store reserves `allow-sandbox` for vetted publishers. The configuration is left as is. */\nexport function warnAboutAllowSandboxPlugs(rootPlugs: Record<string, any> | Nullish, optionPath: string, scope: object): void {\n const plugNames = findAllowSandboxPlugs(rootPlugs)\n if (plugNames.length === 0) {\n return\n }\n warnOncePerBuild(\n `allow-sandbox:${optionPath}:${plugNames.join(\",\")}`,\n scope,\n { plugs: plugNames.join(\", \"), option: optionPath },\n `${optionPath} requests the browser-support interface with \"allow-sandbox: true\". ` +\n \"The Snap Store reserves allow-sandbox for vetted publishers (browsers), so store review rejects this snap unless your publisher has been granted it. \" +\n \"Remove the attribute to launch with --no-sandbox under snap confinement instead. \" +\n `See ${CORE24_NO_ALLOW_SANDBOX_DOCS}`\n )\n}\n\n/** v27 behaviour-change notice: default core24 plugs no longer keep Chromium's sandbox. */\nexport function warnAboutCore24NoSandboxDefault(scope: object): void {\n warnOncePerBuild(\n \"core24-no-sandbox-default\",\n scope,\n { reason: \"the Snap Store rejects allow-sandbox from non-vetted publishers\", solution: \"no action needed unless you are a vetted publisher\" },\n `snapcraft.core24 now requests the plain browser-support interface by default (electron-builder <= 26 added \"allow-sandbox: true\", which the Snap Store rejects for most publishers). ` +\n \"The app is launched with --no-sandbox and chrome-sandbox is left out of the snap; snap confinement isolates the app instead. \" +\n `See ${CORE24_NO_ALLOW_SANDBOX_DOCS}`\n )\n}\n\n/** v27 behaviour-change notice: `\"default\"` in core24 `plugs` now expands to the full default set. */\nexport function warnAboutCore24DefaultPlugsExpansion(added: string[], scope: object): void {\n if (added.length === 0) {\n return\n }\n warnOncePerBuild(\n `core24-default-plugs:${added.join(\",\")}`,\n scope,\n { added: added.join(\", \") },\n `\"default\" in snapcraft.core24.plugs now expands to the full default plug set, so these plugs are added to your snap. ` +\n `electron-builder <= 26 expanded it to the app-level desktop plugs only. ` +\n `See ${CORE24_DEFAULT_PLUGS_MERGE_DOCS}`\n )\n}\n\nfunction assertValidPlugName(name: string): void {\n if (!isValidKey(name)) {\n throw new Error(`Invalid plug/slot name: ${name}`)\n }\n}\n\n/** Whether a default plug definition declares an interface other than its own name (the content-snap plugs). */\nfunction isRenamedPlug(name: string, definition: unknown): boolean {\n return isPlainObject(definition) && typeof definition.interface === \"string\" && definition.interface !== name\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, any> {\n return value != null && typeof value === \"object\" && !Array.isArray(value)\n}\n"]}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Latest TypeScript types for snapcraft.yaml
|
|
3
|
+
* Focuses on the most common Core24 configuration
|
|
4
|
+
* Based on https://snapcraft.io/docs/snapcraft-yaml-reference
|
|
5
|
+
* npm install -g json-schema-to-typescript
|
|
6
|
+
* curl -o snapcraft-schema.json https://raw.githubusercontent.com/canonical/snapcraft/refs/heads/main/schema/snapcraft.json
|
|
7
|
+
* npx json2ts -i snapcraft-schema.json -o snapcraft.ts
|
|
8
|
+
* (manual edits to simplify and make more strict)
|
|
9
|
+
*/
|
|
10
|
+
export interface SnapcraftYAML {
|
|
11
|
+
/** The identifying name of the snap */
|
|
12
|
+
name: string;
|
|
13
|
+
/** The baseline system that the snap is built in */
|
|
14
|
+
base: "core22" | "core24" | "core26" | "bare" | "devel";
|
|
15
|
+
/** The amount of isolation the snap has from the host system */
|
|
16
|
+
confinement: "classic" | "devmode" | "strict";
|
|
17
|
+
/** The self-contained software pieces needed to create the final artifact */
|
|
18
|
+
parts: Record<string, Part>;
|
|
19
|
+
version?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
/** A short description of the project (max 78 chars) */
|
|
22
|
+
summary?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
grade?: "stable" | "devel";
|
|
25
|
+
/** The project's license as an SPDX expression */
|
|
26
|
+
license?: string;
|
|
27
|
+
/** The path to the snap's icon file */
|
|
28
|
+
icon?: string;
|
|
29
|
+
/** The baseline system that the snap is built in */
|
|
30
|
+
"build-base"?: string;
|
|
31
|
+
/** The platforms where the snap can be built and run (core24+) */
|
|
32
|
+
platforms?: Record<string, Platform>;
|
|
33
|
+
/** The architectures that the snap builds and runs on (core22 and earlier) */
|
|
34
|
+
architectures?: (string | Architecture)[];
|
|
35
|
+
/** Specifies the algorithm that compresses the snap */
|
|
36
|
+
compression?: "lzo" | "xz";
|
|
37
|
+
/** The individual programs and services that the snap runs */
|
|
38
|
+
apps?: Record<string, App>;
|
|
39
|
+
/** Declares the snap's plugs */
|
|
40
|
+
plugs?: Record<string, unknown>;
|
|
41
|
+
/** Declares the snap's slots */
|
|
42
|
+
slots?: Record<string, unknown>;
|
|
43
|
+
/** Configures the snap's hooks */
|
|
44
|
+
hooks?: Record<string, Hook>;
|
|
45
|
+
/** The file layouts in the execution environment */
|
|
46
|
+
layout?: Record<string, Record<string, string>>;
|
|
47
|
+
/** The snap's runtime environment variables */
|
|
48
|
+
environment?: Record<string, string | null>;
|
|
49
|
+
/** The minimum version of snapd and features the snap requires */
|
|
50
|
+
assumes?: string[];
|
|
51
|
+
/** The epoch associated with this version of the snap */
|
|
52
|
+
epoch?: string;
|
|
53
|
+
/** The package repositories to use for build and stage packages */
|
|
54
|
+
"package-repositories"?: Array<Record<string, unknown>>;
|
|
55
|
+
/** Selects a part to inherit metadata from */
|
|
56
|
+
"adopt-info"?: string;
|
|
57
|
+
/** The system usernames the snap can use */
|
|
58
|
+
"system-usernames"?: Record<string, unknown>;
|
|
59
|
+
/** Ubuntu Pro services to enable when building */
|
|
60
|
+
"ua-services"?: string[];
|
|
61
|
+
/** The linter configuration settings */
|
|
62
|
+
lint?: {
|
|
63
|
+
ignore: (string | Record<string, string[]>)[];
|
|
64
|
+
};
|
|
65
|
+
/** Components to build in conjunction with the snap */
|
|
66
|
+
components?: Record<string, Component>;
|
|
67
|
+
/** Snap type */
|
|
68
|
+
type?: "app" | "gadget" | "base" | "kernel" | "snapd";
|
|
69
|
+
/** Attributes to pass to snap's metadata file */
|
|
70
|
+
passthrough?: Record<string, unknown>;
|
|
71
|
+
/** The snap author's contact links and email addresses */
|
|
72
|
+
contact?: string | string[];
|
|
73
|
+
/** Links for submitting issues, bugs, and feature requests */
|
|
74
|
+
issues?: string | string[];
|
|
75
|
+
/** Links to the source code */
|
|
76
|
+
"source-code"?: string | string[];
|
|
77
|
+
/** The snap's donation links */
|
|
78
|
+
donation?: string | string[];
|
|
79
|
+
/** Links to the original software's web pages */
|
|
80
|
+
website?: string | string[];
|
|
81
|
+
/** Primary-key header for snaps signed by third parties */
|
|
82
|
+
provenance?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface Part {
|
|
85
|
+
/** Plugin to use for building */
|
|
86
|
+
plugin: string;
|
|
87
|
+
source?: string;
|
|
88
|
+
"source-type"?: "git" | "bzr" | "hg" | "svn" | "tar" | "zip" | "7z" | "deb" | "rpm" | "local";
|
|
89
|
+
"source-branch"?: string;
|
|
90
|
+
"source-tag"?: string;
|
|
91
|
+
"source-commit"?: string;
|
|
92
|
+
"source-depth"?: number;
|
|
93
|
+
"source-subdir"?: string;
|
|
94
|
+
"source-checksum"?: string;
|
|
95
|
+
"build-packages"?: string[];
|
|
96
|
+
"stage-packages"?: string[];
|
|
97
|
+
"build-snaps"?: string[];
|
|
98
|
+
"stage-snaps"?: string[];
|
|
99
|
+
"build-environment"?: Array<Record<string, string>>;
|
|
100
|
+
"override-build"?: string;
|
|
101
|
+
"override-pull"?: string;
|
|
102
|
+
"override-stage"?: string;
|
|
103
|
+
"override-prime"?: string;
|
|
104
|
+
organize?: Record<string, string>;
|
|
105
|
+
stage?: string[];
|
|
106
|
+
prime?: string[];
|
|
107
|
+
after?: string[];
|
|
108
|
+
}
|
|
109
|
+
export interface Platform {
|
|
110
|
+
/** The architectures to build the snap on */
|
|
111
|
+
"build-on"?: string | string[];
|
|
112
|
+
/** The target architecture for the build */
|
|
113
|
+
"build-for"?: string | string[];
|
|
114
|
+
}
|
|
115
|
+
export interface Architecture {
|
|
116
|
+
/** The architectures to build the snap on */
|
|
117
|
+
"build-on": string | string[];
|
|
118
|
+
/** The target architecture for the build */
|
|
119
|
+
"build-for"?: string | string[];
|
|
120
|
+
}
|
|
121
|
+
export interface App {
|
|
122
|
+
/** The command to run inside the snap when invoked */
|
|
123
|
+
command: string;
|
|
124
|
+
/** The extensions to add to the app (e.g., 'gnome', 'kde-neon') */
|
|
125
|
+
extensions?: string[];
|
|
126
|
+
/** The interfaces that the app can connect to */
|
|
127
|
+
plugs?: string[];
|
|
128
|
+
/** The list of slots that the app provides */
|
|
129
|
+
slots?: string[];
|
|
130
|
+
/** Configures the app as a service */
|
|
131
|
+
daemon?: "simple" | "forking" | "oneshot" | "notify" | "dbus";
|
|
132
|
+
"daemon-scope"?: "system" | "user";
|
|
133
|
+
after?: string[];
|
|
134
|
+
before?: string[];
|
|
135
|
+
"refresh-mode"?: "endure" | "restart" | "ignore-running";
|
|
136
|
+
"stop-mode"?: "sigterm" | "sigterm-all" | "sighup" | "sighup-all" | "sigusr1" | "sigusr1-all" | "sigusr2" | "sigusr2-all" | "sigint" | "sigint-all";
|
|
137
|
+
"restart-condition"?: "on-success" | "on-failure" | "on-abnormal" | "on-abort" | "on-watchdog" | "always" | "never";
|
|
138
|
+
"install-mode"?: "enable" | "disable";
|
|
139
|
+
"stop-command"?: string;
|
|
140
|
+
"post-stop-command"?: string;
|
|
141
|
+
"reload-command"?: string;
|
|
142
|
+
"start-timeout"?: string;
|
|
143
|
+
"stop-timeout"?: string;
|
|
144
|
+
"watchdog-timeout"?: string;
|
|
145
|
+
"restart-delay"?: string;
|
|
146
|
+
desktop?: string;
|
|
147
|
+
autostart?: string;
|
|
148
|
+
"common-id"?: string;
|
|
149
|
+
completer?: string;
|
|
150
|
+
"bus-name"?: string;
|
|
151
|
+
"activates-on"?: string[];
|
|
152
|
+
sockets?: Record<string, Socket>;
|
|
153
|
+
timer?: string;
|
|
154
|
+
environment?: Record<string, string>;
|
|
155
|
+
"command-chain"?: string[];
|
|
156
|
+
aliases?: string[];
|
|
157
|
+
"success-exit-status"?: number[];
|
|
158
|
+
passthrough?: Record<string, unknown>;
|
|
159
|
+
}
|
|
160
|
+
export interface Socket {
|
|
161
|
+
/** The socket's abstract name or socket path */
|
|
162
|
+
"listen-stream": number | string;
|
|
163
|
+
/** The mode or permissions of the socket in octal */
|
|
164
|
+
"socket-mode"?: number;
|
|
165
|
+
}
|
|
166
|
+
export interface Hook {
|
|
167
|
+
/** The ordered list of commands to run before the hook runs */
|
|
168
|
+
"command-chain"?: string[];
|
|
169
|
+
/** The environment variables for the hook */
|
|
170
|
+
environment?: Record<string, string | null>;
|
|
171
|
+
/** The list of interfaces that the hook can connect to */
|
|
172
|
+
plugs?: string[];
|
|
173
|
+
/** Attributes to pass to snap's metadata file for the hook */
|
|
174
|
+
passthrough?: Record<string, unknown>;
|
|
175
|
+
}
|
|
176
|
+
export interface Component {
|
|
177
|
+
/** The summary of the component */
|
|
178
|
+
summary: string;
|
|
179
|
+
/** The full description of the component */
|
|
180
|
+
description: string;
|
|
181
|
+
/** The type of the component */
|
|
182
|
+
type: "test" | "kernel-modules" | "standard";
|
|
183
|
+
/** The version of the component */
|
|
184
|
+
version?: string;
|
|
185
|
+
/** The configuration for the component's hooks */
|
|
186
|
+
hooks?: Record<string, Hook>;
|
|
187
|
+
/** Selects a part to inherit metadata from */
|
|
188
|
+
"adopt-info"?: string;
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=snapcraft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapcraft.d.ts","sourceRoot":"","sources":["../../../../src/targets/linux/snap/snapcraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,aAAa;IAE5B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IACvD,gEAAgE;IAChE,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC7C,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAG3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC1B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,8EAA8E;IAC9E,aAAa,CAAC,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CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC;AAGD,MAAM,WAAW,MAAM;IACrB,gDAAgD;IAChD,eAAe,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAGD,MAAM,WAAW,IAAI;IACnB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IAC3C,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC;AAGD,MAAM,WAAW,SAAS;IACxB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAA;IACnB,gCAAgC;IAChC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,UAAU,CAAA;IAC5C,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC5B,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Latest TypeScript types for snapcraft.yaml
|
|
3
|
+
* Focuses on the most common Core24 configuration
|
|
4
|
+
* Based on https://snapcraft.io/docs/snapcraft-yaml-reference
|
|
5
|
+
* npm install -g json-schema-to-typescript
|
|
6
|
+
* curl -o snapcraft-schema.json https://raw.githubusercontent.com/canonical/snapcraft/refs/heads/main/schema/snapcraft.json
|
|
7
|
+
* npx json2ts -i snapcraft-schema.json -o snapcraft.ts
|
|
8
|
+
* (manual edits to simplify and make more strict)
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=snapcraft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapcraft.js","sourceRoot":"","sources":["../../../../src/targets/linux/snap/snapcraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG","sourcesContent":["/**\n * Latest TypeScript types for snapcraft.yaml\n * Focuses on the most common Core24 configuration\n * Based on https://snapcraft.io/docs/snapcraft-yaml-reference\n * npm install -g json-schema-to-typescript\n * curl -o snapcraft-schema.json https://raw.githubusercontent.com/canonical/snapcraft/refs/heads/main/schema/snapcraft.json\n * npx json2ts -i snapcraft-schema.json -o snapcraft.ts\n * (manual edits to simplify and make more strict)\n */\n\nexport interface SnapcraftYAML {\n // === Required Fields ===\n /** The identifying name of the snap */\n name: string\n /** The baseline system that the snap is built in */\n base: \"core22\" | \"core24\" | \"core26\" | \"bare\" | \"devel\"\n /** The amount of isolation the snap has from the host system */\n confinement: \"classic\" | \"devmode\" | \"strict\"\n /** The self-contained software pieces needed to create the final artifact */\n parts: Record<string, Part>\n\n // === Metadata ===\n version?: string\n title?: string\n /** A short description of the project (max 78 chars) */\n summary?: string\n description?: string\n grade?: \"stable\" | \"devel\"\n /** The project's license as an SPDX expression */\n license?: string\n /** The path to the snap's icon file */\n icon?: string\n\n // === Build Configuration ===\n /** The baseline system that the snap is built in */\n \"build-base\"?: string\n /** The platforms where the snap can be built and run (core24+) */\n platforms?: Record<string, Platform>\n /** The architectures that the snap builds and runs on (core22 and earlier) */\n architectures?: (string | Architecture)[]\n /** Specifies the algorithm that compresses the snap */\n compression?: \"lzo\" | \"xz\"\n\n // === Apps and Services ===\n /** The individual programs and services that the snap runs */\n apps?: Record<string, App>\n\n // === Interfaces ===\n /** Declares the snap's plugs */\n plugs?: Record<string, unknown>\n /** Declares the snap's slots */\n slots?: Record<string, unknown>\n\n // === Hooks ===\n /** Configures the snap's hooks */\n hooks?: Record<string, Hook>\n\n // === Layout ===\n /** The file layouts in the execution environment */\n layout?: Record<string, Record<string, string>>\n\n // === Environment ===\n /** The snap's runtime environment variables */\n environment?: Record<string, string | null>\n\n // === Advanced ===\n /** The minimum version of snapd and features the snap requires */\n assumes?: string[]\n /** The epoch associated with this version of the snap */\n epoch?: string\n /** The package repositories to use for build and stage packages */\n \"package-repositories\"?: Array<Record<string, unknown>>\n /** Selects a part to inherit metadata from */\n \"adopt-info\"?: string\n /** The system usernames the snap can use */\n \"system-usernames\"?: Record<string, unknown>\n /** Ubuntu Pro services to enable when building */\n \"ua-services\"?: string[]\n /** The linter configuration settings */\n lint?: {\n ignore: (string | Record<string, string[]>)[]\n }\n /** Components to build in conjunction with the snap */\n components?: Record<string, Component>\n /** Snap type */\n type?: \"app\" | \"gadget\" | \"base\" | \"kernel\" | \"snapd\"\n /** Attributes to pass to snap's metadata file */\n passthrough?: Record<string, unknown>\n\n // === Contact/Links ===\n /** The snap author's contact links and email addresses */\n contact?: string | string[]\n /** Links for submitting issues, bugs, and feature requests */\n issues?: string | string[]\n /** Links to the source code */\n \"source-code\"?: string | string[]\n /** The snap's donation links */\n donation?: string | string[]\n /** Links to the original software's web pages */\n website?: string | string[]\n /** Primary-key header for snaps signed by third parties */\n provenance?: string\n}\n\n// === Part Definition ===\nexport interface Part {\n /** Plugin to use for building */\n plugin: string\n\n // Source\n source?: string\n \"source-type\"?: \"git\" | \"bzr\" | \"hg\" | \"svn\" | \"tar\" | \"zip\" | \"7z\" | \"deb\" | \"rpm\" | \"local\"\n \"source-branch\"?: string\n \"source-tag\"?: string\n \"source-commit\"?: string\n \"source-depth\"?: number\n \"source-subdir\"?: string\n \"source-checksum\"?: string\n\n // Dependencies\n \"build-packages\"?: string[]\n \"stage-packages\"?: string[]\n \"build-snaps\"?: string[]\n \"stage-snaps\"?: string[]\n\n // Build configuration\n \"build-environment\"?: Array<Record<string, string>>\n\n // Overrides\n \"override-build\"?: string\n \"override-pull\"?: string\n \"override-stage\"?: string\n \"override-prime\"?: string\n\n // File organization\n organize?: Record<string, string>\n stage?: string[]\n prime?: string[]\n\n // Dependencies\n after?: string[]\n\n // Plugin-specific options (allow any additional properties)\n // [key: string]: unknown\n}\n\n// === Platform Definition (Core24+) ===\nexport interface Platform {\n /** The architectures to build the snap on */\n \"build-on\"?: string | string[]\n /** The target architecture for the build */\n \"build-for\"?: string | string[]\n}\n\n// === Architecture Definition (Core22 and earlier) ===\nexport interface Architecture {\n /** The architectures to build the snap on */\n \"build-on\": string | string[]\n /** The target architecture for the build */\n \"build-for\"?: string | string[]\n}\n\n// === App Definition ===\nexport interface App {\n /** The command to run inside the snap when invoked */\n command: string\n\n // Extensions\n /** The extensions to add to the app (e.g., 'gnome', 'kde-neon') */\n extensions?: string[]\n\n // Interfaces\n /** The interfaces that the app can connect to */\n plugs?: string[]\n /** The list of slots that the app provides */\n slots?: string[]\n\n // Daemon/Service configuration\n /** Configures the app as a service */\n daemon?: \"simple\" | \"forking\" | \"oneshot\" | \"notify\" | \"dbus\"\n \"daemon-scope\"?: \"system\" | \"user\"\n after?: string[]\n before?: string[]\n \"refresh-mode\"?: \"endure\" | \"restart\" | \"ignore-running\"\n \"stop-mode\"?: \"sigterm\" | \"sigterm-all\" | \"sighup\" | \"sighup-all\" | \"sigusr1\" | \"sigusr1-all\" | \"sigusr2\" | \"sigusr2-all\" | \"sigint\" | \"sigint-all\"\n \"restart-condition\"?: \"on-success\" | \"on-failure\" | \"on-abnormal\" | \"on-abort\" | \"on-watchdog\" | \"always\" | \"never\"\n \"install-mode\"?: \"enable\" | \"disable\"\n\n // Commands\n \"stop-command\"?: string\n \"post-stop-command\"?: string\n \"reload-command\"?: string\n\n // Timeouts\n \"start-timeout\"?: string\n \"stop-timeout\"?: string\n \"watchdog-timeout\"?: string\n \"restart-delay\"?: string\n\n // Desktop integration\n desktop?: string\n autostart?: string\n \"common-id\"?: string\n completer?: string\n\n // D-Bus\n \"bus-name\"?: string\n \"activates-on\"?: string[]\n\n // Sockets\n sockets?: Record<string, Socket>\n timer?: string\n\n // Environment\n environment?: Record<string, string>\n \"command-chain\"?: string[]\n\n // Other\n aliases?: string[]\n \"success-exit-status\"?: number[]\n passthrough?: Record<string, unknown>\n}\n\n// === Socket Definition ===\nexport interface Socket {\n /** The socket's abstract name or socket path */\n \"listen-stream\": number | string\n /** The mode or permissions of the socket in octal */\n \"socket-mode\"?: number\n}\n\n// === Hook Definition ===\nexport interface Hook {\n /** The ordered list of commands to run before the hook runs */\n \"command-chain\"?: string[]\n /** The environment variables for the hook */\n environment?: Record<string, string | null>\n /** The list of interfaces that the hook can connect to */\n plugs?: string[]\n /** Attributes to pass to snap's metadata file for the hook */\n passthrough?: Record<string, unknown>\n}\n\n// === Component Definition ===\nexport interface Component {\n /** The summary of the component */\n summary: string\n /** The full description of the component */\n description: string\n /** The type of the component */\n type: \"test\" | \"kernel-modules\" | \"standard\"\n /** The version of the component */\n version?: string\n /** The configuration for the component's hooks */\n hooks?: Record<string, Hook>\n /** Selects a part to inherit metadata from */\n \"adopt-info\"?: string\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Arch } from "builder-util";
|
|
1
2
|
import { LinuxPackager } from "../../../linuxPackager.js";
|
|
2
3
|
import { RemoteBuildOptions } from "../../../options/SnapOptions.js";
|
|
3
4
|
import { SnapcraftYAML } from "./snapcraft.js";
|
|
@@ -27,6 +28,11 @@ interface BuildSnapOptions {
|
|
|
27
28
|
/** Snap Store credentials from SnapcraftOptions root — base64 string or file path */
|
|
28
29
|
cscLink?: string;
|
|
29
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Maps a snapcraft arch string (as found in snap filenames) back to an electron-builder Arch.
|
|
33
|
+
* Used to assign the correct Arch value to extra artifacts from multi-arch remote-builds.
|
|
34
|
+
*/
|
|
35
|
+
export declare function snapArchStringToArch(snapArch: string): Arch;
|
|
30
36
|
/**
|
|
31
37
|
* Builds a snap package from SnapcraftYAML configuration.
|
|
32
38
|
*
|
|
@@ -35,6 +41,6 @@ interface BuildSnapOptions {
|
|
|
35
41
|
* access to download stage-packages, the base image, and extensions.
|
|
36
42
|
* To opt into an offline build, set `SNAPCRAFT_NO_NETWORK=1` in your environment.
|
|
37
43
|
*/
|
|
38
|
-
export declare function buildSnap(options: BuildSnapOptions): Promise<string>;
|
|
44
|
+
export declare function buildSnap(options: BuildSnapOptions): Promise<string[]>;
|
|
39
45
|
export {};
|
|
40
46
|
//# sourceMappingURL=snapcraftBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapcraftBuilder.d.ts","sourceRoot":"","sources":["../../../../src/targets/linux/snap/snapcraftBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snapcraftBuilder.d.ts","sourceRoot":"","sources":["../../../../src/targets/linux/snap/snapcraftBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAuF,MAAM,cAAc,CAAA;AAKxH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAK9C,eAAO,MAAM,sBAAsB;;;;CAAsD,CAAA;AACzF,eAAO,MAAM,sBAAsB,EAAE,MAAM,EAA8E,CAAA;AAEzH,UAAU,gBAAgB;IACxB,uCAAuC;IACvC,eAAe,EAAE,aAAa,CAAA;IAC9B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAA;IAChB,wDAAwD;IACxD,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gDAAgD;IAChD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,4FAA4F;IAC5F,QAAQ,EAAE,aAAa,CAAA;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAuJD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAe3D;AAYD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA4E5E"}
|