@prisma/orm-toolchain 8.0.0-rc.1-dev.23 → 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 (235) hide show
  1. package/dist/{aggregate-D53gnb7v.mjs → aggregate-BKbHUHLA.mjs} +7 -7
  2. package/dist/{aggregate-D53gnb7v.mjs.map → aggregate-BKbHUHLA.mjs.map} +1 -1
  3. package/dist/{aggregate-BflrjWPO.d.mts → aggregate-CA6bJ8UO.d.mts} +3 -3
  4. package/dist/{aggregate-BflrjWPO.d.mts.map → aggregate-CA6bJ8UO.d.mts.map} +1 -1
  5. package/dist/bin__prisma-next.mjs +31 -26
  6. package/dist/bin__prisma-next.mjs.map +1 -1
  7. package/dist/{caught-errors-D7Qznyrm-DaZubR00.mjs → caught-errors-nYuTn3NK-DkD-ZrDr.mjs} +3 -3
  8. package/dist/caught-errors-nYuTn3NK-DkD-ZrDr.mjs.map +1 -0
  9. package/dist/{cli-errors-BKPhkBSf-Ca-ymb6S.d.mts → cli-errors-C7vbvQuK-DLpSxz4U.d.mts} +15 -7
  10. package/dist/{cli-errors-BKPhkBSf-Ca-ymb6S.d.mts.map → cli-errors-C7vbvQuK-DLpSxz4U.d.mts.map} +1 -1
  11. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs +235 -0
  12. package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs.map +1 -0
  13. package/dist/cli-telemetry.mjs +2 -2
  14. package/dist/cli.d.mts +38 -2
  15. package/dist/cli.d.mts.map +1 -1
  16. package/dist/cli.mjs +358 -5
  17. package/dist/cli.mjs.map +1 -1
  18. package/dist/cli__commands__contract-emit.d.mts +1 -1
  19. package/dist/cli__commands__contract-emit.mjs +1 -1
  20. package/dist/cli__commands__contract-infer.mjs +1 -1
  21. package/dist/cli__commands__db-init.mjs +1 -1
  22. package/dist/cli__commands__db-schema.mjs +1 -1
  23. package/dist/cli__commands__db-sign.mjs +1 -1
  24. package/dist/cli__commands__db-update.mjs +1 -1
  25. package/dist/cli__commands__db-verify.mjs +1 -1
  26. package/dist/cli__commands__migrate.d.mts +2 -2
  27. package/dist/cli__commands__migrate.mjs +1 -1
  28. package/dist/cli__commands__migration-check.mjs +1 -1
  29. package/dist/cli__commands__migration-graph.d.mts +1 -1
  30. package/dist/cli__commands__migration-graph.mjs +1 -1
  31. package/dist/cli__commands__migration-list.d.mts +2 -2
  32. package/dist/cli__commands__migration-list.mjs +1 -1
  33. package/dist/cli__commands__migration-log.d.mts +1 -1
  34. package/dist/cli__commands__migration-log.mjs +1 -1
  35. package/dist/cli__commands__migration-new.mjs +1 -1
  36. package/dist/cli__commands__migration-plan.d.mts +1 -1
  37. package/dist/cli__commands__migration-plan.mjs +1 -1
  38. package/dist/cli__commands__migration-show.mjs +1 -1
  39. package/dist/cli__commands__migration-status.d.mts +1 -1
  40. package/dist/cli__commands__migration-status.mjs +1 -1
  41. package/dist/cli__commands__ref.mjs +1 -1
  42. package/dist/cli__commands__telemetry.mjs +1 -1
  43. package/dist/cli__control-api.d.mts +25 -18
  44. package/dist/cli__control-api.d.mts.map +1 -1
  45. package/dist/cli__control-api.mjs +16 -16
  46. package/dist/cli__control-api__testing.d.mts +1 -1
  47. package/dist/cli__control-api__testing.mjs +1 -1
  48. package/dist/cli__migration-cli.mjs +4 -4
  49. package/dist/{client-BNAEJZ76-ld7eOxpZ.mjs → client-milNsAnF-B92uF3yv.mjs} +11 -11
  50. package/dist/client-milNsAnF-B92uF3yv.mjs.map +1 -0
  51. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs +765 -0
  52. package/dist/command-helpers-bGYd7Aab-BNSzfbHK.mjs.map +1 -0
  53. package/dist/config-loader.d.mts +1 -1
  54. package/dist/config-loader.mjs +1 -1
  55. package/dist/{contract-at-errors-Dv1mxKYO-D4xfRBW5.mjs → contract-at-errors-BTeDEXm4-BAIDia2-.mjs} +3 -3
  56. package/dist/contract-at-errors-BTeDEXm4-BAIDia2-.mjs.map +1 -0
  57. package/dist/{contract-emit-DT0JKUZT-BYE7WZPc.mjs → contract-emit-Bdf4DAR4-lKqkbfZT.mjs} +8 -46
  58. package/dist/contract-emit-Bdf4DAR4-lKqkbfZT.mjs.map +1 -0
  59. package/dist/{contract-emit-DFu7h-Zl-7DBgYNv7.mjs → contract-emit-Ci-8sP-b-QzQXK2xQ.mjs} +26 -16
  60. package/dist/contract-emit-Ci-8sP-b-QzQXK2xQ.mjs.map +1 -0
  61. package/dist/{contract-emit-B65_UiFn.d.mts → contract-emit-CvwNE4R1-DEn1V1Zo.d.mts} +2 -2
  62. package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts.map +1 -0
  63. package/dist/contract-emit-E6m8HE42-Bfiodzf_.mjs +2 -0
  64. package/dist/{contract-infer-C_b7E71m-D2UO-X-k.mjs → contract-infer-hhyMJiwS-BJ5cYC9P.mjs} +7 -6
  65. package/dist/contract-infer-hhyMJiwS-BJ5cYC9P.mjs.map +1 -0
  66. package/dist/{contract-snapshot-resolution-SATuw0JW-DpTZJd1x.mjs → contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs} +7 -7
  67. package/dist/contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs.map +1 -0
  68. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs} +2 -2
  69. package/dist/{contract-snapshot-store-C9-J6OBn-ByElY0EC.mjs.map → contract-snapshot-store-C9-J6OBn-kpuB2oCK.mjs.map} +1 -1
  70. package/dist/{contract-space-aggregate-loader-C5r12INu-DfE0nmtZ.mjs → contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs} +7 -6
  71. package/dist/contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs.map +1 -0
  72. package/dist/{db-init-Cqjw5Flp.mjs → db-init-3CbSYxRI-BlTkWh8n.mjs} +10 -8
  73. package/dist/db-init-3CbSYxRI-BlTkWh8n.mjs.map +1 -0
  74. package/dist/{db-schema-CRGCFKlH.mjs → db-schema-BVLbe3EL-WLnbuo77.mjs} +6 -5
  75. package/dist/db-schema-BVLbe3EL-WLnbuo77.mjs.map +1 -0
  76. package/dist/{db-sign-BPQduGHb.mjs → db-sign-Cdw2RmoG-C-X5UheR.mjs} +12 -10
  77. package/dist/db-sign-Cdw2RmoG-C-X5UheR.mjs.map +1 -0
  78. package/dist/{db-update-DuEk-ra5.mjs → db-update-BHOdo8PV-BVBNKrJc.mjs} +11 -9
  79. package/dist/db-update-BHOdo8PV-BVBNKrJc.mjs.map +1 -0
  80. package/dist/{db-verify-DPH4lonK-pteoYVnK.mjs → db-verify-C9P9oNCs-gieY7hV2.mjs} +13 -11
  81. package/dist/db-verify-C9P9oNCs-gieY7hV2.mjs.map +1 -0
  82. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs} +2 -2
  83. package/dist/{domain-type-generation-bpSO3Y0L-Cdauqrnc.mjs.map → domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map} +1 -1
  84. package/dist/emitter.d.mts +1 -1
  85. package/dist/emitter.mjs +2 -2
  86. package/dist/emitter__domain-type-generation.mjs +1 -1
  87. package/dist/{exports-BCLg4CiV-okAfZydo.mjs → exports-BCLg4CiV-05kuwcb0.mjs} +4 -4
  88. package/dist/{exports-BCLg4CiV-okAfZydo.mjs.map → exports-BCLg4CiV-05kuwcb0.mjs.map} +1 -1
  89. package/dist/{exports-DVoyX2LM.mjs → exports-BZLNbtkY.mjs} +54 -12
  90. package/dist/exports-BZLNbtkY.mjs.map +1 -0
  91. package/dist/{exports-BN0vFTxG.mjs → exports-CqNUihkI.mjs} +2 -2
  92. package/dist/{exports-BN0vFTxG.mjs.map → exports-CqNUihkI.mjs.map} +1 -1
  93. package/dist/{exports-DAA3XD4a.mjs → exports-DaxzMVtq.mjs} +3 -3
  94. package/dist/{exports-DAA3XD4a.mjs.map → exports-DaxzMVtq.mjs.map} +1 -1
  95. package/dist/{format-DyVeO1z5-D1lnTJaz.mjs → format-Ddhz7xFW-Bo1nhay8.mjs} +18 -11
  96. package/dist/format-Ddhz7xFW-Bo1nhay8.mjs.map +1 -0
  97. package/dist/{framework-components-ioeTnj2Z-yyQtaVWk.mjs → framework-components-Cruf6BPK-CaQvMI3T.mjs} +3 -3
  98. package/dist/framework-components-Cruf6BPK-CaQvMI3T.mjs.map +1 -0
  99. package/dist/{index-Deu3DQZI.d.mts → index-mCsi_ND5.d.mts} +4 -2
  100. package/dist/index-mCsi_ND5.d.mts.map +1 -0
  101. package/dist/{init-BwYYd10C-CJq9i42m.mjs → init-BbmawfZx-DCylULYh.mjs} +23 -8
  102. package/dist/init-BbmawfZx-DCylULYh.mjs.map +1 -0
  103. package/dist/{inspect-live-schema-CXH4ZGHT-BfUdyZme.mjs → inspect-live-schema-BEQun_1x-CZpCgg8A.mjs} +7 -6
  104. package/dist/inspect-live-schema-BEQun_1x-CZpCgg8A.mjs.map +1 -0
  105. package/dist/{invariants-BzYfO9IL-BPDPDIr0.mjs → invariants-D5TNnX5E-rjPoJGFq.mjs} +4 -3
  106. package/dist/invariants-D5TNnX5E-rjPoJGFq.mjs.map +1 -0
  107. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs → io-CHUUeHh0-CbyTkKP6.mjs} +2 -2
  108. package/dist/{io-CHUUeHh0-CoCBe9eN.mjs.map → io-CHUUeHh0-CbyTkKP6.mjs.map} +1 -1
  109. package/dist/{legend-5iwwlLU2-Bit8enjF.mjs → legend-BBtAETiW-BHqTbUjx.mjs} +3 -3
  110. package/dist/legend-BBtAETiW-BHqTbUjx.mjs.map +1 -0
  111. package/dist/{migrate-Bfsw18KQ.mjs → migrate-B-hpVTxi-DJzFYT2w.mjs} +32 -16
  112. package/dist/migrate-B-hpVTxi-DJzFYT2w.mjs.map +1 -0
  113. package/dist/{migrate-show-CO5OiR3J-DE4NIjvW.mjs → migrate-show-CUymfnbM-BbpcO2FY.mjs} +9 -23
  114. package/dist/migrate-show-CUymfnbM-BbpcO2FY.mjs.map +1 -0
  115. package/dist/{migrate-show-Cu3k9mZm-B-nCgvK1.d.mts → migrate-show-g71Z4vJw-ocdTvf70.d.mts} +10 -5
  116. package/dist/migrate-show-g71Z4vJw-ocdTvf70.d.mts.map +1 -0
  117. package/dist/{migration-DAJY-NmR.mjs → migration-_C5W2uXF.mjs} +2 -2
  118. package/dist/{migration-DAJY-NmR.mjs.map → migration-_C5W2uXF.mjs.map} +1 -1
  119. package/dist/{migration-check-DONPyXff-KpD0q3Zh.mjs → migration-check-DHYPMUFe-Cni_ZUzB.mjs} +33 -30
  120. package/dist/migration-check-DHYPMUFe-Cni_ZUzB.mjs.map +1 -0
  121. package/dist/{migration-check-BfOnfgyY-DII6Ty5m.mjs → migration-check-zgqYe3SB-B6LI6wY7.mjs} +9 -8
  122. package/dist/migration-check-zgqYe3SB-B6LI6wY7.mjs.map +1 -0
  123. package/dist/{migration-command-scaffold-CGcbYM2B-C3B8S3c-.mjs → migration-command-scaffold-DsT7ke7B-D3u913Po.mjs} +7 -6
  124. package/dist/migration-command-scaffold-DsT7ke7B-D3u913Po.mjs.map +1 -0
  125. package/dist/{migration-graph-HKch1Xk4-DD-3zdSg.mjs → migration-graph-CChCjts3-ERrIm5aT.mjs} +3 -3
  126. package/dist/{migration-graph-HKch1Xk4-DD-3zdSg.mjs.map → migration-graph-CChCjts3-ERrIm5aT.mjs.map} +1 -1
  127. package/dist/{migration-graph-BHiSuhBR.mjs → migration-graph-Dm9gU0oE-DxPD_SNA.mjs} +10 -9
  128. package/dist/migration-graph-Dm9gU0oE-DxPD_SNA.mjs.map +1 -0
  129. package/dist/{migration-list-C9OPCMt--BBm2c7tN.mjs → migration-list-Bkase_ZM-D-bErpSr.mjs} +4 -4
  130. package/dist/migration-list-Bkase_ZM-D-bErpSr.mjs.map +1 -0
  131. package/dist/{migration-list-BkTNEeOK.mjs → migration-list-DDGUTC8Y-B_X7rkez.mjs} +9 -8
  132. package/dist/migration-list-DDGUTC8Y-B_X7rkez.mjs.map +1 -0
  133. package/dist/{migration-log-CqrwQXER-cqf2INDN.mjs → migration-log-Cft50PRu-DcnHdxT4.mjs} +9 -7
  134. package/dist/migration-log-Cft50PRu-DcnHdxT4.mjs.map +1 -0
  135. package/dist/{migration-new-NuMfcbH8.mjs → migration-new-D9GHbYwF-C8D22HXG.mjs} +25 -5
  136. package/dist/migration-new-D9GHbYwF-C8D22HXG.mjs.map +1 -0
  137. package/dist/{migration-new-Cjhe_MIE-CIovsuXK.mjs → migration-new-RorO1I8r-Ch8NQ4GQ.mjs} +19 -27
  138. package/dist/migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map +1 -0
  139. package/dist/{migration-path-target-BPYp3LNc-DjdEIQsZ.mjs → migration-path-target-DhGt62Mi-dm4TU1hJ.mjs} +4 -4
  140. package/dist/migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map +1 -0
  141. package/dist/{migration-plan-D81XmVwy.mjs → migration-plan-BOhasCLr-GJWYoOA8.mjs} +25 -5
  142. package/dist/migration-plan-BOhasCLr-GJWYoOA8.mjs.map +1 -0
  143. package/dist/{migration-plan-DE7-vtqT-jgtSH4Lw.mjs → migration-plan-DrCTzrXH-CDJbdiC6.mjs} +29 -37
  144. package/dist/migration-plan-DrCTzrXH-CDJbdiC6.mjs.map +1 -0
  145. package/dist/{migration-plan-DvBJhxXg-B5aHAOtu.d.mts → migration-plan-t2e_8yD2-w5Ffa0V_.d.mts} +10 -5
  146. package/dist/migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map +1 -0
  147. package/dist/{migration-show-DEsLJ6-a.mjs → migration-show-DRARjIbv-1p6EE_Uw.mjs} +13 -11
  148. package/dist/migration-show-DRARjIbv-1p6EE_Uw.mjs.map +1 -0
  149. package/dist/{migration-status-DfLM3VqL.mjs → migration-status-Yh0eOQJN-YpcPDpNh.mjs} +14 -12
  150. package/dist/migration-status-Yh0eOQJN-YpcPDpNh.mjs.map +1 -0
  151. package/dist/migration-tools.d.mts +2 -2
  152. package/dist/migration-tools.mjs +8 -8
  153. package/dist/migration-tools__aggregate.d.mts +1 -1
  154. package/dist/migration-tools__aggregate.mjs +1 -1
  155. package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
  156. package/dist/migration-tools__io.mjs +1 -1
  157. package/dist/migration-tools__migration-ts.mjs +1 -1
  158. package/dist/migration-tools__migration.mjs +1 -1
  159. package/dist/migration-tools__spaces.d.mts +1 -1
  160. package/dist/migration-tools__spaces.mjs +2 -2
  161. package/dist/{migration-ts-FyF55c4M.mjs → migration-ts-BoHxxGvi.mjs} +2 -2
  162. package/dist/{migration-ts-FyF55c4M.mjs.map → migration-ts-BoHxxGvi.mjs.map} +1 -1
  163. package/dist/{project-import-root-C_bd0ooL-CusfluWF.mjs → project-import-root--e8xli8Z-Bfrvrv67.mjs} +3 -3
  164. package/dist/project-import-root--e8xli8Z-Bfrvrv67.mjs.map +1 -0
  165. package/dist/{ref-DrAvdDhN-q1ccuI03.mjs → ref-BQcl8Ksv-BYZY0Ktb.mjs} +12 -28
  166. package/dist/ref-BQcl8Ksv-BYZY0Ktb.mjs.map +1 -0
  167. package/dist/{ref-D6JzE8nq.mjs → ref-Cu7Zc1Hv-_R4MnDfr.mjs} +30 -7
  168. package/dist/ref-Cu7Zc1Hv-_R4MnDfr.mjs.map +1 -0
  169. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs} +3 -3
  170. package/dist/{ref-advancement-DaZBzm7m-BZQtedYC.mjs.map → ref-advancement-DaZBzm7m-Deq5Cs7O.mjs.map} +1 -1
  171. package/dist/{ref-resolution-_S4xTT2L-JfNjZU9d.mjs → ref-resolution-BYCRg72z-DFhwf-XR.mjs} +3 -3
  172. package/dist/ref-resolution-BYCRg72z-DFhwf-XR.mjs.map +1 -0
  173. package/dist/{spaces-DxuvClN9.mjs → spaces-DBTCE3Js.mjs} +6 -6
  174. package/dist/{spaces-DxuvClN9.mjs.map → spaces-DBTCE3Js.mjs.map} +1 -1
  175. package/dist/{spaces-D5qtTlhj.d.mts → spaces-tWQi7CUv.d.mts} +2 -2
  176. package/dist/{spaces-D5qtTlhj.d.mts.map → spaces-tWQi7CUv.d.mts.map} +1 -1
  177. package/dist/{telemetry-DVBHDQd6-CWNTFnMO.mjs → telemetry-Dh6e0ams-BsjGN3tQ.mjs} +5 -4
  178. package/dist/telemetry-Dh6e0ams-BsjGN3tQ.mjs.map +1 -0
  179. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs +645 -0
  180. package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs.map +1 -0
  181. package/dist/{verify-C6L_hiJU-MX67LFfI.mjs → verify-DBsKxZrK-eDPxNiSS.mjs} +3 -3
  182. package/dist/verify-DBsKxZrK-eDPxNiSS.mjs.map +1 -0
  183. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs} +2 -2
  184. package/dist/{verify-contract-spaces-WvjSiWcB-zGhaCnfs.mjs.map → verify-contract-spaces-WvjSiWcB-DZPPCwWO.mjs.map} +1 -1
  185. package/dist/vite-plugin-contract-emit.mjs +13 -3
  186. package/dist/vite-plugin-contract-emit.mjs.map +1 -1
  187. package/package.json +13 -12
  188. package/dist/caught-errors-D7Qznyrm-DaZubR00.mjs.map +0 -1
  189. package/dist/client-BNAEJZ76-ld7eOxpZ.mjs.map +0 -1
  190. package/dist/command-helpers-C4WpR-QE-DNllqff1.mjs +0 -1627
  191. package/dist/command-helpers-C4WpR-QE-DNllqff1.mjs.map +0 -1
  192. package/dist/contract-at-errors-Dv1mxKYO-D4xfRBW5.mjs.map +0 -1
  193. package/dist/contract-emit-B65_UiFn.d.mts.map +0 -1
  194. package/dist/contract-emit-DFu7h-Zl-7DBgYNv7.mjs.map +0 -1
  195. package/dist/contract-emit-DT0JKUZT-BYE7WZPc.mjs.map +0 -1
  196. package/dist/contract-infer-C_b7E71m-D2UO-X-k.mjs.map +0 -1
  197. package/dist/contract-snapshot-resolution-SATuw0JW-DpTZJd1x.mjs.map +0 -1
  198. package/dist/contract-space-aggregate-loader-C5r12INu-DfE0nmtZ.mjs.map +0 -1
  199. package/dist/db-init-Cqjw5Flp.mjs.map +0 -1
  200. package/dist/db-schema-CRGCFKlH.mjs.map +0 -1
  201. package/dist/db-sign-BPQduGHb.mjs.map +0 -1
  202. package/dist/db-update-DuEk-ra5.mjs.map +0 -1
  203. package/dist/db-verify-DPH4lonK-pteoYVnK.mjs.map +0 -1
  204. package/dist/exports-DVoyX2LM.mjs.map +0 -1
  205. package/dist/format-DyVeO1z5-D1lnTJaz.mjs.map +0 -1
  206. package/dist/framework-components-ioeTnj2Z-yyQtaVWk.mjs.map +0 -1
  207. package/dist/index-Deu3DQZI.d.mts.map +0 -1
  208. package/dist/init-BwYYd10C-CJq9i42m.mjs.map +0 -1
  209. package/dist/inspect-live-schema-CXH4ZGHT-BfUdyZme.mjs.map +0 -1
  210. package/dist/invariants-BzYfO9IL-BPDPDIr0.mjs.map +0 -1
  211. package/dist/legend-5iwwlLU2-Bit8enjF.mjs.map +0 -1
  212. package/dist/migrate-Bfsw18KQ.mjs.map +0 -1
  213. package/dist/migrate-show-CO5OiR3J-DE4NIjvW.mjs.map +0 -1
  214. package/dist/migrate-show-Cu3k9mZm-B-nCgvK1.d.mts.map +0 -1
  215. package/dist/migration-check-BfOnfgyY-DII6Ty5m.mjs.map +0 -1
  216. package/dist/migration-check-DONPyXff-KpD0q3Zh.mjs.map +0 -1
  217. package/dist/migration-command-scaffold-CGcbYM2B-C3B8S3c-.mjs.map +0 -1
  218. package/dist/migration-graph-BHiSuhBR.mjs.map +0 -1
  219. package/dist/migration-list-BkTNEeOK.mjs.map +0 -1
  220. package/dist/migration-list-C9OPCMt--BBm2c7tN.mjs.map +0 -1
  221. package/dist/migration-log-CqrwQXER-cqf2INDN.mjs.map +0 -1
  222. package/dist/migration-new-Cjhe_MIE-CIovsuXK.mjs.map +0 -1
  223. package/dist/migration-new-NuMfcbH8.mjs.map +0 -1
  224. package/dist/migration-path-target-BPYp3LNc-DjdEIQsZ.mjs.map +0 -1
  225. package/dist/migration-plan-D81XmVwy.mjs.map +0 -1
  226. package/dist/migration-plan-DE7-vtqT-jgtSH4Lw.mjs.map +0 -1
  227. package/dist/migration-plan-DvBJhxXg-B5aHAOtu.d.mts.map +0 -1
  228. package/dist/migration-show-DEsLJ6-a.mjs.map +0 -1
  229. package/dist/migration-status-DfLM3VqL.mjs.map +0 -1
  230. package/dist/project-import-root-C_bd0ooL-CusfluWF.mjs.map +0 -1
  231. package/dist/ref-D6JzE8nq.mjs.map +0 -1
  232. package/dist/ref-DrAvdDhN-q1ccuI03.mjs.map +0 -1
  233. package/dist/ref-resolution-_S4xTT2L-JfNjZU9d.mjs.map +0 -1
  234. package/dist/telemetry-DVBHDQd6-CWNTFnMO.mjs.map +0 -1
  235. package/dist/verify-C6L_hiJU-MX67LFfI.mjs.map +0 -1
