better-supabase 0.28.0 → 0.30.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.
Files changed (405) hide show
  1. package/dist/{agents-CMIB3802.d.ts → agents-CM_cCtcr.d.ts} +4 -4
  2. package/dist/{ai-cache-2LGgaT7F.d.ts → ai-cache-BTGqckta.d.ts} +4 -4
  3. package/dist/{ai-chat-BCaKsvLW.d.ts → ai-chat-B7_vQvxU.d.ts} +4 -4
  4. package/dist/{ai-schedules-yGZH-vQb.d.ts → ai-schedules-CZEfo-_M.d.ts} +5 -5
  5. package/dist/ai-sdk/agents/index.d.ts +6 -6
  6. package/dist/ai-sdk/batches/index.d.ts +3 -3
  7. package/dist/ai-sdk/cache/index.d.ts +1 -1
  8. package/dist/ai-sdk/chat/index.d.ts +1 -1
  9. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  10. package/dist/ai-sdk/files/index.d.ts +1 -1
  11. package/dist/ai-sdk/index.d.ts +5 -5
  12. package/dist/ai-sdk/mcp/index.d.ts +3 -3
  13. package/dist/ai-sdk/memory/index.d.ts +3 -3
  14. package/dist/ai-sdk/workflow/index.d.ts +3 -3
  15. package/dist/{api-B1OkIWdx.d.ts → api-59rv5hL6.d.ts} +5 -5
  16. package/dist/{api-keys-ClhKBDcc.d.ts → api-keys-JE-aykZE.d.ts} +4 -4
  17. package/dist/{app-tables-62GqZIhd.d.ts → app-tables-yyVncXEt.d.ts} +1 -1
  18. package/dist/{approvals-C5fmPLsH.d.ts → approvals-BfEafAzt.d.ts} +5 -5
  19. package/dist/{assistant-ndGdOBax.d.ts → assistant-B49qATbj.d.ts} +2 -2
  20. package/dist/astro/index.d.ts +7 -7
  21. package/dist/{authorization-BCG1v0iC.d.ts → authorization-CDU9tYA_.d.ts} +17 -3
  22. package/dist/{authorization-hooks-DtzreCAq.d.ts → authorization-hooks-BWhkMZfH.d.ts} +2 -2
  23. package/dist/better-result/index.d.ts +3 -3
  24. package/dist/{bind-C54jD0r3.d.ts → bind-p7asfI6H.d.ts} +7 -7
  25. package/dist/{block-env-CM-LFfj4.d.ts → block-env-B8wG3xeh.d.ts} +4 -4
  26. package/dist/{block-helpers-CRpAHrp_.d.ts → block-helpers-D5emQ2O6.d.ts} +1 -1
  27. package/dist/{block-hooks-DZN2w69m.d.ts → block-hooks-B8itxzEE.d.ts} +2 -2
  28. package/dist/{block-subjects-CphkQPxp.d.ts → block-subjects-C1_9DkSA.d.ts} +1 -1
  29. package/dist/{block-transport-DWZSJrwN.d.ts → block-transport-9EUA3q_I.d.ts} +2 -2
  30. package/dist/blocks/access-requests/index.d.ts +5 -5
  31. package/dist/blocks/activities/index.d.ts +10 -10
  32. package/dist/blocks/activities/index.js +1 -1
  33. package/dist/blocks/agents/index.d.ts +4 -4
  34. package/dist/blocks/ai-cache/index.d.ts +3 -3
  35. package/dist/blocks/ai-chat/index.d.ts +7 -7
  36. package/dist/blocks/ai-files/index.d.ts +3 -3
  37. package/dist/blocks/ai-keys/index.d.ts +4 -4
  38. package/dist/blocks/ai-schedules/index.d.ts +3 -3
  39. package/dist/blocks/announcements/index.d.ts +8 -8
  40. package/dist/blocks/api-keys/index.d.ts +6 -6
  41. package/dist/blocks/approvals/index.d.ts +4 -4
  42. package/dist/blocks/assets/index.d.ts +6 -6
  43. package/dist/blocks/assignment/index.d.ts +7 -7
  44. package/dist/blocks/attachments/index.d.ts +4 -4
  45. package/dist/blocks/audit/index.d.ts +13 -13
  46. package/dist/blocks/automations/index.d.ts +12 -12
  47. package/dist/blocks/billable-time/index.d.ts +6 -6
  48. package/dist/blocks/billing/index.d.ts +9 -9
  49. package/dist/blocks/bookings/index.d.ts +4 -4
  50. package/dist/blocks/bulk/index.d.ts +4 -4
  51. package/dist/blocks/calendar/index.d.ts +5 -5
  52. package/dist/blocks/calendar/index.js +1 -1
  53. package/dist/blocks/catalog/index.d.ts +6 -6
  54. package/dist/blocks/channels/index.d.ts +7 -7
  55. package/dist/blocks/collections/index.d.ts +12 -12
  56. package/dist/blocks/collections/index.js +1 -1
  57. package/dist/blocks/comments/index.d.ts +10 -10
  58. package/dist/blocks/compliance/index.d.ts +5 -5
  59. package/dist/blocks/connectors/index.d.ts +4 -4
  60. package/dist/blocks/contacts/index.d.ts +7 -7
  61. package/dist/blocks/contacts/index.js +1 -1
  62. package/dist/blocks/content/index.d.ts +5 -5
  63. package/dist/blocks/contracts/index.d.ts +6 -6
  64. package/dist/blocks/courses/index.d.ts +5 -5
  65. package/dist/blocks/created-by/index.d.ts +2 -2
  66. package/dist/blocks/custom-fields/index.d.ts +6 -6
  67. package/dist/blocks/data-lifecycle/index.d.ts +8 -8
  68. package/dist/blocks/deals/index.d.ts +6 -6
  69. package/dist/blocks/dispatch/index.d.ts +7 -7
  70. package/dist/blocks/documents/index.d.ts +4 -4
  71. package/dist/blocks/domains/index.d.ts +6 -6
  72. package/dist/blocks/donations/index.d.ts +6 -6
  73. package/dist/blocks/drive/index.d.ts +6 -6
  74. package/dist/blocks/employees/index.d.ts +8 -8
  75. package/dist/blocks/enrichment/index.d.ts +6 -6
  76. package/dist/blocks/enrollments/index.d.ts +6 -6
  77. package/dist/blocks/entitlements/index.d.ts +6 -6
  78. package/dist/blocks/expenses/index.d.ts +5 -5
  79. package/dist/blocks/field-history/index.d.ts +4 -4
  80. package/dist/blocks/flags/index.d.ts +5 -5
  81. package/dist/blocks/forecasts/index.d.ts +6 -6
  82. package/dist/blocks/forms/index.d.ts +6 -6
  83. package/dist/blocks/goals/index.d.ts +4 -4
  84. package/dist/blocks/guests/index.d.ts +6 -6
  85. package/dist/blocks/hiring/index.d.ts +7 -7
  86. package/dist/blocks/identities/index.d.ts +5 -5
  87. package/dist/blocks/imports/index.d.ts +5 -5
  88. package/dist/blocks/inbox/index.d.ts +10 -10
  89. package/dist/blocks/incidents/index.d.ts +5 -5
  90. package/dist/blocks/index.d.ts +9 -9
  91. package/dist/blocks/inventory/index.d.ts +7 -7
  92. package/dist/blocks/invoices/index.d.ts +8 -8
  93. package/dist/blocks/knowledge/index.d.ts +3 -3
  94. package/dist/blocks/lead-scoring/index.d.ts +7 -7
  95. package/dist/blocks/leases/index.d.ts +6 -6
  96. package/dist/blocks/leave/index.d.ts +5 -5
  97. package/dist/blocks/ledger/index.d.ts +6 -6
  98. package/dist/blocks/mail-sync/index.d.ts +5 -5
  99. package/dist/blocks/memberships/index.d.ts +2 -2
  100. package/dist/blocks/memory/index.d.ts +4 -4
  101. package/dist/blocks/messaging/index.d.ts +11 -11
  102. package/dist/blocks/metrics/index.d.ts +6 -6
  103. package/dist/blocks/mfa/index.d.ts +2 -2
  104. package/dist/blocks/moderation/index.d.ts +6 -6
  105. package/dist/blocks/notifications/index.d.ts +12 -12
  106. package/dist/blocks/notifications/index.js +1 -1
  107. package/dist/blocks/numbering/index.d.ts +4 -4
  108. package/dist/blocks/oauth-server/index.d.ts +5 -5
  109. package/dist/blocks/onboarding/index.d.ts +5 -5
  110. package/dist/blocks/orders/index.d.ts +7 -7
  111. package/dist/blocks/organizations/index.d.ts +8 -8
  112. package/dist/blocks/outbox/index.d.ts +4 -4
  113. package/dist/blocks/passes/index.d.ts +8 -8
  114. package/dist/blocks/permissions/index.d.ts +6 -6
  115. package/dist/blocks/pipelines/index.d.ts +6 -6
  116. package/dist/blocks/posts/index.d.ts +5 -5
  117. package/dist/blocks/profiles/index.d.ts +4 -4
  118. package/dist/blocks/promotions/index.d.ts +5 -5
  119. package/dist/blocks/push/index.d.ts +6 -6
  120. package/dist/blocks/queue/index.d.ts +6 -6
  121. package/dist/blocks/quotes/index.d.ts +8 -8
  122. package/dist/blocks/rank/index.d.ts +5 -5
  123. package/dist/blocks/reactions/index.d.ts +9 -9
  124. package/dist/blocks/relations/index.d.ts +7 -7
  125. package/dist/blocks/reminders/index.d.ts +8 -8
  126. package/dist/blocks/reminders/index.js +1 -1
  127. package/dist/blocks/reviews/index.d.ts +5 -5
  128. package/dist/blocks/saved-views/index.d.ts +6 -6
  129. package/dist/blocks/scores/index.d.ts +5 -5
  130. package/dist/blocks/search/index.d.ts +8 -8
  131. package/dist/blocks/security-events/index.d.ts +7 -7
  132. package/dist/blocks/segments/index.d.ts +8 -8
  133. package/dist/blocks/sequences/index.d.ts +6 -6
  134. package/dist/blocks/service-accounts/index.d.ts +5 -5
  135. package/dist/blocks/sessions/index.d.ts +2 -2
  136. package/dist/blocks/settings/index.d.ts +6 -6
  137. package/dist/blocks/share-links/index.d.ts +5 -5
  138. package/dist/blocks/shipments/index.d.ts +6 -6
  139. package/dist/blocks/signatures/index.d.ts +5 -5
  140. package/dist/blocks/signing-keys/index.d.ts +4 -4
  141. package/dist/blocks/sla/index.d.ts +7 -7
  142. package/dist/blocks/sso/index.d.ts +6 -6
  143. package/dist/blocks/state-machine/index.d.ts +5 -5
  144. package/dist/blocks/subjects/index.d.ts +6 -6
  145. package/dist/blocks/tags/index.d.ts +6 -6
  146. package/dist/blocks/tasks/index.d.ts +9 -9
  147. package/dist/blocks/teams/index.d.ts +4 -4
  148. package/dist/blocks/templates/index.d.ts +7 -7
  149. package/dist/blocks/time-tracking/index.d.ts +7 -7
  150. package/dist/blocks/timeline/index.d.ts +8 -8
  151. package/dist/blocks/trash/index.d.ts +6 -6
  152. package/dist/blocks/undo/index.d.ts +4 -4
  153. package/dist/blocks/updated-at/index.d.ts +2 -2
  154. package/dist/blocks/usage/index.d.ts +4 -4
  155. package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
  156. package/dist/blocks/versions/index.d.ts +6 -6
  157. package/dist/blocks/waitlist/index.d.ts +5 -5
  158. package/dist/blocks/webhooks/index.d.ts +14 -14
  159. package/dist/blocks/webhooks/index.js +1 -1
  160. package/dist/blocks/workflow-editor/index.d.ts +9 -9
  161. package/dist/blocks/workflows/index.d.ts +7 -7
  162. package/dist/{bookings-CVw5-Q0Z.d.ts → bookings-xsmM2TA_.d.ts} +3 -3
  163. package/dist/{bucket-vc-QRrva.d.ts → bucket-SvRQwYS4.d.ts} +1 -1
  164. package/dist/chat-sdk/index.d.ts +6 -6
  165. package/dist/cli/add-BdhGOwkB.js +1 -0
  166. package/dist/cli/{add-DUyg9qna.js → add-D4w-Axib.js} +27 -85
  167. package/dist/cli/{add-BKcE_g9D.js → add-Dggyehsy.js} +2 -2
  168. package/dist/cli/{migrate-sVs1QYTM.js → app-table-files-CiGuwLkO.js} +90 -50
  169. package/dist/cli/{backfill-r9RELEEh.js → backfill-DjVjXW_P.js} +4 -4
  170. package/dist/cli/bin.js +1 -1
  171. package/dist/cli/{blocks-DTOFdrxL.js → blocks-Bbmb6W_F.js} +1 -1
  172. package/dist/cli/{blocks-k1OG8XDs.js → blocks-jRL9K1R8.js} +2 -2
  173. package/dist/cli/{cache-Czfw7Iow.js → cache-BuoIFlUJ.js} +1 -1
  174. package/dist/cli/{codemod-ClmbiLuL.js → codemod-DRavXBCb.js} +5 -5
  175. package/dist/cli/{command-CVzTJSLp.js → command-DIPmo0wh.js} +6 -1
  176. package/dist/cli/{completion-DxEXxFpz.js → completion-DxPxMtyP.js} +2 -2
  177. package/dist/cli/{completion-CNCqE-Gb.js → completion-DyLMSjOD.js} +1 -1
  178. package/dist/cli/{completion-Dpk6vh0p.js → completion-FUgqm2-N.js} +2 -2
  179. package/dist/cli/{config-EjNj3HfT.js → config-BfapErxs.js} +1 -1
  180. package/dist/cli/{config-KvV-sLZL.js → config-Cskysxp-.js} +38 -7
  181. package/dist/cli/{config-D2YUlzrl.js → config-Df5cXWNN.js} +1 -1
  182. package/dist/cli/{config-group-C8tjut39.js → config-group-CP-B9uRt.js} +2 -3
  183. package/dist/cli/{content-mapper-ez_mT0d4.js → content-mapper-BCtyfKXl.js} +2 -2
  184. package/dist/cli/{db-uYN6O5Eg.js → db-CWvH1_46.js} +3 -3
  185. package/dist/cli/{doctor-BD9oo4MG.js → doctor-Di2ZekfN.js} +57 -24
  186. package/dist/cli/{env-DEAtgGoj.js → env-B2CbnbzD.js} +2 -2
  187. package/dist/cli/env-CynGCICL.js +1 -0
  188. package/dist/cli/{gen-8Ya8n2sA.js → gen-STKC9vkK.js} +16 -16
  189. package/dist/cli/index.d.ts +9 -2
  190. package/dist/cli/index.js +8 -8
  191. package/dist/cli/{init-DgL3sDfQ.js → init-DW6_nIwj.js} +22 -10
  192. package/dist/cli/{keys-CsanNk-2.js → keys-V-HcO-21.js} +1 -1
  193. package/dist/cli/{live-CMMEct_F.js → live-0G4Plw3K.js} +2 -2
  194. package/dist/cli/{mcp-DEHtzAkq.js → mcp-flKS8iU5.js} +6 -14
  195. package/dist/cli/{metadata-BZh-cOzC.js → metadata-VARUbXEe.js} +3 -3
  196. package/dist/cli/migrate-Bkq07XcT.js +46 -0
  197. package/dist/cli/{migration-safety-ClnYNMdq.js → migration-safety-BfVeza5j.js} +2 -2
  198. package/dist/cli/{migrations-DWh38tO9.js → migrations-BCq7Zs2E.js} +2 -2
  199. package/dist/cli/{module-migration-CXfRJIV4.js → module-migration-lbeUrsYv.js} +2 -2
  200. package/dist/cli/{moved-Cnb4fp49.js → moved-DNOtp9LA.js} +1 -1
  201. package/dist/cli/{parse-BWM6IGhF.js → parse-BPf3kGnc.js} +1 -1
  202. package/dist/cli/{powersync-Dnyr-Wy5.js → powersync-B15CfH5Y.js} +4 -4
  203. package/dist/cli/powersync-DnBsDchT.js +1 -0
  204. package/dist/cli/{print-DJrSr56b.js → print-DjxpBRnv.js} +2 -2
  205. package/dist/cli/{providers-CpaISitn.js → providers-dyxcHQY3.js} +1 -1
  206. package/dist/cli/{remove-ChaieK3t.js → remove-BLq5gbal.js} +7 -7
  207. package/dist/cli/{render-DUNJ4Pss.js → render-CizUf3RW.js} +5 -5
  208. package/dist/cli/{run-CxFDjL1Q.js → run-ChEjR7yw.js} +3 -3
  209. package/dist/cli/{run-Cl9COGuy.js → run-ChOY6s4o.js} +9 -9
  210. package/dist/cli/{run-ChCQPYOh.js → run-MwM__teL.js} +41 -41
  211. package/dist/cli/seed-BOun22-k.js +1 -0
  212. package/dist/cli/{seed-BzVLTdRl.js → seed-CDnL4Tnc.js} +3 -3
  213. package/dist/cli/{shared-5uqc1GBj.js → shared-DV5wIv-7.js} +1 -1
  214. package/dist/cli/{skills-0gz_qjVb.js → skills-DM3oeIxY.js} +1 -1
  215. package/dist/cli/{snapshot-DdAP7LWO.js → snapshot-B5LXkVMC.js} +3 -3
  216. package/dist/cli/{source-2irbWSck.js → source-BoLNG_2A.js} +1 -1
  217. package/dist/cli/{source-args-DAcQt-Mh.js → source-args-v8ljFDfc.js} +1 -1
  218. package/dist/cli/{spec-_MS0ym5r.js → spec-D6QeE2Zx.js} +1 -1
  219. package/dist/cli/{spec-B7n4Rthp.js → spec-Dz-PGCaM.js} +3 -3
  220. package/dist/cli/{sql-layout-DYKkQw1k.js → sql-layout-zo02f3Dm.js} +2 -2
  221. package/dist/cli/{stack-CteM33gC.js → stack-ClESAZYf.js} +1 -1
  222. package/dist/cli/{stack-env-6hS-WEmh.js → stack-env-3ziggrU3.js} +1 -1
  223. package/dist/cli/{sync-DnSOrQuA.js → sync-m-oZ_SyI.js} +4 -4
  224. package/dist/cli/{table-DeH8X0qz.js → table-dyKddjwo.js} +1 -1
  225. package/dist/cli/{upgrade-CWdrC-K3.js → upgrade-C9sgVZ5z.js} +5 -5
  226. package/dist/cli/{upgrade-cMy5fKkg.js → upgrade-WwEJaX3i.js} +3 -3
  227. package/dist/cli/{version-C5RAWmrD.js → version-D2BQuqta.js} +1 -1
  228. package/dist/client/index.d.ts +6 -6
  229. package/dist/client/native/index.d.ts +5 -5
  230. package/dist/{cloud-event-DcJwder2.d.ts → cloud-event-0pQ9vFNS.d.ts} +1 -1
  231. package/dist/{compiler-D3UmE7ao.d.ts → compiler-BEeVWXPS.d.ts} +2 -2
  232. package/dist/{composite-CWJvZgni.d.ts → composite-BJ9s-IJJ.d.ts} +7 -7
  233. package/dist/config/index.d.ts +4 -4
  234. package/dist/config/index.js +3 -3
  235. package/dist/{config-CvJHIy5q.js → config-bqKaPjst.js} +6 -27
  236. package/dist/{config-CTeR7XHK.js → config-r7njjNgh.js} +1 -1
  237. package/dist/{connectors-CHGiffYH.d.ts → connectors-uC5baoFV.d.ts} +4 -4
  238. package/dist/{context-BFEX0b7H.d.ts → context-nbYYjv7U.d.ts} +46 -51
  239. package/dist/{controller-Cl6HmMBk.d.ts → controller-TRocodqG.d.ts} +1 -1
  240. package/dist/{conversion-DlfStnln.d.ts → conversion-g8HzH9My.d.ts} +1 -1
  241. package/dist/create/index.d.ts +3 -3
  242. package/dist/create/index.js +2 -2
  243. package/dist/create/lite/index.d.ts +4 -4
  244. package/dist/create/lite/index.js +1 -1
  245. package/dist/credentials/index.d.ts +4 -4
  246. package/dist/{data-engine-BWoz9lED.d.ts → data-engine-rvbR2C4F.d.ts} +1 -1
  247. package/dist/{define-BLP6XtoL.d.ts → define-D8_9X5fZ.d.ts} +5 -5
  248. package/dist/{define-block-DibVN37N.d.ts → define-block-DWVZSZv1.d.ts} +12 -12
  249. package/dist/{documents-Cup1rpjF.d.ts → documents-BbwYyynk.d.ts} +3 -3
  250. package/dist/edge/index.d.ts +9 -9
  251. package/dist/elysia/index.d.ts +1 -1
  252. package/dist/{embeddings-D_RsS6ow.d.ts → embeddings-I3s5sTDt.d.ts} +1 -1
  253. package/dist/{ended-B8RyuUXF.d.ts → ended-EZzN9QTM.d.ts} +2 -2
  254. package/dist/{entitlements-Y-n4RGAd.d.ts → entitlements-B1i1-wfe.d.ts} +2 -2
  255. package/dist/eve/index.d.ts +5 -5
  256. package/dist/{eve-B7jxYPCw.d.ts → eve-BfhVFV33.d.ts} +2 -2
  257. package/dist/events/index.d.ts +3 -3
  258. package/dist/{events-Cc9DDQWH.d.ts → events-B2qbZps6.d.ts} +1 -1
  259. package/dist/{executor-DNPm13a9.d.ts → executor-BfirBzOr.d.ts} +4 -4
  260. package/dist/{executor-C-Ox9eKq.d.ts → executor-BlS0kCrN.d.ts} +1 -1
  261. package/dist/{executor-hGjrop3A.d.ts → executor-DXQIx4sW.d.ts} +1 -1
  262. package/dist/expo/index.d.ts +4 -4
  263. package/dist/{field-errors-Btn3czyz.d.ts → field-errors-tJvehEFc.d.ts} +10 -10
  264. package/dist/{fields-C3q2ypnO.d.ts → fields-snbaZ14h.d.ts} +1 -1
  265. package/dist/{filter-evaluate-CPxeae5X.d.ts → filter-evaluate-BRpNiNPG.d.ts} +1 -1
  266. package/dist/{filter-query-BXLs72G9.d.ts → filter-query-DBt7OKuH.d.ts} +1 -1
  267. package/dist/{flags-C01PLMJ-.d.ts → flags-DDKTThrO.d.ts} +2 -2
  268. package/dist/flags-sdk/index.d.ts +1 -1
  269. package/dist/{framework-GlxXiotm.d.ts → framework-DVYTtQXA.d.ts} +7 -7
  270. package/dist/{gateway-DzI687yd.d.ts → gateway-Ve7cByEr.d.ts} +3 -3
  271. package/dist/h3/index.d.ts +1 -1
  272. package/dist/h3/v1/index.d.ts +1 -1
  273. package/dist/hono/index.d.ts +9 -9
  274. package/dist/{inbox-NDKwSk_H.d.ts → inbox-c8B86Trp.d.ts} +5 -5
  275. package/dist/{index-DPMVWm_Z.d.ts → index-8US7qlvW.d.ts} +5 -5
  276. package/dist/{index-C_qlBJ3k.d.ts → index-B4wttiLh.d.ts} +4 -4
  277. package/dist/{index-CAY7rIQs.d.ts → index-BKrxynq9.d.ts} +5 -5
  278. package/dist/{index-BfYDY6eh.d.ts → index-BM6NmKSc.d.ts} +5 -5
  279. package/dist/{index-8wOL81rB.d.ts → index-BkzXwuIN.d.ts} +4 -3
  280. package/dist/{index-k-SyCzcQ.d.ts → index-CWAQRWY8.d.ts} +4 -4
  281. package/dist/{index-CQhPHHDF.d.ts → index-Cxsnd-OL.d.ts} +1 -1
  282. package/dist/{index-D1ckLbUM.d.ts → index-pZn6S_iq.d.ts} +1 -1
  283. package/dist/{index-C0_cweyT.d.ts → index-zsgNmE8m.d.ts} +14 -14
  284. package/dist/index.d.ts +6 -6
  285. package/dist/{kit-Dxx3MT8m.d.ts → kit-B8yWCRN7.d.ts} +3 -3
  286. package/dist/{knowledge-F1IhRI4Q.d.ts → knowledge-CsLPACGJ.d.ts} +5 -5
  287. package/dist/lint/index.d.ts +1 -1
  288. package/dist/list/index.d.ts +3 -3
  289. package/dist/{list-query-XHoYDlRN.d.ts → list-query-BcU8NnNL.d.ts} +3 -3
  290. package/dist/mapper/bin.js +6 -6
  291. package/dist/mcp/index.d.ts +6 -6
  292. package/dist/mcp/sdk/index.d.ts +6 -6
  293. package/dist/{messaging-C_Pr9tGx.d.ts → messaging-DQP09JsY.d.ts} +4 -4
  294. package/dist/nestjs/index.d.ts +2 -2
  295. package/dist/next/client/index.d.ts +1 -1
  296. package/dist/next/index.d.ts +103 -28
  297. package/dist/next/index.js +189 -49
  298. package/dist/node/index.d.ts +2 -2
  299. package/dist/{operations-DE7SOBw-.d.ts → operations-CB9atU2e.d.ts} +1 -1
  300. package/dist/{options-C4LuqmdG.js → options-BKBy5wM_.js} +2 -1
  301. package/dist/orpc/index.d.ts +8 -8
  302. package/dist/otel/index.d.ts +2 -2
  303. package/dist/otel/index.js +4 -4
  304. package/dist/{outbox-DxZgoKwp.d.ts → outbox-BZ712Z3X.d.ts} +4 -4
  305. package/dist/{pool-wjbAMqc1.d.ts → pool-DDR1ndk7.d.ts} +3 -3
  306. package/dist/{ports-DP0bthUk.d.ts → ports-hpbyMySO.d.ts} +1 -1
  307. package/dist/postgres/index.d.ts +4 -4
  308. package/dist/{postgrest-z-T0l23T.d.ts → postgrest-AJc8hnJU.d.ts} +1 -1
  309. package/dist/powersync/index.d.ts +6 -6
  310. package/dist/preset/index.d.ts +3 -3
  311. package/dist/preset/index.js +2 -2
  312. package/dist/{preset-DwuWNBip.js → preset-DCdEnJj9.js} +8 -13
  313. package/dist/{project-Bo1vZqVs.js → project-B32wb5J6.js} +4 -4
  314. package/dist/{provider-ClrIplXa.d.ts → provider-CWjzAIX9.d.ts} +1 -1
  315. package/dist/{push-token-v3xCcVU7.d.ts → push-token-DQ1ycFPU.d.ts} +1 -1
  316. package/dist/query/index.d.ts +1 -1
  317. package/dist/react/index.d.ts +8 -8
  318. package/dist/react/native/index.d.ts +1 -1
  319. package/dist/react/server.d.ts +8 -8
  320. package/dist/react/session.d.ts +2 -2
  321. package/dist/react-router/index.d.ts +6 -6
  322. package/dist/realtime/index.d.ts +6 -6
  323. package/dist/realtime/index.js +1 -1
  324. package/dist/{record-form-D2-F4IwS.d.ts → record-form-CubgBrtI.d.ts} +1 -1
  325. package/dist/{recordings-BBSJt_YV.d.ts → recordings-DeZYx-Kv.d.ts} +1 -1
  326. package/dist/records/index.d.ts +9 -9
  327. package/dist/{refresh-CCKB1Wa6.d.ts → refresh-D02Pbf5B.d.ts} +1 -1
  328. package/dist/{refusal-D_tklIEb.d.ts → refusal-B0VmlAxF.d.ts} +2 -2
  329. package/dist/{resolve-Bj1qD7Dy.d.ts → resolve-CtX6T0c0.d.ts} +1 -1
  330. package/dist/{resource-D8pzB5Qf.d.ts → resource-WxN0IsvB.d.ts} +1 -1
  331. package/dist/{resource-execute-BSTIfp1D.d.ts → resource-execute-BzqR8DdD.d.ts} +2 -2
  332. package/dist/{resource-types-D5WEvYtV.d.ts → resource-types-BVbHgTPg.d.ts} +4 -4
  333. package/dist/{resources-CsZ7RhZC.d.ts → resources-BSbRa0Ab.d.ts} +2 -2
  334. package/dist/{respond-BzRG-0qc.d.ts → respond-Dzu_-EPH.d.ts} +1 -1
  335. package/dist/{sales-lines-KxxStRzU.d.ts → sales-lines-BsmrNHe9.d.ts} +1 -1
  336. package/dist/{scores-B2BiNuVJ.d.ts → scores-Y8TvyJi1.d.ts} +5 -5
  337. package/dist/server/index.d.ts +24 -24
  338. package/dist/server/index.js +2 -2
  339. package/dist/{server-types-BlDiY-ya.d.ts → server-types-BkTIxW_H.d.ts} +11 -11
  340. package/dist/{session-BGP98Rgj.d.ts → session-BOzx2qHC.d.ts} +6 -6
  341. package/dist/{session-status-C4t7kbSn.d.ts → session-status-BP8eYVnA.d.ts} +2 -2
  342. package/dist/sign-in-BzihC_8k.d.ts +50 -0
  343. package/dist/{sign-in-NO7LWlw4.js → sign-in-Cyj3ZlFX.js} +120 -25
  344. package/dist/{signers-BKgmVh6A.d.ts → signers-ZmxO1I05.d.ts} +4 -4
  345. package/dist/{signing-keys-BNDUxpQL.d.ts → signing-keys-udgP7Aod.d.ts} +2 -2
  346. package/dist/solid/index.d.ts +10 -10
  347. package/dist/solid-start/index.d.ts +6 -6
  348. package/dist/spec/index.d.ts +2 -2
  349. package/dist/sql/index.d.ts +4 -4
  350. package/dist/sql/index.js +2 -2
  351. package/dist/{sql-B7vBP9g0.js → sql-CyeDg3Yh.js} +321 -212
  352. package/dist/sqlite/index.d.ts +3 -3
  353. package/dist/{sso-B0Txid2-.d.ts → sso-CkU_4mtK.d.ts} +3 -3
  354. package/dist/ssr/index.d.ts +5 -5
  355. package/dist/storage/index.d.ts +3 -3
  356. package/dist/streams/index.d.ts +1 -1
  357. package/dist/{subject-readers-DJbzlm8a.d.ts → subject-readers-CB5Te02u.d.ts} +5 -5
  358. package/dist/{subject-readers-CeeJJOQ4.js → subject-readers-VHcrWhmq.js} +2 -2
  359. package/dist/{subjects-BpIEN1MS.d.ts → subjects-CiBNKy2y.d.ts} +4 -4
  360. package/dist/{support-D7CMbhRT.d.ts → support-BxyPOFk4.d.ts} +4 -4
  361. package/dist/{support-view-CIDXF3_H.d.ts → support-view-nqUWKHEs.d.ts} +1 -1
  362. package/dist/svelte/index.d.ts +9 -9
  363. package/dist/sveltekit/index.d.ts +7 -7
  364. package/dist/{tags-Dg4Ywmqp.d.ts → tags-Cm48BsOa.d.ts} +1 -1
  365. package/dist/tanstack-db/index.d.ts +3 -3
  366. package/dist/tanstack-start/index.d.ts +6 -6
  367. package/dist/{tenant-CyLEXgot.d.ts → tenant-C9YE_kqK.d.ts} +2 -2
  368. package/dist/testing/index.d.ts +25 -25
  369. package/dist/testing/index.js +1 -1
  370. package/dist/{timeline-Cjl-1hiA.d.ts → timeline-DvXtXq5q.d.ts} +5 -5
  371. package/dist/{topic-B_DGdAEs.d.ts → topic-breZqx_4.d.ts} +5 -5
  372. package/dist/{types-Dp3UCr1e.d.ts → types-B-D6fYx2.d.ts} +1 -1
  373. package/dist/{types-DF8JYEf5.d.ts → types-C3I7S51U.d.ts} +2 -2
  374. package/dist/{types-Czq9Xtpa.d.ts → types-CK2X2wCB.d.ts} +5 -5
  375. package/dist/{types-DFdg_4yN.d.ts → types-CPl9uJ0G.d.ts} +2 -2
  376. package/dist/{types-DR1MHh7N.d.ts → types-CwQgFo8c.d.ts} +4 -4
  377. package/dist/{types-Dr9wZgNy.d.ts → types-DMihLukJ.d.ts} +3 -3
  378. package/dist/{types-A4yyKEsg.d.ts → types-iCyZ3lMx.d.ts} +4 -4
  379. package/dist/{types-BdaBfYIw.d.ts → types-nspa5I-a.d.ts} +7 -7
  380. package/dist/{undo-B1jwnVyN.d.ts → undo-0HkWXASn.d.ts} +2 -2
  381. package/dist/{usage-Dp45V42p.d.ts → usage-BkWAPkg2.d.ts} +4 -4
  382. package/dist/{vault-BghaujrZ.d.ts → vault-BkdPmL7f.d.ts} +2 -2
  383. package/dist/vercel-connect/index.d.ts +1 -1
  384. package/dist/{verify-CI8LgSpv.d.ts → verify-41mZmspj.d.ts} +2 -2
  385. package/dist/{view-BvNA7EOC.d.ts → view-C8_xvD-j.d.ts} +1 -1
  386. package/dist/vue/index.d.ts +10 -10
  387. package/dist/{watch-topic-1zIAtiNM.d.ts → watch-topic-ItO3dz8m.d.ts} +1 -1
  388. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  389. package/dist/workflow-sdk/index.d.ts +1 -1
  390. package/dist/workflow-sdk/world/index.d.ts +1 -1
  391. package/dist/workflow-sdk/world/index.js +1 -1
  392. package/dist/{workflow-sdk-CaEw822d.js → workflow-sdk-BWPsdzVK.js} +36 -8
  393. package/dist/{workflow-sdk-BNsZrcVg.d.ts → workflow-sdk-rg3IbCZC.d.ts} +3 -3
  394. package/dist/{workflows-B0ZPAQu0.d.ts → workflows-xL6t0TXx.d.ts} +7 -4
  395. package/dist/yjs/index.d.ts +2 -2
  396. package/package.json +1 -2
  397. package/schemas/config-v1.json +5 -352
  398. package/schemas/doctor-report-v1.json +1 -0
  399. package/skills/better-supabase/references/ui-recipes.md +5 -5
  400. package/skills/better-supabase-auth/SKILL.md +8 -1
  401. package/dist/cli/add-pDOlqWUa.js +0 -1
  402. package/dist/cli/env-Cy2lWBRC.js +0 -1
  403. package/dist/cli/powersync-DURhWDVc.js +0 -1
  404. package/dist/cli/seed-BJ7c-ktX.js +0 -1
  405. package/dist/sign-in-CAadgm33.d.ts +0 -24
