Ende.AutoUpdateOptions

interface · desktop apps only

interface Ende.AutoUpdateOptions

Properties

url

url?: string

Base URL of the release server hosting latest.json and patch files. Defaults to desktop.release.baseUrl from ende.json when configured; required otherwise.

Must be an https: URL — non-HTTPS URLs are refused.

interval

interval?: number

Poll interval in milliseconds. If omitted, only a single check is performed ~1s after the call; pass an interval to keep checking for the lifetime of the process.

publicKey

publicKey?: string

Base64-encoded 32-byte Ed25519 public key used to verify the release manifest.

When set, latest.json must carry a top-level signature (base64 Ed25519 signature) over a signed field holding the manifest JSON as a string. The signature is verified before any patch is fetched, and only the contents of the verified signed payload are trusted. A manifest that is unsigned or fails verification is rejected.

Strongly recommended for production: without it, update integrity rests solely on TLS and the per-patch SHA-256 in the manifest.

onUpdateReady

onUpdateReady?: (version: string) => void

Called once an update has been downloaded, verified, and staged for the next launch. Receives the version string being staged.

onRollback

onRollback?: (reason: string) => void

Called if the previous launch's update failed to start and was automatically rolled back to the prior version. Receives a human-readable reason.