bunqueue-dashboard 0.0.38 → 0.0.40
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 +17 -9
- package/agent/backup/resultValidation.ts +1 -1
- package/agent/backup/routes.ts +63 -17
- package/agent/db/query.ts +2 -1
- package/agent/index.ts +3 -0
- package/agent/manager/config.ts +2 -1
- package/agent/manager/process.ts +51 -5
- package/agent/manager/storageMode.ts +41 -0
- package/agent/manager/types.ts +2 -0
- package/agent/manager.ts +1 -0
- package/agent/queue/routes.ts +56 -2
- package/agent/queue/runtime.ts +67 -1
- package/agent/queue/types.ts +32 -0
- package/agent/queue/validation.ts +16 -0
- package/agent/server/controlRoutes.ts +55 -45
- package/agent/server/controlStatus.ts +115 -0
- 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-DkbI_J5p.js +3 -0
- package/dist/assets/{Alerts-C2bAi-Kj.js → Alerts-CFj-u0iV.js} +1 -1
- package/dist/assets/{AreaChart-w0ruozXH.js → AreaChart-DEAalJ6P.js} +1 -1
- package/dist/assets/Benchmark-Ey2sq57q.js +1 -0
- package/dist/assets/{BulkAddJobs-BBWqQpP7.js → BulkAddJobs-BwPoeSB6.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-Bhh-uCpN.js → CopilotPanel-CniuIIPn.js} +2 -2
- package/dist/assets/{Cron-pJJ5KXFG.js → Cron-B5XFBvU-.js} +1 -1
- package/dist/assets/CronManager-Bdg2BECM.js +1 -0
- package/dist/assets/{Database-DxiXsUl4.js → Database-CB0oOEFB.js} +1 -1
- package/dist/assets/Diagnostics-BDRftXQy.js +1 -0
- package/dist/assets/{Dlq-Bx4YXTp5.js → Dlq-CJO9itzJ.js} +1 -1
- package/dist/assets/{DlqControl-DJGhuyu3.js → DlqControl-DZL2lHOU.js} +1 -1
- package/dist/assets/{DlqPro-BhXIKtrt.js → DlqPro-OqBlzCnN.js} +1 -1
- package/dist/assets/Flows-BItJzbVQ.js +2 -0
- package/dist/assets/JobInspector-CJHX63p_.js +2 -0
- package/dist/assets/{Jobs-Blavwd1H.js → Jobs-BwmTsjJx.js} +1 -1
- package/dist/assets/{JobsPro-D8dH9um7.js → JobsPro-eFVAZJ10.js} +1 -1
- package/dist/assets/{Logs-B3dsGSF8.js → Logs-CXIf58M4.js} +1 -1
- package/dist/assets/{LogsPro-BCB7etG2.js → LogsPro-Xm6rylAd.js} +1 -1
- package/dist/assets/{McpServer-Cz1-GwD5.js → McpServer-Rf3i6lRn.js} +2 -2
- package/dist/assets/{Metrics-Bkuy6Ntb.js → Metrics-Cj3VYxzL.js} +1 -1
- package/dist/assets/{MetricsPro-BbJmy0oO.js → MetricsPro-C63eY00A.js} +1 -1
- package/dist/assets/{Overview-Ba5odzYe.js → Overview-CUM3XG7A.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-b19K0vCT.js +1 -0
- package/dist/assets/QueueControl-DusMoa05.js +1 -0
- package/dist/assets/QueueDetail-CpFIG1PU.js +1 -0
- package/dist/assets/QueueDetailPro-BNlBOj5s.js +1 -0
- package/dist/assets/{Queues-CGPgEkVm.js → Queues-CZ2qc7FY.js} +1 -1
- package/dist/assets/{QueuesOverview-ChC5Dtqh.js → QueuesOverview-CBFqQ3N_.js} +1 -1
- package/dist/assets/{S3Backup-5OKa8G13.js → S3Backup-x4mOV-AO.js} +1 -1
- package/dist/assets/S3BackupPro-BtvbPVg-.js +3 -0
- package/dist/assets/ServerControl-C5nQ7CCp.js +3 -0
- package/dist/assets/{Settings-C1HtCK6h.js → Settings-B5kCRSBH.js} +1 -1
- package/dist/assets/{StatusBadge-B0I7hNBX.js → StatusBadge-BoOVTnKu.js} +1 -1
- package/dist/assets/{Usage-QyZkUhgs.js → Usage-UYovs3D-.js} +1 -1
- package/dist/assets/{UsagePro-DMxrXxur.js → UsagePro-bT82DS-d.js} +1 -1
- package/dist/assets/{Webhooks-D0JQQf0q.js → Webhooks-BjsUMJAn.js} +1 -1
- package/dist/assets/{Workers-Cn8Bkgy1.js → Workers-CD4YZpca.js} +1 -1
- package/dist/assets/WorkersPro-hCPhfb1Z.js +1 -0
- package/dist/assets/Workflows-DOpeo-TP.js +1 -0
- package/dist/assets/{api-V_sVpHDo.js → api-BxYPEynh.js} +1 -1
- package/dist/assets/bq-C7wdABtE.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-DSd3JLAV.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-Cue53Myw.js → index-AUHH2nTG.js} +3 -3
- package/dist/assets/index-BK7fjWKK.css +1 -0
- package/dist/assets/install-C5y2ohOo.js +3 -0
- package/dist/assets/{react-vendor-CyjgmGTq.js → react-vendor-CvwrP0tU.js} +2 -2
- package/dist/assets/{responses-CBLyy1Ob.js → responses-DiIfPXXq.js} +1 -1
- package/dist/assets/{toastStore-B7n0zS0y.js → toastStore-B31o6Z5J.js} +1 -1
- package/dist/assets/{upstreamPaths-CDVsu6IM.js → upstreamPaths-B_cyinGI.js} +1 -1
- package/dist/assets/useControlActionGuard-DT7uudrj.js +1 -0
- package/dist/assets/{usePolledData-g80Z_UB-.js → usePolledData-CNtNtd0a.js} +1 -1
- package/dist/assets/useServerActionGuard-Db7PPgaI.js +1 -0
- package/dist/assets/{useThroughputSeries-CrsZYKbT.js → useThroughputSeries-y7Yyi7Zh.js} +1 -1
- package/dist/index.html +21 -18
- package/package.json +15 -7
- package/scripts/bunVersion.ts +10 -0
- package/scripts/embedded.gen.ts +152 -150
- package/scripts/serve.ts +3 -0
- package/scripts/serveHandler.ts +22 -1
- package/scripts/servePolicy.ts +12 -3
- package/dist/assets/AddJob-CC4bfHLH.js +0 -3
- package/dist/assets/Benchmark-ClJmYZoC.js +0 -1
- package/dist/assets/CronManager-lNZ4lHh1.js +0 -1
- package/dist/assets/Diagnostics-DLvCT7zI.js +0 -1
- package/dist/assets/Flows-Bb9j-YhZ.js +0 -2
- package/dist/assets/JobInspector-DfqBq4O5.js +0 -2
- package/dist/assets/QueueActions-B6M0ByGt.js +0 -1
- package/dist/assets/QueueControl-CWHsVfWU.js +0 -1
- package/dist/assets/QueueDetail-BClRbWC5.js +0 -1
- package/dist/assets/QueueDetailPro-CIimG0pX.js +0 -1
- package/dist/assets/S3BackupPro-BkwTXdtw.js +0 -3
- package/dist/assets/ServerControl-DJHKMaf9.js +0 -3
- package/dist/assets/WorkersPro-BOTuX9EP.js +0 -1
- package/dist/assets/Workflows-DqTKWPmT.js +0 -1
- package/dist/assets/bq-Bmysbg0r.js +0 -1
- package/dist/assets/flowMutationSafety-DObp9nJo.js +0 -1
- package/dist/assets/index-DOze4TKg.css +0 -1
- package/dist/assets/install-CFiYX86d.js +0 -3
- package/dist/assets/useServerActionGuard-OTv6_fU0.js +0 -1
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
WORKFLOW_STATES,
|
|
8
8
|
} from '../workflows';
|
|
9
9
|
import type { RouteResponse } from './types';
|
|
10
|
+
import type { ManagedDatabaseAdmission } from './managedRuntime';
|
|
10
11
|
|
|
11
12
|
function workflowKind(query: URLSearchParams): WorkflowStoreKind {
|
|
12
13
|
const kind = query.get('kind') ?? 'active';
|
|
@@ -23,14 +24,18 @@ function integer(query: URLSearchParams, name: 'limit' | 'offset', fallback: num
|
|
|
23
24
|
return Number(raw);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
export function routeWorkflowReadRequest(
|
|
27
|
+
export async function routeWorkflowReadRequest(
|
|
27
28
|
request: Request,
|
|
28
29
|
pathname: string,
|
|
29
30
|
method: string,
|
|
30
|
-
dataPath: string
|
|
31
|
-
|
|
31
|
+
dataPath: string,
|
|
32
|
+
admission?: ManagedDatabaseAdmission
|
|
33
|
+
): Promise<RouteResponse | null> {
|
|
32
34
|
if (pathname === '/workflows/stats' && method === 'GET') {
|
|
33
|
-
return
|
|
35
|
+
return withDatabase(dataPath, admission, (path) => ({
|
|
36
|
+
status: 200,
|
|
37
|
+
body: { ok: true, ...workflowStats(path) },
|
|
38
|
+
}));
|
|
34
39
|
}
|
|
35
40
|
if (pathname === '/workflows' && method === 'GET') {
|
|
36
41
|
const query = new URL(request.url).searchParams;
|
|
@@ -47,11 +52,11 @@ export function routeWorkflowReadRequest(
|
|
|
47
52
|
) {
|
|
48
53
|
throw new Error('Unknown workflow execution state');
|
|
49
54
|
}
|
|
50
|
-
return {
|
|
55
|
+
return withDatabase(dataPath, admission, (path) => ({
|
|
51
56
|
status: 200,
|
|
52
57
|
body: {
|
|
53
58
|
ok: true,
|
|
54
|
-
...workflowExecutions(
|
|
59
|
+
...workflowExecutions(path, {
|
|
55
60
|
kind: workflowKind(query),
|
|
56
61
|
workflowName: query.get('workflowName') || undefined,
|
|
57
62
|
state: state as WorkflowStateFilter | undefined,
|
|
@@ -59,7 +64,7 @@ export function routeWorkflowReadRequest(
|
|
|
59
64
|
offset: integer(query, 'offset', 0),
|
|
60
65
|
}),
|
|
61
66
|
},
|
|
62
|
-
};
|
|
67
|
+
}));
|
|
63
68
|
}
|
|
64
69
|
if (!pathname.startsWith('/workflows/') || method !== 'GET') return null;
|
|
65
70
|
const rawId = pathname.slice('/workflows/'.length);
|
|
@@ -73,8 +78,20 @@ export function routeWorkflowReadRequest(
|
|
|
73
78
|
throw new Error(`Duplicate workflow detail option: ${key}`);
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
return withDatabase(dataPath, admission, (path) => {
|
|
82
|
+
const execution = workflowExecution(path, decodeURIComponent(rawId), workflowKind(query));
|
|
83
|
+
return execution
|
|
84
|
+
? { status: 200, body: { ok: true, execution } }
|
|
85
|
+
: { status: 404, body: { ok: false, error: 'Workflow execution not found' } };
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function withDatabase<T>(
|
|
90
|
+
dataPath: string,
|
|
91
|
+
admission: ManagedDatabaseAdmission | undefined,
|
|
92
|
+
operation: (path: string) => T
|
|
93
|
+
): Promise<T> {
|
|
94
|
+
return admission
|
|
95
|
+
? admission((snapshot) => operation(snapshot.dataPath))
|
|
96
|
+
: Promise.resolve(operation(dataPath));
|
|
80
97
|
}
|
package/agent/workflows.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Read-only facade for Bunqueue 2.
|
|
2
|
+
* Read-only facade for Bunqueue 2.9.2 Workflow Engine observability.
|
|
3
3
|
* Persistence, decoding and validation live behind this stable public module.
|
|
4
4
|
*/
|
|
5
5
|
export { workflowExecution } from './workflow/detail';
|