@vitnode/core 1.2.0-canary.52 → 1.2.0-canary.53

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 (458) hide show
  1. package/config/next.config.ts +3 -3
  2. package/dist/scripts/get-config.d.ts +2 -2
  3. package/dist/scripts/get-config.d.ts.map +1 -1
  4. package/dist/scripts/plugin.d.ts.map +1 -1
  5. package/dist/scripts/prepare-database.d.ts.map +1 -1
  6. package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
  7. package/dist/scripts/scripts.js +4 -4
  8. package/dist/scripts/shared/file-utils.d.ts.map +1 -1
  9. package/dist/src/api/adapters/email/nodemailer.d.ts +1 -1
  10. package/dist/src/api/adapters/email/nodemailer.js +3 -3
  11. package/dist/src/api/adapters/email/resend.d.ts +1 -1
  12. package/dist/src/api/adapters/email/resend.js +2 -2
  13. package/dist/src/api/adapters/sso/discord.d.ts +1 -1
  14. package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
  15. package/dist/src/api/adapters/sso/discord.js +21 -21
  16. package/dist/src/api/adapters/sso/facebook.d.ts +1 -1
  17. package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
  18. package/dist/src/api/adapters/sso/facebook.js +23 -23
  19. package/dist/src/api/adapters/sso/google.d.ts +1 -1
  20. package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
  21. package/dist/src/api/adapters/sso/google.js +21 -21
  22. package/dist/src/api/config.d.ts +3 -3
  23. package/dist/src/api/config.d.ts.map +1 -1
  24. package/dist/src/api/config.js +11 -11
  25. package/dist/src/api/lib/check-plugin-id.js +8 -8
  26. package/dist/src/api/lib/logger-middleware.d.ts +1 -1
  27. package/dist/src/api/lib/logger-middleware.js +9 -9
  28. package/dist/src/api/lib/module.d.ts +2 -2
  29. package/dist/src/api/lib/plugin.d.ts +2 -2
  30. package/dist/src/api/lib/plugin.d.ts.map +1 -1
  31. package/dist/src/api/lib/route.d.ts +2 -2
  32. package/dist/src/api/lib/route.d.ts.map +1 -1
  33. package/dist/src/api/lib/route.js +1 -1
  34. package/dist/src/api/lib/with-pagination.d.ts +7 -7
  35. package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
  36. package/dist/src/api/lib/with-pagination.js +37 -24
  37. package/dist/src/api/middlewares/captcha.middleware.d.ts +1 -1
  38. package/dist/src/api/middlewares/captcha.middleware.d.ts.map +1 -1
  39. package/dist/src/api/middlewares/captcha.middleware.js +14 -13
  40. package/dist/src/api/middlewares/global.middleware.d.ts +12 -12
  41. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
  42. package/dist/src/api/middlewares/global.middleware.js +29 -28
  43. package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +3 -3
  44. package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
  45. package/dist/src/api/middlewares/rate-limiter.middleware.js +4 -4
  46. package/dist/src/api/models/device.d.ts +1 -1
  47. package/dist/src/api/models/device.d.ts.map +1 -1
  48. package/dist/src/api/models/device.js +13 -13
  49. package/dist/src/api/models/email.d.ts +15 -15
  50. package/dist/src/api/models/email.d.ts.map +1 -1
  51. package/dist/src/api/models/email.js +11 -10
  52. package/dist/src/api/models/password.js +9 -9
  53. package/dist/src/api/models/session-admin.d.ts +1 -1
  54. package/dist/src/api/models/session-admin.d.ts.map +1 -1
  55. package/dist/src/api/models/session-admin.js +19 -19
  56. package/dist/src/api/models/session.d.ts +1 -1
  57. package/dist/src/api/models/session.d.ts.map +1 -1
  58. package/dist/src/api/models/session.js +17 -17
  59. package/dist/src/api/models/sso.d.ts +1 -1
  60. package/dist/src/api/models/sso.d.ts.map +1 -1
  61. package/dist/src/api/models/sso.js +22 -25
  62. package/dist/src/api/models/user/get-user-by-id.d.ts +1 -1
  63. package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
  64. package/dist/src/api/models/user/get-user-by-id.js +1 -1
  65. package/dist/src/api/models/user/sign-in-with-passwords.d.ts +1 -1
  66. package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
  67. package/dist/src/api/models/user/sign-in-with-passwords.js +1 -1
  68. package/dist/src/api/models/user/sign-up.d.ts +1 -1
  69. package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
  70. package/dist/src/api/models/user/sign-up.js +11 -12
  71. package/dist/src/api/models/user.d.ts.map +1 -1
  72. package/dist/src/api/modules/admin/admin.module.d.ts +3 -3
  73. package/dist/src/api/modules/admin/admin.module.js +1 -1
  74. package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +1 -1
  75. package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
  76. package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
  77. package/dist/src/api/modules/admin/debug/routes/logs.route.js +16 -16
  78. package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -2
  79. package/dist/src/api/modules/admin/routes/session.route.js +7 -7
  80. package/dist/src/api/modules/admin/users/routes/list.route.d.ts +2 -2
  81. package/dist/src/api/modules/admin/users/routes/list.route.js +12 -12
  82. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +2 -2
  83. package/dist/src/api/modules/admin/users/routes/users.route.js +15 -15
  84. package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
  85. package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
  86. package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
  87. package/dist/src/api/modules/middleware/middleware.module.js +1 -1
  88. package/dist/src/api/modules/middleware/route.d.ts +2 -2
  89. package/dist/src/api/modules/middleware/route.js +12 -12
  90. package/dist/src/api/modules/users/routes/change-password.route.d.ts +2 -2
  91. package/dist/src/api/modules/users/routes/change-password.route.js +13 -13
  92. package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +2 -2
  93. package/dist/src/api/modules/users/routes/reset-passowrd.route.js +17 -17
  94. package/dist/src/api/modules/users/routes/session.route.d.ts +2 -2
  95. package/dist/src/api/modules/users/routes/session.route.js +6 -6
  96. package/dist/src/api/modules/users/routes/sign-in.route.d.ts +3 -3
  97. package/dist/src/api/modules/users/routes/sign-in.route.js +10 -10
  98. package/dist/src/api/modules/users/routes/sign-out.route.d.ts +2 -2
  99. package/dist/src/api/modules/users/routes/sign-out.route.js +7 -7
  100. package/dist/src/api/modules/users/routes/sign-up.route.d.ts +3 -3
  101. package/dist/src/api/modules/users/routes/sign-up.route.js +14 -14
  102. package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
  103. package/dist/src/api/modules/users/routes/test.route.js +9 -9
  104. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +2 -2
  105. package/dist/src/api/modules/users/sso/routes/callback.route.js +8 -8
  106. package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -2
  107. package/dist/src/api/modules/users/sso/routes/create-url.route.js +6 -6
  108. package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
  109. package/dist/src/api/modules/users/sso/sso.module.js +1 -1
  110. package/dist/src/api/modules/users/users.module.d.ts +12 -12
  111. package/dist/src/api/modules/users/users.module.js +1 -1
  112. package/dist/src/app/login/page.d.ts +1 -1
  113. package/dist/src/app/login/page.js +2 -2
  114. package/dist/src/app/login/reset-password/page.d.ts +2 -2
  115. package/dist/src/app/login/reset-password/page.js +2 -2
  116. package/dist/src/app/register/page.d.ts +1 -1
  117. package/dist/src/app/register/page.js +2 -2
  118. package/dist/src/app_admin/core/debug/page.d.ts +1 -1
  119. package/dist/src/app_admin/core/debug/page.js +8 -8
  120. package/dist/src/app_admin/core/users/page.d.ts +2 -2
  121. package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
  122. package/dist/src/app_admin/core/users/page.js +7 -7
  123. package/dist/src/components/avatar.d.ts +1 -1
  124. package/dist/src/components/avatar.js +1 -1
  125. package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +2 -2
  126. package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +5 -5
  127. package/dist/src/components/confirm-action/content.d.ts.map +1 -1
  128. package/dist/src/components/confirm-action/content.js +3 -4
  129. package/dist/src/components/date-format.js +8 -8
  130. package/dist/src/components/form/auto-form.d.ts +16 -16
  131. package/dist/src/components/form/auto-form.d.ts.map +1 -1
  132. package/dist/src/components/form/auto-form.js +13 -12
  133. package/dist/src/components/form/common/desc.js +1 -1
  134. package/dist/src/components/form/common/label.d.ts +1 -1
  135. package/dist/src/components/form/common/label.js +1 -1
  136. package/dist/src/components/form/fields/checkbox.d.ts +2 -2
  137. package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
  138. package/dist/src/components/form/fields/combobox-async.d.ts +3 -3
  139. package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
  140. package/dist/src/components/form/fields/combobox-async.js +29 -23
  141. package/dist/src/components/form/fields/combobox.d.ts +3 -3
  142. package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
  143. package/dist/src/components/form/fields/combobox.js +6 -7
  144. package/dist/src/components/form/fields/input.d.ts +2 -2
  145. package/dist/src/components/form/fields/input.d.ts.map +1 -1
  146. package/dist/src/components/form/fields/input.js +2 -2
  147. package/dist/src/components/form/fields/radio-group.d.ts +3 -3
  148. package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
  149. package/dist/src/components/form/fields/radio-group.js +0 -1
  150. package/dist/src/components/form/fields/select.d.ts +3 -3
  151. package/dist/src/components/form/fields/select.d.ts.map +1 -1
  152. package/dist/src/components/form/fields/select.js +2 -3
  153. package/dist/src/components/form/fields/switch.d.ts +2 -2
  154. package/dist/src/components/form/fields/switch.d.ts.map +1 -1
  155. package/dist/src/components/form/fields/textarea.d.ts +3 -3
  156. package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
  157. package/dist/src/components/form/fields/textarea.js +1 -2
  158. package/dist/src/components/i18n-provider.d.ts +2 -2
  159. package/dist/src/components/i18n-provider.js +3 -3
  160. package/dist/src/components/logo-vitnode.d.ts.map +1 -1
  161. package/dist/src/components/logo-vitnode.js +8 -2
  162. package/dist/src/components/switchers/langs/language-swietcher.d.ts +1 -1
  163. package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -1
  164. package/dist/src/components/switchers/langs/language-swietcher.js +3 -3
  165. package/dist/src/components/switchers/themes/theme-switcher.js +4 -4
  166. package/dist/src/components/table/content.d.ts +1 -1
  167. package/dist/src/components/table/content.d.ts.map +1 -1
  168. package/dist/src/components/table/content.js +5 -5
  169. package/dist/src/components/table/data-table.d.ts +7 -7
  170. package/dist/src/components/table/data-table.d.ts.map +1 -1
  171. package/dist/src/components/table/data-table.js +22 -15
  172. package/dist/src/components/table/order-table-head.d.ts +4 -4
  173. package/dist/src/components/table/order-table-head.d.ts.map +1 -1
  174. package/dist/src/components/table/order-table-head.js +20 -9
  175. package/dist/src/components/table/pagination.js +19 -19
  176. package/dist/src/components/ui/accordion.d.ts +2 -2
  177. package/dist/src/components/ui/accordion.d.ts.map +1 -1
  178. package/dist/src/components/ui/accordion.js +4 -5
  179. package/dist/src/components/ui/alert-dialog.d.ts +7 -7
  180. package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
  181. package/dist/src/components/ui/alert-dialog.js +12 -12
  182. package/dist/src/components/ui/alert.d.ts +5 -5
  183. package/dist/src/components/ui/alert.d.ts.map +1 -1
  184. package/dist/src/components/ui/alert.js +6 -7
  185. package/dist/src/components/ui/badge.d.ts +3 -3
  186. package/dist/src/components/ui/badge.d.ts.map +1 -1
  187. package/dist/src/components/ui/badge.js +7 -8
  188. package/dist/src/components/ui/button-client.d.ts +1 -1
  189. package/dist/src/components/ui/button-client.js +9 -9
  190. package/dist/src/components/ui/button.d.ts +8 -8
  191. package/dist/src/components/ui/button.d.ts.map +1 -1
  192. package/dist/src/components/ui/button.js +13 -14
  193. package/dist/src/components/ui/card.d.ts +8 -8
  194. package/dist/src/components/ui/card.js +7 -7
  195. package/dist/src/components/ui/checkbox.d.ts +2 -2
  196. package/dist/src/components/ui/checkbox.d.ts.map +1 -1
  197. package/dist/src/components/ui/checkbox.js +2 -3
  198. package/dist/src/components/ui/collapsible.d.ts +1 -1
  199. package/dist/src/components/ui/collapsible.js +1 -1
  200. package/dist/src/components/ui/command.d.ts +4 -4
  201. package/dist/src/components/ui/command.d.ts.map +1 -1
  202. package/dist/src/components/ui/command.js +9 -10
  203. package/dist/src/components/ui/context-menu.d.ts +4 -4
  204. package/dist/src/components/ui/context-menu.d.ts.map +1 -1
  205. package/dist/src/components/ui/context-menu.js +7 -8
  206. package/dist/src/components/ui/dialog.d.ts +6 -6
  207. package/dist/src/components/ui/dialog.d.ts.map +1 -1
  208. package/dist/src/components/ui/dialog.js +16 -16
  209. package/dist/src/components/ui/drawer.d.ts +4 -4
  210. package/dist/src/components/ui/drawer.d.ts.map +1 -1
  211. package/dist/src/components/ui/drawer.js +7 -8
  212. package/dist/src/components/ui/dropdown-menu.d.ts +4 -4
  213. package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
  214. package/dist/src/components/ui/dropdown-menu.js +8 -9
  215. package/dist/src/components/ui/form.d.ts +10 -10
  216. package/dist/src/components/ui/form.d.ts.map +1 -1
  217. package/dist/src/components/ui/form.js +15 -15
  218. package/dist/src/components/ui/header-content.js +1 -1
  219. package/dist/src/components/ui/hover-card.d.ts +2 -2
  220. package/dist/src/components/ui/hover-card.d.ts.map +1 -1
  221. package/dist/src/components/ui/hover-card.js +3 -4
  222. package/dist/src/components/ui/input-otp.d.ts +5 -5
  223. package/dist/src/components/ui/input-otp.d.ts.map +1 -1
  224. package/dist/src/components/ui/input-otp.js +6 -7
  225. package/dist/src/components/ui/input.d.ts +2 -2
  226. package/dist/src/components/ui/input.d.ts.map +1 -1
  227. package/dist/src/components/ui/input.js +1 -2
  228. package/dist/src/components/ui/label.d.ts +2 -2
  229. package/dist/src/components/ui/label.d.ts.map +1 -1
  230. package/dist/src/components/ui/label.js +2 -3
  231. package/dist/src/components/ui/loader.js +3 -3
  232. package/dist/src/components/ui/menubar.d.ts +4 -4
  233. package/dist/src/components/ui/menubar.d.ts.map +1 -1
  234. package/dist/src/components/ui/menubar.js +11 -12
  235. package/dist/src/components/ui/navigation-menu.d.ts +2 -2
  236. package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
  237. package/dist/src/components/ui/navigation-menu.js +10 -11
  238. package/dist/src/components/ui/popover.d.ts +2 -2
  239. package/dist/src/components/ui/popover.d.ts.map +1 -1
  240. package/dist/src/components/ui/popover.js +3 -4
  241. package/dist/src/components/ui/progress.d.ts +2 -2
  242. package/dist/src/components/ui/progress.d.ts.map +1 -1
  243. package/dist/src/components/ui/progress.js +2 -3
  244. package/dist/src/components/ui/radio-group.d.ts +2 -2
  245. package/dist/src/components/ui/radio-group.d.ts.map +1 -1
  246. package/dist/src/components/ui/radio-group.js +3 -4
  247. package/dist/src/components/ui/select.d.ts +3 -3
  248. package/dist/src/components/ui/select.d.ts.map +1 -1
  249. package/dist/src/components/ui/select.js +9 -10
  250. package/dist/src/components/ui/separator.d.ts +2 -2
  251. package/dist/src/components/ui/separator.d.ts.map +1 -1
  252. package/dist/src/components/ui/separator.js +3 -4
  253. package/dist/src/components/ui/sheet.d.ts +5 -5
  254. package/dist/src/components/ui/sheet.d.ts.map +1 -1
  255. package/dist/src/components/ui/sheet.js +8 -9
  256. package/dist/src/components/ui/sidebar.d.ts +31 -31
  257. package/dist/src/components/ui/sidebar.d.ts.map +1 -1
  258. package/dist/src/components/ui/sidebar.js +67 -69
  259. package/dist/src/components/ui/skeleton.d.ts +1 -1
  260. package/dist/src/components/ui/skeleton.js +1 -1
  261. package/dist/src/components/ui/slider.d.ts +2 -2
  262. package/dist/src/components/ui/slider.d.ts.map +1 -1
  263. package/dist/src/components/ui/slider.js +16 -8
  264. package/dist/src/components/ui/sonner.d.ts +1 -1
  265. package/dist/src/components/ui/sonner.d.ts.map +1 -1
  266. package/dist/src/components/ui/sonner.js +6 -6
  267. package/dist/src/components/ui/switch.d.ts +2 -2
  268. package/dist/src/components/ui/switch.d.ts.map +1 -1
  269. package/dist/src/components/ui/switch.js +3 -4
  270. package/dist/src/components/ui/table.d.ts +9 -9
  271. package/dist/src/components/ui/table.d.ts.map +1 -1
  272. package/dist/src/components/ui/table.js +8 -9
  273. package/dist/src/components/ui/tabs.d.ts +2 -2
  274. package/dist/src/components/ui/tabs.d.ts.map +1 -1
  275. package/dist/src/components/ui/tabs.js +4 -5
  276. package/dist/src/components/ui/textarea.d.ts +2 -2
  277. package/dist/src/components/ui/textarea.d.ts.map +1 -1
  278. package/dist/src/components/ui/textarea.js +1 -2
  279. package/dist/src/components/ui/toggle-group.d.ts +4 -4
  280. package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
  281. package/dist/src/components/ui/toggle-group.js +6 -6
  282. package/dist/src/components/ui/toggle.d.ts +3 -3
  283. package/dist/src/components/ui/toggle.d.ts.map +1 -1
  284. package/dist/src/components/ui/toggle.js +8 -9
  285. package/dist/src/components/ui/tooltip.d.ts +2 -2
  286. package/dist/src/components/ui/tooltip.d.ts.map +1 -1
  287. package/dist/src/components/ui/tooltip.js +2 -3
  288. package/dist/src/config.js +2 -2
  289. package/dist/src/database/admins.js +10 -10
  290. package/dist/src/database/languages.js +7 -7
  291. package/dist/src/database/logs.js +9 -9
  292. package/dist/src/database/moderators.js +5 -5
  293. package/dist/src/database/roles.js +1 -1
  294. package/dist/src/database/sessions.js +6 -6
  295. package/dist/src/database/users.js +13 -13
  296. package/dist/src/drizzle.config.d.ts +2 -2
  297. package/dist/src/drizzle.config.d.ts.map +1 -1
  298. package/dist/src/drizzle.config.js +19 -12
  299. package/dist/src/emails/default-template.d.ts +3 -3
  300. package/dist/src/emails/default-template.d.ts.map +1 -1
  301. package/dist/src/emails/default-template.js +39 -38
  302. package/dist/src/emails/reset-password.d.ts +1 -1
  303. package/dist/src/emails/reset-password.d.ts.map +1 -1
  304. package/dist/src/emails/reset-password.js +51 -51
  305. package/dist/src/emails/ui/button.d.ts +2 -2
  306. package/dist/src/emails/ui/button.js +13 -13
  307. package/dist/src/emails/ui/card.d.ts +1 -1
  308. package/dist/src/emails/ui/card.js +6 -6
  309. package/dist/src/hooks/use-before-unload.js +3 -3
  310. package/dist/src/hooks/use-captcha.d.ts +2 -2
  311. package/dist/src/hooks/use-captcha.d.ts.map +1 -1
  312. package/dist/src/hooks/use-captcha.js +29 -37
  313. package/dist/src/hooks/use-mobile.d.ts.map +1 -1
  314. package/dist/src/hooks/use-mobile.js +3 -4
  315. package/dist/src/lib/api/get-middleware-api.js +4 -4
  316. package/dist/src/lib/api/get-session-admin-api.js +5 -5
  317. package/dist/src/lib/api/get-session-api.js +4 -4
  318. package/dist/src/lib/colors.js +28 -19
  319. package/dist/src/lib/colors.test.js +60 -60
  320. package/dist/src/lib/config.js +3 -3
  321. package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
  322. package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -1
  323. package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +27 -27
  324. package/dist/src/lib/fetcher/core.d.ts +5 -5
  325. package/dist/src/lib/fetcher/core.d.ts.map +1 -1
  326. package/dist/src/lib/fetcher/core.js +11 -10
  327. package/dist/src/lib/fetcher/helpers-server.d.ts +1 -1
  328. package/dist/src/lib/fetcher/helpers-server.js +1 -1
  329. package/dist/src/lib/fetcher/helpers.test.js +17 -17
  330. package/dist/src/lib/fetcher/types.d.ts +26 -26
  331. package/dist/src/lib/fetcher/types.d.ts.map +1 -1
  332. package/dist/src/lib/fetcher-client.d.ts +4 -4
  333. package/dist/src/lib/fetcher-client.d.ts.map +1 -1
  334. package/dist/src/lib/fetcher-client.js +3 -3
  335. package/dist/src/lib/fetcher.d.ts +5 -5
  336. package/dist/src/lib/fetcher.d.ts.map +1 -1
  337. package/dist/src/lib/fetcher.js +4 -4
  338. package/dist/src/lib/helpers/auto-form.d.ts +3 -3
  339. package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
  340. package/dist/src/lib/helpers/auto-form.js +16 -15
  341. package/dist/src/lib/helpers/auto-form.test.js +129 -129
  342. package/dist/src/lib/navigation.d.ts +2 -2
  343. package/dist/src/lib/navigation.d.ts.map +1 -1
  344. package/dist/src/lib/plugin.d.ts +3 -3
  345. package/dist/src/lib/special-characters.js +1 -1
  346. package/dist/src/lib/special-characters.test.js +36 -36
  347. package/dist/src/lib/utils.d.ts +1 -1
  348. package/dist/src/tests/setup.d.ts +1 -1
  349. package/dist/src/views/admin/layouts/admin-layout.d.ts +1 -1
  350. package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
  351. package/dist/src/views/admin/layouts/admin-layout.js +4 -8
  352. package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
  353. package/dist/src/views/admin/layouts/sidebar/nav/item.js +11 -12
  354. package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +1 -1
  355. package/dist/src/views/admin/layouts/sidebar/nav/nav.js +11 -11
  356. package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +1 -1
  357. package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -1
  358. package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -2
  359. package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -1
  360. package/dist/src/views/admin/layouts/user-bar/client.js +5 -5
  361. package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +1 -1
  362. package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
  363. package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
  364. package/dist/src/views/admin/sign-in/sign-in-admin-view.js +1 -1
  365. package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +3 -3
  366. package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +10 -10
  367. package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +2 -2
  368. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +1 -1
  369. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
  370. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +15 -15
  371. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +1 -1
  372. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +7 -7
  373. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -1
  374. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +7 -1
  375. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +1 -1
  376. package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +3 -3
  377. package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +25 -25
  378. package/dist/src/views/admin/views/core/test.js +43 -43
  379. package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -1
  380. package/dist/src/views/admin/views/core/users/users-admin-view.js +13 -14
  381. package/dist/src/views/auth/password-reset/change-password-form/form.js +9 -9
  382. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +2 -2
  383. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +5 -5
  384. package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +2 -2
  385. package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
  386. package/dist/src/views/auth/password-reset/change-password-form/use-form.js +7 -7
  387. package/dist/src/views/auth/password-reset/form/form.d.ts +2 -2
  388. package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
  389. package/dist/src/views/auth/password-reset/form/form.js +15 -15
  390. package/dist/src/views/auth/password-reset/form/mutation-api.js +5 -5
  391. package/dist/src/views/auth/password-reset/form/use-form.d.ts +2 -2
  392. package/dist/src/views/auth/password-reset/form/use-form.js +7 -7
  393. package/dist/src/views/auth/password-reset/password-reset-view.js +4 -4
  394. package/dist/src/views/auth/sign-in/form/form.js +9 -9
  395. package/dist/src/views/auth/sign-in/form/mutation-api.d.ts +2 -2
  396. package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
  397. package/dist/src/views/auth/sign-in/form/mutation-api.js +10 -10
  398. package/dist/src/views/auth/sign-in/form/use-form.d.ts +2 -2
  399. package/dist/src/views/auth/sign-in/form/use-form.js +11 -11
  400. package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
  401. package/dist/src/views/auth/sign-up/components/password-input.d.ts +3 -3
  402. package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
  403. package/dist/src/views/auth/sign-up/components/password-input.js +9 -10
  404. package/dist/src/views/auth/sign-up/email-confirmation-view.js +4 -4
  405. package/dist/src/views/auth/sign-up/form/form.d.ts +2 -2
  406. package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
  407. package/dist/src/views/auth/sign-up/form/form.js +18 -18
  408. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +2 -2
  409. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
  410. package/dist/src/views/auth/sign-up/form/mutation-api.js +6 -6
  411. package/dist/src/views/auth/sign-up/form/use-form.d.ts +2 -2
  412. package/dist/src/views/auth/sign-up/form/use-form.js +21 -21
  413. package/dist/src/views/auth/sign-up/sign-up-view.js +5 -5
  414. package/dist/src/views/auth/sign-up/wrapper.d.ts +1 -1
  415. package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
  416. package/dist/src/views/auth/sign-up/wrapper.js +5 -8
  417. package/dist/src/views/auth/sso/buttons/client.js +4 -4
  418. package/dist/src/views/auth/sso/buttons/mutation-api.js +5 -5
  419. package/dist/src/views/auth/sso/buttons/sso-buttons.js +2 -2
  420. package/dist/src/views/auth/sso/callback/callback-sso-view.js +6 -6
  421. package/dist/src/views/auth/sso/callback/client/client.d.ts +1 -1
  422. package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
  423. package/dist/src/views/auth/sso/callback/client/client.js +9 -9
  424. package/dist/src/views/auth/sso/callback/client/mutation-api.js +7 -7
  425. package/dist/src/views/error/back-button.js +1 -1
  426. package/dist/src/views/error/error-view.js +4 -4
  427. package/dist/src/views/error/global-error-view.d.ts +3 -3
  428. package/dist/src/views/error/global-error-view.d.ts.map +1 -1
  429. package/dist/src/views/error/global-error-view.js +36 -44
  430. package/dist/src/views/layouts/provider.d.ts +4 -4
  431. package/dist/src/views/layouts/provider.d.ts.map +1 -1
  432. package/dist/src/views/layouts/provider.js +3 -3
  433. package/dist/src/views/layouts/root-layout.d.ts +3 -3
  434. package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
  435. package/dist/src/views/layouts/root-layout.js +1 -2
  436. package/dist/src/views/layouts/theme/header/header.d.ts +2 -2
  437. package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
  438. package/dist/src/views/layouts/theme/header/header.js +1 -1
  439. package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +1 -1
  440. package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
  441. package/dist/src/views/layouts/theme/header/user/auth/client.js +4 -4
  442. package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +8 -8
  443. package/dist/src/views/layouts/theme/header/user/user.js +4 -4
  444. package/dist/src/views/layouts/theme/layout.d.ts +2 -2
  445. package/dist/src/views/layouts/theme/layout.js +1 -1
  446. package/dist/src/vitnode.config.d.ts +16 -16
  447. package/dist/src/vitnode.config.d.ts.map +1 -1
  448. package/dist/src/vitnode.config.js +3 -2
  449. package/dist/tsconfig.tsbuildinfo +1 -1
  450. package/package.json +2 -5
  451. package/src/app/login/page.tsx +5 -5
  452. package/src/app/login/reset-password/page.tsx +5 -5
  453. package/src/app/login/sso/[providerId]/page.tsx +1 -1
  454. package/src/app/register/page.tsx +5 -5
  455. package/src/app_admin/core/debug/page.tsx +14 -14
  456. package/src/app_admin/core/page.tsx +1 -1
  457. package/src/app_admin/core/test/page.tsx +1 -1
  458. package/src/app_admin/core/users/page.tsx +12 -13
