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

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 (320) hide show
  1. package/dist/scripts/get-config.d.ts.map +1 -1
  2. package/dist/scripts/plugin.d.ts.map +1 -1
  3. package/dist/scripts/prepare-database.d.ts +0 -1
  4. package/dist/scripts/prepare-database.d.ts.map +1 -1
  5. package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
  6. package/dist/scripts/scripts.js +4 -4
  7. package/dist/scripts/shared/file-utils.d.ts.map +1 -1
  8. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +3 -0
  9. package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +1 -0
  10. package/dist/src/api/adapters/cron/node-cron.adapter.js +11 -0
  11. package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
  12. package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
  13. package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
  14. package/dist/src/api/config.d.ts.map +1 -1
  15. package/dist/src/api/config.js +22 -9
  16. package/dist/src/api/lib/cron.d.ts +18 -0
  17. package/dist/src/api/lib/cron.d.ts.map +1 -0
  18. package/dist/src/api/lib/cron.js +22 -0
  19. package/dist/src/api/lib/logger-middleware.js +1 -1
  20. package/dist/src/api/lib/module.d.ts +4 -1
  21. package/dist/src/api/lib/module.d.ts.map +1 -1
  22. package/dist/src/api/lib/module.js +3 -2
  23. package/dist/src/api/lib/plugin.d.ts +2 -0
  24. package/dist/src/api/lib/plugin.d.ts.map +1 -1
  25. package/dist/src/api/lib/plugin.js +9 -1
  26. package/dist/src/api/lib/route.d.ts.map +1 -1
  27. package/dist/src/api/lib/with-pagination.d.ts +1 -1
  28. package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
  29. package/dist/src/api/middlewares/cron-auth.middleware.d.ts +3 -0
  30. package/dist/src/api/middlewares/cron-auth.middleware.d.ts.map +1 -0
  31. package/dist/src/api/middlewares/cron-auth.middleware.js +19 -0
  32. package/dist/src/api/middlewares/global.middleware.d.ts +8 -2
  33. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
  34. package/dist/src/api/middlewares/global.middleware.js +33 -23
  35. package/dist/src/api/models/device.d.ts.map +1 -1
  36. package/dist/src/api/models/device.js +1 -1
  37. package/dist/src/api/models/email.d.ts.map +1 -1
  38. package/dist/src/api/models/email.js +1 -2
  39. package/dist/src/api/models/session-admin.d.ts.map +1 -1
  40. package/dist/src/api/models/session.d.ts.map +1 -1
  41. package/dist/src/api/models/sso.d.ts.map +1 -1
  42. package/dist/src/api/models/sso.js +1 -1
  43. package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
  44. package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
  45. package/dist/src/api/models/user/sign-up.d.ts +1 -1
  46. package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
  47. package/dist/src/api/models/user/sign-up.js +1 -0
  48. package/dist/src/api/models/user.d.ts +1 -1
  49. package/dist/src/api/models/user.d.ts.map +1 -1
  50. package/dist/src/api/modules/admin/admin.module.d.ts +163 -1
  51. package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
  52. package/dist/src/api/modules/admin/admin.module.js +6 -3
  53. package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts +164 -0
  54. package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -0
  55. package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +11 -0
  56. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts +164 -0
  57. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts.map +1 -0
  58. package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +12 -0
  59. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts +98 -0
  60. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts.map +1 -0
  61. package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +66 -0
  62. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts +70 -0
  63. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts.map +1 -0
  64. package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +95 -0
  65. package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
  66. package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -1
  67. package/dist/src/api/modules/admin/routes/session.route.js +1 -1
  68. package/dist/src/api/modules/admin/users/routes/list.route.js +1 -1
  69. package/dist/src/api/modules/admin/users/routes/users.route.d.ts +3 -3
  70. package/dist/src/api/modules/admin/users/routes/users.route.js +1 -1
  71. package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
  72. package/dist/src/api/modules/cron/cron/clean.cron.d.ts +2 -0
  73. package/dist/src/api/modules/cron/cron/clean.cron.d.ts.map +1 -0
  74. package/dist/src/api/modules/cron/cron/clean.cron.js +24 -0
  75. package/dist/src/api/modules/cron/cron.module.d.ts +26 -0
  76. package/dist/src/api/modules/cron/cron.module.d.ts.map +1 -0
  77. package/dist/src/api/modules/cron/cron.module.js +14 -0
  78. package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts +36 -0
  79. package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -0
  80. package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +72 -0
  81. package/dist/src/api/modules/cron/routes/cron.route.d.ts +27 -0
  82. package/dist/src/api/modules/cron/routes/cron.route.d.ts.map +1 -0
  83. package/dist/src/api/modules/cron/routes/cron.route.js +95 -0
  84. package/dist/src/api/modules/middleware/middleware.module.js +1 -1
  85. package/dist/src/api/modules/middleware/route.js +1 -1
  86. package/dist/src/api/modules/users/routes/change-password.route.js +1 -1
  87. package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -1
  88. package/dist/src/api/modules/users/routes/session.route.js +1 -1
  89. package/dist/src/api/modules/users/routes/sign-in.route.js +1 -1
  90. package/dist/src/api/modules/users/routes/sign-out.route.js +1 -1
  91. package/dist/src/api/modules/users/routes/sign-up.route.js +1 -1
  92. package/dist/src/api/modules/users/routes/test.route.js +1 -1
  93. package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -1
  94. package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -1
  95. package/dist/src/api/modules/users/sso/sso.module.js +1 -1
  96. package/dist/src/api/modules/users/users.module.js +1 -1
  97. package/dist/src/api/plugin.d.ts.map +1 -1
  98. package/dist/src/api/plugin.js +4 -2
  99. package/dist/src/app_admin/core/advanced/cron/page.d.ts +11 -0
  100. package/dist/src/app_admin/core/advanced/cron/page.d.ts.map +1 -0
  101. package/dist/src/app_admin/core/advanced/cron/page.js +42 -0
  102. package/dist/src/app_admin/core/debug/page.js +1 -1
  103. package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
  104. package/dist/src/app_admin/core/users/page.js +1 -1
  105. package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -1
  106. package/dist/src/components/confirm-action/content.d.ts.map +1 -1
  107. package/dist/src/components/confirm-action/content.js +1 -0
  108. package/dist/src/components/form/auto-form.d.ts.map +1 -1
  109. package/dist/src/components/form/auto-form.js +0 -1
  110. package/dist/src/components/form/fields/checkbox.d.ts +1 -1
  111. package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
  112. package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
  113. package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
  114. package/dist/src/components/form/fields/input.d.ts +1 -1
  115. package/dist/src/components/form/fields/input.d.ts.map +1 -1
  116. package/dist/src/components/form/fields/select.d.ts.map +1 -1
  117. package/dist/src/components/form/fields/switch.js +1 -1
  118. package/dist/src/components/switchers/langs/{language-swietcher.d.ts → language-switcher.d.ts} +1 -1
  119. package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -0
  120. package/dist/src/components/table/content.d.ts.map +1 -1
  121. package/dist/src/components/table/data-table.d.ts +1 -1
  122. package/dist/src/components/table/data-table.d.ts.map +1 -1
  123. package/dist/src/components/table/order-table-head.d.ts.map +1 -1
  124. package/dist/src/components/table/pagination.js +1 -1
  125. package/dist/src/components/tiptap/extension.d.ts +4 -0
  126. package/dist/src/components/tiptap/extension.d.ts.map +1 -0
  127. package/dist/src/components/tiptap/extension.js +33 -0
  128. package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts +2 -0
  129. package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts.map +1 -0
  130. package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +91 -0
  131. package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts +2 -0
  132. package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
  133. package/dist/src/components/tiptap/toolbar/actions/bold-action.js +39 -0
  134. package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts +2 -0
  135. package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -0
  136. package/dist/src/components/tiptap/toolbar/actions/headings-action.js +93 -0
  137. package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts +2 -0
  138. package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts.map +1 -0
  139. package/dist/src/components/tiptap/toolbar/actions/italic-action.js +38 -0
  140. package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts +2 -0
  141. package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts.map +1 -0
  142. package/dist/src/components/tiptap/toolbar/actions/list-action.js +61 -0
  143. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts +2 -0
  144. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -0
  145. package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +59 -0
  146. package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts +2 -0
  147. package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts.map +1 -0
  148. package/dist/src/components/tiptap/toolbar/actions/underline-action.js +38 -0
  149. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts +2 -0
  150. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts.map +1 -0
  151. package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +63 -0
  152. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts +4 -0
  153. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts.map +1 -0
  154. package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +11 -0
  155. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts +5 -0
  156. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts.map +1 -0
  157. package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +55 -0
  158. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts +9 -0
  159. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts.map +1 -0
  160. package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +5 -0
  161. package/dist/src/components/ui/accordion.d.ts +1 -1
  162. package/dist/src/components/ui/accordion.d.ts.map +1 -1
  163. package/dist/src/components/ui/alert.d.ts +1 -1
  164. package/dist/src/components/ui/alert.d.ts.map +1 -1
  165. package/dist/src/components/ui/badge.d.ts +1 -1
  166. package/dist/src/components/ui/badge.d.ts.map +1 -1
  167. package/dist/src/components/ui/button-client.d.ts.map +1 -1
  168. package/dist/src/components/ui/button-client.js +1 -1
  169. package/dist/src/components/ui/button.d.ts +2 -2
  170. package/dist/src/components/ui/button.d.ts.map +1 -1
  171. package/dist/src/components/ui/button.js +1 -1
  172. package/dist/src/components/ui/checkbox.d.ts +1 -1
  173. package/dist/src/components/ui/checkbox.d.ts.map +1 -1
  174. package/dist/src/components/ui/command.d.ts +1 -1
  175. package/dist/src/components/ui/command.d.ts.map +1 -1
  176. package/dist/src/components/ui/context-menu.d.ts +1 -1
  177. package/dist/src/components/ui/context-menu.d.ts.map +1 -1
  178. package/dist/src/components/ui/drawer.d.ts.map +1 -1
  179. package/dist/src/components/ui/dropdown-menu.d.ts +1 -1
  180. package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
  181. package/dist/src/components/ui/editor-content.d.ts +4 -0
  182. package/dist/src/components/ui/editor-content.d.ts.map +1 -0
  183. package/dist/src/components/ui/editor-content.js +10 -0
  184. package/dist/src/components/ui/editor.d.ts +6 -0
  185. package/dist/src/components/ui/editor.d.ts.map +1 -0
  186. package/dist/src/components/ui/editor.js +35 -0
  187. package/dist/src/components/ui/form.d.ts.map +1 -1
  188. package/dist/src/components/ui/hover-card.d.ts +1 -1
  189. package/dist/src/components/ui/hover-card.d.ts.map +1 -1
  190. package/dist/src/components/ui/label.d.ts +1 -1
  191. package/dist/src/components/ui/label.d.ts.map +1 -1
  192. package/dist/src/components/ui/menubar.d.ts +1 -1
  193. package/dist/src/components/ui/menubar.d.ts.map +1 -1
  194. package/dist/src/components/ui/navigation-menu.d.ts +1 -1
  195. package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
  196. package/dist/src/components/ui/popover.d.ts +1 -1
  197. package/dist/src/components/ui/popover.d.ts.map +1 -1
  198. package/dist/src/components/ui/progress.d.ts +1 -1
  199. package/dist/src/components/ui/progress.d.ts.map +1 -1
  200. package/dist/src/components/ui/radio-group.d.ts +1 -1
  201. package/dist/src/components/ui/radio-group.d.ts.map +1 -1
  202. package/dist/src/components/ui/scroll-area.d.ts +6 -0
  203. package/dist/src/components/ui/scroll-area.d.ts.map +1 -0
  204. package/dist/src/components/ui/scroll-area.js +33 -0
  205. package/dist/src/components/ui/select.d.ts +1 -1
  206. package/dist/src/components/ui/select.d.ts.map +1 -1
  207. package/dist/src/components/ui/separator.d.ts +1 -1
  208. package/dist/src/components/ui/separator.d.ts.map +1 -1
  209. package/dist/src/components/ui/sheet.d.ts +1 -1
  210. package/dist/src/components/ui/sheet.d.ts.map +1 -1
  211. package/dist/src/components/ui/sidebar.d.ts.map +1 -1
  212. package/dist/src/components/ui/sidebar.js +14 -15
  213. package/dist/src/components/ui/sonner.d.ts.map +1 -1
  214. package/dist/src/components/ui/switch.d.ts +1 -1
  215. package/dist/src/components/ui/switch.d.ts.map +1 -1
  216. package/dist/src/components/ui/table.js +1 -1
  217. package/dist/src/components/ui/tabs.d.ts +1 -1
  218. package/dist/src/components/ui/tabs.d.ts.map +1 -1
  219. package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
  220. package/dist/src/components/ui/toggle.d.ts +1 -1
  221. package/dist/src/components/ui/toggle.d.ts.map +1 -1
  222. package/dist/src/components/ui/toggle.js +1 -1
  223. package/dist/src/components/ui/tooltip.d.ts +5 -2
  224. package/dist/src/components/ui/tooltip.d.ts.map +1 -1
  225. package/dist/src/components/ui/tooltip.js +18 -2
  226. package/dist/src/database/cron.d.ts +171 -0
  227. package/dist/src/database/cron.d.ts.map +1 -0
  228. package/dist/src/database/cron.js +22 -0
  229. package/dist/src/database/users.d.ts +2 -2
  230. package/dist/src/database/users.js +1 -1
  231. package/dist/src/drizzle.config.d.ts.map +1 -1
  232. package/dist/src/drizzle.config.js +1 -1
  233. package/dist/src/emails/default-template.d.ts.map +1 -1
  234. package/dist/src/emails/default-template.js +20 -21
  235. package/dist/src/hooks/use-captcha.d.ts +20 -0
  236. package/dist/src/hooks/use-captcha.d.ts.map +1 -1
  237. package/dist/src/hooks/use-captcha.js +19 -18
  238. package/dist/src/hooks/use-mobile.d.ts.map +1 -1
  239. package/dist/src/hooks/use-mobile.js +1 -0
  240. package/dist/src/lib/api/get-next-cron-run-date.d.ts +2 -0
  241. package/dist/src/lib/api/get-next-cron-run-date.d.ts.map +1 -0
  242. package/dist/src/lib/api/get-next-cron-run-date.js +14 -0
  243. package/dist/src/lib/api/get-next-cron-run-date.test.d.ts +2 -0
  244. package/dist/src/lib/api/get-next-cron-run-date.test.d.ts.map +1 -0
  245. package/dist/src/lib/api/get-next-cron-run-date.test.js +55 -0
  246. package/dist/src/lib/api/should-cron-job-run.d.ts +2 -0
  247. package/dist/src/lib/api/should-cron-job-run.d.ts.map +1 -0
  248. package/dist/src/lib/api/should-cron-job-run.js +16 -0
  249. package/dist/src/lib/api/should-cron-job-run.test.d.ts +2 -0
  250. package/dist/src/lib/api/should-cron-job-run.test.d.ts.map +1 -0
  251. package/dist/src/lib/api/should-cron-job-run.test.js +213 -0
  252. package/dist/src/lib/config.d.ts +1 -0
  253. package/dist/src/lib/config.d.ts.map +1 -1
  254. package/dist/src/lib/config.js +7 -5
  255. package/dist/src/lib/ctrl-or-command-character.d.ts +2 -0
  256. package/dist/src/lib/ctrl-or-command-character.d.ts.map +1 -0
  257. package/dist/src/lib/ctrl-or-command-character.js +5 -0
  258. package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
  259. package/dist/src/lib/fetcher/core.d.ts.map +1 -1
  260. package/dist/src/lib/fetcher/core.js +1 -2
  261. package/dist/src/lib/fetcher-client.d.ts.map +1 -1
  262. package/dist/src/lib/fetcher.d.ts.map +1 -1
  263. package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
  264. package/dist/src/lib/helpers/auto-form.js +0 -1
  265. package/dist/src/lib/navigation.d.ts +2 -2
  266. package/dist/src/lib/navigation.d.ts.map +1 -1
  267. package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts +1 -0
  268. package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
  269. package/dist/src/lib/tiptap/toolbar/actions/bold-action.js +0 -0
  270. package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
  271. package/dist/src/views/admin/layouts/admin-layout.js +5 -2
  272. package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
  273. package/dist/src/views/admin/layouts/sidebar/nav/item.js +0 -3
  274. package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -1
  275. package/dist/src/views/admin/layouts/sidebar/nav/nav.js +12 -1
  276. package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
  277. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts +5 -0
  278. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts.map +1 -0
  279. package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +97 -0
  280. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts +4 -0
  281. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts.map +1 -0
  282. package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +23 -0
  283. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts +4 -0
  284. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts.map +1 -0
  285. package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +38 -0
  286. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
  287. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -1
  288. package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +12 -21
  289. package/dist/src/views/admin/views/core/test.d.ts.map +1 -1
  290. package/dist/src/views/admin/views/core/test.js +116 -106
  291. package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
  292. package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
  293. package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
  294. package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
  295. package/dist/src/views/auth/sign-up/components/password-input.js +2 -1
  296. package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
  297. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
  298. package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
  299. package/dist/src/views/auth/sign-up/wrapper.js +6 -3
  300. package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
  301. package/dist/src/views/error/global-error-view.d.ts.map +1 -1
  302. package/dist/src/views/error/global-error-view.js +2 -1
  303. package/dist/src/views/layouts/provider.d.ts.map +1 -1
  304. package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
  305. package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
  306. package/dist/src/views/layouts/theme/header/header.js +1 -1
  307. package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
  308. package/dist/src/vitnode.config.d.ts +2 -0
  309. package/dist/src/vitnode.config.d.ts.map +1 -1
  310. package/dist/src/vitnode.config.js +0 -1
  311. package/dist/tsconfig.tsbuildinfo +1 -1
  312. package/eslint.config.mjs +17 -0
  313. package/package.json +37 -27
  314. package/src/app_admin/core/advanced/cron/page.tsx +42 -0
  315. package/src/app_admin/core/debug/page.tsx +1 -1
  316. package/src/app_admin/core/users/page.tsx +2 -1
  317. package/src/locales/en.json +51 -0
  318. package/src/tiptap.css +28 -0
  319. package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +0 -1
  320. /package/dist/src/components/switchers/langs/{language-swietcher.js → language-switcher.js} +0 -0
