better-supabase 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-CWzyKepA.js → adapter-ddQ9Hzka.js} +126 -91
- package/dist/{agents-DXiOPB3V.d.ts → agents-BwUHtvD6.d.ts} +4 -4
- package/dist/{ai-cache-CLiAXCPH.d.ts → ai-cache-CPOP2PYz.d.ts} +4 -4
- package/dist/{ai-chat-DlcBdOhJ.d.ts → ai-chat-BZhfCHHr.d.ts} +106 -25
- package/dist/{ai-schedules-Drx2KRTn.d.ts → ai-schedules-BZPmySUa.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/chat/index.js +3 -272
- 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/index.js +2 -3
- 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 +6 -5
- package/dist/ai-sdk/workflow/index.js +9 -9
- package/dist/{api-myq2e9t5.d.ts → api-XEaCJbgv.d.ts} +5 -5
- package/dist/{api-keys-DbIbkGxx.d.ts → api-keys-C82fMru4.d.ts} +4 -4
- package/dist/{app-tables-X3yzJljM.d.ts → app-tables-C0XVpQEJ.d.ts} +1 -1
- package/dist/{approvals-Da4uAANx.js → approvals-D8gR1R8R.js} +95 -11
- package/dist/{approvals-DZoGtNFv.d.ts → approvals-DqCv7f-G.d.ts} +101 -7
- package/dist/{assistant-BEbRPjhn.d.ts → assistant-5heV2GeR.d.ts} +7 -3
- package/dist/assistant-BHZ6fqBR.js +300 -0
- package/dist/astro/index.d.ts +7 -7
- package/dist/astro/index.js +5 -5
- package/dist/{auth-module-CqXdm8qD.js → auth-module-DkqapRZJ.js} +1 -1
- package/dist/{authorization-D1P3VBOd.d.ts → authorization-2Rv1AJQJ.d.ts} +114 -39
- package/dist/{authorization-hooks-CxwsRnfV.d.ts → authorization-hooks-C0GfMvFm.d.ts} +8 -2
- package/dist/authz-topic-D7fPUY4P.js +13 -0
- package/dist/{availability-CebEOfMN.d.ts → availability-CZlcrkqD.d.ts} +49 -8
- package/dist/{base64-CVyKHBBw.js → base64-CEBz6-Jj.js} +9 -2
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-Bvv-Zrdh.d.ts → bind-C2XvMlfg.d.ts} +7 -7
- package/dist/{block-env-h_uPl2f_.d.ts → block-env-BQrtLPyc.d.ts} +4 -4
- package/dist/{block-helpers-disoUWCp.d.ts → block-helpers-BNtM1tqy.d.ts} +1 -1
- package/dist/{block-hooks-DrA_d1dJ.d.ts → block-hooks-CtMsgLQr.d.ts} +2 -2
- package/dist/{block-subjects-Br2MQNFn.d.ts → block-subjects-Bkieh2Xk.d.ts} +1 -1
- package/dist/{block-tables-pj3eHfoP.d.ts → block-tables-DPOgnT3y.d.ts} +1 -1
- package/dist/{block-transport-BEtC_Kis.d.ts → block-transport-CDmOUuLZ.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-chat/index.js +80 -20
- 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 +3 -3
- package/dist/blocks/approvals/index.d.ts +16 -5
- package/dist/blocks/approvals/index.js +7 -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/audit/index.js +1 -1
- 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/billing/index.js +1 -1
- package/dist/blocks/bookings/index.d.ts +6 -6
- package/dist/blocks/bulk/index.d.ts +4 -4
- package/dist/blocks/calendar/index.d.ts +46 -8
- package/dist/blocks/calendar/index.js +306 -47
- package/dist/blocks/catalog/index.d.ts +39 -17
- package/dist/blocks/catalog/index.js +35 -15
- 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/documents/index.js +1 -1
- 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 +74 -9
- package/dist/blocks/enrollments/index.js +67 -3
- package/dist/blocks/entitlements/index.d.ts +6 -6
- package/dist/blocks/expenses/index.d.ts +93 -6
- package/dist/blocks/expenses/index.js +95 -4
- package/dist/blocks/field-history/index.d.ts +4 -4
- package/dist/blocks/flags/index.d.ts +5 -5
- 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 +11 -11
- package/dist/blocks/inbox/index.js +56 -1
- 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 +26 -10
- package/dist/blocks/invoices/index.js +23 -7
- package/dist/blocks/knowledge/index.d.ts +4 -4
- package/dist/blocks/knowledge/index.js +1 -1
- 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 +88 -15
- package/dist/blocks/leave/index.js +65 -14
- 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/memory/index.d.ts +5 -5
- package/dist/blocks/memory/index.js +30 -5
- 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/notifications/index.js +1 -1
- package/dist/blocks/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- package/dist/blocks/oauth-server/index.js +1 -1
- 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/outbox/index.d.ts +4 -4
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/passes/index.js +2 -2
- package/dist/blocks/permissions/index.d.ts +7 -7
- 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 +119 -27
- package/dist/blocks/quotes/index.js +111 -17
- 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 +78 -11
- package/dist/blocks/reminders/index.js +118 -6
- 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/security-events/index.js +1 -1
- 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/sessions/index.js +1 -1
- 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/shipments/index.js +1 -1
- package/dist/blocks/signatures/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- package/dist/blocks/signing-keys/index.js +2 -2
- 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 +27 -7
- package/dist/blocks/state-machine/index.js +7 -2
- 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/vercel-marketplace/index.js +3 -3
- package/dist/blocks/versions/index.d.ts +6 -6
- package/dist/blocks/waitlist/index.d.ts +5 -5
- package/dist/blocks/waitlist/index.js +1 -1
- package/dist/blocks/webhooks/index.d.ts +13 -13
- package/dist/blocks/webhooks/index.js +5 -5
- package/dist/blocks/workflow-editor/index.d.ts +10 -10
- package/dist/blocks/workflow-editor/index.js +65 -2
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-Br0VXzaf.d.ts → bookings-Dj5cvXKv.d.ts} +4 -4
- package/dist/{bucket-DvG66r5G.d.ts → bucket-CrsJNHzi.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/claims/index.d.ts +6 -6
- package/dist/claims/index.js +2 -2
- package/dist/cli/{add-DzgsOE8V.js → add-D2CH8t_B.js} +2 -2
- package/dist/cli/add-De73Ghlh.js +1 -0
- package/dist/cli/{add-CYreXA68.js → add-Duf1-19E.js} +16 -14
- package/dist/cli/{agent-59XWXsRi.js → agent-Tqq3MAqx.js} +26 -1
- package/dist/cli/{app-table-files-BnISa3uY.js → app-table-files-ha8X0rRE.js} +2 -2
- package/dist/cli/app-tables-BIyQcsHH.js +42 -0
- package/dist/cli/{backfill-BLLTSDSa.js → backfill-CLgA6-ll.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-uzh1g_0v.js → blocks-9AeouX4h.js} +2 -2
- package/dist/cli/{blocks-CpRvI7x8.js → blocks-BVB1fMMj.js} +1 -1
- package/dist/cli/{cache-BPWC7tGD.js → cache-aMk9vF1_.js} +1 -1
- package/dist/cli/{codemod-CbJVS_kG.js → codemod-B5wrcnF2.js} +113 -4
- package/dist/cli/{command-BpZ4AuhR.js → command-DM_x_yzZ.js} +6 -0
- package/dist/cli/{completion-DHTT6rjI.js → completion-CusuUJNn.js} +1 -1
- package/dist/cli/{completion-B08Q0xB3.js → completion-Cx2UYd-y.js} +2 -2
- package/dist/cli/{completion-CwL7e93t.js → completion-DbYb3N8e.js} +2 -2
- package/dist/cli/{config-D-Upz3jV.js → config-BeuImpav.js} +1 -1
- package/dist/cli/{content-mapper-Cjkm2Sg3.js → content-mapper-CEtdbshU.js} +2 -2
- package/dist/cli/{db-Diy1OebO.js → db-CeiQzhPq.js} +2 -2
- package/dist/cli/{doctor-D94FEJZs.js → doctor-DaOUWfRN.js} +386 -49
- package/dist/cli/env-BfWbheiC.js +1 -0
- package/dist/cli/{env-BAJn6wCA.js → env-DVV10l_r.js} +1 -1
- package/dist/cli/{gen-Cd0VNDjE.js → gen-BO-2NF-G.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-Co1N9ZoA.js → init-Xit9Hnbb.js} +9 -9
- package/dist/cli/{keys-CxajkV_7.js → keys-DJTN2Avl.js} +1 -1
- package/dist/cli/{live-NFNeZsP7.js → live-CuMpyRjF.js} +2 -2
- package/dist/cli/{mcp-WZ8t7NMz.js → mcp-C7d4j5cq.js} +4 -4
- package/dist/cli/{metadata-BzMkmrZR.js → metadata-D2YvkY2D.js} +3 -3
- package/dist/cli/{migrate-C9gyDAV7.js → migrate-BCXxyTKt.js} +2 -2
- package/dist/cli/{migration-safety-BNi8PIiM.js → migration-safety-DfwTOBQ4.js} +1 -1
- package/dist/cli/{migrations-Ds0J_TmZ.js → migrations-nomh4TBo.js} +2 -2
- package/dist/cli/{module-migration-hFrlzQZ5.js → module-migration--9T_T-zt.js} +2 -2
- package/dist/cli/{moved-BAFPdJz_.js → moved-CT6i1csY.js} +1 -1
- package/dist/cli/{parse-BueItuNJ.js → parse-qgJylE_A.js} +1 -1
- package/dist/cli/{powersync-oFiwgsBi.js → powersync-DB9WZsIv.js} +4 -4
- package/dist/cli/powersync-IBM_v_eJ.js +1 -0
- package/dist/cli/{print-BtreoJSm.js → print-S6IF5rZm.js} +2 -2
- package/dist/cli/{providers-Be2dgyuR.js → providers-BDTcal71.js} +1 -1
- package/dist/cli/{prune-workflows-BPxgRrqY.js → prune-workflows-Zr2DjByi.js} +3 -3
- package/dist/cli/{remove-B4ad996E.js → remove-CPX5Tg5s.js} +6 -6
- package/dist/cli/{render-C-Mfq-o3.js → render-Bp7a7XQ9.js} +18 -4
- package/dist/cli/{run-D2nuyyPo.js → run-BclCFEyP.js} +12 -48
- package/dist/cli/{run-dY9uOC3W.js → run-BlVaLnt_.js} +2 -2
- package/dist/cli/{run-cLdnJHH0.js → run-kgG50x_Z.js} +44 -43
- package/dist/cli/{seed-BpaqqyO8.js → seed-Cn2R91cd.js} +2 -2
- package/dist/cli/seed-DGGjReq4.js +1 -0
- package/dist/cli/{shared-DCHxLAEL.js → shared-D60W9NS-.js} +1 -1
- package/dist/cli/{skills-jZThjL3B.js → skills-DH-yPDny.js} +1 -1
- package/dist/cli/{snapshot-CloKPNxv.js → snapshot-C3_eQUgY.js} +2 -2
- package/dist/cli/{source-Bwyp18Rj.js → source-Bk6XwIAK.js} +1 -1
- package/dist/cli/{spec-DsVq4_qV.js → spec-BDTpcBns.js} +1 -1
- package/dist/cli/{spec-DAUF4ybu.js → spec-C8ydQwZC.js} +3 -3
- package/dist/cli/{sql-layout-CHpEL0oq.js → sql-layout-DVQ20UMi.js} +2 -2
- package/dist/cli/{stack-147NqctC.js → stack-CmhSfY5V.js} +3 -2
- package/dist/cli/{sync-DZu1r34s.js → sync-D-WO4Yvl.js} +4 -4
- package/dist/cli/{table-D9FbJS8h.js → table-k5OABwy3.js} +1 -1
- package/dist/cli/{upgrade-Bpvi70zm.js → upgrade-DGe5Pv6v.js} +5 -5
- package/dist/cli/{upgrade-A-BALvp3.js → upgrade-XdhMuHAu.js} +3 -3
- package/dist/cli/{version-B59mZJoy.js → version-DKfeme2I.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 +2 -2
- package/dist/{client-Bky2z09B.js → client-DrejIxsu.js} +1 -1
- package/dist/{cloud-event-DXWmXrus.d.ts → cloud-event-BEmAUdl1.d.ts} +1 -1
- package/dist/commerce/index.js +1 -1
- package/dist/{compiler-qlXlokKn.d.ts → compiler-BOW4yPcW.d.ts} +2 -2
- package/dist/{composite-CIxjVcL1.d.ts → composite-B-oAH16L.d.ts} +7 -7
- package/dist/{composite-D2JnIiHt.js → composite-BidYZWZY.js} +3 -3
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +4 -4
- package/dist/{config-BZWSFxkG.js → config-BKxjItQ-.js} +3 -3
- package/dist/{config-DQP0IvDX.js → config-BrRlSxhx.js} +1 -1
- package/dist/{connectors-Cf2LeAuZ.d.ts → connectors-CrLRW4Ol.d.ts} +4 -4
- package/dist/{context-CderJRZf.d.ts → context-yfOlyAqb.d.ts} +3 -3
- package/dist/contract/index.d.ts +9 -9
- package/dist/{controller-DaWA9eWS.d.ts → controller-CAcLEndc.d.ts} +1 -1
- package/dist/{conversion-C9rndpEI.d.ts → conversion-s1NtB6S-.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +4 -4
- package/dist/create/lite/index.js +2 -2
- package/dist/credentials/index.d.ts +4 -4
- package/dist/credentials/index.js +1 -1
- package/dist/{cron-route-DSITg1yC.js → cron-route-uTsC2BD0.js} +1 -1
- package/dist/{data-engine-CMENsp3d.d.ts → data-engine-CX1oYDZl.d.ts} +1 -1
- package/dist/{define-ITQA71fw.d.ts → define-BvkaC3Oh.d.ts} +5 -5
- package/dist/{define-B6D55cO0.js → define-Duh2mMYk.js} +1 -1
- package/dist/{define-block-COmMkx2x.d.ts → define-block-Ds3aLZwz.d.ts} +12 -12
- package/dist/{documents-DeZw83ue.d.ts → documents-Btk0MhC0.d.ts} +3 -3
- package/dist/edge/index.d.ts +9 -9
- package/dist/edge/index.js +7 -7
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{embeddings-rVR2AKVz.d.ts → embeddings-CI6P_mtD.d.ts} +1 -1
- package/dist/{ended-NC_ZesY4.d.ts → ended-iq2wp8fc.d.ts} +8 -3
- package/dist/{entitlements-BefkpQIz.d.ts → entitlements-Dhu-4vlH.d.ts} +2 -2
- package/dist/env/index.d.ts +1 -1
- package/dist/{messages-CRk1g6oe.js → errors-0Qid9fGz.js} +107 -3
- package/dist/eve/index.d.ts +9 -9
- package/dist/eve/index.js +3 -3
- package/dist/{eve-DIKjuPp5.d.ts → eve-DleYrhwj.d.ts} +2 -2
- package/dist/{event-calendar-DUtFyRrv.d.ts → event-calendar-DPMcqy7Q.d.ts} +1 -1
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-DVt3Z9hw.d.ts → events-DCw3c6pj.d.ts} +1 -1
- package/dist/{executor-DqNRrFxx.d.ts → executor-B-o7QMPp.d.ts} +16 -2
- package/dist/{executor-CFmee_nV.d.ts → executor-DoSNec_H.d.ts} +1 -1
- package/dist/{executor-CHnoKOxk.d.ts → executor-H8ZLkeHj.d.ts} +4 -4
- package/dist/{executor-BDMqPbVU.js → executor-RYiR4z47.js} +71 -37
- package/dist/expo/index.d.ts +4 -4
- package/dist/expo/index.js +7 -7
- package/dist/{field-errors-D1meOs_H.d.ts → field-errors-DXZk9Qjt.d.ts} +10 -10
- package/dist/{fields-CAVk9dxX.d.ts → fields-CP46SPNE.d.ts} +1 -1
- package/dist/{filter-evaluate-Bz3Fzhz2.d.ts → filter-evaluate-Bkbb0nuQ.d.ts} +1 -1
- package/dist/{filter-query-DV-x8fio.d.ts → filter-query-Xj40B5KT.d.ts} +1 -1
- package/dist/{flags-6emyAXly.d.ts → flags-Cuew4tGx.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +2 -2
- package/dist/{framework-BFlaPuvv.d.ts → framework-Byr_j8G-.d.ts} +8 -8
- package/dist/{framework-ChzJYkJW.js → framework-z3KTPRjk.js} +4 -4
- package/dist/{gateway-DaekJ_Me.d.ts → gateway-B9k89AC4.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 +9 -10
- package/dist/hono/index.js +8 -8
- package/dist/{inbox-DavCzW7b.d.ts → inbox-yGfUVQr2.d.ts} +61 -6
- package/dist/{index-Dvpu22CJ.d.ts → index-1uV69AZq.d.ts} +1 -1
- package/dist/{index-BbDiBiKt.d.ts → index-6H-8Ib1w.d.ts} +4 -4
- package/dist/{index-M1izbwbN.d.ts → index-Ag-T51Jl.d.ts} +1 -1
- package/dist/{index-ZQZMQF4l.d.ts → index-BUluRi0b.d.ts} +6 -6
- package/dist/{index-BQlLxOj5.d.ts → index-C78VPlXW.d.ts} +1 -1
- package/dist/{index-D18su_r5.d.ts → index-CY612vAg.d.ts} +10 -5
- package/dist/{index-DXUiRyEk.d.ts → index-CnzGRpeH.d.ts} +5 -5
- package/dist/{index-BIAtapnD.d.ts → index-Dbd1E5Au.d.ts} +5 -5
- package/dist/{index-ChLuLxy-.d.ts → index-Dv6lfL5p.d.ts} +14 -14
- package/dist/{index-8w4OB5En.d.ts → index-F6lsRlsr.d.ts} +1 -1
- package/dist/{index-D9aV0Fvx.d.ts → index-kkZwp5M1.d.ts} +6 -6
- package/dist/{index-C13UgV67.d.ts → index-lMApFSAd.d.ts} +5 -5
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/{instances-D9YrkoAy.js → instances-xQ2lupVE.js} +218 -11
- package/dist/jwks-cache-CBKtICNV.js +114 -0
- package/dist/{jws-B8p0ppgh.js → jws-De9qjIPV.js} +1 -1
- package/dist/{kit-9pZP5iLU.js → kit-D5rRAKWJ.js} +2 -2
- package/dist/{kit-OgFOW9rX.d.ts → kit-DCuO1ZhB.d.ts} +4 -4
- package/dist/{knowledge-DdZzUTQ-.js → knowledge-CJnZOaix.js} +67 -7
- package/dist/{knowledge-BBC2sfAY.d.ts → knowledge-DWXAxvkN.d.ts} +82 -11
- package/dist/lint/index.d.ts +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-C7V8kUaD.d.ts → list-query-D1h3Dmnk.d.ts} +3 -3
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/{messaging-D5z2TR37.d.ts → messaging-Bfe4p9Pm.d.ts} +4 -4
- package/dist/{model-messages-BcrkjsPE.js → model-messages-CIHqP7Z3.js} +1 -1
- 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 +331 -79
- package/dist/next/index.js +520 -105
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{operations-t_hlXkS4.d.ts → operations-SWpzGC_K.d.ts} +1 -1
- package/dist/{options-D4dxMGHF.js → options-Bgnm4pTD.js} +1 -0
- package/dist/{options-C13-dVMH.js → options-D-jiqb0l.js} +2 -0
- package/dist/{options-C9bp3SEA.js → options-DqmTs2nv.js} +2 -1
- package/dist/{options-CuPWezcV.js → options-RYbyaVhv.js} +3 -1
- package/dist/options-SOjQVgfS.js +37 -0
- package/dist/{options-JnPEVbBJ.js → options-ScQ6Hnxo.js} +2 -1
- package/dist/{options-CuaWhsQS.js → options-X61tvckX.js} +2 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/orpc/index.js +6 -6
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-7zgh-7nw.d.ts → outbox-BFZS6Kvz.d.ts} +4 -4
- package/dist/{permissions-C8p6RlIZ.d.ts → permissions-2UlVQDzY.d.ts} +1 -1
- package/dist/{pool-D-4HyhuW.d.ts → pool-yO-LzZAd.d.ts} +3 -3
- package/dist/{ports-CmEXVqhg.js → ports-CkygVOeE.js} +2 -2
- package/dist/{ports-C-8uduFM.d.ts → ports-prqYrReN.d.ts} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-DZtM2nIS.d.ts → postgrest-Bjain6nf.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-B_sSI9vg.js → preset-BvHNleCo.js} +2 -2
- package/dist/{project-DVlXQGEp.js → project-CBvowdKY.js} +5 -5
- package/dist/{provider-BI0KC4u5.d.ts → provider-bIAzxVMB.d.ts} +1 -1
- package/dist/{push-token-D41lOoE8.d.ts → push-token-DtqJeg8w.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{rate-limit-CRhlLFhP.js → rate-limit-BJ4EMdAy.js} +1 -1
- package/dist/react/index.d.ts +9 -9
- 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 +9 -9
- package/dist/react/server.js +2 -2
- package/dist/react/session.d.ts +2 -32
- package/dist/react/session.js +1 -37
- package/dist/{react-COIov1yC.js → react-DZ7AW2yf.js} +2 -2
- package/dist/react-router/index.d.ts +6 -6
- package/dist/react-router/index.js +5 -5
- package/dist/realtime/index.d.ts +6 -6
- package/dist/{record-form-DU2EoVsv.d.ts → record-form-BQA-lawE.d.ts} +1 -1
- package/dist/{recordings-D69Va7gP.d.ts → recordings-Bw5LoocX.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refusal-CGi-0Q18.d.ts → refusal-BX1EvmpJ.d.ts} +3 -3
- package/dist/{refusal-5c6UMpUP.js → refusal-rnbr6RZD.js} +2 -2
- package/dist/{refresh-B8t_KE3s.js → request-kind-tNDM5Z_o.js} +15 -31
- package/dist/{resolve--LfVoOMg.d.ts → resolve-BIpQRhvF.d.ts} +97 -36
- package/dist/{resolve-FW8oeXvh.js → resolve-CZV31iCm.js} +402 -392
- package/dist/{resolved-names-h-3UbKcw.js → resolved-names-b6P2--jK.js} +1 -1
- package/dist/{resource-BbWk4hoP.js → resource-COaS9_i8.js} +1 -1
- package/dist/{resource-DWllVW8k.d.ts → resource-CaYpB07K.d.ts} +1 -1
- package/dist/{resource-execute-DUBYKTYU.d.ts → resource-execute-A1NbR-sd.d.ts} +2 -2
- package/dist/{resource-types-RgaljPs0.d.ts → resource-types-CTcc37WL.d.ts} +4 -4
- package/dist/{resources-Bki1J4jy.d.ts → resources-13ZFX1G6.d.ts} +2 -2
- package/dist/{resources-DYSx9NYM.js → resources-DhiK3yLO.js} +1 -1
- package/dist/{respond-DLH4tD2d.js → respond-8A3EOo61.js} +1 -1
- package/dist/{respond-BYOV7KZp.d.ts → respond-CAxhkwAi.d.ts} +15 -19
- package/dist/{sales-lines-DuNVoKHA.d.ts → sales-lines-wQHuL-pa.d.ts} +1 -1
- package/dist/{sandboxes-B2hBoBvJ.d.ts → sandboxes-BF9RxxCU.d.ts} +1 -1
- package/dist/{scores-FAORS4qU.d.ts → scores-Ce8MxQX9.d.ts} +5 -5
- package/dist/server/index.d.ts +58 -36
- package/dist/server/index.js +35 -41
- package/dist/{server-types-C2hlvhP4.d.ts → server-types-DEjva0MW.d.ts} +19 -17
- package/dist/{session-B4VasaAA.d.ts → session-BA0YDmjt.d.ts} +11 -12
- package/dist/session-BjPYE4dT.js +180 -0
- package/dist/session-CeYL3EPm.d.ts +77 -0
- package/dist/{session-status-D8CBxCqv.d.ts → session-status-Df6tuKY9.d.ts} +4 -3
- package/dist/{sign-in-CX1a5i2P.d.ts → sign-in-4u4vLtXG.d.ts} +16 -4
- package/dist/{sign-in-CxdoTEp5.js → sign-in-djgvab1X.js} +3 -3
- package/dist/{sign-in-BMm1xhKq.js → sign-in-k2lXELeC.js} +2 -2
- package/dist/{signatures-CBn7w4VR.js → signatures-DK01D2S7.js} +1 -1
- package/dist/{signers-6ih6i9aq.d.ts → signers-Dw9DBZjJ.d.ts} +4 -4
- package/dist/{signing-keys-De09WNJ3.d.ts → signing-keys-FglIQ6iL.d.ts} +2 -2
- package/dist/{signing-keys-BC5_hJN5.js → signing-keys-sGaXklwD.js} +1 -1
- package/dist/{snapshot-CVMSyTHH.js → snapshot-BOA7lkRg.js} +9 -17
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-C9nO-Mat.js → sql-BChN3Hxv.js} +7382 -2219
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-CuzAjsc8.d.ts → sso-B7w7h8RJ.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -6
- package/dist/ssr/index.js +3 -3
- 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-BlD8tALG.d.ts → subject-readers-YL8H9G8X.d.ts} +2 -2
- package/dist/{subjects-Bv2dPflD.d.ts → subjects-CVjAE7nz.d.ts} +3 -3
- package/dist/{support-DxYI6sDM.d.ts → support-BwtMgjVg.d.ts} +4 -4
- package/dist/{support-view-DSmCett7.d.ts → support-view-GykHOIQ2.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 -7
- package/dist/sveltekit/index.js +5 -5
- package/dist/{tags--k2fbPfO.d.ts → tags-CAfvzA1U.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-gezshhcs.d.ts → tenant-lBgoqg9T.d.ts} +1 -1
- package/dist/testing/index.d.ts +27 -28
- package/dist/testing/index.js +5 -5
- package/dist/{timeline-Bq658xsi.d.ts → timeline-CrO48Qa6.d.ts} +5 -5
- package/dist/{topic-BVq5RdsI.d.ts → topic-x-mrN_Ff.d.ts} +5 -5
- package/dist/{types-C8UyJOPJ.d.ts → types-6PMaLIyw.d.ts} +3 -3
- package/dist/{types-Dh2OGEW5.d.ts → types-BdhE7I8Z.d.ts} +5 -5
- package/dist/{types-BkYEUWdz.d.ts → types-BzIYSSWK.d.ts} +16 -1
- package/dist/{types-DCoqai8o.d.ts → types-C7K8mu9B.d.ts} +45 -15
- package/dist/{types-d0JBRTAg.d.ts → types-C9XfFGmA.d.ts} +128 -13
- package/dist/{types-hTj5OuFo.d.ts → types-CJqNGQKb.d.ts} +2 -2
- package/dist/{types-TH3zlMiM.d.ts → types-D5uf0l4_.d.ts} +1 -1
- package/dist/{types-BBqP9H6w.d.ts → types-auvHrNWC.d.ts} +4 -4
- package/dist/{undo-22ofP6Zp.d.ts → undo-CdKp5_2X.d.ts} +2 -2
- package/dist/{usage-CNCT6_3D.d.ts → usage-DZ8j5Tm_.d.ts} +4 -4
- package/dist/{vault-yGQD5Rdl.d.ts → vault-DjbG4XQS.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-DY_j4GPZ.js → verify-96j8d5ps.js} +1 -1
- package/dist/{verify-BQu3eBNW.d.ts → verify-HOiu3lRR.d.ts} +2 -2
- package/dist/{view-BfEqjZJ_.js → view-Ch0Qtr36.js} +1 -1
- package/dist/{view-Cy2XxYp1.d.ts → view-DdDY88SC.d.ts} +1 -1
- package/dist/vue/index.d.ts +10 -10
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-BOclyLFd.d.ts → watch-topic-D6bcqOrJ.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +29 -5
- package/dist/workflow-sdk/builder/index.js +39 -12
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +2 -2
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-BL3wzkdp.js → workflow-sdk-CBS8L2Ku.js} +5 -0
- package/dist/{workflow-sdk-yIkECybp.d.ts → workflow-sdk-D3H10W5h.d.ts} +3 -3
- package/dist/{workflows-BljkWRxE.d.ts → workflows-BI4yKqFh.d.ts} +3 -3
- package/dist/yjs/index.d.ts +2 -2
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +126 -0
- package/schemas/doctor-report-v1.json +4 -0
- package/skills/better-supabase-auth/SKILL.md +45 -11
- package/dist/cli/add-BaB3y1lv.js +0 -1
- package/dist/cli/env-UN6PJFX6.js +0 -1
- package/dist/cli/powersync-J2Kms2NT.js +0 -1
- package/dist/cli/seed-ByLneY1H.js +0 -1
- package/dist/errors-D3-4c-XF.js +0 -102
- package/dist/http-BDC1IvBX.js +0 -27
- package/dist/jwks-cache-IZaiICAV.js +0 -48
- package/dist/options-Itq7QYoW.js +0 -20
- package/dist/refresh-BtbC2rZe.d.ts +0 -52
- package/dist/snapshot-BGsJw9xn.d.ts +0 -83
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as subjectAttribute, t as WORKFLOW_ATTRIBUTES } from "../../attributes-BZNkR2z2.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as validateGraph, g as topologicalOrder, l as durationMs, m as isGraphRecord, p as isBuiltinNodeKind, r as startNodeOf, s as branchesOn, t as executeGraph } from "../../executor-RYiR4z47.js";
|
|
3
3
|
import { o as runForKey, r as contextAttributes } from "../../workflow-sdk-q2jnEaAJ.js";
|
|
4
4
|
import { start } from "workflow/api";
|
|
5
5
|
import { getStepMetadata, getWorkflowMetadata } from "workflow";
|
|
@@ -58,9 +58,17 @@ const RUNTIME = ` const results = {};
|
|
|
58
58
|
return source in ran && (branch === null || String(ran[source]) === branch);
|
|
59
59
|
}
|
|
60
60
|
`;
|
|
61
|
+
function customNodeBody(node, alias, branches) {
|
|
62
|
+
const id = literal(node.id);
|
|
63
|
+
return `const output = testing ? stub(${id}, { stubbed: true }) : await steps.${alias ?? ""}({ node: ${id}, kind: ${literal(node.kind)}, config: ${literal(node.config ?? {})}, input, results: Object.assign({}, results), runKey, version: versionId, tenant, subject });
|
|
64
|
+
results[${id}] = output === undefined ? null : output;
|
|
65
|
+
ran[${id}] = ${branches ? "Boolean(output)" : "true"};`;
|
|
66
|
+
}
|
|
61
67
|
function nodeBody(node, alias) {
|
|
62
68
|
const id = literal(node.id);
|
|
63
|
-
|
|
69
|
+
const kind = node.kind;
|
|
70
|
+
if (!isBuiltinNodeKind(kind)) throw new TypeError(`workflow-editor: unknown node kind ${kind}`);
|
|
71
|
+
switch (kind) {
|
|
64
72
|
case "trigger": return `results[${id}] = input;\n ran[${id}] = true;`;
|
|
65
73
|
case "step": return `const output = testing ? stub(${id}, { stubbed: true }) : await steps.${alias ?? ""}({ node: ${id}, step: ${literal(node.step)}, config: ${literal(node.config ?? {})}, input, results: Object.assign({}, results), runKey, version: versionId, tenant, subject });
|
|
66
74
|
results[${id}] = output === undefined ? null : output;
|
|
@@ -76,10 +84,7 @@ function nodeBody(node, alias) {
|
|
|
76
84
|
case "condition": return `const outcome = test(${literal(node.config ?? {})});
|
|
77
85
|
results[${id}] = outcome;
|
|
78
86
|
ran[${id}] = outcome;`;
|
|
79
|
-
default: {
|
|
80
|
-
const unknown = node.kind;
|
|
81
|
-
throw new TypeError(`workflow-editor: unknown node kind ${String(unknown)}`);
|
|
82
|
-
}
|
|
87
|
+
default: throw new TypeError(`workflow-editor: unknown node kind ${String(kind)}`);
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
const guard = (edges) => edges.map((edge) => `took(${literal(edge.source)}, ${edge.branch === void 0 ? "null" : literal(edge.branch)})`).join(" || ");
|
|
@@ -92,21 +97,27 @@ const guard = (edges) => edges.map((edge) => `took(${literal(edge.source)}, ${ed
|
|
|
92
97
|
* `executeGraph` does. Throws when the graph is invalid or the source is over
|
|
93
98
|
* 128 KiB. Pass it as `compile` to `createWorkflowEditor`.
|
|
94
99
|
*/
|
|
95
|
-
function compileGraph(graph) {
|
|
96
|
-
const errors = validateGraph(graph);
|
|
100
|
+
function compileGraph(graph, options = {}) {
|
|
101
|
+
const errors = validateGraph(graph, { nodes: options.nodes ?? [] });
|
|
97
102
|
if (errors.length > 0) throw new TypeError(`workflow-editor: ${errors.join("; ")}`);
|
|
98
103
|
const order = topologicalOrder(graph) ?? [];
|
|
99
104
|
const incoming = /* @__PURE__ */ new Map();
|
|
100
105
|
for (const edge of graph.edges) incoming.set(edge.target, [...incoming.get(edge.target) ?? [], edge]);
|
|
101
106
|
const triggers = graph.nodes.filter((node) => node.kind === "trigger");
|
|
102
107
|
const aliases = {};
|
|
108
|
+
const nodeAliases = {};
|
|
109
|
+
const kinds = new Map((options.nodes ?? []).map((info) => [info.kind, info]));
|
|
103
110
|
const blocks = order.map((node, index) => {
|
|
104
111
|
let alias;
|
|
112
|
+
const custom = !isBuiltinNodeKind(node.kind);
|
|
105
113
|
if (node.kind === "step") {
|
|
106
114
|
alias = aliasOf(node, index);
|
|
107
115
|
aliases[alias] = node.step ?? "";
|
|
116
|
+
} else if (custom) {
|
|
117
|
+
alias = aliasOf(node, index);
|
|
118
|
+
nodeAliases[alias] = node.kind;
|
|
108
119
|
}
|
|
109
|
-
const body = nodeBody(node, alias);
|
|
120
|
+
const body = custom ? customNodeBody(node, alias, branchesOn(node.kind, kinds)) : nodeBody(node, alias);
|
|
110
121
|
const comment = ` // ${node.kind} node ${String(index)}`;
|
|
111
122
|
if (node.kind === "trigger") return `${comment}\n if (${triggers.length === 1 ? `start === null || start === ${literal(node.id)}` : `start === ${literal(node.id)}`}) {\n ${body}\n }`;
|
|
112
123
|
return `${comment}\n if (${guard(incoming.get(node.id) ?? [])}) {\n ${body}\n }`;
|
|
@@ -126,7 +137,8 @@ ${blocks.join("\n")}
|
|
|
126
137
|
format: 1,
|
|
127
138
|
exportName: EXPORT_NAME,
|
|
128
139
|
source,
|
|
129
|
-
aliases
|
|
140
|
+
aliases,
|
|
141
|
+
...Object.keys(nodeAliases).length > 0 ? { nodeAliases } : {}
|
|
130
142
|
};
|
|
131
143
|
}
|
|
132
144
|
/** `value` as a compiled graph, or `undefined` when it isn't one. */
|
|
@@ -137,12 +149,22 @@ function compiledGraphOf(value) {
|
|
|
137
149
|
if (typeof step !== "string") return;
|
|
138
150
|
aliases[alias] = step;
|
|
139
151
|
}
|
|
152
|
+
const nodeAliases = {};
|
|
153
|
+
const storedNodes = value["nodeAliases"];
|
|
154
|
+
if (storedNodes !== void 0) {
|
|
155
|
+
if (!isGraphRecord(storedNodes)) return;
|
|
156
|
+
for (const [alias, kind] of Object.entries(storedNodes)) {
|
|
157
|
+
if (typeof kind !== "string") return;
|
|
158
|
+
nodeAliases[alias] = kind;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
140
161
|
return {
|
|
141
162
|
engine: "workflow-sdk",
|
|
142
163
|
format: 1,
|
|
143
164
|
exportName: value["exportName"],
|
|
144
165
|
source: value["source"],
|
|
145
|
-
aliases
|
|
166
|
+
aliases,
|
|
167
|
+
...storedNodes === void 0 ? {} : { nodeAliases }
|
|
146
168
|
};
|
|
147
169
|
}
|
|
148
170
|
const dynamicEnabled = () => {
|
|
@@ -225,13 +247,18 @@ function graphStarter(options) {
|
|
|
225
247
|
};
|
|
226
248
|
if (options.dynamic ?? dynamicEnabled()) {
|
|
227
249
|
if (!testing && options.approval === void 0 && graph.nodes.some((node) => node.kind === "approval")) throw new Error("better-supabase: the graph has an approval node; pass approval to graphStarter to file its request");
|
|
228
|
-
const compiled = compileGraph(graph);
|
|
250
|
+
const compiled = compileGraph(graph, { nodes: options.nodeKinds ?? [] });
|
|
229
251
|
const steps = {};
|
|
230
252
|
for (const [alias, name] of Object.entries(compiled.aliases)) {
|
|
231
253
|
const step = options.steps[name];
|
|
232
254
|
if (step === void 0) throw new Error(`better-supabase: the graph uses step "${name}", which was not passed to graphStarter`);
|
|
233
255
|
steps[alias] = step;
|
|
234
256
|
}
|
|
257
|
+
for (const [alias, kind] of Object.entries(compiled.nodeAliases ?? {})) {
|
|
258
|
+
const step = options.nodes?.[kind];
|
|
259
|
+
if (step === void 0) throw new Error(`better-supabase: the graph has a node of kind "${kind}", whose step was not passed to graphStarter's nodes`);
|
|
260
|
+
steps[alias] = step;
|
|
261
|
+
}
|
|
235
262
|
if (options.approval !== void 0) steps[APPROVAL_ALIAS] = options.approval;
|
|
236
263
|
return (await start(compiled.source, [call.input, meta], {
|
|
237
264
|
...startOptions,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { n as VerifyOptions, r as WebhookInput } from "../signatures-jPr9JXyw.js";
|
|
3
|
-
import { _ as startOnEvent, a as StartOnEventOptions, b as workflowStarter, c as WorkflowFn, d as WorkflowStarterOptions, f as authorizeHook, g as startFor, h as protectWebHandler, i as StartForOptions, l as WorkflowRunAs, m as hookMetadata, n as HookForbiddenError, o as StartOnceOptions, p as contextAttributes, r as ProtectWebHandlerOptions, s as WorkflowContextOptions, t as AuthorizeHookOptions, u as WorkflowRunAsFor, v as startOnce, y as workflowContext } from "../workflow-sdk-
|
|
3
|
+
import { _ as startOnEvent, a as StartOnEventOptions, b as workflowStarter, c as WorkflowFn, d as WorkflowStarterOptions, f as authorizeHook, g as startFor, h as protectWebHandler, i as StartForOptions, l as WorkflowRunAs, m as hookMetadata, n as HookForbiddenError, o as StartOnceOptions, p as contextAttributes, r as ProtectWebHandlerOptions, s as WorkflowContextOptions, t as AuthorizeHookOptions, u as WorkflowRunAsFor, v as startOnce, y as workflowContext } from "../workflow-sdk-D3H10W5h.js";
|
|
4
4
|
import { a as WorkflowMaintenance, i as RunKeyClaim, n as OpenWorkflowHook, o as WorkflowRunKeys, r as PurgeRunsOptions, s as WorkflowTerminalStatus, t as OpenHooksOptions } from "../run-keys-BnzqxtYc.js";
|
|
5
5
|
import { Run } from "workflow/api";
|
|
6
6
|
/** How `approvalWaiter.wait` ended. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dbError } from "../errors-B7tCfCvX.js";
|
|
2
2
|
import { o as problemResponse } from "../problem-C0SVHhd3.js";
|
|
3
|
-
import { s as verifyWebhook } from "../signatures-
|
|
4
|
-
import { s as verifyStripeWebhook } from "../verify-
|
|
3
|
+
import { s as verifyWebhook } from "../signatures-DK01D2S7.js";
|
|
4
|
+
import { s as verifyStripeWebhook } from "../verify-96j8d5ps.js";
|
|
5
5
|
import { t as WORKFLOW_ATTRIBUTES } from "../attributes-BZNkR2z2.js";
|
|
6
6
|
import { a as protectWebHandler, c as startOnEvent, d as workflowStarter, i as hookMetadata, l as startOnce, n as authorizeHook, r as contextAttributes, s as startFor, t as HookForbiddenError, u as workflowContext } from "../workflow-sdk-q2jnEaAJ.js";
|
|
7
7
|
import { getRun, resumeHook } from "workflow/api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as EventHub } from "../../events-
|
|
1
|
+
import { o as EventHub } from "../../events-DCw3c6pj.js";
|
|
2
2
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
3
3
|
import { a as WorkflowMaintenance } from "../../run-keys-BnzqxtYc.js";
|
|
4
4
|
import { Pool } from "pg";
|
|
@@ -2,7 +2,7 @@ import { n as dbError } from "../../errors-B7tCfCvX.js";
|
|
|
2
2
|
import { c as optionalTemporal, t as TEMPORAL_MISSING } from "../../temporal-DKTdGK9i.js";
|
|
3
3
|
import { o as problemResponse } from "../../problem-C0SVHhd3.js";
|
|
4
4
|
import { i as sqlIdent } from "../../template-CNq9xcfx.js";
|
|
5
|
-
import { i as WORLD_POSTGRES_VERSION, r as WORKFLOW_VAULT_SECRETS } from "../../workflow-sdk-
|
|
5
|
+
import { i as WORLD_POSTGRES_VERSION, r as WORKFLOW_VAULT_SECRETS } from "../../workflow-sdk-CBS8L2Ku.js";
|
|
6
6
|
import { n as memoized } from "../../optional-peer-5SOYr3lL.js";
|
|
7
7
|
import { n as hmacHex, r as timingSafeEqual } from "../../hmac-DNcfpmI9.js";
|
|
8
8
|
import { t as watchPoolErrors } from "../../pool-errors-JrZie6u3.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as WorkflowStarter, l as WorkflowStartCall, p as WorkflowSubject, t as WorkflowPrincipalKind } from "./workflows-
|
|
3
|
-
import { a as OutboxEvent, o as OutboxHandler } from "./outbox-
|
|
1
|
+
import { It as RequestContext } from "./types-BzIYSSWK.js";
|
|
2
|
+
import { f as WorkflowStarter, l as WorkflowStartCall, p as WorkflowSubject, t as WorkflowPrincipalKind } from "./workflows-BI4yKqFh.js";
|
|
3
|
+
import { a as OutboxEvent, o as OutboxHandler } from "./outbox-BFZS6Kvz.js";
|
|
4
4
|
import { Hook, Run } from "workflow/api";
|
|
5
5
|
import { World } from "@workflow/world";
|
|
6
6
|
/** A workflow function (a `"use workflow"` export), typed structurally. */
|
|
@@ -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 { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-
|
|
5
|
-
import { t as BlockTransport } from "./block-transport-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-BNtM1tqy.js";
|
|
5
|
+
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-CtMsgLQr.js";
|
|
7
7
|
import { r as RunState } from "./run-state-D0Tbl-nM.js";
|
|
8
8
|
/** A workflow run's state, in the words ai-chat and ai-schedules runs share. */
|
|
9
9
|
type WorkflowRunStatus = Exclude<RunState, "cancel_requested">;
|
package/dist/yjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { c as RealtimeClient, r as PresenceMember } from "../topic-
|
|
3
|
-
import { a as DocumentSuggestion, d as OpenedDocument, l as Documents, r as DocumentRef, t as DecidedSuggestion } from "../documents-
|
|
2
|
+
import { c as RealtimeClient, r as PresenceMember } from "../topic-x-mrN_Ff.js";
|
|
3
|
+
import { a as DocumentSuggestion, d as OpenedDocument, l as Documents, r as DocumentRef, t as DecidedSuggestion } from "../documents-Btk0MhC0.js";
|
|
4
4
|
type PresenceState = Readonly<Record<string, unknown>>;
|
|
5
5
|
/** The part of a `Y.Doc` the provider uses. */
|
|
6
6
|
interface YDocLike {
|
package/dist/yjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../guards-CsRa6v57.js";
|
|
2
2
|
import { a as ok, r as err, t as AsyncResult } from "../result-8xza7w5W.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as toBase64, i as fromBase64 } from "../base64-CEBz6-Jj.js";
|
|
4
4
|
import { t as importOptionalPeer } from "../optional-peer-5SOYr3lL.js";
|
|
5
5
|
import { t as defineTopic } from "../topic-k17VvXRj.js";
|
|
6
6
|
// src/yjs/yjs.ts
|
package/package.json
CHANGED
package/schemas/config-v1.json
CHANGED
|
@@ -3510,11 +3510,106 @@
|
|
|
3510
3510
|
"type": "string",
|
|
3511
3511
|
"default": "ai.output_tokens"
|
|
3512
3512
|
},
|
|
3513
|
+
"tenant": {
|
|
3514
|
+
"type": "boolean",
|
|
3515
|
+
"default": true
|
|
3516
|
+
},
|
|
3517
|
+
"messages": {},
|
|
3513
3518
|
"extraColumns": {
|
|
3514
3519
|
"type": "object",
|
|
3515
3520
|
"additionalProperties": {
|
|
3516
3521
|
"type": "string"
|
|
3517
3522
|
}
|
|
3523
|
+
},
|
|
3524
|
+
"projectExtraColumns": {
|
|
3525
|
+
"type": "object",
|
|
3526
|
+
"additionalProperties": {
|
|
3527
|
+
"type": "string"
|
|
3528
|
+
}
|
|
3529
|
+
},
|
|
3530
|
+
"participantExtraColumns": {
|
|
3531
|
+
"type": "object",
|
|
3532
|
+
"additionalProperties": {
|
|
3533
|
+
"type": "string"
|
|
3534
|
+
}
|
|
3535
|
+
},
|
|
3536
|
+
"messageExtraColumns": {
|
|
3537
|
+
"type": "object",
|
|
3538
|
+
"additionalProperties": {
|
|
3539
|
+
"type": "string"
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
"runExtraColumns": {
|
|
3543
|
+
"type": "object",
|
|
3544
|
+
"additionalProperties": {
|
|
3545
|
+
"type": "string"
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
"approvalExtraColumns": {
|
|
3549
|
+
"type": "object",
|
|
3550
|
+
"additionalProperties": {
|
|
3551
|
+
"type": "string"
|
|
3552
|
+
}
|
|
3553
|
+
},
|
|
3554
|
+
"policyExtraColumns": {
|
|
3555
|
+
"type": "object",
|
|
3556
|
+
"additionalProperties": {
|
|
3557
|
+
"type": "string"
|
|
3558
|
+
}
|
|
3559
|
+
},
|
|
3560
|
+
"inputExtraColumns": {
|
|
3561
|
+
"type": "object",
|
|
3562
|
+
"additionalProperties": {
|
|
3563
|
+
"type": "string"
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
"sourceExtraColumns": {
|
|
3567
|
+
"type": "object",
|
|
3568
|
+
"additionalProperties": {
|
|
3569
|
+
"type": "string"
|
|
3570
|
+
}
|
|
3571
|
+
},
|
|
3572
|
+
"feedbackExtraColumns": {
|
|
3573
|
+
"type": "object",
|
|
3574
|
+
"additionalProperties": {
|
|
3575
|
+
"type": "string"
|
|
3576
|
+
}
|
|
3577
|
+
},
|
|
3578
|
+
"shareExtraColumns": {
|
|
3579
|
+
"type": "object",
|
|
3580
|
+
"additionalProperties": {
|
|
3581
|
+
"type": "string"
|
|
3582
|
+
}
|
|
3583
|
+
},
|
|
3584
|
+
"modelExtraColumns": {
|
|
3585
|
+
"type": "object",
|
|
3586
|
+
"additionalProperties": {
|
|
3587
|
+
"type": "string"
|
|
3588
|
+
}
|
|
3589
|
+
},
|
|
3590
|
+
"moderationExtraColumns": {
|
|
3591
|
+
"type": "object",
|
|
3592
|
+
"additionalProperties": {
|
|
3593
|
+
"type": "string"
|
|
3594
|
+
}
|
|
3595
|
+
},
|
|
3596
|
+
"stepExtraColumns": {
|
|
3597
|
+
"type": "object",
|
|
3598
|
+
"additionalProperties": {
|
|
3599
|
+
"type": "string"
|
|
3600
|
+
}
|
|
3601
|
+
},
|
|
3602
|
+
"sandboxExtraColumns": {
|
|
3603
|
+
"type": "object",
|
|
3604
|
+
"additionalProperties": {
|
|
3605
|
+
"type": "string"
|
|
3606
|
+
}
|
|
3607
|
+
},
|
|
3608
|
+
"harnessExtraColumns": {
|
|
3609
|
+
"type": "object",
|
|
3610
|
+
"additionalProperties": {
|
|
3611
|
+
"type": "string"
|
|
3612
|
+
}
|
|
3518
3613
|
}
|
|
3519
3614
|
}
|
|
3520
3615
|
}
|
|
@@ -3670,6 +3765,10 @@
|
|
|
3670
3765
|
"additionalProperties": false,
|
|
3671
3766
|
"properties": {
|
|
3672
3767
|
"policies": {},
|
|
3768
|
+
"tenantPolicies": {
|
|
3769
|
+
"type": "boolean",
|
|
3770
|
+
"default": false
|
|
3771
|
+
},
|
|
3673
3772
|
"extraColumns": {
|
|
3674
3773
|
"type": "object",
|
|
3675
3774
|
"additionalProperties": {
|
|
@@ -4053,6 +4152,9 @@
|
|
|
4053
4152
|
"rankType": {
|
|
4054
4153
|
"type": "string",
|
|
4055
4154
|
"default": "text"
|
|
4155
|
+
},
|
|
4156
|
+
"variantInUse": {
|
|
4157
|
+
"type": "string"
|
|
4056
4158
|
}
|
|
4057
4159
|
}
|
|
4058
4160
|
}
|
|
@@ -4672,6 +4774,14 @@
|
|
|
4672
4774
|
"approvals": {
|
|
4673
4775
|
"type": "boolean",
|
|
4674
4776
|
"default": true
|
|
4777
|
+
},
|
|
4778
|
+
"owner": {
|
|
4779
|
+
"type": "string",
|
|
4780
|
+
"default": "user"
|
|
4781
|
+
},
|
|
4782
|
+
"companyExpenses": {
|
|
4783
|
+
"type": "boolean",
|
|
4784
|
+
"default": false
|
|
4675
4785
|
}
|
|
4676
4786
|
}
|
|
4677
4787
|
}
|
|
@@ -5061,6 +5171,13 @@
|
|
|
5061
5171
|
"totals": {
|
|
5062
5172
|
"type": "string",
|
|
5063
5173
|
"default": "block"
|
|
5174
|
+
},
|
|
5175
|
+
"providerPaymentMethods": {
|
|
5176
|
+
"type": "array",
|
|
5177
|
+
"items": {
|
|
5178
|
+
"type": "string"
|
|
5179
|
+
},
|
|
5180
|
+
"default": ["stripe", "order"]
|
|
5064
5181
|
}
|
|
5065
5182
|
}
|
|
5066
5183
|
}
|
|
@@ -5181,6 +5298,10 @@
|
|
|
5181
5298
|
"approvals": {
|
|
5182
5299
|
"type": "boolean",
|
|
5183
5300
|
"default": true
|
|
5301
|
+
},
|
|
5302
|
+
"owner": {
|
|
5303
|
+
"type": "string",
|
|
5304
|
+
"default": "user"
|
|
5184
5305
|
}
|
|
5185
5306
|
}
|
|
5186
5307
|
}
|
|
@@ -6164,6 +6285,11 @@
|
|
|
6164
6285
|
"type": "object",
|
|
6165
6286
|
"additionalProperties": false,
|
|
6166
6287
|
"properties": {
|
|
6288
|
+
"authzVersions": {
|
|
6289
|
+
"type": "boolean",
|
|
6290
|
+
"default": false
|
|
6291
|
+
},
|
|
6292
|
+
"bootstrap": {},
|
|
6167
6293
|
"exclude": {
|
|
6168
6294
|
"type": "array",
|
|
6169
6295
|
"items": {
|
|
@@ -117,14 +117,16 @@ document loads (and on `paths`), clears the cookies and redirects with
|
|
|
117
117
|
A proxy or middleware with its own Supabase client calls
|
|
118
118
|
`sessionStatus(request, { url, publishableKey })` from `better-supabase/ssr`
|
|
119
119
|
(`"ended"` on a 401 or 403 from Auth; treat `"unknown"` as active) and
|
|
120
|
-
`clearSessionCookies(request, response, { url })` before redirecting.
|
|
120
|
+
`await clearSessionCookies(request, response, { url })` before redirecting.
|
|
121
121
|
An app with httpOnly session cookies and no browser Supabase client watches
|
|
122
122
|
an open page with `export const GET = sessionStatusRoute(bsb)` (from
|
|
123
123
|
`better-supabase/server`) and `useSessionWatch({ redirect: "/login" })` (from
|
|
124
124
|
`better-supabase/next/client`): it checks on focus, visibility and an
|
|
125
125
|
interval, reloads on `ended`, `banned` or `signed_out`, refreshes the router
|
|
126
126
|
on `claims_changed` (the claims fingerprint, support target included, moved)
|
|
127
|
-
and tells the other tabs over a `BroadcastChannel`.
|
|
127
|
+
and tells the other tabs over a `BroadcastChannel`. The route reads the
|
|
128
|
+
verified claims only; pass `sessionStatusRoute(bsb, { verifySession: true })`
|
|
129
|
+
so it asks Auth and can report `ended` or `banned`.
|
|
128
130
|
|
|
129
131
|
Done when the irreversible action returns `SESSION_REVOKED` for a signed-out
|
|
130
132
|
session in a test.
|
|
@@ -156,14 +158,41 @@ membership lasts until the next refresh. When that window matters:
|
|
|
156
158
|
`useSessionChange`'s `refreshToken`, below).
|
|
157
159
|
- In Next.js, drop the user's cached views with
|
|
158
160
|
`bsb.evictSession(userId, { tags })`.
|
|
161
|
+
- To show the change on pages that are already open, turn on
|
|
162
|
+
`blocks.sessions.options.authzVersions` and render `<SessionProvider>` with
|
|
163
|
+
`client` (a browser Supabase client). A bump of the user's version
|
|
164
|
+
broadcasts on the private `authz:<uid>` topic; the visible tab refreshes the
|
|
165
|
+
token and calls `onAuthzChange`. There, call your `"use server"` re-export
|
|
166
|
+
of `bsb.refreshSessionCache()` and `router.refresh()`. Servers that keep a
|
|
167
|
+
version cache subscribe with `subscribeAuthzVersions`, which defaults to
|
|
168
|
+
what `authzVersions` sends.
|
|
159
169
|
|
|
160
170
|
## Next.js caching
|
|
161
171
|
|
|
162
172
|
- Per-user data goes through `bsb.cached()` inside your own
|
|
163
173
|
`'use cache: private'` function. It tags the entry `bsb:session:<user id>`
|
|
164
|
-
and
|
|
165
|
-
|
|
166
|
-
|
|
174
|
+
and sets `stale` to 300 seconds, so the entry rides in the App Shell; the
|
|
175
|
+
proxy refreshes every request, so the token no longer caps it.
|
|
176
|
+
`life: { capToToken: true }` brings the cap back.
|
|
177
|
+
- `bsb.cached({ tags, life: { stale } })` adds tags and shortens the stale
|
|
178
|
+
time, for example for a permission snapshot. Don't call `cacheLife` with a
|
|
179
|
+
session-derived stale time; `sessionStale` is gone.
|
|
180
|
+
- For a page whose islands all need the session and some data, read them in
|
|
181
|
+
one query: name an app function in `blocks.sessions.options.bootstrap` and
|
|
182
|
+
call `bsb.bootstrap({ rpc, tenant, redirect })` in each island. It checks
|
|
183
|
+
`session_active()`, returns the token's authorization version, the tenant
|
|
184
|
+
and the data, and runs once per request for the same arguments. With it,
|
|
185
|
+
`bsb.proxy(request, { verifySession: "bootstrap" })` skips the proxy's
|
|
186
|
+
Auth call.
|
|
187
|
+
- `bsb.getAccess(boot)` gives `context`, `session`, `tenant`,
|
|
188
|
+
`authzVersion` and `can(permission)` from a bootstrap result or a
|
|
189
|
+
`SessionSnapshot` without verifying the token again.
|
|
190
|
+
- Data that is fine to share across devices or instances goes through
|
|
191
|
+
`bsb.remote(fn)` and `"use cache: remote"`, with `bsb.cached({ scope:
|
|
192
|
+
"remote", key })` or `bsb.bootstrap({ scope: "remote", key })` inside.
|
|
193
|
+
The key holds the user, Auth session, tenant and authorization version,
|
|
194
|
+
never the token. Outside Vercel, set `cacheHandlers.remote` (doctor
|
|
195
|
+
BS608).
|
|
167
196
|
- `bsb.cached({ tables: ["customers"] })` tags the entry by table, so an
|
|
168
197
|
action that writes the table drops it without a hand-written tag.
|
|
169
198
|
- `bsb.evictSession(userId)` reaches the server caches and the caller's
|
|
@@ -185,12 +214,12 @@ membership lasts until the next refresh. When that window matters:
|
|
|
185
214
|
- For a tenant from the route params, call `bsb.cached({ tenant })` and take
|
|
186
215
|
the tenant as an argument of the `'use cache: private'` function, so it is
|
|
187
216
|
part of the cache key. Outside a cache, use `bsb.context({ tenant })`.
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
redirect to sign-in.
|
|
217
|
+
- The proxy refreshes every request it matches, prefetches included, and
|
|
218
|
+
parallel requests share one refresh, so `protect` doesn't need a special
|
|
219
|
+
case for `{ kind: "none", reason: "expired" }`.
|
|
192
220
|
- Keep layouts synchronous: pass the `bsb.claims()` promise to
|
|
193
|
-
`<SessionProvider>` and read it with `useSession()`.
|
|
221
|
+
`<SessionProvider session={...}>` and read it with `useSession()`. The
|
|
222
|
+
provider holds the session in a store; `sessionPromise` is the 0.34 name.
|
|
194
223
|
|
|
195
224
|
## Authorization providers
|
|
196
225
|
|
|
@@ -204,6 +233,9 @@ before touching the hook, claims, tenant or entitlements.
|
|
|
204
233
|
|
|
205
234
|
- Don't refresh sessions outside the proxy, and don't verify tokens by
|
|
206
235
|
calling the Auth server.
|
|
236
|
+
- Don't write session cookies yourself: `@supabase/ssr` writes them in the
|
|
237
|
+
proxy, and `writeSession` and `refreshSession` are gone. Await
|
|
238
|
+
`clearSessionCookies`.
|
|
207
239
|
- Don't use `bsb.admin()` or the service role for a user's request.
|
|
208
240
|
- Don't downgrade an `invalid` caller to `anon`.
|
|
209
241
|
- Don't build 401 or 403 JSON by hand; return the `DbError` or use `allow`
|
|
@@ -217,5 +249,7 @@ https://bettersupabase.com/docs/auth.md,
|
|
|
217
249
|
https://bettersupabase.com/docs/frameworks/next.md (bearer callers),
|
|
218
250
|
https://bettersupabase.com/docs/frameworks/next-auth.md (sign-in and sign-out),
|
|
219
251
|
https://bettersupabase.com/docs/auth/account-deletion.md,
|
|
220
|
-
https://bettersupabase.com/docs/frameworks/next-cache-components.md
|
|
252
|
+
https://bettersupabase.com/docs/frameworks/next-cache-components.md,
|
|
253
|
+
https://bettersupabase.com/docs/frameworks/next-islands.md,
|
|
254
|
+
https://bettersupabase.com/docs/migration/0.34-to-0.35.md and
|
|
221
255
|
https://bettersupabase.com/docs/extending/authorization-providers.md.
|
package/dist/cli/add-BaB3y1lv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as addCommand } from "./add-CYreXA68.js";
|
package/dist/cli/env-UN6PJFX6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as envCommand } from "./env-BAJn6wCA.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as powersyncStreamsCommand } from "./powersync-oFiwgsBi.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as seedCommand } from "./seed-BpaqqyO8.js";
|
package/dist/errors-D3-4c-XF.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { n as dbError, r as dbErrorOf } from "./errors-B7tCfCvX.js";
|
|
2
|
-
import { n as isRecord } from "./guards-CsRa6v57.js";
|
|
3
|
-
// src/ai-sdk/errors.ts
|
|
4
|
-
const INVALID_INPUT = /* @__PURE__ */ new Set([
|
|
5
|
-
"AI_InvalidArgumentError",
|
|
6
|
-
"AI_InvalidPromptError",
|
|
7
|
-
"AI_InvalidDataContentError",
|
|
8
|
-
"AI_MessageConversionError",
|
|
9
|
-
"AI_TooManyEmbeddingValuesForCallError"
|
|
10
|
-
]);
|
|
11
|
-
const PROVIDER_CONFIG = /* @__PURE__ */ new Set(["AI_LoadAPIKeyError", "AI_LoadSettingError"]);
|
|
12
|
-
const GENERATION_FAILED = /* @__PURE__ */ new Set([
|
|
13
|
-
"AI_NoObjectGeneratedError",
|
|
14
|
-
"AI_NoContentGeneratedError",
|
|
15
|
-
"AI_NoOutputGeneratedError",
|
|
16
|
-
"AI_NoImageGeneratedError",
|
|
17
|
-
"AI_NoSpeechGeneratedError",
|
|
18
|
-
"AI_NoTranscriptGeneratedError",
|
|
19
|
-
"AI_NoVideoGeneratedError",
|
|
20
|
-
"AI_NoSuchToolError",
|
|
21
|
-
"AI_InvalidToolInputError",
|
|
22
|
-
"AI_ToolCallRepairError",
|
|
23
|
-
"AI_JSONParseError",
|
|
24
|
-
"AI_InvalidResponseDataError",
|
|
25
|
-
"AI_EmptyResponseBodyError",
|
|
26
|
-
"AI_UIMessageStreamError"
|
|
27
|
-
]);
|
|
28
|
-
const numberOf = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
29
|
-
function retryAfterOf(error) {
|
|
30
|
-
const headers = error["responseHeaders"];
|
|
31
|
-
if (!isRecord(headers)) return;
|
|
32
|
-
const value = headers["retry-after"] ?? headers["Retry-After"];
|
|
33
|
-
const seconds = typeof value === "string" ? Number(value) : NaN;
|
|
34
|
-
return Number.isFinite(seconds) && seconds >= 0 ? Math.ceil(seconds) : void 0;
|
|
35
|
-
}
|
|
36
|
-
function ofStatus(status, error) {
|
|
37
|
-
if (status === 429) {
|
|
38
|
-
const retryAfter = retryAfterOf(error);
|
|
39
|
-
return dbError("rate_limited", "The model provider is rate limiting.", {
|
|
40
|
-
code: "AI_PROVIDER_RATE_LIMITED",
|
|
41
|
-
...retryAfter === void 0 ? {} : { retryAfter }
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
if (status === 408 || status === 504) return dbError("timeout", "The model provider timed out.", { code: "AI_PROVIDER_TIMEOUT" });
|
|
45
|
-
if (status === 400 || status === 413 || status === 422) return dbError("invalid_request", "The model provider refused the request.", { code: "AI_PROVIDER_BAD_REQUEST" });
|
|
46
|
-
if (status === 404) return dbError("not_found", "The model provider has no such resource.", { code: "AI_PROVIDER_NOT_FOUND" });
|
|
47
|
-
if (status === 401 || status === 403) return dbError("unexpected", "The model provider refused the credentials.", { code: "AI_PROVIDER_AUTH" });
|
|
48
|
-
if (status !== void 0 && status >= 500) return dbError("network", "The model provider is unavailable.", { code: "AI_PROVIDER_UNAVAILABLE" });
|
|
49
|
-
return dbError("unexpected", "The model provider call failed.", { code: "AI_PROVIDER_FAILED" });
|
|
50
|
-
}
|
|
51
|
-
function ofGateway(type, error) {
|
|
52
|
-
switch (type) {
|
|
53
|
-
case "rate_limit_exceeded": return ofStatus(429, error);
|
|
54
|
-
case "timeout": return ofStatus(504, error);
|
|
55
|
-
case "invalid_request_error": return ofStatus(400, error);
|
|
56
|
-
case "model_not_found": return dbError("not_found", "The AI Gateway has no such model.", { code: "AI_MODEL_NOT_FOUND" });
|
|
57
|
-
case "not_found": return ofStatus(404, error);
|
|
58
|
-
case "forbidden": return dbError("forbidden", "The AI Gateway refused the request.", { code: "AI_GATEWAY_FORBIDDEN" });
|
|
59
|
-
case "authentication_error": return dbError("unexpected", "The AI Gateway refused the credentials.", { code: "AI_GATEWAY_AUTH" });
|
|
60
|
-
case "failed_dependency":
|
|
61
|
-
case "internal_server_error": return ofStatus(503, error);
|
|
62
|
-
default: return ofStatus(numberOf(error["statusCode"]), error);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* An AI SDK or AI Gateway error as a `DbError`, so a route answers with the
|
|
67
|
-
* same Problem Details as the rest of the app. Errors are matched by `name`
|
|
68
|
-
* (and `type` for the gateway), so a second copy of `ai` still matches. The
|
|
69
|
-
* message is fixed per kind; the provider's own message never reaches it, since
|
|
70
|
-
* it can quote the prompt or a key.
|
|
71
|
-
*/
|
|
72
|
-
function aiErrorToDbError(error) {
|
|
73
|
-
const known = dbErrorOf(error);
|
|
74
|
-
if (known !== void 0) return known;
|
|
75
|
-
if (!isRecord(error)) return dbError("unexpected", "The generation failed.", { code: "AI_GENERATION_FAILED" });
|
|
76
|
-
const name = typeof error["name"] === "string" ? error["name"] : "";
|
|
77
|
-
if (name === "AbortError" || name === "TimeoutError") return name === "AbortError" ? dbError("aborted", "The generation was stopped.", { code: "AI_ABORTED" }) : ofStatus(504, error);
|
|
78
|
-
if (name === "AI_RetryError") {
|
|
79
|
-
const last = error["lastError"];
|
|
80
|
-
return last === void 0 || last === error ? ofStatus(void 0, error) : aiErrorToDbError(last);
|
|
81
|
-
}
|
|
82
|
-
if (name === "AI_APICallError") return ofStatus(numberOf(error["statusCode"]), error);
|
|
83
|
-
if (name.startsWith("Gateway") && typeof error["type"] === "string") return ofGateway(error["type"], error);
|
|
84
|
-
if (name === "AI_TypeValidationError") return dbError("validation", "The value did not match its schema.", {
|
|
85
|
-
code: "AI_TYPE_VALIDATION",
|
|
86
|
-
issues: [{ message: "The value did not match its schema." }]
|
|
87
|
-
});
|
|
88
|
-
if (name === "AI_NoSuchModelError" || name === "AI_NoSuchProviderError") return dbError("not_found", "The model is not available.", { code: "AI_MODEL_NOT_FOUND" });
|
|
89
|
-
if (name === "AI_UnsupportedFunctionalityError") return dbError("unsupported", "The model does not support this.", { code: "AI_UNSUPPORTED" });
|
|
90
|
-
if (name === "AI_DownloadError") return dbError("network", "A file could not be downloaded.", { code: "AI_DOWNLOAD_FAILED" });
|
|
91
|
-
if (INVALID_INPUT.has(name)) return dbError("invalid_request", "The request to the model is invalid.", { code: "AI_INVALID_REQUEST" });
|
|
92
|
-
if (PROVIDER_CONFIG.has(name)) return dbError("unexpected", "The model provider is not configured.", { code: "AI_PROVIDER_CONFIG" });
|
|
93
|
-
return dbError("unexpected", "The generation failed.", { code: GENERATION_FAILED.has(name) ? "AI_GENERATION_FAILED" : "AI_UNEXPECTED" });
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* The message a client sees for a stream error: the fixed message of
|
|
97
|
-
* `aiErrorToDbError`. The default `onError` of `createAssistant`.
|
|
98
|
-
*/
|
|
99
|
-
function aiErrorMessage(error) {
|
|
100
|
-
return aiErrorToDbError(error).message;
|
|
101
|
-
}
|
|
102
|
-
export { aiErrorToDbError as n, aiErrorMessage as t };
|