@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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { NextRequest, NextResponse } from 'next/server'
|
|
11
|
-
import
|
|
11
|
+
import * as z from 'zod'
|
|
12
12
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
13
13
|
import { SubscriptionService, MembershipService } from '@nextsparkjs/core/lib/services'
|
|
14
14
|
import { getBillingGateway } from '@nextsparkjs/core/lib/billing/gateways/factory'
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { NextRequest, NextResponse } from 'next/server'
|
|
11
|
-
import
|
|
11
|
+
import * as z from 'zod'
|
|
12
12
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
13
13
|
import { SubscriptionService, MembershipService } from '@nextsparkjs/core/lib/services'
|
|
14
14
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { NextRequest, NextResponse } from 'next/server'
|
|
13
13
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
14
14
|
import { SubscriptionService } from '@nextsparkjs/core/lib/services'
|
|
15
|
-
import
|
|
15
|
+
import * as z from 'zod'
|
|
16
16
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
17
17
|
|
|
18
18
|
const checkActionSchema = z.object({
|
|
@@ -11,7 +11,7 @@ import { NextRequest, NextResponse } from 'next/server'
|
|
|
11
11
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
12
12
|
import { getBillingGateway } from '@nextsparkjs/core/lib/billing/gateways/factory'
|
|
13
13
|
import { SubscriptionService, MembershipService } from '@nextsparkjs/core/lib/services'
|
|
14
|
-
import
|
|
14
|
+
import * as z from 'zod'
|
|
15
15
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
16
16
|
|
|
17
17
|
const checkoutSchema = z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server'
|
|
2
2
|
import { BLOCK_REGISTRY } from '@nextsparkjs/registries/block-registry'
|
|
3
|
-
import
|
|
3
|
+
import * as z from 'zod'
|
|
4
4
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
5
5
|
|
|
6
6
|
const requestSchema = z.object({
|
|
@@ -5,7 +5,7 @@ import { API_ERROR_CODES } from '@nextsparkjs/core/lib/api/api-error'
|
|
|
5
5
|
import { checkPermission } from '@nextsparkjs/core/lib/permissions/check'
|
|
6
6
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
7
7
|
import { MediaService } from '@nextsparkjs/core/lib/services/media.service'
|
|
8
|
-
import
|
|
8
|
+
import * as z from 'zod'
|
|
9
9
|
|
|
10
10
|
const addTagSchema = z.object({
|
|
11
11
|
tagId: z.string().min(1),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server'
|
|
2
2
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
3
3
|
import { query as dbQuery } from '@nextsparkjs/core/lib/db'
|
|
4
|
-
import
|
|
4
|
+
import * as z from 'zod'
|
|
5
5
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
6
6
|
|
|
7
7
|
const updateCategorySchema = z.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from 'next/server'
|
|
2
2
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
3
3
|
import { query as dbQuery } from '@nextsparkjs/core/lib/db'
|
|
4
|
-
import
|
|
4
|
+
import * as z from 'zod'
|
|
5
5
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
6
6
|
|
|
7
7
|
const createCategorySchema = z.object({
|
|
@@ -19,6 +19,7 @@ import type { TeamMember, TeamInvitation, TeamRole, Team } from '@nextsparkjs/co
|
|
|
19
19
|
import { EmailFactory } from '@nextsparkjs/core/lib/email/factory'
|
|
20
20
|
import { sendTeamInvitationEmail } from '@nextsparkjs/core/lib/email/send'
|
|
21
21
|
import { I18N_CONFIG } from '@nextsparkjs/core/lib/config'
|
|
22
|
+
import { withBasePath } from '@nextsparkjs/core/lib/base-path'
|
|
22
23
|
|
|
23
24
|
// Handle CORS preflight
|
|
24
25
|
export async function OPTIONS(request: NextRequest) {
|
|
@@ -294,7 +295,7 @@ export const POST = withRateLimitTier(withApiLogging(
|
|
|
294
295
|
|
|
295
296
|
// Build accept URL
|
|
296
297
|
const baseUrl = (process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:5173').replace(/\/$/, '')
|
|
297
|
-
const acceptUrl = `${baseUrl}
|
|
298
|
+
const acceptUrl = `${baseUrl}${withBasePath(`/accept-invite/${token}`)}`
|
|
298
299
|
|
|
299
300
|
// Send invitation email
|
|
300
301
|
try {
|
|
@@ -41,11 +41,9 @@ export const GET = withRateLimitTier(async function GET(request: NextRequest, pr
|
|
|
41
41
|
|
|
42
42
|
const subscription = await SubscriptionService.getActive(teamId)
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return createApiResponse({ subscription })
|
|
44
|
+
// A team can legitimately have no subscription yet. Keep that normal state
|
|
45
|
+
// in the successful response so dashboard loads do not log a 404.
|
|
46
|
+
return createApiResponse({ subscription: subscription ?? null })
|
|
49
47
|
} catch (error) {
|
|
50
48
|
console.error('[Billing API] Error fetching subscription:', error)
|
|
51
49
|
return createApiError('Failed to fetch subscription', 500)
|
|
@@ -194,25 +194,20 @@ Same as POST /members - creates a new invitation.
|
|
|
194
194
|
### Get Team Subscription
|
|
195
195
|
`GET /api/v1/teams/[teamId]/subscription`
|
|
196
196
|
|
|
197
|
-
Returns the team's active subscription details. Requires `billing.view` permission.
|
|
197
|
+
Returns the team's active subscription details, or `null` when the team has not subscribed yet. Requires `billing.view` permission.
|
|
198
198
|
|
|
199
199
|
**Response:**
|
|
200
200
|
```json
|
|
201
201
|
{
|
|
202
202
|
"success": true,
|
|
203
203
|
"data": {
|
|
204
|
-
"subscription":
|
|
205
|
-
"id": "sub_123",
|
|
206
|
-
"planId": "plan_pro",
|
|
207
|
-
"planName": "Pro",
|
|
208
|
-
"status": "active",
|
|
209
|
-
"currentPeriodEnd": "2024-03-01T00:00:00Z",
|
|
210
|
-
"cancelAtPeriodEnd": false
|
|
211
|
-
}
|
|
204
|
+
"subscription": null
|
|
212
205
|
}
|
|
213
206
|
}
|
|
214
207
|
```
|
|
215
208
|
|
|
209
|
+
When an active subscription exists, `subscription` contains its details.
|
|
210
|
+
|
|
216
211
|
---
|
|
217
212
|
|
|
218
213
|
## Usage & Quota Endpoints
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
ACTIVE_TEAM_COOKIE_MAX_AGE,
|
|
15
15
|
activeTeamCookieValue,
|
|
16
16
|
} from '@nextsparkjs/core/lib/teams/active-team-cookie'
|
|
17
|
-
import
|
|
17
|
+
import * as z from 'zod'
|
|
18
18
|
|
|
19
19
|
const switchTeamSchema = z.object({
|
|
20
20
|
teamId: z.string().min(1, 'Team ID is required'),
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
addCorsHeaders,
|
|
30
30
|
} from '@nextsparkjs/core/lib/api/helpers'
|
|
31
31
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
32
|
-
import
|
|
32
|
+
import * as z from 'zod'
|
|
33
33
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
34
34
|
|
|
35
35
|
// Validation schema for metadata value
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
processEntityMetadata
|
|
13
13
|
} from '@nextsparkjs/core/lib/api/helpers';
|
|
14
14
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth';
|
|
15
|
-
import
|
|
15
|
+
import * as z from 'zod';
|
|
16
16
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit';
|
|
17
17
|
|
|
18
18
|
const updateUserSchema = z.object({
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@nextsparkjs/core/lib/api/helpers';
|
|
17
17
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth';
|
|
18
18
|
import { hasAdminPermission } from '@nextsparkjs/core/lib/api/auth/permissions';
|
|
19
|
-
import
|
|
19
|
+
import * as z from 'zod';
|
|
20
20
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit';
|
|
21
21
|
|
|
22
22
|
const createUserSchema = z.object({
|
|
@@ -51,6 +51,7 @@ import { usePermissions } from '@nextsparkjs/core/lib/permissions/hooks'
|
|
|
51
51
|
import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-registry.client'
|
|
52
52
|
import type { Media, MediaListOptions } from '@nextsparkjs/core/lib/media/types'
|
|
53
53
|
import type { Permission } from '@nextsparkjs/core/lib/permissions/types'
|
|
54
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
54
55
|
|
|
55
56
|
type ViewMode = 'grid' | 'list'
|
|
56
57
|
|
|
@@ -484,8 +485,9 @@ function DefaultMediaDashboardPage() {
|
|
|
484
485
|
{/* Left: Image preview - Dark canvas */}
|
|
485
486
|
<div className="relative bg-neutral-950 flex items-center justify-center overflow-hidden h-[250px] md:h-auto">
|
|
486
487
|
{editingMedia?.mimeType.startsWith('image/') ? (
|
|
488
|
+
// eslint-disable-next-line @next/next/no-img-element -- the original upload at its own size, whose dimensions next/image would need up front
|
|
487
489
|
<img
|
|
488
|
-
src={editingMedia.url}
|
|
490
|
+
src={withBasePathIfInApp(editingMedia.url)}
|
|
489
491
|
alt={editingMedia.alt || editingMedia.filename}
|
|
490
492
|
className="max-w-[90%] max-h-[90%] object-contain select-none"
|
|
491
493
|
draggable={false}
|
|
@@ -37,6 +37,7 @@ import { ApiKeyDisplay } from '@nextsparkjs/core/components/api/keys/ApiKeyDispl
|
|
|
37
37
|
import { toast } from 'sonner';
|
|
38
38
|
import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-registry.client'
|
|
39
39
|
import { sel } from '@nextsparkjs/core/selectors'
|
|
40
|
+
import { withBasePath } from '@nextsparkjs/core/lib/base-path'
|
|
40
41
|
|
|
41
42
|
interface ApiKey {
|
|
42
43
|
id: string;
|
|
@@ -73,7 +74,7 @@ function ApiKeysPage() {
|
|
|
73
74
|
const { data: apiKeys, isLoading, error } = useQuery<ApiKey[]>({
|
|
74
75
|
queryKey: ['api-keys'],
|
|
75
76
|
queryFn: async () => {
|
|
76
|
-
const response = await fetch('/api/v1/api-keys');
|
|
77
|
+
const response = await fetch(withBasePath('/api/v1/api-keys'));
|
|
77
78
|
if (!response.ok) {
|
|
78
79
|
const errorData = await response.json();
|
|
79
80
|
throw new Error(errorData.error || 'Failed to fetch API keys');
|
|
@@ -86,7 +87,7 @@ function ApiKeysPage() {
|
|
|
86
87
|
// Revoke API key mutation
|
|
87
88
|
const revokeApiKey = useMutation({
|
|
88
89
|
mutationFn: async (keyId: string) => {
|
|
89
|
-
const response = await fetch(`/api/v1/api-keys/${keyId}
|
|
90
|
+
const response = await fetch(withBasePath(`/api/v1/api-keys/${keyId}`), {
|
|
90
91
|
method: 'DELETE'
|
|
91
92
|
});
|
|
92
93
|
if (!response.ok) {
|
|
@@ -107,7 +108,7 @@ function ApiKeysPage() {
|
|
|
107
108
|
// Toggle API key status
|
|
108
109
|
const toggleApiKey = useMutation({
|
|
109
110
|
mutationFn: async ({ keyId, status }: { keyId: string; status: 'active' | 'inactive' }) => {
|
|
110
|
-
const response = await fetch(`/api/v1/api-keys/${keyId}
|
|
111
|
+
const response = await fetch(withBasePath(`/api/v1/api-keys/${keyId}`), {
|
|
111
112
|
method: 'PATCH',
|
|
112
113
|
headers: { 'Content-Type': 'application/json' },
|
|
113
114
|
body: JSON.stringify({ status })
|
|
@@ -417,7 +418,7 @@ function ApiKeyDetailsDialog({
|
|
|
417
418
|
const { data: keyDetails, isLoading } = useQuery({
|
|
418
419
|
queryKey: ['api-key-details', keyId],
|
|
419
420
|
queryFn: async () => {
|
|
420
|
-
const response = await fetch(`/api/v1/api-keys/${keyId}`);
|
|
421
|
+
const response = await fetch(withBasePath(`/api/v1/api-keys/${keyId}`));
|
|
421
422
|
if (!response.ok) throw new Error('Failed to fetch API key details');
|
|
422
423
|
const result = await response.json();
|
|
423
424
|
return result.data;
|
|
@@ -64,6 +64,7 @@ import { countries, timezones } from '@nextsparkjs/core/lib/countries-timezones'
|
|
|
64
64
|
import { sel } from '@nextsparkjs/core/selectors'
|
|
65
65
|
import { useLocale, useTranslations } from 'next-intl'
|
|
66
66
|
import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-registry.client'
|
|
67
|
+
import { withBasePath } from '@nextsparkjs/core/lib/base-path'
|
|
67
68
|
|
|
68
69
|
// Language options
|
|
69
70
|
const languages = [
|
|
@@ -119,7 +120,7 @@ function ProfilePage() {
|
|
|
119
120
|
// Update profile mutation
|
|
120
121
|
const updateProfileMutation = useMutation({
|
|
121
122
|
mutationFn: async (data: ProfileFormData) => {
|
|
122
|
-
const response = await fetch('/api/user/profile', {
|
|
123
|
+
const response = await fetch(withBasePath('/api/user/profile'), {
|
|
123
124
|
method: 'PATCH',
|
|
124
125
|
headers: {
|
|
125
126
|
'Content-Type': 'application/json',
|
|
@@ -151,7 +152,7 @@ function ProfilePage() {
|
|
|
151
152
|
// Delete account mutation
|
|
152
153
|
const deleteAccountMutation = useMutation({
|
|
153
154
|
mutationFn: async () => {
|
|
154
|
-
const response = await fetch('/api/user/delete-account', {
|
|
155
|
+
const response = await fetch(withBasePath('/api/user/delete-account'), {
|
|
155
156
|
method: 'DELETE',
|
|
156
157
|
headers: {
|
|
157
158
|
'Content-Type': 'application/json',
|
|
@@ -23,6 +23,7 @@ import { sel } from '@nextsparkjs/core/selectors'
|
|
|
23
23
|
import { Filters } from '@nextsparkjs/core/components/devtools/scheduled-actions/filters'
|
|
24
24
|
import { ActionsTable } from '@nextsparkjs/core/components/devtools/scheduled-actions/actions-table'
|
|
25
25
|
import type { ScheduledActionsFilters, ScheduledActionsResponse } from '@nextsparkjs/core/components/devtools/scheduled-actions/types'
|
|
26
|
+
import { withBasePath } from '@nextsparkjs/core/lib/base-path'
|
|
26
27
|
|
|
27
28
|
async function fetchScheduledActions(
|
|
28
29
|
filters: ScheduledActionsFilters,
|
|
@@ -42,7 +43,7 @@ async function fetchScheduledActions(
|
|
|
42
43
|
params.append('page', page.toString())
|
|
43
44
|
params.append('limit', limit.toString())
|
|
44
45
|
|
|
45
|
-
const response = await fetch(`/api/v1/devtools/scheduled-actions?${params.toString()}`)
|
|
46
|
+
const response = await fetch(withBasePath(`/api/v1/devtools/scheduled-actions?${params.toString()}`))
|
|
46
47
|
|
|
47
48
|
if (!response.ok) {
|
|
48
49
|
throw new Error('Failed to fetch scheduled actions')
|
|
@@ -15,6 +15,22 @@ interface SuperadminDocsPageProps {
|
|
|
15
15
|
}>
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
// generateStaticParams below lists every superadmin doc page, and
|
|
19
|
+
// dynamicParams = false answers 404 for any other section/page pair in
|
|
20
|
+
// `next dev`. connection() keeps these pages from being prerendered, so a
|
|
21
|
+
// production build renders them on demand, where Next has no prerendered list
|
|
22
|
+
// to check, and the notFound() calls below cannot set the status either: they
|
|
23
|
+
// run inside the superadmin layout's Suspense boundary, after the response
|
|
24
|
+
// head has gone out with a 200. For those requests the proxy answers 404
|
|
25
|
+
// before anything renders (isMissingDocsPage in proxy.ts).
|
|
26
|
+
export const dynamicParams = false
|
|
27
|
+
|
|
28
|
+
export async function generateStaticParams() {
|
|
29
|
+
return DOCS_REGISTRY.superadmin.flatMap(section =>
|
|
30
|
+
section.pages.map(page => ({ section: section.slug, page: page.slug }))
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
18
34
|
export async function generateMetadata({ params }: SuperadminDocsPageProps): Promise<Metadata> {
|
|
19
35
|
const resolvedParams = await params
|
|
20
36
|
const { section: sectionSlug, page: pageSlug } = resolvedParams
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
ExternalLink,
|
|
44
44
|
} from "lucide-react";
|
|
45
45
|
import Link from "next/link";
|
|
46
|
+
import { withBasePath, withBasePathIfInApp } from "@nextsparkjs/core/lib/base-path";
|
|
46
47
|
import { getTemplateOrDefaultClient } from "@nextsparkjs/registries/template-registry.client";
|
|
47
48
|
import {
|
|
48
49
|
SearchInput,
|
|
@@ -229,7 +230,7 @@ function SubscriptionsPage() {
|
|
|
229
230
|
queryFn: async () => {
|
|
230
231
|
const queryString = getQueryParams();
|
|
231
232
|
const url = `/api/superadmin/subscriptions${queryString ? `?${queryString}` : ""}`;
|
|
232
|
-
const response = await fetch(url);
|
|
233
|
+
const response = await fetch(withBasePath(url));
|
|
233
234
|
if (!response.ok) {
|
|
234
235
|
throw new Error("Failed to fetch subscriptions data");
|
|
235
236
|
}
|
|
@@ -600,7 +601,7 @@ function SubscriptionsPage() {
|
|
|
600
601
|
className="text-muted-foreground"
|
|
601
602
|
>
|
|
602
603
|
<a
|
|
603
|
-
href={sub.providerDashboardUrl}
|
|
604
|
+
href={withBasePathIfInApp(sub.providerDashboardUrl)}
|
|
604
605
|
target="_blank"
|
|
605
606
|
rel="noopener noreferrer"
|
|
606
607
|
>
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
} from "lucide-react";
|
|
44
44
|
import Link from "next/link";
|
|
45
45
|
import { getTemplateOrDefaultClient } from "@nextsparkjs/registries/template-registry.client";
|
|
46
|
+
import { withBasePath, withBasePathIfInApp } from "@nextsparkjs/core/lib/base-path"
|
|
46
47
|
|
|
47
48
|
interface TeamOwner {
|
|
48
49
|
id: string;
|
|
@@ -153,7 +154,7 @@ function TeamDetailPage() {
|
|
|
153
154
|
const { data: teamData, isLoading, error, refetch } = useQuery<TeamDetailData>({
|
|
154
155
|
queryKey: ["superadmin-team", teamId],
|
|
155
156
|
queryFn: async () => {
|
|
156
|
-
const response = await fetch(`/api/superadmin/teams/${teamId}`);
|
|
157
|
+
const response = await fetch(withBasePath(`/api/superadmin/teams/${teamId}`));
|
|
157
158
|
if (!response.ok) {
|
|
158
159
|
if (response.status === 404) {
|
|
159
160
|
throw new Error("Team not found");
|
|
@@ -503,7 +504,7 @@ function TeamDetailPage() {
|
|
|
503
504
|
{teamData.subscription.providerName || 'Payment Provider'}
|
|
504
505
|
</h4>
|
|
505
506
|
<a
|
|
506
|
-
href={teamData.subscription.providerDashboardUrl}
|
|
507
|
+
href={withBasePathIfInApp(teamData.subscription.providerDashboardUrl)}
|
|
507
508
|
target="_blank"
|
|
508
509
|
rel="noopener noreferrer"
|
|
509
510
|
className="inline-flex items-center gap-1 text-sm text-primary hover:underline"
|
|
@@ -604,7 +605,7 @@ function TeamDetailPage() {
|
|
|
604
605
|
<div className="flex items-center gap-2">
|
|
605
606
|
{event.invoiceUrl && (
|
|
606
607
|
<a
|
|
607
|
-
href={event.invoiceUrl}
|
|
608
|
+
href={withBasePathIfInApp(event.invoiceUrl)}
|
|
608
609
|
target="_blank"
|
|
609
610
|
rel="noopener noreferrer"
|
|
610
611
|
className="text-primary hover:underline text-sm"
|
|
@@ -614,7 +615,7 @@ function TeamDetailPage() {
|
|
|
614
615
|
)}
|
|
615
616
|
{event.receiptUrl && (
|
|
616
617
|
<a
|
|
617
|
-
href={event.receiptUrl}
|
|
618
|
+
href={withBasePathIfInApp(event.receiptUrl)}
|
|
618
619
|
target="_blank"
|
|
619
620
|
rel="noopener noreferrer"
|
|
620
621
|
className="text-primary hover:underline text-sm"
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
} from "lucide-react";
|
|
40
40
|
import Link from "next/link";
|
|
41
41
|
import { getTemplateOrDefaultClient } from "@nextsparkjs/registries/template-registry.client";
|
|
42
|
+
import { withBasePath } from "@nextsparkjs/core/lib/base-path"
|
|
42
43
|
|
|
43
44
|
interface TeamMembership {
|
|
44
45
|
teamId: string;
|
|
@@ -114,7 +115,7 @@ function UserDetailPage() {
|
|
|
114
115
|
const { data: userData, isLoading, error, refetch } = useQuery<UserDetailData>({
|
|
115
116
|
queryKey: ["superadmin-user", userId],
|
|
116
117
|
queryFn: async () => {
|
|
117
|
-
const response = await fetch(`/api/superadmin/users/${userId}`);
|
|
118
|
+
const response = await fetch(withBasePath(`/api/superadmin/users/${userId}`));
|
|
118
119
|
if (!response.ok) {
|
|
119
120
|
if (response.status === 404) {
|
|
120
121
|
throw new Error("User not found");
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
FilterDropdown,
|
|
39
39
|
} from "@nextsparkjs/core/components/superadmin/filters";
|
|
40
40
|
import { sel } from "@nextsparkjs/core/selectors";
|
|
41
|
+
import { withBasePath } from "@nextsparkjs/core/lib/base-path"
|
|
41
42
|
|
|
42
43
|
interface UsersData {
|
|
43
44
|
regularUsers: User[];
|
|
@@ -119,7 +120,7 @@ function UsersPage() {
|
|
|
119
120
|
queryKey: ["superadmin-users", search, roleFilter, statusFilter, activeTab, page, limit],
|
|
120
121
|
queryFn: async () => {
|
|
121
122
|
const queryString = getQueryParams();
|
|
122
|
-
const response = await fetch(`/api/superadmin/users?${queryString}`);
|
|
123
|
+
const response = await fetch(withBasePath(`/api/superadmin/users?${queryString}`));
|
|
123
124
|
if (!response.ok) {
|
|
124
125
|
throw new Error("Failed to fetch users data");
|
|
125
126
|
}
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
3
3
|
import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
|
|
4
4
|
import type { CTASectionBlockProps } from './schema'
|
|
5
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* CTA Section Block Component
|
|
@@ -67,7 +68,7 @@ export function CTASectionBlock({
|
|
|
67
68
|
{primaryCta && (
|
|
68
69
|
<Button asChild size="lg">
|
|
69
70
|
<a
|
|
70
|
-
href={primaryCta.link}
|
|
71
|
+
href={withBasePathIfInApp(primaryCta.link)}
|
|
71
72
|
target={primaryCta.target}
|
|
72
73
|
rel={primaryCta.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
73
74
|
>
|
|
@@ -83,7 +84,7 @@ export function CTASectionBlock({
|
|
|
83
84
|
variant={secondaryButton.variant || 'outline'}
|
|
84
85
|
>
|
|
85
86
|
<a
|
|
86
|
-
href={secondaryButton.link}
|
|
87
|
+
href={withBasePathIfInApp(secondaryButton.link)}
|
|
87
88
|
target={secondaryButton.target}
|
|
88
89
|
rel={secondaryButton.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
89
90
|
>
|
|
@@ -8,6 +8,7 @@ import * as Icons from 'lucide-react'
|
|
|
8
8
|
import { cn } from '@nextsparkjs/core/lib/utils'
|
|
9
9
|
import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
|
|
10
10
|
import type { FeaturesGridBlockProps, FeatureItem } from './schema'
|
|
11
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Features Grid Block Component
|
|
@@ -101,7 +102,7 @@ export function FeaturesGridBlock({
|
|
|
101
102
|
{cta && (
|
|
102
103
|
<div className="mt-12 text-center">
|
|
103
104
|
<a
|
|
104
|
-
href={cta.link}
|
|
105
|
+
href={withBasePathIfInApp(cta.link)}
|
|
105
106
|
target={cta.target}
|
|
106
107
|
rel={cta.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
107
108
|
className="inline-flex items-center justify-center rounded-md bg-primary px-8 py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors"
|
|
@@ -3,6 +3,7 @@ import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
|
3
3
|
import { cn } from '@nextsparkjs/core/lib/utils'
|
|
4
4
|
import { buildSectionClasses, resolveMediaUrl } from '@nextsparkjs/core/types/blocks'
|
|
5
5
|
import type { HeroBlockProps } from './schema'
|
|
6
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Hero Block Component
|
|
@@ -62,7 +63,7 @@ export function HeroBlock({
|
|
|
62
63
|
<div
|
|
63
64
|
className="absolute inset-0 z-0"
|
|
64
65
|
style={{
|
|
65
|
-
backgroundImage: `url(${backgroundImageUrl})`,
|
|
66
|
+
backgroundImage: `url(${withBasePathIfInApp(backgroundImageUrl)})`,
|
|
66
67
|
backgroundSize: 'cover',
|
|
67
68
|
backgroundPosition: 'center',
|
|
68
69
|
}}
|
|
@@ -88,7 +89,7 @@ export function HeroBlock({
|
|
|
88
89
|
{ctaConfig && (
|
|
89
90
|
<Button asChild size="lg" className="text-lg px-8 py-6">
|
|
90
91
|
<a
|
|
91
|
-
href={ctaConfig.link}
|
|
92
|
+
href={withBasePathIfInApp(ctaConfig.link)}
|
|
92
93
|
target={ctaConfig.target}
|
|
93
94
|
rel={ctaConfig.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
94
95
|
>
|
|
@@ -4,6 +4,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@nextsparkjs/core/component
|
|
|
4
4
|
import { cn } from '@nextsparkjs/core/lib/utils'
|
|
5
5
|
import { buildSectionClasses, resolveMediaUrl } from '@nextsparkjs/core/types/blocks'
|
|
6
6
|
import type { TestimonialsBlockProps, TestimonialItem } from './schema'
|
|
7
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Testimonials Block Component
|
|
@@ -98,7 +99,7 @@ export function TestimonialsBlock({
|
|
|
98
99
|
{cta && (
|
|
99
100
|
<div className="mt-12 text-center">
|
|
100
101
|
<a
|
|
101
|
-
href={cta.link}
|
|
102
|
+
href={withBasePathIfInApp(cta.link)}
|
|
102
103
|
target={cta.target}
|
|
103
104
|
rel={cta.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
104
105
|
className="inline-flex items-center justify-center rounded-md bg-primary px-8 py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors"
|
|
@@ -3,6 +3,7 @@ import { cn } from '@nextsparkjs/core/lib/utils'
|
|
|
3
3
|
import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
|
|
4
4
|
import { sanitizeBlockHtml } from '@nextsparkjs/core/lib/blocks/sanitize-html'
|
|
5
5
|
import type { TextContentBlockProps } from './schema'
|
|
6
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Text Content Block Component
|
|
@@ -82,7 +83,7 @@ export function TextContentBlock({
|
|
|
82
83
|
alignmentClasses[alignment]
|
|
83
84
|
)}>
|
|
84
85
|
<a
|
|
85
|
-
href={cta.link}
|
|
86
|
+
href={withBasePathIfInApp(cta.link)}
|
|
86
87
|
target={cta.target}
|
|
87
88
|
rel={cta.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
88
89
|
className="inline-flex items-center justify-center rounded-md bg-primary px-8 py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors"
|
|
@@ -35,7 +35,7 @@ Runs critical path tests on every PR to catch breaking changes quickly.
|
|
|
35
35
|
|
|
36
36
|
**Configuration:**
|
|
37
37
|
- Uses `@smoke` tag to filter tests
|
|
38
|
-
- Runs on Ubuntu with Node.js
|
|
38
|
+
- Runs on Ubuntu with Node.js 22.14.0 or later
|
|
39
39
|
- Uploads artifacts on failure
|
|
40
40
|
|
|
41
41
|
### cypress-regression.yml
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
3
3
|
import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
|
|
4
4
|
import type { CTASectionBlockProps } from './schema'
|
|
5
|
+
import { withBasePathIfInApp } from '@nextsparkjs/core/lib/base-path'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* CTA Section Block Component
|
|
@@ -67,7 +68,7 @@ export function CTASectionBlock({
|
|
|
67
68
|
{primaryCta && (
|
|
68
69
|
<Button asChild size="lg">
|
|
69
70
|
<a
|
|
70
|
-
href={primaryCta.link}
|
|
71
|
+
href={withBasePathIfInApp(primaryCta.link)}
|
|
71
72
|
target={primaryCta.target}
|
|
72
73
|
rel={primaryCta.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
73
74
|
>
|
|
@@ -83,7 +84,7 @@ export function CTASectionBlock({
|
|
|
83
84
|
variant={secondaryButton.variant || 'outline'}
|
|
84
85
|
>
|
|
85
86
|
<a
|
|
86
|
-
href={secondaryButton.link}
|
|
87
|
+
href={withBasePathIfInApp(secondaryButton.link)}
|
|
87
88
|
target={secondaryButton.target}
|
|
88
89
|
rel={secondaryButton.target === '_blank' ? 'noopener noreferrer' : undefined}
|
|
89
90
|
>
|