bunqueue-dashboard 0.0.14 → 0.0.15

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 (53) hide show
  1. package/README.md +13 -4
  2. package/agent/logger.ts +68 -14
  3. package/dist/.vite/manifest.json +58 -98
  4. package/dist/assets/{AddJob-DOtZrwc-.js → AddJob-CgeLluaI.js} +1 -1
  5. package/dist/assets/{Benchmark-BKVE509y.js → Benchmark-DrUL2MGj.js} +1 -1
  6. package/dist/assets/{CopilotPanel-Bn8gPZx_.js → CopilotPanel-fr19SCy4.js} +1 -1
  7. package/dist/assets/{CopyButton-CSjndiY7.js → CopyButton-BRNz3U_X.js} +1 -1
  8. package/dist/assets/{Cron-DzeoQTpD.js → Cron-CGpba--B.js} +1 -1
  9. package/dist/assets/{CronManager-CI6wTFbe.js → CronManager-C8DgqC22.js} +1 -1
  10. package/dist/assets/{Database-Bjkl_O9n.js → Database-3TVTb28B.js} +1 -1
  11. package/dist/assets/{Diagnostics-BUeDbexv.js → Diagnostics-Bx3SLh8R.js} +1 -1
  12. package/dist/assets/{Dlq-BzwhitJI.js → Dlq-fvEtz0IH.js} +1 -1
  13. package/dist/assets/{DlqControl-BUCut0SS.js → DlqControl-BuoZGZiz.js} +1 -1
  14. package/dist/assets/{DlqPro-HoeGdD-B.js → DlqPro-Dc4R2c0h.js} +1 -1
  15. package/dist/assets/{Flows-D9sVq4vd.js → Flows-uJwr4Xtd.js} +1 -1
  16. package/dist/assets/{JobInspector-dB68adRz.js → JobInspector-BHzMp9AE.js} +1 -1
  17. package/dist/assets/{Jobs-CAHFY5qa.js → Jobs-B3ngaITT.js} +1 -1
  18. package/dist/assets/{JobsPro-BqIHonV6.js → JobsPro-B8ZXHQat.js} +1 -1
  19. package/dist/assets/{Logs-DjNLXK_r.js → Logs-BFNzXnJu.js} +1 -1
  20. package/dist/assets/{LogsPro-BPWf8AAv.js → LogsPro-BsYmMhV3.js} +1 -1
  21. package/dist/assets/{McpServer-BVxK5LwU.js → McpServer-Dp5CU2Ao.js} +1 -1
  22. package/dist/assets/{Metrics-Bm_pwxzy.js → Metrics-BIy2WsIk.js} +1 -1
  23. package/dist/assets/{MetricsPro-DTsnXQVd.js → MetricsPro-59vtSH96.js} +1 -1
  24. package/dist/assets/{Overview-O67Y-R5x.js → Overview-CKCv4aez.js} +1 -1
  25. package/dist/assets/{Pagination-B-nfZjQZ.js → Pagination-DdeRIp2i.js} +1 -1
  26. package/dist/assets/{QueueControl-BrHXeXPc.js → QueueControl-Bnk114Oa.js} +1 -1
  27. package/dist/assets/{QueueDetail-D-C5SXxB.js → QueueDetail-BjblUfMz.js} +1 -1
  28. package/dist/assets/{Queues-5tq1o_1I.js → Queues-DLfqg-GX.js} +1 -1
  29. package/dist/assets/{QueuesOverview-ClZM34rT.js → QueuesOverview-2q1ROf6f.js} +1 -1
  30. package/dist/assets/{S3Backup-BZfckRKX.js → S3Backup-BnL4NviE.js} +1 -1
  31. package/dist/assets/{S3BackupPro-CteU25_J.js → S3BackupPro-MKhVJfmN.js} +1 -1
  32. package/dist/assets/{ServerControl-BSLX2WeV.js → ServerControl-MwMUqZXA.js} +1 -1
  33. package/dist/assets/{Settings-BAELEgud.js → Settings-Bg4nYelW.js} +1 -1
  34. package/dist/assets/{Usage-B_8T34Sp.js → Usage-Cf-_mayK.js} +1 -1
  35. package/dist/assets/{UsagePro-BhhM0H05.js → UsagePro-Dvnkxjtk.js} +1 -1
  36. package/dist/assets/{Webhooks-B_qJ0bx1.js → Webhooks-DI-3YwZu.js} +1 -1
  37. package/dist/assets/{Workers-N6qIdxg1.js → Workers-DzewyMtr.js} +1 -1
  38. package/dist/assets/{WorkersPro-DzjKVhCO.js → WorkersPro-DXnomAJx.js} +1 -1
  39. package/dist/assets/index-BWY8Yofc.css +1 -0
  40. package/dist/assets/{index-ChJpSdwV.js → index-D6Nj5ksZ.js} +3 -3
  41. package/dist/index.html +2 -2
  42. package/package.json +2 -7
  43. package/scripts/embedded.gen.ts +98 -114
  44. package/CHANGELOG.md +0 -315
  45. package/dist/assets/index-DNaP_bi8.css +0 -1
  46. package/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  47. package/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  48. package/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  49. package/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  50. package/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  51. package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  52. package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  53. package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
