Variable: EXIT
constEXIT:object
The stable exit-code map. Adding a code is a documented, tested change to the CLI's contract; renaming or repurposing one is a breaking change.
Type Declaration
DATAERR
readonlyDATAERR:65=65
Data error: input could not be parsed or its format could not be detected (EX_DATAERR).
INVALID
readonlyINVALID:1=1
Operation-level failure: validate found the input invalid (parseable but non-conformant):
a real, expected CI signal that the message is bad and the tool worked. Never emitted for
unparseable input (that is DATAERR).
NOINPUT
readonlyNOINPUT:66=66
No input: the named file does not exist or is unreadable (EX_NOINPUT).
OK
readonlyOK:0=0
Success: the operation completed; validate found the input valid.
SOFTWARE
readonlySOFTWARE:70=70
Internal error: an unexpected exception (a bug), distinct from a handled bad input (EX_SOFTWARE).
UNAVAILABLE
readonlyUNAVAILABLE:69=69
Unavailable: a required capability is not yet wired (e.g. redact before @cosyte/deid), a
distinct non-zero signal that is never a fake success (EX_UNAVAILABLE).
USAGE
readonlyUSAGE:2=2
Usage error: unknown command, bad flag, missing argument (EX_USAGE).
Example
import { EXIT } from "@cosyte/cli";
process.exitCode = EXIT.OK; // => 0