better-supabase 0.10.0 → 0.12.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 (853) hide show
  1. package/README.md +1 -0
  2. package/dist/{access-sql-DUSSMaC3.js → access-sql-CTJPHjCL.js} +1 -1
  3. package/dist/{actor-KHDOKGb1.js → actor-CAL8mMih.js} +1 -1
  4. package/dist/{adapter-rmWaLNe3.js → adapter-CRNH2aX_.js} +390 -267
  5. package/dist/{agents-ByYUSZxT.d.ts → agents-CGP2AQge.d.ts} +7 -7
  6. package/dist/{ai-cache-CkxtAt4P.d.ts → ai-cache-BdeJKlrV.d.ts} +5 -5
  7. package/dist/{ai-cache-DPiuJ-zJ.js → ai-cache-CLninP-F.js} +2 -2
  8. package/dist/{ai-chat-al8b3spK.d.ts → ai-chat-D-2MH1sU.d.ts} +7 -7
  9. package/dist/{ai-files-BXtV3ygd.js → ai-files-ChFDkMLN.js} +18 -10
  10. package/dist/ai-sdk/agents/index.d.ts +6 -6
  11. package/dist/ai-sdk/agents/index.js +2 -2
  12. package/dist/ai-sdk/batches/index.d.ts +4 -4
  13. package/dist/ai-sdk/batches/index.js +4 -4
  14. package/dist/ai-sdk/cache/index.d.ts +2 -2
  15. package/dist/ai-sdk/cache/index.js +1 -1
  16. package/dist/ai-sdk/chat/index.d.ts +1 -1
  17. package/dist/ai-sdk/chat/index.js +5 -5
  18. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  19. package/dist/ai-sdk/files/index.d.ts +2 -2
  20. package/dist/ai-sdk/files/index.js +4 -4
  21. package/dist/ai-sdk/index.d.ts +6 -6
  22. package/dist/ai-sdk/index.js +2 -2
  23. package/dist/ai-sdk/mcp/index.d.ts +4 -4
  24. package/dist/ai-sdk/mcp/index.js +4 -4
  25. package/dist/ai-sdk/memory/index.d.ts +3 -3
  26. package/dist/ai-sdk/workflow/index.d.ts +4 -4
  27. package/dist/ai-sdk/workflow/index.js +6 -6
  28. package/dist/{ai-tasks-Di0gmJOX.d.ts → ai-tasks-ZvPnNudQ.d.ts} +8 -8
  29. package/dist/{announcements-HF7LuFw5.js → announcements-BNxTW5HJ.js} +4 -4
  30. package/dist/{api-CFjuYKFY.js → api-C43_FYDp.js} +1 -1
  31. package/dist/{api-XJcQON_7.d.ts → api-DoWK3dTw.d.ts} +6 -6
  32. package/dist/{api-keys-EdSNjGIZ.d.ts → api-keys-AgDXbcql.d.ts} +7 -7
  33. package/dist/{api-keys-C1IZF7p8.js → api-keys-BSXwI2jF.js} +6 -6
  34. package/dist/{app-tables-DVidEHOI.d.ts → app-tables-BrMBjyuq.d.ts} +1 -1
  35. package/dist/{approvals-DqlPHBHI.d.ts → approvals-CyX709B-.d.ts} +7 -7
  36. package/dist/arazzo/index.d.ts +2 -2
  37. package/dist/arazzo/index.js +2 -2
  38. package/dist/{assistant-BZyhQ8bd.d.ts → assistant-DZsHsYIx.d.ts} +4 -4
  39. package/dist/astro/index.d.ts +12 -12
  40. package/dist/astro/index.js +5 -5
  41. package/dist/asyncapi/index.d.ts +1 -1
  42. package/dist/asyncapi/index.js +2 -2
  43. package/dist/{attachments-C8FEBBKE.js → attachments-CK8D8bIV.js} +14 -8
  44. package/dist/{audit-log-CRgiHlRh.js → audit-log-ovUlF4Mk.js} +7 -7
  45. package/dist/auth-module-DbZv2WrR.js +10 -0
  46. package/dist/{auth-reply-B_dW4jHJ.js → auth-reply-Daq72lY4.js} +2 -2
  47. package/dist/{authorization-CdJRoZgV.d.ts → authorization-ClWBcXJi.d.ts} +23 -2
  48. package/dist/{authorization-hooks-Do5djkpz.d.ts → authorization-hooks-WDQMKIsc.d.ts} +2 -2
  49. package/dist/{authorizer-dVVN05Un.js → authorizer-B3yyCVUF.js} +2 -2
  50. package/dist/{base64-BmeCBgGo.js → base64-D4aqdnDR.js} +4 -4
  51. package/dist/better-result/index.d.ts +5 -5
  52. package/dist/better-result/index.js +1 -1
  53. package/dist/{bind-DkaP_0iS.d.ts → bind-Bfo40o63.d.ts} +4 -4
  54. package/dist/{block-fields-BANwJ9Y_.js → block-fields-Bv1hV855.js} +3 -3
  55. package/dist/{block-fields-5UA84ZUg.d.ts → block-fields-DnaDbgZS.d.ts} +2 -2
  56. package/dist/{block-helpers-7pMBVsE6.d.ts → block-helpers-CjcQM1yA.d.ts} +2 -2
  57. package/dist/{block-helpers-BfVCR5Fc.js → block-helpers-DkVZNDrj.js} +4 -4
  58. package/dist/{block-hooks-ByKlh8Qy.js → block-hooks-C22vuIUd.js} +3 -3
  59. package/dist/{block-hooks-C_WaodoA.d.ts → block-hooks-DcPJHztl.d.ts} +3 -3
  60. package/dist/{block-transport-NbUJygA7.d.ts → block-transport-DezJPPA0.d.ts} +2 -2
  61. package/dist/{block-transport-G4t1umrR.js → block-transport-J7ZepTq2.js} +1 -1
  62. package/dist/blocks/access-requests/index.d.ts +8 -8
  63. package/dist/blocks/access-requests/index.js +6 -6
  64. package/dist/blocks/agents/index.d.ts +4 -4
  65. package/dist/blocks/agents/index.js +5 -5
  66. package/dist/blocks/ai-cache/index.d.ts +3 -3
  67. package/dist/blocks/ai-cache/index.js +2 -2
  68. package/dist/blocks/ai-chat/index.d.ts +5 -5
  69. package/dist/blocks/ai-chat/index.js +2 -2
  70. package/dist/blocks/ai-chat/react/index.d.ts +2 -2
  71. package/dist/blocks/ai-chat/react/index.js +2 -2
  72. package/dist/blocks/ai-chat/solid/index.d.ts +2 -2
  73. package/dist/blocks/ai-chat/solid/index.js +1 -1
  74. package/dist/blocks/ai-chat/svelte/index.d.ts +2 -2
  75. package/dist/blocks/ai-chat/svelte/index.js +1 -1
  76. package/dist/blocks/ai-chat/vue/index.d.ts +2 -2
  77. package/dist/blocks/ai-chat/vue/index.js +1 -1
  78. package/dist/blocks/ai-files/index.d.ts +5 -5
  79. package/dist/blocks/ai-files/index.js +2 -2
  80. package/dist/blocks/ai-providers/index.d.ts +4 -4
  81. package/dist/blocks/ai-providers/index.js +7 -7
  82. package/dist/blocks/ai-tasks/index.d.ts +3 -3
  83. package/dist/blocks/ai-tasks/index.js +7 -7
  84. package/dist/blocks/announcements/index.d.ts +4 -4
  85. package/dist/blocks/announcements/index.js +2 -2
  86. package/dist/blocks/announcements/react/index.d.ts +1 -1
  87. package/dist/blocks/announcements/react/index.js +2 -2
  88. package/dist/blocks/announcements/solid/index.d.ts +2 -2
  89. package/dist/blocks/announcements/svelte/index.d.ts +2 -2
  90. package/dist/blocks/announcements/vue/index.d.ts +2 -2
  91. package/dist/blocks/api-keys/index.d.ts +7 -7
  92. package/dist/blocks/api-keys/index.js +5 -5
  93. package/dist/blocks/api-keys/react/index.d.ts +1 -1
  94. package/dist/blocks/api-keys/react/index.js +3 -3
  95. package/dist/blocks/api-keys/react/server.d.ts +1 -1
  96. package/dist/blocks/api-keys/solid/index.d.ts +2 -2
  97. package/dist/blocks/api-keys/solid/index.js +1 -1
  98. package/dist/blocks/api-keys/svelte/index.d.ts +2 -2
  99. package/dist/blocks/api-keys/svelte/index.js +1 -1
  100. package/dist/blocks/api-keys/vue/index.d.ts +2 -2
  101. package/dist/blocks/api-keys/vue/index.js +1 -1
  102. package/dist/blocks/approvals/index.d.ts +4 -4
  103. package/dist/blocks/approvals/index.js +6 -6
  104. package/dist/blocks/attachments/index.d.ts +4 -4
  105. package/dist/blocks/attachments/index.js +2 -2
  106. package/dist/blocks/audit/index.d.ts +6 -6
  107. package/dist/blocks/audit/index.js +6 -6
  108. package/dist/blocks/audit/react/index.d.ts +1 -1
  109. package/dist/blocks/audit/react/index.js +2 -2
  110. package/dist/blocks/audit/react/server.d.ts +1 -1
  111. package/dist/blocks/audit/solid/index.d.ts +2 -2
  112. package/dist/blocks/audit/svelte/index.d.ts +2 -2
  113. package/dist/blocks/audit/vue/index.d.ts +2 -2
  114. package/dist/blocks/billing/index.d.ts +26 -10
  115. package/dist/blocks/billing/index.js +43 -10
  116. package/dist/blocks/billing/react/index.d.ts +2 -2
  117. package/dist/blocks/billing/react/index.js +1 -1
  118. package/dist/blocks/billing/react/server.d.ts +1 -1
  119. package/dist/blocks/billing/solid/index.d.ts +2 -2
  120. package/dist/blocks/billing/solid/index.js +1 -1
  121. package/dist/blocks/billing/svelte/index.d.ts +2 -2
  122. package/dist/blocks/billing/svelte/index.js +1 -1
  123. package/dist/blocks/billing/vue/index.d.ts +2 -2
  124. package/dist/blocks/billing/vue/index.js +1 -1
  125. package/dist/blocks/bookings/index.d.ts +3 -3
  126. package/dist/blocks/bookings/index.js +2 -2
  127. package/dist/blocks/bookings/react/index.d.ts +1 -1
  128. package/dist/blocks/bookings/react/index.js +3 -3
  129. package/dist/blocks/bookings/solid/index.d.ts +2 -2
  130. package/dist/blocks/bookings/solid/index.js +1 -1
  131. package/dist/blocks/bookings/svelte/index.d.ts +2 -2
  132. package/dist/blocks/bookings/svelte/index.js +1 -1
  133. package/dist/blocks/bookings/vue/index.d.ts +2 -2
  134. package/dist/blocks/bookings/vue/index.js +1 -1
  135. package/dist/blocks/bulk/index.d.ts +5 -5
  136. package/dist/blocks/bulk/index.js +3 -3
  137. package/dist/blocks/calendar/index.d.ts +3 -3
  138. package/dist/blocks/calendar/index.js +2 -2
  139. package/dist/blocks/calendar/react/index.d.ts +1 -1
  140. package/dist/blocks/calendar/react/index.js +3 -3
  141. package/dist/blocks/calendar/solid/index.d.ts +2 -2
  142. package/dist/blocks/calendar/solid/index.js +1 -1
  143. package/dist/blocks/calendar/svelte/index.d.ts +2 -2
  144. package/dist/blocks/calendar/svelte/index.js +1 -1
  145. package/dist/blocks/calendar/vue/index.d.ts +2 -2
  146. package/dist/blocks/calendar/vue/index.js +1 -1
  147. package/dist/blocks/catalog/index.d.ts +10 -10
  148. package/dist/blocks/catalog/index.js +8 -8
  149. package/dist/blocks/collections/index.d.ts +10 -10
  150. package/dist/blocks/collections/index.js +6 -6
  151. package/dist/blocks/comments/index.d.ts +4 -4
  152. package/dist/blocks/comments/index.js +3 -3
  153. package/dist/blocks/comments/react/index.d.ts +1 -1
  154. package/dist/blocks/comments/react/index.js +3 -3
  155. package/dist/blocks/comments/react/server.d.ts +1 -1
  156. package/dist/blocks/comments/solid/index.d.ts +2 -2
  157. package/dist/blocks/comments/solid/index.js +1 -1
  158. package/dist/blocks/comments/svelte/index.d.ts +2 -2
  159. package/dist/blocks/comments/svelte/index.js +1 -1
  160. package/dist/blocks/comments/vue/index.d.ts +2 -2
  161. package/dist/blocks/comments/vue/index.js +1 -1
  162. package/dist/blocks/connectors/index.d.ts +4 -4
  163. package/dist/blocks/connectors/index.js +7 -7
  164. package/dist/blocks/custom-fields/index.d.ts +6 -6
  165. package/dist/blocks/custom-fields/index.js +4 -4
  166. package/dist/blocks/data-lifecycle/index.d.ts +9 -9
  167. package/dist/blocks/data-lifecycle/index.js +7 -7
  168. package/dist/blocks/deals/index.d.ts +9 -9
  169. package/dist/blocks/deals/index.js +9 -9
  170. package/dist/blocks/documents/index.d.ts +4 -4
  171. package/dist/blocks/documents/index.js +4 -4
  172. package/dist/blocks/domains/index.d.ts +7 -7
  173. package/dist/blocks/domains/index.js +6 -6
  174. package/dist/blocks/drive/index.d.ts +9 -10
  175. package/dist/blocks/drive/index.js +20 -11
  176. package/dist/blocks/employees/index.d.ts +9 -9
  177. package/dist/blocks/employees/index.js +8 -8
  178. package/dist/blocks/engagements/index.d.ts +9 -9
  179. package/dist/blocks/engagements/index.js +5 -5
  180. package/dist/blocks/entitlements/index.d.ts +7 -7
  181. package/dist/blocks/entitlements/index.js +2 -2
  182. package/dist/blocks/entitlements/react/index.d.ts +2 -2
  183. package/dist/blocks/entitlements/solid/index.d.ts +2 -2
  184. package/dist/blocks/entitlements/svelte/index.d.ts +2 -2
  185. package/dist/blocks/entitlements/vue/index.d.ts +2 -2
  186. package/dist/blocks/flags/index.d.ts +8 -8
  187. package/dist/blocks/flags/index.js +6 -6
  188. package/dist/blocks/forms/index.d.ts +9 -9
  189. package/dist/blocks/forms/index.js +5 -5
  190. package/dist/blocks/forms/react/index.d.ts +1 -1
  191. package/dist/blocks/forms/solid/index.d.ts +2 -2
  192. package/dist/blocks/forms/svelte/index.d.ts +2 -2
  193. package/dist/blocks/forms/vue/index.d.ts +2 -2
  194. package/dist/blocks/hiring/index.d.ts +9 -9
  195. package/dist/blocks/hiring/index.js +6 -6
  196. package/dist/blocks/identities/index.d.ts +6 -6
  197. package/dist/blocks/identities/index.js +3 -3
  198. package/dist/blocks/imports/index.d.ts +6 -6
  199. package/dist/blocks/imports/index.js +3 -3
  200. package/dist/blocks/inbox/index.d.ts +5 -5
  201. package/dist/blocks/inbox/index.js +3 -3
  202. package/dist/blocks/inbox/react/index.d.ts +2 -2
  203. package/dist/blocks/inbox/react/server.d.ts +2 -2
  204. package/dist/blocks/inbox/solid/index.d.ts +2 -2
  205. package/dist/blocks/inbox/svelte/index.d.ts +2 -2
  206. package/dist/blocks/inbox/vue/index.d.ts +2 -2
  207. package/dist/blocks/index.d.ts +8 -8
  208. package/dist/blocks/index.js +3 -3
  209. package/dist/blocks/inventory/index.d.ts +9 -9
  210. package/dist/blocks/inventory/index.js +6 -6
  211. package/dist/blocks/invoices/index.d.ts +9 -9
  212. package/dist/blocks/invoices/index.js +8 -8
  213. package/dist/blocks/jobs/index.d.ts +61 -11
  214. package/dist/blocks/jobs/index.js +126 -13
  215. package/dist/blocks/knowledge/index.d.ts +3 -3
  216. package/dist/blocks/knowledge/index.js +2 -2
  217. package/dist/blocks/leave/index.d.ts +8 -8
  218. package/dist/blocks/leave/index.js +5 -5
  219. package/dist/blocks/memory/index.d.ts +4 -4
  220. package/dist/blocks/memory/index.js +6 -6
  221. package/dist/blocks/metrics/index.d.ts +7 -7
  222. package/dist/blocks/metrics/index.js +5 -5
  223. package/dist/blocks/mfa/index.d.ts +2 -2
  224. package/dist/blocks/mfa/index.js +1 -1
  225. package/dist/blocks/mfa/react/index.d.ts +1 -1
  226. package/dist/blocks/mfa/react/index.js +1 -1
  227. package/dist/blocks/mfa/react/server.d.ts +1 -1
  228. package/dist/blocks/mfa/react/server.js +1 -1
  229. package/dist/blocks/mfa/solid/index.d.ts +2 -2
  230. package/dist/blocks/mfa/solid/index.js +1 -1
  231. package/dist/blocks/mfa/svelte/index.d.ts +2 -2
  232. package/dist/blocks/mfa/svelte/index.js +1 -1
  233. package/dist/blocks/mfa/vue/index.d.ts +2 -2
  234. package/dist/blocks/mfa/vue/index.js +1 -1
  235. package/dist/blocks/notifications/index.d.ts +13 -13
  236. package/dist/blocks/notifications/index.js +11 -11
  237. package/dist/blocks/notifications/react/index.d.ts +1 -1
  238. package/dist/blocks/notifications/react/server.d.ts +1 -1
  239. package/dist/blocks/notifications/solid/index.d.ts +2 -2
  240. package/dist/blocks/notifications/svelte/index.d.ts +2 -2
  241. package/dist/blocks/notifications/vue/index.d.ts +2 -2
  242. package/dist/blocks/number-sequences/index.d.ts +5 -5
  243. package/dist/blocks/number-sequences/index.js +2 -2
  244. package/dist/blocks/oauth-server/index.d.ts +28 -8
  245. package/dist/blocks/oauth-server/index.js +24 -15
  246. package/dist/blocks/onboarding/index.d.ts +3 -3
  247. package/dist/blocks/onboarding/index.js +2 -2
  248. package/dist/blocks/onboarding/react/index.d.ts +1 -1
  249. package/dist/blocks/onboarding/react/index.js +2 -2
  250. package/dist/blocks/onboarding/react/server.d.ts +1 -1
  251. package/dist/blocks/onboarding/solid/index.d.ts +2 -2
  252. package/dist/blocks/onboarding/svelte/index.d.ts +2 -2
  253. package/dist/blocks/onboarding/vue/index.d.ts +2 -2
  254. package/dist/blocks/orders/index.d.ts +12 -12
  255. package/dist/blocks/orders/index.js +10 -10
  256. package/dist/blocks/organizations/index.d.ts +5 -5
  257. package/dist/blocks/organizations/index.js +4 -4
  258. package/dist/blocks/organizations/react/index.d.ts +1 -1
  259. package/dist/blocks/organizations/react/index.js +3 -3
  260. package/dist/blocks/organizations/react/server.d.ts +1 -1
  261. package/dist/blocks/organizations/solid/index.d.ts +2 -2
  262. package/dist/blocks/organizations/solid/index.js +1 -1
  263. package/dist/blocks/organizations/svelte/index.d.ts +2 -2
  264. package/dist/blocks/organizations/svelte/index.js +1 -1
  265. package/dist/blocks/organizations/vue/index.d.ts +2 -2
  266. package/dist/blocks/organizations/vue/index.js +1 -1
  267. package/dist/blocks/outbox/index.d.ts +4 -4
  268. package/dist/blocks/outbox/index.js +5 -5
  269. package/dist/blocks/parties/index.d.ts +9 -9
  270. package/dist/blocks/parties/index.js +4 -4
  271. package/dist/blocks/pipelines/index.d.ts +10 -10
  272. package/dist/blocks/pipelines/index.js +7 -7
  273. package/dist/blocks/profiles/index.d.ts +7 -7
  274. package/dist/blocks/profiles/index.js +5 -5
  275. package/dist/blocks/promotions/index.d.ts +9 -9
  276. package/dist/blocks/promotions/index.js +7 -7
  277. package/dist/blocks/push/index.d.ts +9 -9
  278. package/dist/blocks/push/index.js +4 -4
  279. package/dist/blocks/quotes/index.d.ts +9 -9
  280. package/dist/blocks/quotes/index.js +8 -8
  281. package/dist/blocks/rank/index.d.ts +6 -6
  282. package/dist/blocks/rank/index.js +3 -3
  283. package/dist/blocks/reactions/index.d.ts +4 -4
  284. package/dist/blocks/reactions/index.js +2 -2
  285. package/dist/blocks/reactions/react/index.d.ts +1 -1
  286. package/dist/blocks/reactions/react/index.js +2 -2
  287. package/dist/blocks/reactions/solid/index.d.ts +2 -2
  288. package/dist/blocks/reactions/solid/index.js +1 -1
  289. package/dist/blocks/reactions/svelte/index.d.ts +2 -2
  290. package/dist/blocks/reactions/svelte/index.js +1 -1
  291. package/dist/blocks/reactions/vue/index.d.ts +2 -2
  292. package/dist/blocks/reactions/vue/index.js +1 -1
  293. package/dist/blocks/relations/index.d.ts +8 -8
  294. package/dist/blocks/relations/index.js +4 -4
  295. package/dist/blocks/reminders/index.d.ts +10 -10
  296. package/dist/blocks/reminders/index.js +8 -8
  297. package/dist/blocks/reviews/index.d.ts +8 -8
  298. package/dist/blocks/reviews/index.js +5 -5
  299. package/dist/blocks/rules/index.d.ts +9 -9
  300. package/dist/blocks/rules/index.js +5 -5
  301. package/dist/blocks/rules/react/index.d.ts +2 -2
  302. package/dist/blocks/rules/react/index.js +2 -2
  303. package/dist/blocks/rules/solid/index.d.ts +2 -2
  304. package/dist/blocks/rules/svelte/index.d.ts +2 -2
  305. package/dist/blocks/rules/vue/index.d.ts +2 -2
  306. package/dist/blocks/saved-views/index.d.ts +3 -3
  307. package/dist/blocks/saved-views/index.js +1 -1
  308. package/dist/blocks/saved-views/react/index.d.ts +1 -1
  309. package/dist/blocks/saved-views/react/index.js +1 -1
  310. package/dist/blocks/saved-views/react/server.d.ts +1 -1
  311. package/dist/blocks/saved-views/solid/index.d.ts +2 -2
  312. package/dist/blocks/saved-views/solid/index.js +1 -1
  313. package/dist/blocks/saved-views/svelte/index.d.ts +2 -2
  314. package/dist/blocks/saved-views/svelte/index.js +1 -1
  315. package/dist/blocks/saved-views/vue/index.d.ts +2 -2
  316. package/dist/blocks/saved-views/vue/index.js +1 -1
  317. package/dist/blocks/search/index.d.ts +4 -4
  318. package/dist/blocks/search/index.js +3 -3
  319. package/dist/blocks/search/react/index.d.ts +1 -1
  320. package/dist/blocks/search/react/index.js +2 -2
  321. package/dist/blocks/search/react/server.d.ts +1 -1
  322. package/dist/blocks/search/solid/index.d.ts +2 -2
  323. package/dist/blocks/search/svelte/index.d.ts +2 -2
  324. package/dist/blocks/search/vue/index.d.ts +2 -2
  325. package/dist/blocks/service-principals/index.d.ts +8 -8
  326. package/dist/blocks/service-principals/index.js +6 -6
  327. package/dist/blocks/sessions/index.d.ts +2 -2
  328. package/dist/blocks/sessions/index.js +1 -1
  329. package/dist/blocks/sessions/react/index.d.ts +1 -1
  330. package/dist/blocks/sessions/react/index.js +1 -1
  331. package/dist/blocks/sessions/react/server.d.ts +1 -1
  332. package/dist/blocks/sessions/solid/index.d.ts +2 -2
  333. package/dist/blocks/sessions/solid/index.js +1 -1
  334. package/dist/blocks/sessions/svelte/index.d.ts +2 -2
  335. package/dist/blocks/sessions/svelte/index.js +1 -1
  336. package/dist/blocks/sessions/vue/index.d.ts +2 -2
  337. package/dist/blocks/sessions/vue/index.js +1 -1
  338. package/dist/blocks/settings/index.d.ts +4 -4
  339. package/dist/blocks/settings/index.js +3 -3
  340. package/dist/blocks/settings/react/index.d.ts +1 -1
  341. package/dist/blocks/settings/react/index.js +3 -3
  342. package/dist/blocks/settings/react/server.d.ts +1 -1
  343. package/dist/blocks/settings/solid/index.d.ts +2 -2
  344. package/dist/blocks/settings/solid/index.js +1 -1
  345. package/dist/blocks/settings/svelte/index.d.ts +2 -2
  346. package/dist/blocks/settings/svelte/index.js +1 -1
  347. package/dist/blocks/settings/vue/index.d.ts +2 -2
  348. package/dist/blocks/settings/vue/index.js +1 -1
  349. package/dist/blocks/share-links/index.d.ts +7 -7
  350. package/dist/blocks/share-links/index.js +3 -3
  351. package/dist/blocks/shared-signals/index.d.ts +8 -8
  352. package/dist/blocks/shared-signals/index.js +7 -7
  353. package/dist/blocks/signing-keys/index.d.ts +5 -5
  354. package/dist/blocks/signing-keys/index.js +47 -21
  355. package/dist/blocks/sla/index.d.ts +9 -9
  356. package/dist/blocks/sla/index.js +5 -5
  357. package/dist/blocks/sso/index.d.ts +7 -7
  358. package/dist/blocks/sso/index.js +4 -4
  359. package/dist/blocks/state-machine/index.d.ts +5 -5
  360. package/dist/blocks/state-machine/index.js +2 -2
  361. package/dist/blocks/tags/index.d.ts +3 -3
  362. package/dist/blocks/tags/index.js +2 -2
  363. package/dist/blocks/tags/react/index.d.ts +1 -1
  364. package/dist/blocks/tags/react/index.js +3 -3
  365. package/dist/blocks/tags/react/server.d.ts +1 -1
  366. package/dist/blocks/tags/solid/index.d.ts +2 -2
  367. package/dist/blocks/tags/solid/index.js +1 -1
  368. package/dist/blocks/tags/svelte/index.d.ts +2 -2
  369. package/dist/blocks/tags/svelte/index.js +1 -1
  370. package/dist/blocks/tags/vue/index.d.ts +2 -2
  371. package/dist/blocks/tags/vue/index.js +1 -1
  372. package/dist/blocks/targets/index.d.ts +7 -7
  373. package/dist/blocks/targets/index.js +5 -5
  374. package/dist/blocks/teams/index.d.ts +7 -7
  375. package/dist/blocks/teams/index.js +3 -3
  376. package/dist/blocks/templates/index.d.ts +10 -10
  377. package/dist/blocks/templates/index.js +7 -7
  378. package/dist/blocks/time-tracking/index.d.ts +9 -9
  379. package/dist/blocks/time-tracking/index.js +7 -7
  380. package/dist/blocks/trash/index.d.ts +8 -8
  381. package/dist/blocks/trash/index.js +4 -4
  382. package/dist/blocks/undo/index.d.ts +4 -4
  383. package/dist/blocks/undo/index.js +2 -2
  384. package/dist/blocks/undo/react/index.d.ts +1 -1
  385. package/dist/blocks/undo/react/server.d.ts +1 -1
  386. package/dist/blocks/undo/solid/index.d.ts +2 -2
  387. package/dist/blocks/undo/svelte/index.d.ts +2 -2
  388. package/dist/blocks/undo/vue/index.d.ts +2 -2
  389. package/dist/blocks/usage/index.d.ts +4 -4
  390. package/dist/blocks/usage/index.js +2 -2
  391. package/dist/blocks/usage/react/index.d.ts +1 -1
  392. package/dist/blocks/usage/react/index.js +2 -2
  393. package/dist/blocks/usage/react/server.d.ts +1 -1
  394. package/dist/blocks/usage/solid/index.d.ts +2 -2
  395. package/dist/blocks/usage/svelte/index.d.ts +2 -2
  396. package/dist/blocks/usage/vue/index.d.ts +2 -2
  397. package/dist/blocks/vercel-marketplace/index.d.ts +193 -0
  398. package/dist/blocks/vercel-marketplace/index.js +300 -0
  399. package/dist/blocks/versions/index.d.ts +8 -8
  400. package/dist/blocks/versions/index.js +4 -4
  401. package/dist/blocks/waitlist/index.d.ts +9 -9
  402. package/dist/blocks/waitlist/index.js +5 -5
  403. package/dist/blocks/webhooks/index.d.ts +16 -16
  404. package/dist/blocks/webhooks/index.js +15 -15
  405. package/dist/blocks/work-items/index.d.ts +9 -9
  406. package/dist/blocks/work-items/index.js +6 -6
  407. package/dist/blocks/workflow-builder/index.d.ts +8 -8
  408. package/dist/blocks/workflow-builder/index.js +2 -2
  409. package/dist/blocks/workflow-builder/react/index.d.ts +2 -2
  410. package/dist/blocks/workflow-builder/react/index.js +3 -3
  411. package/dist/blocks/workflow-builder/solid/index.d.ts +2 -2
  412. package/dist/blocks/workflow-builder/svelte/index.d.ts +2 -2
  413. package/dist/blocks/workflow-builder/vue/index.d.ts +2 -2
  414. package/dist/blocks/workflows/index.d.ts +5 -5
  415. package/dist/blocks/workflows/index.js +2 -2
  416. package/dist/blocks/workflows/react/index.d.ts +2 -2
  417. package/dist/blocks/workflows/react/index.js +2 -2
  418. package/dist/blocks/workflows/solid/index.d.ts +2 -2
  419. package/dist/blocks/workflows/svelte/index.d.ts +2 -2
  420. package/dist/blocks/workflows/vue/index.d.ts +2 -2
  421. package/dist/{bookings-EJAVAuVz.js → bookings-DQ7P888X.js} +5 -5
  422. package/dist/{storage-api-B4Ib2Zpo.d.ts → bucket-BbePDVwc.d.ts} +235 -219
  423. package/dist/{build-6jmaPAgx.js → build-C-D_vn0U.js} +7 -2
  424. package/dist/{build-Cm0T5MVG.js → build-CT6SPZkI.js} +1 -1
  425. package/dist/{calendar-1J1E5dLq.js → calendar-eqyuQAoy.js} +7 -7
  426. package/dist/chat-sdk/index.d.ts +6 -6
  427. package/dist/chat-sdk/index.js +3 -3
  428. package/dist/chat-sdk/react/index.d.ts +2 -2
  429. package/dist/chat-sdk/react/server.d.ts +2 -2
  430. package/dist/cli/{add-BhI_nXAo.js → add-BcOHumvq.js} +2 -2
  431. package/dist/cli/add-DnAyR9w_.js +1 -0
  432. package/dist/cli/{add-CUS0AiBh.js → add-TT72pQk6.js} +5 -5
  433. package/dist/cli/adopt-BuS-DC7_.js +1 -0
  434. package/dist/cli/{adopt-DwcU6CJd.js → adopt-mbB1bcIG.js} +6 -6
  435. package/dist/cli/{apply-DBXC0Z5I.js → apply-CiBFOFGw.js} +16 -22
  436. package/dist/cli/bin.js +1 -1
  437. package/dist/cli/{blocks-B15ltTFn.js → blocks-5-JGzwXX.js} +1 -1
  438. package/dist/cli/{blocks-BXeqIzWN.js → blocks-DeLQOlUK.js} +1 -1
  439. package/dist/cli/{cache-CPBYJAkb.js → cache-DQwgb3rg.js} +8 -3
  440. package/dist/cli/{catalog-Di15TkM2.js → catalog-Cm6BtquM.js} +2 -1
  441. package/dist/cli/{codemod-CrI33UR2.js → codemod-BzAMX4el.js} +2 -2
  442. package/dist/cli/{command-D_HI1mp1.js → command-dfdVhU_2.js} +39 -1
  443. package/dist/cli/{completion-Vry-Wjw8.js → completion-4lLjtI49.js} +1 -1
  444. package/dist/cli/{completion-En43UcyJ.js → completion-D4InNrxw.js} +2 -2
  445. package/dist/cli/{completion-DzYo025z.js → completion-zsp5s0zI.js} +2 -2
  446. package/dist/cli/{config-DsqQr5z3.js → config-CCyweX7Y.js} +1 -1
  447. package/dist/cli/{config-DyJgo2d9.js → config-DI6ielsx.js} +1 -1
  448. package/dist/cli/{config-Bi_UBxXl.js → config-yZ55rsKZ.js} +17 -5
  449. package/dist/cli/db-TRymMyAW.js +90 -0
  450. package/dist/cli/{design-edit-B-WsnhUF.js → design-edit-0U9iCTiS.js} +29 -2
  451. package/dist/cli/{detect-BeLVeNpA.js → detect-DQsVeBHg.js} +1 -1
  452. package/dist/cli/{doctor-wACp5w6N.js → doctor-DOfy6kjt.js} +332 -108
  453. package/dist/cli/{emit-j0zZ6NE_.js → emit-56LAG_Px.js} +11 -5
  454. package/dist/cli/{env-Ch99nTQw.js → env-B7TWPEt0.js} +1 -1
  455. package/dist/cli/{env-Cf5OTqbK.js → env-C8R7Nf0a.js} +2 -1
  456. package/dist/cli/env-Cmu99uKR.js +1 -0
  457. package/dist/cli/{env-2v9JrxSr.js → env-Dh5K5t2U.js} +33 -32
  458. package/dist/cli/{gen-BhquLu7l.js → gen-D3sC5jDn.js} +11 -11
  459. package/dist/cli/index.d.ts +3 -1
  460. package/dist/cli/index.js +10 -9
  461. package/dist/cli/{init-BwLTO6XG.js → init-DNomoycJ.js} +16 -22
  462. package/dist/cli/{introspect-B-gXAIqs.js → introspect-kYX06Q2g.js} +3 -3
  463. package/dist/cli/{keys-hwtdwdkT.js → keys-B8dIJwwi.js} +2 -2
  464. package/dist/cli/{live-BFfYoE0_.js → live-CkV3d3yp.js} +2 -2
  465. package/dist/cli/{mcp-Bdm2oGmL.js → mcp-DrxB2Wuw.js} +4 -4
  466. package/dist/cli/{metadata-DikbSOE0.js → metadata-BGkle6WM.js} +2 -2
  467. package/dist/cli/{migration-safety-LaGVPPuD.js → migration-safety-DjVpz2D6.js} +1 -1
  468. package/dist/cli/{module-migration-CLkZ8jpw.js → module-migration-CPhuiY8C.js} +1 -1
  469. package/dist/cli/{moved-B7UFO_OM.js → moved-BMQu1YNY.js} +1 -1
  470. package/dist/cli/{parse-CwV5a6dA.js → parse-QzDvMpXH.js} +1 -1
  471. package/dist/cli/{preset-DQ1DxMtI.js → preset-CfIs24cc.js} +1 -1
  472. package/dist/cli/run-Bck-p0MI.js +63 -0
  473. package/dist/cli/{run-DliGNdjI.js → run-BhJKAanr.js} +26 -5
  474. package/dist/cli/{run-BLJj7SuM.js → run-DRZ10srj.js} +52 -43
  475. package/dist/cli/{scaffold-6bv24GSP.js → scaffold-DoURlDEI.js} +3 -3
  476. package/dist/cli/{scaffold-DUz5fa-k.js → scaffold-mzy3OsN5.js} +1 -1
  477. package/dist/cli/seed-C5q4UUIL.js +1 -0
  478. package/dist/cli/{seed-CIJaL1Ao.js → seed-CIdg6s7m.js} +6 -5
  479. package/dist/cli/{shared-CNcvDOLt.js → shared-DKLuA1Tp.js} +2 -2
  480. package/dist/cli/{skills-CaxIQhzW.js → skills-D3zwIlGA.js} +1 -1
  481. package/dist/cli/{snapshot-Dvcx0BSl.js → snapshot-BBKFojqM.js} +4 -4
  482. package/dist/cli/{source-args-BNhagtpw.js → source-args-Cwo7zwvq.js} +8 -2
  483. package/dist/cli/{spec-DRDaIq8f.js → spec-DOgQUZwM.js} +1 -1
  484. package/dist/cli/{spec-BewE6r6J.js → spec-DZeIP9ta.js} +3 -3
  485. package/dist/cli/{sql-BCQt5TDs.js → sql-CL_Lbhwl.js} +2 -2
  486. package/dist/cli/{sql-BBkchli4.js → sql-DLOvvnBV.js} +5 -5
  487. package/dist/cli/stack-env-_uWWNHWq.js +87 -0
  488. package/dist/cli/{stack-status-LeEoCtV1.js → stack-status-_NUgd-g5.js} +43 -3
  489. package/dist/cli/{supabase-toml-DjLgBYEo.js → supabase-toml-BC5sNVKU.js} +1 -1
  490. package/dist/cli/{sync-CJ-ft-tl.js → sync-DBvknfOK.js} +2 -2
  491. package/dist/cli/{version-D1wM9DNb.js → version-B7akdvDv.js} +1 -1
  492. package/dist/cli/{write-Dp1XlAVM.js → write-VZljwoTB.js} +2 -2
  493. package/dist/client/index.d.ts +6 -6
  494. package/dist/client/index.js +4 -4
  495. package/dist/client/native/index.d.ts +6 -6
  496. package/dist/client/native/index.js +4 -4
  497. package/dist/{client-ByGlM0YF.d.ts → client-BAOZuBhz.d.ts} +4 -4
  498. package/dist/{client-fpvgtQKE.js → client-BDO6i2Oe.js} +2 -2
  499. package/dist/{client-Dk8gY9hi.d.ts → client-BJN0IMEp.d.ts} +2 -2
  500. package/dist/{client-Fi8CoJcs.d.ts → client-BMcjLG0V.d.ts} +13 -13
  501. package/dist/{client-B5nnqDmz.d.ts → client-BN_fXOs7.d.ts} +2 -2
  502. package/dist/{client-CpMv4-v5.d.ts → client-BONsuFYf.d.ts} +4 -4
  503. package/dist/{client-Diu2lPbg.d.ts → client-BPn9XhAM.d.ts} +7 -7
  504. package/dist/{client-B0rvMvA8.d.ts → client-BtC-r4hE.d.ts} +3 -3
  505. package/dist/{client-Cgxj38RS.d.ts → client-BuneNd-C.d.ts} +9 -9
  506. package/dist/{client-D0502FgY.js → client-CFKONrrU.js} +4 -4
  507. package/dist/{client-CvITjt-9.js → client-CHR8IBNG.js} +10 -2
  508. package/dist/{client-B9H4BZJh.d.ts → client-CHwNV8Kz.d.ts} +12 -12
  509. package/dist/{client-kKdkLGPB.d.ts → client-CLQHsa-2.d.ts} +2 -2
  510. package/dist/{client-C3dLIsJv.d.ts → client-CMxxwT3N.d.ts} +9 -9
  511. package/dist/{client-C597NIlL.d.ts → client-CU7aNN_B.d.ts} +8 -8
  512. package/dist/{client-DZXFDaQE.d.ts → client-CYEdJKjk.d.ts} +6 -6
  513. package/dist/{client-LVa6yC9u.d.ts → client-CYhSGlCN.d.ts} +5 -5
  514. package/dist/{client-CWs3X4g1.js → client-C_-NZRrg.js} +1 -1
  515. package/dist/{client-kI6vCKVI.js → client-CcPxbHeT.js} +2 -2
  516. package/dist/{client-AxwF58Eo.js → client-CosiUrUb.js} +1 -1
  517. package/dist/{client-CsRpAyIv.d.ts → client-D3gRTNSi.d.ts} +2 -2
  518. package/dist/{client-D727oIVC.js → client-D7T7OLiw.js} +4 -4
  519. package/dist/{client-9zIKhf5D.d.ts → client-DB34f_7i.d.ts} +3 -3
  520. package/dist/{client-CjyTNdt1.d.ts → client-DCawyopp.d.ts} +5 -5
  521. package/dist/{client-BtBkVSk2.d.ts → client-Dqa4XyJ5.d.ts} +7 -7
  522. package/dist/{client-BLKpcAs0.d.ts → client-Dr5h2r9r.d.ts} +3 -3
  523. package/dist/{client-BO9fQgBB.d.ts → client-DrTqKgvy.d.ts} +4 -4
  524. package/dist/{client-13Ii0c0P.js → client-DyfWYU8S.js} +2 -2
  525. package/dist/{client-iB5axfa0.js → client-Dz1jWDA2.js} +3 -3
  526. package/dist/{client-jvtwGFy4.js → client-DzTtOVRR.js} +2 -2
  527. package/dist/{client-B_r4denm.d.ts → client-GCCRI9ge.d.ts} +3 -3
  528. package/dist/{client-DR_YEGnc.d.ts → client-P6v3h7vh.d.ts} +2 -2
  529. package/dist/{client-D9zBl9PT.d.ts → client-P8l8ncxV.d.ts} +7 -7
  530. package/dist/{client-CFeWXNXy.js → client-UnM3e32l.js} +2 -2
  531. package/dist/{client-DG7FwgZD.js → client-arq4daO_.js} +1 -1
  532. package/dist/{client-CmHsfDHU.js → client-eCDPjOMo.js} +6 -6
  533. package/dist/{client-rp7YfOg1.js → client-iaFm0aVf.js} +1 -1
  534. package/dist/{client-WXJwUhr1.d.ts → client-kWg4OqIr.d.ts} +5 -5
  535. package/dist/{client-B7LCXnnY.d.ts → client-tvG258_1.d.ts} +6 -6
  536. package/dist/{client-BaynD5V-.d.ts → client-wKmX-f3r.d.ts} +7 -7
  537. package/dist/{cloud-event-bwsBwVNG.d.ts → cloud-event-DXkNoI6v.d.ts} +1 -1
  538. package/dist/{codecs-C7E_OoiC.js → codecs-D-rpDifG.js} +3 -3
  539. package/dist/{codecs-Bm46sVxr.d.ts → codecs-RwFNK8Jh.d.ts} +2 -2
  540. package/dist/{codegen-2m4SKVdi.d.ts → codegen-C64C0NZG.d.ts} +13 -2
  541. package/dist/{comments-N7Bi-oTW.js → comments-CV5O8q50.js} +5 -5
  542. package/dist/commerce/index.d.ts +2 -2
  543. package/dist/commerce/index.js +6 -6
  544. package/dist/{compiler-C6E3WwIi.d.ts → compiler-D_Gjpw_O.d.ts} +2 -2
  545. package/dist/{compose-CO_cljl3.js → compose-CP0ss-cQ.js} +3 -3
  546. package/dist/{composite-CPV0thLs.js → composite-1kPAxXto.js} +3 -3
  547. package/dist/{composite-DMMA_Whg.d.ts → composite-DzvBL5nb.d.ts} +13 -13
  548. package/dist/config/index.d.ts +4 -4
  549. package/dist/config/index.js +2 -2
  550. package/dist/{config-C4RQDF6t.js → config-DHhQmmuD.js} +22 -1
  551. package/dist/{config-CkyahUjo.js → config-NQmw_wsk.js} +1 -1
  552. package/dist/{connector-Cp8CqssJ.d.ts → connector-D9NMNkv0.d.ts} +1 -1
  553. package/dist/{connectors-CZdfZcIg.d.ts → connectors-BwPNt-ZG.d.ts} +7 -7
  554. package/dist/{context-BDDgjoxz.js → context-BiwgsycK.js} +1 -1
  555. package/dist/{context-CCfX2szU.d.ts → context-Cv3KlxWY.d.ts} +2 -2
  556. package/dist/{controller-CCb9tHw_.d.ts → controller-BZhiIb-N.d.ts} +1 -1
  557. package/dist/cors-h_v7TPxl.js +24 -0
  558. package/dist/cors-kLq6VM06.d.ts +15 -0
  559. package/dist/create/index.d.ts +25 -3
  560. package/dist/create/index.js +1002 -915
  561. package/dist/create/supabase/index.d.ts +1 -1
  562. package/dist/credentials/index.d.ts +5 -5
  563. package/dist/credentials/index.js +8 -8
  564. package/dist/{cron-CUaKTjWC.js → cron-BHdXZFsJ.js} +1 -1
  565. package/dist/{cron-route-BsgbJ-g4.js → cron-route-mTvWhork.js} +3 -3
  566. package/dist/{define-CMcokcZz.js → define-Bu1v781m.js} +82 -16
  567. package/dist/{define-DXTC706J.d.ts → define-DYZnvAbs.d.ts} +96 -43
  568. package/dist/{define-block-BlHQxDIQ.d.ts → define-block-BHxLHLys.d.ts} +7 -7
  569. package/dist/{delegation-Dt8hMJWu.js → delegation-B7uNnz6z.js} +2 -2
  570. package/dist/{documents-BYM2viS0.d.ts → documents-CqtVr2fg.d.ts} +4 -4
  571. package/dist/edge/index.d.ts +27 -38
  572. package/dist/edge/index.js +12 -32
  573. package/dist/elysia/index.d.ts +1 -1
  574. package/dist/elysia/index.js +1 -1
  575. package/dist/{embeddings-Da0w4A_0.d.ts → embeddings-CKhygw4C.d.ts} +1 -1
  576. package/dist/{ended-EcTtzzQJ.d.ts → ended-De6H52nX.d.ts} +2 -2
  577. package/dist/{entitlements-AmYp2KHX.js → entitlements-C8UvF1Rz.js} +3 -3
  578. package/dist/{entitlements-Bn7BTnbg.d.ts → entitlements-CtBGXb3B.d.ts} +2 -2
  579. package/dist/{envelope--7d0Q3Se.js → envelope-C4Z55LKW.js} +4 -4
  580. package/dist/{errors-8i6tSICm.js → errors-BV1SKTVs.js} +15 -1
  581. package/dist/{errors-7MqM7bbV.js → errors-D3BR8iUk.js} +2 -2
  582. package/dist/{escape-like-AUEPn-C5.d.ts → escape-like-B339PlP-.d.ts} +1 -1
  583. package/dist/eve/index.d.ts +5 -5
  584. package/dist/eve/index.js +2 -2
  585. package/dist/{eve-BcEr_hPo.d.ts → eve-B6ru2Bt4.d.ts} +2 -2
  586. package/dist/events/index.d.ts +3 -3
  587. package/dist/{events-CtAHxPal.d.ts → events-P3raDX2E.d.ts} +3 -3
  588. package/dist/{executor-CHRwEYqt.d.ts → executor-BWgJNbGh.d.ts} +1 -1
  589. package/dist/{executor-Cex-1PFp.js → executor-BiB0wMBA.js} +4 -4
  590. package/dist/{executor-BicyP8Nl.d.ts → executor-BnMC0lj3.d.ts} +2 -2
  591. package/dist/{executor-CIxyatuB.d.ts → executor-CvsNcQsa.d.ts} +3 -3
  592. package/dist/{executor-aKUo_Xyb.js → executor-CxGQiQN_.js} +3 -3
  593. package/dist/{executor-DzJQVTE2.d.ts → executor-D1hECPGG.d.ts} +1 -1
  594. package/dist/expo/index.d.ts +11 -9
  595. package/dist/expo/index.js +42 -7
  596. package/dist/expo-sqlite/index.d.ts +3 -3
  597. package/dist/expo-sqlite/index.js +2 -2
  598. package/dist/{field-errors-nFnYWvB0.d.ts → field-errors-Z-sgsdoN.d.ts} +7 -7
  599. package/dist/{filter-evaluate-CEm52E5s.d.ts → filter-evaluate-BJcaL3o1.d.ts} +1 -1
  600. package/dist/{filter-query-D3wOD1P_.d.ts → filter-query-Bc_Qa8V_.d.ts} +1 -1
  601. package/dist/{flags-Dz5PIzFU.d.ts → flags-6KK6Vqkr.d.ts} +3 -3
  602. package/dist/{flags-CtSrkVuW.js → flags-aUR7Rod6.js} +1 -1
  603. package/dist/flags-sdk/index.d.ts +1 -1
  604. package/dist/flags-sdk/index.js +2 -2
  605. package/dist/{framework-C2oL4OaO.d.ts → framework-BQhTsLX-.d.ts} +7 -7
  606. package/dist/{framework-Cfm0IspZ.js → framework-C6PKBgme.js} +2 -2
  607. package/dist/{function-contract-B4c0XuTU.d.ts → function-contract-DWqFl_QO.d.ts} +1 -1
  608. package/dist/{gateway-CJL6ZG17.d.ts → gateway-Bq_tWwxE.d.ts} +4 -4
  609. package/dist/h3/index.d.ts +1 -1
  610. package/dist/h3/index.js +1 -1
  611. package/dist/h3/v1/index.d.ts +1 -1
  612. package/dist/h3/v1/index.js +1 -1
  613. package/dist/{hmac-DCud0myt.js → hmac-BgpThYQW.js} +2 -1
  614. package/dist/hono/index.d.ts +34 -25
  615. package/dist/hono/index.js +18 -12
  616. package/dist/{http-BF-V0CUF.js → http-C7trc6uN.js} +2 -2
  617. package/dist/{impersonation-CDeCzZP6.js → impersonation-DxU6yHJV.js} +1 -1
  618. package/dist/{inbox-BaUJgHOF.d.ts → inbox-Du5aPwKB.d.ts} +4 -4
  619. package/dist/{index-DTQbC3CW.d.ts → index-1Vsg-7YV.d.ts} +1 -1
  620. package/dist/{index-8xwnaWHY.d.ts → index-BJLPQr2s.d.ts} +38 -5
  621. package/dist/{index-DL8z_oDo.d.ts → index-BpyBH5O2.d.ts} +4 -4
  622. package/dist/{index-Ck4oK5vV.d.ts → index-C-_fs7EI.d.ts} +8 -8
  623. package/dist/{index-BurdFUXr.d.ts → index-CXFf-c-j.d.ts} +7 -7
  624. package/dist/{index-MCXVzkXs.d.ts → index-Cm2-g_4H.d.ts} +5 -5
  625. package/dist/{index-DcijDfh1.d.ts → index-DTQSeHx2.d.ts} +4 -4
  626. package/dist/{index-D1kMyNc7.d.ts → index-Hc4tetmB.d.ts} +2 -2
  627. package/dist/{index-gXy3R1Uq.d.ts → index-QWTq2o31.d.ts} +1 -1
  628. package/dist/{index-Cckxs8IE.d.ts → index-XcTBR4Gb.d.ts} +3 -3
  629. package/dist/{index-DMONTkSf.d.ts → index-k-rrfG1g.d.ts} +2 -2
  630. package/dist/{index-Co0YsJTk.d.ts → index-wTnPJUhv.d.ts} +2 -2
  631. package/dist/index.d.ts +13 -13
  632. package/dist/index.js +10 -10
  633. package/dist/jwks-cache-C4rA69hD.js +49 -0
  634. package/dist/{jws-milwSg7E.js → jws-CwBB5QAT.js} +5 -3
  635. package/dist/{kit-BlcEFQql.d.ts → kit-De-EVRhw.d.ts} +4 -4
  636. package/dist/{kit-gqwkVhGU.js → kit-LTbHrWWD.js} +6 -6
  637. package/dist/{knowledge-BYtgA52P.d.ts → knowledge-B5zdpDD-.d.ts} +6 -6
  638. package/dist/{knowledge-CSNKLX-s.js → knowledge-BbdXOJvY.js} +4 -4
  639. package/dist/lint/index.d.ts +1 -1
  640. package/dist/lint/index.js +47 -2
  641. package/dist/list/index.d.ts +3 -3
  642. package/dist/{list-query-DWJIiVz_.d.ts → list-query-aXr2WkGA.d.ts} +5 -5
  643. package/dist/mcp/index.d.ts +21 -21
  644. package/dist/mcp/index.js +10 -10
  645. package/dist/mcp/sdk/index.d.ts +17 -17
  646. package/dist/mcp/sdk/index.js +5 -5
  647. package/dist/{messages-Cx4ttLJJ.js → messages-D5nIfCCf.js} +2 -2
  648. package/dist/{mfa-DtflCXEt.d.ts → mfa-YzkRjNad.d.ts} +1 -1
  649. package/dist/{model-messages-CTu-6kBu.js → model-messages-CIdqdUtk.js} +1 -1
  650. package/dist/{money-codec-DCGgzO26.js → money-codec-C21MWw50.js} +2 -2
  651. package/dist/nestjs/index.d.ts +2 -2
  652. package/dist/nestjs/index.js +1 -1
  653. package/dist/next/index.d.ts +34 -29
  654. package/dist/next/index.js +14 -14
  655. package/dist/node/index.d.ts +2 -2
  656. package/dist/node/index.js +1 -1
  657. package/dist/{onboarding-viTTNWUp.js → onboarding-Du6kCmhF.js} +2 -2
  658. package/dist/openapi/index.d.ts +2 -2
  659. package/dist/openapi/index.js +2 -2
  660. package/dist/{operations-BtuQRwTJ.d.ts → operations-DQCWqkt3.d.ts} +1 -1
  661. package/dist/{options-CZk_fbbg.js → options-BCrqe3HH.js} +2 -1
  662. package/dist/options-CEMawFrr.js +5 -0
  663. package/dist/options-RKYdmIdV.js +5 -0
  664. package/dist/{options-CbSOj53r.d.ts → options-ZQzNKKBS.d.ts} +1 -1
  665. package/dist/{organizations-Bxrm32IG.js → organizations-CO2qg44D.js} +6 -6
  666. package/dist/orpc/index.d.ts +18 -18
  667. package/dist/orpc/index.js +7 -7
  668. package/dist/otel/index.d.ts +2 -2
  669. package/dist/otel/index.js +5 -5
  670. package/dist/{outbox-BCGHl9X6.d.ts → outbox-B1hZ7PPY.d.ts} +6 -6
  671. package/dist/{payments-h45bswA-.js → payments-CzjCdIcz.js} +1 -1
  672. package/dist/{plugin-D5OIaP93.d.ts → plugin-D-95Q0w0.d.ts} +3 -3
  673. package/dist/plugins/actor/index.d.ts +1 -1
  674. package/dist/plugins/actor/index.js +1 -1
  675. package/dist/plugins/rules/index.d.ts +2 -2
  676. package/dist/plugins/rules/index.js +1 -1
  677. package/dist/plugins/soft-delete/index.d.ts +3 -3
  678. package/dist/plugins/soft-delete/index.js +2 -2
  679. package/dist/plugins/tenant/index.d.ts +2 -2
  680. package/dist/plugins/tenant/index.js +2 -2
  681. package/dist/plugins/timestamps/index.d.ts +1 -1
  682. package/dist/plugins/timestamps/index.js +1 -1
  683. package/dist/plugins/validation/index.d.ts +2 -2
  684. package/dist/plugins/validation/index.js +3 -3
  685. package/dist/{pool-BBi4mot3.d.ts → pool-cM3rpOQr.d.ts} +3 -3
  686. package/dist/{pool-errors-C94tPR_G.js → pool-errors-CGqvTQOC.js} +2 -2
  687. package/dist/{ports-Dcnuo3HT.d.ts → ports-BCDIbC_U.d.ts} +2 -2
  688. package/dist/{ports-B53rB7zg.d.ts → ports-P0A5wo_-.d.ts} +11 -11
  689. package/dist/{ports-Bcdppx0G.js → ports-aALjot-D.js} +11 -7
  690. package/dist/postgres/index.d.ts +5 -5
  691. package/dist/postgres/index.js +3 -3
  692. package/dist/{postgrest-D6fEMsp4.d.ts → postgrest-CjnO1hbr.d.ts} +1 -1
  693. package/dist/powersync/index.d.ts +4 -4
  694. package/dist/powersync/index.js +4 -4
  695. package/dist/powersync/react/index.d.ts +3 -3
  696. package/dist/powersync/react/index.js +1 -1
  697. package/dist/preset/index.d.ts +4 -4
  698. package/dist/preset/index.js +3 -3
  699. package/dist/{preset-BBrL6_Ln.js → preset-Cf0T9GRt.js} +49 -6
  700. package/dist/{problem-CEjyhV5T.d.ts → problem-DCDIQiTA.d.ts} +1 -1
  701. package/dist/{problem-pIiL3WbE.js → problem-JRCohp1j.js} +1 -1
  702. package/dist/{provider-DKh2xFZb.js → provider-C-Ti38J6.js} +1 -1
  703. package/dist/{provider-CQ1SrhLa.d.ts → provider-DXgx5oSA.d.ts} +2 -2
  704. package/dist/{push-token-CDMgWT13.d.ts → push-token-y1Gnz5bQ.d.ts} +1 -1
  705. package/dist/query/index.d.ts +2 -2
  706. package/dist/{rank-result-Dngpt2n5.d.ts → rank-result-BcYfDA0x.d.ts} +1 -1
  707. package/dist/{rank-result-oUF1DYBm.js → rank-result-DtQuIvob.js} +2 -2
  708. package/dist/{rate-limit-BtbddDnE.js → rate-limit-DVZ7qIzW.js} +1 -1
  709. package/dist/{rate-limit-ByfWNX9N.js → rate-limit-I3AncmM8.js} +8 -8
  710. package/dist/{rate-limit-C88MEAOm.d.ts → rate-limit-c6c1mB6R.d.ts} +2 -2
  711. package/dist/react/index.d.ts +8 -8
  712. package/dist/react/index.js +2 -2
  713. package/dist/react/native/index.d.ts +1 -1
  714. package/dist/react/native/index.js +1 -1
  715. package/dist/react/server.d.ts +9 -9
  716. package/dist/react/server.js +2 -2
  717. package/dist/react/session.d.ts +2 -2
  718. package/dist/{react-BcKACxsj.js → react-DzukE6Wp.js} +3 -3
  719. package/dist/react-router/index.d.ts +11 -11
  720. package/dist/react-router/index.js +6 -6
  721. package/dist/{read-set-PWiJfv6S.js → read-set-DeesfeL_.js} +2 -2
  722. package/dist/realtime/index.d.ts +6 -6
  723. package/dist/realtime/index.js +2 -2
  724. package/dist/{refusal-Bdr1k47u.d.ts → refusal-C7geIBRl.d.ts} +1 -1
  725. package/dist/{refusal-Ch-u9dVd.js → refusal-CFpfmjcS.js} +4 -4
  726. package/dist/{resolve-CAR9oaKW.js → resolve-AtncaPTU.js} +17 -9
  727. package/dist/{resolve-7atr-wWr.d.ts → resolve-Ceft-18-.d.ts} +9 -5
  728. package/dist/{resource-CHGOmg1O.js → resource-Bdkqi8jo.js} +6 -6
  729. package/dist/{resource-DxcgtHq6.d.ts → resource-DYEtc-KN.d.ts} +1 -1
  730. package/dist/{resource-execute-C45ICrN9.d.ts → resource-execute-Bxvgmx-n.d.ts} +2 -2
  731. package/dist/{resource-types-CC59gMHE.d.ts → resource-types-LW1i5-h3.d.ts} +6 -6
  732. package/dist/{resources-B7htXQeg.js → resources-Ck7itNeX.js} +3 -3
  733. package/dist/{resources-B71O7EVQ.d.ts → resources-D3_FAz_H.d.ts} +2 -2
  734. package/dist/{respond-Cdg5ibH5.d.ts → respond-BSL36dQp.d.ts} +3 -3
  735. package/dist/{respond-Dpx48ATq.js → respond-Bhp3G__q.js} +5 -5
  736. package/dist/{result-Cj3yWhjH.d.ts → result-BREt7qOh.d.ts} +15 -1
  737. package/dist/{result-COkvI9t5.js → result-DIeYscA3.js} +1 -1
  738. package/dist/{rrule-zBh3CA1r.js → rrule-Cw4x4Pf_.js} +1 -1
  739. package/dist/{rules-4of_Fq-6.js → rules-BiQgmZ_U.js} +4 -4
  740. package/dist/{sales-lines-CymdiwYd.js → sales-lines-CQ1iC6QM.js} +3 -3
  741. package/dist/{sales-shared-DjCuN8xG.js → sales-shared-CDSytDEn.js} +2 -2
  742. package/dist/{search-LbjCylX5.js → search-ZP13UTT4.js} +3 -3
  743. package/dist/server/index.d.ts +38 -30
  744. package/dist/server/index.js +19 -64
  745. package/dist/{server-types-fXwJoFjt.d.ts → server-types-fLdep4gb.d.ts} +50 -30
  746. package/dist/{session-Djo5t4KQ.d.ts → session-DObioXpX.d.ts} +11 -11
  747. package/dist/{settings-DxXfDUmh.js → settings-BiHDFglz.js} +5 -5
  748. package/dist/{shared-9B02lczf.js → shared-C9zvURqC.js} +1 -1
  749. package/dist/{shared-as0EG51f.js → shared-D5Djh43x.js} +1 -1
  750. package/dist/{sign-in-D0xN6E_l.js → sign-in-z2BaBdps.js} +10 -3
  751. package/dist/{signatures-BMdJ7neI.d.ts → signatures-BXlDXV3D.d.ts} +1 -1
  752. package/dist/{signatures-C9CGYZS1.js → signatures-CeIoAelK.js} +5 -5
  753. package/dist/{signers-BjSgNAXP.d.ts → signers-BwKV-9S6.d.ts} +6 -6
  754. package/dist/{signing-keys-Ccr86Y2C.d.ts → signing-keys-v2MRYkDF.d.ts} +20 -5
  755. package/dist/solid/index.d.ts +8 -8
  756. package/dist/solid/index.js +1 -1
  757. package/dist/{solid-controller-CZrt1Tg6.d.ts → solid-controller-CWotGxcG.d.ts} +1 -1
  758. package/dist/solid-start/index.d.ts +11 -11
  759. package/dist/solid-start/index.js +5 -5
  760. package/dist/spec/index.d.ts +3 -3
  761. package/dist/spec/index.js +3 -3
  762. package/dist/sql/index.d.ts +4 -4
  763. package/dist/sql/index.js +2 -2
  764. package/dist/{sql-BQshMgmB.js → sql-BPKRNutj.js} +3 -3
  765. package/dist/{sql-CgTZOQZ7.js → sql-CT1Jnwp8.js} +1919 -698
  766. package/dist/{sso-CwAnve68.js → sso-BaU_6ePE.js} +4 -4
  767. package/dist/{sso-B5ZoEsXE.d.ts → sso-Bu0mVh0V.d.ts} +4 -4
  768. package/dist/ssr/index.d.ts +4 -4
  769. package/dist/ssr/index.js +3 -3
  770. package/dist/{standard-DZmwmIhV.js → standard-B1BigegP.js} +2 -2
  771. package/dist/{standard-C3_AAF3g.d.ts → standard-BcUQuUgu.d.ts} +1 -1
  772. package/dist/{stats-CUhqw6Ev.js → stats-Di5VAsYU.js} +4 -4
  773. package/dist/storage/index.d.ts +3 -3
  774. package/dist/storage/index.js +17 -6
  775. package/dist/{store-B5qYKsTh.d.ts → store-B18bIvKc.d.ts} +1 -1
  776. package/dist/streams/index.d.ts +3 -3
  777. package/dist/streams/index.js +3 -3
  778. package/dist/streams/redis/index.d.ts +1 -1
  779. package/dist/streams/redis/index.js +2 -2
  780. package/dist/{subject-readers-81xiWh4M.d.ts → subject-readers-BUChuOxL.d.ts} +2 -2
  781. package/dist/{subject-readers-DDyPTIOr.js → subject-readers-BpwUFJtp.js} +1 -1
  782. package/dist/{support-BsqhV6jP.js → support-C2wPYwD7.js} +8 -8
  783. package/dist/{support-view-CznLe4jq.d.ts → support-view-Bj_lZ8Wr.d.ts} +1 -1
  784. package/dist/svelte/index.d.ts +7 -7
  785. package/dist/svelte/index.js +1 -1
  786. package/dist/{svelte-controller-DDbju9CW.d.ts → svelte-controller-sS4X66yL.d.ts} +1 -1
  787. package/dist/sveltekit/index.d.ts +13 -13
  788. package/dist/sveltekit/index.js +7 -7
  789. package/dist/{tags-DGldvcA4.js → tags-BqgaxCnv.js} +5 -5
  790. package/dist/{tags-7NHyD1P8.d.ts → tags-BrGopDVG.d.ts} +1 -1
  791. package/dist/tanstack-db/index.d.ts +2 -2
  792. package/dist/tanstack-db/supabase/index.d.ts +2 -2
  793. package/dist/tanstack-start/index.d.ts +11 -11
  794. package/dist/tanstack-start/index.js +5 -5
  795. package/dist/{tax-DDZUB_oc.d.ts → tax-DMWDUzKt.d.ts} +2 -2
  796. package/dist/{tax-DZDpMMRw.js → tax-wm9g2mD2.js} +2 -2
  797. package/dist/{tee-CdRV1tcj.js → tee-Cw-iJAWL.js} +1 -1
  798. package/dist/{template-DdgYjIZ5.js → template-Dw3dTmKe.js} +1 -1
  799. package/dist/{temporal-required-DqRzr7i0.js → temporal-required-nfZ87U-0.js} +1 -1
  800. package/dist/{tenant-DW_GmsW4.d.ts → tenant-DZMLVuyQ.d.ts} +2 -2
  801. package/dist/testing/index.d.ts +134 -60
  802. package/dist/testing/index.js +251 -120
  803. package/dist/{topic-Dgs-eSYQ.d.ts → topic-DAY_HOX2.d.ts} +20 -6
  804. package/dist/{topic-DB-1YTMj.js → topic-mee21pux.js} +85 -17
  805. package/dist/{types-C_GN-4ed.d.ts → types-BA1eTvy4.d.ts} +5 -5
  806. package/dist/{types-P1S1cj6N.d.ts → types-BEEFkNFY.d.ts} +7 -7
  807. package/dist/{types-DZj8CZMH.d.ts → types-Bels39_u.d.ts} +10 -10
  808. package/dist/{types-BO8lVTun.d.ts → types-BrpW5ixT.d.ts} +8 -1
  809. package/dist/{types-DM8q3IOr.d.ts → types-DOC7wnh6.d.ts} +17 -8
  810. package/dist/{types-DOaUIJxW.d.ts → types-D_2rClz-.d.ts} +5 -5
  811. package/dist/{undo-0qM13zul.js → undo-B5LgpGLy.js} +4 -4
  812. package/dist/{undo-D42sPjCf.d.ts → undo-BsdYRox7.d.ts} +3 -3
  813. package/dist/upload-claim-BBFCZbBF.js +33 -0
  814. package/dist/{usage-CnQHSM_r.d.ts → usage-C504GF55.d.ts} +23 -5
  815. package/dist/{usage-BrJGPvCq.js → usage-DdqT13_X.js} +14 -3
  816. package/dist/{vault-EnOQJWjn.d.ts → vault-ClkzMGTP.d.ts} +3 -3
  817. package/dist/vercel-connect/index.d.ts +1 -1
  818. package/dist/vercel-connect/index.js +2 -2
  819. package/dist/{verify-3NLjUIER.d.ts → verify-DU4p9-Ve.d.ts} +4 -4
  820. package/dist/{verify-C9D_jjsQ.js → verify-DnU-uWU2.js} +5 -5
  821. package/dist/{version-Bxj_xcUY.js → version-DSWxci83.js} +1 -1
  822. package/dist/{view-DZ63nqwt.js → view-CYX1wsgp.js} +3 -3
  823. package/dist/{view-SuASaomx.d.ts → view-KQhe6eNc.d.ts} +3 -3
  824. package/dist/vue/index.d.ts +8 -8
  825. package/dist/vue/index.js +1 -1
  826. package/dist/{vue-controller-D_ohttBZ.d.ts → vue-controller-BUo1oove.d.ts} +1 -1
  827. package/dist/{watch-D1wwzZ04.d.ts → watch-5btote1y.d.ts} +6 -6
  828. package/dist/{watch-Blj1mQ9n.js → watch-BAuIzC2r.js} +1 -1
  829. package/dist/{watch-topic-D-rpUg5n.d.ts → watch-topic-C79ZW5-R.d.ts} +1 -1
  830. package/dist/{wire-DEY0ajW9.js → wire-BCJxCtHS.js} +2 -2
  831. package/dist/{workflow-builder-C5DBN7yq.js → workflow-builder-CynLqc6H.js} +7 -7
  832. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  833. package/dist/workflow-sdk/builder/index.js +1 -1
  834. package/dist/workflow-sdk/index.d.ts +1 -1
  835. package/dist/workflow-sdk/index.js +1 -1
  836. package/dist/workflow-sdk/world/index.d.ts +1 -1
  837. package/dist/workflow-sdk/world/index.js +6 -6
  838. package/dist/{workflow-sdk-Di5pmCAu.d.ts → workflow-sdk-CWdCWj7M.d.ts} +3 -3
  839. package/dist/{workflow-sdk-vjDWlnfX.js → workflow-sdk-QnnzIQRc.js} +2 -2
  840. package/dist/{workflow-sdk-world-DPMdBfzn.js → workflow-sdk-world-QzcxaaCD.js} +1 -1
  841. package/dist/{workflows-DJXoxDZH.d.ts → workflows-DQBCzrHC.d.ts} +4 -4
  842. package/dist/{workflows-DzdX28KN.js → workflows-H9qJge3f.js} +5 -5
  843. package/dist/yjs/index.d.ts +3 -3
  844. package/dist/yjs/index.js +3 -3
  845. package/package.json +10 -1
  846. package/schemas/cli-commands-v1.json +15 -0
  847. package/schemas/config-v1.json +47 -3
  848. package/schemas/doctor-report-v1.json +4 -0
  849. package/schemas/snapshot-v2.json +4 -0
  850. package/dist/cli/add-ojbcMxyp.js +0 -1
  851. package/dist/cli/adopt-D0ASVx2G.js +0 -1
  852. package/dist/cli/env-DkBe35Rv.js +0 -1
  853. package/dist/cli/seed-ClGWseBT.js +0 -1
