better-supabase 0.23.0 → 0.28.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 (364) hide show
  1. package/dist/{access-sql-bjWFUWlk.js → access-sql-CTDNuxRv.js} +177 -12
  2. package/dist/{ai-schedules-7uQNMXve.d.ts → ai-schedules-yGZH-vQb.d.ts} +1 -1
  3. package/dist/ai-sdk/agents/index.d.ts +2 -2
  4. package/dist/ai-sdk/batches/index.d.ts +1 -1
  5. package/dist/ai-sdk/index.d.ts +1 -1
  6. package/dist/ai-sdk/mcp/index.d.ts +3 -3
  7. package/dist/{api-CHObZL7m.d.ts → api-B1OkIWdx.d.ts} +3 -3
  8. package/dist/{api-keys-D5k63K6y.d.ts → api-keys-ClhKBDcc.d.ts} +1 -1
  9. package/dist/{app-tables-CJO6pWwy.d.ts → app-tables-62GqZIhd.d.ts} +1 -1
  10. package/dist/{approvals-Dh9dUXrN.d.ts → approvals-C5fmPLsH.d.ts} +1 -1
  11. package/dist/astro/index.d.ts +5 -5
  12. package/dist/{authorization-Dtwpjeuz.d.ts → authorization-BCG1v0iC.d.ts} +73 -15
  13. package/dist/{authorization-hooks-D_pwXlBs.d.ts → authorization-hooks-DtzreCAq.d.ts} +1 -1
  14. package/dist/{automations-FCnWy387.js → automations-8L3NEuoq.js} +4 -1
  15. package/dist/{availability-vguUvEK2.d.ts → availability-BdeKCHpl.d.ts} +10 -0
  16. package/dist/better-result/index.d.ts +2 -2
  17. package/dist/{bind-DaoTunvE.d.ts → bind-C54jD0r3.d.ts} +4 -4
  18. package/dist/{block-env-DUyo2I5O.d.ts → block-env-CM-LFfj4.d.ts} +4 -4
  19. package/dist/blocks/access-requests/index.d.ts +2 -2
  20. package/dist/blocks/activities/index.d.ts +3 -3
  21. package/dist/blocks/agents/index.d.ts +2 -2
  22. package/dist/blocks/ai-cache/index.d.ts +1 -1
  23. package/dist/blocks/ai-chat/index.d.ts +5 -5
  24. package/dist/blocks/ai-files/index.d.ts +1 -1
  25. package/dist/blocks/ai-keys/index.d.ts +3 -3
  26. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  27. package/dist/blocks/announcements/index.d.ts +5 -5
  28. package/dist/blocks/api-keys/index.d.ts +5 -5
  29. package/dist/blocks/approvals/index.d.ts +3 -3
  30. package/dist/blocks/assets/index.d.ts +2 -2
  31. package/dist/blocks/assignment/index.d.ts +3 -3
  32. package/dist/blocks/attachments/index.d.ts +3 -3
  33. package/dist/blocks/audit/index.d.ts +7 -7
  34. package/dist/blocks/automations/index.d.ts +5 -5
  35. package/dist/blocks/billable-time/index.d.ts +2 -2
  36. package/dist/blocks/billing/index.d.ts +5 -5
  37. package/dist/blocks/bookings/index.d.ts +6 -6
  38. package/dist/blocks/bulk/index.d.ts +2 -2
  39. package/dist/blocks/calendar/index.d.ts +46 -13
  40. package/dist/blocks/calendar/index.js +130 -30
  41. package/dist/blocks/catalog/index.d.ts +2 -2
  42. package/dist/blocks/channels/index.d.ts +3 -3
  43. package/dist/blocks/collections/index.d.ts +3 -3
  44. package/dist/blocks/comments/index.d.ts +5 -5
  45. package/dist/blocks/compliance/index.d.ts +2 -2
  46. package/dist/blocks/connectors/index.d.ts +3 -3
  47. package/dist/blocks/contacts/index.d.ts +3 -3
  48. package/dist/blocks/content/index.d.ts +2 -2
  49. package/dist/blocks/contracts/index.d.ts +2 -2
  50. package/dist/blocks/courses/index.d.ts +2 -2
  51. package/dist/blocks/created-by/index.d.ts +1 -1
  52. package/dist/blocks/custom-fields/index.d.ts +2 -2
  53. package/dist/blocks/custom-fields/index.js +1 -1
  54. package/dist/blocks/data-lifecycle/index.d.ts +4 -4
  55. package/dist/blocks/deals/index.d.ts +3 -3
  56. package/dist/blocks/dispatch/index.d.ts +2 -2
  57. package/dist/blocks/documents/index.d.ts +2 -2
  58. package/dist/blocks/domains/index.d.ts +2 -2
  59. package/dist/blocks/donations/index.d.ts +2 -2
  60. package/dist/blocks/drive/index.d.ts +4 -4
  61. package/dist/blocks/employees/index.d.ts +21 -6
  62. package/dist/blocks/employees/index.js +37 -2
  63. package/dist/blocks/enrichment/index.d.ts +3 -3
  64. package/dist/blocks/enrollments/index.d.ts +2 -2
  65. package/dist/blocks/entitlements/index.d.ts +3 -3
  66. package/dist/blocks/expenses/index.d.ts +2 -2
  67. package/dist/blocks/field-history/index.d.ts +1 -1
  68. package/dist/blocks/flags/index.d.ts +2 -2
  69. package/dist/blocks/forecasts/index.d.ts +3 -3
  70. package/dist/blocks/forms/index.d.ts +3 -3
  71. package/dist/blocks/goals/index.d.ts +1 -1
  72. package/dist/blocks/guests/index.d.ts +2 -2
  73. package/dist/blocks/hiring/index.d.ts +13 -6
  74. package/dist/blocks/hiring/index.js +15 -4
  75. package/dist/blocks/identities/index.d.ts +2 -2
  76. package/dist/blocks/imports/index.d.ts +2 -2
  77. package/dist/blocks/inbox/index.d.ts +6 -6
  78. package/dist/blocks/incidents/index.d.ts +2 -2
  79. package/dist/blocks/index.d.ts +4 -4
  80. package/dist/blocks/inventory/index.d.ts +2 -2
  81. package/dist/blocks/invoices/index.d.ts +3 -3
  82. package/dist/blocks/knowledge/index.d.ts +1 -1
  83. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  84. package/dist/blocks/leases/index.d.ts +2 -2
  85. package/dist/blocks/leave/index.d.ts +2 -2
  86. package/dist/blocks/ledger/index.d.ts +2 -2
  87. package/dist/blocks/mail-sync/index.d.ts +3 -3
  88. package/dist/blocks/memberships/index.d.ts +1 -1
  89. package/dist/blocks/memory/index.d.ts +1 -1
  90. package/dist/blocks/messaging/index.d.ts +7 -7
  91. package/dist/blocks/metrics/index.d.ts +2 -2
  92. package/dist/blocks/mfa/index.d.ts +2 -2
  93. package/dist/blocks/moderation/index.d.ts +2 -2
  94. package/dist/blocks/notifications/index.d.ts +7 -7
  95. package/dist/blocks/numbering/index.d.ts +2 -2
  96. package/dist/blocks/oauth-server/index.d.ts +2 -2
  97. package/dist/blocks/onboarding/index.d.ts +2 -2
  98. package/dist/blocks/orders/index.d.ts +3 -3
  99. package/dist/blocks/organizations/index.d.ts +4 -4
  100. package/dist/blocks/outbox/index.d.ts +2 -2
  101. package/dist/blocks/passes/index.d.ts +3 -3
  102. package/dist/blocks/permissions/index.d.ts +3 -3
  103. package/dist/blocks/pipelines/index.d.ts +3 -3
  104. package/dist/blocks/posts/index.d.ts +2 -2
  105. package/dist/blocks/profiles/index.d.ts +1 -1
  106. package/dist/blocks/promotions/index.d.ts +2 -2
  107. package/dist/blocks/push/index.d.ts +3 -3
  108. package/dist/blocks/queue/index.d.ts +1 -1
  109. package/dist/blocks/quotes/index.d.ts +3 -3
  110. package/dist/blocks/rank/index.d.ts +1 -1
  111. package/dist/blocks/reactions/index.d.ts +5 -5
  112. package/dist/blocks/relations/index.d.ts +2 -2
  113. package/dist/blocks/reminders/index.d.ts +4 -4
  114. package/dist/blocks/reviews/index.d.ts +2 -2
  115. package/dist/blocks/saved-views/index.d.ts +4 -4
  116. package/dist/blocks/scores/index.d.ts +2 -2
  117. package/dist/blocks/search/index.d.ts +4 -4
  118. package/dist/blocks/security-events/index.d.ts +3 -3
  119. package/dist/blocks/segments/index.d.ts +3 -3
  120. package/dist/blocks/sequences/index.d.ts +2 -2
  121. package/dist/blocks/service-accounts/index.d.ts +2 -2
  122. package/dist/blocks/sessions/index.d.ts +2 -2
  123. package/dist/blocks/settings/index.d.ts +3 -3
  124. package/dist/blocks/share-links/index.d.ts +2 -2
  125. package/dist/blocks/shipments/index.d.ts +2 -2
  126. package/dist/blocks/signatures/index.d.ts +2 -2
  127. package/dist/blocks/signing-keys/index.d.ts +2 -2
  128. package/dist/blocks/sla/index.d.ts +3 -3
  129. package/dist/blocks/sso/index.d.ts +3 -3
  130. package/dist/blocks/state-machine/index.d.ts +2 -2
  131. package/dist/blocks/subjects/index.d.ts +2 -2
  132. package/dist/blocks/tags/index.d.ts +3 -3
  133. package/dist/blocks/tasks/index.d.ts +6 -6
  134. package/dist/blocks/tasks/index.js +1 -1
  135. package/dist/blocks/teams/index.d.ts +2 -2
  136. package/dist/blocks/templates/index.d.ts +4 -4
  137. package/dist/blocks/time-tracking/index.d.ts +10 -5
  138. package/dist/blocks/time-tracking/index.js +16 -9
  139. package/dist/blocks/timeline/index.d.ts +4 -4
  140. package/dist/blocks/trash/index.d.ts +2 -2
  141. package/dist/blocks/undo/index.d.ts +2 -2
  142. package/dist/blocks/updated-at/index.d.ts +1 -1
  143. package/dist/blocks/usage/index.d.ts +2 -2
  144. package/dist/blocks/vercel-marketplace/index.d.ts +2 -2
  145. package/dist/blocks/versions/index.d.ts +2 -2
  146. package/dist/blocks/waitlist/index.d.ts +2 -2
  147. package/dist/blocks/webhooks/index.d.ts +6 -6
  148. package/dist/blocks/workflow-editor/index.d.ts +7 -7
  149. package/dist/blocks/workflows/index.d.ts +5 -5
  150. package/dist/{bookings-BpCNphYp.d.ts → bookings-CVw5-Q0Z.d.ts} +1 -1
  151. package/dist/chat-sdk/index.d.ts +2 -2
  152. package/dist/cli/{add-DVHniZOO.js → add-BKcE_g9D.js} +2 -2
  153. package/dist/cli/{add-C7lKQNBL.js → add-DUyg9qna.js} +40 -15
  154. package/dist/cli/add-pDOlqWUa.js +1 -0
  155. package/dist/cli/{backfill-Lrn-Qp5X.js → backfill-r9RELEEh.js} +4 -4
  156. package/dist/cli/bin.js +1 -1
  157. package/dist/cli/{blocks-BKNd886C.js → blocks-DTOFdrxL.js} +1 -1
  158. package/dist/cli/{blocks-2Yw9t-_U.js → blocks-k1OG8XDs.js} +2 -2
  159. package/dist/cli/{cache-ByhPVMo-.js → cache-Czfw7Iow.js} +1 -1
  160. package/dist/cli/{codemod-C0eXpzFu.js → codemod-ClmbiLuL.js} +3 -3
  161. package/dist/cli/{command-BWEEXmtz.js → command-CVzTJSLp.js} +31 -0
  162. package/dist/cli/{completion-8EDK21xj.js → completion-CNCqE-Gb.js} +1 -1
  163. package/dist/cli/{completion-BfnKI4QZ.js → completion-Dpk6vh0p.js} +2 -2
  164. package/dist/cli/{completion-Bt7LMypX.js → completion-DxEXxFpz.js} +2 -2
  165. package/dist/cli/{config-CeaQMrvS.js → config-D2YUlzrl.js} +1 -1
  166. package/dist/cli/{config-WKDixoGK.js → config-EjNj3HfT.js} +1 -1
  167. package/dist/cli/{config-BVfeG3A5.js → config-KvV-sLZL.js} +290 -10
  168. package/dist/cli/{content-mapper-qH-_YQ8H.js → content-mapper-ez_mT0d4.js} +2 -2
  169. package/dist/cli/{db-DwjyUbAh.js → db-uYN6O5Eg.js} +38 -14
  170. package/dist/cli/{doctor-BnxkqXGA.js → doctor-BD9oo4MG.js} +31 -28
  171. package/dist/cli/{env-DMgjB_4y.js → env-BK0xKMeU.js} +1 -2
  172. package/dist/cli/{env-C-Bl6Awn.js → env-Bat6ogep.js} +1 -1
  173. package/dist/cli/env-Cy2lWBRC.js +1 -0
  174. package/dist/cli/{env-BCgVZkcb.js → env-DEAtgGoj.js} +2 -2
  175. package/dist/cli/{exec--Q1ZEWUW.js → exec-Ca5s-ygi.js} +1 -1
  176. package/dist/cli/{gen-aERmP3Sw.js → gen-8Ya8n2sA.js} +16 -16
  177. package/dist/cli/in-stack-diff-Cp-tVPj2.js +186 -0
  178. package/dist/cli/index.d.ts +1 -2
  179. package/dist/cli/index.js +8 -8
  180. package/dist/cli/{init-DWUqVSVW.js → init-DgL3sDfQ.js} +118 -11
  181. package/dist/cli/{keys-CbaL0lnw.js → keys-CsanNk-2.js} +1 -1
  182. package/dist/cli/{live-KcdTBUij.js → live-CMMEct_F.js} +2 -2
  183. package/dist/cli/{mcp-Dsjjo-LT.js → mcp-DEHtzAkq.js} +4 -4
  184. package/dist/cli/{metadata-DWQSIZ59.js → metadata-BZh-cOzC.js} +3 -3
  185. package/dist/cli/migrate-sVs1QYTM.js +306 -0
  186. package/dist/cli/{migration-safety-Cy7xlU4G.js → migration-safety-ClnYNMdq.js} +2 -2
  187. package/dist/cli/migrations-DWh38tO9.js +117 -0
  188. package/dist/cli/{module-migration-C6NLY9iZ.js → module-migration-CXfRJIV4.js} +2 -2
  189. package/dist/cli/{moved-DVwgE8lV.js → moved-Cnb4fp49.js} +1 -1
  190. package/dist/cli/{parse-B079x40m.js → parse-BWM6IGhF.js} +1 -1
  191. package/dist/cli/powersync-DURhWDVc.js +1 -0
  192. package/dist/cli/{powersync-CE_hQdgc.js → powersync-Dnyr-Wy5.js} +4 -3
  193. package/dist/cli/{print-Cy_ram9N.js → print-DJrSr56b.js} +2 -2
  194. package/dist/cli/{migrations-CUjNXokR.js → providers-CpaISitn.js} +4 -116
  195. package/dist/cli/{remove-DmwjzqaW.js → remove-ChaieK3t.js} +6 -6
  196. package/dist/cli/{render-CF09FCra.js → render-DUNJ4Pss.js} +8 -5
  197. package/dist/cli/{run-BYpZ8FjF.js → run-ChCQPYOh.js} +41 -39
  198. package/dist/cli/{run-lh-chAJW.js → run-Cl9COGuy.js} +10 -10
  199. package/dist/cli/{run-DmOTMa44.js → run-CxFDjL1Q.js} +4 -4
  200. package/dist/cli/seed-BJ7c-ktX.js +1 -0
  201. package/dist/cli/{seed-BMynpMPy.js → seed-BzVLTdRl.js} +3 -3
  202. package/dist/cli/{shared-D05A6t1e.js → shared-5uqc1GBj.js} +1 -1
  203. package/dist/cli/{skills-FXAVPLzp.js → skills-0gz_qjVb.js} +1 -1
  204. package/dist/cli/{snapshot-BITNbA5V.js → snapshot-DdAP7LWO.js} +3 -3
  205. package/dist/cli/{source-GGJHuzpH.js → source-2irbWSck.js} +1 -1
  206. package/dist/cli/{source-args-CDmmFmFG.js → source-args-DAcQt-Mh.js} +1 -1
  207. package/dist/cli/{spec-BGcRdlhN.js → spec-B7n4Rthp.js} +3 -3
  208. package/dist/cli/{spec-BjxXWaNQ.js → spec-_MS0ym5r.js} +1 -1
  209. package/dist/cli/{sql-layout-BoD5ynN9.js → sql-layout-DYKkQw1k.js} +21 -7
  210. package/dist/cli/{stack-DgASZP0K.js → stack-CteM33gC.js} +3 -3
  211. package/dist/cli/{stack-status-B_Ipd_-z.js → stack-status-BkkYRlXG.js} +1 -1
  212. package/dist/cli/{stacks-BYlQ96WS.js → stacks-CiDBH1dB.js} +1 -1
  213. package/dist/cli/{sync-_QlsTmqu.js → sync-DnSOrQuA.js} +4 -3
  214. package/dist/cli/table-DeH8X0qz.js +89 -0
  215. package/dist/cli/{upgrade-Cwhb1M7O.js → upgrade-CWdrC-K3.js} +5 -4
  216. package/dist/cli/{upgrade-n9ar1kc4.js → upgrade-cMy5fKkg.js} +3 -3
  217. package/dist/cli/{version-RSpJIWDd.js → version-C5RAWmrD.js} +1 -1
  218. package/dist/client/index.d.ts +5 -5
  219. package/dist/client/native/index.d.ts +4 -4
  220. package/dist/{cloud-event-CzZTJkXv.d.ts → cloud-event-DcJwder2.d.ts} +1 -1
  221. package/dist/{composite-ChzHhSB0.d.ts → composite-CWJvZgni.d.ts} +6 -6
  222. package/dist/config/index.d.ts +3 -3
  223. package/dist/config/index.js +4 -4
  224. package/dist/{config-RwpFcPq8.js → config-CTeR7XHK.js} +6 -5
  225. package/dist/{config-vHLJ8SKf.js → config-CvJHIy5q.js} +4 -3
  226. package/dist/{connectors-Fud4amxp.d.ts → connectors-CHGiffYH.d.ts} +1 -1
  227. package/dist/{context-CMf4OKpN.d.ts → context-BFEX0b7H.d.ts} +109 -4
  228. package/dist/{controller-BGto_kYM.d.ts → controller-Cl6HmMBk.d.ts} +1 -1
  229. package/dist/{conversion-DBgMck5U.d.ts → conversion-DlfStnln.d.ts} +1 -1
  230. package/dist/create/index.d.ts +62 -3
  231. package/dist/create/index.js +67 -4
  232. package/dist/create/lite/index.d.ts +140 -3
  233. package/dist/create/lite/index.js +399 -47
  234. package/dist/credentials/index.d.ts +3 -3
  235. package/dist/{define-Lf6rI2QN.d.ts → define-BLP6XtoL.d.ts} +1 -1
  236. package/dist/{define-block-DCAiOrNX.d.ts → define-block-DibVN37N.d.ts} +4 -4
  237. package/dist/edge/index.d.ts +8 -8
  238. package/dist/elysia/index.d.ts +1 -1
  239. package/dist/{ended-gUsMZVNg.d.ts → ended-B8RyuUXF.d.ts} +1 -1
  240. package/dist/{entitlements-CIhVQ-0u.d.ts → entitlements-Y-n4RGAd.d.ts} +2 -2
  241. package/dist/eve/index.d.ts +2 -2
  242. package/dist/{event-calendar-DCufbihU.d.ts → event-calendar-DVLs2wUO.d.ts} +1 -1
  243. package/dist/events/index.d.ts +3 -3
  244. package/dist/{events-vcqenSYU.d.ts → events-Cc9DDQWH.d.ts} +2 -0
  245. package/dist/{executor-DNK401lZ.d.ts → executor-C-Ox9eKq.d.ts} +1 -1
  246. package/dist/{executor-aFV7nEBs.d.ts → executor-DNPm13a9.d.ts} +2 -2
  247. package/dist/expo/index.d.ts +3 -3
  248. package/dist/{field-errors-BDhPaO0a.d.ts → field-errors-Btn3czyz.d.ts} +7 -7
  249. package/dist/{framework-DKA3fTHl.d.ts → framework-GlxXiotm.d.ts} +6 -6
  250. package/dist/h3/index.d.ts +1 -1
  251. package/dist/h3/v1/index.d.ts +1 -1
  252. package/dist/hono/index.d.ts +8 -8
  253. package/dist/{index-CFWlHuVY.d.ts → index-8wOL81rB.d.ts} +1 -1
  254. package/dist/{index-ClvuSZEz.d.ts → index-BfYDY6eh.d.ts} +3 -3
  255. package/dist/{index-ujNqgZ6B.d.ts → index-C0_cweyT.d.ts} +11 -11
  256. package/dist/{index--OhYKouV.d.ts → index-CAY7rIQs.d.ts} +3 -3
  257. package/dist/{index-CG9rA8H8.d.ts → index-C_qlBJ3k.d.ts} +2 -2
  258. package/dist/{index-iRkFvJ7J.d.ts → index-D1ckLbUM.d.ts} +1 -1
  259. package/dist/{index-lV43eM34.d.ts → index-DPMVWm_Z.d.ts} +4 -4
  260. package/dist/{index-4MStWaeF.d.ts → index-k-SyCzcQ.d.ts} +105 -120
  261. package/dist/index.d.ts +2 -2
  262. package/dist/{instances-BPJSESPx.js → instances-C7qUTjhJ.js} +85 -6
  263. package/dist/{kit-CVgQCIBO.d.ts → kit-Dxx3MT8m.d.ts} +3 -3
  264. package/dist/list/index.d.ts +1 -1
  265. package/dist/{list-query-XYfUZb0j.d.ts → list-query-XHoYDlRN.d.ts} +1 -1
  266. package/dist/mapper/bin.js +7 -7
  267. package/dist/mcp/index.d.ts +5 -5
  268. package/dist/mcp/sdk/index.d.ts +5 -5
  269. package/dist/nestjs/index.d.ts +2 -2
  270. package/dist/next/client/index.d.ts +1 -1
  271. package/dist/next/index.d.ts +21 -21
  272. package/dist/node/index.d.ts +2 -2
  273. package/dist/{operations-qSBBV5vl.d.ts → operations-DE7SOBw-.d.ts} +1 -1
  274. package/dist/{options-D4ADKTKo.js → options-B5E2MGIz.js} +6 -1
  275. package/dist/options-C4LuqmdG.js +15 -0
  276. package/dist/{options-D2s7fT1s.js → options-COo7_3MX.js} +2 -1
  277. package/dist/{options-D32-YxnO.js → options-DhoLMknl.js} +3 -1
  278. package/dist/{options-BPp2zzsz.js → options-eTepQ1rZ.js} +2 -1
  279. package/dist/orpc/index.d.ts +7 -7
  280. package/dist/otel/index.d.ts +1 -1
  281. package/dist/otel/index.js +4 -4
  282. package/dist/{outbox-HxjZTfF6.d.ts → outbox-DxZgoKwp.d.ts} +2 -2
  283. package/dist/{pool-CrtT4dg-.d.ts → pool-wjbAMqc1.d.ts} +1 -1
  284. package/dist/{ports-DbHiNSAa.d.ts → ports-DP0bthUk.d.ts} +1 -1
  285. package/dist/postgres/index.d.ts +1 -1
  286. package/dist/powersync/index.d.ts +3 -3
  287. package/dist/preset/index.d.ts +3 -3
  288. package/dist/preset/index.js +3 -3
  289. package/dist/{preset-B1xXOJ0T.js → preset-DwuWNBip.js} +2 -2
  290. package/dist/{project-BM6QMtzV.js → project-Bo1vZqVs.js} +5 -5
  291. package/dist/{provider-CqwEOLCA.d.ts → provider-ClrIplXa.d.ts} +1 -1
  292. package/dist/{push-token-BwF1fyjA.d.ts → push-token-v3xCcVU7.d.ts} +1 -1
  293. package/dist/query/index.d.ts +1 -1
  294. package/dist/react/index.d.ts +7 -7
  295. package/dist/react/native/index.d.ts +1 -1
  296. package/dist/react/server.d.ts +8 -8
  297. package/dist/react/session.d.ts +2 -2
  298. package/dist/react-router/index.d.ts +5 -5
  299. package/dist/realtime/index.d.ts +4 -4
  300. package/dist/realtime/index.js +1 -1
  301. package/dist/{record-form-BbZpwsEi.d.ts → record-form-D2-F4IwS.d.ts} +1 -1
  302. package/dist/records/index.d.ts +7 -7
  303. package/dist/{refresh-DT_ICaK-.d.ts → refresh-CCKB1Wa6.d.ts} +1 -1
  304. package/dist/{refusal-OrlI3g4H.d.ts → refusal-D_tklIEb.d.ts} +2 -2
  305. package/dist/{resolve-CXX6DHv3.d.ts → resolve-Bj1qD7Dy.d.ts} +1 -1
  306. package/dist/{resolved-names-WzRYhUez.js → resolved-names-iLBOUaib.js} +2 -2
  307. package/dist/{resource-execute-CUG6xUuh.d.ts → resource-execute-BSTIfp1D.d.ts} +1 -1
  308. package/dist/{resource-types-DjZ91WKA.d.ts → resource-types-D5WEvYtV.d.ts} +2 -2
  309. package/dist/{resources-6Ncdt9XT.d.ts → resources-CsZ7RhZC.d.ts} +1 -1
  310. package/dist/{respond-oZeJ342J.d.ts → respond-BzRG-0qc.d.ts} +1 -1
  311. package/dist/server/index.d.ts +20 -20
  312. package/dist/{server-types-BH6AjDBN.d.ts → server-types-BlDiY-ya.d.ts} +8 -8
  313. package/dist/{session-Y5SSYO2C.d.ts → session-BGP98Rgj.d.ts} +5 -5
  314. package/dist/{session-status-qQLm7jzh.d.ts → session-status-C4t7kbSn.d.ts} +2 -2
  315. package/dist/{sign-in-BAjR49fq.d.ts → sign-in-CAadgm33.d.ts} +2 -2
  316. package/dist/solid/index.d.ts +9 -9
  317. package/dist/solid-start/index.d.ts +5 -5
  318. package/dist/spec/index.d.ts +1 -1
  319. package/dist/sql/index.d.ts +5 -5
  320. package/dist/sql/index.js +5 -5
  321. package/dist/{sql-CNH8kjLS.js → sql-B7vBP9g0.js} +6248 -2092
  322. package/dist/sqlite/index.d.ts +1 -1
  323. package/dist/ssr/index.d.ts +5 -5
  324. package/dist/storage/index.js +1 -1
  325. package/dist/{subject-readers-8GySC9Z8.d.ts → subject-readers-DJbzlm8a.d.ts} +1 -1
  326. package/dist/{subjects-NomQg6Eg.d.ts → subjects-BYCL-6hA.d.ts} +15 -1
  327. package/dist/{support-B4ZBVxt3.d.ts → support-D7CMbhRT.d.ts} +4 -4
  328. package/dist/{support-view-BYOgwXsJ.d.ts → support-view-CIDXF3_H.d.ts} +1 -1
  329. package/dist/svelte/index.d.ts +8 -8
  330. package/dist/sveltekit/index.d.ts +6 -6
  331. package/dist/{tags-Cjtcp5cN.d.ts → tags-Dg4Ywmqp.d.ts} +1 -1
  332. package/dist/tanstack-db/index.d.ts +1 -1
  333. package/dist/tanstack-start/index.d.ts +5 -5
  334. package/dist/{tenant-D4BA7XQ-.d.ts → tenant-CyLEXgot.d.ts} +2 -2
  335. package/dist/testing/index.d.ts +16 -16
  336. package/dist/testing/index.js +2 -2
  337. package/dist/{timeline-CEzj9v1z.d.ts → timeline-Cjl-1hiA.d.ts} +3 -3
  338. package/dist/{topic-utZqhw96.d.ts → topic-B_DGdAEs.d.ts} +3 -3
  339. package/dist/{topic-F0FKzJyQ.js → topic-DnsNG4Kj.js} +1 -1
  340. package/dist/{types-yj8VF4oY.d.ts → types-BdaBfYIw.d.ts} +2 -2
  341. package/dist/{types-DLnBJ3ST.d.ts → types-DF8JYEf5.d.ts} +2 -2
  342. package/dist/{types-EO2crSX_.d.ts → types-DR1MHh7N.d.ts} +1 -1
  343. package/dist/{vault-O-YlAyHb.d.ts → vault-BghaujrZ.d.ts} +1 -1
  344. package/dist/vercel-connect/index.d.ts +1 -1
  345. package/dist/{verify-B0KLBb3j.d.ts → verify-CI8LgSpv.d.ts} +1 -1
  346. package/dist/{view-DyFdMCqg.d.ts → view-BvNA7EOC.d.ts} +1 -1
  347. package/dist/vue/index.d.ts +9 -9
  348. package/dist/{watch-topic-B1UCoQfz.d.ts → watch-topic-1zIAtiNM.d.ts} +1 -1
  349. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  350. package/dist/workflow-sdk/index.d.ts +1 -1
  351. package/dist/workflow-sdk/world/index.d.ts +1 -1
  352. package/dist/workflow-sdk/world/index.js +1 -1
  353. package/dist/{workflow-sdk-B3Ss55Fy.d.ts → workflow-sdk-BNsZrcVg.d.ts} +1 -1
  354. package/dist/{workflow-sdk-CE8sEK57.js → workflow-sdk-CaEw822d.js} +25 -4
  355. package/dist/yjs/index.d.ts +1 -1
  356. package/dist/yjs/index.js +1 -1
  357. package/package.json +11 -1
  358. package/schemas/config-v1.json +95 -1
  359. package/dist/cli/add-vZRn-uH0.js +0 -1
  360. package/dist/cli/env-xhwXk5Ri.js +0 -1
  361. package/dist/cli/in-stack-diff-DQTW53Vf.js +0 -257
  362. package/dist/cli/powersync-BOhjVQCb.js +0 -1
  363. package/dist/cli/seed-CO3j_bly.js +0 -1
  364. package/dist/options-DztCKw_f.js +0 -8
