@prisma/orm-toolchain 8.0.0-rc.1-dev.32 → 8.0.0-rc.1-dev.34

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 (146) hide show
  1. package/dist/bin__prisma-next.mjs +24 -24
  2. package/dist/bin__prisma-next.mjs.map +1 -1
  3. package/dist/{caught-errors-B_oGFiYw-BqX49eW0.mjs → caught-errors-BZ-9WASe-DH4DaDha.mjs} +3 -3
  4. package/dist/{caught-errors-B_oGFiYw-BqX49eW0.mjs.map → caught-errors-BZ-9WASe-DH4DaDha.mjs.map} +1 -1
  5. package/dist/{cli-errors-CihMAEVj-C1uUYBop.mjs → cli-errors-C6_pH59O-CzD4SYcJ.mjs} +4 -3
  6. package/dist/{cli-errors-CihMAEVj-C1uUYBop.mjs.map → cli-errors-C6_pH59O-CzD4SYcJ.mjs.map} +1 -1
  7. package/dist/{cli-errors-C8DGzS94-CPP3UmRT.d.mts → cli-errors-f5PRtVdm-C6xVKeQn.d.mts} +8 -3
  8. package/dist/cli-errors-f5PRtVdm-C6xVKeQn.d.mts.map +1 -0
  9. package/dist/cli.mjs +961 -27
  10. package/dist/cli.mjs.map +1 -1
  11. package/dist/cli__commands__contract-emit.mjs +1 -1
  12. package/dist/cli__commands__contract-infer.mjs +1 -1
  13. package/dist/cli__commands__db-init.mjs +1 -1
  14. package/dist/cli__commands__db-schema.mjs +1 -1
  15. package/dist/cli__commands__db-sign.mjs +1 -1
  16. package/dist/cli__commands__db-update.mjs +1 -1
  17. package/dist/cli__commands__db-verify.mjs +1 -1
  18. package/dist/cli__commands__migrate.d.mts +2 -2
  19. package/dist/cli__commands__migrate.mjs +1 -1
  20. package/dist/cli__commands__migration-check.mjs +1 -1
  21. package/dist/cli__commands__migration-graph.d.mts +1 -1
  22. package/dist/cli__commands__migration-graph.mjs +1 -1
  23. package/dist/cli__commands__migration-list.d.mts +1 -1
  24. package/dist/cli__commands__migration-list.mjs +1 -1
  25. package/dist/cli__commands__migration-log.d.mts +1 -1
  26. package/dist/cli__commands__migration-log.mjs +1 -1
  27. package/dist/cli__commands__migration-new.mjs +1 -1
  28. package/dist/cli__commands__migration-plan.d.mts +1 -1
  29. package/dist/cli__commands__migration-plan.mjs +1 -1
  30. package/dist/cli__commands__migration-show.mjs +1 -1
  31. package/dist/cli__commands__migration-status.d.mts +1 -1
  32. package/dist/cli__commands__migration-status.mjs +1 -1
  33. package/dist/cli__commands__ref.mjs +1 -1
  34. package/dist/cli__commands__telemetry.mjs +1 -1
  35. package/dist/cli__control-api.d.mts +3 -3
  36. package/dist/cli__control-api.mjs +15 -15
  37. package/dist/cli__control-api__testing.d.mts +1 -1
  38. package/dist/{client-C4Gh4PBz-BMUlBcuE.mjs → client-BqhVohc5-DFRVWFps.mjs} +5 -5
  39. package/dist/{client-C4Gh4PBz-BMUlBcuE.mjs.map → client-BqhVohc5-DFRVWFps.mjs.map} +1 -1
  40. package/dist/{command-helpers-Dw3LDEu_-B4AETH4D.mjs → command-helpers-kD9CO1hd-BPhnkBin.mjs} +4 -4
  41. package/dist/{command-helpers-Dw3LDEu_-B4AETH4D.mjs.map → command-helpers-kD9CO1hd-BPhnkBin.mjs.map} +1 -1
  42. package/dist/{contract-at-errors-BsQiGdZC-D8l9-WWt.mjs → contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs} +3 -3
  43. package/dist/{contract-at-errors-BsQiGdZC-D8l9-WWt.mjs.map → contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs.map} +1 -1
  44. package/dist/{contract-emit-CIdgw3Kq-BcfYaUfn.mjs → contract-emit-BlvUNMHM-BEioUVR5.mjs} +6 -6
  45. package/dist/{contract-emit-CIdgw3Kq-BcfYaUfn.mjs.map → contract-emit-BlvUNMHM-BEioUVR5.mjs.map} +1 -1
  46. package/dist/{contract-emit-WIAaN0lC-DKOdtrUQ.mjs → contract-emit-CrYO0A8x-60BOqXFr.mjs} +5 -5
  47. package/dist/{contract-emit-WIAaN0lC-DKOdtrUQ.mjs.map → contract-emit-CrYO0A8x-60BOqXFr.mjs.map} +1 -1
  48. package/dist/contract-emit-Csa6R0gt-DvxFlS0O.mjs +2 -0
  49. package/dist/{contract-infer-xOEwVWds-CE5gw1PF.mjs → contract-infer-C8kLphsm-C7-AIYMc.mjs} +5 -5
  50. package/dist/{contract-infer-xOEwVWds-CE5gw1PF.mjs.map → contract-infer-C8kLphsm-C7-AIYMc.mjs.map} +1 -1
  51. package/dist/{contract-snapshot-resolution-BnH6_mw7-BrzAsS93.mjs → contract-snapshot-resolution-BUUdIcgG-8mbs6-OD.mjs} +4 -4
  52. package/dist/{contract-snapshot-resolution-BnH6_mw7-BrzAsS93.mjs.map → contract-snapshot-resolution-BUUdIcgG-8mbs6-OD.mjs.map} +1 -1
  53. package/dist/{contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs → contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs} +4 -4
  54. package/dist/{contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs.map → contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs.map} +1 -1
  55. package/dist/{db-init-CEk9Utl4-vGmJajwZ.mjs → db-init-CyNsXRAB-D3xWQ-vy.mjs} +7 -39
  56. package/dist/db-init-CyNsXRAB-D3xWQ-vy.mjs.map +1 -0
  57. package/dist/db-init-failure-XYOVL4o7-BitY_JYn.mjs +44 -0
  58. package/dist/db-init-failure-XYOVL4o7-BitY_JYn.mjs.map +1 -0
  59. package/dist/{db-schema-D_PJvBI3-BTnfCqbX.mjs → db-schema-7zNGHgYN-BVaRHPxg.mjs} +6 -6
  60. package/dist/{db-schema-D_PJvBI3-BTnfCqbX.mjs.map → db-schema-7zNGHgYN-BVaRHPxg.mjs.map} +1 -1
  61. package/dist/{db-sign-Bparnnii-Yd5pb4VF.mjs → db-sign-DAs6J3XG-xxP2CCnO.mjs} +8 -8
  62. package/dist/{db-sign-Bparnnii-Yd5pb4VF.mjs.map → db-sign-DAs6J3XG-xxP2CCnO.mjs.map} +1 -1
  63. package/dist/{db-update-CsKZyDYp-B8Zl7W4k.mjs → db-update-BX1sOuQk-CpeLgPeN.mjs} +7 -7
  64. package/dist/{db-update-CsKZyDYp-B8Zl7W4k.mjs.map → db-update-BX1sOuQk-CpeLgPeN.mjs.map} +1 -1
  65. package/dist/{db-verify-B33E7HXH-D87fiNt3.mjs → db-verify-CN4nmxxF-DSRWae0u.mjs} +7 -7
  66. package/dist/{db-verify-B33E7HXH-D87fiNt3.mjs.map → db-verify-CN4nmxxF-DSRWae0u.mjs.map} +1 -1
  67. package/dist/{format-CYdgHub4-Cs6VcFje.mjs → format-D5x0jz7q-xalz6Fkn.mjs} +5 -5
  68. package/dist/{format-CYdgHub4-Cs6VcFje.mjs.map → format-D5x0jz7q-xalz6Fkn.mjs.map} +1 -1
  69. package/dist/{framework-components-CXxMNF8E-C-g2cchI.mjs → framework-components-CPFWl2Ix-CrIZL3jG.mjs} +3 -3
  70. package/dist/{framework-components-CXxMNF8E-C-g2cchI.mjs.map → framework-components-CPFWl2Ix-CrIZL3jG.mjs.map} +1 -1
  71. package/dist/{init-B8U_9kn7-CdhTYHfO.mjs → init-BvLCfVjC-DOPO-TLF.mjs} +5 -5
  72. package/dist/{init-B8U_9kn7-CdhTYHfO.mjs.map → init-BvLCfVjC-DOPO-TLF.mjs.map} +1 -1
  73. package/dist/{inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs → inspect-live-schema-BaLAtOgO-Bs0gs_yP.mjs} +5 -5
  74. package/dist/{inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs.map → inspect-live-schema-BaLAtOgO-Bs0gs_yP.mjs.map} +1 -1
  75. package/dist/{invariants-CsxL0lbZ-B9Hfpj2R.mjs → invariants-1L2zfc6--BpedlAbF.mjs} +4 -4
  76. package/dist/{invariants-CsxL0lbZ-B9Hfpj2R.mjs.map → invariants-1L2zfc6--BpedlAbF.mjs.map} +1 -1
  77. package/dist/{legend-QYDKKevn-DCIlAPn4.mjs → legend-aXC5H1jH-Dg1yWonK.mjs} +3 -3
  78. package/dist/{legend-QYDKKevn-DCIlAPn4.mjs.map → legend-aXC5H1jH-Dg1yWonK.mjs.map} +1 -1
  79. package/dist/{migrate-DYx_CSbN-BuQ0lk-0.mjs → migrate-DRiUHRCS-Cci6EEZv.mjs} +32 -79
  80. package/dist/migrate-DRiUHRCS-Cci6EEZv.mjs.map +1 -0
  81. package/dist/migrate-failure-Bdr3AJee-C9yNeQXy.mjs +96 -0
  82. package/dist/migrate-failure-Bdr3AJee-C9yNeQXy.mjs.map +1 -0
  83. package/dist/{migrate-show-DWIvU6Y_-BQyWhZD1.d.mts → migrate-show-DutwCc2F-BhGfH7D-.d.mts} +5 -3
  84. package/dist/migrate-show-DutwCc2F-BhGfH7D-.d.mts.map +1 -0
  85. package/dist/{migrate-show-CPZEq35I-DeL3WVjs.mjs → migrate-show-bdXjSFgh-CQxl5yNp.mjs} +7 -7
  86. package/dist/migrate-show-bdXjSFgh-CQxl5yNp.mjs.map +1 -0
  87. package/dist/{migration-check-COMRj5eu-DbJgriA8.mjs → migration-check-aoZ8kXNA-DX2J84Cv.mjs} +7 -7
  88. package/dist/{migration-check-COMRj5eu-DbJgriA8.mjs.map → migration-check-aoZ8kXNA-DX2J84Cv.mjs.map} +1 -1
  89. package/dist/{migration-check-BUAcSrvA-DSS5Yvco.mjs → migration-check-of-RPYRk-HuXtDO8i.mjs} +6 -6
  90. package/dist/{migration-check-BUAcSrvA-DSS5Yvco.mjs.map → migration-check-of-RPYRk-HuXtDO8i.mjs.map} +1 -1
  91. package/dist/{migration-command-scaffold-CIMPoR6f-Ba-S9gXa.mjs → migration-command-scaffold-zJFTGn5k-5AGczeSx.mjs} +5 -5
  92. package/dist/{migration-command-scaffold-CIMPoR6f-Ba-S9gXa.mjs.map → migration-command-scaffold-zJFTGn5k-5AGczeSx.mjs.map} +1 -1
  93. package/dist/{migration-graph-BsGstA5L-BQiNbrkP.mjs → migration-graph-D0KHjNJ--CWzX9Zzc.mjs} +10 -10
  94. package/dist/{migration-graph-BsGstA5L-BQiNbrkP.mjs.map → migration-graph-D0KHjNJ--CWzX9Zzc.mjs.map} +1 -1
  95. package/dist/{migration-graph-BtP1Va3T-C8PpuaYw.mjs → migration-graph-DmdVVJoZ-DDBKjUMz.mjs} +3 -3
  96. package/dist/{migration-graph-BtP1Va3T-C8PpuaYw.mjs.map → migration-graph-DmdVVJoZ-DDBKjUMz.mjs.map} +1 -1
  97. package/dist/{migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs → migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs} +5 -5
  98. package/dist/{migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs.map → migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs.map} +1 -1
  99. package/dist/{migration-graph-sections-CceYWPCP-LqImOaK1.mjs → migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs} +4 -4
  100. package/dist/{migration-graph-sections-CceYWPCP-LqImOaK1.mjs.map → migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs.map} +1 -1
  101. package/dist/{migration-list-BiVyonwG-CdMbBV5Z.mjs → migration-list-B0SANIeM-DiXQ9LyS.mjs} +8 -8
  102. package/dist/{migration-list-BiVyonwG-CdMbBV5Z.mjs.map → migration-list-B0SANIeM-DiXQ9LyS.mjs.map} +1 -1
  103. package/dist/{migration-list-AKRIIovW-BN-Zrwk0.mjs → migration-list-W0dqabIj-Dc2NH_LY.mjs} +3 -3
  104. package/dist/{migration-list-AKRIIovW-BN-Zrwk0.mjs.map → migration-list-W0dqabIj-Dc2NH_LY.mjs.map} +1 -1
  105. package/dist/{migration-log-Z3-L172x-CvQTNJvI.mjs → migration-log-B3iiP8ns-B4tdLSye.mjs} +9 -9
  106. package/dist/{migration-log-Z3-L172x-CvQTNJvI.mjs.map → migration-log-B3iiP8ns-B4tdLSye.mjs.map} +1 -1
  107. package/dist/{migration-log-table-JR7fFVbE-DR2mom6h.mjs → migration-log-table-DRiOnvzf-zTQBThqe.mjs} +3 -3
  108. package/dist/{migration-log-table-JR7fFVbE-DR2mom6h.mjs.map → migration-log-table-DRiOnvzf-zTQBThqe.mjs.map} +1 -1
  109. package/dist/{migration-new-DDnQd7Ql-1WT_J_zf.mjs → migration-new-Bf5K9fNK-Cd90rYmm.mjs} +5 -5
  110. package/dist/{migration-new-DDnQd7Ql-1WT_J_zf.mjs.map → migration-new-Bf5K9fNK-Cd90rYmm.mjs.map} +1 -1
  111. package/dist/{migration-new-ZlgxFcbH-CxlZs2hr.mjs → migration-new-YSdtJTRp-Dc06LNJe.mjs} +7 -7
  112. package/dist/{migration-new-ZlgxFcbH-CxlZs2hr.mjs.map → migration-new-YSdtJTRp-Dc06LNJe.mjs.map} +1 -1
  113. package/dist/{migration-path-target-yA4h5Zc6-DlzBblBG.mjs → migration-path-target-5r1leSW5-B0EMgvEv.mjs} +3 -3
  114. package/dist/{migration-path-target-yA4h5Zc6-DlzBblBG.mjs.map → migration-path-target-5r1leSW5-B0EMgvEv.mjs.map} +1 -1
  115. package/dist/{migration-plan-s94qwFHi-86F_Aklp.d.mts → migration-plan-4cnnP6yM-DXzRfi_A.d.mts} +3 -3
  116. package/dist/{migration-plan-s94qwFHi-86F_Aklp.d.mts.map → migration-plan-4cnnP6yM-DXzRfi_A.d.mts.map} +1 -1
  117. package/dist/{migration-plan-DiLJTAep-2B463CwW.mjs → migration-plan-CZY8HVCh-BbfQvxnb.mjs} +8 -8
  118. package/dist/{migration-plan-DiLJTAep-2B463CwW.mjs.map → migration-plan-CZY8HVCh-BbfQvxnb.mjs.map} +1 -1
  119. package/dist/{migration-plan-CROSunPS-B66Rh_6T.mjs → migration-plan-oterbw8h-_GrKbsRb.mjs} +5 -5
  120. package/dist/{migration-plan-CROSunPS-B66Rh_6T.mjs.map → migration-plan-oterbw8h-_GrKbsRb.mjs.map} +1 -1
  121. package/dist/{migration-show-mJD52S2d-DiD-rCBB.mjs → migration-show-iX2cduR4-C3-FENR4.mjs} +9 -9
  122. package/dist/{migration-show-mJD52S2d-DiD-rCBB.mjs.map → migration-show-iX2cduR4-C3-FENR4.mjs.map} +1 -1
  123. package/dist/{migration-status-7Zawokrj-BwTcRAjf.mjs → migration-status-DCAQ3_C1-ofDvCvUk.mjs} +12 -12
  124. package/dist/{migration-status-7Zawokrj-BwTcRAjf.mjs.map → migration-status-DCAQ3_C1-ofDvCvUk.mjs.map} +1 -1
  125. package/dist/{project-import-root-Bkz1gPB2-jhrMFebo.mjs → project-import-root-BPuwl2j1-DTX9G73z.mjs} +3 -3
  126. package/dist/{project-import-root-Bkz1gPB2-jhrMFebo.mjs.map → project-import-root-BPuwl2j1-DTX9G73z.mjs.map} +1 -1
  127. package/dist/{ref-DftuSibc-CasZ6LgA.mjs → ref-CVD6j3jA-BAgpZLNM.mjs} +5 -5
  128. package/dist/{ref-DftuSibc-CasZ6LgA.mjs.map → ref-CVD6j3jA-BAgpZLNM.mjs.map} +1 -1
  129. package/dist/{ref-Cycefq_T-DQE5AM66.mjs → ref-CaqNqeRF-cjWFAueu.mjs} +5 -5
  130. package/dist/{ref-Cycefq_T-DQE5AM66.mjs.map → ref-CaqNqeRF-cjWFAueu.mjs.map} +1 -1
  131. package/dist/{ref-resolution-Bi4lpxM8-BbfL_yv8.mjs → ref-resolution-D4fAdXo8-Dfaky0yw.mjs} +3 -3
  132. package/dist/{ref-resolution-Bi4lpxM8-BbfL_yv8.mjs.map → ref-resolution-D4fAdXo8-Dfaky0yw.mjs.map} +1 -1
  133. package/dist/{telemetry-LP1Suxsf-CY1l7lD0.mjs → telemetry-fKuZOFpu-DNUWfIHo.mjs} +4 -4
  134. package/dist/{telemetry-LP1Suxsf-CY1l7lD0.mjs.map → telemetry-fKuZOFpu-DNUWfIHo.mjs.map} +1 -1
  135. package/dist/{terminal-ui-JJKxvT0q-CPDEJqqU.mjs → terminal-ui-Cqz4LVL7-B0mcVdLy.mjs} +3 -3
  136. package/dist/{terminal-ui-JJKxvT0q-CPDEJqqU.mjs.map → terminal-ui-Cqz4LVL7-B0mcVdLy.mjs.map} +1 -1
  137. package/dist/{verify-wUSBDQwh-Bv3NV9WG.mjs → verify-Cogr_Fj9-D3lCWA6t.mjs} +3 -3
  138. package/dist/{verify-wUSBDQwh-Bv3NV9WG.mjs.map → verify-Cogr_Fj9-D3lCWA6t.mjs.map} +1 -1
  139. package/dist/vite-plugin-contract-emit.mjs +1 -1
  140. package/package.json +12 -12
  141. package/dist/cli-errors-C8DGzS94-CPP3UmRT.d.mts.map +0 -1
  142. package/dist/contract-emit-BAfPwP3y-DfV1Stry.mjs +0 -2
  143. package/dist/db-init-CEk9Utl4-vGmJajwZ.mjs.map +0 -1
  144. package/dist/migrate-DYx_CSbN-BuQ0lk-0.mjs.map +0 -1
  145. package/dist/migrate-show-CPZEq35I-DeL3WVjs.mjs.map +0 -1
  146. package/dist/migrate-show-DWIvU6Y_-BQyWhZD1.d.mts.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { N as errorUnexpected, c as errorDatabaseConnectionRequired, t as CliStructuredError$1, u as errorDriverRequired } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
