github Arindam200/cc-lens v0.2.4
v0.2.4 — Null guards on all API data pointers

latest releases: v0.4.0, v0.3.3, v0.2.8...
2 months ago

What changed

Complete null-guard pass over every API route. No data pointer can throw an unhandled exception anymore.

api/costs

  • d.tokensByModel ?? {}tokensByDate entries may lack this field on older cache files
  • ?? 0 on all usage.inputTokens, outputTokens, cacheCreationInputTokens, cacheReadInputTokens, savedUSD, hitRate

api/activity

  • Skip sessions where start_time is missing or produces an invalid date — previously wrote NaN into the day-of-week counts array

api/export

  • Replaced stats! non-null assertion with an explicit 404 return — exporting with no stats cache no longer crashes

Previous releases

  • v0.2.3 — guard missing modelUsage/dailyActivity/hourCounts in stats/activity routes + client-side !data.computed guard
  • v0.2.2 — all 22 ESLint errors fixed, 12 fetchers hardened, SortHeader moved out of render

Don't miss a new cc-lens release

NewReleases is sending notifications on new releases.