@prisma/orm-toolchain 8.0.0-rc.1-dev.23 → 8.0.0-rc.1-dev.25

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 (235) hide show
  1. package/dist/{aggregate-D53gnb7v.mjs → aggregate-BKbHUHLA.mjs} +7 -7
  2. package/dist/{aggregate-D53gnb7v.mjs.map → aggregate-BKbHUHLA.mjs.map} +1 -1
  3. package/dist/{aggregate-BflrjWPO.d.mts → aggregate-CA6bJ8UO.d.mts} +3 -3
  4. package/dist/{aggregate-BflrjWPO.d.mts.map → aggregate-CA6bJ8UO.d.mts.map} +1 -1
  5. package/dist/bin__prisma-next.mjs +31 -26
  6. package/dist/bin__prisma-next.mjs.map +1 -1
  7. package/dist/{caught-errors-D7Qznyrm-DaZubR00.mjs → caught-errors-nYuTn3NK-DkD-ZrDr.mjs} +3 -3
  8. package/dist/caught-errors-nYuTn3NK-DkD-ZrDr.mjs.map +1 -0
  9. package/dist/{cli-errors-BKPhkBSf-Ca-ymb6S.d.mts → cli-errors-C7vbvQuK-DLpSxz4U.d.mts} +15 -7
  10. package/dist/{cli-errors-BKPhkBSf-Ca-ymb6S.d.mts.map → cli-errors-C7vbvQuK-DLpSxz4U.d.mts.map} +1 -1
  11. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs +235 -0
  12. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs.map +1 -0
  13. package/dist/cli-telemetry.mjs +2 -2
  14. package/dist/cli.d.mts +38 -2
  15. package/dist/cli.d.mts.map +1 -1
  16. package/dist/cli.mjs +358 -5
  17. package/dist/cli.mjs.map +1 -1
  18. package/dist/cli__commands__contract-emit.d.mts +1 -1
  19. package/dist/cli__commands__contract-emit.mjs +1 -1
  20. package/dist/cli__commands__contract-infer.mjs +1 -1
  21. package/dist/cli__commands__db-init.mjs +1 -1
  22. package/dist/cli__commands__db-schema.mjs +1 -1
  23. package/dist/cli__commands__db-sign.mjs +1 -1
  24. package/dist/cli__commands__db-update.mjs +1 -1
  25. package/dist/cli__commands__db-verify.mjs +1 -1
  26. package/dist/cli__commands__migrate.d.mts +2 -2
  27. package/dist/cli__commands__migrate.mjs +1 -1
  28. package/dist/cli__commands__migration-check.mjs +1 -1
  29. package/dist/cli__commands__migration-graph.d.mts +1 -1
  30. package/dist/cli__commands__migration-graph.mjs +1 -1
  31. package/dist/cli__commands__migration-list.d.mts +2 -2
  32. package/dist/cli__commands__migration-list.mjs +1 -1
  33. package/dist/cli__commands__migration-log.d.mts +1 -1
  34. package/dist/cli__commands__migration-log.mjs +1 -1
  35. package/dist/cli__commands__migration-new.mjs +1 -1
  36. package/dist/cli__commands__migration-plan.d.mts +1 -1
  37. package/dist/cli__commands__migration-plan.mjs +1 -1
  38. package/dist/cli__commands__migration-show.mjs +1 -1
  39. package/dist/cli__commands__migration-status.d.mts +1 -1
  40. package/dist/cli__commands__migration-status.mjs +1 -1
  41. package/dist/cli__commands__ref.mjs +1 -1
  42. package/dist/cli__commands__telemetry.mjs +1 -1
  43. package/dist/cli__control-api.d.mts +25 -18
  44. package/dist/cli__control-api.d.mts.map +1 -1
  45. package/dist/cli__control-api.mjs +16 -16
  46. package/dist/cli__control-api__testing.d.mts +1 -1
  47. package/dist/cli__control-api__testing.mjs +1 -1
  48. package/dist/cli__migration-cli.mjs +4 -4
  49. package/dist/{client-BNAEJZ76-ld7eOxpZ.mjs → client-milNsAnF-B92uF3yv.mjs} +11 -11
  50. package/dist/client-milNsAnF-B92uF3yv.mjs.map +1 -0
  51. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs +765 -0
  52. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs.map +1 -0
  53. package/dist/config-loader.d.mts +1 -1
  54. package/dist/config-loader.mjs +1 -1
  55. package/dist/{contract-at-errors-Dv1mxKYO-D4xfRBW5.mjs → contract-at-errors-BTeDEXm4-BAIDia2-.mjs} +3 -3
  56. package/dist/contract-at-errors-BTeDEXm4-BAIDia2-.mjs.map +1 -0
  57. package/dist/{contract-emit-DT0JKUZT-BYE7WZPc.mjs → contract-emit-Bdf4DAR4-lKqkbfZT.mjs} +8 -46
  58. package/dist/contract-emit-Bdf4DAR4-lKqkbfZT.mjs.map +1 -0
  59. package/dist/{contract-emit-DFu7h-Zl-7DBgYNv7.mjs → contract-emit-Ci-8sP-b-QzQXK2xQ.mjs} +26 -16
  60. package/dist/contract-emit-Ci-8sP-b-QzQXK2xQ.mjs.map +1 -0
  61. package/dist/{contract-emit-B65_UiFn.d.mts → contract-emit-CvwNE4R1-DEn1V1Zo.d.mts} +2 -2
  62. package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts.map +1 -0
  63. package/dist/contract-emit-E6m8HE42-Bfiodzf_.mjs +2 -0
  64. package/dist/{contract-infer-C_b7E71m-D2UO-X-k.mjs → contract-infer-hhyMJiwS-BJ5cYC9P.mjs} +7 -6
  65. package/dist/contract-infer-hhyMJiwS-BJ5cYC9P.mjs.map +1 -0
  66. package/dist/{contract-snapshot-resolution-SATuw0JW-DpTZJd1x.mjs → contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs} +7 -7
  67. package/dist/contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs.map +1 -0
  68. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs} +2 -2
  69. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs.map} +1 -1
  70. package/dist/{contract-space-aggregate-loader-C5r12INu-DfE0nmtZ.mjs → contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs} +7 -6
  71. package/dist/contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs.map +1 -0
  72. package/dist/{db-init-Cqjw5Flp.mjs → db-init-3CbSYxRI-BlTkWh8n.mjs} +10 -8
  73. package/dist/db-init-3CbSYxRI-BlTkWh8n.mjs.map +1 -0
  74. package/dist/{db-schema-CRGCFKlH.mjs → db-schema-BVLbe3EL-WLnbuo77.mjs} +6 -5
  75. package/dist/db-schema-BVLbe3EL-WLnbuo77.mjs.map +1 -0
  76. package/dist/{db-sign-BPQduGHb.mjs → db-sign-Cdw2RmoG-C-X5UheR.mjs} +12 -10
  77. package/dist/db-sign-Cdw2RmoG-C-X5UheR.mjs.map +1 -0
  78. package/dist/{db-update-DuEk-ra5.mjs → db-update-BHOdo8PV-BVBNKrJc.mjs} +11 -9
  79. package/dist/db-update-BHOdo8PV-BVBNKrJc.mjs.map +1 -0
  80. package/dist/{db-verify-DPH4lonK-pteoYVnK.mjs → db-verify-C9P9oNCs-gieY7hV2.mjs} +13 -11
  81. package/dist/db-verify-C9P9oNCs-gieY7hV2.mjs.map +1 -0
  82. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs} +2 -2
  83. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs.map → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map} +1 -1
  84. package/dist/emitter.d.mts +1 -1
  85. package/dist/emitter.mjs +2 -2
  86. package/dist/emitter__domain-type-generation.mjs +1 -1
  87. package/dist/{exports-BCLg4CiV-okAfZydo.mjs → exports-BCLg4CiV-05kuwcb0.mjs} +4 -4
  88. package/dist/{exports-BCLg4CiV-okAfZydo.mjs.map → exports-BCLg4CiV-05kuwcb0.mjs.map} +1 -1
  89. package/dist/{exports-DVoyX2LM.mjs → exports-BZLNbtkY.mjs} +54 -12
  90. package/dist/exports-BZLNbtkY.mjs.map +1 -0
  91. package/dist/{exports-BN0vFTxG.mjs → exports-CqNUihkI.mjs} +2 -2
  92. package/dist/{exports-BN0vFTxG.mjs.map → exports-CqNUihkI.mjs.map} +1 -1
  93. package/dist/{exports-DAA3XD4a.mjs → exports-DaxzMVtq.mjs} +3 -3
  94. package/dist/{exports-DAA3XD4a.mjs.map → exports-DaxzMVtq.mjs.map} +1 -1
  95. package/dist/{format-DyVeO1z5-D1lnTJaz.mjs → format-Ddhz7xFW-Bo1nhay8.mjs} +18 -11
  96. package/dist/format-Ddhz7xFW-Bo1nhay8.mjs.map +1 -0
  97. package/dist/{framework-components-ioeTnj2Z-yyQtaVWk.mjs → framework-components-Cruf6BPK-CaQvMI3T.mjs} +3 -3
  98. package/dist/framework-components-Cruf6BPK-CaQvMI3T.mjs.map +1 -0
  99. package/dist/{index-Deu3DQZI.d.mts → index-mCsi_ND5.d.mts} +4 -2
  100. package/dist/index-mCsi_ND5.d.mts.map +1 -0
  101. package/dist/{init-BwYYd10C-CJq9i42m.mjs → init-DjdnLDyf-2nVOeVG9.mjs} +23 -8
  102. package/dist/init-DjdnLDyf-2nVOeVG9.mjs.map +1 -0
  103. package/dist/{inspect-live-schema-CXH4ZGHT-BfUdyZme.mjs → inspect-live-schema-BEQun_1x-CZpCgg8A.mjs} +7 -6
  104. package/dist/inspect-live-schema-BEQun_1x-CZpCgg8A.mjs.map +1 -0
  105. package/dist/{invariants-BzYfO9IL-BPDPDIr0.mjs → invariants-D5TNnX5E-rjPoJGFq.mjs} +4 -3
  106. package/dist/invariants-D5TNnX5E-rjPoJGFq.mjs.map +1 -0
  107. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs → io-CHUUeHh0-CbyTkKP6.mjs} +2 -2
  108. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs.map → io-CHUUeHh0-CbyTkKP6.mjs.map} +1 -1
  109. package/dist/{legend-5iwwlLU2-Bit8enjF.mjs → legend-BBtAETiW-BHqTbUjx.mjs} +3 -3
  110. package/dist/legend-BBtAETiW-BHqTbUjx.mjs.map +1 -0
  111. package/dist/{migrate-Bfsw18KQ.mjs → migrate-B-hpVTxi-DJzFYT2w.mjs} +32 -16
  112. package/dist/migrate-B-hpVTxi-DJzFYT2w.mjs.map +1 -0
  113. package/dist/{migrate-show-CO5OiR3J-DE4NIjvW.mjs → migrate-show-CUymfnbM-BbpcO2FY.mjs} +9 -23
  114. package/dist/migrate-show-CUymfnbM-BbpcO2FY.mjs.map +1 -0
  115. package/dist/{migrate-show-Cu3k9mZm-B-nCgvK1.d.mts → migrate-show-g71Z4vJw-ocdTvf70.d.mts} +10 -5
  116. package/dist/migrate-show-g71Z4vJw-ocdTvf70.d.mts.map +1 -0
  117. package/dist/{migration-DAJY-NmR.mjs → migration-_C5W2uXF.mjs} +2 -2
  118. package/dist/{migration-DAJY-NmR.mjs.map → migration-_C5W2uXF.mjs.map} +1 -1
  119. package/dist/{migration-check-DONPyXff-KpD0q3Zh.mjs → migration-check-DHYPMUFe-Cni_ZUzB.mjs} +33 -30
  120. package/dist/migration-check-DHYPMUFe-Cni_ZUzB.mjs.map +1 -0
  121. package/dist/{migration-check-BfOnfgyY-DII6Ty5m.mjs → migration-check-zgqYe3SB-B6LI6wY7.mjs} +9 -8
  122. package/dist/migration-check-zgqYe3SB-B6LI6wY7.mjs.map +1 -0
  123. package/dist/{migration-command-scaffold-CGcbYM2B-C3B8S3c-.mjs → migration-command-scaffold-DsT7ke7B-D3u913Po.mjs} +7 -6
  124. package/dist/migration-command-scaffold-DsT7ke7B-D3u913Po.mjs.map +1 -0
  125. package/dist/{migration-graph-HKch1Xk4-DD-3zdSg.mjs → migration-graph-CChCjts3-ERrIm5aT.mjs} +3 -3
  126. package/dist/{migration-graph-HKch1Xk4-DD-3zdSg.mjs.map → migration-graph-CChCjts3-ERrIm5aT.mjs.map} +1 -1
  127. package/dist/{migration-graph-BHiSuhBR.mjs → migration-graph-Dm9gU0oE-DxPD_SNA.mjs} +10 -9
  128. package/dist/migration-graph-Dm9gU0oE-DxPD_SNA.mjs.map +1 -0
  129. package/dist/{migration-list-C9OPCMt--BBm2c7tN.mjs → migration-list-Bkase_ZM-D-bErpSr.mjs} +4 -4
  130. package/dist/migration-list-Bkase_ZM-D-bErpSr.mjs.map +1 -0
  131. package/dist/{migration-list-BkTNEeOK.mjs → migration-list-DDGUTC8Y-B_X7rkez.mjs} +9 -8
  132. package/dist/migration-list-DDGUTC8Y-B_X7rkez.mjs.map +1 -0
  133. package/dist/{migration-log-CqrwQXER-cqf2INDN.mjs → migration-log-Cft50PRu-DcnHdxT4.mjs} +9 -7
  134. package/dist/migration-log-Cft50PRu-DcnHdxT4.mjs.map +1 -0
  135. package/dist/{migration-new-NuMfcbH8.mjs → migration-new-D9GHbYwF-C8D22HXG.mjs} +25 -5
  136. package/dist/migration-new-D9GHbYwF-C8D22HXG.mjs.map +1 -0
  137. package/dist/{migration-new-Cjhe_MIE-CIovsuXK.mjs → migration-new-RorO1I8r-Ch8NQ4GQ.mjs} +19 -27
  138. package/dist/migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map +1 -0
  139. package/dist/{migration-path-target-BPYp3LNc-DjdEIQsZ.mjs → migration-path-target-DhGt62Mi-dm4TU1hJ.mjs} +4 -4
  140. package/dist/migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map +1 -0
  141. package/dist/{migration-plan-D81XmVwy.mjs → migration-plan-BOhasCLr-GJWYoOA8.mjs} +25 -5
  142. package/dist/migration-plan-BOhasCLr-GJWYoOA8.mjs.map +1 -0
  143. package/dist/{migration-plan-DE7-vtqT-jgtSH4Lw.mjs → migration-plan-DrCTzrXH-CDJbdiC6.mjs} +29 -37
  144. package/dist/migration-plan-DrCTzrXH-CDJbdiC6.mjs.map +1 -0
  145. package/dist/{migration-plan-DvBJhxXg-B5aHAOtu.d.mts → migration-plan-t2e_8yD2-w5Ffa0V_.d.mts} +10 -5
  146. package/dist/migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map +1 -0
  147. package/dist/{migration-show-DEsLJ6-a.mjs → migration-show-DRARjIbv-1p6EE_Uw.mjs} +13 -11
  148. package/dist/migration-show-DRARjIbv-1p6EE_Uw.mjs.map +1 -0
  149. package/dist/{migration-status-DfLM3VqL.mjs → migration-status-Yh0eOQJN-YpcPDpNh.mjs} +14 -12
  150. package/dist/migration-status-Yh0eOQJN-YpcPDpNh.mjs.map +1 -0
  151. package/dist/migration-tools.d.mts +2 -2
  152. package/dist/migration-tools.mjs +8 -8
  153. package/dist/migration-tools__aggregate.d.mts +1 -1
  154. package/dist/migration-tools__aggregate.mjs +1 -1
  155. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  156. package/dist/migration-tools__io.mjs +1 -1
  157. package/dist/migration-tools__migration-ts.mjs +1 -1
  158. package/dist/migration-tools__migration.mjs +1 -1
  159. package/dist/migration-tools__spaces.d.mts +1 -1
  160. package/dist/migration-tools__spaces.mjs +2 -2
  161. package/dist/{migration-ts-FyF55c4M.mjs → migration-ts-BoHxxGvi.mjs} +2 -2
  162. package/dist/{migration-ts-FyF55c4M.mjs.map → migration-ts-BoHxxGvi.mjs.map} +1 -1
  163. package/dist/{project-import-root-C_bd0ooL-CusfluWF.mjs → project-import-root--e8xli8Z-Bfrvrv67.mjs} +3 -3
  164. package/dist/project-import-root--e8xli8Z-Bfrvrv67.mjs.map +1 -0
  165. package/dist/{ref-DrAvdDhN-q1ccuI03.mjs → ref-BQcl8Ksv-BYZY0Ktb.mjs} +12 -28
  166. package/dist/ref-BQcl8Ksv-BYZY0Ktb.mjs.map +1 -0
  167. package/dist/{ref-D6JzE8nq.mjs → ref-Cu7Zc1Hv-_R4MnDfr.mjs} +30 -7
  168. package/dist/ref-Cu7Zc1Hv-_R4MnDfr.mjs.map +1 -0
  169. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs} +3 -3
  170. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs.map → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs.map} +1 -1
  171. package/dist/{ref-resolution-_S4xTT2L-JfNjZU9d.mjs → ref-resolution-BYCRg72z-DFhwf-XR.mjs} +3 -3
  172. package/dist/ref-resolution-BYCRg72z-DFhwf-XR.mjs.map +1 -0
  173. package/dist/{spaces-DxuvClN9.mjs → spaces-DBTCE3Js.mjs} +6 -6
  174. package/dist/{spaces-DxuvClN9.mjs.map → spaces-DBTCE3Js.mjs.map} +1 -1
  175. package/dist/{spaces-D5qtTlhj.d.mts → spaces-tWQi7CUv.d.mts} +2 -2
  176. package/dist/{spaces-D5qtTlhj.d.mts.map → spaces-tWQi7CUv.d.mts.map} +1 -1
  177. package/dist/{telemetry-DVBHDQd6-CWNTFnMO.mjs → telemetry-Dh6e0ams-BsjGN3tQ.mjs} +5 -4
  178. package/dist/telemetry-Dh6e0ams-BsjGN3tQ.mjs.map +1 -0
  179. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs +645 -0
  180. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs.map +1 -0
  181. package/dist/{verify-C6L_hiJU-MX67LFfI.mjs → verify-DBsKxZrK-eDPxNiSS.mjs} +3 -3
  182. package/dist/verify-DBsKxZrK-eDPxNiSS.mjs.map +1 -0
  183. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs} +2 -2
  184. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs.map} +1 -1
  185. package/dist/vite-plugin-contract-emit.mjs +13 -3
  186. package/dist/vite-plugin-contract-emit.mjs.map +1 -1
  187. package/package.json +13 -12
  188. package/dist/caught-errors-D7Qznyrm-DaZubR00.mjs.map +0 -1
  189. package/dist/client-BNAEJZ76-ld7eOxpZ.mjs.map +0 -1
  190. package/dist/command-helpers-C4WpR-QE-DNllqff1.mjs +0 -1627
  191. package/dist/command-helpers-C4WpR-QE-DNllqff1.mjs.map +0 -1
  192. package/dist/contract-at-errors-Dv1mxKYO-D4xfRBW5.mjs.map +0 -1
  193. package/dist/contract-emit-B65_UiFn.d.mts.map +0 -1
  194. package/dist/contract-emit-DFu7h-Zl-7DBgYNv7.mjs.map +0 -1
  195. package/dist/contract-emit-DT0JKUZT-BYE7WZPc.mjs.map +0 -1
  196. package/dist/contract-infer-C_b7E71m-D2UO-X-k.mjs.map +0 -1
  197. package/dist/contract-snapshot-resolution-SATuw0JW-DpTZJd1x.mjs.map +0 -1
  198. package/dist/contract-space-aggregate-loader-C5r12INu-DfE0nmtZ.mjs.map +0 -1
  199. package/dist/db-init-Cqjw5Flp.mjs.map +0 -1
  200. package/dist/db-schema-CRGCFKlH.mjs.map +0 -1
  201. package/dist/db-sign-BPQduGHb.mjs.map +0 -1
  202. package/dist/db-update-DuEk-ra5.mjs.map +0 -1
  203. package/dist/db-verify-DPH4lonK-pteoYVnK.mjs.map +0 -1
  204. package/dist/exports-DVoyX2LM.mjs.map +0 -1
  205. package/dist/format-DyVeO1z5-D1lnTJaz.mjs.map +0 -1
  206. package/dist/framework-components-ioeTnj2Z-yyQtaVWk.mjs.map +0 -1
  207. package/dist/index-Deu3DQZI.d.mts.map +0 -1
  208. package/dist/init-BwYYd10C-CJq9i42m.mjs.map +0 -1
  209. package/dist/inspect-live-schema-CXH4ZGHT-BfUdyZme.mjs.map +0 -1
  210. package/dist/invariants-BzYfO9IL-BPDPDIr0.mjs.map +0 -1
  211. package/dist/legend-5iwwlLU2-Bit8enjF.mjs.map +0 -1
  212. package/dist/migrate-Bfsw18KQ.mjs.map +0 -1
  213. package/dist/migrate-show-CO5OiR3J-DE4NIjvW.mjs.map +0 -1
  214. package/dist/migrate-show-Cu3k9mZm-B-nCgvK1.d.mts.map +0 -1
  215. package/dist/migration-check-BfOnfgyY-DII6Ty5m.mjs.map +0 -1
  216. package/dist/migration-check-DONPyXff-KpD0q3Zh.mjs.map +0 -1
  217. package/dist/migration-command-scaffold-CGcbYM2B-C3B8S3c-.mjs.map +0 -1
  218. package/dist/migration-graph-BHiSuhBR.mjs.map +0 -1
  219. package/dist/migration-list-BkTNEeOK.mjs.map +0 -1
  220. package/dist/migration-list-C9OPCMt--BBm2c7tN.mjs.map +0 -1
  221. package/dist/migration-log-CqrwQXER-cqf2INDN.mjs.map +0 -1
  222. package/dist/migration-new-Cjhe_MIE-CIovsuXK.mjs.map +0 -1
  223. package/dist/migration-new-NuMfcbH8.mjs.map +0 -1
  224. package/dist/migration-path-target-BPYp3LNc-DjdEIQsZ.mjs.map +0 -1
  225. package/dist/migration-plan-D81XmVwy.mjs.map +0 -1
  226. package/dist/migration-plan-DE7-vtqT-jgtSH4Lw.mjs.map +0 -1
  227. package/dist/migration-plan-DvBJhxXg-B5aHAOtu.d.mts.map +0 -1
  228. package/dist/migration-show-DEsLJ6-a.mjs.map +0 -1
  229. package/dist/migration-status-DfLM3VqL.mjs.map +0 -1
  230. package/dist/project-import-root-C_bd0ooL-CusfluWF.mjs.map +0 -1
  231. package/dist/ref-D6JzE8nq.mjs.map +0 -1
  232. package/dist/ref-DrAvdDhN-q1ccuI03.mjs.map +0 -1
  233. package/dist/ref-resolution-_S4xTT2L-JfNjZU9d.mjs.map +0 -1
  234. package/dist/telemetry-DVBHDQd6-CWNTFnMO.mjs.map +0 -1
  235. package/dist/verify-C6L_hiJU-MX67LFfI.mjs.map +0 -1