package/README.md CHANGED
@@ -12,6 +12,7 @@ control queues, jobs, DLQ, cron, webhooks, workers, a live activity stream, and
12
12
 
13
13
  The full dashboard running on sample data, no server needed.
14
14
 
15
+ [![npm](https://img.shields.io/npm/v/bunqueue-dashboard?logo=npm&color=cb3837)](https://www.npmjs.com/package/bunqueue-dashboard)
15
16
  [![CI](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/ci.yml/badge.svg)](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/ci.yml)
16
17
  [![Deploy to GitHub Pages](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/pages.yml/badge.svg)](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/pages.yml)
17
18
  [![Docker](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/docker.yml/badge.svg)](https://github.com/egeominotti/bunqueue-dashboard/actions/workflows/docker.yml)
@@ -119,10 +120,18 @@ agent start one for you from the **Server** page).
119
120
  bunx bunqueue-dashboard
120
121
  ```
121
122
 
122
- One command: serves the prebuilt dashboard on http://127.0.0.1:8080, proxies `/api/*` to your
123
- bunqueue server (`BUNQUEUE_URL`, default `http://localhost:6790`), and runs the control agent on
124
- `127.0.0.1:6800`. Same env knobs as the standalone binaries: `PORT` · `BIND_ADDR` · `BUNQUEUE_URL` ·
125
- `AGENT_PORT` · `AGENT_ALLOWED_ORIGINS` · `AGENT_TOKEN` · `BUNQUEUE_START_CMD`.
123
+ One command, **zero dependencies** (a 543 kB download): serves the prebuilt dashboard on
124
+ http://127.0.0.1:8080, proxies `/api/*` to your bunqueue server (`BUNQUEUE_URL`, default
125
+ `http://localhost:6790`), and runs the control agent on `127.0.0.1:6800`. Same env knobs as the
126
+ standalone binaries: `PORT` · `BIND_ADDR` · `BUNQUEUE_URL` · `AGENT_PORT` ·
127
+ `AGENT_ALLOWED_ORIGINS` · `AGENT_TOKEN` · `BUNQUEUE_START_CMD`.
128
+
129
+ Install it permanently instead of running via `bunx`:
130
+
131
+ ```bash
132
+ bun add -g bunqueue-dashboard # or: npm i -g bunqueue-dashboard (still runs on Bun)
133
+ bunqueue-dashboard
134
+ ```
126
135
 
127
136
  ### Run from source
128
137
 
package/agent/logger.ts CHANGED
@@ -1,23 +1,77 @@
1
- import pino from 'pino';
2
- import pretty from 'pino-pretty';
3
-
4
1
  /**
5
2
  * Shared structured logger for the Bun-side infra (the control agent and the
6
3
  * standalone server). Pretty, colorized output on an interactive terminal;
7
4
  * newline-delimited JSON everywhere else (piped, redirected, or under a
8
5
  * process manager) so logs stay machine-parseable in production.
9
6
  *
10
- * pino-pretty is attached as a synchronous *stream*, not a worker-thread
11
- * transport, so this also works inside the `bun build --compile` standalone
12
- * binary (a transport worker module isn't embedded by the compiler).
7
+ * Dependency-free on purpose: this file ships in the npm package, and it
8
+ * replaced pino/pino-pretty as the package's ONLY runtime dependencies —
9
+ * dropping them makes `bunx bunqueue-dashboard` a zero-dependency install.
10
+ * The call signature (`logger.info(obj, msg)` / `logger.info(msg)`) and the
11
+ * NDJSON shape (numeric `level`, `time`, `msg`, merged fields) stay
12
+ * pino-compatible so nothing downstream changes.
13
13
  *
14
14
  * Level is controlled by LOG_LEVEL (default "info").
15
15
  */
16
- const level = process.env.LOG_LEVEL ?? 'info';
17
-
18
- export const logger = process.stdout.isTTY
19
- ? pino(
20
- { level },
21
- pretty({ colorize: true, translateTime: 'SYS:HH:MM:ss', ignore: 'pid,hostname' })
22
- )
23
- : pino({ level });
16
+
17
+ export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
18
+
19
+ // pino's numeric levels, kept for NDJSON parity with what we emitted before.
20
+ const LEVELS: Record<LogLevel, number> = {
21
+ trace: 10,
22
+ debug: 20,
23
+ info: 30,
24
+ warn: 40,
25
+ error: 50,
26
+ fatal: 60,
27
+ };
28
+
29
+ const COLORS: Record<LogLevel, string> = {
30
+ trace: '\u001b[90m',
31
+ debug: '\u001b[36m',
32
+ info: '\u001b[32m',
33
+ warn: '\u001b[33m',
34
+ error: '\u001b[31m',
35
+ fatal: '\u001b[35m',
36
+ };
37
+ const RESET = '\u001b[0m';
38
+ const DIM = '\u001b[2m';
39
+
40
+ const threshold = LEVELS[(process.env.LOG_LEVEL ?? 'info') as LogLevel] ?? LEVELS.info;
41
+ const isTTY = !!process.stdout.isTTY;
42
+
43
+ const pad2 = (n: number): string => String(n).padStart(2, '0');
44
+ const clock = (d: Date): string => `${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}`;
45
+
46
+ function write(level: LogLevel, a?: unknown, b?: unknown): void {
47
+ if (LEVELS[level] < threshold) return;
48
+ // pino signature: (mergeObject, message) or just (message). An Error as the
49
+ // first arg gets its message/stack lifted explicitly — Error props are
50
+ // non-enumerable, so a plain spread would silently log `{}`.
51
+ const [obj, msg] =
52
+ typeof a === 'string'
53
+ ? [undefined, a]
54
+ : a instanceof Error
55
+ ? [{ err: { message: a.message, stack: a.stack } }, b as string | undefined]
56
+ : [a as Record<string, unknown> | undefined, b as string | undefined];
57
+
58
+ if (isTTY) {
59
+ const fields = obj && Object.keys(obj).length ? ` ${DIM}${JSON.stringify(obj)}${RESET}` : '';
60
+ console.log(
61
+ `${DIM}${clock(new Date())}${RESET} ${COLORS[level]}${level.toUpperCase().padEnd(5)}${RESET} ${msg ?? ''}${fields}`
62
+ );
63
+ return;
64
+ }
65
+ console.log(
66
+ JSON.stringify({ level: LEVELS[level], time: Date.now(), ...(obj ?? {}), msg: msg ?? '' })
67
+ );
68
+ }
69
+
70
+ export const logger = {
71
+ trace: (a?: unknown, b?: unknown): void => write('trace', a, b),
72
+ debug: (a?: unknown, b?: unknown): void => write('debug', a, b),
73
+ info: (a?: unknown, b?: unknown): void => write('info', a, b),
74
+ warn: (a?: unknown, b?: unknown): void => write('warn', a, b),
75
+ error: (a?: unknown, b?: unknown): void => write('error', a, b),
76
+ fatal: (a?: unknown, b?: unknown): void => write('fatal', a, b),
77
+ };
@@ -7,8 +7,8 @@
7
7
  "_react-vendor-CHIHtdAC.js"
8
8
  ]
9
9
  },
