UpdateService
Defined in: src/update.ts:91
Tracks how far the running checkout is behind origin/
The check compares HEAD against origin/
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UpdateService(
deps?):UpdateService
Defined in: src/update.ts:102
Parameters
Section titled “Parameters”UpdateDeps = {}
Returns
Section titled “Returns”UpdateService
Methods
Section titled “Methods”apply()
Section titled “apply()”apply():
object
Defined in: src/update.ts:225
Kick off the detached deploy script. Guards against double-launch, but
self-heals: once a prior deploy has finished (or crashed), the latch clears
so a failed update can be retried. Returns started: false with a reason
the UI can surface verbatim — never a bare status code.
Returns
Section titled “Returns”object
error?
Section titled “error?”
optionalerror?:string
started
Section titled “started”started:
boolean
applyState()
Section titled “applyState()”applyState():
DeployState
Defined in: src/update.ts:155
Read the detached deploy’s captured output to classify its state. Fail-safe: a missing/unreadable log is “idle”; an exit marker decides done/failed; a marker-less log that’s gone quiet past DEPLOY_STALE_MS is “failed” (crashed) so a stuck launch can’t block future updates forever.
Returns
Section titled “Returns”check()
Section titled “check()”check(
now):Promise<UpdateStatus>
Defined in: src/update.ts:192
Fetch origin and recompute how far behind the tracked branch we are. On any git/network failure, returns behind:0 (fail safe → no false update badge).
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<UpdateStatus>
current()
Section titled “current()”current():
UpdateStatus|null
Defined in: src/update.ts:186
Last computed status, or null before the first check.
Returns
Section titled “Returns”UpdateStatus | null