better-supabase 0.32.0 → 0.33.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/README.md +11 -10
- package/codemods/0.32.json +31 -0
- package/dist/{adapter-CPPN80mx.js → adapter-CWzyKepA.js} +45 -16
- package/dist/{agents-BEiBtYmh.d.ts → agents-DXiOPB3V.d.ts} +4 -4
- package/dist/{ai-cache-FMYzw7lW.d.ts → ai-cache-CLiAXCPH.d.ts} +4 -4
- package/dist/{ai-chat-B_P--Ie2.d.ts → ai-chat-DlcBdOhJ.d.ts} +4 -4
- package/dist/{ai-schedules-D_q1iclL.d.ts → ai-schedules-Drx2KRTn.d.ts} +5 -5
- package/dist/ai-sdk/agents/index.d.ts +6 -6
- package/dist/ai-sdk/batches/index.d.ts +3 -3
- package/dist/ai-sdk/cache/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.d.ts +2 -2
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts +5 -5
- package/dist/ai-sdk/mcp/index.d.ts +3 -3
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +3 -3
- package/dist/{api-keys-u2sXB-CZ.d.ts → api-keys-DbIbkGxx.d.ts} +4 -4
- package/dist/{api-CwzVbbw4.d.ts → api-myq2e9t5.d.ts} +5 -6
- package/dist/{app-tables-DomvYx5b.d.ts → app-tables-IrglDJCs.d.ts} +1 -1
- package/dist/{approvals-idpuhILk.d.ts → approvals-DZoGtNFv.d.ts} +5 -5
- package/dist/{assistant-CMKsaeJd.d.ts → assistant-BEbRPjhn.d.ts} +2 -2
- package/dist/astro/index.d.ts +7 -8
- package/dist/astro/index.js +5 -5
- package/dist/{auth-module-CVo86UKh.js → auth-module-CqXdm8qD.js} +1 -1
- package/dist/{authorization-CYu_UKX4.d.ts → authorization-BlmDNI2b.d.ts} +12 -1
- package/dist/{authorization-hooks-CldgvzBZ.d.ts → authorization-hooks-CxwsRnfV.d.ts} +2 -2
- package/dist/{authorizer-D6po_XZA.js → authorizer-BtIPDO-c.js} +33 -10
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-8LYVJE5W.d.ts → bind-DP-KLgYI.d.ts} +7 -7
- package/dist/{block-env-BsLgZL2l.d.ts → block-env-CJ38ZSTP.d.ts} +4 -4
- package/dist/{block-helpers-JxiD1iw4.d.ts → block-helpers-disoUWCp.d.ts} +1 -1
- package/dist/{block-hooks-CJP5kGEa.d.ts → block-hooks-DrA_d1dJ.d.ts} +2 -2
- package/dist/{block-subjects-SyJwfgrX.d.ts → block-subjects-Br2MQNFn.d.ts} +1 -1
- package/dist/block-tables-CQTU71zn.d.ts +34 -0
- package/dist/{block-transport-Bbf1ZZre.d.ts → block-transport-BEtC_Kis.d.ts} +2 -2
- package/dist/blocks/access-requests/index.d.ts +5 -5
- package/dist/blocks/activities/index.d.ts +9 -9
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/ai-cache/index.d.ts +3 -3
- package/dist/blocks/ai-chat/index.d.ts +8 -8
- package/dist/blocks/ai-files/index.d.ts +3 -3
- package/dist/blocks/ai-keys/index.d.ts +4 -4
- package/dist/blocks/ai-schedules/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +8 -8
- package/dist/blocks/api-keys/index.d.ts +4 -108
- package/dist/blocks/approvals/index.d.ts +4 -4
- package/dist/blocks/assets/index.d.ts +6 -6
- package/dist/blocks/assignment/index.d.ts +7 -7
- package/dist/blocks/attachments/index.d.ts +4 -4
- package/dist/blocks/audit/index.d.ts +13 -13
- package/dist/blocks/automations/index.d.ts +12 -12
- package/dist/blocks/billable-time/index.d.ts +6 -6
- package/dist/blocks/billing/index.d.ts +9 -9
- package/dist/blocks/bookings/index.d.ts +4 -4
- package/dist/blocks/bulk/index.d.ts +4 -4
- package/dist/blocks/calendar/index.d.ts +5 -5
- package/dist/blocks/catalog/index.d.ts +6 -6
- package/dist/blocks/channels/index.d.ts +7 -7
- package/dist/blocks/collections/index.d.ts +6 -6
- package/dist/blocks/comments/index.d.ts +10 -10
- package/dist/blocks/compliance/index.d.ts +5 -5
- package/dist/blocks/connectors/index.d.ts +4 -4
- package/dist/blocks/contacts/index.d.ts +6 -6
- package/dist/blocks/content/index.d.ts +5 -5
- package/dist/blocks/contracts/index.d.ts +6 -6
- package/dist/blocks/courses/index.d.ts +5 -5
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/custom-fields/index.d.ts +6 -6
- package/dist/blocks/data-lifecycle/index.d.ts +8 -8
- package/dist/blocks/deals/index.d.ts +6 -6
- package/dist/blocks/dispatch/index.d.ts +6 -6
- package/dist/blocks/documents/index.d.ts +4 -4
- package/dist/blocks/domains/index.d.ts +6 -6
- package/dist/blocks/donations/index.d.ts +6 -6
- package/dist/blocks/drive/index.d.ts +6 -6
- package/dist/blocks/employees/index.d.ts +8 -8
- package/dist/blocks/enrichment/index.d.ts +6 -6
- package/dist/blocks/enrollments/index.d.ts +6 -6
- package/dist/blocks/entitlements/index.d.ts +6 -6
- package/dist/blocks/entitlements/index.js +2 -23
- package/dist/blocks/expenses/index.d.ts +5 -5
- package/dist/blocks/field-history/index.d.ts +4 -4
- package/dist/blocks/flags/index.d.ts +5 -5
- package/dist/blocks/flags/index.js +1 -1
- package/dist/blocks/forecasts/index.d.ts +6 -6
- package/dist/blocks/forms/index.d.ts +6 -6
- package/dist/blocks/goals/index.d.ts +4 -4
- package/dist/blocks/guests/index.d.ts +6 -6
- package/dist/blocks/hiring/index.d.ts +6 -6
- package/dist/blocks/identities/index.d.ts +5 -5
- package/dist/blocks/imports/index.d.ts +5 -5
- package/dist/blocks/inbox/index.d.ts +10 -10
- package/dist/blocks/incidents/index.d.ts +5 -5
- package/dist/blocks/index.d.ts +9 -9
- package/dist/blocks/inventory/index.d.ts +6 -6
- package/dist/blocks/invoices/index.d.ts +8 -8
- package/dist/blocks/knowledge/index.d.ts +3 -3
- package/dist/blocks/lead-scoring/index.d.ts +7 -7
- package/dist/blocks/leases/index.d.ts +6 -6
- package/dist/blocks/leave/index.d.ts +5 -5
- package/dist/blocks/ledger/index.d.ts +6 -6
- package/dist/blocks/mail-sync/index.d.ts +5 -5
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memberships/index.js +1 -1
- package/dist/blocks/memory/index.d.ts +4 -4
- package/dist/blocks/messaging/index.d.ts +11 -11
- package/dist/blocks/metrics/index.d.ts +6 -6
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +6 -6
- package/dist/blocks/notifications/index.d.ts +11 -11
- package/dist/blocks/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- package/dist/blocks/onboarding/index.d.ts +5 -5
- package/dist/blocks/orders/index.d.ts +7 -7
- package/dist/blocks/organizations/index.d.ts +8 -8
- package/dist/blocks/organizations/index.js +1 -1
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/permissions/index.d.ts +12 -7
- package/dist/blocks/permissions/index.js +6 -6
- package/dist/blocks/pipelines/index.d.ts +6 -6
- package/dist/blocks/posts/index.d.ts +5 -5
- package/dist/blocks/profiles/index.d.ts +4 -4
- package/dist/blocks/promotions/index.d.ts +5 -5
- package/dist/blocks/push/index.d.ts +7 -7
- package/dist/blocks/queue/index.d.ts +6 -6
- package/dist/blocks/queue/index.js +2 -2
- package/dist/blocks/quotes/index.d.ts +8 -8
- package/dist/blocks/rank/index.d.ts +4 -4
- package/dist/blocks/reactions/index.d.ts +9 -9
- package/dist/blocks/relations/index.d.ts +7 -7
- package/dist/blocks/reminders/index.d.ts +8 -8
- package/dist/blocks/reviews/index.d.ts +5 -5
- package/dist/blocks/saved-views/index.d.ts +6 -6
- package/dist/blocks/scores/index.d.ts +5 -5
- package/dist/blocks/search/index.d.ts +7 -7
- package/dist/blocks/security-events/index.d.ts +7 -7
- package/dist/blocks/segments/index.d.ts +7 -7
- package/dist/blocks/sequences/index.d.ts +6 -6
- package/dist/blocks/service-accounts/index.d.ts +5 -5
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +6 -6
- package/dist/blocks/share-links/index.d.ts +5 -5
- package/dist/blocks/shipments/index.d.ts +6 -6
- package/dist/blocks/signatures/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- package/dist/blocks/sla/index.d.ts +7 -7
- package/dist/blocks/sso/index.d.ts +6 -6
- package/dist/blocks/state-machine/index.d.ts +5 -5
- package/dist/blocks/subjects/index.d.ts +6 -6
- package/dist/blocks/tags/index.d.ts +6 -6
- package/dist/blocks/tasks/index.d.ts +9 -9
- package/dist/blocks/teams/index.d.ts +4 -4
- package/dist/blocks/templates/index.d.ts +7 -7
- package/dist/blocks/time-tracking/index.d.ts +7 -7
- package/dist/blocks/timeline/index.d.ts +8 -8
- package/dist/blocks/trash/index.d.ts +6 -6
- package/dist/blocks/undo/index.d.ts +4 -4
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +4 -4
- package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
- package/dist/blocks/versions/index.d.ts +6 -6
- package/dist/blocks/waitlist/index.d.ts +5 -5
- package/dist/blocks/webhooks/index.d.ts +13 -13
- package/dist/blocks/workflow-editor/index.d.ts +9 -9
- package/dist/blocks/workflow-editor/index.js +2 -1
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-DG443336.d.ts → bookings-Br0VXzaf.d.ts} +3 -3
- package/dist/{bucket-Clq5xINQ.d.ts → bucket-DvG66r5G.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/claim-names-BKig1LOk.js +24 -0
- package/dist/claims/index.d.ts +8 -0
- package/dist/claims/index.js +8 -0
- package/dist/{claims-DRmafYVK.js → claims-CqTr_N1n.js} +13 -5
- package/dist/cli/{add-fzRPyIED.js → add-BDLLVLI8.js} +3 -2
- package/dist/cli/add-BaOCKKt6.js +1 -0
- package/dist/cli/{add-ChoHyBhz.js → add-D2pKTbPw.js} +11 -11
- package/dist/cli/{app-table-files-C0OtdUVu.js → app-table-files-CimWi_eh.js} +3 -3
- package/dist/cli/{providers-DpfoF3VC.js → authorization-DJkkOjjG.js} +25 -93
- package/dist/cli/{backfill-Dq2XMXf9.js → backfill-B1xAsdL4.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DVhJOzFj.js → blocks-DtZtn-R4.js} +1 -1
- package/dist/cli/{blocks-CCzp0eAH.js → blocks-rBeis04I.js} +1 -1
- package/dist/cli/{cache-CoC-1i1O.js → cache-CvBRwv02.js} +1 -1
- package/dist/cli/{codemod-pyf6HmS9.js → codemod-DYbVbJ-e.js} +5 -4
- package/dist/cli/{config-D0m2rQqk.js → config-CrwCec-B.js} +1 -1
- package/dist/cli/{config-Dyl3iX3u.js → config-DrrkMihk.js} +1 -0
- package/dist/cli/{content-mapper-ChSVT9Tq.js → content-mapper-DrhtDsAm.js} +2 -2
- package/dist/cli/{db-dFzhcozO.js → db-Diy1OebO.js} +2 -2
- package/dist/cli/{doctor-BKZsztFV.js → doctor-Dn4TzGmw.js} +59 -19
- package/dist/cli/{gen-BN_eh6rE.js → gen-BbeS0KgF.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-CaDDt8F6.js → init-C30xdMSs.js} +9 -9
- package/dist/cli/{live-KU41LMGE.js → live-Ctc8Qh9Y.js} +2 -2
- package/dist/cli/{mcp-C_m-TpLJ.js → mcp-5J0kUOtD.js} +2 -2
- package/dist/cli/{metadata-Bq4ra7zo.js → metadata-DxhUNctA.js} +3 -3
- package/dist/cli/{migrate-DHG2Qz_K.js → migrate-ockrh3UX.js} +1 -1
- package/dist/cli/{migration-safety-STVbiKhz.js → migration-safety-CLrqC0D-.js} +2 -2
- package/dist/cli/{migrations-O1QZoMiH.js → migrations-CZTg2UJM.js} +2 -2
- package/dist/cli/{module-migration-DB9ntWM-.js → module-migration-BptQzmj2.js} +2 -2
- package/dist/cli/powersync-CmsXOuui.js +1 -0
- package/dist/cli/{powersync-CN3QPF2K.js → powersync-DIvsipKr.js} +3 -3
- package/dist/cli/{print-DG7TRCi8.js → print-DdHt8xCc.js} +2 -2
- package/dist/cli/providers-k-1cEna6.js +99 -0
- package/dist/cli/{prune-workflows-DcNJUS1m.js → prune-workflows-Ddv-GfkO.js} +3 -3
- package/dist/cli/{remove-BpfYqP45.js → remove-DEEQDoc7.js} +5 -5
- package/dist/cli/{render-Q7jnLn_C.js → render-SjSVz8yK.js} +7 -4
- package/dist/cli/{run-D6K-qQIX.js → run-DdhIK7-K.js} +9 -8
- package/dist/cli/{run-9NfabanB.js → run-Ixt9mEb6.js} +29 -29
- package/dist/cli/{seed-B4H0Lco9.js → seed-BpaqqyO8.js} +2 -2
- package/dist/cli/seed-ByLneY1H.js +1 -0
- package/dist/cli/{shared-PrvYREVy.js → shared-p6sxli_5.js} +1 -1
- package/dist/cli/{snapshot-UfJsqfys.js → snapshot-Dd_8B9g-.js} +3 -3
- package/dist/cli/{source-F3YTVvFo.js → source-BYvVe_Es.js} +1 -1
- package/dist/cli/{source-args-DJMrW_jW.js → source-args-Bz5QQne2.js} +1 -1
- package/dist/cli/{spec-DsLQuJKp.js → spec-BxQgllJY.js} +2 -2
- package/dist/cli/{spec-HQOBVbEO.js → spec-liRzcZTa.js} +1 -1
- package/dist/cli/{sql-layout-CZ66pY8j.js → sql-layout-DHwiUOaD.js} +2 -2
- package/dist/cli/{sync-B12wbtFd.js → sync-CreQWj53.js} +4 -4
- package/dist/cli/{upgrade-AgUXFDo6.js → upgrade-3NQOUO1_.js} +5 -5
- package/dist/cli/{upgrade-C20z49De.js → upgrade-U7IKj45h.js} +2 -2
- package/dist/cli/{version-DEUWW8cv.js → version-mBwP-aMG.js} +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.d.ts +5 -5
- package/dist/client/native/index.js +1 -1
- package/dist/{client-BLor58Je.js → client-Bky2z09B.js} +1 -1
- package/dist/{cloud-event-bcaMqEbN.d.ts → cloud-event-DXWmXrus.d.ts} +1 -1
- package/dist/{compiler-CWishtY2.d.ts → compiler-qlXlokKn.d.ts} +2 -2
- package/dist/{composite-ClLWZIwX.d.ts → composite-CIxjVcL1.d.ts} +7 -7
- package/dist/{composite-BZMkWNOQ.js → composite-D2JnIiHt.js} +2 -2
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +2 -2
- package/dist/{config-BhExAhNK.js → config-Bu6pwqcO.js} +1 -1
- package/dist/{connectors-BImAu75R.d.ts → connectors-Cf2LeAuZ.d.ts} +4 -4
- package/dist/{context-DcxfrCml.d.ts → context-D7jICqdN.d.ts} +15 -3
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +0 -0
- package/dist/{controller-D_UJBaEU.d.ts → controller-DxtxeYdf.d.ts} +1 -1
- package/dist/{conversion-7U1WeLxK.d.ts → conversion-C9rndpEI.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +1 -1
- package/dist/create/lite/index.d.ts +4 -4
- package/dist/create/lite/index.js +1 -1
- package/dist/credentials/index.d.ts +4 -4
- package/dist/{data-engine-B-D6bdyx.d.ts → data-engine-CMENsp3d.d.ts} +1 -1
- package/dist/{define-3RbqoF1S.d.ts → define-ITQA71fw.d.ts} +5 -5
- package/dist/{define-block-B_i9VPcc.d.ts → define-block-COmMkx2x.d.ts} +12 -12
- package/dist/{delegation-BRHHXERz.js → delegation-C2rLpkHO.js} +2 -7
- package/dist/{documents-6ov2gWh3.d.ts → documents-DeZw83ue.d.ts} +3 -3
- package/dist/edge/index.d.ts +13 -13
- package/dist/edge/index.js +9 -9
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{embeddings-K0lH--nt.d.ts → embeddings-rVR2AKVz.d.ts} +1 -1
- package/dist/{ended-CCoE7XXY.d.ts → ended-NC_ZesY4.d.ts} +2 -2
- package/dist/entitlements-Dydkg-TV.js +47 -0
- package/dist/{entitlements-XwpuBbKN.d.ts → entitlements-w04ivvAy.d.ts} +21 -3
- package/dist/{envelope-DAtaFJue.js → envelope-CapD-JtH.js} +3 -2
- package/dist/eve/index.d.ts +9 -9
- package/dist/eve/index.js +2 -2
- package/dist/{eve-Cf-QRGij.d.ts → eve-DIKjuPp5.d.ts} +2 -2
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-CfDdOwqg.d.ts → events-DVt3Z9hw.d.ts} +1 -1
- package/dist/{executor-ynEwaUZy.d.ts → executor-CFmee_nV.d.ts} +1 -1
- package/dist/{executor-CAhykadW.d.ts → executor-CHnoKOxk.d.ts} +4 -4
- package/dist/{executor-CbDX34I9.d.ts → executor-DqNRrFxx.d.ts} +1 -1
- package/dist/expo/index.d.ts +4 -4
- package/dist/expo/index.js +3 -3
- package/dist/{extension-LgaDPMJs.js → extension-Z8Pe7fXA.js} +1 -1
- package/dist/{field-errors-tQr-anYL.d.ts → field-errors-DKCaSlZw.d.ts} +10 -10
- package/dist/{fields-AKKMirg_.d.ts → fields-CAVk9dxX.d.ts} +1 -1
- package/dist/{filter-evaluate-Bhq99aEN.d.ts → filter-evaluate-Bz3Fzhz2.d.ts} +1 -1
- package/dist/{filter-query-B7A4l2xn.d.ts → filter-query-DV-x8fio.d.ts} +1 -1
- package/dist/{flags-D0npSE-5.js → flags-0EXDD3Iz.js} +1 -1
- package/dist/{flags-B5B4mkZV.d.ts → flags-6emyAXly.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +2 -2
- package/dist/flags-sdk/index.js +1 -1
- package/dist/{framework-CyDn_SXR.d.ts → framework-BFlaPuvv.d.ts} +8 -7
- package/dist/{framework-B1h-uquj.js → framework-ChzJYkJW.js} +3 -2
- package/dist/{gateway-Cg_MgGen.d.ts → gateway-DaekJ_Me.d.ts} +3 -3
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/index.js +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/h3/v1/index.js +1 -1
- package/dist/hono/index.d.ts +14 -13
- package/dist/hono/index.js +9 -8
- package/dist/{inbox-BmSA9K01.d.ts → inbox-DavCzW7b.d.ts} +5 -5
- package/dist/{index-D2BGCjIz.d.ts → index-BIAtapnD.d.ts} +5 -5
- package/dist/{index-B2871MHr.d.ts → index-BZCmy767.d.ts} +5 -5
- package/dist/{index-B5_J-MaK.d.ts → index-BdC2IqkU.d.ts} +5 -5
- package/dist/{index-xCpjvDVm.d.ts → index-BgkHbf9C.d.ts} +14 -14
- package/dist/{index-CRrBZtKm.d.ts → index-BvcMQYL-.d.ts} +1 -1
- package/dist/index-CbUXFzQV.d.ts +107 -0
- package/dist/index-CiE37wKX.d.ts +289 -0
- package/dist/{index-lazpPVr0.d.ts → index-D18su_r5.d.ts} +3 -3
- package/dist/{index-D66_dYVi.d.ts → index-DU0UwWvL.d.ts} +4 -4
- package/dist/{index-CTpEQvIv.d.ts → index-Dvpu22CJ.d.ts} +1 -1
- package/dist/index-IKfbX_39.d.ts +23 -0
- package/dist/{index-DzBFdI9I.d.ts → index-M1izbwbN.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{kit-CVZDd1X9.js → kit-9pZP5iLU.js} +42 -11
- package/dist/{kit-CJKo0soh.d.ts → kit-OgFOW9rX.d.ts} +4 -4
- package/dist/{knowledge-BUwbpS8I.d.ts → knowledge-BBC2sfAY.d.ts} +5 -5
- package/dist/lint/index.d.ts +1 -1
- package/dist/lint/index.js +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-CZ-K5aHX.d.ts → list-query-C7V8kUaD.d.ts} +3 -3
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +4 -289
- package/dist/mcp/index.js +52 -18
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/{messaging-DMhtGxVv.d.ts → messaging-D5z2TR37.d.ts} +4 -4
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +28 -26
- package/dist/next/index.js +11 -10
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{operations-D51ONRvR.d.ts → operations-CsCwruKT.d.ts} +1 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/orpc/index.js +8 -8
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-C44Aa94K.d.ts → outbox-7zgh-7nw.d.ts} +4 -4
- package/dist/{permissions-B9aZZ9LR.js → permissions-BDt27oYF.js} +19 -14
- package/dist/permissions-BP593xxk.d.ts +44 -0
- package/dist/{pool-Bji4lnQM.d.ts → pool-D-4HyhuW.d.ts} +3 -3
- package/dist/{ports-zFqRNXVJ.d.ts → ports-BVLhLUvR.d.ts} +1 -1
- package/dist/{ports-C-hdygkZ.js → ports-CmEXVqhg.js} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-2WjRrtmX.d.ts → postgrest-DZtM2nIS.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/{project-oNHntJ6T.js → project-D4ArwcS5.js} +2 -2
- package/dist/{provider-CH8McX3b.d.ts → provider-BI0KC4u5.d.ts} +1 -1
- package/dist/{push-token-a3Ev1U3L.d.ts → push-token-B0j171on.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +3 -3
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/native/index.js +1 -1
- package/dist/react/server.d.ts +8 -8
- package/dist/react/server.js +3 -3
- package/dist/react/session.d.ts +2 -2
- package/dist/{react-C40oomj7.js → react-COIov1yC.js} +1 -1
- package/dist/react-router/index.d.ts +6 -7
- package/dist/react-router/index.js +6 -6
- package/dist/realtime/index.d.ts +6 -6
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-DCIui2Ol.d.ts → record-form-DU2EoVsv.d.ts} +1 -1
- package/dist/{recordings-Dlpq8jUG.d.ts → recordings-D69Va7gP.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refresh-BK9epzeC.d.ts → refresh-BtbC2rZe.d.ts} +1 -1
- package/dist/{refusal-DhX7Xpfp.js → refusal-5c6UMpUP.js} +3 -3
- package/dist/{refusal-DEuFVi4s.d.ts → refusal-CGi-0Q18.d.ts} +3 -3
- package/dist/{resolve-DVOtYTAc.d.ts → resolve--LfVoOMg.d.ts} +1 -1
- package/dist/{resource-Cn6Bn-_o.js → resource-BbWk4hoP.js} +59 -15
- package/dist/{resource-BfsTJnxZ.d.ts → resource-DWllVW8k.d.ts} +6 -1
- package/dist/{resource-execute-DQRS7PFt.d.ts → resource-execute-DUBYKTYU.d.ts} +2 -2
- package/dist/{resource-types-DF6KDAZM.d.ts → resource-types-RgaljPs0.d.ts} +4 -4
- package/dist/{resources-CeY53FiJ.d.ts → resources-Bki1J4jy.d.ts} +2 -2
- package/dist/{resources-B0Vy7_wv.js → resources-DYSx9NYM.js} +1 -1
- package/dist/{respond-CkwkvFdZ.d.ts → respond-BYOV7KZp.d.ts} +1 -1
- package/dist/{respond-C2qvP1wv.js → respond-DLH4tD2d.js} +1 -1
- package/dist/{sales-lines-Bde9cV5F.d.ts → sales-lines-DuNVoKHA.d.ts} +1 -1
- package/dist/{sandboxes-DDWuD9fh.d.ts → sandboxes-B2hBoBvJ.d.ts} +1 -1
- package/dist/{scores-Bql-ABl0.d.ts → scores-FAORS4qU.d.ts} +5 -5
- package/dist/server/index.d.ts +31 -28
- package/dist/server/index.js +15 -11
- package/dist/{server-types-C3p3jUqr.d.ts → server-types-C2hlvhP4.d.ts} +39 -101
- package/dist/{session-BOch2y2z.d.ts → session-B4VasaAA.d.ts} +6 -6
- package/dist/{session-status-DRBRnZHx.d.ts → session-status-D8CBxCqv.d.ts} +2 -2
- package/dist/{sign-in-BmigClRh.js → sign-in-BMm1xhKq.js} +1 -1
- package/dist/{sign-in-Dxyi4aKu.d.ts → sign-in-CX1a5i2P.d.ts} +3 -34
- package/dist/{sign-in-CXOg2Dwb.js → sign-in-CxdoTEp5.js} +2 -2
- package/dist/{signers-Cz5ZhTHH.d.ts → signers-6ih6i9aq.d.ts} +4 -4
- package/dist/{signing-keys-DS-rIVzz.d.ts → signing-keys-De09WNJ3.d.ts} +2 -2
- package/dist/snapshot-BGsJw9xn.d.ts +83 -0
- package/dist/{view-YnesSUEa.js → snapshot-CVMSyTHH.js} +3 -109
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +6 -7
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +6 -5
- package/dist/sql/index.js +2 -2
- package/dist/{sql-BPV51R3A.js → sql-DiUP7fKX.js} +162 -77
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-BEvNf1oW.d.ts → sso-CuzAjsc8.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -5
- package/dist/ssr/index.js +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/streams/index.d.ts +1 -1
- package/dist/{subject-readers-DWkVSbFr.d.ts → subject-readers-BlD8tALG.d.ts} +2 -2
- package/dist/{subjects-vci6Wufh.d.ts → subjects-Bv2dPflD.d.ts} +3 -3
- package/dist/{support-rZbdU35s.d.ts → support-DxYI6sDM.d.ts} +4 -4
- package/dist/{support-view-WY4Y-A40.d.ts → support-view-DSmCett7.d.ts} +1 -1
- package/dist/svelte/index.d.ts +9 -9
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.d.ts +7 -8
- package/dist/sveltekit/index.js +5 -5
- package/dist/{tags-BVLELhOf.d.ts → tags--k2fbPfO.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -7
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-RKvGBB-U.d.ts → tenant-B3IIq8Eq.d.ts} +4 -5
- package/dist/tenant-Beqd7TTq.js +48 -0
- package/dist/testing/index.d.ts +71 -32
- package/dist/testing/index.js +136 -16
- package/dist/{timeline-Ck8OFuAN.d.ts → timeline-Bq658xsi.d.ts} +5 -5
- package/dist/{topic-Dr8VYE4D.d.ts → topic-D2MyBeaI.d.ts} +5 -5
- package/dist/{topic-BBBCVLyS.js → topic-k17VvXRj.js} +1 -1
- package/dist/{types-Pv5WPfIC.d.ts → types-BBqP9H6w.d.ts} +4 -4
- package/dist/{types-CCmW3MqI.d.ts → types-BFEKRmEK.d.ts} +2 -2
- package/dist/{types-WZUVlTXs.d.ts → types-BkYEUWdz.d.ts} +189 -1
- package/dist/{types-D9FY9qSJ.d.ts → types-C8UyJOPJ.d.ts} +3 -3
- package/dist/{types-CvlJNzX4.d.ts → types-DCoqai8o.d.ts} +4 -4
- package/dist/{types-DWZubmwk.d.ts → types-Dh2OGEW5.d.ts} +10 -10
- package/dist/{types-BiedVwz_.d.ts → types-TH3zlMiM.d.ts} +1 -1
- package/dist/{types-CL-z0A4K.d.ts → types-d0JBRTAg.d.ts} +7 -7
- package/dist/{undo-BdoEJ6Ot.d.ts → undo-22ofP6Zp.d.ts} +2 -2
- package/dist/{usage-D27Uw426.d.ts → usage-CNCT6_3D.d.ts} +4 -4
- package/dist/{vault-Dx0LaNMX.d.ts → vault-yGQD5Rdl.d.ts} +2 -2
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/vercel-sandbox/index.d.ts +2 -2
- package/dist/{verify-DnL0Fgu0.d.ts → verify-BQu3eBNW.d.ts} +2 -2
- package/dist/view-BfEqjZJ_.js +117 -0
- package/dist/{view-DmEZA1fL.d.ts → view-Cy2XxYp1.d.ts} +14 -2
- package/dist/vue/index.d.ts +10 -10
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-BB7T05sc.d.ts → watch-topic-q6krNw0T.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/{workflow-sdk-D5zRSwxh.js → workflow-sdk-q2jnEaAJ.js} +2 -2
- package/dist/{workflow-sdk-DMpVSMB7.d.ts → workflow-sdk-yIkECybp.d.ts} +3 -3
- package/dist/{workflows-DKTw2PZo.d.ts → workflows-BljkWRxE.d.ts} +3 -3
- package/dist/yjs/index.d.ts +2 -2
- package/dist/yjs/index.js +1 -1
- package/package.json +12 -1
- package/schemas/config-v1.json +3 -0
- package/schemas/doctor-report-v1.json +1 -0
- package/dist/authorizer-AswD5q6g.d.ts +0 -116
- package/dist/cli/add-DlYL-1mF.js +0 -1
- package/dist/cli/powersync-DfeGl5N1.js +0 -1
- package/dist/cli/seed-BIB6-WPa.js +0 -1
- package/dist/tenant-BR7fvPj7.js +0 -26
|
@@ -4,7 +4,7 @@ import { r as NEGATIVE, t as FILTER_OPERATORS } from "./filter-query-Ds7Z6lgZ.js
|
|
|
4
4
|
import { a as ok } from "./result-8xza7w5W.js";
|
|
5
5
|
import { a as hasPlaceholder, l as splitPlaceholders, s as placeholderOf } from "./read-set-DEDoIHMM.js";
|
|
6
6
|
import { n as resolveJsonSchema, r as CONFIG_DEFAULTS, t as resolveNames } from "./resolved-names-DYYyh35i.js";
|
|
7
|
-
import { t as DEFAULT_CLAIMS } from "./claims-
|
|
7
|
+
import { t as DEFAULT_CLAIMS } from "./claims-CqTr_N1n.js";
|
|
8
8
|
import { o as tenantNames, r as composeNames } from "./entity-naming-BES3pkQI.js";
|
|
9
9
|
import { C as encryptedColumns, I as resolveBlock, L as tenantNameOf, N as BLOCK_SCOPES, S as columnsWithAccess, T as hiddenColumns, a as isRenamedInstance, g as appTableVersions, i as instancePrefix, l as APP_RANK_COLUMN, m as appTableEventKinds, s as APP_DELETED_AT_COLUMN, w as hasColumnAccess, x as hasComputed } from "./instances-D31jrmKh.js";
|
|
10
10
|
import { a as RATING_BOUNDS, n as CUSTOM_FIELD_TYPES, r as FIELD_FORMATS, t as CUSTOM_FIELD_FORM_TYPES } from "./field-formats-Cap-V7UP.js";
|
|
@@ -78201,6 +78201,41 @@ as $$
|
|
|
78201
78201
|
end
|
|
78202
78202
|
$$;`;
|
|
78203
78203
|
}
|
|
78204
|
+
/**
|
|
78205
|
+
* `keys` without the keys the provider doesn't mark `sqlComplete`, so the
|
|
78206
|
+
* `permissions` claim never grants what the SQL functions can't decide. A
|
|
78207
|
+
* provider built without `sqlCompleteKeys` keeps every key.
|
|
78208
|
+
*/
|
|
78209
|
+
function sqlCompleteOnly(provider, keys) {
|
|
78210
|
+
if (provider.sqlCompleteKeys === void 0) return keys;
|
|
78211
|
+
if (provider.sqlCompleteKeys.length === 0) return "'{}'::text[]";
|
|
78212
|
+
return `coalesce(array(select k from unnest(${keys}) as k where k = any(array[${provider.sqlCompleteKeys.map(sqlString).join(", ")}]::text[])), '{}'::text[])`;
|
|
78213
|
+
}
|
|
78214
|
+
/**
|
|
78215
|
+
* How an access token hook writes the `permissions` claim, as a comment. A
|
|
78216
|
+
* provider whose hook owns the claim gets a note instead, so the app's hook
|
|
78217
|
+
* doesn't write it a second time.
|
|
78218
|
+
*/
|
|
78219
|
+
function permissionClaimHook(ctx, layout) {
|
|
78220
|
+
const claim = ctx.claims.permissions;
|
|
78221
|
+
const provider = layout.accessProvider;
|
|
78222
|
+
if (provider?.ownsPermissions === true) return `-- The permission claim: ${provider.name}'s access token hook writes
|
|
78223
|
+
-- "${claim}" itself, so leave it out of any other hook.`;
|
|
78224
|
+
const marker = provider?.truncatedClaim ?? `${claim}_truncated`;
|
|
78225
|
+
return `-- The permission claim: { [tenant id]: permission keys }, for the access
|
|
78226
|
+
-- token hook when the app checks permissions from the token. Write the
|
|
78227
|
+
-- active tenant only, and mark the claim truncated when it outgrows the
|
|
78228
|
+
-- token budget, so readers ask the database instead:
|
|
78229
|
+
-- declare
|
|
78230
|
+
-- tenant text := event #>> '{claims,app_metadata,${ctx.claims.tenant}}';
|
|
78231
|
+
-- keys jsonb := better_supabase.permission_claims((event ->> 'user_id')::uuid, tenant::${ctx.idType});
|
|
78232
|
+
-- begin
|
|
78233
|
+
-- if octet_length(keys::text) > 2048 then
|
|
78234
|
+
-- event := jsonb_set(event, '{claims,${marker}}', 'true');
|
|
78235
|
+
-- keys := '{}'::jsonb;
|
|
78236
|
+
-- end if;
|
|
78237
|
+
-- return jsonb_set(event, '{claims,${claim}}', keys);`;
|
|
78238
|
+
}
|
|
78204
78239
|
// src/sql/modules/permissions-operations.ts
|
|
78205
78240
|
const isOperationModule = (name) => Object.hasOwn(MODULE_PERMISSION_SCOPES, name);
|
|
78206
78241
|
/**
|
|
@@ -78791,10 +78826,10 @@ as $$
|
|
|
78791
78826
|
when member is not null
|
|
78792
78827
|
and not better_supabase.user_disabled(member)
|
|
78793
78828
|
and not better_supabase.tenant_disabled(tenant)${notSuspended(ctx, "tenant", "member")}
|
|
78794
|
-
then coalesce((${providerSql(provider, "permissionsFor", {
|
|
78829
|
+
then ${sqlCompleteOnly(provider, `coalesce((${providerSql(provider, "permissionsFor", {
|
|
78795
78830
|
user: "member",
|
|
78796
78831
|
tenant: "tenant"
|
|
78797
|
-
})}), '{}'::text[])
|
|
78832
|
+
})}), '{}'::text[])`)}
|
|
78798
78833
|
else '{}'::text[]
|
|
78799
78834
|
end
|
|
78800
78835
|
$$;
|
|
@@ -79175,19 +79210,7 @@ ${[
|
|
|
79175
79210
|
...model === "roles" || model === "catalog" ? [`can_assign_as(uuid, ${id}, text)`] : []
|
|
79176
79211
|
].flatMap((fn) => [`revoke execute on function better_supabase.${fn} from public, anon, authenticated;`, `grant execute on function better_supabase.${fn} to service_role, supabase_auth_admin;`]).join("\n")}
|
|
79177
79212
|
|
|
79178
|
-
|
|
79179
|
-
-- token hook when the app checks permissions from the token. Write the
|
|
79180
|
-
-- active tenant only, and mark the claim truncated when it outgrows the
|
|
79181
|
-
-- token budget, so readers ask the database instead:
|
|
79182
|
-
-- declare
|
|
79183
|
-
-- tenant text := event #>> '{claims,app_metadata,${ctx.claims.tenant}}';
|
|
79184
|
-
-- keys jsonb := better_supabase.permission_claims((event ->> 'user_id')::uuid, tenant::${id});
|
|
79185
|
-
-- begin
|
|
79186
|
-
-- if octet_length(keys::text) > 2048 then
|
|
79187
|
-
-- event := jsonb_set(event, '{claims,${ctx.claims.permissions}_truncated}', 'true');
|
|
79188
|
-
-- keys := '{}'::jsonb;
|
|
79189
|
-
-- end if;
|
|
79190
|
-
-- return jsonb_set(event, '{claims,${ctx.claims.permissions}}', keys);`;
|
|
79213
|
+
${permissionClaimHook(ctx, layout)}`;
|
|
79191
79214
|
}
|
|
79192
79215
|
const ACCESS = {
|
|
79193
79216
|
name: "permissions",
|
|
@@ -111493,7 +111516,7 @@ function reindexCondition(ctx, subject) {
|
|
|
111493
111516
|
return isAppTable(ctx, subject) ? `(${type}) and to_regclass(${sqlString(subject.qualified)}) is not null` : type;
|
|
111494
111517
|
}
|
|
111495
111518
|
/** The quoted tables of a block instance's context. */
|
|
111496
|
-
function tablesOf(ctx) {
|
|
111519
|
+
function tablesOf$1(ctx) {
|
|
111497
111520
|
return new Set(Object.keys(ctx.names.tables).filter((key) => ctx.hasTable(key)).map((key) => ctx.table(key)));
|
|
111498
111521
|
}
|
|
111499
111522
|
/**
|
|
@@ -111503,7 +111526,7 @@ function tablesOf(ctx) {
|
|
|
111503
111526
|
function laterTables(ctx, layout) {
|
|
111504
111527
|
const installed = ctx.installedModules;
|
|
111505
111528
|
const later = installed.slice(installed.indexOf("search") + 1);
|
|
111506
|
-
return new Set(later.flatMap((block) => [...rendersOwnInstance(block, layout) ? [moduleContext(block, layout, installed)] : [], ...renamedInstances(block, layout).map((instance) => moduleContext(block, layout, installed, instance.name))]).filter((owner) => owner.mode !== "custom").flatMap((owner) => [...tablesOf(owner)]));
|
|
111529
|
+
return new Set(later.flatMap((block) => [...rendersOwnInstance(block, layout) ? [moduleContext(block, layout, installed)] : [], ...renamedInstances(block, layout).map((instance) => moduleContext(block, layout, installed, instance.name))]).filter((owner) => owner.mode !== "custom").flatMap((owner) => [...tablesOf$1(owner)]));
|
|
111507
111530
|
}
|
|
111508
111531
|
function triggers(ctx, layout, subjects) {
|
|
111509
111532
|
const fn = ctx.fn("search_index_row");
|
|
@@ -111518,7 +111541,7 @@ function triggers(ctx, layout, subjects) {
|
|
|
111518
111541
|
function ownerSearchTriggers(search, owner) {
|
|
111519
111542
|
if (search.mode === "custom" || owner.mode === "custom") return "";
|
|
111520
111543
|
const fn = search.fn("search_index_row");
|
|
111521
|
-
const tables = tablesOf(owner);
|
|
111544
|
+
const tables = tablesOf$1(owner);
|
|
111522
111545
|
return searchedSubjects(search).filter((subject) => !isAppTable(search, subject) && tables.has(subject.qualified)).map((subject) => triggerSql$1(fn, subject)).join("\n\n");
|
|
111523
111546
|
}
|
|
111524
111547
|
/**
|
|
@@ -139555,6 +139578,125 @@ function entityRenamePlan(names, modules, installedText, layout) {
|
|
|
139555
139578
|
refused
|
|
139556
139579
|
};
|
|
139557
139580
|
}
|
|
139581
|
+
// src/sql/layout.ts
|
|
139582
|
+
/** Where and how `add` writes module files for this config. */
|
|
139583
|
+
function moduleLayout(config, testsDir = config.sql.testsDir, readSets = [], entitlementsProvider, accessProvider, permissionCatalog) {
|
|
139584
|
+
return {
|
|
139585
|
+
...entitlementsProvider ? { entitlementsProvider } : {},
|
|
139586
|
+
...accessProvider ? { accessProvider } : {},
|
|
139587
|
+
...permissionCatalog ? { permissionCatalog } : {},
|
|
139588
|
+
...config.authorization?.delegation?.scopes ? { delegationScopes: config.authorization.delegation.scopes } : {},
|
|
139589
|
+
dir: config.sql.dir,
|
|
139590
|
+
prefix: config.sql.prefix,
|
|
139591
|
+
testsDir,
|
|
139592
|
+
readSets,
|
|
139593
|
+
realtimeTables: config.realtime.tables,
|
|
139594
|
+
realtimeGlobal: config.realtime.global,
|
|
139595
|
+
realtimeUsers: config.realtime.users,
|
|
139596
|
+
entitlements: config.entitlements,
|
|
139597
|
+
claims: config.claims,
|
|
139598
|
+
modules: config.blocks,
|
|
139599
|
+
instances: config.instances,
|
|
139600
|
+
...config.sql.scope === void 0 ? {} : { scope: config.sql.scope },
|
|
139601
|
+
...config.sql.tenantColumn === void 0 ? {} : { blockTenantColumn: config.sql.tenantColumn },
|
|
139602
|
+
subjects: config.subjects,
|
|
139603
|
+
appTables: config.appTables,
|
|
139604
|
+
vectorSearch: config.vectorSearch,
|
|
139605
|
+
grants: Object.entries(config.expose).flatMap(([table, roles]) => [
|
|
139606
|
+
{
|
|
139607
|
+
table,
|
|
139608
|
+
role: "anon",
|
|
139609
|
+
privileges: roles.anon
|
|
139610
|
+
},
|
|
139611
|
+
{
|
|
139612
|
+
table,
|
|
139613
|
+
role: "authenticated",
|
|
139614
|
+
privileges: roles.authenticated
|
|
139615
|
+
},
|
|
139616
|
+
{
|
|
139617
|
+
table,
|
|
139618
|
+
role: "service_role",
|
|
139619
|
+
privileges: roles.serviceRole
|
|
139620
|
+
}
|
|
139621
|
+
]),
|
|
139622
|
+
functionGrants: Object.entries(config.exposeFunctions).map(([fn, roles]) => ({
|
|
139623
|
+
function: fn,
|
|
139624
|
+
roles
|
|
139625
|
+
})),
|
|
139626
|
+
jsonSchemas: Object.entries(config.json).flatMap(([key, entry]) => {
|
|
139627
|
+
if (!entry.schema) return [];
|
|
139628
|
+
const dot = key.lastIndexOf(".");
|
|
139629
|
+
return [{
|
|
139630
|
+
table: key.slice(0, dot),
|
|
139631
|
+
column: key.slice(dot + 1),
|
|
139632
|
+
schema: resolveJsonSchema(entry.schema)
|
|
139633
|
+
}];
|
|
139634
|
+
}),
|
|
139635
|
+
...config.extensions.tenant ? { tenantColumn: config.extensions.tenant.column } : {}
|
|
139636
|
+
};
|
|
139637
|
+
}
|
|
139638
|
+
// src/sql/block-tables.ts
|
|
139639
|
+
function tableOf(ctx, logical, columns) {
|
|
139640
|
+
const { schema, name } = ctx.tableName(logical);
|
|
139641
|
+
const typed = Object.fromEntries(columns.map((column) => [column, ctx.has(logical, column) ? ctx.colName(logical, column) : null]));
|
|
139642
|
+
return {
|
|
139643
|
+
schema,
|
|
139644
|
+
name,
|
|
139645
|
+
table: `${schema}.${name}`,
|
|
139646
|
+
columns: typed
|
|
139647
|
+
};
|
|
139648
|
+
}
|
|
139649
|
+
function tablesOf(ctx) {
|
|
139650
|
+
const specs = SQL_MODULES[ctx.module]?.names?.tables ?? {};
|
|
139651
|
+
return Object.fromEntries(Object.entries(specs).filter(([logical]) => ctx.hasTable(logical)).map(([logical, spec]) => [logical, tableOf(ctx, logical, Object.keys(spec.columns))]));
|
|
139652
|
+
}
|
|
139653
|
+
/**
|
|
139654
|
+
* The block tables `config` installs, with `blocks.<name>.tables` and
|
|
139655
|
+
* `blocks.<name>.columns` renames resolved the way the rendered SQL resolves
|
|
139656
|
+
* them (`ctx.table` and `ctx.col`). An authorization library reads its
|
|
139657
|
+
* membership and tenant tables from here instead of hard-coding the defaults.
|
|
139658
|
+
*/
|
|
139659
|
+
function blockTables(config) {
|
|
139660
|
+
const layout = moduleLayout(config);
|
|
139661
|
+
const installed = Object.keys(config.blocks);
|
|
139662
|
+
const byBlock = {};
|
|
139663
|
+
const contexts = /* @__PURE__ */ new Map();
|
|
139664
|
+
for (const [name, instance] of Object.entries(config.instances)) {
|
|
139665
|
+
if (!SQL_MODULES[instance.block]?.names) continue;
|
|
139666
|
+
const ctx = moduleContext(instance.block, layout, installed, name);
|
|
139667
|
+
byBlock[name] = tablesOf(ctx);
|
|
139668
|
+
if (name === instance.block) contexts.set(name, ctx);
|
|
139669
|
+
}
|
|
139670
|
+
const members = contexts.get("memberships");
|
|
139671
|
+
const tenants = contexts.get("organizations");
|
|
139672
|
+
const membershipRoles = members && manyRoles(members) ? {
|
|
139673
|
+
schema: members.schemaName,
|
|
139674
|
+
name: "membership_roles",
|
|
139675
|
+
table: `${members.schemaName}.membership_roles`,
|
|
139676
|
+
columns: {
|
|
139677
|
+
tenant: members.colName("memberships", "tenant"),
|
|
139678
|
+
user: members.colName("memberships", "user"),
|
|
139679
|
+
role: "role"
|
|
139680
|
+
}
|
|
139681
|
+
} : void 0;
|
|
139682
|
+
return {
|
|
139683
|
+
...members ? { memberships: tableOf(members, "memberships", [
|
|
139684
|
+
"tenant",
|
|
139685
|
+
"user",
|
|
139686
|
+
"role",
|
|
139687
|
+
"disabledAt"
|
|
139688
|
+
]) } : {},
|
|
139689
|
+
...membershipRoles ? { membershipRoles } : {},
|
|
139690
|
+
...tenants ? { organizations: tableOf(tenants, "organizations", [
|
|
139691
|
+
"id",
|
|
139692
|
+
"name",
|
|
139693
|
+
"slug",
|
|
139694
|
+
"disabledAt",
|
|
139695
|
+
"deletedAt"
|
|
139696
|
+
]) } : {},
|
|
139697
|
+
byBlock
|
|
139698
|
+
};
|
|
139699
|
+
}
|
|
139558
139700
|
// src/sql/name-sets.ts
|
|
139559
139701
|
/**
|
|
139560
139702
|
* The function names `module` writes under the default layout: every name it
|
|
@@ -140000,63 +140142,6 @@ order by 2, 1`,
|
|
|
140000
140142
|
values: tenant === "*" ? [] : [tenant]
|
|
140001
140143
|
};
|
|
140002
140144
|
}
|
|
140003
|
-
// src/sql/layout.ts
|
|
140004
|
-
/** Where and how `add` writes module files for this config. */
|
|
140005
|
-
function moduleLayout(config, testsDir = config.sql.testsDir, readSets = [], entitlementsProvider, accessProvider, permissionCatalog) {
|
|
140006
|
-
return {
|
|
140007
|
-
...entitlementsProvider ? { entitlementsProvider } : {},
|
|
140008
|
-
...accessProvider ? { accessProvider } : {},
|
|
140009
|
-
...permissionCatalog ? { permissionCatalog } : {},
|
|
140010
|
-
...config.authorization?.delegation?.scopes ? { delegationScopes: config.authorization.delegation.scopes } : {},
|
|
140011
|
-
dir: config.sql.dir,
|
|
140012
|
-
prefix: config.sql.prefix,
|
|
140013
|
-
testsDir,
|
|
140014
|
-
readSets,
|
|
140015
|
-
realtimeTables: config.realtime.tables,
|
|
140016
|
-
realtimeGlobal: config.realtime.global,
|
|
140017
|
-
realtimeUsers: config.realtime.users,
|
|
140018
|
-
entitlements: config.entitlements,
|
|
140019
|
-
claims: config.claims,
|
|
140020
|
-
modules: config.blocks,
|
|
140021
|
-
instances: config.instances,
|
|
140022
|
-
...config.sql.scope === void 0 ? {} : { scope: config.sql.scope },
|
|
140023
|
-
...config.sql.tenantColumn === void 0 ? {} : { blockTenantColumn: config.sql.tenantColumn },
|
|
140024
|
-
subjects: config.subjects,
|
|
140025
|
-
appTables: config.appTables,
|
|
140026
|
-
vectorSearch: config.vectorSearch,
|
|
140027
|
-
grants: Object.entries(config.expose).flatMap(([table, roles]) => [
|
|
140028
|
-
{
|
|
140029
|
-
table,
|
|
140030
|
-
role: "anon",
|
|
140031
|
-
privileges: roles.anon
|
|
140032
|
-
},
|
|
140033
|
-
{
|
|
140034
|
-
table,
|
|
140035
|
-
role: "authenticated",
|
|
140036
|
-
privileges: roles.authenticated
|
|
140037
|
-
},
|
|
140038
|
-
{
|
|
140039
|
-
table,
|
|
140040
|
-
role: "service_role",
|
|
140041
|
-
privileges: roles.serviceRole
|
|
140042
|
-
}
|
|
140043
|
-
]),
|
|
140044
|
-
functionGrants: Object.entries(config.exposeFunctions).map(([fn, roles]) => ({
|
|
140045
|
-
function: fn,
|
|
140046
|
-
roles
|
|
140047
|
-
})),
|
|
140048
|
-
jsonSchemas: Object.entries(config.json).flatMap(([key, entry]) => {
|
|
140049
|
-
if (!entry.schema) return [];
|
|
140050
|
-
const dot = key.lastIndexOf(".");
|
|
140051
|
-
return [{
|
|
140052
|
-
table: key.slice(0, dot),
|
|
140053
|
-
column: key.slice(dot + 1),
|
|
140054
|
-
schema: resolveJsonSchema(entry.schema)
|
|
140055
|
-
}];
|
|
140056
|
-
}),
|
|
140057
|
-
...config.extensions.tenant ? { tenantColumn: config.extensions.tenant.column } : {}
|
|
140058
|
-
};
|
|
140059
|
-
}
|
|
140060
140145
|
// src/sql/shared-roles.ts
|
|
140061
140146
|
/**
|
|
140062
140147
|
* Why a roles table that holds both tenant and platform roles (the tenant
|
|
@@ -140623,4 +140708,4 @@ function tableTagComments(sql) {
|
|
|
140623
140708
|
}] : [];
|
|
140624
140709
|
});
|
|
140625
140710
|
}
|
|
140626
|
-
export {
|
|
140711
|
+
export { moduleEventTriggers as $, blockTables as A, declaredViews as At, declaredPolicies as B, readPolicy$4 as Bt, expiredFlagsQuery as C, moduleIdType as Ct, adoptedViews as D, declaredTableColumns as Dt, adoptedTables as E, declaredIndexes as Et, moduleTopics as F, catalogPolicy as Ft, APP_TABLES_MODULE as G, moduleDataDir as H, renderBlocks as I, maskSql as It, blockSqlVersion as J, appTablesFiles as K, moduleDeprecations as L, policy$1 as Lt, entityRenamePlan as M, policyGrants as Mt, customContracts as N, rlsTables as Nt, moduleWritesText as O, declaredTables as Ot, moduleBody as P, auditRegistrations as Pt, sameBlockFile as Q, upgradePlan as R, readGrants as Rt, tenantsQuery as S, isBlockSqlIdType as St, adoptedColumnProblems as T, declaredColumnTypes as Tt, moduleFilePaths as U, widenedCommands as V, renderPolicy as Vt, APP_TABLES_MARKER as W, isModuleDataFile as X, blockFileState as Y, moduleFileVersion as Z, renderRulePolicy as _, formerBlockName as _t, tableFeatures as a, TENANT_SCOPE_NAMES as at, compileReadSets as b, MODULE_ID_TYPES as bt, formatBsbComment as c, resolveExposeColumns as ct, POLICY_FUNCTIONS as d, subjectColumns$2 as dt, moduleHidingColumns as et, disallowedPolicyCalls as f, sameTenantColumn as ft, renderRule as g, currentBlockName as gt, readRulePolicies as h, BLOCK_RENAMES as ht, setTableFeature as i, resolveBlocks as it, moduleLayout as j, extensionSchema as jt, instanceFunctions as k, declaredUpdatedAtTriggers as kt, parseBsbComment as l, SECRET_COLUMNS as lt, policyFunctionsSql as m, migrationOptionUses as mt, createsTable as n, moduleSchemaExtensions as nt, tableTagComments as o, TENANT_SCOPE_POLICY as ot, isRule as p, sameTenantTrigger as pt, scopePolicyName as q, isTableFeature as r, SQL_MODULES as rt, commentOnTableSql as s, excludedColumns as st, TABLE_FEATURES as t, modulePermissionKeys as tt, setBsbTag as u, dataExportPlan as ut, rulePolicy as v, renamedBlock as vt, sameTenantLayout as w, BLOCK_OPTION_SCHEMAS as wt, sharedRolesProblems as x, contractSignature as xt, compileReadSet as y, AUDIT_CATEGORIES as yt, appTablePolicyNotes as z, readPolicies as zt };
|
package/dist/sqlite/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bt as Executor } from "../types-
|
|
2
|
-
import { c as LocalTablesOption, n as DataEngine, s as LiveEngineOptions } from "../data-engine-
|
|
3
|
-
import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-
|
|
1
|
+
import { Bt as Executor } from "../types-BkYEUWdz.js";
|
|
2
|
+
import { c as LocalTablesOption, n as DataEngine, s as LiveEngineOptions } from "../data-engine-CMENsp3d.js";
|
|
3
|
+
import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-CHnoKOxk.js";
|
|
4
4
|
/** A SQLite database that may report which tables changed. */
|
|
5
5
|
interface ChangingSqliteDatabase extends SqliteDatabaseLike {
|
|
6
6
|
onChange?(handler: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
4
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
5
|
-
import { t as BlockTransport } from "./block-transport-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
5
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
7
7
|
/** The DNS record that proves a domain belongs to the organization. */
|
|
8
8
|
interface DomainRecord {
|
|
9
9
|
readonly type: "TXT";
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as pruneSessionChunks, D as sessionEncoding, E as sessionCookieName, O as writeSession, S as parseCookies, T as serializeCookie, _ as SessionEncoding, a as ResolveAuthOptions, b as applyCookieWrites, d as AUTH_CACHE_HEADERS, f as CookieOptions, g as DEFAULT_SESSION_ENCODING, h as CookieWrite, m as CookieScope, n as AuthResolver, p as CookieRecord, r as AuthState, t as AuthResolution, u as resolveAuth, v as StoredSession, w as readSession, x as clearSessionAtScopes, y as WriteSessionOptions } from "../resolve
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-
|
|
5
|
-
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-
|
|
1
|
+
import { C as pruneSessionChunks, D as sessionEncoding, E as sessionCookieName, O as writeSession, S as parseCookies, T as serializeCookie, _ as SessionEncoding, a as ResolveAuthOptions, b as applyCookieWrites, d as AUTH_CACHE_HEADERS, f as CookieOptions, g as DEFAULT_SESSION_ENCODING, h as CookieWrite, m as CookieScope, n as AuthResolver, p as CookieRecord, r as AuthState, t as AuthResolution, u as resolveAuth, v as StoredSession, w as readSession, x as clearSessionAtScopes, y as WriteSessionOptions } from "../resolve--LfVoOMg.js";
|
|
2
|
+
import { r as MembershipClaim } from "../entitlements-w04ivvAy.js";
|
|
3
|
+
import { n as AuthSession, o as toSession } from "../view-Cy2XxYp1.js";
|
|
4
|
+
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-BtbC2rZe.js";
|
|
5
|
+
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-NC_ZesY4.js";
|
|
6
6
|
export { AUTH_CACHE_HEADERS, type AuthResolution, type AuthResolver, type AuthSession, type AuthState, type ClearSessionCookiesOptions, type CookieOptions, type CookieRecord, type CookieScope, type CookieWrite, DEFAULT_SESSION_ENCODING, type MembershipClaim, type RefreshOptions, type RefreshOutcome, type ResolveAuthOptions, type SessionEncoding, type SessionStatus, type SessionStatusOptions, type StoredSession, type WriteSessionOptions, applyCookieWrites, authContext, clearSessionAtScopes, clearSessionCookies, parseCookies, pruneSessionChunks, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, sessionEncoding, sessionStatus, toSession, writeSession };
|
package/dist/ssr/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { i as toSession } from "../view-BfEqjZJ_.js";
|
|
1
2
|
import { t as authContext } from "../context-DSevnLrT.js";
|
|
2
3
|
import { _ as sessionEncoding, a as refreshSession, c as AUTH_CACHE_HEADERS, d as clearSessionAtScopes, f as parseCookies, g as sessionCookieName, h as serializeCookie, i as resolveAuth, l as DEFAULT_SESSION_ENCODING, m as readSession, o as clearSessionCookies, p as pruneSessionChunks, s as sessionStatus, u as applyCookieWrites, v as writeSession } from "../resolve-FW8oeXvh.js";
|
|
3
|
-
import { n as toSession } from "../view-YnesSUEa.js";
|
|
4
4
|
export { AUTH_CACHE_HEADERS, DEFAULT_SESSION_ENCODING, applyCookieWrites, authContext, clearSessionAtScopes, clearSessionCookies, parseCookies, pruneSessionChunks, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, sessionEncoding, sessionStatus, toSession, writeSession };
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as AccessPolicySql, T as AccessBucketPolicy, _t as BucketLifecycle, bt as VersioningStatus, vt as BucketLifecycleRule, yt as ObjectVersion } from "../types-
|
|
2
|
-
import { $ as AppliedBucket, A as TtlPreset, B as StorageListV2Folder, C as TransformOptions, D as defineBucket, E as UrlOptions, F as StorageDownloadOptions, G as StorageResponse, H as StorageListV2Result, I as StorageFailure, J as StorageSignedUrlEntry, K as StorageSearchOptions, L as StorageFetchParameters, M as StorageBucketApi, N as StorageClient, O as parseSize, P as StorageDestinationOptions, Q as StoragePath, R as StorageFileOptions, S as TransferOptions, T as UploadOptions, U as StorageObjectInfo, V as StorageListV2Object, W as StorageRemoveEntry, X as StorageUrlOptions, Y as StorageTransform, Z as PathIn, _ as ResumableReservation, a as BucketConnectOptions, b as SweepOptions, c as DownloadOptions, d as PathValues, et as TemplateParams, f as PurgeCacheOptions, g as ReserveResumableOptions, h as Reservation, i as BucketConfig, j as StorageApi, k as TTL, l as ImageTransform, m as ReplaceResult, n as Bucket, o as BucketDrift, p as ReplaceOptions, q as StorageSearchV2Options, r as BucketClient, s as BucketPolicy, t as ActualBucket, tt as TemplateValues, u as ObjectTarget, v as StorageAdminClient, w as UploadBody, x as SweepResult, y as StoredObject, z as StorageListEntry } from "../bucket-
|
|
3
|
-
import { A as ConnectedRef, C as avatarBucket, D as BucketMap, E as BucketIdOf, F as StorageImageSize, I as storageImageSrcSet, L as storageImageUrl, M as StoredRef, N as defineBuckets, O as BucketWithId, P as StorageImageOptions, R as fromStorageError, S as OrganizationLogoBucketOptions, T as AnyBucket, _ as defineAnalyticsBucket, a as VectorBucketConfig, b as ImageBucketOptions, c as VectorIndexClient, d as VectorQueryOptions, f as VectorRecord, g as AnalyticsCatalog, h as AnalyticsBucketClient, i as VectorBucketClient, j as ResolvedRef, k as Buckets, l as VectorIndexConfig, m as AnalyticsBucket, n as resumableEndpoint, o as VectorDistance, p as defineVectorBucket, r as VectorBucket, s as VectorHit, t as ResumableEndpointOptions, u as VectorMetadata, v as AvatarBucketOptions, w as organizationLogoBucket, x as ImageVariant, y as IMAGE_TYPES } from "../index-
|
|
1
|
+
import { E as AccessPolicySql, T as AccessBucketPolicy, _t as BucketLifecycle, bt as VersioningStatus, vt as BucketLifecycleRule, yt as ObjectVersion } from "../types-BkYEUWdz.js";
|
|
2
|
+
import { $ as AppliedBucket, A as TtlPreset, B as StorageListV2Folder, C as TransformOptions, D as defineBucket, E as UrlOptions, F as StorageDownloadOptions, G as StorageResponse, H as StorageListV2Result, I as StorageFailure, J as StorageSignedUrlEntry, K as StorageSearchOptions, L as StorageFetchParameters, M as StorageBucketApi, N as StorageClient, O as parseSize, P as StorageDestinationOptions, Q as StoragePath, R as StorageFileOptions, S as TransferOptions, T as UploadOptions, U as StorageObjectInfo, V as StorageListV2Object, W as StorageRemoveEntry, X as StorageUrlOptions, Y as StorageTransform, Z as PathIn, _ as ResumableReservation, a as BucketConnectOptions, b as SweepOptions, c as DownloadOptions, d as PathValues, et as TemplateParams, f as PurgeCacheOptions, g as ReserveResumableOptions, h as Reservation, i as BucketConfig, j as StorageApi, k as TTL, l as ImageTransform, m as ReplaceResult, n as Bucket, o as BucketDrift, p as ReplaceOptions, q as StorageSearchV2Options, r as BucketClient, s as BucketPolicy, t as ActualBucket, tt as TemplateValues, u as ObjectTarget, v as StorageAdminClient, w as UploadBody, x as SweepResult, y as StoredObject, z as StorageListEntry } from "../bucket-DvG66r5G.js";
|
|
3
|
+
import { A as ConnectedRef, C as avatarBucket, D as BucketMap, E as BucketIdOf, F as StorageImageSize, I as storageImageSrcSet, L as storageImageUrl, M as StoredRef, N as defineBuckets, O as BucketWithId, P as StorageImageOptions, R as fromStorageError, S as OrganizationLogoBucketOptions, T as AnyBucket, _ as defineAnalyticsBucket, a as VectorBucketConfig, b as ImageBucketOptions, c as VectorIndexClient, d as VectorQueryOptions, f as VectorRecord, g as AnalyticsCatalog, h as AnalyticsBucketClient, i as VectorBucketClient, j as ResolvedRef, k as Buckets, l as VectorIndexConfig, m as AnalyticsBucket, n as resumableEndpoint, o as VectorDistance, p as defineVectorBucket, r as VectorBucket, s as VectorHit, t as ResumableEndpointOptions, u as VectorMetadata, v as AvatarBucketOptions, w as organizationLogoBucket, x as ImageVariant, y as IMAGE_TYPES } from "../index-Dvpu22CJ.js";
|
|
4
4
|
export { type AccessBucketPolicy, type AccessPolicySql, type ActualBucket, type AnalyticsBucket, type AnalyticsBucketClient, type AnalyticsCatalog, type AnyBucket, type AppliedBucket, type AvatarBucketOptions, type Bucket, type BucketClient, type BucketConfig, type BucketConnectOptions, type BucketDrift, type BucketIdOf, type BucketLifecycle, type BucketLifecycleRule, type BucketMap, type BucketPolicy, type BucketWithId, type Buckets, type ConnectedRef, type DownloadOptions, IMAGE_TYPES, type ImageBucketOptions, type ImageTransform, type ImageVariant, type ObjectTarget, type ObjectVersion, type OrganizationLogoBucketOptions, type PathIn, type PathValues, type PurgeCacheOptions, type ReplaceOptions, type ReplaceResult, type Reservation, type ReserveResumableOptions, type ResolvedRef, type ResumableEndpointOptions, type ResumableReservation, type StorageAdminClient, type StorageApi, type StorageBucketApi, type StorageClient, type StorageDestinationOptions, type StorageDownloadOptions, type StorageFailure, type StorageFetchParameters, type StorageFileOptions, type StorageImageOptions, type StorageImageSize, type StorageListEntry, type StorageListV2Folder, type StorageListV2Object, type StorageListV2Result, type StorageObjectInfo, type StoragePath, type StorageRemoveEntry, type StorageResponse, type StorageSearchOptions, type StorageSearchV2Options, type StorageSignedUrlEntry, type StorageTransform, type StorageUrlOptions, type StoredObject, type StoredRef, type SweepOptions, type SweepResult, TTL, type TemplateParams, type TemplateValues, type TransferOptions, type TransformOptions, type TtlPreset, type UploadBody, type UploadOptions, type UrlOptions, type VectorBucket, type VectorBucketClient, type VectorBucketConfig, type VectorDistance, type VectorHit, type VectorIndexClient, type VectorIndexConfig, type VectorMetadata, type VectorQueryOptions, type VectorRecord, type VersioningStatus, avatarBucket, defineAnalyticsBucket, defineBucket, defineBuckets, defineVectorBucket, fromStorageError, organizationLogoBucket, parseSize, resumableEndpoint, storageImageSrcSet, storageImageUrl };
|
package/dist/storage/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { n as storageApiOf } from "../storage-api-COQr77e8.js";
|
|
|
6
6
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "../result-8xza7w5W.js";
|
|
7
7
|
import { a as spansAllTenants } from "../plugin-Ca2qBiFZ.js";
|
|
8
8
|
import { n as decodeJwtPayload } from "../base64-CVyKHBBw.js";
|
|
9
|
-
import { a as tenantClaimPaths, o as tenantFrom, s as tenantPathsFor } from "../claims-
|
|
9
|
+
import { a as tenantClaimPaths, o as tenantFrom, s as tenantPathsFor } from "../claims-CqTr_N1n.js";
|
|
10
10
|
import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "../template-CNq9xcfx.js";
|
|
11
11
|
import { r as accessCheck } from "../access-sql-Dao1C0fz.js";
|
|
12
12
|
import { t as fromStorageError } from "../errors-BdjHv5SV.js";
|
package/dist/streams/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../block-transport-
|
|
2
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../block-transport-BEtC_Kis.js";
|
|
3
3
|
import { a as StreamStatus, i as StreamReadOptions, n as StreamOpenOptions, o as StreamStore, r as StreamPurgeOptions, t as StreamAppendResult } from "../store-c7QxUHX-.js";
|
|
4
4
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
5
5
|
interface PostgresStreamStoreOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BlockTransport } from "./block-transport-
|
|
2
|
-
import { g as SubscriberPolicy } from "./authorization-hooks-
|
|
1
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
2
|
+
import { g as SubscriberPolicy } from "./authorization-hooks-CxwsRnfV.js";
|
|
3
3
|
interface SubjectReadersOptions {
|
|
4
4
|
/** The schema of the `subjects` module. Default `better_supabase`. */
|
|
5
5
|
readonly schema?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
|
-
import { $ as RecordRef } from "./types-
|
|
3
|
+
import { $ as RecordRef } from "./types-BkYEUWdz.js";
|
|
4
4
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
5
|
-
import { n as BlockOptions } from "./block-helpers-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
5
|
+
import { n as BlockOptions } from "./block-helpers-disoUWCp.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
7
7
|
/** What a `my_work` item waits on. */
|
|
8
8
|
type MyWorkKind = "assigned" | "approval" | "reminder" | "mention" | "sla";
|
|
9
9
|
/** The kinds `my_work` returns, in the order the docs list them. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
|
-
import { o as EventHub } from "./events-
|
|
4
|
-
import { r as AuthState } from "./resolve
|
|
3
|
+
import { o as EventHub } from "./events-DVt3Z9hw.js";
|
|
4
|
+
import { r as AuthState } from "./resolve--LfVoOMg.js";
|
|
5
5
|
import { a as ProblemFormat } from "./problem-NGBjN-TO.js";
|
|
6
|
-
import { _ as SupportAuthorize, i as AuthorizationHooks } from "./authorization-hooks-
|
|
7
|
-
import { t as BetterPostgres } from "./pool-
|
|
6
|
+
import { _ as SupportAuthorize, i as AuthorizationHooks } from "./authorization-hooks-CxwsRnfV.js";
|
|
7
|
+
import { t as BetterPostgres } from "./pool-D-4HyhuW.js";
|
|
8
8
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
9
|
type SupportEndedBy = "admin" | "expired" | "revoked";
|
|
10
10
|
/** A support session: a platform admin viewing the app as `targetUserId`. */
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-
|
|
3
|
-
import { mt as QuerySpec } from "../define-
|
|
4
|
-
import { tt as TemplateValues } from "../bucket-
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
7
|
-
import {
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
2
|
+
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-DVt3Z9hw.js";
|
|
3
|
+
import { mt as QuerySpec } from "../define-ITQA71fw.js";
|
|
4
|
+
import { tt as TemplateValues } from "../bucket-DvG66r5G.js";
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-D2MyBeaI.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-DP-KLgYI.js";
|
|
7
|
+
import { n as AuthSession } from "../view-Cy2XxYp1.js";
|
|
8
|
+
import { n as Controller } from "../controller-DxtxeYdf.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DKCaSlZw.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-CJ38ZSTP.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-QSaPsL2P.js";
|
|
12
12
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
13
13
|
import { QueryClient } from "@tanstack/query-core";
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-Ngy8z1fZ.js";
|
|
2
|
-
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-
|
|
2
|
+
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-Bky2z09B.js";
|
|
3
3
|
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-BToeAcQ_.js";
|
|
4
4
|
import { getContext, onDestroy, onMount, setContext } from "svelte";
|
|
5
5
|
import { createSubscriber } from "svelte/reactivity";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "../types-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-CyDn_SXR.js";
|
|
1
|
+
import { Ht as AnyAuthorizer, O as AnyFunctions, k as AnyModels, nn as PermissionRef } from "../types-BkYEUWdz.js";
|
|
2
|
+
import { t as BetterSupabase } from "../define-ITQA71fw.js";
|
|
3
|
+
import { r as BetterServer } from "../server-types-C2hlvhP4.js";
|
|
4
|
+
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-OgFOW9rX.js";
|
|
5
|
+
import { t as RefusalRedirects } from "../refusal-CGi-0Q18.js";
|
|
6
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-BFlaPuvv.js";
|
|
8
7
|
import { t as Validated } from "../shared-DsBcvj6q.js";
|
|
9
|
-
import { i as tagFor } from "../tags
|
|
8
|
+
import { i as tagFor } from "../tags--k2fbPfO.js";
|
|
10
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
11
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
11
|
/** The part of SvelteKit's `RequestEvent` the bridge reads and writes. */
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as DbException } from "../db-exception-Dv18UZ-I.js";
|
|
2
2
|
import { r as dbErrorOf } from "../errors-B7tCfCvX.js";
|
|
3
3
|
import { c as toProblem } from "../problem-C0SVHhd3.js";
|
|
4
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
5
|
-
import { n as defaultExpose } from "../respond-
|
|
4
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CWzyKepA.js";
|
|
5
|
+
import { n as defaultExpose } from "../respond-DLH4tD2d.js";
|
|
6
6
|
import { r as tagFor } from "../tags-CW-KvjdL.js";
|
|
7
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
7
|
+
import { i as requireCaller, o as runAction } from "../kit-9pZP5iLU.js";
|
|
8
8
|
import { n as bufferInPlace, t as around } from "../shared-Ci1g9nl4.js";
|
|
9
|
-
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
10
|
-
import { i as refusalTarget } from "../refusal-
|
|
9
|
+
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-ChzJYkJW.js";
|
|
10
|
+
import { i as refusalTarget } from "../refusal-5c6UMpUP.js";
|
|
11
11
|
// src/bridges/sveltekit.ts
|
|
12
12
|
/**
|
|
13
13
|
* Runs an entry array as a SvelteKit `handle` hook. Every contributed key lands
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as CacheTarget, Qt as CacheAdapter } from "./define-
|
|
1
|
+
import { $t as CacheTarget, Qt as CacheAdapter } from "./define-ITQA71fw.js";
|
|
2
2
|
interface TagOptions {
|
|
3
3
|
/** The tenant the read is scoped to; `"*"` is every tenant's reads. */
|
|
4
4
|
readonly tenant?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-
|
|
2
|
-
import { t as BetterSupabase, y as Db } from "../define-
|
|
3
|
-
import { n as DataEngine } from "../data-engine-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-BkYEUWdz.js";
|
|
2
|
+
import { t as BetterSupabase, y as Db } from "../define-ITQA71fw.js";
|
|
3
|
+
import { n as DataEngine } from "../data-engine-CMENsp3d.js";
|
|
4
4
|
import { t as BetterQueryMeta } from "../invalidate-DAB9CaPm.js";
|
|
5
5
|
import { QueryClient, SkipToken } from "@tanstack/query-core";
|
|
6
6
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "../types-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-CyDn_SXR.js";
|
|
1
|
+
import { Ht as AnyAuthorizer, O as AnyFunctions, k as AnyModels, nn as PermissionRef } from "../types-BkYEUWdz.js";
|
|
2
|
+
import { t as BetterSupabase } from "../define-ITQA71fw.js";
|
|
3
|
+
import { r as BetterServer } from "../server-types-C2hlvhP4.js";
|
|
4
|
+
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-OgFOW9rX.js";
|
|
5
|
+
import { t as RefusalRedirects } from "../refusal-CGi-0Q18.js";
|
|
6
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-BFlaPuvv.js";
|
|
8
7
|
import { t as Validated } from "../shared-DsBcvj6q.js";
|
|
9
8
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
10
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
2
|
-
import { n as defaultExpose } from "../respond-
|
|
3
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
1
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CWzyKepA.js";
|
|
2
|
+
import { n as defaultExpose } from "../respond-DLH4tD2d.js";
|
|
3
|
+
import { i as requireCaller, o as runAction } from "../kit-9pZP5iLU.js";
|
|
4
4
|
import { n as bufferInPlace, t as around } from "../shared-Ci1g9nl4.js";
|
|
5
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
6
|
-
import { r as refusalResponse } from "../refusal-
|
|
5
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-ChzJYkJW.js";
|
|
6
|
+
import { r as refusalResponse } from "../refusal-5c6UMpUP.js";
|
|
7
7
|
// src/bridges/tanstack-start.ts
|
|
8
8
|
/**
|
|
9
9
|
* The `response` of a request middleware's `next()` result; server function
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as AuthSession } from "./view-DmEZA1fL.js";
|
|
1
|
+
import { s as ClaimsSource } from "./entitlements-w04ivvAy.js";
|
|
3
2
|
/**
|
|
4
3
|
* The active tenant of a user session: the `claim` claim (`tenant_id` by
|
|
5
4
|
* default, as `config.claims.tenant`) at the top level of the token, then in
|
|
6
|
-
* `app_metadata`. `undefined` for every other session. Takes a server session
|
|
7
|
-
*
|
|
5
|
+
* `app_metadata`. `undefined` for every other session. Takes a server session,
|
|
6
|
+
* the client's `useAuth()` snapshot or verified claims.
|
|
8
7
|
*
|
|
9
8
|
* ```ts
|
|
10
9
|
* const organizationId = tenantOf(await bsb.claims());
|
|
11
10
|
* const organizationId = tenantOf(useAuth());
|
|
12
11
|
* ```
|
|
13
12
|
*/
|
|
14
|
-
declare function tenantOf<C, P>(session:
|
|
13
|
+
declare function tenantOf<C, P>(session: ClaimsSource<C, P>, claim?: string): string | undefined;
|
|
15
14
|
export { tenantOf as t };
|