@vitnode/core 1.2.0-canary.52 → 1.2.0-canary.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/next.config.ts +3 -3
- package/dist/scripts/get-config.d.ts +2 -2
- package/dist/scripts/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.js +3 -3
- package/dist/src/api/adapters/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.js +2 -2
- package/dist/src/api/adapters/sso/discord.d.ts +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/discord.js +21 -21
- package/dist/src/api/adapters/sso/facebook.d.ts +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.js +23 -23
- package/dist/src/api/adapters/sso/google.d.ts +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.js +21 -21
- package/dist/src/api/config.d.ts +3 -3
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +11 -11
- package/dist/src/api/lib/check-plugin-id.js +8 -8
- package/dist/src/api/lib/logger-middleware.d.ts +1 -1
- package/dist/src/api/lib/logger-middleware.js +9 -9
- package/dist/src/api/lib/module.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/route.d.ts +2 -2
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +7 -7
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.js +37 -24
- package/dist/src/api/middlewares/captcha.middleware.d.ts +1 -1
- package/dist/src/api/middlewares/captcha.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/captcha.middleware.js +14 -13
- package/dist/src/api/middlewares/global.middleware.d.ts +12 -12
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +29 -28
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +3 -3
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.js +4 -4
- package/dist/src/api/models/device.d.ts +1 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +13 -13
- package/dist/src/api/models/email.d.ts +15 -15
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +11 -10
- package/dist/src/api/models/password.js +9 -9
- package/dist/src/api/models/session-admin.d.ts +1 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +19 -19
- package/dist/src/api/models/session.d.ts +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +17 -17
- package/dist/src/api/models/sso.d.ts +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +22 -25
- package/dist/src/api/models/user/get-user-by-id.d.ts +1 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/get-user-by-id.js +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +11 -12
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +3 -3
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +16 -16
- package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/admin/routes/session.route.js +7 -7
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +12 -12
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/users.route.js +15 -15
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +2 -2
- package/dist/src/api/modules/middleware/route.js +12 -12
- package/dist/src/api/modules/users/routes/change-password.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/change-password.route.js +13 -13
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +17 -17
- package/dist/src/api/modules/users/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/session.route.js +6 -6
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +10 -10
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/sign-out.route.js +7 -7
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-up.route.js +14 -14
- package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/test.route.js +9 -9
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/callback.route.js +8 -8
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +6 -6
- package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +12 -12
- package/dist/src/api/modules/users/users.module.js +1 -1
- package/dist/src/app/login/page.d.ts +1 -1
- package/dist/src/app/login/page.js +2 -2
- package/dist/src/app/login/reset-password/page.d.ts +2 -2
- package/dist/src/app/login/reset-password/page.js +2 -2
- package/dist/src/app/register/page.d.ts +1 -1
- package/dist/src/app/register/page.js +2 -2
- package/dist/src/app_admin/core/debug/page.d.ts +1 -1
- package/dist/src/app_admin/core/debug/page.js +8 -8
- package/dist/src/app_admin/core/users/page.d.ts +2 -2
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +7 -7
- package/dist/src/components/avatar.d.ts +1 -1
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +2 -2
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +5 -5
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +3 -4
- package/dist/src/components/date-format.js +8 -8
- package/dist/src/components/form/auto-form.d.ts +16 -16
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +13 -12
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.d.ts +1 -1
- package/dist/src/components/form/common/label.js +1 -1
- package/dist/src/components/form/fields/checkbox.d.ts +2 -2
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.d.ts +3 -3
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.js +29 -23
- package/dist/src/components/form/fields/combobox.d.ts +3 -3
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.js +6 -7
- package/dist/src/components/form/fields/input.d.ts +2 -2
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.js +2 -2
- package/dist/src/components/form/fields/radio-group.d.ts +3 -3
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
- package/dist/src/components/form/fields/radio-group.js +0 -1
- package/dist/src/components/form/fields/select.d.ts +3 -3
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +2 -3
- package/dist/src/components/form/fields/switch.d.ts +2 -2
- package/dist/src/components/form/fields/switch.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.d.ts +3 -3
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.js +1 -2
- package/dist/src/components/i18n-provider.d.ts +2 -2
- package/dist/src/components/i18n-provider.js +3 -3
- package/dist/src/components/logo-vitnode.d.ts.map +1 -1
- package/dist/src/components/logo-vitnode.js +8 -2
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.js +3 -3
- package/dist/src/components/switchers/themes/theme-switcher.js +4 -4
- package/dist/src/components/table/content.d.ts +1 -1
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/content.js +5 -5
- package/dist/src/components/table/data-table.d.ts +7 -7
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +22 -15
- package/dist/src/components/table/order-table-head.d.ts +4 -4
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.js +20 -9
- package/dist/src/components/table/pagination.js +19 -19
- package/dist/src/components/ui/accordion.d.ts +2 -2
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.js +4 -5
- package/dist/src/components/ui/alert-dialog.d.ts +7 -7
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +12 -12
- package/dist/src/components/ui/alert.d.ts +5 -5
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/alert.js +6 -7
- package/dist/src/components/ui/badge.d.ts +3 -3
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/badge.js +7 -8
- package/dist/src/components/ui/button-client.d.ts +1 -1
- package/dist/src/components/ui/button-client.js +9 -9
- package/dist/src/components/ui/button.d.ts +8 -8
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +13 -14
- package/dist/src/components/ui/card.d.ts +8 -8
- package/dist/src/components/ui/card.js +7 -7
- package/dist/src/components/ui/checkbox.d.ts +2 -2
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/checkbox.js +2 -3
- package/dist/src/components/ui/collapsible.d.ts +1 -1
- package/dist/src/components/ui/collapsible.js +1 -1
- package/dist/src/components/ui/command.d.ts +4 -4
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/command.js +9 -10
- package/dist/src/components/ui/context-menu.d.ts +4 -4
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.js +7 -8
- package/dist/src/components/ui/dialog.d.ts +6 -6
- package/dist/src/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/components/ui/dialog.js +16 -16
- package/dist/src/components/ui/drawer.d.ts +4 -4
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.js +7 -8
- package/dist/src/components/ui/dropdown-menu.d.ts +4 -4
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.js +8 -9
- package/dist/src/components/ui/form.d.ts +10 -10
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/form.js +15 -15
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.d.ts +2 -2
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.js +3 -4
- package/dist/src/components/ui/input-otp.d.ts +5 -5
- package/dist/src/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/components/ui/input-otp.js +6 -7
- package/dist/src/components/ui/input.d.ts +2 -2
- package/dist/src/components/ui/input.d.ts.map +1 -1
- package/dist/src/components/ui/input.js +1 -2
- package/dist/src/components/ui/label.d.ts +2 -2
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/label.js +2 -3
- package/dist/src/components/ui/loader.js +3 -3
- package/dist/src/components/ui/menubar.d.ts +4 -4
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.js +11 -12
- package/dist/src/components/ui/navigation-menu.d.ts +2 -2
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.js +10 -11
- package/dist/src/components/ui/popover.d.ts +2 -2
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +3 -4
- package/dist/src/components/ui/progress.d.ts +2 -2
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/progress.js +2 -3
- package/dist/src/components/ui/radio-group.d.ts +2 -2
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.js +3 -4
- package/dist/src/components/ui/select.d.ts +3 -3
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/select.js +9 -10
- package/dist/src/components/ui/separator.d.ts +2 -2
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/separator.js +3 -4
- package/dist/src/components/ui/sheet.d.ts +5 -5
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.js +8 -9
- package/dist/src/components/ui/sidebar.d.ts +31 -31
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +67 -69
- package/dist/src/components/ui/skeleton.d.ts +1 -1
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.d.ts +2 -2
- package/dist/src/components/ui/slider.d.ts.map +1 -1
- package/dist/src/components/ui/slider.js +16 -8
- package/dist/src/components/ui/sonner.d.ts +1 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/sonner.js +6 -6
- package/dist/src/components/ui/switch.d.ts +2 -2
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/switch.js +3 -4
- package/dist/src/components/ui/table.d.ts +9 -9
- package/dist/src/components/ui/table.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +8 -9
- package/dist/src/components/ui/tabs.d.ts +2 -2
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.js +4 -5
- package/dist/src/components/ui/textarea.d.ts +2 -2
- package/dist/src/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/components/ui/textarea.js +1 -2
- package/dist/src/components/ui/toggle-group.d.ts +4 -4
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.js +6 -6
- package/dist/src/components/ui/toggle.d.ts +3 -3
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +8 -9
- package/dist/src/components/ui/tooltip.d.ts +2 -2
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +2 -3
- package/dist/src/config.js +2 -2
- package/dist/src/database/admins.js +10 -10
- package/dist/src/database/languages.js +7 -7
- package/dist/src/database/logs.js +9 -9
- package/dist/src/database/moderators.js +5 -5
- package/dist/src/database/roles.js +1 -1
- package/dist/src/database/sessions.js +6 -6
- package/dist/src/database/users.js +13 -13
- package/dist/src/drizzle.config.d.ts +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +19 -12
- package/dist/src/emails/default-template.d.ts +3 -3
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +39 -38
- package/dist/src/emails/reset-password.d.ts +1 -1
- package/dist/src/emails/reset-password.d.ts.map +1 -1
- package/dist/src/emails/reset-password.js +51 -51
- package/dist/src/emails/ui/button.d.ts +2 -2
- package/dist/src/emails/ui/button.js +13 -13
- package/dist/src/emails/ui/card.d.ts +1 -1
- package/dist/src/emails/ui/card.js +6 -6
- package/dist/src/hooks/use-before-unload.js +3 -3
- package/dist/src/hooks/use-captcha.d.ts +2 -2
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +29 -37
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +3 -4
- package/dist/src/lib/api/get-middleware-api.js +4 -4
- package/dist/src/lib/api/get-session-admin-api.js +5 -5
- package/dist/src/lib/api/get-session-api.js +4 -4
- package/dist/src/lib/colors.js +28 -19
- package/dist/src/lib/colors.test.js +60 -60
- package/dist/src/lib/config.js +3 -3
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +27 -27
- package/dist/src/lib/fetcher/core.d.ts +5 -5
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +11 -10
- package/dist/src/lib/fetcher/helpers-server.d.ts +1 -1
- package/dist/src/lib/fetcher/helpers-server.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +17 -17
- package/dist/src/lib/fetcher/types.d.ts +26 -26
- package/dist/src/lib/fetcher/types.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.d.ts +4 -4
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -3
- package/dist/src/lib/fetcher.d.ts +5 -5
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +4 -4
- package/dist/src/lib/helpers/auto-form.d.ts +3 -3
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +16 -15
- package/dist/src/lib/helpers/auto-form.test.js +129 -129
- package/dist/src/lib/navigation.d.ts +2 -2
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/plugin.d.ts +3 -3
- package/dist/src/lib/special-characters.js +1 -1
- package/dist/src/lib/special-characters.test.js +36 -36
- package/dist/src/lib/utils.d.ts +1 -1
- package/dist/src/tests/setup.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +4 -8
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +11 -12
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +11 -11
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -2
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +5 -5
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +1 -1
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +3 -3
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +10 -10
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +2 -2
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +15 -15
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +7 -7
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +7 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +3 -3
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +25 -25
- package/dist/src/views/admin/views/core/test.js +43 -43
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/users-admin-view.js +13 -14
- package/dist/src/views/auth/password-reset/change-password-form/form.js +9 -9
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +5 -5
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +7 -7
- package/dist/src/views/auth/password-reset/form/form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/form/form.js +15 -15
- package/dist/src/views/auth/password-reset/form/mutation-api.js +5 -5
- package/dist/src/views/auth/password-reset/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/form/use-form.js +7 -7
- package/dist/src/views/auth/password-reset/password-reset-view.js +4 -4
- package/dist/src/views/auth/sign-in/form/form.js +9 -9
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.js +10 -10
- package/dist/src/views/auth/sign-in/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/use-form.js +11 -11
- package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
- package/dist/src/views/auth/sign-up/components/password-input.d.ts +3 -3
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.js +9 -10
- package/dist/src/views/auth/sign-up/email-confirmation-view.js +4 -4
- package/dist/src/views/auth/sign-up/form/form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/form.js +18 -18
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.js +6 -6
- package/dist/src/views/auth/sign-up/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/use-form.js +21 -21
- package/dist/src/views/auth/sign-up/sign-up-view.js +5 -5
- package/dist/src/views/auth/sign-up/wrapper.d.ts +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +5 -8
- package/dist/src/views/auth/sso/buttons/client.js +4 -4
- package/dist/src/views/auth/sso/buttons/mutation-api.js +5 -5
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +2 -2
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +6 -6
- package/dist/src/views/auth/sso/callback/client/client.d.ts +1 -1
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/client.js +9 -9
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +7 -7
- package/dist/src/views/error/back-button.js +1 -1
- package/dist/src/views/error/error-view.js +4 -4
- package/dist/src/views/error/global-error-view.d.ts +3 -3
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +36 -44
- package/dist/src/views/layouts/provider.d.ts +4 -4
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/provider.js +3 -3
- package/dist/src/views/layouts/root-layout.d.ts +3 -3
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.js +1 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +2 -2
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.js +4 -4
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +8 -8
- package/dist/src/views/layouts/theme/header/user/user.js +4 -4
- package/dist/src/views/layouts/theme/layout.d.ts +2 -2
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/src/vitnode.config.d.ts +16 -16
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -5
- package/src/app/login/page.tsx +5 -5
- package/src/app/login/reset-password/page.tsx +5 -5
- package/src/app/login/sso/[providerId]/page.tsx +1 -1
- package/src/app/register/page.tsx +5 -5
- package/src/app_admin/core/debug/page.tsx +14 -14
- package/src/app_admin/core/page.tsx +1 -1
- package/src/app_admin/core/test/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +12 -13
|
@@ -1,57 +1,49 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ThemeProvider } from "next-themes";
|
|
3
|
-
// eslint-disable-next-line no-restricted-imports
|
|
4
2
|
import Link from "next/link";
|
|
3
|
+
import { ThemeProvider } from "next-themes";
|
|
5
4
|
import { LogoVitNode } from "../../components/logo-vitnode.js";
|
|
6
5
|
import { Card, CardContent } from "../../components/ui/card.js";
|
|
7
|
-
export const
|
|
8
|
-
|
|
6
|
+
export const metadata = {
|
|
7
|
+
title: "Error 500!"
|
|
8
|
+
};
|
|
9
|
+
export const GlobalErrorView = ({ className })=>{
|
|
10
|
+
return /*#__PURE__*/ _jsx("html", {
|
|
9
11
|
lang: "en",
|
|
10
12
|
suppressHydrationWarning: true,
|
|
11
|
-
children:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
className: "text-3xl font-semibold tracking-tight",
|
|
39
|
-
children: "Oops! Something went wrong."
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ _jsx(Card, {
|
|
42
|
-
className: "w-full",
|
|
43
|
-
children: /*#__PURE__*/ _jsx(CardContent, {
|
|
44
|
-
children: /*#__PURE__*/ _jsx("p", {
|
|
45
|
-
className: "text-muted-foreground",
|
|
46
|
-
children: "An unexpected error occurred. Please try refreshing the page or come back later."
|
|
47
|
-
})
|
|
13
|
+
children: /*#__PURE__*/ _jsx("body", {
|
|
14
|
+
className: className,
|
|
15
|
+
children: /*#__PURE__*/ _jsx(ThemeProvider, {
|
|
16
|
+
attribute: "class",
|
|
17
|
+
disableTransitionOnChange: true,
|
|
18
|
+
enableSystem: true,
|
|
19
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
20
|
+
className: "bg-background flex min-h-screen flex-col items-center justify-center p-4",
|
|
21
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
22
|
+
className: "container mx-auto flex w-full max-w-md flex-col items-center justify-center gap-6 text-center",
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsx(Link, {
|
|
25
|
+
href: "/",
|
|
26
|
+
children: /*#__PURE__*/ _jsx(LogoVitNode, {
|
|
27
|
+
className: "mb-4 h-12 w-auto"
|
|
28
|
+
})
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx("h1", {
|
|
31
|
+
className: "text-3xl font-semibold tracking-tight",
|
|
32
|
+
children: "Oops! Something went wrong."
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsx(Card, {
|
|
35
|
+
className: "w-full",
|
|
36
|
+
children: /*#__PURE__*/ _jsx(CardContent, {
|
|
37
|
+
children: /*#__PURE__*/ _jsx("p", {
|
|
38
|
+
className: "text-muted-foreground",
|
|
39
|
+
children: "An unexpected error occurred. Please try refreshing the page or come back later."
|
|
48
40
|
})
|
|
49
41
|
})
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
})
|
|
43
|
+
]
|
|
52
44
|
})
|
|
53
45
|
})
|
|
54
46
|
})
|
|
55
|
-
|
|
47
|
+
})
|
|
56
48
|
});
|
|
57
49
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ThemeProvider } from
|
|
2
|
-
import React from
|
|
3
|
-
import type { VitNodeConfig } from
|
|
4
|
-
import { Toaster } from
|
|
1
|
+
import { ThemeProvider } from "next-themes";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { VitNodeConfig } from "../../vitnode.config";
|
|
4
|
+
import { Toaster } from "../../components/ui/sonner";
|
|
5
5
|
export declare const RootProvider: ({ children, theme, toaster, debug, }: {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
debug?: VitNodeConfig["debug"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/views/layouts/provider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/views/layouts/provider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,eAAO,MAAM,YAAY,GAAI,sCAK1B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,WAAW,GAAG,2BAA2B,GAAG,cAAc,CAC3D,CAAC;IACF,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;CAChD,4CAsCA,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
4
4
|
import { ThemeProvider } from "next-themes";
|
|
@@ -8,7 +8,7 @@ import { CONFIG } from "../../lib/config.js";
|
|
|
8
8
|
import { Toaster } from "../../components/ui/sonner.js";
|
|
9
9
|
export const RootProvider = ({ children, theme, toaster, debug })=>{
|
|
10
10
|
React.useEffect(()=>{
|
|
11
|
-
if (!debug
|
|
11
|
+
if (!(debug && CONFIG.node_development)) return;
|
|
12
12
|
scan({
|
|
13
13
|
enabled: true
|
|
14
14
|
});
|
|
@@ -33,7 +33,7 @@ export const RootProvider = ({ children, theme, toaster, debug })=>{
|
|
|
33
33
|
children: [
|
|
34
34
|
/*#__PURE__*/ _jsx(Toaster, {
|
|
35
35
|
closeButton: true,
|
|
36
|
-
position: toaster?.position ??
|
|
36
|
+
position: toaster?.position ?? "top-center",
|
|
37
37
|
...toaster
|
|
38
38
|
}),
|
|
39
39
|
children
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Metadata } from
|
|
2
|
-
import React from
|
|
3
|
-
import type { VitNodeConfig } from
|
|
1
|
+
import type { Metadata } from "next/dist/types";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { VitNodeConfig } from "../../vitnode.config";
|
|
4
4
|
export interface RootLayoutProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
params: Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-layout.d.ts","sourceRoot":"","sources":["../../../../src/views/layouts/root-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"root-layout.d.ts","sourceRoot":"","sources":["../../../../src/views/layouts/root-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AAED,eAAO,MAAM,0BAA0B,GAAI,sCAExC,aAAa,KAAG,QAQlB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,+BAI9B,eAAe,GAAG;IACnB,MAAM,EAAE,aAAa,CAAC;CACvB,qDAWA,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { setRequestLocale } from "next-intl/server";
|
|
3
|
-
import React from "react";
|
|
4
3
|
import { I18nProvider } from "../../components/i18n-provider.js";
|
|
5
4
|
import { RootProvider } from "./provider.js";
|
|
6
5
|
export const generateMetadataRootLayout = ({ metadata: { title, shortTitle } })=>{
|
|
@@ -9,7 +8,7 @@ export const generateMetadataRootLayout = ({ metadata: { title, shortTitle } })=
|
|
|
9
8
|
default: title,
|
|
10
9
|
template: `%s - ${shortTitle ?? title}`
|
|
11
10
|
},
|
|
12
|
-
description:
|
|
11
|
+
description: "Generated by create next app"
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
14
|
export const RootLayout = async ({ children, params, config })=>{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { VitNodeConfig } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { VitNodeConfig } from "../../../../vitnode.config";
|
|
3
3
|
export declare const HeaderLayout: ({ logo, className, vitNodeConfig, ...props }: React.ComponentProps<"header"> & {
|
|
4
4
|
logo: React.ReactNode;
|
|
5
5
|
vitNodeConfig: VitNodeConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../src/views/layouts/theme/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../src/views/layouts/theme/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,eAAO,MAAM,YAAY,GAAI,8CAK1B,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAClC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;CAC9B,4CAqBA,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { cn } from "../../../../lib/utils.js";
|
|
|
8
8
|
import { UserHeader } from "./user/user.js";
|
|
9
9
|
export const HeaderLayout = ({ logo, className, vitNodeConfig, ...props })=>{
|
|
10
10
|
return /*#__PURE__*/ _jsx("header", {
|
|
11
|
-
className: cn(
|
|
11
|
+
className: cn("sticky top-0 z-20 w-full sm:top-2 sm:mb-2", className),
|
|
12
12
|
...props,
|
|
13
13
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
14
14
|
className: "dark:bg-background/75 bg-card/75 container mx-auto flex h-14 items-center border-b px-4 py-2 backdrop-blur sm:rounded-lg sm:border sm:shadow-sm",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SessionApi } from
|
|
1
|
+
import type { SessionApi } from "../../../../../../lib/api/get-session-api";
|
|
2
2
|
export declare const ClientAuthUserHeader: ({ user, }: {
|
|
3
3
|
user: NonNullable<SessionApi["user"]>;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/layouts/theme/header/user/auth/client.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/layouts/theme/header/user/auth/client.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAK5D,eAAO,MAAM,oBAAoB,GAAI,WAElC;IACD,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;CACvC,4CAgCA,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { KeyRoundIcon, LogOutIcon } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
@@ -6,7 +6,7 @@ import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator } from "../.
|
|
|
6
6
|
import { Link } from "../../../../../../lib/navigation.js";
|
|
7
7
|
import { logOutMutationApi } from "./log-out-mutation-api.js";
|
|
8
8
|
export const ClientAuthUserHeader = ({ user })=>{
|
|
9
|
-
const t = useTranslations(
|
|
9
|
+
const t = useTranslations("core.global.user_bar");
|
|
10
10
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
11
11
|
children: [
|
|
12
12
|
user.isAdmin && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
@@ -20,7 +20,7 @@ export const ClientAuthUserHeader = ({ user })=>{
|
|
|
20
20
|
children: [
|
|
21
21
|
/*#__PURE__*/ _jsx(KeyRoundIcon, {}),
|
|
22
22
|
/*#__PURE__*/ _jsx("span", {
|
|
23
|
-
children: t(
|
|
23
|
+
children: t("admin_cp")
|
|
24
24
|
})
|
|
25
25
|
]
|
|
26
26
|
})
|
|
@@ -37,7 +37,7 @@ export const ClientAuthUserHeader = ({ user })=>{
|
|
|
37
37
|
children: [
|
|
38
38
|
/*#__PURE__*/ _jsx(LogOutIcon, {}),
|
|
39
39
|
/*#__PURE__*/ _jsx("span", {
|
|
40
|
-
children: t(
|
|
40
|
+
children: t("log_out")
|
|
41
41
|
})
|
|
42
42
|
]
|
|
43
43
|
})
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use server";
|
|
2
2
|
import { revalidatePath } from "next/cache";
|
|
3
3
|
import { usersModule } from "../../../../../../api/modules/users/users.module.js";
|
|
4
4
|
import { fetcher } from "../../../../../../lib/fetcher.js";
|
|
5
5
|
import { redirect } from "../../../../../../lib/navigation.js";
|
|
6
6
|
export const logOutMutationApi = async ({ isAdmin = false })=>{
|
|
7
7
|
const res = await fetcher(usersModule, {
|
|
8
|
-
path:
|
|
9
|
-
method:
|
|
8
|
+
path: "/sign_out",
|
|
9
|
+
method: "delete",
|
|
10
10
|
allowSaveCookies: true,
|
|
11
|
-
module:
|
|
11
|
+
module: "users",
|
|
12
12
|
args: {
|
|
13
13
|
body: {
|
|
14
14
|
isAdmin
|
|
@@ -17,11 +17,11 @@ export const logOutMutationApi = async ({ isAdmin = false })=>{
|
|
|
17
17
|
});
|
|
18
18
|
if (res.status === 200) {
|
|
19
19
|
if (isAdmin) {
|
|
20
|
-
revalidatePath(
|
|
21
|
-
await redirect(
|
|
20
|
+
revalidatePath("/admin/(main)", "layout");
|
|
21
|
+
await redirect("/admin");
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
revalidatePath(
|
|
25
|
-
await redirect(
|
|
24
|
+
revalidatePath("/[locale]/(main)", "layout");
|
|
25
|
+
await redirect("/");
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -7,7 +7,7 @@ import { cn } from "../../../../../lib/utils.js";
|
|
|
7
7
|
import { AuthUserHeader } from "./auth/auth.js";
|
|
8
8
|
export const UserHeader = async ()=>{
|
|
9
9
|
const [t, session] = await Promise.all([
|
|
10
|
-
getTranslations(
|
|
10
|
+
getTranslations("core.global"),
|
|
11
11
|
getSessionApi()
|
|
12
12
|
]);
|
|
13
13
|
if (!session.user) {
|
|
@@ -15,15 +15,15 @@ export const UserHeader = async ()=>{
|
|
|
15
15
|
children: [
|
|
16
16
|
/*#__PURE__*/ _jsx(Link, {
|
|
17
17
|
className: cn(buttonVariants({
|
|
18
|
-
variant:
|
|
18
|
+
variant: "ghost"
|
|
19
19
|
})),
|
|
20
20
|
href: "/login",
|
|
21
|
-
children: t(
|
|
21
|
+
children: t("login")
|
|
22
22
|
}),
|
|
23
23
|
/*#__PURE__*/ _jsx(Link, {
|
|
24
24
|
className: cn(buttonVariants()),
|
|
25
25
|
href: "/register",
|
|
26
|
-
children: t(
|
|
26
|
+
children: t("register")
|
|
27
27
|
})
|
|
28
28
|
]
|
|
29
29
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { VitNodeConfig } from
|
|
2
|
-
import { HeaderLayout } from
|
|
1
|
+
import type { VitNodeConfig } from "../../../vitnode.config";
|
|
2
|
+
import { HeaderLayout } from "./header/header";
|
|
3
3
|
export declare const ThemeLayout: ({ children, logo, vitNodeConfig, }: React.ComponentProps<typeof HeaderLayout> & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
vitNodeConfig: VitNodeConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { PostgresJsDatabase } from
|
|
2
|
-
import type { ThemeProvider } from
|
|
3
|
-
import type { IRateLimiterOptions } from
|
|
4
|
-
import type { BuildPluginApiReturn } from
|
|
5
|
-
import type { EmailApiPlugin } from
|
|
6
|
-
import type { SSOApiPlugin } from
|
|
7
|
-
import type { DefaultTemplateEmailProps } from
|
|
8
|
-
import type { BuildPluginReturn } from
|
|
1
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
+
import type { ThemeProvider } from "next-themes";
|
|
3
|
+
import type { IRateLimiterOptions } from "rate-limiter-flexible";
|
|
4
|
+
import type { BuildPluginApiReturn } from "./api/lib/plugin";
|
|
5
|
+
import type { EmailApiPlugin } from "./api/models/email";
|
|
6
|
+
import type { SSOApiPlugin } from "./api/models/sso";
|
|
7
|
+
import type { DefaultTemplateEmailProps } from "./emails/default-template";
|
|
8
|
+
import type { BuildPluginReturn } from "./lib/plugin";
|
|
9
9
|
export interface LocaleConfig {
|
|
10
10
|
code: string;
|
|
11
11
|
name: string;
|
|
@@ -13,14 +13,14 @@ export interface LocaleConfig {
|
|
|
13
13
|
export interface VitNodeConfig<AppLocales extends LocaleConfig[] = LocaleConfig[]> {
|
|
14
14
|
debug?: boolean;
|
|
15
15
|
i18n: {
|
|
16
|
-
defaultLocale: AppLocales[number][
|
|
17
|
-
localePrefix?:
|
|
16
|
+
defaultLocale: AppLocales[number]["code"];
|
|
17
|
+
localePrefix?: "always" | "as-needed" | "never";
|
|
18
18
|
locales: AppLocales;
|
|
19
19
|
timeZone?: string;
|
|
20
20
|
};
|
|
21
|
-
metadata: VitNodeApiConfig[
|
|
21
|
+
metadata: VitNodeApiConfig["metadata"];
|
|
22
22
|
plugins: BuildPluginReturn[];
|
|
23
|
-
theme?: Omit<React.ComponentProps<typeof ThemeProvider>,
|
|
23
|
+
theme?: Omit<React.ComponentProps<typeof ThemeProvider>, "attribute" | "disableTransitionOnChange" | "enableSystem">;
|
|
24
24
|
}
|
|
25
25
|
export interface VitNodeApiConfig {
|
|
26
26
|
authorization?: {
|
|
@@ -36,13 +36,13 @@ export interface VitNodeApiConfig {
|
|
|
36
36
|
captcha?: {
|
|
37
37
|
secretKey: string | undefined;
|
|
38
38
|
siteKey: string | undefined;
|
|
39
|
-
type:
|
|
39
|
+
type: "cloudflare_turnstile" | "recaptcha_v3";
|
|
40
40
|
};
|
|
41
41
|
dbProvider: PostgresJsDatabase;
|
|
42
42
|
email?: {
|
|
43
43
|
adapter?: EmailApiPlugin;
|
|
44
|
-
logo?: DefaultTemplateEmailProps[
|
|
45
|
-
tailwindConfig?: DefaultTemplateEmailProps[
|
|
44
|
+
logo?: DefaultTemplateEmailProps["templateProps"]["logo"];
|
|
45
|
+
tailwindConfig?: DefaultTemplateEmailProps["templateProps"]["tailwindConfig"];
|
|
46
46
|
};
|
|
47
47
|
metadata: {
|
|
48
48
|
shortTitle?: string;
|
|
@@ -52,7 +52,7 @@ export interface VitNodeApiConfig {
|
|
|
52
52
|
default: object;
|
|
53
53
|
}>;
|
|
54
54
|
plugins: BuildPluginApiReturn[];
|
|
55
|
-
rateLimiter?: Omit<IRateLimiterOptions,
|
|
55
|
+
rateLimiter?: Omit<IRateLimiterOptions, "keyPrefix">;
|
|
56
56
|
}
|
|
57
57
|
export declare function buildConfig<AppLocales extends LocaleConfig[]>(args: VitNodeConfig<AppLocales>): VitNodeConfig<AppLocales>;
|
|
58
58
|
export declare function buildApiConfig(args: VitNodeApiConfig): VitNodeApiConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitnode.config.d.ts","sourceRoot":"","sources":["../../src/vitnode.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa,CAC5B,UAAU,SAAS,YAAY,EAAE,GAAG,YAAY,EAAE;IAElD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE;QACJ,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1C,YAAY,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;QAChD,OAAO,EAAE,UAAU,CAAC;QACpB,QAAQ,CAAC,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AAM,CAAC,CAAC;QAC1D,cAAc,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;KAC/E,CAAC;IACF,QAAQ,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;CACtD;AAED,wBAAgB,WAAW,CAAC,UAAU,SAAS,YAAY,EAAE,EAC3D,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,GAC9B,aAAa,CAAC,UAAU,CAAC,CAQ3B;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAED,eAAO,MAAM,mBAAmB,GAAU,mDAIvC;IACD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;CAC9B;;;;;EAmCA,CAAC"}
|
|
@@ -3,7 +3,7 @@ export function buildConfig(args) {
|
|
|
3
3
|
...args,
|
|
4
4
|
i18n: {
|
|
5
5
|
...args.i18n,
|
|
6
|
-
localePrefix: args.i18n.localePrefix ??
|
|
6
|
+
localePrefix: args.i18n.localePrefix ?? "as-needed"
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
9
|
}
|
|
@@ -15,7 +15,7 @@ export const handleRequestConfig = async ({ requestLocale, vitNodeConfig, pathTo
|
|
|
15
15
|
const localeCodes = vitNodeConfig.i18n.locales.map((locale)=>locale.code);
|
|
16
16
|
const locale = reqLocale && localeCodes.includes(reqLocale) ? reqLocale : vitNodeConfig.i18n.defaultLocale;
|
|
17
17
|
const pluginIds = [
|
|
18
|
-
|
|
18
|
+
"@vitnode/core",
|
|
19
19
|
...vitNodeConfig.plugins.map((plugin)=>plugin.pluginId)
|
|
20
20
|
];
|
|
21
21
|
// Import and merge messages from all plugins
|
|
@@ -29,6 +29,7 @@ export const handleRequestConfig = async ({ requestLocale, vitNodeConfig, pathTo
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const allMessages = await Promise.all(messagesPromises);
|
|
32
|
+
// biome-ignore lint/performance/noAccumulatingSpread: <needed>
|
|
32
33
|
const messages = allMessages.reduce((acc, curr)=>({
|
|
33
34
|
...acc,
|
|
34
35
|
...curr
|