@letterstory/cli 0.177.199 → 0.177.201
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 +3 -1
- package/lib/commands/visits.mjs +5 -1
- 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.201";
|
|
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;
|
|
@@ -545,6 +545,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
545
545
|
"named",
|
|
546
546
|
// visits transact site --check-link: read the site for its link to the Agent Site now.
|
|
547
547
|
"check-link",
|
|
548
|
+
// visits transact site --tree: add the screen's question tree.
|
|
549
|
+
"tree",
|
|
548
550
|
]);
|
|
549
551
|
|
|
550
552
|
// Tiny argv parser: `--flag value`, `--flag=value`, boolean `--flag`, and positionals.
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
// letterstory visits transact prebuild <site-id>... [--dry-run] staff: build customers' agent sites, Letter paying
|
|
37
37
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
38
38
|
// letterstory visits transact learnings [--since 7d]
|
|
39
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] [--dismiss "<question>"] [--forget <address>] [--check-link] [--dns-for <address>] the Agent Site tab
|
|
39
|
+
// letterstory visits transact site [publish|unpublish] [--prepare] [--domain ask.acme.com | --domain none] [--remove <slug>] [--dismiss "<question>"] [--forget <address>] [--check-link] [--dns-for <address>] [--tree [--since 7d]] the Agent Site tab
|
|
40
40
|
|
|
41
41
|
import { CliError } from "../client.mjs";
|
|
42
42
|
import { closeSync, fstatSync, openSync, readSync } from "node:fs";
|
|
@@ -255,6 +255,8 @@ export const ARGS = {
|
|
|
255
255
|
host: "host",
|
|
256
256
|
check_link: { value: (flags) => (flagBool(flags["check-link"]) ? true : undefined) },
|
|
257
257
|
dns_for: { flag: "dns-for" },
|
|
258
|
+
tree: { value: (flags) => (flagBool(flags.tree) ? true : undefined) },
|
|
259
|
+
days,
|
|
258
260
|
},
|
|
259
261
|
visitors_prebuild_agent_sites: {
|
|
260
262
|
site_ids: { value: (flags, positionals) => (positionals.length ? positionals : undefined) },
|
|
@@ -262,6 +264,7 @@ export const ARGS = {
|
|
|
262
264
|
},
|
|
263
265
|
visitors_set_agent_site: {
|
|
264
266
|
site_id: "site",
|
|
267
|
+
prepare: { value: (flags) => (flagBool(flags.prepare) ? true : undefined) },
|
|
265
268
|
publish: { value: (flags, positionals) => ({ publish: true, unpublish: false })[positionals[0]] },
|
|
266
269
|
domain: {
|
|
267
270
|
value: (flags) =>
|
|
@@ -552,6 +555,7 @@ async function visitsTransact(ctx) {
|
|
|
552
555
|
const write =
|
|
553
556
|
rest.positionals[0] === "publish" ||
|
|
554
557
|
rest.positionals[0] === "unpublish" ||
|
|
558
|
+
flagBool(flags.prepare) ||
|
|
555
559
|
flags.domain !== undefined ||
|
|
556
560
|
flags.remove !== undefined ||
|
|
557
561
|
flags.dismiss !== undefined ||
|