@neta-art/cohub-cli 1.0.3 → 1.0.5

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.
@@ -20,7 +20,7 @@ export function registerModels(program) {
20
20
  // catalog is Record<provider, ModelCatalogEntry[]>
21
21
  for (const [provider, entries] of Object.entries(catalog)) {
22
22
  console.log(`\n ${provider}`);
23
- console.log(" " + "─".repeat(provider.length));
23
+ console.log(` ${"─".repeat(provider.length)}`);
24
24
  table(entries, [
25
25
  { key: "id", label: "ID" },
26
26
  { key: "provider", label: "Provider" },
package/dist/output.js CHANGED
@@ -14,7 +14,7 @@ export function table(rows, columns) {
14
14
  }
15
15
  const widths = columns.map((c) => colWidth(rows, c.key, c.label));
16
16
  const header = columns
17
- .map((c, i) => c.label.padEnd(widths[i]))
17
+ .map((c, i) => c.label.padEnd(widths[i] ?? 0))
18
18
  .join(" │ ")
19
19
  .trimEnd();
20
20
  console.log(header);
@@ -24,7 +24,7 @@ export function table(rows, columns) {
24
24
  .map((c, i) => {
25
25
  const v = row[c.key] ?? "";
26
26
  const s = typeof v === "object" ? JSON.stringify(v) : String(v);
27
- return s.padEnd(widths[i]);
27
+ return s.padEnd(widths[i] ?? 0);
28
28
  })
29
29
  .join(" │ ")
30
30
  .trimEnd();
@@ -54,7 +54,7 @@ export function handleHttp(e) {
54
54
  if (status)
55
55
  detail = `HTTP ${status}`;
56
56
  if (body && typeof body === "object" && "message" in body) {
57
- detail = `${detail ? detail + " " : ""}${body.message}`;
57
+ detail = `${detail ? `${detail}` : ""}${body.message}`;
58
58
  }
59
59
  error(msg, detail);
60
60
  }
@@ -73,7 +73,7 @@ export function spinner() {
73
73
  interval = setInterval(() => {
74
74
  process.stderr.clearLine?.(0);
75
75
  process.stderr.cursorTo?.(0);
76
- process.stderr.write(` ${frames[i++ % frames.length]} ${msg} `);
76
+ process.stderr.write(` ${frames[i++ % frames.length] ?? ""} ${msg} `);
77
77
  }, 80);
78
78
  },
79
79
  stop(msg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "commander": "^13.1.0",
17
- "@neta-art/cohub": "1.2.2"
17
+ "@neta-art/cohub": "1.3.1"
18
18
  },
19
19
  "publishConfig": {
20
20
  "access": "public"