@letterstory/cli 0.177.181 → 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 +1 -1
- package/lib/commands/strategy.mjs +11 -2
- package/package.json +1 -1
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.
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
}
|