@vitnode/core 1.2.0-canary.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/dist/emails/my-email.d.ts +2 -0
- package/dist/emails/my-email.d.ts.map +1 -0
- package/dist/scripts/get-config.d.ts +3 -0
- package/dist/scripts/get-config.d.ts.map +1 -0
- package/dist/scripts/plugin.d.ts +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -0
- package/dist/scripts/prepare-database.d.ts +7 -0
- package/dist/scripts/prepare-database.d.ts.map +1 -0
- package/dist/scripts/prepare-plugins-files.d.ts +2 -0
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
- package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
- package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
- package/dist/scripts/scripts.d.ts +3 -0
- package/dist/scripts/scripts.d.ts.map +1 -0
- package/dist/scripts/scripts.js +21 -0
- package/dist/scripts/shared/file-utils.d.ts +14 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -0
- package/dist/src/api/config.d.ts +24 -0
- package/dist/src/api/config.d.ts.map +1 -0
- package/dist/src/api/config.js +50 -0
- package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
- package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
- package/dist/src/api/lib/check-plugin-id.js +15 -0
- package/dist/src/api/lib/get-user-ip.d.ts +3 -0
- package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
- package/dist/src/api/lib/get-user-ip.js +8 -0
- package/dist/src/api/lib/module.d.ts +23 -0
- package/dist/src/api/lib/module.d.ts.map +1 -0
- package/dist/src/api/lib/module.js +21 -0
- package/dist/src/api/lib/plugin.d.ts +11 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -0
- package/dist/src/api/lib/plugin.js +14 -0
- package/dist/src/api/lib/route.d.ts +26 -0
- package/dist/src/api/lib/route.d.ts.map +1 -0
- package/dist/src/api/lib/route.js +23 -0
- package/dist/src/api/lib/with-pagination.d.ts +72 -0
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
- package/dist/src/api/lib/with-pagination.js +70 -0
- package/dist/src/api/middlewares/global/global.d.ts +66 -0
- package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
- package/dist/src/api/middlewares/global/global.js +47 -0
- package/dist/src/api/models/device.d.ts +10 -0
- package/dist/src/api/models/device.d.ts.map +1 -0
- package/dist/src/api/models/device.js +54 -0
- package/dist/src/api/models/email.d.ts +22 -0
- package/dist/src/api/models/email.d.ts.map +1 -0
- package/dist/src/api/models/email.js +30 -0
- package/dist/src/api/models/password.d.ts +5 -0
- package/dist/src/api/models/password.d.ts.map +1 -0
- package/dist/src/api/models/password.js +21 -0
- package/dist/src/api/models/session-admin.d.ts +24 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -0
- package/dist/src/api/models/session-admin.js +73 -0
- package/dist/src/api/models/session.d.ts +23 -0
- package/dist/src/api/models/session.d.ts.map +1 -0
- package/dist/src/api/models/session.js +60 -0
- package/dist/src/api/models/sso.d.ts +38 -0
- package/dist/src/api/models/sso.d.ts.map +1 -0
- package/dist/src/api/models/sso.js +120 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
- package/dist/src/api/models/user/get-user-by-id.js +18 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
- package/dist/src/api/models/user/sign-up.d.ts +21 -0
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-up.js +75 -0
- package/dist/src/api/models/user.d.ts +45 -0
- package/dist/src/api/models/user.d.ts.map +1 -0
- package/dist/src/api/models/user.js +8 -0
- package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +14 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/routes/session.route.js +51 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/middleware.module.js +10 -0
- package/dist/src/api/modules/middleware/route.d.ts +53 -0
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/route.js +39 -0
- package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
- package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
- package/dist/src/api/modules/users/avatar-color.js +43 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/session.route.js +46 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/test.route.js +32 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/sso.module.js +12 -0
- package/dist/src/api/modules/users/users.module.d.ts +439 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/users.module.js +22 -0
- package/dist/src/api/plugin.d.ts +2 -0
- package/dist/src/api/plugin.d.ts.map +1 -0
- package/dist/src/api/plugin.js +13 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/plugins/email/nodemailer.js +30 -0
- package/dist/src/api/plugins/email/resend.d.ts +6 -0
- package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
- package/dist/src/api/plugins/email/resend.js +21 -0
- package/dist/src/api/plugins/sso/discord.d.ts +6 -0
- package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/discord.js +77 -0
- package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
- package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/facebook.js +76 -0
- package/dist/src/api/plugins/sso/google.d.ts +6 -0
- package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/google.js +87 -0
- package/dist/src/app/login/page.d.ts +6 -0
- package/dist/src/app/login/page.d.ts.map +1 -0
- package/dist/src/app/login/page.js +15 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
- package/dist/src/app/login/sso/[providerId]/page.js +10 -0
- package/dist/src/app/register/page.d.ts +6 -0
- package/dist/src/app/register/page.d.ts.map +1 -0
- package/dist/src/app/register/page.js +15 -0
- package/dist/src/app_admin/core/page.d.ts +2 -0
- package/dist/src/app_admin/core/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/page.js +5 -0
- package/dist/src/app_admin/core/test/page.d.ts +2 -0
- package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/test/page.js +5 -0
- package/dist/src/app_admin/core/users/page.d.ts +6 -0
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/users/page.js +35 -0
- package/dist/src/components/avatar.d.ts +10 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/avatar.js +14 -0
- package/dist/src/components/date-format.d.ts +5 -0
- package/dist/src/components/date-format.d.ts.map +1 -0
- package/dist/src/components/date-format.js +38 -0
- package/dist/src/components/form/auto-form.d.ts +12 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -0
- package/dist/src/components/form/auto-form.js +57 -0
- package/dist/src/components/form/common/desc.d.ts +2 -0
- package/dist/src/components/form/common/desc.d.ts.map +1 -0
- package/dist/src/components/form/common/desc.js +9 -0
- package/dist/src/components/form/common/label.d.ts +3 -0
- package/dist/src/components/form/common/label.d.ts.map +1 -0
- package/dist/src/components/form/common/label.js +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
- package/dist/src/components/form/fields/checkbox.js +35 -0
- package/dist/src/components/form/fields/combobox.d.ts +14 -0
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
- package/dist/src/components/form/fields/combobox.js +88 -0
- package/dist/src/components/form/fields/input.d.ts +9 -0
- package/dist/src/components/form/fields/input.d.ts.map +1 -0
- package/dist/src/components/form/fields/input.js +34 -0
- package/dist/src/components/form/fields/item.d.ts +14 -0
- package/dist/src/components/form/fields/item.d.ts.map +1 -0
- package/dist/src/components/form/fields/item.js +22 -0
- package/dist/src/components/form/fields/radio-group.d.ts +13 -0
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
- package/dist/src/components/form/fields/radio-group.js +51 -0
- package/dist/src/components/form/fields/select.d.ts +14 -0
- package/dist/src/components/form/fields/select.d.ts.map +1 -0
- package/dist/src/components/form/fields/select.js +59 -0
- package/dist/src/components/form/fields/switch.d.ts +8 -0
- package/dist/src/components/form/fields/switch.d.ts.map +1 -0
- package/dist/src/components/form/fields/switch.js +35 -0
- package/dist/src/components/form/fields/textarea.d.ts +9 -0
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
- package/dist/src/components/form/fields/textarea.js +34 -0
- package/dist/src/components/i18n-provider.d.ts +7 -0
- package/dist/src/components/i18n-provider.d.ts.map +1 -0
- package/dist/src/components/i18n-provider.js +43 -0
- package/dist/src/components/logo-vitnode.d.ts +4 -0
- package/dist/src/components/logo-vitnode.d.ts.map +1 -0
- package/dist/src/components/logo-vitnode.js +113 -0
- package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
- package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/theme-switcher.js +25 -0
- package/dist/src/components/table/content.d.ts +3 -0
- package/dist/src/components/table/content.d.ts.map +1 -0
- package/dist/src/components/table/content.js +84 -0
- package/dist/src/components/table/data-table.d.ts +37 -0
- package/dist/src/components/table/data-table.d.ts.map +1 -0
- package/dist/src/components/table/data-table.js +69 -0
- package/dist/src/components/table/order-table-head.d.ts +7 -0
- package/dist/src/components/table/order-table-head.d.ts.map +1 -0
- package/dist/src/components/table/order-table-head.js +39 -0
- package/dist/src/components/table/pagination.d.ts +11 -0
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/src/components/table/pagination.js +122 -0
- package/dist/src/components/ui/accordion.d.ts +8 -0
- package/dist/src/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/components/ui/accordion.js +47 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +86 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +40 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +29 -0
- package/dist/src/components/ui/button.d.ts +13 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +66 -0
- package/dist/src/components/ui/card.d.ts +10 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +53 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +22 -0
- package/dist/src/components/ui/command.d.ts +19 -0
- package/dist/src/components/ui/command.d.ts.map +1 -0
- package/dist/src/components/ui/command.js +99 -0
- package/dist/src/components/ui/context-menu.d.ts +26 -0
- package/dist/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/components/ui/context-menu.js +141 -0
- package/dist/src/components/ui/dialog.d.ts +23 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +181 -0
- package/dist/src/components/ui/drawer.d.ts +14 -0
- package/dist/src/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/components/ui/drawer.js +84 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +142 -0
- package/dist/src/components/ui/form.d.ts +33 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +142 -0
- package/dist/src/components/ui/header-content.d.ts +17 -0
- package/dist/src/components/ui/header-content.d.ts.map +1 -0
- package/dist/src/components/ui/header-content.js +30 -0
- package/dist/src/components/ui/hover-card.d.ts +7 -0
- package/dist/src/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/components/ui/hover-card.js +30 -0
- package/dist/src/components/ui/input-otp.d.ts +12 -0
- package/dist/src/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/components/ui/input-otp.js +49 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +12 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +13 -0
- package/dist/src/components/ui/loader.d.ts +5 -0
- package/dist/src/components/ui/loader.d.ts.map +1 -0
- package/dist/src/components/ui/loader.js +16 -0
- package/dist/src/components/ui/menubar.d.ts +27 -0
- package/dist/src/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/components/ui/menubar.js +152 -0
- package/dist/src/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/components/ui/navigation-menu.js +83 -0
- package/dist/src/components/ui/popover.d.ts +8 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/popover.js +35 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.d.ts +6 -0
- package/dist/src/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/components/ui/radio-group.js +28 -0
- package/dist/src/components/ui/select.d.ts +16 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +114 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +15 -0
- package/dist/src/components/ui/sheet.d.ts +14 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +93 -0
- package/dist/src/components/ui/sidebar.d.ts +70 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +437 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +10 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +42 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +26 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +17 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +64 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +34 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +11 -0
- package/dist/src/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/components/ui/toggle-group.js +41 -0
- package/dist/src/components/ui/toggle.d.ts +10 -0
- package/dist/src/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/components/ui/toggle.js +35 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +43 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts +1 -0
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +1 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +4 -0
- package/dist/src/database/admins.d.ts +246 -0
- package/dist/src/database/admins.d.ts.map +1 -0
- package/dist/src/database/admins.js +74 -0
- package/dist/src/database/languages.d.ts +321 -0
- package/dist/src/database/languages.d.ts.map +1 -0
- package/dist/src/database/languages.js +52 -0
- package/dist/src/database/moderators.d.ts +114 -0
- package/dist/src/database/moderators.d.ts.map +1 -0
- package/dist/src/database/moderators.js +37 -0
- package/dist/src/database/roles.d.ts +146 -0
- package/dist/src/database/roles.d.ts.map +1 -0
- package/dist/src/database/roles.js +13 -0
- package/dist/src/database/sessions.d.ts +196 -0
- package/dist/src/database/sessions.d.ts.map +1 -0
- package/dist/src/database/sessions.js +57 -0
- package/dist/src/database/users.d.ts +562 -0
- package/dist/src/database/users.d.ts.map +1 -0
- package/dist/src/database/users.js +142 -0
- package/dist/src/drizzle.config.d.ts +6 -0
- package/dist/src/drizzle.config.d.ts.map +1 -0
- package/dist/src/drizzle.config.js +37 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts +1 -0
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.d.ts +2 -0
- package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.js +30 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts +1 -0
- package/dist/src/hooks/use-unsaved-changes.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
- package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.js +13 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-admin-api.js +19 -0
- package/dist/src/lib/api/get-session-api.d.ts +17 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-api.js +14 -0
- package/dist/src/lib/colors.d.ts +23 -0
- package/dist/src/lib/colors.d.ts.map +1 -0
- package/dist/src/lib/colors.js +131 -0
- package/dist/src/lib/colors.test.d.ts +2 -0
- package/dist/src/lib/colors.test.d.ts.map +1 -0
- package/dist/src/lib/colors.test.js +173 -0
- package/dist/src/lib/config.d.ts +6 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +15 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
- package/dist/src/lib/fetcher/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.d.ts +3 -0
- package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.js +33 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.test.js +37 -0
- package/dist/src/lib/fetcher/index.d.ts +34 -0
- package/dist/src/lib/fetcher/index.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.d.ts +120 -0
- package/dist/src/lib/fetcher/types.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.js +1 -0
- package/dist/src/lib/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher.js +47 -0
- package/dist/src/lib/helpers/auto-form.d.ts +10 -0
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.js +82 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.test.js +126 -0
- package/dist/src/lib/navigation.d.ts +339 -0
- package/dist/src/lib/navigation.d.ts.map +1 -0
- package/dist/src/lib/navigation.js +11 -0
- package/dist/src/lib/plugin.d.ts +15 -0
- package/dist/src/lib/plugin.d.ts.map +1 -0
- package/dist/src/lib/plugin.js +3 -0
- package/dist/src/lib/special-characters.d.ts +3 -0
- package/dist/src/lib/special-characters.d.ts.map +1 -0
- package/dist/src/lib/special-characters.js +4 -0
- package/dist/src/lib/special-characters.test.d.ts +2 -0
- package/dist/src/lib/special-characters.test.d.ts.map +1 -0
- package/dist/src/lib/special-characters.test.js +56 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/tests/setup.d.ts +2 -0
- package/dist/src/tests/setup.d.ts.map +1 -0
- package/dist/src/tests/setup.js +6 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/admin-layout.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
- package/dist/src/views/admin/views/core/test.d.ts +2 -0
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/test.js +146 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
- package/dist/src/views/auth/components/password-input.d.ts +4 -0
- package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/components/password-input.js +89 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/form.js +59 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/form.js +88 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/client.js +22 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/client.js +39 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
- package/dist/src/views/error/back-button.d.ts +5 -0
- package/dist/src/views/error/back-button.d.ts.map +1 -0
- package/dist/src/views/error/back-button.js +14 -0
- package/dist/src/views/error/error-view.d.ts +5 -0
- package/dist/src/views/error/error-view.d.ts.map +1 -0
- package/dist/src/views/error/error-view.js +56 -0
- package/dist/src/views/error/global-error-view.d.ts +6 -0
- package/dist/src/views/error/global-error-view.d.ts.map +1 -0
- package/dist/src/views/error/global-error-view.js +57 -0
- package/dist/src/views/layouts/provider.d.ts +11 -0
- package/dist/src/views/layouts/provider.d.ts.map +1 -0
- package/dist/src/views/layouts/provider.js +43 -0
- package/dist/src/views/layouts/root-layout.d.ts +16 -0
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
- package/dist/src/views/layouts/root-layout.js +38 -0
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/header.js +32 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/user.js +34 -0
- package/dist/src/views/layouts/theme/layout.d.ts +5 -0
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/layout.js +15 -0
- package/dist/src/vitnode.config.d.ts +50 -0
- package/dist/src/vitnode.config.d.ts.map +1 -0
- package/dist/src/vitnode.config.js +39 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +94 -0
- package/src/app/login/page.tsx +21 -0
- package/src/app/login/sso/[providerId]/page.tsx +19 -0
- package/src/app/register/page.tsx +21 -0
- package/src/app_admin/core/page.tsx +5 -0
- package/src/app_admin/core/test/page.tsx +5 -0
- package/src/app_admin/core/users/page.tsx +35 -0
- package/src/database/admins.ts +87 -0
- package/src/database/languages.ts +54 -0
- package/src/database/moderators.ts +42 -0
- package/src/database/roles.ts +15 -0
- package/src/database/sessions.ts +59 -0
- package/src/database/users.ts +142 -0
- package/src/locales/en.json +156 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("tsup").Options | import("tsup").Options[] | ((overrideOptions: import("tsup").Options) => import("tsup").Options | import("tsup").Options[] | Promise<import("tsup").Options | import("tsup").Options[]>);
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=tsup.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsup.config.d.ts","sourceRoot":"","sources":["../tsup.config.ts"],"names":[],"mappings":";AAEA,wBAgBG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAKA,wBA8BG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vitnode/core",
|
|
3
|
+
"version": "1.2.0-canary.10",
|
|
4
|
+
"devDependencies": {
|
|
5
|
+
"@hono/swagger-ui": "^0.5.1",
|
|
6
|
+
"@hono/zod-openapi": "^0.19.8",
|
|
7
|
+
"@hono/zod-validator": "^0.7.0",
|
|
8
|
+
"@hookform/resolvers": "^5.1.0",
|
|
9
|
+
"@react-email/components": "0.0.41",
|
|
10
|
+
"@swc/cli": "0.6.0",
|
|
11
|
+
"@swc/core": "^1.11.31",
|
|
12
|
+
"@testing-library/dom": "^10.4.0",
|
|
13
|
+
"@testing-library/react": "^16.3.0",
|
|
14
|
+
"@types/node": "^22.15.30",
|
|
15
|
+
"@types/nodemailer": "^6.4.17",
|
|
16
|
+
"@types/react": "^19.1.6",
|
|
17
|
+
"@types/react-dom": "^19.1.6",
|
|
18
|
+
"@vitejs/plugin-react": "^4.5.1",
|
|
19
|
+
"@vitest/coverage-v8": "^3.2.2",
|
|
20
|
+
"chokidar": "^4.0.3",
|
|
21
|
+
"concurrently": "^9.1.2",
|
|
22
|
+
"dotenv": "^16.5.0",
|
|
23
|
+
"drizzle-kit": "^0.31.1",
|
|
24
|
+
"drizzle-orm": "^0.44.2",
|
|
25
|
+
"eslint": "^9.28.0",
|
|
26
|
+
"hono": "^4.7.11",
|
|
27
|
+
"jsdom": "^26.1.0",
|
|
28
|
+
"lucide-react": "^0.513.0",
|
|
29
|
+
"next": "^15.3.3",
|
|
30
|
+
"next-intl": "^4.1.0",
|
|
31
|
+
"react": "^19.1.0",
|
|
32
|
+
"react-dom": "^19.1.0",
|
|
33
|
+
"react-email": "^4.0.16",
|
|
34
|
+
"react-hook-form": "^7.57.0",
|
|
35
|
+
"sonner": "^2.0.5",
|
|
36
|
+
"tailwindcss": "^4.1.8",
|
|
37
|
+
"tsc-alias": "^1.8.16",
|
|
38
|
+
"tsup": "^8.5.0",
|
|
39
|
+
"tsx": "^4.19.4",
|
|
40
|
+
"tw-animate-css": "^1.3.4",
|
|
41
|
+
"typescript": "^5.8.3",
|
|
42
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
43
|
+
"vitest": "^3.2.2",
|
|
44
|
+
"zod": "^3.25.56",
|
|
45
|
+
"eslint-config-typescript-vitnode": "1.2.0-canary.10"
|
|
46
|
+
},
|
|
47
|
+
"bin": {
|
|
48
|
+
"vitnode": "./dist/scripts/scripts.js"
|
|
49
|
+
},
|
|
50
|
+
"exports": {
|
|
51
|
+
"./api/config": {
|
|
52
|
+
"import": "./dist/src/api/config.js",
|
|
53
|
+
"types": "./dist/src/api/config.d.ts",
|
|
54
|
+
"default": "./dist/src/api/config.js"
|
|
55
|
+
},
|
|
56
|
+
"./*": {
|
|
57
|
+
"import": "./dist/src/*.js",
|
|
58
|
+
"types": "./dist/src/*.d.ts",
|
|
59
|
+
"default": "./dist/src/*.js"
|
|
60
|
+
},
|
|
61
|
+
"./config/next.config": "./config/next.config.ts",
|
|
62
|
+
"./locales/en.json": "./src/locales/en.json"
|
|
63
|
+
},
|
|
64
|
+
"type": "module",
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@dnd-kit/core": "^6.3.1",
|
|
67
|
+
"@tanstack/react-query": "^5.80.6",
|
|
68
|
+
"cache-manager": "^6.4.3",
|
|
69
|
+
"class-variance-authority": "^0.7.1",
|
|
70
|
+
"clsx": "^2.1.1",
|
|
71
|
+
"cmdk": "^1.1.1",
|
|
72
|
+
"input-otp": "^1.4.2",
|
|
73
|
+
"next-themes": "^0.4.6",
|
|
74
|
+
"nodemailer": "^7.0.3",
|
|
75
|
+
"postgres": "^3.4.7",
|
|
76
|
+
"radix-ui": "^1.4.2",
|
|
77
|
+
"react-scan": "^0.3.4",
|
|
78
|
+
"resend": "^4.5.2",
|
|
79
|
+
"tailwind-merge": "^3.3.0",
|
|
80
|
+
"vaul": "^1.1.2"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build:scripts": "tsup",
|
|
84
|
+
"start:scripts": "node dist/scripts/scripts.js plugin --w",
|
|
85
|
+
"build:plugins": "tsc && swc src -d dist --config-file .swcrc && tsc-alias -p tsconfig.json",
|
|
86
|
+
"dev": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\" \"tsc-alias -w\" \"node dist/scripts/scripts.js plugin --w\"",
|
|
87
|
+
"dev:email": "email dev",
|
|
88
|
+
"lint": "eslint .",
|
|
89
|
+
"lint:fix": "eslint . --fix",
|
|
90
|
+
"test": "vitest run",
|
|
91
|
+
"test:watch": "vitest",
|
|
92
|
+
"test:coverage": "vitest run --coverage"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Metadata } from 'next/dist/types';
|
|
2
|
+
|
|
3
|
+
import { getTranslations } from 'next-intl/server';
|
|
4
|
+
|
|
5
|
+
import { SignInView } from '../../views/auth/sign-in/sign-in-view';
|
|
6
|
+
|
|
7
|
+
export const generateMetadata = async ({
|
|
8
|
+
locale,
|
|
9
|
+
}: {
|
|
10
|
+
locale: string;
|
|
11
|
+
}): Promise<Metadata> => {
|
|
12
|
+
const t = await getTranslations({ locale, namespace: 'core.global' });
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
title: t('login'),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function Page() {
|
|
20
|
+
return <SignInView />;
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CallbackSSOView } from '@/views/auth/sso/callback/callback-sso-view';
|
|
2
|
+
|
|
3
|
+
export default async function Page({
|
|
4
|
+
params,
|
|
5
|
+
searchParams,
|
|
6
|
+
}: {
|
|
7
|
+
params: Promise<{ providerId: string }>;
|
|
8
|
+
searchParams: Promise<Record<string, string>>;
|
|
9
|
+
}) {
|
|
10
|
+
const { providerId } = await params;
|
|
11
|
+
const currentSearchParams = await searchParams;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<CallbackSSOView
|
|
15
|
+
providerId={providerId}
|
|
16
|
+
searchParams={currentSearchParams}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Metadata } from 'next/dist/types';
|
|
2
|
+
|
|
3
|
+
import { getTranslations } from 'next-intl/server';
|
|
4
|
+
|
|
5
|
+
import { SignUpView } from '../../views/auth/sign-up/sign-up-view';
|
|
6
|
+
|
|
7
|
+
export const generateMetadata = async ({
|
|
8
|
+
locale,
|
|
9
|
+
}: {
|
|
10
|
+
locale: string;
|
|
11
|
+
}): Promise<Metadata> => {
|
|
12
|
+
const t = await getTranslations({ locale, namespace: 'core.global' });
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
title: t('register'),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function Page() {
|
|
20
|
+
return <SignUpView />;
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Metadata } from 'next/dist/types';
|
|
2
|
+
|
|
3
|
+
import { getTranslations } from 'next-intl/server';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { DataTableSkeleton } from '@/components/table/data-table';
|
|
7
|
+
import { HeaderContent } from '@/components/ui/header-content';
|
|
8
|
+
import { UsersAdminView } from '@/views/admin/views/core/users/users-admin-view';
|
|
9
|
+
|
|
10
|
+
export const generateMetadata = async (): Promise<Metadata> => {
|
|
11
|
+
const t = await getTranslations('admin.global.nav.users');
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
title: t('list'),
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default async function Page(
|
|
19
|
+
props: React.ComponentProps<typeof UsersAdminView>,
|
|
20
|
+
) {
|
|
21
|
+
const [t, tNav] = await Promise.all([
|
|
22
|
+
getTranslations('admin.user.list'),
|
|
23
|
+
getTranslations('admin.global.nav.users'),
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="container mx-auto p-4">
|
|
28
|
+
<HeaderContent desc={t('desc')} h1={tNav('list')} />
|
|
29
|
+
|
|
30
|
+
<React.Suspense fallback={<DataTableSkeleton columns={2} />}>
|
|
31
|
+
<UsersAdminView {...props} />
|
|
32
|
+
</React.Suspense>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { index, pgTable } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
import { core_roles } from './roles';
|
|
5
|
+
import { core_sessions_known_devices } from './sessions';
|
|
6
|
+
import { core_users } from './users';
|
|
7
|
+
|
|
8
|
+
export const core_admin_permissions = pgTable(
|
|
9
|
+
'core_admin_permissions',
|
|
10
|
+
t => ({
|
|
11
|
+
id: t.serial().primaryKey(),
|
|
12
|
+
roleId: t.integer().references(() => core_roles.id, {
|
|
13
|
+
onDelete: 'cascade',
|
|
14
|
+
}),
|
|
15
|
+
userId: t.integer().references(() => core_users.id, {
|
|
16
|
+
onDelete: 'cascade',
|
|
17
|
+
}),
|
|
18
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
19
|
+
updatedAt: t
|
|
20
|
+
.timestamp()
|
|
21
|
+
.notNull()
|
|
22
|
+
.$onUpdate(() => new Date()),
|
|
23
|
+
protected: t.boolean().notNull().default(false),
|
|
24
|
+
// data: t.jsonb().$type<{ permissions: PermissionsStaffArgs[] }>().default({
|
|
25
|
+
// permissions: [],
|
|
26
|
+
// }),
|
|
27
|
+
}),
|
|
28
|
+
t => [
|
|
29
|
+
index('core_admin_permissions_role_id_idx').on(t.roleId),
|
|
30
|
+
index('core_admin_permissions_user_id_idx').on(t.userId),
|
|
31
|
+
],
|
|
32
|
+
).enableRLS();
|
|
33
|
+
|
|
34
|
+
export const core_admin_permissions_relations = relations(
|
|
35
|
+
core_admin_permissions,
|
|
36
|
+
({ one }) => ({
|
|
37
|
+
group: one(core_roles, {
|
|
38
|
+
fields: [core_admin_permissions.roleId],
|
|
39
|
+
references: [core_roles.id],
|
|
40
|
+
}),
|
|
41
|
+
user: one(core_users, {
|
|
42
|
+
fields: [core_admin_permissions.userId],
|
|
43
|
+
references: [core_users.id],
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export const core_admin_sessions = pgTable(
|
|
49
|
+
'core_admin_sessions',
|
|
50
|
+
t => ({
|
|
51
|
+
id: t.serial().primaryKey(),
|
|
52
|
+
token: t.varchar({ length: 255 }).notNull().unique(),
|
|
53
|
+
userId: t
|
|
54
|
+
.integer()
|
|
55
|
+
.notNull()
|
|
56
|
+
.references(() => core_users.id, {
|
|
57
|
+
onDelete: 'cascade',
|
|
58
|
+
}),
|
|
59
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
60
|
+
lastSeen: t.timestamp().notNull().defaultNow(),
|
|
61
|
+
expiresAt: t.timestamp().notNull(),
|
|
62
|
+
deviceId: t
|
|
63
|
+
.integer()
|
|
64
|
+
.references(() => core_sessions_known_devices.id, {
|
|
65
|
+
onDelete: 'cascade',
|
|
66
|
+
})
|
|
67
|
+
.notNull(),
|
|
68
|
+
}),
|
|
69
|
+
t => [
|
|
70
|
+
index('core_admin_sessions_token_idx').on(t.token),
|
|
71
|
+
index('core_admin_sessions_user_id_idx').on(t.userId),
|
|
72
|
+
],
|
|
73
|
+
).enableRLS();
|
|
74
|
+
|
|
75
|
+
export const core_admin_sessions_relations = relations(
|
|
76
|
+
core_admin_sessions,
|
|
77
|
+
({ one }) => ({
|
|
78
|
+
user: one(core_users, {
|
|
79
|
+
fields: [core_admin_sessions.userId],
|
|
80
|
+
references: [core_users.id],
|
|
81
|
+
}),
|
|
82
|
+
device: one(core_sessions_known_devices, {
|
|
83
|
+
fields: [core_admin_sessions.deviceId],
|
|
84
|
+
references: [core_sessions_known_devices.id],
|
|
85
|
+
}),
|
|
86
|
+
}),
|
|
87
|
+
);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { index, pgTable } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
export const core_languages = pgTable(
|
|
5
|
+
'core_languages',
|
|
6
|
+
t => ({
|
|
7
|
+
id: t.serial().primaryKey(),
|
|
8
|
+
code: t.varchar({ length: 32 }).notNull().unique(),
|
|
9
|
+
name: t.varchar({ length: 255 }).notNull(),
|
|
10
|
+
timezone: t.varchar({ length: 255 }).notNull().default('UTC'),
|
|
11
|
+
protected: t.boolean().notNull().default(false),
|
|
12
|
+
default: t.boolean().notNull().default(false),
|
|
13
|
+
enabled: t.boolean().notNull().default(true),
|
|
14
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
15
|
+
updatedAt: t
|
|
16
|
+
.timestamp()
|
|
17
|
+
.notNull()
|
|
18
|
+
.$onUpdate(() => new Date()),
|
|
19
|
+
time24: t.boolean().notNull().default(false),
|
|
20
|
+
}),
|
|
21
|
+
t => [
|
|
22
|
+
index('core_languages_code_idx').on(t.code),
|
|
23
|
+
index('core_languages_name_idx').on(t.name),
|
|
24
|
+
],
|
|
25
|
+
).enableRLS();
|
|
26
|
+
|
|
27
|
+
export const core_languages_words = pgTable(
|
|
28
|
+
'core_languages_words',
|
|
29
|
+
t => ({
|
|
30
|
+
id: t.serial().primaryKey(),
|
|
31
|
+
languageCode: t
|
|
32
|
+
.varchar()
|
|
33
|
+
.notNull()
|
|
34
|
+
.references(() => core_languages.code, {
|
|
35
|
+
onDelete: 'cascade',
|
|
36
|
+
}),
|
|
37
|
+
pluginCode: t.varchar({ length: 50 }).notNull(),
|
|
38
|
+
itemId: t.integer().notNull(),
|
|
39
|
+
value: t.text().notNull(),
|
|
40
|
+
tableName: t.varchar({ length: 255 }).notNull(),
|
|
41
|
+
variable: t.varchar({ length: 255 }).notNull(),
|
|
42
|
+
}),
|
|
43
|
+
t => [index('core_languages_words_lang_code_idx').on(t.languageCode)],
|
|
44
|
+
).enableRLS();
|
|
45
|
+
|
|
46
|
+
export const core_languages_words_relations = relations(
|
|
47
|
+
core_languages_words,
|
|
48
|
+
({ one }) => ({
|
|
49
|
+
language: one(core_languages, {
|
|
50
|
+
fields: [core_languages_words.languageCode],
|
|
51
|
+
references: [core_languages.code],
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { index, pgTable } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
import { core_roles } from './roles';
|
|
5
|
+
import { core_users } from './users';
|
|
6
|
+
|
|
7
|
+
export const core_moderators_permissions = pgTable(
|
|
8
|
+
'core_moderators_permissions',
|
|
9
|
+
t => ({
|
|
10
|
+
id: t.serial().primaryKey(),
|
|
11
|
+
roleId: t.integer().references(() => core_roles.id, {
|
|
12
|
+
onDelete: 'cascade',
|
|
13
|
+
}),
|
|
14
|
+
userId: t.integer().references(() => core_users.id, {
|
|
15
|
+
onDelete: 'cascade',
|
|
16
|
+
}),
|
|
17
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
18
|
+
updatedAt: t
|
|
19
|
+
.timestamp()
|
|
20
|
+
.notNull()
|
|
21
|
+
.$onUpdate(() => new Date()),
|
|
22
|
+
protected: t.boolean().notNull().default(false),
|
|
23
|
+
}),
|
|
24
|
+
t => [
|
|
25
|
+
index('core_moderators_permissions_role_id_idx').on(t.roleId),
|
|
26
|
+
index('core_moderators_permissions_user_id_idx').on(t.userId),
|
|
27
|
+
],
|
|
28
|
+
).enableRLS();
|
|
29
|
+
|
|
30
|
+
export const core_moderators_permissions_relations = relations(
|
|
31
|
+
core_moderators_permissions,
|
|
32
|
+
({ one }) => ({
|
|
33
|
+
group: one(core_roles, {
|
|
34
|
+
fields: [core_moderators_permissions.roleId],
|
|
35
|
+
references: [core_roles.id],
|
|
36
|
+
}),
|
|
37
|
+
user: one(core_users, {
|
|
38
|
+
fields: [core_moderators_permissions.userId],
|
|
39
|
+
references: [core_users.id],
|
|
40
|
+
}),
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { pgTable } from 'drizzle-orm/pg-core';
|
|
2
|
+
|
|
3
|
+
export const core_roles = pgTable('core_roles', t => ({
|
|
4
|
+
id: t.serial().primaryKey(),
|
|
5
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
6
|
+
updatedAt: t
|
|
7
|
+
.timestamp()
|
|
8
|
+
.notNull()
|
|
9
|
+
.$onUpdate(() => new Date()),
|
|
10
|
+
protected: t.boolean().notNull().default(false),
|
|
11
|
+
default: t.boolean().notNull().default(false),
|
|
12
|
+
root: t.boolean().notNull().default(false),
|
|
13
|
+
guest: t.boolean().notNull().default(false),
|
|
14
|
+
color: t.varchar({ length: 19 }),
|
|
15
|
+
})).enableRLS();
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { index, pgTable } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
import { core_users } from './users';
|
|
5
|
+
|
|
6
|
+
export const core_sessions = pgTable(
|
|
7
|
+
'core_sessions',
|
|
8
|
+
t => ({
|
|
9
|
+
id: t.serial().primaryKey(),
|
|
10
|
+
token: t.varchar({ length: 255 }).notNull().unique(),
|
|
11
|
+
userId: t
|
|
12
|
+
.integer()
|
|
13
|
+
.notNull()
|
|
14
|
+
.references(() => core_users.id, {
|
|
15
|
+
onDelete: 'cascade',
|
|
16
|
+
}),
|
|
17
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
18
|
+
expiresAt: t.timestamp().notNull(),
|
|
19
|
+
deviceId: t
|
|
20
|
+
.integer()
|
|
21
|
+
.references(() => core_sessions_known_devices.id, {
|
|
22
|
+
onDelete: 'cascade',
|
|
23
|
+
})
|
|
24
|
+
.notNull(),
|
|
25
|
+
}),
|
|
26
|
+
t => [index('core_sessions_user_id_idx').on(t.userId)],
|
|
27
|
+
).enableRLS();
|
|
28
|
+
|
|
29
|
+
export const core_sessions_relations = relations(core_sessions, ({ one }) => ({
|
|
30
|
+
user: one(core_users, {
|
|
31
|
+
fields: [core_sessions.userId],
|
|
32
|
+
references: [core_users.id],
|
|
33
|
+
}),
|
|
34
|
+
device: one(core_sessions_known_devices, {
|
|
35
|
+
fields: [core_sessions.deviceId],
|
|
36
|
+
references: [core_sessions_known_devices.id],
|
|
37
|
+
}),
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
export const core_sessions_known_devices = pgTable(
|
|
41
|
+
'core_sessions_known_devices',
|
|
42
|
+
t => ({
|
|
43
|
+
id: t.serial().primaryKey(),
|
|
44
|
+
ipAddress: t.varchar({ length: 40 }).notNull(),
|
|
45
|
+
userAgent: t.text().notNull(),
|
|
46
|
+
lastSeen: t.timestamp().notNull().defaultNow(),
|
|
47
|
+
}),
|
|
48
|
+
t => [index('core_sessions_known_devices_ip_address_idx').on(t.ipAddress)],
|
|
49
|
+
).enableRLS();
|
|
50
|
+
|
|
51
|
+
export const core_sessions_known_devices_relations = relations(
|
|
52
|
+
core_sessions_known_devices,
|
|
53
|
+
({ one }) => ({
|
|
54
|
+
session: one(core_sessions, {
|
|
55
|
+
fields: [core_sessions_known_devices.id],
|
|
56
|
+
references: [core_sessions.deviceId],
|
|
57
|
+
}),
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { index, pgTable } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
import { core_languages } from './languages';
|
|
5
|
+
import { core_roles } from './roles';
|
|
6
|
+
|
|
7
|
+
export const core_users = pgTable(
|
|
8
|
+
'core_users',
|
|
9
|
+
t => ({
|
|
10
|
+
id: t.serial().primaryKey(),
|
|
11
|
+
nameCode: t.varchar({ length: 255 }).notNull().unique(),
|
|
12
|
+
name: t.varchar({ length: 255 }).notNull().unique(),
|
|
13
|
+
email: t.varchar({ length: 255 }).notNull().unique(),
|
|
14
|
+
password: t.varchar(),
|
|
15
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
16
|
+
newsletter: t.boolean().notNull().default(false),
|
|
17
|
+
avatarColor: t.varchar({ length: 6 }).notNull(),
|
|
18
|
+
emailVerified: t.boolean().notNull().default(false),
|
|
19
|
+
roleId: t
|
|
20
|
+
.integer()
|
|
21
|
+
.references(() => core_roles.id)
|
|
22
|
+
.notNull(),
|
|
23
|
+
birthday: t.timestamp(),
|
|
24
|
+
ipAddress: t.varchar({ length: 40 }).notNull(),
|
|
25
|
+
language: t
|
|
26
|
+
.varchar({ length: 32 })
|
|
27
|
+
.notNull()
|
|
28
|
+
.default('en')
|
|
29
|
+
.references(() => core_languages.code, {
|
|
30
|
+
onDelete: 'set default',
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
t => [
|
|
34
|
+
index('core_users_name_code_idx').on(t.nameCode),
|
|
35
|
+
index('core_users_name_idx').on(t.name),
|
|
36
|
+
index('core_users_email_idx').on(t.email),
|
|
37
|
+
],
|
|
38
|
+
).enableRLS();
|
|
39
|
+
|
|
40
|
+
export const core_users_relations = relations(core_users, ({ one, many }) => ({
|
|
41
|
+
group: one(core_roles, {
|
|
42
|
+
fields: [core_users.roleId],
|
|
43
|
+
references: [core_roles.id],
|
|
44
|
+
}),
|
|
45
|
+
language: one(core_languages, {
|
|
46
|
+
fields: [core_users.language],
|
|
47
|
+
references: [core_languages.code],
|
|
48
|
+
}),
|
|
49
|
+
confirm_email: one(core_users_confirm_emails, {
|
|
50
|
+
fields: [core_users.id],
|
|
51
|
+
references: [core_users_confirm_emails.userId],
|
|
52
|
+
}),
|
|
53
|
+
sso: many(core_users_sso),
|
|
54
|
+
forgot_password: one(core_users_forgot_password, {
|
|
55
|
+
fields: [core_users.id],
|
|
56
|
+
references: [core_users_forgot_password.userId],
|
|
57
|
+
}),
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
export const core_users_sso = pgTable(
|
|
61
|
+
'core_users_sso',
|
|
62
|
+
t => ({
|
|
63
|
+
userId: t
|
|
64
|
+
.integer()
|
|
65
|
+
.references(() => core_users.id, {
|
|
66
|
+
onDelete: 'cascade',
|
|
67
|
+
})
|
|
68
|
+
.notNull(),
|
|
69
|
+
providerId: t.varchar({ length: 255 }).notNull(),
|
|
70
|
+
providerAccountId: t.varchar({ length: 255 }).notNull(),
|
|
71
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
72
|
+
updatedAt: t
|
|
73
|
+
.timestamp()
|
|
74
|
+
.notNull()
|
|
75
|
+
.$onUpdate(() => new Date()),
|
|
76
|
+
}),
|
|
77
|
+
t => [index('core_users_sso_user_id_idx').on(t.userId)],
|
|
78
|
+
).enableRLS();
|
|
79
|
+
|
|
80
|
+
export const core_users_sso_relations = relations(
|
|
81
|
+
core_users_sso,
|
|
82
|
+
({ one }) => ({
|
|
83
|
+
user: one(core_users, {
|
|
84
|
+
fields: [core_users_sso.userId],
|
|
85
|
+
references: [core_users.id],
|
|
86
|
+
}),
|
|
87
|
+
}),
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
export const core_users_confirm_emails = pgTable(
|
|
91
|
+
'core_users_confirm_emails',
|
|
92
|
+
t => ({
|
|
93
|
+
id: t.serial().primaryKey(),
|
|
94
|
+
userId: t
|
|
95
|
+
.integer()
|
|
96
|
+
.references(() => core_users.id, {
|
|
97
|
+
onDelete: 'cascade',
|
|
98
|
+
})
|
|
99
|
+
.notNull(),
|
|
100
|
+
token: t.varchar({ length: 100 }).notNull().unique(),
|
|
101
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
102
|
+
expires: t.timestamp().notNull(),
|
|
103
|
+
}),
|
|
104
|
+
).enableRLS();
|
|
105
|
+
|
|
106
|
+
export const core_users_confirm_emails_relations = relations(
|
|
107
|
+
core_users_confirm_emails,
|
|
108
|
+
({ one }) => ({
|
|
109
|
+
user: one(core_users, {
|
|
110
|
+
fields: [core_users_confirm_emails.userId],
|
|
111
|
+
references: [core_users.id],
|
|
112
|
+
}),
|
|
113
|
+
}),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
export const core_users_forgot_password = pgTable(
|
|
117
|
+
'core_users_forgot_password',
|
|
118
|
+
t => ({
|
|
119
|
+
id: t.serial().primaryKey(),
|
|
120
|
+
userId: t
|
|
121
|
+
.integer()
|
|
122
|
+
.references(() => core_users.id, {
|
|
123
|
+
onDelete: 'cascade',
|
|
124
|
+
})
|
|
125
|
+
.notNull()
|
|
126
|
+
.unique(),
|
|
127
|
+
token: t.varchar({ length: 100 }).notNull().unique(),
|
|
128
|
+
ip_address: t.varchar({ length: 40 }).notNull(),
|
|
129
|
+
createdAt: t.timestamp().notNull().defaultNow(),
|
|
130
|
+
expiresAt: t.timestamp().notNull(),
|
|
131
|
+
}),
|
|
132
|
+
).enableRLS();
|
|
133
|
+
|
|
134
|
+
export const core_users_forgot_password_relations = relations(
|
|
135
|
+
core_users_forgot_password,
|
|
136
|
+
({ one }) => ({
|
|
137
|
+
user: one(core_users, {
|
|
138
|
+
fields: [core_users_forgot_password.userId],
|
|
139
|
+
references: [core_users.id],
|
|
140
|
+
}),
|
|
141
|
+
}),
|
|
142
|
+
);
|