3
- import { f as maskConnectionUrl, n as closeQuietly, s as formatStyledHeader, v as sanitizeErrorMessage } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
2
+ import { N as errorUnexpected, c as errorDatabaseConnectionRequired, t as CliStructuredError$1, u as errorDriverRequired } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
3
+ import { f as maskConnectionUrl, n as closeQuietly, s as formatStyledHeader, v as sanitizeErrorMessage } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
4
4
  import { t as createProgressAdapter } from "./progress-adapter-CjAeTxY_-BXYSd1eY.mjs";
5
- import { t as createControlClient } from "./client-C4Gh4PBz-BMUlBcuE.mjs";
5
+ import { t as createControlClient } from "./client-BqhVohc5-DFRVWFps.mjs";
6
6
  import { relative, resolve } from "pathe";
7
7
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
8
- //#region ../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BAiaX0n9.mjs
8
+ //#region ../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BaLAtOgO.mjs
9
9
  async function inspectLiveSchema(options, flags, ui, startTime, context) {
10
10
  const configResult = await loadConfigForSections(options.config, [
11
11
  "family",
@@ -92,4 +92,4 @@ async function inspectLiveSchema(options, flags, ui, startTime, context) {
92
92
  //#endregion
93
93
  export { inspectLiveSchema as t };
94
94
 
95
- //# sourceMappingURL=inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs.map
95
+ //# sourceMappingURL=inspect-live-schema-BaLAtOgO-Bs0gs_yP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BAiaX0n9.mjs"],"sourcesContent":["import { M as errorUnexpected, l as errorDriverRequired, s as errorDatabaseConnectionRequired, t as CliStructuredError } from \"./cli-errors-CihMAEVj.mjs\";\nimport { S as formatStyledHeader, a as maskConnectionUrl, l as sanitizeErrorMessage, n as closeQuietly } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { t as createProgressAdapter } from \"./progress-adapter-CjAeTxY_.mjs\";\nimport { t as createControlClient } from \"./client-C4Gh4PBz.mjs\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\n//#region src/commands/inspect-live-schema.ts\nasync function inspectLiveSchema(options, flags, ui, startTime, context) {\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\"db\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst configPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\tif (!flags.json && !flags.quiet) {\n\t\tconst details = [{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: configPath\n\t\t}];\n\t\tif (options.db) details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(options.db)\n\t\t});\n\t\telse if (config.db?.connection && typeof config.db.connection === \"string\") details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(config.db.connection)\n\t\t});\n\t\tui.stderr(formatStyledHeader({\n\t\t\tcommand: context.commandName,\n\t\t\tdescription: context.description,\n\t\t\turl: context.url,\n\t\t\tdetails,\n\t\t\tflags\n\t\t}));\n\t}\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (!dbConnection) return notOk(errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for ${context.commandName} (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: context.commandName\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${context.commandName}` }));\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\tdriver: config.driver,\n\t\textensions: config.extensions ?? []\n\t});\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tconst schema = await client.introspect({\n\t\t\tconnection: dbConnection,\n\t\t\tonProgress\n\t\t});\n\t\tconst schemaView = client.toSchemaView(schema);\n\t\tconst pslContractAst = client.inferPslContract(schema);\n\t\tconst pslBlockDescriptors = client.getPslBlockDescriptors();\n\t\tconst dbUrl = typeof dbConnection === \"string\" ? maskConnectionUrl(dbConnection) : void 0;\n\t\treturn ok({\n\t\t\tconfig,\n\t\t\tschema,\n\t\t\tschemaView,\n\t\t\tpslContractAst,\n\t\t\tpslBlockDescriptors,\n\t\t\ttarget: {\n\t\t\t\tfamilyId: config.family.familyId,\n\t\t\t\tid: config.target.targetId\n\t\t\t},\n\t\t\tmeta: {\n\t\t\t\tconfigPath,\n\t\t\t\t...dbUrl ? { dbUrl } : {}\n\t\t\t},\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\tconst safeMessage = sanitizeErrorMessage(error instanceof Error ? error.message : String(error), typeof dbConnection === \"string\" ? dbConnection : void 0);\n\t\treturn notOk(errorUnexpected(safeMessage, { why: `Unexpected error during ${context.commandName}: ${safeMessage}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\n//#endregion\nexport { inspectLiveSchema as t };\n\n//# sourceMappingURL=inspect-live-schema-BAiaX0n9.mjs.map"],"mappings":";;;;;;;;AAQA,eAAe,kBAAkB,SAAS,OAAO,IAAI,WAAW,SAAS;CACxE,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,aAAa,QAAQ,SAAS,SAAS,QAAQ,IAAI,GAAG,QAAQ,QAAQ,MAAM,CAAC,IAAI;CACvF,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;EAChC,MAAM,UAAU,CAAC;GAChB,OAAO;GACP,OAAO;EACR,CAAC;EACD,IAAI,QAAQ,IAAI,QAAQ,KAAK;GAC5B,OAAO;GACP,OAAO,kBAAkB,QAAQ,EAAE;EACpC,CAAC;OACI,IAAI,OAAO,IAAI,cAAc,OAAO,OAAO,GAAG,eAAe,UAAU,QAAQ,KAAK;GACxF,OAAO;GACP,OAAO,kBAAkB,OAAO,GAAG,UAAU;EAC9C,CAAC;EACD,GAAG,OAAO,mBAAmB;GAC5B,SAAS,QAAQ;GACjB,aAAa,QAAQ;GACrB,KAAK,QAAQ;GACb;GACA;EACD,CAAC,CAAC;CACH;CACA,MAAM,eAAe,QAAQ,MAAM,OAAO,IAAI;CAC9C,IAAI,CAAC,cAAc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LAtOgO-Bs0gs_yP.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BaLAtOgO.mjs"],"sourcesContent":["import { M as errorUnexpected, l as errorDriverRequired, s as errorDatabaseConnectionRequired, t as CliStructuredError } from \"./cli-errors-C6_pH59O.mjs\";\nimport { S as formatStyledHeader, a as maskConnectionUrl, l as sanitizeErrorMessage, n as closeQuietly } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { t as createProgressAdapter } from \"./progress-adapter-CjAeTxY_.mjs\";\nimport { t as createControlClient } from \"./client-BqhVohc5.mjs\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\n//#region src/commands/inspect-live-schema.ts\nasync function inspectLiveSchema(options, flags, ui, startTime, context) {\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\"db\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst configPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\tif (!flags.json && !flags.quiet) {\n\t\tconst details = [{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: configPath\n\t\t}];\n\t\tif (options.db) details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(options.db)\n\t\t});\n\t\telse if (config.db?.connection && typeof config.db.connection === \"string\") details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(config.db.connection)\n\t\t});\n\t\tui.stderr(formatStyledHeader({\n\t\t\tcommand: context.commandName,\n\t\t\tdescription: context.description,\n\t\t\turl: context.url,\n\t\t\tdetails,\n\t\t\tflags\n\t\t}));\n\t}\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (!dbConnection) return notOk(errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for ${context.commandName} (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: context.commandName\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${context.commandName}` }));\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\tdriver: config.driver,\n\t\textensions: config.extensions ?? []\n\t});\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tconst schema = await client.introspect({\n\t\t\tconnection: dbConnection,\n\t\t\tonProgress\n\t\t});\n\t\tconst schemaView = client.toSchemaView(schema);\n\t\tconst pslContractAst = client.inferPslContract(schema);\n\t\tconst pslBlockDescriptors = client.getPslBlockDescriptors();\n\t\tconst dbUrl = typeof dbConnection === \"string\" ? maskConnectionUrl(dbConnection) : void 0;\n\t\treturn ok({\n\t\t\tconfig,\n\t\t\tschema,\n\t\t\tschemaView,\n\t\t\tpslContractAst,\n\t\t\tpslBlockDescriptors,\n\t\t\ttarget: {\n\t\t\t\tfamilyId: config.family.familyId,\n\t\t\t\tid: config.target.targetId\n\t\t\t},\n\t\t\tmeta: {\n\t\t\t\tconfigPath,\n\t\t\t\t...dbUrl ? { dbUrl } : {}\n\t\t\t},\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\tconst safeMessage = sanitizeErrorMessage(error instanceof Error ? error.message : String(error), typeof dbConnection === \"string\" ? dbConnection : void 0);\n\t\treturn notOk(errorUnexpected(safeMessage, { why: `Unexpected error during ${context.commandName}: ${safeMessage}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\n//#endregion\nexport { inspectLiveSchema as t };\n\n//# sourceMappingURL=inspect-live-schema-BaLAtOgO.mjs.map"],"mappings":";;;;;;;;AAQA,eAAe,kBAAkB,SAAS,OAAO,IAAI,WAAW,SAAS;CACxE,MAAM,eAAe,MAAM,s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;EAC7C,MAAM,iBAAiB,OAAO,iBAAiB,MAAM;EACrD,MAAM,sBAAsB,OAAO,uBAAuB;EAC1D,MAAM,QAAQ,OAAO,iBAAiB,WAAW,kBAAkB,YAAY,IAAI,KAAK;EACxF,OAAO,GAAG;GACT;GACA;GACA;GACA;GACA;GACA,QAAQ;IACP,UAAU,OAAO,OAAO;IACxB,IAAI,OAAO,OAAO;GACnB;GACA,MAAM;IACL;IACA,GAAG,QAAQ,EAAE,MAAM,IAAI,CAAC;GACzB;GACA,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;EAC1C,CAAC;CACF,SAAS,OAAO;EACf,IAAIA,qBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,MAAM,cAAc,qBAAqB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,OAAO,iBAAiB,WAAW,eAAe,KAAK,CAAC;EACzJ,OAAO,MAAM,gBAAgB,aAAa,EAAE,KAAK,2BAA2B,QAAQ,YAAY,IAAI,cAAc,CAAC,CAAC;CACrH,UAAU;EACT,MAAM,aAAa,MAAM;CAC1B;AACD"}
@@ -1,10 +1,10 @@
1
- import { g as errorMarkerMismatch } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { g as errorMarkerMismatch } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import { O as errorNoInvariantPath, P as errorUnknownInvariant } from "./errors-CXbGUWGu-BQi6YS-H.mjs";
3
3
  import { a as findPath, o as findPathWithDecision, r as findLatestMigration } from "./migration-graph-_SJImD5V-D5RCc651.mjs";
4
- import { C as toStructuralEdge, r as collectDeclaredInvariants } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
4
+ import { C as toStructuralEdge, r as collectDeclaredInvariants } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
5
  import { n as isGraphNode } from "./graph-membership-BViWUMpP-Cgu4Z2ox.mjs";
6
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
7
- //#region ../../../1-framework/3-tooling/cli/dist/invariants-CsxL0lbZ.mjs
7
+ //#region ../../../1-framework/3-tooling/cli/dist/invariants-1L2zfc6-.mjs
8
8
  /** True when the on-disk graph contains a path fromHash → toHash. */
9
9
  function hasMigrationPath(graph, fromHash, toHash) {
10
10
  return findPath(graph, fromHash, toHash) !== null;
@@ -50,4 +50,4 @@ function refuseMissingInvariantPath(args) {
50
50
  //#endregion
51
51
  export { refuseUnknownInvariants as i, refuseMarkerOutsideGraph as n, refuseMissingInvariantPath as r, hasMigrationPath as t };
52
52
 
53
- //# sourceMappingURL=invariants-CsxL0lbZ-B9Hfpj2R.mjs.map
53
+ //# sourceMappingURL=invariants-1L2zfc6--BpedlAbF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"invariants-CsxL0lbZ-B9Hfpj2R.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/invariants-CsxL0lbZ.mjs"],"sourcesContent":["import { h as errorMarkerMismatch } from \"./cli-errors-CihMAEVj.mjs\";\nimport { m as toStructuralEdge, r as collectDeclaredInvariants } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { errorNoInvariantPath, errorUnknownInvariant } from \"@internal/migration-tools/errors\";\nimport { findLatestMigration, findPath, findPathWithDecision, isGraphNode } from \"@internal/migration-tools/migration-graph\";\n//#region src/control-api/operations/graph-queries.ts\n/** True when the on-disk graph contains a path fromHash → toHash. */\nfunction hasMigrationPath(graph, fromHash, toHash) {\n\treturn findPath(graph, fromHash, toHash) !== null;\n}\n/**\n* Refusal for a live marker hash that is not a node of the on-disk app graph.\n* Same errorMarkerMismatch envelope migrate raises today, or null when the marker is a node.\n*/\nfunction refuseMarkerOutsideGraph(args) {\n\tif (isGraphNode(args.markerHash, args.graph)) return null;\n\treturn errorMarkerMismatch(args.markerHash, [...args.graph.nodes].sort(), findLatestMigration(args.graph)?.to ?? null);\n}\n//#endregion\n//#region src/control-api/operations/invariants.ts\n/**\n* Invariant refusals shared by migrate and migration status: unknown ref invariants and unsatisfiable invariant paths.\n*/\n/** Refuses ref invariants neither declared on any graph edge nor present on the live marker. */\nfunction refuseUnknownInvariants(args) {\n\tconst declared = collectDeclaredInvariants(args.graph);\n\tconst known = new Set(declared);\n\tfor (const id of args.markerInvariants) known.add(id);\n\tconst unknown = args.refInvariants.filter((id) => !known.has(id));\n\tif (unknown.length === 0) return null;\n\treturn errorUnknownInvariant({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\tunknown,\n\t\tdeclared: [...declared].sort()\n\t});\n}\n/** Refuses a --to target whose missing invariants no path from originHash satisfies. */\nfunction refuseMissingInvariantPath(args) {\n\tconst outcome = findPathWithDecision(args.graph, args.originHash, args.targetHash, {\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: new Set(args.missing)\n\t});\n\tif (outcome.kind !== \"unsatisfiable\") return null;\n\treturn errorNoInvariantPath({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: [...args.missing].sort(),\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(toStructuralEdge)\n\t});\n}\n//#endregion\nexport { refuseMarkerOutsideGraph as i, refuseUnknownInvariants as n, hasMigrationPath as r, refuseMissingInvariantPath as t };\n\n//# sourceMappingURL=invariants-CsxL0lbZ.mjs.map"],"mappings":";;;;;;;;AAOA,SAAS,iBAAiB,OAAO,UAAU,QAAQ;CAClD,OAAO,SAAS,OAAO,UAAU,MAAM,MAAM;AAC9C;;;;;AAKA,SAAS,yBAAyB,MAAM;CACvC,IAAI,YAAY,KAAK,YAAY,KAAK,KAAK,GAAG,OAAO;CACrD,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC,KAAK,GAAG,oBAAoB,KAAK,KAAK,CAAC,EAAE,MAAM,IAAI;AACtH;;;;;AAOA,SAAS,wBAAwB,MAAM;CACtC,MAAM,WAAW,0BAA0B,KAAK,KAAK;CACrD,MAAM,QAAQ,IAAI,IAAI,QAAQ;CAC9B,KAAK,MAAM,MAAM,KAAK,kBAAkB,MAAM,IAAI,EAAE;CACpD,MAAM,UAAU,KAAK,cAAc,QAAQ,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;CAChE,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO,sBAAsB;EAC5B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC;EACA,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,KAAK;CAC9B,CAAC;AACF;;AAEA,SAAS,2BAA2B,MAAM;CACzC,MAAM,UAAU,qBAAqB,KAAK,OAAO,KAAK,YAAY,KAAK,YAAY;EAClF,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,IAAI,IAAI,KAAK,OAAO;CAC/B,CAAC;CACD,IAAI,QAAQ,SAAS,iBAAiB,OAAO;CAC7C,OAAO,qBAAqB;EAC3B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,KAAK;EACjC,SAAS,QAAQ;EACjB,gBAAgB,QAAQ,eAAe,IAAI,gBAAgB;CAC5D,CAAC;AACF"}
1
+ {"version":3,"file":"invariants-1L2zfc6--BpedlAbF.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/invariants-1L2zfc6-.mjs"],"sourcesContent":["import { h as errorMarkerMismatch } from \"./cli-errors-C6_pH59O.mjs\";\nimport { m as toStructuralEdge, r as collectDeclaredInvariants } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { errorNoInvariantPath, errorUnknownInvariant } from \"@internal/migration-tools/errors\";\nimport { findLatestMigration, findPath, findPathWithDecision, isGraphNode } from \"@internal/migration-tools/migration-graph\";\n//#region src/control-api/operations/graph-queries.ts\n/** True when the on-disk graph contains a path fromHash → toHash. */\nfunction hasMigrationPath(graph, fromHash, toHash) {\n\treturn findPath(graph, fromHash, toHash) !== null;\n}\n/**\n* Refusal for a live marker hash that is not a node of the on-disk app graph.\n* Same errorMarkerMismatch envelope migrate raises today, or null when the marker is a node.\n*/\nfunction refuseMarkerOutsideGraph(args) {\n\tif (isGraphNode(args.markerHash, args.graph)) return null;\n\treturn errorMarkerMismatch(args.markerHash, [...args.graph.nodes].sort(), findLatestMigration(args.graph)?.to ?? null);\n}\n//#endregion\n//#region src/control-api/operations/invariants.ts\n/**\n* Invariant refusals shared by migrate and migration status: unknown ref invariants and unsatisfiable invariant paths.\n*/\n/** Refuses ref invariants neither declared on any graph edge nor present on the live marker. */\nfunction refuseUnknownInvariants(args) {\n\tconst declared = collectDeclaredInvariants(args.graph);\n\tconst known = new Set(declared);\n\tfor (const id of args.markerInvariants) known.add(id);\n\tconst unknown = args.refInvariants.filter((id) => !known.has(id));\n\tif (unknown.length === 0) return null;\n\treturn errorUnknownInvariant({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\tunknown,\n\t\tdeclared: [...declared].sort()\n\t});\n}\n/** Refuses a --to target whose missing invariants no path from originHash satisfies. */\nfunction refuseMissingInvariantPath(args) {\n\tconst outcome = findPathWithDecision(args.graph, args.originHash, args.targetHash, {\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: new Set(args.missing)\n\t});\n\tif (outcome.kind !== \"unsatisfiable\") return null;\n\treturn errorNoInvariantPath({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: [...args.missing].sort(),\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(toStructuralEdge)\n\t});\n}\n//#endregion\nexport { refuseMarkerOutsideGraph as i, refuseUnknownInvariants as n, hasMigrationPath as r, refuseMissingInvariantPath as t };\n\n//# sourceMappingURL=invariants-1L2zfc6-.mjs.map"],"mappings":";;;;;;;;AAOA,SAAS,iBAAiB,OAAO,UAAU,QAAQ;CAClD,OAAO,SAAS,OAAO,UAAU,MAAM,MAAM;AAC9C;;;;;AAKA,SAAS,yBAAyB,MAAM;CACvC,IAAI,YAAY,KAAK,YAAY,KAAK,KAAK,GAAG,OAAO;CACrD,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC,KAAK,GAAG,oBAAoB,KAAK,KAAK,CAAC,EAAE,MAAM,IAAI;AACtH;;;;;AAOA,SAAS,wBAAwB,MAAM;CACtC,MAAM,WAAW,0BAA0B,KAAK,KAAK;CACrD,MAAM,QAAQ,IAAI,IAAI,QAAQ;CAC9B,KAAK,MAAM,MAAM,KAAK,kBAAkB,MAAM,IAAI,EAAE;CACpD,MAAM,UAAU,KAAK,cAAc,QAAQ,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;CAChE,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO,sBAAsB;EAC5B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC;EACA,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,KAAK;CAC9B,CAAC;AACF;;AAEA,SAAS,2BAA2B,MAAM;CACzC,MAAM,UAAU,qBAAqB,KAAK,OAAO,KAAK,YAAY,KAAK,YAAY;EAClF,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,IAAI,IAAI,KAAK,OAAO;CAC/B,CAAC;CACD,IAAI,QAAQ,SAAS,iBAAiB,OAAO;CAC7C,OAAO,qBAAqB;EAC3B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,KAAK;EACjC,SAAS,QAAQ;EACjB,gBAAgB,QAAQ,eAAe,IAAI,gBAAgB;CAC5D,CAAC;AACF"}
@@ -1,6 +1,6 @@
1
- import { h as errorLegendHumanOnly } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { h as errorLegendHumanOnly } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
3
- //#region ../../../1-framework/3-tooling/cli/dist/legend-QYDKKevn.mjs
3
+ //#region ../../../1-framework/3-tooling/cli/dist/legend-aXC5H1jH.mjs
4
4
  /**
5
5
  * The legend is decoration printed alongside the command header on stderr, so
6
6
  * it is suppressed for the machine-readable / silent paths (`--json`, `--dot`,
@@ -19,4 +19,4 @@ function validateLegendOptions(options, flags) {
19
19
  //#endregion
20
20
  export { validateLegendOptions as n, shouldShowLegend as t };
21
21
 
22
- //# sourceMappingURL=legend-QYDKKevn-DCIlAPn4.mjs.map
22
+ //# sourceMappingURL=legend-aXC5H1jH-Dg1yWonK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"legend-QYDKKevn-DCIlAPn4.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/legend-QYDKKevn.mjs"],"sourcesContent":["import { m as errorLegendHumanOnly } from \"./cli-errors-CihMAEVj.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/utils/legend.ts\n/**\n* The legend is decoration printed alongside the command header on stderr, so\n* it is suppressed for the machine-readable / silent paths (`--json`, `--dot`,\n* `--quiet`) exactly as the header is.\n*/\nfunction shouldShowLegend(options, flags) {\n\treturn options.legend === true && options.dot !== true && flags.json !== true && flags.quiet !== true;\n}\nfunction validateLegendOptions(options, flags) {\n\tif (options.legend !== true) return ok(void 0);\n\tif (flags.json === true) return notOk(errorLegendHumanOnly(\"--json\"));\n\tif (flags.quiet === true) return notOk(errorLegendHumanOnly(\"--quiet\"));\n\tif (options.dot === true) return notOk(errorLegendHumanOnly(\"--dot\"));\n\treturn ok(void 0);\n}\n//#endregion\nexport { validateLegendOptions as n, shouldShowLegend as t };\n\n//# sourceMappingURL=legend-QYDKKevn.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,iBAAiB,SAAS,OAAO;CACzC,OAAO,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,SAAS,QAAQ,MAAM,UAAU;AAClG;AACA,SAAS,sBAAsB,SAAS,OAAO;CAC9C,IAAI,QAAQ,WAAW,MAAM,OAAO,GAAG,KAAK,CAAC;CAC7C,IAAI,MAAM,SAAS,MAAM,OAAO,MAAM,qBAAqB,QAAQ,CAAC;CACpE,IAAI,MAAM,UAAU,MAAM,OAAO,MAAM,qBAAqB,SAAS,CAAC;CACtE,IAAI,QAAQ,QAAQ,MAAM,OAAO,MAAM,qBAAqB,OAAO,CAAC;CACpE,OAAO,GAAG,KAAK,CAAC;AACjB"}
1
+ {"version":3,"file":"legend-aXC5H1jH-Dg1yWonK.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/legend-aXC5H1jH.mjs"],"sourcesContent":["import { m as errorLegendHumanOnly } from \"./cli-errors-C6_pH59O.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/utils/legend.ts\n/**\n* The legend is decoration printed alongside the command header on stderr, so\n* it is suppressed for the machine-readable / silent paths (`--json`, `--dot`,\n* `--quiet`) exactly as the header is.\n*/\nfunction shouldShowLegend(options, flags) {\n\treturn options.legend === true && options.dot !== true && flags.json !== true && flags.quiet !== true;\n}\nfunction validateLegendOptions(options, flags) {\n\tif (options.legend !== true) return ok(void 0);\n\tif (flags.json === true) return notOk(errorLegendHumanOnly(\"--json\"));\n\tif (flags.quiet === true) return notOk(errorLegendHumanOnly(\"--quiet\"));\n\tif (options.dot === true) return notOk(errorLegendHumanOnly(\"--dot\"));\n\treturn ok(void 0);\n}\n//#endregion\nexport { validateLegendOptions as n, shouldShowLegend as t };\n\n//# sourceMappingURL=legend-aXC5H1jH.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,iBAAiB,SAAS,OAAO;CACzC,OAAO,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,SAAS,QAAQ,MAAM,UAAU;AAClG;AACA,SAAS,sBAAsB,SAAS,OAAO;CAC9C,IAAI,QAAQ,WAAW,MAAM,OAAO,GAAG,KAAK,CAAC;CAC7C,IAAI,MAAM,SAAS,MAAM,OAAO,MAAM,qBAAqB,QAAQ,CAAC;CACpE,IAAI,MAAM,UAAU,MAAM,OAAO,MAAM,qBAAqB,SAAS,CAAC;CACtE,IAAI,QAAQ,QAAQ,MAAM,OAAO,MAAM,qBAAqB,OAAO,CAAC;CACpE,OAAO,GAAG,KAAK,CAAC;AACjB"}
@@ -1,23 +1,22 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { D as errorRunnerFailed, N as errorUnexpected, S as errorPathUnreachable, c as errorDatabaseConnectionRequired, d as errorFileNotFound, j as errorTargetMigrationNotSupported, s as errorContractValidationFailed, u as errorDriverRequired } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
3
- import { r as createTerminalUI, s as formatMigrationApplyCommandOutput } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
4
- import { S as targetSupportsMigrations, _ as resolveMigrationPaths, b as setCommandExamples, f as maskConnectionUrl, g as resolveContractPath, m as parseGlobalFlagsOrExit, n as closeQuietly, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
5
- import { a as loadContractSpaceAggregateForCli, s as refuseContractSpaceIntegrity, u as toDeclaredExtensionsFromRaw } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
6
- import { t as createControlClient } from "./client-C4Gh4PBz-BMUlBcuE.mjs";
7
- import { t as mapCaughtMigrationError } from "./caught-errors-B_oGFiYw-BqX49eW0.mjs";
8
- import { t as listRefsByContractHash } from "./migration-list-AKRIIovW-BN-Zrwk0.mjs";
9
- import { t as resolveContractRef } from "./ref-resolution-Bi4lpxM8-BbfL_yv8.mjs";
10
- import { _ as renderMigrationGraphCommand, a as buildMigrationGraphRows, c as computeLabelColumn, f as formatOnPathMigrationRow, i as buildGrid, l as computeMaxDirNameWidth, m as indentMigrationGraphTreeBlock, p as highlightFromEdgeAnnotations } from "./migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs";
2
+ import { N as errorUnexpected, c as errorDatabaseConnectionRequired, d as errorFileNotFound, j as errorTargetMigrationNotSupported, s as errorContractValidationFailed, u as errorDriverRequired } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
3
+ import { r as createTerminalUI, s as formatMigrationApplyCommandOutput } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
4
+ import { S as targetSupportsMigrations, _ as resolveMigrationPaths, b as setCommandExamples, f as maskConnectionUrl, g as resolveContractPath, m as parseGlobalFlagsOrExit, n as closeQuietly, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
+ import { a as loadContractSpaceAggregateForCli, s as refuseContractSpaceIntegrity, u as toDeclaredExtensionsFromRaw } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
6
+ import { t as createControlClient } from "./client-BqhVohc5-DFRVWFps.mjs";
11
7
  import { a as readContractIR, t as advanceRefSafely } from "./ref-advancement-DaZBzm7m-WoqnFAyr.mjs";
12
- import { t as mapContractAtError } from "./contract-at-errors-BsQiGdZC-D8l9-WWt.mjs";
13
- import { i as refuseUnknownInvariants, n as refuseMarkerOutsideGraph } from "./invariants-CsxL0lbZ-B9Hfpj2R.mjs";
14
- import { t as executeMigrateShowPlan } from "./migrate-show-CPZEq35I-DeL3WVjs.mjs";
8
+ import { t as mapCaughtMigrationError } from "./caught-errors-BZ-9WASe-DH4DaDha.mjs";
9
+ import { t as mapContractAtError } from "./contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs";
10
+ import { i as refuseUnknownInvariants, n as refuseMarkerOutsideGraph } from "./invariants-1L2zfc6--BpedlAbF.mjs";
11
+ import { t as executeMigrateShowPlan } from "./migrate-show-bdXjSFgh-CQxl5yNp.mjs";
12
+ import { t as resolveContractRef } from "./ref-resolution-D4fAdXo8-Dfaky0yw.mjs";
13
+ import { n as migrateShowRunListRows, r as renderMigrateShowGraph, t as mapMigrateFailure } from "./migrate-failure-Bdr3AJee-C9yNeQXy.mjs";
15
14
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
16
15
  import { readFile } from "node:fs/promises";
17
16
  import { createControlStack } from "@prisma/orm-framework/components/control";
18
17
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
19
18
  import { Command } from "commander";
20
- //#region ../../../1-framework/3-tooling/cli/dist/migrate-DYx_CSbN.mjs
19
+ //#region ../../../1-framework/3-tooling/cli/dist/migrate-DRiUHRCS.mjs
21
20
  /**
22
21
  * Read-only preview of the migration path `migrate` will take. Delegates the
23
22
  * path computation to {@link executeMigrateShowPlan} (the control-api core)
@@ -76,58 +75,18 @@ async function executeMigrateShowCommand(options, flags, ui) {
76
75
  });
77
76
  if (!planResult.ok) return notOk(planResult.failure);
78
77
  const plan = planResult.value;
79
- const { aggregate, contractHash } = plan;
80
78
  const orderedMigrations = plan.migrations;
81
- const allSpaces = [aggregate.app, ...aggregate.extensions];
82
79
  let graphOutput;
83
80
  let runListDirNameWidth;
84
81
  let runListLeftPad;
85
82
  if (!flags.json) {
86
- const onPathHashes = new Set(orderedMigrations.map((m) => m.migrationHash));
87
- const colorize = flags.color !== false;
88
- const spaceLayouts = allSpaces.map((space) => {
89
- const isApp = space.spaceId === aggregate.app.spaceId;
90
- const spaceGraph = space.graph();
91
- const rowModel = buildMigrationGraphRows(spaceGraph, isApp ? { contractHash } : {});
92
- const edgeAnnotations = /* @__PURE__ */ new Map();
93
- for (const edge of spaceGraph.migrationByHash.values()) edgeAnnotations.set(edge.migrationHash, { pathHighlight: onPathHashes.has(edge.migrationHash) ? "on-path" : "off-path" });
94
- return {
95
- space,
96
- isApp,
97
- spaceGraph,
98
- rowModel,
99
- grid: buildGrid(rowModel, {}, highlightFromEdgeAnnotations(edgeAnnotations)),
100
- edgeAnnotations
101
- };
83
+ const rendering = renderMigrateShowGraph(plan, {
84
+ colorize: flags.color !== false,
85
+ glyphMode: "unicode"
102
86
  });
103
- const globalLabelColumn = spaceLayouts.length > 1 ? Math.max(...spaceLayouts.map(({ grid }) => computeLabelColumn(grid, "unicode"))) : void 0;
104
- const globalMaxDirNameWidthFromLayouts = spaceLayouts.length > 1 ? Math.max(...spaceLayouts.map(({ rowModel }) => computeMaxDirNameWidth(rowModel))) : void 0;
105
- const runListMaxFromMigrations = orderedMigrations.length > 0 ? Math.max(...orderedMigrations.map((m) => m.dirName.length)) : 0;
106
- const globalMaxDirNameWidth = globalMaxDirNameWidthFromLayouts !== void 0 ? Math.max(globalMaxDirNameWidthFromLayouts, runListMaxFromMigrations) : void 0;
107
- runListDirNameWidth = globalMaxDirNameWidth ?? runListMaxFromMigrations;
108
- runListLeftPad = globalLabelColumn;
109
- const showSpaceHeadings = allSpaces.length > 1;
110
- const sections = [];
111
- for (const { space, isApp, rowModel, grid, edgeAnnotations } of spaceLayouts) {
112
- const liveMarkerHash = plan.renderMarkerHashBySpace.get(space.spaceId);
113
- const tree = renderMigrationGraphCommand({
114
- grid,
115
- rowModel,
116
- contractHash,
117
- isAppSpace: isApp,
118
- ...plan.usedLiveMarker ? { dbHash: liveMarkerHash } : {},
119
- refsByHash: listRefsByContractHash(space),
120
- edgeAnnotationsByHash: edgeAnnotations,
121
- colorize,
122
- glyphMode: "unicode",
123
- ...globalLabelColumn !== void 0 ? { globalLabelColumn } : {},
124
- ...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}
125
- });
126
- if (tree.length === 0) continue;
127
- if (showSpaceHeadings) sections.push(`${space.spaceId}:\n${indentMigrationGraphTreeBlock(tree, " ")}`);
128
- else sections.push(tree);
129
- }
130
- graphOutput = sections.join("\n\n");
87
+ graphOutput = rendering.graphOutput;
88
+ runListDirNameWidth = rendering.runListDirNameWidth;
89
+ runListLeftPad = rendering.runListLeftPad;
131
90
  }
132
91
  return ok({
133
92
  ok: true,
@@ -140,32 +99,26 @@ async function executeMigrateShowCommand(options, flags, ui) {
140
99
  }
141
100
  function formatMigrateShowOutput(result, flags) {
142
101
  if (flags.quiet) return "";
143
- const colorize = flags.color !== false;
144
102
  const lines = [];
145
103
  if (result.graphOutput !== void 0 && result.graphOutput.length > 0) {
146
104
  lines.push(result.graphOutput);
147
105
  lines.push("");
148
106
  }
149
107
  const n = result.migrations.length;
150
- if (n > 0) {
151
- lines.push(`The following ${n} migration${n === 1 ? "" : "s"} will run:`);
152
- const isMultiSpace = result.runListLeftPad !== void 0;
153
- const gutter = result.runListLeftPad ?? 0;
154
- const rawDirNameWidth = result.runListDirNameWidth ?? Math.max(...result.migrations.map((m) => m.dirName.length));
155
- const listDirNameWidth = gutter + Math.max(rawDirNameWidth + 2, 25 - gutter) - (isMultiSpace ? 2 : 4);
156
- for (const m of result.migrations) lines.push(` ${formatOnPathMigrationRow(m.dirName, m.from, m.to, listDirNameWidth, colorize, "unicode")}`);
157
- } else lines.push(result.summary);
108
+ if (n === 0) {
109
+ lines.push(result.summary);
110
+ return lines.join("\n");
111
+ }
112
+ lines.push(`The following ${n} migration${n === 1 ? "" : "s"} will run:`);
113
+ lines.push(...migrateShowRunListRows(result.migrations, {
114
+ runListDirNameWidth: result.runListDirNameWidth ?? Math.max(...result.migrations.map((m) => m.dirName.length)),
115
+ runListLeftPad: result.runListLeftPad
116
+ }, {
117
+ colorize: flags.color !== false,
118
+ glyphMode: "unicode"
119
+ }));
158
120
  return lines.join("\n");
159
121
  }
160
- function mapApplyFailure(failure) {
161
- if (failure.code === "MIGRATION_PATH_NOT_FOUND") return errorPathUnreachable(failure);
162
- return errorRunnerFailed(failure.summary, {
163
- why: failure.why ?? "Migration runner failed",
164
- fix: "Fix the issue and re-run `prisma-next migrate --to <contract>` — previously applied migrations are preserved.",
165
- meta: failure.meta ?? {},
166
- ...ifDefined("cause", failure.cause)
167
- });
168
- }
169
122
  async function executeMigrateCommand(options, flags, ui, startTime) {
170
123
  const configResult = await loadConfigForSections(options.config, [
171
124
  "family",
@@ -313,7 +266,7 @@ async function executeMigrateCommand(options, flags, ui, startTime) {
313
266
  ...refEntry?.invariants ? { refInvariants: refEntry.invariants } : {},
314
267
  ...refEntry !== void 0 ? ifDefined("refName", toArg) : {}
315
268
  });
316
- if (!applyResult.ok) return notOk(mapApplyFailure(applyResult.failure));
269
+ if (!applyResult.ok) return notOk(mapMigrateFailure(applyResult.failure));
317
270
  const { value } = applyResult;
318
271
  let advancedRef = null;
319
272
  if (options.advanceRef !== void 0) {
@@ -387,4 +340,4 @@ function createMigrateCommand() {
387
340
  //#endregion
388
341
  export { createMigrateCommand as t };
389
342
 
390
- //# sourceMappingURL=migrate-DYx_CSbN-BuQ0lk-0.mjs.map
343
+ //# sourceMappingURL=migrate-DRiUHRCS-Cci6EEZv.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-DRiUHRCS-Cci6EEZv.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migrate-DRiUHRCS.mjs"],"sourcesContent":["import { A as errorTargetMigrationNotSupported, M as errorUnexpected, l as errorDriverRequired, o as errorContractValidationFailed, s as errorDatabaseConnectionRequired, u as errorFileNotFound } from \"./cli-errors-C6_pH59O.mjs\";\nimport { a as formatMigrationApplyCommandOutput, t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, n as closeQuietly, p as targetSupportsMigrations, s as resolveContractPath, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { a as loadContractSpaceAggregateForCli, s as refuseContractSpaceIntegrity, u as toDeclaredExtensionsFromRaw } from \"./contract-space-aggregate-loader-BpdB-mHG.mjs\";\nimport { t as createControlClient } from \"./client-BqhVohc5.mjs\";\nimport { a as readContractIR, t as advanceRefSafely } from \"./ref-advancement-DaZBzm7m.mjs\";\nimport { t as mapCaughtMigrationError } from \"./caught-errors-BZ-9WASe.mjs\";\nimport { t as mapContractAtError } from \"./contract-at-errors-CLFX1-Gc.mjs\";\nimport { i as refuseMarkerOutsideGraph, n as refuseUnknownInvariants } from \"./invariants-1L2zfc6-.mjs\";\nimport { t as executeMigrateShowPlan } from \"./migrate-show-bdXjSFgh.mjs\";\nimport { t as resolveContractRef } from \"./ref-resolution-D4fAdXo8.mjs\";\nimport { n as migrateShowRunListRows, r as renderMigrateShowGraph, t as mapMigrateFailure } from \"./migrate-failure-Bdr3AJee.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 { readFile } from \"node:fs/promises\";\nimport { createControlStack } from \"@internal/framework-components/control\";\n//#region src/commands/migrate.ts\n/**\n* Read-only preview of the migration path `migrate` will take. Delegates the\n* path computation to {@link executeMigrateShowPlan} (the control-api core)\n* and keeps only the styled header plus the Tier-3 graph rendering here.\n*/\nasync function executeMigrateShowCommand(options, flags, ui) {\n\tconst readsLiveMarker = options.from === void 0 || options.from === \"@db\";\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t...readsLiveMarker ? [\"driver\"] : [],\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst planResult = await executeMigrateShowPlan({\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd(),\n\t\t...ifDefined(\"configPath\", options.config),\n\t\t...ifDefined(\"db\", options.db),\n\t\t...ifDefined(\"to\", options.to),\n\t\t...ifDefined(\"from\", options.from),\n\t\tonPreflightComplete: ({ configPath, migrationsRelative, dbConnection, hasExplicitFrom }) => {\n\t\t\tif (!flags.json && !flags.quiet) {\n\t\t\t\tconst details = [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: configPath\n\t\t\t\t}, {\n\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\tvalue: migrationsRelative\n\t\t\t\t}];\n\t\t\t\tif (dbConnection && !hasExplicitFrom) details.push({\n\t\t\t\t\tlabel: \"database\",\n\t\t\t\t\tvalue: maskConnectionUrl(String(dbConnection))\n\t\t\t\t});\n\t\t\t\tif (options.from) details.push({\n\t\t\t\t\tlabel: \"from\",\n\t\t\t\t\tvalue: options.from\n\t\t\t\t});\n\t\t\t\tif (options.to) details.push({\n\t\t\t\t\tlabel: \"to\",\n\t\t\t\t\tvalue: options.to\n\t\t\t\t});\n\t\t\t\tconst header = formatStyledHeader({\n\t\t\t\t\tcommand: \"migrate --show\",\n\t\t\t\t\tdescription: \"Preview the migration path migrate will take (read-only)\",\n\t\t\t\t\tdetails,\n\t\t\t\t\tflags\n\t\t\t\t});\n\t\t\t\tui.stderr(header);\n\t\t\t}\n\t\t}\n\t});\n\tif (!planResult.ok) return notOk(planResult.failure);\n\tconst plan = planResult.value;\n\tconst orderedMigrations = plan.migrations;\n\tlet graphOutput;\n\tlet runListDirNameWidth;\n\tlet runListLeftPad;\n\tif (!flags.json) {\n\t\tconst rendering = renderMigrateShowGraph(plan, {\n\t\t\tcolorize: flags.color !== false,\n\t\t\tglyphMode: \"unicode\"\n\t\t});\n\t\tgraphOutput = rendering.graphOutput;\n\t\trunListDirNameWidth = rendering.runListDirNameWidth;\n\t\trunListLeftPad = rendering.runListLeftPad;\n\t}\n\treturn ok({\n\t\tok: true,\n\t\tmigrations: orderedMigrations,\n\t\tsummary: plan.summary,\n\t\t...graphOutput !== void 0 ? { graphOutput } : {},\n\t\t...runListDirNameWidth !== void 0 ? { runListDirNameWidth } : {},\n\t\t...runListLeftPad !== void 0 ? { runListLeftPad } : {}\n\t});\n}\nfunction formatMigrateShowOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tif (result.graphOutput !== void 0 && result.graphOutput.length > 0) {\n\t\tlines.push(result.graphOutput);\n\t\tlines.push(\"\");\n\t}\n\tconst n = result.migrations.length;\n\tif (n === 0) {\n\t\tlines.push(result.summary);\n\t\treturn lines.join(\"\\n\");\n\t}\n\tlines.push(`The following ${n} migration${n === 1 ? \"\" : \"s\"} will run:`);\n\tlines.push(...migrateShowRunListRows(result.migrations, {\n\t\trunListDirNameWidth: result.runListDirNameWidth ?? Math.max(...result.migrations.map((m) => m.dirName.length)),\n\t\trunListLeftPad: result.runListLeftPad\n\t}, {\n\t\tcolorize: flags.color !== false,\n\t\tglyphMode: \"unicode\"\n\t}));\n\treturn lines.join(\"\\n\");\n}\nasync function executeMigrateCommand(options, flags, ui, startTime) {\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\"db\",\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, appMigrationsRelative, refsDir } = resolveMigrationPaths(options.config, config, process.cwd());\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (!dbConnection) return notOk(errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for migrate (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: \"migrate\"\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: \"Config.driver is required for migrate\" }));\n\tif (!targetSupportsMigrations(config.target)) return notOk(errorTargetMigrationNotSupported({ why: `Target \"${config.target.id}\" does not support migrations` }));\n\tconst toArg = options.to;\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tlet contractRaw;\n\tlet contractContent;\n\ttry {\n\t\tcontractContent = 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 a valid contract.json, then retry.\"\n\t\t}));\n\t\treturn notOk(errorContractValidationFailed(`Failed to read contract file: ${error instanceof Error ? error.message : String(error)}`, { where: { path: contractPathAbsolute } }));\n\t}\n\ttry {\n\t\tcontractRaw = familyInstance.deserializeContract(JSON.parse(contractContent));\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: contractRaw,\n\t\textensions: config.extensions ?? [],\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!loadedAggregate.ok) return notOk(loadedAggregate.failure);\n\tconst aggregate = loadedAggregate.value;\n\tconst integrityFailure = refuseContractSpaceIntegrity(aggregate, {\n\t\tdeclaredExtensions: toDeclaredExtensionsFromRaw(config.extensions ?? []),\n\t\tcheckContracts: true\n\t});\n\tif (integrityFailure) return notOk(integrityFailure);\n\tlet refEntry;\n\tlet refName;\n\tif (toArg) {\n\t\tconst refs = aggregate.app.refs;\n\t\tconst refResult = resolveContractRef(toArg, {\n\t\t\tgraph: aggregate.app.graph(),\n\t\t\trefs\n\t\t});\n\t\tif (!refResult.ok) return notOk(refResult.failure);\n\t\tif (refResult.value.provenance.kind === \"ref\") {\n\t\t\trefName = refResult.value.provenance.refName;\n\t\t\tconst resolved = refs[refName];\n\t\t\tif (resolved) refEntry = resolved;\n\t\t} else refEntry = {\n\t\t\thash: refResult.value.hash,\n\t\t\tinvariants: []\n\t\t};\n\t}\n\tif (!flags.json && !flags.quiet) {\n\t\tconst details = [{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: configPath\n\t\t}, {\n\t\t\tlabel: \"migrations\",\n\t\t\tvalue: appMigrationsRelative\n\t\t}];\n\t\tif (typeof dbConnection === \"string\") details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(dbConnection)\n\t\t});\n\t\tif (toArg) details.push({\n\t\t\tlabel: \"to\",\n\t\t\tvalue: toArg\n\t\t});\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migrate\",\n\t\t\tdescription: \"Apply planned migrations to advance the database\",\n\t\t\turl: \"https://pris.ly/migrate\",\n\t\t\tdetails,\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t}\n\tconst appGraph = aggregate.app.graph();\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\tdriver: config.driver,\n\t\textensions: config.extensions ?? []\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\tconst appMarker = (await client.readAllMarkers()).get(\"app\") ?? null;\n\t\tif (appMarker !== null) {\n\t\t\tconst markerRefusal = refuseMarkerOutsideGraph({\n\t\t\t\tmarkerHash: appMarker.storageHash,\n\t\t\t\tgraph: appGraph\n\t\t\t});\n\t\t\tif (markerRefusal) return notOk(markerRefusal);\n\t\t}\n\t\tif (refEntry && refEntry.invariants.length > 0) {\n\t\t\tconst invariantRefusal = refuseUnknownInvariants({\n\t\t\t\tgraph: appGraph,\n\t\t\t\tmarkerInvariants: appMarker?.invariants ?? [],\n\t\t\t\trefInvariants: refEntry.invariants,\n\t\t\t\t...ifDefined(\"refName\", toArg)\n\t\t\t});\n\t\t\tif (invariantRefusal) return notOk(invariantRefusal);\n\t\t}\n\t\tif (!flags.quiet && !flags.json) ui.step(\"Loading contract spaces…\");\n\t\tlet applyContract = contractRaw;\n\t\tlet snapshotContractJson = JSON.parse(contractContent);\n\t\tlet snapshotContractDts;\n\t\tif (toArg && refEntry) {\n\t\t\tconst targetHash = refEntry.hash;\n\t\t\tif (aggregate.app.packages.find((p) => p.metadata.to === targetHash)) try {\n\t\t\t\tconst at = await aggregate.app.contractAt(targetHash, refName !== void 0 ? { refName } : void 0);\n\t\t\t\tapplyContract = at.contract;\n\t\t\t\tsnapshotContractJson = at.contractJson;\n\t\t\t\tsnapshotContractDts = at.contractDts;\n\t\t\t} catch (error) {\n\t\t\t\treturn mapContractAtError(error, { artifactRole: \"to\" });\n\t\t\t}\n\t\t}\n\t\tconst applyResult = await client.migrate({\n\t\t\tcontract: applyContract,\n\t\t\tmigrationsDir,\n\t\t\t...ifDefined(\"refHash\", refEntry?.hash),\n\t\t\t...refEntry?.invariants ? { refInvariants: refEntry.invariants } : {},\n\t\t\t...refEntry !== void 0 ? ifDefined(\"refName\", toArg) : {}\n\t\t});\n\t\tif (!applyResult.ok) return notOk(mapMigrateFailure(applyResult.failure));\n\t\tconst { value } = applyResult;\n\t\tlet advancedRef = null;\n\t\tif (options.advanceRef !== void 0) {\n\t\t\tconst contractIR = snapshotContractDts !== void 0 ? {\n\t\t\t\tcontract: snapshotContractJson,\n\t\t\t\tcontractDts: snapshotContractDts\n\t\t\t} : await readContractIR(snapshotContractJson, contractPathAbsolute);\n\t\t\tconst advanced = await advanceRefSafely({\n\t\t\t\trefsDir,\n\t\t\t\tmigrationsDir,\n\t\t\t\tname: options.advanceRef,\n\t\t\t\thash: value.markerHash,\n\t\t\t\tcontractIR\n\t\t\t});\n\t\t\tif (!advanced.ok) return notOk(advanced.failure);\n\t\t\tadvancedRef = {\n\t\t\t\tname: advanced.value.name,\n\t\t\t\thash: advanced.value.hash\n\t\t\t};\n\t\t}\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tmigrationsApplied: value.migrationsApplied,\n\t\t\tmigrationsTotal: value.perSpace.length,\n\t\t\tmarkerHash: value.markerHash,\n\t\t\tapplied: value.applied,\n\t\t\tsummary: value.summary,\n\t\t\tperSpace: value.perSpace,\n\t\t\t...ifDefined(\"pathDecision\", value.pathDecision),\n\t\t\ttimings: { total: Date.now() - startTime },\n\t\t\tadvancedRef\n\t\t});\n\t} catch (error) {\n\t\tconst mapped = mapCaughtMigrationError(error);\n\t\tif (mapped) return notOk(mapped);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Unexpected error during migrate: ${error instanceof Error ? error.message : String(error)}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createMigrateCommand() {\n\tconst command = new Command(\"migrate\");\n\tsetCommandDescriptions(command, \"Apply planned migrations to advance the database\", \"Walks every contract space (app + extensions) and applies pending\\non-disk migrations in canonical order (extensions alphabetically,\\nthen app). Graph-walks the on-disk migration graph for every space.\\nUse --to to target a specific contract (hash, ref name, migration dir).\\nUse --show for a read-only preview of the path that would run.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migrate --db $DATABASE_URL\",\n\t\t\"prisma-next migrate --to production --db $DATABASE_URL\",\n\t\t\"prisma-next migrate --to abc123 --db $DATABASE_URL\",\n\t\t\"prisma-next migrate --show --db $DATABASE_URL\",\n\t\t\"prisma-next migrate --show --from @contract --to production\"\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--to <contract>\", \"Target contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)\").option(\"--advance-ref <name>\", \"Advance the named ref to the post-apply marker after success\").option(\"--show\", \"Preview the migration path without applying (read-only)\").option(\"--from <contract>\", \"From-state for --show preview (@contract, @db, hash, ref name, or migration dir)\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst startTime = Date.now();\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (options.show) {\n\t\t\tconst exitCode = handleResult(await executeMigrateShowCommand(options, flags, ui), flags, ui, (showResult) => {\n\t\t\t\tif (flags.json) ui.output(JSON.stringify(showResult, null, 2));\n\t\t\t\telse ui.output(formatMigrateShowOutput(showResult, flags));\n\t\t\t});\n\t\t\tprocess.exit(exitCode);\n\t\t\treturn;\n\t\t}\n\t\tconst exitCode = handleResult(await executeMigrateCommand(options, flags, ui, startTime), flags, ui, (migrateResult) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(migrateResult, null, 2));\n\t\t\telse if (!flags.quiet) ui.log(formatMigrationApplyCommandOutput(migrateResult, flags));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createMigrateCommand as t };\n\n//# sourceMappingURL=migrate-DRiUHRCS.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,eAAe,0BAA0B,SAAS,OAAO,IAAI;CAC5D,MAAM,kBAAkB,QAAQ,SAAS,KAAK,KAAK,QAAQ,SAAS;CACpE,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA,GAAG,kBAAkB,CAAC,QAAQ,IAAI,CAAC;EACnC;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,aAAa,MAAM,uBAAuB;EAC/C,QAAQ,aAAa;EACrB,KAAK,QAAQ,IAAI;EACjB,GAAG,UAAU,cAAc,QAAQ,MAAM;EACzC,GAAG,UAAU,MAAM,QAAQ,EAAE;EAC7B,GAAG,UAAU,MAAM,QAAQ,EAAE;EAC7B,GAAG,UAAU,QAAQ,QAAQ,IAAI;EACjC,sBAAsB,EAAE,YAAY,oBAAoB,cAAc,sBAAsB;GAC3F,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;IAChC,MAAM,UAAU,CAAC;KAChB,OAAO;KACP,OAAO;IACR,GAAG;KACF,OAAO;KACP,OAAO;IACR,CAAC;IACD,IAAI,gBAAgB,CAAC,iBAAiB,QAAQ,KAAK;KAClD,OAAO;KACP,OAAO,kBAAkB,OAAO,YAAY,CAAC;IAC9C,CAAC;IACD,IAAI,QAAQ,MAAM,QAAQ,KAAK;KAC9B,OAAO;KACP,OAAO,QAAQ;IAChB,CAAC;IACD,IAAI,QAAQ,IAAI,QAAQ,KAAK;KAC5B,OAAO;KACP,OAAO,QAAQ;IAChB,CAAC;IACD,MAAM,SAAS,mBAAmB;KACjC,SAAS;KACT,aAAa;KACb;KACA;IACD,CAAC;IACD,GAAG,OAAO,MAAM;GACjB;EACD;CACD,CA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1B;AACD;AACA,SAAS,uBAAuB;CAC/B,MAAM,UAAU,IAAI,QAAQ,SAAS;CACrC,uBAAuB,SAAS,oDAAoD,oVAAoV;CACxa,mBAAmB,SAAS;EAC3B;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,cAAc,4BAA4B,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,mBAAmB,2FAA2F,CAAC,CAAC,OAAO,wBAAwB,8DAA8D,CAAC,CAAC,OAAO,UAAU,yDAAyD,CAAC,CAAC,OAAO,qBAAqB,kFAAkF,CAAC,CAAC,OAAO,OAAO,YAAY;EACnjB,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,YAAY,KAAK,IAAI;EAC3B,MAAM,KAAK,iBAAiB,KAAK;EACjC,IAAI,QAAQ,MAAM;GACjB,MAAM,WAAW,aAAa,MAAM,0BAA0B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,eAAe;IAC7G,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;SACxD,GAAG,OAAO,wBAAwB,YAAY,KAAK,CAAC;GAC1D,CAAC;GACD,QAAQ,KAAK,QAAQ;GACrB;EACD;EACA,MAAM,WAAW,aAAa,MAAM,sBAAsB,SAAS,OAAO,IAAI,SAAS,GAAG,OAAO,KAAK,kBAAkB;GACvH,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,eAAe,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,OAAO,GAAG,IAAI,kCAAkC,eAAe,KAAK,CAAC;EACtF,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -0,0 +1,96 @@
1
+ import { D as errorRunnerFailed, S as errorPathUnreachable } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
+ import { t as listRefsByContractHash } from "./migration-list-W0dqabIj-Dc2NH_LY.mjs";
3
+ import { _ as renderMigrationGraphCommand, a as buildMigrationGraphRows, c as computeLabelColumn, f as formatOnPathMigrationRow, i as buildGrid, l as computeMaxDirNameWidth, m as indentMigrationGraphTreeBlock, p as highlightFromEdgeAnnotations } from "./migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs";
4
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
+ //#region ../../../1-framework/3-tooling/cli/dist/migrate-failure-Bdr3AJee.mjs
6
+ const LABEL_GAP = 2;
7
+ const MIN_HASH_DATA_COLUMN = 25;
8
+ const LIST_INDENT = 2;
9
+ function paintOverrides(options) {
10
+ return {
11
+ ...options.styler === void 0 ? {} : { styler: options.styler },
12
+ ...options.palette === void 0 ? {} : { palette: options.palette }
13
+ };
14
+ }
15
+ /**
16
+ * Every space, with the migrations on the chosen path lifted to focus mode and
17
+ * everything else dimmed. Widths are computed across all spaces first so the
18
+ * sections and the run-list below them share their columns.
19
+ */
20
+ function renderMigrateShowGraph(plan, options) {
21
+ const { aggregate, contractHash } = plan;
22
+ const allSpaces = [aggregate.app, ...aggregate.extensions];
23
+ const onPathHashes = new Set(plan.migrations.map((migration) => migration.migrationHash));
24
+ const spaceLayouts = allSpaces.map((space) => {
25
+ const isApp = space.spaceId === aggregate.app.spaceId;
26
+ const spaceGraph = space.graph();
27
+ const rowModel = buildMigrationGraphRows(spaceGraph, isApp ? { contractHash } : {});
28
+ const edgeAnnotations = /* @__PURE__ */ new Map();
29
+ for (const edge of spaceGraph.migrationByHash.values()) edgeAnnotations.set(edge.migrationHash, { pathHighlight: onPathHashes.has(edge.migrationHash) ? "on-path" : "off-path" });
30
+ return {
31
+ space,
32
+ isApp,
33
+ rowModel,
34
+ grid: buildGrid(rowModel, {}, highlightFromEdgeAnnotations(edgeAnnotations)),
35
+ edgeAnnotations
36
+ };
37
+ });
38
+ const multiSpace = spaceLayouts.length > 1;
39
+ const globalLabelColumn = multiSpace ? Math.max(...spaceLayouts.map(({ grid }) => computeLabelColumn(grid, options.glyphMode))) : void 0;
40
+ const widestRunListName = plan.migrations.length > 0 ? Math.max(...plan.migrations.map((migration) => migration.dirName.length)) : 0;
41
+ const globalMaxDirNameWidth = multiSpace ? Math.max(Math.max(...spaceLayouts.map(({ rowModel }) => computeMaxDirNameWidth(rowModel))), widestRunListName) : void 0;
42
+ const sections = [];
43
+ for (const { space, isApp, rowModel, grid, edgeAnnotations } of spaceLayouts) {
44
+ const liveMarkerHash = plan.renderMarkerHashBySpace.get(space.spaceId);
45
+ const tree = renderMigrationGraphCommand({
46
+ grid,
47
+ rowModel,
48
+ contractHash,
49
+ isAppSpace: isApp,
50
+ ...plan.usedLiveMarker && liveMarkerHash !== void 0 ? { dbHash: liveMarkerHash } : {},
51
+ refsByHash: listRefsByContractHash(space),
52
+ edgeAnnotationsByHash: edgeAnnotations,
53
+ colorize: options.colorize,
54
+ glyphMode: options.glyphMode,
55
+ ...paintOverrides(options),
56
+ ...globalLabelColumn === void 0 ? {} : { globalLabelColumn },
57
+ ...globalMaxDirNameWidth === void 0 ? {} : { globalMaxDirNameWidth }
58
+ });
59
+ if (tree.length === 0) continue;
60
+ sections.push(multiSpace ? `${space.spaceId}:\n${indentMigrationGraphTreeBlock(tree, " ")}` : tree);
61
+ }
62
+ return {
63
+ graphOutput: sections.join("\n\n"),
64
+ runListDirNameWidth: globalMaxDirNameWidth ?? widestRunListName,
65
+ runListLeftPad: globalLabelColumn
66
+ };
67
+ }
68
+ /**
69
+ * The ordered "will run" rows, aligned with the graph above them.
70
+ *
71
+ * The `→` arrow has to land in the same absolute column in a list row as in a
72
+ * graph edge row. A graph edge row is `[gutter][name][hashes]`; a list row is
73
+ * `[indent][name][indent][hashes]`, so the list's name column absorbs the
74
+ * gutter width and the indent — twice over when a flat tree has no space
75
+ * headings indenting it.
76
+ */
77
+ function migrateShowRunListRows(migrations, rendering, options) {
78
+ const gutter = rendering.runListLeftPad ?? 0;
79
+ const multiSpace = rendering.runListLeftPad !== void 0;
80
+ const listDirNameWidth = gutter + Math.max(rendering.runListDirNameWidth + LABEL_GAP, MIN_HASH_DATA_COLUMN - gutter) - (multiSpace ? LIST_INDENT : LIST_INDENT * 2);
81
+ return migrations.map((migration) => ` ${formatOnPathMigrationRow(migration.dirName, migration.from, migration.to, listDirNameWidth, options.colorize, options.glyphMode, paintOverrides(options))}`);
82
+ }
83
+ /** A `migrate` apply failure as the CLI's structured error. */
84
+ function mapMigrateFailure(failure) {
85
+ if (failure.code === "MIGRATION_PATH_NOT_FOUND") return errorPathUnreachable(failure);
86
+ return errorRunnerFailed(failure.summary, {
87
+ why: failure.why ?? "Migration runner failed",
88
+ fix: "Fix the issue and re-run `prisma-next migrate --to <contract>` — previously applied migrations are preserved.",
89
+ meta: failure.meta ?? {},
90
+ ...ifDefined("cause", failure.cause)
91
+ });
92
+ }
93
+ //#endregion
94
+ export { migrateShowRunListRows as n, renderMigrateShowGraph as r, mapMigrateFailure as t };
95
+
96
+ //# sourceMappingURL=migrate-failure-Bdr3AJee-C9yNeQXy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-failure-Bdr3AJee-C9yNeQXy.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migrate-failure-Bdr3AJee.mjs"],"sourcesContent":["import { E as errorRunnerFailed, x as errorPathUnreachable } from \"./cli-errors-C6_pH59O.mjs\";\nimport { t as listRefsByContractHash } from \"./migration-list-W0dqabIj.mjs\";\nimport { f as highlightFromEdgeAnnotations, g as buildGrid, h as buildMigrationGraphRows, i as formatOnPathMigrationRow, n as computeMaxDirNameWidth, p as indentMigrationGraphTreeBlock, r as renderMigrationGraphCommand, t as computeLabelColumn } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/utils/formatters/migrate-show-render.ts\nconst LABEL_GAP = 2;\nconst MIN_HASH_DATA_COLUMN = 25;\nconst LIST_INDENT = 2;\nfunction paintOverrides(options) {\n\treturn {\n\t\t...options.styler === void 0 ? {} : { styler: options.styler },\n\t\t...options.palette === void 0 ? {} : { palette: options.palette }\n\t};\n}\n/**\n* Every space, with the migrations on the chosen path lifted to focus mode and\n* everything else dimmed. Widths are computed across all spaces first so the\n* sections and the run-list below them share their columns.\n*/\nfunction renderMigrateShowGraph(plan, options) {\n\tconst { aggregate, contractHash } = plan;\n\tconst allSpaces = [aggregate.app, ...aggregate.extensions];\n\tconst onPathHashes = new Set(plan.migrations.map((migration) => migration.migrationHash));\n\tconst spaceLayouts = allSpaces.map((space) => {\n\t\tconst isApp = space.spaceId === aggregate.app.spaceId;\n\t\tconst spaceGraph = space.graph();\n\t\tconst rowModel = buildMigrationGraphRows(spaceGraph, isApp ? { contractHash } : {});\n\t\tconst edgeAnnotations = /* @__PURE__ */ new Map();\n\t\tfor (const edge of spaceGraph.migrationByHash.values()) edgeAnnotations.set(edge.migrationHash, { pathHighlight: onPathHashes.has(edge.migrationHash) ? \"on-path\" : \"off-path\" });\n\t\treturn {\n\t\t\tspace,\n\t\t\tisApp,\n\t\t\trowModel,\n\t\t\tgrid: buildGrid(rowModel, {}, highlightFromEdgeAnnotations(edgeAnnotations)),\n\t\t\tedgeAnnotations\n\t\t};\n\t});\n\tconst multiSpace = spaceLayouts.length > 1;\n\tconst globalLabelColumn = multiSpace ? Math.max(...spaceLayouts.map(({ grid }) => computeLabelColumn(grid, options.glyphMode))) : void 0;\n\tconst widestRunListName = plan.migrations.length > 0 ? Math.max(...plan.migrations.map((migration) => migration.dirName.length)) : 0;\n\tconst globalMaxDirNameWidth = multiSpace ? Math.max(Math.max(...spaceLayouts.map(({ rowModel }) => computeMaxDirNameWidth(rowModel))), widestRunListName) : void 0;\n\tconst sections = [];\n\tfor (const { space, isApp, rowModel, grid, edgeAnnotations } of spaceLayouts) {\n\t\tconst liveMarkerHash = plan.renderMarkerHashBySpace.get(space.spaceId);\n\t\tconst tree = renderMigrationGraphCommand({\n\t\t\tgrid,\n\t\t\trowModel,\n\t\t\tcontractHash,\n\t\t\tisAppSpace: isApp,\n\t\t\t...plan.usedLiveMarker && liveMarkerHash !== void 0 ? { dbHash: liveMarkerHash } : {},\n\t\t\trefsByHash: listRefsByContractHash(space),\n\t\t\tedgeAnnotationsByHash: edgeAnnotations,\n\t\t\tcolorize: options.colorize,\n\t\t\tglyphMode: options.glyphMode,\n\t\t\t...paintOverrides(options),\n\t\t\t...globalLabelColumn === void 0 ? {} : { globalLabelColumn },\n\t\t\t...globalMaxDirNameWidth === void 0 ? {} : { globalMaxDirNameWidth }\n\t\t});\n\t\tif (tree.length === 0) continue;\n\t\tsections.push(multiSpace ? `${space.spaceId}:\\n${indentMigrationGraphTreeBlock(tree, \" \")}` : tree);\n\t}\n\treturn {\n\t\tgraphOutput: sections.join(\"\\n\\n\"),\n\t\trunListDirNameWidth: globalMaxDirNameWidth ?? widestRunListName,\n\t\trunListLeftPad: globalLabelColumn\n\t};\n}\n/**\n* The ordered \"will run\" rows, aligned with the graph above them.\n*\n* The `→` arrow has to land in the same absolute column in a list row as in a\n* graph edge row. A graph edge row is `[gutter][name][hashes]`; a list row is\n* `[indent][name][indent][hashes]`, so the list's name column absorbs the\n* gutter width and the indent — twice over when a flat tree has no space\n* headings indenting it.\n*/\nfunction migrateShowRunListRows(migrations, rendering, options) {\n\tconst gutter = rendering.runListLeftPad ?? 0;\n\tconst multiSpace = rendering.runListLeftPad !== void 0;\n\tconst listDirNameWidth = gutter + Math.max(rendering.runListDirNameWidth + LABEL_GAP, MIN_HASH_DATA_COLUMN - gutter) - (multiSpace ? LIST_INDENT : LIST_INDENT * 2);\n\treturn migrations.map((migration) => ` ${formatOnPathMigrationRow(migration.dirName, migration.from, migration.to, listDirNameWidth, options.colorize, options.glyphMode, paintOverrides(options))}`);\n}\n//#endregion\n//#region src/utils/migrate-failure.ts\n/** A `migrate` apply failure as the CLI's structured error. */\nfunction mapMigrateFailure(failure) {\n\tif (failure.code === \"MIGRATION_PATH_NOT_FOUND\") return errorPathUnreachable(failure);\n\treturn errorRunnerFailed(failure.summary, {\n\t\twhy: failure.why ?? \"Migration runner failed\",\n\t\tfix: \"Fix the issue and re-run `prisma-next migrate --to <contract>` — previously applied migrations are preserved.\",\n\t\tmeta: failure.meta ?? {},\n\t\t...ifDefined(\"cause\", failure.cause)\n\t});\n}\n//#endregion\nexport { migrateShowRunListRows as n, renderMigrateShowGraph as r, mapMigrateFailure as t };\n\n//# sourceMappingURL=migrate-failure-Bdr3AJee.mjs.map"],"mappings":";;;;;AAKA,MAAM,YAAY;AAClB,MAAM,uBAAuB;AAC7B,MAAM,cAAc;AACpB,SAAS,eAAe,SAAS;CAChC,OAAO;EACN,GAAG,QAAQ,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,QAAQ,QAAQ,OAAO;EAC7D,GAAG,QAAQ,YAAY,KAAK,IAAI,CAAC,IAAI,EAAE,SAAS,QAAQ,QAAQ;CACjE;AACD;;;;;;AAMA,SAAS,uBAAuB,MAAM,SAAS;CAC9C,MAAM,EAAE,WAAW,iBAAiB;CACpC,MAAM,YAAY,CAAC,UAAU,KAAK,GAAG,UAAU,UAAU;CACzD,MAAM,eAAe,IAAI,IAAI,KAAK,WAAW,KAAK,cAAc,UAAU,aAAa,CAAC;CACxF,MAAM,eAAe,UAAU,KAAK,UAAU;EAC7C,MAAM,QAAQ,MAAM,YAAY,UAAU,IAAI;EAC9C,MAAM,aAAa,MAAM,MAAM;EAC/B,MAAM,WAAW,wBAAwB,YAAY,QAAQ,EAAE,aAAa,IAAI,CAAC,CAAC;EAClF,MAAM,kCAAkC,IAAI,IAAI;EAChD,KAAK,MAAM,QAAQ,WAAW,gBAAgB,OAAO,GAAG,gBAAgB,IAAI,KAAK,eAAe,EAAE,eAAe,aAAa,IAAI,KAAK,aAAa,IAAI,YAAY,WAAW,CAAC;EAChL,OAAO;GACN;GACA;GACA;GACA,MAAM,UAAU,UAAU,CAAC,GAAG,6BAA6B,eAAe,CAAC;GAC3E;EACD;CACD,CAAC;CACD,MAAM,aAAa,aAAa,SAAS;CACzC,MA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IAAI,UAAU,sBAAsB,WAAW,uBAAuB,MAAM,KAAK,aAAa,cAAc,cAAc;CACjK,OAAO,WAAW,KAAK,cAAc,KAAK,yBAAyB,UAAU,SAAS,UAAU,MAAM,UAAU,IAAI,kBAAkB,QAAQ,UAAU,QAAQ,WAAW,eAAe,OAAO,CAAC,GAAG;AACtM;;AAIA,SAAS,kBAAkB,SAAS;CACnC,IAAI,QAAQ,SAAS,4BAA4B,OAAO,qBAAqB,OAAO;CACpF,OAAO,kBAAkB,QAAQ,SAAS;EACzC,KAAK,QAAQ,OAAO;EACpB,KAAK;EACL,MAAM,QAAQ,QAAQ,CAAC;EACvB,GAAG,UAAU,SAAS,QAAQ,KAAK;CACpC,CAAC;AACF"}
@@ -1,8 +1,8 @@
1
- import { t as CliStructuredError$2 } from "./cli-errors-C8DGzS94-CPP3UmRT.mjs";
1
+ import { c as CreateControlClient, t as CliStructuredError$2 } from "./cli-errors-f5PRtVdm-C6xVKeQn.mjs";
2
2
  import { c as ContractSpaceAggregate } from "./aggregate-CA6bJ8UO.mjs";
3
3
  import { Result } from "@prisma/orm-framework/utils/result";
4
4
  import { PrismaNextConfig } from "@prisma/orm-framework/config/config-types";
5
- //#region ../../../1-framework/3-tooling/cli/dist/migrate-show-DWIvU6Y_.d.mts
5
+ //#region ../../../1-framework/3-tooling/cli/dist/migrate-show-DutwCc2F.d.mts
6
6
  //#region src/control-api/operations/migrate-show.d.ts
7
7
  /**
8
8
  * One migration that will run in a `migrate --show` preview, in execution order.
@@ -23,6 +23,8 @@ interface ExecuteMigrateShowPlanOptions {
23
23
  readonly db?: string;
24
24
  readonly to?: string;
25
25
  readonly from?: string;
26
+ /** Client factory used when the plan needs the live DB marker; defaults to the real client. */
27
+ readonly createClient?: CreateControlClient;
26
28
  /**
27
29
  * Invoked once, after refs/aggregate/--to resolution succeeds and before any DB connection —
28
30
  * exactly where the CLI renders its styled header today.
@@ -58,4 +60,4 @@ interface MigrateShowPlanSuccess {
58
60
  declare function executeMigrateShowPlan(options: ExecuteMigrateShowPlanOptions): Promise<Result<MigrateShowPlanSuccess, CliStructuredError$2>>;
59
61
  //#endregion
60
62
  export { executeMigrateShowPlan as i, MigrateShowMigration as n, MigrateShowPlanSuccess as r, ExecuteMigrateShowPlanOptions as t };
61
- //# sourceMappingURL=migrate-show-DWIvU6Y_-BQyWhZD1.d.mts.map
63
+ //# sourceMappingURL=migrate-show-DutwCc2F-BhGfH7D-.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-show-DutwCc2F-BhGfH7D-.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migrate-show-DutwCc2F.d.mts"],"mappings":";;;;;;;;;UAQU;WACC;WACA;WACA;WACA;WACA;;UAED;WACC,QAAQ;;WAER;;WAEA;WACA;WACA;WACA;;WAEA,eAAe;;;;;WAKf,uBAAuB;aACrB;aACA;aACA;aACA;;;UAGH;WACC,WAAW;WACX;WACA,qBAAqB;WACrB;;WAEA,yBAAyB;;WAEzB;;;;;;;;;;;;;iBAaM,uBAAuB,SAAS,gCAAgC,QAAQ,OAAO,wBAAwB"}
@@ -1,14 +1,14 @@
1
- import { F as requireLiveDatabase, N as errorUnexpected, O as errorRuntime$1, P as mapRefResolutionError, S as errorPathUnreachable, c as errorDatabaseConnectionRequired, t as CliStructuredError$1 } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { F as requireLiveDatabase, N as errorUnexpected, O as errorRuntime$1, P as mapRefResolutionError, S as errorPathUnreachable, c as errorDatabaseConnectionRequired, t as CliStructuredError$1 } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import { t as MigrationToolsError } from "./errors-CXbGUWGu-BQi6YS-H.mjs";
3
3
  import "./constants-CM-w38DQ-Cz_EXbOc.mjs";
4
- import { _ as resolveMigrationPaths, n as closeQuietly } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
4
+ import { _ as resolveMigrationPaths, n as closeQuietly } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
5
  import { i as readRefs } from "./refs-WK86uYYp-B6EZkmmT.mjs";
6
6
  import { u as requireHeadRef } from "./aggregate-BBsCbXgJ.mjs";
7
- import { r as buildReadAggregate } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
8
- import { a as planSpacePath, t as createControlClient } from "./client-C4Gh4PBz-BMUlBcuE.mjs";
7
+ import { r as buildReadAggregate } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
8
+ import { a as planSpacePath, t as createControlClient } from "./client-BqhVohc5-DFRVWFps.mjs";
9
9
  import { n as parseContractRef } from "./ref-resolution-sGcINe7o.mjs";
10
10
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
11
- //#region ../../../1-framework/3-tooling/cli/dist/migrate-show-CPZEq35I.mjs
11
+ //#region ../../../1-framework/3-tooling/cli/dist/migrate-show-bdXjSFgh.mjs
12
12
  /**
13
13
  * Computes the path through the SAME seam as `executeMigrate`:
14
14
  * - `readAllMarkers()` for the from-state (when no `--from` is given), preserving
@@ -110,7 +110,7 @@ async function executeMigrateShowPlan(options) {
110
110
  why: "A database connection is required to read the live marker for migrate --show",
111
111
  commandName: "migrate --show"
112
112
  }));
113
- const client = createControlClient({
113
+ const client = (options.createClient ?? createControlClient)({
114
114
  family: config.family,
115
115
  target: config.target,
116
116
  adapter: config.adapter,
@@ -196,4 +196,4 @@ async function executeMigrateShowPlan(options) {
196
196
  //#endregion
197
197
  export { executeMigrateShowPlan as t };
198
198
 
199
- //# sourceMappingURL=migrate-show-CPZEq35I-DeL3WVjs.mjs.map
199
+ //# sourceMappingURL=migrate-show-bdXjSFgh-CQxl5yNp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-show-bdXjSFgh-CQxl5yNp.mjs","names":["CliStructuredError","errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/migrate-show-bdXjSFgh.mjs"],"sourcesContent":["import { D as errorRuntime, M as errorUnexpected, N as mapRefResolutionError, P as requireLiveDatabase, s as errorDatabaseConnectionRequired, t as CliStructuredError, x as errorPathUnreachable } from \"./cli-errors-C6_pH59O.mjs\";\nimport { c as resolveMigrationPaths, n as closeQuietly } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { r as buildReadAggregate } from \"./contract-space-aggregate-loader-BpdB-mHG.mjs\";\nimport { n as planSpacePath, t as createControlClient } from \"./client-BqhVohc5.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { requireHeadRef } from \"@internal/migration-tools/aggregate\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\nimport { MigrationToolsError } from \"@internal/migration-tools/errors\";\nimport { readRefs } from \"@internal/migration-tools/refs\";\nimport { parseContractRef } from \"@internal/migration-tools/ref-resolution\";\n//#region src/control-api/operations/migrate-show.ts\n/**\n* Computes the path through the SAME seam as `executeMigrate`:\n* - `readAllMarkers()` for the from-state (when no `--from` is given), preserving\n* the full marker including `invariants` (not just `storageHash`).\n* - `planSpacePath()` (shared with `executeMigrate`) for per-space path selection,\n* which feeds `resolveRecordedPath()` with the same target hash, target invariants,\n* and current marker as the real apply path uses.\n*\n* Returns BEFORE any write boundary (`runMigration` / marker / DDL). No\n* DB state is mutated.\n*/\nasync function executeMigrateShowPlan(options) {\n\tconst config = options.config;\n\tconst { configPath, migrationsDir, migrationsRelative, refsDir } = resolveMigrationPaths(options.configPath, config, options.cwd);\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tconst hasDriver = !!config.driver;\n\tconst hasExplicitFrom = options.from !== void 0;\n\tif (!hasExplicitFrom) {\n\t\tconst missingDb = requireLiveDatabase({\n\t\t\tdbConnection,\n\t\t\thasDriver,\n\t\t\twhy: \"migrate --show needs a database connection to read the live marker (or pass --from <contract> for an offline preview)\",\n\t\t\tretryCommand: \"prisma-next migrate --show --from <contract>\"\n\t\t});\n\t\tif (missingDb) return notOk(missingDb);\n\t}\n\tlet allRefs = {};\n\ttry {\n\t\tallRefs = await readRefs(refsDir);\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst { aggregate, contractHash } = loaded.value;\n\tconst appGraph = aggregate.app.graph();\n\tlet targetHash = contractHash;\n\tlet refInvariants;\n\tif (options.to) {\n\t\tconst toResult = parseContractRef(options.to, {\n\t\t\tgraph: appGraph,\n\t\t\trefs: allRefs,\n\t\t\tcontractHash\n\t\t});\n\t\tif (!toResult.ok) return notOk(mapRefResolutionError(toResult.failure));\n\t\tif (toResult.value.provenance.kind === \"reserved-db\") return notOk(errorDatabaseConnectionRequired({\n\t\t\twhy: \"@db is not valid as a --to target; it names the live database state, not a target contract.\",\n\t\t\tcommandName: \"migrate --show\"\n\t\t}));\n\t\ttargetHash = toResult.value.hash;\n\t\tif (toResult.value.provenance.kind === \"ref\") {\n\t\t\tconst refEntry = allRefs[toResult.value.provenance.refName];\n\t\t\tif (refEntry) refInvariants = refEntry.invariants;\n\t\t}\n\t}\n\toptions.onPreflightComplete?.({\n\t\tconfigPath,\n\t\tmigrationsRelative,\n\t\tdbConnection,\n\t\thasExplicitFrom\n\t});\n\tconst markerBySpace = /* @__PURE__ */ new Map();\n\tconst allSpaces = [aggregate.app, ...aggregate.extensions];\n\tif (hasExplicitFrom) if (options.from === \"@db\") {\n\t\tconst missingDb = requireLiveDatabase({\n\t\t\tdbConnection,\n\t\t\thasDriver,\n\t\t\twhy: \"@db resolves to the live database marker and requires a --db connection\",\n\t\t\tretryCommand: \"prisma-next migrate --show --from @db --db $DATABASE_URL\"\n\t\t});\n\t\tif (missingDb) return notOk(missingDb);\n\t} else {\n\t\tconst fromResult = parseContractRef(options.from, {\n\t\t\tgraph: appGraph,\n\t\t\trefs: allRefs,\n\t\t\tcontractHash\n\t\t});\n\t\tif (!fromResult.ok) return notOk(mapRefResolutionError(fromResult.failure));\n\t\tif (fromResult.value.provenance.kind === \"reserved-db\") {\n\t\t\tconst missingDb = requireLiveDatabase({\n\t\t\t\tdbConnection,\n\t\t\t\thasDriver,\n\t\t\t\twhy: \"@db resolves to the live database marker and requires a --db connection\"\n\t\t\t});\n\t\t\tif (missingDb) return notOk(missingDb);\n\t\t} else {\n\t\t\tconst fromHash = fromResult.value.hash;\n\t\t\tconst offlineMarker = fromHash === EMPTY_CONTRACT_HASH ? null : {\n\t\t\t\tstorageHash: fromHash,\n\t\t\t\tinvariants: []\n\t\t\t};\n\t\t\tmarkerBySpace.set(aggregate.app.spaceId, offlineMarker);\n\t\t}\n\t}\n\tconst needsLiveMarker = !hasExplicitFrom || options.from === \"@db\";\n\tif (needsLiveMarker) {\n\t\tif (!dbConnection || !hasDriver) return notOk(errorDatabaseConnectionRequired({\n\t\t\twhy: \"A database connection is required to read the live marker for migrate --show\",\n\t\t\tcommandName: \"migrate --show\"\n\t\t}));\n\t\tconst client = (options.createClient ?? createControlClient)({\n\t\t\tfamily: config.family,\n\t\t\ttarget: config.target,\n\t\t\tadapter: config.adapter,\n\t\t\tdriver: config.driver,\n\t\t\textensions: config.extensions ?? []\n\t\t});\n\t\ttry {\n\t\t\tawait client.connect(dbConnection);\n\t\t\tconst allMarkers = await client.readAllMarkers();\n\t\t\tfor (const space of allSpaces) {\n\t\t\t\tconst marker = allMarkers.get(space.spaceId);\n\t\t\t\tmarkerBySpace.set(space.spaceId, marker ?? null);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read live DB marker: ${error instanceof Error ? error.message : String(error)}` }));\n\t\t} finally {\n\t\t\tawait closeQuietly(client);\n\t\t}\n\t}\n\tconst canonicalOrderSpaces = [...aggregate.extensions, aggregate.app];\n\tconst orderedMigrations = [];\n\tfor (const space of canonicalOrderSpaces) {\n\t\tconst isAppSpace = space.spaceId === aggregate.app.spaceId;\n\t\tconst headRef = requireHeadRef(space);\n\t\tconst outcome = planSpacePath({\n\t\t\tspace,\n\t\t\taggregate,\n\t\t\ttargetHash: isAppSpace ? targetHash : headRef.hash,\n\t\t\trefInvariants: isAppSpace ? refInvariants : void 0,\n\t\t\tliveMarker: markerBySpace.get(space.spaceId) ?? null\n\t\t});\n\t\tif (outcome.kind === \"at-head\") continue;\n\t\tif (outcome.kind === \"never-planned\") return notOk(errorPathUnreachable({\n\t\t\tcode: \"MIGRATION_PATH_NOT_FOUND\",\n\t\t\tsummary: `No on-disk migrations for contract space \"${outcome.spaceId}\"`,\n\t\t\twhy: `migrate is replay-only: space \"${outcome.spaceId}\" has no on-disk migrations but its head ref targets \"${outcome.targetHash}\".`,\n\t\t\tmeta: {\n\t\t\t\tspaceId: outcome.spaceId,\n\t\t\t\ttarget: outcome.targetHash,\n\t\t\t\tkind: \"neverPlanned\"\n\t\t\t}\n\t\t}));\n\t\tif (outcome.kind === \"unreachable\") {\n\t\t\tconst fromHash = outcome.liveMarker?.storageHash ?? EMPTY_CONTRACT_HASH;\n\t\t\treturn notOk(errorPathUnreachable({\n\t\t\t\tcode: \"MIGRATION_PATH_NOT_FOUND\",\n\t\t\t\tsummary: `No migration path from ${fromHash.slice(0, 14)} to ${outcome.targetHash.slice(0, 14)} in space \"${outcome.spaceId}\".`,\n\t\t\t\twhy: `The migration graph has no path from the from-state to the target in space \"${outcome.spaceId}\".`,\n\t\t\t\tmeta: {\n\t\t\t\t\tspaceId: outcome.spaceId,\n\t\t\t\t\tfrom: fromHash,\n\t\t\t\t\tto: outcome.targetHash\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t\tif (outcome.kind === \"unsatisfiable\") return notOk(errorRuntime(\"MIGRATION.NO_INVARIANT_PATH\", `Missing required invariants for space \"${outcome.spaceId}\"`, {\n\t\t\twhy: `The path requires invariants not available on disk: ${outcome.missing.join(\", \")}`,\n\t\t\tfix: \"Add a migration on the path that runs `dataTransform({ invariantId: \\\"<id>\\\", … })` for each missing invariant, or retarget the ref to a hash whose path already provides them.\",\n\t\t\tmeta: {\n\t\t\t\tspaceId: outcome.spaceId,\n\t\t\t\tmissing: [...outcome.missing]\n\t\t\t}\n\t\t}));\n\t\tfor (const edge of outcome.plan.migrationEdges) orderedMigrations.push({\n\t\t\tspaceId: space.spaceId,\n\t\t\tdirName: edge.dirName,\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tfrom: edge.from,\n\t\t\tto: edge.to\n\t\t});\n\t}\n\tconst count = orderedMigrations.length;\n\treturn ok({\n\t\taggregate,\n\t\tcontractHash,\n\t\tmigrations: orderedMigrations,\n\t\tsummary: count === 0 ? \"Already up to date — nothing to run\" : `${count} migration${count === 1 ? \"\" : \"s\"} will run`,\n\t\trenderMarkerHashBySpace: new Map(allSpaces.map((s) => [s.spaceId, markerBySpace.get(s.spaceId)?.storageHash ?? EMPTY_CONTRACT_HASH])),\n\t\tusedLiveMarker: needsLiveMarker\n\t});\n}\n//#endregion\nexport { executeMigrateShowPlan as t };\n\n//# sourceMappingURL=migrate-show-bdXjSFgh.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,eAAe,uBAAuB,SAAS;CAC9C,MAAM,SAAS,QAAQ;CACvB,MAAM,EAAE,YAAY,eAAe,oBAAoB,YAAY,sBAAsB,QAAQ,YAAY,QAAQ,QAAQ,GAAG;CAChI,MAAM,eAAe,QAAQ,MAAM,OAAO,IAAI;CAC9C,MAAM,YAAY,CAAC,CAAC,OAAO;CAC3B,MAAM,kBAAkB,QAAQ,SAAS,KAAK;CAC9C,IAAI,CAAC,iBAAiB;EACrB,MAAM,YAAY,oBAAoB;GACrC;GACA;GACA,KAAK;GACL,cAAc;EACf,CAAC;EACD,IAAI,WAAW,OAAO,MAAM,SAAS;CACtC;CACA,IAAI,UAAU,CAAC;CACf,IAAI;EACH,UAAU,MAAM,SAAS,OAAO;CACjC,SAAS,OAAO;EACf,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;E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I,KAAK,IAAI;EAC3G,yBAAyB,IAAI,IAAI,UAAU,KAAK,MAAM,CAAC,EAAE,SAAS,cAAc,IAAI,EAAE,OAAO,CAAC,EAAE,eAAA,OAAkC,CAAC,CAAC;EACpI,gBAAgB;CACjB,CAAC;AACF"}
@@ -1,12 +1,12 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { I as runCommandAction, r as chooseAction } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
3
- import { a as formatErrorJson, o as formatErrorOutput, r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
4
- import { _ as resolveMigrationPaths, b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
5
- import { r as buildReadAggregate } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
6
- import { i as runMigrationCheck, n as enumerateCheckSpaces, r as loadAggregateIntegrityViolations, t as checkSingleTarget } from "./migration-check-BUAcSrvA-DSS5Yvco.mjs";
2
+ import { I as runCommandAction, r as chooseAction } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
3
+ import { a as formatErrorJson, o as formatErrorOutput, r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
4
+ import { _ as resolveMigrationPaths, b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
+ import { r as buildReadAggregate } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
6
+ import { i as runMigrationCheck, n as enumerateCheckSpaces, r as loadAggregateIntegrityViolations, t as checkSingleTarget } from "./migration-check-of-RPYRk-HuXtDO8i.mjs";
7
7
  import { join, relative } from "pathe";
8
8
  import { Command } from "commander";
9
- //#region ../../../1-framework/3-tooling/cli/dist/migration-check-COMRj5eu.mjs
9
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-check-aoZ8kXNA.mjs
10
10
  function migrationPathRelative(dirPath) {
11
11
  return relative(process.cwd(), dirPath);
12
12
  }
@@ -269,4 +269,4 @@ function createMigrationCheckCommand() {
269
269
  //#endregion
270
270
  export { createMigrationCheckCommand as t };
271
271
 
272
- //# sourceMappingURL=migration-check-COMRj5eu-DbJgriA8.mjs.map
272
+ //# sourceMappingURL=migration-check-aoZ8kXNA-DX2J84Cv.mjs.map