@nextsparkjs/core 0.1.0-beta.194 → 0.1.0-beta.196
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/app/guards/DeveloperGuard.d.ts +8 -1
- package/dist/components/app/guards/DeveloperGuard.d.ts.map +1 -1
- package/dist/components/app/guards/DeveloperGuard.js +2 -1
- package/dist/components/app/guards/SuperAdminGuard.d.ts +8 -1
- package/dist/components/app/guards/SuperAdminGuard.d.ts.map +1 -1
- package/dist/components/app/guards/SuperAdminGuard.js +2 -1
- package/dist/components/billing/InvoicesPagination.js +2 -2
- 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 +39 -23
- 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/AuthGuard.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/AuthGuard.js +3 -4
- package/dist/components/dashboard/layouts/AuthenticatedDashboardLayout.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/AuthenticatedDashboardLayout.js +9 -10
- package/dist/components/dashboard/layouts/DashboardAuthLayout.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/DashboardAuthLayout.js +3 -4
- package/dist/components/dashboard/layouts/DashboardAuthSkeleton.d.ts +2 -2
- package/dist/components/dashboard/navigation/DynamicNavigation.js +2 -2
- package/dist/components/entities/wrappers/EntityDetailWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.js +5 -2
- package/dist/components/entities/wrappers/EntityFormWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityFormWrapper.js +5 -2
- package/dist/components/entities/wrappers/EntityListWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityListWrapper.js +5 -2
- package/dist/components/settings/layouts/SettingsSidebar.d.ts.map +1 -1
- package/dist/components/settings/layouts/SettingsSidebar.js +0 -1
- package/dist/components/teams/CreateTeamButton.js +2 -2
- package/dist/components/teams/CreateTeamDialog.js +1 -1
- package/dist/components/teams/InviteMemberButton.js +3 -3
- package/dist/components/teams/InviteMemberDialog.js +1 -1
- package/dist/components/teams/TeamPendingInvitations.js +2 -2
- package/dist/components/ui/relation-display.d.ts.map +1 -1
- package/dist/components/ui/relation-display.js +2 -1
- package/dist/components/ui/user-display.d.ts.map +1 -1
- package/dist/components/ui/user-display.js +2 -1
- package/dist/emails/otp-verification.d.ts.map +1 -1
- package/dist/emails/otp-verification.js +5 -3
- package/dist/emails/reset-password.d.ts.map +1 -1
- package/dist/emails/reset-password.js +5 -3
- package/dist/emails/team-invitation.d.ts.map +1 -1
- package/dist/emails/team-invitation.js +3 -2
- package/dist/emails/verify-email.d.ts.map +1 -1
- package/dist/emails/verify-email.js +5 -3
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +21 -4
- package/dist/hooks/usePatternUsages.d.ts.map +1 -1
- package/dist/hooks/usePatternUsages.js +3 -2
- package/dist/lib/api/api-error.d.ts +2 -0
- package/dist/lib/api/api-error.d.ts.map +1 -1
- package/dist/lib/api/api-error.js +3 -1
- package/dist/lib/api/auth/dual-auth.d.ts +2 -1
- package/dist/lib/api/auth/dual-auth.d.ts.map +1 -1
- package/dist/lib/api/auth/dual-auth.js +22 -4
- package/dist/lib/api/auth/scope-policy.d.ts +6 -3
- package/dist/lib/api/auth/scope-policy.d.ts.map +1 -1
- package/dist/lib/api/auth.d.ts +2 -0
- package/dist/lib/api/auth.d.ts.map +1 -1
- package/dist/lib/api/auth.js +10 -10
- package/dist/lib/api/client-headers.d.ts +11 -0
- package/dist/lib/api/client-headers.d.ts.map +1 -0
- package/dist/lib/api/client-headers.js +12 -0
- package/dist/lib/api/client-ip.d.ts +59 -0
- package/dist/lib/api/client-ip.d.ts.map +1 -0
- package/dist/lib/api/client-ip.js +91 -0
- package/dist/lib/api/cors-response.d.ts +55 -0
- package/dist/lib/api/cors-response.d.ts.map +1 -0
- package/dist/lib/api/cors-response.js +90 -0
- package/dist/lib/api/entities.d.ts.map +1 -1
- package/dist/lib/api/entities.js +4 -3
- package/dist/lib/api/entity/audit-log.d.ts.map +1 -1
- package/dist/lib/api/entity/audit-log.js +2 -1
- package/dist/lib/api/entity/generic-handler.d.ts.map +1 -1
- package/dist/lib/api/entity/generic-handler.js +23 -8
- package/dist/lib/api/helpers.d.ts +8 -2
- package/dist/lib/api/helpers.d.ts.map +1 -1
- package/dist/lib/api/helpers.js +32 -103
- package/dist/lib/api/keys.d.ts +6 -0
- package/dist/lib/api/keys.d.ts.map +1 -1
- package/dist/lib/api/keys.js +7 -1
- package/dist/lib/api/permission-middleware.d.ts.map +1 -1
- package/dist/lib/api/permission-middleware.js +0 -2
- package/dist/lib/api/rate-limit.d.ts +12 -0
- package/dist/lib/api/rate-limit.d.ts.map +1 -1
- package/dist/lib/api/rate-limit.js +50 -43
- package/dist/lib/api/request-origin.d.ts +16 -7
- package/dist/lib/api/request-origin.d.ts.map +1 -1
- package/dist/lib/api/request-origin.js +43 -20
- package/dist/lib/auth/load-login-page.d.ts +10 -0
- package/dist/lib/auth/load-login-page.d.ts.map +1 -0
- package/dist/lib/auth/load-login-page.js +7 -0
- package/dist/lib/auth/runtime-readiness.d.ts.map +1 -1
- package/dist/lib/auth/runtime-readiness.js +4 -0
- package/dist/lib/auth/sample-accounts.d.ts +17 -0
- package/dist/lib/auth/sample-accounts.d.ts.map +1 -0
- package/dist/lib/auth/sample-accounts.js +22 -0
- package/dist/lib/auth/security-notifications/device-fingerprint.d.ts +1 -8
- package/dist/lib/auth/security-notifications/device-fingerprint.d.ts.map +1 -1
- package/dist/lib/auth/security-notifications/device-fingerprint.js +2 -12
- package/dist/lib/auth-email-callbacks.js +3 -3
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +13 -5
- package/dist/lib/cache/public-entity-cache.d.ts +21 -0
- package/dist/lib/cache/public-entity-cache.d.ts.map +1 -0
- package/dist/lib/cache/public-entity-cache.js +25 -0
- package/dist/lib/config/config-client.d.ts.map +1 -1
- package/dist/lib/config/config-client.js +1 -1
- package/dist/lib/config/config-sync.d.ts.map +1 -1
- package/dist/lib/config/config-sync.js +1 -1
- package/dist/lib/config/public-config-client.d.ts +1 -0
- package/dist/lib/config/public-config-client.d.ts.map +1 -1
- package/dist/lib/config/public-config-client.js +3 -1
- package/dist/lib/config/types.d.ts +2 -0
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/lib/constants/reserved-slugs.d.ts +17 -8
- package/dist/lib/constants/reserved-slugs.d.ts.map +1 -1
- package/dist/lib/constants/reserved-slugs.js +16 -52
- package/dist/lib/db.d.ts.map +1 -1
- package/dist/lib/db.js +9 -3
- package/dist/lib/entities/entity-hooks.d.ts.map +1 -1
- package/dist/lib/entities/entity-hooks.js +4 -0
- package/dist/lib/entities/external-api-generator.d.ts.map +1 -1
- package/dist/lib/entities/external-api-generator.js +2 -4
- package/dist/lib/entities/public-slug.d.ts +46 -0
- package/dist/lib/entities/public-slug.d.ts.map +1 -0
- package/dist/lib/entities/public-slug.js +39 -0
- package/dist/lib/mcp/errors.d.ts +2 -0
- package/dist/lib/mcp/errors.d.ts.map +1 -1
- package/dist/lib/mcp/errors.js +3 -1
- package/dist/lib/mcp/index.d.ts +1 -1
- package/dist/lib/mcp/index.d.ts.map +1 -1
- package/dist/lib/mcp/index.js +2 -1
- package/dist/lib/services/generic-entity.service.d.ts.map +1 -1
- package/dist/lib/services/generic-entity.service.js +2 -0
- package/dist/lib/teams/actions.d.ts.map +1 -1
- package/dist/lib/teams/actions.js +0 -1
- package/dist/messages/de/billing.json +12 -1
- package/dist/messages/de/common.json +2 -0
- package/dist/messages/de/docs.json +1 -0
- package/dist/messages/de/features.json +16 -4
- package/dist/messages/de/home.json +5 -0
- package/dist/messages/de/index.d.ts +68 -25
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/de/index.js +2 -0
- package/dist/messages/de/index.ts +2 -0
- package/dist/messages/de/settings.json +1 -0
- package/dist/messages/de/teams.json +3 -18
- package/dist/messages/en/billing.json +1 -1
- package/dist/messages/en/common.json +2 -0
- package/dist/messages/en/docs.json +1 -0
- package/dist/messages/en/features.json +16 -4
- package/dist/messages/en/home.json +5 -0
- package/dist/messages/en/index.d.ts +58 -25
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/en/index.js +2 -0
- package/dist/messages/en/index.ts +2 -0
- package/dist/messages/en/settings.json +1 -0
- package/dist/messages/en/teams.json +3 -18
- package/dist/messages/es/billing.json +1 -1
- package/dist/messages/es/common.json +2 -0
- package/dist/messages/es/docs.json +1 -0
- package/dist/messages/es/features.json +16 -4
- package/dist/messages/es/home.json +5 -0
- package/dist/messages/es/index.d.ts +41 -8
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/es/index.js +2 -0
- package/dist/messages/es/index.ts +2 -0
- package/dist/messages/es/settings.json +1 -0
- package/dist/messages/es/teams.json +3 -0
- package/dist/messages/fr/billing.json +12 -1
- package/dist/messages/fr/common.json +2 -0
- package/dist/messages/fr/docs.json +1 -0
- package/dist/messages/fr/features.json +16 -4
- package/dist/messages/fr/home.json +5 -0
- package/dist/messages/fr/index.d.ts +68 -25
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/fr/index.js +2 -0
- package/dist/messages/fr/index.ts +2 -0
- package/dist/messages/fr/settings.json +1 -0
- package/dist/messages/fr/teams.json +3 -18
- package/dist/messages/it/billing.json +12 -1
- package/dist/messages/it/common.json +2 -0
- package/dist/messages/it/docs.json +1 -0
- package/dist/messages/it/features.json +16 -4
- package/dist/messages/it/home.json +5 -0
- package/dist/messages/it/index.d.ts +68 -25
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/it/index.js +2 -0
- package/dist/messages/it/index.ts +2 -0
- package/dist/messages/it/settings.json +1 -0
- package/dist/messages/it/teams.json +3 -18
- package/dist/messages/pt/billing.json +12 -1
- package/dist/messages/pt/common.json +2 -0
- package/dist/messages/pt/docs.json +1 -0
- package/dist/messages/pt/features.json +16 -4
- package/dist/messages/pt/home.json +5 -0
- package/dist/messages/pt/index.d.ts +68 -25
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/messages/pt/index.js +2 -0
- package/dist/messages/pt/index.ts +2 -0
- package/dist/messages/pt/settings.json +1 -0
- package/dist/messages/pt/teams.json +3 -18
- package/dist/migrations/029_sample_accounts_outside_development.sql +55 -0
- package/dist/migrations/090_sample_data.sql +10 -0
- package/dist/routes/(auth)/signup/page.cc.d.ts +3 -8
- package/dist/routes/(auth)/signup/page.cc.d.ts.map +1 -1
- package/dist/routes/(auth)/signup/page.cc.js +7 -1
- package/dist/routes/(auth)/verify-email/page.d.ts.map +1 -1
- package/dist/routes/(auth)/verify-email/page.js +2 -1
- package/dist/routes/(public)/page.cc.d.ts +3 -0
- package/dist/routes/(public)/page.cc.d.ts.map +1 -0
- package/dist/routes/(public)/page.cc.js +3 -0
- package/dist/routes/_internal/area-access.cc.d.ts +21 -0
- package/dist/routes/_internal/area-access.cc.d.ts.map +1 -0
- package/dist/routes/_internal/area-access.cc.js +19 -0
- package/dist/routes/_internal/auth-layout.d.ts.map +1 -1
- package/dist/routes/_internal/auth-layout.js +3 -2
- package/dist/routes/_internal/dashboard-main-shared.d.ts +7 -0
- package/dist/routes/_internal/dashboard-main-shared.d.ts.map +1 -0
- package/dist/routes/_internal/dashboard-main-shared.js +49 -0
- package/dist/routes/_internal/default-auth-layout.d.ts.map +1 -1
- package/dist/routes/_internal/default-auth-layout.js +3 -2
- package/dist/routes/_internal/devtools-layout.cc.d.ts +3 -2
- package/dist/routes/_internal/devtools-layout.cc.d.ts.map +1 -1
- package/dist/routes/_internal/devtools-layout.cc.js +1 -1
- package/dist/routes/_internal/devtools-layout.d.ts +7 -2
- package/dist/routes/_internal/devtools-layout.d.ts.map +1 -1
- package/dist/routes/_internal/devtools-layout.js +4 -4
- package/dist/routes/_internal/entity-detail-route.cc.d.ts +8 -0
- package/dist/routes/_internal/entity-detail-route.cc.d.ts.map +1 -0
- package/dist/routes/_internal/entity-detail-route.cc.js +5 -0
- package/dist/routes/_internal/entity-edit-route.cc.d.ts +8 -0
- package/dist/routes/_internal/entity-edit-route.cc.d.ts.map +1 -0
- package/dist/routes/_internal/entity-edit-route.cc.js +5 -0
- package/dist/routes/_internal/entity-permission-layout.d.ts.map +1 -1
- package/dist/routes/_internal/entity-permission-layout.js +0 -7
- package/dist/routes/_internal/public-archive-route.d.ts +1 -1
- package/dist/routes/_internal/public-archive-route.d.ts.map +1 -1
- package/dist/routes/_internal/public-archive-route.js +8 -3
- package/dist/routes/_internal/public-item-route.cc.d.ts +5 -1
- package/dist/routes/_internal/public-item-route.cc.d.ts.map +1 -1
- package/dist/routes/_internal/public-item-route.cc.js +2 -1
- package/dist/routes/_internal/public-item-route.d.ts +7 -0
- package/dist/routes/_internal/public-item-route.d.ts.map +1 -1
- package/dist/routes/_internal/public-item-route.js +6 -1
- package/dist/routes/_internal/superadmin-layout.cc.d.ts +2 -1
- package/dist/routes/_internal/superadmin-layout.cc.d.ts.map +1 -1
- package/dist/routes/_internal/superadmin-layout.cc.js +1 -1
- package/dist/routes/_internal/superadmin-layout.d.ts +7 -2
- package/dist/routes/_internal/superadmin-layout.d.ts.map +1 -1
- package/dist/routes/_internal/superadmin-layout.js +6 -6
- package/dist/routes/_internal/suspended-route.d.ts +16 -0
- package/dist/routes/_internal/suspended-route.d.ts.map +1 -0
- package/dist/routes/_internal/suspended-route.js +7 -0
- package/dist/routes/api/auth/[...all]/route.d.ts.map +1 -1
- package/dist/routes/api/auth/[...all]/route.js +4 -12
- package/dist/routes/api/csp-report/route.d.ts.map +1 -1
- package/dist/routes/api/csp-report/route.js +2 -13
- package/dist/routes/api/devtools/config/entities/route.d.ts +2 -0
- package/dist/routes/api/devtools/config/entities/route.d.ts.map +1 -1
- package/dist/routes/api/devtools/config/entities/route.js +2 -0
- package/dist/routes/api/devtools/config/theme/route.d.ts +2 -0
- package/dist/routes/api/devtools/config/theme/route.d.ts.map +1 -1
- package/dist/routes/api/devtools/config/theme/route.js +2 -0
- package/dist/routes/api/devtools/tests/[...path]/route.d.ts +2 -0
- package/dist/routes/api/devtools/tests/[...path]/route.d.ts.map +1 -1
- package/dist/routes/api/devtools/tests/[...path]/route.js +2 -0
- package/dist/routes/api/devtools/tests/route.d.ts +2 -0
- package/dist/routes/api/devtools/tests/route.d.ts.map +1 -1
- package/dist/routes/api/devtools/tests/route.js +2 -0
- package/dist/routes/api/health/route.d.ts +2 -0
- package/dist/routes/api/health/route.d.ts.map +1 -1
- package/dist/routes/api/health/route.js +2 -0
- package/dist/routes/api/internal/user-metadata/route.d.ts +2 -0
- package/dist/routes/api/internal/user-metadata/route.d.ts.map +1 -1
- package/dist/routes/api/internal/user-metadata/route.js +2 -0
- package/dist/routes/api/mcp/route.d.ts +2 -0
- package/dist/routes/api/mcp/route.d.ts.map +1 -1
- package/dist/routes/api/mcp/route.js +9 -1
- package/dist/routes/api/superadmin/subscriptions/route.d.ts +2 -0
- package/dist/routes/api/superadmin/subscriptions/route.d.ts.map +1 -1
- package/dist/routes/api/superadmin/subscriptions/route.js +2 -0
- package/dist/routes/api/superadmin/teams/[teamId]/route.d.ts +2 -0
- package/dist/routes/api/superadmin/teams/[teamId]/route.d.ts.map +1 -1
- package/dist/routes/api/superadmin/teams/[teamId]/route.js +2 -0
- package/dist/routes/api/superadmin/teams/route.d.ts +2 -0
- package/dist/routes/api/superadmin/teams/route.d.ts.map +1 -1
- package/dist/routes/api/superadmin/teams/route.js +2 -0
- package/dist/routes/api/superadmin/users/[userId]/route.d.ts +2 -0
- package/dist/routes/api/superadmin/users/[userId]/route.d.ts.map +1 -1
- package/dist/routes/api/superadmin/users/[userId]/route.js +2 -0
- package/dist/routes/api/superadmin/users/route.d.ts +2 -0
- package/dist/routes/api/superadmin/users/route.d.ts.map +1 -1
- package/dist/routes/api/superadmin/users/route.js +2 -0
- package/dist/routes/api/user/delete-account/route.d.ts +2 -0
- package/dist/routes/api/user/delete-account/route.d.ts.map +1 -1
- package/dist/routes/api/user/delete-account/route.js +2 -0
- package/dist/routes/api/user/plan-flags/route.d.ts +2 -0
- package/dist/routes/api/user/plan-flags/route.d.ts.map +1 -1
- package/dist/routes/api/user/plan-flags/route.js +2 -0
- package/dist/routes/api/user/profile/route.d.ts +2 -0
- package/dist/routes/api/user/profile/route.d.ts.map +1 -1
- package/dist/routes/api/user/profile/route.js +4 -3
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.d.ts +2 -0
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.js +2 -0
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.d.ts +2 -0
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.js +2 -0
- package/dist/routes/api/v1/billing/cancel/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/cancel/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/cancel/route.js +2 -0
- package/dist/routes/api/v1/billing/change-plan/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/change-plan/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/change-plan/route.js +2 -0
- package/dist/routes/api/v1/billing/check-action/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/check-action/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/check-action/route.js +2 -0
- package/dist/routes/api/v1/billing/checkout/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/checkout/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/checkout/route.js +2 -0
- package/dist/routes/api/v1/billing/plans/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/plans/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/plans/route.js +2 -0
- package/dist/routes/api/v1/billing/portal/route.d.ts +2 -0
- package/dist/routes/api/v1/billing/portal/route.d.ts.map +1 -1
- package/dist/routes/api/v1/billing/portal/route.js +2 -0
- package/dist/routes/api/v1/blocks/[slug]/route.d.ts +2 -0
- package/dist/routes/api/v1/blocks/[slug]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/blocks/[slug]/route.js +2 -0
- package/dist/routes/api/v1/blocks/route.d.ts +2 -0
- package/dist/routes/api/v1/blocks/route.d.ts.map +1 -1
- package/dist/routes/api/v1/blocks/route.js +2 -0
- package/dist/routes/api/v1/blocks/validate/route.d.ts +2 -0
- package/dist/routes/api/v1/blocks/validate/route.d.ts.map +1 -1
- package/dist/routes/api/v1/blocks/validate/route.js +2 -0
- package/dist/routes/api/v1/devtools/blocks/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/blocks/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/blocks/route.js +2 -9
- package/dist/routes/api/v1/devtools/docs/route.d.ts +2 -0
- package/dist/routes/api/v1/devtools/docs/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/docs/route.js +2 -0
- package/dist/routes/api/v1/devtools/features/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/features/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/features/route.js +2 -9
- package/dist/routes/api/v1/devtools/flows/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/flows/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/flows/route.js +2 -9
- package/dist/routes/api/v1/devtools/scheduled-actions/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/scheduled-actions/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/scheduled-actions/route.js +2 -9
- package/dist/routes/api/v1/devtools/scheduled-actions/run/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/scheduled-actions/run/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/scheduled-actions/run/route.js +2 -9
- package/dist/routes/api/v1/devtools/testing/route.d.ts +2 -1
- package/dist/routes/api/v1/devtools/testing/route.d.ts.map +1 -1
- package/dist/routes/api/v1/devtools/testing/route.js +2 -9
- package/dist/routes/api/v1/media/[id]/route.d.ts +2 -0
- package/dist/routes/api/v1/media/[id]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media/[id]/route.js +2 -0
- package/dist/routes/api/v1/media/[id]/tags/route.d.ts +2 -0
- package/dist/routes/api/v1/media/[id]/tags/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media/[id]/tags/route.js +2 -0
- package/dist/routes/api/v1/media/check-duplicates/route.d.ts +2 -0
- package/dist/routes/api/v1/media/check-duplicates/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media/check-duplicates/route.js +2 -0
- package/dist/routes/api/v1/media/route.d.ts +2 -0
- package/dist/routes/api/v1/media/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media/route.js +2 -0
- package/dist/routes/api/v1/media/upload/route.d.ts +4 -1
- package/dist/routes/api/v1/media/upload/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media/upload/route.js +12 -2
- package/dist/routes/api/v1/media-tags/route.d.ts +2 -0
- package/dist/routes/api/v1/media-tags/route.d.ts.map +1 -1
- package/dist/routes/api/v1/media-tags/route.js +2 -0
- package/dist/routes/api/v1/post-categories/[id]/route.d.ts +2 -0
- package/dist/routes/api/v1/post-categories/[id]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/post-categories/[id]/route.js +2 -0
- package/dist/routes/api/v1/post-categories/route.d.ts +2 -0
- package/dist/routes/api/v1/post-categories/route.d.ts.map +1 -1
- package/dist/routes/api/v1/post-categories/route.js +2 -0
- package/dist/routes/api/v1/teams/[teamId]/members/route.d.ts.map +1 -1
- package/dist/routes/api/v1/teams/[teamId]/members/route.js +14 -12
- package/dist/routes/api/v1/teams/[teamId]/subscription/route.d.ts +2 -0
- package/dist/routes/api/v1/teams/[teamId]/subscription/route.d.ts.map +1 -1
- package/dist/routes/api/v1/teams/[teamId]/subscription/route.js +2 -0
- package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.d.ts +2 -0
- package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.js +2 -0
- package/dist/routes/api/v1/teams/switch/route.d.ts.map +1 -1
- package/dist/routes/api/v1/teams/switch/route.js +4 -1
- package/dist/routes/api/v1/users/[id]/route.d.ts.map +1 -1
- package/dist/routes/api/v1/users/[id]/route.js +3 -2
- package/dist/routes/api/v1/users/docs.md +34 -19
- package/dist/routes/api/v1/users/me/route.d.ts +6 -0
- package/dist/routes/api/v1/users/me/route.d.ts.map +1 -0
- package/dist/routes/api/v1/users/me/route.js +5 -0
- package/dist/routes/api/v1/users/presets.ts +2 -2
- package/dist/routes/dashboard/(main)/layout.cc.d.ts +4 -0
- package/dist/routes/dashboard/(main)/layout.cc.d.ts.map +1 -0
- package/dist/routes/dashboard/(main)/layout.cc.js +10 -0
- package/dist/routes/dashboard/(main)/layout.d.ts.map +1 -1
- package/dist/routes/dashboard/(main)/layout.js +3 -44
- package/dist/routes/dashboard/permission-denied/page.d.ts +1 -1
- package/dist/routes/dashboard/permission-denied/page.d.ts.map +1 -1
- package/dist/routes/dashboard/permission-denied/page.js +5 -1
- package/dist/routes/dashboard/settings/password/page.d.ts.map +1 -1
- package/dist/routes/dashboard/settings/password/page.js +10 -12
- package/dist/routes/devtools/config/page.js +1 -1
- package/dist/routes/devtools/layout.cc.d.ts.map +1 -1
- package/dist/routes/devtools/layout.cc.js +5 -1
- package/dist/routes/devtools/page.js +1 -1
- package/dist/routes/devtools/scheduled-actions/page.js +1 -1
- package/dist/routes/devtools/tests/[[...path]]/page.js +1 -1
- package/dist/routes/manifest.json +10 -0
- package/dist/routes/robots.d.ts +10 -0
- package/dist/routes/robots.d.ts.map +1 -0
- package/dist/routes/robots.js +10 -0
- package/dist/routes/superadmin/layout.cc.d.ts.map +1 -1
- package/dist/routes/superadmin/layout.cc.js +5 -1
- package/dist/routes/variants.json +12 -2
- package/dist/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/dist/templates/ci-workflows/github/cypress-smoke.yml +2 -1
- package/dist/templates/next.config.mjs +2 -29
- package/dist/templates/projects/blog/api/authors/[username]/route.ts +3 -0
- package/dist/templates/projects/blog/api/authors/route.ts +3 -0
- package/dist/templates/projects/blog/api/posts/public/route.ts +3 -0
- package/dist/templates/projects/starter/README.md +2 -0
- package/dist/templates/projects/starter/docs/public/01-overview/01-introduction.md +2 -0
- package/dist/templates/projects/starter/templates/dashboard/analytics/layout.tsx +14 -0
- package/dist/templates/proxy.ts +27 -9
- package/dist/templates/public/favicon.ico +0 -0
- package/dist/templates/public/uploads/README.md +5 -94
- package/migrations/029_sample_accounts_outside_development.sql +55 -0
- package/migrations/090_sample_data.sql +10 -0
- package/package.json +2 -2
- package/scripts/build/registry/__tests__/api-docs-colocated.test.mjs +3 -0
- package/scripts/build/registry/__tests__/billing-registry.test.mjs +50 -1
- package/scripts/build/registry/__tests__/block-registry.test.mjs +3 -0
- package/scripts/build/registry/__tests__/icons-discovery.test.mjs +3 -0
- package/scripts/build/registry/__tests__/quiet-console.mjs +17 -0
- package/scripts/build/registry/__tests__/safe-fs.test.mjs +3 -0
- package/scripts/build/registry/__tests__/team-roles.test.mjs +3 -0
- package/scripts/build/registry/discovery/permissions.test.mjs +3 -0
- package/scripts/build/registry/discovery/plugin-capabilities.mjs +2 -2
- package/scripts/build/registry/generators/billing-registry.mjs +7 -3
- package/scripts/build/registry/host/README.md +25 -1
- package/scripts/build/registry/host/__tests__/host-area-access.test.mjs +32 -0
- package/scripts/build/registry/host/__tests__/host-entities.test.mjs +32 -1
- package/scripts/build/registry/host/__tests__/host-plan.test.mjs +12 -2
- package/scripts/build/registry/host/__tests__/host-proxy-areas.test.mjs +72 -1
- package/scripts/build/registry/host/entity-routes.mjs +9 -3
- package/scripts/build/registry/host/proxy-areas.mjs +65 -2
- package/scripts/build/registry/host/static-imports.mjs +4 -0
- package/scripts/build/routes-manifest.mjs +13 -1
- package/scripts/db/run-migrations.mjs +30 -10
- package/scripts/db/sample-data.mjs +44 -0
- package/scripts/db/ssl-config.mjs +12 -1
- package/scripts/db/verify-theme-migrations.mjs +6 -0
- package/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/templates/ci-workflows/github/cypress-smoke.yml +2 -1
- package/templates/next.config.mjs +2 -29
- package/templates/projects/blog/api/authors/[username]/route.ts +3 -0
- package/templates/projects/blog/api/authors/route.ts +3 -0
- package/templates/projects/blog/api/posts/public/route.ts +3 -0
- package/templates/projects/starter/README.md +2 -0
- package/templates/projects/starter/docs/public/01-overview/01-introduction.md +2 -0
- package/templates/projects/starter/templates/dashboard/analytics/layout.tsx +14 -0
- package/templates/proxy.ts +27 -9
- package/templates/public/favicon.ico +0 -0
- package/templates/public/uploads/README.md +5 -94
- package/tests/jest/__mocks__/@nextsparkjs/registries/api-presets-registry.ts +2 -0
- package/tests/jest/__mocks__/@nextsparkjs/registries/mcp-registry.ts +2 -0
- package/dist/templates/projects/starter/public/brand/.gitkeep +0 -0
- package/dist/templates/public/uploads/.gitignore +0 -6
- package/dist/templates/public/uploads/temp/.gitkeep +0 -1
- package/templates/projects/starter/public/brand/.gitkeep +0 -0
- package/templates/public/uploads/.gitignore +0 -6
- package/templates/public/uploads/temp/.gitkeep +0 -1
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"contactUs": "Fale Conosco",
|
|
8
8
|
"unlimited": "Ilimitado",
|
|
9
9
|
"upgrade": "Fazer Upgrade",
|
|
10
|
-
"downgrade": "Fazer Downgrade",
|
|
11
10
|
"cancelSubscription": "Cancelar Assinatura",
|
|
12
11
|
"upgradeDescription": "Escolha o plano que melhor se adapta as suas necessidades",
|
|
13
12
|
"monthly": "Mensal",
|
|
@@ -159,6 +158,18 @@
|
|
|
159
158
|
"failed": "Falhou"
|
|
160
159
|
},
|
|
161
160
|
|
|
161
|
+
"changePlan": {
|
|
162
|
+
"title": "Alterar plano",
|
|
163
|
+
"from": "Plano atual",
|
|
164
|
+
"to": "Novo plano",
|
|
165
|
+
"upgradeDescription": "A cobrança será ajustada proporcionalmente ao período atual",
|
|
166
|
+
"downgradeDescription": "Os recursos existentes continuarão acessíveis, mas a criação de novos pode ser limitada",
|
|
167
|
+
"downgradeToFreeDescription": "Sua assinatura será cancelada e você passará para o plano gratuito",
|
|
168
|
+
"confirm": "Confirmar alteração",
|
|
169
|
+
"cancel": "Cancelar",
|
|
170
|
+
"confirming": "Alterando o plano..."
|
|
171
|
+
},
|
|
172
|
+
|
|
162
173
|
"quota": {
|
|
163
174
|
"limitReached": "Voce atingiu seu limite de {entity}",
|
|
164
175
|
"limitReachedDetail": "Seu plano atual nao permite mais {entity}. Faca upgrade para continuar crescendo.",
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"analytics": {
|
|
3
|
-
"title": "",
|
|
4
|
-
"benefit1": "",
|
|
5
|
-
"benefit2": "",
|
|
6
|
-
"benefit3": ""
|
|
3
|
+
"title": "Analytics Avançado",
|
|
4
|
+
"benefit1": "Métricas em tempo real",
|
|
5
|
+
"benefit2": "Construtor de relatórios personalizados",
|
|
6
|
+
"benefit3": "Exportar para PDF/CSV"
|
|
7
|
+
},
|
|
8
|
+
"webhooks": {
|
|
9
|
+
"title": "Webhooks",
|
|
10
|
+
"benefit1": "Callbacks HTTP para eventos",
|
|
11
|
+
"benefit2": "Templates de payload personalizados",
|
|
12
|
+
"benefit3": "Lógica de retry e logging"
|
|
13
|
+
},
|
|
14
|
+
"automation": {
|
|
15
|
+
"title": "Automação de Tarefas",
|
|
16
|
+
"benefit1": "Criação automática de tarefas",
|
|
17
|
+
"benefit2": "Ações agendadas",
|
|
18
|
+
"benefit3": "Gatilhos de workflow"
|
|
7
19
|
}
|
|
8
20
|
}
|
|
@@ -422,14 +422,6 @@ declare const _default: {
|
|
|
422
422
|
contactUs: string;
|
|
423
423
|
unlimited: string;
|
|
424
424
|
upgrade: string;
|
|
425
|
-
downgrade: {
|
|
426
|
-
title: string;
|
|
427
|
-
description: string;
|
|
428
|
-
resource_over: string;
|
|
429
|
-
policy: string;
|
|
430
|
-
confirm: string;
|
|
431
|
-
cancel: string;
|
|
432
|
-
};
|
|
433
425
|
cancelSubscription: string;
|
|
434
426
|
upgradeDescription: string;
|
|
435
427
|
monthly: string;
|
|
@@ -536,6 +528,14 @@ declare const _default: {
|
|
|
536
528
|
featureNotAvailable: string;
|
|
537
529
|
upgradeRequired: string;
|
|
538
530
|
};
|
|
531
|
+
downgrade: {
|
|
532
|
+
title: string;
|
|
533
|
+
description: string;
|
|
534
|
+
resource_over: string;
|
|
535
|
+
policy: string;
|
|
536
|
+
confirm: string;
|
|
537
|
+
cancel: string;
|
|
538
|
+
};
|
|
539
539
|
portal: {
|
|
540
540
|
manage: string;
|
|
541
541
|
loading: string;
|
|
@@ -563,6 +563,17 @@ declare const _default: {
|
|
|
563
563
|
pending: string;
|
|
564
564
|
failed: string;
|
|
565
565
|
};
|
|
566
|
+
changePlan: {
|
|
567
|
+
title: string;
|
|
568
|
+
from: string;
|
|
569
|
+
to: string;
|
|
570
|
+
upgradeDescription: string;
|
|
571
|
+
downgradeDescription: string;
|
|
572
|
+
downgradeToFreeDescription: string;
|
|
573
|
+
confirm: string;
|
|
574
|
+
cancel: string;
|
|
575
|
+
confirming: string;
|
|
576
|
+
};
|
|
566
577
|
quota: {
|
|
567
578
|
limitReached: string;
|
|
568
579
|
limitReachedDetail: string;
|
|
@@ -598,6 +609,8 @@ declare const _default: {
|
|
|
598
609
|
signingOut: string;
|
|
599
610
|
};
|
|
600
611
|
readonly common: {
|
|
612
|
+
soon: string;
|
|
613
|
+
comingSoon: string;
|
|
601
614
|
navigation: {
|
|
602
615
|
dashboard: string;
|
|
603
616
|
settings: string;
|
|
@@ -1238,6 +1251,7 @@ declare const _default: {
|
|
|
1238
1251
|
home: string;
|
|
1239
1252
|
};
|
|
1240
1253
|
sidebar: {
|
|
1254
|
+
close: string;
|
|
1241
1255
|
open: string;
|
|
1242
1256
|
label: string;
|
|
1243
1257
|
};
|
|
@@ -1356,6 +1370,26 @@ declare const _default: {
|
|
|
1356
1370
|
idCopied: string;
|
|
1357
1371
|
};
|
|
1358
1372
|
};
|
|
1373
|
+
readonly features: {
|
|
1374
|
+
analytics: {
|
|
1375
|
+
title: string;
|
|
1376
|
+
benefit1: string;
|
|
1377
|
+
benefit2: string;
|
|
1378
|
+
benefit3: string;
|
|
1379
|
+
};
|
|
1380
|
+
webhooks: {
|
|
1381
|
+
title: string;
|
|
1382
|
+
benefit1: string;
|
|
1383
|
+
benefit2: string;
|
|
1384
|
+
benefit3: string;
|
|
1385
|
+
};
|
|
1386
|
+
automation: {
|
|
1387
|
+
title: string;
|
|
1388
|
+
benefit1: string;
|
|
1389
|
+
benefit2: string;
|
|
1390
|
+
benefit3: string;
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1359
1393
|
readonly footer: {
|
|
1360
1394
|
product: string;
|
|
1361
1395
|
features: string;
|
|
@@ -1390,6 +1424,11 @@ declare const _default: {
|
|
|
1390
1424
|
title: string;
|
|
1391
1425
|
subtitle: string;
|
|
1392
1426
|
};
|
|
1427
|
+
auth: {
|
|
1428
|
+
signIn: string;
|
|
1429
|
+
createAccount: string;
|
|
1430
|
+
goToDashboard: string;
|
|
1431
|
+
};
|
|
1393
1432
|
};
|
|
1394
1433
|
readonly navigation: {
|
|
1395
1434
|
home: string;
|
|
@@ -1893,6 +1932,7 @@ declare const _default: {
|
|
|
1893
1932
|
refunded: string;
|
|
1894
1933
|
};
|
|
1895
1934
|
pagination: {
|
|
1935
|
+
page: string;
|
|
1896
1936
|
showing: string;
|
|
1897
1937
|
previous: string;
|
|
1898
1938
|
next: string;
|
|
@@ -2129,18 +2169,6 @@ declare const _default: {
|
|
|
2129
2169
|
readonly teams: {
|
|
2130
2170
|
title: string;
|
|
2131
2171
|
description: string;
|
|
2132
|
-
entity: {
|
|
2133
|
-
description: string;
|
|
2134
|
-
plural: string;
|
|
2135
|
-
};
|
|
2136
|
-
fields: {
|
|
2137
|
-
name: string;
|
|
2138
|
-
slug: string;
|
|
2139
|
-
description: string;
|
|
2140
|
-
email: string;
|
|
2141
|
-
role: string;
|
|
2142
|
-
joinedAt: string;
|
|
2143
|
-
};
|
|
2144
2172
|
types: {
|
|
2145
2173
|
personal: string;
|
|
2146
2174
|
work: string;
|
|
@@ -2157,6 +2185,10 @@ declare const _default: {
|
|
|
2157
2185
|
member: string;
|
|
2158
2186
|
viewer: string;
|
|
2159
2187
|
};
|
|
2188
|
+
entity: {
|
|
2189
|
+
description: string;
|
|
2190
|
+
plural: string;
|
|
2191
|
+
};
|
|
2160
2192
|
actions: {
|
|
2161
2193
|
create: string;
|
|
2162
2194
|
creating: string;
|
|
@@ -2230,6 +2262,7 @@ declare const _default: {
|
|
|
2230
2262
|
joined: string;
|
|
2231
2263
|
};
|
|
2232
2264
|
invitations: {
|
|
2265
|
+
expired: string;
|
|
2233
2266
|
title: string;
|
|
2234
2267
|
description: string;
|
|
2235
2268
|
pending: string;
|
|
@@ -2247,6 +2280,7 @@ declare const _default: {
|
|
|
2247
2280
|
cancelError: string;
|
|
2248
2281
|
};
|
|
2249
2282
|
invite: {
|
|
2283
|
+
limitReached: string;
|
|
2250
2284
|
title: string;
|
|
2251
2285
|
description: string;
|
|
2252
2286
|
emailLabel: string;
|
|
@@ -2274,11 +2308,6 @@ declare const _default: {
|
|
|
2274
2308
|
billing: string;
|
|
2275
2309
|
danger: string;
|
|
2276
2310
|
};
|
|
2277
|
-
messages: {
|
|
2278
|
-
created: string;
|
|
2279
|
-
loading: string;
|
|
2280
|
-
memberInvited: string;
|
|
2281
|
-
};
|
|
2282
2311
|
errors: {
|
|
2283
2312
|
notFound: string;
|
|
2284
2313
|
notMember: string;
|
|
@@ -2292,6 +2321,20 @@ declare const _default: {
|
|
|
2292
2321
|
title: string;
|
|
2293
2322
|
description: string;
|
|
2294
2323
|
};
|
|
2324
|
+
fields: {
|
|
2325
|
+
name: string;
|
|
2326
|
+
slug: string;
|
|
2327
|
+
description: string;
|
|
2328
|
+
email: string;
|
|
2329
|
+
role: string;
|
|
2330
|
+
joinedAt: string;
|
|
2331
|
+
};
|
|
2332
|
+
messages: {
|
|
2333
|
+
cancelling: string;
|
|
2334
|
+
created: string;
|
|
2335
|
+
loading: string;
|
|
2336
|
+
memberInvited: string;
|
|
2337
|
+
};
|
|
2295
2338
|
};
|
|
2296
2339
|
readonly validation: {
|
|
2297
2340
|
email: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,wBAsBU"}
|
|
@@ -8,6 +8,7 @@ import devtools from "./devtools.json";
|
|
|
8
8
|
import docs from "./docs.json";
|
|
9
9
|
import email from "./email.json";
|
|
10
10
|
import entities from "./entities.json";
|
|
11
|
+
import features from "./features.json";
|
|
11
12
|
import footer from "./footer.json";
|
|
12
13
|
import home from "./home.json";
|
|
13
14
|
import navigation from "./navigation.json";
|
|
@@ -29,6 +30,7 @@ var pt_default = {
|
|
|
29
30
|
docs,
|
|
30
31
|
email,
|
|
31
32
|
entities,
|
|
33
|
+
features,
|
|
32
34
|
footer,
|
|
33
35
|
home,
|
|
34
36
|
navigation,
|
|
@@ -8,6 +8,7 @@ import devtools from './devtools.json'
|
|
|
8
8
|
import docs from './docs.json'
|
|
9
9
|
import email from './email.json'
|
|
10
10
|
import entities from './entities.json'
|
|
11
|
+
import features from './features.json'
|
|
11
12
|
import footer from './footer.json'
|
|
12
13
|
import home from './home.json'
|
|
13
14
|
import navigation from './navigation.json'
|
|
@@ -30,6 +31,7 @@ export default {
|
|
|
30
31
|
docs,
|
|
31
32
|
email,
|
|
32
33
|
entities,
|
|
34
|
+
features,
|
|
33
35
|
footer,
|
|
34
36
|
home,
|
|
35
37
|
navigation,
|
|
@@ -2,20 +2,6 @@
|
|
|
2
2
|
"title": "Equipes",
|
|
3
3
|
"description": "Gerencie suas equipes e colaboracoes",
|
|
4
4
|
|
|
5
|
-
"entity": {
|
|
6
|
-
"description": "Gerencie suas equipes, membros e convites",
|
|
7
|
-
"plural": "Equipes"
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
"fields": {
|
|
11
|
-
"name": "Nome",
|
|
12
|
-
"slug": "URL",
|
|
13
|
-
"description": "Descricao",
|
|
14
|
-
"email": "Email",
|
|
15
|
-
"role": "Funcao",
|
|
16
|
-
"joinedAt": "Data de entrada"
|
|
17
|
-
},
|
|
18
|
-
|
|
19
5
|
"types": {
|
|
20
6
|
"personal": "Pessoal",
|
|
21
7
|
"work": "Equipe de Trabalho"
|
|
@@ -120,6 +106,7 @@
|
|
|
120
106
|
},
|
|
121
107
|
|
|
122
108
|
"invitations": {
|
|
109
|
+
"expired": "Expirado",
|
|
123
110
|
"title": "Convites Pendentes",
|
|
124
111
|
"description": "Convites aguardando resposta",
|
|
125
112
|
"pending": "Pendente",
|
|
@@ -138,6 +125,7 @@
|
|
|
138
125
|
},
|
|
139
126
|
|
|
140
127
|
"invite": {
|
|
128
|
+
"limitReached": "Limite de membros da equipe atingido ({limit})",
|
|
141
129
|
"title": "Convidar Membro",
|
|
142
130
|
"description": "Convide alguem para participar desta equipe",
|
|
143
131
|
"emailLabel": "Email",
|
|
@@ -168,10 +156,6 @@
|
|
|
168
156
|
"danger": "Zona de Perigo"
|
|
169
157
|
},
|
|
170
158
|
|
|
171
|
-
"messages": {
|
|
172
|
-
"loading": "Carregando..."
|
|
173
|
-
},
|
|
174
|
-
|
|
175
159
|
"errors": {
|
|
176
160
|
"notFound": "Equipe nao encontrada",
|
|
177
161
|
"notMember": "Voce nao e membro desta equipe",
|
|
@@ -197,6 +181,7 @@
|
|
|
197
181
|
},
|
|
198
182
|
|
|
199
183
|
"messages": {
|
|
184
|
+
"cancelling": "Cancelando...",
|
|
200
185
|
"created": "Equipe criada com sucesso",
|
|
201
186
|
"loading": "Carregando equipes...",
|
|
202
187
|
"memberInvited": "Membro convidado com sucesso"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
-- Migration: 029_sample_accounts_outside_development.sql
|
|
2
|
+
-- Description: sample accounts keep no usable credentials outside development
|
|
3
|
+
--
|
|
4
|
+
-- Sample data (090_sample_data.sql and the projects' *sample_data* files) is
|
|
5
|
+
-- only applied by an explicit development opt-in (`nextspark db:seed`,
|
|
6
|
+
-- `--sample-data` or NEXTSPARK_SEED_SAMPLE_DATA=1). Databases migrated before
|
|
7
|
+
-- that may still hold the sample accounts. This migration finds them by the
|
|
8
|
+
-- sample password, never by name, so a renamed account is found and an account
|
|
9
|
+
-- whose password was changed is left alone; for each one it:
|
|
10
|
+
-- - removes the sample password (its "credential" account row),
|
|
11
|
+
-- - removes its sessions,
|
|
12
|
+
-- - deactivates its API keys (status 'inactive'; deleting them would delete
|
|
13
|
+
-- their api_audit_log rows),
|
|
14
|
+
-- - sets its global role to 'member' (027's trigger then removes it from the
|
|
15
|
+
-- System Admin Team, as for any user who loses that role).
|
|
16
|
+
-- It also removes the sample sessions and deactivates the sample API key by
|
|
17
|
+
-- their fixed values, whoever owns them now. Nothing else is changed.
|
|
18
|
+
--
|
|
19
|
+
-- It runs once, everywhere, except in a development run that opted into sample
|
|
20
|
+
-- data (the runner sets nextspark.seed_sample_data to 'on' then), where those
|
|
21
|
+
-- accounts are wanted. To keep using one of them deliberately, give it a new
|
|
22
|
+
-- password before upgrading; to restore one afterwards, set its role back and
|
|
23
|
+
-- reset its password.
|
|
24
|
+
|
|
25
|
+
DO $$
|
|
26
|
+
DECLARE
|
|
27
|
+
sample_passwords CONSTANT TEXT[] := ARRAY[
|
|
28
|
+
'22de14d5472248ed0bece911df908b2a:d29576424798ba6845d348a3767c0b0f38a00f2aca461b3b1d34b99a93cab06c86774c6edb183e6d6ec47457649b032a49a7b60a48f6f4f7fbbc4ea40258f19f',
|
|
29
|
+
'3db9e98e2b4d3caca97fdf2783791cbc:34b293de615caf277a237773208858e960ea8aa10f1f5c5c309b632f192cac34d52ceafbd338385616f4929e4b1b6c055b67429c6722ffdb80b01d9bf4764866'
|
|
30
|
+
];
|
|
31
|
+
sample_session_tokens CONSTANT TEXT[] := ARRAY['tmt_superadmin_session_token_001', 'tmt_developer_session_token_001'];
|
|
32
|
+
sample_key_hashes CONSTANT TEXT[] := ARRAY[
|
|
33
|
+
'205f13ae4d2e18df417e61123bb84030c124fcb5013699046379ae1b5ec04324',
|
|
34
|
+
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
|
35
|
+
];
|
|
36
|
+
sample_users TEXT[];
|
|
37
|
+
BEGIN
|
|
38
|
+
IF current_setting('nextspark.seed_sample_data', true) = 'on' THEN
|
|
39
|
+
RAISE NOTICE 'Sample accounts: kept (development run with sample data).';
|
|
40
|
+
RETURN;
|
|
41
|
+
END IF;
|
|
42
|
+
|
|
43
|
+
SELECT COALESCE(array_agg(DISTINCT "userId"), '{}') INTO sample_users
|
|
44
|
+
FROM "account"
|
|
45
|
+
WHERE "providerId" = 'credential' AND "password" = ANY (sample_passwords);
|
|
46
|
+
|
|
47
|
+
DELETE FROM "account" WHERE "providerId" = 'credential' AND "password" = ANY (sample_passwords);
|
|
48
|
+
DELETE FROM "session" WHERE "userId" = ANY (sample_users) OR token = ANY (sample_session_tokens);
|
|
49
|
+
UPDATE "api_key" SET status = 'inactive', "updatedAt" = now()
|
|
50
|
+
WHERE status IS DISTINCT FROM 'inactive' AND ("userId" = ANY (sample_users) OR "keyHash" = ANY (sample_key_hashes));
|
|
51
|
+
UPDATE "users" SET role = 'member', "updatedAt" = now()
|
|
52
|
+
WHERE id = ANY (sample_users) AND role <> 'member';
|
|
53
|
+
|
|
54
|
+
RAISE NOTICE 'Sample accounts: % disabled (no password, sessions or active API keys; role member).', cardinality(sample_users);
|
|
55
|
+
END $$;
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
-- Theme-specific demo data (TMT.dev users, companies, invoices) is in:
|
|
8
8
|
-- migrations/090_demo_users_teams.sql
|
|
9
9
|
|
|
10
|
+
-- Only a development run that asked for sample data applies this file (see
|
|
11
|
+
-- scripts/db/sample-data.mjs); anything else that runs it, such as a tool that
|
|
12
|
+
-- applies every core .sql file in order, fails here instead of creating these accounts.
|
|
13
|
+
DO $$
|
|
14
|
+
BEGIN
|
|
15
|
+
IF current_setting('nextspark.seed_sample_data', true) IS DISTINCT FROM 'on' THEN
|
|
16
|
+
RAISE EXCEPTION 'Sample data is applied only by `pnpm db:seed` (or NEXTSPARK_SEED_SAMPLE_DATA=1) outside production. If you ran that, the session setting it relies on was lost: a transaction-mode pooler (PgBouncer, Supavisor on port 6543) drops it, so point MIGRATE_DATABASE_URL at a direct connection.';
|
|
17
|
+
END IF;
|
|
18
|
+
END $$;
|
|
19
|
+
|
|
10
20
|
-- ============================================
|
|
11
21
|
-- STEP 1: CREATE CORE TEST USERS
|
|
12
22
|
-- ============================================
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Same page and metadata; `dynamic = 'force-dynamic'` is left out because Next.js fails a build that
|
|
5
|
-
* has it under Cache Components. The page reads the database and calls redirect(); under Cache Components
|
|
6
|
-
* the group or root layout puts it behind Suspense, so the redirect streams per request, after the static shell.
|
|
7
|
-
*/
|
|
8
|
-
export { default, metadata } from './page';
|
|
1
|
+
import { metadata } from './page';
|
|
2
|
+
export { metadata };
|
|
3
|
+
export default function SignupPageCc(): import("react/jsx-runtime").JSX.Element;
|
|
9
4
|
//# sourceMappingURL=page.cc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.cc.d.ts","sourceRoot":"","sources":["../../../../src/routes/(auth)/signup/page.cc.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.cc.d.ts","sourceRoot":"","sources":["../../../../src/routes/(auth)/signup/page.cc.tsx"],"names":[],"mappings":"AAUA,OAAmB,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB,MAAM,CAAC,OAAO,UAAU,YAAY,4CAMnC"}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from "react";
|
|
3
|
+
import SignupPage, { metadata } from "./page.js";
|
|
4
|
+
export { metadata };
|
|
5
|
+
export default function SignupPageCc() {
|
|
6
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(SignupPage, {}) });
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/routes/(auth)/verify-email/page.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../src/routes/(auth)/verify-email/page.tsx"],"names":[],"mappings":"AAgLA,iBAAS,eAAe,4CAUvB;AAGD,eAAe,eAAe,CAAA"}
|
|
@@ -7,6 +7,7 @@ import { Button } from "@nextsparkjs/core/components/ui/button";
|
|
|
7
7
|
import { Alert, AlertDescription } from "@nextsparkjs/core/components/ui/alert";
|
|
8
8
|
import { sel } from "@nextsparkjs/core/selectors/auth";
|
|
9
9
|
import { withBasePath } from "@nextsparkjs/core/lib/base-path";
|
|
10
|
+
import { VERIFY_FROM_UI_HEADER } from "@nextsparkjs/core/lib/api/client-headers";
|
|
10
11
|
function VerifyEmailContent() {
|
|
11
12
|
const searchParams = useSearchParams();
|
|
12
13
|
const router = useRouter();
|
|
@@ -26,7 +27,7 @@ function VerifyEmailContent() {
|
|
|
26
27
|
method: "GET",
|
|
27
28
|
credentials: "include",
|
|
28
29
|
headers: {
|
|
29
|
-
|
|
30
|
+
[VERIFY_FROM_UI_HEADER]: "true"
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
33
|
if (!response.ok) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.cc.d.ts","sourceRoot":"","sources":["../../../src/routes/(public)/page.cc.tsx"],"names":[],"mappings":";AASA,wBAAgD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-segment role check of /superadmin and /devtools for a host with `cacheComponents` on (the `access` of the
|
|
3
|
+
* area layouts' variants in ../variants.json). Same rules and same check as `area-access`; only where it runs moves.
|
|
4
|
+
*
|
|
5
|
+
* `withSuperadminAccess(Page)` in `area-access` awaits the session before it returns the page, so the segment has no
|
|
6
|
+
* Suspense boundary between it and request-time work: a navigation into it would wait, and the dev server reports it
|
|
7
|
+
* ("Could not validate that a segment in your UI has instant navigation ... dropped segment"). Here the segment is a
|
|
8
|
+
* Suspense boundary (fallback: nothing) around the check, and the page or layout renders inside it only once the
|
|
9
|
+
* check has passed: no session -> /login, a session without the role -> /dashboard?error=access_denied, and the
|
|
10
|
+
* segment's content is never rendered for either. What the prerendered shell holds of the segment is the empty
|
|
11
|
+
* fallback.
|
|
12
|
+
*
|
|
13
|
+
* `generateMetadata` and Route Handlers keep the checks of `area-access` (nothing to prerender there).
|
|
14
|
+
*/
|
|
15
|
+
import { type ComponentType } from 'react';
|
|
16
|
+
export { withSuperadminMetadata, withDevtoolsMetadata, withSuperadminRouteAccess, withDevtoolsRouteAccess } from './area-access';
|
|
17
|
+
/** A page or layout under /superadmin, rendered only for superadmin and developer sessions, inside its own boundary. */
|
|
18
|
+
export declare function withSuperadminAccess<P extends object>(Segment: ComponentType<P>): (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/** A page or layout under /devtools, rendered only for developer sessions, inside its own boundary. */
|
|
20
|
+
export declare function withDevtoolsAccess<P extends object>(Segment: ComponentType<P>): (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=area-access.cc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area-access.cc.d.ts","sourceRoot":"","sources":["../../../src/routes/_internal/area-access.cc.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAGpD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAgBhI,wHAAwH;AACxH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,yDAE/E;AAED,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,yDAE7E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from "react";
|
|
3
|
+
import { requireAreaAccess } from "./area-access.js";
|
|
4
|
+
export { withSuperadminMetadata, withDevtoolsMetadata, withSuperadminRouteAccess, withDevtoolsRouteAccess } from "./area-access.js";
|
|
5
|
+
function withAreaAccess(area, Segment) {
|
|
6
|
+
async function AreaSegmentGate(props) {
|
|
7
|
+
await requireAreaAccess(area);
|
|
8
|
+
return /* @__PURE__ */ jsx(Segment, { ...props });
|
|
9
|
+
}
|
|
10
|
+
return function AreaSegment(props) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(AreaSegmentGate, { ...props }) });
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export function withSuperadminAccess(Segment) {
|
|
15
|
+
return withAreaAccess("superadmin", Segment);
|
|
16
|
+
}
|
|
17
|
+
export function withDevtoolsAccess(Segment) {
|
|
18
|
+
return withAreaAccess("devtools", Segment);
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-layout.d.ts","sourceRoot":"","sources":["../../../src/routes/_internal/auth-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"auth-layout.d.ts","sourceRoot":"","sources":["../../../src/routes/_internal/auth-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAMpC,eAAO,MAAM,eAAe,EAAE,QAU7B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,QAA0B,CAAA;AAEjD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,IAC1C,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,sDAQzF"}
|
|
@@ -2,10 +2,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { NextIntlClientProvider } from "next-intl";
|
|
3
3
|
import { getMessages } from "next-intl/server";
|
|
4
4
|
import { selectMessages } from "@nextsparkjs/core/lib/i18n/client-messages";
|
|
5
|
+
import { APP_NAME } from "@nextsparkjs/core/lib/config/public-config-client";
|
|
5
6
|
export const defaultMetadata = {
|
|
6
7
|
title: {
|
|
7
|
-
default:
|
|
8
|
-
template:
|
|
8
|
+
default: `Authentication | ${APP_NAME}`,
|
|
9
|
+
template: `%s | ${APP_NAME}`
|
|
9
10
|
},
|
|
10
11
|
description: "Sign in or create an account to access our platform",
|
|
11
12
|
robots: {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The dashboard shell with the navigation of every entity the project registers. */
|
|
2
|
+
export declare function MainDashboardShell({ children }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/** Sends a request for an entity route the signed-in user may not use to the permission-denied page. */
|
|
6
|
+
export declare function enforceEntityPermission(): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=dashboard-main-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-main-shared.d.ts","sourceRoot":"","sources":["../../../src/routes/_internal/dashboard-main-shared.tsx"],"names":[],"mappings":"AA8CA,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAO7E;AAED,wGAAwG;AACxG,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAuB7D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { headers } from "next/headers";
|
|
3
|
+
import { redirect } from "next/navigation";
|
|
4
|
+
import { DashboardShell } from "@nextsparkjs/core/components/dashboard/layouts/DashboardShell";
|
|
5
|
+
import { serializeEntityConfig } from "@nextsparkjs/core/lib/entities/serialization";
|
|
6
|
+
import { setEntityRegistry } from "@nextsparkjs/core/lib/entities/queries";
|
|
7
|
+
import { checkPermission } from "@nextsparkjs/core/lib/permissions/check";
|
|
8
|
+
import { getDashboardPermissionContext } from "@nextsparkjs/core/lib/auth/request-session";
|
|
9
|
+
import { isValidPermission } from "@nextsparkjs/core/lib/permissions/init";
|
|
10
|
+
import { ENTITY_REGISTRY, ENTITY_METADATA } from "@nextsparkjs/registries/entity-registry";
|
|
11
|
+
setEntityRegistry(ENTITY_REGISTRY, ENTITY_METADATA);
|
|
12
|
+
function parseEntityFromPathname(pathname) {
|
|
13
|
+
const match = pathname.match(/^\/dashboard\/([^/]+)(?:\/(.*))?$/);
|
|
14
|
+
if (!match) return null;
|
|
15
|
+
const entity = match[1];
|
|
16
|
+
const rest = match[2] || "";
|
|
17
|
+
if (rest === "" || rest === "/") return { entity, action: "list" };
|
|
18
|
+
if (rest === "create") return { entity, action: "create" };
|
|
19
|
+
if (rest.match(/^[^/]+\/edit$/)) return { entity, action: "update" };
|
|
20
|
+
if (rest.match(/^[^/]+$/)) return { entity, action: "read" };
|
|
21
|
+
return { entity, action: "read" };
|
|
22
|
+
}
|
|
23
|
+
function isEntityConfig(entity) {
|
|
24
|
+
return "slug" in entity;
|
|
25
|
+
}
|
|
26
|
+
export function MainDashboardShell({ children }) {
|
|
27
|
+
const allEntities = Object.values(ENTITY_REGISTRY).map((entry) => entry.config);
|
|
28
|
+
const entities = allEntities.filter(isEntityConfig);
|
|
29
|
+
const serializedEntities = entities.map(serializeEntityConfig);
|
|
30
|
+
return /* @__PURE__ */ jsx(DashboardShell, { entities: serializedEntities, children });
|
|
31
|
+
}
|
|
32
|
+
export async function enforceEntityPermission() {
|
|
33
|
+
const headersList = await headers();
|
|
34
|
+
const pathname = headersList.get("x-pathname") || "";
|
|
35
|
+
const { userId, teamId } = await getDashboardPermissionContext();
|
|
36
|
+
if (userId && teamId && pathname) {
|
|
37
|
+
const parsed = parseEntityFromPathname(pathname);
|
|
38
|
+
if (parsed) {
|
|
39
|
+
const { entity, action } = parsed;
|
|
40
|
+
const permission = `${entity}.${action}`;
|
|
41
|
+
if (isValidPermission(`${entity}.list`)) {
|
|
42
|
+
const hasPermission = await checkPermission(userId, teamId, permission);
|
|
43
|
+
if (!hasPermission) {
|
|
44
|
+
redirect(`/dashboard/permission-denied?entity=${entity}&action=${action}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|