@vitnode/core 1.2.0-canary.10 → 1.2.0-canary.11
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/README.md +16 -0
- package/package.json +19 -2
- package/dist/emails/my-email.d.ts +0 -2
- package/dist/emails/my-email.d.ts.map +0 -1
- package/dist/scripts/get-config.d.ts +0 -3
- package/dist/scripts/get-config.d.ts.map +0 -1
- package/dist/scripts/plugin.d.ts +0 -4
- package/dist/scripts/plugin.d.ts.map +0 -1
- package/dist/scripts/prepare-database.d.ts +0 -7
- package/dist/scripts/prepare-database.d.ts.map +0 -1
- package/dist/scripts/prepare-plugins-files.d.ts +0 -2
- package/dist/scripts/prepare-plugins-files.d.ts.map +0 -1
- package/dist/scripts/run-interactive-shell-command.d.ts +0 -2
- package/dist/scripts/run-interactive-shell-command.d.ts.map +0 -1
- package/dist/scripts/scripts.d.ts +0 -3
- package/dist/scripts/scripts.d.ts.map +0 -1
- package/dist/scripts/shared/file-utils.d.ts +0 -14
- package/dist/scripts/shared/file-utils.d.ts.map +0 -1
- package/dist/src/api/config.d.ts +0 -24
- package/dist/src/api/config.d.ts.map +0 -1
- package/dist/src/api/config.js +0 -50
- package/dist/src/api/lib/check-plugin-id.d.ts +0 -15
- package/dist/src/api/lib/check-plugin-id.d.ts.map +0 -1
- package/dist/src/api/lib/check-plugin-id.js +0 -15
- package/dist/src/api/lib/get-user-ip.d.ts +0 -3
- package/dist/src/api/lib/get-user-ip.d.ts.map +0 -1
- package/dist/src/api/lib/get-user-ip.js +0 -8
- package/dist/src/api/lib/module.d.ts +0 -23
- package/dist/src/api/lib/module.d.ts.map +0 -1
- package/dist/src/api/lib/module.js +0 -21
- package/dist/src/api/lib/plugin.d.ts +0 -11
- package/dist/src/api/lib/plugin.d.ts.map +0 -1
- package/dist/src/api/lib/plugin.js +0 -14
- package/dist/src/api/lib/route.d.ts +0 -26
- package/dist/src/api/lib/route.d.ts.map +0 -1
- package/dist/src/api/lib/route.js +0 -23
- package/dist/src/api/lib/with-pagination.d.ts +0 -72
- package/dist/src/api/lib/with-pagination.d.ts.map +0 -1
- package/dist/src/api/lib/with-pagination.js +0 -70
- package/dist/src/api/middlewares/global/global.d.ts +0 -66
- package/dist/src/api/middlewares/global/global.d.ts.map +0 -1
- package/dist/src/api/middlewares/global/global.js +0 -47
- package/dist/src/api/models/device.d.ts +0 -10
- package/dist/src/api/models/device.d.ts.map +0 -1
- package/dist/src/api/models/device.js +0 -54
- package/dist/src/api/models/email.d.ts +0 -22
- package/dist/src/api/models/email.d.ts.map +0 -1
- package/dist/src/api/models/email.js +0 -30
- package/dist/src/api/models/password.d.ts +0 -5
- package/dist/src/api/models/password.d.ts.map +0 -1
- package/dist/src/api/models/password.js +0 -21
- package/dist/src/api/models/session-admin.d.ts +0 -24
- package/dist/src/api/models/session-admin.d.ts.map +0 -1
- package/dist/src/api/models/session-admin.js +0 -73
- package/dist/src/api/models/session.d.ts +0 -23
- package/dist/src/api/models/session.d.ts.map +0 -1
- package/dist/src/api/models/session.js +0 -60
- package/dist/src/api/models/sso.d.ts +0 -38
- package/dist/src/api/models/sso.d.ts.map +0 -1
- package/dist/src/api/models/sso.js +0 -120
- package/dist/src/api/models/user/get-user-by-id.d.ts +0 -17
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +0 -1
- package/dist/src/api/models/user/get-user-by-id.js +0 -18
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +0 -10
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +0 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +0 -22
- package/dist/src/api/models/user/sign-up.d.ts +0 -21
- package/dist/src/api/models/user/sign-up.d.ts.map +0 -1
- package/dist/src/api/models/user/sign-up.js +0 -75
- package/dist/src/api/models/user.d.ts +0 -45
- package/dist/src/api/models/user.d.ts.map +0 -1
- package/dist/src/api/models/user.js +0 -8
- package/dist/src/api/modules/admin/admin.module.d.ts +0 -294
- package/dist/src/api/modules/admin/admin.module.d.ts.map +0 -1
- package/dist/src/api/modules/admin/admin.module.js +0 -14
- package/dist/src/api/modules/admin/routes/session.route.d.ts +0 -108
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/routes/session.route.js +0 -51
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +0 -190
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/users/routes/list.route.js +0 -79
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +0 -193
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +0 -1
- package/dist/src/api/modules/admin/users/routes/users.route.js +0 -84
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +0 -189
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +0 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +0 -10
- package/dist/src/api/modules/middleware/middleware.module.d.ts +0 -52
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +0 -1
- package/dist/src/api/modules/middleware/middleware.module.js +0 -10
- package/dist/src/api/modules/middleware/route.d.ts +0 -53
- package/dist/src/api/modules/middleware/route.d.ts.map +0 -1
- package/dist/src/api/modules/middleware/route.js +0 -39
- package/dist/src/api/modules/users/avatar-color.d.ts +0 -2
- package/dist/src/api/modules/users/avatar-color.d.ts.map +0 -1
- package/dist/src/api/modules/users/avatar-color.js +0 -43
- package/dist/src/api/modules/users/routes/session.route.d.ts +0 -103
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/routes/session.route.js +0 -46
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +0 -88
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/routes/sign-in.route.js +0 -71
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +0 -47
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/routes/sign-out.route.js +0 -43
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +0 -89
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +0 -60
- package/dist/src/api/modules/users/routes/test.route.d.ts +0 -31
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/routes/test.route.js +0 -32
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +0 -78
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +0 -49
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +0 -51
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +0 -1
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +0 -36
- package/dist/src/api/modules/users/sso/sso.module.d.ts +0 -125
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +0 -1
- package/dist/src/api/modules/users/sso/sso.module.js +0 -12
- package/dist/src/api/modules/users/users.module.d.ts +0 -439
- package/dist/src/api/modules/users/users.module.d.ts.map +0 -1
- package/dist/src/api/modules/users/users.module.js +0 -22
- package/dist/src/api/plugin.d.ts +0 -2
- package/dist/src/api/plugin.d.ts.map +0 -1
- package/dist/src/api/plugin.js +0 -13
- package/dist/src/api/plugins/email/nodemailer.d.ts +0 -10
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +0 -1
- package/dist/src/api/plugins/email/nodemailer.js +0 -30
- package/dist/src/api/plugins/email/resend.d.ts +0 -6
- package/dist/src/api/plugins/email/resend.d.ts.map +0 -1
- package/dist/src/api/plugins/email/resend.js +0 -21
- package/dist/src/api/plugins/sso/discord.d.ts +0 -6
- package/dist/src/api/plugins/sso/discord.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/discord.js +0 -77
- package/dist/src/api/plugins/sso/facebook.d.ts +0 -6
- package/dist/src/api/plugins/sso/facebook.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/facebook.js +0 -76
- package/dist/src/api/plugins/sso/google.d.ts +0 -6
- package/dist/src/api/plugins/sso/google.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/google.js +0 -87
- package/dist/src/app/login/page.d.ts +0 -6
- package/dist/src/app/login/page.d.ts.map +0 -1
- package/dist/src/app/login/page.js +0 -15
- package/dist/src/app/login/sso/[providerId]/page.d.ts +0 -7
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +0 -1
- package/dist/src/app/login/sso/[providerId]/page.js +0 -10
- package/dist/src/app/register/page.d.ts +0 -6
- package/dist/src/app/register/page.d.ts.map +0 -1
- package/dist/src/app/register/page.js +0 -15
- package/dist/src/app_admin/core/page.d.ts +0 -2
- package/dist/src/app_admin/core/page.d.ts.map +0 -1
- package/dist/src/app_admin/core/page.js +0 -5
- package/dist/src/app_admin/core/test/page.d.ts +0 -2
- package/dist/src/app_admin/core/test/page.d.ts.map +0 -1
- package/dist/src/app_admin/core/test/page.js +0 -5
- package/dist/src/app_admin/core/users/page.d.ts +0 -6
- package/dist/src/app_admin/core/users/page.d.ts.map +0 -1
- package/dist/src/app_admin/core/users/page.js +0 -35
- package/dist/src/components/avatar.d.ts +0 -10
- package/dist/src/components/avatar.d.ts.map +0 -1
- package/dist/src/components/avatar.js +0 -14
- package/dist/src/components/date-format.d.ts +0 -5
- package/dist/src/components/date-format.d.ts.map +0 -1
- package/dist/src/components/date-format.js +0 -38
- package/dist/src/components/form/auto-form.d.ts +0 -12
- package/dist/src/components/form/auto-form.d.ts.map +0 -1
- package/dist/src/components/form/auto-form.js +0 -57
- package/dist/src/components/form/common/desc.d.ts +0 -2
- package/dist/src/components/form/common/desc.d.ts.map +0 -1
- package/dist/src/components/form/common/desc.js +0 -9
- package/dist/src/components/form/common/label.d.ts +0 -3
- package/dist/src/components/form/common/label.d.ts.map +0 -1
- package/dist/src/components/form/common/label.js +0 -8
- package/dist/src/components/form/fields/checkbox.d.ts +0 -8
- package/dist/src/components/form/fields/checkbox.d.ts.map +0 -1
- package/dist/src/components/form/fields/checkbox.js +0 -35
- package/dist/src/components/form/fields/combobox.d.ts +0 -14
- package/dist/src/components/form/fields/combobox.d.ts.map +0 -1
- package/dist/src/components/form/fields/combobox.js +0 -88
- package/dist/src/components/form/fields/input.d.ts +0 -9
- package/dist/src/components/form/fields/input.d.ts.map +0 -1
- package/dist/src/components/form/fields/input.js +0 -34
- package/dist/src/components/form/fields/item.d.ts +0 -14
- package/dist/src/components/form/fields/item.d.ts.map +0 -1
- package/dist/src/components/form/fields/item.js +0 -22
- package/dist/src/components/form/fields/radio-group.d.ts +0 -13
- package/dist/src/components/form/fields/radio-group.d.ts.map +0 -1
- package/dist/src/components/form/fields/radio-group.js +0 -51
- package/dist/src/components/form/fields/select.d.ts +0 -14
- package/dist/src/components/form/fields/select.d.ts.map +0 -1
- package/dist/src/components/form/fields/select.js +0 -59
- package/dist/src/components/form/fields/switch.d.ts +0 -8
- package/dist/src/components/form/fields/switch.d.ts.map +0 -1
- package/dist/src/components/form/fields/switch.js +0 -35
- package/dist/src/components/form/fields/textarea.d.ts +0 -9
- package/dist/src/components/form/fields/textarea.d.ts.map +0 -1
- package/dist/src/components/form/fields/textarea.js +0 -34
- package/dist/src/components/i18n-provider.d.ts +0 -7
- package/dist/src/components/i18n-provider.d.ts.map +0 -1
- package/dist/src/components/i18n-provider.js +0 -43
- package/dist/src/components/logo-vitnode.d.ts +0 -4
- package/dist/src/components/logo-vitnode.d.ts.map +0 -1
- package/dist/src/components/logo-vitnode.js +0 -113
- package/dist/src/components/switchers/theme-switcher.d.ts +0 -2
- package/dist/src/components/switchers/theme-switcher.d.ts.map +0 -1
- package/dist/src/components/switchers/theme-switcher.js +0 -25
- package/dist/src/components/table/content.d.ts +0 -3
- package/dist/src/components/table/content.d.ts.map +0 -1
- package/dist/src/components/table/content.js +0 -84
- package/dist/src/components/table/data-table.d.ts +0 -37
- package/dist/src/components/table/data-table.d.ts.map +0 -1
- package/dist/src/components/table/data-table.js +0 -69
- package/dist/src/components/table/order-table-head.d.ts +0 -7
- package/dist/src/components/table/order-table-head.d.ts.map +0 -1
- package/dist/src/components/table/order-table-head.js +0 -39
- package/dist/src/components/table/pagination.d.ts +0 -11
- package/dist/src/components/table/pagination.d.ts.map +0 -1
- package/dist/src/components/table/pagination.js +0 -122
- package/dist/src/components/ui/accordion.d.ts +0 -8
- package/dist/src/components/ui/accordion.d.ts.map +0 -1
- package/dist/src/components/ui/accordion.js +0 -47
- package/dist/src/components/ui/alert-dialog.d.ts +0 -15
- package/dist/src/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/src/components/ui/alert-dialog.js +0 -86
- package/dist/src/components/ui/alert.d.ts +0 -10
- package/dist/src/components/ui/alert.d.ts.map +0 -1
- package/dist/src/components/ui/alert.js +0 -40
- package/dist/src/components/ui/badge.d.ts +0 -10
- package/dist/src/components/ui/badge.d.ts.map +0 -1
- package/dist/src/components/ui/badge.js +0 -29
- package/dist/src/components/ui/button.d.ts +0 -13
- package/dist/src/components/ui/button.d.ts.map +0 -1
- package/dist/src/components/ui/button.js +0 -66
- package/dist/src/components/ui/card.d.ts +0 -10
- package/dist/src/components/ui/card.d.ts.map +0 -1
- package/dist/src/components/ui/card.js +0 -53
- package/dist/src/components/ui/checkbox.d.ts +0 -5
- package/dist/src/components/ui/checkbox.d.ts.map +0 -1
- package/dist/src/components/ui/checkbox.js +0 -21
- package/dist/src/components/ui/collapsible.d.ts +0 -6
- package/dist/src/components/ui/collapsible.d.ts.map +0 -1
- package/dist/src/components/ui/collapsible.js +0 -22
- package/dist/src/components/ui/command.d.ts +0 -19
- package/dist/src/components/ui/command.d.ts.map +0 -1
- package/dist/src/components/ui/command.js +0 -99
- package/dist/src/components/ui/context-menu.d.ts +0 -26
- package/dist/src/components/ui/context-menu.d.ts.map +0 -1
- package/dist/src/components/ui/context-menu.js +0 -141
- package/dist/src/components/ui/dialog.d.ts +0 -23
- package/dist/src/components/ui/dialog.d.ts.map +0 -1
- package/dist/src/components/ui/dialog.js +0 -181
- package/dist/src/components/ui/drawer.d.ts +0 -14
- package/dist/src/components/ui/drawer.d.ts.map +0 -1
- package/dist/src/components/ui/drawer.js +0 -84
- package/dist/src/components/ui/dropdown-menu.d.ts +0 -26
- package/dist/src/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/src/components/ui/dropdown-menu.js +0 -142
- package/dist/src/components/ui/form.d.ts +0 -33
- package/dist/src/components/ui/form.d.ts.map +0 -1
- package/dist/src/components/ui/form.js +0 -142
- package/dist/src/components/ui/header-content.d.ts +0 -17
- package/dist/src/components/ui/header-content.d.ts.map +0 -1
- package/dist/src/components/ui/header-content.js +0 -30
- package/dist/src/components/ui/hover-card.d.ts +0 -7
- package/dist/src/components/ui/hover-card.d.ts.map +0 -1
- package/dist/src/components/ui/hover-card.js +0 -30
- package/dist/src/components/ui/input-otp.d.ts +0 -12
- package/dist/src/components/ui/input-otp.d.ts.map +0 -1
- package/dist/src/components/ui/input-otp.js +0 -49
- package/dist/src/components/ui/input.d.ts +0 -4
- package/dist/src/components/ui/input.d.ts.map +0 -1
- package/dist/src/components/ui/input.js +0 -12
- package/dist/src/components/ui/label.d.ts +0 -5
- package/dist/src/components/ui/label.d.ts.map +0 -1
- package/dist/src/components/ui/label.js +0 -13
- package/dist/src/components/ui/loader.d.ts +0 -5
- package/dist/src/components/ui/loader.d.ts.map +0 -1
- package/dist/src/components/ui/loader.js +0 -16
- package/dist/src/components/ui/menubar.d.ts +0 -27
- package/dist/src/components/ui/menubar.d.ts.map +0 -1
- package/dist/src/components/ui/menubar.js +0 -152
- package/dist/src/components/ui/navigation-menu.d.ts +0 -15
- package/dist/src/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/src/components/ui/navigation-menu.js +0 -83
- package/dist/src/components/ui/popover.d.ts +0 -8
- package/dist/src/components/ui/popover.d.ts.map +0 -1
- package/dist/src/components/ui/popover.js +0 -35
- package/dist/src/components/ui/progress.d.ts +0 -5
- package/dist/src/components/ui/progress.d.ts.map +0 -1
- package/dist/src/components/ui/progress.js +0 -20
- package/dist/src/components/ui/radio-group.d.ts +0 -6
- package/dist/src/components/ui/radio-group.d.ts.map +0 -1
- package/dist/src/components/ui/radio-group.js +0 -28
- package/dist/src/components/ui/select.d.ts +0 -16
- package/dist/src/components/ui/select.d.ts.map +0 -1
- package/dist/src/components/ui/select.js +0 -114
- package/dist/src/components/ui/separator.d.ts +0 -5
- package/dist/src/components/ui/separator.d.ts.map +0 -1
- package/dist/src/components/ui/separator.js +0 -15
- package/dist/src/components/ui/sheet.d.ts +0 -14
- package/dist/src/components/ui/sheet.d.ts.map +0 -1
- package/dist/src/components/ui/sheet.js +0 -93
- package/dist/src/components/ui/sidebar.d.ts +0 -70
- package/dist/src/components/ui/sidebar.d.ts.map +0 -1
- package/dist/src/components/ui/sidebar.js +0 -437
- package/dist/src/components/ui/skeleton.d.ts +0 -3
- package/dist/src/components/ui/skeleton.d.ts.map +0 -1
- package/dist/src/components/ui/skeleton.js +0 -10
- package/dist/src/components/ui/slider.d.ts +0 -5
- package/dist/src/components/ui/slider.d.ts.map +0 -1
- package/dist/src/components/ui/slider.js +0 -42
- package/dist/src/components/ui/sonner.d.ts +0 -4
- package/dist/src/components/ui/sonner.d.ts.map +0 -1
- package/dist/src/components/ui/sonner.js +0 -26
- package/dist/src/components/ui/switch.d.ts +0 -5
- package/dist/src/components/ui/switch.d.ts.map +0 -1
- package/dist/src/components/ui/switch.js +0 -17
- package/dist/src/components/ui/table.d.ts +0 -11
- package/dist/src/components/ui/table.d.ts.map +0 -1
- package/dist/src/components/ui/table.js +0 -64
- package/dist/src/components/ui/tabs.d.ts +0 -8
- package/dist/src/components/ui/tabs.d.ts.map +0 -1
- package/dist/src/components/ui/tabs.js +0 -34
- package/dist/src/components/ui/textarea.d.ts +0 -4
- package/dist/src/components/ui/textarea.d.ts.map +0 -1
- package/dist/src/components/ui/textarea.js +0 -11
- package/dist/src/components/ui/toggle-group.d.ts +0 -8
- package/dist/src/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/src/components/ui/toggle-group.js +0 -41
- package/dist/src/components/ui/toggle.d.ts +0 -10
- package/dist/src/components/ui/toggle.d.ts.map +0 -1
- package/dist/src/components/ui/toggle.js +0 -35
- package/dist/src/components/ui/tooltip.d.ts +0 -8
- package/dist/src/components/ui/tooltip.d.ts.map +0 -1
- package/dist/src/components/ui/tooltip.js +0 -43
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts +0 -1
- package/dist/src/components/ui/unsaved-changes-dialog.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -5
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -4
- package/dist/src/database/admins.d.ts +0 -246
- package/dist/src/database/admins.d.ts.map +0 -1
- package/dist/src/database/admins.js +0 -74
- package/dist/src/database/languages.d.ts +0 -321
- package/dist/src/database/languages.d.ts.map +0 -1
- package/dist/src/database/languages.js +0 -52
- package/dist/src/database/moderators.d.ts +0 -114
- package/dist/src/database/moderators.d.ts.map +0 -1
- package/dist/src/database/moderators.js +0 -37
- package/dist/src/database/roles.d.ts +0 -146
- package/dist/src/database/roles.d.ts.map +0 -1
- package/dist/src/database/roles.js +0 -13
- package/dist/src/database/sessions.d.ts +0 -196
- package/dist/src/database/sessions.d.ts.map +0 -1
- package/dist/src/database/sessions.js +0 -57
- package/dist/src/database/users.d.ts +0 -562
- package/dist/src/database/users.d.ts.map +0 -1
- package/dist/src/database/users.js +0 -142
- package/dist/src/drizzle.config.d.ts +0 -6
- package/dist/src/drizzle.config.d.ts.map +0 -1
- package/dist/src/drizzle.config.js +0 -37
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts +0 -1
- package/dist/src/hooks/use-before-unload-with-dialog.d.ts.map +0 -1
- package/dist/src/hooks/use-before-unload.d.ts +0 -2
- package/dist/src/hooks/use-before-unload.d.ts.map +0 -1
- package/dist/src/hooks/use-before-unload.js +0 -30
- package/dist/src/hooks/use-mobile.d.ts +0 -2
- package/dist/src/hooks/use-mobile.d.ts.map +0 -1
- package/dist/src/hooks/use-mobile.js +0 -15
- package/dist/src/hooks/use-unsaved-changes.d.ts +0 -1
- package/dist/src/hooks/use-unsaved-changes.d.ts.map +0 -1
- package/dist/src/lib/api/get-middleware-api.d.ts +0 -8
- package/dist/src/lib/api/get-middleware-api.d.ts.map +0 -1
- package/dist/src/lib/api/get-middleware-api.js +0 -13
- package/dist/src/lib/api/get-session-admin-api.d.ts +0 -16
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +0 -1
- package/dist/src/lib/api/get-session-admin-api.js +0 -19
- package/dist/src/lib/api/get-session-api.d.ts +0 -17
- package/dist/src/lib/api/get-session-api.d.ts.map +0 -1
- package/dist/src/lib/api/get-session-api.js +0 -14
- package/dist/src/lib/colors.d.ts +0 -23
- package/dist/src/lib/colors.d.ts.map +0 -1
- package/dist/src/lib/colors.js +0 -131
- package/dist/src/lib/colors.test.d.ts +0 -2
- package/dist/src/lib/colors.test.d.ts.map +0 -1
- package/dist/src/lib/colors.test.js +0 -173
- package/dist/src/lib/config.d.ts +0 -6
- package/dist/src/lib/config.d.ts.map +0 -1
- package/dist/src/lib/config.js +0 -15
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +0 -10
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +0 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +0 -12
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +0 -2
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +0 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +0 -78
- package/dist/src/lib/fetcher/fetcher.d.ts +0 -9
- package/dist/src/lib/fetcher/fetcher.d.ts.map +0 -1
- package/dist/src/lib/fetcher/helpers.d.ts +0 -3
- package/dist/src/lib/fetcher/helpers.d.ts.map +0 -1
- package/dist/src/lib/fetcher/helpers.js +0 -33
- package/dist/src/lib/fetcher/helpers.test.d.ts +0 -2
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +0 -1
- package/dist/src/lib/fetcher/helpers.test.js +0 -37
- package/dist/src/lib/fetcher/index.d.ts +0 -34
- package/dist/src/lib/fetcher/index.d.ts.map +0 -1
- package/dist/src/lib/fetcher/types.d.ts +0 -120
- package/dist/src/lib/fetcher/types.d.ts.map +0 -1
- package/dist/src/lib/fetcher/types.js +0 -1
- package/dist/src/lib/fetcher.d.ts +0 -9
- package/dist/src/lib/fetcher.d.ts.map +0 -1
- package/dist/src/lib/fetcher.js +0 -47
- package/dist/src/lib/helpers/auto-form.d.ts +0 -10
- package/dist/src/lib/helpers/auto-form.d.ts.map +0 -1
- package/dist/src/lib/helpers/auto-form.js +0 -82
- package/dist/src/lib/helpers/auto-form.test.d.ts +0 -2
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +0 -1
- package/dist/src/lib/helpers/auto-form.test.js +0 -126
- package/dist/src/lib/navigation.d.ts +0 -339
- package/dist/src/lib/navigation.d.ts.map +0 -1
- package/dist/src/lib/navigation.js +0 -11
- package/dist/src/lib/plugin.d.ts +0 -15
- package/dist/src/lib/plugin.d.ts.map +0 -1
- package/dist/src/lib/plugin.js +0 -3
- package/dist/src/lib/special-characters.d.ts +0 -3
- package/dist/src/lib/special-characters.d.ts.map +0 -1
- package/dist/src/lib/special-characters.js +0 -4
- package/dist/src/lib/special-characters.test.d.ts +0 -2
- package/dist/src/lib/special-characters.test.d.ts.map +0 -1
- package/dist/src/lib/special-characters.test.js +0 -56
- package/dist/src/lib/utils.d.ts +0 -3
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/lib/utils.js +0 -5
- package/dist/src/tests/setup.d.ts +0 -2
- package/dist/src/tests/setup.d.ts.map +0 -1
- package/dist/src/tests/setup.js +0 -6
- package/dist/src/views/admin/layouts/admin-layout.d.ts +0 -8
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/admin-layout.js +0 -70
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +0 -11
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +0 -70
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +0 -10
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +0 -49
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +0 -3
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +0 -30
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +0 -4
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +0 -14
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +0 -7
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +0 -61
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +0 -3
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +0 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +0 -31
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +0 -2
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +0 -26
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +0 -2
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +0 -44
- package/dist/src/views/admin/views/core/test.d.ts +0 -2
- package/dist/src/views/admin/views/core/test.d.ts.map +0 -1
- package/dist/src/views/admin/views/core/test.js +0 -146
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +0 -4
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +0 -1
- package/dist/src/views/admin/views/core/users/users-admin-view.js +0 -90
- package/dist/src/views/auth/components/password-input.d.ts +0 -4
- package/dist/src/views/auth/components/password-input.d.ts.map +0 -1
- package/dist/src/views/auth/components/password-input.js +0 -89
- package/dist/src/views/auth/sign-in/form/form.d.ts +0 -4
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +0 -1
- package/dist/src/views/auth/sign-in/form/form.js +0 -59
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +0 -10
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +0 -1
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +0 -33
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +0 -27
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +0 -1
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +0 -38
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +0 -2
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +0 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +0 -55
- package/dist/src/views/auth/sign-up/form/form.d.ts +0 -4
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +0 -1
- package/dist/src/views/auth/sign-up/form/form.js +0 -88
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +0 -6
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +0 -1
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +0 -18
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +0 -61
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +0 -1
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +0 -57
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +0 -2
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +0 -1
- package/dist/src/views/auth/sign-up/sign-up-view.js +0 -61
- package/dist/src/views/auth/sso/buttons/client.d.ts +0 -5
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +0 -1
- package/dist/src/views/auth/sso/buttons/client.js +0 -22
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +0 -4
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +0 -1
- package/dist/src/views/auth/sso/buttons/mutation-api.js +0 -24
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +0 -3
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +0 -1
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +0 -51
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +0 -5
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +0 -1
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +0 -18
- package/dist/src/views/auth/sso/callback/client/client.d.ts +0 -6
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +0 -1
- package/dist/src/views/auth/sso/callback/client/client.js +0 -39
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +0 -8
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +0 -1
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +0 -27
- package/dist/src/views/error/back-button.d.ts +0 -5
- package/dist/src/views/error/back-button.d.ts.map +0 -1
- package/dist/src/views/error/back-button.js +0 -14
- package/dist/src/views/error/error-view.d.ts +0 -5
- package/dist/src/views/error/error-view.d.ts.map +0 -1
- package/dist/src/views/error/error-view.js +0 -56
- package/dist/src/views/error/global-error-view.d.ts +0 -6
- package/dist/src/views/error/global-error-view.d.ts.map +0 -1
- package/dist/src/views/error/global-error-view.js +0 -57
- package/dist/src/views/layouts/provider.d.ts +0 -11
- package/dist/src/views/layouts/provider.d.ts.map +0 -1
- package/dist/src/views/layouts/provider.js +0 -43
- package/dist/src/views/layouts/root-layout.d.ts +0 -16
- package/dist/src/views/layouts/root-layout.d.ts.map +0 -1
- package/dist/src/views/layouts/root-layout.js +0 -38
- package/dist/src/views/layouts/theme/header/header.d.ts +0 -4
- package/dist/src/views/layouts/theme/header/header.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/header/header.js +0 -32
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +0 -2
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +0 -33
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +0 -5
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.js +0 -47
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +0 -4
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +0 -27
- package/dist/src/views/layouts/theme/header/user/user.d.ts +0 -2
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/header/user/user.js +0 -34
- package/dist/src/views/layouts/theme/layout.d.ts +0 -5
- package/dist/src/views/layouts/theme/layout.d.ts.map +0 -1
- package/dist/src/views/layouts/theme/layout.js +0 -15
- package/dist/src/vitnode.config.d.ts +0 -50
- package/dist/src/vitnode.config.d.ts.map +0 -1
- package/dist/src/vitnode.config.js +0 -39
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsup.config.d.ts +0 -3
- package/dist/tsup.config.d.ts.map +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { setRequestLocale } from "next-intl/server";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { I18nProvider } from "../../components/i18n-provider";
|
|
5
|
-
import { RootProvider } from "./provider";
|
|
6
|
-
export const generateMetadataRootLayout = ({ metadata: { title, shortTitle } })=>{
|
|
7
|
-
return {
|
|
8
|
-
title: {
|
|
9
|
-
default: title,
|
|
10
|
-
template: `%s - ${shortTitle ?? title}`
|
|
11
|
-
},
|
|
12
|
-
description: 'Generated by create next app'
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export const RootLayout = async ({ children, className, params, head, config })=>{
|
|
16
|
-
const { locale } = await params;
|
|
17
|
-
setRequestLocale(locale);
|
|
18
|
-
return /*#__PURE__*/ _jsxs("html", {
|
|
19
|
-
lang: locale,
|
|
20
|
-
suppressHydrationWarning: true,
|
|
21
|
-
children: [
|
|
22
|
-
head && /*#__PURE__*/ _jsx("head", {
|
|
23
|
-
children: head
|
|
24
|
-
}),
|
|
25
|
-
/*#__PURE__*/ _jsx("body", {
|
|
26
|
-
className: className,
|
|
27
|
-
children: /*#__PURE__*/ _jsx(I18nProvider, {
|
|
28
|
-
namespaces: [],
|
|
29
|
-
children: /*#__PURE__*/ _jsx(RootProvider, {
|
|
30
|
-
debug: config.debug,
|
|
31
|
-
theme: config.theme,
|
|
32
|
-
children: children
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../src/views/layouts/theme/header/header.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,GAAI,+BAI1B,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAqB5D,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense } from "react";
|
|
3
|
-
import { ThemeSwitcher } from "../../../../components/switchers/theme-switcher";
|
|
4
|
-
import { Skeleton } from "../../../../components/ui/skeleton";
|
|
5
|
-
import { Link } from "../../../../lib/navigation";
|
|
6
|
-
import { cn } from "../../../../lib/utils";
|
|
7
|
-
import { UserHeader } from "./user/user";
|
|
8
|
-
export const HeaderLayout = ({ logo, className, ...props })=>{
|
|
9
|
-
return /*#__PURE__*/ _jsxs("header", {
|
|
10
|
-
className: cn('bg-background/75 container sticky top-0 z-20 mx-auto flex w-full items-center border-b px-4 py-2 backdrop-blur sm:top-2 sm:rounded-xl sm:border', className),
|
|
11
|
-
...props,
|
|
12
|
-
children: [
|
|
13
|
-
/*#__PURE__*/ _jsx(Link, {
|
|
14
|
-
href: "/",
|
|
15
|
-
prefetch: true,
|
|
16
|
-
children: logo
|
|
17
|
-
}),
|
|
18
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
19
|
-
className: "ml-auto flex items-center gap-2",
|
|
20
|
-
children: [
|
|
21
|
-
/*#__PURE__*/ _jsx(ThemeSwitcher, {}),
|
|
22
|
-
/*#__PURE__*/ _jsx(Suspense, {
|
|
23
|
-
fallback: /*#__PURE__*/ _jsx(Skeleton, {
|
|
24
|
-
className: "h-9 w-32"
|
|
25
|
-
}),
|
|
26
|
-
children: /*#__PURE__*/ _jsx(UserHeader, {})
|
|
27
|
-
})
|
|
28
|
-
]
|
|
29
|
-
})
|
|
30
|
-
]
|
|
31
|
-
});
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/layouts/theme/header/user/auth/auth.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,+DAiB1B,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Avatar } from "../../../../../../components/avatar";
|
|
3
|
-
import { Button } from "../../../../../../components/ui/button";
|
|
4
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../../../components/ui/dropdown-menu";
|
|
5
|
-
import { getSessionApi } from "../../../../../../lib/api/get-session-api";
|
|
6
|
-
import { ClientAuthUserHeader } from "./client";
|
|
7
|
-
export const AuthUserHeader = async ()=>{
|
|
8
|
-
const { user } = await getSessionApi();
|
|
9
|
-
if (!user) return null;
|
|
10
|
-
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
11
|
-
children: [
|
|
12
|
-
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
13
|
-
asChild: true,
|
|
14
|
-
children: /*#__PURE__*/ _jsx(Button, {
|
|
15
|
-
"aria-label": user.name,
|
|
16
|
-
size: "icon",
|
|
17
|
-
variant: "ghost",
|
|
18
|
-
children: /*#__PURE__*/ _jsx(Avatar, {
|
|
19
|
-
size: 24,
|
|
20
|
-
user: user
|
|
21
|
-
})
|
|
22
|
-
})
|
|
23
|
-
}),
|
|
24
|
-
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
25
|
-
align: "end",
|
|
26
|
-
className: "w-64 p-2",
|
|
27
|
-
children: /*#__PURE__*/ _jsx(ClientAuthUserHeader, {
|
|
28
|
-
user: user
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
]
|
|
32
|
-
});
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/layouts/theme/header/user/auth/client.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAW5D,eAAO,MAAM,oBAAoB,GAAI,WAElC;IACD,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;CACvC,4CAgCA,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { KeyRoundIcon, LogOutIcon } from "lucide-react";
|
|
4
|
-
import { useTranslations } from "next-intl";
|
|
5
|
-
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator } from "../../../../../../components/ui/dropdown-menu";
|
|
6
|
-
import { Link } from "../../../../../../lib/navigation";
|
|
7
|
-
import { logOutMutationApi } from "./log-out-mutation-api";
|
|
8
|
-
export const ClientAuthUserHeader = ({ user })=>{
|
|
9
|
-
const t = useTranslations('core.global.user_bar');
|
|
10
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
11
|
-
children: [
|
|
12
|
-
user.isAdmin && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
13
|
-
children: [
|
|
14
|
-
/*#__PURE__*/ _jsx(DropdownMenuGroup, {
|
|
15
|
-
children: /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
16
|
-
asChild: true,
|
|
17
|
-
children: /*#__PURE__*/ _jsxs(Link, {
|
|
18
|
-
href: "/admin",
|
|
19
|
-
target: "_blank",
|
|
20
|
-
children: [
|
|
21
|
-
/*#__PURE__*/ _jsx(KeyRoundIcon, {}),
|
|
22
|
-
/*#__PURE__*/ _jsx("span", {
|
|
23
|
-
children: t('admin_cp')
|
|
24
|
-
})
|
|
25
|
-
]
|
|
26
|
-
})
|
|
27
|
-
})
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ _jsx(DropdownMenuSeparator, {})
|
|
30
|
-
]
|
|
31
|
-
}),
|
|
32
|
-
/*#__PURE__*/ _jsx(DropdownMenuGroup, {
|
|
33
|
-
children: /*#__PURE__*/ _jsxs(DropdownMenuItem, {
|
|
34
|
-
onClick: async ()=>{
|
|
35
|
-
await logOutMutationApi({});
|
|
36
|
-
},
|
|
37
|
-
children: [
|
|
38
|
-
/*#__PURE__*/ _jsx(LogOutIcon, {}),
|
|
39
|
-
/*#__PURE__*/ _jsx("span", {
|
|
40
|
-
children: t('log_out')
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-out-mutation-api.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/layouts/theme/header/user/auth/log-out-mutation-api.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB,GAAU,cAErC;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,kBAqBA,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { revalidatePath } from "next/cache";
|
|
3
|
-
import { usersModule } from "../../../../../../api/modules/users/users.module";
|
|
4
|
-
import { fetcher } from "../../../../../../lib/fetcher";
|
|
5
|
-
import { redirect } from "../../../../../../lib/navigation";
|
|
6
|
-
export const logOutMutationApi = async ({ isAdmin = false })=>{
|
|
7
|
-
const res = await fetcher(usersModule, {
|
|
8
|
-
path: '/sign_out',
|
|
9
|
-
method: 'delete',
|
|
10
|
-
allowSaveCookies: true,
|
|
11
|
-
module: 'users',
|
|
12
|
-
args: {
|
|
13
|
-
body: {
|
|
14
|
-
isAdmin
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
if (res.status === 200) {
|
|
19
|
-
if (isAdmin) {
|
|
20
|
-
revalidatePath('/admin/(main)', 'layout');
|
|
21
|
-
await redirect('/admin');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
revalidatePath('/[locale]/(main)', 'layout');
|
|
25
|
-
await redirect('/');
|
|
26
|
-
}
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../../src/views/layouts/theme/header/user/user.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,wDA6BtB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { buttonVariants } from "../../../../../components/ui/button";
|
|
4
|
-
import { getSessionApi } from "../../../../../lib/api/get-session-api";
|
|
5
|
-
import { Link } from "../../../../../lib/navigation";
|
|
6
|
-
import { cn } from "../../../../../lib/utils";
|
|
7
|
-
import { AuthUserHeader } from "./auth/auth";
|
|
8
|
-
export const UserHeader = async ()=>{
|
|
9
|
-
const [t, session] = await Promise.all([
|
|
10
|
-
getTranslations('core.global'),
|
|
11
|
-
getSessionApi()
|
|
12
|
-
]);
|
|
13
|
-
if (!session.user) {
|
|
14
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
15
|
-
children: [
|
|
16
|
-
/*#__PURE__*/ _jsx(Link, {
|
|
17
|
-
className: cn(buttonVariants({
|
|
18
|
-
variant: 'ghost'
|
|
19
|
-
})),
|
|
20
|
-
href: "/login",
|
|
21
|
-
prefetch: true,
|
|
22
|
-
children: t('login')
|
|
23
|
-
}),
|
|
24
|
-
/*#__PURE__*/ _jsx(Link, {
|
|
25
|
-
className: cn(buttonVariants()),
|
|
26
|
-
href: "/register",
|
|
27
|
-
prefetch: true,
|
|
28
|
-
children: t('register')
|
|
29
|
-
})
|
|
30
|
-
]
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return /*#__PURE__*/ _jsx(AuthUserHeader, {});
|
|
34
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/views/layouts/theme/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,WAAW,GAAI,qBAGzB,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAMA,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { HeaderLayout } from "./header/header";
|
|
3
|
-
export const ThemeLayout = ({ children, logo })=>{
|
|
4
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
5
|
-
children: [
|
|
6
|
-
/*#__PURE__*/ _jsx(HeaderLayout, {
|
|
7
|
-
logo: logo
|
|
8
|
-
}),
|
|
9
|
-
" ",
|
|
10
|
-
/*#__PURE__*/ _jsx("main", {
|
|
11
|
-
children: children
|
|
12
|
-
})
|
|
13
|
-
]
|
|
14
|
-
});
|
|
15
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
2
|
-
import type { ThemeProvider } from 'next-themes';
|
|
3
|
-
import type { BuildPluginApiReturn } from './api/lib/plugin';
|
|
4
|
-
import type { EmailApiPlugin } from './api/models/email';
|
|
5
|
-
import type { SSOApiPlugin } from './api/models/sso';
|
|
6
|
-
import type { BuildPluginReturn } from './lib/plugin';
|
|
7
|
-
export interface VitNodeConfig<AppLocales extends string[] = string[]> {
|
|
8
|
-
admin?: {
|
|
9
|
-
sidebarCookieName?: string;
|
|
10
|
-
};
|
|
11
|
-
debug?: boolean;
|
|
12
|
-
i18n: {
|
|
13
|
-
defaultLocale: AppLocales[number];
|
|
14
|
-
localePrefix?: 'always' | 'as-needed' | 'never';
|
|
15
|
-
locales: AppLocales;
|
|
16
|
-
timeZone?: string;
|
|
17
|
-
};
|
|
18
|
-
metadata: {
|
|
19
|
-
shortTitle?: string;
|
|
20
|
-
title: string;
|
|
21
|
-
};
|
|
22
|
-
plugins: BuildPluginReturn[];
|
|
23
|
-
theme: Omit<React.ComponentProps<typeof ThemeProvider>, 'attribute' | 'disableTransitionOnChange' | 'enableSystem'>;
|
|
24
|
-
}
|
|
25
|
-
export interface VitNodeApiConfig {
|
|
26
|
-
authorization?: {
|
|
27
|
-
adminCookieExpires?: number;
|
|
28
|
-
adminCookieName?: string;
|
|
29
|
-
cookieExpires?: number;
|
|
30
|
-
cookieName?: string;
|
|
31
|
-
cookieSecure?: boolean;
|
|
32
|
-
deviceCookieExpires?: number;
|
|
33
|
-
deviceCookieName?: string;
|
|
34
|
-
ssoPlugins?: SSOApiPlugin[];
|
|
35
|
-
};
|
|
36
|
-
dbProvider: PostgresJsDatabase;
|
|
37
|
-
emailProvider?: EmailApiPlugin;
|
|
38
|
-
plugins: BuildPluginApiReturn[];
|
|
39
|
-
}
|
|
40
|
-
export declare function buildConfig<AppLocales extends string[]>(args: VitNodeConfig<AppLocales>): VitNodeConfig<AppLocales>;
|
|
41
|
-
export declare function buildApiConfig(args: VitNodeApiConfig): VitNodeApiConfig;
|
|
42
|
-
export declare const handleRequestConfig: ({ requestLocale, vitNodeConfig, }: {
|
|
43
|
-
requestLocale: Promise<string | undefined>;
|
|
44
|
-
vitNodeConfig: VitNodeConfig;
|
|
45
|
-
}) => Promise<{
|
|
46
|
-
locale: string;
|
|
47
|
-
messages: any;
|
|
48
|
-
timeZone: string | undefined;
|
|
49
|
-
}>;
|
|
50
|
-
//# sourceMappingURL=vitnode.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAEjD,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,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,aAAa,CAAC,UAAU,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE;IACnE,KAAK,CAAC,EAAE;QACN,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE;QACJ,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAClC,YAAY,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;QAChD,OAAO,EAAE,UAAU,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,QAAQ,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,KAAK,EAAE,IAAI,CACT,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,WAAW,GAAG,2BAA2B,GAAG,cAAc,CAC3D,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE;QACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;KAC7B,CAAC;IACF,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,UAAU,SAAS,MAAM,EAAE,EACrD,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,mCAGvC;IACD,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;CAC9B;;;;EA+BA,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export function buildConfig(args) {
|
|
2
|
-
return {
|
|
3
|
-
...args,
|
|
4
|
-
i18n: {
|
|
5
|
-
...args.i18n,
|
|
6
|
-
localePrefix: args.i18n.localePrefix ?? 'as-needed'
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export function buildApiConfig(args) {
|
|
11
|
-
return args;
|
|
12
|
-
}
|
|
13
|
-
export const handleRequestConfig = async ({ requestLocale, vitNodeConfig })=>{
|
|
14
|
-
const reqLocale = await requestLocale;
|
|
15
|
-
const locale = reqLocale && `${vitNodeConfig.i18n.locales}`.includes(reqLocale) ? reqLocale : vitNodeConfig.i18n.defaultLocale;
|
|
16
|
-
const pluginsId = [
|
|
17
|
-
'@vitnode/core',
|
|
18
|
-
...vitNodeConfig.plugins.map((plugin)=>plugin.pluginId)
|
|
19
|
-
];
|
|
20
|
-
// Import and merge messages from all plugins
|
|
21
|
-
const messagesPromises = pluginsId.map(async (pluginId)=>{
|
|
22
|
-
try {
|
|
23
|
-
const messages = await import(`@/locales/${pluginId}/${locale}.json`);
|
|
24
|
-
return messages.default;
|
|
25
|
-
} catch {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
const allMessages = await Promise.all(messagesPromises);
|
|
30
|
-
const messages = allMessages.reduce((acc, curr)=>({
|
|
31
|
-
...acc,
|
|
32
|
-
...curr
|
|
33
|
-
}), {});
|
|
34
|
-
return {
|
|
35
|
-
locale,
|
|
36
|
-
messages,
|
|
37
|
-
timeZone: vitNodeConfig.i18n.timeZone
|
|
38
|
-
};
|
|
39
|
-
};
|