ProgressIndicator
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/ProgressIndicator.ts:15
A dot-per-second terminal progress indicator.
EXT-53 — always stop it, on every exit path. In its automatic (non-manual) mode the
indicator owns a 1s setInterval, which is an active libuv handle: while it is alive Node’s
event loop can never drain and the process cannot exit, no matter that every await has resolved.
A stop() that is only reachable on the success path therefore turns any error into a hang
rather than an exit. Construct the indicator OUTSIDE the try and clear it in a finally.
stop() is idempotent (see below), so a finally { indicator.stop() } is always safe to add
even where a success-path stop() already ran.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProgressIndicator(
initialMessage,manual?):ProgressIndicator
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/ProgressIndicator.ts:20
Parameters
Section titled “Parameters”initialMessage
Section titled “initialMessage”string
manual?
Section titled “manual?”boolean
Returns
Section titled “Returns”ProgressIndicator
Methods
Section titled “Methods”indicate()
Section titled “indicate()”indicate():
void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/ProgressIndicator.ts:32
Returns
Section titled “Returns”void
stop()
Section titled “stop()”stop():
void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/ProgressIndicator.ts:46
Clear the interval (releasing the libuv handle) and terminate the dot line with a newline.
Idempotent: the handle is nulled and a second call is a complete no-op, so it emits no stray
blank line. That is what makes it safe to call from a finally on top of an existing
success-path stop().
Returns
Section titled “Returns”void