@letterstory/cli 0.177.180 → 0.177.182

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
@@ -93,7 +93,7 @@ import {
93
93
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
94
94
 
95
95
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
96
- export const VERSION = "0.177.180";
96
+ export const VERSION = "0.177.182";
97
97
 
98
98
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
99
99
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -103,6 +103,7 @@ export const EXIT_PAYMENT_REQUIRED = 3;
103
103
  // `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
104
104
  export const BOOLEAN_FLAGS = new Set([
105
105
  "background",
106
+ "directed",
106
107
  "approve",
107
108
  "update",
108
109
  // repo list: open changes past --limit are listed unless --newest-only.
@@ -328,16 +328,25 @@ export async function cmdOnboarding(ctx) {
328
328
  /** The onboarding's steps for its answer, the one it is on marked, and where it finishes. */
329
329
  function signupPathLines(path) {
330
330
  if (!path) return [];
331
- const at = path.steps.findIndex((s) => s.id === path.step);
331
+ // Finished: every step done (its `step` is null then).
332
+ const at = path.finished ? path.steps.length : path.steps.findIndex((s) => s.id === path.step);
332
333
  const lines = path.steps.map((s, i) => `${i === at ? ">" : i < at ? "✓" : " "} ${i + 1}. ${s.title}`);
333
334
  return [...lines, ` Finishes in ${path.finish}`];
334
335
  }
335
336
 
337
+ /** Whether set-up is still open, as the app's Onboarding entry reads it, and what is next. */
338
+ function setupLines(setup) {
339
+ if (!setup) return [];
340
+ if (setup.complete) return ["Set-up: done"];
341
+ const next = setup.milestones.find((m) => m.id === setup.next);
342
+ return [`Set-up: next is ${next?.label ?? setup.next}`];
343
+ }
344
+
336
345
  async function onboardingStatus(ctx) {
337
346
  const { client, flags, io } = ctx;
338
347
  const result = await client.callTool("get_onboarding_status", {});
339
348
  printResult(io, flags, result, (r) =>
340
- r.signup ? signupPathLines(r.signup).join("\n") : JSON.stringify(r, null, 2)
349
+ r.signup ? [...signupPathLines(r.signup), ...setupLines(r.setup)].join("\n") : JSON.stringify(r, null, 2)
341
350
  );
342
351
  return 0;
343
352
  }
@@ -53,6 +53,7 @@ const paymentScopeArgs = {
53
53
  export const ARGS = {
54
54
  list_evidence_snapshots: { site_id: { flag: "site" } },
55
55
  draft_evidence_snapshot: {
56
+ tracking_from: { flag: "tracking-from" },
56
57
  background: { flag: "background", type: "bool" },
57
58
  reply: {
58
59
  value: (flags) => {
@@ -153,6 +154,7 @@ export const ARGS = {
153
154
  get_proof_database: {},
154
155
  disconnect_proof_database: {},
155
156
  generate_proof_actions: {
157
+ directed: { flag: "directed", type: "bool" },
156
158
  window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
157
159
  focus: { flag: "focus" },
158
160
  source: { flag: "source" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.180",
3
+ "version": "0.177.182",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",