@letterstory/cli 0.177.169 → 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 +3 -1
- package/lib/commands/site.mjs +3 -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;
|
|
@@ -292,6 +292,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
292
292
|
"with-preview",
|
|
293
293
|
// build / repo start / site fix --keep-open: the org's auto-merge window never merges its pull request.
|
|
294
294
|
"keep-open",
|
|
295
|
+
// site suggest: the Auto-merge box (--keep-open unticks it).
|
|
296
|
+
"auto-merge",
|
|
295
297
|
// repo …: the repo is a GitLab project (--repo group/subgroup/project).
|
|
296
298
|
"gitlab",
|
|
297
299
|
"accept",
|
package/lib/commands/site.mjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// site highlight <domain> [--off] → set_competitor_highlight
|
|
18
18
|
// site prospect <url> → read_prospect_site (staff: any company's site, no account, nothing stored)
|
|
19
19
|
// site suggest <host> --idea <id> | --draft-id <id>… | --pattern <folder> | --item <id> --path <p>
|
|
20
|
-
// | --new-page <folder> --words "<what the page is>" → start_suggestion
|
|
20
|
+
// | --new-page <folder> --words "<what the page is>" [--auto-merge | --keep-open] → start_suggestion
|
|
21
21
|
|
|
22
22
|
import { writeFileSync } from "node:fs";
|
|
23
23
|
|
|
@@ -216,6 +216,8 @@ const ARGS = {
|
|
|
216
216
|
return folder ? { folder: String(folder), words: String(words ?? "") } : undefined;
|
|
217
217
|
},
|
|
218
218
|
},
|
|
219
|
+
// --auto-merge / --keep-open: the Auto-merge box; left out, the organization's default.
|
|
220
|
+
auto_merge: { flag: "auto-merge", type: "bool", negate: "keep-open" },
|
|
219
221
|
},
|
|
220
222
|
fix_site_observations: {
|
|
221
223
|
host: { positional: 0, required: true, label: "host" },
|
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;
|