1
0

desktop-release-environment.d.mts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /** Environment variable that supplies the Electron application identifier. */
  2. export const DESKTOP_APP_ID_ENV: 'DSH_DESKTOP_APP_ID'
  3. /** Environment variable that supplies electron-builder's macOS certificate qualifier. */
  4. export const MACOS_SIGNING_IDENTITY_ENV: 'DSH_DESKTOP_MACOS_SIGNING_IDENTITY'
  5. /** Environment variable that supplies the expected Apple Developer Team ID. */
  6. export const MACOS_TEAM_ID_ENV: 'DSH_DESKTOP_MACOS_TEAM_ID'
  7. /** Public identity expected on a macOS release. */
  8. export interface MacOSSigningEnvironment {
  9. readonly signingIdentity: string
  10. readonly teamId: string
  11. }
  12. /** Apple ID credentials accepted by notarytool. */
  13. export interface MacOSAppleIdNotarizationEnvironment {
  14. readonly appleId: string
  15. readonly appleIdPassword: string
  16. readonly teamId: string
  17. }
  18. /** App Store Connect API credentials accepted by notarytool. */
  19. export interface MacOSApiKeyNotarizationEnvironment {
  20. readonly appleApiKey: string
  21. readonly appleApiKeyId: string
  22. readonly appleApiIssuer: string
  23. }
  24. /** Keychain profile accepted by notarytool. */
  25. export interface MacOSKeychainNotarizationEnvironment {
  26. readonly keychainProfile: string
  27. readonly keychain?: string
  28. }
  29. /** One complete credential strategy accepted by notarytool. */
  30. export type MacOSNotarizationEnvironment =
  31. | MacOSAppleIdNotarizationEnvironment
  32. | MacOSApiKeyNotarizationEnvironment
  33. | MacOSKeychainNotarizationEnvironment
  34. /**
  35. * Resolve and validate the application identifier shared by every platform target.
  36. * @param env - Packaging environment.
  37. * @returns Reverse-DNS application identifier.
  38. */
  39. export function resolveDesktopAppId(env: NodeJS.ProcessEnv): string
  40. /**
  41. * Resolve and validate the public identity expected on a macOS release.
  42. * @param env - Packaging environment.
  43. * @returns Expected certificate qualifier and Team ID.
  44. */
  45. export function resolveMacOSSigningEnvironment(env: NodeJS.ProcessEnv): MacOSSigningEnvironment
  46. /**
  47. * Resolve one complete credential set accepted by Apple's notary service.
  48. * @param env - Packaging environment.
  49. * @returns Notary credentials without the submitted artifact path.
  50. */
  51. export function resolveMacOSNotarizationEnvironment(env: NodeJS.ProcessEnv): MacOSNotarizationEnvironment