@prisma/orm-toolchain 8.0.0-rc.1-dev.22 → 8.0.0-rc.1-dev.24

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 (242) hide show
  1. package/dist/{aggregate-D53gnb7v.mjs → aggregate-BKbHUHLA.mjs} +7 -7
  2. package/dist/{aggregate-D53gnb7v.mjs.map → aggregate-BKbHUHLA.mjs.map} +1 -1
  3. package/dist/{aggregate-BflrjWPO.d.mts → aggregate-CA6bJ8UO.d.mts} +3 -3
  4. package/dist/{aggregate-BflrjWPO.d.mts.map → aggregate-CA6bJ8UO.d.mts.map} +1 -1
  5. package/dist/bin__prisma-next.mjs +31 -26
  6. package/dist/bin__prisma-next.mjs.map +1 -1
  7. package/dist/{caught-errors-D7Qznyrm-BzYooF6H.mjs → caught-errors-nYuTn3NK-DkD-ZrDr.mjs} +3 -3
  8. package/dist/caught-errors-nYuTn3NK-DkD-ZrDr.mjs.map +1 -0
  9. package/dist/{cli-errors-CDr3WcJP-NFry5GHb.d.mts → cli-errors-C7vbvQuK-DLpSxz4U.d.mts} +16 -8
  10. package/dist/{cli-errors-CDr3WcJP-NFry5GHb.d.mts.map → cli-errors-C7vbvQuK-DLpSxz4U.d.mts.map} +1 -1
  11. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs +235 -0
  12. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs.map +1 -0
  13. package/dist/cli-telemetry.mjs +7 -6
  14. package/dist/cli-telemetry.mjs.map +1 -1
  15. package/dist/cli.d.mts +38 -2
  16. package/dist/cli.d.mts.map +1 -1
  17. package/dist/cli.mjs +358 -5
  18. package/dist/cli.mjs.map +1 -1
  19. package/dist/cli__commands__contract-emit.d.mts +1 -1
  20. package/dist/cli__commands__contract-emit.mjs +1 -1
  21. package/dist/cli__commands__contract-infer.mjs +1 -1
  22. package/dist/cli__commands__db-init.mjs +1 -1
  23. package/dist/cli__commands__db-schema.mjs +1 -1
  24. package/dist/cli__commands__db-sign.mjs +1 -1
  25. package/dist/cli__commands__db-update.mjs +1 -1
  26. package/dist/cli__commands__db-verify.mjs +1 -1
  27. package/dist/cli__commands__migrate.d.mts +2 -2
  28. package/dist/cli__commands__migrate.mjs +1 -1
  29. package/dist/cli__commands__migration-check.mjs +1 -1
  30. package/dist/cli__commands__migration-graph.d.mts +1 -1
  31. package/dist/cli__commands__migration-graph.mjs +1 -1
  32. package/dist/cli__commands__migration-list.d.mts +2 -2
  33. package/dist/cli__commands__migration-list.mjs +1 -1
  34. package/dist/cli__commands__migration-log.d.mts +1 -1
  35. package/dist/cli__commands__migration-log.mjs +1 -1
  36. package/dist/cli__commands__migration-new.mjs +1 -1
  37. package/dist/cli__commands__migration-plan.d.mts +1 -1
  38. package/dist/cli__commands__migration-plan.mjs +1 -1
  39. package/dist/cli__commands__migration-show.mjs +1 -1
  40. package/dist/cli__commands__migration-status.d.mts +1 -1
  41. package/dist/cli__commands__migration-status.mjs +1 -1
  42. package/dist/cli__commands__ref.mjs +1 -1
  43. package/dist/cli__commands__telemetry.mjs +1 -1
  44. package/dist/cli__control-api.d.mts +26 -19
  45. package/dist/cli__control-api.d.mts.map +1 -1
  46. package/dist/cli__control-api.mjs +16 -16
  47. package/dist/cli__control-api__testing.d.mts +66 -0
  48. package/dist/cli__control-api__testing.d.mts.map +1 -0
  49. package/dist/cli__control-api__testing.mjs +255 -0
  50. package/dist/cli__control-api__testing.mjs.map +1 -0
  51. package/dist/cli__migration-cli.mjs +16 -7
  52. package/dist/cli__migration-cli.mjs.map +1 -1
  53. package/dist/{client-Y6qbDk7X-BzKLmBZo.mjs → client-milNsAnF-B92uF3yv.mjs} +11 -11
  54. package/dist/client-milNsAnF-B92uF3yv.mjs.map +1 -0
  55. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs +765 -0
  56. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs.map +1 -0
  57. package/dist/config-loader.d.mts +2 -2
  58. package/dist/config-loader.mjs +2 -2
  59. package/dist/{contract-at-errors-Dv1mxKYO-C29YB4RC.mjs → contract-at-errors-BTeDEXm4-BAIDia2-.mjs} +3 -3
  60. package/dist/contract-at-errors-BTeDEXm4-BAIDia2-.mjs.map +1 -0
  61. package/dist/{contract-emit-CTm2zfuG-7PV9SBY6.mjs → contract-emit-Bdf4DAR4-lKqkbfZT.mjs} +8 -38
  62. package/dist/contract-emit-Bdf4DAR4-lKqkbfZT.mjs.map +1 -0
  63. package/dist/{contract-emit-D8IXP9Qp-Df6NwXn8.mjs → contract-emit-Ci-8sP-b-QzQXK2xQ.mjs} +29 -23
  64. package/dist/contract-emit-Ci-8sP-b-QzQXK2xQ.mjs.map +1 -0
  65. package/dist/{contract-emit-B65_UiFn.d.mts → contract-emit-CvwNE4R1-DEn1V1Zo.d.mts} +2 -2
  66. package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts.map +1 -0
  67. package/dist/contract-emit-E6m8HE42-Bfiodzf_.mjs +2 -0
  68. package/dist/{contract-infer-BwT7ngoo-Dx6aAwIN.mjs → contract-infer-hhyMJiwS-BJ5cYC9P.mjs} +7 -6
  69. package/dist/contract-infer-hhyMJiwS-BJ5cYC9P.mjs.map +1 -0
  70. package/dist/{contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs → contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs} +7 -7
  71. package/dist/contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs.map +1 -0
  72. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs} +2 -2
  73. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs.map} +1 -1
  74. package/dist/{contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs → contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs} +7 -6
  75. package/dist/contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs.map +1 -0
  76. package/dist/{db-init-CBj_EWg3.mjs → db-init-3CbSYxRI-BlTkWh8n.mjs} +10 -8
  77. package/dist/db-init-3CbSYxRI-BlTkWh8n.mjs.map +1 -0
  78. package/dist/{db-schema-BWpeh0Q_.mjs → db-schema-BVLbe3EL-WLnbuo77.mjs} +6 -5
  79. package/dist/db-schema-BVLbe3EL-WLnbuo77.mjs.map +1 -0
  80. package/dist/{db-sign-DCb_DKtv.mjs → db-sign-Cdw2RmoG-C-X5UheR.mjs} +24 -11
  81. package/dist/db-sign-Cdw2RmoG-C-X5UheR.mjs.map +1 -0
  82. package/dist/{db-update-WX0KitcX.mjs → db-update-BHOdo8PV-BVBNKrJc.mjs} +11 -9
  83. package/dist/db-update-BHOdo8PV-BVBNKrJc.mjs.map +1 -0
  84. package/dist/{db-verify-B8ax2Y_x-Bp4s5Ra6.mjs → db-verify-C9P9oNCs-gieY7hV2.mjs} +33 -16
  85. package/dist/db-verify-C9P9oNCs-gieY7hV2.mjs.map +1 -0
  86. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs} +2 -2
  87. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs.map → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map} +1 -1
  88. package/dist/emitter.d.mts +1 -1
  89. package/dist/emitter.mjs +2 -2
  90. package/dist/emitter__domain-type-generation.mjs +1 -1
  91. package/dist/{exports-BCLg4CiV-okAfZydo.mjs → exports-BCLg4CiV-05kuwcb0.mjs} +4 -4
  92. package/dist/{exports-BCLg4CiV-okAfZydo.mjs.map → exports-BCLg4CiV-05kuwcb0.mjs.map} +1 -1
  93. package/dist/exports-BZLNbtkY.mjs +215 -0
  94. package/dist/exports-BZLNbtkY.mjs.map +1 -0
  95. package/dist/{exports-BN0vFTxG.mjs → exports-CqNUihkI.mjs} +2 -2
  96. package/dist/{exports-BN0vFTxG.mjs.map → exports-CqNUihkI.mjs.map} +1 -1
  97. package/dist/{exports-BnihzVhw.mjs → exports-DaxzMVtq.mjs} +16 -4
  98. package/dist/exports-DaxzMVtq.mjs.map +1 -0
  99. package/dist/{format-Bw3LVJ1v-BJ6lVFMA.mjs → format-Ddhz7xFW-Bo1nhay8.mjs} +18 -15
  100. package/dist/format-Ddhz7xFW-Bo1nhay8.mjs.map +1 -0
  101. package/dist/{framework-components-3DdB31mk-BHyX-OlJ.mjs → framework-components-Cruf6BPK-CaQvMI3T.mjs} +7 -5
  102. package/dist/framework-components-Cruf6BPK-CaQvMI3T.mjs.map +1 -0
  103. package/dist/index-mCsi_ND5.d.mts +49 -0
  104. package/dist/index-mCsi_ND5.d.mts.map +1 -0
  105. package/dist/{init-CPB89WK2-DPZRZ9Ee.mjs → init-BbmawfZx-DCylULYh.mjs} +23 -8
  106. package/dist/init-BbmawfZx-DCylULYh.mjs.map +1 -0
  107. package/dist/{inspect-live-schema-Da76TWOs-CAFqkhGb.mjs → inspect-live-schema-BEQun_1x-CZpCgg8A.mjs} +17 -13
  108. package/dist/inspect-live-schema-BEQun_1x-CZpCgg8A.mjs.map +1 -0
  109. package/dist/{invariants-BzYfO9IL-BXTvx0z9.mjs → invariants-D5TNnX5E-rjPoJGFq.mjs} +4 -3
  110. package/dist/invariants-D5TNnX5E-rjPoJGFq.mjs.map +1 -0
  111. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs → io-CHUUeHh0-CbyTkKP6.mjs} +2 -2
  112. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs.map → io-CHUUeHh0-CbyTkKP6.mjs.map} +1 -1
  113. package/dist/{legend-5iwwlLU2-CB8bdQKJ.mjs → legend-BBtAETiW-BHqTbUjx.mjs} +3 -3
  114. package/dist/legend-BBtAETiW-BHqTbUjx.mjs.map +1 -0
  115. package/dist/{migrate-B-NAuO90.mjs → migrate-B-hpVTxi-DJzFYT2w.mjs} +44 -17
  116. package/dist/migrate-B-hpVTxi-DJzFYT2w.mjs.map +1 -0
  117. package/dist/{migrate-show-B2LkXkoB-D1ZNl84C.mjs → migrate-show-CUymfnbM-BbpcO2FY.mjs} +9 -12
  118. package/dist/migrate-show-CUymfnbM-BbpcO2FY.mjs.map +1 -0
  119. package/dist/{migrate-show-60NNqVia-oGqMaVA9.d.mts → migrate-show-g71Z4vJw-ocdTvf70.d.mts} +10 -5
  120. package/dist/migrate-show-g71Z4vJw-ocdTvf70.d.mts.map +1 -0
  121. package/dist/{migration-DAJY-NmR.mjs → migration-_C5W2uXF.mjs} +2 -2
  122. package/dist/{migration-DAJY-NmR.mjs.map → migration-_C5W2uXF.mjs.map} +1 -1
  123. package/dist/{migration-check-DONPyXff-CGTUpLv-.mjs → migration-check-DHYPMUFe-Cni_ZUzB.mjs} +33 -30
  124. package/dist/migration-check-DHYPMUFe-Cni_ZUzB.mjs.map +1 -0
  125. package/dist/{migration-check-BDjtAn7x-B0nEBR0k.mjs → migration-check-zgqYe3SB-B6LI6wY7.mjs} +22 -9
  126. package/dist/migration-check-zgqYe3SB-B6LI6wY7.mjs.map +1 -0
  127. package/dist/{migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs → migration-command-scaffold-DsT7ke7B-D3u913Po.mjs} +26 -8
  128. package/dist/migration-command-scaffold-DsT7ke7B-D3u913Po.mjs.map +1 -0
  129. package/dist/{migration-graph-HKch1Xk4-DyWhXtjZ.mjs → migration-graph-CChCjts3-ERrIm5aT.mjs} +3 -3
  130. package/dist/{migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map → migration-graph-CChCjts3-ERrIm5aT.mjs.map} +1 -1
  131. package/dist/{migration-graph-Dn469b0l.mjs → migration-graph-Dm9gU0oE-DxPD_SNA.mjs} +20 -10
  132. package/dist/migration-graph-Dm9gU0oE-DxPD_SNA.mjs.map +1 -0
  133. package/dist/{migration-list-C9OPCMt--C28yBgVr.mjs → migration-list-Bkase_ZM-D-bErpSr.mjs} +4 -4
  134. package/dist/migration-list-Bkase_ZM-D-bErpSr.mjs.map +1 -0
  135. package/dist/{migration-list-jk4iCtmO.mjs → migration-list-DDGUTC8Y-B_X7rkez.mjs} +19 -9
  136. package/dist/migration-list-DDGUTC8Y-B_X7rkez.mjs.map +1 -0
  137. package/dist/{migration-log-DQzUBrm8-D3m9wcuf.mjs → migration-log-Cft50PRu-DcnHdxT4.mjs} +20 -8
  138. package/dist/migration-log-Cft50PRu-DcnHdxT4.mjs.map +1 -0
  139. package/dist/{migration-new-BkSY6m0t.mjs → migration-new-D9GHbYwF-C8D22HXG.mjs} +25 -5
  140. package/dist/migration-new-D9GHbYwF-C8D22HXG.mjs.map +1 -0
  141. package/dist/{migration-new-g98oB3nC-BcrkxAAt.mjs → migration-new-RorO1I8r-Ch8NQ4GQ.mjs} +19 -18
  142. package/dist/migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map +1 -0
  143. package/dist/{migration-path-target-BPYp3LNc-DsDdLU0J.mjs → migration-path-target-DhGt62Mi-dm4TU1hJ.mjs} +4 -4
  144. package/dist/migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map +1 -0
  145. package/dist/{migration-plan-CjIYMJZy.mjs → migration-plan-BOhasCLr-GJWYoOA8.mjs} +25 -5
  146. package/dist/migration-plan-BOhasCLr-GJWYoOA8.mjs.map +1 -0
  147. package/dist/{migration-plan-CwuZLXVE-DAJ-JUQT.mjs → migration-plan-DrCTzrXH-CDJbdiC6.mjs} +29 -28
  148. package/dist/migration-plan-DrCTzrXH-CDJbdiC6.mjs.map +1 -0
  149. package/dist/{migration-plan-BsOYRogP-CC1UFAbu.d.mts → migration-plan-t2e_8yD2-w5Ffa0V_.d.mts} +10 -5
  150. package/dist/migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map +1 -0
  151. package/dist/{migration-show-CW6EKtfw.mjs → migration-show-DRARjIbv-1p6EE_Uw.mjs} +24 -12
  152. package/dist/migration-show-DRARjIbv-1p6EE_Uw.mjs.map +1 -0
  153. package/dist/{migration-status-DSQcBhiN.mjs → migration-status-Yh0eOQJN-YpcPDpNh.mjs} +26 -13
  154. package/dist/migration-status-Yh0eOQJN-YpcPDpNh.mjs.map +1 -0
  155. package/dist/migration-tools.d.mts +2 -2
  156. package/dist/migration-tools.mjs +8 -8
  157. package/dist/migration-tools__aggregate.d.mts +1 -1
  158. package/dist/migration-tools__aggregate.mjs +1 -1
  159. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  160. package/dist/migration-tools__io.mjs +1 -1
  161. package/dist/migration-tools__migration-ts.mjs +1 -1
  162. package/dist/migration-tools__migration.mjs +1 -1
  163. package/dist/migration-tools__spaces.d.mts +1 -1
  164. package/dist/migration-tools__spaces.mjs +2 -2
  165. package/dist/{migration-ts-FyF55c4M.mjs → migration-ts-BoHxxGvi.mjs} +2 -2
  166. package/dist/{migration-ts-FyF55c4M.mjs.map → migration-ts-BoHxxGvi.mjs.map} +1 -1
  167. package/dist/{project-import-root-C_bd0ooL-WkbJLnAA.mjs → project-import-root--e8xli8Z-Bfrvrv67.mjs} +3 -3
  168. package/dist/project-import-root--e8xli8Z-Bfrvrv67.mjs.map +1 -0
  169. package/dist/{ref-eJjxzYTh-CNiyDL4p.mjs → ref-BQcl8Ksv-BYZY0Ktb.mjs} +12 -17
  170. package/dist/ref-BQcl8Ksv-BYZY0Ktb.mjs.map +1 -0
  171. package/dist/{ref-DSAZime8.mjs → ref-Cu7Zc1Hv-_R4MnDfr.mjs} +30 -7
  172. package/dist/ref-Cu7Zc1Hv-_R4MnDfr.mjs.map +1 -0
  173. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs} +3 -3
  174. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs.map → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs.map} +1 -1
  175. package/dist/{ref-resolution-_S4xTT2L-BE5zgO2W.mjs → ref-resolution-BYCRg72z-DFhwf-XR.mjs} +3 -3
  176. package/dist/ref-resolution-BYCRg72z-DFhwf-XR.mjs.map +1 -0
  177. package/dist/{spaces-DxuvClN9.mjs → spaces-DBTCE3Js.mjs} +6 -6
  178. package/dist/{spaces-DxuvClN9.mjs.map → spaces-DBTCE3Js.mjs.map} +1 -1
  179. package/dist/{spaces-D5qtTlhj.d.mts → spaces-tWQi7CUv.d.mts} +2 -2
  180. package/dist/{spaces-D5qtTlhj.d.mts.map → spaces-tWQi7CUv.d.mts.map} +1 -1
  181. package/dist/{telemetry-DVBHDQd6-Ckn5oClN.mjs → telemetry-Dh6e0ams-BsjGN3tQ.mjs} +5 -4
  182. package/dist/telemetry-Dh6e0ams-BsjGN3tQ.mjs.map +1 -0
  183. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs +645 -0
  184. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs.map +1 -0
  185. package/dist/{verify-C6L_hiJU-B4V3bqvG.mjs → verify-DBsKxZrK-eDPxNiSS.mjs} +3 -3
  186. package/dist/verify-DBsKxZrK-eDPxNiSS.mjs.map +1 -0
  187. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs} +2 -2
  188. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs.map} +1 -1
  189. package/dist/vite-plugin-contract-emit.mjs +16 -4
  190. package/dist/vite-plugin-contract-emit.mjs.map +1 -1
  191. package/package.json +14 -12
  192. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +0 -1
  193. package/dist/client-Y6qbDk7X-BzKLmBZo.mjs.map +0 -1
  194. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs +0 -1627
  195. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs.map +0 -1
  196. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +0 -1
  197. package/dist/contract-emit-B65_UiFn.d.mts.map +0 -1
  198. package/dist/contract-emit-CTm2zfuG-7PV9SBY6.mjs.map +0 -1
  199. package/dist/contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map +0 -1
  200. package/dist/contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map +0 -1
  201. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +0 -1
  202. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +0 -1
  203. package/dist/db-init-CBj_EWg3.mjs.map +0 -1
  204. package/dist/db-schema-BWpeh0Q_.mjs.map +0 -1
  205. package/dist/db-sign-DCb_DKtv.mjs.map +0 -1
  206. package/dist/db-update-WX0KitcX.mjs.map +0 -1
  207. package/dist/db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map +0 -1
  208. package/dist/exports-BnihzVhw.mjs.map +0 -1
  209. package/dist/exports-CDX9kZuw.mjs +0 -119
  210. package/dist/exports-CDX9kZuw.mjs.map +0 -1
  211. package/dist/format-Bw3LVJ1v-BJ6lVFMA.mjs.map +0 -1
  212. package/dist/framework-components-3DdB31mk-BHyX-OlJ.mjs.map +0 -1
  213. package/dist/index-Df9igRvP.d.mts +0 -18
  214. package/dist/index-Df9igRvP.d.mts.map +0 -1
  215. package/dist/init-CPB89WK2-DPZRZ9Ee.mjs.map +0 -1
  216. package/dist/inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map +0 -1
  217. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +0 -1
  218. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +0 -1
  219. package/dist/migrate-B-NAuO90.mjs.map +0 -1
  220. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +0 -1
  221. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +0 -1
  222. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +0 -1
  223. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +0 -1
  224. package/dist/migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map +0 -1
  225. package/dist/migration-graph-Dn469b0l.mjs.map +0 -1
  226. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +0 -1
  227. package/dist/migration-list-jk4iCtmO.mjs.map +0 -1
  228. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +0 -1
  229. package/dist/migration-new-BkSY6m0t.mjs.map +0 -1
  230. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +0 -1
  231. package/dist/migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map +0 -1
  232. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +0 -1
  233. package/dist/migration-plan-CjIYMJZy.mjs.map +0 -1
  234. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +0 -1
  235. package/dist/migration-show-CW6EKtfw.mjs.map +0 -1
  236. package/dist/migration-status-DSQcBhiN.mjs.map +0 -1
  237. package/dist/project-import-root-C_bd0ooL-WkbJLnAA.mjs.map +0 -1
  238. package/dist/ref-DSAZime8.mjs.map +0 -1
  239. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +0 -1
  240. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +0 -1
  241. package/dist/telemetry-DVBHDQd6-Ckn5oClN.mjs.map +0 -1
  242. package/dist/verify-C6L_hiJU-B4V3bqvG.mjs.map +0 -1