package/dist/cli.d.mts CHANGED
@@ -1,6 +1,8 @@
1
- import { t as createContractEmitCommand } from "./contract-emit-B65_UiFn.mjs";
1
+ import { t as createContractEmitCommand } from "./contract-emit-CvwNE4R1-DEn1V1Zo.mjs";
2
2
  import { Command } from "commander";
3
+ import { PrismaNextConfig } from "@prisma/orm-framework/config/config-types";
3
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
+ import { LoadedConfig } from "@prisma/cli-engine";
4
6
  //#region ../../../1-framework/3-tooling/cli/dist/exports/index.d.mts
5
7
  //#region src/commands/format.d.ts
6
8
  declare function createFormatCommand(): Command;
@@ -27,5 +29,39 @@ interface LoadTsContractOptions {
27
29
  */
28
30
  declare function loadContractFromTs(entryPath: string, options?: LoadTsContractOptions): Promise<Contract>;
29
31
  //#endregion
30
- export { type LoadTsContractOptions, createContractEmitCommand, createFormatCommand, loadContractFromTs };
32
+ //#region src/orm/config-section.d.ts
33
+ declare const ormConfigSection: import("@prisma/cli-engine").ConfigSection<PrismaNextConfig<string, string, unknown>>;
34
+ //#endregion
35
+ //#region src/orm/family.d.ts
36
+ /**
37
+ * The unit the ORM contributes to a CLI: its config section, its commands by
38
+ * name, and where its diagnostics are documented. The shell owns the command
39
+ * tree, so nothing here says where a command mounts.
40
+ */
41
+ declare const ormCommandFamily: import("@prisma/cli-engine").CommandFamily;
42
+ //#endregion
43
+ //#region src/orm/load-config.d.ts
44
+ interface LoadOrmConfigOptions {
45
+ /** Where the CLI was invoked. Config discovery starts and ends here. */
46
+ readonly cwd: string;
47
+ /** A non-default config file, resolved against `cwd` when relative. */
48
+ readonly configPath?: string;
49
+ }
50
+ /**
51
+ * Builds the engine's `Runtime.config` from `prisma-next.config.ts`.
52
+ *
53
+ * The engine's own loader reads `prisma.config.ts` and the `$prismaConfig`
54
+ * marker, which is not the file this bin reads, so the bin owns the load: the
55
+ * ORM's c12 loader evaluates the module asynchronously and finalizes paths
56
+ * against the config file's own directory. The whole result nests as the
57
+ * single `orm` section — the engine models one section per family, and
58
+ * `contract`, `db`, `migrations` and the rest are subsections of it.
59
+ *
60
+ * Only failures that prevent evaluation entirely are diagnostics here, and
61
+ * they carry `section: null` so they fail exactly the commands that read
62
+ * config. Structural verdicts belong to the section validator.
63
+ */
64
+ declare function loadOrmConfig(options: LoadOrmConfigOptions): Promise<LoadedConfig>;
65
+ //#endregion
66
+ export { type LoadOrmConfigOptions, type LoadTsContractOptions, createContractEmitCommand, createFormatCommand, loadContractFromTs, loadOrmConfig, ormCommandFamily, ormConfigSection };
31
67
  //# sourceMappingURL=cli.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/index.d.mts"],"mappings":";;;;;iBAIiB,uBAAuB;;;UAG9B;WACC,YAAY;;;;;;;;;;;;;;;;;;iBAkBN,mBAAmB,mBAAmB,UAAU,wBAAwB,QAAQ"}
1
+ {"version":3,"file":"cli.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/index.d.mts"],"mappings":";;;;;;;iBAMiB,uBAAuB;;;UAG9B;WACC,YAAY;;;;;;;;;;;;;;;;;;iBAkBN,mBAAmB,mBAAmB,UAAU,wBAAwB,QAAQ;;;cAGnF,+CAA+C,cAAc;;;;;;;;cAQ7D,+CAA+C;;;UAGnD;;WAEC;;WAEA;;;;;;;;;;;;;;;;iBAgBM,cAAc,SAAS,uBAAuB,QAAQ"}
package/dist/cli.mjs CHANGED
@@ -1,12 +1,365 @@
1
- import { t as createContractEmitCommand } from "./contract-emit-DFu7h-Zl-7DBgYNv7.mjs";
2
- import { t as createFormatCommand } from "./format-DyVeO1z5-D1lnTJaz.mjs";
1
+ import { i as loadConfig } from "./exports-BZLNbtkY.mjs";
2
+ import { r as getEmittedArtifactPaths } from "./exports-BCLg4CiV-05kuwcb0.mjs";
3
+ import { t as createContractEmitCommand } from "./contract-emit-Ci-8sP-b-QzQXK2xQ.mjs";
4
+ import { t as createFormatCommand } from "./format-Ddhz7xFW-Bo1nhay8.mjs";
5
+ import { r as buildReadAggregate } from "./contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs";
6
+ import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from "./migration-list-Bkase_ZM-D-bErpSr.mjs";
7
+ import { g as renderMigrationGraphLegend, l as createAnsiMigrationListStyler, v as renderMigrationListWithStyle } from "./migration-graph-command-render-BKrg6BPv-BP8Pfj4J.mjs";
3
8
  import { CliStructuredError } from "@prisma/orm-framework/errors/control";
