@vitnode/core 1.2.0-canary.73 → 1.2.0-canary.75
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 +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/scripts.js +10 -39
- package/dist/scripts/shared/file-utils.d.ts +1 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/scripts/shared/file-utils.test.d.ts +2 -0
- package/dist/scripts/shared/file-utils.test.d.ts.map +1 -0
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +1 -1
- package/dist/src/api/lib/cache-client.d.ts +4 -0
- package/dist/src/api/lib/cache-client.d.ts.map +1 -0
- package/dist/src/api/lib/cache-client.js +1 -0
- package/dist/src/api/lib/cache.d.ts +32 -0
- package/dist/src/api/lib/cache.d.ts.map +1 -0
- package/dist/src/api/lib/cache.js +1 -0
- package/dist/src/api/lib/cache.test.d.ts +2 -0
- package/dist/src/api/lib/cache.test.d.ts.map +1 -0
- package/dist/src/api/lib/cache.test.js +1 -0
- package/dist/src/api/lib/check-staff-permission.d.ts +20 -0
- package/dist/src/api/lib/check-staff-permission.d.ts.map +1 -0
- package/dist/src/api/lib/check-staff-permission.js +1 -0
- package/dist/src/api/lib/module.d.ts +4 -1
- package/dist/src/api/lib/module.d.ts.map +1 -1
- package/dist/src/api/lib/module.js +1 -1
- package/dist/src/api/lib/permission-staff.d.ts +35 -0
- package/dist/src/api/lib/permission-staff.d.ts.map +1 -0
- package/dist/src/api/lib/permission-staff.js +1 -0
- package/dist/src/api/lib/plugin.d.ts +8 -3
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/plugin.js +1 -1
- package/dist/src/api/lib/queue.d.ts +14 -0
- package/dist/src/api/lib/queue.d.ts.map +1 -0
- package/dist/src/api/lib/queue.js +1 -0
- package/dist/src/api/lib/resolve-role-names.d.ts +7 -0
- package/dist/src/api/lib/resolve-role-names.d.ts.map +1 -0
- package/dist/src/api/lib/resolve-role-names.js +1 -0
- package/dist/src/api/lib/route.d.ts +7 -1
- 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/staff-permission.d.ts +4 -0
- package/dist/src/api/lib/staff-permission.d.ts.map +1 -0
- package/dist/src/api/lib/staff-permission.js +1 -0
- package/dist/src/api/middlewares/global.middleware.d.ts +18 -5
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +2 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.js +1 -1
- package/dist/src/api/models/email.d.ts +11 -1
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +1 -1
- package/dist/src/api/models/email.test.d.ts +2 -0
- package/dist/src/api/models/email.test.d.ts.map +1 -0
- package/dist/src/api/models/email.test.js +1 -0
- package/dist/src/api/models/queue.d.ts +17 -0
- package/dist/src/api/models/queue.d.ts.map +1 -0
- package/dist/src/api/models/queue.js +1 -0
- package/dist/src/api/models/queue.test.d.ts +2 -0
- package/dist/src/api/models/queue.test.d.ts.map +1 -0
- package/dist/src/api/models/queue.test.js +1 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +1 -1
- package/dist/src/api/models/session-cache.d.ts +8 -0
- package/dist/src/api/models/session-cache.d.ts.map +1 -0
- package/dist/src/api/models/session-cache.js +1 -0
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +694 -8
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts +64 -2
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +1 -1
- package/dist/src/api/modules/admin/advanced/queue/queue.admin.module.d.ts +64 -0
- package/dist/src/api/modules/admin/advanced/queue/queue.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/queue/queue.admin.module.js +1 -0
- package/dist/src/api/modules/admin/advanced/queue/routes/get.route.d.ts +65 -0
- package/dist/src/api/modules/admin/advanced/queue/routes/get.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/queue/routes/get.route.js +1 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +122 -2
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/integrations.route.d.ts +49 -0
- package/dist/src/api/modules/admin/debug/routes/integrations.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/routes/integrations.route.js +1 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/queue.route.d.ts +42 -0
- package/dist/src/api/modules/admin/debug/routes/queue.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/routes/queue.route.js +1 -0
- package/dist/src/api/modules/admin/debug/routes/send-test-email.route.d.ts +43 -0
- package/dist/src/api/modules/admin/debug/routes/send-test-email.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/routes/send-test-email.route.js +1 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +8 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/routes/session.route.js +1 -1
- package/dist/src/api/modules/admin/staff/lib/resolve-staff-edges.d.ts +38 -0
- package/dist/src/api/modules/admin/staff/lib/resolve-staff-edges.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/lib/resolve-staff-edges.js +1 -0
- package/dist/src/api/modules/admin/staff/lib/schema.d.ts +107 -0
- package/dist/src/api/modules/admin/staff/lib/schema.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/lib/schema.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/admins.route.d.ts +76 -0
- package/dist/src/api/modules/admin/staff/routes/admins.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/admins.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/create.route.d.ts +52 -0
- package/dist/src/api/modules/admin/staff/routes/create.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/create.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/delete.route.d.ts +36 -0
- package/dist/src/api/modules/admin/staff/routes/delete.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/delete.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/moderators.route.d.ts +76 -0
- package/dist/src/api/modules/admin/staff/routes/moderators.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/moderators.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/permission-catalog.route.d.ts +32 -0
- package/dist/src/api/modules/admin/staff/routes/permission-catalog.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/permission-catalog.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/show-permissions.route.d.ts +75 -0
- package/dist/src/api/modules/admin/staff/routes/show-permissions.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/show-permissions.route.js +1 -0
- package/dist/src/api/modules/admin/staff/routes/update-permissions.route.d.ts +62 -0
- package/dist/src/api/modules/admin/staff/routes/update-permissions.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/routes/update-permissions.route.js +1 -0
- package/dist/src/api/modules/admin/staff/staff.admin.module.d.ts +392 -0
- package/dist/src/api/modules/admin/staff/staff.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/staff/staff.admin.module.js +1 -0
- package/dist/src/api/modules/admin/users/lib/assert-edit-user-permission.d.ts +4 -0
- package/dist/src/api/modules/admin/users/lib/assert-edit-user-permission.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/lib/assert-edit-user-permission.js +1 -0
- package/dist/src/api/modules/admin/users/routes/create.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/users/routes/create.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +16 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/users/routes/list.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/show.route.d.ts +19 -2
- package/dist/src/api/modules/admin/users/routes/show.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/users/routes/show.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/update.route.d.ts +83 -0
- package/dist/src/api/modules/admin/users/routes/update.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/update.route.js +1 -0
- package/dist/src/api/modules/admin/users/routes/verify-email.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/verify-email.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/users/routes/verify-email.route.js +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +110 -4
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/queue/cron/process-queue.cron.d.ts +2 -0
- package/dist/src/api/modules/queue/cron/process-queue.cron.d.ts.map +1 -0
- package/dist/src/api/modules/queue/cron/process-queue.cron.js +1 -0
- package/dist/src/api/modules/queue/helpers/process-queue-tasks.d.ts +4 -0
- package/dist/src/api/modules/queue/helpers/process-queue-tasks.d.ts.map +1 -0
- package/dist/src/api/modules/queue/helpers/process-queue-tasks.js +1 -0
- package/dist/src/api/modules/queue/queue.module.d.ts +2 -0
- package/dist/src/api/modules/queue/queue.module.d.ts.map +1 -0
- package/dist/src/api/modules/queue/queue.module.js +1 -0
- package/dist/src/api/modules/queue/tasks/send-email.task.d.ts +10 -0
- package/dist/src/api/modules/queue/tasks/send-email.task.d.ts.map +1 -0
- package/dist/src/api/modules/queue/tasks/send-email.task.js +1 -0
- package/dist/src/api/modules/users/routes/permissions.route.d.ts +26 -0
- package/dist/src/api/modules/users/routes/permissions.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/permissions.route.js +1 -0
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.d.ts +1 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +24 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
- package/dist/src/api/modules/users/users.module.js +1 -1
- package/dist/src/api/plugin.d.ts.map +1 -1
- package/dist/src/api/plugin.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts.map +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -1
- package/dist/src/components/form/auto-form.js +1 -1
- package/dist/src/components/form/fields/array.d.ts.map +1 -1
- package/dist/src/components/form/fields/checkbox.js +1 -1
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +1 -1
- package/dist/src/components/form/fields/switch.js +1 -1
- package/dist/src/components/staff-permission/provider.d.ts +13 -0
- package/dist/src/components/staff-permission/provider.d.ts.map +1 -0
- package/dist/src/components/staff-permission/provider.js +1 -0
- package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -1
- package/dist/src/components/switchers/langs/language-switcher.js +1 -1
- package/dist/src/components/switchers/themes/theme-switcher.js +1 -1
- package/dist/src/components/table/filters.d.ts.map +1 -1
- package/dist/src/components/table/filters.js +1 -1
- package/dist/src/components/table/pagination.d.ts.map +1 -1
- package/dist/src/components/table/pagination.js +1 -1
- package/dist/src/components/theme-provider.d.ts +26 -0
- package/dist/src/components/theme-provider.d.ts.map +1 -0
- package/dist/src/components/theme-provider.js +1 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +1 -1
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/headings-action.js +1 -1
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -1
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +1 -1
- package/dist/src/components/ui/accordion.d.ts +3 -3
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.js +1 -1
- package/dist/src/components/ui/alert-dialog.d.ts +10 -10
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +1 -1
- package/dist/src/components/ui/alert.d.ts +2 -2
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/alert.js +1 -1
- package/dist/src/components/ui/aspect-ratio.d.ts +4 -2
- package/dist/src/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/src/components/ui/aspect-ratio.js +1 -1
- package/dist/src/components/ui/avatar.d.ts +2 -2
- package/dist/src/components/ui/avatar.d.ts.map +1 -1
- package/dist/src/components/ui/avatar.js +1 -1
- package/dist/src/components/ui/badge.d.ts +3 -5
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/breadcrumb.d.ts +3 -4
- package/dist/src/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/src/components/ui/breadcrumb.js +1 -1
- package/dist/src/components/ui/button-client.d.ts +1 -1
- package/dist/src/components/ui/button-client.d.ts.map +1 -1
- package/dist/src/components/ui/button-client.js +1 -1
- package/dist/src/components/ui/button-group.d.ts +2 -3
- package/dist/src/components/ui/button-group.d.ts.map +1 -1
- package/dist/src/components/ui/button-group.js +1 -1
- package/dist/src/components/ui/button.d.ts +5 -5
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +1 -1
- package/dist/src/components/ui/card.d.ts +1 -1
- package/dist/src/components/ui/card.d.ts.map +1 -1
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/carousel.d.ts +1 -1
- package/dist/src/components/ui/carousel.d.ts.map +1 -1
- package/dist/src/components/ui/carousel.js +1 -1
- package/dist/src/components/ui/chart.d.ts +1 -1
- package/dist/src/components/ui/chart.d.ts.map +1 -1
- package/dist/src/components/ui/chart.js +1 -1
- 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 +1 -1
- package/dist/src/components/ui/collapsible.d.ts +5 -4
- package/dist/src/components/ui/collapsible.d.ts.map +1 -1
- package/dist/src/components/ui/collapsible.js +1 -1
- package/dist/src/components/ui/combobox.d.ts +1 -1
- package/dist/src/components/ui/combobox.d.ts.map +1 -1
- package/dist/src/components/ui/combobox.js +1 -1
- package/dist/src/components/ui/command.d.ts +1 -1
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/command.js +1 -1
- package/dist/src/components/ui/context-menu.d.ts +7 -9
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.js +1 -1
- package/dist/src/components/ui/dialog.d.ts +12 -9
- package/dist/src/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/components/ui/dialog.js +1 -1
- package/dist/src/components/ui/direction.d.ts +5 -5
- package/dist/src/components/ui/direction.d.ts.map +1 -1
- package/dist/src/components/ui/direction.js +1 -1
- package/dist/src/components/ui/drawer.d.ts +1 -1
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.js +1 -1
- package/dist/src/components/ui/dropdown-menu.d.ts +16 -16
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.js +1 -1
- package/dist/src/components/ui/empty.d.ts.map +1 -1
- package/dist/src/components/ui/empty.js +1 -1
- package/dist/src/components/ui/field.js +1 -1
- package/dist/src/components/ui/form.d.ts +1 -2
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/form.js +1 -1
- package/dist/src/components/ui/hover-card.d.ts +5 -5
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.js +1 -1
- package/dist/src/components/ui/input-group.d.ts +4 -2
- package/dist/src/components/ui/input-group.d.ts.map +1 -1
- package/dist/src/components/ui/input-group.js +1 -1
- package/dist/src/components/ui/input-otp.d.ts +1 -1
- package/dist/src/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/components/ui/input-otp.js +1 -1
- package/dist/src/components/ui/input.d.ts +1 -1
- package/dist/src/components/ui/input.d.ts.map +1 -1
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/item.d.ts +4 -5
- package/dist/src/components/ui/item.d.ts.map +1 -1
- package/dist/src/components/ui/item.js +1 -1
- package/dist/src/components/ui/label.d.ts +2 -3
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/menubar.d.ts +18 -17
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.js +1 -1
- package/dist/src/components/ui/native-select.d.ts +1 -1
- package/dist/src/components/ui/native-select.d.ts.map +1 -1
- package/dist/src/components/ui/native-select.js +1 -1
- package/dist/src/components/ui/navigation-menu.d.ts +9 -11
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.js +1 -1
- package/dist/src/components/ui/pagination.d.ts +1 -1
- package/dist/src/components/ui/pagination.d.ts.map +1 -1
- package/dist/src/components/ui/pagination.js +1 -1
- package/dist/src/components/ui/popover.d.ts +6 -7
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +1 -1
- 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 +1 -1
- package/dist/src/components/ui/radio-group.d.ts +5 -4
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.js +1 -1
- package/dist/src/components/ui/scroll-area.d.ts +3 -3
- package/dist/src/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/src/components/ui/scroll-area.js +1 -1
- package/dist/src/components/ui/select.d.ts +6 -6
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/select.js +1 -1
- package/dist/src/components/ui/separator.d.ts +3 -3
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.d.ts +8 -8
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.js +1 -1
- package/dist/src/components/ui/sidebar.d.ts +9 -15
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.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 +1 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/sonner.js +1 -1
- package/dist/src/components/ui/spinner.d.ts.map +1 -1
- package/dist/src/components/ui/spinner.js +1 -1
- 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 +1 -1
- package/dist/src/components/ui/table.d.ts +1 -1
- package/dist/src/components/ui/table.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.d.ts +4 -4
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.d.ts +1 -1
- package/dist/src/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toggle-group.d.ts +1 -1
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.js +1 -1
- package/dist/src/components/ui/tooltip.d.ts +1 -1
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/database/admins.d.ts +20 -0
- package/dist/src/database/admins.d.ts.map +1 -1
- package/dist/src/database/admins.js +1 -1
- package/dist/src/database/languages.d.ts.map +1 -1
- package/dist/src/database/languages.js +1 -1
- package/dist/src/database/logs.d.ts +1 -1
- package/dist/src/database/moderators.d.ts +20 -0
- package/dist/src/database/moderators.d.ts.map +1 -1
- package/dist/src/database/moderators.js +1 -1
- package/dist/src/database/queue.d.ts +273 -0
- package/dist/src/database/queue.d.ts.map +1 -0
- package/dist/src/database/queue.js +1 -0
- package/dist/src/database/users.d.ts +63 -0
- package/dist/src/database/users.d.ts.map +1 -1
- package/dist/src/database/users.js +1 -1
- package/dist/src/emails/default-template.d.ts +1 -1
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +1 -1
- package/dist/src/emails/reset-password.js +1 -1
- package/dist/src/emails/test-email.d.ts +26 -0
- package/dist/src/emails/test-email.d.ts.map +1 -0
- package/dist/src/emails/test-email.js +1 -0
- package/dist/src/emails/ui/button.d.ts +2 -2
- package/dist/src/emails/ui/button.d.ts.map +1 -1
- package/dist/src/emails/ui/button.js +1 -1
- package/dist/src/emails/ui/card.d.ts +1 -1
- package/dist/src/emails/ui/card.d.ts.map +1 -1
- package/dist/src/emails/ui/card.js +1 -1
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +1 -1
- package/dist/src/hooks/use-mobile.js +1 -1
- package/dist/src/lib/api/get-moderator-permissions-api.d.ts +4 -0
- package/dist/src/lib/api/get-moderator-permissions-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-moderator-permissions-api.js +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.js +1 -1
- package/dist/src/lib/api/get-queue-backoff-date.d.ts +2 -0
- package/dist/src/lib/api/get-queue-backoff-date.d.ts.map +1 -0
- package/dist/src/lib/api/get-queue-backoff-date.js +1 -0
- package/dist/src/lib/api/get-queue-backoff-date.test.d.ts +2 -0
- package/dist/src/lib/api/get-queue-backoff-date.test.d.ts.map +1 -0
- package/dist/src/lib/api/get-queue-backoff-date.test.js +1 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +12 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -1
- package/dist/src/lib/api/get-session-admin-api.js +1 -1
- package/dist/src/lib/api/get-session-api.d.ts +1 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -1
- package/dist/src/lib/api/resolve-queue-task-outcome.d.ts +14 -0
- package/dist/src/lib/api/resolve-queue-task-outcome.d.ts.map +1 -0
- package/dist/src/lib/api/resolve-queue-task-outcome.js +1 -0
- package/dist/src/lib/api/resolve-queue-task-outcome.test.d.ts +2 -0
- package/dist/src/lib/api/resolve-queue-task-outcome.test.d.ts.map +1 -0
- package/dist/src/lib/api/resolve-queue-task-outcome.test.js +1 -0
- package/dist/src/lib/api/should-cron-job-run.js +1 -1
- package/dist/src/lib/config.d.ts +1 -0
- package/dist/src/lib/config.d.ts.map +1 -1
- package/dist/src/lib/config.js +1 -1
- package/dist/src/lib/fetcher/types.d.ts.map +1 -1
- package/dist/src/lib/navigation.d.ts +5 -5
- package/dist/src/lib/plugin.d.ts +3 -0
- package/dist/src/lib/plugin.d.ts.map +1 -1
- package/dist/src/lib/utils.d.ts +1 -0
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +1 -1
- package/dist/src/routes/admin/core/advanced/queue/page.d.ts +13 -0
- package/dist/src/routes/admin/core/advanced/queue/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/advanced/queue/page.js +1 -0
- package/dist/src/routes/admin/core/debug/page.d.ts.map +1 -1
- package/dist/src/routes/admin/core/debug/page.js +1 -1
- package/dist/src/routes/admin/core/staff/admins/create/page.d.ts +3 -0
- package/dist/src/routes/admin/core/staff/admins/create/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/admins/create/page.js +1 -0
- package/dist/src/routes/admin/core/staff/admins/edit/[id]/page.d.ts +7 -0
- package/dist/src/routes/admin/core/staff/admins/edit/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/admins/edit/[id]/page.js +1 -0
- package/dist/src/routes/admin/core/staff/admins/page.d.ts +4 -0
- package/dist/src/routes/admin/core/staff/admins/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/admins/page.js +1 -0
- package/dist/src/routes/admin/core/staff/moderators/create/page.d.ts +3 -0
- package/dist/src/routes/admin/core/staff/moderators/create/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/moderators/create/page.js +1 -0
- package/dist/src/routes/admin/core/staff/moderators/edit/[id]/page.d.ts +7 -0
- package/dist/src/routes/admin/core/staff/moderators/edit/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/moderators/edit/[id]/page.js +1 -0
- package/dist/src/routes/admin/core/staff/moderators/page.d.ts +4 -0
- package/dist/src/routes/admin/core/staff/moderators/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/staff/moderators/page.js +1 -0
- package/dist/src/routes/admin/core/system/integrations/page.d.ts +7 -0
- package/dist/src/routes/admin/core/system/integrations/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/system/integrations/page.js +1 -0
- package/dist/src/routes/admin/core/users/{[nameCode] → [id]}/page.d.ts +2 -2
- package/dist/src/routes/admin/core/users/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/admin/core/users/[id]/page.js +1 -0
- package/dist/src/routes/admin/core/users/page.d.ts.map +1 -1
- package/dist/src/routes/admin/core/users/page.js +1 -1
- package/dist/src/routes/breadcrumb/admin/[...all]/page.d.ts +1 -5
- package/dist/src/routes/breadcrumb/admin/[...all]/page.d.ts.map +1 -1
- package/dist/src/routes/breadcrumb/admin/[...all]/page.js +1 -1
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/create/page.d.ts +2 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/create/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/create/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/{users/[nameCode] → staff/admins/edit/[id]}/page.d.ts +1 -1
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/edit/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/edit/[id]/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/page.d.ts +2 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/admins/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/create/page.d.ts +2 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/create/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/create/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/edit/[id]/page.d.ts +6 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/edit/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/edit/[id]/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/page.d.ts +2 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/staff/moderators/page.js +1 -0
- package/dist/src/routes/breadcrumb/admin/core/users/[id]/page.d.ts +6 -0
- package/dist/src/routes/breadcrumb/admin/core/users/[id]/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/admin/core/users/{[nameCode] → [id]}/page.js +1 -1
- package/dist/src/routes/breadcrumb/main/[...rest]/page.d.ts +1 -5
- package/dist/src/routes/breadcrumb/main/[...rest]/page.d.ts.map +1 -1
- package/dist/src/routes/breadcrumb/main/[...rest]/page.js +1 -1
- package/dist/src/routes/breadcrumb/main/settings/overview/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/main/settings/overview/page.js +1 -0
- package/dist/src/routes/breadcrumb/main/settings/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/main/{register → settings}/page.js +1 -1
- package/dist/src/routes/breadcrumb/main/settings/security/page.d.ts.map +1 -0
- package/dist/src/routes/breadcrumb/main/settings/security/page.js +1 -0
- package/dist/src/routes/main/settings/layout.d.ts +5 -0
- package/dist/src/routes/main/settings/layout.d.ts.map +1 -0
- package/dist/src/routes/main/settings/layout.js +1 -0
- package/dist/src/routes/main/settings/overview/page.d.ts +5 -0
- package/dist/src/routes/main/settings/overview/page.d.ts.map +1 -0
- package/dist/src/routes/main/settings/overview/page.js +1 -0
- package/dist/src/routes/main/settings/page.d.ts +5 -0
- package/dist/src/routes/main/settings/page.d.ts.map +1 -0
- package/dist/src/routes/main/settings/page.js +1 -0
- package/dist/src/routes/main/settings/security/page.d.ts +5 -0
- package/dist/src/routes/main/settings/security/page.d.ts.map +1 -0
- package/dist/src/routes/main/settings/security/page.js +1 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +1 -1
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-admin.d.ts +6 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-admin.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-admin.js +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-create-admin.d.ts +5 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-create-admin.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-create-admin.js +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-edit-admin.d.ts +6 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-edit-admin.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-staff-edit-admin.js +1 -0
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-user-admin.d.ts +2 -2
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-user-admin.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/breadcrumb/breadcrumb-user-admin.js +1 -1
- package/dist/src/views/admin/layouts/breadcrumb/resolve-breadcrumb.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/breadcrumb/resolve-breadcrumb.js +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/get-admin-nav.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/get-admin-nav.js +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
- package/dist/src/views/admin/views/core/advanced/queue/badges/status-badge.d.ts +5 -0
- package/dist/src/views/admin/views/core/advanced/queue/badges/status-badge.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/queue/badges/status-badge.js +1 -0
- package/dist/src/views/admin/views/core/advanced/queue/queue-table-view.d.ts +7 -0
- package/dist/src/views/admin/views/core/advanced/queue/queue-table-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/queue/queue-table-view.js +1 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +1 -1
- package/dist/src/views/admin/views/core/debug/queue/queue-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/debug/queue/queue-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/queue/queue-view.js +1 -0
- 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.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +1 -1
- package/dist/src/views/admin/views/core/staff/create/create-staff-permissions-view.d.ts +5 -0
- package/dist/src/views/admin/views/core/staff/create/create-staff-permissions-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/create/create-staff-permissions-view.js +1 -0
- package/dist/src/views/admin/views/core/staff/create/form.d.ts +6 -0
- package/dist/src/views/admin/views/core/staff/create/form.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/create/form.js +1 -0
- package/dist/src/views/admin/views/core/staff/create/mutation-api.d.ts +14 -0
- package/dist/src/views/admin/views/core/staff/create/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/create/mutation-api.js +1 -0
- package/dist/src/views/admin/views/core/staff/create/search.action.d.ts +8 -0
- package/dist/src/views/admin/views/core/staff/create/search.action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/create/search.action.js +1 -0
- package/dist/src/views/admin/views/core/staff/edit/edit-staff-permissions-view.d.ts +8 -0
- package/dist/src/views/admin/views/core/staff/edit/edit-staff-permissions-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/edit/edit-staff-permissions-view.js +1 -0
- package/dist/src/views/admin/views/core/staff/edit/form.d.ts +29 -0
- package/dist/src/views/admin/views/core/staff/edit/form.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/edit/form.js +1 -0
- package/dist/src/views/admin/views/core/staff/edit/mutation-api.d.ts +13 -0
- package/dist/src/views/admin/views/core/staff/edit/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/edit/mutation-api.js +1 -0
- package/dist/src/views/admin/views/core/staff/selectable-card.d.ts +11 -0
- package/dist/src/views/admin/views/core/staff/selectable-card.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/selectable-card.js +1 -0
- package/dist/src/views/admin/views/core/staff/table/actions/delete-action.d.ts +11 -0
- package/dist/src/views/admin/views/core/staff/table/actions/delete-action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/table/actions/delete-action.js +1 -0
- package/dist/src/views/admin/views/core/staff/table/actions/staff-row-actions.d.ts +10 -0
- package/dist/src/views/admin/views/core/staff/table/actions/staff-row-actions.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/table/actions/staff-row-actions.js +1 -0
- package/dist/src/views/admin/views/core/staff/table/staff-table.d.ts +7 -0
- package/dist/src/views/admin/views/core/staff/table/staff-table.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/table/staff-table.js +1 -0
- package/dist/src/views/admin/views/core/staff/table/staff-user-format.d.ts +18 -0
- package/dist/src/views/admin/views/core/staff/table/staff-user-format.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/table/staff-user-format.js +1 -0
- package/dist/src/views/admin/views/core/staff/views/admins/admins-staff-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/staff/views/admins/admins-staff-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/views/admins/admins-staff-view.js +1 -0
- package/dist/src/views/admin/views/core/staff/views/moderators/moderators-staff-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/staff/views/moderators/moderators-staff-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/staff/views/moderators/moderators-staff-view.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/integration-card.d.ts +15 -0
- package/dist/src/views/admin/views/core/system/integrations/integration-card.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/integration-card.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/integrations-view.d.ts +3 -0
- package/dist/src/views/admin/views/core/system/integrations/integrations-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/integrations-view.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/content.d.ts +2 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/content.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/content.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/mutation-api.d.ts +12 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/mutation-api.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/send-test-email.d.ts +3 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/send-test-email.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/send-test-email.js +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/use-form.d.ts +15 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/use-form.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/system/integrations/send-test-email/use-form.js +1 -0
- package/dist/src/views/admin/views/core/users/actions/create/create.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/actions/create/create.js +1 -1
- package/dist/src/views/admin/views/core/users/actions/verify-email/mutation-api.d.ts +1 -1
- package/dist/src/views/admin/views/core/users/actions/verify-email/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/actions/verify-email/mutation-api.js +1 -1
- package/dist/src/views/admin/views/core/users/actions/verify-email/verify-email.d.ts +2 -2
- package/dist/src/views/admin/views/core/users/actions/verify-email/verify-email.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/actions/verify-email/verify-email.js +1 -1
- package/dist/src/views/admin/views/core/users/actions.d.ts +3 -3
- package/dist/src/views/admin/views/core/users/actions.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/actions.js +1 -1
- package/dist/src/views/admin/views/core/users/show/edit-buttons.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/show/edit-buttons.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/edit-buttons.js +1 -0
- package/dist/src/views/admin/views/core/users/show/edit-field.d.ts +13 -0
- package/dist/src/views/admin/views/core/users/show/edit-field.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/edit-field.js +1 -0
- package/dist/src/views/admin/views/core/users/show/edit-name-code.d.ts +5 -0
- package/dist/src/views/admin/views/core/users/show/edit-name-code.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/edit-name-code.js +1 -0
- package/dist/src/views/admin/views/core/users/show/mutation-api.d.ts +19 -0
- package/dist/src/views/admin/views/core/users/show/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/mutation-api.js +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/edit-roles.d.ts +8 -0
- package/dist/src/views/admin/views/core/users/show/roles/edit-roles.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/edit-roles.js +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/roles.d.ts +8 -0
- package/dist/src/views/admin/views/core/users/show/roles/roles.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/roles.js +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/search-roles.action.d.ts +10 -0
- package/dist/src/views/admin/views/core/users/show/roles/search-roles.action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/search-roles.action.js +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/update-roles.action.d.ts +13 -0
- package/dist/src/views/admin/views/core/users/show/roles/update-roles.action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/show/roles/update-roles.action.js +1 -0
- package/dist/src/views/admin/views/core/users/show/show-user-admin-view.d.ts +2 -2
- package/dist/src/views/admin/views/core/users/show/show-user-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/show/show-user-admin-view.js +1 -1
- 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 +1 -1
- package/dist/src/views/auth/settings/layout.d.ts +4 -0
- package/dist/src/views/auth/settings/layout.d.ts.map +1 -0
- package/dist/src/views/auth/settings/layout.js +1 -0
- package/dist/src/views/auth/settings/nav.d.ts +2 -0
- package/dist/src/views/auth/settings/nav.d.ts.map +1 -0
- package/dist/src/views/auth/settings/nav.js +1 -0
- package/dist/src/views/auth/settings/overview/overview.d.ts +2 -0
- package/dist/src/views/auth/settings/overview/overview.d.ts.map +1 -0
- package/dist/src/views/auth/settings/overview/overview.js +1 -0
- package/dist/src/views/auth/settings/security/security.d.ts +2 -0
- package/dist/src/views/auth/settings/security/security.d.ts.map +1 -0
- package/dist/src/views/auth/settings/security/security.js +1 -0
- package/dist/src/views/auth/settings/shell.d.ts +4 -0
- package/dist/src/views/auth/settings/shell.d.ts.map +1 -0
- package/dist/src/views/auth/settings/shell.js +1 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/client.js +1 -1
- package/dist/src/views/breadcrumb/breadcrumb-main.js +1 -1
- package/dist/src/views/breadcrumb/breadcrumb-render.js +1 -1
- package/dist/src/views/error/global-error-view.js +1 -1
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/provider.js +1 -1
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +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 +1 -1
- package/dist/src/vitnode.config.d.ts +7 -3
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/ws/handle.d.ts.map +1 -1
- package/dist/src/ws/handle.js +1 -1
- package/dist/src/ws/manager.d.ts.map +1 -1
- package/dist/src/ws/manager.js +1 -1
- package/dist/src/ws/provider.d.ts.map +1 -1
- package/dist/src/ws/provider.js +1 -1
- package/dist/src/ws/registry.d.ts +5 -0
- package/dist/src/ws/registry.d.ts.map +1 -1
- package/dist/src/ws/registry.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vitest.config.d.ts.map +1 -1
- package/package.json +24 -26
- package/src/locales/en.json +279 -4
- package/src/routes/admin/core/advanced/cron/page.tsx +42 -0
- package/src/routes/admin/core/advanced/queue/page.tsx +51 -0
- package/src/routes/admin/core/debug/page.tsx +67 -0
- package/src/routes/admin/core/page.tsx +5 -0
- package/src/routes/admin/core/staff/admins/create/page.tsx +17 -0
- package/src/routes/admin/core/staff/admins/edit/[id]/page.tsx +23 -0
- package/src/routes/admin/core/staff/admins/page.tsx +14 -0
- package/src/routes/admin/core/staff/moderators/create/page.tsx +17 -0
- package/src/routes/admin/core/staff/moderators/edit/[id]/page.tsx +23 -0
- package/src/routes/admin/core/staff/moderators/page.tsx +14 -0
- package/src/routes/admin/core/system/integrations/page.tsx +43 -0
- package/src/routes/admin/core/test/page.tsx +5 -0
- package/src/routes/admin/core/users/[id]/page.tsx +65 -0
- package/src/routes/admin/core/users/page.tsx +55 -0
- package/src/routes/admin/core/users/roles/page.tsx +46 -0
- package/src/routes/blank/test/page.tsx +11 -0
- package/src/routes/breadcrumb/admin/[...all]/page.tsx +3 -0
- package/src/routes/breadcrumb/admin/core/staff/admins/create/page.tsx +5 -0
- package/src/routes/breadcrumb/admin/core/staff/admins/edit/[id]/page.tsx +11 -0
- package/src/routes/breadcrumb/admin/core/staff/admins/page.tsx +5 -0
- package/src/routes/breadcrumb/admin/core/staff/moderators/create/page.tsx +5 -0
- package/src/routes/breadcrumb/admin/core/staff/moderators/edit/[id]/page.tsx +11 -0
- package/src/routes/breadcrumb/admin/core/staff/moderators/page.tsx +5 -0
- package/src/routes/breadcrumb/admin/core/users/[id]/page.tsx +11 -0
- package/src/routes/breadcrumb/admin/default.tsx +4 -0
- package/src/routes/breadcrumb/main/[...rest]/page.tsx +3 -0
- package/src/routes/breadcrumb/main/default.tsx +4 -0
- package/src/routes/breadcrumb/main/page.tsx +6 -0
- package/src/routes/breadcrumb/main/settings/overview/page.tsx +17 -0
- package/src/routes/breadcrumb/main/settings/page.tsx +14 -0
- package/src/routes/breadcrumb/main/settings/security/page.tsx +17 -0
- package/src/routes/main/login/page.tsx +22 -0
- package/src/routes/main/login/reset-password/page.tsx +27 -0
- package/src/routes/main/login/sso/[providerId]/page.tsx +19 -0
- package/src/routes/main/register/page.tsx +22 -0
- package/src/routes/main/settings/layout.tsx +16 -0
- package/src/routes/main/settings/overview/page.tsx +15 -0
- package/src/routes/main/settings/page.tsx +15 -0
- package/src/routes/main/settings/security/page.tsx +15 -0
- package/dist/scripts/get-config.js +0 -66
- package/dist/scripts/plugin.js +0 -206
- package/dist/scripts/prepare-database.js +0 -177
- package/dist/scripts/prepare-plugins-files.js +0 -152
- package/dist/scripts/run-interactive-shell-command.js +0 -21
- package/dist/scripts/shared/file-utils.js +0 -203
- package/dist/src/locales/en.json +0 -372
- package/dist/src/routes/admin/core/users/[nameCode]/page.d.ts.map +0 -1
- package/dist/src/routes/admin/core/users/[nameCode]/page.js +0 -1
- package/dist/src/routes/breadcrumb/admin/core/users/[nameCode]/page.d.ts.map +0 -1
- package/dist/src/routes/breadcrumb/main/login/page.d.ts.map +0 -1
- package/dist/src/routes/breadcrumb/main/login/page.js +0 -1
- package/dist/src/routes/breadcrumb/main/login/reset-password/page.d.ts.map +0 -1
- package/dist/src/routes/breadcrumb/main/login/reset-password/page.js +0 -1
- package/dist/src/routes/breadcrumb/main/register/page.d.ts.map +0 -1
- package/dist/tsup.config.js +0 -17
- package/dist/vitest.config.js +0 -48
- /package/dist/src/routes/breadcrumb/main/{login → settings/overview}/page.d.ts +0 -0
- /package/dist/src/routes/breadcrumb/main/{login/reset-password → settings}/page.d.ts +0 -0
- /package/dist/src/routes/breadcrumb/main/{register → settings/security}/page.d.ts +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { createJiti } from "jiti";
|
|
2
|
-
import { existsSync, readdirSync, statSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
const findConfigFile = (baseDir, filename, maxDepth = 4) => {
|
|
5
|
-
const searchRecursively = (dir, depth) => {
|
|
6
|
-
if (depth > maxDepth)
|
|
7
|
-
return null;
|
|
8
|
-
try {
|
|
9
|
-
const configPath = join(dir, "src", filename);
|
|
10
|
-
if (existsSync(configPath)) {
|
|
11
|
-
return configPath;
|
|
12
|
-
}
|
|
13
|
-
const items = readdirSync(dir);
|
|
14
|
-
for (const item of items) {
|
|
15
|
-
if (item === "node_modules" ||
|
|
16
|
-
item.startsWith(".") ||
|
|
17
|
-
item === "dist" ||
|
|
18
|
-
item === "build" ||
|
|
19
|
-
item === "out") {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
const itemPath = join(dir, item);
|
|
23
|
-
try {
|
|
24
|
-
if (statSync(itemPath).isDirectory()) {
|
|
25
|
-
const found = searchRecursively(itemPath, depth + 1);
|
|
26
|
-
if (found)
|
|
27
|
-
return found;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
};
|
|
38
|
-
return searchRecursively(baseDir, 0);
|
|
39
|
-
};
|
|
40
|
-
export const getConfig = async ({ type = "config", }) => {
|
|
41
|
-
const cwd = process.cwd();
|
|
42
|
-
const filename = `vitnode.${type}.ts`;
|
|
43
|
-
const configPath = findConfigFile(cwd, filename);
|
|
44
|
-
if (!configPath) {
|
|
45
|
-
console.error(`Config file not found: ${filename}`);
|
|
46
|
-
console.error(`Searched recursively in ${cwd} (excluding node_modules, .*, dist, build, out)`);
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
const configVarName = type === "config" ? "vitNodeConfig" : "vitNodeApiConfig";
|
|
51
|
-
const jiti = createJiti(import.meta.url, {
|
|
52
|
-
interopDefault: true,
|
|
53
|
-
});
|
|
54
|
-
const loaded = (await jiti.import(configPath));
|
|
55
|
-
const config = loaded[configVarName];
|
|
56
|
-
if (!config) {
|
|
57
|
-
console.error(`Export "${configVarName}" not found in ${configPath}`);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
return config;
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
console.error("Failed to load config:", error);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
66
|
-
};
|
package/dist/scripts/plugin.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import chokidar from "chokidar";
|
|
2
|
-
import { existsSync, mkdirSync, readdirSync, readFileSync, unlinkSync, } from "node:fs";
|
|
3
|
-
import { basename, join, relative } from "node:path";
|
|
4
|
-
import { buildInitialRouteMap, copyFile, findLocaleRoot, findRepoRoot, getAllFiles, isDirectoryEmpty, routeKey, } from "./shared/file-utils.js";
|
|
5
|
-
const detectAppType = (appPath) => {
|
|
6
|
-
const hasWebConfig = existsSync(join(appPath, "src", "vitnode.config.ts"));
|
|
7
|
-
const hasApiConfig = existsSync(join(appPath, "src", "vitnode.api.config.ts"));
|
|
8
|
-
if (hasApiConfig && !hasWebConfig)
|
|
9
|
-
return "api";
|
|
10
|
-
if (hasWebConfig)
|
|
11
|
-
return "web";
|
|
12
|
-
return null;
|
|
13
|
-
};
|
|
14
|
-
const collectSources = (pluginDir, repoRoot, pluginName, pluginPathName) => {
|
|
15
|
-
const sources = [];
|
|
16
|
-
const appsDir = join(repoRoot, "apps");
|
|
17
|
-
const isMonorepo = existsSync(appsDir);
|
|
18
|
-
if (isMonorepo) {
|
|
19
|
-
const appDirs = existsSync(appsDir)
|
|
20
|
-
? readdirSync(appsDir, { withFileTypes: true })
|
|
21
|
-
.filter(dirent => dirent.isDirectory())
|
|
22
|
-
.map(dirent => dirent.name)
|
|
23
|
-
: [];
|
|
24
|
-
for (const appName of appDirs) {
|
|
25
|
-
const appPath = join(repoRoot, "apps", appName);
|
|
26
|
-
const appType = detectAppType(appPath);
|
|
27
|
-
if (appType === "web") {
|
|
28
|
-
sources.push({
|
|
29
|
-
sourceDir: join(pluginDir, "src", "routes", "admin"),
|
|
30
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "admin", "(auth)", join("(plugins)", `(${pluginPathName})`)),
|
|
31
|
-
}, {
|
|
32
|
-
sourceDir: join(pluginDir, "src", "routes", "main"),
|
|
33
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "(main)", join("(plugins)", `(${pluginPathName})`)),
|
|
34
|
-
}, {
|
|
35
|
-
sourceDir: join(pluginDir, "src", "routes", "blank"),
|
|
36
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "(blank)", join("(plugins)", `(${pluginPathName})`)),
|
|
37
|
-
}, {
|
|
38
|
-
sourceDir: join(pluginDir, "src", "locales"),
|
|
39
|
-
destinationDir: join(appPath, "src", "locales", pluginName),
|
|
40
|
-
}, {
|
|
41
|
-
sourceDir: join(pluginDir, "src", "routes", "breadcrumb", "admin"),
|
|
42
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "admin", "(auth)", "@breadcrumb"),
|
|
43
|
-
}, {
|
|
44
|
-
sourceDir: join(pluginDir, "src", "routes", "breadcrumb", "main"),
|
|
45
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "(main)", "@breadcrumb"),
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
else if (appType === "api") {
|
|
49
|
-
sources.push({
|
|
50
|
-
sourceDir: join(pluginDir, "src", "locales"),
|
|
51
|
-
destinationDir: join(appPath, "src", "locales", pluginName),
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
const cwd = process.cwd();
|
|
58
|
-
const projectType = detectAppType(cwd);
|
|
59
|
-
if (projectType === "web") {
|
|
60
|
-
sources.push({
|
|
61
|
-
sourceDir: join(pluginDir, "src", "routes", "admin"),
|
|
62
|
-
destinationDir: join(cwd, "src", "app", "[locale]", "admin", "(auth)", join("(plugins)", `(${pluginPathName})`)),
|
|
63
|
-
}, {
|
|
64
|
-
sourceDir: join(pluginDir, "src", "routes", "main"),
|
|
65
|
-
destinationDir: join(cwd, "src", "app", "[locale]", "(main)", join("(plugins)", `(${pluginPathName})`)),
|
|
66
|
-
}, {
|
|
67
|
-
sourceDir: join(pluginDir, "src", "routes", "blank"),
|
|
68
|
-
destinationDir: join(cwd, "src", "app", "[locale]", "(blank)", join("(plugins)", `(${pluginPathName})`)),
|
|
69
|
-
}, {
|
|
70
|
-
sourceDir: join(pluginDir, "src", "locales"),
|
|
71
|
-
destinationDir: join(cwd, "src", "locales", pluginName),
|
|
72
|
-
}, {
|
|
73
|
-
sourceDir: join(pluginDir, "src", "routes", "breadcrumb", "admin"),
|
|
74
|
-
destinationDir: join(cwd, "src", "app", "[locale]", "admin", "(auth)", "@breadcrumb"),
|
|
75
|
-
}, {
|
|
76
|
-
sourceDir: join(pluginDir, "src", "routes", "breadcrumb", "main"),
|
|
77
|
-
destinationDir: join(cwd, "src", "app", "[locale]", "(main)", "@breadcrumb"),
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
else if (projectType === "api") {
|
|
81
|
-
sources.push({
|
|
82
|
-
sourceDir: join(pluginDir, "src", "locales"),
|
|
83
|
-
destinationDir: join(cwd, "src", "locales", pluginName),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return sources;
|
|
88
|
-
};
|
|
89
|
-
const ensureDestinationDirs = (sources) => {
|
|
90
|
-
for (const { sourceDir, destinationDir } of sources) {
|
|
91
|
-
if (existsSync(sourceDir) &&
|
|
92
|
-
!isDirectoryEmpty(sourceDir) &&
|
|
93
|
-
!existsSync(destinationDir)) {
|
|
94
|
-
mkdirSync(destinationDir, { recursive: true });
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const createFileOps = (pluginName, routeMap, localeRoot, repoRoot) => {
|
|
99
|
-
const copyFileWrapper = (srcPath, destPath) => {
|
|
100
|
-
copyFile(srcPath, destPath, pluginName, routeMap, localeRoot, repoRoot);
|
|
101
|
-
};
|
|
102
|
-
const removeFile = (filePath) => {
|
|
103
|
-
try {
|
|
104
|
-
if (existsSync(filePath)) {
|
|
105
|
-
unlinkSync(filePath);
|
|
106
|
-
console.log(`\x1b[33mRemoved:\x1b[0m ${filePath}`);
|
|
107
|
-
if (/^page\.(tsx|ts|jsx|js)$/i.test(basename(filePath))) {
|
|
108
|
-
const key = routeKey(filePath, localeRoot);
|
|
109
|
-
if (routeMap.get(key) === filePath) {
|
|
110
|
-
routeMap.delete(key);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
console.error(`\x1b[31mError removing file:\x1b[0m ${filePath}`, error);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
return { copyFileWrapper, removeFile };
|
|
120
|
-
};
|
|
121
|
-
const cleanupDeletedFiles = (sourceDir, destinationDir, removeFileFn) => {
|
|
122
|
-
if (!existsSync(destinationDir))
|
|
123
|
-
return;
|
|
124
|
-
const isLocaleDir = destinationDir.includes(join("src", "locales"));
|
|
125
|
-
if (isLocaleDir)
|
|
126
|
-
return;
|
|
127
|
-
const destFiles = getAllFiles(destinationDir);
|
|
128
|
-
for (const destFile of destFiles) {
|
|
129
|
-
const relativePath = relative(destinationDir, destFile);
|
|
130
|
-
const sourceFile = join(sourceDir, relativePath);
|
|
131
|
-
if (!existsSync(sourceFile)) {
|
|
132
|
-
removeFileFn(destFile);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const makeGetDestinationPaths = (sources) => {
|
|
137
|
-
return (srcPath) => {
|
|
138
|
-
const candidates = sources.filter(({ sourceDir }) => {
|
|
139
|
-
const normalizedSrcPath = srcPath.replace(/\\/g, "/");
|
|
140
|
-
const normalizedSourceDir = sourceDir.replace(/\\/g, "/");
|
|
141
|
-
return (normalizedSrcPath === normalizedSourceDir ||
|
|
142
|
-
normalizedSrcPath.startsWith(`${normalizedSourceDir}/`));
|
|
143
|
-
});
|
|
144
|
-
if (candidates.length === 0) {
|
|
145
|
-
throw new Error(`No matching source directory for: ${srcPath}`);
|
|
146
|
-
}
|
|
147
|
-
return candidates.map(sourceConfig => {
|
|
148
|
-
const relativePath = relative(sourceConfig.sourceDir, srcPath);
|
|
149
|
-
return join(sourceConfig.destinationDir, relativePath);
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
const setupWatcher = (sourceDirs, getDestinationPaths, copyFileWrapper, removeFile) => {
|
|
154
|
-
const watcher = chokidar.watch(sourceDirs, {
|
|
155
|
-
ignoreInitial: false,
|
|
156
|
-
persistent: true,
|
|
157
|
-
});
|
|
158
|
-
watcher
|
|
159
|
-
.on("add", filePath => {
|
|
160
|
-
const destPaths = getDestinationPaths(filePath);
|
|
161
|
-
destPaths.forEach(destPath => copyFileWrapper(filePath, destPath));
|
|
162
|
-
})
|
|
163
|
-
.on("change", filePath => {
|
|
164
|
-
const destPaths = getDestinationPaths(filePath);
|
|
165
|
-
destPaths.forEach(destPath => copyFileWrapper(filePath, destPath));
|
|
166
|
-
})
|
|
167
|
-
.on("unlink", filePath => {
|
|
168
|
-
const destPaths = getDestinationPaths(filePath);
|
|
169
|
-
destPaths.forEach(destPath => removeFile(destPath));
|
|
170
|
-
})
|
|
171
|
-
.on("error", error => {
|
|
172
|
-
console.error("\x1b[31mWatcher error:\x1b[0m", error);
|
|
173
|
-
});
|
|
174
|
-
return watcher;
|
|
175
|
-
};
|
|
176
|
-
export const processPlugin = ({ initMessage }) => {
|
|
177
|
-
const pluginDir = process.cwd();
|
|
178
|
-
const repoRoot = findRepoRoot(pluginDir);
|
|
179
|
-
const localeRoot = findLocaleRoot(repoRoot);
|
|
180
|
-
const routeMap = buildInitialRouteMap(localeRoot);
|
|
181
|
-
let pluginName = basename(pluginDir);
|
|
182
|
-
try {
|
|
183
|
-
const packageJsonPath = join(pluginDir, "package.json");
|
|
184
|
-
if (existsSync(packageJsonPath)) {
|
|
185
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
186
|
-
pluginName = packageJson.name ?? "";
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
catch (error) {
|
|
190
|
-
console.error("\x1b[31mError reading package.json:\x1b[0m", error);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
const pluginPathName = pluginName.replace(/\//g, "-").replace(/@/g, "");
|
|
194
|
-
const sources = collectSources(pluginDir, repoRoot, pluginName, pluginPathName);
|
|
195
|
-
ensureDestinationDirs(sources);
|
|
196
|
-
const { copyFileWrapper, removeFile } = createFileOps(pluginName, routeMap, localeRoot, repoRoot);
|
|
197
|
-
for (const { sourceDir, destinationDir } of sources) {
|
|
198
|
-
cleanupDeletedFiles(sourceDir, destinationDir, removeFile);
|
|
199
|
-
}
|
|
200
|
-
console.log(`${initMessage} \x1b[34mWatching for changes in plugins...\x1b[0m`);
|
|
201
|
-
const sourceDirs = sources
|
|
202
|
-
.map(s => s.sourceDir)
|
|
203
|
-
.filter(dir => existsSync(dir));
|
|
204
|
-
const getDestinationPaths = makeGetDestinationPaths(sources);
|
|
205
|
-
setupWatcher(sourceDirs, getDestinationPaths, copyFileWrapper, removeFile);
|
|
206
|
-
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { count } from "drizzle-orm";
|
|
2
|
-
import { core_admin_permissions } from "../src/database/admins.js";
|
|
3
|
-
import { core_languages, core_languages_words } from "../src/database/languages.js";
|
|
4
|
-
import { core_moderators_permissions } from "../src/database/moderators.js";
|
|
5
|
-
import { core_roles } from "../src/database/roles.js";
|
|
6
|
-
import { getConfig } from "./get-config.js";
|
|
7
|
-
import { preparePluginsFiles } from "./prepare-plugins-files.js";
|
|
8
|
-
import { runInteractiveShellCommand } from "./run-interactive-shell-command.js";
|
|
9
|
-
export const generateDatabaseMigrations = async () => {
|
|
10
|
-
try {
|
|
11
|
-
await runInteractiveShellCommand("npm", ["run", "drizzle-kit", "up"]);
|
|
12
|
-
await runInteractiveShellCommand("npm", ["run", "drizzle-kit", "generate"]);
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
console.error("\x1b[31m%s\x1b[0m", err);
|
|
16
|
-
process.exit(1);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export const runMigrations = async () => {
|
|
20
|
-
try {
|
|
21
|
-
await runInteractiveShellCommand("npm", ["run", "drizzle-kit", "migrate"]);
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
console.error("\x1b[31m%s\x1b[0m", err);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
export const initialDataForDatabase = async () => {
|
|
29
|
-
const config = await getConfig({ type: "api.config" });
|
|
30
|
-
const dbClient = config.dbProvider;
|
|
31
|
-
const [roleCount] = await dbClient
|
|
32
|
-
.select({
|
|
33
|
-
count: count(),
|
|
34
|
-
})
|
|
35
|
-
.from(core_roles)
|
|
36
|
-
.limit(1);
|
|
37
|
-
const [languageCount] = await dbClient
|
|
38
|
-
.select({
|
|
39
|
-
count: count(),
|
|
40
|
-
})
|
|
41
|
-
.from(core_languages);
|
|
42
|
-
if (languageCount.count === 0) {
|
|
43
|
-
await dbClient.insert(core_languages).values([
|
|
44
|
-
{
|
|
45
|
-
code: "en",
|
|
46
|
-
name: "English (USA)",
|
|
47
|
-
default: true,
|
|
48
|
-
protected: true,
|
|
49
|
-
timezone: "America/New_York",
|
|
50
|
-
},
|
|
51
|
-
]);
|
|
52
|
-
}
|
|
53
|
-
if (roleCount.count === 0) {
|
|
54
|
-
const roles = await dbClient
|
|
55
|
-
.insert(core_roles)
|
|
56
|
-
.values([
|
|
57
|
-
{
|
|
58
|
-
protected: true,
|
|
59
|
-
guest: true,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
protected: true,
|
|
63
|
-
default: true,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
protected: true,
|
|
67
|
-
color: "hsl(122, 80%, 45%)",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
protected: true,
|
|
71
|
-
root: true,
|
|
72
|
-
color: "hsl(0, 100%, 50%)",
|
|
73
|
-
},
|
|
74
|
-
])
|
|
75
|
-
.returning({ id: core_roles.id });
|
|
76
|
-
await dbClient.insert(core_languages_words).values([
|
|
77
|
-
{
|
|
78
|
-
languageCode: "en",
|
|
79
|
-
pluginCode: "core",
|
|
80
|
-
itemId: roles[0].id,
|
|
81
|
-
value: "Guest",
|
|
82
|
-
tableName: "core_roles",
|
|
83
|
-
variable: "name",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
languageCode: "en",
|
|
87
|
-
pluginCode: "core",
|
|
88
|
-
itemId: roles[1].id,
|
|
89
|
-
value: "Member",
|
|
90
|
-
tableName: "core_roles",
|
|
91
|
-
variable: "name",
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
languageCode: "en",
|
|
95
|
-
pluginCode: "core",
|
|
96
|
-
itemId: roles[2].id,
|
|
97
|
-
value: "Moderator",
|
|
98
|
-
tableName: "core_roles",
|
|
99
|
-
variable: "name",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
languageCode: "en",
|
|
103
|
-
pluginCode: "core",
|
|
104
|
-
itemId: roles[3].id,
|
|
105
|
-
value: "Administrator",
|
|
106
|
-
tableName: "core_roles",
|
|
107
|
-
variable: "name",
|
|
108
|
-
},
|
|
109
|
-
]);
|
|
110
|
-
await dbClient.insert(core_moderators_permissions).values([
|
|
111
|
-
{
|
|
112
|
-
roleId: roles[2].id,
|
|
113
|
-
protected: true,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
roleId: roles[3].id,
|
|
117
|
-
protected: true,
|
|
118
|
-
},
|
|
119
|
-
]);
|
|
120
|
-
await dbClient.insert(core_admin_permissions).values({
|
|
121
|
-
roleId: roles[3].id,
|
|
122
|
-
protected: true,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
export const prepareDatabase = async ({ initMessage, flag, }) => {
|
|
127
|
-
const steps = [];
|
|
128
|
-
if (flag === "--web") {
|
|
129
|
-
steps.push({
|
|
130
|
-
label: "Prepare plugins files...",
|
|
131
|
-
action: async () => await preparePluginsFiles(flag),
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
else if (flag === "--api") {
|
|
135
|
-
steps.push({
|
|
136
|
-
label: "Prepare plugins files...",
|
|
137
|
-
action: async () => await preparePluginsFiles(flag),
|
|
138
|
-
}, {
|
|
139
|
-
label: "Generate migrations...",
|
|
140
|
-
action: generateDatabaseMigrations,
|
|
141
|
-
}, {
|
|
142
|
-
label: "Run migrations...",
|
|
143
|
-
action: runMigrations,
|
|
144
|
-
}, {
|
|
145
|
-
label: "Insert initial data...",
|
|
146
|
-
action: initialDataForDatabase,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
steps.push({
|
|
151
|
-
label: "Prepare plugins files...",
|
|
152
|
-
action: async () => await preparePluginsFiles(flag),
|
|
153
|
-
}, {
|
|
154
|
-
label: "Generate migrations...",
|
|
155
|
-
action: generateDatabaseMigrations,
|
|
156
|
-
}, {
|
|
157
|
-
label: "Run migrations...",
|
|
158
|
-
action: runMigrations,
|
|
159
|
-
}, {
|
|
160
|
-
label: "Insert initial data...",
|
|
161
|
-
action: initialDataForDatabase,
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
for (let i = 0; i < steps.length; i++) {
|
|
165
|
-
const step = steps[i];
|
|
166
|
-
const stepNum = `[${i + 1}/${steps.length}]`;
|
|
167
|
-
if (step.label === "Insert initial data...") {
|
|
168
|
-
console.log(`\n${initMessage} ${stepNum} ${step.label}`);
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
console.log(`${initMessage} ${stepNum} ${step.label}`);
|
|
172
|
-
}
|
|
173
|
-
await step.action();
|
|
174
|
-
}
|
|
175
|
-
console.log(`${initMessage} \x1b[32mInitial setup completed.\x1b[0m`);
|
|
176
|
-
process.exit(0);
|
|
177
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
-
import { join, relative } from "node:path";
|
|
4
|
-
import { getConfig } from "./get-config.js";
|
|
5
|
-
import { buildInitialRouteMap, copyDirectoryRecursive, findLocaleRoot, findRepoRoot, isDirectoryEmpty, } from "./shared/file-utils.js";
|
|
6
|
-
export const preparePluginsFiles = async (flag) => {
|
|
7
|
-
const cwd = process.cwd();
|
|
8
|
-
const hasWebConfig = existsSync(join(cwd, "src", "vitnode.config.ts"));
|
|
9
|
-
const hasApiConfig = existsSync(join(cwd, "src", "vitnode.api.config.ts"));
|
|
10
|
-
let config;
|
|
11
|
-
if (flag === "--api" && hasApiConfig) {
|
|
12
|
-
config = await getConfig({ type: "api.config" });
|
|
13
|
-
}
|
|
14
|
-
else if (flag === "--web" && hasWebConfig) {
|
|
15
|
-
config = await getConfig({});
|
|
16
|
-
}
|
|
17
|
-
else if (hasApiConfig && !hasWebConfig) {
|
|
18
|
-
config = await getConfig({ type: "api.config" });
|
|
19
|
-
}
|
|
20
|
-
else if (hasWebConfig) {
|
|
21
|
-
config = await getConfig({});
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
config = { plugins: [] };
|
|
25
|
-
}
|
|
26
|
-
const plugins = [
|
|
27
|
-
...config.plugins.map(plugin => plugin.pluginId),
|
|
28
|
-
"@vitnode/core",
|
|
29
|
-
];
|
|
30
|
-
const repoRoot = findRepoRoot(process.cwd());
|
|
31
|
-
const localeRoot = findLocaleRoot(repoRoot);
|
|
32
|
-
const routeMap = buildInitialRouteMap(localeRoot);
|
|
33
|
-
const baseDir = process.cwd();
|
|
34
|
-
const findPluginPath = (pluginName) => {
|
|
35
|
-
const cwd = process.cwd();
|
|
36
|
-
const cwdPluginPath = join(cwd, "node_modules", pluginName);
|
|
37
|
-
if (existsSync(cwdPluginPath)) {
|
|
38
|
-
return cwdPluginPath;
|
|
39
|
-
}
|
|
40
|
-
if (repoRoot && repoRoot !== cwd) {
|
|
41
|
-
const rootPluginPath = join(repoRoot, "node_modules", pluginName);
|
|
42
|
-
if (existsSync(rootPluginPath)) {
|
|
43
|
-
return rootPluginPath;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
};
|
|
48
|
-
await Promise.all(plugins.map(async (pluginName) => {
|
|
49
|
-
const pluginPath = findPluginPath(pluginName);
|
|
50
|
-
if (!pluginPath) {
|
|
51
|
-
console.error(`\x1b[31mPlugin not found:\x1b[0m ${pluginName} in node_modules`);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
let packageName = "";
|
|
55
|
-
try {
|
|
56
|
-
const packageJsonPath = join(pluginPath, "package.json");
|
|
57
|
-
if (existsSync(packageJsonPath)) {
|
|
58
|
-
const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
|
|
59
|
-
packageName = packageJson.name ?? "";
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
console.error(`\x1b[31mError reading package.json for ${pluginName}:\x1b[0m`, error);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const pluginPathName = pluginName.replace(/\//g, "-").replace(/@/g, "");
|
|
67
|
-
const detectAppType = (appPath) => {
|
|
68
|
-
const hasWebConfig = existsSync(join(appPath, "src", "vitnode.config.ts"));
|
|
69
|
-
const hasApiConfig = existsSync(join(appPath, "src", "vitnode.api.config.ts"));
|
|
70
|
-
if (hasApiConfig && !hasWebConfig)
|
|
71
|
-
return "api";
|
|
72
|
-
if (hasWebConfig)
|
|
73
|
-
return "web";
|
|
74
|
-
return null;
|
|
75
|
-
};
|
|
76
|
-
const appsDir = join(repoRoot, "apps");
|
|
77
|
-
const isMonorepo = existsSync(appsDir);
|
|
78
|
-
const sources = [];
|
|
79
|
-
if (isMonorepo) {
|
|
80
|
-
const appDirs = existsSync(appsDir)
|
|
81
|
-
? readdirSync(appsDir, { withFileTypes: true })
|
|
82
|
-
.filter(dirent => dirent.isDirectory())
|
|
83
|
-
.map(dirent => dirent.name)
|
|
84
|
-
: [];
|
|
85
|
-
for (const appName of appDirs) {
|
|
86
|
-
const appPath = join(repoRoot, "apps", appName);
|
|
87
|
-
const appType = detectAppType(appPath);
|
|
88
|
-
if (appType === "web") {
|
|
89
|
-
const mainDest = join(appPath, "src", "app", "[locale]", "(main)", join("(plugins)", `(${pluginPathName})`));
|
|
90
|
-
const adminDest = join(appPath, "src", "app", "[locale]", "admin", "(auth)", join("(plugins)", `(${pluginPathName})`));
|
|
91
|
-
const langDest = join(appPath, "src", "locales", pluginName);
|
|
92
|
-
sources.push({
|
|
93
|
-
sourceDir: join(pluginPath, "src", "routes", "admin"),
|
|
94
|
-
destinationDir: adminDest,
|
|
95
|
-
}, {
|
|
96
|
-
sourceDir: join(pluginPath, "src", "routes", "main"),
|
|
97
|
-
destinationDir: mainDest,
|
|
98
|
-
}, {
|
|
99
|
-
sourceDir: join(pluginPath, "src", "routes", "blank"),
|
|
100
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "(blank)", join("(plugins)", `(${pluginPathName})`)),
|
|
101
|
-
}, {
|
|
102
|
-
sourceDir: join(pluginPath, "src", "locales"),
|
|
103
|
-
destinationDir: langDest,
|
|
104
|
-
}, {
|
|
105
|
-
sourceDir: join(pluginPath, "src", "routes", "breadcrumb", "admin"),
|
|
106
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "admin", "(auth)", "@breadcrumb"),
|
|
107
|
-
}, {
|
|
108
|
-
sourceDir: join(pluginPath, "src", "routes", "breadcrumb", "main"),
|
|
109
|
-
destinationDir: join(appPath, "src", "app", "[locale]", "(main)", "@breadcrumb"),
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
else if (appType === "api") {
|
|
113
|
-
const apiLangDest = join(appPath, "src", "locales", pluginName);
|
|
114
|
-
sources.push({
|
|
115
|
-
sourceDir: join(pluginPath, "src", "locales"),
|
|
116
|
-
destinationDir: apiLangDest,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
const mainDest = join(baseDir, "src", "app", "[locale]", "(main)", join("(plugins)", `(${pluginPathName})`));
|
|
123
|
-
const adminDest = join(baseDir, "src", "app", "[locale]", "admin", "(auth)", join("(plugins)", `(${pluginPathName})`));
|
|
124
|
-
const langDest = join(baseDir, "src", "locales", pluginName);
|
|
125
|
-
sources.push({
|
|
126
|
-
sourceDir: join(pluginPath, "src", "routes", "admin"),
|
|
127
|
-
destinationDir: adminDest,
|
|
128
|
-
}, {
|
|
129
|
-
sourceDir: join(pluginPath, "src", "routes", "main"),
|
|
130
|
-
destinationDir: mainDest,
|
|
131
|
-
}, {
|
|
132
|
-
sourceDir: join(pluginPath, "src", "routes", "blank"),
|
|
133
|
-
destinationDir: join(baseDir, "src", "app", "[locale]", "(blank)", join("(plugins)", `(${pluginPathName})`)),
|
|
134
|
-
}, {
|
|
135
|
-
sourceDir: join(pluginPath, "src", "locales"),
|
|
136
|
-
destinationDir: langDest,
|
|
137
|
-
}, {
|
|
138
|
-
sourceDir: join(pluginPath, "src", "routes", "breadcrumb", "admin"),
|
|
139
|
-
destinationDir: join(baseDir, "src", "app", "[locale]", "admin", "(auth)", "@breadcrumb"),
|
|
140
|
-
}, {
|
|
141
|
-
sourceDir: join(pluginPath, "src", "routes", "breadcrumb", "main"),
|
|
142
|
-
destinationDir: join(baseDir, "src", "app", "[locale]", "(main)", "@breadcrumb"),
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
for (const { sourceDir, destinationDir } of sources) {
|
|
146
|
-
if (existsSync(sourceDir) && !isDirectoryEmpty(sourceDir)) {
|
|
147
|
-
console.log(`\x1b[36mCopying ${pluginName}:\x1b[0m ${relative(repoRoot, sourceDir)} → ${relative(repoRoot, destinationDir)}`);
|
|
148
|
-
copyDirectoryRecursive(sourceDir, destinationDir, packageName, routeMap, localeRoot, repoRoot, false);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}));
|
|
152
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
export const runInteractiveShellCommand = async (cmd, args = []) => {
|
|
3
|
-
return await new Promise((resolve, reject) => {
|
|
4
|
-
const child = spawn(cmd, args, {
|
|
5
|
-
stdio: "inherit",
|
|
6
|
-
shell: true,
|
|
7
|
-
env: process.env,
|
|
8
|
-
});
|
|
9
|
-
child.on("error", error => {
|
|
10
|
-
reject(error);
|
|
11
|
-
});
|
|
12
|
-
child.on("close", code => {
|
|
13
|
-
if (code !== 0) {
|
|
14
|
-
reject(new Error(`Command failed with exit code ${code}`));
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
resolve(true);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
};
|