bunqueue-dashboard 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/.vite/manifest.json +335 -608
  2. package/dist/assets/AddJob-Dgjlhzn2.js +3 -0
  3. package/dist/assets/Alerts-Lyzbq0qw.js +1 -0
  4. package/dist/assets/{AreaChart-BMYp7z5y.js → AreaChart-CSP0-00u.js} +1 -1
  5. package/dist/assets/Benchmark-B4NfYkAi.js +1 -0
  6. package/dist/assets/{BulkAddJobs-0cdWqkEF.js → BulkAddJobs-BAN5wT8A.js} +3 -3
  7. package/dist/assets/Cron-Bz46oVXB.js +1 -0
  8. package/dist/assets/CronManager-Cl5RW2cB.js +1 -0
  9. package/dist/assets/Database-CeUKS6Nf.js +3 -0
  10. package/dist/assets/Diagnostics-DuzTPfyb.js +1 -0
  11. package/dist/assets/Dlq-D8s-NhV2.js +1 -0
  12. package/dist/assets/DlqControl-DDxRMM8i.js +1 -0
  13. package/dist/assets/DlqPro-xj-MM6u8.js +1 -0
  14. package/dist/assets/Fleet-BAziMWfo.js +1 -0
  15. package/dist/assets/Flows-BFUMTSWv.js +2 -0
  16. package/dist/assets/JobInspector-BXuXxDwR.js +2 -0
  17. package/dist/assets/Jobs-pQBmffni.js +1 -0
  18. package/dist/assets/JobsPro-k20Pas24.js +1 -0
  19. package/dist/assets/Logs-DA4JFvpM.js +1 -0
  20. package/dist/assets/LogsPro-hna5L6sP.js +1 -0
  21. package/dist/assets/{McpServer-ffXr4nFW.js → McpServer-Cqem-L3z.js} +2 -2
  22. package/dist/assets/Metrics-CJ9dW0me.js +1 -0
  23. package/dist/assets/MetricsPro-BslYrx1A.js +1 -0
  24. package/dist/assets/Overview-Cmg_2NAt.js +1 -0
  25. package/dist/assets/Pagination-WVfHLHDS.js +1 -0
  26. package/dist/assets/{QueueActions-BgdW95rN.js → QueueActions-BQf1-g5m.js} +1 -1
  27. package/dist/assets/QueueControl-BiMM0jLp.js +1 -0
  28. package/dist/assets/QueueDetail-DfRY4jS4.js +1 -0
  29. package/dist/assets/QueueDetailPro-CpSMSo8A.js +1 -0
  30. package/dist/assets/Queues-C5lElTjp.js +1 -0
  31. package/dist/assets/QueuesOverview-DRohFtuC.js +1 -0
  32. package/dist/assets/S3Backup-DUHmp2Xw.js +1 -0
  33. package/dist/assets/S3BackupPro-Cr2ZJZkw.js +3 -0
  34. package/dist/assets/ServerControl-m58ooJT2.js +3 -0
  35. package/dist/assets/Settings-DXsjoOqD.js +1 -0
  36. package/dist/assets/{StatusBadge-cYUkK-4P.js → StatusBadge-D-mexaga.js} +1 -1
  37. package/dist/assets/Usage-CY2uEJEu.js +1 -0
  38. package/dist/assets/UsagePro-DtlB1dJc.js +1 -0
  39. package/dist/assets/Webhooks-B_GwTCBW.js +1 -0
  40. package/dist/assets/Workers-Bu8aJlZf.js +1 -0
  41. package/dist/assets/WorkersPro-C6gNYGfo.js +1 -0
  42. package/dist/assets/Workflows-ClF4YzhW.js +1 -0
  43. package/dist/assets/{api-Bbo86MB6.js → api-CCgfskjt.js} +1 -1
  44. package/dist/assets/{classicJobsData-BimIyQky.js → classicJobsData-wdIr-E4y.js} +1 -1
  45. package/dist/assets/connectionStore-B946Fhuv.js +1 -0
  46. package/dist/assets/controlConnectionEpoch-x9VjrWgN.js +1 -0
  47. package/dist/assets/{form-Dy-an7ew.js → form-DBkslwzu.js} +1 -1
  48. package/dist/assets/{icons-C1HVBnFn.js → icons-BIT5aq1c.js} +1 -1
  49. package/dist/assets/index-DR8flo6r.css +1 -0
  50. package/dist/assets/index-X_fHGbXZ.js +8 -0
  51. package/dist/assets/install-hFu5e6YM.js +3 -0
  52. package/dist/assets/package-Bb3FkjoS.js +1 -0
  53. package/dist/assets/react-vendor-08inPAVO.js +11 -0
  54. package/dist/assets/responses-YgpvqWEr.js +1 -0
  55. package/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  56. package/dist/assets/{useControlActionGuard-DImMgJtj.js → useControlActionGuard-Bx5MkufG.js} +1 -1
  57. package/dist/assets/{useServerActionGuard-Cr4KUOeZ.js → useServerActionGuard-uiZWD3dS.js} +1 -1
  58. package/dist/assets/useThroughputSeries-BN5QmKPt.js +1 -0
  59. package/dist/index.html +8 -16
  60. package/package.json +29 -36
  61. package/scripts/embedded.gen.ts +132 -148
  62. package/dist/assets/AddJob-jq-VZ_YE.js +0 -3
  63. package/dist/assets/Alerts-Bi8zLKXV.js +0 -1
  64. package/dist/assets/Benchmark-CWYdqm55.js +0 -1
  65. package/dist/assets/Button-BCjgbAhY.js +0 -1
  66. package/dist/assets/Card-DptfvL2O.js +0 -1
  67. package/dist/assets/Cron-dPGwJXqY.js +0 -1
  68. package/dist/assets/CronManager-C0-Y2QDg.js +0 -1
  69. package/dist/assets/Database-CseJOrvD.js +0 -3
  70. package/dist/assets/Diagnostics-cZTy4Y2t.js +0 -1
  71. package/dist/assets/Dlq-W2xOJiZM.js +0 -1
  72. package/dist/assets/DlqControl-CIV5278D.js +0 -1
  73. package/dist/assets/DlqPro-BuRxGtGt.js +0 -1
  74. package/dist/assets/Fleet-0zKJSjCw.js +0 -1
  75. package/dist/assets/Flows-CEfm102Y.js +0 -2
  76. package/dist/assets/JobInspector-BlMj5-Vr.js +0 -2
  77. package/dist/assets/Jobs-D_TId_Oa.js +0 -1
  78. package/dist/assets/JobsPro-A06ZG5Xi.js +0 -1
  79. package/dist/assets/Logs-hbh7XhQU.js +0 -1
  80. package/dist/assets/LogsPro-BgEIjgfj.js +0 -1
  81. package/dist/assets/Metrics-CIKZGgf0.js +0 -1
  82. package/dist/assets/MetricsPro-CK3WfLCl.js +0 -1
  83. package/dist/assets/Overview-BBgwyUn4.js +0 -1
  84. package/dist/assets/PageHeader-DD4vnVog.js +0 -1
  85. package/dist/assets/Pagination-Cj7GzYNX.js +0 -1
  86. package/dist/assets/QueueControl-g-9kwrpt.js +0 -1
  87. package/dist/assets/QueueDetail-Cv3MLDoE.js +0 -1
  88. package/dist/assets/QueueDetailPro-AhdOAzEF.js +0 -1
  89. package/dist/assets/Queues-Bbvh_OCE.js +0 -1
  90. package/dist/assets/QueuesOverview-sPQILfMU.js +0 -1
  91. package/dist/assets/S3Backup-Cg6sc2JG.js +0 -1
  92. package/dist/assets/S3BackupPro-BWV_R_Vj.js +0 -3
  93. package/dist/assets/ServerControl-Dr2gXbaU.js +0 -3
  94. package/dist/assets/Settings-BsDDlu-h.js +0 -1
  95. package/dist/assets/Usage-Cxx6pZfb.js +0 -1
  96. package/dist/assets/UsagePro-CkC8WYcS.js +0 -1
  97. package/dist/assets/Webhooks-BKWnALGC.js +0 -1
  98. package/dist/assets/Workers-SJ9MApx3.js +0 -1
  99. package/dist/assets/WorkersPro-BDgHBTpY.js +0 -1
  100. package/dist/assets/Workflows-Cp6jqKeM.js +0 -1
  101. package/dist/assets/bq-CSX8DSME.js +0 -1
  102. package/dist/assets/connectionStore-DdLzJyut.js +0 -1
  103. package/dist/assets/controlConnectionEpoch-D4HtriLM.js +0 -1
  104. package/dist/assets/feedback-Dxfj-Fy1.js +0 -1
  105. package/dist/assets/format-Cg7VCIZW.js +0 -1
  106. package/dist/assets/index-CxzFSZj3.js +0 -8
  107. package/dist/assets/index-DZXf58c2.css +0 -1
  108. package/dist/assets/install-DUkXE5kb.js +0 -3
  109. package/dist/assets/package-C7CtgBEy.js +0 -1
  110. package/dist/assets/react-vendor-DfC0iyIS.js +0 -11
  111. package/dist/assets/responses-BkR2JTH9.js +0 -1
  112. package/dist/assets/rolldown-runtime-QTnfLwEv.js +0 -1
  113. package/dist/assets/toastStore-DnqA_aL-.js +0 -1
  114. package/dist/assets/usePolledData-Dp_ynL9f.js +0 -1
  115. package/dist/assets/useThroughputSeries-CrTeR9s3.js +0 -1
  116. package/patches/ai@7.0.14.patch +0 -25