4
- import { join, resolve } from "pathe";
5
- import { InternalError } from "@prisma/orm-framework/utils/internal-error";
9
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
10
+ import { join, normalize, resolve } from "pathe";
6
11
  import { existsSync, unlinkSync, writeFileSync } from "node:fs";
12
+ import { DOCS_BASE, isStructuredError } from "@prisma/orm-framework/utils/structured-error";
13
+ import { blindCast } from "@prisma/orm-framework/utils/casts";
14
+ import { InternalError } from "@prisma/orm-framework/utils/internal-error";
15
+ import { collectConfigIssues } from "@prisma/orm-framework/config/config-validation";
7
16
  import { tmpdir } from "node:os";
17
+ import { defineCommand, defineCommandFamily, defineConfigSection, flag } from "@prisma/cli-engine";
18
+ import { CliStructuredError as CliStructuredError$1, notOk, ok } from "@prisma/cli-engine/protocol";
8
19
  import { pathToFileURL } from "node:url";
9
20
  import { build } from "esbuild";
21
+ //#region ../../../1-framework/3-tooling/cli/dist/load-config-Aw9VS_dF.mjs
22
+ const MISSING_CONFIG_ACTION = {
23
+ kind: "run-command",
24
+ label: "Create a configuration file",
25
+ command: "prisma-next init"
26
+ };
27
+ function editConfigAction(field) {
28
+ return {
29
+ kind: "edit-file",
30
+ label: `Correct ${field} in prisma-next.config.ts`
31
+ };
32
+ }
33
+ function issueDiagnostic(issue) {
34
+ return {
35
+ code: "CONFIG.VALIDATION_FAILED",
36
+ severity: "error",
37
+ summary: issue.message,
38
+ why: issue.message,
39
+ nextActions: [editConfigAction(issue.field)],
40
+ meta: {
41
+ field: issue.field,
42
+ section: issue.section
43
+ }
44
+ };
45
+ }
46
+ function sectionAbsentDiagnostic() {
47
+ return {
48
+ code: "CONFIG.FILE_NOT_FOUND",
49
+ severity: "error",
50
+ summary: "No Prisma Next configuration was loaded",
51
+ why: `The orm config section is absent, so prisma-next.config.ts was never evaluated.`,
52
+ nextActions: [MISSING_CONFIG_ACTION]
53
+ };
54
+ }
55
+ function notAnObjectDiagnostic() {
56
+ return {
57
+ code: "CONFIG.VALIDATION_FAILED",
58
+ severity: "error",
59
+ summary: "Prisma Next configuration must be an object",
60
+ why: `The orm config section is not an object, so no section can be read from it.`,
61
+ nextActions: [{
62
+ kind: "edit-file",
63
+ label: "Export a configuration object from prisma-next.config.ts"
64
+ }]
65
+ };
66
+ }
67
+ function unreadableDiagnostic(error) {
68
+ return {
69
+ code: "CONFIG.VALIDATION_FAILED",
70
+ severity: "error",
71
+ summary: "Prisma Next configuration could not be inspected",
72
+ why: error instanceof Error ? error.message : String(error),
73
+ nextActions: [{
74
+ kind: "edit-file",
75
+ label: "Export a plain configuration object from prisma-next.config.ts"
76
+ }]
77
+ };
78
+ }
79
+ function isRecord(value) {
80
+ return typeof value === "object" && value !== null && !Array.isArray(value);
81
+ }
82
+ /**
83
+ * An emitted artifact listed as its own contract input makes every emit
84
+ * consume its previous output. Structural, filesystem-free, and therefore the
85
+ * section validator's business rather than the loader's.
86
+ */
87
+ function collectArtifactCollisionIssues(raw) {
88
+ const contract = raw["contract"];
89
+ if (!isRecord(contract)) return [];
90
+ const source = contract["source"];
91
+ const output = contract["output"];
92
+ if (!isRecord(source) || typeof output !== "string") return [];
93
+ const inputs = source["inputs"];
94
+ if (!Array.isArray(inputs)) return [];
95
+ let emitted;
96
+ try {
97
+ emitted = getEmittedArtifactPaths(output);
98
+ } catch (error) {
99
+ return [{
100
+ section: "contract",
101
+ field: "contract.output",
102
+ message: error instanceof Error ? error.message : String(error)
103
+ }];
104
+ }
105
+ const emittedPaths = /* @__PURE__ */ new Set([normalize(emitted.jsonPath), normalize(emitted.dtsPath)]);
106
+ if (!inputs.some((input) => typeof input === "string" && emittedPaths.has(normalize(input)))) return [];
107
+ return [{
108
+ section: "contract",
109
+ field: "contract.source.inputs[]",
110
+ message: "Config.contract.source.inputs must not include emitted artifact paths derived from contract.output"
111
+ }];
112
+ }
113
+ function validate(raw) {
114
+ if (raw === void 0) return {
115
+ ok: false,
116
+ diagnostics: [sectionAbsentDiagnostic()]
117
+ };
118
+ if (!isRecord(raw)) return {
119
+ ok: false,
120
+ diagnostics: [notAnObjectDiagnostic()]
121
+ };
122
+ let issues;
123
+ try {
124
+ issues = [...collectConfigIssues(raw), ...collectArtifactCollisionIssues(raw)];
125
+ } catch (error) {
126
+ return {
127
+ ok: false,
128
+ diagnostics: [unreadableDiagnostic(error)]
129
+ };
130
+ }
131
+ if (issues.length > 0) return {
132
+ ok: false,
133
+ diagnostics: issues.map(issueDiagnostic)
134
+ };
135
+ return {
136
+ ok: true,
137
+ value: blindCast(raw),
138
+ diagnostics: []
139
+ };
140
+ }
141
+ const ormConfigSection = defineConfigSection({
142
+ name: "orm",
143
+ validate
144
+ });
145
+ /**
146
+ * `isStructuredError` is the repo's own check, and it is the one that matters here: it holds the
147
+ * regular expression for a dotted `NAMESPACE.SUBCODE`, so only a code the protocol accepts
148
+ * reaches `Diagnostic['code']`.
149
+ */
150
+ function isRaisedError(error) {
151
+ return error instanceof Error && isStructuredError(error);
152
+ }
153
+ /**
154
+ * The fallback for anything that is not a structured error: a bare throw, and also an error whose
155
+ * `code` is not a dotted one — a Node `ENOENT`, say. The rejected code survives in `meta` rather
156
+ * than in `code`, where it would produce a docs link to a page that does not exist.
157
+ */
158
+ function toUnexpected(error) {
159
+ const summary = error instanceof Error ? error.message : String(error);
160
+ const rejectedCode = error instanceof Error ? Reflect.get(error, "code") : void 0;
161
+ return new CliStructuredError$1("CLI.UNEXPECTED", summary, {
162
+ ...ifDefined("meta", typeof rejectedCode === "string" ? { code: rejectedCode } : void 0),
163
+ cause: error
164
+ });
165
+ }
166
+ /**
167
+ * Both classes name themselves `CliStructuredError`, so the engine's duck test
168
+ * accepts prisma/prisma's too. What actually separates them is `nextActions`:
169
+ * the engine's constructor always sets it, prisma/prisma's never does.
170
+ */
171
+ function conformsToProtocol(error) {
172
+ return CliStructuredError$1.is(error) && Array.isArray(error.nextActions);
173
+ }
174
+ /**
175
+ * Turns the transitional `fix` prose into typed actions. A multi-line fix is
176
+ * several pieces of advice, so it becomes one action per line.
177
+ */
178
+ function actionsFromFix(fix) {
179
+ if (fix === void 0) return [];
180
+ return fix.split("\n").map((line) => line.trim()).filter((line) => line.length > 0).map((label) => ({
181
+ kind: "user-choice",
182
+ label
183
+ }));
184
+ }
185
+ /**
186
+ * Projects a prisma/prisma-raised error onto the engine's diagnostic shape.
187
+ */
188
+ function toEngineDiagnostic(error) {
189
+ return {
190
+ code: error.code,
191
+ severity: error.severity ?? "error",
192
+ summary: error.message,
193
+ ...ifDefined("why", error.why),
194
+ nextActions: actionsFromFix(error.fix),
195
+ ...ifDefined("where", error.where),
196
+ ...ifDefined("meta", error.meta),
197
+ ...ifDefined("docsUrl", error.docsUrl)
198
+ };
199
+ }
200
+ /**
201
+ * The handler boundary's single conversion. Handlers pass every error they
202
+ * return through `notOk` — and every error a top-of-handler catch sees —
203
+ * through this, so a settled envelope always carries `nextActions` and never
204
+ * the non-protocol `fix` field.
205
+ */
206
+ function normalizeError(error) {
207
+ if (conformsToProtocol(error)) return error;
208
+ if (!isRaisedError(error)) return toUnexpected(error);
209
+ const diagnostic = toEngineDiagnostic(error);
210
+ return new CliStructuredError$1(diagnostic.code, diagnostic.summary, {
211
+ severity: diagnostic.severity,
212
+ nextActions: diagnostic.nextActions,
213
+ ...ifDefined("why", diagnostic.why),
214
+ ...ifDefined("where", diagnostic.where),
215
+ ...ifDefined("meta", diagnostic.meta),
216
+ ...ifDefined("docsUrl", diagnostic.docsUrl),
217
+ cause: error
218
+ });
219
+ }
220
+ /**
221
+ * `defineCommand` with the ORM's error boundary already attached. Every ORM command is defined
222
+ * through this rather than through `defineCommand` directly.
223
+ *
224
+ * Without it, an error a handler throws reaches the engine, whose duck test accepts
225
+ * prisma/prisma's `CliStructuredError` — both classes carry that name — and then settles it
226
+ * through fields the engine's own class has and this one does not. The envelope that results is
227
+ * off-protocol. Catching here means every handler settles through the single conversion instead.
228
+ */
229
+ function defineOrmCommand(def) {
230
+ return defineCommand({
231
+ ...def,
232
+ handler: async (args, ctx) => {
233
+ try {
234
+ return await def.handler(args, ctx);
235
+ } catch (error) {
236
+ return notOk(normalizeError(error));
237
+ }
238
+ }
239
+ });
240
+ }
241
+ /**
242
+ * Where migrations live for this project. Resolved against the invocation
243
+ * directory, which is also the config file's directory for every default
244
+ * invocation.
245
+ */
246
+ function migrationsDirFor(config, cwd) {
247
+ return resolve(cwd, config.migrations?.dir ?? "migrations");
248
+ }
249
+ function listPresentations(inputs) {
250
+ return {
251
+ human: () => [{
252
+ kind: "fields",
253
+ rows: [{
254
+ label: "migrations",
255
+ value: inputs.migrationsDir
256
+ }, ...inputs.space === void 0 ? [] : [{
257
+ label: "space",
258
+ value: inputs.space
259
+ }]]
260
+ }, ...inputs.legendLines.length === 0 ? [] : [{
261
+ kind: "list",
262
+ items: [...inputs.legendLines]
263
+ }]],
264
+ stdout: () => inputs.lines,
265
+ json: () => inputs.list
266
+ };
267
+ }
268
+ const migrationListCommand = defineOrmCommand({
269
+ help: {
270
+ summary: "List on-disk migrations per contract space",
271
+ description: "Enumerates every on-disk migration under migrations/<space>/ for every\ncontract space found on disk. Offline — does not consult the database.\nHuman output draws the shared migration graph tree with operation counts,\ninvariants on each migration row, and refs on destination contract nodes.\nPass --space <id> to narrow to one contract space. --ascii forces ASCII\ntree glyphs.",
272
+ examples: [
273
+ "migration list",
274
+ "migration list --space app",
275
+ "migration list --ascii",
276
+ "migration list --legend",
277
+ "migration list --json"
278
+ ]
279
+ },
280
+ args: { flags: {
281
+ space: flag.string({
282
+ brief: "Narrow output to a single contract space",
283
+ placeholder: "id"
284
+ }),
285
+ ascii: flag.boolean({ brief: "Use ASCII kind glyphs (pipe-friendly)" }),
286
+ legend: flag.boolean({ brief: "Print a key for the tree glyphs and lane colors" })
287
+ } },
288
+ needs: { config: ormConfigSection },
289
+ handler: async (args, ctx) => {
290
+ const migrationsDir = migrationsDirFor(ctx.config, ctx.cwd);
291
+ const loaded = await buildReadAggregate(ctx.config, { migrationsDir });
292
+ if (!loaded.ok) return notOk(normalizeError(loaded.failure));
293
+ const { aggregate, contractHash: liveContractHash } = loaded.value;
294
+ const listed = runMigrationList({
295
+ spaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),
296
+ ...ifDefined("spaceFilter", args.flags.space)
297
+ });
298
+ if (!listed.ok) return notOk(normalizeError(listed.failure));
299
+ const glyphMode = args.flags.ascii ? "ascii" : "unicode";
300
+ const lines = renderMigrationListWithStyle(listed.value, createAnsiMigrationListStyler({ useColor: false }), glyphMode, {
301
+ colorize: false,
302
+ liveContractHash,
303
+ graphForSpace: (spaceId) => aggregate.space(spaceId)?.graph(),
304
+ appSpaceId: aggregate.app.spaceId
305
+ }).split("\n");
306
+ const legendLines = args.flags.legend ? renderMigrationGraphLegend({
307
+ colorize: false,
308
+ glyphMode
309
+ }).split("\n") : [];
310
+ return ok(ctx.present({ data: listed.value }, listPresentations({
311
+ list: listed.value,
312
+ lines,
313
+ migrationsDir,
314
+ space: args.flags.space,
315
+ legendLines
316
+ })));
317
+ }
318
+ });
319
+ /**
320
+ * The engine derives each diagnostic's docs link from this base plus the
321
+ * dotted code.
322
+ */
323
+ const DOCS_BASE_URL = `${DOCS_BASE}/`;
324
+ /**
325
+ * The unit the ORM contributes to a CLI: its config section, its commands by
326
+ * name, and where its diagnostics are documented. The shell owns the command
327
+ * tree, so nothing here says where a command mounts.
328
+ */
329
+ const ormCommandFamily = defineCommandFamily({
330
+ configSection: ormConfigSection,
331
+ commands: { "migration list": migrationListCommand },
332
+ docsBaseUrl: DOCS_BASE_URL
333
+ });
334
+ /**
335
+ * Builds the engine's `Runtime.config` from `prisma-next.config.ts`.
336
+ *
337
+ * The engine's own loader reads `prisma.config.ts` and the `$prismaConfig`
338
+ * marker, which is not the file this bin reads, so the bin owns the load: the
339
+ * ORM's c12 loader evaluates the module asynchronously and finalizes paths
340
+ * against the config file's own directory. The whole result nests as the
341
+ * single `orm` section — the engine models one section per family, and
342
+ * `contract`, `db`, `migrations` and the rest are subsections of it.
343
+ *
344
+ * Only failures that prevent evaluation entirely are diagnostics here, and
345
+ * they carry `section: null` so they fail exactly the commands that read
346
+ * config. Structural verdicts belong to the section validator.
347
+ */
348
+ async function loadOrmConfig(options) {
349
+ const loaded = await loadConfig(options.configPath, { cwd: options.cwd });
350
+ if (!loaded.ok) return {
351
+ sections: {},
352
+ diagnostics: [{
353
+ section: null,
354
+ diagnostic: toEngineDiagnostic(loaded.failure)
355
+ }]
356
+ };
357
+ return {
358
+ sections: { ["orm"]: loaded.value.config },
359
+ diagnostics: []
360
+ };
361
+ }
362
+ //#endregion
10
363
  //#region ../../../1-framework/3-tooling/cli/dist/exports/index.mjs
