@letterstory/cli 0.177.170 → 0.177.171
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/visits.mjs +12 -3
- 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.171";
|
|
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;
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// letterstory visits transact test "What does it cost?"
|
|
33
33
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
34
34
|
// letterstory visits transact learnings [--since 7d]
|
|
35
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] the agent-optimized site
|
|
35
|
+
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the agent-optimized site
|
|
36
36
|
|
|
37
37
|
import { CliError } from "../client.mjs";
|
|
38
38
|
import { flagStr, printResult, argsFromFlags } from "./shared.mjs";
|
|
@@ -202,6 +202,7 @@ export const ARGS = {
|
|
|
202
202
|
value: (flags) =>
|
|
203
203
|
typeof flags.domain !== "string" ? undefined : flags.domain === "none" ? null : flags.domain,
|
|
204
204
|
},
|
|
205
|
+
remove: { flag: "remove" },
|
|
205
206
|
},
|
|
206
207
|
visitors_export: {
|
|
207
208
|
site_id: "site",
|
|
@@ -453,7 +454,10 @@ async function visitsTransact(ctx) {
|
|
|
453
454
|
}
|
|
454
455
|
if (sub === "site") {
|
|
455
456
|
const write =
|
|
456
|
-
rest.positionals[0] === "publish" ||
|
|
457
|
+
rest.positionals[0] === "publish" ||
|
|
458
|
+
rest.positionals[0] === "unpublish" ||
|
|
459
|
+
flags.domain !== undefined ||
|
|
460
|
+
flags.remove !== undefined;
|
|
457
461
|
const result = await call(rest, write ? "visitors_set_agent_site" : "visitors_get_agent_site");
|
|
458
462
|
printResult(io, flags, result, (r) => {
|
|
459
463
|
if (!r.available) return "Agent-optimized Sites aren't available yet";
|
|
@@ -464,7 +468,12 @@ async function visitsTransact(ctx) {
|
|
|
464
468
|
if (r.domain.status === "pending")
|
|
465
469
|
for (const rec of r.domain.records) lines.push(` ${rec.type} ${rec.name} ${rec.value}`);
|
|
466
470
|
}
|
|
467
|
-
lines.push(
|
|
471
|
+
lines.push(
|
|
472
|
+
r.building
|
|
473
|
+
? `${r.questions.length} questions (Letter is writing them)`
|
|
474
|
+
: `${r.questions.length} questions`,
|
|
475
|
+
...r.questions.map((q) => `${q.up ? " " : " "}${q.question} ${q.url}`)
|
|
476
|
+
);
|
|
468
477
|
return lines.join("\n");
|
|
469
478
|
});
|
|
470
479
|
return 0;
|