mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
fix: show runtime/platform in spawn version, clarify compact list legend (#456)
- `spawn version` now shows runtime (bun/node), version, platform, and architecture for easier bug reporting and diagnostics - Compact list legend changed from confusing "N/N" to descriptive "green = all clouds yellow = some missing" - Bump CLI to v0.2.38 Agent: ux-engineer Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b4580b4f8f
commit
1316f9f609
4 changed files with 13 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.2.37",
|
||||
"version": "0.2.38",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -368,9 +368,12 @@ describe("dispatchCommand routing", () => {
|
|||
describe("showVersion output format", () => {
|
||||
// Replica of the showVersion output structure
|
||||
function formatVersionOutput(version: string, binaryPath: string | undefined): string[] {
|
||||
const runtime = process.versions.bun ? "bun" : "node";
|
||||
const runtimeVersion = process.versions.bun ?? process.versions.node;
|
||||
return [
|
||||
`spawn v${version}`,
|
||||
` ${binaryPath ?? "unknown path"}`,
|
||||
` ${runtime} ${runtimeVersion} ${process.platform} ${process.arch}`,
|
||||
` Run spawn update to check for updates.`,
|
||||
];
|
||||
}
|
||||
|
|
@ -390,9 +393,15 @@ describe("showVersion output format", () => {
|
|||
expect(lines[1]).toContain("unknown path");
|
||||
});
|
||||
|
||||
it("should include runtime and platform info", () => {
|
||||
const lines = formatVersionOutput("0.2.15", "/usr/local/bin/spawn");
|
||||
expect(lines[2]).toContain(process.platform);
|
||||
expect(lines[2]).toContain(process.arch);
|
||||
});
|
||||
|
||||
it("should suggest spawn update", () => {
|
||||
const lines = formatVersionOutput("0.2.15", "/usr/local/bin/spawn");
|
||||
expect(lines[2]).toContain("spawn update");
|
||||
expect(lines[3]).toContain("spawn update");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ export async function cmdList(): Promise<void> {
|
|||
const total = agents.length * clouds.length;
|
||||
console.log();
|
||||
if (isCompact) {
|
||||
console.log(`${pc.green("N/N")} all clouds ${pc.yellow("N/N")} some missing`);
|
||||
console.log(`Color: ${pc.green("green")} = all clouds ${pc.yellow("yellow")} = some missing`);
|
||||
} else {
|
||||
console.log(`${pc.green("+")} implemented ${pc.dim("-")} not yet available`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ async function handleNoCommand(prompt: string | undefined): Promise<void> {
|
|||
function showVersion(): void {
|
||||
console.log(`spawn v${VERSION}`);
|
||||
console.log(pc.dim(` ${process.argv[1] ?? "unknown path"}`));
|
||||
console.log(pc.dim(` ${process.versions.bun ? "bun" : "node"} ${process.versions.bun ?? process.versions.node} ${process.platform} ${process.arch}`));
|
||||
console.log(pc.dim(` Run ${pc.cyan("spawn update")} to check for updates.`));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue