@modoki/engine / index / CheckForUpdateOptions
Interface: CheckForUpdateOptions
OTA Updates
baseUrl
baseUrl:
string
Base URL the bucket is served from, e.g. "https://cdn.example.com/games/mygame".
bundleName
bundleName:
string
The bundle this running app instance drives — Phase 1 is single-game, so this is always the "shell" bundle name; Phase 4 sub-games would pass their own name.
embeddedManifestUrl?
optionalembeddedManifestUrl?:string
Where the bundle's OWN manifest.json ships alongside its embedded assets — a RELATIVE path fetched from the app's own served origin (NOT prefixed with baseUrl; this must resolve locally, with zero network round-trip, since the whole point is delta-ing the very first update without needing a whole bundle download). Written into dist/ by the build (see engine/scripts/ota/buildManifest.mjs's --embed flag). Defaults to 'ota-embedded-manifest.json'. Absent/unreadable (an older build that predates this feature) silently falls back to whole-zip — this is an optimization, not a requirement.
fetchImpl?
optionalfetchImpl?: (input,init?) =>Promise<Response>
Parameters
input
RequestInfo | URL
init?
RequestInit
Returns
Promise<Response>
native
native:
OtaNativePlugin
onWillStage?
optionalonWillStage?: (info) =>void
Fires exactly once, right after the release is verified and this update is determined to be genuinely actionable (not up-to-date, not quarantined, not blocked by the release-level engine-API gate) — BEFORE the manifest fetch or any staging begins. Lets a caller (Phase 3b's blocking gate) know a mandatory update is about to download BEFORE the first otaProgress tick arrives, so it can show a blocking screen for the WHOLE download rather than only after it completes. Not called for up-to-date/quarantined/gated-out outcomes. A later failure (bad manifest, download error) still leaves the promise resolving to a non-staged outcome — the caller is expected to un-arm its gate whenever the final outcome isn't staged, not rely on this ever being "undone".
Parameters
info
mandatory
boolean
version
string
Returns
void
publicKey
publicKey:
string
Ed25519 public key (base64url, 32 raw bytes) baked into the app.
runningEngineApi
runningEngineApi:
number
The running engine's own API version — a manifest requiring a HIGHER version is refused rather than staged (the compatibility gate a future sub-game module needs in full; already cheap and correct to enforce even for the single "shell" bundle).