@@ -1,25 +1,28 @@
1
- import { a as list, p as commandMeta, r as defineCliCommand } from "./command-D_HI1mp1.js";
1
+ import { a as list, p as commandMeta, r as defineCliCommand } from "./command-dfdVhU_2.js";
2
2
  import { i as plain } from "./style-2JfIPVMQ.js";
3
- import { t as VERSION } from "./version-D1wM9DNb.js";
3
+ import { t as VERSION } from "./version-B7akdvDv.js";
4
4
  import { n as CliError, r as errorText } from "./errors-Caiz_0so.js";
5
5
  import { a as sameText, t as display } from "./io-BiPX-_J1.js";
6
- import { t as CACHE_DIR } from "./cache-CPBYJAkb.js";
6
+ import { t as CACHE_DIR } from "./cache-DQwgb3rg.js";
7
7
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
8
8
  import { h as satisfies, m as peerVersions, t as MetadataRejectedError } from "./typegen--TfvOPLh.js";
9
9
  import { t as isRecord } from "./guards-CUlDNYZs.js";
10
- import { c as configFor, s as notNullTag } from "./emit-j0zZ6NE_.js";
11
- import { _ as withoutStrings, a as METADATA_GAPS_TEXT, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$1, s as AUTHORIZATION_RULES, u as COMMANDS$1, v as advisorRule, x as renderFiles, y as splinterTables } from "./run-DliGNdjI.js";
12
- import { D as providerLabel, a as migrationModules, i as migrationHolds, r as latestMigration, t as MODULES_SUFFIX, v as migrationsDir, x as compiledReadSets, y as moduleLayoutFor } from "./module-migration-CLkZ8jpw.js";
13
- import { l as stdinDatabaseUrl } from "./config-Bi_UBxXl.js";
14
- import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-DjLgBYEo.js";
10
+ import { c as configFor, s as notNullTag } from "./emit-56LAG_Px.js";
11
+ import { _ as withoutStrings, a as METADATA_GAPS_TEXT, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$1, s as AUTHORIZATION_RULES, u as COMMANDS$1, v as advisorRule, x as renderFiles, y as splinterTables } from "./run-BhJKAanr.js";
12
+ import { D as providerLabel, a as migrationModules, i as migrationHolds, r as latestMigration, t as MODULES_SUFFIX, v as migrationsDir, x as compiledReadSets, y as moduleLayoutFor } from "./module-migration-CPhuiY8C.js";
13
+ import { l as stdinDatabaseUrl } from "./config-yZ55rsKZ.js";
14
+ import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-BC5sNVKU.js";
15
+ import { t as PROCESS_ENV } from "./env-C8R7Nf0a.js";
16
+ import { n as readStackStatus } from "./stack-status-_NUgd-g5.js";
15
17
  import { t as connect } from "./db-DT1bGB02.js";