@@ -2,10 +2,10 @@ import { n as CliError } from "./errors-BTe6A15O.js";
2
2
  import { i as readStdin, t as display } from "./io-DH1kcmmP.js";
3
3
  import { t as isRecord } from "./guards-CUlDNYZs.js";
4
4
  import { c as resolve$1, i as extname$1, n as basename$1, o as join$1, r as dirname$1, s as normalize$1, t as resolveModulePath } from "./dist-DuiMMRbJ.js";
5
- import { _ as parse$1, d as readSupabaseToml, g as tomlNumber, s as findUp } from "./supabase-toml-CncmQbO0.js";
6
- import { A as strictObject, C as optional, D as record, E as rawCheck, M as union, N as unknown, O as regex, S as objectWithRest, T as pipe, _ as minLength, a as array, b as number, c as exactOptional, f as lazy, g as maxValue, h as maxLength, j as string, k as safeParse, l as getDotPath, m as literal, o as boolean, p as length, s as custom, u as integer, v as minValue, w as picklist, y as nullable } from "./env-DMgjB_4y.js";
5
+ import { _ as parse$1, d as readSupabaseToml, f as schemaPaths, g as tomlNumber, p as sqlWorkflow, s as findUp } from "./supabase-toml-CncmQbO0.js";
6
+ import { A as strictObject, C as optional, D as record, E as rawCheck, M as union, N as unknown, O as regex, S as objectWithRest, T as pipe, _ as minLength, a as array, b as number, c as exactOptional, f as lazy, g as maxValue, h as maxLength, j as string, k as safeParse, l as getDotPath, m as literal, o as boolean, p as length, s as custom, u as integer, v as minValue, w as picklist, y as nullable } from "./env-BK0xKMeU.js";
7
7
  import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
