better-supabase 0.18.3 → 0.19.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 (439) hide show
  1. package/dist/{ai-cache-Cu8j6aQQ.js → ai-cache-BuNbWEFI.js} +2 -2
  2. package/dist/{ai-files-CgFCRsnU.js → ai-files-DeMWQfzs.js} +2 -2
  3. package/dist/{ai-schedules-DzLh6BYI.d.ts → ai-schedules-B20M2SIi.d.ts} +1 -1
  4. package/dist/ai-sdk/agents/index.d.ts +2 -2
  5. package/dist/ai-sdk/batches/index.js +1 -1
  6. package/dist/ai-sdk/cache/index.js +1 -1
  7. package/dist/ai-sdk/files/index.js +2 -2
  8. package/dist/ai-sdk/mcp/index.js +1 -1
  9. package/dist/{api-B6zteBya.d.ts → api-BiOgjXn5.d.ts} +1 -1
  10. package/dist/{app-tables-atP-tZKZ.d.ts → app-tables-Q29TR4W9.d.ts} +1 -1
  11. package/dist/astro/index.d.ts +3 -3
  12. package/dist/{attachments-M-Dy79Ry.js → attachments-BTIwCuwm.js} +4 -4
  13. package/dist/{authorization-IiE__z2m.d.ts → authorization-08F77H2w.d.ts} +3 -0
  14. package/dist/{automations-B5P6vTvk.js → automations-EzXteupo.js} +2 -1
  15. package/dist/{automations-BYsz43AG.js → automations-jIIaT9EJ.js} +3 -3
  16. package/dist/better-result/index.d.ts +2 -2
  17. package/dist/{bind-pu5TLrla.d.ts → bind-wkfp7hgx.d.ts} +4 -4
  18. package/dist/{block-authors-BDV3y1SP.js → block-authors-D9hyCizs.js} +1 -1
  19. package/dist/{block-env-CA65ulTD.d.ts → block-env-D-zK3_Ta.d.ts} +4 -4
  20. package/dist/{block-helpers-CtBdjgO4.js → block-helpers-DnCtsKtv.js} +2 -83
  21. package/dist/{block-hooks-BfxX3682.js → block-hooks-DbIpkq7a.js} +1 -1
  22. package/dist/{block-subjects-BhDKK_j7.js → block-subjects-BRJO0IqO.js} +1 -1
  23. package/dist/block-transport-PNea4lfQ.js +84 -0
  24. package/dist/blocks/access-requests/index.d.ts +1 -1
  25. package/dist/blocks/access-requests/index.js +3 -2
  26. package/dist/blocks/activities/index.d.ts +1 -1
  27. package/dist/blocks/activities/index.js +3 -2
  28. package/dist/blocks/agents/index.d.ts +1 -1
  29. package/dist/blocks/agents/index.js +3 -2
  30. package/dist/blocks/ai-cache/index.d.ts +1 -1
  31. package/dist/blocks/ai-cache/index.js +2 -2
  32. package/dist/blocks/ai-chat/index.d.ts +4 -4
  33. package/dist/blocks/ai-chat/index.js +3 -2
  34. package/dist/blocks/ai-files/index.d.ts +1 -1
  35. package/dist/blocks/ai-files/index.js +2 -2
  36. package/dist/blocks/ai-keys/index.d.ts +1 -1
  37. package/dist/blocks/ai-keys/index.js +3 -2
  38. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  39. package/dist/blocks/ai-schedules/index.js +3 -2
  40. package/dist/blocks/announcements/index.d.ts +4 -4
  41. package/dist/blocks/announcements/index.js +3 -2
  42. package/dist/blocks/api-keys/index.d.ts +2 -2
  43. package/dist/blocks/api-keys/index.js +3 -2
  44. package/dist/blocks/approvals/index.d.ts +1 -1
  45. package/dist/blocks/approvals/index.js +4 -3
  46. package/dist/blocks/assets/index.d.ts +1 -1
  47. package/dist/blocks/assets/index.js +3 -2
  48. package/dist/blocks/assignment/index.d.ts +1 -1
  49. package/dist/blocks/assignment/index.js +4 -3
  50. package/dist/blocks/attachments/index.d.ts +2 -2
  51. package/dist/blocks/attachments/index.js +3 -2
  52. package/dist/blocks/audit/index.d.ts +5 -5
  53. package/dist/blocks/audit/index.js +5 -4
  54. package/dist/blocks/automations/index.d.ts +3 -3
  55. package/dist/blocks/automations/index.js +4 -4
  56. package/dist/blocks/billable-time/index.d.ts +1 -1
  57. package/dist/blocks/billable-time/index.js +4 -3
  58. package/dist/blocks/billing/index.d.ts +3 -3
  59. package/dist/blocks/billing/index.js +4 -3
  60. package/dist/blocks/bookings/index.d.ts +2 -2
  61. package/dist/blocks/bookings/index.js +3 -3
  62. package/dist/blocks/bulk/index.d.ts +1 -1
  63. package/dist/blocks/bulk/index.js +2 -2
  64. package/dist/blocks/calendar/index.d.ts +2 -2
  65. package/dist/blocks/calendar/index.js +2 -2
  66. package/dist/blocks/catalog/index.d.ts +1 -1
  67. package/dist/blocks/catalog/index.js +4 -3
  68. package/dist/blocks/channels/index.d.ts +1 -1
  69. package/dist/blocks/channels/index.js +3 -2
  70. package/dist/blocks/collections/index.d.ts +1 -1
  71. package/dist/blocks/collections/index.js +3 -2
  72. package/dist/blocks/comments/index.d.ts +5 -5
  73. package/dist/blocks/comments/index.js +6 -5
  74. package/dist/blocks/compliance/index.d.ts +1 -1
  75. package/dist/blocks/compliance/index.js +3 -2
  76. package/dist/blocks/connectors/index.d.ts +1 -1
  77. package/dist/blocks/connectors/index.js +3 -2
  78. package/dist/blocks/contacts/index.d.ts +1 -1
  79. package/dist/blocks/contacts/index.js +3 -2
  80. package/dist/blocks/content/index.d.ts +1 -1
  81. package/dist/blocks/content/index.js +3 -2
  82. package/dist/blocks/contracts/index.d.ts +1 -1
  83. package/dist/blocks/contracts/index.js +5 -4
  84. package/dist/blocks/courses/index.d.ts +1 -1
  85. package/dist/blocks/courses/index.js +3 -2
  86. package/dist/blocks/created-by/index.d.ts +1 -1
  87. package/dist/blocks/custom-fields/index.d.ts +1 -1
  88. package/dist/blocks/custom-fields/index.js +2 -2
  89. package/dist/blocks/data-lifecycle/index.d.ts +1 -1
  90. package/dist/blocks/data-lifecycle/index.js +3 -2
  91. package/dist/blocks/deals/index.d.ts +1 -1
  92. package/dist/blocks/deals/index.js +8 -7
  93. package/dist/blocks/dispatch/index.d.ts +1 -1
  94. package/dist/blocks/dispatch/index.js +4 -3
  95. package/dist/blocks/documents/index.d.ts +1 -1
  96. package/dist/blocks/documents/index.js +3 -2
  97. package/dist/blocks/domains/index.d.ts +1 -1
  98. package/dist/blocks/domains/index.js +4 -3
  99. package/dist/blocks/donations/index.d.ts +1 -1
  100. package/dist/blocks/donations/index.js +4 -3
  101. package/dist/blocks/drive/index.d.ts +1 -1
  102. package/dist/blocks/drive/index.js +4 -3
  103. package/dist/blocks/employees/index.d.ts +2 -2
  104. package/dist/blocks/employees/index.js +5 -4
  105. package/dist/blocks/enrichment/index.d.ts +1 -1
  106. package/dist/blocks/enrichment/index.js +3 -2
  107. package/dist/blocks/enrollments/index.d.ts +1 -1
  108. package/dist/blocks/enrollments/index.js +3 -2
  109. package/dist/blocks/entitlements/index.d.ts +3 -3
  110. package/dist/blocks/entitlements/index.js +2 -2
  111. package/dist/blocks/expenses/index.d.ts +1 -1
  112. package/dist/blocks/expenses/index.js +4 -3
  113. package/dist/blocks/field-history/index.d.ts +1 -1
  114. package/dist/blocks/field-history/index.js +3 -2
  115. package/dist/blocks/flags/index.d.ts +1 -1
  116. package/dist/blocks/flags/index.js +4 -3
  117. package/dist/blocks/forecasts/index.d.ts +1 -1
  118. package/dist/blocks/forecasts/index.js +6 -5
  119. package/dist/blocks/forms/index.d.ts +2 -2
  120. package/dist/blocks/forms/index.js +3 -2
  121. package/dist/blocks/goals/index.d.ts +1 -1
  122. package/dist/blocks/goals/index.js +4 -3
  123. package/dist/blocks/guests/index.d.ts +1 -1
  124. package/dist/blocks/guests/index.js +3 -2
  125. package/dist/blocks/hiring/index.d.ts +1 -1
  126. package/dist/blocks/hiring/index.js +4 -3
  127. package/dist/blocks/identities/index.d.ts +1 -1
  128. package/dist/blocks/identities/index.js +3 -2
  129. package/dist/blocks/imports/index.d.ts +1 -1
  130. package/dist/blocks/imports/index.js +2 -2
  131. package/dist/blocks/inbox/index.d.ts +5 -5
  132. package/dist/blocks/inbox/index.js +4 -3
  133. package/dist/blocks/incidents/index.d.ts +1 -1
  134. package/dist/blocks/incidents/index.js +3 -2
  135. package/dist/blocks/index.d.ts +2 -2
  136. package/dist/blocks/index.js +4 -4
  137. package/dist/blocks/inventory/index.d.ts +1 -1
  138. package/dist/blocks/inventory/index.js +3 -2
  139. package/dist/blocks/invoices/index.d.ts +2 -2
  140. package/dist/blocks/invoices/index.js +7 -6
  141. package/dist/blocks/knowledge/index.d.ts +1 -1
  142. package/dist/blocks/knowledge/index.js +2 -2
  143. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  144. package/dist/blocks/lead-scoring/index.js +5 -4
  145. package/dist/blocks/leases/index.d.ts +1 -1
  146. package/dist/blocks/leases/index.js +4 -3
  147. package/dist/blocks/leave/index.d.ts +1 -1
  148. package/dist/blocks/leave/index.js +3 -2
  149. package/dist/blocks/ledger/index.d.ts +1 -1
  150. package/dist/blocks/ledger/index.js +3 -2
  151. package/dist/blocks/mail-sync/index.d.ts +1 -1
  152. package/dist/blocks/mail-sync/index.js +3 -2
  153. package/dist/blocks/memberships/index.d.ts +1 -1
  154. package/dist/blocks/memory/index.d.ts +1 -1
  155. package/dist/blocks/memory/index.js +4 -3
  156. package/dist/blocks/messaging/index.d.ts +5 -5
  157. package/dist/blocks/messaging/index.js +5 -4
  158. package/dist/blocks/metrics/index.d.ts +1 -1
  159. package/dist/blocks/metrics/index.js +3 -2
  160. package/dist/blocks/mfa/index.d.ts +2 -2
  161. package/dist/blocks/moderation/index.d.ts +1 -1
  162. package/dist/blocks/moderation/index.js +3 -2
  163. package/dist/blocks/notifications/index.d.ts +4 -4
  164. package/dist/blocks/notifications/index.js +4 -3
  165. package/dist/blocks/numbering/index.d.ts +1 -1
  166. package/dist/blocks/numbering/index.js +2 -2
  167. package/dist/blocks/oauth-server/index.d.ts +1 -1
  168. package/dist/blocks/oauth-server/index.js +3 -2
  169. package/dist/blocks/onboarding/index.d.ts +2 -2
  170. package/dist/blocks/onboarding/index.js +3 -2
  171. package/dist/blocks/orders/index.d.ts +2 -2
  172. package/dist/blocks/orders/index.js +5 -4
  173. package/dist/blocks/organizations/index.d.ts +3 -3
  174. package/dist/blocks/organizations/index.js +3 -2
  175. package/dist/blocks/outbox/index.d.ts +1 -1
  176. package/dist/blocks/outbox/index.js +3 -2
  177. package/dist/blocks/passes/index.d.ts +1 -1
  178. package/dist/blocks/passes/index.js +5 -4
  179. package/dist/blocks/permissions/index.d.ts +3 -3
  180. package/dist/blocks/permissions/index.js +3 -2
  181. package/dist/blocks/pipelines/index.d.ts +1 -1
  182. package/dist/blocks/pipelines/index.js +4 -3
  183. package/dist/blocks/posts/index.d.ts +1 -1
  184. package/dist/blocks/posts/index.js +3 -2
  185. package/dist/blocks/profiles/index.d.ts +1 -1
  186. package/dist/blocks/profiles/index.js +3 -2
  187. package/dist/blocks/promotions/index.d.ts +1 -1
  188. package/dist/blocks/promotions/index.js +4 -3
  189. package/dist/blocks/push/index.d.ts +2 -2
  190. package/dist/blocks/push/index.js +3 -2
  191. package/dist/blocks/queue/index.d.ts +1 -1
  192. package/dist/blocks/queue/index.js +4 -3
  193. package/dist/blocks/quotes/index.d.ts +2 -2
  194. package/dist/blocks/quotes/index.js +7 -6
  195. package/dist/blocks/rank/index.d.ts +1 -1
  196. package/dist/blocks/rank/index.js +2 -2
  197. package/dist/blocks/reactions/index.d.ts +4 -4
  198. package/dist/blocks/reactions/index.js +4 -3
  199. package/dist/blocks/relations/index.d.ts +1 -1
  200. package/dist/blocks/relations/index.js +4 -4
  201. package/dist/blocks/reminders/index.d.ts +1 -1
  202. package/dist/blocks/reminders/index.js +4 -4
  203. package/dist/blocks/reviews/index.d.ts +1 -1
  204. package/dist/blocks/reviews/index.js +3 -2
  205. package/dist/blocks/saved-views/index.d.ts +3 -3
  206. package/dist/blocks/saved-views/index.js +2 -2
  207. package/dist/blocks/scores/index.d.ts +1 -1
  208. package/dist/blocks/scores/index.js +3 -3
  209. package/dist/blocks/search/index.d.ts +3 -3
  210. package/dist/blocks/search/index.js +3 -2
  211. package/dist/blocks/security-events/index.d.ts +1 -1
  212. package/dist/blocks/security-events/index.js +3 -2
  213. package/dist/blocks/segments/index.d.ts +1 -1
  214. package/dist/blocks/segments/index.js +4 -3
  215. package/dist/blocks/sequences/index.d.ts +1 -1
  216. package/dist/blocks/sequences/index.js +3 -2
  217. package/dist/blocks/service-accounts/index.d.ts +1 -1
  218. package/dist/blocks/service-accounts/index.js +3 -2
  219. package/dist/blocks/sessions/index.d.ts +2 -2
  220. package/dist/blocks/sessions/index.js +1 -1
  221. package/dist/blocks/settings/index.d.ts +2 -2
  222. package/dist/blocks/settings/index.js +3 -2
  223. package/dist/blocks/share-links/index.d.ts +1 -1
  224. package/dist/blocks/share-links/index.js +3 -3
  225. package/dist/blocks/shipments/index.d.ts +1 -1
  226. package/dist/blocks/shipments/index.js +5 -4
  227. package/dist/blocks/signatures/index.d.ts +1 -1
  228. package/dist/blocks/signatures/index.js +3 -2
  229. package/dist/blocks/signing-keys/index.d.ts +1 -1
  230. package/dist/blocks/signing-keys/index.js +2 -2
  231. package/dist/blocks/sla/index.d.ts +1 -1
  232. package/dist/blocks/sla/index.js +5 -4
  233. package/dist/blocks/sso/index.d.ts +1 -1
  234. package/dist/blocks/sso/index.js +3 -2
  235. package/dist/blocks/state-machine/index.d.ts +1 -1
  236. package/dist/blocks/state-machine/index.js +3 -3
  237. package/dist/blocks/subjects/index.d.ts +2 -2
  238. package/dist/blocks/subjects/index.js +4 -3
  239. package/dist/blocks/tags/index.d.ts +2 -2
  240. package/dist/blocks/tags/index.js +2 -2
  241. package/dist/blocks/tasks/index.d.ts +2 -2
  242. package/dist/blocks/tasks/index.js +3 -2
  243. package/dist/blocks/teams/index.d.ts +1 -1
  244. package/dist/blocks/teams/index.js +2 -2
  245. package/dist/blocks/templates/index.d.ts +1 -1
  246. package/dist/blocks/templates/index.js +3 -2
  247. package/dist/blocks/time-tracking/index.d.ts +1 -1
  248. package/dist/blocks/time-tracking/index.js +5 -4
  249. package/dist/blocks/timeline/index.d.ts +3 -3
  250. package/dist/blocks/timeline/index.js +4 -3
  251. package/dist/blocks/trash/index.d.ts +1 -1
  252. package/dist/blocks/trash/index.js +3 -2
  253. package/dist/blocks/undo/index.d.ts +2 -2
  254. package/dist/blocks/undo/index.js +2 -2
  255. package/dist/blocks/updated-at/index.d.ts +1 -1
  256. package/dist/blocks/usage/index.d.ts +2 -2
  257. package/dist/blocks/usage/index.js +3 -2
  258. package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
  259. package/dist/blocks/vercel-marketplace/index.js +3 -2
  260. package/dist/blocks/versions/index.d.ts +1 -1
  261. package/dist/blocks/versions/index.js +4 -3
  262. package/dist/blocks/waitlist/index.d.ts +1 -1
  263. package/dist/blocks/waitlist/index.js +3 -2
  264. package/dist/blocks/webhooks/index.d.ts +2 -2
  265. package/dist/blocks/webhooks/index.js +5 -4
  266. package/dist/blocks/workflow-editor/index.d.ts +4 -4
  267. package/dist/blocks/workflow-editor/index.js +3 -2
  268. package/dist/blocks/workflows/index.d.ts +4 -4
  269. package/dist/blocks/workflows/index.js +3 -2
  270. package/dist/{build-QitPVzzO.js → build-D9lWi5bk.js} +1 -1
  271. package/dist/chat-sdk/index.js +2 -1
  272. package/dist/cli/add-Bcw12jts.js +1 -0
  273. package/dist/cli/{add-Ccca1h3C.js → add-D5HxanFm.js} +2 -2
  274. package/dist/cli/{add-Elh2S4Z8.js → add-Lr7uTZXQ.js} +11 -11
  275. package/dist/cli/{backfill-kq6M-ksU.js → backfill-Cl1zEel7.js} +3 -3
  276. package/dist/cli/bin.js +1 -1
  277. package/dist/cli/{blocks-CSOK4qqe.js → blocks-CsPua74J.js} +1 -1
  278. package/dist/cli/{blocks-vl6ydiEz.js → blocks-f0obMCxm.js} +1 -1
  279. package/dist/cli/{cache-DPRc-BzP.js → cache-tvTW5J9K.js} +1 -1
  280. package/dist/cli/{codemod-CoaS9hJu.js → codemod-CVzRWS3j.js} +1 -1
  281. package/dist/cli/{config-BJSqMi04.js → config-BH0goim0.js} +3 -2
  282. package/dist/cli/{config-BlfVh0IP.js → config-CTRzkX0H.js} +1 -1
  283. package/dist/cli/{content-mapper-DM2jgKpn.js → content-mapper-C0LJDmVL.js} +2 -2
  284. package/dist/cli/{db-DYU5hUcd.js → db-DCeyHS1y.js} +2 -2
  285. package/dist/cli/{doctor-CU08NDWh.js → doctor-q701Qif_.js} +16 -16
  286. package/dist/cli/{gen-DNwJl35g.js → gen--vu_c2RF.js} +14 -14
  287. package/dist/cli/index.d.ts +1 -1
  288. package/dist/cli/index.js +7 -7
  289. package/dist/cli/{init-B_CsBYPR.js → init-DGz5Hk9X.js} +6 -6
  290. package/dist/cli/{live-TQN9GSV4.js → live-sBPXy0VE.js} +2 -2
  291. package/dist/cli/{mcp-BfC4giv7.js → mcp-DY_YK_WV.js} +2 -2
  292. package/dist/cli/{metadata-DlISbZDp.js → metadata-CoPGFRMb.js} +3 -3
  293. package/dist/cli/{migration-safety-C8mh2xlK.js → migration-safety-Cn7OLHJm.js} +2 -2
  294. package/dist/cli/{migrations-D-0Sd9tO.js → migrations-CUIEmdnS.js} +1 -1
  295. package/dist/cli/{module-migration-Cl8hBBqw.js → module-migration-bWK0xO2_.js} +2 -2
  296. package/dist/cli/powersync-CG3Bp6FD.js +1 -0
  297. package/dist/cli/{powersync-CBCanSnb.js → powersync-DAM5JAmz.js} +2 -2
  298. package/dist/cli/{print-DImaK12W.js → print-Dnbk8J2y.js} +2 -2
  299. package/dist/cli/{remove-DeOze3-k.js → remove-DAVVPbWw.js} +5 -5
  300. package/dist/cli/{render-GFy-2cii.js → render-PJdiRcqF.js} +28 -5
  301. package/dist/cli/{run-D4XWCMl2.js → run-6F72J0AQ.js} +25 -25
  302. package/dist/cli/{run-DNpUCD8d.js → run-D7-FuY6e.js} +8 -8
  303. package/dist/cli/seed-CXJvTU5D.js +1 -0
  304. package/dist/cli/{seed-D9mt8bnW.js → seed-CdSxunFT.js} +2 -2
  305. package/dist/cli/{shared-DM_FKwqk.js → shared-9O58FYPm.js} +1 -1
  306. package/dist/cli/{snapshot-BnZCeU7E.js → snapshot-rTRe56PH.js} +3 -3
  307. package/dist/cli/{source-DZonA0x5.js → source-EHhEoKBD.js} +1 -1
  308. package/dist/cli/{source-args-DlckPVje.js → source-args-z-jkabmO.js} +1 -1
  309. package/dist/cli/{spec-DCO8EEnf.js → spec-CR4Y9kn8.js} +2 -2
  310. package/dist/cli/{spec-U6hCGGu_.js → spec-DqSbbTzD.js} +1 -1
  311. package/dist/cli/{sql-layout-VnkvENWw.js → sql-layout-BijeFLWv.js} +2 -2
  312. package/dist/cli/{sync-D-YWMzZI.js → sync-BAmWXRDR.js} +3 -3
  313. package/dist/cli/{upgrade-BGcDzVSu.js → upgrade-BKN6eSx-.js} +4 -4
  314. package/dist/cli/{upgrade-DKZ3QOEJ.js → upgrade-oaUd22Il.js} +2 -2
  315. package/dist/cli/{version-BatoE1Gj.js → version-BkEOr4WS.js} +1 -1
  316. package/dist/client/index.d.ts +5 -5
  317. package/dist/client/native/index.d.ts +4 -4
  318. package/dist/{codecs-TylXqU_I.js → codecs-BfmQSbM6.js} +2 -2
  319. package/dist/{composite-C-8A8qzi.d.ts → composite-COQJBDmG.d.ts} +3 -3
  320. package/dist/config/index.d.ts +2 -2
  321. package/dist/config/index.js +1 -1
  322. package/dist/{config-mbVyJwSc.js → config-D74JT0qL.js} +2 -1
  323. package/dist/{context-Cj-9gE6l.d.ts → context-BI1PPPkw.d.ts} +6 -3
  324. package/dist/{controller-BR7CZ1R9.d.ts → controller-DhT57SGq.d.ts} +1 -1
  325. package/dist/{conversion-BgtOfTaS.d.ts → conversion-DAV0hOJQ.d.ts} +1 -1
  326. package/dist/create/index.d.ts +2 -2
  327. package/dist/create/index.js +2 -2
  328. package/dist/{create-blocks-Bu4H5TXw.js → create-blocks-B-9HVf7m.js} +6 -4
  329. package/dist/credentials/index.js +2 -1
  330. package/dist/{deal-forecast-Bv52QMyX.js → deal-forecast-DikouYGj.js} +2 -2
  331. package/dist/{define-Cgru0_kF.d.ts → define-B_pxEy7d.d.ts} +2 -0
  332. package/dist/{define-DlUeKHce.js → define-Dt9DRqV_.js} +80 -4
  333. package/dist/{define-block-CJWiDWa5.d.ts → define-block-D4hZSb2G.d.ts} +2 -1
  334. package/dist/edge/index.d.ts +5 -5
  335. package/dist/{entitlements-DHcNt1aF.d.ts → entitlements-BhNzAcJR.d.ts} +1 -1
  336. package/dist/{entitlements-NZAE_vLj.js → entitlements-DBir2qwB.js} +2 -2
  337. package/dist/{executor-BWFfz0ik.d.ts → executor-D1UUQEGL.d.ts} +2 -2
  338. package/dist/expo/index.d.ts +2 -2
  339. package/dist/{field-errors-DkAemDoc.d.ts → field-errors-D7mzrKjR.d.ts} +6 -6
  340. package/dist/{fields-B0zaJAO3.js → fields--5a88KJe.js} +3 -2
  341. package/dist/{flags-BOdA_ETQ.js → flags-ClOQY-p5.js} +1 -1
  342. package/dist/flags-sdk/index.js +2 -2
  343. package/dist/{framework-x9Y4uB1q.d.ts → framework-BghlRbea.d.ts} +3 -3
  344. package/dist/hono/index.d.ts +4 -4
  345. package/dist/{index-DTbJAsrT.d.ts → index-B8iW3y2w.d.ts} +9 -9
  346. package/dist/{index-C6ruLtyx.d.ts → index-BJBwUM9l.d.ts} +3 -3
  347. package/dist/{index-C0t-vNIt.d.ts → index-BSXQlJt2.d.ts} +2 -2
  348. package/dist/{index-DZylLz7h.d.ts → index-Bc-EhTb-.d.ts} +3 -3
  349. package/dist/{index-DVYEoVMK.d.ts → index-DZ5VbYvy.d.ts} +1 -1
  350. package/dist/{index-DmbCyl6Z.d.ts → index-DsB7dy9R.d.ts} +3 -3
  351. package/dist/index.d.ts +1 -1
  352. package/dist/index.js +1 -1
  353. package/dist/instance-property-hRh88y_s.js +7 -0
  354. package/dist/{knowledge-BGbtxMP9.js → knowledge-CV6OSirC.js} +2 -2
  355. package/dist/list/index.d.ts +1 -1
  356. package/dist/{list-query-DxjuIHEL.d.ts → list-query-BIZBVEoF.d.ts} +1 -1
  357. package/dist/mapper/bin.js +6 -6
  358. package/dist/mcp/index.d.ts +4 -4
  359. package/dist/mcp/sdk/index.d.ts +2 -2
  360. package/dist/{money-codec-BzddguAQ.js → money-codec-uV5WbT60.js} +1 -1
  361. package/dist/next/index.d.ts +14 -14
  362. package/dist/next/index.js +2 -2
  363. package/dist/{operations-CAjMgNr9.d.ts → operations-DbNAgo7E.d.ts} +1 -1
  364. package/dist/{options-lsxJYfYx.js → options-BOqfYsM1.js} +2 -1
  365. package/dist/{options-Bc4xz5jQ.js → options-DZen3UiC.js} +2 -1
  366. package/dist/orpc/index.d.ts +4 -4
  367. package/dist/orpc/index.js +1 -1
  368. package/dist/otel/index.js +4 -4
  369. package/dist/{ports-g0H1Kzwr.d.ts → ports-Dwe0JqBI.d.ts} +1 -1
  370. package/dist/powersync/index.d.ts +3 -3
  371. package/dist/preset/index.d.ts +3 -3
  372. package/dist/{push-token-Cl2EihRc.d.ts → push-token-C0dwbMZF.d.ts} +1 -1
  373. package/dist/query/index.d.ts +1 -1
  374. package/dist/{rate-limit-Dt9vAY4E.js → rate-limit-BPuUWz4U.js} +3 -2
  375. package/dist/react/index.d.ts +5 -5
  376. package/dist/react/index.js +1 -1
  377. package/dist/react/native/index.d.ts +1 -1
  378. package/dist/react/server.d.ts +6 -6
  379. package/dist/react/server.js +1 -1
  380. package/dist/{react-zBTxLsV6.js → react-GgLZ66FU.js} +2 -2
  381. package/dist/react-router/index.d.ts +3 -3
  382. package/dist/realtime/index.d.ts +3 -3
  383. package/dist/realtime/index.js +2 -2
  384. package/dist/{record-form-zMwz0Ayt.d.ts → record-form-eiqGbx9J.d.ts} +1 -1
  385. package/dist/records/index.d.ts +7 -7
  386. package/dist/{resource-execute-CKBtGL8-.d.ts → resource-execute-CWfzJmUd.d.ts} +1 -1
  387. package/dist/{resource-types-8Q5Klkpa.d.ts → resource-types-BdGAUbKw.d.ts} +1 -1
  388. package/dist/{resources-DxpqenZA.d.ts → resources-EeQWFMR8.d.ts} +1 -1
  389. package/dist/{rows-Bm6sskji.js → rows-Bh9QemqN.js} +1 -1
  390. package/dist/{rows-BDLZStp4.js → rows-EGAbu7MG.js} +2 -2
  391. package/dist/{sales-lines-D-sf9PIB.js → sales-lines-CP4Z_LyE.js} +6 -4
  392. package/dist/{sales-lines-Bk4mbLH1.d.ts → sales-lines-KxxStRzU.d.ts} +1 -0
  393. package/dist/{sales-shared-DXGFJP4g.js → sales-shared-BKXXA5qV.js} +1 -1
  394. package/dist/{schemas-l2aF78zQ.js → schemas-BSTNfGsQ.js} +1 -1
  395. package/dist/{scores-CRp3vvQU.js → scores-CsgM-dw7.js} +2 -2
  396. package/dist/server/index.d.ts +7 -7
  397. package/dist/server/index.js +2 -2
  398. package/dist/{server-types-gR4Q1aM0.d.ts → server-types-rmq2QzsD.d.ts} +1 -1
  399. package/dist/{session-Fcft5A39.d.ts → session-CpwxyojG.d.ts} +1 -1
  400. package/dist/{signing-keys-wGKh4vtt.js → signing-keys-DqI-gB_C.js} +2 -2
  401. package/dist/solid/index.d.ts +6 -6
  402. package/dist/solid-start/index.d.ts +3 -3
  403. package/dist/spec/index.d.ts +1 -1
  404. package/dist/spec/index.js +1 -1
  405. package/dist/sql/index.d.ts +4 -4
  406. package/dist/sql/index.js +1 -1
  407. package/dist/{sql-B8usqPPx.js → sql-B0wb7XA5.js} +107 -64
  408. package/dist/sqlite/index.d.ts +1 -1
  409. package/dist/{sso-d2S4x_f9.js → sso-Co2TbnEy.js} +2 -2
  410. package/dist/ssr/index.d.ts +1 -1
  411. package/dist/storage/index.js +1 -1
  412. package/dist/streams/index.js +2 -1
  413. package/dist/{subject-readers-B-pQ9Mmo.js → subject-readers-F1xvRY-d.js} +1 -1
  414. package/dist/subject-type-BRnK7Av3.js +8 -0
  415. package/dist/svelte/index.d.ts +6 -6
  416. package/dist/sveltekit/index.d.ts +4 -4
  417. package/dist/{tags-sM-CH9Mn.d.ts → tags-CkO2erRP.d.ts} +1 -1
  418. package/dist/tanstack-db/index.d.ts +1 -1
  419. package/dist/tanstack-start/index.d.ts +3 -3
  420. package/dist/{tenant-DyoVYFfC.d.ts → tenant-BXNF10H5.d.ts} +1 -1
  421. package/dist/testing/index.d.ts +7 -7
  422. package/dist/testing/index.js +5 -5
  423. package/dist/{timeline-CMmo0R7g.d.ts → timeline-CHtoY7NO.d.ts} +3 -3
  424. package/dist/{topic-nQYxoTaU.d.ts → topic-BNkdk7qe.d.ts} +2 -2
  425. package/dist/{undo-BjCChCmH.js → undo-B3FQvuAd.js} +2 -2
  426. package/dist/{verify-DEqY__0N.d.ts → verify-CJxqZQdd.d.ts} +1 -1
  427. package/dist/vue/index.d.ts +6 -6
  428. package/dist/{watch-topic-UGSEWAqR.d.ts → watch-topic-wl74gws-.d.ts} +1 -1
  429. package/dist/workflow-sdk/world/index.js +1 -1
  430. package/dist/yjs/index.d.ts +1 -1
  431. package/dist/yjs/index.js +1 -1
  432. package/package.json +1 -1
  433. package/schemas/config-v1.json +22 -1
  434. package/dist/cli/add-BKybJ2e1.js +0 -1
  435. package/dist/cli/powersync-BEWwRqNy.js +0 -1
  436. package/dist/cli/seed-EPO6AvLG.js +0 -1
  437. package/dist/db-blocks-DJGbjIPz.js +0 -62
  438. package/dist/{sign-in-BLkRU3lc.js → sign-in-BTaRWS-L.js} +1 -1
  439. package/dist/{topic-J9I3yu6f.js → topic-DXbA-jwr.js} +1 -1
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-D-0Sd9tO.js";
2
+ import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-CUIEmdnS.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-D-YWMzZI.js";
5
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-BAmWXRDR.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,22 +1,22 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-BatoE1Gj.js";
3
+ import { t as VERSION } from "./version-BkEOr4WS.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-BnZCeU7E.js";
6
+ import { t as loadSnapshot } from "./snapshot-rTRe56PH.js";
7
7
  import { t as isRecord } from "./guards-CUlDNYZs.js";
