@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,6 +1,6 @@
1
- import { t as listRefsByContractHash } from "./migration-list-AKRIIovW-BN-Zrwk0.mjs";
2
- import { m as indentMigrationGraphTreeBlock, o as computeGlobalMaxDirNameWidth, s as computeGlobalMaxEdgeTreePrefixWidth, y as renderMigrationGraphSpaceTree } from "./migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs";
3
- //#region ../../../1-framework/3-tooling/cli/dist/migration-graph-sections-CceYWPCP.mjs
1
+ import { t as listRefsByContractHash } from "./migration-list-W0dqabIj-Dc2NH_LY.mjs";
2
+ import { m as indentMigrationGraphTreeBlock, o as computeGlobalMaxDirNameWidth, s as computeGlobalMaxEdgeTreePrefixWidth, y as renderMigrationGraphSpaceTree } from "./migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs";
3
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-graph-sections-BWcFCOL6.mjs
4
4
  /**
5
5
  * One tree per in-scope contract space. Widths are computed across every space
6
6
  * first so multi-space sections align with each other.
@@ -66,4 +66,4 @@ function renderMigrationGraphDot(graph) {
66
66
  //#endregion
67
67
  export { renderMigrationGraphDot as n, renderMigrationGraphSections as r, buildMigrationGraphTreeSections as t };
68
68
 
69
- //# sourceMappingURL=migration-graph-sections-CceYWPCP-LqImOaK1.mjs.map
69
+ //# sourceMappingURL=migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-graph-sections-CceYWPCP-LqImOaK1.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-graph-sections-CceYWPCP.mjs"],"sourcesContent":["import { t as listRefsByContractHash } from \"./migration-list-AKRIIovW.mjs\";\nimport { d as computeGlobalMaxEdgeTreePrefixWidth, m as renderMigrationGraphSpaceTree, p as indentMigrationGraphTreeBlock, u as computeGlobalMaxDirNameWidth } from \"./migration-graph-command-render-CgdHruiZ.mjs\";\n//#region src/utils/formatters/migration-graph-sections.ts\n/**\n* One tree per in-scope contract space. Widths are computed across every space\n* first so multi-space sections align with each other.\n*/\nfunction buildMigrationGraphTreeSections(inputs) {\n\tconst { aggregate, scopedSpaces, liveContractHash, glyphMode, colorize } = inputs;\n\tconst showSpaceHeadings = scopedSpaces.length > 1;\n\tconst globalLayoutInputs = showSpaceHeadings ? scopedSpaces.filter((entry) => entry.migrations.length > 0).flatMap((entry) => {\n\t\tconst graph = aggregate.space(entry.space)?.graph();\n\t\treturn graph === void 0 ? [] : [{\n\t\t\tgraph,\n\t\t\tliveContractHash\n\t\t}];\n\t}) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tconst sections = [];\n\tfor (const entry of scopedSpaces) {\n\t\tconst space = aggregate.space(entry.space);\n\t\tif (space === void 0) continue;\n\t\tconst tree = entry.migrations.length === 0 ? \"\" : renderMigrationGraphSpaceTree({\n\t\t\tgraph: space.graph(),\n\t\t\tmigrations: entry.migrations,\n\t\t\tliveContractHash,\n\t\t\tglyphMode,\n\t\t\tcolorize,\n\t\t\tisAppSpace: entry.space === aggregate.app.spaceId,\n\t\t\trefsByHash: listRefsByContractHash(space),\n\t\t\t...inputs.styler !== void 0 ? { styler: inputs.styler } : {},\n\t\t\t...inputs.palette !== void 0 ? { palette: inputs.palette } : {},\n\t\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t\t});\n\t\tsections.push({\n\t\t\tspace: entry.space,\n\t\t\ttree: showSpaceHeadings && tree.length > 0 ? indentMigrationGraphTreeBlock(tree, \" \") : tree,\n\t\t\tshowHeading: showSpaceHeadings\n\t\t});\n\t}\n\treturn sections;\n}\n/** The rendered tree, headings and summary as one block of lines. */\nfunction renderMigrationGraphSections(sections, summary) {\n\tconst lines = [];\n\tfor (const section of sections) {\n\t\tif (section.showHeading) lines.push(`${section.space}:`);\n\t\tlines.push(section.tree.length > 0 ? section.tree : \"(no migrations)\");\n\t\tlines.push(\"\");\n\t}\n\tlines.push(summary);\n\treturn lines.join(\"\\n\").trimEnd();\n}\n/**\n* Graphviz DOT for the app graph. Node ids are truncated to 12 characters,\n* which is a collision hazard recorded and preserved by the port.\n*/\nfunction renderMigrationGraphDot(graph) {\n\tconst lines = [\"digraph migrations {\"];\n\tfor (const edge of graph.migrationByHash.values()) lines.push(` \"${edge.from.slice(0, 12)}\" -> \"${edge.to.slice(0, 12)}\" [label=\"${edge.dirName}\"];`);\n\tlines.push(\"}\");\n\treturn lines.join(\"\\n\");\n}\n//#endregion\nexport { renderMigrationGraphDot as n, renderMigrationGraphSections as r, buildMigrationGraphTreeSections as t };\n\n//# sourceMappingURL=migration-graph-sections-CceYWPCP.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,WAAW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AAC;CACf,KAAK,MAAM,WAAW,UAAU;EAC/B,IAAI,QAAQ,aAAa,MAAM,KAAK,GAAG,QAAQ,MAAM,EAAE;EACvD,MAAM,KAAK,QAAQ,KAAK,SAAS,IAAI,QAAQ,OAAO,iBAAiB;EACrE,MAAM,KAAK,EAAE;CACd;CACA,MAAM,KAAK,OAAO;CAClB,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;AACjC;;;;;AAKA,SAAS,wBAAwB,OAAO;CACvC,MAAM,QAAQ,CAAC,sBAAsB;CACrC,KAAK,MAAM,QAAQ,MAAM,gBAAgB,OAAO,GAAG,MAAM,KAAK,MAAM,KAAK,KAAK,MAAM,GAAG,EAAE,EAAE,QAAQ,KAAK,GAAG,MAAM,GAAG,EAAE,EAAE,YAAY,KAAK,QAAQ,IAAI;CACrJ,MAAM,KAAK,GAAG;CACd,OAAO,MAAM,KAAK,IAAI;AACvB"}
1
+ {"version":3,"file":"migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-graph-sections-BWcFCOL6.mjs"],"sourcesContent":["import { t as listRefsByContractHash } from \"./migration-list-W0dqabIj.mjs\";\nimport { d as computeGlobalMaxEdgeTreePrefixWidth, m as renderMigrationGraphSpaceTree, p as indentMigrationGraphTreeBlock, u as computeGlobalMaxDirNameWidth } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\n//#region src/utils/formatters/migration-graph-sections.ts\n/**\n* One tree per in-scope contract space. Widths are computed across every space\n* first so multi-space sections align with each other.\n*/\nfunction buildMigrationGraphTreeSections(inputs) {\n\tconst { aggregate, scopedSpaces, liveContractHash, glyphMode, colorize } = inputs;\n\tconst showSpaceHeadings = scopedSpaces.length > 1;\n\tconst globalLayoutInputs = showSpaceHeadings ? scopedSpaces.filter((entry) => entry.migrations.length > 0).flatMap((entry) => {\n\t\tconst graph = aggregate.space(entry.space)?.graph();\n\t\treturn graph === void 0 ? [] : [{\n\t\t\tgraph,\n\t\t\tliveContractHash\n\t\t}];\n\t}) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tconst sections = [];\n\tfor (const entry of scopedSpaces) {\n\t\tconst space = aggregate.space(entry.space);\n\t\tif (space === void 0) continue;\n\t\tconst tree = entry.migrations.length === 0 ? \"\" : renderMigrationGraphSpaceTree({\n\t\t\tgraph: space.graph(),\n\t\t\tmigrations: entry.migrations,\n\t\t\tliveContractHash,\n\t\t\tglyphMode,\n\t\t\tcolorize,\n\t\t\tisAppSpace: entry.space === aggregate.app.spaceId,\n\t\t\trefsByHash: listRefsByContractHash(space),\n\t\t\t...inputs.styler !== void 0 ? { styler: inputs.styler } : {},\n\t\t\t...inputs.palette !== void 0 ? { palette: inputs.palette } : {},\n\t\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t\t});\n\t\tsections.push({\n\t\t\tspace: entry.space,\n\t\t\ttree: showSpaceHeadings && tree.length > 0 ? indentMigrationGraphTreeBlock(tree, \" \") : tree,\n\t\t\tshowHeading: showSpaceHeadings\n\t\t});\n\t}\n\treturn sections;\n}\n/** The rendered tree, headings and summary as one block of lines. */\nfunction renderMigrationGraphSections(sections, summary) {\n\tconst lines = [];\n\tfor (const section of sections) {\n\t\tif (section.showHeading) lines.push(`${section.space}:`);\n\t\tlines.push(section.tree.length > 0 ? section.tree : \"(no migrations)\");\n\t\tlines.push(\"\");\n\t}\n\tlines.push(summary);\n\treturn lines.join(\"\\n\").trimEnd();\n}\n/**\n* Graphviz DOT for the app graph. Node ids are truncated to 12 characters,\n* which is a collision hazard recorded and preserved by the port.\n*/\nfunction renderMigrationGraphDot(graph) {\n\tconst lines = [\"digraph migrations {\"];\n\tfor (const edge of graph.migrationByHash.values()) lines.push(` \"${edge.from.slice(0, 12)}\" -> \"${edge.to.slice(0, 12)}\" [label=\"${edge.dirName}\"];`);\n\tlines.push(\"}\");\n\treturn lines.join(\"\\n\");\n}\n//#endregion\nexport { renderMigrationGraphDot as n, renderMigrationGraphSections as r, buildMigrationGraphTreeSections as t };\n\n//# sourceMappingURL=migration-graph-sections-BWcFCOL6.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,WAAW,cAAc,kBAAkB,WAAW,aAAa;CAC3E,MAAM,oBAAoB,aAAa,SAAS;CAChD,MAAM,qBAAqB,oBAAoB,aAAa,QAAQ,UAAU,MAAM,WAAW,SAAS,CAAC,CAAC,CAAC,SAAS,UAAU;EAC7H,MAAM,QAAQ,UAAU,MAAM,MAAM,KAAK,CAAC,EAAE,MAAM;EAClD,OAAO,UAAU,KAAK,IAAI,CAAC,IAAI,CAAC;GAC/B;GACA;EACD,CAAC;CACF,CAAC,IAAI,CAAC;CACN,MAAM,+BAA+B,mBAAmB,SAAS,IAAI,oCAAoC,kBAAkB,IAAI,KAAK;CACpI,MAAM,wBAAwB,mBAAmB,SAAS,IAAI,6BAA6B,kBAAkB,IAAI,KAAK;CACtH,MAAM,WAAW,CAAC;CAClB,KAAK,MAAM,SAAS,cAAc;EACjC,MAAM,QAAQ,UAAU,MAAM,MAAM,KAAK;EACzC,IAAI,UAAU,KAAK,GAAG;EACtB,MAAM,OAAO,MAAM,WAAW,WAAW,IAAI,KAAK,8BAA8B;GAC/E,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM;GAClB;GACA;GACA;GACA,YAAY,MAAM,UAAU,UAAU,IAAI;GAC1C,YAAY,uBAAuB,KAAK;GACxC,GAAG,OAAO,WAAW,KAAK,IAAI,EAAE,QAAQ,OAAO,OAAO,IAAI,CAAC;GAC3D,GAAG,OAAO,YAAY,KAAK,IAAI,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;GAC9D,GAAG,iCAAiC,KAAK,IAAI,EAAE,6BAA6B,IAAI,CAAC;GACjF,GAAG,0BAA0B,KAAK,IAAI,EAAE,sBAAsB,IAAI,CAAC;EACpE,CAAC;EACD,SAAS,KAAK;GACb,OAAO,MAAM;GACb,MAAM,qBAAqB,KAAK,SAAS,IAAI,8BAA8B,MAAM,IAAI,IAAI;GACzF,aAAa;EACd,CAAC;CACF;CACA,OAAO;AACR;;AAEA,SAAS,6BAA6B,UAAU,SAAS;CACxD,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,WAAW,UAAU;EAC/B,IAAI,QAAQ,aAAa,MAAM,KAAK,GAAG,QAAQ,MAAM,EAAE;EACvD,MAAM,KAAK,QAAQ,KAAK,SAAS,IAAI,QAAQ,OAAO,iBAAiB;EACrE,MAAM,KAAK,EAAE;CACd;CACA,MAAM,KAAK,OAAO;CAClB,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;AACjC;;;;;AAKA,SAAS,wBAAwB,OAAO;CACvC,MAAM,QAAQ,CAAC,sBAAsB;CACrC,KAAK,MAAM,QAAQ,MAAM,gBAAgB,OAAO,GAAG,MAAM,KAAK,MAAM,KAAK,KAAK,MAAM,GAAG,EAAE,EAAE,QAAQ,KAAK,GAAG,MAAM,GAAG,EAAE,EAAE,YAAY,KAAK,QAAQ,IAAI;CACrJ,MAAM,KAAK,GAAG;CACd,OAAO,MAAM,KAAK,IAAI;AACvB"}
@@ -1,14 +1,14 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
3
- import { _ as resolveMigrationPaths, b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
4
- import { r as buildReadAggregate } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
5
- import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from "./migration-list-AKRIIovW-BN-Zrwk0.mjs";
6
- import { b as renderMigrationListWithStyle, u as createAnsiMigrationListStyler, v as renderMigrationGraphLegend } from "./migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs";
7
- import { n as validateLegendOptions, t as shouldShowLegend } from "./legend-QYDKKevn-DCIlAPn4.mjs";
2
+ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
3
+ import { _ as resolveMigrationPaths, b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
4
+ import { r as buildReadAggregate } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
5
+ import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from "./migration-list-W0dqabIj-Dc2NH_LY.mjs";
6
+ import { b as renderMigrationListWithStyle, u as createAnsiMigrationListStyler, v as renderMigrationGraphLegend } from "./migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs";
7
+ import { n as validateLegendOptions, t as shouldShowLegend } from "./legend-aXC5H1jH-Dg1yWonK.mjs";
8
8
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
9
9
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
10
10
  import { Command } from "commander";
11
- //#region ../../../1-framework/3-tooling/cli/dist/migration-list-BiVyonwG.mjs
11
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-list-B0SANIeM.mjs
12
12
  function renderMigrationListHumanOutput(result, options) {
13
13
  return renderMigrationListWithStyle(result, createAnsiMigrationListStyler({ useColor: options.useColor }), options.glyphMode, {
14
14
  colorize: options.useColor,
@@ -127,4 +127,4 @@ function createMigrationListCommand() {
127
127
  //#endregion
128
128
  export { executeMigrationListCommand as n, renderMigrationListHumanOutput as r, createMigrationListCommand as t };
129
129
 
130
- //# sourceMappingURL=migration-list-BiVyonwG-CdMbBV5Z.mjs.map
130
+ //# sourceMappingURL=migration-list-B0SANIeM-DiXQ9LyS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-list-BiVyonwG-CdMbBV5Z.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-list-BiVyonwG.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-JJKxvT0q.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { r as buildReadAggregate } from \"./contract-space-aggregate-loader-1wG1OiDk.mjs\";\nimport { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from \"./migration-list-AKRIIovW.mjs\";\nimport { a as renderMigrationGraphLegend, l as renderMigrationListWithStyle, o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-CgdHruiZ.mjs\";\nimport { n as validateLegendOptions, t as shouldShowLegend } from \"./legend-QYDKKevn.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-list.ts\nfunction renderMigrationListHumanOutput(result, options) {\n\treturn renderMigrationListWithStyle(result, createAnsiMigrationListStyler({ useColor: options.useColor }), options.glyphMode, {\n\t\tcolorize: options.useColor,\n\t\tliveContractHash: options.liveContractHash,\n\t\tgraphForSpace: options.graphForSpace,\n\t\t...options.appSpaceId !== void 0 ? { appSpaceId: options.appSpaceId } : {}\n\t});\n}\n/**\n* CLI shell: loads config, resolves paths, prints the styled header on\n* stderr (interactive mode only), and delegates to {@link runMigrationList}.\n* Kept intentionally thin so the unit-testable surface lives in the core.\n*/\nasync function executeMigrationListCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(options.config, config, process.cwd());\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration list\",\n\t\t\tdescription: \"List on-disk migrations per contract space\",\n\t\t\tdetails: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: configPath\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\tvalue: migrationsRelative\n\t\t\t\t},\n\t\t\t\t...options.space !== void 0 ? [{\n\t\t\t\t\tlabel: \"space\",\n\t\t\t\t\tvalue: options.space\n\t\t\t\t}] : []\n\t\t\t],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t\tif (shouldShowLegend(options, flags)) {\n\t\t\tui.stderr(renderMigrationGraphLegend({\n\t\t\t\tcolorize: flags.color !== false,\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t}));\n\t\t\tui.stderr(\"\");\n\t\t}\n\t}\n\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst { aggregate, contractHash: liveContractHash } = loaded.value;\n\tconst listResult = runMigrationList({\n\t\tspaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),\n\t\t...ifDefined(\"spaceFilter\", options.space)\n\t});\n\tif (!listResult.ok) return listResult;\n\treturn ok({\n\t\tlist: listResult.value,\n\t\tliveContractHash,\n\t\taggregate\n\t});\n}\nfunction createMigrationListCommand() {\n\tconst command = new Command(\"list\");\n\tsetCommandDescriptions(command, \"List on-disk migrations per contract space\", \"Enumerates every on-disk migration under migrations/<space>/ for every\\ncontract space found on disk. Offline — does not consult the database.\\nHuman output draws the shared migration graph tree with operation counts,\\ninvariants on each migration row, and refs on destination contract nodes.\\nPass --space <id> to narrow to one contract space. --ascii forces ASCII\\ntree glyphs (orthogonal to --no-color).\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration list\",\n\t\t\"prisma-next migration list --space app\",\n\t\t\"prisma-next migration list --ascii\",\n\t\t\"prisma-next migration list --legend\",\n\t\t\"prisma-next migration list --json\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration log\",\n\t\t\toneLiner: \"Show executed migration history\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--space <id>\", \"Narrow output to a single contract space\").option(\"--ascii\", \"Use ASCII kind glyphs (pipe-friendly)\").option(\"--legend\", \"Print a key for the tree glyphs and lane colors\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst legendValidation = validateLegendOptions(options, flags);\n\t\tif (!legendValidation.ok) process.exit(handleResult(legendValidation, flags, ui));\n\t\tconst exitCode = handleResult(await executeMigrationListCommand(options, flags, ui), flags, ui, ({ list, liveContractHash, aggregate }) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(list, null, 2));\n\t\t\telse if (!flags.quiet) ui.output(renderMigrationListHumanOutput(list, {\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true),\n\t\t\t\tuseColor: ui.useColor,\n\t\t\t\tliveContractHash,\n\t\t\t\tgraphForSpace: (spaceId) => aggregate.space(spaceId)?.graph(),\n\t\t\t\tappSpaceId: aggregate.app.spaceId\n\t\t\t}));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationListCommand as n, renderMigrationListHumanOutput as r, createMigrationListCommand as t };\n\n//# sourceMappingURL=migration-list-BiVyonwG.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,+BAA+B,QAAQ,SAAS;CACxD,OAAO,6BAA6B,QAAQ,8BAA8B,EAAE,UAAU,QAAQ,SAAS,CAAC,GAAG,QAAQ,WAAW;EAC7H,UAAU,QAAQ;EAClB,kBAAkB,QAAQ;EAC1B,eAAe,QAAQ;EACvB,GAAG,QAAQ,eAAe,KAAK,IAAI,EAAE,YAAY,QAAQ,WAAW,IAAI,CAAC;CAC1E,CAAC;AACF;;;;;;AAMA,eAAe,4BAA4B,SAAS,OAAO,IAAI;CAC9D,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,EAAE,YAAY,eAAe,uBAAuB,sBAAsB,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CACrH,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;EAChC,MAAM,SAAS,mBAAmB;GACjC,SAAS;GACT,aAAa;GACb,SAAS;IACR;KACC,OAAO;KACP,OAAO;IACR;IACA;KACC,OAAO;KACP,OAAO;IACR;IACA,GAAG,QAAQ,UAAU,KAAK,IAAI,CAAC;KAC9B,OAAO;KACP,OAAO,QAAQ;IAChB,CAAC,IAAI,CAAC;GACP;GACA;EACD,CAAC;EACD,GAAG,OAAO,MAAM;EAChB,IAAI,iBAAiB,SAAS,KAAK,GAAG;GACrC,GAAG,OAAO,2BAA2B;IACpC,UAAU,MAAM,UAAU;IAC1B,WAAW,GAA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AAgB;GAC1I,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,OAAO,GAAG,OAAO,+BAA+B,MAAM;IACrE,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACrD,UAAU,GAAG;IACb;IACA,gBAAgB,YAAY,UAAU,MAAM,OAAO,CAAC,EAAE,MAAM;IAC5D,YAAY,UAAU,IAAI;GAC3B,CAAC,CAAC;EACH,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
1
+ {"version":3,"file":"migration-list-B0SANIeM-DiXQ9LyS.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-list-B0SANIeM.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { r as buildReadAggregate } from \"./contract-space-aggregate-loader-BpdB-mHG.mjs\";\nimport { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from \"./migration-list-W0dqabIj.mjs\";\nimport { a as renderMigrationGraphLegend, l as renderMigrationListWithStyle, o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\nimport { n as validateLegendOptions, t as shouldShowLegend } from \"./legend-aXC5H1jH.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-list.ts\nfunction renderMigrationListHumanOutput(result, options) {\n\treturn renderMigrationListWithStyle(result, createAnsiMigrationListStyler({ useColor: options.useColor }), options.glyphMode, {\n\t\tcolorize: options.useColor,\n\t\tliveContractHash: options.liveContractHash,\n\t\tgraphForSpace: options.graphForSpace,\n\t\t...options.appSpaceId !== void 0 ? { appSpaceId: options.appSpaceId } : {}\n\t});\n}\n/**\n* CLI shell: loads config, resolves paths, prints the styled header on\n* stderr (interactive mode only), and delegates to {@link runMigrationList}.\n* Kept intentionally thin so the unit-testable surface lives in the core.\n*/\nasync function executeMigrationListCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(options.config, config, process.cwd());\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration list\",\n\t\t\tdescription: \"List on-disk migrations per contract space\",\n\t\t\tdetails: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: configPath\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\tvalue: migrationsRelative\n\t\t\t\t},\n\t\t\t\t...options.space !== void 0 ? [{\n\t\t\t\t\tlabel: \"space\",\n\t\t\t\t\tvalue: options.space\n\t\t\t\t}] : []\n\t\t\t],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t\tif (shouldShowLegend(options, flags)) {\n\t\t\tui.stderr(renderMigrationGraphLegend({\n\t\t\t\tcolorize: flags.color !== false,\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t}));\n\t\t\tui.stderr(\"\");\n\t\t}\n\t}\n\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst { aggregate, contractHash: liveContractHash } = loaded.value;\n\tconst listResult = runMigrationList({\n\t\tspaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),\n\t\t...ifDefined(\"spaceFilter\", options.space)\n\t});\n\tif (!listResult.ok) return listResult;\n\treturn ok({\n\t\tlist: listResult.value,\n\t\tliveContractHash,\n\t\taggregate\n\t});\n}\nfunction createMigrationListCommand() {\n\tconst command = new Command(\"list\");\n\tsetCommandDescriptions(command, \"List on-disk migrations per contract space\", \"Enumerates every on-disk migration under migrations/<space>/ for every\\ncontract space found on disk. Offline — does not consult the database.\\nHuman output draws the shared migration graph tree with operation counts,\\ninvariants on each migration row, and refs on destination contract nodes.\\nPass --space <id> to narrow to one contract space. --ascii forces ASCII\\ntree glyphs (orthogonal to --no-color).\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration list\",\n\t\t\"prisma-next migration list --space app\",\n\t\t\"prisma-next migration list --ascii\",\n\t\t\"prisma-next migration list --legend\",\n\t\t\"prisma-next migration list --json\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration log\",\n\t\t\toneLiner: \"Show executed migration history\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--space <id>\", \"Narrow output to a single contract space\").option(\"--ascii\", \"Use ASCII kind glyphs (pipe-friendly)\").option(\"--legend\", \"Print a key for the tree glyphs and lane colors\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst legendValidation = validateLegendOptions(options, flags);\n\t\tif (!legendValidation.ok) process.exit(handleResult(legendValidation, flags, ui));\n\t\tconst exitCode = handleResult(await executeMigrationListCommand(options, flags, ui), flags, ui, ({ list, liveContractHash, aggregate }) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(list, null, 2));\n\t\t\telse if (!flags.quiet) ui.output(renderMigrationListHumanOutput(list, {\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true),\n\t\t\t\tuseColor: ui.useColor,\n\t\t\t\tliveContractHash,\n\t\t\t\tgraphForSpace: (spaceId) => aggregate.space(spaceId)?.graph(),\n\t\t\t\tappSpaceId: aggregate.app.spaceId\n\t\t\t}));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationListCommand as n, renderMigrationListHumanOutput as r, createMigrationListCommand as t };\n\n//# sourceMappingURL=migration-list-B0SANIeM.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,+BAA+B,QAAQ,SAAS;CACxD,OAAO,6BAA6B,QAAQ,8BAA8B,EAAE,UAAU,QAAQ,SAAS,CAAC,GAAG,QAAQ,WAAW;EAC7H,UAAU,QAAQ;EAClB,kBAAkB,QAAQ;EAC1B,eAAe,QAAQ;EACvB,GAAG,QAAQ,eAAe,KAAK,IAAI,EAAE,YAAY,QAAQ,WAAW,IAAI,CAAC;CAC1E,CAAC;AACF;;;;;;AAMA,eAAe,4BAA4B,SAAS,OAAO,IAAI;CAC9D,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,EAAE,YAAY,eAAe,uBAAuB,sBAAsB,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CACrH,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;EAChC,MAAM,SAAS,mBAAmB;GACjC,SAAS;GACT,aAAa;GACb,SAAS;IACR;KACC,OAAO;KACP,OAAO;IACR;IACA;KACC,OAAO;KACP,OAAO;IACR;IACA,GAAG,QAAQ,UAAU,KAAK,IAAI,CAAC;KAC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mB,sBAAsB,SAAS,KAAK;EAC7D,IAAI,CAAC,iBAAiB,IAAI,QAAQ,KAAK,aAAa,kBAAkB,OAAO,EAAE,CAAC;EAChF,MAAM,WAAW,aAAa,MAAM,4BAA4B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,EAAE,MAAM,kBAAkB,gBAAgB;GAC1I,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,OAAO,GAAG,OAAO,+BAA+B,MAAM;IACrE,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACrD,UAAU,GAAG;IACb;IACA,gBAAgB,YAAY,UAAU,MAAM,OAAO,CAAC,EAAE,MAAM;IAC5D,YAAY,UAAU,IAAI;GAC3B,CAAC,CAAC;EACH,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -1,8 +1,8 @@
1
- import { A as errorSpaceNotFound, m as errorInvalidSpaceId } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { A as errorSpaceNotFound, m as errorInvalidSpaceId } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import { a as isValidSpaceId, o as listContractSpaceDirectories, t as APP_SPACE_ID } from "./verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs";
3
3
  import { o as refsByContractHash, t as HEAD_REF_NAME } from "./refs-WK86uYYp-B6EZkmmT.mjs";
4
4
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
5
- //#region ../../../1-framework/3-tooling/cli/dist/migration-list-AKRIIovW.mjs
5
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-list-W0dqabIj.mjs
6
6
  function compareSpaceIds(a, b) {
7
7
  if (a === APP_SPACE_ID) return b === APP_SPACE_ID ? 0 : -1;
8
8
  if (b === APP_SPACE_ID) return 1;
@@ -99,4 +99,4 @@ function runMigrationList(inputs) {
99
99
  //#endregion
100
100
  export { migrationSpaceListEntriesFromAggregate as n, runMigrationList as r, listRefsByContractHash as t };
101
101
 
102
- //# sourceMappingURL=migration-list-AKRIIovW-BN-Zrwk0.mjs.map
102
+ //# sourceMappingURL=migration-list-W0dqabIj-Dc2NH_LY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-list-AKRIIovW-BN-Zrwk0.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-list-AKRIIovW.mjs"],"sourcesContent":["import { k as errorSpaceNotFound, p as errorInvalidSpaceId } from \"./cli-errors-CihMAEVj.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { APP_SPACE_ID, isValidSpaceId, listContractSpaceDirectories } from \"@internal/migration-tools/spaces\";\nimport { HEAD_REF_NAME, refsByContractHash } from \"@internal/migration-tools/refs\";\n//#region src/control-api/operations/migration-list.ts\nfunction compareSpaceIds(a, b) {\n\tif (a === APP_SPACE_ID) return b === APP_SPACE_ID ? 0 : -1;\n\tif (b === APP_SPACE_ID) return 1;\n\tif (a < b) return -1;\n\tif (a > b) return 1;\n\treturn 0;\n}\nfunction compareDirNamesDescending(a, b) {\n\tif (a.name < b.name) return 1;\n\tif (a.name > b.name) return -1;\n\treturn 0;\n}\n/**\n* Ref names decorating a space's destination contract hashes. The\n* tolerant `space.refs` deliberately omits the structural `head.json`;\n* for extension spaces the old enumerator surfaced it as a `head`\n* decoration on the tip migration, so fold `space.headRef` back in to\n* keep that output. The app space synthesises its head, so it carries\n* no on-disk `head` ref to restore.\n*/\nfunction listRefsByContractHash(space) {\n\tconst byHash = new Map(refsByContractHash(space.refs));\n\tif (space.spaceId !== APP_SPACE_ID && space.headRef !== null) {\n\t\tconst hash = space.headRef.hash;\n\t\tconst bucket = byHash.get(hash) ?? [];\n\t\tif (!bucket.includes(HEAD_REF_NAME)) byHash.set(hash, [...bucket, HEAD_REF_NAME].sort());\n\t}\n\treturn byHash;\n}\nasync function orderedOnDiskSpaceIds(projectMigrationsDir) {\n\treturn (await listContractSpaceDirectories(projectMigrationsDir)).filter(isValidSpaceId).sort(compareSpaceIds);\n}\n/**\n* Project the loaded {@link ContractSpaceAggregate} into the render-ready\n* {@link MigrationSpaceListEntry} rows `migration list` displays.\n*\n* Space membership matches the on-disk contract-space directories (not the\n* aggregate's always-present synthesized app space when `migrations/app/`\n* is absent); package and ref data come from `aggregate.space(id)`.\n*/\nasync function migrationSpaceListEntriesFromAggregate(aggregate, projectMigrationsDir) {\n\tconst spaceIds = await orderedOnDiskSpaceIds(projectMigrationsDir);\n\tconst spaces = [];\n\tfor (const spaceId of spaceIds) {\n\t\tconst space = aggregate.space(spaceId);\n\t\tif (space === void 0) continue;\n\t\tconst refsByHash = listRefsByContractHash(space);\n\t\tconst migrations = space.packages.map((pkg) => ({\n\t\t\tname: pkg.dirName,\n\t\t\thash: pkg.metadata.migrationHash,\n\t\t\tfromContract: pkg.metadata.from,\n\t\t\ttoContract: pkg.metadata.to,\n\t\t\toperationCount: pkg.ops.length,\n\t\t\tcreatedAt: pkg.metadata.createdAt,\n\t\t\trefs: [...refsByHash.get(pkg.metadata.to) ?? []],\n\t\t\tprovidedInvariants: [...pkg.metadata.providedInvariants]\n\t\t})).sort(compareDirNamesDescending);\n\t\tspaces.push({\n\t\t\tspace: spaceId,\n\t\t\tmigrations\n\t\t});\n\t}\n\treturn spaces;\n}\nfunction computeSummary(spaces) {\n\tconst totalMigrations = spaces.reduce((count, space) => count + space.migrations.length, 0);\n\tif (spaces.length <= 1) return `${totalMigrations} migration(s) on disk`;\n\treturn `${totalMigrations} migration(s) across ${spaces.length} contract space(s)`;\n}\n/**\n* Policy core of `migration list`: validates `--space`, narrows the\n* pre-enumerated spaces, and assembles a {@link MigrationListResult}.\n*\n* - `migrations/` missing or contains no valid space directories →\n* caller passes `spaces: []`; this synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]`.\n* - `--space <id>` on an existing-but-empty space → `{ spaceId, migrations: [] }` in the input.\n* - `--space <id>` on a non-existent (or reserved) space → `SPACE_NOT_FOUND`.\n*/\nfunction runMigrationList(inputs) {\n\tconst { spaces, spaceFilter } = inputs;\n\tif (spaceFilter !== void 0 && !isValidSpaceId(spaceFilter)) return notOk(errorInvalidSpaceId(spaceFilter));\n\tif (spaceFilter !== void 0 && !spaces.some((s) => s.space === spaceFilter)) return notOk(errorSpaceNotFound(spaceFilter, spaces.map((s) => s.space).sort()));\n\tconst scopedSpaces = spaceFilter !== void 0 ? spaces.filter((s) => s.space === spaceFilter) : spaces;\n\tconst resultSpaces = scopedSpaces.length === 0 ? [{\n\t\tspace: APP_SPACE_ID,\n\t\tmigrations: []\n\t}] : scopedSpaces;\n\treturn ok({\n\t\tok: true,\n\t\tspaces: [...resultSpaces],\n\t\tsummary: computeSummary(resultSpaces)\n\t});\n}\n//#endregion\nexport { migrationSpaceListEntriesFromAggregate as n, runMigrationList as r, listRefsByContractHash as t };\n\n//# sourceMappingURL=migration-list-AKRIIovW.mjs.map"],"mappings":";;;;;AAKA,SAAS,gBAAgB,GAAG,GAAG;CAC9B,IAAI,MAAM,cAAc,OAAO,MAAM,eAAe,IAAI;CACxD,IAAI,MAAM,cAAc,OAAO;CAC/B,IAAI,IAAI,GAAG,OAAO;CAClB,IAAI,IAAI,GAAG,OAAO;CAClB,OAAO;AACR;AACA,SAAS,0BAA0B,GAAG,GAAG;CACxC,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO;CAC5B,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO;CAC5B,OAAO;AACR;;;;;;;;;AASA,SAAS,uBAAuB,OAAO;CACtC,MAAM,SAAS,IAAI,IAAI,mBAAmB,MAAM,IAAI,CAAC;CACrD,IAAI,MAAM,YAAY,gBAAgB,MAAM,YAAY,MAAM;EAC7D,MAAM,OAAO,MAAM,QAAQ;EAC3B,MAAM,SAAS,OAAO,IAAI,IAAI,KAAK,CAAC;EACpC,IAAI,CAAC,OAAO,SAAA,MAAsB,GAAG,OAAO,IAAI,MAAM,CAAC,GAAG,QAAQ,aAAa,CAA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AAM,EAAE,UAAU,WAAW,GAAG,OAAO,MAAM,mBAAmB,aAAa,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;CAC3J,MAAM,eAAe,gBAAgB,KAAK,IAAI,OAAO,QAAQ,MAAM,EAAE,UAAU,WAAW,IAAI;CAC9F,MAAM,eAAe,aAAa,WAAW,IAAI,CAAC;EACjD,OAAO;EACP,YAAY,CAAC;CACd,CAAC,IAAI;CACL,OAAO,GAAG;EACT,IAAI;EACJ,QAAQ,CAAC,GAAG,YAAY;EACxB,SAAS,eAAe,YAAY;CACrC,CAAC;AACF"}
1
+ {"version":3,"file":"migration-list-W0dqabIj-Dc2NH_LY.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-list-W0dqabIj.mjs"],"sourcesContent":["import { k as errorSpaceNotFound, p as errorInvalidSpaceId } from \"./cli-errors-C6_pH59O.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { APP_SPACE_ID, isValidSpaceId, listContractSpaceDirectories } from \"@internal/migration-tools/spaces\";\nimport { HEAD_REF_NAME, refsByContractHash } from \"@internal/migration-tools/refs\";\n//#region src/control-api/operations/migration-list.ts\nfunction compareSpaceIds(a, b) {\n\tif (a === APP_SPACE_ID) return b === APP_SPACE_ID ? 0 : -1;\n\tif (b === APP_SPACE_ID) return 1;\n\tif (a < b) return -1;\n\tif (a > b) return 1;\n\treturn 0;\n}\nfunction compareDirNamesDescending(a, b) {\n\tif (a.name < b.name) return 1;\n\tif (a.name > b.name) return -1;\n\treturn 0;\n}\n/**\n* Ref names decorating a space's destination contract hashes. The\n* tolerant `space.refs` deliberately omits the structural `head.json`;\n* for extension spaces the old enumerator surfaced it as a `head`\n* decoration on the tip migration, so fold `space.headRef` back in to\n* keep that output. The app space synthesises its head, so it carries\n* no on-disk `head` ref to restore.\n*/\nfunction listRefsByContractHash(space) {\n\tconst byHash = new Map(refsByContractHash(space.refs));\n\tif (space.spaceId !== APP_SPACE_ID && space.headRef !== null) {\n\t\tconst hash = space.headRef.hash;\n\t\tconst bucket = byHash.get(hash) ?? [];\n\t\tif (!bucket.includes(HEAD_REF_NAME)) byHash.set(hash, [...bucket, HEAD_REF_NAME].sort());\n\t}\n\treturn byHash;\n}\nasync function orderedOnDiskSpaceIds(projectMigrationsDir) {\n\treturn (await listContractSpaceDirectories(projectMigrationsDir)).filter(isValidSpaceId).sort(compareSpaceIds);\n}\n/**\n* Project the loaded {@link ContractSpaceAggregate} into the render-ready\n* {@link MigrationSpaceListEntry} rows `migration list` displays.\n*\n* Space membership matches the on-disk contract-space directories (not the\n* aggregate's always-present synthesized app space when `migrations/app/`\n* is absent); package and ref data come from `aggregate.space(id)`.\n*/\nasync function migrationSpaceListEntriesFromAggregate(aggregate, projectMigrationsDir) {\n\tconst spaceIds = await orderedOnDiskSpaceIds(projectMigrationsDir);\n\tconst spaces = [];\n\tfor (const spaceId of spaceIds) {\n\t\tconst space = aggregate.space(spaceId);\n\t\tif (space === void 0) continue;\n\t\tconst refsByHash = listRefsByContractHash(space);\n\t\tconst migrations = space.packages.map((pkg) => ({\n\t\t\tname: pkg.dirName,\n\t\t\thash: pkg.metadata.migrationHash,\n\t\t\tfromContract: pkg.metadata.from,\n\t\t\ttoContract: pkg.metadata.to,\n\t\t\toperationCount: pkg.ops.length,\n\t\t\tcreatedAt: pkg.metadata.createdAt,\n\t\t\trefs: [...refsByHash.get(pkg.metadata.to) ?? []],\n\t\t\tprovidedInvariants: [...pkg.metadata.providedInvariants]\n\t\t})).sort(compareDirNamesDescending);\n\t\tspaces.push({\n\t\t\tspace: spaceId,\n\t\t\tmigrations\n\t\t});\n\t}\n\treturn spaces;\n}\nfunction computeSummary(spaces) {\n\tconst totalMigrations = spaces.reduce((count, space) => count + space.migrations.length, 0);\n\tif (spaces.length <= 1) return `${totalMigrations} migration(s) on disk`;\n\treturn `${totalMigrations} migration(s) across ${spaces.length} contract space(s)`;\n}\n/**\n* Policy core of `migration list`: validates `--space`, narrows the\n* pre-enumerated spaces, and assembles a {@link MigrationListResult}.\n*\n* - `migrations/` missing or contains no valid space directories →\n* caller passes `spaces: []`; this synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]`.\n* - `--space <id>` on an existing-but-empty space → `{ spaceId, migrations: [] }` in the input.\n* - `--space <id>` on a non-existent (or reserved) space → `SPACE_NOT_FOUND`.\n*/\nfunction runMigrationList(inputs) {\n\tconst { spaces, spaceFilter } = inputs;\n\tif (spaceFilter !== void 0 && !isValidSpaceId(spaceFilter)) return notOk(errorInvalidSpaceId(spaceFilter));\n\tif (spaceFilter !== void 0 && !spaces.some((s) => s.space === spaceFilter)) return notOk(errorSpaceNotFound(spaceFilter, spaces.map((s) => s.space).sort()));\n\tconst scopedSpaces = spaceFilter !== void 0 ? spaces.filter((s) => s.space === spaceFilter) : spaces;\n\tconst resultSpaces = scopedSpaces.length === 0 ? [{\n\t\tspace: APP_SPACE_ID,\n\t\tmigrations: []\n\t}] : scopedSpaces;\n\treturn ok({\n\t\tok: true,\n\t\tspaces: [...resultSpaces],\n\t\tsummary: computeSummary(resultSpaces)\n\t});\n}\n//#endregion\nexport { migrationSpaceListEntriesFromAggregate as n, runMigrationList as r, listRefsByContractHash as t };\n\n//# sourceMappingURL=migration-list-W0dqabIj.mjs.map"],"mappings":";;;;;AAKA,SAAS,gBAAgB,GAAG,GAAG;CAC9B,IAAI,MAAM,cAAc,OAAO,MAAM,eAAe,IAAI;CACxD,IAAI,MAAM,cAAc,OAAO;CAC/B,IAAI,IAAI,GAAG,OAAO;CAClB,IAAI,IAAI,GAAG,OAAO;CAClB,OAAO;AACR;AACA,SAAS,0BAA0B,GAAG,GAAG;CACxC,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO;CAC5B,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO;CAC5B,OAAO;AACR;;;;;;;;;AASA,SAAS,uBAAuB,OAAO;CACtC,MAAM,SAAS,IAAI,IAAI,mBAAmB,MAAM,IAAI,CAAC;C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O;AAChE;;;;;;;;;;AAUA,SAAS,iBAAiB,QAAQ;CACjC,MAAM,EAAE,QAAQ,gBAAgB;CAChC,IAAI,gBAAgB,KAAK,KAAK,CAAC,eAAe,WAAW,GAAG,OAAO,MAAM,oBAAoB,WAAW,CAAC;CACzG,IAAI,gBAAgB,KAAK,KAAK,CAAC,OAAO,MAAM,MAAM,EAAE,UAAU,WAAW,GAAG,OAAO,MAAM,mBAAmB,aAAa,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;CAC3J,MAAM,eAAe,gBAAgB,KAAK,IAAI,OAAO,QAAQ,MAAM,EAAE,UAAU,WAAW,IAAI;CAC9F,MAAM,eAAe,aAAa,WAAW,IAAI,CAAC;EACjD,OAAO;EACP,YAAY,CAAC;CACd,CAAC,IAAI;CACL,OAAO,GAAG;EACT,IAAI;EACJ,QAAQ,CAAC,GAAG,YAAY;EACxB,SAAS,eAAe,YAAY;CACrC,CAAC;AACF"}
@@ -1,15 +1,15 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { F as requireLiveDatabase, N as errorUnexpected } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
3
- import { r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
4
- import { S as targetSupportsMigrations, _ as resolveMigrationPaths, b as setCommandExamples, f as maskConnectionUrl, m as parseGlobalFlagsOrExit, n as closeQuietly, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
5
- import { t as createControlClient } from "./client-C4Gh4PBz-BMUlBcuE.mjs";
6
- import { t as mapCaughtMigrationError } from "./caught-errors-B_oGFiYw-BqX49eW0.mjs";
7
- import { u as createAnsiMigrationListStyler } from "./migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs";
8
- import { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from "./migration-log-table-JR7fFVbE-DR2mom6h.mjs";
2
+ import { F as requireLiveDatabase, N as errorUnexpected } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
3
+ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
4
+ import { S as targetSupportsMigrations, _ as resolveMigrationPaths, b as setCommandExamples, f as maskConnectionUrl, m as parseGlobalFlagsOrExit, n as closeQuietly, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
+ import { t as createControlClient } from "./client-BqhVohc5-DFRVWFps.mjs";
6
+ import { t as mapCaughtMigrationError } from "./caught-errors-BZ-9WASe-DH4DaDha.mjs";
7
+ import { u as createAnsiMigrationListStyler } from "./migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs";
8
+ import { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from "./migration-log-table-DRiOnvzf-zTQBThqe.mjs";
9
9
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
10
10
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
11
11
  import { Command } from "commander";
12
- //#region ../../../1-framework/3-tooling/cli/dist/migration-log-Z3-L172x.mjs
12
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-log-B3iiP8ns.mjs
13
13
  async function executeMigrationLogCommand(options, flags, ui) {
14
14
  const configResult = await loadConfigForSections(options.config, [
15
15
  "family",
@@ -120,4 +120,4 @@ function createMigrationLogCommand() {
120
120
  //#endregion
121
121
  export { executeMigrationLogCommand as n, createMigrationLogCommand as t };
122
122
 
123
- //# sourceMappingURL=migration-log-Z3-L172x-CvQTNJvI.mjs.map
123
+ //# sourceMappingURL=migration-log-B3iiP8ns-B4tdLSye.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-log-Z3-L172x-CvQTNJvI.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-Z3-L172x.mjs"],"sourcesContent":["import { M as errorUnexpected, P as requireLiveDatabase } from \"./cli-errors-CihMAEVj.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-JJKxvT0q.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, n as closeQuietly, p as targetSupportsMigrations, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { t as createControlClient } from \"./client-C4Gh4PBz.mjs\";\nimport { t as mapCaughtMigrationError } from \"./caught-errors-B_oGFiYw.mjs\";\nimport { o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-CgdHruiZ.mjs\";\nimport { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from \"./migration-log-table-JR7fFVbE.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-log.ts\nasync function executeMigrationLogCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath } = resolveMigrationPaths(options.config, config, process.cwd());\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tconst missingDb = requireLiveDatabase({\n\t\tdbConnection,\n\t\thasDriver: !!config.driver,\n\t\twhy: `migration log needs a database connection and driver to read the ledger (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: \"migration log\"\n\t});\n\tif (missingDb) return notOk(missingDb);\n\tif (!targetSupportsMigrations(config.target)) return notOk(errorUnexpected(\"Target does not support migrations\"));\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration log\",\n\t\t\tdescription: \"Show executed migration history from the database ledger\",\n\t\t\tdetails: [{\n\t\t\t\tlabel: \"config\",\n\t\t\t\tvalue: configPath\n\t\t\t}, ...typeof dbConnection === \"string\" ? [{\n\t\t\t\tlabel: \"database\",\n\t\t\t\tvalue: maskConnectionUrl(dbConnection)\n\t\t\t}] : []],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t}\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\t...ifDefined(\"driver\", config.driver),\n\t\textensions: config.extensions ?? []\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\treturn ok(await client.readLedger());\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: `Failed to read migration log: ${error instanceof Error ? error.message : String(error)}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createMigrationLogCommand() {\n\tconst command = new Command(\"log\");\n\tsetCommandDescriptions(command, \"Show executed migration history\", \"Reads the database ledger and displays every applied migration edge\\nin chronological order, including rollbacks and re-applies, merged\\nacross all contract spaces. Requires a database connection.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration log --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --utc --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --json --db $DATABASE_URL\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration list\",\n\t\t\toneLiner: \"List on-disk migrations\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--utc\", \"Render human timestamps in UTC instead of local time\").option(\"--ascii\", \"Use ASCII glyphs (pipe-friendly)\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeMigrationLogCommand(options, flags, ui), flags, ui, (entries) => {\n\t\t\tif (flags.json) {\n\t\t\t\tconst records = serializeLedgerEntriesForJson(entries);\n\t\t\t\tconst result = {\n\t\t\t\t\tok: true,\n\t\t\t\t\trecords,\n\t\t\t\t\tsummary: `${records.length} migration(s) applied`\n\t\t\t\t};\n\t\t\t\tui.output(JSON.stringify(result, null, 2));\n\t\t\t} else if (!flags.quiet) if (entries.length === 0) ui.output(MIGRATION_LOG_EMPTY_MESSAGE);\n\t\t\telse {\n\t\t\t\tconst styler = createAnsiMigrationListStyler({ useColor: ui.useColor });\n\t\t\t\tui.output(renderMigrationLogTable(entries, {\n\t\t\t\t\tutc: options.utc === true,\n\t\t\t\t\tstyler,\n\t\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationLogCommand as n, createMigrationLogCommand as t };\n\n//# sourceMappingURL=migration-log-Z3-L172x.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,eAAe,2BAA2B,SAAS,OAAO,IAAI;CAC7D,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,EA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,sMAAsM;CACzQ,mBAAmB,SAAS;EAC3B;EACA;EACA;CACD,CAAC;CACD,kBAAkB,SAAS;EAC1B;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,cAAc,4BAA4B,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,SAAS,sDAAsD,CAAC,CAAC,OAAO,WAAW,kCAAkC,CAAC,CAAC,OAAO,OAAO,YAAY;EAC/R,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,WAAW,aAAa,MAAM,2BAA2B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,YAAY;GAC3G,IAAI,MAAM,MAAM;IACf,MAAM,UAAU,8BAA8B,OAAO;IACrD,MAAM,SAAS;KACd,IAAI;KACJ;KACA,SAAS,GAAG,QAAQ,OAAO;IAC5B;IACA,GAAG,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;GAC1C,OAAO,IAAI,CAAC,MAAM,OAAO,IAAI,QAAQ,WAAW,GAAG,GAAG,OAAO,2BAA2B;QACnF;IACJ,MAAM,SAAS,8BAA8B,EAAE,UAAU,GAAG,SAAS,CAAC;IACtE,GAAG,OAAO,wBAAwB,SAAS;KAC1C,KAAK,QAAQ,QAAQ;KACrB;KACA,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACtD,CAAC,CAAC;GACH;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
1
+ {"version":3,"file":"migration-log-B3iiP8ns-B4tdLSye.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-B3iiP8ns.mjs"],"sourcesContent":["import { M as errorUnexpected, P as requireLiveDatabase } from \"./cli-errors-C6_pH59O.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, n as closeQuietly, p as targetSupportsMigrations, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { t as createControlClient } from \"./client-BqhVohc5.mjs\";\nimport { t as mapCaughtMigrationError } from \"./caught-errors-BZ-9WASe.mjs\";\nimport { o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\nimport { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from \"./migration-log-table-DRiOnvzf.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-log.ts\nasync function executeMigrationLogCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath } = resolveMigrationPaths(options.config, config, process.cwd());\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tconst missingDb = requireLiveDatabase({\n\t\tdbConnection,\n\t\thasDriver: !!config.driver,\n\t\twhy: `migration log needs a database connection and driver to read the ledger (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: \"migration log\"\n\t});\n\tif (missingDb) return notOk(missingDb);\n\tif (!targetSupportsMigrations(config.target)) return notOk(errorUnexpected(\"Target does not support migrations\"));\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration log\",\n\t\t\tdescription: \"Show executed migration history from the database ledger\",\n\t\t\tdetails: [{\n\t\t\t\tlabel: \"config\",\n\t\t\t\tvalue: configPath\n\t\t\t}, ...typeof dbConnection === \"string\" ? [{\n\t\t\t\tlabel: \"database\",\n\t\t\t\tvalue: maskConnectionUrl(dbConnection)\n\t\t\t}] : []],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t}\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\t...ifDefined(\"driver\", config.driver),\n\t\textensions: config.extensions ?? []\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\treturn ok(await client.readLedger());\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: `Failed to read migration log: ${error instanceof Error ? error.message : String(error)}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createMigrationLogCommand() {\n\tconst command = new Command(\"log\");\n\tsetCommandDescriptions(command, \"Show executed migration history\", \"Reads the database ledger and displays every applied migration edge\\nin chronological order, including rollbacks and re-applies, merged\\nacross all contract spaces. Requires a database connection.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration log --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --utc --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --json --db $DATABASE_URL\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration list\",\n\t\t\toneLiner: \"List on-disk migrations\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--utc\", \"Render human timestamps in UTC instead of local time\").option(\"--ascii\", \"Use ASCII glyphs (pipe-friendly)\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeMigrationLogCommand(options, flags, ui), flags, ui, (entries) => {\n\t\t\tif (flags.json) {\n\t\t\t\tconst records = serializeLedgerEntriesForJson(entries);\n\t\t\t\tconst result = {\n\t\t\t\t\tok: true,\n\t\t\t\t\trecords,\n\t\t\t\t\tsummary: `${records.length} migration(s) applied`\n\t\t\t\t};\n\t\t\t\tui.output(JSON.stringify(result, null, 2));\n\t\t\t} else if (!flags.quiet) if (entries.length === 0) ui.output(MIGRATION_LOG_EMPTY_MESSAGE);\n\t\t\telse {\n\t\t\t\tconst styler = createAnsiMigrationListStyler({ useColor: ui.useColor });\n\t\t\t\tui.output(renderMigrationLogTable(entries, {\n\t\t\t\t\tutc: options.utc === true,\n\t\t\t\t\tstyler,\n\t\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationLogCommand as n, createMigrationLogCommand as t };\n\n//# sourceMappingURL=migration-log-B3iiP8ns.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,eAAe,2BAA2B,SAAS,OAAO,IAAI;CAC7D,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,EAAE,eAAe,sBAAsB,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAClF,MAAM,eAAe,QAAQ,MAAM,OAAO,IAAI;CAC9C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ACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,cAAc,4BAA4B,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,SAAS,sDAAsD,CAAC,CAAC,OAAO,WAAW,kCAAkC,CAAC,CAAC,OAAO,OAAO,YAAY;EAC/R,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,WAAW,aAAa,MAAM,2BAA2B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,YAAY;GAC3G,IAAI,MAAM,MAAM;IACf,MAAM,UAAU,8BAA8B,OAAO;IACrD,MAAM,SAAS;KACd,IAAI;KACJ;KACA,SAAS,GAAG,QAAQ,OAAO;IAC5B;IACA,GAAG,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;GAC1C,OAAO,IAAI,CAAC,MAAM,OAAO,IAAI,QAAQ,WAAW,GAAG,GAAG,OAAO,2BAA2B;QACnF;IACJ,MAAM,SAAS,8BAA8B,EAAE,UAAU,GAAG,SAAS,CAAC;IACtE,GAAG,OAAO,wBAAwB,SAAS;KAC1C,KAAK,QAAQ,QAAQ;KACrB;KACA,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACtD,CAAC,CAAC;GACH;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -1,6 +1,6 @@
1
- import { g as migrationListForwardArrow, h as migrationListEmptySource, r as abbreviateContractHash, t as IDENTITY_MIGRATION_LIST_STYLER } from "./migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs";
1
+ import { g as migrationListForwardArrow, h as migrationListEmptySource, r as abbreviateContractHash, t as IDENTITY_MIGRATION_LIST_STYLER } from "./migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs";
2
2
  import stringWidth from "string-width";
3
- //#region ../../../1-framework/3-tooling/cli/dist/migration-log-table-JR7fFVbE.mjs
3
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-log-table-DRiOnvzf.mjs
4
4
  const HEADING_APPLIED_AT = "Applied at";
5
5
  const HEADING_SPACE = "Space";
6
6
  const HEADING_MIGRATION = "Migration";
@@ -113,4 +113,4 @@ const MIGRATION_LOG_EMPTY_MESSAGE = "No migrations have been applied to this dat
113
113
  //#endregion
114
114
  export { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };
115
115
 
116
- //# sourceMappingURL=migration-log-table-JR7fFVbE-DR2mom6h.mjs.map
116
+ //# sourceMappingURL=migration-log-table-DRiOnvzf-zTQBThqe.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-log-table-JR7fFVbE-DR2mom6h.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-table-JR7fFVbE.mjs"],"sourcesContent":["import { _ as abbreviateContractHash, c as IDENTITY_MIGRATION_LIST_STYLER, v as migrationListEmptySource, y as migrationListForwardArrow } from \"./migration-graph-command-render-CgdHruiZ.mjs\";\nimport stringWidth from \"string-width\";\n//#region src/utils/formatters/migration-log-table.ts\nconst HEADING_APPLIED_AT = \"Applied at\";\nconst HEADING_SPACE = \"Space\";\nconst HEADING_MIGRATION = \"Migration\";\nconst HEADING_CHANGE = \"Change\";\nconst HEADING_OPS = \"Ops\";\nconst COLUMN_SEPARATOR = \" \";\nconst DIVIDER_CHAR = \"─\";\nconst ASCII_DIVIDER_CHAR = \"-\";\nfunction sortLedgerEntries(entries) {\n\treturn [...entries].sort((left, right) => {\n\t\tconst timeDiff = left.appliedAt.getTime() - right.appliedAt.getTime();\n\t\tif (timeDiff !== 0) return timeDiff;\n\t\tconst spaceDiff = left.space.localeCompare(right.space);\n\t\tif (spaceDiff !== 0) return spaceDiff;\n\t\treturn left.migrationName.localeCompare(right.migrationName);\n\t});\n}\nfunction pad2(value) {\n\treturn String(value).padStart(2, \"0\");\n}\nfunction formatLedgerAppliedAt(date, mode) {\n\tif (mode === \"iso\") return date.toISOString();\n\tif (mode === \"utc\") return `${date.getUTCFullYear()}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}:${pad2(date.getUTCSeconds())}Z`;\n\tconst offsetMinutes = -date.getTimezoneOffset();\n\tconst sign = offsetMinutes >= 0 ? \"+\" : \"-\";\n\tconst absoluteOffset = Math.abs(offsetMinutes);\n\tconst offsetHours = pad2(Math.floor(absoluteOffset / 60));\n\tconst offsetMins = pad2(absoluteOffset % 60);\n\treturn `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())} ${sign}${offsetHours}:${offsetMins}`;\n}\nfunction formatHashEndpoint(hash, glyphMode = \"unicode\") {\n\tif (hash === null) return migrationListEmptySource(glyphMode);\n\treturn abbreviateContractHash(hash);\n}\nfunction formatHashTransition(from, to, glyphMode = \"unicode\") {\n\treturn `${formatHashEndpoint(from, glyphMode)} ${migrationListForwardArrow(glyphMode)} ${abbreviateContractHash(to)}`;\n}\nfunction styleHashTransition(from, to, styler, glyphMode = \"unicode\") {\n\treturn `${from === null ? styler.glyph(migrationListEmptySource(glyphMode)) : styler.sourceHash(abbreviateContractHash(from))} ${styler.glyph(migrationListForwardArrow(glyphMode))} ${styler.destHash(abbreviateContractHash(to))}`;\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nfunction columnWidth(values) {\n\treturn values.reduce((max, value) => Math.max(max, stringWidth(value)), 0);\n}\nfunction padDividerCell(valueWidth, dividerChar) {\n\treturn dividerChar.repeat(valueWidth + 2);\n}\nfunction padTextCell(value, valueWidth) {\n\treturn ` ${padVisible(value, valueWidth)} `;\n}\nfunction padOpsCell(value, valueWidth) {\n\tconst padding = Math.max(0, valueWidth - stringWidth(value));\n\treturn ` ${\" \".repeat(padding)}${value} `;\n}\nfunction renderMigrationLogTable(entries, options = {}) {\n\tconst sorted = sortLedgerEntries(entries);\n\tif (sorted.length === 0) return \"\";\n\tconst styler = options.styler ?? IDENTITY_MIGRATION_LIST_STYLER;\n\tconst glyphMode = options.glyphMode ?? \"unicode\";\n\tconst dividerChar = glyphMode === \"ascii\" ? ASCII_DIVIDER_CHAR : DIVIDER_CHAR;\n\tconst showSpace = new Set(sorted.map((entry) => entry.space)).size > 1;\n\tconst timestampMode = options.utc ? \"utc\" : \"local\";\n\tconst rows = sorted.map((entry) => ({\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, timestampMode),\n\t\tspace: entry.space,\n\t\tmigrationName: entry.migrationName,\n\t\ttransition: formatHashTransition(entry.from, entry.to, glyphMode),\n\t\tops: `${entry.operationCount} ops`,\n\t\tfrom: entry.from,\n\t\tto: entry.to\n\t}));\n\tconst appliedAtWidth = columnWidth([HEADING_APPLIED_AT, ...rows.map((row) => row.appliedAt)]);\n\tconst spaceWidth = showSpace ? columnWidth([HEADING_SPACE, ...rows.map((row) => row.space)]) : 0;\n\tconst nameWidth = columnWidth([HEADING_MIGRATION, ...rows.map((row) => row.migrationName)]);\n\tconst transitionWidth = columnWidth([HEADING_CHANGE, ...rows.map((row) => row.transition)]);\n\tconst opsWidth = columnWidth([HEADING_OPS, ...rows.map((row) => row.ops)]);\n\tconst headingParts = [padTextCell(HEADING_APPLIED_AT, appliedAtWidth)];\n\tif (showSpace) headingParts.push(padTextCell(HEADING_SPACE, spaceWidth));\n\theadingParts.push(padTextCell(HEADING_MIGRATION, nameWidth), padTextCell(HEADING_CHANGE, transitionWidth), padOpsCell(HEADING_OPS, opsWidth));\n\tconst heading = headingParts.join(COLUMN_SEPARATOR);\n\tconst dividerParts = [padDividerCell(appliedAtWidth, dividerChar)];\n\tif (showSpace) dividerParts.push(padDividerCell(spaceWidth, dividerChar));\n\tdividerParts.push(padDividerCell(nameWidth, dividerChar), padDividerCell(transitionWidth, dividerChar), padDividerCell(opsWidth, dividerChar));\n\treturn [\n\t\theading,\n\t\tdividerParts.map((cell) => styler.summary(cell)).join(COLUMN_SEPARATOR),\n\t\t...rows.map((row) => {\n\t\t\tconst parts = [padTextCell(row.appliedAt, appliedAtWidth)];\n\t\t\tif (showSpace) parts.push(padTextCell(row.space, spaceWidth));\n\t\t\tparts.push(padTextCell(styler.dirName(row.migrationName), nameWidth), padTextCell(styleHashTransition(row.from, row.to, styler, glyphMode), transitionWidth), padOpsCell(row.ops, opsWidth));\n\t\t\treturn parts.join(COLUMN_SEPARATOR);\n\t\t})\n\t].join(\"\\n\");\n}\nfunction serializeLedgerEntriesForJson(entries) {\n\treturn sortLedgerEntries(entries).map((entry) => ({\n\t\tspace: entry.space,\n\t\tname: entry.migrationName,\n\t\thash: entry.migrationHash,\n\t\tfromContract: entry.from,\n\t\ttoContract: entry.to,\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, \"iso\"),\n\t\toperationCount: entry.operationCount\n\t}));\n}\nconst MIGRATION_LOG_EMPTY_MESSAGE = \"No migrations have been applied to this database.\";\n//#endregion\nexport { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };\n\n//# sourceMappingURL=migration-log-table-JR7fFVbE.mjs.map"],"mappings":";;;AAGA,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAC1B,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB,MAAM,mBAAmB;AACzB,MAAM,eAAe;AACrB,MAAM,qBAAqB;AAC3B,SAAS,kBAAkB,SAAS;CACnC,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,M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AAC,CAAC,CAAC,KAAK,gBAAgB;EACtE,GAAG,KAAK,KAAK,QAAQ;GACpB,MAAM,QAAQ,CAAC,YAAY,IAAI,WAAW,cAAc,CAAC;GACzD,IAAI,WAAW,MAAM,KAAK,YAAY,IAAI,OAAO,UAAU,CAAC;GAC5D,MAAM,KAAK,YAAY,OAAO,QAAQ,IAAI,aAAa,GAAG,SAAS,GAAG,YAAY,oBAAoB,IAAI,MAAM,IAAI,IAAI,QAAQ,SAAS,GAAG,eAAe,GAAG,WAAW,IAAI,KAAK,QAAQ,CAAC;GAC3L,OAAO,MAAM,KAAK,gBAAgB;EACnC,CAAC;CACF,CAAC,CAAC,KAAK,IAAI;AACZ;AACA,SAAS,8BAA8B,SAAS;CAC/C,OAAO,kBAAkB,OAAO,CAAC,CAAC,KAAK,WAAW;EACjD,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,cAAc,MAAM;EACpB,YAAY,MAAM;EAClB,WAAW,sBAAsB,MAAM,WAAW,KAAK;EACvD,gBAAgB,MAAM;CACvB,EAAE;AACH;AACA,MAAM,8BAA8B"}
1
+ {"version":3,"file":"migration-log-table-DRiOnvzf-zTQBThqe.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-table-DRiOnvzf.mjs"],"sourcesContent":["import { _ as abbreviateContractHash, c as IDENTITY_MIGRATION_LIST_STYLER, v as migrationListEmptySource, y as migrationListForwardArrow } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\nimport stringWidth from \"string-width\";\n//#region src/utils/formatters/migration-log-table.ts\nconst HEADING_APPLIED_AT = \"Applied at\";\nconst HEADING_SPACE = \"Space\";\nconst HEADING_MIGRATION = \"Migration\";\nconst HEADING_CHANGE = \"Change\";\nconst HEADING_OPS = \"Ops\";\nconst COLUMN_SEPARATOR = \" \";\nconst DIVIDER_CHAR = \"─\";\nconst ASCII_DIVIDER_CHAR = \"-\";\nfunction sortLedgerEntries(entries) {\n\treturn [...entries].sort((left, right) => {\n\t\tconst timeDiff = left.appliedAt.getTime() - right.appliedAt.getTime();\n\t\tif (timeDiff !== 0) return timeDiff;\n\t\tconst spaceDiff = left.space.localeCompare(right.space);\n\t\tif (spaceDiff !== 0) return spaceDiff;\n\t\treturn left.migrationName.localeCompare(right.migrationName);\n\t});\n}\nfunction pad2(value) {\n\treturn String(value).padStart(2, \"0\");\n}\nfunction formatLedgerAppliedAt(date, mode) {\n\tif (mode === \"iso\") return date.toISOString();\n\tif (mode === \"utc\") return `${date.getUTCFullYear()}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}:${pad2(date.getUTCSeconds())}Z`;\n\tconst offsetMinutes = -date.getTimezoneOffset();\n\tconst sign = offsetMinutes >= 0 ? \"+\" : \"-\";\n\tconst absoluteOffset = Math.abs(offsetMinutes);\n\tconst offsetHours = pad2(Math.floor(absoluteOffset / 60));\n\tconst offsetMins = pad2(absoluteOffset % 60);\n\treturn `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())} ${sign}${offsetHours}:${offsetMins}`;\n}\nfunction formatHashEndpoint(hash, glyphMode = \"unicode\") {\n\tif (hash === null) return migrationListEmptySource(glyphMode);\n\treturn abbreviateContractHash(hash);\n}\nfunction formatHashTransition(from, to, glyphMode = \"unicode\") {\n\treturn `${formatHashEndpoint(from, glyphMode)} ${migrationListForwardArrow(glyphMode)} ${abbreviateContractHash(to)}`;\n}\nfunction styleHashTransition(from, to, styler, glyphMode = \"unicode\") {\n\treturn `${from === null ? styler.glyph(migrationListEmptySource(glyphMode)) : styler.sourceHash(abbreviateContractHash(from))} ${styler.glyph(migrationListForwardArrow(glyphMode))} ${styler.destHash(abbreviateContractHash(to))}`;\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nfunction columnWidth(values) {\n\treturn values.reduce((max, value) => Math.max(max, stringWidth(value)), 0);\n}\nfunction padDividerCell(valueWidth, dividerChar) {\n\treturn dividerChar.repeat(valueWidth + 2);\n}\nfunction padTextCell(value, valueWidth) {\n\treturn ` ${padVisible(value, valueWidth)} `;\n}\nfunction padOpsCell(value, valueWidth) {\n\tconst padding = Math.max(0, valueWidth - stringWidth(value));\n\treturn ` ${\" \".repeat(padding)}${value} `;\n}\nfunction renderMigrationLogTable(entries, options = {}) {\n\tconst sorted = sortLedgerEntries(entries);\n\tif (sorted.length === 0) return \"\";\n\tconst styler = options.styler ?? IDENTITY_MIGRATION_LIST_STYLER;\n\tconst glyphMode = options.glyphMode ?? \"unicode\";\n\tconst dividerChar = glyphMode === \"ascii\" ? ASCII_DIVIDER_CHAR : DIVIDER_CHAR;\n\tconst showSpace = new Set(sorted.map((entry) => entry.space)).size > 1;\n\tconst timestampMode = options.utc ? \"utc\" : \"local\";\n\tconst rows = sorted.map((entry) => ({\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, timestampMode),\n\t\tspace: entry.space,\n\t\tmigrationName: entry.migrationName,\n\t\ttransition: formatHashTransition(entry.from, entry.to, glyphMode),\n\t\tops: `${entry.operationCount} ops`,\n\t\tfrom: entry.from,\n\t\tto: entry.to\n\t}));\n\tconst appliedAtWidth = columnWidth([HEADING_APPLIED_AT, ...rows.map((row) => row.appliedAt)]);\n\tconst spaceWidth = showSpace ? columnWidth([HEADING_SPACE, ...rows.map((row) => row.space)]) : 0;\n\tconst nameWidth = columnWidth([HEADING_MIGRATION, ...rows.map((row) => row.migrationName)]);\n\tconst transitionWidth = columnWidth([HEADING_CHANGE, ...rows.map((row) => row.transition)]);\n\tconst opsWidth = columnWidth([HEADING_OPS, ...rows.map((row) => row.ops)]);\n\tconst headingParts = [padTextCell(HEADING_APPLIED_AT, appliedAtWidth)];\n\tif (showSpace) headingParts.push(padTextCell(HEADING_SPACE, spaceWidth));\n\theadingParts.push(padTextCell(HEADING_MIGRATION, nameWidth), padTextCell(HEADING_CHANGE, transitionWidth), padOpsCell(HEADING_OPS, opsWidth));\n\tconst heading = headingParts.join(COLUMN_SEPARATOR);\n\tconst dividerParts = [padDividerCell(appliedAtWidth, dividerChar)];\n\tif (showSpace) dividerParts.push(padDividerCell(spaceWidth, dividerChar));\n\tdividerParts.push(padDividerCell(nameWidth, dividerChar), padDividerCell(transitionWidth, dividerChar), padDividerCell(opsWidth, dividerChar));\n\treturn [\n\t\theading,\n\t\tdividerParts.map((cell) => styler.summary(cell)).join(COLUMN_SEPARATOR),\n\t\t...rows.map((row) => {\n\t\t\tconst parts = [padTextCell(row.appliedAt, appliedAtWidth)];\n\t\t\tif (showSpace) parts.push(padTextCell(row.space, spaceWidth));\n\t\t\tparts.push(padTextCell(styler.dirName(row.migrationName), nameWidth), padTextCell(styleHashTransition(row.from, row.to, styler, glyphMode), transitionWidth), padOpsCell(row.ops, opsWidth));\n\t\t\treturn parts.join(COLUMN_SEPARATOR);\n\t\t})\n\t].join(\"\\n\");\n}\nfunction serializeLedgerEntriesForJson(entries) {\n\treturn sortLedgerEntries(entries).map((entry) => ({\n\t\tspace: entry.space,\n\t\tname: entry.migrationName,\n\t\thash: entry.migrationHash,\n\t\tfromContract: entry.from,\n\t\ttoContract: entry.to,\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, \"iso\"),\n\t\toperationCount: entry.operationCount\n\t}));\n}\nconst MIGRATION_LOG_EMPTY_MESSAGE = \"No migrations have been applied to this database.\";\n//#endregion\nexport { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };\n\n//# sourceMappingURL=migration-log-table-DRiOnvzf.mjs.map"],"mappings":";;;AAGA,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAC1B,MAAM,iBAAiB;AACvB,MAAM,cAAc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,eAAe,WAAW,WAAW,GAAG,eAAe,iBAAiB,WAAW,GAAG,eAAe,UAAU,WAAW,CAAC;CAC7I,OAAO;EACN;EACA,aAAa,KAAK,SAAS,OAAO,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB;EACtE,GAAG,KAAK,KAAK,QAAQ;GACpB,MAAM,QAAQ,CAAC,YAAY,IAAI,WAAW,cAAc,CAAC;GACzD,IAAI,WAAW,MAAM,KAAK,YAAY,IAAI,OAAO,UAAU,CAAC;GAC5D,MAAM,KAAK,YAAY,OAAO,QAAQ,IAAI,aAAa,GAAG,SAAS,GAAG,YAAY,oBAAoB,IAAI,MAAM,IAAI,IAAI,QAAQ,SAAS,GAAG,eAAe,GAAG,WAAW,IAAI,KAAK,QAAQ,CAAC;GAC3L,OAAO,MAAM,KAAK,gBAAgB;EACnC,CAAC;CACF,CAAC,CAAC,KAAK,IAAI;AACZ;AACA,SAAS,8BAA8B,SAAS;CAC/C,OAAO,kBAAkB,OAAO,CAAC,CAAC,KAAK,WAAW;EACjD,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,cAAc,MAAM;EACpB,YAAY,MAAM;EAClB,WAAW,sBAAsB,MAAM,WAAW,KAAK;EACvD,gBAAgB,MAAM;CACvB,EAAE;AACH;AACA,MAAM,8BAA8B"}
@@ -1,10 +1,10 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
3
- import { b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
4
- import { t as executeMigrationNewCommand } from "./migration-new-ZlgxFcbH-CxlZs2hr.mjs";
2
+ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
3
+ import { b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
4
+ import { t as executeMigrationNewCommand } from "./migration-new-YSdtJTRp-Dc06LNJe.mjs";
5
5
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
6
  import { Command } from "commander";
7
- //#region ../../../1-framework/3-tooling/cli/dist/migration-new-DDnQd7Ql.mjs
7
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-new-Bf5K9fNK.mjs
8
8
  /**
9
9
  * `migration new` — scaffolds a migration package with a `migration.ts` file
10
10
  * for manual authoring.
@@ -67,4 +67,4 @@ function createMigrationNewCommand() {
67
67
  //#endregion
68
68
  export { createMigrationNewCommand as t };
69
69
 
70
- //# sourceMappingURL=migration-new-DDnQd7Ql-1WT_J_zf.mjs.map
70
+ //# sourceMappingURL=migration-new-Bf5K9fNK-Cd90rYmm.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-new-DDnQd7Ql-1WT_J_zf.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-new-DDnQd7Ql.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-JJKxvT0q.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, d as setCommandExamples, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { t as executeMigrationNewCommand } from \"./migration-new-ZlgxFcbH.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/commands/migration-new.ts\n/**\n* `migration new` — scaffolds a migration package with a `migration.ts` file\n* for manual authoring.\n*\n* The planner's `emptyMigration(context)` returns a\n* `MigrationPlanWithAuthoringSurface`, whose `renderTypeScript(resolver)`\n* produces the target-appropriate empty stub. The CLI writes the returned\n* source verbatim.\n*\n* The resolver is the one this project's own manifest implies, so the\n* scaffold names packages the project can resolve — the same resolver\n* `contract emit` hands to the emitter (ADR 242).\n*/\nasync function runMigrationNew(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\treturn executeMigrationNewCommand({\n\t\t...options,\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd(),\n\t\t...ifDefined(\"configPath\", options.config)\n\t});\n}\nfunction createMigrationNewCommand() {\n\tconst command = new Command(\"new\");\n\tsetCommandDescriptions(command, \"Scaffold a new migration for manual authoring\", \"Creates a migration package with a migration.ts file for manual authoring.\\nWrite the migration body in migration.ts, then run the file with Node\\n(`node migration.ts`) to self-emit ops.json and attest the package.\");\n\tsetCommandExamples(command, [\"prisma-next migration new --name split-name\", \"prisma-next migration new --name custom-fk --from abc123...\"]);\n\taddGlobalOptions(command).option(\"--name <slug>\", \"Migration name (used in directory name)\").option(\"--from <hash>\", \"Starting contract hash (default: latest migration target)\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst header = formatStyledHeader({\n\t\t\t\tcommand: \"migration new\",\n\t\t\t\tdescription: \"Scaffold a new migration\",\n\t\t\t\tdetails: [],\n\t\t\t\tflags\n\t\t\t});\n\t\t\tui.stderr(header);\n\t\t}\n\t\tconst exitCode = handleResult(await runMigrationNew(options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value, null, 2));\n\t\t\telse if (!flags.quiet) {\n\t\t\t\tui.output(`\\nScaffolded migration at ${value.dir}`);\n\t\t\t\tui.output(` from: ${value.from}`);\n\t\t\t\tui.output(` to: ${value.to}`);\n\t\t\t\tui.output(`\\nEdit migration.ts, then run it directly (\\`node \"${value.dir}/migration.ts\"\\`) to self-emit and attest.`);\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createMigrationNewCommand as t };\n\n//# sourceMappingURL=migration-new-DDnQd7Ql.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,eAAe,gBAAgB,SAAS;CACvC,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,OAAO,2BAA2B;EACjC,GAAG;EACH,QAAQ,aAAa;EACrB,KAAK,QAAQ,IAAI;EACjB,GAAG,UAAU,cAAc,QAAQ,MAAM;CAC1C,CAAC;AACF;AACA,SAAS,4BAA4B;CACpC,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,uBAAuB,SAAS,iDAAiD,wNAAwN;CACzS,mBAAmB,SAAS,CAAC,+CAA+C,6DAA6D,CAAC;CAC1I,iBAAiB,OAAO,CAAC,CAAC,OAAO,iBAAiB,yCAAyC,CAAC,CAAC,OAAO,iBAAiB,2DAA2D,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,OAAO,YAAY;EACtQ,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;GAChC,MAAM,SAAS,mBAAmB;IACjC,SAAS;IACT,aAAa;IACb,SAAS,CAAC;IACV;GACD,CAAC;GACD,GAAG,OAAO,MAAM;EACjB;EACA,MAAM,WAAW,aAAa,MAAM,gBAAgB,OAAO,GAAG,OAAO,KAAK,UAAU;GACnF,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,OAAO;IACtB,GAAG,OAAO,6BAA6B,MAAM,KAAK;IAClD,GAAG,OAAO,WAAW,MAAM,MAAM;IACjC,GAAG,OAAO,WAAW,MAAM,IAAI;IAC/B,GAAG,OAAO,sDAAsD,MAAM,IAAI,2CAA2C;GACtH;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
1
+ {"version":3,"file":"migration-new-Bf5K9fNK-Cd90rYmm.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-new-Bf5K9fNK.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, d as setCommandExamples, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { t as executeMigrationNewCommand } from \"./migration-new-YSdtJTRp.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/commands/migration-new.ts\n/**\n* `migration new` — scaffolds a migration package with a `migration.ts` file\n* for manual authoring.\n*\n* The planner's `emptyMigration(context)` returns a\n* `MigrationPlanWithAuthoringSurface`, whose `renderTypeScript(resolver)`\n* produces the target-appropriate empty stub. The CLI writes the returned\n* source verbatim.\n*\n* The resolver is the one this project's own manifest implies, so the\n* scaffold names packages the project can resolve — the same resolver\n* `contract emit` hands to the emitter (ADR 242).\n*/\nasync function runMigrationNew(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\treturn executeMigrationNewCommand({\n\t\t...options,\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd(),\n\t\t...ifDefined(\"configPath\", options.config)\n\t});\n}\nfunction createMigrationNewCommand() {\n\tconst command = new Command(\"new\");\n\tsetCommandDescriptions(command, \"Scaffold a new migration for manual authoring\", \"Creates a migration package with a migration.ts file for manual authoring.\\nWrite the migration body in migration.ts, then run the file with Node\\n(`node migration.ts`) to self-emit ops.json and attest the package.\");\n\tsetCommandExamples(command, [\"prisma-next migration new --name split-name\", \"prisma-next migration new --name custom-fk --from abc123...\"]);\n\taddGlobalOptions(command).option(\"--name <slug>\", \"Migration name (used in directory name)\").option(\"--from <hash>\", \"Starting contract hash (default: latest migration target)\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst header = formatStyledHeader({\n\t\t\t\tcommand: \"migration new\",\n\t\t\t\tdescription: \"Scaffold a new migration\",\n\t\t\t\tdetails: [],\n\t\t\t\tflags\n\t\t\t});\n\t\t\tui.stderr(header);\n\t\t}\n\t\tconst exitCode = handleResult(await runMigrationNew(options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value, null, 2));\n\t\t\telse if (!flags.quiet) {\n\t\t\t\tui.output(`\\nScaffolded migration at ${value.dir}`);\n\t\t\t\tui.output(` from: ${value.from}`);\n\t\t\t\tui.output(` to: ${value.to}`);\n\t\t\t\tui.output(`\\nEdit migration.ts, then run it directly (\\`node \"${value.dir}/migration.ts\"\\`) to self-emit and attest.`);\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createMigrationNewCommand as t };\n\n//# sourceMappingURL=migration-new-Bf5K9fNK.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,eAAe,gBAAgB,SAAS;CACvC,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,OAAO,2BAA2B;EACjC,GAAG;EACH,QAAQ,aAAa;EACrB,KAAK,QAAQ,IAAI;EACjB,GAAG,UAAU,cAAc,QAAQ,MAAM;CAC1C,CAAC;AACF;AACA,SAAS,4BAA4B;CACpC,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,uBAAuB,SAAS,iDAAiD,wNAAwN;CACzS,mBAAmB,SAAS,CAAC,+CAA+C,6DAA6D,CAAC;CAC1I,iBAAiB,OAAO,CAAC,CAAC,OAAO,iBAAiB,yCAAyC,CAAC,CAAC,OAAO,iBAAiB,2DAA2D,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,OAAO,YAAY;EACtQ,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,IAAI,CAAC,MAAM,QAAQ,CAAC,MAAM,OAAO;GAChC,MAAM,SAAS,mBAAmB;IACjC,SAAS;IACT,aAAa;IACb,SAAS,CAAC;IACV;GACD,CAAC;GACD,GAAG,OAAO,MAAM;EACjB;EACA,MAAM,WAAW,aAAa,MAAM,gBAAgB,OAAO,GAAG,OAAO,KAAK,UAAU;GACnF,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,OAAO;IACtB,GAAG,OAAO,6BAA6B,MAAM,KAAK;IAClD,GAAG,OAAO,WAAW,MAAM,MAAM;IACjC,GAAG,OAAO,WAAW,MAAM,IAAI;IAC/B,GAAG,OAAO,sDAAsD,MAAM,IAAI,2CAA2C;GACtH;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -1,20 +1,20 @@
1
- import { N as errorUnexpected, O as errorRuntime$1, j as errorTargetMigrationNotSupported, t as CliStructuredError$1 } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
2
- import { t as assertFrameworkComponentsCompatible } from "./framework-components-CXxMNF8E-C-g2cchI.mjs";
3
- import { t as createProjectSpecifierResolver } from "./project-import-root-Bkz1gPB2-jhrMFebo.mjs";
1
+ import { N as errorUnexpected, O as errorRuntime$1, j as errorTargetMigrationNotSupported, t as CliStructuredError$1 } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
+ import { t as assertFrameworkComponentsCompatible } from "./framework-components-CPFWl2Ix-CrIZL3jG.mjs";
3
+ import { t as createProjectSpecifierResolver } from "./project-import-root-BPuwl2j1-DTX9G73z.mjs";
4
4
  import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-05kuwcb0.mjs";
5
5
  import { a as snapshotsImportPathFrom, o as writeContractSnapshot, t as contractSnapshotDir } from "./contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs";
6
6
  import { t as computeMigrationHash } from "./hash-DH8hl5Rq-BpM2t3Nu.mjs";
7
7
  import { r as formatMigrationDirName, u as writeMigrationPackage } from "./io-635GlNx1-D94PxRc-.mjs";
8
8
  import { r as findLatestMigration } from "./migration-graph-_SJImD5V-D5RCc651.mjs";
9
- import { _ as resolveMigrationPaths, g as resolveContractPath, l as getTargetMigrations } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
9
+ import { _ as resolveMigrationPaths, g as resolveContractPath, l as getTargetMigrations } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
10
10
  import { s as loadContractSpaceAggregate } from "./aggregate-BBsCbXgJ.mjs";
11
- import { l as refusePackageCorruptionOnAggregate } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
11
+ import { l as refusePackageCorruptionOnAggregate } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
12
12
  import { i as writeMigrationTs } from "./migration-ts-BoHxxGvi.mjs";
13
13
  import { join, relative } from "pathe";
14
14
  import { readFile } from "node:fs/promises";
15
15
  import { APP_SPACE_ID, createControlStack } from "@prisma/orm-framework/components/control";
16
16
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
17
- //#region ../../../1-framework/3-tooling/cli/dist/migration-new-ZlgxFcbH.mjs
17
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-new-YSdtJTRp.mjs
18
18
  /**
19
19
  * Policy core of `migration new`: scaffolds a migration package with a `migration.ts` stub for manual authoring.
20
20
  */
@@ -127,4 +127,4 @@ async function executeMigrationNewCommand(options) {
127
127
  //#endregion
128
128
  export { executeMigrationNewCommand as t };
129
129
 
130
- //# sourceMappingURL=migration-new-ZlgxFcbH-CxlZs2hr.mjs.map
130
+ //# sourceMappingURL=migration-new-YSdtJTRp-Dc06LNJe.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-new-ZlgxFcbH-CxlZs2hr.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-new-ZlgxFcbH.mjs"],"sourcesContent":["import { A as errorTargetMigrationNotSupported, D as errorRuntime, M as errorUnexpected, t as CliStructuredError } from \"./cli-errors-CihMAEVj.mjs\";\nimport { t as assertFrameworkComponentsCompatible } from \"./framework-components-CXxMNF8E.mjs\";\nimport { t as createProjectSpecifierResolver } from \"./project-import-root-Bkz1gPB2.mjs\";\nimport { c as resolveMigrationPaths, i as getTargetMigrations, s as resolveContractPath } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { l as refusePackageCorruptionOnAggregate } from \"./contract-space-aggregate-loader-1wG1OiDk.mjs\";\nimport { getEmittedArtifactPaths } from \"@internal/emitter\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join, relative } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { APP_SPACE_ID, createControlStack } from \"@internal/framework-components/control\";\nimport { loadContractSpaceAggregate } from \"@internal/migration-tools/aggregate\";\nimport { findLatestMigration } from \"@internal/migration-tools/migration-graph\";\nimport { contractSnapshotDir, snapshotsImportPathFrom, writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { computeMigrationHash } from \"@internal/migration-tools/hash\";\nimport { formatMigrationDirName, writeMigrationPackage } from \"@internal/migration-tools/io\";\nimport { writeMigrationTs } from \"@internal/migration-tools/migration-ts\";\n//#region src/control-api/operations/migration-new.ts\n/**\n* Policy core of `migration new`: scaffolds a migration package with a `migration.ts` stub for manual authoring.\n*/\nasync function executeMigrationNewCommand(options) {\n\tconst config = options.config;\n\tconst cwd = options.cwd;\n\tconst { migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tconst controlAdapter = config.adapter.create(stack);\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorRuntime(\"CLI.FILE_NOT_FOUND\", `Contract file not found at ${contractPathAbsolute}`, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: \"Run `prisma-next contract emit` first to generate the contract\"\n\t\t}));\n\t\tthrow error;\n\t}\n\tlet toContract;\n\ttry {\n\t\tconst parsedContract = JSON.parse(contractJsonContent);\n\t\ttoContract = familyInstance.deserializeContract(parsedContract);\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"MIGRATION.CONTRACT_DESERIALIZATION_FAILED\", \"Contract JSON is invalid\", {\n\t\t\twhy: `Failed to deserialize ${contractPathAbsolute}: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\",\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst toStorageHash = toContract.storage?.storageHash;\n\tif (typeof toStorageHash !== \"string\") return notOk(errorRuntime(\"CONTRACT.VALIDATION_FAILED\", \"Contract is missing storageHash\", {\n\t\twhy: `Contract at ${contractPathAbsolute} has no storageHash`,\n\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\"\n\t}));\n\tconst aggregate = await loadContractSpaceAggregate({\n\t\tmigrationsDir,\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json),\n\t\tappContract: toContract\n\t});\n\tconst packageCorruptionFailure = refusePackageCorruptionOnAggregate(aggregate);\n\tif (packageCorruptionFailure) return notOk(packageCorruptionFailure);\n\tconst packages = aggregate.app.packages;\n\tconst graph = aggregate.app.graph();\n\tlet fromHash = null;\n\tif (packages.length > 0) if (options.from) {\n\t\tconst match = packages.find((p) => p.metadata.to.startsWith(options.from));\n\t\tif (!match) return notOk(errorRuntime(\"MIGRATION.HASH_NOT_IN_GRAPH\", \"Starting contract not found\", {\n\t\t\twhy: `No migration with to hash matching \"${options.from}\" exists in ${appMigrationsRelative}`,\n\t\t\tfix: \"Check that the --from hash matches a known migration target hash.\"\n\t\t}));\n\t\tfromHash = match.metadata.to;\n\t} else {\n\t\tconst latestMigration = findLatestMigration(graph);\n\t\tif (latestMigration) fromHash = latestMigration.to;\n\t}\n\tif (fromHash === toStorageHash && !options.from) return notOk(errorRuntime(\"MIGRATION.NO_CHANGES\", \"No changes detected\", {\n\t\twhy: \"The from and to contract hashes are identical — there is nothing to migrate.\",\n\t\tfix: \"Change the contract and run `prisma-next contract emit` before creating a new migration. To author a data-only migration on the current contract hash, pass `--from <hash>` explicitly.\"\n\t}));\n\tconst timestamp = /* @__PURE__ */ new Date();\n\tconst packageDir = join(appMigrationsDir, formatMigrationDirName(timestamp, options.name ?? \"migration\"));\n\tconst baseMetadata = {\n\t\tfrom: fromHash,\n\t\tto: toStorageHash,\n\t\tprovidedInvariants: [],\n\t\tcreatedAt: timestamp.toISOString()\n\t};\n\tconst metadata = {\n\t\t...baseMetadata,\n\t\tmigrationHash: computeMigrationHash(baseMetadata, [])\n\t};\n\tconst migrations = getTargetMigrations(config.target);\n\tif (!migrations) return notOk(errorTargetMigrationNotSupported({ why: `Target \"${config.target.targetId}\" does not support migrations` }));\n\ttry {\n\t\tassertFrameworkComponentsCompatible(config.family.familyId, config.target.targetId, [\n\t\t\tconfig.target,\n\t\t\tconfig.adapter,\n\t\t\t...config.extensions ?? []\n\t\t]);\n\t\tconst resolveSpecifier = createProjectSpecifierResolver(options.configPath);\n\t\tawait writeMigrationPackage(packageDir, metadata, []);\n\t\tconst destinationArtifacts = getEmittedArtifactPaths(contractPathAbsolute);\n\t\tconst [contractJsonRaw, contractDts] = await Promise.all([readFile(destinationArtifacts.jsonPath, \"utf-8\"), readFile(destinationArtifacts.dtsPath, \"utf-8\")]);\n\t\tawait writeContractSnapshot(migrationsDir, toStorageHash, {\n\t\t\tcontractJson: JSON.parse(contractJsonRaw),\n\t\t\tcontractDts\n\t\t});\n\t\tawait writeMigrationTs(packageDir, migrations.createPlanner(controlAdapter).emptyMigration({\n\t\t\tpackageDir,\n\t\t\tcontractJsonPath: join(contractSnapshotDir(migrationsDir, toStorageHash), \"contract.json\"),\n\t\t\tfromHash,\n\t\t\ttoHash: toStorageHash,\n\t\t\tsnapshotsImportPath: snapshotsImportPathFrom(packageDir, migrationsDir)\n\t\t}, APP_SPACE_ID).renderTypeScript(resolveSpecifier));\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tdir: relative(cwd, packageDir),\n\t\t\tfrom: fromHash,\n\t\t\tto: toStorageHash,\n\t\t\tsummary: `Scaffolded migration at ${relative(cwd, packageDir)}`\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to scaffold migration: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n}\n//#endregion\nexport { executeMigrationNewCommand as t };\n\n//# sourceMappingURL=migration-new-ZlgxFcbH.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,eAAe,2BAA2B,SAAS;CAClD,MAAM,SAAS,QAAQ;CACvB,MAAM,MAAM,QAAQ;CACpB,MAAM,EAAE,eAAe,kBAAkB,0BAA0B,sBAAsB,QAAQ,YAAY,QAAQ,GAAG;CACxH,MAAM,QAAQ,mBAAmB,MAAM;CACvC,MAAM,iBAAiB,OAAO,OAAO,OAAO,KAAK;CACjD,MAAM,iBAAi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eAAe;GACzF;GACA,QAAQ;GACR,qBAAqB,wBAAwB,YAAY,aAAa;EACvE,GAAG,YAAY,CAAC,CAAC,iBAAiB,gBAAgB,CAAC;EACnD,OAAO,GAAG;GACT,IAAI;GACJ,KAAK,SAAS,KAAK,UAAU;GAC7B,MAAM;GACN,IAAI;GACJ,SAAS,2BAA2B,SAAS,KAAK,UAAU;EAC7D,CAAC;CACF,SAAS,OAAO;EACf,IAAIC,qBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,OAAO,MAAM,gBAAgB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,EAAE,KAAK,iCAAiC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC;CACzL;AACD"}
1
+ {"version":3,"file":"migration-new-YSdtJTRp-Dc06LNJe.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-new-YSdtJTRp.mjs"],"sourcesContent":["import { A as errorTargetMigrationNotSupported, D as errorRuntime, M as errorUnexpected, t as CliStructuredError } from \"./cli-errors-C6_pH59O.mjs\";\nimport { t as assertFrameworkComponentsCompatible } from \"./framework-components-CPFWl2Ix.mjs\";\nimport { t as createProjectSpecifierResolver } from \"./project-import-root-BPuwl2j1.mjs\";\nimport { c as resolveMigrationPaths, i as getTargetMigrations, s as resolveContractPath } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { l as refusePackageCorruptionOnAggregate } from \"./contract-space-aggregate-loader-BpdB-mHG.mjs\";\nimport { getEmittedArtifactPaths } from \"@internal/emitter\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join, relative } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { APP_SPACE_ID, createControlStack } from \"@internal/framework-components/control\";\nimport { loadContractSpaceAggregate } from \"@internal/migration-tools/aggregate\";\nimport { findLatestMigration } from \"@internal/migration-tools/migration-graph\";\nimport { contractSnapshotDir, snapshotsImportPathFrom, writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { computeMigrationHash } from \"@internal/migration-tools/hash\";\nimport { formatMigrationDirName, writeMigrationPackage } from \"@internal/migration-tools/io\";\nimport { writeMigrationTs } from \"@internal/migration-tools/migration-ts\";\n//#region src/control-api/operations/migration-new.ts\n/**\n* Policy core of `migration new`: scaffolds a migration package with a `migration.ts` stub for manual authoring.\n*/\nasync function executeMigrationNewCommand(options) {\n\tconst config = options.config;\n\tconst cwd = options.cwd;\n\tconst { migrationsDir, appMigrationsDir, appMigrationsRelative } = resolveMigrationPaths(options.configPath, config, cwd);\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tconst controlAdapter = config.adapter.create(stack);\n\tconst contractPathAbsolute = resolveContractPath(config);\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorRuntime(\"CLI.FILE_NOT_FOUND\", `Contract file not found at ${contractPathAbsolute}`, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: \"Run `prisma-next contract emit` first to generate the contract\"\n\t\t}));\n\t\tthrow error;\n\t}\n\tlet toContract;\n\ttry {\n\t\tconst parsedContract = JSON.parse(contractJsonContent);\n\t\ttoContract = familyInstance.deserializeContract(parsedContract);\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"MIGRATION.CONTRACT_DESERIALIZATION_FAILED\", \"Contract JSON is invalid\", {\n\t\t\twhy: `Failed to deserialize ${contractPathAbsolute}: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\",\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst toStorageHash = toContract.storage?.storageHash;\n\tif (typeof toStorageHash !== \"string\") return notOk(errorRuntime(\"CONTRACT.VALIDATION_FAILED\", \"Contract is missing storageHash\", {\n\t\twhy: `Contract at ${contractPathAbsolute} has no storageHash`,\n\t\tfix: \"Run `prisma-next contract emit` to regenerate the contract\"\n\t}));\n\tconst aggregate = await loadContractSpaceAggregate({\n\t\tmigrationsDir,\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json),\n\t\tappContract: toContract\n\t});\n\tconst packageCorruptionFailure = refusePackageCorruptionOnAggregate(aggregate);\n\tif (packageCorruptionFailure) return notOk(packageCorruptionFailure);\n\tconst packages = aggregate.app.packages;\n\tconst graph = aggregate.app.graph();\n\tlet fromHash = null;\n\tif (packages.length > 0) if (options.from) {\n\t\tconst match = packages.find((p) => p.metadata.to.startsWith(options.from));\n\t\tif (!match) return notOk(errorRuntime(\"MIGRATION.HASH_NOT_IN_GRAPH\", \"Starting contract not found\", {\n\t\t\twhy: `No migration with to hash matching \"${options.from}\" exists in ${appMigrationsRelative}`,\n\t\t\tfix: \"Check that the --from hash matches a known migration target hash.\"\n\t\t}));\n\t\tfromHash = match.metadata.to;\n\t} else {\n\t\tconst latestMigration = findLatestMigration(graph);\n\t\tif (latestMigration) fromHash = latestMigration.to;\n\t}\n\tif (fromHash === toStorageHash && !options.from) return notOk(errorRuntime(\"MIGRATION.NO_CHANGES\", \"No changes detected\", {\n\t\twhy: \"The from and to contract hashes are identical — there is nothing to migrate.\",\n\t\tfix: \"Change the contract and run `prisma-next contract emit` before creating a new migration. To author a data-only migration on the current contract hash, pass `--from <hash>` explicitly.\"\n\t}));\n\tconst timestamp = /* @__PURE__ */ new Date();\n\tconst packageDir = join(appMigrationsDir, formatMigrationDirName(timestamp, options.name ?? \"migration\"));\n\tconst baseMetadata = {\n\t\tfrom: fromHash,\n\t\tto: toStorageHash,\n\t\tprovidedInvariants: [],\n\t\tcreatedAt: timestamp.toISOString()\n\t};\n\tconst metadata = {\n\t\t...baseMetadata,\n\t\tmigrationHash: computeMigrationHash(baseMetadata, [])\n\t};\n\tconst migrations = getTargetMigrations(config.target);\n\tif (!migrations) return notOk(errorTargetMigrationNotSupported({ why: `Target \"${config.target.targetId}\" does not support migrations` }));\n\ttry {\n\t\tassertFrameworkComponentsCompatible(config.family.familyId, config.target.targetId, [\n\t\t\tconfig.target,\n\t\t\tconfig.adapter,\n\t\t\t...config.extensions ?? []\n\t\t]);\n\t\tconst resolveSpecifier = createProjectSpecifierResolver(options.configPath);\n\t\tawait writeMigrationPackage(packageDir, metadata, []);\n\t\tconst destinationArtifacts = getEmittedArtifactPaths(contractPathAbsolute);\n\t\tconst [contractJsonRaw, contractDts] = await Promise.all([readFile(destinationArtifacts.jsonPath, \"utf-8\"), readFile(destinationArtifacts.dtsPath, \"utf-8\")]);\n\t\tawait writeContractSnapshot(migrationsDir, toStorageHash, {\n\t\t\tcontractJson: JSON.parse(contractJsonRaw),\n\t\t\tcontractDts\n\t\t});\n\t\tawait writeMigrationTs(packageDir, migrations.createPlanner(controlAdapter).emptyMigration({\n\t\t\tpackageDir,\n\t\t\tcontractJsonPath: join(contractSnapshotDir(migrationsDir, toStorageHash), \"contract.json\"),\n\t\t\tfromHash,\n\t\t\ttoHash: toStorageHash,\n\t\t\tsnapshotsImportPath: snapshotsImportPathFrom(packageDir, migrationsDir)\n\t\t}, APP_SPACE_ID).renderTypeScript(resolveSpecifier));\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tdir: relative(cwd, packageDir),\n\t\t\tfrom: fromHash,\n\t\t\tto: toStorageHash,\n\t\t\tsummary: `Scaffolded migration at ${relative(cwd, packageDir)}`\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to scaffold migration: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n}\n//#endregion\nexport { executeMigrationNewCommand as t };\n\n//# sourceMappingURL=migration-new-YSdtJTRp.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,eAAe,2BAA2B,SAAS;CAClD,MAAM,SAAS,QAAQ;CACvB,MAAM,MAAM,Q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AsB,eAAe,eAAe;GACzD,cAAc,KAAK,MAAM,eAAe;GACxC;EACD,CAAC;EACD,MAAM,iBAAiB,YAAY,WAAW,cAAc,cAAc,CAAC,CAAC,eAAe;GAC1F;GACA,kBAAkB,KAAK,oBAAoB,eAAe,aAAa,GAAG,eAAe;GACzF;GACA,QAAQ;GACR,qBAAqB,wBAAwB,YAAY,aAAa;EACvE,GAAG,YAAY,CAAC,CAAC,iBAAiB,gBAAgB,CAAC;EACnD,OAAO,GAAG;GACT,IAAI;GACJ,KAAK,SAAS,KAAK,UAAU;GAC7B,MAAM;GACN,IAAI;GACJ,SAAS,2BAA2B,SAAS,KAAK,UAAU;EAC7D,CAAC;CACF,SAAS,OAAO;EACf,IAAIC,qBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,OAAO,MAAM,gBAAgB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,EAAE,KAAK,iCAAiC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,IAAI,CAAC,CAAC;CACzL;AACD"}
@@ -1,7 +1,7 @@
1
- import { O as errorRuntime$1 } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { O as errorRuntime$1 } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import { isAbsolute, relative, resolve } from "pathe";
3
3
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
4
- //#region ../../../1-framework/3-tooling/cli/dist/migration-path-target-yA4h5Zc6.mjs
4
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-path-target-5r1leSW5.mjs
5
5
  function looksLikePath(target) {
6
6
  return target.includes("/") || target.includes("\\");
7
7
  }
@@ -35,4 +35,4 @@ function findPackageByDirPath(packages, resolvedDirPath) {
35
35
  //#endregion
36
36
  export { resolveTargetPathAcrossSpaces as i, looksLikePath as n, resolveAppTargetPath as r, findPackageByDirPath as t };
37
37
 
38
- //# sourceMappingURL=migration-path-target-yA4h5Zc6-DlzBblBG.mjs.map
38
+ //# sourceMappingURL=migration-path-target-5r1leSW5-B0EMgvEv.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-path-target-yA4h5Zc6-DlzBblBG.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-path-target-yA4h5Zc6.mjs"],"sourcesContent":["import { D as errorRuntime } from \"./cli-errors-CihMAEVj.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isAbsolute, relative, resolve } from \"pathe\";\n//#region src/utils/migration-path-target.ts\nfunction looksLikePath(target) {\n\treturn target.includes(\"/\") || target.includes(\"\\\\\");\n}\nfunction resolveAppTargetPath(cwd, target, appMigrationsDir, appMigrationsRelative) {\n\tconst targetPath = resolve(cwd, target);\n\tconst relativeToApp = relative(appMigrationsDir, targetPath);\n\tif (relativeToApp === \"\" || relativeToApp === \".\" || relativeToApp.startsWith(\"..\") || isAbsolute(relativeToApp)) return notOk(errorRuntime(\"MIGRATION.TARGET_NOT_APP_SPACE\", \"Target must point to an app-space migration\", {\n\t\twhy: `Expected a path under ${appMigrationsRelative}, got ${target}`,\n\t\tfix: \"Pass an app-space migration directory or use a hash prefix.\"\n\t}));\n\treturn ok(targetPath);\n}\n/**\n* Resolve a filesystem-path target to the migration dir that contains it,\n* searching each in-scope space's `migrationsDir`. A path is explicit, so\n* it can belong to at most one space — returns the first match, or `null`\n* when the path falls outside every space dir.\n*/\nfunction resolveTargetPathAcrossSpaces(cwd, target, spaces) {\n\tconst targetPath = resolve(cwd, target);\n\tfor (const space of spaces) {\n\t\tconst rel = relative(space.migrationsDir, targetPath);\n\t\tif (!(rel === \"\" || rel === \".\" || rel.startsWith(\"..\") || isAbsolute(rel))) return targetPath;\n\t}\n\treturn null;\n}\nfunction findPackageByDirPath(packages, resolvedDirPath) {\n\tconst normalized = resolve(resolvedDirPath);\n\treturn packages.find((p) => resolve(p.dirPath) === normalized);\n}\n//#endregion\nexport { resolveTargetPathAcrossSpaces as i, looksLikePath as n, resolveAppTargetPath as r, findPackageByDirPath as t };\n\n//# sourceMappingURL=migration-path-target-yA4h5Zc6.mjs.map"],"mappings":";;;;AAIA,SAAS,cAAc,QAAQ;CAC9B,OAAO,OAAO,SAAS,GAAG,KAAK,OAAO,SAAS,IAAI;AACpD;AACA,SAAS,qBAAqB,KAAK,QAAQ,kBAAkB,uBAAuB;CACnF,MAAM,aAAa,QAAQ,KAAK,MAAM;CACtC,MAAM,gBAAgB,SAAS,kBAAkB,UAAU;CAC3D,IAAI,kBAAkB,MAAM,kBAAkB,OAAO,cAAc,WAAW,IAAI,KAAK,WAAW,aAAa,GAAG,OAAO,MAAMA,eAAa,kCAAkC,+CAA+C;EAC5N,KAAK,yBAAyB,sBAAsB,QAAQ;EAC5D,KAAK;CACN,CAAC,CAAC;CACF,OAAO,GAAG,UAAU;AACrB;;;;;;;AAOA,SAAS,8BAA8B,KAAK,QAAQ,QAAQ;CAC3D,MAAM,aAAa,QAAQ,KAAK,MAAM;CACtC,KAAK,MAAM,SAAS,QAAQ;EAC3B,MAAM,MAAM,SAAS,MAAM,eAAe,UAAU;EACpD,IAAI,EAAE,QAAQ,MAAM,QAAQ,OAAO,IAAI,WAAW,IAAI,KAAK,WAAW,GAAG,IAAI,OAAO;CACrF;CACA,OAAO;AACR;AACA,SAAS,qBAAqB,UAAU,iBAAiB;CACxD,MAAM,aAAa,QAAQ,eAAe;CAC1C,OAAO,SAAS,MAAM,MAAM,QAAQ,EAAE,OAAO,MAAM,UAAU;AAC9D"}
1
+ {"version":3,"file":"migration-path-target-5r1leSW5-B0EMgvEv.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-path-target-5r1leSW5.mjs"],"sourcesContent":["import { D as errorRuntime } from \"./cli-errors-C6_pH59O.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { isAbsolute, relative, resolve } from \"pathe\";\n//#region src/utils/migration-path-target.ts\nfunction looksLikePath(target) {\n\treturn target.includes(\"/\") || target.includes(\"\\\\\");\n}\nfunction resolveAppTargetPath(cwd, target, appMigrationsDir, appMigrationsRelative) {\n\tconst targetPath = resolve(cwd, target);\n\tconst relativeToApp = relative(appMigrationsDir, targetPath);\n\tif (relativeToApp === \"\" || relativeToApp === \".\" || relativeToApp.startsWith(\"..\") || isAbsolute(relativeToApp)) return notOk(errorRuntime(\"MIGRATION.TARGET_NOT_APP_SPACE\", \"Target must point to an app-space migration\", {\n\t\twhy: `Expected a path under ${appMigrationsRelative}, got ${target}`,\n\t\tfix: \"Pass an app-space migration directory or use a hash prefix.\"\n\t}));\n\treturn ok(targetPath);\n}\n/**\n* Resolve a filesystem-path target to the migration dir that contains it,\n* searching each in-scope space's `migrationsDir`. A path is explicit, so\n* it can belong to at most one space — returns the first match, or `null`\n* when the path falls outside every space dir.\n*/\nfunction resolveTargetPathAcrossSpaces(cwd, target, spaces) {\n\tconst targetPath = resolve(cwd, target);\n\tfor (const space of spaces) {\n\t\tconst rel = relative(space.migrationsDir, targetPath);\n\t\tif (!(rel === \"\" || rel === \".\" || rel.startsWith(\"..\") || isAbsolute(rel))) return targetPath;\n\t}\n\treturn null;\n}\nfunction findPackageByDirPath(packages, resolvedDirPath) {\n\tconst normalized = resolve(resolvedDirPath);\n\treturn packages.find((p) => resolve(p.dirPath) === normalized);\n}\n//#endregion\nexport { resolveTargetPathAcrossSpaces as i, looksLikePath as n, resolveAppTargetPath as r, findPackageByDirPath as t };\n\n//# sourceMappingURL=migration-path-target-5r1leSW5.mjs.map"],"mappings":";;;;AAIA,SAAS,cAAc,QAAQ;CAC9B,OAAO,OAAO,SAAS,GAAG,KAAK,OAAO,SAAS,IAAI;AACpD;AACA,SAAS,qBAAqB,KAAK,QAAQ,kBAAkB,uBAAuB;CACnF,MAAM,aAAa,QAAQ,KAAK,MAAM;CACtC,MAAM,gBAAgB,SAAS,kBAAkB,UAAU;CAC3D,IAAI,kBAAkB,MAAM,kBAAkB,OAAO,cAAc,WAAW,IAAI,KAAK,WAAW,aAAa,GAAG,OAAO,MAAMA,eAAa,kCAAkC,+CAA+C;EAC5N,KAAK,yBAAyB,sBAAsB,QAAQ;EAC5D,KAAK;CACN,CAAC,CAAC;CACF,OAAO,GAAG,UAAU;AACrB;;;;;;;AAOA,SAAS,8BAA8B,KAAK,QAAQ,QAAQ;CAC3D,MAAM,aAAa,QAAQ,KAAK,MAAM;CACtC,KAAK,MAAM,SAAS,QAAQ;EAC3B,MAAM,MAAM,SAAS,MAAM,eAAe,UAAU;EACpD,IAAI,EAAE,QAAQ,MAAM,QAAQ,OAAO,IAAI,WAAW,IAAI,KAAK,WAAW,GAAG,IAAI,OAAO;CACrF;CACA,OAAO;AACR;AACA,SAAS,qBAAqB,UAAU,iBAAiB;CACxD,MAAM,aAAa,QAAQ,eAAe;CAC1C,OAAO,SAAS,MAAM,MAAM,QAAQ,EAAE,OAAO,MAAM,UAAU;AAC9D"}
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError$2 } from "./cli-errors-C8DGzS94-CPP3UmRT.mjs";
1
+ import { t as CliStructuredError$2 } from "./cli-errors-f5PRtVdm-C6xVKeQn.mjs";
2
2
  import { t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
3
3
  import { t as CommonCommandOptions } from "./global-flags-BpoOYtNZ-CHZD3fud.mjs";
4
4
  import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
@@ -7,7 +7,7 @@ import "./package-N9PPdFV_.mjs";
7
7
  import { OperationPreview } from "@prisma/orm-framework/components/control";
8
8
  import { Result } from "@prisma/orm-framework/utils/result";
9
9
  import { PrismaNextConfig } from "@prisma/orm-framework/config/config-types";
10
- //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-s94qwFHi.d.mts
10
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-4cnnP6yM.d.mts
11
11
  //#region src/control-api/operations/contract-space-seed-phase.d.ts
12
12
  /**
13
13
  * In-memory authored migration package shipped by an extension descriptor.
@@ -161,4 +161,4 @@ declare function executeMigrationPlanCommand(options: MigrationPlanOptions, star
161
161
  }): Promise<Result<MigrationPlanResult, CliStructuredError$2>>;
162
162
  //#endregion
163
163
  export { executeMigrationPlanCommand as a, MigrationPlanResult as i, ContractSpaceSeedPhaseRecord as n, runContractSpaceSeedPhase as o, ContractSpaceSeedPhaseResult as r, ContractSpaceSeedPhaseInputs as t };
164
- //# sourceMappingURL=migration-plan-s94qwFHi-86F_Aklp.d.mts.map
164
+ //# sourceMappingURL=migration-plan-4cnnP6yM-DXzRfi_A.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-plan-s94qwFHi-86F_Aklp.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-plan-s94qwFHi.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;UAgBU;WACC;WACA,UAAU;WACV,KAAK;;;;;;;UAON;WACC;WACA;aACE;aACA;eACE;eACA;;aAEF,qBAAqB;;;UAGxB;WACC;WACA,YAAY,cAAc;;;;;;;;;;;;;;;;;UAiB3B;WACC;WACA;WACA;WACA;WACA;;UAED;WACC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BX,0BAA0B,QAAQ,+BAA+B,QAAQ;;;UAGhF,6BAA6B;WAC5B,QAAQ;;WAER;;WAEA;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;WAaA;aACE;aACA;;WAEF;aACE;aACA;aACA;;;;;;;WAOF,UAAU;WACV;;;;;;WAMA;WACA;aACE;;;iBAGI,4BAA4B,SAAS,sBAAsB,mBAAmB;WACpF,qBAAqB;aACnB;aACA;aACA;;WAEF,YAAY,QAAQ;IAC3B,QAAQ,OAAO,qBAAqB"}
1
+ {"version":3,"file":"migration-plan-4cnnP6yM-DXzRfi_A.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-plan-4cnnP6yM.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;UAgBU;WACC;WACA,UAAU;WACV,KAAK;;;;;;;UAON;WACC;WACA;aACE;aACA;eACE;eACA;;aAEF,qBAAqB;;;UAGxB;WACC;WACA,YAAY,cAAc;;;;;;;;;;;;;;;;;UAiB3B;WACC;WACA;WACA;WACA;WACA;;UAED;WACC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BX,0BAA0B,QAAQ,+BAA+B,QAAQ;;;UAGhF,6BAA6B;WAC5B,QAAQ;;WAER;;WAEA;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;WAaA;aACE;aACA;;WAEF;aACE;aACA;aACA;;;;;;;WAOF,UAAU;WACV;;;;;;WAMA;WACA;aACE;;;iBAGI,4BAA4B,SAAS,sBAAsB,mBAAmB;WACpF,qBAAqB;aACnB;aACA;aACA;;WAEF,YAAY,QAAQ;IAC3B,QAAQ,OAAO,qBAAqB"}
@@ -1,6 +1,6 @@
1
- import { C as errorPlanForgotTheFlag, N as errorUnexpected, P as mapRefResolutionError, d as errorFileNotFound, j as errorTargetMigrationNotSupported, k as errorSnapshotMissing, s as errorContractValidationFailed, t as CliStructuredError$1, y as errorMigrationPlanningFailed } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
2
- import { t as assertFrameworkComponentsCompatible } from "./framework-components-CXxMNF8E-C-g2cchI.mjs";
3
- import { t as createProjectSpecifierResolver } from "./project-import-root-Bkz1gPB2-jhrMFebo.mjs";
1
+ import { C as errorPlanForgotTheFlag, N as errorUnexpected, P as mapRefResolutionError, d as errorFileNotFound, j as errorTargetMigrationNotSupported, k as errorSnapshotMissing, s as errorContractValidationFailed, t as CliStructuredError$1, y as errorMigrationPlanningFailed } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
+ import { t as assertFrameworkComponentsCompatible } from "./framework-components-CPFWl2Ix-CrIZL3jG.mjs";
3
+ import { t as createProjectSpecifierResolver } from "./project-import-root-BPuwl2j1-DTX9G73z.mjs";
4
4
  import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-05kuwcb0.mjs";
5
5
  import { t as MigrationToolsError } from "./errors-CXbGUWGu-BQi6YS-H.mjs";
6
6
  import { a as snapshotsImportPathFrom, o as writeContractSnapshot } from "./contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs";
@@ -10,18 +10,18 @@ import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigratio
10
10
  import { r as findLatestMigration } from "./migration-graph-_SJImD5V-D5RCc651.mjs";
11
11
  import { c as spaceMigrationDirectory, s as readContractSpaceHeadRef } from "./verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs";
12
12
  import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-BG2w0P8d.mjs";
13
- import { _ as resolveMigrationPaths, g as resolveContractPath, l as getTargetMigrations } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
13
+ import { _ as resolveMigrationPaths, g as resolveContractPath, l as getTargetMigrations } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
14
14
  import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-BViWUMpP-Cgu4Z2ox.mjs";
15
- import { a as loadContractSpaceAggregateForCli, d as toExtensionInputs, n as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs";
15
+ import { a as loadContractSpaceAggregateForCli, d as toExtensionInputs, n as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs";
16
+ import { t as mapContractAtError } from "./contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs";
16
17
  import { n as parseContractRef } from "./ref-resolution-sGcINe7o.mjs";
17
18
  import { i as writeMigrationTs } from "./migration-ts-BoHxxGvi.mjs";
18
- import { t as mapContractAtError } from "./contract-at-errors-BsQiGdZC-D8l9-WWt.mjs";
19
19
  import { join, relative } from "pathe";
20
20
  import { castAs } from "@prisma/orm-framework/utils/casts";
21
21
  import { readFile } from "node:fs/promises";
22
22
  import { createControlStack, hasOperationPreview } from "@prisma/orm-framework/components/control";
23
23
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
24
- //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-DiLJTAep.mjs
24
+ //#region ../../../1-framework/3-tooling/cli/dist/migration-plan-CZY8HVCh.mjs
25
25
  /**
26
26
  * Phase-1 of the two-phase `migration plan` pipeline (sub-spec § 4).
27
27
  *
@@ -618,4 +618,4 @@ function buildAutoBaselinePlanSummary(deltaOpsCount, emittedExtensionDirsCount)
618
618
  //#endregion
619
619
  export { runContractSpaceSeedPhase as i, resolveFromForPlan as n, resolveToForPlan as r, executeMigrationPlanCommand as t };
620
620
 
621
- //# sourceMappingURL=migration-plan-DiLJTAep-2B463CwW.mjs.map
621
+ //# sourceMappingURL=migration-plan-CZY8HVCh-BbfQvxnb.mjs.map