@vitnode/core 1.2.0-canary.23 → 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.
Files changed (183) hide show
  1. package/dist/scripts/plugin.d.ts.map +1 -1
  2. package/dist/scripts/scripts.js +2 -9
  3. package/dist/scripts/shared/file-utils.d.ts.map +1 -1
  4. package/dist/src/api/{plugins → adapters}/email/nodemailer.d.ts +1 -1
  5. package/dist/src/api/adapters/email/nodemailer.d.ts.map +1 -0
  6. package/dist/src/api/{plugins → adapters}/email/nodemailer.js +1 -1
  7. package/dist/src/api/{plugins → adapters}/email/resend.d.ts +1 -1
  8. package/dist/src/api/adapters/email/resend.d.ts.map +1 -0
  9. package/dist/src/api/{plugins → adapters}/email/resend.js +1 -1
  10. package/dist/src/api/adapters/sso/discord.d.ts.map +1 -0
  11. package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -0
  12. package/dist/src/api/adapters/sso/google.d.ts.map +1 -0
  13. package/dist/src/api/config.d.ts.map +1 -1
  14. package/dist/src/api/config.js +6 -5
  15. package/dist/src/api/lib/logger-middleware.d.ts +8 -0
  16. package/dist/src/api/lib/logger-middleware.d.ts.map +1 -0
  17. package/dist/src/api/lib/logger-middleware.js +35 -0
  18. package/dist/src/api/lib/route.d.ts +1 -1
  19. package/dist/src/api/lib/route.d.ts.map +1 -1
  20. package/dist/src/api/lib/route.js +1 -1
  21. package/dist/src/api/middlewares/{global/global.d.ts → global.middleware.d.ts} +10 -8
  22. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -0
  23. package/dist/src/api/middlewares/global.middleware.js +86 -0
  24. package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +4 -0
  25. package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -0
  26. package/dist/src/api/middlewares/rate-limiter.middleware.js +26 -0
  27. package/dist/src/api/models/device.d.ts +4 -1
  28. package/dist/src/api/models/device.d.ts.map +1 -1
  29. package/dist/src/api/models/device.js +21 -14
  30. package/dist/src/api/models/email.d.ts +1 -2
  31. package/dist/src/api/models/email.d.ts.map +1 -1
  32. package/dist/src/api/models/email.js +9 -16
  33. package/dist/src/api/models/password.d.ts.map +1 -1
  34. package/dist/src/api/models/password.js +8 -1
  35. package/dist/src/api/models/session-admin.d.ts +1 -1
  36. package/dist/src/api/models/session-admin.d.ts.map +1 -1
  37. package/dist/src/api/models/session-admin.js +40 -16
  38. package/dist/src/api/models/session.d.ts +1 -1
  39. package/dist/src/api/models/session.d.ts.map +1 -1
  40. package/dist/src/api/models/session.js +28 -12
  41. package/dist/src/api/models/sso.js +1 -1
  42. package/dist/src/api/models/user/sign-up.d.ts +1 -1
  43. package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
  44. package/dist/src/api/models/user/sign-up.js +2 -3
  45. package/dist/src/api/models/user.d.ts +1 -1
  46. package/dist/src/api/models/user.d.ts.map +1 -1
  47. package/dist/src/api/modules/admin/admin.module.d.ts +223 -8
  48. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
  49. package/dist/src/api/modules/admin/admin.module.js +3 -1
  50. package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +221 -0
  51. package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -0
  52. package/dist/src/api/modules/admin/debug/debug.admin.module.js +10 -0
  53. package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +222 -0
  54. package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -0
  55. package/dist/src/api/modules/admin/debug/routes/logs.route.js +90 -0
  56. package/dist/src/api/modules/admin/routes/session.route.d.ts +1 -5
  57. package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -1
  58. package/dist/src/api/modules/admin/routes/session.route.js +0 -4
  59. package/dist/src/api/modules/admin/users/routes/list.route.d.ts +1 -1
  60. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +1 -1
  61. package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
  62. package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
  63. package/dist/src/api/modules/middleware/route.d.ts +1 -1
  64. package/dist/src/api/modules/middleware/route.d.ts.map +1 -1
  65. package/dist/src/api/modules/middleware/route.js +2 -4
  66. package/dist/src/api/modules/users/routes/session.route.d.ts +1 -1
  67. package/dist/src/api/modules/users/routes/sign-in.route.d.ts +1 -1
  68. package/dist/src/api/modules/users/routes/sign-out.route.d.ts +1 -1
  69. package/dist/src/api/modules/users/routes/sign-up.route.d.ts +1 -1
  70. package/dist/src/api/modules/users/routes/test.route.d.ts +2 -2
  71. package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
  72. package/dist/src/api/modules/users/routes/test.route.js +9 -1
  73. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +1 -1
  74. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +1 -1
  75. package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
  76. package/dist/src/api/modules/users/users.module.d.ts +8 -8
  77. package/dist/src/app_admin/core/debug/page.d.ts +11 -0
  78. package/dist/src/app_admin/core/debug/page.d.ts.map +1 -0
  79. package/dist/src/app_admin/core/debug/page.js +44 -0
  80. package/dist/src/app_admin/core/users/page.d.ts +4 -1
  81. package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
  82. package/dist/src/app_admin/core/users/page.js +3 -1
  83. package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +15 -0
  84. package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts.map +1 -0
  85. package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +41 -0
  86. package/dist/src/components/confirm-action/content.d.ts +7 -0
  87. package/dist/src/components/confirm-action/content.d.ts.map +1 -0
  88. package/dist/src/components/confirm-action/content.js +31 -0
  89. package/dist/src/components/date-format.d.ts +2 -1
  90. package/dist/src/components/date-format.d.ts.map +1 -1
  91. package/dist/src/components/date-format.js +4 -1
  92. package/dist/src/components/switchers/langs/language-swietcher.d.ts +5 -0
  93. package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -0
  94. package/dist/src/components/switchers/langs/language-swietcher.js +45 -0
  95. package/dist/src/components/switchers/themes/theme-switcher.d.ts.map +1 -0
  96. package/dist/src/components/switchers/{theme-switcher.js → themes/theme-switcher.js} +1 -1
  97. package/dist/src/components/table/data-table.d.ts.map +1 -1
  98. package/dist/src/components/table/data-table.js +2 -7
  99. package/dist/src/components/ui/alert-dialog.d.ts +7 -2
  100. package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
  101. package/dist/src/components/ui/alert-dialog.js +39 -5
  102. package/dist/src/components/ui/dialog.js +1 -1
  103. package/dist/src/database/logs.d.ts +203 -0
  104. package/dist/src/database/logs.d.ts.map +1 -0
  105. package/dist/src/database/logs.js +31 -0
  106. package/dist/src/database/sessions.d.ts +19 -0
  107. package/dist/src/database/sessions.d.ts.map +1 -1
  108. package/dist/src/database/sessions.js +3 -0
  109. package/dist/src/lib/fetcher/core.d.ts +2 -1
  110. package/dist/src/lib/fetcher/core.d.ts.map +1 -1
  111. package/dist/src/lib/fetcher/core.js +2 -2
  112. package/dist/src/lib/fetcher-client.d.ts +2 -1
  113. package/dist/src/lib/fetcher-client.d.ts.map +1 -1
  114. package/dist/src/lib/fetcher-client.js +3 -2
  115. package/dist/src/lib/fetcher.d.ts +2 -1
  116. package/dist/src/lib/fetcher.d.ts.map +1 -1
  117. package/dist/src/lib/fetcher.js +2 -1
  118. package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
  119. package/dist/src/views/admin/layouts/admin-layout.js +5 -1
  120. package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -1
  121. package/dist/src/views/admin/layouts/user-bar/client.js +26 -18
  122. package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts +2 -0
  123. package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts.map +1 -0
  124. package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +35 -0
  125. package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts +2 -0
  126. package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts.map +1 -0
  127. package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +5 -0
  128. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +3 -0
  129. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -0
  130. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +281 -0
  131. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +5 -0
  132. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -0
  133. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +74 -0
  134. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts +4 -0
  135. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -0
  136. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +8 -0
  137. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +3 -0
  138. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts.map +1 -0
  139. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +30 -0
  140. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +31 -0
  141. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts.map +1 -0
  142. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +96 -0
  143. package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +1 -1
  144. package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -1
  145. package/dist/src/views/auth/sso/buttons/sso-buttons.js +5 -2
  146. package/dist/src/views/layouts/theme/header/header.d.ts +4 -1
  147. package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
  148. package/dist/src/views/layouts/theme/header/header.js +8 -4
  149. package/dist/src/views/layouts/theme/layout.d.ts +3 -1
  150. package/dist/src/views/layouts/theme/layout.d.ts.map +1 -1
  151. package/dist/src/views/layouts/theme/layout.js +4 -3
  152. package/dist/src/vitnode.config.d.ts +11 -5
  153. package/dist/src/vitnode.config.d.ts.map +1 -1
  154. package/dist/src/vitnode.config.js +2 -1
  155. package/dist/tsconfig.tsbuildinfo +1 -1
  156. package/package.json +45 -28
  157. package/src/locales/en.json +59 -1
  158. package/dist/src/api/lib/get-user-ip.d.ts +0 -3
  159. package/dist/src/api/lib/get-user-ip.d.ts.map +0 -1
  160. package/dist/src/api/lib/get-user-ip.js +0 -8
  161. package/dist/src/api/middlewares/global/global.d.ts.map +0 -1
  162. package/dist/src/api/middlewares/global/global.js +0 -47
  163. package/dist/src/api/plugins/email/nodemailer.d.ts.map +0 -1
  164. package/dist/src/api/plugins/email/resend.d.ts.map +0 -1
  165. package/dist/src/api/plugins/sso/discord.d.ts.map +0 -1
  166. package/dist/src/api/plugins/sso/facebook.d.ts.map +0 -1
  167. package/dist/src/api/plugins/sso/google.d.ts.map +0 -1
  168. package/dist/src/components/switchers/theme-switcher.d.ts.map +0 -1
  169. package/src/app/login/page.tsx +0 -22
  170. package/src/app/login/sso/[providerId]/page.tsx +0 -19
  171. package/src/app/register/page.tsx +0 -22
  172. package/src/app_admin/core/page.tsx +0 -5
  173. package/src/app_admin/core/test/page.tsx +0 -5
  174. package/src/app_admin/core/users/page.tsx +0 -35
  175. package/src/drizzle.config.ts +0 -58
  176. package/src/vitnode.config.ts +0 -104
  177. /package/dist/src/api/{plugins → adapters}/sso/discord.d.ts +0 -0
  178. /package/dist/src/api/{plugins → adapters}/sso/discord.js +0 -0
  179. /package/dist/src/api/{plugins → adapters}/sso/facebook.d.ts +0 -0
  180. /package/dist/src/api/{plugins → adapters}/sso/facebook.js +0 -0
  181. /package/dist/src/api/{plugins → adapters}/sso/google.d.ts +0 -0
  182. /package/dist/src/api/{plugins → adapters}/sso/google.js +0 -0
  183. /package/dist/src/components/switchers/{theme-switcher.d.ts → themes/theme-switcher.d.ts} +0 -0
