@letterstory/cli 0.177.101 → 0.177.103

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/lib/cli.mjs CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
92
92
 
93
93
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
94
- export const VERSION = "0.177.101";
94
+ export const VERSION = "0.177.103";
95
95
 
96
96
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
97
97
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -352,10 +352,13 @@ async function buildTalk(ctx) {
352
352
 
353
353
  // ——— Reading builds back: what Build's list and a build's page show ———
354
354
 
355
+ /** Where a build stands, as the app reads it (`reading.state`: merged, pr_open, …); its steps' record only without one. */
356
+ const standing = (b) => b.standing ?? b.reading?.state ?? b.status;
357
+
355
358
  /** A build's change steps as lines: where each stands, then its preview and pull request. */
356
359
  export function buildLines(b) {
357
360
  const where = b.reading?.detail ?? b.status;
358
- const lines = [`${b.id} ${b.status} ${b.title}${b.domain ? ` (${b.domain})` : ""}`, ` ${where}`];
361
+ const lines = [`${b.id} ${standing(b)} ${b.title}${b.domain ? ` (${b.domain})` : ""}`, ` ${where}`];
359
362
  for (const s of b.steps ?? []) {
360
363
  lines.push(` ${s.lane ?? s.status} ${s.title ?? "Step"}${s.note ? `: ${s.note}` : ""}`);
361
364
  if (s.attention) lines.push(` ${s.attention}`);
@@ -397,7 +400,7 @@ async function buildList(ctx) {
397
400
  ? r.builds
398
401
  .map(
399
402
  (b) =>
400
- `${b.id} ${b.status.padEnd(11)} ${b.created_at.slice(0, 10)} ${b.title}${b.domain ? ` (${b.domain})` : ""}`
403
+ `${b.id} ${standing(b).padEnd(11)} ${b.created_at.slice(0, 10)} ${b.title}${b.domain ? ` (${b.domain})` : ""}`
401
404
  )
402
405
  .join("\n")
403
406
  : "No builds yet."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.101",
3
+ "version": "0.177.103",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",