16
- import { c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, p as request, r as openSource, s as liteDriverOf, t as loadSnapshot } from "./snapshot-Dvcx0BSl.js";
18
+ import { c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, p as request, r as openSource, s as liteDriverOf, t as loadSnapshot } from "./snapshot-BBKFojqM.js";
17
19
  import { n as applyPlan, o as insideRoot, r as changeLines } from "./files-DDvAwTko.js";
18
- import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-CNcvDOLt.js";
19
- import { t as MIGRATION_SAFETY_RULES } from "./migration-safety-LaGVPPuD.js";
20
- import { i as sourceFlags, n as SOURCE_ARGS } from "./source-args-BNhagtpw.js";
21
- import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-BFfYoE0_.js";
22
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-DikbSOE0.js";
20
+ import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-DKLuA1Tp.js";
21
+ import { t as MIGRATION_SAFETY_RULES } from "./migration-safety-DjVpz2D6.js";
22
+ import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-Cwo7zwvq.js";
23
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-CkV3d3yp.js";
24
+ import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-_uWWNHWq.js";
25
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-BGkle6WM.js";
23
26
  import { existsSync } from "node:fs";
24
27
  import { dirname, resolve } from "node:path";
25
28
  import { createHash } from "node:crypto";
@@ -27,6 +30,107 @@ import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
27
30
  import { SECRET_COLUMNS, SQL_MODULES, adoptedTables, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, moduleVersion, renderModules, sameModuleFile, sameTenantColumn, sameTenantTrigger, sharedRolesProblems, subjectColumns } from "better-supabase/sql";