8
- import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
8
+ import { n as readStackStatus } from "./stack-status-BkkYRlXG.js";
9
9
  import * as nodeUtil from "node:util";
10
10
  import { existsSync, readFileSync, statSync } from "node:fs";
11
11
  import { dirname, join, resolve } from "node:path";
@@ -13,8 +13,260 @@ import { readFile, rm } from "node:fs/promises";
13
13
  import { pathToFileURL } from "node:url";
14
14
  import { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, CONFIG_GROUPS, GEN_TASKS, INTEGRATION_NAMES, RENAMED_CONFIG_KEYS, SKILLS_AGENTS, providerApiProblem, resolveConfig } from "better-supabase/config";
15
15
  import { CONVENTION_FIELDS } from "better-supabase/preset";
16
- import { SCOPE_ID_TYPES, scopeProblems } from "better-supabase/sql";
16
+ import { SCOPE_ID_TYPES, parseBsbComment, scopeProblems, tableTagComments } from "better-supabase/sql";
17
17
  import { homedir } from "node:os";
18
+ //#region src/cli/subject-tag.ts
19
+ const PERMISSION_PREFIX = "can-";
20
+ function text$1(value) {
21
+ return typeof value === "string" ? value : void 0;
22
+ }
23
+ function columns(value) {
24
+ return typeof value === "string" ? value.split(",").map((item) => item.trim()).filter((item) => item !== "") : [];
25
+ }
26
+ /**
27
+ * The `subject` entry a tag stands for. `table` is the tagged table. Options
28
+ * the tag has no word for (`search.from`, `search.watch`, row grants) stay in
29
+ * `subjects`.
30
+ */
31
+ function subjectFromTag(args, table) {
32
+ const tenant = text$1(args["tenant"]);
33
+ const searchTitle = text$1(args["search-title"]);
34
+ const searchBody = columns(args["search-body"]);
35
+ const description = text$1(args["search-description"]);
36
+ const exclude = text$1(args["search-exclude"]);
37
+ const versions = columns(args["versions"]);
38
+ const rank = text$1(args["rank"]);
39
+ const permissions = Object.fromEntries(Object.entries(args).flatMap(([key, value]) => key.startsWith(PERMISSION_PREFIX) && typeof value === "string" ? [[key.slice(4), value]] : []));
40
+ const search = searchTitle !== void 0 || searchBody.length > 0 || description !== void 0 || exclude !== void 0 || args["search"] === true;
41
+ const id = text$1(args["id"]);
42
+ const idType = text$1(args["id-type"]);
43
+ const title = text$1(args["title"]);
44
+ const url = text$1(args["url"]);
45
+ const scope = text$1(args["scope"]);
46
+ const deletedAt = text$1(args["deleted-at"]);
47
+ const rankGroup = text$1(args["rank-group"]);
48
+ return {
49
+ table,
50
+ ...id === void 0 ? {} : { id },
51
+ ...idType === void 0 ? {} : { idType },
52
+ ...tenant === void 0 ? {} : { tenant: tenant === "false" ? false : tenant },
53
+ ...title === void 0 ? {} : { title },
54
+ ...url === void 0 ? {} : { url },
55
+ ...scope === void 0 ? {} : { scope },
56
+ ...args["cascade"] === true ? { cascade: true } : {},
57
+ ...deletedAt === void 0 ? {} : { deletedAt },
58
+ ...Object.keys(permissions).length === 0 ? {} : { permissions },
59
+ ...search ? { search: {
60
+ ...searchTitle === void 0 ? {} : { title: searchTitle },
61
+ ...searchBody.length === 0 ? {} : { body: searchBody },
62
+ ...description === void 0 ? {} : { description },
63
+ ...exclude === void 0 ? {} : { exclude }
64
+ } } : {},
65
+ ...rank === void 0 && rankGroup === void 0 ? {} : { rank: {
66
+ column: rank ?? "rank",
67
+ ...rankGroup === void 0 ? {} : { group: rankGroup }
68
+ } },
69
+ ...versions.length === 0 ? {} : { versions: {
70
+ columns: versions,
71
+ auto: args["versions-auto"] !== "false"
72
+ } }
73
+ };
74
+ }
75
+ /**
76
+ * The tag arguments for `subject`, or `undefined` when the entry holds an
77
+ * option a tag can't carry, so it stays in `subjects`.
78
+ */
79
+ function subjectTagArgs(type, subject, table) {
80
+ const permissions = Object.entries(subject.permissions ?? {});
81
+ if (permissions.some(([, value]) => typeof value !== "string") || subject.search?.from !== void 0 || subject.search?.watch !== void 0) return;
82
+ const args = {};
83
+ const set = (key, value) => {
84
+ if (value !== void 0) args[key] = value;
85
+ };
86
+ set("type", type === table ? void 0 : type);
87
+ set("id", subject.id);
88
+ set("id-type", subject.idType);
89
+ set("tenant", subject.tenant === false ? "false" : subject.tenant);
90
+ set("title", subject.title);
91
+ set("url", subject.url);
92
+ set("scope", subject.scope);
93
+ set("cascade", subject.cascade === true ? true : void 0);
94
+ set("deleted-at", subject.deletedAt);
95
+ set("search-title", subject.search?.title);
96
+ set("search-body", subject.search?.body === void 0 ? void 0 : subject.search.body.join(","));
97
+ set("search-description", subject.search?.description);
98
+ set("search-exclude", subject.search?.exclude);
99
+ set("search", subject.search !== void 0 && Object.keys(args).every((key) => !key.startsWith("search-")) ? true : void 0);
100
+ set("rank", subject.rank?.column);
101
+ set("rank-group", subject.rank?.group);
102
+ if (subject.versions !== void 0) {
103
+ set("versions", subject.versions.columns.join(","));
104
+ set("versions-auto", subject.versions.auto ? void 0 : "false");
105
+ }
106
+ for (const [action, key] of permissions) set(`${PERMISSION_PREFIX}${action}`, typeof key === "string" ? key : void 0);
107
+ return args;
108
+ }
109
+ //#endregion
110
+ //#region src/cli/gen/table-tags.ts
111
+ const DISTANCES = /* @__PURE__ */ new Set([
112
+ "cosine",
113
+ "l2",
114
+ "inner_product"
115
+ ]);
116
+ function isDistance(value) {
117
+ return DISTANCES.has(value);
118
+ }
119
+ const IMPORT_PREFIX = "import:";
120
+ function isColumnType(value) {
121
+ return APP_COLUMN_TYPES.some((type) => type === value);
122
+ }
123
+ function isEventKind(value) {
124
+ return APP_TABLE_EVENT_KINDS.some((kind) => kind === value);
125
+ }
126
+ function list(value) {
127
+ return typeof value === "string" ? value.split(",").map((item) => item.trim()).filter((item) => item !== "") : [];
128
+ }
129
+ function text(value) {
130
+ return typeof value === "string" ? value : void 0;
131
+ }
132
+ /**
133
+ * `config` with the per-table features the schema's `@bsb` table comments turn
134
+ * on (ADR 0102): `subject`, `realtime`, `vector-search`, `json` (`column=Type`,
135
+ * or `column=import:module#Name`), `encrypted` (`column=type`, a bare column is
136
+ * text) and `events` (`on`, `include`). `audit`, `audit-reads` and `expose`
137
+ * change the table's SQL only, so `gen` has nothing to read from them. A key
138
+ * the config sets itself wins, so a project can move to tags one table at a
139
+ * time. Tables outside `config.schemas` are ignored.
140
+ */
141
+ function withTableTags(config, tables) {
142
+ const subjects = { ...config.subjects };
143
+ const realtimeTables = [...config.realtime.tables];
144
+ const realtimeGlobal = [...config.realtime.global];
145
+ const realtimeUsers = { ...config.realtime.users };
146
+ const vectorSearch = [...config.vectorSearch];
147
+ const json = { ...config.json };
148
+ const appTables = { ...config.appTables };
149
+ const fromTags = /* @__PURE__ */ new Set();
150
+ const eventTables = /* @__PURE__ */ new Set();
151
+ let changed = false;
152
+ for (const table of tables) {
153
+ if (!config.schemas.includes(table.schema)) continue;
154
+ const { tags } = parseBsbComment(table.comment);
155
+ if (tags.length === 0) continue;
156
+ const qualified = `${table.schema}.${table.name}`;
157
+ const short = table.schema === "public" ? table.name : qualified;
158
+ const names = /* @__PURE__ */ new Set([short, qualified]);
159
+ for (const tag of tags) if (tag.name === "subject") {
160
+ const type = text(tag.args["type"]) ?? table.name;
161
+ if (subjects[type] === void 0) {
162
+ subjects[type] = subjectFromTag(tag.args, short);
163
+ changed = true;
164
+ }
165
+ } else if (tag.name === "realtime" && !realtimeTables.some((each) => names.has(each))) {
166
+ realtimeTables.push(short);
167
+ const user = text(tag.args["user"]);
168
+ if (tag.args["global"] === true) realtimeGlobal.push(short);
169
+ if (user !== void 0) realtimeUsers[short] = user;
170
+ changed = true;
171
+ } else if (tag.name === "json") for (const [column, value] of Object.entries(tag.args)) {
172
+ const key = `${short}.${column}`;
173
+ const taken = [key, `${qualified}.${column}`].some((each) => each in json);
174
+ if (typeof value === "string" && !taken) {
175
+ json[key] = value.startsWith(IMPORT_PREFIX) ? { import: value.slice(7) } : { type: value };
176
+ changed = true;
177
+ }
178
+ }
179
+ else if (tag.name === "encrypted" && table.schema === "public") for (const [column, value] of Object.entries(tag.args)) {
180
+ const type = value === true ? "text" : value;
181
+ const own = appTables[table.name];
182
+ const existing = own?.columns?.[column];
183
+ const key = `${table.name}.${column}`;
184
+ if (isColumnType(type) && (existing === void 0 || fromTags.has(key))) {
185
+ fromTags.add(key);
186
+ const entry = {
187
+ ...existing,
188
+ type,
189
+ encrypted: true
190
+ };
191
+ appTables[table.name] = {
192
+ ...own,
193
+ columns: {
194
+ ...own?.columns,
195
+ [column]: entry
196
+ }
197
+ };
198
+ changed = true;
199
+ }
200
+ }
201
+ else if (tag.name === "server" && table.schema === "public") for (const column of Object.keys(tag.args)) {
202
+ const own = appTables[table.name];
203
+ const existing = own?.columns?.[column];
204
+ const key = `${table.name}.${column}`;
205
+ if (existing === void 0 || fromTags.has(key)) {
206
+ fromTags.add(key);
207
+ const entry = {
208
+ type: "text",
209
+ ...existing,
210
+ access: "server"
211
+ };
212
+ appTables[table.name] = {
213
+ ...own,
214
+ columns: {
215
+ ...own?.columns,
216
+ [column]: entry
217
+ }
218
+ };
219
+ changed = true;
220
+ }
221
+ }
222
+ else if (tag.name === "events" && table.schema === "public" && appTables[table.name]?.events === void 0) {
223
+ const on = list(tag.args["on"]).filter(isEventKind);
224
+ const include = list(tag.args["include"]);
225
+ const events = on.length === 0 && include.length === 0 ? true : {
226
+ ...on.length === 0 ? {} : { on },
227
+ ...include.length === 0 ? {} : { include }
228
+ };
229
+ appTables[table.name] = {
230
+ ...appTables[table.name],
231
+ events
232
+ };
233
+ eventTables.add(table.name);
234
+ changed = true;
235
+ } else if (tag.name === "vector-search" && !vectorSearch.some((each) => names.has(each.table))) {
236
+ const column = text(tag.args["column"]);
237
+ const distance = text(tag.args["distance"]) ?? "cosine";
238
+ if (column !== void 0 && isDistance(distance)) {
239
+ vectorSearch.push({
240
+ table: short,
241
+ column,
242
+ distance
243
+ });
244
+ changed = true;
245
+ }
246
+ }
247
+ }
248
+ for (const name of eventTables) {
249
+ const type = Object.entries(subjects).find(([, subject]) => subject.table === name || subject.table === `public.${name}`)?.[0];
250
+ if (type !== void 0) appTables[name] = {
251
+ ...appTables[name],
252
+ subject: { type }
253
+ };
254
+ }
255
+ return changed ? {
256
+ ...config,
257
+ subjects,
258
+ vectorSearch,
259
+ json,
260
+ appTables,
261
+ realtime: {
262
+ ...config.realtime,
263
+ tables: realtimeTables,
264
+ global: realtimeGlobal,
265
+ users: realtimeUsers
266
+ }
267
+ } : config;
268
+ }
269
+ //#endregion
18
270
  //#region ../../node_modules/.pnpm/rc9@3.1.0/node_modules/rc9/dist/_chunks/libs/flat.mjs
