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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/dist/{aggregate-B4mhR4Sk.mjs → aggregate-D53gnb7v.mjs} +8 -8
  2. package/dist/{aggregate-B4mhR4Sk.mjs.map → aggregate-D53gnb7v.mjs.map} +1 -1
  3. package/dist/bin__prisma-next.mjs +22 -22
  4. package/dist/bin__prisma-next.mjs.map +1 -1
  5. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs +14 -0
  6. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +1 -0
  7. package/dist/{types-DZWEs4si-D8UlyJI0.d.mts → cli-errors-CDr3WcJP-NFry5GHb.d.mts} +8 -2
  8. package/dist/cli-errors-CDr3WcJP-NFry5GHb.d.mts.map +1 -0
  9. package/dist/cli.mjs +2 -2
  10. package/dist/cli.mjs.map +1 -1
  11. package/dist/cli__commands__contract-emit.mjs +1 -1
  12. package/dist/cli__commands__contract-infer.mjs +1 -1
  13. package/dist/cli__commands__db-init.mjs +1 -1
  14. package/dist/cli__commands__db-schema.mjs +1 -1
  15. package/dist/cli__commands__db-sign.mjs +1 -1
  16. package/dist/cli__commands__db-update.mjs +1 -1
  17. package/dist/cli__commands__db-verify.mjs +1 -1
  18. package/dist/cli__commands__migrate.d.mts +3 -12
  19. package/dist/cli__commands__migrate.d.mts.map +1 -1
  20. package/dist/cli__commands__migrate.mjs +1 -1
  21. package/dist/cli__commands__migration-check.d.mts +1 -57
  22. package/dist/cli__commands__migration-check.d.mts.map +1 -1
  23. package/dist/cli__commands__migration-check.mjs +2 -2
  24. package/dist/cli__commands__migration-graph.d.mts +1 -1
  25. package/dist/cli__commands__migration-graph.mjs +1 -1
  26. package/dist/cli__commands__migration-list.d.mts +4 -44
  27. package/dist/cli__commands__migration-list.d.mts.map +1 -1
  28. package/dist/cli__commands__migration-list.mjs +2 -2
  29. package/dist/cli__commands__migration-log.d.mts +1 -1
  30. package/dist/cli__commands__migration-log.mjs +1 -1
  31. package/dist/cli__commands__migration-new.mjs +1 -1
  32. package/dist/cli__commands__migration-plan.d.mts +2 -47
  33. package/dist/cli__commands__migration-plan.d.mts.map +1 -1
  34. package/dist/cli__commands__migration-plan.mjs +1 -1
  35. package/dist/cli__commands__migration-show.mjs +1 -1
  36. package/dist/cli__commands__migration-status.d.mts +1 -1
  37. package/dist/cli__commands__migration-status.mjs +1 -1
  38. package/dist/cli__commands__ref.d.mts +1 -28
  39. package/dist/cli__commands__ref.d.mts.map +1 -1
  40. package/dist/cli__commands__ref.mjs +2 -2
  41. package/dist/cli__commands__telemetry.mjs +1 -1
  42. package/dist/cli__control-api.d.mts +502 -2
  43. package/dist/cli__control-api.d.mts.map +1 -1
  44. package/dist/cli__control-api.mjs +18 -3
  45. package/dist/cli__migration-cli.mjs +3 -6
  46. package/dist/cli__migration-cli.mjs.map +1 -1
  47. package/dist/{client-75qrAPqf-7l0C0H_b.mjs → client-Y6qbDk7X-BzKLmBZo.mjs} +16 -12
  48. package/dist/client-Y6qbDk7X-BzKLmBZo.mjs.map +1 -0
  49. package/dist/{command-helpers-CAoXqAY9-DWUBcTXM.mjs → command-helpers-C4WpR-QE-DE494TSG.mjs} +30 -74
  50. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs.map +1 -0
  51. package/dist/config-loader.d.mts +2 -18
  52. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs +44 -0
  53. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +1 -0
  54. package/dist/{contract-emit-B6odMoem-C87PBvmo.mjs → contract-emit-CTm2zfuG-7PV9SBY6.mjs} +12 -11
  55. package/dist/contract-emit-CTm2zfuG-7PV9SBY6.mjs.map +1 -0
  56. package/dist/{contract-emit-0hSjbuxp-BJLC-VgC.mjs → contract-emit-D8IXP9Qp-Df6NwXn8.mjs} +4 -4
  57. package/dist/{contract-emit-0hSjbuxp-BJLC-VgC.mjs.map → contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map} +1 -1
  58. package/dist/{contract-infer-BnkqpftN-DwBzasOu.mjs → contract-infer-BwT7ngoo-Dx6aAwIN.mjs} +5 -5
  59. package/dist/contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map +1 -0
  60. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs +82 -0
  61. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +1 -0
  62. package/dist/{contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs} +3 -3
  63. package/dist/{contract-snapshot-store-sf5nP4mb-MLpG-ihh.mjs.map → contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map} +1 -1
  64. package/dist/{contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs → contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs} +7 -7
  65. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +1 -0
  66. package/dist/{db-init-bd0_x2Q8.mjs → db-init-CBj_EWg3.mjs} +18 -32
  67. package/dist/db-init-CBj_EWg3.mjs.map +1 -0
  68. package/dist/{db-schema-CwgAWTqG.mjs → db-schema-BWpeh0Q_.mjs} +4 -4
  69. package/dist/{db-schema-CwgAWTqG.mjs.map → db-schema-BWpeh0Q_.mjs.map} +1 -1
  70. package/dist/{db-sign-vqiYfpjI.mjs → db-sign-DCb_DKtv.mjs} +13 -29
  71. package/dist/db-sign-DCb_DKtv.mjs.map +1 -0
  72. package/dist/{db-update-Br0diOCo.mjs → db-update-WX0KitcX.mjs} +29 -52
  73. package/dist/db-update-WX0KitcX.mjs.map +1 -0
  74. package/dist/{db-verify-CKPsRFrj-T7nSt7yT.mjs → db-verify-B8ax2Y_x-Bp4s5Ra6.mjs} +9 -6
  75. package/dist/db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map +1 -0
  76. package/dist/{errors-IpZm1Skp-BH495dRd.mjs → errors-Co-8oaiB-CB-6Uqki.mjs} +45 -53
  77. package/dist/errors-Co-8oaiB-CB-6Uqki.mjs.map +1 -0
  78. package/dist/{errors--qsXZUtL.d.mts → errors-NRmFpwR1.d.mts} +13 -9
  79. package/dist/errors-NRmFpwR1.d.mts.map +1 -0
  80. package/dist/{format-ByDm2goZ-BIRlFoo6.mjs → format-Bw3LVJ1v-BJ6lVFMA.mjs} +12 -9
  81. package/dist/format-Bw3LVJ1v-BJ6lVFMA.mjs.map +1 -0
  82. package/dist/{framework-components-CjshQKHA-Dlp6Leo5.mjs → framework-components-3DdB31mk-BHyX-OlJ.mjs} +3 -3
  83. package/dist/{framework-components-CjshQKHA-Dlp6Leo5.mjs.map → framework-components-3DdB31mk-BHyX-OlJ.mjs.map} +1 -1
  84. package/dist/{graph-membership-DW6nnbyQ-Bp2KcVwR.mjs → graph-membership-BEmNEMtP-rz61CLM5.mjs} +3 -3
  85. package/dist/{graph-membership-DW6nnbyQ-Bp2KcVwR.mjs.map → graph-membership-BEmNEMtP-rz61CLM5.mjs.map} +1 -1
  86. package/dist/index-Df9igRvP.d.mts +18 -0
  87. package/dist/index-Df9igRvP.d.mts.map +1 -0
  88. package/dist/{init-BGm77aWc-jHVUn63W.mjs → init-CPB89WK2-DPZRZ9Ee.mjs} +4 -4
  89. package/dist/{init-BGm77aWc-jHVUn63W.mjs.map → init-CPB89WK2-DPZRZ9Ee.mjs.map} +1 -1
  90. package/dist/{inspect-live-schema-CnwYTRZ0-P-6asJFl.mjs → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs} +4 -4
  91. package/dist/{inspect-live-schema-CnwYTRZ0-P-6asJFl.mjs.map → inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map} +1 -1
  92. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs +52 -0
  93. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +1 -0
  94. package/dist/{invariants-lXzy6txi-DAoP4nTE.mjs → invariants-C1WVUAH7-DlOBTTkM.mjs} +3 -3
  95. package/dist/{invariants-lXzy6txi-DAoP4nTE.mjs.map → invariants-C1WVUAH7-DlOBTTkM.mjs.map} +1 -1
  96. package/dist/{io-C8TdyBKt-DloEBi70.mjs → io-CHUUeHh0-CoCBe9eN.mjs} +8 -8
  97. package/dist/{io-C8TdyBKt-DloEBi70.mjs.map → io-CHUUeHh0-CoCBe9eN.mjs.map} +1 -1
  98. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs +22 -0
  99. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +1 -0
  100. package/dist/{migrate-BdVFDKF2.mjs → migrate-B-NAuO90.mjs} +90 -227
  101. package/dist/migrate-B-NAuO90.mjs.map +1 -0
  102. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts +56 -0
  103. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +1 -0
  104. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs +202 -0
  105. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +1 -0
  106. package/dist/{migration-BuUmO7It.mjs → migration-DAJY-NmR.mjs} +3 -3
  107. package/dist/{migration-BuUmO7It.mjs.map → migration-DAJY-NmR.mjs.map} +1 -1
  108. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs +254 -0
  109. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +1 -0
  110. package/dist/{migration-check-DcwUnadt-jamDqOmM.mjs → migration-check-DONPyXff-CGTUpLv-.mjs} +12 -254
  111. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +1 -0
  112. package/dist/{migration-command-scaffold-BCuoeAki-DMy_5ztW.mjs → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs} +4 -4
  113. package/dist/{migration-command-scaffold-BCuoeAki-DMy_5ztW.mjs.map → migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map} +1 -1
  114. package/dist/{migration-graph-CBf9ORe7-B4xAF8GN.mjs → migration-graph-DDaOHo10-yJFAbKCu.mjs} +3 -3
  115. package/dist/{migration-graph-CBf9ORe7-B4xAF8GN.mjs.map → migration-graph-DDaOHo10-yJFAbKCu.mjs.map} +1 -1
  116. package/dist/{migration-graph-vmgkL3k4.mjs → migration-graph-Dn469b0l.mjs} +10 -19
  117. package/dist/migration-graph-Dn469b0l.mjs.map +1 -0
  118. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs +35 -0
  119. package/dist/migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map +1 -0
  120. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs +102 -0
  121. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +1 -0
  122. package/dist/migration-list-jk4iCtmO.mjs +120 -0
  123. package/dist/migration-list-jk4iCtmO.mjs.map +1 -0
  124. package/dist/{migration-log-CS5IWcNq-DI7FTHCA.mjs → migration-log-DQzUBrm8-D3m9wcuf.mjs} +7 -7
  125. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +1 -0
  126. package/dist/migration-new-BkSY6m0t.mjs +50 -0
  127. package/dist/migration-new-BkSY6m0t.mjs.map +1 -0
  128. package/dist/{migration-new-GmW2anVb.mjs → migration-new-g98oB3nC-BcrkxAAt.mjs} +19 -58
  129. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +1 -0
  130. package/dist/{migration-path-target-D3Sj55PI-BICblCuk.mjs → migration-path-target-BPYp3LNc-DsDdLU0J.mjs} +4 -4
  131. package/dist/migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map +1 -0
  132. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts +159 -0
  133. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +1 -0
  134. package/dist/migration-plan-CjIYMJZy.mjs +172 -0
  135. package/dist/migration-plan-CjIYMJZy.mjs.map +1 -0
  136. package/dist/{migration-plan-q_L84PN1-ClkGgtVz.mjs → migration-plan-CwuZLXVE-DAJ-JUQT.mjs} +46 -185
  137. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +1 -0
  138. package/dist/{migration-show--pW4XhKs.mjs → migration-show-CW6EKtfw.mjs} +16 -12
  139. package/dist/migration-show-CW6EKtfw.mjs.map +1 -0
  140. package/dist/{migration-status-CE7cQLDq-P1x1-BsZ.mjs → migration-status-DSQcBhiN.mjs} +37 -68
  141. package/dist/migration-status-DSQcBhiN.mjs.map +1 -0
  142. package/dist/migration-tools.d.mts +5 -5
  143. package/dist/migration-tools.mjs +13 -13
  144. package/dist/migration-tools__aggregate.mjs +1 -1
  145. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  146. package/dist/migration-tools__errors.d.mts +2 -2
  147. package/dist/migration-tools__errors.mjs +2 -2
  148. package/dist/migration-tools__invariants.mjs +1 -1
  149. package/dist/migration-tools__io.mjs +1 -1
  150. package/dist/migration-tools__migration-graph.mjs +2 -2
  151. package/dist/migration-tools__migration.mjs +1 -1
  152. package/dist/migration-tools__ref-resolution.mjs +1 -1
  153. package/dist/migration-tools__refs.mjs +1 -1
  154. package/dist/migration-tools__spaces.d.mts +1 -1
  155. package/dist/migration-tools__spaces.mjs +2 -2
  156. package/dist/{project-import-root-CpwLCDLY-DkVwAnWj.mjs → project-import-root-C_bd0ooL-WkbJLnAA.mjs} +10 -8
  157. package/dist/project-import-root-C_bd0ooL-WkbJLnAA.mjs.map +1 -0
  158. package/dist/ref-DSAZime8.mjs +72 -0
  159. package/dist/ref-DSAZime8.mjs.map +1 -0
  160. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs +96 -0
  161. package/dist/ref-advancement-DaZBzm7m-BZQtedYC.mjs.map +1 -0
  162. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs +109 -0
  163. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +1 -0
  164. package/dist/{ref-resolution-BjJBWPjX.mjs → ref-resolution-Ct2GMcNB.mjs} +2 -2
  165. package/dist/{ref-resolution-BjJBWPjX.mjs.map → ref-resolution-Ct2GMcNB.mjs.map} +1 -1
  166. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs +16 -0
  167. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +1 -0
  168. package/dist/{refs-BDbB9BRB-D6Za3Q49.mjs → refs-B2BL8z3i-DGGFB7Mj.mjs} +6 -6
  169. package/dist/refs-B2BL8z3i-DGGFB7Mj.mjs.map +1 -0
  170. package/dist/refs-fQLFcMoq-UTlvnijY.mjs +47 -0
  171. package/dist/refs-fQLFcMoq-UTlvnijY.mjs.map +1 -0
  172. package/dist/{spaces-DxFj5y8l.d.mts → spaces-D5qtTlhj.d.mts} +2 -2
  173. package/dist/{spaces-DxFj5y8l.d.mts.map → spaces-D5qtTlhj.d.mts.map} +1 -1
  174. package/dist/{spaces-C27bA-xc.mjs → spaces-DxuvClN9.mjs} +7 -7
  175. package/dist/spaces-DxuvClN9.mjs.map +1 -0
  176. package/dist/{telemetry-CmbCa3Ld-CmE5zcIG.mjs → telemetry-DVBHDQd6-Ckn5oClN.mjs} +3 -3
  177. package/dist/{telemetry-CmbCa3Ld-CmE5zcIG.mjs.map → telemetry-DVBHDQd6-Ckn5oClN.mjs.map} +1 -1
  178. package/dist/{verify-DnVNjc5C-BGdsblBK.mjs → verify-C6L_hiJU-B4V3bqvG.mjs} +3 -3
  179. package/dist/{verify-DnVNjc5C-BGdsblBK.mjs.map → verify-C6L_hiJU-B4V3bqvG.mjs.map} +1 -1
  180. package/dist/{verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs} +4 -4
  181. package/dist/{verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs.map → verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map} +1 -1
  182. package/dist/vite-plugin-contract-emit.mjs +1 -1
  183. package/package.json +12 -12
  184. package/dist/client-75qrAPqf-7l0C0H_b.mjs.map +0 -1
  185. package/dist/command-helpers-CAoXqAY9-DWUBcTXM.mjs.map +0 -1
  186. package/dist/config-loader.d.mts.map +0 -1
  187. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs +0 -36
  188. package/dist/contract-at-errors-BX7w-p19-SxA8eaV2.mjs.map +0 -1
  189. package/dist/contract-emit-B6odMoem-C87PBvmo.mjs.map +0 -1
  190. package/dist/contract-infer-BnkqpftN-DwBzasOu.mjs.map +0 -1
  191. package/dist/contract-space-aggregate-loader-CFH-336b-BhAyRQEL.mjs.map +0 -1
  192. package/dist/db-init-bd0_x2Q8.mjs.map +0 -1
  193. package/dist/db-sign-vqiYfpjI.mjs.map +0 -1
  194. package/dist/db-update-Br0diOCo.mjs.map +0 -1
  195. package/dist/db-verify-CKPsRFrj-T7nSt7yT.mjs.map +0 -1
  196. package/dist/errors--qsXZUtL.d.mts.map +0 -1
  197. package/dist/errors-IpZm1Skp-BH495dRd.mjs.map +0 -1
  198. package/dist/format-ByDm2goZ-BIRlFoo6.mjs.map +0 -1
  199. package/dist/migrate-BdVFDKF2.mjs.map +0 -1
  200. package/dist/migration-check-DcwUnadt-jamDqOmM.mjs.map +0 -1
  201. package/dist/migration-graph-vmgkL3k4.mjs.map +0 -1
  202. package/dist/migration-list-BFBeo1_X-ckYMhETH.mjs +0 -228
  203. package/dist/migration-list-BFBeo1_X-ckYMhETH.mjs.map +0 -1
  204. package/dist/migration-log-CS5IWcNq-DI7FTHCA.mjs.map +0 -1
  205. package/dist/migration-new-GmW2anVb.mjs.map +0 -1
  206. package/dist/migration-path-target-D3Sj55PI-BICblCuk.mjs.map +0 -1
  207. package/dist/migration-plan-q_L84PN1-ClkGgtVz.mjs.map +0 -1
  208. package/dist/migration-show--pW4XhKs.mjs.map +0 -1
  209. package/dist/migration-status-CE7cQLDq-P1x1-BsZ.mjs.map +0 -1
  210. package/dist/project-import-root-CpwLCDLY-DkVwAnWj.mjs.map +0 -1
  211. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs +0 -57
  212. package/dist/ref-advancement-CSPMoQs3-fEipZrdu.mjs.map +0 -1
  213. package/dist/ref-sHE8zOcm.mjs +0 -171
  214. package/dist/ref-sHE8zOcm.mjs.map +0 -1
  215. package/dist/refs-BDbB9BRB-D6Za3Q49.mjs.map +0 -1
  216. package/dist/spaces-C27bA-xc.mjs.map +0 -1
  217. package/dist/types-DZWEs4si-D8UlyJI0.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry-CmbCa3Ld-CmE5zcIG.mjs","names":["isCI"],"sources":["../../../../1-framework/3-tooling/cli/dist/telemetry-CmbCa3Ld.mjs"],"sourcesContent":["import { D as isCI, O as formatCommandHelp, _ as createTerminalUI, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, t as addGlobalOptions, u as setCommandExamples } from \"./command-helpers-CAoXqAY9.mjs\";\nimport { Command } from \"commander\";\nimport { readUserConfig, resolveGating, userConfigPath, writeUserConfig } from \"@internal/cli-telemetry\";\n//#region src/commands/telemetry/status.ts\n/**\n* Resolves the same gate the runtime uses (CI check + `resolveGating`) and\n* projects it into a user-facing status. Pure read: never mints, never\n* writes. The `installationId` value itself is never surfaced — only its\n* presence — so `status` discloses nothing identifying.\n*/\nfunction resolveTelemetryStatus(inputs) {\n\tconst config = readUserConfig();\n\tconst configPath = userConfigPath();\n\tconst installationIdStored = typeof config.installationId === \"string\" && config.installationId.length > 0;\n\tif (inputs.inCI) return {\n\t\tenabled: false,\n\t\treason: \"ci\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n\tconst gating = resolveGating({\n\t\tenv: inputs.env,\n\t\tconfig\n\t});\n\tif (!gating.enabled) return {\n\t\tenabled: false,\n\t\treason: gating.reason === \"env-override\" ? \"env-opt-out\" : \"stored-opt-out\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n\treturn {\n\t\tenabled: true,\n\t\treason: config.enableTelemetry === true ? \"stored-opt-in\" : \"default-on\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n}\nconst REASON_EXPLANATION = {\n\tci: \"CI environment detected — telemetry is hard-disabled.\",\n\t\"env-opt-out\": \"an environment opt-out is set (DO_NOT_TRACK / PRISMA_NEXT_DISABLE_TELEMETRY).\",\n\t\"stored-opt-out\": \"\\\"enableTelemetry\\\": false is stored in your config.\",\n\t\"stored-opt-in\": \"\\\"enableTelemetry\\\": true is stored in your config.\",\n\t\"default-on\": \"no explicit choice is stored, so the opt-out default applies.\"\n};\nfunction formatTelemetryStatusLines(status) {\n\treturn [\n\t\t`Telemetry is ${status.enabled ? \"enabled\" : \"disabled\"}: ${REASON_EXPLANATION[status.reason]}`,\n\t\t`Config file: ${status.configPath}`,\n\t\t`Installation ID: ${status.installationIdStored ? \"stored\" : \"not stored\"}`\n\t];\n}\n//#endregion\n//#region src/commands/telemetry/index.ts\nfunction createTelemetryStatusCommand() {\n\tconst command = new Command(\"status\");\n\tsetCommandDescriptions(command, \"Show whether anonymous CLI telemetry is enabled and why\", \"Reports whether telemetry is currently enabled or disabled and the reason\\n(default-on, stored opt-out, environment opt-out, or CI), the path to your\\nuser-level config file, and whether an installation ID has been stored.\\nRead-only: never sends an event, never mints an ID, never writes anything.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst status = resolveTelemetryStatus({\n\t\t\tenv: process.env,\n\t\t\tinCI: isCI()\n\t\t});\n\t\tif (flags.json) ui.output(JSON.stringify(status));\n\t\telse for (const line of formatTelemetryStatusLines(status)) ui.output(line);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryEnableCommand() {\n\tconst command = new Command(\"enable\");\n\tsetCommandDescriptions(command, \"Enable anonymous CLI telemetry\", \"Stores \\\"enableTelemetry\\\": true in your user-level config and mints an\\ninstallation ID if one is not already stored.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\twriteUserConfig({ enableTelemetry: true });\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (flags.json) ui.output(JSON.stringify({\n\t\t\tenableTelemetry: true,\n\t\t\tconfigPath: userConfigPath()\n\t\t}));\n\t\telse ui.output(`Telemetry enabled. Preference stored in ${userConfigPath()}.`);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryDisableCommand() {\n\tconst command = new Command(\"disable\");\n\tsetCommandDescriptions(command, \"Disable anonymous CLI telemetry\", \"Stores \\\"enableTelemetry\\\": false in your user-level config. No installation\\nID is minted and no event is sent.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\twriteUserConfig({ enableTelemetry: false });\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (flags.json) ui.output(JSON.stringify({\n\t\t\tenableTelemetry: false,\n\t\t\tconfigPath: userConfigPath()\n\t\t}));\n\t\telse ui.output(`Telemetry disabled. Preference stored in ${userConfigPath()}.`);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryCommand() {\n\tconst command = new Command(\"telemetry\");\n\tsetCommandDescriptions(command, \"Inspect and change anonymous CLI telemetry\", \"Show telemetry status, or enable / disable anonymous CLI usage data.\\nTelemetry is on by default (opt-out); see https://prisma-next.dev/docs/cli/telemetry\\nfor what is collected and why.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next telemetry status\",\n\t\t\"prisma-next telemetry disable\",\n\t\t\"prisma-next telemetry enable\"\n\t]);\n\tcommand.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(createTelemetryStatusCommand());\n\tcommand.addCommand(createTelemetryEnableCommand());\n\tcommand.addCommand(createTelemetryDisableCommand());\n\treturn command;\n}\n//#endregion\nexport { createTelemetryCommand as t };\n\n//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AW,8BAA8B,CAAC;CAClD,OAAO;AACR"}
