@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/scripts/build/docs.mjs
DELETED
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Documentation Registry Builder
|
|
5
|
-
*
|
|
6
|
-
* Scans core/docs/, contents/themes/{THEME}/docs/, and plugin docs directories
|
|
7
|
-
* Generates static registry at .nextspark/registries/docs-registry.ts (npm) or core/lib/registries/docs-registry.ts (monorepo)
|
|
8
|
-
*
|
|
9
|
-
* ZERO RUNTIME I/O - Build-time only
|
|
10
|
-
* Part of the registry system (see .rules/dynamic-imports.md)
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import fs from 'fs'
|
|
14
|
-
import path from 'path'
|
|
15
|
-
import { fileURLToPath } from 'url'
|
|
16
|
-
import { existsSync, mkdirSync } from 'fs'
|
|
17
|
-
|
|
18
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
19
|
-
const __dirname = path.dirname(__filename)
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Detect project root by searching for nextspark.config.ts
|
|
23
|
-
*/
|
|
24
|
-
function detectProjectRoot() {
|
|
25
|
-
let dir = process.cwd()
|
|
26
|
-
const maxDepth = 10
|
|
27
|
-
let depth = 0
|
|
28
|
-
|
|
29
|
-
while (dir !== '/' && depth < maxDepth) {
|
|
30
|
-
if (existsSync(path.join(dir, 'nextspark.config.ts'))) {
|
|
31
|
-
return dir
|
|
32
|
-
}
|
|
33
|
-
dir = path.dirname(dir)
|
|
34
|
-
depth++
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return process.cwd()
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Check if NextSpark is installed as a package
|
|
42
|
-
*/
|
|
43
|
-
function isInstalledAsPackage(root) {
|
|
44
|
-
return existsSync(path.join(root, 'node_modules/@nextsparkjs/core'))
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Determine project root and mode
|
|
48
|
-
const PROJECT_ROOT = detectProjectRoot()
|
|
49
|
-
const IS_NPM_MODE = isInstalledAsPackage(PROJECT_ROOT)
|
|
50
|
-
|
|
51
|
-
// Paths based on mode
|
|
52
|
-
const CORE_DIR = IS_NPM_MODE
|
|
53
|
-
? path.join(PROJECT_ROOT, 'node_modules/@nextsparkjs/core')
|
|
54
|
-
: path.join(PROJECT_ROOT, 'packages/core')
|
|
55
|
-
|
|
56
|
-
const CONTENTS_DIR = path.join(PROJECT_ROOT, 'contents')
|
|
57
|
-
|
|
58
|
-
const OUTPUT_DIR = IS_NPM_MODE
|
|
59
|
-
? path.join(PROJECT_ROOT, '.nextspark/registries')
|
|
60
|
-
: path.join(PROJECT_ROOT, 'packages/core/src/lib/registries')
|
|
61
|
-
|
|
62
|
-
// For backward compatibility, ROOT_DIR is the project root
|
|
63
|
-
const ROOT_DIR = PROJECT_ROOT
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Scan a documentation directory and build registry metadata
|
|
67
|
-
*
|
|
68
|
-
* @param {string} docsPath - Absolute path to docs directory
|
|
69
|
-
* @param {'core' | 'theme'} source - Source type
|
|
70
|
-
* @returns {Array} Array of section metadata
|
|
71
|
-
*/
|
|
72
|
-
function scanDocsDirectory(docsPath, source) {
|
|
73
|
-
if (!fs.existsSync(docsPath)) {
|
|
74
|
-
console.log(`📄 No docs found at: ${docsPath}`)
|
|
75
|
-
return []
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const sections = []
|
|
79
|
-
const items = fs.readdirSync(docsPath, { withFileTypes: true })
|
|
80
|
-
|
|
81
|
-
for (const item of items) {
|
|
82
|
-
if (!item.isDirectory()) continue
|
|
83
|
-
|
|
84
|
-
const sectionPath = path.join(docsPath, item.name)
|
|
85
|
-
const order = extractOrder(item.name)
|
|
86
|
-
const slug = cleanName(item.name)
|
|
87
|
-
const title = slugToTitle(slug)
|
|
88
|
-
|
|
89
|
-
const pages = []
|
|
90
|
-
const files = fs.readdirSync(sectionPath)
|
|
91
|
-
|
|
92
|
-
for (const file of files) {
|
|
93
|
-
if (!file.endsWith('.md')) continue
|
|
94
|
-
|
|
95
|
-
const filePath = path.join(sectionPath, file)
|
|
96
|
-
const fileOrder = extractOrder(file)
|
|
97
|
-
const pageSlug = cleanName(file)
|
|
98
|
-
const pageTitle = slugToTitle(pageSlug)
|
|
99
|
-
|
|
100
|
-
// Get relative path from project root
|
|
101
|
-
const relativePath = filePath.replace(ROOT_DIR, '')
|
|
102
|
-
|
|
103
|
-
pages.push({
|
|
104
|
-
slug: pageSlug,
|
|
105
|
-
title: pageTitle,
|
|
106
|
-
order: fileOrder,
|
|
107
|
-
path: relativePath,
|
|
108
|
-
source
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Sort pages by order
|
|
113
|
-
pages.sort((a, b) => a.order - b.order)
|
|
114
|
-
|
|
115
|
-
sections.push({
|
|
116
|
-
title,
|
|
117
|
-
slug,
|
|
118
|
-
order,
|
|
119
|
-
pages,
|
|
120
|
-
source
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Sort sections by order
|
|
125
|
-
return sections.sort((a, b) => a.order - b.order)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Extract order number from filename (01-example -> 1)
|
|
130
|
-
*/
|
|
131
|
-
function extractOrder(name) {
|
|
132
|
-
const match = name.match(/^(\d+)-/)
|
|
133
|
-
return match ? parseInt(match[1], 10) : 999
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Clean filename (01-example.md -> example)
|
|
138
|
-
*/
|
|
139
|
-
function cleanName(name) {
|
|
140
|
-
return name.replace(/^\d+-/, '').replace(/\.md$/, '')
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Convert slug to title (getting-started -> Getting Started)
|
|
145
|
-
*/
|
|
146
|
-
function slugToTitle(slug) {
|
|
147
|
-
return slug
|
|
148
|
-
.split('-')
|
|
149
|
-
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
150
|
-
.join(' ')
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Get active plugins from theme configuration
|
|
155
|
-
*/
|
|
156
|
-
function getActiveThemePlugins(activeTheme) {
|
|
157
|
-
const themeConfigPath = path.join(CONTENTS_DIR, 'themes', activeTheme, 'theme.config.ts')
|
|
158
|
-
|
|
159
|
-
try {
|
|
160
|
-
const configContent = fs.readFileSync(themeConfigPath, 'utf8')
|
|
161
|
-
|
|
162
|
-
// Extract plugin dependencies from theme config
|
|
163
|
-
const pluginsMatch = configContent.match(/plugins:\s*\[([^\]]+)\]/)
|
|
164
|
-
const plugins = pluginsMatch
|
|
165
|
-
? pluginsMatch[1].split(',').map(p => p.trim().replace(/['"]/g, '')).filter(Boolean)
|
|
166
|
-
: []
|
|
167
|
-
|
|
168
|
-
return plugins
|
|
169
|
-
} catch (error) {
|
|
170
|
-
console.log(` Warning: Could not read theme config: ${error.message}`)
|
|
171
|
-
return []
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Read app config to check if plugin docs should be shown in production
|
|
177
|
-
*/
|
|
178
|
-
function shouldShowPluginDocsInProd(activeTheme) {
|
|
179
|
-
const appConfigPath = path.join(CONTENTS_DIR, 'themes', activeTheme, 'app.config.ts')
|
|
180
|
-
|
|
181
|
-
try {
|
|
182
|
-
const configContent = fs.readFileSync(appConfigPath, 'utf8')
|
|
183
|
-
|
|
184
|
-
// Look for showPluginsDocsInProd setting
|
|
185
|
-
const match = configContent.match(/showPluginsDocsInProd:\s*(true|false)/)
|
|
186
|
-
if (match) {
|
|
187
|
-
return match[1] === 'true'
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Default to false if not found
|
|
191
|
-
return false
|
|
192
|
-
} catch (error) {
|
|
193
|
-
console.log(` Warning: Could not read app config: ${error.message}`)
|
|
194
|
-
return false
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Scan plugin docs directories for all active plugins
|
|
200
|
-
*/
|
|
201
|
-
function scanPluginDocs(activePlugins) {
|
|
202
|
-
const allPluginDocs = []
|
|
203
|
-
|
|
204
|
-
for (const pluginName of activePlugins) {
|
|
205
|
-
const pluginDocsPath = path.join(CONTENTS_DIR, 'plugins', pluginName, 'docs')
|
|
206
|
-
|
|
207
|
-
if (!fs.existsSync(pluginDocsPath)) {
|
|
208
|
-
continue
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const sections = scanDocsDirectory(pluginDocsPath, 'plugin')
|
|
212
|
-
|
|
213
|
-
// Add plugin context to each section
|
|
214
|
-
for (const section of sections) {
|
|
215
|
-
section.pluginName = pluginName
|
|
216
|
-
allPluginDocs.push(section)
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return allPluginDocs
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Build the documentation registry
|
|
225
|
-
*/
|
|
226
|
-
async function buildDocsRegistry() {
|
|
227
|
-
console.log('📚 Building documentation registry...')
|
|
228
|
-
|
|
229
|
-
const activeTheme = process.env.NEXT_PUBLIC_ACTIVE_THEME || 'default'
|
|
230
|
-
console.log(` Active theme: ${activeTheme}`)
|
|
231
|
-
|
|
232
|
-
// Scan core docs
|
|
233
|
-
const coreDocsPath = IS_NPM_MODE
|
|
234
|
-
? path.join(CORE_DIR, 'docs')
|
|
235
|
-
: path.join(ROOT_DIR, 'packages/core/docs')
|
|
236
|
-
const coreDocs = scanDocsDirectory(coreDocsPath, 'core')
|
|
237
|
-
console.log(` Core sections: ${coreDocs.length}`)
|
|
238
|
-
|
|
239
|
-
// Scan theme docs
|
|
240
|
-
const themeDocs = scanDocsDirectory(
|
|
241
|
-
path.join(CONTENTS_DIR, `themes/${activeTheme}/docs`),
|
|
242
|
-
'theme'
|
|
243
|
-
)
|
|
244
|
-
console.log(` Theme sections: ${themeDocs.length}`)
|
|
245
|
-
|
|
246
|
-
// Scan plugin docs (conditionally based on environment and config)
|
|
247
|
-
const isProd = process.env.NODE_ENV === 'production'
|
|
248
|
-
const showPluginDocsInProd = shouldShowPluginDocsInProd(activeTheme)
|
|
249
|
-
const shouldIncludePluginDocs = !isProd || showPluginDocsInProd
|
|
250
|
-
|
|
251
|
-
let pluginDocs = []
|
|
252
|
-
if (shouldIncludePluginDocs) {
|
|
253
|
-
const activePlugins = getActiveThemePlugins(activeTheme)
|
|
254
|
-
console.log(` Active plugins: [${activePlugins.join(', ')}]`)
|
|
255
|
-
|
|
256
|
-
pluginDocs = scanPluginDocs(activePlugins)
|
|
257
|
-
console.log(` Plugin sections: ${pluginDocs.length}`)
|
|
258
|
-
|
|
259
|
-
if (pluginDocs.length > 0) {
|
|
260
|
-
const pluginPages = pluginDocs.reduce((sum, section) => sum + section.pages.length, 0)
|
|
261
|
-
console.log(` Plugin pages: ${pluginPages}`)
|
|
262
|
-
}
|
|
263
|
-
} else {
|
|
264
|
-
console.log(` Plugin docs: EXCLUDED (production + showPluginsDocsInProd: false)`)
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// Merge and create registry
|
|
268
|
-
const registry = {
|
|
269
|
-
core: coreDocs,
|
|
270
|
-
theme: themeDocs,
|
|
271
|
-
plugins: pluginDocs,
|
|
272
|
-
all: [...coreDocs, ...themeDocs, ...pluginDocs].sort((a, b) => a.order - b.order)
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// Total pages count
|
|
276
|
-
const totalPages = registry.all.reduce((sum, section) => sum + section.pages.length, 0)
|
|
277
|
-
console.log(` Total pages: ${totalPages}`)
|
|
278
|
-
|
|
279
|
-
// Generate TypeScript registry file
|
|
280
|
-
const registryContent = `// AUTO-GENERATED by scripts/build-docs-registry.mjs
|
|
281
|
-
// DO NOT EDIT MANUALLY
|
|
282
|
-
// Run \`pnpm docs:build\` to regenerate
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Documentation Registry - Build-Time Generated
|
|
286
|
-
*
|
|
287
|
-
* Contains metadata about all documentation sections and pages
|
|
288
|
-
* from core/, theme/, and active plugin directories.
|
|
289
|
-
*
|
|
290
|
-
* ZERO RUNTIME I/O - All data resolved at build time
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
|
-
export interface DocPageMeta {
|
|
294
|
-
slug: string
|
|
295
|
-
title: string
|
|
296
|
-
order: number
|
|
297
|
-
path: string
|
|
298
|
-
source: 'core' | 'theme' | 'plugin'
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
export interface DocSectionMeta {
|
|
302
|
-
title: string
|
|
303
|
-
slug: string
|
|
304
|
-
order: number
|
|
305
|
-
pages: DocPageMeta[]
|
|
306
|
-
source: 'core' | 'theme' | 'plugin'
|
|
307
|
-
pluginName?: string
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
export interface DocsRegistryStructure {
|
|
311
|
-
core: DocSectionMeta[]
|
|
312
|
-
theme: DocSectionMeta[]
|
|
313
|
-
plugins: DocSectionMeta[]
|
|
314
|
-
all: DocSectionMeta[]
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export const DOCS_REGISTRY: DocsRegistryStructure = ${JSON.stringify(registry, null, 2)} as const
|
|
318
|
-
|
|
319
|
-
export type DocsRegistry = typeof DOCS_REGISTRY
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Get all documentation sections (core + theme)
|
|
323
|
-
*/
|
|
324
|
-
export function getAllDocSections(): DocSectionMeta[] {
|
|
325
|
-
return DOCS_REGISTRY.all
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Get core documentation sections only
|
|
330
|
-
*/
|
|
331
|
-
export function getCoreDocSections(): DocSectionMeta[] {
|
|
332
|
-
return DOCS_REGISTRY.core
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Get theme documentation sections only
|
|
337
|
-
*/
|
|
338
|
-
export function getThemeDocSections(): DocSectionMeta[] {
|
|
339
|
-
return DOCS_REGISTRY.theme
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Get plugin documentation sections only
|
|
344
|
-
*/
|
|
345
|
-
export function getPluginDocSections(): DocSectionMeta[] {
|
|
346
|
-
return DOCS_REGISTRY.plugins
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Get documentation sections for a specific plugin
|
|
351
|
-
*/
|
|
352
|
-
export function getPluginDocSectionsByName(pluginName: string): DocSectionMeta[] {
|
|
353
|
-
return DOCS_REGISTRY.plugins.filter(section => section.pluginName === pluginName)
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Find a section by slug
|
|
358
|
-
*/
|
|
359
|
-
export function findDocSection(slug: string): DocSectionMeta | undefined {
|
|
360
|
-
return DOCS_REGISTRY.all.find(section => section.slug === slug)
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Find a page within a section
|
|
365
|
-
*/
|
|
366
|
-
export function findDocPage(sectionSlug: string, pageSlug: string): DocPageMeta | undefined {
|
|
367
|
-
const section = findDocSection(sectionSlug)
|
|
368
|
-
return section?.pages.find(page => page.slug === pageSlug)
|
|
369
|
-
}
|
|
370
|
-
`
|
|
371
|
-
|
|
372
|
-
// Ensure output directory exists
|
|
373
|
-
if (!existsSync(OUTPUT_DIR)) {
|
|
374
|
-
mkdirSync(OUTPUT_DIR, { recursive: true })
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// Write registry file
|
|
378
|
-
const registryPath = path.join(OUTPUT_DIR, 'docs-registry.ts')
|
|
379
|
-
fs.writeFileSync(registryPath, registryContent, 'utf-8')
|
|
380
|
-
|
|
381
|
-
console.log('✅ Docs registry built successfully')
|
|
382
|
-
const relativePath = IS_NPM_MODE
|
|
383
|
-
? '.nextspark/registries/docs-registry.ts'
|
|
384
|
-
: 'packages/core/src/lib/registries/docs-registry.ts'
|
|
385
|
-
console.log(` Output: ${relativePath}`)
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
// Run build
|
|
389
|
-
buildDocsRegistry().catch(error => {
|
|
390
|
-
console.error('❌ Error building docs registry:', error)
|
|
391
|
-
process.exit(1)
|
|
392
|
-
})
|