10
- "_CopyButton-CSjndiY7.js": {
11
- "file": "assets/CopyButton-CSjndiY7.js",
10
+ "_CopyButton-BRNz3U_X.js": {
11
+ "file": "assets/CopyButton-BRNz3U_X.js",
12
12
  "name": "CopyButton",
13
13
  "imports": [
14
14
  "_cn-CMFYpumL.js",
@@ -16,8 +16,8 @@
16
16
  "index.html"
17
17
  ]
18
18
  },
19
- "_Pagination-B-nfZjQZ.js": {
20
- "file": "assets/Pagination-B-nfZjQZ.js",
19
+ "_Pagination-DdeRIp2i.js": {
20
+ "file": "assets/Pagination-DdeRIp2i.js",
21
21
  "name": "Pagination",
22
22
  "imports": [
23
23
  "_cn-CMFYpumL.js",
@@ -57,7 +57,7 @@
57
57
  ]
58
58
  },
59
59
  "index.html": {
60
- "file": "assets/index-ChJpSdwV.js",
60
+ "file": "assets/index-D6Nj5ksZ.js",
61
61
  "name": "index",
62
62
  "src": "index.html",
63
63
  "isEntry": true,
@@ -103,39 +103,15 @@
103
103
  "src/lib/demo/install.ts"
104
104
  ],
105
105
  "css": [
106
- "assets/index-DNaP_bi8.css"
106
+ "assets/index-BWY8Yofc.css"
107
107
  ],
108
108
  "assets": [
109
- "assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2",
110
- "assets/inter-cyrillic-wght-normal-DqGufNeO.woff2",
111
- "assets/inter-greek-ext-wght-normal-DlzME5K_.woff2",
112
- "assets/inter-greek-wght-normal-CkhJZR-_.woff2",
113
- "assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2",
114
109
  "assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2",
115
110
  "assets/inter-latin-wght-normal-Dx4kXJAl.woff2",
116
- "assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2",
117
- "assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2",
118
- "assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2",
119
111
  "assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2",
120
112
  "assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2"
121
113
  ]
122
114
  },
123
- "node_modules/@fontsource-variable/inter/files/inter-cyrillic-ext-wght-normal.woff2": {
124
- "file": "assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2",
125
- "src": "node_modules/@fontsource-variable/inter/files/inter-cyrillic-ext-wght-normal.woff2"
126
- },
127
- "node_modules/@fontsource-variable/inter/files/inter-cyrillic-wght-normal.woff2": {
128
- "file": "assets/inter-cyrillic-wght-normal-DqGufNeO.woff2",
129
- "src": "node_modules/@fontsource-variable/inter/files/inter-cyrillic-wght-normal.woff2"
130
- },
131
- "node_modules/@fontsource-variable/inter/files/inter-greek-ext-wght-normal.woff2": {
132
- "file": "assets/inter-greek-ext-wght-normal-DlzME5K_.woff2",
133
- "src": "node_modules/@fontsource-variable/inter/files/inter-greek-ext-wght-normal.woff2"
134
- },
135
- "node_modules/@fontsource-variable/inter/files/inter-greek-wght-normal.woff2": {
136
- "file": "assets/inter-greek-wght-normal-CkhJZR-_.woff2",
137
- "src": "node_modules/@fontsource-variable/inter/files/inter-greek-wght-normal.woff2"
138
- },
139
115
  "node_modules/@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2": {
140
116
  "file": "assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2",
141
117
  "src": "node_modules/@fontsource-variable/inter/files/inter-latin-ext-wght-normal.woff2"
@@ -144,18 +120,6 @@
144
120
  "file": "assets/inter-latin-wght-normal-Dx4kXJAl.woff2",
145
121
  "src": "node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2"
146
122
  },
147
- "node_modules/@fontsource-variable/inter/files/inter-vietnamese-wght-normal.woff2": {
148
- "file": "assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2",
149
- "src": "node_modules/@fontsource-variable/inter/files/inter-vietnamese-wght-normal.woff2"
150
- },
151
- "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-cyrillic-wght-normal.woff2": {
152
- "file": "assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2",
153
- "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-cyrillic-wght-normal.woff2"
154
- },
155
- "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-greek-wght-normal.woff2": {
156
- "file": "assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2",
157
- "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-greek-wght-normal.woff2"
158
- },
159
123
  "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-ext-wght-normal.woff2": {
160
124
  "file": "assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2",
161
125
  "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-ext-wght-normal.woff2"
@@ -164,12 +128,8 @@
164
128
  "file": "assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2",
165
129
  "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2"
166
130
  },
167
- "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2": {
168
- "file": "assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2",
169
- "src": "node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2"
170
- },
171
131
  "src/components/copilot/CopilotPanel.tsx": {
172
- "file": "assets/CopilotPanel-Bn8gPZx_.js",
132
+ "file": "assets/CopilotPanel-fr19SCy4.js",
173
133
  "name": "CopilotPanel",
174
134
  "src": "src/components/copilot/CopilotPanel.tsx",
175
135
  "isDynamicEntry": true,
@@ -187,7 +147,7 @@
187
147
  "isDynamicEntry": true
188
148
  },
189
149
  "src/pages/Cron.tsx": {
190
- "file": "assets/Cron-DzeoQTpD.js",
150
+ "file": "assets/Cron-CGpba--B.js",
191
151
  "name": "Cron",
192
152
  "src": "src/pages/Cron.tsx",
193
153
  "isDynamicEntry": true,
@@ -195,11 +155,11 @@
195
155
  "_cn-CMFYpumL.js",
196
156
  "_react-vendor-CHIHtdAC.js",
197
157
  "index.html",
198
- "_Pagination-B-nfZjQZ.js"
158
+ "_Pagination-DdeRIp2i.js"
199
159
  ]
200
160
  },