11
364
  function contractSourceError(code, message, options) {
12
365
  const error = new CliStructuredError(code, message, options?.meta !== void 0 ? { meta: options.meta } : void 0);
@@ -175,6 +528,6 @@ async function loadContractFromTs(entryPath, options) {
175
528
  }
176
529
  }
177
530
  //#endregion
178
- export { createContractEmitCommand, createFormatCommand, loadContractFromTs };
531
+ export { createContractEmitCommand, createFormatCommand, loadContractFromTs, loadOrmConfig, ormCommandFamily, ormConfigSection };
179
532
 
180
533
  //# sourceMappingURL=cli.mjs.map
package/dist/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/index.mjs"],"sourcesContent":["import { t as createContractEmitCommand } from \"../contract-emit-DFu7h-Zl.mjs\";\nimport { t as createFormatCommand } from \"../format-DyVeO1z5.mjs\";\nimport { CliStructuredError } from \"@internal/errors/control\";\nimport { join, resolve } from \"pathe\";\nimport { existsSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { tmpdir } from \"node:os\";\nimport { pathToFileURL } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/load-ts-contract.ts\nfunction contractSourceError(code, message, options) {\n\tconst error = new CliStructuredError(code, message, options?.meta !== void 0 ? { meta: options.meta } : void 0);\n\tif (options?.cause !== void 0) error.cause = options.cause;\n\treturn error;\n}\nconst DEFAULT_ALLOWLIST = [\n\t\"@internal/*\",\n\t\"@prisma/orm-*\",\n\t\"node:crypto\"\n];\nfunction isAllowedImport(importPath, allowlist) {\n\tfor (const pattern of allowlist) if (pattern.endsWith(\"/*\")) {\n\t\tconst prefix = pattern.slice(0, -2);\n\t\tif (importPath === prefix || importPath.startsWith(`${prefix}/`)) return true;\n\t} else if (pattern.endsWith(\"*\")) {\n\t\tconst prefix = pattern.slice(0, -1);\n\t\tif (importPath.startsWith(prefix)) return true;\n\t} else if (importPath === pattern) return true;\n\treturn false;\n}\nfunction validatePurity(value, entryPath) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst path = /* @__PURE__ */ new WeakSet();\n\tfunction check(value) {\n\t\tif (value === null || typeof value !== \"object\") return;\n\t\tif (path.has(value)) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", \"Contract export contains circular references\", { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"circular\"\n\t\t} });\n\t\tpath.add(value);\n\t\ttry {\n\t\t\tfor (const key in value) {\n\t\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, key);\n\t\t\t\tif (descriptor && (descriptor.get || descriptor.set)) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export contains getter/setter at key \"${key}\"`, { meta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"getter\",\n\t\t\t\t\tkey\n\t\t\t\t} });\n\t\t\t\tif (descriptor && typeof descriptor.value === \"function\") throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export contains function at key \"${key}\"`, { meta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"function\",\n\t\t\t\t\tkey\n\t\t\t\t} });\n\t\t\t\tcheck(value[key]);\n\t\t\t}\n\t\t} finally {\n\t\t\tpath.delete(value);\n\t\t}\n\t}\n\ttry {\n\t\tcheck(value);\n\t\tJSON.stringify(value);\n\t} catch (error) {\n\t\tif (error instanceof Error) {\n\t\t\tif (error.message.includes(\"getter\") || error.message.includes(\"circular\")) throw error;\n\t\t\tthrow contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export is not JSON-serializable: ${error.message}`, {\n\t\t\t\tmeta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"not-json-serializable\"\n\t\t\t\t},\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t\tthrow contractSourceError(\"CONTRACT.EXPORT_INVALID\", \"Contract export is not JSON-serializable\", { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"not-json-serializable\"\n\t\t} });\n\t}\n}\nfunction createImportAllowlistPlugin(allowlist, entryPath, collected) {\n\tconst entryAbs = resolve(entryPath);\n\tfunction isFromEntry(importer) {\n\t\treturn importer === entryAbs || importer === entryPath || importer === \"<stdin>\";\n\t}\n\treturn {\n\t\tname: \"import-allowlist\",\n\t\tsetup(build) {\n\t\t\tbuild.onResolve({ filter: /.*/ }, (args) => {\n\t\t\t\tif (args.kind === \"entry-point\") return;\n\t\t\t\tif (args.path.startsWith(\".\") || args.path.startsWith(\"/\")) return;\n\t\t\t\tif (isFromEntry(args.importer) && !isAllowedImport(args.path, allowlist)) {\n\t\t\t\t\tcollected.add(args.path);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpath: args.path,\n\t\t\t\t\t\texternal: true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n/**\n* Loads a contract from a TypeScript file and returns it as Contract.\n*\n* **Responsibility: Parsing Only**\n* This function loads and parses a TypeScript contract file. It does NOT normalize the contract.\n* The contract should already be normalized if it was built using the contract builder.\n*\n* Normalization must happen in the contract builder when the contract is created.\n* This function only validates that the contract is JSON-serializable and returns it as-is.\n*\n* @param entryPath - Path to the TypeScript contract file\n* @param options - Optional configuration (import allowlist)\n* @returns The contract as Contract (should already be normalized)\n* @throws structured errors: `CLI.FILE_NOT_FOUND`, `CONTRACT.SOURCE_LOAD_FAILED`,\n* `CONTRACT.SOURCE_IMPORT_DISALLOWED`, `CONTRACT.MODULE_EXPORT_MISSING`, `CONTRACT.EXPORT_INVALID`\n*/\nasync function loadContractFromTs(entryPath, options) {\n\tconst allowlist = options?.allowlist ?? DEFAULT_ALLOWLIST;\n\tif (!existsSync(entryPath)) throw new CliStructuredError(\"CLI.FILE_NOT_FOUND\", `Contract file not found: ${entryPath}`, { where: { path: entryPath } });\n\tconst tempFile = join(tmpdir(), `prisma-next-contract-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);\n\tconst disallowedFromEntry = /* @__PURE__ */ new Set();\n\ttry {\n\t\tconst result = await build({\n\t\t\tentryPoints: [entryPath],\n\t\t\tbundle: true,\n\t\t\tformat: \"esm\",\n\t\t\tplatform: \"node\",\n\t\t\ttarget: \"es2022\",\n\t\t\toutfile: tempFile,\n\t\t\twrite: false,\n\t\t\tmetafile: true,\n\t\t\tplugins: [createImportAllowlistPlugin(allowlist, entryPath, disallowedFromEntry)],\n\t\t\tlogLevel: \"error\"\n\t\t});\n\t\tif (result.errors.length > 0) throw contractSourceError(\"CONTRACT.SOURCE_LOAD_FAILED\", `Failed to bundle contract file: ${result.errors.map((e) => e.text).join(\"\\n\")}`, { meta: {\n\t\t\tpath: entryPath,\n\t\t\tstage: \"bundle\"\n\t\t} });\n\t\tif (!result.outputFiles || result.outputFiles.length === 0) throw new InternalError(\"No output files generated from bundling\");\n\t\tif (disallowedFromEntry.size > 0) throw contractSourceError(\"CONTRACT.SOURCE_IMPORT_DISALLOWED\", `Disallowed imports detected. Only imports matching the allowlist are permitted:\\n Allowlist: ${allowlist.join(\", \")}\\n Disallowed imports: ${[...disallowedFromEntry].join(\", \")}`, { meta: {\n\t\t\tallowlist: [...allowlist],\n\t\t\tdisallowed: [...disallowedFromEntry]\n\t\t} });\n\t\tconst bundleContent = result.outputFiles[0]?.text;\n\t\tif (bundleContent === void 0) throw new InternalError(\"Bundle content is undefined\");\n\t\twriteFileSync(tempFile, bundleContent, \"utf-8\");\n\t\tconst module = await import(\n\t\t\t/* @vite-ignore */\n\t\t\tpathToFileURL(tempFile).href\n);\n\t\tunlinkSync(tempFile);\n\t\tlet contract;\n\t\tif (module.default !== void 0) contract = module.default;\n\t\telse if (module.contract !== void 0) contract = module.contract;\n\t\telse throw new CliStructuredError(\"CONTRACT.MODULE_EXPORT_MISSING\", `Contract file must export a contract as default export or named export 'contract'. Found exports: ${Object.keys(module).join(\", \") || \"none\"}`, { where: { path: entryPath } });\n\t\tif (typeof contract !== \"object\" || contract === null) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export must be an object, got ${typeof contract}`, { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"not-object\"\n\t\t} });\n\t\tvalidatePurity(contract, entryPath);\n\t\treturn contract;\n\t} catch (error) {\n\t\ttry {\n\t\t\tif (tempFile) unlinkSync(tempFile);\n\t\t} catch {}\n\t\tif (error instanceof Error) throw error;\n\t\tthrow contractSourceError(\"CONTRACT.SOURCE_LOAD_FAILED\", `Failed to load contract from ${entryPath}: ${String(error)}`, {\n\t\t\tmeta: {\n\t\t\t\tpath: entryPath,\n\t\t\t\tstage: \"import\"\n\t\t\t},\n\t\t\tcause: error\n\t\t});\n\t}\n}\n//#endregion\nexport { createContractEmitCommand, createFormatCommand, loadContractFromTs };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,oBAAoB,MAAM,SAAS,SAAS;CACpD,MAAM,QAAQ,IAAI,mBAAmB,MAAM,SAAS,SAAS,SAAS,KAAK,IAAI,EAAE,MAAM,QAAQ,KAAK,IAAI,KAAK,CAAC;CAC9G,IAAI,SAAS,UAAU,KAAK,GAAG,MAAM,QAAQ,QAAQ;CACrD,OAAO;AACR;AACA,MAAM,oBAAoB;CACzB;CACA;CACA;AACD;AACA,SAAS,gBAAgB,YAAY,WAAW;CAC/C,KAAK,MAAM,WAAW,WAAW,IAAI,QAAQ,SAAS,IAAI,GAAG;EAC5D,MAAM,SAAS,QAAQ,MAAM,GAAG,EAAE;EAClC,IAAI,eAAe,UAAU,WAAW,WAAW,GAAG,OAAO,EAAE,GAAG,OAAO;CAC1E,OAAO,IAAI,QAAQ,SAAS,GAAG,GAAG;EACjC,MAAM,SAAS,QAAQ,MAAM,GAAG,EAAE;EAClC,IAAI,WAAW,WAAW,MAAM,GAAG,OAAO;CAC3C,OAAO,IAAI,eAAe,SAAS,OAAO;CAC1C,OAAO;AACR;AACA,SA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":["../../../../1-framework/3-tooling/cli/dist/load-config-Aw9VS_dF.mjs","../../../../1-framework/3-tooling/cli/dist/exports/index.mjs"],"sourcesContent":["import { r as buildReadAggregate } from \"./contract-space-aggregate-loader-DOzo1sk9.mjs\";\nimport { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from \"./migration-list-Bkase_ZM.mjs\";\nimport { a as renderMigrationGraphLegend, c as renderMigrationListWithStyle, o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-BKrg6BPv.mjs\";\nimport { loadConfig } from \"@internal/config-loader\";\nimport { getEmittedArtifactPaths } from \"@internal/emitter\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { normalize, resolve } from \"pathe\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { DOCS_BASE, isStructuredError } from \"@internal/utils/structured-error\";\nimport { defineCommand, defineCommandFamily, defineConfigSection, flag } from \"@prisma/cli-engine\";\nimport { collectConfigIssues } from \"@internal/config/config-validation\";\nimport { CliStructuredError, notOk, ok } from \"@prisma/cli-engine/protocol\";\nconst MISSING_CONFIG_ACTION = {\n\tkind: \"run-command\",\n\tlabel: \"Create a configuration file\",\n\tcommand: \"prisma-next init\"\n};\nfunction editConfigAction(field) {\n\treturn {\n\t\tkind: \"edit-file\",\n\t\tlabel: `Correct ${field} in prisma-next.config.ts`\n\t};\n}\nfunction issueDiagnostic(issue) {\n\treturn {\n\t\tcode: \"CONFIG.VALIDATION_FAILED\",\n\t\tseverity: \"error\",\n\t\tsummary: issue.message,\n\t\twhy: issue.message,\n\t\tnextActions: [editConfigAction(issue.field)],\n\t\tmeta: {\n\t\t\tfield: issue.field,\n\t\t\tsection: issue.section\n\t\t}\n\t};\n}\nfunction sectionAbsentDiagnostic() {\n\treturn {\n\t\tcode: \"CONFIG.FILE_NOT_FOUND\",\n\t\tseverity: \"error\",\n\t\tsummary: \"No Prisma Next configuration was loaded\",\n\t\twhy: `The orm config section is absent, so prisma-next.config.ts was never evaluated.`,\n\t\tnextActions: [MISSING_CONFIG_ACTION]\n\t};\n}\nfunction notAnObjectDiagnostic() {\n\treturn {\n\t\tcode: \"CONFIG.VALIDATION_FAILED\",\n\t\tseverity: \"error\",\n\t\tsummary: \"Prisma Next configuration must be an object\",\n\t\twhy: `The orm config section is not an object, so no section can be read from it.`,\n\t\tnextActions: [{\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Export a configuration object from prisma-next.config.ts\"\n\t\t}]\n\t};\n}\nfunction unreadableDiagnostic(error) {\n\treturn {\n\t\tcode: \"CONFIG.VALIDATION_FAILED\",\n\t\tseverity: \"error\",\n\t\tsummary: \"Prisma Next configuration could not be inspected\",\n\t\twhy: error instanceof Error ? error.message : String(error),\n\t\tnextActions: [{\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Export a plain configuration object from prisma-next.config.ts\"\n\t\t}]\n\t};\n}\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/**\n* An emitted artifact listed as its own contract input makes every emit\n* consume its previous output. Structural, filesystem-free, and therefore the\n* section validator's business rather than the loader's.\n*/\nfunction collectArtifactCollisionIssues(raw) {\n\tconst contract = raw[\"contract\"];\n\tif (!isRecord(contract)) return [];\n\tconst source = contract[\"source\"];\n\tconst output = contract[\"output\"];\n\tif (!isRecord(source) || typeof output !== \"string\") return [];\n\tconst inputs = source[\"inputs\"];\n\tif (!Array.isArray(inputs)) return [];\n\tlet emitted;\n\ttry {\n\t\temitted = getEmittedArtifactPaths(output);\n\t} catch (error) {\n\t\treturn [{\n\t\t\tsection: \"contract\",\n\t\t\tfield: \"contract.output\",\n\t\t\tmessage: error instanceof Error ? error.message : String(error)\n\t\t}];\n\t}\n\tconst emittedPaths = /* @__PURE__ */ new Set([normalize(emitted.jsonPath), normalize(emitted.dtsPath)]);\n\tif (!inputs.some((input) => typeof input === \"string\" && emittedPaths.has(normalize(input)))) return [];\n\treturn [{\n\t\tsection: \"contract\",\n\t\tfield: \"contract.source.inputs[]\",\n\t\tmessage: \"Config.contract.source.inputs must not include emitted artifact paths derived from contract.output\"\n\t}];\n}\nfunction validate(raw) {\n\tif (raw === void 0) return {\n\t\tok: false,\n\t\tdiagnostics: [sectionAbsentDiagnostic()]\n\t};\n\tif (!isRecord(raw)) return {\n\t\tok: false,\n\t\tdiagnostics: [notAnObjectDiagnostic()]\n\t};\n\tlet issues;\n\ttry {\n\t\tissues = [...collectConfigIssues(raw), ...collectArtifactCollisionIssues(raw)];\n\t} catch (error) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tdiagnostics: [unreadableDiagnostic(error)]\n\t\t};\n\t}\n\tif (issues.length > 0) return {\n\t\tok: false,\n\t\tdiagnostics: issues.map(issueDiagnostic)\n\t};\n\treturn {\n\t\tok: true,\n\t\tvalue: blindCast(raw),\n\t\tdiagnostics: []\n\t};\n}\nconst ormConfigSection = defineConfigSection({\n\tname: \"orm\",\n\tvalidate\n});\n//#endregion\n//#region src/orm/normalize-error.ts\n/**\n* `isStructuredError` is the repo's own check, and it is the one that matters here: it holds the\n* regular expression for a dotted `NAMESPACE.SUBCODE`, so only a code the protocol accepts\n* reaches `Diagnostic['code']`.\n*/\nfunction isRaisedError(error) {\n\treturn error instanceof Error && isStructuredError(error);\n}\n/**\n* The fallback for anything that is not a structured error: a bare throw, and also an error whose\n* `code` is not a dotted one — a Node `ENOENT`, say. The rejected code survives in `meta` rather\n* than in `code`, where it would produce a docs link to a page that does not exist.\n*/\nfunction toUnexpected(error) {\n\tconst summary = error instanceof Error ? error.message : String(error);\n\tconst rejectedCode = error instanceof Error ? Reflect.get(error, \"code\") : void 0;\n\treturn new CliStructuredError(\"CLI.UNEXPECTED\", summary, {\n\t\t...ifDefined(\"meta\", typeof rejectedCode === \"string\" ? { code: rejectedCode } : void 0),\n\t\tcause: error\n\t});\n}\n/**\n* Both classes name themselves `CliStructuredError`, so the engine's duck test\n* accepts prisma/prisma's too. What actually separates them is `nextActions`:\n* the engine's constructor always sets it, prisma/prisma's never does.\n*/\nfunction conformsToProtocol(error) {\n\treturn CliStructuredError.is(error) && Array.isArray(error.nextActions);\n}\n/**\n* Turns the transitional `fix` prose into typed actions. A multi-line fix is\n* several pieces of advice, so it becomes one action per line.\n*/\nfunction actionsFromFix(fix) {\n\tif (fix === void 0) return [];\n\treturn fix.split(\"\\n\").map((line) => line.trim()).filter((line) => line.length > 0).map((label) => ({\n\t\tkind: \"user-choice\",\n\t\tlabel\n\t}));\n}\n/**\n* Projects a prisma/prisma-raised error onto the engine's diagnostic shape.\n*/\nfunction toEngineDiagnostic(error) {\n\treturn {\n\t\tcode: error.code,\n\t\tseverity: error.severity ?? \"error\",\n\t\tsummary: error.message,\n\t\t...ifDefined(\"why\", error.why),\n\t\tnextActions: actionsFromFix(error.fix),\n\t\t...ifDefined(\"where\", error.where),\n\t\t...ifDefined(\"meta\", error.meta),\n\t\t...ifDefined(\"docsUrl\", error.docsUrl)\n\t};\n}\n/**\n* The handler boundary's single conversion. Handlers pass every error they\n* return through `notOk` — and every error a top-of-handler catch sees —\n* through this, so a settled envelope always carries `nextActions` and never\n* the non-protocol `fix` field.\n*/\nfunction normalizeError(error) {\n\tif (conformsToProtocol(error)) return error;\n\tif (!isRaisedError(error)) return toUnexpected(error);\n\tconst diagnostic = toEngineDiagnostic(error);\n\treturn new CliStructuredError(diagnostic.code, diagnostic.summary, {\n\t\tseverity: diagnostic.severity,\n\t\tnextActions: diagnostic.nextActions,\n\t\t...ifDefined(\"why\", diagnostic.why),\n\t\t...ifDefined(\"where\", diagnostic.where),\n\t\t...ifDefined(\"meta\", diagnostic.meta),\n\t\t...ifDefined(\"docsUrl\", diagnostic.docsUrl),\n\t\tcause: error\n\t});\n}\n//#endregion\n//#region src/orm/define-command.ts\n/**\n* `defineCommand` with the ORM's error boundary already attached. Every ORM command is defined\n* through this rather than through `defineCommand` directly.\n*\n* Without it, an error a handler throws reaches the engine, whose duck test accepts\n* prisma/prisma's `CliStructuredError` — both classes carry that name — and then settles it\n* through fields the engine's own class has and this one does not. The envelope that results is\n* off-protocol. Catching here means every handler settles through the single conversion instead.\n*/\nfunction defineOrmCommand(def) {\n\treturn defineCommand({\n\t\t...def,\n\t\thandler: async (args, ctx) => {\n\t\t\ttry {\n\t\t\t\treturn await def.handler(args, ctx);\n\t\t\t} catch (error) {\n\t\t\t\treturn notOk(normalizeError(error));\n\t\t\t}\n\t\t}\n\t});\n}\n//#endregion\n//#region src/orm/migration/list.ts\n/**\n* Where migrations live for this project. Resolved against the invocation\n* directory, which is also the config file's directory for every default\n* invocation.\n*/\nfunction migrationsDirFor(config, cwd) {\n\treturn resolve(cwd, config.migrations?.dir ?? \"migrations\");\n}\nfunction listPresentations(inputs) {\n\treturn {\n\t\thuman: () => [{\n\t\t\tkind: \"fields\",\n\t\t\trows: [{\n\t\t\t\tlabel: \"migrations\",\n\t\t\t\tvalue: inputs.migrationsDir\n\t\t\t}, ...inputs.space === void 0 ? [] : [{\n\t\t\t\tlabel: \"space\",\n\t\t\t\tvalue: inputs.space\n\t\t\t}]]\n\t\t}, ...inputs.legendLines.length === 0 ? [] : [{\n\t\t\tkind: \"list\",\n\t\t\titems: [...inputs.legendLines]\n\t\t}]],\n\t\tstdout: () => inputs.lines,\n\t\tjson: () => inputs.list\n\t};\n}\nconst migrationListCommand = defineOrmCommand({\n\thelp: {\n\t\tsummary: \"List on-disk migrations per contract space\",\n\t\tdescription: \"Enumerates every on-disk migration under migrations/<space>/ for every\\ncontract space found on disk. Offline — does not consult the database.\\nHuman output draws the shared migration graph tree with operation counts,\\ninvariants on each migration row, and refs on destination contract nodes.\\nPass --space <id> to narrow to one contract space. --ascii forces ASCII\\ntree glyphs.\",\n\t\texamples: [\n\t\t\t\"migration list\",\n\t\t\t\"migration list --space app\",\n\t\t\t\"migration list --ascii\",\n\t\t\t\"migration list --legend\",\n\t\t\t\"migration list --json\"\n\t\t]\n\t},\n\targs: { flags: {\n\t\tspace: flag.string({\n\t\t\tbrief: \"Narrow output to a single contract space\",\n\t\t\tplaceholder: \"id\"\n\t\t}),\n\t\tascii: flag.boolean({ brief: \"Use ASCII kind glyphs (pipe-friendly)\" }),\n\t\tlegend: flag.boolean({ brief: \"Print a key for the tree glyphs and lane colors\" })\n\t} },\n\tneeds: { config: ormConfigSection },\n\thandler: async (args, ctx) => {\n\t\tconst migrationsDir = migrationsDirFor(ctx.config, ctx.cwd);\n\t\tconst loaded = await buildReadAggregate(ctx.config, { migrationsDir });\n\t\tif (!loaded.ok) return notOk(normalizeError(loaded.failure));\n\t\tconst { aggregate, contractHash: liveContractHash } = loaded.value;\n\t\tconst listed = runMigrationList({\n\t\t\tspaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),\n\t\t\t...ifDefined(\"spaceFilter\", args.flags.space)\n\t\t});\n\t\tif (!listed.ok) return notOk(normalizeError(listed.failure));\n\t\tconst glyphMode = args.flags.ascii ? \"ascii\" : \"unicode\";\n\t\tconst lines = renderMigrationListWithStyle(listed.value, createAnsiMigrationListStyler({ useColor: false }), glyphMode, {\n\t\t\tcolorize: false,\n\t\t\tliveContractHash,\n\t\t\tgraphForSpace: (spaceId) => aggregate.space(spaceId)?.graph(),\n\t\t\tappSpaceId: aggregate.app.spaceId\n\t\t}).split(\"\\n\");\n\t\tconst legendLines = args.flags.legend ? renderMigrationGraphLegend({\n\t\t\tcolorize: false,\n\t\t\tglyphMode\n\t\t}).split(\"\\n\") : [];\n\t\treturn ok(ctx.present({ data: listed.value }, listPresentations({\n\t\t\tlist: listed.value,\n\t\t\tlines,\n\t\t\tmigrationsDir,\n\t\t\tspace: args.flags.space,\n\t\t\tlegendLines\n\t\t})));\n\t}\n});\n//#endregion\n//#region src/orm/family.ts\n/**\n* The engine derives each diagnostic's docs link from this base plus the\n* dotted code.\n*/\nconst DOCS_BASE_URL = `${DOCS_BASE}/`;\n/**\n* The unit the ORM contributes to a CLI: its config section, its commands by\n* name, and where its diagnostics are documented. The shell owns the command\n* tree, so nothing here says where a command mounts.\n*/\nconst ormCommandFamily = defineCommandFamily({\n\tconfigSection: ormConfigSection,\n\tcommands: { \"migration list\": migrationListCommand },\n\tdocsBaseUrl: DOCS_BASE_URL\n});\n//#endregion\n//#region src/orm/load-config.ts\n/**\n* Builds the engine's `Runtime.config` from `prisma-next.config.ts`.\n*\n* The engine's own loader reads `prisma.config.ts` and the `$prismaConfig`\n* marker, which is not the file this bin reads, so the bin owns the load: the\n* ORM's c12 loader evaluates the module asynchronously and finalizes paths\n* against the config file's own directory. The whole result nests as the\n* single `orm` section — the engine models one section per family, and\n* `contract`, `db`, `migrations` and the rest are subsections of it.\n*\n* Only failures that prevent evaluation entirely are diagnostics here, and\n* they carry `section: null` so they fail exactly the commands that read\n* config. Structural verdicts belong to the section validator.\n*/\nasync function loadOrmConfig(options) {\n\tconst loaded = await loadConfig(options.configPath, { cwd: options.cwd });\n\tif (!loaded.ok) return {\n\t\tsections: {},\n\t\tdiagnostics: [{\n\t\t\tsection: null,\n\t\t\tdiagnostic: toEngineDiagnostic(loaded.failure)\n\t\t}]\n\t};\n\treturn {\n\t\tsections: { [\"orm\"]: loaded.value.config },\n\t\tdiagnostics: []\n\t};\n}\n//#endregion\nexport { ormConfigSection as a, normalizeError as i, ormCommandFamily as n, migrationListCommand as r, loadOrmConfig as t };\n\n//# sourceMappingURL=load-config-Aw9VS_dF.mjs.map","import { t as createContractEmitCommand } from \"../contract-emit-Ci-8sP-b.mjs\";\nimport { t as createFormatCommand } from \"../format-Ddhz7xFW.mjs\";\nimport { a as ormConfigSection, n as ormCommandFamily, t as loadOrmConfig } from \"../load-config-Aw9VS_dF.mjs\";\nimport { CliStructuredError } from \"@internal/errors/control\";\nimport { join, resolve } from \"pathe\";\nimport { existsSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { tmpdir } from \"node:os\";\nimport { pathToFileURL } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/load-ts-contract.ts\nfunction contractSourceError(code, message, options) {\n\tconst error = new CliStructuredError(code, message, options?.meta !== void 0 ? { meta: options.meta } : void 0);\n\tif (options?.cause !== void 0) error.cause = options.cause;\n\treturn error;\n}\nconst DEFAULT_ALLOWLIST = [\n\t\"@internal/*\",\n\t\"@prisma/orm-*\",\n\t\"node:crypto\"\n];\nfunction isAllowedImport(importPath, allowlist) {\n\tfor (const pattern of allowlist) if (pattern.endsWith(\"/*\")) {\n\t\tconst prefix = pattern.slice(0, -2);\n\t\tif (importPath === prefix || importPath.startsWith(`${prefix}/`)) return true;\n\t} else if (pattern.endsWith(\"*\")) {\n\t\tconst prefix = pattern.slice(0, -1);\n\t\tif (importPath.startsWith(prefix)) return true;\n\t} else if (importPath === pattern) return true;\n\treturn false;\n}\nfunction validatePurity(value, entryPath) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst path = /* @__PURE__ */ new WeakSet();\n\tfunction check(value) {\n\t\tif (value === null || typeof value !== \"object\") return;\n\t\tif (path.has(value)) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", \"Contract export contains circular references\", { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"circular\"\n\t\t} });\n\t\tpath.add(value);\n\t\ttry {\n\t\t\tfor (const key in value) {\n\t\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(value, key);\n\t\t\t\tif (descriptor && (descriptor.get || descriptor.set)) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export contains getter/setter at key \"${key}\"`, { meta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"getter\",\n\t\t\t\t\tkey\n\t\t\t\t} });\n\t\t\t\tif (descriptor && typeof descriptor.value === \"function\") throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export contains function at key \"${key}\"`, { meta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"function\",\n\t\t\t\t\tkey\n\t\t\t\t} });\n\t\t\t\tcheck(value[key]);\n\t\t\t}\n\t\t} finally {\n\t\t\tpath.delete(value);\n\t\t}\n\t}\n\ttry {\n\t\tcheck(value);\n\t\tJSON.stringify(value);\n\t} catch (error) {\n\t\tif (error instanceof Error) {\n\t\t\tif (error.message.includes(\"getter\") || error.message.includes(\"circular\")) throw error;\n\t\t\tthrow contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export is not JSON-serializable: ${error.message}`, {\n\t\t\t\tmeta: {\n\t\t\t\t\tpath: entryPath,\n\t\t\t\t\treason: \"not-json-serializable\"\n\t\t\t\t},\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t\tthrow contractSourceError(\"CONTRACT.EXPORT_INVALID\", \"Contract export is not JSON-serializable\", { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"not-json-serializable\"\n\t\t} });\n\t}\n}\nfunction createImportAllowlistPlugin(allowlist, entryPath, collected) {\n\tconst entryAbs = resolve(entryPath);\n\tfunction isFromEntry(importer) {\n\t\treturn importer === entryAbs || importer === entryPath || importer === \"<stdin>\";\n\t}\n\treturn {\n\t\tname: \"import-allowlist\",\n\t\tsetup(build) {\n\t\t\tbuild.onResolve({ filter: /.*/ }, (args) => {\n\t\t\t\tif (args.kind === \"entry-point\") return;\n\t\t\t\tif (args.path.startsWith(\".\") || args.path.startsWith(\"/\")) return;\n\t\t\t\tif (isFromEntry(args.importer) && !isAllowedImport(args.path, allowlist)) {\n\t\t\t\t\tcollected.add(args.path);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpath: args.path,\n\t\t\t\t\t\texternal: true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n/**\n* Loads a contract from a TypeScript file and returns it as Contract.\n*\n* **Responsibility: Parsing Only**\n* This function loads and parses a TypeScript contract file. It does NOT normalize the contract.\n* The contract should already be normalized if it was built using the contract builder.\n*\n* Normalization must happen in the contract builder when the contract is created.\n* This function only validates that the contract is JSON-serializable and returns it as-is.\n*\n* @param entryPath - Path to the TypeScript contract file\n* @param options - Optional configuration (import allowlist)\n* @returns The contract as Contract (should already be normalized)\n* @throws structured errors: `CLI.FILE_NOT_FOUND`, `CONTRACT.SOURCE_LOAD_FAILED`,\n* `CONTRACT.SOURCE_IMPORT_DISALLOWED`, `CONTRACT.MODULE_EXPORT_MISSING`, `CONTRACT.EXPORT_INVALID`\n*/\nasync function loadContractFromTs(entryPath, options) {\n\tconst allowlist = options?.allowlist ?? DEFAULT_ALLOWLIST;\n\tif (!existsSync(entryPath)) throw new CliStructuredError(\"CLI.FILE_NOT_FOUND\", `Contract file not found: ${entryPath}`, { where: { path: entryPath } });\n\tconst tempFile = join(tmpdir(), `prisma-next-contract-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);\n\tconst disallowedFromEntry = /* @__PURE__ */ new Set();\n\ttry {\n\t\tconst result = await build({\n\t\t\tentryPoints: [entryPath],\n\t\t\tbundle: true,\n\t\t\tformat: \"esm\",\n\t\t\tplatform: \"node\",\n\t\t\ttarget: \"es2022\",\n\t\t\toutfile: tempFile,\n\t\t\twrite: false,\n\t\t\tmetafile: true,\n\t\t\tplugins: [createImportAllowlistPlugin(allowlist, entryPath, disallowedFromEntry)],\n\t\t\tlogLevel: \"error\"\n\t\t});\n\t\tif (result.errors.length > 0) throw contractSourceError(\"CONTRACT.SOURCE_LOAD_FAILED\", `Failed to bundle contract file: ${result.errors.map((e) => e.text).join(\"\\n\")}`, { meta: {\n\t\t\tpath: entryPath,\n\t\t\tstage: \"bundle\"\n\t\t} });\n\t\tif (!result.outputFiles || result.outputFiles.length === 0) throw new InternalError(\"No output files generated from bundling\");\n\t\tif (disallowedFromEntry.size > 0) throw contractSourceError(\"CONTRACT.SOURCE_IMPORT_DISALLOWED\", `Disallowed imports detected. Only imports matching the allowlist are permitted:\\n Allowlist: ${allowlist.join(\", \")}\\n Disallowed imports: ${[...disallowedFromEntry].join(\", \")}`, { meta: {\n\t\t\tallowlist: [...allowlist],\n\t\t\tdisallowed: [...disallowedFromEntry]\n\t\t} });\n\t\tconst bundleContent = result.outputFiles[0]?.text;\n\t\tif (bundleContent === void 0) throw new InternalError(\"Bundle content is undefined\");\n\t\twriteFileSync(tempFile, bundleContent, \"utf-8\");\n\t\tconst module = await import(\n\t\t\t/* @vite-ignore */\n\t\t\tpathToFileURL(tempFile).href\n);\n\t\tunlinkSync(tempFile);\n\t\tlet contract;\n\t\tif (module.default !== void 0) contract = module.default;\n\t\telse if (module.contract !== void 0) contract = module.contract;\n\t\telse throw new CliStructuredError(\"CONTRACT.MODULE_EXPORT_MISSING\", `Contract file must export a contract as default export or named export 'contract'. Found exports: ${Object.keys(module).join(\", \") || \"none\"}`, { where: { path: entryPath } });\n\t\tif (typeof contract !== \"object\" || contract === null) throw contractSourceError(\"CONTRACT.EXPORT_INVALID\", `Contract export must be an object, got ${typeof contract}`, { meta: {\n\t\t\tpath: entryPath,\n\t\t\treason: \"not-object\"\n\t\t} });\n\t\tvalidatePurity(contract, entryPath);\n\t\treturn contract;\n\t} catch (error) {\n\t\ttry {\n\t\t\tif (tempFile) unlinkSync(tempFile);\n\t\t} catch {}\n\t\tif (error instanceof Error) throw error;\n\t\tthrow contractSourceError(\"CONTRACT.SOURCE_LOAD_FAILED\", `Failed to load contract from ${entryPath}: ${String(error)}`, {\n\t\t\tmeta: {\n\t\t\t\tpath: entryPath,\n\t\t\t\tstage: \"import\"\n\t\t\t},\n\t\t\tcause: error\n\t\t});\n\t}\n}\n//#endregion\nexport { createContractEmitCommand, createFormatCommand, loadContractFromTs, loadOrmConfig, ormCommandFamily, ormConfigSection };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,wBAAwB;CAC7B,MAAM;CACN,OAAO;CACP,SAAS;AACV;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO;EACN,MAAM;EACN,OAAO,WAAW,MAAM;CACzB;AACD;AACA,SAAS,gBAAgB,OAAO;CAC/B,OAAO;EACN,MAAM;EACN,UAAU;EACV,SAAS,MAAM;EACf,KAAK,MAAM;EACX,aAAa,CAAC,iBAAiB,MAAM,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AAM,oBAAoB,2BAA2B,0CAA0C,OAAO,YAAY,EAAE,MAAM;GAChL,MAAM;GACN,QAAQ;EACT,EAAE,CAAC;EACH,eAAe,UAAU,SAAS;EAClC,OAAO;CACR,SAAS,OAAO;EACf,IAAI;GACH,IAAI,UAAU,WAAW,QAAQ;EAClC,QAAQ,CAAC;EACT,IAAI,iBAAiB,OAAO,MAAM;EAClC,MAAM,oBAAoB,+BAA+B,gCAAgC,UAAU,IAAI,OAAO,KAAK,KAAK;GACvH,MAAM;IACL,MAAM;IACN,OAAO;GACR;GACA,OAAO;EACR,CAAC;CACF;AACD"}
@@ -1,2 +1,2 @@
1
- import { t as createContractEmitCommand } from "./contract-emit-B65_UiFn.mjs";
1
+ import { t as createContractEmitCommand } from "./contract-emit-CvwNE4R1-DEn1V1Zo.mjs";
2
2
  export { createContractEmitCommand };
