// Exit codes for every `mosaic` command in this package: 0 ok; 1 failed // (a child died, a boot timed out, an outcome is unknown); 2 invalid (bad // input, a decision or option that doesn't exist); 3 refused (system or // business config problem, the broker or notifier refused, the human proof // refused, a host already running); 4 usage. export class CliError extends Error { constructor(message, exitCode = 2) { super(message); this.name = "CliError"; this.exitCode = exitCode; } } // Rename r2 stage B: `mosaic org config validate|resolve` writes its own messages // (packages/organization/src/config-command.mjs) and then ends with this exit code; run() // returns it without printing anything more. export class CliExit extends Error { constructor(exitCode) { super(`exit ${exitCode}`); this.name = "CliExit"; this.exitCode = exitCode; } }