tokentracker-cli 0.23.0 → 0.23.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/dashboard/dist/assets/{Card-BgXt23Ak.js → Card-WqeqJCTJ.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-DfXV-T4E.js +42 -0
- package/dashboard/dist/assets/{DevicePage-CWTFzGYj.js → DevicePage-CKQwUIFV.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-r11-zwBU.js → FadeIn-BvXHu5jo.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-ZDYMF__6.js → HeaderGithubStar-BYgV73_y.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-cCSBXnv2.js → IpCheckPage-BjuJDGa8.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DDUROVcN.js → LandingPage-Dymt6fsi.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-BWJX1oGI.js +5 -0
- package/dashboard/dist/assets/{LeaderboardProfilePage-BthYFghU.js → LeaderboardProfilePage-DmNl8aoL.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BQpint0k.js → LimitsPage-D_q9Z5nB.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-EUjSrjOv.js → LoginPage-BvwX7KJg.js} +1 -1
- package/dashboard/dist/assets/PopoverPopup-CrBQ_8vY.js +12 -0
- package/dashboard/dist/assets/{ProviderIcon-D7GhGvvD.js → ProviderIcon-Cb-YMfcK.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-u30V0Mqy.js +1 -0
- package/dashboard/dist/assets/SkillsPage-ssktZGFE.js +1 -0
- package/dashboard/dist/assets/{WidgetsPage-QfPgS0dO.js → WidgetsPage-_geExCIR.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-0iiBrhBo.js → WrappedPage-C5Wcs8L4.js} +1 -1
- package/dashboard/dist/assets/check-Cu-lm-wz.js +1 -0
- package/dashboard/dist/assets/{chevron-down-Br4ZSPLP.js → chevron-down-BbPjwLP4.js} +1 -1
- package/dashboard/dist/assets/{download-CnQNKpma.js → download-iIollDJi.js} +1 -1
- package/dashboard/dist/assets/info-DjS23Duh.js +1 -0
- package/dashboard/dist/assets/{leaderboard-columns-Bdgb7vS7.js → leaderboard-columns-DTnRH3EZ.js} +1 -1
- package/dashboard/dist/assets/main-Cb6vMAZa.js +688 -0
- package/dashboard/dist/assets/{use-limits-display-prefs-B5TQdyrf.js → use-limits-display-prefs-DZ9hgvef.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CSxKG_Na.js → use-native-settings-DS1TfSil.js} +1 -1
- package/dashboard/dist/assets/{use-reduced-motion-C9rLBEnX.js → use-reduced-motion-D82galUK.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Bmok4oKO.js → use-usage-limits-B-svr8YY.js} +1 -1
- package/dashboard/dist/assets/useCurrency-uA9QPua4.js +1 -0
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/cli.js +2 -1
- package/src/commands/serve.js +57 -2
- package/src/lib/local-api.js +48 -9
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/DashboardPage-NVAsY99I.js +0 -64
- package/dashboard/dist/assets/LeaderboardPage-BaETRtBF.js +0 -5
- package/dashboard/dist/assets/PopoverPopup-DyjmUoRY.js +0 -12
- package/dashboard/dist/assets/SettingsPage-9lfQ1c28.js +0 -1
- package/dashboard/dist/assets/SkillsPage-Bt7d1kd0.js +0 -1
- package/dashboard/dist/assets/check-CtXuxG1H.js +0 -1
- package/dashboard/dist/assets/main-D7f_DoMp.js +0 -676
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{T as p,r as c,C as e,an as f}from"./main-Cb6vMAZa.js";const b={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"0.23.2",VITE_INSFORGE_ANON_KEY:"ik_9f35735991b684f7cf57fa00bb4d0487",VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function x(){return f(),`${(b&&"https://srctyff5.us-east.insforge.app"||"https://srctyff5.us-east.insforge.app").replace(/\/$/,"")}/functions/tokentracker-device-flow-grant`}function l(a){return(a||"").toUpperCase().replace(/\s+/g,"").replace(/[^A-Z0-9-]/g,"")}function h(){const a=p(),[m,g]=c.useState(""),[t,r]=c.useState({kind:"idle",message:""});c.useEffect(()=>{try{const n=new URLSearchParams(window.location.search).get("user_code");n&&g(l(n))}catch{}},[]);async function u(d){if(d?.preventDefault?.(),!a?.signedIn){r({kind:"error",message:"Please sign in first."});return}const n=l(m);if(!/^[A-HJKMNP-Z2-9]{4}-[A-HJKMNP-Z2-9]{4}$/.test(n)){r({kind:"error",message:"Invalid code format. Expected XXXX-XXXX."});return}r({kind:"working",message:"Approving…"});try{const i=await a.getAccessToken?.();if(!i){r({kind:"error",message:"No access token — please sign in again."});return}const s=await fetch(x(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify({user_code:n})}),o=await s.json().catch(()=>({}));s.ok?r({kind:"success",message:o.status==="already_approved"?`Already approved earlier${o.client_info?" ("+o.client_info+")":""}.`:`Approved${o.client_info?" for "+o.client_info:""}. You can close this tab — your CLI will pick it up within a few seconds.`}):s.status===404?r({kind:"error",message:"Code not found. Double-check what your CLI printed."}):s.status===410?r({kind:"error",message:"Code expired. Re-run `tracker device-login` and try again."}):s.status===401?r({kind:"error",message:"Session expired. Sign out, sign in, and try again."}):r({kind:"error",message:o?.error||`Server error (HTTP ${s.status}).`})}catch(i){r({kind:"error",message:`Network error: ${i?.message||i}`})}}return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-oai-gray-950 px-6 py-12",children:e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-8",children:[e.jsx("h1",{className:"text-2xl font-semibold text-oai-gray-900 dark:text-white mb-2",children:"Approve your CLI"}),e.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400 mb-6",children:"Type the code your CLI showed you. We'll link it to your account so token usage from that machine flows into your leaderboard profile."}),a?.signedIn?null:e.jsx("div",{className:"rounded-md border border-amber-200 bg-amber-50 dark:bg-amber-900/20 dark:border-amber-800 p-4 mb-4",children:e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:"Sign in first, then return to this page."})}),e.jsxs("form",{onSubmit:u,className:"space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"block text-xs font-medium uppercase tracking-wide text-oai-gray-500 dark:text-oai-gray-400 mb-1",children:"CLI code"}),e.jsx("input",{type:"text",value:m,onChange:d=>g(l(d.target.value)),placeholder:"XXXX-XXXX",spellCheck:!1,autoCapitalize:"characters",maxLength:9,className:"w-full font-mono text-xl tracking-widest text-center rounded-md border border-oai-gray-300 dark:border-oai-gray-700 bg-white dark:bg-oai-gray-900 text-oai-gray-900 dark:text-white px-4 py-3 focus:outline-none focus:ring-inset focus:ring-2 focus:ring-emerald-600"})]}),e.jsx("button",{type:"submit",disabled:t.kind==="working"||!a?.signedIn,className:"w-full rounded-md bg-emerald-600 hover:bg-emerald-500 disabled:bg-oai-gray-300 disabled:cursor-not-allowed text-white font-medium py-3 transition-colors",children:t.kind==="working"?"Approving…":"Approve"})]}),t.kind==="success"&&e.jsx("div",{className:"mt-4 rounded-md border border-emerald-200 bg-emerald-50 dark:bg-emerald-900/20 dark:border-emerald-800 p-4",children:e.jsx("p",{className:"text-sm text-emerald-700 dark:text-emerald-300",children:t.message})}),t.kind==="error"&&e.jsx("div",{className:"mt-4 rounded-md border border-red-200 bg-red-50 dark:bg-red-900/20 dark:border-red-800 p-4",children:e.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:t.message})})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,
|
|
1
|
+
import{C as o,G as d}from"./main-Cb6vMAZa.js";import{u as r}from"./use-reduced-motion-D82galUK.js";function x({children:i,delay:t=0,duration:n=.35,y:e=12,className:s="",once:a=!0}){return r()?o.jsx("div",{className:s,children:i}):o.jsx(d.div,{initial:{opacity:0,y:e},animate:{opacity:1,y:0},transition:{duration:n,delay:t,ease:[.16,1,.3,1]},className:s,children:i})}function f({children:i,staggerDelay:t=.1,initialDelay:n=0,className:e=""}){return r()?o.jsx("div",{className:e,children:i}):o.jsx(d.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:t,delayChildren:n}}},className:e,children:i})}function h({children:i,className:t="",y:n=12}){return r()?o.jsx("div",{className:t,children:i}):o.jsx(d.div,{variants:{hidden:{opacity:0,y:n},visible:{opacity:1,y:0,transition:{duration:.35,ease:[.16,1,.3,1]}}},className:t,children:i})}export{x as F,f as S,h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,
|
|
1
|
+
import{r as s,aj as c,C as t}from"./main-Cb6vMAZa.js";function u({repo:r="mm7894215/TokenTracker"}){const[a,o]=s.useState(null);return s.useEffect(()=>{if(typeof window>"u")return;const n=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=typeof document<"u"&&(document.documentElement?.classList.contains("screenshot-capture")||document.body?.classList.contains("screenshot-capture"));c({prefersReducedMotion:n,screenshotCapture:i})&&fetch(`https://api.github.com/repos/${r}`).then(e=>e.json()).then(e=>{e&&typeof e.stargazers_count=="number"&&o(e.stargazers_count)}).catch(()=>{})},[r]),t.jsxs("a",{href:`https://github.com/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-2 px-3 py-1.5 rounded-md border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-800 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-700 transition-colors no-underline",children:[t.jsx("svg",{height:"16",viewBox:"0 0 16 16",width:"16",className:"shrink-0 fill-oai-gray-700 dark:fill-oai-gray-300",children:t.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),t.jsx("span",{className:"text-xs font-medium text-oai-gray-700 dark:text-oai-gray-300 whitespace-nowrap",children:"Star"}),a!==null&&t.jsx("span",{className:"text-xs font-semibold text-oai-gray-900 dark:text-oai-white tabular-nums whitespace-nowrap",children:a})]})}export{u as H};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,C as a}from"./main-
|
|
1
|
+
import{r as i,C as a}from"./main-Cb6vMAZa.js";function o(){const[s,d]=i.useState(!1);return a.jsxs("div",{className:"h-full relative dark:bg-[#050505]",children:[!s&&a.jsxs("div",{className:"absolute inset-0 p-6 space-y-5 animate-pulse",children:[a.jsx("div",{className:"flex gap-4 justify-center",children:Array.from({length:6}).map((e,r)=>a.jsx("div",{className:"h-4 w-20 rounded bg-oai-gray-200 dark:bg-oai-gray-800"},r))}),a.jsxs("div",{className:"space-y-2 pt-2",children:[a.jsx("div",{className:"h-7 w-72 rounded bg-oai-gray-200 dark:bg-oai-gray-800"}),a.jsx("div",{className:"h-4 w-96 rounded bg-oai-gray-200 dark:bg-oai-gray-800"})]}),a.jsx("div",{className:"grid grid-cols-3 gap-4",children:Array.from({length:3}).map((e,r)=>a.jsx("div",{className:"h-24 rounded-xl bg-oai-gray-200 dark:bg-oai-gray-800"},r))}),a.jsx("div",{className:"grid grid-cols-3 gap-4",children:Array.from({length:3}).map((e,r)=>a.jsx("div",{className:"h-40 rounded-xl bg-oai-gray-200 dark:bg-oai-gray-800"},r))}),a.jsx("div",{className:"grid grid-cols-3 gap-4",children:Array.from({length:3}).map((e,r)=>a.jsx("div",{className:"h-32 rounded-xl bg-oai-gray-200 dark:bg-oai-gray-800"},r))})]}),a.jsx("iframe",{src:"/proxy/ipcheck/claude/",title:"Cloud AI IP Check",className:`w-full h-full dark:invert dark:hue-rotate-180 transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,style:{border:"none"},onLoad:()=>d(!0)})]})}export{o as default};
|