@cinnabun/dev-dashboard 0.0.1 → 0.0.6
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 +55 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @cinnabun/dev-dashboard
|
|
2
|
+
|
|
3
|
+
Development-only introspection dashboard for Cinnabun. Inspect routes, modules, queues, caches, and metrics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @cinnabun/dev-dashboard
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { CinnabunApp, CinnabunFactory } from "@cinnabun/core";
|
|
15
|
+
import { DevDashboardModule, DevDashboardPlugin } from "@cinnabun/dev-dashboard";
|
|
16
|
+
|
|
17
|
+
@CinnabunApp({
|
|
18
|
+
port: 3000,
|
|
19
|
+
scanPaths: [],
|
|
20
|
+
imports: [
|
|
21
|
+
DevDashboardModule.forRoot({
|
|
22
|
+
enabled: process.env.NODE_ENV !== "production",
|
|
23
|
+
path: "/__cinnabun",
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
plugins: [new DevDashboardPlugin()],
|
|
27
|
+
})
|
|
28
|
+
class App {}
|
|
29
|
+
|
|
30
|
+
CinnabunFactory.run(App);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Features
|
|
34
|
+
|
|
35
|
+
- **Routes** — List all HTTP routes and WebSocket handlers
|
|
36
|
+
- **Modules** — Inspect loaded modules and providers
|
|
37
|
+
- **Queues** — View job queues and processors
|
|
38
|
+
- **Cache** — Browse cache keys (when using @cinnabun/cache)
|
|
39
|
+
- **Scheduler** — List scheduled tasks
|
|
40
|
+
- **Metrics** — Request counts and latency (when enabled)
|
|
41
|
+
|
|
42
|
+
## Configuration
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
interface DevDashboardOptions {
|
|
46
|
+
enabled?: boolean; // default: true in development
|
|
47
|
+
path?: string; // default: "/__cinnabun"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Important:** Disable in production or protect with authentication. The dashboard exposes internal application structure.
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|