@@ -1,4 +1,4 @@
1
- import crypto from "crypto";
1
+ import crypto from "node:crypto";
2
2
  import { and, eq } from "drizzle-orm";
3
3
  import { deleteCookie, getCookie, setCookie } from "hono/cookie";
4
4
  import { HTTPException } from "hono/http-exception";
@@ -10,7 +10,7 @@ export const getRedirectUri = (code)=>new URL(`${CONFIG.web.href}login/sso/${cod
10
10
  export class SSOModel {
11
11
  constructor(c){
12
12
  this.c = c;
13
- this.plugins = c.get('core').authorization.ssoAdapters;
13
+ this.plugins = c.get("core").authorization.ssoAdapters;
14
14
  }
15
15
  c;
16
16
  plugins;
@@ -21,7 +21,7 @@ export class SSOModel {
21
21
  newsletter: false,
22
22
  hashedPassword: undefined
23
23
  }, c);
24
- await c.get('db').insert(core_users_sso).values({
24
+ await c.get("db").insert(core_users_sso).values({
25
25
  userId: data.id,
26
26
  providerId: providerId,
27
27
  providerAccountId: user.id
@@ -38,7 +38,7 @@ export class SSOModel {
38
38
  }
39
39
  const ssoToken = await provider.fetchToken(code);
40
40
  const userFromSSO = await provider.fetchUser(ssoToken);
41
- return await this.c.get('db').transaction(async (tx)=>{
41
+ return await this.c.get("db").transaction(async (tx)=>{
42
42
  const [dataSSOFromDb] = await tx.select({
43
43
  userId: core_users_sso.userId
44
44
  }).from(core_users_sso).leftJoin(core_users, eq(core_users.id, core_users_sso.userId)).where(and(eq(core_users_sso.providerId, providerId), eq(core_users_sso.providerAccountId, userFromSSO.id))).limit(1);
@@ -57,16 +57,13 @@ export class SSOModel {
57
57
  }
58
58
  // If email exists, throw an error
59
59
  throw new HTTPException(409, {
60
- message: 'Email already exists'
60
+ message: "Email already exists"
61
61
  });
62
- // await tx.insert(core_users_sso).values({
63
- // providerId: providerId,
64
- // providerAccountId: userFromSSO.id,
65
- // userId: userWithEmail.id,
66
- // });
67
- return {
68
- userId: userWithEmail.id
69
- };
62
+ // await tx.insert(core_users_sso).values({
63
+ // providerId: providerId,
64
+ // providerAccountId: userFromSSO.id,
65
+ // userId: userWithEmail.id,
66
+ // });
70
67
  }
71
68
  return {
72
69
  userId: dataSSOFromDb.userId
@@ -74,18 +71,18 @@ export class SSOModel {
74
71
  });
75
72
  }
76
73
  async encryptState() {
77
- const state = crypto.randomBytes(8).toString('hex');
74
+ const state = crypto.randomBytes(8).toString("hex");
78
75
  const encryptedState = await new Promise((resolve, reject)=>{
79
- const salt = crypto.randomBytes(4).toString('hex');
76
+ const salt = crypto.randomBytes(4).toString("hex");
80
77
  crypto.scrypt(state, salt, 16, (err, derivedKey)=>{
81
78
  if (err) reject(err);
82
- resolve(salt + ':' + derivedKey.toString('hex'));
79
+ resolve(`${salt}:${derivedKey.toString("hex")}`);
83
80
  });
84
81
  });
85
- setCookie(this.c, `${this.c.get('core').authorization.cookieName}--state-sso`, encryptedState, {
82
+ setCookie(this.c, `${this.c.get("core").authorization.cookieName}--state-sso`, encryptedState, {
86
83
  httpOnly: true,
87
- secure: this.c.get('core').authorization.cookieSecure,
88
- path: '/',
84
+ secure: this.c.get("core").authorization.cookieSecure,
85
+ path: "/",
89
86
  domain: CONFIG.web.hostname
90
87
  });
91
88
  return state;
@@ -100,24 +97,24 @@ export class SSOModel {
100
97
  });
101
98
  }
102
99
  async verifyState(state) {
103
- const storedState = getCookie(this.c, `${this.c.get('core').authorization.cookieName}--state-sso`);
100
+ const storedState = getCookie(this.c, `${this.c.get("core").authorization.cookieName}--state-sso`);
104
101
  if (!storedState) {
105
102
  throw new HTTPException(400, {
106
- message: 'Invalid state'
103
+ message: "Invalid state"
107
104
  });
108
105
  }
109
106
  const isValid = await new Promise((resolve, reject)=>{
110
- const [salt, storedHash] = storedState.split(':');
107
+ const [salt, storedHash] = storedState.split(":");
111
108
  crypto.scrypt(state, salt, 16, (err, derivedKey)=>{
112
109
  if (err) reject(err);
113
- resolve(storedHash === derivedKey.toString('hex'));
110
+ resolve(storedHash === derivedKey.toString("hex"));
114
111
  });
115
112
  });
116
113
  if (!isValid) {
117
114
  throw new HTTPException(400, {
118
- message: 'Invalid state'
115
+ message: "Invalid state"
119
116
  });
120
117
  }
121
- deleteCookie(this.c, `${this.c.get('core').authorization.cookieName}--state-sso`);
118
+ deleteCookie(this.c, `${this.c.get("core").authorization.cookieName}--state-sso`);
122
119
  }
123
120
  }
@@ -1,4 +1,4 @@
1
- import type { Context } from 'hono';
1
+ import type { Context } from "hono";
2
2
  export declare const getUserById: ({ id, c }: {
3
3
  c: Context;
4
4
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"get-user-by-id.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/get-user-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAMpC,eAAO,MAAM,WAAW,GAAU,WAAW;IAAE,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;SAsBtE,CAAC"}
1
+ {"version":3,"file":"get-user-by-id.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/get-user-by-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,eAAO,MAAM,WAAW,GAAU,WAAW;IAAE,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;SAsBtE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { eq } from "drizzle-orm";
2
2
  import { core_users } from "../../../database/users.js";
3
3
  export const getUserById = async ({ id, c })=>{
4
- const [user] = await c.get('db').select({
4
+ const [user] = await c.get("db").select({
5
5
  id: core_users.id,
6
6
  email: core_users.email,
7
7
  name: core_users.name,
@@ -1,4 +1,4 @@
1
- import type { Context } from 'hono';
1
+ import type { Context } from "hono";
2
2
  export declare const signInWithPassword: ({ email, password, c, }: {
3
3
  c: Context;
4
4
  email: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sign-in-with-passwords.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-in-with-passwords.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AASpC,eAAO,MAAM,kBAAkB,GAAU,yBAItC;IACD,CAAC,EAAE,OAAO,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;;;EA0BA,CAAC"}
1
+ {"version":3,"file":"sign-in-with-passwords.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-in-with-passwords.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAOpC,eAAO,MAAM,kBAAkB,GAAU,yBAItC;IACD,CAAC,EAAE,OAAO,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;;;EA0BA,CAAC"}
@@ -3,7 +3,7 @@ import { HTTPException } from "hono/http-exception";
3
3
  import { core_users } from "../../../database/users.js";
4
4
  import { PasswordModel } from "../password.js";
5
5
  export const signInWithPassword = async ({ email, password, c })=>{
6
- const [user] = await c.get('db').select({
6
+ const [user] = await c.get("db").select({
7
7
  id: core_users.id,
8
8
  email: core_users.email,
9
9
  password: core_users.password
@@ -1,4 +1,4 @@
1
- import type { Context } from 'hono';
1
+ import type { Context } from "hono";
2
2
  export declare const signUp: ({ email, name, newsletter, hashedPassword, }: {
3
3
  email: string;
4
4
  hashedPassword: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAiEpC,eAAO,MAAM,MAAM,GACjB,8CAKG;IACD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,EACD,GAAG,OAAO;;;;;;;;;;;;;EAwDX,CAAC"}
1
+ {"version":3,"file":"sign-up.d.ts","sourceRoot":"","sources":["../../../../../src/api/models/user/sign-up.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AA+DpC,eAAO,MAAM,MAAM,GACjB,8CAKG;IACD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,EACD,GAAG,OAAO;;;;;;;;;;;;;EAuDX,CAAC"}
@@ -5,17 +5,17 @@ import { core_roles } from "../../../database/roles.js";
5
5
  import { core_users } from "../../../database/users.js";
6
6
  import { removeSpecialCharacters } from "../../../lib/special-characters.js";
7
7
  const getDefaultData = async (c)=>{
8
- const [countUsers] = await c.get('db').select({
8
+ const [countUsers] = await c.get("db").select({
9
9
  count: count()
10
10
  }).from(core_users);
11
11
  // If no users, return root group
12
12
  if (countUsers.count === 0) {
13
- const [defaultRole] = await c.get('db').select({
13
+ const [defaultRole] = await c.get("db").select({
14
14
  id: core_roles.id
15
15
  }).from(core_roles).where(and(eq(core_roles.default, false), eq(core_roles.root, true))).limit(1);
16
16
  if (!defaultRole) {
17
17
  throw new HTTPException(400, {
18
- message: 'Default group not found.'
18
+ message: "Default group not found."
19
19
  });
20
20
  }
21
21
  return {
@@ -23,39 +23,39 @@ const getDefaultData = async (c)=>{
23
23
  emailVerified: true
24
24
  };
25
25
  }
26
- const [defaultRole] = await c.get('db').select({
26
+ const [defaultRole] = await c.get("db").select({
27
27
  id: core_roles.id
28
28
  }).from(core_roles).where(and(eq(core_roles.default, true), eq(core_roles.root, false))).limit(1);
29
29
  if (!defaultRole) {
30
30
  throw new HTTPException(400, {
31
- message: 'Default role not found.'
31
+ message: "Default role not found."
32
32
  });
33
33
  }
34
34
  return {
35
35
  roleId: defaultRole.id,
36
- emailVerified: !c.get('core').email?.adapter
36
+ emailVerified: !c.get("core").email?.adapter
37
37
  };
38
38
  };
39
39
  export const signUp = async ({ email, name, newsletter, hashedPassword }, c)=>{
40
40
  const convertToNameSEO = removeSpecialCharacters(name);
41
- const checkIfUserExist = await c.get('db').select({
41
+ const checkIfUserExist = await c.get("db").select({
42
42
  email: core_users.email,
43
43
  name_code: core_users.nameCode
44
44
  }).from(core_users).where(or(eq(core_users.email, email), eq(core_users.nameCode, convertToNameSEO)));
45
45
  const findEmail = checkIfUserExist.find((user)=>user.email === email);
46
46
  if (findEmail) {
47
47
  throw new HTTPException(409, {
48
- message: 'Email already exists'
48
+ message: "Email already exists"
49
49
  });
50
50
  }
51
51
  const findName = checkIfUserExist.find((user)=>user.name_code === convertToNameSEO);
52
52
  if (findName) {
53
53
  throw new HTTPException(409, {
54
- message: 'Name already exists'
54
+ message: "Name already exists"
55
55
  });
56
56
  }
57
57
  const { roleId, emailVerified } = await getDefaultData(c);
58
- const [data] = await c.get('db').insert(core_users).values({
58
+ const [data] = await c.get("db").insert(core_users).values({
59
59
  email,
60
60
  name,
61
61
  nameCode: convertToNameSEO,
@@ -65,9 +65,8 @@ export const signUp = async ({ email, name, newsletter, hashedPassword }, c)=>{
65
65
  avatarColor: generateAvatarColor(name),
66
66
  roleId,
67
67
  emailVerified,
68
- ipAddress: c.get('ipAddress')
68
+ ipAddress: c.get("ipAddress")
69
69
  }).returning();
70
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
71
70
  const { password: _, ...user } = data;
72
71
  return user;
73
72
  };
@@ -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;;;;kBAEs3C,CAAC;;;;;;;;;;;;;;OAF72C;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;;;;kBAEq3C,CAAC;;;;;;;;;;;;;;OAF52C;CACjB"}
@@ -22,7 +22,7 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
22
22
  responses: {
23
23
  200: {
24
24
  content: {
25
- 'application/json': {
25
+ "application/json": {
26
26
  schema: import("zod").ZodObject<{
27
27
  user: import("zod").ZodObject<{
28
28
  id: import("zod").ZodNumber;
@@ -120,7 +120,7 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
120
120
  responses: {
121
121
  200: {
122
122
  content: {
123
- 'application/json': {
123
+ "application/json": {
124
124
  schema: import("zod").ZodObject<{
125
125
  edges: import("zod").ZodArray<import("zod").ZodObject<{
126
126
  id: import("zod").ZodNumber;
@@ -226,7 +226,7 @@ export declare const adminModule: import("../../../api/lib/module").BuildModuleR
226
226
  responses: {
227
227
  200: {
228
228
  content: {
229
- 'application/json': {
229
+ "application/json": {
230
230
  schema: import("zod").ZodObject<{
231
231
  edges: import("zod").ZodArray<import("zod").ZodObject<{
232
232
  id: import("zod").ZodNumber;
@@ -5,7 +5,7 @@ import { sessionAdminRoute } from "./routes/session.route.js";
5
5
  import { usersAdminModule } from "./users/users.admin.module.js";
6
6
  export const adminModule = buildModule({
7
7
  ...CONFIG_PLUGIN,
8
- name: 'admin',
8
+ name: "admin",
9
9
  routes: [
10
10
  sessionAdminRoute
11
11
  ],
@@ -69,7 +69,7 @@ export declare const debugAdminModule: import("../../../lib/module").BuildModule
69
69
  responses: {
70
70
  200: {
71
71
  content: {
72
- 'application/json': {
72
+ "application/json": {
73
73
  schema: import("zod").ZodObject<{
74
74
  edges: import("zod").ZodArray<import("zod").ZodObject<{
75
75
  id: import("zod").ZodNumber;
@@ -3,7 +3,7 @@ import { buildModule } from "../../../lib/module.js";
3
3
  import { logsDebugAdminRoute } from "./routes/logs.route.js";
4
4
  export const debugAdminModule = buildModule({
5
5
  ...CONFIG_PLUGIN,
6
- name: 'debug',
6
+ name: "debug",
7
7
  routes: [
8
8
  logsDebugAdminRoute
9
9
  ]
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  export declare const logsDebugAdminRoute: {
3
3
  handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/logs", {
4
4
  in: {
@@ -70,7 +70,7 @@ export declare const logsDebugAdminRoute: {
70
70
  responses: {
71
71
  200: {
72
72
  content: {
73
- 'application/json': {
73
+ "application/json": {
74
74
  schema: z.ZodObject<{
75
75
  edges: z.ZodArray<z.ZodObject<{
76
76
  id: z.ZodNumber;
@@ -8,34 +8,34 @@ import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../..
8
8
  export const logsDebugAdminRoute = buildRoute({
9
9
  ...CONFIG_PLUGIN,
10
10
  route: {
11
- method: 'get',
12
- description: 'Get Admin Debug Logs',
13
- path: '/logs',
11
+ method: "get",
12
+ description: "Get Admin Debug Logs",
13
+ path: "/logs",
14
14
  request: {
15
15
  query: zodPaginationQuery.extend({
16
16
  order: z.enum([
17
- 'asc',
18
- 'desc'
17
+ "asc",
18
+ "desc"
19
19
  ]).optional(),
20
20
  orderBy: z.enum([
21
- 'type',
22
- 'createdAt',
23
- 'pluginId'
21
+ "type",
22
+ "createdAt",
23
+ "pluginId"
24
24
  ]).optional()
25
25
  })
26
26
  },
27
27
  responses: {
28
28
  200: {
29
29
  content: {
30
- 'application/json': {
30
+ "application/json": {
31
31
  schema: z.object({
32
32
  edges: z.array(z.object({
33
33
  id: z.number(),
34
34
  pluginId: z.string(),
35
35
  type: z.enum([
36
- 'warn',
37
- 'error',
38
- 'debug'
36
+ "warn",
37
+ "error",
38
+ "debug"
39
39
  ]),
40
40
  content: z.string(),
41
41
  createdAt: z.date(),
@@ -54,18 +54,18 @@ export const logsDebugAdminRoute = buildRoute({
54
54
  })
55
55
  }
56
56
  },
57
- description: 'List of users'
57
+ description: "List of users"
58
58
  }
59
59
  }
60
60
  },
61
61
  handler: async (c)=>{
62
- const query = c.req.valid('query');
62
+ const query = c.req.valid("query");
63
63
  const data = await withPagination({
64
64
  params: {
65
65
  query
66
66
  },
67
67
  primaryCursor: core_logs.id,
68
- query: async ({ limit, where, orderBy })=>await c.get('db').select({
68
+ query: async ({ limit, where, orderBy })=>await c.get("db").select({
69
69
  id: core_logs.id,
70
70
  pluginId: core_logs.pluginId,
71
71
  type: core_logs.type,
@@ -85,7 +85,7 @@ export const logsDebugAdminRoute = buildRoute({
85
85
  table: core_logs,
86
86
  orderBy: {
87
87
  column: query.orderBy ? core_logs[query.orderBy] : core_logs.createdAt,
88
- order: query.order ?? 'desc'
88
+ order: query.order ?? "desc"
89
89
  },
90
90
  c
91
91
  });
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  export declare const sessionAdminRoute: {
3
3
  handler: (c: import("hono").Context<import("../../../middlewares/global.middleware").EnvVitNode, "/session", {}>) => Response & import("hono").TypedResponse<{
4
4
  user: {
@@ -23,7 +23,7 @@ export declare const sessionAdminRoute: {
23
23
  responses: {
24
24
  200: {
25
25
  content: {
26
- 'application/json': {
26
+ "application/json": {
27
27
  schema: z.ZodObject<{
28
28
  user: z.ZodObject<{
29
29
  id: z.ZodNumber;
@@ -5,13 +5,13 @@ import { CONFIG_PLUGIN } from "../../../../config.js";
5
5
  export const sessionAdminRoute = buildRoute({
6
6
  ...CONFIG_PLUGIN,
7
7
  route: {
8
- method: 'get',
9
- description: 'Verify admin session',
10
- path: '/session',
8
+ method: "get",
9
+ description: "Verify admin session",
10
+ path: "/session",
11
11
  responses: {
12
12
  200: {
13
13
  content: {
14
- 'application/json': {
14
+ "application/json": {
15
15
  schema: z.object({
16
16
  user: z.object({
17
17
  id: z.number(),
@@ -29,15 +29,15 @@ export const sessionAdminRoute = buildRoute({
29
29
  })
30
30
  }
31
31
  },
32
- description: 'User'
32
+ description: "User"
33
33
  },
34
34
  403: {
35
- description: 'Access Denied'
35
+ description: "Access Denied"
36
36
  }
37
37
  }
38
38
  },
39
39
  handler: (c)=>{
40
- const user = c.get('admin')?.user;
40
+ const user = c.get("admin")?.user;
41
41
  if (!user) throw new HTTPException(403);
42
42
  return c.json({
43
43
  user,
@@ -1,4 +1,4 @@
1
- import { z } from '@hono/zod-openapi';
1
+ import { z } from "@hono/zod-openapi";
2
2
  export declare const listUsersAdminRoute: {
3
3
  handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/list", {
4
4
  in: {
@@ -65,7 +65,7 @@ export declare const listUsersAdminRoute: {
65
65
  responses: {
66
66
  200: {
67
67
  content: {
68
- 'application/json': {
68
+ "application/json": {
69
69
  schema: z.ZodObject<{
70
70
  edges: z.ZodArray<z.ZodObject<{
71
71
  id: z.ZodNumber;
@@ -6,25 +6,25 @@ import { core_users } from "../../../../../database/users.js";
6
6
  export const listUsersAdminRoute = buildRoute({
7
7
  ...CONFIG_PLUGIN,
8
8
  route: {
9
- method: 'get',
10
- description: 'Get list of all users',
11
- path: '/list',
9
+ method: "get",
10
+ description: "Get list of all users",
11
+ path: "/list",
12
12
  request: {
13
13
  query: zodPaginationQuery.extend({
14
14
  order: z.enum([
15
- 'asc',
16
- 'desc'
15
+ "asc",
16
+ "desc"
17
17
  ]).optional(),
18
18
  orderBy: z.enum([
19
- 'name',
20
- 'createdAt'
19
+ "name",
20
+ "createdAt"
21
21
  ]).optional()
22
22
  })
23
23
  },
24
24
  responses: {
25
25
  200: {
26
26
  content: {
27
- 'application/json': {
27
+ "application/json": {
28
28
  schema: z.object({
29
29
  edges: z.array(z.object({
30
30
  id: z.number(),
@@ -43,18 +43,18 @@ export const listUsersAdminRoute = buildRoute({
43
43
  })
44
44
  }
45
45
  },
46
- description: 'List of users'
46
+ description: "List of users"
47
47
  }
48
48
  }
49
49
  },
50
50
  handler: async (c)=>{
51
- const query = c.req.valid('query');
51
+ const query = c.req.valid("query");
52
52
  const data = await withPagination({
53
53
  params: {
54
54
  query
55
55
  },
56
56
  primaryCursor: core_users.id,
57
- query: async ({ limit, where, orderBy })=>await c.get('db').select({
57
+ query: async ({ limit, where, orderBy })=>await c.get("db").select({
58
58
  id: core_users.id,
59
59
  name: core_users.name,
60
60
  email: core_users.email,
@@ -70,7 +70,7 @@ export const listUsersAdminRoute = buildRoute({
70
70
  table: core_users,
71
71
  orderBy: {
72
72
  column: query.orderBy ? core_users[query.orderBy] : core_users.createdAt,
73
- order: query.order ?? 'desc'
73
+ order: query.order ?? "desc"
74
74
  },
75
75
  c
76
76
  });
@@ -1,4 +1,4 @@
1
- import { z } from '@hono/zod-openapi';
1
+ import { z } from "@hono/zod-openapi";
2
2
  export declare const usersAdminRoute: {
3
3
  handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/list", {
4
4
  in: {
@@ -67,7 +67,7 @@ export declare const usersAdminRoute: {
67
67
  responses: {
68
68
  200: {
69
69
  content: {
70
- 'application/json': {
70
+ "application/json": {
71
71
  schema: z.ZodObject<{
72
72
  edges: z.ZodArray<z.ZodObject<{
73
73
  id: z.ZodNumber;
@@ -6,27 +6,27 @@ import { core_users } from "../../../../../database/users.js";
6
6
  export const usersAdminRoute = buildRoute({
7
7
  ...CONFIG_PLUGIN,
8
8
  route: {
9
- method: 'get',
10
- description: 'Get list of all users (Admin only)',
11
- path: '/list',
9
+ method: "get",
10
+ description: "Get list of all users (Admin only)",
11
+ path: "/list",
12
12
  request: {
13
13
  query: zodPaginationQuery.extend({
14
14
  order: z.enum([
15
- 'asc',
16
- 'desc'
15
+ "asc",
16
+ "desc"
17
17
  ]).optional(),
18
18
  orderBy: z.enum([
19
- 'id',
20
- 'name',
21
- 'email',
22
- 'createdAt'
19
+ "id",
20
+ "name",
21
+ "email",
22
+ "createdAt"
23
23
  ]).optional()
24
24
  })
25
25
  },
26
26
  responses: {
27
27
  200: {
28
28
  content: {
29
- 'application/json': {
29
+ "application/json": {
30
30
  schema: z.object({
31
31
  edges: z.array(z.object({
32
32
  id: z.number(),
@@ -45,21 +45,21 @@ export const usersAdminRoute = buildRoute({
45
45
  })
46
46
  }
47
47
  },
48
- description: 'List of users'
48
+ description: "List of users"
49
49
  },
50
50
  403: {
51
- description: 'Access Denied'
51
+ description: "Access Denied"
52
52
  }
53
53
  }
54
54
  },
55
55
  handler: async (c)=>{
56
- const query = c.req.valid('query');
56
+ const query = c.req.valid("query");
57
57
  const data = await withPagination({
58
58
  params: {
59
59
  query
60
60
  },
61
61
  primaryCursor: core_users.id,
62
- query: async ({ limit, where, orderBy })=>await c.get('db').select({
62
+ query: async ({ limit, where, orderBy })=>await c.get("db").select({
63
63
  id: core_users.id,
64
64
  name: core_users.name,
65
65
  email: core_users.email,
@@ -75,7 +75,7 @@ export const usersAdminRoute = buildRoute({
75
75
  table: core_users,
76
76
  orderBy: {
77
77
  column: query.orderBy ? core_users[query.orderBy] : core_users.createdAt,
78
- order: query.order ?? 'desc'
78
+ order: query.order ?? "desc"
79
79
  },
80
80
  c
81
81
  });
@@ -64,7 +64,7 @@ export declare const usersAdminModule: import("../../../../api/lib/module").Buil
64
64
  responses: {
65
65
  200: {
66
66
  content: {
67
- 'application/json': {
67
+ "application/json": {
68
68
  schema: import("zod").ZodObject<{
69
69
  edges: import("zod").ZodArray<import("zod").ZodObject<{
70
70
  id: import("zod").ZodNumber;