@letterstory/cli 0.176.2 → 0.176.3
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 +1 -1
- package/lib/commands/org.mjs +19 -3
- package/package.json +1 -1
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.176.
|
|
83
|
+
export const VERSION = "0.176.3";
|
|
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;
|
package/lib/commands/org.mjs
CHANGED
|
@@ -243,12 +243,27 @@ export function billingAccountText(r) {
|
|
|
243
243
|
: "When they run out, new work needs a card (an admin adds one in Settings → Billing).",
|
|
244
244
|
]
|
|
245
245
|
: []),
|
|
246
|
-
//
|
|
247
|
-
|
|
246
|
+
// Paying by card starts a plan (addCard): every plan offered, as letter.dev/pricing shows them, Growth's
|
|
247
|
+
// "Most teams" and, with usage, "Cheapest for you" (Kaya, 2026-11-02), the same choice Settings →
|
|
248
|
+
// Billing shows; a person enters the card there.
|
|
249
|
+
...(r.addCard
|
|
248
250
|
? [
|
|
249
|
-
|
|
251
|
+
r.addCard.lockedBy
|
|
252
|
+
? `Paying by card starts ${r.addCard.planName}, at ${usd(r.addCard.monthlyUsd)} a month (a signup from ${r.addCard.lockedBy} is in progress): an admin pays in Settings → Billing.`
|
|
253
|
+
: `Pay by card: an admin picks a plan in Settings → Billing.${r.addCard.tokensPerMonth ? ` At your usage (about ${r.addCard.tokensPerMonth} tokens a month):` : ""}`,
|
|
254
|
+
...(r.addCard.lockedBy ? [] : (r.addCard.plans ?? [])).map(
|
|
255
|
+
(p) =>
|
|
256
|
+
` ${p.planName}${[p.badge, p.cheapestForYou ? "Cheapest for you" : null]
|
|
257
|
+
.filter(Boolean)
|
|
258
|
+
.map((b) => ` [${b}]`)
|
|
259
|
+
.join(
|
|
260
|
+
""
|
|
261
|
+
)}: ${usd(p.monthlyUsd)} a month, ${p.includedTokens} tokens, ${usd(p.usdPer1kTokens)} per 1,000, past the pool ${usd(p.overageUsdPer1kTokens)} per 1,000${p.expectedMonthlyUsd !== null ? `; about ${usd(p.expectedMonthlyUsd)} a month at your usage` : ""}${p.savesUsdPerMonth ? `, saves ${usd(p.savesUsdPerMonth)} a month` : ""}.${p.tagline ? ` ${p.tagline}` : ""}${p.extras?.length ? ` ${p.extras.join(", ")}.` : ""}`
|
|
262
|
+
),
|
|
250
263
|
]
|
|
251
264
|
: []),
|
|
265
|
+
// Free tokens carrying over, not landed yet: the account read's own sentence (Kaya, 2026-11-02).
|
|
266
|
+
...(r.carryOverArriving ? [`${r.carryOverArriving.words}.`] : []),
|
|
252
267
|
...(u
|
|
253
268
|
? [
|
|
254
269
|
`This period (${u.periodFrom.slice(0, 10)} to ${u.periodTo.slice(0, 10)}): ${u.usedTokens} of ${u.allowanceTokens} tokens included${u.overageUsd > 0 ? `, ${usd(u.overageUsd)} of overage so far${u.overageChargedUsd ? ` (${usd(u.overageChargedUsd)} of it already charged to the card)` : ""}` : ""}${u.runningTokens ? `; ${u.runningTokens} more held by running work${u.runningOverageUsd > 0 ? ` (${usd(u.runningOverageUsd)} against the cap)` : ""}` : ""}.`,
|
|
@@ -344,6 +359,7 @@ function billingUsageText(r) {
|
|
|
344
359
|
`Tokens: ${r.tokens.used} used of ${r.tokens.allowance} included${r.tokens.complimentary ? ` (+${r.tokens.complimentary} complimentary)` : ""}${r.tokens.arriving ? ` (${r.tokens.arriving} of them still being counted)` : ""}${r.tokens.running ? `, ${r.tokens.running} held by running work` : ""}.`
|
|
345
360
|
);
|
|
346
361
|
else lines.push("Not billed by usage: quantities only.");
|
|
362
|
+
if (r.carryOverArriving) lines.push(`${r.carryOverArriving.words}.`);
|
|
347
363
|
if (r.usd)
|
|
348
364
|
lines.push(
|
|
349
365
|
`Plan fee ${usd(r.usd.planFee)}; overage so far ${usd(r.usd.overage)}. What was charged and the next invoice: letterstory org billing invoices.`
|