8
- import { a as toCatalog } from "./source-DZonA0x5.js";
9
- import { n as dataMigration } from "./migrations-D-0Sd9tO.js";
10
- import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BJSqMi04.js";
8
+ import { a as toCatalog } from "./source-EHhEoKBD.js";
9
+ import { n as dataMigration } from "./migrations-CUIEmdnS.js";
10
+ import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BH0goim0.js";
11
11
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.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-C8mh2xlK.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-Cn7OLHJm.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-D-YWMzZI.js";
16
- import { t as addModules } from "./add-Ccca1h3C.js";
17
- import { n as ident } from "./live-TQN9GSV4.js";
18
- import { t as blockNames } from "./blocks-CSOK4qqe.js";
19
- import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
15
+ import { t as syncModules } from "./sync-BAmWXRDR.js";
16
+ import { t as addModules } from "./add-D5HxanFm.js";
17
+ import { n as ident } from "./live-sBPXy0VE.js";
18
+ import { t as blockNames } from "./blocks-CsPua74J.js";
19
+ import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.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";
@@ -1,10 +1,10 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.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-BJSqMi04.js";
4
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
5
5
  import { t as connect } from "./db-CQCLx7cx.js";
6
- import { n as ident } from "./live-TQN9GSV4.js";
7
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DlckPVje.js";
6
+ import { n as ident } from "./live-sBPXy0VE.js";
7
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-z-jkabmO.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-D4XWCMl2.js";
2
+ import { i as run } from "./run-6F72J0AQ.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,7 +1,7 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.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-DImaK12W.js";
4
+ import { n as listModules, t as printModule } from "./print-Dnbk8J2y.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 +1 @@
1
- export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-CSOK4qqe.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-CsPua74J.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-BatoE1Gj.js";
1
+ import { t as VERSION } from "./version-BkEOr4WS.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";
@@ -4,7 +4,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
4
4
  import { t as migrateCliCall } from "./moved-DVwgE8lV.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-VnkvENWw.js";
