@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,6 +1,7 @@
1
+ import { CliStructuredError } from "@prisma/orm-framework/errors/control";
1
2
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
2
3
  import { dirname, relative } from "pathe";
3
- //#region ../../../1-framework/3-tooling/migration/dist/errors-IpZm1Skp.mjs
4
+ //#region ../../../1-framework/3-tooling/migration/dist/errors-Co-8oaiB.mjs
4
5
  /**
5
6
  * Build the canonical "re-emit this package" remediation hint.
6
7
  *
@@ -29,40 +30,30 @@ function reemitHint(dir, fallback) {
29
30
  * - category: Always 'MIGRATION'
30
31
  * - why: Explains the cause in plain language
31
32
  * - fix: Actionable remediation step
32
- * - details: Machine-readable structured data for agents
33
+ * - meta: Machine-readable structured data for agents
33
34
  */
34
- var MigrationToolsError = class extends Error {
35
- code;
36
- category = "MIGRATION";
37
- why;
38
- fix;
39
- details;
35
+ var MigrationToolsError = class extends CliStructuredError {
36
+ category;
40
37
  constructor(code, summary, options) {
41
- super(summary);
42
- this.name = "MigrationToolsError";
43
- this.code = code;
44
- this.why = options.why;
45
- this.fix = options.fix;
46
- this.details = options.details;
38
+ super(code, summary, options);
39
+ this.category = "MIGRATION";
47
40
  }
48
41
  static is(error) {
49
- if (!(error instanceof Error)) return false;
50
- const candidate = error;
51
- return candidate.name === "MigrationToolsError" && typeof candidate.code === "string";
42
+ return CliStructuredError.is(error) && "category" in error && error.category === "MIGRATION" && error.code.startsWith("MIGRATION.");
52
43
  }
53
44
  };
54
45
  function errorDirectoryExists(dir) {
55
46
  return new MigrationToolsError("MIGRATION.DIR_EXISTS", "Migration directory already exists", {
56
47
  why: `The directory "${dir}" already exists. Each migration must have a unique directory.`,
57
48
  fix: "Use --name to pick a different name, or delete the existing directory and re-run.",
58
- details: { dir }
49
+ meta: { dir }
59
50
  });
60
51
  }
61
52
  function errorMissingFile(file, dir) {
62
53
  return new MigrationToolsError("MIGRATION.FILE_MISSING", `Missing ${file}`, {
63
54
  why: `Expected "${file}" in "${dir}" but the file does not exist.`,
64
55
  fix: reemitHint(dir, "or delete the directory if the migration is unwanted and the source TypeScript is gone."),
65
- details: {
56
+ meta: {
66
57
  file,
67
58
  dir
68
59
  }
@@ -72,7 +63,7 @@ function errorInvalidJson(filePath, parseError) {
72
63
  return new MigrationToolsError("MIGRATION.INVALID_JSON", "Invalid JSON in migration file", {
73
64
  why: `Failed to parse "${filePath}": ${parseError}`,
74
65
  fix: reemitHint(dirname(filePath), "or restore the directory from version control."),
75
- details: {
66
+ meta: {
76
67
  filePath,
77
68
  parseError
78
69
  }
@@ -82,7 +73,7 @@ function errorInvalidManifest(filePath, reason) {
82
73
  return new MigrationToolsError("MIGRATION.INVALID_MANIFEST", "Invalid migration manifest", {
83
74
  why: `Migration manifest at "${filePath}" is invalid: ${reason}`,
84
75
  fix: reemitHint(dirname(filePath), "or restore the directory from version control."),
85
- details: {
76
+ meta: {
86
77
  filePath,
87
78
  reason
88
79
  }
@@ -92,14 +83,14 @@ function errorDescribeMissingEndContract() {
92
83
  return new MigrationToolsError("MIGRATION.DESCRIBE_INVALID", "Migration.describe(): provide endContractJson or override describe() — a migration needs a destination contract hash.", {
93
84
  why: "Migration.describe() was called on a migration that carries no endContractJson and does not override describe(), so no destination contract hash can be derived.",
94
85
  fix: "Set endContractJson on the migration, or override describe() to return the { from, to } metadata explicitly.",
95
- details: { reason: "missing-end-contract" }
86
+ meta: { reason: "missing-end-contract" }
96
87
  });
97
88
  }
98
89
  function errorDescribeInvalidMetadata(summary) {
99
90
  return new MigrationToolsError("MIGRATION.DESCRIBE_INVALID", `describe() returned invalid metadata: ${summary}`, {
100
91
  why: `The migration's describe() returned metadata that failed schema validation: ${summary}.`,
101
92
  fix: "Ensure describe() returns { from: string | null, to: string } with valid contract hashes.",
102
- details: {
93
+ meta: {
103
94
  reason: "invalid-metadata",
104
95
  summary
105
96
  }
@@ -109,21 +100,21 @@ function errorOperationsNotArray() {
109
100
  return new MigrationToolsError("MIGRATION.PLAN_NOT_ARRAY", "operations must be an array", {
110
101
  why: "The migration instance's `operations` getter returned a non-array value.",
111
102
  fix: "Ensure the `operations` getter returns an array of migration operations.",
112
- details: {}
103
+ meta: {}
113
104
  });
114
105
  }
115
106
  function errorSpaceHeadRefMissing(spaceId) {
116
107
  return new MigrationToolsError("MIGRATION.CHECK_HEAD_REF_MISSING", `Contract space "${spaceId}" has no head ref; its contract cannot be resolved from the snapshot store without one.`, {
117
108
  why: `Contract space "${spaceId}" declares no refs/head.json, so there is no hash to resolve its contract against the snapshot store.`,
118
109
  fix: "Re-emit the contract-space migrations and head-ref artifacts (the extension's contract-space build), or restore refs/head.json from version control.",
119
- details: { spaceId }
110
+ meta: { spaceId }
120
111
  });
121
112
  }
122
113
  function errorInvalidOperationEntry(index, reason) {
123
114
  return new MigrationToolsError("MIGRATION.INVALID_OPERATION_ENTRY", "Migration operation entry is malformed", {
124
115
  why: `Operation at index ${index} returned by the migration class failed schema validation: ${reason}.`,
125
116
  fix: "Update the migration class so each entry of `operations` carries `id` (string), `label` (string), and `operationClass` (one of 'additive' | 'widening' | 'destructive' | 'data').",
126
- details: {
117
+ meta: {
127
118
  index,
128
119
  reason
129
120
  }
@@ -133,21 +124,21 @@ function errorInvalidSlug(slug) {
133
124
  return new MigrationToolsError("MIGRATION.INVALID_NAME", "Invalid migration name", {
134
125
  why: `The slug "${slug}" contains no valid characters after sanitization (only a-z, 0-9 are kept).`,
135
126
  fix: "Provide a name with at least one alphanumeric character, e.g. --name add_users.",
136
- details: { slug }
127
+ meta: { slug }
137
128
  });
138
129
  }
139
130
  function errorInvalidDestName(destName) {
140
131
  return new MigrationToolsError("MIGRATION.INVALID_DEST_NAME", "Invalid copy destination name", {
141
132
  why: `The destination name "${destName}" must be a single path segment (no ".." or directory separators).`,
142
133
  fix: "Use a simple file name such as \"contract.json\" for each destination in the copy list.",
143
- details: { destName }
134
+ meta: { destName }
144
135
  });
145
136
  }
146
137
  function errorInvalidSpaceId(spaceId) {
147
138
  return new MigrationToolsError("MIGRATION.INVALID_SPACE_ID", "Invalid contract space identifier", {
148
139
  why: `The space id "${spaceId}" does not match the required pattern /^[a-z][a-z0-9_-]{0,63}$/. Space ids are used as filesystem directory names under \`migrations/\`, so the pattern is conservative on purpose.`,
149
140
  fix: "Pick a lowercase identifier that begins with a letter and contains only lowercase letters, digits, hyphens, or underscores; max 64 characters total.",
150
- details: { spaceId }
141
+ meta: { spaceId }
151
142
  });
152
143
  }
153
144
  function errorDescriptorHeadHashMismatch(args) {
@@ -155,7 +146,7 @@ function errorDescriptorHeadHashMismatch(args) {
155
146
  return new MigrationToolsError("MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH", "Extension descriptor's headRef.hash does not match its contractJson", {
156
147
  why: `Extension "${extensionId}" publishes a \`contractSpace\` whose \`headRef.hash\` (${headRefHash}) does not match the canonical hash recomputed from \`contractSpace.contractJson\` (${recomputedHash}). This means the extension descriptor was published with stale \`headRef.hash\` — typically because the contract was bumped without rerunning the extension's emit pipeline.`,
157
148
  fix: "Re-run the extension authoring pipeline so `contractJson.storage.storageHash` and `headRef.hash` agree, then republish the extension. If you are the extension author and you intentionally bumped `contractJson`, recompute and update `headRef.hash` (and refresh any on-disk migration metadata that derives from it).",
158
- details: {
149
+ meta: {
159
150
  extensionId,
160
151
  recomputedHash,
161
152
  headRefHash
@@ -166,7 +157,7 @@ function errorDuplicateSpaceId(spaceId) {
166
157
  return new MigrationToolsError("MIGRATION.DUPLICATE_SPACE_ID", "Duplicate contract space identifier", {
167
158
  why: `The space id "${spaceId}" appears more than once in the per-space planner input. Each space id must be unique across the inputs (the per-space planner emits one output entry per id).`,
168
159
  fix: "Deduplicate the inputs before passing them to `planAllSpaces` — typically by checking your `extensions` declaration for repeated entries.",
169
- details: { spaceId }
160
+ meta: { spaceId }
170
161
  });
171
162
  }
172
163
  function errorAmbiguousTarget(branchTips, context) {
@@ -174,7 +165,7 @@ function errorAmbiguousTarget(branchTips, context) {
174
165
  return new MigrationToolsError("MIGRATION.AMBIGUOUS_TARGET", "Ambiguous migration target", {
175
166
  why: `The migration history has diverged into multiple branches: ${branchTips.join(", ")}. This typically happens when two developers plan migrations from the same starting point.${divergenceInfo}`,
176
167
  fix: "Use `ref set <name> <hash>` to target a specific branch, delete one of the conflicting migration directories and re-run `migration plan`, or use --from <hash> to explicitly select a starting point.",
177
- details: {
168
+ meta: {
178
169
  branchTips,
179
170
  ...context ? {
180
171
  divergencePoint: context.divergencePoint,
@@ -187,14 +178,14 @@ function errorNoInitialMigration(nodes) {
187
178
  return new MigrationToolsError("MIGRATION.NO_INITIAL_MIGRATION", "No initial migration found", {
188
179
  why: `No migration starts from the empty contract state (known hashes: ${nodes.join(", ")}). At least one migration must originate from the empty state.`,
189
180
  fix: "Inspect the migrations directory for corrupted migration.json files. At least one migration must start from the empty contract hash.",
190
- details: { nodes }
181
+ meta: { nodes }
191
182
  });
192
183
  }
193
184
  function errorInvalidRefFile(filePath, reason) {
194
185
  return new MigrationToolsError("MIGRATION.INVALID_REF_FILE", "Invalid ref file", {
195
186
  why: `Ref file at "${filePath}" is invalid: ${reason}`,
196
187
  fix: "Ensure the ref file contains valid JSON with { \"hash\": \"<64 hex chars>\", \"invariants\": [\"...\"] }.",
197
- details: {
188
+ meta: {
198
189
  path: filePath,
199
190
  reason
200
191
  }
@@ -204,35 +195,35 @@ function errorInvalidRefName(refName) {
204
195
  return new MigrationToolsError("MIGRATION.INVALID_REF_NAME", "Invalid ref name", {
205
196
  why: `Ref name "${refName}" is invalid. Names must be lowercase alphanumeric with hyphens or forward slashes (no "." or ".." segments).`,
206
197
  fix: `Use a valid ref name (e.g., "staging", "envs/production").`,
207
- details: { refName }
198
+ meta: { refName }
208
199
  });
209
200
  }
210
201
  function errorNoTarget(reachableHashes) {
211
202
  return new MigrationToolsError("MIGRATION.NO_TARGET", "No migration target could be resolved", {
212
203
  why: `The migration history contains cycles and no target can be resolved automatically (reachable hashes: ${reachableHashes.join(", ")}). This typically happens after rollback migrations (e.g., C1→C2→C1).`,
213
204
  fix: "Use --from <hash> to specify the planning origin explicitly.",
214
- details: { reachableHashes }
205
+ meta: { reachableHashes }
215
206
  });
216
207
  }
217
208
  function errorInvalidRefValue(value) {
218
209
  return new MigrationToolsError("MIGRATION.INVALID_REF_VALUE", "Invalid ref value", {
219
210
  why: `Ref value "${value}" is not a valid contract hash. Values must be a 64-character hex digest or "empty".`,
220
211
  fix: "Use a valid storage hash from `prisma-next contract emit` output or an existing migration.",
221
- details: { value }
212
+ meta: { value }
222
213
  });
223
214
  }
224
215
  function errorInvalidInvariantId(invariantId) {
225
216
  return new MigrationToolsError("MIGRATION.INVALID_INVARIANT_ID", "Invalid invariantId", {
226
217
  why: `invariantId ${JSON.stringify(invariantId)} is invalid. Ids must be non-empty and contain no whitespace or control characters (including Unicode whitespace like NBSP); other content (kebab-case, camelCase, namespaced, Unicode letters) is allowed.`,
227
218
  fix: "Pick an invariantId without spaces, tabs, newlines, or control characters — e.g. \"backfill-user-phone\", \"users/backfill-phone\", or \"BackfillUserPhone\".",
228
- details: { invariantId }
219
+ meta: { invariantId }
229
220
  });
230
221
  }
231
222
  function errorDuplicateInvariantInEdge(invariantId) {
232
223
  return new MigrationToolsError("MIGRATION.DUPLICATE_INVARIANT_IN_EDGE", "Duplicate invariantId on a single migration", {
233
224
  why: `invariantId "${invariantId}" is declared by more than one dataTransform on the same migration. The marker stores invariants as a set and the routing layer treats them as edge-level, so two ops cannot share a routing identity.`,
234
225
  fix: "Rename one of the conflicting dataTransform invariantIds, or drop invariantId on the op that does not need to be routing-visible.",
235
- details: { invariantId }
226
+ meta: { invariantId }
236
227
  });
237
228
  }
238
229
  function errorProvidedInvariantsMismatch(filePath, stored, derived) {
@@ -243,7 +234,7 @@ function errorProvidedInvariantsMismatch(filePath, stored, derived) {
243
234
  return new MigrationToolsError("MIGRATION.PROVIDED_INVARIANTS_MISMATCH", "providedInvariants on migration.json disagrees with ops.json", {
244
235
  why: missing.length === 0 && extra.length === 0 ? `migration.json at "${filePath}" stores providedInvariants ${JSON.stringify(stored)}, but the canonical value derived from ops.json is ${JSON.stringify(derived)} — same ids, different order. Canonical providedInvariants is sorted ascending.` : `migration.json at "${filePath}" stores providedInvariants ${JSON.stringify(stored)}, but the value derived from ops.json is ${JSON.stringify(derived)}. The manifest copy was likely hand-edited without re-emitting.`,
245
236
  fix: reemitHint(dirname(filePath), "or restore the directory from version control."),
246
- details: {
237
+ meta: {
247
238
  filePath,
248
239
  stored,
249
240
  derived,
@@ -261,7 +252,7 @@ function errorNoInvariantPath(args) {
261
252
  return new MigrationToolsError("MIGRATION.NO_INVARIANT_PATH", "No path covers the required invariants", {
262
253
  why: `${refClause} requires invariants the reachable path doesn't cover. required=[${required.map((id) => JSON.stringify(id)).join(", ")}], missing=[${missingList}].`,
263
254
  fix: "Add a migration on the path that runs `dataTransform({ invariantId: \"<id>\", … })` for each missing invariant, or retarget the ref to a hash whose path already provides them.",
264
- details: {
255
+ meta: {
265
256
  required,
266
257
  missing,
267
258
  structuralPath,
@@ -274,7 +265,7 @@ function errorUnknownInvariant(args) {
274
265
  return new MigrationToolsError("MIGRATION.UNKNOWN_INVARIANT", "Ref declares invariants no migration in the graph provides", {
275
266
  why: `${refName ? `Ref "${refName}" declares` : "Declares"} invariants no migration in the graph provides. unknown=[${unknown.map((id) => JSON.stringify(id)).join(", ")}].`,
276
267
  fix: "Either the ref has a typo, or the declaring migration has not been authored/attested yet. Re-check the ref file and the migrations directory.",
277
- details: {
268
+ meta: {
278
269
  unknown,
279
270
  declared,
280
271
  ...ifDefined("refName", refName)
@@ -285,7 +276,7 @@ function errorMigrationHashMismatch(dir, storedHash, computedHash) {
285
276
  return new MigrationToolsError("MIGRATION.HASH_MISMATCH", "Migration package is corrupt", {
286
277
  why: `Stored migrationHash "${storedHash}" does not match the recomputed hash "${computedHash}" for "${relative(process.cwd(), dir)}". The migration.json or ops.json has been edited or partially written since emit.`,
287
278
  fix: reemitHint(dir, "or restore the directory from version control."),
288
- details: {
279
+ meta: {
289
280
  dir,
290
281
  storedHash,
291
282
  computedHash
@@ -302,7 +293,7 @@ function errorRefNotResolvable(refName) {
302
293
  return new MigrationToolsError("MIGRATION.REF_NOT_RESOLVABLE", `Ref "${refName}" is not resolvable`, {
303
294
  why: `Ref "${refName}" has no pointer file, and the hash being resolved is not a node in the migration graph either — there is nothing to materialize a contract from.`,
304
295
  fix: `Create the ref with "prisma-next ref set ${refName} <hash>" (or advance it via "prisma-next db update --advance-ref ${refName}"), or pass a hash that is a node in the migration graph.`,
305
- details: {
296
+ meta: {
306
297
  refName,
307
298
  identifier: refName
308
299
  }
@@ -312,20 +303,21 @@ function errorBundleNotFoundForGraphNode(hash, explicitLabel) {
312
303
  return new MigrationToolsError("MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE", explicitLabel ? `No migration bundle found for reference "${explicitLabel}" (resolved hash: ${hash})` : `No migration bundle found for graph node ${hash}`, {
313
304
  why: `The hash ${hash} is a graph node but no on-disk migration package has a destination (\`to\`) hash matching it.`,
314
305
  fix: "Provide a ref or hash that corresponds to an existing migration package, or run `migration list` to see available migrations.",
315
- details: {
306
+ meta: {
316
307
  hash,
317
308
  ...explicitLabel ? { explicitLabel } : {}
318
309
  }
319
310
  });
320
311
  }
321
- function errorContractDeserializationFailed(filePath, message) {
312
+ function errorContractDeserializationFailed(filePath, message, options) {
322
313
  return new MigrationToolsError("MIGRATION.CONTRACT_DESERIALIZATION_FAILED", "Contract failed to deserialize", {
323
314
  why: `Contract at "${filePath}" failed to deserialize: ${message}`,
324
315
  fix: reemitHint(dirname(filePath), "or restore the directory from version control."),
325
- details: {
316
+ meta: {
326
317
  filePath,
327
318
  message
328
- }
319
+ },
320
+ ...ifDefined("cause", options?.cause)
329
321
  });
330
322
  }
331
323
  function errorHashNotInGraph(hash, graph) {
@@ -334,7 +326,7 @@ function errorHashNotInGraph(hash, graph) {
334
326
  return new MigrationToolsError("MIGRATION.HASH_NOT_IN_GRAPH", `Hash "${hash}" is not a node in the migration graph`, {
335
327
  why: `The migration graph contains nodes ${reachableList}; "${hash}" isn't one of them.`,
336
328
  fix: `Pass a hash that's the from-or-to of an on-disk migration bundle, use --from with a graph-node hash, or run "prisma-next migration plan" to introduce it.`,
337
- details: {
329
+ meta: {
338
330
  hash,
339
331
  reachableHashes
340
332
  }
@@ -344,7 +336,7 @@ function errorContractSnapshotMissing(storageHash, expectedPath) {
344
336
  return new MigrationToolsError("MIGRATION.CONTRACT_SNAPSHOT_MISSING", "Contract snapshot is missing", {
345
337
  why: `Expected a contract snapshot for ${storageHash} at "${expectedPath}" but the file does not exist.`,
346
338
  fix: "Re-emit the contract snapshot by re-running the command that authored the migration referencing this hash (`prisma-next migration plan` for app-space migrations; the extension's contract-space build for extension spaces), or restore migrations/snapshots/ from version control.",
347
- details: {
339
+ meta: {
348
340
  storageHash,
349
341
  expectedPath
350
342
  }
@@ -354,7 +346,7 @@ function errorContractSnapshotHashMismatch(storageHash, actualHash, dir) {
354
346
  return new MigrationToolsError("MIGRATION.CONTRACT_SNAPSHOT_HASH_MISMATCH", "Contract snapshot hash mismatch", {
355
347
  why: `The contract JSON's inner storage.storageHash ("${actualHash}") does not match the requested storage hash ("${storageHash}") for snapshot directory "${dir}".`,
356
348
  fix: "Pass a contractJson whose storage.storageHash equals the storageHash argument passed to writeContractSnapshot — the two must agree by construction.",
357
- details: {
349
+ meta: {
358
350
  storageHash,
359
351
  actualHash,
360
352
  dir
@@ -365,7 +357,7 @@ function errorMigrationContractViewMissing(className, accessor, jsonField) {
365
357
  return new MigrationToolsError("MIGRATION.CONTRACT_VIEW_MISSING", `${className}.${accessor} requires ${jsonField}`, {
366
358
  why: `${className}.${accessor} was read, but this instance has no ${jsonField} to build the view from.`,
367
359
  fix: `Set ${jsonField} to the migration's committed contract JSON, or avoid reading ${accessor} on a migration that overrides describe() and carries no contract.`,
368
- details: {
360
+ meta: {
369
361
  className,
370
362
  accessor,
371
363
  jsonField
@@ -375,4 +367,4 @@ function errorMigrationContractViewMissing(className, accessor, jsonField) {
375
367
  //#endregion
376
368
  export { errorOperationsNotArray as A, errorInvalidSpaceId as C, errorNoInitialMigration as D, errorMissingFile as E, errorRefNotResolvable as M, errorSpaceHeadRefMissing as N, errorNoInvariantPath as O, errorUnknownInvariant as P, errorInvalidSlug as S, errorMigrationHashMismatch as T, errorInvalidManifest as _, errorContractSnapshotHashMismatch as a, errorInvalidRefName as b, errorDescribeMissingEndContract as c, errorDuplicateInvariantInEdge as d, errorDuplicateSpaceId as f, errorInvalidJson as g, errorInvalidInvariantId as h, errorContractDeserializationFailed as i, errorProvidedInvariantsMismatch as j, errorNoTarget as k, errorDescriptorHeadHashMismatch as l, errorInvalidDestName as m, errorAmbiguousTarget as n, errorContractSnapshotMissing as o, errorHashNotInGraph as p, errorBundleNotFoundForGraphNode as r, errorDescribeInvalidMetadata as s, MigrationToolsError as t, errorDirectoryExists as u, errorInvalidOperationEntry as v, errorMigrationContractViewMissing as w, errorInvalidRefValue as x, errorInvalidRefFile as y };
377
369
 
378
- //# sourceMappingURL=errors-IpZm1Skp-BH495dRd.mjs.map
370
+ //# sourceMappingURL=errors-Co-8oaiB-CB-6Uqki.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-Co-8oaiB-CB-6Uqki.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/errors-Co-8oaiB.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/errors/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { dirname, relative } from \"pathe\";\n//#region src/errors.ts\n/**\n* Build the canonical \"re-emit this package\" remediation hint.\n*\n* Every on-disk migration package ships its own `migration.ts` author-time\n* file. Running it regenerates `migration.json` and `ops.json` with the\n* correct hash + metadata, so it is the right primitive whenever a single\n* package's on-disk artifacts are missing, malformed, or otherwise corrupt.\n* Pointing users at `migration plan` would emit a *new* package rather than\n* heal the broken one.\n*/\nfunction reemitHint(dir, fallback) {\n\tconst reemit = `Re-emit the package by running \\`node \"${relative(process.cwd(), dir)}/migration.ts\"\\``;\n\treturn fallback ? `${reemit}, ${fallback}` : `${reemit}.`;\n}\n/**\n* Structured error for migration tooling operations.\n*\n* Follows the NAMESPACE.SUBCODE convention from ADR 027. All codes live under\n* the MIGRATION namespace. These are tooling-time errors (file I/O, hash\n* verification, migration history reconstruction), distinct from the runtime\n* MIGRATION.* codes for apply-time failures (PRECHECK_FAILED, POSTCHECK_FAILED,\n* etc.).\n*\n* Fields:\n* - code: Stable machine-readable code (MIGRATION.SUBCODE)\n* - category: Always 'MIGRATION'\n* - why: Explains the cause in plain language\n* - fix: Actionable remediation step\n* - meta: Machine-readable structured data for agents\n*/\nvar MigrationToolsError = class extends CliStructuredError {\n\tcategory;\n\tconstructor(code, summary, options) {\n\t\tsuper(code, summary, options);\n\t\tthis.category = \"MIGRATION\";\n\t}\n\tstatic is(error) {\n\t\treturn CliStructuredError.is(error) && \"category\" in error && error.category === \"MIGRATION\" && error.code.startsWith(\"MIGRATION.\");\n\t}\n};\nfunction errorDirectoryExists(dir) {\n\treturn new MigrationToolsError(\"MIGRATION.DIR_EXISTS\", \"Migration directory already exists\", {\n\t\twhy: `The directory \"${dir}\" already exists. Each migration must have a unique directory.`,\n\t\tfix: \"Use --name to pick a different name, or delete the existing directory and re-run.\",\n\t\tmeta: { dir }\n\t});\n}\nfunction errorMissingFile(file, dir) {\n\treturn new MigrationToolsError(\"MIGRATION.FILE_MISSING\", `Missing ${file}`, {\n\t\twhy: `Expected \"${file}\" in \"${dir}\" but the file does not exist.`,\n\t\tfix: reemitHint(dir, \"or delete the directory if the migration is unwanted and the source TypeScript is gone.\"),\n\t\tmeta: {\n\t\t\tfile,\n\t\t\tdir\n\t\t}\n\t});\n}\nfunction errorInvalidJson(filePath, parseError) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_JSON\", \"Invalid JSON in migration file\", {\n\t\twhy: `Failed to parse \"${filePath}\": ${parseError}`,\n\t\tfix: reemitHint(dirname(filePath), \"or restore the directory from version control.\"),\n\t\tmeta: {\n\t\t\tfilePath,\n\t\t\tparseError\n\t\t}\n\t});\n}\nfunction errorInvalidManifest(filePath, reason) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_MANIFEST\", \"Invalid migration manifest\", {\n\t\twhy: `Migration manifest at \"${filePath}\" is invalid: ${reason}`,\n\t\tfix: reemitHint(dirname(filePath), \"or restore the directory from version control.\"),\n\t\tmeta: {\n\t\t\tfilePath,\n\t\t\treason\n\t\t}\n\t});\n}\nfunction errorDescribeMissingEndContract() {\n\treturn new MigrationToolsError(\"MIGRATION.DESCRIBE_INVALID\", \"Migration.describe(): provide endContractJson or override describe() — a migration needs a destination contract hash.\", {\n\t\twhy: \"Migration.describe() was called on a migration that carries no endContractJson and does not override describe(), so no destination contract hash can be derived.\",\n\t\tfix: \"Set endContractJson on the migration, or override describe() to return the { from, to } metadata explicitly.\",\n\t\tmeta: { reason: \"missing-end-contract\" }\n\t});\n}\nfunction errorDescribeInvalidMetadata(summary) {\n\treturn new MigrationToolsError(\"MIGRATION.DESCRIBE_INVALID\", `describe() returned invalid metadata: ${summary}`, {\n\t\twhy: `The migration's describe() returned metadata that failed schema validation: ${summary}.`,\n\t\tfix: \"Ensure describe() returns { from: string | null, to: string } with valid contract hashes.\",\n\t\tmeta: {\n\t\t\treason: \"invalid-metadata\",\n\t\t\tsummary\n\t\t}\n\t});\n}\nfunction errorOperationsNotArray() {\n\treturn new MigrationToolsError(\"MIGRATION.PLAN_NOT_ARRAY\", \"operations must be an array\", {\n\t\twhy: \"The migration instance's `operations` getter returned a non-array value.\",\n\t\tfix: \"Ensure the `operations` getter returns an array of migration operations.\",\n\t\tmeta: {}\n\t});\n}\nfunction errorSpaceHeadRefMissing(spaceId) {\n\treturn new MigrationToolsError(\"MIGRATION.CHECK_HEAD_REF_MISSING\", `Contract space \"${spaceId}\" has no head ref; its contract cannot be resolved from the snapshot store without one.`, {\n\t\twhy: `Contract space \"${spaceId}\" declares no refs/head.json, so there is no hash to resolve its contract against the snapshot store.`,\n\t\tfix: \"Re-emit the contract-space migrations and head-ref artifacts (the extension's contract-space build), or restore refs/head.json from version control.\",\n\t\tmeta: { spaceId }\n\t});\n}\nfunction errorInvalidOperationEntry(index, reason) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_OPERATION_ENTRY\", \"Migration operation entry is malformed\", {\n\t\twhy: `Operation at index ${index} returned by the migration class failed schema validation: ${reason}.`,\n\t\tfix: \"Update the migration class so each entry of `operations` carries `id` (string), `label` (string), and `operationClass` (one of 'additive' | 'widening' | 'destructive' | 'data').\",\n\t\tmeta: {\n\t\t\tindex,\n\t\t\treason\n\t\t}\n\t});\n}\nfunction errorInvalidSlug(slug) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_NAME\", \"Invalid migration name\", {\n\t\twhy: `The slug \"${slug}\" contains no valid characters after sanitization (only a-z, 0-9 are kept).`,\n\t\tfix: \"Provide a name with at least one alphanumeric character, e.g. --name add_users.\",\n\t\tmeta: { slug }\n\t});\n}\nfunction errorInvalidDestName(destName) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_DEST_NAME\", \"Invalid copy destination name\", {\n\t\twhy: `The destination name \"${destName}\" must be a single path segment (no \"..\" or directory separators).`,\n\t\tfix: \"Use a simple file name such as \\\"contract.json\\\" for each destination in the copy list.\",\n\t\tmeta: { destName }\n\t});\n}\nfunction errorInvalidSpaceId(spaceId) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_SPACE_ID\", \"Invalid contract space identifier\", {\n\t\twhy: `The space id \"${spaceId}\" does not match the required pattern /^[a-z][a-z0-9_-]{0,63}$/. Space ids are used as filesystem directory names under \\`migrations/\\`, so the pattern is conservative on purpose.`,\n\t\tfix: \"Pick a lowercase identifier that begins with a letter and contains only lowercase letters, digits, hyphens, or underscores; max 64 characters total.\",\n\t\tmeta: { spaceId }\n\t});\n}\nfunction errorDescriptorHeadHashMismatch(args) {\n\tconst { extensionId, recomputedHash, headRefHash } = args;\n\treturn new MigrationToolsError(\"MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH\", \"Extension descriptor's headRef.hash does not match its contractJson\", {\n\t\twhy: `Extension \"${extensionId}\" publishes a \\`contractSpace\\` whose \\`headRef.hash\\` (${headRefHash}) does not match the canonical hash recomputed from \\`contractSpace.contractJson\\` (${recomputedHash}). This means the extension descriptor was published with stale \\`headRef.hash\\` — typically because the contract was bumped without rerunning the extension's emit pipeline.`,\n\t\tfix: \"Re-run the extension authoring pipeline so `contractJson.storage.storageHash` and `headRef.hash` agree, then republish the extension. If you are the extension author and you intentionally bumped `contractJson`, recompute and update `headRef.hash` (and refresh any on-disk migration metadata that derives from it).\",\n\t\tmeta: {\n\t\t\textensionId,\n\t\t\trecomputedHash,\n\t\t\theadRefHash\n\t\t}\n\t});\n}\nfunction errorDuplicateSpaceId(spaceId) {\n\treturn new MigrationToolsError(\"MIGRATION.DUPLICATE_SPACE_ID\", \"Duplicate contract space identifier\", {\n\t\twhy: `The space id \"${spaceId}\" appears more than once in the per-space planner input. Each space id must be unique across the inputs (the per-space planner emits one output entry per id).`,\n\t\tfix: \"Deduplicate the inputs before passing them to `planAllSpaces` — typically by checking your `extensions` declaration for repeated entries.\",\n\t\tmeta: { spaceId }\n\t});\n}\nfunction errorAmbiguousTarget(branchTips, context) {\n\tconst divergenceInfo = context ? `\\nDivergence point: ${context.divergencePoint}\\nBranches:\\n${context.branches.map((b) => ` → ${b.tip} (${b.edges.length} edge(s): ${b.edges.map((e) => e.dirName).join(\" → \") || \"direct\"})`).join(\"\\n\")}` : \"\";\n\treturn new MigrationToolsError(\"MIGRATION.AMBIGUOUS_TARGET\", \"Ambiguous migration target\", {\n\t\twhy: `The migration history has diverged into multiple branches: ${branchTips.join(\", \")}. This typically happens when two developers plan migrations from the same starting point.${divergenceInfo}`,\n\t\tfix: \"Use `ref set <name> <hash>` to target a specific branch, delete one of the conflicting migration directories and re-run `migration plan`, or use --from <hash> to explicitly select a starting point.\",\n\t\tmeta: {\n\t\t\tbranchTips,\n\t\t\t...context ? {\n\t\t\t\tdivergencePoint: context.divergencePoint,\n\t\t\t\tbranches: context.branches\n\t\t\t} : {}\n\t\t}\n\t});\n}\nfunction errorNoInitialMigration(nodes) {\n\treturn new MigrationToolsError(\"MIGRATION.NO_INITIAL_MIGRATION\", \"No initial migration found\", {\n\t\twhy: `No migration starts from the empty contract state (known hashes: ${nodes.join(\", \")}). At least one migration must originate from the empty state.`,\n\t\tfix: \"Inspect the migrations directory for corrupted migration.json files. At least one migration must start from the empty contract hash.\",\n\t\tmeta: { nodes }\n\t});\n}\nfunction errorInvalidRefFile(filePath, reason) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_REF_FILE\", \"Invalid ref file\", {\n\t\twhy: `Ref file at \"${filePath}\" is invalid: ${reason}`,\n\t\tfix: \"Ensure the ref file contains valid JSON with { \\\"hash\\\": \\\"<64 hex chars>\\\", \\\"invariants\\\": [\\\"...\\\"] }.\",\n\t\tmeta: {\n\t\t\tpath: filePath,\n\t\t\treason\n\t\t}\n\t});\n}\nfunction errorInvalidRefName(refName) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_REF_NAME\", \"Invalid ref name\", {\n\t\twhy: `Ref name \"${refName}\" is invalid. Names must be lowercase alphanumeric with hyphens or forward slashes (no \".\" or \"..\" segments).`,\n\t\tfix: `Use a valid ref name (e.g., \"staging\", \"envs/production\").`,\n\t\tmeta: { refName }\n\t});\n}\nfunction errorNoTarget(reachableHashes) {\n\treturn new MigrationToolsError(\"MIGRATION.NO_TARGET\", \"No migration target could be resolved\", {\n\t\twhy: `The migration history contains cycles and no target can be resolved automatically (reachable hashes: ${reachableHashes.join(\", \")}). This typically happens after rollback migrations (e.g., C1→C2→C1).`,\n\t\tfix: \"Use --from <hash> to specify the planning origin explicitly.\",\n\t\tmeta: { reachableHashes }\n\t});\n}\nfunction errorInvalidRefValue(value) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_REF_VALUE\", \"Invalid ref value\", {\n\t\twhy: `Ref value \"${value}\" is not a valid contract hash. Values must be a 64-character hex digest or \"empty\".`,\n\t\tfix: \"Use a valid storage hash from `prisma-next contract emit` output or an existing migration.\",\n\t\tmeta: { value }\n\t});\n}\nfunction errorInvalidInvariantId(invariantId) {\n\treturn new MigrationToolsError(\"MIGRATION.INVALID_INVARIANT_ID\", \"Invalid invariantId\", {\n\t\twhy: `invariantId ${JSON.stringify(invariantId)} is invalid. Ids must be non-empty and contain no whitespace or control characters (including Unicode whitespace like NBSP); other content (kebab-case, camelCase, namespaced, Unicode letters) is allowed.`,\n\t\tfix: \"Pick an invariantId without spaces, tabs, newlines, or control characters — e.g. \\\"backfill-user-phone\\\", \\\"users/backfill-phone\\\", or \\\"BackfillUserPhone\\\".\",\n\t\tmeta: { invariantId }\n\t});\n}\nfunction errorDuplicateInvariantInEdge(invariantId) {\n\treturn new MigrationToolsError(\"MIGRATION.DUPLICATE_INVARIANT_IN_EDGE\", \"Duplicate invariantId on a single migration\", {\n\t\twhy: `invariantId \"${invariantId}\" is declared by more than one dataTransform on the same migration. The marker stores invariants as a set and the routing layer treats them as edge-level, so two ops cannot share a routing identity.`,\n\t\tfix: \"Rename one of the conflicting dataTransform invariantIds, or drop invariantId on the op that does not need to be routing-visible.\",\n\t\tmeta: { invariantId }\n\t});\n}\nfunction errorProvidedInvariantsMismatch(filePath, stored, derived) {\n\tconst storedSet = new Set(stored);\n\tconst derivedSet = new Set(derived);\n\tconst missing = [...derivedSet].filter((id) => !storedSet.has(id));\n\tconst extra = [...storedSet].filter((id) => !derivedSet.has(id));\n\treturn new MigrationToolsError(\"MIGRATION.PROVIDED_INVARIANTS_MISMATCH\", \"providedInvariants on migration.json disagrees with ops.json\", {\n\t\twhy: missing.length === 0 && extra.length === 0 ? `migration.json at \"${filePath}\" stores providedInvariants ${JSON.stringify(stored)}, but the canonical value derived from ops.json is ${JSON.stringify(derived)} — same ids, different order. Canonical providedInvariants is sorted ascending.` : `migration.json at \"${filePath}\" stores providedInvariants ${JSON.stringify(stored)}, but the value derived from ops.json is ${JSON.stringify(derived)}. The manifest copy was likely hand-edited without re-emitting.`,\n\t\tfix: reemitHint(dirname(filePath), \"or restore the directory from version control.\"),\n\t\tmeta: {\n\t\t\tfilePath,\n\t\t\tstored,\n\t\t\tderived,\n\t\t\tdifference: {\n\t\t\t\tmissing,\n\t\t\t\textra\n\t\t\t}\n\t\t}\n\t});\n}\nfunction errorNoInvariantPath(args) {\n\tconst { refName, required, missing, structuralPath } = args;\n\tconst refClause = refName ? `Ref \"${refName}\"` : \"Target\";\n\tconst missingList = missing.map((id) => JSON.stringify(id)).join(\", \");\n\treturn new MigrationToolsError(\"MIGRATION.NO_INVARIANT_PATH\", \"No path covers the required invariants\", {\n\t\twhy: `${refClause} requires invariants the reachable path doesn't cover. required=[${required.map((id) => JSON.stringify(id)).join(\", \")}], missing=[${missingList}].`,\n\t\tfix: \"Add a migration on the path that runs `dataTransform({ invariantId: \\\"<id>\\\", … })` for each missing invariant, or retarget the ref to a hash whose path already provides them.\",\n\t\tmeta: {\n\t\t\trequired,\n\t\t\tmissing,\n\t\t\tstructuralPath,\n\t\t\t...ifDefined(\"refName\", refName)\n\t\t}\n\t});\n}\nfunction errorUnknownInvariant(args) {\n\tconst { refName, unknown, declared } = args;\n\treturn new MigrationToolsError(\"MIGRATION.UNKNOWN_INVARIANT\", \"Ref declares invariants no migration in the graph provides\", {\n\t\twhy: `${refName ? `Ref \"${refName}\" declares` : \"Declares\"} invariants no migration in the graph provides. unknown=[${unknown.map((id) => JSON.stringify(id)).join(\", \")}].`,\n\t\tfix: \"Either the ref has a typo, or the declaring migration has not been authored/attested yet. Re-check the ref file and the migrations directory.\",\n\t\tmeta: {\n\t\t\tunknown,\n\t\t\tdeclared,\n\t\t\t...ifDefined(\"refName\", refName)\n\t\t}\n\t});\n}\nfunction errorMigrationHashMismatch(dir, storedHash, computedHash) {\n\treturn new MigrationToolsError(\"MIGRATION.HASH_MISMATCH\", \"Migration package is corrupt\", {\n\t\twhy: `Stored migrationHash \"${storedHash}\" does not match the recomputed hash \"${computedHash}\" for \"${relative(process.cwd(), dir)}\". The migration.json or ops.json has been edited or partially written since emit.`,\n\t\tfix: reemitHint(dir, \"or restore the directory from version control.\"),\n\t\tmeta: {\n\t\t\tdir,\n\t\t\tstoredHash,\n\t\t\tcomputedHash\n\t\t}\n\t});\n}\n/**\n* A ref name that resolves to nothing: no pointer file named `refName`\n* exists, and the hash being resolved (the `contractAt` argument, used as a\n* fallback when the pointer is absent) is not a node in the migration graph\n* either. There is no contract to materialize.\n*/\nfunction errorRefNotResolvable(refName) {\n\treturn new MigrationToolsError(\"MIGRATION.REF_NOT_RESOLVABLE\", `Ref \"${refName}\" is not resolvable`, {\n\t\twhy: `Ref \"${refName}\" has no pointer file, and the hash being resolved is not a node in the migration graph either — there is nothing to materialize a contract from.`,\n\t\tfix: `Create the ref with \"prisma-next ref set ${refName} <hash>\" (or advance it via \"prisma-next db update --advance-ref ${refName}\"), or pass a hash that is a node in the migration graph.`,\n\t\tmeta: {\n\t\t\trefName,\n\t\t\tidentifier: refName\n\t\t}\n\t});\n}\nfunction errorBundleNotFoundForGraphNode(hash, explicitLabel) {\n\treturn new MigrationToolsError(\"MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE\", explicitLabel ? `No migration bundle found for reference \"${explicitLabel}\" (resolved hash: ${hash})` : `No migration bundle found for graph node ${hash}`, {\n\t\twhy: `The hash ${hash} is a graph node but no on-disk migration package has a destination (\\`to\\`) hash matching it.`,\n\t\tfix: \"Provide a ref or hash that corresponds to an existing migration package, or run `migration list` to see available migrations.\",\n\t\tmeta: {\n\t\t\thash,\n\t\t\t...explicitLabel ? { explicitLabel } : {}\n\t\t}\n\t});\n}\nfunction errorContractDeserializationFailed(filePath, message, options) {\n\treturn new MigrationToolsError(\"MIGRATION.CONTRACT_DESERIALIZATION_FAILED\", \"Contract failed to deserialize\", {\n\t\twhy: `Contract at \"${filePath}\" failed to deserialize: ${message}`,\n\t\tfix: reemitHint(dirname(filePath), \"or restore the directory from version control.\"),\n\t\tmeta: {\n\t\t\tfilePath,\n\t\t\tmessage\n\t\t},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\nfunction errorHashNotInGraph(hash, graph) {\n\tconst reachableHashes = [...graph.nodes].sort();\n\tconst reachableList = reachableHashes.length > 0 ? reachableHashes.join(\", \") : \"(none)\";\n\treturn new MigrationToolsError(\"MIGRATION.HASH_NOT_IN_GRAPH\", `Hash \"${hash}\" is not a node in the migration graph`, {\n\t\twhy: `The migration graph contains nodes ${reachableList}; \"${hash}\" isn't one of them.`,\n\t\tfix: `Pass a hash that's the from-or-to of an on-disk migration bundle, use --from with a graph-node hash, or run \"prisma-next migration plan\" to introduce it.`,\n\t\tmeta: {\n\t\t\thash,\n\t\t\treachableHashes\n\t\t}\n\t});\n}\nfunction errorContractSnapshotMissing(storageHash, expectedPath) {\n\treturn new MigrationToolsError(\"MIGRATION.CONTRACT_SNAPSHOT_MISSING\", \"Contract snapshot is missing\", {\n\t\twhy: `Expected a contract snapshot for ${storageHash} at \"${expectedPath}\" but the file does not exist.`,\n\t\tfix: \"Re-emit the contract snapshot by re-running the command that authored the migration referencing this hash (`prisma-next migration plan` for app-space migrations; the extension's contract-space build for extension spaces), or restore migrations/snapshots/ from version control.\",\n\t\tmeta: {\n\t\t\tstorageHash,\n\t\t\texpectedPath\n\t\t}\n\t});\n}\nfunction errorContractSnapshotHashMismatch(storageHash, actualHash, dir) {\n\treturn new MigrationToolsError(\"MIGRATION.CONTRACT_SNAPSHOT_HASH_MISMATCH\", \"Contract snapshot hash mismatch\", {\n\t\twhy: `The contract JSON's inner storage.storageHash (\"${actualHash}\") does not match the requested storage hash (\"${storageHash}\") for snapshot directory \"${dir}\".`,\n\t\tfix: \"Pass a contractJson whose storage.storageHash equals the storageHash argument passed to writeContractSnapshot — the two must agree by construction.\",\n\t\tmeta: {\n\t\t\tstorageHash,\n\t\t\tactualHash,\n\t\t\tdir\n\t\t}\n\t});\n}\nfunction errorMigrationContractViewMissing(className, accessor, jsonField) {\n\treturn new MigrationToolsError(\"MIGRATION.CONTRACT_VIEW_MISSING\", `${className}.${accessor} requires ${jsonField}`, {\n\t\twhy: `${className}.${accessor} was read, but this instance has no ${jsonField} to build the view from.`,\n\t\tfix: `Set ${jsonField} to the migration's committed contract JSON, or avoid reading ${accessor} on a migration that overrides describe() and carries no contract.`,\n\t\tmeta: {\n\t\t\tclassName,\n\t\t\taccessor,\n\t\t\tjsonField\n\t\t}\n\t});\n}\n//#endregion\nexport { errorOperationsNotArray as A, errorInvalidSpaceId as C, errorNoInitialMigration as D, errorMissingFile as E, errorRefNotResolvable as M, errorSpaceHeadRefMissing as N, errorNoInvariantPath as O, errorUnknownInvariant as P, errorInvalidSlug as S, errorMigrationHashMismatch as T, errorInvalidManifest as _, errorContractSnapshotHashMismatch as a, errorInvalidRefName as b, errorDescribeMissingEndContract as c, errorDuplicateInvariantInEdge as d, errorDuplicateSpaceId as f, errorInvalidJson as g, errorInvalidInvariantId as h, errorContractDeserializationFailed as i, errorProvidedInvariantsMismatch as j, errorNoTarget as k, errorDescriptorHeadHashMismatch as l, errorInvalidDestName as m, errorAmbiguousTarget as n, errorContractSnapshotMissing as o, errorHashNotInGraph as p, errorBundleNotFoundForGraphNode as r, errorDescribeInvalidMetadata as s, MigrationToolsError as t, errorDirectoryExists as u, errorInvalidOperationEntry as v, errorMigrationContractViewMissing as w, errorInvalidRefValue as x, errorInvalidRefFile as y };\n\n//# sourceMappingURL=errors-Co-8oaiB.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,WAAW,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AAkC,WAAW,UAAU,WAAW;CAC1E,OAAO,IAAI,oBAAoB,mCAAmC,GAAG,UAAU,GAAG,SAAS,YAAY,aAAa;EACnH,KAAK,GAAG,UAAU,GAAG,SAAS,sCAAsC,UAAU;EAC9E,KAAK,OAAO,UAAU,gEAAgE,SAAS;EAC/F,MAAM;GACL;GACA;GACA;EACD;CACD,CAAC;AACF"}
@@ -1,3 +1,4 @@
1
+ import { CliStructuredError } from "@prisma/orm-framework/errors/control";
1
2
  //#region ../../../1-framework/3-tooling/migration/dist/exports/errors.d.mts
2
3
  //#region src/errors.d.ts
3
4
  /**
@@ -14,18 +15,18 @@
14
15
  * - category: Always 'MIGRATION'
15
16
  * - why: Explains the cause in plain language
16
17
  * - fix: Actionable remediation step
17
- * - details: Machine-readable structured data for agents
18
+ * - meta: Machine-readable structured data for agents
18
19
  */
19
- declare class MigrationToolsError extends Error {
20
- readonly code: string;
21
- readonly category: "MIGRATION";
20
+ declare class MigrationToolsError extends CliStructuredError {
21
+ readonly category: 'MIGRATION';
22
+ readonly code: `MIGRATION.${string}`;
22
23
  readonly why: string;
23
24
  readonly fix: string;
24
- readonly details: Record<string, unknown> | undefined;
25
- constructor(code: string, summary: string, options: {
25
+ constructor(code: `MIGRATION.${string}`, summary: string, options: {
26
26
  readonly why: string;
27
27
  readonly fix: string;
28
- readonly details?: Record<string, unknown>;
28
+ readonly meta?: Record<string, unknown>;
29
+ readonly cause?: unknown;
29
30
  });
30
31
  static is(error: unknown): error is MigrationToolsError;
31
32
  }
@@ -65,8 +66,11 @@ declare function errorUnknownInvariant(args: {
65
66
  readonly unknown: readonly string[];
66
67
  readonly declared: readonly string[];
67
68
  }): MigrationToolsError;
69
+ declare function errorContractDeserializationFailed(filePath: string, message: string, options?: {
70
+ readonly cause?: unknown;
71
+ }): MigrationToolsError;
68
72
  declare function errorContractSnapshotMissing(storageHash: string, expectedPath: string): MigrationToolsError;
69
73
  declare function errorContractSnapshotHashMismatch(storageHash: string, actualHash: string, dir: string): MigrationToolsError;
70
74
  //#endregion
71
- export { errorDescriptorHeadHashMismatch as a, errorNoInvariantPath as c, errorContractSnapshotMissing as i, errorUnknownInvariant as l, NoInvariantPathStructuralEdge as n, errorInvalidJson as o, errorContractSnapshotHashMismatch as r, errorInvalidRefName as s, MigrationToolsError as t };
72
- //# sourceMappingURL=errors--qsXZUtL.d.mts.map
75
+ export { errorContractSnapshotMissing as a, errorInvalidRefName as c, errorContractSnapshotHashMismatch as i, errorNoInvariantPath as l, NoInvariantPathStructuralEdge as n, errorDescriptorHeadHashMismatch as o, errorContractDeserializationFailed as r, errorInvalidJson as s, MigrationToolsError as t, errorUnknownInvariant as u };
76
+ //# sourceMappingURL=errors-NRmFpwR1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-NRmFpwR1.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/errors.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;cAkBc,4BAA4B;WAC/B;WACA;WACA;WACA;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA,OAAO;aACP;;SAEJ,GAAG,iBAAiB,SAAS;;iBAErB,iBAAiB,kBAAkB,qBAAqB;iBACxD,gCAAgC;WACtC;WACA;WACA;IACP;iBACa,oBAAoB,kBAAkB;;;;;;;;;;;;UAY7C;WACC;WACA;WACA;WACA;WACA;;iBAEM,qBAAqB;WAC3B;WACA;WACA;WACA,yBAAyB;IAChC;iBACa,sBAAsB;WAC5B;WACA;WACA;IACP;iBACa,mCAAmC,kBAAkB,iBAAiB;WAC5E;IACP;iBACa,6BAA6B,qBAAqB,uBAAuB;iBACzE,kCAAkC,qBAAqB,oBAAoB,cAAc"}
@@ -1,4 +1,4 @@
1
- import { N as errorUnexpected, O as errorRuntime$1, W as formatStyledHeader, ct as setCommandExamples, o as createTerminalUI, q as handleResult, r as addGlobalOptions, st as setCommandDescriptions, t as CliStructuredError$1, tt as parseGlobalFlagsOrExit } from "./command-helpers-CAoXqAY9-DWUBcTXM.mjs";
1
+ import { N as errorUnexpected, O as errorRuntime$1, W as formatStyledHeader, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
3
3
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
4
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
@@ -8,7 +8,7 @@ import { isStructuredError } from "@prisma/orm-framework/utils/structured-error"
8
8
  import { Command } from "commander";
9
9
  import { EOL } from "node:os";
10
10
  import { format } from "@prisma/orm-framework/psl-parser/format";
11
- //#region ../../../1-framework/3-tooling/cli/dist/format-ByDm2goZ.mjs
11
+ //#region ../../../1-framework/3-tooling/cli/dist/format-Bw3LVJ1v.mjs
12
12
  function resolveNewline(formatterNewline, eol) {
13
13
  if (formatterNewline !== void 0) return formatterNewline;
14
14
  return eol === "\r\n" ? "CRLF" : "LF";
@@ -30,9 +30,10 @@ async function executeFormat(options) {
30
30
  try {
31
31
  contents = await readFile(inputPath, "utf-8");
32
32
  } catch (error) {
33
- return notOk(errorRuntime$1("Failed to read contract source file", {
33
+ return notOk(errorRuntime$1("CONTRACT.SOURCE_LOAD_FAILED", "Failed to read contract source file", {
34
34
  why: error instanceof Error ? error.message : String(error),
35
- fix: `Check that ${inputPath} exists and is readable.`
35
+ fix: `Check that ${inputPath} exists and is readable.`,
36
+ cause: error
36
37
  }));
37
38
  }
38
39
  const formatOptions = {
@@ -43,19 +44,21 @@ async function executeFormat(options) {
43
44
  try {
44
45
  formatted = format(contents, formatOptions);
45
46
  } catch (error) {
46
- if (isStructuredError(error) && error.code === "PSL.PARSE_FAILED") return notOk(errorRuntime$1("Cannot format PSL with parse errors", {
47
+ if (isStructuredError(error) && error.code === "PSL.PARSE_FAILED") return notOk(errorRuntime$1("PSL.PARSE_FAILED", "Cannot format PSL with parse errors", {
47
48
  why: error.message,
48
49
  fix: "Fix the parse errors in your schema and try again.",
49
- meta: { diagnostics: error.meta?.["diagnostics"] }
50
+ meta: { diagnostics: error.meta?.["diagnostics"] },
51
+ cause: error
50
52
  }));
51
53
  return notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));
52
54
  }
53
55
  try {
54
56
  await writeFile(inputPath, formatted, "utf-8");
55
57
  } catch (error) {
56
- return notOk(errorRuntime$1("Failed to write formatted contract source file", {
58
+ return notOk(errorRuntime$1("CLI.FILE_WRITE_FAILED", "Failed to write formatted contract source file", {
57
59
  why: error instanceof Error ? error.message : String(error),
58
- fix: `Check that ${inputPath} is writable.`
60
+ fix: `Check that ${inputPath} is writable.`,
61
+ cause: error
59
62
  }));
60
63
  }
61
64
  return ok({
@@ -98,4 +101,4 @@ function createFormatCommand() {
98
101
  //#endregion
99
102
  export { createFormatCommand as t };
100
103
 
101
- //# sourceMappingURL=format-ByDm2goZ-BIRlFoo6.mjs.map
104
+ //# sourceMappingURL=format-Bw3LVJ1v-BJ6lVFMA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-Bw3LVJ1v-BJ6lVFMA.mjs","names":["CliStructuredError","errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/format-Bw3LVJ1v.mjs"],"sourcesContent":["import { A as formatStyledHeader, F as CliStructuredError, _ as createTerminalUI, ct as errorUnexpected, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, rt as errorRuntime, t as addGlobalOptions, u as setCommandExamples, y as handleResult } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { EOL } from \"node:os\";\nimport { format } from \"@internal/psl-parser/format\";\n//#region src/control-api/operations/format.ts\nfunction resolveNewline(formatterNewline, eol) {\n\tif (formatterNewline !== void 0) return formatterNewline;\n\treturn eol === \"\\r\\n\" ? \"CRLF\" : \"LF\";\n}\nasync function executeFormat(options) {\n\tconst eol = options.eol ?? EOL;\n\tlet config;\n\ttry {\n\t\tconfig = await loadConfig(options.configPath);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\tconst source = config.contract?.source;\n\tif (source?.format !== \"psl\") return ok({ formatted: false });\n\tconst inputPath = source.inputs?.[0];\n\tif (inputPath === void 0) return ok({ formatted: false });\n\tlet contents;\n\ttry {\n\t\tcontents = await readFile(inputPath, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CONTRACT.SOURCE_LOAD_FAILED\", \"Failed to read contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} exists and is readable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst formatOptions = {\n\t\tindent: config.formatter?.indent ?? 2,\n\t\tnewline: resolveNewline(config.formatter?.newline, eol)\n\t};\n\tlet formatted;\n\ttry {\n\t\tformatted = format(contents, formatOptions);\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"PSL.PARSE_FAILED\") return notOk(errorRuntime(\"PSL.PARSE_FAILED\", \"Cannot format PSL with parse errors\", {\n\t\t\twhy: error.message,\n\t\t\tfix: \"Fix the parse errors in your schema and try again.\",\n\t\t\tmeta: { diagnostics: error.meta?.[\"diagnostics\"] },\n\t\t\tcause: error\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\ttry {\n\t\tawait writeFile(inputPath, formatted, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CLI.FILE_WRITE_FAILED\", \"Failed to write formatted contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} is writable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\treturn ok({\n\t\tformatted: true,\n\t\tpath: inputPath\n\t});\n}\n//#endregion\n//#region src/commands/format.ts\nfunction createFormatCommand() {\n\tconst command = new Command(\"format\");\n\tsetCommandDescriptions(command, \"Format your PSL contract source\", \"Formats the Prisma schema (PSL) contract source declared in your config\\n(contract.source.inputs[0]) in place. Only runs when contract.source.format\\nis 'psl'; a TypeScript or unset source is left untouched. Indent and newline are\\nread from the optional formatter config section, defaulting to two spaces and the\\nsystem newline.\");\n\tsetCommandExamples(command, [\"prisma-next format\", \"prisma-next format --config ./custom-config.ts\"]);\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\tif (!flags.json && !flags.quiet) {\n\t\t\tconst displayConfigPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\t\t\tui.stderr(formatStyledHeader({\n\t\t\t\tcommand: \"format\",\n\t\t\t\tdescription: \"Format your PSL contract source\",\n\t\t\t\tdetails: [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: displayConfigPath\n\t\t\t\t}],\n\t\t\t\tflags\n\t\t\t}));\n\t\t}\n\t\tconst exitCode = handleResult(await executeFormat({ ...ifDefined(\"configPath\", options.config) }), flags, ui, (value) => {\n\t\t\tif (flags.json) {\n\t\t\t\tui.output(JSON.stringify(value));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (flags.quiet) return;\n\t\t\tif (value.formatted) ui.success(`Formatted ${relative(process.cwd(), value.path ?? \"\")}`);\n\t\t\telse ui.info(\"Nothing to format (contract source is not PSL).\");\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createFormatCommand as t };\n\n//# sourceMappingURL=format-Bw3LVJ1v.mj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D,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -1,6 +1,6 @@
1
- import { l as errorConfigValidation } from "./command-helpers-CAoXqAY9-DWUBcTXM.mjs";
1
+ import { l as errorConfigValidation } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import "@prisma/orm-framework/components/components";
3
- //#region ../../../1-framework/3-tooling/cli/dist/framework-components-CjshQKHA.mjs
3
+ //#region ../../../1-framework/3-tooling/cli/dist/framework-components-3DdB31mk.mjs
4
4
  /**
5
5
  * Asserts that all framework components are compatible with the expected family and target.
6
6
  *
@@ -55,4 +55,4 @@ function assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId,
55
55
  //#endregion
56
56
  export { assertFrameworkComponentsCompatible as t };
57
57
 
58
- //# sourceMappingURL=framework-components-CjshQKHA-Dlp6Leo5.mjs.map
58
+ //# sourceMappingURL=framework-components-3DdB31mk-BHyX-OlJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"framework-components-CjshQKHA-Dlp6Leo5.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-CjshQKHA.mjs"],"sourcesContent":["import { R as errorConfigValidation } from \"./command-helpers-CAoXqAY9.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via `validateConfig()`) and compile-time type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const config = await loadConfig();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-CjshQKHA.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"framework-components-3DdB31mk-BHyX-OlJ.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-3DdB31mk.mjs"],"sourcesContent":["import { R as errorConfigValidation } from \"./command-helpers-C4WpR-QE.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via `validateConfig()`) and compile-time type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const config = await loadConfig();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-3DdB31mk.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
@@ -1,5 +1,5 @@
1
- import { p as errorHashNotInGraph } from "./errors-IpZm1Skp-BH495dRd.mjs";
2
- //#region ../../../1-framework/3-tooling/migration/dist/graph-membership-DW6nnbyQ.mjs
1
+ import { p as errorHashNotInGraph } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
+ //#region ../../../1-framework/3-tooling/migration/dist/graph-membership-BEmNEMtP.mjs
3
3
  function isGraphNode(hash, graph) {
4
4
  if (hash === "empty") return true;
5
5
  return graph.nodes.has(hash);
@@ -11,4 +11,4 @@ function assertHashIsGraphNode(hash, graph) {
11
11
  //#endregion
12
12
  export { isGraphNode as n, assertHashIsGraphNode as t };
13
13
 
14
- //# sourceMappingURL=graph-membership-DW6nnbyQ-Bp2KcVwR.mjs.map
14
+ //# sourceMappingURL=graph-membership-BEmNEMtP-rz61CLM5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-membership-DW6nnbyQ-Bp2KcVwR.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/graph-membership-DW6nnbyQ.mjs"],"sourcesContent":["import { p as errorHashNotInGraph } from \"./errors-IpZm1Skp.mjs\";\nimport \"./constants-CM-w38DQ.mjs\";\n//#region src/graph-membership.ts\nfunction isGraphNode(hash, graph) {\n\tif (hash === \"empty\") return true;\n\treturn graph.nodes.has(hash);\n}\nfunction assertHashIsGraphNode(hash, graph) {\n\tif (isGraphNode(hash, graph)) return;\n\tthrow errorHashNotInGraph(hash, graph);\n}\n//#endregion\nexport { isGraphNode as n, assertHashIsGraphNode as t };\n\n//# sourceMappingURL=graph-membership-DW6nnbyQ.mjs.map"],"mappings":";;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO,MAAM,MAAM,IAAI,IAAI;AAC5B;AACA,SAAS,sBAAsB,MAAM,OAAO;CAC3C,IAAI,YAAY,MAAM,KAAK,GAAG;CAC9B,MAAM,oBAAoB,MAAM,KAAK;AACtC"}
1
+ {"version":3,"file":"graph-membership-BEmNEMtP-rz61CLM5.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/graph-membership-BEmNEMtP.mjs"],"sourcesContent":["import { p as errorHashNotInGraph } from \"./errors-Co-8oaiB.mjs\";\nimport \"./constants-CM-w38DQ.mjs\";\n//#region src/graph-membership.ts\nfunction isGraphNode(hash, graph) {\n\tif (hash === \"empty\") return true;\n\treturn graph.nodes.has(hash);\n}\nfunction assertHashIsGraphNode(hash, graph) {\n\tif (isGraphNode(hash, graph)) return;\n\tthrow errorHashNotInGraph(hash, graph);\n}\n//#endregion\nexport { isGraphNode as n, assertHashIsGraphNode as t };\n\n//# sourceMappingURL=graph-membership-BEmNEMtP.mjs.map"],"mappings":";;AAGA,SAAS,YAAY,MAAM,OAAO;CACjC,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO,MAAM,MAAM,IAAI,IAAI;AAC5B;AACA,SAAS,sBAAsB,MAAM,OAAO;CAC3C,IAAI,YAAY,MAAM,KAAK,GAAG;CAC9B,MAAM,oBAAoB,MAAM,KAAK;AACtC"}