mosaic org config validate|resolve runs runConfigCommand (packages/organization/src/config-command.mjs), the callable service the old mosaic business validate|resolve executable now calls too. The service returns the exit code, never exits the process and does nothing on import. The spelling sets only the stderr prefix and the usage text; status and stdout are byte-identical, and the v1 output keeps the business key. mosaic org instances|instance|veto takes the same arguments as mosaic business instances|instance|veto and runs the same proof-bearing instances command. It is dispatched before orgCommand, so it never builds the dev-local-owner context. mosaic org validate FILE is unchanged. Help, the UI labels for agent actions and instance reasons, and the current docs now use the org spelling and the packages/organization paths. Two webui test regexes follow the label text. packages/cli/tests/ rename-b-commands.test.mjs compares the two spellings golden for golden on status, stdout, stderr and authorization outcomes, and covers a draft file named like an installed ID.
24 lines
882 B
JavaScript
24 lines
882 B
JavaScript
// 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;
|
|
}
|
|
}
|