1
+ {"version":3,"file":"telemetry-DVBHDQd6-Ckn5oClN.mjs","names":["isCI"],"sources":["../../../../1-framework/3-tooling/cli/dist/telemetry-DVBHDQd6.mjs"],"sourcesContent":["import { D as isCI, O as formatCommandHelp, _ as createTerminalUI, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, t as addGlobalOptions, u as setCommandExamples } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { Command } from \"commander\";\nimport { readUserConfig, resolveGating, userConfigPath, writeUserConfig } from \"@internal/cli-telemetry\";\n//#region src/commands/telemetry/status.ts\n/**\n* Resolves the same gate the runtime uses (CI check + `resolveGating`) and\n* projects it into a user-facing status. Pure read: never mints, never\n* writes. The `installationId` value itself is never surfaced — only its\n* presence — so `status` discloses nothing identifying.\n*/\nfunction resolveTelemetryStatus(inputs) {\n\tconst config = readUserConfig();\n\tconst configPath = userConfigPath();\n\tconst installationIdStored = typeof config.installationId === \"string\" && config.installationId.length > 0;\n\tif (inputs.inCI) return {\n\t\tenabled: false,\n\t\treason: \"ci\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n\tconst gating = resolveGating({\n\t\tenv: inputs.env,\n\t\tconfig\n\t});\n\tif (!gating.enabled) return {\n\t\tenabled: false,\n\t\treason: gating.reason === \"env-override\" ? \"env-opt-out\" : \"stored-opt-out\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n\treturn {\n\t\tenabled: true,\n\t\treason: config.enableTelemetry === true ? \"stored-opt-in\" : \"default-on\",\n\t\tconfigPath,\n\t\tinstallationIdStored\n\t};\n}\nconst REASON_EXPLANATION = {\n\tci: \"CI environment detected — telemetry is hard-disabled.\",\n\t\"env-opt-out\": \"an environment opt-out is set (DO_NOT_TRACK / PRISMA_NEXT_DISABLE_TELEMETRY).\",\n\t\"stored-opt-out\": \"\\\"enableTelemetry\\\": false is stored in your config.\",\n\t\"stored-opt-in\": \"\\\"enableTelemetry\\\": true is stored in your config.\",\n\t\"default-on\": \"no explicit choice is stored, so the opt-out default applies.\"\n};\nfunction formatTelemetryStatusLines(status) {\n\treturn [\n\t\t`Telemetry is ${status.enabled ? \"enabled\" : \"disabled\"}: ${REASON_EXPLANATION[status.reason]}`,\n\t\t`Config file: ${status.configPath}`,\n\t\t`Installation ID: ${status.installationIdStored ? \"stored\" : \"not stored\"}`\n\t];\n}\n//#endregion\n//#region src/commands/telemetry/index.ts\nfunction createTelemetryStatusCommand() {\n\tconst command = new Command(\"status\");\n\tsetCommandDescriptions(command, \"Show whether anonymous CLI telemetry is enabled and why\", \"Reports whether telemetry is currently enabled or disabled and the reason\\n(default-on, stored opt-out, environment opt-out, or CI), the path to your\\nuser-level config file, and whether an installation ID has been stored.\\nRead-only: never sends an event, never mints an ID, never writes anything.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst status = resolveTelemetryStatus({\n\t\t\tenv: process.env,\n\t\t\tinCI: isCI()\n\t\t});\n\t\tif (flags.json) ui.output(JSON.stringify(status));\n\t\telse for (const line of formatTelemetryStatusLines(status)) ui.output(line);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryEnableCommand() {\n\tconst command = new Command(\"enable\");\n\tsetCommandDescriptions(command, \"Enable anonymous CLI telemetry\", \"Stores \\\"enableTelemetry\\\": true in your user-level config and mints an\\ninstallation ID if one is not already stored.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\twriteUserConfig({ enableTelemetry: true });\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (flags.json) ui.output(JSON.stringify({\n\t\t\tenableTelemetry: true,\n\t\t\tconfigPath: userConfigPath()\n\t\t}));\n\t\telse ui.output(`Telemetry enabled. Preference stored in ${userConfigPath()}.`);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryDisableCommand() {\n\tconst command = new Command(\"disable\");\n\tsetCommandDescriptions(command, \"Disable anonymous CLI telemetry\", \"Stores \\\"enableTelemetry\\\": false in your user-level config. No installation\\nID is minted and no event is sent.\");\n\treturn addGlobalOptions(command).action((options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\twriteUserConfig({ enableTelemetry: false });\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (flags.json) ui.output(JSON.stringify({\n\t\t\tenableTelemetry: false,\n\t\t\tconfigPath: userConfigPath()\n\t\t}));\n\t\telse ui.output(`Telemetry disabled. Preference stored in ${userConfigPath()}.`);\n\t\tprocess.exit(0);\n\t});\n}\nfunction createTelemetryCommand() {\n\tconst command = new Command(\"telemetry\");\n\tsetCommandDescriptions(command, \"Inspect and change anonymous CLI telemetry\", \"Show telemetry status, or enable / disable anonymous CLI usage data.\\nTelemetry is on by default (opt-out); see https://prisma-next.dev/docs/cli/telemetry\\nfor what is collected and why.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next telemetry status\",\n\t\t\"prisma-next telemetry disable\",\n\t\t\"prisma-next telemetry enable\"\n\t]);\n\tcommand.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(createTelemetryStatusCommand());\n\tcommand.addCommand(createTelemetryEnableCommand());\n\tcommand.addCommand(createTelemetryDisableCommand());\n\treturn command;\n}\n//#endregion\nexport { createTelemetryCommand as t };\n\n//# sourceMappingURL=telemetry-DVBHDQd6.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,uBAAuB,QAAQ;CACvC,MAAM,SAAS,eAAe;CAC9B,MAAM,aAAa,eAAe;CAClC,MAAM,uBAAuB,OAAO,OAAO,mBAAmB,YAAY,OAAO,eAAe,SAAS;CACzG,IAAI,OAAO,MAAM,OAAO;EACvB,SAAS;EACT,QAAQ;EACR;EACA;CACD;C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,MAAM,GAAG,OAAO,KAAK,UAAU;GACxC,iBAAiB;GACjB,YAAY,eAAe;EAC5B,CAAC,CAAC;OACG,GAAG,OAAO,2CAA2C,eAAe,EAAE,EAAE;EAC7E,QAAQ,KAAK,CAAC;CACf,CAAC;AACF;AACA,SAAS,gCAAgC;CACxC,MAAM,UAAU,IAAI,QAAQ,SAAS;CACrC,uBAAuB,SAAS,mCAAmC,kHAAkH;CACrL,OAAO,iBAAiB,OAAO,CAAC,CAAC,QAAQ,YAAY;EACpD,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,gBAAgB,EAAE,iBAAiB,MAAM,CAAC;EAC1C,MAAM,KAAK,iBAAiB,KAAK;EACjC,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU;GACxC,iBAAiB;GACjB,YAAY,eAAe;EAC5B,CAAC,CAAC;OACG,GAAG,OAAO,4CAA4C,eAAe,EAAE,EAAE;EAC9E,QAAQ,KAAK,CAAC;CACf,CAAC;AACF;AACA,SAAS,yBAAyB;CACjC,MAAM,UAAU,IAAI,QAAQ,WAAW;CACvC,uBAAuB,SAAS,8CAA8C,4LAA4L;CAC1Q,mBAAmB,SAAS;EAC3B;EACA;EACA;CACD,CAAC;CACD,QAAQ,cAAc;EACrB,aAAa,QAAQ,kBAAkB;GACtC,SAAS;GACT,OAAO,iBAAiB,CAAC,CAAC;EAC3B,CAAC;EACD,6BAA6B;CAC9B,CAAC;CACD,QAAQ,WAAW,6BAA6B,CAAC;CACjD,QAAQ,WAAW,6BAA6B,CAAC;CACjD,QAAQ,WAAW,8BAA8B,CAAC;CAClD,OAAO;AACR"}
@@ -1,8 +1,8 @@
1
- import { F as formatDim, X as isVerbose, a as createColorFormatter } from "./command-helpers-CAoXqAY9-DWUBcTXM.mjs";
1
+ import { F as formatDim, X as isVerbose, a as createColorFormatter } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
2
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
3
  import { issueOutcome } from "@prisma/orm-framework/components/control";
4
4
  import { bold, cyan, dim, green, magenta, red, yellow } from "colorette";
5
- //#region ../../../1-framework/3-tooling/cli/dist/verify-DnVNjc5C.mjs
5
+ //#region ../../../1-framework/3-tooling/cli/dist/verify-C6L_hiJU.mjs
6
6
  /** Human-readable label for each outcome, prefixed onto an issue's message for display. */
7
7
  const OUTCOME_LABEL = {
8
8
  "not-found": "missing",
@@ -280,4 +280,4 @@ function formatSignJson(result) {
280
280
  //#endregion
281
281
  export { formatSignJson as a, formatVerifyOutput as c, formatSchemaVerifyOutput as i, formatIntrospectOutput as n, formatSignOutput as o, formatSchemaVerifyJson as r, formatVerifyJson as s, formatIntrospectJson as t };
282
282
 
283
- //# sourceMappingURL=verify-DnVNjc5C-BGdsblBK.mjs.map
283
+ //# sourceMappingURL=verify-C6L_hiJU-B4V3bqvG.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-DnVNjc5C-BGdsblBK.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/verify-DnVNjc5C.mjs"],"sourcesContent":["import { M as createColorFormatter, N as formatDim, P as isVerbose } from \"./command-helpers-CAoXqAY9.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { bold, cyan, dim, green, magenta, red, yellow } from \"colorette\";\n//#region src/utils/formatters/verify.ts\n/** Human-readable label for each outcome, prefixed onto an issue's message for display. */\nconst OUTCOME_LABEL = {\n\t\"not-found\": \"missing\",\n\t\"not-expected\": \"extra\",\n\t\"not-equal\": \"mismatch\"\n};\n/**\n* The issue's display text: its own path, prefixed with a human label for\n* why it's flagged. Turning the presence-derived outcome (and the path) into\n* prose is this formatter's job, not the differ's — the differ's issue is\n* data (`path` + nodes), not prose.\n*/\nfunction formatIssueMessage(issue) {\n\treturn `${OUTCOME_LABEL[issueOutcome(issue)]}: ${issue.path.join(\"/\")}`;\n}\n/**\n* Formats human-readable output for database verify.\n*/\nfunction formatVerifyOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst verificationMode = result.mode === \"full\" ? `marker + schema${result.schema?.strict ? \" (strict)\" : \" (tolerant)\"}` : \"marker only (--marker-only)\";\n\tlines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\tlines.push(`${formatDimText(` verification: ${verificationMode}`)}`);\n\tlines.push(`${formatDimText(` storageHash: ${result.contract.storageHash}`)}`);\n\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\tif (result.schema?.warnings && result.schema.warnings.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of result.schema.warnings) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (result.unclaimed && result.unclaimed.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of result.unclaimed) lines.push(` ${formatYellow(\"⚠\")} ${name}`);\n\t}\n\tif (result.warning) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatYellow(\"⚠\")} ${result.warning}`);\n\t}\n\tif (isVerbose(flags, 1)) {\n\t\tif (result.codecCoverageSkipped) lines.push(`${formatDimText(\" Codec coverage check skipped (helper returned no supported types)\")}`);\n\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database verify.\n*/\nfunction formatVerifyJson(result) {\n\tconst output = {\n\t\tok: result.ok,\n\t\tsummary: result.summary,\n\t\tmode: result.mode,\n\t\tcontract: result.contract,\n\t\t...ifDefined(\"marker\", result.marker),\n\t\ttarget: result.target,\n\t\t...ifDefined(\"missingCodecs\", result.missingCodecs),\n\t\t...ifDefined(\"codecCoverageSkipped\", result.codecCoverageSkipped),\n\t\t...ifDefined(\"schema\", result.schema),\n\t\tunclaimed: result.unclaimed ?? [],\n\t\t...ifDefined(\"warning\", result.warning),\n\t\t...ifDefined(\"meta\", result.meta),\n\t\ttimings: result.timings\n\t};\n\treturn JSON.stringify(output, null, 2);\n}\n/**\n* Formats JSON output for database introspection.\n*/\nfunction formatIntrospectJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n/**\n* Renders a schema tree structure from CoreSchemaView.\n* Status-glyph tree styling shared with the retired verification-tree renderer.\n*/\nfunction renderSchemaTree(node, flags, options) {\n\tconst { isLast, prefix, useColor, formatDimText, isRoot = false } = options;\n\tconst lines = [];\n\tlet formattedLabel = node.label;\n\tif (useColor) switch (node.kind) {\n\t\tcase \"root\":\n\t\t\tformattedLabel = bold(node.label);\n\t\t\tbreak;\n\t\tcase \"entity\": {\n\t\t\tconst tableMatch = node.label.match(/^table\\s+(.+)$/);\n\t\t\tif (tableMatch?.[1]) {\n\t\t\t\tconst tableName = tableMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"table\")} ${cyan(tableName)}`;\n\t\t\t} else formattedLabel = cyan(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"collection\":\n\t\t\tformattedLabel = dim(node.label);\n\t\t\tbreak;\n\t\tcase \"field\": {\n\t\t\tconst columnMatch = node.label.match(/^([^:]+):\\s*(.+)$/);\n\t\t\tif (columnMatch?.[1] && columnMatch[2]) {\n\t\t\t\tconst columnName = columnMatch[1];\n\t\t\t\tconst rest = columnMatch[2];\n\t\t\t\tconst typeMatch = rest.match(/^([^\\s(]+)\\s*(\\([^)]+\\))$/);\n\t\t\t\tif (typeMatch?.[1] && typeMatch[2]) {\n\t\t\t\t\tconst typeDisplay = typeMatch[1];\n\t\t\t\t\tconst nullability = typeMatch[2];\n\t\t\t\t\tformattedLabel = `${cyan(columnName)}: ${typeDisplay} ${dim(nullability)}`;\n\t\t\t\t} else formattedLabel = `${cyan(columnName)}: ${rest}`;\n\t\t\t} else formattedLabel = node.label;\n\t\t\tbreak;\n\t\t}\n\t\tcase \"index\": {\n\t\t\tconst pkMatch = node.label.match(/^primary key:\\s*(.+)$/);\n\t\t\tif (pkMatch?.[1]) {\n\t\t\t\tconst columnNames = pkMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"primary key\")}: ${cyan(columnNames)}`;\n\t\t\t} else {\n\t\t\t\tconst uniqueMatch = node.label.match(/^unique\\s+(.+)$/);\n\t\t\t\tif (uniqueMatch?.[1]) {\n\t\t\t\t\tconst name = uniqueMatch[1];\n\t\t\t\t\tformattedLabel = `${dim(\"unique\")} ${cyan(name)}`;\n\t\t\t\t} else {\n\t\t\t\t\tconst indexMatch = node.label.match(/^(unique\\s+)?index\\s+(.+)$/);\n\t\t\t\t\tif (indexMatch?.[2]) {\n\t\t\t\t\t\tconst indexPrefix = indexMatch[1] ? `${dim(\"unique\")} ` : \"\";\n\t\t\t\t\t\tconst name = indexMatch[2];\n\t\t\t\t\t\tformattedLabel = `${indexPrefix}${dim(\"index\")} ${cyan(name)}`;\n\t\t\t\t\t} else formattedLabel = dim(node.label);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"dependency\": {\n\t\t\tconst extMatch = node.label.match(/^([^\\s]+)\\s+(extension is enabled)$/);\n\t\t\tif (extMatch?.[1] && extMatch[2]) {\n\t\t\t\tconst extName = extMatch[1];\n\t\t\t\tconst rest = extMatch[2];\n\t\t\t\tformattedLabel = `${cyan(extName)} ${dim(rest)}`;\n\t\t\t} else formattedLabel = magenta(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tformattedLabel = node.label;\n\t\t\tbreak;\n\t}\n\tif (isRoot) lines.push(formattedLabel);\n\telse {\n\t\tconst treePrefix = `${formatDimText(isLast ? \"└\" : \"├\")}─ `;\n\t\tlines.push(`${prefix}${treePrefix}${formattedLabel}`);\n\t}\n\tif (node.children && node.children.length > 0) {\n\t\tconst childPrefix = isRoot ? \"\" : `${prefix}${isLast ? \" \" : `${formatDimText(\"│\")} `}`;\n\t\tfor (let i = 0; i < node.children.length; i++) {\n\t\t\tconst child = node.children[i];\n\t\t\tif (!child) continue;\n\t\t\tconst childLines = renderSchemaTree(child, flags, {\n\t\t\t\tisLast: i === node.children.length - 1,\n\t\t\t\tprefix: childPrefix,\n\t\t\t\tuseColor,\n\t\t\t\tformatDimText,\n\t\t\t\tisRoot: false\n\t\t\t});\n\t\t\tlines.push(...childLines);\n\t\t}\n\t}\n\treturn lines;\n}\n/**\n* Formats human-readable output for database introspection.\n*/\nfunction formatIntrospectOutput(result, schemaView, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (schemaView) {\n\t\tconst treeLines = renderSchemaTree(schemaView.root, flags, {\n\t\t\tisLast: true,\n\t\t\tprefix: \"\",\n\t\t\tuseColor,\n\t\t\tformatDimText,\n\t\t\tisRoot: true\n\t\t});\n\t\tlines.push(...treeLines);\n\t} else {\n\t\tlines.push(`✔ ${result.summary}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tlines.push(` Target: ${result.target.familyId}/${result.target.id}`);\n\t\t\tif (result.meta?.dbUrl) lines.push(` Database: ${result.meta.dbUrl}`);\n\t\t}\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats human-readable output for database schema verification.\n*/\nfunction formatSchemaVerifyOutput(result, flags, unclaimed = []) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatRed = createColorFormatter(useColor, red);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst issueMessages = result.schema.issues.map(formatIssueMessage);\n\tif (issueMessages.length > 0) {\n\t\tlines.push(formatRed(\"Schema issues:\"));\n\t\tfor (const message of issueMessages) lines.push(` ${formatRed(\"✖\")} ${message}`);\n\t}\n\tconst warningMessages = (result.schema.warnings?.issues ?? []).map(formatIssueMessage);\n\tif (warningMessages.length > 0) {\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of warningMessages) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (unclaimed.length > 0) {\n\t\tconst strict = result.meta?.strict ?? false;\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push((strict ? formatRed : formatYellow)(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of unclaimed) lines.push(` ${(strict ? formatRed : formatYellow)(strict ? \"✖\" : \"⚠\")} ${name}`);\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\tif (lines.length > 0) lines.push(\"\");\n\tif (result.ok) lines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\telse {\n\t\tconst codeText = result.code ? ` (${result.code})` : \"\";\n\t\tlines.push(`${formatRed(\"✖\")} ${result.summary}${codeText}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database schema verification. The unclaimed-elements\n* list is a top-level field alongside the combined result, reported once for\n* the whole database.\n*/\nfunction formatSchemaVerifyJson(result, unclaimed = []) {\n\treturn JSON.stringify({\n\t\t...result,\n\t\tunclaimed\n\t}, null, 2);\n}\n/**\n* Formats human-readable output for database sign.\n*/\nfunction formatSignOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (result.ok) {\n\t\tlines.push(`${formatGreen(\"✔\")} Database signed`);\n\t\tconst previousHash = result.marker.previous?.storageHash ?? \"none\";\n\t\tconst currentHash = result.contract.storageHash;\n\t\tlines.push(`${formatDimText(` from: ${previousHash}`)}`);\n\t\tlines.push(`${formatDimText(` to: ${currentHash}`)}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\t\t\tif (result.marker.previous?.profileHash) lines.push(`${formatDimText(` previous profileHash: ${result.marker.previous.profileHash}`)}`);\n\t\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database sign.\n*/\nfunction formatSignJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n//#endregion\nexport { formatSignJson as a, formatVerifyOutput as c, formatSchemaVerifyOutput as i, formatIntrospectOutput as n, formatSignOutput as o, formatSchemaVerifyJson as r, formatVerifyJson as s, formatIntrospectJson as t };\n\n//# sourceMappingURL=verify-DnVNjc5C.mjs.map"],"mappings":";;;;;;AAMA,MAAM,gBAAgB;CACrB,aAAa;CACb,gBAAgB;CAChB,aAAa;AACd;;;;;;;AAOA,SAAS,mBAAmB,OAAO;CAClC,OAAO,GAAG,cAAc,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,KAAK,GAAG;AACrE;;;;AAIA,SAAS,mBAAmB,QAAQ,OAAO;CAC1C,IAAI,MAAM,OAAO,OAAO;CACxB,MAAM,QAAQ,CAAC;CACf,MAAM,WAAW,MAAM,UAAU;CACjC,MAAM,cAAc,qBAAqB,UAAU,KAAK;CACxD,MAAM,eAAe,qBAAqB,UAAU,MAAM;CAC1D,MAAM,iBAAiB,SAAS,UAAU,UAAU,IAAI;CACxD,MAAM,mBAAmB,OAAO,SAAS,SAAS,kBAAkB,OAAO,QAAQ,SAAS,cAAc,kBAAkB;CAC5H,MAAM,KAAK,GAAG,YAAY,GAAG,EAAE,GAAG,OAAO,SAAS;CAClD,MAAM,KAAK,GAAG,cAAc,m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SAAS,iBAAiB,QAAQ,OAAO;CACxC,IAAI,MAAM,OAAO,OAAO;CACxB,MAAM,QAAQ,CAAC;CACf,MAAM,WAAW,MAAM,UAAU;CACjC,MAAM,cAAc,qBAAqB,UAAU,KAAK;CACxD,MAAM,iBAAiB,SAAS,UAAU,UAAU,IAAI;CACxD,IAAI,OAAO,IAAI;EACd,MAAM,KAAK,GAAG,YAAY,GAAG,EAAE,iBAAiB;EAChD,MAAM,eAAe,OAAO,OAAO,UAAU,eAAe;EAC5D,MAAM,cAAc,OAAO,SAAS;EACpC,MAAM,KAAK,GAAG,cAAc,WAAW,cAAc,GAAG;EACxD,MAAM,KAAK,GAAG,cAAc,WAAW,aAAa,GAAG;EACvD,IAAI,UAAU,OAAO,CAAC,GAAG;GACxB,IAAI,OAAO,SAAS,aAAa,MAAM,KAAK,GAAG,cAAc,kBAAkB,OAAO,SAAS,aAAa,GAAG;GAC/G,IAAI,OAAO,OAAO,UAAU,aAAa,MAAM,KAAK,GAAG,cAAc,2BAA2B,OAAO,OAAO,SAAS,aAAa,GAAG;GACvI,MAAM,KAAK,GAAG,cAAc,iBAAiB,OAAO,QAAQ,MAAM,GAAG,GAAG;EACzE;CACD;CACA,OAAO,MAAM,KAAK,IAAI;AACvB;;;;AAIA,SAAS,eAAe,QAAQ;CAC/B,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AACtC"}
1
+ {"version":3,"file":"verify-C6L_hiJU-B4V3bqvG.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/verify-C6L_hiJU.mjs"],"sourcesContent":["import { M as createColorFormatter, N as formatDim, P as isVerbose } from \"./command-helpers-C4WpR-QE.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { bold, cyan, dim, green, magenta, red, yellow } from \"colorette\";\n//#region src/utils/formatters/verify.ts\n/** Human-readable label for each outcome, prefixed onto an issue's message for display. */\nconst OUTCOME_LABEL = {\n\t\"not-found\": \"missing\",\n\t\"not-expected\": \"extra\",\n\t\"not-equal\": \"mismatch\"\n};\n/**\n* The issue's display text: its own path, prefixed with a human label for\n* why it's flagged. Turning the presence-derived outcome (and the path) into\n* prose is this formatter's job, not the differ's — the differ's issue is\n* data (`path` + nodes), not prose.\n*/\nfunction formatIssueMessage(issue) {\n\treturn `${OUTCOME_LABEL[issueOutcome(issue)]}: ${issue.path.join(\"/\")}`;\n}\n/**\n* Formats human-readable output for database verify.\n*/\nfunction formatVerifyOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst verificationMode = result.mode === \"full\" ? `marker + schema${result.schema?.strict ? \" (strict)\" : \" (tolerant)\"}` : \"marker only (--marker-only)\";\n\tlines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\tlines.push(`${formatDimText(` verification: ${verificationMode}`)}`);\n\tlines.push(`${formatDimText(` storageHash: ${result.contract.storageHash}`)}`);\n\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\tif (result.schema?.warnings && result.schema.warnings.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of result.schema.warnings) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (result.unclaimed && result.unclaimed.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of result.unclaimed) lines.push(` ${formatYellow(\"⚠\")} ${name}`);\n\t}\n\tif (result.warning) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatYellow(\"⚠\")} ${result.warning}`);\n\t}\n\tif (isVerbose(flags, 1)) {\n\t\tif (result.codecCoverageSkipped) lines.push(`${formatDimText(\" Codec coverage check skipped (helper returned no supported types)\")}`);\n\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database verify.\n*/\nfunction formatVerifyJson(result) {\n\tconst output = {\n\t\tok: result.ok,\n\t\tsummary: result.summary,\n\t\tmode: result.mode,\n\t\tcontract: result.contract,\n\t\t...ifDefined(\"marker\", result.marker),\n\t\ttarget: result.target,\n\t\t...ifDefined(\"missingCodecs\", result.missingCodecs),\n\t\t...ifDefined(\"codecCoverageSkipped\", result.codecCoverageSkipped),\n\t\t...ifDefined(\"schema\", result.schema),\n\t\tunclaimed: result.unclaimed ?? [],\n\t\t...ifDefined(\"warning\", result.warning),\n\t\t...ifDefined(\"meta\", result.meta),\n\t\ttimings: result.timings\n\t};\n\treturn JSON.stringify(output, null, 2);\n}\n/**\n* Formats JSON output for database introspection.\n*/\nfunction formatIntrospectJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n/**\n* Renders a schema tree structure from CoreSchemaView.\n* Status-glyph tree styling shared with the retired verification-tree renderer.\n*/\nfunction renderSchemaTree(node, flags, options) {\n\tconst { isLast, prefix, useColor, formatDimText, isRoot = false } = options;\n\tconst lines = [];\n\tlet formattedLabel = node.label;\n\tif (useColor) switch (node.kind) {\n\t\tcase \"root\":\n\t\t\tformattedLabel = bold(node.label);\n\t\t\tbreak;\n\t\tcase \"entity\": {\n\t\t\tconst tableMatch = node.label.match(/^table\\s+(.+)$/);\n\t\t\tif (tableMatch?.[1]) {\n\t\t\t\tconst tableName = tableMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"table\")} ${cyan(tableName)}`;\n\t\t\t} else formattedLabel = cyan(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"collection\":\n\t\t\tformattedLabel = dim(node.label);\n\t\t\tbreak;\n\t\tcase \"field\": {\n\t\t\tconst columnMatch = node.label.match(/^([^:]+):\\s*(.+)$/);\n\t\t\tif (columnMatch?.[1] && columnMatch[2]) {\n\t\t\t\tconst columnName = columnMatch[1];\n\t\t\t\tconst rest = columnMatch[2];\n\t\t\t\tconst typeMatch = rest.match(/^([^\\s(]+)\\s*(\\([^)]+\\))$/);\n\t\t\t\tif (typeMatch?.[1] && typeMatch[2]) {\n\t\t\t\t\tconst typeDisplay = typeMatch[1];\n\t\t\t\t\tconst nullability = typeMatch[2];\n\t\t\t\t\tformattedLabel = `${cyan(columnName)}: ${typeDisplay} ${dim(nullability)}`;\n\t\t\t\t} else formattedLabel = `${cyan(columnName)}: ${rest}`;\n\t\t\t} else formattedLabel = node.label;\n\t\t\tbreak;\n\t\t}\n\t\tcase \"index\": {\n\t\t\tconst pkMatch = node.label.match(/^primary key:\\s*(.+)$/);\n\t\t\tif (pkMatch?.[1]) {\n\t\t\t\tconst columnNames = pkMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"primary key\")}: ${cyan(columnNames)}`;\n\t\t\t} else {\n\t\t\t\tconst uniqueMatch = node.label.match(/^unique\\s+(.+)$/);\n\t\t\t\tif (uniqueMatch?.[1]) {\n\t\t\t\t\tconst name = uniqueMatch[1];\n\t\t\t\t\tformattedLabel = `${dim(\"unique\")} ${cyan(name)}`;\n\t\t\t\t} else {\n\t\t\t\t\tconst indexMatch = node.label.match(/^(unique\\s+)?index\\s+(.+)$/);\n\t\t\t\t\tif (indexMatch?.[2]) {\n\t\t\t\t\t\tconst indexPrefix = indexMatch[1] ? `${dim(\"unique\")} ` : \"\";\n\t\t\t\t\t\tconst name = indexMatch[2];\n\t\t\t\t\t\tformattedLabel = `${indexPrefix}${dim(\"index\")} ${cyan(name)}`;\n\t\t\t\t\t} else formattedLabel = dim(node.label);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"dependency\": {\n\t\t\tconst extMatch = node.label.match(/^([^\\s]+)\\s+(extension is enabled)$/);\n\t\t\tif (extMatch?.[1] && extMatch[2]) {\n\t\t\t\tconst extName = extMatch[1];\n\t\t\t\tconst rest = extMatch[2];\n\t\t\t\tformattedLabel = `${cyan(extName)} ${dim(rest)}`;\n\t\t\t} else formattedLabel = magenta(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tformattedLabel = node.label;\n\t\t\tbreak;\n\t}\n\tif (isRoot) lines.push(formattedLabel);\n\telse {\n\t\tconst treePrefix = `${formatDimText(isLast ? \"└\" : \"├\")}─ `;\n\t\tlines.push(`${prefix}${treePrefix}${formattedLabel}`);\n\t}\n\tif (node.children && node.children.length > 0) {\n\t\tconst childPrefix = isRoot ? \"\" : `${prefix}${isLast ? \" \" : `${formatDimText(\"│\")} `}`;\n\t\tfor (let i = 0; i < node.children.length; i++) {\n\t\t\tconst child = node.children[i];\n\t\t\tif (!child) continue;\n\t\t\tconst childLines = renderSchemaTree(child, flags, {\n\t\t\t\tisLast: i === node.children.length - 1,\n\t\t\t\tprefix: childPrefix,\n\t\t\t\tuseColor,\n\t\t\t\tformatDimText,\n\t\t\t\tisRoot: false\n\t\t\t});\n\t\t\tlines.push(...childLines);\n\t\t}\n\t}\n\treturn lines;\n}\n/**\n* Formats human-readable output for database introspection.\n*/\nfunction formatIntrospectOutput(result, schemaView, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (schemaView) {\n\t\tconst treeLines = renderSchemaTree(schemaView.root, flags, {\n\t\t\tisLast: true,\n\t\t\tprefix: \"\",\n\t\t\tuseColor,\n\t\t\tformatDimText,\n\t\t\tisRoot: true\n\t\t});\n\t\tlines.push(...treeLines);\n\t} else {\n\t\tlines.push(`✔ ${result.summary}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tlines.push(` Target: ${result.target.familyId}/${result.target.id}`);\n\t\t\tif (result.meta?.dbUrl) lines.push(` Database: ${result.meta.dbUrl}`);\n\t\t}\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats human-readable output for database schema verification.\n*/\nfunction formatSchemaVerifyOutput(result, flags, unclaimed = []) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatRed = createColorFormatter(useColor, red);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst issueMessages = result.schema.issues.map(formatIssueMessage);\n\tif (issueMessages.length > 0) {\n\t\tlines.push(formatRed(\"Schema issues:\"));\n\t\tfor (const message of issueMessages) lines.push(` ${formatRed(\"✖\")} ${message}`);\n\t}\n\tconst warningMessages = (result.schema.warnings?.issues ?? []).map(formatIssueMessage);\n\tif (warningMessages.length > 0) {\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of warningMessages) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (unclaimed.length > 0) {\n\t\tconst strict = result.meta?.strict ?? false;\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push((strict ? formatRed : formatYellow)(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of unclaimed) lines.push(` ${(strict ? formatRed : formatYellow)(strict ? \"✖\" : \"⚠\")} ${name}`);\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\tif (lines.length > 0) lines.push(\"\");\n\tif (result.ok) lines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\telse {\n\t\tconst codeText = result.code ? ` (${result.code})` : \"\";\n\t\tlines.push(`${formatRed(\"✖\")} ${result.summary}${codeText}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database schema verification. The unclaimed-elements\n* list is a top-level field alongside the combined result, reported once for\n* the whole database.\n*/\nfunction formatSchemaVerifyJson(result, unclaimed = []) {\n\treturn JSON.stringify({\n\t\t...result,\n\t\tunclaimed\n\t}, null, 2);\n}\n/**\n* Formats human-readable output for database sign.\n*/\nfunction formatSignOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (result.ok) {\n\t\tlines.push(`${formatGreen(\"✔\")} Database signed`);\n\t\tconst previousHash = result.marker.previous?.storageHash ?? \"none\";\n\t\tconst currentHash = result.contract.storageHash;\n\t\tlines.push(`${formatDimText(` from: ${previousHash}`)}`);\n\t\tlines.push(`${formatDimText(` to: ${currentHash}`)}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\t\t\tif (result.marker.previous?.profileHash) lines.push(`${formatDimText(` previous profileHash: ${result.marker.previous.profileHash}`)}`);\n\t\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database sign.\n*/\nfunction formatSignJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n//#endregion\nexport { formatSignJson as a, formatVerifyOutput as c, formatSchemaVerifyOutput as i, formatIntrospectOutput as n, formatSignOutput as o, formatSchemaVerifyJson as r, formatVerifyJson as s, formatIntrospectJson as t };\n\n//# sourceMappingURL=verify-C6L_hiJU.mjs.map"],"mappings":";;;;;;AAMA,MAAM,gBAAgB;CACrB,aAAa;CACb,gBAAgB;CAChB,aAAa;AACd;;;;;;;AAOA,SAAS,mBAAmB,OAAO;CAClC,OAAO,GAAG,cAAc,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,KAAK,GAAG;AACrE;;;;AAIA,SAAS,mBAAmB,QAAQ,OAAO;CAC1C,IAAI,MAAM,OAAO,OAAO;CACxB,MAAM,QAAQ,CAAC;CACf,M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y as errorInvalidRefFile } from "./errors-IpZm1Skp-BH495dRd.mjs";
2
- import { t as MANIFEST_FILE } from "./io-C8TdyBKt-DloEBi70.mjs";
1
+ import { C as errorInvalidSpaceId, g as errorInvalidJson, y as errorInvalidRefFile } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
+ import { t as MANIFEST_FILE } from "./io-CHUUeHh0-CoCBe9eN.mjs";
3
3
  import { join } from "pathe";
4
4
  import { readFile, readdir, stat } from "node:fs/promises";
5
5
  import { APP_SPACE_ID as APP_SPACE_ID$1, CONTRACT_SNAPSHOTS_DIRNAME } from "@prisma/orm-framework/components/control";
6
- //#region ../../../1-framework/3-tooling/migration/dist/verify-contract-spaces-BZDcJsuA.mjs
6
+ //#region ../../../1-framework/3-tooling/migration/dist/verify-contract-spaces-WvjSiWcB.mjs
7
7
  /**
8
8
  * Pattern a contract-space identifier must match. The constraint is
9
9
  * filesystem-friendly: lowercase letters / digits / hyphen / underscore,
@@ -249,4 +249,4 @@ function verifyContractSpaces(inputs) {
249
249
  //#endregion
250
250
  export { isValidSpaceId as a, spaceMigrationDirectory as c, assertValidSpaceId as i, spaceRefsDirectory as l, RESERVED_SPACE_SUBDIR_NAMES as n, listContractSpaceDirectories as o, SPACE_REFS_DIRNAME as r, readContractSpaceHeadRef as s, APP_SPACE_ID$1 as t, verifyContractSpaces as u };
251
251
 
252
- //# sourceMappingURL=verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs.map
252
+ //# sourceMappingURL=verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-contract-spaces-BZDcJsuA-De8v4Z4T.mjs","names":["APP_SPACE_ID"],"sources":["../../../../1-framework/3-tooling/migration/dist/verify-contract-spaces-BZDcJsuA.mjs"],"sourcesContent":["import { C as errorInvalidSpaceId, g as errorInvalidJson, y as errorInvalidRefFile } from \"./errors-IpZm1Skp.mjs\";\nimport { t as MANIFEST_FILE } from \"./io-C8TdyBKt.mjs\";\nimport { join } from \"pathe\";\nimport { readFile, readdir, stat } from \"node:fs/promises\";\nimport { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME } from \"@internal/framework-components/control\";\n//#region src/space-layout.ts\n/**\n* Pattern a contract-space identifier must match. The constraint is\n* filesystem-friendly: lowercase letters / digits / hyphen / underscore,\n* starts with a letter, max 64 characters.\n*/\nconst SPACE_ID_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;\nfunction isValidSpaceId(spaceId) {\n\treturn SPACE_ID_PATTERN.test(spaceId);\n}\nfunction assertValidSpaceId(spaceId) {\n\tif (!isValidSpaceId(spaceId)) throw errorInvalidSpaceId(spaceId);\n}\n/**\n* Resolve the migrations subdirectory for a given contract space.\n*\n* Every contract space — including the app space (default `'app'`) —\n* lands under `<projectMigrationsDir>/<spaceId>/`. The space id is\n* validated against {@link SPACE_ID_PATTERN} because it becomes a\n* filesystem directory name verbatim.\n*\n* `projectMigrationsDir` is the project's top-level `migrations/`\n* directory; the helper does not assume anything about its absolute /\n* relative shape and is symmetric with `pathe.join`.\n*/\nfunction spaceMigrationDirectory(projectMigrationsDir, spaceId) {\n\tassertValidSpaceId(spaceId);\n\treturn join(projectMigrationsDir, spaceId);\n}\n/**\n* Per-space subdirectory name reserved for the ref store\n* (`migrations/<space>/<SPACE_REFS_DIRNAME>/*.json`). Single source of\n* truth: every helper that composes a per-space refs path imports this\n* constant, and the enumerator uses it (via\n* {@link RESERVED_SPACE_SUBDIR_NAMES}) to exclude reserved names from\n* the contract-space candidate list.\n*/\nconst SPACE_REFS_DIRNAME = \"refs\";\n/**\n* Names reserved under `migrations/` that must never be enumerated as a\n* phantom contract space: `SPACE_REFS_DIRNAME` (e.g. a top-level\n* `migrations/refs/` left in the wrong place) and\n* `CONTRACT_SNAPSHOTS_DIRNAME` (the migrations-root-wide contract\n* snapshot store, `migrations/snapshots/`).\n*/\nconst RESERVED_SPACE_SUBDIR_NAMES = /* @__PURE__ */ new Set([SPACE_REFS_DIRNAME, CONTRACT_SNAPSHOTS_DIRNAME]);\n/**\n* Resolve the per-space refs directory for `spaceMigrationsDir`\n* (typically the value returned by {@link spaceMigrationDirectory}).\n* Composes the canonical {@link SPACE_REFS_DIRNAME} so callers do not\n* hard-code the literal.\n*/\nfunction spaceRefsDirectory(spaceMigrationsDir) {\n\treturn join(spaceMigrationsDir, SPACE_REFS_DIRNAME);\n}\n//#endregion\n//#region src/read-contract-space-head-ref.ts\nfunction hasErrnoCode$1(error, code) {\n\treturn error instanceof Error && error.code === code;\n}\n/**\n* Read the head ref (`hash` + `invariants`) for a contract space from\n* `<projectMigrationsDir>/<spaceId>/refs/head.json`.\n*\n* Returns `null` when the file does not exist (first emit). Surfaces\n* `MIGRATION.INVALID_JSON` / `MIGRATION.INVALID_REF_FILE` on a corrupt\n* `refs/head.json` so callers can distinguish \"no head ref on disk\"\n* (returns `null`) from \"head ref present but unreadable\" (throws).\n*\n* Validates the space id against `[a-z][a-z0-9_-]{0,63}` for the same\n* filesystem-safety reasons as the rest of the per-space helpers. The\n* helper is uniform across the app and extension spaces.\n*/\nasync function readContractSpaceHeadRef(projectMigrationsDir, spaceId) {\n\tassertValidSpaceId(spaceId);\n\tconst filePath = join(spaceRefsDirectory(spaceMigrationDirectory(projectMigrationsDir, spaceId)), \"head.json\");\n\tlet raw;\n\ttry {\n\t\traw = await readFile(filePath, \"utf-8\");\n\t} catch (error) {\n\t\tif (hasErrnoCode$1(error, \"ENOENT\")) return null;\n\t\tthrow error;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch (e) {\n\t\tthrow errorInvalidJson(filePath, e instanceof Error ? e.message : String(e));\n\t}\n\tif (typeof parsed !== \"object\" || parsed === null) throw errorInvalidRefFile(filePath, \"expected an object\");\n\tconst obj = parsed;\n\tif (typeof obj.hash !== \"string\") throw errorInvalidRefFile(filePath, \"expected an object with a string `hash` field\");\n\tif (!Array.isArray(obj.invariants) || obj.invariants.some((value) => typeof value !== \"string\")) throw errorInvalidRefFile(filePath, \"expected an object with an `invariants` array of strings\");\n\treturn {\n\t\thash: obj.hash,\n\t\tinvariants: obj.invariants\n\t};\n}\n//#endregion\n//#region src/verify-contract-spaces.ts\nfunction hasErrnoCode(error, code) {\n\treturn error instanceof Error && error.code === code;\n}\n/**\n* List the per-space subdirectories under\n* `<projectRoot>/migrations/`. Returns space-id directory names (sorted\n* alphabetically) — i.e. any non-dot-prefixed, non-reserved\n* ({@link RESERVED_SPACE_SUBDIR_NAMES}) subdirectory whose root does\n* **not** contain a `migration.json` manifest. The manifest is the\n* structural marker of a user-authored migration directory (see\n* `readMigrationsDir` in `./io`); directory names themselves belong to\n* the user and are not part of the contract. The reserved-name filter\n* keeps `migrations/snapshots/` (the contract snapshot store) from ever\n* being enumerated as a phantom contract space.\n*\n* Returns `[]` if the migrations directory does not exist (greenfield\n* project).\n*\n* Reads only the user's repo. **No descriptor import.** The caller\n* (verifier) feeds the result into {@link verifyContractSpaces} alongside\n* the loaded-space set and the marker rows.\n*/\nasync function listContractSpaceDirectories(projectMigrationsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = (await readdir(projectMigrationsDir, { withFileTypes: true })).map((d) => ({\n\t\t\tname: d.name,\n\t\t\tisDirectory: d.isDirectory()\n\t\t}));\n\t} catch (error) {\n\t\tif (hasErrnoCode(error, \"ENOENT\")) return [];\n\t\tthrow error;\n\t}\n\tconst namedCandidates = entries.filter((e) => e.isDirectory).map((e) => e.name).filter((name) => !name.startsWith(\".\")).filter((name) => !RESERVED_SPACE_SUBDIR_NAMES.has(name)).sort();\n\treturn (await Promise.all(namedCandidates.map(async (name) => {\n\t\ttry {\n\t\t\tawait stat(join(projectMigrationsDir, name, MANIFEST_FILE));\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tisMigrationDir: true\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tif (hasErrnoCode(error, \"ENOENT\")) return {\n\t\t\t\tname,\n\t\t\t\tisMigrationDir: false\n\t\t\t};\n\t\t\tthrow error;\n\t\t}\n\t}))).filter((c) => !c.isMigrationDir).map((c) => c.name);\n}\n/**\n* Pure structural verifier for the per-space mechanism. Aggregates the\n* three orphan / missing checks plus per-space hash and invariant\n* comparison.\n*\n* Algorithm:\n*\n* - For every extension space declared in `loadedSpaces` (`'app'`\n* excluded — the per-space verifier is scoped to extension spaces;\n* the app is verified through the aggregate path):\n* - If no contract-space dir on disk → `declaredButUnmigrated`.\n* - Else if `markerRowsBySpace` lacks an entry → no violation here;\n* the live-DB compare done outside this helper is where the\n* absence shows up.\n* - Else compare marker hash / invariants vs. on-disk head hash /\n* invariants → `hashMismatch` / `invariantsMismatch` on drift.\n* - For every contract-space dir on disk that is not in `loadedSpaces` →\n* `orphanSpaceDir`.\n* - For every marker row whose `space` is not in `loadedSpaces` →\n* `orphanMarker`. The app-space marker is always loaded (`'app'` is\n* in `loadedSpaces` by definition).\n*\n* Output is deterministic: violations are sorted first by `kind`\n* (`declaredButUnmigrated` → `orphanMarker` → `orphanSpaceDir` →\n* `hashMismatch` → `invariantsMismatch`) then by `spaceId`. Two callers\n* passing equivalent inputs see byte-identical violation lists.\n*\n* Synchronous, pure, no I/O. **Does not import the extension descriptor**\n* (the inputs are pre-resolved by the caller); the verifier reads only\n* the user repo, not `node_modules`.\n*/\nfunction verifyContractSpaces(inputs) {\n\tconst violations = [];\n\tfor (const spaceId of [...inputs.loadedSpaces].sort()) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tif (!inputs.spaceDirsOnDisk.includes(spaceId)) {\n\t\t\tviolations.push({\n\t\t\t\tkind: \"declaredButUnmigrated\",\n\t\t\t\tspaceId,\n\t\t\t\tremediation: `Extension '${spaceId}' is declared in extensions but has not been emitted; run \\`prisma-next migrate\\`.`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst head = inputs.headRefsBySpace.get(spaceId);\n\t\tconst marker = inputs.markerRowsBySpace.get(spaceId);\n\t\tif (!head || !marker) continue;\n\t\tif (head.hash !== marker.hash) {\n\t\t\tviolations.push({\n\t\t\t\tkind: \"hashMismatch\",\n\t\t\t\tspaceId,\n\t\t\t\tpriorHeadHash: head.hash,\n\t\t\t\tmarkerHash: marker.hash,\n\t\t\t\tremediation: `Marker row for space '${spaceId}' is keyed at ${marker.hash}, but the on-disk ${join(\"migrations\", spaceId, \"contract.json\")} resolves to ${head.hash}. Run \\`prisma-next db update\\` to advance the database, or \\`prisma-next migrate\\` if the descriptor was bumped without re-emitting.`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst onDiskInvariants = [...head.invariants].sort();\n\t\tconst markerInvariants = new Set(marker.invariants);\n\t\tconst missing = onDiskInvariants.filter((id) => !markerInvariants.has(id));\n\t\tif (missing.length > 0) violations.push({\n\t\t\tkind: \"invariantsMismatch\",\n\t\t\tspaceId,\n\t\t\tonDiskInvariants,\n\t\t\tmarkerInvariants: [...marker.invariants].sort(),\n\t\t\tremediation: `Marker row for space '${spaceId}' is missing invariants [${missing.map((s) => JSON.stringify(s)).join(\", \")}]. Run \\`prisma-next db update\\` to apply the corresponding data-transform migrations.`\n\t\t});\n\t}\n\tfor (const dir of [...inputs.spaceDirsOnDisk].sort()) if (!inputs.loadedSpaces.has(dir)) violations.push({\n\t\tkind: \"orphanSpaceDir\",\n\t\tspaceId: dir,\n\t\tremediation: `Orphan contract-space directory \\`${join(\"migrations\", dir)}/\\` for an extension not in extensions; remove the directory or re-add the extension.`\n\t});\n\tfor (const space of [...inputs.markerRowsBySpace.keys()].sort()) if (!inputs.loadedSpaces.has(space)) violations.push({\n\t\tkind: \"orphanMarker\",\n\t\tspaceId: space,\n\t\tremediation: `Orphan marker row for space '${space}' (no longer in extensions); remediation: manually delete the row from \\`prisma_contract.marker\\`.`\n\t});\n\tif (violations.length === 0) return { ok: true };\n\tconst kindOrder = {\n\t\tdeclaredButUnmigrated: 0,\n\t\torphanMarker: 1,\n\t\torphanSpaceDir: 2,\n\t\thashMismatch: 3,\n\t\tinvariantsMismatch: 4\n\t};\n\tviolations.sort((a, b) => {\n\t\tconst k = kindOrder[a.kind] - kindOrder[b.kind];\n\t\tif (k !== 0) return k;\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t});\n\treturn {\n\t\tok: false,\n\t\tviolations\n\t};\n}\n//#endregion\nexport { RESERVED_SPACE_SUBDIR_NAMES as a, isValidSpaceId as c, APP_SPACE_ID as i, spaceMigrationDirectory as l, verifyContractSpaces as n, SPACE_REFS_DIRNAME as o, readContractSpaceHeadRef as r, assertValidSpaceId as s, listContractSpaceDirectories as t, spaceRefsDirectory as u };\n\n//# sourceMappingURL=verify-contract-spaces-BZDcJsuA.mjs.map"],"mappings":";;;;;;;;;;;AAWA,MAAM,mBAAmB;AACzB,SAAS,eAAe,SAAS;CAChC,OAAO,iBAAiB,KAAK,OAAO;AACrC;AACA,SAAS,mBAAmB,SAAS;CACpC,IAAI,CAAC,eAAe,OAAO,GAAG,MAAM,oBAAoB,OAAO;AAChE;;;;;;;;;;;;;AAaA,SAAS,wBAAwB,sBAAsB,SAAS;CAC/D,mBAAmB,OAAO;CAC1B,OAAO,KAAK,sBAAsB,OAAO;AAC1C;;;;;;;;;AASA,MAAM,qBAAqB;;;;;;;;AAQ3B,MAAM,8CAA8C,IAAI,IAAI,CAAC,oBAAoB,0BAA0B,CAAC;;;;;;;AAO5G,SAAS,mBAAmB,oBAAoB;CAC/C,OAAO,KAAK,oBAAoB,kBAAkB;AACnD;AAGA,SAAS,eAAe,OAAO,MAAM;CACpC,OAAO,iBAAiB,SAAS,MAAM,SAAS;AACjD;;;;;;;;;;;;;;AAcA,eAAe,yBAAyB,sBAAsB,SAAS;CACtE,mBAAmB,OAAO;CAC1B,MAAM,WAAW,KAAK,mBAAmB,wBAAwB,sBAAsB,OAAO,CAAC,GAAG,WAAW;CAC7G,IAAI;CACJ,IAAI;EACH,MAAM,MAAM,SAAS,UAAU,OAAO;CACvC,SAAS,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AC,CAAC,KAAK;GAC9C,aAAa,yBAAyB,QAAQ,2BAA2B,QAAQ,KAAK,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;EAC3H,CAAC;CACF;CACA,KAAK,MAAM,OAAO,CAAC,GAAG,OAAO,eAAe,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,GAAG,GAAG,WAAW,KAAK;EACxG,MAAM;EACN,SAAS;EACT,aAAa,qCAAqC,KAAK,cAAc,GAAG,EAAE;CAC3E,CAAC;CACD,KAAK,MAAM,SAAS,CAAC,GAAG,OAAO,kBAAkB,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,KAAK,GAAG,WAAW,KAAK;EACrH,MAAM;EACN,SAAS;EACT,aAAa,gCAAgC,MAAM;CACpD,CAAC;CACD,IAAI,WAAW,WAAW,GAAG,OAAO,EAAE,IAAI,KAAK;CAC/C,MAAM,YAAY;EACjB,uBAAuB;EACvB,cAAc;EACd,gBAAgB;EAChB,cAAc;EACd,oBAAoB;CACrB;CACA,WAAW,MAAM,GAAG,MAAM;EACzB,MAAM,IAAI,UAAU,EAAE,QAAQ,UAAU,EAAE;EAC1C,IAAI,MAAM,GAAG,OAAO;EACpB,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC;CACD,OAAO;EACN,IAAI;EACJ;CACD;AACD"}
1
+ {"version":3,"file":"verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs","names":["APP_SPACE_ID"],"sources":["../../../../1-framework/3-tooling/migration/dist/verify-contract-spaces-WvjSiWcB.mjs"],"sourcesContent":["import { C as errorInvalidSpaceId, g as errorInvalidJson, y as errorInvalidRefFile } from \"./errors-Co-8oaiB.mjs\";\nimport { t as MANIFEST_FILE } from \"./io-CHUUeHh0.mjs\";\nimport { join } from \"pathe\";\nimport { readFile, readdir, stat } from \"node:fs/promises\";\nimport { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME } from \"@internal/framework-components/control\";\n//#region src/space-layout.ts\n/**\n* Pattern a contract-space identifier must match. The constraint is\n* filesystem-friendly: lowercase letters / digits / hyphen / underscore,\n* starts with a letter, max 64 characters.\n*/\nconst SPACE_ID_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;\nfunction isValidSpaceId(spaceId) {\n\treturn SPACE_ID_PATTERN.test(spaceId);\n}\nfunction assertValidSpaceId(spaceId) {\n\tif (!isValidSpaceId(spaceId)) throw errorInvalidSpaceId(spaceId);\n}\n/**\n* Resolve the migrations subdirectory for a given contract space.\n*\n* Every contract space — including the app space (default `'app'`) —\n* lands under `<projectMigrationsDir>/<spaceId>/`. The space id is\n* validated against {@link SPACE_ID_PATTERN} because it becomes a\n* filesystem directory name verbatim.\n*\n* `projectMigrationsDir` is the project's top-level `migrations/`\n* directory; the helper does not assume anything about its absolute /\n* relative shape and is symmetric with `pathe.join`.\n*/\nfunction spaceMigrationDirectory(projectMigrationsDir, spaceId) {\n\tassertValidSpaceId(spaceId);\n\treturn join(projectMigrationsDir, spaceId);\n}\n/**\n* Per-space subdirectory name reserved for the ref store\n* (`migrations/<space>/<SPACE_REFS_DIRNAME>/*.json`). Single source of\n* truth: every helper that composes a per-space refs path imports this\n* constant, and the enumerator uses it (via\n* {@link RESERVED_SPACE_SUBDIR_NAMES}) to exclude reserved names from\n* the contract-space candidate list.\n*/\nconst SPACE_REFS_DIRNAME = \"refs\";\n/**\n* Names reserved under `migrations/` that must never be enumerated as a\n* phantom contract space: `SPACE_REFS_DIRNAME` (e.g. a top-level\n* `migrations/refs/` left in the wrong place) and\n* `CONTRACT_SNAPSHOTS_DIRNAME` (the migrations-root-wide contract\n* snapshot store, `migrations/snapshots/`).\n*/\nconst RESERVED_SPACE_SUBDIR_NAMES = /* @__PURE__ */ new Set([SPACE_REFS_DIRNAME, CONTRACT_SNAPSHOTS_DIRNAME]);\n/**\n* Resolve the per-space refs directory for `spaceMigrationsDir`\n* (typically the value returned by {@link spaceMigrationDirectory}).\n* Composes the canonical {@link SPACE_REFS_DIRNAME} so callers do not\n* hard-code the literal.\n*/\nfunction spaceRefsDirectory(spaceMigrationsDir) {\n\treturn join(spaceMigrationsDir, SPACE_REFS_DIRNAME);\n}\n//#endregion\n//#region src/read-contract-space-head-ref.ts\nfunction hasErrnoCode$1(error, code) {\n\treturn error instanceof Error && error.code === code;\n}\n/**\n* Read the head ref (`hash` + `invariants`) for a contract space from\n* `<projectMigrationsDir>/<spaceId>/refs/head.json`.\n*\n* Returns `null` when the file does not exist (first emit). Surfaces\n* `MIGRATION.INVALID_JSON` / `MIGRATION.INVALID_REF_FILE` on a corrupt\n* `refs/head.json` so callers can distinguish \"no head ref on disk\"\n* (returns `null`) from \"head ref present but unreadable\" (throws).\n*\n* Validates the space id against `[a-z][a-z0-9_-]{0,63}` for the same\n* filesystem-safety reasons as the rest of the per-space helpers. The\n* helper is uniform across the app and extension spaces.\n*/\nasync function readContractSpaceHeadRef(projectMigrationsDir, spaceId) {\n\tassertValidSpaceId(spaceId);\n\tconst filePath = join(spaceRefsDirectory(spaceMigrationDirectory(projectMigrationsDir, spaceId)), \"head.json\");\n\tlet raw;\n\ttry {\n\t\traw = await readFile(filePath, \"utf-8\");\n\t} catch (error) {\n\t\tif (hasErrnoCode$1(error, \"ENOENT\")) return null;\n\t\tthrow error;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch (e) {\n\t\tthrow errorInvalidJson(filePath, e instanceof Error ? e.message : String(e));\n\t}\n\tif (typeof parsed !== \"object\" || parsed === null) throw errorInvalidRefFile(filePath, \"expected an object\");\n\tconst obj = parsed;\n\tif (typeof obj.hash !== \"string\") throw errorInvalidRefFile(filePath, \"expected an object with a string `hash` field\");\n\tif (!Array.isArray(obj.invariants) || obj.invariants.some((value) => typeof value !== \"string\")) throw errorInvalidRefFile(filePath, \"expected an object with an `invariants` array of strings\");\n\treturn {\n\t\thash: obj.hash,\n\t\tinvariants: obj.invariants\n\t};\n}\n//#endregion\n//#region src/verify-contract-spaces.ts\nfunction hasErrnoCode(error, code) {\n\treturn error instanceof Error && error.code === code;\n}\n/**\n* List the per-space subdirectories under\n* `<projectRoot>/migrations/`. Returns space-id directory names (sorted\n* alphabetically) — i.e. any non-dot-prefixed, non-reserved\n* ({@link RESERVED_SPACE_SUBDIR_NAMES}) subdirectory whose root does\n* **not** contain a `migration.json` manifest. The manifest is the\n* structural marker of a user-authored migration directory (see\n* `readMigrationsDir` in `./io`); directory names themselves belong to\n* the user and are not part of the contract. The reserved-name filter\n* keeps `migrations/snapshots/` (the contract snapshot store) from ever\n* being enumerated as a phantom contract space.\n*\n* Returns `[]` if the migrations directory does not exist (greenfield\n* project).\n*\n* Reads only the user's repo. **No descriptor import.** The caller\n* (verifier) feeds the result into {@link verifyContractSpaces} alongside\n* the loaded-space set and the marker rows.\n*/\nasync function listContractSpaceDirectories(projectMigrationsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = (await readdir(projectMigrationsDir, { withFileTypes: true })).map((d) => ({\n\t\t\tname: d.name,\n\t\t\tisDirectory: d.isDirectory()\n\t\t}));\n\t} catch (error) {\n\t\tif (hasErrnoCode(error, \"ENOENT\")) return [];\n\t\tthrow error;\n\t}\n\tconst namedCandidates = entries.filter((e) => e.isDirectory).map((e) => e.name).filter((name) => !name.startsWith(\".\")).filter((name) => !RESERVED_SPACE_SUBDIR_NAMES.has(name)).sort();\n\treturn (await Promise.all(namedCandidates.map(async (name) => {\n\t\ttry {\n\t\t\tawait stat(join(projectMigrationsDir, name, MANIFEST_FILE));\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tisMigrationDir: true\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tif (hasErrnoCode(error, \"ENOENT\")) return {\n\t\t\t\tname,\n\t\t\t\tisMigrationDir: false\n\t\t\t};\n\t\t\tthrow error;\n\t\t}\n\t}))).filter((c) => !c.isMigrationDir).map((c) => c.name);\n}\n/**\n* Pure structural verifier for the per-space mechanism. Aggregates the\n* three orphan / missing checks plus per-space hash and invariant\n* comparison.\n*\n* Algorithm:\n*\n* - For every extension space declared in `loadedSpaces` (`'app'`\n* excluded — the per-space verifier is scoped to extension spaces;\n* the app is verified through the aggregate path):\n* - If no contract-space dir on disk → `declaredButUnmigrated`.\n* - Else if `markerRowsBySpace` lacks an entry → no violation here;\n* the live-DB compare done outside this helper is where the\n* absence shows up.\n* - Else compare marker hash / invariants vs. on-disk head hash /\n* invariants → `hashMismatch` / `invariantsMismatch` on drift.\n* - For every contract-space dir on disk that is not in `loadedSpaces` →\n* `orphanSpaceDir`.\n* - For every marker row whose `space` is not in `loadedSpaces` →\n* `orphanMarker`. The app-space marker is always loaded (`'app'` is\n* in `loadedSpaces` by definition).\n*\n* Output is deterministic: violations are sorted first by `kind`\n* (`declaredButUnmigrated` → `orphanMarker` → `orphanSpaceDir` →\n* `hashMismatch` → `invariantsMismatch`) then by `spaceId`. Two callers\n* passing equivalent inputs see byte-identical violation lists.\n*\n* Synchronous, pure, no I/O. **Does not import the extension descriptor**\n* (the inputs are pre-resolved by the caller); the verifier reads only\n* the user repo, not `node_modules`.\n*/\nfunction verifyContractSpaces(inputs) {\n\tconst violations = [];\n\tfor (const spaceId of [...inputs.loadedSpaces].sort()) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tif (!inputs.spaceDirsOnDisk.includes(spaceId)) {\n\t\t\tviolations.push({\n\t\t\t\tkind: \"declaredButUnmigrated\",\n\t\t\t\tspaceId,\n\t\t\t\tremediation: `Extension '${spaceId}' is declared in extensions but has not been emitted; run \\`prisma-next migrate\\`.`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst head = inputs.headRefsBySpace.get(spaceId);\n\t\tconst marker = inputs.markerRowsBySpace.get(spaceId);\n\t\tif (!head || !marker) continue;\n\t\tif (head.hash !== marker.hash) {\n\t\t\tviolations.push({\n\t\t\t\tkind: \"hashMismatch\",\n\t\t\t\tspaceId,\n\t\t\t\tpriorHeadHash: head.hash,\n\t\t\t\tmarkerHash: marker.hash,\n\t\t\t\tremediation: `Marker row for space '${spaceId}' is keyed at ${marker.hash}, but the on-disk ${join(\"migrations\", spaceId, \"contract.json\")} resolves to ${head.hash}. Run \\`prisma-next db update\\` to advance the database, or \\`prisma-next migrate\\` if the descriptor was bumped without re-emitting.`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst onDiskInvariants = [...head.invariants].sort();\n\t\tconst markerInvariants = new Set(marker.invariants);\n\t\tconst missing = onDiskInvariants.filter((id) => !markerInvariants.has(id));\n\t\tif (missing.length > 0) violations.push({\n\t\t\tkind: \"invariantsMismatch\",\n\t\t\tspaceId,\n\t\t\tonDiskInvariants,\n\t\t\tmarkerInvariants: [...marker.invariants].sort(),\n\t\t\tremediation: `Marker row for space '${spaceId}' is missing invariants [${missing.map((s) => JSON.stringify(s)).join(\", \")}]. Run \\`prisma-next db update\\` to apply the corresponding data-transform migrations.`\n\t\t});\n\t}\n\tfor (const dir of [...inputs.spaceDirsOnDisk].sort()) if (!inputs.loadedSpaces.has(dir)) violations.push({\n\t\tkind: \"orphanSpaceDir\",\n\t\tspaceId: dir,\n\t\tremediation: `Orphan contract-space directory \\`${join(\"migrations\", dir)}/\\` for an extension not in extensions; remove the directory or re-add the extension.`\n\t});\n\tfor (const space of [...inputs.markerRowsBySpace.keys()].sort()) if (!inputs.loadedSpaces.has(space)) violations.push({\n\t\tkind: \"orphanMarker\",\n\t\tspaceId: space,\n\t\tremediation: `Orphan marker row for space '${space}' (no longer in extensions); remediation: manually delete the row from \\`prisma_contract.marker\\`.`\n\t});\n\tif (violations.length === 0) return { ok: true };\n\tconst kindOrder = {\n\t\tdeclaredButUnmigrated: 0,\n\t\torphanMarker: 1,\n\t\torphanSpaceDir: 2,\n\t\thashMismatch: 3,\n\t\tinvariantsMismatch: 4\n\t};\n\tviolations.sort((a, b) => {\n\t\tconst k = kindOrder[a.kind] - kindOrder[b.kind];\n\t\tif (k !== 0) return k;\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t});\n\treturn {\n\t\tok: false,\n\t\tviolations\n\t};\n}\n//#endregion\nexport { RESERVED_SPACE_SUBDIR_NAMES as a, isValidSpaceId as c, APP_SPACE_ID as i, spaceMigrationDirectory as l, verifyContractSpaces as n, SPACE_REFS_DIRNAME as o, readContractSpaceHeadRef as r, assertValidSpaceId as s, listContractSpaceDirectories as t, spaceRefsDirectory as u };\n\n//# sourceMappingURL=verify-contract-spaces-WvjSiWcB.mjs.map"],"mappings":";;;;;;;;;;;AAWA,MAAM,mBAAmB;AACzB,SAAS,eAAe,SAAS;CAChC,OAAO,iBAAiB,KAAK,OAAO;AACrC;AACA,SAAS,mBAAmB,SAAS;CACpC,IAAI,CAAC,eAAe,OAAO,GAAG,MAAM,oBAAoB,OAAO;AAChE;;;;;;;;;;;;;AAaA,SAAS,wBAAwB,sBAAsB,SAAS;CAC/D,mBAAmB,OAAO;CAC1B,OAAO,KAAK,sBAAsB,OAAO;AAC1C;;;;;;;;;AASA,MAAM,qBAAqB;;;;;;;;AAQ3B,MAAM,8CAA8C,IAAI,IAAI,CAAC,oBAAoB,0BAA0B,CAAC;;;;;;;AAO5G,SAAS,mBAAmB,oBAAoB;CAC/C,OAAO,KAAK,oBAAoB,kBAAkB;AACnD;AAGA,SAAS,eAAe,OAAO,MAAM;CACpC,OAAO,iBAAiB,SAAS,MAAM,SAAS;AACjD;;;;;;;;;;;;;;AAcA,eAAe,yBAAyB,sBAAsB,SAAS;CACtE,mBAAmB,OAAO;CAC1B,MAAM,WAAW,KAAK,mBAAmB,wBAAwB,sBAAsB,OAAO,CAAC,GAAG,WAAW;CAC7G,IAAI;CACJ,IAAI;EACH,MAAM,MAAM,SAAS,UAAU,OAAO;CACvC,SAAS,OAAO;EACf,IAAI,eAAe,OA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Aa,yBAAyB,QAAQ,2BAA2B,QAAQ,KAAK,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;EAC3H,CAAC;CACF;CACA,KAAK,MAAM,OAAO,CAAC,GAAG,OAAO,eAAe,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,GAAG,GAAG,WAAW,KAAK;EACxG,MAAM;EACN,SAAS;EACT,aAAa,qCAAqC,KAAK,cAAc,GAAG,EAAE;CAC3E,CAAC;CACD,KAAK,MAAM,SAAS,CAAC,GAAG,OAAO,kBAAkB,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,aAAa,IAAI,KAAK,GAAG,WAAW,KAAK;EACrH,MAAM;EACN,SAAS;EACT,aAAa,gCAAgC,MAAM;CACpD,CAAC;CACD,IAAI,WAAW,WAAW,GAAG,OAAO,EAAE,IAAI,KAAK;CAC/C,MAAM,YAAY;EACjB,uBAAuB;EACvB,cAAc;EACd,gBAAgB;EAChB,cAAc;EACd,oBAAoB;CACrB;CACA,WAAW,MAAM,GAAG,MAAM;EACzB,MAAM,IAAI,UAAU,EAAE,QAAQ,UAAU,EAAE;EAC1C,IAAI,MAAM,GAAG,OAAO;EACpB,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC;CACD,OAAO;EACN,IAAI;EACJ;CACD;AACD"}
@@ -1,4 +1,4 @@
1
- import { n as disposeEmitQueue, r as executeContractEmit } from "./contract-emit-B6odMoem-C87PBvmo.mjs";
1
+ import { n as disposeEmitQueue, r as executeContractEmit } from "./contract-emit-CTm2zfuG-7PV9SBY6.mjs";
2
2
  import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-okAfZydo.mjs";
3
3
  import { r as loadConfig } from "./exports-CDX9kZuw.mjs";
4
4
  import { extname, resolve } from "pathe";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-toolchain",
3
- "version": "8.0.0-rc.1-dev.5",
3
+ "version": "8.0.0-rc.1-dev.7",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@clack/prompts": "^1.7.0",
16
- "@prisma/orm-framework": "8.0.0-rc.1-dev.5",
16
+ "@prisma/orm-framework": "8.0.0-rc.1-dev.7",
17
17
  "@vercel/detect-agent": "^1.2.3",
18
18
  "arktype": "^2.2.2",
19
19
  "c12": "^3.3.4",
@@ -34,16 +34,16 @@
34
34
  "wrap-ansi": "^10.0.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@internal/cli": "8.0.0-rc.1-dev.5",
38
- "@internal/cli-telemetry": "8.0.0-rc.1-dev.5",
39
- "@internal/config-loader": "8.0.0-rc.1-dev.5",
40
- "@internal/emitter": "8.0.0-rc.1-dev.5",
41
- "@internal/language-server": "8.0.0-rc.1-dev.5",
42
- "@internal/migration-tools": "8.0.0-rc.1-dev.5",
43
- "@internal/publish-surface": "8.0.0-rc.1-dev.5",
44
- "@repo/tsconfig": "8.0.0-rc.1-dev.5",
45
- "@repo/tsdown": "8.0.0-rc.1-dev.5",
46
- "@internal/vite-plugin-contract-emit": "8.0.0-rc.1-dev.5",
37
+ "@internal/cli": "8.0.0-rc.1-dev.7",
38
+ "@internal/cli-telemetry": "8.0.0-rc.1-dev.7",
39
+ "@internal/config-loader": "8.0.0-rc.1-dev.7",
40
+ "@internal/emitter": "8.0.0-rc.1-dev.7",
41
+ "@internal/language-server": "8.0.0-rc.1-dev.7",
42
+ "@internal/migration-tools": "8.0.0-rc.1-dev.7",
43
+ "@internal/publish-surface": "8.0.0-rc.1-dev.7",
44
+ "@repo/tsconfig": "8.0.0-rc.1-dev.7",
45
+ "@repo/tsdown": "8.0.0-rc.1-dev.7",
46
+ "@internal/vite-plugin-contract-emit": "8.0.0-rc.1-dev.7",
47
47
  "tsdown": "0.22.14",
48
48
  "typescript": "5.9.3"
49
49
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-75qrAPqf-7l0C0H_b.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/client-75qrAPqf.mjs"],"sourcesContent":["import { F as CliStructuredError$1 } from \"./command-helpers-CAoXqAY9.mjs\";\nimport { t as assertFrameworkComponentsCompatible } from \"./framework-components-CjshQKHA.mjs\";\nimport { t as enrichContract } from \"./contract-enrichment-DrMvvY2A.mjs\";\nimport { t as buildContractSpaceAggregate } from \"./contract-space-aggregate-loader-CFH-336b.mjs\";\nimport { emit } from \"@internal/emitter\";\nimport { CliStructuredError } from \"@internal/errors/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { APP_SPACE_ID, createControlStack, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView } from \"@internal/framework-components/control\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, planMigration, requireHeadRef, resolveRecordedPath, verifyMigration } from \"@internal/migration-tools/aggregate\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\nimport { errorNoInvariantPath } from \"@internal/migration-tools/errors\";\nimport { findPathWithDecision } from \"@internal/migration-tools/migration-graph\";\n//#region src/control-api/operations/migration-helpers.ts\n/**\n* Strips operation objects to their public shape (id, label, operationClass).\n* Used at the API boundary to avoid leaking internal fields (precheck, execute, postcheck, etc.).\n*/\nfunction stripOperations(operations) {\n\treturn operations.map((op) => ({\n\t\tid: op.id,\n\t\tlabel: op.label,\n\t\toperationClass: op.operationClass\n\t}));\n}\n//#endregion\n//#region src/control-api/operations/run-migration.ts\n/**\n* Span id emitted via `onProgress` for the run phase. Stable\n* identifier consumed by the structured-output renderer and by tests.\n*/\nconst RUN_SPAN_ID = \"apply\";\n/**\n* Runner-driving tail shared by every run caller — `db init`,\n* `db update`, and `migrate`. Consumes already-resolved per-space\n* plans (the planner-vs-replay distinction is owned by the caller) and\n* dispatches them to the runner in canonical order.\n*\n* Marker advancement is part of the runner's per-space transaction\n* (the SQL family runner writes the marker as the last step of each\n* space's transaction), so this primitive does not advance markers\n* separately — by the time `execute` returns ok, every\n* space's marker has been advanced to its plan's destination.\n*\n* Span emission (`spanStart 'apply'` / `spanEnd 'apply'`) is owned here\n* so callers don't have to duplicate it; the `action` field on each\n* progress event is taken from the caller's `action` argument.\n*/\nasync function runMigration(inputs) {\n\tconst { aggregate, perSpacePlans, applyOrder, driver, familyInstance, migrations, frameworkComponents, policy, action, onProgress } = inputs;\n\tconst orderedResolutions = collectOrdered(applyOrder, perSpacePlans);\n\tconst runner = migrations.createRunner(familyInstance);\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanStart\",\n\t\tspanId: RUN_SPAN_ID,\n\t\tlabel: progressLabelForAction(action)\n\t});\n\tconst perSpaceOptions = orderedResolutions.map((r) => ({\n\t\tspace: r.spaceId,\n\t\tplan: r.entry.plan,\n\t\tdriver,\n\t\tdestinationContract: r.entry.destinationContract,\n\t\tpolicy,\n\t\tframeworkComponents,\n\t\tmigrationEdges: r.entry.migrationEdges,\n\t\tstrictVerification: false\n\t}));\n\tconst runnerResult = await runner.execute({\n\t\tdriver,\n\t\tperSpaceOptions\n\t});\n\tif (!runnerResult.ok) {\n\t\tonProgress?.({\n\t\t\taction,\n\t\t\tkind: \"spanEnd\",\n\t\t\tspanId: RUN_SPAN_ID,\n\t\t\toutcome: \"error\"\n\t\t});\n\t\treturn notOk({\n\t\t\tsummary: runnerResult.failure.summary,\n\t\t\t...ifDefined(\"why\", runnerResult.failure.why),\n\t\t\tmeta: {\n\t\t\t\t...runnerResult.failure.meta ?? {},\n\t\t\t\tfailingSpace: runnerResult.failure.failingSpace,\n\t\t\t\trunnerErrorCode: runnerResult.failure.code\n\t\t\t}\n\t\t});\n\t}\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanEnd\",\n\t\tspanId: RUN_SPAN_ID,\n\t\toutcome: \"ok\"\n\t});\n\treturn ok({\n\t\torderedResolutions,\n\t\ttotalOpsPlanned: runnerResult.value.perSpaceResults.reduce((sum, r) => sum + r.value.operationsPlanned, 0),\n\t\ttotalOpsExecuted: runnerResult.value.perSpaceResults.reduce((sum, r) => sum + r.value.operationsExecuted, 0),\n\t\tperSpace: buildPerSpaceBreakdown(orderedResolutions, aggregate.app.spaceId, { includeMarkers: true })\n\t});\n}\n/**\n* Project the planner's per-space resolutions into the\n* `PerSpaceExecutionEntry[]` shape the CLI surfaces.\n*\n* `includeMarkers` is `true` for apply-mode (each space's marker is\n* the `destination.storageHash` of its plan, which the runner\n* advances as the last step of each space's transaction) and `false`\n* for plan-mode (no marker has been written yet).\n*\n* Exported alongside {@link runMigration} so plan-mode callers can\n* assemble the same per-space block without going through the runner.\n*/\nfunction buildPerSpaceBreakdown(orderedResolutions, appSpaceId, options) {\n\treturn orderedResolutions.map((r) => {\n\t\tconst operations = r.entry.displayOps.map((op) => ({\n\t\t\tid: op.id,\n\t\t\tlabel: op.label,\n\t\t\toperationClass: op.operationClass\n\t\t}));\n\t\tconst base = {\n\t\t\tspaceId: r.spaceId,\n\t\t\tkind: r.spaceId === appSpaceId ? \"app\" : \"extension\",\n\t\t\toperations\n\t\t};\n\t\tif (!options.includeMarkers) return base;\n\t\treturn {\n\t\t\t...base,\n\t\t\tmarker: { storageHash: r.entry.plan.destination.storageHash }\n\t\t};\n\t});\n}\n/**\n* Materialise the `applyOrder` ordering into resolved per-space\n* entries. Throws if the planner output is missing a contract space listed\n* in `applyOrder` — a wiring bug that should never reach runtime.\n*\n* Exported so callers building their own success envelopes after a\n* plan-mode dispatch can replay the same ordering.\n*/\nfunction collectOrdered(applyOrder, perSpace) {\n\treturn applyOrder.map((spaceId) => {\n\t\tconst entry = perSpace.get(spaceId);\n\t\tif (!entry) throw new InternalError(`planner output missing per-space plan for \"${spaceId}\"`);\n\t\treturn {\n\t\t\tspaceId,\n\t\t\tentry\n\t\t};\n\t});\n}\n/**\n* Action-appropriate label for the `spanStart` event the run\n* primitive emits. `runMigration` is shared by `db init`, `db update`,\n* and `migrate`; the span label tracks the user-visible action\n* so structured-progress output reads naturally for each surface.\n*/\nfunction progressLabelForAction(action) {\n\tswitch (action) {\n\t\tcase \"dbInit\": return \"Initialising database across spaces\";\n\t\tcase \"dbUpdate\": return \"Updating database across spaces\";\n\t\tcase \"migrate\": return \"Running migration plan across spaces\";\n\t}\n}\n//#endregion\n//#region src/control-api/operations/db-run.ts\n/**\n* Span IDs emitted via `onProgress` during the run flow.\n* Stable identifiers consumed by the structured-output renderer and by\n* tests asserting on span ids. The `apply` span itself is owned by\n* the {@link runMigration} primitive — only the introspect / plan\n* spans are emitted directly here.\n*/\nconst SPAN_IDS$1 = {\n\tintrospect: \"introspect\",\n\tplan: \"plan\"\n};\n/**\n* Loader → planner → runner pipeline shared by `db init` and `db update`.\n*\n* The pipeline:\n*\n* 1. **Load**: build a {@link ContractSpaceAggregate} from the descriptor\n* set + on-disk on-disk artefacts. Any layout / drift / disjointness /\n* integrity violation short-circuits with a structured error.\n* 2. **Read DB state**: marker rows (`familyInstance.readAllMarkers`)\n* + introspected schema (`familyInstance.introspect`).\n* 3. **Plan**: {@link planMigration} chooses `resolveRecordedPath` vs\n* `planFromDiff` per space according to `callerPolicy.ignoreGraphFor`.\n* The app space is forced through `planFromDiff` (today's daily-driver\n* behaviour); every extension space walks its on-disk graph via\n* `resolveRecordedPath`.\n* 4. **Apply** (when `mode === 'apply'`): every per-space `MigrationPlan`\n* feeds into the runner's `execute` — one outer\n* transaction across every space; failure on any space rolls back\n* every space's writes.\n*/\nasync function executeRun(options) {\n\tconst { driver, adapter, familyInstance, contract, mode, migrations, frameworkComponents, migrationsDir, extensions, targetId, policy, action, onProgress } = options;\n\tconst loaded = await buildContractSpaceAggregate({\n\t\ttargetId,\n\t\tmigrationsDir,\n\t\tappContract: contract,\n\t\textensions,\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!loaded.ok) throw loaded.failure;\n\tconst aggregate = loaded.value;\n\tconst markerRows = await familyInstance.readAllMarkers({ driver });\n\tif (mode === \"apply\") {\n\t\tconst orphanMarkerError = detectOrphanMarkers(aggregate, markerRows);\n\t\tif (orphanMarkerError !== null) throw orphanMarkerError;\n\t}\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanStart\",\n\t\tspanId: SPAN_IDS$1.introspect,\n\t\tlabel: \"Introspecting database schema\"\n\t});\n\tconst schemaIR = await familyInstance.introspect({\n\t\tdriver,\n\t\tcontract: collectAggregateNamespaces(aggregate)\n\t});\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanEnd\",\n\t\tspanId: SPAN_IDS$1.introspect,\n\t\toutcome: \"ok\"\n\t});\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanStart\",\n\t\tspanId: SPAN_IDS$1.plan,\n\t\tlabel: \"Planning migration\"\n\t});\n\tconst planResult = await planMigration({\n\t\taggregate,\n\t\tcurrentDBState: {\n\t\t\tmarkersBySpaceId: markerRows,\n\t\t\tschemaIntrospection: schemaIR\n\t\t},\n\t\tadapter,\n\t\tmigrations,\n\t\tframeworkComponents,\n\t\tcallerPolicy: { ignoreGraphFor: /* @__PURE__ */ new Set([aggregate.app.spaceId]) },\n\t\toperationPolicy: policy\n\t});\n\tif (!planResult.ok) {\n\t\tonProgress?.({\n\t\t\taction,\n\t\t\tkind: \"spanEnd\",\n\t\t\tspanId: SPAN_IDS$1.plan,\n\t\t\toutcome: \"error\"\n\t\t});\n\t\treturn mapPlannerError(planResult.failure);\n\t}\n\tonProgress?.({\n\t\taction,\n\t\tkind: \"spanEnd\",\n\t\tspanId: SPAN_IDS$1.plan,\n\t\toutcome: \"ok\"\n\t});\n\tconst orderedResolutions = collectOrdered(planResult.value.applyOrder, planResult.value.perSpace);\n\tconst plannerWarnings = aggregatePlannerWarnings(orderedResolutions);\n\tconst appResolution = orderedResolutions.find((r) => r.spaceId === aggregate.app.spaceId);\n\tif (!appResolution) throw new InternalError(\"Aggregate planner returned no plan for the app space — the planner is supposed to always emit one.\");\n\tconst appPlan = appResolution.entry.plan;\n\tif (mode === \"plan\") {\n\t\tconst aggregateOps = orderedResolutions.flatMap((r) => r.entry.displayOps);\n\t\tconst preview = hasOperationPreview(familyInstance) ? familyInstance.toOperationPreview(aggregateOps) : void 0;\n\t\tconst perSpace = buildPerSpaceBreakdown(orderedResolutions, aggregate.app.spaceId, { includeMarkers: false });\n\t\tconst summary = `Planned ${aggregateOps.length} operation(s) across ${orderedResolutions.length} space(s)`;\n\t\treturn wrapPlanResult({\n\t\t\toperations: aggregateOps,\n\t\t\tdestination: appPlan.destination,\n\t\t\tpreview,\n\t\t\tperSpace,\n\t\t\tsummary,\n\t\t\t...ifDefined(\"warnings\", plannerWarnings)\n\t\t});\n\t}\n\tconst applied = await runMigration({\n\t\taggregate,\n\t\tperSpacePlans: planResult.value.perSpace,\n\t\tapplyOrder: planResult.value.applyOrder,\n\t\tdriver,\n\t\tfamilyInstance,\n\t\tmigrations,\n\t\tframeworkComponents,\n\t\tpolicy,\n\t\taction,\n\t\t...ifDefined(\"onProgress\", onProgress)\n\t});\n\tif (!applied.ok) return buildRunnerFailure({\n\t\tsummary: applied.failure.summary,\n\t\t...ifDefined(\"why\", applied.failure.why),\n\t\tmeta: applied.failure.meta,\n\t\t...ifDefined(\"warnings\", plannerWarnings)\n\t});\n\tconst aggregateOps = applied.value.orderedResolutions.flatMap((r) => r.entry.displayOps);\n\tconst summary = action === \"dbInit\" ? `Applied ${applied.value.totalOpsExecuted} operation(s) across ${applied.value.orderedResolutions.length} space(s), database signed` : applied.value.totalOpsExecuted === 0 ? `Database already matches contract across ${applied.value.orderedResolutions.length} space(s), signature updated` : `Applied ${applied.value.totalOpsExecuted} operation(s) across ${applied.value.orderedResolutions.length} space(s), signature updated`;\n\treturn wrapApplyResult({\n\t\toperations: aggregateOps,\n\t\tdestination: appPlan.destination,\n\t\toperationsPlanned: applied.value.totalOpsPlanned,\n\t\toperationsExecuted: applied.value.totalOpsExecuted,\n\t\tperSpace: applied.value.perSpace,\n\t\tsummary,\n\t\t...ifDefined(\"warnings\", plannerWarnings)\n\t});\n}\nfunction aggregatePlannerWarnings(orderedResolutions) {\n\tconst warnings = orderedResolutions.flatMap((r) => r.entry.warnings ?? []);\n\treturn warnings.length > 0 ? warnings : void 0;\n}\n/**\n* Compare the live `_prisma_marker` rows against the aggregate's\n* declared contract spaces. Any marker row whose `space` is not a space of\n* the aggregate is an \"orphan\" — typically a marker left behind by\n* an extension that was removed from `extensions` without first\n* cleaning up its on-disk migrations / database tables.\n*\n* Returns a {@link CliStructuredError} envelope (code\n* `MIGRATION.CONTRACT_SPACE_VIOLATION`, `kind: 'orphanMarker'`) for the\n* first orphan it finds, or `null`\n* when every marker row maps to a declared contract space. Mirrors the M2\n* `runContractSpaceVerifierMarkerCheck` envelope so downstream\n* tooling (integration tests, JSON consumers) keeps asserting on the\n* same shape.\n*/\nfunction detectOrphanMarkers(aggregate, markerRows) {\n\tconst aggregateSpaceIds = /* @__PURE__ */ new Set([aggregate.app.spaceId, ...aggregate.extensions.map((m) => m.spaceId)]);\n\tconst orphans = [];\n\tfor (const [spaceId, row] of markerRows) if (row !== null && row !== void 0 && !aggregateSpaceIds.has(spaceId)) orphans.push(spaceId);\n\tif (orphans.length === 0) return null;\n\torphans.sort((a, b) => a.localeCompare(b));\n\treturn new CliStructuredError$1(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", orphans.length === 1 ? `Orphan contract-space marker detected for \"${orphans[0]}\"` : `Orphan contract-space markers detected for ${orphans.length} spaces`, {\n\t\twhy: `The database has \\`_prisma_marker\\` rows for spaces (${orphans.map((s) => `\"${s}\"`).join(\", \")}) that are not declared in the project's \\`extensions\\`. The aggregate pipeline refuses to advance markers it cannot account for.`,\n\t\tfix: \"Either re-declare the missing extension(s) in `extensions` (so the aggregate owns them again), or remove the orphan marker row(s) from `_prisma_marker` once you have confirmed the corresponding tables can be safely retired.\",\n\t\tdocsUrl: \"https://pris.ly/contract-spaces\",\n\t\tmeta: { violations: orphans.map((spaceId) => ({\n\t\t\tkind: \"orphanMarker\",\n\t\t\tspaceId\n\t\t})) }\n\t});\n}\nfunction mapPlannerError(error) {\n\tif (error.kind === \"planFromDiffFailed\") return blindCast(notOk({\n\t\tcode: \"PLANNING_FAILED\",\n\t\tsummary: \"Migration planning failed due to conflicts\",\n\t\tconflicts: error.conflicts,\n\t\twhy: void 0,\n\t\tmeta: void 0\n\t}));\n\tif (error.kind === \"extensionPathUnreachable\") return buildRunnerFailure({\n\t\tsummary: `Cannot resolve apply path for extension space \"${error.spaceId}\"`,\n\t\twhy: `No path in the on-disk migration graph for extension space \"${error.spaceId}\" reaches the on-disk head ref hash \"${error.target}\".`,\n\t\tmeta: {\n\t\t\tspaceId: error.spaceId,\n\t\t\ttarget: error.target\n\t\t}\n\t});\n\tif (error.kind === \"extensionPathUnsatisfiable\") return buildRunnerFailure({\n\t\tsummary: `Cannot resolve apply path for extension space \"${error.spaceId}\"`,\n\t\twhy: `On-disk migration graph for extension space \"${error.spaceId}\" reaches the on-disk head ref but does not cover required invariants: ${error.missingInvariants.join(\", \")}.`,\n\t\tmeta: {\n\t\t\tspaceId: error.spaceId,\n\t\t\tmissingInvariants: error.missingInvariants\n\t\t}\n\t});\n\treturn buildRunnerFailure({\n\t\tsummary: `Aggregate planner policy conflict for space \"${error.spaceId}\"`,\n\t\twhy: error.detail,\n\t\tmeta: { spaceId: error.spaceId }\n\t});\n}\nfunction wrapPlanResult(args) {\n\treturn ok({\n\t\tmode: \"plan\",\n\t\tplan: {\n\t\t\toperations: stripOperations(args.operations),\n\t\t\t...ifDefined(\"preview\", args.preview)\n\t\t},\n\t\tdestination: {\n\t\t\tstorageHash: args.destination.storageHash,\n\t\t\t...ifDefined(\"profileHash\", args.destination.profileHash)\n\t\t},\n\t\tperSpace: args.perSpace,\n\t\tsummary: args.summary,\n\t\t...ifDefined(\"warnings\", args.warnings)\n\t});\n}\nfunction wrapApplyResult(args) {\n\treturn ok({\n\t\tmode: \"apply\",\n\t\tplan: { operations: stripOperations(args.operations) },\n\t\tdestination: {\n\t\t\tstorageHash: args.destination.storageHash,\n\t\t\t...ifDefined(\"profileHash\", args.destination.profileHash)\n\t\t},\n\t\texecution: {\n\t\t\toperationsPlanned: args.operationsPlanned,\n\t\t\toperationsExecuted: args.operationsExecuted\n\t\t},\n\t\tmarker: args.destination.profileHash ? {\n\t\t\tstorageHash: args.destination.storageHash,\n\t\t\tprofileHash: args.destination.profileHash\n\t\t} : { storageHash: args.destination.storageHash },\n\t\tperSpace: args.perSpace,\n\t\tsummary: args.summary,\n\t\t...ifDefined(\"warnings\", args.warnings)\n\t});\n}\nfunction buildRunnerFailure(args) {\n\treturn blindCast(notOk({\n\t\tcode: \"RUNNER_FAILED\",\n\t\tsummary: args.summary,\n\t\twhy: args.why,\n\t\tmeta: args.meta,\n\t\tconflicts: void 0,\n\t\t...ifDefined(\"warnings\", args.warnings)\n\t}));\n}\n//#endregion\n//#region src/control-api/operations/db-init.ts\n/**\n* Execute `db init` against the configured contract.\n*\n* Routes through the loader → planner → runner pipeline (sub-spec\n* \"Commit-by-commit § Commit 4\"). Always additive-only; destructive\n* changes belong to `db update`.\n*/\nasync function executeDbInit(options) {\n\treturn await executeRun({\n\t\tdriver: options.driver,\n\t\tadapter: options.adapter,\n\t\tfamilyInstance: options.familyInstance,\n\t\tcontract: options.contract,\n\t\tmode: options.mode,\n\t\tmigrations: options.migrations,\n\t\tframeworkComponents: options.frameworkComponents,\n\t\tmigrationsDir: options.migrationsDir,\n\t\ttargetId: options.targetId,\n\t\textensions: options.extensions ?? [],\n\t\tpolicy: { allowedOperationClasses: [\"additive\"] },\n\t\taction: \"dbInit\",\n\t\t...ifDefined(\"onProgress\", options.onProgress)\n\t});\n}\n//#endregion\n//#region src/control-api/operations/db-update.ts\nconst DB_UPDATE_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\"\n] };\n/**\n* Execute `db update` against the configured contract.\n*\n* Routes through the loader → planner → runner pipeline. Destructive\n* operations require either `acceptDataLoss: true` or a prior\n* `mode: 'plan'` invocation that surfaces the destructive ops; the\n* confirmation gate is implemented here so the lower-level applier\n* remains policy-agnostic.\n*/\nasync function executeDbUpdate(options) {\n\tconst sharedInputs = {\n\t\tdriver: options.driver,\n\t\tadapter: options.adapter,\n\t\tfamilyInstance: options.familyInstance,\n\t\tcontract: options.contract,\n\t\tmigrations: options.migrations,\n\t\tframeworkComponents: options.frameworkComponents,\n\t\tmigrationsDir: options.migrationsDir,\n\t\ttargetId: options.targetId,\n\t\textensions: options.extensions ?? [],\n\t\tpolicy: DB_UPDATE_POLICY,\n\t\taction: \"dbUpdate\",\n\t\t...ifDefined(\"onProgress\", options.onProgress)\n\t};\n\tif (options.mode === \"apply\" && !options.acceptDataLoss) {\n\t\tconst gate = await guardDestructiveChanges(sharedInputs);\n\t\tif (gate !== null) return gate;\n\t}\n\treturn await executeRun({\n\t\t...sharedInputs,\n\t\tmode: options.mode\n\t});\n}\n/**\n* Pre-plan once when running `db update apply` without `acceptDataLoss`.\n* Surfaces destructive operations across every space; if any are\n* planned, returns a `DESTRUCTIVE_CHANGES` failure that the CLI shows\n* as a confirmation prompt. Returns `null` when the apply is safe to\n* run.\n*/\nasync function guardDestructiveChanges(sharedInputs) {\n\tconst planResult = await executeRun({\n\t\t...sharedInputs,\n\t\tmode: \"plan\"\n\t});\n\tif (!planResult.ok) return planResult;\n\tconst destructiveOps = planResult.value.plan.operations.filter((op) => op.operationClass === \"destructive\").map((op) => ({\n\t\tid: op.id,\n\t\tlabel: op.label\n\t}));\n\tif (destructiveOps.length === 0) return null;\n\treturn notOk({\n\t\tcode: \"DESTRUCTIVE_CHANGES\",\n\t\tsummary: `Planned ${destructiveOps.length} destructive operation(s) that require confirmation`,\n\t\twhy: \"Destructive operations require confirmation — re-run with -y to accept\",\n\t\tconflicts: void 0,\n\t\tmeta: { destructiveOperations: destructiveOps }\n\t});\n}\n//#endregion\n//#region src/control-api/operations/db-verify.ts\n/**\n* Span IDs emitted via `onProgress` during the aggregate verify flow.\n* Mirrors the span identifiers used by the legacy precheck / marker-check\n* helpers so structured-output renderers and progress tests keep working.\n*/\nconst SPAN_IDS = {\n\tintrospect: \"introspect\",\n\tverify: \"verify\"\n};\n/**\n* Loader → verifier pipeline shared by `db verify` modes (`full`,\n* `marker-only`, `schema-only`).\n*\n* 1. **Load**: build a {@link import('@internal/migration-tools/aggregate').ContractSpaceAggregate}\n* from descriptors + on-disk on-disk artefacts. Layout / drift /\n* integrity / disjointness violations short-circuit with a\n* structured CLI error.\n* 2. **Read DB state**: marker rows + (when `skipSchema` is `false`)\n* schema introspection.\n* 3. **Verify**: {@link verifyMigration} returns per-space `markerCheck` +\n* per-space `schemaCheck` (each contract space verified against the full schema,\n* then scoped to its own contract space). Marker mismatches map to\n* `CliStructuredError` (code `5002`) so callers (CLI command) can render\n* and exit. Verify results are returned to the caller verbatim.\n*/\nasync function executeDbVerify(options) {\n\tconst { driver, familyInstance, onProgress, skipSchema, skipMarker } = options;\n\tconst loaded = await buildContractSpaceAggregate(buildLoadInputs(options));\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst aggregate = loaded.value;\n\tconst markersBySpaceId = await familyInstance.readAllMarkers({ driver });\n\tconst schemaIntrospection = skipSchema ? null : await runIntrospection({\n\t\tdriver,\n\t\tfamilyInstance,\n\t\tonProgress,\n\t\tcontract: collectAggregateNamespaces(aggregate)\n\t});\n\tconst classifySubjectGranularity = hasSchemaSubjectClassifier(familyInstance) ? (issue) => familyInstance.classifySubjectGranularity(issue) : void 0;\n\tconst classifyEntityKind = hasSchemaSubjectClassifier(familyInstance) ? (issue) => familyInstance.classifyEntityKind(issue) : void 0;\n\temitVerifySpan(onProgress, \"spanStart\");\n\treturn finaliseVerifyResult({\n\t\tverifyResult: verifyMigration({\n\t\t\taggregate,\n\t\t\tmarkersBySpaceId,\n\t\t\tschemaIntrospection,\n\t\t\tmode: options.mode,\n\t\t\tverifySchemaForSpace: createPerSpaceVerifier(options),\n\t\t\t...ifDefined(\"classifySubjectGranularity\", classifySubjectGranularity),\n\t\t\t...ifDefined(\"classifyEntityKind\", classifyEntityKind)\n\t\t}),\n\t\taggregate,\n\t\tskipMarker,\n\t\tonProgress\n\t});\n}\nfunction buildLoadInputs(options) {\n\treturn {\n\t\ttargetId: options.targetId,\n\t\tmigrationsDir: options.migrationsDir,\n\t\tappContract: options.contract,\n\t\textensions: options.extensions,\n\t\tdeserializeContract: (json) => options.familyInstance.deserializeContract(json)\n\t};\n}\nasync function runIntrospection(args) {\n\tconst { driver, familyInstance, onProgress, contract } = args;\n\tonProgress?.({\n\t\taction: \"dbVerify\",\n\t\tkind: \"spanStart\",\n\t\tspanId: SPAN_IDS.introspect,\n\t\tlabel: \"Introspecting database schema\"\n\t});\n\ttry {\n\t\tconst result = await familyInstance.introspect({\n\t\t\tdriver,\n\t\t\tcontract\n\t\t});\n\t\tonProgress?.({\n\t\t\taction: \"dbVerify\",\n\t\t\tkind: \"spanEnd\",\n\t\t\tspanId: SPAN_IDS.introspect,\n\t\t\toutcome: \"ok\"\n\t\t});\n\t\treturn result;\n\t} catch (error) {\n\t\tonProgress?.({\n\t\t\taction: \"dbVerify\",\n\t\t\tkind: \"spanEnd\",\n\t\t\tspanId: SPAN_IDS.introspect,\n\t\t\toutcome: \"error\"\n\t\t});\n\t\tthrow error;\n\t}\n}\n/**\n* Build the per-space schema callback handed to the aggregate verifier.\n* When `skipSchema` is true the callback short-circuits with a synthetic\n* `ok` result so the verifier still runs the (cheap) schemaCheck loop\n* without invoking the family's verification path.\n*/\nfunction createPerSpaceVerifier(options) {\n\tconst { skipSchema, familyInstance, frameworkComponents } = options;\n\treturn (schema, space, verifyMode) => {\n\t\tif (skipSchema) return buildSkippedSchemaResult(space);\n\t\treturn familyInstance.verifySchema({\n\t\t\tcontract: space.contract(),\n\t\t\tschema,\n\t\t\tstrict: verifyMode === \"strict\",\n\t\t\tframeworkComponents\n\t\t});\n\t};\n}\nfunction emitVerifySpan(onProgress, kind) {\n\tif (kind === \"spanStart\") {\n\t\tonProgress?.({\n\t\t\taction: \"dbVerify\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: SPAN_IDS.verify,\n\t\t\tlabel: \"Verifying contract spaces\"\n\t\t});\n\t\treturn;\n\t}\n\tonProgress?.({\n\t\taction: \"dbVerify\",\n\t\tkind: \"spanEnd\",\n\t\tspanId: SPAN_IDS.verify,\n\t\toutcome: kind === \"spanEndOk\" ? \"ok\" : \"error\"\n\t});\n}\n/**\n* Map an {@link VerifierOutput} to the operation's\n* {@link ExecuteDbVerifyResult}, applying the `skipMarker` policy used\n* by the CLI's `--schema-only` mode.\n*/\nfunction finaliseVerifyResult(args) {\n\tconst { verifyResult, aggregate, skipMarker, onProgress } = args;\n\tif (!verifyResult.ok) {\n\t\temitVerifySpan(onProgress, \"spanEndError\");\n\t\treturn notOk(new CliStructuredError$1(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", \"Aggregate verifier introspection failed\", {\n\t\t\twhy: verifyResult.failure.detail,\n\t\t\tfix: \"Check database connectivity and the introspection tooling.\",\n\t\t\tdocsUrl: \"https://pris.ly/contract-spaces\"\n\t\t}));\n\t}\n\tconst markerError = skipMarker ? null : mapMarkerCheckFailures(aggregate.app.spaceId, verifyResult.value.markerCheck);\n\tif (markerError !== null) {\n\t\temitVerifySpan(onProgress, \"spanEndError\");\n\t\treturn notOk(markerError);\n\t}\n\temitVerifySpan(onProgress, \"spanEndOk\");\n\treturn ok({\n\t\tschemaResults: verifyResult.value.schemaCheck.perSpace,\n\t\tunclaimed: verifyResult.value.schemaCheck.unclaimed,\n\t\tspaceOrder: [aggregate.app.spaceId, ...aggregate.extensions.map((e) => e.spaceId)],\n\t\tappSpaceId: aggregate.app.spaceId\n\t});\n}\nfunction buildSkippedSchemaResult(space) {\n\tconst contract = space.contract();\n\tconst headRef = requireHeadRef(space);\n\tconst profileHash = castAs(contract).profileHash;\n\treturn {\n\t\tok: true,\n\t\tsummary: \"Schema verification skipped\",\n\t\tcontract: {\n\t\t\tstorageHash: headRef.hash,\n\t\t\t...profileHash ? { profileHash } : {}\n\t\t},\n\t\ttarget: { expected: contract.target },\n\t\tschema: { issues: [] },\n\t\ttimings: { total: 0 }\n\t};\n}\n/**\n* Translate per-space marker check failures and orphan markers into a\n* single CLI structured error envelope. Preserves the legacy code\n* `MIGRATION.CONTRACT_SPACE_VIOLATION` (was emitted by\n* `runContractSpaceVerifierMarkerCheck`).\n*/\nfunction mapMarkerCheckFailures(appSpaceId, section) {\n\tconst violations = [];\n\tfor (const [spaceId, result] of section.perSpace) {\n\t\tif (result.kind === \"ok\" || result.kind === \"absent\") continue;\n\t\tif (result.kind === \"hashMismatch\") {\n\t\t\tviolations.push({\n\t\t\t\tkind: \"hashMismatch\",\n\t\t\t\tspaceId,\n\t\t\t\tremediation: spaceId === appSpaceId ? \"Run `prisma-next db update` to advance the marker, or roll the database back to the recorded hash.\" : `Apply on-disk migrations under \\`migrations/${spaceId}/\\` to advance the marker, or remove the conflicting marker row.`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (result.kind === \"missingInvariants\") violations.push({\n\t\t\tkind: \"invariantsMismatch\",\n\t\t\tspaceId,\n\t\t\tremediation: `Re-apply the migrations under \\`migrations/${spaceId}/\\` so the marker carries invariants: ${result.missing.join(\", \")}.`\n\t\t});\n\t}\n\tfor (const orphan of section.orphanMarkers) violations.push({\n\t\tkind: \"orphanMarker\",\n\t\tspaceId: orphan.spaceId,\n\t\tremediation: `Add the corresponding extension to \\`extensions\\` in \\`prisma-next.config.ts\\`, or delete the orphan marker row for \"${orphan.spaceId}\".`\n\t});\n\tif (violations.length === 0) return null;\n\tconst lines = violations.map((v) => `- [${v.kind}] ${v.spaceId}: ${v.remediation}`);\n\treturn new CliStructuredError$1(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", violations.length === 1 ? \"Contract-space verifier found a violation\" : `Contract-space verifier found violations (${violations.length})`, {\n\t\twhy: `The on-disk \\`migrations/\\` directory, the \\`extensions\\` declaration, and the live database marker rows are not in agreement.\\n${lines.join(\"\\n\")}`,\n\t\tfix: violations[0]?.remediation ?? \"Review and reconcile the violations listed above.\",\n\t\tdocsUrl: \"https://pris.ly/contract-spaces\",\n\t\tmeta: { violations }\n\t});\n}\n//#endregion\n//#region src/control-api/operations/migrate.ts\n/**\n* Apply pending migrations across every contract space (app +\n* extensions). Replay-only: graph-walk against the on-disk graph for\n* every contract space; no synth, no introspection.\n*\n* Pipeline:\n*\n* 1. Load aggregate from disk (loader hydrates extension graphs;\n* caller provides app-space packages).\n* 2. Read live marker rows per space (`familyInstance.readAllMarkers`).\n* 3. Per space: `resolveRecordedPath` plots the path from the live\n* marker to `space.headRef.hash` (or `refHash` for the app\n* space when provided). An empty-graph space whose elements are ALL\n* externally managed resolves declaratively (marker to head, zero\n* ops), mirroring the db-init aggregate planner: such a space ships\n* no DDL and has nothing to author. Every other empty-graph space\n* fails loudly — \"never planned\" is a user-error condition for\n* replay.\n* 4. Hand off to {@link runMigration} (the runner-driving tail\n* shared with `db init` / `db update`). Marker advancement is\n* inside the per-space transaction.\n*\n* Encodes the replay-only contract: the app contract space must have an\n* authored migration graph on disk before this operation can advance it.\n*/\nasync function executeMigrate(options) {\n\tconst { driver, familyInstance, contract, migrations, frameworkComponents, migrationsDir, extensions, targetId, refHash, refInvariants, refName, onProgress } = options;\n\tconst loaded = await buildContractSpaceAggregate({\n\t\ttargetId,\n\t\tmigrationsDir,\n\t\tappContract: contract,\n\t\textensions,\n\t\tdeserializeContract: (json) => familyInstance.deserializeContract(json)\n\t});\n\tif (!loaded.ok) throw loaded.failure;\n\tconst aggregate = loaded.value;\n\tconst markerRows = await familyInstance.readAllMarkers({ driver });\n\tconst allSpaces = [aggregate.app, ...aggregate.extensions];\n\tconst perSpacePlans = /* @__PURE__ */ new Map();\n\tconst atHeadResolutions = /* @__PURE__ */ new Map();\n\tfor (const space of allSpaces) {\n\t\tconst isAppSpace = space.spaceId === aggregate.app.spaceId;\n\t\tconst headRef = requireHeadRef(space);\n\t\tconst spaceTargetHash = isAppSpace && refHash !== void 0 ? refHash : headRef.hash;\n\t\tconst outcome = planSpacePath({\n\t\t\tspace,\n\t\t\taggregate,\n\t\t\ttargetHash: spaceTargetHash,\n\t\t\trefInvariants: isAppSpace && refHash !== void 0 ? refInvariants : void 0,\n\t\t\tliveMarker: markerRows.get(space.spaceId) ?? null,\n\t\t\t...isAppSpace ? { refName } : {}\n\t\t});\n\t\tif (outcome.kind === \"at-head\") {\n\t\t\tatHeadResolutions.set(space.spaceId, outcome.plan);\n\t\t\tcontinue;\n\t\t}\n\t\tif (outcome.kind === \"never-planned\") return notOk(buildNeverPlannedFailure(outcome.spaceId, outcome.targetHash));\n\t\tif (outcome.kind === \"unreachable\") return notOk(buildPathNotFoundFailure(outcome.spaceId, outcome.liveMarker, outcome.targetHash));\n\t\tif (outcome.kind === \"unsatisfiable\") {\n\t\t\tconst structural = findPathWithDecision(outcome.targetSpace.graph(), outcome.liveHash, spaceTargetHash, { required: /* @__PURE__ */ new Set() });\n\t\t\tconst structuralPath = structural.kind === \"ok\" ? structural.decision.selectedPath.map((edge) => ({\n\t\t\t\tdirName: edge.dirName,\n\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\tfrom: edge.from,\n\t\t\t\tto: edge.to,\n\t\t\t\tinvariants: edge.invariants\n\t\t\t})) : [];\n\t\t\tthrow errorNoInvariantPath({\n\t\t\t\t...outcome.refName !== void 0 ? { refName: outcome.refName } : {},\n\t\t\t\trequired: outcome.targetInvariants,\n\t\t\t\tmissing: outcome.missing,\n\t\t\t\tstructuralPath\n\t\t\t});\n\t\t}\n\t\tperSpacePlans.set(space.spaceId, outcome.plan);\n\t}\n\tconst canonicalOrder = [...aggregate.extensions.map((m) => m.spaceId), aggregate.app.spaceId];\n\tconst applyOrder = canonicalOrder.filter((spaceId) => perSpacePlans.has(spaceId));\n\tif (!applyOrder.some((spaceId) => {\n\t\tconst entry = perSpacePlans.get(spaceId);\n\t\treturn entry !== void 0 && planRequiresExecution(entry);\n\t})) {\n\t\tconst ordered = canonicalOrder.filter((spaceId) => perSpacePlans.has(spaceId) || atHeadResolutions.has(spaceId)).map((spaceId) => {\n\t\t\tconst entry = perSpacePlans.get(spaceId) ?? atHeadResolutions.get(spaceId);\n\t\t\tif (entry === void 0) throw new InternalError(`Unreachable: missing per-space plan for \"${spaceId}\"`);\n\t\t\treturn {\n\t\t\t\tspaceId,\n\t\t\t\tentry\n\t\t\t};\n\t\t});\n\t\tconst perSpace = buildPerSpaceBreakdown(ordered, aggregate.app.spaceId, { includeMarkers: true });\n\t\tconst totalSpaces = ordered.length;\n\t\treturn ok(buildSuccess({\n\t\t\taggregate,\n\t\t\torderedResolutions: ordered,\n\t\t\tperSpace,\n\t\t\ttotalOpsExecuted: 0,\n\t\t\tsummary: totalSpaces === 0 ? \"Already up to date — no contract spaces are loaded\" : totalSpaces === 1 ? \"Already up to date\" : `Already up to date across ${totalSpaces} space(s)`\n\t\t}));\n\t}\n\tconst applied = await runMigration({\n\t\taggregate,\n\t\tperSpacePlans,\n\t\tapplyOrder,\n\t\tdriver,\n\t\tfamilyInstance,\n\t\tmigrations,\n\t\tframeworkComponents,\n\t\tpolicy: { allowedOperationClasses: [\n\t\t\t\"additive\",\n\t\t\t\"widening\",\n\t\t\t\"destructive\",\n\t\t\t\"data\"\n\t\t] },\n\t\taction: \"migrate\",\n\t\t...ifDefined(\"onProgress\", onProgress)\n\t});\n\tif (!applied.ok) return notOk({\n\t\tcode: \"RUNNER_FAILED\",\n\t\tsummary: applied.failure.summary,\n\t\twhy: applied.failure.why,\n\t\tmeta: applied.failure.meta\n\t});\n\tconst orderedAll = canonicalOrder.filter((spaceId) => perSpacePlans.has(spaceId) || atHeadResolutions.has(spaceId)).map((spaceId) => {\n\t\tif (perSpacePlans.has(spaceId)) {\n\t\t\tconst fromRunner = applied.value.orderedResolutions.find((r) => r.spaceId === spaceId);\n\t\t\tif (fromRunner !== void 0) return fromRunner;\n\t\t}\n\t\tconst entry = atHeadResolutions.get(spaceId);\n\t\tif (entry === void 0) throw new InternalError(`Unreachable: missing per-space plan for \"${spaceId}\"`);\n\t\treturn {\n\t\t\tspaceId,\n\t\t\tentry\n\t\t};\n\t});\n\tconst perSpaceAll = buildPerSpaceBreakdown(orderedAll, aggregate.app.spaceId, { includeMarkers: true });\n\tconst summary = `Applied ${applied.value.orderedResolutions.reduce((sum, r) => sum + r.entry.migrationEdges.length, 0)} migration(s) (${applied.value.totalOpsExecuted} operation(s)) across ${orderedAll.length} contract space(s)`;\n\treturn ok(buildSuccess({\n\t\taggregate,\n\t\torderedResolutions: orderedAll,\n\t\tperSpace: perSpaceAll,\n\t\ttotalOpsExecuted: applied.value.totalOpsExecuted,\n\t\tsummary\n\t}));\n}\n/**\n* Compute the graph-walk path for one contract space.\n*\n* Encapsulates the invariant-correct input assembly that both\n* `executeMigrate` and `executeMigrateShowCommand` must use:\n* - `currentMarker` carries the full live marker including `invariants`\n* (not a stripped `{ storageHash, invariants: [] }` shell).\n* - `targetInvariants` uses the caller-supplied `refInvariants` when a\n* `--to` ref was resolved (not always the file head ref's invariants).\n*\n* Both callers map the returned `SpacePathOutcome` to their own error\n* representation; the path-compute logic is shared and identical.\n*\n* @internal Exported for `executeMigrateShowCommand`.\n*/\nfunction planSpacePath({ space, aggregate, targetHash, refInvariants, liveMarker, refName }) {\n\tconst isAppSpace = space.spaceId === aggregate.app.spaceId;\n\tconst headRef = requireHeadRef(space);\n\tif (space.graph().nodes.size === 0) {\n\t\tconst liveHash = liveMarker?.storageHash;\n\t\tif (targetHash === liveHash || liveHash === void 0 && targetHash === EMPTY_CONTRACT_HASH) return {\n\t\t\tkind: \"at-head\",\n\t\t\tplan: buildAtHeadResolution({\n\t\t\t\taggregateTargetId: aggregate.targetId,\n\t\t\t\tspace,\n\t\t\t\ttargetHash,\n\t\t\t\tliveMarker\n\t\t\t})\n\t\t};\n\t\tif (!isAppSpace && allStorageElementsExternal(space.contract())) {\n\t\t\tif (headRef.invariants.length > 0) return {\n\t\t\t\tkind: \"unsatisfiable\",\n\t\t\t\tspaceId: space.spaceId,\n\t\t\t\tisAppSpace,\n\t\t\t\tmissing: [...headRef.invariants].sort(),\n\t\t\t\ttargetInvariants: headRef.invariants,\n\t\t\t\ttargetSpace: space,\n\t\t\t\tliveHash: liveHash ?? EMPTY_CONTRACT_HASH,\n\t\t\t\trefName: void 0\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tkind: \"ok\",\n\t\t\t\tplan: buildAtHeadResolution({\n\t\t\t\t\taggregateTargetId: aggregate.targetId,\n\t\t\t\t\tspace,\n\t\t\t\t\ttargetHash,\n\t\t\t\t\tliveMarker\n\t\t\t\t})\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkind: \"never-planned\",\n\t\t\tspaceId: space.spaceId,\n\t\t\ttargetHash\n\t\t};\n\t}\n\tconst targetInvariants = isAppSpace && refInvariants !== void 0 ? refInvariants : headRef.invariants;\n\tconst targetSpace = targetHash === headRef.hash && targetInvariants === headRef.invariants ? space : {\n\t\t...space,\n\t\theadRef: {\n\t\t\thash: targetHash,\n\t\t\tinvariants: targetInvariants\n\t\t}\n\t};\n\tconst walked = resolveRecordedPath({\n\t\taggregateTargetId: aggregate.targetId,\n\t\tspace: targetSpace,\n\t\tcurrentMarker: liveMarker,\n\t\t...isAppSpace && refName !== void 0 ? { refName } : {}\n\t});\n\tif (walked.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tspaceId: space.spaceId,\n\t\tliveMarker,\n\t\ttargetHash\n\t};\n\tif (walked.kind === \"unsatisfiable\") {\n\t\tconst liveHash = liveMarker?.storageHash ?? EMPTY_CONTRACT_HASH;\n\t\treturn {\n\t\t\tkind: \"unsatisfiable\",\n\t\t\tspaceId: space.spaceId,\n\t\t\tisAppSpace,\n\t\t\tmissing: walked.missing,\n\t\t\ttargetInvariants,\n\t\t\ttargetSpace,\n\t\t\tliveHash,\n\t\t\trefName\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tplan: walked.result\n\t};\n}\n/**\n* Build a zero-op {@link PerSpacePlan} for an empty-graph space —\n* either one whose live marker already matches the target (at-head), or\n* an all-external extension space whose marker must advance to the head\n* ref with no DDL (declared-state). Lets the apply pipeline thread the\n* space through `perSpacePlans` -> `applyOrder` -> the success\n* envelope's `perSpace[]` block so the result reflects every loaded\n* space, even when there is nothing to execute.\n*/\nfunction buildAtHeadResolution(args) {\n\tconst { aggregateTargetId, space, targetHash, liveMarker } = args;\n\treturn {\n\t\tplan: {\n\t\t\ttargetId: aggregateTargetId,\n\t\t\tspaceId: space.spaceId,\n\t\t\torigin: liveMarker === null ? null : { storageHash: liveMarker.storageHash },\n\t\t\tdestination: { storageHash: targetHash },\n\t\t\toperations: [],\n\t\t\tprovidedInvariants: []\n\t\t},\n\t\tdisplayOps: [],\n\t\tdestinationContract: space.contract(),\n\t\tstrategy: \"declared-state\",\n\t\tmigrationEdges: [buildFabricatedMigrationEdge({\n\t\t\tcurrentMarkerStorageHash: liveMarker?.storageHash,\n\t\t\tdestinationStorageHash: targetHash,\n\t\t\toperationCount: 0\n\t\t})]\n\t};\n}\n/**\n* A plan needs the runner when it executes operations or advances the\n* space's marker (a declared-state resolution has zero operations but a\n* destination hash the live marker doesn't carry yet).\n*/\nfunction planRequiresExecution(entry) {\n\tif (entry.plan.operations.length > 0) return true;\n\treturn entry.plan.origin?.storageHash !== entry.plan.destination.storageHash;\n}\nfunction buildSuccess(args) {\n\tconst appResolution = args.orderedResolutions.find((r) => r.spaceId === args.aggregate.app.spaceId);\n\tconst appMarkerHash = appResolution?.entry.plan.destination.storageHash ?? requireHeadRef(args.aggregate.app).hash;\n\tconst applied = args.orderedResolutions.flatMap((r) => {\n\t\treturn r.entry.migrationEdges.map((edge) => ({\n\t\t\tspaceId: r.spaceId,\n\t\t\tdirName: edge.dirName,\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tfrom: edge.from,\n\t\t\tto: edge.to,\n\t\t\toperationsExecuted: edge.operationCount\n\t\t}));\n\t});\n\tconst appPlan = appResolution?.entry;\n\tconst pathDecision = appPlan?.pathDecision ? {\n\t\tfromHash: appPlan.pathDecision.fromHash,\n\t\ttoHash: appPlan.pathDecision.toHash,\n\t\talternativeCount: appPlan.pathDecision.alternativeCount,\n\t\ttieBreakReasons: appPlan.pathDecision.tieBreakReasons,\n\t\t...appPlan.pathDecision.refName !== void 0 ? { refName: appPlan.pathDecision.refName } : {},\n\t\trequiredInvariants: appPlan.pathDecision.requiredInvariants ?? [],\n\t\tsatisfiedInvariants: appPlan.pathDecision.satisfiedInvariants ?? [],\n\t\tselectedPath: appPlan.pathDecision.selectedPath.map((entry) => ({\n\t\t\tdirName: entry.dirName,\n\t\t\tmigrationHash: entry.migrationHash,\n\t\t\tfrom: entry.from,\n\t\t\tto: entry.to,\n\t\t\tinvariants: entry.invariants\n\t\t}))\n\t} : void 0;\n\treturn {\n\t\tmigrationsApplied: applied.length,\n\t\tmarkerHash: appMarkerHash,\n\t\tapplied,\n\t\tsummary: args.summary,\n\t\tperSpace: args.perSpace,\n\t\t...pathDecision !== void 0 ? { pathDecision } : {}\n\t};\n}\n/**\n* Build the `neverPlanned` failure raised when a contract space that\n* declares managed storage elements has no on-disk migration graph but\n* migrate was asked to reach a target hash. All-external spaces never reach\n* this: they resolve declaratively (marker advances to the head ref with\n* zero operations). The `why` states only the condition; the recovery\n* sequence is composed by `errorPathUnreachable`'s `fix`.\n*\n* @internal Exported for testing only.\n*/\nfunction buildNeverPlannedFailure(spaceId, targetHash) {\n\treturn {\n\t\tcode: \"MIGRATION_PATH_NOT_FOUND\",\n\t\tsummary: `No on-disk migrations for contract space \"${spaceId}\"`,\n\t\twhy: `migrate is replay-only: a contract space that declares managed storage elements must have an authored migration graph on disk. Space \"${spaceId}\" has no migrations under \\`migrations/${spaceId}/\\` but its head ref targets \"${targetHash}\".`,\n\t\tmeta: {\n\t\t\tspaceId,\n\t\t\ttarget: targetHash,\n\t\t\tkind: \"neverPlanned\"\n\t\t}\n\t};\n}\n/**\n* Build the `pathUnreachable` failure raised when an emitted contract has no\n* on-disk migration edge from the current marker to the target. The `why`\n* states only the condition (no edge between the two named states, and migrate\n* replays edges rather than inventing them); the recovery sequence — plan the\n* edge, then re-apply — is composed by `errorPathUnreachable`'s `fix`, so the\n* two read as one non-redundant plan-then-apply story.\n*\n* @internal Exported for testing only.\n*/\nfunction buildPathNotFoundFailure(spaceId, marker, targetHash) {\n\tconst fromHash = marker?.storageHash ?? \"<empty>\";\n\treturn {\n\t\tcode: \"MIGRATION_PATH_NOT_FOUND\",\n\t\tsummary: spaceId === \"app\" ? \"Current contract has no planned migration path\" : `Current contract has no planned migration path for contract space \"${spaceId}\"`,\n\t\twhy: `No migration edge connects the current state \"${fromHash}\" to the target \"${targetHash}\" in contract space \"${spaceId}\". The on-disk migration graph does not join the two, and migrate replays existing edges — it never invents one.`,\n\t\tmeta: {\n\t\t\tspaceId,\n\t\t\tfromHash,\n\t\t\ttargetHash,\n\t\t\tkind: \"pathUnreachable\"\n\t\t}\n\t};\n}\n//#endregion\n//#region src/control-api/client.ts\n/**\n* Creates a programmatic control client for Prisma Next operations.\n*\n* The client accepts framework component descriptors at creation time,\n* manages driver lifecycle via connect()/close(), and exposes domain\n* operations that delegate to the existing family instance methods.\n*\n* @see {@link ControlClient} for the client interface\n* @see README.md \"Programmatic Control API\" section for usage examples\n*/\nfunction createControlClient(options) {\n\treturn new ControlClientImpl(options);\n}\n/**\n* Implementation of ControlClient.\n* Manages initialization and connection state, delegates operations to family instance.\n*/\nvar ControlClientImpl = class {\n\toptions;\n\tstack = null;\n\tdriver = null;\n\tfamilyInstance = null;\n\tframeworkComponents = null;\n\tinitialized = false;\n\tdefaultConnection;\n\tconstructor(options) {\n\t\tthis.options = options;\n\t\tthis.defaultConnection = options.connection;\n\t}\n\tinit() {\n\t\tif (this.initialized) return;\n\t\tthis.stack = createControlStack({\n\t\t\tfamily: this.options.family,\n\t\t\ttarget: this.options.target,\n\t\t\tadapter: this.options.adapter,\n\t\t\tdriver: this.options.driver,\n\t\t\textensions: this.options.extensions\n\t\t});\n\t\tthis.familyInstance = this.options.family.create(this.stack);\n\t\tconst rawComponents = [\n\t\t\tthis.options.target,\n\t\t\tthis.options.adapter,\n\t\t\t...this.options.extensions ?? []\n\t\t];\n\t\tthis.frameworkComponents = assertFrameworkComponentsCompatible(this.options.family.familyId, this.options.target.targetId, rawComponents);\n\t\tthis.initialized = true;\n\t}\n\tasync connect(connection) {\n\t\tthis.init();\n\t\tif (this.driver) throw new CliStructuredError(\"DRIVER.ALREADY_CONNECTED\", \"Already connected. Call close() before reconnecting.\");\n\t\tconst resolvedConnection = connection ?? this.defaultConnection;\n\t\tif (resolvedConnection === void 0) throw new CliStructuredError(\"CONFIG.DB_CONNECTION_REQUIRED\", \"No connection provided. Pass a connection to connect() or provide a default connection when creating the client.\");\n\t\tif (!this.stack?.driver) throw new CliStructuredError(\"CONFIG.DRIVER_REQUIRED\", \"Driver is not configured. Pass a driver descriptor when creating the control client to enable database operations.\");\n\t\tthis.driver = await this.stack.driver.create(resolvedConnection);\n\t}\n\tasync close() {\n\t\tif (this.driver) {\n\t\t\tawait this.driver.close();\n\t\t\tthis.driver = null;\n\t\t}\n\t}\n\t/**\n\t* Construct the control adapter once for a migration operation and return\n\t* it, mirroring how the runtime plane builds the execution adapter once in\n\t* `createExecutionStack`. Only `dbInit` / `dbUpdate` need it (it lowers the\n\t* planner's DDL); read-only operations never build it. The descriptor is\n\t* optional on the stack — targets without migrations omit it.\n\t*/\n\tbuildControlAdapter() {\n\t\tthis.init();\n\t\tif (!this.stack?.adapter) throw new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", `Target \"${this.options.target.targetId}\" requires an adapter for migrations`);\n\t\treturn this.stack.adapter.create(this.stack);\n\t}\n\tasync ensureConnected() {\n\t\tthis.init();\n\t\tif (!this.driver && this.defaultConnection !== void 0) await this.connect(this.defaultConnection);\n\t\tif (!this.driver || !this.familyInstance || !this.frameworkComponents) throw new CliStructuredError(\"DRIVER.NOT_CONNECTED\", \"Not connected. Call connect(connection) first.\");\n\t\treturn {\n\t\t\tdriver: this.driver,\n\t\t\tfamilyInstance: this.familyInstance,\n\t\t\tframeworkComponents: this.frameworkComponents\n\t\t};\n\t}\n\tasync connectWithProgress(connection, action, onProgress) {\n\t\tif (connection === void 0) return;\n\t\tonProgress?.({\n\t\t\taction,\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"connect\",\n\t\t\tlabel: \"Connecting to database...\"\n\t\t});\n\t\ttry {\n\t\t\tawait this.connect(connection);\n\t\t\tonProgress?.({\n\t\t\t\taction,\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"connect\",\n\t\t\t\toutcome: \"ok\"\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction,\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"connect\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync verify(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"verify\", onProgress);\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\tonProgress?.({\n\t\t\taction: \"verify\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"verify\",\n\t\t\tlabel: \"Verifying database marker...\"\n\t\t});\n\t\ttry {\n\t\t\tconst result = await familyInstance.verify({\n\t\t\t\tdriver,\n\t\t\t\tcontract,\n\t\t\t\texpectedTargetId: this.options.target.targetId,\n\t\t\t\tcontractPath: \"\"\n\t\t\t});\n\t\t\tonProgress?.({\n\t\t\t\taction: \"verify\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"verify\",\n\t\t\t\toutcome: result.ok ? \"ok\" : \"error\"\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"verify\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"verify\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync schemaVerify(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"schemaVerify\", onProgress);\n\t\tconst { driver, familyInstance, frameworkComponents } = await this.ensureConnected();\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\tonProgress?.({\n\t\t\taction: \"schemaVerify\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"schemaVerify\",\n\t\t\tlabel: \"Verifying database schema...\"\n\t\t});\n\t\ttry {\n\t\t\tconst schema = await familyInstance.introspect({\n\t\t\t\tdriver,\n\t\t\t\tcontract\n\t\t\t});\n\t\t\tconst result = familyInstance.verifySchema({\n\t\t\t\tcontract,\n\t\t\t\tschema,\n\t\t\t\tstrict: options.strict ?? false,\n\t\t\t\tframeworkComponents\n\t\t\t});\n\t\t\tonProgress?.({\n\t\t\t\taction: \"schemaVerify\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"schemaVerify\",\n\t\t\t\toutcome: result.ok ? \"ok\" : \"error\"\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"schemaVerify\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"schemaVerify\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync sign(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"sign\", onProgress);\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\tonProgress?.({\n\t\t\taction: \"sign\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"sign\",\n\t\t\tlabel: \"Signing database...\"\n\t\t});\n\t\ttry {\n\t\t\tconst result = await familyInstance.sign({\n\t\t\t\tdriver,\n\t\t\t\tcontract,\n\t\t\t\tcontractPath: options.contractPath ?? \"\",\n\t\t\t\t...ifDefined(\"configPath\", options.configPath)\n\t\t\t});\n\t\t\tonProgress?.({\n\t\t\t\taction: \"sign\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"sign\",\n\t\t\t\toutcome: \"ok\"\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"sign\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"sign\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync dbInit(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"dbInit\", onProgress);\n\t\tconst { driver, familyInstance, frameworkComponents } = await this.ensureConnected();\n\t\tif (!hasMigrations(this.options.target)) throw new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", `Target \"${this.options.target.targetId}\" does not support migrations`);\n\t\tconst adapter = this.buildControlAdapter();\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\treturn executeDbInit({\n\t\t\tdriver,\n\t\t\tadapter,\n\t\t\tfamilyInstance,\n\t\t\tcontract,\n\t\t\tmode: options.mode,\n\t\t\tmigrations: this.options.target.migrations,\n\t\t\tframeworkComponents,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\ttargetId: this.options.target.targetId,\n\t\t\textensions: this.options.extensions ?? [],\n\t\t\t...ifDefined(\"onProgress\", onProgress)\n\t\t});\n\t}\n\tasync dbUpdate(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"dbUpdate\", onProgress);\n\t\tconst { driver, familyInstance, frameworkComponents } = await this.ensureConnected();\n\t\tif (!hasMigrations(this.options.target)) throw new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", `Target \"${this.options.target.targetId}\" does not support migrations`);\n\t\tconst adapter = this.buildControlAdapter();\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\treturn executeDbUpdate({\n\t\t\tdriver,\n\t\t\tadapter,\n\t\t\tfamilyInstance,\n\t\t\tcontract,\n\t\t\tmode: options.mode,\n\t\t\tmigrations: this.options.target.migrations,\n\t\t\tframeworkComponents,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\ttargetId: this.options.target.targetId,\n\t\t\textensions: this.options.extensions ?? [],\n\t\t\t...ifDefined(\"acceptDataLoss\", options.acceptDataLoss),\n\t\t\t...ifDefined(\"onProgress\", onProgress)\n\t\t});\n\t}\n\tasync dbVerify(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"dbVerify\", onProgress);\n\t\tconst { driver, familyInstance, frameworkComponents } = await this.ensureConnected();\n\t\treturn executeDbVerify({\n\t\t\tdriver,\n\t\t\tfamilyInstance,\n\t\t\tcontract: options.contract,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\ttargetId: this.options.target.targetId,\n\t\t\textensions: this.options.extensions ?? [],\n\t\t\tframeworkComponents,\n\t\t\tmode: options.strict ? \"strict\" : \"lenient\",\n\t\t\tskipSchema: options.skipSchema,\n\t\t\tskipMarker: options.skipMarker,\n\t\t\t...ifDefined(\"onProgress\", onProgress)\n\t\t});\n\t}\n\tasync readMarker() {\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\treturn familyInstance.readMarker({\n\t\t\tdriver,\n\t\t\tspace: APP_SPACE_ID\n\t\t});\n\t}\n\tasync readAllMarkers() {\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\treturn familyInstance.readAllMarkers({ driver });\n\t}\n\t/** Reads the per-migration journal; omit `space` to return every space. */\n\tasync readLedger(space) {\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\treturn familyInstance.readLedger({\n\t\t\tdriver,\n\t\t\t...ifDefined(\"space\", space)\n\t\t});\n\t}\n\tasync migrate(options) {\n\t\tconst { onProgress } = options;\n\t\tawait this.connectWithProgress(options.connection, \"migrate\", onProgress);\n\t\tconst { driver, familyInstance, frameworkComponents } = await this.ensureConnected();\n\t\tif (!hasMigrations(this.options.target)) throw new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", `Target \"${this.options.target.targetId}\" does not support migrations`);\n\t\tlet contract;\n\t\ttry {\n\t\t\tcontract = familyInstance.deserializeContract(options.contract);\n\t\t} catch (error) {\n\t\t\tthrow structuredError(\"CONTRACT.VALIDATION_FAILED\", error instanceof Error ? error.message : String(error), { cause: error });\n\t\t}\n\t\treturn executeMigrate({\n\t\t\tdriver,\n\t\t\tfamilyInstance,\n\t\t\tcontract,\n\t\t\tmigrations: this.options.target.migrations,\n\t\t\tframeworkComponents,\n\t\t\tmigrationsDir: options.migrationsDir,\n\t\t\textensions: this.options.extensions ?? [],\n\t\t\ttargetId: this.options.target.targetId,\n\t\t\t...ifDefined(\"refHash\", options.refHash),\n\t\t\t...ifDefined(\"refInvariants\", options.refInvariants),\n\t\t\t...ifDefined(\"refName\", options.refName),\n\t\t\t...ifDefined(\"onProgress\", onProgress)\n\t\t});\n\t}\n\tasync introspect(options) {\n\t\tconst onProgress = options?.onProgress;\n\t\tawait this.connectWithProgress(options?.connection, \"introspect\", onProgress);\n\t\tconst { driver, familyInstance } = await this.ensureConnected();\n\t\toptions?.schema;\n\t\tonProgress?.({\n\t\t\taction: \"introspect\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"introspect\",\n\t\t\tlabel: \"Introspecting database schema...\"\n\t\t});\n\t\ttry {\n\t\t\tconst result = await familyInstance.introspect({ driver });\n\t\t\tonProgress?.({\n\t\t\t\taction: \"introspect\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"introspect\",\n\t\t\t\toutcome: \"ok\"\n\t\t\t});\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"introspect\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"introspect\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\ttoSchemaView(schemaIR) {\n\t\tthis.init();\n\t\tif (this.familyInstance && hasSchemaView(this.familyInstance)) return this.familyInstance.toSchemaView(schemaIR);\n\t}\n\tinferPslContract(schemaIR) {\n\t\tthis.init();\n\t\tif (this.familyInstance && hasPslContractInfer(this.familyInstance)) return this.familyInstance.inferPslContract(schemaIR);\n\t}\n\tgetPslBlockDescriptors() {\n\t\tthis.init();\n\t\treturn this.stack.authoringContributions.pslBlockDescriptors;\n\t}\n\ttoOperationPreview(operations) {\n\t\tthis.init();\n\t\tif (this.familyInstance && hasOperationPreview(this.familyInstance)) return this.familyInstance.toOperationPreview(operations);\n\t}\n\tasync emit(options) {\n\t\tconst { onProgress, contractConfig } = options;\n\t\tthis.init();\n\t\tif (!this.familyInstance) throw new InternalError(\"Family instance was not initialized. This is a bug.\");\n\t\tlet contractRaw;\n\t\tonProgress?.({\n\t\t\taction: \"emit\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"resolveSource\",\n\t\t\tlabel: \"Resolving contract source...\"\n\t\t});\n\t\ttry {\n\t\t\tconst stack = this.stack;\n\t\t\tconst sourceContext = {\n\t\t\t\tcomposedExtensions: stack.extensions.map((p) => p.id),\n\t\t\t\tcomposedExtensionContracts: stack.extensionContracts,\n\t\t\t\tauthoringContributions: stack.authoringContributions,\n\t\t\t\tcodecLookup: stack.codecLookup,\n\t\t\t\tcontrolMutationDefaults: stack.controlMutationDefaults,\n\t\t\t\tresolvedInputs: contractConfig.source.inputs ?? [],\n\t\t\t\tcapabilities: stack.capabilities\n\t\t\t};\n\t\t\tconst providerResult = await contractConfig.source.load(sourceContext);\n\t\t\tif (!providerResult.ok) {\n\t\t\t\tonProgress?.({\n\t\t\t\t\taction: \"emit\",\n\t\t\t\t\tkind: \"spanEnd\",\n\t\t\t\t\tspanId: \"resolveSource\",\n\t\t\t\t\toutcome: \"error\"\n\t\t\t\t});\n\t\t\t\treturn notOk({\n\t\t\t\t\tcode: \"CONTRACT_SOURCE_INVALID\",\n\t\t\t\t\tsummary: providerResult.failure.summary,\n\t\t\t\t\twhy: providerResult.failure.summary,\n\t\t\t\t\tmeta: providerResult.failure.meta,\n\t\t\t\t\tdiagnostics: providerResult.failure\n\t\t\t\t});\n\t\t\t}\n\t\t\tcontractRaw = providerResult.value;\n\t\t\tonProgress?.({\n\t\t\t\taction: \"emit\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"resolveSource\",\n\t\t\t\toutcome: \"ok\"\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"emit\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"resolveSource\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\treturn notOk({\n\t\t\t\tcode: \"CONTRACT_SOURCE_INVALID\",\n\t\t\t\tsummary: \"Failed to resolve contract source\",\n\t\t\t\twhy: message,\n\t\t\t\tdiagnostics: {\n\t\t\t\t\tsummary: \"Contract source provider threw an exception\",\n\t\t\t\t\tdiagnostics: [{\n\t\t\t\t\t\tcode: \"PROVIDER_THROW\",\n\t\t\t\t\t\tmessage\n\t\t\t\t\t}]\n\t\t\t\t},\n\t\t\t\tmeta: void 0\n\t\t\t});\n\t\t}\n\t\tonProgress?.({\n\t\t\taction: \"emit\",\n\t\t\tkind: \"spanStart\",\n\t\t\tspanId: \"emit\",\n\t\t\tlabel: \"Emitting contract...\"\n\t\t});\n\t\ttry {\n\t\t\tconst enrichedIR = enrichContract(contractRaw, this.frameworkComponents ?? []);\n\t\t\tconst rawContractJson = this.options.target.contractSerializer.serializeContract(enrichedIR);\n\t\t\tlet deserializedContract;\n\t\t\ttry {\n\t\t\t\tdeserializedContract = this.familyInstance.deserializeContract(rawContractJson);\n\t\t\t} catch (error) {\n\t\t\t\tonProgress?.({\n\t\t\t\t\taction: \"emit\",\n\t\t\t\t\tkind: \"spanEnd\",\n\t\t\t\t\tspanId: \"emit\",\n\t\t\t\t\toutcome: \"error\"\n\t\t\t\t});\n\t\t\t\treturn notOk({\n\t\t\t\t\tcode: \"CONTRACT_VALIDATION_FAILED\",\n\t\t\t\t\tsummary: \"Contract validation failed\",\n\t\t\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\t\t\tmeta: void 0\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst result = await emit(deserializedContract, this.stack, this.options.family.emission, { serializeContract: (contract) => this.options.target.contractSerializer.serializeContract(contract) });\n\t\t\tonProgress?.({\n\t\t\t\taction: \"emit\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"emit\",\n\t\t\t\toutcome: \"ok\"\n\t\t\t});\n\t\t\treturn ok({\n\t\t\t\tstorageHash: result.storageHash,\n\t\t\t\t...ifDefined(\"executionHash\", result.executionHash),\n\t\t\t\tprofileHash: result.profileHash,\n\t\t\t\tcontractJson: result.contractJson,\n\t\t\t\tcontractDts: result.contractDts\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tonProgress?.({\n\t\t\t\taction: \"emit\",\n\t\t\t\tkind: \"spanEnd\",\n\t\t\t\tspanId: \"emit\",\n\t\t\t\toutcome: \"error\"\n\t\t\t});\n\t\t\treturn notOk({\n\t\t\t\tcode: \"EMIT_FAILED\",\n\t\t\t\tsummary: \"Failed to emit contract\",\n\t\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\t\tmeta: void 0\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { executeDbInit as a, executeDbUpdate as i, planSpacePath as n, executeDbVerify as r, createControlClient as t };\n\n//# sourceMappingURL=client-75qrAPqf.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,gBAAgB,YAAY;CACpC,OAAO,WAAW,KAAK,QAAQ;EAC9B,IAAI,GAAG;EACP,OAAO,GAAG;EACV,gBAAgB,GAAG;CACpB,EAAE;AACH;;;;;AAOA,MAAM,cAAc;;;;;;;;;;;;;;;;;AAiBpB,eAAe,aAAa,QAAQ;CACnC,MAAM,EAAE,WAAW,eAAe,YAAY,QAAQ,gBAAgB,YAAY,qBAAqB,QAAQ,QAAQ,eAAe;CACtI,MAAM,qBAAqB,eAAe,YAAY,aAAa;CACnE,MAAM,SAAS,WAAW,aAAa,cAAc;CACrD,aAAa;EACZ;EACA,MAAM;EACN,QAAQ;EACR,OAAO,uBAAuB,MAAM;CACrC,CAAC;CACD,MAAM,kBA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