@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 608 B
JavaScript
import{addDays as e,getDateKey as t,parseDateKey as n}from"./date-helpers.mjs";const r=`totalTokens`,i=[`requests`,`totalTokens`,`cost`],a=e=>i.includes(e),o=i=>{let o=n(t(new Date)),s=e(o,-13),c=i.endDate?n(i.endDate):o,l=i.startDate?n(i.startDate):s;if(!l||!c||l.getTime()>c.getTime())return null;let u=(i.metric??r).split(`,`).map(e=>e.trim()).filter(a),d=u.length>0?Array.from(new Set(u)):[r];return{dimension:i.dimension??`day`,metrics:d,start:l,end:c,endExclusive:e(c,1),featureKey:i[`filter[featureKey]`]?.trim()||void 0}};export{o as default};
//# sourceMappingURL=normalize-usage-chart-query.mjs.map