bunqueue-dashboard 0.0.37 → 0.0.39
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/README.md +21 -11
- package/agent/backup/resultValidation.ts +1 -1
- package/agent/backup/routes.ts +63 -17
- package/agent/db/query.ts +2 -1
- package/agent/manager/config.ts +2 -1
- package/agent/manager/process.ts +51 -5
- package/agent/manager/storageMode.ts +21 -0
- package/agent/manager/types.ts +2 -0
- package/agent/manager.ts +1 -0
- package/agent/queue/routes.ts +1 -2
- package/agent/queue/runtime.ts +5 -0
- package/agent/queue/types.ts +1 -0
- package/agent/server/controlRoutes.ts +109 -8
- package/agent/server/databaseRoutes.ts +47 -14
- package/agent/server/errors.ts +1 -0
- package/agent/server/lifecycle.ts +25 -8
- package/agent/server/managedRuntime.ts +27 -0
- package/agent/server/router.ts +90 -40
- package/agent/server/workflowReadRoutes.ts +28 -11
- package/agent/workflows.ts +1 -1
- package/dist/.vite/manifest.json +490 -476
- package/dist/assets/AddJob-d5KBvmN8.js +3 -0
- package/dist/assets/{Alerts-Gh1pVbqj.js → Alerts-5I44QTnQ.js} +1 -1
- package/dist/assets/{AreaChart-w0ruozXH.js → AreaChart-DEAalJ6P.js} +1 -1
- package/dist/assets/Benchmark-S1afsQRd.js +1 -0
- package/dist/assets/{BulkAddJobs-Di_IgRSH.js → BulkAddJobs-BO8LWUHE.js} +1 -1
- package/dist/assets/{Button-BPqpRZJD.js → Button-Ch1W94fJ.js} +1 -1
- package/dist/assets/{Card-C7NMhqUt.js → Card-CWxrC8OY.js} +1 -1
- package/dist/assets/{CopilotPanel-Db5nYpo1.js → CopilotPanel-DDkRd35p.js} +4 -4
- package/dist/assets/{Cron-BRgWcBGk.js → Cron-X3Y5uISO.js} +1 -1
- package/dist/assets/CronManager-ugmYEAwY.js +1 -0
- package/dist/assets/{Database-BeoEreW0.js → Database-koy8haPX.js} +1 -1
- package/dist/assets/Diagnostics-D6oqvkOs.js +1 -0
- package/dist/assets/{Dlq-DfCg04Jd.js → Dlq-D70Lzmsa.js} +1 -1
- package/dist/assets/{DlqControl-BRCkUXvb.js → DlqControl-nUT5Zzkl.js} +1 -1
- package/dist/assets/{DlqPro-BHJwBYsN.js → DlqPro-VMuBKgP-.js} +1 -1
- package/dist/assets/Flows-CAG0nDnt.js +2 -0
- package/dist/assets/JobInspector-CiS5HOSQ.js +2 -0
- package/dist/assets/{Jobs-URpnFjC6.js → Jobs-CkyRvzOT.js} +1 -1
- package/dist/assets/{JobsPro-pQ_RFSU3.js → JobsPro-B4-CSoq3.js} +1 -1
- package/dist/assets/{Logs-C5jX2OPE.js → Logs-DBTz2PTz.js} +1 -1
- package/dist/assets/{LogsPro-Cq_npmmS.js → LogsPro-BCFeegvr.js} +1 -1
- package/dist/assets/{McpServer-DtCTmQBu.js → McpServer-BKlTR1qr.js} +2 -2
- package/dist/assets/{Metrics-BdxitePr.js → Metrics-Du__9Lbn.js} +1 -1
- package/dist/assets/{MetricsPro-orHfW0mg.js → MetricsPro-CqnaO6YX.js} +1 -1
- package/dist/assets/{Overview-DaNns1aj.js → Overview-udSSt7ZB.js} +1 -1
- package/dist/assets/{PageHeader-BXlZSBcc.js → PageHeader-CvIyaFOO.js} +1 -1
- package/dist/assets/{Pagination-Q-vf4hsX.js → Pagination-x-Cwgrul.js} +1 -1
- package/dist/assets/QueueActions-D7cQrGvJ.js +1 -0
- package/dist/assets/{QueueControl-l5bSdMgb.js → QueueControl-BF638r_0.js} +1 -1
- package/dist/assets/QueueDetail-C-ms6bMe.js +1 -0
- package/dist/assets/QueueDetailPro-DXEdsZx_.js +1 -0
- package/dist/assets/{Queues-DeLXlww2.js → Queues-BUMwTVAf.js} +1 -1
- package/dist/assets/{QueuesOverview-DoQ-MUfT.js → QueuesOverview-Du8XLgN0.js} +1 -1
- package/dist/assets/{S3Backup-D2agV9_z.js → S3Backup-CDICSzxM.js} +1 -1
- package/dist/assets/S3BackupPro-CBidbI-s.js +3 -0
- package/dist/assets/ServerControl-CPT0LpsC.js +3 -0
- package/dist/assets/{Settings-CiJRj_SM.js → Settings-CmxfSX_8.js} +1 -1
- package/dist/assets/{StatusBadge-B0I7hNBX.js → StatusBadge-BoOVTnKu.js} +1 -1
- package/dist/assets/{Usage-DbHJgA4t.js → Usage-B895tSxi.js} +1 -1
- package/dist/assets/{UsagePro-LoPo3k1L.js → UsagePro-CASN77iV.js} +1 -1
- package/dist/assets/{Webhooks-CuzIJHwk.js → Webhooks-CXbZOFFw.js} +1 -1
- package/dist/assets/{Workers-BpUgpwUH.js → Workers-BceQlUhX.js} +1 -1
- package/dist/assets/WorkersPro-Dtml89jB.js +1 -0
- package/dist/assets/Workflows-B8wmQN2X.js +1 -0
- package/dist/assets/{api-V_sVpHDo.js → api-81m1TwB7.js} +1 -1
- package/dist/assets/bq-BOfwNIlJ.js +1 -0
- package/dist/assets/{connectionStore-CKFQrxDo.js → connectionStore-CFuNYZ_8.js} +1 -1
- package/dist/assets/{controlConnectionEpoch-JM4omZ6j.js → controlConnectionEpoch-DzbuWOhe.js} +1 -1
- package/dist/assets/{feedback-BnGE2oW2.js → feedback-QDN1AsYt.js} +1 -1
- package/dist/assets/flowMutationSafety-6cP-l4Pa.js +1 -0
- package/dist/assets/{form-tC20r4Ma.js → form-C4oby9pI.js} +1 -1
- package/dist/assets/{icons-CIvFfU2b.js → icons-BVzwsfbG.js} +1 -1
- package/dist/assets/index-B-QjN7pA.css +1 -0
- package/dist/assets/index-TploGF7u.js +8 -0
- package/dist/assets/install-BPp8nydm.js +3 -0
- package/dist/assets/{react-vendor-CyjgmGTq.js → react-vendor-CvwrP0tU.js} +2 -2
- package/dist/assets/{responses-CBLyy1Ob.js → responses-C9lP49qu.js} +1 -1
- package/dist/assets/{toastStore-B7n0zS0y.js → toastStore-B31o6Z5J.js} +1 -1
- package/dist/assets/{upstreamPaths-CDVsu6IM.js → upstreamPaths-ZeijhPPb.js} +1 -1
- package/dist/assets/useControlActionGuard-DT7uudrj.js +1 -0
- package/dist/assets/{usePolledData-c53tx1jw.js → usePolledData-CNtNtd0a.js} +1 -1
- package/dist/assets/useServerActionGuard-Db7PPgaI.js +1 -0
- package/dist/assets/useThroughputSeries-_J7gWbcI.js +1 -0
- package/dist/index.html +21 -18
- package/package.json +18 -8
- package/scripts/embedded.gen.ts +152 -150
- package/scripts/serveHandler.ts +22 -1
- package/scripts/servePolicy.ts +12 -3
- package/dist/assets/AddJob-CWkkVHmf.js +0 -3
- package/dist/assets/Benchmark-Dir2A1CQ.js +0 -1
- package/dist/assets/CronManager-CbM0x_s0.js +0 -1
- package/dist/assets/Diagnostics-Cw9iJ84f.js +0 -1
- package/dist/assets/Flows-BAzbFP_W.js +0 -2
- package/dist/assets/JobInspector-qvW_APO6.js +0 -2
- package/dist/assets/QueueActions-jiTzndPH.js +0 -1
- package/dist/assets/QueueDetail-URK2pjtH.js +0 -1
- package/dist/assets/QueueDetailPro-C9M5CV4K.js +0 -1
- package/dist/assets/S3BackupPro--WSZWTQn.js +0 -3
- package/dist/assets/ServerControl-QVd6m_iR.js +0 -3
- package/dist/assets/WorkersPro-BYY0P1Pt.js +0 -1
- package/dist/assets/Workflows-ByJw4FFH.js +0 -1
- package/dist/assets/bq-DYmbVkgR.js +0 -1
- package/dist/assets/flowMutationSafety-DObp9nJo.js +0 -1
- package/dist/assets/index-D64v2vNO.js +0 -8
- package/dist/assets/index-DOze4TKg.css +0 -1
- package/dist/assets/install-jXi1SOYY.js +0 -3
- package/dist/assets/useServerActionGuard-OTv6_fU0.js +0 -1
- package/dist/assets/useThroughputSeries-DWHQl7cM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./upstreamPaths-
|
|
1
|
+
import{o as e}from"./upstreamPaths-ZeijhPPb.js";var t=10*1024*1024,n=10*1024*1024;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=365*24*60*60*1e3,s=1440*60*1e3;function c(e){let t=[{key:`priority`,label:`Priority`,min:-1e6,max: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}],n={};for(let r of t){let t=(e[r.key]??``).trim();if(!t)continue;let i=Number(t);if(!Number.isFinite(i))return{ok:!1,msg:`${r.label} must be a number`};if(!Number.isSafeInteger(i))return{ok:!1,msg:`${r.label} must be a whole, safe integer`};if(i<r.min||i>r.max)return{ok:!1,msg:`${r.label} must be between ${r.min} and ${r.max}`};n[r.key]=i}return{ok:!0,options:n}}function l(t){let n=e(t);return!t&&n?`Choose a queue`:n}function u(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 d(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.0; 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 f(e){let t=typeof e.backoff==`object`?e.backoff:void 0,n=e.backoffConfig??t;return{backoff:p(n?.delay??(typeof e.backoff==`number`?e.backoff:void 0)),backoffType:n?.type??``,tags:e.tags?.join(`, `)??``,groupId:e.groupId??``,ttl:p(e.ttl)}}var p=e=>e==null?``:String(e);function m(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 h(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 g(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,c,u as d,n as f,r as h,o as i,d as l,a as m,h as n,f as o,t as p,m as r,p as s,g as t,l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e}from"./connectionStore-
|
|
1
|
+
import{f as e}from"./connectionStore-CFuNYZ_8.js";var t=1,n=e(e=>({toasts:[],push:({level:n,title:r,detail:i,ttlMs:a})=>{let o=t++,s=a??(n===`error`?8e3:4e3);return e(e=>({toasts:[...e.toasts,{id:o,level:n,title:r,detail:i,ttlMs:s}].slice(-5)})),o},dismiss:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)}))})),r={success:(e,t)=>n.getState().push({level:`success`,title:e,detail:t}),error:(e,t)=>n.getState().push({level:`error`,title:e,detail:t}),info:(e,t)=>n.getState().push({level:`info`,title:e,detail:t})};export{n,r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=/^[a-zA-Z0-9_\-.:]+$/;function t(t){return typeof t!=`string`||!t?`Queue name must not be empty`:t.length>256?`Queue name must be 256 characters or fewer`:e.test(t)?t===`.`||t===`..`?`Queue name must not be "." or ".." because URL parsers treat it as a path traversal segment`:null:`Queue names may contain only letters, numbers, underscore, hyphen, dot, and colon`}function n(e){let n=t(e);if(n)throw TypeError(n);return encodeURIComponent(e)}function r(e,t=`Resource ID`,n=1024){return typeof e!=`string`||!e?`${t} must not be empty`:e.length>n?`${t} must be ${n} characters or fewer`:e===`.`||e===`..`?`${t} must not be "." or ".." because URL parsers treat it as a path traversal segment`:null}function i(e,t=`Resource ID`,n=1024){let i=r(e,t,n);if(i)throw TypeError(i);return encodeURIComponent(e)}var a=/^[A-Za-z0-9._~!$&'()*+,;=:@%[\]|-]+$/,o=/^(?:\.|%2e){1,2}$/i;function s(e){return typeof e!=`string`||!e?`ID must not be empty`:e.length>1024?`ID must be 1024 characters or fewer`:a.test(e)?o.test(e)?`ID must not resolve to "." or ".." because URL parsers treat it as a path traversal segment`:null:`Bunqueue v2.
|
|
1
|
+
var e=/^[a-zA-Z0-9_\-.:]+$/;function t(t){return typeof t!=`string`||!t?`Queue name must not be empty`:t.length>256?`Queue name must be 256 characters or fewer`:e.test(t)?t===`.`||t===`..`?`Queue name must not be "." or ".." because URL parsers treat it as a path traversal segment`:null:`Queue names may contain only letters, numbers, underscore, hyphen, dot, and colon`}function n(e){let n=t(e);if(n)throw TypeError(n);return encodeURIComponent(e)}function r(e,t=`Resource ID`,n=1024){return typeof e!=`string`||!e?`${t} must not be empty`:e.length>n?`${t} must be ${n} characters or fewer`:e===`.`||e===`..`?`${t} must not be "." or ".." because URL parsers treat it as a path traversal segment`:null}function i(e,t=`Resource ID`,n=1024){let i=r(e,t,n);if(i)throw TypeError(i);return encodeURIComponent(e)}var a=/^[A-Za-z0-9._~!$&'()*+,;=:@%[\]|-]+$/,o=/^(?:\.|%2e){1,2}$/i;function s(e){return typeof e!=`string`||!e?`ID must not be empty`:e.length>1024?`ID must be 1024 characters or fewer`:a.test(e)?o.test(e)?`ID must not resolve to "." or ".." because URL parsers treat it as a path traversal segment`:null:`Bunqueue v2.9.0 HTTP can address only opaque path-safe IDs (letters, numbers, and . _ ~ ! $ & ' ( ) * + , ; = : @ % [ ] | -); spaces, slash, backslash, ? and # are unsupported`}function c(e){let t=s(e);if(t)throw TypeError(t);return e}function l(e){let n=t(e);if(n)throw TypeError(`Invalid Bunqueue queue name for the event stream: ${n}`);return e}export{c as a,s as i,i as n,t as o,l as r,n as s,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./cn-zFEt5SO8.js";import{g as t}from"./react-vendor-CvwrP0tU.js";import{n,t as r}from"./controlConnectionEpoch-DzbuWOhe.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{i as e}from"./cn-zFEt5SO8.js";import{g as t}from"./react-vendor-
|
|
1
|
+
import{i as e}from"./cn-zFEt5SO8.js";import{g as t}from"./react-vendor-CvwrP0tU.js";import{o as n}from"./connectionStore-CFuNYZ_8.js";var r=e(t(),1);function i(e){let t=!0;return()=>t?(t=!1,!0):!e()}function a(e,t=[],a={}){let o=n(e=>e.refreshMs),s=n(e=>JSON.stringify([e.baseUrl,e.token,e.agentToken])),c=a.intervalMs??o,l=(0,r.useRef)(null),u=(0,r.useRef)(0),d=[s,...t];(l.current===null||l.current.length!==d.length||l.current.some((e,t)=>!Object.is(e,d[t])))&&(l.current=d,u.current+=1);let f=u.current,[p,m]=(0,r.useState)(null),[h,g]=(0,r.useState)(null),[_,v]=(0,r.useState)(!0),y=(0,r.useRef)(e);y.current=e;let b=(0,r.useRef)(!0),x=(0,r.useRef)(0),S=(0,r.useRef)(void 0),C=(0,r.useRef)(!0),w=(0,r.useRef)(!1),T=(0,r.useRef)(0),E=(0,r.useRef)(0),D=(0,r.useRef)(()=>Promise.resolve()),O=(0,r.useCallback)(async(e,t,n)=>{try{let r=await y.current(n);if(!b.current||e!==x.current)return;let i;try{i=JSON.stringify(r)}catch{i=String(Math.random())}i===S.current?T.current=t:(S.current=i,T.current=t,m(r)),w.current&&(w.current=!1,E.current=0,g(null))}catch(n){if(!b.current||e!==x.current)return;w.current=!0,E.current=t,g(n)}finally{b.current&&e===x.current&&C.current&&(C.current=!1,v(!1))}},[]),k=(0,r.useCallback)(()=>D.current(),[]);(0,r.useEffect)(()=>{b.current=!0;let e=++x.current,t=new AbortController;S.current=void 0,C.current=!0,m(null),v(!0),w.current&&(w.current=!1,g(null));let n=null,r=!1,a=!1,o=!1,s=[],l=()=>globalThis.document?.hidden??!1,u=i(l),d=()=>{n!==null&&clearTimeout(n),n=null},p=()=>{r||(d(),n=setTimeout(()=>{n=null,_(!1)},c))},h=async()=>{a=!0;try{await O(e,f,t.signal)}finally{if(a=!1,!r)if(o){o=!1;let e=s;s=[],_(!0).finally(()=>{for(let t of e)t()})}else p()}};function _(e){return r?Promise.resolve():a?e?(o=!0,new Promise(e=>s.push(e))):Promise.resolve():(d(),!e&&!u()?(p(),Promise.resolve()):h())}let y=()=>_(!0);D.current=y,_(!1);let T=()=>{l()||r||a||_(!0)};return typeof document<`u`&&document.addEventListener(`visibilitychange`,T),()=>{r=!0,b.current=!1,t.abort(),d();for(let e of s)e();s=[],D.current===y&&(D.current=()=>Promise.resolve()),x.current===e&&(x.current+=1),typeof document<`u`&&document.removeEventListener(`visibilitychange`,T)}},[c,f,O]);let A=T.current===f,j=E.current===f;return{data:A?p:null,error:j?h:null,loading:A||j?_:!0,refetch:k}}export{a as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./cn-zFEt5SO8.js";import{g as t}from"./react-vendor-CvwrP0tU.js";import{i as n,o as r}from"./connectionStore-CFuNYZ_8.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{i as e}from"./cn-zFEt5SO8.js";import{g as t}from"./react-vendor-CvwrP0tU.js";import{o as n}from"./connectionStore-CFuNYZ_8.js";import{t as r}from"./bq-BOfwNIlJ.js";import{t as i}from"./usePolledData-CNtNtd0a.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=i(()=>globalThis.document?.hidden??!1),f=async()=>{if(l||!u())return;l=!0;let t=c();try{let[i,c]=await Promise.all([r.overview({signal:a.signal}),r.stats({signal:a.signal})]);if(a.signal.aborted||g.current!==n)return;let l=i?.stats,u=i?.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(i),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
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en" data-theme="dark">
|
|
3
3
|
<head>
|
|
4
|
+
<!-- The standalone server rewrites this validated root to BASE_PATH. It
|
|
5
|
+
also keeps relative build assets rooted correctly on static SPA deep links. -->
|
|
6
|
+
<base href="/" data-bunqueue-base />
|
|
4
7
|
<meta charset="UTF-8" />
|
|
5
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
9
|
<meta name="color-scheme" content="dark light" />
|
|
@@ -16,7 +19,7 @@
|
|
|
16
19
|
}
|
|
17
20
|
} catch {}
|
|
18
21
|
</script>
|
|
19
|
-
<link rel="icon" type="image/svg+xml" href="
|
|
22
|
+
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
20
23
|
<title>bunqueue dashboard — drive a Bun job queue from your browser</title>
|
|
21
24
|
<meta
|
|
22
25
|
name="description"
|
|
@@ -46,23 +49,23 @@
|
|
|
46
49
|
content="Fully drive a bunqueue server from one UI: queues, jobs, DLQ, cron, webhooks, workers, and start/stop/restart. Live demo, no signup."
|
|
47
50
|
/>
|
|
48
51
|
<meta name="twitter:image" content="https://egeominotti.github.io/bunqueue-dashboard/og.png" />
|
|
49
|
-
<script type="module" crossorigin src="
|
|
50
|
-
<link rel="modulepreload" crossorigin href="
|
|
51
|
-
<link rel="modulepreload" crossorigin href="
|
|
52
|
-
<link rel="modulepreload" crossorigin href="
|
|
53
|
-
<link rel="modulepreload" crossorigin href="
|
|
54
|
-
<link rel="modulepreload" crossorigin href="
|
|
55
|
-
<link rel="modulepreload" crossorigin href="
|
|
56
|
-
<link rel="modulepreload" crossorigin href="
|
|
57
|
-
<link rel="modulepreload" crossorigin href="
|
|
58
|
-
<link rel="modulepreload" crossorigin href="
|
|
59
|
-
<link rel="modulepreload" crossorigin href="
|
|
60
|
-
<link rel="modulepreload" crossorigin href="
|
|
61
|
-
<link rel="modulepreload" crossorigin href="
|
|
62
|
-
<link rel="modulepreload" crossorigin href="
|
|
63
|
-
<link rel="modulepreload" crossorigin href="
|
|
64
|
-
<link rel="modulepreload" crossorigin href="
|
|
65
|
-
<link rel="stylesheet" crossorigin href="
|
|
52
|
+
<script type="module" crossorigin src="./assets/index-TploGF7u.js"></script>
|
|
53
|
+
<link rel="modulepreload" crossorigin href="./assets/cn-zFEt5SO8.js">
|
|
54
|
+
<link rel="modulepreload" crossorigin href="./assets/react-vendor-CvwrP0tU.js">
|
|
55
|
+
<link rel="modulepreload" crossorigin href="./assets/connectionStore-CFuNYZ_8.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="./assets/upstreamPaths-ZeijhPPb.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="./assets/bq-BOfwNIlJ.js">
|
|
58
|
+
<link rel="modulepreload" crossorigin href="./assets/toastStore-B31o6Z5J.js">
|
|
59
|
+
<link rel="modulepreload" crossorigin href="./assets/icons-BVzwsfbG.js">
|
|
60
|
+
<link rel="modulepreload" crossorigin href="./assets/api-81m1TwB7.js">
|
|
61
|
+
<link rel="modulepreload" crossorigin href="./assets/usePolledData-CNtNtd0a.js">
|
|
62
|
+
<link rel="modulepreload" crossorigin href="./assets/Button-Ch1W94fJ.js">
|
|
63
|
+
<link rel="modulepreload" crossorigin href="./assets/Card-CWxrC8OY.js">
|
|
64
|
+
<link rel="modulepreload" crossorigin href="./assets/feedback-QDN1AsYt.js">
|
|
65
|
+
<link rel="modulepreload" crossorigin href="./assets/StatusBadge-BoOVTnKu.js">
|
|
66
|
+
<link rel="modulepreload" crossorigin href="./assets/PageHeader-CvIyaFOO.js">
|
|
67
|
+
<link rel="modulepreload" crossorigin href="./assets/format-Cg7VCIZW.js">
|
|
68
|
+
<link rel="stylesheet" crossorigin href="./assets/index-B-QjN7pA.css">
|
|
66
69
|
</head>
|
|
67
70
|
<body>
|
|
68
71
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue-dashboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
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": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react"
|
|
46
46
|
],
|
|
47
47
|
"engines": {
|
|
48
|
-
"bun": ">=1.
|
|
48
|
+
"bun": ">=1.4.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"prepack": "bun run build && bun scripts/gen-embed.ts",
|
|
@@ -67,11 +67,17 @@
|
|
|
67
67
|
"test:e2e:queue-operations": "bun run scripts/validate-queue-operations.ts",
|
|
68
68
|
"test:e2e:workflow": "bun run scripts/validate-workflow-runtime.ts",
|
|
69
69
|
"test:e2e": "bun run test:e2e:flow && bun run test:e2e:workflow && bun run test:e2e:queue-operations",
|
|
70
|
+
"test:e2e:browser:install": "playwright install chromium firefox webkit",
|
|
71
|
+
"test:e2e:browser:serve": "bun e2e/runtime.ts",
|
|
72
|
+
"test:e2e:browser": "bun run build && bun scripts/gen-embed.ts && playwright test",
|
|
70
73
|
"test:package": "bun run scripts/validate-package-runtime.ts",
|
|
71
74
|
"test:coverage": "bun test --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage && bun scripts/check-coverage.ts",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"format": "
|
|
75
|
+
"lint": "oxlint . && bun run scripts/check-implicit-any-let.ts",
|
|
76
|
+
"lint:fix": "oxlint --fix . && bun run scripts/check-implicit-any-let.ts",
|
|
77
|
+
"format": "oxfmt .",
|
|
78
|
+
"format:check": "oxfmt --check .",
|
|
79
|
+
"check": "bun run lint && bun run format:check",
|
|
80
|
+
"check:fix": "bun run lint:fix && bun run format",
|
|
75
81
|
"audit:high": "bun audit --audit-level=high --ignore=GHSA-qwww-vcr4-c8h2",
|
|
76
82
|
"quality": "bun run architecture && bun run check && bun run build && bun run size && bun run docs:build && bun run test:coverage && bun run test:e2e && bun run test:package && bun run audit:high"
|
|
77
83
|
},
|
|
@@ -80,9 +86,10 @@
|
|
|
80
86
|
"@ai-sdk/google": "^4.0.8",
|
|
81
87
|
"@ai-sdk/openai": "^4.0.7",
|
|
82
88
|
"@ai-sdk/openai-compatible": "^3.0.5",
|
|
83
|
-
"@
|
|
89
|
+
"@axe-core/playwright": "4.13.0",
|
|
84
90
|
"@fontsource-variable/inter": "^5.2.8",
|
|
85
91
|
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
92
|
+
"@playwright/test": "1.62.1",
|
|
86
93
|
"@shikijs/vitepress-twoslash": "^4.3.0",
|
|
87
94
|
"@tailwindcss/vite": "^4.3.2",
|
|
88
95
|
"@types/node": "^26.0.1",
|
|
@@ -90,9 +97,12 @@
|
|
|
90
97
|
"@types/react-dom": "^19.2.3",
|
|
91
98
|
"@vitejs/plugin-react": "^6.0.3",
|
|
92
99
|
"ai": "^7.0.14",
|
|
93
|
-
"bun-types": "^1.
|
|
100
|
+
"bun-types": "^1.4.0",
|
|
94
101
|
"happy-dom": "^20.10.6",
|
|
95
102
|
"mermaid": "^11.16.0",
|
|
103
|
+
"oxfmt": "^0.63.0",
|
|
104
|
+
"oxlint": "^1.78.0",
|
|
105
|
+
"oxlint-tsgolint": "^7.0.2001",
|
|
96
106
|
"react": "^19.2.7",
|
|
97
107
|
"react-dom": "^19.2.7",
|
|
98
108
|
"react-router-dom": "^7.18.1",
|
|
@@ -113,7 +123,7 @@
|
|
|
113
123
|
"postcss": "^8.5.25"
|
|
114
124
|
},
|
|
115
125
|
"dependencies": {
|
|
116
|
-
"bunqueue": "2.
|
|
126
|
+
"bunqueue": "2.9.0",
|
|
117
127
|
"msgpackr": "^1.11.8"
|
|
118
128
|
}
|
|
119
129
|
}
|
package/scripts/embedded.gen.ts
CHANGED
|
@@ -3,163 +3,165 @@
|
|
|
3
3
|
import f0 from "../dist/index.html" with { type: 'file' };
|
|
4
4
|
import f1 from "../dist/favicon.svg" with { type: 'file' };
|
|
5
5
|
import f2 from "../dist/og.png" with { type: 'file' };
|
|
6
|
-
import f3 from "../dist/assets/
|
|
7
|
-
import f4 from "../dist/assets/
|
|
8
|
-
import f5 from "../dist/assets/
|
|
9
|
-
import f6 from "../dist/assets/
|
|
10
|
-
import f7 from "../dist/assets/
|
|
11
|
-
import f8 from "../dist/assets/
|
|
12
|
-
import f9 from "../dist/assets/
|
|
13
|
-
import f10 from "../dist/assets/
|
|
14
|
-
import f11 from "../dist/assets/
|
|
15
|
-
import f12 from "../dist/assets/
|
|
16
|
-
import f13 from "../dist/assets/
|
|
17
|
-
import f14 from "../dist/assets/
|
|
18
|
-
import f15 from "../dist/assets/
|
|
19
|
-
import f16 from "../dist/assets/
|
|
20
|
-
import f17 from "../dist/assets/
|
|
21
|
-
import f18 from "../dist/assets/
|
|
22
|
-
import f19 from "../dist/assets/
|
|
23
|
-
import f20 from "../dist/assets/
|
|
24
|
-
import f21 from "../dist/assets/
|
|
25
|
-
import f22 from "../dist/assets/
|
|
26
|
-
import f23 from "../dist/assets/
|
|
27
|
-
import f24 from "../dist/assets/
|
|
28
|
-
import f25 from "../dist/assets/
|
|
29
|
-
import f26 from "../dist/assets/
|
|
30
|
-
import f27 from "../dist/assets/
|
|
31
|
-
import f28 from "../dist/assets/
|
|
32
|
-
import f29 from "../dist/assets/
|
|
33
|
-
import f30 from "../dist/assets/
|
|
34
|
-
import f31 from "../dist/assets/
|
|
35
|
-
import f32 from "../dist/assets/
|
|
36
|
-
import f33 from "../dist/assets/
|
|
37
|
-
import f34 from "../dist/assets/
|
|
38
|
-
import f35 from "../dist/assets/
|
|
39
|
-
import f36 from "../dist/assets/
|
|
40
|
-
import f37 from "../dist/assets/
|
|
41
|
-
import f38 from "../dist/assets/
|
|
42
|
-
import f39 from "../dist/assets/
|
|
43
|
-
import f40 from "../dist/assets/
|
|
44
|
-
import f41 from "../dist/assets/
|
|
45
|
-
import f42 from "../dist/assets/
|
|
46
|
-
import f43 from "../dist/assets/
|
|
47
|
-
import f44 from "../dist/assets/
|
|
48
|
-
import f45 from "../dist/assets/
|
|
49
|
-
import f46 from "../dist/assets/
|
|
50
|
-
import f47 from "../dist/assets/
|
|
51
|
-
import f48 from "../dist/assets/
|
|
52
|
-
import f49 from "../dist/assets/
|
|
53
|
-
import f50 from "../dist/assets/
|
|
54
|
-
import f51 from "../dist/assets/
|
|
55
|
-
import f52 from "../dist/assets/
|
|
56
|
-
import f53 from "../dist/assets/
|
|
57
|
-
import f54 from "../dist/assets/
|
|
58
|
-
import f55 from "../dist/assets/
|
|
59
|
-
import f56 from "../dist/assets/
|
|
60
|
-
import f57 from "../dist/assets/
|
|
61
|
-
import f58 from "../dist/assets/
|
|
62
|
-
import f59 from "../dist/assets/
|
|
63
|
-
import f60 from "../dist/assets/
|
|
64
|
-
import f61 from "../dist/assets/
|
|
65
|
-
import f62 from "../dist/assets/
|
|
66
|
-
import f63 from "../dist/assets/
|
|
67
|
-
import f64 from "../dist/assets/
|
|
68
|
-
import f65 from "../dist/assets/
|
|
69
|
-
import f66 from "../dist/assets/
|
|
70
|
-
import f67 from "../dist/assets/
|
|
71
|
-
import f68 from "../dist/assets/
|
|
72
|
-
import f69 from "../dist/assets/
|
|
73
|
-
import f70 from "../dist/assets/
|
|
74
|
-
import f71 from "../dist/assets/
|
|
75
|
-
import f72 from "../dist/assets/
|
|
76
|
-
import f73 from "../dist/assets/
|
|
77
|
-
import f74 from "../dist/assets/
|
|
78
|
-
import f75 from "../dist/assets/
|
|
79
|
-
import f76 from "../dist/assets/
|
|
6
|
+
import f3 from "../dist/assets/UsagePro-CASN77iV.js" with { type: 'file' };
|
|
7
|
+
import f4 from "../dist/assets/MetricsPro-CqnaO6YX.js" with { type: 'file' };
|
|
8
|
+
import f5 from "../dist/assets/QueueDetailPro-DXEdsZx_.js" with { type: 'file' };
|
|
9
|
+
import f6 from "../dist/assets/ServerControl-CPT0LpsC.js" with { type: 'file' };
|
|
10
|
+
import f7 from "../dist/assets/useServerActionGuard-Db7PPgaI.js" with { type: 'file' };
|
|
11
|
+
import f8 from "../dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2" with { type: 'file' };
|
|
12
|
+
import f9 from "../dist/assets/icons-BVzwsfbG.js" with { type: 'file' };
|
|
13
|
+
import f10 from "../dist/assets/feedback-QDN1AsYt.js" with { type: 'file' };
|
|
14
|
+
import f11 from "../dist/assets/JobsPro-B4-CSoq3.js" with { type: 'file' };
|
|
15
|
+
import f12 from "../dist/assets/react-vendor-CvwrP0tU.js" with { type: 'file' };
|
|
16
|
+
import f13 from "../dist/assets/Jobs-CkyRvzOT.js" with { type: 'file' };
|
|
17
|
+
import f14 from "../dist/assets/McpServer-BKlTR1qr.js" with { type: 'file' };
|
|
18
|
+
import f15 from "../dist/assets/Alerts-5I44QTnQ.js" with { type: 'file' };
|
|
19
|
+
import f16 from "../dist/assets/Database-koy8haPX.js" with { type: 'file' };
|
|
20
|
+
import f17 from "../dist/assets/usePolledData-CNtNtd0a.js" with { type: 'file' };
|
|
21
|
+
import f18 from "../dist/assets/Diagnostics-D6oqvkOs.js" with { type: 'file' };
|
|
22
|
+
import f19 from "../dist/assets/StatusBadge-BoOVTnKu.js" with { type: 'file' };
|
|
23
|
+
import f20 from "../dist/assets/Flows-CAG0nDnt.js" with { type: 'file' };
|
|
24
|
+
import f21 from "../dist/assets/Button-Ch1W94fJ.js" with { type: 'file' };
|
|
25
|
+
import f22 from "../dist/assets/exportFile-C7xhE8Yh.js" with { type: 'file' };
|
|
26
|
+
import f23 from "../dist/assets/dist-DjvZiKhB.js" with { type: 'file' };
|
|
27
|
+
import f24 from "../dist/assets/toastStore-B31o6Z5J.js" with { type: 'file' };
|
|
28
|
+
import f25 from "../dist/assets/useControlActionGuard-DT7uudrj.js" with { type: 'file' };
|
|
29
|
+
import f26 from "../dist/assets/controlConnectionEpoch-DzbuWOhe.js" with { type: 'file' };
|
|
30
|
+
import f27 from "../dist/assets/Metrics-Du__9Lbn.js" with { type: 'file' };
|
|
31
|
+
import f28 from "../dist/assets/AddJob-d5KBvmN8.js" with { type: 'file' };
|
|
32
|
+
import f29 from "../dist/assets/form-C4oby9pI.js" with { type: 'file' };
|
|
33
|
+
import f30 from "../dist/assets/QueuesOverview-Du8XLgN0.js" with { type: 'file' };
|
|
34
|
+
import f31 from "../dist/assets/index-TploGF7u.js" with { type: 'file' };
|
|
35
|
+
import f32 from "../dist/assets/QueueControl-BF638r_0.js" with { type: 'file' };
|
|
36
|
+
import f33 from "../dist/assets/DlqControl-nUT5Zzkl.js" with { type: 'file' };
|
|
37
|
+
import f34 from "../dist/assets/DlqPro-VMuBKgP-.js" with { type: 'file' };
|
|
38
|
+
import f35 from "../dist/assets/responses-C9lP49qu.js" with { type: 'file' };
|
|
39
|
+
import f36 from "../dist/assets/AreaChart-DEAalJ6P.js" with { type: 'file' };
|
|
40
|
+
import f37 from "../dist/assets/Overview-udSSt7ZB.js" with { type: 'file' };
|
|
41
|
+
import f38 from "../dist/assets/Pagination-x-Cwgrul.js" with { type: 'file' };
|
|
42
|
+
import f39 from "../dist/assets/JobInspector-CiS5HOSQ.js" with { type: 'file' };
|
|
43
|
+
import f40 from "../dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2" with { type: 'file' };
|
|
44
|
+
import f41 from "../dist/assets/index-B-QjN7pA.css" with { type: 'file' };
|
|
45
|
+
import f42 from "../dist/assets/dist-DpZcbP9W.js" with { type: 'file' };
|
|
46
|
+
import f43 from "../dist/assets/upstreamPaths-ZeijhPPb.js" with { type: 'file' };
|
|
47
|
+
import f44 from "../dist/assets/QueueDetail-C-ms6bMe.js" with { type: 'file' };
|
|
48
|
+
import f45 from "../dist/assets/Benchmark-S1afsQRd.js" with { type: 'file' };
|
|
49
|
+
import f46 from "../dist/assets/cn-zFEt5SO8.js" with { type: 'file' };
|
|
50
|
+
import f47 from "../dist/assets/PageHeader-CvIyaFOO.js" with { type: 'file' };
|
|
51
|
+
import f48 from "../dist/assets/api-81m1TwB7.js" with { type: 'file' };
|
|
52
|
+
import f49 from "../dist/assets/S3BackupPro-CBidbI-s.js" with { type: 'file' };
|
|
53
|
+
import f50 from "../dist/assets/WorkersPro-Dtml89jB.js" with { type: 'file' };
|
|
54
|
+
import f51 from "../dist/assets/S3Backup-CDICSzxM.js" with { type: 'file' };
|
|
55
|
+
import f52 from "../dist/assets/Settings-CmxfSX_8.js" with { type: 'file' };
|
|
56
|
+
import f53 from "../dist/assets/connectionStore-CFuNYZ_8.js" with { type: 'file' };
|
|
57
|
+
import f54 from "../dist/assets/useThroughputSeries-_J7gWbcI.js" with { type: 'file' };
|
|
58
|
+
import f55 from "../dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2" with { type: 'file' };
|
|
59
|
+
import f56 from "../dist/assets/format-Cg7VCIZW.js" with { type: 'file' };
|
|
60
|
+
import f57 from "../dist/assets/QueueActions-D7cQrGvJ.js" with { type: 'file' };
|
|
61
|
+
import f58 from "../dist/assets/install-BPp8nydm.js" with { type: 'file' };
|
|
62
|
+
import f59 from "../dist/assets/dist-1f1fMHVO.js" with { type: 'file' };
|
|
63
|
+
import f60 from "../dist/assets/promisePool-BVfQ9n9Q.js" with { type: 'file' };
|
|
64
|
+
import f61 from "../dist/assets/CronManager-ugmYEAwY.js" with { type: 'file' };
|
|
65
|
+
import f62 from "../dist/assets/Workflows-B8wmQN2X.js" with { type: 'file' };
|
|
66
|
+
import f63 from "../dist/assets/Workers-BceQlUhX.js" with { type: 'file' };
|
|
67
|
+
import f64 from "../dist/assets/Queues-BUMwTVAf.js" with { type: 'file' };
|
|
68
|
+
import f65 from "../dist/assets/CopilotPanel-DDkRd35p.js" with { type: 'file' };
|
|
69
|
+
import f66 from "../dist/assets/bq-BOfwNIlJ.js" with { type: 'file' };
|
|
70
|
+
import f67 from "../dist/assets/BulkAddJobs-BO8LWUHE.js" with { type: 'file' };
|
|
71
|
+
import f68 from "../dist/assets/Dlq-D70Lzmsa.js" with { type: 'file' };
|
|
72
|
+
import f69 from "../dist/assets/LogsPro-BCFeegvr.js" with { type: 'file' };
|
|
73
|
+
import f70 from "../dist/assets/Cron-X3Y5uISO.js" with { type: 'file' };
|
|
74
|
+
import f71 from "../dist/assets/flowMutationSafety-6cP-l4Pa.js" with { type: 'file' };
|
|
75
|
+
import f72 from "../dist/assets/Card-CWxrC8OY.js" with { type: 'file' };
|
|
76
|
+
import f73 from "../dist/assets/Webhooks-CXbZOFFw.js" with { type: 'file' };
|
|
77
|
+
import f74 from "../dist/assets/Usage-B895tSxi.js" with { type: 'file' };
|
|
78
|
+
import f75 from "../dist/assets/dist-BlWBaCN6.js" with { type: 'file' };
|
|
79
|
+
import f76 from "../dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2" with { type: 'file' };
|
|
80
80
|
import f77 from "../dist/assets/jobActions-LQD4KfCc.js" with { type: 'file' };
|
|
81
81
|
import f78 from "../dist/assets/dist-DZL8soAh.js" with { type: 'file' };
|
|
82
|
-
import f79 from "../dist
|
|
82
|
+
import f79 from "../dist/assets/Logs-DBTz2PTz.js" with { type: 'file' };
|
|
83
|
+
import f80 from "../dist/.vite/manifest.json" with { type: 'file' };
|
|
83
84
|
|
|
84
85
|
export const ASSETS: Record<string, string> = {
|
|
85
86
|
"/index.html": f0,
|
|
86
87
|
"/favicon.svg": f1,
|
|
87
88
|
"/og.png": f2,
|
|
88
|
-
"/assets/
|
|
89
|
-
"/assets/
|
|
90
|
-
"/assets/
|
|
91
|
-
"/assets/
|
|
92
|
-
"/assets/
|
|
93
|
-
"/assets/
|
|
94
|
-
"/assets/
|
|
95
|
-
"/assets/
|
|
96
|
-
"/assets/
|
|
97
|
-
"/assets/
|
|
98
|
-
"/assets/
|
|
99
|
-
"/assets/
|
|
100
|
-
"/assets/
|
|
101
|
-
"/assets/
|
|
102
|
-
"/assets/
|
|
103
|
-
"/assets/
|
|
104
|
-
"/assets/
|
|
105
|
-
"/assets/
|
|
106
|
-
"/assets/
|
|
107
|
-
"/assets/
|
|
108
|
-
"/assets/
|
|
109
|
-
"/assets/
|
|
110
|
-
"/assets/
|
|
111
|
-
"/assets/
|
|
112
|
-
"/assets/
|
|
113
|
-
"/assets/
|
|
114
|
-
"/assets/
|
|
115
|
-
"/assets/
|
|
116
|
-
"/assets/
|
|
117
|
-
"/assets/
|
|
118
|
-
"/assets/
|
|
119
|
-
"/assets/
|
|
120
|
-
"/assets/
|
|
121
|
-
"/assets/
|
|
122
|
-
"/assets/
|
|
123
|
-
"/assets/
|
|
124
|
-
"/assets/
|
|
125
|
-
"/assets/
|
|
126
|
-
"/assets/
|
|
127
|
-
"/assets/
|
|
128
|
-
"/assets/
|
|
129
|
-
"/assets/
|
|
130
|
-
"/assets/
|
|
131
|
-
"/assets/
|
|
132
|
-
"/assets/
|
|
133
|
-
"/assets/
|
|
134
|
-
"/assets/
|
|
135
|
-
"/assets/
|
|
136
|
-
"/assets/
|
|
137
|
-
"/assets/
|
|
138
|
-
"/assets/
|
|
139
|
-
"/assets/
|
|
140
|
-
"/assets/
|
|
141
|
-
"/assets/
|
|
142
|
-
"/assets/
|
|
143
|
-
"/assets/
|
|
144
|
-
"/assets/
|
|
145
|
-
"/assets/
|
|
146
|
-
"/assets/
|
|
147
|
-
"/assets/
|
|
148
|
-
"/assets/
|
|
149
|
-
"/assets/
|
|
150
|
-
"/assets/
|
|
151
|
-
"/assets/
|
|
152
|
-
"/assets/
|
|
153
|
-
"/assets/
|
|
154
|
-
"/assets/
|
|
155
|
-
"/assets/
|
|
156
|
-
"/assets/
|
|
157
|
-
"/assets/
|
|
158
|
-
"/assets/
|
|
159
|
-
"/assets/
|
|
160
|
-
"/assets/
|
|
161
|
-
"/assets/
|
|
89
|
+
"/assets/UsagePro-CASN77iV.js": f3,
|
|
90
|
+
"/assets/MetricsPro-CqnaO6YX.js": f4,
|
|
91
|
+
"/assets/QueueDetailPro-DXEdsZx_.js": f5,
|
|
92
|
+
"/assets/ServerControl-CPT0LpsC.js": f6,
|
|
93
|
+
"/assets/useServerActionGuard-Db7PPgaI.js": f7,
|
|
94
|
+
"/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": f8,
|
|
95
|
+
"/assets/icons-BVzwsfbG.js": f9,
|
|
96
|
+
"/assets/feedback-QDN1AsYt.js": f10,
|
|
97
|
+
"/assets/JobsPro-B4-CSoq3.js": f11,
|
|
98
|
+
"/assets/react-vendor-CvwrP0tU.js": f12,
|
|
99
|
+
"/assets/Jobs-CkyRvzOT.js": f13,
|
|
100
|
+
"/assets/McpServer-BKlTR1qr.js": f14,
|
|
101
|
+
"/assets/Alerts-5I44QTnQ.js": f15,
|
|
102
|
+
"/assets/Database-koy8haPX.js": f16,
|
|
103
|
+
"/assets/usePolledData-CNtNtd0a.js": f17,
|
|
104
|
+
"/assets/Diagnostics-D6oqvkOs.js": f18,
|
|
105
|
+
"/assets/StatusBadge-BoOVTnKu.js": f19,
|
|
106
|
+
"/assets/Flows-CAG0nDnt.js": f20,
|
|
107
|
+
"/assets/Button-Ch1W94fJ.js": f21,
|
|
108
|
+
"/assets/exportFile-C7xhE8Yh.js": f22,
|
|
109
|
+
"/assets/dist-DjvZiKhB.js": f23,
|
|
110
|
+
"/assets/toastStore-B31o6Z5J.js": f24,
|
|
111
|
+
"/assets/useControlActionGuard-DT7uudrj.js": f25,
|
|
112
|
+
"/assets/controlConnectionEpoch-DzbuWOhe.js": f26,
|
|
113
|
+
"/assets/Metrics-Du__9Lbn.js": f27,
|
|
114
|
+
"/assets/AddJob-d5KBvmN8.js": f28,
|
|
115
|
+
"/assets/form-C4oby9pI.js": f29,
|
|
116
|
+
"/assets/QueuesOverview-Du8XLgN0.js": f30,
|
|
117
|
+
"/assets/index-TploGF7u.js": f31,
|
|
118
|
+
"/assets/QueueControl-BF638r_0.js": f32,
|
|
119
|
+
"/assets/DlqControl-nUT5Zzkl.js": f33,
|
|
120
|
+
"/assets/DlqPro-VMuBKgP-.js": f34,
|
|
121
|
+
"/assets/responses-C9lP49qu.js": f35,
|
|
122
|
+
"/assets/AreaChart-DEAalJ6P.js": f36,
|
|
123
|
+
"/assets/Overview-udSSt7ZB.js": f37,
|
|
124
|
+
"/assets/Pagination-x-Cwgrul.js": f38,
|
|
125
|
+
"/assets/JobInspector-CiS5HOSQ.js": f39,
|
|
126
|
+
"/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2": f40,
|
|
127
|
+
"/assets/index-B-QjN7pA.css": f41,
|
|
128
|
+
"/assets/dist-DpZcbP9W.js": f42,
|
|
129
|
+
"/assets/upstreamPaths-ZeijhPPb.js": f43,
|
|
130
|
+
"/assets/QueueDetail-C-ms6bMe.js": f44,
|
|
131
|
+
"/assets/Benchmark-S1afsQRd.js": f45,
|
|
132
|
+
"/assets/cn-zFEt5SO8.js": f46,
|
|
133
|
+
"/assets/PageHeader-CvIyaFOO.js": f47,
|
|
134
|
+
"/assets/api-81m1TwB7.js": f48,
|
|
135
|
+
"/assets/S3BackupPro-CBidbI-s.js": f49,
|
|
136
|
+
"/assets/WorkersPro-Dtml89jB.js": f50,
|
|
137
|
+
"/assets/S3Backup-CDICSzxM.js": f51,
|
|
138
|
+
"/assets/Settings-CmxfSX_8.js": f52,
|
|
139
|
+
"/assets/connectionStore-CFuNYZ_8.js": f53,
|
|
140
|
+
"/assets/useThroughputSeries-_J7gWbcI.js": f54,
|
|
141
|
+
"/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2": f55,
|
|
142
|
+
"/assets/format-Cg7VCIZW.js": f56,
|
|
143
|
+
"/assets/QueueActions-D7cQrGvJ.js": f57,
|
|
144
|
+
"/assets/install-BPp8nydm.js": f58,
|
|
145
|
+
"/assets/dist-1f1fMHVO.js": f59,
|
|
146
|
+
"/assets/promisePool-BVfQ9n9Q.js": f60,
|
|
147
|
+
"/assets/CronManager-ugmYEAwY.js": f61,
|
|
148
|
+
"/assets/Workflows-B8wmQN2X.js": f62,
|
|
149
|
+
"/assets/Workers-BceQlUhX.js": f63,
|
|
150
|
+
"/assets/Queues-BUMwTVAf.js": f64,
|
|
151
|
+
"/assets/CopilotPanel-DDkRd35p.js": f65,
|
|
152
|
+
"/assets/bq-BOfwNIlJ.js": f66,
|
|
153
|
+
"/assets/BulkAddJobs-BO8LWUHE.js": f67,
|
|
154
|
+
"/assets/Dlq-D70Lzmsa.js": f68,
|
|
155
|
+
"/assets/LogsPro-BCFeegvr.js": f69,
|
|
156
|
+
"/assets/Cron-X3Y5uISO.js": f70,
|
|
157
|
+
"/assets/flowMutationSafety-6cP-l4Pa.js": f71,
|
|
158
|
+
"/assets/Card-CWxrC8OY.js": f72,
|
|
159
|
+
"/assets/Webhooks-CXbZOFFw.js": f73,
|
|
160
|
+
"/assets/Usage-B895tSxi.js": f74,
|
|
161
|
+
"/assets/dist-BlWBaCN6.js": f75,
|
|
162
|
+
"/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": f76,
|
|
162
163
|
"/assets/jobActions-LQD4KfCc.js": f77,
|
|
163
164
|
"/assets/dist-DZL8soAh.js": f78,
|
|
164
|
-
"
|
|
165
|
+
"/assets/Logs-DBTz2PTz.js": f79,
|
|
166
|
+
"/.vite/manifest.json": f80,
|
|
165
167
|
};
|
package/scripts/serveHandler.ts
CHANGED
|
@@ -10,6 +10,22 @@ import {
|
|
|
10
10
|
withSecurityHeaders,
|
|
11
11
|
} from './servePolicy';
|
|
12
12
|
|
|
13
|
+
const ASSET_CONTENT_TYPES: Record<string, string> = {
|
|
14
|
+
'.css': 'text/css; charset=utf-8',
|
|
15
|
+
'.html': 'text/html; charset=utf-8',
|
|
16
|
+
'.js': 'text/javascript; charset=utf-8',
|
|
17
|
+
'.json': 'application/json; charset=utf-8',
|
|
18
|
+
'.png': 'image/png',
|
|
19
|
+
'.svg': 'image/svg+xml',
|
|
20
|
+
'.webp': 'image/webp',
|
|
21
|
+
'.woff2': 'font/woff2',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function assetContentType(pathname: string): string | undefined {
|
|
25
|
+
const dot = pathname.lastIndexOf('.');
|
|
26
|
+
return dot === -1 ? undefined : ASSET_CONTENT_TYPES[pathname.slice(dot).toLowerCase()];
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
/** Static assets, the admin proxy, and the same-origin agent bridge. */
|
|
14
30
|
export function createServeHandler(opts: ServeHandlerOptions) {
|
|
15
31
|
const {
|
|
@@ -164,7 +180,12 @@ export function createServeHandler(opts: ServeHandlerOptions) {
|
|
|
164
180
|
new Response(await css, { headers: { 'content-type': 'text/css; charset=utf-8' } })
|
|
165
181
|
);
|
|
166
182
|
}
|
|
167
|
-
|
|
183
|
+
const contentType = assetContentType(key);
|
|
184
|
+
return secure(
|
|
185
|
+
new Response(Bun.file(asset), {
|
|
186
|
+
headers: contentType ? { 'content-type': contentType } : undefined,
|
|
187
|
+
})
|
|
188
|
+
);
|
|
168
189
|
}
|
|
169
190
|
if (pathname.startsWith('/assets/')) {
|
|
170
191
|
return secure(new Response('Not found', { status: 404 }));
|
package/scripts/servePolicy.ts
CHANGED
|
@@ -138,9 +138,18 @@ export function prepareRuntimeIndexHtml(indexHtml: string, basePath: string): st
|
|
|
138
138
|
const mount = basePath || '/';
|
|
139
139
|
const agentUrl = `${basePath}/agent`;
|
|
140
140
|
const apiUrl = `${basePath}/api`;
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
const runtimeBasePattern = /<base\s+href=(['"])[^'"]*\1\s+data-bunqueue-base\s*\/?>/;
|
|
142
|
+
if (!runtimeBasePattern.test(indexHtml)) {
|
|
143
|
+
throw new Error('Embedded index.html is missing its runtime base marker');
|
|
144
|
+
}
|
|
145
|
+
const prefix = basePath || '';
|
|
146
|
+
const withPrefixedAssets = indexHtml
|
|
147
|
+
.replace(/\b(href|src)=(['"])\/(?!\/)/g, `$1=$2${prefix}/`)
|
|
148
|
+
.replace(/\b(href|src)=(['"])\.\/(?!\/)/g, `$1=$2${prefix}/`);
|
|
149
|
+
const prefixed = withPrefixedAssets.replace(
|
|
150
|
+
runtimeBasePattern,
|
|
151
|
+
`<base href="${mount.endsWith('/') ? mount : `${mount}/`}" data-bunqueue-base>`
|
|
152
|
+
);
|
|
144
153
|
const runtimeConfig =
|
|
145
154
|
'<script>' +
|
|
146
155
|
`window.__BUNQUEUE_BASE_PATH__=${JSON.stringify(mount)};` +
|