@@ -1,2 +1,2 @@
1
- import { t as createContractEmitCommand } from "./contract-emit-DFu7h-Zl-7DBgYNv7.mjs";
1
+ import { t as createContractEmitCommand } from "./contract-emit-Ci-8sP-b-QzQXK2xQ.mjs";
2
2
  export { createContractEmitCommand };
@@ -1,2 +1,2 @@
1
- import { t as createContractInferCommand } from "./contract-infer-C_b7E71m-D2UO-X-k.mjs";
1
+ import { t as createContractInferCommand } from "./contract-infer-hhyMJiwS-BJ5cYC9P.mjs";
2
2
  export { createContractInferCommand };
@@ -1,2 +1,2 @@
1
- import { t as createDbInitCommand } from "./db-init-Cqjw5Flp.mjs";
1
+ import { t as createDbInitCommand } from "./db-init-3CbSYxRI-BlTkWh8n.mjs";
2
2
  export { createDbInitCommand };
@@ -1,2 +1,2 @@
1
- import { t as createDbSchemaCommand } from "./db-schema-CRGCFKlH.mjs";
1
+ import { t as createDbSchemaCommand } from "./db-schema-BVLbe3EL-WLnbuo77.mjs";
2
2
  export { createDbSchemaCommand };
@@ -1,2 +1,2 @@
1
- import { t as createDbSignCommand } from "./db-sign-BPQduGHb.mjs";
1
+ import { t as createDbSignCommand } from "./db-sign-Cdw2RmoG-C-X5UheR.mjs";
2
2
  export { createDbSignCommand };
