better-supabase 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/dist/{agents-CMIB3802.d.ts → agents-CM_cCtcr.d.ts} +4 -4
  2. package/dist/{ai-cache-2LGgaT7F.d.ts → ai-cache-BTGqckta.d.ts} +4 -4
  3. package/dist/{ai-chat-BCaKsvLW.d.ts → ai-chat-B7_vQvxU.d.ts} +4 -4
  4. package/dist/{ai-schedules-yGZH-vQb.d.ts → ai-schedules-CZEfo-_M.d.ts} +5 -5
  5. package/dist/ai-sdk/agents/index.d.ts +6 -6
  6. package/dist/ai-sdk/batches/index.d.ts +3 -3
  7. package/dist/ai-sdk/cache/index.d.ts +1 -1
  8. package/dist/ai-sdk/chat/index.d.ts +1 -1
  9. package/dist/ai-sdk/embeddings/index.d.ts +2 -2
  10. package/dist/ai-sdk/files/index.d.ts +1 -1
  11. package/dist/ai-sdk/index.d.ts +5 -5
  12. package/dist/ai-sdk/mcp/index.d.ts +3 -3
  13. package/dist/ai-sdk/memory/index.d.ts +3 -3
  14. package/dist/ai-sdk/workflow/index.d.ts +3 -3
  15. package/dist/{api-B1OkIWdx.d.ts → api-59rv5hL6.d.ts} +5 -5
  16. package/dist/{api-keys-ClhKBDcc.d.ts → api-keys-JE-aykZE.d.ts} +4 -4
  17. package/dist/{app-tables-62GqZIhd.d.ts → app-tables-yyVncXEt.d.ts} +1 -1
  18. package/dist/{approvals-C5fmPLsH.d.ts → approvals-BfEafAzt.d.ts} +5 -5
  19. package/dist/{assistant-ndGdOBax.d.ts → assistant-B49qATbj.d.ts} +2 -2
  20. package/dist/astro/index.d.ts +7 -7
  21. package/dist/{authorization-BCG1v0iC.d.ts → authorization-CDU9tYA_.d.ts} +17 -3
  22. package/dist/{authorization-hooks-DtzreCAq.d.ts → authorization-hooks-BWhkMZfH.d.ts} +2 -2
  23. package/dist/better-result/index.d.ts +3 -3
  24. package/dist/{bind-C54jD0r3.d.ts → bind-p7asfI6H.d.ts} +7 -7
  25. package/dist/{block-env-CM-LFfj4.d.ts → block-env-B8wG3xeh.d.ts} +4 -4
  26. package/dist/{block-helpers-CRpAHrp_.d.ts → block-helpers-D5emQ2O6.d.ts} +1 -1
  27. package/dist/{block-hooks-DZN2w69m.d.ts → block-hooks-B8itxzEE.d.ts} +2 -2
  28. package/dist/{block-subjects-CphkQPxp.d.ts → block-subjects-C1_9DkSA.d.ts} +1 -1
  29. package/dist/{block-transport-DWZSJrwN.d.ts → block-transport-9EUA3q_I.d.ts} +2 -2
  30. package/dist/blocks/access-requests/index.d.ts +5 -5
  31. package/dist/blocks/activities/index.d.ts +10 -10
  32. package/dist/blocks/activities/index.js +1 -1
  33. package/dist/blocks/agents/index.d.ts +4 -4
  34. package/dist/blocks/ai-cache/index.d.ts +3 -3
  35. package/dist/blocks/ai-chat/index.d.ts +7 -7
  36. package/dist/blocks/ai-files/index.d.ts +3 -3
  37. package/dist/blocks/ai-keys/index.d.ts +4 -4
  38. package/dist/blocks/ai-schedules/index.d.ts +3 -3
  39. package/dist/blocks/announcements/index.d.ts +8 -8
  40. package/dist/blocks/api-keys/index.d.ts +6 -6
  41. package/dist/blocks/approvals/index.d.ts +4 -4
  42. package/dist/blocks/assets/index.d.ts +6 -6
  43. package/dist/blocks/assignment/index.d.ts +7 -7
  44. package/dist/blocks/attachments/index.d.ts +4 -4
  45. package/dist/blocks/audit/index.d.ts +13 -13
  46. package/dist/blocks/automations/index.d.ts +12 -12
  47. package/dist/blocks/billable-time/index.d.ts +6 -6
  48. package/dist/blocks/billing/index.d.ts +9 -9
  49. package/dist/blocks/bookings/index.d.ts +4 -4
  50. package/dist/blocks/bulk/index.d.ts +4 -4
  51. package/dist/blocks/calendar/index.d.ts +5 -5
  52. package/dist/blocks/calendar/index.js +1 -1
  53. package/dist/blocks/catalog/index.d.ts +6 -6
  54. package/dist/blocks/channels/index.d.ts +7 -7
  55. package/dist/blocks/collections/index.d.ts +12 -12
  56. package/dist/blocks/collections/index.js +1 -1
  57. package/dist/blocks/comments/index.d.ts +10 -10
  58. package/dist/blocks/compliance/index.d.ts +5 -5
  59. package/dist/blocks/connectors/index.d.ts +4 -4
  60. package/dist/blocks/contacts/index.d.ts +7 -7
  61. package/dist/blocks/contacts/index.js +1 -1
  62. package/dist/blocks/content/index.d.ts +5 -5
  63. package/dist/blocks/contracts/index.d.ts +6 -6
  64. package/dist/blocks/courses/index.d.ts +5 -5
  65. package/dist/blocks/created-by/index.d.ts +2 -2
  66. package/dist/blocks/custom-fields/index.d.ts +6 -6
  67. package/dist/blocks/data-lifecycle/index.d.ts +8 -8
  68. package/dist/blocks/deals/index.d.ts +6 -6
  69. package/dist/blocks/dispatch/index.d.ts +7 -7
  70. package/dist/blocks/documents/index.d.ts +4 -4
  71. package/dist/blocks/domains/index.d.ts +6 -6
  72. package/dist/blocks/donations/index.d.ts +6 -6
  73. package/dist/blocks/drive/index.d.ts +6 -6
  74. package/dist/blocks/employees/index.d.ts +8 -8
  75. package/dist/blocks/enrichment/index.d.ts +6 -6
  76. package/dist/blocks/enrollments/index.d.ts +6 -6
  77. package/dist/blocks/entitlements/index.d.ts +6 -6
  78. package/dist/blocks/expenses/index.d.ts +5 -5
  79. package/dist/blocks/field-history/index.d.ts +4 -4
  80. package/dist/blocks/flags/index.d.ts +5 -5
  81. package/dist/blocks/forecasts/index.d.ts +6 -6
  82. package/dist/blocks/forms/index.d.ts +6 -6
  83. package/dist/blocks/goals/index.d.ts +4 -4
  84. package/dist/blocks/guests/index.d.ts +6 -6
  85. package/dist/blocks/hiring/index.d.ts +7 -7
  86. package/dist/blocks/identities/index.d.ts +5 -5
  87. package/dist/blocks/imports/index.d.ts +5 -5
  88. package/dist/blocks/inbox/index.d.ts +10 -10
  89. package/dist/blocks/incidents/index.d.ts +5 -5
  90. package/dist/blocks/index.d.ts +9 -9
  91. package/dist/blocks/inventory/index.d.ts +7 -7
  92. package/dist/blocks/invoices/index.d.ts +8 -8
  93. package/dist/blocks/knowledge/index.d.ts +3 -3
  94. package/dist/blocks/lead-scoring/index.d.ts +7 -7
  95. package/dist/blocks/leases/index.d.ts +6 -6
  96. package/dist/blocks/leave/index.d.ts +5 -5
  97. package/dist/blocks/ledger/index.d.ts +6 -6
  98. package/dist/blocks/mail-sync/index.d.ts +5 -5
  99. package/dist/blocks/memberships/index.d.ts +2 -2
  100. package/dist/blocks/memory/index.d.ts +4 -4
  101. package/dist/blocks/messaging/index.d.ts +11 -11
  102. package/dist/blocks/metrics/index.d.ts +6 -6
  103. package/dist/blocks/mfa/index.d.ts +2 -2
  104. package/dist/blocks/moderation/index.d.ts +6 -6
  105. package/dist/blocks/notifications/index.d.ts +12 -12
  106. package/dist/blocks/notifications/index.js +1 -1
  107. package/dist/blocks/numbering/index.d.ts +4 -4
  108. package/dist/blocks/oauth-server/index.d.ts +5 -5
  109. package/dist/blocks/onboarding/index.d.ts +5 -5
  110. package/dist/blocks/orders/index.d.ts +7 -7
  111. package/dist/blocks/organizations/index.d.ts +8 -8
  112. package/dist/blocks/outbox/index.d.ts +4 -4
  113. package/dist/blocks/passes/index.d.ts +8 -8
  114. package/dist/blocks/permissions/index.d.ts +6 -6
  115. package/dist/blocks/pipelines/index.d.ts +6 -6
  116. package/dist/blocks/posts/index.d.ts +5 -5
  117. package/dist/blocks/profiles/index.d.ts +4 -4
  118. package/dist/blocks/promotions/index.d.ts +5 -5
  119. package/dist/blocks/push/index.d.ts +6 -6
  120. package/dist/blocks/queue/index.d.ts +6 -6
  121. package/dist/blocks/quotes/index.d.ts +8 -8
  122. package/dist/blocks/rank/index.d.ts +5 -5
  123. package/dist/blocks/reactions/index.d.ts +9 -9
  124. package/dist/blocks/relations/index.d.ts +7 -7
  125. package/dist/blocks/reminders/index.d.ts +8 -8
  126. package/dist/blocks/reminders/index.js +1 -1
  127. package/dist/blocks/reviews/index.d.ts +5 -5
  128. package/dist/blocks/saved-views/index.d.ts +6 -6
  129. package/dist/blocks/scores/index.d.ts +5 -5
  130. package/dist/blocks/search/index.d.ts +8 -8
  131. package/dist/blocks/security-events/index.d.ts +7 -7
  132. package/dist/blocks/segments/index.d.ts +8 -8
  133. package/dist/blocks/sequences/index.d.ts +6 -6
  134. package/dist/blocks/service-accounts/index.d.ts +5 -5
  135. package/dist/blocks/sessions/index.d.ts +2 -2
  136. package/dist/blocks/settings/index.d.ts +6 -6
  137. package/dist/blocks/share-links/index.d.ts +5 -5
  138. package/dist/blocks/shipments/index.d.ts +6 -6
  139. package/dist/blocks/signatures/index.d.ts +5 -5
  140. package/dist/blocks/signing-keys/index.d.ts +4 -4
  141. package/dist/blocks/sla/index.d.ts +7 -7
  142. package/dist/blocks/sso/index.d.ts +6 -6
  143. package/dist/blocks/state-machine/index.d.ts +5 -5
  144. package/dist/blocks/subjects/index.d.ts +6 -6
  145. package/dist/blocks/tags/index.d.ts +6 -6
  146. package/dist/blocks/tasks/index.d.ts +9 -9
  147. package/dist/blocks/teams/index.d.ts +4 -4
  148. package/dist/blocks/templates/index.d.ts +7 -7
  149. package/dist/blocks/time-tracking/index.d.ts +7 -7
  150. package/dist/blocks/timeline/index.d.ts +8 -8
  151. package/dist/blocks/trash/index.d.ts +6 -6
  152. package/dist/blocks/undo/index.d.ts +4 -4
  153. package/dist/blocks/updated-at/index.d.ts +2 -2
  154. package/dist/blocks/usage/index.d.ts +4 -4
  155. package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
  156. package/dist/blocks/versions/index.d.ts +6 -6
  157. package/dist/blocks/waitlist/index.d.ts +5 -5
  158. package/dist/blocks/webhooks/index.d.ts +14 -14
  159. package/dist/blocks/webhooks/index.js +1 -1
  160. package/dist/blocks/workflow-editor/index.d.ts +9 -9
  161. package/dist/blocks/workflows/index.d.ts +7 -7
  162. package/dist/{bookings-CVw5-Q0Z.d.ts → bookings-xsmM2TA_.d.ts} +3 -3
  163. package/dist/{bucket-vc-QRrva.d.ts → bucket-SvRQwYS4.d.ts} +1 -1
  164. package/dist/chat-sdk/index.d.ts +6 -6
  165. package/dist/cli/add-BdhGOwkB.js +1 -0
  166. package/dist/cli/{add-DUyg9qna.js → add-D4w-Axib.js} +27 -85
  167. package/dist/cli/{add-BKcE_g9D.js → add-Dggyehsy.js} +2 -2
  168. package/dist/cli/{migrate-sVs1QYTM.js → app-table-files-CiGuwLkO.js} +90 -50
  169. package/dist/cli/{backfill-r9RELEEh.js → backfill-DjVjXW_P.js} +4 -4
  170. package/dist/cli/bin.js +1 -1
  171. package/dist/cli/{blocks-DTOFdrxL.js → blocks-Bbmb6W_F.js} +1 -1
  172. package/dist/cli/{blocks-k1OG8XDs.js → blocks-jRL9K1R8.js} +2 -2
  173. package/dist/cli/{cache-Czfw7Iow.js → cache-BuoIFlUJ.js} +1 -1
  174. package/dist/cli/{codemod-ClmbiLuL.js → codemod-DRavXBCb.js} +5 -5
  175. package/dist/cli/{command-CVzTJSLp.js → command-DIPmo0wh.js} +6 -1
  176. package/dist/cli/{completion-DxEXxFpz.js → completion-DxPxMtyP.js} +2 -2
  177. package/dist/cli/{completion-CNCqE-Gb.js → completion-DyLMSjOD.js} +1 -1
  178. package/dist/cli/{completion-Dpk6vh0p.js → completion-FUgqm2-N.js} +2 -2
  179. package/dist/cli/{config-EjNj3HfT.js → config-BfapErxs.js} +1 -1
  180. package/dist/cli/{config-KvV-sLZL.js → config-Cskysxp-.js} +38 -7
  181. package/dist/cli/{config-D2YUlzrl.js → config-Df5cXWNN.js} +1 -1
  182. package/dist/cli/{config-group-C8tjut39.js → config-group-CP-B9uRt.js} +2 -3
  183. package/dist/cli/{content-mapper-ez_mT0d4.js → content-mapper-BCtyfKXl.js} +2 -2
  184. package/dist/cli/{db-uYN6O5Eg.js → db-CWvH1_46.js} +3 -3
  185. package/dist/cli/{doctor-BD9oo4MG.js → doctor-Di2ZekfN.js} +57 -24
  186. package/dist/cli/{env-DEAtgGoj.js → env-B2CbnbzD.js} +2 -2
  187. package/dist/cli/env-CynGCICL.js +1 -0
  188. package/dist/cli/{gen-8Ya8n2sA.js → gen-STKC9vkK.js} +16 -16
  189. package/dist/cli/index.d.ts +9 -2
  190. package/dist/cli/index.js +8 -8
  191. package/dist/cli/{init-DgL3sDfQ.js → init-DW6_nIwj.js} +22 -10
  192. package/dist/cli/{keys-CsanNk-2.js → keys-V-HcO-21.js} +1 -1
  193. package/dist/cli/{live-CMMEct_F.js → live-0G4Plw3K.js} +2 -2
  194. package/dist/cli/{mcp-DEHtzAkq.js → mcp-flKS8iU5.js} +6 -14
  195. package/dist/cli/{metadata-BZh-cOzC.js → metadata-VARUbXEe.js} +3 -3
  196. package/dist/cli/migrate-Bkq07XcT.js +46 -0
  197. package/dist/cli/{migration-safety-ClnYNMdq.js → migration-safety-BfVeza5j.js} +2 -2
  198. package/dist/cli/{migrations-DWh38tO9.js → migrations-BCq7Zs2E.js} +2 -2
  199. package/dist/cli/{module-migration-CXfRJIV4.js → module-migration-lbeUrsYv.js} +2 -2
  200. package/dist/cli/{moved-Cnb4fp49.js → moved-DNOtp9LA.js} +1 -1
  201. package/dist/cli/{parse-BWM6IGhF.js → parse-BPf3kGnc.js} +1 -1
  202. package/dist/cli/{powersync-Dnyr-Wy5.js → powersync-B15CfH5Y.js} +4 -4
  203. package/dist/cli/powersync-DnBsDchT.js +1 -0
  204. package/dist/cli/{print-DJrSr56b.js → print-DjxpBRnv.js} +2 -2
  205. package/dist/cli/{providers-CpaISitn.js → providers-dyxcHQY3.js} +1 -1
  206. package/dist/cli/{remove-ChaieK3t.js → remove-BLq5gbal.js} +7 -7
  207. package/dist/cli/{render-DUNJ4Pss.js → render-CizUf3RW.js} +5 -5
  208. package/dist/cli/{run-CxFDjL1Q.js → run-ChEjR7yw.js} +3 -3
  209. package/dist/cli/{run-Cl9COGuy.js → run-ChOY6s4o.js} +9 -9
  210. package/dist/cli/{run-ChCQPYOh.js → run-MwM__teL.js} +41 -41
  211. package/dist/cli/seed-BOun22-k.js +1 -0
  212. package/dist/cli/{seed-BzVLTdRl.js → seed-CDnL4Tnc.js} +3 -3
  213. package/dist/cli/{shared-5uqc1GBj.js → shared-DV5wIv-7.js} +1 -1
  214. package/dist/cli/{skills-0gz_qjVb.js → skills-DM3oeIxY.js} +1 -1
  215. package/dist/cli/{snapshot-DdAP7LWO.js → snapshot-B5LXkVMC.js} +3 -3
  216. package/dist/cli/{source-2irbWSck.js → source-BoLNG_2A.js} +1 -1
  217. package/dist/cli/{source-args-DAcQt-Mh.js → source-args-v8ljFDfc.js} +1 -1
  218. package/dist/cli/{spec-_MS0ym5r.js → spec-D6QeE2Zx.js} +1 -1
  219. package/dist/cli/{spec-B7n4Rthp.js → spec-Dz-PGCaM.js} +3 -3
  220. package/dist/cli/{sql-layout-DYKkQw1k.js → sql-layout-zo02f3Dm.js} +2 -2
  221. package/dist/cli/{stack-CteM33gC.js → stack-ClESAZYf.js} +1 -1
  222. package/dist/cli/{stack-env-6hS-WEmh.js → stack-env-3ziggrU3.js} +1 -1
  223. package/dist/cli/{sync-DnSOrQuA.js → sync-m-oZ_SyI.js} +4 -4
  224. package/dist/cli/{table-DeH8X0qz.js → table-dyKddjwo.js} +1 -1
  225. package/dist/cli/{upgrade-CWdrC-K3.js → upgrade-C9sgVZ5z.js} +5 -5
  226. package/dist/cli/{upgrade-cMy5fKkg.js → upgrade-WwEJaX3i.js} +3 -3
  227. package/dist/cli/{version-C5RAWmrD.js → version-D2BQuqta.js} +1 -1
  228. package/dist/client/index.d.ts +6 -6
  229. package/dist/client/native/index.d.ts +5 -5
  230. package/dist/{cloud-event-DcJwder2.d.ts → cloud-event-0pQ9vFNS.d.ts} +1 -1
  231. package/dist/{compiler-D3UmE7ao.d.ts → compiler-BEeVWXPS.d.ts} +2 -2
  232. package/dist/{composite-CWJvZgni.d.ts → composite-BJ9s-IJJ.d.ts} +7 -7
  233. package/dist/config/index.d.ts +4 -4
  234. package/dist/config/index.js +3 -3
  235. package/dist/{config-CvJHIy5q.js → config-bqKaPjst.js} +6 -27
  236. package/dist/{config-CTeR7XHK.js → config-r7njjNgh.js} +1 -1
  237. package/dist/{connectors-CHGiffYH.d.ts → connectors-uC5baoFV.d.ts} +4 -4
  238. package/dist/{context-BFEX0b7H.d.ts → context-nbYYjv7U.d.ts} +46 -51
  239. package/dist/{controller-Cl6HmMBk.d.ts → controller-TRocodqG.d.ts} +1 -1
  240. package/dist/{conversion-DlfStnln.d.ts → conversion-g8HzH9My.d.ts} +1 -1
  241. package/dist/create/index.d.ts +3 -3
  242. package/dist/create/index.js +2 -2
  243. package/dist/create/lite/index.d.ts +4 -4
  244. package/dist/create/lite/index.js +1 -1
  245. package/dist/credentials/index.d.ts +4 -4
  246. package/dist/{data-engine-BWoz9lED.d.ts → data-engine-rvbR2C4F.d.ts} +1 -1
  247. package/dist/{define-BLP6XtoL.d.ts → define-D8_9X5fZ.d.ts} +5 -5
  248. package/dist/{define-block-DibVN37N.d.ts → define-block-DWVZSZv1.d.ts} +12 -12
  249. package/dist/{documents-Cup1rpjF.d.ts → documents-BbwYyynk.d.ts} +3 -3
  250. package/dist/edge/index.d.ts +9 -9
  251. package/dist/elysia/index.d.ts +1 -1
  252. package/dist/{embeddings-D_RsS6ow.d.ts → embeddings-I3s5sTDt.d.ts} +1 -1
  253. package/dist/{ended-B8RyuUXF.d.ts → ended-EZzN9QTM.d.ts} +2 -2
  254. package/dist/{entitlements-Y-n4RGAd.d.ts → entitlements-B1i1-wfe.d.ts} +2 -2
  255. package/dist/eve/index.d.ts +5 -5
  256. package/dist/{eve-B7jxYPCw.d.ts → eve-BfhVFV33.d.ts} +2 -2
  257. package/dist/events/index.d.ts +3 -3
  258. package/dist/{events-Cc9DDQWH.d.ts → events-B2qbZps6.d.ts} +1 -1
  259. package/dist/{executor-DNPm13a9.d.ts → executor-BfirBzOr.d.ts} +4 -4
  260. package/dist/{executor-C-Ox9eKq.d.ts → executor-BlS0kCrN.d.ts} +1 -1
  261. package/dist/{executor-hGjrop3A.d.ts → executor-DXQIx4sW.d.ts} +1 -1
  262. package/dist/expo/index.d.ts +4 -4
  263. package/dist/{field-errors-Btn3czyz.d.ts → field-errors-tJvehEFc.d.ts} +10 -10
  264. package/dist/{fields-C3q2ypnO.d.ts → fields-snbaZ14h.d.ts} +1 -1
  265. package/dist/{filter-evaluate-CPxeae5X.d.ts → filter-evaluate-BRpNiNPG.d.ts} +1 -1
  266. package/dist/{filter-query-BXLs72G9.d.ts → filter-query-DBt7OKuH.d.ts} +1 -1
  267. package/dist/{flags-C01PLMJ-.d.ts → flags-DDKTThrO.d.ts} +2 -2
  268. package/dist/flags-sdk/index.d.ts +1 -1
  269. package/dist/{framework-GlxXiotm.d.ts → framework-DVYTtQXA.d.ts} +7 -7
  270. package/dist/{gateway-DzI687yd.d.ts → gateway-Ve7cByEr.d.ts} +3 -3
  271. package/dist/h3/index.d.ts +1 -1
  272. package/dist/h3/v1/index.d.ts +1 -1
  273. package/dist/hono/index.d.ts +9 -9
  274. package/dist/{inbox-NDKwSk_H.d.ts → inbox-c8B86Trp.d.ts} +5 -5
  275. package/dist/{index-DPMVWm_Z.d.ts → index-8US7qlvW.d.ts} +5 -5
  276. package/dist/{index-C_qlBJ3k.d.ts → index-B4wttiLh.d.ts} +4 -4
  277. package/dist/{index-CAY7rIQs.d.ts → index-BKrxynq9.d.ts} +5 -5
  278. package/dist/{index-BfYDY6eh.d.ts → index-BM6NmKSc.d.ts} +5 -5
  279. package/dist/{index-8wOL81rB.d.ts → index-BkzXwuIN.d.ts} +4 -3
  280. package/dist/{index-k-SyCzcQ.d.ts → index-CWAQRWY8.d.ts} +4 -4
  281. package/dist/{index-CQhPHHDF.d.ts → index-Cxsnd-OL.d.ts} +1 -1
  282. package/dist/{index-D1ckLbUM.d.ts → index-pZn6S_iq.d.ts} +1 -1
  283. package/dist/{index-C0_cweyT.d.ts → index-zsgNmE8m.d.ts} +14 -14
  284. package/dist/index.d.ts +6 -6
  285. package/dist/{kit-Dxx3MT8m.d.ts → kit-B8yWCRN7.d.ts} +3 -3
  286. package/dist/{knowledge-F1IhRI4Q.d.ts → knowledge-CsLPACGJ.d.ts} +5 -5
  287. package/dist/lint/index.d.ts +1 -1
  288. package/dist/list/index.d.ts +3 -3
  289. package/dist/{list-query-XHoYDlRN.d.ts → list-query-BcU8NnNL.d.ts} +3 -3
  290. package/dist/mapper/bin.js +6 -6
  291. package/dist/mcp/index.d.ts +6 -6
  292. package/dist/mcp/sdk/index.d.ts +6 -6
  293. package/dist/{messaging-C_Pr9tGx.d.ts → messaging-DQP09JsY.d.ts} +4 -4
  294. package/dist/nestjs/index.d.ts +2 -2
  295. package/dist/next/client/index.d.ts +1 -1
  296. package/dist/next/index.d.ts +103 -28
  297. package/dist/next/index.js +189 -49
  298. package/dist/node/index.d.ts +2 -2
  299. package/dist/{operations-DE7SOBw-.d.ts → operations-CB9atU2e.d.ts} +1 -1
  300. package/dist/{options-C4LuqmdG.js → options-BKBy5wM_.js} +2 -1
  301. package/dist/orpc/index.d.ts +8 -8
  302. package/dist/otel/index.d.ts +2 -2
  303. package/dist/otel/index.js +4 -4
  304. package/dist/{outbox-DxZgoKwp.d.ts → outbox-BZ712Z3X.d.ts} +4 -4
  305. package/dist/{pool-wjbAMqc1.d.ts → pool-DDR1ndk7.d.ts} +3 -3
  306. package/dist/{ports-DP0bthUk.d.ts → ports-hpbyMySO.d.ts} +1 -1
  307. package/dist/postgres/index.d.ts +4 -4
  308. package/dist/{postgrest-z-T0l23T.d.ts → postgrest-AJc8hnJU.d.ts} +1 -1
  309. package/dist/powersync/index.d.ts +6 -6
  310. package/dist/preset/index.d.ts +3 -3
  311. package/dist/preset/index.js +2 -2
  312. package/dist/{preset-DwuWNBip.js → preset-DCdEnJj9.js} +8 -13
  313. package/dist/{project-Bo1vZqVs.js → project-B32wb5J6.js} +4 -4
  314. package/dist/{provider-ClrIplXa.d.ts → provider-CWjzAIX9.d.ts} +1 -1
  315. package/dist/{push-token-v3xCcVU7.d.ts → push-token-DQ1ycFPU.d.ts} +1 -1
  316. package/dist/query/index.d.ts +1 -1
  317. package/dist/react/index.d.ts +8 -8
  318. package/dist/react/native/index.d.ts +1 -1
  319. package/dist/react/server.d.ts +8 -8
  320. package/dist/react/session.d.ts +2 -2
  321. package/dist/react-router/index.d.ts +6 -6
  322. package/dist/realtime/index.d.ts +6 -6
  323. package/dist/realtime/index.js +1 -1
  324. package/dist/{record-form-D2-F4IwS.d.ts → record-form-CubgBrtI.d.ts} +1 -1
  325. package/dist/{recordings-BBSJt_YV.d.ts → recordings-DeZYx-Kv.d.ts} +1 -1
  326. package/dist/records/index.d.ts +9 -9
  327. package/dist/{refresh-CCKB1Wa6.d.ts → refresh-D02Pbf5B.d.ts} +1 -1
  328. package/dist/{refusal-D_tklIEb.d.ts → refusal-B0VmlAxF.d.ts} +2 -2
  329. package/dist/{resolve-Bj1qD7Dy.d.ts → resolve-CtX6T0c0.d.ts} +1 -1
  330. package/dist/{resource-D8pzB5Qf.d.ts → resource-WxN0IsvB.d.ts} +1 -1
  331. package/dist/{resource-execute-BSTIfp1D.d.ts → resource-execute-BzqR8DdD.d.ts} +2 -2
  332. package/dist/{resource-types-D5WEvYtV.d.ts → resource-types-BVbHgTPg.d.ts} +4 -4
  333. package/dist/{resources-CsZ7RhZC.d.ts → resources-BSbRa0Ab.d.ts} +2 -2
  334. package/dist/{respond-BzRG-0qc.d.ts → respond-Dzu_-EPH.d.ts} +1 -1
  335. package/dist/{sales-lines-KxxStRzU.d.ts → sales-lines-BsmrNHe9.d.ts} +1 -1
  336. package/dist/{scores-B2BiNuVJ.d.ts → scores-Y8TvyJi1.d.ts} +5 -5
  337. package/dist/server/index.d.ts +24 -24
  338. package/dist/server/index.js +2 -2
  339. package/dist/{server-types-BlDiY-ya.d.ts → server-types-BkTIxW_H.d.ts} +11 -11
  340. package/dist/{session-BGP98Rgj.d.ts → session-BOzx2qHC.d.ts} +6 -6
  341. package/dist/{session-status-C4t7kbSn.d.ts → session-status-BP8eYVnA.d.ts} +2 -2
  342. package/dist/sign-in-BzihC_8k.d.ts +50 -0
  343. package/dist/{sign-in-NO7LWlw4.js → sign-in-Cyj3ZlFX.js} +120 -25
  344. package/dist/{signers-BKgmVh6A.d.ts → signers-ZmxO1I05.d.ts} +4 -4
  345. package/dist/{signing-keys-BNDUxpQL.d.ts → signing-keys-udgP7Aod.d.ts} +2 -2
  346. package/dist/solid/index.d.ts +10 -10
  347. package/dist/solid-start/index.d.ts +6 -6
  348. package/dist/spec/index.d.ts +2 -2
  349. package/dist/sql/index.d.ts +4 -4
  350. package/dist/sql/index.js +2 -2
  351. package/dist/{sql-B7vBP9g0.js → sql-CyeDg3Yh.js} +321 -212
  352. package/dist/sqlite/index.d.ts +3 -3
  353. package/dist/{sso-B0Txid2-.d.ts → sso-CkU_4mtK.d.ts} +3 -3
  354. package/dist/ssr/index.d.ts +5 -5
  355. package/dist/storage/index.d.ts +3 -3
  356. package/dist/streams/index.d.ts +1 -1
  357. package/dist/{subject-readers-DJbzlm8a.d.ts → subject-readers-CB5Te02u.d.ts} +5 -5
  358. package/dist/{subject-readers-CeeJJOQ4.js → subject-readers-VHcrWhmq.js} +2 -2
  359. package/dist/{subjects-BpIEN1MS.d.ts → subjects-CiBNKy2y.d.ts} +4 -4
  360. package/dist/{support-D7CMbhRT.d.ts → support-BxyPOFk4.d.ts} +4 -4
  361. package/dist/{support-view-CIDXF3_H.d.ts → support-view-nqUWKHEs.d.ts} +1 -1
  362. package/dist/svelte/index.d.ts +9 -9
  363. package/dist/sveltekit/index.d.ts +7 -7
  364. package/dist/{tags-Dg4Ywmqp.d.ts → tags-Cm48BsOa.d.ts} +1 -1
  365. package/dist/tanstack-db/index.d.ts +3 -3
  366. package/dist/tanstack-start/index.d.ts +6 -6
  367. package/dist/{tenant-CyLEXgot.d.ts → tenant-C9YE_kqK.d.ts} +2 -2
  368. package/dist/testing/index.d.ts +25 -25
  369. package/dist/testing/index.js +1 -1
  370. package/dist/{timeline-Cjl-1hiA.d.ts → timeline-DvXtXq5q.d.ts} +5 -5
  371. package/dist/{topic-B_DGdAEs.d.ts → topic-breZqx_4.d.ts} +5 -5
  372. package/dist/{types-Dp3UCr1e.d.ts → types-B-D6fYx2.d.ts} +1 -1
  373. package/dist/{types-DF8JYEf5.d.ts → types-C3I7S51U.d.ts} +2 -2
  374. package/dist/{types-Czq9Xtpa.d.ts → types-CK2X2wCB.d.ts} +5 -5
  375. package/dist/{types-DFdg_4yN.d.ts → types-CPl9uJ0G.d.ts} +2 -2
  376. package/dist/{types-DR1MHh7N.d.ts → types-CwQgFo8c.d.ts} +4 -4
  377. package/dist/{types-Dr9wZgNy.d.ts → types-DMihLukJ.d.ts} +3 -3
  378. package/dist/{types-A4yyKEsg.d.ts → types-iCyZ3lMx.d.ts} +4 -4
  379. package/dist/{types-BdaBfYIw.d.ts → types-nspa5I-a.d.ts} +7 -7
  380. package/dist/{undo-B1jwnVyN.d.ts → undo-0HkWXASn.d.ts} +2 -2
  381. package/dist/{usage-Dp45V42p.d.ts → usage-BkWAPkg2.d.ts} +4 -4
  382. package/dist/{vault-BghaujrZ.d.ts → vault-BkdPmL7f.d.ts} +2 -2
  383. package/dist/vercel-connect/index.d.ts +1 -1
  384. package/dist/{verify-CI8LgSpv.d.ts → verify-41mZmspj.d.ts} +2 -2
  385. package/dist/{view-BvNA7EOC.d.ts → view-C8_xvD-j.d.ts} +1 -1
  386. package/dist/vue/index.d.ts +10 -10
  387. package/dist/{watch-topic-1zIAtiNM.d.ts → watch-topic-ItO3dz8m.d.ts} +1 -1
  388. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  389. package/dist/workflow-sdk/index.d.ts +1 -1
  390. package/dist/workflow-sdk/world/index.d.ts +1 -1
  391. package/dist/workflow-sdk/world/index.js +1 -1
  392. package/dist/{workflow-sdk-CaEw822d.js → workflow-sdk-BWPsdzVK.js} +36 -8
  393. package/dist/{workflow-sdk-BNsZrcVg.d.ts → workflow-sdk-rg3IbCZC.d.ts} +3 -3
  394. package/dist/{workflows-B0ZPAQu0.d.ts → workflows-xL6t0TXx.d.ts} +7 -4
  395. package/dist/yjs/index.d.ts +2 -2
  396. package/package.json +1 -2
  397. package/schemas/config-v1.json +5 -352
  398. package/schemas/doctor-report-v1.json +1 -0
  399. package/skills/better-supabase/references/ui-recipes.md +5 -5
  400. package/skills/better-supabase-auth/SKILL.md +8 -1
  401. package/dist/cli/add-pDOlqWUa.js +0 -1
  402. package/dist/cli/env-Cy2lWBRC.js +0 -1
  403. package/dist/cli/powersync-DURhWDVc.js +0 -1
  404. package/dist/cli/seed-BJ7c-ktX.js +0 -1
  405. package/dist/sign-in-CAadgm33.d.ts +0 -24
