desktop-build-paths.d.mts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import type { DesktopAutoUpdateTarget } from './desktop-auto-update-environment.mjs'
  2. /** Mutable target directories plus the shared immutable download cache. */
  3. export interface DesktopTargetBuildPaths {
  4. readonly root: string
  5. readonly artifacts: string
  6. readonly runtime: string
  7. readonly packageSet: string
  8. readonly seed: string
  9. readonly seedPnpm: string
  10. readonly nodeExtract: string
  11. readonly packedDsh: string
  12. readonly packedVendor: string
  13. readonly packedLandlock: string
  14. readonly downloads: string
  15. }
  16. /**
  17. * Resolve the fixed build target selected by a packaging environment.
  18. * @param env - Packaging environment.
  19. * @param hostPlatform - Build-host platform used when no target override exists.
  20. * @param hostArch - Build-host architecture used when no target override exists.
  21. * @returns Supported Desktop target name.
  22. */
  23. export function resolveDesktopBuildTarget(
  24. env?: NodeJS.ProcessEnv,
  25. hostPlatform?: NodeJS.Platform,
  26. hostArch?: string,
  27. ): DesktopAutoUpdateTarget
  28. /**
  29. * Return the mutable preparation and artifact directories owned by one release target.
  30. * @param target - Supported Desktop target name.
  31. * @returns Target paths plus the shared immutable download cache.
  32. */
  33. export function desktopTargetBuildPaths(target: DesktopAutoUpdateTarget): DesktopTargetBuildPaths
  34. /**
  35. * Resolve the paths owned by the target selected in a packaging environment.
  36. * @param env - Packaging environment.
  37. * @param hostPlatform - Build-host platform used when no target override exists.
  38. * @param hostArch - Build-host architecture used when no target override exists.
  39. * @returns Selected target paths.
  40. */
  41. export function resolveDesktopTargetBuildPaths(
  42. env?: NodeJS.ProcessEnv,
  43. hostPlatform?: NodeJS.Platform,
  44. hostArch?: string,
  45. ): DesktopTargetBuildPaths