@prisma/orm-toolchain 8.0.0-rc.1-dev.6 → 8.0.0-rc.1-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/{aggregate-i-rfetSO.mjs → aggregate-D53gnb7v.mjs} +8 -8
  2. package/dist/{aggregate-i-rfetSO.mjs.map → aggregate-D53gnb7v.mjs.map} +1 -1
  3. package/dist/bin__prisma-next.mjs +22 -22
  4. package/dist/bin__prisma-next.mjs.map +1 -1
  5. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs +14 -0
  6. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +1 -0
  7. package/dist/{types-2n_H3DQ9-Bks8UPEO.d.mts → cli-errors-CDr3WcJP-NFry5GHb.d.mts} +2 -2
  8. package/dist/cli-errors-CDr3WcJP-NFry5GHb.d.mts.map +1 -0
  9. package/dist/cli.mjs +2 -2
  10. package/dist/cli__commands__contract-emit.mjs +1 -1
  11. package/dist/cli__commands__contract-infer.mjs +1 -1
  12. package/dist/cli__commands__db-init.mjs +1 -1
  13. package/dist/cli__commands__db-schema.mjs +1 -1
  14. package/dist/cli__commands__db-sign.mjs +1 -1
  15. package/dist/cli__commands__db-update.mjs +1 -1
  16. package/dist/cli__commands__db-verify.mjs +1 -1
  17. package/dist/cli__commands__migrate.d.mts +3 -12
  18. package/dist/cli__commands__migrate.d.mts.map +1 -1
  19. package/dist/cli__commands__migrate.mjs +1 -1
  20. package/dist/cli__commands__migration-check.d.mts +1 -57
  21. package/dist/cli__commands__migration-check.d.mts.map +1 -1
  22. package/dist/cli__commands__migration-check.mjs +2 -2
  23. package/dist/cli__commands__migration-graph.d.mts +1 -1
  24. package/dist/cli__commands__migration-graph.mjs +1 -1
  25. package/dist/cli__commands__migration-list.d.mts +4 -44
  26. package/dist/cli__commands__migration-list.d.mts.map +1 -1
  27. package/dist/cli__commands__migration-list.mjs +2 -2
  28. package/dist/cli__commands__migration-log.d.mts +1 -1
  29. package/dist/cli__commands__migration-log.mjs +1 -1
  30. package/dist/cli__commands__migration-new.mjs +1 -1
  31. package/dist/cli__commands__migration-plan.d.mts +2 -47
  32. package/dist/cli__commands__migration-plan.d.mts.map +1 -1
  33. package/dist/cli__commands__migration-plan.mjs +1 -1
  34. package/dist/cli__commands__migration-show.mjs +1 -1
  35. package/dist/cli__commands__migration-status.d.mts +1 -1
  36. package/dist/cli__commands__migration-status.mjs +1 -1
  37. package/dist/cli__commands__ref.d.mts +1 -28
  38. package/dist/cli__commands__ref.d.mts.map +1 -1
  39. package/dist/cli__commands__ref.mjs +2 -2
  40. package/dist/cli__commands__telemetry.mjs +1 -1
  41. package/dist/cli__control-api.d.mts +502 -2
  42. package/dist/cli__control-api.d.mts.map +1 -1
  43. package/dist/cli__control-api.mjs +18 -3
  44. package/dist/cli__migration-cli.mjs +2 -2
  45. package/dist/{client-7aUYC7ci-Bh9mLxkl.mjs → client-Y6qbDk7X-BzKLmBZo.mjs} +8 -8
  46. package/dist/{client-7aUYC7ci-Bh9mLxkl.mjs.map → client-Y6qbDk7X-BzKLmBZo.mjs.map} +1 -1
  47. package/dist/{command-helpers-C4WpR-QE-CK2gkj6l.mjs → command-helpers-C4WpR-QE-DE494TSG.mjs} +2 -2
  48. package/dist/{command-helpers-C4WpR-QE-CK2gkj6l.mjs.map → command-helpers-C4WpR-QE-DE494TSG.mjs.map} +1 -1
  49. package/dist/config-loader.d.mts +2 -18
  50. package/dist/{contract-at-errors-YdCQ5OOk-okxG7Eaj.mjs → contract-at-errors-Dv1mxKYO-C29YB4RC.mjs} +4 -4
  51. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +1 -0
  52. package/dist/{contract-emit-CTm2zfuG-8mtkxW8M.mjs → contract-emit-CTm2zfuG-7PV9SBY6.mjs} +4 -4
  53. package/dist/{contract-emit-CTm2zfuG-8mtkxW8M.mjs.map → contract-emit-CTm2zfuG-7PV9SBY6.mjs.map} +1 -1
  54. package/dist/{contract-emit-D8IXP9Qp-CecAQio1.mjs → contract-emit-D8IXP9Qp-Df6NwXn8.mjs} +3 -3
  55. package/dist/{contract-emit-D8IXP9Qp-CecAQio1.mjs.map → contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map} +1 -1
  56. package/dist/{contract-infer-C8-RqHeK-D_dm3onP.mjs → contract-infer-BwT7ngoo-Dx6aAwIN.mjs} +4 -4
  57. package/dist/{contract-infer-C8-RqHeK-D_dm3onP.mjs.map → contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map} +1 -1
  58. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs +82 -0
  59. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +1 -0
  60. package/dist/{contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs} +3 -3
  61. package/dist/{contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs.map → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map} +1 -1
  62. package/dist/{contract-space-aggregate-loader-CziO_ZRW-DIoQOL0P.mjs → contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs} +6 -6
  63. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +1 -0
  64. package/dist/{db-init-CXMcvoIA.mjs → db-init-CBj_EWg3.mjs} +15 -26
  65. package/dist/db-init-CBj_EWg3.mjs.map +1 -0
  66. package/dist/{db-schema-j8DERh4t.mjs → db-schema-BWpeh0Q_.mjs} +4 -4
  67. package/dist/{db-schema-j8DERh4t.mjs.map → db-schema-BWpeh0Q_.mjs.map} +1 -1
  68. package/dist/{db-sign-xV_rpoIc.mjs → db-sign-DCb_DKtv.mjs} +13 -29
  69. package/dist/db-sign-DCb_DKtv.mjs.map +1 -0
  70. package/dist/{db-update-DXa2DIvu.mjs → db-update-WX0KitcX.mjs} +27 -50
  71. package/dist/db-update-WX0KitcX.mjs.map +1 -0
  72. package/dist/{db-verify-YWHjuKC7-DidK1gx1.mjs → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs} +5 -5
  73. package/dist/{db-verify-YWHjuKC7-DidK1gx1.mjs.map → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map} +1 -1
  74. package/dist/{errors-BwusfLIN-BXM7K-ww.mjs → errors-Co-8oaiB-CB-6Uqki.mjs} +5 -4
  75. package/dist/{errors-BwusfLIN-BXM7K-ww.mjs.map → errors-Co-8oaiB-CB-6Uqki.mjs.map} +1 -1
  76. package/dist/{errors-AkMBj-YP.d.mts → errors-NRmFpwR1.d.mts} +6 -2
  77. package/dist/errors-NRmFpwR1.d.mts.map +1 -0
  78. package/dist/{format-Bw3LVJ1v-D10inUT9.mjs → format-Bw3LVJ1v-BJ6lVFMA.mjs} +2 -2
  79. package/dist/{format-Bw3LVJ1v-D10inUT9.mjs.map → format-Bw3LVJ1v-BJ6lVFMA.mjs.map} +1 -1
  80. package/dist/{framework-components-3DdB31mk-BPGSuOyZ.mjs → framework-components-3DdB31mk-BHyX-OlJ.mjs} +2 -2
  81. package/dist/{framework-components-3DdB31mk-BPGSuOyZ.mjs.map → framework-components-3DdB31mk-BHyX-OlJ.mjs.map} +1 -1
  82. package/dist/{graph-membership-h9ejuZla-ewjYM5wz.mjs → graph-membership-BEmNEMtP-rz61CLM5.mjs} +3 -3
  83. package/dist/{graph-membership-h9ejuZla-ewjYM5wz.mjs.map → graph-membership-BEmNEMtP-rz61CLM5.mjs.map} +1 -1
  84. package/dist/index-Df9igRvP.d.mts +18 -0
  85. package/dist/index-Df9igRvP.d.mts.map +1 -0
  86. package/dist/{init-CPB89WK2-Di4kgP6B.mjs → init-CPB89WK2-DPZRZ9Ee.mjs} +3 -3
  87. package/dist/{init-CPB89WK2-Di4kgP6B.mjs.map → init-CPB89WK2-DPZRZ9Ee.mjs.map} +1 -1
  88. package/dist/{inspect-live-schema-DEYE4EHW-DmSfKdpv.mjs → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs} +4 -4
  89. package/dist/{inspect-live-schema-DEYE4EHW-DmSfKdpv.mjs.map → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map} +1 -1
  90. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs +52 -0
  91. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +1 -0
  92. package/dist/{invariants-CMcQxRas-CXX9uhQW.mjs → invariants-C1WVUAH7-DlOBTTkM.mjs} +3 -3
  93. package/dist/{invariants-CMcQxRas-CXX9uhQW.mjs.map → invariants-C1WVUAH7-DlOBTTkM.mjs.map} +1 -1
  94. package/dist/{io-CL3hSv42-DGZtTs89.mjs → io-CHUUeHh0-CoCBe9eN.mjs} +5 -5
  95. package/dist/{io-CL3hSv42-DGZtTs89.mjs.map → io-CHUUeHh0-CoCBe9eN.mjs.map} +1 -1
  96. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs +22 -0
  97. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +1 -0
  98. package/dist/{migrate-COusRrm7.mjs → migrate-B-NAuO90.mjs} +87 -230
  99. package/dist/migrate-B-NAuO90.mjs.map +1 -0
  100. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts +56 -0
  101. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +1 -0
  102. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs +202 -0
  103. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +1 -0
  104. package/dist/{migration-diUAhNaa.mjs → migration-DAJY-NmR.mjs} +3 -3
  105. package/dist/{migration-diUAhNaa.mjs.map → migration-DAJY-NmR.mjs.map} +1 -1
  106. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs +254 -0
  107. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +1 -0
  108. package/dist/{migration-check-CueEJelQ-J81XR_ns.mjs → migration-check-DONPyXff-CGTUpLv-.mjs} +12 -254
  109. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +1 -0
  110. package/dist/{migration-command-scaffold-DNRo4exb-9JCezdoT.mjs → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs} +4 -4
  111. package/dist/{migration-command-scaffold-DNRo4exb-9JCezdoT.mjs.map → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map} +1 -1
  112. package/dist/{migration-graph-D6bN-mX0-DwMWY8DA.mjs → migration-graph-DDaOHo10-yJFAbKCu.mjs} +3 -3
  113. package/dist/{migration-graph-D6bN-mX0-DwMWY8DA.mjs.map → migration-graph-DDaOHo10-yJFAbKCu.mjs.map} +1 -1
  114. package/dist/{migration-graph-BL6vfLcE.mjs → migration-graph-Dn469b0l.mjs} +10 -19
  115. package/dist/migration-graph-Dn469b0l.mjs.map +1 -0
  116. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs +35 -0
  117. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map +1 -0
  118. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs +102 -0
  119. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +1 -0
  120. package/dist/migration-list-jk4iCtmO.mjs +120 -0
  121. package/dist/migration-list-jk4iCtmO.mjs.map +1 -0
  122. package/dist/{migration-log-BXbz6-Lj-CKHbat5f.mjs → migration-log-DQzUBrm8-D3m9wcuf.mjs} +7 -5
  123. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +1 -0
  124. package/dist/migration-new-BkSY6m0t.mjs +50 -0
  125. package/dist/migration-new-BkSY6m0t.mjs.map +1 -0
  126. package/dist/{migration-new-szZFsA3C.mjs → migration-new-g98oB3nC-BcrkxAAt.mjs} +12 -52
  127. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +1 -0
  128. package/dist/{migration-path-target-BPYp3LNc-qRQlG_Yn.mjs → migration-path-target-BPYp3LNc-DsDdLU0J.mjs} +2 -2
  129. package/dist/{migration-path-target-BPYp3LNc-qRQlG_Yn.mjs.map → migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map} +1 -1
  130. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts +159 -0
  131. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +1 -0
  132. package/dist/migration-plan-CjIYMJZy.mjs +172 -0
  133. package/dist/migration-plan-CjIYMJZy.mjs.map +1 -0
  134. package/dist/{migration-plan-CxXAXYc8-Dnp-v8Nl.mjs → migration-plan-CwuZLXVE-DAJ-JUQT.mjs} +45 -183
  135. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +1 -0
  136. package/dist/{migration-show-BKsIh7Uz.mjs → migration-show-CW6EKtfw.mjs} +13 -9
  137. package/dist/migration-show-CW6EKtfw.mjs.map +1 -0
  138. package/dist/{migration-status-CNnRInne--cvmx56T.mjs → migration-status-DSQcBhiN.mjs} +37 -68
  139. package/dist/migration-status-DSQcBhiN.mjs.map +1 -0
  140. package/dist/migration-tools.d.mts +4 -4
  141. package/dist/migration-tools.mjs +13 -13
  142. package/dist/migration-tools__aggregate.mjs +1 -1
  143. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  144. package/dist/migration-tools__errors.d.mts +2 -2
  145. package/dist/migration-tools__errors.mjs +2 -2
  146. package/dist/migration-tools__invariants.mjs +1 -1
  147. package/dist/migration-tools__io.mjs +1 -1
  148. package/dist/migration-tools__migration-graph.mjs +2 -2
  149. package/dist/migration-tools__migration.mjs +1 -1
  150. package/dist/migration-tools__ref-resolution.mjs +1 -1
  151. package/dist/migration-tools__refs.mjs +1 -1
  152. package/dist/migration-tools__spaces.mjs +2 -2
  153. package/dist/{project-import-root-C_bd0ooL-CLXW-gp6.mjs → project-import-root-C_bd0ooL-WkbJLnAA.mjs} +2 -2
  154. package/dist/{project-import-root-C_bd0ooL-CLXW-gp6.mjs.map → project-import-root-C_bd0ooL-WkbJLnAA.mjs.map} +1 -1
  155. package/dist/ref-DSAZime8.mjs +72 -0
  156. package/dist/ref-DSAZime8.mjs.map +1 -0
  157. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs +96 -0
  158. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs.map +1 -0
  159. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs +109 -0
  160. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +1 -0
  161. package/dist/{ref-resolution-BsdziDFA.mjs → ref-resolution-Ct2GMcNB.mjs} +2 -2
  162. package/dist/{ref-resolution-BsdziDFA.mjs.map → ref-resolution-Ct2GMcNB.mjs.map} +1 -1
  163. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs +16 -0
  164. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +1 -0
  165. package/dist/{refs-DtoeUivZ-qay0UMSP.mjs → refs-B2BL8z3i-DGGFB7Mj.mjs} +3 -3
  166. package/dist/{refs-DtoeUivZ-qay0UMSP.mjs.map → refs-B2BL8z3i-DGGFB7Mj.mjs.map} +1 -1
  167. package/dist/refs-fQLFcMoq-UTlvnijY.mjs +47 -0
  168. package/dist/refs-fQLFcMoq-UTlvnijY.mjs.map +1 -0
  169. package/dist/{spaces-BNd2Tlk0.mjs → spaces-DxuvClN9.mjs} +6 -6
  170. package/dist/{spaces-BNd2Tlk0.mjs.map → spaces-DxuvClN9.mjs.map} +1 -1
  171. package/dist/{telemetry-DVBHDQd6-BEdoMii0.mjs → telemetry-DVBHDQd6-Ckn5oClN.mjs} +2 -2
  172. package/dist/{telemetry-DVBHDQd6-BEdoMii0.mjs.map → telemetry-DVBHDQd6-Ckn5oClN.mjs.map} +1 -1
  173. package/dist/{verify-C6L_hiJU-CN3eEe3Y.mjs → verify-C6L_hiJU-B4V3bqvG.mjs} +2 -2
  174. package/dist/{verify-C6L_hiJU-CN3eEe3Y.mjs.map → verify-C6L_hiJU-B4V3bqvG.mjs.map} +1 -1
  175. package/dist/{verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs} +4 -4
  176. package/dist/{verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs.map → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map} +1 -1
  177. package/dist/vite-plugin-contract-emit.mjs +1 -1
  178. package/package.json +12 -12
  179. package/dist/config-loader.d.mts.map +0 -1
  180. package/dist/contract-at-errors-YdCQ5OOk-okxG7Eaj.mjs.map +0 -1
  181. package/dist/contract-space-aggregate-loader-CziO_ZRW-DIoQOL0P.mjs.map +0 -1
  182. package/dist/db-init-CXMcvoIA.mjs.map +0 -1
  183. package/dist/db-sign-xV_rpoIc.mjs.map +0 -1
  184. package/dist/db-update-DXa2DIvu.mjs.map +0 -1
  185. package/dist/errors-AkMBj-YP.d.mts.map +0 -1
  186. package/dist/migrate-COusRrm7.mjs.map +0 -1
  187. package/dist/migration-check-CueEJelQ-J81XR_ns.mjs.map +0 -1
  188. package/dist/migration-graph-BL6vfLcE.mjs.map +0 -1
  189. package/dist/migration-list-D2_JdzWC-MRHYYVQE.mjs +0 -228
  190. package/dist/migration-list-D2_JdzWC-MRHYYVQE.mjs.map +0 -1
  191. package/dist/migration-log-BXbz6-Lj-CKHbat5f.mjs.map +0 -1
  192. package/dist/migration-new-szZFsA3C.mjs.map +0 -1
  193. package/dist/migration-plan-CxXAXYc8-Dnp-v8Nl.mjs.map +0 -1
  194. package/dist/migration-show-BKsIh7Uz.mjs.map +0 -1
  195. package/dist/migration-status-CNnRInne--cvmx56T.mjs.map +0 -1
  196. package/dist/ref-DjZ5Y8ju.mjs +0 -171
  197. package/dist/ref-DjZ5Y8ju.mjs.map +0 -1
  198. package/dist/ref-advancement-CSPMoQs3-CPkL3IFF.mjs +0 -57
  199. package/dist/ref-advancement-CSPMoQs3-CPkL3IFF.mjs.map +0 -1
  200. package/dist/types-2n_H3DQ9-Bks8UPEO.d.mts.map +0 -1