@@ -0,0 +1 @@
1
+ import{o as e}from"./upstreamPaths-DQeKSxGc.js";var t=10485760,n=10485760;function r(e,t=1/0){let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i<=127?n+=1:i<=2047?n+=2:i>=55296&&i<=56319&&r+1<e.length&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r+=1):n+=3,n>t)return n}return n}function i(e){return e.length>10485760||r(e,10485760)>10485760?`Job data is too large (maximum 10 MiB UTF-8 / 10,485,760 characters)`:null}function a(e){let t=i(e);if(t)return{ok:!1,kind:`size`,msg:t};let n;try{n=JSON.parse(e)}catch(e){return{ok:!1,kind:`json`,msg:`Invalid JSON: ${e.message}`}}let a=JSON.stringify(n);return a.length>10485760||r(a,10485760)>10485760?{ok:!1,kind:`size`,msg:`Job data is too large after JSON encoding (maximum 10 MiB UTF-8)`}:{ok:!0,data:n}}var o=31536e6,s=864e5,c=2097151;function l(e,t=!1){let n=[{key:`priority`,label:t?`Group priority`:`Priority`,min:t?0:-1e6,max:t?c:1e6},{key:`delay`,label:`Delay`,min:0,max:o},{key:`maxAttempts`,label:`Max attempts`,min:1,max:1e3},{key:`backoff`,label:`Backoff`,min:0,max:s},{key:`timeout`,label:`Timeout`,min:0,max:s},{key:`ttl`,label:`TTL`,min:0,max:o},{key:`groupMaxSize`,label:`Group max size`,min:1,max:2**53-1}],r={};for(let t of n){let n=(e[t.key]??``).trim();if(!n)continue;let i=Number(n);if(!Number.isFinite(i))return{ok:!1,msg:`${t.label} must be a number`};if(!Number.isSafeInteger(i))return{ok:!1,msg:`${t.label} must be a whole, safe integer`};if(i<t.min||i>t.max)return{ok:!1,msg:`${t.label} must be between ${t.min} and ${t.max}`};r[t.key]=i}return{ok:!0,options:r}}function u(t){let n=e(t);return!t&&n?`Choose a queue`:n}function d(e,t){return e==null?t?{ok:!1,msg:`Backoff strategy needs a base delay in Backoff (ms)`}:{ok:!0,backoff:void 0}:{ok:!0,backoff:t?{type:t,delay:e}:e}}function f(e){if(!e.trim())return{ok:!0,repeat:void 0};try{let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))return{ok:!1,msg:`Repeat must be a JSON object`};let n=t,r=new Set([`every`,`limit`,`pattern`]),i=Object.keys(n).filter(e=>!r.has(e));if(i.length)return{ok:!1,msg:`Unknown repeat option${i.length===1?``:`s`}: ${i.join(`, `)}`};if(n.pattern!==void 0)return{ok:!1,msg:`repeat.pattern is unsafe in bunqueue v2.9.3; use repeat.every or a Cron schedule`};let a=n.every;return!Number.isSafeInteger(a)||a<=0||a>31536e6?{ok:!1,msg:`Repeat "every" must be a whole number from 1 to ${o} ms`}:n.limit!==void 0&&(!Number.isSafeInteger(n.limit)||n.limit<1)?{ok:!1,msg:`Repeat "limit" must be a whole number of at least 1`}:{ok:!0,repeat:{every:a,...typeof n.limit==`number`?{limit:n.limit}:{}}}}catch(e){return{ok:!1,msg:`Repeat is not valid JSON: ${e.message}`}}}function p(e){let t=typeof e.backoff==`object`?e.backoff:void 0,n=e.backoffConfig??t;return{backoff:m(n?.delay??(typeof e.backoff==`number`?e.backoff:void 0)),backoffType:n?.type??``,tags:e.tags?.join(`, `)??``,groupId:e.groupId??``,ttl:m(e.ttl)}}var m=e=>e==null?``:String(e);function h(e,t){return{ok:!0,msg:`Accepted ${t} job submission${t===1?``:`s`}; server returned ${e} distinct job ID${e===1?``:`s`} (deduplication may reuse existing jobs)`}}function g(e){if(typeof e!=`object`||!e||e.ok!==!0||typeof e.id!=`string`||!e.id||e.id.length>1024)throw Error(`Add job returned a malformed success response`);return e.id}function _(e,t){let n=e?.ids;if(typeof e!=`object`||!e||e.ok!==!0||!Array.isArray(n)||n.length!==t||n.some(e=>typeof e!=`string`||e.length===0||e.length>1024))throw Error(`Bulk add returned a malformed success response`);return n}export{s as a,m as c,u as d,d as f,r as g,a as h,o as i,l,t as m,g as n,c as o,n as p,h as r,p as s,_ as t,f as u};
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{s as n,l as r,o as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{g as t}from"./react-vendor-DfC0iyIS.js";import{n,t as r}from"./controlConnectionEpoch-D4HtriLM.js";var i=e(t(),1),a=new Map;function o(e){let t=n(),o=`${t}\u0000${e}`,s=(0,i.useRef)(!1),c=(0,i.useRef)(0),l=(0,i.useRef)(o);return l.current!==o&&(l.current=o,c.current+=1),(0,i.useEffect)(()=>(s.current=!0,()=>{s.current=!1,c.current+=1}),[]),{scopeKey:o,begin:(e=`action`)=>{let n=[...new Set(typeof e==`string`?[e]:e)],i=n.map(e=>`${t}\u0000${e}`);if(!s.current||n.length===0||l.current!==o||r()!==t||i.some(e=>a.has(e)))return null;let u=Symbol(`control-action`);for(let e of i)a.set(e,u);let d=c.current,f=()=>s.current&&c.current===d&&l.current===o&&r()===t;return{isCurrent:f,finish:()=>{let e=f();for(let e of i)a.get(e)===u&&a.delete(e);return e}}}}}export{o as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{h as t}from"./react-vendor-08inPAVO.js";import{n,t as r}from"./controlConnectionEpoch-x9VjrWgN.js";var i=e(t(),1),a=new Map;function o(e){let t=n(),o=`${t}\u0000${e}`,s=(0,i.useRef)(!1),c=(0,i.useRef)(0),l=(0,i.useRef)(o);return l.current!==o&&(l.current=o,c.current+=1),(0,i.useEffect)(()=>(s.current=!0,()=>{s.current=!1,c.current+=1}),[]),{scopeKey:o,begin:(e=`action`)=>{let n=[...new Set(typeof e==`string`?[e]:e)],i=n.map(e=>`${t}\u0000${e}`);if(!s.current||n.length===0||l.current!==o||r()!==t||i.some(e=>a.has(e)))return null;let u=Symbol(`control-action`);for(let e of i)a.set(e,u);let d=c.current,f=()=>s.current&&c.current===d&&l.current===o&&r()===t;return{isCurrent:f,finish:()=>{let e=f();for(let e of i)a.get(e)===u&&a.delete(e);return e}}}}}export{o as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{g as t}from"./react-vendor-DfC0iyIS.js";import{a as n,o as r}from"./connectionStore-DdLzJyut.js";var i=e(t(),1),a=new Map;function o(){let e=r.getState().token.trim();return JSON.stringify([n(),e])}var s=0,c=o();r.subscribe(()=>{let e=o();e!==c&&(c=e,s+=1)});function l(e,t=`Operation`){if(typeof e!=`object`||!e||e.ok!==!0)throw Error(`${t} returned a malformed success response`)}function u(e){r(e=>`${e.baseUrl}\u0000${e.token}`);let t=o(),n=s,c=JSON.stringify([n,e]),l=(0,i.useRef)(!1),u=(0,i.useRef)(0),d=(0,i.useRef)(c);return d.current!==c&&(d.current=c,u.current+=1),(0,i.useEffect)(()=>{l.current=!0;let e=o(),t=r.subscribe(()=>{let t=o();t!==e&&(e=t,u.current+=1)});return()=>{l.current=!1,u.current+=1,t()}},[]),{scopeKey:c,begin:(r=`action`)=>{let i=[...new Set(typeof r==`string`?[r]:r)],f=i.map(t=>JSON.stringify([n,e,t]));if(!l.current||i.length===0||d.current!==c||s!==n||o()!==t||f.some(e=>a.has(e)))return null;let p=Symbol(`server-action`);for(let e of f)a.set(e,p);let m=u.current,h=()=>l.current&&u.current===m&&d.current===c&&s===n&&o()===t;return{isCurrent:h,finish:()=>{let e=h();for(let e of f)a.get(e)===p&&a.delete(e);return e}}}}}export{o as n,u as r,l as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{h as t}from"./react-vendor-08inPAVO.js";import{a as n,o as r}from"./connectionStore-B946Fhuv.js";var i=e(t(),1),a=new Map;function o(){let e=r.getState().token.trim();return JSON.stringify([n(),e])}var s=0,c=o();r.subscribe(()=>{let e=o();e!==c&&(c=e,s+=1)});function l(e,t=`Operation`){if(typeof e!=`object`||!e||e.ok!==!0)throw Error(`${t} returned a malformed success response`)}function u(e){r(e=>`${e.baseUrl}\u0000${e.token}`);let t=o(),n=s,c=JSON.stringify([n,e]),l=(0,i.useRef)(!1),u=(0,i.useRef)(0),d=(0,i.useRef)(c);return d.current!==c&&(d.current=c,u.current+=1),(0,i.useEffect)(()=>{l.current=!0;let e=o(),t=r.subscribe(()=>{let t=o();t!==e&&(e=t,u.current+=1)});return()=>{l.current=!1,u.current+=1,t()}},[]),{scopeKey:c,begin:(r=`action`)=>{let i=[...new Set(typeof r==`string`?[r]:r)],f=i.map(t=>JSON.stringify([n,e,t]));if(!l.current||i.length===0||d.current!==c||s!==n||o()!==t||f.some(e=>a.has(e)))return null;let p=Symbol(`server-action`);for(let e of f)a.set(e,p);let m=u.current,h=()=>l.current&&u.current===m&&d.current===c&&s===n&&o()===t;return{isCurrent:h,finish:()=>{let e=h();for(let e of f)a.get(e)===p&&a.delete(e);return e}}}}}export{o as n,u as r,l as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{h as t}from"./react-vendor-08inPAVO.js";import{o as n}from"./connectionStore-B946Fhuv.js";import{D as r,I as i}from"./index-X_fHGbXZ.js";var a=e(t(),1),o=1e3,s={push:[],complete:[],fail:[],depth:[]},c=()=>typeof performance<`u`?performance.now():Date.now(),l=(e,t)=>`${e}\u0000${t}`;function u(e=60){let t=l(n(e=>e.baseUrl),n(e=>e.token)),[u,d]=(0,a.useState)(s),[f,p]=(0,a.useState)(null),[m,h]=(0,a.useState)(null),g=(0,a.useRef)(0),_=(0,a.useRef)(0),v=(0,a.useRef)(t),y=v.current===t;return(0,a.useEffect)(()=>{let n=++g.current,a=new AbortController,l=!1;v.current!==t&&(v.current=t,d(s),p(null),h(null),_.current=0);let u=r(()=>globalThis.document?.hidden??!1),f=async()=>{if(l||!u())return;l=!0;let t=c();try{let[r,c]=await Promise.all([i.overview({signal:a.signal}),i.stats({signal:a.signal})]);if(a.signal.aborted||g.current!==n)return;let l=r?.stats,u=r?.throughput,f=c?.stats;if(!l||!u||!f)throw Error(`malformed telemetry body`);if(![l.waiting,l.active,l.delayed,l.completed,l.dlq,l.totalPushed,l.totalPulled,l.totalCompleted,l.totalFailed,l.uptime,u.pushPerSec,u.completePerSec,u.failPerSec,f.waiting,f.prioritized,f.active,f.delayed,f[`waiting-children`]].every(e=>typeof e==`number`&&Number.isFinite(e)))throw Error(`malformed telemetry numeric metrics`);let m=u.pushPerSec,v=u.completePerSec,y=u.failPerSec,b=f.waiting+f.prioritized+f.active+f.delayed+f[`waiting-children`],x=_.current>0&&t-_.current>4*o;_.current=t,p(r),h(null),d(t=>{let n=x?s:t;return{push:[...n.push,m].slice(-e),complete:[...n.complete,v].slice(-e),fail:[...n.fail,y].slice(-e),depth:[...n.depth,b].slice(-e)}})}catch(e){!a.signal.aborted&&g.current===n&&h(e)}finally{l=!1}};f();let m=setInterval(f,o);return()=>{clearInterval(m),a.abort(),g.current===n&&(g.current+=1)}},[e,t]),y?{...u,latest:f,error:m}:{...s,latest:null,error:null}}function d(e,t=o){if(e.length<2)return{slope:0,label:`steady`,draining:!1};let n=e.length,r=(n-1)/2,i=e.reduce((e,t)=>e+t,0)/n,a=0,s=0;for(let t=0;t<n;t++)a+=(t-r)*(e[t]-i),s+=(t-r)**2;let c=s===0?0:a/s,l=t>0?o/t*c:c,u=l<-.05;return{slope:l,label:u?`draining`:l>.05?`accumulating`:`steady`,draining:u}}export{u as n,d as t};
package/dist/index.html CHANGED
@@ -49,23 +49,15 @@
49
49
  content="Fully drive a bunqueue server from one UI: queues, jobs, DLQ, cron, webhooks, workers, and start/stop/restart. Live demo, no signup."
50
50
  />
51
51
  <meta name="twitter:image" content="https://egeominotti.github.io/bunqueue-dashboard/og.png" />
52
- <script type="module" crossorigin src="./assets/index-CxzFSZj3.js"></script>
53
- <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-QTnfLwEv.js">
54
- <link rel="modulepreload" crossorigin href="./assets/react-vendor-DfC0iyIS.js">
55
- <link rel="modulepreload" crossorigin href="./assets/connectionStore-DdLzJyut.js">
52
+ <script type="module" crossorigin src="./assets/index-X_fHGbXZ.js"></script>
53
+ <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-XKyaHtl9.js">
54
+ <link rel="modulepreload" crossorigin href="./assets/react-vendor-08inPAVO.js">
55
+ <link rel="modulepreload" crossorigin href="./assets/connectionStore-B946Fhuv.js">
56
56
  <link rel="modulepreload" crossorigin href="./assets/upstreamPaths-DQeKSxGc.js">
57
- <link rel="modulepreload" crossorigin href="./assets/bq-CSX8DSME.js">
58
- <link rel="modulepreload" crossorigin href="./assets/toastStore-DnqA_aL-.js">
59
- <link rel="modulepreload" crossorigin href="./assets/icons-C1HVBnFn.js">
60
- <link rel="modulepreload" crossorigin href="./assets/StatusBadge-cYUkK-4P.js">
61
- <link rel="modulepreload" crossorigin href="./assets/api-Bbo86MB6.js">
62
- <link rel="modulepreload" crossorigin href="./assets/usePolledData-Dp_ynL9f.js">
63
- <link rel="modulepreload" crossorigin href="./assets/Button-BCjgbAhY.js">
64
- <link rel="modulepreload" crossorigin href="./assets/Card-DptfvL2O.js">
65
- <link rel="modulepreload" crossorigin href="./assets/feedback-Dxfj-Fy1.js">
66
- <link rel="modulepreload" crossorigin href="./assets/PageHeader-DD4vnVog.js">
67
- <link rel="modulepreload" crossorigin href="./assets/format-Cg7VCIZW.js">
68
- <link rel="stylesheet" crossorigin href="./assets/index-DZXf58c2.css">
57
+ <link rel="modulepreload" crossorigin href="./assets/icons-BIT5aq1c.js">
58
+ <link rel="modulepreload" crossorigin href="./assets/StatusBadge-D-mexaga.js">
59
+ <link rel="modulepreload" crossorigin href="./assets/api-CCgfskjt.js">
60
+ <link rel="stylesheet" crossorigin href="./assets/index-DR8flo6r.css">
69
61
  </head>
70
62
  <body>
71
63
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunqueue-dashboard",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
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 1.4.4).",
6
6
  "packageManager": "bun@1.4.4",
@@ -15,8 +15,7 @@
15
15
  "scripts/bunVersion.ts",
16
16
  "scripts/embedded.gen.ts",
17
17
  "agent",
18
- "shared",
19
- "patches"
18
+ "shared"
20
19
  ],
21
20
  "publishConfig": {
22
21
  "access": "public"
@@ -85,8 +84,8 @@
85
84
  "test:soak": "bun scripts/validate-resilience.ts",
86
85
  "test:package": "bun run scripts/validate-package-runtime.ts",
87
86
  "test:coverage": "bun test --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage && bun scripts/check-coverage.ts && bun scripts/check-critical-coverage.ts && bun scripts/check-test-inventory.ts",
88
- "lint": "oxlint . && bun run scripts/check-implicit-any-let.ts",
89
- "lint:fix": "oxlint --fix . && bun run scripts/check-implicit-any-let.ts",
87
+ "lint": "bunx --bun --no-install oxlint .",
88
+ "lint:fix": "bunx --bun --no-install oxlint --fix .",
90
89
  "format": "bun fmt",
91
90
  "format:check": "bun fmt --check",
92
91
  "check": "bun run typecheck && bun run lint && bun run format:check",
@@ -104,57 +103,51 @@
104
103
  "test:e2e:docs": "bun run docs:build && playwright test -c playwright.docs.config.ts"
105
104
  },
106
105
  "devDependencies": {
107
- "@ai-sdk/anthropic": "^4.0.7",
108
- "@ai-sdk/google": "^4.0.8",
109
- "@ai-sdk/openai": "^4.0.7",
110
- "@ai-sdk/openai-compatible": "^3.0.5",
111
- "@axe-core/playwright": "4.13.0",
112
- "@fontsource-variable/inter": "^5.2.8",
113
- "@fontsource-variable/jetbrains-mono": "^5.2.8",
114
- "@modelcontextprotocol/sdk": "1.32.1",
115
- "@playwright/test": "1.62.1",
116
- "@shikijs/vitepress-twoslash": "4.4.3",
117
- "@tailwindcss/vite": "^4.3.2",
118
- "@types/node": "^26.0.1",
106
+ "@ai-sdk/anthropic": "^4.0.89",
107
+ "@ai-sdk/google": "^4.0.106",
108
+ "@ai-sdk/openai": "^4.0.103",
109
+ "@ai-sdk/openai-compatible": "^3.0.79",
110
+ "@axe-core/playwright": "4.14.0",
111
+ "@fontsource-variable/inter": "^5.3.0",
112
+ "@fontsource-variable/jetbrains-mono": "^5.3.0",
113
+ "@modelcontextprotocol/sdk": "1.32.2",
114
+ "@playwright/test": "1.64.1",
115
+ "@tailwindcss/vite": "^4.3.3",
116
+ "@types/node": "^26.6.5",
119
117
  "@types/react": "^19.3.0",
120
118
  "@types/react-dom": "^19.3.0",
121
- "@vitejs/plugin-react": "^6.0.3",
122
- "ai": "7.0.14",
119
+ "@vitejs/plugin-react": "^6.1.2",
120
+ "ai": "7.0.154",
123
121
  "bun-types": "1.4.4",
124
122
  "bunqueue-v2-9-2": "npm:bunqueue@2.9.2",
125
123
  "happy-dom": "^21.0.4",
126
124
  "mermaid": "^12.2.0",
127
- "oxlint": "^1.78.0",
128
- "oxlint-tsgolint": "^7.0.2001",
125
+ "oxlint": "^1.89.0",
126
+ "oxlint-tsgolint": "^7.0.2005",
129
127
  "react": "^19.3.1",
130
128
  "react-dom": "^19.3.1",
131
129
  "react-router-dom": "^7.18.4",
132
- "tailwindcss": "^4.3.2",
133
- "typescript": "^6.0.3",
134
- "vite": "^8.1.6",
135
- "vitepress": "2.0.0-alpha.20",
136
- "vitepress-plugin-llms": "^1.13.2",
130
+ "tailwindcss": "^4.3.3",
131
+ "vite": "^8.3.5",
132
+ "vitepress": "2.0.0-alpha.21",
133
+ "vitepress-plugin-llms": "^1.14.0",
137
134
  "zod": "^4.6.7",
138
- "zustand": "^5.0.14"
135
+ "zustand": "^5.0.16"
139
136
  },
140
137
  "overrides": {
141
138
  "brace-expansion": "^5.0.12",
142
139
  "dompurify": "^3.4.17",
143
140
  "fast-uri": "^3.1.9",
144
- "ip-address": "^10.7.4",
145
- "js-yaml": "^3.15.2",
141
+ "ip-address": "^10.7.5",
146
142
  "markdown-it": "^14.3.3",
147
- "nanoid": "^3.3.18",
148
- "postcss": "^8.5.25",
143
+ "nanoid": "^3.3.20",
144
+ "postcss": "^8.5.32",
149
145
  "proxy-addr": "^2.0.8",
150
146
  "source-map-js": "^1.2.2",
151
- "vue": "^3.5.42"
147
+ "vue": "^3.5.44"
152
148
  },
153
149
  "dependencies": {
154
150
  "bunqueue": "2.9.20",
155
- "msgpackr": "^1.11.8"
156
- },
157
- "patchedDependencies": {
158
- "ai@7.0.14": "patches/ai@7.0.14.patch"
151
+ "msgpackr": "^2.1.2"
159
152
  }
160
153
  }
@@ -3,159 +3,143 @@
3
3
  import f0 from "../dist/favicon.svg" with { type: 'file' };
4
4
  import f1 from "../dist/og.png" with { type: 'file' };
5
5
  import f2 from "../dist/.vite/manifest.json" with { type: 'file' };
6
- import f3 from "../dist/assets/DlqControl-CIV5278D.js" with { type: 'file' };
7
- import f4 from "../dist/assets/index-CxzFSZj3.js" with { type: 'file' };
8
- import f5 from "../dist/assets/QueueActions-BgdW95rN.js" with { type: 'file' };
9
- import f6 from "../dist/assets/AddJob-jq-VZ_YE.js" with { type: 'file' };
10
- import f7 from "../dist/assets/package-C7CtgBEy.js" with { type: 'file' };
11
- import f8 from "../dist/assets/QueueDetail-Cv3MLDoE.js" with { type: 'file' };
12
- import f9 from "../dist/assets/useServerActionGuard-Cr4KUOeZ.js" with { type: 'file' };
6
+ import f3 from "../dist/assets/connectionStore-B946Fhuv.js" with { type: 'file' };
7
+ import f4 from "../dist/assets/QueueActions-BQf1-g5m.js" with { type: 'file' };
8
+ import f5 from "../dist/assets/classicJobsData-wdIr-E4y.js" with { type: 'file' };
9
+ import f6 from "../dist/assets/Workers-Bu8aJlZf.js" with { type: 'file' };
10
+ import f7 from "../dist/assets/UsagePro-DtlB1dJc.js" with { type: 'file' };
11
+ import f8 from "../dist/assets/package-Bb3FkjoS.js" with { type: 'file' };
12
+ import f9 from "../dist/assets/JobsPro-k20Pas24.js" with { type: 'file' };
13
13
  import f10 from "../dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2" with { type: 'file' };
14
- import f11 from "../dist/assets/icons-C1HVBnFn.js" with { type: 'file' };
15
- import f12 from "../dist/assets/BulkAddJobs-0cdWqkEF.js" with { type: 'file' };
16
- import f13 from "../dist/assets/Flows-CEfm102Y.js" with { type: 'file' };
17
- import f14 from "../dist/assets/CronManager-C0-Y2QDg.js" with { type: 'file' };
18
- import f15 from "../dist/assets/Dlq-W2xOJiZM.js" with { type: 'file' };
19
- import f16 from "../dist/assets/UsagePro-CkC8WYcS.js" with { type: 'file' };
20
- import f17 from "../dist/assets/promisePool-BVfQ9n9Q.js" with { type: 'file' };
21
- import f18 from "../dist/assets/Card-DptfvL2O.js" with { type: 'file' };
22
- import f19 from "../dist/assets/feedback-Dxfj-Fy1.js" with { type: 'file' };
23
- import f20 from "../dist/assets/AreaChart-BMYp7z5y.js" with { type: 'file' };
24
- import f21 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
25
- import f22 from "../dist/assets/usePolledData-Dp_ynL9f.js" with { type: 'file' };
26
- import f23 from "../dist/assets/DlqPro-BuRxGtGt.js" with { type: 'file' };
27
- import f24 from "../dist/assets/Cron-dPGwJXqY.js" with { type: 'file' };
28
- import f25 from "../dist/assets/JobInspector-BlMj5-Vr.js" with { type: 'file' };
29
- import f26 from "../dist/assets/Queues-Bbvh_OCE.js" with { type: 'file' };
30
- import f27 from "../dist/assets/LogsPro-BgEIjgfj.js" with { type: 'file' };
31
- import f28 from "../dist/assets/MetricsPro-CK3WfLCl.js" with { type: 'file' };
32
- import f29 from "../dist/assets/index-DZXf58c2.css" with { type: 'file' };
33
- import f30 from "../dist/assets/exportFile-C7xhE8Yh.js" with { type: 'file' };
34
- import f31 from "../dist/assets/Button-BCjgbAhY.js" with { type: 'file' };
35
- import f32 from "../dist/assets/Database-CseJOrvD.js" with { type: 'file' };
36
- import f33 from "../dist/assets/StatusBadge-cYUkK-4P.js" with { type: 'file' };
37
- import f34 from "../dist/assets/WorkersPro-BDgHBTpY.js" with { type: 'file' };
38
- import f35 from "../dist/assets/controlConnectionEpoch-D4HtriLM.js" with { type: 'file' };
39
- import f36 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
40
- import f37 from "../dist/assets/McpServer-ffXr4nFW.js" with { type: 'file' };
41
- import f38 from "../dist/assets/upstreamPaths-DQeKSxGc.js" with { type: 'file' };
42
- import f39 from "../dist/assets/ServerControl-Dr2gXbaU.js" with { type: 'file' };
43
- import f40 from "../dist/assets/responses-BkR2JTH9.js" with { type: 'file' };
44
- import f41 from "../dist/assets/toastStore-DnqA_aL-.js" with { type: 'file' };
45
- import f42 from "../dist/assets/S3BackupPro-BWV_R_Vj.js" with { type: 'file' };
46
- import f43 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
47
- import f44 from "../dist/assets/Pagination-Cj7GzYNX.js" with { type: 'file' };
48
- import f45 from "../dist/assets/connectionStore-DdLzJyut.js" with { type: 'file' };
49
- import f46 from "../dist/assets/useThroughputSeries-CrTeR9s3.js" with { type: 'file' };
50
- import f47 from "../dist/assets/useControlActionGuard-DImMgJtj.js" with { type: 'file' };
51
- import f48 from "../dist/assets/Webhooks-BKWnALGC.js" with { type: 'file' };
52
- import f49 from "../dist/assets/Usage-Cxx6pZfb.js" with { type: 'file' };
53
- import f50 from "../dist/assets/QueueDetailPro-AhdOAzEF.js" with { type: 'file' };
54
- import f51 from "../dist/assets/install-DUkXE5kb.js" with { type: 'file' };
55
- import f52 from "../dist/assets/Workflows-Cp6jqKeM.js" with { type: 'file' };
56
- import f53 from "../dist/assets/flowOperationPolicy-B2Etcb3f.js" with { type: 'file' };
57
- import f54 from "../dist/assets/classicJobsData-BimIyQky.js" with { type: 'file' };
58
- import f55 from "../dist/assets/Metrics-CIKZGgf0.js" with { type: 'file' };
59
- import f56 from "../dist/assets/flowMutationSafety-YKTHxqKv.js" with { type: 'file' };
60
- import f57 from "../dist/assets/PageHeader-DD4vnVog.js" with { type: 'file' };
61
- import f58 from "../dist/assets/rolldown-runtime-QTnfLwEv.js" with { type: 'file' };
62
- import f59 from "../dist/assets/QueueControl-g-9kwrpt.js" with { type: 'file' };
63
- import f60 from "../dist/assets/Jobs-D_TId_Oa.js" with { type: 'file' };
64
- import f61 from "../dist/assets/api-Bbo86MB6.js" with { type: 'file' };
65
- import f62 from "../dist/assets/Benchmark-CWYdqm55.js" with { type: 'file' };
66
- import f63 from "../dist/assets/S3Backup-Cg6sc2JG.js" with { type: 'file' };
67
- import f64 from "../dist/assets/bq-CSX8DSME.js" with { type: 'file' };
68
- import f65 from "../dist/assets/Fleet-0zKJSjCw.js" with { type: 'file' };
69
- import f66 from "../dist/assets/JobsPro-A06ZG5Xi.js" with { type: 'file' };
70
- import f67 from "../dist/assets/format-Cg7VCIZW.js" with { type: 'file' };
71
- import f68 from "../dist/assets/Logs-hbh7XhQU.js" with { type: 'file' };
72
- import f69 from "../dist/assets/form-Dy-an7ew.js" with { type: 'file' };
73
- import f70 from "../dist/assets/QueuesOverview-sPQILfMU.js" with { type: 'file' };
74
- import f71 from "../dist/assets/Diagnostics-cZTy4Y2t.js" with { type: 'file' };
75
- import f72 from "../dist/assets/Settings-BsDDlu-h.js" with { type: 'file' };
76
- import f73 from "../dist/assets/Workers-SJ9MApx3.js" with { type: 'file' };
77
- import f74 from "../dist/assets/react-vendor-DfC0iyIS.js" with { type: 'file' };
78
- import f75 from "../dist/assets/Overview-BBgwyUn4.js" with { type: 'file' };
79
- import f76 from "../dist/assets/Alerts-Bi8zLKXV.js" with { type: 'file' };
80
- import f77 from "../dist/index.html" with { type: 'file' };
14
+ import f11 from "../dist/assets/Workflows-ClF4YzhW.js" with { type: 'file' };
15
+ import f12 from "../dist/assets/rolldown-runtime-XKyaHtl9.js" with { type: 'file' };
16
+ import f13 from "../dist/assets/responses-YgpvqWEr.js" with { type: 'file' };
17
+ import f14 from "../dist/assets/form-DBkslwzu.js" with { type: 'file' };
18
+ import f15 from "../dist/assets/promisePool-BVfQ9n9Q.js" with { type: 'file' };
19
+ import f16 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
20
+ import f17 from "../dist/assets/index-DR8flo6r.css" with { type: 'file' };
21
+ import f18 from "../dist/assets/Logs-DA4JFvpM.js" with { type: 'file' };
22
+ import f19 from "../dist/assets/Overview-Cmg_2NAt.js" with { type: 'file' };
23
+ import f20 from "../dist/assets/QueueDetailPro-CpSMSo8A.js" with { type: 'file' };
24
+ import f21 from "../dist/assets/react-vendor-08inPAVO.js" with { type: 'file' };
25
+ import f22 from "../dist/assets/Benchmark-B4NfYkAi.js" with { type: 'file' };
26
+ import f23 from "../dist/assets/Dlq-D8s-NhV2.js" with { type: 'file' };
27
+ import f24 from "../dist/assets/S3BackupPro-Cr2ZJZkw.js" with { type: 'file' };
28
+ import f25 from "../dist/assets/Queues-C5lElTjp.js" with { type: 'file' };
29
+ import f26 from "../dist/assets/StatusBadge-D-mexaga.js" with { type: 'file' };
30
+ import f27 from "../dist/assets/exportFile-C7xhE8Yh.js" with { type: 'file' };
31
+ import f28 from "../dist/assets/WorkersPro-C6gNYGfo.js" with { type: 'file' };
32
+ import f29 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
33
+ import f30 from "../dist/assets/Fleet-BAziMWfo.js" with { type: 'file' };
34
+ import f31 from "../dist/assets/icons-BIT5aq1c.js" with { type: 'file' };
35
+ import f32 from "../dist/assets/upstreamPaths-DQeKSxGc.js" with { type: 'file' };
36
+ import f33 from "../dist/assets/index-X_fHGbXZ.js" with { type: 'file' };
37
+ import f34 from "../dist/assets/S3Backup-DUHmp2Xw.js" with { type: 'file' };
38
+ import f35 from "../dist/assets/BulkAddJobs-BAN5wT8A.js" with { type: 'file' };
39
+ import f36 from "../dist/assets/AddJob-Dgjlhzn2.js" with { type: 'file' };
40
+ import f37 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
41
+ import f38 from "../dist/assets/Database-CeUKS6Nf.js" with { type: 'file' };
42
+ import f39 from "../dist/assets/Webhooks-B_GwTCBW.js" with { type: 'file' };
43
+ import f40 from "../dist/assets/LogsPro-hna5L6sP.js" with { type: 'file' };
44
+ import f41 from "../dist/assets/Alerts-Lyzbq0qw.js" with { type: 'file' };
45
+ import f42 from "../dist/assets/ServerControl-m58ooJT2.js" with { type: 'file' };
46
+ import f43 from "../dist/assets/Metrics-CJ9dW0me.js" with { type: 'file' };
47
+ import f44 from "../dist/assets/AreaChart-CSP0-00u.js" with { type: 'file' };
48
+ import f45 from "../dist/assets/flowOperationPolicy-B2Etcb3f.js" with { type: 'file' };
49
+ import f46 from "../dist/assets/Pagination-WVfHLHDS.js" with { type: 'file' };
50
+ import f47 from "../dist/assets/controlConnectionEpoch-x9VjrWgN.js" with { type: 'file' };
51
+ import f48 from "../dist/assets/Flows-BFUMTSWv.js" with { type: 'file' };
52
+ import f49 from "../dist/assets/flowMutationSafety-YKTHxqKv.js" with { type: 'file' };
53
+ import f50 from "../dist/assets/Diagnostics-DuzTPfyb.js" with { type: 'file' };
54
+ import f51 from "../dist/assets/McpServer-Cqem-L3z.js" with { type: 'file' };
55
+ import f52 from "../dist/assets/useThroughputSeries-BN5QmKPt.js" with { type: 'file' };
56
+ import f53 from "../dist/assets/JobInspector-BXuXxDwR.js" with { type: 'file' };
57
+ import f54 from "../dist/assets/Cron-Bz46oVXB.js" with { type: 'file' };
58
+ import f55 from "../dist/assets/CronManager-Cl5RW2cB.js" with { type: 'file' };
59
+ import f56 from "../dist/assets/QueueControl-BiMM0jLp.js" with { type: 'file' };
60
+ import f57 from "../dist/assets/QueuesOverview-DRohFtuC.js" with { type: 'file' };
61
+ import f58 from "../dist/assets/useServerActionGuard-uiZWD3dS.js" with { type: 'file' };
62
+ import f59 from "../dist/assets/install-hFu5e6YM.js" with { type: 'file' };
63
+ import f60 from "../dist/assets/DlqPro-xj-MM6u8.js" with { type: 'file' };
64
+ import f61 from "../dist/assets/DlqControl-DDxRMM8i.js" with { type: 'file' };
65
+ import f62 from "../dist/assets/QueueDetail-DfRY4jS4.js" with { type: 'file' };
66
+ import f63 from "../dist/assets/Usage-CY2uEJEu.js" with { type: 'file' };
67
+ import f64 from "../dist/assets/api-CCgfskjt.js" with { type: 'file' };
68
+ import f65 from "../dist/assets/useControlActionGuard-Bx5MkufG.js" with { type: 'file' };
69
+ import f66 from "../dist/assets/Jobs-pQBmffni.js" with { type: 'file' };
70
+ import f67 from "../dist/assets/MetricsPro-BslYrx1A.js" with { type: 'file' };
71
+ import f68 from "../dist/assets/Settings-DXsjoOqD.js" with { type: 'file' };
72
+ import f69 from "../dist/index.html" with { type: 'file' };
81
73
 
82
74
  export const ASSETS: Record<string, string> = {
83
75
  "/favicon.svg": f0,
84
76
  "/og.png": f1,
85
77
  "/.vite/manifest.json": f2,
86
- "/assets/DlqControl-CIV5278D.js": f3,
87
- "/assets/index-CxzFSZj3.js": f4,
88
- "/assets/QueueActions-BgdW95rN.js": f5,
89
- "/assets/AddJob-jq-VZ_YE.js": f6,
90
- "/assets/package-C7CtgBEy.js": f7,
91
- "/assets/QueueDetail-Cv3MLDoE.js": f8,
92
- "/assets/useServerActionGuard-Cr4KUOeZ.js": f9,
78
+ "/assets/connectionStore-B946Fhuv.js": f3,
79
+ "/assets/QueueActions-BQf1-g5m.js": f4,
80
+ "/assets/classicJobsData-wdIr-E4y.js": f5,
81
+ "/assets/Workers-Bu8aJlZf.js": f6,
82
+ "/assets/UsagePro-DtlB1dJc.js": f7,
83
+ "/assets/package-Bb3FkjoS.js": f8,
84
+ "/assets/JobsPro-k20Pas24.js": f9,
93
85
  "/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": f10,
94
- "/assets/icons-C1HVBnFn.js": f11,
95
- "/assets/BulkAddJobs-0cdWqkEF.js": f12,
96
- "/assets/Flows-CEfm102Y.js": f13,
97
- "/assets/CronManager-C0-Y2QDg.js": f14,
98
- "/assets/Dlq-W2xOJiZM.js": f15,
99
- "/assets/UsagePro-CkC8WYcS.js": f16,
100
- "/assets/promisePool-BVfQ9n9Q.js": f17,
101
- "/assets/Card-DptfvL2O.js": f18,
102
- "/assets/feedback-Dxfj-Fy1.js": f19,
103
- "/assets/AreaChart-BMYp7z5y.js": f20,
104
- "/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f21,
105
- "/assets/usePolledData-Dp_ynL9f.js": f22,
106
- "/assets/DlqPro-BuRxGtGt.js": f23,
107
- "/assets/Cron-dPGwJXqY.js": f24,
108
- "/assets/JobInspector-BlMj5-Vr.js": f25,
109
- "/assets/Queues-Bbvh_OCE.js": f26,
110
- "/assets/LogsPro-BgEIjgfj.js": f27,
111
- "/assets/MetricsPro-CK3WfLCl.js": f28,
112
- "/assets/index-DZXf58c2.css": f29,
113
- "/assets/exportFile-C7xhE8Yh.js": f30,
114
- "/assets/Button-BCjgbAhY.js": f31,
115
- "/assets/Database-CseJOrvD.js": f32,
116
- "/assets/StatusBadge-cYUkK-4P.js": f33,
117
- "/assets/WorkersPro-BDgHBTpY.js": f34,
118
- "/assets/controlConnectionEpoch-D4HtriLM.js": f35,
119
- "/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f36,
120
- "/assets/McpServer-ffXr4nFW.js": f37,
121
- "/assets/upstreamPaths-DQeKSxGc.js": f38,
122
- "/assets/ServerControl-Dr2gXbaU.js": f39,
123
- "/assets/responses-BkR2JTH9.js": f40,
124
- "/assets/toastStore-DnqA_aL-.js": f41,
125
- "/assets/S3BackupPro-BWV_R_Vj.js": f42,
126
- "/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f43,
127
- "/assets/Pagination-Cj7GzYNX.js": f44,
128
- "/assets/connectionStore-DdLzJyut.js": f45,
129
- "/assets/useThroughputSeries-CrTeR9s3.js": f46,
130
- "/assets/useControlActionGuard-DImMgJtj.js": f47,
131
- "/assets/Webhooks-BKWnALGC.js": f48,
132
- "/assets/Usage-Cxx6pZfb.js": f49,
133
- "/assets/QueueDetailPro-AhdOAzEF.js": f50,
134
- "/assets/install-DUkXE5kb.js": f51,
135
- "/assets/Workflows-Cp6jqKeM.js": f52,
136
- "/assets/flowOperationPolicy-B2Etcb3f.js": f53,
137
- "/assets/classicJobsData-BimIyQky.js": f54,
138
- "/assets/Metrics-CIKZGgf0.js": f55,
139
- "/assets/flowMutationSafety-YKTHxqKv.js": f56,
140
- "/assets/PageHeader-DD4vnVog.js": f57,
141
- "/assets/rolldown-runtime-QTnfLwEv.js": f58,
142
- "/assets/QueueControl-g-9kwrpt.js": f59,
143
- "/assets/Jobs-D_TId_Oa.js": f60,
144
- "/assets/api-Bbo86MB6.js": f61,
145
- "/assets/Benchmark-CWYdqm55.js": f62,
146
- "/assets/S3Backup-Cg6sc2JG.js": f63,
147
- "/assets/bq-CSX8DSME.js": f64,
148
- "/assets/Fleet-0zKJSjCw.js": f65,
149
- "/assets/JobsPro-A06ZG5Xi.js": f66,
150
- "/assets/format-Cg7VCIZW.js": f67,
151
- "/assets/Logs-hbh7XhQU.js": f68,
152
- "/assets/form-Dy-an7ew.js": f69,
153
- "/assets/QueuesOverview-sPQILfMU.js": f70,
154
- "/assets/Diagnostics-cZTy4Y2t.js": f71,
155
- "/assets/Settings-BsDDlu-h.js": f72,
156
- "/assets/Workers-SJ9MApx3.js": f73,
157
- "/assets/react-vendor-DfC0iyIS.js": f74,
158
- "/assets/Overview-BBgwyUn4.js": f75,
159
- "/assets/Alerts-Bi8zLKXV.js": f76,
160
- "/index.html": f77,
86
+ "/assets/Workflows-ClF4YzhW.js": f11,
87
+ "/assets/rolldown-runtime-XKyaHtl9.js": f12,
88
+ "/assets/responses-YgpvqWEr.js": f13,
89
+ "/assets/form-DBkslwzu.js": f14,
90
+ "/assets/promisePool-BVfQ9n9Q.js": f15,
91
+ "/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f16,
92
+ "/assets/index-DR8flo6r.css": f17,
93
+ "/assets/Logs-DA4JFvpM.js": f18,
94
+ "/assets/Overview-Cmg_2NAt.js": f19,
95
+ "/assets/QueueDetailPro-CpSMSo8A.js": f20,
96
+ "/assets/react-vendor-08inPAVO.js": f21,
97
+ "/assets/Benchmark-B4NfYkAi.js": f22,
98
+ "/assets/Dlq-D8s-NhV2.js": f23,
99
+ "/assets/S3BackupPro-Cr2ZJZkw.js": f24,
100
+ "/assets/Queues-C5lElTjp.js": f25,
101
+ "/assets/StatusBadge-D-mexaga.js": f26,
102
+ "/assets/exportFile-C7xhE8Yh.js": f27,
103
+ "/assets/WorkersPro-C6gNYGfo.js": f28,
104
+ "/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f29,
105
+ "/assets/Fleet-BAziMWfo.js": f30,
106
+ "/assets/icons-BIT5aq1c.js": f31,
107
+ "/assets/upstreamPaths-DQeKSxGc.js": f32,
108
+ "/assets/index-X_fHGbXZ.js": f33,
109
+ "/assets/S3Backup-DUHmp2Xw.js": f34,
110
+ "/assets/BulkAddJobs-BAN5wT8A.js": f35,
111
+ "/assets/AddJob-Dgjlhzn2.js": f36,
112
+ "/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f37,
113
+ "/assets/Database-CeUKS6Nf.js": f38,
114
+ "/assets/Webhooks-B_GwTCBW.js": f39,
115
+ "/assets/LogsPro-hna5L6sP.js": f40,
116
+ "/assets/Alerts-Lyzbq0qw.js": f41,
117
+ "/assets/ServerControl-m58ooJT2.js": f42,
118
+ "/assets/Metrics-CJ9dW0me.js": f43,
119
+ "/assets/AreaChart-CSP0-00u.js": f44,
120
+ "/assets/flowOperationPolicy-B2Etcb3f.js": f45,
121
+ "/assets/Pagination-WVfHLHDS.js": f46,
122
+ "/assets/controlConnectionEpoch-x9VjrWgN.js": f47,
123
+ "/assets/Flows-BFUMTSWv.js": f48,
124
+ "/assets/flowMutationSafety-YKTHxqKv.js": f49,
125
+ "/assets/Diagnostics-DuzTPfyb.js": f50,
126
+ "/assets/McpServer-Cqem-L3z.js": f51,
127
+ "/assets/useThroughputSeries-BN5QmKPt.js": f52,
128
+ "/assets/JobInspector-BXuXxDwR.js": f53,
129
+ "/assets/Cron-Bz46oVXB.js": f54,
130
+ "/assets/CronManager-Cl5RW2cB.js": f55,
131
+ "/assets/QueueControl-BiMM0jLp.js": f56,
132
+ "/assets/QueuesOverview-DRohFtuC.js": f57,
133
+ "/assets/useServerActionGuard-uiZWD3dS.js": f58,
134
+ "/assets/install-hFu5e6YM.js": f59,
135
+ "/assets/DlqPro-xj-MM6u8.js": f60,
136
+ "/assets/DlqControl-DDxRMM8i.js": f61,
137
+ "/assets/QueueDetail-DfRY4jS4.js": f62,
138
+ "/assets/Usage-CY2uEJEu.js": f63,
139
+ "/assets/api-CCgfskjt.js": f64,
140
+ "/assets/useControlActionGuard-Bx5MkufG.js": f65,
141
+ "/assets/Jobs-pQBmffni.js": f66,
142
+ "/assets/MetricsPro-BslYrx1A.js": f67,
143
+ "/assets/Settings-DXsjoOqD.js": f68,
144
+ "/index.html": f69,
161
145
  };
@@ -1,3 +0,0 @@
1
- import{n as e,r as t}from"./rolldown-runtime-QTnfLwEv.js";import{g as n,l as r,r as i,t as a}from"./react-vendor-DfC0iyIS.js";import{i as o}from"./upstreamPaths-DQeKSxGc.js";import{r as s,t as c}from"./bq-CSX8DSME.js";import{t as l}from"./toastStore-DnqA_aL-.js";import{n as u}from"./usePolledData-Dp_ynL9f.js";import{t as d}from"./Button-BCjgbAhY.js";import{n as f,t as p}from"./Card-DptfvL2O.js";import{t as m}from"./PageHeader-DD4vnVog.js";import{a as h,n as g,o as _,t as v}from"./form-Dy-an7ew.js";import{r as y}from"./useServerActionGuard-Cr4KUOeZ.js";import{a as b,c as x,d as S,f as C,h as w,i as T,l as E,m as D,n as O,o as k,r as A,s as j,t as M,u as N}from"./responses-BkR2JTH9.js";var P=t(n(),1),F=a();function I({values:e,setValue:t,queueNames:n,queueDiscoveryError:r,onRetryQueues:i,jsonError:a,setJsonError:o}){return(0,F.jsxs)(p,{children:[(0,F.jsx)(f,{title:`Job`}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsxs)(v,{label:`Queue`,children:[(0,F.jsx)(g,{list:`queue-options`,"aria-label":`Queue`,name:`target-queue`,autoComplete:`off`,value:e.queue,onChange:e=>t(`queue`,e.target.value),placeholder:`queue name (existing or new)`}),(0,F.jsx)(`datalist`,{id:`queue-options`,children:n.map(e=>(0,F.jsx)(`option`,{value:e},e))})]}),(0,F.jsx)(v,{label:`Job name`,hint:`Worker routing name in Bunqueue 2.9.3; separate from the JSON payload.`,children:(0,F.jsx)(g,{name:`job-name`,autoComplete:`off`,maxLength:256,value:e.name,onChange:e=>t(`name`,e.target.value),placeholder:`default`})}),r&&(0,F.jsxs)(`p`,{role:`status`,className:`-mt-2 text-xs text-warning`,children:[`Existing queue suggestions unavailable — `,r.message,`. You can still enter a queue name manually.`,` `,(0,F.jsx)(`button`,{type:`button`,onClick:i,className:`font-medium underline underline-offset-2 hover:text-fg`,children:`Retry`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(v,{label:`Data (JSON)`,children:(0,F.jsx)(`textarea`,{name:`job-data`,value:e.dataText,onChange:e=>t(`dataText`,e.target.value),onBlur:()=>{let t=w(e.dataText);o(t.ok?null:t.msg)},maxLength:D,spellCheck:!1,rows:7,className:`w-full rounded-lg border border-line bg-surface-2 p-3 font-mono text-sm text-fg focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})}),a&&(0,F.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-danger`,children:a})]})]})]})}function L({values:e,setValue:t}){return(0,F.jsxs)(p,{children:[(0,F.jsx)(f,{title:`Options`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:[(0,F.jsx)(B,{label:e.groupId.trim()?`Group priority`:`Priority`,hint:e.groupId.trim()?`0 is highest within this group`:void 0,name:`priority`,value:e.priority,min:e.groupId.trim()?0:-1e6,max:e.groupId.trim()?k:1e6,placeholder:`0`,onChange:e=>t(`priority`,e)}),(0,F.jsx)(B,{label:`Delay (ms)`,name:`delay`,value:e.delay,min:0,max:T,placeholder:`0`,disabled:e.runAt.trim()!==``,onChange:e=>t(`delay`,e)}),(0,F.jsx)(v,{label:`Run at`,hint:e.runAt.trim()?`Overrides Delay — derived from this time (local time).`:`(local time)`,children:(0,F.jsx)(g,{type:`datetime-local`,name:`run-at`,value:e.runAt,onChange:e=>t(`runAt`,e.target.value)})}),(0,F.jsx)(B,{label:`Max attempts`,hint:`blank = server default`,name:`max-attempts`,value:e.maxAttempts,min:1,max:1e3,placeholder:`3`,onChange:e=>t(`maxAttempts`,e)}),(0,F.jsx)(B,{label:`Backoff (ms)`,hint:`blank = server default`,name:`backoff`,value:e.backoff,min:0,max:b,placeholder:`1000`,onChange:e=>t(`backoff`,e)}),(0,F.jsx)(v,{label:`Backoff strategy`,hint:`flat delay unless set`,children:(0,F.jsxs)(h,{name:`backoff-strategy`,value:e.backoffType,onChange:e=>t(`backoffType`,e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:`flat`}),(0,F.jsx)(`option`,{value:`fixed`,children:`fixed`}),(0,F.jsx)(`option`,{value:`exponential`,children:`exponential`})]})}),(0,F.jsx)(B,{label:`Timeout (ms)`,name:`timeout`,value:e.timeout,min:0,max:b,placeholder:`—`,onChange:e=>t(`timeout`,e)}),(0,F.jsx)(B,{label:`TTL (ms)`,hint:`blank = no expiry`,name:`ttl`,value:e.ttl,min:0,max:T,placeholder:`—`,onChange:e=>t(`ttl`,e)}),(0,F.jsx)(v,{label:`Custom job ID`,children:(0,F.jsx)(g,{name:`custom-job-id`,value:e.jobId,onChange:e=>t(`jobId`,e.target.value),placeholder:`idempotency key`})})]}),(0,F.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-6`,children:[(0,F.jsx)(V,{label:`removeOnComplete`,checked:e.removeOnComplete,onChange:e=>t(`removeOnComplete`,e)}),(0,F.jsx)(V,{label:`removeOnFail`,checked:e.removeOnFail,onChange:e=>t(`removeOnFail`,e)}),(0,F.jsx)(V,{label:`durable`,checked:e.durable,onChange:e=>t(`durable`,e)}),(0,F.jsx)(V,{label:`lifo`,checked:e.lifo,onChange:e=>t(`lifo`,e)})]}),(0,F.jsx)(R,{values:e,setValue:t})]})}function R({values:e,setValue:t}){return(0,F.jsxs)(`div`,{className:`mt-4 border-t border-line pt-4`,children:[(0,F.jsx)(`div`,{className:`mb-3 text-[11px] uppercase tracking-wider text-faint`,children:`Advanced`}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:[(0,F.jsx)(z,{label:`Tags`,hint:`comma-separated`,name:`tags`,value:e.tags,placeholder:`email, urgent`,onChange:e=>t(`tags`,e)}),(0,F.jsx)(z,{label:`Group ID`,name:`group-id`,value:e.groupId,placeholder:`—`,onChange:e=>t(`groupId`,e)}),(0,F.jsx)(B,{label:`Group max size`,hint:`Atomic pending-job cap (2.9.3)`,name:`group-max-size`,value:e.groupMaxSize,min:1,max:2**53-1,placeholder:`—`,onChange:e=>t(`groupMaxSize`,e)}),(0,F.jsx)(z,{label:`Unique key`,hint:`dedup key`,name:`unique-key`,value:e.uniqueKey,placeholder:`—`,onChange:e=>t(`uniqueKey`,e)}),(0,F.jsx)(z,{label:`Depends on`,hint:`parent job ids, comma-separated`,name:`depends-on`,value:e.dependsOn,placeholder:`job-id-1, job-id-2`,onChange:e=>t(`dependsOn`,e)}),(0,F.jsx)(`div`,{className:`col-span-2 md:col-span-3`,children:(0,F.jsx)(v,{label:`Repeat policy (JSON)`,hint:`v2.9.3-safe form: e.g. {"every":60000,"limit":10}. Use Cron Manager for cron patterns.`,children:(0,F.jsx)(`textarea`,{name:`repeat-policy`,value:e.repeatText,onChange:e=>t(`repeatText`,e.target.value),rows:2,spellCheck:!1,placeholder:`{"every": 60000}`,className:`w-full rounded-lg border border-line bg-surface-2 px-3 py-2 font-mono text-xs text-fg placeholder:text-faint focus:border-accent/60 focus:outline-none focus:ring-2 focus:ring-accent/30`})})})]})]})}function z({label:e,hint:t,name:n,value:r,placeholder:i,onChange:a}){return(0,F.jsx)(v,{label:e,hint:t,children:(0,F.jsx)(g,{name:n,value:r,onChange:e=>a(e.target.value),placeholder:i})})}function B({label:e,hint:t,name:n,value:r,min:i,max:a,placeholder:o,disabled:s,onChange:c}){return(0,F.jsx)(v,{label:e,hint:t,children:(0,F.jsx)(g,{type:`number`,min:i,max:a,step:1,name:n,value:r,onChange:e=>c(e.target.value),placeholder:o,disabled:s})})}function V({label:e,checked:t,onChange:n}){return(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(_,{checked:t,onChange:n,label:e}),(0,F.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e})]})}function H(e){let t=e?.options??{},n=j(t);return{queue:e?.queue??``,name:e?.name??`default`,dataText:e?.dataText??`{
2
- "hello": "world"
3
- }`,count:`1`,priority:x(t.priority),delay:``,runAt:``,maxAttempts:x(t.maxAttempts),backoff:n.backoff,timeout:x(t.timeout),ttl:n.ttl,jobId:``,removeOnComplete:t.removeOnComplete??!1,removeOnFail:t.removeOnFail??!1,durable:!1,lifo:!1,backoffType:n.backoffType,tags:n.tags,groupId:n.groupId,groupMaxSize:``,dependsOn:``,uniqueKey:``,repeatText:``}}function U(e,t=Date.now()){let n=e.queue.trim(),r=S(n);if(r)return W(r);let i=e.name.trim();if(!i||i.length>256)return W(`Job name must be a non-empty string of at most 256 characters`);let a=w(e.dataText);if(!a.ok)return{ok:!1,msg:a.msg,field:a.kind===`json`?`data`:`result`};let s=e.groupId.trim();if(s.length>256||s.includes(`\0`))return W(`Group ID must contain 1–256 characters and no NUL`);let c=E({priority:e.priority,delay:e.runAt.trim()?``:e.delay,maxAttempts:e.maxAttempts,backoff:e.backoff,timeout:e.timeout,ttl:e.ttl,groupMaxSize:e.groupMaxSize},!!s);if(!c.ok)return W(c.msg);if(c.options.groupMaxSize!==void 0&&!s)return W(`Group max size requires a Group ID`);let l=c.options.delay;if(e.runAt.trim()){let n=new Date(e.runAt).getTime();if(!Number.isFinite(n))return W(`Run at is not a valid date/time`);if(l=Math.max(0,n-t),l>31536e6)return W(`Run at must be within the next 365 days`)}let u=C(c.options.backoff,e.backoffType);if(!u.ok)return W(u.msg);let d=G(e.tags),f=G(e.dependsOn),p=e.jobId.trim();if(p){let e=o(p);if(e)return W(`Job ID: ${e}`)}for(let e of f){let t=o(e);if(t)return W(`Dependency ID "${e}": ${t}`)}let m=N(e.repeatText);if(!m.ok)return W(m.msg);let h=Number(e.count);return!Number.isSafeInteger(h)||h<1||h>1e4?W(`Count must be a whole number from 1 to 10000`):{ok:!0,target:n,count:h,body:{name:i,data:a.data,priority:c.options.priority,delay:l,maxAttempts:c.options.maxAttempts,backoff:u.backoff,timeout:c.options.timeout,ttl:c.options.ttl,jobId:p||void 0,removeOnComplete:e.removeOnComplete||void 0,removeOnFail:e.removeOnFail||void 0,durable:e.durable||void 0,lifo:e.lifo||void 0,tags:d.length?d:void 0,groupId:s||void 0,groupMaxSize:c.options.groupMaxSize,dependsOn:f.length?f:void 0,uniqueKey:e.uniqueKey.trim()||void 0,repeat:m.repeat}}}var W=e=>({ok:!1,msg:e,field:`result`}),G=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean),K=e({AddJob:()=>q,MAX_JOB_DATA_BYTES:()=>MAX_JOB_DATA_BYTES,MAX_JOB_DATA_CHARS:()=>D});function q(){let{data:e,error:t,refetch:n}=u(()=>c.queues(),[],{intervalMs:3e4}),a=r().state?.clone,[o,f]=(0,P.useState)(()=>H(a)),[p,h]=(0,P.useState)(!1),[_,b]=(0,P.useState)(null),[x,S]=(0,P.useState)(null),C=y(`add-job`),w=(e,t)=>f(n=>({...n,[e]:t}));(0,P.useEffect)(()=>{h(!1),b(null),S(null)},[C.scopeKey]);let T=async()=>{b(null),S(null);let e=U(o);if(!e.ok){e.field===`data`?S(e.msg):b({ok:!1,msg:e.msg});return}let t=C.begin();if(!t)return;h(!0);let{target:n,body:r,count:i}=e;try{if(i===1&&r.groupMaxSize===void 0){let e=O(await c.addJob(n,r));if(!t.isCurrent())return;b({ok:!0,msg:`Accepted job ID ${e} (it may be an existing deduplicated job)`}),l.success(`Job submission accepted`,`${n} · ${e}`)}else{let e=Array.from({length:i},()=>r),a=s(e);if(a){t.isCurrent()&&b({ok:!1,msg:a});return}let o=M(await c.addJobsBulk(n,e),i);if(!t.isCurrent())return;let u=A(new Set(o).size,i);b(u),l.success(u.msg,`in ${n}`)}}catch(e){if(!t.isCurrent())return;b({ok:!1,msg:e.message}),l.error(`Add job failed`,e.message)}finally{t.finish()&&h(!1)}};return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(m,{title:`Add Job`,description:`Enqueue a job with full options.`,actions:(0,F.jsx)(i,{to:`/jobs/bulk-add`,className:`rounded-lg border border-line px-3 py-1.5 text-sm text-muted hover:bg-surface-2 hover:text-fg`,children:`Bulk import`})}),a&&(0,F.jsx)(`div`,{className:`mb-4 flex items-center gap-2 rounded-lg border border-accent/30 bg-accent/[0.06] px-4 py-2 text-sm text-accent`,children:`Pre-filled from an existing job. Review the data and options, then enqueue a fresh job.`}),(0,F.jsxs)(`form`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,onSubmit:e=>{e.preventDefault(),T()},children:[(0,F.jsx)(I,{values:o,setValue:w,queueNames:(e?.queues??[]).map(e=>e.name),queueDiscoveryError:t,onRetryQueues:()=>void n(),jsonError:x,setJsonError:S}),(0,F.jsx)(L,{values:o,setValue:w}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3 lg:col-span-2`,children:[(0,F.jsx)(`div`,{className:`w-28`,children:(0,F.jsx)(v,{label:`Count`,hint:`1–10000`,children:(0,F.jsx)(g,{type:`number`,min:1,max:1e4,step:1,name:`count`,value:o.count,onChange:e=>w(`count`,e.target.value)})})}),(0,F.jsx)(d,{type:`submit`,variant:`accent`,disabled:p,children:p?`Adding…`:`Add job`}),_&&(0,F.jsx)(`span`,{role:_.ok?`status`:`alert`,className:_.ok?`text-sm text-success`:`text-sm text-danger`,children:_.msg})]})]})]})}export{K as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{g as t,t as n}from"./react-vendor-DfC0iyIS.js";import{o as r}from"./connectionStore-DdLzJyut.js";import{O as i,r as a}from"./icons-C1HVBnFn.js";import{n as o,t as s}from"./Button-BCjgbAhY.js";import{t as c}from"./Card-DptfvL2O.js";import{i as l,t as u}from"./feedback-Dxfj-Fy1.js";import{t as d}from"./PageHeader-DD4vnVog.js";import{l as f}from"./format-Cg7VCIZW.js";import{d as p,f as m,l as h,p as g,u as _}from"./index-CxzFSZj3.js";import{a as v,n as y,o as b,t as x}from"./form-Dy-an7ew.js";var S=e(t(),1),C=[`error_rate`,`p99_latency`,`waiting`,`failed`,`dlq`],w=[`>=`,`>`,`<=`,`<`],T=[`email`,`webhook`,`slack`],E=/^[a-zA-Z0-9_\-.:]+$/,D={error_rate:{unit:`% (0–100)`,placeholder:`e.g. 5`},p99_latency:{unit:`ms`,placeholder:`e.g. 250`},waiting:{unit:`jobs`,placeholder:`e.g. 100`},failed:{unit:`jobs`,placeholder:`e.g. 10`},dlq:{unit:`jobs`,placeholder:`e.g. 1`}};function O(e){let t=e.name.trim();if(!C.includes(e.metric))return{ok:!1,error:`Invalid metric`,field:`metric`};if(!w.includes(e.operator))return{ok:!1,error:`Invalid operator`,field:`operator`};let n=e.metric===`p99_latency`?``:e.queue.trim();if(!t)return{ok:!1,error:`Rule name is required`,field:`name`};if(t.length>200)return{ok:!1,error:`Rule name must be 200 characters or fewer`,field:`name`};if(!e.threshold.trim())return{ok:!1,error:`Threshold is required`,field:`threshold`};let r=Number(e.threshold);return!Number.isFinite(r)||r<0?{ok:!1,error:`Threshold must be a non-negative number`,field:`threshold`}:e.metric===`error_rate`&&r>100?{ok:!1,error:`Error-rate threshold must be between 0 and 100%`,field:`threshold`}:[`waiting`,`failed`,`dlq`].includes(e.metric)&&!Number.isSafeInteger(r)?{ok:!1,error:`Job-count thresholds must be whole numbers`,field:`threshold`}:n&&(n.length>256||!E.test(n))?{ok:!1,error:`Queue contains unsupported characters or is too long`,field:`queue`}:T.includes(e.channel)?{ok:!0,rule:{name:t,metric:e.metric,operator:e.operator,threshold:r,queue:n,channel:e.channel,enabled:!0}}:{ok:!1,error:`Invalid channel type`,field:`channel`}}var k=n();function A({onAdd:e}){let[t,n]=(0,S.useState)(``),[r,i]=(0,S.useState)(`error_rate`),[a,o]=(0,S.useState)(`>=`),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(null),h=(0,S.useRef)(!1),g=(0,S.useId)(),_=e=>f?.field===e;return(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-5`,children:[(0,k.jsx)(x,{label:`Name`,children:(0,k.jsx)(y,{name:`alert-rule-name`,autoComplete:`off`,maxLength:200,value:t,"aria-invalid":_(`name`),"aria-describedby":_(`name`)?g:void 0,onChange:e=>{n(e.target.value),p(null)},placeholder:`High error rate`})}),(0,k.jsx)(x,{label:`Metric`,children:(0,k.jsx)(v,{name:`alert-rule-metric`,value:r,"aria-invalid":_(`metric`),"aria-describedby":_(`metric`)?g:void 0,onChange:e=>{i(e.target.value),p(null)},children:C.map(e=>(0,k.jsx)(`option`,{value:e,children:m[e]},e))})}),(0,k.jsx)(x,{label:`Operator`,children:(0,k.jsx)(v,{name:`alert-rule-operator`,value:a,"aria-invalid":_(`operator`),"aria-describedby":_(`operator`)?g:void 0,onChange:e=>{o(e.target.value),p(null)},children:w.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))})}),(0,k.jsx)(x,{label:`Threshold`,hint:D[r].unit,children:(0,k.jsx)(y,{name:`alert-rule-threshold`,autoComplete:`off`,type:`number`,min:0,max:r===`error_rate`?100:void 0,step:[`waiting`,`failed`,`dlq`].includes(r)?1:`any`,value:c,"aria-invalid":_(`threshold`),"aria-describedby":_(`threshold`)?g:void 0,onChange:e=>{l(e.target.value),p(null)},placeholder:D[r].placeholder})}),(0,k.jsx)(x,{label:`Queue (optional)`,hint:r===`p99_latency`?`global only — latency is not per queue`:void 0,children:(0,k.jsx)(y,{name:`alert-rule-queue`,autoComplete:`off`,spellCheck:!1,maxLength:256,value:u,"aria-invalid":_(`queue`),"aria-describedby":_(`queue`)?g:void 0,onChange:e=>{d(e.target.value),p(null)},disabled:r===`p99_latency`,placeholder:r===`p99_latency`?`Global`:`All queues`,className:`disabled:cursor-not-allowed disabled:opacity-40`})}),(0,k.jsxs)(`div`,{className:`col-span-full`,children:[(0,k.jsx)(s,{variant:`accent`,disabled:!t.trim()||!c.trim(),onClick:()=>{if(h.current)return;let n=O({name:t,metric:r,operator:a,threshold:c,queue:u,channel:`email`});if(!n.ok)return p({field:n.field,message:n.error});h.current=!0;try{let t=e(n.rule);t.ok||(h.current=!1,p({field:`name`,message:t.error}))}catch(e){h.current=!1,p({field:`name`,message:e.message})}},children:`Save rule`}),f&&(0,k.jsx)(`span`,{id:g,role:`alert`,className:`ml-3 text-xs text-danger`,children:f.message})]})]})}function j(){return typeof Notification>`u`?`unsupported`:Notification.permission}function M(){let{rules:e,addRule:t,removeRule:n,toggleRule:v}=g(),y=_(e=>e.breaching),x=_(e=>e.status),C=_(e=>e.error),w=_(e=>e.connectionIdentity),T=r(e=>p(e.baseUrl,e.token)),E=e.some(e=>e.enabled),D=w===T,O=D?y:[],M=D?x:E?`checking`:`idle`,N=D?C:null,[P,F]=(0,S.useState)(!1),[I,L]=(0,S.useState)(j);return(0,k.jsxs)(`div`,{children:[(0,k.jsx)(d,{title:`Alerts`,description:`Threshold rules evaluated live in your browser.`,live:E&&M===`live`,actions:(0,k.jsxs)(k.Fragment,{children:[I===`granted`?(0,k.jsxs)(`span`,{className:`flex items-center gap-1.5 text-sm text-success`,children:[(0,k.jsx)(a,{className:`size-4`}),` Desktop alerts on`]}):I===`unsupported`?(0,k.jsx)(`span`,{className:`text-sm text-faint`,children:`Notifications unsupported`}):I===`denied`?(0,k.jsx)(`span`,{className:`text-sm text-faint`,children:`Desktop alerts blocked — allow notifications in browser settings`}):(0,k.jsx)(s,{size:`sm`,onClick:async()=>{L(await h())},children:`Enable desktop notifications`}),(0,k.jsx)(s,{variant:`accent`,size:`sm`,"aria-expanded":P,"aria-controls":`alert-rule-form`,onClick:()=>F(e=>!e),children:`+ Create Alert Rule`})]})}),E&&M===`checking`&&(0,k.jsx)(`p`,{role:`status`,className:`mb-4 text-sm text-muted`,children:`Checking alert metrics for the connected server…`}),E&&M===`degraded`&&(0,k.jsx)(l,{message:N??`Alert metrics are unavailable; current rule results may be stale.`}),(0,k.jsx)(`div`,{className:`mb-6 rounded-lg border border-amber-500/20 bg-amber-500/5 px-4 py-3 text-sm text-amber-400/90`,children:`Rules are evaluated in this browser while a tab is open (even backgrounded), raising an in-app toast and — if enabled — a desktop notification. bunqueue OSS has no alerting backend, so email/webhook/slack delivery still needs your own monitoring or hosted bunqueue Cloud.`}),(0,k.jsxs)(`section`,{className:`mb-8`,children:[(0,k.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Triggered Alerts`}),O.length===0?(0,k.jsx)(u,{icon:(0,k.jsx)(a,{}),title:`No triggered alerts`,hint:E?M===`live`?`All enabled rules are within their thresholds.`:M===`checking`?`Alert metrics are still being checked.`:`Alert metrics are unavailable; no all-clear result is available.`:`No enabled rules yet. Create one below.`}):(0,k.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-danger/30 bg-red-500/5`,children:(0,k.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Rule`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Condition`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,k.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Current`}),(0,k.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Since`})]})}),(0,k.jsx)(`tbody`,{children:O.map(e=>(0,k.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,k.jsx)(`td`,{className:`px-5 py-3 font-medium text-danger`,children:e.ruleName}),(0,k.jsxs)(`td`,{className:`px-5 py-3 text-muted`,children:[e.metricLabel,` `,e.operator,` `,(0,k.jsx)(`span`,{className:`font-semibold text-fg`,children:e.threshold})]}),(0,k.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.queue||`All queues`}),(0,k.jsx)(`td`,{className:`px-5 py-3 text-right tnum font-semibold text-danger`,children:Math.round(e.value*100)/100}),(0,k.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:f(e.at)})]},e.ruleId))})]})})]}),(0,k.jsxs)(`section`,{children:[(0,k.jsx)(`h2`,{className:`mb-3 text-lg font-semibold text-fg`,children:`Alert Rules`}),P&&(0,k.jsx)(`div`,{id:`alert-rule-form`,children:(0,k.jsx)(c,{className:`mb-4`,children:(0,k.jsx)(A,{onAdd:e=>{let n=t(e);return n.ok&&F(!1),n}})})}),e.length===0?(0,k.jsx)(u,{title:`No alert rules`,hint:`Create a rule to be notified when a threshold is crossed.`}):(0,k.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,k.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Rule`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Condition`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queue`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Delivery`}),(0,k.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,k.jsx)(`th`,{className:`w-12 px-5 py-3`})]})}),(0,k.jsx)(`tbody`,{children:e.map(e=>(0,k.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,k.jsx)(`td`,{className:`px-5 py-3 font-medium text-fg`,children:e.name}),(0,k.jsxs)(`td`,{className:`px-5 py-3 text-muted`,children:[m[e.metric],` `,e.operator,` `,(0,k.jsx)(`span`,{className:`font-semibold text-accent`,children:e.threshold})]}),(0,k.jsx)(`td`,{className:`px-5 py-3 text-muted`,children:e.queue||`All queues`}),(0,k.jsx)(`td`,{className:`px-5 py-3`,children:(0,k.jsx)(`span`,{className:`rounded-md bg-surface-2 px-2 py-0.5 text-xs text-muted`,children:`Browser`})}),(0,k.jsx)(`td`,{className:`px-5 py-3`,children:(0,k.jsx)(b,{checked:e.enabled,onChange:()=>v(e.id),label:`Enabled`})}),(0,k.jsx)(`td`,{className:`px-5 py-3 text-right`,children:(0,k.jsx)(o,{"aria-label":`Delete rule ${e.name}`,onClick:()=>window.confirm(`Delete alert rule "${e.name}"?`)&&n(e.id),children:(0,k.jsx)(i,{className:`size-3.5`})})})]},e.id))})]})})]})]})}export{M as Alerts};