Class: HookResult
Defined in: packages/core/src/domain/value-objects/hook-result.ts:8
The result of executing a run: hook command via HookRunner.
Captures the process exit code and all captured output. Use isSuccess()
for the canonical success check — a non-zero exit code aborts the
pre-* lifecycle gate.
Constructors
Constructor
new HookResult(
exitCode,stdout,stderr):HookResult
Defined in: packages/core/src/domain/value-objects/hook-result.ts:20
Creates a new HookResult from a completed hook process.
Parameters
exitCode
number
The process exit code (0 = success, non-zero = failure)
stdout
string
Captured standard output
stderr
string
Captured standard error
Returns
HookResult
Methods
exitCode()
exitCode():
number
Defined in: packages/core/src/domain/value-objects/hook-result.ts:31
The process exit code.
Returns
number
0 for success, non-zero for failure
isSuccess()
isSuccess():
boolean
Defined in: packages/core/src/domain/value-objects/hook-result.ts:61
Returns true when the command exited with code 0.
A pre-* lifecycle gate fails and aborts the operation when this
returns false.
Returns
boolean
true if exit code is 0
stderr()
stderr():
string
Defined in: packages/core/src/domain/value-objects/hook-result.ts:49
Captured standard error from the command.
Returns
string
All stderr output as a single string
stdout()
stdout():
string
Defined in: packages/core/src/domain/value-objects/hook-result.ts:40
Captured standard output from the command.
Returns
string
All stdout output as a single string