@apisurf/wireui 0.1.3 → 0.1.4
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/nitro.json +1 -1
- package/dist/public/assets/{environments-299O-03t.js → environments-CpzEnLw2.js} +1 -1
- package/dist/public/assets/globals-D_ltS-iC.css +1 -0
- package/dist/public/assets/{history-EqPRzguE.js → history-BIXZHMWn.js} +1 -1
- package/dist/public/assets/{index-D3MuiLlr.js → index-3VfD7Ktf.js} +2 -2
- package/dist/public/assets/{query-DE41dcUO.js → query-DpztusaI.js} +1 -1
- package/dist/public/assets/{requests._requestId-DSbe2mSh.js → requests._requestId-Byq4gM_2.js} +1 -1
- package/dist/public/assets/{routes-CRl6TZP9.js → routes-C9SXJh8z.js} +1 -1
- package/dist/public/assets/{runs._runId-BGRrB0cL.js → runs._runId-CMFvexqY.js} +1 -1
- package/dist/public/assets/{scoped-DoOxDjHI.js → scoped-CiNsRvyC.js} +1 -1
- package/dist/public/assets/{session-header-wONyPgx_.js → session-header-DMR_hFkk.js} +1 -1
- package/dist/public/assets/{sessions-CqjoUG4A.js → sessions-C-F6Wmmg.js} +1 -1
- package/dist/server/_ssr/{history-CbfbTHg9.mjs → history-57VNXvbE.mjs} +2 -2
- package/dist/server/_ssr/{query-DBNlR5hk.mjs → query-D6nNoSN3.mjs} +2 -2
- package/dist/server/_ssr/{requests._requestId-DX2svRx4.mjs → requests._requestId-bXoTBGVj.mjs} +2 -2
- package/dist/server/_ssr/{router-BpH2DFcQ.mjs → router-ClsXvW-b.mjs} +8 -8
- package/dist/server/_ssr/{routes-DGIQrvhg.mjs → routes-CrmwJhiA.mjs} +2 -2
- package/dist/server/_ssr/{runs._runId-DZ-DQirQ.mjs → runs._runId-DM5Y8e6b.mjs} +3 -3
- package/dist/server/_ssr/{session-header-CH-Pbd1E.mjs → session-header-BYy6LaSU.mjs} +2 -2
- package/dist/server/_ssr/{sessions-D3LBcKOI.mjs → sessions-wsD0b1zm.mjs} +3 -3
- package/dist/server/_ssr/ssr.mjs +2 -2
- package/dist/server/{_tanstack-start-manifest_v-B2rWFyf7.mjs → _tanstack-start-manifest_v-Ag2qLfrP.mjs} +14 -14
- package/dist/server/index.mjs +65 -65
- package/package.json +7 -5
- package/dist/public/assets/globals-k1eOASJT.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{C as t,Dt as n,Nt as r,O as i,Ot as a,R as o,S as s,T as c,U as l,V as u,Vt as d,_ as f,_n as p,_t as m,lt as h,n as g,p as _,r as v,v as y}from"./tabs-C1EijW_Z.js";import{l as b}from"./preload-helper-CIs162tl.js";import{i as x}from"./index-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{C as t,Dt as n,Nt as r,O as i,Ot as a,R as o,S as s,T as c,U as l,V as u,Vt as d,_ as f,_n as p,_t as m,lt as h,n as g,p as _,r as v,v as y}from"./tabs-C1EijW_Z.js";import{l as b}from"./preload-helper-CIs162tl.js";import{i as x}from"./index-3VfD7Ktf.js";import{t as S}from"./split-Ddiw3mOT.js";var C=e(p()),w=d(),T=[{label:`Slowest requests`,sql:`SELECT id, method, host, path, status, duration_ms
|
|
2
2
|
FROM v_requests
|
|
3
3
|
ORDER BY duration_ms DESC
|
|
4
4
|
LIMIT 20`},{label:`Errors by host`,sql:`SELECT host, status, COUNT(*) AS n
|
package/dist/public/assets/{requests._requestId-DSbe2mSh.js → requests._requestId-Byq4gM_2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{A as t,C as n,D as r,Dt as i,E as a,F as o,J as s,L as c,Mt as l,Nt as u,O as d,Ot as f,P as p,R as m,S as h,T as g,Tt as _,U as v,Vt as y,W as b,Y as ee,Z as x,_n as S,b as C,bt as te,f as w,k as T,l as E,m as D,n as O,nt as k,ot as A,p as j,r as ne,rt as re,s as M,st as N,tt as P,ut as F,v as I,w as L,xt as R}from"./tabs-C1EijW_Z.js";import{d as z,n as B,u as V}from"./index-D3MuiLlr.js";import{t as H}from"./split-Ddiw3mOT.js";import{i as U,n as W,r as G,t as K}from"./kv-table-Dv6o68aD.js";var q=e(S(),1),J=y();function Y({messages:e,openedAt:r}){let[a,o]=q.useState(`all`),[s,c]=q.useState(``),[l,u]=q.useState(e[0]?.id??null),d=s.trim().toLowerCase(),p=e.filter(e=>(a===`all`||e.direction===a)&&(!d||e.name.toLowerCase().includes(d)||(e.text??``).toLowerCase().includes(d))),g=e.find(e=>e.id===l)??null,y=e.filter(e=>e.direction===`sent`).length;if(e.length===0)return(0,J.jsx)(h,{title:`No messages`,children:`The connection opened but nothing was sent or received on it.`});let b=(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,px:`3`,py:`2`,alignItems:`center`,flexShrink:0}),children:[(0,J.jsx)(t,{items:[{id:`all`,label:`All ${e.length}`},{id:`sent`,label:`Sent ${y}`},{id:`received`,label:`Received ${e.length-y}`}],value:a,onSelect:o}),(0,J.jsx)(n,{className:f({flex:`1`}),placeholder:`Filter messages…`,value:s,onChange:e=>c(e.target.value)})]}),(0,J.jsxs)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`}),role:`listbox`,"aria-label":`Messages`,children:[p.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e.id===l,onClick:()=>u(e.id),className:f({display:`grid`,gridTemplateColumns:`18px 76px 70px 1fr 64px`,alignItems:`center`,gap:`2`,w:`full`,px:`3`,py:`1`,border:`none`,borderBottom:`1px solid`,borderColor:`line`,bg:`transparent`,textAlign:`left`,cursor:`pointer`,_hover:{bg:`hover`},"&[aria-selected=true]":{bg:`selected`}}),children:[(0,J.jsx)(`span`,{title:e.direction,className:e.direction===`sent`?f({color:`post`}):f({color:`get`}),children:e.direction===`sent`?(0,J.jsx)(_,{size:14}):(0,J.jsx)(F,{size:14})}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`})),children:D(e.ts-r)}),(0,J.jsx)(`span`,{className:i(m,v,f({color:`muted`})),children:e.name}),(0,J.jsx)(`span`,{className:i(m,v),children:e.text??(e.code==null?`—`:`close ${e.code}`)}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`,textAlign:`right`})),children:M(e.bytes)})]},e.id)),p.length===0?(0,J.jsx)(`div`,{className:f({p:`4`,color:`faint`,textAlign:`center`}),children:`No messages match.`}):null]})]});return(0,J.jsx)(H,{direction:`stacked`,storageKey:`messages`,initial:.55,first:b,second:g?(0,J.jsx)(ie,{message:g,openedAt:r}):(0,J.jsx)(h,{title:`Select a message`})})}function ie({message:e,openedAt:t}){let n=q.useMemo(()=>ae(e.text),[e.text]);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(d,{tone:e.direction===`sent`?`warn`:`ok`,children:e.direction}),(0,J.jsxs)(`span`,{className:m,children:[`#`,e.seq]}),(0,J.jsx)(`span`,{className:i(m,f({color:`muted`})),children:e.name}),e.event_id?(0,J.jsxs)(`span`,{title:e.event_id,className:i(m,v,f({maxW:`240px`,color:`faint`,fontSize:`11px`})),children:[`id `,e.event_id]}):null,e.code==null?null:(0,J.jsxs)(d,{children:[`code `,e.code]}),e.truncated?(0,J.jsx)(d,{tone:`warn`,children:`truncated`}):null,(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`})),children:[D(e.ts-t),` · `,M(e.bytes)]}),(0,J.jsx)(`div`,{className:f({ml:`auto`}),children:(0,J.jsx)(C,{text:e.text})})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`,bg:`well`}),children:e.text==null?(0,J.jsx)(h,{title:e.body_id==null?`No payload`:`Binary payload`}):n===void 0?(0,J.jsx)(G,{text:e.text,wrap:!0}):(0,J.jsx)(U,{value:n})})]})}function ae(e){if(!e)return;let t=e.trimStart()[0];if(t===`{`||t===`[`)try{return JSON.parse(e)}catch{return}}var oe={dns:f({bg:`sse`}),connect:f({bg:`info`}),tls:f({bg:`patch`}),wait:f({bg:`post`}),download:f({bg:`get`}),other:f({bg:`faint`})};function se({request:e}){let t=P(e),n=Math.max(e.duration_ms,.001),r=0;return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{right:(0,J.jsx)(`span`,{className:i(m,f({fontWeight:`600`})),children:j(e.duration_ms)}),children:e.kind===`http`?`Timing`:`Connection`}),t.length===0?(0,J.jsx)(`p`,{className:c,children:`Only the total duration was measured for this exchange.`}):(0,J.jsx)(`div`,{className:f({display:`flex`,flexDir:`column`,gap:`1`}),children:t.map(e=>{let t=r/n*100,a=Math.max(e.ms/n*100,.4);return r+=e.ms,(0,J.jsxs)(`div`,{title:e.hint,className:f({display:`grid`,gridTemplateColumns:`150px 1fr 80px`,alignItems:`center`,gap:`3`,py:`1`}),children:[(0,J.jsx)(`span`,{className:f({color:`muted`,fontSize:`12px`}),children:e.label}),(0,J.jsx)(`div`,{className:f({position:`relative`,h:`10px`,bg:`hover`,rounded:`full`}),children:(0,J.jsx)(`div`,{className:i(f({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`}),oe[e.key]),style:{left:`${t}%`,width:`${Math.min(a,100-t)}%`}})}),(0,J.jsx)(`span`,{className:i(m,f({textAlign:`right`})),children:j(e.ms)})]},e.key)})}),e.kind===`http`&&e.dns_ms==null&&e.connect_ms==null?(0,J.jsx)(`p`,{className:i(c,f({mt:`2`,fontSize:`12px`})),children:`No DNS, connect or TLS phase: the request reused an open connection.`}):null]})}function ce({request:e,requestHeaders:t,responseHeaders:n}){let r=le(e,t,n);return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{children:`Transcript`}),(0,J.jsx)(`div`,{className:i(m,f({bg:`well`,border:`1px solid`,borderColor:`line`,rounded:`md`,p:`3`,lineHeight:`1.6`,overflowX:`auto`})),children:r.map((e,t)=>(0,J.jsxs)(`div`,{className:i(f({whiteSpace:`pre-wrap`,wordBreak:`break-all`}),e.tone===`sent`&&f({color:`post`}),e.tone===`received`&&f({color:`get`}),e.tone===`info`&&f({color:`faint`})),children:[e.prefix,` `,e.text]},t))})]})}function le(e,t,n){let r=[],i=e=>r.push({prefix:`*`,text:e,tone:`info`}),a=e=>r.push({prefix:`>`,text:e,tone:`sent`}),o=e=>r.push({prefix:`<`,text:e,tone:`received`});i(`${new Date(e.ts).toISOString()} ${e.kind.toUpperCase()} ${e.url}`);for(let t of X(e))i(t);let s=e.query?`${e.path}?${e.query}`:e.path;a(`${e.method} ${s}`),t.some(([e])=>e.toLowerCase()===`host`)||a(`host: ${e.host}`);for(let[e,n]of t)a(`${e}: ${n}`);if(e.request_bytes>0&&i(`${e.request_bytes} bytes sent`),e.status!=null){o(`${e.status} ${b[e.status]??``}`.trim());for(let[e,t]of n)o(`${e}: ${t}`);e.ttfb_ms!=null&&i(`First byte after ${j(e.ttfb_ms)}`),i(`${e.response_bytes} bytes received`)}return e.error_name&&i(`${e.error_name}: ${e.error_message??``}`),i(`Completed in ${j(e.duration_ms)}`),r}function X(e){if(e.dns_ms==null&&e.connect_ms==null&&e.tls_ms==null)return[`Re-using existing connection`];let t=[];return e.dns_ms!=null&&t.push(`Resolved ${e.host} in ${j(e.dns_ms)}`),e.connect_ms!=null&&t.push(`Connected in ${j(e.connect_ms)}`),e.tls_ms!=null&&t.push(`TLS handshake in ${j(e.tls_ms)}`),t}function ue(){let{detail:e,run:t,neighbours:n,runRequestCount:r}=B.useLoaderData(),a=B.useSearch(),o=u({from:B.fullPath}),{prefs:s}=V(),c=z(),p=e.request,h=p.error_name!=null||p.status==null||p.status>=400;ne({key:O.request(p.id),title:p.path,icon:`request`,method:p.method,kind:p.kind,failed:h});let g=q.useCallback(e=>{e!=null&&o({to:`/requests/$requestId`,params:{requestId:String(e)},search:e=>e})},[o]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&g(n.prev),e.key===`]`&&g(n.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,n.prev,n.next]),c)return c;let _=p.kind!==`http`,v=a.req??(p.query?`params`:e.requestBody.present?`body`:`headers`),y=_?`messages`:`body`,b=a.res&&(_?a.res!==`body`:a.res!==`messages`)?a.res:y;return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({px:`4`,pt:`3`,pb:`2.5`,display:`flex`,flexDir:`column`,gap:`2`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,fontSize:`12px`,color:`muted`,minW:`0`}),children:[(0,J.jsxs)(l,{to:`/sessions`,search:{entry:t.entry},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),title:t.rel,children:[(0,J.jsx)(R,{size:12}),t.file]}),(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(l,{to:`/runs/$runId`,params:{runId:String(t.id)},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),children:[(0,J.jsx)(te,{size:10}),`Run #`,t.id]}),t.env?(0,J.jsx)(d,{children:t.env}):null,(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(`span`,{className:f({whiteSpace:`nowrap`}),children:[p.seq+1,` of `,r]}),(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,whiteSpace:`nowrap`})),children:[w(Date.now(),p.ts),` `,E(p.ts),` ·`,` `,D(p.ts-t.started_at)]}),(0,J.jsxs)(`div`,{className:f({ml:`auto`,display:`flex`,alignItems:`center`,gap:`1`}),children:[(0,J.jsx)(L,{label:`Previous request in run ([)`,disabled:n.prev==null,onClick:()=>g(n.prev),children:(0,J.jsx)(A,{})}),(0,J.jsx)(L,{label:`Next request in run (])`,disabled:n.next==null,onClick:()=>g(n.next),children:(0,J.jsx)(N,{})})]})]}),(0,J.jsx)(de,{detail:e})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,display:`flex`,borderTop:`1px solid`,borderColor:`line`}),children:(0,J.jsx)(H,{direction:s.layout,storageKey:`request-${s.layout}`,initial:s.layout===`side`?.42:.4,first:(0,J.jsx)(fe,{detail:e,tab:v,onTab:e=>void o({search:t=>({...t,req:e}),replace:!0})}),second:(0,J.jsx)(pe,{detail:e,tab:b,onTab:e=>void o({search:t=>({...t,res:e}),replace:!0})})})})]})}function de({detail:e}){let t=e.request,n=t.kind===`http`?k(t,e.requestHeaders,e.requestBody):null,r=t.url.slice(0,t.url.indexOf(t.host)),o=t.url.slice(r.length+t.host.length);return(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,alignItems:`stretch`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,flex:`1`,minW:`0`,h:`36px`,rounded:`md`,border:`1px solid`,borderColor:`lineStrong`,bg:`well`,overflow:`hidden`}),children:[(0,J.jsx)(`span`,{className:f({display:`flex`,alignItems:`center`,px:`3`,h:`full`,borderRight:`1px solid`,borderColor:`line`,flexShrink:0,"& > span":{fontSize:`12px`}}),children:(0,J.jsx)(a,{method:t.method,kind:t.kind})}),(0,J.jsxs)(`span`,{className:i(m,v,f({px:`3`,fontSize:`13px`,userSelect:`all`,flex:`1`})),title:t.url,children:[(0,J.jsx)(`span`,{className:f({color:`faint`}),children:r}),(0,J.jsx)(`span`,{children:t.host}),(0,J.jsx)(`span`,{className:f({color:`muted`}),children:o})]})]}),n?(0,J.jsx)(C,{text:n,label:`cURL`}):null,(0,J.jsx)(C,{text:t.url,label:`URL`})]})}function Z({title:e,children:t}){return(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2.5`,px:`3`,h:`36px`,flexShrink:0,bg:`chrome`,borderBottom:`1px solid`,borderColor:`line`}),children:[(0,J.jsx)(`span`,{className:f({fontWeight:`600`,fontSize:`12px`}),children:e}),t]})}var Q=f({flex:`1`,minH:`0`,overflow:`auto`});function fe({detail:e,tab:t,onTab:n}){let r=e.request,a=s(r.query),c=ee(e.requestHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsx)(Z,{title:r.kind===`http`?`Request`:`Handshake`,children:(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,fontSize:`11px`})),children:[M(r.request_bytes),` sent`]})}),(0,J.jsx)(o,{dense:!0,items:[{id:`params`,label:`Params`,count:a.length},{id:`headers`,label:`Headers`,count:e.requestHeaders.length},{id:`body`,label:`Body`,hidden:r.kind!==`http`,count:e.requestBody.present?`●`:void 0},{id:`cookies`,label:`Cookies`,count:c.length,hidden:c.length===0},{id:`tags`,label:`Tags`,count:e.tags.length,hidden:e.tags.length===0}],value:t,onSelect:n}),(0,J.jsxs)(`div`,{className:Q,children:[t===`params`?(0,J.jsx)(K,{rows:a.map(([e,t])=>({name:e,value:t})),empty:`No query parameters`}):null,t===`headers`?(0,J.jsx)(K,{rows:e.requestHeaders.map(([e,t])=>({name:e,value:t})),empty:`No request headers`,nameLabel:`Header`}):null,t===`body`?(0,J.jsx)(W,{body:e.requestBody,emptyTitle:`No request body`}):null,t===`cookies`?(0,J.jsx)($,{cookies:c}):null,t===`tags`?(0,J.jsx)(K,{rows:e.tags.map(e=>({name:e.key,value:e.value})),empty:`No tags`}):null]})]})}function pe({detail:e,tab:t,onTab:n}){let i=e.request,a=i.kind!==`http`,s=x(e.responseHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(Z,{title:a?`Connection`:`Response`,children:[(0,J.jsx)(p,{status:i.status,error:i.error_name,pill:!0}),(0,J.jsx)(r,{label:a?`Open`:`Time`,value:j(i.duration_ms)}),(0,J.jsx)(r,{label:a?`Received`:`Size`,value:M(i.response_bytes)})]}),(0,J.jsx)(o,{dense:!0,items:[{id:`body`,label:`Body`,hidden:a},{id:`messages`,label:`Messages`,count:e.messages.length,hidden:!a},{id:`headers`,label:`Headers`,count:e.responseHeaders.length},{id:`cookies`,label:`Cookies`,count:s.length,hidden:s.length===0},{id:`timeline`,label:`Timeline`}],value:t,onSelect:n}),i.error_name?(0,J.jsx)(`div`,{className:f({px:`3`,pt:`2.5`,flexShrink:0}),children:(0,J.jsx)(I,{tone:`bad`,icon:(0,J.jsx)(re,{size:15}),title:i.status==null?`Could not get a response`:i.error_name,children:(0,J.jsxs)(`span`,{className:m,children:[i.error_name,`: `,i.error_message]})})}):null,(0,J.jsxs)(`div`,{className:Q,children:[t===`body`?(0,J.jsx)(W,{body:e.responseBody,emptyTitle:`No response body`}):null,t===`messages`?(0,J.jsx)(Y,{messages:e.messages,openedAt:i.ts}):null,t===`headers`?(0,J.jsx)(K,{rows:e.responseHeaders.map(([e,t])=>({name:e,value:t})),empty:`No response headers`,nameLabel:`Header`}):null,t===`cookies`?(0,J.jsx)($,{cookies:s}):null,t===`timeline`?(0,J.jsxs)(`div`,{className:f({p:`4`,display:`flex`,flexDir:`column`,gap:`5`}),children:[(0,J.jsx)(se,{request:i}),(0,J.jsx)(ce,{request:i,requestHeaders:e.requestHeaders,responseHeaders:e.responseHeaders})]}):null]}),(0,J.jsxs)(`div`,{className:f({px:`3`,py:`1`,borderTop:`1px solid`,borderColor:`line`,color:`faint`,fontSize:`11px`,flexShrink:0,display:`flex`,gap:`3`}),children:[(0,J.jsxs)(`span`,{children:[(0,J.jsx)(g,{children:`[`}),` `,(0,J.jsx)(g,{children:`]`}),` previous / next request`]}),i.ttfb_ms!=null&&!a?(0,J.jsxs)(`span`,{children:[`TTFB `,j(i.ttfb_ms)]}):null]})]})}function $({cookies:e}){let t=e.map(e=>({name:e.name,value:e.value,extra:Object.keys(e.attributes).length?(0,J.jsx)(`span`,{className:f({display:`flex`,gap:`1`,flexWrap:`wrap`}),children:Object.entries(e.attributes).map(([e,t])=>(0,J.jsx)(d,{children:t===`true`?e:`${e}=${t}`},e))}):null})),n=e.some(e=>Object.keys(e.attributes).length>0);return(0,J.jsx)(K,{rows:t,empty:`No cookies`,nameLabel:`Name`,extraLabel:n?`Attributes`:void 0})}export{ue as component};
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{A as t,C as n,D as r,Dt as i,E as a,F as o,J as s,L as c,Mt as l,Nt as u,O as d,Ot as f,P as p,R as m,S as h,T as g,Tt as _,U as v,Vt as y,W as b,Y as ee,Z as x,_n as S,b as C,bt as te,f as w,k as T,l as E,m as D,n as O,nt as k,ot as A,p as j,r as ne,rt as re,s as M,st as N,tt as P,ut as F,v as I,w as L,xt as R}from"./tabs-C1EijW_Z.js";import{d as z,n as B,u as V}from"./index-3VfD7Ktf.js";import{t as H}from"./split-Ddiw3mOT.js";import{i as U,n as W,r as G,t as K}from"./kv-table-Dv6o68aD.js";var q=e(S(),1),J=y();function Y({messages:e,openedAt:r}){let[a,o]=q.useState(`all`),[s,c]=q.useState(``),[l,u]=q.useState(e[0]?.id??null),d=s.trim().toLowerCase(),p=e.filter(e=>(a===`all`||e.direction===a)&&(!d||e.name.toLowerCase().includes(d)||(e.text??``).toLowerCase().includes(d))),g=e.find(e=>e.id===l)??null,y=e.filter(e=>e.direction===`sent`).length;if(e.length===0)return(0,J.jsx)(h,{title:`No messages`,children:`The connection opened but nothing was sent or received on it.`});let b=(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,px:`3`,py:`2`,alignItems:`center`,flexShrink:0}),children:[(0,J.jsx)(t,{items:[{id:`all`,label:`All ${e.length}`},{id:`sent`,label:`Sent ${y}`},{id:`received`,label:`Received ${e.length-y}`}],value:a,onSelect:o}),(0,J.jsx)(n,{className:f({flex:`1`}),placeholder:`Filter messages…`,value:s,onChange:e=>c(e.target.value)})]}),(0,J.jsxs)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`}),role:`listbox`,"aria-label":`Messages`,children:[p.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e.id===l,onClick:()=>u(e.id),className:f({display:`grid`,gridTemplateColumns:`18px 76px 70px 1fr 64px`,alignItems:`center`,gap:`2`,w:`full`,px:`3`,py:`1`,border:`none`,borderBottom:`1px solid`,borderColor:`line`,bg:`transparent`,textAlign:`left`,cursor:`pointer`,_hover:{bg:`hover`},"&[aria-selected=true]":{bg:`selected`}}),children:[(0,J.jsx)(`span`,{title:e.direction,className:e.direction===`sent`?f({color:`post`}):f({color:`get`}),children:e.direction===`sent`?(0,J.jsx)(_,{size:14}):(0,J.jsx)(F,{size:14})}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`})),children:D(e.ts-r)}),(0,J.jsx)(`span`,{className:i(m,v,f({color:`muted`})),children:e.name}),(0,J.jsx)(`span`,{className:i(m,v),children:e.text??(e.code==null?`—`:`close ${e.code}`)}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`,textAlign:`right`})),children:M(e.bytes)})]},e.id)),p.length===0?(0,J.jsx)(`div`,{className:f({p:`4`,color:`faint`,textAlign:`center`}),children:`No messages match.`}):null]})]});return(0,J.jsx)(H,{direction:`stacked`,storageKey:`messages`,initial:.55,first:b,second:g?(0,J.jsx)(ie,{message:g,openedAt:r}):(0,J.jsx)(h,{title:`Select a message`})})}function ie({message:e,openedAt:t}){let n=q.useMemo(()=>ae(e.text),[e.text]);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(d,{tone:e.direction===`sent`?`warn`:`ok`,children:e.direction}),(0,J.jsxs)(`span`,{className:m,children:[`#`,e.seq]}),(0,J.jsx)(`span`,{className:i(m,f({color:`muted`})),children:e.name}),e.event_id?(0,J.jsxs)(`span`,{title:e.event_id,className:i(m,v,f({maxW:`240px`,color:`faint`,fontSize:`11px`})),children:[`id `,e.event_id]}):null,e.code==null?null:(0,J.jsxs)(d,{children:[`code `,e.code]}),e.truncated?(0,J.jsx)(d,{tone:`warn`,children:`truncated`}):null,(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`})),children:[D(e.ts-t),` · `,M(e.bytes)]}),(0,J.jsx)(`div`,{className:f({ml:`auto`}),children:(0,J.jsx)(C,{text:e.text})})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`,bg:`well`}),children:e.text==null?(0,J.jsx)(h,{title:e.body_id==null?`No payload`:`Binary payload`}):n===void 0?(0,J.jsx)(G,{text:e.text,wrap:!0}):(0,J.jsx)(U,{value:n})})]})}function ae(e){if(!e)return;let t=e.trimStart()[0];if(t===`{`||t===`[`)try{return JSON.parse(e)}catch{return}}var oe={dns:f({bg:`sse`}),connect:f({bg:`info`}),tls:f({bg:`patch`}),wait:f({bg:`post`}),download:f({bg:`get`}),other:f({bg:`faint`})};function se({request:e}){let t=P(e),n=Math.max(e.duration_ms,.001),r=0;return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{right:(0,J.jsx)(`span`,{className:i(m,f({fontWeight:`600`})),children:j(e.duration_ms)}),children:e.kind===`http`?`Timing`:`Connection`}),t.length===0?(0,J.jsx)(`p`,{className:c,children:`Only the total duration was measured for this exchange.`}):(0,J.jsx)(`div`,{className:f({display:`flex`,flexDir:`column`,gap:`1`}),children:t.map(e=>{let t=r/n*100,a=Math.max(e.ms/n*100,.4);return r+=e.ms,(0,J.jsxs)(`div`,{title:e.hint,className:f({display:`grid`,gridTemplateColumns:`150px 1fr 80px`,alignItems:`center`,gap:`3`,py:`1`}),children:[(0,J.jsx)(`span`,{className:f({color:`muted`,fontSize:`12px`}),children:e.label}),(0,J.jsx)(`div`,{className:f({position:`relative`,h:`10px`,bg:`hover`,rounded:`full`}),children:(0,J.jsx)(`div`,{className:i(f({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`}),oe[e.key]),style:{left:`${t}%`,width:`${Math.min(a,100-t)}%`}})}),(0,J.jsx)(`span`,{className:i(m,f({textAlign:`right`})),children:j(e.ms)})]},e.key)})}),e.kind===`http`&&e.dns_ms==null&&e.connect_ms==null?(0,J.jsx)(`p`,{className:i(c,f({mt:`2`,fontSize:`12px`})),children:`No DNS, connect or TLS phase: the request reused an open connection.`}):null]})}function ce({request:e,requestHeaders:t,responseHeaders:n}){let r=le(e,t,n);return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{children:`Transcript`}),(0,J.jsx)(`div`,{className:i(m,f({bg:`well`,border:`1px solid`,borderColor:`line`,rounded:`md`,p:`3`,lineHeight:`1.6`,overflowX:`auto`})),children:r.map((e,t)=>(0,J.jsxs)(`div`,{className:i(f({whiteSpace:`pre-wrap`,wordBreak:`break-all`}),e.tone===`sent`&&f({color:`post`}),e.tone===`received`&&f({color:`get`}),e.tone===`info`&&f({color:`faint`})),children:[e.prefix,` `,e.text]},t))})]})}function le(e,t,n){let r=[],i=e=>r.push({prefix:`*`,text:e,tone:`info`}),a=e=>r.push({prefix:`>`,text:e,tone:`sent`}),o=e=>r.push({prefix:`<`,text:e,tone:`received`});i(`${new Date(e.ts).toISOString()} ${e.kind.toUpperCase()} ${e.url}`);for(let t of X(e))i(t);let s=e.query?`${e.path}?${e.query}`:e.path;a(`${e.method} ${s}`),t.some(([e])=>e.toLowerCase()===`host`)||a(`host: ${e.host}`);for(let[e,n]of t)a(`${e}: ${n}`);if(e.request_bytes>0&&i(`${e.request_bytes} bytes sent`),e.status!=null){o(`${e.status} ${b[e.status]??``}`.trim());for(let[e,t]of n)o(`${e}: ${t}`);e.ttfb_ms!=null&&i(`First byte after ${j(e.ttfb_ms)}`),i(`${e.response_bytes} bytes received`)}return e.error_name&&i(`${e.error_name}: ${e.error_message??``}`),i(`Completed in ${j(e.duration_ms)}`),r}function X(e){if(e.dns_ms==null&&e.connect_ms==null&&e.tls_ms==null)return[`Re-using existing connection`];let t=[];return e.dns_ms!=null&&t.push(`Resolved ${e.host} in ${j(e.dns_ms)}`),e.connect_ms!=null&&t.push(`Connected in ${j(e.connect_ms)}`),e.tls_ms!=null&&t.push(`TLS handshake in ${j(e.tls_ms)}`),t}function ue(){let{detail:e,run:t,neighbours:n,runRequestCount:r}=B.useLoaderData(),a=B.useSearch(),o=u({from:B.fullPath}),{prefs:s}=V(),c=z(),p=e.request,h=p.error_name!=null||p.status==null||p.status>=400;ne({key:O.request(p.id),title:p.path,icon:`request`,method:p.method,kind:p.kind,failed:h});let g=q.useCallback(e=>{e!=null&&o({to:`/requests/$requestId`,params:{requestId:String(e)},search:e=>e})},[o]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&g(n.prev),e.key===`]`&&g(n.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,n.prev,n.next]),c)return c;let _=p.kind!==`http`,v=a.req??(p.query?`params`:e.requestBody.present?`body`:`headers`),y=_?`messages`:`body`,b=a.res&&(_?a.res!==`body`:a.res!==`messages`)?a.res:y;return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({px:`4`,pt:`3`,pb:`2.5`,display:`flex`,flexDir:`column`,gap:`2`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,fontSize:`12px`,color:`muted`,minW:`0`}),children:[(0,J.jsxs)(l,{to:`/sessions`,search:{entry:t.entry},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),title:t.rel,children:[(0,J.jsx)(R,{size:12}),t.file]}),(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(l,{to:`/runs/$runId`,params:{runId:String(t.id)},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),children:[(0,J.jsx)(te,{size:10}),`Run #`,t.id]}),t.env?(0,J.jsx)(d,{children:t.env}):null,(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(`span`,{className:f({whiteSpace:`nowrap`}),children:[p.seq+1,` of `,r]}),(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,whiteSpace:`nowrap`})),children:[w(Date.now(),p.ts),` `,E(p.ts),` ·`,` `,D(p.ts-t.started_at)]}),(0,J.jsxs)(`div`,{className:f({ml:`auto`,display:`flex`,alignItems:`center`,gap:`1`}),children:[(0,J.jsx)(L,{label:`Previous request in run ([)`,disabled:n.prev==null,onClick:()=>g(n.prev),children:(0,J.jsx)(A,{})}),(0,J.jsx)(L,{label:`Next request in run (])`,disabled:n.next==null,onClick:()=>g(n.next),children:(0,J.jsx)(N,{})})]})]}),(0,J.jsx)(de,{detail:e})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,display:`flex`,borderTop:`1px solid`,borderColor:`line`}),children:(0,J.jsx)(H,{direction:s.layout,storageKey:`request-${s.layout}`,initial:s.layout===`side`?.42:.4,first:(0,J.jsx)(fe,{detail:e,tab:v,onTab:e=>void o({search:t=>({...t,req:e}),replace:!0})}),second:(0,J.jsx)(pe,{detail:e,tab:b,onTab:e=>void o({search:t=>({...t,res:e}),replace:!0})})})})]})}function de({detail:e}){let t=e.request,n=t.kind===`http`?k(t,e.requestHeaders,e.requestBody):null,r=t.url.slice(0,t.url.indexOf(t.host)),o=t.url.slice(r.length+t.host.length);return(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,alignItems:`stretch`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,flex:`1`,minW:`0`,h:`36px`,rounded:`md`,border:`1px solid`,borderColor:`lineStrong`,bg:`well`,overflow:`hidden`}),children:[(0,J.jsx)(`span`,{className:f({display:`flex`,alignItems:`center`,px:`3`,h:`full`,borderRight:`1px solid`,borderColor:`line`,flexShrink:0,"& > span":{fontSize:`12px`}}),children:(0,J.jsx)(a,{method:t.method,kind:t.kind})}),(0,J.jsxs)(`span`,{className:i(m,v,f({px:`3`,fontSize:`13px`,userSelect:`all`,flex:`1`})),title:t.url,children:[(0,J.jsx)(`span`,{className:f({color:`faint`}),children:r}),(0,J.jsx)(`span`,{children:t.host}),(0,J.jsx)(`span`,{className:f({color:`muted`}),children:o})]})]}),n?(0,J.jsx)(C,{text:n,label:`cURL`}):null,(0,J.jsx)(C,{text:t.url,label:`URL`})]})}function Z({title:e,children:t}){return(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2.5`,px:`3`,h:`36px`,flexShrink:0,bg:`chrome`,borderBottom:`1px solid`,borderColor:`line`}),children:[(0,J.jsx)(`span`,{className:f({fontWeight:`600`,fontSize:`12px`}),children:e}),t]})}var Q=f({flex:`1`,minH:`0`,overflow:`auto`});function fe({detail:e,tab:t,onTab:n}){let r=e.request,a=s(r.query),c=ee(e.requestHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsx)(Z,{title:r.kind===`http`?`Request`:`Handshake`,children:(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,fontSize:`11px`})),children:[M(r.request_bytes),` sent`]})}),(0,J.jsx)(o,{dense:!0,items:[{id:`params`,label:`Params`,count:a.length},{id:`headers`,label:`Headers`,count:e.requestHeaders.length},{id:`body`,label:`Body`,hidden:r.kind!==`http`,count:e.requestBody.present?`●`:void 0},{id:`cookies`,label:`Cookies`,count:c.length,hidden:c.length===0},{id:`tags`,label:`Tags`,count:e.tags.length,hidden:e.tags.length===0}],value:t,onSelect:n}),(0,J.jsxs)(`div`,{className:Q,children:[t===`params`?(0,J.jsx)(K,{rows:a.map(([e,t])=>({name:e,value:t})),empty:`No query parameters`}):null,t===`headers`?(0,J.jsx)(K,{rows:e.requestHeaders.map(([e,t])=>({name:e,value:t})),empty:`No request headers`,nameLabel:`Header`}):null,t===`body`?(0,J.jsx)(W,{body:e.requestBody,emptyTitle:`No request body`}):null,t===`cookies`?(0,J.jsx)($,{cookies:c}):null,t===`tags`?(0,J.jsx)(K,{rows:e.tags.map(e=>({name:e.key,value:e.value})),empty:`No tags`}):null]})]})}function pe({detail:e,tab:t,onTab:n}){let i=e.request,a=i.kind!==`http`,s=x(e.responseHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(Z,{title:a?`Connection`:`Response`,children:[(0,J.jsx)(p,{status:i.status,error:i.error_name,pill:!0}),(0,J.jsx)(r,{label:a?`Open`:`Time`,value:j(i.duration_ms)}),(0,J.jsx)(r,{label:a?`Received`:`Size`,value:M(i.response_bytes)})]}),(0,J.jsx)(o,{dense:!0,items:[{id:`body`,label:`Body`,hidden:a},{id:`messages`,label:`Messages`,count:e.messages.length,hidden:!a},{id:`headers`,label:`Headers`,count:e.responseHeaders.length},{id:`cookies`,label:`Cookies`,count:s.length,hidden:s.length===0},{id:`timeline`,label:`Timeline`}],value:t,onSelect:n}),i.error_name?(0,J.jsx)(`div`,{className:f({px:`3`,pt:`2.5`,flexShrink:0}),children:(0,J.jsx)(I,{tone:`bad`,icon:(0,J.jsx)(re,{size:15}),title:i.status==null?`Could not get a response`:i.error_name,children:(0,J.jsxs)(`span`,{className:m,children:[i.error_name,`: `,i.error_message]})})}):null,(0,J.jsxs)(`div`,{className:Q,children:[t===`body`?(0,J.jsx)(W,{body:e.responseBody,emptyTitle:`No response body`}):null,t===`messages`?(0,J.jsx)(Y,{messages:e.messages,openedAt:i.ts}):null,t===`headers`?(0,J.jsx)(K,{rows:e.responseHeaders.map(([e,t])=>({name:e,value:t})),empty:`No response headers`,nameLabel:`Header`}):null,t===`cookies`?(0,J.jsx)($,{cookies:s}):null,t===`timeline`?(0,J.jsxs)(`div`,{className:f({p:`4`,display:`flex`,flexDir:`column`,gap:`5`}),children:[(0,J.jsx)(se,{request:i}),(0,J.jsx)(ce,{request:i,requestHeaders:e.requestHeaders,responseHeaders:e.responseHeaders})]}):null]}),(0,J.jsxs)(`div`,{className:f({px:`3`,py:`1`,borderTop:`1px solid`,borderColor:`line`,color:`faint`,fontSize:`11px`,flexShrink:0,display:`flex`,gap:`3`}),children:[(0,J.jsxs)(`span`,{children:[(0,J.jsx)(g,{children:`[`}),` `,(0,J.jsx)(g,{children:`]`}),` previous / next request`]}),i.ttfb_ms!=null&&!a?(0,J.jsxs)(`span`,{children:[`TTFB `,j(i.ttfb_ms)]}):null]})]})}function $({cookies:e}){let t=e.map(e=>({name:e.name,value:e.value,extra:Object.keys(e.attributes).length?(0,J.jsx)(`span`,{className:f({display:`flex`,gap:`1`,flexWrap:`wrap`}),children:Object.entries(e.attributes).map(([e,t])=>(0,J.jsx)(d,{children:t===`true`?e:`${e}=${t}`},e))}):null})),n=e.some(e=>Object.keys(e.attributes).length>0);return(0,J.jsx)(K,{rows:t,empty:`No cookies`,nameLabel:`Name`,extraLabel:n?`Attributes`:void 0})}export{ue as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,B as t,Dt as n,E as r,Et as i,M as a,Mt as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,g as v,it as y,j as b,jt as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{r as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,o as F,u as I}from"./index-
|
|
1
|
+
import{$ as e,B as t,Dt as n,E as r,Et as i,M as a,Mt as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,g as v,it as y,j as b,jt as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{r as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,o as F,u as I}from"./index-3VfD7Ktf.js";import{t as L}from"./scoped-CiNsRvyC.js";var R=g(),z=x(`__root__`);function B(){E({key:C.overview(),title:`Overview`,icon:`overview`});let a=N(),g=z.useLoaderData(),v=P(g.now),{prefs:b}=I(),x=s(),{data:D}=L(F.useLoaderData(),e=>M({data:{env:e}}));if(a)return a;let B=g.counts;if(!B)return null;let H=b.env===`*`?null:b.env===``?`No environment`:b.env;return(0,R.jsx)(`div`,{className:t,children:(0,R.jsxs)(`div`,{className:j,children:[(0,R.jsxs)(`header`,{children:[(0,R.jsx)(`h1`,{className:l({fontSize:`18px`,fontWeight:`600`,m:`0`}),children:`Overview`}),(0,R.jsx)(`p`,{className:n(f,l({color:`muted`,m:`0`,mt:`0.5`})),children:g.path})]}),(0,R.jsx)(V,{counts:B,envCount:g.envs.length,fileBytes:g.bytes}),H?(0,R.jsxs)(`p`,{className:l({color:`muted`,m:`0`,mt:`-2`}),children:[`Totals cover the whole file; the lists below are scoped to `,(0,R.jsx)(`b`,{children:H}),`.`]}):null,(0,R.jsxs)(`div`,{className:l({display:`grid`,gridTemplateColumns:{base:`1fr`,xl:`3fr 2fr`},gap:`5`}),children:[(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Recent runs`}),(0,R.jsx)(A,{children:D.runs.length===0?(0,R.jsx)(p,{title:`No runs in this environment`}):(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Session`}),(0,R.jsx)(`th`,{children:`Result`}),(0,R.jsx)(`th`,{children:`Env`}),(0,R.jsx)(`th`,{className:`num`,children:`Requests`}),(0,R.jsx)(`th`,{className:`num`,children:`Wall`}),(0,R.jsx)(`th`,{className:`num`,children:`When`})]})}),(0,R.jsx)(`tbody`,{children:D.runs.map(t=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void x({to:`/runs/$runId`,params:{runId:String(t.id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`260px`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`}),children:[(0,R.jsx)(k,{tone:d(t)}),(0,R.jsx)(`span`,{className:n(m,l({fontWeight:`500`})),title:t.rel,children:t.file}),(0,R.jsxs)(`span`,{className:n(f,l({color:`faint`})),children:[`#`,t.id]})]})}),(0,R.jsx)(`td`,{className:l({color:`muted`,whiteSpace:`nowrap`}),children:e(t)}),(0,R.jsx)(`td`,{children:t.env?(0,R.jsx)(c,{children:t.env}):null}),(0,R.jsxs)(`td`,{className:`num`,children:[O(t.request_count),t.error_count?(0,R.jsxs)(`span`,{className:l({color:`muted`}),title:_(t.error_count),children:[` `,`· `,t.error_count,`✕`]}):null]}),(0,R.jsx)(`td`,{className:n(`num`,f),children:t.finished_at?T(t.finished_at-t.started_at):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:w(v,t.started_at)})]},t.id))})]})})]}),(0,R.jsxs)(`section`,{className:l({display:`flex`,flexDir:`column`,gap:`5`}),children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(S,{children:`Failing checks`}),(0,R.jsx)(A,{children:D.failedChecks.length===0?(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`center`,p:`3`,color:`ok`}),children:[(0,R.jsx)(y,{size:16}),` No failed checks.`]}):D.failedChecks.map(e=>(0,R.jsxs)(o,{to:`/runs/$runId`,params:{runId:String(e.run_id)},search:{tab:`checks`},className:l({display:`flex`,gap:`2`,px:`3`,py:`2`,borderBottom:`1px solid`,borderColor:`line`,color:`fg`,textDecoration:`none`,_hover:{bg:`hover`},_last:{borderBottom:`none`}}),children:[(0,R.jsx)(`span`,{className:l({color:`bad`,pt:`1px`}),children:(0,R.jsx)(i,{size:15})}),(0,R.jsxs)(`span`,{className:l({minW:`0`,flex:`1`}),children:[(0,R.jsx)(`span`,{className:n(m,l({display:`block`,fontWeight:`500`})),children:e.name}),e.message?(0,R.jsx)(`span`,{className:n(m,l({display:`block`,color:`bad`,fontSize:`12px`})),children:e.message}):null,(0,R.jsxs)(`span`,{className:l({display:`block`,color:`faint`,fontSize:`11px`}),children:[e.file,` · run #`,e.run_id,` · `,w(v,e.ts)]})]})]},e.id))})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(S,{children:`Failed requests`}),(0,R.jsx)(A,{children:D.failedRequests.length===0?(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`center`,p:`3`,color:`ok`}),children:[(0,R.jsx)(y,{size:16}),` Every request succeeded.`]}):D.failedRequests.map(e=>(0,R.jsxs)(o,{to:`/requests/$requestId`,params:{requestId:String(e.id)},className:l({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,color:`fg`,textDecoration:`none`,_hover:{bg:`hover`},_last:{borderBottom:`none`}}),children:[(0,R.jsx)(r,{method:e.method,kind:e.kind,width:`list`}),(0,R.jsx)(`span`,{className:n(m,f,l({flex:`1`})),title:`${e.host}${e.path}`,children:e.path}),(0,R.jsx)(`span`,{className:l({color:`faint`,fontSize:`11px`,whiteSpace:`nowrap`}),children:w(v,e.ts)}),(0,R.jsx)(u,{status:e.status,error:e.error_name})]},e.id))})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Slowest endpoints`}),(0,R.jsx)(A,{children:D.slowest.length===0?(0,R.jsx)(p,{title:`No HTTP requests yet`}):(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Endpoint`}),(0,R.jsx)(`th`,{className:`num`,children:`Calls`}),(0,R.jsx)(`th`,{className:`num`,children:`Errors`}),(0,R.jsx)(`th`,{className:`num`,children:`Avg`}),(0,R.jsx)(`th`,{className:`num`,children:`Max`})]})}),(0,R.jsx)(`tbody`,{children:D.slowest.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void x({to:`/requests/$requestId`,params:{requestId:String(e.slowest_request_id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,R.jsx)(r,{method:e.method,width:`list`}),(0,R.jsxs)(`span`,{className:n(m,f),children:[(0,R.jsx)(`span`,{className:l({color:`faint`}),children:e.host}),e.path]})]})}),(0,R.jsx)(`td`,{className:`num`,children:O(e.count)}),(0,R.jsx)(`td`,{className:n(`num`,e.errors?l({color:`warn`}):void 0),children:O(e.errors)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:T(e.avg_ms)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:T(e.max_ms)})]},`${e.method} ${e.host}${e.path}`))})]})})]})]})})}function V({counts:e,envCount:t,fileBytes:n}){return(0,R.jsxs)(a,{children:[(0,R.jsx)(b,{label:`Sessions`,value:O(e.scripts),sub:`scripts recorded`}),(0,R.jsx)(b,{label:`Runs`,value:O(e.runs),sub:`${v(t,`environment`)}`}),(0,R.jsx)(b,{label:`Requests`,value:O(e.requests),sub:e.connections?`+ ${v(e.connections,`connection`)} · ${v(e.messages,`message`)}`:`HTTP`}),(0,R.jsx)(b,{label:`Failed requests`,value:O(e.failedRequests),tone:e.failedRequests?`warn`:void 0,sub:`errors and ≥ 400`}),(0,R.jsx)(b,{label:`Checks`,value:e.checks?`${O(e.checks-e.failedChecks)}/${O(e.checks)}`:`—`,tone:e.failedChecks?`bad`:e.checks?`ok`:void 0,sub:e.failedChecks?`${O(e.failedChecks)} failed`:`passing`}),(0,R.jsx)(b,{label:`Stored payloads`,value:D(e.storedBodyBytes),sub:`${O(e.bodies)} unique · ${D(n)} on disk`})]})}export{B as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{$ as t,A as n,B as r,C as i,D as a,Dt as o,E as s,Et as c,F as l,H as u,N as d,Nt as f,O as p,Ot as m,P as ee,Q as h,R as g,S as _,U as v,V as y,Vt as b,X as x,_n as S,d as C,et as te,g as w,it as T,k as E,m as D,n as O,ot as k,p as A,q as j,r as M,rt as N,s as P,st as F,u as I,v as L,w as R,x as z,y as B,z as V}from"./tabs-C1EijW_Z.js";import{d as ne,l as H,t as U}from"./index-D3MuiLlr.js";import{r as W,t as G}from"./kv-table-Dv6o68aD.js";import{t as K}from"./session-header-wONyPgx_.js";var q=e(S()),J=b();function Y(){let{run:e,tags:t,requests:n,checks:r,analytics:i,neighbours:a}=U.useLoaderData(),{tab:o=`timeline`}=U.useSearch(),s=f({from:U.fullPath}),c=ne(),u=h(e);M({key:O.run(e.id),title:`${e.file} #${e.id}`,icon:`run`,failed:u===`bad`});let d=q.useCallback(e=>{e!=null&&s({to:`/runs/$runId`,params:{runId:String(e)},search:e=>({tab:e.tab})})},[s]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&d(a.prev),e.key===`]`&&d(a.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,a.prev,a.next]),c)return c;let p=r.filter(e=>e.status===`fail`).length;return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(K,{script:e,linked:!0,tone:u,children:[(0,J.jsx)(X,{run:e,neighbours:a,go:d}),(0,J.jsx)(l,{items:[{id:`timeline`,label:`Timeline`},{id:`requests`,label:`Requests`,count:n.length},{id:`checks`,label:`Checks`,count:r.length?`${r.length-p}/${r.length}`:0,tone:p?`bad`:r.length?`ok`:void 0},{id:`details`,label:`Details`,count:t.length||void 0}],value:o,onSelect:e=>void s({search:{tab:e===`timeline`?void 0:e}})})]}),o===`timeline`?(0,J.jsx)(Q,{run:e,requests:n,checks:r}):null,o===`requests`?(0,J.jsx)(Q,{run:e,requests:n,checks:[],analytics:i}):null,o===`checks`?(0,J.jsx)(ae,{run:e,checks:r}):null,o===`details`?(0,J.jsx)(le,{run:e,tags:t}):null]})}function X({run:e,neighbours:n,go:r}){let i=H(Date.now(),6e4),a=h(e),o=(0,J.jsx)(`span`,{className:m({color:`faint`}),children:`·`});return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2.5`,px:`5`,pt:`1.5`,pb:`2`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`}),children:[(0,J.jsxs)(`div`,{className:m({minW:`0`,flex:`1`,display:`flex`,alignItems:`center`,gap:`2`,flexWrap:`wrap`,fontSize:`12px`,color:`muted`}),children:[(0,J.jsx)(z,{tone:a}),(0,J.jsxs)(`h2`,{className:m({fontSize:`18px`,fontWeight:`600`,m:`0`,color:`fg`}),children:[`Run `,(0,J.jsxs)(`span`,{className:m({fontFamily:`mono`}),children:[`#`,e.id]})]}),(0,J.jsx)(p,{tone:a,title:e.error_count?x(e.error_count):void 0,children:t(e)}),e.env?(0,J.jsx)(p,{children:e.env}):null,(0,J.jsx)(`span`,{children:C(i,e.started_at)}),o,(0,J.jsxs)(`span`,{children:[`node `,e.node_version]}),e.label&&e.label!==e.file?(0,J.jsxs)(J.Fragment,{children:[o,(0,J.jsx)(`span`,{children:e.label})]}):null]}),(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`1`,flexShrink:0}),children:[(0,J.jsx)(R,{label:`Older run of this script ([)`,disabled:n.prev==null,onClick:()=>r(n.prev),children:(0,J.jsx)(k,{})}),(0,J.jsx)(R,{label:`Newer run of this script (])`,disabled:n.next==null,onClick:()=>r(n.next),children:(0,J.jsx)(F,{})})]})]}),e.exit_status===`error`?(0,J.jsx)(L,{tone:`bad`,icon:(0,J.jsx)(N,{size:15}),title:e.error_name??`The script threw`,children:(0,J.jsx)(`span`,{className:g,children:e.error_message})}):null,(0,J.jsx)(re,{run:e})]})}function re({run:e}){let t=e.finished_at?e.finished_at-e.started_at:null,n=e.request_count-e.connection_count,r=e.check_count,i=e.failed_check_count;return(0,J.jsx)(d,{items:[{label:`Wall time`,value:A(t),title:e.finished_at?`Start to finish`:`Never finished`},{label:`Requests`,value:e.connection_count?`${I(n)} + ${w(e.connection_count,`connection`)}`:I(n),title:`${A(e.total_duration_ms)} in flight`},{label:`Failed requests`,value:I(e.error_count),tone:e.error_count?`warn`:void 0,title:`Errors and ≥ 400 responses — they don't fail the run`},{label:`Checks`,value:r?`${r-i}/${r}`:`—`,tone:i?`bad`:r?`ok`:void 0,title:r?i?`${i} failed`:`All passed`:`None recorded`},{label:`Data`,value:P(e.total_bytes),title:`Sent + received`}]})}var Z={ok:m({bg:`ok`}),info:m({bg:`info`}),warn:m({bg:`warn`}),bad:m({bg:`bad`}),neutral:m({bg:`faint`})};function Q({run:e,requests:t,checks:a,analytics:c}){let l=f(),[u,d]=q.useState(``),[p,h]=q.useState(`all`),[b,x]=q.useState(null),[S,C]=q.useState(`time`),T=u.trim().toLowerCase(),E=q.useMemo(()=>{let e=e=>!T||e.toLowerCase().includes(T),n=t.filter(t=>(p===`all`||j(t))&&(b==null||t.host===b)&&e(`${t.method} ${t.host}${t.path} ${t.status??``}`)),r=(S===`slowest`?n.toSorted((e,t)=>t.duration_ms-e.duration_ms):n).map(e=>({type:`request`,row:e}));if(a.length===0)return r;for(let t of a)(p!==`failed`||t.status===`fail`)&&e(`${t.name} ${t.message??``}`)&&r.push({type:`check`,row:t});return r.toSorted((e,t)=>e.row.ts-t.row.ts)},[t,a,T,p,b,S]),O=e.started_at,k=Math.max(e.finished_at??0,...t.map(e=>e.ts+e.duration_ms),...a.map(e=>e.ts),O+1)-O,M=t.filter(j).length+a.filter(e=>e.status===`fail`).length;return t.length===0&&a.length===0?(0,J.jsx)(_,{title:`This run made no requests`}):(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,flex:`1`,minH:`0`}),children:[c&&c.total>0?(0,J.jsx)(oe,{run:e,analytics:c,host:b,onHost:x}):null,(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,px:`5`,py:`2`,alignItems:`center`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(i,{className:m({w:`280px`}),placeholder:a.length?`Filter by method, path, status or check`:`Filter by method, path or status`,value:u,onChange:e=>d(e.target.value)}),(0,J.jsx)(n,{items:[{id:`all`,label:`All ${t.length+a.length}`},{id:`failed`,label:`Failed ${M}`}],value:p,onSelect:h}),c?(0,J.jsx)(n,{items:[{id:`time`,label:`In order`},{id:`slowest`,label:`Slowest first`}],value:S,onSelect:C}):null,(0,J.jsxs)(`span`,{className:m({ml:`auto`,color:`faint`,fontSize:`12px`}),children:[`Timeline spans `,A(k)]})]}),(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`table`,{className:y,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{className:`num`,style:{width:40},children:`#`}),(0,J.jsx)(`th`,{children:`Request`}),(0,J.jsx)(`th`,{children:`Status`}),(0,J.jsx)(`th`,{className:`num`,children:`Time`}),(0,J.jsx)(`th`,{className:`num`,children:`Size`}),(0,J.jsx)(`th`,{style:{width:`32%`},children:`Timeline`})]})}),(0,J.jsxs)(`tbody`,{children:[E.map(e=>e.type===`check`?(0,J.jsx)(ie,{check:e.row,start:O,span:k},`c${e.row.id}`):(0,J.jsxs)(`tr`,{"data-link":!0,onClick:()=>void l({to:`/requests/$requestId`,params:{requestId:String(e.row.id)}}),children:[(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`faint`})),children:e.row.seq+1}),(0,J.jsx)(`td`,{className:m({maxW:`0`,w:`full`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,J.jsx)(s,{method:e.row.method,kind:e.row.kind,width:`list`}),(0,J.jsxs)(`span`,{className:o(v,g),title:`${e.row.host}${e.row.path}`,children:[(0,J.jsx)(`span`,{className:m({color:`faint`}),children:e.row.host}),e.row.path]}),e.row.kind===`http`?null:(0,J.jsx)(`span`,{className:m({color:`faint`,fontSize:`11px`,whiteSpace:`nowrap`}),children:w(e.row.message_count,`message`)})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(ee,{status:e.row.status,error:e.row.error_name})}),(0,J.jsx)(`td`,{className:o(`num`,g),children:A(e.row.duration_ms)}),(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`muted`})),children:P(e.row.response_bytes)}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),title:`${D(e.row.ts-O)} · ${A(e.row.duration_ms)}`,children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`,minW:`2px`}),Z[te(e.row.status,e.row.error_name)]),style:{left:`${(e.row.ts-O)/k*100}%`,width:`${e.row.duration_ms/k*100}%`,opacity:e.row.kind===`http`?1:.5}})})})]},e.row.id)),E.length===0?(0,J.jsx)(`tr`,{children:(0,J.jsx)(`td`,{colSpan:6,className:m({textAlign:`center`,color:`faint`,py:`6`}),children:a.length?`Nothing matches.`:`No requests match.`})}):null]})]})})]})}function ie({check:e,start:t,span:n}){let r=e.status===`pass`;return(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{className:`num`,children:(0,J.jsx)(`span`,{className:o(m({display:`inline-flex`,verticalAlign:`middle`}),u(r?`ok`:`bad`)),title:r?`Passed`:`Failed`,children:r?(0,J.jsx)(T,{size:13}):(0,J.jsx)(c,{size:13})})}),(0,J.jsx)(`td`,{colSpan:4,className:m({maxW:`0`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`,fontSize:`12px`}),children:[(0,J.jsx)(`span`,{className:m({display:`inline-block`,w:`46px`,flexShrink:0,fontFamily:`mono`,fontSize:`10.5px`,fontWeight:`700`,letterSpacing:`0.02em`,color:`faint`}),children:e.mode===`assert`?`ASSERT`:`CHECK`}),(0,J.jsxs)(`span`,{className:o(v,m(r?{color:`muted`}:{color:`bad`,fontWeight:`500`})),children:[e.name,!r&&e.message?` — ${e.message}`:``]})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`-1px`,w:`2px`,h:`10px`,rounded:`full`}),r?Z.ok:Z.bad),style:{left:`${(e.ts-t)/n*100}%`}})})})]})}function ae({run:e,checks:t}){return t.length===0?(0,J.jsxs)(_,{title:`No checks in this run`,icon:(0,J.jsx)(T,{size:22}),children:[`A script records expectations with `,(0,J.jsx)(`code`,{children:`check()`}),` and `,(0,J.jsx)(`code`,{children:`assert()`}),` from`,` `,(0,J.jsx)(`code`,{children:`@apisurf/wire/kit`}),`.`]}):(0,J.jsx)(`div`,{className:r,children:(0,J.jsx)(`div`,{className:V,children:(0,J.jsx)(B,{children:t.map(t=>{let n=t.status===`pass`;return(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2.5`,px:`3`,py:`2`,borderBottom:`1px solid`,borderColor:`line`,_last:{borderBottom:`none`}}),children:[(0,J.jsx)(`span`,{className:o(m({pt:`1px`}),u(n?`ok`:`bad`)),children:n?(0,J.jsx)(T,{size:16}):(0,J.jsx)(c,{size:16})}),(0,J.jsxs)(`div`,{className:m({flex:`1`,minW:`0`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,alignItems:`center`}),children:[(0,J.jsx)(`span`,{className:m({fontWeight:`500`}),children:t.name}),t.mode===`assert`?(0,J.jsx)(p,{tone:n?`neutral`:`bad`,children:`assert`}):null]}),!n&&t.message?(0,J.jsx)(`div`,{className:o(g,m({color:`bad`,mt:`0.5`,wordBreak:`break-word`})),children:t.message}):null]}),(0,J.jsx)(`span`,{className:o(g,m({color:`faint`,whiteSpace:`nowrap`})),children:D(t.ts-e.started_at)})]},t.id)})})})})}var $={"1xx":`info`,"2xx":`ok`,"3xx":`info`,"4xx":`warn`,"5xx":`bad`,error:`bad`};function oe({run:e,analytics:t,host:n,onHost:r}){let i=`Over ${w(t.latencySamples,`HTTP request`)}. A WebSocket or SSE connection's duration is how long it stayed open, so it is left out.`+(e.connection_count?` This run opened ${w(e.connection_count,`connection`)}.`:``);return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2`,px:`5`,pt:`3`,pb:`1`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,rowGap:`2`,columnGap:`5`}),children:[(0,J.jsx)(a,{label:`p50`,value:A(t.p50),title:i}),(0,J.jsx)(a,{label:`p95`,value:A(t.p95),title:i}),(0,J.jsx)(a,{label:`p99`,value:A(t.p99),title:i}),(0,J.jsx)(se,{analytics:t})]}),t.byHost.length>1||n!=null?(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`1.5`}),children:[(0,J.jsx)(`span`,{className:m({color:`muted`,fontSize:`12px`,mr:`1`}),children:`Hosts`}),t.byHost.map(e=>(0,J.jsx)(ce,{row:e,pressed:n===e.host,onClick:()=>r(n===e.host?null:e.host)},e.host))]}):null]})}function se({analytics:e}){return(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`,minW:`0`}),children:[(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`2px`,h:`8px`,w:`160px`,flexShrink:0}),role:`img`,"aria-label":`Status mix`,children:e.statusMix.map(e=>(0,J.jsx)(`div`,{title:`${e.status_class}: ${e.count}`,className:o(m({rounded:`full`,minW:`4px`}),Z[$[e.status_class]??`neutral`]),style:{flexGrow:e.count}},e.status_class))}),(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`3`,flexWrap:`wrap`,fontSize:`12px`}),children:e.statusMix.map(t=>(0,J.jsxs)(`span`,{className:m({display:`inline-flex`,alignItems:`center`,gap:`1`}),title:`${Math.round(t.count/e.total*100)}% of requests`,children:[(0,J.jsx)(`span`,{className:o(g,u($[t.status_class]??`neutral`)),children:t.status_class}),(0,J.jsx)(`span`,{className:m({color:`muted`}),children:t.count})]},t.status_class))})]})}function ce({row:e,pressed:t,onClick:n}){return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":t,onClick:n,title:`${w(e.count,`call`)} · p95 ${A(e.p95)}${e.errors?` · ${w(e.errors,`error`)}`:``} — click to ${t?`show every host`:`show only this host`}`,className:m({display:`inline-flex`,alignItems:`center`,gap:`1.5`,h:`24px`,px:`2`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`raised`,color:`fg`,cursor:`pointer`,fontSize:`12px`,_hover:{borderColor:`lineStrong`,bg:`hover`},"&[aria-pressed=true]":{borderColor:`accent`,bg:`accentSoft`,color:`accent`}}),children:[(0,J.jsx)(`span`,{className:g,children:e.host}),(0,J.jsx)(`span`,{className:m({color:`muted`,fontVariantNumeric:`tabular-nums`}),children:e.count}),e.errors?(0,J.jsxs)(`span`,{className:m({color:`warn`,fontVariantNumeric:`tabular-nums`}),children:[e.errors,`✕`]}):null]})}function le({run:e,tags:t}){let n=H(Date.now(),6e4),i=[{name:`id`,value:String(e.id)},{name:`uid`,value:e.uid},{name:`label`,value:e.label??`—`},{name:`entry`,value:e.entry},{name:`cwd`,value:e.cwd},{name:`env`,value:e.env??`—`},{name:`node`,value:e.node_version},{name:`started`,value:C(n,e.started_at)},{name:`finished`,value:e.finished_at?C(n,e.finished_at):`—`},{name:`exit status`,value:e.exit_status??`—`}];return(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`div`,{className:V,children:[(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Run`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:i,empty:``,filterable:!1,nameLabel:`Field`})})]}),(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Tags`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:t.map(e=>({name:e.key,value:e.value})),empty:`No tags — add them with wire execute --tag key=value`,filterable:!1})})]}),e.entry_source?(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Inline source`}),(0,J.jsx)(B,{children:(0,J.jsx)(`div`,{className:m({bg:`well`}),children:(0,J.jsx)(W,{text:e.entry_source})})})]}):null]})})}export{Y as component};
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{$ as t,A as n,B as r,C as i,D as a,Dt as o,E as s,Et as c,F as l,H as u,N as d,Nt as f,O as p,Ot as m,P as ee,Q as h,R as g,S as _,U as v,V as y,Vt as b,X as x,_n as S,d as C,et as te,g as w,it as T,k as E,m as D,n as O,ot as k,p as A,q as j,r as M,rt as N,s as P,st as F,u as I,v as L,w as R,x as z,y as B,z as V}from"./tabs-C1EijW_Z.js";import{d as ne,l as H,t as U}from"./index-3VfD7Ktf.js";import{r as W,t as G}from"./kv-table-Dv6o68aD.js";import{t as K}from"./session-header-DMR_hFkk.js";var q=e(S()),J=b();function Y(){let{run:e,tags:t,requests:n,checks:r,analytics:i,neighbours:a}=U.useLoaderData(),{tab:o=`timeline`}=U.useSearch(),s=f({from:U.fullPath}),c=ne(),u=h(e);M({key:O.run(e.id),title:`${e.file} #${e.id}`,icon:`run`,failed:u===`bad`});let d=q.useCallback(e=>{e!=null&&s({to:`/runs/$runId`,params:{runId:String(e)},search:e=>({tab:e.tab})})},[s]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&d(a.prev),e.key===`]`&&d(a.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,a.prev,a.next]),c)return c;let p=r.filter(e=>e.status===`fail`).length;return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(K,{script:e,linked:!0,tone:u,children:[(0,J.jsx)(X,{run:e,neighbours:a,go:d}),(0,J.jsx)(l,{items:[{id:`timeline`,label:`Timeline`},{id:`requests`,label:`Requests`,count:n.length},{id:`checks`,label:`Checks`,count:r.length?`${r.length-p}/${r.length}`:0,tone:p?`bad`:r.length?`ok`:void 0},{id:`details`,label:`Details`,count:t.length||void 0}],value:o,onSelect:e=>void s({search:{tab:e===`timeline`?void 0:e}})})]}),o===`timeline`?(0,J.jsx)(Q,{run:e,requests:n,checks:r}):null,o===`requests`?(0,J.jsx)(Q,{run:e,requests:n,checks:[],analytics:i}):null,o===`checks`?(0,J.jsx)(ae,{run:e,checks:r}):null,o===`details`?(0,J.jsx)(le,{run:e,tags:t}):null]})}function X({run:e,neighbours:n,go:r}){let i=H(Date.now(),6e4),a=h(e),o=(0,J.jsx)(`span`,{className:m({color:`faint`}),children:`·`});return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2.5`,px:`5`,pt:`1.5`,pb:`2`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`}),children:[(0,J.jsxs)(`div`,{className:m({minW:`0`,flex:`1`,display:`flex`,alignItems:`center`,gap:`2`,flexWrap:`wrap`,fontSize:`12px`,color:`muted`}),children:[(0,J.jsx)(z,{tone:a}),(0,J.jsxs)(`h2`,{className:m({fontSize:`18px`,fontWeight:`600`,m:`0`,color:`fg`}),children:[`Run `,(0,J.jsxs)(`span`,{className:m({fontFamily:`mono`}),children:[`#`,e.id]})]}),(0,J.jsx)(p,{tone:a,title:e.error_count?x(e.error_count):void 0,children:t(e)}),e.env?(0,J.jsx)(p,{children:e.env}):null,(0,J.jsx)(`span`,{children:C(i,e.started_at)}),o,(0,J.jsxs)(`span`,{children:[`node `,e.node_version]}),e.label&&e.label!==e.file?(0,J.jsxs)(J.Fragment,{children:[o,(0,J.jsx)(`span`,{children:e.label})]}):null]}),(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`1`,flexShrink:0}),children:[(0,J.jsx)(R,{label:`Older run of this script ([)`,disabled:n.prev==null,onClick:()=>r(n.prev),children:(0,J.jsx)(k,{})}),(0,J.jsx)(R,{label:`Newer run of this script (])`,disabled:n.next==null,onClick:()=>r(n.next),children:(0,J.jsx)(F,{})})]})]}),e.exit_status===`error`?(0,J.jsx)(L,{tone:`bad`,icon:(0,J.jsx)(N,{size:15}),title:e.error_name??`The script threw`,children:(0,J.jsx)(`span`,{className:g,children:e.error_message})}):null,(0,J.jsx)(re,{run:e})]})}function re({run:e}){let t=e.finished_at?e.finished_at-e.started_at:null,n=e.request_count-e.connection_count,r=e.check_count,i=e.failed_check_count;return(0,J.jsx)(d,{items:[{label:`Wall time`,value:A(t),title:e.finished_at?`Start to finish`:`Never finished`},{label:`Requests`,value:e.connection_count?`${I(n)} + ${w(e.connection_count,`connection`)}`:I(n),title:`${A(e.total_duration_ms)} in flight`},{label:`Failed requests`,value:I(e.error_count),tone:e.error_count?`warn`:void 0,title:`Errors and ≥ 400 responses — they don't fail the run`},{label:`Checks`,value:r?`${r-i}/${r}`:`—`,tone:i?`bad`:r?`ok`:void 0,title:r?i?`${i} failed`:`All passed`:`None recorded`},{label:`Data`,value:P(e.total_bytes),title:`Sent + received`}]})}var Z={ok:m({bg:`ok`}),info:m({bg:`info`}),warn:m({bg:`warn`}),bad:m({bg:`bad`}),neutral:m({bg:`faint`})};function Q({run:e,requests:t,checks:a,analytics:c}){let l=f(),[u,d]=q.useState(``),[p,h]=q.useState(`all`),[b,x]=q.useState(null),[S,C]=q.useState(`time`),T=u.trim().toLowerCase(),E=q.useMemo(()=>{let e=e=>!T||e.toLowerCase().includes(T),n=t.filter(t=>(p===`all`||j(t))&&(b==null||t.host===b)&&e(`${t.method} ${t.host}${t.path} ${t.status??``}`)),r=(S===`slowest`?n.toSorted((e,t)=>t.duration_ms-e.duration_ms):n).map(e=>({type:`request`,row:e}));if(a.length===0)return r;for(let t of a)(p!==`failed`||t.status===`fail`)&&e(`${t.name} ${t.message??``}`)&&r.push({type:`check`,row:t});return r.toSorted((e,t)=>e.row.ts-t.row.ts)},[t,a,T,p,b,S]),O=e.started_at,k=Math.max(e.finished_at??0,...t.map(e=>e.ts+e.duration_ms),...a.map(e=>e.ts),O+1)-O,M=t.filter(j).length+a.filter(e=>e.status===`fail`).length;return t.length===0&&a.length===0?(0,J.jsx)(_,{title:`This run made no requests`}):(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,flex:`1`,minH:`0`}),children:[c&&c.total>0?(0,J.jsx)(oe,{run:e,analytics:c,host:b,onHost:x}):null,(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,px:`5`,py:`2`,alignItems:`center`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(i,{className:m({w:`280px`}),placeholder:a.length?`Filter by method, path, status or check`:`Filter by method, path or status`,value:u,onChange:e=>d(e.target.value)}),(0,J.jsx)(n,{items:[{id:`all`,label:`All ${t.length+a.length}`},{id:`failed`,label:`Failed ${M}`}],value:p,onSelect:h}),c?(0,J.jsx)(n,{items:[{id:`time`,label:`In order`},{id:`slowest`,label:`Slowest first`}],value:S,onSelect:C}):null,(0,J.jsxs)(`span`,{className:m({ml:`auto`,color:`faint`,fontSize:`12px`}),children:[`Timeline spans `,A(k)]})]}),(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`table`,{className:y,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{className:`num`,style:{width:40},children:`#`}),(0,J.jsx)(`th`,{children:`Request`}),(0,J.jsx)(`th`,{children:`Status`}),(0,J.jsx)(`th`,{className:`num`,children:`Time`}),(0,J.jsx)(`th`,{className:`num`,children:`Size`}),(0,J.jsx)(`th`,{style:{width:`32%`},children:`Timeline`})]})}),(0,J.jsxs)(`tbody`,{children:[E.map(e=>e.type===`check`?(0,J.jsx)(ie,{check:e.row,start:O,span:k},`c${e.row.id}`):(0,J.jsxs)(`tr`,{"data-link":!0,onClick:()=>void l({to:`/requests/$requestId`,params:{requestId:String(e.row.id)}}),children:[(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`faint`})),children:e.row.seq+1}),(0,J.jsx)(`td`,{className:m({maxW:`0`,w:`full`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,J.jsx)(s,{method:e.row.method,kind:e.row.kind,width:`list`}),(0,J.jsxs)(`span`,{className:o(v,g),title:`${e.row.host}${e.row.path}`,children:[(0,J.jsx)(`span`,{className:m({color:`faint`}),children:e.row.host}),e.row.path]}),e.row.kind===`http`?null:(0,J.jsx)(`span`,{className:m({color:`faint`,fontSize:`11px`,whiteSpace:`nowrap`}),children:w(e.row.message_count,`message`)})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(ee,{status:e.row.status,error:e.row.error_name})}),(0,J.jsx)(`td`,{className:o(`num`,g),children:A(e.row.duration_ms)}),(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`muted`})),children:P(e.row.response_bytes)}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),title:`${D(e.row.ts-O)} · ${A(e.row.duration_ms)}`,children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`,minW:`2px`}),Z[te(e.row.status,e.row.error_name)]),style:{left:`${(e.row.ts-O)/k*100}%`,width:`${e.row.duration_ms/k*100}%`,opacity:e.row.kind===`http`?1:.5}})})})]},e.row.id)),E.length===0?(0,J.jsx)(`tr`,{children:(0,J.jsx)(`td`,{colSpan:6,className:m({textAlign:`center`,color:`faint`,py:`6`}),children:a.length?`Nothing matches.`:`No requests match.`})}):null]})]})})]})}function ie({check:e,start:t,span:n}){let r=e.status===`pass`;return(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{className:`num`,children:(0,J.jsx)(`span`,{className:o(m({display:`inline-flex`,verticalAlign:`middle`}),u(r?`ok`:`bad`)),title:r?`Passed`:`Failed`,children:r?(0,J.jsx)(T,{size:13}):(0,J.jsx)(c,{size:13})})}),(0,J.jsx)(`td`,{colSpan:4,className:m({maxW:`0`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`,fontSize:`12px`}),children:[(0,J.jsx)(`span`,{className:m({display:`inline-block`,w:`46px`,flexShrink:0,fontFamily:`mono`,fontSize:`10.5px`,fontWeight:`700`,letterSpacing:`0.02em`,color:`faint`}),children:e.mode===`assert`?`ASSERT`:`CHECK`}),(0,J.jsxs)(`span`,{className:o(v,m(r?{color:`muted`}:{color:`bad`,fontWeight:`500`})),children:[e.name,!r&&e.message?` — ${e.message}`:``]})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`-1px`,w:`2px`,h:`10px`,rounded:`full`}),r?Z.ok:Z.bad),style:{left:`${(e.ts-t)/n*100}%`}})})})]})}function ae({run:e,checks:t}){return t.length===0?(0,J.jsxs)(_,{title:`No checks in this run`,icon:(0,J.jsx)(T,{size:22}),children:[`A script records expectations with `,(0,J.jsx)(`code`,{children:`check()`}),` and `,(0,J.jsx)(`code`,{children:`assert()`}),` from`,` `,(0,J.jsx)(`code`,{children:`@apisurf/wire/kit`}),`.`]}):(0,J.jsx)(`div`,{className:r,children:(0,J.jsx)(`div`,{className:V,children:(0,J.jsx)(B,{children:t.map(t=>{let n=t.status===`pass`;return(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2.5`,px:`3`,py:`2`,borderBottom:`1px solid`,borderColor:`line`,_last:{borderBottom:`none`}}),children:[(0,J.jsx)(`span`,{className:o(m({pt:`1px`}),u(n?`ok`:`bad`)),children:n?(0,J.jsx)(T,{size:16}):(0,J.jsx)(c,{size:16})}),(0,J.jsxs)(`div`,{className:m({flex:`1`,minW:`0`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,alignItems:`center`}),children:[(0,J.jsx)(`span`,{className:m({fontWeight:`500`}),children:t.name}),t.mode===`assert`?(0,J.jsx)(p,{tone:n?`neutral`:`bad`,children:`assert`}):null]}),!n&&t.message?(0,J.jsx)(`div`,{className:o(g,m({color:`bad`,mt:`0.5`,wordBreak:`break-word`})),children:t.message}):null]}),(0,J.jsx)(`span`,{className:o(g,m({color:`faint`,whiteSpace:`nowrap`})),children:D(t.ts-e.started_at)})]},t.id)})})})})}var $={"1xx":`info`,"2xx":`ok`,"3xx":`info`,"4xx":`warn`,"5xx":`bad`,error:`bad`};function oe({run:e,analytics:t,host:n,onHost:r}){let i=`Over ${w(t.latencySamples,`HTTP request`)}. A WebSocket or SSE connection's duration is how long it stayed open, so it is left out.`+(e.connection_count?` This run opened ${w(e.connection_count,`connection`)}.`:``);return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2`,px:`5`,pt:`3`,pb:`1`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,rowGap:`2`,columnGap:`5`}),children:[(0,J.jsx)(a,{label:`p50`,value:A(t.p50),title:i}),(0,J.jsx)(a,{label:`p95`,value:A(t.p95),title:i}),(0,J.jsx)(a,{label:`p99`,value:A(t.p99),title:i}),(0,J.jsx)(se,{analytics:t})]}),t.byHost.length>1||n!=null?(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`1.5`}),children:[(0,J.jsx)(`span`,{className:m({color:`muted`,fontSize:`12px`,mr:`1`}),children:`Hosts`}),t.byHost.map(e=>(0,J.jsx)(ce,{row:e,pressed:n===e.host,onClick:()=>r(n===e.host?null:e.host)},e.host))]}):null]})}function se({analytics:e}){return(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`,minW:`0`}),children:[(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`2px`,h:`8px`,w:`160px`,flexShrink:0}),role:`img`,"aria-label":`Status mix`,children:e.statusMix.map(e=>(0,J.jsx)(`div`,{title:`${e.status_class}: ${e.count}`,className:o(m({rounded:`full`,minW:`4px`}),Z[$[e.status_class]??`neutral`]),style:{flexGrow:e.count}},e.status_class))}),(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`3`,flexWrap:`wrap`,fontSize:`12px`}),children:e.statusMix.map(t=>(0,J.jsxs)(`span`,{className:m({display:`inline-flex`,alignItems:`center`,gap:`1`}),title:`${Math.round(t.count/e.total*100)}% of requests`,children:[(0,J.jsx)(`span`,{className:o(g,u($[t.status_class]??`neutral`)),children:t.status_class}),(0,J.jsx)(`span`,{className:m({color:`muted`}),children:t.count})]},t.status_class))})]})}function ce({row:e,pressed:t,onClick:n}){return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":t,onClick:n,title:`${w(e.count,`call`)} · p95 ${A(e.p95)}${e.errors?` · ${w(e.errors,`error`)}`:``} — click to ${t?`show every host`:`show only this host`}`,className:m({display:`inline-flex`,alignItems:`center`,gap:`1.5`,h:`24px`,px:`2`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`raised`,color:`fg`,cursor:`pointer`,fontSize:`12px`,_hover:{borderColor:`lineStrong`,bg:`hover`},"&[aria-pressed=true]":{borderColor:`accent`,bg:`accentSoft`,color:`accent`}}),children:[(0,J.jsx)(`span`,{className:g,children:e.host}),(0,J.jsx)(`span`,{className:m({color:`muted`,fontVariantNumeric:`tabular-nums`}),children:e.count}),e.errors?(0,J.jsxs)(`span`,{className:m({color:`warn`,fontVariantNumeric:`tabular-nums`}),children:[e.errors,`✕`]}):null]})}function le({run:e,tags:t}){let n=H(Date.now(),6e4),i=[{name:`id`,value:String(e.id)},{name:`uid`,value:e.uid},{name:`label`,value:e.label??`—`},{name:`entry`,value:e.entry},{name:`cwd`,value:e.cwd},{name:`env`,value:e.env??`—`},{name:`node`,value:e.node_version},{name:`started`,value:C(n,e.started_at)},{name:`finished`,value:e.finished_at?C(n,e.finished_at):`—`},{name:`exit status`,value:e.exit_status??`—`}];return(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`div`,{className:V,children:[(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Run`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:i,empty:``,filterable:!1,nameLabel:`Field`})})]}),(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Tags`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:t.map(e=>({name:e.key,value:e.value})),empty:`No tags — add them with wire execute --tag key=value`,filterable:!1})})]}),e.entry_source?(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Inline source`}),(0,J.jsx)(B,{children:(0,J.jsx)(`div`,{className:m({bg:`well`}),children:(0,J.jsx)(W,{text:e.entry_source})})})]}):null]})})}export{Y as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{_n as t}from"./tabs-C1EijW_Z.js";import{c as n,u as r}from"./index-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{_n as t}from"./tabs-C1EijW_Z.js";import{c as n,u as r}from"./index-3VfD7Ktf.js";var i=e(t(),1);function a(e,t){let{prefs:a,refreshKey:o}=r(),[s,c]=i.useState(null),l=i.useRef(t);return l.current=t,i.useEffect(()=>{if(a.env===`*`)return;let e=!1;return l.current(n(a.env)).then(t=>{e||c({env:a.env,data:t})}),()=>{e=!0}},[a.env,o,e]),a.env===`*`?{data:e,pending:!1}:s&&s.env===a.env?{data:s.data,pending:!1}:{data:e,pending:!0}}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Dt as t,Mt as n,O as r,Ot as i,Q as a,R as o,U as s,Vt as c,g as l,jt as u,o as d,xt as f}from"./tabs-C1EijW_Z.js";import{l as p,s as m}from"./index-
|
|
1
|
+
import{$ as e,Dt as t,Mt as n,O as r,Ot as i,Q as a,R as o,U as s,Vt as c,g as l,jt as u,o as d,xt as f}from"./tabs-C1EijW_Z.js";import{l as p,s as m}from"./index-3VfD7Ktf.js";var h=c(),g=u(`__root__`),_={ok:`Passing`,warn:``,bad:`Failing`,info:`Unfinished`,neutral:``},v={ok:i({bg:`ok`}),info:i({bg:`info`}),warn:i({bg:`warn`}),bad:i({bg:`bad`}),neutral:i({bg:`lineStrong`})};function y({script:c,linked:u=!1,tone:y,children:b}){let x=g.useLoaderData(),S=p(x.now,6e4),C=m(c.entry),w=C?a(C.latest):null,T=y??w??`neutral`,E=u?(0,h.jsx)(n,{to:`/sessions`,search:{entry:c.entry},title:`Open the session`,className:t(s,i({fontSize:`13px`,fontWeight:`600`,color:`fg`,textDecoration:`none`,_hover:{color:`accent`,textDecoration:`underline`}})),children:c.file}):(0,h.jsx)(`h1`,{className:t(s,i({fontSize:`18px`,fontWeight:`600`,m:`0`,color:`fg`})),children:c.file}),D=C&&w&&_[w]?(0,h.jsx)(r,{tone:w,title:`Latest run: ${e(C.latest)}`,children:_[w]}):null,O=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:t(o,s,i({minW:`0`})),title:c.entry,children:c.rel}),C?(0,h.jsxs)(`span`,{className:i({whiteSpace:`nowrap`,flexShrink:0}),children:[`· `,l(C.runCount,`run`),` · last ran`,` `,d(S,C.latest.last_started_at)]}):null]}),k=i({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`});return(0,h.jsxs)(`header`,{className:i({position:`relative`,flexShrink:0,bg:`masthead`,borderBottom:`1px solid`,borderColor:`lineStrong`,"& > [role=tablist]":{borderBottom:`none`}}),children:[(0,h.jsx)(`span`,{"aria-hidden":!0,className:t(i({position:`absolute`,left:`0`,top:`0`,bottom:`0`,w:`3px`}),v[T])}),(0,h.jsx)(`div`,{className:i({display:`flex`,flexDir:`column`,gap:`0.5`,px:`5`,pt:u?`2.5`:`4`,pb:b?`1`:`3`,fontSize:`12px`,color:`muted`}),children:u?(0,h.jsxs)(`div`,{className:k,children:[(0,h.jsx)(`span`,{className:i({display:`inline-flex`}),children:(0,h.jsx)(f,{size:14})}),E,D,(0,h.jsx)(`span`,{className:i({ml:`1`,minW:`0`,display:`flex`,gap:`1`}),children:O})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:k,children:[(0,h.jsx)(`span`,{className:i({display:`inline-flex`}),children:(0,h.jsx)(f,{size:18})}),E,D]}),(0,h.jsx)(`div`,{className:t(k,i({gap:`1`,pl:`26px`})),children:O})]})}),b]})}export{y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,B as t,Dt as n,E as r,Et as i,F as a,M as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,d as v,g as y,it as b,j as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{s as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,r as F}from"./index-
|
|
1
|
+
import{$ as e,B as t,Dt as n,E as r,Et as i,F as a,M as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,d as v,g as y,it as b,j as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{s as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,r as F}from"./index-3VfD7Ktf.js";import{t as I}from"./scoped-CiNsRvyC.js";import{t as L}from"./session-header-DMR_hFkk.js";var R=g();function z(){let e=F.useLoaderData(),{tab:n=`runs`,entry:r}=F.useSearch(),i=s({from:F.fullPath}),o=N(),c=P(Date.now()),{data:u}=I(e,async t=>await M({data:{entry:r,env:t}})??e),{script:d,runs:f,endpoints:p,checks:m}=u;if(E({key:C.script(d.entry),title:d.file,icon:`session`}),o)return o;let h=m.filter(e=>e.last_status===`fail`).length;return(0,R.jsxs)(`div`,{className:l({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,R.jsx)(L,{script:d,children:(0,R.jsx)(a,{items:[{id:`runs`,label:`Runs`,count:f.length},{id:`requests`,label:`Requests`,count:p.length},{id:`checks`,label:`Checks`,count:m.length,tone:h?`bad`:void 0,hidden:m.length===0}],value:n,onSelect:e=>void i({search:t=>({...t,tab:e===`runs`?void 0:e})})})}),(0,R.jsx)(`div`,{className:t,children:(0,R.jsxs)(`div`,{className:j,children:[n===`runs`?(0,R.jsx)(B,{runs:f,now:c}):null,n===`requests`?(0,R.jsx)(G,{endpoints:p,now:c}):null,n===`checks`?(0,R.jsx)(K,{checks:m}):null]})})]})}function B({runs:t,now:r}){let i=s();if(t.length===0)return(0,R.jsx)(p,{title:`No runs in this environment`});let a=t.filter(e=>e.finished_at!=null),u=a.map(e=>e.finished_at-e.started_at).toSorted((e,t)=>e-t),g=u.length?u[Math.floor((u.length-1)/2)]:null,b=t.filter(e=>d(e)===`bad`).length,C=t.reduce((e,t)=>e+t.request_count,0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(o,{children:[(0,R.jsx)(x,{label:`Runs`,value:O(t.length),sub:`last ${w(r,t[0].started_at)}`}),(0,R.jsx)(x,{label:`Failed runs`,value:O(b),tone:b?`bad`:`ok`,sub:`threw, or a check failed`}),(0,R.jsx)(x,{label:`Median wall time`,value:T(g),sub:`${y(a.length,`finished run`)}`}),(0,R.jsx)(x,{label:`Requests`,value:O(C),sub:`${O(Math.round(C/t.length))} per run`})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Wall time per run`}),(0,R.jsx)(U,{runs:t})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`History`}),(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Run`}),(0,R.jsx)(`th`,{children:`Result`}),(0,R.jsx)(`th`,{children:`Env`}),(0,R.jsx)(`th`,{className:`num`,children:`Requests`}),(0,R.jsx)(`th`,{className:`num`,children:`Checks`}),(0,R.jsx)(`th`,{className:`num`,children:`Data`}),(0,R.jsx)(`th`,{className:`num`,children:`Wall`}),(0,R.jsx)(`th`,{className:`num`,children:`Started`})]})}),(0,R.jsx)(`tbody`,{children:t.map(t=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void i({to:`/runs/$runId`,params:{runId:String(t.id)}}),children:[(0,R.jsx)(`td`,{children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`}),children:[(0,R.jsx)(k,{tone:d(t)}),(0,R.jsxs)(`span`,{className:f,children:[`#`,t.id]}),t.label&&t.label!==t.entry.split(`/`).pop()?(0,R.jsx)(`span`,{className:n(m,l({color:`muted`})),children:t.label}):null]})}),(0,R.jsx)(`td`,{className:l({color:`muted`,whiteSpace:`nowrap`}),children:e(t)}),(0,R.jsx)(`td`,{children:t.env?(0,R.jsx)(c,{children:t.env}):null}),(0,R.jsxs)(`td`,{className:`num`,children:[O(t.request_count),t.error_count?(0,R.jsxs)(`span`,{className:l({color:`muted`}),title:_(t.error_count),children:[` `,`· `,t.error_count,`✕`]}):null]}),(0,R.jsx)(`td`,{className:n(`num`,t.failed_check_count?l({color:`bad`}):void 0),children:t.check_count?`${t.check_count-t.failed_check_count}/${t.check_count}`:`—`}),(0,R.jsx)(`td`,{className:n(`num`,f),children:D(t.total_bytes)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:t.finished_at?T(t.finished_at-t.started_at):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:v(r,t.started_at)})]},t.id))})]})})]})]})}var V={ok:l({bg:`ok`}),warn:l({bg:`warn`}),bad:l({bg:`bad`}),info:l({bg:`info`}),neutral:l({bg:`faint`})},H=60;function U({runs:t}){let r=s(),i=t.slice(0,H).toReversed(),a=i.map(e=>e.finished_at?e.finished_at-e.started_at:0),o=Math.max(...a,1);return(0,R.jsxs)(A,{className:l({p:`3`}),children:[(0,R.jsx)(`div`,{className:l({display:`flex`,alignItems:`flex-end`,gap:`2px`,h:`88px`}),children:i.map((t,i)=>(0,R.jsx)(`button`,{type:`button`,title:`#${t.id} · ${T(a[i])} · ${e(t)}`,onClick:()=>void r({to:`/runs/$runId`,params:{runId:String(t.id)}}),className:l({flex:`1`,maxW:`22px`,minW:`4px`,h:`full`,display:`flex`,alignItems:`flex-end`,border:`none`,bg:`transparent`,p:`0`,cursor:`pointer`,rounded:`xs`,_hover:{bg:`hover`}}),children:(0,R.jsx)(`span`,{className:n(l({display:`block`,w:`full`,roundedTop:`sm`}),V[d(t)]),style:{height:`${Math.max(a[i]/o*100,3)}%`}})},t.id))}),(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`4`,mt:`2`,fontSize:`11px`,color:`muted`,flexWrap:`wrap`}),children:[(0,R.jsxs)(`span`,{children:[`max `,T(o)]}),(0,R.jsx)(W,{tone:`ok`,label:`Passed`}),(0,R.jsx)(W,{tone:`bad`,label:`Threw or failed a check`}),(0,R.jsx)(W,{tone:`info`,label:`Unfinished`})]})]})}function W({tone:e,label:t}){return(0,R.jsxs)(`span`,{className:l({display:`inline-flex`,alignItems:`center`,gap:`1`}),children:[(0,R.jsx)(`span`,{className:n(l({w:`8px`,h:`8px`,rounded:`xs`}),V[e])}),t]})}function G({endpoints:e,now:t}){let i=s();return e.length===0?(0,R.jsx)(p,{title:`No requests in this environment`}):(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Request`}),(0,R.jsx)(`th`,{children:`Last`}),(0,R.jsx)(`th`,{className:`num`,children:`Calls`}),(0,R.jsx)(`th`,{className:`num`,children:`Errors`}),(0,R.jsx)(`th`,{className:`num`,children:`Avg`}),(0,R.jsx)(`th`,{className:`num`,children:`Last seen`})]})}),(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void i({to:`/requests/$requestId`,params:{requestId:String(e.last_request_id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,R.jsx)(r,{method:e.method,kind:e.kind,width:`list`}),(0,R.jsxs)(`span`,{className:n(m,f),title:`${e.host}${e.path}`,children:[(0,R.jsx)(`span`,{className:l({color:`faint`}),children:e.host}),e.path]})]})}),(0,R.jsx)(`td`,{children:(0,R.jsx)(u,{status:e.last_status,error:e.last_error_name})}),(0,R.jsx)(`td`,{className:`num`,children:O(e.count)}),(0,R.jsx)(`td`,{className:n(`num`,e.errors?l({color:`warn`}):void 0),children:O(e.errors)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:e.kind===`http`?T(e.avg_ms):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:w(t,e.last_ts)})]},`${e.kind} ${e.method} ${e.host}${e.path}`))})]})})}function K({checks:e}){let t=s();return(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Check`}),(0,R.jsx)(`th`,{children:`Latest`}),(0,R.jsx)(`th`,{className:`num`,children:`Pass rate`}),(0,R.jsx)(`th`,{className:`num`,children:`Failures`})]})}),(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void t({to:`/runs/$runId`,params:{runId:String(e.last_run_id)},search:{tab:`checks`}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`flex-start`}),children:[(0,R.jsx)(`span`,{className:e.last_status===`pass`?l({color:`ok`}):l({color:`bad`}),children:e.last_status===`pass`?(0,R.jsx)(b,{size:15}):(0,R.jsx)(i,{size:15})}),(0,R.jsxs)(`span`,{className:l({minW:`0`}),children:[(0,R.jsx)(`span`,{className:n(m,l({display:`block`})),children:e.name}),e.last_status===`fail`&&e.last_message?(0,R.jsx)(`span`,{className:n(m,l({display:`block`,color:`bad`,fontSize:`12px`})),children:e.last_message}):null]})]})}),(0,R.jsx)(`td`,{children:e.last_status===`pass`?(0,R.jsx)(c,{tone:`ok`,children:`pass`}):(0,R.jsx)(c,{tone:`bad`,children:`fail`})}),(0,R.jsxs)(`td`,{className:`num`,children:[Math.round((e.total-e.failures)/e.total*100),`%`]}),(0,R.jsxs)(`td`,{className:n(`num`,e.failures?l({color:`bad`}):void 0),children:[e.failures,`/`,e.total]})]},e.name))})]})})}export{z as component};
|
|
@@ -2,9 +2,9 @@ import { __toESM } from "../_runtime.mjs";
|
|
|
2
2
|
import { getRouteApi, require_jsx_runtime, require_react, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
3
|
import { Empty, IconHistory, MethodBadge, Segmented, StatusBadge, Toggle, css, cx, formatBytes, formatClock, formatMs, groupByDay, mono, scrollPane, tabKey, table, truncate, useNow, usePrefs, useTab, useUnreadable } from "./prefs-iPvYd_Vz.mjs";
|
|
4
4
|
import { DayRow, FeedFooter, FeedHeader, FeedSearch } from "./feed-BgweoqQ4.mjs";
|
|
5
|
-
import { Route$4, getHistory } from "./router-
|
|
5
|
+
import { Route$4, getHistory } from "./router-ClsXvW-b.mjs";
|
|
6
6
|
import { useEnvScoped } from "./scoped-CNX8KOhL.mjs";
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/history-
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/history-57VNXvbE.js
|
|
8
8
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
9
9
|
var import_jsx_runtime = require_jsx_runtime();
|
|
10
10
|
var root = getRouteApi("__root__");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { require_jsx_runtime, require_react, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
3
|
import { Button, Callout, Empty, FilterInput, IconDatabase, IconPlay, Kbd, Pill, css, cx, formatMs, mono, tabKey, table, truncate, useTab } from "./prefs-iPvYd_Vz.mjs";
|
|
4
|
-
import { Route$3, runSql } from "./router-
|
|
4
|
+
import { Route$3, runSql } from "./router-ClsXvW-b.mjs";
|
|
5
5
|
import { Split } from "./split-qGbYHKc9.mjs";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/query-
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/query-D6nNoSN3.js
|
|
7
7
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
8
8
|
var import_jsx_runtime = require_jsx_runtime();
|
|
9
9
|
var EXAMPLES = [
|
package/dist/server/_ssr/{requests._requestId-DX2svRx4.mjs → requests._requestId-bXoTBGVj.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { Link, require_jsx_runtime, require_react, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
3
|
import { Callout, CopyButton, Empty, FilterInput, IconAlert, IconButton, IconChevronLeft, IconChevronRight, IconDown, IconRun, IconSessions, IconUp, Kbd, MethodBadge, Metric, Pill, STATUS_TEXT, SectionTitle, Segmented, StatusBadge, TabList, css, cx, faintText, formatBytes, formatClockMs, formatDay, formatMs, formatOffset, mono, queryParams, requestCookies, responseCookies, tabKey, timingPhases, toCurl, truncate, usePrefs, useTab, useUnreadable } from "./prefs-iPvYd_Vz.mjs";
|
|
4
|
-
import { Route$1 } from "./router-
|
|
4
|
+
import { Route$1 } from "./router-ClsXvW-b.mjs";
|
|
5
5
|
import { Split } from "./split-qGbYHKc9.mjs";
|
|
6
6
|
import { BodyViewer, Code, JsonView, KvTable } from "./kv-table-BONnSOLb.mjs";
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/requests._requestId-
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/requests._requestId-bXoTBGVj.js
|
|
8
8
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
9
9
|
var import_jsx_runtime = require_jsx_runtime();
|
|
10
10
|
function MessagesPane({ messages, openedAt }) {
|
|
@@ -64,7 +64,7 @@ var runSql = createServerFn({ method: "POST" }).validator((input) => {
|
|
|
64
64
|
return { sql };
|
|
65
65
|
}).handler(createSsrRpc("0f45629470ab3fbe618e9693d8685920d6ce48b2384512e5d9eb88f6b46ec2d9"));
|
|
66
66
|
//#endregion
|
|
67
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
67
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-ClsXvW-b.js
|
|
68
68
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
69
69
|
var import_jsx_runtime = require_jsx_runtime();
|
|
70
70
|
var __defProp = Object.defineProperty;
|
|
@@ -884,7 +884,7 @@ function StatusBar() {
|
|
|
884
884
|
]
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
|
-
var globals_default = "/assets/globals-
|
|
887
|
+
var globals_default = "/assets/globals-D_ltS-iC.css";
|
|
888
888
|
var Route$7 = createRootRoute({
|
|
889
889
|
head: () => ({
|
|
890
890
|
meta: [
|
|
@@ -928,14 +928,14 @@ function RootDocument({ children }) {
|
|
|
928
928
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("head", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("script", { dangerouslySetInnerHTML: { __html: THEME_BOOT_SCRIPT } }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadContent, {})] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("body", { children: [children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})] })]
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
|
-
var $$splitComponentImporter$6 = () => import("./routes-
|
|
931
|
+
var $$splitComponentImporter$6 = () => import("./routes-CrmwJhiA.mjs");
|
|
932
932
|
var Route$6 = createFileRoute("/")({
|
|
933
933
|
loader: () => getOverview({ data: {} }),
|
|
934
934
|
component: lazyRouteComponent($$splitComponentImporter$6, "component")
|
|
935
935
|
});
|
|
936
936
|
var $$splitComponentImporter$5 = () => import("./environments-BFBtf7iL.mjs");
|
|
937
937
|
var Route$5 = createFileRoute("/environments")({ component: lazyRouteComponent($$splitComponentImporter$5, "component") });
|
|
938
|
-
var $$splitComponentImporter$4 = () => import("./history-
|
|
938
|
+
var $$splitComponentImporter$4 = () => import("./history-57VNXvbE.mjs");
|
|
939
939
|
var Route$4 = createFileRoute("/history")({
|
|
940
940
|
validateSearch: (search) => ({
|
|
941
941
|
q: typeof search.q === "string" && search.q ? search.q : void 0,
|
|
@@ -951,13 +951,13 @@ var Route$4 = createFileRoute("/history")({
|
|
|
951
951
|
staleTime: 0,
|
|
952
952
|
component: lazyRouteComponent($$splitComponentImporter$4, "component")
|
|
953
953
|
});
|
|
954
|
-
var $$splitComponentImporter$3 = () => import("./query-
|
|
954
|
+
var $$splitComponentImporter$3 = () => import("./query-D6nNoSN3.mjs");
|
|
955
955
|
var Route$3 = createFileRoute("/query")({
|
|
956
956
|
validateSearch: (search) => ({ sql: typeof search.sql === "string" ? search.sql : void 0 }),
|
|
957
957
|
loader: () => getSchema(),
|
|
958
958
|
component: lazyRouteComponent($$splitComponentImporter$3, "component")
|
|
959
959
|
});
|
|
960
|
-
var $$splitComponentImporter$2 = () => import("./sessions-
|
|
960
|
+
var $$splitComponentImporter$2 = () => import("./sessions-wsD0b1zm.mjs");
|
|
961
961
|
var Route$2 = createFileRoute("/sessions")({
|
|
962
962
|
validateSearch: (search) => ({
|
|
963
963
|
entry: typeof search.entry === "string" ? search.entry : "",
|
|
@@ -973,7 +973,7 @@ var Route$2 = createFileRoute("/sessions")({
|
|
|
973
973
|
component: lazyRouteComponent($$splitComponentImporter$2, "component")
|
|
974
974
|
});
|
|
975
975
|
/** Most recent {@link STRIP_RUNS} runs as bars, oldest on the left. */
|
|
976
|
-
var $$splitComponentImporter$1 = () => import("./requests._requestId-
|
|
976
|
+
var $$splitComponentImporter$1 = () => import("./requests._requestId-bXoTBGVj.mjs");
|
|
977
977
|
var REQ_TABS = [
|
|
978
978
|
"params",
|
|
979
979
|
"headers",
|
|
@@ -1000,7 +1000,7 @@ var Route$1 = createFileRoute("/requests/$requestId")({
|
|
|
1000
1000
|
},
|
|
1001
1001
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
1002
1002
|
});
|
|
1003
|
-
var $$splitComponentImporter = () => import("./runs._runId-
|
|
1003
|
+
var $$splitComponentImporter = () => import("./runs._runId-DM5Y8e6b.mjs");
|
|
1004
1004
|
var RUN_TABS = [
|
|
1005
1005
|
"requests",
|
|
1006
1006
|
"checks",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Link, getRouteApi, require_jsx_runtime, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { Card, Dot, Empty, IconCheckCircle, IconXCircle, MethodBadge, Pill, SectionTitle, Stat, StatGrid, StatusBadge, css, cx, formatAgo, formatBytes, formatCount, formatMs, mono, pagePad, plural, requestErrorsHint, runTone, runVerdict, scrollPane, tabKey, table, truncate, useNow, usePrefs, useTab, useUnreadable } from "./prefs-iPvYd_Vz.mjs";
|
|
3
|
-
import { Route$6, getOverview } from "./router-
|
|
3
|
+
import { Route$6, getOverview } from "./router-ClsXvW-b.mjs";
|
|
4
4
|
import { useEnvScoped } from "./scoped-CNX8KOhL.mjs";
|
|
5
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-CrmwJhiA.js
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
7
|
var root = getRouteApi("__root__");
|
|
8
8
|
function OverviewPage() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { require_jsx_runtime, require_react, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
3
|
import { Callout, Card, Dot, Empty, FilterInput, IconAlert, IconButton, IconCheckCircle, IconChevronLeft, IconChevronRight, IconXCircle, MethodBadge, Metric, Pill, SectionTitle, Segmented, StatStrip, StatusBadge, TabList, css, cx, formatBytes, formatCount, formatDateTime, formatMs, formatOffset, isFailure, mono, pagePad, plural, requestErrorsHint, runTone, runVerdict, scrollPane, statusTone, tabKey, table, toneText, truncate, useNow, useTab, useUnreadable } from "./prefs-iPvYd_Vz.mjs";
|
|
4
|
-
import { Route } from "./router-
|
|
4
|
+
import { Route } from "./router-ClsXvW-b.mjs";
|
|
5
5
|
import { Code, KvTable } from "./kv-table-BONnSOLb.mjs";
|
|
6
|
-
import { SessionHeader } from "./session-header-
|
|
7
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/runs._runId-
|
|
6
|
+
import { SessionHeader } from "./session-header-BYy6LaSU.mjs";
|
|
7
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/runs._runId-DM5Y8e6b.js
|
|
8
8
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
9
9
|
var import_jsx_runtime = require_jsx_runtime();
|
|
10
10
|
function RunPage() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Link, getRouteApi, require_jsx_runtime } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { IconSessions, Pill, css, cx, formatAgo, mono, plural, runTone, runVerdict, truncate, useNow } from "./prefs-iPvYd_Vz.mjs";
|
|
3
|
-
import { useSession } from "./router-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/session-header-
|
|
3
|
+
import { useSession } from "./router-ClsXvW-b.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/session-header-BYy6LaSU.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
var root = getRouteApi("__root__");
|
|
7
7
|
var HEALTH = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { require_jsx_runtime, useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
2
|
import { Card, Dot, Empty, IconCheckCircle, IconXCircle, MethodBadge, Pill, SectionTitle, Stat, StatGrid, StatusBadge, TabList, css, cx, formatAgo, formatBytes, formatCount, formatDateTime, formatMs, mono, pagePad, plural, requestErrorsHint, runTone, runVerdict, scrollPane, tabKey, table, truncate, useNow, useTab, useUnreadable } from "./prefs-iPvYd_Vz.mjs";
|
|
3
|
-
import { Route$2, getScript } from "./router-
|
|
3
|
+
import { Route$2, getScript } from "./router-ClsXvW-b.mjs";
|
|
4
4
|
import { useEnvScoped } from "./scoped-CNX8KOhL.mjs";
|
|
5
|
-
import { SessionHeader } from "./session-header-
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/sessions-
|
|
5
|
+
import { SessionHeader } from "./session-header-BYy6LaSU.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/sessions-wsD0b1zm.js
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
function SessionPage() {
|
|
9
9
|
const loaded = Route$2.useLoaderData();
|
package/dist/server/_ssr/ssr.mjs
CHANGED
|
@@ -3696,7 +3696,7 @@ var RawStream = class {
|
|
|
3696
3696
|
* the dev styles URL for route-scoped CSS collection.
|
|
3697
3697
|
*/
|
|
3698
3698
|
async function getStartManifest(matchedRoutes) {
|
|
3699
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
3699
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-Ag2qLfrP.mjs");
|
|
3700
3700
|
const startManifest = tsrStartManifest();
|
|
3701
3701
|
let routes = startManifest.routes;
|
|
3702
3702
|
routes[rootRouteId];
|
|
@@ -6369,7 +6369,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
6369
6369
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
6370
6370
|
async function loadEntries() {
|
|
6371
6371
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
6372
|
-
import("./router-
|
|
6372
|
+
import("./router-ClsXvW-b.mjs").then((n) => n.router_exports),
|
|
6373
6373
|
import("./start-zk_ZfrWl.mjs"),
|
|
6374
6374
|
import("./empty-plugin-adapters-CCuiUfKt.mjs")
|
|
6375
6375
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-Ag2qLfrP.js
|
|
2
2
|
var tsrStartManifest = () => ({ routes: {
|
|
3
3
|
__root__: {
|
|
4
4
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/__root.tsx",
|
|
@@ -12,7 +12,7 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
12
12
|
"/runs/$runId"
|
|
13
13
|
],
|
|
14
14
|
preloads: [
|
|
15
|
-
"/assets/index-
|
|
15
|
+
"/assets/index-3VfD7Ktf.js",
|
|
16
16
|
"/assets/rolldown-runtime-CbXtAM7H.js",
|
|
17
17
|
"/assets/tabs-C1EijW_Z.js",
|
|
18
18
|
"/assets/preload-helper-CIs162tl.js"
|
|
@@ -20,47 +20,47 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
20
20
|
scripts: [{ attrs: {
|
|
21
21
|
type: "module",
|
|
22
22
|
async: !0,
|
|
23
|
-
src: "/assets/index-
|
|
23
|
+
src: "/assets/index-3VfD7Ktf.js"
|
|
24
24
|
} }]
|
|
25
25
|
},
|
|
26
26
|
"/": {
|
|
27
27
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/index.tsx",
|
|
28
28
|
children: void 0,
|
|
29
|
-
preloads: ["/assets/routes-
|
|
29
|
+
preloads: ["/assets/routes-C9SXJh8z.js", "/assets/scoped-CiNsRvyC.js"]
|
|
30
30
|
},
|
|
31
31
|
"/environments": {
|
|
32
32
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/environments.tsx",
|
|
33
33
|
children: void 0,
|
|
34
|
-
preloads: ["/assets/environments-
|
|
34
|
+
preloads: ["/assets/environments-CpzEnLw2.js", "/assets/feed-B8L4GK9D.js"]
|
|
35
35
|
},
|
|
36
36
|
"/history": {
|
|
37
37
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/history.tsx",
|
|
38
38
|
children: void 0,
|
|
39
39
|
preloads: [
|
|
40
|
-
"/assets/history-
|
|
40
|
+
"/assets/history-BIXZHMWn.js",
|
|
41
41
|
"/assets/feed-B8L4GK9D.js",
|
|
42
|
-
"/assets/scoped-
|
|
42
|
+
"/assets/scoped-CiNsRvyC.js"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"/query": {
|
|
46
46
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/query.tsx",
|
|
47
47
|
children: void 0,
|
|
48
|
-
preloads: ["/assets/query-
|
|
48
|
+
preloads: ["/assets/query-DpztusaI.js", "/assets/split-Ddiw3mOT.js"]
|
|
49
49
|
},
|
|
50
50
|
"/sessions": {
|
|
51
51
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/sessions.tsx",
|
|
52
52
|
children: void 0,
|
|
53
53
|
preloads: [
|
|
54
|
-
"/assets/sessions-
|
|
55
|
-
"/assets/scoped-
|
|
56
|
-
"/assets/session-header-
|
|
54
|
+
"/assets/sessions-C-F6Wmmg.js",
|
|
55
|
+
"/assets/scoped-CiNsRvyC.js",
|
|
56
|
+
"/assets/session-header-DMR_hFkk.js"
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"/requests/$requestId": {
|
|
60
60
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/requests.$requestId.tsx",
|
|
61
61
|
children: void 0,
|
|
62
62
|
preloads: [
|
|
63
|
-
"/assets/requests._requestId-
|
|
63
|
+
"/assets/requests._requestId-Byq4gM_2.js",
|
|
64
64
|
"/assets/split-Ddiw3mOT.js",
|
|
65
65
|
"/assets/kv-table-Dv6o68aD.js"
|
|
66
66
|
]
|
|
@@ -69,9 +69,9 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
69
69
|
filePath: "/Users/apisurfer/devas/wire/packages/ui/src/routes/runs.$runId.tsx",
|
|
70
70
|
children: void 0,
|
|
71
71
|
preloads: [
|
|
72
|
-
"/assets/runs._runId-
|
|
72
|
+
"/assets/runs._runId-CMFvexqY.js",
|
|
73
73
|
"/assets/kv-table-Dv6o68aD.js",
|
|
74
|
-
"/assets/session-header-
|
|
74
|
+
"/assets/session-header-DMR_hFkk.js"
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
77
|
} });
|