19
271
  function isBuffer(obj) {
20
272
  return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
@@ -693,13 +945,14 @@ function _isDirectory(path) {
693
945
  */
694
946
  const valueMapsSchema = record(string(), record(string(), record(string(), nullable(union([string(), array(string())])))));
695
947
  /**
696
- * `records.<type>.permissions`: action to a key, or to `{ key, rows, owner }`.
697
- * The subject registry checks the names.
948
+ * `records.<type>.permissions`: action to a key, or to `{ key, rows, owner,
949
+ * also }`. The subject registry checks the names.
698
950
  */
699
951
  const subjectPermissionsSchema = record(string(), union([string(), strictObject({
700
952
  key: optional(string()),
701
953
  rows: optional(string()),
702
- owner: optional(string())
954
+ owner: optional(string()),
955
+ also: optional(string())
703
956
  })]));
704
957
  /** `records.<type>.search`. The subject registry checks the names. */
705
958
  const subjectSearchSchema = strictObject({
@@ -714,7 +967,12 @@ const subjectSearchSchema = strictObject({
714
967
  watch: optional(array(strictObject({
715
968
  table: string(),
716
969
  key: string(),
717
- via: optional(string())
970
+ via: optional(string()),
971
+ through: optional(array(strictObject({
972
+ table: string(),
973
+ from: string(),
974
+ to: string()
975
+ })))
718
976
  })))
719
977
  });
720
978
  //#endregion
@@ -1508,6 +1766,28 @@ function databaseUrlCredential(config, env, fromStdin) {
1508
1766
  ]);
1509
1767
  }
1510
1768
  //#endregion
1769
+ //#region src/cli/schema-tags.ts
1770
+ /** The `@bsb` table comments in the project's declarative schema files. */
1771
+ async function schemaTagComments(config) {
1772
+ const toml = await readSupabaseToml(config.root);
1773
+ const { files } = await schemaPaths(config.root, toml, sqlWorkflow(config, toml));
1774
+ return (await Promise.all(files.map((path) => readFile(resolve(config.root, path), "utf-8")))).flatMap((sql) => tableTagComments(sql));
1775
+ }
1776
+ /**
1777
+ * `config` with the features the schema files' `@bsb` table comments turn on
1778
+ * (ADR 0102), so the SQL modules, `gen` and doctor read the same config. A key
1779
+ * the config sets itself wins. `appTables` stays as declared: `encrypted` and
1780
+ * `events` tags describe tables whose SQL the files already hold, and `gen`
1781
+ * reads them from the snapshot.
1782
+ */
1783
+ async function withSchemaTags(config) {
1784
+ const tagged = withTableTags(config, await schemaTagComments(config));
1785
+ return tagged === config ? config : {
1786
+ ...tagged,
1787
+ appTables: config.appTables
1788
+ };
1789
+ }
1790
+ //#endregion
1511
1791
  //#region src/cli/config.ts
1512
1792
  const CONFIG_FILES = [
1513
1793
  "better-supabase.config.ts",
@@ -1616,7 +1896,7 @@ async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd,
1616
1896
  const issues = configIssues(config);
1617
1897
  throw new CliError("config_invalid", `${display(cwd, path)} is not a valid config:\n${issues.map((issue) => ` ${issue}`).join("\n")}`, { issues });
1618
1898
  }
1619
- return withEnvironment(resolveConfig(applyEnvironment(config, environment), explicit ? cwd : dirname(path)));
1899
+ return withEnvironment(await withSchemaTags(resolveConfig(applyEnvironment(config, environment), explicit ? cwd : dirname(path))));
1620
1900
  }
1621
1901
  /** `[db] port` or `[api] port` from `supabase/config.toml`. */
1622
1902
  async function readSupabasePort(root, section) {
@@ -1686,4 +1966,4 @@ async function statusDatabaseUrl(root, env, stack, noPort) {
1686
1966
  });
1687
1967
  }