28
31
  import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths } from "better-supabase/config";
29
32
  import { defineBucket, parseSize } from "better-supabase/storage";
33
+ //#region src/cli/doctor/env.ts
34
+ const PUBLIC_PREFIXES = [
35
+ "NEXT_PUBLIC_",
36
+ "VITE_",
37
+ "PUBLIC_",
38
+ "EXPO_PUBLIC_",
39
+ "NUXT_PUBLIC_"
40
+ ];
41
+ function envEntries(file) {
42
+ return file.text.split("\n").flatMap((raw, index) => {
43
+ const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/.exec(raw);
44
+ if (!match) return [];
45
+ const value = match[2].trim().replace(/^(['"])(.*)\1$/, "$2");
46
+ return [{
47
+ key: match[1],
48
+ value,
49
+ line: index + 1
50
+ }];
51
+ });
52
+ }
53
+ const PREFIXES = [...new Set(Object.values(PREFIX_NAMES).filter((prefix) => prefix !== ""))];
54
+ /** The names `stackEnvValues` writes, with or without a browser prefix; not the CLI's own `SUPABASE_BIN` or `SUPABASE_ACCESS_TOKEN`. */
55
+ const STACK_VARIABLE = /(?:^|_)SUPABASE_(?:URL|PUBLISHABLE_KEY|SECRET_KEY|JWKS_URL|DB_URL|JWT_SECRET)$/;
56
+ const exportsStackVariable = (shell) => Object.entries(shell).some(([name, value]) => value !== void 0 && value !== "" && STACK_VARIABLE.test(name));
57
+ /**
58
+ * Reads the running stack only when the shell exports a `SUPABASE_*`
59
+ * variable, so a doctor run without one never starts `supabase status`.
60
+ */
61
+ async function loadStackEnvCheck(root, env, signal) {
62
+ const shell = env[PROCESS_ENV] ?? {};
63
+ if (!exportsStackVariable(shell)) return { skipped: "No SUPABASE_* variable is exported." };
64
+ try {
65
+ const result = await readStackStatus(root, env, { signal });
66
+ if (!result.ok) return { skipped: "The local stack is not running." };
67
+ const values = { ...stackEnvValues(result.status, "") };
68
+ if (values["SUPABASE_URL"] === void 0) return { skipped: "supabase status has no API_URL." };
69
+ for (const prefix of PREFIXES) {
70
+ values[`${prefix}SUPABASE_URL`] = values["SUPABASE_URL"];
71
+ if (values["SUPABASE_PUBLISHABLE_KEY"] !== void 0) values[`${prefix}SUPABASE_PUBLISHABLE_KEY`] = values["SUPABASE_PUBLISHABLE_KEY"];
72
+ }
73
+ return {
74
+ shell,
75
+ values
76
+ };
77
+ } catch (cause) {
78
+ return { skipped: errorText(cause) };
79
+ }
80
+ }
81
+ /** Checks on env files and the variables the shell exports (BS501 to BS503). */
82
+ const ENV_RULES = [
83
+ {
84
+ code: "BS501",
85
+ severity: "error",
86
+ title: "Secret in a browser variable",
87
+ description: "Variables with a public prefix are bundled into client code. A secret key there gives every visitor full access.",
88
+ check: (context) => context.envFiles.flatMap((file) => envEntries(file).filter((entry) => PUBLIC_PREFIXES.some((prefix) => entry.key.startsWith(prefix)) && (entry.value.startsWith("sb_secret_") || /SECRET|SERVICE_ROLE/.test(entry.key))).map((entry) => ({
89
+ message: `${entry.key} in ${file.path} is exposed to the browser but holds a secret. Rename it without the public prefix and rotate the key.`,
90
+ target: `${file.path}:${entry.key}`,
91
+ location: {
92
+ file: file.path,
93
+ line: entry.line
94
+ }
95
+ })))
96
+ },
97
+ {
98
+ code: "BS502",
99
+ severity: "warning",
100
+ title: "Env file with secrets is not ignored by git",
101
+ description: "Env files holding a secret key or database password should never be committed.",
102
+ check: (context) => {
103
+ const patterns = context.gitignore.split("\n").map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
104
+ const ignored = (path) => patterns.some((pattern) => {
105
+ const source = pattern.replace(/^\//, "").replaceAll(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*");
106
+ return new RegExp(`^${source}$`).test(path) || new RegExp(`(^|/)${source}$`).test(path);
107
+ });
108
+ return context.envFiles.flatMap((file) => {
109
+ const secret = envEntries(file).find((entry) => entry.value.startsWith("sb_secret_") || /SECRET_KEY|SERVICE_ROLE|DB_URL|DATABASE_URL/.test(entry.key));
110
+ if (!secret || ignored(file.path) || file.path.endsWith(".example")) return [];
111
+ return [{
112
+ message: `${file.path} contains ${secret.key} but isn't in .gitignore.`,
113
+ target: file.path,
114
+ location: {
115
+ file: file.path,
116
+ line: secret.line
117
+ }
118
+ }];
119
+ });
120
+ }
121
+ },
122
+ {
123
+ code: "BS503",
124
+ severity: "warning",
125
+ title: "Exported Supabase variable differs from the running stack",
126
+ description: "A SUPABASE_* variable exported in the shell has another value than the local stack, so the app talks to a stale stack (often another worktree's port). Values are redacted: host and port for URLs, a SHA-256 fingerprint for keys. Unset the variable, or start the app with `better-supabase run -- <cmd>`, which overrides it.",
127
+ check: ({ stackEnv }) => stackEnv === void 0 || "skipped" in stackEnv ? [] : staleVariables(stackEnv.shell, stackEnv.values).map((stale) => ({
128
+ target: stale.variable,
129
+ message: `${stale.message} Unset it or start the app with better-supabase run -- <cmd>.`
130
+ }))
131
+ }
132
+ ];
133
+ //#endregion
30
134
  //#region src/cli/doctor/adoption.ts
31
135
  const tagText = (notNull) => notNull === true ? "@notNull" : `@notNull(${notNull.join(", ")})`;
32
136
  const sameNotNull = (a, b) => a === true || b === true ? a === b : a !== void 0 && a.length === b.length && a.every((name) => b.includes(name));
@@ -124,6 +228,22 @@ const ADOPTION_RULES = [
124
228
  });
125
229
  }
126
230
  },
231
+ {
232
+ code: "BS344",
233
+ severity: "warning",
234
+ title: "Adopted webhook endpoints without a format",
235
+ description: "An adopted `webhooks-out` endpoints table that maps no `format` column sends every endpoint in `blocks.webhooks-out.options.defaultFormat`. Its default changed from the 0.8 body (`standard`) to `cloudevents` in 0.9, so receivers built for the old body break without any change to the config. `sql sync` refuses this config; doctor reports it for configs it loads without that check. Set `defaultFormat` explicitly, or add a format column and map it in `columns.endpoints.format`.",
236
+ check: (context) => {
237
+ const block = context.config.blocks["webhooks-out"];
238
+ if (block?.mode !== "adopt" || block.options?.["defaultFormat"] !== void 0 || typeof block.columns?.["endpoints"]?.["format"] === "string") return [];
239
+ const adopted = adoptedTables(context.config.blocks).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
240
+ const table = adopted === void 0 ? void 0 : catalogOf(context).tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
241
+ return [{
242
+ message: `${adopted === void 0 ? "The adopted endpoints table" : `${adopted.schema}.${adopted.table}`} ${table?.columns.some((column) => column.name === "format") ? "has a format column the config doesn't map" : "has no format column"}, so every endpoint gets blocks.webhooks-out.options.defaultFormat, which defaults to "cloudevents" since 0.9 ("standard" before). Set defaultFormat to the body your receivers expect, or map columns.endpoints.format.`,
243
+ target: "blocks.webhooks-out.options.defaultFormat"
244
+ }];
245
+ }
246
+ },
127
247
  {
128
248
  code: "BS341",
129
249
  severity: "warning",
@@ -302,7 +422,7 @@ const splitName = (qualified) => {
302
422
  name: qualified.slice(dot + 1)
303
423
  };
304
424
  };
305
- const escapeRegExp$1 = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
425
+ const escapeRegExp$2 = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
306
426
  /**
307
427
  * The claims the provider's hook writes that a second writer would
308
428
  * contradict, with the tenant claim it writes to.
@@ -310,7 +430,7 @@ const escapeRegExp$1 = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
310
430
  function ownedClaims(hook) {
311
431
  return [.../* @__PURE__ */ new Set([...hook.ownedClaims, ...hook.tenantClaim ? [hook.tenantClaim] : []])];
