better-supabase 0.16.0 → 0.17.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 (269) hide show
  1. package/dist/{ai-schedules-BmkARmQ9.d.ts → ai-schedules-Dk9H3kAp.d.ts} +1 -1
  2. package/dist/ai-sdk/agents/index.d.ts +2 -2
  3. package/dist/{api-hHwieEfz.d.ts → api-CpL3hm87.d.ts} +1 -1
  4. package/dist/{app-tables-D29Rahtg.js → app-tables-Q0TYfeih.js} +1 -0
  5. package/dist/{app-tables-yMQ4ubyY.d.ts → app-tables-dS02piE7.d.ts} +1 -1
  6. package/dist/astro/index.d.ts +3 -3
  7. package/dist/{authorization-HZdJCaVm.d.ts → authorization-CNsvnwle.d.ts} +19 -3
  8. package/dist/better-result/index.d.ts +2 -2
  9. package/dist/{bind-JGCPGUJh.d.ts → bind-C801IaK-.d.ts} +4 -4
  10. package/dist/{block-env-y65GF_px.d.ts → block-env-BeG4DiiO.d.ts} +4 -4
  11. package/dist/blocks/access-requests/index.d.ts +1 -1
  12. package/dist/blocks/activities/index.d.ts +1 -1
  13. package/dist/blocks/agents/index.d.ts +1 -1
  14. package/dist/blocks/ai-cache/index.d.ts +1 -1
  15. package/dist/blocks/ai-chat/index.d.ts +4 -4
  16. package/dist/blocks/ai-files/index.d.ts +1 -1
  17. package/dist/blocks/ai-keys/index.d.ts +1 -1
  18. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  19. package/dist/blocks/announcements/index.d.ts +4 -4
  20. package/dist/blocks/api-keys/index.d.ts +2 -2
  21. package/dist/blocks/approvals/index.d.ts +1 -1
  22. package/dist/blocks/assets/index.d.ts +1 -1
  23. package/dist/blocks/assignment/index.d.ts +1 -1
  24. package/dist/blocks/attachments/index.d.ts +2 -2
  25. package/dist/blocks/audit/index.d.ts +5 -5
  26. package/dist/blocks/automations/index.d.ts +3 -3
  27. package/dist/blocks/billable-time/index.d.ts +1 -1
  28. package/dist/blocks/billing/index.d.ts +3 -3
  29. package/dist/blocks/bookings/index.d.ts +2 -2
  30. package/dist/blocks/bulk/index.d.ts +1 -1
  31. package/dist/blocks/calendar/index.d.ts +2 -2
  32. package/dist/blocks/catalog/index.d.ts +1 -1
  33. package/dist/blocks/channels/index.d.ts +1 -1
  34. package/dist/blocks/collections/index.d.ts +1 -1
  35. package/dist/blocks/comments/index.d.ts +5 -5
  36. package/dist/blocks/compliance/index.d.ts +1 -1
  37. package/dist/blocks/connectors/index.d.ts +1 -1
  38. package/dist/blocks/contacts/index.d.ts +1 -1
  39. package/dist/blocks/content/index.d.ts +1 -1
  40. package/dist/blocks/contracts/index.d.ts +1 -1
  41. package/dist/blocks/courses/index.d.ts +1 -1
  42. package/dist/blocks/created-by/index.d.ts +4 -3
  43. package/dist/blocks/created-by/index.js +2 -2
  44. package/dist/blocks/custom-fields/index.d.ts +1 -1
  45. package/dist/blocks/data-lifecycle/index.d.ts +1 -1
  46. package/dist/blocks/deals/index.d.ts +1 -1
  47. package/dist/blocks/dispatch/index.d.ts +1 -1
  48. package/dist/blocks/documents/index.d.ts +1 -1
  49. package/dist/blocks/domains/index.d.ts +1 -1
  50. package/dist/blocks/donations/index.d.ts +1 -1
  51. package/dist/blocks/drive/index.d.ts +1 -1
  52. package/dist/blocks/employees/index.d.ts +2 -2
  53. package/dist/blocks/enrichment/index.d.ts +1 -1
  54. package/dist/blocks/enrollments/index.d.ts +1 -1
  55. package/dist/blocks/entitlements/index.d.ts +3 -3
  56. package/dist/blocks/expenses/index.d.ts +1 -1
  57. package/dist/blocks/field-history/index.d.ts +1 -1
  58. package/dist/blocks/flags/index.d.ts +1 -1
  59. package/dist/blocks/forecasts/index.d.ts +1 -1
  60. package/dist/blocks/forms/index.d.ts +2 -2
  61. package/dist/blocks/goals/index.d.ts +1 -1
  62. package/dist/blocks/guests/index.d.ts +1 -1
  63. package/dist/blocks/hiring/index.d.ts +1 -1
  64. package/dist/blocks/identities/index.d.ts +1 -1
  65. package/dist/blocks/imports/index.d.ts +1 -1
  66. package/dist/blocks/inbox/index.d.ts +5 -5
  67. package/dist/blocks/incidents/index.d.ts +1 -1
  68. package/dist/blocks/index.d.ts +2 -2
  69. package/dist/blocks/inventory/index.d.ts +1 -1
  70. package/dist/blocks/invoices/index.d.ts +1 -1
  71. package/dist/blocks/knowledge/index.d.ts +1 -1
  72. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  73. package/dist/blocks/leases/index.d.ts +1 -1
  74. package/dist/blocks/leave/index.d.ts +1 -1
  75. package/dist/blocks/ledger/index.d.ts +1 -1
  76. package/dist/blocks/mail-sync/index.d.ts +1 -1
  77. package/dist/blocks/memberships/index.d.ts +1 -1
  78. package/dist/blocks/memory/index.d.ts +1 -1
  79. package/dist/blocks/messaging/index.d.ts +5 -5
  80. package/dist/blocks/metrics/index.d.ts +1 -1
  81. package/dist/blocks/mfa/index.d.ts +2 -2
  82. package/dist/blocks/moderation/index.d.ts +1 -1
  83. package/dist/blocks/notifications/index.d.ts +4 -4
  84. package/dist/blocks/numbering/index.d.ts +1 -1
  85. package/dist/blocks/oauth-server/index.d.ts +1 -1
  86. package/dist/blocks/onboarding/index.d.ts +2 -2
  87. package/dist/blocks/orders/index.d.ts +2 -2
  88. package/dist/blocks/organizations/index.d.ts +2 -2
  89. package/dist/blocks/outbox/index.d.ts +1 -1
  90. package/dist/blocks/passes/index.d.ts +1 -1
  91. package/dist/blocks/permissions/index.d.ts +3 -3
  92. package/dist/blocks/pipelines/index.d.ts +1 -1
  93. package/dist/blocks/posts/index.d.ts +1 -1
  94. package/dist/blocks/profiles/index.d.ts +1 -1
  95. package/dist/blocks/promotions/index.d.ts +1 -1
  96. package/dist/blocks/push/index.d.ts +2 -2
  97. package/dist/blocks/queue/index.d.ts +1 -1
  98. package/dist/blocks/quotes/index.d.ts +1 -1
  99. package/dist/blocks/rank/index.d.ts +1 -1
  100. package/dist/blocks/reactions/index.d.ts +4 -4
  101. package/dist/blocks/relations/index.d.ts +1 -1
  102. package/dist/blocks/reminders/index.d.ts +1 -1
  103. package/dist/blocks/reviews/index.d.ts +1 -1
  104. package/dist/blocks/saved-views/index.d.ts +3 -3
  105. package/dist/blocks/scores/index.d.ts +1 -1
  106. package/dist/blocks/search/index.d.ts +3 -3
  107. package/dist/blocks/security-events/index.d.ts +1 -1
  108. package/dist/blocks/segments/index.d.ts +1 -1
  109. package/dist/blocks/sequences/index.d.ts +1 -1
  110. package/dist/blocks/service-accounts/index.d.ts +1 -1
  111. package/dist/blocks/sessions/index.d.ts +2 -2
  112. package/dist/blocks/settings/index.d.ts +2 -2
  113. package/dist/blocks/share-links/index.d.ts +1 -1
  114. package/dist/blocks/shipments/index.d.ts +1 -1
  115. package/dist/blocks/signatures/index.d.ts +1 -1
  116. package/dist/blocks/signing-keys/index.d.ts +1 -1
  117. package/dist/blocks/sla/index.d.ts +1 -1
  118. package/dist/blocks/sso/index.d.ts +1 -1
  119. package/dist/blocks/state-machine/index.d.ts +1 -1
  120. package/dist/blocks/subjects/index.d.ts +2 -2
  121. package/dist/blocks/tags/index.d.ts +2 -2
  122. package/dist/blocks/tasks/index.d.ts +2 -2
  123. package/dist/blocks/teams/index.d.ts +1 -1
  124. package/dist/blocks/templates/index.d.ts +1 -1
  125. package/dist/blocks/time-tracking/index.d.ts +1 -1
  126. package/dist/blocks/timeline/index.d.ts +3 -3
  127. package/dist/blocks/trash/index.d.ts +1 -1
  128. package/dist/blocks/undo/index.d.ts +2 -2
  129. package/dist/blocks/updated-at/index.d.ts +7 -4
  130. package/dist/blocks/updated-at/index.js +2 -2
  131. package/dist/blocks/usage/index.d.ts +2 -2
  132. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  133. package/dist/blocks/versions/index.d.ts +1 -1
  134. package/dist/blocks/waitlist/index.d.ts +1 -1
  135. package/dist/blocks/webhooks/index.d.ts +2 -2
  136. package/dist/blocks/workflow-editor/index.d.ts +4 -4
  137. package/dist/blocks/workflows/index.d.ts +4 -4
  138. package/dist/cli/{add-I8OW-qJH.js → add-BinNYhFD.js} +2 -2
  139. package/dist/cli/{add-D7TkPdco.js → add-DMcrsWjC.js} +13 -11
  140. package/dist/cli/add-z-3pXI6C.js +1 -0
  141. package/dist/cli/{backfill-DIz5DnlQ.js → backfill-DxBB62Zr.js} +3 -3
  142. package/dist/cli/bin.js +1 -1
  143. package/dist/cli/{blocks-xk-SE8gS.js → blocks-DSgTifw0.js} +1 -1
  144. package/dist/cli/{blocks-Bp5RPoft.js → blocks-rxOS-Mzz.js} +1 -1
  145. package/dist/cli/{cache-AznIssjI.js → cache-oU0yHKf0.js} +1 -1
  146. package/dist/cli/{codemod-Aewxza6i.js → codemod-Dsrv_3gQ.js} +1 -1
  147. package/dist/cli/{config-9t5ec_N7.js → config-2rwFHbwj.js} +3 -1
  148. package/dist/cli/{config-CBqkQjjN.js → config-C6XylzKz.js} +1 -1
  149. package/dist/cli/{content-mapper-DCrz6OIv.js → content-mapper-DLbXilBz.js} +2 -2
  150. package/dist/cli/{db-DrBI_HNv.js → db-Bwrr3GHM.js} +2 -2
  151. package/dist/cli/{doctor-DkOSLPEQ.js → doctor-CKt5Yyl4.js} +184 -142
  152. package/dist/cli/{gen-CFkYUnWq.js → gen-CeG6lbka.js} +13 -13
  153. package/dist/cli/index.d.ts +1 -1
  154. package/dist/cli/index.js +7 -7
  155. package/dist/cli/{init-CHj9ad4S.js → init-DrQlf9RL.js} +6 -6
  156. package/dist/cli/{live-DGdLR41j.js → live-BvWGM4c3.js} +2 -2
  157. package/dist/cli/{mcp-BZno503V.js → mcp-BrOnGB15.js} +2 -2
  158. package/dist/cli/{metadata-BfgHMe4q.js → metadata-BNSdPuKp.js} +3 -3
  159. package/dist/cli/{migration-safety-BnnXPAro.js → migration-safety-NtB3dsRU.js} +2 -2
  160. package/dist/cli/{module-migration-O_IxewFs.js → module-migration-mKhX88V_.js} +1 -1
  161. package/dist/cli/{print-DosQIFSy.js → print-Dh8iuPK3.js} +1 -1
  162. package/dist/cli/{remove-DK2G_KHm.js → remove-DfFXVBRr.js} +5 -5
  163. package/dist/cli/{render-5y5a1QZr.js → render-ChIwdIOJ.js} +10 -4
  164. package/dist/cli/{run-Bs4OKdDI.js → run-CLSHSVYo.js} +7 -7
  165. package/dist/cli/{run-MRET30vh.js → run-D48ZEU58.js} +24 -24
  166. package/dist/cli/{seed-Cz8PcXeT.js → seed-CG-pA-5N.js} +2 -2
  167. package/dist/cli/seed-CUxW5Dks.js +1 -0
  168. package/dist/cli/{shared-BLqbvY2x.js → shared-D0XBFSlz.js} +1 -1
  169. package/dist/cli/{snapshot-uTUlEzY2.js → snapshot-C6vh_n3t.js} +3 -3
  170. package/dist/cli/{source-D2gJHKwC.js → source-BZbEK5if.js} +1 -1
  171. package/dist/cli/{source-args-IpJRJO5t.js → source-args-MTLYpifA.js} +1 -1
  172. package/dist/cli/{spec-Cm2einTO.js → spec-B4LhpI6t.js} +2 -2
  173. package/dist/cli/{spec-DUjOtciN.js → spec-C-dhdKwa.js} +1 -1
  174. package/dist/cli/{sql-layout-lUWenjJw.js → sql-layout-26LSoifK.js} +2 -2
  175. package/dist/cli/{sync-CZMRB3aU.js → sync-CHGMZCJ5.js} +2 -2
  176. package/dist/cli/{upgrade-BFEIMC7U.js → upgrade-C0dVsqNX.js} +3 -3
  177. package/dist/cli/{upgrade-fVsJniXm.js → upgrade-GB9rqUGT.js} +2 -2
  178. package/dist/cli/{version-B2Dr6VmJ.js → version-T507a49w.js} +1 -1
  179. package/dist/client/index.d.ts +5 -5
  180. package/dist/client/native/index.d.ts +4 -4
  181. package/dist/{composite-CfYyU3vs.d.ts → composite-B7f1MMgr.d.ts} +3 -3
  182. package/dist/config/index.d.ts +3 -3
  183. package/dist/config/index.js +4 -4
  184. package/dist/{config-DWGgUQCh.js → config-BVNNJwGC.js} +7 -6
  185. package/dist/{config-CcehOvbz.js → config-CIBc79_8.js} +1 -1
  186. package/dist/{context-8kb8m5uO.d.ts → context-CKCgjEDF.d.ts} +9 -2
  187. package/dist/{controller-BW-5Opig.d.ts → controller-CJUXhshv.d.ts} +1 -1
  188. package/dist/{conversion-3iv2r7YC.d.ts → conversion-DgHdDlTK.d.ts} +1 -1
  189. package/dist/create/index.d.ts +2 -2
  190. package/dist/create/index.js +5 -5
  191. package/dist/{define-C5AcEkEJ.d.ts → define-Cgru0_kF.d.ts} +1 -1
  192. package/dist/{define-block-C1RHXz7L.d.ts → define-block-Xxw8Hroe.d.ts} +1 -1
  193. package/dist/edge/index.d.ts +5 -5
  194. package/dist/{entitlements-sO977DO-.d.ts → entitlements-B0jmjNLD.d.ts} +1 -1
  195. package/dist/{executor-BcNWcD-4.d.ts → executor-BWFfz0ik.d.ts} +2 -2
  196. package/dist/expo/index.d.ts +2 -2
  197. package/dist/{extension-B-lajjex.js → extension-DTaHjwdc.js} +3 -2
  198. package/dist/{extension-B0EjCYhO.js → extension-mGylYROs.js} +2 -10
  199. package/dist/{field-errors-Dt86dCKk.d.ts → field-errors-DqlebtTE.d.ts} +6 -6
  200. package/dist/{framework-BGdZVyPL.d.ts → framework-CF6zFU7a.d.ts} +3 -3
  201. package/dist/hono/index.d.ts +4 -4
  202. package/dist/{index-CcAmFNVi.d.ts → index-B8YjrfVl.d.ts} +2 -2
  203. package/dist/{index-CENWq3zb.d.ts → index-BCeTYhFk.d.ts} +1 -1
  204. package/dist/{index-Craf712U.d.ts → index-ClMN0f98.d.ts} +9 -9
  205. package/dist/{index-DZKCc2WM.d.ts → index-DUxXdQN_.d.ts} +3 -3
  206. package/dist/{index-Cc4mIQS8.d.ts → index-Dbb7BQdi.d.ts} +9 -4
  207. package/dist/{index-CTu-3fJB.d.ts → index-lB-8iPmY.d.ts} +3 -3
  208. package/dist/index.d.ts +1 -1
  209. package/dist/{instances-BHjCZoF8.js → instances-QOzIz9-q.js} +1 -1
  210. package/dist/list/index.d.ts +1 -1
  211. package/dist/{list-query-DYhgRTd5.d.ts → list-query-DxjuIHEL.d.ts} +1 -1
  212. package/dist/mapper/bin.js +6 -6
  213. package/dist/mcp/index.d.ts +4 -4
  214. package/dist/mcp/sdk/index.d.ts +2 -2
  215. package/dist/next/index.d.ts +14 -14
  216. package/dist/{operations-CSc_IsHO.d.ts → operations-Dc07aV_H.d.ts} +1 -1
  217. package/dist/{options-DChZoVfs.d.ts → options-B_NrjVDt.d.ts} +1 -0
  218. package/dist/{options-B2swWnJW.js → options-CCUaRLgd.js} +2 -1
  219. package/dist/{options-CM6-18FQ.d.ts → options-CDSCkYxu.d.ts} +1 -0
  220. package/dist/{options-C-dQHH5-.js → options-tSsUF0-7.js} +2 -1
  221. package/dist/orpc/index.d.ts +4 -4
  222. package/dist/otel/index.js +4 -4
  223. package/dist/{ports-mObLgH1z.d.ts → ports-DnpAuTvB.d.ts} +1 -1
  224. package/dist/powersync/index.d.ts +2 -2
  225. package/dist/preset/index.d.ts +3 -3
  226. package/dist/preset/index.js +3 -3
  227. package/dist/{preset-CsHnIBJF.js → preset-BIANzB5p.js} +2 -2
  228. package/dist/{push-token-BSSvsWXZ.d.ts → push-token-C_mFkYfq.d.ts} +1 -1
  229. package/dist/query/index.d.ts +1 -1
  230. package/dist/react/index.d.ts +5 -5
  231. package/dist/react/native/index.d.ts +1 -1
  232. package/dist/react/server.d.ts +6 -6
  233. package/dist/react-router/index.d.ts +3 -3
  234. package/dist/realtime/index.d.ts +3 -3
  235. package/dist/{record-form-D9ILuVtA.d.ts → record-form-xWvVcb86.d.ts} +1 -1
  236. package/dist/records/index.d.ts +7 -7
  237. package/dist/{resource-execute-Cpnob1Vj.d.ts → resource-execute-DqWfEc56.d.ts} +1 -1
  238. package/dist/{resource-types-pMeLs68X.d.ts → resource-types-BIoz_ElD.d.ts} +1 -1
  239. package/dist/{resources-7iq2-5_A.d.ts → resources-Bt2PDKE7.d.ts} +1 -1
  240. package/dist/server/index.d.ts +7 -7
  241. package/dist/{server-types-CK8mUIUT.d.ts → server-types-gR4Q1aM0.d.ts} +1 -1
  242. package/dist/{session-DWmFv3vB.d.ts → session-C1OuXbtN.d.ts} +1 -1
  243. package/dist/solid/index.d.ts +6 -6
  244. package/dist/solid-start/index.d.ts +3 -3
  245. package/dist/spec/index.d.ts +1 -1
  246. package/dist/sql/index.d.ts +5 -5
  247. package/dist/sql/index.js +3 -3
  248. package/dist/{sql-Dl3Alk43.js → sql-ClTmzHs8.js} +72 -31
  249. package/dist/sqlite/index.d.ts +1 -1
  250. package/dist/ssr/index.d.ts +1 -1
  251. package/dist/svelte/index.d.ts +6 -6
  252. package/dist/sveltekit/index.d.ts +4 -4
  253. package/dist/{tags-qvVk79pp.d.ts → tags-sM-CH9Mn.d.ts} +1 -1
  254. package/dist/tanstack-db/index.d.ts +1 -1
  255. package/dist/tanstack-start/index.d.ts +3 -3
  256. package/dist/{tenant-DOKIJI62.d.ts → tenant-DVvjw9H-.d.ts} +1 -1
  257. package/dist/testing/index.d.ts +7 -7
  258. package/dist/testing/index.js +3 -3
  259. package/dist/{timeline-CvTuXYvn.d.ts → timeline-BBfKuMVL.d.ts} +3 -3
  260. package/dist/{topic-CZXHhZye.d.ts → topic-BtLz-qTI.d.ts} +2 -2
  261. package/dist/{verify-CjvNLY7N.d.ts → verify-DEqY__0N.d.ts} +1 -1
  262. package/dist/vue/index.d.ts +6 -6
  263. package/dist/{watch-topic-BAxoPKZx.d.ts → watch-topic-tnfOTa3-.d.ts} +1 -1
  264. package/dist/yjs/index.d.ts +1 -1
  265. package/package.json +1 -1
  266. package/schemas/config-v1.json +22 -0
  267. package/schemas/doctor-report-v1.json +1 -0
  268. package/dist/cli/add-Bfb_ISrO.js +0 -1
  269. package/dist/cli/seed-D6XijwbR.js +0 -1
