@prisma/orm-toolchain 8.0.0-rc.1-dev.22 → 8.0.0-rc.1-dev.24

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 (242) hide show
  1. package/dist/{aggregate-D53gnb7v.mjs → aggregate-BKbHUHLA.mjs} +7 -7
  2. package/dist/{aggregate-D53gnb7v.mjs.map → aggregate-BKbHUHLA.mjs.map} +1 -1
  3. package/dist/{aggregate-BflrjWPO.d.mts → aggregate-CA6bJ8UO.d.mts} +3 -3
  4. package/dist/{aggregate-BflrjWPO.d.mts.map → aggregate-CA6bJ8UO.d.mts.map} +1 -1
  5. package/dist/bin__prisma-next.mjs +31 -26
  6. package/dist/bin__prisma-next.mjs.map +1 -1
  7. package/dist/{caught-errors-D7Qznyrm-BzYooF6H.mjs → caught-errors-nYuTn3NK-DkD-ZrDr.mjs} +3 -3
  8. package/dist/caught-errors-nYuTn3NK-DkD-ZrDr.mjs.map +1 -0
  9. package/dist/{cli-errors-CDr3WcJP-NFry5GHb.d.mts → cli-errors-C7vbvQuK-DLpSxz4U.d.mts} +16 -8
  10. package/dist/{cli-errors-CDr3WcJP-NFry5GHb.d.mts.map → cli-errors-C7vbvQuK-DLpSxz4U.d.mts.map} +1 -1
  11. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs +235 -0
  12. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs.map +1 -0
  13. package/dist/cli-telemetry.mjs +7 -6
  14. package/dist/cli-telemetry.mjs.map +1 -1
  15. package/dist/cli.d.mts +38 -2
  16. package/dist/cli.d.mts.map +1 -1
  17. package/dist/cli.mjs +358 -5
  18. package/dist/cli.mjs.map +1 -1
  19. package/dist/cli__commands__contract-emit.d.mts +1 -1
  20. package/dist/cli__commands__contract-emit.mjs +1 -1
  21. package/dist/cli__commands__contract-infer.mjs +1 -1
  22. package/dist/cli__commands__db-init.mjs +1 -1
  23. package/dist/cli__commands__db-schema.mjs +1 -1
  24. package/dist/cli__commands__db-sign.mjs +1 -1
  25. package/dist/cli__commands__db-update.mjs +1 -1
  26. package/dist/cli__commands__db-verify.mjs +1 -1
  27. package/dist/cli__commands__migrate.d.mts +2 -2
  28. package/dist/cli__commands__migrate.mjs +1 -1
  29. package/dist/cli__commands__migration-check.mjs +1 -1
  30. package/dist/cli__commands__migration-graph.d.mts +1 -1
  31. package/dist/cli__commands__migration-graph.mjs +1 -1
  32. package/dist/cli__commands__migration-list.d.mts +2 -2
  33. package/dist/cli__commands__migration-list.mjs +1 -1
  34. package/dist/cli__commands__migration-log.d.mts +1 -1
  35. package/dist/cli__commands__migration-log.mjs +1 -1
  36. package/dist/cli__commands__migration-new.mjs +1 -1
  37. package/dist/cli__commands__migration-plan.d.mts +1 -1
  38. package/dist/cli__commands__migration-plan.mjs +1 -1
  39. package/dist/cli__commands__migration-show.mjs +1 -1
  40. package/dist/cli__commands__migration-status.d.mts +1 -1
  41. package/dist/cli__commands__migration-status.mjs +1 -1
  42. package/dist/cli__commands__ref.mjs +1 -1
  43. package/dist/cli__commands__telemetry.mjs +1 -1
  44. package/dist/cli__control-api.d.mts +26 -19
  45. package/dist/cli__control-api.d.mts.map +1 -1
  46. package/dist/cli__control-api.mjs +16 -16
  47. package/dist/cli__control-api__testing.d.mts +66 -0
  48. package/dist/cli__control-api__testing.d.mts.map +1 -0
  49. package/dist/cli__control-api__testing.mjs +255 -0
  50. package/dist/cli__control-api__testing.mjs.map +1 -0
  51. package/dist/cli__migration-cli.mjs +16 -7
  52. package/dist/cli__migration-cli.mjs.map +1 -1
  53. package/dist/{client-Y6qbDk7X-BzKLmBZo.mjs → client-milNsAnF-B92uF3yv.mjs} +11 -11
  54. package/dist/client-milNsAnF-B92uF3yv.mjs.map +1 -0
  55. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs +765 -0
  56. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs.map +1 -0
  57. package/dist/config-loader.d.mts +2 -2
  58. package/dist/config-loader.mjs +2 -2
  59. package/dist/{contract-at-errors-Dv1mxKYO-C29YB4RC.mjs → contract-at-errors-BTeDEXm4-BAIDia2-.mjs} +3 -3
  60. package/dist/contract-at-errors-BTeDEXm4-BAIDia2-.mjs.map +1 -0
  61. package/dist/{contract-emit-CTm2zfuG-7PV9SBY6.mjs → contract-emit-Bdf4DAR4-lKqkbfZT.mjs} +8 -38
  62. package/dist/contract-emit-Bdf4DAR4-lKqkbfZT.mjs.map +1 -0
  63. package/dist/{contract-emit-D8IXP9Qp-Df6NwXn8.mjs → contract-emit-Ci-8sP-b-QzQXK2xQ.mjs} +29 -23
  64. package/dist/contract-emit-Ci-8sP-b-QzQXK2xQ.mjs.map +1 -0
  65. package/dist/{contract-emit-B65_UiFn.d.mts → contract-emit-CvwNE4R1-DEn1V1Zo.d.mts} +2 -2
  66. package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts.map +1 -0
  67. package/dist/contract-emit-E6m8HE42-Bfiodzf_.mjs +2 -0
  68. package/dist/{contract-infer-BwT7ngoo-Dx6aAwIN.mjs → contract-infer-hhyMJiwS-BJ5cYC9P.mjs} +7 -6
  69. package/dist/contract-infer-hhyMJiwS-BJ5cYC9P.mjs.map +1 -0
  70. package/dist/{contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs → contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs} +7 -7
  71. package/dist/contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs.map +1 -0
  72. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs} +2 -2
  73. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs.map} +1 -1
  74. package/dist/{contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs → contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs} +7 -6
  75. package/dist/contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs.map +1 -0
  76. package/dist/{db-init-CBj_EWg3.mjs → db-init-3CbSYxRI-BlTkWh8n.mjs} +10 -8
  77. package/dist/db-init-3CbSYxRI-BlTkWh8n.mjs.map +1 -0
  78. package/dist/{db-schema-BWpeh0Q_.mjs → db-schema-BVLbe3EL-WLnbuo77.mjs} +6 -5
  79. package/dist/db-schema-BVLbe3EL-WLnbuo77.mjs.map +1 -0
  80. package/dist/{db-sign-DCb_DKtv.mjs → db-sign-Cdw2RmoG-C-X5UheR.mjs} +24 -11
  81. package/dist/db-sign-Cdw2RmoG-C-X5UheR.mjs.map +1 -0
  82. package/dist/{db-update-WX0KitcX.mjs → db-update-BHOdo8PV-BVBNKrJc.mjs} +11 -9
  83. package/dist/db-update-BHOdo8PV-BVBNKrJc.mjs.map +1 -0
  84. package/dist/{db-verify-B8ax2Y_x-Bp4s5Ra6.mjs → db-verify-C9P9oNCs-gieY7hV2.mjs} +33 -16
  85. package/dist/db-verify-C9P9oNCs-gieY7hV2.mjs.map +1 -0
  86. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs} +2 -2
  87. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs.map → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map} +1 -1
  88. package/dist/emitter.d.mts +1 -1
  89. package/dist/emitter.mjs +2 -2
  90. package/dist/emitter__domain-type-generation.mjs +1 -1
  91. package/dist/{exports-BCLg4CiV-okAfZydo.mjs → exports-BCLg4CiV-05kuwcb0.mjs} +4 -4
  92. package/dist/{exports-BCLg4CiV-okAfZydo.mjs.map → exports-BCLg4CiV-05kuwcb0.mjs.map} +1 -1
  93. package/dist/exports-BZLNbtkY.mjs +215 -0
  94. package/dist/exports-BZLNbtkY.mjs.map +1 -0
  95. package/dist/{exports-BN0vFTxG.mjs → exports-CqNUihkI.mjs} +2 -2
  96. package/dist/{exports-BN0vFTxG.mjs.map → exports-CqNUihkI.mjs.map} +1 -1
  97. package/dist/{exports-BnihzVhw.mjs → exports-DaxzMVtq.mjs} +16 -4
  98. package/dist/exports-DaxzMVtq.mjs.map +1 -0
  99. package/dist/{format-Bw3LVJ1v-BJ6lVFMA.mjs → format-Ddhz7xFW-Bo1nhay8.mjs} +18 -15
  100. package/dist/format-Ddhz7xFW-Bo1nhay8.mjs.map +1 -0
  101. package/dist/{framework-components-3DdB31mk-BHyX-OlJ.mjs → framework-components-Cruf6BPK-CaQvMI3T.mjs} +7 -5
  102. package/dist/framework-components-Cruf6BPK-CaQvMI3T.mjs.map +1 -0
  103. package/dist/index-mCsi_ND5.d.mts +49 -0
  104. package/dist/index-mCsi_ND5.d.mts.map +1 -0
  105. package/dist/{init-CPB89WK2-DPZRZ9Ee.mjs → init-BbmawfZx-DCylULYh.mjs} +23 -8
  106. package/dist/init-BbmawfZx-DCylULYh.mjs.map +1 -0
  107. package/dist/{inspect-live-schema-Da76TWOs-CAFqkhGb.mjs → inspect-live-schema-BEQun_1x-CZpCgg8A.mjs} +17 -13
  108. package/dist/inspect-live-schema-BEQun_1x-CZpCgg8A.mjs.map +1 -0
  109. package/dist/{invariants-BzYfO9IL-BXTvx0z9.mjs → invariants-D5TNnX5E-rjPoJGFq.mjs} +4 -3
  110. package/dist/invariants-D5TNnX5E-rjPoJGFq.mjs.map +1 -0
  111. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs → io-CHUUeHh0-CbyTkKP6.mjs} +2 -2
  112. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs.map → io-CHUUeHh0-CbyTkKP6.mjs.map} +1 -1
  113. package/dist/{legend-5iwwlLU2-CB8bdQKJ.mjs → legend-BBtAETiW-BHqTbUjx.mjs} +3 -3
  114. package/dist/legend-BBtAETiW-BHqTbUjx.mjs.map +1 -0
  115. package/dist/{migrate-B-NAuO90.mjs → migrate-B-hpVTxi-DJzFYT2w.mjs} +44 -17
  116. package/dist/migrate-B-hpVTxi-DJzFYT2w.mjs.map +1 -0
  117. package/dist/{migrate-show-B2LkXkoB-D1ZNl84C.mjs → migrate-show-CUymfnbM-BbpcO2FY.mjs} +9 -12
  118. package/dist/migrate-show-CUymfnbM-BbpcO2FY.mjs.map +1 -0
  119. package/dist/{migrate-show-60NNqVia-oGqMaVA9.d.mts → migrate-show-g71Z4vJw-ocdTvf70.d.mts} +10 -5
  120. package/dist/migrate-show-g71Z4vJw-ocdTvf70.d.mts.map +1 -0
  121. package/dist/{migration-DAJY-NmR.mjs → migration-_C5W2uXF.mjs} +2 -2
  122. package/dist/{migration-DAJY-NmR.mjs.map → migration-_C5W2uXF.mjs.map} +1 -1
  123. package/dist/{migration-check-DONPyXff-CGTUpLv-.mjs → migration-check-DHYPMUFe-Cni_ZUzB.mjs} +33 -30
  124. package/dist/migration-check-DHYPMUFe-Cni_ZUzB.mjs.map +1 -0
  125. package/dist/{migration-check-BDjtAn7x-B0nEBR0k.mjs → migration-check-zgqYe3SB-B6LI6wY7.mjs} +22 -9
  126. package/dist/migration-check-zgqYe3SB-B6LI6wY7.mjs.map +1 -0
  127. package/dist/{migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs → migration-command-scaffold-DsT7ke7B-D3u913Po.mjs} +26 -8
  128. package/dist/migration-command-scaffold-DsT7ke7B-D3u913Po.mjs.map +1 -0
  129. package/dist/{migration-graph-HKch1Xk4-DyWhXtjZ.mjs → migration-graph-CChCjts3-ERrIm5aT.mjs} +3 -3
  130. package/dist/{migration-graph-HKch1Xk4-DyWhXtjZ.mjs.map → migration-graph-CChCjts3-ERrIm5aT.mjs.map} +1 -1
  131. package/dist/{migration-graph-Dn469b0l.mjs → migration-graph-Dm9gU0oE-DxPD_SNA.mjs} +20 -10
  132. package/dist/migration-graph-Dm9gU0oE-DxPD_SNA.mjs.map +1 -0
  133. package/dist/{migration-list-C9OPCMt--C28yBgVr.mjs → migration-list-Bkase_ZM-D-bErpSr.mjs} +4 -4
  134. package/dist/migration-list-Bkase_ZM-D-bErpSr.mjs.map +1 -0
  135. package/dist/{migration-list-jk4iCtmO.mjs → migration-list-DDGUTC8Y-B_X7rkez.mjs} +19 -9
  136. package/dist/migration-list-DDGUTC8Y-B_X7rkez.mjs.map +1 -0
  137. package/dist/{migration-log-DQzUBrm8-D3m9wcuf.mjs → migration-log-Cft50PRu-DcnHdxT4.mjs} +20 -8
  138. package/dist/migration-log-Cft50PRu-DcnHdxT4.mjs.map +1 -0
  139. package/dist/{migration-new-BkSY6m0t.mjs → migration-new-D9GHbYwF-C8D22HXG.mjs} +25 -5
  140. package/dist/migration-new-D9GHbYwF-C8D22HXG.mjs.map +1 -0
  141. package/dist/{migration-new-g98oB3nC-BcrkxAAt.mjs → migration-new-RorO1I8r-Ch8NQ4GQ.mjs} +19 -18
  142. package/dist/migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map +1 -0
  143. package/dist/{migration-path-target-BPYp3LNc-DsDdLU0J.mjs → migration-path-target-DhGt62Mi-dm4TU1hJ.mjs} +4 -4
  144. package/dist/migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map +1 -0
  145. package/dist/{migration-plan-CjIYMJZy.mjs → migration-plan-BOhasCLr-GJWYoOA8.mjs} +25 -5
  146. package/dist/migration-plan-BOhasCLr-GJWYoOA8.mjs.map +1 -0
  147. package/dist/{migration-plan-CwuZLXVE-DAJ-JUQT.mjs → migration-plan-DrCTzrXH-CDJbdiC6.mjs} +29 -28
  148. package/dist/migration-plan-DrCTzrXH-CDJbdiC6.mjs.map +1 -0
  149. package/dist/{migration-plan-BsOYRogP-CC1UFAbu.d.mts → migration-plan-t2e_8yD2-w5Ffa0V_.d.mts} +10 -5
  150. package/dist/migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map +1 -0
  151. package/dist/{migration-show-CW6EKtfw.mjs → migration-show-DRARjIbv-1p6EE_Uw.mjs} +24 -12
  152. package/dist/migration-show-DRARjIbv-1p6EE_Uw.mjs.map +1 -0
  153. package/dist/{migration-status-DSQcBhiN.mjs → migration-status-Yh0eOQJN-YpcPDpNh.mjs} +26 -13
  154. package/dist/migration-status-Yh0eOQJN-YpcPDpNh.mjs.map +1 -0
  155. package/dist/migration-tools.d.mts +2 -2
  156. package/dist/migration-tools.mjs +8 -8
  157. package/dist/migration-tools__aggregate.d.mts +1 -1
  158. package/dist/migration-tools__aggregate.mjs +1 -1
  159. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  160. package/dist/migration-tools__io.mjs +1 -1
  161. package/dist/migration-tools__migration-ts.mjs +1 -1
  162. package/dist/migration-tools__migration.mjs +1 -1
  163. package/dist/migration-tools__spaces.d.mts +1 -1
  164. package/dist/migration-tools__spaces.mjs +2 -2
  165. package/dist/{migration-ts-FyF55c4M.mjs → migration-ts-BoHxxGvi.mjs} +2 -2
  166. package/dist/{migration-ts-FyF55c4M.mjs.map → migration-ts-BoHxxGvi.mjs.map} +1 -1
  167. package/dist/{project-import-root-C_bd0ooL-WkbJLnAA.mjs → project-import-root--e8xli8Z-Bfrvrv67.mjs} +3 -3
  168. package/dist/project-import-root--e8xli8Z-Bfrvrv67.mjs.map +1 -0
  169. package/dist/{ref-eJjxzYTh-CNiyDL4p.mjs → ref-BQcl8Ksv-BYZY0Ktb.mjs} +12 -17
  170. package/dist/ref-BQcl8Ksv-BYZY0Ktb.mjs.map +1 -0
  171. package/dist/{ref-DSAZime8.mjs → ref-Cu7Zc1Hv-_R4MnDfr.mjs} +30 -7
  172. package/dist/ref-Cu7Zc1Hv-_R4MnDfr.mjs.map +1 -0
  173. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs} +3 -3
  174. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs.map → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs.map} +1 -1
  175. package/dist/{ref-resolution-_S4xTT2L-BE5zgO2W.mjs → ref-resolution-BYCRg72z-DFhwf-XR.mjs} +3 -3
  176. package/dist/ref-resolution-BYCRg72z-DFhwf-XR.mjs.map +1 -0
  177. package/dist/{spaces-DxuvClN9.mjs → spaces-DBTCE3Js.mjs} +6 -6
  178. package/dist/{spaces-DxuvClN9.mjs.map → spaces-DBTCE3Js.mjs.map} +1 -1
  179. package/dist/{spaces-D5qtTlhj.d.mts → spaces-tWQi7CUv.d.mts} +2 -2
  180. package/dist/{spaces-D5qtTlhj.d.mts.map → spaces-tWQi7CUv.d.mts.map} +1 -1
  181. package/dist/{telemetry-DVBHDQd6-Ckn5oClN.mjs → telemetry-Dh6e0ams-BsjGN3tQ.mjs} +5 -4
  182. package/dist/telemetry-Dh6e0ams-BsjGN3tQ.mjs.map +1 -0
  183. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs +645 -0
  184. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs.map +1 -0
  185. package/dist/{verify-C6L_hiJU-B4V3bqvG.mjs → verify-DBsKxZrK-eDPxNiSS.mjs} +3 -3
  186. package/dist/verify-DBsKxZrK-eDPxNiSS.mjs.map +1 -0
  187. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs} +2 -2
  188. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs.map} +1 -1
  189. package/dist/vite-plugin-contract-emit.mjs +16 -4
  190. package/dist/vite-plugin-contract-emit.mjs.map +1 -1
  191. package/package.json +14 -12
  192. package/dist/caught-errors-D7Qznyrm-BzYooF6H.mjs.map +0 -1
  193. package/dist/client-Y6qbDk7X-BzKLmBZo.mjs.map +0 -1
  194. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs +0 -1627
  195. package/dist/command-helpers-C4WpR-QE-DE494TSG.mjs.map +0 -1
  196. package/dist/contract-at-errors-Dv1mxKYO-C29YB4RC.mjs.map +0 -1
  197. package/dist/contract-emit-B65_UiFn.d.mts.map +0 -1
  198. package/dist/contract-emit-CTm2zfuG-7PV9SBY6.mjs.map +0 -1
  199. package/dist/contract-emit-D8IXP9Qp-Df6NwXn8.mjs.map +0 -1
  200. package/dist/contract-infer-BwT7ngoo-Dx6aAwIN.mjs.map +0 -1
  201. package/dist/contract-snapshot-resolution-SATuw0JW-CsYq7g_n.mjs.map +0 -1
  202. package/dist/contract-space-aggregate-loader-C5r12INu-Db_pa3rX.mjs.map +0 -1
  203. package/dist/db-init-CBj_EWg3.mjs.map +0 -1
  204. package/dist/db-schema-BWpeh0Q_.mjs.map +0 -1
  205. package/dist/db-sign-DCb_DKtv.mjs.map +0 -1
  206. package/dist/db-update-WX0KitcX.mjs.map +0 -1
  207. package/dist/db-verify-B8ax2Y_x-Bp4s5Ra6.mjs.map +0 -1
  208. package/dist/exports-BnihzVhw.mjs.map +0 -1
  209. package/dist/exports-CDX9kZuw.mjs +0 -119
  210. package/dist/exports-CDX9kZuw.mjs.map +0 -1
  211. package/dist/format-Bw3LVJ1v-BJ6lVFMA.mjs.map +0 -1
  212. package/dist/framework-components-3DdB31mk-BHyX-OlJ.mjs.map +0 -1
  213. package/dist/index-Df9igRvP.d.mts +0 -18
  214. package/dist/index-Df9igRvP.d.mts.map +0 -1
  215. package/dist/init-CPB89WK2-DPZRZ9Ee.mjs.map +0 -1
  216. package/dist/inspect-live-schema-Da76TWOs-CAFqkhGb.mjs.map +0 -1
  217. package/dist/invariants-BzYfO9IL-BXTvx0z9.mjs.map +0 -1
  218. package/dist/legend-5iwwlLU2-CB8bdQKJ.mjs.map +0 -1
  219. package/dist/migrate-B-NAuO90.mjs.map +0 -1
  220. package/dist/migrate-show-60NNqVia-oGqMaVA9.d.mts.map +0 -1
  221. package/dist/migrate-show-B2LkXkoB-D1ZNl84C.mjs.map +0 -1
  222. package/dist/migration-check-BDjtAn7x-B0nEBR0k.mjs.map +0 -1
  223. package/dist/migration-check-DONPyXff-CGTUpLv-.mjs.map +0 -1
  224. package/dist/migration-command-scaffold-BPqXPCFV-Bls2Wwg7.mjs.map +0 -1
  225. package/dist/migration-graph-Dn469b0l.mjs.map +0 -1
  226. package/dist/migration-list-C9OPCMt--C28yBgVr.mjs.map +0 -1
  227. package/dist/migration-list-jk4iCtmO.mjs.map +0 -1
  228. package/dist/migration-log-DQzUBrm8-D3m9wcuf.mjs.map +0 -1
  229. package/dist/migration-new-BkSY6m0t.mjs.map +0 -1
  230. package/dist/migration-new-g98oB3nC-BcrkxAAt.mjs.map +0 -1
  231. package/dist/migration-path-target-BPYp3LNc-DsDdLU0J.mjs.map +0 -1
  232. package/dist/migration-plan-BsOYRogP-CC1UFAbu.d.mts.map +0 -1
  233. package/dist/migration-plan-CjIYMJZy.mjs.map +0 -1
  234. package/dist/migration-plan-CwuZLXVE-DAJ-JUQT.mjs.map +0 -1
  235. package/dist/migration-show-CW6EKtfw.mjs.map +0 -1
  236. package/dist/migration-status-DSQcBhiN.mjs.map +0 -1
  237. package/dist/project-import-root-C_bd0ooL-WkbJLnAA.mjs.map +0 -1
  238. package/dist/ref-DSAZime8.mjs.map +0 -1
  239. package/dist/ref-eJjxzYTh-CNiyDL4p.mjs.map +0 -1
  240. package/dist/ref-resolution-_S4xTT2L-BE5zgO2W.mjs.map +0 -1
  241. package/dist/telemetry-DVBHDQd6-Ckn5oClN.mjs.map +0 -1
  242. package/dist/verify-C6L_hiJU-B4V3bqvG.mjs.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from "./errors-Co-8oaiB-CB-6Uqki.mjs";
