@nice-code/commander 0.70.0 → 0.70.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.cjs +8 -5
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +8 -5
- package/build/cli.mjs.map +1 -1
- package/package.json +6 -6
package/build/cli.mjs
CHANGED
|
@@ -23612,14 +23612,16 @@ async function cmdUi(ctx) {
|
|
|
23612
23612
|
url,
|
|
23613
23613
|
opened
|
|
23614
23614
|
});
|
|
23615
|
-
else ctx.out.print(opened ? `opened ${url}
|
|
23615
|
+
else ctx.out.print(opened ? `opened ${url}` : `could not open a browser — visit ${url}`);
|
|
23616
23616
|
return EXIT.ok;
|
|
23617
23617
|
}
|
|
23618
23618
|
//#endregion
|
|
23619
23619
|
//#region src/cli.ts
|
|
23620
23620
|
const HELP = `nice-commander — one typed config, one control surface, for dev environments.
|
|
23621
23621
|
|
|
23622
|
-
usage: nice-commander [--config <path>] [--json] [--no-color] [--timeout <ms>]
|
|
23622
|
+
usage: nice-commander [--config <path>] [--json] [--no-color] [--timeout <ms>] [command] [selection] [flags]
|
|
23623
|
+
|
|
23624
|
+
With NO command, "ui" runs: the daemon is ensured and the browser opened. --help prints this text.
|
|
23623
23625
|
|
|
23624
23626
|
selection: process ids, group names, tag=val (AND across terms), or --all.
|
|
23625
23627
|
Bare up/explain use the config's defaultSelection (or print the groups and exit);
|
|
@@ -23695,13 +23697,14 @@ async function main() {
|
|
|
23695
23697
|
process.stderr.write(`nice-commander: ${parsed.error}\n`);
|
|
23696
23698
|
return EXIT.usage;
|
|
23697
23699
|
}
|
|
23698
|
-
if (parsed.help || parsed.command
|
|
23700
|
+
if (parsed.help || parsed.command === "help") {
|
|
23699
23701
|
process.stdout.write(HELP);
|
|
23700
23702
|
return EXIT.ok;
|
|
23701
23703
|
}
|
|
23702
|
-
const
|
|
23704
|
+
const requested = parsed.command ?? "ui";
|
|
23705
|
+
const command = COMMANDS[requested];
|
|
23703
23706
|
if (command == null) {
|
|
23704
|
-
process.stderr.write(`nice-commander: unknown command "${
|
|
23707
|
+
process.stderr.write(`nice-commander: unknown command "${requested}" (--help lists them)\n`);
|
|
23705
23708
|
return EXIT.usage;
|
|
23706
23709
|
}
|
|
23707
23710
|
try {
|