@prisma/orm-toolchain 0.16.0-dev.36

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 (321) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +28 -0
  3. package/dist/aggregate-B4mhR4Sk.mjs +1012 -0
  4. package/dist/aggregate-B4mhR4Sk.mjs.map +1 -0
  5. package/dist/aggregate-BflrjWPO.d.mts +803 -0
  6. package/dist/aggregate-BflrjWPO.d.mts.map +1 -0
  7. package/dist/bin__prisma-next.mjs +800 -0
  8. package/dist/bin__prisma-next.mjs.map +1 -0
  9. package/dist/cli-telemetry.d.mts +367 -0
  10. package/dist/cli-telemetry.d.mts.map +1 -0
  11. package/dist/cli-telemetry.mjs +48 -0
  12. package/dist/cli-telemetry.mjs.map +1 -0
  13. package/dist/cli-telemetry__sender.d.mts +1 -0
  14. package/dist/cli-telemetry__sender.mjs +1 -0
  15. package/dist/cli.d.mts +31 -0
  16. package/dist/cli.d.mts.map +1 -0
  17. package/dist/cli.mjs +180 -0
  18. package/dist/cli.mjs.map +1 -0
  19. package/dist/cli__commands__contract-emit.d.mts +2 -0
  20. package/dist/cli__commands__contract-emit.mjs +2 -0
  21. package/dist/cli__commands__contract-infer.d.mts +7 -0
  22. package/dist/cli__commands__contract-infer.d.mts.map +1 -0
  23. package/dist/cli__commands__contract-infer.mjs +2 -0
  24. package/dist/cli__commands__db-init.d.mts +7 -0
  25. package/dist/cli__commands__db-init.d.mts.map +1 -0
  26. package/dist/cli__commands__db-init.mjs +2 -0
  27. package/dist/cli__commands__db-schema.d.mts +7 -0
  28. package/dist/cli__commands__db-schema.d.mts.map +1 -0
  29. package/dist/cli__commands__db-schema.mjs +2 -0
  30. package/dist/cli__commands__db-sign.d.mts +7 -0
  31. package/dist/cli__commands__db-sign.d.mts.map +1 -0
  32. package/dist/cli__commands__db-sign.mjs +2 -0
  33. package/dist/cli__commands__db-update.d.mts +7 -0
  34. package/dist/cli__commands__db-update.d.mts.map +1 -0
  35. package/dist/cli__commands__db-update.mjs +2 -0
  36. package/dist/cli__commands__db-verify.d.mts +7 -0
  37. package/dist/cli__commands__db-verify.d.mts.map +1 -0
  38. package/dist/cli__commands__db-verify.mjs +2 -0
  39. package/dist/cli__commands__migrate.d.mts +66 -0
  40. package/dist/cli__commands__migrate.d.mts.map +1 -0
  41. package/dist/cli__commands__migrate.mjs +2 -0
  42. package/dist/cli__commands__migration-check.d.mts +64 -0
  43. package/dist/cli__commands__migration-check.d.mts.map +1 -0
  44. package/dist/cli__commands__migration-check.mjs +3 -0
  45. package/dist/cli__commands__migration-graph.d.mts +36 -0
  46. package/dist/cli__commands__migration-graph.d.mts.map +1 -0
  47. package/dist/cli__commands__migration-graph.mjs +2 -0
  48. package/dist/cli__commands__migration-list.d.mts +79 -0
  49. package/dist/cli__commands__migration-list.d.mts.map +1 -0
  50. package/dist/cli__commands__migration-list.mjs +2 -0
  51. package/dist/cli__commands__migration-log.d.mts +20 -0
  52. package/dist/cli__commands__migration-log.d.mts.map +1 -0
  53. package/dist/cli__commands__migration-log.mjs +2 -0
  54. package/dist/cli__commands__migration-new.d.mts +7 -0
  55. package/dist/cli__commands__migration-new.d.mts.map +1 -0
  56. package/dist/cli__commands__migration-new.mjs +2 -0
  57. package/dist/cli__commands__migration-plan.d.mts +79 -0
  58. package/dist/cli__commands__migration-plan.d.mts.map +1 -0
  59. package/dist/cli__commands__migration-plan.mjs +2 -0
  60. package/dist/cli__commands__migration-show.d.mts +27 -0
  61. package/dist/cli__commands__migration-show.d.mts.map +1 -0
  62. package/dist/cli__commands__migration-show.mjs +2 -0
  63. package/dist/cli__commands__migration-status.d.mts +55 -0
  64. package/dist/cli__commands__migration-status.d.mts.map +1 -0
  65. package/dist/cli__commands__migration-status.mjs +3 -0
  66. package/dist/cli__commands__ref.d.mts +34 -0
  67. package/dist/cli__commands__ref.d.mts.map +1 -0
  68. package/dist/cli__commands__ref.mjs +2 -0
  69. package/dist/cli__commands__telemetry.d.mts +7 -0
  70. package/dist/cli__commands__telemetry.d.mts.map +1 -0
  71. package/dist/cli__commands__telemetry.mjs +2 -0
  72. package/dist/cli__config-types.d.mts +2 -0
  73. package/dist/cli__config-types.mjs +2 -0
  74. package/dist/cli__control-api.d.mts +141 -0
  75. package/dist/cli__control-api.d.mts.map +1 -0
  76. package/dist/cli__control-api.mjs +4 -0
  77. package/dist/cli__init-output.d.mts +37 -0
  78. package/dist/cli__init-output.d.mts.map +1 -0
  79. package/dist/cli__init-output.mjs +2 -0
  80. package/dist/cli__migration-cli.d.mts +79 -0
  81. package/dist/cli__migration-cli.d.mts.map +1 -0
  82. package/dist/cli__migration-cli.mjs +407 -0
  83. package/dist/cli__migration-cli.mjs.map +1 -0
  84. package/dist/client-75qrAPqf-DZAVUxFa.mjs +1606 -0
  85. package/dist/client-75qrAPqf-DZAVUxFa.mjs.map +1 -0
  86. package/dist/command-helpers-CAoXqAY9-DWUBcTXM.mjs +1671 -0
  87. package/dist/command-helpers-CAoXqAY9-DWUBcTXM.mjs.map +1 -0
  88. package/dist/config-loader.d.mts +18 -0
  89. package/dist/config-loader.d.mts.map +1 -0
  90. package/dist/config-loader.mjs +2 -0
  91. package/dist/constants-CM-w38DQ-Cz_EXbOc.mjs +10 -0
  92. package/dist/constants-CM-w38DQ-Cz_EXbOc.mjs.map +1 -0
  93. package/dist/constants-Dkcn8Qu4.d.mts +10 -0
  94. package/dist/constants-Dkcn8Qu4.d.mts.map +1 -0
  95. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs +36 -0
  96. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs.map +1 -0
  97. package/dist/contract-emit-0hSjbuxp-BBOKldTZ.mjs +148 -0
  98. package/dist/contract-emit-0hSjbuxp-BBOKldTZ.mjs.map +1 -0
  99. package/dist/contract-emit-B65_UiFn.d.mts +7 -0
  100. package/dist/contract-emit-B65_UiFn.d.mts.map +1 -0
  101. package/dist/contract-emit-B6odMoem-CK3diBPk.mjs +359 -0
  102. package/dist/contract-emit-B6odMoem-CK3diBPk.mjs.map +1 -0
  103. package/dist/contract-enrichment-DrMvvY2A-DxNGeF4d.mjs +56 -0
  104. package/dist/contract-enrichment-DrMvvY2A-DxNGeF4d.mjs.map +1 -0
  105. package/dist/contract-infer-BnkqpftN-DVM2eKJ3.mjs +73 -0
  106. package/dist/contract-infer-BnkqpftN-DVM2eKJ3.mjs.map +1 -0
  107. package/dist/contract-snapshot-store-CbqynbtE.d.mts +28 -0
  108. package/dist/contract-snapshot-store-CbqynbtE.d.mts.map +1 -0
  109. package/dist/contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs +118 -0
  110. package/dist/contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs.map +1 -0
  111. package/dist/contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs +302 -0
  112. package/dist/contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs.map +1 -0
  113. package/dist/db-init-Vbkb_TKZ.mjs +153 -0
  114. package/dist/db-init-Vbkb_TKZ.mjs.map +1 -0
  115. package/dist/db-schema-ClQCu3xY.mjs +47 -0
  116. package/dist/db-schema-ClQCu3xY.mjs.map +1 -0
  117. package/dist/db-sign-jjXDgQ1u.mjs +175 -0
  118. package/dist/db-sign-jjXDgQ1u.mjs.map +1 -0
  119. package/dist/db-update-BQlrqtDD.mjs +183 -0
  120. package/dist/db-update-BQlrqtDD.mjs.map +1 -0
  121. package/dist/db-verify-CKPsRFrj-3udprZQD.mjs +396 -0
  122. package/dist/db-verify-CKPsRFrj-3udprZQD.mjs.map +1 -0
  123. package/dist/domain-type-generation-DAn9y5d2-BgoT5uKI.mjs +334 -0
  124. package/dist/domain-type-generation-DAn9y5d2-BgoT5uKI.mjs.map +1 -0
  125. package/dist/domain-type-generation-PkAb39ob-Ct8AGqow.d.mts +63 -0
  126. package/dist/domain-type-generation-PkAb39ob-Ct8AGqow.d.mts.map +1 -0
  127. package/dist/emitter.d.mts +75 -0
  128. package/dist/emitter.d.mts.map +1 -0
  129. package/dist/emitter.mjs +3 -0
  130. package/dist/emitter__domain-type-generation.d.mts +2 -0
  131. package/dist/emitter__domain-type-generation.mjs +2 -0
  132. package/dist/emitter__type-expression-safety.d.mts +6 -0
  133. package/dist/emitter__type-expression-safety.d.mts.map +1 -0
  134. package/dist/emitter__type-expression-safety.mjs +2 -0
  135. package/dist/errors--qsXZUtL.d.mts +72 -0
  136. package/dist/errors--qsXZUtL.d.mts.map +1 -0
  137. package/dist/errors-IpZm1Skp-BH495dRd.mjs +378 -0
  138. package/dist/errors-IpZm1Skp-BH495dRd.mjs.map +1 -0
  139. package/dist/exports-BN0vFTxG.mjs +276 -0
  140. package/dist/exports-BN0vFTxG.mjs.map +1 -0
  141. package/dist/exports-B_xhKZmC.mjs +1436 -0
  142. package/dist/exports-B_xhKZmC.mjs.map +1 -0
  143. package/dist/exports-D3-NwrMA-CadaBGQ3.mjs +154 -0
  144. package/dist/exports-D3-NwrMA-CadaBGQ3.mjs.map +1 -0
  145. package/dist/exports-Dl2aGAk7.mjs +119 -0
  146. package/dist/exports-Dl2aGAk7.mjs.map +1 -0
  147. package/dist/format-ByDm2goZ-DKLyhNHo.mjs +101 -0
  148. package/dist/format-ByDm2goZ-DKLyhNHo.mjs.map +1 -0
  149. package/dist/framework-components-CjshQKHA-Dlp6Leo5.mjs +58 -0
  150. package/dist/framework-components-CjshQKHA-Dlp6Leo5.mjs.map +1 -0
  151. package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts +35 -0
  152. package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts.map +1 -0
  153. package/dist/graph-bDjJ4GL9-BhFevsJS.d.mts +28 -0
  154. package/dist/graph-bDjJ4GL9-BhFevsJS.d.mts.map +1 -0
  155. package/dist/graph-membership-DW6nnbyQ-Bp2KcVwR.mjs +14 -0
  156. package/dist/graph-membership-DW6nnbyQ-Bp2KcVwR.mjs.map +1 -0
  157. package/dist/hash-DH8hl5Rq-BpM2t3Nu.mjs +64 -0
  158. package/dist/hash-DH8hl5Rq-BpM2t3Nu.mjs.map +1 -0
  159. package/dist/hash-XZYYKJ-i.d.mts +53 -0
  160. package/dist/hash-XZYYKJ-i.d.mts.map +1 -0
  161. package/dist/import-roots-B6CtsWXb.d.mts +119 -0
  162. package/dist/import-roots-B6CtsWXb.d.mts.map +1 -0
  163. package/dist/import-roots-NDOIEDVj.mjs +217 -0
  164. package/dist/import-roots-NDOIEDVj.mjs.map +1 -0
  165. package/dist/init-DHctXAI9-DSlaaYXN.mjs +2186 -0
  166. package/dist/init-DHctXAI9-DSlaaYXN.mjs.map +1 -0
  167. package/dist/inspect-live-schema-CnwYTRZ0-BErPHMni.mjs +91 -0
  168. package/dist/inspect-live-schema-CnwYTRZ0-BErPHMni.mjs.map +1 -0
  169. package/dist/invariants-B5wLrgQS.d.mts +39 -0
  170. package/dist/invariants-B5wLrgQS.d.mts.map +1 -0
  171. package/dist/invariants-lXzy6txi-DAoP4nTE.mjs +57 -0
  172. package/dist/invariants-lXzy6txi-DAoP4nTE.mjs.map +1 -0
  173. package/dist/io-C8TdyBKt-DloEBi70.mjs +313 -0
  174. package/dist/io-C8TdyBKt-DloEBi70.mjs.map +1 -0
  175. package/dist/io-DYfeLJxR.d.mts +1 -0
  176. package/dist/io-sr4CO9_t-C3eV_kn-.d.mts +125 -0
  177. package/dist/io-sr4CO9_t-C3eV_kn-.d.mts.map +1 -0
  178. package/dist/ledger-origin-BGRN77Oy.d.mts +6 -0
  179. package/dist/ledger-origin-BGRN77Oy.d.mts.map +1 -0
  180. package/dist/ledger-origin-D7PN4Fon.mjs +9 -0
  181. package/dist/ledger-origin-D7PN4Fon.mjs.map +1 -0
  182. package/dist/metadata-2nbOAGsV-uYNeq2Cp.d.mts +2 -0
  183. package/dist/metadata-BtscDay2.d.mts +1 -0
  184. package/dist/migrate-Cb_iv264.mjs +500 -0
  185. package/dist/migrate-Cb_iv264.mjs.map +1 -0
  186. package/dist/migration-B2ljMJim.d.mts +155 -0
  187. package/dist/migration-B2ljMJim.d.mts.map +1 -0
  188. package/dist/migration-BuUmO7It.mjs +209 -0
  189. package/dist/migration-BuUmO7It.mjs.map +1 -0
  190. package/dist/migration-check-CcG-fB8r-CDs5C9vt.mjs +597 -0
  191. package/dist/migration-check-CcG-fB8r-CDs5C9vt.mjs.map +1 -0
  192. package/dist/migration-command-scaffold-BCuoeAki-B1pVGX8d.mjs +103 -0
  193. package/dist/migration-command-scaffold-BCuoeAki-B1pVGX8d.mjs.map +1 -0
  194. package/dist/migration-graph-CBf9ORe7-B4xAF8GN.mjs +500 -0
  195. package/dist/migration-graph-CBf9ORe7-B4xAF8GN.mjs.map +1 -0
  196. package/dist/migration-graph-DkoCC0Qy.mjs +185 -0
  197. package/dist/migration-graph-DkoCC0Qy.mjs.map +1 -0
  198. package/dist/migration-graph-Dqndu0i5.d.mts +9 -0
  199. package/dist/migration-graph-Dqndu0i5.d.mts.map +1 -0
  200. package/dist/migration-graph-command-render-BKrg6BPv-BP8Pfj4J.mjs +1945 -0
  201. package/dist/migration-graph-command-render-BKrg6BPv-BP8Pfj4J.mjs.map +1 -0
  202. package/dist/migration-graph-tarTxJ99-BrGBANeE.d.mts +124 -0
  203. package/dist/migration-graph-tarTxJ99-BrGBANeE.d.mts.map +1 -0
  204. package/dist/migration-list-BFBeo1_X-c0kqYokL.mjs +228 -0
  205. package/dist/migration-list-BFBeo1_X-c0kqYokL.mjs.map +1 -0
  206. package/dist/migration-log-CS5IWcNq-BQ-32Low.mjs +220 -0
  207. package/dist/migration-log-CS5IWcNq-BQ-32Low.mjs.map +1 -0
  208. package/dist/migration-new-BurCjyaQ.mjs +168 -0
  209. package/dist/migration-new-BurCjyaQ.mjs.map +1 -0
  210. package/dist/migration-path-target-D3Sj55PI-BICblCuk.mjs +38 -0
  211. package/dist/migration-path-target-D3Sj55PI-BICblCuk.mjs.map +1 -0
  212. package/dist/migration-plan-q_L84PN1-BWE0LTH6.mjs +759 -0
  213. package/dist/migration-plan-q_L84PN1-BWE0LTH6.mjs.map +1 -0
  214. package/dist/migration-show-Bx5I5aW9.mjs +171 -0
  215. package/dist/migration-show-Bx5I5aW9.mjs.map +1 -0
  216. package/dist/migration-status-CFlzlRmu-DewBN8Ys.mjs +444 -0
  217. package/dist/migration-status-CFlzlRmu-DewBN8Ys.mjs.map +1 -0
  218. package/dist/migration-tools.d.mts +23 -0
  219. package/dist/migration-tools.mjs +17 -0
  220. package/dist/migration-tools__aggregate.d.mts +2 -0
  221. package/dist/migration-tools__aggregate.mjs +2 -0
  222. package/dist/migration-tools__constants.d.mts +2 -0
  223. package/dist/migration-tools__constants.mjs +2 -0
  224. package/dist/migration-tools__contract-snapshot-store.d.mts +2 -0
  225. package/dist/migration-tools__contract-snapshot-store.mjs +2 -0
  226. package/dist/migration-tools__errors.d.mts +2 -0
  227. package/dist/migration-tools__errors.mjs +2 -0
  228. package/dist/migration-tools__graph.d.mts +2 -0
  229. package/dist/migration-tools__graph.mjs +1 -0
  230. package/dist/migration-tools__hash.d.mts +2 -0
  231. package/dist/migration-tools__hash.mjs +2 -0
  232. package/dist/migration-tools__invariants.d.mts +2 -0
  233. package/dist/migration-tools__invariants.mjs +2 -0
  234. package/dist/migration-tools__io.d.mts +3 -0
  235. package/dist/migration-tools__io.mjs +2 -0
  236. package/dist/migration-tools__ledger-origin.d.mts +2 -0
  237. package/dist/migration-tools__ledger-origin.mjs +2 -0
  238. package/dist/migration-tools__metadata.d.mts +3 -0
  239. package/dist/migration-tools__metadata.mjs +1 -0
  240. package/dist/migration-tools__migration-graph.d.mts +3 -0
  241. package/dist/migration-tools__migration-graph.mjs +3 -0
  242. package/dist/migration-tools__migration-ts.d.mts +2 -0
  243. package/dist/migration-tools__migration-ts.mjs +2 -0
  244. package/dist/migration-tools__migration.d.mts +2 -0
  245. package/dist/migration-tools__migration.mjs +2 -0
  246. package/dist/migration-tools__package.d.mts +3 -0
  247. package/dist/migration-tools__package.mjs +1 -0
  248. package/dist/migration-tools__ref-resolution.d.mts +2 -0
  249. package/dist/migration-tools__ref-resolution.mjs +2 -0
  250. package/dist/migration-tools__refs.d.mts +2 -0
  251. package/dist/migration-tools__refs.mjs +2 -0
  252. package/dist/migration-tools__spaces.d.mts +3 -0
  253. package/dist/migration-tools__spaces.mjs +3 -0
  254. package/dist/migration-ts-CNaAtK8C.d.mts +38 -0
  255. package/dist/migration-ts-CNaAtK8C.d.mts.map +1 -0
  256. package/dist/migration-ts-FyF55c4M.mjs +67 -0
  257. package/dist/migration-ts-FyF55c4M.mjs.map +1 -0
  258. package/dist/op-schema-BSVHzEQN-DIWt28D8.mjs +13 -0
  259. package/dist/op-schema-BSVHzEQN-DIWt28D8.mjs.map +1 -0
  260. package/dist/output-DWNYqZGc-D2sRgLAm.mjs +109 -0
  261. package/dist/output-DWNYqZGc-D2sRgLAm.mjs.map +1 -0
  262. package/dist/package-CfWiDNrr-ZR4HM_Iz.d.mts +21 -0
  263. package/dist/package-CfWiDNrr-ZR4HM_Iz.d.mts.map +1 -0
  264. package/dist/package-N9PPdFV_.d.mts +3 -0
  265. package/dist/progress-adapter-CjAeTxY_-BXYSd1eY.mjs +43 -0
  266. package/dist/progress-adapter-CjAeTxY_-BXYSd1eY.mjs.map +1 -0
  267. package/dist/project-import-root-CpwLCDLY-DkVwAnWj.mjs +99 -0
  268. package/dist/project-import-root-CpwLCDLY-DkVwAnWj.mjs.map +1 -0
  269. package/dist/publish-surface.d.mts +3 -0
  270. package/dist/publish-surface.mjs +3 -0
  271. package/dist/publish-surface__import-roots.d.mts +2 -0
  272. package/dist/publish-surface__import-roots.mjs +2 -0
  273. package/dist/publish-surface__shells.d.mts +2 -0
  274. package/dist/publish-surface__shells.mjs +2 -0
  275. package/dist/quick-reference-mongo.md +114 -0
  276. package/dist/quick-reference-postgres.md +93 -0
  277. package/dist/readme-mongo.md +35 -0
  278. package/dist/readme-postgres.md +34 -0
  279. package/dist/ref-B6cTthTi.mjs +171 -0
  280. package/dist/ref-B6cTthTi.mjs.map +1 -0
  281. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs +57 -0
  282. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs.map +1 -0
  283. package/dist/ref-resolution-BjJBWPjX.mjs +250 -0
  284. package/dist/ref-resolution-BjJBWPjX.mjs.map +1 -0
  285. package/dist/ref-resolution-COGOSL57.d.mts +127 -0
  286. package/dist/ref-resolution-COGOSL57.d.mts.map +1 -0
  287. package/dist/refs-BDbB9BRB-D6Za3Q49.mjs +241 -0
  288. package/dist/refs-BDbB9BRB-D6Za3Q49.mjs.map +1 -0
  289. package/dist/refs-BNCUu58Y-BIso5Jfg.d.mts +43 -0
  290. package/dist/refs-BNCUu58Y-BIso5Jfg.d.mts.map +1 -0
  291. package/dist/schemas-CeGMYFYX-h3OcU__O.d.mts +192 -0
  292. package/dist/schemas-CeGMYFYX-h3OcU__O.d.mts.map +1 -0
  293. package/dist/schemas-KhXMzNA_-CzZ7GFX_.mjs +112 -0
  294. package/dist/schemas-KhXMzNA_-CzZ7GFX_.mjs.map +1 -0
  295. package/dist/shells-BenrJHp2.mjs +602 -0
  296. package/dist/shells-BenrJHp2.mjs.map +1 -0
  297. package/dist/shells-COHV_Ozf.d.mts +135 -0
  298. package/dist/shells-COHV_Ozf.d.mts.map +1 -0
  299. package/dist/spaces-C27bA-xc.mjs +267 -0
  300. package/dist/spaces-C27bA-xc.mjs.map +1 -0
  301. package/dist/spaces-DxFj5y8l.d.mts +415 -0
  302. package/dist/spaces-DxFj5y8l.d.mts.map +1 -0
  303. package/dist/telemetry-CmbCa3Ld-CmE5zcIG.mjs +120 -0
  304. package/dist/telemetry-CmbCa3Ld-CmE5zcIG.mjs.map +1 -0
  305. package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts +133 -0
  306. package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts.map +1 -0
  307. package/dist/type-expression-safety-CgHTWypx.mjs +8 -0
  308. package/dist/type-expression-safety-CgHTWypx.mjs.map +1 -0
  309. package/dist/types-DZWEs4si-D8UlyJI0.d.mts +893 -0
  310. package/dist/types-DZWEs4si-D8UlyJI0.d.mts.map +1 -0
  311. package/dist/verify-DnVNjc5C-BGdsblBK.mjs +283 -0
  312. package/dist/verify-DnVNjc5C-BGdsblBK.mjs.map +1 -0
  313. package/dist/verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs +252 -0
  314. package/dist/verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs.map +1 -0
  315. package/dist/verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts +136 -0
  316. package/dist/verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts.map +1 -0
  317. package/dist/vite-plugin-contract-emit.d.mts +54 -0
  318. package/dist/vite-plugin-contract-emit.d.mts.map +1 -0
  319. package/dist/vite-plugin-contract-emit.mjs +303 -0
  320. package/dist/vite-plugin-contract-emit.mjs.map +1 -0
  321. package/package.json +127 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-graph-command-render-BKrg6BPv-BP8Pfj4J.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-graph-command-render-BKrg6BPv.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { bold, createColors, cyan, cyanBright, dim, green, yellow } from \"colorette\";\nimport stringWidth from \"string-width\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\n//#region src/utils/formatters/migration-graph-occlusion-render.ts\n/**\n* Occlusion renderer for the line/plane/occlusion migration-graph.\n*\n* Per cell: pick the topmost-plane line (lowest plane number = drawn on top),\n* look up its glyph, apply colour from the line's lane or role. Lower-plane\n* lines are occluded (not drawn).\n*\n* Colour is forced via createColors({ useColor: true }) regardless of NO_COLOR.\n*/\nconst palette = createColors({ useColor: true });\nconst LANE_COLORIZERS = [\n\tpalette.white,\n\tpalette.cyan,\n\tpalette.yellow,\n\tpalette.blueBright,\n\tpalette.magenta,\n\tpalette.green\n];\nfunction laneColor(lane) {\n\treturn LANE_COLORIZERS[lane % LANE_COLORIZERS.length] ?? ((t) => t);\n}\n/**\n* The colourizer for a lane's hue (lane0 = white, lane1 = cyan, …). Exported\n* so the per-row LABEL renderer can tint a migration name in its lane's colour,\n* matching the node `○`, the edges, and the arrows drawn in the gutter — one\n* colour per lane across glyph and text.\n*/\nfunction laneColorizer(lane) {\n\treturn laneColor(lane);\n}\nfunction roleColor(role) {\n\treturn role === \"on-path\" ? palette.greenBright : palette.dim;\n}\nconst UNICODE_ALPHABET = {\n\tvertical: \"│\",\n\thorizontal: \"─\",\n\tcornerUpRight: \"╰\",\n\tcornerDownRight: \"╭\",\n\tcornerUpLeft: \"╯\",\n\tcornerDownLeft: \"╮\",\n\tarrowUp: \"↑\",\n\tarrowDown: \"↓\",\n\tnode: \"○\",\n\tselfLoop: \"⟲\",\n\tlandingArrow: \"◂\",\n\tfallback: \"?\"\n};\nconst ASCII_ALPHABET = {\n\tvertical: \"|\",\n\thorizontal: \"-\",\n\tcornerUpRight: \"\\\\\",\n\tcornerDownRight: \"/\",\n\tcornerUpLeft: \"/\",\n\tcornerDownLeft: \"\\\\\",\n\tarrowUp: \"^\",\n\tarrowDown: \"v\",\n\tnode: \"*\",\n\tselfLoop: \"@\",\n\tlandingArrow: \"<\",\n\tfallback: \"?\"\n};\nfunction alphabetFor(mode) {\n\treturn mode === \"ascii\" ? ASCII_ALPHABET : UNICODE_ALPHABET;\n}\nfunction glyphFor(dirs, alphabet) {\n\tconst has = (d) => dirs.has(d);\n\tif (has(\"up\") && has(\"down\") && !has(\"left\") && !has(\"right\")) return alphabet.vertical;\n\tif (has(\"left\") && has(\"right\") && !has(\"up\") && !has(\"down\")) return alphabet.horizontal;\n\tif (has(\"up\") && has(\"right\") && !has(\"down\") && !has(\"left\")) return alphabet.cornerUpRight;\n\tif (has(\"down\") && has(\"right\") && !has(\"up\") && !has(\"left\")) return alphabet.cornerDownRight;\n\tif (has(\"up\") && has(\"left\") && !has(\"down\") && !has(\"right\")) return alphabet.cornerUpLeft;\n\tif (has(\"down\") && has(\"left\") && !has(\"up\") && !has(\"right\")) return alphabet.cornerDownLeft;\n\tif (has(\"up\") && !has(\"down\") && !has(\"left\") && !has(\"right\")) return alphabet.arrowUp;\n\tif (has(\"down\") && !has(\"up\") && !has(\"left\") && !has(\"right\")) return alphabet.arrowDown;\n\treturn alphabet.fallback;\n}\nconst NO_COLOR = (t) => t;\nfunction renderCell(cell, colorEnabled, alphabet) {\n\tif (cell.node !== void 0) return (!colorEnabled ? NO_COLOR : cell.node.role !== void 0 ? roleColor(cell.node.role) : laneColor(cell.node.lane))(alphabet.node);\n\tif (cell.lines.length === 0) return \" \";\n\tconst topLine = cell.lines.reduce((best, current) => {\n\t\tif (current.plane < best.plane) return current;\n\t\tif (current.plane > best.plane) return best;\n\t\tif (current.line.role === \"on-path\" && best.line.role !== \"on-path\") return current;\n\t\treturn best;\n\t}, cell.lines[0]);\n\tconst glyph = topLine.selfLoop === true ? alphabet.selfLoop : topLine.landingArrow === true ? alphabet.landingArrow : glyphFor(topLine.directions, alphabet);\n\treturn (!colorEnabled ? NO_COLOR : topLine.line.role !== void 0 ? roleColor(topLine.line.role) : laneColor(topLine.line.lane))(glyph);\n}\n/**\n* Render a single grid row to a coloured string. A completely empty row returns\n* the empty string (the row is NOT dropped) so callers that pair grid rows with\n* an external per-row label list keep a 1:1 index correspondence. `renderGrid`\n* itself drops empty rows for its standalone output (but preserves separator rows).\n*/\nfunction renderGridRow(row, opts = {}) {\n\tif (row[0]?.separator === true) return \"\";\n\tlet lastNonEmpty = -1;\n\tfor (let i = row.length - 1; i >= 0; i--) {\n\t\tconst cell = row[i];\n\t\tif (cell !== void 0 && (cell.lines.length > 0 || cell.node !== void 0)) {\n\t\t\tlastNonEmpty = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (lastNonEmpty < 0) return \"\";\n\tconst colsPerLane = opts.colsPerLane ?? 2;\n\tconst colorEnabled = opts.colorize ?? true;\n\tconst alphabet = alphabetFor(opts.glyphMode ?? \"unicode\");\n\tconst lastConnectorCol = Math.floor(lastNonEmpty / colsPerLane) * colsPerLane + (colsPerLane - 1);\n\tconst renderThrough = Math.max(lastNonEmpty, lastConnectorCol);\n\tlet line = \"\";\n\tfor (let col = 0; col <= Math.min(renderThrough, row.length - 1); col++) {\n\t\tconst cell = row[col];\n\t\tline += cell === void 0 ? \" \" : renderCell(cell, colorEnabled, alphabet);\n\t}\n\treturn line;\n}\nfunction migrationListForwardArrow(glyphMode) {\n\treturn glyphMode === \"ascii\" ? \"->\" : \"→\";\n}\nfunction migrationListEmptySource(glyphMode) {\n\treturn glyphMode === \"ascii\" ? \"-\" : \"∅\";\n}\nfunction abbreviateContractHash(hash) {\n\treturn hash.slice(0, 7);\n}\nfunction padFromHashColumn(text, width) {\n\tconst padding = Math.max(0, width - stringWidth(text));\n\treturn `${\" \".repeat(padding)}${text}`;\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-grid-layout.ts\n/**\n* Grid layout for the line/plane/occlusion migration-graph renderer.\n*\n* Produces a Grid (rows × cells) from a MigrationGraphRowModel. Each node\n* emits: fork connector, self-loop rows, node row, merge connector, and\n* inbound migration rows — in display order (tips first, then roots).\n*/\nfunction buildLaneAssignment(nodes, edges) {\n\tconst fwdEdges = edges.filter((e) => e.kind === \"forward\" && e.from !== e.to);\n\tconst outbound = /* @__PURE__ */ new Map();\n\tconst inbound = /* @__PURE__ */ new Map();\n\tfor (const edge of fwdEdges) {\n\t\tconst ob = outbound.get(edge.from);\n\t\tif (ob) ob.push(edge);\n\t\telse outbound.set(edge.from, [edge]);\n\t\tconst ib = inbound.get(edge.to);\n\t\tif (ib) ib.push(edge);\n\t\telse inbound.set(edge.to, [edge]);\n\t}\n\tfor (const list of outbound.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfor (const list of inbound.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst components = [];\n\tlet current = [];\n\tfor (const n of nodes) if (n === null) {\n\t\tif (current.length > 0) components.push(current);\n\t\tcurrent = [];\n\t} else current.push(n);\n\tif (current.length > 0) components.push(current);\n\tconst allNodes = /* @__PURE__ */ new Set();\n\tfor (const n of nodes) if (n !== null) allNodes.add(n);\n\tconst nodeRank = /* @__PURE__ */ new Map();\n\tfor (const n of allNodes) nodeRank.set(n, 0);\n\tfor (let pass = 0; pass < allNodes.size; pass++) {\n\t\tlet changed = false;\n\t\tfor (const [from, es] of outbound) {\n\t\t\tconst base = nodeRank.get(from) ?? 0;\n\t\t\tfor (const e of es) {\n\t\t\t\tconst next = base + 1;\n\t\t\t\tif (next > (nodeRank.get(e.to) ?? 0)) {\n\t\t\t\t\tnodeRank.set(e.to, next);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tconst nodeLane = /* @__PURE__ */ new Map();\n\tconst edgeLane = /* @__PURE__ */ new Map();\n\tlet totalLanes = 0;\n\tfor (const componentNodes of components) {\n\t\tconst componentSet = new Set(componentNodes);\n\t\tlet nextLane = 0;\n\t\tconst roots = [];\n\t\tfor (const n of componentNodes) if ((inbound.get(n) ?? []).length === 0) roots.push(n);\n\t\troots.sort((a, b) => {\n\t\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\t\treturn a.localeCompare(b);\n\t\t});\n\t\tconst bfsQueue = [];\n\t\tfor (const root of roots) if (!nodeLane.has(root)) {\n\t\t\tnodeLane.set(root, nextLane++);\n\t\t\tbfsQueue.push({\n\t\t\t\tnode: root,\n\t\t\t\tlane: nodeLane.get(root)\n\t\t\t});\n\t\t}\n\t\tlet head = 0;\n\t\twhile (head < bfsQueue.length) {\n\t\t\tconst { node, lane } = bfsQueue[head++];\n\t\t\tconst children = outbound.get(node) ?? [];\n\t\t\tlet first = true;\n\t\t\tfor (const childEdge of children) {\n\t\t\t\tconst child = childEdge.to;\n\t\t\t\tif (!componentSet.has(child)) continue;\n\t\t\t\tif (!nodeLane.has(child)) {\n\t\t\t\t\tconst childLane = first ? lane : nextLane++;\n\t\t\t\t\tnodeLane.set(child, childLane);\n\t\t\t\t\tbfsQueue.push({\n\t\t\t\t\t\tnode: child,\n\t\t\t\t\t\tlane: childLane\n\t\t\t\t\t});\n\t\t\t\t\tedgeLane.set(childEdge.migrationHash, childLane);\n\t\t\t\t} else edgeLane.set(childEdge.migrationHash, Math.max(lane, nodeLane.get(child)));\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t}\n\t\tfor (const n of componentNodes) if (!nodeLane.has(n)) nodeLane.set(n, nextLane++);\n\t\tfor (const n of componentNodes) {\n\t\t\tconst parents = inbound.get(n);\n\t\t\tif (!parents || parents.length <= 1) continue;\n\t\t\tlet trunkParent = parents[0].from;\n\t\t\tlet trunkRank = nodeRank.get(trunkParent) ?? 0;\n\t\t\tlet trunkLane = nodeLane.get(trunkParent) ?? 0;\n\t\t\tfor (let i = 1; i < parents.length; i++) {\n\t\t\t\tconst parent = parents[i].from;\n\t\t\t\tconst rank = nodeRank.get(parent) ?? 0;\n\t\t\t\tconst lane = nodeLane.get(parent) ?? 0;\n\t\t\t\tif (rank > trunkRank || rank === trunkRank && lane < trunkLane) {\n\t\t\t\t\ttrunkParent = parent;\n\t\t\t\t\ttrunkRank = rank;\n\t\t\t\t\ttrunkLane = lane;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst trunkParentLane = nodeLane.get(trunkParent) ?? 0;\n\t\t\tconst currentNodeLane = nodeLane.get(n) ?? 0;\n\t\t\tif (currentNodeLane === trunkParentLane) continue;\n\t\t\tnodeLane.set(n, trunkParentLane);\n\t\t\tfor (const parentEdge of parents) if (parentEdge.from === trunkParent) edgeLane.set(parentEdge.migrationHash, trunkParentLane);\n\t\t\tconst bfsDescendants = [n];\n\t\t\tlet descHead = 0;\n\t\t\twhile (descHead < bfsDescendants.length) {\n\t\t\t\tconst current = bfsDescendants[descHead++];\n\t\t\t\tconst children = outbound.get(current) ?? [];\n\t\t\t\tfor (const childEdge of children) {\n\t\t\t\t\tconst child = childEdge.to;\n\t\t\t\t\tif (!componentSet.has(child)) continue;\n\t\t\t\t\tif ((nodeLane.get(child) ?? 0) !== currentNodeLane) continue;\n\t\t\t\t\tnodeLane.set(child, trunkParentLane);\n\t\t\t\t\tconst existingEdgeLane = edgeLane.get(childEdge.migrationHash);\n\t\t\t\t\tif (existingEdgeLane !== void 0 && existingEdgeLane === currentNodeLane) edgeLane.set(childEdge.migrationHash, trunkParentLane);\n\t\t\t\t\tbfsDescendants.push(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (nextLane > totalLanes) totalLanes = nextLane;\n\t}\n\treturn {\n\t\tnodeLane,\n\t\tnodeRank,\n\t\tedgeLane,\n\t\tnumLanes: totalLanes\n\t};\n}\nfunction computeDisplayOrder(nodes, nodeLane, nodeRank) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tconst result = [];\n\tlet componentBuffer = [];\n\tfunction flushComponent() {\n\t\tcomponentBuffer.sort((a, b) => b.rank - a.rank || a.lane - b.lane);\n\t\tfor (const d of componentBuffer) result.push(d);\n\t\tcomponentBuffer = [];\n\t}\n\tfor (const n of nodes) {\n\t\tif (n === null) {\n\t\t\tflushComponent();\n\t\t\tresult.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.has(n)) continue;\n\t\tseen.add(n);\n\t\tcomponentBuffer.push({\n\t\t\thash: n,\n\t\t\tlane: nodeLane.get(n) ?? 0,\n\t\t\trank: nodeRank.get(n) ?? 0\n\t\t});\n\t}\n\tflushComponent();\n\treturn result;\n}\n/** Create an empty cell. */\nfunction emptyCell() {\n\treturn { lines: [] };\n}\nfunction buildGrid(rowModel, opts = {}, highlight = {\n\tmode: \"flat\",\n\tonPath: /* @__PURE__ */ new Set()\n}) {\n\tconst colsPerLane = opts.colsPerLane ?? 2;\n\tconst isFocus = highlight.mode === \"focus\";\n\tconst { nodeLane, nodeRank, edgeLane, numLanes } = buildLaneAssignment(rowModel.nodes, rowModel.edges);\n\tconst displayOrder = computeDisplayOrder(rowModel.nodes, nodeLane, nodeRank);\n\tconst displayIndex = /* @__PURE__ */ new Map();\n\tlet nodeIdx = 0;\n\tfor (const d of displayOrder) if (d !== null) displayIndex.set(d.hash, nodeIdx++);\n\tconst rollbackEdges = rowModel.edges.filter((e) => e.kind === \"rollback\" && e.from !== e.to);\n\tconst adjacentRollbacks = [];\n\tconst skippingRollbacks = [];\n\tfor (const e of rollbackEdges) {\n\t\tconst si = displayIndex.get(e.from);\n\t\tconst ti = displayIndex.get(e.to);\n\t\tif (si === void 0 || ti === void 0) continue;\n\t\tif (ti === si + 1) adjacentRollbacks.push(e);\n\t\telse skippingRollbacks.push(e);\n\t}\n\tconst targetGroups = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst group = targetGroups.get(e.to);\n\t\tif (group) group.push(e);\n\t\telse targetGroups.set(e.to, [e]);\n\t}\n\tconst sortedTargetKeys = [...targetGroups.keys()].sort((a, b) => {\n\t\tconst ta = displayIndex.get(a) ?? 0;\n\t\treturn (displayIndex.get(b) ?? 0) - ta;\n\t});\n\tconst numTargetGroups = sortedTargetKeys.length;\n\tconst geomLaneOf = /* @__PURE__ */ new Map();\n\tconst outermostGroup = numLanes + numTargetGroups - 1;\n\tsortedTargetKeys.forEach((targetHash, i) => {\n\t\tconst groupGeomLane = outermostGroup - i;\n\t\tfor (const e of targetGroups.get(targetHash)) geomLaneOf.set(e.migrationHash, groupGeomLane);\n\t});\n\tconst totalDisplayNodes = displayOrder.filter((d) => d !== null).length;\n\tconst planeLaneOf = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst si = displayIndex.get(e.from) ?? 0;\n\t\tplaneLaneOf.set(e.migrationHash, totalDisplayNodes - si);\n\t}\n\tconst PALETTE_SIZE = 6;\n\tconst GREEN_PALETTE_IDX = 5;\n\tconst arcSourceIndex = /* @__PURE__ */ new Map();\n\tconst arcTargetIndex = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tarcSourceIndex.set(e.migrationHash, displayIndex.get(e.from) ?? 0);\n\t\tarcTargetIndex.set(e.migrationHash, displayIndex.get(e.to) ?? 0);\n\t}\n\tconst arcsByTarget = /* @__PURE__ */ new Map();\n\tconst arcsBySource = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst tb = arcsByTarget.get(e.to);\n\t\tif (tb) tb.push(e);\n\t\telse arcsByTarget.set(e.to, [e]);\n\t\tconst sb = arcsBySource.get(e.from);\n\t\tif (sb) sb.push(e);\n\t\telse arcsBySource.set(e.from, [e]);\n\t}\n\tconst colourLaneOf = /* @__PURE__ */ new Map();\n\tconst activeArcColours = /* @__PURE__ */ new Map();\n\tconst activeFwdLaneColours = /* @__PURE__ */ new Set();\n\tfor (let i = displayOrder.length - 1; i >= 0; i--) {\n\t\tconst nd = displayOrder[i];\n\t\tif (nd === null || nd === void 0) continue;\n\t\tconst { hash: nodeHash } = nd;\n\t\tconst nodeFwdLane = nodeLane.get(nodeHash) ?? 0;\n\t\tactiveFwdLaneColours.add(nodeFwdLane % PALETTE_SIZE);\n\t\tconst sortedIncoming = [...arcsByTarget.get(nodeHash) ?? []].sort((a, b) => a.dirName.localeCompare(b.dirName));\n\t\tfor (const arc of sortedIncoming) {\n\t\t\tconst originLaneColour = (nodeLane.get(arc.from) ?? 0) % PALETTE_SIZE;\n\t\t\tconst occupied = new Set(activeFwdLaneColours);\n\t\t\tfor (const c of activeArcColours.values()) occupied.add(c);\n\t\t\toccupied.add(GREEN_PALETTE_IDX);\n\t\t\toccupied.add(originLaneColour);\n\t\t\tlet chosen = -1;\n\t\t\tfor (let ci = 0; ci < PALETTE_SIZE; ci++) if (!occupied.has(ci)) {\n\t\t\t\tchosen = ci;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (chosen === -1) {\n\t\t\t\tfor (let ci = 0; ci < PALETTE_SIZE; ci++) if (ci !== GREEN_PALETTE_IDX) {\n\t\t\t\t\tchosen = ci;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolourLaneOf.set(arc.migrationHash, chosen === -1 ? 0 : chosen);\n\t\t\tactiveArcColours.set(arc.migrationHash, chosen === -1 ? 0 : chosen);\n\t\t}\n\t\tfor (const arc of arcsBySource.get(nodeHash) ?? []) activeArcColours.delete(arc.migrationHash);\n\t}\n\tconst routedBackArcs = skippingRollbacks.map((e) => ({\n\t\tedge: e,\n\t\tsourceIndex: displayIndex.get(e.from) ?? 0,\n\t\ttargetIndex: displayIndex.get(e.to) ?? 0,\n\t\tgeomLane: geomLaneOf.get(e.migrationHash) ?? numLanes,\n\t\tcolourLane: colourLaneOf.get(e.migrationHash) ?? 0,\n\t\tplaneLane: planeLaneOf.get(e.migrationHash) ?? numLanes\n\t}));\n\tconst backArcsBySource = /* @__PURE__ */ new Map();\n\tconst backArcsByTarget = /* @__PURE__ */ new Map();\n\tfor (const arc of routedBackArcs) {\n\t\tconst sb = backArcsBySource.get(arc.edge.from);\n\t\tif (sb) sb.push(arc);\n\t\telse backArcsBySource.set(arc.edge.from, [arc]);\n\t\tconst tb = backArcsByTarget.get(arc.edge.to);\n\t\tif (tb) tb.push(arc);\n\t\telse backArcsByTarget.set(arc.edge.to, [arc]);\n\t}\n\tconst adjacentBySource = /* @__PURE__ */ new Map();\n\tconst adjacentByTarget = /* @__PURE__ */ new Map();\n\tfor (const e of adjacentRollbacks) {\n\t\tconst b = adjacentBySource.get(e.from);\n\t\tif (b) b.push(e);\n\t\telse adjacentBySource.set(e.from, [e]);\n\t\tconst t = adjacentByTarget.get(e.to);\n\t\tif (t) t.push(e);\n\t\telse adjacentByTarget.set(e.to, [e]);\n\t}\n\tfor (const list of adjacentBySource.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst totalCols = (numLanes + numTargetGroups) * colsPerLane;\n\tconst fwdEdges = rowModel.edges.filter((e) => e.kind === \"forward\" && e.from !== e.to);\n\tconst selfEdges = rowModel.edges.filter((e) => e.kind === \"self\");\n\tconst outboundFwd = /* @__PURE__ */ new Map();\n\tconst inboundFwd = /* @__PURE__ */ new Map();\n\tfor (const e of fwdEdges) {\n\t\tconst ob = outboundFwd.get(e.from);\n\t\tif (ob) ob.push(e);\n\t\telse outboundFwd.set(e.from, [e]);\n\t\tconst ib = inboundFwd.get(e.to);\n\t\tif (ib) ib.push(e);\n\t\telse inboundFwd.set(e.to, [e]);\n\t}\n\tfor (const list of outboundFwd.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfor (const list of inboundFwd.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst selfEdgesByNode = /* @__PURE__ */ new Map();\n\tfor (const e of selfEdges) {\n\t\tconst bucket = selfEdgesByNode.get(e.from);\n\t\tif (bucket) bucket.push(e);\n\t\telse selfEdgesByNode.set(e.from, [e]);\n\t}\n\tfor (const list of selfEdgesByNode.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfunction roleOf(migrationHash) {\n\t\tif (!isFocus) return void 0;\n\t\treturn highlight.onPath.has(migrationHash) ? \"on-path\" : \"off-path\";\n\t}\n\tconst onPathNodes = /* @__PURE__ */ new Set();\n\tif (isFocus) {\n\t\tfor (const e of [\n\t\t\t...fwdEdges,\n\t\t\t...selfEdges,\n\t\t\t...rollbackEdges\n\t\t]) if (highlight.onPath.has(e.migrationHash)) {\n\t\t\tonPathNodes.add(e.from);\n\t\t\tonPathNodes.add(e.to);\n\t\t}\n\t}\n\tfunction nodeRoleOf(hash) {\n\t\tif (!isFocus) return void 0;\n\t\treturn onPathNodes.has(hash) ? \"on-path\" : \"off-path\";\n\t}\n\tfunction planeOf(lane, role) {\n\t\tif (!isFocus) return lane;\n\t\treturn role === \"on-path\" ? 0 : lane + 1;\n\t}\n\tfunction lineRefFor(edge, lane) {\n\t\treturn {\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tdirName: edge.dirName,\n\t\t\tlane,\n\t\t\trole: roleOf(edge.migrationHash)\n\t\t};\n\t}\n\t/** Synthetic LineRef for a lane carrying a representative edge's role (pass-through). */\n\tfunction passLineRef(lane, dirName, migHash) {\n\t\treturn {\n\t\t\tmigrationHash: migHash,\n\t\t\tdirName,\n\t\t\tlane,\n\t\t\trole: roleOf(migHash)\n\t\t};\n\t}\n\tfunction vertCell(line) {\n\t\treturn { lines: [{\n\t\t\tline,\n\t\t\tdirections: /* @__PURE__ */ new Set([\"up\", \"down\"]),\n\t\t\tplane: planeOf(line.lane, line.role)\n\t\t}] };\n\t}\n\tfunction dirCell(line, dirs) {\n\t\treturn { lines: [{\n\t\t\tline,\n\t\t\tdirections: dirs,\n\t\t\tplane: planeOf(line.lane, line.role)\n\t\t}] };\n\t}\n\tfunction nodeCell(nodeRef) {\n\t\treturn {\n\t\t\tnode: nodeRef,\n\t\t\tlines: []\n\t\t};\n\t}\n\tconst laneCurrentEdge = /* @__PURE__ */ new Map();\n\tfunction getRepLine(lane) {\n\t\tconst e = laneCurrentEdge.get(lane);\n\t\tif (e) return lineRefFor(e, lane);\n\t\treturn passLineRef(lane, `lane${lane}`, `lane${lane}`);\n\t}\n\tconst activeLanes = /* @__PURE__ */ new Set();\n\tconst grid = [];\n\tfunction makeRow() {\n\t\treturn Array.from({ length: totalCols }, () => emptyCell());\n\t}\n\tfunction placeVerticals(row, skip) {\n\t\tfor (const lane of activeLanes) {\n\t\t\tif (skip.has(lane)) continue;\n\t\t\tconst railCol = lane * colsPerLane;\n\t\t\tconst cell = row[railCol];\n\t\t\tif (cell !== void 0 && cell.lines.length === 0 && !cell.node) row[railCol] = vertCell(getRepLine(lane));\n\t\t}\n\t}\n\tconst activeBackArcs = /* @__PURE__ */ new Set();\n\tfunction backArcLine(arc) {\n\t\treturn {\n\t\t\tmigrationHash: arc.edge.migrationHash,\n\t\t\tdirName: arc.edge.dirName,\n\t\t\tlane: arc.colourLane,\n\t\t\trole: roleOf(arc.edge.migrationHash)\n\t\t};\n\t}\n\tfunction backArcPlane(arc) {\n\t\tconst role = roleOf(arc.edge.migrationHash);\n\t\tif (!isFocus) return arc.planeLane;\n\t\treturn role === \"on-path\" ? 0 : arc.planeLane + 1;\n\t}\n\tfunction composeLine(row, col, line, dirs, plane, extra) {\n\t\tconst existing = row[col];\n\t\tconst cellLine = {\n\t\t\tline,\n\t\t\tdirections: dirs,\n\t\t\tplane,\n\t\t\t...extra?.landingArrow ? { landingArrow: true } : {}\n\t\t};\n\t\tif (existing && (existing.lines.length > 0 || existing.node)) row[col] = {\n\t\t\t...existing,\n\t\t\tlines: [...existing.lines, cellLine]\n\t\t};\n\t\telse row[col] = { lines: [cellLine] };\n\t}\n\tfunction placeBackVerticals(row) {\n\t\tfor (const arc of activeBackArcs) composeLine(row, arc.geomLane * colsPerLane, backArcLine(arc), /* @__PURE__ */ new Set([\"up\", \"down\"]), backArcPlane(arc));\n\t\tplaceAdjacentOverlays(row);\n\t}\n\tconst activeAdjacent = /* @__PURE__ */ new Set();\n\tfunction placeAdjacentOverlays(row) {\n\t\tfor (const adj of activeAdjacent) {\n\t\t\tconst railCol = adj.lane * colsPerLane;\n\t\t\tif (row[railCol]?.node) continue;\n\t\t\tconst line = lineRefFor(adj.edge, adj.lane);\n\t\t\tcomposeLine(row, railCol, line, /* @__PURE__ */ new Set([\"up\", \"down\"]), planeOf(adj.lane, line.role));\n\t\t}\n\t}\n\tfunction emitBackArcTee(row, nodeLaneNum, arc) {\n\t\tconst nodeRail = nodeLaneNum * colsPerLane;\n\t\tconst geomRail = arc.geomLane * colsPerLane;\n\t\tconst line = backArcLine(arc);\n\t\tconst plane = backArcPlane(arc);\n\t\tfor (let col = nodeRail + 1; col < geomRail; col++) composeLine(row, col, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane);\n\t\tcomposeLine(row, geomRail, line, /* @__PURE__ */ new Set([\"down\", \"left\"]), plane);\n\t}\n\tfunction emitBackArcLanding(row, nodeLaneNum, arc) {\n\t\tconst nodeRail = nodeLaneNum * colsPerLane;\n\t\tconst geomRail = arc.geomLane * colsPerLane;\n\t\tconst line = backArcLine(arc);\n\t\tconst plane = backArcPlane(arc);\n\t\tcomposeLine(row, nodeRail + 1, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane, { landingArrow: true });\n\t\tfor (let col = nodeRail + 2; col < geomRail; col++) composeLine(row, col, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane);\n\t\tcomposeLine(row, geomRail, line, /* @__PURE__ */ new Set([\"up\", \"left\"]), plane);\n\t}\n\tfunction emitConnectorRow(trunkLane, branchEntries, connectorType, trunkEdge) {\n\t\tconst row = makeRow();\n\t\tconst sorted = [...branchEntries].sort((a, b) => a.lane - b.lane);\n\t\tif (sorted.length === 0) return row;\n\t\tconst branchByLane = /* @__PURE__ */ new Map();\n\t\tfor (const b of sorted) branchByLane.set(b.lane, b.edge);\n\t\tlet continuousLane = trunkLane;\n\t\tif (isFocus) if (trunkEdge && highlight.onPath.has(trunkEdge.migrationHash)) continuousLane = trunkLane;\n\t\telse {\n\t\t\tconst onPathBranch = sorted.find((b) => highlight.onPath.has(b.edge.migrationHash));\n\t\t\tif (onPathBranch) continuousLane = onPathBranch.lane;\n\t\t}\n\t\tconst trunkRailCol = trunkLane * colsPerLane;\n\t\tconst continuousRailCol = continuousLane * colsPerLane;\n\t\tfunction addLine(col, line, dirs) {\n\t\t\tconst existing = row[col];\n\t\t\tconst cellLine = {\n\t\t\t\tline,\n\t\t\t\tdirections: dirs,\n\t\t\t\tplane: planeOf(line.lane, line.role)\n\t\t\t};\n\t\t\trow[col] = existing && existing.lines.length > 0 ? {\n\t\t\t\t...existing,\n\t\t\t\tlines: [...existing.lines, cellLine]\n\t\t\t} : { lines: [cellLine] };\n\t\t}\n\t\tconst cornerLeftDown = connectorType === \"merge\" ? /* @__PURE__ */ new Set([\"left\", \"down\"]) : /* @__PURE__ */ new Set([\"left\", \"up\"]);\n\t\tfor (let i = 0; i < sorted.length; i++) {\n\t\t\tconst b = sorted[i];\n\t\t\tif (b.lane === continuousLane) continue;\n\t\t\tconst branchLine = lineRefFor(b.edge, b.lane);\n\t\t\tconst railCol = b.lane * colsPerLane;\n\t\t\taddLine(railCol, branchLine, cornerLeftDown);\n\t\t\tconst leftBound = i === 0 ? trunkRailCol + 1 : sorted[i - 1].lane * colsPerLane + 1;\n\t\t\tfor (let col = leftBound; col < railCol; col++) addLine(col, branchLine, /* @__PURE__ */ new Set([\"left\", \"right\"]));\n\t\t}\n\t\tconst continuousLine = continuousLane === trunkLane ? trunkEdge ? lineRefFor(trunkEdge, trunkLane) : getRepLine(trunkLane) : lineRefFor(branchByLane.get(continuousLane), continuousLane);\n\t\tif (continuousLane === trunkLane) addLine(trunkRailCol, continuousLine, /* @__PURE__ */ new Set([\"up\", \"down\"]));\n\t\telse {\n\t\t\taddLine(trunkRailCol, continuousLine, connectorType === \"merge\" ? /* @__PURE__ */ new Set([\"up\", \"right\"]) : /* @__PURE__ */ new Set([\"down\", \"right\"]));\n\t\t\tfor (let col = trunkRailCol + 1; col < continuousRailCol; col++) addLine(col, continuousLine, /* @__PURE__ */ new Set([\"left\", \"right\"]));\n\t\t\taddLine(continuousRailCol, continuousLine, cornerLeftDown);\n\t\t}\n\t\tplaceVerticals(row, /* @__PURE__ */ new Set([trunkLane, ...sorted.map((b) => b.lane)]));\n\t\tplaceBackVerticals(row);\n\t\treturn row;\n\t}\n\tfor (const nodeDisplay of displayOrder) {\n\t\tif (nodeDisplay === null) {\n\t\t\tconst sepRow = makeRow();\n\t\t\tsepRow[0] = {\n\t\t\t\tlines: [],\n\t\t\t\tseparator: true\n\t\t\t};\n\t\t\tgrid.push(sepRow);\n\t\t\tcontinue;\n\t\t}\n\t\tconst { hash: nodeHash } = nodeDisplay;\n\t\tconst nodeLaneNum = nodeLane.get(nodeHash) ?? 0;\n\t\tactiveLanes.add(nodeLaneNum);\n\t\tconst outEdges = outboundFwd.get(nodeHash) ?? [];\n\t\tif (outEdges.length > 1) {\n\t\t\tconst trunkEdgeForFork = outEdges[0];\n\t\t\tconst trunkChildLane = edgeLane.get(trunkEdgeForFork.migrationHash) ?? nodeLane.get(trunkEdgeForFork.to) ?? nodeLaneNum;\n\t\t\tconst branchEntries = outEdges.slice(1).map((e) => ({\n\t\t\t\tlane: edgeLane.get(e.migrationHash) ?? nodeLane.get(e.to) ?? 0,\n\t\t\t\tedge: e\n\t\t\t})).filter((b) => b.lane !== trunkChildLane && activeLanes.has(b.lane));\n\t\t\tif (branchEntries.length > 0) {\n\t\t\t\tconst trunkEdge = outEdges[0];\n\t\t\t\tconst connRow = emitConnectorRow(nodeLaneNum, branchEntries, \"fork\", trunkEdge);\n\t\t\t\tgrid.push(connRow);\n\t\t\t\tassertSingleOwner(connRow, isFocus);\n\t\t\t\tfor (const b of branchEntries) activeLanes.delete(b.lane);\n\t\t\t}\n\t\t}\n\t\tconst selfMigrations = selfEdgesByNode.get(nodeHash) ?? [];\n\t\tfor (const selfEdge of selfMigrations) {\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = nodeLaneNum * colsPerLane;\n\t\t\tconst connCol = nodeLaneNum * colsPerLane + 1;\n\t\t\tconst line = lineRefFor(selfEdge, nodeLaneNum);\n\t\t\trow[railCol] = vertCell(line);\n\t\t\trow[connCol] = { lines: [{\n\t\t\t\tline,\n\t\t\t\tdirections: /* @__PURE__ */ new Set(),\n\t\t\t\tplane: planeOf(nodeLaneNum, line.role),\n\t\t\t\tselfLoop: true\n\t\t\t}] };\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([nodeLaneNum]));\n\t\t\tplaceBackVerticals(row);\n\t\t\tgrid.push(row);\n\t\t}\n\t\t{\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = nodeLaneNum * colsPerLane;\n\t\t\trow[railCol] = nodeCell({\n\t\t\t\tcontractHash: nodeHash,\n\t\t\t\tisEmpty: nodeHash === EMPTY_CONTRACT_HASH,\n\t\t\t\tlane: nodeLaneNum,\n\t\t\t\trole: nodeRoleOf(nodeHash)\n\t\t\t});\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([nodeLaneNum]));\n\t\t\tconst landingArcs = backArcsByTarget.get(nodeHash) ?? [];\n\t\t\tfor (const arc of landingArcs) activeBackArcs.delete(arc);\n\t\t\tfor (const adj of [...activeAdjacent]) if (adj.edge.to === nodeHash) activeAdjacent.delete(adj);\n\t\t\tplaceBackVerticals(row);\n\t\t\tfor (const arc of landingArcs) emitBackArcLanding(row, nodeLaneNum, arc);\n\t\t\tconst teeArcs = backArcsBySource.get(nodeHash) ?? [];\n\t\t\tfor (const arc of teeArcs) emitBackArcTee(row, nodeLaneNum, arc);\n\t\t\tgrid.push(row);\n\t\t\tfor (const arc of teeArcs) activeBackArcs.add(arc);\n\t\t\tfor (const adj of adjacentBySource.get(nodeHash) ?? []) activeAdjacent.add({\n\t\t\t\tlane: nodeLaneNum,\n\t\t\t\tedge: adj\n\t\t\t});\n\t\t}\n\t\tfunction edgeLaneFor(edge) {\n\t\t\tconst override = edgeLane.get(edge.migrationHash);\n\t\t\tif (override !== void 0) return override;\n\t\t\treturn Math.max(nodeLane.get(edge.from) ?? 0, nodeLane.get(edge.to) ?? 0);\n\t\t}\n\t\tconst inEdges = inboundFwd.get(nodeHash) ?? [];\n\t\tinEdges.sort((a, b) => {\n\t\t\tconst aLane = edgeLaneFor(a);\n\t\t\tconst bLane = edgeLaneFor(b);\n\t\t\tif (aLane !== bLane) return aLane - bLane;\n\t\t\treturn a.dirName.localeCompare(b.dirName);\n\t\t});\n\t\tfor (const edge of inEdges) laneCurrentEdge.set(edgeLaneFor(edge), edge);\n\t\t{\n\t\t\tconst teeArcs = backArcsBySource.get(nodeHash) ?? [];\n\t\t\tfor (const arc of teeArcs) {\n\t\t\t\tconst row = makeRow();\n\t\t\t\tconst railCol = arc.geomLane * colsPerLane;\n\t\t\t\tconst connCol = railCol + 1;\n\t\t\t\tconst line = backArcLine(arc);\n\t\t\t\tconst plane = backArcPlane(arc);\n\t\t\t\tcomposeLine(row, railCol, line, /* @__PURE__ */ new Set([\"up\", \"down\"]), plane);\n\t\t\t\tcomposeLine(row, connCol, line, /* @__PURE__ */ new Set([\"down\"]), plane);\n\t\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set());\n\t\t\t\tplaceBackVerticals(row);\n\t\t\t\tgrid.push(row);\n\t\t\t}\n\t\t}\n\t\tif (inEdges.length > 1) {\n\t\t\tconst branchEntries = inEdges.slice(1).map((e) => ({\n\t\t\t\tlane: edgeLaneFor(e),\n\t\t\t\tedge: e\n\t\t\t}));\n\t\t\tconst trunkEdge = inEdges[0];\n\t\t\tconst connRow = emitConnectorRow(nodeLaneNum, branchEntries, \"merge\", trunkEdge);\n\t\t\tgrid.push(connRow);\n\t\t\tassertSingleOwner(connRow, isFocus);\n\t\t\tfor (const b of branchEntries) activeLanes.add(b.lane);\n\t\t}\n\t\tfor (const edge of inEdges) {\n\t\t\tconst eLane = edgeLaneFor(edge);\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = eLane * colsPerLane;\n\t\t\tconst connCol = eLane * colsPerLane + 1;\n\t\t\tconst line = lineRefFor(edge, eLane);\n\t\t\trow[railCol] = vertCell(line);\n\t\t\trow[connCol] = dirCell(line, /* @__PURE__ */ new Set([\"up\"]));\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([eLane]));\n\t\t\tplaceBackVerticals(row);\n\t\t\tgrid.push(row);\n\t\t}\n\t\t{\n\t\t\tconst adjacents = adjacentBySource.get(nodeHash) ?? [];\n\t\t\tfor (const adj of adjacents) {\n\t\t\t\tconst row = makeRow();\n\t\t\t\tconst connCol = nodeLaneNum * colsPerLane + 1;\n\t\t\t\tconst line = lineRefFor(adj, nodeLaneNum);\n\t\t\t\tconst plane = planeOf(nodeLaneNum, line.role);\n\t\t\t\tcomposeLine(row, connCol, line, /* @__PURE__ */ new Set([\"down\"]), plane);\n\t\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set());\n\t\t\t\tplaceBackVerticals(row);\n\t\t\t\tgrid.push(row);\n\t\t\t}\n\t\t}\n\t\tif (inEdges.length === 0) activeLanes.delete(nodeLaneNum);\n\t}\n\treturn grid;\n}\nfunction assertSingleOwner(row, isFocus) {\n\tfor (const cell of row) {\n\t\tif (cell.lines.length <= 1) continue;\n\t\tlet topPlane = Number.POSITIVE_INFINITY;\n\t\tfor (const cl of cell.lines) if (cl.plane < topPlane) topPlane = cl.plane;\n\t\tconst top = cell.lines.filter((cl) => cl.plane === topPlane);\n\t\tif (top.length > 1) {\n\t\t\tif (isFocus) {\n\t\t\t\tif (new Set(top.map((cl) => cl.line.role)).size > 1) throw new InternalError(\"migration-graph layout: single-owner invariant violated — two differently-roled lines share the top plane in one cell\");\n\t\t\t}\n\t\t}\n\t}\n}\n//#endregion\n//#region src/utils/formatters/migration-list-graph-topology.ts\nfunction compareDirNameDesc(a, b) {\n\treturn b.dirName.localeCompare(a.dirName);\n}\nfunction bumpDegree(map, key) {\n\tmap.set(key, (map.get(key) ?? 0) + 1);\n}\nfunction compareNodesRootFirst(a, b) {\n\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\treturn a.localeCompare(b);\n}\n/**\n* Shortest-path distance of each node from the forward roots, over the given\n* candidate edges. Roots are the in-degree-0 nodes (baseline first, then lex);\n* a rooted component therefore distances every node by how many forward steps\n* it sits from a root. A component with no root (a pure cycle) is seeded from\n* its single lexically-smallest node so the cycle still gets a stable layering.\n*\n* Crucially this is *shortest* path, not longest: a backward (rollback) edge\n* `deep → shallow` never offers a shorter route to the already-shallower\n* target, so it is inert here. Distances are thus stable whether or not the\n* rollbacks are still in the candidate set — which is what lets the peel below\n* tell a genuine back-edge (target strictly shallower than source) apart from a\n* forward edge that merely happens to share the back-edge's cycle.\n*/\nfunction forwardDistances(nodes, candidates) {\n\tconst inDegree = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) inDegree.set(node, 0);\n\tfor (const edge of candidates) bumpDegree(inDegree, edge.to);\n\tconst roots = [...nodes].filter((node) => (inDegree.get(node) ?? 0) === 0);\n\troots.sort(compareNodesRootFirst);\n\tconst seeds = roots.length > 0 ? roots : [...nodes].sort(compareNodesRootFirst).slice(0, 1);\n\tconst dist = /* @__PURE__ */ new Map();\n\tfor (const seed of seeds) dist.set(seed, 0);\n\tconst maxPasses = nodes.size;\n\tfor (let pass = 0; pass < maxPasses; pass++) {\n\t\tlet changed = false;\n\t\tfor (const edge of candidates) {\n\t\t\tconst base = dist.get(edge.from);\n\t\t\tif (base === void 0) continue;\n\t\t\tconst next = base + 1;\n\t\t\tif (next < (dist.get(edge.to) ?? Number.POSITIVE_INFINITY)) {\n\t\t\t\tdist.set(edge.to, next);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tfor (const node of nodes) if (!dist.has(node)) dist.set(node, 0);\n\treturn dist;\n}\nfunction canReachForward(start, goal, candidates) {\n\tif (start === goal) return true;\n\tconst outgoing = /* @__PURE__ */ new Map();\n\tfor (const edge of candidates) {\n\t\tconst bucket = outgoing.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t\telse outgoing.set(edge.from, [edge.to]);\n\t}\n\tconst visited = /* @__PURE__ */ new Set([start]);\n\tconst queue = [start];\n\twhile (queue.length > 0) {\n\t\tconst node = queue.shift();\n\t\tif (node === void 0) continue;\n\t\tfor (const next of outgoing.get(node) ?? []) {\n\t\t\tif (next === goal) return true;\n\t\t\tif (!visited.has(next)) {\n\t\t\t\tvisited.add(next);\n\t\t\t\tqueue.push(next);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n/**\n* Demote node-skipping rollbacks left forward by the DFS. An edge `from → to`\n* is a rollback exactly when both hold:\n* 1. `to` is a forward-ancestor of `from` — `to` can still reach `from` over\n* the other forward edges, so the edge closes a cycle; and\n* 2. `to` is strictly shallower than `from` (smaller forward distance) — the\n* edge points back toward the root rather than advancing history.\n*\n* Condition 2 is the discriminator: in a cycle created by a rollback every edge\n* satisfies condition 1, but only the rollback itself runs deep → shallow. The\n* forward chain edges run shallow → deep and are never peeled, however many\n* rollbacks converge on the same target. Tight back-edges whose source and\n* target sit at the same distance (mutual two-node cycles) are already resolved\n* by the DFS immediate-parent rule, so they never reach this pass. One edge is\n* peeled per iteration (dirName-descending tie-break) and distances/reachability\n* are recomputed, making the outcome independent of edge input order.\n*/\nfunction peelNodeSkippingRollbacks(nodes, kindByMigrationHash, nonSelf) {\n\tlet candidates = nonSelf.filter((edge) => kindByMigrationHash.get(edge.hash) === \"forward\");\n\twhile (candidates.length > 0) {\n\t\tconst dist = forwardDistances(nodes, candidates);\n\t\tconst backEdges = candidates.filter((edge) => {\n\t\t\tif ((dist.get(edge.to) ?? 0) >= (dist.get(edge.from) ?? 0)) return false;\n\t\t\tconst without = candidates.filter((candidate) => candidate !== edge);\n\t\t\treturn canReachForward(edge.to, edge.from, without);\n\t\t});\n\t\tif (backEdges.length === 0) break;\n\t\tbackEdges.sort(compareDirNameDesc);\n\t\tconst rollback = backEdges[0];\n\t\tif (rollback === void 0) break;\n\t\tkindByMigrationHash.set(rollback.hash, \"rollback\");\n\t\tcandidates = candidates.filter((edge) => edge !== rollback);\n\t}\n}\n/**\n* DFS with dirName-descending traversal. A GRAY target is a rollback only when it\n* is the immediate DFS parent of the source — cross-links to other GRAY nodes\n* stay forward. A follow-up peel pass demotes node-skipping rollbacks (target is\n* a forward-ancestor of the source and sits strictly shallower than it).\n*/\nfunction classifyNormalizedEdges(edges) {\n\tconst nodes = /* @__PURE__ */ new Set();\n\tconst kindByMigrationHash = /* @__PURE__ */ new Map();\n\tconst outgoingByFrom = /* @__PURE__ */ new Map();\n\tconst nonSelf = [];\n\tfor (const edge of edges) {\n\t\tnodes.add(edge.from);\n\t\tnodes.add(edge.to);\n\t\tif (edge.from === edge.to) {\n\t\t\tkindByMigrationHash.set(edge.hash, \"self\");\n\t\t\tcontinue;\n\t\t}\n\t\tnonSelf.push(edge);\n\t\tconst bucket = outgoingByFrom.get(edge.from);\n\t\tif (bucket) bucket.push(edge);\n\t\telse outgoingByFrom.set(edge.from, [edge]);\n\t}\n\tfor (const bucket of outgoingByFrom.values()) bucket.sort(compareDirNameDesc);\n\tconst nonSelfInDegree = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) nonSelfInDegree.set(node, 0);\n\tfor (const bucket of outgoingByFrom.values()) for (const edge of bucket) bumpDegree(nonSelfInDegree, edge.to);\n\tconst dfsRoots = [];\n\tfor (const node of nodes) if ((nonSelfInDegree.get(node) ?? 0) === 0) dfsRoots.push(node);\n\tdfsRoots.sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tif (dfsRoots.length === 0) dfsRoots.push(...[...nodes].sort((a, b) => a.localeCompare(b)));\n\tconst WHITE = 0;\n\tconst GRAY = 1;\n\tconst BLACK = 2;\n\tconst color = /* @__PURE__ */ new Map();\n\tconst dfsParent = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) color.set(node, WHITE);\n\tconst stack = [];\n\tfunction isImmediateDfsParent(ancestor, node) {\n\t\treturn dfsParent.get(node) === ancestor;\n\t}\n\tfunction pushFrame(node, parent) {\n\t\tcolor.set(node, GRAY);\n\t\tdfsParent.set(node, parent);\n\t\tstack.push({\n\t\t\tnode,\n\t\t\toutgoing: outgoingByFrom.get(node) ?? [],\n\t\t\tindex: 0\n\t\t});\n\t}\n\tfunction runDfsFrom(root) {\n\t\tif (color.get(root) !== WHITE) return;\n\t\tpushFrame(root, void 0);\n\t\twhile (stack.length > 0) {\n\t\t\tconst frame = stack[stack.length - 1];\n\t\t\tif (frame === void 0) break;\n\t\t\tif (frame.index >= frame.outgoing.length) {\n\t\t\t\tcolor.set(frame.node, BLACK);\n\t\t\t\tstack.pop();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst edge = frame.outgoing[frame.index];\n\t\t\tframe.index += 1;\n\t\t\tif (edge === void 0) continue;\n\t\t\tconst v = edge.to;\n\t\t\tconst vColor = color.get(v);\n\t\t\tif (vColor === GRAY && isImmediateDfsParent(v, frame.node)) kindByMigrationHash.set(edge.hash, \"rollback\");\n\t\t\telse {\n\t\t\t\tkindByMigrationHash.set(edge.hash, \"forward\");\n\t\t\t\tif (vColor === WHITE) pushFrame(v, frame.node);\n\t\t\t}\n\t\t}\n\t}\n\tfor (const root of dfsRoots) runDfsFrom(root);\n\tconst remainingWhite = [...nodes].filter((node) => color.get(node) === WHITE);\n\tremainingWhite.sort((a, b) => a.localeCompare(b));\n\tfor (const root of remainingWhite) runDfsFrom(root);\n\tpeelNodeSkippingRollbacks(nodes, kindByMigrationHash, nonSelf);\n\tconst forwardInDegree = /* @__PURE__ */ new Map();\n\tconst forwardOutDegree = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (kindByMigrationHash.get(edge.hash) !== \"forward\") continue;\n\t\tbumpDegree(forwardOutDegree, edge.from);\n\t\tbumpDegree(forwardInDegree, edge.to);\n\t}\n\treturn {\n\t\tkindByMigrationHash,\n\t\tforwardInDegree,\n\t\tforwardOutDegree\n\t};\n}\n/**\n* Classify forward/rollback/self for a `MigrationGraph` edge set (Tier-3).\n*/\nfunction classifyMigrationGraphTopology(graph) {\n\tconst normalized = [];\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) normalized.push({\n\t\thash: edge.migrationHash,\n\t\tfrom: edge.from,\n\t\tto: edge.to,\n\t\tdirName: edge.dirName\n\t});\n\treturn classifyNormalizedEdges(normalized);\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-rows.ts\n/**\n* Return the weakly-connected components of `graph` as an array of node sets,\n* ordered so the component containing EMPTY_CONTRACT_HASH comes first (if\n* present), with remaining components sorted by their lex-smallest node hash.\n*/\nfunction weaklyConnectedComponents(graph) {\n\tconst visited = /* @__PURE__ */ new Set();\n\tconst adjacency = /* @__PURE__ */ new Map();\n\tfunction addAdjacent(a, b) {\n\t\tconst aList = adjacency.get(a);\n\t\tif (aList) aList.push(b);\n\t\telse adjacency.set(a, [b]);\n\t\tconst bList = adjacency.get(b);\n\t\tif (bList) bList.push(a);\n\t\telse adjacency.set(b, [a]);\n\t}\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) if (edge.from !== edge.to) addAdjacent(edge.from, edge.to);\n\tfor (const node of graph.nodes) if (!adjacency.has(node)) adjacency.set(node, []);\n\tconst components = [];\n\tfunction bfsComponent(start) {\n\t\tconst component = /* @__PURE__ */ new Set();\n\t\tconst queue = [start];\n\t\twhile (queue.length > 0) {\n\t\t\tconst node = queue.shift();\n\t\t\tif (node === void 0 || visited.has(node)) continue;\n\t\t\tvisited.add(node);\n\t\t\tcomponent.add(node);\n\t\t\tfor (const neighbor of adjacency.get(node) ?? []) if (!visited.has(neighbor)) queue.push(neighbor);\n\t\t}\n\t\treturn component;\n\t}\n\tconst allNodes = [...graph.nodes].sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tfor (const node of allNodes) if (!visited.has(node)) components.push(bfsComponent(node));\n\tcomponents.sort((a, b) => {\n\t\tconst aHasEmpty = a.has(EMPTY_CONTRACT_HASH);\n\t\tconst bHasEmpty = b.has(EMPTY_CONTRACT_HASH);\n\t\tif (aHasEmpty && !bHasEmpty) return -1;\n\t\tif (!aHasEmpty && bHasEmpty) return 1;\n\t\tconst aMin = [...a].sort((x, y) => x.localeCompare(y))[0] ?? \"\";\n\t\tconst bMin = [...b].sort((x, y) => x.localeCompare(y))[0] ?? \"\";\n\t\treturn aMin.localeCompare(bMin);\n\t});\n\treturn components;\n}\nfunction forwardRootsInComponent(componentNodes, topology) {\n\tconst roots = [];\n\tfor (const node of componentNodes) if ((topology.forwardInDegree.get(node) ?? 0) === 0) roots.push(node);\n\troots.sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tif (roots.length > 0) return roots;\n\treturn [...componentNodes].sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n}\nfunction compareNodesTipsFirst(a, b, rank) {\n\tconst rankA = rank.get(a) ?? 0;\n\tconst rankB = rank.get(b) ?? 0;\n\tif (rankA !== rankB) return rankB - rankA;\n\tif (a === EMPTY_CONTRACT_HASH) return 1;\n\tif (b === EMPTY_CONTRACT_HASH) return -1;\n\treturn a.localeCompare(b);\n}\n/**\n* Layer nodes by longest forward-path rank from forward roots within the\n* component. Rank 0 is the root (bottom row); the maximum rank is the tip\n* (top row). Emits rank-descending with lex-ascending tie-break among siblings\n* at the same rank — stable across edge-insertion order and correct under\n* diamonds, cross-links, and rollbacks.\n*/\nfunction maxRank(rank) {\n\tlet max = 0;\n\tfor (const value of rank.values()) if (value > max) max = value;\n\treturn max;\n}\nfunction layerNodesByLongestForwardPath(componentNodes, topology, graph, contractHash) {\n\tconst forwardOut = /* @__PURE__ */ new Map();\n\tfor (const node of componentNodes) forwardOut.set(node, []);\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) {\n\t\tif (!componentNodes.has(edge.from) || !componentNodes.has(edge.to)) continue;\n\t\tif (edge.from === edge.to) continue;\n\t\tif (topology.kindByMigrationHash.get(edge.migrationHash) !== \"forward\") continue;\n\t\tconst bucket = forwardOut.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t}\n\tconst roots = forwardRootsInComponent(componentNodes, topology);\n\tconst rank = /* @__PURE__ */ new Map();\n\tfor (const root of roots) rank.set(root, 0);\n\tconst maxPasses = componentNodes.size;\n\tfor (let pass = 0; pass < maxPasses; pass++) {\n\t\tlet changed = false;\n\t\tfor (const node of componentNodes) {\n\t\t\tconst base = rank.get(node);\n\t\t\tif (base === void 0) continue;\n\t\t\tfor (const to of forwardOut.get(node) ?? []) {\n\t\t\t\tconst next = base + 1;\n\t\t\t\tif (next > (rank.get(to) ?? -1)) {\n\t\t\t\t\trank.set(to, next);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tfor (const node of componentNodes) if (!rank.has(node)) rank.set(node, 0);\n\tif (contractHash !== void 0 && contractHash !== EMPTY_CONTRACT_HASH && componentNodes.has(contractHash) && (forwardOut.get(contractHash) ?? []).length === 0) rank.set(contractHash, maxRank(rank) + 1);\n\treturn [...componentNodes].sort((a, b) => compareNodesTipsFirst(a, b, rank));\n}\n/**\n* Build the row model from a tolerant `MigrationGraph`.\n*\n* The row model is the first pure-data stage of the `migration graph` render\n* pipeline. It:\n* - classifies every edge as `forward`, `rollback`, or `self`;\n* - produces a deterministic vertical node ordering (tips at index 0, roots\n* at the end) within each weakly-connected component;\n* - separates disjoint components with `null` sentinels;\n* - optionally prepends a detached current contract as its own single-node\n* component when `contractHash` is not already in the graph.\n*\n* No columns, no lane allocation, no glyphs, no rendering.\n*/\n/**\n* Resolve the detached current contract, if any: a real contract (not the\n* empty baseline) that no migration on disk produces, so it is absent from\n* the graph. Such a contract renders as a floating node rather than\n* decorating an existing one. Returns the hash when detached, else undefined.\n*/\nfunction detachedContractHash(graph, contractHash) {\n\treturn contractHash !== void 0 && contractHash !== EMPTY_CONTRACT_HASH && !graph.nodes.has(contractHash) ? contractHash : void 0;\n}\nfunction isForwardLeaf(node, edges) {\n\treturn !edges.some((e) => e.kind === \"forward\" && e.from === node && e.from !== e.to);\n}\nfunction forwardReachableFrom(start, forwardTo) {\n\tconst reachable = /* @__PURE__ */ new Set([start]);\n\tconst queue = [start];\n\twhile (queue.length > 0) {\n\t\tconst node = queue.shift();\n\t\tif (node === void 0) continue;\n\t\tfor (const next of forwardTo.get(node) ?? []) if (!reachable.has(next)) {\n\t\t\treachable.add(next);\n\t\t\tqueue.push(next);\n\t\t}\n\t}\n\treturn reachable;\n}\nfunction buildForwardToMap(edges) {\n\tconst forwardTo = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (edge.kind !== \"forward\" || edge.from === edge.to) continue;\n\t\tconst bucket = forwardTo.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t\telse forwardTo.set(edge.from, [edge.to]);\n\t}\n\treturn forwardTo;\n}\nfunction sortEdgesForContractHashTrunk(edges, contractHash) {\n\tif (contractHash === void 0 || contractHash === EMPTY_CONTRACT_HASH || !isForwardLeaf(contractHash, edges)) return edges;\n\tconst preferredLeaf = contractHash;\n\tconst forwardTo = buildForwardToMap(edges);\n\tconst reachability = /* @__PURE__ */ new Map();\n\tfunction canReachContractHash(from) {\n\t\tlet cached = reachability.get(from);\n\t\tif (cached === void 0) {\n\t\t\tcached = forwardReachableFrom(from, forwardTo);\n\t\t\treachability.set(from, cached);\n\t\t}\n\t\treturn cached.has(preferredLeaf);\n\t}\n\tfunction trunkBias(edge) {\n\t\tif (edge.kind !== \"forward\" || edge.from === edge.to) return 0;\n\t\tif (edge.to === preferredLeaf) return 2;\n\t\tif (canReachContractHash(edge.to)) return 1;\n\t\treturn 0;\n\t}\n\treturn edges.map((edge, index) => ({\n\t\tedge,\n\t\tindex,\n\t\tbias: trunkBias(edge)\n\t})).sort((a, b) => {\n\t\tif (a.edge.from !== b.edge.from) return a.index - b.index;\n\t\tif (a.bias !== b.bias) return b.bias - a.bias;\n\t\treturn a.index - b.index;\n\t}).map(({ edge }) => edge);\n}\nfunction rebuildEdgeLookupMaps(edges) {\n\tconst edgesByFrom = /* @__PURE__ */ new Map();\n\tconst edgesByTo = /* @__PURE__ */ new Map();\n\tfor (const classified of edges) {\n\t\tconst fromBucket = edgesByFrom.get(classified.from);\n\t\tif (fromBucket) fromBucket.push(classified);\n\t\telse edgesByFrom.set(classified.from, [classified]);\n\t\tconst toBucket = edgesByTo.get(classified.to);\n\t\tif (toBucket) toBucket.push(classified);\n\t\telse edgesByTo.set(classified.to, [classified]);\n\t}\n\treturn {\n\t\tedgesByFrom,\n\t\tedgesByTo\n\t};\n}\nfunction buildMigrationGraphRows(graph, options = {}) {\n\tconst emptyModel = {\n\t\tnodes: [],\n\t\tedges: [],\n\t\tedgesByFrom: /* @__PURE__ */ new Map(),\n\t\tedgesByTo: /* @__PURE__ */ new Map()\n\t};\n\tif (graph.nodes.size === 0) {\n\t\tconst detached = detachedContractHash(graph, options.contractHash);\n\t\treturn detached !== void 0 ? {\n\t\t\t...emptyModel,\n\t\t\tnodes: [detached]\n\t\t} : emptyModel;\n\t}\n\tconst topology = classifyMigrationGraphTopology(graph);\n\tconst edges = [];\n\tfor (const edgeList of graph.forwardChain.values()) for (const edge of edgeList) {\n\t\tconst kind = topology.kindByMigrationHash.get(edge.migrationHash) ?? \"forward\";\n\t\tedges.push({\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tfrom: edge.from,\n\t\t\tto: edge.to,\n\t\t\tdirName: edge.dirName,\n\t\t\tkind\n\t\t});\n\t}\n\tconst sortedEdges = sortEdgesForContractHashTrunk(edges, options.contractHash);\n\tconst { edgesByFrom, edgesByTo } = rebuildEdgeLookupMaps(sortedEdges);\n\tconst components = weaklyConnectedComponents(graph);\n\tconst nodes = [];\n\tfor (let i = 0; i < components.length; i++) {\n\t\tif (i > 0) nodes.push(null);\n\t\tconst component = components[i];\n\t\tif (component === void 0) continue;\n\t\tconst ordered = layerNodesByLongestForwardPath(component, topology, graph, options.contractHash);\n\t\tfor (const node of ordered) nodes.push(node);\n\t}\n\tconst detached = detachedContractHash(graph, options.contractHash);\n\tif (detached !== void 0) {\n\t\tif (nodes.length > 0) nodes.unshift(null);\n\t\tnodes.unshift(detached);\n\t}\n\treturn {\n\t\tnodes,\n\t\tedges: sortedEdges,\n\t\tedgesByFrom,\n\t\tedgesByTo\n\t};\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-space-render.ts\nfunction mergeMigrationEdgeAnnotations(listOverlay, statusOverlay) {\n\tconst merged = /* @__PURE__ */ new Map();\n\tfor (const [migrationHash, listAnnotation] of listOverlay) {\n\t\tconst statusAnnotation = statusOverlay.get(migrationHash);\n\t\tmerged.set(migrationHash, {\n\t\t\t...listAnnotation,\n\t\t\t...statusAnnotation?.status !== void 0 ? { status: statusAnnotation.status } : {}\n\t\t});\n\t}\n\treturn merged;\n}\n/**\n* Translate `migrate --show` per-edge path-highlight annotations into a\n* {@link Highlight}. With any `pathHighlight` present the result is focus mode\n* (on-path lifted green, off-path dim); otherwise flat (lane-rotation colour).\n*/\nfunction highlightFromEdgeAnnotations(edgeAnnotationsByHash) {\n\tconst onPath = /* @__PURE__ */ new Set();\n\tlet anyPathHighlight = false;\n\tfor (const [migrationHash, annotation] of edgeAnnotationsByHash) {\n\t\tif (annotation.pathHighlight === void 0) continue;\n\t\tanyPathHighlight = true;\n\t\tif (annotation.pathHighlight === \"on-path\") onPath.add(migrationHash);\n\t}\n\treturn anyPathHighlight ? {\n\t\tmode: \"focus\",\n\t\tonPath\n\t} : {\n\t\tmode: \"flat\",\n\t\tonPath: /* @__PURE__ */ new Set()\n\t};\n}\nfunction buildGridForInput(input) {\n\tconst rowModel = buildMigrationGraphRows(input.graph, { contractHash: input.liveContractHash });\n\treturn {\n\t\tgrid: buildGrid(rowModel, {}, {\n\t\t\tmode: \"flat\",\n\t\t\tonPath: /* @__PURE__ */ new Set()\n\t\t}),\n\t\trowModel\n\t};\n}\n/**\n* The widest gutter→label column across the given space layouts. Cross-space\n* callers pass this back in so every section's labels share one column.\n*/\nfunction computeGlobalMaxEdgeTreePrefixWidth(inputs, glyphMode = \"unicode\") {\n\tlet globalMax = 0;\n\tfor (const input of inputs) {\n\t\tconst { grid } = buildGridForInput(input);\n\t\tglobalMax = Math.max(globalMax, computeLabelColumn(grid, glyphMode));\n\t}\n\treturn globalMax;\n}\nfunction computeGlobalMaxDirNameWidth(inputs) {\n\tlet globalMax = 0;\n\tfor (const input of inputs) {\n\t\tconst { rowModel } = buildGridForInput(input);\n\t\tglobalMax = Math.max(globalMax, computeMaxDirNameWidth(rowModel));\n\t}\n\treturn globalMax;\n}\nfunction renderMigrationGraphSpaceTreeInternal(input) {\n\tconst appSpace = input.isAppSpace !== false;\n\tconst rowModel = buildMigrationGraphRows(input.graph, { ...appSpace ? { contractHash: input.liveContractHash } : {} });\n\tconst listOverlay = buildEdgeAnnotationsByHashFromListEntries(input.migrations);\n\tconst edgeAnnotationsByHash = input.statusOverlayByHash === void 0 ? listOverlay : mergeMigrationEdgeAnnotations(listOverlay, input.statusOverlayByHash);\n\treturn renderMigrationGraphCommand({\n\t\tgrid: buildGrid(rowModel, {}, highlightFromEdgeAnnotations(edgeAnnotationsByHash)),\n\t\trowModel,\n\t\tcolorize: input.colorize,\n\t\tglyphMode: input.glyphMode,\n\t\tcontractHash: input.liveContractHash,\n\t\tisAppSpace: appSpace,\n\t\tedgeAnnotationsByHash,\n\t\trefsByHash: input.refsByHash ?? buildRefsByHashFromListEntries(input.migrations),\n\t\t...input.dbHash !== void 0 ? { dbHash: input.dbHash } : {},\n\t\t...input.styler !== void 0 ? { styler: input.styler } : {},\n\t\t...input.globalMaxEdgeTreePrefixWidth !== void 0 ? { globalLabelColumn: input.globalMaxEdgeTreePrefixWidth } : {},\n\t\t...input.globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth: input.globalMaxDirNameWidth } : {}\n\t});\n}\nfunction renderMigrationGraphSpaceTree(input) {\n\treturn renderMigrationGraphSpaceTreeInternal(input);\n}\nfunction indentMigrationGraphTreeBlock(treeOutput, indent) {\n\tif (treeOutput.length === 0) return treeOutput;\n\treturn treeOutput.split(\"\\n\").map((line) => line.length === 0 ? line : `${indent}${line}`).join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-list-render.ts\nconst IDENTITY_MIGRATION_LIST_STYLER = {\n\tkind: (text) => text,\n\tdirName: (text) => text,\n\tsourceHash: (text) => text,\n\tdestHash: (text) => text,\n\tglyph: (text) => text,\n\tlane: (text) => text,\n\tinvariants: (ids) => `{${ids.join(\", \")}}`,\n\trefs: (names) => `(${names.join(\", \")})`,\n\tspaceHeading: (text) => text,\n\tsummary: (text) => text,\n\temptyState: (text) => text\n};\nfunction canonicalFrom(from) {\n\treturn from ?? EMPTY_CONTRACT_HASH;\n}\nfunction migrationGraphFromListEntries(entries) {\n\tconst nodes = /* @__PURE__ */ new Set();\n\tconst forwardChain = /* @__PURE__ */ new Map();\n\tconst reverseChain = /* @__PURE__ */ new Map();\n\tconst migrationByHash = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) {\n\t\tconst from = canonicalFrom(entry.fromContract);\n\t\tconst edge = {\n\t\t\tfrom,\n\t\t\tto: entry.toContract,\n\t\t\tmigrationHash: entry.hash,\n\t\t\tdirName: entry.name,\n\t\t\tcreatedAt: entry.createdAt,\n\t\t\tinvariants: entry.providedInvariants\n\t\t};\n\t\tnodes.add(from);\n\t\tnodes.add(entry.toContract);\n\t\tconst forward = forwardChain.get(from);\n\t\tif (forward) forward.push(edge);\n\t\telse forwardChain.set(from, [edge]);\n\t\tconst reverse = reverseChain.get(entry.toContract);\n\t\tif (reverse) reverse.push(edge);\n\t\telse reverseChain.set(entry.toContract, [edge]);\n\t\tmigrationByHash.set(entry.hash, edge);\n\t}\n\treturn {\n\t\tnodes,\n\t\tforwardChain,\n\t\treverseChain,\n\t\tmigrationByHash\n\t};\n}\nfunction buildEdgeAnnotationsByHashFromListEntries(entries) {\n\tconst annotations = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) annotations.set(entry.hash, {\n\t\toperationCount: entry.operationCount,\n\t\tinvariants: entry.providedInvariants\n\t});\n\treturn annotations;\n}\nfunction buildRefsByHashFromListEntries(entries) {\n\tconst refsByHash = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) if (entry.refs.length > 0) refsByHash.set(entry.toContract, entry.refs);\n\treturn refsByHash;\n}\nfunction formatEmptyStateLine(spaceId, style) {\n\treturn style.emptyState(`There are no migrations in migrations/${spaceId}/ yet`);\n}\nfunction renderSpaceTreeBlock(spaceId, migrations, multiSpace, glyphMode, style, colorize, liveContractHash, graphForSpace, appSpaceId, globalMaxEdgeTreePrefixWidth, globalMaxDirNameWidth) {\n\tif (migrations.length === 0) {\n\t\tconst emptyLine = formatEmptyStateLine(spaceId, style);\n\t\tif (!multiSpace) return [emptyLine];\n\t\treturn [style.spaceHeading(`${spaceId}:`), ` ${emptyLine}`];\n\t}\n\tconst graph = graphForSpace(spaceId) ?? migrationGraphFromListEntries(migrations);\n\tconst isAppSpace = appSpaceId === void 0 ? void 0 : spaceId === appSpaceId;\n\tconst treeOutput = renderMigrationGraphSpaceTree({\n\t\tgraph,\n\t\tmigrations,\n\t\tliveContractHash,\n\t\tglyphMode,\n\t\tcolorize,\n\t\trefsByHash: buildRefsByHashFromListEntries(migrations),\n\t\tstyler: style,\n\t\t...isAppSpace !== void 0 ? { isAppSpace } : {},\n\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t});\n\tif (!multiSpace) return treeOutput.length === 0 ? [] : [treeOutput];\n\tconst indented = indentMigrationGraphTreeBlock(treeOutput, \" \");\n\treturn [style.spaceHeading(`${spaceId}:`), indented];\n}\n/**\n* Compose the styled `migration list` human output via the shared tree\n* renderer. Each on-disk migration is one edge row with package-fact\n* annotations; refs decorate destination contract nodes.\n*\n* `options.colorize` must match whether `style` emits ANSI (e.g. both true for\n* `createAnsiMigrationListStyler({ useColor: true })`).\n*/\nfunction renderMigrationListWithStyle(result, style, glyphMode = \"unicode\", options = {}) {\n\tconst multiSpace = result.spaces.length > 1;\n\tconst colorize = options.colorize ?? false;\n\tconst liveContractHash = options.liveContractHash ?? EMPTY_CONTRACT_HASH;\n\tconst graphForSpace = options.graphForSpace ?? (() => void 0);\n\tconst appSpaceId = options.appSpaceId;\n\tconst globalLayoutInputs = multiSpace ? result.spaces.filter((space) => space.migrations.length > 0).map((space) => ({\n\t\tgraph: graphForSpace(space.space) ?? migrationGraphFromListEntries(space.migrations),\n\t\tliveContractHash\n\t})) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tconst lines = [];\n\tfor (let index = 0; index < result.spaces.length; index++) {\n\t\tconst space = result.spaces[index];\n\t\tif (index > 0) lines.push(\"\");\n\t\tlines.push(...renderSpaceTreeBlock(space.space, space.migrations, multiSpace, glyphMode, style, colorize, liveContractHash, graphForSpace, appSpaceId, globalMaxEdgeTreePrefixWidth, globalMaxDirNameWidth));\n\t}\n\tif (result.spaces.reduce((count, space) => count + space.migrations.length, 0) > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(style.summary(result.summary));\n\t}\n\treturn lines.join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-list-styler.ts\nfunction hasMarkersFormatter(styler) {\n\treturn \"markers\" in styler && typeof styler.markers === \"function\";\n}\nfunction styleMarkerName(name) {\n\treturn name === \"contract\" ? bold(green(name)) : green(name);\n}\nfunction plainMarkers(names) {\n\treturn names.map((name) => `@${name}`).join(\" \");\n}\nfunction formatContractNodeOverlays(styler, markers, refs) {\n\tconst parts = [];\n\tif (markers.length > 0) parts.push(hasMarkersFormatter(styler) ? styler.markers(markers) : plainMarkers(markers));\n\tif (refs.length > 0) parts.push(styler.refs(refs));\n\treturn parts.join(\" \");\n}\n/**\n* The current contract overlay marker. Unlike user refs, this names the user's\n* declared desired state — the implicit base/target for `plan` / `migrate` —\n* not a stored label. It is emphasized (bold) so it stands out from plain refs\n* (including the live-database `db` marker, which is just another ref).\n*/\nconst CONTRACT_MARKER_NAME = \"contract\";\nfunction styleRefName(name) {\n\treturn green(name);\n}\n/**\n* Build a {@link MigrationListStyler} that decorates `migration list`\n* tokens with ANSI SGR codes. When `useColor` is `false` (non-TTY,\n* `--no-color`, `NO_COLOR=1`, piped output) the function returns the\n* shared identity styler so callers get plain text with zero ANSI\n* bytes — pipe-friendly by construction.\n*\n* Palette:\n*\n* - `dirName`: bold\n* - `sourceHash`: dim cyan\n* - `destHash`: bright cyan\n* - `kind` (`*` / `↩` / `⟲`): bright — the signal; lanes and arrows dim\n* - `glyph` (`→` / `⟲` / `∅`): dim\n* - `lane` (graph gutter lines `│` and fan/join connectors `├─┐` / `├─┘`): dim\n* - `invariants` (`{...}`): yellow\n* - `markers` (`@contract @db`): green; the `contract` desired-state marker is\n* green-bold (`db` is plain green); the `@` sigil is applied to each name\n* - `refs` (`(...)`): green (the active ref is bolded separately by the tree styler)\n* - `spaceHeading` (`<spaceId>:`): bold\n* - `summary`: dim\n* - `emptyState`: dim\n*/\nfunction createAnsiMigrationListStyler(opts) {\n\tif (!opts.useColor) return {\n\t\t...IDENTITY_MIGRATION_LIST_STYLER,\n\t\tmarkers: plainMarkers\n\t};\n\treturn {\n\t\tkind: (text) => text,\n\t\tdirName: (text) => bold(text),\n\t\tsourceHash: (text) => dim(cyan(text)),\n\t\tdestHash: (text) => cyanBright(text),\n\t\tglyph: (text) => dim(text),\n\t\tlane: (text) => dim(text),\n\t\tinvariants: (ids) => yellow(`{${ids.join(\", \")}}`),\n\t\tmarkers: (names) => {\n\t\t\tconst sigil = green(\"@\");\n\t\t\treturn names.map((name) => sigil + styleMarkerName(name)).join(\" \");\n\t\t},\n\t\trefs: (names) => {\n\t\t\tconst open = green(\"(\");\n\t\t\tconst close = green(\")\");\n\t\t\tconst separator = green(\", \");\n\t\t\treturn open + names.map(styleRefName).join(separator) + close;\n\t\t},\n\t\tspaceHeading: (text) => bold(text),\n\t\tsummary: (text) => dim(text),\n\t\temptyState: (text) => dim(text)\n\t};\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-labels.ts\n/**\n* Per-row label formatting for the command graph renderer.\n*\n* The command graph renderer ({@link renderMigrationGraphCommand}) derives the\n* graph structure — rows, gutter, lane colours — from the grid pipeline. The\n* per-row LABEL (contract hash + markers + refs for node rows;\n* migration name + `from → to` + ops/status/will-run for migration rows) is\n* formatted here. This module owns ONLY label text + styling; it knows nothing\n* about lanes, gutters, or grid geometry.\n*\n* The label format (hash abbreviation, `from → to` arrow column, `@contract`/\n* `@db` markers, `(refs)`, ops/status/will-run suffix, the legend) is the same\n* as the previous renderer — that part was never the bug.\n*/\n/**\n* The live-database overlay marker. Just another ref as far as styling goes —\n* the only emphasized markers are the active ref and the `contract`\n* desired-state marker (see {@link CONTRACT_MARKER_NAME}).\n*/\nconst DB_MARKER_NAME = \"db\";\n/**\n* Forced-color functions that always emit ANSI regardless of the ambient TTY\n* environment (NO_COLOR, piped output). Used so on-path green / off-path dim are\n* deterministically emitted in tests that request colour while NO_COLOR is set.\n*/\nconst { dim: forcedDim } = createColors({ useColor: true });\nconst { greenBright: forcedGreen } = createColors({ useColor: true });\n/**\n* The two label styles used in `migrate --show` path-highlight mode.\n*\n* - `onPath`: bold name, neutral hashes (the on-path lane glyphs are coloured\n* green by the grid renderer, not here).\n* - `offPath`: uniform dim grey on the name and the whole hash column.\n*\n* To change the on-path / off-path label colour in future, edit this object.\n*/\nconst PATH_HIGHLIGHT_STYLES = {\n\tonPath: (_style, colorize) => ({\n\t\tlane: colorize ? forcedGreen : (text) => text,\n\t\tarrow: (text) => text,\n\t\tdirName: (text) => bold(text),\n\t\thashOverride: void 0\n\t}),\n\toffPath: (colorize) => ({\n\t\tlane: colorize ? forcedDim : (text) => text,\n\t\tarrow: colorize ? forcedDim : (text) => text,\n\t\tdirName: colorize ? forcedDim : (text) => text,\n\t\thashOverride: colorize ? forcedDim : void 0\n\t})\n};\nfunction abbreviateHash(hash, hashLength, emptySource) {\n\tif (hash === EMPTY_CONTRACT_HASH) return emptySource;\n\treturn hash.slice(0, hashLength);\n}\nfunction overlayNamesForContract(contractHash, opts) {\n\tconst markers = [];\n\tconst refs = [];\n\tconst userRefs = opts.refsByHash?.get(contractHash);\n\tif (userRefs) refs.push(...[...userRefs].sort((a, b) => a.localeCompare(b)));\n\tif (opts.isAppSpace !== false && opts.contractHash === contractHash && contractHash !== EMPTY_CONTRACT_HASH) markers.push(CONTRACT_MARKER_NAME);\n\tif (opts.dbHash === contractHash) markers.push(DB_MARKER_NAME);\n\tmarkers.sort((a, b) => {\n\t\tif (a === \"contract\") return -1;\n\t\tif (b === \"contract\") return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\treturn {\n\t\tmarkers,\n\t\trefs\n\t};\n}\nfunction createLabelStyler(opts) {\n\tconst base = opts.styler ?? createAnsiMigrationListStyler({ useColor: opts.colorize });\n\tconst activeRefName = opts.activeRefName;\n\tif (!opts.colorize || activeRefName === void 0) return base;\n\treturn {\n\t\t...base,\n\t\trefs: (names) => {\n\t\t\tconst styledNames = names.map((name) => name === activeRefName ? bold(name) : name);\n\t\t\treturn base.refs(styledNames);\n\t\t}\n\t};\n}\nfunction overlayStatusGlyphs(mode) {\n\treturn mode === \"ascii\" ? {\n\t\tapplied: \"+\",\n\t\tpending: \">\"\n\t} : {\n\t\tapplied: \"✓\",\n\t\tpending: \"⧗\"\n\t};\n}\nfunction formatEdgeAnnotationSuffix(migrationHash, opts, style) {\n\tconst annotation = opts.edgeAnnotationsByHash?.get(migrationHash);\n\tif (annotation === void 0) return \"\";\n\tconst isOffPath = annotation.pathHighlight === \"off-path\";\n\tconst segments = [];\n\tif (annotation.operationCount !== void 0) segments.push(`${annotation.operationCount} ops`);\n\tif (annotation.invariants !== void 0 && annotation.invariants.length > 0) segments.push(style.invariants(annotation.invariants));\n\tconst status = annotation.status;\n\tif (status !== void 0) {\n\t\tconst glyphs = overlayStatusGlyphs(opts.glyphMode ?? \"unicode\");\n\t\tconst glyph = status === \"applied\" ? glyphs.applied : glyphs.pending;\n\t\tconst label = status === \"applied\" ? \"applied\" : \"pending\";\n\t\tif (!opts.colorize) segments.push(`${glyph} ${label}`);\n\t\telse {\n\t\t\tconst styler = status === \"applied\" ? green : yellow;\n\t\t\tsegments.push(styler(`${glyph} ${label}`));\n\t\t}\n\t}\n\tif (annotation.pathHighlight === \"on-path\") {\n\t\tconst glyph = opts.glyphMode === \"ascii\" ? \">\" : \"↑\";\n\t\tsegments.push(`${glyph} will run`);\n\t}\n\tif (segments.length === 0) return \"\";\n\tconst suffix = ` ${segments.join(\" \")}`;\n\treturn opts.colorize && isOffPath ? forcedDim(suffix) : suffix;\n}\n/**\n* Format the `from → to` hash data column for an edge row.\n*\n* When `hashOverride` is provided (off-path → `dim`), it replaces ALL sub-stylers\n* so dim reaches every character without inner ANSI codes overriding it.\n*/\nfunction formatEdgeHashColumn(edge, style, hashLength, glyphMode, hashOverride) {\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst src = hashOverride ?? style.sourceHash;\n\tconst dst = hashOverride ?? style.destHash;\n\tconst glyph = hashOverride ?? style.glyph;\n\tif (edge.kind === \"self\") {\n\t\tconst hash = abbreviateHash(edge.from, hashLength, emptySource);\n\t\treturn `${padFromHashColumn(src(hash), hashLength)} ${glyph(forwardArrow)} ${dst(hash)}`;\n\t}\n\treturn `${edge.from === EMPTY_CONTRACT_HASH ? padFromHashColumn(glyph(emptySource), hashLength) : padFromHashColumn(src(abbreviateHash(edge.from, hashLength, emptySource)), hashLength)} ${glyph(forwardArrow)} ${dst(abbreviateHash(edge.to, hashLength, emptySource))}`;\n}\n/**\n* The label text for a contract node row: the abbreviated hash (or the `∅`\n* empty-source token for the baseline) followed by its `@contract`/`@db` markers\n* and `(refs)`, with two spaces between the hash and the overlay block.\n*/\nfunction formatNodeLabel(contractHash, opts, nodeHighlight) {\n\tconst style = createLabelStyler(opts);\n\tconst hashLength = opts.hashLength ?? 7;\n\tconst emptySource = migrationListEmptySource(opts.glyphMode ?? \"unicode\");\n\tconst overlays = overlayNamesForContract(contractHash, opts);\n\tconst hasOverlays = overlays.markers.length > 0 || overlays.refs.length > 0;\n\tconst offPath = nodeHighlight === \"off-path\" && opts.colorize;\n\tconst hashText = contractHash === EMPTY_CONTRACT_HASH ? (offPath ? forcedDim : style.glyph)(emptySource) : (offPath ? forcedDim : style.sourceHash)(abbreviateHash(contractHash, hashLength, emptySource));\n\tif (!hasOverlays) return hashText;\n\treturn `${hashText} ${formatContractNodeOverlays(style, overlays.markers, overlays.refs)}`;\n}\n/**\n* The label text for a migration row: the migration name (padded to\n* `dirNameWidth`) followed by the `from → to` hash column and the annotation\n* suffix (ops / status / will-run).\n*\n* In flat mode the name is tinted with its lane's hue (`lane` ≥ 0), so the node\n* `○`, the edges/arrows in the gutter, and the name all read in one colour. In\n* focus mode the on-path/off-path role overrides the lane hue (bold / dim).\n*/\nfunction formatMigrationLabel(edge, dirNameWidth, opts, lane) {\n\tconst style = createLabelStyler(opts);\n\tconst hashLength = opts.hashLength ?? 7;\n\tconst glyphMode = opts.glyphMode ?? \"unicode\";\n\tconst highlight = opts.edgeAnnotationsByHash?.get(edge.migrationHash)?.pathHighlight;\n\tlet dirNameStyler;\n\tlet hashOverride;\n\tif (highlight === \"on-path\") {\n\t\tdirNameStyler = opts.colorize ? forcedGreen : (text) => text;\n\t\thashOverride = void 0;\n\t} else if (highlight === \"off-path\") {\n\t\tdirNameStyler = opts.colorize ? forcedDim : style.dirName;\n\t\thashOverride = opts.colorize ? forcedDim : void 0;\n\t} else if (opts.colorize && lane !== void 0) {\n\t\tdirNameStyler = (text) => laneColorizer(lane)(text);\n\t\thashOverride = void 0;\n\t} else {\n\t\tdirNameStyler = style.dirName;\n\t\thashOverride = void 0;\n\t}\n\tconst dirNamePadding = \" \".repeat(Math.max(0, dirNameWidth - edge.dirName.length));\n\treturn `${`${dirNameStyler(edge.dirName)}${dirNamePadding}`}${formatEdgeHashColumn(edge, style, hashLength, glyphMode, hashOverride)}${formatEdgeAnnotationSuffix(edge.migrationHash, opts, style)}`;\n}\n/**\n* Format a single on-path migration row for the `migrate --show` run-list.\n* Shares PATH_HIGHLIGHT_STYLES.onPath with the graph tree so the run-list and\n* the graph are byte-for-byte identical in their name/hash columns.\n*/\nfunction formatOnPathMigrationRow(dirName, from, to, dirNameWidth, colorize, glyphMode) {\n\tconst style = createAnsiMigrationListStyler({ useColor: colorize });\n\tconst styledDirName = `${PATH_HIGHLIGHT_STYLES.onPath(style, colorize).dirName(dirName)}${\" \".repeat(Math.max(0, dirNameWidth - dirName.length))}`;\n\tconst hashLength = 7;\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst fromAbbr = from === EMPTY_CONTRACT_HASH ? padFromHashColumn(style.glyph(emptySource), hashLength) : padFromHashColumn(style.sourceHash(abbreviateHash(from, hashLength, emptySource)), hashLength);\n\tconst toAbbr = to === EMPTY_CONTRACT_HASH ? style.glyph(emptySource) : style.destHash(abbreviateHash(to, hashLength, emptySource));\n\treturn `${styledDirName} ${fromAbbr} ${style.glyph(forwardArrow)} ${toAbbr}`;\n}\nfunction legendGlyphs(mode) {\n\treturn mode === \"ascii\" ? {\n\t\tnode: \"*\",\n\t\tforward: \"^\",\n\t\trollback: \"v\",\n\t\tself: \"@\"\n\t} : {\n\t\tnode: \"○\",\n\t\tforward: \"↑\",\n\t\trollback: \"↓\",\n\t\tself: \"⟲\"\n\t};\n}\nfunction formatLegendExampleMarkers(colorize) {\n\tif (!colorize) return \"@contract @db\";\n\tconst sigil = green(\"@\");\n\treturn `${sigil + bold(green(\"contract\"))} ${sigil}${green(\"db\")}`;\n}\n/**\n* A compact key for the tree visual language: the contract node glyph, the\n* in-lane direction arrows, the empty baseline, the system-marker `@…` and\n* user-ref `(…)` conventions, and a worked sample of the data-column hash arrow.\n*/\nfunction renderMigrationGraphLegend(opts) {\n\tconst glyphMode = opts.glyphMode ?? \"unicode\";\n\tconst style = createAnsiMigrationListStyler({ useColor: opts.colorize });\n\tconst glyphs = legendGlyphs(glyphMode);\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst sampleArrow = `${style.sourceHash(\"aaaaaa\")} ${style.glyph(forwardArrow)} ${style.destHash(\"bbbbbb\")}`;\n\tconst statusGlyphs = overlayStatusGlyphs(glyphMode);\n\tconst appliedPending = opts.colorize ? ` ${green(statusGlyphs.applied)} ${style.summary(\"applied\")} ${yellow(statusGlyphs.pending)} ${style.summary(\"pending\")}` : ` ${statusGlyphs.applied} ${style.summary(\"applied\")} ${statusGlyphs.pending} ${style.summary(\"pending\")}`;\n\tconst exampleMarkers = formatLegendExampleMarkers(opts.colorize);\n\tconst exampleRefs = opts.colorize ? style.refs([\"prod\", \"staging\"]) : \"(prod, staging)\";\n\treturn [\n\t\t\"Legend:\",\n\t\t` ${style.kind(glyphs.node)} ${style.summary(\"contract\")} ${style.kind(glyphs.forward)} ${style.summary(\"forward\")} ${style.kind(glyphs.rollback)} ${style.summary(\"rollback\")}`,\n\t\t` ${style.kind(glyphs.self)} ${style.summary(\"migration without schema change\")}`,\n\t\tappliedPending,\n\t\t` ${style.kind(emptySource)} ${style.summary(\"empty database (baseline)\")}`,\n\t\t` ${exampleMarkers} ${style.summary(\"reserved markers — also typeable as --from/--to tokens\")}`,\n\t\t` ${exampleRefs} ${style.summary(\"user-defined refs\")}`,\n\t\t` ${sampleArrow} ${style.summary(\"migration from contract aaaaaa to bbbbbb\")}`\n\t].join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-command-render.ts\n/**\n* Command graph renderer: composes the gutter (from the grid) with per-row labels.\n*\n* Pipeline: buildMigrationGraphRows → buildGrid → renderMigrationGraphCommand\n*\n* Each grid row is classified by its cells: a node row gets a contract label;\n* a migration arrow row gets a migration label; connector rows get no label.\n* Label format and styling live in `./migration-graph-labels`.\n*/\nconst LABEL_GAP = 2;\nconst MIN_HASH_DATA_COLUMN = 25;\n/**\n* Classify a grid row by its own cells:\n* - a cell carrying a NodeRef → node row (contract label);\n* - a cell whose top line is an arrow ({up}/{down}/self-loop) → migration row;\n* - otherwise → no label.\n*\n* A migration's arrow appears in exactly one grid row (the forward `↑` row, the\n* adjacent-rollback `↓` row, or the self-loop `⟲` row), so each migration gets\n* exactly one label, on the row that draws its arrow.\n*\n* Two distinct migrations with identical content (same from/to/ops) hash to the\n* SAME migration hash, so the arrow line is matched on BOTH its hash and its\n* `dirName` (which the LineRef carries per-row) — otherwise both rows would\n* resolve to one edge and the other migration's name would be lost.\n*/\nfunction classifyRow(row, edgesByHash) {\n\tfor (const cell of row) if (cell.node !== void 0) return {\n\t\tkind: \"node\",\n\t\tcontractHash: cell.node.contractHash\n\t};\n\tfor (const cell of row) {\n\t\tconst arrow = arrowLine(cell);\n\t\tif (arrow === void 0) continue;\n\t\tconst candidates = edgesByHash.get(arrow.line.migrationHash) ?? [];\n\t\tconst edge = candidates.find((e) => e.dirName === arrow.line.dirName) ?? candidates[0];\n\t\tif (edge !== void 0) return {\n\t\t\tkind: \"migration\",\n\t\t\tedge,\n\t\t\tlane: arrow.line.lane\n\t\t};\n\t}\n\treturn { kind: \"none\" };\n}\n/**\n* Return the cell's arrow line if it carries one — a self-loop, or a line whose\n* directions are exactly `{up}` or `{down}` (the migration-direction arrows).\n* Connector/corner/vertical lines are not arrows and yield `undefined`.\n*/\nfunction arrowLine(cell) {\n\tfor (const line of cell.lines) {\n\t\tif (line.selfLoop === true) return line;\n\t\tif (line.landingArrow === true) continue;\n\t\tconst dirs = line.directions;\n\t\tif (dirs.size !== 1) continue;\n\t\tif (dirs.has(\"up\") || dirs.has(\"down\")) return line;\n\t}\n}\n/**\n* Resolve each contract's path-highlight role from the edges incident on it.\n* On-path wins: a contract touched by any on-path edge is on-path. Empty unless\n* focus-mode annotations are present.\n*/\nfunction resolveNodeHighlights(rowModel, edgeAnnotationsByHash) {\n\tconst result = /* @__PURE__ */ new Map();\n\tif (edgeAnnotationsByHash === void 0) return result;\n\tfor (const edge of rowModel.edges) {\n\t\tconst highlight = edgeAnnotationsByHash.get(edge.migrationHash)?.pathHighlight;\n\t\tif (highlight === void 0) continue;\n\t\tfor (const hash of [edge.from, edge.to]) {\n\t\t\tif (hash === EMPTY_CONTRACT_HASH) continue;\n\t\t\tif (result.get(hash) !== \"on-path\") result.set(hash, highlight);\n\t\t}\n\t}\n\treturn result;\n}\nfunction maxDirNameLength(edges) {\n\tlet max = 0;\n\tfor (const edge of edges) max = Math.max(max, edge.dirName.length);\n\treturn max;\n}\n/**\n* The label column for a render: the widest gutter (visible width) across every\n* row, plus the label gap. Labels begin here so they line up regardless of how\n* deep the lane structure runs on any one row. A cross-space override widens it\n* so sibling space sections share one column.\n*/\nfunction computeLabelColumn(grid, glyphMode) {\n\tlet maxGutter = 0;\n\tfor (const row of grid) {\n\t\tconst gutter = renderGridRow(row, {\n\t\t\tcolorize: false,\n\t\t\tglyphMode\n\t\t});\n\t\tmaxGutter = Math.max(maxGutter, stringWidth(gutter));\n\t}\n\treturn maxGutter + LABEL_GAP;\n}\nfunction computeMaxDirNameWidth(rowModel) {\n\treturn maxDirNameLength(rowModel.edges);\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nconst ANSI_ESCAPE = \"\\x1B\";\nfunction trimTrailingWhitespace(line) {\n\tconst trailingSpaceBeforeReset = new RegExp(`[\\\\t ]+((?:${ANSI_ESCAPE}\\\\[[0-9;]*m)+)$`);\n\treturn line.replace(trailingSpaceBeforeReset, \"$1\").replace(/\\s+$/, \"\");\n}\nfunction renderMigrationGraphCommand(input) {\n\tconst { grid, rowModel } = input;\n\tconst glyphMode = input.glyphMode;\n\tconst edgesByHash = /* @__PURE__ */ new Map();\n\tfor (const edge of rowModel.edges) {\n\t\tconst bucket = edgesByHash.get(edge.migrationHash);\n\t\tif (bucket) bucket.push(edge);\n\t\telse edgesByHash.set(edge.migrationHash, [edge]);\n\t}\n\tconst labelOpts = {\n\t\tcolorize: input.colorize,\n\t\tglyphMode,\n\t\t...ifDefined(\"refsByHash\", input.refsByHash),\n\t\t...ifDefined(\"edgeAnnotationsByHash\", input.edgeAnnotationsByHash),\n\t\t...ifDefined(\"dbHash\", input.dbHash),\n\t\t...ifDefined(\"contractHash\", input.contractHash),\n\t\t...ifDefined(\"isAppSpace\", input.isAppSpace),\n\t\t...ifDefined(\"activeRefName\", input.activeRefName),\n\t\t...ifDefined(\"styler\", input.styler)\n\t};\n\tconst nodeHighlights = resolveNodeHighlights(rowModel, input.edgeAnnotationsByHash);\n\tconst labelColumn = input.globalLabelColumn ?? computeLabelColumn(grid, glyphMode);\n\tconst maxDirNameLen = input.globalMaxDirNameWidth ?? maxDirNameLength(rowModel.edges);\n\tconst dirNameWidth = Math.max(maxDirNameLen + LABEL_GAP, MIN_HASH_DATA_COLUMN - labelColumn);\n\tconst lines = [];\n\tfor (const row of grid) {\n\t\tconst gutter = renderGridRow(row, {\n\t\t\tcolorize: input.colorize,\n\t\t\tglyphMode\n\t\t});\n\t\tconst identity = classifyRow(row, edgesByHash);\n\t\tif (identity.kind === \"none\") {\n\t\t\tlines.push(trimTrailingWhitespace(gutter));\n\t\t\tcontinue;\n\t\t}\n\t\tconst gutterPad = padVisible(gutter, labelColumn);\n\t\tif (identity.kind === \"node\") {\n\t\t\tconst label = formatNodeLabel(identity.contractHash, labelOpts, nodeHighlights.get(identity.contractHash));\n\t\t\tlines.push(trimTrailingWhitespace(label.length === 0 ? gutter : `${gutterPad}${label}`));\n\t\t\tcontinue;\n\t\t}\n\t\tconst label = formatMigrationLabel(identity.edge, dirNameWidth, labelOpts, identity.lane);\n\t\tlines.push(trimTrailingWhitespace(`${gutterPad}${label}`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n//#endregion\nexport { migrationListEmptySource as _, renderMigrationGraphLegend as a, renderMigrationListWithStyle as c, highlightFromEdgeAnnotations as d, indentMigrationGraphTreeBlock as f, abbreviateContractHash as g, buildGrid as h, formatOnPathMigrationRow as i, computeGlobalMaxDirNameWidth as l, buildMigrationGraphRows as m, computeMaxDirNameWidth as n, createAnsiMigrationListStyler as o, renderMigrationGraphSpaceTree as p, renderMigrationGraphCommand as r, IDENTITY_MIGRATION_LIST_STYLER as s, computeLabelColumn as t, computeGlobalMaxEdgeTreePrefixWidth as u, migrationListForwardArrow as v };\n\n//# sourceMappingURL=migration-graph-command-render-BKrg6BPv.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,UAAU,aAAa,EAAE,UAAU,KAAK,CAAC;AAC/C,MAAM,kBAAkB;CACvB,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;AACT;AACA,SAAS,UAAU,MAAM;CACxB,OAAO,gBAAgB,OAAO,gBAAgB,aAAa,MAAM;AAClE;;;;;;;AAOA,SAAS,cAAc,MAAM;CAC5B,OAAO,UAAU,IAAI;AACtB;AACA,SAAS,UAAU,MAAM;CACxB,OAAO,SAAS,YAAY,QAAQ,cAAc,QAAQ;AAC3D;AACA,MAAM,mBAAmB;CACxB,UAAU;CACV,YAAY;CACZ,eAAe;CACf,iBAAiB;CACjB,cAAc;CACd,gBAAgB;CAChB,SAAS;CACT,WAAW;CACX,MAAM;CACN,UAAU;CACV,cAAc;CACd,UAAU;AACX;AACA,MAAM,iBAAiB;CACtB,UAAU;CACV,YAAY;CACZ,eAAe;CACf,iBAAiB;CACjB,cAAc;CACd,gBAAgB;CAChB,SAAS;CACT,WAAW;CACX,MAAM;CACN,UAAU;CACV,cAAc;CACd,UAAU;AACX;AACA,SAAS,YAAY,MAAM;CAC1B,OAAO,SAAS,UAAU,iBAAiB;AAC5C;AACA,SAAS,SAAS,MAAM,UAAU;CACjC,MAAM,OAAO,MAAM,KAAK,IAAI,CAAC;CAC7B,IAAI,IAAI,IAAI,KAAK,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,IAAI,OAAO,GAAG,OAAO,S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,MAAM,cAAc,WAAW,SAAS,IAAI;EACxF,MAAM,KAAK,uBAAuB,GAAG,YAAY,OAAO,CAAC;CAC1D;CACA,OAAO,MAAM,KAAK,IAAI;AACvB"}