@@ -1,17 +1,17 @@
1
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";
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-kpuB2oCK.mjs";
3
3
  import { n as verifyMigrationHash, t as computeMigrationHash } from "./hash-DH8hl5Rq-BpM2t3Nu.mjs";
4
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";
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-CbyTkKP6.mjs";
6
6
  import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
7
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";
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-DZPPCwWO.mjs";
9
+ import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-DBTCE3Js.mjs";
11
10
  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";
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-B2BL8z3i-DGGFB7Mj.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-BKbHUHLA.mjs";
13
13
  import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-Ct2GMcNB.mjs";
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-DAJY-NmR.mjs";
14
+ import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-BoHxxGvi.mjs";
15
+ import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-_C5W2uXF.mjs";
16
16
  import { t as ledgerOriginFromStored } from "./ledger-origin-D7PN4Fon.mjs";
17
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 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";
1
+ 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-CA6bJ8UO.mjs";
2
2
  export { type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractSpaceAggregate, type DeclaredExtensionEntry, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, type SchemaCheckSection, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, computeIntegrityViolations, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, verifyMigration };
@@ -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-D53gnb7v.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-BKbHUHLA.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-C9-J6OBn-ByElY0EC.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-kpuB2oCK.mjs";
2
2
  export { contractSnapshotDir, readContractSnapshotDts, readContractSnapshotJson, readContractSnapshotJsonTolerant, snapshotsImportPathFrom, writeContractSnapshot };