package/dist/cli/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { a as list, r as defineCliCommand } from "./command-CQ61x6gN.js";
2
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-MRET30vh.js";
3
- import { t as VERSION } from "./version-B2Dr6VmJ.js";
2
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-D48ZEU58.js";
3
+ import { t as VERSION } from "./version-T507a49w.js";
4
4
  import { n as CliError, t as CLI_ERRORS_URL } from "./errors-BTe6A15O.js";
5
- import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-uTUlEzY2.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-5y5a1QZr.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-D2gJHKwC.js";
8
- import { s as loadConfig } from "./config-9t5ec_N7.js";
9
- import { n as runGen } from "./run-Bs4OKdDI.js";
5
+ import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-C6vh_n3t.js";
6
+ import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-ChIwdIOJ.js";
7
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-BZbEK5if.js";
8
+ import { s as loadConfig } from "./config-2rwFHbwj.js";
9
+ import { n as runGen } from "./run-CLSHSVYo.js";
10
10
  //#region src/cli/introspect/from-catalog.ts
11
11
  /**
12
12
  * Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
@@ -2,14 +2,14 @@ import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CQ
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { n as CliError } from "./errors-BTe6A15O.js";
4
4
  import { r as readIfExists } from "./io-DH1kcmmP.js";
5
- import { l as TYPEGEN_VERSION } from "./cache-AznIssjI.js";
6
- import { a as findConfig, s as loadConfig } from "./config-9t5ec_N7.js";
7
- import { r as contentMapperFiles } from "./content-mapper-DCrz6OIv.js";
5
+ import { l as TYPEGEN_VERSION } from "./cache-oU0yHKf0.js";
6
+ import { a as findConfig, s as loadConfig } from "./config-2rwFHbwj.js";
7
+ import { r as contentMapperFiles } from "./content-mapper-DLbXilBz.js";
8
8
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
9
- import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-D7TkPdco.js";
10
- import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-BnnXPAro.js";
9
+ import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-DMcrsWjC.js";
10
+ import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-NtB3dsRU.js";
11
11
  import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
12
- import { s as enablePgDelta, t as syncModules } from "./sync-CZMRB3aU.js";
12
+ import { s as enablePgDelta, t as syncModules } from "./sync-CHGMZCJ5.js";
13
13
  import { existsSync } from "node:fs";
14
14
  import { join, posix, resolve } from "node:path";
15
15
  import { glob, readFile } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { r as errorText } from "./errors-BTe6A15O.js";
2
- import "./source-D2gJHKwC.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-BLqbvY2x.js";
2
+ import "./source-BZbEK5if.js";
3
+ import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-D0XBFSlz.js";
4
4
  //#region src/cli/doctor/reserved-roles.ts
5
5
  /**
6
6
  * Supautils' `reserved_roles` on Supabase. Nobody but a superuser may alter,
@@ -1,6 +1,6 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
2
- import { a as envelope, i as run } from "./run-MRET30vh.js";
3
- import { t as VERSION } from "./version-B2Dr6VmJ.js";
2
+ import { a as envelope, i as run } from "./run-D48ZEU58.js";
3
+ import { t as VERSION } from "./version-T507a49w.js";
4
4
  import { n as CliError } from "./errors-BTe6A15O.js";
5
5
  import { n as consentToken } from "./agent-CbuPvI2x.js";
6
6
  import { C as optional, D as record, N as unknown, a as array, d as is, j as string$1, k as safeParse, o as boolean, t as PROCESS_ENV, x as object } from "./env-DMgjB_4y.js";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
2
2
  import { i as readStdin } from "./io-DH1kcmmP.js";
3
- import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-uTUlEzY2.js";
4
- import { c as metaPaths, n as render } from "./render-5y5a1QZr.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-Bs4OKdDI.js";
3
+ import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-C6vh_n3t.js";
4
+ import { c as metaPaths, n as render } from "./render-ChIwdIOJ.js";
5
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-CLSHSVYo.js";
6
6
  import { basename, join, relative, resolve, sep } from "node:path";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import { jsonSchema, standardSchema, valibot, zod } from "better-supabase/config";
@@ -1,5 +1,5 @@
1
- import { f as INTEGRATIONS } from "./config-9t5ec_N7.js";
2
- import { c as splitStatements } from "./shared-BLqbvY2x.js";
1
+ import { f as INTEGRATIONS } from "./config-2rwFHbwj.js";
2
+ import { c as splitStatements } from "./shared-D0XBFSlz.js";
3
3
  import { dirname, join, posix } from "node:path";
4
4
  import { readdir } from "node:fs/promises";
5
5
  import { INTEGRATION_INFO, groupEntries } from "better-supabase/config";
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
2
2
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
3
3
  import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
4
4
  import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
5
- import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-lUWenjJw.js";
5
+ import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-26LSoifK.js";
6
6
  import { resolve } from "node:path";
7
7
  import { readFile, readdir } from "node:fs/promises";
8
8
  import { MODULE_ID_TYPES, compileReadSets, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, renderBlocks, resolveBlocks, scopeProblems, templateFunctions } from "better-supabase/sql";
@@ -1,5 +1,5 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { g as layout, o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-O_IxewFs.js";
2
+ import { g as layout, o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-mKhX88V_.js";
3
3
  import { existsSync } from "node:fs";
4
4
  import { resolve } from "node:path";
5
5
  import { SQL_MODULES, contractSignature, customContracts, moduleBody, moduleFilePaths } from "better-supabase/sql";
@@ -2,15 +2,15 @@ import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { n as CliError } from "./errors-BTe6A15O.js";
4
4
  import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
5
- import { _ as layoutFor } from "./module-migration-O_IxewFs.js";
5
+ import { _ as layoutFor } from "./module-migration-mKhX88V_.js";
6
6
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-CX71yBm8.js";
7
- import { a as sqlPlan } from "./sql-layout-lUWenjJw.js";
8
- import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-D7TkPdco.js";
7
+ import { a as sqlPlan } from "./sql-layout-26LSoifK.js";
8
+ import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-DMcrsWjC.js";
9
9
  import { t as detectProject } from "./detect-D9JaAX20.js";
10
10
  import { _ as wiringBlocks, a as configObject, c as mask, i as closingIndex, l as properties } from "./config-edit-CrWfk8s3.js";
11
- import { n as guardedRemoval } from "./sync-CZMRB3aU.js";
11
+ import { n as guardedRemoval } from "./sync-CHGMZCJ5.js";
12
12
  import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
13
- import { t as blockNames } from "./blocks-xk-SE8gS.js";
13
+ import { t as blockNames } from "./blocks-DSgTifw0.js";
14
14
  import { i as tidyInline, t as cutRange } from "./config-group-C8tjut39.js";
15
15
  import { existsSync } from "node:fs";
16
16
  import { resolve } from "node:path";
@@ -1,10 +1,10 @@
1
1
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
2
2
  import { n as importPath } from "./io-DH1kcmmP.js";
3
- import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-AznIssjI.js";
3
+ import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-oU0yHKf0.js";
4
4
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
5
- import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-uTUlEzY2.js";
5
+ import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-C6vh_n3t.js";
6
6
  import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
7
- import { a as toCatalog } from "./source-D2gJHKwC.js";
7
+ import { a as toCatalog } from "./source-BZbEK5if.js";
8
8
  import { basename, dirname, isAbsolute, join, posix, relative, resolve } from "node:path";
9
9
  import { entityNames } from "better-supabase/blocks";
10
10
  import { DEFAULT_CLAIMS, blockEntities, blockEntityRenames, blockSubjectTypes, tenantClaimPaths, tenantNameOf } from "better-supabase/config";
@@ -1627,7 +1627,7 @@ function schemaExtensions(config) {
1627
1627
  return [{
1628
1628
  export: manifest.extension,
1629
1629
  subpath: `blocks/${manifest.name}`,
1630
- args: manifest.name === "memberships" ? tenantArgs : ""
1630
+ args: manifest.name === "memberships" ? tenantArgs : STAMPED.has(manifest.name) ? stampArgs(name, config.blocks?.[name]?.options?.["stamp"]) : ""
1631
1631
  }];
1632
1632
  });
1633
1633
  if (tenant !== void 0 && !extensions.some((entry) => entry.subpath === "blocks/memberships")) extensions.push({
@@ -1637,6 +1637,12 @@ function schemaExtensions(config) {
1637
1637
  });
1638
1638
  return extensions;
1639
1639
  }
1640
+ const STAMPED = /* @__PURE__ */ new Set(["created-by", "updated-at"]);
1641
+ function stampArgs(name, stamp) {
1642
+ if (stamp === void 0 || stamp === "client") return "";
1643
+ if (stamp === "trigger") return "{ stamp: \"trigger\" }";
1644
+ throw new TypeError(`blocks.${name}.options.stamp must be "client" or "trigger", got ${JSON.stringify(stamp)}`);
1645
+ }
1640
1646
  /** The installed blocks with their final names, for `GeneratorModel.blocks`. */
