@letterstory/cli 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -53,7 +53,7 @@ Pass `--no-wait` to return immediately and poll later with `deploy get`.
53
53
 
54
54
  ```bash
55
55
  letterstory domain check myblog.com # price it (no charge)
56
- letterstory domain buy <deployment-id> myblog.com --yes # buys + attaches (spends money)
56
+ letterstory domain buy <deployment-id> myblog.com # buys + attaches the domain
57
57
  ```
58
58
 
59
59
  ## Anything else
package/lib/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import { LetterstoryClient, CliError, resolveConfig } from "./client.mjs";
6
6
  import { cmdLogin, cmdLogout, cmdConfig, cmdTools, cmdCall, cmdDeploy, cmdDomain } from "./commands.mjs";
7
7
 
8
8
  // Keep in sync with cli/package.json.
9
- export const VERSION = "0.1.0";
9
+ export const VERSION = "0.1.1";
10
10
 
11
11
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
12
12
  // can't accidentally swallow the id as --json's value.
@@ -68,7 +68,7 @@ Phantom blogs:
68
68
 
69
69
  Custom domains:
70
70
  domain check <domain> Price a domain (read-only, no charge)
71
- domain buy <deployment-id> <domain> --yes Buy + attach a domain (spends money)
71
+ domain buy <deployment-id> <domain> Buy + attach a custom domain
72
72
 
73
73
  Anything else:
74
74
  tools List every tool this server exposes
package/lib/commands.mjs CHANGED
@@ -307,16 +307,14 @@ async function domainCheck(ctx) {
307
307
  return 0;
308
308
  }
309
309
 
310
+ // No confirm gate: the app's BuyDomainDialog charges on a single "Get this domain"
311
+ // click, and the CLI mirrors the app's user-facing flow. The spend is bounded on the
312
+ // server, not by a client prompt — `buy_domain` is server-priced and hard-capped
313
+ // (≤2 domains/org, <$30, blog must be live with no domain yet).
310
314
  async function domainBuy(ctx) {
311
315
  const { client, positionals, flags, io } = ctx;
312
316
  const id = requirePositional(positionals, 0, "deployment-id");
313
317
  const domain = requirePositional(positionals, 1, "domain");
314
- if (!flags.yes) {
315
- io.error(`Buying ${domain} SPENDS money (registered under Letterstory, auto-renewing yearly).`);
316
- io.error(`Price it first with: letterstory domain check ${domain}`);
317
- io.error(`Then confirm with: letterstory domain buy ${id} ${domain} --yes`);
318
- return 1;
319
- }
320
318
  const result = await client.callTool("buy_domain", { deployment_id: id, domain });
321
319
  io.log(`Purchase started for ${domain}. Attach + DNS run in the background.`);
322
320
  io.log(`Poll with: letterstory deploy get ${id}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",