@@ -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-CHUUeHh0-CoCBe9eN.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-CbyTkKP6.mjs";
2
2
  export { copyFilesWithRename, formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, readMigrationPackage, readMigrationsDir, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage };
@@ -1,2 +1,2 @@
1
- import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-FyF55c4M.mjs";
1
+ import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-BoHxxGvi.mjs";
2
2
  export { detectScaffoldRuntime, hasMigrationTs, shebangLineFor, writeMigrationTs };
@@ -1,2 +1,2 @@
1
- import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-DAJY-NmR.mjs";
1
+ import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-_C5W2uXF.mjs";
2
2
  export { Migration, MigrationContractViews, buildMigrationArtifacts, isDirectEntrypoint };
@@ -1,3 +1,3 @@
1
1
  import { a as VerifyContractSpacesResult, i as VerifyContractSpacesInputs, n as SpaceMarkerRecord, o as listContractSpaceDirectories, r as SpaceVerifierViolation, s as verifyContractSpaces, t as ContractSpaceHeadRecord } from "./verify-contract-spaces-Cc1u_wJo-BilPJS2S.mjs";
2
- 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";
2
+ 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-tWQi7CUv.mjs";
3
3
  export { APP_SPACE_ID, type ComputeExtensionSpaceApplyPathInputs, type ContractSpaceArtifactInputs, type ContractSpaceHeadRecord, type ContractSpaceHeadRef, type DescriptorSelfConsistencyInputs, type DiskContractSpaceState, type ExtensionSpaceApplyPathOutcome, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, type SpaceApplyInput, type SpaceMarkerRecord, type SpacePlanInput, type SpacePlanOutput, type SpaceVerifierViolation, type ValidSpaceId, type VerifyContractSpacesInputs, type VerifyContractSpacesResult, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };
@@ -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-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";
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-DZPPCwWO.mjs";
2
+ import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-DBTCE3Js.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,6 +1,6 @@
1
1
  import { join } from "pathe";
2
- import { stat, writeFile } from "node:fs/promises";
3
2
  import { format } from "prettier";
3
+ import { stat, writeFile } from "node:fs/promises";
4
4
  //#region ../../../1-framework/3-tooling/migration/dist/exports/migration-ts.mjs
