@prisma/orm-toolchain 8.0.0-rc.1-dev.5 → 8.0.0-rc.1-dev.7

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 (217) hide show
  1. package/dist/{aggregate-B4mhR4Sk.mjs → aggregate-D53gnb7v.mjs} +8 -8
  2. package/dist/{aggregate-B4mhR4Sk.mjs.map → aggregate-D53gnb7v.mjs.map} +1 -1
  3. package/dist/bin__prisma-next.mjs +22 -22
  4. package/dist/bin__prisma-next.mjs.map +1 -1
  5. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs +14 -0
  6. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +1 -0
  7. package/dist/{types-DZWEs4si-D8UlyJI0.d.mts → cli-errors-CDr3WcJP-NFry5GHb.d.mts} +8 -2
  8. package/dist/cli-errors-CDr3WcJP-NFry5GHb.d.mts.map +1 -0
  9. package/dist/cli.mjs +2 -2
  10. package/dist/cli.mjs.map +1 -1
  11. package/dist/cli__commands__contract-emit.mjs +1 -1
  12. package/dist/cli__commands__contract-infer.mjs +1 -1
  13. package/dist/cli__commands__db-init.mjs +1 -1
  14. package/dist/cli__commands__db-schema.mjs +1 -1
  15. package/dist/cli__commands__db-sign.mjs +1 -1
  16. package/dist/cli__commands__db-update.mjs +1 -1
  17. package/dist/cli__commands__db-verify.mjs +1 -1
  18. package/dist/cli__commands__migrate.d.mts +3 -12
  19. package/dist/cli__commands__migrate.d.mts.map +1 -1
  20. package/dist/cli__commands__migrate.mjs +1 -1
  21. package/dist/cli__commands__migration-check.d.mts +1 -57
  22. package/dist/cli__commands__migration-check.d.mts.map +1 -1
  23. package/dist/cli__commands__migration-check.mjs +2 -2
  24. package/dist/cli__commands__migration-graph.d.mts +1 -1
  25. package/dist/cli__commands__migration-graph.mjs +1 -1
  26. package/dist/cli__commands__migration-list.d.mts +4 -44
  27. package/dist/cli__commands__migration-list.d.mts.map +1 -1
  28. package/dist/cli__commands__migration-list.mjs +2 -2
  29. package/dist/cli__commands__migration-log.d.mts +1 -1
  30. package/dist/cli__commands__migration-log.mjs +1 -1
  31. package/dist/cli__commands__migration-new.mjs +1 -1
  32. package/dist/cli__commands__migration-plan.d.mts +2 -47
  33. package/dist/cli__commands__migration-plan.d.mts.map +1 -1
  34. package/dist/cli__commands__migration-plan.mjs +1 -1
  35. package/dist/cli__commands__migration-show.mjs +1 -1
  36. package/dist/cli__commands__migration-status.d.mts +1 -1
  37. package/dist/cli__commands__migration-status.mjs +1 -1
  38. package/dist/cli__commands__ref.d.mts +1 -28
  39. package/dist/cli__commands__ref.d.mts.map +1 -1
  40. package/dist/cli__commands__ref.mjs +2 -2
  41. package/dist/cli__commands__telemetry.mjs +1 -1
  42. package/dist/cli__control-api.d.mts +502 -2
  43. package/dist/cli__control-api.d.mts.map +1 -1
  44. package/dist/cli__control-api.mjs +18 -3
  45. package/dist/cli__migration-cli.mjs +3 -6
  46. package/dist/cli__migration-cli.mjs.map +1 -1
  47. package/dist/{client-75qrAPqf-7l0C0H_b.mjs → client-Y6qbDk7X-BzKLmBZo.mjs} +16 -12
  48. package/dist/client-Y6qbDk7X-BzKLmBZo.mjs.map +1 -0
  49. package/dist/{command-helpers-CAoXqAY9-DWUBcTXM.mjs → command-helpers-C4WpR-QE-DE494TSG.mjs} +30 -74
  50. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs.map +1 -0
  51. package/dist/config-loader.d.mts +2 -18
  52. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs +44 -0
  53. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +1 -0
  54. package/dist/{contract-emit-B6odMoem-C87PBvmo.mjs → contract-emit-CTm2zfuG-7PV9SBY6.mjs} +12 -11
  55. package/dist/contract-emit-CTm2zfuG-7PV9SBY6.mjs.map +1 -0
  56. package/dist/{contract-emit-0hSjbuxp-BJLC-VgC.mjs → contract-emit-D8IXP9Qp-Df6NwXn8.mjs} +4 -4
  57. package/dist/{contract-emit-0hSjbuxp-BJLC-VgC.mjs.map → contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map} +1 -1
  58. package/dist/{contract-infer-BnkqpftN-DwBzasOu.mjs → contract-infer-BwT7ngoo-Dx6aAwIN.mjs} +5 -5
  59. package/dist/contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map +1 -0
  60. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs +82 -0
  61. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +1 -0
  62. package/dist/{contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs} +3 -3
  63. package/dist/{contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs.map → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map} +1 -1
  64. package/dist/{contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs → contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs} +7 -7
  65. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +1 -0
  66. package/dist/{db-init-bd0_x2Q8.mjs → db-init-CBj_EWg3.mjs} +18 -32
  67. package/dist/db-init-CBj_EWg3.mjs.map +1 -0
  68. package/dist/{db-schema-CwgAWTqG.mjs → db-schema-BWpeh0Q_.mjs} +4 -4
  69. package/dist/{db-schema-CwgAWTqG.mjs.map → db-schema-BWpeh0Q_.mjs.map} +1 -1
  70. package/dist/{db-sign-vqiYfpjI.mjs → db-sign-DCb_DKtv.mjs} +13 -29
  71. package/dist/db-sign-DCb_DKtv.mjs.map +1 -0
  72. package/dist/{db-update-Br0diOCo.mjs → db-update-WX0KitcX.mjs} +29 -52
  73. package/dist/db-update-WX0KitcX.mjs.map +1 -0
  74. package/dist/{db-verify-CKPsRFrj-T7nSt7yT.mjs → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs} +9 -6
  75. package/dist/db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map +1 -0
  76. package/dist/{errors-IpZm1Skp-BH495dRd.mjs → errors-Co-8oaiB-CB-6Uqki.mjs} +45 -53
  77. package/dist/errors-Co-8oaiB-CB-6Uqki.mjs.map +1 -0
  78. package/dist/{errors--qsXZUtL.d.mts → errors-NRmFpwR1.d.mts} +13 -9
  79. package/dist/errors-NRmFpwR1.d.mts.map +1 -0
  80. package/dist/{format-ByDm2goZ-BIRlFoo6.mjs → format-Bw3LVJ1v-BJ6lVFMA.mjs} +12 -9
  81. package/dist/format-Bw3LVJ1v-BJ6lVFMA.mjs.map +1 -0
  82. package/dist/{framework-components-CjshQKHA-Dlp6Leo5.mjs → framework-components-3DdB31mk-BHyX-OlJ.mjs} +3 -3
  83. package/dist/{framework-components-CjshQKHA-Dlp6Leo5.mjs.map → framework-components-3DdB31mk-BHyX-OlJ.mjs.map} +1 -1
  84. package/dist/{graph-membership-DW6nnbyQ-Bp2KcVwR.mjs → graph-membership-BEmNEMtP-rz61CLM5.mjs} +3 -3
  85. package/dist/{graph-membership-DW6nnbyQ-Bp2KcVwR.mjs.map → graph-membership-BEmNEMtP-rz61CLM5.mjs.map} +1 -1
  86. package/dist/index-Df9igRvP.d.mts +18 -0
  87. package/dist/index-Df9igRvP.d.mts.map +1 -0
  88. package/dist/{init-BGm77aWc-jHVUn63W.mjs → init-CPB89WK2-DPZRZ9Ee.mjs} +4 -4
  89. package/dist/{init-BGm77aWc-jHVUn63W.mjs.map → init-CPB89WK2-DPZRZ9Ee.mjs.map} +1 -1
  90. package/dist/{inspect-live-schema-CnwYTRZ0-P-6asJFl.mjs → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs} +4 -4
  91. package/dist/{inspect-live-schema-CnwYTRZ0-P-6asJFl.mjs.map → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map} +1 -1
  92. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs +52 -0
  93. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +1 -0
  94. package/dist/{invariants-lXzy6txi-DAoP4nTE.mjs → invariants-C1WVUAH7-DlOBTTkM.mjs} +3 -3
  95. package/dist/{invariants-lXzy6txi-DAoP4nTE.mjs.map → invariants-C1WVUAH7-DlOBTTkM.mjs.map} +1 -1
  96. package/dist/{io-C8TdyBKt-DloEBi70.mjs → io-CHUUeHh0-CoCBe9eN.mjs} +8 -8
  97. package/dist/{io-C8TdyBKt-DloEBi70.mjs.map → io-CHUUeHh0-CoCBe9eN.mjs.map} +1 -1
  98. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs +22 -0
  99. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +1 -0
  100. package/dist/{migrate-BdVFDKF2.mjs → migrate-B-NAuO90.mjs} +90 -227
  101. package/dist/migrate-B-NAuO90.mjs.map +1 -0
  102. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts +56 -0
  103. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +1 -0
  104. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs +202 -0
  105. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +1 -0
  106. package/dist/{migration-BuUmO7It.mjs → migration-DAJY-NmR.mjs} +3 -3
  107. package/dist/{migration-BuUmO7It.mjs.map → migration-DAJY-NmR.mjs.map} +1 -1
  108. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs +254 -0
  109. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +1 -0
  110. package/dist/{migration-check-DcwUnadt-jamDqOmM.mjs → migration-check-DONPyXff-CGTUpLv-.mjs} +12 -254
  111. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +1 -0
  112. package/dist/{migration-command-scaffold-BCuoeAki-DMy_5ztW.mjs → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs} +4 -4
  113. package/dist/{migration-command-scaffold-BCuoeAki-DMy_5ztW.mjs.map → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map} +1 -1
  114. package/dist/{migration-graph-CBf9ORe7-B4xAF8GN.mjs → migration-graph-DDaOHo10-yJFAbKCu.mjs} +3 -3
  115. package/dist/{migration-graph-CBf9ORe7-B4xAF8GN.mjs.map → migration-graph-DDaOHo10-yJFAbKCu.mjs.map} +1 -1
  116. package/dist/{migration-graph-vmgkL3k4.mjs → migration-graph-Dn469b0l.mjs} +10 -19
  117. package/dist/migration-graph-Dn469b0l.mjs.map +1 -0
  118. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs +35 -0
  119. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map +1 -0
  120. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs +102 -0
  121. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +1 -0
  122. package/dist/migration-list-jk4iCtmO.mjs +120 -0
  123. package/dist/migration-list-jk4iCtmO.mjs.map +1 -0
  124. package/dist/{migration-log-CS5IWcNq-DI7FTHCA.mjs → migration-log-DQzUBrm8-D3m9wcuf.mjs} +7 -7
  125. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +1 -0
  126. package/dist/migration-new-BkSY6m0t.mjs +50 -0
  127. package/dist/migration-new-BkSY6m0t.mjs.map +1 -0
  128. package/dist/{migration-new-GmW2anVb.mjs → migration-new-g98oB3nC-BcrkxAAt.mjs} +19 -58
  129. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +1 -0
  130. package/dist/{migration-path-target-D3Sj55PI-BICblCuk.mjs → migration-path-target-BPYp3LNc-DsDdLU0J.mjs} +4 -4
  131. package/dist/migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map +1 -0
  132. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts +159 -0
  133. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +1 -0
  134. package/dist/migration-plan-CjIYMJZy.mjs +172 -0
  135. package/dist/migration-plan-CjIYMJZy.mjs.map +1 -0
  136. package/dist/{migration-plan-q_L84PN1-ClkGgtVz.mjs → migration-plan-CwuZLXVE-DAJ-JUQT.mjs} +46 -185
  137. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +1 -0
  138. package/dist/{migration-show--pW4XhKs.mjs → migration-show-CW6EKtfw.mjs} +16 -12
  139. package/dist/migration-show-CW6EKtfw.mjs.map +1 -0
  140. package/dist/{migration-status-CE7cQLDq-P1x1-BsZ.mjs → migration-status-DSQcBhiN.mjs} +37 -68
  141. package/dist/migration-status-DSQcBhiN.mjs.map +1 -0
  142. package/dist/migration-tools.d.mts +5 -5
  143. package/dist/migration-tools.mjs +13 -13
  144. package/dist/migration-tools__aggregate.mjs +1 -1
  145. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  146. package/dist/migration-tools__errors.d.mts +2 -2
  147. package/dist/migration-tools__errors.mjs +2 -2
  148. package/dist/migration-tools__invariants.mjs +1 -1
  149. package/dist/migration-tools__io.mjs +1 -1
  150. package/dist/migration-tools__migration-graph.mjs +2 -2
  151. package/dist/migration-tools__migration.mjs +1 -1
  152. package/dist/migration-tools__ref-resolution.mjs +1 -1
  153. package/dist/migration-tools__refs.mjs +1 -1
  154. package/dist/migration-tools__spaces.d.mts +1 -1
  155. package/dist/migration-tools__spaces.mjs +2 -2
  156. package/dist/{project-import-root-CpwLCDLY-DkVwAnWj.mjs → project-import-root-C_bd0ooL-WkbJLnAA.mjs} +10 -8
  157. package/dist/project-import-root-C_bd0ooL-WkbJLnAA.mjs.map +1 -0
  158. package/dist/ref-DSAZime8.mjs +72 -0
  159. package/dist/ref-DSAZime8.mjs.map +1 -0
  160. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs +96 -0
  161. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs.map +1 -0
  162. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs +109 -0
  163. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +1 -0
  164. package/dist/{ref-resolution-BjJBWPjX.mjs → ref-resolution-Ct2GMcNB.mjs} +2 -2
  165. package/dist/{ref-resolution-BjJBWPjX.mjs.map → ref-resolution-Ct2GMcNB.mjs.map} +1 -1
  166. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs +16 -0
  167. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +1 -0
  168. package/dist/{refs-BDbB9BRB-D6Za3Q49.mjs → refs-B2BL8z3i-DGGFB7Mj.mjs} +6 -6
  169. package/dist/refs-B2BL8z3i-DGGFB7Mj.mjs.map +1 -0
  170. package/dist/refs-fQLFcMoq-UTlvnijY.mjs +47 -0
  171. package/dist/refs-fQLFcMoq-UTlvnijY.mjs.map +1 -0
  172. package/dist/{spaces-DxFj5y8l.d.mts → spaces-D5qtTlhj.d.mts} +2 -2
  173. package/dist/{spaces-DxFj5y8l.d.mts.map → spaces-D5qtTlhj.d.mts.map} +1 -1
  174. package/dist/{spaces-C27bA-xc.mjs → spaces-DxuvClN9.mjs} +7 -7
  175. package/dist/spaces-DxuvClN9.mjs.map +1 -0
  176. package/dist/{telemetry-CmbCa3Ld-CmE5zcIG.mjs → telemetry-DVBHDQd6-Ckn5oClN.mjs} +3 -3
  177. package/dist/{telemetry-CmbCa3Ld-CmE5zcIG.mjs.map → telemetry-DVBHDQd6-Ckn5oClN.mjs.map} +1 -1
  178. package/dist/{verify-DnVNjc5C-BGdsblBK.mjs → verify-C6L_hiJU-B4V3bqvG.mjs} +3 -3
  179. package/dist/{verify-DnVNjc5C-BGdsblBK.mjs.map → verify-C6L_hiJU-B4V3bqvG.mjs.map} +1 -1
  180. package/dist/{verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs} +4 -4
  181. package/dist/{verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs.map → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map} +1 -1
  182. package/dist/vite-plugin-contract-emit.mjs +1 -1
  183. package/package.json +12 -12
  184. package/dist/client-75qrAPqf-7l0C0H_b.mjs.map +0 -1
  185. package/dist/command-helpers-CAoXqAY9-DWUBcTXM.mjs.map +0 -1
  186. package/dist/config-loader.d.mts.map +0 -1
  187. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs +0 -36
  188. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs.map +0 -1
  189. package/dist/contract-emit-B6odMoem-C87PBvmo.mjs.map +0 -1
  190. package/dist/contract-infer-BnkqpftN-DwBzasOu.mjs.map +0 -1
  191. package/dist/contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs.map +0 -1
  192. package/dist/db-init-bd0_x2Q8.mjs.map +0 -1
  193. package/dist/db-sign-vqiYfpjI.mjs.map +0 -1
  194. package/dist/db-update-Br0diOCo.mjs.map +0 -1
  195. package/dist/db-verify-CKPsRFrj-T7nSt7yT.mjs.map +0 -1
  196. package/dist/errors--qsXZUtL.d.mts.map +0 -1
  197. package/dist/errors-IpZm1Skp-BH495dRd.mjs.map +0 -1
  198. package/dist/format-ByDm2goZ-BIRlFoo6.mjs.map +0 -1
  199. package/dist/migrate-BdVFDKF2.mjs.map +0 -1
  200. package/dist/migration-check-DcwUnadt-jamDqOmM.mjs.map +0 -1
  201. package/dist/migration-graph-vmgkL3k4.mjs.map +0 -1
  202. package/dist/migration-list-BFBeo1_X-ckYMhETH.mjs +0 -228
  203. package/dist/migration-list-BFBeo1_X-ckYMhETH.mjs.map +0 -1
  204. package/dist/migration-log-CS5IWcNq-DI7FTHCA.mjs.map +0 -1
  205. package/dist/migration-new-GmW2anVb.mjs.map +0 -1
  206. package/dist/migration-path-target-D3Sj55PI-BICblCuk.mjs.map +0 -1
  207. package/dist/migration-plan-q_L84PN1-ClkGgtVz.mjs.map +0 -1
  208. package/dist/migration-show--pW4XhKs.mjs.map +0 -1
  209. package/dist/migration-status-CE7cQLDq-P1x1-BsZ.mjs.map +0 -1
  210. package/dist/project-import-root-CpwLCDLY-DkVwAnWj.mjs.map +0 -1
  211. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs +0 -57
  212. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs.map +0 -1
  213. package/dist/ref-sHE8zOcm.mjs +0 -171
  214. package/dist/ref-sHE8zOcm.mjs.map +0 -1
  215. package/dist/refs-BDbB9BRB-D6Za3Q49.mjs.map +0 -1
  216. package/dist/spaces-C27bA-xc.mjs.map +0 -1
  217. package/dist/types-DZWEs4si-D8UlyJI0.d.mts.map +0 -1
