@letterstory/cli 0.177.194 → 0.177.195
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 +9 -5
- 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.195";
|
|
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
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
// letterstory visits transact prebuild <site-id>... [--dry-run] staff: build customers' agent sites, Letter paying
|
|
36
36
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
37
37
|
// letterstory visits transact learnings [--since 7d]
|
|
38
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] [--dismiss "<question>"] [--forget <address>] [--check-link] the Agent Site tab
|
|
38
|
+
// 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
39
|
|
|
40
40
|
import { CliError } from "../client.mjs";
|
|
41
41
|
import { closeSync, fstatSync, openSync, readSync } from "node:fs";
|
|
@@ -250,6 +250,7 @@ export const ARGS = {
|
|
|
250
250
|
site_id: "site",
|
|
251
251
|
host: "host",
|
|
252
252
|
check_link: { value: (flags) => (flagBool(flags["check-link"]) ? true : undefined) },
|
|
253
|
+
dns_for: { flag: "dns-for" },
|
|
253
254
|
},
|
|
254
255
|
visitors_prebuild_agent_sites: {
|
|
255
256
|
site_ids: { value: (flags, positionals) => (positionals.length ? positionals : undefined) },
|
|
@@ -532,10 +533,13 @@ async function visitsTransact(ctx) {
|
|
|
532
533
|
if (!r.available) return "Agent Sites aren't available yet";
|
|
533
534
|
if (!r.published) return "Not published";
|
|
534
535
|
const lines = [`Staging: ${r.staging_url}`];
|
|
535
|
-
if (r.domain) {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
536
|
+
if (r.domain) lines.push(`Domain: ${r.domain.name} (${r.domain.status})`);
|
|
537
|
+
else if (r.dns_setup) lines.push(`DNS for ${r.dns_setup.name}:`);
|
|
538
|
+
const records = r.domain?.status === "pending" ? r.domain.records : (r.dns_setup?.records ?? []);
|
|
539
|
+
for (const rec of records) {
|
|
540
|
+
const advisory =
|
|
541
|
+
rec.type === "CAA" && !r.domain?.caa_required ? " (if certificate validation requires it)" : "";
|
|
542
|
+
lines.push(` ${rec.type} ${rec.name} ${rec.value}${advisory}`);
|
|
539
543
|
}
|
|
540
544
|
lines.push(
|
|
541
545
|
r.building
|