5
5
  /**
6
6
  * Utilities for reading/writing `migration.ts` files.
@@ -64,4 +64,4 @@ function shebangLineFor(runtime) {
64
64
  //#endregion
65
65
  export { writeMigrationTs as i, hasMigrationTs as n, shebangLineFor as r, detectScaffoldRuntime as t };
66
66
 
67
- //# sourceMappingURL=migration-ts-FyF55c4M.mjs.map
67
+ //# sourceMappingURL=migration-ts-BoHxxGvi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-ts-FyF55c4M.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/migration-ts.mjs"],"sourcesContent":["import { join } from \"pathe\";\nimport { stat, writeFile } from \"node:fs/promises\";\nimport { format } from \"prettier\";\n//#region src/migration-ts.ts\n/**\n* Utilities for reading/writing `migration.ts` files.\n*\n* Rendering migration.ts source is the target's responsibility — the CLI\n* obtains source strings from a planner's `plan.renderTypeScript()`. The\n* helper here is limited to file I/O: writing the returned source with the\n* right executable bit and probing for existence.\n*/\nconst MIGRATION_TS_FILE = \"migration.ts\";\n/**\n* Writes a pre-rendered `migration.ts` source string to the given package\n* directory. If the source begins with a shebang, the file is written with\n* executable permissions (0o755) so it can be run directly via\n* `./migration.ts` — the rendered scaffold ends with\n* `MigrationCLI.run(import.meta.url, M)` from\n* `@internal/cli/migration-cli` (re-exported by the postgres facade),\n* which guards on the entrypoint and serializes when the file is the main\n* module.\n*\n* The source is run through prettier before writing so migration renderers\n* can produce structurally-correct but loosely-indented source and rely on\n* a single canonical format on disk. Matches what `@internal/emitter`\n* already does for generated `contract.d.ts`.\n*/\nasync function writeMigrationTs(packageDir, content) {\n\tconst formatted = await formatMigrationTsSource(content);\n\tconst isExecutable = formatted.startsWith(\"#!\");\n\tawait writeFile(join(packageDir, MIGRATION_TS_FILE), formatted, isExecutable ? { mode: 493 } : void 0);\n}\nasync function formatMigrationTsSource(source) {\n\treturn format(source, {\n\t\tparser: \"typescript\",\n\t\tsingleQuote: true,\n\t\tsemi: true,\n\t\tprintWidth: 100\n\t});\n}\n/**\n* Checks whether a migration.ts file exists in the package directory.\n*/\nasync function hasMigrationTs(packageDir) {\n\ttry {\n\t\treturn (await stat(join(packageDir, MIGRATION_TS_FILE))).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/runtime-detection.ts\nfunction detectScaffoldRuntime() {\n\tif (typeof globalThis.Bun !== \"undefined\") return \"bun\";\n\tif (typeof globalThis.Deno !== \"undefined\") return \"deno\";\n\treturn \"node\";\n}\nfunction shebangLineFor(runtime) {\n\tswitch (runtime) {\n\t\tcase \"bun\": return \"#!/usr/bin/env -S bun\";\n\t\tcase \"deno\": return \"#!/usr/bin/env -S deno run -A\";\n\t\tcase \"node\": return \"#!/usr/bin/env -S node\";\n\t}\n}\n//#endregion\nexport { detectScaffoldRuntime, hasMigrationTs, shebangLineFor, writeMigrationTs };\n\n//# sourceMappingURL=migration-ts.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,oBAAoB;;;;;;;;;;;;;;;;AAgB1B,eAAe,iBAAiB,YAAY,SAAS;CACpD,MAAM,YAAY,MAAM,wBAAwB,OAAO;CACvD,MAAM,eAAe,UAAU,WAAW,IAAI;CAC9C,MAAM,UAAU,KAAK,YAAY,iBAAiB,GAAG,WAAW,eAAe,EAAE,MAAM,IAAI,IAAI,KAAK,CAAC;AACtG;AACA,eAAe,wBAAwB,QAAQ;CAC9C,OAAO,OAAO,QAAQ;EACrB,QAAQ;EACR,aAAa;EACb,MAAM;EACN,YAAY;CACb,CAAC;AACF;;;;AAIA,eAAe,eAAe,YAAY;CACzC,IAAI;EACH,QAAQ,MAAM,KAAK,KAAK,YAAY,iBAAiB,CAAC,EAAA,CAAG,OAAO;CACjE,QAAQ;EACP,OAAO;CACR;AACD;AAGA,SAAS,wBAAwB;CAChC,IAAI,OAAO,WAAW,QAAQ,aAAa,OAAO;CAClD,IAAI,OAAO,WAAW,SAAS,aAAa,OAAO;CACnD,OAAO;AACR;AACA,SAAS,eAAe,SAAS;CAChC,QAAQ,SAAR;EACC,KAAK,OAAO,OAAO;EACnB,KAAK,QAAQ,OAAO;EACpB,KAAK,QAAQ,OAAO;CACrB;AACD"}
1
+ {"version":3,"file":"migration-ts-BoHxxGvi.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/migration-ts.mjs"],"sourcesContent":["import { join } from \"pathe\";\nimport { stat, writeFile } from \"node:fs/promises\";\nimport { format } from \"prettier\";\n//#region src/migration-ts.ts\n/**\n* Utilities for reading/writing `migration.ts` files.\n*\n* Rendering migration.ts source is the target's responsibility — the CLI\n* obtains source strings from a planner's `plan.renderTypeScript()`. The\n* helper here is limited to file I/O: writing the returned source with the\n* right executable bit and probing for existence.\n*/\nconst MIGRATION_TS_FILE = \"migration.ts\";\n/**\n* Writes a pre-rendered `migration.ts` source string to the given package\n* directory. If the source begins with a shebang, the file is written with\n* executable permissions (0o755) so it can be run directly via\n* `./migration.ts` — the rendered scaffold ends with\n* `MigrationCLI.run(import.meta.url, M)` from\n* `@internal/cli/migration-cli` (re-exported by the postgres facade),\n* which guards on the entrypoint and serializes when the file is the main\n* module.\n*\n* The source is run through prettier before writing so migration renderers\n* can produce structurally-correct but loosely-indented source and rely on\n* a single canonical format on disk. Matches what `@internal/emitter`\n* already does for generated `contract.d.ts`.\n*/\nasync function writeMigrationTs(packageDir, content) {\n\tconst formatted = await formatMigrationTsSource(content);\n\tconst isExecutable = formatted.startsWith(\"#!\");\n\tawait writeFile(join(packageDir, MIGRATION_TS_FILE), formatted, isExecutable ? { mode: 493 } : void 0);\n}\nasync function formatMigrationTsSource(source) {\n\treturn format(source, {\n\t\tparser: \"typescript\",\n\t\tsingleQuote: true,\n\t\tsemi: true,\n\t\tprintWidth: 100\n\t});\n}\n/**\n* Checks whether a migration.ts file exists in the package directory.\n*/\nasync function hasMigrationTs(packageDir) {\n\ttry {\n\t\treturn (await stat(join(packageDir, MIGRATION_TS_FILE))).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/runtime-detection.ts\nfunction detectScaffoldRuntime() {\n\tif (typeof globalThis.Bun !== \"undefined\") return \"bun\";\n\tif (typeof globalThis.Deno !== \"undefined\") return \"deno\";\n\treturn \"node\";\n}\nfunction shebangLineFor(runtime) {\n\tswitch (runtime) {\n\t\tcase \"bun\": return \"#!/usr/bin/env -S bun\";\n\t\tcase \"deno\": return \"#!/usr/bin/env -S deno run -A\";\n\t\tcase \"node\": return \"#!/usr/bin/env -S node\";\n\t}\n}\n//#endregion\nexport { detectScaffoldRuntime, hasMigrationTs, shebangLineFor, writeMigrationTs };\n\n//# sourceMappingURL=migration-ts.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,oBAAoB;;;;;;;;;;;;;;;;AAgB1B,eAAe,iBAAiB,YAAY,SAAS;CACpD,MAAM,YAAY,MAAM,wBAAwB,OAAO;CACvD,MAAM,eAAe,UAAU,WAAW,IAAI;CAC9C,MAAM,UAAU,KAAK,YAAY,iBAAiB,GAAG,WAAW,eAAe,EAAE,MAAM,IAAI,IAAI,KAAK,CAAC;AACtG;AACA,eAAe,wBAAwB,QAAQ;CAC9C,OAAO,OAAO,QAAQ;EACrB,QAAQ;EACR,aAAa;EACb,MAAM;EACN,YAAY;CACb,CAAC;AACF;;;;AAIA,eAAe,eAAe,YAAY;CACzC,IAAI;EACH,QAAQ,MAAM,KAAK,KAAK,YAAY,iBAAiB,CAAC,EAAA,CAAG,OAAO;CACjE,QAAQ;EACP,OAAO;CACR;AACD;AAGA,SAAS,wBAAwB;CAChC,IAAI,OAAO,WAAW,QAAQ,aAAa,OAAO;CAClD,IAAI,OAAO,WAAW,SAAS,aAAa,OAAO;CACnD,OAAO;AACR;AACA,SAAS,eAAe,SAAS;CAChC,QAAQ,SAAR;EACC,KAAK,OAAO,OAAO;EACnB,KAAK,QAAQ,OAAO;EACpB,KAAK,QAAQ,OAAO;CACrB;AACD"}
@@ -1,8 +1,8 @@
1
- import { O as errorRuntime$1 } from "./command-helpers-C4WpR-QE-DNllqff1.mjs";
1
+ import { T as errorRuntime$1 } from "./cli-errors-kU09RUaz-CUkQ9XuM.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";
5
- //#region ../../../1-framework/3-tooling/cli/dist/project-import-root-C_bd0ooL.mjs
5
+ //#region ../../../1-framework/3-tooling/cli/dist/project-import-root--e8xli8Z.mjs
6
6
  /**
7
7
  * The import root of the project being emitted for, read from its own
8
8
  * manifest.
@@ -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-CusfluWF.mjs.map
101
+ //# sourceMappingURL=project-import-root--e8xli8Z-Bfrvrv67.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-import-root--e8xli8Z-Bfrvrv67.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/project-import-root--e8xli8Z.mjs"],"sourcesContent":["import { T as errorRuntime } from \"./cli-errors-kU09RUaz.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--e8xli8Z.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"}
@@ -1,19 +1,16 @@
1
+ import { A as errorUnexpected, C as errorRefSetHashNotInGraph, S as errorRefSetEmptySentinel, T as errorRuntime$1, j as mapRefResolutionError, t as CliStructuredError$1, u as errorFileNotFound, x as errorRefSetBundleNotFound } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
1
2
  import { t as MigrationToolsError } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
- import { r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
3
+ import { r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
3
4
  import "./constants-CM-w38DQ-Cz_EXbOc.mjs";
4
5
  import { r as findLatestMigration } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
5
- import { E as errorRefSetHashNotInGraph, N as errorUnexpected, O as errorRuntime$1, T as errorRefSetEmptySentinel, Z as mapRefResolutionError, h as errorFileNotFound, it as resolveMigrationPaths, t as CliStructuredError$1, w as errorRefSetBundleNotFound } from "./command-helpers-C4WpR-QE-DNllqff1.mjs";
6
- import { a as loadConfigForSections } from "./exports-DVoyX2LM.mjs";
7
- import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, u as validateRefValue } from "./refs-B2BL8z3i-DGGFB7Mj.mjs";
6
+ import { g as resolveMigrationPaths } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
8
7
  import { n as isGraphNode } from "./graph-membership-BEmNEMtP-rz61CLM5.mjs";
9
- import { r as buildReadAggregate } from "./contract-space-aggregate-loader-C5r12INu-DfE0nmtZ.mjs";
8
+ import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, u as validateRefValue } from "./refs-B2BL8z3i-DGGFB7Mj.mjs";
9
+ import { r as buildReadAggregate } from "./contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs";
10
10
  import { n as parseContractRef } from "./ref-resolution-Ct2GMcNB.mjs";
11
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
12
11
  import { join } from "pathe";
13
- //#region ../../../1-framework/3-tooling/cli/dist/ref-DrAvdDhN.mjs
14
- /**
15
- * Policy cores of the `ref set` / `ref delete` / `ref list` commands: load config, resolve the reference, and write or read the refs index.
16
- */
12
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
13
+ //#region ../../../1-framework/3-tooling/cli/dist/ref-BQcl8Ksv.mjs
17
14
  function mapError(error) {
18
15
  if (MigrationToolsError.is(error)) return error;
19
16
  return errorUnexpected(error instanceof Error ? error.message : String(error));
@@ -26,18 +23,9 @@ function cliErrorInvalidRefName(name) {
26
23
  }
27
24
  async function executeRefSetCommand(name, contractInput, options) {
28
25
  if (!validateRefName(name)) return notOk(cliErrorInvalidRefName(name));
29
- const configResult = await loadConfigForSections(options.config, [
30
- "family",
31
- "target",
32
- "adapter",
33
- "extensions",
34
- "migrations",
35
- "contract"
36
- ]);
37
- if (!configResult.ok) return configResult;
38
- const config = configResult.value;
26
+ const config = options.config;
39
27
  try {
40
- const { migrationsDir, refsDir } = resolveMigrationPaths(options.config, config);
28
+ const { migrationsDir, refsDir } = resolveMigrationPaths(options.configPath, config, options.cwd);
41
29
  const loaded = await buildReadAggregate(config, { migrationsDir });
42
30
  if (!loaded.ok) return notOk(loaded.failure);
43
31
  const graph = loaded.value.aggregate.app.graph();
@@ -85,10 +73,8 @@ async function executeRefSetCommand(name, contractInput, options) {
85
73
  }
86
74
  }
87
75
  async function executeRefDeleteCommand(name, options) {
88
- const configResult = await loadConfigForSections(options.config, ["migrations"]);
89
- if (!configResult.ok) return configResult;
90
76
  try {
91
- const { refsDir } = resolveMigrationPaths(options.config, configResult.value);
77
+ const { refsDir } = resolveMigrationPaths(options.configPath, options.config, options.cwd);
92
78
  await deleteRef(refsDir, name);
93
79
  return ok({
94
80
  ok: true,
@@ -101,10 +87,8 @@ async function executeRefDeleteCommand(name, options) {
101
87
  }
102
88
  }
103
89
  async function executeRefListCommand(options) {
104
- const configResult = await loadConfigForSections(options.config, ["migrations"]);
105
- if (!configResult.ok) return configResult;
106
90
  try {
107
- const { refsDir } = resolveMigrationPaths(options.config, configResult.value);
91
+ const { refsDir } = resolveMigrationPaths(options.configPath, options.config, options.cwd);
108
92
  return ok({
109
93
  ok: true,
110
94
  refs: await readRefs(refsDir)
@@ -117,4 +101,4 @@ async function executeRefListCommand(options) {
117
101
  //#endregion
118
102
  export { executeRefListCommand as n, executeRefSetCommand as r, executeRefDeleteCommand as t };
119
103
 
120
- //# sourceMappingURL=ref-DrAvdDhN-q1ccuI03.mjs.map
104
+ //# sourceMappingURL=ref-BQcl8Ksv-BYZY0Ktb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-BQcl8Ksv-BYZY0Ktb.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/ref-BQcl8Ksv.mjs"],"sourcesContent":["import { A as errorUnexpected, C as errorRefSetHashNotInGraph, S as errorRefSetEmptySentinel, T as errorRuntime, j as mapRefResolutionError, t as CliStructuredError, u as errorFileNotFound, x as errorRefSetBundleNotFound } from \"./cli-errors-kU09RUaz.mjs\";\nimport { s as resolveMigrationPaths } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { r as buildReadAggregate } from \"./contract-space-aggregate-loader-DOzo1sk9.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { join } from \"pathe\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\nimport { MigrationToolsError } from \"@internal/migration-tools/errors\";\nimport { findLatestMigration, isGraphNode } from \"@internal/migration-tools/migration-graph\";\nimport { contractSnapshotDir, readContractSnapshotJson } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { deleteRef, readRefs, validateRefName, validateRefValue, writeRef } from \"@internal/migration-tools/refs\";\nimport { parseContractRef } from \"@internal/migration-tools/ref-resolution\";\n//#region src/control-api/operations/ref.ts\nfunction mapError(error) {\n\tif (MigrationToolsError.is(error)) return error;\n\treturn errorUnexpected(error instanceof Error ? error.message : String(error));\n}\nfunction cliErrorInvalidRefName(name) {\n\treturn errorRuntime(\"MIGRATION.INVALID_REF_NAME\", `Invalid ref name \"${name}\"`, {\n\t\twhy: `Ref name \"${name}\" does not match the required format`,\n\t\tfix: \"Ref names must be lowercase alphanumeric with hyphens or forward slashes, no `.` or `..` segments\"\n\t});\n}\nasync function executeRefSetCommand(name, contractInput, options) {\n\tif (!validateRefName(name)) return notOk(cliErrorInvalidRefName(name));\n\tconst config = options.config;\n\ttry {\n\t\tconst { migrationsDir, refsDir } = resolveMigrationPaths(options.configPath, config, options.cwd);\n\t\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\t\tif (!loaded.ok) return notOk(loaded.failure);\n\t\tconst graph = loaded.value.aggregate.app.graph();\n\t\tconst bundles = loaded.value.aggregate.app.packages;\n\t\tconst refs = loaded.value.aggregate.app.refs;\n\t\tlet resolvedHash;\n\t\tif (validateRefValue(contractInput)) resolvedHash = contractInput;\n\t\telse {\n\t\t\tconst refResult = parseContractRef(contractInput, {\n\t\t\t\tgraph,\n\t\t\t\trefs\n\t\t\t});\n\t\t\tif (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));\n\t\t\tresolvedHash = refResult.value.hash;\n\t\t}\n\t\tif (resolvedHash === EMPTY_CONTRACT_HASH) return notOk(errorRefSetEmptySentinel(resolvedHash));\n\t\tif (!isGraphNode(resolvedHash, graph)) {\n\t\t\tconst graphTip = findLatestMigration(graph)?.to ?? null;\n\t\t\treturn notOk(errorRefSetHashNotInGraph(resolvedHash, [...graph.nodes].sort(), graphTip));\n\t\t}\n\t\tif (!bundles.find((bundle) => bundle.metadata.to === resolvedHash)) return notOk(errorRefSetBundleNotFound(resolvedHash));\n\t\tconst contractJsonPath = join(contractSnapshotDir(migrationsDir, resolvedHash), \"contract.json\");\n\t\ttry {\n\t\t\tawait readContractSnapshotJson(migrationsDir, resolvedHash);\n\t\t} catch (readError) {\n\t\t\tif (MigrationToolsError.is(readError) && readError.code === \"MIGRATION.CONTRACT_SNAPSHOT_MISSING\") return notOk(errorFileNotFound(contractJsonPath, {\n\t\t\t\twhy: `Migration bundle for hash ${resolvedHash} is missing its contract snapshot at ${contractJsonPath}`,\n\t\t\t\tfix: \"Restore migrations/snapshots/ from version control, or re-run the command that produced this migration to regenerate its snapshot.\"\n\t\t\t}));\n\t\t\tthrow readError;\n\t\t}\n\t\tawait writeRef(refsDir, name, {\n\t\t\thash: resolvedHash,\n\t\t\tinvariants: []\n\t\t});\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tref: name,\n\t\t\thash: resolvedHash,\n\t\t\tinvariants: []\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\nasync function executeRefDeleteCommand(name, options) {\n\ttry {\n\t\tconst { refsDir } = resolveMigrationPaths(options.configPath, options.config, options.cwd);\n\t\tawait deleteRef(refsDir, name);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tref: name,\n\t\t\tdeleted: true\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\nasync function executeRefListCommand(options) {\n\ttry {\n\t\tconst { refsDir } = resolveMigrationPaths(options.configPath, options.config, options.cwd);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\trefs: await readRefs(refsDir)\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof CliStructuredError) return notOk(error);\n\t\treturn notOk(mapError(error));\n\t}\n}\n//#endregion\nexport { executeRefListCommand as n, executeRefSetCommand as r, executeRefDeleteCommand as t };\n\n//# sourceMappingURL=ref-BQcl8Ksv.mjs.map"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,SAAS,OAAO;CACxB,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO;CAC1C,OAAO,gBAAgB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAC9E;AACA,SAAS,uBAAuB,MAAM;CACrC,OAAOA,eAAa,8BAA8B,qBAAqB,KAAK,IAAI;EAC/E,KAAK,aAAa,KAAK;EACvB,KAAK;CACN,CAAC;AACF;AACA,eAAe,qBAAqB,MAAM,eAAe,SAAS;CACjE,IAAI,CAAC,gBAAgB,IAAI,GAAG,OAAO,MAAM,uBAAuB,IAAI,CAAC;CACrE,MAAM,SAAS,QAAQ;CACvB,IAAI;EACH,MAAM,EAAE,eAAe,YAAY,sBAAsB,QAAQ,YAAY,QAAQ,QAAQ,GAAG;EAChG,MAAM,SAAS,MAAM,mBAAmB,QAAQ,EAAE,cAAc,CAAC;EACjE,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,OAAO,OAAO;EAC3C,MAAM,QAAQ,OAAO,MAAM,UAAU,IA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,SAAS;CACrD,IAAI;EACH,MAAM,EAAE,YAAY,sBAAsB,QAAQ,YAAY,QAAQ,QAAQ,QAAQ,GAAG;EACzF,MAAM,UAAU,SAAS,IAAI;EAC7B,OAAO,GAAG;GACT,IAAI;GACJ,KAAK;GACL,SAAS;EACV,CAAC;CACF,SAAS,OAAO;EACf,IAAI,iBAAiBA,sBAAoB,OAAO,MAAM,KAAK;EAC3D,OAAO,MAAM,SAAS,KAAK,CAAC;CAC7B;AACD;AACA,eAAe,sBAAsB,SAAS;CAC7C,IAAI;EACH,MAAM,EAAE,YAAY,sBAAsB,QAAQ,YAAY,QAAQ,QAAQ,QAAQ,GAAG;EACzF,OAAO,GAAG;GACT,IAAI;GACJ,MAAM,MAAM,SAAS,OAAO;EAC7B,CAAC;CACF,SAAS,OAAO;EACf,IAAI,iBAAiBA,sBAAoB,OAAO,MAAM,KAAK;EAC3D,OAAO,MAAM,SAAS,KAAK,CAAC;CAC7B;AACD"}
@@ -1,14 +1,35 @@
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-DNllqff1.mjs";
2
- import { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from "./ref-DrAvdDhN-q1ccuI03.mjs";
1
+ import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
+ import { n as createTerminalUI } from "./terminal-ui-ypPE9cN6-ilMBkmwT.mjs";
3
+ import { f as parseGlobalFlags, i as formatCommandHelp, l as handleResult, p as parseGlobalFlagsOrExit, t as addGlobalOptions, v as setCommandDescriptions } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
4
+ import { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from "./ref-BQcl8Ksv-BYZY0Ktb.mjs";
5
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
+ import { ok } from "@prisma/orm-framework/utils/result";
3
7
  import { Command } from "commander";
4
- //#region ../../../1-framework/3-tooling/cli/dist/commands/ref.mjs
8
+ //#region ../../../1-framework/3-tooling/cli/dist/ref-Cu7Zc1Hv.mjs
9
+ async function refOperationOptions(options, sections) {
10
+ const configResult = await loadConfigForSections(options.config, sections);
11
+ if (!configResult.ok) return configResult;
12
+ return ok({
13
+ config: configResult.value,
14
+ cwd: process.cwd(),
15
+ ...ifDefined("configPath", options.config)
16
+ });
17
+ }
5
18
  function createRefSetCommand() {
6
19
  const command = new Command("set");
7
20
  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
21
  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
22
  const flags = parseGlobalFlagsOrExit(options);
10
23
  const ui = createTerminalUI(flags);
11
- const exitCode = handleResult(await executeRefSetCommand(name, hash, options), flags, ui, (value) => {
24
+ const operationOptions = await refOperationOptions(options, [
25
+ "family",
26
+ "target",
27
+ "adapter",
28
+ "extensions",
29
+ "migrations",
30
+ "contract"
31
+ ]);
32
+ const exitCode = handleResult(operationOptions.ok ? await executeRefSetCommand(name, hash, operationOptions.value) : operationOptions, flags, ui, (value) => {
12
33
  if (flags.json) ui.output(JSON.stringify(value));
13
34
  else if (!flags.quiet) ui.output(`Set ref "${value.ref}" → ${value.hash}`);
14
35
  });
@@ -22,7 +43,8 @@ function createRefDeleteCommand() {
22
43
  addGlobalOptions(command).argument("<name>", "Ref name to delete").option("--config <path>", "Path to prisma-next.config.ts").action(async (name, options) => {
23
44
  const flags = parseGlobalFlagsOrExit(options);
24
45
  const ui = createTerminalUI(flags);
25
- const exitCode = handleResult(await executeRefDeleteCommand(name, options), flags, ui, (value) => {
46
+ const operationOptions = await refOperationOptions(options, ["migrations"]);
47
+ const exitCode = handleResult(operationOptions.ok ? await executeRefDeleteCommand(name, operationOptions.value) : operationOptions, flags, ui, (value) => {
26
48
  if (flags.json) ui.output(JSON.stringify(value));
27
49
  else if (!flags.quiet) ui.output(`Deleted ref "${value.ref}"`);
28
50
  });
@@ -36,7 +58,8 @@ function createRefListCommand() {
36
58
  addGlobalOptions(command).option("--config <path>", "Path to prisma-next.config.ts").action(async (options) => {
37
59
  const flags = parseGlobalFlagsOrExit(options);
38
60
  const ui = createTerminalUI(flags);
39
- const exitCode = handleResult(await executeRefListCommand(options), flags, ui, (value) => {
61
+ const operationOptions = await refOperationOptions(options, ["migrations"]);
62
+ const exitCode = handleResult(operationOptions.ok ? await executeRefListCommand(operationOptions.value) : operationOptions, flags, ui, (value) => {
40
63
  if (flags.json) ui.output(JSON.stringify(value));
41
64
  else if (!flags.quiet) {
42
65
  const entries = Object.entries(value.refs);
@@ -69,4 +92,4 @@ function createRefCommand() {
69
92
  //#endregion
70
93
  export { createRefCommand as t };
71
94
 
72
- //# sourceMappingURL=ref-D6JzE8nq.mjs.map
95
+ //# sourceMappingURL=ref-Cu7Zc1Hv-_R4MnDfr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-Cu7Zc1Hv-_R4MnDfr.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/ref-Cu7Zc1Hv.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-ypPE9cN6.mjs\";\nimport { _ as handleResult, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, t as addGlobalOptions, y as formatCommandHelp } from \"./command-helpers-bGYd7Aab.mjs\";\nimport { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from \"./ref-BQcl8Ksv.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ok } from \"@internal/utils/result\";\n//#region src/commands/ref.ts\nasync function refOperationOptions(options, sections) {\n\tconst configResult = await loadConfigForSections(options.config, sections);\n\tif (!configResult.ok) return configResult;\n\treturn ok({\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd(),\n\t\t...ifDefined(\"configPath\", options.config)\n\t});\n}\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 operationOptions = await refOperationOptions(options, [\n\t\t\t\"family\",\n\t\t\t\"target\",\n\t\t\t\"adapter\",\n\t\t\t\"extensions\",\n\t\t\t\"migrations\",\n\t\t\t\"contract\"\n\t\t]);\n\t\tconst exitCode = handleResult(operationOptions.ok ? await executeRefSetCommand(name, hash, operationOptions.value) : operationOptions, 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 operationOptions = await refOperationOptions(options, [\"migrations\"]);\n\t\tconst exitCode = handleResult(operationOptions.ok ? await executeRefDeleteCommand(name, operationOptions.value) : operationOptions, 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 operationOptions = await refOperationOptions(options, [\"migrations\"]);\n\t\tconst exitCode = handleResult(operationOptions.ok ? await executeRefListCommand(operationOptions.value) : operationOptions, 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 as t };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kB;IAC1D;GACD;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR;AACA,SAAS,mBAAmB;CAC3B,MAAM,UAAU,IAAI,QAAQ,KAAK;CACjC,uBAAuB,SAAS,wBAAwB,4HAA4H;CACpL,iBAAiB,OAAO,CAAC,CAAC,cAAc;EACvC,aAAa,QAAQ,kBAAkB;GACtC,SAAS;GACT,OAAO,iBAAiB,CAAC,CAAC;EAC3B,CAAC;EACD,6BAA6B;CAC9B,CAAC;CACD,QAAQ,WAAW,oBAAoB,CAAC;CACxC,QAAQ,WAAW,uBAAuB,CAAC;CAC3C,QAAQ,WAAW,qBAAqB,CAAC;CACzC,OAAO;AACR"}
@@ -1,9 +1,9 @@
1
1
  import { b as errorInvalidRefName, t as MigrationToolsError } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
- import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
2
+ import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
3
3
  import { d as writeRef, l as validateRefName } from "./refs-B2BL8z3i-DGGFB7Mj.mjs";
4
4
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
- import { notOk, ok } from "@prisma/orm-framework/utils/result";
6
5
  import { readFile } from "node:fs/promises";
6
+ import { notOk, ok } from "@prisma/orm-framework/utils/result";
7
7
  //#region ../../../1-framework/3-tooling/cli/dist/ref-advancement-DaZBzm7m.mjs
8
8
  function computeRefAdvancementName(options) {
9
9
  if (options.advanceRef !== void 0) return options.advanceRef;
@@ -93,4 +93,4 @@ async function advanceRefSafely(args) {
93
93
  //#endregion
94
94
  export { readContractIR as a, executeRefAdvancement as i, buildRefAdvancementFields as n, resolveRefAdvancementFields as o, computeRefAdvancementName as r, advanceRefSafely as t };
95
95
 
96
- //# sourceMappingURL=ref-advancement-DaZBzm7m-BZQtedYC.mjs.map
96
+ //# sourceMappingURL=ref-advancement-DaZBzm7m-Deq5Cs7O.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ref-advancement-DaZBzm7m-BZQtedYC.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/ref-advancement-DaZBzm7m.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { readFile } from \"node:fs/promises\";\nimport { MigrationToolsError, errorInvalidRefName } from \"@internal/migration-tools/errors\";\nimport { writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { validateRefName, writeRef } from \"@internal/migration-tools/refs\";\n//#region src/control-api/operations/ref-advancement.ts\nfunction computeRefAdvancementName(options) {\n\tif (options.advanceRef !== void 0) return options.advanceRef;\n\tif (options.db === void 0) return \"db\";\n\treturn null;\n}\nasync function readContractIR(contractJson, contractJsonPath) {\n\treturn {\n\t\tcontract: contractJson,\n\t\tcontractDts: await readFile(contractJsonPath.replace(/\\.json$/i, \".d.ts\"), \"utf-8\")\n\t};\n}\nasync function executeRefAdvancement(refsDir, migrationsDir, name, hash, contractIR) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tawait writeContractSnapshot(migrationsDir, hash, {\n\t\tcontractJson: contractIR.contract,\n\t\tcontractDts: contractIR.contractDts\n\t});\n\tawait writeRef(refsDir, name, {\n\t\thash,\n\t\tinvariants: []\n\t});\n\treturn {\n\t\tname,\n\t\thash\n\t};\n}\nasync function buildRefAdvancementFields(options) {\n\tconst name = computeRefAdvancementName({\n\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t...ifDefined(\"db\", options.db)\n\t});\n\tif (name === null) return {\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: null\n\t};\n\tif (options.mode === \"plan\") return {\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: {\n\t\t\tname,\n\t\t\thash: options.hash\n\t\t}\n\t};\n\treturn {\n\t\tadvancedRef: await executeRefAdvancement(options.refsDir, options.migrationsDir, name, options.hash, options.contractIR),\n\t\tplannedAdvanceRef: null\n\t};\n}\n/**\n* Full ref-advancement phase for db init/update: ok({advancedRef:null, plannedAdvanceRef:null})\n* when computeRefAdvancementName is null; else readContractIR + buildRefAdvancementFields with\n* MigrationToolsError mapped, other errors rethrown.\n*/\nasync function resolveRefAdvancementFields(options) {\n\tif (computeRefAdvancementName({\n\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t...ifDefined(\"db\", options.db)\n\t}) === null) return ok({\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: null\n\t});\n\ttry {\n\t\tconst contractIR = await readContractIR(options.contractJson, options.contractJsonPath);\n\t\treturn ok(await buildRefAdvancementFields({\n\t\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t\t...ifDefined(\"db\", options.db),\n\t\t\trefsDir: options.refsDir,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\tcontractIR,\n\t\t\tmode: options.mode,\n\t\t\thash: options.hash\n\t\t}));\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n/** migrate's --advance-ref tail: executeRefAdvancement with MigrationToolsError passed through, others rethrown. */\nasync function advanceRefSafely(args) {\n\ttry {\n\t\treturn ok(await executeRefAdvancement(args.refsDir, args.migrationsDir, args.name, args.hash, args.contractIR));\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n//#endregion\nexport { readContractIR as a, executeRefAdvancement as i, buildRefAdvancementFields as n, resolveRefAdvancementFields as o, computeRefAdvancementName as r, advanceRefSafely as t };\n\n//# sourceMappingURL=ref-advancement-DaZBzm7m.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,0BAA0B,SAAS;CAC3C,IAAI,QAAQ,eAAe,KAAK,GAAG,OAAO,QAAQ;CAClD,IAAI,QAAQ,OAAO,KAAK,GAAG,OAAO;CAClC,OAAO;AACR;AACA,eAAe,eAAe,cAAc,kBAAkB;CA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M,QAAQ;GACd,MAAM,QAAQ;EACf,CAAC,CAAC;CACH,SAAS,OAAO;EACf,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACrD,MAAM;CACP;AACD;;AAEA,eAAe,iBAAiB,MAAM;CACrC,IAAI;EACH,OAAO,GAAG,MAAM,sBAAsB,KAAK,SAAS,KAAK,eAAe,KAAK,MAAM,KAAK,MAAM,KAAK,UAAU,CAAC;CAC/G,SAAS,OAAO;EACf,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACrD,MAAM;CACP;AACD"}
1
+ {"version":3,"file":"ref-advancement-DaZBzm7m-Deq5Cs7O.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/ref-advancement-DaZBzm7m.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { readFile } from \"node:fs/promises\";\nimport { MigrationToolsError, errorInvalidRefName } from \"@internal/migration-tools/errors\";\nimport { writeContractSnapshot } from \"@internal/migration-tools/contract-snapshot-store\";\nimport { validateRefName, writeRef } from \"@internal/migration-tools/refs\";\n//#region src/control-api/operations/ref-advancement.ts\nfunction computeRefAdvancementName(options) {\n\tif (options.advanceRef !== void 0) return options.advanceRef;\n\tif (options.db === void 0) return \"db\";\n\treturn null;\n}\nasync function readContractIR(contractJson, contractJsonPath) {\n\treturn {\n\t\tcontract: contractJson,\n\t\tcontractDts: await readFile(contractJsonPath.replace(/\\.json$/i, \".d.ts\"), \"utf-8\")\n\t};\n}\nasync function executeRefAdvancement(refsDir, migrationsDir, name, hash, contractIR) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tawait writeContractSnapshot(migrationsDir, hash, {\n\t\tcontractJson: contractIR.contract,\n\t\tcontractDts: contractIR.contractDts\n\t});\n\tawait writeRef(refsDir, name, {\n\t\thash,\n\t\tinvariants: []\n\t});\n\treturn {\n\t\tname,\n\t\thash\n\t};\n}\nasync function buildRefAdvancementFields(options) {\n\tconst name = computeRefAdvancementName({\n\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t...ifDefined(\"db\", options.db)\n\t});\n\tif (name === null) return {\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: null\n\t};\n\tif (options.mode === \"plan\") return {\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: {\n\t\t\tname,\n\t\t\thash: options.hash\n\t\t}\n\t};\n\treturn {\n\t\tadvancedRef: await executeRefAdvancement(options.refsDir, options.migrationsDir, name, options.hash, options.contractIR),\n\t\tplannedAdvanceRef: null\n\t};\n}\n/**\n* Full ref-advancement phase for db init/update: ok({advancedRef:null, plannedAdvanceRef:null})\n* when computeRefAdvancementName is null; else readContractIR + buildRefAdvancementFields with\n* MigrationToolsError mapped, other errors rethrown.\n*/\nasync function resolveRefAdvancementFields(options) {\n\tif (computeRefAdvancementName({\n\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t...ifDefined(\"db\", options.db)\n\t}) === null) return ok({\n\t\tadvancedRef: null,\n\t\tplannedAdvanceRef: null\n\t});\n\ttry {\n\t\tconst contractIR = await readContractIR(options.contractJson, options.contractJsonPath);\n\t\treturn ok(await buildRefAdvancementFields({\n\t\t\t...ifDefined(\"advanceRef\", options.advanceRef),\n\t\t\t...ifDefined(\"db\", options.db),\n\t\t\trefsDir: options.refsDir,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\tcontractIR,\n\t\t\tmode: options.mode,\n\t\t\thash: options.hash\n\t\t}));\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n/** migrate's --advance-ref tail: executeRefAdvancement with MigrationToolsError passed through, others rethrown. */\nasync function advanceRefSafely(args) {\n\ttry {\n\t\treturn ok(await executeRefAdvancement(args.refsDir, args.migrationsDir, args.name, args.hash, args.contractIR));\n\t} catch (error) {\n\t\tif (MigrationToolsError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n//#endregion\nexport { readContractIR as a, executeRefAdvancement as i, buildRefAdvancementFields as n, resolveRefAdvancementFields as o, computeRefAdvancementName as r, advanceRefSafely as t };\n\n//# sourceMappingURL=ref-advancement-DaZBzm7m.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,0BAA0B,SAAS;CAC3C,IAAI,QAAQ,eAAe,KAAK,GAAG,OAAO,QAAQ;CAClD,IAAI,QAAQ,OAAO,KAAK,GAAG,OAAO;CAClC,OAAO;AACR;AACA,eAAe,eAAe,cAAc,kBAAkB;CAC7D,OAAO;EACN,UAAU;EACV,aAAa,MAAM,SAAS,iBAAiB,QAAQ,YAAY,OAAO,GAAG,OAAO;CACnF;AACD;AACA,eAAe,sBAAsB,SAAS,eAAe,MAAM,MAAM,YAAY;CACpF,IAAI,CAAC,gBAAgB,IAAI,GAAG,MAAM,oBAAoB,IAAI;CAC1D,MAAM,sBAAsB,eAAe,MAAM;EAChD,cAAc,WAAW;EACzB,aAAa,WAAW;CACzB,CAAC;CACD,MAAM,SAAS,SAAS,MAAM;EAC7B;EACA,YAAY,CAAC;CACd,CAAC;CACD,OAAO;EACN;EACA;CACD;AACD;AACA,eAAe,0BAA0B,SAAS;CACjD,MAAM,OAAO,0BAA0B;EACtC,GAAG,UAAU,cAAc,QAAQ,UAAU;EAC7C,GAAG,UAAU,MAAM,QAAQ,EAAE;CAC9B,CAAC;CACD,IAAI,SAAS,MAAM,OAAO;EACzB,aAAa;EACb,mBAAmB;CACpB;CACA,IAAI,QAAQ,SAAS,QAAQ,OAAO;EACnC,aAAa;EACb,mBAAmB;GAClB;GACA,MAAM,QAAQ;EACf;CACD;CACA,OAAO;EACN,aAAa,MAAM,sBAAsB,QAAQ,SAAS,QAAQ,eAAe,MAAM,QAAQ,MAAM,QAAQ,UAAU;EACvH,mBAAmB;CACpB;AACD;;;;;;AAMA,eAAe,4BAA4B,SAAS;CACnD,IAAI,0BAA0B;EAC7B,GAAG,UAAU,cAAc,QAAQ,UAAU;EAC7C,GAAG,UAAU,MAAM,QAAQ,EAAE;CAC9B,CAAC,MAAM,MAAM,OAAO,GAAG;EACtB,aAAa;EACb,mBAAmB;CACpB,CAAC;CACD,IAAI;EACH,MAAM,aAAa,MAAM,eAAe,QAAQ,cAAc,QAAQ,gBAAgB;EACtF,OAAO,GAAG,MAAM,0BAA0B;GACzC,GAAG,UAAU,cAAc,QAAQ,UAAU;GAC7C,GAAG,UAAU,MAAM,QAAQ,EAAE;GAC7B,SAAS,QAAQ;GACjB,eAAe,QAAQ;GACvB;GACA,MAAM,QAAQ;GACd,MAAM,QAAQ;EACf,CAAC,CAAC;CACH,SAAS,OAAO;EACf,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACrD,MAAM;CACP;AACD;;AAEA,eAAe,iBAAiB,MAAM;CACrC,IAAI;EACH,OAAO,GAAG,MAAM,sBAAsB,KAAK,SAAS,KAAK,eAAe,KAAK,MAAM,KAAK,MAAM,KAAK,UAAU,CAAC;CAC/G,SAAS,OAAO;EACf,IAAI,oBAAoB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACrD,MAAM;CACP;AACD"}
@@ -1,7 +1,7 @@
1
- import { Z as mapRefResolutionError } from "./command-helpers-C4WpR-QE-DNllqff1.mjs";
1
+ import { j as mapRefResolutionError } from "./cli-errors-kU09RUaz-CUkQ9XuM.mjs";
2
2
  import { n as parseContractRef, r as parseMigrationRef } from "./ref-resolution-Ct2GMcNB.mjs";
3
3
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
4
- //#region ../../../1-framework/3-tooling/cli/dist/ref-resolution-_S4xTT2L.mjs
4
+ //#region ../../../1-framework/3-tooling/cli/dist/ref-resolution-BYCRg72z.mjs
5
5
  function resolveContractRef(input, context) {
6
6
  const result = parseContractRef(input, context);
7
7
  return result.ok ? ok(result.value) : notOk(mapRefResolutionError(result.failure));
@@ -13,4 +13,4 @@ function resolveMigrationRef(input, context) {
13
13
  //#endregion
14
14
  export { resolveMigrationRef as n, resolveContractRef as t };
15
15
 
16
- //# sourceMappingURL=ref-resolution-_S4xTT2L-JfNjZU9d.mjs.map
16
+ //# sourceMappingURL=ref-resolution-BYCRg72z-DFhwf-XR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref-resolution-BYCRg72z-DFhwf-XR.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/ref-resolution-BYCRg72z.mjs"],"sourcesContent":["import { j as mapRefResolutionError } from \"./cli-errors-kU09RUaz.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { parseContractRef, parseMigrationRef } from \"@internal/migration-tools/ref-resolution\";\n//#region src/control-api/operations/ref-resolution.ts\nfunction resolveContractRef(input, context) {\n\tconst result = parseContractRef(input, context);\n\treturn result.ok ? ok(result.value) : notOk(mapRefResolutionError(result.failure));\n}\nfunction resolveMigrationRef(input, context) {\n\tconst result = parseMigrationRef(input, context);\n\treturn result.ok ? ok(result.value) : notOk(mapRefResolutionError(result.failure));\n}\n//#endregion\nexport { resolveMigrationRef as n, resolveContractRef as t };\n\n//# sourceMappingURL=ref-resolution-BYCRg72z.mjs.map"],"mappings":";;;;AAIA,SAAS,mBAAmB,OAAO,SAAS;CAC3C,MAAM,SAAS,iBAAiB,OAAO,OAAO;CAC9C,OAAO,OAAO,KAAK,GAAG,OAAO,KAAK,IAAI,MAAM,sBAAsB,OAAO,OAAO,CAAC;AAClF;AACA,SAAS,oBAAoB,OAAO,SAAS;CAC5C,MAAM,SAAS,kBAAkB,OAAO,OAAO;CAC/C,OAAO,OAAO,KAAK,GAAG,OAAO,KAAK,IAAI,MAAM,sBAAsB,OAAO,OAAO,CAAC;AAClF"}
@@ -1,14 +1,14 @@
1
1
  import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
- import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
3
- import { s as readMigrationsDir } from "./io-CHUUeHh0-CoCBe9eN.mjs";
2
+ import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
3
+ import { s as readMigrationsDir } from "./io-CHUUeHh0-CbyTkKP6.mjs";
4
4
  import { l as reconstructGraph, o as findPathWithDecision } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
5
- import { c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID } from "./verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs";
5
+ import { c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID } from "./verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs";
6
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
7
7
  import { join } from "pathe";
8
+ import { computeStorageHash } from "@prisma/orm-framework/contract/hashing";
9
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
8
10
  import { mkdir, writeFile } from "node:fs/promises";
9
11
  import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
10
- import { InternalError } from "@prisma/orm-framework/utils/internal-error";
11
- import { computeStorageHash } from "@prisma/orm-framework/contract/hashing";
12
12
  //#region ../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs
13
13
  /**
14
14
  * Assert that an extension descriptor is self-consistent: the
@@ -264,4 +264,4 @@ function planAllSpaces(inputs, planSpace) {
264
264
  //#endregion
265
265
  export { gatherDiskContractSpaceState as a, emitContractSpaceArtifacts as i, computeExtensionSpaceApplyPath as n, planAllSpaces as o, contractSpaceFromJson as r, assertDescriptorSelfConsistency as t };
266
266
 
267
- //# sourceMappingURL=spaces-DxuvClN9.mjs.map
267
+ //# sourceMappingURL=spaces-DBTCE3Js.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spaces-DxuvClN9.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-Co-8oaiB.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-C9-J6OBn.mjs\";\nimport { s as readMigrationsDir } from \"../io-CHUUeHh0.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-DDaOHo10.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-WvjSiWcB.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `meta` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BA,eAAe,6BAA6B,MAAM;CACjD,MAAM,EAAE,sBAAsB,mBAAmB;CACjD,MAAM,kBAAkB,MAAM,6BAA6B,oBAAoB;CAC/E,MAAM,kCAAkC,IAAI,IAAI;CAChD,KAAK,MAAM,WAAW,gBAAgB;EACrC,IAAI,YAAY,cAAc;EAC9B,MAAM,OAAO,MAAM,yBAAyB,sBAAsB,OAAO;EACzE,IAAI,SAAS,MAAM,gBAAgB,IAAI,SAAS,IAAI;CACrD;CACA,OAAO;EACN;EACA;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,cAAc,QAAQ,WAAW;CACzC,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,SAAS,QAAQ;EAC3B,IAAI,KAAK,IAAI,MAAM,OAAO,GAAG,MAAM,sBAAsB,MAAM,OAAO;EACtE,KAAK,IAAI,MAAM,OAAO;CACvB;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM;EACjC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC,CAAC,CAAC,KAAK,WAAW;EAClB,SAAS,MAAM;EACf,mBAAmB,UAAU,KAAK;CACnC,EAAE;AACH"}
1
+ {"version":3,"file":"spaces-DBTCE3Js.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-Co-8oaiB.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-C9-J6OBn.mjs\";\nimport { s as readMigrationsDir } from \"../io-CHUUeHh0.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-DDaOHo10.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-WvjSiWcB.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `meta` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,aAAa,WAAW,GAAG,uBAAuB,OAAO;CACjE,MAAM,aAAa,mBAAmB;EACrC,QAAQ,OAAO;EACf,cAAc,OAAO;EACrB,SAAS;EACT,GAAG,UAAU,uBAAuB,OAAO,mBAAmB;EAC9D,GAAG,UAAU,eAAe,OAAO,WAAW;CAC/C,CAAC;CACD,IAAI,eAAe,OAAO,aAAa,MAAM,gCAAgC;EAC5E,aAAa,OAAO;EACpB,gBAAgB;EAChB,aAAa,OAAO;CACrB,CAAC;AACF;;;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;AA8BA,SAAS,cAAc,QAAQ,WAAW;CACzC,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,SAAS,QAAQ;EAC3B,IAAI,KAAK,IAAI,MAAM,OAAO,GAAG,MAAM,sBAAsB,MAAM,OAAO;EACtE,KAAK,IAAI,MAAM,OAAO;CACvB;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM;EACjC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC,CAAC,CAAC,KAAK,WAAW;EAClB,SAAS,MAAM;EACf,mBAAmB,UAAU,KAAK;CACnC,EAAE;AACH"}
@@ -1,7 +1,7 @@
1
1
  import { t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
2
2
  import { t as ContractSpaceHeadRecord } from "./verify-contract-spaces-Cc1u_wJo-BilPJS2S.mjs";
3
- import { APP_SPACE_ID as APP_SPACE_ID$1, ContractSpace, ContractSpaceHeadRef, ContractSpaceHeadRef as ContractSpaceHeadRef$1 } from "@prisma/orm-framework/components/control";
4
3
  import { PreserveEmptyPredicate, StorageSort } from "@prisma/orm-framework/contract/hashing";
4
+ import { APP_SPACE_ID as APP_SPACE_ID$1, ContractSpace, ContractSpaceHeadRef, ContractSpaceHeadRef as ContractSpaceHeadRef$1 } from "@prisma/orm-framework/components/control";
5
5
  import { Contract } from "@prisma/orm-framework/contract/types";
6
6
  //#region ../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts
7
7
  //#region src/assert-descriptor-self-consistency.d.ts
@@ -412,4 +412,4 @@ declare const RESERVED_SPACE_SUBDIR_NAMES: ReadonlySet<string>;
412
412
  declare function spaceRefsDirectory(spaceMigrationsDir: string): string;
413
413
  //#endregion
414
414
  export { spaceMigrationDirectory as C, readContractSpaceHeadRef as S, contractSpaceFromJson as _, DescriptorSelfConsistencyInputs as a, isValidSpaceId as b, RESERVED_SPACE_SUBDIR_NAMES as c, SpacePlanInput as d, SpacePlanOutput as f, computeExtensionSpaceApplyPath as g, assertValidSpaceId as h, ContractSpaceHeadRef$1 as i, SPACE_REFS_DIRNAME as l, assertDescriptorSelfConsistency as m, ComputeExtensionSpaceApplyPathInputs as n, DiskContractSpaceState as o, ValidSpaceId as p, ContractSpaceArtifactInputs as r, ExtensionSpaceApplyPathOutcome as s, APP_SPACE_ID$1 as t, SpaceApplyInput as u, emitContractSpaceArtifacts as v, spaceRefsDirectory as w, planAllSpaces as x, gatherDiskContractSpaceState as y };
415
- //# sourceMappingURL=spaces-D5qtTlhj.d.mts.map
415
+ //# sourceMappingURL=spaces-tWQi7CUv.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spaces-D5qtTlhj.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC;WACA;WACA;;;;;;;;WAQA;WACA;WACA,sBAAsB;WACtB,cAAc;;;;;;;;;;;;;;;;;;;;;iBAqBR,gCAAgC,QAAQ;;;;;;;;;;;;;;;;iBAgBxC,yBAAyB,8BAA8B,kBAAkB,QAAQ;;;;;;;;;KAS7F;WACM;WACA,sBAAsB;;;;;;WAMtB;;;;;WAKA,SAAS;;;;;;WAMT;;WAEA;WACA,sBAAsB;;WAEtB;WACA,sBAAsB;WACtB;WACA;aACE;aACA;;;WAGF;;;;;;;;;;;;;UAaD;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBM,+BAA+B,QAAQ,uCAAuC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UAuB7F,gBAAgB;WACf;WACA;WACA;WACA;WACA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCT,sBAAsB,kBAAkB,WAAW,UAAU;WACnE;WACA,YAAY;aACV;aACA;aACA;;WAEF,SAAS;IAChB,cAAc;;;;;;;;;;;;;;;;;;;;;;;UAuBR;WACC;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBH,2BAA2B,8BAA8B,iBAAiB,QAAQ,8BAA8B;;;;;;;;;UASvH;;WAEC;;WAEA,iBAAiB,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAoB/B,6BAA6B;WACnC;;;;;;WAMA,gBAAgB;IACvB,QAAQ;;;;;;;;;;;;;;;;UAgBF,eAAe;WACd;WACA,eAAe;WACf,aAAa;;UAEd,gBAAgB;WACf;WACA,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BtB,cAAc,WAAW,UAAU,iBAAiB,eAAe,cAAc,YAAY,OAAO,eAAe,wBAAwB,sBAAsB,gBAAgB;;;;;;;;;;KAU7L;WACM;;iBAEM,eAAe,kBAAkB,WAAW;iBAC5C,mBAAmB,0BAA0B,WAAW;;;;;;;;;;;;;iBAaxD,wBAAwB,8BAA8B;;;;;;;;;cASzD;;;;;;;;cAQA,6BAA6B;;;;;;;iBAO1B,mBAAmB"}
1
+ {"version":3,"file":"spaces-tWQi7CUv.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC;WACA;WACA;;;;;;;;WAQA;WACA;WACA,sBAAsB;WACtB,cAAc;;;;;;;;;;;;;;;;;;;;;iBAqBR,gCAAgC,QAAQ;;;;;;;;;;;;;;;;iBAgBxC,yBAAyB,8BAA8B,kBAAkB,QAAQ;;;;;;;;;KAS7F;WACM;WACA,sBAAsB;;;;;;WAMtB;;;;;WAKA,SAAS;;;;;;WAMT;;WAEA;WACA,sBAAsB;;WAEtB;WACA,sBAAsB;WACtB;WACA;aACE;aACA;;;WAGF;;;;;;;;;;;;;UAaD;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBM,+BAA+B,QAAQ,uCAAuC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UAuB7F,gBAAgB;WACf;WACA;WACA;WACA;WACA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCT,sBAAsB,kBAAkB,WAAW,UAAU;WACnE;WACA,YAAY;aACV;aACA;aACA;;WAEF,SAAS;IAChB,cAAc;;;;;;;;;;;;;;;;;;;;;;;UAuBR;WACC;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBH,2BAA2B,8BAA8B,iBAAiB,QAAQ,8BAA8B;;;;;;;;;UASvH;;WAEC;;WAEA,iBAAiB,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAoB/B,6BAA6B;WACnC;;;;;;WAMA,gBAAgB;IACvB,QAAQ;;;;;;;;;;;;;;;;UAgBF,eAAe;WACd;WACA,eAAe;WACf,aAAa;;UAEd,gBAAgB;WACf;WACA,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BtB,cAAc,WAAW,UAAU,iBAAiB,eAAe,cAAc,YAAY,OAAO,eAAe,wBAAwB,sBAAsB,gBAAgB;;;;;;;;;;KAU7L;WACM;;iBAEM,eAAe,kBAAkB,WAAW;iBAC5C,mBAAmB,0BAA0B,WAAW;;;;;;;;;;;;;iBAaxD,wBAAwB,8BAA8B;;;;;;;;;cASzD;;;;;;;;cAQA,6BAA6B;;;;;;;iBAO1B,mBAAmB"}
@@ -1,7 +1,8 @@
1
- import { $ as parseGlobalFlags, P as formatCommandHelp, Y as isCI$1, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, r as addGlobalOptions, st as setCommandExamples } from "./command-helpers-C4WpR-QE-DNllqff1.mjs";
2
- import { a as resolveGating, d as writeUserConfig, i as readUserConfig, u as userConfigPath } from "./exports-BN0vFTxG.mjs";
1
+ import { n as createTerminalUI } from "./terminal-ui-ypPE9cN6-ilMBkmwT.mjs";
2
+ import { f as parseGlobalFlags, i as formatCommandHelp, p as parseGlobalFlagsOrExit, t as addGlobalOptions, u as isCI$1, v as setCommandDescriptions, y as setCommandExamples } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
3
+ import { a as resolveGating, d as writeUserConfig, i as readUserConfig, u as userConfigPath } from "./exports-CqNUihkI.mjs";
3
4
  import { Command } from "commander";
4
- //#region ../../../1-framework/3-tooling/cli/dist/telemetry-DVBHDQd6.mjs
5
+ //#region ../../../1-framework/3-tooling/cli/dist/telemetry-Dh6e0ams.mjs
5
6
  /**
6
7
  * Resolves the same gate the runtime uses (CI check + `resolveGating`) and
7
8
  * projects it into a user-facing status. Pure read: never mints, never
@@ -117,4 +118,4 @@ function createTelemetryCommand() {
117
118
  //#endregion
118
119
  export { createTelemetryCommand as t };
119
120
 
120
- //# sourceMappingURL=telemetry-DVBHDQd6-CWNTFnMO.mjs.map
121
+ //# sourceMappingURL=telemetry-Dh6e0ams-BsjGN3tQ.mjs.map