@letterstory/cli 0.176.75 → 0.176.76

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
@@ -85,7 +85,7 @@ import {
85
85
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
86
86
 
87
87
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
88
- export const VERSION = "0.176.75";
88
+ export const VERSION = "0.176.76";
89
89
 
90
90
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
91
91
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1858,8 +1858,9 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letter GitHub App op
1858
1858
  One PR adding the Visitors script tag and server snippet to the repo that
1859
1859
  builds the site (--repo: another repo)
1860
1860
  repo sites [--detect [--force]] Which website each repo builds, and the evidence
1861
- repo set-site --repo <owner/name> [--gitlab] --site <host> [--not] [--branch <name>|none]
1862
- Say which site a repo builds (--not: correct a wrong label)
1861
+ repo set-site --repo <owner/name> [--gitlab] --site <host> [--not] [--branch <name>|none] [--sections blog,docs|none]
1862
+ Say which site a repo builds (--not: correct a wrong label;
1863
+ --sections: the parts of it, when only those)
1863
1864
  repo reset-site --repo <owner/name> [--gitlab] --site <host>
1864
1865
  Back to automatic detection
1865
1866
  repo secrets --repo <owner/name> [--gitlab] Preview secrets: names and when set (never values)
@@ -131,6 +131,18 @@ const ARGS = {
131
131
  builds: { flag: "not", type: "bool", invert: true },
132
132
  // --branch <name>: the branch that deploys the site (one repo, a site per branch); none = default.
133
133
  branch: { value: (flags) => (flags.branch === "none" ? null : flagStr(flags.branch)) },
134
+ // --sections blog,docs: the parts of the site the repo builds, when only those; none = the whole site.
135
+ sections: {
136
+ value: (flags) =>
137
+ flags.sections === undefined
138
+ ? undefined
139
+ : flags.sections === "none"
140
+ ? null
141
+ : String(flags.sections)
142
+ .split(",")
143
+ .map((s) => s.trim())
144
+ .filter(Boolean),
145
+ },
134
146
  },
135
147
  reset_repo_site: {
136
148
  provider,
@@ -594,7 +606,7 @@ async function repoSites(ctx) {
594
606
  const serving = r.sites.filter((s) => s.verdict === "serves");
595
607
  const lines = serving.map((s) =>
596
608
  s.decidedBy === "member"
597
- ? `${s.repo} builds ${s.siteHost} (set by a member)`
609
+ ? `${s.repo} builds ${s.siteHost}${s.sections?.length ? ` ${s.sections.map((x) => `/${x}`).join(", ")} only` : ""} (set by a member)`
598
610
  : `${s.repo} builds ${s.siteHost} (${Math.round(s.score * 100)}%: ${s.evidence.signals.join(", ")})`
599
611
  );
600
612
  if (r.failed?.length) lines.push(...r.failed.map((f) => `! ${f.repo}: ${f.error}`));
@@ -603,10 +615,10 @@ async function repoSites(ctx) {
603
615
  return 0;
604
616
  }
605
617
 
606
- /** `repo set-site --repo owner/name --site acme.com [--not]`: say which site a repo builds (or doesn't). */
618
+ /** `repo set-site --repo owner/name --site acme.com [--not] [--branch b] [--sections blog,docs|none]`: say which site a repo builds (or doesn't), and which part of it. */
607
619
  async function repoSetSite(ctx) {
608
620
  const { client, flags, io } = ctx;
609
- refuseUnknownFlags(ctx, {}, ["repo", "owner", "name", "gitlab", "site", "not", "branch"]);
621
+ refuseUnknownFlags(ctx, {}, ["repo", "owner", "name", "gitlab", "site", "not", "branch", "sections"]);
610
622
  const result = await client.callTool("set_repo_site", argsFromFlags(ARGS.set_repo_site, flags));
611
623
  ok(ctx, result.message);
612
624
  printResult(io, flags, result.site);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.75",
3
+ "version": "0.176.76",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",