limitcast 0.11.1 → 0.11.2
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/package.json +1 -1
- package/src/polar.mjs +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limitcast",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Stretch your Claude Code plan: measure what every session loads before you type, cut what you never use, and stop runaway subagents before they burn your window.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/polar.mjs
CHANGED
|
@@ -36,7 +36,11 @@ function savePolar(l) {
|
|
|
36
36
|
* @returns {{ok:true, claims:{e:string, p:string, i:number, x:number}} | {ok:false, reason:string}}
|
|
37
37
|
*/
|
|
38
38
|
export function polarStatus(l, now) {
|
|
39
|
-
if (l.status !== 'granted')
|
|
39
|
+
if (l.status !== 'granted')
|
|
40
|
+
return {
|
|
41
|
+
ok: false,
|
|
42
|
+
reason: `this key is no longer active at Polar (${l.status}): the subscription ended or the key was revoked. Resubscribe at https://limitcast.dev/#pricing`,
|
|
43
|
+
};
|
|
40
44
|
const exp = l.expiresAt ? Date.parse(l.expiresAt) : 0;
|
|
41
45
|
if (exp && exp < now) return { ok: false, reason: `expired ${new Date(exp).toISOString().slice(0, 10)}` };
|
|
42
46
|
if (now - l.checkedAt > GRACE_MS)
|