@@ -1,6 +1,5 @@
1
1
  import { and, count, eq, or } from "drizzle-orm";
2
2
  import { HTTPException } from "hono/http-exception";
3
- import { getUserIp } from "../../lib/get-user-ip.js";
4
3
  import { generateAvatarColor } from "../../modules/users/avatar-color.js";
5
4
  import { core_roles } from "../../../database/roles.js";
6
5
  import { core_users } from "../../../database/users.js";
@@ -34,7 +33,7 @@ const getDefaultData = async (c)=>{
34
33
  }
35
34
  return {
36
35
  roleId: defaultRole.id,
37
- emailVerified: !c.get('core').emailProvider
36
+ emailVerified: !c.get('core').emailAdapter
38
37
  };
39
38
  };
40
39
  export const signUp = async ({ email, name, newsletter, hashedPassword }, c)=>{
@@ -66,7 +65,7 @@ export const signUp = async ({ email, name, newsletter, hashedPassword }, c)=>{
66
65
  avatarColor: generateAvatarColor(name),
67
66
  roleId,
68
67
  emailVerified,
69
- ipAddress: getUserIp(c)
68
+ ipAddress: c.get('ipAddress')
70
69
  }).returning();
71
70
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
72
71
  const { password: _, ...user } = data;
@@ -28,6 +28,7 @@ export declare class UserModel {
28
28
  name: string;
29
29
  newsletter?: boolean;
30
30
  }, c: import("hono").Context) => Promise<{
31
+ ipAddress: string;
31
32
  id: number;
32
33
  name: string;
33
34
  createdAt: Date;
@@ -39,7 +40,6 @@ export declare class UserModel {
39
40
  emailVerified: boolean;
40
41
  roleId: number;
41
42
  birthday: Date | null;
42
- ipAddress: string;
43
43
  }>;
44
44
  }