201
161
  "src/pages/Dlq.tsx": {
202
- "file": "assets/Dlq-BzwhitJI.js",
162
+ "file": "assets/Dlq-fvEtz0IH.js",
203
163
  "name": "Dlq",
204
164
  "src": "src/pages/Dlq.tsx",
205
165
  "isDynamicEntry": true,
@@ -208,11 +168,11 @@
208
168
  "_react-vendor-CHIHtdAC.js",
209
169
  "index.html",
210
170
  "_form-PtDLk33Z.js",
211
- "_Pagination-B-nfZjQZ.js"
171
+ "_Pagination-DdeRIp2i.js"
212
172
  ]
213
173
  },
214
174
  "src/pages/Jobs.tsx": {
215
- "file": "assets/Jobs-CAHFY5qa.js",
175
+ "file": "assets/Jobs-B3ngaITT.js",
216
176
  "name": "Jobs",
217
177
  "src": "src/pages/Jobs.tsx",
218
178
  "isDynamicEntry": true,
@@ -224,7 +184,7 @@
224
184
  ]
225
185
  },
226
186
  "src/pages/Logs.tsx": {
227
- "file": "assets/Logs-DjNLXK_r.js",
187
+ "file": "assets/Logs-BFNzXnJu.js",
228
188
  "name": "Logs",
229
189
  "src": "src/pages/Logs.tsx",
230
190
  "isDynamicEntry": true,
@@ -233,11 +193,11 @@
233
193
  "_react-vendor-CHIHtdAC.js",
234
194
  "index.html",
235
195
  "_form-PtDLk33Z.js",
236
- "_Pagination-B-nfZjQZ.js"
196
+ "_Pagination-DdeRIp2i.js"
237
197
  ]
238
198
  },
239
199
  "src/pages/Metrics.tsx": {
240
- "file": "assets/Metrics-Bm_pwxzy.js",
200
+ "file": "assets/Metrics-BIy2WsIk.js",
241
201
  "name": "Metrics",
242
202
  "src": "src/pages/Metrics.tsx",
243
203
  "isDynamicEntry": true,
@@ -247,7 +207,7 @@
247
207
  ]
248
208
  },
249
209
  "src/pages/Overview.tsx": {
250
- "file": "assets/Overview-O67Y-R5x.js",
210
+ "file": "assets/Overview-CKCv4aez.js",
251
211
  "name": "Overview",
252
212
  "src": "src/pages/Overview.tsx",
253
213
  "isDynamicEntry": true,
@@ -257,7 +217,7 @@
257
217
  ]
258
218
  },
