betterstart-cli 0.0.96 → 0.0.98
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/dist/assets/adapters/next/integrations/mailchimp/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/r2/actions/r2.ts +5 -5
- package/dist/assets/adapters/next/integrations/r2/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/railway-bucket/actions/railway-bucket.ts +6 -6
- package/dist/assets/adapters/next/integrations/railway-bucket/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/resend/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/vercel-blob/actions/vercel-blob.ts +1 -1
- package/dist/assets/adapters/next/integrations/vercel-blob/integration.ts +1 -1
- package/dist/assets/adapters/next/presets/blog/preset.ts +1 -1
- package/dist/assets/adapters/next/presets/portfolio/preset.ts +1 -1
- package/dist/assets/adapters/next/templates/init/api/storage-read-route.ts +2 -1
- package/dist/assets/adapters/next/templates/init/api/upload-route.ts +3 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-header.tsx +6 -6
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-providers.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-branding-skeleton.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-nav-link-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-user-menu-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-user-menu.tsx +8 -8
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/layouts/content-skeleton.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/layouts/sidebar-branding.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table-pagination.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table.tsx +3 -6
- package/dist/assets/adapters/next/templates/init/components/shared/delete-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx +7 -7
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/lifecycle-hooks-tab.tsx +7 -17
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/plain-code-fallback.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/snippets-tab.tsx +3 -13
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +6 -6
- package/dist/assets/adapters/next/templates/init/components/shared/entity-metadata.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-item.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-restore-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-button.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-current-row.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-drawer.tsx +3 -3
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-filters-bar.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-gallery-dialog.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-item.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-pagination.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-preview.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-url-importer.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/page-header.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/search-input.tsx +6 -6
- package/dist/assets/adapters/next/templates/init/components/shared/sort-indicator.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-dialog.tsx +4 -5
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-drag-overlay-item.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-item.tsx +3 -3
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-blockquote.ts +1 -70
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-code-block.ts +1 -77
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-color-highlight.ts +3 -51
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-media-insertion.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-slash-menu.ts +6 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-source-mode.tsx +10 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-table-add-controls.ts +4 -4
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +7 -4
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading-dropdown-menu.ts +3 -67
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading.ts +1 -41
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-is-breakpoint.ts +0 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-link-popover.ts +1 -83
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list-dropdown-menu.ts +3 -62
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list.ts +1 -43
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-mark.ts +1 -72
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-menu-navigation.ts +0 -35
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-table-button.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-tiptap-editor.ts +0 -11
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-undo-redo.ts +1 -65
- package/dist/assets/adapters/next/templates/init/hooks/use-admin-theme.tsx +2 -4
- package/dist/assets/adapters/next/templates/init/hooks/use-dev-mode-integration.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-entity-versions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-local-storage.ts +2 -7
- package/dist/assets/adapters/next/templates/init/hooks/use-media-filters-bar.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-media.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/use-page-boundary-blur-visibility.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-page-scroll-threshold.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-table-utils.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/use-upload.ts +6 -12
- package/dist/assets/adapters/next/templates/init/hooks/use-users.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-webhooks.ts +3 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/cleanup-audit-logs.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/get-audit-logs.ts +5 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/record-audit-event.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/auth/auth.ts +4 -4
- package/dist/assets/adapters/next/templates/init/lib/actions/auth/middleware.ts +2 -10
- package/dist/assets/adapters/next/templates/init/lib/actions/email/form-delivery.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/email/provider.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/get-entity-versions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/internal-create-entity-version.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-all-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/index.ts +1 -5
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/upsert-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/create-media.ts +2 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media-bulk.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-id.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-ids.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media.ts +5 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/media/update-media.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/change-own-password.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/index.ts +1 -5
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/update-email.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/storage/provider.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/index.ts +1 -5
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-files.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-media-from-url.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/change-user-password.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/create-user.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/delete-user.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/get-users.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/update-user-role.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/create-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/delete-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/dispatch.ts +1 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-deliveries.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-secret.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-subscriptions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhooks.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/regenerate-webhook-secret.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/register.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/send-test-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/update-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/db/client.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/db/core/schema.ts +4 -25
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/register.ts +0 -7
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/runner.ts +2 -2
- package/dist/assets/adapters/next/templates/init/pages/admin-layout.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/auth-gate-rsc.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/dashboard-page.tsx +6 -6
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +7 -7
- package/dist/assets/adapters/next/templates/init/pages/media/media-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/minimal-account-shell.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-columns.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-detail-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-detail-row.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page-content.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-table.tsx +5 -4
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page-content.tsx +4 -3
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-table.tsx +5 -4
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-columns.tsx +7 -7
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-columns.tsx +8 -8
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page-content.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-table.tsx +4 -3
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page-content.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-table.tsx +4 -3
- package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/columns.tsx +7 -6
- package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/delete-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/users-page-content.tsx +3 -2
- package/dist/assets/adapters/next/templates/init/pages/users/users-page-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/users-table.tsx +9 -8
- package/dist/assets/adapters/next/templates/init/types/index.ts +0 -5
- package/dist/assets/adapters/next/templates/init/types/table-meta.ts +1 -1
- package/dist/assets/adapters/next/templates/init/utils/date/date.ts +1 -6
- package/dist/assets/adapters/next/templates/init/utils/editor/content-editor-rich-extensions.ts +2 -2
- package/dist/assets/adapters/next/templates/init/utils/editor/markdown.ts +5 -5
- package/dist/assets/adapters/next/templates/init/utils/editor/slash-commands.ts +2 -2
- package/dist/assets/adapters/next/templates/init/utils/editor/table-add-controls.ts +1 -1
- package/dist/assets/adapters/next/templates/init/utils/editor/tiptap.ts +8 -127
- package/dist/assets/adapters/next/templates/init/utils/media/query.ts +1 -1
- package/dist/assets/adapters/next/templates/init/utils/seo/seo.ts +0 -10
- package/dist/assets/adapters/next/templates/init/utils/shared/cn.ts +2 -1
- package/dist/assets/adapters/next/templates/init/utils/validation/validation.ts +0 -12
- package/dist/assets/shared-assets/react-admin/custom/content-editor/editor-toolbar.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/horizontal-rule-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +5 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-bubble-menu.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-editor-controls.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-popover-button.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/remove-table-part-icon.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx +5 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/slash-command-menu.tsx +9 -9
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +12 -18
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-add-controls.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-bubble-menu.tsx +5 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-extension/node-background-extension.ts +2 -25
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node-extension.ts +0 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/removable-image-node/removable-image-node.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +4 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +4 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-button.tsx +4 -40
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-button.tsx +3 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-content.tsx +7 -11
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +9 -14
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-color-button.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-colors.ts +2 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/source-color-highlight-popover.tsx +9 -12
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu-item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +6 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-button.tsx +3 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +5 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-main.tsx +3 -15
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-popover.tsx +6 -18
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu-item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +4 -19
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +4 -21
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +4 -21
- package/dist/assets/shared-assets/react-admin/custom/date-picker.tsx +3 -5
- package/dist/assets/shared-assets/react-admin/custom/date-range-picker.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +11 -16
- package/dist/assets/shared-assets/react-admin/custom/icon-picker.tsx +17 -12
- package/dist/assets/shared-assets/react-admin/custom/icons-column-skeleton.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/media-field-empty-state.tsx +6 -6
- package/dist/assets/shared-assets/react-admin/custom/media-field.tsx +9 -9
- package/dist/assets/shared-assets/react-admin/custom/nested-object-list-field.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/placeholder-card.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/placeholder.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/progressive-blur.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/sortable-gallery-item.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/custom/upload-dropzone.tsx +8 -8
- package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +5 -5
- package/dist/assets/shared-assets/react-admin/ui/alert.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/avatar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/badge.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/button-group.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +9 -8
- package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +6 -6
- package/dist/assets/shared-assets/react-admin/ui/carousel.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/chart.tsx +1 -2
- package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/command.tsx +1 -2
- package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/ui/direction.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/ui/empty.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/form.tsx +4 -10
- package/dist/assets/shared-assets/react-admin/ui/hover-card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +5 -4
- package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/label.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/navigation-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +1 -2
- package/dist/assets/shared-assets/react-admin/ui/popover.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/progress.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/resizable.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/scroll-area.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/separator.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +7 -14
- package/dist/assets/shared-assets/react-admin/ui/slider.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sonner.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/switch.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/table.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +5 -4
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/toggle-group.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/tooltip.tsx +2 -2
- package/dist/{chunk-LGZBMR7E.js → chunk-AIQWGMU7.js} +138 -7
- package/dist/chunk-AIQWGMU7.js.map +1 -0
- package/dist/cli.js +9633 -9704
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{template-reader-WRTNGRZV.js → template-reader-F2VFSDKV.js} +2 -2
- package/package.json +5 -5
- package/dist/assets/shared-assets/react-admin/dependencies.ts +0 -74
- package/dist/chunk-LGZBMR7E.js.map +0 -1
- /package/dist/{template-reader-WRTNGRZV.js.map → template-reader-F2VFSDKV.js.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { DeleteMediaResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
5
6
|
import db from '@admin/db'
|
|
@@ -7,7 +8,6 @@ import { adminMedia } from '@admin/db/schema'
|
|
|
7
8
|
import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
8
9
|
import { eq } from 'drizzle-orm'
|
|
9
10
|
import { updateTag } from 'next/cache'
|
|
10
|
-
import type { DeleteMediaResult } from './types'
|
|
11
11
|
import { mediaCacheTags } from './types'
|
|
12
12
|
|
|
13
13
|
export async function deleteMedia(id: string): Promise<DeleteMediaResult> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
-
import { adminMedia } from '@admin/db/schema'
|
|
4
3
|
import type { AdminMedia } from '@admin/types'
|
|
4
|
+
import { adminMedia } from '@admin/db/schema'
|
|
5
5
|
import { mapMediaRow, selectMedia } from '@admin/utils/media/query'
|
|
6
6
|
import { eq } from 'drizzle-orm'
|
|
7
7
|
import { cacheLife, cacheTag } from 'next/cache'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
-
import { adminMedia } from '@admin/db/schema'
|
|
4
3
|
import type { AdminMedia } from '@admin/types'
|
|
4
|
+
import { adminMedia } from '@admin/db/schema'
|
|
5
5
|
import { mapMediaRow, selectMedia } from '@admin/utils/media/query'
|
|
6
6
|
import { inArray } from 'drizzle-orm'
|
|
7
7
|
import { cacheLife, cacheTag } from 'next/cache'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { MediaListParams, MediaListResult } from '@admin/types'
|
|
3
4
|
import db from '@admin/db'
|
|
4
5
|
import { adminMedia } from '@admin/db/schema'
|
|
5
|
-
import type { MediaListParams, MediaListResult } from '@admin/types'
|
|
6
6
|
import { mapMediaRow, selectMedia } from '@admin/utils/media/query'
|
|
7
7
|
import { and, desc, ilike, sql } from 'drizzle-orm'
|
|
8
8
|
import { cacheLife, cacheTag } from 'next/cache'
|
|
@@ -57,7 +57,10 @@ export async function getMedia(params: GetMediaParams = {}) {
|
|
|
57
57
|
|
|
58
58
|
const [items, countResult] = await Promise.all([
|
|
59
59
|
itemsQuery,
|
|
60
|
-
db
|
|
60
|
+
db
|
|
61
|
+
.select({ count: sql<number>`count(*)` })
|
|
62
|
+
.from(adminMedia)
|
|
63
|
+
.where(where)
|
|
61
64
|
])
|
|
62
65
|
|
|
63
66
|
const result: GetMediaResult = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { UpdateMediaResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
5
6
|
import db from '@admin/db'
|
|
@@ -8,7 +9,6 @@ import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
|
8
9
|
import { getChangedFieldNames } from '@admin/utils/audit/audit'
|
|
9
10
|
import { eq } from 'drizzle-orm'
|
|
10
11
|
import { updateTag } from 'next/cache'
|
|
11
|
-
import type { UpdateMediaResult } from './types'
|
|
12
12
|
import { mediaCacheTags } from './types'
|
|
13
13
|
|
|
14
14
|
export async function updateMedia(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { ChangeOwnPasswordInput, ChangeOwnPasswordResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { auth } from '@admin/auth'
|
|
5
6
|
import { getSession } from '@admin/auth/middleware'
|
|
6
7
|
import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
7
8
|
import { headers } from 'next/headers'
|
|
8
9
|
import { invalidateUsersCache } from './invalidate-users-cache'
|
|
9
|
-
import type { ChangeOwnPasswordInput, ChangeOwnPasswordResult } from './types'
|
|
10
10
|
|
|
11
11
|
export async function changeOwnPassword(
|
|
12
12
|
input: ChangeOwnPasswordInput
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export { changeOwnPassword } from './change-own-password'
|
|
2
2
|
export { invalidateUsersCache } from './invalidate-users-cache'
|
|
3
3
|
export { isEmailConfigured } from './is-email-configured'
|
|
4
|
-
export type {
|
|
5
|
-
ChangeOwnPasswordInput,
|
|
6
|
-
ChangeOwnPasswordResult,
|
|
7
|
-
UpdateEmailResult
|
|
8
|
-
} from './types'
|
|
4
|
+
export type { ChangeOwnPasswordInput, ChangeOwnPasswordResult, UpdateEmailResult } from './types'
|
|
9
5
|
export { updateEmail } from './update-email'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { UpdateEmailResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { auth } from '@admin/auth'
|
|
5
6
|
import { getSession } from '@admin/auth/middleware'
|
|
@@ -9,7 +10,6 @@ import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
|
9
10
|
import { eq } from 'drizzle-orm'
|
|
10
11
|
import { headers } from 'next/headers'
|
|
11
12
|
import { invalidateUsersCache } from './invalidate-users-cache'
|
|
12
|
-
import type { UpdateEmailResult } from './types'
|
|
13
13
|
|
|
14
14
|
export async function updateEmail(
|
|
15
15
|
newEmail: string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { localStorageProvider } from '@admin/actions/storage/local'
|
|
2
1
|
import type { AdminStorageProvider } from '@admin/actions/storage/types'
|
|
2
|
+
import { localStorageProvider } from '@admin/actions/storage/local'
|
|
3
3
|
|
|
4
4
|
export function getStorageProvider(): AdminStorageProvider {
|
|
5
5
|
return localStorageProvider
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
FileValidationConfig,
|
|
3
|
-
RemoteUploadOptions,
|
|
4
|
-
UploadResult
|
|
5
|
-
} from './types'
|
|
1
|
+
export type { FileValidationConfig, RemoteUploadOptions, UploadResult } from './types'
|
|
6
2
|
export { uploadFile } from './upload-file'
|
|
7
3
|
export { uploadFiles } from './upload-files'
|
|
8
4
|
export { uploadImageFromUrl } from './upload-image-from-url'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { FileValidationConfig, UploadResult } from './types'
|
|
4
|
+
import type { UploadedFile } from '@admin/types'
|
|
3
5
|
import { createMedia } from '@admin/actions/media'
|
|
4
6
|
import { saveUpload } from '@admin/actions/storage'
|
|
5
7
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
6
|
-
import type { UploadedFile } from '@admin/types'
|
|
7
|
-
import type { FileValidationConfig, UploadResult } from './types'
|
|
8
8
|
|
|
9
9
|
export async function uploadFiles(
|
|
10
10
|
formData: FormData,
|
package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-media-from-url.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { RemoteUploadOptions, UploadResult } from './types'
|
|
3
4
|
import { createMedia } from '@admin/actions/media'
|
|
4
5
|
import { saveUpload } from '@admin/actions/storage'
|
|
5
6
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
isAcceptedRemoteType,
|
|
10
11
|
REMOTE_FETCH_TIMEOUT_MS
|
|
11
12
|
} from '@admin/utils/upload/remote'
|
|
12
|
-
import type { RemoteUploadOptions, UploadResult } from './types'
|
|
13
13
|
|
|
14
14
|
export async function uploadMediaFromUrl(
|
|
15
15
|
mediaUrl: string,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { ChangeUserPasswordInput, ChangeUserPasswordResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { auth } from '@admin/auth'
|
|
5
6
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
@@ -9,7 +10,6 @@ import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
|
9
10
|
import { eq } from 'drizzle-orm'
|
|
10
11
|
import { updateTag } from 'next/cache'
|
|
11
12
|
import { headers } from 'next/headers'
|
|
12
|
-
import type { ChangeUserPasswordInput, ChangeUserPasswordResult } from './types'
|
|
13
13
|
import { usersCacheTags } from './types'
|
|
14
14
|
|
|
15
15
|
export async function changeUserPassword(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { CreateUserInput, CreateUserResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { auth } from '@admin/auth'
|
|
5
6
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
@@ -9,7 +10,6 @@ import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
|
9
10
|
import { getTouchedFieldNames } from '@admin/utils/audit/audit'
|
|
10
11
|
import { eq } from 'drizzle-orm'
|
|
11
12
|
import { updateTag } from 'next/cache'
|
|
12
|
-
import type { CreateUserInput, CreateUserResult } from './types'
|
|
13
13
|
import { usersCacheTags } from './types'
|
|
14
14
|
|
|
15
15
|
export async function createUser(input: CreateUserInput): Promise<CreateUserResult> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { DeleteUserResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
5
6
|
import db from '@admin/db'
|
|
@@ -7,7 +8,6 @@ import { user } from '@admin/db/schema'
|
|
|
7
8
|
import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
8
9
|
import { eq } from 'drizzle-orm'
|
|
9
10
|
import { updateTag } from 'next/cache'
|
|
10
|
-
import type { DeleteUserResult } from './types'
|
|
11
11
|
import { usersCacheTags } from './types'
|
|
12
12
|
|
|
13
13
|
export async function deleteUser(userId: string): Promise<DeleteUserResult> {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { User, UsersPage } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { user } from '@admin/db/schema'
|
|
6
7
|
import { cacheLife, cacheTag } from 'next/cache'
|
|
7
|
-
import type { User, UsersPage } from './types'
|
|
8
8
|
import { usersCacheTags } from './types'
|
|
9
9
|
|
|
10
10
|
async function getCachedUsers(): Promise<UsersPage> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { UpdateUserRoleResult } from './types'
|
|
3
4
|
import { getAuditRequestMetadata } from '@admin/actions/audit/request-metadata'
|
|
4
5
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
5
6
|
import db from '@admin/db'
|
|
@@ -7,7 +8,6 @@ import { user } from '@admin/db/schema'
|
|
|
7
8
|
import { runAdminEventHooks } from '@admin/lib/lifecycle-hooks'
|
|
8
9
|
import { eq } from 'drizzle-orm'
|
|
9
10
|
import { updateTag } from 'next/cache'
|
|
10
|
-
import type { UpdateUserRoleResult } from './types'
|
|
11
11
|
import { usersCacheTags } from './types'
|
|
12
12
|
|
|
13
13
|
export async function updateUserRole(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { CreateWebhookInput, WebhookResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhookSubscriptions, webhooks } from '@admin/db/schema'
|
|
6
7
|
import { generateWebhookSecret } from '@admin/utils/webhook/signature'
|
|
7
8
|
import { updateTag } from 'next/cache'
|
|
8
|
-
import type { CreateWebhookInput, WebhookResult } from './types'
|
|
9
9
|
import { webhooksCacheTags } from './types'
|
|
10
10
|
|
|
11
11
|
export async function createWebhook(input: CreateWebhookInput): Promise<WebhookResult> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhookResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhooks } from '@admin/db/schema'
|
|
6
7
|
import { eq } from 'drizzle-orm'
|
|
7
8
|
import { updateTag } from 'next/cache'
|
|
8
|
-
import type { WebhookResult } from './types'
|
|
9
9
|
import { webhooksCacheTags } from './types'
|
|
10
10
|
|
|
11
11
|
export async function deleteWebhook(id: string): Promise<WebhookResult> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { ActiveWebhookEndpoint } from './internal-get-active-endpoints'
|
|
1
2
|
import db from '@admin/db'
|
|
2
3
|
import { webhookDeliveries } from '@admin/db/schema'
|
|
3
4
|
import { createWebhookEventId, signWebhookPayload } from '@admin/utils/webhook/signature'
|
|
4
5
|
import { and, desc, eq, notInArray } from 'drizzle-orm'
|
|
5
6
|
import { after } from 'next/server'
|
|
6
|
-
import type { ActiveWebhookEndpoint } from './internal-get-active-endpoints'
|
|
7
7
|
import { getActiveEndpointsForEvent } from './internal-get-active-endpoints'
|
|
8
8
|
|
|
9
9
|
const MAX_ATTEMPTS = 3
|
|
@@ -20,7 +20,6 @@ export function emitWebhookEvent(event: string, data: unknown): void {
|
|
|
20
20
|
data
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
// A missing request scope must never crash the mutation that emitted the event.
|
|
24
23
|
try {
|
|
25
24
|
after(() => deliverWebhookEvent(eventId, event, body))
|
|
26
25
|
} catch (error) {
|
package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-deliveries.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhookDeliveriesPage, WebhookDeliveriesQuery } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhookDeliveries, webhooks } from '@admin/db/schema'
|
|
6
7
|
import { getExclusiveDateUpperBound } from '@admin/utils/date/date'
|
|
7
8
|
import { and, asc, desc, eq, gte, ilike, lt, or, sql } from 'drizzle-orm'
|
|
8
|
-
import type { WebhookDeliveriesPage, WebhookDeliveriesQuery } from './types'
|
|
9
9
|
|
|
10
10
|
const SORTABLE_COLUMNS = {
|
|
11
11
|
createdAt: webhookDeliveries.createdAt,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhookSecretResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhooks } from '@admin/db/schema'
|
|
6
7
|
import { eq } from 'drizzle-orm'
|
|
7
|
-
import type { WebhookSecretResult } from './types'
|
|
8
8
|
|
|
9
9
|
export async function getWebhookSecret(id: string): Promise<WebhookSecretResult> {
|
|
10
10
|
await requireRole([UserRole.ADMIN])
|
package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-subscriptions.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhookSubscriptionEntry } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhookSubscriptions } from '@admin/db/schema'
|
|
6
7
|
import { cacheLife, cacheTag } from 'next/cache'
|
|
7
|
-
import type { WebhookSubscriptionEntry } from './types'
|
|
8
8
|
import { webhooksCacheTags } from './types'
|
|
9
9
|
|
|
10
10
|
async function readWebhookSubscriptions(): Promise<WebhookSubscriptionEntry[]> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhooksPage, WebhooksQuery } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhookDeliveries, webhookSubscriptions, webhooks } from '@admin/db/schema'
|
|
6
7
|
import { getExclusiveDateUpperBound } from '@admin/utils/date/date'
|
|
7
8
|
import { and, asc, count, desc, eq, gte, ilike, isNull, lt, or, sql } from 'drizzle-orm'
|
|
8
|
-
import type { WebhooksPage, WebhooksQuery } from './types'
|
|
9
9
|
|
|
10
10
|
// Deliberately uncached: filters and sorting depend on delivery rows written
|
|
11
11
|
// inside after(), where cache invalidation is unavailable, so cached reads
|
package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/regenerate-webhook-secret.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { WebhookSecretResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhooks } from '@admin/db/schema'
|
|
6
7
|
import { generateWebhookSecret } from '@admin/utils/webhook/signature'
|
|
7
8
|
import { eq } from 'drizzle-orm'
|
|
8
9
|
import { updateTag } from 'next/cache'
|
|
9
|
-
import type { WebhookSecretResult } from './types'
|
|
10
10
|
import { webhooksCacheTags } from './types'
|
|
11
11
|
|
|
12
12
|
export async function regenerateWebhookSecret(id: string): Promise<WebhookSecretResult> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { webhookEventSources } from '@admin/data/webhook-events'
|
|
2
|
-
import { registerHook } from '@admin/lib/lifecycle-hooks/registry'
|
|
3
1
|
import type {
|
|
4
2
|
AfterLifecycleHookEvent,
|
|
5
3
|
LifecycleHookContext
|
|
6
4
|
} from '@admin/lib/lifecycle-hooks/types'
|
|
5
|
+
import { webhookEventSources } from '@admin/data/webhook-events'
|
|
6
|
+
import { registerHook } from '@admin/lib/lifecycle-hooks/registry'
|
|
7
7
|
import { emitWebhookEvent } from './dispatch'
|
|
8
8
|
|
|
9
9
|
let webhookHooksRegistered = false
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { SendTestWebhookResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhooks } from '@admin/db/schema'
|
|
6
7
|
import { createWebhookEventId, signWebhookPayload } from '@admin/utils/webhook/signature'
|
|
7
8
|
import { eq } from 'drizzle-orm'
|
|
8
9
|
import { recordWebhookDelivery } from './dispatch'
|
|
9
|
-
import type { SendTestWebhookResult } from './types'
|
|
10
10
|
|
|
11
11
|
const TEST_REQUEST_TIMEOUT_MS = 10_000
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
|
+
import type { UpdateWebhookInput, WebhookResult } from './types'
|
|
3
4
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
4
5
|
import db from '@admin/db'
|
|
5
6
|
import { webhookSubscriptions, webhooks } from '@admin/db/schema'
|
|
6
7
|
import { and, eq, notInArray } from 'drizzle-orm'
|
|
7
8
|
import { updateTag } from 'next/cache'
|
|
8
|
-
import type { UpdateWebhookInput, WebhookResult } from './types'
|
|
9
9
|
import { webhooksCacheTags } from './types'
|
|
10
10
|
|
|
11
11
|
export async function updateWebhook(id: string, input: UpdateWebhookInput): Promise<WebhookResult> {
|
|
@@ -12,10 +12,6 @@ import {
|
|
|
12
12
|
varchar
|
|
13
13
|
} from 'drizzle-orm/pg-core'
|
|
14
14
|
|
|
15
|
-
// ============================================================================
|
|
16
|
-
// Better Auth tables
|
|
17
|
-
// ============================================================================
|
|
18
|
-
|
|
19
15
|
export const user = pgTable('user', {
|
|
20
16
|
id: text('id').primaryKey(),
|
|
21
17
|
name: text('name').notNull(),
|
|
@@ -71,10 +67,6 @@ export const verification = pgTable('verification', {
|
|
|
71
67
|
updatedAt: timestamp('updated_at').defaultNow()
|
|
72
68
|
})
|
|
73
69
|
|
|
74
|
-
// ============================================================================
|
|
75
|
-
// Form Settings (shared table for all form configurations)
|
|
76
|
-
// ============================================================================
|
|
77
|
-
|
|
78
70
|
export const formSettings = pgTable(
|
|
79
71
|
'FormSettings',
|
|
80
72
|
{
|
|
@@ -96,10 +88,6 @@ export const formSettings = pgTable(
|
|
|
96
88
|
]
|
|
97
89
|
)
|
|
98
90
|
|
|
99
|
-
// ============================================================================
|
|
100
|
-
// Webhooks (endpoint registry, event subscriptions, delivery log)
|
|
101
|
-
// ============================================================================
|
|
102
|
-
|
|
103
91
|
export const webhooks = pgTable('Webhooks', {
|
|
104
92
|
id: uuid().defaultRandom().primaryKey().notNull(),
|
|
105
93
|
name: varchar('name', { length: 200 }).notNull(),
|
|
@@ -167,10 +155,6 @@ export const webhookDeliveries = pgTable(
|
|
|
167
155
|
]
|
|
168
156
|
)
|
|
169
157
|
|
|
170
|
-
// ============================================================================
|
|
171
|
-
// Entity Versions
|
|
172
|
-
// ============================================================================
|
|
173
|
-
|
|
174
158
|
export const entityVersions = pgTable(
|
|
175
159
|
'EntityVersions',
|
|
176
160
|
{
|
|
@@ -202,10 +186,6 @@ export const entityVersions = pgTable(
|
|
|
202
186
|
]
|
|
203
187
|
)
|
|
204
188
|
|
|
205
|
-
// ============================================================================
|
|
206
|
-
// Audit Log
|
|
207
|
-
// ============================================================================
|
|
208
|
-
|
|
209
189
|
export const auditLog = pgTable(
|
|
210
190
|
'AuditLog',
|
|
211
191
|
{
|
|
@@ -224,7 +204,10 @@ export const auditLog = pgTable(
|
|
|
224
204
|
sourceType: varchar('source_type', { length: 50 }).notNull().default('server_action'),
|
|
225
205
|
ipAddress: varchar('ip_address', { length: 100 }),
|
|
226
206
|
userAgent: varchar('user_agent', { length: 500 }),
|
|
227
|
-
changedFields: text('changed_fields')
|
|
207
|
+
changedFields: text('changed_fields')
|
|
208
|
+
.array()
|
|
209
|
+
.notNull()
|
|
210
|
+
.default(sql`ARRAY[]::text[]`),
|
|
228
211
|
metadata: jsonb('metadata'),
|
|
229
212
|
createdAt: timestamp('created_at', { precision: 3, mode: 'string' })
|
|
230
213
|
.default(sql`CURRENT_TIMESTAMP`)
|
|
@@ -251,10 +234,6 @@ export const auditLog = pgTable(
|
|
|
251
234
|
]
|
|
252
235
|
)
|
|
253
236
|
|
|
254
|
-
// ============================================================================
|
|
255
|
-
// Media Library
|
|
256
|
-
// ============================================================================
|
|
257
|
-
|
|
258
237
|
export const adminMedia = pgTable('AdminMedia', {
|
|
259
238
|
id: text('id')
|
|
260
239
|
.primaryKey()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
// This file is managed by BetterStart and may be overwritten by CLI updates.
|
|
2
2
|
// Add project-specific lifecycle hook registrations in register.local.ts.
|
|
3
|
-
//
|
|
4
|
-
// Example:
|
|
5
|
-
// import { registerHook } from './registry'
|
|
6
|
-
//
|
|
7
|
-
// registerHook('posts', 'afterCreate', async ({ user, entityId, data }) => {
|
|
8
|
-
// console.log('Post created', { userId: user.id, entityId, data })
|
|
9
|
-
// })
|
|
10
3
|
import { registerAuditHooks } from '@admin/actions/audit/register'
|
|
11
4
|
import { registerWebhookHooks } from '@admin/actions/webhooks/register'
|
|
12
5
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getRegisteredAdminHooks, getRegisteredHooks } from './registry'
|
|
2
1
|
import type {
|
|
3
2
|
AdminEventContext,
|
|
4
3
|
AfterLifecycleHookEvent,
|
|
@@ -6,6 +5,7 @@ import type {
|
|
|
6
5
|
LifecycleHookAbort,
|
|
7
6
|
LifecycleHookContext
|
|
8
7
|
} from './types'
|
|
8
|
+
import { getRegisteredAdminHooks, getRegisteredHooks } from './registry'
|
|
9
9
|
|
|
10
10
|
function isLifecycleHookAbort(value: unknown): value is LifecycleHookAbort {
|
|
11
11
|
return (
|
|
@@ -92,7 +92,7 @@ function toAdminEventContext(
|
|
|
92
92
|
metadata: {
|
|
93
93
|
entityType: context.entityType,
|
|
94
94
|
schemaType: context.schemaType ?? 'entity',
|
|
95
|
-
...
|
|
95
|
+
...context.metadata
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -11,7 +11,7 @@ export default function AdminLayout({ children }: { children: React.ReactNode })
|
|
|
11
11
|
<AdminProviders>
|
|
12
12
|
<div
|
|
13
13
|
className={cn(
|
|
14
|
-
'admin-root size-screen
|
|
14
|
+
'admin-root size-screen mt-px antialiased',
|
|
15
15
|
GeistSans.variable,
|
|
16
16
|
GeistMono.variable
|
|
17
17
|
)}
|
|
@@ -8,7 +8,7 @@ export async function AuthGateRsc({ children }: { children: React.ReactNode }) {
|
|
|
8
8
|
return (
|
|
9
9
|
<SidebarProvider className="min-h-svh">
|
|
10
10
|
<AdminSidebar />
|
|
11
|
-
<div className="relative flex min-w-0 flex-1 flex-col [--admin-shell-content-left:0px] md:[--admin-shell-content-left:var(--sidebar-width)] md:peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]
|
|
11
|
+
<div className="relative flex min-w-0 flex-1 flex-col pb-14 [--admin-shell-content-left:0px] md:[--admin-shell-content-left:var(--sidebar-width)] md:peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
|
|
12
12
|
{children}
|
|
13
13
|
</div>
|
|
14
14
|
</SidebarProvider>
|
|
@@ -34,7 +34,7 @@ export default function DashboardPage() {
|
|
|
34
34
|
<React.Fragment>
|
|
35
35
|
<PageHeader title="Dashboard" hasBackButton={false} />
|
|
36
36
|
|
|
37
|
-
<div className="
|
|
37
|
+
<div className="w-full space-y-6 p-6">
|
|
38
38
|
<Card>
|
|
39
39
|
<CardHeader>
|
|
40
40
|
<div className="flex items-center gap-2">
|
|
@@ -44,13 +44,13 @@ export default function DashboardPage() {
|
|
|
44
44
|
</CardHeader>
|
|
45
45
|
<CardContent className="p-10!">
|
|
46
46
|
<div className="grid grid-cols-2 gap-10">
|
|
47
|
-
<div className="flex flex-col
|
|
47
|
+
<div className="flex w-full flex-col gap-1">
|
|
48
48
|
<p className="text-base font-medium">Hey, let's get started</p>
|
|
49
49
|
<p className="text-muted-foreground">
|
|
50
50
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos.
|
|
51
51
|
</p>
|
|
52
52
|
</div>
|
|
53
|
-
<div className="flex flex-col
|
|
53
|
+
<div className="flex w-full flex-col">
|
|
54
54
|
<Accordion type="single" collapsible defaultValue="item-1">
|
|
55
55
|
<AccordionItem value="item-1">
|
|
56
56
|
<AccordionTrigger>
|
|
@@ -59,11 +59,11 @@ export default function DashboardPage() {
|
|
|
59
59
|
<span>Setup ENV Variables</span>
|
|
60
60
|
</div>
|
|
61
61
|
</AccordionTrigger>
|
|
62
|
-
<AccordionContent className="pl-7
|
|
63
|
-
<div className="flex flex-col
|
|
62
|
+
<AccordionContent className="h-auto pl-7">
|
|
63
|
+
<div className="flex w-full flex-col gap-1">
|
|
64
64
|
{envVariables.map((env) => (
|
|
65
65
|
<div
|
|
66
|
-
className="flex flex-col
|
|
66
|
+
className="flex w-full flex-col rounded-sm border border-border bg-card py-2 pr-2 pl-4 shadow-card"
|
|
67
67
|
key={env.name}
|
|
68
68
|
>
|
|
69
69
|
<div className="flex items-center justify-between">
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
3
4
|
import { isEmailConfigured } from '@admin/actions/profile'
|
|
4
5
|
import { authClient } from '@admin/auth/client'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
@@ -10,7 +11,6 @@ import { cn } from '@admin/utils/shared/cn'
|
|
|
10
11
|
import { LoaderCircle } from 'lucide-react'
|
|
11
12
|
import Image from 'next/image'
|
|
12
13
|
import Link from 'next/link'
|
|
13
|
-
import * as React from 'react'
|
|
14
14
|
|
|
15
15
|
export function ForgotPasswordForm({ className, ...props }: React.ComponentProps<'div'>) {
|
|
16
16
|
const [email, setEmail] = React.useState('')
|
|
@@ -59,7 +59,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
|
|
|
59
59
|
</div>
|
|
60
60
|
<div className="p-6 md:p-20">
|
|
61
61
|
{success ? (
|
|
62
|
-
<FieldGroup className="pb-12
|
|
62
|
+
<FieldGroup className="gap-10 pb-12">
|
|
63
63
|
<div className="flex flex-col items-start">
|
|
64
64
|
<h1 className="text-xl font-medium">Check your email</h1>
|
|
65
65
|
<p className="text-balance text-muted-foreground">
|
|
@@ -73,7 +73,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
|
|
|
73
73
|
</FieldGroup>
|
|
74
74
|
) : (
|
|
75
75
|
<form onSubmit={handleSubmit}>
|
|
76
|
-
<FieldGroup className="pb-12
|
|
76
|
+
<FieldGroup className="gap-10 pb-12">
|
|
77
77
|
<div className="flex flex-col items-start">
|
|
78
78
|
<h1 className="text-xl font-medium">Forgot password</h1>
|
|
79
79
|
<p className="text-balance text-muted-foreground">
|
|
@@ -82,7 +82,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
|
|
|
82
82
|
</p>
|
|
83
83
|
</div>
|
|
84
84
|
{error ? (
|
|
85
|
-
<div className="bg-destructive/10
|
|
85
|
+
<div className="rounded-md bg-destructive/10 p-3 text-sm text-destructive">
|
|
86
86
|
{error}
|
|
87
87
|
</div>
|
|
88
88
|
) : null}
|
|
@@ -108,7 +108,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
|
|
|
108
108
|
</Field>
|
|
109
109
|
<Link
|
|
110
110
|
href="/admin/login"
|
|
111
|
-
className="text-
|
|
111
|
+
className="text-center text-sm underline-offset-4 hover:underline"
|
|
112
112
|
>
|
|
113
113
|
Back to login
|
|
114
114
|
</Link>
|