7
+ import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-BijeFLWv.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";
@@ -1232,7 +1232,7 @@ const FLAT = {
1232
1232
  boostMode: optional(picklist(["multiply", "add"])),
1233
1233
  order: optional(string())
1234
1234
  })]))),
1235
- subjects: optional(record(pipe(string(), regex(/^[a-z][a-z0-9_]{0,62}$/, "a subject type is lowercase letters, digits and underscores")), strictObject({
1235
+ subjects: optional(record(pipe(string(), regex(/^[a-z][a-z0-9_-]{0,62}$/, "a subject type is lowercase letters, digits, hyphens and underscores")), strictObject({
1236
1236
  table: string(),
1237
1237
  id: optional(string()),
1238
1238
  idType: optional(string()),
@@ -1274,7 +1274,8 @@ const FLAT = {
1274
1274
  "user",
1275
1275
  "none"
1276
1276
  ])),
1277
- ownTablePolicies: optional(picklist(["block", "app"]))
1277
+ ownTablePolicies: optional(picklist(["block", "app"])),
1278
+ tenantColumn: optional(string())
1278
1279
  })),
1279
1280
  seed: optional(strictObject({
1280
1281
  entry: optional(string()),
@@ -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-BJSqMi04.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-BH0goim0.js";
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-DH1kcmmP.js";
2
- import { t as CACHE_DIR } from "./cache-DPRc-BzP.js";
3
- import { x as installedVersion } from "./snapshot-BnZCeU7E.js";
2
+ import { t as CACHE_DIR } from "./cache-tvTW5J9K.js";
3
+ import { x as installedVersion } from "./snapshot-rTRe56PH.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";
@@ -2,11 +2,11 @@ import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.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
4
  import { t as display } from "./io-DH1kcmmP.js";
5
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BJSqMi04.js";
5
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
6
6
  import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
7
7
  import { r as supabaseCli } from "./exec--Q1ZEWUW.js";
8
8
  import { t as connect } from "./db-CQCLx7cx.js";
9
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DlckPVje.js";
9
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-z-jkabmO.js";
10
10
  import { a as migrationFiles, i as isShadowFailure, o as migrationVersion, r as inStackDiff, t as MIGRATION_HEADER } from "./in-stack-diff-DQTW53Vf.js";
11
11
  import { dirname, join, resolve } from "node:path";
12
12
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -1,36 +1,36 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-BatoE1Gj.js";
3
+ import { t as VERSION } from "./version-BkEOr4WS.js";
4
4
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
5
5
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
6
6
  import { a as sameText, t as display } from "./io-DH1kcmmP.js";
7
- import { t as CACHE_DIR } from "./cache-DPRc-BzP.js";
7
+ import { t as CACHE_DIR } from "./cache-tvTW5J9K.js";
8
8
  import { t as byCodePoint } from "./compare-BmIWVEui.js";
9
- import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-BnZCeU7E.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-GFy-2cii.js";
9
+ import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError } from "./snapshot-rTRe56PH.js";
10
+ import { d as configFor, r as renderFiles, u as notNullTag } from "./render-PJdiRcqF.js";
11
11
  import { t as isRecord } from "./guards-CUlDNYZs.js";
12
- import { i as request } from "./source-DZonA0x5.js";
13
- import { g as providerLabel, u as compiledReadSets } from "./migrations-D-0Sd9tO.js";
14
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BJSqMi04.js";
12
+ import { i as request } from "./source-EHhEoKBD.js";
13
+ import { g as providerLabel, u as compiledReadSets } from "./migrations-CUIEmdnS.js";
14
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
15
15
  import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
16
16
  import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
17
17
  import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
18
18
  import { t as connect } from "./db-CQCLx7cx.js";
19
- import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-DM2jgKpn.js";
19
+ import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-C0LJDmVL.js";
20
20
  import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
21
- import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-DNpUCD8d.js";
22
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-VnkvENWw.js";
23
- import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-DM_FKwqk.js";
24
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-Cl8hBBqw.js";
25
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-C8mh2xlK.js";
21
+ import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-D7-FuY6e.js";
22
+ import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-BijeFLWv.js";
23
+ import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-9O58FYPm.js";
24
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-bWK0xO2_.js";
25
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-Cn7OLHJm.js";
26
26
  import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
27
- import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-TQN9GSV4.js";
28
- import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
27
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-sBPXy0VE.js";
28
+ import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
29
29
  import { i as PLUGIN_SUBPATH_RENAMES, n as BLOCK_SUBPATH_RENAMES, o as SPEC_SUBPATH_RENAMES, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
30
30
  import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
31
31
  import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
32
32
  import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-BYlQ96WS.js";
33
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-DlISbZDp.js";
33
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-CoPGFRMb.js";
34
34
  import { existsSync } from "node:fs";
35
35
  import { dirname, resolve } from "node:path";
36
36
  import { createHash } from "node:crypto";
@@ -1,22 +1,22 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { a as parseNames, i as failedResult, n as CliError } from "./errors-BTe6A15O.js";
4
- import { u as catalogFingerprint } from "./cache-DPRc-BzP.js";
5
- import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-BnZCeU7E.js";
6
- import { n as dataMigration } from "./migrations-D-0Sd9tO.js";
7
- import { d as GEN_TASKS, p as isGenTask } from "./config-BJSqMi04.js";
4
+ import { u as catalogFingerprint } from "./cache-tvTW5J9K.js";
5
+ import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-rTRe56PH.js";
6
+ import { n as dataMigration } from "./migrations-CUIEmdnS.js";
7
+ import { d as GEN_TASKS, p as isGenTask } from "./config-BH0goim0.js";
8
8
  import { c as insideRoot, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
9
- import { n as runGen } from "./run-DNpUCD8d.js";
10
- import { t as syncModules } from "./sync-D-YWMzZI.js";
11
- import { t as addModules } from "./add-Ccca1h3C.js";
12
- import { n as listModules, t as printModule } from "./print-DImaK12W.js";
13
- import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-DlckPVje.js";
14
- import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-DlISbZDp.js";
9
+ import { n as runGen } from "./run-D7-FuY6e.js";
10
+ import { t as syncModules } from "./sync-BAmWXRDR.js";
11
+ import { t as addModules } from "./add-D5HxanFm.js";
12
+ import { n as listModules, t as printModule } from "./print-Dnbk8J2y.js";
13
+ import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
14
+ import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-CoPGFRMb.js";
15
15
  import { a as runEnv } from "./env-BCgVZkcb.js";
16
- import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-DCO8EEnf.js";
17
- import { n as runPowerSync } from "./powersync-CBCanSnb.js";
18
- import { t as runSeed } from "./seed-D9mt8bnW.js";
19
- import { t as upgrade } from "./upgrade-BGcDzVSu.js";
16
+ import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-CR4Y9kn8.js";
17
+ import { n as runPowerSync } from "./powersync-DAM5JAmz.js";
18
+ import { t as runSeed } from "./seed-CdSxunFT.js";
19
+ import { t as upgrade } from "./upgrade-BKN6eSx-.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { resolve } from "node:path";
22
22
  //#region src/cli/commands/sql.ts
@@ -798,6 +798,6 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
798
798
  export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined): Promise<ResolvedConfig>;
799
799
  //#endregion
800
800
  //#region src/cli/version.d.ts
801
- export declare const VERSION = "0.18.3";
801
+ export declare const VERSION = "0.19.0";
802
802
  //#endregion
803
803
  export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliArgs, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, CommandResult, CreateCliOptions, ExitCode, ExtrasFunction, ExtrasHook, ExtrasHookFunction, ExtrasTable, ForeignKeyAction, Format, GeneratorMetadata, IntrospectionSource, ManagementSourceOptions, NextStep, Paint, Prompter, Queryable, RunOptions, RunResult, Snapshot, SnapshotBucket, SnapshotExtras };
package/dist/cli/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { a as list, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-D4XWCMl2.js";
3
- import { t as VERSION } from "./version-BatoE1Gj.js";
2
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-6F72J0AQ.js";
3
+ import { t as VERSION } from "./version-BkEOr4WS.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-BnZCeU7E.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-GFy-2cii.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-DZonA0x5.js";
8
- import { s as loadConfig } from "./config-BJSqMi04.js";
9
- import { n as runGen } from "./run-DNpUCD8d.js";
5
+ import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-rTRe56PH.js";
6
+ import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-PJdiRcqF.js";
7
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-EHhEoKBD.js";
8
+ import { s as loadConfig } from "./config-BH0goim0.js";
9
+ import { n as runGen } from "./run-D7-FuY6e.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-BW
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-DPRc-BzP.js";
6
- import { a as findConfig, s as loadConfig } from "./config-BJSqMi04.js";
7
- import { r as contentMapperFiles } from "./content-mapper-DM2jgKpn.js";
5
+ import { l as TYPEGEN_VERSION } from "./cache-tvTW5J9K.js";
6
+ import { a as findConfig, s as loadConfig } from "./config-BH0goim0.js";
7
+ import { r as contentMapperFiles } from "./content-mapper-C0LJDmVL.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-Elh2S4Z8.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-C8mh2xlK.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-Lr7uTZXQ.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-Cn7OLHJm.js";
11
11
  import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
12
- import { s as enablePgDelta, t as syncModules } from "./sync-D-YWMzZI.js";
12
+ import { s as enablePgDelta, t as syncModules } from "./sync-BAmWXRDR.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-DZonA0x5.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-DM_FKwqk.js";
2
+ import "./source-EHhEoKBD.js";
3
+ import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-9O58FYPm.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-BWEEXmtz.js";
2
- import { a as envelope, i as run } from "./run-D4XWCMl2.js";
3
- import { t as VERSION } from "./version-BatoE1Gj.js";
2
+ import { a as envelope, i as run } from "./run-6F72J0AQ.js";
3
+ import { t as VERSION } from "./version-BkEOr4WS.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-BnZCeU7E.js";
4
- import { c as metaPaths, n as render } from "./render-GFy-2cii.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-DNpUCD8d.js";
3
+ import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-rTRe56PH.js";
4
+ import { c as metaPaths, n as render } from "./render-PJdiRcqF.js";
5
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-D7-FuY6e.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-BJSqMi04.js";
2
- import { c as splitStatements } from "./shared-DM_FKwqk.js";
1
+ import { f as INTEGRATIONS } from "./config-BH0goim0.js";
2
+ import { c as splitStatements } from "./shared-9O58FYPm.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-VnkvENWw.js";
5
+ import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-BijeFLWv.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,7 +1,7 @@
1
- import { i as stampAfter } from "./migrations-D-0Sd9tO.js";
1
+ import { i as stampAfter } from "./migrations-CUIEmdnS.js";
2
2
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
3
3
  import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
4
- import { a as sqlPlan, n as migrationsDir } from "./sql-layout-VnkvENWw.js";
4
+ import { a as sqlPlan, n as migrationsDir } from "./sql-layout-BijeFLWv.js";
5
5
  import { resolve } from "node:path";
6
6
  import { readFile, readdir } from "node:fs/promises";
7
7
  import { moduleSchemaExtensions } from "better-supabase/sql";
@@ -0,0 +1 @@
1
+ export { t as powersyncStreamsCommand } from "./powersync-DAM5JAmz.js";
@@ -1,7 +1,7 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
- import { c as layoutFor, i as stampAfter } from "./migrations-D-0Sd9tO.js";
2
+ import { c as layoutFor, i as stampAfter } from "./migrations-CUIEmdnS.js";
3
3
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
4
- import { n as migrationsDir } from "./sql-layout-VnkvENWw.js";
4
+ import { n as migrationsDir } from "./sql-layout-BijeFLWv.js";
5
5
  import { existsSync } from "node:fs";
6
6
  import { join, resolve } from "node:path";
7
7
  import { readFile, readdir } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { s as layout } from "./migrations-D-0Sd9tO.js";
3
- import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
2
+ import { s as layout } from "./migrations-CUIEmdnS.js";
3
+ import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-bWK0xO2_.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { resolve } from "node:path";
6
6
  import { SQL_MODULES, contractSignature, customContracts, moduleBody, moduleFilePaths } from "better-supabase/sql";
@@ -2,15 +2,15 @@ import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.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 { c as layoutFor } from "./migrations-D-0Sd9tO.js";
5
+ import { c as layoutFor } from "./migrations-CUIEmdnS.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-VnkvENWw.js";
8
- import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-Elh2S4Z8.js";
7
+ import { a as sqlPlan } from "./sql-layout-BijeFLWv.js";
8
+ import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-Lr7uTZXQ.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-D-YWMzZI.js";
11
+ import { n as guardedRemoval } from "./sync-BAmWXRDR.js";
12
12
  import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
13
- import { t as blockNames } from "./blocks-CSOK4qqe.js";
13
+ import { t as blockNames } from "./blocks-CsPua74J.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,15 +1,15 @@
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-DPRc-BzP.js";
3
+ import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-tvTW5J9K.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-BnZCeU7E.js";
5
+ import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-rTRe56PH.js";
6
6
  import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
7
- import { a as toCatalog } from "./source-DZonA0x5.js";
7
+ import { a as toCatalog } from "./source-EHhEoKBD.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";
11
11
  import { PRESET_CATALOG } from "better-supabase/preset";
12
- import { BLOCK_OPTION_SCHEMAS, DEFAULT_ROLES, appTableEventTypes, instanceFunctions, modulePermissionKeys, resolveBlock, resolveBlocks, resolveProviderSql } from "better-supabase/sql";
12
+ import { BLOCK_OPTION_SCHEMAS, DEFAULT_ROLES, SQL_MODULES, appTableEventTypes, instanceFunctions, modulePermissionKeys, resolveBlock, resolveBlocks, resolveProviderSql } from "better-supabase/sql";
13
13
  import { toCamel } from "better-supabase";
14
14
  //#region src/cli/gen/model-types.ts
15
15
  const applyCasing = (name, casing) => casing === "camel" ? toCamel(name) : name;
@@ -1486,6 +1486,27 @@ function blockConfigPath(config) {
1486
1486
  function hasSchema(module) {
1487
1487
  return module in BLOCK_OPTION_SCHEMAS;
1488
1488
  }
1489
+ const DEFAULT_TENANT_COLUMN = "tenant_id";
1490
+ function tenantColumnOf(config, modules) {
1491
+ const names = /* @__PURE__ */ new Set();
1492
+ const others = /* @__PURE__ */ new Set();
1493
+ for (const module of modules) {
1494
+ const resolved = resolveBlock(config.blocks[module]);
1495
+ for (const [table, spec] of Object.entries(SQL_MODULES[module]?.names?.tables ?? {})) {
1496
+ if (resolved.tables[table] === null) continue;
1497
+ for (const [logical, name] of Object.entries(spec.columns)) {
1498
+ if (name !== DEFAULT_TENANT_COLUMN) {
1499
+ others.add(name);
1500
+ continue;
1501
+ }
1502
+ const mapped = resolved.columns[table]?.[logical];
1503
+ if (mapped !== null) names.add(mapped ?? config.sql.tenantColumn ?? name);
1504
+ }
1505
+ }
1506
+ }
1507
+ const [name] = names;
1508
+ return names.size === 1 && name !== void 0 && name !== DEFAULT_TENANT_COLUMN && !others.has(name) ? name : void 0;
1509
+ }
1489
1510
  /**
1490
1511
  * How the tenant rename, the modules' renamed entities and their
1491
1512
  * `blocks.<module>.functions` rename the block's functions and payload keys, or
@@ -1497,9 +1518,11 @@ function namingOf(config, modules, instanceFunctionNames = {}) {
1497
1518
  const entities = modules.flatMap((module) => blockEntityRenames(module, config.blocks));
1498
1519
  const tenant = tenantNameOf(config.blocks);
1499
1520
  const renames = Object.keys(functions).length > 0;
1500
- if (tenant === void 0 && !renames && entities.length === 0) return;
1521
+ const tenantColumn = tenantColumnOf(config, modules);
1522
+ if (tenant === void 0 && !renames && entities.length === 0 && tenantColumn === void 0) return;
1501
1523
  return {
1502
1524
  ...tenant === void 0 ? {} : { tenant },
1525
+ ...tenantColumn === void 0 ? {} : { tenantColumn },
1503
1526
  ...renames ? { functions } : {},
1504
1527
  ...entities.length === 0 ? {} : { entities }
1505
1528
  };
@@ -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-BWEEXmtz.js";
2
2
  import { n as highlight, r as painter } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-BatoE1Gj.js";
3
+ import { t as VERSION } from "./version-BkEOr4WS.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-B079x40m.js";
@@ -16,36 +16,36 @@ 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-B_CsBYPR.js").then((m) => m.initCommand)],
20
- ["add", () => import("./add-BKybJ2e1.js").then((m) => m.addCommand)],
21
- ["remove", () => import("./remove-DeOze3-k.js").then((m) => m.removeCommand)],
22
- ["upgrade", () => import("./upgrade-DKZ3QOEJ.js").then((m) => m.upgradeCommand)],
23
- ["gen", () => import("./gen-DNwJl35g.js").then((m) => m.genCommand)],
24
- ["doctor", () => import("./doctor-CU08NDWh.js").then((m) => m.doctorCommand)],
25
- ["db query", () => import("./db-DYU5hUcd.js").then((m) => m.dbQueryCommand)],
26
- ["db diff", () => import("./db-DYU5hUcd.js").then((m) => m.dbDiffCommand)],
27
- ["db seed", () => import("./seed-EPO6AvLG.js").then((m) => m.seedCommand)],
28
- ["db backfill", () => import("./backfill-kq6M-ksU.js").then((m) => m.dbBackfillCommand)],
19
+ ["init", () => import("./init-DGz5Hk9X.js").then((m) => m.initCommand)],
20
+ ["add", () => import("./add-Bcw12jts.js").then((m) => m.addCommand)],
21
+ ["remove", () => import("./remove-DAVVPbWw.js").then((m) => m.removeCommand)],
22
+ ["upgrade", () => import("./upgrade-oaUd22Il.js").then((m) => m.upgradeCommand)],
23
+ ["gen", () => import("./gen--vu_c2RF.js").then((m) => m.genCommand)],
24
+ ["doctor", () => import("./doctor-q701Qif_.js").then((m) => m.doctorCommand)],
25
+ ["db query", () => import("./db-DCeyHS1y.js").then((m) => m.dbQueryCommand)],
26
+ ["db diff", () => import("./db-DCeyHS1y.js").then((m) => m.dbDiffCommand)],
27
+ ["db seed", () => import("./seed-CXJvTU5D.js").then((m) => m.seedCommand)],
28
+ ["db backfill", () => import("./backfill-Cl1zEel7.js").then((m) => m.dbBackfillCommand)],
29
29
  ["dev env", () => import("./env-xhwXk5Ri.js").then((m) => m.envCommand)],
30
30
  ["dev run", () => import("./run-DmOTMa44.js").then((m) => m.runCommand)],
31
31
  ["dev keys", () => import("./keys-CbaL0lnw.js").then((m) => m.keysCommand)],
32
32
  ["dev stack ls", () => import("./stack-DgASZP0K.js").then((m) => m.stackLsCommand)],
33
33
  ["dev stack prune", () => import("./stack-DgASZP0K.js").then((m) => m.stackPruneCommand)],
34
- ["blocks list", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksListCommand)],
35
- ["blocks view", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksViewCommand)],
36
- ["blocks search", () => import("./blocks-vl6ydiEz.js").then((m) => m.blocksSearchCommand)],
37
- ["powersync streams", () => import("./powersync-BEWwRqNy.js").then((m) => m.powersyncStreamsCommand)],
38
- ["spec emit", () => import("./spec-U6hCGGu_.js").then((m) => m.specEmitCommand)],
39
- ["spec validate", () => import("./spec-U6hCGGu_.js").then((m) => m.specValidateCommand)],
40
- ["mcp", () => import("./mcp-BfC4giv7.js").then((m) => m.mcpCommand)],
34
+ ["blocks list", () => import("./blocks-f0obMCxm.js").then((m) => m.blocksListCommand)],
35
+ ["blocks view", () => import("./blocks-f0obMCxm.js").then((m) => m.blocksViewCommand)],
36
+ ["blocks search", () => import("./blocks-f0obMCxm.js").then((m) => m.blocksSearchCommand)],
37
+ ["powersync streams", () => import("./powersync-CG3Bp6FD.js").then((m) => m.powersyncStreamsCommand)],
38
+ ["spec emit", () => import("./spec-DqSbbTzD.js").then((m) => m.specEmitCommand)],
39
+ ["spec validate", () => import("./spec-DqSbbTzD.js").then((m) => m.specValidateCommand)],
40
+ ["mcp", () => import("./mcp-DY_YK_WV.js").then((m) => m.mcpCommand)],
41
41
  ["skills list", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsListCommand)],
42
42
  ["skills install", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsInstallCommand)],
43
- ["codemod 0.4", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.4"))],
44
- ["codemod 0.5", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.5"))],
45
- ["codemod 0.6", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.6"))],
46
- ["codemod 0.9", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.9"))],
47
- ["codemod 0.11", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.11"))],
48
- ["codemod 0.15", () => import("./codemod-CoaS9hJu.js").then((m) => m.codemodCommand("0.15"))],
43
+ ["codemod 0.4", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.4"))],
44
+ ["codemod 0.5", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.5"))],
45
+ ["codemod 0.6", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.6"))],
46
+ ["codemod 0.9", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.9"))],
47
+ ["codemod 0.11", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.11"))],
48
+ ["codemod 0.15", () => import("./codemod-CVzRWS3j.js").then((m) => m.codemodCommand("0.15"))],
49
49
  ["completion", () => import("./completion-BfnKI4QZ.js").then((m) => m.completionCommand)],
50
50
  ["config", () => import("./config-WKDixoGK.js").then((m) => m.configCommand)]
51
51
  ];
@@ -595,7 +595,7 @@ function cliFromTree(init, extra = {}) {
595
595
  try {
596
596
  const [loaded, { defaultConfig, discoverConfig, loadConfig }, { configEnvironment, isCi, parseEnv }] = await Promise.all([
597
597
  node.load(),
598
- import("./config-BlfVh0IP.js"),
598
+ import("./config-CTRzkX0H.js"),
599
599
  import("./env-C-Bl6Awn.js")
600
600
  ]);
601
601
  command = loaded;
@@ -1,15 +1,15 @@
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-DPRc-BzP.js";
3
+ import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-tvTW5J9K.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-BnZCeU7E.js";
6
- import { n as render } from "./render-GFy-2cii.js";
7
- import { _ as unsafeKey, d as accessProviderMode, f as accessRequirements, g as providerLabel, h as moduleKeyProblems, m as entitlementsMode, p as entitlementRequirements, u as compiledReadSets } from "./migrations-D-0Sd9tO.js";
8
- import { s as schemaStampPath } from "./content-mapper-DM2jgKpn.js";
5
+ import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-rTRe56PH.js";
6
+ import { n as render } from "./render-PJdiRcqF.js";
7
+ import { _ as unsafeKey, d as accessProviderMode, f as accessRequirements, g as providerLabel, h as moduleKeyProblems, m as entitlementsMode, p as entitlementRequirements, u as compiledReadSets } from "./migrations-CUIEmdnS.js";
8
+ import { s as schemaStampPath } from "./content-mapper-C0LJDmVL.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-VnkvENWw.js";
11
- import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-DM_FKwqk.js";
12
- import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-Cl8hBBqw.js";
10
+ import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-BijeFLWv.js";
11
+ import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-9O58FYPm.js";
12
+ import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-bWK0xO2_.js";
13
13
  import { existsSync } from "node:fs";
14
14
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
15
15
  import { readFile } from "node:fs/promises";
@@ -0,0 +1 @@
1
+ export { n as seedCommand } from "./seed-CdSxunFT.js";