259
219
  "src/pages/QueueDetail.tsx": {
260
- "file": "assets/QueueDetail-D-C5SXxB.js",
220
+ "file": "assets/QueueDetail-BjblUfMz.js",
261
221
  "name": "QueueDetail",
262
222
  "src": "src/pages/QueueDetail.tsx",
263
223
  "isDynamicEntry": true,
@@ -269,7 +229,7 @@
269
229
  ]
270
230
  },
271
231
  "src/pages/Queues.tsx": {
272
- "file": "assets/Queues-5tq1o_1I.js",
232
+ "file": "assets/Queues-DLfqg-GX.js",
273
233
  "name": "Queues",
274
234
  "src": "src/pages/Queues.tsx",
275
235
  "isDynamicEntry": true,
@@ -277,11 +237,11 @@
277
237
  "_cn-CMFYpumL.js",
278
238
  "_react-vendor-CHIHtdAC.js",
279
239
  "index.html",
280
- "_Pagination-B-nfZjQZ.js"
240
+ "_Pagination-DdeRIp2i.js"
281
241
  ]
282
242
  },
283
243
  "src/pages/S3Backup.tsx": {
284
- "file": "assets/S3Backup-BZfckRKX.js",
244
+ "file": "assets/S3Backup-BnL4NviE.js",
285
245
  "name": "S3Backup",
286
246
  "src": "src/pages/S3Backup.tsx",
287
247
  "isDynamicEntry": true,
@@ -291,7 +251,7 @@
291
251
  ]
292
252
  },
293
253
  "src/pages/Settings.tsx": {
294
- "file": "assets/Settings-BAELEgud.js",
254
+ "file": "assets/Settings-Bg4nYelW.js",
295
255
  "name": "Settings",
296
256
  "src": "src/pages/Settings.tsx",
297
257
  "isDynamicEntry": true,
@@ -304,7 +264,7 @@
304
264
  ]
305
265
  },
306
266
  "src/pages/Usage.tsx": {
307
- "file": "assets/Usage-B_8T34Sp.js",
267
+ "file": "assets/Usage-Cf-_mayK.js",
308
268
  "name": "Usage",
309
269
  "src": "src/pages/Usage.tsx",
310
270
  "isDynamicEntry": true,
@@ -314,7 +274,7 @@
314
274
  ]
315
275
  },
316
276
  "src/pages/Workers.tsx": {
317
- "file": "assets/Workers-N6qIdxg1.js",
277
+ "file": "assets/Workers-DzewyMtr.js",
318
278
  "name": "Workers",
319
279
  "src": "src/pages/Workers.tsx",
320
280
  "isDynamicEntry": true,
@@ -322,11 +282,11 @@
322
282
  "_cn-CMFYpumL.js",
323
283
  "_react-vendor-CHIHtdAC.js",
324
284
  "index.html",
325
- "_Pagination-B-nfZjQZ.js"
285
+ "_Pagination-DdeRIp2i.js"
326
286
  ]
327
287
  },
328
288
  "src/pages/control/AddJob.tsx": {
329
- "file": "assets/AddJob-DOtZrwc-.js",
289
+ "file": "assets/AddJob-CgeLluaI.js",
330
290
  "name": "AddJob",
331
291
  "src": "src/pages/control/AddJob.tsx",
332
292
  "isDynamicEntry": true,
@@ -338,7 +298,7 @@
338
298
  ]
339
299
  },
340
300
  "src/pages/control/Benchmark.tsx": {
341
- "file": "assets/Benchmark-BKVE509y.js",
301
+ "file": "assets/Benchmark-DrUL2MGj.js",
342
302
  "name": "Benchmark",
343
303
  "src": "src/pages/control/Benchmark.tsx",
344
304
  "isDynamicEntry": true,
@@ -348,11 +308,11 @@
348
308
  "index.html",
349
309
  "_form-PtDLk33Z.js",
350
310
  "_AreaChart-DzUXW8u3.js",
351
- "_CopyButton-CSjndiY7.js"
311
+ "_CopyButton-BRNz3U_X.js"
352
312
  ]
353
313
  },
354
314
  "src/pages/control/CronManager.tsx": {
355
- "file": "assets/CronManager-CI6wTFbe.js",
315
+ "file": "assets/CronManager-C8DgqC22.js",
356
316
  "name": "CronManager",
357
317
  "src": "src/pages/control/CronManager.tsx",
358
318
  "isDynamicEntry": true,
@@ -361,11 +321,11 @@
361
321
  "_react-vendor-CHIHtdAC.js",
362
322
  "index.html",
363
323
  "_form-PtDLk33Z.js",
364
- "_Pagination-B-nfZjQZ.js"
324
+ "_Pagination-DdeRIp2i.js"
365
325
  ]
366
326
  },
367
327
  "src/pages/control/Database.tsx": {
368
- "file": "assets/Database-Bjkl_O9n.js",
328
+ "file": "assets/Database-3TVTb28B.js",
369
329
  "name": "Database",
370
330
  "src": "src/pages/control/Database.tsx",
371
331
  "isDynamicEntry": true,
@@ -374,12 +334,12 @@
374
334
  "_react-vendor-CHIHtdAC.js",
375
335
  "index.html",
376
336
  "_form-PtDLk33Z.js",
377
- "_Pagination-B-nfZjQZ.js",
378
- "_CopyButton-CSjndiY7.js"
337
+ "_Pagination-DdeRIp2i.js",
338
+ "_CopyButton-BRNz3U_X.js"
379
339
  ]