@@ -1,2 +1,2 @@
1
- import { t as createDbUpdateCommand } from "./db-update-DuEk-ra5.mjs";
1
+ import { t as createDbUpdateCommand } from "./db-update-BHOdo8PV-BVBNKrJc.mjs";
2
2
  export { createDbUpdateCommand };
@@ -1,2 +1,2 @@
1
- import { t as createDbVerifyCommand } from "./db-verify-DPH4lonK-pteoYVnK.mjs";
1
+ import { t as createDbVerifyCommand } from "./db-verify-C9P9oNCs-gieY7hV2.mjs";
2
2
  export { createDbVerifyCommand };
@@ -1,5 +1,5 @@
1
- import { A as PerSpaceExecutionEntry, D as MigratePathDecision } from "./cli-errors-BKPhkBSf-Ca-ymb6S.mjs";
2
- import { n as MigrateShowMigration } from "./migrate-show-Cu3k9mZm-B-nCgvK1.mjs";
1
+ import { A as PerSpaceExecutionEntry, D as MigratePathDecision } from "./cli-errors-C7vbvQuK-DLpSxz4U.mjs";
2
+ import { n as MigrateShowMigration } from "./migrate-show-g71Z4vJw-ocdTvf70.mjs";
3
3
  import { Command } from "commander";