2
- import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs";
3
- import { s as readMigrationsDir } from "./io-CHUUeHh0-CoCBe9eN.mjs";
2
+ import { o as writeContractSnapshot } from "./contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs";
3
+ import { s as readMigrationsDir } from "./io-CHUUeHh0-CbyTkKP6.mjs";
4
4
  import { l as reconstructGraph, o as findPathWithDecision } from "./migration-graph-DDaOHo10-yJFAbKCu.mjs";
5
- import { c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID } from "./verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs";
5
+ import { c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID } from "./verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs";
6
6
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
7
7
  import { join } from "pathe";
8
+ import { computeStorageHash } from "@prisma/orm-framework/contract/hashing";
9
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
8
10
  import { mkdir, writeFile } from "node:fs/promises";
9
11
  import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
10
- import { InternalError } from "@prisma/orm-framework/utils/internal-error";
11
- import { computeStorageHash } from "@prisma/orm-framework/contract/hashing";
12
12
  //#region ../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs
13
13
  /**
14
14
  * Assert that an extension descriptor is self-consistent: the
@@ -264,4 +264,4 @@ function planAllSpaces(inputs, planSpace) {
264
264
  //#endregion
265
265
  export { gatherDiskContractSpaceState as a, emitContractSpaceArtifacts as i, computeExtensionSpaceApplyPath as n, planAllSpaces as o, contractSpaceFromJson as r, assertDescriptorSelfConsistency as t };
266
266
 
267
- //# sourceMappingURL=spaces-DxuvClN9.mjs.map
267
+ //# sourceMappingURL=spaces-DBTCE3Js.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spaces-DxuvClN9.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-Co-8oaiB.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-C9-J6OBn.mjs\";\nimport { s as readMigrationsDir } from \"../io-CHUUeHh0.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-DDaOHo10.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-WvjSiWcB.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `meta` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,aAAa,WAAW,GAAG,uBAAuB,OAAO;CACjE,MAAM,aAAa,mBAAmB;EACrC,QAAQ,OAAO;EACf,cAAc,OAAO;EACrB,SAAS;EACT,GAAG,UAAU,uBAAuB,OAAO,mBAAmB;EAC9D,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AAM,OAAO,MAAM,yBAAyB,sBAAsB,OAAO;EACzE,IAAI,SAAS,MAAM,gBAAgB,IAAI,SAAS,IAAI;CACrD;CACA,OAAO;EACN;EACA;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,cAAc,QAAQ,WAAW;CACzC,MAAM,uBAAuB,IAAI,IAAI;CACrC,KAAK,MAAM,SAAS,QAAQ;EAC3B,IAAI,KAAK,IAAI,MAAM,OAAO,GAAG,MAAM,sBAAsB,MAAM,OAAO;EACtE,KAAK,IAAI,MAAM,OAAO;CACvB;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM;EACjC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC,CAAC,CAAC,KAAK,WAAW;EAClB,SAAS,MAAM;EACf,mBAAmB,UAAU,KAAK;CACnC,EAAE;AACH"}
1
+ {"version":3,"file":"spaces-DBTCE3Js.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-Co-8oaiB.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-C9-J6OBn.mjs\";\nimport { s as readMigrationsDir } from \"../io-CHUUeHh0.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-DDaOHo10.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-WvjSiWcB.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `meta` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,aAAa,WAAW,GAAG,uBAAuB,OAAO;CACjE,MAAM,aAAa,mBAAmB;EACrC,QAAQ,OAAO;EACf,cAAc,OAAO;EACrB,SAAS;EACT,GAAG,UAAU,uBAAuB,OAAO,mBAAmB;EAC9D,GAAG,UAAU,eAAe,OAAO,WAAW;CAC/C,CAAC;CACD,IAAI,eAAe,OAAO,aAAa,MAAM,gCAAgC;EAC5E,aAAa,OAAO;EACpB,gBAAgB;EAChB,aAAa,OAAO;CACrB,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,eAAe,+BAA+B,QAAQ;CACrD,MAAM,EAAE,sBAAsB,SAAS,mBAAmB,4BAA4B;CACtF,MAAM,uBAAuB,MAAM,yBAAyB,sBAAsB,OAAO;CACzF,IAAI,yBAAyB,MAAM,OAAO,EAAE,MAAM,8BA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B;CACA,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,MAAM;EACjC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,IAAI,EAAE,UAAU,EAAE,SAAS,OAAO;EAClC,OAAO;CACR,CAAC,CAAC,CAAC,KAAK,WAAW;EAClB,SAAS,MAAM;EACf,mBAAmB,UAAU,KAAK;CACnC,EAAE;AACH"}
@@ -1,7 +1,7 @@
1
1
  import { t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
2
2
  import { t as ContractSpaceHeadRecord } from "./verify-contract-spaces-Cc1u_wJo-BilPJS2S.mjs";
3
- import { APP_SPACE_ID as APP_SPACE_ID$1, ContractSpace, ContractSpaceHeadRef, ContractSpaceHeadRef as ContractSpaceHeadRef$1 } from "@prisma/orm-framework/components/control";
4
3
  import { PreserveEmptyPredicate, StorageSort } from "@prisma/orm-framework/contract/hashing";
4
+ import { APP_SPACE_ID as APP_SPACE_ID$1, ContractSpace, ContractSpaceHeadRef, ContractSpaceHeadRef as ContractSpaceHeadRef$1 } from "@prisma/orm-framework/components/control";
5
5
  import { Contract } from "@prisma/orm-framework/contract/types";
6
6
  //#region ../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts
7
7
  //#region src/assert-descriptor-self-consistency.d.ts
@@ -412,4 +412,4 @@ declare const RESERVED_SPACE_SUBDIR_NAMES: ReadonlySet<string>;
412
412
  declare function spaceRefsDirectory(spaceMigrationsDir: string): string;
413
413
  //#endregion
414
414
  export { spaceMigrationDirectory as C, readContractSpaceHeadRef as S, contractSpaceFromJson as _, DescriptorSelfConsistencyInputs as a, isValidSpaceId as b, RESERVED_SPACE_SUBDIR_NAMES as c, SpacePlanInput as d, SpacePlanOutput as f, computeExtensionSpaceApplyPath as g, assertValidSpaceId as h, ContractSpaceHeadRef$1 as i, SPACE_REFS_DIRNAME as l, assertDescriptorSelfConsistency as m, ComputeExtensionSpaceApplyPathInputs as n, DiskContractSpaceState as o, ValidSpaceId as p, ContractSpaceArtifactInputs as r, ExtensionSpaceApplyPathOutcome as s, APP_SPACE_ID$1 as t, SpaceApplyInput as u, emitContractSpaceArtifacts as v, spaceRefsDirectory as w, planAllSpaces as x, gatherDiskContractSpaceState as y };
415
- //# sourceMappingURL=spaces-D5qtTlhj.d.mts.map
415
+ //# sourceMappingURL=spaces-tWQi7CUv.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spaces-D5qtTlhj.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC;WACA;WACA;;;;;;;;WAQA;WACA;WACA,sBAAsB;WACtB,cAAc;;;;;;;;;;;;;;;;;;;;;iBAqBR,gCAAgC,QAAQ;;;;;;;;;;;;;;;;iBAgBxC,yBAAyB,8BAA8B,kBAAkB,QAAQ;;;;;;;;;KAS7F;WACM;WACA,sBAAsB;;;;;;WAMtB;;;;;WAKA,SAAS;;;;;;WAMT;;WAEA;WACA,sBAAsB;;WAEtB;WACA,sBAAsB;WACtB;WACA;aACE;aACA;;;WAGF;;;;;;;;;;;;;UAaD;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBM,+BAA+B,QAAQ,uCAAuC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UAuB7F,gBAAgB;WACf;WACA;WACA;WACA;WACA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCT,sBAAsB,kBAAkB,WAAW,UAAU;WACnE;WACA,YAAY;aACV;aACA;aACA;;WAEF,SAAS;IAChB,cAAc;;;;;;;;;;;;;;;;;;;;;;;UAuBR;WACC;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBH,2BAA2B,8BAA8B,iBAAiB,QAAQ,8BAA8B;;;;;;;;;UASvH;;WAEC;;WAEA,iBAAiB,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAoB/B,6BAA6B;WACnC;;;;;;WAMA,gBAAgB;IACvB,QAAQ;;;;;;;;;;;;;;;;UAgBF,eAAe;WACd;WACA,eAAe;WACf,aAAa;;UAEd,gBAAgB;WACf;WACA,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BtB,cAAc,WAAW,UAAU,iBAAiB,eAAe,cAAc,YAAY,OAAO,eAAe,wBAAwB,sBAAsB,gBAAgB;;;;;;;;;;KAU7L;WACM;;iBAEM,eAAe,kBAAkB,WAAW;iBAC5C,mBAAmB,0BAA0B,WAAW;;;;;;;;;;;;;iBAaxD,wBAAwB,8BAA8B;;;;;;;;;cASzD;;;;;;;;cAQA,6BAA6B;;;;;;;iBAO1B,mBAAmB"}
1
+ {"version":3,"file":"spaces-tWQi7CUv.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/spaces.d.mts"],"mappings":";;;;;;;;;;;;;UAYU;WACC;WACA;WACA;;;;;;;;WAQA;WACA;WACA,sBAAsB;WACtB,cAAc;;;;;;;;;;;;;;;;;;;;;iBAqBR,gCAAgC,QAAQ;;;;;;;;;;;;;;;;iBAgBxC,yBAAyB,8BAA8B,kBAAkB,QAAQ;;;;;;;;;KAS7F;WACM;WACA,sBAAsB;;;;;;WAMtB;;;;;WAKA,SAAS;;;;;;WAMT;;WAEA;WACA,sBAAsB;;WAEtB;WACA,sBAAsB;WACtB;WACA;aACE;aACA;;;WAGF;;;;;;;;;;;;;UAaD;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBM,+BAA+B,QAAQ,uCAAuC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UAuB7F,gBAAgB;WACf;WACA;WACA;WACA;WACA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCT,sBAAsB,kBAAkB,WAAW,UAAU;WACnE;WACA,YAAY;aACV;aACA;aACA;;WAEF,SAAS;IAChB,cAAc;;;;;;;;;;;;;;;;;;;;;;;UAuBR;WACC;WACA;WACA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBH,2BAA2B,8BAA8B,iBAAiB,QAAQ,8BAA8B;;;;;;;;;UASvH;;WAEC;;WAEA,iBAAiB,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAoB/B,6BAA6B;WACnC;;;;;;WAMA,gBAAgB;IACvB,QAAQ;;;;;;;;;;;;;;;;UAgBF,eAAe;WACd;WACA,eAAe;WACf,aAAa;;UAEd,gBAAgB;WACf;WACA,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BtB,cAAc,WAAW,UAAU,iBAAiB,eAAe,cAAc,YAAY,OAAO,eAAe,wBAAwB,sBAAsB,gBAAgB;;;;;;;;;;KAU7L;WACM;;iBAEM,eAAe,kBAAkB,WAAW;iBAC5C,mBAAmB,0BAA0B,WAAW;;;;;;;;;;;;;iBAaxD,wBAAwB,8BAA8B;;;;;;;;;cASzD;;;;;;;;cAQA,6BAA6B;;;;;;;iBAO1B,mBAAmB"}
@@ -1,7 +1,8 @@
1
- import { $ as parseGlobalFlags, P as formatCommandHelp, Y as isCI$1, et as parseGlobalFlagsOrExit, o as createTerminalUI, ot as setCommandDescriptions, r as addGlobalOptions, st as setCommandExamples } from "./command-helpers-C4WpR-QE-DE494TSG.mjs";
2
- import { a as resolveGating, d as writeUserConfig, i as readUserConfig, u as userConfigPath } from "./exports-BN0vFTxG.mjs";
1
+ import { n as createTerminalUI } from "./terminal-ui-ypPE9cN6-ilMBkmwT.mjs";
2
+ import { f as parseGlobalFlags, i as formatCommandHelp, p as parseGlobalFlagsOrExit, t as addGlobalOptions, u as isCI$1, v as setCommandDescriptions, y as setCommandExamples } from "./command-helpers-bGYd7Aab-BNSzfbHK.mjs";
3
+ import { a as resolveGating, d as writeUserConfig, i as readUserConfig, u as userConfigPath } from "./exports-CqNUihkI.mjs";
3
4
  import { Command } from "commander";
4
- //#region ../../../1-framework/3-tooling/cli/dist/telemetry-DVBHDQd6.mjs
5
+ //#region ../../../1-framework/3-tooling/cli/dist/telemetry-Dh6e0ams.mjs
5
6
  /**
6
7
  * Resolves the same gate the runtime uses (CI check + `resolveGating`) and
7
8
  * projects it into a user-facing status. Pure read: never mints, never
@@ -117,4 +118,4 @@ function createTelemetryCommand() {
117
118
  //#endregion
118
119
  export { createTelemetryCommand as t };
119
120
 
120
- //# sourceMappingURL=telemetry-DVBHDQd6-Ckn5oClN.mjs.map
121
+ //# sourceMappingURL=telemetry-Dh6e0ams-BsjGN3tQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry-Dh6e0ams-BsjGN3tQ.mjs","names":["isCI"],"sources":["../../../../1-framework/3-tooling/cli/dist/telemetry-Dh6e0ams.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-ypPE9cN6.mjs\";\nimport { g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, t as addGlobalOptions, u as setCommandExamples, v as isCI, y as formatCommandHelp } from \"./command-helpers-bGYd7Aab.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());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