380
340
  },
381
341
  "src/pages/control/Diagnostics.tsx": {
382
- "file": "assets/Diagnostics-BUeDbexv.js",
342
+ "file": "assets/Diagnostics-Bx3SLh8R.js",
383
343
  "name": "Diagnostics",
384
344
  "src": "src/pages/control/Diagnostics.tsx",
385
345
  "isDynamicEntry": true,
@@ -390,7 +350,7 @@
390
350
  ]
391
351
  },
392
352
  "src/pages/control/DlqControl.tsx": {
393
- "file": "assets/DlqControl-BUCut0SS.js",
353
+ "file": "assets/DlqControl-BuoZGZiz.js",
394
354
  "name": "DlqControl",
395
355
  "src": "src/pages/control/DlqControl.tsx",
396
356
  "isDynamicEntry": true,
@@ -399,11 +359,11 @@
399
359
  "_react-vendor-CHIHtdAC.js",
400
360
  "index.html",
401
361
  "_form-PtDLk33Z.js",
402
- "_Pagination-B-nfZjQZ.js"
362
+ "_Pagination-DdeRIp2i.js"
403
363
  ]
404
364
  },
405
365
  "src/pages/control/DlqPro.tsx": {
406
- "file": "assets/DlqPro-HoeGdD-B.js",
366
+ "file": "assets/DlqPro-Dc4R2c0h.js",
407
367
  "name": "DlqPro",
408
368
  "src": "src/pages/control/DlqPro.tsx",
409
369
  "isDynamicEntry": true,
@@ -412,11 +372,11 @@
412
372
  "_react-vendor-CHIHtdAC.js",
413
373
  "index.html",
414
374
  "_form-PtDLk33Z.js",
415
- "_Pagination-B-nfZjQZ.js"
375
+ "_Pagination-DdeRIp2i.js"
416
376
  ]
417
377
  },
418
378
  "src/pages/control/Flows.tsx": {
419
- "file": "assets/Flows-D9sVq4vd.js",
379
+ "file": "assets/Flows-uJwr4Xtd.js",
420
380
  "name": "Flows",
421
381
  "src": "src/pages/control/Flows.tsx",
422
382
  "isDynamicEntry": true,
@@ -427,7 +387,7 @@
427
387
  ]
428
388
  },
429
389
  "src/pages/control/JobInspector.tsx": {
430
- "file": "assets/JobInspector-dB68adRz.js",
390
+ "file": "assets/JobInspector-BHzMp9AE.js",
431
391
  "name": "JobInspector",
432
392
  "src": "src/pages/control/JobInspector.tsx",
433
393
  "isDynamicEntry": true,
@@ -436,12 +396,12 @@
436
396
  "_react-vendor-CHIHtdAC.js",
437
397
  "index.html",
438
398
  "_form-PtDLk33Z.js",
439
- "_CopyButton-CSjndiY7.js",
399
+ "_CopyButton-BRNz3U_X.js",
440
400
  "_jobActions-CuOdMglt.js"
441
401
  ]
442
402
  },
443
403
  "src/pages/control/JobsPro.tsx": {
444
- "file": "assets/JobsPro-BqIHonV6.js",
404
+ "file": "assets/JobsPro-B8ZXHQat.js",
445
405
  "name": "JobsPro",
446
406
  "src": "src/pages/control/JobsPro.tsx",
447
407
  "isDynamicEntry": true,
@@ -450,12 +410,12 @@
450
410
  "_react-vendor-CHIHtdAC.js",
451
411
  "index.html",
452
412
  "_form-PtDLk33Z.js",
453
- "_Pagination-B-nfZjQZ.js",
413
+ "_Pagination-DdeRIp2i.js",
454
414
  "_jobActions-CuOdMglt.js"
455
415
  ]
456
416
  },
457
417
  "src/pages/control/LogsPro.tsx": {
458
- "file": "assets/LogsPro-BPWf8AAv.js",
418
+ "file": "assets/LogsPro-BsYmMhV3.js",
459
419
  "name": "LogsPro",
460
420
  "src": "src/pages/control/LogsPro.tsx",
461
421
  "isDynamicEntry": true,
@@ -464,22 +424,22 @@
464
424
  "_react-vendor-CHIHtdAC.js",
465
425
  "index.html",
466
426
  "_form-PtDLk33Z.js",
467
- "_Pagination-B-nfZjQZ.js"
427
+ "_Pagination-DdeRIp2i.js"
468
428
  ]
469
429
  },
470
430
  "src/pages/control/McpServer.tsx": {
471
- "file": "assets/McpServer-BVxK5LwU.js",
431
+ "file": "assets/McpServer-Dp5CU2Ao.js",
472
432
  "name": "McpServer",
473
433
  "src": "src/pages/control/McpServer.tsx",
474
434
  "isDynamicEntry": true,
475
435
  "imports": [
476
436
  "_react-vendor-CHIHtdAC.js",
477
437
  "index.html",
478
- "_CopyButton-CSjndiY7.js"
438
+ "_CopyButton-BRNz3U_X.js"
479
439
  ]
480
440
  },