1688
1968
  //#endregion
1689
- export { findConfig as a, readSupabasePort as c, GEN_TASKS as d, INTEGRATIONS as f, discoverConfig as i, stdinDatabaseUrl as l, databaseUrl as n, importExport as o, isGenTask as p, defaultConfig as r, loadConfig as s, applyEnvironment as t, accessToken as u };
1969
+ export { findConfig as a, readSupabasePort as c, GEN_TASKS as d, INTEGRATIONS as f, subjectTagArgs as h, discoverConfig as i, stdinDatabaseUrl as l, withTableTags as m, databaseUrl as n, importExport as o, isGenTask as p, defaultConfig as r, loadConfig as s, applyEnvironment as t, accessToken as u };
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-DH1kcmmP.js";
2
- import { t as CACHE_DIR } from "./cache-ByhPVMo-.js";
3
- import { x as installedVersion } from "./snapshot-BITNbA5V.js";
2
+ import { t as CACHE_DIR } from "./cache-Czfw7Iow.js";
3
+ import { x as installedVersion } from "./snapshot-DdAP7LWO.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";
@@ -1,15 +1,16 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
1
+ import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.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-BVfeG3A5.js";
5
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-KvV-sLZL.js";
6
6
  import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
7
- import { r as supabaseCli } from "./exec--Q1ZEWUW.js";
7
+ import { r as supabaseCli } from "./exec-Ca5s-ygi.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-CDmmFmFG.js";
10
- import { a as migrationFiles, i as isShadowFailure, o as migrationVersion, r as inStackDiff, t as MIGRATION_HEADER } from "./in-stack-diff-DQTW53Vf.js";
9
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DAcQt-Mh.js";
10
+ import { a as migrationFiles, i as isShadowFailure, o as migrationVersion, r as inStackDiff, t as MIGRATION_HEADER } from "./in-stack-diff-Cp-tVPj2.js";
11
11
  import { dirname, join, resolve } from "node:path";