@@ -1,30 +1,30 @@
1
1
  import { b as DbError, f as Result } from "../result-DZeA5KS6.js";
2
- import { $ as RecordRef, O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
3
- import { r as AuthState } from "../resolve-Bj1qD7Dy.js";
2
+ import { $ as RecordRef, O as AnyFunctions, k as AnyModels } from "../types-CPl9uJ0G.js";
3
+ import { p as CookieScope, r as AuthState } from "../resolve-CtX6T0c0.js";
4
4
  import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
5
- import { Qt as CacheAdapter, Y as DbStats, mt as QuerySpec, nt as ReadSet, t as BetterSupabase } from "../define-BLP6XtoL.js";
6
- import { A as isSessionSnapshot, M as sessionCacheKey, O as SessionSnapshot, a as ServerContext, c as ServerOptions, j as issuedAtOf, k as authzVersionOf, l as SharedServer, n as BetterServer, r as ContextOptions } from "../server-types-BlDiY-ya.js";
5
+ import { Qt as CacheAdapter, Y as DbStats, mt as QuerySpec, nt as ReadSet, t as BetterSupabase } from "../define-D8_9X5fZ.js";
6
+ import { A as isSessionSnapshot, M as sessionCacheKey, O as SessionSnapshot, a as ServerContext, c as ServerOptions, j as issuedAtOf, k as authzVersionOf, l as SharedServer, n as BetterServer, r as ContextOptions } from "../server-types-BkTIxW_H.js";
7
7
  import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
8
8
  import { n as AmrEntry, t as Aal } from "../mfa-oIOYTpvc.js";
9
- import { S as BlockClientSource, on as RecordBindingOptions } from "../define-block-DibVN37N.js";
10
- import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-BfYDY6eh.js";
11
- import { t as tenantOf } from "../tenant-CyLEXgot.js";
12
- import { n as toSession, t as AuthSession } from "../view-BvNA7EOC.js";
13
- import { a as SupportPolicy, c as supportSessions, i as SupportOptions, o as SupportSessions, s as SupportStartRequest, t as ActiveSupport } from "../support-D7CMbhRT.js";
14
- import { t as AuthOutageHook } from "../session-BGP98Rgj.js";
15
- import { n as AuthKind, r as GuardOptions } from "../respond-BzRG-0qc.js";
16
- import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-Dxx3MT8m.js";
17
- import { c as ListParseOptions, m as ListSearchParams } from "../list-query-XHoYDlRN.js";
18
- import { r as LiveCountSeed, t as CountRunner } from "../index-CAY7rIQs.js";
19
- import { r as MembershipClaim } from "../entitlements-Y-n4RGAd.js";
20
- import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-D5WEvYtV.js";
21
- import { t as ResourceMap } from "../resources-CsZ7RhZC.js";
22
- import { t as defineAction } from "../resource-execute-BSTIfp1D.js";
9
+ import { S as BlockClientSource, on as RecordBindingOptions } from "../define-block-DWVZSZv1.js";
10
+ import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-BM6NmKSc.js";
11
+ import { t as tenantOf } from "../tenant-C9YE_kqK.js";
12
+ import { n as toSession, t as AuthSession } from "../view-C8_xvD-j.js";
13
+ import { a as SupportPolicy, c as supportSessions, i as SupportOptions, o as SupportSessions, s as SupportStartRequest, t as ActiveSupport } from "../support-BxyPOFk4.js";
14
+ import { t as AuthOutageHook } from "../session-BOzx2qHC.js";
15
+ import { n as AuthKind, r as GuardOptions } from "../respond-Dzu_-EPH.js";
16
+ import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-B8yWCRN7.js";
17
+ import { c as ListParseOptions, m as ListSearchParams } from "../list-query-BcU8NnNL.js";
18
+ import { r as LiveCountSeed, t as CountRunner } from "../index-BKrxynq9.js";
19
+ import { r as MembershipClaim } from "../entitlements-B1i1-wfe.js";
20
+ import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-BVbHgTPg.js";
21
+ import { t as ResourceMap } from "../resources-BSbRa0Ab.js";
22
+ import { t as defineAction } from "../resource-execute-BzqR8DdD.js";
23
+ import { a as SignOutScope, n as EmailOtpType, r as OtpParams, s as safeRedirectPath, t as AuthorizeUrlParams } from "../sign-in-BzihC_8k.js";
23
24
  import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
24
- import { i as tagFor, t as TagOptions } from "../tags-Dg4Ywmqp.js";
25
- import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-Cjl-1hiA.js";
26
- import { r as safeRedirectPath } from "../sign-in-CAadgm33.js";
27
- import { n as supportOf, t as SupportView } from "../support-view-CIDXF3_H.js";
25
+ import { i as tagFor, t as TagOptions } from "../tags-Cm48BsOa.js";
26
+ import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-DvXtXq5q.js";
27
+ import { n as supportOf, t as SupportView } from "../support-view-nqUWKHEs.js";
28
28
  import { NextRequest } from "next/server.js";
29
29
  import { StandardSchemaV1 } from "@standard-schema/spec";
30
30
  //#region src/next/collector.d.ts
@@ -169,6 +169,12 @@ interface NextOptions extends ServerOptions {
169
169
  readonly exposeErrors?: boolean;
170
170
  /** Per-request database call counts. See the Budget docs. */
171
171
  readonly debug?: NextDebugOptions;
172
+ /**
173
+ * Cookie scopes (`domain`, `path`) earlier deploys wrote the session at.
174
+ * `signOut` also expires the session cookie at each of them. Never list the
175
+ * current scope.
176
+ */
177
+ readonly cookieScopes?: readonly CookieScope[];
172
178
  }
173
179
  interface NextDebugOptions {
174
180
  /** Collect outside development too, e.g. for e2e runs against `next start`. */
@@ -488,10 +494,46 @@ interface BetterNext<M extends AnyModels, F extends AnyFunctions, E, C = unknown
488
494
  * Signs in with an email and a password from a server action. It writes the
489
495
  * session cookies, stores the verified session for the next render and
490
496
  * returns `redirectTo`: `credentials.next` when it is a same-origin path,
491
- * else `options.fallback` (`/`). The client then calls
492
- * `router.replace(redirectTo)` once.
497
+ * else `options.fallback` (`/`). Reads later in the same request
498
+ * (`getRequestSession()`, `session()`, `context()`) see the new session.
493
499
  */
494
500
  signIn(credentials: SignInCredentials, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
501
+ /** The same as `signIn`. */
502
+ signInWithPassword(credentials: SignInCredentials, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
503
+ /**
504
+ * Verifies an email link's `token_hash` (sign-up, invite, magic link,
505
+ * recovery, email change) or an emailed code, then commits the session like
506
+ * `signIn`. The new session replaces any session the request carried.
507
+ */
508
+ verifyOtp(params: VerifyOtpParams, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
509
+ /**
510
+ * The Auth server's OAuth URL for `provider`, for a `redirect()`. It writes
511
+ * the PKCE verifier cookie (httpOnly, `lax`, 10 minutes) that `exchangeCode`
512
+ * reads. `next` rides on `redirectTo` as `?next=` when it is a same-origin
513
+ * path.
514
+ */
515
+ authorizeUrl(params: OAuthStart): Promise<{
516
+ readonly url: string;
517
+ }>;
518
+ /**
519
+ * Exchanges the callback's `?code=` and the PKCE verifier cookie for a
520
+ * session, deletes the verifier cookie and commits the session like
521
+ * `signIn`.
522
+ */
523
+ exchangeCode(params: CodeExchange, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
524
+ /**
525
+ * Challenges and verifies an MFA factor for the signed-in user and commits
526
+ * the `aal2` session; `mfa` is then false.
527
+ */
528
+ verifyMfa(params: MfaVerification, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
529
+ /**
530
+ * Ends the session on the Auth server first (`scope`, `local` by default),
531
+ * then clears the session cookies (also at `cookieScopes`), forgets the
532
+ * verified sessions and expires its cache tags. `others` keeps this session
533
+ * and its cookies, and still forgets the verified sessions. Reads later in
534
+ * the same request are signed out.
535
+ */
536
+ signOut(params?: SignOutParams, options?: SignInOptions): Promise<ActionResult<SignedIn>>;
495
537
  }
496
538
  interface SignInCredentials {
497
539
  readonly email: string;
@@ -503,12 +545,45 @@ interface SignInOptions {
503
545
  /** Where to go when `next` is missing or not a same-origin path. */
504
546
  readonly fallback?: string;
505
547
  }
506
- /** What `signIn` returns: plain data, safe across the action boundary. */
548
+ /** `verifyOtp` input: a link's `token_hash`, or an email and its code. */
549
+ type VerifyOtpParams = OtpParams & {
550
+ /** Checked before use, like `signIn`'s. */
551
+ readonly next?: string | null;
552
+ };
553
+ /** `authorizeUrl` input. */
554
+ interface OAuthStart extends AuthorizeUrlParams {
555
+ /** Where to go after the callback; checked before use. */
556
+ readonly next?: string | null;
557
+ }
558
+ /** `exchangeCode` input: the callback's `?code=` and `?next=`. */
559
+ interface CodeExchange {
560
+ readonly code: string;
561
+ readonly next?: string | null;
562
+ }
563
+ /** `verifyMfa` input. */
564
+ interface MfaVerification {
565
+ readonly factorId: string;
566
+ /** The code from the authenticator app. */
567
+ readonly code: string;
568
+ readonly next?: string | null;
569
+ }
570
+ /** `signOut` input. */
571
+ interface SignOutParams {
572
+ readonly scope?: SignOutScope;
573
+ readonly next?: string | null;
574
+ }
575
+ /**
576
+ * What the sign-in and sign-out helpers return: plain data, safe across the
577
+ * action boundary. The committed session is on `getRequestSession()` and
578
+ * `context()` for the rest of the request.
579
+ */
507
580
  interface SignedIn {
581
+ /** `next` when it is a same-origin path, else `fallback` (`/`). */
508
582
  readonly redirectTo: string;
509
583
  /**
510
- * The user has a verified MFA factor: send them to the challenge (with
511
- * `redirectTo` as its `next`) before `redirectTo`.
584
+ * The user has a verified MFA factor and the session is not `aal2` yet: send
585
+ * them to the challenge (with `redirectTo` as its `next`) before
586
+ * `redirectTo`. Advisory: keep the proxy and `action({ aal: 2 })` gates.
512
587
  */
513
588
  readonly mfa: boolean;
514
589
  }
@@ -685,4 +760,4 @@ export declare function shouldRefresh(request: Request): boolean;
685
760
  */
686
761
  export declare function requireAal(level: Aal, options?: RequireAalOptions): (auth: AuthState, request: NextRequest) => Response | undefined;
687
762
  //#endregion
688
- export { type Aal, type ActionArgs, type ActionOptions, type ActionResult, type ActiveSupport, type AmrEntry, type AuthKind, type AuthSession, type AuthorizeOptions, type AuthorizedContext, type BetterNext, type BlockActionArgs, type CachedContext, type CachedOptions, type DbBudget, type DbStats, type EndedSessionOptions, type GuardOptions, type Impersonator, type LiveCountSeed, type MembershipClaim, type NextCacheOptions, type NextDebugOptions, type NextOptions, type NextResourceHandler, type NextResourceRoutes, type NextResourcesOptions, type ProxyOptions, type RecordListServer, type RecordListView, type RecordLoadOptions, type RecordServer, type RecordServerActions, type RecordServerContext, type RecordTagOptions, type RecordTimelineOptions, type RecordView, type RequireAalOptions, type RequireOptions, type ResourceAction, type ResourceContext, type ResourceHooks, type ResourceLoaderContext, type ResourceMap, type ResourceRouteOptions, type RouteOptions, type ScopeOptions, type SessionSnapshot, type SessionStaleOptions, type SignInCredentials, type SignInOptions, type SignedIn, type SupportOptions, type SupportPolicy, type SupportSessions, type SupportStartRequest, type SupportStarted, type SupportView, type TagOptions, authzVersionOf, defineAction, isSessionSnapshot, issuedAtOf, safeRedirectPath, sessionCacheKey, supportOf, supportSessions, tagFor, tenantOf, toSession };
763
+ export { type Aal, type ActionArgs, type ActionOptions, type ActionResult, type ActiveSupport, type AmrEntry, type AuthKind, type AuthSession, type AuthorizeOptions, type AuthorizeUrlParams, type AuthorizedContext, type BetterNext, type BlockActionArgs, type CachedContext, type CachedOptions, type CodeExchange, type DbBudget, type DbStats, type EmailOtpType, type EndedSessionOptions, type GuardOptions, type Impersonator, type LiveCountSeed, type MembershipClaim, type MfaVerification, type NextCacheOptions, type NextDebugOptions, type NextOptions, type NextResourceHandler, type NextResourceRoutes, type NextResourcesOptions, type OAuthStart, type ProxyOptions, type RecordListServer, type RecordListView, type RecordLoadOptions, type RecordServer, type RecordServerActions, type RecordServerContext, type RecordTagOptions, type RecordTimelineOptions, type RecordView, type RequireAalOptions, type RequireOptions, type ResourceAction, type ResourceContext, type ResourceHooks, type ResourceLoaderContext, type ResourceMap, type ResourceRouteOptions, type RouteOptions, type ScopeOptions, type SessionSnapshot, type SessionStaleOptions, type SignInCredentials, type SignInOptions, type SignOutParams, type SignOutScope, type SignedIn, type SupportOptions, type SupportPolicy, type SupportSessions, type SupportStartRequest, type SupportStarted, type SupportView, type TagOptions, type VerifyOtpParams, authzVersionOf, defineAction, isSessionSnapshot, issuedAtOf, safeRedirectPath, sessionCacheKey, supportOf, supportSessions, tagFor, tenantOf, toSession };
@@ -2,7 +2,7 @@ import { t as DbException } from "../db-exception-Lngc1W49.js";
2
2
  import { n as dbError } from "../errors-BVFgt8BZ.js";
3
3
  import { t as isList } from "../guards-6F2bCtQR.js";
4
4
  import { t as isStorageApi } from "../storage-api-Dg78Wqsg.js";
5
- import { r as err } from "../result-ntFBW2p2.js";
5
+ import { a as ok, r as err } from "../result-ntFBW2p2.js";
6
6
  import { o as isReadSet } from "../read-set-B1sDib5O.js";
7
7
  import { n as validate } from "../standard-BA3mLh6w.js";
8
8
  import { n as StatsRecorder, t as EMPTY_STATS } from "../stats-BHl1-zj9.js";
@@ -15,10 +15,10 @@ import { n as methodOf } from "../block-method-C9hWdHom.js";
15
15
  import { t as tenantOf } from "../tenant-BgIiMQpo.js";
16
16
  import { t as loadTimeline } from "../timeline--VU3A1e4.js";
17
17
  import { T as serverCore, b as isPrefetch, c as extendServer, n as flushEvents, p as supportCookieMaxAge, r as handle, s as createServer, t as bearerRequest, v as outageResponse } from "../adapter-D4aNBxhm.js";
18
- import { g as sessionCookieName, t as clientIp, v as writeSession } from "../resolve-B0mW2m7f.js";
19
- import { a as isSessionSnapshot, f as checkAal, i as authzVersionOf, n as toSession, o as issuedAtOf, s as sessionCacheKey } from "../view-C8Ve14ja.js";
18
+ import { d as clearSessionAtScopes, g as sessionCookieName, t as clientIp, u as applyCookieWrites, v as writeSession } from "../resolve-B0mW2m7f.js";
19
+ import { a as isSessionSnapshot, f as checkAal, i as authzVersionOf, l as snapshotOf, n as toSession, o as issuedAtOf, s as sessionCacheKey } from "../view-C8Ve14ja.js";
20
20
  import { i as guard, n as defaultExpose, s as settle } from "../respond-CZMWbUs3.js";
21
- import { i as supportSessions, n as passwordGrant, r as safeRedirectPath, t as needsMfa } from "../sign-in-NO7LWlw4.js";
21
+ import { a as passwordGrant, c as revokeSession, i as otpGrant, l as safeRedirectPath, n as mfaGrant, o as pkceGrant, r as needsMfa, s as pkcePair, t as authorizeUrlFor, u as supportSessions } from "../sign-in-Cyj3ZlFX.js";
22
22
  import { i as defineAction } from "../resource-BUJcZKiW.js";
23
23
  import { r as tagFor, t as cacheTagsOf } from "../tags-CIZTqtlY.js";
24
24
  import { i as requireCaller, n as formDataObject, t as authorizeCaller } from "../kit-Bcd9wYCV.js";
@@ -471,38 +471,138 @@ function resourceRoutes(serve) {
471
471
  }
472
472
  //#endregion
473
473
  //#region src/next/sign-in.ts
474
+ /** How long the PKCE verifier cookie lives, in seconds. */
475
+ const VERIFIER_MAX_AGE = 600;
476
+ function refused(auth) {
477
+ return {
478
+ ok: false,
479
+ data: null,
480
+ error: auth.kind === "invalid" ? auth.error : dbError("unauthorized", "The new session did not verify")
481
+ };
482
+ }
474
483
  /**
475
- * Signs in on the server, writes the session cookies through the request's
476
- * cookie jar and returns the same-origin path to go to next.
484
+ * The server-side sign-in and sign-out flows. Each runs one Auth call, then one
485
+ * commit: it verifies the new token, writes or clears the session cookies
486
+ * through the request's cookie jar, and publishes the session to later reads in
487
+ * the same request. The result carries no token: it crosses the action
488
+ * boundary, and the session is on the request's reads.
477
489
  */
478
- async function signInWithPassword(credentials, options, deps) {
479
- const { env, auth } = deps;
480
- const secretKey = env.secretKey;
481
- const ip = secretKey && auth?.clientIp !== false ? (auth?.clientIp ?? clientIp)(deps.request) : void 0;
482
- const granted = await passwordGrant({
490
+ function authFlows(deps) {
491
+ const { auth } = deps;
492
+ const cookieName = () => auth?.cookie?.name ?? sessionCookieName(deps.env().url);
493
+ const verifierName = () => `${cookieName()}-code-verifier`;
494
+ const grantOptions = async () => {
495
+ const env = deps.env();
496
+ const secretKey = env.secretKey;
497
+ const ip = secretKey && auth?.clientIp !== false ? (auth?.clientIp ?? clientIp)(await deps.request()) : void 0;
498
+ return {
499
+ url: env.url,
500
+ publishableKey: env.publishableKey,
501
+ ...secretKey && ip ? { forwardedFor: {
502
+ ip,
503
+ secretKey
504
+ } } : {},
505
+ ...auth?.fetch ? { fetch: auth.fetch } : {},
506
+ ...auth?.refreshTimeoutMs === void 0 ? {} : { timeoutMs: auth.refreshTimeoutMs }
507
+ };
508
+ };
509
+ /** Verifies, writes the cookies and publishes `stored` (`null` clears). */
510
+ const commit = async (granted, next, options) => {
511
+ if (!granted.ok) return granted;
512
+ const stored = granted.data;
513
+ const resolution = await deps.verify(stored?.access_token ?? null);
514
+ if (stored && resolution.auth.kind !== "user") return refused(resolution.auth);
515
+ const jar = await deps.jar();
516
+ const existing = jar.getAll();
517
+ const writes = [...writeSession(existing, cookieName(), stored, auth?.cookie?.options, auth?.cookie?.encode === void 0 ? {} : { encode: auth.cookie.encode }), ...stored ? [] : clearSessionAtScopes(existing, cookieName(), deps.cookieScopes ?? [])];
518
+ for (const write of writes) jar.set(write.name, write.value, write.options);
519
+ const headers = new Headers((await deps.request()).headers);
520
+ headers.set("cookie", applyCookieWrites(existing, writes).map((cookie) => `${cookie.name}=${encodeURIComponent(cookie.value)}`).join("; "));
521
+ await deps.publish(resolution, new Request("http://next.local/", { headers }));
522
+ return {
523
+ ok: true,
524
+ data: {
525
+ redirectTo: safeRedirectPath(next, options.fallback ?? "/"),
526
+ mfa: stored !== null && needsMfa(stored) && snapshotOf(resolution.auth)?.claims["aal"] !== "aal2"
527
+ },
528
+ error: null
529
+ };
530
+ };
531
+ const signIn = async (credentials, options = {}) => commit(await passwordGrant({
483
532
  email: credentials.email,
484
533
  password: credentials.password
485
- }, {
486
- url: env.url,
487
- publishableKey: env.publishableKey,
488
- ...secretKey && ip ? { forwardedFor: {
489
- ip,
490
- secretKey
491
- } } : {},
492
- ...auth?.fetch ? { fetch: auth.fetch } : {},
493
- ...auth?.refreshTimeoutMs === void 0 ? {} : { timeoutMs: auth.refreshTimeoutMs }
494
- });
495
- if (!granted.ok) return granted;
496
- const writes = writeSession(deps.jar.getAll(), auth?.cookie?.name ?? sessionCookieName(env.url), granted.data, auth?.cookie?.options, auth?.cookie?.encode === void 0 ? {} : { encode: auth.cookie.encode });
497
- for (const write of writes) deps.jar.set(write.name, write.value, write.options);
498
- await deps.seed(granted.data.access_token);
534
+ }, await grantOptions()), credentials.next, options);
499
535
  return {
500
- ok: true,
501
- data: {
502
- redirectTo: safeRedirectPath(credentials.next, options.fallback ?? "/"),
503
- mfa: needsMfa(granted.data)
536
+ signIn,
537
+ verifyOtp: async (params, options = {}) => commit(await otpGrant(params, await grantOptions()), params.next, options),
538
+ async authorizeUrl(params) {
539
+ const { verifier, challenge } = await pkcePair();
540
+ (await deps.jar()).set(verifierName(), verifier, {
541
+ path: "/",
542
+ ...auth?.cookie?.options,
543
+ httpOnly: true,
544
+ sameSite: "lax",
545
+ maxAge: VERIFIER_MAX_AGE
546
+ });
547
+ const next = safeRedirectPath(params.next, "");
548
+ const redirectTo = new URL(params.redirectTo);
549
+ if (next) redirectTo.searchParams.set("next", next);
550
+ return { url: authorizeUrlFor(deps.env().url, {
551
+ ...params,
552
+ redirectTo: redirectTo.href
553
+ }, challenge) };
504
554
  },
505
- error: null
555
+ async exchangeCode(params, options = {}) {
556
+ const jar = await deps.jar();
557
+ const verifier = jar.getAll().find((cookie) => cookie.name === verifierName())?.value;
558
+ jar.set(verifierName(), "", {
559
+ path: "/",
560
+ ...auth?.cookie?.options,
561
+ httpOnly: true,
562
+ sameSite: "lax",
563
+ maxAge: 0
564
+ });
565
+ if (!verifier) return {
566
+ ok: false,
567
+ data: null,
568
+ error: dbError("unauthorized", "Code exchange failed", { code: "code_verifier_missing" })
569
+ };
570
+ return commit(await pkceGrant({
571
+ code: params.code,
572
+ verifier
573
+ }, await grantOptions()), params.next, options);
574
+ },
575
+ async verifyMfa(params, options = {}) {
576
+ const current = await deps.current();
577
+ if (!current) return {
578
+ ok: false,
579
+ data: null,
580
+ error: dbError("unauthorized", "MFA verification needs a session")
581
+ };
582
+ return commit(await mfaGrant({
583
+ accessToken: current.accessToken,
584
+ factorId: params.factorId,
585
+ code: params.code
586
+ }, await grantOptions()), params.next, options);
587
+ },
588
+ async signOut(params = {}, options = {}) {
589
+ const scope = params.scope ?? "local";
590
+ const current = await deps.current();
591
+ if (current) {
592
+ const revoked = await revokeSession(current.accessToken, scope, await grantOptions());
593
+ if (!revoked.ok) return revoked;
594
+ }
595
+ if (current) deps.signedOut(current.userId);
596
+ if (scope === "others") return {
597
+ ok: true,
598
+ data: {
599
+ redirectTo: safeRedirectPath(params.next, options.fallback ?? "/"),
600
+ mfa: false
601
+ },
602
+ error: null
603
+ };
604
+ return commit(ok(null), params.next, options);
605
+ }
506
606
  };
507
607
  }
508
608
  //#endregion
@@ -617,7 +717,19 @@ function createNext(betterSupabase, options = {}) {
617
717
  const jar = await cookies();
618
718
  for (const write of writes) jar.set(write.name, write.value, write.options);
619
719
  };
620
- const incomingRequest = async () => new Request("http://next.local/", { headers: new Headers(await headers()) });
720
+ /**
721
+ * The incoming request, with the cookie header rebuilt from the cookie jar:
722
+ * in a Server Action or a route handler the jar already holds this request's
723
+ * writes (a sign-in, a sign-out), and the header never does.
724
+ */
725
+ const incomingRequest = async () => {
726
+ const [incomingHeaders, jar] = await Promise.all([headers(), cookies()]);
727
+ const forwarded = new Headers(incomingHeaders);
728
+ const cookie = jar.getAll().map(({ name, value }) => `${name}=${encodeURIComponent(value)}`).join("; ");
729
+ if (cookie === "") forwarded.delete("cookie");
730
+ else forwarded.set("cookie", cookie);
731
+ return new Request("http://next.local/", { headers: forwarded });
732
+ };
621
733
  /**
622
734
  * The incoming request, once its dynamic APIs are awaited. Auth reads cookies
623
735
  * and then the clock: `io()` marks that as I/O for Cache Components without
@@ -635,10 +747,21 @@ function createNext(betterSupabase, options = {}) {
635
747
  });
636
748
  };
637
749
  /**
750
+ * The request's auth generation. A sign-in or sign-out in the request bumps
751
+ * it and stores the committed session, so the cached reads below miss once
752
+ * and answer from it; a render that never commits keys every read on 0.
753
+ */
754
+ const box = cache(() => ({
755
+ generation: 0,
756
+ committed: void 0
757
+ }));
758
+ /**
638
759
  * One token verification per render scope backs `context()`, `session()` and
639
760
  * `cached()`.
640
761
  */
641
- const incoming = cache(async () => {
762
+ const incomingAt = cache(async (_generation) => {
763
+ const committed = box().committed;
764
+ if (committed) return committed;
642
765
  const request = await requestScope();
643
766
  await base.snapshot(request);
644
767
  return {
@@ -646,7 +769,12 @@ function createNext(betterSupabase, options = {}) {
646
769
  resolution: await base.resolve(request, { refresh: false })
647
770
  };
648
771
  });
649
- const getRequestSession = cache(async () => base.snapshot(await requestScope()));
772
+ const incoming = () => incomingAt(box().generation);
773
+ const getRequestSessionAt = cache(async (_generation) => {
774
+ const committed = box().committed;
775
+ return committed ? snapshotOf(committed.resolution.auth) : base.snapshot(await requestScope());
776
+ });
777
+ const getRequestSession = () => getRequestSessionAt(box().generation);
650
778
  const tenantClaim = claimsOf(betterSupabase.meta).tenant;
651
779
  /** The tenant `scoped` resolved for a context, when it wasn't the claim. */
652
780
  const scopedTenants = /* @__PURE__ */ new WeakMap();
@@ -657,7 +785,7 @@ function createNext(betterSupabase, options = {}) {
657
785
  */
658
786
  const authorizeCaller$1 = (ctx, checks, input) => authorizeCaller(ctx.auth, checks, input, tenantFor(ctx, toSession(ctx.auth)), base.authorizer, ctx);
659
787
  /** `null` runs `NextOptions.tenant`; a string is the caller's explicit tenant. */
660
- const scoped = cache(async (explicit) => {
788
+ const scopedAt = cache(async (explicit, _generation) => {
661
789
  const { request, resolution } = await incoming();
662
790
  const [tenant, support] = await Promise.all([explicit ?? options.tenant?.(request, resolution.auth), base.support.current(request, resolution.auth)]);
663
791
  const ctx = core.context(resolution, request, {
@@ -667,10 +795,11 @@ function createNext(betterSupabase, options = {}) {
667
795
  if (tenant !== void 0) scopedTenants.set(ctx, tenant);
668
796
  return ctx;
669
797
  });
670
- const current = (tenant) => scoped(tenant ?? null);
798
+ const current = (tenant) => scopedAt(tenant ?? null, box().generation);
671
799
  const context = (first, contextOptions) => first instanceof Request ? base.context(first, contextOptions) : current(first?.tenant ?? contextOptions?.tenant);
672
800
  /** In a support session, the target's view: `impersonator` names the admin. */
673
- const session = cache(async () => toSession(options.support ? (await current()).auth : (await incoming()).resolution.auth));
801
+ const sessionAt = cache(async (_generation) => toSession(options.support ? (await current()).auth : (await incoming()).resolution.auth));
802
+ const session = () => sessionAt(box().generation);
674
803
  const supportCookieName = options.support?.options.cookie?.name ?? "bsb-support";
675
804
  const supportCookieOptions = {
676
805
  httpOnly: true,
@@ -706,6 +835,28 @@ function createNext(betterSupabase, options = {}) {
706
835
  return result;
707
836
  }))
708
837
  });
838
+ const flows = authFlows({
839
+ env: () => base.env,
840
+ auth: options.auth,
841
+ cookieScopes: options.cookieScopes,
842
+ request: incomingRequest,
843
+ jar: cookies,
844
+ current: getRequestSession,
845
+ verify: (token) => base.resolve(bearerRequest(token)),
846
+ async publish(resolution, request) {
847
+ await base.sessions.seed(resolution.auth);
848
+ const scope = box();
849
+ scope.committed = {
850
+ request,
851
+ resolution
852
+ };
853
+ scope.generation += 1;
854
+ },
855
+ signedOut: (userId) => {
856
+ invalidateAll([sessionTag(userId)]);
857
+ forget(userId);
858
+ }
859
+ });
709
860
  const next = extendServer(withAccounts, {
710
861
  session,
711
862
  getRequestSession,
@@ -971,19 +1122,8 @@ function createNext(betterSupabase, options = {}) {
971
1122
  error: stopped.error
972
1123
  };
973
1124
  },
974
- async signIn(credentials, signInOptions = {}) {
975
- const request = await incomingRequest();
976
- return signInWithPassword(credentials, signInOptions, {
977
- env: base.env,
978
- auth: options.auth,
979
- request,
980
- jar: await cookies(),
981
- seed: async (accessToken) => {
982
- const verified = await base.resolve(bearerRequest(accessToken));
983
- await base.sessions.seed(verified.auth);
984
- }
985
- });
986
- },
1125
+ ...flows,
1126
+ signInWithPassword: (credentials, signInOptions) => flows.signIn(credentials, signInOptions),
987
1127
  cacheTag(table, id, tagOptions = {}) {
988
1128
  cacheTag(...tableTags(table, tagOptions), ...id === void 0 ? [] : [tagFor(table, id)]);
989
1129
  },
@@ -1,4 +1,4 @@
1
- import { n as RouteGuardOptions } from "../refusal-D_tklIEb.js";
1
+ import { n as RouteGuardOptions } from "../refusal-B0VmlAxF.js";
2
2
  import { i as toWebHeaders, r as applyWebHeaders, t as NodeHeaderTarget } from "../node-headers-BPtMP4_V.js";
3
- import { _ as toNodeHandler, a as FastifyReplyLike, b as toWebRequest, c as KoaMiddleware, d as guard, f as koaGuard, g as toKoa, h as toFastify, i as FastifyHook, l as ToNodeOptions, m as toExpress, n as ExpressMiddleware, o as FastifyRequestLike, p as problemErrorHandler, r as ExpressResponse, s as KoaContextLike, t as ExpressErrorHandler, u as fastifyGuard, v as WebRequestOptions, y as sendWebResponse } from "../index-D1ckLbUM.js";
3
+ import { _ as toNodeHandler, a as FastifyReplyLike, b as toWebRequest, c as KoaMiddleware, d as guard, f as koaGuard, g as toKoa, h as toFastify, i as FastifyHook, l as ToNodeOptions, m as toExpress, n as ExpressMiddleware, o as FastifyRequestLike, p as problemErrorHandler, r as ExpressResponse, s as KoaContextLike, t as ExpressErrorHandler, u as fastifyGuard, v as WebRequestOptions, y as sendWebResponse } from "../index-pZn6S_iq.js";
4
4
  export { ExpressErrorHandler, ExpressMiddleware, ExpressResponse, FastifyHook, FastifyReplyLike, FastifyRequestLike, KoaContextLike, KoaMiddleware, type NodeHeaderTarget, type RouteGuardOptions, ToNodeOptions, type WebRequestOptions, applyWebHeaders, fastifyGuard, guard, koaGuard, problemErrorHandler, sendWebResponse, toExpress, toFastify, toKoa, toNodeHandler, toWebHeaders, toWebRequest };
@@ -1,4 +1,4 @@
1
- import { r as AuthorizationOperation } from "./authorization-BCG1v0iC.js";
1
+ import { r as AuthorizationOperation } from "./authorization-CDU9tYA_.js";
2
2
  //#region src/core/operations.d.ts
3
3
  /** Operations by name, as `authorization.operations` or a module's own defaults. */
4
4
  type OperationTable = Readonly<Record<string, AuthorizationOperation>>;
@@ -9,7 +9,8 @@ const calendarSqlOptions = blockOptions({
9
9
  recurrence: option.string({ default: "inline" }),
10
10
  rdates: option.boolean({ default: false }),
11
11
  attendeeKey: option.string({ default: "email" }),
12
- calendarDetails: option.boolean({ default: false })
12
+ calendarDetails: option.boolean({ default: false }),
13
+ ruleDialect: option.unknown()
13
14
  });
14
15
  //#endregion
15
16
  export { calendarSqlOptions as t };
@@ -1,15 +1,15 @@
1
1
  import { b as DbError, f as Result } from "../result-DZeA5KS6.js";
2
- import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
3
- import { r as AuthState } from "../resolve-Bj1qD7Dy.js";
2
+ import { O as AnyFunctions, k as AnyModels } from "../types-CPl9uJ0G.js";
3
+ import { r as AuthState } from "../resolve-CtX6T0c0.js";
4
4
  import { i as ProblemDetails } from "../problem-DNwN8iGz.js";
5
- import { t as BetterSupabase } from "../define-BLP6XtoL.js";
6
- import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-BlDiY-ya.js";
7
- import { i as MiddlewareOptions, r as GuardOptions } from "../respond-BzRG-0qc.js";
8
- import { c as ResourceLoaderContext, i as AuthorizeOptions } from "../kit-Dxx3MT8m.js";
5
+ import { t as BetterSupabase } from "../define-D8_9X5fZ.js";
6
+ import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-BkTIxW_H.js";
7
+ import { i as MiddlewareOptions, r as GuardOptions } from "../respond-Dzu_-EPH.js";
8
+ import { c as ResourceLoaderContext, i as AuthorizeOptions } from "../kit-B8yWCRN7.js";
9
9
  import { t as Validated } from "../shared-CRRfQAKG.js";
10
- import { a as ResourceHandler } from "../resource-types-D5WEvYtV.js";
10
+ import { a as ResourceHandler } from "../resource-types-BVbHgTPg.js";
11
11
  import { i as RouteRateLimitRule, n as RateLimitVerdict, r as RateLimiter, t as RateLimitRouteOptions } from "../rate-limit-Bztf32cl.js";
12
- import { t as Api } from "../api-B1OkIWdx.js";
12
+ import { t as Api } from "../api-59rv5hL6.js";
13
13
  import { AnyEntry, Contributions } from "@supabase/middleware";
14
14
  import { AnySchema, BuilderWithMiddlewares, DecoratedMiddleware, DecoratedProcedure, MetaPlugin, ORPCError, Schema } from "@orpc/server";
15
15
  //#region src/orpc/router.d.ts
@@ -1,5 +1,5 @@
1
- import { Mt as Plugin } from "../types-DFdg_4yN.js";
2
- import { o as EventHub } from "../events-Cc9DDQWH.js";
1
+ import { Mt as Plugin } from "../types-CPl9uJ0G.js";
2
+ import { o as EventHub } from "../events-B2qbZps6.js";
3
3
  import { t as SPEC_PINS } from "../spec-pins-BZkKfwY8.js";
4
4
  import { Attributes, Meter, Tracer } from "@opentelemetry/api";
5
5
  //#region src/otel/index.d.ts
@@ -40,9 +40,9 @@ function systemOf(executor) {
40
40
  * ```
41
41
  */
42
42
  function otel(options = {}) {
43
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.28.0");
43
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.30.0");
44
44
  let histogram;
45
- if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.28.0")).createHistogram("db.client.operation.duration", {
45
+ if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.30.0")).createHistogram("db.client.operation.duration", {
46
46
  unit: "s",
47
47
  description: "Duration of database client operations.",
48
48
  advice: { explicitBucketBoundaries: [
@@ -219,7 +219,7 @@ function otel(options = {}) {
219
219
  * `betterSupabase.events`. Returns a function that stops listening.
220
220
  */
221
221
  function traceAuth(betterSupabase, options = {}) {
222
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.28.0");
222
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.30.0");
223
223
  const offAuth = betterSupabase.events.on("auth", (event) => {
224
224
  const span = tracer.startSpan("auth.resolve", {
225
225
  kind: SpanKind.INTERNAL,
@@ -257,7 +257,7 @@ function traceAuth(betterSupabase, options = {}) {
257
257
  * an error status. Returns a function that stops listening.
258
258
  */
259
259
  function traceBlockEvents(betterSupabase, options = {}) {
260
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.28.0");
260
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.30.0");
261
261
  return betterSupabase.events.on("block", (event) => {
262
262
  const attributes = {
263
263
  ...options.attributes,
@@ -1,11 +1,11 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { b as DbError, t as AsyncResult } from "./result-DZeA5KS6.js";
3
3
  import { n as Logger } from "./logger-DWVYUmwi.js";
4
- import { i as CursorPageOptions, n as BlockOptions } from "./block-helpers-CRpAHrp_.js";
5
- import { n as BlockHooks } from "./block-hooks-DZN2w69m.js";
4
+ import { i as CursorPageOptions, n as BlockOptions } from "./block-helpers-D5emQ2O6.js";
5
+ import { n as BlockHooks } from "./block-hooks-B8itxzEE.js";
6
6
  import { t as BlockProblemOptions } from "./problem-DNwN8iGz.js";
7
- import { i as EventSink, t as CloudEvent } from "./cloud-event-DcJwder2.js";
8
- import { g as SubscriberPolicy, i as AuthorizationHooks } from "./authorization-hooks-DtzreCAq.js";
7
+ import { i as EventSink, t as CloudEvent } from "./cloud-event-0pQ9vFNS.js";
8
+ import { g as SubscriberPolicy, i as AuthorizationHooks } from "./authorization-hooks-BWhkMZfH.js";
9
9
  //#region src/blocks/outbox/outbox.d.ts
10
10
  /** One row of the outbox, as `outbox_claim` and `outbox_history` return it. */
11
11
  interface OutboxEvent {
@@ -1,7 +1,7 @@
1
- import { Bt as Executor } from "./types-DFdg_4yN.js";
2
- import { o as EventHub } from "./events-Cc9DDQWH.js";
1
+ import { Bt as Executor } from "./types-CPl9uJ0G.js";
2
+ import { o as EventHub } from "./events-B2qbZps6.js";
3
3
  import { n as Logger } from "./logger-DWVYUmwi.js";
4
- import { n as SqlClient } from "./executor-hGjrop3A.js";
4
+ import { n as SqlClient } from "./executor-DXQIx4sW.js";
5
5
  //#region src/postgres/pool.d.ts
6
6
  /** The part of a `pg` pool client `createPostgres` uses. */
7
7
  interface PgPoolClient {
@@ -1,5 +1,5 @@
1
1
  import { t as AsyncResult } from "./result-DZeA5KS6.js";
2
- import { n as TopicPort } from "./watch-topic-1zIAtiNM.js";
2
+ import { n as TopicPort } from "./watch-topic-ItO3dz8m.js";
3
3
  import { SupabaseClient } from "@supabase/supabase-js";
4
4
  //#region src/client/ports.d.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { E as RawDbError } from "../result-DZeA5KS6.js";
2
- import { m as Operation } from "../types-DFdg_4yN.js";
3
- import { n as SqlClient, r as postgresExecutor, t as PostgresExecutorOptions } from "../executor-hGjrop3A.js";
4
- import { a as PostgresTimeouts, c as createPostgres, i as PostgresOptions, n as PgPool, o as SessionOptions, r as PgPoolClient, s as SqlClaims, t as BetterPostgres } from "../pool-wjbAMqc1.js";
5
- import { t as Compiler } from "../compiler-D3UmE7ao.js";
2
+ import { m as Operation } from "../types-CPl9uJ0G.js";
3
+ import { n as SqlClient, r as postgresExecutor, t as PostgresExecutorOptions } from "../executor-DXQIx4sW.js";
4
+ import { a as PostgresTimeouts, c as createPostgres, i as PostgresOptions, n as PgPool, o as SessionOptions, r as PgPoolClient, s as SqlClaims, t as BetterPostgres } from "../pool-DDR1ndk7.js";
5
+ import { t as Compiler } from "../compiler-BEeVWXPS.js";
6
6
  //#region src/postgres/pg-error.d.ts
7
7
  /** Node-postgres error fields to the shape `mapDbError` reads. */
8
8
  export declare function fromPgError(error: unknown): RawDbError | undefined;