@@ -1,40 +1,18 @@
1
- import { O as errorNoInvariantPath, P as errorUnknownInvariant, t as MigrationToolsError } from "./errors-BwusfLIN-BXM7K-ww.mjs";
2
- import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
3
- import { a as findPath, o as findPathWithDecision } from "./migration-graph-D6bN-mX0-DwMWY8DA.mjs";
4
- import { N as errorUnexpected, Q as maskConnectionUrl, W as formatStyledHeader, Z as mapRefResolutionError, ct as setCommandSeeAlso, et as parseGlobalFlagsOrExit, i as collectDeclaredInvariants, it as resolveMigrationPaths, nt as requireLiveDatabase, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples, t as CliStructuredError$1, tt as readContractEnvelope, ut as toStructuralEdge } from "./command-helpers-C4WpR-QE-CK2gkj6l.mjs";
1
+ import { N as errorUnexpected, Q as maskConnectionUrl, W as formatStyledHeader, ct as setCommandSeeAlso, et as parseGlobalFlagsOrExit, it as resolveMigrationPaths, nt as requireLiveDatabase, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions, st as setCommandExamples, t as CliStructuredError$1, tt as readContractEnvelope } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
5
2
  import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
6
- import { i as readRefs } from "./refs-DtoeUivZ-qay0UMSP.mjs";
7
- import { n as buildReadAggregate, o as refusePackageCorruptionOnAggregate, r as loadContractRawSafely } from "./contract-space-aggregate-loader-CziO_ZRW-DIoQOL0P.mjs";
8
- import { t as createControlClient } from "./client-7aUYC7ci-Bh9mLxkl.mjs";
9
- import { n as parseContractRef } from "./ref-resolution-BsdziDFA.mjs";
3
+ import { i as loadContractRawSafely, l as refusePackageCorruptionOnAggregate, r as buildReadAggregate } from "./contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs";
4
+ import { t as createControlClient } from "./client-Y6qbDk7X-BzKLmBZo.mjs";
5
+ import { t as resolveContractRef } from "./ref-resolution-_S4xTT2L-BE5zgO2W.mjs";
6
+ import { i as refuseUnknownInvariants, r as refuseMissingInvariantPath, t as hasMigrationPath } from "./invariants-BzYfO9IL-BXTvx0z9.mjs";
7
+ import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList, t as listRefsByContractHash } from "./migration-list-C9OPCMt--C28yBgVr.mjs";
10
8
  import { _ as renderMigrationGraphSpaceTree, a as computeGlobalMaxDirNameWidth, f as indentMigrationGraphTreeBlock, g as renderMigrationGraphLegend, o as computeGlobalMaxEdgeTreePrefixWidth } from "./migration-graph-command-render-BKrg6BPv-BP8Pfj4J.mjs";
11
- import { c as validateLegendOptions, i as migrationSpaceListEntriesFromAggregate, o as runMigrationList, r as listRefsByContractHash, s as shouldShowLegend } from "./migration-list-D2_JdzWC-MRHYYVQE.mjs";
9
+ import { n as validateLegendOptions, t as shouldShowLegend } from "./legend-5iwwlLU2-CB8bdQKJ.mjs";
10
+ import { a as statusForMigrationHash, i as readMigrationRefs, n as deriveStatusEdgeAnnotations, r as originHashForStatus, t as appliedHashesFromLedger } from "./refs-fQLFcMoq-UTlvnijY.mjs";
12
11
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
13
12
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
14
13
  import { dim, yellow } from "colorette";
15
14
  import { Command } from "commander";
16
- //#region ../../../1-framework/3-tooling/cli/dist/migration-status-CNnRInne.mjs
17
- function deriveStatusEdgeAnnotations(input) {
18
- const annotations = /* @__PURE__ */ new Map();
19
- if (input.showAppliedOverlay) {
20
- for (const edge of input.graph.migrationByHash.values()) if (input.appliedMigrationHashes.has(edge.migrationHash)) annotations.set(edge.migrationHash, { status: "applied" });
21
- }
22
- if (!input.graph.nodes.has(input.originHash)) return annotations;
23
- const pendingPath = findPath(input.graph, input.originHash, input.targetHash);
24
- if (!pendingPath) return annotations;
25
- for (const edge of pendingPath) {
26
- if (input.appliedMigrationHashes.has(edge.migrationHash)) continue;
27
- if (annotations.get(edge.migrationHash)?.status === "applied") continue;
28
- annotations.set(edge.migrationHash, { status: "pending" });
29
- }
30
- return annotations;
31
- }
32
- function appliedHashesFromLedger(ledgerEntries) {
33
- return new Set(ledgerEntries.map((entry) => entry.migrationHash));
34
- }
35
- function statusForMigrationHash(migrationHash, annotations) {
36
- return annotations.get(migrationHash)?.status ?? null;
37
- }
15
+ //#region ../../../1-framework/3-tooling/cli/dist/commands/migration-status.mjs
38
16
  function shortDisplayHash(hash) {
39
17
  return hash.slice(0, 12);
40
18
  }
