@bli-cockpit/cli 0.2.78 → 0.2.80
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.
|
@@ -100,10 +100,21 @@ export function localCommandHelp(command) {
|
|
|
100
100
|
`Default dashboard: ${DEFAULT_DASHBOARD_URL}. Omit --dashboard-url for normal production use; pass it only for staging/custom dashboards or to force a different pairing.`,
|
|
101
101
|
].join("\n");
|
|
102
102
|
}
|
|
103
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* `cockpit <command> --help`, and since BLI-3833 `cockpit <command> <verb>
|
|
105
|
+
* --help` too — QA tick 21 found `cockpit cal create --help` printing the whole
|
|
106
|
+
* usage wall to stderr and exiting 1 on all eight nouns, because the gate only
|
|
107
|
+
* accepted the command name alone. The verb is not validated here: a verb the
|
|
108
|
+
* manual does not know still gets the command's own manual, which names every
|
|
109
|
+
* verb it has, at exit 0.
|
|
110
|
+
*/
|
|
104
111
|
export function isLocalHelpRequest(argv) {
|
|
105
112
|
const command = argv[0];
|
|
106
113
|
if (!command || !rootCommandNames.has(command))
|
|
107
114
|
return false;
|
|
108
|
-
|
|
115
|
+
const last = argv[argv.length - 1];
|
|
116
|
+
const helpFlag = last === "--help" || last === "-h";
|
|
117
|
+
if (argv.length === 2)
|
|
118
|
+
return helpFlag;
|
|
119
|
+
return argv.length === 3 && helpFlag && !String(argv[1]).startsWith("-");
|
|
109
120
|
}
|
package/dist/commands/local.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultIo, errorMessage, writeLine } from "./cli-io.js";
|
|
2
|
-
import { isLocalHelpRequest, localCommandHelp } from "./local-help.js";
|
|
2
|
+
import { isLocalHelpRequest, localCommandHelp, rootCommandNames } from "./local-help.js";
|
|
3
3
|
import { describeError } from "../health-detail.js";
|
|
4
4
|
import { reportInstallEventsBestEffort } from "./install-receipts.js";
|
|
5
5
|
import { persistOnboardingRootConfig, resolveOnboardingRootsForCommand, } from "./collection-roots.js";
|
|
@@ -60,7 +60,14 @@ export async function runLocalCockpitCli(argv, io = defaultIo()) {
|
|
|
60
60
|
catch (error) {
|
|
61
61
|
writeLine(io.stderr, errorMessage(error));
|
|
62
62
|
writeLine(io.stderr, "");
|
|
63
|
-
|
|
63
|
+
// A refused `cockpit cal create --meet` used to print its one correct
|
|
64
|
+
// reason line and then the WHOLE collector wall — onboard, update, forty
|
|
65
|
+
// more — so the reason drowned and Edward read it as "it just shows usage"
|
|
66
|
+
// (2026-09-06). A parse error on a KNOWN command gets that command's own
|
|
67
|
+
// manual, which names the flags the reason line just asked for; only an
|
|
68
|
+
// unknown command earns the wall.
|
|
69
|
+
const command = argv[0];
|
|
70
|
+
writeLine(io.stderr, command && rootCommandNames.has(command) ? localCommandHelp(command) : localCommandHelp());
|
|
64
71
|
return 1;
|
|
65
72
|
}
|
|
66
73
|
// A limit typed on the command line is remembered for every later run,
|
|
@@ -15,7 +15,7 @@ export async function runCockpitCli(argv, io) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (command === "--version" || command === "-V" || command === "version") {
|
|
18
|
-
writeLine(io?.stdout ?? process.stdout, "0.2.
|
|
18
|
+
writeLine(io?.stdout ?? process.stdout, "0.2.80");
|
|
19
19
|
return 0;
|
|
20
20
|
}
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.80",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "node dist/cli.js --help && node ../../scripts/assert-public-cli-routing.mjs && node ../../scripts/assert-public-cli-verb-help.mjs && node ../../scripts/assert-public-cli-runtime-files.mjs && node ../../scripts/assert-public-cli-no-fleet-posts.mjs && node ../../scripts/assert-public-package-pack.mjs --workspace=@bli-cockpit/cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@bli-cockpit/memory-mcp": "0.1.
|
|
30
|
+
"@bli-cockpit/memory-mcp": "0.1.12",
|
|
31
31
|
"@bli-cockpit/mcp": "0.1.15",
|
|
32
32
|
"@bli-cockpit/telemetry-core": "0.1.32"
|
|
33
33
|
}
|