@vitnode/core 1.2.0-canary.51 → 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 -20
- 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 +27 -11
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +35 -22
- package/dist/src/api/models/password.d.ts +4 -0
- package/dist/src/api/models/password.d.ts.map +1 -1
- package/dist/src/api/models/password.js +15 -7
- package/dist/src/api/models/session-admin.d.ts +2 -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 +2 -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 +24 -24
- package/dist/src/api/models/user/get-user-by-id.d.ts +2 -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 +3 -2
- 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 +13 -14
- package/dist/src/api/models/user.d.ts +1 -0
- 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 +52 -0
- package/dist/src/api/modules/users/routes/change-password.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/change-password.route.js +58 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +42 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +91 -0
- 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 +9 -3
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +18 -12
- package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +9 -15
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +6 -3
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +10 -7
- 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 +6 -3
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +103 -11
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/users.module.js +6 -2
- 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 +9 -0
- package/dist/src/app/login/reset-password/page.d.ts.map +1 -0
- package/dist/src/app/login/reset-password/page.js +18 -0
- 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 +17 -16
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +15 -13
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.d.ts +4 -2
- package/dist/src/components/form/common/label.d.ts.map +1 -1
- package/dist/src/components/form/common/label.js +14 -4
- package/dist/src/components/form/fields/checkbox.d.ts +3 -3
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/checkbox.js +2 -1
- package/dist/src/components/form/fields/combobox-async.d.ts +4 -4
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.js +31 -24
- package/dist/src/components/form/fields/combobox.d.ts +4 -4
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.d.ts +3 -3
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.js +4 -3
- package/dist/src/components/form/fields/radio-group.d.ts +4 -4
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
- package/dist/src/components/form/fields/radio-group.js +2 -2
- package/dist/src/components/form/fields/select.d.ts +4 -4
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +4 -4
- package/dist/src/components/form/fields/switch.d.ts +3 -3
- package/dist/src/components/form/fields/switch.d.ts.map +1 -1
- package/dist/src/components/form/fields/switch.js +2 -1
- package/dist/src/components/form/fields/textarea.d.ts +4 -4
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.js +3 -3
- 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 +13 -14
- package/dist/src/components/ui/alert.d.ts +6 -6
- 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 +4 -4
- 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 +9 -9
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +14 -15
- package/dist/src/components/ui/card.d.ts +8 -8
- package/dist/src/components/ui/card.d.ts.map +1 -1
- package/dist/src/components/ui/card.js +7 -8
- 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 +3 -3
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +4 -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 +3 -3
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +8 -10
- 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.d.ts +21 -2
- package/dist/src/database/users.d.ts.map +1 -1
- package/dist/src/database/users.js +18 -15
- 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 +34 -22
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +61 -66
- package/dist/src/emails/reset-password.d.ts +56 -0
- package/dist/src/emails/reset-password.d.ts.map +1 -0
- package/dist/src/emails/reset-password.js +132 -0
- package/dist/src/emails/ui/button.d.ts +9 -0
- package/dist/src/emails/ui/button.d.ts.map +1 -0
- package/dist/src/emails/ui/button.js +36 -0
- package/dist/src/emails/ui/card.d.ts +8 -0
- package/dist/src/emails/ui/card.d.ts.map +1 -0
- package/dist/src/emails/ui/card.js +39 -0
- 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 +64 -40
- 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 +16 -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 +3 -2
- 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.d.ts +5 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/form.js +48 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +22 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +11 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +36 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts +6 -0
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/form.js +104 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts +7 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/mutation-api.js +21 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts +12 -0
- package/dist/src/views/auth/password-reset/form/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/form/use-form.js +33 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts +7 -0
- package/dist/src/views/auth/password-reset/password-reset-view.d.ts.map +1 -0
- package/dist/src/views/auth/password-reset/password-reset-view.js +37 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +2 -1
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/form.js +15 -10
- 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.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +13 -7
- package/dist/src/views/auth/{components → sign-up/components}/password-input.d.ts +3 -3
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/{components → sign-up/components}/password-input.js +13 -14
- 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 +20 -33
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +3 -3
- 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 +3 -8
- package/dist/src/views/auth/sign-up/form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/use-form.js +27 -24
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- 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.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +21 -7
- package/dist/src/views/auth/sso/callback/client/client.d.ts +3 -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 +36 -7
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +11 -6
- package/dist/src/views/error/back-button.js +1 -1
- package/dist/src/views/error/error-view.d.ts +5 -3
- package/dist/src/views/error/error-view.d.ts.map +1 -1
- package/dist/src/views/error/error-view.js +25 -23
- 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 -13
- 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 +44 -46
- package/src/app/login/page.tsx +5 -5
- package/src/app/login/reset-password/page.tsx +27 -0
- 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
- package/src/locales/en.json +42 -2
- package/dist/src/views/auth/components/password-input.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { relations } from "drizzle-orm";
|
|
2
2
|
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
|
-
export const core_languages = pgTable(
|
|
3
|
+
export const core_languages = pgTable("core_languages", (t)=>({
|
|
4
4
|
id: t.serial().primaryKey(),
|
|
5
5
|
code: t.varchar({
|
|
6
6
|
length: 32
|
|
@@ -10,7 +10,7 @@ export const core_languages = pgTable('core_languages', (t)=>({
|
|
|
10
10
|
}).notNull(),
|
|
11
11
|
timezone: t.varchar({
|
|
12
12
|
length: 255
|
|
13
|
-
}).notNull().default(
|
|
13
|
+
}).notNull().default("UTC"),
|
|
14
14
|
protected: t.boolean().notNull().default(false),
|
|
15
15
|
default: t.boolean().notNull().default(false),
|
|
16
16
|
enabled: t.boolean().notNull().default(true),
|
|
@@ -18,13 +18,13 @@ export const core_languages = pgTable('core_languages', (t)=>({
|
|
|
18
18
|
updatedAt: t.timestamp().notNull().$onUpdate(()=>new Date()),
|
|
19
19
|
time24: t.boolean().notNull().default(false)
|
|
20
20
|
}), (t)=>[
|
|
21
|
-
index(
|
|
22
|
-
index(
|
|
21
|
+
index("core_languages_code_idx").on(t.code),
|
|
22
|
+
index("core_languages_name_idx").on(t.name)
|
|
23
23
|
]).enableRLS();
|
|
24
|
-
export const core_languages_words = pgTable(
|
|
24
|
+
export const core_languages_words = pgTable("core_languages_words", (t)=>({
|
|
25
25
|
id: t.serial().primaryKey(),
|
|
26
26
|
languageCode: t.varchar().notNull().references(()=>core_languages.code, {
|
|
27
|
-
onDelete:
|
|
27
|
+
onDelete: "cascade"
|
|
28
28
|
}),
|
|
29
29
|
pluginCode: t.varchar({
|
|
30
30
|
length: 50
|
|
@@ -38,7 +38,7 @@ export const core_languages_words = pgTable('core_languages_words', (t)=>({
|
|
|
38
38
|
length: 255
|
|
39
39
|
}).notNull()
|
|
40
40
|
}), (t)=>[
|
|
41
|
-
index(
|
|
41
|
+
index("core_languages_words_lang_code_idx").on(t.languageCode)
|
|
42
42
|
]).enableRLS();
|
|
43
43
|
export const core_languages_words_relations = relations(core_languages_words, ({ one })=>({
|
|
44
44
|
language: one(core_languages, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { pgTable } from "drizzle-orm/pg-core";
|
|
2
2
|
import { core_users } from "./users.js";
|
|
3
|
-
export const core_logs = pgTable(
|
|
3
|
+
export const core_logs = pgTable("core_logs", (t)=>({
|
|
4
4
|
id: t.serial().primaryKey(),
|
|
5
5
|
pluginId: t.varchar({
|
|
6
6
|
length: 255
|
|
7
7
|
}).notNull(),
|
|
8
8
|
type: t.varchar({
|
|
9
9
|
enum: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"warn",
|
|
11
|
+
"error",
|
|
12
|
+
"debug"
|
|
13
13
|
],
|
|
14
14
|
length: 10
|
|
15
15
|
}).notNull(),
|
|
@@ -20,15 +20,15 @@ export const core_logs = pgTable('core_logs', (t)=>({
|
|
|
20
20
|
}).notNull(),
|
|
21
21
|
method: t.varchar({
|
|
22
22
|
length: 10
|
|
23
|
-
}).notNull().default(
|
|
24
|
-
path: t.text().notNull().default(
|
|
23
|
+
}).notNull().default("GET"),
|
|
24
|
+
path: t.text().notNull().default("localhost"),
|
|
25
25
|
userAgent: t.text(),
|
|
26
26
|
statusCode: t.integer().notNull().default(500),
|
|
27
27
|
userId: t.bigint({
|
|
28
|
-
mode:
|
|
28
|
+
mode: "number"
|
|
29
29
|
}).references(()=>core_users.id, {
|
|
30
|
-
onDelete:
|
|
31
|
-
onUpdate:
|
|
30
|
+
onDelete: "set null",
|
|
31
|
+
onUpdate: "cascade"
|
|
32
32
|
}),
|
|
33
33
|
test123: t.boolean().notNull().default(false)
|
|
34
34
|
})).enableRLS();
|
|
@@ -2,20 +2,20 @@ import { relations } from "drizzle-orm";
|
|
|
2
2
|
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
3
|
import { core_roles } from "./roles.js";
|
|
4
4
|
import { core_users } from "./users.js";
|
|
5
|
-
export const core_moderators_permissions = pgTable(
|
|
5
|
+
export const core_moderators_permissions = pgTable("core_moderators_permissions", (t)=>({
|
|
6
6
|
id: t.serial().primaryKey(),
|
|
7
7
|
roleId: t.integer().references(()=>core_roles.id, {
|
|
8
|
-
onDelete:
|
|
8
|
+
onDelete: "cascade"
|
|
9
9
|
}),
|
|
10
10
|
userId: t.integer().references(()=>core_users.id, {
|
|
11
|
-
onDelete:
|
|
11
|
+
onDelete: "cascade"
|
|
12
12
|
}),
|
|
13
13
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
14
14
|
updatedAt: t.timestamp().notNull().$onUpdate(()=>new Date()),
|
|
15
15
|
protected: t.boolean().notNull().default(false)
|
|
16
16
|
}), (t)=>[
|
|
17
|
-
index(
|
|
18
|
-
index(
|
|
17
|
+
index("core_moderators_permissions_role_id_idx").on(t.roleId),
|
|
18
|
+
index("core_moderators_permissions_user_id_idx").on(t.userId)
|
|
19
19
|
]).enableRLS();
|
|
20
20
|
export const core_moderators_permissions_relations = relations(core_moderators_permissions, ({ one })=>({
|
|
21
21
|
group: one(core_roles, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pgTable } from "drizzle-orm/pg-core";
|
|
2
|
-
export const core_roles = pgTable(
|
|
2
|
+
export const core_roles = pgTable("core_roles", (t)=>({
|
|
3
3
|
id: t.serial().primaryKey(),
|
|
4
4
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
5
5
|
updatedAt: t.timestamp().notNull().$onUpdate(()=>new Date()),
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { relations } from "drizzle-orm";
|
|
2
2
|
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
3
|
import { core_users } from "./users.js";
|
|
4
|
-
export const core_sessions = pgTable(
|
|
4
|
+
export const core_sessions = pgTable("core_sessions", (t)=>({
|
|
5
5
|
id: t.serial().primaryKey(),
|
|
6
6
|
token: t.varchar({
|
|
7
7
|
length: 255
|
|
8
8
|
}).notNull().unique(),
|
|
9
9
|
userId: t.integer().notNull().references(()=>core_users.id, {
|
|
10
|
-
onDelete:
|
|
10
|
+
onDelete: "cascade"
|
|
11
11
|
}),
|
|
12
12
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
13
13
|
expiresAt: t.timestamp().notNull(),
|
|
14
14
|
deviceId: t.integer().references(()=>core_sessions_known_devices.id, {
|
|
15
|
-
onDelete:
|
|
15
|
+
onDelete: "cascade"
|
|
16
16
|
}).notNull()
|
|
17
17
|
}), (t)=>[
|
|
18
|
-
index(
|
|
18
|
+
index("core_sessions_user_id_idx").on(t.userId)
|
|
19
19
|
]).enableRLS();
|
|
20
20
|
export const core_sessions_relations = relations(core_sessions, ({ one })=>({
|
|
21
21
|
user: one(core_users, {
|
|
@@ -35,7 +35,7 @@ export const core_sessions_relations = relations(core_sessions, ({ one })=>({
|
|
|
35
35
|
]
|
|
36
36
|
})
|
|
37
37
|
}));
|
|
38
|
-
export const core_sessions_known_devices = pgTable(
|
|
38
|
+
export const core_sessions_known_devices = pgTable("core_sessions_known_devices", (t)=>({
|
|
39
39
|
id: t.serial().primaryKey(),
|
|
40
40
|
publicId: t.varchar({
|
|
41
41
|
length: 32
|
|
@@ -46,7 +46,7 @@ export const core_sessions_known_devices = pgTable('core_sessions_known_devices'
|
|
|
46
46
|
userAgent: t.text().notNull(),
|
|
47
47
|
lastSeen: t.timestamp().notNull().defaultNow()
|
|
48
48
|
}), (t)=>[
|
|
49
|
-
index(
|
|
49
|
+
index("core_sessions_known_devices_ip_address_idx").on(t.ipAddress)
|
|
50
50
|
]).enableRLS();
|
|
51
51
|
export const core_sessions_known_devices_relations = relations(core_sessions_known_devices, ({ one })=>({
|
|
52
52
|
session: one(core_sessions, {
|
|
@@ -437,6 +437,25 @@ export declare const core_users_confirm_emails: Omit<import("drizzle-orm/pg-core
|
|
|
437
437
|
identity: undefined;
|
|
438
438
|
generated: undefined;
|
|
439
439
|
}, {}, {}>;
|
|
440
|
+
ipAddress: import("drizzle-orm/pg-core").PgColumn<{
|
|
441
|
+
name: "ipAddress";
|
|
442
|
+
tableName: "core_users_confirm_emails";
|
|
443
|
+
dataType: "string";
|
|
444
|
+
columnType: "PgVarchar";
|
|
445
|
+
data: string;
|
|
446
|
+
driverParam: string;
|
|
447
|
+
notNull: true;
|
|
448
|
+
hasDefault: false;
|
|
449
|
+
isPrimaryKey: false;
|
|
450
|
+
isAutoincrement: false;
|
|
451
|
+
hasRuntimeDefault: false;
|
|
452
|
+
enumValues: [string, ...string[]];
|
|
453
|
+
baseColumn: never;
|
|
454
|
+
identity: undefined;
|
|
455
|
+
generated: undefined;
|
|
456
|
+
}, {}, {
|
|
457
|
+
length: 40;
|
|
458
|
+
}>;
|
|
440
459
|
};
|
|
441
460
|
dialect: "pg";
|
|
442
461
|
}>, "enableRLS">;
|
|
@@ -500,8 +519,8 @@ export declare const core_users_forgot_password: Omit<import("drizzle-orm/pg-cor
|
|
|
500
519
|
}, {}, {
|
|
501
520
|
length: 100;
|
|
502
521
|
}>;
|
|
503
|
-
|
|
504
|
-
name: "
|
|
522
|
+
ipAddress: import("drizzle-orm/pg-core").PgColumn<{
|
|
523
|
+
name: "ipAddress";
|
|
505
524
|
tableName: "core_users_forgot_password";
|
|
506
525
|
dataType: "string";
|
|
507
526
|
columnType: "PgVarchar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/database/users.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA+BV,CAAC;AAEd,eAAO,MAAM,oBAAoB;;;;;;EAkB9B,CAAC;AAEJ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkBd,CAAC;AAEd,eAAO,MAAM,wBAAwB;;EAQpC,CAAC;AAEF,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/database/users.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA+BV,CAAC;AAEd,eAAO,MAAM,oBAAoB;;;;;;EAkB9B,CAAC;AAEJ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkBd,CAAC;AAEd,eAAO,MAAM,wBAAwB;;EAQpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAezB,CAAC;AAEd,eAAO,MAAM,mCAAmC;;EAQ/C,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAgB1B,CAAC;AAEd,eAAO,MAAM,oCAAoC;;EAQhD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { relations } from "drizzle-orm";
|
|
|
2
2
|
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
3
|
import { core_languages } from "./languages.js";
|
|
4
4
|
import { core_roles } from "./roles.js";
|
|
5
|
-
export const core_users = pgTable(
|
|
5
|
+
export const core_users = pgTable("core_users", (t)=>({
|
|
6
6
|
id: t.serial().primaryKey(),
|
|
7
7
|
nameCode: t.varchar({
|
|
8
8
|
length: 255
|
|
@@ -27,13 +27,13 @@ export const core_users = pgTable('core_users', (t)=>({
|
|
|
27
27
|
}).notNull(),
|
|
28
28
|
language: t.varchar({
|
|
29
29
|
length: 32
|
|
30
|
-
}).notNull().default(
|
|
31
|
-
onDelete:
|
|
30
|
+
}).notNull().default("en").references(()=>core_languages.code, {
|
|
31
|
+
onDelete: "set default"
|
|
32
32
|
})
|
|
33
33
|
}), (t)=>[
|
|
34
|
-
index(
|
|
35
|
-
index(
|
|
36
|
-
index(
|
|
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
37
|
]).enableRLS();
|
|
38
38
|
export const core_users_relations = relations(core_users, ({ one, many })=>({
|
|
39
39
|
group: one(core_roles, {
|
|
@@ -70,9 +70,9 @@ export const core_users_relations = relations(core_users, ({ one, many })=>({
|
|
|
70
70
|
]
|
|
71
71
|
})
|
|
72
72
|
}));
|
|
73
|
-
export const core_users_sso = pgTable(
|
|
73
|
+
export const core_users_sso = pgTable("core_users_sso", (t)=>({
|
|
74
74
|
userId: t.integer().references(()=>core_users.id, {
|
|
75
|
-
onDelete:
|
|
75
|
+
onDelete: "cascade"
|
|
76
76
|
}).notNull(),
|
|
77
77
|
providerId: t.varchar({
|
|
78
78
|
length: 255
|
|
@@ -83,7 +83,7 @@ export const core_users_sso = pgTable('core_users_sso', (t)=>({
|
|
|
83
83
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
84
84
|
updatedAt: t.timestamp().notNull().$onUpdate(()=>new Date())
|
|
85
85
|
}), (t)=>[
|
|
86
|
-
index(
|
|
86
|
+
index("core_users_sso_user_id_idx").on(t.userId)
|
|
87
87
|
]).enableRLS();
|
|
88
88
|
export const core_users_sso_relations = relations(core_users_sso, ({ one })=>({
|
|
89
89
|
user: one(core_users, {
|
|
@@ -95,16 +95,19 @@ export const core_users_sso_relations = relations(core_users_sso, ({ one })=>({
|
|
|
95
95
|
]
|
|
96
96
|
})
|
|
97
97
|
}));
|
|
98
|
-
export const core_users_confirm_emails = pgTable(
|
|
98
|
+
export const core_users_confirm_emails = pgTable("core_users_confirm_emails", (t)=>({
|
|
99
99
|
id: t.serial().primaryKey(),
|
|
100
100
|
userId: t.integer().references(()=>core_users.id, {
|
|
101
|
-
onDelete:
|
|
101
|
+
onDelete: "cascade"
|
|
102
102
|
}).notNull(),
|
|
103
103
|
token: t.varchar({
|
|
104
104
|
length: 100
|
|
105
105
|
}).notNull().unique(),
|
|
106
106
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
107
|
-
expires: t.timestamp().notNull()
|
|
107
|
+
expires: t.timestamp().notNull(),
|
|
108
|
+
ipAddress: t.varchar({
|
|
109
|
+
length: 40
|
|
110
|
+
}).notNull()
|
|
108
111
|
})).enableRLS();
|
|
109
112
|
export const core_users_confirm_emails_relations = relations(core_users_confirm_emails, ({ one })=>({
|
|
110
113
|
user: one(core_users, {
|
|
@@ -116,15 +119,15 @@ export const core_users_confirm_emails_relations = relations(core_users_confirm_
|
|
|
116
119
|
]
|
|
117
120
|
})
|
|
118
121
|
}));
|
|
119
|
-
export const core_users_forgot_password = pgTable(
|
|
122
|
+
export const core_users_forgot_password = pgTable("core_users_forgot_password", (t)=>({
|
|
120
123
|
id: t.serial().primaryKey(),
|
|
121
124
|
userId: t.integer().references(()=>core_users.id, {
|
|
122
|
-
onDelete:
|
|
125
|
+
onDelete: "cascade"
|
|
123
126
|
}).notNull().unique(),
|
|
124
127
|
token: t.varchar({
|
|
125
128
|
length: 100
|
|
126
129
|
}).notNull().unique(),
|
|
127
|
-
|
|
130
|
+
ipAddress: t.varchar({
|
|
128
131
|
length: 40
|
|
129
132
|
}).notNull(),
|
|
130
133
|
createdAt: t.timestamp().notNull().defaultNow(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Config } from
|
|
2
|
-
import type { VitNodeApiConfig } from
|
|
1
|
+
import type { Config } from "drizzle-kit";
|
|
2
|
+
import type { VitNodeApiConfig } from "./vitnode.config";
|
|
3
3
|
export declare const defineVitNodeDrizzleConfig: ({ vitNodeApiConfig, ...args }: Config & {
|
|
4
4
|
vitNodeApiConfig: VitNodeApiConfig;
|
|
5
5
|
}) => Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.config.d.ts","sourceRoot":"","sources":["../../src/drizzle.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drizzle.config.d.ts","sourceRoot":"","sources":["../../src/drizzle.config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,eAAO,MAAM,0BAA0B,GAAI,+BAGxC,MAAM,GAAG;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,WA8EA,CAAC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
1
3
|
import { defineConfig } from "drizzle-kit";
|
|
2
|
-
import { existsSync, readdirSync } from "fs";
|
|
3
|
-
import { join, resolve } from "path";
|
|
4
4
|
export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
5
5
|
const pluginId = vitNodeApiConfig.plugins.map((plugin)=>plugin.pluginId);
|
|
6
6
|
const findMonorepoRoot = (startPath)=>{
|
|
7
7
|
let currentPath = startPath;
|
|
8
|
-
while(currentPath !== resolve(currentPath,
|
|
9
|
-
const turboConfigPath = join(currentPath,
|
|
8
|
+
while(currentPath !== resolve(currentPath, "..")){
|
|
9
|
+
const turboConfigPath = join(currentPath, "turbo.json");
|
|
10
10
|
if (existsSync(turboConfigPath)) {
|
|
11
11
|
return currentPath;
|
|
12
12
|
}
|
|
13
|
-
currentPath = resolve(currentPath,
|
|
13
|
+
currentPath = resolve(currentPath, "..");
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
};
|
|
17
17
|
const checkPluginPath = (basePath, itemId)=>{
|
|
18
|
-
const pluginPath = resolve(basePath,
|
|
18
|
+
const pluginPath = resolve(basePath, "node_modules", itemId, "dist", "src", "database");
|
|
19
19
|
// Check if the plugin path exists
|
|
20
20
|
if (!existsSync(pluginPath)) {
|
|
21
21
|
return null;
|
|
@@ -23,10 +23,10 @@ export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
|
23
23
|
// Check if there are any .js files in the directory
|
|
24
24
|
try {
|
|
25
25
|
const files = readdirSync(pluginPath);
|
|
26
|
-
const hasSchemaFiles = files.some((file)=>file.endsWith(
|
|
26
|
+
const hasSchemaFiles = files.some((file)=>file.endsWith(".js"));
|
|
27
27
|
if (!hasSchemaFiles) return null;
|
|
28
28
|
// Return glob pattern for schema files
|
|
29
|
-
return join(pluginPath,
|
|
29
|
+
return join(pluginPath, "*.js").replace(/\\/g, "/");
|
|
30
30
|
} catch {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
|
34
34
|
const cwd = process.cwd();
|
|
35
35
|
const monorepoRoot = findMonorepoRoot(cwd);
|
|
36
36
|
const pluginPaths = [
|
|
37
|
-
|
|
37
|
+
"@vitnode/core",
|
|
38
38
|
...pluginId
|
|
39
39
|
].flatMap((itemId)=>{
|
|
40
40
|
const paths = [];
|
|
@@ -48,12 +48,19 @@ export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
|
48
48
|
}
|
|
49
49
|
return paths;
|
|
50
50
|
}).filter((pluginPath)=>pluginPath !== null);
|
|
51
|
+
// Normalize args.schema into an array without nested ternary expressions
|
|
52
|
+
let baseSchemas = [];
|
|
53
|
+
if (Array.isArray(args.schema)) {
|
|
54
|
+
baseSchemas = args.schema;
|
|
55
|
+
} else if (args.schema) {
|
|
56
|
+
baseSchemas = [
|
|
57
|
+
args.schema
|
|
58
|
+
];
|
|
59
|
+
}
|
|
51
60
|
return defineConfig({
|
|
52
61
|
...args,
|
|
53
62
|
schema: [
|
|
54
|
-
...
|
|
55
|
-
args.schema
|
|
56
|
-
] : [],
|
|
63
|
+
...baseSchemas,
|
|
57
64
|
...pluginPaths
|
|
58
65
|
]
|
|
59
66
|
});
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
src: Blob | string;
|
|
1
|
+
import { type TailwindConfig } from "@react-email/components";
|
|
2
|
+
import type { EmailModelSendArgs } from "../api/models/email";
|
|
3
|
+
export interface DefaultTemplateEmailProps extends Pick<EmailModelSendArgs, "user"> {
|
|
4
|
+
i18n: {
|
|
5
|
+
locale: string;
|
|
6
|
+
messages: Record<string, any>;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
templateProps: {
|
|
9
|
+
head?: React.ReactNode;
|
|
10
|
+
logo?: {
|
|
11
|
+
src?: string;
|
|
12
|
+
text?: string;
|
|
13
|
+
};
|
|
14
|
+
metadata: {
|
|
15
|
+
shortTitle?: string;
|
|
16
|
+
title: string;
|
|
17
|
+
url: string;
|
|
18
|
+
};
|
|
19
|
+
previewText?: string;
|
|
20
|
+
tailwindConfig?: TailwindConfig;
|
|
14
21
|
};
|
|
15
|
-
previewText?: string;
|
|
16
22
|
}
|
|
17
|
-
declare function DefaultTemplateEmail({
|
|
23
|
+
declare function DefaultTemplateEmail({ children, i18n: { locale }, templateProps: { logo, metadata, previewText, head, tailwindConfig }, }: DefaultTemplateEmailProps & {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
26
|
declare namespace DefaultTemplateEmail {
|
|
19
27
|
var PreviewProps: {
|
|
20
28
|
children: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
templateProps: {
|
|
30
|
+
metadata: {
|
|
31
|
+
title: string;
|
|
32
|
+
shortTitle: string;
|
|
33
|
+
url: string;
|
|
34
|
+
};
|
|
35
|
+
logo: {
|
|
36
|
+
src: string;
|
|
37
|
+
};
|
|
25
38
|
};
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
i18n: {
|
|
40
|
+
messages: {};
|
|
41
|
+
locale: string;
|
|
28
42
|
};
|
|
29
|
-
messages: {};
|
|
30
|
-
locale: string;
|
|
31
43
|
};
|
|
32
44
|
}
|
|
33
45
|
export default DefaultTemplateEmail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-template.d.ts","sourceRoot":"","sources":["../../../src/emails/default-template.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-template.d.ts","sourceRoot":"","sources":["../../../src/emails/default-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAsB7D,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACxC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QAEf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC/B,CAAC;IACF,aAAa,EAAE;QACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,IAAI,CAAC,EAAE;YACL,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;QACF,QAAQ,EAAE;YACR,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,KAAK,EAAE,MAAM,CAAC;YACd,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,cAAc,CAAC;KACjC,CAAC;CACH;AAGD,iBAAwB,oBAAoB,CAAC,EAC3C,QAAQ,EACR,IAAI,EAAE,EAAE,MAAM,EAAE,EAChB,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,GACrE,EAAE,yBAAyB,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAwG3D;kBA5GuB,oBAAoB;;;;;;;;;;;;;;;;;;;eAApB,oBAAoB"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Body,
|
|
3
|
-
import { createTranslator } from "use-intl";
|
|
2
|
+
import { Body, Container, Head, Html, Img, Link, Preview, Section, Tailwind, Text } from "@react-email/components";
|
|
4
3
|
import { CONFIG } from "../lib/config.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
DefaultTemplateEmail.PreviewProps = {
|
|
5
|
+
children: "This is a preview text for the email template.",
|
|
6
|
+
templateProps: {
|
|
7
|
+
metadata: {
|
|
8
|
+
title: "VitNode - Email Template",
|
|
9
|
+
shortTitle: "VitNode",
|
|
10
|
+
url: CONFIG.web.href
|
|
11
|
+
},
|
|
12
|
+
logo: {
|
|
13
|
+
src: "http://localhost:3000/logo_vitnode_dark.png"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
i18n: {
|
|
17
|
+
messages: {},
|
|
18
|
+
locale: "en"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: <needed>
|
|
22
|
+
export default function DefaultTemplateEmail({ children, i18n: { locale }, templateProps: { logo, metadata, previewText, head, tailwindConfig } }) {
|
|
10
23
|
return /*#__PURE__*/ _jsxs(Html, {
|
|
11
24
|
lang: locale,
|
|
12
25
|
children: [
|
|
@@ -18,13 +31,32 @@ export default function DefaultTemplateEmail({ previewText, head, children, logo
|
|
|
18
31
|
}),
|
|
19
32
|
/*#__PURE__*/ _jsx(Tailwind, {
|
|
20
33
|
config: {
|
|
34
|
+
...tailwindConfig,
|
|
21
35
|
theme: {
|
|
36
|
+
...tailwindConfig?.theme,
|
|
22
37
|
extend: {
|
|
38
|
+
...tailwindConfig?.theme?.extend,
|
|
23
39
|
colors: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
foreground:
|
|
27
|
-
|
|
40
|
+
...tailwindConfig?.theme?.extend?.colors,
|
|
41
|
+
background: tailwindConfig?.theme?.extend?.colors?.["background"] ?? "#edf2f8",
|
|
42
|
+
foreground: tailwindConfig?.theme?.extend?.colors?.["foreground"] ?? "#0e1216",
|
|
43
|
+
card: tailwindConfig?.theme?.extend?.colors?.["card"] ?? "#ffffff",
|
|
44
|
+
"card-foreground": tailwindConfig?.theme?.extend?.colors?.["card-foreground"] ?? "#171b1f",
|
|
45
|
+
popover: tailwindConfig?.theme?.extend?.colors?.["popover"] ?? "#ffffff",
|
|
46
|
+
"popover-foreground": tailwindConfig?.theme?.extend?.colors?.["popover-foreground"] ?? "#171b1f",
|
|
47
|
+
primary: tailwindConfig?.theme?.extend?.colors?.["primary"] ?? "#3160c0",
|
|
48
|
+
"primary-foreground": tailwindConfig?.theme?.extend?.colors?.["primary-foreground"] ?? "#fafafa",
|
|
49
|
+
secondary: tailwindConfig?.theme?.extend?.colors?.["secondary"] ?? "#f4f9ff",
|
|
50
|
+
"secondary-foreground": tailwindConfig?.theme?.extend?.colors?.["secondary-foreground"] ?? "#1e2226",
|
|
51
|
+
muted: tailwindConfig?.theme?.extend?.colors?.["muted"] ?? "#eaeff5",
|
|
52
|
+
"muted-foreground": tailwindConfig?.theme?.extend?.colors?.["muted-foreground"] ?? "#686c72",
|
|
53
|
+
accent: tailwindConfig?.theme?.extend?.colors?.["accent"] ?? "#e0e5eb",
|
|
54
|
+
"accent-foreground": tailwindConfig?.theme?.extend?.colors?.["accent-foreground"] ?? "#1e2226",
|
|
55
|
+
destructive: tailwindConfig?.theme?.extend?.colors?.["destructive"] ?? "#de3b3f",
|
|
56
|
+
warn: tailwindConfig?.theme?.extend?.colors?.["warn"] ?? "#906600",
|
|
57
|
+
border: tailwindConfig?.theme?.extend?.colors?.["border"] ?? "#d9dfe4",
|
|
58
|
+
input: tailwindConfig?.theme?.extend?.colors?.["input"] ?? "#d9dfe4",
|
|
59
|
+
ring: tailwindConfig?.theme?.extend?.colors?.["ring"] ?? "#5aa3ec"
|
|
28
60
|
}
|
|
29
61
|
}
|
|
30
62
|
}
|
|
@@ -35,53 +67,29 @@ export default function DefaultTemplateEmail({ previewText, head, children, logo
|
|
|
35
67
|
className: "mx-auto max-w-[465px]",
|
|
36
68
|
children: [
|
|
37
69
|
/*#__PURE__*/ _jsx(Section, {
|
|
38
|
-
className: "
|
|
39
|
-
children: logo ? /*#__PURE__*/ _jsx(Img, {
|
|
40
|
-
alt: metadata.title,
|
|
70
|
+
className: "my-8",
|
|
71
|
+
children: logo?.src ? /*#__PURE__*/ _jsx(Img, {
|
|
72
|
+
alt: logo.text ?? metadata.title,
|
|
41
73
|
className: "mx-auto my-0 max-w-[150px]",
|
|
42
|
-
src:
|
|
74
|
+
src: logo.src
|
|
43
75
|
}) : /*#__PURE__*/ _jsx(Text, {
|
|
44
76
|
className: "m-0 text-center text-2xl",
|
|
45
|
-
children: metadata.title
|
|
77
|
+
children: logo?.text ?? metadata.title
|
|
46
78
|
})
|
|
47
79
|
}),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ _jsxs(Button, {
|
|
63
|
-
className: "bg-primary px-3 py-2 font-medium leading-4 text-white",
|
|
64
|
-
href: "https://example.com",
|
|
65
|
-
children: [
|
|
66
|
-
previewText,
|
|
67
|
-
"Click me"
|
|
68
|
-
]
|
|
69
|
-
}),
|
|
70
|
-
children,
|
|
71
|
-
/*#__PURE__*/ _jsx(Section, {
|
|
72
|
-
className: "my-8 text-center text-sm",
|
|
73
|
-
children: /*#__PURE__*/ _jsxs(Link, {
|
|
74
|
-
className: "text-muted-foreground",
|
|
75
|
-
href: metadata.url,
|
|
76
|
-
children: [
|
|
77
|
-
metadata.shortTitle ?? metadata.title,
|
|
78
|
-
" ©",
|
|
79
|
-
' ',
|
|
80
|
-
new Date().getFullYear()
|
|
81
|
-
]
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
]
|
|
80
|
+
children,
|
|
81
|
+
/*#__PURE__*/ _jsx(Section, {
|
|
82
|
+
className: "my-8 text-center text-sm",
|
|
83
|
+
children: /*#__PURE__*/ _jsxs(Link, {
|
|
84
|
+
className: "text-muted-foreground",
|
|
85
|
+
href: metadata.url,
|
|
86
|
+
children: [
|
|
87
|
+
metadata.shortTitle ?? metadata.title,
|
|
88
|
+
" ©",
|
|
89
|
+
" ",
|
|
90
|
+
new Date().getFullYear()
|
|
91
|
+
]
|
|
92
|
+
})
|
|
85
93
|
})
|
|
86
94
|
]
|
|
87
95
|
})
|
|
@@ -90,16 +98,3 @@ export default function DefaultTemplateEmail({ previewText, head, children, logo
|
|
|
90
98
|
]
|
|
91
99
|
});
|
|
92
100
|
}
|
|
93
|
-
DefaultTemplateEmail.PreviewProps = {
|
|
94
|
-
children: 'This is a preview text for the email template.',
|
|
95
|
-
metadata: {
|
|
96
|
-
title: 'VitNode - Email Template',
|
|
97
|
-
shortTitle: 'VitNode',
|
|
98
|
-
url: CONFIG.web.href
|
|
99
|
-
},
|
|
100
|
-
logo: {
|
|
101
|
-
src: 'https://www.reactemailtemplate.com/_next/static/media/reactemailtemplate-logo.b3fb12d9.png'
|
|
102
|
-
},
|
|
103
|
-
messages: {},
|
|
104
|
-
locale: 'en'
|
|
105
|
-
};
|