@@ -1,27 +1,27 @@
1
- import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { a as list, m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-C5RAWmrD.js";
3
+ import { t as VERSION } from "./version-D2BQuqta.js";
4
4
  import { a as parseNames, n as CliError } from "./errors-BTe6A15O.js";
5
5
  import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
6
- import { t as loadSnapshot } from "./snapshot-DdAP7LWO.js";
6
+ import { t as loadSnapshot } from "./snapshot-B5LXkVMC.js";
7
7
  import { t as isRecord } from "./guards-CUlDNYZs.js";
8
- import { a as toCatalog } from "./source-2irbWSck.js";
9
- import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-KvV-sLZL.js";
8
+ import { a as toCatalog } from "./source-BoLNG_2A.js";
9
+ import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-Cskysxp-.js";
10
10
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
11
- import { n as dataMigration } from "./migrations-DWh38tO9.js";
12
- import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-ClnYNMdq.js";
11
+ import { n as dataMigration } from "./migrations-BCq7Zs2E.js";
12
+ import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-BfVeza5j.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
14
14
  import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-CrWfk8s3.js";
15
- import { t as syncModules } from "./sync-DnSOrQuA.js";
16
- import { t as addModules } from "./add-BKcE_g9D.js";
17
- import { n as ident } from "./live-CMMEct_F.js";
18
- import { t as blockNames } from "./blocks-k1OG8XDs.js";
19
- import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-DAcQt-Mh.js";
15
+ import { t as syncModules } from "./sync-m-oZ_SyI.js";
16
+ import { t as addModules } from "./add-Dggyehsy.js";
17
+ import { t as appTablePlan } from "./app-table-files-CiGuwLkO.js";
18
+ import { t as blockNames } from "./blocks-jRL9K1R8.js";
19
+ import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-v8ljFDfc.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { dirname, join, posix, resolve } from "node:path";
22
22
  import { readFile } from "node:fs/promises";
23
23
  import { INTEGRATION_INFO, blockEntrySource } from "better-supabase/config";
24
- import { DEFAULT_CONVENTIONS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_NAMES, PRESET_TENANT_NAMES, designConfig, diffAppTables, glueCommand, isPresetName, presetAndDesignOf, presetField, presetFromSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset } from "better-supabase/preset";
24
+ import { DEFAULT_CONVENTIONS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_NAMES, PRESET_TENANT_NAMES, designConfig, glueCommand, isPresetName, presetAndDesignOf, presetField, presetFromSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset } from "better-supabase/preset";
25
25
  import { SQL_MODULES, adoptedColumnProblems, migrationOptionUses, moduleBody, moduleIdType, moduleWritesText } from "better-supabase/sql";
26
26
  import { toSnake } from "better-supabase";
27
27
  //#region src/cli/conventions.ts
@@ -656,9 +656,9 @@ function currentExtraColumns(config, module) {
656
656
  }
657
657
  /**
658
658
  * `source` with a `/create` design written into it: each block's
659
- * `options.extraColumns` (merged over the columns `config` already gives it)
660
- * and each design table under `tables`, replacing a table of the same name and
661
- * keeping the others. Positions only matter to the canvas and stay out.
659
+ * `options.extraColumns` (merged over the columns `config` already gives it).
660
+ * The design's tables are SQL files, written by `appTablePlan`, and positions
661
+ * only matter to the canvas, so neither goes into the config.
662
662
  */
663
663
  function writeDesign(file, source, design, config) {
664
664
  const set = file.endsWith(".json") ? setPathInJson : setPathInConfig;
@@ -683,17 +683,6 @@ function writeDesign(file, source, design, config) {
683
683
  reason: problem
684
684
  };
685
685
  }
686
- for (const [name, table] of Object.entries(design.appTables ?? {})) {
687
- const { scope, ...rest } = table;
688
- const problem = apply(["tables", name], scope === void 0 ? rest : {
689
- ...rest,
690
- owner: scope
691
- });
692
- if (problem !== void 0) return {
693
- ok: false,
694
- reason: problem
695
- };
696
- }
697
686
  return {
698
687
  ok: true,
699
688
  text
@@ -721,10 +710,6 @@ const APPLY_ARGS = {
721
710
  type: "boolean",
722
711
  description: "Map existing tables onto a block (with --tables), the preset's blocks onto tables under their default names, or, alone, write the data rows migration for blocks over your tables"
723
712
  },
724
- "allow-breaking": {
725
- type: "boolean",
726
- description: "Write a design with breaking app table changes (a rename, a retyped or required column, a tighter constraint); renames print their alter statements"
727
- },
728
713
  "dry-run": {
729
714
  type: "boolean",
730
715
  description: "Show the config diff and write nothing"
@@ -793,31 +778,6 @@ function designFor(config, design, preset) {
793
778
  designConfig(resolved, design.appTables === void 0 ? {} : { appTables: design.appTables });
794
779
  return design;
795
780
  }
796
- /** Each breaking change with its expand-and-contract steps. */
797
- function describeBreaking(changes) {
798
- return ["Breaking changes to app tables:", ...changes.flatMap((change) => [` ${change.summary}`, ...change.steps.map((step, index) => ` ${String(index + 1)}. ${step}`)])];
799
- }
800
- /**
801
- * The statements that rename the tables and columns `changes` renames, in
802
- * order.
803
- */
804
- function renameStatements(changes) {
805
- return changes.flatMap((change) => {
806
- if (change.from === void 0) return [];
807
- if (change.kind === "table.renamed") return [`alter table public.${ident(change.from)} rename to ${ident(change.table)};`];
808
- if (change.kind === "column.renamed" && change.column !== void 0) return [`alter table public.${ident(change.table)} rename column ${ident(change.from)} to ${ident(change.column)};`];
809
- return [];
810
- });
811
- }
812
- /** How to run `renames` before `upgrade` creates the new names. */
813
- function describeRenames(renames, renamedTables, file) {
814
- return renames.length === 0 ? [] : [
815
- "Run these in a migration before `better-supabase upgrade`, so the renamed tables and columns keep their rows:",
816
- ...renames.map((statement) => ` ${statement}`),
817
- ...renamedTables.length === 0 ? [] : [`Then remove ${renamedTables.join(", ")} from tables in ${file}: apply keeps the tables a design leaves out.`],
818
- ""
819
- ];
820
- }
821
781
  /** The config file edited for `--only`: the `preset` key, or the blocks. */
822
782
  function edited(file, source, name, preset, only) {
823
783
  const json = file.endsWith(".json");
@@ -881,23 +841,7 @@ async function runApply(rootConfig, args, rootDeps) {
881
841
  blocks: []
882
842
  } : preset);
883
843
  if (conflict !== void 0) throw new CliError("usage", conflict);
884
- const changes = design?.appTables === void 0 ? [] : diffAppTables(config.appTables, design.appTables);
885
- const kept = changes.filter((change) => change.kind === "table.dropped").map((change) => change.table);
886
- const renamedTables = changes.flatMap((change) => change.kind === "table.renamed" && change.from !== void 0 ? [change.from] : []);
887
- const breaking = changes.filter((change) => change.breaking && change.kind !== "table.dropped");
888
- const renames = renameStatements(breaking);
889
844
  const shown = display(config.root, file);
890
- if (breaking.length > 0 && args["allow-breaking"] !== true && args["dry-run"] !== true) return {
891
- code: 1,
892
- output: describeBreaking(breaking).join("\n"),
893
- data: {
894
- file: shown,
895
- written: false,
896
- breaking,
897
- kept
898
- },
899
- error: `Nothing was written: the design has ${breaking.length === 1 ? "a breaking change" : `${String(breaking.length)} breaking changes`} to tables the app already has. Follow the steps above, or pass --allow-breaking to write it anyway.`
900
- };
901
845
  const source = await readFile(file, "utf-8");
902
846
  const edit = edited(file, source, name, preset, only);
903
847
  if (!edit.ok) return {
@@ -911,11 +855,7 @@ async function runApply(rootConfig, args, rootDeps) {
911
855
  };
912
856
  const paint = deps.paint ?? plain;
913
857
  let text = withDesign.text;
914
- const lines = [
915
- ...breaking.length === 0 ? [] : [...describeBreaking(breaking), ""],
916
- ...describeRenames(renames, renamedTables, shown),
917
- ...kept.length === 0 ? [] : [`Kept ${kept.join(", ")}: the design doesn't name ${kept.length === 1 ? "it" : "them"}, and apply keeps the tables a design leaves out. Remove ${kept.length === 1 ? "it" : "them"} from tables in ${shown} to drop ${kept.length === 1 ? "it" : "them"}.`, ""]
918
- ];
858
+ const lines = [];
919
859
  if (createUrlParam(input, "authz") !== void 0) lines.push(AUTHZ_NOTE, "");
920
860
  let adopted = {};
921
861
  if (args.adopt === true) {
@@ -938,11 +878,13 @@ async function runApply(rootConfig, args, rootDeps) {
938
878
  const data = {
939
879
  file: shown,
940
880
  adopted,
941
- contents: text,
942
- kept,
943
- ...renames.length === 0 ? {} : { renames }
881
+ contents: text
944
882
  };
945
- if (text === source) {
883
+ const tables = design?.appTables === void 0 ? void 0 : await appTablePlan({
884
+ ...config,
885
+ appTables: designConfig(resolvePreset(preset), design).appTables ?? {}
886
+ }, "better-supabase add");
887
+ if (text === source && tables === void 0) {
946
888
  lines.push(`${shown} already holds the preset.`);
947
889
  return {
948
890
  code: 0,
@@ -954,13 +896,14 @@ async function runApply(rootConfig, args, rootDeps) {
954
896
  };
955
897
  }
956
898
  const plan = {
957
- root: config.root,
899
+ root: tables?.plan.root ?? config.root,
900
+ base: config.root,
958
901
  regenerate: "better-supabase add",
959
- files: [{
902
+ files: [...text === source ? [] : [{
960
903
  path: file,
961
904
  contents: text,
962
905
  policy: "edit"
963
- }]
906
+ }], ...tables?.plan.files ?? []]
964
907
  };
965
908
  const applied = await applyPlan(plan, args, paint);
966
909
  if (applied.mode === "check") return planResult(plan, applied, { data: {
@@ -1212,7 +1155,6 @@ const ADD_COMMAND_ARGS = {
1212
1155
  const PRESET_ONLY = [
1213
1156
  "package",
1214
1157
  "only",
1215
- "allow-breaking",
1216
1158
  ...Object.keys(CONVENTION_ARGS)
1217
1159
  ];
1218
1160
  /** A usage error for the first flag in `flags` that `args` sets. */
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { d as providerLabel, i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-CpaISitn.js";
2
+ import { d as providerLabel, i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-dyxcHQY3.js";
3
3
  import { r as applyPlan } from "./files-CX71yBm8.js";
4
4
  import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-CrWfk8s3.js";
5
- import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-DnSOrQuA.js";
5
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-m-oZ_SyI.js";
6
6
  import { basename, dirname } from "node:path";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
@@ -1,12 +1,58 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
2
- import { i as plain } from "./style-Bm2X5JrN.js";
3
1
  import { n as CliError } from "./errors-BTe6A15O.js";
4
- import { h as subjectTagArgs } from "./config-KvV-sLZL.js";
5
- import { r as layoutFor } from "./providers-CpaISitn.js";
2
+ import { h as subjectTagArgs } from "./config-Cskysxp-.js";
3
+ import { r as layoutFor } from "./providers-dyxcHQY3.js";
6
4
  import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-CncmQbO0.js";
7
- import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
5
+ import { r as literal } from "./live-0G4Plw3K.js";
8
6
  import { join, resolve, sep } from "node:path";
7
+ import { FIELD_FORMATS } from "better-supabase/config";
9
8
  import { APP_TABLES_MODULE, renderBlocks, setTableFeature } from "better-supabase/sql";
9
+ /**
10
+ * The domain for a format on a column type, or undefined when the format has no
11
+ * pattern or bounds to check. The first type a format fits takes the plain
12
+ * name; the others add the type (`rating_bigint`).
13
+ */
14
+ function formatDomain(format, type) {
15
+ const spec = FIELD_FORMATS[format];
16
+ const index = spec.types.findIndex((each) => each === type);
17
+ if (index === -1 || spec.pattern === void 0 && spec.bounds === void 0) return;
18
+ const bare = index === 0 ? format : `${format}_${type}`;
19
+ const checks = [...spec.pattern === void 0 ? [] : [`value ~* ${literal(spec.pattern)}`], ...spec.bounds === void 0 ? [] : [`value >= ${String(spec.bounds[0])}`, `value <= ${String(spec.bounds[1])}`]];
20
+ return {
21
+ name: `bsb.${bare}`,
22
+ bare,
23
+ base: type,
24
+ sql: `create domain bsb.${bare} as ${type}\n constraint ${bare}_check check (${checks.join(" and ")});`
25
+ };
26
+ }
27
+ /** The domain a column takes, or undefined when it keeps its type and check. */
28
+ function domainOf(column) {
29
+ if (column.format === void 0 || column.options !== void 0 || column.encrypted === true || column.min !== void 0 || column.max !== void 0) return;
30
+ return formatDomain(column.format, column.type);
31
+ }
32
+ /**
33
+ * `tables` with each format column typed as its domain, and the domains they
34
+ * use. A column with its own `min`, `max` or `options` keeps the inline check,
35
+ * since a domain would tighten what the column allows.
36
+ */
37
+ function withFormatDomains(tables) {
38
+ const used = /* @__PURE__ */ new Map();
39
+ return {
40
+ tables: Object.fromEntries(Object.entries(tables).map(([name, table]) => [name, {
41
+ ...table,
42
+ columns: Object.fromEntries(Object.entries(table.columns ?? {}).map(([column, config]) => {
43
+ const domain = domainOf(config);
44
+ if (domain === void 0) return [column, config];
45
+ used.set(domain.name, domain);
46
+ return [column, {
47
+ ...config,
48
+ domain: domain.name
49
+ }];
50
+ }))
51
+ }])),
52
+ domains: [...used.values()].toSorted((a, b) => a.name.localeCompare(b.name))
53
+ };
54
+ }
55
+ //#endregion
10
56
  //#region src/cli/sql/schema-first.ts
11
57
  const NAME = String.raw`(?:"?public"?\.)?"?([a-z_][a-z0-9_]*)"?`;
12
58
  const TABLE_TARGETS = [
@@ -236,8 +282,7 @@ function splitAppTables(config, sql, tables) {
236
282
  return files;
237
283
  }
238
284
  //#endregion
239
- //#region src/cli/commands/migrate.ts
240
- const MIGRATE_ARGS = {};
285
+ //#region src/cli/sql/app-table-files.ts
241
286
  /**
242
287
  * The deepest directory that holds both paths. A project in a monorepo keeps
243
288
  * its `supabase` folder above its own root, and the plan may not leave `root`.
@@ -252,55 +297,50 @@ function commonAncestor(first, second) {
252
297
  }
253
298
  return shared.join(sep) || sep;
254
299
  }
300
+ /** The `bsb` schema and one file per domain, in pg-delta's export layout. */
301
+ function domainFiles(domains) {
302
+ if (domains.length === 0) return [];
303
+ return [{
304
+ path: `bsb/schema.sql`,
305
+ contents: `-- Owned by you since \`better-supabase migrate schema-first\`.\ncreate schema if not exists bsb;\ngrant usage on schema bsb to anon, authenticated, service_role;\n`
306
+ }, ...domains.map((domain) => ({
307
+ path: `bsb/domains/${domain.bare}.sql`,
308
+ contents: `-- The ${domain.bare} format of a column. Owned by you.\n${domain.sql}\n`
309
+ }))];
310
+ }
255
311
  /**
256
- * Writes the tables that `appTables` renders as files you own under
257
- * `supabase/schemas` (ADR 0102), with the config's per-table features as `@bsb`
258
- * tags in each table's comment. The config keeps working until you delete
259
- * `appTables`, so run `upgrade` after removing it.
312
+ * The plan that writes the tables `config.appTables` renders as files you own
313
+ * under the declarative schemas folder (ADR 0102), with each table's features
314
+ * as `@bsb` tags in its comment. A file that exists stays as it is. The config
315
+ * only carries `appTables` from a Create design or an old config that `migrate
316
+ * schema-first` reads; the public config has no key for it.
260
317
  */
261
- async function runMigrateSchemaFirst(config, args, deps = {}) {
318
+ async function appTablePlan(config, regenerate) {
262
319
  const tables = Object.keys(config.appTables);
263
- if (tables.length === 0) return {
264
- code: 0,
265
- output: "appTables is empty; there are no tables to move.",
266
- data: {
267
- tables: [],
268
- files: []
269
- }
270
- };
271
- const layout = await layoutFor(config, {}, config.blockNames);
320
+ if (tables.length === 0) return;
321
+ const typed = withFormatDomains(config.appTables);
322
+ const layout = await layoutFor({
323
+ ...config,
324
+ appTables: typed.tables
325
+ }, {}, config.blockNames);
272
326
  const source = renderBlocks(config.blockNames, layout).find((file) => file.module === APP_TABLES_MODULE && file.kind === "schema");
273
327
  if (source === void 0) throw new CliError("usage", "The config renders no app tables file.");
274
328
  const dir = join(config.root, declarativeSchemasDir(await readSupabaseToml(config.root)));
275
- const files = splitAppTables(config, source.contents, tables);
276
- const plan = {
277
- root: commonAncestor(config.root, dir),
278
- base: config.root,
279
- regenerate: "better-supabase migrate schema-first",
280
- files: files.map((file) => ({
281
- path: join(dir, file.path),
282
- contents: file.contents,
283
- policy: "create"
284
- }))
329
+ const split = [...splitAppTables(config, source.contents, tables), ...domainFiles(typed.domains)];
330
+ return {
331
+ tables,
332
+ files: split.map((file) => file.path),
333
+ plan: {
334
+ root: commonAncestor(config.root, dir),
335
+ base: config.root,
336
+ regenerate,
337
+ files: split.map((file) => ({
338
+ path: join(dir, file.path),
339
+ contents: file.contents,
340
+ policy: "create"
341
+ }))
342
+ }
285
343
  };
286
- const applied = await applyPlan(plan, args, deps.paint ?? plain);
287
- const summary = applied.mode === "write" && applied.drift ? `Wrote ${String(files.length)} files for ${String(tables.length)} tables. Delete appTables (and records) from the config, run \`better-supabase upgrade\` to remove the old app tables file, then \`better-supabase db diff\` to check that the schema is unchanged.` : void 0;
288
- return planResult(plan, applied, {
289
- data: {
290
- tables,
291
- files: files.map((file) => file.path)
292
- },
293
- ...summary === void 0 ? {} : { summary }
294
- });
295
344
  }
296
- const migrateSchemaFirstCommand = defineCliCommand({
297
- meta: commandMeta("migrate schema-first"),
298
- args: {
299
- ...MIGRATE_ARGS,
300
- "dry-run": PLAN_ARGS["dry-run"],
301
- check: PLAN_ARGS.check
302
- },
303
- run: (args, { config, paint }) => runMigrateSchemaFirst(config, args, { paint })
304
- });
305
345
  //#endregion
306
- export { migrateSchemaFirstCommand };
346
+ export { appTablePlan as t };
@@ -1,10 +1,10 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
4
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-KvV-sLZL.js";
4
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-Cskysxp-.js";
5
5
  import { t as connect } from "./db-CQCLx7cx.js";
6
- import { n as ident } from "./live-CMMEct_F.js";
7
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DAcQt-Mh.js";
6
+ import { n as ident } from "./live-0G4Plw3K.js";
7
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-v8ljFDfc.js";
8
8
  //#region src/cli/commands/backfill.ts
9
9
  const DEFAULT_BATCH = 1e3;
10
10
  const ARGS = {
package/dist/cli/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as run } from "./run-ChCQPYOh.js";
2
+ import { i as run } from "./run-MwM__teL.js";
3
3
  import { t as colorEnabled } from "./style-Bm2X5JrN.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { basename } from "node:path";
@@ -1 +1 @@
1
- export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-k1OG8XDs.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-jRL9K1R8.js";
@@ -1,7 +1,7 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { n as CliError } from "./errors-BTe6A15O.js";
3
3
  import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
4
- import { n as listModules, t as printModule } from "./print-DJrSr56b.js";
4
+ import { n as listModules, t as printModule } from "./print-DjxpBRnv.js";
5
5
  import { t as decodePresetInput } from "./preset-BwmIfFnh.js";
6
6
  import { BLOCK_CATEGORIES } from "better-supabase/blocks";
7
7
  import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-C5RAWmrD.js";
1
+ import { t as VERSION } from "./version-D2BQuqta.js";
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { createHash } from "node:crypto";
4
4
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
@@ -1,14 +1,14 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { n as CliError } from "./errors-BTe6A15O.js";
4
- import { t as migrateCliCall } from "./moved-Cnb4fp49.js";
4
+ import { t as migrateCliCall } from "./moved-DNOtp9LA.js";
5
5
  import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
6
6
  import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
7
- import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-DYKkQw1k.js";
7
+ import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-zo02f3Dm.js";
8
8
  import { a as configObject, c as mask, f as setPathInConfig, g as skipSpace, h as setPresetInJson, i as closingIndex, l as properties, m as setPresetInConfig, o as indentAt, p as setPathInJson, t as addBlocksToConfig, v as codeRanges } from "./config-edit-CrWfk8s3.js";
9
9
  import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-R7UChFFl.js";
10
10
  import { a as REVIEW_0_15, c as renameSubpaths, r as PLUGIN_IMPORT_RENAMES, s as SUBPATH_RENAMES_0_15, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
11
- import { a as RECORD_BINDING_RENAMES, n as groupConfigJson, r as groupConfigSource, t as cutRange } from "./config-group-C8tjut39.js";
11
+ import { a as RECORD_BINDING_RENAMES, n as groupConfigJson, r as groupConfigSource, t as cutRange } from "./config-group-CP-B9uRt.js";
12
12
  import { existsSync } from "node:fs";
13
13
  import { extname, join, relative, resolve } from "node:path";
14
14
  import { readFile, readdir, stat } from "node:fs/promises";
@@ -1874,7 +1874,7 @@ const CODEMODS = {
1874
1874
  },
1875
1875
  {
1876
1876
  pattern: /\bcomments\s*:\s*\{/,
1877
- message: "With `config.records` set and no `subjects` option, comments accept only the registered subject types and require read on the subject row"
1877
+ message: "With `config.subjects` set and no `subjects` option, comments accept only the registered subject types and require read on the subject row"
1878
1878
  }
1879
1879
  ]
1880
1880
  },
@@ -914,6 +914,7 @@ const GLOBAL_ARGS = {
914
914
  const LISTS = /* @__PURE__ */ new WeakMap();
915
915
  const COMPLETIONS = /* @__PURE__ */ new WeakMap();
916
916
  const RUNS_WITH_INVALID_CONFIG = /* @__PURE__ */ new WeakSet();
917
+ const READS_LEGACY_TABLES = /* @__PURE__ */ new WeakSet();
917
918
  /** A citty command that receives the `CliContext` and returns a `CommandResult`. */
918
919
  function defineCliCommand(def) {
919
920
  const version = def.apiVersion ?? 1;
@@ -929,6 +930,7 @@ function defineCliCommand(def) {
929
930
  LISTS.set(command, def.lists ?? []);
930
931
  COMPLETIONS.set(command, def.completions ?? {});
931
932
  if (def.runsWithInvalidConfig === true) RUNS_WITH_INVALID_CONFIG.add(command);
933
+ if (def.readsLegacyTables === true) READS_LEGACY_TABLES.add(command);
932
934
  return Object.assign(command, { apiVersion: 1 });
933
935
  }
934
936
  /** The list options a command declared through `defineCliCommand`. */
@@ -942,6 +944,9 @@ function listArgs(command) {
942
944
  function completionValues(command) {
943
945
  return COMPLETIONS.get(command) ?? {};
944
946
  }
947
+ function readsLegacyTables(command) {
948
+ return READS_LEGACY_TABLES.has(command);
949
+ }
945
950
  function runsWithInvalidConfig(command) {
946
951
  return RUNS_WITH_INVALID_CONFIG.has(command);
947
952
  }
@@ -989,4 +994,4 @@ function cliContext(data) {
989
994
  return data;
990
995
  }
991
996
  //#endregion
992
- export { list as a, COMMANDS as c, GROUPS as d, RESERVED_NAMES as f, runCommand as h, joinRepeated as i, COMPLETE_COMMAND as l, parseArgs$2 as m, completionValues as n, listArgs as o, commandMeta as p, defineCliCommand as r, runsWithInvalidConfig as s, GLOBAL_ARGS as t, DOCS_ORIGIN as u };
997
+ export { list as a, runsWithInvalidConfig as c, DOCS_ORIGIN as d, GROUPS as f, runCommand as g, parseArgs$2 as h, joinRepeated as i, COMMANDS as l, commandMeta as m, completionValues as n, listArgs as o, RESERVED_NAMES as p, defineCliCommand as r, readsLegacyTables as s, GLOBAL_ARGS as t, COMPLETE_COMMAND as u };
@@ -1,5 +1,5 @@
1
- import { l as COMPLETE_COMMAND, n as completionValues, o as listArgs, t as GLOBAL_ARGS } from "./command-CVzTJSLp.js";
2
- import { o as isVariadic, r as commandArgs } from "./parse-BWM6IGhF.js";
1
+ import { n as completionValues, o as listArgs, t as GLOBAL_ARGS, u as COMPLETE_COMMAND } from "./command-DIPmo0wh.js";
2
+ import { o as isVariadic, r as commandArgs } from "./parse-BPf3kGnc.js";
3
3
  //#region src/cli/core/completion.ts
4
4
  const SHELLS = [
5
5
  "bash",
@@ -1 +1 @@
1
- export { n as complete, r as completionLines } from "./completion-DxEXxFpz.js";
1
+ export { n as complete, r as completionLines } from "./completion-DxPxMtyP.js";
@@ -1,6 +1,6 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { n as CliError } from "./errors-BTe6A15O.js";
3
- import { a as isShell, i as completionScript, t as SHELLS } from "./completion-DxEXxFpz.js";
3
+ import { a as isShell, i as completionScript, t as SHELLS } from "./completion-DxPxMtyP.js";
4
4
  //#region src/cli/commands/completion.ts
5
5
  const ARGS = { shell: {
6
6
  type: "positional",
@@ -1,4 +1,4 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
1
+ import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
2
2
  import { n as redact, r as redactUrl } from "./redact-KGAk2Ul9.js";
3
3
  import { t as display } from "./io-DH1kcmmP.js";
4
4
  import { n as presetInfo } from "./preset-BwmIfFnh.js";
@@ -979,6 +979,7 @@ const subjectSearchSchema = strictObject({
979
979
  //#region src/cli/config-moved.ts
980
980
  /** Where each top-level key of a 0.14 config moved in 0.15. */
981
981
  const MOVED_KEYS = new Map([...Object.entries(CONFIG_GROUPS).flatMap(([group, keys]) => keys.filter((key) => key !== "tables").map((key) => [key, `${group}.${key}`])), ...RENAMED_CONFIG_KEYS.map(([grouped, flat]) => [flat, grouped])]);
982
+ const TABLES_REMOVED = "removed in 0.28: tables are SQL in `supabase/schemas` with `@bsb` tags in the table comment; run `better-supabase migrate schema-first`";
982
983
  /** `sql` keys that moved before 0.15, with where they went. */
983
984
  const MOVED_SQL_KEYS = [["modules", "moved to the top-level `blocks` key in 0.9; run `better-supabase codemod 0.9`"], ["naming", "`sql.naming.tenant` moved to `blocks.memberships.names.organization`"]];
984
985
  /** Moved `sql` keys in one config block, under `sql` or `database.sql`. */
@@ -989,7 +990,13 @@ function movedSqlIssues(prefix, block) {
989
990
  }
990
991
  const SCAFFOLD_REMOVED = "removed in 0.15 with `better-supabase scaffold api`; delete it. `defineApi` includes every table and block instance, and `createOrpc(betterSupabase).router(api)` serves it: https://bettersupabase.com/docs/frameworks/orpc#serve-the-api";
991
992
  /** Top-level keys 0.15 removed, with what replaces them. */
992
- const REMOVED_KEYS = /* @__PURE__ */ new Map([["plugins", "removed in 0.15: the updated-at, created-by, trash and memberships blocks carry these columns now; run `better-supabase codemod 0.15`"], ["scaffold", SCAFFOLD_REMOVED]]);
993
+ const REMOVED_KEYS = /* @__PURE__ */ new Map([
994
+ ["plugins", "removed in 0.15: the updated-at, created-by, trash and memberships blocks carry these columns now; run `better-supabase codemod 0.15`"],
995
+ ["scaffold", SCAFFOLD_REMOVED],
996
+ ["tables", TABLES_REMOVED],
997
+ ["appTables", TABLES_REMOVED],
998
+ ["records", "renamed to `subjects` in 0.28; rename the key. A table's subject now comes from `@bsb subject` in its comment"]
999
+ ]);
993
1000
  const RECORD_TYPES_MOVED = "renamed to `gen.recordTypes` in 0.15; run `better-supabase codemod 0.15`";
994
1001
  /** Keys of the flat 0.14 config in one config block. */
995
1002
  function movedGroupIssues(prefix, block) {
@@ -1648,8 +1655,7 @@ const ENTRIES = {
1648
1655
  "entitlements"
1649
1656
  ])
1650
1657
  })),
1651
- records: FLAT.subjects,
1652
- tables: FLAT.appTables,
1658
+ subjects: FLAT.subjects,
1653
1659
  blocks: FLAT.blocks,
1654
1660
  adapters: FLAT.integrations,
1655
1661
  gen: optional(strictObject({
@@ -1839,6 +1845,26 @@ function mergeConfig(base, override) {
1839
1845
  return merged;
1840
1846
  }
1841
1847
  /**
1848
+ * A config without the removed top-level `tables` and `records` keys: the
1849
+ * tables as `appTables`, and the records merged into `subjects`. `migrate
1850
+ * schema-first` reads them to write the tables as SQL.
1851
+ */
1852
+ function takeLegacyTables(config) {
1853
+ if (!isPlainObject(config)) return {};
1854
+ const { tables, appTables, records, ...rest } = config;
1855
+ const subjects = isPlainObject(records) ? records : void 0;
1856
+ return {
1857
+ config: subjects === void 0 ? rest : {
1858
+ ...rest,
1859
+ subjects: {
1860
+ ...subjects,
1861
+ ...isPlainObject(rest["subjects"]) ? rest["subjects"] : {}
1862
+ }
1863
+ },
1864
+ appTables: isPlainObject(tables) ? tables : appTables
1865
+ };
1866
+ }
1867
+ /**
1842
1868
  * The config with the `environment` blocks merged in: `$env.<name>`, then the
1843
1869
  * `$development`, `$production`, `$test` or `$ci` shorthand. Every `$` key is
1844
1870
  * dropped from the result.
@@ -1874,7 +1900,7 @@ function defaultConfig(cwd, explicit, environment, path = discoverConfig(cwd, ex
1874
1900
  * `--config` keeps `cwd` as the root. `path` is the file `discoverConfig`
1875
1901
  * found, for callers that already looked it up.
1876
1902
  */
1877
- async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit)) {
1903
+ async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit), options = {}) {
1878
1904
  const withEnvironment = (resolved) => environment === void 0 ? resolved : {
1879
1905
  ...resolved,
1880
1906
  environment
@@ -1892,11 +1918,16 @@ async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd,
1892
1918
  extend: false,
1893
1919
  giget: false
1894
1920
  });
1895
- if (!isConfig(config)) {
1896
- const issues = configIssues(config);
1921
+ const legacy = options.legacyTables === true ? takeLegacyTables(config) : {};
1922
+ const current = legacy.config ?? config;
1923
+ if (!isConfig(current)) {
1924
+ const issues = configIssues(current);
1897
1925
  throw new CliError("config_invalid", `${display(cwd, path)} is not a valid config:\n${issues.map((issue) => ` ${issue}`).join("\n")}`, { issues });
1898
1926
  }
1899
- return withEnvironment(await withSchemaTags(resolveConfig(applyEnvironment(config, environment), explicit ? cwd : dirname(path))));
1927
+ return withEnvironment(await withSchemaTags(resolveConfig({
1928
+ ...applyEnvironment(current, environment),
1929
+ ...legacy.appTables === void 0 ? {} : { appTables: legacy.appTables }
1930
+ }, explicit ? cwd : dirname(path))));
1900
1931
  }
1901
1932
  /** `[db] port` or `[api] port` from `supabase/config.toml`. */
1902
1933
  async function readSupabasePort(root, section) {
@@ -1 +1 @@
1
- export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-KvV-sLZL.js";
1
+ export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-Cskysxp-.js";
@@ -1,5 +1,5 @@
1
1
  import { a as configObject, c as mask, g as skipSpace, i as closingIndex, l as properties, o as indentAt } from "./config-edit-CrWfk8s3.js";
2
- import { CONFIG_GROUPS, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, groupEntries, hasFlatTables } from "better-supabase/config";
2
+ import { CONFIG_GROUPS, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, groupEntries } from "better-supabase/config";
3
3
  //#region src/cli/codemod-record-bindings.ts
4
4
  /** Blocks whose record section export became `<block>Binding` in 0.15. */
5
5
  const BLOCK_BINDINGS = [
@@ -276,10 +276,9 @@ function regroup(source, open, organization) {
276
276
  members.set(group, [...members.get(group) ?? [], text]);
277
277
  if (!firstAt.has(group)) firstAt.set(group, at);
278
278
  };
279
- const flatTables = hasFlatTables(props.flatMap((prop) => prop.key ?? []));
280
279
  for (const [index, prop] of props.entries()) {
281
280
  const key = prop.key;
282
- const group = key === "tables" && !flatTables ? void 0 : GROUP_OF.get(key);
281
+ const group = GROUP_OF.get(key);
283
282
  const rename = RENAMED_CONFIG_KEYS.find(([, flat]) => flat === key);
284
283
  const isGroup = GROUP_KEYS.has(key);
285
284
  if (group === void 0 && !isGroup) {
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-DH1kcmmP.js";
2
- import { t as CACHE_DIR } from "./cache-Czfw7Iow.js";
3
- import { x as installedVersion } from "./snapshot-DdAP7LWO.js";
2
+ import { t as CACHE_DIR } from "./cache-BuoIFlUJ.js";
3
+ import { x as installedVersion } from "./snapshot-B5LXkVMC.js";
4
4
  import { t as i } from "./jsonc-D5Fu67jw.js";
5
5
  import { resolve } from "node:path";
6
6
  import { createHash } from "node:crypto";