@evident-ai/cli 3.1.1-dev.5ca1c14 → 3.1.1-dev.5d5a3d3

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/index.js CHANGED
@@ -582,6 +582,10 @@ var ClaudeUsageError = class extends Error {
582
582
  function isLocalCredentialProblem(err) {
583
583
  return err instanceof ClaudeUsageError && (err.reason === "no_credentials" || err.reason === "credentials_expired");
584
584
  }
585
+ function normalizeResetsAt(value) {
586
+ const ms = Date.parse(value);
587
+ return Number.isNaN(ms) ? null : new Date(ms).toISOString();
588
+ }
585
589
  function toWindow(value) {
586
590
  if (!value || typeof value !== "object") {
587
591
  return null;
@@ -590,7 +594,11 @@ function toWindow(value) {
590
594
  if (typeof window.utilization !== "number" || typeof window.resets_at !== "string") {
591
595
  return null;
592
596
  }
593
- return { utilization: window.utilization, resetsAt: window.resets_at };
597
+ const resetsAt = normalizeResetsAt(window.resets_at);
598
+ if (resetsAt === null) {
599
+ return null;
600
+ }
601
+ return { utilization: window.utilization, resetsAt };
594
602
  }
595
603
  async function getClaudeUsage() {
596
604
  const credentials2 = readClaudeCliCredentials();