@@ -125,17 +103,15 @@ async function executeMigrationStatusCommand(options, flags, ui) {
125
103
  });
126
104
  if (missingDb) return notOk(missingDb);
127
105
  }
128
- let allRefs = {};
129
- try {
130
- allRefs = await readRefs(refsDir);
131
- } catch (error) {
132
- if (MigrationToolsError.is(error)) return notOk(error);
133
- throw error;
134
- }
106
+ const refsResult = await readMigrationRefs(refsDir);
107
+ if (!refsResult.ok) return notOk(refsResult.failure);
108
+ const allRefs = refsResult.value;
135
109
  const diagnostics = [];
136
- let contractHash = EMPTY_CONTRACT_HASH;
110
+ const loaded = await buildReadAggregate(config, { migrationsDir });
111
+ if (!loaded.ok) return notOk(loaded.failure);
112
+ const contractHash = loaded.value.contractHash;
137
113
  try {
138
- contractHash = (await readContractEnvelope(config)).storageHash;
114
+ await readContractEnvelope(config);
139
115
  } catch (error) {
140
116
  diagnostics.push({
141
117
  code: "CONTRACT.UNREADABLE",
@@ -144,8 +120,6 @@ async function executeMigrationStatusCommand(options, flags, ui) {
144
120
  hints: ["Run 'prisma-next contract emit' to generate a valid contract"]
145
121
  });
146
122
  }
147
- const loaded = await buildReadAggregate(config, { migrationsDir });
148
- if (!loaded.ok) return notOk(loaded.failure);
149
123
  const { aggregate } = loaded.value;
150
124
  if (await loadContractRawSafely(config) !== null) {
151
125
  const corruptionFailure = refusePackageCorruptionOnAggregate(aggregate);
@@ -157,11 +131,11 @@ async function executeMigrationStatusCommand(options, flags, ui) {
157
131
  let activeRefEntry;
158
132
  let fromOverrideHash;
159
133
  if (options.to) {
160
- const refResult = parseContractRef(options.to, {
134
+ const refResult = resolveContractRef(options.to, {
161
135
  graph: appGraph,
162
136
  refs: allRefs
163
137
  });
164
- if (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));
138
+ if (!refResult.ok) return notOk(refResult.failure);
165
139
  activeRefHash = refResult.value.hash;
166
140
  if (refResult.value.provenance.kind === "ref") {
167
141
  activeRefName = refResult.value.provenance.refName;
@@ -169,11 +143,11 @@ async function executeMigrationStatusCommand(options, flags, ui) {
169
143
  }
170
144
  }
171
145
  if (options.from) {
172
- const fromResult = parseContractRef(options.from, {
146
+ const fromResult = resolveContractRef(options.from, {
173
147
  graph: appGraph,
174
148
  refs: allRefs
175
149
  });
176
- if (!fromResult.ok) return notOk(mapRefResolutionError(fromResult.failure));
150
+ if (!fromResult.ok) return notOk(fromResult.failure);
177
151
  fromOverrideHash = fromResult.value.hash;
178
152
  }
179
153
  const requiredInvariants = [...activeRefEntry?.invariants ?? []].sort();
@@ -251,16 +225,13 @@ async function executeMigrationStatusCommand(options, flags, ui) {
251
225
  }
252
226
  }
253
227
  if (activeRefEntry && activeRefEntry.invariants.length > 0 && connected) {
254
- const declared = collectDeclaredInvariants(appGraph);
255
- const markerInvariants = markersBySpace.get(aggregate.app.spaceId)?.invariants ?? [];
256
- const known = new Set(declared);
257
- for (const id of markerInvariants) known.add(id);
258
- const unknown = activeRefEntry.invariants.filter((id) => !known.has(id));
259
- if (unknown.length > 0) return notOk(errorUnknownInvariant({
260
- ...ifDefined("refName", activeRefName),
261
- unknown,
262
- declared: [...declared].sort()
263
- }));
228
+ const invariantRefusal = refuseUnknownInvariants({
229
+ graph: appGraph,
230
+ markerInvariants: markersBySpace.get(aggregate.app.spaceId)?.invariants ?? [],
231
+ refInvariants: activeRefEntry.invariants,
232
+ ...ifDefined("refName", activeRefName)
233
+ });
234
+ if (invariantRefusal) return notOk(invariantRefusal);
264
235
  }
265
236
  const showAppliedOverlay = connected && !usingFromOverride;
266
237
  const showDbMarker = connected && !usingFromOverride;
@@ -287,9 +258,9 @@ async function executeMigrationStatusCommand(options, flags, ui) {
287
258
  if (spaceEntry.space === aggregate.app.spaceId) headlineTargetHash = targetHash;
288
259
  const markerRecord = markersBySpace.get(spaceEntry.space);
289
260
  const markerHash = usingFromOverride ? fromOverrideHash : markerRecord?.storageHash ?? void 0;
290
- const originHash = markerHash ?? "empty";
261
+ const originHash = originHashForStatus(markerHash);
291
262
  const markerInGraph = markerHash === void 0 || graph.nodes.has(markerHash) || markerHash === spaceContractHash;
292
- if (connected && !usingFromOverride && markerInGraph && originHash !== targetHash && findPath(graph, originHash, targetHash) === null) markerCannotReachTarget = true;
263
+ if (connected && !usingFromOverride && markerInGraph && originHash !== targetHash && !hasMigrationPath(graph, originHash, targetHash)) markerCannotReachTarget = true;
293
264
  if (connected && !usingFromOverride && markerHash !== void 0 && !markerInGraph) {
294
265
  markerDiverged = true;
295
266
  diagnostics.push({
@@ -349,16 +320,14 @@ async function executeMigrationStatusCommand(options, flags, ui) {
349
320
  message: `missing invariant(s): ${missing.join(", ")}`
350
321
  });
351
322
  if (activeRefHash !== void 0) {
352
- const outcome = findPathWithDecision(appGraph, markersBySpace.get(aggregate.app.spaceId)?.storageHash ?? "empty", activeRefHash, {
353
- ...ifDefined("refName", activeRefName),
354
- required: new Set(missing)
323
+ const pathRefusal = refuseMissingInvariantPath({
324
+ graph: appGraph,
325
+ originHash: originHashForStatus(markersBySpace.get(aggregate.app.spaceId)?.storageHash),
326
+ targetHash: activeRefHash,
327
+ missing,
328
+ ...ifDefined("refName", activeRefName)
355
329
  });
356
- if (outcome.kind === "unsatisfiable") return notOk(errorNoInvariantPath({
357
- ...ifDefined("refName", activeRefName),
358
- required: [...missing].sort(),
359
- missing: outcome.missing,
360
- structuralPath: outcome.structuralPath.map(toStructuralEdge)
361
- }));
330
+ if (pathRefusal) return notOk(pathRefusal);
362
331
  }
363
332
  }
364
333
  }
@@ -441,4 +410,4 @@ function createMigrationStatusCommand() {
441
410
  //#endregion
442
411
  export { formatStatusHumanOutput as a, executeMigrationStatusCommand as i, buildStatusHeadline as n, formatStatusSummary as o, createMigrationStatusCommand as r, buildNoPathSummary as t };
443
412
 
444
- //# sourceMappingURL=migration-status-CNnRInne--cvmx56T.mjs.map
413
+ //# sourceMappingURL=migration-status-DSQcBhiN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-status-DSQcBhiN.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/migration-status.mjs"],"sourcesContent":["import { A as formatStyledHeader, F as CliStructuredError, _ as createTerminalUI, a as readContractEnvelope, ct as errorUnexpected, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, s as resolveMigrationPaths, t as addGlobalOptions, u as setCommandExamples, ut as requireLiveDatabase, y as handleResult } from \"../command-helpers-C4WpR-QE.mjs\";\nimport { i as loadContractRawSafely, l as refusePackageCorruptionOnAggregate, r as buildReadAggregate } from \"../contract-space-aggregate-loader-C5r12INu.mjs\";\nimport { t as createControlClient } from \"../client-Y6qbDk7X.mjs\";\nimport { n as refuseUnknownInvariants, r as hasMigrationPath, t as refuseMissingInvariantPath } from \"../invariants-BzYfO9IL.mjs\";\nimport { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList, t as listRefsByContractHash } from \"../migration-list-C9OPCMt-.mjs\";\nimport { t as resolveContractRef } from \"../ref-resolution-_S4xTT2L.mjs\";\nimport { a as renderMigrationGraphLegend, f as indentMigrationGraphTreeBlock, l as computeGlobalMaxDirNameWidth, p as renderMigrationGraphSpaceTree, u as computeGlobalMaxEdgeTreePrefixWidth } from \"../migration-graph-command-render-BKrg6BPv.mjs\";\nimport { n as migrationStatusJsonResultSchema } from \"../schemas-KhXMzNA_.mjs\";\nimport { n as validateLegendOptions, t as shouldShowLegend } from \"../legend-5iwwlLU2.mjs\";\nimport { a as statusForMigrationHash, i as originHashForStatus, n as appliedHashesFromLedger, r as deriveStatusEdgeAnnotations, t as readMigrationRefs } from \"../refs-fQLFcMoq.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { dim, yellow } from \"colorette\";\n//#region src/commands/migration-status.ts\nfunction shortDisplayHash(hash) {\n\treturn hash.slice(0, 12);\n}\nfunction resolveTarget(contractHash, activeRefHash) {\n\treturn activeRefHash ?? contractHash;\n}\nfunction buildStatusMigrations(listMigrations, annotations) {\n\treturn listMigrations.map((migration) => ({\n\t\t...migration,\n\t\tstatus: statusForMigrationHash(migration.hash, annotations)\n\t}));\n}\nfunction renderSpaceTree(args) {\n\tconst graph = args.space.graph();\n\tif (graph.nodes.size === 0) return \"\";\n\treturn renderMigrationGraphSpaceTree({\n\t\tgraph,\n\t\tmigrations: args.migrations,\n\t\tliveContractHash: args.liveContractHash,\n\t\trefsByHash: listRefsByContractHash(args.space),\n\t\tstatusOverlayByHash: args.statusOverlay,\n\t\tcolorize: args.colorize,\n\t\tglyphMode: args.glyphMode,\n\t\tisAppSpace: args.isAppSpace,\n\t\t...args.showDbMarker && args.markerHash !== void 0 ? { dbHash: args.markerHash } : {},\n\t\t...args.globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth: args.globalMaxEdgeTreePrefixWidth } : {},\n\t\t...args.globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth: args.globalMaxDirNameWidth } : {}\n\t});\n}\nfunction countPending(migrations) {\n\treturn migrations.filter((m) => m.status === \"pending\").length;\n}\nfunction buildNoPathSummary(args) {\n\tconst markerPart = args.markerHash !== void 0 ? `the database state (${shortDisplayHash(args.markerHash)})` : \"the database state\";\n\tconst targetShort = shortDisplayHash(args.targetHash);\n\tif (!args.explicitTarget) return `No migration path from ${markerPart} to the application's contract (${targetShort}). Run \\`prisma-next migration plan --name <name>\\` to author one.`;\n\treturn `No migration path from ${markerPart} to ${args.refName !== void 0 ? `the target (${targetShort} via \\`${args.refName}\\`)` : `the target (${targetShort})`}. Run \\`prisma-next migration plan --name <name>\\` to author one, or pass \\`--to <contract>\\` to pick a reachable target.`;\n}\nfunction buildStatusHeadline(args) {\n\tif (args.markerDiverged && args.markerHash !== void 0) return `Database marker ${shortDisplayHash(args.markerHash)} is not in the on-disk migration graph`;\n\tif (args.pendingCount === 0) return \"Up to date\";\n\treturn `${args.pendingCount} pending — run \\`prisma-next migrate --to ${shortDisplayHash(args.targetHash)}\\``;\n}\nfunction formatStatusSummary(result, colorize) {\n\tconst c = (fn, s) => colorize ? fn(s) : s;\n\tconst lines = [];\n\tconst pendingTotal = result.spaces.reduce((sum, space) => sum + countPending(space.migrations), 0);\n\tif (result.diagnostics.some((d) => d.code === \"MIGRATION.MARKER_NOT_IN_HISTORY\") || pendingTotal > 0) lines.push(c(yellow, result.summary));\n\telse lines.push(result.summary);\n\tconst missingInvariantsDiagnostic = result.diagnostics.find((d) => d.code === \"MIGRATION.MISSING_INVARIANTS\");\n\tif (missingInvariantsDiagnostic !== void 0) lines.push(c(dim, missingInvariantsDiagnostic.message));\n\treturn lines.join(\"\\n\");\n}\nfunction formatStatusHumanOutput(result, colorize) {\n\tconst sections = [];\n\tfor (const section of result.treeSections) {\n\t\tif (section.showHeading) sections.push(`${section.space}:`);\n\t\tif (section.tree.length > 0) sections.push(section.tree);\n\t\telse sections.push(\"(no migrations)\");\n\t\tsections.push(\"\");\n\t}\n\tsections.push(formatStatusSummary(result, colorize));\n\treturn sections.join(\"\\n\").trimEnd();\n}\nasync function readMarkersAndLedgers(args) {\n\tconst markersBySpace = /* @__PURE__ */ new Map();\n\tconst all = await args.client.readAllMarkers();\n\tfor (const [spaceId, marker] of all) markersBySpace.set(spaceId, marker);\n\tconst ledgersBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of args.spaceIds) ledgersBySpace.set(spaceId, await args.client.readLedger(spaceId));\n\treturn {\n\t\tmarkersBySpace,\n\t\tledgersBySpace\n\t};\n}\nasync function executeMigrationStatusCommand(options, flags, ui) {\n\tconst config = await loadConfig(options.config);\n\tconst { configPath, migrationsDir, migrationsRelative, refsDir } = resolveMigrationPaths(options.config, config);\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tconst hasDriver = !!config.driver;\n\tconst usingFromOverride = options.from !== void 0;\n\tif (!usingFromOverride) {\n\t\tconst missingDb = requireLiveDatabase({\n\t\t\tdbConnection,\n\t\t\thasDriver,\n\t\t\twhy: \"migration status needs a database connection to read the marker and ledger (or pass --from for offline path preview)\",\n\t\t\tretryCommand: \"prisma-next migration status --from <contract>\"\n\t\t});\n\t\tif (missingDb) return notOk(missingDb);\n\t}\n\tconst refsResult = await readMigrationRefs(refsDir);\n\tif (!refsResult.ok) return notOk(refsResult.failure);\n\tconst allRefs = refsResult.value;\n\tconst diagnostics = [];\n\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst contractHash = loaded.value.contractHash;\n\ttry {\n\t\tawait readContractEnvelope(config);\n\t} catch (error) {\n\t\tdiagnostics.push({\n\t\t\tcode: \"CONTRACT.UNREADABLE\",\n\t\t\tseverity: \"warn\",\n\t\t\tmessage: `Could not read contract: ${error instanceof Error ? error.message : \"unknown error\"}`,\n\t\t\thints: [\"Run 'prisma-next contract emit' to generate a valid contract\"]\n\t\t});\n\t}\n\tconst { aggregate } = loaded.value;\n\tif (await loadContractRawSafely(config) !== null) {\n\t\tconst corruptionFailure = refusePackageCorruptionOnAggregate(aggregate);\n\t\tif (corruptionFailure) return notOk(corruptionFailure);\n\t}\n\tconst appGraph = aggregate.app.graph();\n\tlet activeRefHash;\n\tlet activeRefName;\n\tlet activeRefEntry;\n\tlet fromOverrideHash;\n\tif (options.to) {\n\t\tconst refResult = resolveContractRef(options.to, {\n\t\t\tgraph: appGraph,\n\t\t\trefs: allRefs\n\t\t});\n\t\tif (!refResult.ok) return notOk(refResult.failure);\n\t\tactiveRefHash = refResult.value.hash;\n\t\tif (refResult.value.provenance.kind === \"ref\") {\n\t\t\tactiveRefName = refResult.value.provenance.refName;\n\t\t\tactiveRefEntry = allRefs[activeRefName];\n\t\t}\n\t}\n\tif (options.from) {\n\t\tconst fromResult = resolveContractRef(options.from, {\n\t\t\tgraph: appGraph,\n\t\t\trefs: allRefs\n\t\t});\n\t\tif (!fromResult.ok) return notOk(fromResult.failure);\n\t\tfromOverrideHash = fromResult.value.hash;\n\t}\n\tconst requiredInvariants = [...activeRefEntry?.invariants ?? []].sort();\n\tif (!flags.json && !flags.quiet) {\n\t\tconst details = [{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: configPath\n\t\t}, {\n\t\t\tlabel: \"migrations\",\n\t\t\tvalue: migrationsRelative\n\t\t}];\n\t\tif (dbConnection && hasDriver) details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(String(dbConnection))\n\t\t});\n\t\tif (activeRefName) details.push({\n\t\t\tlabel: \"ref\",\n\t\t\tvalue: activeRefName\n\t\t});\n\t\tif (options.from) details.push({\n\t\t\tlabel: \"from\",\n\t\t\tvalue: options.from\n\t\t});\n\t\tif (options.space) details.push({\n\t\t\tlabel: \"space\",\n\t\t\tvalue: options.space\n\t\t});\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration status\",\n\t\t\tdescription: \"Show migration history and applied status\",\n\t\t\tdetails,\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t\tif (shouldShowLegend(options, flags)) {\n\t\t\tui.stderr(renderMigrationGraphLegend({\n\t\t\t\tcolorize: flags.color !== false,\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t}));\n\t\t\tui.stderr(\"\");\n\t\t}\n\t}\n\tconst listResult = runMigrationList({\n\t\tspaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),\n\t\t...ifDefined(\"spaceFilter\", options.space)\n\t});\n\tif (!listResult.ok) return listResult;\n\tconst scopedSpaces = listResult.value.spaces;\n\tconst showSpaceHeadings = scopedSpaces.length > 1;\n\tlet markersBySpace = /* @__PURE__ */ new Map();\n\tlet ledgersBySpace = /* @__PURE__ */ new Map();\n\tlet connected = false;\n\tif (dbConnection && hasDriver && !usingFromOverride) {\n\t\tconst client = createControlClient({\n\t\t\tfamily: config.family,\n\t\t\ttarget: config.target,\n\t\t\tadapter: config.adapter,\n\t\t\tdriver: config.driver,\n\t\t\textensions: config.extensions ?? []\n\t\t});\n\t\ttry {\n\t\t\tawait client.connect(dbConnection);\n\t\t\tconnected = true;\n\t\t\tconst read = await readMarkersAndLedgers({\n\t\t\t\tclient,\n\t\t\t\tspaceIds: scopedSpaces.map((s) => s.space)\n\t\t\t});\n\t\t\tmarkersBySpace = new Map(read.markersBySpace);\n\t\t\tledgersBySpace = new Map(read.ledgersBySpace);\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read database state: ${error instanceof Error ? error.message : String(error)}` }));\n\t\t} finally {\n\t\t\tawait client.close();\n\t\t}\n\t}\n\tif (activeRefEntry && activeRefEntry.invariants.length > 0 && connected) {\n\t\tconst invariantRefusal = refuseUnknownInvariants({\n\t\t\tgraph: appGraph,\n\t\t\tmarkerInvariants: markersBySpace.get(aggregate.app.spaceId)?.invariants ?? [],\n\t\t\trefInvariants: activeRefEntry.invariants,\n\t\t\t...ifDefined(\"refName\", activeRefName)\n\t\t});\n\t\tif (invariantRefusal) return notOk(invariantRefusal);\n\t}\n\tconst showAppliedOverlay = connected && !usingFromOverride;\n\tconst showDbMarker = connected && !usingFromOverride;\n\tconst glyphMode = ui.resolveGlyphMode(options.ascii === true);\n\tconst colorize = flags.color !== false;\n\tconst statusSpaces = [];\n\tconst treeSections = [];\n\tlet markerDiverged = false;\n\tlet markerCannotReachTarget = false;\n\tlet headlineTargetHash = activeRefHash ?? contractHash;\n\tlet totalPending = 0;\n\tconst globalLayoutInputs = showSpaceHeadings ? scopedSpaces.filter((spaceEntry) => spaceEntry.migrations.length > 0).map((spaceEntry) => ({\n\t\tgraph: aggregate.space(spaceEntry.space).graph(),\n\t\tliveContractHash: contractHash\n\t})) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tfor (const spaceEntry of scopedSpaces) {\n\t\tconst space = aggregate.space(spaceEntry.space);\n\t\tif (space === void 0) continue;\n\t\tconst graph = space.graph();\n\t\tconst spaceContractHash = space.contract().storage.storageHash;\n\t\tconst targetHash = resolveTarget(spaceContractHash, activeRefHash);\n\t\tif (spaceEntry.space === aggregate.app.spaceId) headlineTargetHash = targetHash;\n\t\tconst markerRecord = markersBySpace.get(spaceEntry.space);\n\t\tconst markerHash = usingFromOverride ? fromOverrideHash : markerRecord?.storageHash ?? void 0;\n\t\tconst originHash = originHashForStatus(markerHash);\n\t\tconst markerInGraph = markerHash === void 0 || graph.nodes.has(markerHash) || markerHash === spaceContractHash;\n\t\tif (connected && !usingFromOverride && markerInGraph && originHash !== targetHash && !hasMigrationPath(graph, originHash, targetHash)) markerCannotReachTarget = true;\n\t\tif (connected && !usingFromOverride && markerHash !== void 0 && !markerInGraph) {\n\t\t\tmarkerDiverged = true;\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"MIGRATION.MARKER_NOT_IN_HISTORY\",\n\t\t\t\tseverity: \"warn\",\n\t\t\t\tmessage: \"Database was updated outside the migration system (marker does not match any migration)\",\n\t\t\t\thints: [\"Run 'prisma-next db sign' to overwrite the marker if the database already matches the contract\", \"Run 'prisma-next db update' to push the current contract to the database\"]\n\t\t\t});\n\t\t}\n\t\tconst ledger = ledgersBySpace.get(spaceEntry.space) ?? [];\n\t\tconst annotations = deriveStatusEdgeAnnotations({\n\t\t\tgraph,\n\t\t\ttargetHash,\n\t\t\toriginHash,\n\t\t\tappliedMigrationHashes: showAppliedOverlay ? appliedHashesFromLedger(ledger) : /* @__PURE__ */ new Set(),\n\t\t\tshowAppliedOverlay\n\t\t});\n\t\tconst isAppSpace = spaceEntry.space === aggregate.app.spaceId;\n\t\tconst tree = renderSpaceTree({\n\t\t\tspace,\n\t\t\tliveContractHash: contractHash,\n\t\t\tmigrations: spaceEntry.migrations,\n\t\t\tmarkerHash,\n\t\t\tshowDbMarker,\n\t\t\tstatusOverlay: annotations,\n\t\t\tcolorize,\n\t\t\tglyphMode,\n\t\t\tisAppSpace,\n\t\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t\t});\n\t\tconst migrations = buildStatusMigrations(spaceEntry.migrations, annotations);\n\t\tconst pending = countPending(migrations);\n\t\ttotalPending += pending;\n\t\tstatusSpaces.push({\n\t\t\tspace: spaceEntry.space,\n\t\t\tcurrentContract: markerHash ?? null,\n\t\t\ttargetContract: targetHash,\n\t\t\tmigrations: [...migrations]\n\t\t});\n\t\tconst displayTree = showSpaceHeadings && tree.length > 0 ? indentMigrationGraphTreeBlock(tree, \" \") : tree;\n\t\ttreeSections.push({\n\t\t\tspace: spaceEntry.space,\n\t\t\ttree: displayTree,\n\t\t\tshowHeading: showSpaceHeadings\n\t\t});\n\t}\n\tif (connected && requiredInvariants.length > 0) {\n\t\tconst markerInvariants = markersBySpace.get(aggregate.app.spaceId)?.invariants ?? [];\n\t\tconst markerSet = new Set(markerInvariants);\n\t\tconst missing = requiredInvariants.filter((id) => !markerSet.has(id));\n\t\tif (missing.length > 0) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"MIGRATION.MISSING_INVARIANTS\",\n\t\t\t\t...ifDefined(\"ref\", activeRefName),\n\t\t\t\tinvariants: missing,\n\t\t\t\tmessage: `missing invariant(s): ${missing.join(\", \")}`\n\t\t\t});\n\t\t\tif (activeRefHash !== void 0) {\n\t\t\t\tconst pathRefusal = refuseMissingInvariantPath({\n\t\t\t\t\tgraph: appGraph,\n\t\t\t\t\toriginHash: originHashForStatus(markersBySpace.get(aggregate.app.spaceId)?.storageHash),\n\t\t\t\t\ttargetHash: activeRefHash,\n\t\t\t\t\tmissing,\n\t\t\t\t\t...ifDefined(\"refName\", activeRefName)\n\t\t\t\t});\n\t\t\t\tif (pathRefusal) return notOk(pathRefusal);\n\t\t\t}\n\t\t}\n\t}\n\tconst appMarkerHash = markersBySpace.get(aggregate.app.spaceId)?.storageHash;\n\tconst summary = markerCannotReachTarget ? buildNoPathSummary({\n\t\tmarkerHash: appMarkerHash,\n\t\ttargetHash: headlineTargetHash,\n\t\texplicitTarget: options.to !== void 0,\n\t\trefName: activeRefName\n\t}) : buildStatusHeadline({\n\t\tpendingCount: totalPending,\n\t\ttargetHash: headlineTargetHash,\n\t\tmarkerDiverged,\n\t\tmarkerHash: appMarkerHash\n\t});\n\tif (scopedSpaces.every((s) => s.migrations.length === 0)) return ok({\n\t\tok: true,\n\t\tspaces: statusSpaces,\n\t\tsummary: \"No migrations found\",\n\t\tdiagnostics,\n\t\ttreeSections\n\t});\n\treturn ok({\n\t\tok: true,\n\t\tspaces: statusSpaces,\n\t\tsummary,\n\t\tdiagnostics,\n\t\ttreeSections\n\t});\n}\nfunction createMigrationStatusCommand() {\n\tconst command = new Command(\"status\");\n\tsetCommandDescriptions(command, \"Show migration path and pending status\", \"Shows which migrations are pending between the database marker and\\nthe target contract. Requires a database connection.\\nPass --from for an offline path preview without a database.\\nUse `migration graph` for topology, `migration log` for history,\\nand `migration list` for on-disk enumeration.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration status --db $DATABASE_URL\",\n\t\t\"prisma-next migration status --to production --db $DATABASE_URL\",\n\t\t\"prisma-next migration status --from abc123 --to production\",\n\t\t\"prisma-next migration status --from abc123 --to production --json\",\n\t\t\"prisma-next migration status --ascii --from abc123 --to production\",\n\t\t\"prisma-next migration status --legend --from abc123 --to production\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration log\",\n\t\t\toneLiner: \"Show executed migration history\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration list\",\n\t\t\toneLiner: \"List on-disk migrations\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--space <id>\", \"Narrow output to a single contract space\").option(\"--to <contract>\", \"Target contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)\").option(\"--from <contract>\", \"Origin contract reference; same grammar as --to. Supplying --from switches to offline path computation.\").option(\"--legend\", \"Print a key for the tree glyphs and lane colors\").option(\"--ascii\", \"Use ASCII glyphs (pipe-friendly)\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst legendValidation = validateLegendOptions(options, flags);\n\t\tif (!legendValidation.ok) process.exit(handleResult(legendValidation, flags, ui));\n\t\tconst exitCode = handleResult(await executeMigrationStatusCommand(options, flags, ui), flags, ui, (statusResult) => {\n\t\t\tif (flags.json) {\n\t\t\t\tconst jsonResult = {\n\t\t\t\t\tok: true,\n\t\t\t\t\tspaces: [...statusResult.spaces],\n\t\t\t\t\tsummary: statusResult.summary,\n\t\t\t\t\tdiagnostics: [...statusResult.diagnostics]\n\t\t\t\t};\n\t\t\t\tui.output(JSON.stringify(jsonResult, null, 2));\n\t\t\t} else if (!flags.quiet) ui.output(formatStatusHumanOutput(statusResult, flags.color !== false));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { buildNoPathSummary, buildStatusHeadline, createMigrationStatusCommand, executeMigrationStatusCommand, formatStatusHumanOutput, formatStatusSummary, migrationStatusJsonResultSchema };\n\n//# sourceMappingURL=migration-status.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,KAAK,MAAM,GAAG,EAAE;AACxB;AACA,SAAS,cAAc,cAAc,eAAe;CACnD,OAAO,iBAAiB;AACzB;AACA,SAAS,sBAAsB,gBAAgB,aAAa;CAC3D,OAAO,eAAe,KAAK,eAAe;EACzC,GAAG;EACH,QAAQ,uBAAuB,UAAU,MAAM,WAAW;CAC3D,EAAE;AACH;AACA,SAAS,gBAAgB,MAAM;CAC9B,MAAM,QAAQ,KAAK,MAAM,MAAM;CAC/B,IAAI,MAAM,MAAM,SAAS,GAAG,OAAO;CACnC,OAAO,8BAA8B;EACpC;EACA,YAAY,KAAK;EACjB,kBAAkB,KAAK;EACvB,YAAY,uBAAuB,KAAK,KAAK;EAC7C,qBAAqB,KAAK;EAC1B,UAAU,KAAK;EACf,WAAW,KAAK;EAChB,YAAY,KAAK;EACjB,GAAG,KAAK,gBAAgB,KAAK,eAAe,KAAK,IAAI,EAAE,QAAQ,KAAK,WAAW,IAAI,CAAC;EACpF,GAAG,KAAK,iCAAiC,KAAK,IAAI,EAAE,8BAA8B,KAAK,6BAA6B,IAAI,CAAC;EACzH,GAAG,KAAK,0BAA0B,KAAK,IAAI,EAAE,uBAAuB,KAAK,sBAAsB,IAAI,CAAC;CACrG,CAAC;AACF;AACA,SAAS,aAAa,YAAY;CACjC,OAAO,WAAW,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,CAAC;AACzD;AACA,SAAS,mBAAmB,MAAM;CACjC,MAAM,aAAa,KAAK,eAAe,KAAK,IAAI,uBAAuB,iBAAiB,KAAK,UAAU,EAAE,KAAK;CAC9G,MAAM,cAAc,iBAAiB,KAAK,UAAU;CACpD,IAAI,CAAC,KAAK,gBAAgB,OAAO,0BAA0B,WAAW,kCAAkC,YAAY;CACpH,OAAO,0BAA0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AS;EAC1B;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,cAAc,4BAA4B,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,gBAAgB,0CAA0C,CAAC,CAAC,OAAO,mBAAmB,2FAA2F,CAAC,CAAC,OAAO,qBAAqB,yGAAyG,CAAC,CAAC,OAAO,YAAY,iDAAiD,CAAC,CAAC,OAAO,WAAW,kCAAkC,CAAC,CAAC,OAAO,OAAO,YAAY;EAC9lB,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,mBAAmB,sBAAsB,SAAS,KAAK;EAC7D,IAAI,CAAC,iBAAiB,IAAI,QAAQ,KAAK,aAAa,kBAAkB,OAAO,EAAE,CAAC;EAChF,MAAM,WAAW,aAAa,MAAM,8BAA8B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,iBAAiB;GACnH,IAAI,MAAM,MAAM;IACf,MAAM,aAAa;KAClB,IAAI;KACJ,QAAQ,CAAC,GAAG,aAAa,MAAM;KAC/B,SAAS,aAAa;KACtB,aAAa,CAAC,GAAG,aAAa,WAAW;IAC1C;IACA,GAAG,OAAO,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;GAC9C,OAAO,IAAI,CAAC,MAAM,OAAO,GAAG,OAAO,wBAAwB,cAAc,MAAM,UAAU,KAAK,CAAC;EAChG,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -6,11 +6,11 @@ import { a as VerifyContractSpacesResult, i as VerifyContractSpacesInputs, n as
6
6
  import { a as materialiseExtensionMigrationPackageIfMissing, c as readMigrationsDir, d as writeMigrationPackage, i as formatMigrationDirName, l as writeMigrationMetadata, n as ReadMigrationsDirResult, o as materialiseMigrationPackage, r as copyFilesWithRename, s as readMigrationPackage, t as PackageLoadProblem, u as writeMigrationOps } from "./io-sr4CO9_t-C3eV_kn-.mjs";
7
7
  import { a as findLeaf, c as findPathWithInvariants, i as findLatestMigration, l as findReachableLeaves, n as detectCycles, o as findPath, r as detectOrphans, s as findPathWithDecision, t as PathDecision, u as reconstructGraph } from "./migration-graph-tarTxJ99-BrGBANeE.mjs";
8
8
  import { A as buildFabricatedMigrationEdge, B as verifyMigration, C as ResolveRecordedPathOutcome, D as VerifierOutput, E as VerifierInput, F as loadContractSpaceAggregate, I as loadProblemToViolation, L as planMigration, M as computeIntegrityViolations, N as createAggregateContractSpace, O as VerifierSuccess, P as createContractSpaceAggregate, R as requireHeadRef, S as ResolveRecordedPathInputs, T as VerifierError, _ as PerSpacePlan, a as ContractAtOptions, b as PlannerOutput, c as ContractSpaceAggregate, d as IntegrityQueryOptions, f as IntegritySpaceState, g as MarkerCheckSection, h as MarkerCheckResult, i as CallerPolicy, j as collectAggregateNamespaces, k as allStorageElementsExternal, l as DeclaredExtensionEntry, m as LoadAggregateInput, n as AggregateCurrentDBState, o as ContractAtResult, p as IntegrityViolation, r as AggregateMigrationEdgeRef, s as ContractMarkerRecordLike, t as AggregateContractSpace, u as IntegrityComputationInput, v as PlannerError, w as SchemaCheckSection, x as PlannerSuccess, y as PlannerInput, z as resolveRecordedPath } from "./aggregate-BflrjWPO.mjs";
9
- import { t as MigrationPackage } from "./package-N9PPdFV_.mjs";
10
9
  import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
11
- import { a as buildMigrationArtifacts, i as MigrationMeta, n as MigrationArtifacts, o as isDirectEntrypoint, r as MigrationContractViews, t as Migration } from "./migration-B2ljMJim.mjs";
12
10
  import "./metadata-BtscDay2.mjs";
13
- import { a as errorDescriptorHeadHashMismatch, c as errorNoInvariantPath, i as errorContractSnapshotMissing, l as errorUnknownInvariant, n as NoInvariantPathStructuralEdge, o as errorInvalidJson, r as errorContractSnapshotHashMismatch, s as errorInvalidRefName, t as MigrationToolsError } from "./errors-AkMBj-YP.mjs";
11
+ import { t as MigrationPackage } from "./package-N9PPdFV_.mjs";
12
+ import { a as buildMigrationArtifacts, i as MigrationMeta, n as MigrationArtifacts, o as isDirectEntrypoint, r as MigrationContractViews, t as Migration } from "./migration-B2ljMJim.mjs";
13
+ import { a as errorContractSnapshotMissing, c as errorInvalidRefName, i as errorContractSnapshotHashMismatch, l as errorNoInvariantPath, n as NoInvariantPathStructuralEdge, o as errorDescriptorHeadHashMismatch, r as errorContractDeserializationFailed, s as errorInvalidJson, t as MigrationToolsError, u as errorUnknownInvariant } from "./errors-NRmFpwR1.mjs";
14
14
  import "./io-DYfeLJxR.mjs";
15
15
  import { a as readContractSnapshotJsonTolerant, i as readContractSnapshotJson, n as contractSnapshotDir, o as snapshotsImportPathFrom, r as readContractSnapshotDts, s as writeContractSnapshot, t as ContractSnapshotInput } from "./contract-snapshot-store-CbqynbtE.mjs";
16
16
  import { n as computeMigrationHash, r as verifyMigrationHash, t as VerifyResult } from "./hash-XZYYKJ-i.mjs";
@@ -20,4 +20,4 @@ import { t as EMPTY_CONTRACT_HASH } from "./constants-Dkcn8Qu4.mjs";
20
20
  import { t as ledgerOriginFromStored } from "./ledger-origin-BGRN77Oy.mjs";
21
21
  import { a as writeMigrationTs, i as shebangLineFor, n as detectScaffoldRuntime, r as hasMigrationTs, t as ScaffoldRuntime } from "./migration-ts-CNaAtK8C.mjs";
22
22
  import { C as spaceMigrationDirectory, S as readContractSpaceHeadRef, _ as contractSpaceFromJson, a as DescriptorSelfConsistencyInputs, b as isValidSpaceId, c as RESERVED_SPACE_SUBDIR_NAMES, d as SpacePlanInput, f as SpacePlanOutput, g as computeExtensionSpaceApplyPath, h as assertValidSpaceId, i as ContractSpaceHeadRef, l as SPACE_REFS_DIRNAME, m as assertDescriptorSelfConsistency, n as ComputeExtensionSpaceApplyPathInputs, o as DiskContractSpaceState, p as ValidSpaceId, r as ContractSpaceArtifactInputs, s as ExtensionSpaceApplyPathOutcome, t as APP_SPACE_ID, u as SpaceApplyInput, v as emitContractSpaceArtifacts, w as spaceRefsDirectory, x as planAllSpaces, y as gatherDiskContractSpaceState } from "./spaces-D5qtTlhj.mjs";
23
- export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ComputeExtensionSpaceApplyPathInputs, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractRef, type ContractRefProvenance, type ContractSnapshotInput, type ContractSpaceAggregate, type ContractSpaceArtifactInputs, type ContractSpaceHeadRecord, type ContractSpaceHeadRef, type DeclaredExtensionEntry, type DescriptorSelfConsistencyInputs, type DiskContractSpaceState, EMPTY_CONTRACT_HASH, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, Migration, type MigrationArtifacts, MigrationContractViews, type MigrationEdge, type MigrationGraph, type MigrationMeta, type MigrationMetadata$1 as MigrationMetadata, type MigrationOps, type MigrationPackage, type MigrationRef, type MigrationRefProvenance, MigrationToolsError, type NoInvariantPathStructuralEdge, type OnDiskMigrationPackage, type PackageLoadProblem, type PathDecision, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, RESERVED_SPACE_SUBDIR_NAMES, type ReadMigrationsDirResult, type RefEntry, type RefResolutionAmbiguous, type RefResolutionContext, type RefResolutionError, type RefResolutionInvalidFormat, type RefResolutionNotFound, type RefResolutionWrongGrammar, type Refs, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, SPACE_REFS_DIRNAME, type ScaffoldRuntime, type SchemaCheckSection, type SpaceApplyInput, type SpaceMarkerRecord, type SpacePlanInput, type SpacePlanOutput, type SpaceVerifierViolation, type ValidSpaceId, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, type VerifyContractSpacesInputs, type VerifyContractSpacesResult, type VerifyResult, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
23
+ export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ComputeExtensionSpaceApplyPathInputs, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractRef, type ContractRefProvenance, type ContractSnapshotInput, type ContractSpaceAggregate, type ContractSpaceArtifactInputs, type ContractSpaceHeadRecord, type ContractSpaceHeadRef, type DeclaredExtensionEntry, type DescriptorSelfConsistencyInputs, type DiskContractSpaceState, EMPTY_CONTRACT_HASH, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, Migration, type MigrationArtifacts, MigrationContractViews, type MigrationEdge, type MigrationGraph, type MigrationMeta, type MigrationMetadata$1 as MigrationMetadata, type MigrationOps, type MigrationPackage, type MigrationRef, type MigrationRefProvenance, MigrationToolsError, type NoInvariantPathStructuralEdge, type OnDiskMigrationPackage, type PackageLoadProblem, type PathDecision, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, RESERVED_SPACE_SUBDIR_NAMES, type ReadMigrationsDirResult, type RefEntry, type RefResolutionAmbiguous, type RefResolutionContext, type RefResolutionError, type RefResolutionInvalidFormat, type RefResolutionNotFound, type RefResolutionWrongGrammar, type Refs, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, SPACE_REFS_DIRNAME, type ScaffoldRuntime, type SchemaCheckSection, type SpaceApplyInput, type SpaceMarkerRecord, type SpacePlanInput, type SpacePlanOutput, type SpaceVerifierViolation, type ValidSpaceId, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, type VerifyContractSpacesInputs, type VerifyContractSpacesResult, type VerifyResult, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
@@ -1,17 +1,17 @@
1
- import { O as errorNoInvariantPath, P as errorUnknownInvariant, a as errorContractSnapshotHashMismatch, b as errorInvalidRefName, g as errorInvalidJson, l as errorDescriptorHeadHashMismatch, o as errorContractSnapshotMissing, t as MigrationToolsError } from "./errors-BwusfLIN-BXM7K-ww.mjs";
2
- import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as readContractSnapshotDts, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs";
1
+ import { O as errorNoInvariantPath, P as errorUnknownInvariant, a as errorContractSnapshotHashMismatch, b as errorInvalidRefName, g as errorInvalidJson, i as errorContractDeserializationFailed, l as errorDescriptorHeadHashMismatch, o as errorContractSnapshotMissing, t as MigrationToolsError } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
+ import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as readContractSnapshotDts, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
3
3
  import { n as verifyMigrationHash, t as computeMigrationHash } from "./hash-DH8hl5Rq-BpM2t3Nu.mjs";
4
- import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-CMcQxRas-CXX9uhQW.mjs";
5
- import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CL3hSv42-DGZtTs89.mjs";
4
+ import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-C1WVUAH7-DlOBTTkM.mjs";
5
+ import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CHUUeHh0-CoCBe9eN.mjs";
6
6
  import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
7
- import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-D6bN-mX0-DwMWY8DA.mjs";
8
- import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs";
9
- import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-BNd2Tlk0.mjs";
10
- import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-h9ejuZla-ewjYM5wz.mjs";
11
- import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-DtoeUivZ-qay0UMSP.mjs";
12
- import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-i-rfetSO.mjs";
13
- import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-BsdziDFA.mjs";
7
+ import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
8
+ import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs";
9
+ import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-DxuvClN9.mjs";
10
+ import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-B2BL8z3i-DGGFB7Mj.mjs";
11
+ import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-BEmNEMtP-rz61CLM5.mjs";
12
+ import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-D53gnb7v.mjs";
13
+ import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-Ct2GMcNB.mjs";
14
14
  import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-FyF55c4M.mjs";
15
- import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-diUAhNaa.mjs";
15
+ import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-DAJY-NmR.mjs";
16
16
  import { t as ledgerOriginFromStored } from "./ledger-origin-D7PN4Fon.mjs";
17
- export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, HEAD_REF_NAME, Migration, MigrationContractViews, MigrationToolsError, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
17
+ export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, HEAD_REF_NAME, Migration, MigrationContractViews, MigrationToolsError, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
@@ -1,2 +1,2 @@
1
- import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-i-rfetSO.mjs";
1
+ import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-D53gnb7v.mjs";
2
2
  export { allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, computeIntegrityViolations, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, verifyMigration };
@@ -1,2 +1,2 @@
1
- import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as readContractSnapshotDts, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-DNTOE6fB-BDpjbdCJ.mjs";
1
+ import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as readContractSnapshotDts, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
2
2
  export { contractSnapshotDir, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, snapshotsImportPathFrom, writeContractSnapshot };
@@ -1,2 +1,2 @@
1
- import { a as errorDescriptorHeadHashMismatch, c as errorNoInvariantPath, i as errorContractSnapshotMissing, l as errorUnknownInvariant, n as NoInvariantPathStructuralEdge, o as errorInvalidJson, r as errorContractSnapshotHashMismatch, s as errorInvalidRefName, t as MigrationToolsError } from "./errors-AkMBj-YP.mjs";
2
- export { MigrationToolsError, type NoInvariantPathStructuralEdge, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant };
1
+ import { a as errorContractSnapshotMissing, c as errorInvalidRefName, i as errorContractSnapshotHashMismatch, l as errorNoInvariantPath, n as NoInvariantPathStructuralEdge, o as errorDescriptorHeadHashMismatch, r as errorContractDeserializationFailed, s as errorInvalidJson, t as MigrationToolsError, u as errorUnknownInvariant } from "./errors-NRmFpwR1.mjs";
2
+ export { MigrationToolsError, type NoInvariantPathStructuralEdge, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant };
@@ -1,2 +1,2 @@
1
- import { O as errorNoInvariantPath, P as errorUnknownInvariant, a as errorContractSnapshotHashMismatch, b as errorInvalidRefName, g as errorInvalidJson, l as errorDescriptorHeadHashMismatch, o as errorContractSnapshotMissing, t as MigrationToolsError } from "./errors-BwusfLIN-BXM7K-ww.mjs";
2
- export { MigrationToolsError, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant };
1
+ import { O as errorNoInvariantPath, P as errorUnknownInvariant, a as errorContractSnapshotHashMismatch, b as errorInvalidRefName, g as errorInvalidJson, i as errorContractDeserializationFailed, l as errorDescriptorHeadHashMismatch, o as errorContractSnapshotMissing, t as MigrationToolsError } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
+ export { MigrationToolsError, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant };
@@ -1,2 +1,2 @@
1
- import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-CMcQxRas-CXX9uhQW.mjs";
1
+ import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-C1WVUAH7-DlOBTTkM.mjs";
2
2
  export { deriveProvidedInvariants, validateInvariantId };
@@ -1,2 +1,2 @@
1
- import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CL3hSv42-DGZtTs89.mjs";
1
+ import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CHUUeHh0-CoCBe9eN.mjs";
2
2
  export { copyFilesWithRename, formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, readMigrationPackage, readMigrationsDir, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage };
@@ -1,3 +1,3 @@
1
- import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-D6bN-mX0-DwMWY8DA.mjs";
2
- import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-h9ejuZla-ewjYM5wz.mjs";
1
+ import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
2
+ import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-BEmNEMtP-rz61CLM5.mjs";
3
3
  export { assertHashIsGraphNode, detectCycles, detectOrphans, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, isGraphNode, reconstructGraph };
@@ -1,2 +1,2 @@
1
- import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-diUAhNaa.mjs";
1
+ import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-DAJY-NmR.mjs";
2
2
  export { Migration, MigrationContractViews, buildMigrationArtifacts, isDirectEntrypoint };
@@ -1,2 +1,2 @@
1
- import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-BsdziDFA.mjs";
1
+ import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-Ct2GMcNB.mjs";
2
2
  export { findEdgeByDirName, parseContractRef, parseMigrationRef };
@@ -1,2 +1,2 @@
1
- import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-DtoeUivZ-qay0UMSP.mjs";
1
+ import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-B2BL8z3i-DGGFB7Mj.mjs";
2
2
  export { HEAD_REF_NAME, deleteRef, readRef, readRefs, refsByContractHash, resolveRef, resolveRefsByContractHash, validateRefName, validateRefValue, writeRef };
@@ -1,3 +1,3 @@
1
- import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-Ak73-zQK-y4qVyu-y.mjs";
2
- import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-BNd2Tlk0.mjs";
1
+ import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs";
2
+ import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-DxuvClN9.mjs";
3
3
  export { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };
@@ -1,4 +1,4 @@
1
- import { O as errorRuntime$1 } from "./command-helpers-C4WpR-QE-CK2gkj6l.mjs";
1
+ import { O as errorRuntime$1 } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import { c as internalImportRoot, o as importRootForDependencies, r as createImportSpecifierResolver } from "./import-roots-NDOIEDVj.mjs";
3
3
  import { dirname, join, resolve } from "pathe";
4
4
  import { readFileSync } from "node:fs";
@@ -98,4 +98,4 @@ function createProjectSpecifierResolver(configPath) {
98
98
  //#endregion
99
99
  export { createProjectSpecifierResolver as t };
100
100
 
101
- //# sourceMappingURL=project-import-root-C_bd0ooL-CLXW-gp6.mjs.map
101
+ //# sourceMappingURL=project-import-root-C_bd0ooL-WkbJLnAA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-import-root-C_bd0ooL-CLXW-gp6.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/project-import-root-C_bd0ooL.mjs"],"sourcesContent":["import { rt as errorRuntime } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { dirname, join, resolve } from \"pathe\";\nimport { readFileSync } from \"node:fs\";\nimport { createImportSpecifierResolver, importRootForDependencies, internalImportRoot } from \"@internal/publish-surface/import-roots\";\n//#region src/utils/project-import-root.ts\n/**\n* The import root of the project being emitted for, read from its own\n* manifest.\n*\n* Generated files are kept by the application, so every package name in them\n* has to be one the application can resolve — which means one of its direct\n* dependencies (ADR 242). The application already states those in\n* `package.json`, so emission reads them instead of taking a mode from\n* configuration that could disagree with what is installed.\n*/\nconst DEPENDENCY_FIELDS = [\"dependencies\", \"devDependencies\"];\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/** The error codes that mean \"no manifest here\", as opposed to \"cannot read it\". */\nconst MANIFEST_ABSENT_CODES = /* @__PURE__ */ new Set([\"ENOENT\", \"ENOTDIR\"]);\nfunction errorCode(error) {\n\tif (!isRecord(error)) return void 0;\n\tconst code = error[\"code\"];\n\treturn typeof code === \"string\" ? code : void 0;\n}\n/**\n* The nearest `package.json` at or above `from`, or `undefined` if there is\n* none. The nearest one wins: a package inside a workspace states its own\n* dependencies, and the workspace root's are somebody else's.\n*\n* @throws {CliStructuredError} when a manifest is there but cannot be used —\n* unreadable, not valid JSON, or not a JSON object. Only \"there is no manifest\n* at this level\" continues the walk up; treating a permissions failure that\n* way would silently emit against the wrong project's dependencies.\n*/\nfunction nearestManifest(from) {\n\tlet dir = from;\n\twhile (true) {\n\t\tconst path = join(dir, \"package.json\");\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = readFileSync(path, \"utf8\");\n\t\t} catch (cause) {\n\t\t\tif (!MANIFEST_ABSENT_CODES.has(errorCode(cause) ?? \"\")) throw errorRuntime(\"CLI.PROJECT_MANIFEST_UNREADABLE\", `Failed to read ${path}`, {\n\t\t\t\twhy: `\\`${path}\\` exists but could not be read: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: `Make \\`${path}\\` readable, then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\t\tmeta: { path },\n\t\t\t\tcause\n\t\t\t});\n\t\t\tconst parent = dirname(dir);\n\t\t\tif (parent === dir) return void 0;\n\t\t\tdir = parent;\n\t\t\tcontinue;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch (cause) {\n\t\t\tthrow errorRuntime(\"CLI.PROJECT_MANIFEST_INVALID\", `Failed to parse ${path}`, {\n\t\t\t\twhy: `\\`${path}\\` is not valid JSON: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: `Fix the JSON syntax in \\`${path}\\` (a missing comma or unbalanced brace is the most common cause), then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\t\tmeta: { path },\n\t\t\t\tcause\n\t\t\t});\n\t\t}\n\t\tif (!isRecord(parsed)) throw errorRuntime(\"CLI.PROJECT_MANIFEST_INVALID\", `Failed to read ${path}`, {\n\t\t\twhy: `\\`${path}\\` is valid JSON but not a JSON object, so it states no dependencies.`,\n\t\t\tfix: `Make \\`${path}\\` a JSON object with the usual manifest fields, then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\tmeta: { path }\n\t\t});\n\t\treturn parsed;\n\t}\n}\nfunction declaredDependencies(manifest) {\n\treturn DEPENDENCY_FIELDS.flatMap((field) => {\n\t\tconst value = manifest[field];\n\t\treturn isRecord(value) ? Object.keys(value) : [];\n\t});\n}\n/**\n* The import root for the project that owns `configPath`, or for the working\n* directory when the config was discovered rather than named.\n*\n* A project with no manifest, or one that names no published package, is on\n* the internal root — which emits every specifier exactly as authored, so a\n* project that has not moved to published names is unaffected.\n*/\nfunction projectImportRoot(configPath) {\n\tconst manifest = nearestManifest(configPath === void 0 ? resolve(\".\") : dirname(resolve(configPath)));\n\tif (manifest === void 0) return internalImportRoot;\n\treturn importRootForDependencies(declaredDependencies(manifest));\n}\n/** The specifier resolver emission should use for the project owning `configPath`. */\nfunction createProjectSpecifierResolver(configPath) {\n\treturn createImportSpecifierResolver(projectImportRoot(configPath));\n}\n//#endregion\nexport { createProjectSpecifierResolver as t };\n\n//# sourceMappingURL=project-import-root-C_bd0ooL.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,oBAAoB,CAAC,gBAAgB,iBAAiB;AAC5D,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;;AAEA,MAAM,wCAAwC,IAAI,IAAI,CAAC,UAAU,SAAS,CAAC;AAC3E,SAAS,UAAU,OAAO;CACzB,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAK;CAClC,MAAM,OAAO,MAAM;CACnB,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;AAC/C;;;;;;;;;;;AAWA,SAAS,gBAAgB,MAAM;CAC9B,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,OAAO,KAAK,KAAK,cAAc;EACrC,IAAI;EACJ,IAAI;GACH,MAAM,aAAa,MAAM,MAAM;EAChC,SAAS,OAAO;GACf,IAAI,CAAC,sBAAsB,IAAI,UAAU,KAAK,KAAK,EAAE,GAAG,MAAMA,eAAa,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import-root-C_bd0ooL.mjs"],"sourcesContent":["import { rt as errorRuntime } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { dirname, join, resolve } from \"pathe\";\nimport { readFileSync } from \"node:fs\";\nimport { createImportSpecifierResolver, importRootForDependencies, internalImportRoot } from \"@internal/publish-surface/import-roots\";\n//#region src/utils/project-import-root.ts\n/**\n* The import root of the project being emitted for, read from its own\n* manifest.\n*\n* Generated files are kept by the application, so every package name in them\n* has to be one the application can resolve — which means one of its direct\n* dependencies (ADR 242). The application already states those in\n* `package.json`, so emission reads them instead of taking a mode from\n* configuration that could disagree with what is installed.\n*/\nconst DEPENDENCY_FIELDS = [\"dependencies\", \"devDependencies\"];\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/** The error codes that mean \"no manifest here\", as opposed to \"cannot read it\". */\nconst MANIFEST_ABSENT_CODES = /* @__PURE__ */ new Set([\"ENOENT\", \"ENOTDIR\"]);\nfunction errorCode(error) {\n\tif (!isRecord(error)) return void 0;\n\tconst code = error[\"code\"];\n\treturn typeof code === \"string\" ? code : void 0;\n}\n/**\n* The nearest `package.json` at or above `from`, or `undefined` if there is\n* none. The nearest one wins: a package inside a workspace states its own\n* dependencies, and the workspace root's are somebody else's.\n*\n* @throws {CliStructuredError} when a manifest is there but cannot be used —\n* unreadable, not valid JSON, or not a JSON object. Only \"there is no manifest\n* at this level\" continues the walk up; treating a permissions failure that\n* way would silently emit against the wrong project's dependencies.\n*/\nfunction nearestManifest(from) {\n\tlet dir = from;\n\twhile (true) {\n\t\tconst path = join(dir, \"package.json\");\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = readFileSync(path, \"utf8\");\n\t\t} catch (cause) {\n\t\t\tif (!MANIFEST_ABSENT_CODES.has(errorCode(cause) ?? \"\")) throw errorRuntime(\"CLI.PROJECT_MANIFEST_UNREADABLE\", `Failed to read ${path}`, {\n\t\t\t\twhy: `\\`${path}\\` exists but could not be read: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: `Make \\`${path}\\` readable, then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\t\tmeta: { path },\n\t\t\t\tcause\n\t\t\t});\n\t\t\tconst parent = dirname(dir);\n\t\t\tif (parent === dir) return void 0;\n\t\t\tdir = parent;\n\t\t\tcontinue;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch (cause) {\n\t\t\tthrow errorRuntime(\"CLI.PROJECT_MANIFEST_INVALID\", `Failed to parse ${path}`, {\n\t\t\t\twhy: `\\`${path}\\` is not valid JSON: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: `Fix the JSON syntax in \\`${path}\\` (a missing comma or unbalanced brace is the most common cause), then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\t\tmeta: { path },\n\t\t\t\tcause\n\t\t\t});\n\t\t}\n\t\tif (!isRecord(parsed)) throw errorRuntime(\"CLI.PROJECT_MANIFEST_INVALID\", `Failed to read ${path}`, {\n\t\t\twhy: `\\`${path}\\` is valid JSON but not a JSON object, so it states no dependencies.`,\n\t\t\tfix: `Make \\`${path}\\` a JSON object with the usual manifest fields, then re-run the command. Emission reads it to decide which package names generated files should import.`,\n\t\t\tmeta: { path }\n\t\t});\n\t\treturn parsed;\n\t}\n}\nfunction declaredDependencies(manifest) {\n\treturn DEPENDENCY_FIELDS.flatMap((field) => {\n\t\tconst value = manifest[field];\n\t\treturn isRecord(value) ? Object.keys(value) : [];\n\t});\n}\n/**\n* The import root for the project that owns `configPath`, or for the working\n* directory when the config was discovered rather than named.\n*\n* A project with no manifest, or one that names no published package, is on\n* the internal root — which emits every specifier exactly as authored, so a\n* project that has not moved to published names is unaffected.\n*/\nfunction projectImportRoot(configPath) {\n\tconst manifest = nearestManifest(configPath === void 0 ? resolve(\".\") : dirname(resolve(configPath)));\n\tif (manifest === void 0) return internalImportRoot;\n\treturn importRootForDependencies(declaredDependencies(manifest));\n}\n/** The specifier resolver emission should use for the project owning `configPath`. */\nfunction createProjectSpecifierResolver(configPath) {\n\treturn createImportSpecifierResolver(projectImportRoot(configPath));\n}\n//#endregion\nexport { createProjectSpecifierResolver as t };\n\n//# sourceMappingURL=project-import-root-C_bd0ooL.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,oBAAoB,CAAC,gBAAgB,iBAAiB;AAC5D,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;;AAEA,MAAM,wCAAwC,IAAI,IAAI,CAAC,UAAU,SAAS,CAAC;AAC3E,SAAS,UAAU,OAAO;CACzB,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAK;CAClC,MAAM,OAAO,MAAM;CACnB,OAAO,OAAO,SAAS,WAAW,OAAO,KAAK;AAC/C;;;;;;;;;;;AAWA,SAAS,gBAAgB,MAAM;CAC9B,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,OAAO,KAAK,KAAK,cAAc;EACrC,IAAI;EACJ,IAAI;GACH,MAAM,aAAa,MAAM,MAAM;EAChC,SAAS,OAAO;GACf,IAAI,CAAC,sBAAsB,IAAI,UAAU,KAAK,KAAK,EAAE,GAAG,MAAMA,eAAa,mCAAmC,kBAAkB,QAAQ;IACvI,KAAK,KAAK,KAAK,mCAAmC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IACvG,KAAK,UAAU,KAAK;IACpB,MAAM,EAAE,KAAK;IACb;GACD,CAAC;GACD,MAAM,SAAS,QAAQ,GAAG;GAC1B,IAAI,WAAW,KAAK,OAAO,KAAK;GAChC,MAAM;GACN;EACD;EACA,IAAI;EACJ,IAAI;GACH,SAAS,KAAK,MAAM,GAAG;EACxB,SAAS,OAAO;GACf,MAAMA,eAAa,gCAAgC,mBAAmB,QAAQ;IAC7E,KAAK,KAAK,KAAK,wBAAwB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAC5F,KAAK,4BAA4B,KAAK;IACtC,MAAM,EAAE,KAAK;IACb;GACD,CAAC;EACF;EACA,IAAI,CAAC,SAAS,MAAM,GAAG,MAAMA,eAAa,gCAAgC,kBAAkB,QAAQ;GACnG,KAAK,KAAK,KAAK;GACf,KAAK,UAAU,KAAK;GACpB,MAAM,EAAE,KAAK;EACd,CAAC;EACD,OAAO;CACR;AACD;AACA,SAAS,qBAAqB,UAAU;CACvC,OAAO,kBAAkB,SAAS,UAAU;EAC3C,MAAM,QAAQ,SAAS;EACvB,OAAO,SAAS,KAAK,IAAI,OAAO,KAAK,KAAK,IAAI,CAAC;CAChD,CAAC;AACF;;;;;;;;;AASA,SAAS,kBAAkB,YAAY;CACtC,MAAM,WAAW,gBAAgB,eAAe,KAAK,IAAI,QAAQ,GAAG,IAAI,QAAQ,QAAQ,UAAU,CAAC,CAAC;CACpG,IAAI,aAAa,KAAK,GAAG,OAAO;CAChC,OAAO,0BAA0B,qBAAqB,QAAQ,CAAC;AAChE;;AAEA,SAAS,+BAA+B,YAAY;CACnD,OAAO,8BAA8B,kBAAkB,UAAU,CAAC;AACnE"}
@@ -0,0 +1,72 @@
1
+ import { $ as parseGlobalFlags, P as formatCommandHelp, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, q as handleResult, r as addGlobalOptions } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
+ import { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from "./ref-eJjxzYTh-CNiyDL4p.mjs";
3
+ import { Command } from "commander";
4
+ //#region ../../../1-framework/3-tooling/cli/dist/commands/ref.mjs
5
+ function createRefSetCommand() {
6
+ const command = new Command("set");
7
+ setCommandDescriptions(command, "Set a ref to a contract reference", "Sets a named ref to point to a resolved contract reference (hash, alias, or path) in migrations/refs/.");
8
+ addGlobalOptions(command).argument("<name>", "Ref name (e.g., staging, production)").argument("<contract>", "Contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)").option("--config <path>", "Path to prisma-next.config.ts").action(async (name, hash, options) => {
9
+ const flags = parseGlobalFlagsOrExit(options);
10
+ const ui = createTerminalUI(flags);
11
+ const exitCode = handleResult(await executeRefSetCommand(name, hash, options), flags, ui, (value) => {
12
+ if (flags.json) ui.output(JSON.stringify(value));
13
+ else if (!flags.quiet) ui.output(`Set ref "${value.ref}" → ${value.hash}`);
14
+ });
15
+ process.exit(exitCode);
16
+ });
17
+ return command;
18
+ }
19
+ function createRefDeleteCommand() {
20
+ const command = new Command("delete");
21
+ setCommandDescriptions(command, "Delete a ref", "Removes a named ref from migrations/refs/.");
22
+ addGlobalOptions(command).argument("<name>", "Ref name to delete").option("--config <path>", "Path to prisma-next.config.ts").action(async (name, options) => {
23
+ const flags = parseGlobalFlagsOrExit(options);
24
+ const ui = createTerminalUI(flags);
25
+ const exitCode = handleResult(await executeRefDeleteCommand(name, options), flags, ui, (value) => {
26
+ if (flags.json) ui.output(JSON.stringify(value));
27
+ else if (!flags.quiet) ui.output(`Deleted ref "${value.ref}"`);
28
+ });
29
+ process.exit(exitCode);
30
+ });
31
+ return command;
32
+ }
33
+ function createRefListCommand() {
34
+ const command = new Command("list");
35
+ setCommandDescriptions(command, "List all refs", "Lists all named refs from migrations/refs/.");
36
+ addGlobalOptions(command).option("--config <path>", "Path to prisma-next.config.ts").action(async (options) => {
37
+ const flags = parseGlobalFlagsOrExit(options);
38
+ const ui = createTerminalUI(flags);
39
+ const exitCode = handleResult(await executeRefListCommand(options), flags, ui, (value) => {
40
+ if (flags.json) ui.output(JSON.stringify(value));
41
+ else if (!flags.quiet) {
42
+ const entries = Object.entries(value.refs);
43
+ if (entries.length === 0) ui.output("No refs defined");
44
+ else for (const [refName, entry] of entries) {
45
+ const invariantsSuffix = entry.invariants.length > 0 ? ` [invariants: ${entry.invariants.join(", ")}]` : "";
46
+ ui.output(`${refName} → ${entry.hash}${invariantsSuffix}`);
47
+ }
48
+ }
49
+ });
50
+ process.exit(exitCode);
51
+ });
52
+ return command;
53
+ }
54
+ function createRefCommand() {
55
+ const command = new Command("ref");
56
+ setCommandDescriptions(command, "Manage contract refs", "Manage named refs in migrations/refs/. Refs map logical environment\nnames (e.g., staging, production) to contract hashes.");
57
+ addGlobalOptions(command).configureHelp({
58
+ formatHelp: (cmd) => formatCommandHelp({
59
+ command: cmd,
60
+ flags: parseGlobalFlags({})
61
+ }),
62
+ subcommandDescription: () => ""
63
+ });
64
+ command.addCommand(createRefSetCommand());
65
+ command.addCommand(createRefDeleteCommand());
66
+ command.addCommand(createRefListCommand());
67
+ return command;
68
+ }
69
+ //#endregion
70
+ export { createRefCommand as t };
71
+
72
+ //# sourceMappingURL=ref-DSAZime8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-DSAZime8.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/ref.mjs"],"sourcesContent":["import { O as formatCommandHelp, _ as createTerminalUI, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, t as addGlobalOptions, y as handleResult } from \"../command-helpers-C4WpR-QE.mjs\";\nimport { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from \"../ref-eJjxzYTh.mjs\";\nimport { Command } from \"commander\";\n//#region src/commands/ref.ts\nfunction createRefSetCommand() {\n\tconst command = new Command(\"set\");\n\tsetCommandDescriptions(command, \"Set a ref to a contract reference\", \"Sets a named ref to point to a resolved contract reference (hash, alias, or path) in migrations/refs/.\");\n\taddGlobalOptions(command).argument(\"<name>\", \"Ref name (e.g., staging, production)\").argument(\"<contract>\", \"Contract reference (hash, prefix, ref name, migration dir name, <dir>^, or ./path)\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (name, hash, options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefSetCommand(name, hash, options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) ui.output(`Set ref \"${value.ref}\" → ${value.hash}`);\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefDeleteCommand() {\n\tconst command = new Command(\"delete\");\n\tsetCommandDescriptions(command, \"Delete a ref\", \"Removes a named ref from migrations/refs/.\");\n\taddGlobalOptions(command).argument(\"<name>\", \"Ref name to delete\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (name, options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefDeleteCommand(name, options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) ui.output(`Deleted ref \"${value.ref}\"`);\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefListCommand() {\n\tconst command = new Command(\"list\");\n\tsetCommandDescriptions(command, \"List all refs\", \"Lists all named refs from migrations/refs/.\");\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeRefListCommand(options), flags, ui, (value) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(value));\n\t\t\telse if (!flags.quiet) {\n\t\t\t\tconst entries = Object.entries(value.refs);\n\t\t\t\tif (entries.length === 0) ui.output(\"No refs defined\");\n\t\t\t\telse for (const [refName, entry] of entries) {\n\t\t\t\t\tconst invariantsSuffix = entry.invariants.length > 0 ? ` [invariants: ${entry.invariants.join(\", \")}]` : \"\";\n\t\t\t\t\tui.output(`${refName} → ${entry.hash}${invariantsSuffix}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\nfunction createRefCommand() {\n\tconst command = new Command(\"ref\");\n\tsetCommandDescriptions(command, \"Manage contract refs\", \"Manage named refs in migrations/refs/. Refs map logical environment\\nnames (e.g., staging, production) to contract hashes.\");\n\taddGlobalOptions(command).configureHelp({\n\t\tformatHelp: (cmd) => formatCommandHelp({\n\t\t\tcommand: cmd,\n\t\t\tflags: parseGlobalFlags({})\n\t\t}),\n\t\tsubcommandDescription: () => \"\"\n\t});\n\tcommand.addCommand(createRefSetCommand());\n\tcommand.addCommand(createRefDeleteCommand());\n\tcommand.addCommand(createRefListCommand());\n\treturn command;\n}\n//#endregion\nexport { createRefCommand };\n\n//# sourceMappingURL=ref.mjs.map"],"mappings":";;;;AAIA,SAAS,sBAAsB;CAC9B,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,uBAAuB,SAAS,qCAAqC,wGAAwG;CAC7K,iBAAiB,OAAO,CAAC,CAAC,SAAS,UAAU,sCAAsC,CAAC,CAAC,SAAS,cAAc,oFAAoF,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,OAAO,MAAM,MAAM,YAAY;EAClS,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,WAAW,aAAa,MAAM,qBAAqB,MAAM,MAAM,OAAO,GAAG,OAAO,KAAK,UAAU;GACpG,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,KAAK,CAAC;QAC1C,IAAI,CAAC,MAAM,OAAO,GAAG,OAAO,YAAY,MAAM,IAAI,MAAM,MAAM,MAAM;EAC1E,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR;AACA,SAAS,yBAAyB;CACjC,MAAM,UAAU,IAAI,QAAQ,QAAQ;CACpC,uBAAuB,SAAS,gBAAgB,4CAA4C;CAC5F,iBAAiB,OAAO,CAAC,CAAC,SAAS,UAAU,oBAAoB,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,OAAO,MAAM,YAAY;EAC7J,MAAM,QAAQ,u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