nestjs-profiler 1.0.20 → 1.0.22

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 +16 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -66,6 +66,12 @@ import { ProfilerModule } from 'nestjs-profiler';
66
66
  // Add pgDriver
67
67
  pgDriver: pg,
68
68
 
69
+ // Add mysql2 driver for MySQL profiling
70
+ mysqlDriver: mysql2,
71
+
72
+ // Add mongodb driver for MongoDB profiling
73
+ mongoDriver: mongodb,
74
+
69
75
  // MongoDB Profiling (default: true)
70
76
  collectMongo: true,
71
77
 
@@ -123,6 +129,16 @@ You can also retrieve profile data programmatically:
123
129
  - `GET /__profiler/json` - List recent requests
124
130
  - `GET /__profiler/:id/json` - Get details for a specific request
125
131
 
132
+ ### NOTE: IMPORTANT
133
+
134
+ - The profiler is designed for development and debugging. **Do not enable in production** due to performance overhead and potential security risks.
135
+ - If you have a prefix for your API routes (e.g., `/api`), you have to adjust the global prefix like this:
136
+ ```typescript
137
+ app.setGlobalPrefix('api', {
138
+ exclude: [{ path: '__profiler/(.*)', method: RequestMethod.ALL }],
139
+ });
140
+ ```
141
+
126
142
  ## License
127
143
 
128
144
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-profiler",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "A NestJS module for profiling HTTP requests, database queries, and cache operations. Inspired by Symfony Profiler, it provides a web-based dashboard to inspect request duration, executed queries, log messages, and explain plans for slow queries.",
5
5
  "author": "Mohamed Raslan",
6
6
  "main": "./index.js",