312
432
  }
313
- const quotedName = (schema, name) => `(?:"?${escapeRegExp$1(schema)}"?\\s*\\.\\s*)?"?${escapeRegExp$1(name)}"?`;
433
+ const quotedName = (schema, name) => `(?:"?${escapeRegExp$2(schema)}"?\\s*\\.\\s*)?"?${escapeRegExp$2(name)}"?`;
314
434
  const createsFunction = (fn) => new RegExp(`create\\s+(?:or\\s+replace\\s+)?function\\s+${quotedName(fn.schema, fn.name)}\\s*\\(`, "i");
315
435
  /** The SQL file that has the provider's hook marker and creates `fn`. */
316
436
  function markerFileFor(context, fn) {
@@ -334,7 +454,7 @@ function wrapsProviderHook(hook, source) {
334
454
  /** Which of `claims` the hook body writes through `jsonb_set` or `jsonb_build_object`. */
335
455
  function writtenClaims(source, claims) {
336
456
  return claims.filter((claim) => {
337
- const name = escapeRegExp$1(claim);
457
+ const name = escapeRegExp$2(claim);
338
458
  return new RegExp(`jsonb_set\\s*\\([^;]*?'\\{\\s*(?:claims\\s*,\\s*)?${name}\\s*\\}'`, "i").test(source) || new RegExp(`jsonb_build_object\\s*\\([^;]*?'${name}'\\s*,`, "i").test(source);
339
459
  });
340
460
  }
@@ -921,6 +1041,187 @@ async function fileState(context, file) {
921
1041
  };
922
1042
  }
923
1043
  //#endregion
1044
+ //#region src/cli/doctor/attachment-subjects.ts
1045
+ /** The attachments subjects as the block resolves them, with the per-subject keys each one has. */
1046
+ function attachmentSubjects(context) {
1047
+ const registry = context.config.subjects;
1048
+ const raw = context.config.blocks["attachments"]?.options?.["subjects"];
1049
+ return (raw === void 0 ? Object.keys(registry).map((type) => [type, {}]) : Array.isArray(raw) ? raw.filter((type) => typeof type === "string").map((type) => [type, {}]) : isRecord(raw) ? Object.entries(raw).flatMap(([type, entry]) => isRecord(entry) ? [[type, entry]] : []) : []).flatMap(([type, entry]) => {
1050
+ const registered = registry[type];
1051
+ const table = entry["table"] ?? registered?.table;
1052
+ const tenant = entry["tenant"] ?? registered?.tenant ?? "organization_id";
1053
+ if (typeof table !== "string" || typeof tenant !== "string") return [];
1054
+ const own = isRecord(entry["permissions"]) ? Object.keys(entry["permissions"]) : [];
1055
+ const fromRegistry = Object.keys(registered?.permissions ?? {}).filter((key) => key !== "read");
1056
+ const subjectRead = typeof entry["permission"] === "string" || registered?.permissions?.["read"] !== void 0 ? ["read"] : [];
1057
+ return [{
1058
+ type,
1059
+ table,
1060
+ tenant,
1061
+ keys: /* @__PURE__ */ new Set([
1062
+ ...own,
1063
+ ...fromRegistry,
1064
+ ...subjectRead
1065
+ ])
1066
+ }];
1067
+ });
1068
+ }
1069
+ /**
1070
+ * Whether `expression` only checks that the caller is a member of the row's
1071
+ * tenant: `current_tenant_id()`, a `*_ids_with` or `*member_*ids` function in
1072
+ * any schema (the provider's own helpers included), `can('tenant', ...)` or
1073
+ * `member_can`, joined by `and`, with a soft-delete `is null` allowed. A
1074
+ * permission call passes only with one of `keys`.
1075
+ */
1076
+ function tenantOnly(expression, column, keys) {
1077
+ const col = `(?:"?\\w+"?\\.)?"?${escape$1(column)}"?(?:::\\w+)?`;
1078
+ const key = `'([^']*)'(?:::text)?`;
1079
+ const atoms = [
1080
+ `${col}\\s*=\\s*\\(?\\s*(?:select\\s+)?better_supabase\\.current_tenant_id\\(\\)(?:\\s+as\\s+\\w+)?`,
1081
+ `${col}\\s+in\\s+\\(\\s*select\\s+(?:\\w+\\.)?\\w*_ids_with\\(\\s*${key}\\s*\\)(?:\\s+as\\s+\\w+)?\\s*\\)`,
1082
+ `${col}\\s+in\\s+\\(\\s*select\\s+(?:\\w+\\.)?\\w*member_\\w*ids\\(\\s*\\)(?:\\s+as\\s+\\w+)?\\s*\\)`,
1083
+ `better_supabase\\.can\\(\\s*'tenant'(?:::text)?\\s*,\\s*${col}\\s*,\\s*${key}\\s*\\)`,
1084
+ `better_supabase\\.member_can\\(\\s*${col}\\s*,\\s*${key}\\s*\\)`,
1085
+ `(?:"?\\w+"?\\.)?"?\\w+"?\\s+is\\s+null`
1086
+ ];
1087
+ const used = [];
1088
+ let rest = expression;
1089
+ for (const atom of atoms) rest = rest.replaceAll(new RegExp(atom, "gi"), (_match, key) => {
1090
+ if (typeof key === "string") used.push(key);
1091
+ return " ";
1092
+ });
1093
+ return used.every((key) => keys.has(key)) && rest.replaceAll(/\band\b|[()\s]/gi, "") === "";
1094
+ }
1095
+ /** The top-level `or` branches of `expression`, outer parentheses removed. */
1096
+ function branches(expression) {
1097
+ let text = expression.trim();
1098
+ while (text.startsWith("(") && closingParen(text) === text.length - 1) text = text.slice(1, -1).trim();
1099
+ const parts = [];
1100
+ let depth = 0;
1101
+ let start = 0;
1102
+ for (let index = 0; index < text.length; index += 1) {
1103
+ const char = text[index];
1104
+ if (char === "(") depth += 1;
1105
+ else if (char === ")") depth -= 1;
1106
+ else if (depth === 0 && /^\sor\s/i.test(text.slice(index, index + 4))) {
1107
+ parts.push(text.slice(start, index));
1108
+ start = index + 4;
1109
+ }
1110
+ }
1111
+ parts.push(text.slice(start));
1112
+ return parts;
1113
+ }
1114
+ /** The index of the parenthesis closing the one at the start of `text`. */
1115
+ function closingParen(text) {
1116
+ let depth = 0;
1117
+ for (let index = 0; index < text.length; index += 1) if (text[index] === "(") depth += 1;
1118
+ else if (text[index] === ")") {
1119
+ depth -= 1;
1120
+ if (depth === 0) return index;
1121
+ }
1122
+ return -1;
1123
+ }
1124
+ /** Tenant membership alone lets the caller through: the whole check, or one `or` branch of it. */
1125
+ function tenantSuffices(expression, column, keys) {
1126
+ return [expression, ...branches(expression)].some((part) => tenantOnly(part, column, keys));
1127
+ }
1128
+ function attachmentSubjectsOnDefaults(context) {
1129
+ if (!context.config.blockNames.includes("attachments")) return [];
1130
+ const { tables } = catalogOf(context);
1131
+ const overrides = context.config.blocks["attachments"]?.permissions ?? {};
1132
+ const actions = [{
1133
+ action: "read",
1134
+ commands: ["select"],
1135
+ what: "reads"
1136
+ }, {
1137
+ action: "upload",
1138
+ commands: ["insert", "update"],
1139
+ what: "writes"
1140
+ }];
1141
+ return attachmentSubjects(context).flatMap(({ type, table: name, tenant, keys }) => {
1142
+ const [schema, bare] = name.includes(".") ? name.split(".", 2) : ["public", name];
1143
+ const table = tables.find((candidate) => candidate.schema === schema && candidate.name === bare);
1144
+ if (table?.kind !== "table" || !table.rls) return [];
1145
+ const stricter = actions.filter(({ action, commands }) => {
1146
+ if (keys.has(action)) return false;
1147
+ const blockKey = overrides[action] ?? `attachments.${action}`;
1148
+ return commands.some((command) => {
1149
+ const applying = table.policies.filter((policy) => policy.permissive && (policy.command === "all" || policy.command === command) && appliesTo(policy, "authenticated"));
1150
+ if (command !== "select" && applying.length === 0) return false;
1151
+ return !applying.some((policy) => {
1152
+ const expression = command === "select" ? policy.using : policy.check ?? policy.using;
1153
+ return expression !== null && tenantSuffices(expression, tenant, /* @__PURE__ */ new Set([blockKey]));
1154
+ });
1155
+ });
1156
+ });
1157
+ if (stricter.length === 0) return [];
1158
+ const target = `${table.schema}.${table.name}`;
1159
+ return [{
1160
+ message: `Attachments on ${type} use the block-wide ${stricter.map(({ action }) => action).join(" and ")} key, but ${target} checks more than tenant membership for ${stricter.map(({ what: verb }) => verb).join(" and ")}, so any member of the tenant gets the files of a ${type} they can't open. Set ${stricter.map(({ action }) => action === "read" ? `blocks.attachments.options.subjects.${type}.permissions.read` : `subjects.${type}.permissions.upload`).join(" and ")} to the key the table checks.`,
1161
+ target,
1162
+ object: tableObject(table)
1163
+ }];
1164
+ });
1165
+ }
1166
+ //#endregion
1167
+ //#region src/cli/doctor/audit-coverage.ts
1168
+ const escapeRegExp$1 = (value) => value.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
1169
+ /** `exempt` entries: a glob, or `{ table, reason }` where `table` is a glob. */
1170
+ function exemptions(value) {
1171
+ return (Array.isArray(value) ? value : []).flatMap((entry) => {
1172
+ if (typeof entry === "string") return [{
1173
+ glob: entry,
1174
+ reason: void 0
1175
+ }];
1176
+ if (typeof entry === "object" && entry !== null && "table" in entry && typeof entry.table === "string") {
1177
+ const reason = "reason" in entry && typeof entry.reason === "string" ? entry.reason.trim() : "";
1178
+ return [{
1179
+ glob: entry.table,
1180
+ reason: reason === "" ? void 0 : reason
1181
+ }];
1182
+ }
1183
+ return [];
1184
+ });
1185
+ }
1186
+ /** `exempt` globs (`public.*_archive`): `*` matches any run of characters. */
1187
+ const globs = (value) => (Array.isArray(value) ? value : []).filter((entry) => typeof entry === "string").map((glob) => new RegExp(`^${glob.split("*").map(escapeRegExp$1).join(".*")}$`, "i"));
1188
+ /** The module schemas and the app tables SQL modules adopted, which the audit trigger skips. */
1189
+ function moduleOwned(context) {
1190
+ const schemas = /* @__PURE__ */ new Set(["better_supabase"]);
1191
+ const tables = /* @__PURE__ */ new Set();
1192
+ for (const module of Object.values(context.config.blocks)) {
1193
+ if (module?.schema !== void 0) schemas.add(module.schema);
1194
+ for (const table of Object.values(module?.tables ?? {})) {
1195
+ if (table === null) continue;
1196
+ tables.add(table.includes(".") ? table : `${module?.schema ?? "better_supabase"}.${table}`);
1197
+ }
1198
+ }
1199
+ return {
1200
+ schemas,
1201
+ tables
1202
+ };
1203
+ }
1204
+ /**
1205
+ * Tables in `config.schemas` without the `bs_audit` trigger, when `audit` is
1206
+ * in `blocks`, and exemptions that give no reason.
1207
+ */
1208
+ function unauditedTables(context) {
1209
+ if (!context.config.blockNames.includes("audit")) return [];
1210
+ const entries = exemptions(context.config.blocks["audit"]?.options?.["exempt"]);
1211
+ const exempt = globs(entries.map((entry) => entry.glob));
1212
+ const owned = moduleOwned(context);
1213
+ const unaudited = catalogOf(context).tables.filter((table) => table.kind === "table" && table.partitionOf === void 0 && context.config.schemas.includes(table.schema) && !owned.schemas.has(table.schema) && !owned.tables.has(qualified(table)) && !exempt.some((pattern) => pattern.test(qualified(table))) && !table.triggers.some((trigger) => trigger.name.startsWith("bs_audit") || trigger.function.split(".").at(-1) === "audit_row_change")).map((table) => ({
1214
+ message: `${qualified(table)} has no audit trigger, so its inserts, updates and deletes are not in the audit log. Run \`select better_supabase.audit('${qualified(table)}')\` in a schema file, or list it in blocks.audit.options.exempt as \`{ table: '${qualified(table)}', reason: '...' }\`.`,
1215
+ target: qualified(table),
1216
+ object: tableObject(table)
1217
+ }));
1218
+ const unexplained = entries.filter((entry) => entry.reason === void 0).map((entry) => ({
1219
+ message: `blocks.audit.options.exempt lists ${entry.glob} without a reason. Write it as { table: '${entry.glob}', reason: 'why its changes need no audit entry' } so a reviewer can tell an intended gap from a forgotten table.`,
1220
+ target: `blocks.audit.options.exempt:${entry.glob}`
1221
+ }));
1222
+ return [...unaudited, ...unexplained];
1223
+ }
1224
+ //#endregion
924
1225
  //#region src/cli/doctor/modules.ts
925
1226
  /** The non-empty string at a dotted path, as the tenant() plugin reads it. */
926
1227
  function claimAt(claims, path) {
@@ -1242,35 +1543,6 @@ function duplicateTriggers(context) {
1242
1543
  }));
