better-supabase 0.32.0 → 0.34.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-Don-aNOB.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-DpVtxuKM.d.ts} +28 -2
- 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-BA05aoY9.d.ts} +7 -7
- package/dist/{block-env-BsLgZL2l.d.ts → block-env-UX42PHLP.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-Bre1zjau.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/drive/index.js +1 -1
- 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-C13ZqJ_N.js +1 -0
- package/dist/cli/{add-fzRPyIED.js → add-DoEtJhZG.js} +3 -2
- package/dist/cli/{add-ChoHyBhz.js → add-THXE7juv.js} +11 -11
- package/dist/cli/{app-table-files-C0OtdUVu.js → app-table-files-BqLd5TuX.js} +3 -3
- package/dist/cli/{providers-DpfoF3VC.js → authorization-DJkkOjjG.js} +25 -93
- package/dist/cli/{backfill-Dq2XMXf9.js → backfill-D-2W0fNT.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CCzp0eAH.js → blocks-BVU_FoLo.js} +1 -1
- package/dist/cli/{blocks-DVhJOzFj.js → blocks-XwUHeyUH.js} +1 -1
- package/dist/cli/{cache-CoC-1i1O.js → cache-D4nwCBXc.js} +1 -1
- package/dist/cli/{codemod-pyf6HmS9.js → codemod-Dh4lf_k4.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-CwFH_PEn.js} +2 -2
- package/dist/cli/{db-dFzhcozO.js → db-Diy1OebO.js} +2 -2
- package/dist/cli/{doctor-BKZsztFV.js → doctor-CyAMbZ_s.js} +59 -19
- package/dist/cli/{gen-BN_eh6rE.js → gen-EAUNnUY7.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-BRmmmGHJ.js} +9 -9
- package/dist/cli/{live-KU41LMGE.js → live-CV9mn-xC.js} +2 -2
- package/dist/cli/{mcp-C_m-TpLJ.js → mcp-CnaxcLWa.js} +2 -2
- package/dist/cli/{metadata-Bq4ra7zo.js → metadata-CFQGBR5E.js} +3 -3
- package/dist/cli/{migrate-DHG2Qz_K.js → migrate-z5oHDGNs.js} +1 -1
- package/dist/cli/{migration-safety-STVbiKhz.js → migration-safety-BtAPMEZa.js} +2 -2
- package/dist/cli/{migrations-O1QZoMiH.js → migrations-CNa62JSi.js} +2 -2
- package/dist/cli/{module-migration-DB9ntWM-.js → module-migration-CKJ8kRm1.js} +2 -2
- package/dist/cli/{powersync-CN3QPF2K.js → powersync-BgoAWeRT.js} +3 -3
- package/dist/cli/powersync-DoCruiOt.js +1 -0
- package/dist/cli/{print-DG7TRCi8.js → print-CoqKHoy0.js} +2 -2
- package/dist/cli/providers-CfbFxUOQ.js +99 -0
- package/dist/cli/{prune-workflows-DcNJUS1m.js → prune-workflows-BigCoXLw.js} +3 -3
- package/dist/cli/{remove-BpfYqP45.js → remove-C9zwn-Kk.js} +5 -5
- package/dist/cli/{render-Q7jnLn_C.js → render-DQCU_kBW.js} +7 -4
- package/dist/cli/{run-9NfabanB.js → run-CVaBuT18.js} +29 -29
- package/dist/cli/{run-D6K-qQIX.js → run-DOD00FFl.js} +9 -8
- 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-COtj7l3r.js} +1 -1
- package/dist/cli/{snapshot-UfJsqfys.js → snapshot-BvlEmTB0.js} +3 -3
- package/dist/cli/{source-F3YTVvFo.js → source-BhZRCitG.js} +1 -1
- package/dist/cli/{source-args-DJMrW_jW.js → source-args-Bz5QQne2.js} +1 -1
- package/dist/cli/{spec-HQOBVbEO.js → spec-Bo2wIViH.js} +1 -1
- package/dist/cli/{spec-DsLQuJKp.js → spec-DsMWuJLv.js} +2 -2
- package/dist/cli/{sql-layout-CZ66pY8j.js → sql-layout-CA7xgRjR.js} +2 -2
- package/dist/cli/{sync-B12wbtFd.js → sync-D9xSGdzO.js} +4 -4
- package/dist/cli/{upgrade-C20z49De.js → upgrade-XK_CQKVJ.js} +2 -2
- package/dist/cli/{upgrade-AgUXFDo6.js → upgrade-Ykf0LLEB.js} +5 -5
- package/dist/cli/{version-DEUWW8cv.js → version-Dfdz7KSh.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-BGC0J3t9.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-CQrkLoRX.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-XwpuBbKN.d.ts → entitlements-BOWTZaRf.d.ts} +21 -3
- package/dist/entitlements-Dydkg-TV.js +47 -0
- 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-DxPZYw2m.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-BfU0KR0X.d.ts +107 -0
- package/dist/{index-xCpjvDVm.d.ts → index-Bhkag9ZE.d.ts} +14 -14
- package/dist/{index-B2871MHr.d.ts → index-Bz0WLuh_.d.ts} +5 -5
- package/dist/{index-D66_dYVi.d.ts → index-CJB50jzQ.d.ts} +4 -4
- package/dist/{index-B5_J-MaK.d.ts → index-CeUwyJ3Z.d.ts} +5 -5
- package/dist/{index-lazpPVr0.d.ts → index-D18su_r5.d.ts} +3 -3
- package/dist/index-DNAkWDXc.d.ts +289 -0
- 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-CRrBZtKm.d.ts → index-QTZIopQj.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-BG6prEnh.d.ts} +1 -1
- package/dist/{options-B56njigZ.js → options-CjocPkX1.js} +2 -0
- 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-CoHsUtZS.d.ts +44 -0
- package/dist/{pool-Bji4lnQM.d.ts → pool-D-4HyhuW.d.ts} +3 -3
- package/dist/{ports-C-hdygkZ.js → ports-CmEXVqhg.js} +1 -1
- package/dist/{ports-zFqRNXVJ.d.ts → ports-XvgCe7ey.d.ts} +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-B7nqCzn5.js} +2 -2
- package/dist/{provider-CH8McX3b.d.ts → provider-BI0KC4u5.d.ts} +1 -1
- package/dist/{push-token-a3Ev1U3L.d.ts → push-token-kcc04ZaS.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-DdtukoIm.js} +405 -187
- 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-Beqd7TTq.js +48 -0
- package/dist/{tenant-RKvGBB-U.d.ts → tenant-DkKbvK5T.d.ts} +4 -5
- 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-B6zuexk7.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-WZUVlTXs.d.ts → types-BkYEUWdz.d.ts} +189 -1
- package/dist/{types-CCmW3MqI.d.ts → types-BvHw2cCS.d.ts} +2 -2
- 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-YYSVJGDY.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 +8 -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
|
@@ -1,101 +1,20 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
|
-
import { Ft as RequestContext, O as AnyFunctions, k as AnyModels } from "./types-
|
|
4
|
-
import { o as EventHub } from "./events-
|
|
3
|
+
import { Ft as RequestContext, Ht as AnyAuthorizer, O as AnyFunctions, k as AnyModels, rn as RequestMemo, tn as AuthzVersionCache } from "./types-BkYEUWdz.js";
|
|
4
|
+
import { o as EventHub } from "./events-DVt3Z9hw.js";
|
|
5
5
|
import { o as EnvSource, t as BetterSupabaseEnv } from "./index-8w4OB5En.js";
|
|
6
|
-
import { a as ResolveAuthOptions, h as CookieWrite, o as ResolvePhase, r as AuthState, t as AuthResolution } from "./resolve
|
|
7
|
-
import { r as CredentialProvider } from "./provider-
|
|
8
|
-
import { n as SqlClient } from "./executor-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { a as ResolveAuthOptions, h as CookieWrite, o as ResolvePhase, r as AuthState, t as AuthResolution } from "./resolve--LfVoOMg.js";
|
|
7
|
+
import { r as CredentialProvider } from "./provider-BI0KC4u5.js";
|
|
8
|
+
import { n as SqlClient } from "./executor-CFmee_nV.js";
|
|
9
|
+
import { Y as DbStats, Z as StatsRecorder, t as BetterSupabase, y as Db } from "./define-ITQA71fw.js";
|
|
10
|
+
import { j as StorageApi, n as Bucket } from "./bucket-DvG66r5G.js";
|
|
11
|
+
import { i as SessionSnapshot, n as SessionMemoOptions, r as SessionMemoStats } from "./snapshot-BGsJw9xn.js";
|
|
12
12
|
import { t as ImpersonationOptions } from "./impersonation-BOCJcsmS.js";
|
|
13
|
-
import { i as EventSink } from "./cloud-event-
|
|
14
|
-
import { b as TicketSubject, i as AuthorizationHooks } from "./authorization-hooks-
|
|
15
|
-
import { s as SqlClaims, t as BetterPostgres } from "./pool-
|
|
16
|
-
import { n as SupportApi, o as SupportSessions, t as ActiveSupport } from "./support-
|
|
13
|
+
import { i as EventSink } from "./cloud-event-DXWmXrus.js";
|
|
14
|
+
import { b as TicketSubject, i as AuthorizationHooks } from "./authorization-hooks-CxwsRnfV.js";
|
|
15
|
+
import { s as SqlClaims, t as BetterPostgres } from "./pool-D-4HyhuW.js";
|
|
16
|
+
import { n as SupportApi, o as SupportSessions, t as ActiveSupport } from "./support-DxYI6sDM.js";
|
|
17
17
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
18
|
-
import { JWTClaims } from "@supabase/server";
|
|
19
|
-
/**
|
|
20
|
-
* A verified user session, frozen and serializable. Times are epoch seconds,
|
|
21
|
-
* like `AuthSession.expiresAt`, because the snapshot crosses `use cache`
|
|
22
|
-
* serialization (ADR 0095).
|
|
23
|
-
*/
|
|
24
|
-
interface SessionSnapshot<C = unknown> {
|
|
25
|
-
readonly accessToken: string;
|
|
26
|
-
readonly claims: Readonly<JWTClaims & C>;
|
|
27
|
-
/** The Auth session id (`session_id`), or `null` for tokens without one. */
|
|
28
|
-
readonly sessionId: string | null;
|
|
29
|
-
readonly userId: string;
|
|
30
|
-
/** Seconds since epoch, from `exp`. */
|
|
31
|
-
readonly expiresAt: number | null;
|
|
32
|
-
/** Seconds since epoch, from `iat`. */
|
|
33
|
-
readonly issuedAt: number | null;
|
|
34
|
-
/** The `authz_ver` claim, or `null` when the token has none. */
|
|
35
|
-
readonly authzVersion: number | null;
|
|
36
|
-
}
|
|
37
|
-
/** Verified JWT claims, read by name. */
|
|
38
|
-
type Claims = Readonly<Record<string, unknown>>;
|
|
39
|
-
/** The `iat` claim in epoch seconds, or `null`. */
|
|
40
|
-
declare function issuedAtOf(claims: Claims): number | null;
|
|
41
|
-
/** The `authz_ver` claim as a number, or `null` when absent or malformed. */
|
|
42
|
-
declare function authzVersionOf(claims: Claims): number | null;
|
|
43
|
-
/**
|
|
44
|
-
* Whether `value` is a snapshot this process built from a verified token. A
|
|
45
|
-
* snapshot that crossed serialization, or was built by hand, is not.
|
|
46
|
-
*/
|
|
47
|
-
declare function isSessionSnapshot(value: unknown): value is SessionSnapshot;
|
|
48
|
-
/** The snapshot of a verified user, or `null` for any other caller. */
|
|
49
|
-
declare function snapshotOf<C, P>(auth: AuthState<C, P>): SessionSnapshot<C> | null;
|
|
50
|
-
/**
|
|
51
|
-
* A stable cache key for a session: user, Auth session and authorization
|
|
52
|
-
* version. It never contains the token, which rotates hourly and would churn
|
|
53
|
-
* every key.
|
|
54
|
-
*/
|
|
55
|
-
declare function sessionCacheKey(snapshot: Pick<SessionSnapshot, "userId" | "sessionId" | "authzVersion">): string;
|
|
56
|
-
interface SessionMemoOptions {
|
|
57
|
-
/** The most sessions kept; the least recently used goes first. Default: 1000. */
|
|
58
|
-
readonly max?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Milliseconds an entry lives at most. It never outlives the token's `exp`.
|
|
61
|
-
* Default: 300000 (5 minutes).
|
|
62
|
-
*/
|
|
63
|
-
readonly ttlMs?: number;
|
|
64
|
-
/** Epoch milliseconds. */
|
|
65
|
-
readonly now?: () => number;
|
|
66
|
-
}
|
|
67
|
-
interface SessionMemoStats {
|
|
68
|
-
/** Lookups answered by a stored or in-flight verification. */
|
|
69
|
-
readonly hits: number;
|
|
70
|
-
/** Lookups that ran a verification. */
|
|
71
|
-
readonly misses: number;
|
|
72
|
-
readonly size: number;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Verified sessions by a SHA-256 of the access token. Every `use cache` scope
|
|
76
|
-
* of a request resolves the same token; the first one verifies it and the
|
|
77
|
-
* others await the same promise.
|
|
78
|
-
*/
|
|
79
|
-
interface SessionMemo<T> {
|
|
80
|
-
/**
|
|
81
|
-
* The stored value for `token`, else `load()`'s. A `null` result is not
|
|
82
|
-
* stored. Read the clock (call this) only after the request's dynamic APIs
|
|
83
|
-
* (`cookies()`) have been awaited.
|
|
84
|
-
*/
|
|
85
|
-
get(token: string, load: () => Promise<T | null>): Promise<T | null>;
|
|
86
|
-
/** Stores a value verified elsewhere (a refresh, a sign-in). */
|
|
87
|
-
seed(token: string, value: T): Promise<void>;
|
|
88
|
-
/** Drops every entry `match` returns true for (a user's sessions). */
|
|
89
|
-
evict(match: (value: T) => boolean): void;
|
|
90
|
-
clear(): void;
|
|
91
|
-
stats(): SessionMemoStats;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* A bounded LRU of verified sessions. Keys derive only from the token, never
|
|
95
|
-
* from a user id or a header, so one instance can serve many users at once
|
|
96
|
-
* (Fluid compute). Create it once at module scope; `createServer` owns one.
|
|
97
|
-
*/
|
|
98
|
-
declare function sessionMemo<T>(expiresAt: (value: T) => number | null, options?: SessionMemoOptions): SessionMemo<T>;
|
|
99
18
|
interface DeleteAccountOptions {
|
|
100
19
|
/**
|
|
101
20
|
* Buckets to clear first. Objects whose `owner` placeholder (`{userId}`, or
|
|
@@ -218,7 +137,7 @@ interface ServerDbOptions {
|
|
|
218
137
|
*/
|
|
219
138
|
readonly urlLengthLimit?: number;
|
|
220
139
|
}
|
|
221
|
-
interface ServerOptions {
|
|
140
|
+
interface ServerOptions<V extends AuthzVersionCache = AuthzVersionCache> {
|
|
222
141
|
/**
|
|
223
142
|
* A loaded env, or the variables to load it from (`{ SUPABASE_URL, ... }`),
|
|
224
143
|
* read without falling back to the runtime's. Defaults to the variables
|
|
@@ -318,7 +237,7 @@ interface ServerOptions {
|
|
|
318
237
|
* routes and MCP tools ask for their `permission`. Without one, a declared
|
|
319
238
|
* permission denies.
|
|
320
239
|
*/
|
|
321
|
-
readonly authorizer?: AnyAuthorizer
|
|
240
|
+
readonly authorizer?: AnyAuthorizer<V>;
|
|
322
241
|
/**
|
|
323
242
|
* The runtime hooks of an authorization provider (`AuthorizationHooks` v1).
|
|
324
243
|
* Support sessions read `support.authorize` and `approverOf`, and
|
|
@@ -330,13 +249,25 @@ interface ServerOptions {
|
|
|
330
249
|
* reaches every authorizer decision (`AuthorizerRuntime.versions`), and
|
|
331
250
|
* `evictSession` evicts the user from it.
|
|
332
251
|
*/
|
|
333
|
-
readonly versions?:
|
|
252
|
+
readonly versions?: V;
|
|
253
|
+
/**
|
|
254
|
+
* Where a client sends the approval id it resumes with after an
|
|
255
|
+
* `approval-required` refusal. Without `header` no request header is read.
|
|
256
|
+
* The id reaches `RequestContext.approval` and the authorizer's
|
|
257
|
+
* `context.approval`, never the subject.
|
|
258
|
+
*/
|
|
259
|
+
readonly approval?: ApprovalOptions;
|
|
334
260
|
/**
|
|
335
261
|
* The verified-session memo `snapshot()` and adapters share across cache
|
|
336
262
|
* scopes: size and lifetime, or `false` to verify in every scope.
|
|
337
263
|
*/
|
|
338
264
|
readonly sessions?: SessionMemoOptions | false;
|
|
339
265
|
}
|
|
266
|
+
/** How the server reads the approval id a client resumes with. */
|
|
267
|
+
interface ApprovalOptions {
|
|
268
|
+
/** The request header that carries the approval id, e.g. `x-approval-id`. */
|
|
269
|
+
readonly header?: string;
|
|
270
|
+
}
|
|
340
271
|
/** The verified-session memo of a server (`server.sessions`). */
|
|
341
272
|
interface ServerSessions<C = unknown, P = unknown> {
|
|
342
273
|
stats(): SessionMemoStats;
|
|
@@ -418,6 +349,8 @@ interface ServerContext<M extends AnyModels, F extends AnyFunctions, E, C = unkn
|
|
|
418
349
|
readonly credentials?: CredentialProvider;
|
|
419
350
|
readonly requestId?: string;
|
|
420
351
|
readonly correlationId?: string;
|
|
352
|
+
/** The approval id the client resumes with (`ServerOptions.approval`). */
|
|
353
|
+
readonly approval?: string;
|
|
421
354
|
/** Work this context's permission checks share (`AuthorizerRuntime.memo`). */
|
|
422
355
|
readonly memo?: RequestMemo;
|
|
423
356
|
}
|
|
@@ -444,6 +377,11 @@ interface ContextOptions {
|
|
|
444
377
|
readonly support?: ActiveSupport;
|
|
445
378
|
readonly requestId?: string;
|
|
446
379
|
readonly correlationId?: string;
|
|
380
|
+
/**
|
|
381
|
+
* The approval id to resume with, instead of the header in
|
|
382
|
+
* `ServerOptions.approval` (an MCP client's `_meta.approval`).
|
|
383
|
+
*/
|
|
384
|
+
readonly approval?: string;
|
|
447
385
|
}
|
|
448
386
|
/**
|
|
449
387
|
* The repositories `bsb.admin()` returns: a secret-key `Db` with the Auth admin
|
|
@@ -462,7 +400,7 @@ type AdminDb<M extends AnyModels, F extends AnyFunctions, E, B = unknown> = Db<M
|
|
|
462
400
|
* another adapter to share.
|
|
463
401
|
*/
|
|
464
402
|
type SharedServer = Pick<BetterServer<AnyModels, AnyFunctions, unknown>, "env" | "events" | "resolve">;
|
|
465
|
-
interface BetterServer<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown> {
|
|
403
|
+
interface BetterServer<M extends AnyModels, F extends AnyFunctions, E, C = unknown, P = unknown, B = unknown, V extends AuthzVersionCache = AuthzVersionCache> {
|
|
466
404
|
readonly env: BetterSupabaseEnv;
|
|
467
405
|
/** The definition's events; adapters pass `events.settled()` to `waitUntil`. */
|
|
468
406
|
readonly events: EventHub;
|
|
@@ -552,11 +490,11 @@ interface BetterServer<M extends AnyModels, F extends AnyFunctions, E, C = unkno
|
|
|
552
490
|
/** Support sessions; every method fails without `ServerOptions.support`. */
|
|
553
491
|
readonly support: SupportApi;
|
|
554
492
|
/** `options.authorizer`, when the server has one, bound to `options.versions`. */
|
|
555
|
-
readonly authorizer: AnyAuthorizer | undefined;
|
|
493
|
+
readonly authorizer: AnyAuthorizer<V> | undefined;
|
|
556
494
|
/** `options.authorization`, when the server has one. */
|
|
557
495
|
readonly authorization: AuthorizationHooks | undefined;
|
|
558
|
-
/** `options.versions`, when the server has one. */
|
|
559
|
-
readonly versions:
|
|
496
|
+
/** `options.versions`, when the server has one, with its own type. */
|
|
497
|
+
readonly versions: V | undefined;
|
|
560
498
|
/**
|
|
561
499
|
* The verified session of a request, shared by every scope that resolves the
|
|
562
500
|
* same token: the first verifies it, the rest await that verification. `null`
|
|
@@ -580,4 +518,4 @@ interface BetterServer<M extends AnyModels, F extends AnyFunctions, E, C = unkno
|
|
|
580
518
|
evictSession(userId: string): Promise<void>;
|
|
581
519
|
}
|
|
582
520
|
type ServerKeys = keyof BetterServer<AnyModels, AnyFunctions, unknown>;
|
|
583
|
-
export {
|
|
521
|
+
export { DeleteAccountOptions as C, LiteDriver as S, deleteAccount as T, lastSignIns as _, ForContextOptions as a, PRIMARY_COOKIE as b, ServerKeys as c, TENANT_HEADER as d, EndSessionsResult as f, endSessions as g, SuspendAccountResult as h, ContextOptions as i, ServerOptions as l, SuspendAccountOptions as m, ApprovalOptions as n, ServerContext as o, LastSignIn as p, BetterServer as r, ServerDbOptions as s, AdminDb as t, SharedServer as u, suspendAccount as v, DeleteAccountResult as w, ReplicaState as x, RequestIdOptions as y };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "./types-
|
|
2
|
-
import { n as AuthOutageEvent, o as EventHub } from "./events-
|
|
3
|
-
import { _ as SessionEncoding, m as CookieScope, o as ResolvePhase, r as AuthState, t as AuthResolution } from "./resolve
|
|
4
|
-
import {
|
|
5
|
-
import { t as ActiveSupport } from "./support-
|
|
6
|
-
import { d as RefreshPolicy } from "./respond-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels } from "./types-BkYEUWdz.js";
|
|
2
|
+
import { n as AuthOutageEvent, o as EventHub } from "./events-DVt3Z9hw.js";
|
|
3
|
+
import { _ as SessionEncoding, m as CookieScope, o as ResolvePhase, r as AuthState, t as AuthResolution } from "./resolve--LfVoOMg.js";
|
|
4
|
+
import { i as ContextOptions, o as ServerContext } from "./server-types-C2hlvhP4.js";
|
|
5
|
+
import { t as ActiveSupport } from "./support-DxYI6sDM.js";
|
|
6
|
+
import { d as RefreshPolicy } from "./respond-BYOV7KZp.js";
|
|
7
7
|
import { SingleKeyEntry } from "@supabase/middleware";
|
|
8
8
|
/**
|
|
9
9
|
* What the entries need from a `createServer` server: its resolver, its
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as AuthState, t as AuthResolution } from "./resolve
|
|
2
|
-
import { t as ActiveSupport } from "./support-
|
|
1
|
+
import { r as AuthState, t as AuthResolution } from "./resolve--LfVoOMg.js";
|
|
2
|
+
import { t as ActiveSupport } from "./support-DxYI6sDM.js";
|
|
3
3
|
/**
|
|
4
4
|
* `active`: the session is valid. `expired`: the cookie's token expired and the
|
|
5
5
|
* route may not refresh it; the next navigation through the proxy does. `ended`
|
|
@@ -7,7 +7,7 @@ import { o as problemResponse } from "./problem-C0SVHhd3.js";
|
|
|
7
7
|
import { i as sqlIdent } from "./template-CNq9xcfx.js";
|
|
8
8
|
import { a as emitBlockEvent } from "./block-events-Bp6GPIBN.js";
|
|
9
9
|
import { t as fromPgError } from "./pg-error-D92B6jlF.js";
|
|
10
|
-
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-
|
|
10
|
+
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-CWzyKepA.js";
|
|
11
11
|
import { t as cronRoute } from "./cron-route-DSITg1yC.js";
|
|
12
12
|
import { t as boundedTtlCache } from "./ttl-cache-C5S0L2wx.js";
|
|
13
13
|
// src/auth/support.ts
|
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
import { f as Result } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { v as StoredSession } from "./resolve
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as AuthSession } from "./view-DmEZA1fL.js";
|
|
5
|
-
import { t as RefreshOptions } from "./refresh-BK9epzeC.js";
|
|
6
|
-
interface PermissionsOfOptions {
|
|
7
|
-
/**
|
|
8
|
-
* The claim holding `{ [tenantId]: string[] }`, as
|
|
9
|
-
* `config.claims.permissions`. Defaults to `permissions`; the truncation
|
|
10
|
-
* marker is `<claim>_truncated`.
|
|
11
|
-
*/
|
|
12
|
-
readonly claim?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The active tenant claim, as `config.claims.tenant`, when `tenant` is left
|
|
15
|
-
* out.
|
|
16
|
-
*/
|
|
17
|
-
readonly tenantClaim?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The permission keys the token grants in `tenant` (the active tenant by
|
|
21
|
-
* default), from the `permissions` claim `permission_claims()` writes.
|
|
22
|
-
*
|
|
23
|
-
* `undefined` means the token can't answer: no claim, no entry for the tenant,
|
|
24
|
-
* or the hook set `permissions_truncated` because the keys didn't fit. Ask the
|
|
25
|
-
* database then (`my_permissions`). An empty list means the token says the
|
|
26
|
-
* caller holds no permission there. The claim is a cache the `authz_ver` bump
|
|
27
|
-
* invalidates; RLS stays the authority.
|
|
28
|
-
*
|
|
29
|
-
* ```ts
|
|
30
|
-
* const keys = permissionsOf(await bsb.claims());
|
|
31
|
-
* if (keys !== undefined && !keys.includes("billing.manage")) forbidden();
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare function permissionsOf<C, P>(session: AuthSession<C, P> | AuthSnapshot, tenant?: string, options?: PermissionsOfOptions): readonly string[] | undefined;
|
|
2
|
+
import { v as StoredSession } from "./resolve--LfVoOMg.js";
|
|
3
|
+
import { t as RefreshOptions } from "./refresh-BtbC2rZe.js";
|
|
35
4
|
/**
|
|
36
5
|
* `next` when it is a same-origin path (`/dashboard?tab=1`), else `fallback`.
|
|
37
6
|
* Use it on any `?next=` or `redirectTo` value a request carries, so the value
|
|
@@ -80,4 +49,4 @@ interface AuthorizeUrlParams {
|
|
|
80
49
|
/** Extra query parameters for the provider, such as `prompt`. */
|
|
81
50
|
readonly queryParams?: Readonly<Record<string, string>>;
|
|
82
51
|
}
|
|
83
|
-
export { PasswordGrantOptions as a, safeRedirectPath as c, OtpParams as i,
|
|
52
|
+
export { PasswordGrantOptions as a, safeRedirectPath as c, OtpParams as i, EmailOtpType as n, SignOutScope as o, ExistingAccount as r, passwordGrant as s, AuthorizeUrlParams as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as specKey, i as sessionUserId, n as hasAuthModule, t as authModuleOf } from "./auth-module-
|
|
1
|
+
import { a as specKey, i as sessionUserId, n as hasAuthModule, t as authModuleOf } from "./auth-module-CqXdm8qD.js";
|
|
2
2
|
import { t as clearOnUserChange } from "./user-change-Ngy8z1fZ.js";
|
|
3
|
-
import { c as liveKey, d as shownCount, f as startBroadcast, i as countSource, m as startLiveQuery, p as startLiveCount, t as NO_COUNT } from "./client-
|
|
3
|
+
import { c as liveKey, d as shownCount, f as startBroadcast, i as countSource, m as startLiveQuery, p as startLiveCount, t as NO_COUNT } from "./client-Bky2z09B.js";
|
|
4
4
|
import { useSession } from "./react/session.js";
|
|
5
5
|
import { createContext, createElement, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
6
6
|
// src/react/context.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, f as Result, 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 { n as SqlClient } from "./executor-
|
|
6
|
-
import { t as BlockTransport } from "./block-transport-
|
|
7
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
5
|
+
import { n as SqlClient } from "./executor-CFmee_nV.js";
|
|
6
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
7
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
8
8
|
import { t as BlockProblemOptions } from "./problem-NGBjN-TO.js";
|
|
9
9
|
/** How a delivery proves it came from the sender. */
|
|
10
10
|
type IncomingVerify = "none" | "standard-webhooks" | "hmac-sha256" | "shared-secret";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
4
|
-
import { n as BlockOptions } from "./block-helpers-
|
|
5
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { n as BlockOptions } from "./block-helpers-disoUWCp.js";
|
|
5
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
6
6
|
import { i as JwsAlgorithm, n as Jwks, o as SigningAlgorithm, t as Jwk } from "./jws-CxgTsbgG.js";
|
|
7
7
|
interface SigningKeysOptions extends BlockOptions {
|
|
8
8
|
/**
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { r as AuthState } from "./resolve--LfVoOMg.js";
|
|
2
|
+
import { JWTClaims } from "@supabase/server";
|
|
3
|
+
/**
|
|
4
|
+
* A verified user session, frozen and serializable. Times are epoch seconds,
|
|
5
|
+
* like `AuthSession.expiresAt`, because the snapshot crosses `use cache`
|
|
6
|
+
* serialization (ADR 0095).
|
|
7
|
+
*/
|
|
8
|
+
interface SessionSnapshot<C = unknown> {
|
|
9
|
+
readonly accessToken: string;
|
|
10
|
+
readonly claims: Readonly<JWTClaims & C>;
|
|
11
|
+
/** The Auth session id (`session_id`), or `null` for tokens without one. */
|
|
12
|
+
readonly sessionId: string | null;
|
|
13
|
+
readonly userId: string;
|
|
14
|
+
/** Seconds since epoch, from `exp`. */
|
|
15
|
+
readonly expiresAt: number | null;
|
|
16
|
+
/** Seconds since epoch, from `iat`. */
|
|
17
|
+
readonly issuedAt: number | null;
|
|
18
|
+
/** The `authz_ver` claim, or `null` when the token has none. */
|
|
19
|
+
readonly authzVersion: number | null;
|
|
20
|
+
}
|
|
21
|
+
/** Verified JWT claims, read by name. */
|
|
22
|
+
type Claims = Readonly<Record<string, unknown>>;
|
|
23
|
+
/** The `iat` claim in epoch seconds, or `null`. */
|
|
24
|
+
declare function issuedAtOf(claims: Claims): number | null;
|
|
25
|
+
/** The `authz_ver` claim as a number, or `null` when absent or malformed. */
|
|
26
|
+
declare function authzVersionOf(claims: Claims): number | null;
|
|
27
|
+
/**
|
|
28
|
+
* Whether `value` is a snapshot this process built from a verified token. A
|
|
29
|
+
* snapshot that crossed serialization, or was built by hand, is not.
|
|
30
|
+
*/
|
|
31
|
+
declare function isSessionSnapshot(value: unknown): value is SessionSnapshot;
|
|
32
|
+
/** The snapshot of a verified user, or `null` for any other caller. */
|
|
33
|
+
declare function snapshotOf<C, P>(auth: AuthState<C, P>): SessionSnapshot<C> | null;
|
|
34
|
+
/**
|
|
35
|
+
* A stable cache key for a session: user, Auth session and authorization
|
|
36
|
+
* version. It never contains the token, which rotates hourly and would churn
|
|
37
|
+
* every key.
|
|
38
|
+
*/
|
|
39
|
+
declare function sessionCacheKey(snapshot: Pick<SessionSnapshot, "userId" | "sessionId" | "authzVersion">): string;
|
|
40
|
+
interface SessionMemoOptions {
|
|
41
|
+
/** The most sessions kept; the least recently used goes first. Default: 1000. */
|
|
42
|
+
readonly max?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Milliseconds an entry lives at most. It never outlives the token's `exp`.
|
|
45
|
+
* Default: 300000 (5 minutes).
|
|
46
|
+
*/
|
|
47
|
+
readonly ttlMs?: number;
|
|
48
|
+
/** Epoch milliseconds. */
|
|
49
|
+
readonly now?: () => number;
|
|
50
|
+
}
|
|
51
|
+
interface SessionMemoStats {
|
|
52
|
+
/** Lookups answered by a stored or in-flight verification. */
|
|
53
|
+
readonly hits: number;
|
|
54
|
+
/** Lookups that ran a verification. */
|
|
55
|
+
readonly misses: number;
|
|
56
|
+
readonly size: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Verified sessions by a SHA-256 of the access token. Every `use cache` scope
|
|
60
|
+
* of a request resolves the same token; the first one verifies it and the
|
|
61
|
+
* others await the same promise.
|
|
62
|
+
*/
|
|
63
|
+
interface SessionMemo<T> {
|
|
64
|
+
/**
|
|
65
|
+
* The stored value for `token`, else `load()`'s. A `null` result is not
|
|
66
|
+
* stored. Read the clock (call this) only after the request's dynamic APIs
|
|
67
|
+
* (`cookies()`) have been awaited.
|
|
68
|
+
*/
|
|
69
|
+
get(token: string, load: () => Promise<T | null>): Promise<T | null>;
|
|
70
|
+
/** Stores a value verified elsewhere (a refresh, a sign-in). */
|
|
71
|
+
seed(token: string, value: T): Promise<void>;
|
|
72
|
+
/** Drops every entry `match` returns true for (a user's sessions). */
|
|
73
|
+
evict(match: (value: T) => boolean): void;
|
|
74
|
+
clear(): void;
|
|
75
|
+
stats(): SessionMemoStats;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A bounded LRU of verified sessions. Keys derive only from the token, never
|
|
79
|
+
* from a user id or a header, so one instance can serve many users at once
|
|
80
|
+
* (Fluid compute). Create it once at module scope; `createServer` owns one.
|
|
81
|
+
*/
|
|
82
|
+
declare function sessionMemo<T>(expiresAt: (value: T) => number | null, options?: SessionMemoOptions): SessionMemo<T>;
|
|
83
|
+
export { authzVersionOf as a, sessionCacheKey as c, SessionSnapshot as i, sessionMemo as l, SessionMemoOptions as n, isSessionSnapshot as o, SessionMemoStats as r, issuedAtOf as s, SessionMemo as t, snapshotOf as u };
|
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as invalidActorError, i as delegationOf, n as actorOf } from "./actor-B5b0i1Fs.js";
|
|
3
|
-
import { r as impersonatorOf } from "./impersonation-D-quM36V.js";
|
|
4
|
-
// src/auth/mfa.ts
|
|
5
|
-
/**
|
|
6
|
-
* The session's assurance level from its claims; anything but `aal2` reads as
|
|
7
|
-
* `aal1`.
|
|
8
|
-
*/
|
|
9
|
-
function aalOf(claims) {
|
|
10
|
-
return claims["aal"] === "aal2" ? "aal2" : "aal1";
|
|
11
|
-
}
|
|
12
|
-
/** The `amr` claim as typed entries, skipping malformed ones. */
|
|
13
|
-
function amrOf(claims) {
|
|
14
|
-
const amr = claims["amr"];
|
|
15
|
-
if (!Array.isArray(amr)) return [];
|
|
16
|
-
return amr.flatMap((entry) => {
|
|
17
|
-
if (typeof entry !== "object" || entry === null) return [];
|
|
18
|
-
const { method, timestamp, provider } = entry;
|
|
19
|
-
if (typeof method !== "string" || typeof timestamp !== "number") return [];
|
|
20
|
-
return [typeof provider === "string" ? {
|
|
21
|
-
method,
|
|
22
|
-
timestamp,
|
|
23
|
-
provider
|
|
24
|
-
} : {
|
|
25
|
-
method,
|
|
26
|
-
timestamp
|
|
27
|
-
}];
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* `undefined` when a user session meets `required`; otherwise a `forbidden`
|
|
32
|
-
* error with `required` and code `INSUFFICIENT_AAL`, for the client to start an
|
|
33
|
-
* MFA challenge. Non-user sessions pass: `allow` decides about them.
|
|
34
|
-
*/
|
|
35
|
-
function checkAal(auth, required) {
|
|
36
|
-
if (required === "aal1" || auth.kind !== "user" || !("claims" in auth)) return;
|
|
37
|
-
if (aalOf(auth.claims) === "aal2") return;
|
|
38
|
-
return dbError("forbidden", "Verify a second factor to continue", {
|
|
39
|
-
code: "INSUFFICIENT_AAL",
|
|
40
|
-
required
|
|
41
|
-
});
|
|
42
|
-
}
|
|
1
|
+
import { t as AUTHZ_VERSION_CLAIM } from "./claim-names-BKig1LOk.js";
|
|
43
2
|
// src/auth/snapshot.ts
|
|
44
3
|
/** The `iat` claim in epoch seconds, or `null`. */
|
|
45
4
|
function issuedAtOf(claims) {
|
|
@@ -48,7 +7,7 @@ function issuedAtOf(claims) {
|
|
|
48
7
|
}
|
|
49
8
|
/** The `authz_ver` claim as a number, or `null` when absent or malformed. */
|
|
50
9
|
function authzVersionOf(claims) {
|
|
51
|
-
const value = claims[
|
|
10
|
+
const value = claims[AUTHZ_VERSION_CLAIM];
|
|
52
11
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
53
12
|
if (typeof value === "string" && /^\d+$/.test(value)) return Number(value);
|
|
54
13
|
return null;
|
|
@@ -176,69 +135,4 @@ function sessionMemo(expiresAt, options = {}) {
|
|
|
176
135
|
})
|
|
177
136
|
};
|
|
178
137
|
}
|
|
179
|
-
|
|
180
|
-
/** Whether the token belongs to an anonymous user (`signInAnonymously()`). */
|
|
181
|
-
function isAnonymousUser(claims) {
|
|
182
|
-
return "is_anonymous" in claims && claims.is_anonymous === true;
|
|
183
|
-
}
|
|
184
|
-
/** Drops the token from an `AuthState`, leaving only serializable fields. */
|
|
185
|
-
function toSession(auth) {
|
|
186
|
-
switch (auth.kind) {
|
|
187
|
-
case "user": {
|
|
188
|
-
const outcome = actorOf(auth.claims);
|
|
189
|
-
if (!outcome.ok) return {
|
|
190
|
-
kind: "invalid",
|
|
191
|
-
reason: "actor",
|
|
192
|
-
error: invalidActorError()
|
|
193
|
-
};
|
|
194
|
-
const impersonator = impersonatorOf(auth.claims);
|
|
195
|
-
const actor = outcome.actor;
|
|
196
|
-
const client = actor?.kind === "oauth-client" || actor?.kind === "agent" && delegationOf(auth.claims) !== void 0 ? actor : void 0;
|
|
197
|
-
const scopes = client ? delegationOf(auth.claims)?.scopes : void 0;
|
|
198
|
-
const delegation = client && (scopes || client.chain) ? {
|
|
199
|
-
scopes: scopes ?? [],
|
|
200
|
-
...client.chain ? { chain: client.chain } : {}
|
|
201
|
-
} : void 0;
|
|
202
|
-
return {
|
|
203
|
-
kind: "user",
|
|
204
|
-
user: auth.user,
|
|
205
|
-
claims: auth.claims,
|
|
206
|
-
expiresAt: auth.expiresAt,
|
|
207
|
-
issuedAt: issuedAtOf(auth.claims),
|
|
208
|
-
authzVersion: authzVersionOf(auth.claims),
|
|
209
|
-
...auth.userMetadata === void 0 ? {} : { userMetadata: auth.userMetadata },
|
|
210
|
-
aal: aalOf(auth.claims),
|
|
211
|
-
anonymous: isAnonymousUser(auth.claims),
|
|
212
|
-
amr: amrOf(auth.claims),
|
|
213
|
-
...impersonator ? { impersonator } : {},
|
|
214
|
-
...actor ? { actor } : {},
|
|
215
|
-
...delegation ? { delegation } : {}
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
case "secret": return {
|
|
219
|
-
kind: "secret",
|
|
220
|
-
keyName: auth.keyName
|
|
221
|
-
};
|
|
222
|
-
case "apiKey": return {
|
|
223
|
-
kind: "apiKey",
|
|
224
|
-
keyId: auth.keyId,
|
|
225
|
-
name: auth.name,
|
|
226
|
-
...auth.organizationId ? { organizationId: auth.organizationId } : {},
|
|
227
|
-
...auth.userId ? { userId: auth.userId } : {},
|
|
228
|
-
scopes: auth.scopes,
|
|
229
|
-
...auth.createdAt ? { createdAt: Math.floor(auth.createdAt.epochMilliseconds / 1e3) } : {},
|
|
230
|
-
...auth.createdBy ? { createdBy: auth.createdBy } : {}
|
|
231
|
-
};
|
|
232
|
-
case "none": return {
|
|
233
|
-
kind: "none",
|
|
234
|
-
reason: auth.reason
|
|
235
|
-
};
|
|
236
|
-
case "invalid": return {
|
|
237
|
-
kind: "invalid",
|
|
238
|
-
reason: auth.reason,
|
|
239
|
-
error: auth.error
|
|
240
|
-
};
|
|
241
|
-
default: return auth;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
export { isSessionSnapshot as a, sessionMemo as c, amrOf as d, checkAal as f, authzVersionOf as i, snapshotOf as l, toSession as n, issuedAtOf as o, authOfSnapshot as r, sessionCacheKey as s, isAnonymousUser as t, aalOf as u };
|
|
138
|
+
export { sessionCacheKey as a, issuedAtOf as i, authzVersionOf as n, sessionMemo as o, isSessionSnapshot as r, snapshotOf as s, authOfSnapshot as t };
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-B6zuexk7.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-BA05aoY9.js";
|
|
7
|
+
import { n as AuthSession } from "../view-Cy2XxYp1.js";
|
|
8
|
+
import { n as Controller } from "../controller-CQrkLoRX.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-DxPZYw2m.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-UX42PHLP.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-QSaPsL2P.js";
|
|
12
|
-
import { t as SupportView } from "../support-view-
|
|
12
|
+
import { t as SupportView } from "../support-view-DSmCett7.js";
|
|
13
13
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
14
14
|
import { QueryClient } from "@tanstack/query-core";
|
|
15
15
|
import { Accessor, JSX } from "solid-js";
|
package/dist/solid/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 { t as supportOf } from "../support-view-CvDEgyGY.js";
|
|
4
4
|
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";
|
|
5
5
|
import { createComponent, createContext, createEffect, createMemo, createSignal, from, onCleanup, onMount, untrack, useContext } from "solid-js";
|
|
@@ -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, 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 { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
8
|
/** The part of a SolidStart `FetchEvent` the integration reads and writes. */
|
|
10
9
|
export interface SolidFetchEvent {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as extendServer, n as flushEvents, 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, n as flushEvents, 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 { i as nitroCloudflareEnv } 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
|
import { t as beforeRoute } from "../before-route-Ra3OhI2x.js";
|
|
8
8
|
// src/solid-start/index.ts
|
|
9
9
|
/** SolidStart integration: middleware, guards and server function actions. */
|
package/dist/spec/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as DescribedFunction } from "../function-contract-DgDBYbXu.js";
|
|
2
2
|
import { C as ModelWebhook, D as ResourceOperation, E as OperationSource, O as SecurityRequirement, S as ModelTag, T as OAuthFlow, _ as ModelResponseOrRef, a as JsonSchema, b as ModelServer, c as ModelChannelOperation, d as ModelInfo, f as ModelMessage, g as ModelResponse, h as ModelParameter, i as JsonObject, k as TableVerb, l as ModelContent, m as ModelOperation, n as DataApiOperation, o as ModelBody, p as ModelMessageTrait, r as HttpMethod, s as ModelChannel, t as ApiModel, u as ModelExample, v as ModelSecurityProfileRequirement, w as ModelWorkflow, x as ModelStep, y as ModelSecurityScheme } from "../model-Lxa_mOzB.js";
|
|
3
|
+
import { a as ResourcePlan, o as StandardLike, r as ResourceDescription } from "../resource-DWllVW8k.js";
|
|
3
4
|
import { a as FormatVersion, c as SpecDiagnostic, d as defineDocumentFormat, i as DocumentOf, l as VersionOf, n as DiagnosticSeverity, o as LowerContext, r as DocumentFormat, s as RenderedOf, t as AnyDocumentFormat, u as VersionStatus } from "../format-BT0Z3V54.js";
|
|
4
|
-
import { a as ResourcePlan, o as StandardLike, r as ResourceDescription } from "../resource-BfsTJnxZ.js";
|
|
5
5
|
import { t as SPEC_PINS } from "../spec-pins-CuQ2anBw.js";
|
|
6
|
-
import { A as AnyOpenApiDocument, B as OpenApiSecurityRequirement, C as TopicInput, D as DEFAULT_ERRORS, E as CustomSecurity, F as OpenApi33PreviewDocument, H as RenderedOpenApi, I as OpenApiComponents, L as OpenApiDocument, M as OpenApi30Document, N as OpenApi31Document, O as PROBLEM_SCHEMA, P as OpenApi32Document, R as OpenApiDocuments, S as EventsOptions, T as DataApiOptions, V as OpenApiVersion, _ as WorkflowSource, a as OverlayEngine, b as CLOUD_EVENT_TRAIT, c as defineApi, d as BuiltModel, f as ComponentNameContext, g as RouteSpec, h as ResourceInput, i as OpenApiRenderResult, j as OPENAPI_33_PREVIEW_VERSION, k as SecurityPreset, l as ApiOptions, m as OperationIdContext, n as DefineApiOptions, o as RenderOptions, p as EnrichHooks, r as OpenApiRenderOptions, s as RenderResult, t as Api, u as ApiSource, v as BlockEventSchema, w as topicsFrom, x as CloudEventsInput, y as BlockEventSchemas, z as OpenApiInfo } from "../api-
|
|
6
|
+
import { A as AnyOpenApiDocument, B as OpenApiSecurityRequirement, C as TopicInput, D as DEFAULT_ERRORS, E as CustomSecurity, F as OpenApi33PreviewDocument, H as RenderedOpenApi, I as OpenApiComponents, L as OpenApiDocument, M as OpenApi30Document, N as OpenApi31Document, O as PROBLEM_SCHEMA, P as OpenApi32Document, R as OpenApiDocuments, S as EventsOptions, T as DataApiOptions, V as OpenApiVersion, _ as WorkflowSource, a as OverlayEngine, b as CLOUD_EVENT_TRAIT, c as defineApi, d as BuiltModel, f as ComponentNameContext, g as RouteSpec, h as ResourceInput, i as OpenApiRenderResult, j as OPENAPI_33_PREVIEW_VERSION, k as SecurityPreset, l as ApiOptions, m as OperationIdContext, n as DefineApiOptions, o as RenderOptions, p as EnrichHooks, r as OpenApiRenderOptions, s as RenderResult, t as Api, u as ApiSource, v as BlockEventSchema, w as topicsFrom, x as CloudEventsInput, y as BlockEventSchemas, z as OpenApiInfo } from "../api-myq2e9t5.js";
|
|
7
7
|
/**
|
|
8
8
|
* Builds the version-neutral API model once per metadata, plugin list, block
|
|
9
9
|
* set and options object. Formats lower it to each version; `defineApi` wraps
|