nestjs-profiler 1.0.16 → 1.0.18

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/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "nestjs-profiler",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
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",
7
7
  "types": "./index.d.ts",
8
8
  "dependencies": {},
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "nestjs",
12
+ "nestjs-profiler",
13
+ "performance",
14
+ "monitoring",
15
+ "debugging",
16
+ "backend",
17
+ "nodejs",
18
+ "telescope",
19
+ "profiler"
20
+ ],
9
21
  "exports": {
10
22
  ".": {
11
23
  "types": "./index.d.ts",
@@ -1,37 +1,3 @@
1
- <script>
2
- function toggleEntityRow(id) {
3
- const row = document.getElementById(id);
4
- const icon = document.getElementById('icon-' + id);
5
- const contentDiv = document.getElementById('content-' + id);
6
-
7
- if (!row || !icon) return;
8
-
9
- // Toggle visibility
10
- if (row.classList.contains('hidden')) {
11
- row.classList.remove('hidden');
12
- icon.classList.add('rotate-90');
13
-
14
- // Populate if empty (lazy render)
15
- if (contentDiv && contentDiv.children.length === 0) {
16
- try {
17
- const columns = JSON.parse(row.dataset.columns || '[]');
18
- if (columns.length === 0) {
19
- contentDiv.innerHTML = '<span class="text-gray-400 italic">No columns defined</span>';
20
- } else {
21
- contentDiv.innerHTML = columns.map(col =>
22
- `<div class="bg-white px-2 py-1 rounded border border-gray-200 truncate" title="${col}">${col}</div>`
23
- ).join('');
24
- }
25
- } catch (e) {
26
- console.error('Error parsing columns', e);
27
- }
28
- }
29
- } else {
30
- row.classList.add('hidden');
31
- icon.classList.remove('rotate-90');
32
- }
33
- }
34
- </script>
35
1
  <div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
36
2
  <div class="px-6 py-4 border-b border-gray-200 bg-gray-50 flex justify-between items-center">
37
3
  <div class="flex items-center space-x-4">
package/views/layout.html CHANGED
@@ -44,6 +44,40 @@
44
44
  background: #94a3b8;
45
45
  }
46
46
  </style>
47
+ <script>
48
+ function toggleEntityRow(id) {
49
+ const row = document.getElementById(id);
50
+ const icon = document.getElementById('icon-' + id);
51
+ const contentDiv = document.getElementById('content-' + id);
52
+
53
+ if (!row || !icon) return;
54
+
55
+ // Toggle visibility
56
+ if (row.classList.contains('hidden')) {
57
+ row.classList.remove('hidden');
58
+ icon.classList.add('rotate-90');
59
+
60
+ // Populate if empty (lazy render)
61
+ if (contentDiv && contentDiv.children.length === 0) {
62
+ try {
63
+ const columns = JSON.parse(row.dataset.columns || '[]');
64
+ if (columns.length === 0) {
65
+ contentDiv.innerHTML = '<span class="text-gray-400 italic">No columns defined</span>';
66
+ } else {
67
+ contentDiv.innerHTML = columns.map(col =>
68
+ `<div class="bg-white px-2 py-1 rounded border border-gray-200 truncate" title="${col}">${col}</div>`
69
+ ).join('');
70
+ }
71
+ } catch (e) {
72
+ console.error('Error parsing columns', e);
73
+ }
74
+ }
75
+ } else {
76
+ row.classList.add('hidden');
77
+ icon.classList.remove('rotate-90');
78
+ }
79
+ }
80
+ </script>
47
81
  </head>
48
82
 
49
83
  <body class="h-full">
@@ -249,4 +283,4 @@
249
283
  </div>
250
284
  </body>
251
285
 
252
- </html>
286
+ </html>