481
441
  "src/pages/control/MetricsPro.tsx": {
482
- "file": "assets/MetricsPro-DTsnXQVd.js",
442
+ "file": "assets/MetricsPro-59vtSH96.js",
483
443
  "name": "MetricsPro",
484
444
  "src": "src/pages/control/MetricsPro.tsx",
485
445
  "isDynamicEntry": true,
@@ -487,12 +447,12 @@
487
447
  "_cn-CMFYpumL.js",
488
448
  "_react-vendor-CHIHtdAC.js",
489
449
  "index.html",
490
- "_Pagination-B-nfZjQZ.js",
450
+ "_Pagination-DdeRIp2i.js",
491
451
  "_AreaChart-DzUXW8u3.js"
492
452
  ]
493
453
  },
494
454
  "src/pages/control/QueueControl.tsx": {
495
- "file": "assets/QueueControl-BrHXeXPc.js",
455
+ "file": "assets/QueueControl-Bnk114Oa.js",
496
456
  "name": "QueueControl",
497
457
  "src": "src/pages/control/QueueControl.tsx",
498
458
  "isDynamicEntry": true,
@@ -504,7 +464,7 @@
504
464
  ]
505
465
  },
506
466
  "src/pages/control/QueuesOverview.tsx": {
507
- "file": "assets/QueuesOverview-ClZM34rT.js",
467
+ "file": "assets/QueuesOverview-2q1ROf6f.js",
508
468
  "name": "QueuesOverview",
509
469
  "src": "src/pages/control/QueuesOverview.tsx",
510
470
  "isDynamicEntry": true,
@@ -512,11 +472,11 @@
512
472
  "_cn-CMFYpumL.js",
513
473
  "_react-vendor-CHIHtdAC.js",
514
474
  "index.html",
515
- "_Pagination-B-nfZjQZ.js"
475
+ "_Pagination-DdeRIp2i.js"
516
476
  ]
517
477
  },
518
478
  "src/pages/control/S3BackupPro.tsx": {
519
- "file": "assets/S3BackupPro-CteU25_J.js",
479
+ "file": "assets/S3BackupPro-MKhVJfmN.js",
520
480
  "name": "S3BackupPro",
521
481
  "src": "src/pages/control/S3BackupPro.tsx",
522
482
  "isDynamicEntry": true,
@@ -529,7 +489,7 @@
529
489
  ]
530
490
  },
531
491
  "src/pages/control/ServerControl.tsx": {
532
- "file": "assets/ServerControl-BSLX2WeV.js",
492
+ "file": "assets/ServerControl-MwMUqZXA.js",
533
493
  "name": "ServerControl",
534
494
  "src": "src/pages/control/ServerControl.tsx",
535
495
  "isDynamicEntry": true,
@@ -538,11 +498,11 @@
538
498
  "_react-vendor-CHIHtdAC.js",
539
499
  "index.html",
540
500
  "_form-PtDLk33Z.js",
541
- "_CopyButton-CSjndiY7.js"
501
+ "_CopyButton-BRNz3U_X.js"
542
502
  ]
543
503
  },
544
504
  "src/pages/control/UsagePro.tsx": {
545
- "file": "assets/UsagePro-BhhM0H05.js",
505
+ "file": "assets/UsagePro-Dvnkxjtk.js",
546
506
  "name": "UsagePro",
547
507
  "src": "src/pages/control/UsagePro.tsx",
548
508
  "isDynamicEntry": true,
@@ -552,7 +512,7 @@
552
512
  ]
553
513
  },
554
514
  "src/pages/control/Webhooks.tsx": {
555
- "file": "assets/Webhooks-B_qJ0bx1.js",
515
+ "file": "assets/Webhooks-DI-3YwZu.js",
556
516
  "name": "Webhooks",
557
517
  "src": "src/pages/control/Webhooks.tsx",
558
518
  "isDynamicEntry": true,
@@ -561,11 +521,11 @@
561
521
  "_react-vendor-CHIHtdAC.js",
562
522
  "index.html",
563
523
  "_form-PtDLk33Z.js",
564
- "_Pagination-B-nfZjQZ.js"
524
+ "_Pagination-DdeRIp2i.js"
565
525
  ]
566
526
  },
