@letterstory/cli 0.175.25 → 0.175.26

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
@@ -80,7 +80,7 @@ import {
80
80
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
81
81
 
82
82
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
83
- export const VERSION = "0.175.25";
83
+ export const VERSION = "0.175.26";
84
84
 
85
85
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
86
86
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1124,8 +1124,6 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
1124
1124
  admin billing free grant <org-id> <tokens> --why "…" [--key k] | grants [--org <org-id>] | revoke <org-id> <ref> --why "…"
1125
1125
  Give an org free tokens (a Lago org: a one-off wallet),
1126
1126
  list staff grants, take one back; posted to #billing
1127
- admin billing visitors opt-out --why "…" [--apply] Turn off identification switched on automatically on
1128
- billing-gated orgs (owners opt back in); a dry run first
1129
1127
  admin billing desk [--json] The Billing desk: switches, failed payments, the
1130
1128
  nightly reconcile, refusals, signups, grants
1131
1129
  admin billing free preflight [--json] Who the paywall stops the moment it is enforced:
@@ -5845,38 +5845,6 @@ async function cmdAdminBillingLegacyUnmark(ctx) {
5845
5845
  return 0;
5846
5846
  }
5847
5847
 
5848
- const VISITORS_USAGE = `Usage: admin billing visitors opt-out --why "…" [--apply] turn off identification switched on automatically on billing-gated orgs (owners opt back in); a dry run unless --apply`;
5849
-
5850
- /**
5851
- * admin billing visitors opt-out — identification is billed per person, so sites switched on
5852
- * automatically on an org on free tokens or billed on Lago are turned off once, as staff with who and
5853
- * why; legacy, internal, unassigned and demo orgs and every owner-set site are left alone. A dry run
5854
- * lists them unless --apply (lib/visitors/identification-opt-out.ts).
5855
- */
5856
- async function cmdAdminBillingVisitors(ctx) {
5857
- const { flags, positionals, io } = ctx;
5858
- if (positionals[1] !== "opt-out") throw new CliError(VISITORS_USAGE);
5859
- const why = flagStr(flags.why);
5860
- if (!why) throw new CliError(`Say why (--why "…").\n${VISITORS_USAGE}`);
5861
- const r = await staffPost(ctx, "/api/superadmin/billing/visitors/opt-out", { dry: !flagBool(flags.apply), why });
5862
- printResult(io, flags, r, (x) => {
5863
- const row = (s) => ` ${s.domain ?? s.siteId} ${s.orgName ?? s.orgId.slice(0, 8)} (${s.standing})`;
5864
- const lines = [
5865
- `${x.dry ? "Would turn off" : "Turned off"} ${x.changed.length} site(s):`,
5866
- ...x.changed.map(row),
5867
- ];
5868
- if (x.failed.length) lines.push(`Failed ${x.failed.length}:`, ...x.failed.map((f) => `${row(f)} ${f.error}`));
5869
- if (x.kept.length)
5870
- lines.push(
5871
- `Left on ${x.kept.length} (auto, not billing-gated or a demo):`,
5872
- ...x.kept.map((k) => `${row(k)} ${k.why}`)
5873
- );
5874
- if (x.dry) lines.push("Nothing written. Run again with --apply.");
5875
- return lines.join("\n");
5876
- });
5877
- return 0;
5878
- }
5879
-
5880
5848
  const FREE_USAGE = `Usage: admin billing free exposure [--json] who the free paywall covers, and who is unassigned
5881
5849
  admin billing free backfill --why "…" [--apply] signup grant for self-serve orgs with none; a dry run unless --apply
5882
5850
  admin billing free repair-subjects --why "…" [--apply] staff-address signup subjects fixed, refused orgs granted (R1); a dry run unless --apply
@@ -6154,7 +6122,6 @@ async function cmdAdminBilling(ctx) {
6154
6122
  if (positionals[0] === "free") return cmdAdminBillingFree(ctx);
6155
6123
  if (positionals[0] === "desk") return cmdAdminBillingDesk(ctx);
6156
6124
  if (positionals[0] === "emails") return cmdAdminBillingEmails(ctx);
6157
- if (positionals[0] === "visitors") return cmdAdminBillingVisitors(ctx);
6158
6125
  if (positionals[0] !== "lago") throw new CliError(LAGO_USAGE);
6159
6126
  const sub = positionals[1];
6160
6127
  switch (sub) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.175.25",
3
+ "version": "0.175.26",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",