@@ -1,26 +1,27 @@
1
- import { a as snapshotsImportPathFrom, o as writeContractSnapshot, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
1
+ import { A as errorUnexpected, O as errorTargetMigrationNotSupported, T as errorRuntime$1, t as CliStructuredError$1 } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
2
+ import { t as assertFrameworkComponentsCompatible } from "./framework-components-Cruf6BPK-CaQvMI3T.mjs";
3
+ import { t as createProjectSpecifierResolver } from "./project-import-root--e8xli8Z-Bfrvrv67.mjs";
4
+ import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-05kuwcb0.mjs";
5
+ import { a as snapshotsImportPathFrom, o as writeContractSnapshot, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
2
6
  import { t as computeMigrationHash } from "./hash-DH8hl5Rq-BpM2t3Nu.mjs";
3
- import { r as formatMigrationDirName, u as writeMigrationPackage } from "./io-CHUUeHh0-CoCBe9eN.mjs";
7
+ import { r as formatMigrationDirName, u as writeMigrationPackage } from "./io-CHUUeHh0-CbyTkKP6.mjs";
4
8
  import { r as findLatestMigration } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
5
- import { K as getTargetMigrations, N as errorUnexpected, O as errorRuntime$1, it as resolveMigrationPaths, j as errorTargetMigrationNotSupported, rt as resolveContractPath, t as CliStructuredError$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
6
- import { t as assertFrameworkComponentsCompatible } from "./framework-components-3DdB31mk-BHyX-OlJ.mjs";
7
- import { t as createProjectSpecifierResolver } from "./project-import-root-C_bd0ooL-WkbJLnAA.mjs";
8
- import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-okAfZydo.mjs";
9
- import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
10
- import { s as loadContractSpaceAggregate } from "./aggregate-D53gnb7v.mjs";
11
- import { l as refusePackageCorruptionOnAggregate } from "./contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs";
12
- import { i as writeMigrationTs } from "./migration-ts-FyF55c4M.mjs";
13
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
9
+ import { c as getTargetMigrations, g as resolveMigrationPaths, h as resolveContractPath } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
10
+ import { s as loadContractSpaceAggregate } from "./aggregate-BKbHUHLA.mjs";
11
+ import { l as refusePackageCorruptionOnAggregate } from "./contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs";
12
+ import { i as writeMigrationTs } from "./migration-ts-BoHxxGvi.mjs";
14
13
  import { join, relative } from "pathe";
15
14
  import { readFile } from "node:fs/promises";
16
15
  import { APP_SPACE_ID, createControlStack } from "@prisma/orm-framework/components/control";
17
- //#region ../../../1-framework/3-tooling/cli/dist/migration-new-g98oB3nC.mjs
16
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
17
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-new-RorO1I8r.mjs
18
18
  /**
19
19
  * Policy core of `migration new`: scaffolds a migration package with a `migration.ts` stub for manual authoring.
20
20
  */
21
21
  async function executeMigrationNewCommand(options) {
22
- const config = await loadConfig(options.config);
23
- const { migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.config, config);
22
+ const config = options.config;
23
+ const cwd = options.cwd;
24
+ const { migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);
24
25
  const stack = createControlStack(config);
25
26
  const familyInstance = config.family.create(stack);
26
27
  const controlAdapter = config.adapter.create(stack);
@@ -96,7 +97,7 @@ async function executeMigrationNewCommand(options) {
96
97
  config.adapter,
97
98
  ...config.extensions ?? []
98
99
  ]);
99
- const resolveSpecifier = createProjectSpecifierResolver(options.config);
100
+ const resolveSpecifier = createProjectSpecifierResolver(options.configPath);
100
101
  await writeMigrationPackage(packageDir, metadata, []);
101
102
  const destinationArtifacts = getEmittedArtifactPaths(contractPathAbsolute);
102
103
  const [contractJsonRaw, contractDts] = await Promise.all([readFile(destinationArtifacts.jsonPath, "utf-8"), readFile(destinationArtifacts.dtsPath, "utf-8")]);
@@ -113,10 +114,10 @@ async function executeMigrationNewCommand(options) {
113
114
  }, APP_SPACE_ID).renderTypeScript(resolveSpecifier));
114
115
  return ok({
115
116
  ok: true,
116
- dir: relative(process.cwd(), packageDir),
117
+ dir: relative(cwd, packageDir),
117
118
  from: fromHash,
118
119
  to: toStorageHash,
119
- summary: `Scaffolded migration at ${relative(process.cwd(), packageDir)}`
120
+ summary: `Scaffolded migration at ${relative(cwd, packageDir)}`
120
121
  });
121
122
  } catch (error) {
122
123
  if (CliStructuredError$1.is(error)) return notOk(error);
@@ -126,4 +127,4 @@ async function executeMigrationNewCommand(options) {
126
127
  //#endregion
127
128
  export { executeMigrationNewCommand as t };
128
129
 
129
- //# sourceMappingURL=migration-new-g98oB3nC-BcrkxAAt.mjs.map
130
+ //# sourceMappingURL=migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-new-RorO1I8r-Ch8NQ4GQ.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-new-RorO1I8r.mjs"],"sourcesContent":["import { A as errorUnexpected, O as errorTargetMigrationNotSupported, T as errorRuntime, t as CliStructuredError } from \"./cli-errors-kU09RUaz.mjs\";\nimport { t as assertFrameworkComponentsCompatible } from \"./framework-components-Cruf6BPK.mjs\";\nimport { t as createProjectSpecifierResolver } from \"./project-import-root--e8xli8Z.mjs\";\nimport { o as resolveContractPath, r as getTargetMigrations, s as resolveMigrationPaths } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { l as refusePackageCorruptionOnAggregate } from \"./contract-space-aggregate-loader-DOzo1sk9.mjs\";\nimport { getEmittedArtifactPaths } from \"@internal/emitter\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join, relative } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { APP_SPACE_ID, createControlStack } from \"@internal/framework-components/control\";\nimport { loadContractSpaceAggregate } from \"@internal/migration-tools/aggregate\";\nimport { findLatestMigration } from \"@internal/migration-tools/migration-graph\";\nimport { contractSnapshotDir, snapshotsImportPathFrom, writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { computeMigrationHash } from \"@internal/migration-tools/hash\";\nimport { formatMigrationDirName, writeMigrationPackage } from \"@internal/migration-tools/io\";\nimport { writeMigrationTs } from \"@internal/migration-tools/migration-ts\";\n//#region src/control-api/operations/migration-new.ts\n/**\n* Policy core of `migration new`: scaffolds a migration package with a `migration.ts` stub for manual authoring.\n*/\nasync function executeMigrationNewCommand(options) {\n\tconst config = options.config;\n\tconst cwd = options.cwd;\n\tconst { migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tconst controlAdapter = config.adapter.create(stack);\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorRuntime(\"CLI.FILE_NOT_FOUND\", `Contract file not found at ${contractPathAbsolute}`, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: \"Run `prisma-next contract emit` first to generate the contract\"\n\t\t}));\n\t\tthrow error;\n\t}\n\tlet toContract;\n\ttry {\n\t\tconst parsedContract = JSON.parse(contractJsonContent);\n\t\ttoContract = familyInstance.deserializeContract(parsedContract);\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"MIGRATION.CONTRACT_DESERIALIZATION_FAILED\", \"Contract JSON is invalid\", {\n\t\t\twhy: `Failed to deserialize ${contractPathAbsolute}: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\",\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst toStorageHash = toContract.storage?.storageHash;\n\tif (typeof toStorageHash !== \"string\") return notOk(errorRuntime(\"CONTRACT.VALIDATION_FAILED\", \"Contract is missing storageHash\", {\n\t\twhy: `Contract at ${contractPathAbsolute} has no storageHash`,\n\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\"\n\t}));\n\tconst aggregate = await loadContractSpaceAggregate({\n\t\tmigrationsDir,\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json),\n\t\tappContract: toContract\n\t});\n\tconst packageCorruptionFailure = refusePackageCorruptionOnAggregate(aggregate);\n\tif (packageCorruptionFailure) return notOk(packageCorruptionFailure);\n\tconst packages = aggregate.app.packages;\n\tconst graph = aggregate.app.graph();\n\tlet fromHash = null;\n\tif (packages.length > 0) if (options.from) {\n\t\tconst match = packages.find((p) => p.metadata.to.startsWith(options.from));\n\t\tif (!match) return notOk(errorRuntime(\"MIGRATION.HASH_NOT_IN_GRAPH\", \"Starting contract not found\", {\n\t\t\twhy: `No migration with to hash matching \"${options.from}\" exists in ${appMigrationsRelative}`,\n\t\t\tfix: \"Check that the --from hash matches a known migration target hash.\"\n\t\t}));\n\t\tfromHash = match.metadata.to;\n\t} else {\n\t\tconst latestMigration = findLatestMigration(graph);\n\t\tif (latestMigration) fromHash = latestMigration.to;\n\t}\n\tif (fromHash === toStorageHash && !options.from) return notOk(errorRuntime(\"MIGRATION.NO_CHANGES\", \"No changes detected\", {\n\t\twhy: \"The from and to contract hashes are identical — there is nothing to migrate.\",\n\t\tfix: \"Change the contract and run `prisma-next contract emit` before creating a new migration. To author a data-only migration on the current contract hash, pass `--from <hash>` explicitly.\"\n\t}));\n\tconst timestamp = /* @__PURE__ */ new Date();\n\tconst packageDir = join(appMigrationsDir, formatMigrationDirName(timestamp, options.name ?? \"migration\"));\n\tconst baseMetadata = {\n\t\tfrom: fromHash,\n\t\tto: toStorageHash,\n\t\tprovidedInvariants: [],\n\t\tcreatedAt: timestamp.toISOString()\n\t};\n\tconst metadata = {\n\t\t...baseMetadata,\n\t\tmigrationHash: computeMigrationHash(baseMetadata, [])\n\t};\n\tconst migrations = getTargetMigrations(config.target);\n\tif (!migrations) return notOk(errorTargetMigrationNotSupported({ why: `Target \"${config.target.targetId}\" does not support migrations` }));\n\ttry {\n\t\tassertFrameworkComponentsCompatible(config.family.familyId, config.target.targetId, [\n\t\t\tconfig.target,\n\t\t\tconfig.adapter,\n\t\t\t...config.extensions ?? []\n\t\t]);\n\t\tconst resolveSpecifier = createProjectSpecifierResolver(options.configPath);\n\t\tawait writeMigrationPackage(packageDir, metadata, []);\n\t\tconst destinationArtifacts = getEmittedArtifactPaths(contractPathAbsolute);\n\t\tconst [contractJsonRaw, contractDts] = await Promise.all([readFile(destinationArtifacts.jsonPath, \"utf-8\"), readFile(destinationArtifacts.dtsPath, \"utf-8\")]);\n\t\tawait writeContractSnapshot(migrationsDir, toStorageHash, {\n\t\t\tcontractJson: JSON.parse(contractJsonRaw),\n\t\t\tcontractDts\n\t\t});\n\t\tawait writeMigrationTs(packageDir, migrations.createPlanner(controlAdapter).emptyMigration({\n\t\t\tpackageDir,\n\t\t\tcontractJsonPath: join(contractSnapshotDir(migrationsDir, toStorageHash), \"contract.json\"),\n\t\t\tfromHash,\n\t\t\ttoHash: toStorageHash,\n\t\t\tsnapshotsImportPath: snapshotsImportPathFrom(packageDir, migrationsDir)\n\t\t}, APP_SPACE_ID).renderTypeScript(resolveSpecifier));\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tdir: relative(cwd, packageDir),\n\t\t\tfrom: fromHash,\n\t\t\tto: toStorageHash,\n\t\t\tsummary: `Scaffolded migration at ${relative(cwd, packageDir)}`\n\t\t});\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), { why: `Failed to scaffold migration: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n}\n//#endregion\nexport { executeMigrationNewCommand as t };\n\n//# sourceMappingURL=migration-new-RorO1I8r.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,eAAe,2BAA2B,SAAS;CAClD,MAAM,SAAS,QAAQ;CACvB,MAAM,MAAM,QAAQ;CACpB,MAAM,EAAE,eAAe,kBAAkB,0BAA0B,sBAAsB,QAAQ,YAAY,QAAQ,GAAG;CACxH,MAAM,QAAQ,mBAAmB,MAAM;CACvC,MAAM,iBAAiB,OAAO,OAAO,OAAO,KAAK;CACjD,MAAM,iBAAiB,OAAO,QAAQ,OAAO,KAAK;CAClD,MAAM,uBAAuB,oBAAoB,MAA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vE,GAAG,YAAY,CAAC,CAAC,iBAAiB,gBAAgB,CAAC;EACnD,OAAO,GAAG;GACT,IAAI;GACJ,KAAK,SAAS,KAAK,UAAU;GAC7B,MAAM;GACN,IAAI;GACJ,SAAS,2BAA2B,SAAS,KAAK,UAAU;EAC7D,CAAC;CACF,SAAS,OAAO;EACf,IAAIC,qBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,OAAO,MAAM,gBAAgB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,EAAE,KAAK,iCAAiC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC;CACzL;AACD"}
@@ -1,7 +1,7 @@
1
- import { O as errorRuntime$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
1
+ import { T as errorRuntime$1 } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
3
2
  import { isAbsolute, relative, resolve } from "pathe";
4
- //#region ../../../1-framework/3-tooling/cli/dist/migration-path-target-BPYp3LNc.mjs
3
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
4
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-path-target-DhGt62Mi.mjs
5
5
  function looksLikePath(target) {
6
6
  return target.includes("/") || target.includes("\\");
7
7
  }
@@ -35,4 +35,4 @@ function findPackageByDirPath(packages, resolvedDirPath) {
35
35
  //#endregion
36
36
  export { resolveTargetPathAcrossSpaces as i, looksLikePath as n, resolveAppTargetPath as r, findPackageByDirPath as t };
37
37
 
38
- //# sourceMappingURL=migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map
38
+ //# sourceMappingURL=migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-path-target-DhGt62Mi-dm4TU1hJ.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-path-target-DhGt62Mi.mjs"],"sourcesContent":["import { T as errorRuntime } from \"./cli-errors-kU09RUaz.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isAbsolute, relative, resolve } from \"pathe\";\n//#region src/utils/migration-path-target.ts\nfunction looksLikePath(target) {\n\treturn target.includes(\"/\") || target.includes(\"\\\\\");\n}\nfunction resolveAppTargetPath(target, appMigrationsDir, appMigrationsRelative) {\n\tconst targetPath = resolve(target);\n\tconst relativeToApp = relative(appMigrationsDir, targetPath);\n\tif (relativeToApp === \"\" || relativeToApp === \".\" || relativeToApp.startsWith(\"..\") || isAbsolute(relativeToApp)) return notOk(errorRuntime(\"MIGRATION.TARGET_NOT_APP_SPACE\", \"Target must point to an app-space migration\", {\n\t\twhy: `Expected a path under ${appMigrationsRelative}, got ${target}`,\n\t\tfix: \"Pass an app-space migration directory or use a hash prefix.\"\n\t}));\n\treturn ok(targetPath);\n}\n/**\n* Resolve a filesystem-path target to the migration dir that contains it,\n* searching each in-scope space's `migrationsDir`. A path is explicit, so\n* it can belong to at most one space — returns the first match, or `null`\n* when the path falls outside every space dir.\n*/\nfunction resolveTargetPathAcrossSpaces(target, spaces) {\n\tconst targetPath = resolve(target);\n\tfor (const space of spaces) {\n\t\tconst rel = relative(space.migrationsDir, targetPath);\n\t\tif (!(rel === \"\" || rel === \".\" || rel.startsWith(\"..\") || isAbsolute(rel))) return targetPath;\n\t}\n\treturn null;\n}\nfunction findPackageByDirPath(packages, resolvedDirPath) {\n\tconst normalized = resolve(resolvedDirPath);\n\treturn packages.find((p) => resolve(p.dirPath) === normalized);\n}\n//#endregion\nexport { resolveTargetPathAcrossSpaces as i, looksLikePath as n, resolveAppTargetPath as r, findPackageByDirPath as t };\n\n//# sourceMappingURL=migration-path-target-DhGt62Mi.mjs.map"],"mappings":";;;;AAIA,SAAS,cAAc,QAAQ;CAC9B,OAAO,OAAO,SAAS,GAAG,KAAK,OAAO,SAAS,IAAI;AACpD;AACA,SAAS,qBAAqB,QAAQ,kBAAkB,uBAAuB;CAC9E,MAAM,aAAa,QAAQ,MAAM;CACjC,MAAM,gBAAgB,SAAS,kBAAkB,UAAU;CAC3D,IAAI,kBAAkB,MAAM,kBAAkB,OAAO,cAAc,WAAW,IAAI,KAAK,WAAW,aAAa,GAAG,OAAO,MAAMA,eAAa,kCAAkC,+CAA+C;EAC5N,KAAK,yBAAyB,sBAAsB,QAAQ;EAC5D,KAAK;CACN,CAAC,CAAC;CACF,OAAO,GAAG,UAAU;AACrB;;;;;;;AAOA,SAAS,8BAA8B,QAAQ,QAAQ;CACtD,MAAM,aAAa,QAAQ,MAAM;CACjC,KAAK,MAAM,SAAS,QAAQ;EAC3B,MAAM,MAAM,SAAS,MAAM,eAAe,UAAU;EACpD,IAAI,EAAE,QAAQ,MAAM,QAAQ,OAAO,IAAI,WAAW,IAAI,KAAK,WAAW,GAAG,IAAI,OAAO;CACrF;CACA,OAAO;AACR;AACA,SAAS,qBAAqB,UAAU,iBAAiB;CACxD,MAAM,aAAa,QAAQ,eAAe;CAC1C,OAAO,SAAS,MAAM,MAAM,QAAQ,EAAE,OAAO,MAAM,UAAU;AAC9D"}
@@ -1,8 +1,28 @@
1
- import { W as formatStyledHeader, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
- import { t as executeMigrationPlanCommand } from "./migration-plan-CwuZLXVE-DAJ-JUQT.mjs";
1
+ import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
+ import { n as createTerminalUI } from "./terminal-ui-ypPE9cN6-ilMBkmwT.mjs";
3
+ import { l as handleResult, o as formatStyledHeader, p as parseGlobalFlagsOrExit, t as addGlobalOptions, v as setCommandDescriptions, y as setCommandExamples } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
4
+ import { t as executeMigrationPlanCommand } from "./migration-plan-DrCTzrXH-CDJbdiC6.mjs";
5
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
6
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
4
7
  import { Command } from "commander";
5
- //#region ../../../1-framework/3-tooling/cli/dist/commands/migration-plan.mjs
8
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-BOhasCLr.mjs
9
+ async function runMigrationPlan(options, startTime, callbacks) {
10
+ const configResult = await loadConfigForSections(options.config, [
11
+ "family",
12
+ "target",
13
+ "adapter",
14
+ "extensions",
15
+ "migrations",
16
+ "contract"
17
+ ]);
18
+ if (!configResult.ok) return configResult;
19
+ return executeMigrationPlanCommand({
20
+ ...options,
21
+ config: configResult.value,
22
+ cwd: process.cwd(),
23
+ ...ifDefined("configPath", options.config)
24
+ }, startTime, callbacks);
25
+ }
6
26
  function createMigrationPlanCommand() {
7
27
  const command = new Command("plan");
8
28
  setCommandDescriptions(command, "Plan a migration from contract changes", "Compares the emitted contract against the latest on-disk migration state and\nproduces a new migration package with the required operations. No database\nconnection is needed — this is a fully offline operation.");
@@ -15,7 +35,7 @@ function createMigrationPlanCommand() {
15
35
  const flags = parseGlobalFlagsOrExit(options);
16
36
  const startTime = Date.now();
17
37
  const ui = createTerminalUI(flags);
18
- const exitCode = handleResult(await executeMigrationPlanCommand(options, startTime, {
38
+ const exitCode = handleResult(await runMigrationPlan(options, startTime, {
19
39
  onContextResolved: ({ configPath, contractPath, appMigrationsRelative }) => {
20
40
  if (!flags.json && !flags.quiet) {
21
41
  const details = [
@@ -169,4 +189,4 @@ function resolveBundleByPrefix(bundles, needle) {
169
189
  //#endregion
170
190
  export { formatMigrationPlanOutput as n, resolveBundleByPrefix as r, createMigrationPlanCommand as t };
171
191
 
172
- //# sourceMappingURL=migration-plan-CjIYMJZy.mjs.map
192
+ //# sourceMappingURL=migration-plan-BOhasCLr-GJWYoOA8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-plan-BOhasCLr-GJWYoOA8.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-plan-BOhasCLr.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-ypPE9cN6.mjs\";\nimport { _ as handleResult, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, t as addGlobalOptions, u as setCommandExamples, x as formatStyledHeader } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { t as executeMigrationPlanCommand } from \"./migration-plan-DrCTzrXH.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-plan.ts\nasync function runMigrationPlan(options, startTime, callbacks) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\treturn executeMigrationPlanCommand({\n\t\t...options,\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd(),\n\t\t...ifDefined(\"configPath\", options.config)\n\t}, startTime, callbacks);\n}\nfunction createMigrationPlanCommand() {\n\tconst command = new Command(\"plan\");\n\tsetCommandDescriptions(command, \"Plan a migration from contract changes\", \"Compares the emitted contract against the latest on-disk migration state and\\nproduces a new migration package with the required operations. No database\\nconnection is needed — this is a fully offline operation.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration plan\",\n\t\t\"prisma-next migration plan --name add-users-table\",\n\t\t\"prisma-next migration plan --to <migration-dir>^ --name rollback\"\n\t]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--name <slug>\", \"Name slug for the migration directory\", \"migration\").option(\"--from <contract>\", \"Starting contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)\").option(\"--to <contract>\", \"Destination contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path); defaults to the emitted contract\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst startTime = Date.now();\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await runMigrationPlan(options, startTime, {\n\t\t\tonContextResolved: ({ configPath, contractPath, appMigrationsRelative }) => {\n\t\t\t\tif (!flags.json && !flags.quiet) {\n\t\t\t\t\tconst details = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\t\t\tvalue: configPath\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"contract\",\n\t\t\t\t\t\t\tvalue: contractPath\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\t\t\tvalue: appMigrationsRelative\n\t\t\t\t\t\t}\n\t\t\t\t\t];\n\t\t\t\t\tif (options.from) details.push({\n\t\t\t\t\t\tlabel: \"from\",\n\t\t\t\t\t\tvalue: options.from\n\t\t\t\t\t});\n\t\t\t\t\tif (options.to) details.push({\n\t\t\t\t\t\tlabel: \"to\",\n\t\t\t\t\t\tvalue: options.to\n\t\t\t\t\t});\n\t\t\t\t\tif (options.name) details.push({\n\t\t\t\t\t\tlabel: \"name\",\n\t\t\t\t\t\tvalue: options.name\n\t\t\t\t\t});\n\t\t\t\t\tconst header = formatStyledHeader({\n\t\t\t\t\t\tcommand: \"migration plan\",\n\t\t\t\t\t\tdescription: \"Plan a migration from contract changes\",\n\t\t\t\t\t\turl: \"https://pris.ly/migration-plan\",\n\t\t\t\t\t\tdetails,\n\t\t\t\t\t\tflags\n\t\t\t\t\t});\n\t\t\t\t\tui.stderr(header);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonSeeded: (record) => {\n\t\t\t\tif (!flags.json && !flags.quiet && record.action === \"updated\") {\n\t\t\t\t\tconst pkgSuffix = record.newMigrationDirs.length > 0 ? `; ${record.newMigrationDirs.length} new migration package(s) materialised` : \"\";\n\t\t\t\t\tui.step(`Updated ${record.spaceId} to ${record.newHash}${pkgSuffix}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}), flags, ui, (planResult) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(planResult, null, 2));\n\t\t\telse if (!flags.quiet) ui.log(formatMigrationPlanOutput(planResult, flags));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction formatMigrationPlanOutput(result, flags) {\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst green_ = useColor ? (s) => `\\x1b[32m${s}\\x1b[0m` : (s) => s;\n\tconst yellow_ = useColor ? (s) => `\\x1b[33m${s}\\x1b[0m` : (s) => s;\n\tconst dim_ = useColor ? (s) => `\\x1b[2m${s}\\x1b[0m` : (s) => s;\n\tfunction appendEmittedExtensions() {\n\t\tif (result.emittedExtensionDirs.length === 0) return;\n\t\tlines.push(\"\");\n\t\tlines.push(dim_(\"Emitted extension migrations:\"));\n\t\tfor (const entry of result.emittedExtensionDirs) lines.push(dim_(` ${entry.spaceId} → migrations/${entry.spaceId}/${entry.dirName}`));\n\t\tlines.push(\"\");\n\t\tlines.push(`Next: review the extension migrations above, then run ${green_(\"prisma-next migrate\")}.`);\n\t}\n\tif (result.noOp) {\n\t\tlines.push(`${green_(\"✔\")} No changes detected`);\n\t\tlines.push(dim_(` from: ${result.from}`));\n\t\tlines.push(dim_(` to: ${result.to}`));\n\t\tappendEmittedExtensions();\n\t\treturn lines.join(\"\\n\");\n\t}\n\tif (result.pendingPlaceholders) {\n\t\tlines.push(`${yellow_(\"⚠\")} ${result.summary}`);\n\t\tlines.push(\"\");\n\t\tlines.push(dim_(`from: ${result.from}`));\n\t\tlines.push(dim_(`to: ${result.to}`));\n\t\tif (result.dir) lines.push(dim_(`dir: ${result.dir}`));\n\t\tlines.push(\"\");\n\t\tlines.push(\"Open migration.ts and replace each `placeholder(...)` call with your actual query.\");\n\t\tlines.push(`Then run: ${green_(`node ${result.dir ?? \"<dir>\"}/migration.ts`)}`);\n\t\tappendEmittedExtensions();\n\t\treturn lines.join(\"\\n\");\n\t}\n\tlines.push(`${green_(\"✔\")} ${result.summary}`);\n\tlines.push(\"\");\n\tif (result.operations.length > 0) {\n\t\tlines.push(dim_(\"│\"));\n\t\tfor (let i = 0; i < result.operations.length; i++) {\n\t\t\tconst op = result.operations[i];\n\t\t\tconst treeChar = i === result.operations.length - 1 ? \"└\" : \"├\";\n\t\t\tconst destructiveMarker = op.operationClass === \"destructive\" ? ` ${yellow_(\"(destructive)\")}` : \"\";\n\t\t\tlines.push(`${dim_(treeChar)}─ ${op.label}${destructiveMarker}`);\n\t\t}\n\t\tif (result.operations.some((op) => op.operationClass === \"destructive\")) {\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(`${yellow_(\"⚠\")} This migration contains destructive operations that may cause data loss.`);\n\t\t}\n\t\tlines.push(\"\");\n\t}\n\tlines.push(dim_(`from: ${result.from}`));\n\tlines.push(dim_(`to: ${result.to}`));\n\tif (result.baselineDir) lines.push(dim_(`Baseline → ${result.baselineDir}`));\n\tif (result.dir) lines.push(dim_(`App space → ${result.dir}`));\n\tfor (const entry of result.emittedExtensionDirs) lines.push(dim_(`Extension space ${entry.spaceId} → migrations/${entry.spaceId}/${entry.dirName}`));\n\tlines.push(\"\");\n\tconst reviewTarget = result.baselineDir !== void 0 && result.dir !== void 0 ? `${result.baselineDir} and ${result.dir}` : result.baselineDir ?? result.dir ?? \"<dir>\";\n\tlines.push(`Next: review ${green_(reviewTarget)} if needed, then run ${green_(\"prisma-next migrate\")}.`);\n\tif (result.preview && result.preview.statements.length > 0) {\n\t\tconst allSql = result.preview.statements.every((s) => s.language === \"sql\");\n\t\tlines.push(\"\");\n\t\tlines.push(dim_(allSql ? \"DDL preview\" : \"Operation preview\"));\n\t\tlines.push(\"\");\n\t\tfor (const statement of result.preview.statements) {\n\t\t\tconst trimmed = statement.text.trim();\n\t\t\tif (!trimmed) continue;\n\t\t\tconst line = statement.language === \"sql\" && !trimmed.endsWith(\";\") ? `${trimmed};` : trimmed;\n\t\t\tlines.push(line);\n\t\t}\n\t}\n\tif (flags.verbose && result.timings) {\n\t\tlines.push(\"\");\n\t\tlines.push(dim_(`Total time: ${result.timings.total}ms`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Resolve a migration package by **target contract hash** (`metadata.to`)\n* using exact match or prefix match.\n*\n* Note: matches `metadata.to` (the contract hash this migration produces),\n* not `metadata.migrationHash` (the package's content-addressed identity).\n* Tries exact match first, then prefix match. Returns the matched package on\n* success, or a discriminated failure indicating whether the prefix was\n* ambiguous or simply not found.\n*\n* @internal Exported for testing only.\n*/\nfunction resolveBundleByPrefix(bundles, needle) {\n\tconst exact = bundles.find((p) => p.metadata.to === needle);\n\tif (exact) return ok(exact);\n\tconst candidates = bundles.filter((p) => p.metadata.to.startsWith(needle));\n\tif (candidates.length === 1) return ok(candidates[0]);\n\tif (candidates.length > 1) return notOk({\n\t\treason: \"ambiguous\",\n\t\tcount: candidates.length\n\t});\n\treturn notOk({ reason: \"not-found\" });\n}\n//#endregion\nexport { formatMigrationPlanOutput as n, resolveBundleByPrefix as r, createMigrationPlanCommand as t };\n\n//# sourceMappingURL=migration-plan-BOhasCLr.mjs.map"],"mappings":";;;;;;;;AAQA,eAAe,iBAAiB,SAAS,WAAW,WAAW;CAC9D,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,OAAO,4BAA4B;EAClC,GAAG;EACH,QAAQ,aAAa;EACrB,KAAK,QAAQ,IAAI;EACjB,GAAG,UAAU,cAAc,QAAQ,MAAM;CAC1C,GAAG,WAAW,SAAS;AACxB;AACA,SAAS,6BAA6B;CACrC,MAAM,UAAU,IAAI,QAAQ,MAAM;CAClC,uBAAuB,SAAS,0CAA0C,qNAAqN;CAC/R,mBAAmB,SAAS;EAC3B;EACA;EACA;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,mBAAmB,+B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mapRefResolutionError, o as errorContractValidationFailed, t as CliStructuredError$1, u as errorFileNotFound } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
2
+ import { t as assertFrameworkComponentsCompatible } from "./framework-components-Cruf6BPK-CaQvMI3T.mjs";
3
+ import { t as createProjectSpecifierResolver } from "./project-import-root--e8xli8Z-Bfrvrv67.mjs";
4
+ import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-05kuwcb0.mjs";
1
5
  import { t as MigrationToolsError } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
- import { a as snapshotsImportPathFrom, o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
6
+ import { a as snapshotsImportPathFrom, o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
3
7
  import { t as computeMigrationHash } from "./hash-DH8hl5Rq-BpM2t3Nu.mjs";
4
8
  import { t as deriveProvidedInvariants } from "./invariants-C1WVUAH7-DlOBTTkM.mjs";
5
- import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-CHUUeHh0-CoCBe9eN.mjs";
9
+ import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-CHUUeHh0-CbyTkKP6.mjs";
6
10
  import { r as findLatestMigration } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
7
- import { c as spaceMigrationDirectory, s as readContractSpaceHeadRef } from "./verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs";
8
- import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-DxuvClN9.mjs";
9
- import { C as errorPlanForgotTheFlag, K as getTargetMigrations, N as errorUnexpected, Z as mapRefResolutionError, d as errorContractValidationFailed, h as errorFileNotFound, it as resolveMigrationPaths, j as errorTargetMigrationNotSupported, k as errorSnapshotMissing, rt as resolveContractPath, t as CliStructuredError$1, x as errorMigrationPlanningFailed } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
10
- import { t as assertFrameworkComponentsCompatible } from "./framework-components-3DdB31mk-BHyX-OlJ.mjs";
11
- import { t as createProjectSpecifierResolver } from "./project-import-root-C_bd0ooL-WkbJLnAA.mjs";
12
- import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-okAfZydo.mjs";
13
- import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
11
+ import { c as spaceMigrationDirectory, s as readContractSpaceHeadRef } from "./verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs";
12
+ import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-DBTCE3Js.mjs";
13
+ import { c as getTargetMigrations, g as resolveMigrationPaths, h as resolveContractPath } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
14
14
  import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-BEmNEMtP-rz61CLM5.mjs";
15
- import { a as loadContractSpaceAggregateForCli, d as toExtensionInputs, n as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs";
15
+ import { a as loadContractSpaceAggregateForCli, d as toExtensionInputs, n as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs";
16
16
  import { n as parseContractRef } from "./ref-resolution-Ct2GMcNB.mjs";
17
- import { i as writeMigrationTs } from "./migration-ts-FyF55c4M.mjs";
18
- import { t as mapContractAtError } from "./contract-at-errors-Dv1mxKYO-C29YB4RC.mjs";
19
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
17
+ import { i as writeMigrationTs } from "./migration-ts-BoHxxGvi.mjs";
18
+ import { t as mapContractAtError } from "./contract-at-errors-BTeDEXm4-BAIDia2-.mjs";
20
19
  import { join, relative } from "pathe";
20
+ import { castAs } from "@prisma/orm-framework/utils/casts";
21
21
  import { readFile } from "node:fs/promises";
22
22
  import { createControlStack, hasOperationPreview } from "@prisma/orm-framework/components/control";
23
- import { castAs } from "@prisma/orm-framework/utils/casts";
24
- //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-CwuZLXVE.mjs
23
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
24
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-DrCTzrXH.mjs
25
25
  /**
26
26
  * Phase-1 of the two-phase `migration plan` pipeline (sub-spec § 4).
27
27
  *
@@ -313,10 +313,11 @@ async function executeMigrationPlanCommand(options, startTime, callbacks) {
313
313
  }
314
314
  }
315
315
  async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
316
- const config = await loadConfig(options.config);
317
- const { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.config, config);
316
+ const config = options.config;
317
+ const cwd = options.cwd;
318
+ const { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);
318
319
  const contractPathAbsolute = resolveContractPath(config);
319
- const contractPath = relative(process.cwd(), contractPathAbsolute);
320
+ const contractPath = relative(cwd, contractPathAbsolute);
320
321
  callbacks?.onContextResolved?.({
321
322
  configPath,
322
323
  contractPath,
@@ -399,7 +400,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
399
400
  contractDts: toResolution.value.contractDts
400
401
  };
401
402
  }
402
- const resolveImportSpecifier = createProjectSpecifierResolver(options.config);
403
+ const resolveImportSpecifier = createProjectSpecifierResolver(options.configPath);
403
404
  const seedResult = await runContractSpaceSeedPhase({
404
405
  migrationsDir,
405
406
  extensions: toExtensionInputs(config.extensions ?? [])
@@ -469,7 +470,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
469
470
  if (fromHash === toStorageHash) {
470
471
  const baselineOps = baselineLeg.value.hasPlaceholders ? [] : baselineLeg.value.plannedOps;
471
472
  if (baselineLeg.value.hasPlaceholders) {
472
- const baselineDir = relative(process.cwd(), baselinePackageDir);
473
+ const baselineDir = relative(cwd, baselinePackageDir);
473
474
  return ok({
474
475
  ok: true,
475
476
  noOp: false,
@@ -490,7 +491,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
490
491
  noOp: false,
491
492
  from: fromHash,
492
493
  to: toStorageHash,
493
- baselineDir: relative(process.cwd(), baselinePackageDir),
494
+ baselineDir: relative(cwd, baselinePackageDir),
494
495
  operations: baselineOps.map((op) => ({
495
496
  id: op.id,
496
497
  label: op.label,
@@ -516,8 +517,8 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
516
517
  noOp: false,
517
518
  from: fromHash,
518
519
  to: toStorageHash,
519
- dir: relative(process.cwd(), deltaPackageDir),
520
- baselineDir: relative(process.cwd(), baselinePackageDir),
520
+ dir: relative(cwd, deltaPackageDir),
521
+ baselineDir: relative(cwd, baselinePackageDir),
521
522
  operations: [],
522
523
  emittedExtensionDirs,
523
524
  pendingPlaceholders: true,
@@ -530,8 +531,8 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
530
531
  noOp: false,
531
532
  from: fromHash,
532
533
  to: toStorageHash,
533
- dir: relative(process.cwd(), deltaPackageDir),
534
- baselineDir: relative(process.cwd(), baselinePackageDir),
534
+ dir: relative(cwd, deltaPackageDir),
535
+ baselineDir: relative(cwd, baselinePackageDir),
535
536
  operations: deltaOps.map((op) => ({
536
537
  id: op.id,
537
538
  label: op.label,
@@ -558,7 +559,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
558
559
  noOp: false,
559
560
  from: fromHash,
560
561
  to: toStorageHash,
561
- dir: relative(process.cwd(), packageDir),
562
+ dir: relative(cwd, packageDir),
562
563
  operations: [],
563
564
  emittedExtensionDirs,
564
565
  pendingPlaceholders: true,
@@ -572,7 +573,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
572
573
  noOp: false,
573
574
  from: fromHash,
574
575
  to: toStorageHash,
575
- dir: relative(process.cwd(), packageDir),
576
+ dir: relative(cwd, packageDir),
576
577
  operations: plannedOps.map((op) => ({
577
578
  id: op.id,
578
579
  label: op.label,
@@ -617,4 +618,4 @@ function buildAutoBaselinePlanSummary(deltaOpsCount, emittedExtensionDirsCount)
617
618
  //#endregion
618
619
  export { runContractSpaceSeedPhase as i, resolveFromForPlan as n, resolveToForPlan as r, executeMigrationPlanCommand as t };
619
620
 
620
- //# sourceMappingURL=migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map
621
+ //# sourceMappingURL=migration-plan-DrCTzrXH-CDJbdiC6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-plan-DrCTzrXH-CDJbdiC6.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-plan-DrCTzrXH.mjs"],"sourcesContent":["import { A as errorUnexpected, E as errorSnapshotMissing, O as errorTargetMigrationNotSupported, _ as errorMigrationPlanningFailed, b as errorPlanForgotTheFlag, j as mapRefResolutionError, o as errorContractValidationFailed, t as CliStructuredError, u as errorFileNotFound } from \"./cli-errors-kU09RUaz.mjs\";\nimport { t as assertFrameworkComponentsCompatible } from \"./framework-components-Cruf6BPK.mjs\";\nimport { t as createProjectSpecifierResolver } from \"./project-import-root--e8xli8Z.mjs\";\nimport { o as resolveContractPath, r as getTargetMigrations, s as resolveMigrationPaths } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { a as loadContractSpaceAggregateForCli, d as toExtensionInputs, n as buildContractSpaceAggregate } from \"./contract-space-aggregate-loader-DOzo1sk9.mjs\";\nimport { t as mapContractAtError } from \"./contract-at-errors-BTeDEXm4.mjs\";\nimport { getEmittedArtifactPaths } from \"@internal/emitter\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join, relative } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { createControlStack, hasOperationPreview } from \"@internal/framework-components/control\";\nimport { emitContractSpaceArtifacts, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory } from \"@internal/migration-tools/spaces\";\nimport { castAs } from \"@internal/utils/casts\";\nimport { MigrationToolsError } from \"@internal/migration-tools/errors\";\nimport { assertHashIsGraphNode, findLatestMigration, isGraphNode } from \"@internal/migration-tools/migration-graph\";\nimport { snapshotsImportPathFrom, writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { parseContractRef } from \"@internal/migration-tools/ref-resolution\";\nimport { computeMigrationHash } from \"@internal/migration-tools/hash\";\nimport { formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, writeMigrationPackage } from \"@internal/migration-tools/io\";\nimport { writeMigrationTs } from \"@internal/migration-tools/migration-ts\";\nimport { deriveProvidedInvariants } from \"@internal/migration-tools/invariants\";\n//#region src/control-api/operations/contract-space-seed-phase.ts\n/**\n* Phase-1 of the two-phase `migration plan` pipeline (sub-spec § 4).\n*\n* For every extension that exposes a `contractSpace`:\n*\n* 1. Read the on-disk head ref (returns `null` on first emit).\n* 2. Write the head contract into the migrations-root snapshot store\n* (write-if-absent, keyed by hash) and unconditionally re-emit\n* `refs/head.json`, via {@link emitContractSpaceArtifacts}. The\n* framework owns `refs/head.json`; re-emit is the contract for that\n* file. The snapshot itself is only written once per distinct hash.\n* 3. Materialise any descriptor-shipped migration packages not yet on\n* disk via {@link materialiseExtensionMigrationPackageIfMissing}.\n* Existing packages are left untouched (by-existence skip).\n*\n* The return value lets the caller render a per-space status line and\n* lets the phase-2 aggregate loader run on a now-consistent disk state\n* (every loaded extension is guaranteed to have its head ref pinned\n* to the descriptor's hash and to ship every package the descriptor\n* declares).\n*\n* Output ordering is deterministic and alphabetical by spaceId (via\n* {@link planAllSpaces}, which also detects duplicate spaceIds). This\n* matches the canonical sort order used by every other aggregate\n* surface (`migrate`, `migration status`, the runner).\n*/\nasync function runContractSpaceSeedPhase(inputs) {\n\tconst planned = planAllSpaces(inputs.extensions.filter((pack) => pack.contractSpace !== void 0).map((pack) => ({\n\t\tspaceId: pack.id,\n\t\tpriorContract: null,\n\t\tnewContract: pack.contractSpace.contractJson,\n\t\t__pack: pack.contractSpace\n\t})), (input) => input.__pack.migrations);\n\tconst descriptorBySpace = /* @__PURE__ */ new Map();\n\tfor (const pack of inputs.extensions) if (pack.contractSpace !== void 0) descriptorBySpace.set(pack.id, pack.contractSpace);\n\tconst seeded = [];\n\tfor (const space of planned) {\n\t\tconst descriptor = descriptorBySpace.get(space.spaceId);\n\t\tif (descriptor === void 0) continue;\n\t\tconst priorHash = (await readContractSpaceHeadRef(inputs.migrationsDir, space.spaceId))?.hash ?? null;\n\t\tawait emitContractSpaceArtifacts(inputs.migrationsDir, space.spaceId, {\n\t\t\tcontract: descriptor.contractJson,\n\t\t\tcontractDts: buildPlaceholderContractDts(space.spaceId),\n\t\t\theadRef: {\n\t\t\t\thash: descriptor.headRef.hash,\n\t\t\t\tinvariants: descriptor.headRef.invariants\n\t\t\t}\n\t\t});\n\t\tconst spaceDir = spaceMigrationDirectory(inputs.migrationsDir, space.spaceId);\n\t\tconst newMigrationDirs = [];\n\t\tfor (const pkg of space.migrationPackages) {\n\t\t\tconst { written } = await materialiseExtensionMigrationPackageIfMissing(spaceDir, pkg);\n\t\t\tif (written) newMigrationDirs.push(pkg.dirName);\n\t\t}\n\t\tconst action = priorHash !== descriptor.headRef.hash || newMigrationDirs.length > 0 ? \"updated\" : \"unchanged\";\n\t\tseeded.push({\n\t\t\tspaceId: space.spaceId,\n\t\t\taction,\n\t\t\tpriorHash,\n\t\t\tnewHash: descriptor.headRef.hash,\n\t\t\tnewMigrationDirs\n\t\t});\n\t}\n\treturn { seeded };\n}\n/**\n* Placeholder `.d.ts` content for an extension space's on-disk mirror.\n*\n* Rendering a fully-typed `.d.ts` for an extension contract requires\n* the SQL-family renderer with the codec / typemap registry threaded\n* through; until that integration ships, the on-disk `.d.ts` is a\n* stub `export {};` module that documents how consumers should\n* validate the sibling `contract.json`. The stub typechecks on its\n* own and does not need any TypeScript suppressions.\n*/\nfunction buildPlaceholderContractDts(spaceId) {\n\treturn [\n\t\t\"/**\",\n\t\t` * Placeholder \\`.d.ts\\` for extension space \"${spaceId}\".`,\n\t\t\" *\",\n\t\t\" * The framework re-emits this file on every `migration plan` run\",\n\t\t\" * alongside `contract.json` and `refs/head.json`. A typed `.d.ts`\",\n\t\t\" * rendering pass for extension contracts is tracked separately;\",\n\t\t\" * until that ships, consumers should import `contract.json`\",\n\t\t\" * and pass it through the target descriptor’s `contractSerializer`.\",\n\t\t\" */\",\n\t\t\"export {};\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\n//#endregion\n//#region src/control-api/operations/plan-resolution.ts\nconst FULL_HASH_PATTERN = /^([0-9a-f]{64}|empty)$/;\nfunction looksLikeFullHash(input) {\n\treturn FULL_HASH_PATTERN.test(input);\n}\nfunction graphIsEmpty(space) {\n\treturn space.packages.length === 0;\n}\nfunction getReachableRefs(refs, graph) {\n\treturn Object.entries(refs).flatMap(([name, entry]) => entry && isGraphNode(entry.hash, graph) ? [{\n\t\tname,\n\t\thash: entry.hash\n\t}] : []).sort((a, b) => a.name.localeCompare(b.name));\n}\nfunction assertFromIsGraphNode(fromHash, graph, refs, graphTipHash) {\n\ttry {\n\t\tassertHashIsGraphNode(fromHash, graph);\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error) && error.code === \"MIGRATION.HASH_NOT_IN_GRAPH\") throw errorPlanForgotTheFlag(fromHash, getReachableRefs(refs, graph), graphTipHash, { cause: error });\n\t\tthrow error;\n\t}\n}\nasync function resolveContractRef(parsed, space, options) {\n\tconst { hash, provenance } = parsed;\n\tconst refName = provenance.kind === \"ref\" ? provenance.refName : void 0;\n\ttry {\n\t\tconst at = await space.contractAt(hash, refName !== void 0 ? { refName } : void 0);\n\t\tif (at.provenance === \"ref\") return ok({\n\t\t\tkind: \"ref\",\n\t\t\thash: at.hash,\n\t\t\tcontract: at.contract,\n\t\t\tcontractJson: at.contractJson,\n\t\t\tcontractDts: at.contractDts\n\t\t});\n\t\treturn ok({\n\t\t\tkind: \"graph-node\",\n\t\t\thash: at.hash,\n\t\t\tcontract: at.contract,\n\t\t\tcontractJson: at.contractJson,\n\t\t\tcontractDts: at.contractDts\n\t\t});\n\t} catch (error) {\n\t\treturn mapContractAtError(error, options?.artifactRole !== void 0 ? { artifactRole: options.artifactRole } : void 0);\n\t}\n}\nasync function resolveFromPolicy(parsed, input, refs, explicitFromLabel) {\n\tconst resolution = await resolveContractRef(parsed, input.space, {\n\t\t...explicitFromLabel !== void 0 ? { explicitLabel: explicitFromLabel } : {},\n\t\tartifactRole: \"from\"\n\t});\n\tif (!resolution.ok) return resolution;\n\tif (resolution.value.kind === \"graph-node\") return ok({\n\t\tkind: \"graph-node\",\n\t\tfromHash: resolution.value.hash,\n\t\tfromContract: resolution.value.contract\n\t});\n\tconst { hash, contract, contractJson, contractDts } = resolution.value;\n\tif (graphIsEmpty(input.space)) return ok({\n\t\tkind: \"auto-baseline\",\n\t\tfromHash: hash,\n\t\tfromContract: contract,\n\t\tcontractDts,\n\t\tcontractJson\n\t});\n\tconst graph = input.space.graph();\n\tconst graphTip = findLatestMigration(graph)?.to ?? null;\n\ttry {\n\t\tassertFromIsGraphNode(hash, graph, refs, graphTip);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\treturn ok({\n\t\tkind: \"ref\",\n\t\tfromHash: hash,\n\t\tfromContract: contract,\n\t\tcontractDts,\n\t\tcontractJson\n\t});\n}\nasync function resolveFromForPlan(input) {\n\tconst { optionsFrom, space } = input;\n\tconst graph = space.graph();\n\tconst refs = space.refs;\n\tif (optionsFrom === void 0) {\n\t\tconst dbRef = refs[\"db\"];\n\t\tif (!dbRef) return ok({\n\t\t\tkind: \"greenfield\",\n\t\t\tfromHash: null,\n\t\t\tfromContract: null\n\t\t});\n\t\treturn resolveFromPolicy({\n\t\t\thash: dbRef.hash,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"ref\",\n\t\t\t\trefName: \"db\"\n\t\t\t}\n\t\t}, input, refs);\n\t}\n\tconst refResult = parseContractRef(optionsFrom, {\n\t\tgraph,\n\t\trefs\n\t});\n\tif (!refResult.ok) {\n\t\tif (looksLikeFullHash(optionsFrom)) {\n\t\t\tconst empty = graphIsEmpty(space);\n\t\t\tconst graphTip = findLatestMigration(graph)?.to ?? null;\n\t\t\tif (empty) return notOk(errorSnapshotMissing(optionsFrom, { viaRef: false }));\n\t\t\treturn notOk(errorPlanForgotTheFlag(optionsFrom, getReachableRefs(refs, graph), graphTip));\n\t\t}\n\t\treturn notOk(mapRefResolutionError(refResult.failure));\n\t}\n\treturn resolveFromPolicy(refResult.value, input, refs, optionsFrom);\n}\nasync function resolveToForPlan(optionsTo, input) {\n\tconst { space } = input;\n\tconst graph = space.graph();\n\tconst refs = space.refs;\n\tconst refResult = parseContractRef(optionsTo, {\n\t\tgraph,\n\t\trefs\n\t});\n\tif (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));\n\tconst resolution = await resolveContractRef(refResult.value, space, {\n\t\texplicitLabel: optionsTo,\n\t\tartifactRole: \"to\"\n\t});\n\tif (!resolution.ok) return resolution;\n\tconst { hash, contract, contractJson, contractDts } = resolution.value;\n\treturn ok({\n\t\thash,\n\t\tcontract,\n\t\tcontractJson,\n\t\tcontractDts\n\t});\n}\n//#endregion\n//#region src/control-api/operations/migration-plan.ts\n/**\n* Policy core of `migration plan`: resolves from/to contracts, runs the planner legs, and writes the planned migration packages.\n*/\nfunction isEnoent(error) {\n\treturn error instanceof Error && \"code\" in error && error.code === \"ENOENT\";\n}\nasync function runPlannerLeg(planner, migrations, frameworkComponents, contract, fromContract, spaceId, ownership, snapshotsImportPath, resolveImportSpecifier) {\n\tconst fromSchema = migrations.contractToSchema(fromContract, frameworkComponents);\n\tconst plannerResult = planner.plan({\n\t\tcontract,\n\t\tschema: fromSchema,\n\t\tpolicy: { allowedOperationClasses: [\n\t\t\t\"additive\",\n\t\t\t\"widening\",\n\t\t\t\"destructive\",\n\t\t\t\"data\"\n\t\t] },\n\t\tfromContract,\n\t\tframeworkComponents,\n\t\tspaceId,\n\t\townership,\n\t\tsnapshotsImportPath\n\t});\n\tif (plannerResult.kind === \"failure\") return notOk(errorMigrationPlanningFailed({ conflicts: castAs(plannerResult.conflicts) }));\n\tlet plannedOps = [];\n\tlet hasPlaceholders = false;\n\ttry {\n\t\tplannedOps = await Promise.all(plannerResult.plan.operations);\n\t\tif (plannedOps.length === 0) return notOk(errorMigrationPlanningFailed({ conflicts: [{\n\t\t\tkind: \"unsupportedChange\",\n\t\t\tsummary: \"Contract changed but planner produced no operations. This indicates unsupported or ignored changes.\"\n\t\t}] }));\n\t} catch (e) {\n\t\tif (CliStructuredError.is(e) && e.code === \"MIGRATION.UNFILLED_PLACEHOLDER\") hasPlaceholders = true;\n\t\telse throw e;\n\t}\n\treturn ok({\n\t\tplannedOps,\n\t\tmigrationTsContent: plannerResult.plan.renderTypeScript(resolveImportSpecifier),\n\t\thasPlaceholders\n\t});\n}\nasync function writePlannedMigrationPackage(packageDir, fromHash, toHash, createdAt, leg) {\n\tconst opsForWrite = leg.hasPlaceholders ? [] : leg.plannedOps;\n\tconst metadataWithInvariants = {\n\t\tfrom: fromHash,\n\t\tto: toHash,\n\t\tprovidedInvariants: deriveProvidedInvariants(opsForWrite),\n\t\tcreatedAt: createdAt.toISOString()\n\t};\n\tawait writeMigrationPackage(packageDir, {\n\t\t...metadataWithInvariants,\n\t\tmigrationHash: computeMigrationHash(metadataWithInvariants, opsForWrite)\n\t}, opsForWrite);\n\tawait writeMigrationTs(packageDir, leg.migrationTsContent);\n}\nasync function executeMigrationPlanCommand(options, startTime, callbacks) {\n\ttry {\n\t\treturn await executeMigrationPlanCommandInner(options, startTime, callbacks);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\treturn notOk(errorUnexpected(message, { why: `Unexpected error during migration plan: ${message}` }));\n\t}\n}\nasync function executeMigrationPlanCommandInner(options, startTime, callbacks) {\n\tconst config = options.config;\n\tconst cwd = options.cwd;\n\tconst { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tconst contractPath = relative(cwd, contractPathAbsolute);\n\tcallbacks?.onContextResolved?.({\n\t\tconfigPath,\n\t\tcontractPath,\n\t\tappMigrationsRelative\n\t});\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (isEnoent(error)) return notOk(errorFileNotFound(contractPathAbsolute, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: `Run \\`prisma-next contract emit\\` to generate ${contractPath}, or update \\`config.contract.output\\` in ${configPath}`\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read contract file: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tconst controlAdapter = config.adapter.create(stack);\n\tlet toContract;\n\ttry {\n\t\ttoContract = familyInstance.deserializeContract(castAs(JSON.parse(contractJsonContent)));\n\t} catch (error) {\n\t\treturn notOk(errorContractValidationFailed(`Contract at ${contractPathAbsolute} failed to deserialize: ${error instanceof Error ? error.message : String(error)}`, { where: { path: contractPathAbsolute } }));\n\t}\n\tconst rawStorageHash = toContract.storage?.storageHash;\n\tif (typeof rawStorageHash !== \"string\") return notOk(errorContractValidationFailed(\"Contract is missing storageHash\", { where: { path: contractPathAbsolute } }));\n\tlet toStorageHash = rawStorageHash;\n\tlet toArtifacts = null;\n\tlet fromContract = null;\n\tlet fromHash = null;\n\tlet snapshotStartContract = null;\n\tlet isAutoBaseline = false;\n\tconst tolerantAggregateResult = await loadContractSpaceAggregateForCli({\n\t\ttargetId: config.target.targetId,\n\t\tmigrationsDir,\n\t\tappContract: toContract,\n\t\textensions: config.extensions ?? [],\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!tolerantAggregateResult.ok) return notOk(tolerantAggregateResult.failure);\n\tconst resolutionSpace = tolerantAggregateResult.value.app;\n\tconst resolutionResult = await resolveFromForPlan({\n\t\toptionsFrom: options.from,\n\t\tspace: resolutionSpace\n\t});\n\tif (!resolutionResult.ok) return notOk(resolutionResult.failure);\n\tswitch (resolutionResult.value.kind) {\n\t\tcase \"greenfield\": break;\n\t\tcase \"graph-node\":\n\t\t\tfromHash = resolutionResult.value.fromHash;\n\t\t\tfromContract = resolutionResult.value.fromContract;\n\t\t\tbreak;\n\t\tcase \"ref\":\n\t\t\tfromHash = resolutionResult.value.fromHash;\n\t\t\tfromContract = resolutionResult.value.fromContract;\n\t\t\tsnapshotStartContract = {\n\t\t\t\tfromHash: resolutionResult.value.fromHash,\n\t\t\t\tcontractJson: resolutionResult.value.contractJson,\n\t\t\t\tcontractDts: resolutionResult.value.contractDts\n\t\t\t};\n\t\t\tbreak;\n\t\tcase \"auto-baseline\":\n\t\t\tfromHash = resolutionResult.value.fromHash;\n\t\t\tfromContract = resolutionResult.value.fromContract;\n\t\t\tsnapshotStartContract = {\n\t\t\t\tfromHash: resolutionResult.value.fromHash,\n\t\t\t\tcontractJson: resolutionResult.value.contractJson,\n\t\t\t\tcontractDts: resolutionResult.value.contractDts\n\t\t\t};\n\t\t\tisAutoBaseline = true;\n\t\t\tbreak;\n\t}\n\tif (options.to !== void 0) {\n\t\tconst toResolution = await resolveToForPlan(options.to, { space: resolutionSpace });\n\t\tif (!toResolution.ok) return notOk(toResolution.failure);\n\t\ttoContract = toResolution.value.contract;\n\t\ttoStorageHash = toResolution.value.hash;\n\t\ttoArtifacts = {\n\t\t\tcontractJson: toResolution.value.contractJson,\n\t\t\tcontractDts: toResolution.value.contractDts\n\t\t};\n\t}\n\tconst resolveImportSpecifier = createProjectSpecifierResolver(options.configPath);\n\tconst seedResult = await runContractSpaceSeedPhase({\n\t\tmigrationsDir,\n\t\textensions: toExtensionInputs(config.extensions ?? [])\n\t});\n\tfor (const record of seedResult.seeded) callbacks?.onSeeded?.(record);\n\tconst emittedExtensionDirs = seedResult.seeded.flatMap((r) => r.newMigrationDirs.map((dirName) => ({\n\t\tspaceId: r.spaceId,\n\t\tdirName\n\t})));\n\tif (fromHash === toStorageHash && !isAutoBaseline) return ok({\n\t\tok: true,\n\t\tnoOp: true,\n\t\tfrom: fromHash,\n\t\tto: toStorageHash,\n\t\toperations: [],\n\t\temittedExtensionDirs,\n\t\tsummary: \"No changes detected between contracts\",\n\t\ttimings: { total: Date.now() - startTime }\n\t});\n\tconst migrations = getTargetMigrations(config.target);\n\tif (!migrations) return notOk(errorTargetMigrationNotSupported({ why: `Target \"${config.target.id}\" does not support migrations` }));\n\tconst aggregateResult = await buildContractSpaceAggregate({\n\t\ttargetId: config.target.targetId,\n\t\tmigrationsDir,\n\t\tappContract: toContract,\n\t\textensions: config.extensions ?? [],\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!aggregateResult.ok) return notOk(aggregateResult.failure);\n\tconst aggregate = aggregateResult.value;\n\tconst frameworkComponents = assertFrameworkComponentsCompatible(config.family.familyId, config.target.targetId, [\n\t\tconfig.target,\n\t\tconfig.adapter,\n\t\t...config.extensions ?? []\n\t]);\n\tasync function writeDestinationSnapshot(destHash) {\n\t\tif (toArtifacts !== null) {\n\t\t\tawait writeContractSnapshot(migrationsDir, destHash, {\n\t\t\t\tcontractJson: toArtifacts.contractJson,\n\t\t\t\tcontractDts: toArtifacts.contractDts\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst destinationArtifacts = getEmittedArtifactPaths(contractPathAbsolute);\n\t\tconst [contractJsonRaw, contractDts] = await Promise.all([readFile(destinationArtifacts.jsonPath, \"utf-8\"), readFile(destinationArtifacts.dtsPath, \"utf-8\")]);\n\t\tawait writeContractSnapshot(migrationsDir, destHash, {\n\t\t\tcontractJson: castAs(JSON.parse(contractJsonRaw)),\n\t\t\tcontractDts\n\t\t});\n\t}\n\ttry {\n\t\tconst planner = migrations.createPlanner(controlAdapter);\n\t\tif (isAutoBaseline && fromHash !== null && fromContract !== null && snapshotStartContract !== null) {\n\t\t\tconst baselineTimestamp = /* @__PURE__ */ new Date();\n\t\t\tconst deltaTimestamp = new Date(baselineTimestamp.getTime() + 6e4);\n\t\t\tconst baselineDirName = formatMigrationDirName(baselineTimestamp, \"baseline\");\n\t\t\tconst deltaDirName = formatMigrationDirName(deltaTimestamp, options.name ?? \"migration\");\n\t\t\tconst baselinePackageDir = join(appMigrationsDir, baselineDirName);\n\t\t\tconst deltaPackageDir = join(appMigrationsDir, deltaDirName);\n\t\t\tconst baselineLeg = await runPlannerLeg(planner, migrations, frameworkComponents, fromContract, null, aggregate.app.spaceId, aggregate, snapshotsImportPathFrom(baselinePackageDir, migrationsDir), resolveImportSpecifier);\n\t\t\tif (!baselineLeg.ok) return notOk(baselineLeg.failure);\n\t\t\tawait writePlannedMigrationPackage(baselinePackageDir, null, fromHash, baselineTimestamp, baselineLeg.value);\n\t\t\tawait writeContractSnapshot(migrationsDir, fromHash, {\n\t\t\t\tcontractJson: snapshotStartContract.contractJson,\n\t\t\t\tcontractDts: snapshotStartContract.contractDts\n\t\t\t});\n\t\t\tif (fromHash === toStorageHash) {\n\t\t\t\tconst baselineOps = baselineLeg.value.hasPlaceholders ? [] : baselineLeg.value.plannedOps;\n\t\t\t\tif (baselineLeg.value.hasPlaceholders) {\n\t\t\t\t\tconst baselineDir = relative(cwd, baselinePackageDir);\n\t\t\t\t\treturn ok({\n\t\t\t\t\t\tok: true,\n\t\t\t\t\t\tnoOp: false,\n\t\t\t\t\t\tfrom: fromHash,\n\t\t\t\t\t\tto: toStorageHash,\n\t\t\t\t\t\tdir: baselineDir,\n\t\t\t\t\t\tbaselineDir,\n\t\t\t\t\t\toperations: [],\n\t\t\t\t\t\temittedExtensionDirs,\n\t\t\t\t\t\tpendingPlaceholders: true,\n\t\t\t\t\t\tsummary: \"Planned baseline with placeholder(s) — edit migration.ts then run `node migration.ts` to self-emit\",\n\t\t\t\t\t\ttimings: { total: Date.now() - startTime }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst preview = hasOperationPreview(familyInstance) ? familyInstance.toOperationPreview(baselineOps) : void 0;\n\t\t\t\treturn ok({\n\t\t\t\t\tok: true,\n\t\t\t\t\tnoOp: false,\n\t\t\t\t\tfrom: fromHash,\n\t\t\t\t\tto: toStorageHash,\n\t\t\t\t\tbaselineDir: relative(cwd, baselinePackageDir),\n\t\t\t\t\toperations: baselineOps.map((op) => ({\n\t\t\t\t\t\tid: op.id,\n\t\t\t\t\t\tlabel: op.label,\n\t\t\t\t\t\toperationClass: op.operationClass\n\t\t\t\t\t})),\n\t\t\t\t\temittedExtensionDirs,\n\t\t\t\t\t...preview !== void 0 ? { preview } : {},\n\t\t\t\t\tsummary: buildAutoBaselinePlanSummary(0, emittedExtensionDirs.length),\n\t\t\t\t\ttimings: { total: Date.now() - startTime }\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst deltaLeg = await runPlannerLeg(planner, migrations, frameworkComponents, aggregate.app.contract(), fromContract, aggregate.app.spaceId, aggregate, snapshotsImportPathFrom(deltaPackageDir, migrationsDir), resolveImportSpecifier);\n\t\t\tif (!deltaLeg.ok) return notOk(deltaLeg.failure);\n\t\t\tawait writePlannedMigrationPackage(deltaPackageDir, fromHash, toStorageHash, deltaTimestamp, deltaLeg.value);\n\t\t\tawait writeDestinationSnapshot(toStorageHash);\n\t\t\tawait writeContractSnapshot(migrationsDir, fromHash, {\n\t\t\t\tcontractJson: snapshotStartContract.contractJson,\n\t\t\t\tcontractDts: snapshotStartContract.contractDts\n\t\t\t});\n\t\t\tconst deltaOps = deltaLeg.value.hasPlaceholders ? [] : deltaLeg.value.plannedOps;\n\t\t\tif (deltaLeg.value.hasPlaceholders) return ok({\n\t\t\t\tok: true,\n\t\t\t\tnoOp: false,\n\t\t\t\tfrom: fromHash,\n\t\t\t\tto: toStorageHash,\n\t\t\t\tdir: relative(cwd, deltaPackageDir),\n\t\t\t\tbaselineDir: relative(cwd, baselinePackageDir),\n\t\t\t\toperations: [],\n\t\t\t\temittedExtensionDirs,\n\t\t\t\tpendingPlaceholders: true,\n\t\t\t\tsummary: \"Planned baseline + migration with placeholder(s) — edit migration.ts then run `node migration.ts` to self-emit\",\n\t\t\t\ttimings: { total: Date.now() - startTime }\n\t\t\t});\n\t\t\tconst preview = hasOperationPreview(familyInstance) ? familyInstance.toOperationPreview(deltaOps) : void 0;\n\t\t\treturn ok({\n\t\t\t\tok: true,\n\t\t\t\tnoOp: false,\n\t\t\t\tfrom: fromHash,\n\t\t\t\tto: toStorageHash,\n\t\t\t\tdir: relative(cwd, deltaPackageDir),\n\t\t\t\tbaselineDir: relative(cwd, baselinePackageDir),\n\t\t\t\toperations: deltaOps.map((op) => ({\n\t\t\t\t\tid: op.id,\n\t\t\t\t\tlabel: op.label,\n\t\t\t\t\toperationClass: op.operationClass\n\t\t\t\t})),\n\t\t\t\temittedExtensionDirs,\n\t\t\t\t...preview !== void 0 ? { preview } : {},\n\t\t\t\tsummary: buildAutoBaselinePlanSummary(deltaOps.length, emittedExtensionDirs.length),\n\t\t\t\ttimings: { total: Date.now() - startTime }\n\t\t\t});\n\t\t}\n\t\tconst timestamp = /* @__PURE__ */ new Date();\n\t\tconst packageDir = join(appMigrationsDir, formatMigrationDirName(timestamp, options.name ?? \"migration\"));\n\t\tconst deltaLeg = await runPlannerLeg(planner, migrations, frameworkComponents, aggregate.app.contract(), fromContract, aggregate.app.spaceId, aggregate, snapshotsImportPathFrom(packageDir, migrationsDir), resolveImportSpecifier);\n\t\tif (!deltaLeg.ok) return notOk(deltaLeg.failure);\n\t\tawait writePlannedMigrationPackage(packageDir, fromHash, toStorageHash, timestamp, deltaLeg.value);\n\t\tawait writeDestinationSnapshot(toStorageHash);\n\t\tif (snapshotStartContract !== null) await writeContractSnapshot(migrationsDir, snapshotStartContract.fromHash, {\n\t\t\tcontractJson: snapshotStartContract.contractJson,\n\t\t\tcontractDts: snapshotStartContract.contractDts\n\t\t});\n\t\tif (deltaLeg.value.hasPlaceholders) return ok({\n\t\t\tok: true,\n\t\t\tnoOp: false,\n\t\t\tfrom: fromHash,\n\t\t\tto: toStorageHash,\n\t\t\tdir: relative(cwd, packageDir),\n\t\t\toperations: [],\n\t\t\temittedExtensionDirs,\n\t\t\tpendingPlaceholders: true,\n\t\t\tsummary: \"Planned migration with placeholder(s) — edit migration.ts then run `node migration.ts` to self-emit\",\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t\tconst plannedOps = deltaLeg.value.plannedOps;\n\t\tconst preview = hasOperationPreview(familyInstance) ? familyInstance.toOperationPreview(plannedOps) : void 0;\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tnoOp: false,\n\t\t\tfrom: fromHash,\n\t\t\tto: toStorageHash,\n\t\t\tdir: relative(cwd, packageDir),\n\t\t\toperations: plannedOps.map((op) => ({\n\t\t\t\tid: op.id,\n\t\t\t\tlabel: op.label,\n\t\t\t\toperationClass: op.operationClass\n\t\t\t})),\n\t\t\temittedExtensionDirs,\n\t\t\t...preview !== void 0 ? { preview } : {},\n\t\t\tsummary: buildPlanSummary(plannedOps.length, emittedExtensionDirs.length),\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\treturn notOk(errorUnexpected(message, { why: `Unexpected error during migration plan: ${message}` }));\n\t}\n}\n/**\n* Compose the success-line summary so the cross-space side effect\n* (extension-space migration packages materialised on disk during\n* this `plan` run) is visible in the top line — not just in the\n* step log above it.\n*\n* Example outputs:\n* - `Planned 3 operation(s)` (app-space-only project)\n* - `Planned 3 operation(s); materialised 1 extension-space migration` (one extension)\n* - `Planned 3 operation(s); materialised 2 extension-space migrations` (two extensions)\n*\n* Locks AC3 at the summary-line level: a reader of the success line\n* can tell that something happened beyond the app space.\n*/\nfunction buildPlanSummary(plannedOpsCount, emittedExtensionDirsCount) {\n\tconst base = `Planned ${plannedOpsCount} operation(s)`;\n\tif (emittedExtensionDirsCount === 0) return base;\n\treturn `${base}; materialised ${emittedExtensionDirsCount} ${emittedExtensionDirsCount === 1 ? \"extension-space migration\" : \"extension-space migrations\"}`;\n}\nfunction buildAutoBaselinePlanSummary(deltaOpsCount, emittedExtensionDirsCount) {\n\tconst base = `Planned baseline + ${deltaOpsCount} operation(s)`;\n\tif (emittedExtensionDirsCount === 0) return base;\n\treturn `${base}; materialised ${emittedExtensionDirsCount} ${emittedExtensionDirsCount === 1 ? \"extension-space migration\" : \"extension-space migrations\"}`;\n}\n//#endregion\nexport { runContractSpaceSeedPhase as i, resolveFromForPlan as n, resolveToForPlan as r, executeMigrationPlanCommand as t };\n\n//# sourceMappingURL=migration-plan-DrCTzrXH.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,eAAe,0BAA0B,QAAQ;CAChD,MAAM,UAAU,cAAc,OAAO,WAAW,QAAQ,SAAS,KAAK,kBAAkB,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU;EAC9G,SAAS,KAAK;EACd,eAAe;EACf,aAAa,KAAK,cAAc;EAChC,QAAQ,KAAK;CACd,EAAE,IAAI,UAAU,MAAM,OAAO,UAAU;CACvC,MAAM,oCAAoC,IAAI,IAAI;CAClD,KAAK,MAAM,QAAQ,OAAO,YAAY,IAAI,KAAK,kBAAkB,KAAK,GAAG,kBAAkB,IAAI,KAAK,IAAI,KAAK,aAAa;CAC1H,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,SAAS,SAAS;EAC5B,MAAM,aAAa,kBAAkB,IAAI,MAAM,OAAO;EACtD,IAAI,eAAe,KAAK,GAAG;EAC3B,MAAM,aAAa,MAAM,yBAAyB,OAAO,eAAe,MAAM,OAAO,EAAA,EAAI,QAAQ;EACjG,MAAM,2BAA2B,OAAO,eAAe,MAAM,SAAS;GACrE,UAAU,WAAW;GACrB,aAAa,4BAA4B,MAAM,OAAO;GACtD,SAA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ACxC,IAAI,8BAA8B,GAAG,OAAO;CAC5C,OAAO,GAAG,KAAK,iBAAiB,0BAA0B,GAAG,8BAA8B,IAAI,8BAA8B;AAC9H;AACA,SAAS,6BAA6B,eAAe,2BAA2B;CAC/E,MAAM,OAAO,sBAAsB,cAAc;CACjD,IAAI,8BAA8B,GAAG,OAAO;CAC5C,OAAO,GAAG,KAAK,iBAAiB,0BAA0B,GAAG,8BAA8B,IAAI,8BAA8B;AAC9H"}
@@ -1,12 +1,13 @@
1
- import { t as CliStructuredError$1 } from "./cli-errors-CDr3WcJP-NFry5GHb.mjs";
1
+ import { t as CliStructuredError$1 } from "./cli-errors-C7vbvQuK-DLpSxz4U.mjs";
2
2
  import { t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
3
3
  import { t as CommonCommandOptions } from "./global-flags-BpoOYtNZ-CHZD3fud.mjs";
4
4
  import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
5
5
  import "./metadata-BtscDay2.mjs";
6
6
  import "./package-N9PPdFV_.mjs";
7
- import { Result } from "@prisma/orm-framework/utils/result";
8
7
  import { OperationPreview } from "@prisma/orm-framework/components/control";
9
- //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-BsOYRogP.d.mts
8
+ import { Result } from "@prisma/orm-framework/utils/result";
9
+ import { PrismaNextConfig } from "@prisma/orm-framework/config/config-types";
10
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-t2e_8yD2.d.mts
10
11
  //#region src/control-api/operations/contract-space-seed-phase.d.ts
11
12
  /**
12
13
  * In-memory authored migration package shipped by an extension descriptor.
@@ -96,7 +97,11 @@ declare function runContractSpaceSeedPhase(inputs: ContractSpaceSeedPhaseInputs)
96
97
  //#endregion
97
98
  //#region src/control-api/operations/migration-plan.d.ts
98
99
  interface MigrationPlanOptions extends CommonCommandOptions {
99
- readonly config?: string;
100
+ readonly config: PrismaNextConfig;
101
+ /** Directory the command was invoked from. */
102
+ readonly cwd: string;
103
+ /** `--config` as the user wrote it, used only to locate project paths and for display. */
104
+ readonly configPath?: string;
100
105
  readonly name?: string;
101
106
  readonly from?: string;
102
107
  readonly to?: string;
@@ -156,4 +161,4 @@ declare function executeMigrationPlanCommand(options: MigrationPlanOptions, star
156
161
  }): Promise<Result<MigrationPlanResult, CliStructuredError$1>>;
157
162
  //#endregion
158
163
  export { executeMigrationPlanCommand as a, MigrationPlanResult as i, ContractSpaceSeedPhaseRecord as n, runContractSpaceSeedPhase as o, ContractSpaceSeedPhaseResult as r, ContractSpaceSeedPhaseInputs as t };
159
- //# sourceMappingURL=migration-plan-BsOYRogP-CC1UFAbu.d.mts.map
164
+ //# sourceMappingURL=migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-plan-t2e_8yD2-w5Ffa0V_.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-plan-t2e_8yD2.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;UAgBU;WACC;WACA,UAAU;WACV,KAAK;;;;;;;UAON;WACC;WACA;aACE;aACA;eACE;eACA;;aAEF,qBAAqB;;;UAGxB;WACC;WACA,YAAY,cAAc;;;;;;;;;;;;;;;;;UAiB3B;WACC;WACA;WACA;WACA;WACA;;UAED;WACC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BX,0BAA0B,QAAQ,+BAA+B,QAAQ;;;UAGhF,6BAA6B;WAC5B,QAAQ;;WAER;;WAEA;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;WAaA;aACE;aACA;;WAEF;aACE;aACA;aACA;;;;;;;WAOF,UAAU;WACV;;;;;;WAMA;WACA;aACE;;;iBAGI,4BAA4B,SAAS,sBAAsB,mBAAmB;WACpF,qBAAqB;aACnB;aACA;aACA;;WAEF,YAAY,QAAQ;IAC3B,QAAQ,OAAO,qBAAqB"}
@@ -1,17 +1,19 @@
1
- import { H as formatMigrationShowOutput, N as errorUnexpected, O as errorRuntime$1, W as formatStyledHeader, ct as setCommandSeeAlso, d as errorContractValidationFailed, et as parseGlobalFlagsOrExit, h as errorFileNotFound, it as resolveMigrationPaths, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, rt as resolveContractPath, st as setCommandExamples } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
- import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
3
- import { a as loadContractSpaceAggregateForCli } from "./contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs";
4
- import { t as createControlClient } from "./client-Y6qbDk7X-BzKLmBZo.mjs";
5
- import { n as resolveMigrationRef } from "./ref-resolution-_S4xTT2L-BE5zgO2W.mjs";
6
- import { n as looksLikePath, r as resolveAppTargetPath, t as findPackageByDirPath } from "./migration-path-target-BPYp3LNc-DsDdLU0J.mjs";
1
+ import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
+ import { A as errorUnexpected, T as errorRuntime$1, o as errorContractValidationFailed, u as errorFileNotFound } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
3
+ import { n as createTerminalUI, u as formatMigrationShowOutput } from "./terminal-ui-ypPE9cN6-ilMBkmwT.mjs";
4
+ import { b as setCommandSeeAlso, g as resolveMigrationPaths, h as resolveContractPath, l as handleResult, o as formatStyledHeader, p as parseGlobalFlagsOrExit, t as addGlobalOptions, v as setCommandDescriptions, y as setCommandExamples } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
5
+ import { a as loadContractSpaceAggregateForCli } from "./contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs";
6
+ import { t as createControlClient } from "./client-milNsAnF-B92uF3yv.mjs";
7
+ import { n as resolveMigrationRef } from "./ref-resolution-BYCRg72z-DFhwf-XR.mjs";
8
+ import { n as looksLikePath, r as resolveAppTargetPath, t as findPackageByDirPath } from "./migration-path-target-DhGt62Mi-dm4TU1hJ.mjs";
7
9
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
8
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
9
10
  import { relative } from "pathe";
11
+ import { castAs } from "@prisma/orm-framework/utils/casts";
10
12
  import { readFile } from "node:fs/promises";
11
13
  import { APP_SPACE_ID, createControlStack } from "@prisma/orm-framework/components/control";
12
- import { castAs } from "@prisma/orm-framework/utils/casts";
14
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
13
15
  import { Command } from "commander";
14
- //#region ../../../1-framework/3-tooling/cli/dist/commands/migration-show.mjs
16
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-show-DRARjIbv.mjs
15
17
  function pkgToPresent(spaceId, pkg, client) {
16
18
  const ops = castAs(pkg.ops);
17
19
  const rawPreview = client.toOperationPreview(ops) ?? { statements: [] };
@@ -31,8 +33,18 @@ function pkgToPresent(spaceId, pkg, client) {
31
33
  };
32
34
  }
33
35
  async function executeMigrationShowCommand(target, options, flags, ui) {
34
- const config = await loadConfig(options.config);
35
- const { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.config, config);
36
+ const configResult = await loadConfigForSections(options.config, [
37
+ "family",
38
+ "target",
39
+ "adapter",
40
+ "driver",
41
+ "extensions",
42
+ "migrations",
43
+ "contract"
44
+ ]);
45
+ if (!configResult.ok) return configResult;
46
+ const config = configResult.value;
47
+ const { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.config, config, process.cwd());
36
48
  const contractPathAbsolute = resolveContractPath(config);
37
49
  const contractPath = relative(process.cwd(), contractPathAbsolute);
38
50
  if (!flags.json && !flags.quiet) {
@@ -172,4 +184,4 @@ function createMigrationShowCommand() {
172
184
  //#endregion
173
185
  export { createMigrationShowCommand as t };
174
186
 
175
- //# sourceMappingURL=migration-show-CW6EKtfw.mjs.map
187
+ //# sourceMappingURL=migration-show-DRARjIbv-1p6EE_Uw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-show-DRARjIbv-1p6EE_Uw.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-show-DRARjIbv.mjs"],"sourcesContent":["import { A as errorUnexpected, T as errorRuntime, o as errorContractValidationFailed, u as errorFileNotFound } from \"./cli-errors-kU09RUaz.mjs\";\nimport { l as formatMigrationShowOutput, t as createTerminalUI } from \"./terminal-ui-ypPE9cN6.mjs\";\nimport { _ as handleResult, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, o as resolveContractPath, s as resolveMigrationPaths, t as addGlobalOptions, u as setCommandExamples, x as formatStyledHeader } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { a as loadContractSpaceAggregateForCli } from \"./contract-space-aggregate-loader-DOzo1sk9.mjs\";\nimport { t as createControlClient } from \"./client-milNsAnF.mjs\";\nimport { n as resolveMigrationRef } from \"./ref-resolution-BYCRg72z.mjs\";\nimport { n as looksLikePath, r as resolveAppTargetPath, t as findPackageByDirPath } from \"./migration-path-target-DhGt62Mi.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { APP_SPACE_ID, createControlStack } from \"@internal/framework-components/control\";\nimport { castAs } from \"@internal/utils/casts\";\n//#region src/commands/migration-show.ts\nfunction pkgToPresent(spaceId, pkg, client) {\n\tconst ops = castAs(pkg.ops);\n\tconst rawPreview = client.toOperationPreview(ops) ?? { statements: [] };\n\treturn {\n\t\tspace: spaceId,\n\t\tname: pkg.dirName,\n\t\tfromContract: pkg.metadata.from,\n\t\ttoContract: pkg.metadata.to,\n\t\thash: pkg.metadata.migrationHash,\n\t\tcreatedAt: pkg.metadata.createdAt,\n\t\toperations: ops.map((op) => ({\n\t\t\tid: op.id,\n\t\t\tlabel: op.label,\n\t\t\toperationClass: op.operationClass\n\t\t})),\n\t\tpreview: { statements: [...rawPreview.statements] }\n\t};\n}\nasync function executeMigrationShowCommand(target, options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath, migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.config, config, process.cwd());\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tconst contractPath = relative(process.cwd(), contractPathAbsolute);\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration show\",\n\t\t\tdescription: \"Display migration package contents\",\n\t\t\tdetails: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: configPath\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"contract\",\n\t\t\t\t\tvalue: contractPath\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\tvalue: appMigrationsRelative\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"target\",\n\t\t\t\t\tvalue: target\n\t\t\t\t}\n\t\t\t],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t}\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\t...ifDefined(\"driver\", config.driver),\n\t\textensions: config.extensions ?? []\n\t});\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorFileNotFound(contractPathAbsolute, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: `Run \\`prisma-next contract emit\\` to generate ${contractPath}`\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: \"Failed to read contract file\" }));\n\t}\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tlet appContract;\n\ttry {\n\t\tappContract = familyInstance.deserializeContract(castAs(JSON.parse(contractJsonContent)));\n\t} catch (error) {\n\t\treturn notOk(errorContractValidationFailed(`Contract at ${contractPathAbsolute} failed to deserialize: ${error instanceof Error ? error.message : String(error)}`, { where: { path: contractPathAbsolute } }));\n\t}\n\tconst loadedAggregate = await loadContractSpaceAggregateForCli({\n\t\ttargetId: config.target.targetId,\n\t\tmigrationsDir,\n\t\tappContract,\n\t\textensions: [],\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!loadedAggregate.ok) return notOk(loadedAggregate.failure);\n\tconst aggregate = loadedAggregate.value;\n\tconst packages = aggregate.app.packages;\n\tconst graph = aggregate.app.graph();\n\tconst refs = aggregate.app.refs;\n\tlet appPkg;\n\tif (looksLikePath(target)) {\n\t\tconst resolved = resolveAppTargetPath(target, appMigrationsDir, appMigrationsRelative);\n\t\tif (!resolved.ok) return resolved;\n\t\tconst matched = findPackageByDirPath(packages, resolved.value);\n\t\tif (!matched) return notOk(errorRuntime(\"MIGRATION.PACKAGE_NOT_FOUND\", \"Migration package not found\", {\n\t\t\twhy: `No loaded migration package at ${relative(process.cwd(), resolved.value)}`,\n\t\t\tfix: \"Pass a directory name, hash prefix, or path to an on-disk app-space migration package.\"\n\t\t}));\n\t\tappPkg = matched;\n\t} else {\n\t\tif (packages.length === 0) return notOk(errorRuntime(\"MIGRATION.NO_MIGRATIONS\", \"No migrations found\", {\n\t\t\twhy: `No migration packages found in ${appMigrationsRelative}`,\n\t\t\tfix: \"Run `prisma-next migration plan` to create a migration first.\"\n\t\t}));\n\t\tconst migResult = resolveMigrationRef(target, {\n\t\t\tgraph,\n\t\t\trefs\n\t\t});\n\t\tif (!migResult.ok) return notOk(migResult.failure);\n\t\tconst matchedPkg = packages.find((p) => p.metadata.migrationHash === migResult.value.migrationHash);\n\t\tif (!matchedPkg) return notOk(errorRuntime(\"MIGRATION.PACKAGE_NOT_FOUND\", \"Migration package not found\", {\n\t\t\twhy: `Resolved migration \"${migResult.value.dirName}\" but the package was not loaded`,\n\t\t\tfix: \"The migrations directory may be corrupted. Inspect the migration.json files.\"\n\t\t}));\n\t\tappPkg = matchedPkg;\n\t}\n\tconst migration = pkgToPresent(APP_SPACE_ID, appPkg, client);\n\treturn ok({\n\t\tok: true,\n\t\tsummary: `Migration ${migration.name} in ${migration.space}: ${migration.operations.length} operation(s)`,\n\t\tmigration\n\t});\n}\nfunction createMigrationShowCommand() {\n\tconst command = new Command(\"show\");\n\tsetCommandDescriptions(command, \"Display migration package contents\", \"Shows the operations, statement preview, and metadata for one app-space migration.\\nAccepts a directory path, directory name, or hash prefix.\\nOffline — does not consult the database.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration show 20260101_100000_add_user\",\n\t\t\"prisma-next migration show a1b2c3\",\n\t\t\"prisma-next migration show 20260101_100000_add_user --json\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration log\",\n\t\t\toneLiner: \"Show executed migration history\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration list\",\n\t\t\toneLiner: \"List on-disk migrations\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).argument(\"<target>\", \"Migration reference: directory name, hash/prefix, ref, or path\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (target, options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeMigrationShowCommand(target, options, flags, ui), flags, ui, (showResult) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(showResult, null, 2));\n\t\t\telse if (!flags.quiet) ui.log(formatMigrationShowOutput(showResult, flags));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createMigrationShowCommand as t };\n\n//# sourceMappingURL=migration-show-DRARjIbv.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,aAAa,SAAS,KAAK,QAAQ;CAC3C,MAAM,MAAM,OAAO,IAAI,GAAG;CAC1B,MAAM,aAAa,OAAO,mBAAmB,GAAG,KAAK,EAAE,YAAY,CAAC,EAAE;CACtE,OAAO;EACN,OAAO;EACP,MAAM,IAAI;EACV,cAAc,IAAI,SAAS;EAC3B,YAAY,IAAI,SAAS;EACzB,MAAM,IAAI,SAAS;EACnB,WAAW,IAAI,SAAS;EACxB,YAAY,IAAI,KAAK,QAAQ;GAC5B,IAAI,GAAG;GACP,OAAO,GAAG;GACV,gBAAgB,GAAG;EACpB,EAAE;EACF,SAAS,EAAE,YAAY,CAAC,GAAG,WAAW,UAAU,EAAE;CACnD;AACD;AACA,eAAe,4BAA4B,QAAQ,SAAS,OAAO,IAAI;CACtE,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,EAAE,YAAY,eAAe,kBAAkB,0BAA0B,sBAAsB,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAC1I,MAAM,uBAAuB,oBAAoB,MAAM;CACvD,MAAM,eAAe,SAAS,QAAQ,IAAI,GAAG,oBAAoB;CACjE,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;EAChC,MAAM,SAAS,mBAAmB;GACjC,SAAS;GACT,aAAa;GACb,SAAS;IACR;KACC,OAAO;KACP,OAAO;IACR;IACA;KACC,OAAO;KACP,OAAO;IACR;I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