@nextsparkjs/core 0.1.0-beta.189 → 0.1.0-beta.190
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/components/api/keys/CreateApiKeyDialog.d.ts.map +1 -1
- package/dist/components/api/keys/CreateApiKeyDialog.js +2 -1
- package/dist/components/app/layouts/PublicFooter.d.ts.map +1 -1
- package/dist/components/app/layouts/PublicFooter.js +2 -23
- package/dist/components/app/misc/ThemeToggle.d.ts.map +1 -1
- package/dist/components/app/misc/ThemeToggle.js +2 -1
- package/dist/components/auth/forms/LoginForm.js +1 -1
- package/dist/components/auth/forms/SignupForm.d.ts.map +1 -1
- package/dist/components/auth/forms/SignupForm.js +2 -1
- package/dist/components/auth/pages/AuthErrorPage.d.ts.map +1 -1
- package/dist/components/auth/pages/AuthErrorPage.js +2 -1
- package/dist/components/billing/ManageBillingButton.d.ts.map +1 -1
- package/dist/components/billing/ManageBillingButton.js +2 -1
- package/dist/components/dashboard/block-editor/array-field.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/array-field.js +2 -1
- package/dist/components/dashboard/block-editor/block-picker.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/block-picker.js +2 -1
- package/dist/components/dashboard/block-editor/builder-editor-view.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/builder-editor-view.js +3 -2
- package/dist/components/dashboard/block-editor/config-panel.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/config-panel.js +3 -2
- package/dist/components/dashboard/block-editor/dynamic-form.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/dynamic-form.js +2 -1
- package/dist/components/dashboard/block-editor/entity-fields-sidebar.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/entity-fields-sidebar.js +3 -2
- package/dist/components/dashboard/block-editor/pattern-reference-preview.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/pattern-reference-preview.js +2 -1
- package/dist/components/dashboard/layouts/TopNavbar.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/TopNavbar.js +4 -3
- package/dist/components/dashboard/misc/SearchDropdown.d.ts.map +1 -1
- package/dist/components/dashboard/misc/SearchDropdown.js +2 -1
- package/dist/components/dashboard/mobile/MobileTopBar.d.ts.map +1 -1
- package/dist/components/dashboard/mobile/MobileTopBar.js +2 -1
- package/dist/components/devtools/BlockDetailViewer.d.ts.map +1 -1
- package/dist/components/devtools/BlockDetailViewer.js +2 -1
- package/dist/components/devtools/BlocksViewer.d.ts.map +1 -1
- package/dist/components/devtools/BlocksViewer.js +2 -1
- package/dist/components/devtools/ConfigViewer.d.ts.map +1 -1
- package/dist/components/devtools/ConfigViewer.js +3 -2
- package/dist/components/devtools/TestCasesViewer.d.ts.map +1 -1
- package/dist/components/devtools/TestCasesViewer.js +3 -2
- package/dist/components/devtools/TestCoverageDashboard.d.ts.map +1 -1
- package/dist/components/devtools/TestCoverageDashboard.js +2 -1
- package/dist/components/devtools/api-explorer/ApiDocsModal.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiDocsModal.js +0 -0
- package/dist/components/devtools/api-explorer/ApiExplorer.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiExplorer.js +2 -1
- package/dist/components/devtools/scheduled-actions/actions-table.d.ts.map +1 -1
- package/dist/components/devtools/scheduled-actions/actions-table.js +3 -2
- package/dist/components/docs/docs-sidebar.d.ts.map +1 -1
- package/dist/components/docs/docs-sidebar.js +3 -2
- package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
- package/dist/components/entities/EntityFieldRenderer.js +2 -1
- package/dist/components/entities/EntityList.d.ts.map +1 -1
- package/dist/components/entities/EntityList.js +2 -1
- package/dist/components/entities/EntityTable.d.ts.map +1 -1
- package/dist/components/entities/EntityTable.js +3 -2
- package/dist/components/entities/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/entities/ErrorBoundary.js +2 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.js +3 -2
- package/dist/components/media/MediaCard.d.ts.map +1 -1
- package/dist/components/media/MediaCard.js +2 -1
- package/dist/components/media/MediaDetailPanel.d.ts.map +1 -1
- package/dist/components/media/MediaDetailPanel.js +2 -1
- package/dist/components/media/MediaList.d.ts.map +1 -1
- package/dist/components/media/MediaList.js +2 -1
- package/dist/components/media/MediaSelector.d.ts.map +1 -1
- package/dist/components/media/MediaSelector.js +2 -1
- package/dist/components/media/MediaUploadZone.d.ts.map +1 -1
- package/dist/components/media/MediaUploadZone.js +2 -1
- package/dist/components/public/entities/PublicEntityDetail.d.ts.map +1 -1
- package/dist/components/public/entities/PublicEntityDetail.js +2 -1
- package/dist/components/teams/TeamPendingInvitations.d.ts.map +1 -1
- package/dist/components/teams/TeamPendingInvitations.js +3 -2
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/audio-upload.d.ts.map +1 -1
- package/dist/components/ui/audio-upload.js +2 -1
- package/dist/components/ui/avatar.d.ts +17 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +29 -2
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumb.d.ts +13 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +23 -10
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/file-upload.d.ts.map +1 -1
- package/dist/components/ui/file-upload.js +2 -1
- package/dist/components/ui/image-upload.d.ts.map +1 -1
- package/dist/components/ui/image-upload.js +4 -3
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/optimized-image.d.ts.map +1 -1
- package/dist/components/ui/optimized-image.js +5 -0
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +3 -0
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/relation-display.d.ts.map +1 -1
- package/dist/components/ui/relation-display.js +3 -2
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/simple-relation-select.d.ts.map +1 -1
- package/dist/components/ui/simple-relation-select.js +7 -6
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/user-display.d.ts.map +1 -1
- package/dist/components/ui/user-display.js +2 -1
- package/dist/components/ui/user-select.d.ts.map +1 -1
- package/dist/components/ui/user-select.js +2 -1
- package/dist/components/ui/video-upload.d.ts.map +1 -1
- package/dist/components/ui/video-upload.js +3 -2
- package/dist/components/users/tables/UsersTable.d.ts.map +1 -1
- package/dist/components/users/tables/UsersTable.js +3 -2
- package/dist/contexts/SubscriptionContext.d.ts.map +1 -1
- package/dist/contexts/SubscriptionContext.js +4 -3
- package/dist/contexts/TeamContext.d.ts.map +1 -1
- package/dist/contexts/TeamContext.js +3 -2
- package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -1
- package/dist/hooks/useAccountPreferencesSync.js +2 -1
- package/dist/hooks/useApiExplorerNavigation.d.ts.map +1 -1
- package/dist/hooks/useApiExplorerNavigation.js +2 -1
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +3 -2
- package/dist/hooks/useEnsureUserMetadata.d.ts.map +1 -1
- package/dist/hooks/useEnsureUserMetadata.js +3 -2
- package/dist/hooks/useEntityWithMeta.d.ts.map +1 -1
- package/dist/hooks/useEntityWithMeta.js +3 -2
- package/dist/hooks/useInvoice.d.ts.map +1 -1
- package/dist/hooks/useInvoice.js +2 -1
- package/dist/hooks/useInvoices.d.ts.map +1 -1
- package/dist/hooks/useInvoices.js +2 -1
- package/dist/hooks/useMedia.d.ts.map +1 -1
- package/dist/hooks/useMedia.js +10 -9
- package/dist/hooks/useMediaUpload.d.ts.map +1 -1
- package/dist/hooks/useMediaUpload.js +2 -1
- package/dist/hooks/useMembership.d.ts.map +1 -1
- package/dist/hooks/useMembership.js +3 -2
- package/dist/hooks/usePatternUsages.d.ts.map +1 -1
- package/dist/hooks/usePatternUsages.js +3 -2
- package/dist/hooks/usePrefetch.d.ts.map +1 -1
- package/dist/hooks/usePrefetch.js +3 -2
- package/dist/hooks/useQuota.d.ts.map +1 -1
- package/dist/hooks/useQuota.js +2 -1
- package/dist/hooks/useTeamInvitations.d.ts.map +1 -1
- package/dist/hooks/useTeamInvitations.js +4 -3
- package/dist/hooks/useTeamMembers.d.ts.map +1 -1
- package/dist/hooks/useTeamMembers.js +5 -4
- package/dist/hooks/useTeamUpdate.d.ts.map +1 -1
- package/dist/hooks/useTeamUpdate.js +2 -1
- package/dist/hooks/useUserProfile.d.ts.map +1 -1
- package/dist/hooks/useUserProfile.js +3 -2
- package/dist/hooks/useUserSettings.d.ts.map +1 -1
- package/dist/hooks/useUserSettings.js +3 -2
- package/dist/lib/actions/entity.actions.d.ts.map +1 -1
- package/dist/lib/actions/entity.actions.js +2 -1
- package/dist/lib/api/entities.d.ts.map +1 -1
- package/dist/lib/api/entities.js +4 -3
- package/dist/lib/auth/verify-email-link.d.ts +10 -0
- package/dist/lib/auth/verify-email-link.d.ts.map +1 -0
- package/dist/lib/auth/verify-email-link.js +14 -0
- package/dist/lib/auth-client.d.ts +2 -0
- package/dist/lib/auth-client.d.ts.map +1 -1
- package/dist/lib/auth-client.js +4 -0
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +10 -2
- package/dist/lib/base-path.d.ts +85 -0
- package/dist/lib/base-path.d.ts.map +1 -0
- package/dist/lib/base-path.js +79 -0
- package/dist/lib/billing/schema.d.ts +1 -1
- package/dist/lib/billing/schema.d.ts.map +1 -1
- package/dist/lib/billing/schema.js +1 -1
- package/dist/lib/blocks/sanitize-html.d.ts.map +1 -1
- package/dist/lib/blocks/sanitize-html.js +18 -2
- package/dist/lib/cache/revalidate-tag.d.ts +14 -0
- package/dist/lib/cache/revalidate-tag.d.ts.map +1 -0
- package/dist/lib/cache/revalidate-tag.js +8 -0
- package/dist/lib/config/dashboard-schema.d.ts +1 -1
- package/dist/lib/config/dashboard-schema.d.ts.map +1 -1
- package/dist/lib/config/dashboard-schema.js +1 -1
- package/dist/lib/config/types.d.ts +36 -16
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/lib/docs/access.d.ts +28 -0
- package/dist/lib/docs/access.d.ts.map +1 -0
- package/dist/lib/docs/access.js +16 -0
- package/dist/lib/docs/parser.d.ts.map +1 -1
- package/dist/lib/docs/parser.js +2 -1
- package/dist/lib/docs/remark-doc-links.d.ts +14 -0
- package/dist/lib/docs/remark-doc-links.d.ts.map +1 -0
- package/dist/lib/docs/remark-doc-links.js +38 -0
- package/dist/lib/entities/api-generator.d.ts +1 -1
- package/dist/lib/entities/api-generator.d.ts.map +1 -1
- package/dist/lib/entities/api-generator.js +1 -1
- package/dist/lib/entities/schema-generator.d.ts +1 -1
- package/dist/lib/entities/schema-generator.d.ts.map +1 -1
- package/dist/lib/entities/schema-generator.js +1 -1
- package/dist/lib/mcp/engine.js +1 -1
- package/dist/lib/mcp/schema-builder.d.ts +1 -1
- package/dist/lib/mcp/schema-builder.d.ts.map +1 -1
- package/dist/lib/mcp/schema-builder.js +1 -1
- package/dist/lib/mcp/tool-generator.js +1 -1
- package/dist/lib/mcp/types.d.ts +1 -1
- package/dist/lib/mcp/types.d.ts.map +1 -1
- package/dist/lib/media/schemas.d.ts +1 -1
- package/dist/lib/media/schemas.d.ts.map +1 -1
- package/dist/lib/media/schemas.js +1 -1
- package/dist/lib/middleware/index.d.ts +5 -1
- package/dist/lib/middleware/index.d.ts.map +1 -1
- package/dist/lib/middleware/index.js +3 -2
- package/dist/lib/services/meta.service.d.ts +60 -0
- package/dist/lib/services/meta.service.d.ts.map +1 -1
- package/dist/lib/services/meta.service.js +132 -12
- package/dist/lib/services/middleware.service.d.ts.map +1 -1
- package/dist/lib/services/middleware.service.js +3 -2
- package/dist/lib/teams/schema.d.ts +1 -1
- package/dist/lib/teams/schema.d.ts.map +1 -1
- package/dist/lib/teams/schema.js +1 -1
- package/dist/lib/teams/teams.api.d.ts.map +1 -1
- package/dist/lib/teams/teams.api.js +4 -3
- package/dist/lib/user-data-client.d.ts.map +1 -1
- package/dist/lib/user-data-client.js +3 -2
- package/dist/lib/validation/invoices.d.ts +1 -1
- package/dist/lib/validation/invoices.d.ts.map +1 -1
- package/dist/lib/validation/invoices.js +1 -1
- package/dist/lib/validation-schemas.d.ts +1 -1
- package/dist/lib/validation-schemas.d.ts.map +1 -1
- package/dist/lib/validation-schemas.js +1 -1
- package/dist/lib/validation.d.ts +1 -1
- package/dist/lib/validation.d.ts.map +1 -1
- package/dist/lib/validation.js +1 -1
- package/dist/messages/de/footer.json +0 -1
- package/dist/messages/de/index.d.ts +0 -1
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/en/footer.json +0 -1
- package/dist/messages/en/index.d.ts +0 -1
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/es/footer.json +0 -1
- package/dist/messages/es/index.d.ts +0 -1
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/fr/footer.json +0 -1
- package/dist/messages/fr/index.d.ts +0 -1
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/it/footer.json +0 -1
- package/dist/messages/it/index.d.ts +0 -1
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/pt/footer.json +0 -1
- package/dist/messages/pt/index.d.ts +0 -1
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/templates/app/(auth)/accept-invite/[token]/page.tsx +4 -3
- package/dist/templates/app/(auth)/verify-email/page.tsx +4 -3
- package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +11 -0
- package/dist/templates/app/api/auth/[...all]/route.ts +15 -14
- package/dist/templates/app/api/internal/user-metadata/route.ts +6 -8
- package/dist/templates/app/api/user/plan-flags/route.ts +1 -1
- package/dist/templates/app/api/user/profile/route.ts +12 -17
- package/dist/templates/app/api/v1/api-keys/route.ts +1 -1
- package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +2 -1
- package/dist/templates/app/api/v1/billing/cancel/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/change-plan/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/check-action/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/checkout/route.ts +1 -1
- package/dist/templates/app/api/v1/blocks/validate/route.ts +1 -1
- package/dist/templates/app/api/v1/media/[id]/tags/route.ts +1 -1
- package/dist/templates/app/api/v1/post-categories/[id]/route.ts +1 -1
- package/dist/templates/app/api/v1/post-categories/route.ts +1 -1
- package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +2 -1
- package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +3 -5
- package/dist/templates/app/api/v1/teams/docs.md +4 -9
- package/dist/templates/app/api/v1/teams/switch/route.ts +1 -1
- package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +1 -1
- package/dist/templates/app/api/v1/users/[id]/route.ts +1 -1
- package/dist/templates/app/api/v1/users/route.ts +1 -1
- package/dist/templates/app/dashboard/(main)/media/page.tsx +3 -1
- package/dist/templates/app/dashboard/settings/api-keys/page.tsx +5 -4
- package/dist/templates/app/dashboard/settings/profile/page.tsx +3 -2
- package/dist/templates/app/devtools/scheduled-actions/page.tsx +2 -1
- package/dist/templates/app/superadmin/docs/[section]/[page]/page.tsx +16 -0
- package/dist/templates/app/superadmin/subscriptions/page.tsx +3 -2
- package/dist/templates/app/superadmin/teams/[teamId]/page.tsx +5 -4
- package/dist/templates/app/superadmin/users/[userId]/page.tsx +2 -1
- package/dist/templates/app/superadmin/users/page.tsx +2 -1
- package/dist/templates/blocks/cta-section/component.tsx +3 -2
- package/dist/templates/blocks/cta-section/schema.ts +1 -1
- package/dist/templates/blocks/features-grid/component.tsx +2 -1
- package/dist/templates/blocks/features-grid/schema.ts +1 -1
- package/dist/templates/blocks/hero/component.tsx +3 -2
- package/dist/templates/blocks/hero/schema.ts +1 -1
- package/dist/templates/blocks/testimonials/component.tsx +2 -1
- package/dist/templates/blocks/testimonials/schema.ts +1 -1
- package/dist/templates/blocks/text-content/component.tsx +2 -1
- package/dist/templates/blocks/text-content/schema.ts +1 -1
- package/dist/templates/ci-workflows/README.md +1 -1
- package/dist/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/dist/templates/ci-workflows/github/cypress-smoke.yml +1 -1
- package/dist/templates/contents/plugins/starter/plugin/api/example/route.ts.template +1 -1
- package/dist/templates/contents/themes/starter/blocks/cta-section/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/cta-section/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/features-grid/component.tsx +2 -1
- package/dist/templates/contents/themes/starter/blocks/features-grid/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/testimonials/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/testimonials/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/text-content/component.tsx +2 -1
- package/dist/templates/contents/themes/starter/blocks/text-content/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/entities/posts/components/post-header.tsx +2 -1
- package/dist/templates/contents/themes/starter/lib/hooks/useAnalyticsData.ts +2 -1
- package/dist/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +2 -1
- package/dist/templates/eslint.config.mjs +133 -9
- package/dist/templates/features/blog/blocks/post-content/component.tsx +2 -1
- package/dist/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/dist/templates/features/blog/entities/posts/components/post-header.tsx +2 -1
- package/dist/templates/features/pages/blocks/hero/component.tsx +3 -2
- package/dist/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/dist/templates/next.config.mjs +50 -29
- package/dist/templates/proxy.ts +100 -21
- package/dist/templates/public/sw.js +2 -2
- package/dist/templates/scripts/cy-run-prod.cjs +5 -5
- package/dist/types/blocks.d.ts +1 -1
- package/dist/types/blocks.d.ts.map +1 -1
- package/dist/types/blocks.js +1 -1
- package/package.json +9 -5
- package/scripts/build/docs-registry.mjs +7 -7
- package/scripts/build/registry/__tests__/billing-registry.test.mjs +43 -0
- package/scripts/build/registry/__tests__/build-output.test.mjs +209 -0
- package/scripts/build/registry/__tests__/copy-race-child.mjs +14 -0
- package/scripts/build/registry/__tests__/direct-fs-writes.mjs +203 -0
- package/scripts/build/registry/__tests__/globals-css-tag.test.mjs +66 -0
- package/scripts/build/registry/__tests__/icons-discovery.test.mjs +530 -29
- package/scripts/build/registry/__tests__/page-generator.test.mjs +211 -37
- package/scripts/build/registry/__tests__/published-signatures.test.mjs +239 -0
- package/scripts/build/registry/__tests__/route-file-rule.test.mjs +170 -0
- package/scripts/build/registry/__tests__/safe-fs.test.mjs +333 -0
- package/scripts/build/registry/__tests__/template-analysis.test.mjs +142 -0
- package/scripts/build/registry/__tests__/template-registry.test.mjs +279 -9
- package/scripts/build/registry/__tests__/templates-plan.test.mjs +128 -0
- package/scripts/build/registry/__tests__/templates-tree.test.mjs +367 -0
- package/scripts/build/registry/__tests__/write-places.test.mjs +425 -0
- package/scripts/build/registry/config.mjs +6 -65
- package/scripts/build/registry/discovery/icons.mjs +498 -43
- package/scripts/build/registry/discovery/templates.mjs +1 -1
- package/scripts/build/registry/generators/billing-registry.mjs +1 -1
- package/scripts/build/registry/generators/docs-registry.mjs +3 -4
- package/scripts/build/registry/generators/feature-registry.mjs +1 -1
- package/scripts/build/registry/generators/permissions-registry.mjs +2 -2
- package/scripts/build/registry/generators/template-registry.mjs +65 -49
- package/scripts/build/registry/index.mjs +1 -2
- package/scripts/build/registry/post-build/index.mjs +1 -1
- package/scripts/build/registry/post-build/own-gitignores.mjs +220 -0
- package/scripts/build/registry/post-build/page-generator.mjs +512 -268
- package/scripts/build/registry/post-build/route-cleanup.mjs +16 -13
- package/scripts/build/registry/post-build/test-fixtures.mjs +26 -8
- package/scripts/build/registry/project-mode.mjs +76 -0
- package/scripts/build/registry/shared/typescript-compiler.mjs +77 -0
- package/scripts/build/registry/validate-env.test.mjs +12 -8
- package/scripts/build/registry/watch.mjs +3 -53
- package/scripts/build/registry/write-places.mjs +228 -0
- package/scripts/build/registry.mjs +53 -30
- package/scripts/build/safe-fs.mjs +279 -0
- package/scripts/build/templates-plan.mjs +44 -0
- package/scripts/build/theme.mjs +46 -42
- package/scripts/build/update-tsconfig.mjs +16 -15
- package/scripts/db/cluster-changes.mjs +205 -0
- package/scripts/db/connection-time-limits.mjs +53 -0
- package/scripts/db/inspect-server.mjs +108 -0
- package/scripts/db/migration-time-limit.mjs +695 -0
- package/scripts/db/run-migrations.mjs +46 -41
- package/scripts/db/ssl-config.mjs +194 -0
- package/scripts/db/theme-location.mjs +69 -0
- package/scripts/db/verify-tables.mjs +3 -8
- package/scripts/db/verify-teams.mjs +2 -6
- package/scripts/db/verify-theme-migrations.mjs +169 -0
- package/scripts/maintenance/core-updater.mjs +1003 -0
- package/scripts/maintenance/step-guard.mjs +74 -0
- package/scripts/maintenance/update-core.mjs +14 -831
- package/scripts/utils/console-guard.mjs +13 -0
- package/scripts/utils/generated-tag.mjs +66 -0
- package/scripts/utils/index.mjs +9 -1
- package/scripts/utils/logging.mjs +140 -0
- package/templates/app/(auth)/accept-invite/[token]/page.tsx +4 -3
- package/templates/app/(auth)/verify-email/page.tsx +4 -3
- package/templates/app/(public)/docs/[section]/[page]/page.tsx +11 -0
- package/templates/app/api/auth/[...all]/route.ts +15 -14
- package/templates/app/api/internal/user-metadata/route.ts +6 -8
- package/templates/app/api/user/plan-flags/route.ts +1 -1
- package/templates/app/api/user/profile/route.ts +12 -17
- package/templates/app/api/v1/api-keys/route.ts +1 -1
- package/templates/app/api/v1/auth/signup-with-invite/route.ts +2 -1
- package/templates/app/api/v1/billing/cancel/route.ts +1 -1
- package/templates/app/api/v1/billing/change-plan/route.ts +1 -1
- package/templates/app/api/v1/billing/check-action/route.ts +1 -1
- package/templates/app/api/v1/billing/checkout/route.ts +1 -1
- package/templates/app/api/v1/blocks/validate/route.ts +1 -1
- package/templates/app/api/v1/media/[id]/tags/route.ts +1 -1
- package/templates/app/api/v1/post-categories/[id]/route.ts +1 -1
- package/templates/app/api/v1/post-categories/route.ts +1 -1
- package/templates/app/api/v1/teams/[teamId]/members/route.ts +2 -1
- package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +3 -5
- package/templates/app/api/v1/teams/docs.md +4 -9
- package/templates/app/api/v1/teams/switch/route.ts +1 -1
- package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +1 -1
- package/templates/app/api/v1/users/[id]/route.ts +1 -1
- package/templates/app/api/v1/users/route.ts +1 -1
- package/templates/app/dashboard/(main)/media/page.tsx +3 -1
- package/templates/app/dashboard/settings/api-keys/page.tsx +5 -4
- package/templates/app/dashboard/settings/profile/page.tsx +3 -2
- package/templates/app/devtools/scheduled-actions/page.tsx +2 -1
- package/templates/app/superadmin/docs/[section]/[page]/page.tsx +16 -0
- package/templates/app/superadmin/subscriptions/page.tsx +3 -2
- package/templates/app/superadmin/teams/[teamId]/page.tsx +5 -4
- package/templates/app/superadmin/users/[userId]/page.tsx +2 -1
- package/templates/app/superadmin/users/page.tsx +2 -1
- package/templates/blocks/cta-section/component.tsx +3 -2
- package/templates/blocks/cta-section/schema.ts +1 -1
- package/templates/blocks/features-grid/component.tsx +2 -1
- package/templates/blocks/features-grid/schema.ts +1 -1
- package/templates/blocks/hero/component.tsx +3 -2
- package/templates/blocks/hero/schema.ts +1 -1
- package/templates/blocks/testimonials/component.tsx +2 -1
- package/templates/blocks/testimonials/schema.ts +1 -1
- package/templates/blocks/text-content/component.tsx +2 -1
- package/templates/blocks/text-content/schema.ts +1 -1
- package/templates/ci-workflows/README.md +1 -1
- package/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/templates/ci-workflows/github/cypress-smoke.yml +1 -1
- package/templates/contents/plugins/starter/plugin/api/example/route.ts.template +1 -1
- package/templates/contents/themes/starter/blocks/cta-section/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/cta-section/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/features-grid/component.tsx +2 -1
- package/templates/contents/themes/starter/blocks/features-grid/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/hero/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/hero/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/testimonials/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/testimonials/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/text-content/component.tsx +2 -1
- package/templates/contents/themes/starter/blocks/text-content/schema.ts +1 -1
- package/templates/contents/themes/starter/entities/posts/components/post-header.tsx +2 -1
- package/templates/contents/themes/starter/lib/hooks/useAnalyticsData.ts +2 -1
- package/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +2 -1
- package/templates/eslint.config.mjs +133 -9
- package/templates/features/blog/blocks/post-content/component.tsx +2 -1
- package/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/templates/features/blog/entities/posts/components/post-header.tsx +2 -1
- package/templates/features/pages/blocks/hero/component.tsx +3 -2
- package/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/templates/next.config.mjs +50 -29
- package/templates/proxy.ts +100 -21
- package/templates/public/sw.js +2 -2
- package/templates/scripts/cy-run-prod.cjs +5 -5
- package/tests/jest/__mocks__/@nextsparkjs/registries/template-registry.client.ts +11 -0
- package/tests/jest/__mocks__/next-server.js +10 -0
- package/scripts/build/docs.mjs +0 -392
package/dist/lib/docs/parser.js
CHANGED
|
@@ -6,6 +6,7 @@ import remarkRehype from "remark-rehype";
|
|
|
6
6
|
import rehypeShiki from "@shikijs/rehype";
|
|
7
7
|
import rehypeStringify from "rehype-stringify";
|
|
8
8
|
import { remarkMermaid } from "./remark-mermaid.js";
|
|
9
|
+
import { remarkDocLinks } from "./remark-doc-links.js";
|
|
9
10
|
import {
|
|
10
11
|
extractOrderFromFilename,
|
|
11
12
|
cleanFilename,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
async function parseMarkdownFile(filePath) {
|
|
15
16
|
const fileContent = fs.readFileSync(filePath, "utf-8");
|
|
16
17
|
const { data, content } = matter(fileContent);
|
|
17
|
-
const processedContent = await remark().use(remarkGfm).use(remarkMermaid).use(remarkRehype, { allowDangerousHtml: true }).use(rehypeShiki, { theme: "github-dark" }).use(rehypeStringify, { allowDangerousHtml: true }).process(content);
|
|
18
|
+
const processedContent = await remark().use(remarkGfm).use(remarkDocLinks, filePath).use(remarkMermaid).use(remarkRehype, { allowDangerousHtml: true }).use(rehypeShiki, { theme: "github-dark" }).use(rehypeStringify, { allowDangerousHtml: true }).process(content);
|
|
18
19
|
return {
|
|
19
20
|
metadata: data,
|
|
20
21
|
content,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/docs/...` or `/superadmin/docs/...` route for a relative link written
|
|
3
|
+
* inside `filePath`, or null when the link isn't a same-tree relative `.md`
|
|
4
|
+
* reference (an absolute path, an external URL, one that resolves outside
|
|
5
|
+
* `docs/public` and `docs/superadmin`, or one whose target file doesn't
|
|
6
|
+
* exist on disk).
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveRelativeDocLink(url: string, filePath: string): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Unified/remark plugin. Runs on the mdast tree before it is converted to
|
|
11
|
+
* rehype, so the generated `<a>` already carries the routed href.
|
|
12
|
+
*/
|
|
13
|
+
export declare function remarkDocLinks(filePath: string): (tree: unknown) => void;
|
|
14
|
+
//# sourceMappingURL=remark-doc-links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remark-doc-links.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/remark-doc-links.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAenF;AA2BD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,IACrC,MAAM,OAAO,KAAG,IAAI,CAG7B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { cleanFilename } from "./utils.js";
|
|
4
|
+
import { withBasePath } from "../base-path.js";
|
|
5
|
+
const DOC_TREE_PATTERN = /\/docs\/(public|superadmin)\/([^/]+)\/([^/]+)\.md$/;
|
|
6
|
+
function resolveRelativeDocLink(url, filePath) {
|
|
7
|
+
const match = url.match(/^(\.{1,2}\/[^?#]+\.md)(#.*)?$/);
|
|
8
|
+
if (!match) return null;
|
|
9
|
+
const [, relativePath, hash = ""] = match;
|
|
10
|
+
const resolved = path.resolve(path.dirname(filePath), relativePath).replace(/\\/g, "/");
|
|
11
|
+
const treeMatch = resolved.match(DOC_TREE_PATTERN);
|
|
12
|
+
if (!treeMatch) return null;
|
|
13
|
+
if (!fs.existsSync(resolved)) return null;
|
|
14
|
+
const [, source, sectionDir, pageFile] = treeMatch;
|
|
15
|
+
const sectionSlug = cleanFilename(sectionDir);
|
|
16
|
+
const pageSlug = cleanFilename(pageFile);
|
|
17
|
+
const base = source === "superadmin" ? "/superadmin/docs" : "/docs";
|
|
18
|
+
return withBasePath(`${base}/${sectionSlug}/${pageSlug}${hash}`);
|
|
19
|
+
}
|
|
20
|
+
function rewriteLinks(node, filePath) {
|
|
21
|
+
if (!node.children) return;
|
|
22
|
+
for (const child of node.children) {
|
|
23
|
+
if ((child.type === "link" || child.type === "definition") && child.url) {
|
|
24
|
+
const resolved = resolveRelativeDocLink(child.url, filePath);
|
|
25
|
+
if (resolved) child.url = resolved;
|
|
26
|
+
}
|
|
27
|
+
rewriteLinks(child, filePath);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function remarkDocLinks(filePath) {
|
|
31
|
+
return (tree) => {
|
|
32
|
+
rewriteLinks(tree, filePath);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
remarkDocLinks,
|
|
37
|
+
resolveRelativeDocLink
|
|
38
|
+
};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @deprecated Use registry-based specific endpoints instead
|
|
12
12
|
*/
|
|
13
13
|
import { NextRequest, NextResponse } from 'next/server';
|
|
14
|
-
import
|
|
14
|
+
import * as z from 'zod';
|
|
15
15
|
import type { EntityConfig } from './types';
|
|
16
16
|
export interface APIGeneratorOptions {
|
|
17
17
|
enableAuth?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-generator.d.ts","sourceRoot":"","sources":["../../../src/lib/entities/api-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"api-generator.d.ts","sourceRoot":"","sources":["../../../src/lib/entities/api-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,YAAY,EAAsC,MAAM,SAAS,CAAA;AAM/E,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAA;IAC9C,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAA;CACnC;AAED,MA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,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;;;;;EAlV3E"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Automatically generates Zod validation schemas from entity field definitions.
|
|
5
5
|
* Supports create, update, and response schemas with child entities.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import * as z from 'zod';
|
|
8
8
|
import type { EntityConfig } from './types';
|
|
9
9
|
export interface SchemaGenerationOptions {
|
|
10
10
|
includeReadOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-generator.d.ts","sourceRoot":"","sources":["../../../src/lib/entities/schema-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"schema-generator.d.ts","sourceRoot":"","sources":["../../../src/lib/entities/schema-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,OAAO,KAAK,EAAE,YAAY,EAAsC,MAAM,SAAS,CAAA;AAG/E,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAA;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;IACnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;IACnB,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAA;IACrB,IAAI,EAAE,CAAC,CAAC,SAAS,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAA;CAC3C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,EAC1B,OA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,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CA4CpE"}
|
package/dist/lib/mcp/engine.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
import { StatelessJsonRpcTransport } from "./transport.js";
|
|
4
4
|
import { generateEntityTools, normalizeDateFields } from "./tool-generator.js";
|
|
5
5
|
import { buildEntitySchemas } from "./schema-builder.js";
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* - search only exposed when the entity has one of name|title|slug|content
|
|
21
21
|
* - `distinct` NEVER exposed (identifier interpolation risk in the core)
|
|
22
22
|
*/
|
|
23
|
-
import
|
|
23
|
+
import * as z from 'zod';
|
|
24
24
|
import type { EntityConfig } from '../entities/types';
|
|
25
25
|
import type { McpEntityOverride, McpShape } from './types';
|
|
26
26
|
export interface EntitySchemaBundle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-builder.d.ts","sourceRoot":"","sources":["../../../src/lib/mcp/schema-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"schema-builder.d.ts","sourceRoot":"","sources":["../../../src/lib/mcp/schema-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAwB1D,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,QAAQ,CAAA;IACrB,YAAY,EAAE,CAAC,CAAC,UAAU,CAAA;IAC1B,WAAW,EAAE,QAAQ,CAAA;IACrB,YAAY,EAAE,CAAC,CAAC,UAAU,CAAA;IAC1B,SAAS,EAAE,QAAQ,CAAA;IACnB,UAAU,EAAE,CAAC,CAAC,UAAU,CAAA;IACxB,QAAQ,EAAE,QAAQ,CAAA;IAClB,SAAS,EAAE,CAAC,CAAC,UAAU,CAAA;IACvB,qFAAqF;IACrF,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,kFAAkF;IAClF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACxF,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,oBAAyB,GACjC,kBAAkB,CAwBpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
const SEARCHED_FIELDS = ["name", "title", "slug", "content"];
|
|
3
3
|
const INPUT_EXCLUDED_TYPES = /* @__PURE__ */ new Set(["media-library", "file", "image", "video", "audio"]);
|
|
4
4
|
const FILTER_EXCLUDED_TYPES = /* @__PURE__ */ new Set([
|
package/dist/lib/mcp/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* which the default route template assembles from the generated
|
|
8
8
|
* MCP_OVERRIDES registry.
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
10
|
+
import type * as z from 'zod';
|
|
11
11
|
import type { EntityConfig } from '../entities/types';
|
|
12
12
|
export type McpOperation = 'list' | 'get' | 'create' | 'update' | 'delete';
|
|
13
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/mcp/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;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,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,YAAY,EAAE,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC1C,4EAA4E;IAC5E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACxF,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sEAAsE;IACtE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,iBAAiB,EAAE,CAAA;IACtD,kEAAkE;IAClE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/media/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/media/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAU5B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAS/B,CAAA"}
|
|
@@ -35,9 +35,13 @@ export interface SessionUser {
|
|
|
35
35
|
export declare function hasThemeMiddleware(themeName: string): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Execute theme middleware with error handling
|
|
38
|
+
*
|
|
39
|
+
* `coreSession` has the type the generated middleware registry gives a theme
|
|
40
|
+
* middleware's session argument, which is auth's full session user rather
|
|
41
|
+
* than the minimal SessionUser above.
|
|
38
42
|
* @complexity O(1) + async execution time
|
|
39
43
|
*/
|
|
40
|
-
export declare function executeThemeMiddleware(themeName: string, request: NextRequest, coreSession?:
|
|
44
|
+
export declare function executeThemeMiddleware(themeName: string, request: NextRequest, coreSession?: Parameters<MiddlewareRegistryEntry['middleware']>[1]): Promise<NextResponse | null>;
|
|
41
45
|
/**
|
|
42
46
|
* Get app config for a theme
|
|
43
47
|
* @complexity O(1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/middleware/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/middleware/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAIvD,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACf,MAAM,6CAA6C,CAAA;AAOpD,YAAY,EAAE,uBAAuB,EAAE,SAAS,EAAE,CAAA;AAIlD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,WAAW,EACpB,WAAW,CAAC,EAAE,UAAU,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GACjE,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAa9B;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAEpE;AAID;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,WAAW,EACpB,UAAU,GAAE,MAAiB,GAC5B,YAAY,CAKd;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,UAAU,GAAE,MAAqB,GAChC,YAAY,CAEd;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,WAAW,GAAG,IAAI,GAC9B,YAAY,CAkBd"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
|
+
import { withBasePath } from "../base-path.js";
|
|
2
3
|
import {
|
|
3
4
|
MIDDLEWARE_REGISTRY
|
|
4
5
|
} from "@nextsparkjs/registries/middleware-registry";
|
|
@@ -27,12 +28,12 @@ function getThemeAppConfig(themeName) {
|
|
|
27
28
|
}
|
|
28
29
|
function redirectWithoutSession(request, targetPath = "/login") {
|
|
29
30
|
const { pathname } = request.nextUrl;
|
|
30
|
-
const loginUrl = new URL(targetPath, request.url);
|
|
31
|
+
const loginUrl = new URL(withBasePath(targetPath), request.url);
|
|
31
32
|
loginUrl.searchParams.set("callbackUrl", pathname);
|
|
32
33
|
return NextResponse.redirect(loginUrl);
|
|
33
34
|
}
|
|
34
35
|
function redirectWithSession(request, targetPath = "/dashboard") {
|
|
35
|
-
return NextResponse.redirect(new URL(targetPath, request.url));
|
|
36
|
+
return NextResponse.redirect(new URL(withBasePath(targetPath), request.url));
|
|
36
37
|
}
|
|
37
38
|
function addUserHeaders(request, sessionUser) {
|
|
38
39
|
const requestHeaders = new Headers(request.headers);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { EntityType, CreateMetaPayload } from '../../types/meta.types';
|
|
2
|
+
/** A meta value over the 1 MiB limit, on its own or once merged with the stored value. */
|
|
3
|
+
export declare class MetaValueTooLargeError extends Error {
|
|
4
|
+
constructor(message?: string);
|
|
5
|
+
}
|
|
2
6
|
export declare class MetaService {
|
|
3
7
|
/**
|
|
4
8
|
* Obtener configuración de entidad
|
|
@@ -24,13 +28,69 @@ export declare class MetaService {
|
|
|
24
28
|
* Obtener un meta dato específico
|
|
25
29
|
*/
|
|
26
30
|
static getEntityMeta(entityType: EntityType, entityId: string, metaKey: string, userId: string): Promise<unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Validations that were previously in the stored procedure, shared by every
|
|
33
|
+
* method that writes a meta value. Returns the JSON string for the `::jsonb`
|
|
34
|
+
* cast so callers don't serialize `metaValue` twice.
|
|
35
|
+
*/
|
|
36
|
+
private static validateMetaWrite;
|
|
37
|
+
/**
|
|
38
|
+
* SQL condition: a jsonb value is within the limit as Postgres stores it.
|
|
39
|
+
* jsonb is normalized when stored, and its text form puts a space after
|
|
40
|
+
* every `:` and `,`, so a value within the limit as compact JSON can exceed
|
|
41
|
+
* it once stored. The limit is measured on that text form.
|
|
42
|
+
*/
|
|
43
|
+
private static fitsMetaLimit;
|
|
44
|
+
/**
|
|
45
|
+
* The INSERT of one meta row, $1-$6 being id, key, value, data type, public
|
|
46
|
+
* and searchable. It inserts nothing when the value is over the limit as
|
|
47
|
+
* stored; the caller appends its ON CONFLICT clause and checks rowCount.
|
|
48
|
+
*/
|
|
49
|
+
private static insertMetaRowSql;
|
|
27
50
|
/**
|
|
28
51
|
* Establecer un meta dato
|
|
29
52
|
*
|
|
30
53
|
* NOTE: Metas tables do NOT have teamId column - security is inherited from parent entity via RLS.
|
|
31
54
|
* This follows the CRM theme pattern where metadata access is controlled through the parent entity.
|
|
55
|
+
*
|
|
56
|
+
* Throws MetaValueTooLargeError, writing nothing, when the value is over
|
|
57
|
+
* 1 MiB as Postgres stores it.
|
|
32
58
|
*/
|
|
33
59
|
static setEntityMeta(entityType: EntityType, entityId: string, metaKey: string, metaValue: unknown, userId: string, options?: Partial<CreateMetaPayload>): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Upserts a meta value merged with the stored one in a single statement, so
|
|
62
|
+
* concurrent writes to the same key can't drop each other's keys the way a
|
|
63
|
+
* read-merge-write in application code can. When both values are jsonb
|
|
64
|
+
* objects they are merged shallowly and `precedence` decides which side
|
|
65
|
+
* wins a key present in both; otherwise the winning side is kept whole.
|
|
66
|
+
*
|
|
67
|
+
* The 1 MiB limit applies to what gets stored, inside the same statement:
|
|
68
|
+
* to the inserted value and to the merged one. When either is over it,
|
|
69
|
+
* nothing is written and MetaValueTooLargeError is thrown.
|
|
70
|
+
*/
|
|
71
|
+
private static upsertMergedMeta;
|
|
72
|
+
/**
|
|
73
|
+
* Sets a meta value merged into the stored one: between two jsonb objects the
|
|
74
|
+
* incoming keys win and the other stored keys are kept, so a request that
|
|
75
|
+
* only carries `theme` leaves `sidebarCollapsed` in place. A non-object value
|
|
76
|
+
* on either side replaces the stored value, as in setEntityMeta.
|
|
77
|
+
*/
|
|
78
|
+
static mergeEntityMeta(entityType: EntityType, entityId: string, metaKey: string, metaValue: unknown, userId: string, options?: Partial<CreateMetaPayload>): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Fills in default values without overwriting stored ones: between two jsonb
|
|
81
|
+
* objects the stored keys win and only the missing keys are added, and a
|
|
82
|
+
* stored non-object value is kept as it is. Defaults picked from a read that
|
|
83
|
+
* is already stale therefore can't undo a value saved after that read.
|
|
84
|
+
*/
|
|
85
|
+
static mergeEntityMetaDefaults(entityType: EntityType, entityId: string, metaKey: string, metaValue: unknown, userId: string, options?: Partial<CreateMetaPayload>): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Writes each group of a nested meta payload (`{ uiPreferences: {...}, ... }`)
|
|
88
|
+
* with mergeEntityMeta, or with mergeEntityMetaDefaults when `defaults` is
|
|
89
|
+
* set. Entries whose value is not an object are skipped.
|
|
90
|
+
*/
|
|
91
|
+
static mergeEntityMetaGroups(entityType: EntityType, entityId: string, groups: Record<string, unknown>, userId: string, { defaults }?: {
|
|
92
|
+
defaults?: boolean;
|
|
93
|
+
}): Promise<void>;
|
|
34
94
|
/**
|
|
35
95
|
* Establecer múltiples meta datos en batch (optimizado con transacciones)
|
|
36
96
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/meta.service.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"meta.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/meta.service.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAEV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,0FAA0F;AAC1F,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,SAAmC;CAIvD;AAED,qBAAa,WAAW;IACtB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAQ9B;;OAEG;WACU,cAAc,CACzB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,OAAe,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAwBnC;;OAEG;WACU,kBAAkB,CAC7B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,OAAe,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAuCnD;;OAEG;WACU,sBAAsB,CACjC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,M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AAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC;CAWnB"}
|
|
@@ -2,6 +2,13 @@ import { queryWithRLS, mutateWithRLS } from "../db.js";
|
|
|
2
2
|
import {
|
|
3
3
|
getEntityMetaConfig
|
|
4
4
|
} from "../../types/meta.types.js";
|
|
5
|
+
const MAX_META_VALUE_BYTES = 1048576;
|
|
6
|
+
class MetaValueTooLargeError extends Error {
|
|
7
|
+
constructor(message = "Meta value too large (max 1MB)") {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "MetaValueTooLargeError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
5
12
|
class MetaService {
|
|
6
13
|
/**
|
|
7
14
|
* Obtener configuración de entidad
|
|
@@ -128,13 +135,11 @@ class MetaService {
|
|
|
128
135
|
return ((_a = result[0]) == null ? void 0 : _a.metaValue) || null;
|
|
129
136
|
}
|
|
130
137
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* This follows the CRM theme pattern where metadata access is controlled through the parent entity.
|
|
138
|
+
* Validations that were previously in the stored procedure, shared by every
|
|
139
|
+
* method that writes a meta value. Returns the JSON string for the `::jsonb`
|
|
140
|
+
* cast so callers don't serialize `metaValue` twice.
|
|
135
141
|
*/
|
|
136
|
-
static
|
|
137
|
-
const config = this.getEntityConfig(entityType);
|
|
142
|
+
static validateMetaWrite(config, metaKey, metaValue) {
|
|
138
143
|
if (!config.metaTableName.endsWith("_metas")) {
|
|
139
144
|
throw new Error(`Invalid meta table name: ${config.metaTableName}`);
|
|
140
145
|
}
|
|
@@ -145,13 +150,46 @@ class MetaService {
|
|
|
145
150
|
throw new Error("Meta key too long (max 100 characters)");
|
|
146
151
|
}
|
|
147
152
|
const jsonString = JSON.stringify(metaValue);
|
|
148
|
-
if (new TextEncoder().encode(jsonString).length >
|
|
149
|
-
throw new
|
|
153
|
+
if (new TextEncoder().encode(jsonString).length > MAX_META_VALUE_BYTES) {
|
|
154
|
+
throw new MetaValueTooLargeError();
|
|
150
155
|
}
|
|
151
|
-
|
|
156
|
+
return jsonString;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* SQL condition: a jsonb value is within the limit as Postgres stores it.
|
|
160
|
+
* jsonb is normalized when stored, and its text form puts a space after
|
|
161
|
+
* every `:` and `,`, so a value within the limit as compact JSON can exceed
|
|
162
|
+
* it once stored. The limit is measured on that text form.
|
|
163
|
+
*/
|
|
164
|
+
static fitsMetaLimit(jsonbExpression) {
|
|
165
|
+
return `octet_length((${jsonbExpression})::text) <= ${MAX_META_VALUE_BYTES}`;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The INSERT of one meta row, $1-$6 being id, key, value, data type, public
|
|
169
|
+
* and searchable. It inserts nothing when the value is over the limit as
|
|
170
|
+
* stored; the caller appends its ON CONFLICT clause and checks rowCount.
|
|
171
|
+
*/
|
|
172
|
+
static insertMetaRowSql(config) {
|
|
173
|
+
return `
|
|
152
174
|
INSERT INTO "${config.metaTableName}"
|
|
153
175
|
("${config.idColumn}", "metaKey", "metaValue", "dataType", "isPublic", "isSearchable")
|
|
154
|
-
|
|
176
|
+
SELECT $1, $2, incoming.value, $4, $5, $6
|
|
177
|
+
FROM (SELECT $3::jsonb AS value) incoming
|
|
178
|
+
WHERE ${this.fitsMetaLimit("incoming.value")}`;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Establecer un meta dato
|
|
182
|
+
*
|
|
183
|
+
* NOTE: Metas tables do NOT have teamId column - security is inherited from parent entity via RLS.
|
|
184
|
+
* This follows the CRM theme pattern where metadata access is controlled through the parent entity.
|
|
185
|
+
*
|
|
186
|
+
* Throws MetaValueTooLargeError, writing nothing, when the value is over
|
|
187
|
+
* 1 MiB as Postgres stores it.
|
|
188
|
+
*/
|
|
189
|
+
static async setEntityMeta(entityType, entityId, metaKey, metaValue, userId, options = {}) {
|
|
190
|
+
const config = this.getEntityConfig(entityType);
|
|
191
|
+
const jsonString = this.validateMetaWrite(config, metaKey, metaValue);
|
|
192
|
+
const query = `${this.insertMetaRowSql(config)}
|
|
155
193
|
ON CONFLICT ("${config.idColumn}", "metaKey")
|
|
156
194
|
DO UPDATE SET
|
|
157
195
|
"metaValue" = EXCLUDED."metaValue",
|
|
@@ -168,7 +206,88 @@ class MetaService {
|
|
|
168
206
|
options.isPublic || false,
|
|
169
207
|
options.isSearchable || false
|
|
170
208
|
];
|
|
171
|
-
await mutateWithRLS(query, params, userId);
|
|
209
|
+
const result = await mutateWithRLS(query, params, userId);
|
|
210
|
+
if (result.rowCount === 0) {
|
|
211
|
+
throw new MetaValueTooLargeError();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Upserts a meta value merged with the stored one in a single statement, so
|
|
216
|
+
* concurrent writes to the same key can't drop each other's keys the way a
|
|
217
|
+
* read-merge-write in application code can. When both values are jsonb
|
|
218
|
+
* objects they are merged shallowly and `precedence` decides which side
|
|
219
|
+
* wins a key present in both; otherwise the winning side is kept whole.
|
|
220
|
+
*
|
|
221
|
+
* The 1 MiB limit applies to what gets stored, inside the same statement:
|
|
222
|
+
* to the inserted value and to the merged one. When either is over it,
|
|
223
|
+
* nothing is written and MetaValueTooLargeError is thrown.
|
|
224
|
+
*/
|
|
225
|
+
static async upsertMergedMeta(entityType, entityId, metaKey, metaValue, userId, options, precedence) {
|
|
226
|
+
const config = this.getEntityConfig(entityType);
|
|
227
|
+
const jsonString = this.validateMetaWrite(config, metaKey, metaValue);
|
|
228
|
+
const stored = `"${config.metaTableName}"."metaValue"`;
|
|
229
|
+
const incoming = 'EXCLUDED."metaValue"';
|
|
230
|
+
const [loser, winner] = precedence === "incoming" ? [stored, incoming] : [incoming, stored];
|
|
231
|
+
const merged = `CASE
|
|
232
|
+
WHEN jsonb_typeof(${stored}) = 'object' AND jsonb_typeof(${incoming}) = 'object'
|
|
233
|
+
THEN ${loser} || ${winner}
|
|
234
|
+
ELSE ${winner}
|
|
235
|
+
END`;
|
|
236
|
+
const query = `${this.insertMetaRowSql(config)}
|
|
237
|
+
ON CONFLICT ("${config.idColumn}", "metaKey")
|
|
238
|
+
DO UPDATE SET
|
|
239
|
+
"metaValue" = ${merged},
|
|
240
|
+
"dataType" = EXCLUDED."dataType",
|
|
241
|
+
"isPublic" = EXCLUDED."isPublic",
|
|
242
|
+
"isSearchable" = EXCLUDED."isSearchable",
|
|
243
|
+
"updatedAt" = CURRENT_TIMESTAMP
|
|
244
|
+
WHERE ${this.fitsMetaLimit(merged)}
|
|
245
|
+
`;
|
|
246
|
+
const params = [
|
|
247
|
+
entityId,
|
|
248
|
+
metaKey,
|
|
249
|
+
jsonString,
|
|
250
|
+
options.dataType || "json",
|
|
251
|
+
options.isPublic || false,
|
|
252
|
+
options.isSearchable || false
|
|
253
|
+
];
|
|
254
|
+
const result = await mutateWithRLS(query, params, userId);
|
|
255
|
+
if (result.rowCount === 0) {
|
|
256
|
+
throw new MetaValueTooLargeError();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Sets a meta value merged into the stored one: between two jsonb objects the
|
|
261
|
+
* incoming keys win and the other stored keys are kept, so a request that
|
|
262
|
+
* only carries `theme` leaves `sidebarCollapsed` in place. A non-object value
|
|
263
|
+
* on either side replaces the stored value, as in setEntityMeta.
|
|
264
|
+
*/
|
|
265
|
+
static async mergeEntityMeta(entityType, entityId, metaKey, metaValue, userId, options = {}) {
|
|
266
|
+
await this.upsertMergedMeta(entityType, entityId, metaKey, metaValue, userId, options, "incoming");
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Fills in default values without overwriting stored ones: between two jsonb
|
|
270
|
+
* objects the stored keys win and only the missing keys are added, and a
|
|
271
|
+
* stored non-object value is kept as it is. Defaults picked from a read that
|
|
272
|
+
* is already stale therefore can't undo a value saved after that read.
|
|
273
|
+
*/
|
|
274
|
+
static async mergeEntityMetaDefaults(entityType, entityId, metaKey, metaValue, userId, options = {}) {
|
|
275
|
+
await this.upsertMergedMeta(entityType, entityId, metaKey, metaValue, userId, options, "stored");
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Writes each group of a nested meta payload (`{ uiPreferences: {...}, ... }`)
|
|
279
|
+
* with mergeEntityMeta, or with mergeEntityMetaDefaults when `defaults` is
|
|
280
|
+
* set. Entries whose value is not an object are skipped.
|
|
281
|
+
*/
|
|
282
|
+
static async mergeEntityMetaGroups(entityType, entityId, groups, userId, { defaults = false } = {}) {
|
|
283
|
+
for (const [metaKey, metaValue] of Object.entries(groups)) {
|
|
284
|
+
if (!metaValue || typeof metaValue !== "object") continue;
|
|
285
|
+
if (defaults) {
|
|
286
|
+
await this.mergeEntityMetaDefaults(entityType, entityId, metaKey, metaValue, userId);
|
|
287
|
+
} else {
|
|
288
|
+
await this.mergeEntityMeta(entityType, entityId, metaKey, metaValue, userId);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
172
291
|
}
|
|
173
292
|
/**
|
|
174
293
|
* Establecer múltiples meta datos en batch (optimizado con transacciones)
|
|
@@ -258,5 +377,6 @@ class MetaService {
|
|
|
258
377
|
}
|
|
259
378
|
}
|
|
260
379
|
export {
|
|
261
|
-
MetaService
|
|
380
|
+
MetaService,
|
|
381
|
+
MetaValueTooLargeError
|
|
262
382
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/middleware.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"middleware.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/middleware.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,E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ACxF,eAAO,MAAM,6BAA6B,8CAAwC,CAAA;AAClF,eAAO,MAAM,wBAAwB,yCAAmC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
|
+
import { withBasePath } from "../base-path.js";
|
|
2
3
|
import {
|
|
3
4
|
MIDDLEWARE_REGISTRY,
|
|
4
5
|
MIDDLEWARE_METADATA
|
|
@@ -58,7 +59,7 @@ class MiddlewareService {
|
|
|
58
59
|
*/
|
|
59
60
|
static redirectWithoutSession(request, targetPath = "/login") {
|
|
60
61
|
const { pathname } = request.nextUrl;
|
|
61
|
-
const loginUrl = new URL(targetPath, request.url);
|
|
62
|
+
const loginUrl = new URL(withBasePath(targetPath), request.url);
|
|
62
63
|
loginUrl.searchParams.set("callbackUrl", pathname);
|
|
63
64
|
return NextResponse.redirect(loginUrl);
|
|
64
65
|
}
|
|
@@ -68,7 +69,7 @@ class MiddlewareService {
|
|
|
68
69
|
* @complexity O(1)
|
|
69
70
|
*/
|
|
70
71
|
static redirectWithSession(request, targetPath = "/dashboard") {
|
|
71
|
-
return NextResponse.redirect(new URL(targetPath, request.url));
|
|
72
|
+
return NextResponse.redirect(new URL(withBasePath(targetPath), request.url));
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
74
75
|
* Add user headers to request for downstream processing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/teams/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/teams/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,cAAc,aAI1B,CAAA;AACD,eAAO,MAAM,sBAAsB;;;;;EAAyD,CAAA;AAG5F,eAAO,MAAM,UAAU;;;;;;;;;;iBAerB,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AM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AACnE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACzE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
|
package/dist/lib/teams/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams.api.d.ts","sourceRoot":"","sources":["../../../src/lib/teams/teams.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,IAAI,EACJ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"teams.api.d.ts","sourceRoot":"","sources":["../../../src/lib/teams/teams.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,IAAI,EACJ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAahB;;;;;GAKG;AACH,qBAAa,QAAQ;IAKnB;;;;;;;;OAQG;WACU,YAAY,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAa5C;;;;;;OAMG;WACU,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB/D;;;;;;;;;;;;;;;;;;;OAmBG;WACU,aAAa,CACxB,MAAM,GAAE,gBAAqB,GAC5B,OAAO,CAAC,kBAAkB,CAAC;CAiC/B"}
|