run402 4.17.6 → 4.17.7

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.
@@ -23,7 +23,7 @@
23
23
  "argv": ["buzz", "users", "get", "--help"],
24
24
  "exit_code": 0,
25
25
  "stdout_contains": [
26
- "Usage: buzz users get",
26
+ "users get [OPTIONS]",
27
27
  "--pubkey",
28
28
  "Omit for your own profile"
29
29
  ]
@@ -32,7 +32,7 @@
32
32
  "argv": ["buzz", "social", "publish", "--help"],
33
33
  "exit_code": 0,
34
34
  "stdout_contains": [
35
- "Usage: buzz social publish",
35
+ "social publish [OPTIONS]",
36
36
  "--content"
37
37
  ]
38
38
  },
@@ -40,8 +40,7 @@
40
40
  "argv": ["buzz", "social", "event", "--help"],
41
41
  "exit_code": 0,
42
42
  "stdout_contains": [
43
- "Usage: buzz social event",
44
- "--event"
43
+ "social event --event"
45
44
  ]
46
45
  }
47
46
  ],
@@ -34,12 +34,12 @@ function commandError(code = "ENOENT") {
34
34
  return { status: null, stdout: "", stderr: "", error: Object.assign(new Error(code), { code }) };
35
35
  }
36
36
 
37
- function helpFor(args) {
37
+ function helpFor(args, program = "buzz") {
38
38
  const key = args.join(" ");
39
39
  if (key === "--help") return "Buzz CLI — interact with a Buzz relay\nusers\nsocial\nErrors are JSON on stderr";
40
- if (key === "users get --help") return "Usage: buzz users get\n--pubkey\nOmit for your own profile";
41
- if (key === "social publish --help") return "Usage: buzz social publish\n--content";
42
- if (key === "social event --help") return "Usage: buzz social event\n--event";
40
+ if (key === "users get --help") return `Usage: ${program} users get [OPTIONS]\n--pubkey\nOmit for your own profile`;
41
+ if (key === "social publish --help") return `Usage: ${program} social publish [OPTIONS]\n--content`;
42
+ if (key === "social event --help") return `Usage: ${program} social event --event <EVENT>`;
43
43
  return null;
44
44
  }
45
45
 
@@ -127,6 +127,21 @@ describe("Buzz doctor bounded zero-mutation runner", () => {
127
127
  assert.deepEqual(validation, { valid: true, reason: null });
128
128
  });
129
129
 
130
+ it("accepts the released capabilities when clap renders the Windows buzz.exe program name", async () => {
131
+ const dependencies = healthyDependencies();
132
+ const originalRunner = dependencies.runCommand;
133
+ dependencies.runCommand = (command, args, options) => {
134
+ if (command.endsWith("/buzz") && args.at(-1) === "--help") {
135
+ return commandOk(helpFor(args, "buzz.exe"));
136
+ }
137
+ return originalRunner(command, args, options);
138
+ };
139
+ const report = await buildBuzzDoctorReport(dependencies);
140
+ assert.equal(report.checks.find((check) => check.name === "buzz_cli").status, "ok");
141
+ assert.equal(report.checks.find((check) => check.name === "buzz_agent_target").status, "ok");
142
+ assert.equal(report.ok, true);
143
+ });
144
+
130
145
  it("continues through independent shell, Node, client, origin, relay, target, and profile failures", async () => {
131
146
  const dependencies = healthyDependencies();
132
147
  dependencies.env.SHELL = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.17.6",
3
+ "version": "4.17.7",
4
4
  "description": "CLI for Run402 — provision Postgres databases, deploy static sites, generate images, and manage wallets via x402 and MPP micropayments.",
5
5
  "type": "module",
6
6
  "bin": {