12
12
  import { mkdir, readFile, writeFile } from "node:fs/promises";
13
+ import { parseRenameHints } from "better-supabase/create";
13
14
  //#region src/cli/commands/db.ts
14
15
  const ARGS = {
15
16
  file: {
@@ -98,15 +99,22 @@ const DIFF_ARGS = {
98
99
  },
99
100
  "in-stack": {
100
101
  type: "boolean",
101
- description: "Diff inside the running stack with pg-delta, without the Supabase CLI's shadow database"
102
+ description: "Diff inside the running stack with pg-delta's library plan, without the Supabase CLI's shadow database"
103
+ },
104
+ "allow-data-loss": {
105
+ type: "boolean",
106
+ description: "Write the migration even when it drops tables or columns, or changes a column type"
102
107
  }
103
108
  };
104
109
  const DEFAULT_DIFF_DEPS = {
105
110
  supabase: (args, root, env) => supabaseCli(args, root, env),
106
111
  inStackDiff,
107
- now: () => /* @__PURE__ */ new Date(),
108
112
  log: () => {}
109
113
  };
114
+ /** The renames recorded as `-- bsb: rename old -> new` in the migrations. */
115
+ async function renameHints(root, migrations) {
116
+ return (await Promise.all(migrations.map((file) => readFile(join(root, file), "utf-8")))).flatMap((text) => parseRenameHints(text));
117
+ }
110
118
  /**
111
119
  * The Supabase CLI's diff for the workflow. pg-delta's `declarative sync`
112
120
  * always writes a migration, so printing a diff under pg-delta runs in the
@@ -146,7 +154,12 @@ async function runDbDiff(config, args, env, deps = DEFAULT_DIFF_DEPS) {
146
154
  if (workflow === "migrations") throw new CliError("usage", "db diff turns declarative schema files into a migration, and this project writes migrations directly (database.sql.workflow = migrations).");
147
155
  let fellBack = false;
148
156
  const command = cliDiffCommand(workflow, name);
149
- if (args["in-stack"] !== true && command !== void 0) {
157
+ const stack = args.stack ?? env.BSB_STACK;
158
+ const url = await databaseUrl(config, env, "", stack).catch((cause) => {
159
+ if (args["in-stack"] === true) throw cause;
160
+ return null;
161
+ });
162
+ if (!(args["in-stack"] === true || workflow === "pg-delta" && url !== null && isLocalDatabaseUrl(url)) && command !== void 0) {
150
163
  const result = await deps.supabase(command, config.root, env);
151
164
  if (result.code === 0) return {
152
165
  code: 0,
@@ -169,22 +182,33 @@ async function runDbDiff(config, args, env, deps = DEFAULT_DIFF_DEPS) {
169
182
  fellBack = true;
170
183
  deps.log("The Supabase CLI could not start its shadow database (no shared memory segment left), so db diff diffs inside the running stack. better-supabase dev stack prune frees segments.");
171
184
  }
172
- const url = await databaseUrl(config, env, void 0, args.stack ?? env.BSB_STACK);
173
- if (!isLocalDatabaseUrl(url)) throw new CliError("usage", `db diff --in-stack works on a local stack, and the database is ${databaseHost(url)}.`);
185
+ if (url === null || !isLocalDatabaseUrl(url)) throw new CliError("usage", `db diff --in-stack works on a local stack, and the database is ${url === null ? "unknown" : databaseHost(url)}.`);
174
186
  const dir = toml?.dir ?? "supabase";
175
- const sql = await deps.inStackDiff({
187
+ const migrations = await migrationFiles(config.root, dir);
188
+ const result = await deps.inStackDiff({
176
189
  url,
177
190
  root: config.root,
178
191
  env,
179
192
  files: (await schemaPaths(config.root, toml, workflow)).files,
180
193
  schemasDir: declarativeSchemasDir(toml, workflow),
181
- migrations: await migrationFiles(config.root, dir),
194
+ migrations,
195
+ allowDataLoss: args["allow-data-loss"] === true,
196
+ hints: await renameHints(config.root, migrations),
182
197
  log: deps.log
183
198
  });
199
+ const { sql } = result;
200
+ for (const issue of result.issues) if (issue.severity !== "error") deps.log(issue.message);
184
201
  const data = {
185
202
  engine: "in-stack",
186
203
  fellBack,
187
- changes: sql !== ""
204
+ changes: sql !== "",
205
+ issues: result.issues
206
+ };
207
+ if (result.gate.blocked) return {
208
+ code: 1,
209
+ errorCode: "check_failed",
210
+ error: `The diff destroys data, so nothing was written:\n${result.gate.destructive.map((action) => ` ${action.sql.split("\n")[0] ?? ""}`).join("\n")}\nRename with \`-- bsb: rename old -> new\` in a migration, or run again with --allow-data-loss.`,
211
+ data
188
212
  };
189
213
  if (sql === "") return {
190
214
  code: 0,
@@ -196,7 +220,7 @@ async function runDbDiff(config, args, env, deps = DEFAULT_DIFF_DEPS) {
196
220
  output: sql,
197
221
  data
198
222
  };
199
- const path = join(config.root, dir, "migrations", `${migrationVersion(deps.now())}_${name}.sql`);
223
+ const path = join(config.root, dir, "migrations", `${migrationVersion(/* @__PURE__ */ new Date())}_${name}.sql`);
200
224
  await mkdir(dirname(path), { recursive: true });
201
225
  await writeFile(path, `${MIGRATION_HEADER}\n${sql}\n`);
202
226
  return {
@@ -1,42 +1,42 @@
1
- import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
1
+ import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-RSpJIWDd.js";
3
+ import { t as VERSION } from "./version-C5RAWmrD.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-ByhPVMo-.js";
7
+ import { t as CACHE_DIR } from "./cache-Czfw7Iow.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-BITNbA5V.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-CF09FCra.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-DdAP7LWO.js";
10
+ import { d as configFor, r as renderFiles, u as notNullTag } from "./render-DUNJ4Pss.js";
11
11
  import { t as isRecord } from "./guards-CUlDNYZs.js";
12
- import { i as request } from "./source-GGJHuzpH.js";
13
- import { g as providerLabel, u as compiledReadSets } from "./migrations-CUjNXokR.js";
14
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BVfeG3A5.js";
12
+ import { i as request } from "./source-2irbWSck.js";
13
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-KvV-sLZL.js";
14
+ import { a as compiledReadSets, d as providerLabel } from "./providers-CpaISitn.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
- import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
17
- import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
16
+ import { t as PROCESS_ENV } from "./env-BK0xKMeU.js";
17
+ import { n as readStackStatus } from "./stack-status-BkkYRlXG.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-qH-_YQ8H.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-ez_mT0d4.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-lh-chAJW.js";
22
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-BoD5ynN9.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-D05A6t1e.js";
24
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-C6NLY9iZ.js";
25
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-Cy7xlU4G.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-Cl9COGuy.js";
22
+ import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-DYKkQw1k.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-5uqc1GBj.js";
24
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-CXfRJIV4.js";
25
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-ClnYNMdq.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-KcdTBUij.js";
28
- import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-CDmmFmFG.js";
27
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-CMMEct_F.js";
28
+ import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-DAcQt-Mh.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
- import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
30
+ import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-Cp-tVPj2.js";
31
31
  import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
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-DWQSIZ59.js";
32
+ import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-CiDBH1dB.js";
33
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-BZh-cOzC.js";
34
34
  import { existsSync } from "node:fs";
35
35
  import { dirname, resolve } from "node:path";
36
36
  import { createHash } from "node:crypto";
37
37
  import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
38
38
  import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths, tenantNameOf } from "better-supabase/config";
39
- import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, appTablePolicyNotes, blockFileState, blockSqlVersion, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, widenedCommands } from "better-supabase/sql";
39
+ import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_NAMES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, appTablePolicyNotes, blockFileState, blockSqlVersion, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, widenedCommands } from "better-supabase/sql";
40
40
  import { defineBucket, parseSize } from "better-supabase/storage";
41
41
  //#region src/cli/doctor/env.ts
42
42
  const PUBLIC_PREFIXES = [
@@ -203,7 +203,7 @@ async function fileState(context, file) {
203
203
  * the block's to grant.
204
204
  */
205
205
  function widenedAppTablePolicies(context) {
206
- const tables = adoptedTables(context.config.blocks, appTablesOf(context));
206
+ const tables = adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects });
207
207
  if (tables.length === 0) return [];
208
208
  const modules = /* @__PURE__ */ new Map();
209
209
  for (const table of tables) {
@@ -293,7 +293,7 @@ async function keptUpdatedAtTriggers(context) {
293
293
  * tables keep the app's names, as custom blocks' tables do.
294
294
  */
295
295
  function keepsAppsName(context) {
296
- const adopted = context.config.blockNames.some((name) => moduleDeprecations().some((entry) => entry.module === name && (entry.kind === "table" || entry.kind === "column"))) ? adoptedTables(context.config.blocks, appTablesOf(context)) : [];
296
+ const adopted = context.config.blockNames.some((name) => moduleDeprecations().some((entry) => entry.module === name && (entry.kind === "table" || entry.kind === "column"))) ? adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects }) : [];
297
297
  return (entry) => {
298
298
  if (entry.kind !== "table" && entry.kind !== "column") return false;
299
299
  if ((context.config.blocks[entry.module]?.mode ?? "managed") !== "managed") return true;
@@ -387,7 +387,7 @@ const ADOPTION_RULES = [
387
387
  check: (context) => {
388
388
  const { tables } = catalogOf(context);
389
389
  const ownTables = Object.fromEntries(tables.map((table) => [qualified(table), "database"]));
390
- return adoptedTables(context.config.blocks, ownTables).flatMap((adopted) => {
390
+ return adoptedTables(context.config.blocks, ownTables, { subjects: context.config.subjects }).flatMap((adopted) => {
391
391
  const table = tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
392
392
  if (table === void 0) return [];
393
393
  return adopted.textColumns.flatMap((logical) => {
@@ -411,7 +411,7 @@ const ADOPTION_RULES = [
411
411
  check: (context) => {
412
412
  const block = context.config.blocks["webhooks-out"];
413
413
  if (block === void 0 || block.options?.["defaultFormat"] !== void 0 || typeof block.columns?.["endpoints"]?.["format"] === "string") return [];
414
- const adopted = adoptedTables(context.config.blocks, appTablesOf(context)).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
414
+ const adopted = adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects }).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
415
415
  if (adopted === void 0) return [];
416
416
  const table = catalogOf(context).tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
417
417
  return [{
@@ -582,7 +582,7 @@ const APP_TABLE_SCOPE_RULES = [{
582
582
  }, command)));
583
583
  const extra = table.policies.filter((policy) => policy.permissive && !own.has(policy.name));
584
584
  if (extra.length === 0) return [];
585
- const narrowed = app.scope === "tenant" && table.policies.some((policy) => !policy.permissive && policy.name === TENANT_SCOPE_POLICY);
585
+ const narrowed = app.scope === "tenant" && table.policies.some((policy) => !policy.permissive && (policy.name === TENANT_SCOPE_POLICY || TENANT_SCOPE_NAMES.includes(policy.name)));
586
586
  const names = extra.map((policy) => policy.name).join(", ");
587
587
  const label = `${SCHEMA}.${app.name}`;
588
588
  return [{
@@ -1713,7 +1713,10 @@ async function danglingAuditRegistrations(context) {
1713
1713
  async function missingAdoptedColumns(context) {
1714
1714
  const db = context.database;
1715
1715
  if (!db || "skipped" in db) return [];
1716
- const tables = adoptedTables(context.config.blocks, appTablesOf(context), appViewsOf(context));
1716
+ const tables = adoptedTables(context.config.blocks, appTablesOf(context), {
1717
+ ...appViewsOf(context),
1718
+ subjects: context.config.subjects
1719
+ });
1717
1720
  if (tables.length === 0) return [];
1718
1721
  const names = tables.map((table) => `(${literal$1(table.schema)}, ${literal$1(table.table)})`).join(", ");
1719
1722
  let rows;
@@ -1096,8 +1096,7 @@ function parseEnv(env) {
1096
1096
  CI: optionalString,
1097
1097
  BETTER_SUPABASE_ENV: optionalString,
1098
1098
  BETTER_SUPABASE_AGENT: optionalString,
1099
- BSB_STACK: optionalString,
1100
- BSB_PG_BIN: optionalString
1099
+ BSB_STACK: optionalString
1101
1100
  },
1102
1101
  runtimeEnv: env,
1103
1102
  isServer: true,
@@ -1 +1 @@
1
- export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-DMgjB_4y.js";
1
+ export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-BK0xKMeU.js";
@@ -0,0 +1 @@
1
+ export { n as envCommand } from "./env-DEAtgGoj.js";
@@ -1,7 +1,7 @@
1
- import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
1
+ import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
2
2
  import { n as CliError } from "./errors-BTe6A15O.js";
3
3
  import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
4
- import { n as readStackStatus, t as parseStackStatus } from "./stack-status-B_Ipd_-z.js";
4
+ import { n as readStackStatus, t as parseStackStatus } from "./stack-status-BkkYRlXG.js";
5
5
  import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
6
6
  import { r as publicPrefix, t as detectProject } from "./detect-D9JaAX20.js";
7
7
  import { n as prefixFromFlag, r as stackEnvValues } from "./stack-env-6hS-WEmh.js";
@@ -1,7 +1,7 @@
1
1
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
2
2
  import { t as EXEC_CHANNEL } from "./trace-VbdO6bcN.js";
3
3
  import { s as findUp } from "./supabase-toml-CncmQbO0.js";
4
- import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
4
+ import { t as PROCESS_ENV } from "./env-BK0xKMeU.js";
5
5
  import { channel } from "node:diagnostics_channel";
6
6
  import { closeSync, existsSync, openSync, readSync, statSync } from "node:fs";
7
7
  import { basename, delimiter, dirname, join, normalize, resolve } from "node:path";