better-supabase 0.52.0 → 0.53.0
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/{access-sql-DVntbgJf.js → access-sql-DH2LbcQe.js} +2 -1
- package/dist/{adapter-iCMh_XnC.js → adapter-CJa5ys5O.js} +46 -11
- package/dist/{agents-C_VAKJ_s.d.ts → agents-BrLBg0gC.d.ts} +2 -2
- package/dist/{agents-CkRsaxAr.js → agents-CEna9P0O.js} +1 -1
- package/dist/{ai-cache-DV8O7Kav.js → ai-cache-CqNHapwf.js} +1 -1
- package/dist/{ai-files-BD6YE9TZ.js → ai-files-C8n2QKlX.js} +1 -1
- package/dist/{ai-schedules-BMM-ZHOC.d.ts → ai-schedules-Dfbcor59.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +1 -1
- package/dist/ai-sdk/agents/index.js +1 -1
- package/dist/ai-sdk/cache/index.js +1 -1
- package/dist/ai-sdk/embeddings/index.js +1 -1
- package/dist/ai-sdk/files/index.js +1 -1
- package/dist/ai-sdk/workflow/index.d.ts +1 -1
- package/dist/ai-sdk/workflow/index.js +1 -1
- package/dist/{api-YjQpioTT.d.ts → api-CGYctFBt.d.ts} +1 -1
- package/dist/{api-keys-mfwDRWHv.d.ts → api-keys-COJAXdGF.d.ts} +1 -1
- package/dist/{app-tables-D2uN1feV.d.ts → app-tables-CZLNOXeA.d.ts} +1 -1
- package/dist/{approvals-BSweHvij.js → approvals-DCLl96Xf.js} +1 -1
- package/dist/astro/index.d.ts +3 -3
- package/dist/astro/index.js +2 -2
- package/dist/{attachments-DqQ61LfS.js → attachments-Djs8uyat.js} +1 -1
- package/dist/{auth-reply-CgXF76sz.js → auth-reply-CimDH13K.js} +4 -1
- package/dist/{authorization-hk0TAA6-.d.ts → authorization-UYejwQsk.d.ts} +70 -9
- package/dist/{automations-CrdULEET.js → automations-DChuvKPy.js} +1 -1
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-CEN9Us3B.d.ts → bind-D4qLTlY4.d.ts} +11 -7
- package/dist/{block-env-CvQj4rbD.d.ts → block-env-BLBr90is.d.ts} +4 -4
- package/dist/{block-hooks-BIRJauOk.js → block-hooks-Bd5bRM9B.js} +1 -0
- package/dist/{block-subjects-SKkp3d_Q.js → block-subjects-Cvd-RaMY.js} +2 -2
- package/dist/{block-tables-BR6Ckm_1.d.ts → block-tables-BkgafSZd.d.ts} +1 -1
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/access-requests/index.js +10 -10
- package/dist/blocks/accounting/index.d.ts +1 -1
- package/dist/blocks/accounting/index.js +2 -2
- package/dist/blocks/acknowledgements/index.d.ts +1 -1
- package/dist/blocks/acknowledgements/index.js +1 -1
- package/dist/blocks/activities/index.d.ts +2 -2
- package/dist/blocks/activities/index.js +2 -2
- package/dist/blocks/advisories/index.d.ts +1 -1
- package/dist/blocks/advisories/index.js +16 -16
- package/dist/blocks/agent-checkout/index.d.ts +1 -1
- package/dist/blocks/agent-checkout/index.js +11 -11
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/agents/index.js +11 -11
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.js +3 -3
- package/dist/blocks/ai-chat/index.d.ts +1 -1
- package/dist/blocks/ai-chat/index.js +10 -10
- package/dist/blocks/ai-evals/index.d.ts +1 -1
- package/dist/blocks/ai-evals/index.js +3 -3
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-files/index.js +3 -3
- package/dist/blocks/ai-guardrails/index.d.ts +1 -1
- package/dist/blocks/ai-guardrails/index.js +5 -5
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.js +8 -8
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/ai-schedules/index.js +3 -3
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/announcements/index.js +8 -8
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/api-keys/index.js +1 -1
- package/dist/blocks/appraisals/index.d.ts +1 -1
- package/dist/blocks/appraisals/index.js +12 -12
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/approvals/index.js +2 -2
- package/dist/blocks/assets/index.d.ts +2 -2
- package/dist/blocks/assets/index.js +2 -2
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/assignment/index.js +2 -2
- package/dist/blocks/attachments/index.d.ts +5 -5
- package/dist/blocks/attachments/index.js +2 -2
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/audit/index.js +1 -1
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/automations/index.js +12 -12
- package/dist/blocks/banking/index.d.ts +1 -1
- package/dist/blocks/banking/index.js +2 -2
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billable-time/index.js +2 -2
- package/dist/blocks/billing/index.d.ts +3 -3
- package/dist/blocks/billing/index.js +1 -1
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bookings/index.js +1 -1
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/bulk/index.js +5 -5
- package/dist/blocks/calendar/index.d.ts +3 -3
- package/dist/blocks/calendar/index.js +1 -1
- package/dist/blocks/care/index.d.ts +27 -27
- package/dist/blocks/care/index.js +37 -46
- package/dist/blocks/care-plans/index.d.ts +3 -3
- package/dist/blocks/care-plans/index.js +2 -2
- package/dist/blocks/cases/index.d.ts +3 -3
- package/dist/blocks/cases/index.js +2 -2
- package/dist/blocks/catalog/index.d.ts +2 -2
- package/dist/blocks/catalog/index.js +2 -2
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/channels/index.js +7 -7
- package/dist/blocks/clinical-decision-support/index.d.ts +1 -1
- package/dist/blocks/clinical-decision-support/index.js +11 -11
- package/dist/blocks/cms/index.d.ts +5 -5
- package/dist/blocks/cms/index.js +7 -7
- package/dist/blocks/collaboration/index.d.ts +6 -6
- package/dist/blocks/collaboration/index.js +8 -8
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/collections/index.js +10 -10
- package/dist/blocks/comments/index.d.ts +2 -2
- package/dist/blocks/comments/index.js +1 -1
- package/dist/blocks/commerce/index.d.ts +5 -5
- package/dist/blocks/commerce/index.js +7 -7
- package/dist/blocks/commissions/index.d.ts +1 -1
- package/dist/blocks/commissions/index.js +11 -11
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/compliance/index.js +11 -11
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/connectors/index.js +11 -11
- package/dist/blocks/consents/index.d.ts +2 -2
- package/dist/blocks/consents/index.js +2 -2
- package/dist/blocks/contacts/index.d.ts +2 -2
- package/dist/blocks/contacts/index.js +2 -2
- package/dist/blocks/content/index.d.ts +2 -2
- package/dist/blocks/content/index.js +2 -2
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/contracts/index.js +12 -12
- package/dist/blocks/courses/index.d.ts +3 -3
- package/dist/blocks/courses/index.js +2 -2
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/created-by/index.js +2 -2
- package/dist/blocks/crm/index.d.ts +17 -17
- package/dist/blocks/crm/index.js +19 -19
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.js +11 -11
- package/dist/blocks/dam/index.d.ts +2 -2
- package/dist/blocks/dam/index.js +11 -11
- package/dist/blocks/data-lifecycle/index.d.ts +2 -2
- package/dist/blocks/data-lifecycle/index.js +1 -1
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/deals/index.js +2 -2
- package/dist/blocks/dispatch/index.d.ts +2 -2
- package/dist/blocks/dispatch/index.js +2 -2
- package/dist/blocks/document-templates/index.d.ts +1 -1
- package/dist/blocks/document-templates/index.js +10 -10
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/documents/index.js +9 -9
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/domains/index.js +10 -10
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/donations/index.js +12 -12
- package/dist/blocks/drive/index.d.ts +5 -5
- package/dist/blocks/drive/index.js +4 -4
- package/dist/blocks/e-prescribing/index.d.ts +1 -1
- package/dist/blocks/e-prescribing/index.js +11 -11
- package/dist/blocks/employees/index.d.ts +1 -1
- package/dist/blocks/employees/index.js +2 -2
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrichment/index.js +2 -2
- package/dist/blocks/enrollments/index.d.ts +2 -2
- package/dist/blocks/enrollments/index.js +2 -2
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/entitlements/index.js +2 -2
- package/dist/blocks/events/index.d.ts +3 -3
- package/dist/blocks/events/index.js +5 -5
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/expenses/index.js +18 -18
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/field-history/index.js +2 -2
- package/dist/blocks/filespace/index.d.ts +8 -8
- package/dist/blocks/filespace/index.js +9 -9
- package/dist/blocks/finance/index.d.ts +5 -5
- package/dist/blocks/finance/index.js +7 -7
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/flags/index.js +9 -9
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.js +2 -2
- package/dist/blocks/forms/index.d.ts +3 -3
- package/dist/blocks/forms/index.js +1 -1
- package/dist/blocks/funding/index.d.ts +2 -2
- package/dist/blocks/funding/index.js +2 -2
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/goals/index.js +2 -2
- package/dist/blocks/governance/index.d.ts +4 -4
- package/dist/blocks/governance/index.js +6 -6
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/guests/index.js +2 -2
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/hiring/index.js +2 -2
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/identities/index.js +3 -3
- package/dist/blocks/imports/index.d.ts +2 -2
- package/dist/blocks/imports/index.js +8 -8
- package/dist/blocks/inbox/index.d.ts +6 -6
- package/dist/blocks/inbox/index.js +1 -1
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/incidents/index.js +12 -12
- package/dist/blocks/index.d.ts +6 -6
- package/dist/blocks/index.js +8 -7
- package/dist/blocks/inspections/index.d.ts +2 -2
- package/dist/blocks/inspections/index.js +19 -19
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/inventory/index.js +2 -2
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/invoices/index.js +2 -2
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.js +2 -2
- package/dist/blocks/lead-scoring/index.d.ts +2 -2
- package/dist/blocks/lead-scoring/index.js +2 -2
- package/dist/blocks/learning/index.d.ts +3 -3
- package/dist/blocks/learning/index.js +5 -5
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leases/index.js +11 -11
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/leave/index.js +2 -2
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/ledger/index.js +12 -12
- package/dist/blocks/legal-entities/index.d.ts +2 -2
- package/dist/blocks/legal-entities/index.js +7 -7
- package/dist/blocks/lims/index.d.ts +2 -2
- package/dist/blocks/lims/index.js +14 -14
- package/dist/blocks/mail-sync/index.d.ts +3 -3
- package/dist/blocks/mail-sync/index.js +2 -2
- package/dist/blocks/maintenance/index.d.ts +2 -2
- package/dist/blocks/maintenance/index.js +2 -2
- package/dist/blocks/manufacturing/index.d.ts +2 -2
- package/dist/blocks/manufacturing/index.js +9 -9
- package/dist/blocks/medications/index.d.ts +1 -1
- package/dist/blocks/medications/index.js +2 -2
- package/dist/blocks/meetings/index.d.ts +3 -3
- package/dist/blocks/meetings/index.js +2 -2
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memberships/index.js +2 -2
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/memory/index.js +4 -4
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/messaging/index.js +14 -14
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/metrics/index.js +3 -3
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/mfa/index.js +3 -3
- package/dist/blocks/moderation/index.d.ts +2 -2
- package/dist/blocks/moderation/index.js +14 -14
- package/dist/blocks/notifications/index.d.ts +5 -5
- package/dist/blocks/notifications/index.js +2 -2
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/numbering/index.js +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.js +9 -9
- package/dist/blocks/observations/index.d.ts +2 -2
- package/dist/blocks/observations/index.js +2 -2
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.js +1 -1
- package/dist/blocks/orders/index.d.ts +1 -1
- package/dist/blocks/orders/index.js +2 -2
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/organizations/index.js +3 -3
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/passes/index.js +2 -2
- package/dist/blocks/payroll-export/index.d.ts +2 -2
- package/dist/blocks/payroll-export/index.js +2 -2
- package/dist/blocks/people/index.d.ts +7 -7
- package/dist/blocks/people/index.js +9 -9
- package/dist/blocks/periods/index.d.ts +1 -1
- package/dist/blocks/periods/index.js +9 -9
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/permissions/index.js +3 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/pipelines/index.js +2 -2
- package/dist/blocks/posts/index.d.ts +2 -2
- package/dist/blocks/posts/index.js +13 -13
- package/dist/blocks/procurement/index.d.ts +5 -5
- package/dist/blocks/procurement/index.js +7 -7
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/profiles/index.js +2 -2
- package/dist/blocks/projects/index.d.ts +7 -7
- package/dist/blocks/projects/index.js +9 -9
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/promotions/index.js +2 -2
- package/dist/blocks/prompts/index.d.ts +1 -1
- package/dist/blocks/prompts/index.js +3 -3
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/push/index.js +7 -7
- package/dist/blocks/qualifications/index.d.ts +2 -2
- package/dist/blocks/qualifications/index.js +2 -2
- package/dist/blocks/queue/index.d.ts +2 -2
- package/dist/blocks/queue/index.js +2 -2
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/quotes/index.js +2 -2
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/rank/index.js +3 -3
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/reactions/index.js +1 -1
- package/dist/blocks/recruiting/index.d.ts +4 -4
- package/dist/blocks/recruiting/index.js +6 -6
- package/dist/blocks/referrals/index.d.ts +1 -1
- package/dist/blocks/referrals/index.js +10 -10
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/relations/index.js +8 -8
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/reviews/index.js +10 -10
- package/dist/blocks/rfqs/index.d.ts +2 -2
- package/dist/blocks/rfqs/index.js +2 -2
- package/dist/blocks/risks/index.d.ts +2 -2
- package/dist/blocks/risks/index.js +14 -14
- package/dist/blocks/saas/index.d.ts +13 -13
- package/dist/blocks/saas/index.js +14 -14
- package/dist/blocks/sales/index.d.ts +1 -1
- package/dist/blocks/sales/index.js +1 -1
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.js +8 -8
- package/dist/blocks/scheduling/index.d.ts +4 -4
- package/dist/blocks/scheduling/index.js +6 -6
- package/dist/blocks/scores/index.d.ts +2 -2
- package/dist/blocks/scores/index.js +10 -10
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/search/index.js +1 -1
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/security-events/index.js +8 -8
- package/dist/blocks/segments/index.d.ts +2 -2
- package/dist/blocks/segments/index.js +2 -2
- package/dist/blocks/sequences/index.d.ts +3 -3
- package/dist/blocks/sequences/index.js +2 -2
- package/dist/blocks/service/index.d.ts +7 -7
- package/dist/blocks/service/index.js +9 -9
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.js +8 -8
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +4 -4
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/settings/index.js +2 -2
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/share-links/index.js +1 -1
- package/dist/blocks/shifts/index.d.ts +2 -2
- package/dist/blocks/shifts/index.js +2 -2
- package/dist/blocks/shipments/index.d.ts +2 -2
- package/dist/blocks/shipments/index.js +10 -10
- package/dist/blocks/signatures/index.d.ts +2 -2
- package/dist/blocks/signatures/index.js +1 -1
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.js +7 -7
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sla/index.js +2 -2
- package/dist/blocks/sso/index.d.ts +2 -2
- package/dist/blocks/sso/index.js +20 -20
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.js +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/subjects/index.js +1 -1
- package/dist/blocks/support/index.d.ts +5 -5
- package/dist/blocks/support/index.js +7 -7
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tags/index.js +1 -1
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/tasks/index.js +2 -2
- package/dist/blocks/tax/index.d.ts +2 -2
- package/dist/blocks/tax/index.js +2 -2
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/teams/index.js +1 -1
- package/dist/blocks/templates/index.d.ts +1 -1
- package/dist/blocks/templates/index.js +7 -7
- package/dist/blocks/tills/index.d.ts +1 -1
- package/dist/blocks/tills/index.js +12 -12
- package/dist/blocks/time-tracking/index.d.ts +2 -2
- package/dist/blocks/time-tracking/index.js +1 -1
- package/dist/blocks/timeline/index.d.ts +1 -1
- package/dist/blocks/timeline/index.js +1 -1
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/trash/index.js +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/undo/index.js +3 -3
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.js +2 -2
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/usage/index.js +3 -3
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/vercel-marketplace/index.js +9 -9
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/versions/index.js +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.js +10 -10
- package/dist/blocks/warehouse/index.d.ts +1 -1
- package/dist/blocks/warehouse/index.js +12 -12
- package/dist/blocks/webhooks/index.d.ts +2 -2
- package/dist/blocks/webhooks/index.js +19 -19
- package/dist/blocks/workflow-editor/index.d.ts +4 -4
- package/dist/blocks/workflow-editor/index.js +7 -7
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/blocks/workflows/index.js +8 -8
- package/dist/{blocks-C_ArClZU.d.ts → blocks-EFj0duwB.d.ts} +18 -5
- package/dist/{build-k56UjnbK.js → build-OCuu29wd.js} +1 -0
- package/dist/{cache-tags-JJWT0mkn.d.ts → cache-tags-TT8h2zMg.d.ts} +1 -1
- package/dist/claims/index.d.ts +3 -3
- package/dist/cli/{account-CBDO_E5S.js → account-C1vKOJOX.js} +1 -1
- package/dist/cli/{account-D7bjOpRN.js → account-MSvhufSp.js} +1 -1
- package/dist/cli/{add-7mEozwbY.js → add-C3yGPSQS.js} +14 -14
- package/dist/cli/add-C4B2wdfz.js +1 -0
- package/dist/cli/{add-Cn03PJzF.js → add-DlucpPCL.js} +4 -4
- package/dist/cli/{app-table-files-C50U5rM-.js → app-table-files-CC5n8Si8.js} +4 -4
- package/dist/cli/{app-tables-CvY1qzV7.js → app-tables-C-Rk_GnI.js} +3 -3
- package/dist/cli/{authorization-DJkkOjjG.js → authorization-DAYgx04b.js} +3 -1
- package/dist/cli/{automations-Mx4gbtJf.js → automations-0G37FqXw.js} +1 -1
- package/dist/cli/{backfill-D8xu2ME9.js → backfill-DbqA8coR.js} +4 -4
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-C-bZ2mX9.js → blocks-BBBpNbQD.js} +1 -1
- package/dist/cli/{blocks-CFYBoQVe.js → blocks-BFlOktiM.js} +3 -3
- package/dist/cli/{cache-vvJW9h-r.js → cache-BgNWPD9a.js} +1 -1
- package/dist/cli/{codemod-CR3I3yN9.js → codemod-B4DpCiqX.js} +34 -4
- package/dist/cli/{command-CJomeJg-.js → command-CLvgELKk.js} +6 -0
- package/dist/cli/{completion-BbBXWoj-.js → completion-BrARDcFB.js} +1 -1
- package/dist/cli/{completion-CxG9ycKP.js → completion-CifzoO8f.js} +2 -2
- package/dist/cli/{completion-CN2g0Fy_.js → completion-Q1M-cdP-.js} +2 -2
- package/dist/cli/{config-CP9zs7sG.js → config-COfXd-G3.js} +1 -1
- package/dist/cli/{config-C0aclGpw.js → config-FN5Cp861.js} +30 -5
- package/dist/cli/{config-BxiYiAN6.js → config-U32Vo0h6.js} +1 -1
- package/dist/cli/{content-mapper-BPtXLD3N.js → content-mapper-BaJhpTQA.js} +2 -2
- package/dist/cli/{db-kIWj4SJu.js → db-T8u160uM.js} +3 -3
- package/dist/cli/{doctor-0vyTC81z.js → doctor-Dnq5J_p_.js} +293 -103
- package/dist/cli/env-BMQqBhS_.js +1 -0
- package/dist/cli/{env-D8ndoCoC.js → env-G6fCEgJi.js} +1 -1
- package/dist/cli/{gen-CxJYiySd.js → gen-Bf9cVgpR.js} +16 -16
- package/dist/cli/index.d.ts +18 -1
- package/dist/cli/index.js +9 -9
- package/dist/cli/{init-CHBWJGSc.js → init-_IFg5fe6.js} +11 -11
- package/dist/cli/{keys-DjNcartA.js → keys-BnVLA3NK.js} +1 -1
- package/dist/cli/{live-De6AKObd.js → live-pq1yvvsl.js} +2 -2
- package/dist/cli/{mcp-Bw7PKU4b.js → mcp-YD0Ap6ok.js} +3 -3
- package/dist/cli/{metadata-BRrfdS8c.js → metadata-CfauXPW0.js} +3 -3
- package/dist/cli/{migrate-CR7e0qjQ.js → migrate-DWCu2Nny.js} +2 -2
- package/dist/cli/{migration-safety-Cy-T3xws.js → migration-safety-rjlsDMDU.js} +3 -3
- package/dist/cli/{migrations-C6DXXH2j.js → migrations-BRCqeu8k.js} +2 -2
- package/dist/cli/{module-migration-B-VqMxE-.js → module-migration-BpptcXiB.js} +2 -2
- package/dist/cli/{moved-CC2yanOJ.js → moved-B_XzRpRE.js} +1 -1
- package/dist/cli/{parse-BaW3_Itq.js → parse-BwGYCpEv.js} +1 -1
- package/dist/cli/powersync-BejxIowk.js +1 -0
- package/dist/cli/{powersync-CK8AR-WC.js → powersync-DsbJBuTR.js} +4 -4
- package/dist/cli/{print-DnZdC-oy.js → print-A9UGTj_t.js} +2 -2
- package/dist/cli/{providers-WCZgGeBy.js → providers-MlTm8nMs.js} +2 -2
- package/dist/cli/{prune-workflows-B69exaiW.js → prune-workflows-B6sqjrR0.js} +4 -4
- package/dist/cli/{remove-8f3luaAm.js → remove-BpY-E_l4.js} +8 -8
- package/dist/cli/{render-CZw4nKPe.js → render-8qD7j0se.js} +173 -64
- package/dist/cli/{run-BEKT_kd3.js → run-CAvLtfJG.js} +2 -2
- package/dist/cli/{run-R1XanA6K.js → run-DHRA46qf.js} +53 -52
- package/dist/cli/{run-C7VeseCS.js → run-Dl1TZGsM.js} +45 -11
- package/dist/cli/{seed-Q0D1Vr2S.js → seed-BgpovbwF.js} +4 -4
- package/dist/cli/seed-CRD1tYPA.js +1 -0
- package/dist/cli/{shared-B4Lw35PY.js → shared-B77Q9x0E.js} +1 -1
- package/dist/cli/{skills-BGn6lqa3.js → skills-aC7X7bhq.js} +1 -1
- package/dist/cli/{snapshot-Cj8BlMTz.js → snapshot-_roTbSZM.js} +26 -5
- package/dist/cli/{source-D1s75o6g.js → source-BseR3sy9.js} +1 -1
- package/dist/cli/{source-args-B3Po6qsn.js → source-args-DC8snM7e.js} +1 -1
- package/dist/cli/{spec-L6nabkxl.js → spec-Ct3i4drt.js} +3 -3
- package/dist/cli/{spec-CvKK1F-_.js → spec-n6QRlBOJ.js} +1 -1
- package/dist/cli/{sql-layout-D2H2DL4t.js → sql-layout-D_fJsw3B.js} +11 -4
- package/dist/cli/{stack-DzA4tS9O.js → stack-DINh7KWu.js} +1 -1
- package/dist/cli/{sync-6b06cM1c.js → sync-DqBQi0QQ.js} +6 -6
- package/dist/cli/{table-CSiri9RG.js → table-Cup45iWj.js} +1 -1
- package/dist/cli/{upgrade-C91Jw5xZ.js → upgrade-MRqrFaO1.js} +3 -3
- package/dist/cli/{upgrade-c7oPXvNG.js → upgrade-y3Iv4wl8.js} +5 -5
- package/dist/cli/{version-_XjqP_ML.js → version-CiE6Pt0K.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.d.ts +4 -4
- package/dist/client/native/index.js +1 -1
- package/dist/{composite-DuN-BnSc.js → composite-CgxTMZTK.js} +1 -1
- package/dist/{composite-B3L12SH4.d.ts → composite-CvlcYj8Y.d.ts} +4 -4
- package/dist/{composite-reads-MV2aCxBz.js → composite-reads-B99Cfmcf.js} +1 -1
- package/dist/{composite-reads-BIUJE_Rs.d.ts → composite-reads-CEI-IJ5A.d.ts} +1 -1
- package/dist/config/index.d.ts +5 -5
- package/dist/config/index.js +4 -4
- package/dist/{config-BOc24DLJ.js → config-B1m2PpjB.js} +1 -1
- package/dist/{config-7TP5XUaX.js → config-BWYT86yp.js} +3 -3
- package/dist/{context-DyXTQUb_.d.ts → context-DcHcHc2b.d.ts} +38 -4
- package/dist/contract/index.d.ts +6 -6
- package/dist/{controller-BHEUaOKo.d.ts → controller-BrTPi8Po.d.ts} +1 -1
- package/dist/{controller-o6DleXLi.js → controller-DvihM19C.js} +1 -1
- package/dist/{conversion-BBIeUsfd.d.ts → conversion-t1F0y--Y.d.ts} +1 -1
- package/dist/{copy-DurB738g.js → copy-DJBlRqH6.js} +1 -1
- package/dist/create/index.d.ts +4 -4
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +19 -2
- package/dist/create/lite/index.js +55 -3
- package/dist/{create-blocks-C6Ty49vp.js → create-blocks-CkhSm4iX.js} +117 -5
- package/dist/credentials/index.js +4 -4
- package/dist/{db-blocks-CFqt-e4_.d.ts → db-blocks-Dp-4qbYN.d.ts} +18 -0
- package/dist/{define-C2OUEXIf.js → define-UhyrfLYX.js} +147 -100
- package/dist/{define-block-DHOCtKKS.d.ts → define-block-B2um61Uj.d.ts} +65 -6
- package/dist/{define-block-DyZiZQrx.js → define-block-D3uNVp2k.js} +1 -0
- package/dist/{drive-C2o3Xx_i.d.ts → drive-BSp7gloI.d.ts} +1 -1
- package/dist/edge/index.d.ts +5 -5
- package/dist/edge/index.js +3 -3
- package/dist/{embeddings-yvAeg_C7.js → embeddings-BamT6vln.js} +1 -1
- package/dist/{entitlements-Ckadglcj.js → entitlements-B2rEDiKh.js} +1 -1
- package/dist/{entitlements-DIVgwFPk.d.ts → entitlements-DuNBTDsH.d.ts} +1 -1
- package/dist/error-kind-Bkmljt19.js +40 -0
- package/dist/eve/index.js +1 -1
- package/dist/{event-map-DxfsFgQT.js → event-map-DLajpFiJ.js} +2 -0
- package/dist/events/index.js +1 -1
- package/dist/events-CCw0FE_F.js +25 -0
- package/dist/{executor-BN24zqcr.js → executor-Bed-RLhP.js} +3 -3
- package/dist/{executor-CTiacxbx.js → executor-DhQDDIqq.js} +1 -1
- package/dist/{executor-ClpWppJK.d.ts → executor-RNhfR91D.d.ts} +2 -2
- package/dist/expo/index.d.ts +2 -2
- package/dist/expo/index.js +2 -2
- package/dist/{extract-CrOX8i1t.d.ts → extract-DvU_lPRQ.d.ts} +1 -1
- package/dist/{field-errors-B9cPS36j.d.ts → field-errors-Mo8dzoyA.d.ts} +6 -6
- package/dist/{framework-GAR2no7D.js → framework-BfP8NwDY.js} +1 -1
- package/dist/{framework-G-kFZ_Zu.d.ts → framework-BoDTo47q.d.ts} +3 -3
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +2 -2
- package/dist/{index-OXEh0xet.d.ts → index-46Mwoxp8.d.ts} +4 -4
- package/dist/{index-70sHeLK0.d.ts → index-B2zDRJMB.d.ts} +1 -1
- package/dist/{index-Cq91CC2i.d.ts → index-BDEwjrNn.d.ts} +1 -1
- package/dist/{index-Bh-mcFvM.d.ts → index-BFw-iTQT.d.ts} +1 -1
- package/dist/{index-DS1cREWV.d.ts → index-BGje-MeF.d.ts} +1 -1
- package/dist/{index-C9rUCq13.d.ts → index-BLRLF6iG.d.ts} +1 -1
- package/dist/{index-WdVPDjby.d.ts → index-BLpP1czF.d.ts} +1 -1
- package/dist/{index-CekZhXD2.d.ts → index-BMt0EVnl.d.ts} +1 -1
- package/dist/{index-DX0AQN4S.d.ts → index-BPz1IGUB.d.ts} +1 -1
- package/dist/{index-Cu7TSSiT.d.ts → index-Bdd-8C1P.d.ts} +2 -2
- package/dist/{index-xaSPPgB7.d.ts → index-BpCBGOVF.d.ts} +3 -3
- package/dist/{index-Bl44eUq9.d.ts → index-Bxu7m8vw.d.ts} +1 -1
- package/dist/{index--qIecGmt.d.ts → index-C2ilfaOF.d.ts} +1 -1
- package/dist/{index-A9U5y90N.d.ts → index-C3pOr989.d.ts} +1 -1
- package/dist/{index-Rj_9oAEO.d.ts → index-C8-8-t1s.d.ts} +2 -2
- package/dist/{index-Dfm7cQdw.d.ts → index-CNNGDSxy.d.ts} +2 -2
- package/dist/{index--qWRLdDu.d.ts → index-CV7Ibpek.d.ts} +1 -1
- package/dist/{index-Bo_5VFCD.d.ts → index-C_Ilif3i.d.ts} +1 -1
- package/dist/{index-DOPaoauk.d.ts → index-CaMHCzBp.d.ts} +1 -1
- package/dist/{index-XhmH0QFF.d.ts → index-CnQ27iFg.d.ts} +2 -2
- package/dist/{index-DGPYJUsm.d.ts → index-DLKMzlbR.d.ts} +1 -1
- package/dist/{index-Csx1g10j.d.ts → index-DNdYTori.d.ts} +2 -2
- package/dist/{index-DXlGFVDA.d.ts → index-DTqpt8XQ.d.ts} +1 -1
- package/dist/{index-C0MuI4v1.d.ts → index-DaClvzRy.d.ts} +4 -4
- package/dist/{index-CVOgOU3Z.d.ts → index-DfuF_8Ph.d.ts} +1 -1
- package/dist/{index-DL-X_e7F.d.ts → index-Dndo_is2.d.ts} +6 -5
- package/dist/{index-DxRrnBQR.d.ts → index-ISihFGu9.d.ts} +7 -7
- package/dist/{index-Cq6sRJPI.d.ts → index-OHQg8Sdx.d.ts} +3 -3
- package/dist/{index-BU5ifSPf.d.ts → index-PeaYXjhx.d.ts} +1 -1
- package/dist/{index-AAC2eWs-.d.ts → index-TNNEpcgG.d.ts} +4 -4
- package/dist/{index-Bksw5AoY.d.ts → index-Xsu3egx_.d.ts} +20 -9
- package/dist/{index-CUS-3XG1.d.ts → index-YgUHItkp.d.ts} +1 -1
- package/dist/{index-DERMRibg.d.ts → index-Zf3t4MuL.d.ts} +17 -10
- package/dist/{index-BKsK1OFh.d.ts → index-bOWESOEm.d.ts} +2 -2
- package/dist/{index-CqtV72-L.d.ts → index-kKkGf0_-.d.ts} +3 -3
- package/dist/{index-BFCUcLda.d.ts → index-s1IQy8sK.d.ts} +2 -2
- package/dist/{index-3QwzddR3.d.ts → index-xA8WHuDE.d.ts} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/{instances-B3gBKh8G.js → instances-CFXFHQMK.js} +2 -1
- package/dist/{knowledge-CJhz_QTb.js → knowledge-5Qz_NTXw.js} +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/{list-query-yg-W4BlQ.d.ts → list-query-CREBmVkm.d.ts} +1 -1
- package/dist/{manifest-BoOhT_Sh.d.ts → manifest-09aHVu5Q.d.ts} +1 -1
- package/dist/{manifest-CnyT7c1s.d.ts → manifest-0PeNUYcv.d.ts} +1 -1
- package/dist/{manifest-Q9_hEoaz.js → manifest-0UcJEkVv.js} +10 -10
- package/dist/{manifest-C6Tpng5m.js → manifest-5f_9qQnw.js} +9 -9
- package/dist/{manifest-CVL8uWZM.js → manifest-8oyDNj1x.js} +10 -10
- package/dist/{manifest-BGfX8wev.js → manifest-B-GhBRkt.js} +10 -10
- package/dist/{manifest-Dy1YssHm.js → manifest-B-LuM8VG.js} +7 -7
- package/dist/{manifest-Btbo698t.js → manifest-B-wRV_0N.js} +13 -13
- package/dist/{manifest-DGWojJC1.js → manifest-B1CzCbIE.js} +13 -13
- package/dist/{manifest-DDd8ppp7.d.ts → manifest-B3RgCccj.d.ts} +1 -1
- package/dist/{manifest-vUGVlXLh.d.ts → manifest-B3YkuXKR.d.ts} +1 -1
- package/dist/{manifest-H9u744d9.js → manifest-B3b2Y84h.js} +3 -3
- package/dist/{manifest-3bD3TaDt.d.ts → manifest-B3xj3-ew.d.ts} +1 -1
- package/dist/{manifest-BO4rlrML.d.ts → manifest-B4HXWUh8.d.ts} +1 -1
- package/dist/{manifest-CAwbcrJO.d.ts → manifest-B5vPAt-u.d.ts} +1 -1
- package/dist/{manifest-xoePLm1M.js → manifest-B7-Numjr.js} +13 -13
- package/dist/{manifest-Cc3wO1KI.js → manifest-BEeu_r4Y.js} +3 -3
- package/dist/{manifest-urrijhoM.d.ts → manifest-BFXybbMn.d.ts} +1 -1
- package/dist/{manifest-BY60j47w.js → manifest-BHAaE8V8.js} +5 -5
- package/dist/{manifest-D-Cq1TTO.js → manifest-BKJXc9sY.js} +3 -3
- package/dist/{manifest-D3sWX05O.d.ts → manifest-BLOufikB.d.ts} +1 -1
- package/dist/{manifest-D_wDGSVQ.js → manifest-BNT_WDkt.js} +5 -5
- package/dist/{manifest-N4AW74PT.js → manifest-BQhSqR4D.js} +14 -14
- package/dist/{manifest-Bc10Mthq.js → manifest-BRFen7mE.js} +31 -31
- package/dist/{manifest-CS9W2n9y.js → manifest-BSaRwzEH.js} +12 -12
- package/dist/{manifest-BvTS58t8.js → manifest-BUktyXMR.js} +22 -22
- package/dist/{manifest-BHthvzO5.d.ts → manifest-BUrKk2Ww.d.ts} +1 -1
- package/dist/{manifest-BhL35Pr2.js → manifest-BVAHowRk.js} +12 -12
- package/dist/{manifest-gA_niypr.js → manifest-BWh9leJI.js} +8 -8
- package/dist/{manifest-DKZEyfK6.js → manifest-BXN6WKgs.js} +3 -3
- package/dist/{manifest-Cds0y0r4.d.ts → manifest-BYUIgwGb.d.ts} +1 -1
- package/dist/{manifest-B4E33DXF.d.ts → manifest-Bc_2t9mY.d.ts} +1 -1
- package/dist/{manifest-CQOdY5Cc.d.ts → manifest-BdcBkznK.d.ts} +1 -1
- package/dist/{manifest-CkeHPwD_.d.ts → manifest-Bg1swpdk.d.ts} +1 -1
- package/dist/{manifest-DgsbIFLv.js → manifest-BhKkBdlV.js} +11 -11
- package/dist/{manifest-D25mxZdE.js → manifest-BnFuyvL7.js} +8 -8
- package/dist/{manifest-eUnjSmkX.js → manifest-BnJqvwXA.js} +14 -14
- package/dist/{manifest-Cw3Ak4ac.js → manifest-BnmxgXet.js} +4 -4
- package/dist/{manifest-S2EhG5Gw.js → manifest-BpAI3Me7.js} +34 -34
- package/dist/{manifest-D-D1xDw2.d.ts → manifest-BpiZFLbl.d.ts} +1 -1
- package/dist/{manifest-C4oqpEqj.js → manifest-BrkF61-W.js} +8 -8
- package/dist/{manifest-Cl13wY3u.d.ts → manifest-BwYOds2o.d.ts} +1 -1
- package/dist/{manifest-B2HCw2CH.js → manifest-BwZjGHRu.js} +14 -14
- package/dist/{manifest-CiSSfthq.d.ts → manifest-Bwv273Tb.d.ts} +1 -1
- package/dist/{manifest-D6jxUviz.js → manifest-C-QxTuzM.js} +3 -3
- package/dist/{manifest-CNNWN9Rr.js → manifest-C15_YXQV.js} +3 -3
- package/dist/{manifest-C9kzPc3l.d.ts → manifest-C4CIOVkt.d.ts} +2 -2
- package/dist/{manifest-cLGmrzgW.js → manifest-C692l8af.js} +12 -12
- package/dist/{manifest-C8AENKFu.js → manifest-C8_k9anI.js} +8 -8
- package/dist/{manifest-dOdQx0hy.d.ts → manifest-C9Kn7gwK.d.ts} +1 -1
- package/dist/{manifest-Dry8RIXq.js → manifest-C9fN2qRW.js} +12 -12
- package/dist/{manifest-CM5RhlxN.js → manifest-CBFQeKg6.js} +12 -12
- package/dist/{manifest-oZ1s2HoJ.d.ts → manifest-CDK8R8Ze.d.ts} +1 -1
- package/dist/{manifest-Dsi1aOKw.d.ts → manifest-CF-LsgEw.d.ts} +1 -1
- package/dist/{manifest-CWnpnTcL.js → manifest-CF92Kiog.js} +3 -3
- package/dist/{manifest-B3VjTLRv.d.ts → manifest-CFFaunME.d.ts} +1 -1
- package/dist/{manifest-Bgx1ETpN.js → manifest-CMnr9qpi.js} +10 -10
- package/dist/{manifest-C3fDS3NG.d.ts → manifest-CNcJxi93.d.ts} +1 -1
- package/dist/{manifest-CaKD48WX.d.ts → manifest-COoFT2vY.d.ts} +1 -1
- package/dist/{manifest-CMjAfphZ.js → manifest-CQ9I_8q2.js} +8 -8
- package/dist/{manifest-Bq11rIm6.js → manifest-CScOn17C.js} +12 -12
- package/dist/{manifest-CyMaBCGq.d.ts → manifest-CW47rgqj.d.ts} +1 -1
- package/dist/{manifest-DKqcq-LB.d.ts → manifest-C_ZDkBv4.d.ts} +1 -1
- package/dist/{manifest-Cg6iafYQ.js → manifest-C__pecuF.js} +14 -14
- package/dist/{manifest-DlRpMwfK.d.ts → manifest-CaKVpJZM.d.ts} +1 -1
- package/dist/{manifest-Dv8Hfpym.d.ts → manifest-CazVMbdf.d.ts} +1 -1
- package/dist/{manifest-DpUGCrdL.d.ts → manifest-Ccn2k0vb.d.ts} +1 -1
- package/dist/{manifest-oSaeMiYm.js → manifest-Cg25x0rD.js} +11 -11
- package/dist/{manifest-D5AuRrMx.d.ts → manifest-CgCpK4Wm.d.ts} +1 -1
- package/dist/{manifest-DqVGGnLa.d.ts → manifest-CgP-MDb3.d.ts} +1 -1
- package/dist/{manifest-CBzq9IhS.d.ts → manifest-CiOcPFFy.d.ts} +1 -1
- package/dist/{manifest-DsLlJTUa.js → manifest-CmSVpPBS.js} +7 -7
- package/dist/{manifest-BQzebb6B.js → manifest-CmquAtQC.js} +8 -8
- package/dist/{manifest-BbrSRrrB.js → manifest-CnSZ16xc.js} +3 -3
- package/dist/{manifest-BDEAP2_6.d.ts → manifest-Cnb5QGMK.d.ts} +1 -1
- package/dist/{manifest-eIWKtbU-.d.ts → manifest-CnkVWwAg.d.ts} +1 -1
- package/dist/{manifest-B5JVSm7q.js → manifest-CnlgJJDS.js} +10 -10
- package/dist/{manifest-qO6Dn0Rf.js → manifest-D0DK7Gdu.js} +12 -12
- package/dist/{manifest-BYIGiQA0.d.ts → manifest-D0KUPw4L.d.ts} +1 -1
- package/dist/{manifest-D5bH3Mec.d.ts → manifest-D1-lCZro.d.ts} +1 -1
- package/dist/{manifest-BeMK5Uir.js → manifest-D1VrUJOA.js} +5 -5
- package/dist/{manifest-C0BV1Dqr.js → manifest-D3LeYpRm.js} +13 -13
- package/dist/{manifest-CTjhS3_I.js → manifest-D3To2MLR.js} +6 -6
- package/dist/{manifest-3ImEz2CE.js → manifest-D46SY8Og.js} +17 -17
- package/dist/{manifest-57rK1ngY.d.ts → manifest-D6ZukDGm.d.ts} +1 -1
- package/dist/{manifest-CoGArkb4.js → manifest-D8teMyal.js} +11 -11
- package/dist/{manifest-DA8v7QwQ.js → manifest-DAZuHpm2.js} +14 -14
- package/dist/{manifest-DFDQCoIR.d.ts → manifest-DBSs1jJ_.d.ts} +1 -1
- package/dist/{manifest-DPQ1ECvV.js → manifest-DEx8OSZK.js} +8 -8
- package/dist/{manifest-Cs_BBJMk.d.ts → manifest-DF49Pt6Q.d.ts} +1 -1
- package/dist/{manifest-nghaYPXC.js → manifest-DFoZF4CI.js} +14 -14
- package/dist/{manifest-CTH_3PQ8.js → manifest-DHfYjJMJ.js} +12 -12
- package/dist/{manifest-_5YD_7qt.js → manifest-DIC1MsM0.js} +15 -15
- package/dist/{manifest-DFhs8tTZ.js → manifest-DKthWXiw.js} +9 -9
- package/dist/{manifest-DisFKYTB.js → manifest-DLsq8M80.js} +5 -5
- package/dist/{manifest-D7zENukq.d.ts → manifest-DMTmTHBy.d.ts} +1 -1
- package/dist/{manifest-t0UobwxV.d.ts → manifest-DQwFCQkG.d.ts} +1 -1
- package/dist/{manifest-CXRuupEQ.js → manifest-DWGEzte4.js} +18 -18
- package/dist/{manifest-CMwKGDuJ.js → manifest-DWLGd0FS.js} +8 -8
- package/dist/{manifest-D9ldgISN.js → manifest-DYpXtqzm.js} +8 -8
- package/dist/{manifest-CRrS1eXB.js → manifest-DcI69zyP.js} +12 -12
- package/dist/{manifest-DpUU_GQF.d.ts → manifest-Dh3kIEzu.d.ts} +1 -1
- package/dist/{manifest-CPGq3poM.js → manifest-DiPqog2j.js} +3 -3
- package/dist/{manifest-B0PJg-oT.js → manifest-Dj7bGfoy.js} +11 -11
- package/dist/{manifest-BpCVzhPX.js → manifest-DkI--7fx.js} +14 -14
- package/dist/{manifest-B2nCtBhS.js → manifest-Dm822kx0.js} +9 -9
- package/dist/{manifest-BWuJw7AI.js → manifest-DnSvthaM.js} +10 -10
- package/dist/{manifest-CehK0epY.d.ts → manifest-DpoO491p.d.ts} +1 -1
- package/dist/{manifest-CVQW9Vcl.js → manifest-DsJukV9d.js} +18 -18
- package/dist/{manifest-BYiCfDfW.d.ts → manifest-Du_-0ruw.d.ts} +1 -1
- package/dist/{manifest-CcErLbUW.d.ts → manifest-Dvhqz3qo.d.ts} +1 -1
- package/dist/{manifest-BEE8kXlc.js → manifest-DxPMUjhY.js} +17 -17
- package/dist/{manifest-CFEY-PSe.d.ts → manifest-Dy5_Rc0q.d.ts} +1 -1
- package/dist/{manifest-BdWn7BTX.d.ts → manifest-DyZcERh_.d.ts} +1 -1
- package/dist/{manifest-DqbXAQwZ.d.ts → manifest-ETlyMx6o.d.ts} +1 -1
- package/dist/{manifest-Cu1zCdXg.js → manifest-EcWk4ytT.js} +9 -9
- package/dist/{manifest-CPecIPI5.js → manifest-EwHcMCiW.js} +4 -4
- package/dist/{manifest-amQk8j7Y.js → manifest-FXQp4dob.js} +13 -13
- package/dist/{manifest-Y1Z5L2T3.js → manifest-Gi6V1g3E.js} +12 -12
- package/dist/{manifest-e7ZbaKYF.js → manifest-H65OlXiB.js} +15 -15
- package/dist/{manifest-DyjQZh7Z.js → manifest-IZ9GQI7f.js} +13 -13
- package/dist/{manifest-Hm1-O138.d.ts → manifest-JdAQqp5w.d.ts} +3 -3
- package/dist/{manifest-D8iIf1Kb.js → manifest-Lasq6DPg.js} +10 -10
- package/dist/{manifest-0F7lof-8.d.ts → manifest-Lsz6rH3B.d.ts} +1 -1
- package/dist/{manifest-DSGLUrYq.js → manifest-MTW4mY5N.js} +10 -10
- package/dist/{manifest-B_6NoKFg.d.ts → manifest-RAijfop2.d.ts} +1 -1
- package/dist/{manifest-DAxxMf9a.js → manifest-X24lr5XH.js} +3 -3
- package/dist/{manifest-Hr6MyREb.d.ts → manifest-XZV2sKgk.d.ts} +1 -1
- package/dist/{manifest-BLnVv55R.js → manifest-YB3ZtXEb.js} +11 -11
- package/dist/{manifest-gSko__Wn.d.ts → manifest-a0YxYgo0.d.ts} +1 -1
- package/dist/{manifest-CgMNtyTZ.d.ts → manifest-aJOA6D9w.d.ts} +1 -1
- package/dist/{manifest-CwJZGhJ8.d.ts → manifest-c8mlNzOv.d.ts} +1 -1
- package/dist/{manifest-KUbi4IKj.d.ts → manifest-dLThrKqV.d.ts} +1 -1
- package/dist/{manifest-Bde5xCaP.d.ts → manifest-dlqXYOfB.d.ts} +1 -1
- package/dist/{manifest-BUFE6Vda.js → manifest-jLh9Rwsh.js} +11 -11
- package/dist/{manifest-iKyF53SI.d.ts → manifest-jb384ocG.d.ts} +1 -1
- package/dist/{manifest-DBu84LST.d.ts → manifest-jiaWr0x4.d.ts} +1 -1
- package/dist/{manifest-t-8upuXv.js → manifest-kZCtkWqj.js} +9 -9
- package/dist/{manifest-BGhS_IRb.js → manifest-kbSJq3sR.js} +17 -17
- package/dist/{manifest-oVRDNj7t.d.ts → manifest-pLJIrNwi.d.ts} +1 -1
- package/dist/{manifest-DlK0gus-.js → manifest-rHukkAIC.js} +16 -16
- package/dist/{manifest-NSNQGS0I.js → manifest-wlx1-yvJ.js} +5 -5
- package/dist/{manifest-BUvqSThC.d.ts → manifest-xAeOKTub.d.ts} +3 -3
- package/dist/{manifest-CbXBkXqf.d.ts → manifest-y2y5xPQC.d.ts} +1 -1
- package/dist/{manifest-MleiBHu4.js → manifest-yLshQDXw.js} +6 -6
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.d.ts +2 -2
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/{mcp-DAJ7WsQb.js → mcp-Cu-bD9KQ.js} +1 -1
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +92 -35
- package/dist/next/index.js +123 -44
- package/dist/{operations-Cqx3ghVP.d.ts → operations-_3oh-CEO.d.ts} +1 -1
- package/dist/{options-PM7IaIFP.js → options-B1rQBo1M.js} +4 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.js +4 -4
- package/dist/{parse-B1g9TF99.js → parse-BRW-aTQQ.js} +1 -1
- package/dist/{payroll-export-CrEznq6i.js → payroll-export-CNji28TX.js} +1 -1
- package/dist/{permissions-cKhOwOuj.d.ts → permissions-u_qqedin.d.ts} +1 -1
- package/dist/{ports-DEC5OfLy.js → ports-BhCn6uGk.js} +1 -1
- package/dist/{ports-zqXSEoFP.d.ts → ports-DT5zRdYx.d.ts} +1 -1
- package/dist/postgres/index.js +2 -2
- package/dist/{postgrest-executor-DaDNeFDr.js → postgrest-executor-BMNA_O9-.js} +1 -1
- package/dist/powersync/index.d.ts +3 -3
- package/dist/powersync/index.js +1 -1
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +3 -3
- package/dist/{preset-BILsEo24.js → preset--1OMwypM.js} +4 -3
- package/dist/{preview-DN0JKESa.d.ts → preview-BBA-VaEZ.d.ts} +2 -2
- package/dist/{preview-DsrEvLWG.js → preview-Bd7ZBtf2.js} +2 -2
- package/dist/{project-C23WlGy4.js → project-BhE6_64F.js} +5 -5
- package/dist/{push-token-DZACGqYX.d.ts → push-token-hs6_Vt-I.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/rate-limit/index.js +1 -1
- package/dist/{rate-limit-DSOwe_Re.js → rate-limit-ruAG2w45.js} +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +2 -2
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +10 -6
- package/dist/react/server.js +6 -2
- package/dist/{react-oftUdRLD.js → react-olMpD8et.js} +31 -24
- package/dist/react-router/index.d.ts +3 -3
- package/dist/react-router/index.js +2 -2
- package/dist/{read-set-Vqn_XdqV.js → read-set-4EsAPjII.js} +2 -1
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-S1-QnCI_.d.ts → record-form-Cze5j1OB.d.ts} +1 -1
- package/dist/{record-type-uD8JMf0g.js → record-type-BPUobukL.js} +1 -0
- package/dist/records/index.d.ts +7 -7
- package/dist/records/index.js +3 -3
- package/dist/{resource-execute-y2wGRwTn.d.ts → resource-execute-D2cJfrKu.d.ts} +1 -1
- package/dist/{resource-types-B8ocsWgZ.d.ts → resource-types-Cs1zWvrn.d.ts} +1 -1
- package/dist/{resources-DS3fQtwv.d.ts → resources-DyP9cP9i.d.ts} +1 -1
- package/dist/{sales-DKOs8F12.js → sales-BCArDSEX.js} +9 -9
- package/dist/{scores-Dfes6BDr.js → scores-D3fvLQGX.js} +1 -1
- package/dist/server/index.d.ts +13 -13
- package/dist/server/index.js +9 -9
- package/dist/{server-types-CXNFIjFU.d.ts → server-types-Bpxk5UWh.d.ts} +32 -10
- package/dist/{session-CDkvmd52.d.ts → session-DQ5huqEw.d.ts} +2 -2
- package/dist/{session-status-PE2_AdYA.d.ts → session-status-DDPrDS36.d.ts} +1 -1
- package/dist/{settings-CqhQrT3a.js → settings-DhzIPgTN.js} +1 -1
- package/dist/{shared-B0clSLXG.js → shared-BTf7Qrnk.js} +1 -1
- package/dist/{sign-in-BRT-0QYF.js → sign-in-03gtm616.js} +34 -9
- package/dist/{signing-keys-hgspu0oB.js → signing-keys-sEdfxGbZ.js} +1 -1
- package/dist/solid/index.d.ts +13 -6
- package/dist/solid/index.js +10 -3
- package/dist/solid-start/index.d.ts +3 -3
- package/dist/solid-start/index.js +2 -2
- package/dist/spec/index.d.ts +1 -1
- package/dist/{spec-CGD_BzCF.js → spec-BSc8n34a.js} +1 -1
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-DUonzxhb.js → sql-B0t41P1F.js} +2 -2
- package/dist/{sql-DWsHDJ3c.js → sql-BVUbNexh.js} +581 -242
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/sqlite/index.js +1 -1
- package/dist/{sso-CSfrymeX.js → sso-fXXdjhyz.js} +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/{support-DLms-JZd.d.ts → support-tDhEwXbu.d.ts} +18 -9
- package/dist/svelte/index.d.ts +13 -6
- package/dist/svelte/index.js +10 -3
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{tags-BGwWAMVB.d.ts → tags-CBASI98_.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +1 -1
- package/dist/tanstack-start/index.d.ts +3 -3
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenant-DNoe5dUa.d.ts → tenant-c_6qMyFI.d.ts} +1 -1
- package/dist/testing/index.d.ts +111 -10
- package/dist/testing/index.js +217 -7
- package/dist/{timeline-Dy099qKD.d.ts → timeline-DvZ7C5zf.d.ts} +3 -3
- package/dist/{topic-CqSqDnjb.js → topic-CW7sraaQ.js} +1 -1
- package/dist/{topic-EkhjfSPH.d.ts → topic-fwPlelNI.d.ts} +2 -2
- package/dist/{types-CkLE9lwr.d.ts → types-Cwai2qe4.d.ts} +2 -2
- package/dist/{undo-CnWDmntn.js → undo-DhLhQlyY.js} +1 -1
- package/dist/{verify-Dh2MQQze.d.ts → verify-CupKPoHW.d.ts} +1 -1
- package/dist/vue/index.d.ts +13 -6
- package/dist/vue/index.js +10 -3
- package/dist/{watch-topic-B4eLrVUl.d.ts → watch-topic-D4AzYs9E.d.ts} +1 -1
- package/dist/{webhook-inbox-_7ApdH2q.js → webhook-inbox-TA5H3ti3.js} +1 -1
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/webmcp/index.js +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +89 -0
- package/schemas/doctor-report-v1.json +12 -0
- package/skills/better-supabase/references/ui-recipes.md +13 -13
- package/dist/cli/add-TZa-GEt2.js +0 -1
- package/dist/cli/env-DWtI_scC.js +0 -1
- package/dist/cli/powersync-DfiIdCgd.js +0 -1
- package/dist/cli/seed-DsoWExFu.js +0 -1
- package/dist/events-BRKIxVQD.js +0 -25
- package/dist/cli/{orphans-CPcR85QN.js → orphans-ByB0gKOp.js} +1 -1
package/dist/next/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { It as RequestContext, O as AnyFunctions, Ut as AnyAuthorizer, et as RecordRef, in as PermissionRef, k as AnyModels, rn as AuthzVersionCache } from "../types-D5UNIbOQ.js";
|
|
2
|
-
import { $t as DbStats, G as ReadSet, Q as ReadSetResult, rn as CacheAdapter, s as BetterSupabase, st as QuerySpec, tn as StatsRecorder } from "../db-blocks-
|
|
2
|
+
import { $t as DbStats, G as ReadSet, Q as ReadSetResult, rn as CacheAdapter, s as BetterSupabase, st as QuerySpec, tn as StatsRecorder } from "../db-blocks-Dp-4qbYN.js";
|
|
3
3
|
import { C as CookieScope, _ as issuedAtOf, g as isSessionSnapshot, h as authzVersionOf, m as SessionSnapshot, r as AuthState, v as sessionCacheKey } from "../resolve-NeMeUVtf.js";
|
|
4
|
-
import { a as EmailOtpType, d as safeRedirectPath, i as AuthorizeUrlParams, l as SignOutScope, n as sessionTag, o as ExistingAccount, s as OtpParams, t as sessionIdTag } from "../cache-tags-
|
|
4
|
+
import { a as EmailOtpType, d as safeRedirectPath, i as AuthorizeUrlParams, l as SignOutScope, n as sessionTag, o as ExistingAccount, s as OtpParams, t as sessionIdTag } from "../cache-tags-TT8h2zMg.js";
|
|
5
5
|
import { c as Impersonator, n as AuthSession, o as toSession } from "../view-B44a2jfA.js";
|
|
6
6
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-BgPAdisB.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as tenantOf } from "../tenant-
|
|
11
|
-
import { r as permissionsOf, t as PermissionsOfOptions } from "../permissions-
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
7
|
+
import { b as DbError, f as Result } from "../result-CMqlHv82.js";
|
|
8
|
+
import { i as tagFor, t as TagOptions } from "../tags-CBASI98_.js";
|
|
9
|
+
import { r as LiveCountSeed, t as CountRunner } from "../index-OHQg8Sdx.js";
|
|
10
|
+
import { t as tenantOf } from "../tenant-c_6qMyFI.js";
|
|
11
|
+
import { r as permissionsOf, t as PermissionsOfOptions } from "../permissions-u_qqedin.js";
|
|
12
|
+
import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-CnQ27iFg.js";
|
|
13
|
+
import { A as Bootstrap, O as Access, d as SharedServer, i as ContextOptions, j as BootstrapCallOptions, r as BetterServer, s as ServerContext, t as AdminDb, u as ServerOptions } from "../server-types-Bpxk5UWh.js";
|
|
14
|
+
import { t as AuthOutageHook } from "../session-DQ5huqEw.js";
|
|
14
15
|
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-CjmzrlVW.js";
|
|
15
|
-
import { t as ResourceMap } from "../resources-
|
|
16
|
+
import { t as ResourceMap } from "../resources-DyP9cP9i.js";
|
|
16
17
|
import { n as AuthKind, r as GuardOptions } from "../respond--w7kF-Ym.js";
|
|
17
|
-
import { a as
|
|
18
|
-
import { Z as BlockClientSource, k as RecordBindingOptions } from "../define-block-
|
|
19
|
-
import {
|
|
20
|
-
import { c as
|
|
21
|
-
import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-Dy099qKD.js";
|
|
18
|
+
import { a as SupportOptions, c as SupportStartRequest, l as supportSessions, o as SupportPolicy, s as SupportSessions, t as ActiveSupport } from "../support-tDhEwXbu.js";
|
|
19
|
+
import { Z as BlockClientSource, k as RecordBindingOptions } from "../define-block-B2um61Uj.js";
|
|
20
|
+
import { c as ListParseOptions, m as ListSearchParams } from "../list-query-CREBmVkm.js";
|
|
21
|
+
import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-DvZ7C5zf.js";
|
|
22
22
|
import { n as AmrEntry, t as Aal } from "../mfa-BbzlzjEV.js";
|
|
23
|
-
import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-
|
|
24
|
-
import { t as defineAction } from "../resource-execute-
|
|
23
|
+
import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-Cs1zWvrn.js";
|
|
24
|
+
import { t as defineAction } from "../resource-execute-D2cJfrKu.js";
|
|
25
25
|
import { n as supportOf, t as SupportView } from "../support-view-XeoLPB7S.js";
|
|
26
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
26
|
+
import { r as MembershipClaim } from "../entitlements-DuNBTDsH.js";
|
|
27
27
|
import { t as Validated } from "../shared-DsBcvj6q.js";
|
|
28
28
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
29
29
|
import { UserClaims } from "@supabase/server";
|
|
@@ -293,7 +293,13 @@ interface VerifySessionOptions {
|
|
|
293
293
|
readonly banned?: string;
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
/** A schema for the leading arguments of an action (`ActionOptions.bound`). */
|
|
297
|
+
type BoundSchema = StandardSchemaV1<readonly unknown[]>;
|
|
298
|
+
/** The validated bound arguments, or an empty tuple without `bound`. */
|
|
299
|
+
type BoundOutput<Bd> = Bd extends BoundSchema ? StandardSchemaV1.InferOutput<Bd> : readonly [];
|
|
300
|
+
/** The arguments of the returned action: bound ones first, then the input. */
|
|
301
|
+
type BoundArgs<Bd, S extends StandardSchemaV1 | undefined> = Bd extends BoundSchema ? [...StandardSchemaV1.InferInput<Bd>, ActionInput<S>] : [input: ActionInput<S>];
|
|
302
|
+
interface ActionOptions<S extends StandardSchemaV1 | undefined, C = unknown, P = unknown, R extends boolean = boolean, Ref = unknown, X = ResourceLoaderContext<C, P>, Bd extends BoundSchema | undefined = undefined> extends GuardOptions, AuthorizeOptions<ActionParsed<S>, C, P, R, Ref, X> {
|
|
297
303
|
/** Validates the input (plain object or `FormData`) with any Standard Schema. */
|
|
298
304
|
readonly input?: S;
|
|
299
305
|
/**
|
|
@@ -302,7 +308,22 @@ interface ActionOptions<S extends StandardSchemaV1 | undefined, C = unknown, P =
|
|
|
302
308
|
* `membershipsExtension()` plugin and `current_tenant_id()` only honor a
|
|
303
309
|
* tenant the caller belongs to.
|
|
304
310
|
*/
|
|
305
|
-
readonly tenant?: (input: ActionParsed<S>) => string | undefined;
|
|
311
|
+
readonly tenant?: (input: ActionParsed<S>, bound: BoundOutput<Bd>) => string | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* A schema for the leading arguments an action takes through `.bind(null,
|
|
314
|
+
* ...)`, for example `v.tuple([v.string()])` for a bound organization id.
|
|
315
|
+
* They are validated before `tenant` runs, and `tenant(input, bound)` and the
|
|
316
|
+
* action body (`fn(input, ctx, bound)`) read the validated tuple.
|
|
317
|
+
*/
|
|
318
|
+
readonly bound?: Bd;
|
|
319
|
+
/**
|
|
320
|
+
* Runs after authentication and the permission check, before the action body.
|
|
321
|
+
* Return an error to refuse the call; the body never runs. `tenant` is what
|
|
322
|
+
* `tenant(input)` returned.
|
|
323
|
+
*/
|
|
324
|
+
readonly guard?: (tenant: string | undefined, ctx: Pick<ServerContext<AnyModels, AnyFunctions, unknown, C, P>, "auth" | "resolution" | "supabase">) => DbError | undefined | Promise<DbError | undefined>;
|
|
325
|
+
/** Maps the `ActionResult` before it returns, for example to translate errors. */
|
|
326
|
+
readonly result?: (outcome: ActionResult<unknown>) => ActionResult<unknown>;
|
|
306
327
|
}
|
|
307
328
|
/**
|
|
308
329
|
* How `blockAction` calls the method: without `args` it passes the validated
|
|
@@ -336,7 +357,18 @@ interface ScopeOptions {
|
|
|
336
357
|
*/
|
|
337
358
|
readonly tenant?: string;
|
|
338
359
|
}
|
|
339
|
-
|
|
360
|
+
/**
|
|
361
|
+
* What `bsb.withContext(factory)` returns: `cached`, `getAccess` and `action`
|
|
362
|
+
* with the factory's context merged in.
|
|
363
|
+
*/
|
|
364
|
+
interface ContextualNext<M extends AnyModels, F extends AnyFunctions, E, C, P, Ref, B, D, X> {
|
|
365
|
+
cached: (options?: CachedOptions<Extract<keyof M, string>>) => Promise<CachedContext<M, F, E, C, P, B, D> & X>;
|
|
366
|
+
getAccess: (source?: Bootstrap<C, P> | SessionSnapshot<C> | null, options?: {
|
|
367
|
+
readonly key?: RemoteCacheKey;
|
|
368
|
+
}) => Promise<Access<ServerContext<M, F, E, C, P, B, D> & X, C, P, Ref>>;
|
|
369
|
+
action: <S extends StandardSchemaV1 | undefined, T, R extends boolean = false, Bd extends BoundSchema | undefined = undefined>(options: ActionOptions<S, C, P, R, Ref, NextResource<M, F, E, C, P, B>, Bd>, fn: (input: ActionParsed<S>, ctx: ServerContext<M, F, E, C, P, B, D> & AuthorizedContext<C, P, R> & X, bound: BoundOutput<Bd>) => Promise<T> | T) => (...args: BoundArgs<Bd, S>) => Promise<ActionResult<Unwrapped<Awaited<T>>>>;
|
|
370
|
+
}
|
|
371
|
+
interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, Ref = string, B = unknown, V extends AuthzVersionCache = AuthzVersionCache, D = any> extends BetterServer<M, F, E, C, P, B, V> {
|
|
340
372
|
/** `proxy.ts`: refreshes sessions for page loads and server actions. */
|
|
341
373
|
proxy(request: NextRequest, options?: ProxyOptions<C, P>): Promise<Response>;
|
|
342
374
|
/**
|
|
@@ -347,8 +379,8 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
347
379
|
* const { db } = await bsb.context({ tenant: organizationId });
|
|
348
380
|
* ```
|
|
349
381
|
*/
|
|
350
|
-
context(options?: ScopeOptions): Promise<ServerContext<M, F, E, C, P, B>>;
|
|
351
|
-
context(request: Request | undefined, options?: ContextOptions): Promise<ServerContext<M, F, E, C, P, B>>;
|
|
382
|
+
context(options?: ScopeOptions): Promise<ServerContext<M, F, E, C, P, B, D>>;
|
|
383
|
+
context(request: Request | undefined, options?: ContextOptions): Promise<ServerContext<M, F, E, C, P, B, D>>;
|
|
352
384
|
/**
|
|
353
385
|
* The verified caller as serializable data (no token, no clients), memoized
|
|
354
386
|
* per request: the server-side counterpart of supabase-js `getClaims()`,
|
|
@@ -379,7 +411,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
379
411
|
* (one that crossed serialization or was built by hand) gets an `invalid`
|
|
380
412
|
* context, so call `getClaims()` again in the scope that needs it.
|
|
381
413
|
*/
|
|
382
|
-
contextFromSession(snapshot: SessionSnapshot<C> | null, options?: ContextOptions): Promise<ServerContext<M, F, E, C, P, B>>;
|
|
414
|
+
contextFromSession(snapshot: SessionSnapshot<C> | null, options?: ContextOptions): Promise<ServerContext<M, F, E, C, P, B, D>>;
|
|
383
415
|
/**
|
|
384
416
|
* First statement of an app-authored cache function: sets `cacheLife`
|
|
385
417
|
* (`stale` 300 unless `life` says otherwise), tags the entry
|
|
@@ -396,7 +428,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
396
428
|
* }
|
|
397
429
|
* ```
|
|
398
430
|
*/
|
|
399
|
-
cached(options?: CachedOptions<Extract<keyof M, string>>): Promise<CachedContext<M, F, E, C, P, B>>;
|
|
431
|
+
cached(options?: CachedOptions<Extract<keyof M, string>>): Promise<CachedContext<M, F, E, C, P, B, D>>;
|
|
400
432
|
/**
|
|
401
433
|
* Parks the request's verified session until the response is sent and returns
|
|
402
434
|
* its serializable handle. Pass the handle to a `'use cache: private'`
|
|
@@ -454,7 +486,26 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
454
486
|
*/
|
|
455
487
|
getAccess(source?: Bootstrap<C, P> | SessionSnapshot<C> | null, options?: {
|
|
456
488
|
readonly key?: RemoteCacheKey;
|
|
457
|
-
}): Promise<Access<ServerContext<M, F, E, C, P, B>, C, P, Ref>>;
|
|
489
|
+
}): Promise<Access<ServerContext<M, F, E, C, P, B, D>, C, P, Ref>>;
|
|
490
|
+
/**
|
|
491
|
+
* The same `cached()`, `getAccess()` and `action()`, handing back the app's
|
|
492
|
+
* own context: `factory(session, base)` runs once per scope, from the session
|
|
493
|
+
* the library already read, and its result merges into the context.
|
|
494
|
+
*
|
|
495
|
+
* ```ts
|
|
496
|
+
* export const app = bsb.withContext((session, base) => ({
|
|
497
|
+
* organizationId: base.tenant,
|
|
498
|
+
* isAdmin:
|
|
499
|
+
* session.kind === "user" && session.claims.app_role === "admin",
|
|
500
|
+
* }));
|
|
501
|
+
*
|
|
502
|
+
* export const rename = app.action(
|
|
503
|
+
* { input: Rename },
|
|
504
|
+
* (input, ctx) => ctx.isAdmin,
|
|
505
|
+
* );
|
|
506
|
+
* ```
|
|
507
|
+
*/
|
|
508
|
+
withContext<X extends object>(factory: (session: AuthSession<C, P>, base: ServerContext<M, F, E, C, P, B, D>) => X): ContextualNext<M, F, E, C, P, Ref, B, D, X>;
|
|
458
509
|
/** `rootParams.locale()`, or `undefined` without one or outside a render. */
|
|
459
510
|
locale(): Promise<string | undefined>;
|
|
460
511
|
/** `rootParams.brand()`, or `undefined` without one or outside a render. */
|
|
@@ -500,7 +551,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
500
551
|
*/
|
|
501
552
|
liveCount<T extends Extract<keyof M, string>>(spec: QuerySpec<T, "count", number>, db?: CountRunner): Promise<LiveCountSeed<T>>;
|
|
502
553
|
/** Route handler with auth, Result unwrapping and Problem Details errors. */
|
|
503
|
-
route<Params = Record<string, string | string[]>, R extends boolean = false>(handler: (request: NextRequest, ctx: ServerContext<M, F, E, C, P, B> & AuthorizedContext<C, P, R> & {
|
|
554
|
+
route<Params = Record<string, string | string[]>, R extends boolean = false>(handler: (request: NextRequest, ctx: ServerContext<M, F, E, C, P, B, D> & AuthorizedContext<C, P, R> & {
|
|
504
555
|
readonly params: Params;
|
|
505
556
|
}) => unknown, options?: RouteOptions<C, P, R, Ref, NextResource<M, F, E, C, P, B>>): (request: NextRequest, segment: {
|
|
506
557
|
readonly params: Promise<Params>;
|
|
@@ -516,7 +567,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
516
567
|
* );
|
|
517
568
|
* ```
|
|
518
569
|
*/
|
|
519
|
-
action<S extends StandardSchemaV1 | undefined, T, R extends boolean = false>(options: ActionOptions<S, C, P, R, Ref, NextResource<M, F, E, C, P, B
|
|
570
|
+
action<S extends StandardSchemaV1 | undefined, T, R extends boolean = false, Bd extends BoundSchema | undefined = undefined>(options: ActionOptions<S, C, P, R, Ref, NextResource<M, F, E, C, P, B>, Bd>, fn: (input: ActionParsed<S>, ctx: ServerContext<M, F, E, C, P, B, D> & AuthorizedContext<C, P, R>, bound: BoundOutput<Bd>) => Promise<T> | T): (...args: BoundArgs<Bd, S>) => Promise<ActionResult<Unwrapped<Awaited<T>>>>;
|
|
520
571
|
/**
|
|
521
572
|
* A server action that calls one block method as the caller, with the same
|
|
522
573
|
* guard, validation and authorize checks as `action`.
|
|
@@ -533,13 +584,13 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
533
584
|
* );
|
|
534
585
|
* ```
|
|
535
586
|
*/
|
|
536
|
-
blockAction<Cl extends object, const K extends string, S extends StandardSchemaV1 | undefined = undefined, R extends boolean = false>(client: (ctx: ServerContext<M, F, E, C, P, B>) => Cl, method: K & BlockMethodName<Cl>, options: ActionOptions<S, C, P, R, Ref, NextResource<M, F, E, C, P, B>> & {
|
|
587
|
+
blockAction<Cl extends object, const K extends string, S extends StandardSchemaV1 | undefined = undefined, R extends boolean = false>(client: (ctx: ServerContext<M, F, E, C, P, B, D>) => Cl, method: K & BlockMethodName<Cl>, options: ActionOptions<S, C, P, R, Ref, NextResource<M, F, E, C, P, B>> & {
|
|
537
588
|
/**
|
|
538
589
|
* Tables a successful call changes: drops the cache entries `bsb.tags`
|
|
539
590
|
* tagged with them, such as `reads.deals.board.tables`.
|
|
540
591
|
*/
|
|
541
592
|
readonly invalidates?: readonly string[];
|
|
542
|
-
} & BlockActionArgs<S, BlockArgsOf<Cl, K & BlockMethodName<Cl>>, ServerContext<M, F, E, C, P, B> & AuthorizedContext<C, P, R>>): (input: ActionInput<S>) => Promise<ActionResult<BlockDataOf<Cl, K & BlockMethodName<Cl>>>>;
|
|
593
|
+
} & BlockActionArgs<S, BlockArgsOf<Cl, K & BlockMethodName<Cl>>, ServerContext<M, F, E, C, P, B, D> & AuthorizedContext<C, P, R>>): (input: ActionInput<S>) => Promise<ActionResult<BlockDataOf<Cl, K & BlockMethodName<Cl>>>>;
|
|
543
594
|
/**
|
|
544
595
|
* One record type's server binding (`defineRecordType`, which `gen` writes to
|
|
545
596
|
* `records/<type>.ts`): `load` settles each block's binding for a record in a
|
|
@@ -581,7 +632,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
581
632
|
* });
|
|
582
633
|
* ```
|
|
583
634
|
*/
|
|
584
|
-
require<R extends boolean = false>(options?: RequireOptions<C, P, R, Ref, NextResource<M, F, E, C, P, B>>): Promise<ServerContext<M, F, E, C, P, B> & AuthorizedContext<C, P, R>>;
|
|
635
|
+
require<R extends boolean = false>(options?: RequireOptions<C, P, R, Ref, NextResource<M, F, E, C, P, B>>): Promise<ServerContext<M, F, E, C, P, B, D> & AuthorizedContext<C, P, R>>;
|
|
585
636
|
/**
|
|
586
637
|
* REST resources for a catch-all route, matching the API model: collections,
|
|
587
638
|
* items and actions, as the caller (RLS), behind the guard in `options`, with
|
|
@@ -595,7 +646,7 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
|
|
|
595
646
|
* );
|
|
596
647
|
* ```
|
|
597
648
|
*/
|
|
598
|
-
resources(map: ResourceMap<M, Ref, ServerContext<M, F, E, C, P, B>["db"]>, options?: NextResourcesOptions): NextResourceRoutes;
|
|
649
|
+
resources(map: ResourceMap<M, Ref, ServerContext<M, F, E, C, P, B, D>["db"]>, options?: NextResourcesOptions): NextResourceRoutes;
|
|
599
650
|
/**
|
|
600
651
|
* Tags the current `"use cache"` scope with a table (and row) tag. With a
|
|
601
652
|
* `tenant`, mutations in other tenants leave the entry cached.
|
|
@@ -883,6 +934,12 @@ interface CachedEntryOptions<T extends string = string> {
|
|
|
883
934
|
* `bsb:<table>@*`, so other tenants' writes leave it cached.
|
|
884
935
|
*/
|
|
885
936
|
readonly tables?: readonly T[];
|
|
937
|
+
/**
|
|
938
|
+
* A read set the entry reads (`reads.deals.board`): its tables are added to
|
|
939
|
+
* `tables`. The `bsb:<table>` tags apply only to shared caches (`'use cache'`
|
|
940
|
+
* and `'use cache: remote'`); a private cache is not invalidated by them.
|
|
941
|
+
*/
|
|
942
|
+
readonly readSet?: ReadSet;
|
|
886
943
|
/** With `tables`, also tags the row `bsb:<first table>:<id>`. */
|
|
887
944
|
readonly id?: string | number;
|
|
888
945
|
}
|
|
@@ -932,7 +989,7 @@ interface NextRootParams {
|
|
|
932
989
|
/** `tenant` from `next/root-params`; `NextOptions.tenant` falls back to it. */
|
|
933
990
|
readonly tenant?: () => Promise<string | undefined>;
|
|
934
991
|
}
|
|
935
|
-
type CachedContext<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown> = ServerContext<M, F, E, C, P, B> & {
|
|
992
|
+
type CachedContext<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown, D = any> = ServerContext<M, F, E, C, P, B, D> & {
|
|
936
993
|
readonly session: AuthSession<C, P>;
|
|
937
994
|
};
|
|
938
995
|
/**
|
|
@@ -967,7 +1024,7 @@ interface RequireAalOptions {
|
|
|
967
1024
|
* What a `resource` loader gets in Next.js: the caller's context, with the
|
|
968
1025
|
* checked tenant.
|
|
969
1026
|
*/
|
|
970
|
-
type NextResource<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown> = ServerContext<M, F, E, C, P, B> & ResourceLoaderContext<C, P>;
|
|
1027
|
+
type NextResource<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown, D = any> = ServerContext<M, F, E, C, P, B, D> & ResourceLoaderContext<C, P>;
|
|
971
1028
|
/**
|
|
972
1029
|
* The Next.js adapter: proxy, Server Components, route handlers, server actions
|
|
973
1030
|
* and cache tags, on top of `createServer`.
|
|
@@ -979,7 +1036,7 @@ type NextResource<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P
|
|
|
979
1036
|
export declare function createNext<M extends AnyModels, D, F extends AnyFunctions, E, C = unknown, P = unknown, A extends AnyAuthorizer<V> | undefined = undefined, B = unknown, V extends AuthzVersionCache = AuthzVersionCache>(betterSupabase: BetterSupabase<M, D, F, E, C, P, B>, options?: NextOptions & {
|
|
980
1037
|
readonly authorizer?: A;
|
|
981
1038
|
readonly versions?: V;
|
|
982
|
-
}): BetterNext<M, F, E, C, P, PermissionRef<A>, B, V>;
|
|
1039
|
+
}): BetterNext<M, F, E, C, P, PermissionRef<A>, B, V, D>;
|
|
983
1040
|
/**
|
|
984
1041
|
* Where to send the user after signing in: the `next` value of the search
|
|
985
1042
|
* params (a `URLSearchParams`, a page's `searchParams` object or a request)
|
package/dist/next/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { a as endedSessionOf, c as clearCookieSession, l as applyCookieWrites, m as writeSession, o as markSessionEnded, p as sessionCookieName, t as clientIp } from "../resolve-DswJu89M.js";
|
|
2
2
|
import { a as sessionCacheKey, i as issuedAtOf, n as authzVersionOf, r as isSessionSnapshot, s as snapshotOf, t as authOfSnapshot } from "../snapshot-r7c6-qTr.js";
|
|
3
|
-
import { C as bootstrapSchema, S as accessOf, T as mapBootstrapMemo, c as extendServer, n as flushEvents, p as supportCookieMaxAge, r as handle, s as createServer, t as bearerRequest, v as outageResponse, w as bootstrapWith, x as serverCore } from "../adapter-
|
|
3
|
+
import { C as bootstrapSchema, S as accessOf, T as mapBootstrapMemo, c as extendServer, n as flushEvents, p as supportCookieMaxAge, r as handle, s as createServer, t as bearerRequest, v as outageResponse, w as bootstrapWith, x as serverCore } from "../adapter-CJa5ys5O.js";
|
|
4
4
|
import { i as toSession, s as checkAal } from "../view-B8vDPZSf.js";
|
|
5
|
-
import { n as methodOf } from "../block-method-DIbWG4Mj.js";
|
|
6
5
|
import { i as claimsOf } from "../claims-CqTr_N1n.js";
|
|
7
6
|
import { n as dbError } from "../errors-CXPerGIl.js";
|
|
8
7
|
import { t as isList } from "../guards-CsRa6v57.js";
|
|
9
|
-
import { c as readSetTables, o as isReadSet } from "../read-set-
|
|
8
|
+
import { c as readSetTables, o as isReadSet } from "../read-set-4EsAPjII.js";
|
|
10
9
|
import { a as ok, r as err } from "../result-DrBaeIVt.js";
|
|
11
|
-
import { i as isQuerySpec } from "../spec-
|
|
10
|
+
import { i as isQuerySpec } from "../spec-BSc8n34a.js";
|
|
12
11
|
import { n as validate } from "../standard-BEYqhwCE.js";
|
|
13
12
|
import { n as StatsRecorder, t as EMPTY_STATS } from "../stats-D2TN2c3B.js";
|
|
14
13
|
import { r as tagFor, t as cacheTagsOf } from "../tags-CW-KvjdL.js";
|
|
15
14
|
import { t as withExtra } from "../extra-Dz9n5y1s.js";
|
|
16
15
|
import { c as defaultExpose, i as requireCaller, n as formDataObject, p as settle, t as authorizeCaller, u as guard } from "../kit-CBdolcQN.js";
|
|
17
|
-
import { t as tenantOf } from "../tenant-Beqd7TTq.js";
|
|
18
16
|
import { n as resourceRouter } from "../resources-DpbVfgfR.js";
|
|
17
|
+
import { t as tenantOf } from "../tenant-Beqd7TTq.js";
|
|
18
|
+
import { n as methodOf } from "../block-method-DIbWG4Mj.js";
|
|
19
19
|
import { r as permissionsOf } from "../permissions-BDt27oYF.js";
|
|
20
|
+
import { i as userSessionTags, n as sessionTag, r as tableTags, t as sessionIdTag } from "../cache-tags-C5Oivuxo.js";
|
|
20
21
|
import { t as DbException } from "../db-exception-Dv18UZ-I.js";
|
|
21
|
-
import { n as createBlockClient } from "../create-blocks-
|
|
22
|
-
import { t as subjectsBlock } from "../manifest-
|
|
23
|
-
import { t as trashBlock } from "../manifest-
|
|
24
|
-
import { a as recordCan, c as recordWriteInput, i as plainData, l as runBindingWrite, o as recordPermissionKeys, p as loadBindings, r as findBindingWrite, s as recordSubject, t as bindingWrites } from "../record-type-
|
|
25
|
-
import { r as loadTimeline, t as copyBindings } from "../copy-
|
|
22
|
+
import { n as createBlockClient } from "../create-blocks-CkhSm4iX.js";
|
|
23
|
+
import { t as subjectsBlock } from "../manifest-C8_k9anI.js";
|
|
24
|
+
import { t as trashBlock } from "../manifest-DWLGd0FS.js";
|
|
25
|
+
import { a as recordCan, c as recordWriteInput, i as plainData, l as runBindingWrite, o as recordPermissionKeys, p as loadBindings, r as findBindingWrite, s as recordSubject, t as bindingWrites } from "../record-type-BPUobukL.js";
|
|
26
|
+
import { r as loadTimeline, t as copyBindings } from "../copy-DJBlRqH6.js";
|
|
26
27
|
import { t as isStorageApi } from "../storage-api-COQr77e8.js";
|
|
27
|
-
import { i as
|
|
28
|
-
import { a as needsMfa, c as pkceGrant, d as safeRedirectPath, f as supportSessions, i as mfaGrant, l as pkcePair, n as emailFlow, o as otpGrant, r as isExistingAccount, s as passwordGrant, t as authorizeUrlFor, u as revokeSession } from "../sign-in-BRT-0QYF.js";
|
|
28
|
+
import { a as needsMfa, c as pkceGrant, d as safeRedirectPath, f as supportSessions, i as mfaGrant, l as pkcePair, n as emailFlow, o as otpGrant, r as isExistingAccount, s as passwordGrant, t as authorizeUrlFor, u as revokeSession } from "../sign-in-03gtm616.js";
|
|
29
29
|
import { o as problemResponse } from "../problem-gZxWhEP2.js";
|
|
30
30
|
import { t as isDocumentLoad } from "../request-kind-tNDM5Z_o.js";
|
|
31
31
|
import { i as defineAction } from "../resource-CIYtVbd2.js";
|
|
@@ -134,6 +134,43 @@ function nextCache(options = {}) {
|
|
|
134
134
|
* invalidated once per mutation.
|
|
135
135
|
*/
|
|
136
136
|
const nextCacheAttached = /* @__PURE__ */ new WeakSet();
|
|
137
|
+
// src/next/action-bound.ts
|
|
138
|
+
/**
|
|
139
|
+
* The validated bound arguments of an action, or the arguments as they are
|
|
140
|
+
* without a schema.
|
|
141
|
+
*/
|
|
142
|
+
async function validateBound(schema, args) {
|
|
143
|
+
if (!schema) return {
|
|
144
|
+
ok: true,
|
|
145
|
+
data: args
|
|
146
|
+
};
|
|
147
|
+
const checked = await validate(schema, args, "bound");
|
|
148
|
+
return checked.ok ? {
|
|
149
|
+
ok: true,
|
|
150
|
+
data: checked.data
|
|
151
|
+
} : {
|
|
152
|
+
ok: false,
|
|
153
|
+
error: checked.error
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/** `entry` with the tables of its read set added to `tables`. */
|
|
157
|
+
function withReadSetTables(entry) {
|
|
158
|
+
return entry.readSet ? {
|
|
159
|
+
...entry,
|
|
160
|
+
tables: [...entry.tables ?? [], ...readSetTables(entry.readSet)]
|
|
161
|
+
} : entry;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The server action behind `bsb.blockAction`: calls one block method as the
|
|
165
|
+
* caller and drops the tags of `invalidates` after a success.
|
|
166
|
+
*/
|
|
167
|
+
function blockActionOf(host, invalidate, client, method, options) {
|
|
168
|
+
return host.action(options, async (input, ctx) => {
|
|
169
|
+
const result = await methodOf(client(ctx), method)(...options.args?.(input, ctx) ?? [input]);
|
|
170
|
+
if (result.ok && options.invalidates) invalidate(options.invalidates.flatMap((table) => tableTags(table, { tenant: "*" })));
|
|
171
|
+
return result;
|
|
172
|
+
});
|
|
173
|
+
}
|
|
137
174
|
// src/next/collector.ts
|
|
138
175
|
/** Forwarded by the proxy so every scope of one render shares an id. */
|
|
139
176
|
const REQUEST_ID_HEADER = "x-bsb-request-id";
|
|
@@ -355,6 +392,20 @@ function applyCacheEntry(input) {
|
|
|
355
392
|
];
|
|
356
393
|
if (tags.length > 0) cacheTag(...tags);
|
|
357
394
|
}
|
|
395
|
+
// src/next/incoming-request.ts
|
|
396
|
+
/**
|
|
397
|
+
* The incoming request, with the cookie header rebuilt from the cookie jar: in
|
|
398
|
+
* a Server Action or a route handler the jar already holds this request's
|
|
399
|
+
* writes (a sign-in, a sign-out), and the header never does.
|
|
400
|
+
*/
|
|
401
|
+
async function incomingRequest() {
|
|
402
|
+
const [incomingHeaders, jar] = await Promise.all([headers(), cookies()]);
|
|
403
|
+
const forwarded = new Headers(incomingHeaders);
|
|
404
|
+
const cookie = jar.getAll().map(({ name, value }) => `${name}=${encodeURIComponent(value)}`).join("; ");
|
|
405
|
+
if (cookie === "") forwarded.delete("cookie");
|
|
406
|
+
else forwarded.set("cookie", cookie);
|
|
407
|
+
return new Request("http://next.local/", { headers: forwarded });
|
|
408
|
+
}
|
|
358
409
|
// src/next/proxy.ts
|
|
359
410
|
const OVERRIDE = "x-middleware-override-headers";
|
|
360
411
|
const REQUEST_PREFIX = "x-middleware-request-";
|
|
@@ -984,6 +1035,36 @@ function requireAal(level, options = {}) {
|
|
|
984
1035
|
return NextResponse.redirect(target);
|
|
985
1036
|
};
|
|
986
1037
|
}
|
|
1038
|
+
// src/next/with-context.ts
|
|
1039
|
+
/**
|
|
1040
|
+
* Builds `bsb.withContext(factory)`: the factory runs once per base context
|
|
1041
|
+
* (one per request and tenant), so `cached()`, `getAccess()` and `action()`
|
|
1042
|
+
* share the app's context instead of each rebuilding it.
|
|
1043
|
+
*/
|
|
1044
|
+
function withContextFactory(next, factory, sessionOf) {
|
|
1045
|
+
const built = /* @__PURE__ */ new WeakMap();
|
|
1046
|
+
const extraOf = (ctx, session = sessionOf(ctx)) => {
|
|
1047
|
+
const known = built.get(ctx);
|
|
1048
|
+
if (known) return known;
|
|
1049
|
+
const made = factory(session, ctx);
|
|
1050
|
+
built.set(ctx, made);
|
|
1051
|
+
return made;
|
|
1052
|
+
};
|
|
1053
|
+
return {
|
|
1054
|
+
cached: async (options) => {
|
|
1055
|
+
const ctx = await next.cached(options);
|
|
1056
|
+
return withExtra(ctx, extraOf(ctx, ctx.session));
|
|
1057
|
+
},
|
|
1058
|
+
getAccess: async (source, options) => {
|
|
1059
|
+
const access = await next.getAccess(source, options);
|
|
1060
|
+
return {
|
|
1061
|
+
...access,
|
|
1062
|
+
context: withExtra(access.context, extraOf(access.context, access.session))
|
|
1063
|
+
};
|
|
1064
|
+
},
|
|
1065
|
+
action: (options, fn) => next.action(options, (input, ctx, bound) => fn(input, withExtra(ctx, extraOf(ctx)), bound))
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
987
1068
|
// src/next/create.ts
|
|
988
1069
|
/**
|
|
989
1070
|
* The Next.js adapter: proxy, Server Components, route handlers, server actions
|
|
@@ -1036,19 +1117,6 @@ function createNext(betterSupabase, options = {}) {
|
|
|
1036
1117
|
for (const write of writes) jar.set(write.name, write.value, write.options);
|
|
1037
1118
|
};
|
|
1038
1119
|
/**
|
|
1039
|
-
* The incoming request, with the cookie header rebuilt from the cookie jar:
|
|
1040
|
-
* in a Server Action or a route handler the jar already holds this request's
|
|
1041
|
-
* writes (a sign-in, a sign-out), and the header never does.
|
|
1042
|
-
*/
|
|
1043
|
-
const incomingRequest = async () => {
|
|
1044
|
-
const [incomingHeaders, jar] = await Promise.all([headers(), cookies()]);
|
|
1045
|
-
const forwarded = new Headers(incomingHeaders);
|
|
1046
|
-
const cookie = jar.getAll().map(({ name, value }) => `${name}=${encodeURIComponent(value)}`).join("; ");
|
|
1047
|
-
if (cookie === "") forwarded.delete("cookie");
|
|
1048
|
-
else forwarded.set("cookie", cookie);
|
|
1049
|
-
return new Request("http://next.local/", { headers: forwarded });
|
|
1050
|
-
};
|
|
1051
|
-
/**
|
|
1052
1120
|
* The incoming request, once its dynamic APIs are awaited. Auth reads cookies
|
|
1053
1121
|
* and then the clock: `io()` marks that as I/O for Cache Components without
|
|
1054
1122
|
* blocking a prefetch the way `connection()` does, and awaiting `cookies()`
|
|
@@ -1240,7 +1308,7 @@ function createNext(betterSupabase, options = {}) {
|
|
|
1240
1308
|
view,
|
|
1241
1309
|
scope,
|
|
1242
1310
|
tenant,
|
|
1243
|
-
entry,
|
|
1311
|
+
entry: withReadSetTables(entry),
|
|
1244
1312
|
userTags,
|
|
1245
1313
|
warn: development ? (message) => {
|
|
1246
1314
|
betterSupabase.events.logger.warn(message);
|
|
@@ -1464,42 +1532,58 @@ function createNext(betterSupabase, options = {}) {
|
|
|
1464
1532
|
};
|
|
1465
1533
|
},
|
|
1466
1534
|
action(actionOptions, fn) {
|
|
1467
|
-
|
|
1535
|
+
const mapped = (o) => actionOptions.result?.(o) ?? o;
|
|
1536
|
+
return async (...args) => {
|
|
1537
|
+
const input = args.at(-1);
|
|
1538
|
+
const boundArgs = actionOptions.bound ? args.slice(0, -1) : [];
|
|
1468
1539
|
const early = actionOptions.tenant && !options.support ? void 0 : await current();
|
|
1469
1540
|
const denied = guard(early?.auth ?? (await incoming()).resolution.auth, actionOptions.allow, actionOptions.aal, actionOptions.scopes);
|
|
1470
|
-
if (denied) return {
|
|
1541
|
+
if (denied) return mapped({
|
|
1471
1542
|
ok: false,
|
|
1472
1543
|
data: null,
|
|
1473
1544
|
error: denied
|
|
1474
|
-
};
|
|
1545
|
+
});
|
|
1546
|
+
const checkedBound = await validateBound(actionOptions.bound, boundArgs);
|
|
1547
|
+
if (!checkedBound.ok) return mapped({
|
|
1548
|
+
ok: false,
|
|
1549
|
+
data: null,
|
|
1550
|
+
error: checkedBound.error
|
|
1551
|
+
});
|
|
1552
|
+
const bound = checkedBound.data;
|
|
1475
1553
|
let parsed = input instanceof FormData ? formDataObject(input) : input;
|
|
1476
1554
|
if (actionOptions.input) {
|
|
1477
1555
|
const checked = await validate(actionOptions.input, parsed, "input");
|
|
1478
|
-
if (!checked.ok) return {
|
|
1556
|
+
if (!checked.ok) return mapped({
|
|
1479
1557
|
ok: false,
|
|
1480
1558
|
data: null,
|
|
1481
1559
|
error: checked.error
|
|
1482
|
-
};
|
|
1560
|
+
});
|
|
1483
1561
|
parsed = checked.data;
|
|
1484
1562
|
}
|
|
1485
|
-
const tenant = actionOptions.tenant?.(parsed);
|
|
1563
|
+
const tenant = actionOptions.tenant?.(parsed, bound);
|
|
1486
1564
|
const ctx = tenant === void 0 ? early ?? await current() : await current(tenant);
|
|
1487
1565
|
const caller = await authorizeCaller$1(ctx, actionOptions, parsed);
|
|
1488
|
-
if ("kind" in caller) return {
|
|
1566
|
+
if ("kind" in caller) return mapped({
|
|
1489
1567
|
ok: false,
|
|
1490
1568
|
data: null,
|
|
1491
1569
|
error: caller
|
|
1492
|
-
};
|
|
1570
|
+
});
|
|
1571
|
+
const refused = await actionOptions.guard?.(tenant, ctx);
|
|
1572
|
+
if (refused) return mapped({
|
|
1573
|
+
ok: false,
|
|
1574
|
+
data: null,
|
|
1575
|
+
error: refused
|
|
1576
|
+
});
|
|
1493
1577
|
const scope = ctx;
|
|
1494
1578
|
let settled;
|
|
1495
1579
|
try {
|
|
1496
|
-
settled = await settle(() => fn(parsed, withExtra(scope, caller)));
|
|
1580
|
+
settled = await settle(() => fn(parsed, withExtra(scope, caller), bound));
|
|
1497
1581
|
} finally {
|
|
1498
1582
|
flushAfter();
|
|
1499
1583
|
await writeCookies(ctx);
|
|
1500
1584
|
await logActionStats(debug?.enabled ? collector : void 0, betterSupabase.events.logger, incomingRequest, statsHeader);
|
|
1501
1585
|
}
|
|
1502
|
-
return settled.ok ? {
|
|
1586
|
+
return mapped(settled.ok ? {
|
|
1503
1587
|
ok: true,
|
|
1504
1588
|
data: settled.data,
|
|
1505
1589
|
error: null
|
|
@@ -1507,7 +1591,7 @@ function createNext(betterSupabase, options = {}) {
|
|
|
1507
1591
|
ok: false,
|
|
1508
1592
|
data: null,
|
|
1509
1593
|
error: settled.error
|
|
1510
|
-
};
|
|
1594
|
+
});
|
|
1511
1595
|
};
|
|
1512
1596
|
},
|
|
1513
1597
|
require: async (requireOptions = {}) => {
|
|
@@ -1583,13 +1667,8 @@ function createNext(betterSupabase, options = {}) {
|
|
|
1583
1667
|
}
|
|
1584
1668
|
cacheTag(...tags);
|
|
1585
1669
|
},
|
|
1586
|
-
blockAction: (client, method, blockOptions) =>
|
|
1587
|
-
|
|
1588
|
-
const result = await methodOf(client(ctx), method)(...blockOptions.args?.(input, ctx) ?? [input]);
|
|
1589
|
-
if (result.ok && blockOptions.invalidates) invalidateAll(blockOptions.invalidates.flatMap((table) => tableTags(table, { tenant: "*" })));
|
|
1590
|
-
return result;
|
|
1591
|
-
});
|
|
1592
|
-
},
|
|
1670
|
+
blockAction: (client, method, blockOptions) => blockActionOf(next, invalidateAll, client, method, blockOptions),
|
|
1671
|
+
withContext: (factory) => withContextFactory(next, factory, (ctx) => toSession(ctx.auth)),
|
|
1593
1672
|
record: (type) => recordServer(next, type),
|
|
1594
1673
|
recordAt: (type, id) => recordAtServer(next, type, id)
|
|
1595
1674
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as AuthorizationOperation } from "./authorization-
|
|
1
|
+
import { r as AuthorizationOperation } from "./authorization-UYejwQsk.js";
|
|
2
2
|
/** Operations by name, as `authorization.operations` or a module's own defaults. */
|
|
3
3
|
type OperationTable = Readonly<Record<string, AuthorizationOperation>>;
|
|
4
4
|
export { OperationTable as t };
|
|
@@ -4,7 +4,10 @@ const apiKeysSqlOptions = blockOptions({
|
|
|
4
4
|
scopes: option.unknown(),
|
|
5
5
|
kinds: option.strings(),
|
|
6
6
|
touchInterval: option.number({ default: 60 }),
|
|
7
|
-
prefix: option.string({
|
|
7
|
+
prefix: option.string({
|
|
8
|
+
default: "bs",
|
|
9
|
+
client: true
|
|
10
|
+
}),
|
|
8
11
|
extraColumns: option.extraColumns()
|
|
9
12
|
});
|
|
10
13
|
export { apiKeysSqlOptions as t };
|
package/dist/orpc/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as AuthState } from "../resolve-NeMeUVtf.js";
|
|
2
|
-
import { s as BetterSupabase } from "../db-blocks-
|
|
2
|
+
import { s as BetterSupabase } from "../db-blocks-Dp-4qbYN.js";
|
|
3
3
|
import { b as DbError, f as Result } from "../result-CMqlHv82.js";
|
|
4
4
|
import { i as ProblemDetails } from "../problem-BkuOcWRv.js";
|
|
5
5
|
import { O as AnyFunctions, k as AnyModels } from "../types-D5UNIbOQ.js";
|
|
6
6
|
import { c as ResourceLoaderContext, i as AuthorizeOptions } from "../kit-CjmzrlVW.js";
|
|
7
7
|
import { a as RateLimitVerdict, c as RouteRateLimitRule, i as RateLimitRouteOptions, l as SingleRateLimitOptions, n as MultiRateLimiter, o as RateLimiter, r as RateLimitAllVerdict, s as RouteRateLimitHit, t as MultiRateLimitOptions } from "../rate-limit-7PzkzB3R.js";
|
|
8
8
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond--w7kF-Ym.js";
|
|
9
|
-
import { r as BetterServer, s as ServerContext, u as ServerOptions } from "../server-types-
|
|
10
|
-
import { t as Api } from "../api-
|
|
11
|
-
import { a as ResourceHandler } from "../resource-types-
|
|
9
|
+
import { r as BetterServer, s as ServerContext, u as ServerOptions } from "../server-types-Bpxk5UWh.js";
|
|
10
|
+
import { t as Api } from "../api-CGYctFBt.js";
|
|
11
|
+
import { a as ResourceHandler } from "../resource-types-Cs1zWvrn.js";
|
|
12
12
|
import { t as Validated } from "../shared-DsBcvj6q.js";
|
|
13
13
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
14
14
|
import { AnySchema, BuilderWithMiddlewares, DecoratedMiddleware, DecoratedProcedure, MetaPlugin, ORPCError, Schema } from "@orpc/server";
|
package/dist/orpc/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { i as toSession } from "../view-B8vDPZSf.js";
|
|
|
2
2
|
import { i as claimsOf } from "../claims-CqTr_N1n.js";
|
|
3
3
|
import { n as dbError, r as dbErrorOf } from "../errors-CXPerGIl.js";
|
|
4
4
|
import { c as toProblem } from "../problem-gZxWhEP2.js";
|
|
5
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
5
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-CJa5ys5O.js";
|
|
6
6
|
import { c as defaultExpose, p as settle, s as assertCookieRefresh, t as authorizeCaller, u as guard } from "../kit-CBdolcQN.js";
|
|
7
7
|
import { t as rateLimitGate } from "../rate-limit-s_8DovmF.js";
|
|
8
8
|
import { r as refreshFor } from "../request-kind-tNDM5Z_o.js";
|
package/dist/otel/index.js
CHANGED
|
@@ -39,9 +39,9 @@ function systemOf(executor) {
|
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
function otel(options = {}) {
|
|
42
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
42
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.53.0");
|
|
43
43
|
let histogram;
|
|
44
|
-
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.
|
|
44
|
+
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.53.0")).createHistogram("db.client.operation.duration", {
|
|
45
45
|
unit: "s",
|
|
46
46
|
description: "Duration of database client operations.",
|
|
47
47
|
advice: { explicitBucketBoundaries: [
|
|
@@ -230,7 +230,7 @@ function otel(options = {}) {
|
|
|
230
230
|
* `betterSupabase.events`. Returns a function that stops listening.
|
|
231
231
|
*/
|
|
232
232
|
function traceAuth(betterSupabase, options = {}) {
|
|
233
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
233
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.53.0");
|
|
234
234
|
const offAuth = betterSupabase.events.on("auth", (event) => {
|
|
235
235
|
const span = tracer.startSpan("auth.resolve", {
|
|
236
236
|
kind: SpanKind.INTERNAL,
|
|
@@ -269,7 +269,7 @@ function traceAuth(betterSupabase, options = {}) {
|
|
|
269
269
|
* `*.denied`) set an error status. Returns a function that stops listening.
|
|
270
270
|
*/
|
|
271
271
|
function traceBlockEvents(betterSupabase, options = {}) {
|
|
272
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
272
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.53.0");
|
|
273
273
|
return betterSupabase.events.on("block", (event) => {
|
|
274
274
|
const attributes = {
|
|
275
275
|
...options.attributes,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ok, t as AsyncResult } from "./result-DrBaeIVt.js";
|
|
2
|
-
import { t as attachmentOf } from "./attachments-
|
|
2
|
+
import { t as attachmentOf } from "./attachments-Djs8uyat.js";
|
|
3
3
|
import { B as textOf, C as optionalInstant, N as recordsOf, P as requiredInstant, T as optionalText, d as enumOrThrow, j as recordOf } from "./block-helpers-BR1V7DN1.js";
|
|
4
4
|
import { n as isRecord } from "./guards-CsRa6v57.js";
|
|
5
5
|
import { t as temporal } from "./temporal-required-DK3ImZW6.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "./guards-CsRa6v57.js";
|
|
2
2
|
import { a as sqlString, i as sqlIdent } from "./template-1e2akYYK.js";
|
|
3
|
-
import { i as fillTemplate } from "./access-sql-
|
|
3
|
+
import { i as fillTemplate } from "./access-sql-DH2LbcQe.js";
|
|
4
4
|
import { c as renderPolicy, i as policy } from "./policy-B9UWDXMF.js";
|
|
5
5
|
import { C as extraFieldsJson, I as quotedTable, O as lockTable, S as extraFieldsArg, W as schemaPreamble, Y as splitTable, a as SCHEMA, m as columnRef, nt as withExtraFields, o as SERVICE_CALLER, q as sha256HexSql, rt as writeExtraColumns, tt as userGrant, u as addExtraColumns, w as fail } from "./shared-DwShIqeQ.js";
|
|
6
6
|
import { n as blockOptions, r as option } from "./options-Z-bd_H1E.js";
|