better-supabase 0.19.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-B20M2SIi.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-BiOgjXn5.d.ts → api-Cj4W_pqT.d.ts} +1 -1
- package/dist/{app-tables-Q29TR4W9.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-wkfp7hgx.d.ts → bind-CFsctoFJ.d.ts} +4 -4
- package/dist/{block-authors-D9hyCizs.js → block-authors-Bw3zdzgl.js} +1 -1
- package/dist/{block-env-D-zK3_Ta.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-Lr7uTZXQ.js → add-BTDPjVGC.js} +9 -9
- package/dist/cli/{add-D5HxanFm.js → add-C0w-mVTQ.js} +2 -2
- package/dist/cli/add-CspY9jKT.js +1 -0
- package/dist/cli/{backfill-Cl1zEel7.js → backfill-BDdBs6Ne.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CsPua74J.js → blocks-Bs-lA-U_.js} +1 -1
- package/dist/cli/{blocks-f0obMCxm.js → blocks-CQLME-HQ.js} +1 -1
- package/dist/cli/{cache-tvTW5J9K.js → cache-DDKao2Va.js} +1 -1
- package/dist/cli/{codemod-CVzRWS3j.js → codemod-Bjl998Do.js} +1 -1
- package/dist/cli/{content-mapper-C0LJDmVL.js → content-mapper-DgSTl-DL.js} +2 -2
- package/dist/cli/{doctor-q701Qif_.js → doctor-CMLWbt44.js} +57 -55
- package/dist/cli/{gen--vu_c2RF.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-DGz5Hk9X.js → init-D6D6eWze.js} +5 -5
- package/dist/cli/{live-sBPXy0VE.js → live-C_xgTOfD.js} +2 -2
- package/dist/cli/{mcp-DY_YK_WV.js → mcp-B0Irjbes.js} +2 -2
- package/dist/cli/{metadata-CoPGFRMb.js → metadata-cLXra-XB.js} +3 -3
- package/dist/cli/{migration-safety-Cn7OLHJm.js → migration-safety-OUK-Afbb.js} +1 -1
- package/dist/cli/{migrations-CUIEmdnS.js → migrations-CHenMvl_.js} +1 -1
- package/dist/cli/{module-migration-bWK0xO2_.js → module-migration-6V7vXWUK.js} +2 -2
- package/dist/cli/{powersync-DAM5JAmz.js → powersync-D83yAFbl.js} +2 -2
- package/dist/cli/powersync-DwhCH0gs.js +1 -0
- package/dist/cli/{print-Dnbk8J2y.js → print-C0OmQyTu.js} +2 -2
- package/dist/cli/{remove-DAVVPbWw.js → remove-BWlOngNT.js} +5 -5
- package/dist/cli/{render-PJdiRcqF.js → render-9m70qveo.js} +22 -5
- package/dist/cli/{run-6F72J0AQ.js → run-He3M-ZRq.js} +21 -21
- package/dist/cli/{run-D7-FuY6e.js → run-gE4eAazR.js} +8 -8
- package/dist/cli/{shared-9O58FYPm.js → shared-Cx2WFVWq.js} +1 -1
- package/dist/cli/{snapshot-rTRe56PH.js → snapshot-CZb3uVKE.js} +2 -2
- package/dist/cli/{source-EHhEoKBD.js → source-CrYSCdPZ.js} +1 -1
- package/dist/cli/{spec-CR4Y9kn8.js → spec-Cn5RhuQc.js} +2 -2
- package/dist/cli/{spec-DqSbbTzD.js → spec-D4b9ePuQ.js} +1 -1
- package/dist/cli/{sql-layout-BijeFLWv.js → sql-layout-CLJ67h3L.js} +2 -2
- package/dist/cli/{sync-BAmWXRDR.js → sync-B8VGiaHk.js} +3 -3
- package/dist/cli/{upgrade-BKN6eSx-.js → upgrade-BvBWK3Fo.js} +4 -4
- package/dist/cli/{upgrade-oaUd22Il.js → upgrade-DMiYx1C8.js} +2 -2
- package/dist/cli/{version-BkEOr4WS.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-COQJBDmG.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-BI1PPPkw.d.ts → context-sgrUjA3U.d.ts} +4 -4
- package/dist/{controller-DhT57SGq.d.ts → controller-B6vWdKSa.d.ts} +1 -1
- package/dist/{controller-BNZKd6bJ.js → controller-qG-B1eDn.js} +1 -1
- package/dist/{conversion-DAV0hOJQ.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-B-9HVf7m.js → create-blocks-CUS28FfS.js} +27 -11
- 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-Dt9DRqV_.js → define-D-dLADd5.js} +17 -20
- package/dist/{define-B_pxEy7d.d.ts → define-Lf6rI2QN.d.ts} +16 -10
- package/dist/{define-block-D4hZSb2G.d.ts → define-block-DCAiOrNX.d.ts} +30 -8
- package/dist/edge/index.d.ts +5 -5
- package/dist/edge/index.js +3 -3
- package/dist/{entitlements-BhNzAcJR.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-D1UUQEGL.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-D7mzrKjR.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-BghlRbea.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-DZ5VbYvy.d.ts → index-5JSxY1MG.d.ts} +1 -1
- package/dist/{index-Bc-EhTb-.d.ts → index-Bt7_mxn0.d.ts} +9 -5
- package/dist/{index-DsB7dy9R.d.ts → index-ByF22_C6.d.ts} +3 -3
- package/dist/{index-B8iW3y2w.d.ts → index-C4sjewrr.d.ts} +9 -9
- package/dist/{index-BJBwUM9l.d.ts → index-CdMZQCYR.d.ts} +3 -3
- package/dist/{index-BSXQlJt2.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-BIZBVEoF.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 +6 -5
- 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-Dwe0JqBI.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-C0dwbMZF.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-GgLZ66FU.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-eiqGbx9J.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-CWfzJmUd.d.ts → resource-execute-CUG6xUuh.d.ts} +1 -1
- package/dist/{resource-types-BdGAUbKw.d.ts → resource-types-DjZ91WKA.d.ts} +1 -1
- package/dist/{resources-EeQWFMR8.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-rmq2QzsD.d.ts → server-types-BH6AjDBN.d.ts} +1 -1
- package/dist/{session-CpwxyojG.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 +4 -9
- package/dist/storage-api-Dg78Wqsg.js +10 -0
- 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-CkO2erRP.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-BXNF10H5.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-CHtoY7NO.d.ts → timeline-CEzj9v1z.d.ts} +3 -3
- package/dist/{topic-BNkdk7qe.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-CJxqZQdd.d.ts → verify-B0KLBb3j.d.ts} +1 -1
- package/dist/vue/index.d.ts +6 -6
- package/dist/{watch-topic-wl74gws-.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-Bcw12jts.js +0 -1
- package/dist/cli/powersync-CG3Bp6FD.js +0 -1
- package/dist/{topic-DXbA-jwr.js → topic-J9I3yu6f.js} +1 -1
|
@@ -1,26 +1,25 @@
|
|
|
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 { t as temporal } from "../../temporal-required-
|
|
4
|
+
import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
|
|
5
5
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
6
|
-
import { i as sqlTransport, r as rpcTransport, t as dbTransport } from "../../block-transport-PNea4lfQ.js";
|
|
7
6
|
import { i as toBase64, r as fromBase64 } from "../../base64-B9Wlsdj7.js";
|
|
8
7
|
import { a as methodNotAllowed, o as problemResponse } from "../../problem-Bf0cJ7tk.js";
|
|
9
8
|
import { t as MAX_BATCH } from "../../batch-limit-DKVQDz4o.js";
|
|
10
9
|
import { n as webhooksOutSqlOptions, t as webhooksInSqlOptions } from "../../options-D96dScev.js";
|
|
11
|
-
import {
|
|
12
|
-
import { r as withBlockHooks } from "../../block-hooks-
|
|
10
|
+
import { A as recordsOf, D as readBodyCapped, N as seconds, O as recordOf, R as toBlockError, U as rpcTransport, V as dbTransport, W as sqlTransport, c as chunksOf, f as errorText, h as instantOf, i as batchResultsOf, n as applyTemporal, o as blockCall, r as asDbError, s as budget, w as optionalText, y as nullableInstant, z as toInstant } from "../../block-helpers-B0f0ZVb5.js";
|
|
11
|
+
import { r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
|
|
13
12
|
import { a as stripTypePrefix } from "../../cloud-event-XsM53POL.js";
|
|
14
13
|
import { n as credentialRefInTenant, r as foreignCredentialRef } from "../../provider-B6g7rBZX.js";
|
|
15
14
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
16
|
-
import { r as blockEmitter } from "../../block-events-
|
|
15
|
+
import { r as blockEmitter } from "../../block-events-IWAyafO3.js";
|
|
17
16
|
import { n as hmacHex, r as timingSafeEqual } from "../../hmac-B3CTTlfv.js";
|
|
18
|
-
import { i as signWebhook, o as verifySharedSecret, s as verifyWebhook, t as PUBLIC_KEY_PREFIX } from "../../signatures-
|
|
19
|
-
import { t as cronRoute } from "../../cron-route-
|
|
20
|
-
import { t as subjectReaders } from "../../subject-readers-
|
|
21
|
-
import { n as hitRateLimit, o as receiveWebhook } from "../../rate-limit-
|
|
17
|
+
import { i as signWebhook, o as verifySharedSecret, s as verifyWebhook, t as PUBLIC_KEY_PREFIX } from "../../signatures-CX1b4WHa.js";
|
|
18
|
+
import { t as cronRoute } from "../../cron-route-FjKgRvTY.js";
|
|
19
|
+
import { t as subjectReaders } from "../../subject-readers-CeeJJOQ4.js";
|
|
20
|
+
import { n as hitRateLimit, o as receiveWebhook } from "../../rate-limit-fZ_d8gSE.js";
|
|
22
21
|
import { n as defineBlock } from "../../define-block-BGqOO8B3.js";
|
|
23
|
-
import { a as signStripeWebhook, i as isDatabaseWebhook, n as databaseChange, o as stripeInboxVerify, r as hookError, s as verifyStripeWebhook, t as authHook } from "../../verify-
|
|
22
|
+
import { a as signStripeWebhook, i as isDatabaseWebhook, n as databaseChange, o as stripeInboxVerify, r as hookError, s as verifyStripeWebhook, t as authHook } from "../../verify-7EucfCnv.js";
|
|
24
23
|
import { toHttp } from "../../events/index.js";
|
|
25
24
|
//#region src/blocks/webhooks/destinations.ts
|
|
26
25
|
/**
|
|
@@ -216,7 +215,7 @@ function createIncomingWebhooks(options) {
|
|
|
216
215
|
enabled: row["enabled"] === true,
|
|
217
216
|
maxBodyBytes: Number(row["max_body_bytes"]),
|
|
218
217
|
receiveCount: Number(row["receive_count"]),
|
|
219
|
-
lastReceivedAt:
|
|
218
|
+
lastReceivedAt: nullableInstant(row["last_received_at"]),
|
|
220
219
|
lastStatus: row["last_status"] === null ? null : Number(row["last_status"]),
|
|
221
220
|
metadata: isRecord(row["metadata"]) ? row["metadata"] : {},
|
|
222
221
|
subject: typeof row["subject_type"] === "string" && typeof row["subject_id"] === "string" ? {
|
|
@@ -224,7 +223,7 @@ function createIncomingWebhooks(options) {
|
|
|
224
223
|
id: row["subject_id"]
|
|
225
224
|
} : null,
|
|
226
225
|
createdBy: optionalText(row["created_by"]) ?? null,
|
|
227
|
-
createdAt:
|
|
226
|
+
createdAt: instantOf(row["created_at"])
|
|
228
227
|
}))),
|
|
229
228
|
rotate: (id, rotateOptions = {}) => call("rotate_incoming_webhook", {
|
|
230
229
|
endpoint: id,
|
|
@@ -3,13 +3,13 @@ import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
|
3
3
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
4
4
|
import { Ct as Events, gt as WorkflowEventData } from "../../events-vcqenSYU.js";
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
6
|
-
import { c as BlockOf } from "../../define-block-
|
|
6
|
+
import { c as BlockOf } from "../../define-block-DCAiOrNX.js";
|
|
7
7
|
import { g as Workflows, n as WorkflowRun } from "../../workflows-B0ZPAQu0.js";
|
|
8
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
9
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
11
|
-
import { A as WorkflowVersionOwner, B as WorkflowGraphNode, C as WorkflowGrantPrincipal, D as WorkflowTrigger, E as WorkflowStepInfo, F as WorkflowFilterCondition, G as durationMs, H as WorkflowNodeKind, I as WorkflowFilterField, J as matchesFilter, K as evaluateCondition, L as WorkflowGraph, M as GraphScope, N as WorkflowCondition, O as WorkflowTriggerKind, P as WorkflowConditionOperator, R as WorkflowGraphDiff, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as approved, V as WorkflowNodeCondition, W as diffGraphs, X as validateGraph, Y as topologicalOrder, _ as WorkflowCredential, a as CredentialInput, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, j as WorkflowVersionStatus, k as WorkflowVersion, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, o as DefinitionInput, p as TriggerInput, q as filterConditionOf, r as BuilderStartCall, s as GrantInput, t as AlertInput, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WorkflowGraphEdge } from "../../types-
|
|
12
|
-
import { a as GraphSubject, c as graphRunFields, i as GraphStepCall, l as startNodeOf, n as GraphRunFields, o as approvalToken, r as GraphRuntime, s as executeGraph, t as GraphApprovalCall } from "../../executor-
|
|
8
|
+
import { p as SubscriptionStatus } from "../../topic-gTVjLGTk.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-C6HhbnVz.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-B6vWdKSa.js";
|
|
11
|
+
import { A as WorkflowVersionOwner, B as WorkflowGraphNode, C as WorkflowGrantPrincipal, D as WorkflowTrigger, E as WorkflowStepInfo, F as WorkflowFilterCondition, G as durationMs, H as WorkflowNodeKind, I as WorkflowFilterField, J as matchesFilter, K as evaluateCondition, L as WorkflowGraph, M as GraphScope, N as WorkflowCondition, O as WorkflowTriggerKind, P as WorkflowConditionOperator, R as WorkflowGraphDiff, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as approved, V as WorkflowNodeCondition, W as diffGraphs, X as validateGraph, Y as topologicalOrder, _ as WorkflowCredential, a as CredentialInput, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, j as WorkflowVersionStatus, k as WorkflowVersion, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, o as DefinitionInput, p as TriggerInput, q as filterConditionOf, r as BuilderStartCall, s as GrantInput, t as AlertInput, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WorkflowGraphEdge } from "../../types-yj8VF4oY.js";
|
|
12
|
+
import { a as GraphSubject, c as graphRunFields, i as GraphStepCall, l as startNodeOf, n as GraphRunFields, o as approvalToken, r as GraphRuntime, s as executeGraph, t as GraphApprovalCall } from "../../executor-DNK401lZ.js";
|
|
13
13
|
//#region src/blocks/workflow-editor/workflow-editor.d.ts
|
|
14
14
|
/**
|
|
15
15
|
* The `workflow-editor` module's definitions, versions, triggers, credentials,
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
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
|
-
import { i as sqlTransport, r as rpcTransport, t as dbTransport } from "../../block-transport-PNea4lfQ.js";
|
|
5
4
|
import { t as workflowEditorSqlOptions } from "../../options-DFpyP1bg.js";
|
|
6
5
|
import { n as whileSignedIn, t as defineController } from "../../controller-BEliOBOv.js";
|
|
7
|
-
import { A as
|
|
8
|
-
import { r as withBlockHooks } from "../../block-hooks-
|
|
6
|
+
import { A as recordsOf, C as optionalInstant, E as randomToken, I as stringsOf, L as textOf, N as seconds, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, j as requiredInstant, k as recordOrEmpty, n as applyTemporal, o as blockCall, p as injectableOf, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
|
|
7
|
+
import { r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
|
|
9
8
|
import { n as LEGACY_PERMISSION_CAP_CLAIM, r as PERMISSION_CAP_CLAIM } from "../../delegation-DGOIiT8k.js";
|
|
10
9
|
import { n as credentialRefInTenant, r as foreignCredentialRef } from "../../provider-B6g7rBZX.js";
|
|
11
10
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
12
|
-
import { n as blockFields } from "../../block-fields-
|
|
11
|
+
import { n as blockFields } from "../../block-fields-BjXgX_5c.js";
|
|
13
12
|
import { n as defineBlock } from "../../define-block-BGqOO8B3.js";
|
|
14
13
|
import { n as watchRun, t as firstError } from "../../run-watch-B-LoK5m1.js";
|
|
15
|
-
import { a as approved, c as evaluateCondition, f as matchesFilter, i as startNodeOf, l as filterConditionOf, m as validateGraph, n as executeGraph, o as diffGraphs, p as topologicalOrder, r as graphRunFields, s as durationMs, t as approvalToken, u as graphOf } from "../../executor-
|
|
14
|
+
import { a as approved, c as evaluateCondition, f as matchesFilter, i as startNodeOf, l as filterConditionOf, m as validateGraph, n as executeGraph, o as diffGraphs, p as topologicalOrder, r as graphRunFields, s as durationMs, t as approvalToken, u as graphOf } from "../../executor-DqIci3Jb.js";
|
|
16
15
|
//#region src/blocks/workflow-editor/rows.ts
|
|
17
16
|
const VERSION_STATUSES = [
|
|
18
17
|
"draft",
|
|
@@ -176,11 +175,11 @@ const forbidden = (message, hint, permissions) => dbError("forbidden", message,
|
|
|
176
175
|
* checked publisher (a user or the tenant's service principal), capped to the
|
|
177
176
|
* version's stored permissions.
|
|
178
177
|
*/
|
|
179
|
-
function defaultClaims(automation, publisher) {
|
|
178
|
+
function defaultClaims(automation, publisher, tenantClaim) {
|
|
180
179
|
return {
|
|
181
180
|
role: "authenticated",
|
|
182
181
|
sub: publisher,
|
|
183
|
-
...automation.tenant === null ? {} : {
|
|
182
|
+
...automation.tenant === null ? {} : { [tenantClaim]: automation.tenant },
|
|
184
183
|
[PERMISSION_CAP_CLAIM]: automation.permissions
|
|
185
184
|
};
|
|
186
185
|
}
|
|
@@ -228,7 +227,7 @@ function mayPublishRefusal(call, mayPublish, version, claims) {
|
|
|
228
227
|
* system definition's run belongs to. Every refusal is an error; nothing falls
|
|
229
228
|
* back to the service role.
|
|
230
229
|
*/
|
|
231
|
-
function runAsPublisher(serviceCall, runAs, version, tenant) {
|
|
230
|
+
function runAsPublisher(serviceCall, runAs, version, tenant, tenantClaim = "tenant_id") {
|
|
232
231
|
if (version === void 0) return AsyncResult.err(dbError("invalid_request", "The step call has no version id: pass meta.versionId to the graph runtime as version"));
|
|
233
232
|
return serviceCall("workflow_run_principal", {
|
|
234
233
|
version,
|
|
@@ -243,7 +242,7 @@ function runAsPublisher(serviceCall, runAs, version, tenant) {
|
|
|
243
242
|
}).andThen(async (automation) => {
|
|
244
243
|
if (runAs === void 0) {
|
|
245
244
|
if (automation.publisher === null) return err(forbidden("Install the service-accounts module or pass automation.runAs to createWorkflowEditor: an organization's workflow runs as its service principal", "WORKFLOW_PUBLISHER_REVOKED"));
|
|
246
|
-
return ok(defaultClaims(automation, automation.publisher));
|
|
245
|
+
return ok(defaultClaims(automation, automation.publisher, tenantClaim));
|
|
247
246
|
}
|
|
248
247
|
const claims = await settled(() => runAs(automation));
|
|
249
248
|
if (claims === void 0 || claims === null || !isRecord(claims)) return err(forbidden(automation.publisher === null ? "The app has no service principal for this organization's workflow" : "The user who published this workflow can no longer run it", "WORKFLOW_PUBLISHER_REVOKED"));
|
|
@@ -383,7 +382,7 @@ function createWorkflowEditor(options) {
|
|
|
383
382
|
}),
|
|
384
383
|
list: (definition) => call("workflow_versions_list", { definition }, (value) => recordsOf(value, "workflow_versions_list").map(versionOf)),
|
|
385
384
|
get: getVersion,
|
|
386
|
-
runAs: (version, tenant) => runAsPublisher(serviceCall, options.authorization?.automation?.runAs, version, tenant),
|
|
385
|
+
runAs: (version, tenant) => runAsPublisher(serviceCall, options.authorization?.automation?.runAs, version, tenant, options.tenantClaim),
|
|
387
386
|
diff: (from, to) => getVersion(from).andThen(async (before) => {
|
|
388
387
|
const after = await getVersion(to);
|
|
389
388
|
if (!after.ok) return after;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DZeA5KS6.js";
|
|
2
2
|
import { Ct as Events, _t as WorkflowRunEventData } from "../../events-vcqenSYU.js";
|
|
3
3
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
4
|
-
import { c as BlockOf } from "../../define-block-
|
|
4
|
+
import { c as BlockOf } from "../../define-block-DCAiOrNX.js";
|
|
5
5
|
import { _ as WorkflowsHooks, a as WorkflowRunStatus, c as WorkflowScheduleInput, d as WorkflowStartTicket, f as WorkflowStarter, g as Workflows, h as WorkflowTickResult, i as WorkflowRunRecord, l as WorkflowStartCall, m as WorkflowTickOptions, n as WorkflowRun, o as WorkflowRunsQuery, s as WorkflowSchedule, u as WorkflowStartRequest, v as WorkflowsOptions, y as createWorkflows } from "../../workflows-B0ZPAQu0.js";
|
|
6
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
7
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
6
|
+
import { p as SubscriptionStatus } from "../../topic-gTVjLGTk.js";
|
|
7
|
+
import { n as TopicPort } from "../../watch-topic-C6HhbnVz.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-B6vWdKSa.js";
|
|
9
9
|
//#region src/blocks/workflows/client.d.ts
|
|
10
10
|
interface WorkflowRunsControllerOptions {
|
|
11
11
|
readonly client: {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
2
|
-
import { t as temporal } from "../../temporal-required-
|
|
2
|
+
import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
|
|
3
3
|
import { a as ok, r as err } from "../../result-ntFBW2p2.js";
|
|
4
|
-
import { i as sqlTransport, r as rpcTransport, t as dbTransport } from "../../block-transport-PNea4lfQ.js";
|
|
5
4
|
import { n as whileSignedIn, t as defineController } from "../../controller-BEliOBOv.js";
|
|
6
|
-
import { A as
|
|
7
|
-
import { r as withBlockHooks } from "../../block-hooks-
|
|
5
|
+
import { A as recordsOf, C as optionalInstant, L as textOf, N as seconds, O as recordOf, T as pageOf, U as rpcTransport, V as dbTransport, W as sqlTransport, f as errorText, j as requiredInstant, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
|
|
6
|
+
import { r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
|
|
8
7
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
9
|
-
import { n as nextCronRun, t as assertCron } from "../../cron-
|
|
8
|
+
import { n as nextCronRun, t as assertCron } from "../../cron-DdT4ti8a.js";
|
|
10
9
|
import { n as defineBlock } from "../../define-block-BGqOO8B3.js";
|
|
11
10
|
import { n as watchRun } from "../../run-watch-B-LoK5m1.js";
|
|
12
11
|
//#region src/blocks/workflows/workflows.ts
|
|
@@ -193,8 +193,7 @@ interface PlacedBooking extends Booking {
|
|
|
193
193
|
interface PublicBookingService {
|
|
194
194
|
readonly id: string;
|
|
195
195
|
readonly name: string;
|
|
196
|
-
|
|
197
|
-
readonly duration: string;
|
|
196
|
+
readonly duration: Temporal.Duration;
|
|
198
197
|
readonly resources: readonly {
|
|
199
198
|
readonly id: string;
|
|
200
199
|
readonly name: string;
|
|
@@ -2,7 +2,7 @@ import { r as isPlainObject } from "./clone-CkG0-hlI.js";
|
|
|
2
2
|
import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
3
3
|
import { t as instanceProperty } from "./instance-property-hRh88y_s.js";
|
|
4
4
|
import { s as problemType, t as PROBLEM_CONTENT_TYPE } from "./problem-Bf0cJ7tk.js";
|
|
5
|
-
import { t as buildJsonSchema } from "./json-schema-
|
|
5
|
+
import { t as buildJsonSchema } from "./json-schema-DHJxiizN.js";
|
|
6
6
|
import { r as dataschemaOf } from "./cloud-event-XsM53POL.js";
|
|
7
7
|
import { r as planResource } from "./resource-DvgXqZB_.js";
|
|
8
8
|
import { n as pageQuery, r as pageSchema } from "./resource-schemas-up6bKOUi.js";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { r as isPlainObject } from "./clone-CkG0-hlI.js";
|
|
2
2
|
import { t as DbException } from "./db-exception-Lngc1W49.js";
|
|
3
3
|
import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
4
|
-
import { d as temporalText } from "./temporal-DLZlWbOi.js";
|
|
5
4
|
import { t as escapeLike } from "./escape-like-DHfx6jRr.js";
|
|
6
|
-
import { d as isFilterQuery, f as tableFilterFields, i as checkFilterQuery, u as filterWhere } from "./filter-query-
|
|
5
|
+
import { d as isFilterQuery, f as tableFilterFields, i as checkFilterQuery, u as filterWhere } from "./filter-query-CQ6d5GnQ.js";
|
|
7
6
|
import { t as lookupOf } from "./lookup-BaP5bI27.js";
|
|
8
7
|
import { i as or, r as not, t as and } from "./types-R6syp1el.js";
|
|
9
|
-
import {
|
|
8
|
+
import { o as encodeValue } from "./wire-ChYn1g21.js";
|
|
10
9
|
//#region src/schema/define.ts
|
|
11
10
|
/**
|
|
12
11
|
* Binds generated model types to runtime metadata. Called from the generated
|
|
@@ -57,67 +56,6 @@ function filterTreeWhere(table, input) {
|
|
|
57
56
|
return { where: query === void 0 ? void 0 : filterWhere(query, fields) };
|
|
58
57
|
}
|
|
59
58
|
//#endregion
|
|
60
|
-
//#region src/ir/wire.ts
|
|
61
|
-
/** ISO text of a `Date`; an invalid date has none. */
|
|
62
|
-
function dateText(value) {
|
|
63
|
-
if (Number.isNaN(value.getTime())) throw new DbException(dbError("invalid_value", "The Date is invalid"));
|
|
64
|
-
return value.toISOString();
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Wire form of an app value: Temporal values and `Date` to ISO text, `bigint`
|
|
68
|
-
* to decimal text.
|
|
69
|
-
*/
|
|
70
|
-
function encodeValue(value) {
|
|
71
|
-
if (typeof value !== "object" || value === null) return typeof value === "bigint" ? value.toString() : value;
|
|
72
|
-
if (value instanceof Date) return dateText(value);
|
|
73
|
-
const text = temporalText(value);
|
|
74
|
-
if (text !== void 0) return text;
|
|
75
|
-
if (Array.isArray(value)) return value.map(encodeValue);
|
|
76
|
-
return value;
|
|
77
|
-
}
|
|
78
|
-
/** Postgres timestamps can be `infinity`; Temporal has no such value. */
|
|
79
|
-
function finite(value, type) {
|
|
80
|
-
const text = String(value);
|
|
81
|
-
if (text === "infinity" || text === "-infinity") throw new DbException(dbError("invalid_value", `${text} can't be held by a Temporal.${type}`));
|
|
82
|
-
return text;
|
|
83
|
-
}
|
|
84
|
-
const TIMESTAMPTZ = /^(\d{4,})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)$/;
|
|
85
|
-
/**
|
|
86
|
-
* `timestamptz` text in UTC as ISO 8601 with a `Z`, from either PostgREST's
|
|
87
|
-
* form (`2026-10-21T07:10:00.123456+00:00`) or Postgres text (`2026-10-21
|
|
88
|
-
* 07:10:00.123456+02`). The fraction keeps every digit it had, so no
|
|
89
|
-
* microsecond is lost; `infinity` and `-infinity` pass through.
|
|
90
|
-
*/
|
|
91
|
-
function utcText(value) {
|
|
92
|
-
const text = String(value);
|
|
93
|
-
if (text === "infinity" || text === "-infinity") return text;
|
|
94
|
-
const match = TIMESTAMPTZ.exec(text);
|
|
95
|
-
if (!match) throw new DbException(dbError("invalid_value", `${text} is not a timestamptz`));
|
|
96
|
-
const [, year, month, day, hour, minute, second, fraction, zulu, sign] = match;
|
|
97
|
-
const offset = zulu ? 0 : (sign === "-" ? -1 : 1) * (Number(match[10]) * 3600 + Number(match[11] ?? 0) * 60 + Number(match[12] ?? 0));
|
|
98
|
-
const utc = /* @__PURE__ */ new Date(0);
|
|
99
|
-
utc.setUTCFullYear(Number(year), Number(month) - 1, Number(day));
|
|
100
|
-
utc.setUTCHours(Number(hour), Number(minute), Number(second) - offset, 0);
|
|
101
|
-
if (Number.isNaN(utc.getTime())) throw new DbException(dbError("invalid_value", `${text} is not a timestamptz`));
|
|
102
|
-
return `${utc.toISOString().slice(0, -5)}${fraction ? `.${fraction}` : ""}Z`;
|
|
103
|
-
}
|
|
104
|
-
/** App form of one wire scalar for a column with `codec`. */
|
|
105
|
-
function decodeScalar(codec, value) {
|
|
106
|
-
if (value === null || value === void 0) return value;
|
|
107
|
-
switch (codec) {
|
|
108
|
-
case "instant": return temporal().Instant.from(finite(value, "Instant"));
|
|
109
|
-
case "plainDateTime": return temporal().PlainDateTime.from(finite(value, "PlainDateTime"));
|
|
110
|
-
case "bigint": return BigInt(value);
|
|
111
|
-
case "string": return String(value);
|
|
112
|
-
case "utcString": return utcText(value);
|
|
113
|
-
default: return codec;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/** App form of a wire value for a column with `codec`. */
|
|
117
|
-
function decodeValue(codec, value) {
|
|
118
|
-
return Array.isArray(value) ? value.map((item) => decodeScalar(codec, item)) : decodeScalar(codec, value);
|
|
119
|
-
}
|
|
120
|
-
//#endregion
|
|
121
59
|
//#region src/ir/build.ts
|
|
122
60
|
const AGGREGATE_KEYS = {
|
|
123
61
|
_sum: "sum",
|
|
@@ -794,4 +732,4 @@ var IrBuilder = class {
|
|
|
794
732
|
}
|
|
795
733
|
};
|
|
796
734
|
//#endregion
|
|
797
|
-
export {
|
|
735
|
+
export { tableMeta as i, invalidRequest as n, defineSchema as r, builderFor as t };
|
package/dist/chat-sdk/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../guards-6F2bCtQR.js";
|
|
2
|
-
import { s as nowInstant } from "../temporal-
|
|
3
|
-
import {
|
|
4
|
-
import { C as optionalText, I as textOf, R as toInstant, T as randomToken, f as errorText, j as run, o as blockCall } from "../block-helpers-DnCtsKtv.js";
|
|
2
|
+
import { s as nowInstant } from "../temporal-Dbo0fLzc.js";
|
|
3
|
+
import { E as randomToken, L as textOf, M as run, U as rpcTransport, V as dbTransport, W as sqlTransport, f as errorText, o as blockCall, w as optionalText, z as toInstant } from "../block-helpers-B0f0ZVb5.js";
|
|
5
4
|
import { r as writeToStore } from "../tee-V97_v1ZS.js";
|
|
6
5
|
import { BaseFormatConverter, Message, defaultEmojiResolver, parseMarkdown, stringifyMarkdown } from "chat";
|
|
7
6
|
//#region src/chat-sdk/delivery.ts
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BVg2Z6yv.js";
|
|
4
4
|
import { a as parseNames, n as CliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
|
|
6
|
-
import { t as loadSnapshot } from "./snapshot-
|
|
6
|
+
import { t as loadSnapshot } from "./snapshot-CZb3uVKE.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
|
-
import { a as toCatalog } from "./source-
|
|
9
|
-
import { n as dataMigration } from "./migrations-
|
|
8
|
+
import { a as toCatalog } from "./source-CrYSCdPZ.js";
|
|
9
|
+
import { n as dataMigration } from "./migrations-CHenMvl_.js";
|
|
10
10
|
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BH0goim0.js";
|
|
11
11
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
12
|
-
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-
|
|
12
|
+
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-OUK-Afbb.js";
|
|
13
13
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
14
14
|
import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-CrWfk8s3.js";
|
|
15
|
-
import { t as syncModules } from "./sync-
|
|
16
|
-
import { t as addModules } from "./add-
|
|
17
|
-
import { n as ident } from "./live-
|
|
18
|
-
import { t as blockNames } from "./blocks-
|
|
15
|
+
import { t as syncModules } from "./sync-B8VGiaHk.js";
|
|
16
|
+
import { t as addModules } from "./add-C0w-mVTQ.js";
|
|
17
|
+
import { n as ident } from "./live-C_xgTOfD.js";
|
|
18
|
+
import { t as blockNames } from "./blocks-Bs-lA-U_.js";
|
|
19
19
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { dirname, join, posix, resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-
|
|
2
|
+
import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-CHenMvl_.js";
|
|
3
3
|
import { r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
4
|
import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-CrWfk8s3.js";
|
|
5
|
-
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-
|
|
5
|
+
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-B8VGiaHk.js";
|
|
6
6
|
import { basename, dirname } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as addCommand } from "./add-BTDPjVGC.js";
|
|
@@ -3,7 +3,7 @@ import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
|
3
3
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
4
4
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
|
|
5
5
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
6
|
+
import { n as ident } from "./live-C_xgTOfD.js";
|
|
7
7
|
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-z-jkabmO.js";
|
|
8
8
|
//#region src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
package/dist/cli/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
4
|
-
import { n as listModules, t as printModule } from "./print-
|
|
4
|
+
import { n as listModules, t as printModule } from "./print-C0OmQyTu.js";
|
|
5
5
|
import { t as decodePresetInput } from "./preset-BwmIfFnh.js";
|
|
6
6
|
import { BLOCK_CATEGORIES } from "better-supabase/blocks";
|
|
7
7
|
import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-
|
|
1
|
+
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-Bs-lA-U_.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-BVg2Z6yv.js";
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
@@ -4,7 +4,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
|
|
|
4
4
|
import { t as migrateCliCall } from "./moved-DVwgE8lV.js";
|
|
5
5
|
import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
|
|
6
6
|
import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
7
|
-
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-
|
|
7
|
+
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-CLJ67h3L.js";
|
|
8
8
|
import { a as configObject, c as mask, f as setPathInConfig, g as skipSpace, h as setPresetInJson, i as closingIndex, l as properties, m as setPresetInConfig, o as indentAt, p as setPathInJson, t as addBlocksToConfig, v as codeRanges } from "./config-edit-CrWfk8s3.js";
|
|
9
9
|
import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-R7UChFFl.js";
|
|
10
10
|
import { a as REVIEW_0_15, c as renameSubpaths, r as PLUGIN_IMPORT_RENAMES, s as SUBPATH_RENAMES_0_15, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
2
|
-
import { t as CACHE_DIR } from "./cache-
|
|
3
|
-
import { x as installedVersion } from "./snapshot-
|
|
2
|
+
import { t as CACHE_DIR } from "./cache-DDKao2Va.js";
|
|
3
|
+
import { x as installedVersion } from "./snapshot-CZb3uVKE.js";
|
|
4
4
|
import { t as i } from "./jsonc-D5Fu67jw.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-BVg2Z6yv.js";
|
|
4
4
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
6
6
|
import { a as sameText, t as display } from "./io-DH1kcmmP.js";
|
|
7
|
-
import { t as CACHE_DIR } from "./cache-
|
|
7
|
+
import { t as CACHE_DIR } from "./cache-DDKao2Va.js";
|
|
8
8
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
9
|
-
import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-
|
|
10
|
-
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-
|
|
9
|
+
import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-CZb3uVKE.js";
|
|
10
|
+
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-9m70qveo.js";
|
|
11
11
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
12
|
-
import { i as request } from "./source-
|
|
13
|
-
import { g as providerLabel, u as compiledReadSets } from "./migrations-
|
|
12
|
+
import { i as request } from "./source-CrYSCdPZ.js";
|
|
13
|
+
import { g as providerLabel, u as compiledReadSets } from "./migrations-CHenMvl_.js";
|
|
14
14
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
|
|
15
15
|
import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
|
|
16
16
|
import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
|
|
17
17
|
import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
|
|
18
18
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
19
|
-
import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-
|
|
19
|
+
import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-DgSTl-DL.js";
|
|
20
20
|
import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
21
|
-
import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-
|
|
22
|
-
import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-
|
|
23
|
-
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-
|
|
24
|
-
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-
|
|
25
|
-
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-
|
|
21
|
+
import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-gE4eAazR.js";
|
|
22
|
+
import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-CLJ67h3L.js";
|
|
23
|
+
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-Cx2WFVWq.js";
|
|
24
|
+
import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-6V7vXWUK.js";
|
|
25
|
+
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-OUK-Afbb.js";
|
|
26
26
|
import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
|
|
27
|
-
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-
|
|
27
|
+
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-C_xgTOfD.js";
|
|
28
28
|
import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
|
|
29
29
|
import { i as PLUGIN_SUBPATH_RENAMES, n as BLOCK_SUBPATH_RENAMES, o as SPEC_SUBPATH_RENAMES, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
|
|
30
30
|
import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
|
|
31
31
|
import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
|
|
32
32
|
import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-BYlQ96WS.js";
|
|
33
|
-
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-
|
|
33
|
+
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-cLXra-XB.js";
|
|
34
34
|
import { existsSync } from "node:fs";
|
|
35
35
|
import { dirname, resolve } from "node:path";
|
|
36
36
|
import { createHash } from "node:crypto";
|
|
37
37
|
import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
38
|
-
import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths } from "better-supabase/config";
|
|
38
|
+
import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths, tenantNameOf } from "better-supabase/config";
|
|
39
39
|
import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, appTablePolicyNotes, blockFileState, blockSqlVersion, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, widenedCommands } from "better-supabase/sql";
|
|
40
40
|
import { defineBucket, parseSize } from "better-supabase/storage";
|
|
41
41
|
//#region src/cli/doctor/env.ts
|
|
@@ -1586,6 +1586,47 @@ function onUnknownRecordTypes(context) {
|
|
|
1586
1586
|
})));
|
|
1587
1587
|
}
|
|
1588
1588
|
//#endregion
|
|
1589
|
+
//#region src/cli/doctor/partitioned-tables.ts
|
|
1590
|
+
/**
|
|
1591
|
+
* The table each block's `options.partitioned` partitions, and the option it
|
|
1592
|
+
* also needs.
|
|
1593
|
+
*/
|
|
1594
|
+
const PARTITIONED_TABLES = [
|
|
1595
|
+
{
|
|
1596
|
+
block: "audit",
|
|
1597
|
+
table: "audit_events"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
block: "outbox",
|
|
1601
|
+
table: "outbox_events"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
block: "usage",
|
|
1605
|
+
table: "usage_history",
|
|
1606
|
+
requires: "history"
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
block: "webhooks",
|
|
1610
|
+
table: "webhook_deliveries"
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
block: "notifications",
|
|
1614
|
+
table: "notification_delivery_events"
|
|
1615
|
+
}
|
|
1616
|
+
];
|
|
1617
|
+
function unpartitionedTables(context) {
|
|
1618
|
+
const { tables } = catalogOf(context);
|
|
1619
|
+
return PARTITIONED_TABLES.flatMap(({ block, table, requires }) => {
|
|
1620
|
+
const options = context.config.blocks[block]?.options ?? {};
|
|
1621
|
+
if (!context.config.blockNames.includes(block) || options["partitioned"] !== true || requires !== void 0 && options[requires] !== true) return [];
|
|
1622
|
+
if (tables.find((candidate) => candidate.schema === "better_supabase" && candidate.name === table)?.primaryKey.length !== 1) return [];
|
|
1623
|
+
return [{
|
|
1624
|
+
message: `better_supabase.${table} isn't partitioned, so blocks.${block}.options.partitioned has no effect on it. Postgres can't convert it in place: copy the rows into a partitioned table in a maintenance window, or turn the option off.`,
|
|
1625
|
+
target: `better_supabase.${table}`
|
|
1626
|
+
}];
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
//#endregion
|
|
1589
1630
|
//#region src/cli/doctor/modules.ts
|
|
1590
1631
|
/** The non-empty string at a dotted path, as membershipsExtension() reads it. */
|
|
1591
1632
|
function claimAt(claims, path) {
|
|
@@ -2154,45 +2195,6 @@ const MODULE_RULES = [
|
|
|
2154
2195
|
check: unpartitionedTables
|
|
2155
2196
|
}
|
|
2156
2197
|
];
|
|
2157
|
-
/**
|
|
2158
|
-
* The table each block's `options.partitioned` partitions, and the option it
|
|
2159
|
-
* also needs.
|
|
2160
|
-
*/
|
|
2161
|
-
const PARTITIONED_TABLES = [
|
|
2162
|
-
{
|
|
2163
|
-
block: "audit",
|
|
2164
|
-
table: "audit_events"
|
|
2165
|
-
},
|
|
2166
|
-
{
|
|
2167
|
-
block: "outbox",
|
|
2168
|
-
table: "outbox_events"
|
|
2169
|
-
},
|
|
2170
|
-
{
|
|
2171
|
-
block: "usage",
|
|
2172
|
-
table: "usage_history",
|
|
2173
|
-
requires: "history"
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
block: "webhooks",
|
|
2177
|
-
table: "webhook_deliveries"
|
|
2178
|
-
},
|
|
2179
|
-
{
|
|
2180
|
-
block: "notifications",
|
|
2181
|
-
table: "notification_delivery_events"
|
|
2182
|
-
}
|
|
2183
|
-
];
|
|
2184
|
-
function unpartitionedTables(context) {
|
|
2185
|
-
const { tables } = catalogOf(context);
|
|
2186
|
-
return PARTITIONED_TABLES.flatMap(({ block, table, requires }) => {
|
|
2187
|
-
const options = context.config.blocks[block]?.options ?? {};
|
|
2188
|
-
if (!context.config.blockNames.includes(block) || options["partitioned"] !== true || requires !== void 0 && options[requires] !== true) return [];
|
|
2189
|
-
if (tables.find((candidate) => candidate.schema === "better_supabase" && candidate.name === table)?.primaryKey.length !== 1) return [];
|
|
2190
|
-
return [{
|
|
2191
|
-
message: `better_supabase.${table} isn't partitioned, so blocks.${block}.options.partitioned has no effect on it. Postgres can't convert it in place: copy the rows into a partitioned table in a maintenance window, or turn the option off.`,
|
|
2192
|
-
target: `better_supabase.${table}`
|
|
2193
|
-
}];
|
|
2194
|
-
});
|
|
2195
|
-
}
|
|
2196
2198
|
function subjectTables(context) {
|
|
2197
2199
|
const catalog = catalogOf(context);
|
|
2198
2200
|
return Object.entries(context.config.subjects).flatMap(([type, entry]) => {
|
|
@@ -2216,7 +2218,7 @@ function missingSubjectColumns(context) {
|
|
|
2216
2218
|
target
|
|
2217
2219
|
}];
|
|
2218
2220
|
const present = new Set(table.columns.map((column) => column.name));
|
|
2219
|
-
return subjectColumns(entry).filter(([, column]) => !present.has(column)).map(([path, column]) => ({
|
|
2221
|
+
return subjectColumns(entry, tenantNameOf(context.config.blocks)).filter(([, column]) => !present.has(column)).map(([path, column]) => ({
|
|
2220
2222
|
message: `subjects.${type}.${path} names ${target}.${column}, but the table has no such column. Map it to the column that holds the value, or add the column.`,
|
|
2221
2223
|
target: `${target}.${column}`,
|
|
2222
2224
|
object: tableObject(table)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { a as parseNames, i as failedResult, n as CliError } from "./errors-BTe6A15O.js";
|
|
4
|
-
import { u as catalogFingerprint } from "./cache-
|
|
5
|
-
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-
|
|
6
|
-
import { n as dataMigration } from "./migrations-
|
|
4
|
+
import { u as catalogFingerprint } from "./cache-DDKao2Va.js";
|
|
5
|
+
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-CZb3uVKE.js";
|
|
6
|
+
import { n as dataMigration } from "./migrations-CHenMvl_.js";
|
|
7
7
|
import { d as GEN_TASKS, p as isGenTask } from "./config-BH0goim0.js";
|
|
8
8
|
import { c as insideRoot, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
9
|
-
import { n as runGen } from "./run-
|
|
10
|
-
import { t as syncModules } from "./sync-
|
|
11
|
-
import { t as addModules } from "./add-
|
|
12
|
-
import { n as listModules, t as printModule } from "./print-
|
|
9
|
+
import { n as runGen } from "./run-gE4eAazR.js";
|
|
10
|
+
import { t as syncModules } from "./sync-B8VGiaHk.js";
|
|
11
|
+
import { t as addModules } from "./add-C0w-mVTQ.js";
|
|
12
|
+
import { n as listModules, t as printModule } from "./print-C0OmQyTu.js";
|
|
13
13
|
import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
|
|
14
|
-
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-
|
|
14
|
+
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-cLXra-XB.js";
|
|
15
15
|
import { a as runEnv } from "./env-BCgVZkcb.js";
|
|
16
|
-
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-
|
|
17
|
-
import { n as runPowerSync } from "./powersync-
|
|
16
|
+
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-Cn5RhuQc.js";
|
|
17
|
+
import { n as runPowerSync } from "./powersync-D83yAFbl.js";
|
|
18
18
|
import { t as runSeed } from "./seed-CdSxunFT.js";
|
|
19
|
-
import { t as upgrade } from "./upgrade-
|
|
19
|
+
import { t as upgrade } from "./upgrade-BvBWK3Fo.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { resolve } from "node:path";
|
|
22
22
|
//#region src/cli/commands/sql.ts
|