@@ -1,171 +0,0 @@
1
- import { t as MigrationToolsError } from "./errors-IpZm1Skp-BH495dRd.mjs";
2
- import { r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs";
3
- import "./constants-CM-w38DQ-Cz_EXbOc.mjs";
4
- import { r as findLatestMigration } from "./migration-graph-CBf9ORe7-B4xAF8GN.mjs";
5
- import { E as errorRefSetHashNotInGraph, N as errorUnexpected, O as errorRuntime$1, P as formatCommandHelp, Q as mapRefResolutionError, T as errorRefSetEmptySentinel, Z as mapMigrationToolsError, at as resolveMigrationPaths, et as parseGlobalFlags, h as errorFileNotFound, o as createTerminalUI, q as handleResult, r as addGlobalOptions, st as setCommandDescriptions, t as CliStructuredError$1, tt as parseGlobalFlagsOrExit, w as errorRefSetBundleNotFound } from "./command-helpers-CAoXqAY9-DWUBcTXM.mjs";
6
- import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
7
- import { n as isGraphNode } from "./graph-membership-DW6nnbyQ-Bp2KcVwR.mjs";
8
- import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, u as validateRefValue } from "./refs-BDbB9BRB-D6Za3Q49.mjs";
9
- import { n as buildReadAggregate } from "./contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs";
10
- import { n as parseContractRef } from "./ref-resolution-BjJBWPjX.mjs";
11
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
12
- import { join } from "pathe";
13
- import { Command } from "commander";
14
- //#region ../../../1-framework/3-tooling/cli/dist/commands/ref.mjs
15
- function mapError(error) {
16
- if (MigrationToolsError.is(error)) return mapMigrationToolsError(error);
17
- return errorUnexpected(error instanceof Error ? error.message : String(error));
18
- }
19
- function cliErrorInvalidRefName(name) {
20
- return errorRuntime$1(`Invalid ref name "${name}"`, {
21
- why: `Ref name "${name}" does not match the required format`,
22
- fix: "Ref names must be lowercase alphanumeric with hyphens or forward slashes, no `.` or `..` segments"
23
- });
24
- }
25
- async function executeRefSetCommand(name, contractInput, options) {
26
- if (!validateRefName(name)) return notOk(cliErrorInvalidRefName(name));
27
- try {
28
- const config = await loadConfig(options.config);
29
- const { migrationsDir, refsDir } = resolveMigrationPaths(options.config, config);
30
- const loaded = await buildReadAggregate(config, { migrationsDir });
31
- if (!loaded.ok) return notOk(loaded.failure);
32
- const graph = loaded.value.aggregate.app.graph();
33
- const bundles = loaded.value.aggregate.app.packages;
34
- const refs = loaded.value.aggregate.app.refs;
35
- let resolvedHash;
36
- if (validateRefValue(contractInput)) resolvedHash = contractInput;
37
- else {
38
- const refResult = parseContractRef(contractInput, {
39
- graph,
40
- refs
41
- });
42
- if (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));
43
- resolvedHash = refResult.value.hash;
44
- }
45
- if (resolvedHash === "empty") return notOk(errorRefSetEmptySentinel(resolvedHash));
46
- if (!isGraphNode(resolvedHash, graph)) {
47
- const graphTip = findLatestMigration(graph)?.to ?? null;
48
- return notOk(errorRefSetHashNotInGraph(resolvedHash, [...graph.nodes].sort(), graphTip));
49
- }
50
- if (!bundles.find((bundle) => bundle.metadata.to === resolvedHash)) return notOk(errorRefSetBundleNotFound(resolvedHash));
51
- const contractJsonPath = join(contractSnapshotDir(migrationsDir, resolvedHash), "contract.json");
52
- try {
53
- await readContractSnapshotJson(migrationsDir, resolvedHash);
54
- } catch (readError) {
55
- if (MigrationToolsError.is(readError) && readError.code === "MIGRATION.CONTRACT_SNAPSHOT_MISSING") return notOk(errorFileNotFound(contractJsonPath, {
56
- why: `Migration bundle for hash ${resolvedHash} is missing its contract snapshot at ${contractJsonPath}`,
57
- fix: "Restore migrations/snapshots/ from version control, or re-run the command that produced this migration to regenerate its snapshot."
58
- }));
59
- throw readError;
60
- }
61
- await writeRef(refsDir, name, {
62
- hash: resolvedHash,
63
- invariants: []
64
- });
65
- return ok({
66
- ok: true,
67
- ref: name,
68
- hash: resolvedHash,
69
- invariants: []
70
- });
71
- } catch (error) {
72
- if (error instanceof CliStructuredError$1) return notOk(error);
73
- return notOk(mapError(error));
74
- }
75
- }
76
- async function executeRefDeleteCommand(name, options) {
77
- try {
78
- const config = await loadConfig(options.config);
79
- const { refsDir } = resolveMigrationPaths(options.config, config);
80
- await deleteRef(refsDir, name);
81
- return ok({
82
- ok: true,
83
- ref: name,
84
- deleted: true
85
- });
86
- } catch (error) {
87
- if (error instanceof CliStructuredError$1) return notOk(error);
88
- return notOk(mapError(error));
89
- }
90
- }
91
- async function executeRefListCommand(options) {
92
- try {
93
- const config = await loadConfig(options.config);
94
- const { refsDir } = resolveMigrationPaths(options.config, config);
95
- return ok({
96
- ok: true,
97
- refs: await readRefs(refsDir)
98
- });
99
- } catch (error) {
100
- if (error instanceof CliStructuredError$1) return notOk(error);
101
- return notOk(mapError(error));
102
- }
103
- }
104
- function createRefSetCommand() {
105
- const command = new Command("set");
106
- setCommandDescriptions(command, "Set a ref to a contract reference", "Sets a named ref to point to a resolved contract reference (hash, alias, or path) in migrations/refs/.");
107
- addGlobalOptions(command).argument("<name>", "Ref name (e.g., staging, production)").argument("<contract>", "Contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)").option("--config <path>", "Path to prisma-next.config.ts").action(async (name, hash, options) => {
108
- const flags = parseGlobalFlagsOrExit(options);
109
- const ui = createTerminalUI(flags);
110
- const exitCode = handleResult(await executeRefSetCommand(name, hash, options), flags, ui, (value) => {
111
- if (flags.json) ui.output(JSON.stringify(value));
112
- else if (!flags.quiet) ui.output(`Set ref "${value.ref}" → ${value.hash}`);
113
- });
114
- process.exit(exitCode);
115
- });
116
- return command;
117
- }
118
- function createRefDeleteCommand() {
119
- const command = new Command("delete");
120
- setCommandDescriptions(command, "Delete a ref", "Removes a named ref from migrations/refs/.");
121
- addGlobalOptions(command).argument("<name>", "Ref name to delete").option("--config <path>", "Path to prisma-next.config.ts").action(async (name, options) => {
122
- const flags = parseGlobalFlagsOrExit(options);
123
- const ui = createTerminalUI(flags);
124
- const exitCode = handleResult(await executeRefDeleteCommand(name, options), flags, ui, (value) => {
125
- if (flags.json) ui.output(JSON.stringify(value));
126
- else if (!flags.quiet) ui.output(`Deleted ref "${value.ref}"`);
127
- });
128
- process.exit(exitCode);
129
- });
130
- return command;
131
- }
132
- function createRefListCommand() {
133
- const command = new Command("list");
134
- setCommandDescriptions(command, "List all refs", "Lists all named refs from migrations/refs/.");
135
- addGlobalOptions(command).option("--config <path>", "Path to prisma-next.config.ts").action(async (options) => {
136
- const flags = parseGlobalFlagsOrExit(options);
137
- const ui = createTerminalUI(flags);
138
- const exitCode = handleResult(await executeRefListCommand(options), flags, ui, (value) => {
139
- if (flags.json) ui.output(JSON.stringify(value));
140
- else if (!flags.quiet) {
141
- const entries = Object.entries(value.refs);
142
- if (entries.length === 0) ui.output("No refs defined");
143
- else for (const [refName, entry] of entries) {
144
- const invariantsSuffix = entry.invariants.length > 0 ? ` [invariants: ${entry.invariants.join(", ")}]` : "";
145
- ui.output(`${refName} → ${entry.hash}${invariantsSuffix}`);
146
- }
147
- }
148
- });
149
- process.exit(exitCode);
150
- });
151
- return command;
152
- }
153
- function createRefCommand() {
154
- const command = new Command("ref");
155
- setCommandDescriptions(command, "Manage contract refs", "Manage named refs in migrations/refs/. Refs map logical environment\nnames (e.g., staging, production) to contract hashes.");
156
- addGlobalOptions(command).configureHelp({
157
- formatHelp: (cmd) => formatCommandHelp({
158
- command: cmd,
159
- flags: parseGlobalFlags({})
160
- }),
161
- subcommandDescription: () => ""
162
- });
163
- command.addCommand(createRefSetCommand());
164
- command.addCommand(createRefDeleteCommand());
165
- command.addCommand(createRefListCommand());
166
- return command;
167
- }
168
- //#endregion
169
- export { executeRefSetCommand as i, executeRefDeleteCommand as n, executeRefListCommand as r, createRefCommand as t };
170
-
171
- //# sourceMappingURL=ref-sHE8zOcm.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ref-sHE8zOcm.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/ref.mjs"],"sourcesContent":["import { $ as errorRefSetBundleNotFound, F as CliStructuredError, O as formatCommandHelp, W as errorFileNotFound, _ as createTerminalUI, ct as errorUnexpected, et as errorRefSetEmptySentinel, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, lt as mapMigrationToolsError, rt as errorRuntime, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorRefSetHashNotInGraph, ut as mapRefResolutionError, y as handleResult } from \"../command-helpers-CAoXqAY9.mjs\";\nimport { n as buildReadAggregate } from \"../contract-space-aggregate-loader-CFH-336b.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join } from \"pathe\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\nimport { MigrationToolsError } from \"@internal/migration-tools/errors\";\nimport { findLatestMigration, isGraphNode } from \"@internal/migration-tools/migration-graph\";\nimport { contractSnapshotDir, readContractSnapshotJson } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { deleteRef, readRefs, validateRefName, validateRefValue, writeRef } from \"@internal/migration-tools/refs\";\nimport { parseContractRef } from \"@internal/migration-tools/ref-resolution\";\n//#region src/commands/ref.ts\nfunction mapError(error) {\n\tif (MigrationToolsError.is(error)) return mapMigrationToolsError(error);\n\treturn errorUnexpected(error instanceof Error ? error.message : String(error));\n}\nfunction cliErrorInvalidRefName(name) {\n\treturn errorRuntime(`Invalid ref name \"${name}\"`, {\n\t\twhy: `Ref name \"${name}\" does not match the required format`,\n\t\tfix: \"Ref names must be lowercase alphanumeric with hyphens or forward slashes, no `.` or `..` segments\"\n\t});\n}\nasync function executeRefSetCommand(name, contractInput, options) {\n\tif (!validateRefName(name)) return notOk(cliErrorInvalidRefName(name));\n\ttry {\n\t\tconst config = await loadConfig(options.config);\n\t\tconst { migrationsDir, refsDir } = resolveMigrationPaths(options.config, config);\n\t\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\t\tif (!loaded.ok) return notOk(loaded.failure);\n\t\tconst graph = loaded.value.aggregate.app.graph();\n\t\tconst bundles = loaded.value.aggregate.app.packages;\n\t\tconst refs = loaded.value.aggregate.app.refs;\n\t\tlet resolvedHash;\n\t\tif (validateRefValue(contractInput)) resolvedHash = contractInput;\n\t\telse {\n\t\t\tconst refResult = parseContractRef(contractInput, {\n\t\t\t\tgraph,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tif (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));\n\t\t\tresolvedHash = refResult.value.hash;\n\t\t}\n\t\tif (resolvedHash === EMPTY_CONTRACT_HASH) return notOk(errorRefSetEmptySentinel(resolvedHash));\n\t\tif (!isGraphNode(resolvedHash, graph)) {\n\t\t\tconst graphTip = findLatestMigration(graph)?.to ?? null;\n\t\t\treturn notOk(errorRefSetHashNotInGraph(resolvedHash, [...graph.nodes].sort(), graphTip));\n\t\t}\n\t\tif (!bundles.find((bundle) => bundle.metadata.to === resolvedHash)) return notOk(errorRefSetBundleNotFound(resolvedHash));\n\t\tconst contractJsonPath = join(contractSnapshotDir(migrationsDir, resolvedHash), \"contract.json\");\n\t\ttry {\n\t\t\tawait readContractSnapshotJson(migrationsDir, resolvedHash);\n\t\t} catch (readError) {\n\t\t\tif (MigrationToolsError.is(readError) && readError.code === \"MIGRATION.CONTRACT_SNAPSHOT_MISSING\") return notOk(errorFileNotFound(contractJsonPath, {\n\t\t\t\twhy: `Migration bundle for hash ${resolvedHash} is missing its contract snapshot at ${contractJsonPath}`,\n\t\t\t\tfix: \"Restore migrations/snapshots/ from version control, or re-run the command that produced this migration to regenerate its snapshot.\"\n\t\t\t}));\n\t\t\tthrow readError;\n\t\t}\n\t\tawait writeRef(refsDir, name, {\n\t\t\thash: resolvedHash,\n\t\t\tinvariants: []\n\t\t});\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tref: name,\n\t\t\thash: resolvedHash,\n\t\t\tinvariants: []\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\nasync function executeRefDeleteCommand(name, options) {\n\ttry {\n\t\tconst config = await loadConfig(options.config);\n\t\tconst { refsDir } = resolveMigrationPaths(options.config, config);\n\t\tawait deleteRef(refsDir, name);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tref: name,\n\t\t\tdeleted: true\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\nasync function executeRefListCommand(options) {\n\ttry {\n\t\tconst config = await loadConfig(options.config);\n\t\tconst { refsDir } = resolveMigrationPaths(options.config, config);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\trefs: await readRefs(refsDir)\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\nfunction createRefSetCommand() {\n\tconst command = new Command(\"set\");\n\tsetCommandDescriptions(command, \"Set a ref to a contract reference\", \"Sets a named ref to point to a resolved contract reference (hash, alias, or path) in migrations/refs/.\");\n\taddGlobalOptions(command).argument(\"<name>\", \"Ref name (e.g., staging, production)\").argument(\"<contract>\", \"Contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (name, hash, options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefSetCommand(name, hash, options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) ui.output(`Set ref \"${value.ref}\" → ${value.hash}`);\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefDeleteCommand() {\n\tconst command = new Command(\"delete\");\n\tsetCommandDescriptions(command, \"Delete a ref\", \"Removes a named ref from migrations/refs/.\");\n\taddGlobalOptions(command).argument(\"<name>\", \"Ref name to delete\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (name, options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefDeleteCommand(name, options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) ui.output(`Deleted ref \"${value.ref}\"`);\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefListCommand() {\n\tconst command = new Command(\"list\");\n\tsetCommandDescriptions(command, \"List all refs\", \"Lists all named refs from migrations/refs/.\");\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefListCommand(options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) {\n\t\t\t\tconst entries = Object.entries(value.refs);\n\t\t\t\tif (entries.length === 0) ui.output(\"No refs defined\");\n\t\t\t\telse for (const [refName, entry] of entries) {\n\t\t\t\t\tconst invariantsSuffix = entry.invariants.length > 0 ? ` [invariants: ${entry.invariants.join(\", \")}]` : \"\";\n\t\t\t\t\tui.output(`${refName} → ${entry.hash}${invariantsSuffix}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefCommand() {\n\tconst command = new Command(\"ref\");\n\tsetCommandDescriptions(command, \"Manage contract refs\", \"Manage named refs in migrations/refs/. Refs map logical environment\\nnames (e.g., staging, production) to contract hashes.\");\n\taddGlobalOptions(command).configureHelp({\n\t\tformatHelp: (cmd) => formatCommandHelp({\n\t\t\tcommand: cmd,\n\t\t\tflags: parseGlobalFlags({})\n\t\t}),\n\t\tsubcommandDescription: () => \"\"\n\t});\n\tcommand.addCommand(createRefSetCommand());\n\tcommand.addCommand(createRefDeleteCommand());\n\tcommand.addCommand(createRefListCommand());\n\treturn command;\n}\n//#endregion\nexport { createRefCommand, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand };\n\n//# sourceMappingURL=ref.mjs.map"],"mappings":";;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO;CACxB,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,uBAAuB,KAAK;CACtE,OAAO,gBAAgB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAC9E;AACA,SAAS,uBAAuB,MAAM;CACrC,OAAOA,eAAa,qBAAqB,KAAK,IAAI;EACjD,KAAK,aAAa,KAAK;EACvB,KAAK;CACN,CAAC;AACF;AACA,eAAe,qBAAqB,MAAM,eAAe,SAAS;CACjE,IAAI,CAAC,gBAAgB,IAAI,GAAG,OAAO,MAAM,uBAAuB,IAAI,CAAC;CACrE,IAAI;EACH,MAAM,SAAS,MAAM,WAAW,QAAQ,MAAM;EAC9C,MAAM,EAAE,eAAe,YAAY,sBAAsB,QAAQ,QAAQ,MAAM;EAC/E,MAAM,SAAS,MAAM,mBAAmB,QAAQ,EAAE,cAAc,CAAC;EACjE,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,OAAO,OAAO;EAC3C,MAAM,QAAQ,OAAO,MAAM,UAAU,IAAI,MAAM;EAC/C,MAAM,UAAU,OAAO,MAAM,UAAU,IAAI;EAC3C,MAAM,OAAO,OAAO,MAAM,UAAU,IAAI;EACxC,IAAI;EACJ,IAAI,iB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ACA,SAAS,mBAAmB;CAC3B,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,uBAAuB,SAAS,wBAAwB,4HAA4H;CACpL,iBAAiB,OAAO,CAAC,CAAC,cAAc;EACvC,aAAa,QAAQ,kBAAkB;GACtC,SAAS;GACT,OAAO,iBAAiB,CAAC,CAAC;EAC3B,CAAC;EACD,6BAA6B;CAC9B,CAAC;CACD,QAAQ,WAAW,oBAAoB,CAAC;CACxC,QAAQ,WAAW,uBAAuB,CAAC;CAC3C,QAAQ,WAAW,qBAAqB,CAAC;CACzC,OAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"refs-BDbB9BRB-D6Za3Q49.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/refs-BDbB9BRB.mjs"],"sourcesContent":["import { b as errorInvalidRefName, t as MigrationToolsError, x as errorInvalidRefValue, y as errorInvalidRefFile } from \"./errors-IpZm1Skp.mjs\";\nimport { dirname, join, relative } from \"pathe\";\nimport { mkdir, readFile, readdir, rename, rmdir, unlink, writeFile } from \"node:fs/promises\";\nimport { type } from \"arktype\";\n//#region src/refs.ts\n/**\n* The system head ref lives at `refs/head.json`. It is read (and its\n* corruption judged) through `readContractSpaceHeadRef`, not as a\n* user-authored ref, so {@link readRefsTolerant} excludes it.\n*/\nconst HEAD_REF_NAME = \"head\";\nconst REF_NAME_PATTERN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\/[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;\nconst REF_VALUE_PATTERN = /^(empty|[0-9a-f]{64})$/;\nfunction validateRefName(name) {\n\tif (name.length === 0) return false;\n\tif (name.includes(\"..\")) return false;\n\tif (name.includes(\"//\")) return false;\n\tif (name.startsWith(\".\")) return false;\n\treturn REF_NAME_PATTERN.test(name);\n}\nfunction validateRefValue(value) {\n\treturn REF_VALUE_PATTERN.test(value);\n}\nconst RefEntrySchema = type({\n\thash: \"string\",\n\tinvariants: \"string[]\"\n}).narrow((entry, ctx) => {\n\tif (!validateRefValue(entry.hash)) return ctx.mustBe(`a valid contract hash (got \"${entry.hash}\")`);\n\treturn true;\n});\nfunction refFilePath(refsDir, name) {\n\treturn join(refsDir, `${name}.json`);\n}\nfunction refNameFromPath(refsDir, filePath) {\n\treturn relative(refsDir, filePath).replace(/\\.json$/, \"\");\n}\nasync function readRef(refsDir, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tconst filePath = refFilePath(refsDir, name);\n\tlet raw;\n\ttry {\n\t\traw = await readFile(filePath, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\t\twhy: `No ref file found at \"${filePath}\".`,\n\t\t\tfix: `Create the ref with: prisma-next ref set ${name} <hash>`,\n\t\t\tdetails: {\n\t\t\t\trefName: name,\n\t\t\t\tfilePath\n\t\t\t}\n\t\t});\n\t\tthrow error;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\tthrow errorInvalidRefFile(filePath, \"Failed to parse as JSON\");\n\t}\n\tconst result = RefEntrySchema(parsed);\n\tif (result instanceof type.errors) throw errorInvalidRefFile(filePath, result.summary);\n\treturn result;\n}\nasync function readRefs(refsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = await readdir(refsDir, {\n\t\t\trecursive: true,\n\t\t\tencoding: \"utf-8\"\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return {};\n\t\tthrow error;\n\t}\n\tconst jsonFiles = entries.filter((entry) => entry.endsWith(\".json\") && !entry.endsWith(\".contract.json\"));\n\tconst refs = {};\n\tfor (const jsonFile of jsonFiles) {\n\t\tconst filePath = join(refsDir, jsonFile);\n\t\tconst name = refNameFromPath(refsDir, filePath);\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = await readFile(filePath, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\t\tif (code === \"ENOENT\" || code === \"EISDIR\") continue;\n\t\t\tthrow error;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch {\n\t\t\tthrow errorInvalidRefFile(filePath, \"Failed to parse as JSON\");\n\t\t}\n\t\tconst result = RefEntrySchema(parsed);\n\t\tif (result instanceof type.errors) throw errorInvalidRefFile(filePath, result.summary);\n\t\trefs[name] = result;\n\t}\n\treturn refs;\n}\n/**\n* Read a space's user-authored refs without ever throwing on disk\n* content. A ref whose JSON is unparseable or whose shape fails\n* {@link RefEntrySchema} is omitted from `refs` and reported as a\n* {@link RefLoadProblem}; the remaining well-formed refs are still\n* returned. A missing `refs/` directory yields no refs and no problems.\n*\n* `refs/head.json` is deliberately skipped here: the system head ref is\n* read through `readContractSpaceHeadRef` (which validates head-ref\n* shape, distinct from the strict user-ref hash grammar), so it is judged\n* there and never doubles as a user ref. Genuine I/O faults (EACCES, EIO,\n* …) still propagate — only parse / schema problems are made tolerant.\n*/\nasync function readRefsTolerant(refsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = await readdir(refsDir, {\n\t\t\trecursive: true,\n\t\t\tencoding: \"utf-8\"\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return {\n\t\t\trefs: {},\n\t\t\tproblems: []\n\t\t};\n\t\tthrow error;\n\t}\n\tconst jsonFiles = entries.filter((entry) => entry.endsWith(\".json\") && !entry.endsWith(\".contract.json\") && entry !== `head.json`);\n\tconst refs = {};\n\tconst problems = [];\n\tfor (const jsonFile of jsonFiles) {\n\t\tconst filePath = join(refsDir, jsonFile);\n\t\tconst name = refNameFromPath(refsDir, filePath);\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = await readFile(filePath, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\t\tif (code === \"ENOENT\" || code === \"EISDIR\") continue;\n\t\t\tthrow error;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch (e) {\n\t\t\tproblems.push({\n\t\t\t\trefName: name,\n\t\t\t\tdetail: e instanceof Error ? e.message : String(e)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst result = RefEntrySchema(parsed);\n\t\tif (result instanceof type.errors) {\n\t\t\tproblems.push({\n\t\t\t\trefName: name,\n\t\t\t\tdetail: result.summary\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\trefs[name] = result;\n\t}\n\treturn {\n\t\trefs,\n\t\tproblems\n\t};\n}\nasync function writeRef(refsDir, name, entry) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tif (!validateRefValue(entry.hash)) throw errorInvalidRefValue(entry.hash);\n\tconst filePath = refFilePath(refsDir, name);\n\tconst dir = dirname(filePath);\n\tawait mkdir(dir, { recursive: true });\n\tconst tmpPath = join(dir, `.${name.split(\"/\").pop()}.json.${Date.now()}.tmp`);\n\tawait writeFile(tmpPath, `${JSON.stringify({\n\t\thash: entry.hash,\n\t\tinvariants: [...entry.invariants]\n\t}, null, 2)}\\n`);\n\tawait rename(tmpPath, filePath);\n}\nasync function deleteRef(refsDir, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tconst filePath = refFilePath(refsDir, name);\n\ttry {\n\t\tawait unlink(filePath);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\t\twhy: `No ref file found at \"${filePath}\".`,\n\t\t\tfix: \"Run `prisma-next ref list` to see available refs.\",\n\t\t\tdetails: {\n\t\t\t\trefName: name,\n\t\t\t\tfilePath\n\t\t\t}\n\t\t});\n\t\tthrow error;\n\t}\n\tlet dir = dirname(filePath);\n\twhile (dir !== refsDir && dir.startsWith(refsDir)) try {\n\t\tawait rmdir(dir);\n\t\tdir = dirname(dir);\n\t} catch (error) {\n\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\tif (code === \"ENOTEMPTY\" || code === \"EEXIST\" || code === \"ENOENT\") break;\n\t\tthrow error;\n\t}\n}\n/**\n* Index user-authored refs by the contract hash each ref points at.\n* Each bucket is sorted lex-asc for deterministic output.\n*/\nfunction refsByContractHash(refs) {\n\tconst byHash = /* @__PURE__ */ new Map();\n\tfor (const [name, entry] of Object.entries(refs)) {\n\t\tconst bucket = byHash.get(entry.hash);\n\t\tif (bucket) bucket.push(name);\n\t\telse byHash.set(entry.hash, [name]);\n\t}\n\tfor (const bucket of byHash.values()) bucket.sort();\n\treturn byHash;\n}\n/**\n* Read `migrations/<space>/refs/*.json` and index by destination hash.\n* Returns an empty map when the refs directory does not exist.\n*/\nasync function resolveRefsByContractHash(refsDir) {\n\treturn refsByContractHash(await readRefs(refsDir));\n}\nfunction resolveRef(refs, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tif (!Object.hasOwn(refs, name)) throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\twhy: `No ref named \"${name}\" exists.`,\n\t\tfix: `Available refs: ${Object.keys(refs).join(\", \") || \"(none)\"}. Create a ref with: prisma-next ref set ${name} <hash>`,\n\t\tdetails: {\n\t\t\trefName: name,\n\t\t\tavailableRefs: Object.keys(refs)\n\t\t}\n\t});\n\treturn refs[name];\n}\n//#endregion\nexport { readRefsTolerant as a, resolveRefsByContractHash as c, writeRef as d, readRefs as i, validateRefName as l, deleteRef as n, refsByContractHash as o, readRef as r, resolveRef as s, HEAD_REF_NAME as t, validateRefValue as u };\n\n//# sourceMappingURL=refs-BDbB9BRB.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,SAAS,gBAAgB,MAAM;CAC9B,IAAI,KAAK,WAAW,GAAG,OAA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gBAAgB,KAAK,IAAI;EAC/G,KAAK,iBAAiB,KAAK;EAC3B,KAAK,mBAAmB,OAAO,KAAK,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,SAAS,2CAA2C,KAAK;EACjH,SAAS;GACR,SAAS;GACT,eAAe,OAAO,KAAK,IAAI;EAChC;CACD,CAAC;CACD,OAAO,KAAK;AACb"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spaces-C27bA-xc.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-IpZm1Skp.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-sf5nP4mb.mjs\";\nimport { s as readMigrationsDir } from \"../io-C8TdyBKt.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-CBf9ORe7.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-BZDcJsuA.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `details` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,aAAa,WAAW,GAAG,uBAAuB,OAAO;CACjE,MAAM,aAAa,mBAAmB;EACrC,QAAQ,OAAO;EACf,cAAc,OAAO;EACrB,SAAS;EACT,GAAG,UAAU,uBAAuB,OAAO,mBAAmB;EAC9D,GAAG,UAAU,eAAe,OAAO,WAAW;CAC/C,CAAC;CACD,IAAI,eAAe,OAAO,aAAa,MAAM,gCAAgC;EAC5E,aAAa,OAAO;EACpB,gBAAgB;EAChB,aAAa,OAAO;CACrB,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,eAAe,+BAA+B,QAAQ;CACrD,MAAM,EAAE,sBAAsB,SAAS,mBAAmB,4BAA4B;CACtF,MAAM,uBAAuB,MAAM,yBAAyB,sBAAsB,OAAO;CACzF,IAAI,yBAAyB,MAAM,OAAO,EAAE,MAAM,8BAA8B;CAChF,MAAM,EAAE,aAAa,MAAM,kBAAkB,wBAAwB,sBAAsB,OAAO,GAAG,EAAE,eAAe,qBAAqB,CAAC;CAC5I,MAAM,QAAQ,iBAAiB,QAAQ;CACvC,MAAM,WAAW,qBAAqB;CACtC,MAAM,WAAW,IAAI,IAAI,qBAAqB,WAAW,QAAQ,OAAO,CAAC,wBAAwB,SAAS,EAAE,CAAC,CAAC;CAC9G,MAAM,UAAU,qBAAqB,OAAO,UAAU,qBAAqB,MAAM,EAAE,SAAS,CAAC;CAC7F,IAAI,QAAQ,SAAS,eAAe,OAAO;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