@letterstory/cli 0.177.194 → 0.177.196

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 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.194";
96
+ export const VERSION = "0.177.196";
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;
@@ -114,12 +114,13 @@ export const ARGS = {
114
114
  get_usage_payments: { host: { flag: "host" } },
115
115
  refresh_usage_payments: { host: { flag: "host" } },
116
116
  discover_usage_payment_scope: { host: { flag: "host" }, connection_version: { flag: "connection-version" } },
117
- list_usage_payment_catalog: { after: { flag: "after" } },
117
+ list_usage_payment_catalog: { after: { flag: "after" }, host: { flag: "host" } },
118
118
  get_usage_payment_evidence: {
119
119
  host: { flag: "host" },
120
120
  run_id: { flag: "run" },
121
121
  after: { flag: "after" },
122
122
  limit: { flag: "limit", type: "num" },
123
+ decision: { flag: "decision" },
123
124
  },
124
125
  review_usage_payments: { host: { flag: "host" } },
125
126
  set_usage_payment_scope: paymentScopeArgs,
@@ -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
- lines.push(`Domain: ${r.domain.name} (${r.domain.status})`);
537
- if (r.domain.status === "pending")
538
- for (const rec of r.domain.records) lines.push(` ${rec.type} ${rec.name} ${rec.value}`);
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.194",
3
+ "version": "0.177.196",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",