@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/api/entities.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { clientMetaSystemAdapter } from "@nextsparkjs/registries/entity-registry.client";
|
|
2
|
+
import { withBasePath, withBasePathIfInApp } from "../base-path.js";
|
|
2
3
|
function getApiBaseUrl() {
|
|
3
4
|
if (typeof window !== "undefined") {
|
|
4
5
|
return window.location.origin;
|
|
@@ -26,7 +27,7 @@ function buildHeaders(additionalHeaders = {}) {
|
|
|
26
27
|
class EntityApiClient {
|
|
27
28
|
baseUrl;
|
|
28
29
|
constructor(baseUrl = "/api/v1") {
|
|
29
|
-
this.baseUrl = baseUrl;
|
|
30
|
+
this.baseUrl = withBasePathIfInApp(baseUrl);
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* Get endpoint path from entity configuration using slug
|
|
@@ -449,7 +450,7 @@ const duplicateEntityData = async (entityType, id) => {
|
|
|
449
450
|
const getEntityChildren = async (parentEntityType, parentId, childEntityName, params = {}) => {
|
|
450
451
|
const apiPath = clientMetaSystemAdapter.getApiPath(parentEntityType);
|
|
451
452
|
const endpointPath = apiPath || (parentEntityType.endsWith("s") ? parentEntityType : `${parentEntityType}s`);
|
|
452
|
-
const baseUrl = "/api/v1";
|
|
453
|
+
const baseUrl = withBasePath("/api/v1");
|
|
453
454
|
const url = new URL(`${baseUrl}/${endpointPath}/${parentId}/child/${childEntityName}`, getApiBaseUrl());
|
|
454
455
|
if (params.page) url.searchParams.set("page", params.page.toString());
|
|
455
456
|
if (params.limit) url.searchParams.set("limit", params.limit.toString());
|
|
@@ -475,7 +476,7 @@ async function fetchWithTeam(url, options = {}) {
|
|
|
475
476
|
if (activeTeamId) {
|
|
476
477
|
headers.set("x-team-id", activeTeamId);
|
|
477
478
|
}
|
|
478
|
-
return fetch(url, {
|
|
479
|
+
return fetch(withBasePathIfInApp(url), {
|
|
479
480
|
...options,
|
|
480
481
|
headers,
|
|
481
482
|
credentials: "include"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify email link
|
|
3
|
+
*
|
|
4
|
+
* A verification email links to Better Auth's own `/api/auth/verify-email`.
|
|
5
|
+
* The auth route handler sends that click on to the app's verify-email page,
|
|
6
|
+
* which verifies the token and shows the result.
|
|
7
|
+
*/
|
|
8
|
+
/** The verify-email page for the URL of a clicked email link, or null when it carries no token. */
|
|
9
|
+
export declare function verifyEmailPageUrl(linkUrl: string): URL | null;
|
|
10
|
+
//# sourceMappingURL=verify-email-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-email-link.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/verify-email-link.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAU9D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { withBasePath } from "../base-path.js";
|
|
2
|
+
function verifyEmailPageUrl(linkUrl) {
|
|
3
|
+
const link = new URL(linkUrl);
|
|
4
|
+
const token = link.searchParams.get("token");
|
|
5
|
+
if (!token) return null;
|
|
6
|
+
const page = new URL(withBasePath("/verify-email"), link);
|
|
7
|
+
page.searchParams.set("token", token);
|
|
8
|
+
const callbackURL = link.searchParams.get("callbackURL");
|
|
9
|
+
if (callbackURL) page.searchParams.set("callbackURL", callbackURL);
|
|
10
|
+
return page;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
verifyEmailPageUrl
|
|
14
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const authClient: import("better-auth/react").ReactAuthClient<{
|
|
2
2
|
baseURL: string;
|
|
3
|
+
basePath: string;
|
|
3
4
|
plugins: ({
|
|
4
5
|
id: "additional-fields-client";
|
|
5
6
|
version: string;
|
|
@@ -731,6 +732,7 @@ export declare const signIn: {
|
|
|
731
732
|
rememberMe?: boolean | undefined;
|
|
732
733
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string>>>(data_0: import("better-auth").Prettify<import("node_modules/better-auth/dist/client/path-to-object.mjs").InferSignUpEmailCtx<{
|
|
733
734
|
baseURL: string;
|
|
735
|
+
basePath: string;
|
|
734
736
|
plugins: ({
|
|
735
737
|
id: "additional-fields-client";
|
|
736
738
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/lib/auth-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/lib/auth-client.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAmDimI,CAAC;;;;;;;;;;;;6BAA8R,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA03C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAAgwG,CAAC;yCAAkD,CAAC;;;;;;;;;qCAA8Q,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAA2yC,CAAC;yCAAkD,CAAC;;;;;;;;;qCAA8Q,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhCl8V,CAAC;AAEH,eAAO,MACL,MAAM;;;;;;;;;;;;;;;;;;;;;;iBA6B0wL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AqB8mI,CAAC;;;;;;;;;;;;;;;;;;;;;;iBAA8R,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CApB14I,CAAC;AAEf;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEzC"}
|
package/dist/lib/auth-client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createAuthClient } from "better-auth/react";
|
|
2
2
|
import { inferAdditionalFields } from "better-auth/client/plugins";
|
|
3
3
|
import { emailOTPClient } from "better-auth/client/plugins";
|
|
4
|
+
import { withBasePath } from "./base-path.js";
|
|
4
5
|
const authClient = createAuthClient({
|
|
5
6
|
// In the browser, always talk to the origin the page was actually served
|
|
6
7
|
// from — better-auth falls back to `window.location.origin` when baseURL
|
|
@@ -11,6 +12,9 @@ const authClient = createAuthClient({
|
|
|
11
12
|
// window), keep the env var since there's no request origin to infer from
|
|
12
13
|
// on the very first render before hydration.
|
|
13
14
|
baseURL: typeof window === "undefined" ? process.env.NEXT_PUBLIC_APP_URL || "http://localhost:5173" : void 0,
|
|
15
|
+
// Appended to that origin. Under a Next.js basePath the auth routes are only
|
|
16
|
+
// served at `/base/api/auth`.
|
|
17
|
+
basePath: withBasePath("/api/auth"),
|
|
14
18
|
plugins: [
|
|
15
19
|
inferAdditionalFields(),
|
|
16
20
|
emailOTPClient()
|
package/dist/lib/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":"AAUA,OAAO,EAAgF,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":"AAUA,OAAO,EAAgF,KAAK,QAAQ,EAAE,MAA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{ resolveOtpConfig } from "./auth/otp-config.js";
|
|
20
20
|
import { isPasswordLoginEnabled } from "./auth/auth-methods.js";
|
|
21
21
|
import { getCorsOrigins, isPrivateLanOrigin, normalizeCorsEnvironment } from "./utils/cors.js";
|
|
22
|
+
import { withBasePath } from "./base-path.js";
|
|
22
23
|
async function hasPendingInvitationForEmail(email) {
|
|
23
24
|
const row = await queryOne(
|
|
24
25
|
`SELECT id FROM "team_invitations"
|
|
@@ -182,6 +183,12 @@ const auth = betterAuth({
|
|
|
182
183
|
}
|
|
183
184
|
},
|
|
184
185
|
baseURL: baseUrl,
|
|
186
|
+
// Better Auth serves its routes, and builds its OAuth redirect_uri and email
|
|
187
|
+
// links, under baseURL + basePath. Under a Next.js basePath that is
|
|
188
|
+
// `/base/api/auth`, so the auth route handler passes requests on with the
|
|
189
|
+
// base path in their URL (withBasePathRequest). A BETTER_AUTH_URL that
|
|
190
|
+
// already has a path is used as-is and this option is ignored.
|
|
191
|
+
basePath: withBasePath("/api/auth"),
|
|
185
192
|
// Use unified CORS configuration from app.config.ts + theme extensions + env vars.
|
|
186
193
|
// A function (rather than a static array) so dev-like environments can also
|
|
187
194
|
// trust the request's OWN origin when it's a private LAN address — #163's
|
|
@@ -205,9 +212,10 @@ const auth = betterAuth({
|
|
|
205
212
|
}
|
|
206
213
|
return origins;
|
|
207
214
|
},
|
|
208
|
-
// Redirect auth errors to our custom error page instead of Better Auth's default
|
|
215
|
+
// Redirect auth errors to our custom error page instead of Better Auth's default.
|
|
216
|
+
// Better Auth redirects to this path as-is, outside the Next.js router.
|
|
209
217
|
onAPIError: {
|
|
210
|
-
errorURL: "/auth-error"
|
|
218
|
+
errorURL: withBasePath("/auth-error")
|
|
211
219
|
},
|
|
212
220
|
plugins: [
|
|
213
221
|
registrationGuardPlugin(),
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base path
|
|
3
|
+
*
|
|
4
|
+
* The app's Next.js `basePath`. Next.js adds it by itself to `<Link>`,
|
|
5
|
+
* `router.push` and `redirect()`, and to nothing else: fetch calls, raw
|
|
6
|
+
* anchors, an `<img src>` or any other asset attribute, the URLs inside markup
|
|
7
|
+
* a page renders as data, URLs a route handler builds from `req.url`, email
|
|
8
|
+
* links, and every URL Better Auth serves or builds (its API routes, the OAuth
|
|
9
|
+
* redirect_uri, its error redirects) need it added here.
|
|
10
|
+
*
|
|
11
|
+
* It reaches the headers a Next.js config writes no more than the rest: the CSP
|
|
12
|
+
* report endpoints are built from the config's own `basePath` constant.
|
|
13
|
+
*
|
|
14
|
+
* Next.js inlines `process.env.__NEXT_ROUTER_BASEPATH` at build time in the
|
|
15
|
+
* client, Node.js and edge bundles (`next/dist/build/define-env.js`), so the
|
|
16
|
+
* expression has to stay written exactly like that.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Prefixes the base path onto an in-app path written without it
|
|
20
|
+
* (`/dashboard`, never `/base/dashboard`). The path is always prefixed, even
|
|
21
|
+
* when it starts with the same segment as the base path: under
|
|
22
|
+
* `basePath: '/dashboard'`, `/dashboard` is the app's dashboard page and
|
|
23
|
+
* becomes `/dashboard/dashboard`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function withBasePath(path: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* The same URL with the base path added, when it is one this app serves and
|
|
28
|
+
* does not already carry it. A URL with a scheme or a protocol-relative one
|
|
29
|
+
* belongs to another origin and is left alone, which is what a link or a
|
|
30
|
+
* request whose target is data — a CTA's link, an uploaded file's URL, an
|
|
31
|
+
* endpoint an explorer was pointed at — needs.
|
|
32
|
+
*
|
|
33
|
+
* Unlike withBasePath(), this takes URLs that are data rather than paths
|
|
34
|
+
* written in the code, and data arrives both ways: an author fills a CTA in
|
|
35
|
+
* by copying what the browser shows, which already has the base path on it.
|
|
36
|
+
* Adding it again would send `/base/contact` to `/base/base/contact`.
|
|
37
|
+
*
|
|
38
|
+
* The base path counts as present only as a whole segment: under `/base`,
|
|
39
|
+
* `/baseline` is a different page and is prefixed like any other.
|
|
40
|
+
*/
|
|
41
|
+
export declare function withBasePathIfInApp(url: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* The same URL without the base path, when it is one this app serves and
|
|
44
|
+
* carries it; any other URL comes back as it went in. For what Next.js puts the
|
|
45
|
+
* base path on by itself, such as a `<Link>`'s href, which given a URL that
|
|
46
|
+
* already carries it would carry it twice.
|
|
47
|
+
*
|
|
48
|
+
* As in withBasePathIfInApp(), the base path counts only as a whole segment:
|
|
49
|
+
* under `/base`, `/base/contact` becomes `/contact`, `/base` and `/base?x=1`
|
|
50
|
+
* become `/` and `/?x=1`, and `/baseline` stays.
|
|
51
|
+
*/
|
|
52
|
+
export declare function withoutBasePath(url: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Sanitised HTML with the base path on the in-app URLs inside it.
|
|
55
|
+
*
|
|
56
|
+
* Markup that reaches a page as data — a post body, a rich-text field — carries
|
|
57
|
+
* its own links and images, and nothing in Next.js prefixes those. The markup
|
|
58
|
+
* is parsed rather than pattern-matched, so a URL written inside a code sample
|
|
59
|
+
* is left as the text it is.
|
|
60
|
+
*
|
|
61
|
+
* Parsing needs a DOM, so this runs in the browser; a server render pass gets
|
|
62
|
+
* the markup back unchanged. `<template>` content is inert, so nothing here
|
|
63
|
+
* loads while the URLs are rewritten.
|
|
64
|
+
*
|
|
65
|
+
* Sanitise first: this trusts the markup it is given and only rewrites URLs.
|
|
66
|
+
*/
|
|
67
|
+
export declare function withBasePathInHtml(html: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* A srcset with the base path on each of its URLs, and every other character
|
|
70
|
+
* as it was.
|
|
71
|
+
*
|
|
72
|
+
* Candidates are read the way the HTML standard parses a srcset, not split on
|
|
73
|
+
* commas: a URL runs to the next whitespace, so a `data:` URL keeps the commas
|
|
74
|
+
* inside it (`data:image/svg+xml,%3Csvg…`); commas that end that run separate
|
|
75
|
+
* it from the next candidate; and the descriptors after the URL run to the next
|
|
76
|
+
* comma that is not inside parentheses.
|
|
77
|
+
*/
|
|
78
|
+
export declare function withBasePathInSrcset(srcset: string): string;
|
|
79
|
+
/**
|
|
80
|
+
* The request with the base path in its URL. Next.js hands a route handler
|
|
81
|
+
* the URL without it, while Better Auth matches requests against its own
|
|
82
|
+
* `basePath`, which includes it.
|
|
83
|
+
*/
|
|
84
|
+
export declare function withBasePathRequest(request: Request): Request;
|
|
85
|
+
//# sourceMappingURL=base-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-path.d.ts","sourceRoot":"","sources":["../../src/lib/base-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMnD;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAavD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA8B3D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAK7D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function basePath() {
|
|
2
|
+
return (process.env.__NEXT_ROUTER_BASEPATH || "").replace(/\/+$/, "");
|
|
3
|
+
}
|
|
4
|
+
function withBasePath(path) {
|
|
5
|
+
const base = basePath();
|
|
6
|
+
if (!base) return path;
|
|
7
|
+
return path === "/" ? base : `${base}${path}`;
|
|
8
|
+
}
|
|
9
|
+
function withBasePathIfInApp(url) {
|
|
10
|
+
if (!url.startsWith("/") || url.startsWith("//")) return url;
|
|
11
|
+
const base = basePath();
|
|
12
|
+
if (base && carriesBasePath(url, base)) return url;
|
|
13
|
+
return withBasePath(url);
|
|
14
|
+
}
|
|
15
|
+
function withoutBasePath(url) {
|
|
16
|
+
if (!url.startsWith("/") || url.startsWith("//")) return url;
|
|
17
|
+
const base = basePath();
|
|
18
|
+
if (!base || !carriesBasePath(url, base)) return url;
|
|
19
|
+
const rest = url.slice(base.length);
|
|
20
|
+
return rest.startsWith("/") ? rest : `/${rest}`;
|
|
21
|
+
}
|
|
22
|
+
function carriesBasePath(url, base) {
|
|
23
|
+
return url.startsWith(base) && ["", "/", "?", "#"].includes(url.charAt(base.length));
|
|
24
|
+
}
|
|
25
|
+
function withBasePathInHtml(html) {
|
|
26
|
+
if (!html || !basePath() || typeof document === "undefined") return html;
|
|
27
|
+
const template = document.createElement("template");
|
|
28
|
+
template.innerHTML = html;
|
|
29
|
+
for (const element of template.content.querySelectorAll("[href], [src], [poster], [srcset]")) {
|
|
30
|
+
for (const name of ["href", "src", "poster"]) {
|
|
31
|
+
const value = element.getAttribute(name);
|
|
32
|
+
if (value) element.setAttribute(name, withBasePathIfInApp(value));
|
|
33
|
+
}
|
|
34
|
+
const srcset = element.getAttribute("srcset");
|
|
35
|
+
if (srcset) element.setAttribute("srcset", withBasePathInSrcset(srcset));
|
|
36
|
+
}
|
|
37
|
+
return template.innerHTML;
|
|
38
|
+
}
|
|
39
|
+
function withBasePathInSrcset(srcset) {
|
|
40
|
+
if (!basePath()) return srcset;
|
|
41
|
+
const isSpace = (character) => /[\t\n\f\r ]/.test(character);
|
|
42
|
+
let rewritten = "";
|
|
43
|
+
let position = 0;
|
|
44
|
+
while (position < srcset.length) {
|
|
45
|
+
const separatorsStart = position;
|
|
46
|
+
while (position < srcset.length && (isSpace(srcset[position]) || srcset[position] === ",")) position++;
|
|
47
|
+
rewritten += srcset.slice(separatorsStart, position);
|
|
48
|
+
if (position >= srcset.length) break;
|
|
49
|
+
const urlStart = position;
|
|
50
|
+
while (position < srcset.length && !isSpace(srcset[position])) position++;
|
|
51
|
+
const run = srcset.slice(urlStart, position);
|
|
52
|
+
const url = run.replace(/,+$/, "");
|
|
53
|
+
rewritten += withBasePathIfInApp(url) + run.slice(url.length);
|
|
54
|
+
if (url.length < run.length) continue;
|
|
55
|
+
const descriptorsStart = position;
|
|
56
|
+
let inParentheses = false;
|
|
57
|
+
while (position < srcset.length && (inParentheses || srcset[position] !== ",")) {
|
|
58
|
+
if (srcset[position] === "(") inParentheses = true;
|
|
59
|
+
else if (srcset[position] === ")") inParentheses = false;
|
|
60
|
+
position++;
|
|
61
|
+
}
|
|
62
|
+
rewritten += srcset.slice(descriptorsStart, position);
|
|
63
|
+
}
|
|
64
|
+
return rewritten;
|
|
65
|
+
}
|
|
66
|
+
function withBasePathRequest(request) {
|
|
67
|
+
if (!basePath()) return request;
|
|
68
|
+
const url = new URL(request.url);
|
|
69
|
+
url.pathname = withBasePath(url.pathname);
|
|
70
|
+
return new Request(url, request);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
withBasePath,
|
|
74
|
+
withBasePathIfInApp,
|
|
75
|
+
withBasePathInHtml,
|
|
76
|
+
withBasePathInSrcset,
|
|
77
|
+
withBasePathRequest,
|
|
78
|
+
withoutBasePath
|
|
79
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/billing/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/billing/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAMxB,eAAO,MAAM,cAAc;;;;EAAyC,CAAA;AAEpE,eAAO,MAAM,oBAAoB;;;;EAA8C,CAAA;AAE/E,eAAO,MAAM,wBAAwB;;;;;;;EAOnC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;EAA8B,CAAA;AAEhE,eAAO,MAAM,sBAAsB;;;;;EAAqD,CAAA;AAExF,eAAO,MAAM,wBAAwB;;;;EAA6C,CAAA;AAMlF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;iBAc3B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;iBAA6B,CAAA;AAM1D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;iBAQnC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAInC,CAAA;AAMF,eAAO,MAAM,gBAAgB;;;;;;;iBAO3B,CAAA;AAMF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAUnC,CAAA;AAMF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC9E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-html.d.ts","sourceRoot":"","sources":["../../../src/lib/blocks/sanitize-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"sanitize-html.d.ts","sourceRoot":"","sources":["../../../src/lib/blocks/sanitize-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAkFH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGzE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import sanitizeHtmlLib from "sanitize-html";
|
|
2
|
+
import { withBasePathIfInApp, withBasePathInSrcset } from "../base-path.js";
|
|
2
3
|
const OPTIONS = {
|
|
3
4
|
allowedTags: [
|
|
4
5
|
...sanitizeHtmlLib.defaults.allowedTags,
|
|
@@ -46,11 +47,26 @@ const OPTIONS = {
|
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
// A link that opens a new tab hands the opener to the destination without
|
|
49
|
-
// this; the editor has no way to set it, so it is added here.
|
|
50
|
+
// this; the editor has no way to set it, so it is added here. The base path
|
|
51
|
+
// is added in the same pass: this markup is data, so nothing in Next.js
|
|
52
|
+
// prefixes the links and images inside it.
|
|
50
53
|
transformTags: {
|
|
51
|
-
a: (tagName, attribs) =>
|
|
54
|
+
a: (tagName, attribs) => {
|
|
55
|
+
const rel = attribs.target === "_blank" ? "noopener noreferrer" : attribs.rel;
|
|
56
|
+
return { tagName, attribs: { ...attribs, ...rel ? { rel } : {}, ...inApp(attribs, ["href"]) } };
|
|
57
|
+
},
|
|
58
|
+
img: (tagName, attribs) => ({ tagName, attribs: { ...attribs, ...inApp(attribs, ["src", "srcset"]) } }),
|
|
59
|
+
source: (tagName, attribs) => ({ tagName, attribs: { ...attribs, ...inApp(attribs, ["src", "srcset"]) } })
|
|
52
60
|
}
|
|
53
61
|
};
|
|
62
|
+
function inApp(attribs, names) {
|
|
63
|
+
const rewritten = {};
|
|
64
|
+
for (const name of names) {
|
|
65
|
+
const value = attribs[name];
|
|
66
|
+
if (value) rewritten[name] = name === "srcset" ? withBasePathInSrcset(value) : withBasePathIfInApp(value);
|
|
67
|
+
}
|
|
68
|
+
return rewritten;
|
|
69
|
+
}
|
|
54
70
|
function sanitizeBlockHtml(html) {
|
|
55
71
|
if (!html) return "";
|
|
56
72
|
return sanitizeHtmlLib(html, OPTIONS);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expire everything cached under `tag`, immediately.
|
|
3
|
+
*
|
|
4
|
+
* The profile is `{ expire: 0 }` and not a named one such as `'max'` because
|
|
5
|
+
* Next 16 routes `expire === 0` through the same branch as a missing profile:
|
|
6
|
+
* the path counts as revalidated for static and dynamic data, which is the
|
|
7
|
+
* invalidation Next 15 performs with no profile at all. A named profile would
|
|
8
|
+
* turn every caller into stale-while-revalidate instead. `updateTag` expires
|
|
9
|
+
* immediately too, but it throws outside a Server Action, and this helper is
|
|
10
|
+
* also reachable from route handlers. On Next 15 the second argument reaches a
|
|
11
|
+
* function declared with one parameter and is ignored.
|
|
12
|
+
*/
|
|
13
|
+
export declare function revalidateTag(tag: string): void;
|
|
14
|
+
//# sourceMappingURL=revalidate-tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revalidate-tag.d.ts","sourceRoot":"","sources":["../../../src/lib/cache/revalidate-tag.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE/C"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Validates that theme-specific dashboard.config.ts files conform to the expected structure.
|
|
5
5
|
* This schema is used during build time and development to catch configuration errors early.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import * as z from 'zod';
|
|
8
8
|
/**
|
|
9
9
|
* Schema for theme-specific dashboard configuration
|
|
10
10
|
* All properties are optional since themes only need to override what they want to change
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/config/dashboard-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"dashboard-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/config/dashboard-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAyTxB;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAahC,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE1E;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1D"}
|
|
@@ -136,21 +136,32 @@ export interface SettingsConfig {
|
|
|
136
136
|
/**
|
|
137
137
|
* Documentation Category Configuration
|
|
138
138
|
*
|
|
139
|
-
*
|
|
139
|
+
* Settings for one documentation category.
|
|
140
|
+
*
|
|
141
|
+
* `DocsSidebar` reads `enabled` and `label` only when this object is
|
|
142
|
+
* `docs.public`. No component reads these settings when the object is
|
|
143
|
+
* `docs.superadmin`.
|
|
140
144
|
*/
|
|
141
145
|
export interface DocsCategoryConfig {
|
|
142
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* In `docs.public`, `false` prevents `DocsSidebar` from rendering. In
|
|
148
|
+
* `docs.superadmin`, this setting has no effect.
|
|
149
|
+
*/
|
|
143
150
|
enabled: boolean;
|
|
144
|
-
/**
|
|
151
|
+
/** No component currently reads this setting. */
|
|
145
152
|
open?: boolean;
|
|
146
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* In `docs.public`, `DocsSidebar` renders this as its heading. In
|
|
155
|
+
* `docs.superadmin`, this setting has no effect.
|
|
156
|
+
*/
|
|
147
157
|
label: string;
|
|
148
158
|
}
|
|
149
159
|
/**
|
|
150
160
|
* Documentation System Configuration
|
|
151
161
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
162
|
+
* `publicAccess` controls whether the proxy serves `/docs` without a session.
|
|
163
|
+
* `public.enabled` and `public.label` configure `DocsSidebar`. The remaining
|
|
164
|
+
* settings are retained for configuration compatibility but have no effect.
|
|
154
165
|
*
|
|
155
166
|
* Structure:
|
|
156
167
|
* - public: User-facing documentation at /docs
|
|
@@ -159,17 +170,26 @@ export interface DocsCategoryConfig {
|
|
|
159
170
|
* NOTE: Plugin docs are NOT in the registry - they are for developer reference only (IDE/LLM).
|
|
160
171
|
*/
|
|
161
172
|
export interface DocsConfig {
|
|
162
|
-
/**
|
|
163
|
-
enabled
|
|
164
|
-
/**
|
|
173
|
+
/** No component, route, or proxy currently reads this setting. */
|
|
174
|
+
enabled?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* The proxy serves `/docs` without a session unless this is `false`. A
|
|
177
|
+
* legacy boolean `public: false` also makes `/docs` require a session.
|
|
178
|
+
*/
|
|
165
179
|
publicAccess?: boolean;
|
|
166
|
-
/**
|
|
167
|
-
searchEnabled
|
|
168
|
-
/**
|
|
169
|
-
breadcrumbs
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
180
|
+
/** No component currently reads this setting. */
|
|
181
|
+
searchEnabled?: boolean;
|
|
182
|
+
/** No component currently reads this setting. */
|
|
183
|
+
breadcrumbs?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Sidebar settings for `/docs`.
|
|
186
|
+
*
|
|
187
|
+
* The boolean form is deprecated: it is the older way to say whether `/docs`
|
|
188
|
+
* needs a session. `public: false` still makes `/docs` require one; write
|
|
189
|
+
* `publicAccess` instead and keep `public` for the sidebar settings.
|
|
190
|
+
*/
|
|
191
|
+
public?: DocsCategoryConfig | boolean;
|
|
192
|
+
/** No component or route currently reads these `/superadmin/docs` settings. */
|
|
173
193
|
superadmin?: DocsCategoryConfig;
|
|
174
194
|
}
|
|
175
195
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/config/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,eAAe,GACf,cAAc,CAAA;AAElB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,+BAA+B;IAC/B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iBAAiB;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,yBAAyB;IACzB,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,eA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AA6C;IAC7C,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IAEzC,kCAAkC;IAClC,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB,oDAAoD;IACpD,IAAI,CAAC,EAAE,UAAU,CAAA;IAGjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,gBAAgB,CAAA;CAM9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who can read /docs, decided from the `docs` block of a theme's app.config.ts.
|
|
3
|
+
*
|
|
4
|
+
* `docs.publicAccess` is the setting: `false` asks for a session, anything
|
|
5
|
+
* else serves /docs to everyone. `docs.public` holds the sidebar settings of
|
|
6
|
+
* that category (`{ enabled, open, label }`), not access.
|
|
7
|
+
*
|
|
8
|
+
* App configs written before `publicAccess` existed said `public: false` for
|
|
9
|
+
* private docs. That boolean is still read as `publicAccess: false`, and
|
|
10
|
+
* either one set to `false` makes /docs private: this decides who can read
|
|
11
|
+
* the docs, so a leftover `public: false` next to `publicAccess: true` keeps
|
|
12
|
+
* asking for a session rather than opening them.
|
|
13
|
+
*/
|
|
14
|
+
import type { DocsCategoryConfig } from '../config/types';
|
|
15
|
+
type DocsConfigInput = {
|
|
16
|
+
publicAccess?: unknown;
|
|
17
|
+
public?: unknown;
|
|
18
|
+
} | null | undefined;
|
|
19
|
+
/** Whether /docs is served without a session. */
|
|
20
|
+
export declare function isDocsPublic(docs: DocsConfigInput): boolean;
|
|
21
|
+
/** The sidebar settings under `docs.public`, or undefined when there are
|
|
22
|
+
* none — including when `public` is the access boolean of the older shape. */
|
|
23
|
+
export declare function getPublicDocsCategory(docs: DocsConfigInput): DocsCategoryConfig | undefined;
|
|
24
|
+
/** What to change when `docs.public` is still the older access boolean, or
|
|
25
|
+
* null when the block already uses `publicAccess`. */
|
|
26
|
+
export declare function legacyDocsAccessMessage(docs: DocsConfigInput): string | null;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,KAAK,eAAe,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,CAAA;AAEtF,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAE3D;AAED;8EAC8E;AAC9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAG3F;AAED;sDACsD;AACtD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAO5E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function isDocsPublic(docs) {
|
|
2
|
+
return (docs == null ? void 0 : docs.publicAccess) !== false && (docs == null ? void 0 : docs.public) !== false;
|
|
3
|
+
}
|
|
4
|
+
function getPublicDocsCategory(docs) {
|
|
5
|
+
const category = docs == null ? void 0 : docs.public;
|
|
6
|
+
return category && typeof category === "object" ? category : void 0;
|
|
7
|
+
}
|
|
8
|
+
function legacyDocsAccessMessage(docs) {
|
|
9
|
+
if (typeof (docs == null ? void 0 : docs.public) !== "boolean") return null;
|
|
10
|
+
return `app.config.ts sets docs.public to ${docs.public}, the older way to say whether /docs needs a session. Write docs.publicAccess: ${docs.public} instead, and use docs.public for the sidebar settings ({ enabled, open, label }).`;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
getPublicDocsCategory,
|
|
14
|
+
isDocsPublic,
|
|
15
|
+
legacyDocsAccessMessage
|
|
16
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/lib/docs/parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,WAAW,EACZ,MAAM,SAAS,CAAA;AAEhB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,WAAW,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,GAAG,YAAY,CAAA;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACjE,QAAQ,EAAE,WAAW,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAkBD"}
|