better-supabase 0.20.0 → 0.21.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/{adapter-CfuBICuG.js → adapter-DZJZTY6g.js} +2 -2
- package/dist/{ai-cache-BuNbWEFI.js → ai-cache-BFRKxgZ4.js} +2 -2
- package/dist/{ai-files-DeMWQfzs.js → ai-files-m_2z3rH1.js} +3 -3
- package/dist/{ai-schedules-Bp-U0cZG.d.ts → ai-schedules-7uQNMXve.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/ai-sdk/batches/index.js +3 -3
- package/dist/ai-sdk/cache/index.js +1 -1
- package/dist/ai-sdk/chat/index.js +1 -1
- package/dist/ai-sdk/files/index.js +2 -2
- package/dist/ai-sdk/index.js +3 -3
- package/dist/ai-sdk/mcp/index.js +2 -2
- package/dist/ai-sdk/workflow/index.js +2 -2
- package/dist/{api-BIw5g_4V.d.ts → api-Cj4W_pqT.d.ts} +1 -1
- package/dist/{app-tables-oYkgtcRM.d.ts → app-tables-C5HjXs2k.d.ts} +1 -1
- package/dist/astro/index.d.ts +3 -3
- package/dist/astro/index.js +2 -2
- package/dist/{attachments-BTIwCuwm.js → attachments-BXbLnNxm.js} +5 -5
- package/dist/{authorization-08F77H2w.d.ts → authorization-DhoA7dsD.d.ts} +22 -8
- package/dist/{automations-jIIaT9EJ.js → automations-BMuqwZZn.js} +5 -5
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-BwQGUqdQ.d.ts → bind-CFsctoFJ.d.ts} +4 -4
- package/dist/{block-authors-D9hyCizs.js → block-authors-Bw3zdzgl.js} +1 -1
- package/dist/{block-env-Dh0Fe-fK.d.ts → block-env-BrUNeuJ_.d.ts} +4 -4
- package/dist/{block-events-pBXPzwnW.js → block-events-IWAyafO3.js} +1 -1
- package/dist/{block-fields-DE_FgpOU.js → block-fields-BjXgX_5c.js} +4 -3
- package/dist/{block-helpers-DnCtsKtv.js → block-helpers-B0f0ZVb5.js} +169 -4
- package/dist/{block-hooks-DbIpkq7a.js → block-hooks-DKtz0HRh.js} +1 -1
- package/dist/{block-subjects-BRJO0IqO.js → block-subjects-DFSuFY1a.js} +1 -1
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/access-requests/index.js +4 -5
- package/dist/blocks/activities/index.d.ts +1 -1
- package/dist/blocks/activities/index.js +4 -5
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/agents/index.js +3 -4
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.js +2 -2
- package/dist/blocks/ai-chat/index.d.ts +4 -4
- package/dist/blocks/ai-chat/index.js +3 -4
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-files/index.js +2 -2
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.js +2 -3
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/ai-schedules/index.js +5 -6
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/announcements/index.js +3 -4
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/api-keys/index.js +4 -5
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/approvals/index.js +4 -5
- package/dist/blocks/assets/index.d.ts +1 -1
- package/dist/blocks/assets/index.js +3 -4
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/assignment/index.js +4 -5
- package/dist/blocks/attachments/index.d.ts +2 -2
- package/dist/blocks/attachments/index.js +4 -5
- package/dist/blocks/audit/index.d.ts +5 -5
- package/dist/blocks/audit/index.js +7 -8
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/automations/index.js +5 -5
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billable-time/index.js +6 -7
- package/dist/blocks/billing/index.d.ts +3 -3
- package/dist/blocks/billing/index.js +5 -6
- package/dist/blocks/bookings/index.d.ts +3 -3
- package/dist/blocks/bookings/index.js +6 -6
- package/dist/blocks/bulk/index.d.ts +4 -3
- package/dist/blocks/bulk/index.js +4 -4
- package/dist/blocks/calendar/index.d.ts +2 -2
- package/dist/blocks/calendar/index.js +6 -6
- package/dist/blocks/catalog/index.d.ts +1 -1
- package/dist/blocks/catalog/index.js +5 -6
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/channels/index.js +3 -4
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/collections/index.js +3 -4
- package/dist/blocks/comments/index.d.ts +5 -5
- package/dist/blocks/comments/index.js +8 -9
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/compliance/index.js +5 -6
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/connectors/index.js +3 -4
- package/dist/blocks/contacts/index.d.ts +1 -1
- package/dist/blocks/contacts/index.js +4 -5
- package/dist/blocks/content/index.d.ts +1 -1
- package/dist/blocks/content/index.js +3 -4
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/contracts/index.js +8 -9
- package/dist/blocks/courses/index.d.ts +1 -1
- package/dist/blocks/courses/index.js +5 -6
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.js +2 -2
- package/dist/blocks/data-lifecycle/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.js +2 -3
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/deals/index.js +9 -10
- package/dist/blocks/dispatch/index.d.ts +1 -1
- package/dist/blocks/dispatch/index.js +7 -8
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/documents/index.js +2 -3
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/domains/index.js +3 -4
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/donations/index.js +7 -8
- package/dist/blocks/drive/index.d.ts +5 -1
- package/dist/blocks/drive/index.js +6 -7
- package/dist/blocks/employees/index.d.ts +2 -2
- package/dist/blocks/employees/index.js +7 -8
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrichment/index.js +2 -3
- package/dist/blocks/enrollments/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.js +3 -4
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/entitlements/index.js +2 -2
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/expenses/index.js +6 -7
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/field-history/index.js +2 -3
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/flags/index.js +4 -5
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.js +5 -6
- package/dist/blocks/forms/index.d.ts +2 -2
- package/dist/blocks/forms/index.js +3 -4
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/goals/index.js +4 -5
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/guests/index.js +4 -5
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/hiring/index.js +4 -5
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/identities/index.js +2 -3
- package/dist/blocks/imports/index.d.ts +1 -1
- package/dist/blocks/imports/index.js +2 -2
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/inbox/index.js +3 -4
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/incidents/index.js +5 -6
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/index.js +6 -6
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/inventory/index.js +3 -4
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/invoices/index.js +6 -7
- 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 +1 -1
- package/dist/blocks/lead-scoring/index.js +4 -5
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leases/index.js +7 -8
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/leave/index.js +4 -5
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/ledger/index.js +3 -4
- package/dist/blocks/mail-sync/index.d.ts +1 -1
- package/dist/blocks/mail-sync/index.js +4 -5
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/memory/index.js +3 -4
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/messaging/index.js +5 -6
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/metrics/index.js +4 -5
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +1 -1
- package/dist/blocks/moderation/index.js +3 -4
- package/dist/blocks/notifications/index.d.ts +4 -4
- package/dist/blocks/notifications/index.js +7 -8
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/numbering/index.js +2 -2
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.js +3 -4
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.js +2 -3
- package/dist/blocks/orders/index.d.ts +9 -2
- package/dist/blocks/orders/index.js +7 -8
- package/dist/blocks/organizations/index.d.ts +3 -3
- package/dist/blocks/organizations/index.js +5 -6
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/outbox/index.js +3 -4
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/passes/index.js +7 -8
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/permissions/index.js +2 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/pipelines/index.js +4 -5
- package/dist/blocks/posts/index.d.ts +1 -1
- package/dist/blocks/posts/index.js +4 -5
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/profiles/index.js +3 -4
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/promotions/index.js +4 -5
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/push/index.js +4 -5
- package/dist/blocks/queue/index.d.ts +1 -1
- package/dist/blocks/queue/index.js +7 -8
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/quotes/index.js +6 -7
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/rank/index.js +2 -2
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/reactions/index.js +3 -4
- package/dist/blocks/relations/index.d.ts +3 -2
- package/dist/blocks/relations/index.js +8 -8
- package/dist/blocks/reminders/index.d.ts +10 -6
- package/dist/blocks/reminders/index.js +13 -12
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/reviews/index.js +3 -4
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.js +3 -3
- package/dist/blocks/scores/index.d.ts +1 -1
- package/dist/blocks/scores/index.js +4 -4
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/search/index.js +2 -3
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/security-events/index.js +2 -3
- package/dist/blocks/segments/index.d.ts +1 -1
- package/dist/blocks/segments/index.js +4 -5
- package/dist/blocks/sequences/index.d.ts +1 -1
- package/dist/blocks/sequences/index.js +3 -4
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.js +3 -4
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +1 -1
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/settings/index.js +2 -3
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/share-links/index.js +6 -6
- package/dist/blocks/shipments/index.d.ts +1 -1
- package/dist/blocks/shipments/index.js +9 -10
- package/dist/blocks/signatures/index.d.ts +1 -1
- package/dist/blocks/signatures/index.js +3 -4
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.js +2 -2
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sla/index.js +7 -8
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/sso/index.js +2 -3
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.js +3 -3
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/subjects/index.js +3 -4
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tags/index.js +5 -5
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/tasks/index.js +7 -8
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/teams/index.js +3 -3
- package/dist/blocks/templates/index.d.ts +3 -3
- package/dist/blocks/templates/index.js +3 -4
- package/dist/blocks/time-tracking/index.d.ts +8 -1
- package/dist/blocks/time-tracking/index.js +9 -10
- package/dist/blocks/timeline/index.d.ts +3 -3
- package/dist/blocks/timeline/index.js +4 -5
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/trash/index.js +3 -4
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/undo/index.js +2 -2
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/usage/index.js +2 -3
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/vercel-marketplace/index.js +3 -4
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/versions/index.js +6 -7
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.js +4 -5
- package/dist/blocks/webhooks/index.d.ts +3 -3
- package/dist/blocks/webhooks/index.js +11 -12
- package/dist/blocks/workflow-editor/index.d.ts +6 -6
- package/dist/blocks/workflow-editor/index.js +9 -10
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/blocks/workflows/index.js +4 -5
- package/dist/{bookings-Dox2rced.d.ts → bookings-BpCNphYp.d.ts} +1 -2
- package/dist/{build-D9lWi5bk.js → build-CM8PJqwW.js} +1 -1
- package/dist/{build-BFC8nFiL.js → build-DbIRFcHQ.js} +3 -65
- package/dist/chat-sdk/index.js +2 -3
- package/dist/cli/{add-CtLjnwds.js → add-BTDPjVGC.js} +9 -9
- package/dist/cli/{add-CH7dC6UR.js → add-C0w-mVTQ.js} +2 -2
- package/dist/cli/add-CspY9jKT.js +1 -0
- package/dist/cli/{backfill-DBJIMzcy.js → backfill-BDdBs6Ne.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-i1w0EEvs.js → blocks-Bs-lA-U_.js} +1 -1
- package/dist/cli/{blocks-CS58-xnw.js → blocks-CQLME-HQ.js} +1 -1
- package/dist/cli/{cache-Cn3crN0v.js → cache-DDKao2Va.js} +1 -1
- package/dist/cli/{codemod-D6wifOAH.js → codemod-Bjl998Do.js} +1 -1
- package/dist/cli/{content-mapper-Q9We297z.js → content-mapper-DgSTl-DL.js} +2 -2
- package/dist/cli/{doctor-DmfdE5Ct.js → doctor-CMLWbt44.js} +57 -55
- package/dist/cli/{gen-D68A0uN8.js → gen-D3VX8WdV.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-N7pkBbJn.js → init-D6D6eWze.js} +5 -5
- package/dist/cli/{live-0xAAlTK_.js → live-C_xgTOfD.js} +2 -2
- package/dist/cli/{mcp-CbN3ulRF.js → mcp-B0Irjbes.js} +2 -2
- package/dist/cli/{metadata-417ldpf4.js → metadata-cLXra-XB.js} +3 -3
- package/dist/cli/{migration-safety-BC_UI4jC.js → migration-safety-OUK-Afbb.js} +1 -1
- package/dist/cli/{migrations-DdBKwrvG.js → migrations-CHenMvl_.js} +1 -1
- package/dist/cli/{module-migration-DdxPdqMC.js → module-migration-6V7vXWUK.js} +2 -2
- package/dist/cli/{powersync-CJTEz-uY.js → powersync-D83yAFbl.js} +2 -2
- package/dist/cli/powersync-DwhCH0gs.js +1 -0
- package/dist/cli/{print-DyFm91R-.js → print-C0OmQyTu.js} +2 -2
- package/dist/cli/{remove-CPY0xsVm.js → remove-BWlOngNT.js} +5 -5
- package/dist/cli/{render-DE3O1OFq.js → render-9m70qveo.js} +22 -5
- package/dist/cli/{run-CcrNGX9C.js → run-He3M-ZRq.js} +21 -21
- package/dist/cli/{run-WtIEFGvP.js → run-gE4eAazR.js} +8 -8
- package/dist/cli/{shared-SlukBuKn.js → shared-Cx2WFVWq.js} +1 -1
- package/dist/cli/{snapshot-pyIsJjUV.js → snapshot-CZb3uVKE.js} +2 -2
- package/dist/cli/{source-Bclt9D0Y.js → source-CrYSCdPZ.js} +1 -1
- package/dist/cli/{spec-D7zsEVj_.js → spec-Cn5RhuQc.js} +2 -2
- package/dist/cli/{spec-BsdLx7tZ.js → spec-D4b9ePuQ.js} +1 -1
- package/dist/cli/{sql-layout-C6baAM5t.js → sql-layout-CLJ67h3L.js} +2 -2
- package/dist/cli/{sync-Cse8VXAU.js → sync-B8VGiaHk.js} +3 -3
- package/dist/cli/{upgrade-Cwc1RiAE.js → upgrade-BvBWK3Fo.js} +4 -4
- package/dist/cli/{upgrade-28ENjIJU.js → upgrade-DMiYx1C8.js} +2 -2
- package/dist/cli/{version-yWIaLG04.js → version-BVg2Z6yv.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/{codecs-BfmQSbM6.js → codecs-CSUFGrdP.js} +3 -3
- package/dist/commerce/index.js +3 -3
- package/dist/{composite-DbRuu6Jb.d.ts → composite-ChzHhSB0.d.ts} +3 -3
- package/dist/{composite-D24L5RIY.js → composite-Dw5ofSF_.js} +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/{config-D74JT0qL.js → config-BOt5T6Vs.js} +1 -1
- package/dist/{context-CjHXhCck.d.ts → context-sgrUjA3U.d.ts} +4 -4
- package/dist/{controller-BeqcjERs.d.ts → controller-B6vWdKSa.d.ts} +1 -1
- package/dist/{controller-BNZKd6bJ.js → controller-qG-B1eDn.js} +1 -1
- package/dist/{conversion-BqDvi8ty.d.ts → conversion-DBgMck5U.d.ts} +1 -1
- package/dist/create/index.d.ts +2 -2
- package/dist/create/index.js +2 -2
- package/dist/{create-blocks-0pWKQ6x4.js → create-blocks-CUS28FfS.js} +13 -9
- package/dist/credentials/index.js +2 -3
- package/dist/{cron-CgHTKwYG.js → cron-DdT4ti8a.js} +1 -1
- package/dist/{cron-route-UU9i5i9J.js → cron-route-FjKgRvTY.js} +1 -1
- package/dist/{deal-forecast-DikouYGj.js → deal-forecast-CKBnRodz.js} +2 -2
- package/dist/{define-Djgn3HQQ.js → define-D-dLADd5.js} +16 -19
- package/dist/{define-BqaUwrIC.d.ts → define-Lf6rI2QN.d.ts} +14 -8
- package/dist/{define-block-CRwHsxZO.d.ts → define-block-DCAiOrNX.d.ts} +12 -3
- package/dist/edge/index.d.ts +5 -5
- package/dist/edge/index.js +3 -3
- package/dist/{entitlements-mDz7GfA_.d.ts → entitlements-BPaPd3MD.d.ts} +1 -1
- package/dist/{entitlements-DBir2qwB.js → entitlements-tGL6-69B.js} +2 -2
- package/dist/{entity-schema-BDv6w-OQ.js → entity-schema-B1YmMtP8.js} +1 -1
- package/dist/events/index.js +2 -2
- package/dist/{executor-3qcMhg6R.js → executor-C2Ne-Scm.js} +3 -2
- package/dist/{executor-Bi056Cnj.d.ts → executor-DNK401lZ.d.ts} +1 -1
- package/dist/{executor-D3gB-9si.js → executor-DqIci3Jb.js} +3 -3
- package/dist/{executor-BQ7dYw4E.js → executor-WolvKszH.js} +3 -3
- package/dist/{executor-_O-CqCPl.d.ts → executor-aFV7nEBs.d.ts} +2 -2
- package/dist/expo/index.d.ts +2 -2
- package/dist/expo/index.js +2 -2
- package/dist/{field-errors-Cfvcg-C3.d.ts → field-errors-DBgDCITw.d.ts} +6 -6
- package/dist/{fields--5a88KJe.js → fields-BBm49w-E.js} +1 -1
- package/dist/{filter-evaluate-w1XOIUOL.js → filter-evaluate-lCToXzZI.js} +2 -2
- package/dist/{filter-query-DMoKo82_.js → filter-query-CQ6d5GnQ.js} +1 -1
- package/dist/{flags-ClOQY-p5.js → flags-DF_SCqp5.js} +1 -1
- package/dist/flags-sdk/index.js +2 -2
- package/dist/{framework-B-1Ka0GW.d.ts → framework-DKA3fTHl.d.ts} +3 -3
- package/dist/{framework-CNhTg0th.js → framework-DXM1vNcV.js} +1 -1
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +2 -2
- package/dist/{index-CjnDGAJr.d.ts → index-5JSxY1MG.d.ts} +1 -1
- package/dist/{index-CYzckGOz.d.ts → index-Bt7_mxn0.d.ts} +9 -5
- package/dist/{index-BzW1T3oI.d.ts → index-ByF22_C6.d.ts} +3 -3
- package/dist/{index-BdzfjFnd.d.ts → index-C4sjewrr.d.ts} +9 -9
- package/dist/{index-DfgP-9eC.d.ts → index-CdMZQCYR.d.ts} +3 -3
- package/dist/{index-EieRHooI.d.ts → index-ClvuSZEz.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -7
- package/dist/{json-schema-Ca6gYbEP.js → json-schema-DHJxiizN.js} +1 -1
- package/dist/{knowledge-CV6OSirC.js → knowledge-tCrrU99q.js} +2 -2
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +3 -3
- package/dist/{list-query-BKy2zBaT.js → list-query-BnpA2BDg.js} +1 -1
- package/dist/{list-query-6vTI1VN6.d.ts → list-query-XYfUZb0j.d.ts} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +4 -4
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/sdk/index.d.ts +2 -2
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/{messages-D4XWuRTj.js → messages-ecPW_nOv.js} +1 -1
- package/dist/{model-messages-CKG0zwdF.js → model-messages-CkZSDDHP.js} +1 -1
- package/dist/{money-codec-uV5WbT60.js → money-codec-BJuS2zEW.js} +1 -1
- package/dist/next/index.d.ts +14 -14
- package/dist/next/index.js +4 -4
- package/dist/{operations-DbNAgo7E.d.ts → operations-DC3wU3Sy.d.ts} +1 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.js +5 -5
- package/dist/{ports-DO3tgLTo.d.ts → ports-BbBJVyS0.d.ts} +1 -1
- package/dist/{ports-CaVRXjxq.js → ports-DvpNseap.js} +1 -1
- package/dist/postgres/index.js +5 -4
- package/dist/{postgrest-executor-BFW4oWte.js → postgrest-executor-B_Uezhrm.js} +7 -3
- package/dist/powersync/index.d.ts +3 -3
- package/dist/powersync/index.js +1 -1
- package/dist/preset/index.d.ts +3 -3
- package/dist/{push-token-IFGi8jvd.d.ts → push-token-CPJfPFa2.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/{rate-limit-BPuUWz4U.js → rate-limit-fZ_d8gSE.js} +4 -5
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +6 -6
- package/dist/react/server.js +1 -1
- package/dist/{react-D-p70_wL.js → react-_D_CeZMk.js} +3 -3
- package/dist/react-router/index.d.ts +3 -3
- package/dist/react-router/index.js +2 -2
- package/dist/{read-set-BnKnofIj.js → read-set-B1sDib5O.js} +1 -1
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +2 -2
- package/dist/{record-bindings-DkBJpC5A.js → record-bindings-Z51mGfhB.js} +1 -1
- package/dist/{record-form-yMVvkPiQ.d.ts → record-form-BbZpwsEi.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/records/index.js +3 -3
- package/dist/{resource-execute-LR71zWej.d.ts → resource-execute-CUG6xUuh.d.ts} +1 -1
- package/dist/{resource-types-eXuFxVt7.d.ts → resource-types-DjZ91WKA.d.ts} +1 -1
- package/dist/{resources-Dpz3h8Fe.d.ts → resources-6Ncdt9XT.d.ts} +1 -1
- package/dist/{rows-EGAbu7MG.js → rows-BdqXmiB-.js} +2 -2
- package/dist/{rows-Bh9QemqN.js → rows-jijHLVE_.js} +1 -1
- package/dist/{rrule-79K2c3Nr.js → rrule-C9Ot6ax8.js} +1 -1
- package/dist/{sales-lines-CP4Z_LyE.js → sales-lines-DO7oRu1o.js} +3 -3
- package/dist/{sales-shared-BKXXA5qV.js → sales-shared-BuTA8JK7.js} +2 -2
- package/dist/{schemas-BSTNfGsQ.js → schemas-CLOTvdsC.js} +1 -1
- package/dist/{scores-CsgM-dw7.js → scores-bY2Is0kx.js} +2 -2
- package/dist/server/index.d.ts +7 -7
- package/dist/server/index.js +5 -5
- package/dist/{server-types-BTBzrzOH.d.ts → server-types-BH6AjDBN.d.ts} +1 -1
- package/dist/{session-BgYGk_FS.d.ts → session-Y5SSYO2C.d.ts} +1 -1
- package/dist/{shared-C47zAh2A.js → shared-BeHTi8Fu.js} +1 -1
- package/dist/{sign-in-BTaRWS-L.js → sign-in-1FJiXXyG.js} +5 -5
- package/dist/{signatures-CNcoq392.js → signatures-CX1b4WHa.js} +2 -2
- package/dist/{signers-BAEzvTJ0.d.ts → signers-BKgmVh6A.d.ts} +2 -2
- package/dist/{signing-keys-DqI-gB_C.js → signing-keys-CWtpMask.js} +3 -3
- package/dist/solid/index.d.ts +6 -6
- 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/index.js +1 -1
- package/dist/{spec-DTWkHzYZ.js → spec-BMvCCNnd.js} +1 -1
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +1 -1
- package/dist/{sql-B0wb7XA5.js → sql-BjjgwJKg.js} +9668 -6251
- package/dist/{sql-BPbbPzRJ.js → sql-CYt7EhH0.js} +2 -2
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/sqlite/index.js +1 -1
- package/dist/{sso-Co2TbnEy.js → sso-DdDpJQzw.js} +2 -2
- package/dist/ssr/index.d.ts +1 -1
- package/dist/storage/index.js +3 -3
- package/dist/streams/index.js +1 -2
- package/dist/{subject-readers-F1xvRY-d.js → subject-readers-CeeJJOQ4.js} +1 -1
- package/dist/svelte/index.d.ts +6 -6
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/{table-schema-CD8cJz_M.js → table-schema-C80xItaV.js} +1 -1
- package/dist/{tags-CXeJu332.d.ts → tags-Cjtcp5cN.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/{temporal-DLZlWbOi.js → temporal-Dbo0fLzc.js} +12 -2
- package/dist/{temporal-required-Dy0GGD8E.js → temporal-required-DcLhnDhQ.js} +1 -1
- package/dist/{tenant-DzymQ9sv.d.ts → tenant-BHvMFNXl.d.ts} +1 -1
- package/dist/testing/index.d.ts +9 -9
- package/dist/testing/index.js +8 -8
- package/dist/{timeline-BMVOKokJ.d.ts → timeline-CEzj9v1z.d.ts} +3 -3
- package/dist/{topic-0uK4db_2.d.ts → topic-gTVjLGTk.d.ts} +2 -2
- package/dist/{types-DsRfiQ0v.d.ts → types-yj8VF4oY.d.ts} +5 -0
- package/dist/{undo-B3FQvuAd.js → undo-BbftL9-4.js} +2 -2
- package/dist/vercel-connect/index.js +1 -1
- package/dist/{verify-ZLFUdlqE.js → verify-7EucfCnv.js} +3 -3
- package/dist/{verify-DexkIx4t.d.ts → verify-B0KLBb3j.d.ts} +1 -1
- package/dist/vue/index.d.ts +6 -6
- package/dist/{watch-topic-CG3kOX-D.d.ts → watch-topic-C6HhbnVz.d.ts} +1 -1
- package/dist/wire-ChYn1g21.js +91 -0
- package/dist/workflow-sdk/builder/index.d.ts +2 -2
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/world/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/skills/better-supabase/references/ui-recipes.md +1 -1
- package/dist/block-transport-PNea4lfQ.js +0 -84
- package/dist/cli/add-DyCrVejx.js +0 -1
- package/dist/cli/powersync-CYQ4Ljcz.js +0 -1
- package/dist/{topic-DXbA-jwr.js → topic-J9I3yu6f.js} +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as mapDbError, n as dbError, o as isDbError, r as dbErrorOf } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
|
-
import { t as temporal } from "./temporal-required-
|
|
3
|
+
import { t as temporal } from "./temporal-required-DcLhnDhQ.js";
|
|
4
4
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
5
|
-
import { n as postgrestExecutor } from "./postgrest-executor-
|
|
5
|
+
import { n as postgrestExecutor } from "./postgrest-executor-B_Uezhrm.js";
|
|
6
6
|
import { n as StatsRecorder } from "./stats-BHl1-zj9.js";
|
|
7
7
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
8
8
|
import { loadEnv } from "./env/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import { r as withBlockHooks } from "./block-hooks-
|
|
2
|
+
import { C as optionalInstant, L as textOf, O as recordOf, P as sha256Hex, h as instantOf, n as applyTemporal, o as blockCall, w as optionalText } from "./block-helpers-B0f0ZVb5.js";
|
|
3
|
+
import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
|
|
4
4
|
//#region src/blocks/ai-cache/ai-cache.ts
|
|
5
5
|
const KINDS = /* @__PURE__ */ new Set([
|
|
6
6
|
"generate",
|
|
@@ -2,9 +2,9 @@ import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
3
|
import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
4
4
|
import { t as fromStorageError } from "./errors-CyxMxzlu.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as withBlockHooks } from "./block-hooks-
|
|
7
|
-
import { c as withFields, n as blockFields, r as extraFieldsArg, t as allWithFields } from "./block-fields-
|
|
5
|
+
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, h as instantOf, m as instantArg, n as applyTemporal, o as blockCall, v as notFoundError, w as optionalText, x as oneOf } from "./block-helpers-B0f0ZVb5.js";
|
|
6
|
+
import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
|
|
7
|
+
import { c as withFields, n as blockFields, r as extraFieldsArg, t as allWithFields } from "./block-fields-BjXgX_5c.js";
|
|
8
8
|
import { n as claimsUploads, t as claimUpload } from "./upload-claim-B1ZU8ydB.js";
|
|
9
9
|
//#region src/blocks/ai-files/rows.ts
|
|
10
10
|
const FILE_STATUSES = [
|
|
@@ -8,7 +8,7 @@ import { t as BlockTransport } from "./block-transport-DWZSJrwN.js";
|
|
|
8
8
|
import { n as BlockHooks } from "./block-hooks-DZN2w69m.js";
|
|
9
9
|
import { g as JobHandler } from "./types-Czq9Xtpa.js";
|
|
10
10
|
import { r as RunState } from "./run-state-BMCD_1Lt.js";
|
|
11
|
-
import { I as Notifier } from "./define-block-
|
|
11
|
+
import { I as Notifier } from "./define-block-DCAiOrNX.js";
|
|
12
12
|
//#region src/blocks/ai-schedules/ai-schedules.d.ts
|
|
13
13
|
/** A task run's state, in the words ai-chat and workflow runs share. */
|
|
14
14
|
type AiTaskRunStatus = Extract<RunState, "queued" | "running" | "completed" | "failed">;
|
|
@@ -2,8 +2,8 @@ import { a as SessionActor, c as agentClaims, r as AgentActOptions } from "../..
|
|
|
2
2
|
import { d as KnowledgeSearchOptions, o as KnowledgeHit, r as Knowledge } from "../../knowledge-F1IhRI4Q.js";
|
|
3
3
|
import { t as Agent } from "../../agents-CMIB3802.js";
|
|
4
4
|
import { P as AiToolPolicy, _ as AiModerationAction, b as AiModerationStage, i as AiChat } from "../../ai-chat-BCaKsvLW.js";
|
|
5
|
-
import { r as AuthorizationOperation } from "../../authorization-
|
|
6
|
-
import { t as OperationTable } from "../../operations-
|
|
5
|
+
import { r as AuthorizationOperation } from "../../authorization-DhoA7dsD.js";
|
|
6
|
+
import { t as OperationTable } from "../../operations-DC3wU3Sy.js";
|
|
7
7
|
import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-D_RsS6ow.js";
|
|
8
8
|
import { n as GatewayOptions } from "../../gateway-options-BlVCqgb8.js";
|
|
9
9
|
import { LanguageModel, LanguageModelMiddleware, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as dbError } from "../../errors-BVFgt8BZ.js";
|
|
2
|
-
import { s as nowInstant } from "../../temporal-
|
|
3
|
-
import { t as temporal } from "../../temporal-required-
|
|
2
|
+
import { s as nowInstant } from "../../temporal-Dbo0fLzc.js";
|
|
3
|
+
import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
|
|
4
4
|
import { a as ok, r as err, t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
5
|
-
import { f as errorText } from "../../block-helpers-
|
|
5
|
+
import { f as errorText } from "../../block-helpers-B0f0ZVb5.js";
|
|
6
6
|
import { experimental_cancelBatch, experimental_getBatchResults, experimental_getBatchStatus, experimental_startBatch } from "ai";
|
|
7
7
|
//#region src/ai-sdk/batches/batches.ts
|
|
8
8
|
const DEFAULT_API = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
2
|
-
import { t as cacheKey } from "../../ai-cache-
|
|
2
|
+
import { t as cacheKey } from "../../ai-cache-BFRKxgZ4.js";
|
|
3
3
|
import { simulateReadableStream } from "ai";
|
|
4
4
|
//#region src/ai-sdk/cache/cache.ts
|
|
5
5
|
const BYTES = "$bytes";
|
|
@@ -3,7 +3,7 @@ import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
|
3
3
|
import { o as problemResponse } from "../../problem-Bf0cJ7tk.js";
|
|
4
4
|
import { n as pathToHistory, r as repairDanglingToolCalls } from "../../history-GH1HJWQV.js";
|
|
5
5
|
import { t as gatewayOptions } from "../../gateway-options-Cl74B7k6.js";
|
|
6
|
-
import { d as problem429, f as runRelease, i as isUIMessage, m as usageOf, r as fromUIMessage, s as toUIMessages, t as AI_SDK_UI_FORMAT } from "../../messages-
|
|
6
|
+
import { d as problem429, f as runRelease, i as isUIMessage, m as usageOf, r as fromUIMessage, s as toUIMessages, t as AI_SDK_UI_FORMAT } from "../../messages-ecPW_nOv.js";
|
|
7
7
|
import { n as teeToStore, t as resumeFromStore } from "../../tee-V97_v1ZS.js";
|
|
8
8
|
import { n as readJson, r as sse, t as badRequest } from "../../http-7-UvHjQe.js";
|
|
9
9
|
import { JsonToSseTransformStream, convertToModelMessages } from "ai";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dbError } from "../../errors-BVFgt8BZ.js";
|
|
2
2
|
import { a as ok, r as err, t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
3
|
-
import { f as errorText } from "../../block-helpers-
|
|
4
|
-
import { r as parseAiFileUrl, t as aiFileUrl } from "../../ai-files-
|
|
3
|
+
import { f as errorText } from "../../block-helpers-B0f0ZVb5.js";
|
|
4
|
+
import { r as parseAiFileUrl, t as aiFileUrl } from "../../ai-files-m_2z3rH1.js";
|
|
5
5
|
import { createDownload } from "ai";
|
|
6
6
|
//#region src/ai-sdk/files/files.ts
|
|
7
7
|
/** Thrown by the download function, so the SDK reports a failed file part. */
|
package/dist/ai-sdk/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as isRecord } from "../guards-6F2bCtQR.js";
|
|
2
|
-
import { s as nowInstant } from "../temporal-
|
|
2
|
+
import { s as nowInstant } from "../temporal-Dbo0fLzc.js";
|
|
3
3
|
import { t as gatewayOptions } from "../gateway-options-Cl74B7k6.js";
|
|
4
|
-
import { c as costBackfill, d as problem429, h as usageQuota, i as isUIMessage, l as modelCatalogRefresh, m as usageOf, n as DENIED_TOOL_OUTPUT, o as toUIMessage, p as usageEntries, r as fromUIMessage, s as toUIMessages, t as AI_SDK_UI_FORMAT, u as modelInputOf } from "../messages-
|
|
5
|
-
import { t as fromModelMessages } from "../model-messages-
|
|
4
|
+
import { c as costBackfill, d as problem429, h as usageQuota, i as isUIMessage, l as modelCatalogRefresh, m as usageOf, n as DENIED_TOOL_OUTPUT, o as toUIMessage, p as usageEntries, r as fromUIMessage, s as toUIMessages, t as AI_SDK_UI_FORMAT, u as modelInputOf } from "../messages-ecPW_nOv.js";
|
|
5
|
+
import { t as fromModelMessages } from "../model-messages-CkZSDDHP.js";
|
|
6
6
|
import { generateText } from "ai";
|
|
7
7
|
//#region src/ai-sdk/providers.ts
|
|
8
8
|
/** The `settings` key that names the credential field, `apiKey` unless set. */
|
package/dist/ai-sdk/mcp/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as DbException } from "../../db-exception-Lngc1W49.js";
|
|
2
2
|
import { n as dbError } from "../../errors-BVFgt8BZ.js";
|
|
3
3
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
4
|
-
import { s as nowInstant } from "../../temporal-
|
|
4
|
+
import { s as nowInstant } from "../../temporal-Dbo0fLzc.js";
|
|
5
5
|
import { a as ok, r as err, t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
6
|
-
import {
|
|
6
|
+
import { P as sha256Hex, f as errorText } from "../../block-helpers-B0f0ZVb5.js";
|
|
7
7
|
import { n as credentialRefInTenant, r as foreignCredentialRef } from "../../provider-B6g7rBZX.js";
|
|
8
8
|
import { n as loadSupabaseMcp } from "../../supabase-mcp-Dz9DgrKP.js";
|
|
9
9
|
import { fingerprintTools } from "ai";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as dbError } from "../../errors-BVFgt8BZ.js";
|
|
2
2
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
3
3
|
import { o as problemResponse } from "../../problem-Bf0cJ7tk.js";
|
|
4
|
-
import { f as runRelease, m as usageOf, o as toUIMessage, t as AI_SDK_UI_FORMAT } from "../../messages-
|
|
5
|
-
import { t as fromModelMessages } from "../../model-messages-
|
|
4
|
+
import { f as runRelease, m as usageOf, o as toUIMessage, t as AI_SDK_UI_FORMAT } from "../../messages-ecPW_nOv.js";
|
|
5
|
+
import { t as fromModelMessages } from "../../model-messages-CkZSDDHP.js";
|
|
6
6
|
import { n as teeToStore, t as resumeFromStore } from "../../tee-V97_v1ZS.js";
|
|
7
7
|
import { n as readJson, r as sse, t as badRequest } from "../../http-7-UvHjQe.js";
|
|
8
8
|
import { t as WORKFLOW_ATTRIBUTES } from "../../attributes-Bzf51_nc.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { St as AnyPlugin, d as MutationIntent, ot as SchemaMeta } from "./types-DFdg_4yN.js";
|
|
2
2
|
import { bt as EventMap } from "./events-vcqenSYU.js";
|
|
3
3
|
import { o as Authorizer } from "./authorizer-B6X09otb.js";
|
|
4
|
-
import {
|
|
4
|
+
import { p as DbBlockSource } from "./define-Lf6rI2QN.js";
|
|
5
5
|
import { n as CloudEventOptions } from "./cloud-event-CzZTJkXv.js";
|
|
6
6
|
import { t as RealtimeStatus } from "./realtime-status-BhNkb-Ow.js";
|
|
7
7
|
import { C as ModelWebhook, E as OperationSource, O as SecurityRequirement, S as ModelTag, a as JsonSchema, b as ModelServer, d as ModelInfo, f as ModelMessage, i as JsonObject, m as ModelOperation, n as DataApiOperation, p as ModelMessageTrait, r as HttpMethod, s as ModelChannel, t as ApiModel, v as ModelSecurityProfileRequirement, w as ModelWorkflow, y as ModelSecurityScheme } from "./model-hwpvole9.js";
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
|
-
import { t as BetterSupabase } from "../define-
|
|
4
|
-
import { n as BetterServer } from "../server-types-
|
|
3
|
+
import { t as BetterSupabase } from "../define-Lf6rI2QN.js";
|
|
4
|
+
import { n as BetterServer } from "../server-types-BH6AjDBN.js";
|
|
5
5
|
import { P as StorageImageOptions } from "../index-CQhPHHDF.js";
|
|
6
6
|
import { a as AuthorizedContext, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CVgQCIBO.js";
|
|
7
7
|
import { t as RefusalRedirects } from "../refusal-OrlI3g4H.js";
|
|
8
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
8
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-DKA3fTHl.js";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
10
10
|
//#region src/astro/index.d.ts
|
|
11
11
|
/**
|
package/dist/astro/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as storageImageUrl } from "../image-url-_d7xYsXK.js";
|
|
2
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
2
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-DZJZTY6g.js";
|
|
3
3
|
import { n as defaultExpose } from "../respond-3RKp6VgU.js";
|
|
4
4
|
import { i as requireCaller, o as runAction } from "../kit-DhlB-vv_.js";
|
|
5
5
|
import { t as around } from "../shared-Bf-I13Ht.js";
|
|
6
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
6
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-DXM1vNcV.js";
|
|
7
7
|
import { r as refusalResponse } from "../refusal-D48CMqpQ.js";
|
|
8
8
|
//#region src/astro/index.ts
|
|
9
9
|
function runtimeEnv(locals) {
|
|
@@ -2,14 +2,14 @@ import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
3
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
4
4
|
import { t as fromStorageError } from "./errors-CyxMxzlu.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as withBlockHooks } from "./block-hooks-
|
|
5
|
+
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, f as errorText, n as applyTemporal, o as blockCall, w as optionalText, z as toInstant } from "./block-helpers-B0f0ZVb5.js";
|
|
6
|
+
import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
|
|
7
7
|
import { a as ttlSeconds, r as transformFor } from "./variants-Cy--Ub-a.js";
|
|
8
|
-
import { c as withFields, i as extraOf, n as blockFields, r as extraFieldsArg, t as allWithFields } from "./block-fields-
|
|
9
|
-
import { n as optionalRecordRefOf } from "./block-subjects-
|
|
8
|
+
import { c as withFields, i as extraOf, n as blockFields, r as extraFieldsArg, t as allWithFields } from "./block-fields-BjXgX_5c.js";
|
|
9
|
+
import { n as optionalRecordRefOf } from "./block-subjects-DFSuFY1a.js";
|
|
10
10
|
import { t as requireOrganization } from "./block-tenant-DHp7subc.js";
|
|
11
11
|
import { n as claimsUploads, t as claimUpload } from "./upload-claim-B1ZU8ydB.js";
|
|
12
|
-
import { t as authorOf } from "./block-authors-
|
|
12
|
+
import { t as authorOf } from "./block-authors-Bw3zdzgl.js";
|
|
13
13
|
//#region src/blocks/attachments/attachments.ts
|
|
14
14
|
const STATUSES = [
|
|
15
15
|
"pending",
|
|
@@ -227,6 +227,7 @@ interface BlockNameRegistry {
|
|
|
227
227
|
readonly tables: {
|
|
228
228
|
readonly "log": "id" | "table" | "record" | "op" | "old" | "new" | "changed" | "actor" | "actorRole" | "tenant" | "occurredAt" | "impersonatedBy" | "impersonationReason" | "supportSession" | "eventType" | "category" | "outcome" | "source" | "targetType" | "metadata" | "idempotencyKey" | "actorKind" | "actorLabel" | "tenantLabel" | "targetLabel" | "summary" | "requestId" | "correlationId" | "scope";
|
|
229
229
|
readonly "restricted": "entry" | "old" | "new" | "ip" | "userAgent" | "metadata" | "sessionId" | "changedValues";
|
|
230
|
+
readonly "registry": "target" | "ignore" | "keyColumns" | "redact" | "category" | "eventPrefix" | "targetType" | "tenantColumn" | "labelColumn";
|
|
230
231
|
};
|
|
231
232
|
readonly functions: "audit" | "audit_event" | "audit_event_many" | "audit_read_tenants" | "audit_reads_all" | "count_audit_events" | "list_audit_events" | "purge_audit_log";
|
|
232
233
|
readonly actions: "view" | "viewAll" | "revert";
|
|
@@ -812,7 +813,10 @@ interface BlockNameRegistry {
|
|
|
812
813
|
readonly primary: "job";
|
|
813
814
|
};
|
|
814
815
|
readonly "idempotency": {
|
|
815
|
-
readonly tables: {
|
|
816
|
+
readonly tables: {
|
|
817
|
+
readonly "keys": "scope" | "key" | "requestHash" | "status" | "statusCode" | "response" | "lockedUntil" | "createdAt" | "expiresAt" | "holder";
|
|
818
|
+
readonly "leases": "scope" | "key" | "holder" | "expiresAt";
|
|
819
|
+
};
|
|
816
820
|
readonly functions: never;
|
|
817
821
|
readonly actions: never;
|
|
818
822
|
readonly hooks: never;
|
|
@@ -1310,7 +1314,10 @@ interface BlockNameRegistry {
|
|
|
1310
1314
|
readonly primary: never;
|
|
1311
1315
|
};
|
|
1312
1316
|
readonly "queue": {
|
|
1313
|
-
readonly tables: {
|
|
1317
|
+
readonly tables: {
|
|
1318
|
+
readonly "messages": "id" | "queue" | "message" | "attempts" | "enqueuedAt" | "visibleAt" | "archivedAt" | "dead" | "dedupeKey" | "maxAttempts";
|
|
1319
|
+
readonly "schedules": "jobName" | "schedule" | "timezone" | "queue" | "payload" | "nextRun" | "lastRun" | "lockedUntil" | "createdAt" | "tenant" | "firstAfter";
|
|
1320
|
+
};
|
|
1314
1321
|
readonly functions: never;
|
|
1315
1322
|
readonly actions: never;
|
|
1316
1323
|
readonly hooks: never;
|
|
@@ -1339,7 +1346,10 @@ interface BlockNameRegistry {
|
|
|
1339
1346
|
readonly primary: never;
|
|
1340
1347
|
};
|
|
1341
1348
|
readonly "rate-limit": {
|
|
1342
|
-
readonly tables: {
|
|
1349
|
+
readonly tables: {
|
|
1350
|
+
readonly "rules": "scope" | "maxRequests" | "period" | "keyClaim";
|
|
1351
|
+
readonly "counters": "scope" | "key" | "windowStart" | "hits" | "period";
|
|
1352
|
+
};
|
|
1343
1353
|
readonly functions: never;
|
|
1344
1354
|
readonly actions: never;
|
|
1345
1355
|
readonly hooks: never;
|
|
@@ -1403,7 +1413,9 @@ interface BlockNameRegistry {
|
|
|
1403
1413
|
readonly primary: "reminder";
|
|
1404
1414
|
};
|
|
1405
1415
|
readonly "reserved-slugs": {
|
|
1406
|
-
readonly tables: {
|
|
1416
|
+
readonly tables: {
|
|
1417
|
+
readonly "slugs": "slug" | "reason";
|
|
1418
|
+
};
|
|
1407
1419
|
readonly functions: never;
|
|
1408
1420
|
readonly actions: never;
|
|
1409
1421
|
readonly hooks: never;
|
|
@@ -1610,6 +1622,7 @@ interface BlockNameRegistry {
|
|
|
1610
1622
|
readonly "scimUsers": "id" | "tenant" | "user" | "externalId" | "userName" | "displayName" | "givenName" | "familyName" | "email" | "emails" | "active" | "version" | "createdAt" | "updatedAt";
|
|
1611
1623
|
readonly "scimGroups": "id" | "tenant" | "displayName" | "externalId" | "role" | "version" | "createdAt" | "updatedAt";
|
|
1612
1624
|
readonly "scimMembers": "group" | "member";
|
|
1625
|
+
readonly "syncLog": "id" | "tenant" | "operation" | "resourceType" | "resourceId" | "status" | "error" | "requestId" | "createdAt";
|
|
1613
1626
|
};
|
|
1614
1627
|
readonly functions: "add_organization_domain" | "check_sso_provider" | "list_organization_domains" | "list_sso_providers" | "organization_domain" | "register_sso_provider" | "remove_organization_domain" | "scim_delete_group" | "scim_delete_user" | "scim_get_group" | "scim_get_user" | "scim_group_role" | "scim_list_groups" | "scim_list_users" | "scim_save_group" | "scim_save_user" | "scim_sync_member" | "sso_access_token_check" | "sso_domain_for" | "sso_on_auth_user" | "sso_provider" | "unregister_sso_provider" | "update_organization_domain" | "verify_organization_domain";
|
|
1615
1628
|
readonly actions: "manage";
|
|
@@ -3216,10 +3229,11 @@ interface BlockConfig<Options extends object = Readonly<Record<string, unknown>>
|
|
|
3216
3229
|
/**
|
|
3217
3230
|
* A schema for the Data API, such as `api`: the module writes a `security
|
|
3218
3231
|
* invoker` wrapper there for each of its functions that `anon` or
|
|
3219
|
-
* `authenticated` may execute (or only those in `functions
|
|
3220
|
-
* `rpcTransport(supabase, { schema:
|
|
3221
|
-
* the module schema (doctor BS312).
|
|
3222
|
-
* wrappers even when `sql.api` is
|
|
3232
|
+
* `authenticated` may execute (or only those in `functions`, plus the ones
|
|
3233
|
+
* the block's TypeScript client calls), so `rpcTransport(supabase, { schema:
|
|
3234
|
+
* "api" })` reaches them without exposing the module schema (doctor BS312).
|
|
3235
|
+
* Defaults to `sql.api`; `false` writes no wrappers even when `sql.api` is
|
|
3236
|
+
* set.
|
|
3223
3237
|
*/
|
|
3224
3238
|
readonly api?: string | false | {
|
|
3225
3239
|
readonly schema: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
|
-
import { t as FILTER_OPERATORS } from "./filter-query-
|
|
3
|
+
import { t as FILTER_OPERATORS } from "./filter-query-CQ6d5GnQ.js";
|
|
4
4
|
import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
5
|
-
import {
|
|
6
|
-
import { r as withBlockHooks } from "./block-hooks-
|
|
5
|
+
import { A as recordsOf, L as textOf, O as recordOf, f as errorText, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText, z as toInstant } from "./block-helpers-B0f0ZVb5.js";
|
|
6
|
+
import { r as withBlockHooks } from "./block-hooks-DKtz0HRh.js";
|
|
7
7
|
import { t as actionKey } from "./automation-D41DXyvT.js";
|
|
8
|
-
import { t as evaluateFilterQuery } from "./filter-evaluate-
|
|
9
|
-
import { i as ruleFilterFieldInfo } from "./fields
|
|
8
|
+
import { t as evaluateFilterQuery } from "./filter-evaluate-lCToXzZI.js";
|
|
9
|
+
import { i as ruleFilterFieldInfo } from "./fields-BBm49w-E.js";
|
|
10
10
|
//#region src/blocks/automations/automations.ts
|
|
11
11
|
const FIELD_TYPES = Object.keys(FILTER_OPERATORS);
|
|
12
12
|
function isFieldType(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DbError, n as BetterResultApi, t as AsyncResult } from "../result-DZeA5KS6.js";
|
|
2
2
|
import { Ct as ApplyExtension, K as Insert, O as AnyFunctions, Z as PrimaryKeyValue, dt as TableMeta, ht as Update, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-
|
|
3
|
+
import { $ as SearchArgs, A as OffsetPageArgs, At as GetArgs, B as Returned, C as FindExt, Ct as AggregateResult, D as ManyWriteArgs, E as ManyResult, F as PageOf, G as UpsertArgs, H as RpcArgs, I as PlainName, J as WriteManyArgs, K as UpsertManyArgs, L as RawRpcOptions, M as OverloadArgs, N as OverloadReturns, O as NoArgName, Ot as CountArgs, P as OverloadedName, Pt as ListArgs, S as DeleteExt, T as ManyOutcome, U as RpcOptions, V as RowFilter, Vt as Payload, W as UpdateArgs, bt as AggregateArgs, et as SearchScore, j as OffsetRangeArgs, lt as ReadSetResult, mt as QuerySpec, nt as ReadSet, pt as InferResult, q as WriteArgs, tt as InferReadSetParams, v as CursorPageArgs, w as GetKey, x as DeleteArgs, y as Db } from "../define-Lf6rI2QN.js";
|
|
4
|
+
import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-XYfUZb0j.js";
|
|
5
5
|
import { Result } from "better-result";
|
|
6
6
|
//#region src/better-result/better-result.d.ts
|
|
7
7
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
|
|
2
2
|
import { o as BlockTenant } from "./block-helpers-CRpAHrp_.js";
|
|
3
|
-
import { t as BetterSupabase,
|
|
3
|
+
import { t as BetterSupabase, y as Db } from "./define-Lf6rI2QN.js";
|
|
4
4
|
import { n as DataEngine } from "./data-engine-BWoz9lED.js";
|
|
5
|
-
import { Dn as GeneratedBlocks } from "./define-block-
|
|
6
|
-
import { rt as BetterQueries } from "./index-
|
|
7
|
-
import { t as ClientPorts } from "./ports-
|
|
5
|
+
import { Dn as GeneratedBlocks } from "./define-block-DCAiOrNX.js";
|
|
6
|
+
import { rt as BetterQueries } from "./index-ClvuSZEz.js";
|
|
7
|
+
import { t as ClientPorts } from "./ports-BbBJVyS0.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
//#region src/client/bind.d.ts
|
|
10
10
|
interface AuthUser {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
2
|
-
import {
|
|
2
|
+
import { w as optionalText } from "./block-helpers-B0f0ZVb5.js";
|
|
3
3
|
//#region src/core/block-authors.ts
|
|
4
4
|
/** A row's `author` object as an `Author`, or `undefined`. */
|
|
5
5
|
function authorOf(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dn as GeneratedBlocks } from "./define-block-
|
|
2
|
-
import { n as TopicPort } from "./watch-topic-
|
|
3
|
-
import { t as ClientPorts } from "./ports-
|
|
4
|
-
import { t as AuthPort } from "./controller-
|
|
1
|
+
import { Dn as GeneratedBlocks } from "./define-block-DCAiOrNX.js";
|
|
2
|
+
import { n as TopicPort } from "./watch-topic-C6HhbnVz.js";
|
|
3
|
+
import { t as ClientPorts } from "./ports-BbBJVyS0.js";
|
|
4
|
+
import { t as AuthPort } from "./controller-B6vWdKSa.js";
|
|
5
5
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
6
6
|
//#region src/blocks/block-env.d.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cloneValue } from "./clone-CkG0-hlI.js";
|
|
2
|
-
import { s as nowInstant } from "./temporal-
|
|
2
|
+
import { s as nowInstant } from "./temporal-Dbo0fLzc.js";
|
|
3
3
|
//#region src/core/block-events.ts
|
|
4
4
|
/**
|
|
5
5
|
* Event types that changed name in 0.6, old to new, for sinks and consumers
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
|
+
import { a as encodeArguments } from "./wire-ChYn1g21.js";
|
|
3
4
|
import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
4
5
|
import { t as toIssues } from "./standard-BA3mLh6w.js";
|
|
5
6
|
//#region src/core/block-fields.ts
|
|
@@ -31,7 +32,7 @@ function readAllFields(fields, rows) {
|
|
|
31
32
|
*/
|
|
32
33
|
function writeFields(fields, values, then) {
|
|
33
34
|
if (values === void 0) return then(void 0);
|
|
34
|
-
return AsyncResult.from(() => fields.write({ ...values })).andThen(then);
|
|
35
|
+
return AsyncResult.from(() => fields.write({ ...values })).map(encodeArguments).andThen(then);
|
|
35
36
|
}
|
|
36
37
|
/** The `fields` object of a row a block function returned, or none. */
|
|
37
38
|
function rowFields(value) {
|
|
@@ -93,7 +94,7 @@ function blockFields(schema, label) {
|
|
|
93
94
|
args: (extra) => AsyncResult.from(async () => {
|
|
94
95
|
if (extra === void 0 || Object.keys(extra).length === 0) return ok(void 0);
|
|
95
96
|
const checked = await fields.write({ ...extra });
|
|
96
|
-
return checked.ok ? ok(checked.data) : checked;
|
|
97
|
+
return checked.ok ? ok(encodeArguments(checked.data)) : checked;
|
|
97
98
|
})
|
|
98
99
|
};
|
|
99
100
|
return fields;
|
|
@@ -133,7 +134,7 @@ async function allWithFields(fields, rows) {
|
|
|
133
134
|
async function extraFieldsArg(fields, extra) {
|
|
134
135
|
if (Object.keys(extra).length === 0) return ok({});
|
|
135
136
|
const valid = await fields.write(extra);
|
|
136
|
-
return valid.ok ? ok({ fields: valid.data }) : valid;
|
|
137
|
+
return valid.ok ? ok({ fields: encodeArguments(valid.data) }) : valid;
|
|
137
138
|
}
|
|
138
139
|
//#endregion
|
|
139
140
|
export { readAllFields as a, withFields as c, extraOf as i, writeFields as l, blockFields as n, readFields as o, extraFieldsArg as r, rowFields as s, allWithFields as t };
|
|
@@ -1,10 +1,90 @@
|
|
|
1
|
+
import { t as DbException } from "./db-exception-Lngc1W49.js";
|
|
1
2
|
import { c as mapDbError, n as dbError, r as dbErrorOf } from "./errors-BVFgt8BZ.js";
|
|
2
3
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
|
-
import { l as provideTemporal } from "./temporal-
|
|
4
|
-
import { t as temporal } from "./temporal-required-
|
|
4
|
+
import { l as provideTemporal } from "./temporal-Dbo0fLzc.js";
|
|
5
|
+
import { t as temporal } from "./temporal-required-DcLhnDhQ.js";
|
|
6
|
+
import { a as encodeArguments } from "./wire-ChYn1g21.js";
|
|
5
7
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
6
|
-
import {
|
|
8
|
+
import { i as sqlIdent } from "./template-Drgg3v2J.js";
|
|
7
9
|
import { t as fromPgError } from "./pg-error-B5QLDcbG.js";
|
|
10
|
+
//#region src/core/block-transport.ts
|
|
11
|
+
/**
|
|
12
|
+
* Calls the functions over Postgres, as the user `client` runs as:
|
|
13
|
+
* `sqlTransport(postgres.asUser(ctx.auth.claims))`. Works for any schema.
|
|
14
|
+
*/
|
|
15
|
+
function sqlTransport(client) {
|
|
16
|
+
return { async call(schema, fn, args) {
|
|
17
|
+
const entries = Object.entries(encodeArguments(args));
|
|
18
|
+
const params = entries.map(([, value]) => value !== null && typeof value === "object" && (!Array.isArray(value) || value.some((entry) => entry !== null && typeof entry === "object")) ? JSON.stringify(value) : value);
|
|
19
|
+
const list = entries.map(([name], index) => `${sqlIdent(name)} => $${String(index + 1)}`).join(", ");
|
|
20
|
+
const [row] = await client.queryRaw(`select ${sqlIdent(schema)}.${sqlIdent(fn)}(${list}) as value`, params);
|
|
21
|
+
return row?.value ?? null;
|
|
22
|
+
} };
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Calls the functions over the Data API with the user's session. Pass `schema`
|
|
26
|
+
* with the API schema that `blocks.<module>.api` writes wrappers into; without
|
|
27
|
+
* it the calls go to the module schema, which then has to be exposed.
|
|
28
|
+
*/
|
|
29
|
+
function rpcTransport(client, options = {}) {
|
|
30
|
+
const untyped = client;
|
|
31
|
+
return { async call(schema, fn, args) {
|
|
32
|
+
const { data, error } = await untyped.schema(options.schema ?? schema).rpc(fn, encodeArguments(args));
|
|
33
|
+
if (error) {
|
|
34
|
+
const message = typeof error === "object" && "message" in error ? String(error.message) : String(error);
|
|
35
|
+
throw Object.assign(new Error(message), error);
|
|
36
|
+
}
|
|
37
|
+
return data;
|
|
38
|
+
} };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Calls the functions through a `Db`'s executor, so a block runs wherever the
|
|
42
|
+
* `Db` does: over PostgREST for `ctx.db` in a normal request, and over direct
|
|
43
|
+
* Postgres as the target in a support session or for an API key. Rejects with
|
|
44
|
+
* the raw database error, like the other transports, so the block's error
|
|
45
|
+
* mappers see the same codes and hints.
|
|
46
|
+
*/
|
|
47
|
+
function dbTransport(db, options = {}) {
|
|
48
|
+
return { async call(schema, fn, args) {
|
|
49
|
+
const executor = db.$executor;
|
|
50
|
+
if (!executor.rpc) throw new TypeError(`dbTransport needs an executor with rpc(); the ${executor.name} executor has none`);
|
|
51
|
+
let raw;
|
|
52
|
+
const capture = (error) => {
|
|
53
|
+
raw = error;
|
|
54
|
+
};
|
|
55
|
+
const result = await executor.rpc(fn, encodeArguments(args), {
|
|
56
|
+
schema: options.schema ?? schema,
|
|
57
|
+
errorMappers: [capture]
|
|
58
|
+
});
|
|
59
|
+
if (result.ok) return result.data;
|
|
60
|
+
if (raw === void 0) throw new DbException(result.error);
|
|
61
|
+
throw Object.assign(new Error(raw.message ?? result.error.message), raw);
|
|
62
|
+
} };
|
|
63
|
+
}
|
|
64
|
+
/** The Postgres or PostgREST error a transport rejected with, if it is one. */
|
|
65
|
+
function rawError(cause) {
|
|
66
|
+
if (!isRecord(cause)) return;
|
|
67
|
+
const field = (key) => {
|
|
68
|
+
const value = cause[key];
|
|
69
|
+
return typeof value === "string" ? value : void 0;
|
|
70
|
+
};
|
|
71
|
+
if (field("code") === void 0) return;
|
|
72
|
+
const raw = {};
|
|
73
|
+
for (const key of [
|
|
74
|
+
"message",
|
|
75
|
+
"code",
|
|
76
|
+
"details",
|
|
77
|
+
"hint",
|
|
78
|
+
"constraint"
|
|
79
|
+
]) {
|
|
80
|
+
const value = field(key);
|
|
81
|
+
if (value !== void 0) raw[key] = value;
|
|
82
|
+
}
|
|
83
|
+
const detail = field("detail");
|
|
84
|
+
if (raw["details"] === void 0 && detail !== void 0) raw["details"] = detail;
|
|
85
|
+
return raw;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
8
88
|
//#region src/core/block-helpers.ts
|
|
9
89
|
/** Provides `options.temporal`, when set, for the block's time values. */
|
|
10
90
|
function applyTemporal(options) {
|
|
@@ -229,6 +309,91 @@ const sleep = (ms, signal) => new Promise((resolve) => {
|
|
|
229
309
|
* `pg`.
|
|
230
310
|
*/
|
|
231
311
|
const toInstant = (value) => value instanceof Date ? temporal().Instant.fromEpochMilliseconds(value.getTime()) : temporal().Instant.from(value);
|
|
312
|
+
const INTERVAL_UNITS = {
|
|
313
|
+
year: "years",
|
|
314
|
+
years: "years",
|
|
315
|
+
mon: "months",
|
|
316
|
+
mons: "months",
|
|
317
|
+
day: "days",
|
|
318
|
+
days: "days"
|
|
319
|
+
};
|
|
320
|
+
const INTERVAL_TIME = /^([+-])?(\d+):(\d{2}):(\d{2})(?:\.(\d{1,9}))?$/;
|
|
321
|
+
const ISO_FIELD = /(-?\d+(?:\.\d+)?)([YMWDHS])/g;
|
|
322
|
+
const ISO_DATE_UNITS = {
|
|
323
|
+
Y: "years",
|
|
324
|
+
M: "months",
|
|
325
|
+
W: "weeks",
|
|
326
|
+
D: "days"
|
|
327
|
+
};
|
|
328
|
+
const ISO_TIME_UNITS = {
|
|
329
|
+
H: "hours",
|
|
330
|
+
M: "minutes",
|
|
331
|
+
S: "seconds"
|
|
332
|
+
};
|
|
333
|
+
/** `P-1DT-2H`, the form Postgres prints a negative ISO interval in. */
|
|
334
|
+
function signedIsoDuration(text) {
|
|
335
|
+
const [date = "", time = ""] = text.slice(1).split("T");
|
|
336
|
+
const fields = {};
|
|
337
|
+
for (const [part, names] of [[date, ISO_DATE_UNITS], [time, ISO_TIME_UNITS]]) for (const [, amount = "0", unit = ""] of part.matchAll(ISO_FIELD)) {
|
|
338
|
+
const name = names[unit];
|
|
339
|
+
if (name === void 0) throw new TypeError(`${text} is not an interval`);
|
|
340
|
+
fields[name] = Number(amount);
|
|
341
|
+
}
|
|
342
|
+
return durationOfFields(fields, text);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* `fields` as a Duration. Postgres lets an interval mix signs (`1 day
|
|
346
|
+
* -01:00:00`), which Temporal refuses, so days then fold into hours; months
|
|
347
|
+
* can't fold and stay an error.
|
|
348
|
+
*/
|
|
349
|
+
function durationOfFields(fields, text) {
|
|
350
|
+
const { seconds = 0, ...rest } = fields;
|
|
351
|
+
const whole = Math.trunc(seconds);
|
|
352
|
+
const nanos = Math.round((seconds - whole) * 1e9);
|
|
353
|
+
const exact = {
|
|
354
|
+
...rest,
|
|
355
|
+
seconds: whole,
|
|
356
|
+
milliseconds: Math.trunc(nanos / 1e6),
|
|
357
|
+
microseconds: Math.trunc(nanos % 1e6 / 1e3),
|
|
358
|
+
nanoseconds: nanos % 1e3
|
|
359
|
+
};
|
|
360
|
+
if (new Set(Object.values(exact).filter((value) => value !== 0).map(Math.sign)).size > 1 && !exact["months"] && !exact["years"]) {
|
|
361
|
+
exact["hours"] = (exact["hours"] ?? 0) + (exact["days"] ?? 0) * 24;
|
|
362
|
+
exact["days"] = 0;
|
|
363
|
+
}
|
|
364
|
+
try {
|
|
365
|
+
return temporal().Duration.from(exact);
|
|
366
|
+
} catch {
|
|
367
|
+
throw new TypeError(`${text} can't be held by a Temporal.Duration`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* An `interval` from jsonb or `pg` as a `Temporal.Duration`: Postgres's own
|
|
372
|
+
* output (`1 day 02:30:00`, `-00:30:00`) or ISO 8601 (`P1DT2H30M`, `P-1D`).
|
|
373
|
+
* Throws for anything else.
|
|
374
|
+
*/
|
|
375
|
+
function intervalOf(value) {
|
|
376
|
+
const text = textOf(value).trim();
|
|
377
|
+
if (/^-?P/.test(text)) return text.slice(text.startsWith("-") ? 1 : 0).includes("-") ? signedIsoDuration(text) : temporal().Duration.from(text);
|
|
378
|
+
const fields = {};
|
|
379
|
+
const tokens = text.split(/\s+/).filter((token) => token !== "");
|
|
380
|
+
for (let index = 0; index < tokens.length; index += 1) {
|
|
381
|
+
const token = tokens[index] ?? "";
|
|
382
|
+
const time = INTERVAL_TIME.exec(token);
|
|
383
|
+
if (time) {
|
|
384
|
+
const sign = time[1] === "-" ? -1 : 1;
|
|
385
|
+
fields["hours"] = sign * Number(time[2]);
|
|
386
|
+
fields["minutes"] = sign * Number(time[3]);
|
|
387
|
+
fields["seconds"] = sign * Number(`${time[4] ?? "0"}.${time[5] ?? "0"}`);
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
const unit = INTERVAL_UNITS[tokens[index + 1] ?? ""];
|
|
391
|
+
if (unit === void 0 || !/^[+-]?\d+$/.test(token)) throw new TypeError(`${text} is not an interval`);
|
|
392
|
+
fields[unit] = Number(token);
|
|
393
|
+
index += 1;
|
|
394
|
+
}
|
|
395
|
+
return durationOfFields(fields, text);
|
|
396
|
+
}
|
|
232
397
|
function errorText(error) {
|
|
233
398
|
if (error instanceof Error) return error.message;
|
|
234
399
|
if (typeof error === "object" && error !== null && "message" in error) return String(error.message);
|
|
@@ -269,4 +434,4 @@ function chunksOf(items, size) {
|
|
|
269
434
|
return chunks;
|
|
270
435
|
}
|
|
271
436
|
//#endregion
|
|
272
|
-
export {
|
|
437
|
+
export { recordsOf as A, workerId as B, optionalInstant as C, readBodyCapped as D, randomToken as E, sleep as F, rawError as H, stringsOf as I, textOf as L, run as M, seconds as N, recordOf as O, sha256Hex as P, toBlockError as R, optionalBigintOf as S, pageOf as T, rpcTransport as U, dbTransport as V, sqlTransport as W, leaseHeartbeat as _, bigintOf as a, nullableText as b, chunksOf as c, enumOrThrow as d, errorText as f, intervalOf as g, instantOf as h, batchResultsOf as i, requiredInstant as j, recordOrEmpty as k, credentialRefOf as l, instantArg as m, applyTemporal as n, blockCall as o, injectableOf as p, asDbError as r, budget as s, DEFAULT_BLOCK_SCHEMA as t, eachLimit as u, notFoundError as v, optionalText as w, oneOf as x, nullableInstant as y, toInstant as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dbError, o as isDbError } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
3
3
|
import { t as consoleLogger } from "./logger-glM28NVN.js";
|
|
4
|
-
import { o as blockCall } from "./block-helpers-
|
|
4
|
+
import { o as blockCall } from "./block-helpers-B0f0ZVb5.js";
|
|
5
5
|
//#region src/core/block-hooks.ts
|
|
6
6
|
const isPlainObject = (value) => {
|
|
7
7
|
const proto = Object.getPrototypeOf(value);
|