@@ -0,0 +1,124 @@
1
+ import { n as MigrationGraph, t as MigrationEdge } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
2
+ import { n as OnDiskMigrationPackage } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
3
+ //#region ../../../1-framework/3-tooling/migration/dist/migration-graph-tarTxJ99.d.mts
4
+ //#region src/migration-graph.d.ts
5
+ declare function reconstructGraph(packages: readonly OnDiskMigrationPackage[]): MigrationGraph;
6
+ /**
7
+ * Find the shortest path from `fromHash` to `toHash` using BFS over the
8
+ * contract-hash graph. Returns the ordered list of edges, or null if no path
9
+ * exists. Returns an empty array when `fromHash === toHash` (no-op).
10
+ *
11
+ * Neighbor ordering is deterministic via the tie-break sort key:
12
+ * createdAt → to → migrationHash.
13
+ */
14
+ declare function findPath(graph: MigrationGraph, fromHash: string, toHash: string): readonly MigrationEdge[] | null;
15
+ /**
16
+ * Find the shortest path from `fromHash` to `toHash` whose edges collectively
17
+ * cover every invariant in `required`. Returns `null` when no such path exists
18
+ * (either `fromHash`→`toHash` is structurally unreachable, or every reachable
19
+ * path leaves at least one required invariant uncovered). When `required` is
20
+ * empty, delegates to `findPath` so the result is byte-identical for that case.
21
+ *
22
+ * Algorithm: BFS over `(node, coveredSubset)` states with state-level dedup.
23
+ * The covered subset is a `Set<string>` of invariant ids; the state's dedup
24
+ * key is `${node}\0${[...covered].sort().join('\0')}`. State keys distinguish
25
+ * distinct `(node, covered)` tuples regardless of node-name length because
26
+ * `\0` cannot appear in any invariant id (validation rejects whitespace and
27
+ * control chars at authoring time).
28
+ *
29
+ * Neighbour ordering when `required ≠ ∅`: edges covering ≥1 still-needed
30
+ * invariant come first, with `createdAt → to → migrationHash` as the
31
+ * secondary key. The heuristic steers BFS toward the satisfying path;
32
+ * correctness (shortest, deterministic) does not depend on it.
33
+ */
34
+ declare function findPathWithInvariants(graph: MigrationGraph, fromHash: string, toHash: string, required: ReadonlySet<string>): readonly MigrationEdge[] | null;
35
+ interface PathDecision {
36
+ readonly selectedPath: readonly MigrationEdge[];
37
+ readonly fromHash: string;
38
+ readonly toHash: string;
39
+ readonly alternativeCount: number;
40
+ readonly tieBreakReasons: readonly string[];
41
+ readonly refName?: string;
42
+ /** The caller-supplied required invariant set, sorted ascending. */
43
+ readonly requiredInvariants: readonly string[];
44
+ /**
45
+ * The subset of `requiredInvariants` actually covered by edges on
46
+ * `selectedPath`. Always a subset of `requiredInvariants` (when the path
47
+ * is satisfying, equal to it); always derived from `selectedPath`.
48
+ */
49
+ readonly satisfiedInvariants: readonly string[];
50
+ }
51
+ /**
52
+ * Outcome of {@link findPathWithDecision}. The pathfinder distinguishes
53
+ * three cases up front so callers don't re-derive structural reachability:
54
+ *
55
+ * - `ok` — a path covering `required` exists; `decision` carries the
56
+ * selection metadata and per-edge invariants.
57
+ * - `unreachable` — `from`→`to` has no structural path. Mapped by callers
58
+ * to the existing no-path / `NO_TARGET` diagnostic.
59
+ * - `unsatisfiable` — `from`→`to` is structurally reachable but no path
60
+ * covers every required invariant. `structuralPath` is the
61
+ * `findPath(graph, from, to)` result, included so callers don't have to
62
+ * recompute it when raising `MIGRATION.NO_INVARIANT_PATH`. `missing` is
63
+ * the subset of `required` that the structural path does *not* cover —
64
+ * correctly accounts for partial coverage when some required invariants
65
+ * are met by the fallback path. Only emitted when `required` is
66
+ * non-empty.
67
+ */
68
+ type FindPathOutcome = {
69
+ readonly kind: 'ok';
70
+ readonly decision: PathDecision;
71
+ } | {
72
+ readonly kind: 'unreachable';
73
+ } | {
74
+ readonly kind: 'unsatisfiable';
75
+ readonly structuralPath: readonly MigrationEdge[];
76
+ readonly missing: readonly string[];
77
+ };
78
+ /**
79
+ * Routing context for {@link findPathWithDecision}. Both fields are optional;
80
+ * `refName` is only used to decorate the resulting `PathDecision` for the
81
+ * JSON envelope, and `required` defaults to an empty set (purely structural
82
+ * routing). They are passed via a single options object so the call sites
83
+ * cannot silently swap two adjacent string parameters.
84
+ */
85
+ interface FindPathWithDecisionOptions {
86
+ readonly refName?: string;
87
+ readonly required?: ReadonlySet<string>;
88
+ }
89
+ /**
90
+ * Find the shortest path from `fromHash` to `toHash` and return structured
91
+ * path-decision metadata for machine-readable output. When `required` is
92
+ * non-empty, the returned path is the shortest one whose edges collectively
93
+ * cover every required invariant.
94
+ *
95
+ * The discriminated return type tells the caller *why* a path could not be
96
+ * found, so the CLI can pick the right structured error without re-running
97
+ * a structural BFS.
98
+ */
99
+ declare function findPathWithDecision(graph: MigrationGraph, fromHash: string, toHash: string, options?: FindPathWithDecisionOptions): FindPathOutcome;
100
+ /**
101
+ * Find all branch tips (nodes with no outgoing edges) reachable from
102
+ * `fromHash` via forward edges.
103
+ */
104
+ declare function findReachableLeaves(graph: MigrationGraph, fromHash: string): readonly string[];
105
+ /**
106
+ * Find the target contract hash of the migration graph reachable from
107
+ * EMPTY_CONTRACT_HASH. Returns `null` for a graph that has no target
108
+ * state (either empty, or containing only the root with no outgoing
109
+ * edges). Throws NO_INITIAL_MIGRATION if the graph has nodes but none
110
+ * originate from the empty hash, and AMBIGUOUS_TARGET if multiple
111
+ * branch tips exist.
112
+ */
113
+ declare function findLeaf(graph: MigrationGraph): string | null;
114
+ /**
115
+ * Find the latest migration entry by traversing from EMPTY_CONTRACT_HASH
116
+ * to the single target. Returns null for an empty graph.
117
+ * Throws AMBIGUOUS_TARGET if the graph has multiple branch tips.
118
+ */
119
+ declare function findLatestMigration(graph: MigrationGraph): MigrationEdge | null;
120
+ declare function detectCycles(graph: MigrationGraph): readonly string[][];
121
+ declare function detectOrphans(graph: MigrationGraph): readonly MigrationEdge[];
122
+ //#endregion
123
+ export { findLeaf as a, findPathWithInvariants as c, findLatestMigration as i, findReachableLeaves as l, detectCycles as n, findPath as o, detectOrphans as r, findPathWithDecision as s, PathDecision as t, reconstructGraph as u };
124
+ //# sourceMappingURL=migration-graph-tarTxJ99-BrGBANeE.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-graph-tarTxJ99-BrGBANeE.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/migration-graph-tarTxJ99.d.mts"],"mappings":";;;;iBAGiB,iBAAiB,mBAAmB,2BAA2B;;;;;;;;;iBAS/D,SAAS,OAAO,gBAAgB,kBAAkB,0BAA0B;;;;;;;;;;;;;;;;;;;;iBAoB5E,uBAAuB,OAAO,gBAAgB,kBAAkB,gBAAgB,UAAU,+BAA+B;UAChI;WACC,uBAAuB;WACvB;WACA;WACA;WACA;WACA;;WAEA;;;;;;WAMA;;;;;;;;;;;;;;;;;;;KAmBN;WACM;WACA,UAAU;;WAEV;;WAEA;WACA,yBAAyB;WACzB;;;;;;;;;UASD;WACC;WACA,WAAW;;;;;;;;;;;;iBAYL,qBAAqB,OAAO,gBAAgB,kBAAkB,gBAAgB,UAAU,8BAA8B;;;;;iBAKtH,oBAAoB,OAAO,gBAAgB;;;;;;;;;iBAS3C,SAAS,OAAO;;;;;;iBAMhB,oBAAoB,OAAO,iBAAiB;iBAC5C,aAAa,OAAO;iBACpB,cAAc,OAAO,0BAA0B"}