567
527
  "src/pages/control/WorkersPro.tsx": {
568
- "file": "assets/WorkersPro-DzjKVhCO.js",
528
+ "file": "assets/WorkersPro-DXnomAJx.js",
569
529
  "name": "WorkersPro",
570
530
  "src": "src/pages/control/WorkersPro.tsx",
571
531
  "isDynamicEntry": true,
@@ -1,3 +1,3 @@
1
- import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{D as r,E as i,T as a,g as o,j as s,v as c}from"./index-ChJpSdwV.js";import{n as l,o as u,t as d}from"./form-PtDLk33Z.js";var f=e(t(),1),p=n();function m(){let{data:e}=s(()=>o.queues(),[],{intervalMs:3e4}),[t,n]=(0,f.useState)(``),[u,m]=(0,f.useState)(`{
1
+ import{r as e}from"./cn-CMFYpumL.js";import{m as t,t as n}from"./react-vendor-CHIHtdAC.js";import{D as r,E as i,T as a,g as o,j as s,v as c}from"./index-D6Nj5ksZ.js";import{n as l,o as u,t as d}from"./form-PtDLk33Z.js";var f=e(t(),1),p=n();function m(){let{data:e}=s(()=>o.queues(),[],{intervalMs:3e4}),[t,n]=(0,f.useState)(``),[u,m]=(0,f.useState)(`{
2
2
  "hello": "world"
3
3
  }`),[g,_]=(0,f.useState)(`1`),[v,y]=(0,f.useState)(``),[b,x]=(0,f.useState)(``),[S,C]=(0,f.useState)(``),[w,T]=(0,f.useState)(``),[E,D]=(0,f.useState)(``),[O,k]=(0,f.useState)(``),[A,j]=(0,f.useState)(!1),[M,N]=(0,f.useState)(!1),[P,F]=(0,f.useState)(!1),[I,L]=(0,f.useState)(!1),[R,z]=(0,f.useState)(!1),[B,V]=(0,f.useState)(null),[H,U]=(0,f.useState)(null),W=e=>{let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},G=async()=>{if(V(null),U(null),!t.trim()){V({ok:!1,msg:`Choose a queue`});return}let e;try{e=JSON.parse(u)}catch(e){U(`Invalid JSON: ${e.message}`);return}let n={data:e,priority:W(v),delay:W(b),maxAttempts:W(S),backoff:W(w),timeout:W(E),jobId:O.trim()||void 0,removeOnComplete:A||void 0,removeOnFail:M||void 0,durable:P||void 0,lifo:I||void 0},r=W(g)??1;if(!Number.isInteger(r)||r<1){V({ok:!1,msg:`Count must be an integer of at least 1`});return}if(r>1e4){V({ok:!1,msg:`Count must be 10000 or fewer`});return}z(!0);try{if(r===1)V({ok:!0,msg:`Created job ${(await o.addJob(t,n)).id}`});else{let e=await o.addJobsBulk(t,Array.from({length:r},()=>n)),i=new Set(e.ids).size;V({ok:!0,msg:`Created ${i} job${i===1?``:`s`}`})}}catch(e){V({ok:!1,msg:e.message})}finally{z(!1)}};return(0,p.jsxs)(`div`,{children:[(0,p.jsx)(c,{title:`Add Job`,description:`Enqueue a job with full options.`}),(0,p.jsxs)(`form`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-2`,onSubmit:e=>{e.preventDefault(),G()},children:[(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{title:`Job`}),(0,p.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,p.jsxs)(d,{label:`Queue`,children:[(0,p.jsx)(l,{list:`queue-options`,value:t,onChange:e=>n(e.target.value),placeholder:`queue name (existing or new)`}),(0,p.jsx)(`datalist`,{id:`queue-options`,children:(e?.queues??[]).map(e=>(0,p.jsx)(`option`,{value:e.name},e.name))})]}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(d,{label:`Data (JSON)`,children:(0,p.jsx)(`textarea`,{value:u,onChange:e=>m(e.target.value),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`})}),H&&(0,p.jsx)(`p`,{className:`mt-2 text-xs text-danger`,children:H})]})]})]}),(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{title:`Options`}),(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:[(0,p.jsx)(d,{label:`Priority`,children:(0,p.jsx)(l,{type:`number`,value:v,onChange:e=>y(e.target.value),placeholder:`0`})}),(0,p.jsx)(d,{label:`Delay (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:b,onChange:e=>x(e.target.value),placeholder:`0`})}),(0,p.jsx)(d,{label:`Max attempts`,children:(0,p.jsx)(l,{type:`number`,min:1,value:S,onChange:e=>C(e.target.value),placeholder:`3`})}),(0,p.jsx)(d,{label:`Backoff (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:w,onChange:e=>T(e.target.value),placeholder:`1000`})}),(0,p.jsx)(d,{label:`Timeout (ms)`,children:(0,p.jsx)(l,{type:`number`,min:0,value:E,onChange:e=>D(e.target.value),placeholder:`—`})}),(0,p.jsx)(d,{label:`Custom job ID`,children:(0,p.jsx)(l,{value:O,onChange:e=>k(e.target.value),placeholder:`idempotency key`})})]}),(0,p.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-6`,children:[(0,p.jsx)(h,{label:`removeOnComplete`,checked:A,onChange:j}),(0,p.jsx)(h,{label:`removeOnFail`,checked:M,onChange:N}),(0,p.jsx)(h,{label:`durable`,checked:P,onChange:F}),(0,p.jsx)(h,{label:`lifo`,checked:I,onChange:L})]})]}),(0,p.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3 lg:col-span-2`,children:[(0,p.jsx)(`div`,{className:`w-28`,children:(0,p.jsx)(d,{label:`Count`,children:(0,p.jsx)(l,{type:`number`,min:1,value:g,onChange:e=>_(e.target.value)})})}),(0,p.jsx)(r,{type:`submit`,variant:`accent`,disabled:R,children:R?`Adding…`:`Add job`}),B&&(0,p.jsx)(`span`,{className:B.ok?`text-sm text-success`:`text-sm text-danger`,children:B.msg})]})]})]})}function h({label:e,checked:t,onChange:n}){return(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(u,{checked:t,onChange:n,label:e}),(0,p.jsx)(`span`,{className:`font-mono text-xs text-muted`,children:e})]})}export{m as AddJob};