@debugkit/dashboard 0.6.0 → 0.7.0
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/client/assets/{_authed-Rg-Gabby.js → _authed-BN39b-7H.js} +1 -1
- package/dist/client/assets/{_authed-BMdIkvB6.js → _authed-CspAf0jN.js} +1 -1
- package/dist/client/assets/{charts-QIIL2Fv7.js → charts-XyOWJI9T.js} +1 -1
- package/dist/client/assets/index-Bfb2UOzB.js +10 -0
- package/dist/client/assets/{invite._token-CDogkC9p.js → invite._token-B4HN51-h.js} +1 -1
- package/dist/client/assets/{issues._fingerprint-DLe_lV5d.js → issues._fingerprint-BV1QrETY.js} +1 -1
- package/dist/client/assets/{login-BG9v4zhc.js → login-COlvJ5Je.js} +1 -1
- package/dist/client/assets/{settings-Ce1uqKl0.js → settings-Dl4EWeWC.js} +1 -1
- package/dist/client/assets/{team-TUMAZ4jv.js → team-7Zekz_Er.js} +1 -1
- package/dist/server/assets/{_authed-Dray_9Ct.js → _authed-C-sIPXSO.js} +1 -1
- package/dist/server/assets/{_authed-DDQ5yYfy.js → _authed-CrjuC0O3.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-BItoYCqL.js → _tanstack-start-manifest_v-CqaE4wze.js} +9 -9
- package/dist/server/assets/{invite._token-BWiwnST7.js → invite._token-xnpnkdRv.js} +1 -1
- package/dist/server/assets/{issues._fingerprint-D9vjIk3M.js → issues._fingerprint-e7ubdJf0.js} +1 -1
- package/dist/server/assets/{login-BXi46U4B.js → login-EopnOJXA.js} +1 -1
- package/dist/server/assets/{router-m6Hpq6Ep.js → router-G99085_Q.js} +47 -17
- package/dist/server/assets/{settings-ByFLIJce.js → settings-CaJN69N6.js} +1 -1
- package/dist/server/assets/{team-CifrrNkf.js → team-B1UcM1jA.js} +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +4 -4
- package/dist/client/assets/index-CMjwqklY.js +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as e,d as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{i as o}from"./ui-C0HGOza2.js";import{n as s}from"./index-
|
|
1
|
+
import{Z as e,d as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{i as o}from"./ui-C0HGOza2.js";import{n as s}from"./index-Bfb2UOzB.js";var c=n(e()),l=r(),u=`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`;function d(){let e=s.useLoaderData(),{token:n}=s.useParams(),r=i(),[d,f]=(0,c.useState)(e.valid?e.email??``:``),[p,m]=(0,c.useState)(``),[h,g]=(0,c.useState)(``),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(!1);if(!e.valid)return(0,l.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,l.jsxs)(`div`,{className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,l.jsx)(o,{}),(0,l.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`This invite link doesn't work`}),(0,l.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:`It may have been used already, cancelled, or expired (links last 7 days). Ask whoever sent it for a new one.`}),(0,l.jsx)(a,{to:`/login`,className:`mt-5 inline-block text-sm underline`,children:`Sign in instead`})]})});async function x(e){e.preventDefault(),b(!0),v(null);try{let e=await t({data:{token:n,email:d,name:p,password:h}});if(!e.ok)return v(e.error);await r.invalidate(),await r.navigate({to:`/`})}catch{v(`Could not reach the dashboard server.`)}finally{b(!1)}}return(0,l.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,l.jsxs)(`form`,{onSubmit:x,className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,l.jsx)(o,{}),(0,l.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`Join the team`}),(0,l.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[e.invitedBy,` invited you as `,(0,l.jsx)(`b`,{children:e.role}),`. Choose how you'll sign in.`]}),(0,l.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,l.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,readOnly:!!e.email,value:d,onChange:e=>f(e.target.value),className:u}),(0,l.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`name`,children:`Name (optional)`}),(0,l.jsx)(`input`,{id:`name`,autoComplete:`name`,value:p,onChange:e=>m(e.target.value),className:u}),(0,l.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password (10+ characters)`}),(0,l.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`new-password`,required:!0,minLength:10,value:h,onChange:e=>g(e.target.value),className:u}),_&&(0,l.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:_}),(0,l.jsx)(`button`,{disabled:y,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:y?`Joining…`:`Join and sign in`})]})})}export{d as component};
|
package/dist/client/assets/{issues._fingerprint-DLe_lV5d.js → issues._fingerprint-BV1QrETY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as e,b as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{n as o,r as s}from"./charts-
|
|
1
|
+
import{Z as e,b as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{n as o,r as s}from"./charts-XyOWJI9T.js";import{o as c,s as l,t as u}from"./index-Bfb2UOzB.js";import{a as d,c as f,n as p,o as m,r as h,s as g,t as _}from"./ui-C0HGOza2.js";var v=n(e()),y=r();function b(){let e=u.useLoaderData(),{issue:t,sample:n}=e,r=n?.event.type===`error`?n.event:null,i=r?.error.frames??[],v=u.useNavigate(),b=u.useSearch(),{range:S}=e;return(0,y.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,y.jsx)(a,{to:`/`,search:{app:e.app,range:b.range,from:b.from,to:b.to},className:`text-sm text-muted hover:text-ink`,children:`← Overview`}),(0,y.jsx)(c,{value:S,today:new Date().toISOString().slice(0,10),onChange:e=>v({search:t=>({...t,...e})})},`${S.preset}${S.from}${S.to}`)]}),(0,y.jsx)(l,{rangeFrom:S.from,retention:e.retention}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,y.jsx)(d,{severity:t.severity}),t.flow&&(0,y.jsx)(`span`,{className:`rounded bg-panel-2 px-1.5 py-0.5 font-mono`,children:t.flow}),(0,y.jsxs)(`span`,{children:[`First seen `,f(t.firstSeen),` · last seen `,f(t.lastSeen)]})]}),(0,y.jsx)(`h1`,{className:`mt-2 break-words text-xl font-semibold tracking-tight sm:text-2xl`,children:t.title}),t.culprit&&(0,y.jsx)(`p`,{className:`mt-1 font-mono text-sm text-muted`,children:t.culprit}),(0,y.jsx)(h,{issue:t})]}),(0,y.jsx)(x,{app:e.app,issue:t,canChange:e.canChangeStatus,links:e.links}),(0,y.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,y.jsx)(g,{label:`Occurrences (24h)`,value:t.count24h,tone:t.severity}),(0,y.jsx)(g,{label:`Occurrences (${S.label})`,value:t.countRange.toLocaleString(),hint:`${t.countTotal.toLocaleString()} since first seen`}),(0,y.jsx)(g,{label:`Users affected`,value:e.affectedUsers.toLocaleString(),hint:`since ${S.preset===`24h`?`yesterday`:S.from}`}),(0,y.jsx)(g,{label:`Top app version`,value:e.breakdowns.appVersion[0]?.key??`—`,hint:e.breakdowns.appVersion[0]?`${Math.round(e.breakdowns.appVersion[0].share*100)}% of occurrences`:void 0})]}),(0,y.jsx)(_,{title:`What to look at`,subtitle:`Generated from the error, its breadcrumbs and where it happens.`,children:(0,y.jsx)(`ol`,{className:`space-y-3`,children:e.hints.map((e,t)=>(0,y.jsxs)(`li`,{className:`flex gap-3`,children:[(0,y.jsx)(`span`,{className:`mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-accent-soft text-[11px] font-semibold text-accent`,children:t+1}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`text-sm font-medium`,children:e.title}),(0,y.jsx)(`div`,{className:`text-sm text-muted`,children:e.detail})]})]},t))})}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-3`,children:[(0,y.jsxs)(`div`,{className:`lg:col-span-2`,children:[S.preset!==`24h`&&(0,y.jsx)(`div`,{className:`mb-5`,children:(0,y.jsx)(_,{title:`Occurrences per day`,subtitle:`${S.label} (UTC)`,children:(0,y.jsx)(s,{data:e.daily.map(e=>({day:e.day,errors:e.count}))})})}),(0,y.jsxs)(_,{title:`Occurrences per hour`,subtitle:`Last 48 hours`,children:[(0,y.jsx)(o,{data:e.hourly}),(0,y.jsx)(p,{columns:[`Hour (UTC)`,`Count`],rows:e.hourly.map(e=>[e.hour,e.count])})]})]}),(0,y.jsx)(_,{title:`Where it happens`,subtitle:`Share of recent occurrences`,children:(0,y.jsx)(`div`,{className:`space-y-4`,children:[`os`,`appVersion`,`deviceModel`,`network`].map(t=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted`,children:{os:`OS`,appVersion:`App version`,deviceModel:`Device`,network:`Network`}[t]}),(0,y.jsx)(m,{rows:e.breakdowns[t].map(e=>({key:e.key,value:e.count}))})]},t))})})]}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,y.jsx)(_,{title:`Stack trace`,subtitle:`Most recent occurrence. In-app frames highlighted.`,children:i.length?(0,y.jsx)(`ol`,{className:`space-y-1 font-mono text-xs`,children:i.map((e,t)=>(0,y.jsxs)(`li`,{className:`rounded px-2 py-1 ${e.inApp?`bg-accent-soft text-ink`:`text-muted`}`,children:[(0,y.jsx)(`span`,{className:`font-semibold`,children:e.fn??`<anonymous>`}),` `,(0,y.jsxs)(`span`,{className:`break-all`,children:[e.file,`:`,e.line,`:`,e.col]})]},t))}):(0,y.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap text-xs text-muted`,children:r?.error.stack??`No stack trace captured.`})}),(0,y.jsx)(_,{title:`Breadcrumbs`,subtitle:`What the user did right before the error`,children:r?.breadcrumbs?.length?(0,y.jsxs)(`ol`,{className:`relative space-y-3 border-l border-line pl-4`,children:[r.breadcrumbs.map((e,t)=>(0,y.jsxs)(`li`,{className:`text-sm`,children:[(0,y.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full ${e.level===`error`?`bg-sev-critical`:`bg-line`}`}),(0,y.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted`,children:e.category}),(0,y.jsx)(`span`,{className:`break-words`,children:e.message})]},t)),(0,y.jsxs)(`li`,{className:`text-sm font-medium text-sev-critical`,children:[(0,y.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full bg-sev-critical`}),t.title]})]}):(0,y.jsxs)(`p`,{className:`text-sm text-muted`,children:[`No breadcrumbs. Call `,(0,y.jsx)(`code`,{children:`deBug.breadcrumb()`}),` on navigation and network calls to see the path to the error.`]})})]}),(0,y.jsx)(_,{title:`Recent occurrences`,children:(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[600px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`When`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`OS`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Version`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Device`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`User`})]})}),(0,y.jsx)(`tbody`,{children:e.recent.map((e,t)=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,y.jsx)(`td`,{className:`px-4 py-2 text-xs text-muted sm:px-2`,children:f(e.ts)}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.os}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.appVersion??`—`}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.device??`—`}),(0,y.jsx)(`td`,{className:`px-2 py-2 font-mono text-xs text-muted`,children:e.userId??`anonymous`})]},t))})]})})})]})}function x({app:e,issue:n,canChange:r,links:a}){let o=i(),[s,c]=(0,v.useState)(n.resolvedIn??n.lastVersion??``),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),p=async r=>{f(!0),u(null);let i=await t({data:{app:e,fingerprint:n.fingerprint,status:r,resolvedIn:r===`resolved`?s:void 0}}).catch(e=>({ok:!1,error:e.message}));if(f(!1),!i.ok)return u(i.error);await o.invalidate()},m=`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,h=n.status===`resolved`||n.status===`ignored`;return(0,y.jsxs)(`section`,{"aria-label":`Issue actions`,className:`flex flex-wrap items-center gap-2`,children:[r&&!h&&(0,y.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),p(`resolved`)},children:[(0,y.jsx)(`label`,{className:`text-sm text-muted`,htmlFor:`fixed-in`,children:`Fixed in`}),(0,y.jsx)(`input`,{id:`fixed-in`,value:s,onChange:e=>c(e.target.value),placeholder:`2.4.1`,className:`w-28 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`}),(0,y.jsx)(`button`,{type:`submit`,disabled:d,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Resolve`}),(0,y.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`ignored`),className:m,children:`Ignore`})]}),r&&h&&(0,y.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`open`),className:m,children:`Reopen`}),a.linear&&(0,y.jsx)(`a`,{href:a.linear,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create Linear issue`}),a.github&&(0,y.jsx)(`a`,{href:a.github,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create GitHub issue`}),r&&!h&&(0,y.jsxs)(`p`,{className:`w-full text-xs text-muted`,children:[`If it shows up again in `,s||`that version`,` or later, it's marked Regressed. Occurrences from older versions don't count: those users haven't updated yet.`]}),l&&(0,y.jsx)(`p`,{role:`alert`,className:`w-full text-sm text-sev-critical`,children:l})]})}export{b as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as e,et as t,f as n,j as r,k as i}from"./preload-helper-Dscj_TcA.js";import{i as a}from"./ui-C0HGOza2.js";import{c as o}from"./index-
|
|
1
|
+
import{Z as e,et as t,f as n,j as r,k as i}from"./preload-helper-Dscj_TcA.js";import{i as a}from"./ui-C0HGOza2.js";import{c as o}from"./index-Bfb2UOzB.js";var s=t(e()),c=r();function l(){let e=o.useLoaderData(),t=i(),[r,l]=(0,s.useState)(e.demo?.email??``),[u,d]=(0,s.useState)(e.demo?.password??``),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1);async function g(e){e.preventDefault(),h(!0),p(null);try{let e=await n({data:{email:r,password:u}});if(!e.ok)return p(e.error);await t.invalidate(),await t.navigate({to:`/`})}catch{p(`Could not reach the dashboard server.`)}finally{h(!1)}}return(0,c.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,c.jsxs)(`form`,{onSubmit:g,className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,c.jsx)(a,{}),(0,c.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`Sign in`}),(0,c.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`This dashboard runs on your infrastructure and reads from your`,` `,e.store===`demo`?`demo dataset`:e.store===`memory`?`in-memory store on this machine`:e.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),e.demo&&(0,c.jsxs)(`p`,{className:`mt-4 rounded-md bg-accent-soft px-3 py-2 text-xs text-ink`,children:[`Demo mode: sign in with `,(0,c.jsx)(`b`,{children:e.demo.email}),` / `,(0,c.jsx)(`b`,{children:e.demo.password}),`. Set `,(0,c.jsx)(`code`,{children:`DEBUG_DASHBOARD_USERS`}),` to require real accounts.`]}),(0,c.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,c.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:r,onChange:e=>l(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),(0,c.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password`}),(0,c.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:u,onChange:e=>d(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),f&&(0,c.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:f}),(0,c.jsx)(`button`,{disabled:m,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:m?`Signing in…`:`Sign in`})]})})}export{l as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,Z as t,_ as n,et as r,g as i,h as a,j as o,k as s,v as c}from"./preload-helper-Dscj_TcA.js";import{t as l}from"./ui-C0HGOza2.js";import{i as u}from"./index-
|
|
1
|
+
import{T as e,Z as t,_ as n,et as r,g as i,h as a,j as o,k as s,v as c}from"./preload-helper-Dscj_TcA.js";import{t as l}from"./ui-C0HGOza2.js";import{i as u}from"./index-Bfb2UOzB.js";var d=r(t()),f=o(),p=[30,60,90,180,365];function m(){let{apps:t,settings:r}=u.useLoaderData(),i=e({from:u.fullPath}),o=s(),[c,m]=(0,d.useState)(String(r?.retentionDays??60)),[g,_]=(0,d.useState)(null),[v,y]=(0,d.useState)(!1);if(!r)return(0,f.jsx)(`main`,{className:`mx-auto max-w-3xl px-4 py-16 text-center text-muted`,children:`No apps yet. Settings appear once an app sends its first event.`});let b=r.writer!==`none`,x=Number(c),S=Number.isInteger(x)&&x!==r.retentionDays,C=async()=>{y(!0),_(null);let e=await n({data:{app:r.app,retentionDays:x}}).catch(e=>({ok:!1,error:e.message}));if(y(!1),!e.ok)return _({tone:`error`,text:e.error});_({tone:`ok`,text:`Saved. New events are kept for ${x} days, starting within about a minute.`}),await o.invalidate()},w=async()=>{y(!0);let e,t=0;try{do{let n=await a({data:{app:r.app,cursor:e}});if(!n.ok)throw Error(n.error);t+=n.updated,e=n.cursor,_({tone:`info`,text:`Updating existing events… ${t.toLocaleString()} so far`})}while(e);_({tone:`ok`,text:`Done: ${t.toLocaleString()} existing events now expire ${r.retentionDays} days after they arrived.`})}catch(e){_({tone:`error`,text:`Stopped after ${t.toLocaleString()} events: ${e.message}`})}y(!1)};return(0,f.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,f.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Settings`}),(0,f.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:r.app})]}),t.length>1&&(0,f.jsx)(`select`,{"aria-label":`App`,value:r.app,onChange:e=>i({search:{app:e.target.value}}),className:`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,children:t.map(e=>(0,f.jsx)(`option`,{children:e},e))})]}),(0,f.jsxs)(l,{title:`Data retention`,subtitle:`Your data lives in your own database, so you decide how long to keep it.`,children:[(0,f.jsxs)(`dl`,{className:`grid gap-3 text-sm sm:grid-cols-2`,children:[(0,f.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,f.jsx)(`dt`,{className:`text-xs text-muted`,children:`Raw events (stack traces, breadcrumbs, context)`}),(0,f.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:r.retentionDays?`${r.retentionDays} days`:`Unknown`}),(0,f.jsx)(`dd`,{className:`text-xs text-muted`,children:r.source===`setting`?`Set here${r.updatedAt?` on ${new Date(r.updatedAt).toLocaleDateString(`en-GB`)}`:``}`:r.source==="default"?`The default chosen at setup`:`Not reported by this deployment`})]}),(0,f.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,f.jsx)(`dt`,{className:`text-xs text-muted`,children:`Counts, issues and release health`}),(0,f.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:`Forever`}),(0,f.jsx)(`dd`,{className:`text-xs text-muted`,children:`Charts and trends cover any date range`})]})]}),b?(0,f.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:e=>{e.preventDefault(),S&&C()},children:[(0,f.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`days`,children:`Keep raw events for`}),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[p.map(e=>(0,f.jsxs)(`button`,{type:`button`,onClick:()=>m(String(e)),className:`rounded-md border px-3 py-1.5 text-sm ${Number(c)===e?`border-accent bg-accent-soft text-accent`:`border-line hover:bg-panel-2`}`,children:[e,` days`]},e)),(0,f.jsx)(`input`,{id:`days`,type:`number`,min:1,max:3650,value:c,onChange:e=>m(e.target.value),className:`w-24 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,"aria-label":`Days`}),(0,f.jsx)(`button`,{type:`submit`,disabled:!S||v,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save`})]}),(0,f.jsx)(`p`,{className:`text-xs text-muted`,children:`Applies to events that arrive from now on. When you shorten it, older events are removed by your database's own clean-up: within about a day on Firestore, up to two days on DynamoDB.`})]}):(0,f.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:r.note}),r.note&&b&&(0,f.jsx)(`p`,{className:`mt-2 text-xs text-sev-high`,children:r.note})]}),b&&(0,f.jsxs)(l,{title:`Existing events`,subtitle:`Events already stored keep the expiry they arrived with.`,children:[(0,f.jsxs)(`p`,{className:`text-sm`,children:[`Give every stored event an expiry based on the current setting (`,r.retentionDays,` days after it arrived). This costs one database write per event.`]}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>void w(),disabled:v,className:`mt-3 rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,children:`Apply to existing events`})]}),b&&(0,f.jsx)(h,{settings:r,onStatus:_},r.app+(r.updatedAt??``)),g&&(0,f.jsx)(`p`,{role:`status`,className:`rounded-lg border px-3 py-2 text-sm ${g.tone===`error`?`border-sev-critical text-sev-critical`:g.tone===`ok`?`border-line bg-panel-2`:`border-line text-muted`}`,children:g.text})]})}function h({settings:e,onStatus:t}){let n=s(),[r,a]=(0,d.useState)(e.criticalFlows.join(`, `)),[o,u]=(0,d.useState)(e.alerts.slackWebhookUrl??``),[p,m]=(0,d.useState)(e.alerts.newIssues!==!1),[h,g]=(0,d.useState)(e.alerts.regressions!==!1),[_,v]=(0,d.useState)(e.alerts.onlyCriticalFlows===!0),[y,b]=(0,d.useState)(e.alerts.dashboardUrl??(typeof window<`u`?window.location.origin:``)),[x,S]=(0,d.useState)(!1),C=async()=>{S(!0),t(null);let a=await i({data:{app:e.app,criticalFlows:r.split(/[\s,]+/).filter(Boolean),alerts:{slackWebhookUrl:o,newIssues:p,regressions:h,onlyCriticalFlows:_,dashboardUrl:y}}}).catch(e=>({ok:!1,error:e.message}));if(S(!1),!a.ok)return t({tone:`error`,text:a.error});t({tone:`ok`,text:`Saved. Alerts and critical flows apply within about a minute.`}),await n.invalidate()},w=async()=>{S(!0);let n=await c({data:{app:e.app}}).catch(e=>({ok:!1,error:e.message}));S(!1),t(n.ok?{tone:`ok`,text:`Test message sent. Check your Slack channel.`}:{tone:`error`,text:n.error})},T=`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(l,{title:`Critical flows`,subtitle:`Issues in these flows rank one severity level higher, and can be the only ones that alert.`,children:[(0,f.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`flows`,children:`Flows, separated by commas`}),(0,f.jsx)(`input`,{id:`flows`,value:r,onChange:e=>a(e.target.value),placeholder:`checkout.payment, auth.login`,className:`mt-2 w-full ${T}`})]}),(0,f.jsx)(l,{title:`Slack alerts`,subtitle:`Your ingest function posts to Slack when an issue first appears or comes back after being resolved.`,children:(0,f.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`label`,{className:`block font-medium`,htmlFor:`hook`,children:`Incoming webhook URL`}),(0,f.jsx)(`input`,{id:`hook`,value:o,onChange:e=>u(e.target.value),placeholder:`https://hooks.slack.com/services/…`,className:`mt-2 w-full font-mono ${T}`}),(0,f.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Create one under your Slack app's Incoming Webhooks. Leave empty to turn alerts off.`})]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` New issues`]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),` Regressions`]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),` Only for critical flows`]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`label`,{className:`block font-medium`,htmlFor:`dash-url`,children:`Dashboard address, for links in alerts`}),(0,f.jsx)(`input`,{id:`dash-url`,value:y,onChange:e=>b(e.target.value),className:`mt-2 w-full ${T}`})]})]})}),(0,f.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,f.jsx)(`button`,{type:`button`,onClick:()=>void C(),disabled:x,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save flows and alerts`}),e.alerts.slackWebhookUrl&&e.writer===`admin`&&(0,f.jsx)(`button`,{type:`button`,onClick:()=>void w(),disabled:x,className:`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,children:`Send a test alert`})]})]})}export{m as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as e,et as t,j as n,k as r,m as i,n as a,u as o,y as s}from"./preload-helper-Dscj_TcA.js";import{c,t as l}from"./ui-C0HGOza2.js";import{r as u}from"./index-
|
|
1
|
+
import{Z as e,et as t,j as n,k as r,m as i,n as a,u as o,y as s}from"./preload-helper-Dscj_TcA.js";import{c,t as l}from"./ui-C0HGOza2.js";import{r as u}from"./index-Bfb2UOzB.js";var d=t(e()),f=n(),p={owner:`everything, including owners`,admin:`settings and the team, except owners`,member:`sees everything, changes issue status`};function m(){let e=u.useLoaderData(),t=r(),[n,m]=(0,d.useState)(`member`),[h,g]=(0,d.useState)(``),[_,v]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(!1),C=e.canManage&&e.canWrite,w=async(e,n)=>{S(!0),b(null);let r=await e().catch(e=>({ok:!1,error:e.message}));if(S(!1),!r.ok)return b({tone:`error`,text:r.error??`That didn't work.`});b({tone:`ok`,text:n}),await t.invalidate()};return(0,f.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h1`,{className:`text-xl font-semibold`,children:`Team`}),(0,f.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:`Everyone who can sign in to this dashboard. Invite people with a link; nothing is emailed.`})]}),C&&(0,f.jsxs)(l,{title:`Invite someone`,subtitle:`The link works once and expires in 7 days.`,children:[(0,f.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),S(!0),b(null),v(null);let r=await o({data:{role:n,email:h.trim()||void 0}}).catch(e=>({ok:!1,error:e.message}));if(S(!1),!r.ok)return b({tone:`error`,text:r.error});v({url:`${window.location.origin}/invite/${r.token}`,expiresAt:r.expiresAt,email:h.trim()||void 0}),g(``),await t.invalidate()},className:`flex flex-wrap items-end gap-3`,children:[(0,f.jsxs)(`label`,{className:`min-w-0 flex-1 text-sm`,children:[(0,f.jsx)(`span`,{className:`font-medium`,children:`Email (optional)`}),(0,f.jsx)(`input`,{type:`email`,value:h,onChange:e=>g(e.target.value),placeholder:`Only this person can use the link`,className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`})]}),(0,f.jsxs)(`label`,{className:`text-sm`,children:[(0,f.jsx)(`span`,{className:`font-medium`,children:`Role`}),(0,f.jsx)(`select`,{value:n,onChange:e=>m(e.target.value),className:`mt-1 block rounded-md border border-line bg-bg px-3 py-2 text-sm`,children:(e.me.role===`owner`?[`member`,`admin`,`owner`]:[`member`,`admin`]).map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))})]}),(0,f.jsx)(`button`,{disabled:x,className:`rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:`Create invite link`})]}),(0,f.jsxs)(`p`,{className:`mt-2 text-xs text-muted`,children:[n,`: `,p[n],`.`]}),_&&(0,f.jsxs)(`div`,{className:`mt-4 rounded-md border border-accent bg-accent-soft p-3 text-sm`,children:[(0,f.jsxs)(`p`,{className:`font-medium`,children:[`Send this link`,_.email?` to ${_.email}`:``,`. It's shown only now.`]}),(0,f.jsxs)(`div`,{className:`mt-2 flex min-w-0 gap-2`,children:[(0,f.jsx)(`input`,{readOnly:!0,value:_.url,"aria-label":`Invite link`,onFocus:e=>e.currentTarget.select(),className:`min-w-0 flex-1 rounded-md border border-line bg-bg px-2 py-1.5 font-mono text-xs`}),(0,f.jsx)(`button`,{type:`button`,className:`rounded-md border border-line bg-bg px-2.5 py-1 text-xs hover:bg-panel-2`,onClick:()=>navigator.clipboard?.writeText(_.url).then(()=>b({tone:`ok`,text:`Link copied.`})),children:`Copy`})]})]})]}),e.note&&(0,f.jsx)(`p`,{className:`text-sm text-muted`,children:e.note}),y&&(0,f.jsx)(`p`,{role:y.tone===`error`?`alert`:`status`,className:`text-sm ${y.tone===`error`?`text-sev-critical`:`text-ink`}`,children:y.text}),(0,f.jsx)(l,{title:`Members`,subtitle:`${e.members.length} ${e.members.length===1?`person`:`people`}`,children:(0,f.jsx)(`ul`,{className:`divide-y divide-line`,children:e.members.map(t=>{let n=t.email===e.me.email,r=C&&t.source===`team`&&!n&&(e.me.role===`owner`||t.role!==`owner`);return(0,f.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 py-3`,children:[(0,f.jsxs)(`div`,{className:`min-w-0`,children:[(0,f.jsxs)(`p`,{className:`truncate text-sm font-medium`,children:[t.name?`${t.name} · `:``,t.email,n?` (you)`:``]}),(0,f.jsx)(`p`,{className:`text-xs text-muted`,children:t.source===`env`?`Set up with npx debugkit init`:`Joined ${t.createdAt?c(t.createdAt):``}${t.invitedBy?`, invited by ${t.invitedBy}`:``}`})]}),(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r?(0,f.jsx)(`select`,{"aria-label":`Role for ${t.email}`,value:t.role,disabled:x,className:`rounded-md border border-line bg-bg px-2 py-1 text-sm`,onChange:e=>w(()=>s({data:{email:t.email,role:e.target.value}}),`${t.email} is now ${e.target.value}.`),children:(e.me.role===`owner`?[`member`,`admin`,`owner`]:[`member`,`admin`]).map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))}):(0,f.jsx)(`span`,{className:`rounded-full border border-line px-2 py-0.5 text-xs`,children:t.role}),r&&(0,f.jsx)(`button`,{disabled:x,className:`rounded-md border border-line px-2.5 py-1 text-xs text-sev-critical hover:bg-panel-2`,onClick:()=>confirm(`Remove ${t.email}? They're signed out right away.`)&&w(()=>i({data:{email:t.email}}),`${t.email} no longer has access.`),children:`Remove`})]})]},t.email)})})}),e.invites.length>0&&(0,f.jsx)(l,{title:`Pending invites`,children:(0,f.jsx)(`ul`,{className:`divide-y divide-line`,children:e.invites.map(t=>(0,f.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 py-3 text-sm`,children:[(0,f.jsxs)(`span`,{className:`min-w-0`,children:[(0,f.jsx)(`b`,{children:t.role}),` `,t.email?`for ${t.email}`:`for anyone with the link`,` · by `,t.invitedBy,` · expires `,new Date(t.expiresAt).toLocaleDateString()]}),C&&(e.me.role===`owner`||t.role!==`owner`)&&(0,f.jsx)(`button`,{disabled:x,className:`rounded-md border border-line px-2.5 py-1 text-xs hover:bg-panel-2`,onClick:()=>w(()=>a({data:{id:t.id}}),`Invite cancelled.`),children:`Cancel`})]},t.id))})})]})}export{m as component};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as TrendChart, t as FlowChart } from "./charts-DzTVqJ8z.js";
|
|
2
2
|
import { a as SeverityBadge, c as timeAgo, n as DataTable, o as ShareBars, r as IssueLabels, s as Stat, t as Card } from "./ui-BJokJdYa.js";
|
|
3
3
|
import { n as RetentionNote, t as RangePicker } from "./range-picker-0zbSGr3Z.js";
|
|
4
|
-
import { o as Route } from "./router-
|
|
4
|
+
import { o as Route } from "./router-G99085_Q.js";
|
|
5
5
|
import { useEffect } from "react";
|
|
6
6
|
import { Link, useNavigate, useRouter } from "@tanstack/react-router";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as Logo } from "./ui-BJokJdYa.js";
|
|
2
2
|
import { f as logout } from "./fns-DwGaMi8S.js";
|
|
3
|
-
import { c as Route } from "./router-
|
|
3
|
+
import { c as Route } from "./router-G99085_Q.js";
|
|
4
4
|
import { Link, Outlet, useRouter } from "@tanstack/react-router";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
// src/routes/_authed.tsx?tsr-split=component
|
|
@@ -10,11 +10,11 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
10
10
|
"/invite/$token",
|
|
11
11
|
"/api/issues/$fingerprint"
|
|
12
12
|
],
|
|
13
|
-
preloads: ["/assets/index-
|
|
13
|
+
preloads: ["/assets/index-Bfb2UOzB.js", "/assets/preload-helper-Dscj_TcA.js"],
|
|
14
14
|
scripts: [{ attrs: {
|
|
15
15
|
type: "module",
|
|
16
16
|
async: !0,
|
|
17
|
-
src: "/assets/index-
|
|
17
|
+
src: "/assets/index-Bfb2UOzB.js"
|
|
18
18
|
} }]
|
|
19
19
|
},
|
|
20
20
|
"/_authed": {
|
|
@@ -25,37 +25,37 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
25
25
|
"/_authed/",
|
|
26
26
|
"/_authed/issues/$fingerprint"
|
|
27
27
|
],
|
|
28
|
-
preloads: ["/assets/_authed-
|
|
28
|
+
preloads: ["/assets/_authed-BN39b-7H.js", "/assets/ui-C0HGOza2.js"]
|
|
29
29
|
},
|
|
30
30
|
"/login": {
|
|
31
31
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/login.tsx",
|
|
32
32
|
children: void 0,
|
|
33
|
-
preloads: ["/assets/login-
|
|
33
|
+
preloads: ["/assets/login-COlvJ5Je.js", "/assets/ui-C0HGOza2.js"]
|
|
34
34
|
},
|
|
35
35
|
"/_authed/settings": {
|
|
36
36
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/settings.tsx",
|
|
37
37
|
children: void 0,
|
|
38
|
-
preloads: ["/assets/settings-
|
|
38
|
+
preloads: ["/assets/settings-Dl4EWeWC.js"]
|
|
39
39
|
},
|
|
40
40
|
"/_authed/team": {
|
|
41
41
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/team.tsx",
|
|
42
42
|
children: void 0,
|
|
43
|
-
preloads: ["/assets/team-
|
|
43
|
+
preloads: ["/assets/team-7Zekz_Er.js"]
|
|
44
44
|
},
|
|
45
45
|
"/invite/$token": {
|
|
46
46
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/invite.$token.tsx",
|
|
47
47
|
children: void 0,
|
|
48
|
-
preloads: ["/assets/invite._token-
|
|
48
|
+
preloads: ["/assets/invite._token-B4HN51-h.js", "/assets/ui-C0HGOza2.js"]
|
|
49
49
|
},
|
|
50
50
|
"/_authed/": {
|
|
51
51
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/index.tsx",
|
|
52
52
|
children: void 0,
|
|
53
|
-
preloads: ["/assets/_authed-
|
|
53
|
+
preloads: ["/assets/_authed-CspAf0jN.js", "/assets/charts-XyOWJI9T.js"]
|
|
54
54
|
},
|
|
55
55
|
"/_authed/issues/$fingerprint": {
|
|
56
56
|
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/issues.$fingerprint.tsx",
|
|
57
57
|
children: void 0,
|
|
58
|
-
preloads: ["/assets/issues._fingerprint-
|
|
58
|
+
preloads: ["/assets/issues._fingerprint-BV1QrETY.js", "/assets/charts-XyOWJI9T.js"]
|
|
59
59
|
}
|
|
60
60
|
} });
|
|
61
61
|
export { tsrStartManifest };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as Logo } from "./ui-BJokJdYa.js";
|
|
2
2
|
import { u as joinTeam } from "./fns-DwGaMi8S.js";
|
|
3
|
-
import { r as Route } from "./router-
|
|
3
|
+
import { r as Route } from "./router-G99085_Q.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/server/assets/{issues._fingerprint-D9vjIk3M.js → issues._fingerprint-e7ubdJf0.js}
RENAMED
|
@@ -2,7 +2,7 @@ import { n as HourlyChart, r as TrendChart } from "./charts-DzTVqJ8z.js";
|
|
|
2
2
|
import { n as RetentionNote, t as RangePicker } from "./range-picker-0zbSGr3Z.js";
|
|
3
3
|
import { a as SeverityBadge, c as timeAgo, n as DataTable, o as ShareBars, r as IssueLabels, s as Stat, t as Card } from "./ui-BJokJdYa.js";
|
|
4
4
|
import { y as updateIssueStatus } from "./fns-DwGaMi8S.js";
|
|
5
|
-
import { n as Route } from "./router-
|
|
5
|
+
import { n as Route } from "./router-G99085_Q.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as Logo } from "./ui-BJokJdYa.js";
|
|
2
2
|
import { d as login } from "./fns-DwGaMi8S.js";
|
|
3
|
-
import { s as Route } from "./router-
|
|
3
|
+
import { s as Route } from "./router-G99085_Q.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -42,7 +42,7 @@ function RootDocument({ children }) {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
// src/routes/_authed.tsx
|
|
45
|
-
var $$splitComponentImporter$6 = () => import("./_authed-
|
|
45
|
+
var $$splitComponentImporter$6 = () => import("./_authed-CrjuC0O3.js");
|
|
46
46
|
var Route$9 = createFileRoute("/_authed")({
|
|
47
47
|
beforeLoad: async () => {
|
|
48
48
|
const user = await getSessionUser();
|
|
@@ -52,7 +52,7 @@ var Route$9 = createFileRoute("/_authed")({
|
|
|
52
52
|
component: lazyRouteComponent($$splitComponentImporter$6, "component")
|
|
53
53
|
});
|
|
54
54
|
// src/routes/login.tsx
|
|
55
|
-
var $$splitComponentImporter$5 = () => import("./login-
|
|
55
|
+
var $$splitComponentImporter$5 = () => import("./login-EopnOJXA.js");
|
|
56
56
|
var Route$8 = createFileRoute("/login")({
|
|
57
57
|
beforeLoad: async () => {
|
|
58
58
|
if (await getSessionUser()) throw redirect({ to: "/" });
|
|
@@ -61,7 +61,7 @@ var Route$8 = createFileRoute("/login")({
|
|
|
61
61
|
component: lazyRouteComponent($$splitComponentImporter$5, "component")
|
|
62
62
|
});
|
|
63
63
|
// src/routes/_authed/index.tsx
|
|
64
|
-
var $$splitComponentImporter$4 = () => import("./_authed-
|
|
64
|
+
var $$splitComponentImporter$4 = () => import("./_authed-C-sIPXSO.js");
|
|
65
65
|
var Route$7 = createFileRoute("/_authed/")({
|
|
66
66
|
validateSearch: (s) => ({
|
|
67
67
|
app: typeof s.app === "string" ? s.app : void 0,
|
|
@@ -79,7 +79,7 @@ var Route$7 = createFileRoute("/_authed/")({
|
|
|
79
79
|
component: lazyRouteComponent($$splitComponentImporter$4, "component")
|
|
80
80
|
});
|
|
81
81
|
// src/routes/_authed/settings.tsx
|
|
82
|
-
var $$splitComponentImporter$3 = () => import("./settings-
|
|
82
|
+
var $$splitComponentImporter$3 = () => import("./settings-CaJN69N6.js");
|
|
83
83
|
var Route$6 = createFileRoute("/_authed/settings")({
|
|
84
84
|
validateSearch: (s) => ({ app: typeof s.app === "string" ? s.app : void 0 }),
|
|
85
85
|
loaderDeps: ({ search }) => ({ app: search.app }),
|
|
@@ -87,7 +87,7 @@ var Route$6 = createFileRoute("/_authed/settings")({
|
|
|
87
87
|
component: lazyRouteComponent($$splitComponentImporter$3, "component")
|
|
88
88
|
});
|
|
89
89
|
// src/routes/_authed/team.tsx
|
|
90
|
-
var $$splitComponentImporter$2 = () => import("./team-
|
|
90
|
+
var $$splitComponentImporter$2 = () => import("./team-B1UcM1jA.js");
|
|
91
91
|
var Route$5 = createFileRoute("/_authed/team")({
|
|
92
92
|
loader: () => getTeam(),
|
|
93
93
|
component: lazyRouteComponent($$splitComponentImporter$2, "component")
|
|
@@ -145,13 +145,13 @@ var Route$3 = createFileRoute("/api/summary")({ server: { handlers: { GET: async
|
|
|
145
145
|
});
|
|
146
146
|
} } } });
|
|
147
147
|
// src/routes/invite.$token.tsx
|
|
148
|
-
var $$splitComponentImporter$1 = () => import("./invite._token-
|
|
148
|
+
var $$splitComponentImporter$1 = () => import("./invite._token-xnpnkdRv.js");
|
|
149
149
|
var Route$2 = createFileRoute("/invite/$token")({
|
|
150
150
|
loader: ({ params }) => getInvite({ data: { token: params.token } }),
|
|
151
151
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
152
152
|
});
|
|
153
153
|
// src/routes/_authed/issues.$fingerprint.tsx
|
|
154
|
-
var $$splitComponentImporter = () => import("./issues._fingerprint-
|
|
154
|
+
var $$splitComponentImporter = () => import("./issues._fingerprint-e7ubdJf0.js");
|
|
155
155
|
var Route$1 = createFileRoute("/_authed/issues/$fingerprint")({
|
|
156
156
|
validateSearch: (s) => ({
|
|
157
157
|
app: typeof s.app === "string" ? s.app : "",
|
|
@@ -259,23 +259,53 @@ var rootRouteChildren = {
|
|
|
259
259
|
ApiIssuesFingerprintRoute
|
|
260
260
|
};
|
|
261
261
|
var routeTree = Route$10._addFileChildren(rootRouteChildren)._addFileTypes();
|
|
262
|
+
// src/server/errors.ts
|
|
263
|
+
/** Firestore answers FAILED_PRECONDITION while an index deBug needs is missing or still building. */
|
|
264
|
+
function isIndexError(message) {
|
|
265
|
+
return /FAILED_PRECONDITION|requires an index|index is currently building/i.test(message);
|
|
266
|
+
}
|
|
262
267
|
// src/router.tsx
|
|
263
268
|
var router_exports = /* @__PURE__ */ __exportAll({ getRouter: () => getRouter });
|
|
269
|
+
function ErrorPage({ error }) {
|
|
270
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
271
|
+
if (isIndexError(message)) {
|
|
272
|
+
const building = /currently building/i.test(message);
|
|
273
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
274
|
+
className: "mx-auto max-w-xl p-8",
|
|
275
|
+
children: [
|
|
276
|
+
/* @__PURE__ */ jsx("h1", {
|
|
277
|
+
className: "text-lg font-semibold",
|
|
278
|
+
children: building ? "Firestore is still building deBug's indexes" : "Firestore is missing an index deBug needs"
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ jsx("p", {
|
|
281
|
+
className: "mt-2 text-sm text-muted",
|
|
282
|
+
children: building ? "This takes a few minutes after setup or an upgrade. Reload the page shortly." : "Usually this means deBug was upgraded but its indexes weren't. Run npx debugkit deploy-dashboard (or npx debugkit init) to add them; your other indexes are left alone."
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ jsx("button", {
|
|
285
|
+
className: "mt-4 rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2",
|
|
286
|
+
onClick: () => window.location.reload(),
|
|
287
|
+
children: "Reload"
|
|
288
|
+
})
|
|
289
|
+
]
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
293
|
+
className: "mx-auto max-w-xl p-8",
|
|
294
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
295
|
+
className: "text-lg font-semibold",
|
|
296
|
+
children: "Something went wrong"
|
|
297
|
+
}), /* @__PURE__ */ jsx("pre", {
|
|
298
|
+
className: "mt-3 overflow-auto rounded-md bg-panel-2 p-3 text-xs",
|
|
299
|
+
children: message
|
|
300
|
+
})]
|
|
301
|
+
});
|
|
302
|
+
}
|
|
264
303
|
function getRouter() {
|
|
265
304
|
return createRouter({
|
|
266
305
|
routeTree,
|
|
267
306
|
scrollRestoration: true,
|
|
268
307
|
defaultPreload: "intent",
|
|
269
|
-
defaultErrorComponent:
|
|
270
|
-
className: "mx-auto max-w-xl p-8",
|
|
271
|
-
children: [/* @__PURE__ */ jsx("h1", {
|
|
272
|
-
className: "text-lg font-semibold",
|
|
273
|
-
children: "Something went wrong"
|
|
274
|
-
}), /* @__PURE__ */ jsx("pre", {
|
|
275
|
-
className: "mt-3 overflow-auto rounded-md bg-panel-2 p-3 text-xs",
|
|
276
|
-
children: error instanceof Error ? error.message : String(error)
|
|
277
|
-
})]
|
|
278
|
-
}),
|
|
308
|
+
defaultErrorComponent: ErrorPage,
|
|
279
309
|
defaultNotFoundComponent: () => /* @__PURE__ */ jsx("div", {
|
|
280
310
|
className: "p-8 text-muted",
|
|
281
311
|
children: "Not found."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Card } from "./ui-BJokJdYa.js";
|
|
2
2
|
import { _ as sendTestAlert, g as saveRetention, h as saveAppSettings, m as restampExisting } from "./fns-DwGaMi8S.js";
|
|
3
|
-
import { a as Route } from "./router-
|
|
3
|
+
import { a as Route } from "./router-G99085_Q.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as timeAgo, t as Card } from "./ui-BJokJdYa.js";
|
|
2
2
|
import { l as inviteToTeam, p as removeFromTeam, t as cancelInvite, v as setMemberRole } from "./fns-DwGaMi8S.js";
|
|
3
|
-
import { i as Route } from "./router-
|
|
3
|
+
import { i as Route } from "./router-G99085_Q.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { useRouter } from "@tanstack/react-router";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/server/server.js
CHANGED
|
@@ -4485,7 +4485,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
|
|
|
4485
4485
|
* the dev styles URL for route-scoped CSS collection.
|
|
4486
4486
|
*/
|
|
4487
4487
|
async function getStartManifest(matchedRoutes) {
|
|
4488
|
-
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-
|
|
4488
|
+
const { tsrStartManifest } = await import("./assets/_tanstack-start-manifest_v-CqaE4wze.js");
|
|
4489
4489
|
const startManifest = tsrStartManifest();
|
|
4490
4490
|
let routes = startManifest.routes;
|
|
4491
4491
|
routes[rootRouteId];
|
|
@@ -7312,7 +7312,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
7312
7312
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
7313
7313
|
async function loadEntries() {
|
|
7314
7314
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
7315
|
-
import("./assets/router-
|
|
7315
|
+
import("./assets/router-G99085_Q.js").then((n) => n.t),
|
|
7316
7316
|
import("./assets/start-t09PGpZL.js"),
|
|
7317
7317
|
import("./assets/empty-plugin-adapters-BsRz-CQL.js")
|
|
7318
7318
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debugkit/dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The self-hosted deBug dashboard. Run it with npx debugkit dashboard, or npx @debugkit/dashboard with your own settings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"tailwindcss": "^4.3.5",
|
|
29
29
|
"vite": "^8.3.7",
|
|
30
30
|
"@tanstack/react-start": "^1.169.5",
|
|
31
|
-
"@debugkit/adapters": "0.
|
|
32
|
-
"@debugkit/
|
|
33
|
-
"@debugkit/
|
|
31
|
+
"@debugkit/adapters": "0.7.0",
|
|
32
|
+
"@debugkit/schema": "0.7.0",
|
|
33
|
+
"@debugkit/ingest": "0.7.0"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=20.12"
|