@vitnode/core 1.2.0-canary.24 → 1.2.0-canary.25
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/dist/src/api/lib/logger-middleware.d.ts.map +1 -1
- package/dist/src/api/lib/logger-middleware.js +6 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +62 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +62 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +62 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +23 -3
- package/dist/src/api/modules/users/routes/test.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +2 -2
- package/dist/src/api/modules/users/users.module.d.ts +1 -1
- package/dist/src/app_admin/core/debug/page.d.ts +2 -2
- package/dist/src/app_admin/core/debug/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/debug/page.js +3 -3
- package/dist/src/components/ui/dialog.js +1 -1
- package/dist/src/database/logs.d.ts +87 -0
- package/dist/src/database/logs.d.ts.map +1 -1
- package/dist/src/database/logs.js +14 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +281 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +5 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +74 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts +4 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +8 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +30 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +31 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +96 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -19
- package/src/locales/en.json +25 -1
- package/dist/src/views/admin/views/core/debug/debug-admin-view.d.ts +0 -4
- package/dist/src/views/admin/views/core/debug/debug-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/views/core/debug/debug-admin-view.js +0 -110
- package/src/app/login/page.tsx +0 -22
- package/src/app/login/sso/[providerId]/page.tsx +0 -19
- package/src/app/register/page.tsx +0 -22
- package/src/app_admin/core/debug/page.tsx +0 -43
- package/src/app_admin/core/page.tsx +0 -5
- package/src/app_admin/core/test/page.tsx +0 -5
- package/src/app_admin/core/users/page.tsx +0 -40
- package/src/drizzle.config.ts +0 -58
- package/src/vitnode.config.ts +0 -114
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-middleware.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/logger-middleware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,KAAG,
|
|
1
|
+
{"version":3,"file":"logger-middleware.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/logger-middleware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,GAAI,GAAG,OAAO,KAAG,oBAgD7C,CAAC"}
|
|
@@ -7,7 +7,12 @@ export const loggerMiddleware = (c)=>{
|
|
|
7
7
|
pluginId,
|
|
8
8
|
type,
|
|
9
9
|
content,
|
|
10
|
-
ipAddress
|
|
10
|
+
ipAddress,
|
|
11
|
+
method: c.req.method.toUpperCase(),
|
|
12
|
+
path: c.req.path,
|
|
13
|
+
userAgent: c.req.header('User-Agent'),
|
|
14
|
+
statusCode: c.res.status,
|
|
15
|
+
userId: c.get('user')?.id
|
|
11
16
|
});
|
|
12
17
|
const loggers = {
|
|
13
18
|
debug: (msg)=>console.debug(`\x1b[34m[VitNode]\x1b[0m \x1b[38;5;208mDebug (${pluginId})\x1b[0m: ${msg}`),
|
|
@@ -127,6 +127,15 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
|
|
|
127
127
|
content: string;
|
|
128
128
|
createdAt: string;
|
|
129
129
|
ipAddress: string;
|
|
130
|
+
method: string;
|
|
131
|
+
path: string;
|
|
132
|
+
userAgent: string | null;
|
|
133
|
+
statusCode: number;
|
|
134
|
+
user: {
|
|
135
|
+
id: number;
|
|
136
|
+
name: string;
|
|
137
|
+
nameCode: string;
|
|
138
|
+
} | null;
|
|
130
139
|
}[];
|
|
131
140
|
pageInfo: {
|
|
132
141
|
count: number;
|
|
@@ -176,20 +185,55 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
|
|
|
176
185
|
content: import("zod").ZodString;
|
|
177
186
|
createdAt: import("zod").ZodDate;
|
|
178
187
|
ipAddress: import("zod").ZodString;
|
|
188
|
+
method: import("zod").ZodString;
|
|
189
|
+
path: import("zod").ZodString;
|
|
190
|
+
userAgent: import("zod").ZodNullable<import("zod").ZodString>;
|
|
191
|
+
statusCode: import("zod").ZodNumber;
|
|
192
|
+
user: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
193
|
+
id: import("zod").ZodNumber;
|
|
194
|
+
name: import("zod").ZodString;
|
|
195
|
+
nameCode: import("zod").ZodString;
|
|
196
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
197
|
+
id: number;
|
|
198
|
+
name: string;
|
|
199
|
+
nameCode: string;
|
|
200
|
+
}, {
|
|
201
|
+
id: number;
|
|
202
|
+
name: string;
|
|
203
|
+
nameCode: string;
|
|
204
|
+
}>>;
|
|
179
205
|
}, "strip", import("zod").ZodTypeAny, {
|
|
180
206
|
ipAddress: string;
|
|
207
|
+
user: {
|
|
208
|
+
id: number;
|
|
209
|
+
name: string;
|
|
210
|
+
nameCode: string;
|
|
211
|
+
} | null;
|
|
181
212
|
id: number;
|
|
182
213
|
createdAt: Date;
|
|
214
|
+
userAgent: string | null;
|
|
183
215
|
type: "warn" | "error" | "debug";
|
|
216
|
+
path: string;
|
|
184
217
|
pluginId: string;
|
|
185
218
|
content: string;
|
|
219
|
+
method: string;
|
|
220
|
+
statusCode: number;
|
|
186
221
|
}, {
|
|
187
222
|
ipAddress: string;
|
|
223
|
+
user: {
|
|
224
|
+
id: number;
|
|
225
|
+
name: string;
|
|
226
|
+
nameCode: string;
|
|
227
|
+
} | null;
|
|
188
228
|
id: number;
|
|
189
229
|
createdAt: Date;
|
|
230
|
+
userAgent: string | null;
|
|
190
231
|
type: "warn" | "error" | "debug";
|
|
232
|
+
path: string;
|
|
191
233
|
pluginId: string;
|
|
192
234
|
content: string;
|
|
235
|
+
method: string;
|
|
236
|
+
statusCode: number;
|
|
193
237
|
}>, "many">;
|
|
194
238
|
pageInfo: import("zod").ZodObject<{
|
|
195
239
|
totalCount: import("zod").ZodNumber;
|
|
@@ -216,11 +260,20 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
|
|
|
216
260
|
}, "strip", import("zod").ZodTypeAny, {
|
|
217
261
|
edges: {
|
|
218
262
|
ipAddress: string;
|
|
263
|
+
user: {
|
|
264
|
+
id: number;
|
|
265
|
+
name: string;
|
|
266
|
+
nameCode: string;
|
|
267
|
+
} | null;
|
|
219
268
|
id: number;
|
|
220
269
|
createdAt: Date;
|
|
270
|
+
userAgent: string | null;
|
|
221
271
|
type: "warn" | "error" | "debug";
|
|
272
|
+
path: string;
|
|
222
273
|
pluginId: string;
|
|
223
274
|
content: string;
|
|
275
|
+
method: string;
|
|
276
|
+
statusCode: number;
|
|
224
277
|
}[];
|
|
225
278
|
pageInfo: {
|
|
226
279
|
count: number;
|
|
@@ -233,11 +286,20 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
|
|
|
233
286
|
}, {
|
|
234
287
|
edges: {
|
|
235
288
|
ipAddress: string;
|
|
289
|
+
user: {
|
|
290
|
+
id: number;
|
|
291
|
+
name: string;
|
|
292
|
+
nameCode: string;
|
|
293
|
+
} | null;
|
|
236
294
|
id: number;
|
|
237
295
|
createdAt: Date;
|
|
296
|
+
userAgent: string | null;
|
|
238
297
|
type: "warn" | "error" | "debug";
|
|
298
|
+
path: string;
|
|
239
299
|
pluginId: string;
|
|
240
300
|
content: string;
|
|
301
|
+
method: string;
|
|
302
|
+
statusCode: number;
|
|
241
303
|
}[];
|
|
242
304
|
pageInfo: {
|
|
243
305
|
count: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oQAKtB,CAAC"}
|
|
@@ -26,6 +26,15 @@ export declare const debugAdminModule: import("../../../lib/module").BuildModule
|
|
|
26
26
|
content: string;
|
|
27
27
|
createdAt: string;
|
|
28
28
|
ipAddress: string;
|
|
29
|
+
method: string;
|
|
30
|
+
path: string;
|
|
31
|
+
userAgent: string | null;
|
|
32
|
+
statusCode: number;
|
|
33
|
+
user: {
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
nameCode: string;
|
|
37
|
+
} | null;
|
|
29
38
|
}[];
|
|
30
39
|
pageInfo: {
|
|
31
40
|
count: number;
|
|
@@ -75,20 +84,55 @@ export declare const debugAdminModule: import("../../../lib/module").BuildModule
|
|
|
75
84
|
content: import("zod").ZodString;
|
|
76
85
|
createdAt: import("zod").ZodDate;
|
|
77
86
|
ipAddress: import("zod").ZodString;
|
|
87
|
+
method: import("zod").ZodString;
|
|
88
|
+
path: import("zod").ZodString;
|
|
89
|
+
userAgent: import("zod").ZodNullable<import("zod").ZodString>;
|
|
90
|
+
statusCode: import("zod").ZodNumber;
|
|
91
|
+
user: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
92
|
+
id: import("zod").ZodNumber;
|
|
93
|
+
name: import("zod").ZodString;
|
|
94
|
+
nameCode: import("zod").ZodString;
|
|
95
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
96
|
+
id: number;
|
|
97
|
+
name: string;
|
|
98
|
+
nameCode: string;
|
|
99
|
+
}, {
|
|
100
|
+
id: number;
|
|
101
|
+
name: string;
|
|
102
|
+
nameCode: string;
|
|
103
|
+
}>>;
|
|
78
104
|
}, "strip", import("zod").ZodTypeAny, {
|
|
79
105
|
ipAddress: string;
|
|
106
|
+
user: {
|
|
107
|
+
id: number;
|
|
108
|
+
name: string;
|
|
109
|
+
nameCode: string;
|
|
110
|
+
} | null;
|
|
80
111
|
id: number;
|
|
81
112
|
createdAt: Date;
|
|
113
|
+
userAgent: string | null;
|
|
82
114
|
type: "warn" | "error" | "debug";
|
|
115
|
+
path: string;
|
|
83
116
|
pluginId: string;
|
|
84
117
|
content: string;
|
|
118
|
+
method: string;
|
|
119
|
+
statusCode: number;
|
|
85
120
|
}, {
|
|
86
121
|
ipAddress: string;
|
|
122
|
+
user: {
|
|
123
|
+
id: number;
|
|
124
|
+
name: string;
|
|
125
|
+
nameCode: string;
|
|
126
|
+
} | null;
|
|
87
127
|
id: number;
|
|
88
128
|
createdAt: Date;
|
|
129
|
+
userAgent: string | null;
|
|
89
130
|
type: "warn" | "error" | "debug";
|
|
131
|
+
path: string;
|
|
90
132
|
pluginId: string;
|
|
91
133
|
content: string;
|
|
134
|
+
method: string;
|
|
135
|
+
statusCode: number;
|
|
92
136
|
}>, "many">;
|
|
93
137
|
pageInfo: import("zod").ZodObject<{
|
|
94
138
|
totalCount: import("zod").ZodNumber;
|
|
@@ -115,11 +159,20 @@ export declare const debugAdminModule: import("../../../lib/module").BuildModule
|
|
|
115
159
|
}, "strip", import("zod").ZodTypeAny, {
|
|
116
160
|
edges: {
|
|
117
161
|
ipAddress: string;
|
|
162
|
+
user: {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
nameCode: string;
|
|
166
|
+
} | null;
|
|
118
167
|
id: number;
|
|
119
168
|
createdAt: Date;
|
|
169
|
+
userAgent: string | null;
|
|
120
170
|
type: "warn" | "error" | "debug";
|
|
171
|
+
path: string;
|
|
121
172
|
pluginId: string;
|
|
122
173
|
content: string;
|
|
174
|
+
method: string;
|
|
175
|
+
statusCode: number;
|
|
123
176
|
}[];
|
|
124
177
|
pageInfo: {
|
|
125
178
|
count: number;
|
|
@@ -132,11 +185,20 @@ export declare const debugAdminModule: import("../../../lib/module").BuildModule
|
|
|
132
185
|
}, {
|
|
133
186
|
edges: {
|
|
134
187
|
ipAddress: string;
|
|
188
|
+
user: {
|
|
189
|
+
id: number;
|
|
190
|
+
name: string;
|
|
191
|
+
nameCode: string;
|
|
192
|
+
} | null;
|
|
135
193
|
id: number;
|
|
136
194
|
createdAt: Date;
|
|
195
|
+
userAgent: string | null;
|
|
137
196
|
type: "warn" | "error" | "debug";
|
|
197
|
+
path: string;
|
|
138
198
|
pluginId: string;
|
|
139
199
|
content: string;
|
|
200
|
+
method: string;
|
|
201
|
+
statusCode: number;
|
|
140
202
|
}[];
|
|
141
203
|
pageInfo: {
|
|
142
204
|
count: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/admin/debug/debug.admin.module.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"debug.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/admin/debug/debug.admin.module.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sQAI3B,CAAC"}
|
|
@@ -27,6 +27,15 @@ export declare const logsDebugAdminRoute: {
|
|
|
27
27
|
content: string;
|
|
28
28
|
createdAt: string;
|
|
29
29
|
ipAddress: string;
|
|
30
|
+
method: string;
|
|
31
|
+
path: string;
|
|
32
|
+
userAgent: string | null;
|
|
33
|
+
statusCode: number;
|
|
34
|
+
user: {
|
|
35
|
+
id: number;
|
|
36
|
+
name: string;
|
|
37
|
+
nameCode: string;
|
|
38
|
+
} | null;
|
|
30
39
|
}[];
|
|
31
40
|
pageInfo: {
|
|
32
41
|
count: number;
|
|
@@ -76,20 +85,55 @@ export declare const logsDebugAdminRoute: {
|
|
|
76
85
|
content: z.ZodString;
|
|
77
86
|
createdAt: z.ZodDate;
|
|
78
87
|
ipAddress: z.ZodString;
|
|
88
|
+
method: z.ZodString;
|
|
89
|
+
path: z.ZodString;
|
|
90
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
91
|
+
statusCode: z.ZodNumber;
|
|
92
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
93
|
+
id: z.ZodNumber;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
nameCode: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
id: number;
|
|
98
|
+
name: string;
|
|
99
|
+
nameCode: string;
|
|
100
|
+
}, {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
nameCode: string;
|
|
104
|
+
}>>;
|
|
79
105
|
}, "strip", z.ZodTypeAny, {
|
|
80
106
|
ipAddress: string;
|
|
107
|
+
user: {
|
|
108
|
+
id: number;
|
|
109
|
+
name: string;
|
|
110
|
+
nameCode: string;
|
|
111
|
+
} | null;
|
|
81
112
|
id: number;
|
|
82
113
|
createdAt: Date;
|
|
114
|
+
userAgent: string | null;
|
|
83
115
|
type: "warn" | "error" | "debug";
|
|
116
|
+
path: string;
|
|
84
117
|
pluginId: string;
|
|
85
118
|
content: string;
|
|
119
|
+
method: string;
|
|
120
|
+
statusCode: number;
|
|
86
121
|
}, {
|
|
87
122
|
ipAddress: string;
|
|
123
|
+
user: {
|
|
124
|
+
id: number;
|
|
125
|
+
name: string;
|
|
126
|
+
nameCode: string;
|
|
127
|
+
} | null;
|
|
88
128
|
id: number;
|
|
89
129
|
createdAt: Date;
|
|
130
|
+
userAgent: string | null;
|
|
90
131
|
type: "warn" | "error" | "debug";
|
|
132
|
+
path: string;
|
|
91
133
|
pluginId: string;
|
|
92
134
|
content: string;
|
|
135
|
+
method: string;
|
|
136
|
+
statusCode: number;
|
|
93
137
|
}>, "many">;
|
|
94
138
|
pageInfo: z.ZodObject<{
|
|
95
139
|
totalCount: z.ZodNumber;
|
|
@@ -116,11 +160,20 @@ export declare const logsDebugAdminRoute: {
|
|
|
116
160
|
}, "strip", z.ZodTypeAny, {
|
|
117
161
|
edges: {
|
|
118
162
|
ipAddress: string;
|
|
163
|
+
user: {
|
|
164
|
+
id: number;
|
|
165
|
+
name: string;
|
|
166
|
+
nameCode: string;
|
|
167
|
+
} | null;
|
|
119
168
|
id: number;
|
|
120
169
|
createdAt: Date;
|
|
170
|
+
userAgent: string | null;
|
|
121
171
|
type: "warn" | "error" | "debug";
|
|
172
|
+
path: string;
|
|
122
173
|
pluginId: string;
|
|
123
174
|
content: string;
|
|
175
|
+
method: string;
|
|
176
|
+
statusCode: number;
|
|
124
177
|
}[];
|
|
125
178
|
pageInfo: {
|
|
126
179
|
count: number;
|
|
@@ -133,11 +186,20 @@ export declare const logsDebugAdminRoute: {
|
|
|
133
186
|
}, {
|
|
134
187
|
edges: {
|
|
135
188
|
ipAddress: string;
|
|
189
|
+
user: {
|
|
190
|
+
id: number;
|
|
191
|
+
name: string;
|
|
192
|
+
nameCode: string;
|
|
193
|
+
} | null;
|
|
136
194
|
id: number;
|
|
137
195
|
createdAt: Date;
|
|
196
|
+
userAgent: string | null;
|
|
138
197
|
type: "warn" | "error" | "debug";
|
|
198
|
+
path: string;
|
|
139
199
|
pluginId: string;
|
|
140
200
|
content: string;
|
|
201
|
+
method: string;
|
|
202
|
+
statusCode: number;
|
|
141
203
|
}[];
|
|
142
204
|
pageInfo: {
|
|
143
205
|
count: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.route.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/debug/routes/logs.route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logs.route.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/debug/routes/logs.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwF9B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { CONFIG_PLUGIN } from "../../../../../config.js";
|
|
3
4
|
import { core_logs, coreLogsType } from "../../../../../database/logs.js";
|
|
5
|
+
import { core_users } from "../../../../../database/users.js";
|
|
4
6
|
import { buildRoute } from "../../../../lib/route.js";
|
|
5
7
|
import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination.js";
|
|
6
8
|
export const logsDebugAdminRoute = buildRoute({
|
|
@@ -33,7 +35,16 @@ export const logsDebugAdminRoute = buildRoute({
|
|
|
33
35
|
type: z.enum(coreLogsType.enumValues),
|
|
34
36
|
content: z.string(),
|
|
35
37
|
createdAt: z.date(),
|
|
36
|
-
ipAddress: z.string()
|
|
38
|
+
ipAddress: z.string(),
|
|
39
|
+
method: z.string(),
|
|
40
|
+
path: z.string(),
|
|
41
|
+
userAgent: z.string().nullable(),
|
|
42
|
+
statusCode: z.number(),
|
|
43
|
+
user: z.object({
|
|
44
|
+
id: z.number(),
|
|
45
|
+
name: z.string(),
|
|
46
|
+
nameCode: z.string()
|
|
47
|
+
}).nullable()
|
|
37
48
|
})),
|
|
38
49
|
pageInfo: zodPaginationPageInfo
|
|
39
50
|
})
|
|
@@ -56,8 +67,17 @@ export const logsDebugAdminRoute = buildRoute({
|
|
|
56
67
|
type: core_logs.type,
|
|
57
68
|
content: core_logs.content,
|
|
58
69
|
createdAt: core_logs.createdAt,
|
|
59
|
-
ipAddress: core_logs.ipAddress
|
|
60
|
-
|
|
70
|
+
ipAddress: core_logs.ipAddress,
|
|
71
|
+
method: core_logs.method,
|
|
72
|
+
path: core_logs.path,
|
|
73
|
+
userAgent: core_logs.userAgent,
|
|
74
|
+
statusCode: core_logs.statusCode,
|
|
75
|
+
user: {
|
|
76
|
+
id: core_users.id,
|
|
77
|
+
name: core_users.name,
|
|
78
|
+
nameCode: core_users.nameCode
|
|
79
|
+
}
|
|
80
|
+
}).from(core_logs).leftJoin(core_users, eq(core_users.id, core_logs.userId)).where(where).orderBy(orderBy).limit(limit),
|
|
61
81
|
table: core_logs,
|
|
62
82
|
orderBy: {
|
|
63
83
|
column: query.orderBy ? core_logs[query.orderBy] : core_logs.createdAt,
|
|
@@ -3,7 +3,7 @@ export declare const testRoute: {
|
|
|
3
3
|
handler: (c: import("hono").Context<import("../../../middlewares/global.middleware").EnvVitNode, "/test", {}>) => Response & import("hono").TypedResponse<"test", 200 | 201, "text">;
|
|
4
4
|
pluginId: "@vitnode/core";
|
|
5
5
|
route: {
|
|
6
|
-
method: "
|
|
6
|
+
method: "post";
|
|
7
7
|
description: string;
|
|
8
8
|
path: "/test";
|
|
9
9
|
responses: {
|
|
@@ -5,7 +5,7 @@ import { CONFIG_PLUGIN } from "../../../../config.js";
|
|
|
5
5
|
export const testRoute = buildRoute({
|
|
6
6
|
...CONFIG_PLUGIN,
|
|
7
7
|
route: {
|
|
8
|
-
method: '
|
|
8
|
+
method: 'post',
|
|
9
9
|
description: 'Test route',
|
|
10
10
|
path: '/test',
|
|
11
11
|
responses: {
|
|
@@ -34,7 +34,7 @@ export const testRoute = buildRoute({
|
|
|
34
34
|
// subject: 'Test Email',
|
|
35
35
|
// });
|
|
36
36
|
// throw new Error('Test error');
|
|
37
|
-
|
|
37
|
+
c.get('log').warn('This is a test warn log');
|
|
38
38
|
return c.text('test');
|
|
39
39
|
}
|
|
40
40
|
});
|
|
@@ -296,7 +296,7 @@ export declare const usersModule: import("../../../api/lib/module").BuildModuleR
|
|
|
296
296
|
handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/test", {}>) => Response & import("hono").TypedResponse<"test", 200 | 201, "text">;
|
|
297
297
|
pluginId: "@vitnode/core";
|
|
298
298
|
route: {
|
|
299
|
-
method: "
|
|
299
|
+
method: "post";
|
|
300
300
|
description: string;
|
|
301
301
|
path: "/test";
|
|
302
302
|
responses: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const
|
|
2
|
+
declare const SystemLogsView: React.LazyExoticComponent<({ searchParams, }: {
|
|
3
3
|
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
4
4
|
}) => Promise<import("react/jsx-runtime").JSX.Element>>;
|
|
5
5
|
export declare const generateMetadata: () => Promise<{
|
|
6
6
|
title: string;
|
|
7
7
|
description: string;
|
|
8
8
|
}>;
|
|
9
|
-
export default function Page(props: React.ComponentProps<typeof
|
|
9
|
+
export default function Page(props: React.ComponentProps<typeof SystemLogsView>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/debug/page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/debug/page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,cAAc;;uDAMnB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;EAO5B,CAAC;AAEF,wBAA8B,IAAI,CAChC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,oDAkBnD"}
|
|
@@ -5,8 +5,8 @@ import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
|
5
5
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
6
6
|
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
7
7
|
import { ClearCacheAction } from "../../../views/admin/views/core/debug/actions/clear-cache/clear-cache.js";
|
|
8
|
-
const
|
|
9
|
-
default: module.
|
|
8
|
+
const SystemLogsView = /*#__PURE__*/ React.lazy(async ()=>import("../../../views/admin/views/core/debug/system-logs/system-logs-view.js").then((module)=>({
|
|
9
|
+
default: module.SystemLogsView
|
|
10
10
|
})));
|
|
11
11
|
export const generateMetadata = async ()=>{
|
|
12
12
|
const t = await getTranslations('admin.debug');
|
|
@@ -34,7 +34,7 @@ export default async function Page(props) {
|
|
|
34
34
|
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
35
35
|
columns: 4
|
|
36
36
|
}),
|
|
37
|
-
children: /*#__PURE__*/ _jsx(
|
|
37
|
+
children: /*#__PURE__*/ _jsx(SystemLogsView, {
|
|
38
38
|
...props
|
|
39
39
|
})
|
|
40
40
|
})
|
|
@@ -114,7 +114,7 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
114
114
|
children: [
|
|
115
115
|
/*#__PURE__*/ _jsx(DialogOverlay, {}),
|
|
116
116
|
/*#__PURE__*/ _jsxs(DialogPrimitive.Content, {
|
|
117
|
-
className: cn('dark:bg-background bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', 'max-h-
|
|
117
|
+
className: cn('dark:bg-background bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', 'max-h-[calc(100vh_-_2rem)] overflow-y-scroll sm:max-h-[calc(100vh_-_5rem)]', className),
|
|
118
118
|
"data-slot": "dialog-content",
|
|
119
119
|
onInteractOutside: (e)=>{
|
|
120
120
|
// Prevent dismissing the dialog when clicking on a toast
|
|
@@ -110,6 +110,93 @@ export declare const core_logs: Omit<import("drizzle-orm/pg-core").PgTableWithCo
|
|
|
110
110
|
}, {}, {
|
|
111
111
|
length: 45;
|
|
112
112
|
}>;
|
|
113
|
+
method: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
|
+
name: "method";
|
|
115
|
+
tableName: "core_logs";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "PgVarchar";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: true;
|
|
121
|
+
hasDefault: true;
|
|
122
|
+
isPrimaryKey: false;
|
|
123
|
+
isAutoincrement: false;
|
|
124
|
+
hasRuntimeDefault: false;
|
|
125
|
+
enumValues: [string, ...string[]];
|
|
126
|
+
baseColumn: never;
|
|
127
|
+
identity: undefined;
|
|
128
|
+
generated: undefined;
|
|
129
|
+
}, {}, {
|
|
130
|
+
length: 10;
|
|
131
|
+
}>;
|
|
132
|
+
path: import("drizzle-orm/pg-core").PgColumn<{
|
|
133
|
+
name: "path";
|
|
134
|
+
tableName: "core_logs";
|
|
135
|
+
dataType: "string";
|
|
136
|
+
columnType: "PgText";
|
|
137
|
+
data: string;
|
|
138
|
+
driverParam: string;
|
|
139
|
+
notNull: true;
|
|
140
|
+
hasDefault: true;
|
|
141
|
+
isPrimaryKey: false;
|
|
142
|
+
isAutoincrement: false;
|
|
143
|
+
hasRuntimeDefault: false;
|
|
144
|
+
enumValues: [string, ...string[]];
|
|
145
|
+
baseColumn: never;
|
|
146
|
+
identity: undefined;
|
|
147
|
+
generated: undefined;
|
|
148
|
+
}, {}, {}>;
|
|
149
|
+
userAgent: import("drizzle-orm/pg-core").PgColumn<{
|
|
150
|
+
name: "userAgent";
|
|
151
|
+
tableName: "core_logs";
|
|
152
|
+
dataType: "string";
|
|
153
|
+
columnType: "PgText";
|
|
154
|
+
data: string;
|
|
155
|
+
driverParam: string;
|
|
156
|
+
notNull: false;
|
|
157
|
+
hasDefault: false;
|
|
158
|
+
isPrimaryKey: false;
|
|
159
|
+
isAutoincrement: false;
|
|
160
|
+
hasRuntimeDefault: false;
|
|
161
|
+
enumValues: [string, ...string[]];
|
|
162
|
+
baseColumn: never;
|
|
163
|
+
identity: undefined;
|
|
164
|
+
generated: undefined;
|
|
165
|
+
}, {}, {}>;
|
|
166
|
+
statusCode: import("drizzle-orm/pg-core").PgColumn<{
|
|
167
|
+
name: "statusCode";
|
|
168
|
+
tableName: "core_logs";
|
|
169
|
+
dataType: "number";
|
|
170
|
+
columnType: "PgInteger";
|
|
171
|
+
data: number;
|
|
172
|
+
driverParam: string | number;
|
|
173
|
+
notNull: true;
|
|
174
|
+
hasDefault: true;
|
|
175
|
+
isPrimaryKey: false;
|
|
176
|
+
isAutoincrement: false;
|
|
177
|
+
hasRuntimeDefault: false;
|
|
178
|
+
enumValues: undefined;
|
|
179
|
+
baseColumn: never;
|
|
180
|
+
identity: undefined;
|
|
181
|
+
generated: undefined;
|
|
182
|
+
}, {}, {}>;
|
|
183
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
184
|
+
name: "userId";
|
|
185
|
+
tableName: "core_logs";
|
|
186
|
+
dataType: "number";
|
|
187
|
+
columnType: "PgBigInt53";
|
|
188
|
+
data: number;
|
|
189
|
+
driverParam: string | number;
|
|
190
|
+
notNull: false;
|
|
191
|
+
hasDefault: false;
|
|
192
|
+
isPrimaryKey: false;
|
|
193
|
+
isAutoincrement: false;
|
|
194
|
+
hasRuntimeDefault: false;
|
|
195
|
+
enumValues: undefined;
|
|
196
|
+
baseColumn: never;
|
|
197
|
+
identity: undefined;
|
|
198
|
+
generated: undefined;
|
|
199
|
+
}, {}, {}>;
|
|
113
200
|
};
|
|
114
201
|
dialect: "pg";
|
|
115
202
|
}>, "enableRLS">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/database/logs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/database/logs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,kEAAqD,CAAC;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAeP,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pgEnum, pgTable } from "drizzle-orm/pg-core";
|
|
2
|
+
import { core_users } from "./users.js";
|
|
2
3
|
export const coreLogsType = pgEnum('coreLogsType', [
|
|
3
4
|
'warn',
|
|
4
5
|
'error',
|
|
@@ -14,5 +15,17 @@ export const core_logs = pgTable('core_logs', (t)=>({
|
|
|
14
15
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
15
16
|
ipAddress: t.varchar({
|
|
16
17
|
length: 45
|
|
17
|
-
}).notNull()
|
|
18
|
+
}).notNull(),
|
|
19
|
+
method: t.varchar({
|
|
20
|
+
length: 10
|
|
21
|
+
}).notNull().default('GET'),
|
|
22
|
+
path: t.text().notNull().default('localhost'),
|
|
23
|
+
userAgent: t.text(),
|
|
24
|
+
statusCode: t.integer().notNull().default(500),
|
|
25
|
+
userId: t.bigint({
|
|
26
|
+
mode: 'number'
|
|
27
|
+
}).references(()=>core_users.id, {
|
|
28
|
+
onDelete: 'set null',
|
|
29
|
+
onUpdate: 'cascade'
|
|
30
|
+
})
|
|
18
31
|
})).enableRLS();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { getSystemLogsData } from '../../system-logs-view';
|
|
2
|
+
export declare const ContentMoreActionSystemLogs: ({ content, ipAddress, pluginId, createdAt, type, id, method, path, userAgent, statusCode, user, }: Awaited<ReturnType<typeof getSystemLogsData>>["edges"][number]) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=content.d.ts.map
|