4
4
  //#region ../../../1-framework/3-tooling/cli/dist/commands/migrate.d.mts
5
5
  //#region src/commands/migrate.d.ts
@@ -1,2 +1,2 @@
1
- import { t as createMigrateCommand } from "./migrate-Bfsw18KQ.mjs";
1
+ import { t as createMigrateCommand } from "./migrate-B-hpVTxi-DJzFYT2w.mjs";
2
2
  export { createMigrateCommand };
@@ -1,3 +1,3 @@
1
1
  import { t as migrationCheckResultSchema } from "./schemas-KhXMzNA_-CzZ7GFX_.mjs";
2
- import { t as createMigrationCheckCommand } from "./migration-check-BfOnfgyY-DII6Ty5m.mjs";
2
+ import { t as createMigrationCheckCommand } from "./migration-check-zgqYe3SB-B6LI6wY7.mjs";
3
3
  export { createMigrationCheckCommand, migrationCheckResultSchema };
@@ -1,5 +1,5 @@
1
1
  import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
2
- import { t as CliStructuredError$1 } from "./cli-errors-BKPhkBSf-Ca-ymb6S.mjs";
2
+ import { t as CliStructuredError$1 } from "./cli-errors-C7vbvQuK-DLpSxz4U.mjs";
3
3
  import { o as MigrationSpaceGraphEntry } from "./schemas-CeGMYFYX-h3OcU__O.mjs";