1243
1544
  }));
1244
1545
  }
1245
- /** `exempt` globs (`public.*_archive`): `*` matches any run of characters. */
1246
- const globs = (value) => (Array.isArray(value) ? value : []).filter((entry) => typeof entry === "string").map((glob) => new RegExp(`^${glob.split("*").map(escapeRegExp).join(".*")}$`, "i"));
1247
- /** The module schemas and the app tables SQL modules adopted, which the audit trigger skips. */
1248
- function moduleOwned(context) {
1249
- const schemas = /* @__PURE__ */ new Set(["better_supabase"]);
1250
- const tables = /* @__PURE__ */ new Set();
1251
- for (const module of Object.values(context.config.blocks)) {
1252
- if (module?.schema !== void 0) schemas.add(module.schema);
1253
- for (const table of Object.values(module?.tables ?? {})) {
1254
- if (table === null) continue;
1255
- tables.add(table.includes(".") ? table : `${module?.schema ?? "better_supabase"}.${table}`);
1256
- }
1257
- }
1258
- return {
1259
- schemas,
1260
- tables
1261
- };
1262
- }
1263
- /** Tables in `config.schemas` without the `bs_audit` trigger, when `audit` is in `blocks`. */
1264
- function unauditedTables(context) {
1265
- if (!context.config.blockNames.includes("audit")) return [];
1266
- const exempt = globs(context.config.blocks["audit"]?.options?.["exempt"]);
1267
- const owned = moduleOwned(context);
1268
- return catalogOf(context).tables.filter((table) => table.kind === "table" && context.config.schemas.includes(table.schema) && !owned.schemas.has(table.schema) && !owned.tables.has(qualified(table)) && !exempt.some((pattern) => pattern.test(qualified(table))) && !table.triggers.some((trigger) => trigger.name === "bs_audit" || trigger.function.split(".").at(-1) === "audit_row_change")).map((table) => ({
1269
- message: `${qualified(table)} has no audit trigger, so its inserts, updates and deletes are not in the audit log. Run \`select better_supabase.audit('${qualified(table)}')\` in a schema file, or list it in blocks.audit.options.exempt.`,
1270
- target: qualified(table),
1271
- object: tableObject(table)
1272
- }));
1273
- }
1274
1546
  /** RLS tables in `config.schemas` without a restrictive `session_active()` policy, when `sessions` is in `blocks`. */