1641
1647
  function generatorBlocks(config) {
1642
1648
  return Object.entries(blockConfigEntries(config)).filter(([, entry]) => entry.block === void 0).map(([name, entry]) => {
@@ -1,14 +1,14 @@
1
1
  import { r as errorText } from "./errors-BTe6A15O.js";
2
2
  import { a as sameText, t as display } from "./io-DH1kcmmP.js";
3
- import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-AznIssjI.js";
3
+ import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-oU0yHKf0.js";
4
4
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
5
- import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-uTUlEzY2.js";
6
- import { n as render } from "./render-5y5a1QZr.js";
7
- import { C as entitlementsMode, E as unsafeKey, S as entitlementRequirements, T as providerLabel, b as accessProviderMode, c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations, w as moduleKeyProblems, x as accessRequirements, y as compiledReadSets } from "./module-migration-O_IxewFs.js";
8
- import { s as schemaStampPath } from "./content-mapper-DCrz6OIv.js";
5
+ import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-C6vh_n3t.js";
6
+ import { n as render } from "./render-ChIwdIOJ.js";
7
+ import { C as entitlementsMode, E as unsafeKey, S as entitlementRequirements, T as providerLabel, b as accessProviderMode, c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations, w as moduleKeyProblems, x as accessRequirements, y as compiledReadSets } from "./module-migration-mKhX88V_.js";
8
+ import { s as schemaStampPath } from "./content-mapper-DLbXilBz.js";
9
9
  import { a as changedFiles, d as fileDiff, i as changeLines, r as applyPlan, s as hasConflicts } from "./files-CX71yBm8.js";
10
- import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-lUWenjJw.js";
11
- import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-BLqbvY2x.js";
10
+ import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-26LSoifK.js";
11
+ import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-D0XBFSlz.js";
12
12
  import { existsSync } from "node:fs";
13
13
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
14
14
  import { readFile } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { c as COMMANDS, d as GROUPS, f as RESERVED_NAMES, h as runCommand, i as joinRepeated, m as parseArgs$2, o as listArgs, s as runsWithInvalidConfig, t as GLOBAL_ARGS, u as DOCS_ORIGIN } from "./command-CQ61x6gN.js";
2
2
  import { n as highlight, r as painter } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-B2Dr6VmJ.js";
3
+ import { t as VERSION } from "./version-T507a49w.js";
4
4
  import { n as CliError, o as toCliError } from "./errors-BTe6A15O.js";
5
5
  import { a as missingInputNext, o as resolveAgent, t as checkConsent } from "./agent-CbuPvI2x.js";
6
6
  import { a as globalFlags, c as resolveCommand, i as commandTree, n as closestName, o as isVariadic, r as commandArgs, t as checkArgs } from "./parse-B9Iv_-Pf.js";
@@ -16,35 +16,35 @@ import { resolve } from "node:path";
16
16
  * loads on demand, so `--version` and `--help` import no command.
17
17
  */
18
18
  const LOADERS = [
19
- ["init", () => import("./init-CHj9ad4S.js").then((m) => m.initCommand)],
20
- ["add", () => import("./add-Bfb_ISrO.js").then((m) => m.addCommand)],
21
- ["remove", () => import("./remove-DK2G_KHm.js").then((m) => m.removeCommand)],
22
- ["upgrade", () => import("./upgrade-fVsJniXm.js").then((m) => m.upgradeCommand)],
23
- ["gen", () => import("./gen-CFkYUnWq.js").then((m) => m.genCommand)],
24
- ["doctor", () => import("./doctor-DkOSLPEQ.js").then((m) => m.doctorCommand)],
25
- ["db query", () => import("./db-DrBI_HNv.js").then((m) => m.dbQueryCommand)],
26
- ["db diff", () => import("./db-DrBI_HNv.js").then((m) => m.dbDiffCommand)],
27
- ["db seed", () => import("./seed-D6XijwbR.js").then((m) => m.seedCommand)],
28
- ["db backfill", () => import("./backfill-DIz5DnlQ.js").then((m) => m.dbBackfillCommand)],
19
+ ["init", () => import("./init-DrQlf9RL.js").then((m) => m.initCommand)],
20
+ ["add", () => import("./add-z-3pXI6C.js").then((m) => m.addCommand)],
21
+ ["remove", () => import("./remove-DfFXVBRr.js").then((m) => m.removeCommand)],
22
+ ["upgrade", () => import("./upgrade-GB9rqUGT.js").then((m) => m.upgradeCommand)],
23
+ ["gen", () => import("./gen-CeG6lbka.js").then((m) => m.genCommand)],
24
+ ["doctor", () => import("./doctor-CKt5Yyl4.js").then((m) => m.doctorCommand)],
25
+ ["db query", () => import("./db-Bwrr3GHM.js").then((m) => m.dbQueryCommand)],
26
+ ["db diff", () => import("./db-Bwrr3GHM.js").then((m) => m.dbDiffCommand)],
27
+ ["db seed", () => import("./seed-CUxW5Dks.js").then((m) => m.seedCommand)],
28
+ ["db backfill", () => import("./backfill-DxBB62Zr.js").then((m) => m.dbBackfillCommand)],
29
29
  ["dev env", () => import("./env-CAU1nknN.js").then((m) => m.envCommand)],
30
30
  ["dev run", () => import("./run-BXx6D1aR.js").then((m) => m.runCommand)],
31
31
  ["dev keys", () => import("./keys-DGEpMbeB.js").then((m) => m.keysCommand)],
32
32
  ["dev stack ls", () => import("./stack-CWEHdO0b.js").then((m) => m.stackLsCommand)],
33
33
  ["dev stack prune", () => import("./stack-CWEHdO0b.js").then((m) => m.stackPruneCommand)],
34
- ["blocks list", () => import("./blocks-Bp5RPoft.js").then((m) => m.blocksListCommand)],
35
- ["blocks view", () => import("./blocks-Bp5RPoft.js").then((m) => m.blocksViewCommand)],
36
- ["blocks search", () => import("./blocks-Bp5RPoft.js").then((m) => m.blocksSearchCommand)],
37
- ["spec emit", () => import("./spec-DUjOtciN.js").then((m) => m.specEmitCommand)],
38
- ["spec validate", () => import("./spec-DUjOtciN.js").then((m) => m.specValidateCommand)],
39
- ["mcp", () => import("./mcp-BZno503V.js").then((m) => m.mcpCommand)],
34
+ ["blocks list", () => import("./blocks-rxOS-Mzz.js").then((m) => m.blocksListCommand)],
35
+ ["blocks view", () => import("./blocks-rxOS-Mzz.js").then((m) => m.blocksViewCommand)],
36
+ ["blocks search", () => import("./blocks-rxOS-Mzz.js").then((m) => m.blocksSearchCommand)],
37
+ ["spec emit", () => import("./spec-C-dhdKwa.js").then((m) => m.specEmitCommand)],
38
+ ["spec validate", () => import("./spec-C-dhdKwa.js").then((m) => m.specValidateCommand)],
39
+ ["mcp", () => import("./mcp-BrOnGB15.js").then((m) => m.mcpCommand)],
40
40
  ["skills list", () => import("./skills-toUan_OV.js").then((m) => m.skillsListCommand)],
41
41
  ["skills install", () => import("./skills-toUan_OV.js").then((m) => m.skillsInstallCommand)],
42
- ["codemod 0.4", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.4"))],
43
- ["codemod 0.5", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.5"))],
44
- ["codemod 0.6", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.6"))],
45
- ["codemod 0.9", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.9"))],
46
- ["codemod 0.11", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.11"))],
47
- ["codemod 0.15", () => import("./codemod-Aewxza6i.js").then((m) => m.codemodCommand("0.15"))],
42
+ ["codemod 0.4", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.4"))],
43
+ ["codemod 0.5", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.5"))],
44
+ ["codemod 0.6", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.6"))],
45
+ ["codemod 0.9", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.9"))],
46
+ ["codemod 0.11", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.11"))],
47
+ ["codemod 0.15", () => import("./codemod-Dsrv_3gQ.js").then((m) => m.codemodCommand("0.15"))],
48
48
  ["completion", () => import("./completion-BwI0_Ap5.js").then((m) => m.completionCommand)],
49
49
  ["config", () => import("./config-CPux9Wa7.js").then((m) => m.configCommand)]
50
50
  ];
@@ -594,7 +594,7 @@ function cliFromTree(init, extra = {}) {
594
594
  try {
595
595
  const [loaded, { defaultConfig, discoverConfig, loadConfig }, { configEnvironment, isCi, parseEnv }] = await Promise.all([
596
596
  node.load(),
597
- import("./config-CBqkQjjN.js"),
597
+ import("./config-C6XylzKz.js"),
598
598
  import("./env-C-Bl6Awn.js")
599
599
  ]);
600
600
  command = loaded;
@@ -1,11 +1,11 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
2
2
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
3
3
  import { t as display } from "./io-DH1kcmmP.js";
4
- import { l as stdinDatabaseUrl, n as databaseUrl, o as importExport } from "./config-9t5ec_N7.js";
4
+ import { l as stdinDatabaseUrl, n as databaseUrl, o as importExport } from "./config-2rwFHbwj.js";
5
5
  import { m as supabaseDir } from "./supabase-toml-CncmQbO0.js";
6
6
  import { t as connect } from "./db-CQCLx7cx.js";
7
7
  import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, s as hasConflicts, u as planResult } from "./files-CX71yBm8.js";
8
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-IpJRJO5t.js";
8
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-MTLYpifA.js";
9
9
  import { existsSync } from "node:fs";
10
10
  import { resolve } from "node:path";
11
11
  import { readFile } from "node:fs/promises";
@@ -0,0 +1 @@
1
+ export { n as seedCommand } from "./seed-CG-pA-5N.js";
@@ -1,4 +1,4 @@
1
- import { a as toCatalog } from "./source-D2gJHKwC.js";
1
+ import { a as toCatalog } from "./source-BZbEK5if.js";
2
2
  import { h as tomlGet, p as sqlWorkflow, r as detectWorkflow } from "./supabase-toml-CncmQbO0.js";
3
3
  //#region src/cli/doctor/shared.ts
4
4
  const catalogs = /* @__PURE__ */ new WeakMap();
@@ -1,8 +1,8 @@
1
1
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
2
- import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-AznIssjI.js";
2
+ import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-oU0yHKf0.js";
3
3
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
4
- import { n as managementSource, r as pgSource } from "./source-D2gJHKwC.js";
5
- import { n as databaseUrl, u as accessToken } from "./config-9t5ec_N7.js";
4
+ import { n as managementSource, r as pgSource } from "./source-BZbEK5if.js";
5
+ import { n as databaseUrl, u as accessToken } from "./config-2rwFHbwj.js";
6
6
  import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
7
7
  import { t as connect } from "./db-CQCLx7cx.js";
8
8
  import { existsSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-B2Dr6VmJ.js";
1
+ import { t as VERSION } from "./version-T507a49w.js";
2
2
  import { n as CliError } from "./errors-BTe6A15O.js";
3
3
  import { r as redactUrl } from "./redact-KGAk2Ul9.js";
4
4
  import { n as HTTP_CHANNEL } from "./trace-VbdO6bcN.js";
@@ -1,5 +1,5 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { l as stdinDatabaseUrl } from "./config-9t5ec_N7.js";
2
+ import { l as stdinDatabaseUrl } from "./config-2rwFHbwj.js";
3
3
  //#region src/cli/commands/source-args.ts
4
4
  /**
5
5
  * The connection string from stdin, for commands that connect but read no
@@ -1,9 +1,9 @@
1
1
  import { n as __require, t as __commonJSMin } from "./rolldown-runtime-kJ_i4yPo.js";
2
2
  import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
3
- import { t as VERSION } from "./version-B2Dr6VmJ.js";
3
+ import { t as VERSION } from "./version-T507a49w.js";
4
4
  import { i as failedResult, n as CliError, r as errorText } from "./errors-BTe6A15O.js";
5
5
  import { t as display } from "./io-DH1kcmmP.js";
6
- import { c as writeAtomic, t as CACHE_DIR } from "./cache-AznIssjI.js";
6
+ import { c as writeAtomic, t as CACHE_DIR } from "./cache-oU0yHKf0.js";
7
7
  import { t as isRecord } from "./guards-CUlDNYZs.js";
8
8
  import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
9
9
  import { a as changedFiles, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
@@ -1 +1 @@
1
- export { n as specEmitCommand, i as specValidateCommand } from "./spec-Cm2einTO.js";
1
+ export { n as specEmitCommand, i as specValidateCommand } from "./spec-B4LhpI6t.js";
@@ -1,5 +1,5 @@
1
- import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-uTUlEzY2.js";
2
- import { a as toCatalog } from "./source-D2gJHKwC.js";
1
+ import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-C6vh_n3t.js";
2
+ import { a as toCatalog } from "./source-BZbEK5if.js";
3
3
  import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative, resolve, sep } from "node:path";
@@ -1,9 +1,9 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
2
  import { t as display } from "./io-DH1kcmmP.js";
3
- import { _ as layoutFor, c as sameModuleMigration, d as DATA_NEXT, l as writeLatestMigration, m as writeExtensionsMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-O_IxewFs.js";
3
+ import { _ as layoutFor, c as sameModuleMigration, d as DATA_NEXT, l as writeLatestMigration, m as writeExtensionsMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-mKhX88V_.js";
4
4
  import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, o as findSupabaseRoot, p as sqlWorkflow, t as PGDELTA_TABLE } from "./supabase-toml-CncmQbO0.js";
5
5
  import { d as fileDiff, i as changeLines, l as keepHandEdit, o as handEditedError, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-CX71yBm8.js";
6
- import { a as sqlPlan, n as migrationsDir } from "./sql-layout-lUWenjJw.js";
6
+ import { a as sqlPlan, n as migrationsDir } from "./sql-layout-26LSoifK.js";
7
7
  import { t as loadTopics } from "./topics-BpdnYmWb.js";
8
8
  import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
9
9
  import { dirname, join, resolve } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { t as display } from "./io-DH1kcmmP.js";
2
- import { _ as layoutFor, a as migrationInstances, c as sameModuleMigration, o as migrationModules, p as migrationStamp, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-O_IxewFs.js";
2
+ import { _ as layoutFor, a as migrationInstances, c as sameModuleMigration, o as migrationModules, p as migrationStamp, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-mKhX88V_.js";
3
3
  import { d as fileDiff, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
4
- import { a as sqlPlan, n as migrationsDir } from "./sql-layout-lUWenjJw.js";
5
- import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-CZMRB3aU.js";
4
+ import { a as sqlPlan, n as migrationsDir } from "./sql-layout-26LSoifK.js";
5
+ import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-CHGMZCJ5.js";
6
6
  import { a as legacyPrefixSql, i as legacyPrefixNames, r as legacyBlocksTableSql } from "./legacy-prefix-DkTA3Rhx.js";
7
7
  import { resolve } from "node:path";
8
8
  import { readFile } from "node:fs/promises";
@@ -1,8 +1,8 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as syncModules } from "./sync-CZMRB3aU.js";
3
+ import { t as syncModules } from "./sync-CHGMZCJ5.js";
4
4
  import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
5
- import { t as upgrade } from "./upgrade-BFEIMC7U.js";
5
+ import { t as upgrade } from "./upgrade-C0dVsqNX.js";
6
6
  //#region src/cli/commands/upgrade.ts
7
7
  const UPGRADE_ARGS = {
8
8
  check: {
@@ -1,4 +1,4 @@
1
1
  //#region src/cli/version.ts
2
- const VERSION = "0.16.0";
2
+ const VERSION = "0.17.0";
3
3
  //#endregion
4
4
  export { VERSION as t };
@@ -1,8 +1,8 @@
1
1
  import { a as DataSync, c as LocalTablesOption, i as DataEntry, l as liveEngine, n as DataEngine, o as DataSyncState, r as DataEngineOptions, s as LiveEngineOptions, t as DataChanges, u as memoryEngine } from "../data-engine-BWoz9lED.js";
2
- import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-BAxoPKZx.js";
3
- import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../ports-mObLgH1z.js";
4
- import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../bind-JGCPGUJh.js";
5
- import { a as defineController, i as ControllerState, n as Controller, o as whileSignedIn, r as ControllerParts, t as AuthPort } from "../controller-BW-5Opig.js";
2
+ import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-tnfOTa3-.js";
3
+ import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../ports-DnpAuTvB.js";
4
+ import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../bind-C801IaK-.js";
5
+ import { a as defineController, i as ControllerState, n as Controller, o as whileSignedIn, r as ControllerParts, t as AuthPort } from "../controller-CJUXhshv.js";
6
6
  import { n as FunctionContract } from "../function-contract-DxFNOmsm.js";
7
- import { a as webDeepLinks, c as webPorts, d as FunctionContracts, f as FunctionsHost, h as functions, i as WebPushTokenOptions, l as webPushToken, m as TypedFunctions, n as createClient, o as webFilePicker, p as InvokeOptions, r as PushRegistrationLike, s as webKeyboard, t as ClientOptions, u as webStorage } from "../index-DZKCc2WM.js";
7
+ import { a as webDeepLinks, c as webPorts, d as FunctionContracts, f as FunctionsHost, h as functions, i as WebPushTokenOptions, l as webPushToken, m as TypedFunctions, n as createClient, o as webFilePicker, p as InvokeOptions, r as PushRegistrationLike, s as webKeyboard, t as ClientOptions, u as webStorage } from "../index-DUxXdQN_.js";
8
8
  export { type AuthPort, type AuthSnapshot, type AuthUser, type BetterClient, type BindClientOptions, type ClientAuth, ClientOptions, type ClientPorts, type Controller, type ControllerParts, type ControllerState, type DataChanges, type DataEngine, type DataEngineOptions, type DataEntry, type DataSync, type DataSyncState, type DeepLinkPort, type FilePickerPort, type FunctionContract, type FunctionContracts, type FunctionsHost, type InvokeOptions, type KeyboardPort, type LiveEngineOptions, type LocalTablesOption, type PickFilesOptions, type PickedFile, type PushRegistrationLike, type PushTokenPort, type Shortcut, type StoragePort, type TopicHandle, type TopicPort, type TopicWatch, type TypedFunctions, type UploadDestination, type UploadPort, type WebPushTokenOptions, bindClient, createClient, defineController, functions, liveEngine, memoryEngine, memoryStorage, storageUpload, webDeepLinks, webFilePicker, webKeyboard, webPorts, webPushToken, webStorage, whileSignedIn };
@@ -1,9 +1,9 @@
1
1
  import { t as AsyncResult } from "../../result-DZeA5KS6.js";
2
2
  import { T as UploadOptions, w as UploadBody } from "../../bucket-vc-QRrva.js";
3
- import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-BAxoPKZx.js";
4
- import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-mObLgH1z.js";
5
- import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-JGCPGUJh.js";
6
- import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-BSSvsWXZ.js";
3
+ import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-tnfOTa3-.js";
4
+ import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-DnpAuTvB.js";
5
+ import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-C801IaK-.js";
6
+ import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-C_mFkYfq.js";
7
7
  import { a as OAuthSignInOptions, c as linkParams, i as OAuthClient, l as signInWithOAuthBrowser, n as AuthLinkClient, o as WebBrowserLike, r as AuthLinkResult, s as handleAuthDeepLink, t as AuthFailure } from "../../auth-link-B4NL84XU.js";
8
8
  import { SupabaseClient } from "@supabase/supabase-js";
9
9
  //#region src/client/native/auto-refresh.d.ts
@@ -1,9 +1,9 @@
1
1
  import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
2
2
  import { r as AuthState } from "./resolve-CXX6DHv3.js";
3
- import { t as BetterSupabase, v as Db } from "./define-C5AcEkEJ.js";
4
- import { a as ServerContext, b as ReplicaState, c as ServerOptions, n as BetterServer } from "./server-types-CK8mUIUT.js";
3
+ import { t as BetterSupabase, v as Db } from "./define-Cgru0_kF.js";
4
+ import { a as ServerContext, b as ReplicaState, c as ServerOptions, n as BetterServer } from "./server-types-gR4Q1aM0.js";
5
5
  import { t as ActiveSupport } from "./support-B4ZBVxt3.js";
6
- import { n as SessionEntryConfig } from "./session-DWmFv3vB.js";
6
+ import { n as SessionEntryConfig } from "./session-C1OuXbtN.js";
7
7
  import { r as GuardOptions } from "./respond-Dn1_YhC1.js";
8
8
  import { SupabaseClient } from "@supabase/supabase-js";
9
9
  import { Entry, SingleKeyEntry } from "@supabase/middleware";
@@ -1,6 +1,6 @@
1
1
  import { M as Casing } from "../types-DFdg_4yN.js";
2
- import { C as EntityConfig, S as EntitiesConfig, a as AuthorizationProvider, b as DEFAULT_ACTIVE_TENANT, c as AuthorizationScope, d as AccessBlockConfig, f as ActiveTenantSource, g as BlockMode, i as AuthorizationPermission, k as tenantNameOf, l as AuthorizationTokenHook, m as BlockConfig, n as AuthorizationMembership, o as AuthorizationRequirement, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, u as providerApiProblem, v as BlockScope, x as DisabledRow, y as BlocksConfig } from "../authorization-HZdJCaVm.js";
3
- import { $ as blockEntrySource, $n as APP_COLUMN_ACCESS, $r as RpcTypeReference, $t as ResolvedExtensions, A as ValibotGeneratorOptions, Ai as SkillsConfig, An as ExposePrivilege, Ar as CatalogIndex, At as GeneratedFile, B as jsonSchema, Br as ForeignKeyAction, Bt as GeneratorInputSchema, Ci as GenConfig, Cn as TopicTriggerPayloadValueConfig, Cr as CatalogColumn, D as ZodFlavor, Di as MigrationSafetyConfig, Dn as VectorSearchConfig, Dr as CatalogFunction, Dt as resolveJsonSchema, Ei as KeysConfig, En as VectorDistance, Er as CatalogForeignKey, F as nuqs, Fi as SKILLS_AGENTS, Fr as ExtrasDomain, Ft as GeneratorEntitySchemas, G as tenantClaimPaths, Gr as PostgresColumn, Gt as JsonSchemaSource, H as ClaimPaths, Hr as SnapshotBucket, Ht as GeneratorModel, I as FactoriesGeneratorOptions, Ir as ExtrasFunction, It as GeneratorField, J as blockEntityRenames, Jn as CONFIG_DEFAULTS, Jr as RpcFunction, Jt as SourceConfig, K as BlockEntity, Kr as PostgresFunction, Kt as JsonTypeConfig, L as factories, Lr as ExtrasHook, Lt as GeneratorFunction, M as StandardSchemaGeneratorOptions, Mi as INTEGRATION_INFO, Mn as Privilege, Mr as CatalogTable, Mt as GeneratorBlock, N as standardSchema, Ni as INTEGRATION_NAMES, Nn as ResolvedExpose, Nr as CatalogTrigger, Nt as GeneratorBlockEntity, O as ZodGeneratorOptions, Oi as OpenApiConfig, On as ColumnPrivilege, Or as CatalogFunctionArg, Ot as ClaimsConfig, P as NuqsGeneratorOptions, Pi as IntegrationInfo, Pr as CatalogUnique, Pt as GeneratorColumn, Q as RENAMED_CONFIG_KEYS, Qr as RpcReturnColumn, Qt as ResolvedConfig, R as JsonSchemaGeneratorOptions, Rr as ExtrasHookFunction, Rt as GeneratorFunctionArg, Si as EnvFileConfig, Sn as TopicTriggerLookupConfig, Sr as CatalogCheck, Ti as IntegrationName, Tn as TopicTriggerValueConfig, Tr as CatalogEnum, U as DEFAULT_CLAIMS, Ur as SnapshotExtras, Ut as GeneratorNoun, V as JsonSchemaTarget, Vr as Snapshot, Vt as GeneratorJsonSchema, W as claimPaths, Wr as GeneratorMetadata, Wt as GeneratorTable, X as CONFIG_GROUPS, Xr as RpcFunctionOverload, Xt as DataHooksFramework, Y as blockSubjectTypes, Yr as RpcFunctionArg, Yt as TableConfig, Z as RENAMED_BLOCK_KEYS, Zr as RpcFunctionReturns, Zt as FlatConfig, _n as ResolvedSqlConfig, _r as AppTableEvents, an as BlockInput, ar as AppColumnAccess, at as defineConfig, bn as SqlWorkflow, br as AppTablesConfig, cn as EnvironmentConfig, cr as AppColumnType, ct as BlockTableReference, dn as SqlInput, dr as AppReference, dt as RoleNames, en as ApiConfig, er as APP_COLUMN_FORMATS, et as flattenConfig, fn as ToolingConfig, fr as AppReferenceTarget, ft as TypedReference, gn as RealtimeConfig, gr as AppTableEventKind, hn as BucketConfig, hr as AppTableConfig, in as BetterSupabaseConfig, ir as APP_TABLE_EVENT_KINDS, it as CONFIG_SCHEMA_URL, j as valibot, ji as GEN_TASKS, jn as ExposeRole, jr as CatalogPolicy, jt as Generator, k as zod, ki as SkillsAgent, kn as ExposeConfig, kr as CatalogGrant, kt as CodecsConfig, ln as GenGroupConfig, lr as AppLookupConfig, lt as BucketName, mn as EntitlementsConfig, mr as AppRollupConfig, mt as ExpandedConfig, nn as AppTablesInput, nr as APP_ON_DELETE_ACTIONS, nt as groupEntries, on as BlocksInput, or as AppColumnConfig, ot as resolveConfig, pn as EntitlementPlansSource, pr as AppRollupAggregate, q as blockEntities, qr as PostgresFunctionArg, qt as RelationsConfig, rn as AuthConfig, rr as APP_ROLLUP_AGGREGATES, rt as hasFlatTables, sn as DatabaseConfig, sr as AppColumnFormat, st as AppTableNames, tn as AppTableInput, tr as APP_COLUMN_TYPES, tt as groupConfig, un as OrganizationConfig, ur as AppOnDeleteAction, ut as ConfigReferences, vn as SeedConfig, vr as AppTableSubject, wi as GenTask, wn as TopicTriggerTopicConfig, wr as CatalogColumnGrant, xi as DoctorConfig, xn as TopicTriggerConfig, xr as Catalog, yn as SqlConfig, yr as AppTableVersions, z as buildJsonSchema, zr as ExtrasTable, zt as GeneratorInput } from "../context-8kb8m5uO.js";
2
+ import { A as tenantNameOf, C as EntityConfig, D as OwnTablePolicies, S as EntitiesConfig, a as AuthorizationProvider, b as DEFAULT_ACTIVE_TENANT, c as AuthorizationScope, d as AccessBlockConfig, f as ActiveTenantSource, g as BlockMode, i as AuthorizationPermission, l as AuthorizationTokenHook, m as BlockConfig, n as AuthorizationMembership, o as AuthorizationRequirement, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, u as providerApiProblem, v as BlockScope, x as DisabledRow, y as BlocksConfig } from "../authorization-CNsvnwle.js";
3
+ import { $ as blockEntrySource, $n as APP_COLUMN_ACCESS, $r as RpcTypeReference, $t as ResolvedExtensions, A as ValibotGeneratorOptions, Ai as SkillsConfig, An as ExposePrivilege, Ar as CatalogIndex, At as GeneratedFile, B as jsonSchema, Br as ForeignKeyAction, Bt as GeneratorInputSchema, Ci as GenConfig, Cn as TopicTriggerPayloadValueConfig, Cr as CatalogColumn, D as ZodFlavor, Di as MigrationSafetyConfig, Dn as VectorSearchConfig, Dr as CatalogFunction, Dt as resolveJsonSchema, Ei as KeysConfig, En as VectorDistance, Er as CatalogForeignKey, F as nuqs, Fi as SKILLS_AGENTS, Fr as ExtrasDomain, Ft as GeneratorEntitySchemas, G as tenantClaimPaths, Gr as PostgresColumn, Gt as JsonSchemaSource, H as ClaimPaths, Hr as SnapshotBucket, Ht as GeneratorModel, I as FactoriesGeneratorOptions, Ir as ExtrasFunction, It as GeneratorField, J as blockEntityRenames, Jn as CONFIG_DEFAULTS, Jr as RpcFunction, Jt as SourceConfig, K as BlockEntity, Kr as PostgresFunction, Kt as JsonTypeConfig, L as factories, Lr as ExtrasHook, Lt as GeneratorFunction, M as StandardSchemaGeneratorOptions, Mi as INTEGRATION_INFO, Mn as Privilege, Mr as CatalogTable, Mt as GeneratorBlock, N as standardSchema, Ni as INTEGRATION_NAMES, Nn as ResolvedExpose, Nr as CatalogTrigger, Nt as GeneratorBlockEntity, O as ZodGeneratorOptions, Oi as OpenApiConfig, On as ColumnPrivilege, Or as CatalogFunctionArg, Ot as ClaimsConfig, P as NuqsGeneratorOptions, Pi as IntegrationInfo, Pr as CatalogUnique, Pt as GeneratorColumn, Q as RENAMED_CONFIG_KEYS, Qr as RpcReturnColumn, Qt as ResolvedConfig, R as JsonSchemaGeneratorOptions, Rr as ExtrasHookFunction, Rt as GeneratorFunctionArg, Si as EnvFileConfig, Sn as TopicTriggerLookupConfig, Sr as CatalogCheck, Ti as IntegrationName, Tn as TopicTriggerValueConfig, Tr as CatalogEnum, U as DEFAULT_CLAIMS, Ur as SnapshotExtras, Ut as GeneratorNoun, V as JsonSchemaTarget, Vr as Snapshot, Vt as GeneratorJsonSchema, W as claimPaths, Wr as GeneratorMetadata, Wt as GeneratorTable, X as CONFIG_GROUPS, Xr as RpcFunctionOverload, Xt as DataHooksFramework, Y as blockSubjectTypes, Yr as RpcFunctionArg, Yt as TableConfig, Z as RENAMED_BLOCK_KEYS, Zr as RpcFunctionReturns, Zt as FlatConfig, _n as ResolvedSqlConfig, _r as AppTableEvents, an as BlockInput, ar as AppColumnAccess, at as defineConfig, bn as SqlWorkflow, br as AppTablesConfig, cn as EnvironmentConfig, cr as AppColumnType, ct as BlockTableReference, dn as SqlInput, dr as AppReference, dt as RoleNames, en as ApiConfig, er as APP_COLUMN_FORMATS, et as flattenConfig, fn as ToolingConfig, fr as AppReferenceTarget, ft as TypedReference, gn as RealtimeConfig, gr as AppTableEventKind, hn as BucketConfig, hr as AppTableConfig, in as BetterSupabaseConfig, ir as APP_TABLE_EVENT_KINDS, it as CONFIG_SCHEMA_URL, j as valibot, ji as GEN_TASKS, jn as ExposeRole, jr as CatalogPolicy, jt as Generator, k as zod, ki as SkillsAgent, kn as ExposeConfig, kr as CatalogGrant, kt as CodecsConfig, ln as GenGroupConfig, lr as AppLookupConfig, lt as BucketName, mn as EntitlementsConfig, mr as AppRollupConfig, mt as ExpandedConfig, nn as AppTablesInput, nr as APP_ON_DELETE_ACTIONS, nt as groupEntries, on as BlocksInput, or as AppColumnConfig, ot as resolveConfig, pn as EntitlementPlansSource, pr as AppRollupAggregate, q as blockEntities, qr as PostgresFunctionArg, qt as RelationsConfig, rn as AuthConfig, rr as APP_ROLLUP_AGGREGATES, rt as hasFlatTables, sn as DatabaseConfig, sr as AppColumnFormat, st as AppTableNames, tn as AppTableInput, tr as APP_COLUMN_TYPES, tt as groupConfig, un as OrganizationConfig, ur as AppOnDeleteAction, ut as ConfigReferences, vn as SeedConfig, vr as AppTableSubject, wi as GenTask, wn as TopicTriggerTopicConfig, wr as CatalogColumnGrant, xi as DoctorConfig, xn as TopicTriggerConfig, xr as Catalog, yn as SqlConfig, yr as AppTableVersions, z as buildJsonSchema, zr as ExtrasTable, zt as GeneratorInput } from "../context-CKCgjEDF.js";
4
4
  import { n as SubjectsConfig, t as SubjectConfig } from "../subjects-DvmQeF_F.js";
5
5
  import { a as FieldFormat, o as FieldFormatInput, r as FIELD_FORMATS } from "../field-formats-CAFNkKSN.js";
6
- export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableNames, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksFramework, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OrganizationConfig, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectsConfig, type TableConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type TypedReference, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
6
+ export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableNames, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksFramework, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OrganizationConfig, type OwnTablePolicies, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectsConfig, type TableConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type TypedReference, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
@@ -1,8 +1,8 @@
1
- import { o as resolveJsonSchema, s as CONFIG_DEFAULTS } from "../instances-BHjCZoF8.js";
2
- import { A as flattenConfig, D as RENAMED_BLOCK_KEYS, E as CONFIG_GROUPS, F as INTEGRATION_INFO, I as INTEGRATION_NAMES, L as SKILLS_AGENTS, M as groupEntries, N as hasFlatTables, O as RENAMED_CONFIG_KEYS, P as GEN_TASKS, j as groupConfig, k as blockEntrySource } from "../config-CcehOvbz.js";
1
+ import { o as resolveJsonSchema, s as CONFIG_DEFAULTS } from "../instances-QOzIz9-q.js";
2
+ import { A as flattenConfig, D as RENAMED_BLOCK_KEYS, E as CONFIG_GROUPS, F as INTEGRATION_INFO, I as INTEGRATION_NAMES, L as SKILLS_AGENTS, M as groupEntries, N as hasFlatTables, O as RENAMED_CONFIG_KEYS, P as GEN_TASKS, j as groupConfig, k as blockEntrySource } from "../config-CIBc79_8.js";
3
3
  import { a as tenantClaimPaths, r as claimPaths, t as DEFAULT_CLAIMS } from "../claims-Bp9My7XP.js";
4
- import { C as APP_ON_DELETE_ACTIONS, O as DEFAULT_ACTIVE_TENANT, S as APP_COLUMN_TYPES, T as APP_TABLE_EVENT_KINDS, b as APP_COLUMN_ACCESS, j as tenantNameOf, w as APP_ROLLUP_AGGREGATES, x as APP_COLUMN_FORMATS } from "../app-tables-D29Rahtg.js";
4
+ import { C as APP_ON_DELETE_ACTIONS, O as DEFAULT_ACTIVE_TENANT, S as APP_COLUMN_TYPES, T as APP_TABLE_EVENT_KINDS, b as APP_COLUMN_ACCESS, j as tenantNameOf, w as APP_ROLLUP_AGGREGATES, x as APP_COLUMN_FORMATS } from "../app-tables-Q0TYfeih.js";
5
5
  import { r as FIELD_FORMATS } from "../field-formats-C6QKA3UR.js";
6
- import { a as factories, c as resolveConfig, d as blockSubjectTypes, f as providerApiProblem, i as nuqs, l as blockEntities, n as valibot, o as CONFIG_SCHEMA_URL, r as standardSchema, s as defineConfig, t as zod, u as blockEntityRenames } from "../config-DWGgUQCh.js";
6
+ import { a as factories, c as resolveConfig, d as blockSubjectTypes, f as providerApiProblem, i as nuqs, l as blockEntities, n as valibot, o as CONFIG_SCHEMA_URL, r as standardSchema, s as defineConfig, t as zod, u as blockEntityRenames } from "../config-BVNNJwGC.js";
7
7
  import { n as jsonSchema, t as buildJsonSchema } from "../json-schema-Ca6gYbEP.js";
8
8
  export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, FIELD_FORMATS, GEN_TASKS, INTEGRATION_INFO, INTEGRATION_NAMES, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, SKILLS_AGENTS, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
@@ -1,8 +1,8 @@
1
- import { a as resolveNames, i as resolveInstances, s as CONFIG_DEFAULTS, t as blocksByName } from "./instances-BHjCZoF8.js";
2
- import { A as flattenConfig, n as expandFlatPreset, r as expandPreset } from "./config-CcehOvbz.js";
1
+ import { a as resolveNames, i as resolveInstances, s as CONFIG_DEFAULTS, t as blocksByName } from "./instances-QOzIz9-q.js";
2
+ import { A as flattenConfig, n as expandFlatPreset, r as expandPreset } from "./config-CIBc79_8.js";
3
3
  import { t as DEFAULT_CLAIMS } from "./claims-Bp9My7XP.js";
4
4
  import { o as tenantNames } from "./entity-naming-Dtyq5sKE.js";
5
- import { A as resolveBlock, E as PRESET_CATALOG, d as appTablesOf, f as withAppTableSubjects, j as tenantNameOf } from "./app-tables-D29Rahtg.js";
5
+ import { A as resolveBlock, E as PRESET_CATALOG, d as appTablesOf, f as withAppTableSubjects, j as tenantNameOf } from "./app-tables-Q0TYfeih.js";
6
6
  import { C as variantsFor, S as variantTitle, _ as schemaName, a as extraSchemas, b as tableEntries, c as resultType, d as fieldSpec, f as fieldsFor, g as rowType, h as propertyKey, i as extraKinds, l as HEADER, m as parseImport, o as fieldMetaLines, p as optionalLine, s as objectType, u as fieldDocs, v as siblingPath, x as temporalGuardImport, y as tableDocs } from "./json-schema-Ca6gYbEP.js";
7
7
  //#region src/config/authorization.ts
8
8
  /**
@@ -215,7 +215,7 @@ function blocksOf(blocks, sql = {}, provider) {
215
215
  config: withSqlDefaults(instance.config, sql)
216
216
  }]));
217
217
  const blockNames = [...new Set(Object.values(instances).map((instance) => instance.block))];
218
- const resolved = Array.isArray(blocks) && sql.schema === void 0 && sql.api === void 0 ? {} : blocksByName(instances);
218
+ const resolved = Array.isArray(blocks) && sql.schema === void 0 && sql.api === void 0 && sql.ownTablePolicies === void 0 ? {} : blocksByName(instances);
219
219
  if (!provider || !blockNames.includes("permissions") || resolved.permissions?.model !== void 0) return {
220
220
  blocks: resolved,
221
221
  blockNames,
@@ -238,11 +238,12 @@ function blocksOf(blocks, sql = {}, provider) {
238
238
  * block's `api: false` keeps it out of the API schema.
239
239
  */
240
240
  function withSqlDefaults(block, sql) {
241
- const { schema, api } = sql;
241
+ const { schema, api, ownTablePolicies } = sql;
242
242
  return {
243
243
  ...block,
244
244
  ...schema === void 0 || block.schema !== void 0 ? {} : { schema },
245
- ...api === void 0 || block.api !== void 0 ? {} : { api }
245
+ ...api === void 0 || block.api !== void 0 ? {} : { api },
246
+ ...ownTablePolicies === void 0 || block.ownTablePolicies !== void 0 ? {} : { ownTablePolicies }
246
247
  };
247
248
  }
248
249
  const CONFIG_SCHEMA_URL = "https://unpkg.com/better-supabase/schemas/config-v1.json";
@@ -1,5 +1,5 @@
1
1
  import { t as DEFAULT_TENANT } from "./entity-naming-Dtyq5sKE.js";
2
- import { E as PRESET_CATALOG, k as asBlocksConfig } from "./app-tables-D29Rahtg.js";
2
+ import { E as PRESET_CATALOG, k as asBlocksConfig } from "./app-tables-Q0TYfeih.js";
3
3
  //#region src/config/names.ts
4
4
  /** The steps `better-supabase gen` runs, in the order it runs them. */
5
5
  const GEN_TASKS = [
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { M as Casing, P as ClaimsMeta, T as AccessBucketPolicy, _t as BucketLifecycle, j as BucketPolicyName, ot as SchemaMeta } from "./types-DFdg_4yN.js";
3
- import { D as ResolvedBlock, E as NamedInstance, F as BlockNameRegistry, P as TablesOf, T as InstanceOn, _ as BlockName, a as AuthorizationProvider, d as AccessBlockConfig, g as BlockMode, h as BlockConfigOf, m as BlockConfig, n as AuthorizationMembership, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, v as BlockScope, w as InstanceKeys, x as DisabledRow, y as BlocksConfig } from "./authorization-HZdJCaVm.js";
4
- import { Mn as EntityNames, Nn as EntityNoun, Pn as EntityRename, R as PortName, Ut as ActionDescriptor, Xt as BlockSchedule, Zt as DefaultAutomation, _ as BlockProvider, g as BlockEnvKey, i as BlockCategory, y as BlockWorker } from "./define-block-C1RHXz7L.js";
3
+ import { D as OwnTablePolicies, E as NamedInstance, F as TablesOf, I as BlockNameRegistry, O as ResolvedBlock, T as InstanceOn, _ as BlockName, a as AuthorizationProvider, d as AccessBlockConfig, g as BlockMode, h as BlockConfigOf, m as BlockConfig, n as AuthorizationMembership, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, v as BlockScope, w as InstanceKeys, x as DisabledRow, y as BlocksConfig } from "./authorization-CNsvnwle.js";
4
+ import { Mn as EntityNames, Nn as EntityNoun, Pn as EntityRename, R as PortName, Ut as ActionDescriptor, Xt as BlockSchedule, Zt as DefaultAutomation, _ as BlockProvider, g as BlockEnvKey, i as BlockCategory, y as BlockWorker } from "./define-block-Xxw8Hroe.js";
5
5
  import { a as ScalarKind, i as FieldSpec } from "./table-schema-BlF6k62Q.js";
6
6
  import { n as SubjectsConfig } from "./subjects-DvmQeF_F.js";
7
7
  import { i as FIELD_FORMAT_NAMES, s as FieldFormatName } from "./field-formats-CAFNkKSN.js";
@@ -1493,6 +1493,13 @@ interface SqlConfig {
1493
1493
  * every signed-in user reads and writes).
1494
1494
  */
1495
1495
  readonly scope?: BlockScope;
1496
+ /**
1497
+ * Whose policies govern the app's tables a block runs over, unless
1498
+ * `blocks.<name>.ownTablePolicies` sets its own: `block` (the default) or
1499
+ * `app`, which keeps every `bsb_` policy, permissive or restrictive, off
1500
+ * them.
1501
+ */
1502
+ readonly ownTablePolicies?: OwnTablePolicies;
1496
1503
  }
1497
1504
  /** `sql` with defaults applied. */
1498
1505
  interface ResolvedSqlConfig {