@queuedash/client 1.0.0 → 1.0.1
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 +37 -13
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
> **WIP** - This is a work in progress. Please check back later.
|
|
2
|
-
|
|
3
1
|
<p align="center">
|
|
4
2
|
<a href="https://www.queuedash.com" target="_blank" rel="noopener">
|
|
5
3
|
<img src="https://res.cloudinary.com/driverseat/image/upload/v1677406730/queuedash/queuedash-social.png" alt="QueueDash">
|
|
@@ -7,7 +5,7 @@
|
|
|
7
5
|
</p>
|
|
8
6
|
|
|
9
7
|
<p align="center">
|
|
10
|
-
A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue
|
|
8
|
+
A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue.
|
|
11
9
|
<p>
|
|
12
10
|
|
|
13
11
|
<p align="center">
|
|
@@ -22,14 +20,14 @@
|
|
|
22
20
|
## Features
|
|
23
21
|
|
|
24
22
|
- 😍 Simple, clean, and compact UI
|
|
25
|
-
- 🧙 Add jobs to queue with ease
|
|
26
|
-
- 🪄 Retry, remove, and more actions for jobs
|
|
23
|
+
- 🧙 Add jobs to your queue with ease
|
|
24
|
+
- 🪄 Retry, remove, and more convenient actions for your jobs
|
|
27
25
|
- 📊 Stats for job counts, job durations, and job wait times
|
|
28
26
|
- ✨ Top-level overview page of all queues
|
|
29
|
-
- 🔋 Next.js, Express.js, and Fastify
|
|
27
|
+
- 🔋 Integrates with Next.js, Express.js, and Fastify
|
|
30
28
|
- ⚡️ Compatible with Bull, BullMQ, and Bee-Queue
|
|
31
29
|
|
|
32
|
-
##
|
|
30
|
+
## Getting Started
|
|
33
31
|
|
|
34
32
|
### Express
|
|
35
33
|
|
|
@@ -42,13 +40,15 @@ import { createQueueDashExpressMiddleware } from "@queuedash/api";
|
|
|
42
40
|
|
|
43
41
|
const app = express();
|
|
44
42
|
|
|
43
|
+
const reportQueue = new Bull("report-queue");
|
|
44
|
+
|
|
45
45
|
createQueueDashExpressMiddleware({
|
|
46
46
|
app,
|
|
47
47
|
baseUrl: "/queuedash",
|
|
48
48
|
ctx: {
|
|
49
49
|
queues: [
|
|
50
50
|
{
|
|
51
|
-
queue:
|
|
51
|
+
queue: reportQueue,
|
|
52
52
|
displayName: "Reports",
|
|
53
53
|
type: "bull" as const,
|
|
54
54
|
},
|
|
@@ -88,6 +88,8 @@ export default QueueDashPages;
|
|
|
88
88
|
import * as trpcNext from "@trpc/server/adapters/next";
|
|
89
89
|
import { appRouter } from "@queuedash/api";
|
|
90
90
|
|
|
91
|
+
const reportQueue = new Bull("report-queue");
|
|
92
|
+
|
|
91
93
|
export default trpcNext.createNextApiHandler({
|
|
92
94
|
router: appRouter,
|
|
93
95
|
batching: {
|
|
@@ -96,7 +98,7 @@ export default trpcNext.createNextApiHandler({
|
|
|
96
98
|
createContext: () => ({
|
|
97
99
|
queues: [
|
|
98
100
|
{
|
|
99
|
-
queue:
|
|
101
|
+
queue: reportQueue,
|
|
100
102
|
displayName: "Reports",
|
|
101
103
|
type: "bull" as const,
|
|
102
104
|
},
|
|
@@ -111,6 +113,26 @@ See the [./examples](./examples) folder for more.
|
|
|
111
113
|
|
|
112
114
|
## API Reference
|
|
113
115
|
|
|
116
|
+
### `createQueueDash<*>Middleware`
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
type QueueDashMiddlewareOptions = {
|
|
120
|
+
app: express.Application | FastifyInstance; // Express or Fastify app
|
|
121
|
+
baseUrl: string; // Base path for the API and UI
|
|
122
|
+
ctx: QueueDashContext; // Context for the UI
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
type QueueDashContext = {
|
|
126
|
+
queues: QueueDashQueue[]; // Array of queues to display
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
type QueueDashQueue = {
|
|
130
|
+
queue: Bull.Queue | BullMQ.Queue | BeeQueue; // Queue instance
|
|
131
|
+
displayName: string; // Display name for the queue
|
|
132
|
+
type: "bull" | "bullmq" | "bee"; // Queue type
|
|
133
|
+
};
|
|
134
|
+
```
|
|
135
|
+
|
|
114
136
|
### `<QueueDashApp />`
|
|
115
137
|
|
|
116
138
|
```typescript jsx
|
|
@@ -120,8 +142,10 @@ type QueueDashAppProps = {
|
|
|
120
142
|
};
|
|
121
143
|
```
|
|
122
144
|
|
|
123
|
-
|
|
145
|
+
## Acknowledgements
|
|
146
|
+
|
|
147
|
+
QueueDash was inspired by some great open source projects. Here's a few of them:
|
|
124
148
|
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
149
|
+
- [bull-board](https://github.com/vcapretz/bull-board)
|
|
150
|
+
- [bull-monitor](https://github.com/s-r-x/bull-monitor)
|
|
151
|
+
- [bull-arena](https://github.com/bee-queue/arena)
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@queuedash/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue",
|
|
4
5
|
"files": [
|
|
5
6
|
"dist"
|
|
6
7
|
],
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
"react-dom": "^18.2.0"
|
|
10
11
|
},
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
"@queuedash/ui": "^1.0.
|
|
13
|
+
"@queuedash/ui": "^1.0.1",
|
|
13
14
|
"@rollup/plugin-typescript": "^10.0.1",
|
|
14
15
|
"@types/react": "^18.0.28",
|
|
15
16
|
"@types/react-dom": "^18.0.11",
|