@letterstory/cli 0.177.2 → 0.177.4

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
@@ -87,7 +87,7 @@ import {
87
87
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
88
88
 
89
89
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
90
- export const VERSION = "0.177.2";
90
+ export const VERSION = "0.177.4";
91
91
 
92
92
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
93
93
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -96,6 +96,8 @@ export const EXIT_PAYMENT_REQUIRED = 3;
96
96
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
97
97
  // `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
98
98
  export const BOOLEAN_FLAGS = new Set([
99
+ // collection onboard: connect without drafting or scheduling.
100
+ "connect-only",
99
101
  // admin demo ideas: every live recipe, not only the Ideas that fit.
100
102
  "library",
101
103
  // admin targets check: check every target again, checked or not.
@@ -227,6 +229,8 @@ export const BOOLEAN_FLAGS = new Set([
227
229
  "verbose",
228
230
  "no-color",
229
231
  "dry-run",
232
+ // domains buy --no-spend: only when it buys nothing.
233
+ "no-spend",
230
234
  // admin demo list --enrollable, show --moves, set --enroll|--unenroll
231
235
  "enrollable",
232
236
  "moves",
@@ -67,6 +67,17 @@ const ARGS = {
67
67
  recipe: "recipe",
68
68
  // Preserve the account-specific task selected by the Plan.
69
69
  fit_run: "fit-run",
70
+ // --accepted-quote '<json>': the price the Ideas row showed, echoed to accept what it buys.
71
+ accepted_quote: {
72
+ value: (flags) => {
73
+ if (typeof flags["accepted-quote"] !== "string") return undefined;
74
+ try {
75
+ return JSON.parse(flags["accepted-quote"]);
76
+ } catch {
77
+ throw new CliError("--accepted-quote takes JSON.");
78
+ }
79
+ },
80
+ },
70
81
  // --new-site: a website or app of its own, built and hosted on its own domain (deploy create's path).
71
82
  new_site: { flag: "new-site", type: "bool" },
72
83
  // --new-site --look-like linear.app,supabase.com: other companies' sites to model its look after.
@@ -239,6 +250,7 @@ async function buildStart(ctx) {
239
250
  "subject",
240
251
  "recipe",
241
252
  "fit-run",
253
+ "accepted-quote",
242
254
  "action",
243
255
  "notify-slack",
244
256
  "harness",
@@ -45,6 +45,19 @@ export const ARGS = {
45
45
  register_domain: {
46
46
  domain: { value: (flags, positionals) => stripScheme(requirePositional(positionals, 0, "domain")) },
47
47
  dry_run: { flag: "dry-run", type: "bool" },
48
+ // --no-spend: only when it buys nothing (held already, or a phantom's); refused rather than bought.
49
+ no_spend: { flag: "no-spend", type: "bool" },
50
+ // --accepted-quote '<json>': the `quote` a dry run returned, echoed to buy at that price.
51
+ accepted_quote: {
52
+ value: (flags) => {
53
+ if (typeof flags["accepted-quote"] !== "string") return undefined;
54
+ try {
55
+ return JSON.parse(flags["accepted-quote"]);
56
+ } catch {
57
+ throw new CliError("--accepted-quote takes JSON.");
58
+ }
59
+ },
60
+ },
48
61
  },
49
62
  // `domains plan <domain>` — the scan row's search and its monthly searches, when you have them.
50
63
  plan_domain_site: {
@@ -92,6 +92,7 @@ export const ARGS = {
92
92
  // Start what the blog writes once it is read in (the starter automations, every draft for
93
93
  // review), the one accept apply_starter_automations makes. Not with --enable-planner.
94
94
  start_writing: { flag: "start-writing", type: "bool" },
95
+ connect_only: { flag: "connect-only", type: "bool" },
95
96
  },
96
97
  get_collection_onboard_status: {
97
98
  job_id: { internal: "the job id onboard_collection just returned" },
@@ -414,6 +415,13 @@ function overridesFromFlags(flags) {
414
415
  // Final readback of a collection-onboarding job — the counts the engine PERSISTED.
415
416
  function formatCollectionStatus(s) {
416
417
  const r = s.result ?? {};
418
+ if (s.connect_only)
419
+ return [
420
+ `Connection ${s.status}`,
421
+ ` collection: ${s.collection_id}`,
422
+ ...(r.publishing ? [` publishing: ${r.publishing.destination}`] : []),
423
+ ...(s.error ? [` error: ${s.error}`] : []),
424
+ ].join("\n");
417
425
  const lines = [
418
426
  `Onboarding ${s.status} at stage "${s.stage}"`,
419
427
  ` collection: ${s.collection_id}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.2",
3
+ "version": "0.177.4",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",