1275
1547
  function sessionlessTables(context) {
1276
1548
  if (!context.config.blockNames.includes("sessions")) return [];
@@ -1369,7 +1641,7 @@ const MODULE_RULES = [
1369
1641
  code: "BS315",
1370
1642
  severity: "warning",
1371
1643
  title: "Table without an audit trigger",
1372
- description: "The `audit` module is in `blocks`, and a table in `schemas` has no `bs_audit` trigger (or another trigger that calls `audit_row_change()`), so its changes are not in the audit log. The module's own schemas and the tables SQL modules adopt are skipped; `blocks.audit.options.exempt` lists more, as `schema.table` globs such as `public.*_archive`.",
1644
+ description: "The `audit` module is in `blocks`, and a table in `schemas` has no `bs_audit` trigger (or another trigger that calls `audit_row_change()`), so its changes are not in the audit log. The module's own schemas and the tables SQL modules adopt are skipped; `blocks.audit.options.exempt` lists more, as `{ table, reason }` entries where `table` is a `schema.table` glob such as `public.*_archive`; a bare glob string still works but gets a finding that asks for the reason. Partitions are covered by their parent.",
1373
1645
  check: unauditedTables
1374
1646
  },
1375
1647
  {
@@ -1449,6 +1721,13 @@ const MODULE_RULES = [
1449
1721
  description: "A table in `config.subjects` has row level security disabled. `can_subject` treats a row the caller can read as visible, so without RLS every signed-in user passes the visibility half of the check for every row.",
1450
1722
  check: subjectsWithoutRls
1451
1723
  },
1724
+ {
1725
+ code: "BS345",
1726
+ severity: "warning",
1727
+ title: "Attachments subject on block-wide keys with stricter RLS",
1728
+ description: "An `attachments` subject has no `read` or `upload` key of its own, so its files are checked with the block-wide `attachments.read` and `attachments.upload` keys, but the subject table's own policies check more than tenant membership: a permission key of their own, an owner or `auth.uid()` comparison, or another condition. Any member of the tenant then reads and uploads files of rows they can't open. Doctor recognizes `current_tenant_id()`, `tenant_ids_with`, `member_<tenant>_ids`, `can('tenant', ...)` and `member_can` with the block's key as tenant membership. Set `subjects.<type>.permissions.upload`, or `blocks.attachments.options.subjects.<type>.permissions` for `read`, to the keys the table checks.",
1729
+ check: attachmentSubjectsOnDefaults
1730
+ },
1452
1731
  {
1453
1732
  code: "BS335",
1454
1733
  severity: "warning",
@@ -2369,25 +2648,6 @@ function tomlLocation(context, key) {
2369
2648
  line
2370
2649
  } : void 0;
2371
2650
  }
2372
- const PUBLIC_PREFIXES = [
2373
- "NEXT_PUBLIC_",
2374
- "VITE_",
2375
- "PUBLIC_",
2376
- "EXPO_PUBLIC_",
2377
- "NUXT_PUBLIC_"
2378
- ];
2379
- function envEntries(file) {
2380
- return file.text.split("\n").flatMap((raw, index) => {
2381
- const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/.exec(raw);
2382
- if (!match) return [];
2383
- const value = match[2].trim().replace(/^(['"])(.*)\1$/, "$2");
2384
- return [{
2385
- key: match[1],
2386
- value,
2387
- line: index + 1
2388
- }];
2389
- });
2390
- }
2391
2651
  /**
2392
2652
  * `db.x.aggregate(`, an `_sum:`/`_avg:`/`_min:`/`_max:` include or a list
2393
2653
  * with `facetCounts: true`.
@@ -2793,45 +3053,6 @@ const RULES = [
2793
3053
  target: `${qualified(table)}.${key.name}`,
2794
3054
  object: tableObject(table)
2795
3055
  })))
2796
- },
2797
- {
2798
- code: "BS501",
2799
- severity: "error",
2800
- title: "Secret in a browser variable",
2801
- description: "Variables with a public prefix are bundled into client code. A secret key there gives every visitor full access.",
2802
- check: (context) => context.envFiles.flatMap((file) => envEntries(file).filter((entry) => PUBLIC_PREFIXES.some((prefix) => entry.key.startsWith(prefix)) && (entry.value.startsWith("sb_secret_") || /SECRET|SERVICE_ROLE/.test(entry.key))).map((entry) => ({
2803
- message: `${entry.key} in ${file.path} is exposed to the browser but holds a secret. Rename it without the public prefix and rotate the key.`,
2804
- target: `${file.path}:${entry.key}`,
2805
- location: {
2806
- file: file.path,
2807
- line: entry.line
2808
- }
2809
- })))
2810
- },
2811
- {
2812
- code: "BS502",
2813
- severity: "warning",
2814
- title: "Env file with secrets is not ignored by git",
2815
- description: "Env files holding a secret key or database password should never be committed.",
2816
- check: (context) => {
2817
- const patterns = context.gitignore.split("\n").map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
2818
- const ignored = (path) => patterns.some((pattern) => {
2819
- const source = pattern.replace(/^\//, "").replaceAll(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*");
2820
- return new RegExp(`^${source}$`).test(path) || new RegExp(`(^|/)${source}$`).test(path);
2821
- });
2822
- return context.envFiles.flatMap((file) => {
2823
- const secret = envEntries(file).find((entry) => entry.value.startsWith("sb_secret_") || /SECRET_KEY|SERVICE_ROLE|DB_URL|DATABASE_URL/.test(entry.key));
2824
- if (!secret || ignored(file.path) || file.path.endsWith(".example")) return [];
2825
- return [{
2826
- message: `${file.path} contains ${secret.key} but isn't in .gitignore.`,
2827
- target: file.path,
2828
- location: {
2829
- file: file.path,
2830
- line: secret.line
2831
- }
2832
- }];
2833
- });
2834
- }
2835
3056
  }
2836
3057
  ],
2837
3058
  ...RLS_RULES,
@@ -2849,7 +3070,8 @@ const RULES = [
2849
3070
  ...FLAG_RULES,
2850
3071
  ...REALTIME_RULES,
2851
3072
  ...ADOPTION_RULES,
2852
- ...MIGRATION_SAFETY_RULES
3073
+ ...MIGRATION_SAFETY_RULES,
3074
+ ...ENV_RULES
2853
3075
  ].sort((a, b) => byCodePoint(a.code, b.code));
2854
3076
  const RULE_CODES = RULES.map((rule) => rule.code);
2855
3077
  async function runRules(context, rules = RULES) {
@@ -3337,14 +3559,15 @@ async function runDoctor(config, args, env, options = {}) {
3337
3559
  ...options.advisors === void 0 ? {} : { advisors: options.advisors },
3338
3560
  ...options.database === void 0 ? {} : { database: options.database }
3339
3561
  };
3340
- const [snapshot, envFiles, [configToml, sql], gitignore, sources, readSets, peers] = await Promise.all([
3562
+ const [snapshot, envFiles, [configToml, sql], gitignore, sources, readSets, peers, stackEnv] = await Promise.all([
3341
3563
  options.snapshot ?? loadSnapshot(config, env, source, pg, opened.open),
3342
3564
  Promise.all(ENV_FILES.map((path) => readText(config.root, path))).then((files) => files.filter((file) => file !== void 0)),
3343
3565
  readSupabaseToml(config.root).then(async (toml) => [toml, await sqlFiles(config.root, toml, sqlWorkflow(config, toml))]),
3344
3566
  readText(config.root, ".gitignore"),
3345
3567
  sourceFiles(config),
3346
3568
  compiledReadSets(config).catch((cause) => ({ skipped: errorText(cause) })),
3347
- options.peers ?? peerVersions(config.root).catch(() => [])
3569
+ options.peers ?? peerVersions(config.root).catch(() => []),
3570
+ options.stackEnv ?? (rules.some((rule) => rule.code === "BS503") ? loadStackEnvCheck(config.root, env, options.signal) : void 0)
3348
3571
  ]).catch(async (cause) => {
3349
3572
  await opened.close();
3350
3573
  throw cause;
@@ -3364,6 +3587,7 @@ async function runDoctor(config, args, env, options = {}) {
3364
3587
  sources,
3365
3588
  readSets,
3366
3589
  peers,
3590
+ ...stackEnv ? { stackEnv } : {},
3367
3591
  ...live.advisors ? { advisors: live.advisors } : {},
3368
3592
  ...live.database ? { database: live.database } : {},
3369
3593
  ...stats ? { stats } : {},
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-Caiz_0so.js";
2
2
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
3
3
  import { s as restrictSchemas, u as tsTypeOf } from "./typegen--TfvOPLh.js";
4
4
  import { t as isRecord } from "./guards-CUlDNYZs.js";
5
- import { t as toCatalog } from "./catalog-Di15TkM2.js";
5
+ import { t as toCatalog } from "./catalog-Cm6BtquM.js";
6
6
  import { resolveProviderSql } from "better-supabase/sql";
7
7
  import { DEFAULT_CLAIMS, tenantClaimPaths } from "better-supabase/config";
8
8
  import { toCamel } from "better-supabase";
@@ -856,9 +856,13 @@ function updateEntries(columns, name) {
856
856
  return `${prop(column[name])}?: ${nullable(column.tsType, column.nullable)};`;
857
857
  });
858
858
  }
859
- /** Postgres passes `null` to any argument, so every argument accepts it. */
859
+ /**
860
+ * Postgres passes `null` to any argument, so every argument accepts it. An
861
+ * optional argument also accepts `undefined`, which `rpc()` leaves out, so
862
+ * `exactOptionalPropertyTypes` apps can pass a maybe-missing value.
863
+ */
860
864
  function argEntries(fn) {
861
- return fn.args.map((arg) => `${prop(arg.name)}${arg.optional ? "?" : ""}: ${nullable(arg.tsType, true)};`);
865
+ return fn.args.map((arg) => `${prop(arg.name)}${arg.optional ? "?" : ""}: ${nullable(arg.tsType, true)}${arg.optional ? " | undefined" : ""};`);
862
866
  }
863
867
  function enrichedDatabase(model) {
864
868
  const schemas = model.config.schemas.flatMap((schema) => {
@@ -1004,6 +1008,8 @@ const RESERVED_EXPORTS = [
1004
1008
  "WhereOf",
1005
1009
  "OrderByOf",
1006
1010
  "OrderTermOf",
1011
+ "WritableColumnOf",
1012
+ "GeneratedColumnOf",
1007
1013
  "buckets",
1008
1014
  "topics",
1009
1015
  "subjectTypes",
@@ -1022,7 +1028,7 @@ function emitModule(model, options) {
1022
1028
  `import { defineSchema, type Schema${options.inlineMeta ? ", type SchemaMeta" : ""} } from ${q(runtime)};`
1023
1029
  ];
1024
1030
  const storagePaths = model.tables.some((table) => table.columns.some((column) => column.storage !== void 0));
1025
- lines.push(`import type { EnrichDatabase, MutableWhere, OrderByArg, OrderByInput${storagePaths ? ", StoragePath" : ""} } from ${q(runtime)};`, `import type { Database as SupabaseDatabase } from ${q(options.databaseTypesImport ?? "./database.types.ts")};`);
1031
+ lines.push(`import type { EnrichDatabase, GeneratedColumns, MutableWhere, OrderByArg, OrderByInput${storagePaths ? ", StoragePath" : ""}, WritableColumns } from ${q(runtime)};`, `import type { Database as SupabaseDatabase } from ${q(options.databaseTypesImport ?? "./database.types.ts")};`);
1026
1032
  const byFile = /* @__PURE__ */ new Map();
1027
1033
  for (const entry of model.jsonImports) {
1028
1034
  const list = byFile.get(entry.from) ?? [];
@@ -1049,7 +1055,7 @@ function emitModule(model, options) {
1049
1055
  lines.push(`export const ${claim(constant, source)} = [${column.values.map(q).join(", ")}] as const;`, `export type ${claim(typeName, source)} = (typeof ${constant})[number];`);
1050
1056
  }
1051
1057
  if (model.enums.length > 0) lines.push("");
1052
- lines.push(...modelsType(model), "", ...functionsType(model), "", "export type TableName = keyof Models;", "/** Constraint names for `isConflict`, `isCheck` and `isForeignKey`. */", "export type UniqueConstraint = { [T in TableName]: Extract<keyof Models[T]['UniqueKeys'], string> }[TableName];", "export type CheckConstraint = Models[TableName]['Checks'];", "export type ForeignKeyConstraint = Models[TableName]['ForeignKeys'];", "export type RowOf<T extends TableName> = Models[T]['Row'];", "export type InsertOf<T extends TableName> = Models[T]['Insert'];", "export type UpdateOf<T extends TableName> = Models[T]['Update'];", "/** A `where` for `T` you can assign to one key at a time. */", "export type WhereOf<T extends TableName> = MutableWhere<Models, T>;", "/** An `orderBy` for `T`: one sort or a list, by column or to-one relation. */", "export type OrderByOf<T extends TableName> = OrderByArg<Models, T>;", "/** One sort term of `T`'s `orderBy`, by column or to-one relation. */", "export type OrderTermOf<T extends TableName> = OrderByInput<Models, T>;", "");
1058
+ lines.push(...modelsType(model), "", ...functionsType(model), "", "export type TableName = keyof Models;", "/** Constraint names for `isConflict`, `isCheck` and `isForeignKey`. */", "export type UniqueConstraint = { [T in TableName]: Extract<keyof Models[T]['UniqueKeys'], string> }[TableName];", "export type CheckConstraint = Models[TableName]['Checks'];", "export type ForeignKeyConstraint = Models[TableName]['ForeignKeys'];", "export type RowOf<T extends TableName> = Models[T]['Row'];", "export type InsertOf<T extends TableName> = Models[T]['Insert'];", "export type UpdateOf<T extends TableName> = Models[T]['Update'];", "/** A `where` for `T` you can assign to one key at a time. */", "export type WhereOf<T extends TableName> = MutableWhere<Models, T>;", "/** An `orderBy` for `T`: one sort or a list, by column or to-one relation. */", "export type OrderByOf<T extends TableName> = OrderByArg<Models, T>;", "/** One sort term of `T`'s `orderBy`, by column or to-one relation. */", "export type OrderTermOf<T extends TableName> = OrderByInput<Models, T>;", "/** Columns of `T` that `Insert` and `Update` accept. */", "export type WritableColumnOf<T extends TableName> = WritableColumns<Models, T>;", "/** Columns of `T` the database fills (generated columns): in `Row`, never writable. */", "export type GeneratedColumnOf<T extends TableName> = GeneratedColumns<Models, T>;", "");
1053
1059
  if (model.meta.buckets) lines.push("/** Bucket configs for `defineBucket` from `better-supabase/storage`. */", `export const buckets = ${JSON.stringify(model.meta.buckets, null, 2)} as const;`, "");
1054
1060
  if (model.meta.topics) lines.push("/** Topic templates for `defineTopic` from `better-supabase/realtime`. */", `export const topics = ${JSON.stringify(model.meta.topics, null, 2)} as const;`, "");
1055
1061
  const subjects = Object.keys(model.config.subjects);
@@ -1 +1 @@
1
- export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-Cf5OTqbK.js";
1
+ export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-C8R7Nf0a.js";
@@ -1070,7 +1070,8 @@ function parseEnv(env) {
1070
1070
  HOME: optionalString,
1071
1071
  CI: optionalString,
1072
1072
  BETTER_SUPABASE_ENV: optionalString,
1073
- BETTER_SUPABASE_AGENT: optionalString
1073
+ BETTER_SUPABASE_AGENT: optionalString,
1074
+ BSB_STACK: optionalString
1074
1075
  },
1075
1076
  runtimeEnv: env,
1076
1077
  isServer: true,
@@ -0,0 +1 @@
1
+ export { n as envCommand } from "./env-Dh5K5t2U.js";