quotacap 0.0.11 → 0.0.12
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/dist/format/table.js
CHANGED
|
@@ -18,14 +18,14 @@ export function renderQuotasTable(quotas, advisories = []) {
|
|
|
18
18
|
const daysLeft = a?.daysLeft != null ? a.daysLeft.toFixed(1) : "—";
|
|
19
19
|
const ideal = a?.idealRate != null ? `${Math.round(a.idealRate)}%/day` : "—";
|
|
20
20
|
const burn = a?.burnMeasured ? `${a.burnRate.toFixed(1)}%/day` : "—";
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
const icon = a?.status === "at risk" ? "
|
|
21
|
+
// Colorful emoji (VS16) paint two cells wide while markdown counts one;
|
|
22
|
+
// keeping Status last means the +1 shift only nudges the right border.
|
|
23
|
+
const icon = a?.status === "at risk" ? "⚠️" : a != null ? "✅" : "—";
|
|
24
24
|
const waste = a?.wastePct != null ? `${Math.round(a.wastePct)}%` : "—";
|
|
25
|
-
return `| ${q.provider} | ${used}% | ${100 - used}% | ${resets} | ${daysLeft} | ${ideal} | ${burn} | ${
|
|
25
|
+
return `| ${q.provider} | ${used}% | ${100 - used}% | ${resets} | ${daysLeft} | ${ideal} | ${burn} | ${waste} | ${icon} |`;
|
|
26
26
|
});
|
|
27
27
|
return [
|
|
28
|
-
"| Provider | Used | Remaining | Resets | Days left | Ideal daily burn | Burn rate |
|
|
28
|
+
"| Provider | Used | Remaining | Resets | Days left | Ideal daily burn | Burn rate | Waste if unused | Status |",
|
|
29
29
|
"|---|---|---|---|---|---|---|---|---|",
|
|
30
30
|
...rows,
|
|
31
31
|
].join("\n");
|
package/dist/src/format/table.js
CHANGED
|
@@ -18,14 +18,14 @@ export function renderQuotasTable(quotas, advisories = []) {
|
|
|
18
18
|
const daysLeft = a?.daysLeft != null ? a.daysLeft.toFixed(1) : "—";
|
|
19
19
|
const ideal = a?.idealRate != null ? `${Math.round(a.idealRate)}%/day` : "—";
|
|
20
20
|
const burn = a?.burnMeasured ? `${a.burnRate.toFixed(1)}%/day` : "—";
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
const icon = a?.status === "at risk" ? "
|
|
21
|
+
// Colorful emoji (VS16) paint two cells wide while markdown counts one;
|
|
22
|
+
// keeping Status last means the +1 shift only nudges the right border.
|
|
23
|
+
const icon = a?.status === "at risk" ? "⚠️" : a != null ? "✅" : "—";
|
|
24
24
|
const waste = a?.wastePct != null ? `${Math.round(a.wastePct)}%` : "—";
|
|
25
|
-
return `| ${q.provider} | ${used}% | ${100 - used}% | ${resets} | ${daysLeft} | ${ideal} | ${burn} | ${
|
|
25
|
+
return `| ${q.provider} | ${used}% | ${100 - used}% | ${resets} | ${daysLeft} | ${ideal} | ${burn} | ${waste} | ${icon} |`;
|
|
26
26
|
});
|
|
27
27
|
return [
|
|
28
|
-
"| Provider | Used | Remaining | Resets | Days left | Ideal daily burn | Burn rate |
|
|
28
|
+
"| Provider | Used | Remaining | Resets | Days left | Ideal daily burn | Burn rate | Waste if unused | Status |",
|
|
29
29
|
"|---|---|---|---|---|---|---|---|---|",
|
|
30
30
|
...rows,
|
|
31
31
|
].join("\n");
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by scripts/build-embed.mjs — do not edit
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.12";
|
|
@@ -11,9 +11,9 @@ describe("format table", () => {
|
|
|
11
11
|
{ provider: "claude", wastePct: 52.9, daysLeft: 5.5, idealRate: 11.6, burnRate: 2, burnMeasured: false, status: "on track" },
|
|
12
12
|
];
|
|
13
13
|
const table = renderQuotasTable(quotas, advisories);
|
|
14
|
-
expect(table).toMatch(/\| Provider \| Used \| Remaining \| Resets \| Days left \| Ideal daily burn \| Burn rate \|
|
|
15
|
-
expect(table).toMatch(/\| kimi \| 16% \| 84% \|.*\| 3.0 \| 28%\/day \| 40.0%\/day \|
|
|
16
|
-
expect(table).toMatch(/\| claude \| 37% \| 63% \|.*\| 5.5 \| 12%\/day \| — \|
|
|
14
|
+
expect(table).toMatch(/\| Provider \| Used \| Remaining \| Resets \| Days left \| Ideal daily burn \| Burn rate \| Waste if unused \| Status \|/);
|
|
15
|
+
expect(table).toMatch(/\| kimi \| 16% \| 84% \|.*\| 3.0 \| 28%\/day \| 40.0%\/day \| 78% \| ⚠️ \|/);
|
|
16
|
+
expect(table).toMatch(/\| claude \| 37% \| 63% \|.*\| 5.5 \| 12%\/day \| — \| 53% \| ✅ \|/);
|
|
17
17
|
});
|
|
18
18
|
it("renders quota-only rows with placeholders when no advisories exist", () => {
|
|
19
19
|
const quotas = [{ provider: "kimi", usedPct: 16, resetsAt: "2026-09-01T09:02:00+10:00" }];
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by scripts/build-embed.mjs — do not edit
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.12";
|