@forinda/kickjs-devtools 1.2.12 → 1.3.0

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 (2) hide show
  1. package/README.md +61 -0
  2. package/package.json +30 -5
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @forinda/kickjs-devtools
2
+
3
+ Development introspection dashboard for KickJS — routes, DI container, metrics, and health.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # Using the KickJS CLI (recommended — installs as dev dependency)
9
+ kick add devtools
10
+
11
+ # Manual install
12
+ pnpm add -D @forinda/kickjs-devtools
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - `DevToolsAdapter` — lifecycle adapter that mounts debug endpoints
18
+ - Route inspection, DI container state, request metrics, health checks
19
+ - Config exposure with prefix-based redaction
20
+ - Error rate threshold alerts
21
+ - Reactive state snapshot via `/_debug/state`
22
+
23
+ ## Debug Endpoints
24
+
25
+ | Endpoint | Description |
26
+ |----------|-------------|
27
+ | `GET /_debug/routes` | All registered routes with middleware |
28
+ | `GET /_debug/container` | DI container state |
29
+ | `GET /_debug/metrics` | Request counts, error rate, latency |
30
+ | `GET /_debug/health` | Health status (200 or 503) |
31
+ | `GET /_debug/state` | Full reactive state snapshot |
32
+ | `GET /_debug/config` | Sanitized environment variables |
33
+
34
+ ## Quick Example
35
+
36
+ ```typescript
37
+ import { DevToolsAdapter } from '@forinda/kickjs-devtools'
38
+
39
+ bootstrap({
40
+ modules,
41
+ adapters: [
42
+ new DevToolsAdapter({
43
+ enabled: true,
44
+ exposeConfig: true,
45
+ configPrefixes: ['APP_', 'NODE_ENV', 'PORT'],
46
+ errorRateThreshold: 0.3,
47
+ onErrorRateExceeded: (rate) => {
48
+ console.warn(`Error rate: ${(rate * 100).toFixed(1)}%`)
49
+ },
50
+ }),
51
+ ],
52
+ })
53
+ ```
54
+
55
+ ## Documentation
56
+
57
+ [Full documentation](https://forinda.github.io/kick-js/guide/devtools)
58
+
59
+ ## License
60
+
61
+ MIT
package/package.json CHANGED
@@ -1,16 +1,41 @@
1
1
  {
2
2
  "name": "@forinda/kickjs-devtools",
3
- "version": "1.2.12",
3
+ "version": "1.3.0",
4
4
  "description": "Development introspection dashboard for KickJS — routes, DI container, metrics, health",
5
5
  "keywords": [
6
6
  "kickjs",
7
- "devtools",
7
+ "nodejs",
8
+ "typescript",
9
+ "express",
10
+ "decorators",
11
+ "dependency-injection",
12
+ "backend",
13
+ "api",
14
+ "framework",
8
15
  "dashboard",
9
16
  "debug",
10
17
  "introspection",
18
+ "health-check",
19
+ "metrics",
11
20
  "routes",
12
- "container",
13
- "metrics"
21
+ "di-container",
22
+ "@forinda/kickjs-core",
23
+ "@forinda/kickjs-http",
24
+ "@forinda/kickjs-config",
25
+ "@forinda/kickjs-cli",
26
+ "@forinda/kickjs-swagger",
27
+ "@forinda/kickjs-testing",
28
+ "@forinda/kickjs-prisma",
29
+ "@forinda/kickjs-ws",
30
+ "@forinda/kickjs-drizzle",
31
+ "@forinda/kickjs-otel",
32
+ "@forinda/kickjs-graphql",
33
+ "@forinda/kickjs-auth",
34
+ "@forinda/kickjs-cron",
35
+ "@forinda/kickjs-mailer",
36
+ "@forinda/kickjs-queue",
37
+ "@forinda/kickjs-multi-tenant",
38
+ "@forinda/kickjs-notifications"
14
39
  ],
15
40
  "type": "module",
16
41
  "main": "dist/index.js",
@@ -27,7 +52,7 @@
27
52
  ],
28
53
  "dependencies": {
29
54
  "reflect-metadata": "^0.2.2",
30
- "@forinda/kickjs-core": "1.2.12"
55
+ "@forinda/kickjs-core": "1.3.0"
31
56
  },
32
57
  "peerDependencies": {
33
58
  "express": "^5.1.0"