45
45
  //# sourceMappingURL=user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/api/models/user.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,WAAW;;;;;;;;;;;;;;cAAe;IAC1B,kBAAkB;;;;;;;OAAsB;IACxC,MAAM;;;;kBAEw6C,CAAC;;;;;;;;;;;;;;OAF/5C;CACjB"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/api/models/user.ts"],"names":[],"mappings":"AAIA,qBAAa,SAAS;IACpB,WAAW;;;;;;;;;;;;;;cAAe;IAC1B,kBAAkB;;;;;;;OAAsB;IACxC,MAAM;;;;kBAEo3C,CAAC;;;;;;;;;;;;;;OAF32C;CACjB"}
@@ -1,5 +1,5 @@
1
1
  export declare const adminModule: import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "admin", [{
2
- handler: (c: import("hono").Context<import("../../middlewares/global/global").EnvVitNode, "/session", {}>) => Response & import("hono").TypedResponse<{
2
+ handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/session", {}>) => Response & import("hono").TypedResponse<{
3
3
  user: {
4
4
  avatarColor: string;
5
5
  birthday: string | null;
@@ -18,10 +18,6 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
18
18
  route: {
19
19
  method: "get";
20
20
  description: string;
21
- pluginConfig: {
22
- id: string;
23
- name: string;
24
- };
25
21
  path: "/session";
26
22
  responses: {
27
23
  200: {
@@ -103,8 +99,227 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
103
99
  } & {
104
100
  getRoutingPath: () => "/session";
105
101
  };
106
- }], import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "users", [{
107
- handler: (c: import("hono").Context<import("../../middlewares/global/global").EnvVitNode, "/list", {
102
+ }], (import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "debug", [{
103
+ handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/logs", {
104
+ in: {
105
+ query: {
106
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
107
+ cursor?: string | undefined;
108
+ order?: "asc" | "desc" | undefined;
109
+ first?: string | undefined;
110
+ last?: string | undefined;
111
+ };
112
+ };
113
+ out: {
114
+ query: {
115
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
116
+ cursor?: string | undefined;
117
+ order?: "asc" | "desc" | undefined;
118
+ first?: string | undefined;
119
+ last?: string | undefined;
120
+ };
121
+ };
122
+ }>) => Promise<Response & import("hono").TypedResponse<{
123
+ edges: {
124
+ id: number;
125
+ pluginId: string;
126
+ type: "warn" | "error" | "debug";
127
+ content: string;
128
+ createdAt: string;
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;
139
+ }[];
140
+ pageInfo: {
141
+ count: number;
142
+ endCursor: null | number;
143
+ hasNextPage: boolean;
144
+ hasPreviousPage: boolean;
145
+ startCursor: null | number;
146
+ totalCount: number;
147
+ };
148
+ }, 200, "json">>;
149
+ pluginId: "@vitnode/core";
150
+ route: {
151
+ method: "get";
152
+ description: string;
153
+ path: "/logs";
154
+ request: {
155
+ query: import("zod").ZodObject<{
156
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
157
+ first: import("zod").ZodOptional<import("zod").ZodString>;
158
+ last: import("zod").ZodOptional<import("zod").ZodString>;
159
+ } & {
160
+ order: import("zod").ZodOptional<import("zod").ZodEnum<["asc", "desc"]>>;
161
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<["type", "createdAt", "pluginId"]>>;
162
+ }, "strip", import("zod").ZodTypeAny, {
163
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
164
+ cursor?: string | undefined;
165
+ order?: "asc" | "desc" | undefined;
166
+ first?: string | undefined;
167
+ last?: string | undefined;
168
+ }, {
169
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
170
+ cursor?: string | undefined;
171
+ order?: "asc" | "desc" | undefined;
172
+ first?: string | undefined;
173
+ last?: string | undefined;
174
+ }>;
175
+ };
176
+ responses: {
177
+ 200: {
178
+ content: {
179
+ 'application/json': {
180
+ schema: import("zod").ZodObject<{
181
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
182
+ id: import("zod").ZodNumber;
183
+ pluginId: import("zod").ZodString;
184
+ type: import("zod").ZodEnum<["warn", "error", "debug"]>;
185
+ content: import("zod").ZodString;
186
+ createdAt: import("zod").ZodDate;
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
+ }>>;
205
+ }, "strip", import("zod").ZodTypeAny, {
206
+ ipAddress: string;
207
+ user: {
208
+ id: number;
209
+ name: string;
210
+ nameCode: string;
211
+ } | null;
212
+ id: number;
213
+ createdAt: Date;
214
+ userAgent: string | null;
215
+ type: "warn" | "error" | "debug";
216
+ path: string;
217
+ pluginId: string;
218
+ content: string;
219
+ method: string;
220
+ statusCode: number;
221
+ }, {
222
+ ipAddress: string;
223
+ user: {
224
+ id: number;
225
+ name: string;
226
+ nameCode: string;
227
+ } | null;
228
+ id: number;
229
+ createdAt: Date;
230
+ userAgent: string | null;
231
+ type: "warn" | "error" | "debug";
232
+ path: string;
233
+ pluginId: string;
234
+ content: string;
235
+ method: string;
236
+ statusCode: number;
237
+ }>, "many">;
238
+ pageInfo: import("zod").ZodObject<{
239
+ totalCount: import("zod").ZodNumber;
240
+ count: import("zod").ZodNumber;
241
+ hasNextPage: import("zod").ZodBoolean;
242
+ hasPreviousPage: import("zod").ZodBoolean;
243
+ startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
244
+ endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
245
+ }, "strip", import("zod").ZodTypeAny, {
246
+ count: number;
247
+ totalCount: number;
248
+ hasNextPage: boolean;
249
+ hasPreviousPage: boolean;
250
+ startCursor: number | null;
251
+ endCursor: number | null;
252
+ }, {
253
+ count: number;
254
+ totalCount: number;
255
+ hasNextPage: boolean;
256
+ hasPreviousPage: boolean;
257
+ startCursor: number | null;
258
+ endCursor: number | null;
259
+ }>;
260
+ }, "strip", import("zod").ZodTypeAny, {
261
+ edges: {
262
+ ipAddress: string;
263
+ user: {
264
+ id: number;
265
+ name: string;
266
+ nameCode: string;
267
+ } | null;
268
+ id: number;
269
+ createdAt: Date;
270
+ userAgent: string | null;
271
+ type: "warn" | "error" | "debug";
272
+ path: string;
273
+ pluginId: string;
274
+ content: string;
275
+ method: string;
276
+ statusCode: number;
277
+ }[];
278
+ pageInfo: {
279
+ count: number;
280
+ totalCount: number;
281
+ hasNextPage: boolean;
282
+ hasPreviousPage: boolean;
283
+ startCursor: number | null;
284
+ endCursor: number | null;
285
+ };
286
+ }, {
287
+ edges: {
288
+ ipAddress: string;
289
+ user: {
290
+ id: number;
291
+ name: string;
292
+ nameCode: string;
293
+ } | null;
294
+ id: number;
295
+ createdAt: Date;
296
+ userAgent: string | null;
297
+ type: "warn" | "error" | "debug";
298
+ path: string;
299
+ pluginId: string;
300
+ content: string;
301
+ method: string;
302
+ statusCode: number;
303
+ }[];
304
+ pageInfo: {
305
+ count: number;
306
+ totalCount: number;
307
+ hasNextPage: boolean;
308
+ hasPreviousPage: boolean;
309
+ startCursor: number | null;
310
+ endCursor: number | null;
311
+ };
312
+ }>;
313
+ };
314
+ };
315
+ description: string;
316
+ };
317
+ };
318
+ } & {
319
+ getRoutingPath: () => "/logs";
320
+ };
321
+ }], import("../../../api/lib/module").BaseBuildModuleReturn<"@vitnode/core", string, import("../../lib/route").Route<"@vitnode/core", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]> | import("../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "users", [{
322
+ handler: (c: import("hono").Context<import("../../middlewares/global.middleware").EnvVitNode, "/list", {
108
323
  in: {
109
324
  query: {
110
325
  orderBy?: "name" | "createdAt" | undefined;
@@ -290,5 +505,5 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
290
505
  } & {
291
506
  getRoutingPath: () => "/list";
292
507
  };
293
- }], import("../../../api/lib/module").BaseBuildModuleReturn<"@vitnode/core", string, import("../../lib/route").Route<"@vitnode/core", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>[]>;
508
+ }], import("../../../api/lib/module").BaseBuildModuleReturn<"@vitnode/core", string, import("../../lib/route").Route<"@vitnode/core", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>)[]>;
294
509
  //# sourceMappingURL=admin.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQAKtB,CAAC"}
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"}
@@ -1,5 +1,6 @@
1
1
  import { buildModule } from "../../lib/module.js";
2
2
  import { CONFIG_PLUGIN } from "../../../config.js";
3
+ import { debugAdminModule } from "./debug/debug.admin.module.js";
3
4
  import { sessionAdminRoute } from "./routes/session.route.js";
4
5
  import { usersAdminModule } from "./users/users.admin.module.js";
5
6
  export const adminModule = buildModule({
@@ -9,6 +10,7 @@ export const adminModule = buildModule({
9
10
  sessionAdminRoute
10
11
  ],
11
12
  modules: [
12
- usersAdminModule
13
+ usersAdminModule,
14
+ debugAdminModule
13
15
  ]
14
16
  });
@@ -0,0 +1,221 @@
1
+ export declare const debugAdminModule: import("../../../lib/module").BuildModuleReturn<"@vitnode/core", "debug", [{
2
+ handler: (c: import("hono").Context<import("../../../middlewares/global.middleware").EnvVitNode, "/logs", {
3
+ in: {
4
+ query: {
5
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
6
+ cursor?: string | undefined;
7
+ order?: "asc" | "desc" | undefined;
8
+ first?: string | undefined;
9
+ last?: string | undefined;
10
+ };
11
+ };
12
+ out: {
13
+ query: {
14
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
15
+ cursor?: string | undefined;
16
+ order?: "asc" | "desc" | undefined;
17
+ first?: string | undefined;
18
+ last?: string | undefined;
19
+ };
20
+ };
21
+ }>) => Promise<Response & import("hono").TypedResponse<{
22
+ edges: {
23
+ id: number;
24
+ pluginId: string;
25
+ type: "warn" | "error" | "debug";
26
+ content: string;
27
+ createdAt: string;
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;
38
+ }[];
39
+ pageInfo: {
40
+ count: number;
41
+ endCursor: null | number;
42
+ hasNextPage: boolean;
43
+ hasPreviousPage: boolean;
44
+ startCursor: null | number;
45
+ totalCount: number;
46
+ };
47
+ }, 200, "json">>;
48
+ pluginId: "@vitnode/core";
49
+ route: {
50
+ method: "get";
51
+ description: string;
52
+ path: "/logs";
53
+ request: {
54
+ query: import("zod").ZodObject<{
55
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
56
+ first: import("zod").ZodOptional<import("zod").ZodString>;
57
+ last: import("zod").ZodOptional<import("zod").ZodString>;
58
+ } & {
59
+ order: import("zod").ZodOptional<import("zod").ZodEnum<["asc", "desc"]>>;
60
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<["type", "createdAt", "pluginId"]>>;
61
+ }, "strip", import("zod").ZodTypeAny, {
62
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
63
+ cursor?: string | undefined;
64
+ order?: "asc" | "desc" | undefined;
65
+ first?: string | undefined;
66
+ last?: string | undefined;
67
+ }, {
68
+ orderBy?: "createdAt" | "type" | "pluginId" | undefined;
69
+ cursor?: string | undefined;
70
+ order?: "asc" | "desc" | undefined;
71
+ first?: string | undefined;
72
+ last?: string | undefined;
73
+ }>;
74
+ };
75
+ responses: {
76
+ 200: {
77
+ content: {
78
+ 'application/json': {
79
+ schema: import("zod").ZodObject<{
80
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
81
+ id: import("zod").ZodNumber;
82
+ pluginId: import("zod").ZodString;
83
+ type: import("zod").ZodEnum<["warn", "error", "debug"]>;
84
+ content: import("zod").ZodString;
85
+ createdAt: import("zod").ZodDate;
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
+ }>>;
104
+ }, "strip", import("zod").ZodTypeAny, {
105
+ ipAddress: string;
106
+ user: {
107
+ id: number;
108
+ name: string;
109
+ nameCode: string;
110
+ } | null;
111
+ id: number;
112
+ createdAt: Date;
113
+ userAgent: string | null;
114
+ type: "warn" | "error" | "debug";
115
+ path: string;
116
+ pluginId: string;
117
+ content: string;
118
+ method: string;
119
+ statusCode: number;
120
+ }, {
121
+ ipAddress: string;
122
+ user: {
123
+ id: number;
124
+ name: string;
125
+ nameCode: string;
126
+ } | null;
127
+ id: number;
128
+ createdAt: Date;
129
+ userAgent: string | null;
130
+ type: "warn" | "error" | "debug";
131
+ path: string;
132
+ pluginId: string;
133
+ content: string;
134
+ method: string;
135
+ statusCode: number;
136
+ }>, "many">;
137
+ pageInfo: import("zod").ZodObject<{
138
+ totalCount: import("zod").ZodNumber;
139
+ count: import("zod").ZodNumber;
140
+ hasNextPage: import("zod").ZodBoolean;
141
+ hasPreviousPage: import("zod").ZodBoolean;
142
+ startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
143
+ endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
144
+ }, "strip", import("zod").ZodTypeAny, {
145
+ count: number;
146
+ totalCount: number;
147
+ hasNextPage: boolean;
148
+ hasPreviousPage: boolean;
149
+ startCursor: number | null;
150
+ endCursor: number | null;
151
+ }, {
152
+ count: number;
153
+ totalCount: number;
154
+ hasNextPage: boolean;
155
+ hasPreviousPage: boolean;
156
+ startCursor: number | null;
157
+ endCursor: number | null;
158
+ }>;
159
+ }, "strip", import("zod").ZodTypeAny, {
160
+ edges: {
161
+ ipAddress: string;
162
+ user: {
163
+ id: number;
164
+ name: string;
165
+ nameCode: string;
166
+ } | null;
167
+ id: number;
168
+ createdAt: Date;
169
+ userAgent: string | null;
170
+ type: "warn" | "error" | "debug";
171
+ path: string;
172
+ pluginId: string;
173
+ content: string;
174
+ method: string;
175
+ statusCode: number;
176
+ }[];
177
+ pageInfo: {
178
+ count: number;
179
+ totalCount: number;
180
+ hasNextPage: boolean;
181
+ hasPreviousPage: boolean;
182
+ startCursor: number | null;
183
+ endCursor: number | null;
184
+ };
185
+ }, {
186
+ edges: {
187
+ ipAddress: string;
188
+ user: {
189
+ id: number;
190
+ name: string;
191
+ nameCode: string;
192
+ } | null;
193
+ id: number;
194
+ createdAt: Date;
195
+ userAgent: string | null;
196
+ type: "warn" | "error" | "debug";
197
+ path: string;
198
+ pluginId: string;
199
+ content: string;
200
+ method: string;
201
+ statusCode: number;
202
+ }[];
203
+ pageInfo: {
204
+ count: number;
205
+ totalCount: number;
206
+ hasNextPage: boolean;
207
+ hasPreviousPage: boolean;
208
+ startCursor: number | null;
209
+ endCursor: number | null;
210
+ };
211
+ }>;
212
+ };
213
+ };
214
+ description: string;
215
+ };
216
+ };
217
+ } & {
218
+ getRoutingPath: () => "/logs";
219
+ };
220
+ }], import("../../../lib/module").BaseBuildModuleReturn<"@vitnode/core", string, import("../../../lib/route").Route<"@vitnode/core", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>;
221
+ //# sourceMappingURL=debug.admin.module.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sQAI3B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { CONFIG_PLUGIN } from "../../../../config.js";
2
+ import { buildModule } from "../../../lib/module.js";
3
+ import { logsDebugAdminRoute } from "./routes/logs.route.js";
4
+ export const debugAdminModule = buildModule({
5
+ ...CONFIG_PLUGIN,
6
+ name: 'debug',
7
+ routes: [
8
+ logsDebugAdminRoute
9
+ ]
10
+ });