@letterstory/cli 0.100.2 → 0.100.4

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
@@ -59,7 +59,7 @@ import {
59
59
  } from "./commands.mjs";
60
60
 
61
61
  // Keep in sync with cli/package.json.
62
- export const VERSION = "0.100.2";
62
+ export const VERSION = "0.100.4";
63
63
 
64
64
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
65
65
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -220,9 +220,17 @@ export function formatApply(result) {
220
220
  for (const a of result.skipped) lines.push(` ${SYMBOL[a.op]} ${a.section}/${a.name} — ${a.reason}`);
221
221
  if (result.failed.length) lines.push("Failed:");
222
222
  for (const a of result.failed) lines.push(` ${SYMBOL[a.op]} ${a.section}/${a.name} — ${a.error}`);
223
- if (result.gated?.length) {
223
+ // `gated` lists every gated change, allowed or not; after a real apply, show only those still held.
224
+ // A field-gated record can land in `applied` with its gated field skipped, so check `skipped` too.
225
+ const key = (a) => `${a.op} ${a.section}/${a.name}`;
226
+ const done = new Set(result.dryRun ? [] : result.applied.map(key));
227
+ const held = (result.gated ?? []).filter(
228
+ (a) =>
229
+ !done.has(key(a)) || result.skipped.some((s) => key(s) === key(a) && s.reason.includes(`gated (${a.gate})`))
230
+ );
231
+ if (held.length) {
224
232
  lines.push(`Gated (allow with --allow; confirm ${result.confirm}):`);
225
- for (const a of result.gated) lines.push(` ${SYMBOL[a.op]} ${a.section}/${a.name} — ${a.gate}`);
233
+ for (const a of held) lines.push(` ${SYMBOL[a.op]} ${a.section}/${a.name} — ${a.gate}`);
226
234
  }
227
235
  for (const w of result.plan.warnings) lines.push(`warning: ${w}`);
228
236
  return lines.join("\n");
@@ -76,7 +76,7 @@ function describe(run) {
76
76
  const lines = [
77
77
  `${run.id} ${run.repo}@${run.baseBranch} ${run.status} (${run.phase}) $${run.costUsd.toFixed(2)}`,
78
78
  ];
79
- if (run.prUrl) lines.push(` PR: ${run.prUrl}`);
79
+ if (run.prUrl) lines.push(` PR: ${run.prUrl} (${run.prState ?? "state unknown"})`);
80
80
  if (run.errorCode) lines.push(` Error (${run.errorCode}): ${run.errorDetail ?? ""}`);
81
81
  if (run.summary) lines.push(...run.summary.split("\n").map((l) => ` ${l}`));
82
82
  return lines.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.100.2",
3
+ "version": "0.100.4",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",