4
4
  import { n as GlobalFlags, t as CommonCommandOptions } from "./global-flags-BpoOYtNZ-CHZD3fud.mjs";
5
5
  import { n as TerminalUI } from "./terminal-ui-BN4QOsm5-Bf3pim46.mjs";
@@ -1,2 +1,2 @@
1
- import { n as executeMigrationGraphCommand, r as formatMigrationGraphHumanOutput, t as createMigrationGraphCommand } from "./migration-graph-BHiSuhBR.mjs";
1
+ import { n as executeMigrationGraphCommand, r as formatMigrationGraphHumanOutput, t as createMigrationGraphCommand } from "./migration-graph-Dm9gU0oE-DxPD_SNA.mjs";
2
2
  export { createMigrationGraphCommand, executeMigrationGraphCommand, formatMigrationGraphHumanOutput };
@@ -1,6 +1,6 @@
1
1
  import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
2
- import { t as CliStructuredError$1 } from "./cli-errors-BKPhkBSf-Ca-ymb6S.mjs";
3
- import { c as ContractSpaceAggregate } from "./aggregate-BflrjWPO.mjs";
2
+ import { t as CliStructuredError$1 } from "./cli-errors-C7vbvQuK-DLpSxz4U.mjs";
3
+ import { c as ContractSpaceAggregate } from "./aggregate-CA6bJ8UO.mjs";
4
4
  import { r as MigrationListResult } from "./schemas-CeGMYFYX-h3OcU__O.mjs";
5
5
  import { n as GlobalFlags, t as CommonCommandOptions } from "./global-flags-BpoOYtNZ-CHZD3fud.mjs";
6
6
  import { n as TerminalUI, t as GlyphMode } from "./terminal-ui-BN4QOsm5-Bf3pim46.mjs";
@@ -1,2 +1,2 @@
1
- import { n as executeMigrationListCommand, r as renderMigrationListHumanOutput, t as createMigrationListCommand } from "./migration-list-BkTNEeOK.mjs";
1
+ import { n as executeMigrationListCommand, r as renderMigrationListHumanOutput, t as createMigrationListCommand } from "./migration-list-DDGUTC8Y-B_X7rkez.mjs";
2
2
  export { createMigrationListCommand, executeMigrationListCommand, renderMigrationListHumanOutput };
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError$1 } from "./cli-errors-BKPhkBSf-Ca-ymb6S.mjs";
1
+ import { t as CliStructuredError$1 } from "./cli-errors-C7vbvQuK-DLpSxz4U.mjs";
2
2
  import { i as MigrationLogResult } from "./schemas-CeGMYFYX-h3OcU__O.mjs";
3
3
  import { n as GlobalFlags, t as CommonCommandOptions } from "./global-flags-BpoOYtNZ-CHZD3fud.mjs";
4
4
  import { n as TerminalUI } from "./terminal-ui-BN4QOsm5-Bf3pim46.mjs";
@@ -1,2 +1,2 @@
1
- import { n as executeMigrationLogCommand, t as createMigrationLogCommand } from "./migration-log-CqrwQXER-cqf2INDN.mjs";
1
+ import { n as executeMigrationLogCommand, t as createMigrationLogCommand } from "./migration-log-Cft50PRu-DcnHdxT4.mjs";
2
2
  export { createMigrationLogCommand, executeMigrationLogCommand };