@@ -0,0 +1,11 @@
1
+ import { buildModule } from "../../../lib/module.js";
2
+ import { CONFIG_PLUGIN } from "../../../../config.js";
3
+ import { cronAdminModule } from "./cron/cron.admin.module.js";
4
+ export const advancedAdminModule = buildModule({
5
+ pluginId: CONFIG_PLUGIN.pluginId,
6
+ name: "advanced",
7
+ routes: [],
8
+ modules: [
9
+ cronAdminModule
10
+ ]
11
+ });
@@ -0,0 +1,164 @@
1
+ export declare const cronAdminModule: import("../../../../../api/lib/module").BuildModuleReturn<"@vitnode/core", "cron", [{
2
+ handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/", {
3
+ in: {
4
+ query: {
5
+ cursor?: string | undefined;
6
+ first?: string | undefined;
7
+ last?: string | undefined;
8
+ order?: "asc" | "desc" | undefined;
9
+ orderBy?: "createdAt" | "lastRun" | "nextRun" | undefined;
10
+ };
11
+ };
12
+ out: {
13
+ query: {
14
+ cursor?: string | undefined;
15
+ first?: string | undefined;
16
+ last?: string | undefined;
17
+ order?: "asc" | "desc" | undefined;
18
+ orderBy?: "createdAt" | "lastRun" | "nextRun" | undefined;
19
+ };
20
+ };
21
+ }>) => Promise<Response & import("hono").TypedResponse<{
22
+ edges: {
23
+ id: number;
24
+ name: string;
25
+ description: string | null;
26
+ lastRun: string | null;
27
+ createdAt: string;
28
+ pluginId: string;
29
+ module: string;
30
+ nextRun: string | null;
31
+ schedule: string;
32
+ }[];
33
+ pageInfo: {
34
+ count: number;
35
+ endCursor: null | number;
36
+ hasNextPage: boolean;
37
+ hasPreviousPage: boolean;
38
+ startCursor: null | number;
39
+ totalCount: number;
40
+ };
41
+ }, 200, "json">>;
42
+ pluginId: "@vitnode/core";
43
+ route: {
44
+ method: "get";
45
+ description: string;
46
+ path: "/";
47
+ request: {
48
+ query: import("zod").ZodObject<{
49
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
50
+ first: import("zod").ZodOptional<import("zod").ZodString>;
51
+ last: import("zod").ZodOptional<import("zod").ZodString>;
52
+ order: import("zod").ZodOptional<import("zod").ZodEnum<{
53
+ asc: "asc";
54
+ desc: "desc";
55
+ }>>;
56
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
57
+ createdAt: "createdAt";
58
+ lastRun: "lastRun";
59
+ nextRun: "nextRun";
60
+ }>>;
61
+ }, import("zod/v4/core").$strip>;
62
+ };
63
+ responses: {
64
+ 200: {
65
+ content: {
66
+ "application/json": {
67
+ schema: import("zod").ZodObject<{
68
+ edges: import("zod").ZodArray<import("zod").ZodObject<{
69
+ id: import("zod").ZodNumber;
70
+ createdAt: import("zod").ZodDate;
71
+ name: import("zod").ZodString;
72
+ description: import("zod").ZodNullable<import("zod").ZodString>;
73
+ pluginId: import("zod").ZodString;
74
+ module: import("zod").ZodString;
75
+ lastRun: import("zod").ZodNullable<import("zod").ZodDate>;
76
+ nextRun: import("zod").ZodNullable<import("zod").ZodDate>;
77
+ schedule: import("zod").ZodString;
78
+ }, import("zod/v4/core").$strip>>;
79
+ pageInfo: import("zod").ZodObject<{
80
+ totalCount: import("zod").ZodNumber;
81
+ count: import("zod").ZodNumber;
82
+ hasNextPage: import("zod").ZodBoolean;
83
+ hasPreviousPage: import("zod").ZodBoolean;
84
+ startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
85
+ endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
86
+ }, import("zod/v4/core").$strip>;
87
+ }, import("zod/v4/core").$strip>;
88
+ };
89
+ };
90
+ description: string;
91
+ };
92
+ };
93
+ } & {
94
+ getRoutingPath: () => "/";
95
+ };
96
+ }, {
97
+ handler: (c: import("hono").Context<import("../../../../middlewares/global.middleware").EnvVitNode, "/:id", {
98
+ in: {
99
+ param: {
100
+ id: string;
101
+ };
102
+ };
103
+ out: {
104
+ param: {
105
+ id: string;
106
+ };
107
+ };
108
+ }>) => Promise<(Response & import("hono").TypedResponse<{
109
+ error: string;
110
+ }, 404, "json">) | (Response & import("hono").TypedResponse<{
111
+ message: string;
112
+ }, 201, "json">) | (Response & import("hono").TypedResponse<{
113
+ error: string;
114
+ }, 500, "json">)>;
115
+ pluginId: "@vitnode/core";
116
+ route: {
117
+ method: "post";
118
+ description: string;
119
+ path: "/{id}";
120
+ request: {
121
+ params: import("zod").ZodObject<{
122
+ id: import("zod").ZodString;
123
+ }, import("zod/v4/core").$strip>;
124
+ };
125
+ responses: {
126
+ 201: {
127
+ content: {
128
+ "application/json": {
129
+ schema: import("zod").ZodObject<{
130
+ message: import("zod").ZodOptional<import("zod").ZodString>;
131
+ error: import("zod").ZodOptional<import("zod").ZodString>;
132
+ }, import("zod/v4/core").$strip>;
133
+ };
134
+ };
135
+ description: string;
136
+ };
137
+ 404: {
138
+ content: {
139
+ "application/json": {
140
+ schema: import("zod").ZodObject<{
141
+ message: import("zod").ZodOptional<import("zod").ZodString>;
142
+ error: import("zod").ZodOptional<import("zod").ZodString>;
143
+ }, import("zod/v4/core").$strip>;
144
+ };
145
+ };
146
+ description: string;
147
+ };
148
+ 500: {
149
+ content: {
150
+ "application/json": {
151
+ schema: import("zod").ZodObject<{
152
+ message: import("zod").ZodOptional<import("zod").ZodString>;
153
+ error: import("zod").ZodOptional<import("zod").ZodString>;
154
+ }, import("zod/v4/core").$strip>;
155
+ };
156
+ };
157
+ description: string;
158
+ };
159
+ };
160
+ } & {
161
+ getRoutingPath: () => "/:id";
162
+ };
163
+ }], 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>>[]>[]>;
164
+ //# sourceMappingURL=cron.admin.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cron.admin.module.d.ts","sourceRoot":"","sources":["../../../../../../../src/api/modules/admin/advanced/cron/cron.admin.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sQAI1B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { buildModule } from "../../../../lib/module.js";
2
+ import { CONFIG_PLUGIN } from "../../../../../config.js";
3
+ import { getCronsRoute } from "./routes/get.route.js";
4
+ import { runCronRoute } from "./routes/run.route.js";
5
+ export const cronAdminModule = buildModule({
6
+ pluginId: CONFIG_PLUGIN.pluginId,
7
+ name: "cron",
8
+ routes: [
9
+ getCronsRoute,
10
+ runCronRoute
11
+ ]
12
+ });
@@ -0,0 +1,98 @@
1
+ import z from "zod";
2
+ export declare const getCronsRoute: {
3
+ handler: (c: import("hono").Context<import("../../../../../middlewares/global.middleware").EnvVitNode, "/", {
4
+ in: {
5
+ query: {
6
+ cursor?: string | undefined;
7
+ first?: string | undefined;
8
+ last?: string | undefined;
9
+ order?: "asc" | "desc" | undefined;
10
+ orderBy?: "createdAt" | "lastRun" | "nextRun" | undefined;
11
+ };
12
+ };
13
+ out: {
14
+ query: {
15
+ cursor?: string | undefined;
16
+ first?: string | undefined;
17
+ last?: string | undefined;
18
+ order?: "asc" | "desc" | undefined;
19
+ orderBy?: "createdAt" | "lastRun" | "nextRun" | undefined;
20
+ };
21
+ };
22
+ }>) => Promise<Response & import("hono").TypedResponse<{
23
+ edges: {
24
+ id: number;
25
+ name: string;
26
+ description: string | null;
27
+ lastRun: string | null;
28
+ createdAt: string;
29
+ pluginId: string;
30
+ module: string;
31
+ nextRun: string | null;
32
+ schedule: string;
33
+ }[];
34
+ pageInfo: {
35
+ count: number;
36
+ endCursor: null | number;
37
+ hasNextPage: boolean;
38
+ hasPreviousPage: boolean;
39
+ startCursor: null | number;
40
+ totalCount: number;
41
+ };
42
+ }, 200, "json">>;
43
+ pluginId: "@vitnode/core";
44
+ route: {
45
+ method: "get";
46
+ description: string;
47
+ path: "/";
48
+ request: {
49
+ query: z.ZodObject<{
50
+ cursor: z.ZodOptional<z.ZodString>;
51
+ first: z.ZodOptional<z.ZodString>;
52
+ last: z.ZodOptional<z.ZodString>;
53
+ order: z.ZodOptional<z.ZodEnum<{
54
+ asc: "asc";
55
+ desc: "desc";
56
+ }>>;
57
+ orderBy: z.ZodOptional<z.ZodEnum<{
58
+ createdAt: "createdAt";
59
+ lastRun: "lastRun";
60
+ nextRun: "nextRun";
61
+ }>>;
62
+ }, z.core.$strip>;
63
+ };
64
+ responses: {
65
+ 200: {
66
+ content: {
67
+ "application/json": {
68
+ schema: z.ZodObject<{
69
+ edges: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodNumber;
71
+ createdAt: z.ZodDate;
72
+ name: z.ZodString;
73
+ description: z.ZodNullable<z.ZodString>;
74
+ pluginId: z.ZodString;
75
+ module: z.ZodString;
76
+ lastRun: z.ZodNullable<z.ZodDate>;
77
+ nextRun: z.ZodNullable<z.ZodDate>;
78
+ schedule: z.ZodString;
79
+ }, z.core.$strip>>;
80
+ pageInfo: z.ZodObject<{
81
+ totalCount: z.ZodNumber;
82
+ count: z.ZodNumber;
83
+ hasNextPage: z.ZodBoolean;
84
+ hasPreviousPage: z.ZodBoolean;
85
+ startCursor: z.ZodNullable<z.ZodNumber>;
86
+ endCursor: z.ZodNullable<z.ZodNumber>;
87
+ }, z.core.$strip>;
88
+ }, z.core.$strip>;
89
+ };
90
+ };
91
+ description: string;
92
+ };
93
+ };
94
+ } & {
95
+ getRoutingPath: () => "/";
96
+ };
97
+ };
98
+ //# sourceMappingURL=get.route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/get.route.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAWpB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DxB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import z from "zod";
2
+ import { buildRoute } from "../../../../../lib/route.js";
3
+ import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../../lib/with-pagination.js";
4
+ import { CONFIG_PLUGIN } from "../../../../../../config.js";
5
+ import { core_cron } from "../../../../../../database/cron.js";
6
+ export const getCronsRoute = buildRoute({
7
+ pluginId: CONFIG_PLUGIN.pluginId,
8
+ route: {
9
+ method: "get",
10
+ description: "Get Admin Cron Logs",
11
+ path: "/",
12
+ request: {
13
+ query: zodPaginationQuery.extend({
14
+ order: z.enum([
15
+ "asc",
16
+ "desc"
17
+ ]).optional(),
18
+ orderBy: z.enum([
19
+ "createdAt",
20
+ "lastRun",
21
+ "nextRun"
22
+ ]).optional()
23
+ })
24
+ },
25
+ responses: {
26
+ 200: {
27
+ content: {
28
+ "application/json": {
29
+ schema: z.object({
30
+ edges: z.array(z.object({
31
+ id: z.number(),
32
+ createdAt: z.date(),
33
+ name: z.string(),
34
+ description: z.string().nullable(),
35
+ pluginId: z.string(),
36
+ module: z.string(),
37
+ lastRun: z.date().nullable(),
38
+ nextRun: z.date().nullable(),
39
+ schedule: z.string()
40
+ })),
41
+ pageInfo: zodPaginationPageInfo
42
+ })
43
+ }
44
+ },
45
+ description: "List of cron jobs"
46
+ }
47
+ }
48
+ },
49
+ handler: async (c)=>{
50
+ const query = c.req.valid("query");
51
+ const data = await withPagination({
52
+ params: {
53
+ query
54
+ },
55
+ c,
56
+ primaryCursor: core_cron.id,
57
+ query: async ({ limit, where, orderBy })=>await c.get("db").select().from(core_cron).where(where).orderBy(orderBy).limit(limit),
58
+ table: core_cron,
59
+ orderBy: {
60
+ column: query.orderBy ? core_cron[query.orderBy] : core_cron.lastRun,
61
+ order: query.order ?? "desc"
62
+ }
63
+ });
64
+ return c.json(data);
65
+ }
66
+ });
@@ -0,0 +1,70 @@
1
+ import { z } from "zod";
2
+ export declare const runCronRoute: {
3
+ handler: (c: import("hono").Context<import("../../../../../middlewares/global.middleware").EnvVitNode, "/:id", {
4
+ in: {
5
+ param: {
6
+ id: string;
7
+ };
8
+ };
9
+ out: {
10
+ param: {
11
+ id: string;
12
+ };
13
+ };
14
+ }>) => Promise<(Response & import("hono").TypedResponse<{
15
+ error: string;
16
+ }, 404, "json">) | (Response & import("hono").TypedResponse<{
17
+ message: string;
18
+ }, 201, "json">) | (Response & import("hono").TypedResponse<{
19
+ error: string;
20
+ }, 500, "json">)>;
21
+ pluginId: "@vitnode/core";
22
+ route: {
23
+ method: "post";
24
+ description: string;
25
+ path: "/{id}";
26
+ request: {
27
+ params: z.ZodObject<{
28
+ id: z.ZodString;
29
+ }, z.core.$strip>;
30
+ };
31
+ responses: {
32
+ 201: {
33
+ content: {
34
+ "application/json": {
35
+ schema: z.ZodObject<{
36
+ message: z.ZodOptional<z.ZodString>;
37
+ error: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ };
40
+ };
41
+ description: string;
42
+ };
43
+ 404: {
44
+ content: {
45
+ "application/json": {
46
+ schema: z.ZodObject<{
47
+ message: z.ZodOptional<z.ZodString>;
48
+ error: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ };
51
+ };
52
+ description: string;
53
+ };
54
+ 500: {
55
+ content: {
56
+ "application/json": {
57
+ schema: z.ZodObject<{
58
+ message: z.ZodOptional<z.ZodString>;
59
+ error: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$strip>;
61
+ };
62
+ };
63
+ description: string;
64
+ };
65
+ };
66
+ } & {
67
+ getRoutingPath: () => "/:id";
68
+ };
69
+ };
70
+ //# sourceMappingURL=run.route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.route.d.ts","sourceRoot":"","sources":["../../../../../../../../src/api/modules/admin/advanced/cron/routes/run.route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GvB,CAAC"}
@@ -0,0 +1,95 @@
1
+ import { eq } from "drizzle-orm";
2
+ import { z } from "zod";
3
+ import { buildRoute } from "../../../../../lib/route.js";
4
+ import { CONFIG_PLUGIN } from "../../../../../../config.js";
5
+ import { core_cron } from "../../../../../../database/cron.js";
6
+ import { getNextCronRunDate } from "../../../../../../lib/api/get-next-cron-run-date.js";
7
+ export const runCronRoute = buildRoute({
8
+ pluginId: CONFIG_PLUGIN.pluginId,
9
+ route: {
10
+ method: "post",
11
+ description: "Run a specific cron job",
12
+ path: "/{id}",
13
+ request: {
14
+ params: z.object({
15
+ id: z.string()
16
+ })
17
+ },
18
+ responses: {
19
+ 201: {
20
+ content: {
21
+ "application/json": {
22
+ schema: z.object({
23
+ message: z.string().optional(),
24
+ error: z.string().optional()
25
+ })
26
+ }
27
+ },
28
+ description: "Cron job executed successfully"
29
+ },
30
+ 404: {
31
+ content: {
32
+ "application/json": {
33
+ schema: z.object({
34
+ message: z.string().optional(),
35
+ error: z.string().optional()
36
+ })
37
+ }
38
+ },
39
+ description: "Cron job not found"
40
+ },
41
+ 500: {
42
+ content: {
43
+ "application/json": {
44
+ schema: z.object({
45
+ message: z.string().optional(),
46
+ error: z.string().optional()
47
+ })
48
+ }
49
+ },
50
+ description: "Internal server error"
51
+ }
52
+ }
53
+ },
54
+ handler: async (c)=>{
55
+ const db = c.get("db");
56
+ const cronJobs = c.get("core").cron;
57
+ const param = c.req.valid("param");
58
+ try {
59
+ const cronFromDb = await db.select().from(core_cron).where(eq(core_cron.id, +param.id)).limit(1);
60
+ if (cronFromDb.length === 0) {
61
+ return c.json({
62
+ error: "Cron job not found"
63
+ }, 404);
64
+ }
65
+ const dbCron = cronFromDb[0];
66
+ const job = cronJobs.find((j)=>j.name === dbCron.name && j.pluginId === dbCron.pluginId && j.module === dbCron.module);
67
+ if (!job) {
68
+ return c.json({
69
+ error: "Cron job configuration not found"
70
+ }, 404);
71
+ }
72
+ const now = new Date();
73
+ try {
74
+ await job.handler(c);
75
+ await db.update(core_cron).set({
76
+ lastRun: now,
77
+ nextRun: getNextCronRunDate(job.schedule, now)
78
+ }).where(eq(core_cron.id, dbCron.id));
79
+ return c.json({
80
+ message: "Cron job executed successfully"
81
+ }, 201);
82
+ } catch (error) {
83
+ await c.get("log").error(`Error executing cron job: ${error}`);
84
+ return c.json({
85
+ error: "Failed to execute cron job"
86
+ }, 500);
87
+ }
88
+ } catch (error) {
89
+ await c.get("log").error(`Error running cron job: ${error}`);
90
+ return c.json({
91
+ error: "Internal server error"
92
+ }, 500);
93
+ }
94
+ }
95
+ });
@@ -2,7 +2,7 @@ import { CONFIG_PLUGIN } from "../../../../config.js";
2
2
  import { buildModule } from "../../../lib/module.js";
3
3
  import { logsDebugAdminRoute } from "./routes/logs.route.js";
4
4
  export const debugAdminModule = buildModule({
5
- ...CONFIG_PLUGIN,
5
+ pluginId: CONFIG_PLUGIN.pluginId,
6
6
  name: "debug",
7
7
  routes: [
8
8
  logsDebugAdminRoute
@@ -6,7 +6,7 @@ import { core_users } from "../../../../../database/users.js";
6
6
  import { buildRoute } from "../../../../lib/route.js";
7
7
  import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../../../../lib/with-pagination.js";
8
8
  export const logsDebugAdminRoute = buildRoute({
9
- ...CONFIG_PLUGIN,
9
+ pluginId: CONFIG_PLUGIN.pluginId,
10
10
  route: {
11
11
  method: "get",
12
12
  description: "Get Admin Debug Logs",
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  import { buildRoute } from "../../../lib/route.js";
4
4
  import { CONFIG_PLUGIN } from "../../../../config.js";
5
5
  export const sessionAdminRoute = buildRoute({
6
- ...CONFIG_PLUGIN,
6
+ pluginId: CONFIG_PLUGIN.pluginId,
7
7
  route: {
8
8
  method: "get",
9
9
  description: "Verify admin session",
@@ -4,7 +4,7 @@ import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../..
4
4
  import { CONFIG_PLUGIN } from "../../../../../config.js";
5
5
  import { core_users } from "../../../../../database/users.js";
6
6
  export const listUsersAdminRoute = buildRoute({
7
- ...CONFIG_PLUGIN,
7
+ pluginId: CONFIG_PLUGIN.pluginId,
8
8
  route: {
9
9
  method: "get",
10
10
  description: "Get list of all users",
@@ -7,7 +7,7 @@ export declare const usersAdminRoute: {
7
7
  first?: string | undefined;
8
8
  last?: string | undefined;
9
9
  order?: "asc" | "desc" | undefined;
10
- orderBy?: "email" | "id" | "name" | "createdAt" | undefined;
10
+ orderBy?: "id" | "email" | "name" | "createdAt" | undefined;
11
11
  };
12
12
  };
13
13
  out: {
@@ -16,7 +16,7 @@ export declare const usersAdminRoute: {
16
16
  first?: string | undefined;
17
17
  last?: string | undefined;
18
18
  order?: "asc" | "desc" | undefined;
19
- orderBy?: "email" | "id" | "name" | "createdAt" | undefined;
19
+ orderBy?: "id" | "email" | "name" | "createdAt" | undefined;
20
20
  };
21
21
  };
22
22
  }>) => Promise<Response & import("hono").TypedResponse<{
@@ -57,8 +57,8 @@ export declare const usersAdminRoute: {
57
57
  desc: "desc";
58
58
  }>>;
59
59
  orderBy: z.ZodOptional<z.ZodEnum<{
60
- email: "email";
61
60
  id: "id";
61
+ email: "email";
62
62
  name: "name";
63
63
  createdAt: "createdAt";
64
64
  }>>;
@@ -4,7 +4,7 @@ import { withPagination, zodPaginationPageInfo, zodPaginationQuery } from "../..
4
4
  import { CONFIG_PLUGIN } from "../../../../../config.js";
5
5
  import { core_users } from "../../../../../database/users.js";
6
6
  export const usersAdminRoute = buildRoute({
7
- ...CONFIG_PLUGIN,
7
+ pluginId: CONFIG_PLUGIN.pluginId,
8
8
  route: {
9
9
  method: "get",
10
10
  description: "Get list of all users (Admin only)",
@@ -2,7 +2,7 @@ import { buildModule } from "../../../lib/module.js";
2
2
  import { CONFIG_PLUGIN } from "../../../../config.js";
3
3
  import { listUsersAdminRoute } from "./routes/list.route.js";
4
4
  export const usersAdminModule = buildModule({
5
- ...CONFIG_PLUGIN,
5
+ pluginId: CONFIG_PLUGIN.pluginId,
6
6
  name: "users",
7
7
  routes: [
8
8
  listUsersAdminRoute
@@ -0,0 +1,2 @@
1
+ export declare const cleanCron: import("../../../../api/lib/cron").BuildCronReturn;
2
+ //# sourceMappingURL=clean.cron.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clean.cron.d.ts","sourceRoot":"","sources":["../../../../../../src/api/modules/cron/cron/clean.cron.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,0CA0BpB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { lt } from "drizzle-orm";
2
+ import { buildCron } from "../../../lib/cron.js";
3
+ import { core_admin_sessions } from "../../../../database/admins.js";
4
+ import { core_sessions } from "../../../../database/sessions.js";
5
+ import { core_users_forgot_password } from "../../../../database/users.js";
6
+ export const cleanCron = buildCron({
7
+ name: "clean",
8
+ description: "Clean up expired sessions and tokens",
9
+ // Run every 1 hour
10
+ schedule: "0 * * * *",
11
+ handler: async (c)=>{
12
+ await c.get("db").transaction(async (tx)=>{
13
+ // Delete expired sessions
14
+ await tx.delete(core_sessions).where(lt(core_sessions.expiresAt, new Date()));
15
+ await tx.delete(core_admin_sessions).where(lt(core_admin_sessions.expiresAt, new Date()));
16
+ // Delete expired forgot password tokens
17
+ await tx.delete(core_users_forgot_password).where(lt(core_users_forgot_password.expiresAt, new Date()));
18
+ // // Delete expired email confirmation tokens
19
+ // await tx
20
+ // .delete(core_users_confirm_emails)
21
+ // .where(lt(core_users_confirm_emails.expiresAt, new Date()));
22
+ });
23
+ }
24
+ });