@modoki/engine / index / OtaNativePlugin
Interface: OtaNativePlugin
The native plugin surface this client depends on — a structural (not nominal) type so tests can pass a plain mock without importing @capacitor/core.
OTA Updates
activate()
activate(
opts):Promise<{ok:boolean; }>
Parameters
opts
name
string
version
string
Returns
Promise<{ ok: boolean; }>
getState()
getState():
Promise<{stateJSON:string; }>
Returns
Promise<{ stateJSON: string; }>
stageUpdate()
stageUpdate(
opts):Promise<{ok:boolean; }>
Parameters
opts
expectedZipHash
string
expectedZipSize
number
name
string
version
string
zipUrl
string
Returns
Promise<{ ok: boolean; }>
stageUpdateDelta()
stageUpdateDelta(
opts):Promise<{ok:boolean; }>
Phase 2 delta staging: copy copy (unchanged relative paths) from the already-on-disk baseVersion folder, download only download (new/changed files, each independently hash-verified) into the new version folder. Native must refuse to activate a folder built this way if any copy source is missing (self-heal to stageUpdate's whole-zip path is the CALLER's job, not native's — see checkForUpdate's fallback).
Parameters
opts
baseVersion
string
copy
string[]
download
OtaDeltaDownload[]
name
string
version
string
Returns
Promise<{ ok: boolean; }>