bunqueue-dashboard 0.0.16 → 0.0.18
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/agent/index.ts +8 -3
- package/agent/manager.ts +4 -2
- package/agent/server.ts +66 -2
- package/dist/.vite/manifest.json +63 -63
- package/dist/assets/{AddJob-CMIT6e17.js → AddJob-vk3jh1Zk.js} +2 -2
- package/dist/assets/Benchmark-CpViF2ZC.js +1 -0
- package/dist/assets/{CopilotPanel-BDZzDmVy.js → CopilotPanel-C9ojQ_8d.js} +3 -3
- package/dist/assets/{CopyButton-XT7ykzf5.js → CopyButton-BC6QECSJ.js} +1 -1
- package/dist/assets/{Cron-9hndZ-Z5.js → Cron-Bbf7mRaK.js} +1 -1
- package/dist/assets/{CronManager-BQupx6wZ.js → CronManager-CeNUeoOc.js} +1 -1
- package/dist/assets/Database--bK9pYZF.js +3 -0
- package/dist/assets/{Diagnostics-BzVDq9CH.js → Diagnostics-CGJPsWZQ.js} +1 -1
- package/dist/assets/Dlq-Bs1pupY2.js +1 -0
- package/dist/assets/{DlqControl-Cu2i1oq5.js → DlqControl-BLKVzYQC.js} +1 -1
- package/dist/assets/{DlqPro-HBrCftLD.js → DlqPro-D8SmIQUs.js} +1 -1
- package/dist/assets/{Flows-D3Bvkmd6.js → Flows-BOogljnP.js} +1 -1
- package/dist/assets/{JobInspector-B7zEuFhM.js → JobInspector-Cp4ZuQGI.js} +2 -2
- package/dist/assets/Jobs-C2HYkZXi.js +1 -0
- package/dist/assets/JobsPro-D0uclU0B.js +1 -0
- package/dist/assets/Logs-yn92V_T8.js +1 -0
- package/dist/assets/{LogsPro-P73LCkap.js → LogsPro-DSiV8Ajj.js} +1 -1
- package/dist/assets/{McpServer-CUK20-uN.js → McpServer-CNt7kssG.js} +2 -2
- package/dist/assets/{Metrics-BodjiKpf.js → Metrics-CbscCpvx.js} +1 -1
- package/dist/assets/MetricsPro-CBiFDVne.js +1 -0
- package/dist/assets/Overview-BOuOPWsb.js +1 -0
- package/dist/assets/{Pagination-Cd6lHj2E.js → Pagination-Bj1z6OlD.js} +1 -1
- package/dist/assets/QueueControl-Bl4l9dT6.js +1 -0
- package/dist/assets/QueueDetail-BSUH0Nl6.js +1 -0
- package/dist/assets/{Queues-LrodynCj.js → Queues-BEQlaWVc.js} +1 -1
- package/dist/assets/{QueuesOverview-DrYjyped.js → QueuesOverview-BBjcyzz2.js} +1 -1
- package/dist/assets/{S3Backup-et1PcCC0.js → S3Backup-BmRt-Z8V.js} +1 -1
- package/dist/assets/S3BackupPro-Dsq0erDm.js +1 -0
- package/dist/assets/ServerControl-Bhr9FEXF.js +3 -0
- package/dist/assets/Settings-46jsrfhd.js +1 -0
- package/dist/assets/{Usage-CHCg6VNy.js → Usage-BFLZC7pV.js} +1 -1
- package/dist/assets/{UsagePro-Cto9k5OI.js → UsagePro-D0k-82eG.js} +1 -1
- package/dist/assets/{Webhooks-Cm3vZEp7.js → Webhooks-DChTcBSv.js} +1 -1
- package/dist/assets/Workers-DBXrLvfS.js +1 -0
- package/dist/assets/{WorkersPro-BidtV_Bp.js → WorkersPro-B6I9Ilbq.js} +1 -1
- package/dist/assets/{connectionStore-DI-LYcct.js → connectionStore-CCopJeU7.js} +1 -1
- package/dist/assets/index-BFjeS9FG.js +8 -0
- package/dist/assets/{install-BvB40Zk0.js → install-C019EM5j.js} +2 -2
- package/dist/index.html +2 -2
- package/package.json +12 -10
- package/scripts/embedded.gen.ts +95 -94
- package/scripts/serve.ts +34 -2
- package/dist/assets/Benchmark-Dq1-vJ2k.js +0 -1
- package/dist/assets/Database-Difs7xYV.js +0 -3
- package/dist/assets/Dlq-BCUVh_NO.js +0 -1
- package/dist/assets/Jobs-ovYRwmwi.js +0 -1
- package/dist/assets/JobsPro-DNZivuzq.js +0 -1
- package/dist/assets/Logs-CjM7MNYN.js +0 -1
- package/dist/assets/MetricsPro-CqcH6gJp.js +0 -1
- package/dist/assets/Overview-AwCA3XI2.js +0 -1
- package/dist/assets/QueueControl-D7J1JObu.js +0 -1
- package/dist/assets/QueueDetail-BtiN0s3b.js +0 -1
- package/dist/assets/S3BackupPro-BEo_EVAO.js +0 -1
- package/dist/assets/ServerControl-BRLFRj7k.js +0 -3
- package/dist/assets/Settings-CeRZgZU6.js +0 -1
- package/dist/assets/Workers-CVfx3TK-.js +0 -1
- package/dist/assets/index-C9fPU4bV.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{i as r}from"./connectionStore-CCopJeU7.js";import{C as i,J as a,L as o,S as s,T as c,h as l,k as u,w as d}from"./index-BFjeS9FG.js";import{a as f,n as p,t as m}from"./form-PtDLk33Z.js";var h=e(t(),1),g=n(),_=[[`1000`,`1 second`],[`2000`,`2 seconds`],[`3000`,`3 seconds`],[`5000`,`5 seconds`],[`10000`,`10 seconds`]];function v(e){if(e.startsWith(`/`))return!0;try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function y(){let{baseUrl:e,token:t,agentToken:n,refreshMs:y,setBaseUrl:b,setToken:x,setAgentToken:S,setRefreshMs:C}=r(),{theme:w,setTheme:T}=a(),[E,D]=(0,h.useState)(!1),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(e),[M,N]=(0,h.useState)(t),[P,F]=(0,h.useState)(n),[I,L]=(0,h.useState)(!1),[R,z]=(0,h.useState)(null),[B,V]=(0,h.useState)(!1);return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(l,{title:`Settings`,description:`Connection and appearance.`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,g.jsxs)(s,{children:[(0,g.jsx)(i,{title:`Connection`}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,g.jsx)(m,{label:`Server URL`,children:(0,g.jsx)(p,{value:A,onChange:e=>{j(e.target.value),z(null)},placeholder:`/api or https://queue.example.com`})}),R&&(0,g.jsx)(`p`,{className:`-mt-2 text-xs text-danger`,children:R}),(0,g.jsxs)(`p`,{className:`-mt-2 text-xs text-faint`,children:[`Use `,(0,g.jsx)(`code`,{className:`font-mono`,children:`/api`}),` in dev (proxied to localhost:6790), or the server origin in production.`]}),(0,g.jsx)(m,{label:`Bearer token (optional)`,hint:`Kept in memory only — re-enter after reload, or set VITE_BUNQUEUE_TOKEN.`,children:(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(p,{type:I?`text`:`password`,value:M,onChange:e=>N(e.target.value),placeholder:`only if AUTH_TOKENS is set`,className:`pr-10`}),(0,g.jsx)(c,{"aria-label":I?`Hide token`:`Show token`,className:`absolute right-0.5 top-1/2 -translate-y-1/2`,onClick:()=>L(e=>!e),children:(0,g.jsx)(o,{className:`size-4`})})]})}),(0,g.jsx)(m,{label:`Agent token (optional)`,hint:`Only if the control agent runs with AGENT_TOKEN. Memory only — or set VITE_BUNQUEUE_AGENT_TOKEN.`,children:(0,g.jsx)(p,{type:I?`text`:`password`,value:P,onChange:e=>F(e.target.value),placeholder:`only if AGENT_TOKEN is set`})}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,g.jsx)(d,{variant:`accent`,onClick:()=>{let e=A.trim();if(!v(e)){z(`Must be an http(s) URL or a path starting with '/'.`);return}z(null),b(e),x(M),S(P),V(!0),setTimeout(()=>V(!1),2e3)},children:`Save`}),(0,g.jsx)(d,{onClick:async()=>{D(!0),k(null);let e=performance.now();try{let t=await u.health(),n=Math.round(performance.now()-e);k({ok:t.ok!==!1,msg:`Connected in ${n}ms${t.version?` · bunqueue v${t.version}`:``}`})}catch(e){k({ok:!1,msg:e.message})}finally{D(!1)}},disabled:E,children:E?`Testing…`:`Test connection`}),B&&(0,g.jsx)(`span`,{className:`text-sm text-success`,children:`Saved ✓`}),O&&(0,g.jsx)(`span`,{className:O.ok?`text-sm text-success`:`text-sm text-danger`,children:O.msg})]})]})]}),(0,g.jsxs)(s,{children:[(0,g.jsx)(i,{title:`Appearance & refresh`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,g.jsx)(m,{label:`Theme`,children:(0,g.jsxs)(f,{value:w,onChange:e=>T(e.target.value),children:[(0,g.jsx)(`option`,{value:`dark`,children:`Dark`}),(0,g.jsx)(`option`,{value:`light`,children:`Light`})]})}),(0,g.jsx)(m,{label:`Refresh interval`,children:(0,g.jsx)(f,{value:String(y),onChange:e=>C(Number(e.target.value)),children:_.map(([e,t])=>(0,g.jsx)(`option`,{value:e,children:t},e))})})]})]})]})]})}export{y as Settings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,
|
|
1
|
+
import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,b as i,c as a,d as o,h as s,k as c,m as l,r as u,x as d}from"./index-BFjeS9FG.js";var f=e(),p={stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},memory:{heapUsed:0,heapTotal:0,rss:0},workers:{total:0,active:0},crons:{total:0},storage:{}};function m(){let{data:e,error:m,loading:g,refetch:_}=n(()=>c.overview(),[]);if(g&&!e&&!m)return(0,f.jsx)(i,{label:`Loading usage…`});let{stats:v,memory:y,workers:b,crons:x,storage:S}=e??p;return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(s,{title:`Usage`,description:`Cumulative resource usage on the connected server.`,live:!0}),m&&(0,f.jsx)(d,{onRetry:_}),(0,f.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,f.jsx)(l,{label:`Jobs Pushed`,value:a(v.totalPushed)}),(0,f.jsx)(l,{label:`Jobs Completed`,value:a(v.totalCompleted),tone:`green`}),(0,f.jsx)(l,{label:`Jobs Failed`,value:a(v.totalFailed),tone:v.totalFailed?`red`:`default`}),(0,f.jsx)(l,{label:`Jobs Pulled`,value:a(v.totalPulled),tone:`blue`})]}),(0,f.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Runtime`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Uptime`,value:o(v.uptime)}),(0,f.jsx)(h,{label:`Heap used`,value:u(y.heapUsed*1024*1024)}),(0,f.jsx)(h,{label:`RSS`,value:u(y.rss*1024*1024)}),(0,f.jsx)(h,{label:`Workers`,value:`${b.active} active / ${b.total}`}),(0,f.jsx)(h,{label:`Cron jobs`,value:String(x.total)})]})]}),(0,f.jsxs)(r,{children:[(0,f.jsx)(t,{title:`Storage`}),(0,f.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,f.jsx)(h,{label:`Status`,value:S.diskFull?`Disk full`:`Healthy`}),(0,f.jsx)(h,{label:`Path`,value:String(S.path??`—`),mono:!0}),S.error?(0,f.jsx)(h,{label:`Error`,value:String(S.error)}):null]})]})]})]})}function h({label:e,value:t,mono:n}){return(0,f.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,f.jsx)(`dt`,{className:`text-muted`,children:e}),(0,f.jsx)(`dd`,{className:n?`font-mono text-xs text-fg`:`font-medium text-fg`,children:t})]})}export{m as Usage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,
|
|
1
|
+
import{t as e}from"./react-vendor-CHIHtdAC.js";import{C as t,O as n,S as r,Z as i,b as a,c as o,d as s,h as c,l,m as u,n as d,r as f,u as p,x as m}from"./index-BFjeS9FG.js";var h=e(),g={overview:{stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},memory:{heapUsed:0,heapTotal:0,rss:0},crons:{total:0}},storage:{},failedTotal:0};function _(){let{data:e,error:_,loading:y,refetch:b}=n(async()=>{let[e,t,n]=await Promise.all([i.overview(),i.storage(),i.queuesSummary()]),r=n.reduce((e,t)=>e+(t.counts?.failed??0),0);return{overview:e,storage:t.data??{},failedTotal:r}},[]);if(y&&!e&&!_)return(0,h.jsx)(a,{label:`Loading usage…`});let x=e??g,{stats:S,memory:C,crons:w}=x.overview,{storage:T,failedTotal:E}=x,D=d(S.completed,E),O=S.uptime?s(S.uptime/1e3):`—`;return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(c,{title:`Usage`,description:`Cumulative resource usage on the connected server.`,live:!0}),_&&(0,h.jsx)(m,{onRetry:b}),(0,h.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,h.jsx)(u,{label:`Completed`,value:o(S.completed),tone:`green`}),(0,h.jsx)(u,{label:`Failed`,value:o(E),tone:E?`red`:`default`}),(0,h.jsx)(u,{label:`Waiting`,value:o(S.waiting),tone:`amber`}),(0,h.jsx)(u,{label:`Active`,value:o(S.active),tone:`blue`}),(0,h.jsx)(u,{label:`Error Rate`,value:D==null?`—`:l(D),tone:D==null?`default`:D>.05?`red`:`green`}),(0,h.jsx)(u,{label:`Uptime`,value:O})]}),(0,h.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2`,children:[(0,h.jsxs)(r,{children:[(0,h.jsx)(t,{title:`Runtime`}),(0,h.jsxs)(`dl`,{className:`divide-y divide-line text-sm`,children:[(0,h.jsx)(v,{label:`Jobs pushed (since restart)`,value:o(S.totalPushed)}),(0,h.jsx)(v,{label:`Jobs pulled (since restart)`,value:o(S.totalPulled)}),(0,h.jsx)(v,{label:`Heap used`,value:f(C.heapUsed*1024*1024)}),(0,h.jsx)(v,{label:`RSS`,value:f(C.rss*1024*1024)}),(0,h.jsx)(v,{label:`Cron jobs`,value:String(w.total)})]})]}),(0,h.jsxs)(r,{children:[(0,h.jsx)(t,{title:`Storage`}),T.diskFull?(0,h.jsxs)(`div`,{className:`rounded-lg border border-red-500/25 bg-red-500/[0.06] px-4 py-3`,children:[(0,h.jsx)(`div`,{className:`font-semibold text-danger`,children:`Disk full — writes suspended`}),T.error&&(0,h.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:T.error}),T.since!=null&&(0,h.jsxs)(`div`,{className:`mt-1 text-xs text-faint`,children:[`since `,p(T.since)]})]}):(0,h.jsxs)(`div`,{className:`rounded-lg border border-emerald-500/25 bg-emerald-500/[0.06] px-4 py-3`,children:[(0,h.jsx)(`div`,{className:`font-semibold text-success`,children:`Healthy`}),(0,h.jsx)(`div`,{className:`mt-1 text-xs text-faint`,children:`Disk writes are being accepted.`})]})]})]})]})}function v({label:e,value:t}){return(0,h.jsxs)(`div`,{className:`flex items-center justify-between py-2.5`,children:[(0,h.jsx)(`dt`,{className:`text-muted`,children:e}),(0,h.jsx)(`dd`,{className:`font-medium text-fg`,children:t})]})}export{_ as UsagePro};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{C as r,
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{C as r,K as i,O as a,R as o,S as s,T as c,X as l,Z as u,b as d,c as f,h as p,u as m,w as h,x as g,y as _}from"./index-BFjeS9FG.js";import{n as v,o as y,t as b}from"./form-PtDLk33Z.js";import{t as x}from"./Pagination-Bj1z6OlD.js";var S=e(t(),1),C=n();function w(){let{data:e,error:t,loading:n,refetch:l}=a(()=>u.webhooks(),[]),h=e?.data?.webhooks??[],[v,b]=(0,S.useState)(0),w=Math.max(1,Math.ceil(h.length/15)),E=Math.min(v,w-1),[D,O]=(0,S.useState)(null),k=async e=>{O(null);try{await e(),l()}catch(e){O(e.message)}};return(0,C.jsxs)(`div`,{children:[(0,C.jsx)(p,{title:`Webhooks`,description:`HTTP callbacks fired on job events.`,live:!0}),t&&(0,C.jsx)(g,{onRetry:l}),D&&(0,C.jsx)(`div`,{className:`mb-4 rounded-lg border border-red-500/20 bg-red-500/5 px-4 py-2 text-sm text-danger`,children:D}),(0,C.jsxs)(s,{className:`mb-6`,children:[(0,C.jsx)(r,{title:`Add webhook`}),(0,C.jsx)(T,{onAdd:async e=>{await u.addWebhook(e),l()}})]}),n&&!e&&!t?(0,C.jsx)(d,{label:`Loading webhooks…`}):h.length===0?(0,C.jsx)(_,{icon:(0,C.jsx)(o,{}),title:`No webhooks`,hint:`Add one above to receive job-event callbacks.`}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,C.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`URL`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Events`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,C.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Success / Fail`}),(0,C.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last`}),(0,C.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Enabled`}),(0,C.jsx)(`th`,{className:`w-12 px-5 py-3`})]})}),(0,C.jsx)(`tbody`,{children:h.slice(E*15,E*15+15).map(e=>(0,C.jsxs)(`tr`,{className:`border-b border-line last:border-0 align-top hover:bg-surface-2/40`,children:[(0,C.jsx)(`td`,{className:`max-w-xs truncate px-5 py-3 font-mono text-xs text-fg`,children:e.url}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-xs text-muted`,children:e.events.join(`, `)}),(0,C.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queue??`all`}),(0,C.jsxs)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:[(0,C.jsx)(`span`,{className:`text-success`,children:f(e.successCount)}),` / `,(0,C.jsx)(`span`,{className:e.failureCount?`text-danger`:``,children:f(e.failureCount)})]}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:m(e.lastTriggered)}),(0,C.jsx)(`td`,{className:`px-5 py-3`,children:(0,C.jsx)(y,{checked:e.enabled,label:`${e.enabled?`Disable`:`Enable`} webhook`,onChange:t=>k(()=>u.setWebhookEnabled(e.id,t))})}),(0,C.jsx)(`td`,{className:`px-5 py-3 text-right`,children:(0,C.jsx)(c,{"aria-label":`Remove webhook`,onClick:()=>window.confirm(`Remove webhook for ${e.url}?`)&&k(()=>u.removeWebhook(e.id)),children:(0,C.jsx)(i,{className:`size-3.5`})})})]},e.id))})]})}),(0,C.jsx)(x,{page:E,pageSize:15,total:h.length,onPageChange:b,label:`webhooks`})]})]})}function T({onAdd:e}){let[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)([`job.completed`,`job.failed`]),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=e=>c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),g=async()=>{if(!f){if(d(null),!t.trim()||s.length===0){d(`URL and at least one event are required`);return}p(!0);try{await e({url:t,events:s,queue:r.trim()||void 0,secret:a.trim()||void 0}),n(``),o(``)}catch(e){d(e.message)}finally{p(!1)}}};return(0,C.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),g()},children:[(0,C.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-3`,children:[(0,C.jsx)(`div`,{className:`md:col-span-1`,children:(0,C.jsx)(b,{label:`URL`,children:(0,C.jsx)(v,{value:t,onChange:e=>n(e.target.value),placeholder:`https://example.com/hook`})})}),(0,C.jsx)(b,{label:`Queue (optional)`,children:(0,C.jsx)(v,{value:r,onChange:e=>i(e.target.value),placeholder:`all queues`})}),(0,C.jsx)(b,{label:`Secret (optional)`,children:(0,C.jsx)(v,{type:`password`,autoComplete:`new-password`,value:a,onChange:e=>o(e.target.value),placeholder:`HMAC signing secret`})})]}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.map(e=>(0,C.jsx)(`button`,{type:`button`,"aria-pressed":s.includes(e),onClick:()=>m(e),className:s.includes(e)?`rounded-full bg-accent/15 px-3 py-1 text-xs font-medium text-accent`:`rounded-full border border-line px-3 py-1 text-xs font-medium text-muted hover:text-fg`,children:e},e))}),(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(h,{type:`submit`,variant:`accent`,size:`sm`,disabled:f,children:f?`Adding…`:`Add webhook`}),u&&(0,C.jsx)(`span`,{className:`text-xs text-danger`,children:u})]})]})}export{w as Webhooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{O as r,b as i,c as a,h as o,k as s,m as c,q as l,u,x as d,y as f}from"./index-BFjeS9FG.js";import{t as p}from"./Pagination-Bj1z6OlD.js";var m=e(t(),1),h=n(),g=20,_={workers:{total:0,active:0,list:[],truncated:!1}};function v(){let{data:e,error:t,loading:n,refetch:v}=r(()=>s.overview(),[]),[y,b]=(0,m.useState)(0);if(n&&!e&&!t)return(0,h.jsx)(i,{label:`Loading workers…`});let{workers:x}=e??_,S=Math.max(1,Math.ceil(x.list.length/g)),C=Math.min(y,S-1),w=x.list.slice(C*g,C*g+g);return(0,h.jsxs)(`div`,{children:[t&&(0,h.jsx)(d,{onRetry:v}),(0,h.jsx)(o,{title:`Workers`,description:`Registered workers and their throughput.`,live:!0}),(0,h.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,h.jsx)(c,{label:`Total`,value:a(x.total),compact:!0}),(0,h.jsx)(c,{label:`Active`,value:a(x.active),tone:`green`,compact:!0})]}),x.list.length===0?(0,h.jsx)(f,{icon:(0,h.jsx)(l,{}),title:`No workers registered`,hint:`Workers appear here once they connect and register with the server.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,h.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,h.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last Seen`})]})}),(0,h.jsx)(`tbody`,{children:w.map(e=>(0,h.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,h.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,h.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,h.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,h.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:a(e.activeJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:a(e.processedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:a(e.failedJobs)}),(0,h.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:u(e.lastSeen)})]},e.id))})]})}),x.truncated&&(0,h.jsxs)(`p`,{className:`mt-3 text-xs text-amber-400`,children:[`Showing first `,a(x.list.length),` of `,a(x.total),` `,`workers.`]}),(0,h.jsx)(p,{page:C,pageSize:g,total:x.list.length,onPageChange:b,label:`workers`})]})}export{v as Workers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{
|
|
1
|
+
import{r as e,t}from"./cn-CMFYpumL.js";import{m as n,t as r}from"./react-vendor-CHIHtdAC.js";import{K as i,O as a,T as o,Z as s,b as c,c as l,h as u,m as d,q as f,u as p,x as m,y as h}from"./index-BFjeS9FG.js";var g=e(n(),1),_=r(),v=100;function y(){let{data:e,error:n,loading:r,refetch:y}=a(async()=>(await s.workers()).data?.workers??[],[]),[b,x]=(0,g.useState)(new Set),[S,C]=(0,g.useState)(null);if(r&&!e&&!n)return(0,_.jsx)(c,{label:`Loading workers…`});let w=e??[],T=w.slice(0,v),E=w.filter(e=>e.status===`active`).length,D=w.length-E,O=w.reduce((e,t)=>e+(t.activeJobs??0),0),k=async e=>{if(window.confirm(`Unregister worker "${e.id}"? It can re-register on its next heartbeat.`)){x(t=>new Set(t).add(e.id)),C(null);try{await s.unregisterWorker(e.id),C({ok:!0,text:`Unregistered ${e.id} ✓`})}catch(e){C({ok:!1,text:`Unregister failed: ${e.message}`})}finally{x(t=>{let n=new Set(t);return n.delete(e.id),n}),y()}}};return(0,_.jsxs)(`div`,{children:[(0,_.jsx)(u,{title:`Workers`,description:`Registered workers and their throughput.`,live:!n}),n&&(0,_.jsx)(m,{onRetry:y}),(0,_.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-4`,children:[(0,_.jsx)(d,{label:`Total`,value:l(w.length),compact:!0}),(0,_.jsx)(d,{label:`Active`,value:l(E),tone:`green`,compact:!0}),(0,_.jsx)(d,{label:`Stale`,value:l(D),tone:D?`amber`:`default`,compact:!0}),(0,_.jsx)(d,{label:`Active Jobs`,value:l(O),tone:`blue`,compact:!0})]}),S&&(0,_.jsx)(`div`,{className:t(`mb-3 text-sm`,S.ok?`text-success`:`text-danger`),children:S.text}),w.length===0?(0,_.jsx)(h,{icon:(0,_.jsx)(f,{}),title:`No workers registered`,hint:`Workers appear here once they connect and register with the server.`}):(0,_.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,_.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,_.jsx)(`thead`,{children:(0,_.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,_.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Failed`}),(0,_.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Last Seen`}),(0,_.jsx)(`th`,{className:`w-16 px-5 py-3 text-right font-medium`,children:`Actions`})]})}),(0,_.jsx)(`tbody`,{children:T.map(e=>(0,_.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,_.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,_.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,_.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,_.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsx)(`span`,{className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,e.status===`active`?`bg-emerald-500/10 text-success`:`bg-amber-500/10 text-warning`),children:e.status})}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:l(e.activeJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.processedJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.failedJobs)}),(0,_.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.lastSeen)}),(0,_.jsx)(`td`,{className:`px-5 py-3`,children:(0,_.jsx)(`div`,{className:`flex justify-end`,children:(0,_.jsx)(o,{"aria-label":`Unregister worker ${e.id}`,disabled:b.has(e.id),onClick:()=>k(e),children:(0,_.jsx)(i,{className:`size-3.5`})})})})]},e.id))})]})}),w.length>v&&(0,_.jsxs)(`p`,{className:`mt-3 text-xs text-warning`,children:[`Showing first `,l(v),` of `,l(w.length),` workers.`]})]})}export{y as WorkersPro};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./cn-CMFYpumL.js";import{m as t}from"./react-vendor-CHIHtdAC.js";var n=e(t(),1),r=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},i=(e=>e?r(e):r),a=e=>e;function o(e,t=a){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r}var s=e=>{let t=i(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s);function l(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var u=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return u(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return u(t)(e)}}}},d=(e,t)=>(n,r,i)=>{let a={storage:l(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,d=new Set,f=a.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let p=()=>{let e=a.partialize({...r()});return f.setItem(a.name,{state:e,version:a.version})},m=i.setState;i.setState=(e,t)=>(m(e,t),p());let h=e((...e)=>(n(...e),p()),r,i);i.getInitialState=()=>h;let g,_=()=>{if(!f)return;let e=++s;o=!1,c.forEach(e=>e(r()??h));let t=a.onRehydrateStorage?.call(a,r()??h)||void 0;return u(f.getItem.bind(f))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(g=a.merge(o,r()??h),n(g,!0),i)return p()}).then(()=>{e===s&&(t?.(r(),void 0),g=r(),o=!0,d.forEach(e=>e(g)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(f=e.storage)},clearStorage:()=>{f?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>_(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},a.skipHydration||_(),g||h};function f(e){return{baseUrl:e.baseUrl,refreshMs:e.refreshMs}}var p=c()(d(e=>({baseUrl:`/api`,token:``,refreshMs:3e3,setBaseUrl:t=>e({baseUrl:t.replace(/\/$/,``)}),setToken:t=>e({token:t}),setRefreshMs:t=>e({refreshMs:Math.max(500,t)})}),{name:`bq-dash-connection`,version:1,partialize:f,migrate:e=>f(e)}));function m(){return p.getState().baseUrl||`/api`}function h(){let{token:e}=p.getState();return e?{Authorization:`Bearer ${e}`}:{}}export{
|
|
1
|
+
import{r as e}from"./cn-CMFYpumL.js";import{m as t}from"./react-vendor-CHIHtdAC.js";var n=e(t(),1),r=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},i=(e=>e?r(e):r),a=e=>e;function o(e,t=a){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r}var s=e=>{let t=i(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s);function l(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var u=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return u(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return u(t)(e)}}}},d=(e,t)=>(n,r,i)=>{let a={storage:l(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,d=new Set,f=a.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let p=()=>{let e=a.partialize({...r()});return f.setItem(a.name,{state:e,version:a.version})},m=i.setState;i.setState=(e,t)=>(m(e,t),p());let h=e((...e)=>(n(...e),p()),r,i);i.getInitialState=()=>h;let g,_=()=>{if(!f)return;let e=++s;o=!1,c.forEach(e=>e(r()??h));let t=a.onRehydrateStorage?.call(a,r()??h)||void 0;return u(f.getItem.bind(f))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(g=a.merge(o,r()??h),n(g,!0),i)return p()}).then(()=>{e===s&&(t?.(r(),void 0),g=r(),o=!0,d.forEach(e=>e(g)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(f=e.storage)},clearStorage:()=>{f?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>_(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},a.skipHydration||_(),g||h};function f(e){return{baseUrl:e.baseUrl,refreshMs:e.refreshMs}}var p=c()(d(e=>({baseUrl:`/api`,token:``,agentToken:``,refreshMs:3e3,setBaseUrl:t=>e({baseUrl:t.replace(/\/$/,``)}),setToken:t=>e({token:t}),setAgentToken:t=>e({agentToken:t}),setRefreshMs:t=>e({refreshMs:Math.max(500,t)})}),{name:`bq-dash-connection`,version:1,partialize:f,migrate:e=>f(e)}));function m(){return p.getState().baseUrl||`/api`}function h(){let{token:e}=p.getState();return e?{Authorization:`Bearer ${e}`}:{}}function g(){let{agentToken:e}=p.getState();return e?{Authorization:`Bearer ${e}`}:{}}export{d as a,p as i,h as n,c as o,m as r,g as t};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CopilotPanel-C9ojQ_8d.js","assets/cn-CMFYpumL.js","assets/react-vendor-CHIHtdAC.js","assets/form-PtDLk33Z.js","assets/AddJob-vk3jh1Zk.js","assets/Benchmark-CpViF2ZC.js","assets/AreaChart-DzUXW8u3.js","assets/CopyButton-BC6QECSJ.js","assets/CronManager-CeNUeoOc.js","assets/Pagination-Bj1z6OlD.js","assets/Database--bK9pYZF.js","assets/Diagnostics-CGJPsWZQ.js","assets/DlqControl-BLKVzYQC.js","assets/DlqPro-D8SmIQUs.js","assets/Flows-BOogljnP.js","assets/JobInspector-Cp4ZuQGI.js","assets/jobActions-CuOdMglt.js","assets/JobsPro-D0uclU0B.js","assets/LogsPro-DSiV8Ajj.js","assets/McpServer-CNt7kssG.js","assets/MetricsPro-CBiFDVne.js","assets/QueueControl-Bl4l9dT6.js","assets/QueuesOverview-BBjcyzz2.js","assets/S3BackupPro-Dsq0erDm.js","assets/connectionStore-CCopJeU7.js","assets/ServerControl-Bhr9FEXF.js","assets/UsagePro-D0k-82eG.js","assets/Webhooks-DChTcBSv.js","assets/WorkersPro-B6I9Ilbq.js","assets/Cron-Bbf7mRaK.js","assets/Dlq-Bs1pupY2.js","assets/Jobs-C2HYkZXi.js","assets/Logs-yn92V_T8.js","assets/Metrics-CbscCpvx.js","assets/Overview-BOuOPWsb.js","assets/QueueDetail-BSUH0Nl6.js","assets/Queues-BEQlaWVc.js","assets/S3Backup-BmRt-Z8V.js","assets/Settings-46jsrfhd.js","assets/Usage-BFLZC7pV.js","assets/Workers-DBXrLvfS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,t}from"./cn-CMFYpumL.js";import{a as n,c as r,f as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p}from"./react-vendor-CHIHtdAC.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./connectionStore-CCopJeU7.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var b=e(s(),1),x=u(),S=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`BqError`}};async function ee(e,t,n,r,i=!0,a=`server`){let o=await fetch(e+t,{...r,headers:{"Content-Type":`application/json`,...n,...r?.headers}});if(!o.ok){let e=`HTTP ${o.status}`;try{let t=await o.json();t?.error&&(e=t.error)}catch{}throw o.status===401&&typeof window<`u`&&window.dispatchEvent(new CustomEvent(`auth:required`,{detail:{scope:a}})),new S(e,o.status)}if(o.status===204)return;let s=await o.text();if(!s)return;let c;try{c=JSON.parse(s)}catch{throw new S(`Invalid JSON response (HTTP ${o.status})`,o.status)}if(i&&c&&typeof c==`object`&&c.ok===!1){let e=c.error;throw new S(e??`Operation failed`,o.status)}return c}var C=(e,t,n=!0)=>ee(v(),e,g(),t,n),te=(globalThis.__BUNQUEUE_AGENT_URL__||`http://localhost:6800`).replace(/\/$/,``),w=(e,t)=>ee(te,e,y(),t,!0,`agent`),T=e=>encodeURIComponent(e),E=(e,t)=>({method:e,body:t===void 0?void 0:JSON.stringify(t)}),ne=[`job.pushed`,`job.started`,`job.completed`,`job.failed`,`job.progress`],D={overview:()=>C(`/dashboard`),queues:(e=500,t=0)=>C(`/dashboard/queues?limit=${e}&offset=${t}`),queuesSummary:()=>C(`/queues/summary`),queueDetail:(e,t=!0)=>C(`/dashboard/queues/${T(e)}?includeJobs=${t}`),stats:()=>C(`/stats`),storage:()=>C(`/storage`),health:()=>C(`/health`,void 0,!1),ping:()=>C(`/ping`),jobsList:(e,t,n=50,r=0)=>{let i=new URLSearchParams;return t?.length&&i.set(`states`,t.join(`,`)),i.set(`limit`,String(n)),i.set(`offset`,String(r)),C(`/queues/${T(e)}/jobs/list?${i}`)},job:e=>C(`/jobs/${T(e)}`),jobByCustomId:e=>C(`/jobs/custom/${T(e)}`),jobResult:e=>C(`/jobs/${T(e)}/result`),jobLogs:e=>C(`/jobs/${T(e)}/logs`),jobChildren:e=>C(`/jobs/${T(e)}/children`),addJob:(e,t)=>C(`/queues/${T(e)}/jobs`,E(`POST`,t)),addJobsBulk:(e,t)=>C(`/queues/${T(e)}/jobs/bulk`,E(`POST`,{jobs:t})),pullBatch:(e,t)=>C(`/queues/${T(e)}/jobs/pull-batch`,E(`POST`,{count:t})),ackBatch:e=>C(`/jobs/ack-batch`,E(`POST`,{ids:e})),cancelJob:e=>C(`/jobs/${T(e)}`,{method:`DELETE`}),promoteJob:e=>C(`/jobs/${T(e)}/promote`,E(`POST`)),discardJob:e=>C(`/jobs/${T(e)}/discard`,E(`POST`)),retryJob:e=>C(`/jobs/${T(e)}/move-to-wait`,E(`POST`)),failJob:(e,t)=>C(`/jobs/${T(e)}/fail`,E(`POST`,{error:t})),updateJobData:(e,t)=>C(`/jobs/${T(e)}/data`,E(`PUT`,{data:t})),changePriority:(e,t)=>C(`/jobs/${T(e)}/priority`,E(`PUT`,{priority:t})),changeDelay:(e,t)=>C(`/jobs/${T(e)}/delay`,E(`PUT`,{delay:t})),moveToDelayed:(e,t)=>C(`/jobs/${T(e)}/move-to-delayed`,E(`POST`,{delay:t})),addJobLog:(e,t,n)=>C(`/jobs/${T(e)}/logs`,E(`POST`,{message:t,level:n})),clearJobLogs:e=>C(`/jobs/${T(e)}/logs`,{method:`DELETE`}),counts:e=>C(`/queues/${T(e)}/counts`),pause:e=>C(`/queues/${T(e)}/pause`,E(`POST`)),resume:e=>C(`/queues/${T(e)}/resume`,E(`POST`)),drain:e=>C(`/queues/${T(e)}/drain`,E(`POST`)),obliterate:e=>C(`/queues/${T(e)}/obliterate`,E(`POST`)),clean:(e,t={})=>C(`/queues/${T(e)}/clean`,E(`POST`,t)),promoteJobs:(e,t)=>C(`/queues/${T(e)}/promote-jobs`,E(`POST`,t==null?void 0:{count:t})),retryCompleted:(e,t)=>C(`/queues/${T(e)}/retry-completed`,E(`POST`,t?{id:t}:void 0)),setRateLimit:(e,t)=>C(`/queues/${T(e)}/rate-limit`,E(`PUT`,{limit:t})),clearRateLimit:e=>C(`/queues/${T(e)}/rate-limit`,{method:`DELETE`}),setConcurrency:(e,t)=>C(`/queues/${T(e)}/concurrency`,E(`PUT`,{concurrency:t})),clearConcurrency:e=>C(`/queues/${T(e)}/concurrency`,{method:`DELETE`}),getStallConfig:e=>C(`/queues/${T(e)}/stall-config`),setStallConfig:(e,t)=>C(`/queues/${T(e)}/stall-config`,E(`PUT`,{config:t})),getDlqConfig:e=>C(`/queues/${T(e)}/dlq-config`),setDlqConfig:(e,t)=>C(`/queues/${T(e)}/dlq-config`,E(`PUT`,{config:t})),dlq:(e,t=100,n=0)=>C(`/queues/${T(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>C(`/queues/${T(e)}/dlq/stats`),retryDlq:(e,t)=>C(`/queues/${T(e)}/dlq/retry`,E(`POST`,t?{jobId:t}:void 0)),purgeDlq:e=>C(`/queues/${T(e)}/dlq/purge`,E(`POST`)),crons:()=>C(`/crons`),createCron:e=>C(`/crons`,E(`POST`,e)),deleteCron:e=>C(`/crons/${T(e)}`,{method:`DELETE`}),webhooks:()=>C(`/webhooks`),addWebhook:e=>C(`/webhooks`,E(`POST`,e)),removeWebhook:e=>C(`/webhooks/${T(e)}`,{method:`DELETE`}),setWebhookEnabled:(e,t)=>C(`/webhooks/${T(e)}/enabled`,E(`PUT`,{enabled:t})),workers:()=>C(`/workers`),unregisterWorker:e=>C(`/workers/${T(e)}`,{method:`DELETE`}),eventsUrl:e=>v()+(e?`/events/queues/${T(e)}`:`/events`),db:{info:()=>w(`/db/info`),tables:()=>w(`/db/tables`),schema:e=>w(`/db/tables/${T(e)}/schema`),rows:(e,t=50,n=0,r,i=`asc`,a)=>w(`/db/tables/${T(e)}?limit=${t}&offset=${n}`+(r?`&orderBy=${T(r)}&dir=${i}`:``)+(a?.value?`&fcol=${T(a.column)}&fop=${a.op}&fval=${T(a.value)}`:``)),cell:(e,t,n)=>w(`/db/tables/${T(e)}/cell?rowid=${t}&column=${T(n)}`),query:e=>w(`/db/query`,E(`POST`,{sql:e}))},agentBase:te,control:{status:()=>w(`/control/status`),start:()=>w(`/control/start`,{method:`POST`}),stop:()=>w(`/control/stop`,{method:`POST`}),restart:()=>w(`/control/restart`,{method:`POST`}),logs:()=>w(`/control/logs`),getConfig:()=>w(`/control/config`),setConfig:e=>w(`/control/config`,E(`PUT`,e))}},O=p();function re(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(`server`),[i,a]=(0,b.useState)(``),o=h(e=>e.baseUrl),s=h(e=>e.setToken),c=h(e=>e.setAgentToken),l=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=e=>{let n=e.detail?.scope;r(n===`agent`?`agent`:`server`),t(!0)};return window.addEventListener(`auth:required`,e),()=>window.removeEventListener(`auth:required`,e)},[]),(0,b.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>l.current?.focus());return()=>cancelAnimationFrame(t)},[e]),e?(0,O.jsx)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center bg-black/60 p-4`,children:(0,O.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let r=i.trim();r&&(n===`agent`?c(r):s(r),a(``),t(!1))},role:`dialog`,"aria-modal":`true`,"aria-label":`Authentication required`,className:`w-full max-w-sm rounded-xl border border-line-strong bg-surface p-6 shadow-2xl`,children:[(0,O.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:`Authentication required`}),n===`agent`?(0,O.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`The control agent at `,(0,O.jsx)(`span`,{className:`break-all font-mono text-fg`,children:D.agentBase}),` `,`rejected the request (401). Enter its`,` `,(0,O.jsx)(`span`,{className:`font-mono text-fg`,children:`AGENT_TOKEN`}),` to continue.`]}):(0,O.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`The server at `,(0,O.jsx)(`span`,{className:`break-all font-mono text-fg`,children:o}),` rejected the request (401). Enter its bearer token to continue.`]}),(0,O.jsx)(`input`,{ref:l,type:`password`,value:i,onChange:e=>a(e.target.value),placeholder:n===`agent`?`AGENT_TOKEN`:`Bearer token`,"aria-label":n===`agent`?`Agent token`:`Bearer token`,autoComplete:`off`,className:`mt-4 w-full rounded-lg border border-line bg-surface-2 px-3 py-2 text-sm text-fg outline-none placeholder:text-faint focus-visible:ring-2 focus-visible:ring-accent/50`}),(0,O.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,O.jsx)(d,{to:`/settings`,onClick:()=>t(!1),className:`text-xs text-muted underline-offset-2 hover:text-fg hover:underline`,children:`Open Settings instead`}),(0,O.jsx)(`button`,{type:`submit`,disabled:!i.trim(),className:`rounded-lg bg-accent px-4 py-2 text-sm font-medium text-accent-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 disabled:opacity-50`,children:`Unlock`})]})]})}):null}function k(e){typeof document<`u`&&(document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e)}var A=_()(m((e,t)=>({theme:`dark`,toggle:()=>{let n=t().theme===`dark`?`light`:`dark`;k(n),e({theme:n})},setTheme:t=>{k(t),e({theme:t})}}),{name:`bq-dash-theme`,onRehydrateStorage:()=>e=>{e&&k(e.theme)}}));function ie(){k(A.getState().theme)}function j({children:e,...t}){return(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...t,children:e})}var ae=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`path`,{d:`M3 3v18h18`}),(0,O.jsx)(`rect`,{x:`7`,y:`12`,width:`3`,height:`6`}),(0,O.jsx)(`rect`,{x:`12`,y:`8`,width:`3`,height:`10`}),(0,O.jsx)(`rect`,{x:`17`,y:`5`,width:`3`,height:`13`})]}),M=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,O.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,O.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,O.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`}),(0,O.jsx)(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`}),(0,O.jsx)(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`})]}),oe=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`rect`,{x:`2`,y:`7`,width:`20`,height:`14`,rx:`2`}),(0,O.jsx)(`path`,{d:`M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`})]}),N=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`path`,{d:`M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z`}),(0,O.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,O.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),se=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,O.jsx)(`polyline`,{points:`12 7 12 12 15 14`})]}),ce=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`path`,{d:`M3 3v18h18`}),(0,O.jsx)(`path`,{d:`m19 9-5 5-4-4-3 3`})]}),P=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`8`,rx:`2`}),(0,O.jsx)(`rect`,{x:`4`,y:`14`,width:`16`,height:`6`,rx:`2`}),(0,O.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8.01`,y2:`8`}),(0,O.jsx)(`line`,{x1:`8`,y1:`17`,x2:`8.01`,y2:`17`})]}),le=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,O.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,O.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,O.jsx)(`path`,{d:`M3 6h.01M3 12h.01M3 18h.01`})]}),ue=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`path`,{d:`M12 20V10`}),(0,O.jsx)(`path`,{d:`M18 20V4`}),(0,O.jsx)(`path`,{d:`M6 20v-4`})]}),de=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,O.jsx)(`path`,{d:`M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5`}),(0,O.jsx)(`path`,{d:`M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6`})]}),fe=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,O.jsx)(`path`,{d:`M3 10h18`}),(0,O.jsx)(`path`,{d:`M9 10v10`})]}),pe=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,O.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z`})]}),me=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,O.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41`})]}),he=e=>(0,O.jsx)(j,{...e,children:(0,O.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`})}),ge=e=>(0,O.jsx)(j,{...e,children:(0,O.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),_e=e=>(0,O.jsx)(j,{...e,children:(0,O.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})}),ve=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,O.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}),ye=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,O.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}),be=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,O.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,O.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]}),xe=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,O.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),Se=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z`}),(0,O.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),F=e=>(0,O.jsx)(j,{...e,children:(0,O.jsx)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})}),Ce=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,O.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]}),we=e=>(0,O.jsx)(j,{...e,children:(0,O.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),I=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,O.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]}),Te=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),(0,O.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),Ee=e=>(0,O.jsxs)(j,{...e,children:[(0,O.jsx)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,O.jsx)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,O.jsx)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})]}),De=class extends Error{status;constructor(e,t){super(e),this.status=t,this.name=`ApiError`}};async function L(e,t,n=!0){let r=await fetch(v()+e,{...t,headers:{"Content-Type":`application/json`,...g(),...t?.headers}});if(!r.ok){let e=`HTTP ${r.status}`;try{let t=await r.json();t?.error&&(e=t.error)}catch{}throw new De(e,r.status)}if(r.status===204)return;let i=await r.json();if(n&&i&&typeof i==`object`&&i.ok===!1){let e=i.error;throw new De(e??`Operation failed`,r.status)}return i}var R=e=>encodeURIComponent(e),z=(e,t)=>L(e,{method:`POST`,body:t?JSON.stringify(t):void 0}),Oe=(e,t)=>L(e,{method:`PUT`,body:t?JSON.stringify(t):void 0}),B=e=>L(e,{method:`DELETE`}),V={overview:()=>L(`/dashboard`),queues:(e=200,t=0)=>L(`/dashboard/queues?limit=${e}&offset=${t}`),queueDetail:(e,t=!0)=>L(`/dashboard/queues/${R(e)}?includeJobs=${t}`),stats:()=>L(`/stats`),storage:()=>L(`/storage`,void 0,!1),health:()=>L(`/health`,void 0,!1),jobsList:(e,t={})=>{let n=new URLSearchParams;return t.states?.length&&n.set(`states`,t.states.join(`,`)),n.set(`limit`,String(t.limit??50)),n.set(`offset`,String(t.offset??0)),L(`/queues/${R(e)}/jobs/list?${n.toString()}`)},job:e=>L(`/jobs/${R(e)}`),cancelJob:e=>B(`/jobs/${R(e)}`),promoteJob:e=>z(`/jobs/${R(e)}/promote`),retryJob:e=>z(`/jobs/${R(e)}/move-to-wait`),pause:e=>z(`/queues/${R(e)}/pause`),resume:e=>z(`/queues/${R(e)}/resume`),drain:e=>z(`/queues/${R(e)}/drain`),obliterate:e=>z(`/queues/${R(e)}/obliterate`),clean:(e,t=0,n=1e3)=>z(`/queues/${R(e)}/clean`,{grace:t,limit:n}),retryCompleted:e=>z(`/queues/${R(e)}/retry-completed`),setRateLimit:(e,t)=>Oe(`/queues/${R(e)}/rate-limit`,{limit:t}),clearRateLimit:e=>B(`/queues/${R(e)}/rate-limit`),setConcurrency:(e,t)=>Oe(`/queues/${R(e)}/concurrency`,{concurrency:t}),clearConcurrency:e=>B(`/queues/${R(e)}/concurrency`),dlq:(e,t=50,n=0)=>L(`/queues/${R(e)}/dlq?limit=${t}&offset=${n}`),dlqStats:e=>L(`/queues/${R(e)}/dlq/stats`),retryDlq:e=>z(`/queues/${R(e)}/dlq/retry`),purgeDlq:e=>z(`/queues/${R(e)}/dlq/purge`),crons:()=>L(`/crons`),deleteCron:e=>B(`/crons/${R(e)}`),workers:()=>L(`/workers`),eventsUrl:e=>v()+(e?`/events/queues/${R(e)}`:`/events`)};function ke(e){let t=!0;return()=>t?(t=!1,!0):!e()}function H(e,t=[],n={}){let r=h(e=>e.refreshMs),i=n.intervalMs??r,[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)(null),[l,u]=(0,b.useState)(!0),d=(0,b.useRef)(e);d.current=e;let f=(0,b.useRef)(!0),p=(0,b.useRef)(0),m=(0,b.useRef)(void 0),g=(0,b.useRef)(!0),_=(0,b.useRef)(!1),v=(0,b.useCallback)(async()=>{let e=++p.current;try{let t=await d.current();if(!f.current||e!==p.current)return;let n;try{n=JSON.stringify(t)}catch{n=String(Math.random())}n!==m.current&&(m.current=n,o(t)),_.current&&(_.current=!1,c(null))}catch(t){if(!f.current||e!==p.current)return;_.current=!0,c(t)}finally{f.current&&e===p.current&&g.current&&(g.current=!1,u(!1))}},[]);return(0,b.useEffect)(()=>{f.current=!0,m.current=void 0,g.current=!0,u(!0),_.current&&(_.current=!1,c(null));let e=null,t=!1,n=()=>typeof document<`u`&&document.hidden,r=ke(n),a=async()=>{t||(r()&&await v(),!t&&(e=setTimeout(a,i)))};a();let o=()=>{!n()&&!t&&v()};return typeof document<`u`&&document.addEventListener(`visibilitychange`,o),()=>{t=!0,f.current=!1,e&&clearTimeout(e),typeof document<`u`&&document.removeEventListener(`visibilitychange`,o)}},[i,v,...t]),{data:a,error:s,loading:l,refreshing:l,refetch:v}}function Ae(){let e=h(e=>e.baseUrl),t=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``);return(0,O.jsxs)(`div`,{className:`mx-3 mb-3 flex items-center gap-2.5 rounded-lg border border-line bg-surface px-3 py-2`,children:[(0,O.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-[11px] font-bold text-white`,children:`bq`}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`div`,{className:`truncate text-xs font-medium text-fg`,children:`bunqueue`}),(0,O.jsx)(`div`,{className:`truncate font-mono text-[10px] text-faint`,title:e,children:t})]}),(0,O.jsx)(d,{to:`/settings`,"aria-label":`Settings`,className:`text-faint transition-colors hover:text-fg`,children:(0,O.jsx)(pe,{className:`size-4`})})]})}var je=[{section:null,items:[{to:`/`,label:`Overview`,icon:ae,end:!0}]},{section:`Queues`,items:[{to:`/queues`,label:`Queues`,icon:M},{to:`/jobs`,label:`Jobs`,icon:oe},{to:`/dlq`,label:`Dead Letter Queue`,icon:N},{to:`/cron`,label:`Cron Jobs`,icon:se},{to:`/flows`,label:`Flows`,icon:I}]},{section:`Monitoring`,items:[{to:`/metrics`,label:`Metrics`,icon:ce},{to:`/workers`,label:`Workers`,icon:P},{to:`/logs`,label:`Logs`,icon:le}]},{section:`Control`,items:[{to:`/server`,label:`Server`,icon:P},{to:`/add-job`,label:`Add Job`,icon:oe},{to:`/job`,label:`Job Inspector`,icon:Se},{to:`/queue-control`,label:`Queue Control`,icon:M},{to:`/dlq-control`,label:`DLQ Control`,icon:N},{to:`/webhooks`,label:`Webhooks`,icon:F},{to:`/diagnostics`,label:`Diagnostics`,icon:ce},{to:`/benchmark`,label:`Benchmark`,icon:F}]},{section:`Management`,items:[{to:`/database`,label:`Database`,icon:fe},{to:`/mcp`,label:`MCP`,icon:F},{to:`/usage`,label:`Usage`,icon:ue},{to:`/s3`,label:`S3 Backup`,icon:de},{to:`/settings`,label:`Settings`,icon:pe}]}];function Me(){let e=h(e=>e.baseUrl),{data:n,error:r,loading:i}=H(async()=>({ok:(await V.health()).ok}),[],{intervalMs:15e3}),a=!r&&n!=null&&n.ok!==!1,o=e.replace(/^https?:\/\//,``)||`local`;return(0,O.jsxs)(`div`,{className:`mx-3 mb-4 flex items-center gap-2 rounded-lg border border-line bg-surface px-3 py-1.5`,children:[(0,O.jsx)(`span`,{className:t(`size-1.5 rounded-full`,i?`bg-zinc-500`:a?`bg-emerald-400`:`bg-red-400`),title:i?`connecting`:a?`connected`:`offline`}),(0,O.jsx)(`span`,{className:`truncate font-mono text-[11px] text-muted`,title:e,children:o}),(0,O.jsx)(`span`,{className:`sr-only`,children:i?`connecting`:a?`connected`:`offline`})]})}function Ne(){let e=A(e=>e.theme),t=A(e=>e.toggle),n=e===`dark`;return(0,O.jsxs)(`button`,{type:`button`,onClick:t,className:`mx-3 mb-3 flex items-center gap-3 rounded-lg px-3 py-2 text-sm text-muted transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:[n?(0,O.jsx)(me,{className:`size-4`}):(0,O.jsx)(he,{className:`size-4`}),n?`Light Mode`:`Dark Mode`]})}function Pe({open:e=!1,onClose:n}){return(0,O.jsxs)(O.Fragment,{children:[e&&(0,O.jsx)(`button`,{type:`button`,"aria-label":`Close navigation`,onClick:n,className:`fixed inset-0 z-40 bg-black/50 lg:hidden`}),(0,O.jsxs)(`aside`,{className:t(`flex w-60 shrink-0 flex-col border-r border-line bg-sidebar`,`fixed inset-y-0 left-0 z-50 transition-[transform,visibility] lg:static lg:z-auto lg:translate-x-0`,e?`translate-x-0`:`-translate-x-full lg:translate-x-0 invisible lg:visible`),children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 px-5 py-5`,children:[(0,O.jsx)(`span`,{className:`text-lg font-bold tracking-tight text-fg`,children:`bunqueue`}),(0,O.jsx)(`span`,{className:`rounded-md bg-accent/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-accent`,children:`dash`}),(0,O.jsx)(`span`,{title:`Beta — under active development`,className:`rounded-md bg-amber-500/15 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-warning`,children:`beta`})]}),(0,O.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-3 pb-4`,children:je.map(e=>(0,O.jsxs)(`div`,{className:`mb-4`,children:[e.section&&(0,O.jsx)(`div`,{className:`px-2 pb-2 pt-1 text-[10px] font-semibold uppercase tracking-wider text-faint`,children:e.section}),(0,O.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:e.items.map(({to:e,label:n,icon:r,end:i})=>(0,O.jsx)(a,{to:e,end:i,className:({isActive:e})=>t(`group relative flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,e?`bg-surface-2 text-fg`:`text-muted hover:bg-surface-2/60 hover:text-fg`),children:({isActive:e})=>(0,O.jsxs)(O.Fragment,{children:[e&&(0,O.jsx)(`span`,{className:`absolute inset-y-1.5 left-0 w-0.5 rounded-full bg-accent`}),(0,O.jsx)(r,{className:`size-[18px] shrink-0`}),(0,O.jsx)(`span`,{className:`truncate`,children:n})]})},e))})]},e.section??`root`))}),(0,O.jsx)(Me,{}),(0,O.jsx)(Ne,{}),(0,O.jsx)(Ae,{})]})]})}var Fe=`https://egeominotti.github.io/bunqueue-dashboard/docs/`;function Ie(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(0),s=o(),c=A(e=>e.toggle),l=(0,b.useRef)(null),u=(0,b.useRef)(null),d=(0,b.useMemo)(()=>{let e=je.flatMap(e=>e.items.map(t=>({id:`nav:${t.to}`,label:t.label,hint:e.section??`Home`,run:()=>s(t.to)}))),t=[{id:`act:theme`,label:`Toggle theme (dark / light)`,hint:`Action`,run:c},{id:`act:docs`,label:`Open documentation`,hint:`Action`,run:()=>window.open(Fe,`_blank`,`noopener`)}];return[...e,...t]},[s,c]),f=(0,b.useMemo)(()=>{let e=n.trim().toLowerCase();return e?d.filter(t=>`${t.label} ${t.hint}`.toLowerCase().includes(e)):d},[d,n]);(0,b.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t(e=>!e))},n=()=>t(!0);return window.addEventListener(`keydown`,e),window.addEventListener(`command-palette:open`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`command-palette:open`,n)}},[]),(0,b.useEffect)(()=>{if(!e)return;let t=document.activeElement;r(``),a(0);let n=requestAnimationFrame(()=>l.current?.focus());return()=>{cancelAnimationFrame(n),t?.focus?.()}},[e]),(0,b.useEffect)(()=>{u.current?.querySelector(`[data-idx="${i}"]`)?.scrollIntoView({block:`nearest`})},[i]);let p=(0,b.useCallback)(()=>t(!1),[]),m=(0,b.useCallback)(e=>{e&&(e.run(),t(!1))},[]);return e?(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center p-4 pt-[12vh]`,children:[(0,O.jsx)(`button`,{type:`button`,"aria-label":`Close command palette`,onClick:p,className:`fixed inset-0 bg-black/50`}),(0,O.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,className:`relative z-10 w-full max-w-lg overflow-hidden rounded-xl border border-line-strong bg-surface shadow-2xl`,children:[(0,O.jsx)(`input`,{ref:l,value:n,onChange:e=>{r(e.target.value),a(0)},onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),p()):e.key===`ArrowDown`?(e.preventDefault(),a(e=>Math.min(e+1,f.length-1))):e.key===`ArrowUp`?(e.preventDefault(),a(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),m(f[i]))},placeholder:`Search pages and actions…`,"aria-label":`Search pages and actions`,className:`w-full border-b border-line bg-transparent px-4 py-3 text-sm text-fg outline-none placeholder:text-faint`}),(0,O.jsxs)(`ul`,{ref:u,className:`max-h-80 overflow-y-auto py-2`,"aria-label":`Results`,children:[f.length===0&&(0,O.jsx)(`li`,{className:`px-4 py-6 text-center text-sm text-faint`,children:`No matches`}),f.map((e,t)=>(0,O.jsx)(`li`,{children:(0,O.jsxs)(`button`,{type:`button`,"data-idx":t,onMouseEnter:()=>a(t),onClick:()=>m(e),className:`flex w-full items-center justify-between gap-3 px-4 py-2 text-left text-sm transition-colors ${t===i?`bg-accent/15 text-fg`:`text-muted`}`,children:[(0,O.jsx)(`span`,{className:`truncate`,children:e.label}),(0,O.jsx)(`span`,{className:`shrink-0 text-xs text-faint`,children:e.hint})]})},e.id))]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-t border-line px-4 py-2 text-xs text-faint`,children:[(0,O.jsx)(`span`,{children:`↑↓ navigate · ↵ open · esc close`}),(0,O.jsx)(`span`,{className:`font-mono`,children:`⌘K`})]})]})]}):null}var U=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}`,W=new Map,G=(e,t,n)=>e.map(e=>e.id===t?n(e):e);function Le(e){return{config:{provider:e.config.provider,baseURL:e.config.baseURL,model:e.config.model}}}var K=_()(m(e=>({open:!1,config:{provider:`anthropic`,baseURL:``,model:`claude-opus-4-8`,apiKey:``},messages:[],pending:[],busy:!1,setOpen:t=>e({open:t}),toggle:()=>e(e=>({open:!e.open})),setConfig:t=>e(e=>({config:{...e.config,...t}})),clear:()=>{for(let e of W.values())e(!1);W.clear(),e({messages:[],pending:[]})},cancelPending:()=>{for(let e of W.values())e(!1);W.clear(),e({pending:[]})},setBusy:t=>e({busy:t}),addUser:t=>e(e=>({messages:[...e.messages,{id:U(),role:`user`,content:t}]})),startAssistant:()=>{let t=U();return e(e=>({messages:[...e.messages,{id:t,role:`assistant`,content:``,tools:[]}]})),t},appendAssistant:(t,n)=>e(e=>({messages:G(e.messages,t,e=>({...e,content:e.content+n}))})),finishAssistant:(t,n)=>e(e=>({messages:G(e.messages,t,e=>({...e,error:!!n?.error,content:n?.error?e.content||n.error:e.content}))})),addTool:(t,n)=>e(e=>({messages:G(e.messages,t,e=>({...e,tools:[...e.tools??[],n]}))})),updateTool:(t,n,r)=>e(e=>({messages:G(e.messages,t,e=>({...e,tools:(e.tools??[]).map(e=>e.id===n?{...e,...r}:e)}))})),requestConfirm:t=>new Promise(n=>{let r=U();W.set(r,n),e(e=>({pending:[...e.pending,{...t,id:r}]}))}),resolveConfirm:(t,n)=>{let r=W.get(t);r&&(W.delete(t),r(n)),e(e=>({pending:e.pending.filter(e=>e.id!==t)}))}}),{name:`bq-dash-copilot`,partialize:e=>Le(e),merge:(e,t)=>{let n=e??{};return{...t,config:{...t.config,...n.config??{},apiKey:``}}}})),Re=(0,b.lazy)(()=>i(()=>import(`./CopilotPanel-C9ojQ_8d.js`).then(e=>({default:e.CopilotPanel})),__vite__mapDeps([0,1,2,3])));function ze({className:e}){return(0,O.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,O.jsx)(`path`,{d:`M12 3l1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z`,fill:`currentColor`}),(0,O.jsx)(`path`,{d:`M19 14l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8.8-2z`,fill:`currentColor`,opacity:`0.7`})]})}function Be(){let e=K(e=>e.open),t=K(e=>e.setOpen);return(0,O.jsxs)(O.Fragment,{children:[!e&&(0,O.jsxs)(`button`,{type:`button`,onClick:()=>t(!0),className:`fixed bottom-5 right-5 z-40 flex items-center gap-2 rounded-full border border-line bg-surface px-4 py-2.5 text-sm font-medium text-fg shadow-lg transition-colors hover:border-accent/50 hover:text-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,"aria-label":`Open Copilot`,children:[(0,O.jsx)(ze,{className:`size-4 text-accent`}),`Copilot`,(0,O.jsx)(`span`,{className:`rounded bg-accent/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-accent`,children:`beta`})]}),e&&(0,O.jsx)(b.Suspense,{fallback:(0,O.jsx)(`div`,{className:`fixed inset-y-0 right-0 z-[60] flex w-full max-w-md items-center justify-center border-l border-line bg-surface text-sm text-muted`,children:`Loading Copilot…`}),children:(0,O.jsx)(Re,{})})]})}var q={default:`border border-line bg-surface-2 text-fg hover:bg-surface-2/70 hover:border-line-strong`,ghost:`text-muted hover:text-fg hover:bg-surface-2`,accent:`bg-accent text-accent-fg hover:opacity-90 border border-transparent`,danger:`border border-red-500/30 text-danger hover:bg-red-500/10 hover:border-red-500/50`,warning:`border border-amber-500/30 text-warning hover:bg-amber-500/10 hover:border-amber-500/50`,success:`bg-emerald-500 text-white hover:bg-emerald-500/90 border border-transparent`},Ve={sm:`h-8 px-3 text-xs gap-1.5`,md:`h-9 px-4 text-sm gap-2`};function He({children:e,variant:n=`default`,size:r=`md`,className:i,...a}){return(0,O.jsx)(`button`,{type:`button`,className:t(`inline-flex items-center justify-center rounded-lg font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,q[n],Ve[r],i),...a,children:e})}function Ue({children:e,className:n,variant:r=`ghost`,...i}){return(0,O.jsx)(`button`,{type:`button`,className:t(`inline-flex size-8 items-center justify-center rounded-lg transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:cursor-not-allowed disabled:opacity-50`,q[r],n),...i,children:e})}function J({children:e,className:n,padded:r=!0}){return(0,O.jsx)(`div`,{className:t(`rounded-xl border border-line bg-surface`,r&&`p-5`,n),children:e})}function We({title:e,action:t,icon:n}){return(0,O.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,O.jsxs)(`h3`,{className:`flex items-center gap-2 text-base font-semibold text-fg`,children:[n,e]}),t]})}function Ge({className:e}){return(0,O.jsx)(`span`,{className:t(`inline-block size-4 animate-spin rounded-full border-2 border-current border-t-transparent`,e),role:`status`,"aria-label":`Loading`})}function Ke({label:e=`Loading…`}){return(0,O.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-16 text-sm text-muted`,children:[(0,O.jsx)(Ge,{}),e]})}function qe({icon:e,title:t,hint:n,action:r}){return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-line py-14 text-center`,children:[e&&(0,O.jsx)(`div`,{className:`text-faint [&>svg]:size-8`,children:e}),(0,O.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:t}),n&&(0,O.jsx)(`div`,{className:`max-w-sm text-xs text-faint`,children:n}),r&&(0,O.jsx)(`div`,{className:`mt-2`,children:r})]})}function Je({onRetry:e,message:t=`Not connected to the bunqueue server — showing empty data.`}){return(0,O.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3 rounded-lg border border-amber-500/25 bg-amber-500/[0.06] px-4 py-2.5 text-sm`,children:[(0,O.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-amber-400`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`text-amber-300/90 light:text-amber-700`,children:t}),e&&(0,O.jsx)(`button`,{type:`button`,onClick:e,className:`ml-auto shrink-0 rounded-md border border-amber-500/30 px-2.5 py-1 text-xs font-medium text-amber-200 light:text-amber-700 hover:border-amber-400/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`Retry`})]})}function Ye({error:e,onRetry:t}){return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-red-500/20 bg-red-500/5 py-14 text-center`,children:[(0,O.jsx)(`div`,{className:`text-sm font-medium text-danger`,children:`Something went wrong`}),(0,O.jsx)(`div`,{className:`max-w-md text-xs text-faint`,children:e.message}),t&&(0,O.jsx)(`button`,{type:`button`,onClick:t,className:`mt-1 rounded-lg border border-line bg-surface-2 px-3 py-1.5 text-xs font-medium text-fg hover:border-line-strong`,children:`Retry`})]})}var Xe=class extends b.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){let{error:e}=this.state;return e?(0,O.jsx)(`div`,{className:`flex min-h-screen items-center justify-center p-6`,children:(0,O.jsxs)(J,{className:`w-full max-w-lg`,children:[(0,O.jsx)(Ye,{error:e}),(0,O.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,O.jsx)(He,{onClick:()=>window.location.reload(),children:`Reload`})})]})}):this.props.children}};function Y(){if(typeof window>`u`)return!1;let{search:e,hash:t}=window.location;return new URLSearchParams(e).has(`demo`)||t.replace(/^#/,``)===`demo`}var Ze=Y(),Qe={"/":`Overview`,"/queues":`Queues`,"/jobs":`Jobs`,"/dlq":`Dead Letter Queue`,"/cron":`Cron Jobs`,"/flows":`Flows`,"/metrics":`Metrics`,"/workers":`Workers`,"/logs":`Logs`,"/server":`Server`,"/add-job":`Add Job`,"/job":`Job Inspector`,"/queue-control":`Queue Control`,"/cron-manager":`Cron Manager`,"/dlq-control":`DLQ Control`,"/webhooks":`Webhooks`,"/diagnostics":`Diagnostics`,"/benchmark":`Benchmark`,"/database":`Database`,"/mcp":`MCP`,"/usage":`Usage`,"/s3":`S3 Backup`,"/settings":`Settings`,"/overview-classic":`Overview (classic)`,"/queues-classic":`Queues (classic)`,"/jobs-classic":`Jobs (classic)`,"/dlq-classic":`DLQ (classic)`,"/metrics-classic":`Metrics (classic)`,"/logs-classic":`Logs (classic)`,"/s3-classic":`S3 Backup (classic)`};function $e(e){if(Qe[e])return Qe[e];if(e.startsWith(`/queues/`)){let t=e.slice(8);try{t=decodeURIComponent(t)}catch{}return`${t} · Queue`}return`bunqueue`}function et({onMenu:e}){let{pathname:t}=r();return(0,O.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 items-center justify-between gap-3 border-b border-line bg-bg/80 px-4 backdrop-blur sm:px-6 lg:px-8`,children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(`button`,{type:`button`,"aria-label":`Open navigation`,onClick:e,className:`-ml-1 flex size-9 shrink-0 items-center justify-center rounded-lg text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 lg:hidden`,children:(0,O.jsx)(Ee,{className:`size-5`})}),(0,O.jsxs)(`div`,{className:`truncate text-sm text-muted`,children:[(0,O.jsx)(`span`,{className:`text-faint`,children:$e(t)}),(0,O.jsx)(`span`,{className:`mx-2 hidden text-faint sm:inline`,children:`·`}),(0,O.jsx)(`span`,{className:`hidden text-faint sm:inline`,children:`bunqueue`})]})]}),(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[Ze&&(0,O.jsxs)(`span`,{title:`Showing canned sample data. No real bunqueue server is connected.`,className:`hidden items-center gap-1.5 rounded-full border border-accent/40 bg-accent/10 px-2.5 py-1 text-xs font-medium text-accent sm:inline-flex`,children:[(0,O.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`}),`Live demo`]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>window.dispatchEvent(new Event(`command-palette:open`)),title:`Command palette (⌘K)`,"aria-label":`Open command palette`,className:`hidden items-center gap-2 rounded-lg border border-line px-2.5 py-1.5 text-xs text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 sm:flex`,children:[(0,O.jsx)(`span`,{children:`Search`}),(0,O.jsx)(`kbd`,{className:`rounded border border-line bg-surface-2 px-1 font-mono text-[10px]`,children:`⌘K`})]}),(0,O.jsx)(d,{to:`/settings`,title:`Settings`,"aria-label":`Open settings`,className:`flex size-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent to-fuchsia-600 text-xs font-bold text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,children:`bq`})]})]})}function tt(){let[e,t]=(0,b.useState)(!1),{pathname:i,key:a}=r();return(0,b.useEffect)(()=>t(!1),[i]),(0,b.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t(!1)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e]),(0,O.jsx)(Xe,{children:(0,O.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-bg text-fg`,children:[(0,O.jsx)(`a`,{href:`#main`,className:`sr-only rounded-md bg-accent px-3 py-2 text-sm font-medium text-accent-fg shadow-lg focus:not-sr-only focus:absolute focus:left-4 focus:top-3 focus:z-50`,children:`Skip to content`}),(0,O.jsx)(Pe,{open:e,onClose:()=>t(!1)}),(0,O.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,O.jsx)(et,{onMenu:()=>t(!0)}),(0,O.jsx)(`main`,{id:`main`,tabIndex:-1,className:`flex-1 overflow-y-auto px-4 py-5 outline-none sm:px-6 lg:px-8 lg:py-6`,children:(0,O.jsx)(b.Suspense,{fallback:(0,O.jsx)(`div`,{className:`p-2 text-sm text-muted`,children:`Loading…`}),children:(0,O.jsx)(Xe,{resetKey:a,children:(0,O.jsx)(n,{})})})})]}),(0,O.jsx)(Ie,{}),(0,O.jsx)(re,{}),(0,O.jsx)(Be,{})]})})}var nt={completed:`text-success bg-emerald-500/10`,active:`text-blue-400 light:text-blue-700 bg-blue-500/10`,failed:`text-danger bg-red-500/10`,waiting:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,prioritized:`text-violet-400 light:text-violet-700 bg-violet-500/10`,delayed:`text-warning bg-amber-500/10`,paused:`text-orange-400 light:text-orange-700 bg-orange-500/10`,"waiting-children":`text-cyan-400 light:text-cyan-700 bg-cyan-500/10`,stalled:`text-orange-400 light:text-orange-700 bg-orange-500/10`,enqueued:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,started:`text-blue-400 light:text-blue-700 bg-blue-500/10`,finished:`text-success bg-emerald-500/10`,retry:`text-warning bg-amber-500/10`,cancelled:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`,default:`text-zinc-400 light:text-zinc-600 bg-zinc-500/10`};function rt({status:e}){return(0,O.jsxs)(`span`,{className:t(`inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium capitalize`,nt[(e||``).toLowerCase()]??nt.default),children:[(0,O.jsx)(`span`,{className:`size-1.5 rounded-full bg-current`}),e||`unknown`]})}function it({label:e,tone:n=`green`}){return(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-muted`,children:[(0,O.jsx)(`span`,{className:t(`size-1.5 rounded-full`,n===`green`?`bg-emerald-400`:n===`amber`?`bg-amber-400`:n===`red`?`bg-red-400`:`bg-zinc-400`)}),e]})}function at({title:e,description:t,live:n,actions:r,back:i}){return(0,O.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-start justify-between gap-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[i,(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight text-fg`,children:e}),n&&(0,O.jsx)(it,{label:`Live`,tone:`green`})]}),t&&(0,O.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t})]})]}),r&&(0,O.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:r})]})}var ot={default:`text-fg`,green:`text-success`,red:`text-danger`,blue:`text-blue-400 light:text-blue-700`,amber:`text-warning`,accent:`text-accent`};function X({label:e,value:n,tone:r=`default`,hint:i,compact:a}){return(0,O.jsxs)(`div`,{className:t(`rounded-xl border border-line bg-surface`,a?`px-4 py-3`:`px-5 py-4`),children:[(0,O.jsx)(`div`,{className:`text-[11px] font-medium uppercase tracking-wider text-faint`,children:e}),(0,O.jsx)(`div`,{className:t(`mt-2 font-semibold tnum`,a?`text-xl`:`text-3xl`,ot[r]),children:n}),i!=null&&(0,O.jsx)(`div`,{className:`mt-1 text-xs text-faint`,children:i})]})}var st=new Intl.NumberFormat(`de-DE`),ct=new Intl.DateTimeFormat(`it-IT`,{day:`2-digit`,month:`2-digit`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});function Z(e){return e==null||!Number.isFinite(e)?`0`:st.format(e)}function lt(e,t=2){return e==null||!Number.isFinite(e)?`0%`:`${(e*100).toFixed(t)}%`}function ut(e,t){let n=e+t;return n>0?t/n:null}function dt(e){if(e==null||!Number.isFinite(e))return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:ct.format(t)}function ft(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=Math.max(0,t-e),r=Math.floor(n/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function pt(e){if(e==null||!Number.isFinite(e)||e<0)return`—`;if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<59.95)return`${t.toFixed(1)}s`;let n=Math.round(t);return`${Math.floor(n/60)}m ${n%60}s`}function mt(e,t){if(e==null||t==null)return;let n=t-e;return n>=0?n:void 0}function ht(e){if(e==null||!Number.isFinite(e))return`—`;let t=Math.floor(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=[];return n&&a.push(`${n}d`),(r||n)&&a.push(`${r}h`),a.push(`${i}m`),a.join(` `)}function gt(e){return e==null||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function _t(e){return e==null||!Number.isFinite(e)?`—`:e>=1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(+(e<10))}ms`}var vt=/(?:\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b[@-Z\\^_])/g;function yt(e){return e.replace(vt,``)}function bt(e){if(e==null||!Number.isFinite(e))return`—`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(r===0?0:1)} ${t[r]}`}function xt(e){return!0}function St(e){let t=`message`,n,r=[];for(let i of e.split(`
|
|
3
|
+
`)){if(!i||i.startsWith(`:`))continue;let e=i.indexOf(`:`),a=e===-1?i:i.slice(0,e),o=e===-1?``:i.slice(e+1).replace(/^ /,``);a===`event`?t=o:a===`data`?r.push(o):a===`id`&&(n=o)}if(r.length===0)return null;let i=r.join(`
|
|
4
|
+
`),a=i;try{a=JSON.parse(i)}catch{}return{id:n,event:t,data:a}}async function Ct(e,t,n){let r=await fetch(e,{headers:{Accept:`text/event-stream`,...g()},signal:n});if(!r.ok||!r.body)throw Error(`SSE connect failed: HTTP ${r.status}`);let i=r.body.getReader(),a=new TextDecoder,o=``;try{for(;;){let{done:e,value:n}=await i.read();if(e)break;o+=a.decode(n,{stream:!0});let r;for(;(r=o.indexOf(`
|
|
5
|
+
|
|
6
|
+
`))!==-1||(r=o.indexOf(`\r
|
|
7
|
+
\r
|
|
8
|
+
`))!==-1;){let e=o[r]===`\r`,n=o.slice(0,r);o=o.slice(r+(e?4:2));let i=St(n.replace(/\r/g,``));i&&t(i)}}}finally{i.releaseLock()}}var Q={total:0,completed:0,failed:0,waiting:0,active:0},wt=250;function Tt(e){let t=e.includes(`:`)?e.split(`:`)[1]:e;switch(t){case`pushed`:case`added`:return`waiting`;case`pulled`:return`active`;case`progress`:return`active`;default:return t}}function Et(e){let t=h(e=>e.baseUrl),n=h(e=>e.token),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(Q),[s,c]=(0,b.useState)(0),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)([]),f=(0,b.useRef)([]),p=(0,b.useRef)({...Q});return(0,b.useEffect)(()=>{let t=new AbortController,n=0,r=!1;i([]),o(Q),d.current=[],f.current=[],p.current={...Q};let a=e=>new Promise(n=>{let r=()=>{clearTimeout(i),n()},i=setTimeout(()=>{t.signal.removeEventListener(`abort`,r),n()},e);t.signal.addEventListener(`abort`,r,{once:!0})}),s=e=>{if(xt(e)&&u(!0),!e.event.startsWith(`job:`))return;let t=e.data??{},r=Tt(e.event),i={seq:++n,event:e.event,queue:t.queue,jobId:t.jobId,name:t.name,status:r,timestamp:t.timestamp??Date.now(),error:t.error,progress:t.progress};f.current.push(i);let a=p.current;a.total+=1,r===`completed`?a.completed+=1:r===`failed`?a.failed+=1:r===`waiting`?a.waiting+=1:r===`active`&&(a.active+=1),d.current.push(Date.now())};(async()=>{for(;!r;){try{await Ct(V.eventsUrl(e),s,t.signal)}catch{}if(r)break;u(!1),await a(2e3)}})();let c=setInterval(()=>{if(f.current.length){let e=f.current;f.current=[],e.reverse(),i(t=>[...e,...t].slice(0,wt))}let e=p.current;e.total&&(p.current={...Q},o(t=>({total:t.total+e.total,completed:t.completed+e.completed,failed:t.failed+e.failed,waiting:t.waiting+e.waiting,active:t.active+e.active})))},150);return()=>{r=!0,t.abort(),clearInterval(c),u(!1)}},[e,t,n]),(0,b.useEffect)(()=>{let e=setInterval(()=>{let e=Date.now();d.current=d.current.filter(t=>e-t<5e3),c(d.current.length/5)},1e3);return()=>clearInterval(e)},[]),{events:r,counters:a,throughput:s,connected:l}}var Dt={overview:{stats:{waiting:0,active:0,delayed:0,completed:0,dlq:0,totalPushed:0,totalPulled:0,totalCompleted:0,totalFailed:0,uptime:0},throughput:{pushPerSec:0,pullPerSec:0,completePerSec:0,failPerSec:0},memory:{heapUsed:0,heapTotal:0,rss:0},crons:{total:0}},queuesTotal:0,details:[],failedTotal:0};function Ot(){let e=h(e=>e.baseUrl),n=h(e=>e.token),{data:r,error:i,loading:a,refetch:o}=H(async()=>{let[e,t]=await Promise.all([D.overview(),D.queuesSummary()]),n=t.slice(0,6).map(e=>({name:e.name,paused:e.paused,counts:e.counts})),r=t.reduce((e,t)=>e+(t.counts?.failed??0),0);return{overview:e,queuesTotal:t.length,details:n,failedTotal:r}},[]);if(a&&!r&&!i)return(0,O.jsx)(Ke,{label:`Loading overview…`});let{overview:s,queuesTotal:c,details:l,failedTotal:u}=r??Dt,{stats:f,throughput:p,memory:m,crons:g}=s,_=ut(f.completed,u),v=e===`/api`?`localhost:6790`:e.replace(/^https?:\/\//,``),y=f.uptime?ht(f.uptime/1e3):`—`,b=bt(m.rss*1024*1024),x=!!i;return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(at,{title:`Overview`,description:`Real-time system health at a glance.`,live:!0}),i&&(0,O.jsx)(Je,{onRetry:o}),(0,O.jsxs)(`div`,{className:t(`mb-6 flex flex-wrap items-center justify-between gap-y-2 rounded-xl border px-5 py-4`,x?`border-amber-500/25 bg-amber-500/[0.06]`:`border-emerald-500/25 bg-emerald-500/[0.06]`),children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,O.jsxs)(`span`,{className:`relative flex size-2.5`,children:[!x&&(0,O.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-emerald-400 opacity-60`}),(0,O.jsx)(`span`,{className:t(`relative inline-flex size-2.5 rounded-full`,x?`bg-amber-400`:`bg-emerald-400`)})]}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`div`,{className:t(`font-semibold`,x?`text-warning`:`text-success`),children:x?`Connection lost — showing last known data`:`bunqueue server connected`}),(0,O.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted`,children:[v,` · uptime `,y,` · `,b,` RAM`]})]})]}),(0,O.jsx)(`span`,{className:t(`rounded-full px-3 py-1 text-xs font-medium`,x?`bg-amber-500/15 text-warning`:`bg-emerald-500/15 text-success`),children:x?`Stale`:`Online`})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,O.jsx)(X,{label:`Completed`,value:Z(f.completed),tone:`green`}),(0,O.jsx)(X,{label:`Failed`,value:Z(u),tone:u?`red`:`default`}),(0,O.jsx)(X,{label:`Waiting`,value:Z(f.waiting),tone:`amber`}),(0,O.jsx)(X,{label:`Active`,value:Z(f.active),tone:`blue`}),(0,O.jsx)(X,{label:`Error Rate`,value:_==null?`—`:lt(_),tone:_==null?`default`:_>.05?`red`:`green`}),(0,O.jsx)(X,{label:`DLQ`,value:Z(f.dlq),tone:f.dlq?`red`:`default`})]}),(0,O.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4 md:grid-cols-3 xl:grid-cols-6`,children:[(0,O.jsx)(X,{label:`Push/sec`,value:p.pushPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,O.jsx)(X,{label:`Pull/sec`,value:p.pullPerSec.toFixed(1),tone:`accent`,hint:`jobs/sec`}),(0,O.jsx)(X,{label:`Queues`,value:Z(c),hint:`${g.total} cron active`}),(0,O.jsx)(X,{label:`Total Pushed`,value:Z(f.totalPushed),hint:`since restart`}),(0,O.jsx)(X,{label:`API Keys`,value:+!!n,hint:n?`token set`:`no auth`}),(0,O.jsx)(X,{label:`Uptime`,value:y,hint:`${b} RAM`})]}),(0,O.jsxs)(`div`,{className:`mt-8`,children:[(0,O.jsx)(At,{title:`Queue Health`,to:`/queues`}),l.length===0?(0,O.jsx)(J,{children:(0,O.jsx)(`p`,{className:`py-4 text-center text-sm text-faint`,children:`No queues yet.`})}):(0,O.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:l.map(e=>(0,O.jsxs)(d,{to:`/queues/${encodeURIComponent(e.name)}`,className:`rounded-xl border border-line bg-surface p-4 transition-colors hover:border-line-strong`,children:[(0,O.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,O.jsx)(`span`,{className:`truncate font-mono text-sm font-medium text-accent`,children:e.name}),(0,O.jsx)(`span`,{className:t(`shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium`,e.paused?`bg-orange-500/10 text-orange-400`:`bg-emerald-500/10 text-success`),children:e.paused?`paused`:`active`})]}),(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs text-faint`,children:[(0,O.jsx)($,{label:`W`,value:e.counts?.waiting,tone:`text-warning`}),(0,O.jsx)($,{label:`A`,value:e.counts?.active,tone:`text-blue-400`}),(0,O.jsx)($,{label:`C`,value:e.counts?.completed,tone:`text-success`}),(0,O.jsx)($,{label:`F`,value:e.counts?.failed,tone:`text-danger`})]})]},e.name))})]}),(0,O.jsx)(kt,{})]})}function kt(){let{events:e}=Et();return(0,O.jsxs)(`div`,{className:`mt-8`,children:[(0,O.jsx)(At,{title:`Recent Activity`,to:`/logs`}),(0,O.jsx)(J,{padded:!1,children:e.length===0?(0,O.jsx)(`p`,{className:`py-8 text-center text-sm text-faint`,children:`Waiting for live activity…`}):(0,O.jsx)(`ul`,{className:`divide-y divide-line`,children:e.slice(0,8).map(e=>(0,O.jsxs)(`li`,{className:`flex items-center justify-between px-5 py-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`span`,{className:t(`size-2 rounded-full`,jt(e.status))}),(0,O.jsxs)(`div`,{className:`text-sm`,children:[(0,O.jsx)(`span`,{className:`font-mono font-medium text-fg`,children:e.queue||`—`}),(0,O.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,O.jsx)(`span`,{className:`font-mono text-xs text-faint`,children:e.jobId?e.jobId.slice(0,8):`—`}),(0,O.jsx)(`span`,{className:`text-faint`,children:` · `}),(0,O.jsx)(`span`,{className:`capitalize text-muted`,children:e.status})]})]}),(0,O.jsx)(`span`,{className:`text-xs text-faint`,children:ft(e.timestamp)})]},e.seq))})})]})}function At({title:e,to:t}){return(0,O.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,O.jsx)(`h2`,{className:`text-lg font-semibold text-fg`,children:e}),(0,O.jsxs)(d,{to:t,className:`flex items-center gap-1 text-sm text-muted hover:text-fg`,children:[`View All `,(0,O.jsx)(I,{className:`size-3.5`})]})]})}function $({label:e,value:n,tone:r}){return(0,O.jsxs)(`span`,{children:[e,` `,(0,O.jsx)(`span`,{className:t(`tnum font-semibold`,r),children:n==null?`—`:Z(n)})]})}function jt(e){switch(e){case`completed`:return`bg-emerald-400`;case`failed`:return`bg-red-400`;case`active`:return`bg-blue-400`;case`waiting`:return`bg-amber-400`;default:return`bg-accent`}}function Mt(){return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-24 text-center`,children:[(0,O.jsx)(`div`,{className:`text-5xl font-bold text-faint`,children:`404`}),(0,O.jsx)(`p`,{className:`text-sm text-muted`,children:`This page does not exist.`}),(0,O.jsx)(d,{to:`/`,className:`rounded-lg border border-line bg-surface-2 px-4 py-2 text-sm font-medium text-fg hover:border-line-strong`,children:`Back to Overview`})]})}var Nt=(0,b.lazy)(()=>i(()=>import(`./AddJob-vk3jh1Zk.js`).then(e=>({default:e.AddJob})),__vite__mapDeps([4,1,2,3]))),Pt=(0,b.lazy)(()=>i(()=>import(`./Benchmark-CpViF2ZC.js`).then(e=>({default:e.Benchmark})),__vite__mapDeps([5,1,2,3,6,7]))),Ft=(0,b.lazy)(()=>i(()=>import(`./CronManager-CeNUeoOc.js`).then(e=>({default:e.CronManager})),__vite__mapDeps([8,1,2,3,9]))),It=(0,b.lazy)(()=>i(()=>import(`./Database--bK9pYZF.js`).then(e=>({default:e.Database})),__vite__mapDeps([10,1,2,3,9,7]))),Lt=(0,b.lazy)(()=>i(()=>import(`./Diagnostics-CGJPsWZQ.js`).then(e=>({default:e.Diagnostics})),__vite__mapDeps([11,1,2]))),Rt=(0,b.lazy)(()=>i(()=>import(`./DlqControl-BLKVzYQC.js`).then(e=>({default:e.DlqControl})),__vite__mapDeps([12,1,2,3,9]))),zt=(0,b.lazy)(()=>i(()=>import(`./DlqPro-D8SmIQUs.js`).then(e=>({default:e.DlqPro})),__vite__mapDeps([13,1,2,3,9]))),Bt=(0,b.lazy)(()=>i(()=>import(`./Flows-BOogljnP.js`).then(e=>({default:e.Flows})),__vite__mapDeps([14,1,2]))),Vt=(0,b.lazy)(()=>i(()=>import(`./JobInspector-Cp4ZuQGI.js`).then(e=>({default:e.JobInspector})),__vite__mapDeps([15,1,2,3,7,16]))),Ht=(0,b.lazy)(()=>i(()=>import(`./JobsPro-D0uclU0B.js`).then(e=>({default:e.JobsPro})),__vite__mapDeps([17,1,2,3,9,16]))),Ut=(0,b.lazy)(()=>i(()=>import(`./LogsPro-DSiV8Ajj.js`).then(e=>({default:e.LogsPro})),__vite__mapDeps([18,1,2,3,9]))),Wt=(0,b.lazy)(()=>i(()=>import(`./McpServer-CNt7kssG.js`).then(e=>({default:e.McpServer})),__vite__mapDeps([19,2,1,7]))),Gt=(0,b.lazy)(()=>i(()=>import(`./MetricsPro-CBiFDVne.js`).then(e=>({default:e.MetricsPro})),__vite__mapDeps([20,1,2,9,6]))),Kt=(0,b.lazy)(()=>i(()=>import(`./QueueControl-Bl4l9dT6.js`).then(e=>({default:e.QueueControl})),__vite__mapDeps([21,1,2,3]))),qt=(0,b.lazy)(()=>i(()=>import(`./QueuesOverview-BBjcyzz2.js`).then(e=>({default:e.QueuesOverview})),__vite__mapDeps([22,1,2,9]))),Jt=(0,b.lazy)(()=>i(()=>import(`./S3BackupPro-Dsq0erDm.js`).then(e=>({default:e.S3BackupPro})),__vite__mapDeps([23,1,2,24,3]))),Yt=(0,b.lazy)(()=>i(()=>import(`./ServerControl-Bhr9FEXF.js`).then(e=>({default:e.ServerControl})),__vite__mapDeps([25,1,2,3,7]))),Xt=(0,b.lazy)(()=>i(()=>import(`./UsagePro-D0k-82eG.js`).then(e=>({default:e.UsagePro})),__vite__mapDeps([26,2,1]))),Zt=(0,b.lazy)(()=>i(()=>import(`./Webhooks-DChTcBSv.js`).then(e=>({default:e.Webhooks})),__vite__mapDeps([27,1,2,3,9]))),Qt=(0,b.lazy)(()=>i(()=>import(`./WorkersPro-B6I9Ilbq.js`).then(e=>({default:e.WorkersPro})),__vite__mapDeps([28,1,2]))),$t=(0,b.lazy)(()=>i(()=>import(`./Cron-Bbf7mRaK.js`).then(e=>({default:e.Cron})),__vite__mapDeps([29,1,2,9]))),en=(0,b.lazy)(()=>i(()=>import(`./Dlq-Bs1pupY2.js`).then(e=>({default:e.Dlq})),__vite__mapDeps([30,1,2,3,9]))),tn=(0,b.lazy)(()=>i(()=>import(`./Jobs-C2HYkZXi.js`).then(e=>({default:e.Jobs})),__vite__mapDeps([31,1,2,3]))),nn=(0,b.lazy)(()=>i(()=>import(`./Logs-yn92V_T8.js`).then(e=>({default:e.Logs})),__vite__mapDeps([32,1,2,3,9]))),rn=(0,b.lazy)(()=>i(()=>import(`./Metrics-CbscCpvx.js`).then(e=>({default:e.Metrics})),__vite__mapDeps([33,2,1]))),an=(0,b.lazy)(()=>i(()=>import(`./Overview-BOuOPWsb.js`).then(e=>({default:e.Overview})),__vite__mapDeps([34,2,1]))),on=(0,b.lazy)(()=>i(()=>import(`./QueueDetail-BSUH0Nl6.js`).then(e=>({default:e.QueueDetail})),__vite__mapDeps([35,1,2,3]))),sn=(0,b.lazy)(()=>i(()=>import(`./Queues-BEQlaWVc.js`).then(e=>({default:e.Queues})),__vite__mapDeps([36,1,2,9]))),cn=(0,b.lazy)(()=>i(()=>import(`./S3Backup-BmRt-Z8V.js`).then(e=>({default:e.S3Backup})),__vite__mapDeps([37,2,1]))),ln=(0,b.lazy)(()=>i(()=>import(`./Settings-46jsrfhd.js`).then(e=>({default:e.Settings})),__vite__mapDeps([38,1,2,24,3]))),un=(0,b.lazy)(()=>i(()=>import(`./Usage-BFLZC7pV.js`).then(e=>({default:e.Usage})),__vite__mapDeps([39,2,1]))),dn=(0,b.lazy)(()=>i(()=>import(`./Workers-DBXrLvfS.js`).then(e=>({default:e.Workers})),__vite__mapDeps([40,1,2,9])));function fn(){return(0,O.jsx)(f,{children:(0,O.jsxs)(l,{element:(0,O.jsx)(tt,{}),children:[(0,O.jsx)(l,{path:`/`,element:(0,O.jsx)(Ot,{})}),(0,O.jsx)(l,{path:`/overview-classic`,element:(0,O.jsx)(an,{})}),(0,O.jsx)(l,{path:`/queues`,element:(0,O.jsx)(qt,{})}),(0,O.jsx)(l,{path:`/queues-classic`,element:(0,O.jsx)(sn,{})}),(0,O.jsx)(l,{path:`/queues/:name`,element:(0,O.jsx)(on,{})}),(0,O.jsx)(l,{path:`/jobs`,element:(0,O.jsx)(Ht,{})}),(0,O.jsx)(l,{path:`/jobs-classic`,element:(0,O.jsx)(tn,{})}),(0,O.jsx)(l,{path:`/dlq`,element:(0,O.jsx)(zt,{})}),(0,O.jsx)(l,{path:`/dlq-classic`,element:(0,O.jsx)(en,{})}),(0,O.jsx)(l,{path:`/cron`,element:(0,O.jsx)(Ft,{})}),(0,O.jsx)(l,{path:`/cron-classic`,element:(0,O.jsx)($t,{})}),(0,O.jsx)(l,{path:`/flows`,element:(0,O.jsx)(Bt,{})}),(0,O.jsx)(l,{path:`/metrics`,element:(0,O.jsx)(Gt,{})}),(0,O.jsx)(l,{path:`/metrics-classic`,element:(0,O.jsx)(rn,{})}),(0,O.jsx)(l,{path:`/workers`,element:(0,O.jsx)(Qt,{})}),(0,O.jsx)(l,{path:`/workers-classic`,element:(0,O.jsx)(dn,{})}),(0,O.jsx)(l,{path:`/logs`,element:(0,O.jsx)(Ut,{})}),(0,O.jsx)(l,{path:`/logs-classic`,element:(0,O.jsx)(nn,{})}),(0,O.jsx)(l,{path:`/server`,element:(0,O.jsx)(Yt,{})}),(0,O.jsx)(l,{path:`/add-job`,element:(0,O.jsx)(Nt,{})}),(0,O.jsx)(l,{path:`/job`,element:(0,O.jsx)(Vt,{})}),(0,O.jsx)(l,{path:`/queue-control`,element:(0,O.jsx)(Kt,{})}),(0,O.jsx)(l,{path:`/cron-manager`,element:(0,O.jsx)(Ft,{})}),(0,O.jsx)(l,{path:`/dlq-control`,element:(0,O.jsx)(Rt,{})}),(0,O.jsx)(l,{path:`/webhooks`,element:(0,O.jsx)(Zt,{})}),(0,O.jsx)(l,{path:`/diagnostics`,element:(0,O.jsx)(Lt,{})}),(0,O.jsx)(l,{path:`/benchmark`,element:(0,O.jsx)(Pt,{})}),(0,O.jsx)(l,{path:`/database`,element:(0,O.jsx)(It,{})}),(0,O.jsx)(l,{path:`/mcp`,element:(0,O.jsx)(Wt,{})}),(0,O.jsx)(l,{path:`/usage`,element:(0,O.jsx)(Xt,{})}),(0,O.jsx)(l,{path:`/usage-classic`,element:(0,O.jsx)(un,{})}),(0,O.jsx)(l,{path:`/s3`,element:(0,O.jsx)(Jt,{})}),(0,O.jsx)(l,{path:`/s3-classic`,element:(0,O.jsx)(cn,{})}),(0,O.jsx)(l,{path:`/settings`,element:(0,O.jsx)(ln,{})}),(0,O.jsx)(l,{path:`*`,element:(0,O.jsx)(Mt,{})})]})})}ie();var pn=document.getElementById(`root`);if(!pn)throw Error(`Root element #root not found`);function mn(){(0,x.createRoot)(pn).render((0,O.jsx)(b.StrictMode,{children:(0,O.jsx)(c,{basename:`/`,children:(0,O.jsx)(fn,{})})}))}Y()?i(()=>import(`./install-C019EM5j.js`).then(e=>e.installDemo()),[]).catch(()=>{}).finally(mn):mn();export{I as A,ve as B,We as C,ke as D,K as E,se as F,xe as G,M as H,N as I,A as J,ye as K,Se as L,ge as M,Ce as N,H as O,Te as P,F as R,J as S,Ue as T,be as U,_e as V,de as W,ne as X,S as Y,D as Z,it as _,dt as a,Ke as b,Z as c,ht as d,mt as f,rt as g,at as h,gt as i,we as j,V as k,lt as l,X as m,ut as n,pt as o,yt as p,P as q,bt as r,_t as s,Et as t,ft as u,Y as v,He as w,Je as x,qe as y,le as z};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var e={health:{ok:!0,status:`healthy`,uptime:133,version:`2.8.26`,queues:{waiting:13,active:2,delayed:6,completed:4,dlq:2},connections:{tcp:0,ws:0,sse:0},memory:{heapUsed:3,heapTotal:4,rss:68}},ping:{ok:!0,data:{pong:!0,time:1783035131368}},stats:{ok:!0,stats:{waiting:13,prioritized:7,delayed:6,active:2,dlq:2,completed:4,"waiting-children":0,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882,cronJobs:2,cronPending:2,pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},memory:{heapUsed:3,heapTotal:4,rss:69,external:1,arrayBuffers:0},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6}},storage:{ok:!0,data:{diskFull:!1,error:null,since:null}},dashboard:{ok:!0,stats:{waiting:13,active:2,delayed:6,completed:4,dlq:2,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882},throughput:{pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},latency:{averages:{pushMs:.07645341176470588,pullMs:.3890205,ackMs:1.03645825},percentiles:{push:{p50:.1,p95:.5,p99:1},pull:{p50:.1,p95:1,p99:1},ack:{p50:2.5,p95:2.5,p99:2.5}}},memory:{heapUsed:3,heapTotal:4,rss:70},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6},workers:{total:0,active:0,list:[],truncated:!1},crons:{total:2,list:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0}],truncated:!1},storage:{diskFull:!1,error:null,since:null},timestamp:1783035131369},dashboardQueues:{ok:!0,queues:[{name:`emails`,waiting:2,delayed:0,active:0,dlq:2,paused:!1},{name:`image-processing`,waiting:7,delayed:0,active:2,dlq:0,paused:!1},{name:`reports`,waiting:0,delayed:6,active:0,dlq:0,paused:!1},{name:`notifications`,waiting:4,delayed:0,active:0,dlq:0,paused:!1}],total:4,limit:100,offset:0,timestamp:1783035131370},queuesSummary:[{name:`emails`,paused:!1,counts:{waiting:2,active:0,completed:4,failed:2,delayed:0}},{name:`image-processing`,paused:!1,counts:{waiting:7,active:2,completed:0,failed:0,delayed:0}},{name:`reports`,paused:!1,counts:{waiting:0,active:0,completed:0,failed:0,delayed:6}},{name:`notifications`,paused:!1,counts:{waiting:4,active:0,completed:0,failed:0,delayed:0}}],crons:{ok:!0,crons:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0,maxLimit:null,timezone:null},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0,maxLimit:null,timezone:null}]},webhooks:{ok:!0,data:{webhooks:[{id:`019f252c-f5e3-7000-883c-28cc5dc157a0`,url:`https://hooks.example.com/bunqueue`,events:[`job.completed`,`job.failed`],queue:null,createdAt:1783035131363,lastTriggered:null,successCount:0,failureCount:0,enabled:!0}],stats:{total:1,enabled:1}}},workers:{ok:!0,data:{workers:[],stats:{total:0,active:0,totalProcessed:0,totalFailed:0,activeJobs:0}}},dlqStats:{ok:!0,total:2,byQueue:{emails:2}},counts_emails:{ok:!0,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,paused:0}},dlq_emails:{ok:!0,entries:[{job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131367,reason:`unknown`,error:null,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131367,reason:`unknown`,error:null,duration:3}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931367},{job:{id:`019f252b-8750-7000-afa1-767720d8f433`,queue:`emails`,data:{to:`user13@example.com`,subject:`Welcome 13`},createdAt:1783035037520,runAt:1783035037520,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037520},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131368,reason:`unknown`,error:null,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131368,reason:`unknown`,error:null,duration:4}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931368}],total:2},detail_emails:{ok:!0,name:`emails`,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,totalCompleted:4,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:2,1:3,2:4},dlqPreview:[{id:`019f252b-8716-7000-bbec-d8c65e09f340`,data:{to:`user8@example.com`,subject:`Welcome 8`},attempts:0,createdAt:1783035037462},{id:`019f252b-8750-7000-afa1-767720d8f433`,data:{to:`user13@example.com`,subject:`Welcome 13`},attempts:0,createdAt:1783035037520}],timestamp:1783035131373,jobs:{waiting:[{id:`019f252b-86f2-7000-a45d-6e5e3dd4abf0`,priority:0,createdAt:1783035037426,runAt:1783035037426,attempts:0,progress:0},{id:`019f252b-872e-7000-91af-f820da905a23`,priority:0,createdAt:1783035037486,runAt:1783035037486,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},"counts_image-processing":{ok:!0,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,paused:0}},"dlq_image-processing":{ok:!0,entries:[],total:0},"detail_image-processing":{ok:!0,name:`image-processing`,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:7},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[{id:`019f252b-8780-7000-9066-7f3a95bbb309`,priority:0,createdAt:1783035037568,runAt:1783035037568,attempts:0,progress:0},{id:`019f252b-878d-7000-9396-88a9de934b0c`,priority:0,createdAt:1783035037581,runAt:1783035037581,attempts:0,progress:0},{id:`019f252b-8799-7000-8433-2f4d874dfa3f`,priority:0,createdAt:1783035037593,runAt:1783035037593,attempts:0,progress:0},{id:`019f252b-87a5-7000-b3d2-48c6816be571`,priority:0,createdAt:1783035037605,runAt:1783035037605,attempts:0,progress:0}],active:[{id:`019f252b-8769-7000-bc44-cfc168232f53`,priority:0,createdAt:1783035037545,runAt:1783035037545,attempts:0,progress:0},{id:`019f252b-8775-7000-884a-63456175f48c`,priority:0,createdAt:1783035037557,runAt:1783035037557,attempts:0,progress:0}],delayed:[],paused:[]}},counts_reports:{ok:!0,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_reports:{ok:!0,entries:[],total:0},detail_reports:{ok:!0,name:`reports`,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:6},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[],active:[],delayed:[{id:`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,priority:0,createdAt:1783035037656,runAt:1783035637656,attempts:0,progress:0},{id:`019f252b-87e3-7000-b0dc-18aac125e1ce`,priority:0,createdAt:1783035037667,runAt:1783035637667,attempts:0,progress:0},{id:`019f252b-87ee-7000-bb98-e9997d218441`,priority:0,createdAt:1783035037678,runAt:1783035637678,attempts:0,progress:0},{id:`019f252b-87fa-7000-9eb8-5b7a6d7aa7b4`,priority:0,createdAt:1783035037690,runAt:1783035637690,attempts:0,progress:0}],paused:[]}},counts_notifications:{ok:!0,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_notifications:{ok:!0,entries:[],total:0},detail_notifications:{ok:!0,name:`notifications`,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:4},dlqPreview:[],timestamp:1783035131375,jobs:{waiting:[{id:`019f252b-8823-7000-9455-de9cff6a56e2`,priority:0,createdAt:1783035037731,runAt:1783035037731,attempts:0,progress:0},{id:`019f252b-882e-7000-ae38-9c7fe01639d5`,priority:0,createdAt:1783035037742,runAt:1783035037742,attempts:0,progress:0},{id:`019f252b-883b-7000-8789-839b741a1011`,priority:0,createdAt:1783035037755,runAt:1783035037755,attempts:0,progress:0},{id:`019f252b-884d-7000-b703-96a357151ef4`,priority:0,createdAt:1783035037773,runAt:1783035037773,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},emailsWaiting:{ok:!0,jobs:[{id:`019f252b-86c0-7000-a54e-3816c968ebf0`,queue:`emails`,data:{to:`user1@example.com`,subject:`Welcome 1`},createdAt:1783035037376,runAt:1783035037376,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037376,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037376}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86ce-7000-adfc-613a9495a6ef`,queue:`emails`,data:{to:`user2@example.com`,subject:`Welcome 2`},createdAt:1783035037390,runAt:1783035037390,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037390,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037390}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86fe-7000-894d-fe3ad935cc36`,queue:`emails`,data:{to:`user6@example.com`,subject:`Welcome 6`},createdAt:1783035037438,runAt:1783035037438,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037438,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037438}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-870a-7000-91d2-ca4070505abe`,queue:`emails`,data:{to:`user7@example.com`,subject:`Welcome 7`},createdAt:1783035037450,runAt:1783035037450,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037450,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037450}],_state:`prioritized`,state:`prioritized`}]},emailsCompleted:{ok:!0,jobs:[{id:`019f252b-86da-7000-a9e3-6b1b74944d70`,queue:`emails`,data:{to:`user3@example.com`,subject:`Welcome 3`},createdAt:1783035037402,runAt:1783035037402,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037402},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`},{id:`019f252b-86e6-7000-a51e-e65a7cd2ce85`,queue:`emails`,data:{to:`user4@example.com`,subject:`Welcome 4`},createdAt:1783035037414,runAt:1783035037414,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037414},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-8722-7000-9270-14be63598def`,queue:`emails`,data:{to:`user9@example.com`,subject:`Welcome 9`},createdAt:1783035037474,runAt:1783035037474,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037474},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-875b-7000-8f4b-3d571d84663d`,queue:`emails`,data:{to:`user14@example.com`,subject:`Welcome 14`},createdAt:1783035037531,runAt:1783035037531,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037531},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`}]},oneJob:{ok:!0,job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}],state:`failed`}}},t={ok:!0,sqliteVersion:`3.45.1`,pageSize:4096,pageCount:640,journalMode:`wal`,freelistPages:8,tables:6,indexes:11,fileSize:2621440,walSize:49152},n={ok:!0,tables:[{name:`jobs`,rows:34,columns:6},{name:`queues`,rows:4,columns:4},{name:`dlq`,rows:2,columns:5},{name:`crons`,rows:2,columns:5},{name:`webhooks`,rows:1,columns:6},{name:`job_results`,rows:4,columns:3}]},r={jobs:{columns:[`id`,`queue`,`state`,`priority`,`attempts`,`created_at`],types:{id:`TEXT`,queue:`TEXT`,state:`TEXT`,priority:`INTEGER`,attempts:`INTEGER`,created_at:`INTEGER`},rows:[[`019f252b-86c0-7000-a54e-3816c968ebf0`,`emails`,`prioritized`,1,0,1783035037376],[`019f252b-8769-7000-bc44-cfc168232f53`,`image-processing`,`active`,0,0,1783035037545],[`019f252b-86da-7000-a9e3-6b1b74944d70`,`emails`,`completed`,3,0,1783035037402],[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`failed`,3,0,1783035037462],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`reports`,`delayed`,0,0,1783035037656]]},queues:{columns:[`name`,`paused`,`concurrency`,`rate_limit`],types:{name:`TEXT`,paused:`INTEGER`,concurrency:`INTEGER`,rate_limit:`INTEGER`},rows:[[`emails`,0,10,0],[`image-processing`,0,4,100],[`reports`,0,2,0],[`notifications`,0,8,0]]}};function i(e){let t=r[e],n=t?.columns??[`id`,`data`],i=t?.types??{};return{ok:!0,table:e,columns:n.map((e,t)=>({name:e,type:i[e]??`TEXT`,notNull:t===0,defaultValue:null,primaryKey:t===0})),indexes:[{name:`idx_${e}_${n[0]}`,unique:!0,columns:[n[0]]}],sql:`CREATE TABLE ${e} (${n.map(e=>`${e} ${i[e]??`TEXT`}`).join(`, `)})`,rowCount:t?.rows.length??0}}var a={"flow-order-9a3f":{id:`flow-order-9a3f`,queue:`orders`,state:`active`,priority:1,parentId:null,childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`],dependsOn:[]},"flow-charge-1":{id:`flow-charge-1`,queue:`payments`,state:`completed`,priority:2,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[]},"flow-ship-2":{id:`flow-ship-2`,queue:`shipping`,state:`active`,priority:1,parentId:`flow-order-9a3f`,childrenIds:[`flow-label-4`],dependsOn:[]},"flow-label-4":{id:`flow-label-4`,queue:`shipping`,state:`waiting`,priority:0,parentId:`flow-ship-2`,childrenIds:[],dependsOn:[]},"flow-notify-3":{id:`flow-notify-3`,queue:`emails`,state:`delayed`,priority:0,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[`flow-charge-1`]}};function o(e,t){let n=r[e],i=n?.columns??[`id`,`data`],a=n?.rows??[],o=new URLSearchParams(t);return{ok:!0,table:e,columns:i,rows:a,rowids:a.map((e,t)=>t+1),truncatedCells:a.map(e=>e.map(()=>!1)),total:a.length,limit:Number(o.get(`limit`)??50),offset:Number(o.get(`offset`)??0),orderBy:o.get(`orderBy`),dir:o.get(`dir`)===`desc`?`desc`:`asc`,filter:null}}var s=new Set([`events`,`health`,`ping`,`stats`,`storage`,`dashboard`,`queues`,`jobs`,`crons`,`webhooks`,`workers`,`dlq`,`control`,`db`]);function c(r,s,c){let l=r.replace(/\/+$/,``)||`/`,u=l.split(`/`).filter(Boolean);if(s!==`GET`)return l.endsWith(`/db/query`)?{ok:!0,columns:[`note`],rows:[[`This is the demo. Queries run against a static in-memory sample.`]],rowCount:1,truncated:!1,ms:.4}:l.endsWith(`/jobs`)||l.endsWith(`/jobs/bulk`)?{ok:!0,id:`demo-${u.join(`-`)}`,ids:[`demo-1`]}:{ok:!0};let d={"/health":`health`,"/ping":`ping`,"/stats":`stats`,"/storage":`storage`,"/dashboard":`dashboard`,"/dashboard/queues":`dashboardQueues`,"/queues/summary":`queuesSummary`,"/crons":`crons`,"/webhooks":`webhooks`,"/workers":`workers`,"/dlq/stats":`dlqStats`};if(d[l])return e[d[l]];if(u[0]===`dashboard`&&u[1]===`queues`&&u[2])return e[`detail_${u[2]}`]??e.detail_emails;if(u[0]===`queues`&&u[1]){let t=u[1];if(u[2]===`counts`)return e[`counts_${t}`]??{ok:!0,counts:{}};if(u[2]===`dlq`&&u[3]===`stats`)return{ok:!0,stats:{total:t===`emails`?2:0,byReason:{unknown:2}}};if(u[2]===`dlq`)return e[`dlq_${t}`]??{ok:!0,entries:[],total:0};if(u[2]===`jobs`&&u[3]===`list`){let n=new URLSearchParams(c).get(`state`);return t===`emails`&&n===`completed`?e.emailsCompleted:t===`emails`?e.emailsWaiting:{ok:!0,jobs:[]}}}if(u[0]===`jobs`&&u[1]){let t=decodeURIComponent(u[1]);if(u[1]===`custom`&&u[2])return e.oneJob;if(u[2]===`result`)return{ok:!0,result:{sent:!0,provider:`demo`}};if(u[2]===`logs`)return{ok:!0,logs:[]};if(!u[2])return a[t]?{ok:!0,job:a[t]}:e.oneJob}if(u[0]===`db`){if(u[1]===`info`)return t;if(u[1]===`tables`&&!u[2])return n;if(u[1]===`tables`&&u[2]){let e=decodeURIComponent(u[2]);return u[3]===`schema`?i(e):u[3]===`cell`?{ok:!0,value:`demo cell value`}:o(e,c)}}return{ok:!0}}var l=e=>new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}});function u(e){let t=new TextEncoder,n=[`emails`,`image-processing`,`reports`,`notifications`],r=[`job:active`,`job:completed`,`job:completed`,`job:waiting`,`job:failed`,`job:active`],i=new ReadableStream({start(i){let a=0,o=!1,s,c=()=>{if(!o){o=!0,clearInterval(s);try{i.close()}catch{}}};i.enqueue(t.encode(`data: {"connected":true}
|
|
1
|
+
var e={health:{ok:!0,status:`healthy`,uptime:133,version:`2.8.26`,queues:{waiting:13,active:2,delayed:6,completed:4,dlq:2},connections:{tcp:0,ws:0,sse:0},memory:{heapUsed:3,heapTotal:4,rss:68}},ping:{ok:!0,data:{pong:!0,time:1783035131368}},stats:{ok:!0,stats:{waiting:13,prioritized:7,delayed:6,active:2,dlq:2,completed:4,"waiting-children":0,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882,cronJobs:2,cronPending:2,pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},memory:{heapUsed:3,heapTotal:4,rss:69,external:1,arrayBuffers:0},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6}},storage:{ok:!0,data:{diskFull:!1,error:null,since:null}},dashboard:{ok:!0,stats:{waiting:13,active:2,delayed:6,completed:4,dlq:2,totalPushed:34,totalPulled:8,totalCompleted:4,totalFailed:0,uptime:133882},throughput:{pushPerSec:.25,pullPerSec:.06,completePerSec:.03,failPerSec:0},latency:{averages:{pushMs:.07645341176470588,pullMs:.3890205,ackMs:1.03645825},percentiles:{push:{p50:.1,p95:.5,p99:1},pull:{p50:.1,p95:1,p99:1},ack:{p50:2.5,p95:2.5,p99:2.5}}},memory:{heapUsed:3,heapTotal:4,rss:70},collections:{jobIndex:34,completedJobs:4,jobResults:0,jobLogs:0,customIdMap:0,jobLocks:0,clientJobs:0,clientJobsTotal:0,pendingDepChecks:0,stalledCandidates:0,processingTotal:2,queuedTotal:26,waitingDepsTotal:0,temporalIndexTotal:34,delayedHeapTotal:6},workers:{total:0,active:0,list:[],truncated:!1},crons:{total:2,list:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0}],truncated:!1},storage:{diskFull:!1,error:null,since:null},timestamp:1783035131369},dashboardQueues:{ok:!0,queues:[{name:`emails`,waiting:2,delayed:0,active:0,dlq:2,paused:!1},{name:`image-processing`,waiting:7,delayed:0,active:2,dlq:0,paused:!1},{name:`reports`,waiting:0,delayed:6,active:0,dlq:0,paused:!1},{name:`notifications`,waiting:4,delayed:0,active:0,dlq:0,paused:!1}],total:4,limit:100,offset:0,timestamp:1783035131370},queuesSummary:[{name:`emails`,paused:!1,counts:{waiting:2,active:0,completed:4,failed:2,delayed:0}},{name:`image-processing`,paused:!1,counts:{waiting:7,active:2,completed:0,failed:0,delayed:0}},{name:`reports`,paused:!1,counts:{waiting:0,active:0,completed:0,failed:0,delayed:6}},{name:`notifications`,paused:!1,counts:{waiting:4,active:0,completed:0,failed:0,delayed:0}}],crons:{ok:!0,crons:[{name:`nightly-report`,queue:`reports`,schedule:`0 2 * * *`,repeatEvery:null,nextRun:17830368e5,executions:0,maxLimit:null,timezone:null},{name:`heartbeat`,queue:`notifications`,schedule:null,repeatEvery:6e4,nextRun:1783035191362,executions:0,maxLimit:null,timezone:null}]},webhooks:{ok:!0,data:{webhooks:[{id:`019f252c-f5e3-7000-883c-28cc5dc157a0`,url:`https://hooks.example.com/bunqueue`,events:[`job.completed`,`job.failed`],queue:null,createdAt:1783035131363,lastTriggered:null,successCount:0,failureCount:0,enabled:!0}],stats:{total:1,enabled:1}}},workers:{ok:!0,data:{workers:[],stats:{total:0,active:0,totalProcessed:0,totalFailed:0,activeJobs:0}}},dlqStats:{ok:!0,total:2,byQueue:{emails:2}},counts_emails:{ok:!0,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,paused:0}},dlq_emails:{ok:!0,entries:[{job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131367,reason:`unknown`,error:null,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131367,reason:`unknown`,error:null,duration:3}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931367},{job:{id:`019f252b-8750-7000-afa1-767720d8f433`,queue:`emails`,data:{to:`user13@example.com`,subject:`Welcome 13`},createdAt:1783035037520,runAt:1783035037520,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037520},{state:`active`,timestamp:1783035131364}]},enteredAt:1783035131368,reason:`unknown`,error:null,attempts:[{attempt:0,startedAt:1783035131364,failedAt:1783035131368,reason:`unknown`,error:null,duration:4}],retryCount:0,lastRetryAt:null,nextRetryAt:null,expiresAt:1783639931368}],total:2},detail_emails:{ok:!0,name:`emails`,counts:{waiting:2,prioritized:7,delayed:0,active:0,completed:4,failed:2,"waiting-children":0,totalCompleted:4,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:2,1:3,2:4},dlqPreview:[{id:`019f252b-8716-7000-bbec-d8c65e09f340`,data:{to:`user8@example.com`,subject:`Welcome 8`},attempts:0,createdAt:1783035037462},{id:`019f252b-8750-7000-afa1-767720d8f433`,data:{to:`user13@example.com`,subject:`Welcome 13`},attempts:0,createdAt:1783035037520}],timestamp:1783035131373,jobs:{waiting:[{id:`019f252b-86f2-7000-a45d-6e5e3dd4abf0`,priority:0,createdAt:1783035037426,runAt:1783035037426,attempts:0,progress:0},{id:`019f252b-872e-7000-91af-f820da905a23`,priority:0,createdAt:1783035037486,runAt:1783035037486,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},"counts_image-processing":{ok:!0,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,paused:0}},"dlq_image-processing":{ok:!0,entries:[],total:0},"detail_image-processing":{ok:!0,name:`image-processing`,counts:{waiting:7,prioritized:0,delayed:0,active:2,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:7},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[{id:`019f252b-8780-7000-9066-7f3a95bbb309`,priority:0,createdAt:1783035037568,runAt:1783035037568,attempts:0,progress:0},{id:`019f252b-878d-7000-9396-88a9de934b0c`,priority:0,createdAt:1783035037581,runAt:1783035037581,attempts:0,progress:0},{id:`019f252b-8799-7000-8433-2f4d874dfa3f`,priority:0,createdAt:1783035037593,runAt:1783035037593,attempts:0,progress:0},{id:`019f252b-87a5-7000-b3d2-48c6816be571`,priority:0,createdAt:1783035037605,runAt:1783035037605,attempts:0,progress:0}],active:[{id:`019f252b-8769-7000-bc44-cfc168232f53`,priority:0,createdAt:1783035037545,runAt:1783035037545,attempts:0,progress:0},{id:`019f252b-8775-7000-884a-63456175f48c`,priority:0,createdAt:1783035037557,runAt:1783035037557,attempts:0,progress:0}],delayed:[],paused:[]}},counts_reports:{ok:!0,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_reports:{ok:!0,entries:[],total:0},detail_reports:{ok:!0,name:`reports`,counts:{waiting:0,prioritized:0,delayed:6,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:6},dlqPreview:[],timestamp:1783035131374,jobs:{waiting:[],active:[],delayed:[{id:`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,priority:0,createdAt:1783035037656,runAt:1783035637656,attempts:0,progress:0},{id:`019f252b-87e3-7000-b0dc-18aac125e1ce`,priority:0,createdAt:1783035037667,runAt:1783035637667,attempts:0,progress:0},{id:`019f252b-87ee-7000-bb98-e9997d218441`,priority:0,createdAt:1783035037678,runAt:1783035637678,attempts:0,progress:0},{id:`019f252b-87fa-7000-9eb8-5b7a6d7aa7b4`,priority:0,createdAt:1783035037690,runAt:1783035637690,attempts:0,progress:0}],paused:[]}},counts_notifications:{ok:!0,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,paused:0}},dlq_notifications:{ok:!0,entries:[],total:0},detail_notifications:{ok:!0,name:`notifications`,counts:{waiting:4,prioritized:0,delayed:0,active:0,completed:0,failed:0,"waiting-children":0,totalCompleted:0,totalFailed:0,paused:0},paused:!1,priorityCounts:{0:4},dlqPreview:[],timestamp:1783035131375,jobs:{waiting:[{id:`019f252b-8823-7000-9455-de9cff6a56e2`,priority:0,createdAt:1783035037731,runAt:1783035037731,attempts:0,progress:0},{id:`019f252b-882e-7000-ae38-9c7fe01639d5`,priority:0,createdAt:1783035037742,runAt:1783035037742,attempts:0,progress:0},{id:`019f252b-883b-7000-8789-839b741a1011`,priority:0,createdAt:1783035037755,runAt:1783035037755,attempts:0,progress:0},{id:`019f252b-884d-7000-b703-96a357151ef4`,priority:0,createdAt:1783035037773,runAt:1783035037773,attempts:0,progress:0}],active:[],delayed:[],paused:[]}},emailsWaiting:{ok:!0,jobs:[{id:`019f252b-86c0-7000-a54e-3816c968ebf0`,queue:`emails`,data:{to:`user1@example.com`,subject:`Welcome 1`},createdAt:1783035037376,runAt:1783035037376,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037376,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037376}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86ce-7000-adfc-613a9495a6ef`,queue:`emails`,data:{to:`user2@example.com`,subject:`Welcome 2`},createdAt:1783035037390,runAt:1783035037390,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037390,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037390}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-86fe-7000-894d-fe3ad935cc36`,queue:`emails`,data:{to:`user6@example.com`,subject:`Welcome 6`},createdAt:1783035037438,runAt:1783035037438,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037438,stallCount:0,priority:1,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037438}],_state:`prioritized`,state:`prioritized`},{id:`019f252b-870a-7000-91d2-ca4070505abe`,queue:`emails`,data:{to:`user7@example.com`,subject:`Welcome 7`},createdAt:1783035037450,runAt:1783035037450,startedAt:null,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035037450,stallCount:0,priority:2,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037450}],_state:`prioritized`,state:`prioritized`}]},emailsCompleted:{ok:!0,jobs:[{id:`019f252b-86da-7000-a9e3-6b1b74944d70`,queue:`emails`,data:{to:`user3@example.com`,subject:`Welcome 3`},createdAt:1783035037402,runAt:1783035037402,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037402},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`},{id:`019f252b-86e6-7000-a51e-e65a7cd2ce85`,queue:`emails`,data:{to:`user4@example.com`,subject:`Welcome 4`},createdAt:1783035037414,runAt:1783035037414,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037414},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-8722-7000-9270-14be63598def`,queue:`emails`,data:{to:`user9@example.com`,subject:`Welcome 9`},createdAt:1783035037474,runAt:1783035037474,startedAt:1783035131364,completedAt:1783035131366,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037474},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131366}],_state:`completed`,state:`completed`},{id:`019f252b-875b-7000-8f4b-3d571d84663d`,queue:`emails`,data:{to:`user14@example.com`,subject:`Welcome 14`},createdAt:1783035037531,runAt:1783035037531,startedAt:1783035131364,completedAt:1783035131367,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:4,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037531},{state:`active`,timestamp:1783035131364},{state:`completed`,timestamp:1783035131367}],_state:`completed`,state:`completed`}]},oneJob:{ok:!0,job:{id:`019f252b-8716-7000-bbec-d8c65e09f340`,queue:`emails`,data:{to:`user8@example.com`,subject:`Welcome 8`},createdAt:1783035037462,runAt:1783035037462,startedAt:1783035131364,completedAt:null,attempts:0,backoff:1e3,backoffConfig:null,dependsOn:[],childrenIds:[],childrenCompleted:0,tags:[],progress:0,progressMessage:null,stacktrace:null,repeat:null,lastHeartbeat:1783035131364,stallCount:0,priority:3,lifo:!1,maxAttempts:3,removeOnComplete:!1,removeOnFail:!1,ttl:null,timeout:null,uniqueKey:null,customId:null,parentId:null,groupId:null,stallTimeout:null,stackTraceLimit:10,keepLogs:null,sizeLimit:null,failParentOnFailure:!1,removeDependencyOnFailure:!1,continueParentOnFailure:!1,ignoreDependencyOnFailure:!1,deduplicationTtl:null,deduplicationExtend:!1,deduplicationReplace:!1,debounceId:null,debounceTtl:null,timeline:[{state:`prioritized`,timestamp:1783035037462},{state:`active`,timestamp:1783035131364}],state:`failed`}}},t={ok:!0,sqliteVersion:`3.45.1`,pageSize:4096,pageCount:640,journalMode:`wal`,freelistPages:8,tables:6,indexes:11,fileSize:2621440,walSize:49152},n={ok:!0,tables:[{name:`jobs`,rows:34,columns:6},{name:`queues`,rows:4,columns:4},{name:`dlq`,rows:2,columns:5},{name:`crons`,rows:2,columns:5},{name:`webhooks`,rows:1,columns:6},{name:`job_results`,rows:4,columns:3}]},r={jobs:{columns:[`id`,`queue`,`state`,`priority`,`attempts`,`created_at`],types:{id:`TEXT`,queue:`TEXT`,state:`TEXT`,priority:`INTEGER`,attempts:`INTEGER`,created_at:`INTEGER`},rows:[[`019f252b-86c0-7000-a54e-3816c968ebf0`,`emails`,`prioritized`,1,0,1783035037376],[`019f252b-8769-7000-bc44-cfc168232f53`,`image-processing`,`active`,0,0,1783035037545],[`019f252b-86da-7000-a9e3-6b1b74944d70`,`emails`,`completed`,3,0,1783035037402],[`019f252b-8716-7000-bbec-d8c65e09f340`,`emails`,`failed`,3,0,1783035037462],[`019f252b-87d8-7000-8f0c-e8ca5fec7d18`,`reports`,`delayed`,0,0,1783035037656]]},queues:{columns:[`name`,`paused`,`concurrency`,`rate_limit`],types:{name:`TEXT`,paused:`INTEGER`,concurrency:`INTEGER`,rate_limit:`INTEGER`},rows:[[`emails`,0,10,0],[`image-processing`,0,4,100],[`reports`,0,2,0],[`notifications`,0,8,0]]}};function i(e){let t=r[e],n=t?.columns??[`id`,`data`],i=t?.types??{};return{ok:!0,table:e,columns:n.map((e,t)=>({name:e,type:i[e]??`TEXT`,notNull:t===0,defaultValue:null,primaryKey:t===0})),indexes:[{name:`idx_${e}_${n[0]}`,unique:!0,columns:[n[0]]}],sql:`CREATE TABLE ${e} (${n.map(e=>`${e} ${i[e]??`TEXT`}`).join(`, `)})`,rowCount:t?.rows.length??0}}var a={"flow-order-9a3f":{id:`flow-order-9a3f`,queue:`orders`,state:`active`,priority:1,parentId:null,childrenIds:[`flow-charge-1`,`flow-ship-2`,`flow-notify-3`],dependsOn:[]},"flow-charge-1":{id:`flow-charge-1`,queue:`payments`,state:`completed`,priority:2,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[]},"flow-ship-2":{id:`flow-ship-2`,queue:`shipping`,state:`active`,priority:1,parentId:`flow-order-9a3f`,childrenIds:[`flow-label-4`],dependsOn:[]},"flow-label-4":{id:`flow-label-4`,queue:`shipping`,state:`waiting`,priority:0,parentId:`flow-ship-2`,childrenIds:[],dependsOn:[]},"flow-notify-3":{id:`flow-notify-3`,queue:`emails`,state:`delayed`,priority:0,parentId:`flow-order-9a3f`,childrenIds:[],dependsOn:[`flow-charge-1`]}},o={command:`bunqueue start`,httpPort:6790,tcpPort:6791,dataPath:`./data/bunqueue.db`,extraEnv:{LOG_LEVEL:`info`}},s=()=>({status:`running`,pid:42317,startedAt:Date.now()-36e5,exitCode:null,healthy:!0,version:`2.8.26`,config:o,runningConfig:o,db:{path:o.dataPath,exists:!0,size:2621440,walSize:49152,shmSize:32768,totalSize:2703360,mtimeMs:Date.now()-12e3}}),c=()=>{let e=Date.now(),t=(t,n,r,i)=>({seq:t,ts:e-n,stream:r,line:i});return{lines:[t(1,8e3,`sys`,`starting: bunqueue start`),t(2,7800,`stdout`,`bunqueue v2.8.26 — HTTP :6790, TCP :6791`),t(3,7600,`stdout`,`SQLite ready (WAL) at ./data/bunqueue.db`),t(4,5e3,`stdout`,`worker registered: image-processing`),t(5,1200,`stdout`,`health ok — 4 queues, 34 jobs`)]}};function l(e,t){let n=r[e],i=n?.columns??[`id`,`data`],a=n?.rows??[],o=new URLSearchParams(t);return{ok:!0,table:e,columns:i,rows:a,rowids:a.map((e,t)=>t+1),truncatedCells:a.map(e=>e.map(()=>!1)),total:a.length,limit:Number(o.get(`limit`)??50),offset:Number(o.get(`offset`)??0),orderBy:o.get(`orderBy`),dir:o.get(`dir`)===`desc`?`desc`:`asc`,filter:null}}var u=new Set([`events`,`health`,`ping`,`stats`,`storage`,`dashboard`,`queues`,`jobs`,`crons`,`webhooks`,`workers`,`dlq`,`control`,`db`]);function d(r,u,d){let f=r.replace(/\/+$/,``)||`/`,p=f.split(`/`).filter(Boolean);if(p[0]===`control`)return p[1]===`logs`?c():p[1]===`config`?o:s();if(u!==`GET`)return f.endsWith(`/db/query`)?{ok:!0,columns:[`note`],rows:[[`This is the demo. Queries run against a static in-memory sample.`]],rowCount:1,truncated:!1,ms:.4}:f.endsWith(`/jobs`)||f.endsWith(`/jobs/bulk`)?{ok:!0,id:`demo-${p.join(`-`)}`,ids:[`demo-1`]}:{ok:!0};let m={"/health":`health`,"/ping":`ping`,"/stats":`stats`,"/storage":`storage`,"/dashboard":`dashboard`,"/dashboard/queues":`dashboardQueues`,"/queues/summary":`queuesSummary`,"/crons":`crons`,"/webhooks":`webhooks`,"/workers":`workers`,"/dlq/stats":`dlqStats`};if(m[f])return e[m[f]];if(p[0]===`dashboard`&&p[1]===`queues`&&p[2])return e[`detail_${p[2]}`]??e.detail_emails;if(p[0]===`queues`&&p[1]){let t=p[1];if(p[2]===`counts`)return e[`counts_${t}`]??{ok:!0,counts:{}};if(p[2]===`dlq`&&p[3]===`stats`)return{ok:!0,stats:{total:t===`emails`?2:0,byReason:{unknown:2}}};if(p[2]===`dlq`)return e[`dlq_${t}`]??{ok:!0,entries:[],total:0};if(p[2]===`jobs`&&p[3]===`list`){let n=new URLSearchParams(d).get(`state`);return t===`emails`&&n===`completed`?e.emailsCompleted:t===`emails`?e.emailsWaiting:{ok:!0,jobs:[]}}}if(p[0]===`jobs`&&p[1]){let t=decodeURIComponent(p[1]);if(p[1]===`custom`&&p[2])return e.oneJob;if(p[2]===`result`)return{ok:!0,result:{sent:!0,provider:`demo`}};if(p[2]===`logs`)return{ok:!0,logs:[]};if(!p[2])return a[t]?{ok:!0,job:a[t]}:e.oneJob}if(p[0]===`db`){if(p[1]===`info`)return t;if(p[1]===`tables`&&!p[2])return n;if(p[1]===`tables`&&p[2]){let e=decodeURIComponent(p[2]);return p[3]===`schema`?i(e):p[3]===`cell`?{ok:!0,value:`demo cell value`}:l(e,d)}}return{ok:!0}}var f=e=>new Response(JSON.stringify(e),{status:200,headers:{"Content-Type":`application/json`}});function p(e){let t=new TextEncoder,n=[`emails`,`image-processing`,`reports`,`notifications`],r=[`job:active`,`job:completed`,`job:completed`,`job:waiting`,`job:failed`,`job:active`],i=new ReadableStream({start(i){let a=0,o=!1,s,c=()=>{if(!o){o=!0,clearInterval(s);try{i.close()}catch{}}};i.enqueue(t.encode(`data: {"connected":true}
|
|
2
2
|
|
|
3
|
-
`)),s=setInterval(()=>{if(o)return;let e=r[a%r.length],s=n[a%n.length],l=JSON.stringify({queue:s,jobId:`demo-${a}`,name:s,timestamp:Date.now()});try{i.enqueue(t.encode(`event: ${e}\ndata: ${l}\n\n`))}catch{c()}a+=1},1400),e?.aborted?c():e?.addEventListener(`abort`,c,{once:!0})}});return new Response(i,{status:200,headers:{"Content-Type":`text/event-stream`}})}var
|
|
3
|
+
`)),s=setInterval(()=>{if(o)return;let e=r[a%r.length],s=n[a%n.length],l=JSON.stringify({queue:s,jobId:`demo-${a}`,name:s,timestamp:Date.now()});try{i.enqueue(t.encode(`event: ${e}\ndata: ${l}\n\n`))}catch{c()}a+=1},1400),e?.aborted?c():e?.addEventListener(`abort`,c,{once:!0})}});return new Response(i,{status:200,headers:{"Content-Type":`text/event-stream`}})}var m=!1;function h(){if(m||typeof window>`u`)return;m=!0;let e=window.fetch.bind(window),t=`/`.replace(/\/+$/,``);window.fetch=((n,r)=>{let i=n instanceof Request?n:null,a=typeof n==`string`?n:n instanceof URL?n.href:i?.url??``,o=(r?.method??i?.method??`GET`).toUpperCase(),s;try{s=new URL(a,window.location.origin)}catch{return e(n,r)}let c=s.pathname;t&&(c===t||c.startsWith(`${t}/`))&&(c=c.slice(t.length)||`/`),(c===`/api`||c.startsWith(`/api/`))&&(c=c.slice(4)||`/`);let l=c.split(`/`).filter(Boolean)[0];return!l||!u.has(l)?e(n,r):l===`events`?Promise.resolve(p(r?.signal??i?.signal)):Promise.resolve(f(d(c,o,s.search)))})}export{h as installDemo};
|
package/dist/index.html
CHANGED
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
</script>
|
|
19
19
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
20
20
|
<title>bunqueue · dashboard (beta)</title>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-BFjeS9FG.js"></script>
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/cn-CMFYpumL.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CHIHtdAC.js">
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/connectionStore-
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/connectionStore-CCopJeU7.js">
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/index-BWY8Yofc.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue-dashboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web dashboard for a bunqueue server (queues, jobs, DLQ, cron, metrics, workers, live activity). Run with `bunx bunqueue-dashboard` (requires Bun).",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"start": "bun run scripts/dev.ts",
|
|
43
43
|
"dev": "vite",
|
|
44
44
|
"agent": "bun run agent/index.ts",
|
|
45
|
-
"build": "tsc --noEmit && vite build",
|
|
45
|
+
"build": "tsc --noEmit && tsc -p tsconfig.agent.json && vite build",
|
|
46
|
+
"typecheck:agent": "tsc -p tsconfig.agent.json",
|
|
46
47
|
"size": "bun run scripts/check-bundle.ts",
|
|
47
48
|
"docs:dev": "vitepress dev docs",
|
|
48
49
|
"docs:build": "vitepress build docs",
|
|
@@ -59,27 +60,28 @@
|
|
|
59
60
|
"@ai-sdk/google": "^4.0.8",
|
|
60
61
|
"@ai-sdk/openai": "^4.0.7",
|
|
61
62
|
"@ai-sdk/openai-compatible": "^3.0.5",
|
|
63
|
+
"@biomejs/biome": "^2.5.2",
|
|
62
64
|
"@fontsource-variable/inter": "^5.2.8",
|
|
63
65
|
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
64
|
-
"ai": "^7.0.14",
|
|
65
|
-
"react": "^19.2.7",
|
|
66
|
-
"react-dom": "^19.2.7",
|
|
67
|
-
"react-router-dom": "^7.18.1",
|
|
68
|
-
"zod": "^4.4.3",
|
|
69
|
-
"zustand": "^5.0.14",
|
|
70
|
-
"@biomejs/biome": "^2.5.2",
|
|
71
66
|
"@shikijs/vitepress-twoslash": "^4.3.0",
|
|
72
67
|
"@tailwindcss/vite": "^4.3.2",
|
|
73
68
|
"@types/node": "^26.0.1",
|
|
74
69
|
"@types/react": "^19.2.17",
|
|
75
70
|
"@types/react-dom": "^19.2.3",
|
|
76
71
|
"@vitejs/plugin-react": "^6.0.3",
|
|
72
|
+
"ai": "^7.0.14",
|
|
73
|
+
"bun-types": "^1.3.14",
|
|
77
74
|
"mermaid": "^11.16.0",
|
|
75
|
+
"react": "^19.2.7",
|
|
76
|
+
"react-dom": "^19.2.7",
|
|
77
|
+
"react-router-dom": "^7.18.1",
|
|
78
78
|
"tailwindcss": "^4.3.2",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
80
|
"vite": "^8.1.2",
|
|
81
81
|
"vitepress": "^1.6.4",
|
|
82
82
|
"vitepress-plugin-llms": "^1.13.2",
|
|
83
|
-
"vitepress-plugin-mermaid": "^2.0.17"
|
|
83
|
+
"vitepress-plugin-mermaid": "^2.0.17",
|
|
84
|
+
"zod": "^4.4.3",
|
|
85
|
+
"zustand": "^5.0.14"
|
|
84
86
|
}
|
|
85
87
|
}
|