@prisma/orm-toolchain 8.0.0-rc.1-dev.32 → 8.0.0-rc.1-dev.34

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 (146) hide show
  1. package/dist/bin__prisma-next.mjs +24 -24
  2. package/dist/bin__prisma-next.mjs.map +1 -1
  3. package/dist/{caught-errors-B_oGFiYw-BqX49eW0.mjs → caught-errors-BZ-9WASe-DH4DaDha.mjs} +3 -3
  4. package/dist/{caught-errors-B_oGFiYw-BqX49eW0.mjs.map → caught-errors-BZ-9WASe-DH4DaDha.mjs.map} +1 -1
  5. package/dist/{cli-errors-CihMAEVj-C1uUYBop.mjs → cli-errors-C6_pH59O-CzD4SYcJ.mjs} +4 -3
  6. package/dist/{cli-errors-CihMAEVj-C1uUYBop.mjs.map → cli-errors-C6_pH59O-CzD4SYcJ.mjs.map} +1 -1
  7. package/dist/{cli-errors-C8DGzS94-CPP3UmRT.d.mts → cli-errors-f5PRtVdm-C6xVKeQn.d.mts} +8 -3
  8. package/dist/cli-errors-f5PRtVdm-C6xVKeQn.d.mts.map +1 -0
  9. package/dist/cli.mjs +961 -27
  10. package/dist/cli.mjs.map +1 -1
  11. package/dist/cli__commands__contract-emit.mjs +1 -1
  12. package/dist/cli__commands__contract-infer.mjs +1 -1
  13. package/dist/cli__commands__db-init.mjs +1 -1
  14. package/dist/cli__commands__db-schema.mjs +1 -1
  15. package/dist/cli__commands__db-sign.mjs +1 -1
  16. package/dist/cli__commands__db-update.mjs +1 -1
  17. package/dist/cli__commands__db-verify.mjs +1 -1
  18. package/dist/cli__commands__migrate.d.mts +2 -2
  19. package/dist/cli__commands__migrate.mjs +1 -1
  20. package/dist/cli__commands__migration-check.mjs +1 -1
  21. package/dist/cli__commands__migration-graph.d.mts +1 -1
  22. package/dist/cli__commands__migration-graph.mjs +1 -1
  23. package/dist/cli__commands__migration-list.d.mts +1 -1
  24. package/dist/cli__commands__migration-list.mjs +1 -1
  25. package/dist/cli__commands__migration-log.d.mts +1 -1
  26. package/dist/cli__commands__migration-log.mjs +1 -1
  27. package/dist/cli__commands__migration-new.mjs +1 -1
  28. package/dist/cli__commands__migration-plan.d.mts +1 -1
  29. package/dist/cli__commands__migration-plan.mjs +1 -1
  30. package/dist/cli__commands__migration-show.mjs +1 -1
  31. package/dist/cli__commands__migration-status.d.mts +1 -1
  32. package/dist/cli__commands__migration-status.mjs +1 -1
  33. package/dist/cli__commands__ref.mjs +1 -1
  34. package/dist/cli__commands__telemetry.mjs +1 -1
  35. package/dist/cli__control-api.d.mts +3 -3
  36. package/dist/cli__control-api.mjs +15 -15
  37. package/dist/cli__control-api__testing.d.mts +1 -1
  38. package/dist/{client-C4Gh4PBz-BMUlBcuE.mjs → client-BqhVohc5-DFRVWFps.mjs} +5 -5
  39. package/dist/{client-C4Gh4PBz-BMUlBcuE.mjs.map → client-BqhVohc5-DFRVWFps.mjs.map} +1 -1
  40. package/dist/{command-helpers-Dw3LDEu_-B4AETH4D.mjs → command-helpers-kD9CO1hd-BPhnkBin.mjs} +4 -4
  41. package/dist/{command-helpers-Dw3LDEu_-B4AETH4D.mjs.map → command-helpers-kD9CO1hd-BPhnkBin.mjs.map} +1 -1
  42. package/dist/{contract-at-errors-BsQiGdZC-D8l9-WWt.mjs → contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs} +3 -3
  43. package/dist/{contract-at-errors-BsQiGdZC-D8l9-WWt.mjs.map → contract-at-errors-CLFX1-Gc-MNPXDx1t.mjs.map} +1 -1
  44. package/dist/{contract-emit-CIdgw3Kq-BcfYaUfn.mjs → contract-emit-BlvUNMHM-BEioUVR5.mjs} +6 -6
  45. package/dist/{contract-emit-CIdgw3Kq-BcfYaUfn.mjs.map → contract-emit-BlvUNMHM-BEioUVR5.mjs.map} +1 -1
  46. package/dist/{contract-emit-WIAaN0lC-DKOdtrUQ.mjs → contract-emit-CrYO0A8x-60BOqXFr.mjs} +5 -5
  47. package/dist/{contract-emit-WIAaN0lC-DKOdtrUQ.mjs.map → contract-emit-CrYO0A8x-60BOqXFr.mjs.map} +1 -1
  48. package/dist/contract-emit-Csa6R0gt-DvxFlS0O.mjs +2 -0
  49. package/dist/{contract-infer-xOEwVWds-CE5gw1PF.mjs → contract-infer-C8kLphsm-C7-AIYMc.mjs} +5 -5
  50. package/dist/{contract-infer-xOEwVWds-CE5gw1PF.mjs.map → contract-infer-C8kLphsm-C7-AIYMc.mjs.map} +1 -1
  51. package/dist/{contract-snapshot-resolution-BnH6_mw7-BrzAsS93.mjs → contract-snapshot-resolution-BUUdIcgG-8mbs6-OD.mjs} +4 -4
  52. package/dist/{contract-snapshot-resolution-BnH6_mw7-BrzAsS93.mjs.map → contract-snapshot-resolution-BUUdIcgG-8mbs6-OD.mjs.map} +1 -1
  53. package/dist/{contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs → contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs} +4 -4
  54. package/dist/{contract-space-aggregate-loader-1wG1OiDk-D75luh5-.mjs.map → contract-space-aggregate-loader-BpdB-mHG-BiU0IUeb.mjs.map} +1 -1
  55. package/dist/{db-init-CEk9Utl4-vGmJajwZ.mjs → db-init-CyNsXRAB-D3xWQ-vy.mjs} +7 -39
  56. package/dist/db-init-CyNsXRAB-D3xWQ-vy.mjs.map +1 -0
  57. package/dist/db-init-failure-XYOVL4o7-BitY_JYn.mjs +44 -0
  58. package/dist/db-init-failure-XYOVL4o7-BitY_JYn.mjs.map +1 -0
  59. package/dist/{db-schema-D_PJvBI3-BTnfCqbX.mjs → db-schema-7zNGHgYN-BVaRHPxg.mjs} +6 -6
  60. package/dist/{db-schema-D_PJvBI3-BTnfCqbX.mjs.map → db-schema-7zNGHgYN-BVaRHPxg.mjs.map} +1 -1
  61. package/dist/{db-sign-Bparnnii-Yd5pb4VF.mjs → db-sign-DAs6J3XG-xxP2CCnO.mjs} +8 -8
  62. package/dist/{db-sign-Bparnnii-Yd5pb4VF.mjs.map → db-sign-DAs6J3XG-xxP2CCnO.mjs.map} +1 -1
  63. package/dist/{db-update-CsKZyDYp-B8Zl7W4k.mjs → db-update-BX1sOuQk-CpeLgPeN.mjs} +7 -7
  64. package/dist/{db-update-CsKZyDYp-B8Zl7W4k.mjs.map → db-update-BX1sOuQk-CpeLgPeN.mjs.map} +1 -1
  65. package/dist/{db-verify-B33E7HXH-D87fiNt3.mjs → db-verify-CN4nmxxF-DSRWae0u.mjs} +7 -7
  66. package/dist/{db-verify-B33E7HXH-D87fiNt3.mjs.map → db-verify-CN4nmxxF-DSRWae0u.mjs.map} +1 -1
  67. package/dist/{format-CYdgHub4-Cs6VcFje.mjs → format-D5x0jz7q-xalz6Fkn.mjs} +5 -5
  68. package/dist/{format-CYdgHub4-Cs6VcFje.mjs.map → format-D5x0jz7q-xalz6Fkn.mjs.map} +1 -1
  69. package/dist/{framework-components-CXxMNF8E-C-g2cchI.mjs → framework-components-CPFWl2Ix-CrIZL3jG.mjs} +3 -3
  70. package/dist/{framework-components-CXxMNF8E-C-g2cchI.mjs.map → framework-components-CPFWl2Ix-CrIZL3jG.mjs.map} +1 -1
  71. package/dist/{init-B8U_9kn7-CdhTYHfO.mjs → init-BvLCfVjC-DOPO-TLF.mjs} +5 -5
  72. package/dist/{init-B8U_9kn7-CdhTYHfO.mjs.map → init-BvLCfVjC-DOPO-TLF.mjs.map} +1 -1
  73. package/dist/{inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs → inspect-live-schema-BaLAtOgO-Bs0gs_yP.mjs} +5 -5
  74. package/dist/{inspect-live-schema-BAiaX0n9-DBQFEsMC.mjs.map → inspect-live-schema-BaLAtOgO-Bs0gs_yP.mjs.map} +1 -1
  75. package/dist/{invariants-CsxL0lbZ-B9Hfpj2R.mjs → invariants-1L2zfc6--BpedlAbF.mjs} +4 -4
  76. package/dist/{invariants-CsxL0lbZ-B9Hfpj2R.mjs.map → invariants-1L2zfc6--BpedlAbF.mjs.map} +1 -1
  77. package/dist/{legend-QYDKKevn-DCIlAPn4.mjs → legend-aXC5H1jH-Dg1yWonK.mjs} +3 -3
  78. package/dist/{legend-QYDKKevn-DCIlAPn4.mjs.map → legend-aXC5H1jH-Dg1yWonK.mjs.map} +1 -1
  79. package/dist/{migrate-DYx_CSbN-BuQ0lk-0.mjs → migrate-DRiUHRCS-Cci6EEZv.mjs} +32 -79
  80. package/dist/migrate-DRiUHRCS-Cci6EEZv.mjs.map +1 -0
  81. package/dist/migrate-failure-Bdr3AJee-C9yNeQXy.mjs +96 -0
  82. package/dist/migrate-failure-Bdr3AJee-C9yNeQXy.mjs.map +1 -0
  83. package/dist/{migrate-show-DWIvU6Y_-BQyWhZD1.d.mts → migrate-show-DutwCc2F-BhGfH7D-.d.mts} +5 -3
  84. package/dist/migrate-show-DutwCc2F-BhGfH7D-.d.mts.map +1 -0
  85. package/dist/{migrate-show-CPZEq35I-DeL3WVjs.mjs → migrate-show-bdXjSFgh-CQxl5yNp.mjs} +7 -7
  86. package/dist/migrate-show-bdXjSFgh-CQxl5yNp.mjs.map +1 -0
  87. package/dist/{migration-check-COMRj5eu-DbJgriA8.mjs → migration-check-aoZ8kXNA-DX2J84Cv.mjs} +7 -7
  88. package/dist/{migration-check-COMRj5eu-DbJgriA8.mjs.map → migration-check-aoZ8kXNA-DX2J84Cv.mjs.map} +1 -1
  89. package/dist/{migration-check-BUAcSrvA-DSS5Yvco.mjs → migration-check-of-RPYRk-HuXtDO8i.mjs} +6 -6
  90. package/dist/{migration-check-BUAcSrvA-DSS5Yvco.mjs.map → migration-check-of-RPYRk-HuXtDO8i.mjs.map} +1 -1
  91. package/dist/{migration-command-scaffold-CIMPoR6f-Ba-S9gXa.mjs → migration-command-scaffold-zJFTGn5k-5AGczeSx.mjs} +5 -5
  92. package/dist/{migration-command-scaffold-CIMPoR6f-Ba-S9gXa.mjs.map → migration-command-scaffold-zJFTGn5k-5AGczeSx.mjs.map} +1 -1
  93. package/dist/{migration-graph-BsGstA5L-BQiNbrkP.mjs → migration-graph-D0KHjNJ--CWzX9Zzc.mjs} +10 -10
  94. package/dist/{migration-graph-BsGstA5L-BQiNbrkP.mjs.map → migration-graph-D0KHjNJ--CWzX9Zzc.mjs.map} +1 -1
  95. package/dist/{migration-graph-BtP1Va3T-C8PpuaYw.mjs → migration-graph-DmdVVJoZ-DDBKjUMz.mjs} +3 -3
  96. package/dist/{migration-graph-BtP1Va3T-C8PpuaYw.mjs.map → migration-graph-DmdVVJoZ-DDBKjUMz.mjs.map} +1 -1
  97. package/dist/{migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs → migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs} +5 -5
  98. package/dist/{migration-graph-command-render-CgdHruiZ-B6V4gmUe.mjs.map → migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs.map} +1 -1
  99. package/dist/{migration-graph-sections-CceYWPCP-LqImOaK1.mjs → migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs} +4 -4
  100. package/dist/{migration-graph-sections-CceYWPCP-LqImOaK1.mjs.map → migration-graph-sections-BWcFCOL6-_G0Wb4QR.mjs.map} +1 -1
  101. package/dist/{migration-list-BiVyonwG-CdMbBV5Z.mjs → migration-list-B0SANIeM-DiXQ9LyS.mjs} +8 -8
  102. package/dist/{migration-list-BiVyonwG-CdMbBV5Z.mjs.map → migration-list-B0SANIeM-DiXQ9LyS.mjs.map} +1 -1
  103. package/dist/{migration-list-AKRIIovW-BN-Zrwk0.mjs → migration-list-W0dqabIj-Dc2NH_LY.mjs} +3 -3
  104. package/dist/{migration-list-AKRIIovW-BN-Zrwk0.mjs.map → migration-list-W0dqabIj-Dc2NH_LY.mjs.map} +1 -1
  105. package/dist/{migration-log-Z3-L172x-CvQTNJvI.mjs → migration-log-B3iiP8ns-B4tdLSye.mjs} +9 -9
  106. package/dist/{migration-log-Z3-L172x-CvQTNJvI.mjs.map → migration-log-B3iiP8ns-B4tdLSye.mjs.map} +1 -1
  107. package/dist/{migration-log-table-JR7fFVbE-DR2mom6h.mjs → migration-log-table-DRiOnvzf-zTQBThqe.mjs} +3 -3
  108. package/dist/{migration-log-table-JR7fFVbE-DR2mom6h.mjs.map → migration-log-table-DRiOnvzf-zTQBThqe.mjs.map} +1 -1
  109. package/dist/{migration-new-DDnQd7Ql-1WT_J_zf.mjs → migration-new-Bf5K9fNK-Cd90rYmm.mjs} +5 -5
  110. package/dist/{migration-new-DDnQd7Ql-1WT_J_zf.mjs.map → migration-new-Bf5K9fNK-Cd90rYmm.mjs.map} +1 -1
  111. package/dist/{migration-new-ZlgxFcbH-CxlZs2hr.mjs → migration-new-YSdtJTRp-Dc06LNJe.mjs} +7 -7
  112. package/dist/{migration-new-ZlgxFcbH-CxlZs2hr.mjs.map → migration-new-YSdtJTRp-Dc06LNJe.mjs.map} +1 -1
  113. package/dist/{migration-path-target-yA4h5Zc6-DlzBblBG.mjs → migration-path-target-5r1leSW5-B0EMgvEv.mjs} +3 -3
  114. package/dist/{migration-path-target-yA4h5Zc6-DlzBblBG.mjs.map → migration-path-target-5r1leSW5-B0EMgvEv.mjs.map} +1 -1
  115. package/dist/{migration-plan-s94qwFHi-86F_Aklp.d.mts → migration-plan-4cnnP6yM-DXzRfi_A.d.mts} +3 -3
  116. package/dist/{migration-plan-s94qwFHi-86F_Aklp.d.mts.map → migration-plan-4cnnP6yM-DXzRfi_A.d.mts.map} +1 -1
  117. package/dist/{migration-plan-DiLJTAep-2B463CwW.mjs → migration-plan-CZY8HVCh-BbfQvxnb.mjs} +8 -8
  118. package/dist/{migration-plan-DiLJTAep-2B463CwW.mjs.map → migration-plan-CZY8HVCh-BbfQvxnb.mjs.map} +1 -1
  119. package/dist/{migration-plan-CROSunPS-B66Rh_6T.mjs → migration-plan-oterbw8h-_GrKbsRb.mjs} +5 -5
  120. package/dist/{migration-plan-CROSunPS-B66Rh_6T.mjs.map → migration-plan-oterbw8h-_GrKbsRb.mjs.map} +1 -1
  121. package/dist/{migration-show-mJD52S2d-DiD-rCBB.mjs → migration-show-iX2cduR4-C3-FENR4.mjs} +9 -9
  122. package/dist/{migration-show-mJD52S2d-DiD-rCBB.mjs.map → migration-show-iX2cduR4-C3-FENR4.mjs.map} +1 -1
  123. package/dist/{migration-status-7Zawokrj-BwTcRAjf.mjs → migration-status-DCAQ3_C1-ofDvCvUk.mjs} +12 -12
  124. package/dist/{migration-status-7Zawokrj-BwTcRAjf.mjs.map → migration-status-DCAQ3_C1-ofDvCvUk.mjs.map} +1 -1
  125. package/dist/{project-import-root-Bkz1gPB2-jhrMFebo.mjs → project-import-root-BPuwl2j1-DTX9G73z.mjs} +3 -3
  126. package/dist/{project-import-root-Bkz1gPB2-jhrMFebo.mjs.map → project-import-root-BPuwl2j1-DTX9G73z.mjs.map} +1 -1
  127. package/dist/{ref-DftuSibc-CasZ6LgA.mjs → ref-CVD6j3jA-BAgpZLNM.mjs} +5 -5
  128. package/dist/{ref-DftuSibc-CasZ6LgA.mjs.map → ref-CVD6j3jA-BAgpZLNM.mjs.map} +1 -1
  129. package/dist/{ref-Cycefq_T-DQE5AM66.mjs → ref-CaqNqeRF-cjWFAueu.mjs} +5 -5
  130. package/dist/{ref-Cycefq_T-DQE5AM66.mjs.map → ref-CaqNqeRF-cjWFAueu.mjs.map} +1 -1
  131. package/dist/{ref-resolution-Bi4lpxM8-BbfL_yv8.mjs → ref-resolution-D4fAdXo8-Dfaky0yw.mjs} +3 -3
  132. package/dist/{ref-resolution-Bi4lpxM8-BbfL_yv8.mjs.map → ref-resolution-D4fAdXo8-Dfaky0yw.mjs.map} +1 -1
  133. package/dist/{telemetry-LP1Suxsf-CY1l7lD0.mjs → telemetry-fKuZOFpu-DNUWfIHo.mjs} +4 -4
  134. package/dist/{telemetry-LP1Suxsf-CY1l7lD0.mjs.map → telemetry-fKuZOFpu-DNUWfIHo.mjs.map} +1 -1
  135. package/dist/{terminal-ui-JJKxvT0q-CPDEJqqU.mjs → terminal-ui-Cqz4LVL7-B0mcVdLy.mjs} +3 -3
  136. package/dist/{terminal-ui-JJKxvT0q-CPDEJqqU.mjs.map → terminal-ui-Cqz4LVL7-B0mcVdLy.mjs.map} +1 -1
  137. package/dist/{verify-wUSBDQwh-Bv3NV9WG.mjs → verify-Cogr_Fj9-D3lCWA6t.mjs} +3 -3
  138. package/dist/{verify-wUSBDQwh-Bv3NV9WG.mjs.map → verify-Cogr_Fj9-D3lCWA6t.mjs.map} +1 -1
  139. package/dist/vite-plugin-contract-emit.mjs +1 -1
  140. package/package.json +12 -12
  141. package/dist/cli-errors-C8DGzS94-CPP3UmRT.d.mts.map +0 -1
  142. package/dist/contract-emit-BAfPwP3y-DfV1Stry.mjs +0 -2
  143. package/dist/db-init-CEk9Utl4-vGmJajwZ.mjs.map +0 -1
  144. package/dist/migrate-DYx_CSbN-BuQ0lk-0.mjs.map +0 -1
  145. package/dist/migrate-show-CPZEq35I-DeL3WVjs.mjs.map +0 -1
  146. package/dist/migrate-show-DWIvU6Y_-BQyWhZD1.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"db-verify-B33E7HXH-D87fiNt3.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/db-verify-B33E7HXH.mjs"],"sourcesContent":["import { D as errorRuntime, M as errorUnexpected, d as errorHashMismatch, g as errorMarkerMissing, j as errorTargetMismatch, l as errorDriverRequired, o as errorContractValidationFailed, s as errorDatabaseConnectionRequired, t as CliStructuredError, u as errorFileNotFound } from \"./cli-errors-CihMAEVj.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-JJKxvT0q.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, n as closeQuietly, s as resolveContractPath, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { t as createProgressAdapter } from \"./progress-adapter-CjAeTxY_.mjs\";\nimport { t as createControlClient } from \"./client-C4Gh4PBz.mjs\";\nimport { c as formatVerifyOutput, i as formatSchemaVerifyOutput, r as formatSchemaVerifyJson, s as formatVerifyJson } from \"./verify-wUSBDQwh.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_TARGET_MISMATCH, createControlStack } from \"@internal/framework-components/control\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\n//#region src/utils/combine-verify-results.ts\n/**\n* Collapse the aggregate verifier's per-space contract-satisfaction results\n* into a single {@link VerifyDatabaseSchemaResult} for the CLI display\n* surface, and carry the deduplicated unclaimed-elements list alongside it.\n* Concatenates the issue lists across spaces; uses the app space's result as\n* the structural envelope (storage hash, target). Extras are already\n* stripped from each per-space result, so nothing here duplicates an\n* unclaimed element per space.\n*\n* **Unclaimed disposition.** In strict mode a non-empty `unclaimed` list fails\n* the combined verdict (`ok: false`); in lenient mode it is carried for\n* informational rendering only. The list itself is returned unchanged for the\n* renderer.\n*\n* **Summary policy.** Preserve the per-family phrasing whenever the\n* combined `ok` flag agrees with the app space's `ok` flag — this is\n* the common case (single-family deployments, single-app deployments)\n* and the family's \"satisfies / does not satisfy contract\" phrasing\n* stays user-visible. When the app passes but an extension fails (or\n* vice versa) the app's summary contradicts the envelope, so fall back\n* to the first failing space's summary. This keeps family phrasing\n* intact and the envelope internally consistent (`ok: false` ↔ failure\n* summary).\n*/\nfunction combineVerifyResults(perSpace, appSpaceId, strict, unclaimed) {\n\tconst appResult = perSpace.get(appSpaceId) ?? perSpace.values().next().value;\n\tif (appResult === void 0) throw new InternalError(\"Aggregate verifier returned no per-space verify results — this is a wiring bug.\");\n\tlet okAll = true;\n\tlet firstFailure;\n\tlet issues = [];\n\tlet warningIssues = [];\n\tfor (const [, result] of perSpace) {\n\t\tif (!result.ok) {\n\t\t\tokAll = false;\n\t\t\tif (firstFailure === void 0) firstFailure = result;\n\t\t}\n\t\tissues = [...issues, ...result.schema.issues];\n\t\twarningIssues = [...warningIssues, ...result.schema.warnings?.issues ?? []];\n\t}\n\tconst unclaimedFails = strict && unclaimed.length > 0;\n\tconst ok = okAll && !unclaimedFails;\n\tconst summary = okAll ? unclaimedFails ? `Database schema has ${unclaimed.length} unclaimed element${unclaimed.length === 1 ? \"\" : \"s\"} (not in any contract)` : appResult.summary : appResult.ok ? firstFailure?.summary ?? appResult.summary : appResult.summary;\n\treturn {\n\t\tresult: {\n\t\t\tok,\n\t\t\t...ok ? {} : { code: appResult.code ?? \"CONTRACT.MARKER_REQUIRED\" },\n\t\t\tsummary,\n\t\t\tcontract: appResult.contract,\n\t\t\ttarget: appResult.target,\n\t\t\tschema: {\n\t\t\t\tissues,\n\t\t\t\twarnings: { issues: warningIssues }\n\t\t\t},\n\t\t\tmeta: { strict },\n\t\t\ttimings: { total: 0 }\n\t\t},\n\t\tunclaimed\n\t};\n}\n//#endregion\n//#region src/commands/db-verify.ts\n/**\n* Maps a VerifyDatabaseResult failure to a CliStructuredError.\n*/\nfunction mapVerifyFailure(verifyResult) {\n\tif (!verifyResult.ok && verifyResult.code) {\n\t\tif (verifyResult.code === VERIFY_CODE_MARKER_MISSING) return errorMarkerMissing();\n\t\tif (verifyResult.code === VERIFY_CODE_HASH_MISMATCH) {\n\t\t\tconst storageMatch = verifyResult.marker?.storageHash === verifyResult.contract.storageHash;\n\t\t\tconst profileMatch = !verifyResult.contract.profileHash || verifyResult.marker?.profileHash === verifyResult.contract.profileHash;\n\t\t\tif (!storageMatch) return errorHashMismatch({\n\t\t\t\twhy: \"Contract storageHash does not match database marker\",\n\t\t\t\texpected: verifyResult.contract.storageHash,\n\t\t\t\t...ifDefined(\"actual\", verifyResult.marker?.storageHash)\n\t\t\t});\n\t\t\treturn errorHashMismatch({\n\t\t\t\twhy: profileMatch ? \"Contract hash does not match database marker\" : \"Contract profileHash does not match database marker\",\n\t\t\t\t...ifDefined(\"expected\", verifyResult.contract.profileHash),\n\t\t\t\t...ifDefined(\"actual\", verifyResult.marker?.profileHash)\n\t\t\t});\n\t\t}\n\t\tif (verifyResult.code === VERIFY_CODE_TARGET_MISMATCH) return errorTargetMismatch(verifyResult.target.expected, verifyResult.target.actual ?? \"unknown\");\n\t}\n\treturn errorRuntime(\"CONTRACT.VERIFY_FAILED\", verifyResult.summary, {\n\t\twhy: \"Verification failed\",\n\t\tfix: \"Check contract and database state\"\n\t});\n}\nfunction errorInvalidVerifyMode(options) {\n\treturn new CliStructuredError(\"CLI.INVALID_VERIFY_MODE\", \"Invalid verify mode\", {\n\t\twhy: options.why,\n\t\tfix: options.fix,\n\t\tdocsUrl: \"https://pris.ly/db-verify\"\n\t});\n}\nfunction resolveDbVerifyMode(options) {\n\tif (options.markerOnly && options.schemaOnly) return notOk(errorInvalidVerifyMode({\n\t\twhy: \"`--marker-only` and `--schema-only` cannot be used together\",\n\t\tfix: \"Choose one mode: omit both to check the marker and schema, use `--marker-only` to check only the marker, or use `--schema-only` to check only the live schema.\"\n\t}));\n\tif (options.markerOnly && options.strict) return notOk(errorInvalidVerifyMode({\n\t\twhy: \"`--strict` requires schema verification, but `--marker-only` skips it\",\n\t\tfix: \"Remove `--strict`, or use `db verify` / `db verify --schema-only` when you want to check the live schema in strict mode.\"\n\t}));\n\tif (options.schemaOnly) return ok(\"schema-only\");\n\tif (options.markerOnly) return ok(\"marker-only\");\n\treturn ok(\"full\");\n}\nfunction formatDbVerifyModeLabel(mode, strict) {\n\tif (mode === \"marker-only\") return \"marker only\";\n\tif (mode === \"schema-only\") return `schema only (${strict ? \"strict\" : \"tolerant\"})`;\n\treturn `full (marker + schema, ${strict ? \"strict\" : \"tolerant\"})`;\n}\nfunction formatDbVerifyInvocation(mode, strict) {\n\tconst args = [\"db verify\"];\n\tif (mode === \"marker-only\") args.push(\"--marker-only\");\n\tif (mode === \"schema-only\") args.push(\"--schema-only\");\n\tif (strict) args.push(\"--strict\");\n\treturn args.join(\" \");\n}\nfunction createDbVerifyConnectionRequiredError(options) {\n\tconst invocation = formatDbVerifyInvocation(options.mode, options.strict);\n\treturn errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for ${invocation} (set db.connection in ${options.configPath}, or pass --db <url>)`,\n\t\tretryCommand: `prisma-next ${invocation} --db <url>`\n\t});\n}\nfunction renderVerifyHeader(paths, options, mode, flags, ui) {\n\tif (flags.json || flags.quiet) return;\n\tconst description = mode === \"schema-only\" ? \"Check whether the live database schema matches your contract\" : mode === \"marker-only\" ? \"Check whether the database marker matches your contract\" : \"Check whether the database marker and live schema match your contract\";\n\tconst details = [\n\t\t{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: paths.configPath\n\t\t},\n\t\t{\n\t\t\tlabel: \"contract\",\n\t\t\tvalue: paths.contractPath\n\t\t},\n\t\t{\n\t\t\tlabel: \"mode\",\n\t\t\tvalue: formatDbVerifyModeLabel(mode, options.strict ?? false)\n\t\t}\n\t];\n\tif (options.db) details.push({\n\t\tlabel: \"database\",\n\t\tvalue: maskConnectionUrl(options.db)\n\t});\n\tui.stderr(formatStyledHeader({\n\t\tcommand: \"db verify\",\n\t\tdescription,\n\t\turl: \"https://pris.ly/db-verify\",\n\t\tdetails,\n\t\tflags\n\t}));\n}\nasync function resolveVerifyPaths(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst configPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\tconst contractPathAbsolute = resolveContractPath(config);\n\treturn ok({\n\t\tconfig,\n\t\tconfigPath,\n\t\tcontractPathAbsolute,\n\t\tcontractPath: relative(process.cwd(), contractPathAbsolute)\n\t});\n}\nasync function resolveVerifySetup(paths, options, mode) {\n\tconst { config, configPath, contractPathAbsolute, contractPath } = paths;\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorFileNotFound(contractPathAbsolute, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: `Run \\`prisma-next contract emit\\` to generate ${contractPath}, or update \\`config.contract.output\\` in ${configPath}`\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read contract file: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tlet contractJson;\n\ttry {\n\t\tcontractJson = familyInstance.deserializeContract(JSON.parse(contractJsonContent));\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.VALIDATION_FAILED\") return notOk(errorContractValidationFailed(`Contract validation failed: ${error.message}`, { where: { path: contractPathAbsolute } }));\n\t\treturn notOk(errorContractValidationFailed(`Contract JSON is invalid: ${error instanceof Error ? error.message : String(error)}`, { where: { path: contractPathAbsolute } }));\n\t}\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (typeof dbConnection !== \"string\" || dbConnection.length === 0) return notOk(createDbVerifyConnectionRequiredError({\n\t\tconfigPath,\n\t\tmode,\n\t\tstrict: options.strict ?? false\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${formatDbVerifyInvocation(mode, options.strict ?? false)}` }));\n\treturn ok({\n\t\t...paths,\n\t\tcontractJson,\n\t\tdbConnection\n\t});\n}\nfunction createVerifyClient(setup) {\n\treturn createControlClient({\n\t\tfamily: setup.config.family,\n\t\ttarget: setup.config.target,\n\t\tadapter: setup.config.adapter,\n\t\tdriver: setup.config.driver,\n\t\textensions: setup.config.extensions ?? []\n\t});\n}\nfunction wrapVerifyError(error, contractPathAbsolute, modeLabel) {\n\tif (CliStructuredError.is(error)) return notOk(error);\n\tif (isStructuredError(error) && error.code === \"CONTRACT.VALIDATION_FAILED\") return notOk(errorContractValidationFailed(`Contract validation failed: ${error.message}`, { where: { path: contractPathAbsolute } }));\n\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Unexpected error during ${modeLabel}: ${error instanceof Error ? error.message : String(error)}` }));\n}\n/**\n* Executes the db verify command and returns a structured Result.\n*/\nasync function executeDbVerifyCommand(options, flags, ui, mode) {\n\tconst startTime = Date.now();\n\tconst pathsResult = await resolveVerifyPaths(options);\n\tif (!pathsResult.ok) return pathsResult;\n\tconst paths = pathsResult.value;\n\trenderVerifyHeader(paths, options, mode, flags, ui);\n\tconst setupResult = await resolveVerifySetup(paths, options, mode);\n\tif (!setupResult.ok) return setupResult;\n\tconst { contractJson, dbConnection, contractPathAbsolute } = setupResult.value;\n\tconst { migrationsDir } = resolveMigrationPaths(options.config, setupResult.value.config, process.cwd());\n\tconst client = createVerifyClient(setupResult.value);\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tconst verifyResult = await client.verify({\n\t\t\tcontract: contractJson,\n\t\t\tconnection: dbConnection,\n\t\t\tonProgress\n\t\t});\n\t\tif (!verifyResult.ok) return notOk(mapVerifyFailure(verifyResult));\n\t\tconst aggregateResult = await client.dbVerify({\n\t\t\tcontract: contractJson,\n\t\t\tmigrationsDir,\n\t\t\tstrict: options.strict ?? false,\n\t\t\tskipSchema: mode === \"marker-only\",\n\t\t\tskipMarker: false,\n\t\t\tonProgress\n\t\t});\n\t\tif (!aggregateResult.ok) return notOk(aggregateResult.failure);\n\t\tif (mode === \"marker-only\") return ok({\n\t\t\tok: true,\n\t\t\tmode: \"marker-only\",\n\t\t\tsummary: \"Database marker matches contract\",\n\t\t\tcontract: verifyResult.contract,\n\t\t\tmarker: verifyResult.marker,\n\t\t\ttarget: verifyResult.target,\n\t\t\t...ifDefined(\"missingCodecs\", verifyResult.missingCodecs),\n\t\t\t...ifDefined(\"codecCoverageSkipped\", verifyResult.codecCoverageSkipped),\n\t\t\twarning: \"Schema verification skipped because --marker-only was provided\",\n\t\t\tmeta: {\n\t\t\t\t...verifyResult.meta ?? {},\n\t\t\t\tschemaVerification: \"skipped\"\n\t\t\t},\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t\tconst combined = combineVerifyResults(aggregateResult.value.schemaResults, aggregateResult.value.appSpaceId, options.strict ?? false, aggregateResult.value.unclaimed);\n\t\tif (!combined.result.ok) return notOk(combined);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tmode: \"full\",\n\t\t\tsummary: \"Database marker and schema match contract\",\n\t\t\tcontract: verifyResult.contract,\n\t\t\tmarker: verifyResult.marker,\n\t\t\ttarget: verifyResult.target,\n\t\t\t...ifDefined(\"missingCodecs\", verifyResult.missingCodecs),\n\t\t\t...ifDefined(\"codecCoverageSkipped\", verifyResult.codecCoverageSkipped),\n\t\t\tschema: {\n\t\t\t\tsummary: combined.result.summary,\n\t\t\t\tstrict: combined.result.meta?.strict ?? false,\n\t\t\t\twarnings: (combined.result.schema.warnings?.issues ?? []).map((issue) => issue.path.join(\"/\"))\n\t\t\t},\n\t\t\tunclaimed: combined.unclaimed,\n\t\t\tmeta: {\n\t\t\t\t...verifyResult.meta ?? {},\n\t\t\t\tschemaVerification: \"performed\"\n\t\t\t},\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t} catch (error) {\n\t\treturn wrapVerifyError(error, contractPathAbsolute, \"db verify\");\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nasync function executeDbSchemaOnlyVerifyCommand(options, flags, ui) {\n\tconst pathsResult = await resolveVerifyPaths(options);\n\tif (!pathsResult.ok) return pathsResult;\n\tconst paths = pathsResult.value;\n\trenderVerifyHeader(paths, options, \"schema-only\", flags, ui);\n\tconst setupResult = await resolveVerifySetup(paths, options, \"schema-only\");\n\tif (!setupResult.ok) return setupResult;\n\tconst { contractJson, dbConnection, contractPathAbsolute } = setupResult.value;\n\tconst { migrationsDir } = resolveMigrationPaths(options.config, setupResult.value.config, process.cwd());\n\tconst client = createVerifyClient(setupResult.value);\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\tconst aggregateResult = await client.dbVerify({\n\t\t\tcontract: contractJson,\n\t\t\tmigrationsDir,\n\t\t\tstrict: options.strict ?? false,\n\t\t\tskipSchema: false,\n\t\t\tskipMarker: true,\n\t\t\tonProgress\n\t\t});\n\t\tif (!aggregateResult.ok) return notOk(aggregateResult.failure);\n\t\treturn ok(combineVerifyResults(aggregateResult.value.schemaResults, aggregateResult.value.appSpaceId, options.strict ?? false, aggregateResult.value.unclaimed));\n\t} catch (error) {\n\t\treturn wrapVerifyError(error, contractPathAbsolute, \"db verify --schema-only\");\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createDbVerifyCommand() {\n\tconst command = new Command(\"verify\");\n\tsetCommandDescriptions(command, \"Check whether the database marker and live schema match your contract\", \"Verifies the database marker first, then checks the database schema matches your contract.\\nUse `--marker-only` for marker-only verification, `--schema-only` to skip marker checks and\\ninspect only the live schema, and `--strict` to fail if the database includes elements\\nnot present in the contract.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next db verify --db $DATABASE_URL\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --strict\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --schema-only\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --schema-only --strict\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --marker-only\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --json\"\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--marker-only\", \"Skip schema verification and only check the database marker\").option(\"--schema-only\", \"Skip marker verification and only check whether the live schema satisfies the contract\").option(\"--strict\", \"Strict mode: schema elements not present in the contract are considered an error\", false).action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst modeResult = resolveDbVerifyMode(options);\n\t\tif (!modeResult.ok) {\n\t\t\tconst exitCode = handleResult(modeResult, flags, ui);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tconst mode = modeResult.value;\n\t\tif (mode === \"schema-only\") {\n\t\t\tconst result = await executeDbSchemaOnlyVerifyCommand(options, flags, ui);\n\t\t\tconst exitCode = handleResult(result, flags, ui, (combined) => {\n\t\t\t\tif (flags.json) ui.output(formatSchemaVerifyJson(combined.result, combined.unclaimed));\n\t\t\t\telse {\n\t\t\t\t\tconst renderFlags = combined.result.ok ? flags : {\n\t\t\t\t\t\t...flags,\n\t\t\t\t\t\tquiet: false\n\t\t\t\t\t};\n\t\t\t\t\tconst output = formatSchemaVerifyOutput(combined.result, renderFlags, combined.unclaimed);\n\t\t\t\t\tif (output) ui.log(output);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (result.ok && !result.value.result.ok) process.exit(1);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tconst result = await executeDbVerifyCommand(options, flags, ui, mode);\n\t\tif (result.ok) {\n\t\t\tif (flags.json) ui.output(formatVerifyJson(result.value));\n\t\t\telse {\n\t\t\t\tconst output = formatVerifyOutput(result.value, flags);\n\t\t\t\tif (output) ui.log(output);\n\t\t\t}\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tif (CliStructuredError.is(result.failure)) {\n\t\t\tconst exitCode = handleResult(result, flags, ui);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tif (flags.json) ui.output(formatSchemaVerifyJson(result.failure.result, result.failure.unclaimed));\n\t\telse {\n\t\t\tconst output = formatSchemaVerifyOutput(result.failure.result, {\n\t\t\t\t...flags,\n\t\t\t\tquiet: false\n\t\t\t}, result.failure.unclaimed);\n\t\t\tif (output) ui.log(output);\n\t\t}\n\t\tprocess.exit(1);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createDbVerifyCommand as t };\n\n//# sourceMappingURL=db-verify-B33E7HXH.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,qBAAqB,UAAU,YAAY,QAAQ,WAAW;CACtE,MAAM,YAAY,SAAS,IAAI,UAAU,KAAK,SAAS,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;CACvE,IAAI,cAAc,KAAK,GAAG,MAAM,IAAI,cAAc,iFAAiF;CACnI,IAAI,QAAQ;CACZ,IAAI;CACJ,IAAI,SAAS,CAAC;CACd,IAAI,gBAAgB,CAAC;CACrB,KAAK,MAAM,GAAG,WAAW,UAAU;EAClC,IAAI,CAAC,OAAO,IAAI;GACf,QAAQ;GACR,IAAI,iBAAiB,KAAK,GAAG,eAAe;EAC7C;EACA,SAAS,CAAC,GAAG,QAAQ,GAAG,OAAO,OAAO,MAAM;EAC5C,gBAAgB,CAAC,GAAG,eAAe,GAAG,OAAO,OAAO,UAAU,UAAU,CAAC,CAAC;CAC3E;CACA,MAAM,iBAAiB,UAAU,UAAU,SAAS;CACpD,MAAM,KAAK,SAAS,CAAC;CACrB,MAAM,UAAU,QAAQ,iBAAiB,uBAAuB,UAAU,OAAO,oBAAoB,UAAU,WAAW,IAAI,KAAK,IAAI,0BAA0B,UAAU,UAAU,UAAU,KAAK,cAAc,WAAW,UAAU,UAAU,UAAU;CAC3P,OAAO;EACN,QAAQ;GACP;GACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,UAAU,QAAQ,2BAA2B;GAClE;GACA,UAAU,UAAU;GACpB,QAAQ,UAAU;GAClB,QAAQ;IACP;IACA,UAAU,EAAE,QAAQ,cAAc;GACnC;GACA,MAAM,EAAE,OAAO;GACf,SAAS,EAAE,OAAO,EAAE;EACrB;EACA;CACD;AACD;;;;AAM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OAAO,IAAI,IAAI;EACpE,IAAI,OAAO,IAAI;GACd,IAAI,MAAM,MAAM,GAAG,OAAO,iBAAiB,OAAO,KAAK,CAAC;QACnD;IACJ,MAAM,SAAS,mBAAmB,OAAO,OAAO,KAAK;IACrD,IAAI,QAAQ,GAAG,IAAI,MAAM;GAC1B;GACA,QAAQ,KAAK,CAAC;EACf;EACA,IAAIA,qBAAmB,GAAG,OAAO,OAAO,GAAG;GAC1C,MAAM,WAAW,aAAa,QAAQ,OAAO,EAAE;GAC/C,QAAQ,KAAK,QAAQ;EACtB;EACA,IAAI,MAAM,MAAM,GAAG,OAAO,uBAAuB,OAAO,QAAQ,QAAQ,OAAO,QAAQ,SAAS,CAAC;OAC5F;GACJ,MAAM,SAAS,yBAAyB,OAAO,QAAQ,QAAQ;IAC9D,GAAG;IACH,OAAO;GACR,GAAG,OAAO,QAAQ,SAAS;GAC3B,IAAI,QAAQ,GAAG,IAAI,MAAM;EAC1B;EACA,QAAQ,KAAK,CAAC;CACf,CAAC;CACD,OAAO;AACR"}
1
+ {"version":3,"file":"db-verify-CN4nmxxF-DSRWae0u.mjs","names":["errorRuntime","CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/db-verify-CN4nmxxF.mjs"],"sourcesContent":["import { D as errorRuntime, M as errorUnexpected, d as errorHashMismatch, g as errorMarkerMissing, j as errorTargetMismatch, l as errorDriverRequired, o as errorContractValidationFailed, s as errorDatabaseConnectionRequired, t as CliStructuredError, u as errorFileNotFound } from \"./cli-errors-C6_pH59O.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, n as closeQuietly, s as resolveContractPath, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { t as createProgressAdapter } from \"./progress-adapter-CjAeTxY_.mjs\";\nimport { t as createControlClient } from \"./client-BqhVohc5.mjs\";\nimport { c as formatVerifyOutput, i as formatSchemaVerifyOutput, r as formatSchemaVerifyJson, s as formatVerifyJson } from \"./verify-Cogr_Fj9.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile } from \"node:fs/promises\";\nimport { VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_TARGET_MISMATCH, createControlStack } from \"@internal/framework-components/control\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\n//#region src/utils/combine-verify-results.ts\n/**\n* Collapse the aggregate verifier's per-space contract-satisfaction results\n* into a single {@link VerifyDatabaseSchemaResult} for the CLI display\n* surface, and carry the deduplicated unclaimed-elements list alongside it.\n* Concatenates the issue lists across spaces; uses the app space's result as\n* the structural envelope (storage hash, target). Extras are already\n* stripped from each per-space result, so nothing here duplicates an\n* unclaimed element per space.\n*\n* **Unclaimed disposition.** In strict mode a non-empty `unclaimed` list fails\n* the combined verdict (`ok: false`); in lenient mode it is carried for\n* informational rendering only. The list itself is returned unchanged for the\n* renderer.\n*\n* **Summary policy.** Preserve the per-family phrasing whenever the\n* combined `ok` flag agrees with the app space's `ok` flag — this is\n* the common case (single-family deployments, single-app deployments)\n* and the family's \"satisfies / does not satisfy contract\" phrasing\n* stays user-visible. When the app passes but an extension fails (or\n* vice versa) the app's summary contradicts the envelope, so fall back\n* to the first failing space's summary. This keeps family phrasing\n* intact and the envelope internally consistent (`ok: false` ↔ failure\n* summary).\n*/\nfunction combineVerifyResults(perSpace, appSpaceId, strict, unclaimed) {\n\tconst appResult = perSpace.get(appSpaceId) ?? perSpace.values().next().value;\n\tif (appResult === void 0) throw new InternalError(\"Aggregate verifier returned no per-space verify results — this is a wiring bug.\");\n\tlet okAll = true;\n\tlet firstFailure;\n\tlet issues = [];\n\tlet warningIssues = [];\n\tfor (const [, result] of perSpace) {\n\t\tif (!result.ok) {\n\t\t\tokAll = false;\n\t\t\tif (firstFailure === void 0) firstFailure = result;\n\t\t}\n\t\tissues = [...issues, ...result.schema.issues];\n\t\twarningIssues = [...warningIssues, ...result.schema.warnings?.issues ?? []];\n\t}\n\tconst unclaimedFails = strict && unclaimed.length > 0;\n\tconst ok = okAll && !unclaimedFails;\n\tconst summary = okAll ? unclaimedFails ? `Database schema has ${unclaimed.length} unclaimed element${unclaimed.length === 1 ? \"\" : \"s\"} (not in any contract)` : appResult.summary : appResult.ok ? firstFailure?.summary ?? appResult.summary : appResult.summary;\n\treturn {\n\t\tresult: {\n\t\t\tok,\n\t\t\t...ok ? {} : { code: appResult.code ?? \"CONTRACT.MARKER_REQUIRED\" },\n\t\t\tsummary,\n\t\t\tcontract: appResult.contract,\n\t\t\ttarget: appResult.target,\n\t\t\tschema: {\n\t\t\t\tissues,\n\t\t\t\twarnings: { issues: warningIssues }\n\t\t\t},\n\t\t\tmeta: { strict },\n\t\t\ttimings: { total: 0 }\n\t\t},\n\t\tunclaimed\n\t};\n}\n//#endregion\n//#region src/commands/db-verify.ts\n/**\n* Maps a VerifyDatabaseResult failure to a CliStructuredError.\n*/\nfunction mapVerifyFailure(verifyResult) {\n\tif (!verifyResult.ok && verifyResult.code) {\n\t\tif (verifyResult.code === VERIFY_CODE_MARKER_MISSING) return errorMarkerMissing();\n\t\tif (verifyResult.code === VERIFY_CODE_HASH_MISMATCH) {\n\t\t\tconst storageMatch = verifyResult.marker?.storageHash === verifyResult.contract.storageHash;\n\t\t\tconst profileMatch = !verifyResult.contract.profileHash || verifyResult.marker?.profileHash === verifyResult.contract.profileHash;\n\t\t\tif (!storageMatch) return errorHashMismatch({\n\t\t\t\twhy: \"Contract storageHash does not match database marker\",\n\t\t\t\texpected: verifyResult.contract.storageHash,\n\t\t\t\t...ifDefined(\"actual\", verifyResult.marker?.storageHash)\n\t\t\t});\n\t\t\treturn errorHashMismatch({\n\t\t\t\twhy: profileMatch ? \"Contract hash does not match database marker\" : \"Contract profileHash does not match database marker\",\n\t\t\t\t...ifDefined(\"expected\", verifyResult.contract.profileHash),\n\t\t\t\t...ifDefined(\"actual\", verifyResult.marker?.profileHash)\n\t\t\t});\n\t\t}\n\t\tif (verifyResult.code === VERIFY_CODE_TARGET_MISMATCH) return errorTargetMismatch(verifyResult.target.expected, verifyResult.target.actual ?? \"unknown\");\n\t}\n\treturn errorRuntime(\"CONTRACT.VERIFY_FAILED\", verifyResult.summary, {\n\t\twhy: \"Verification failed\",\n\t\tfix: \"Check contract and database state\"\n\t});\n}\nfunction errorInvalidVerifyMode(options) {\n\treturn new CliStructuredError(\"CLI.INVALID_VERIFY_MODE\", \"Invalid verify mode\", {\n\t\twhy: options.why,\n\t\tfix: options.fix,\n\t\tdocsUrl: \"https://pris.ly/db-verify\"\n\t});\n}\nfunction resolveDbVerifyMode(options) {\n\tif (options.markerOnly && options.schemaOnly) return notOk(errorInvalidVerifyMode({\n\t\twhy: \"`--marker-only` and `--schema-only` cannot be used together\",\n\t\tfix: \"Choose one mode: omit both to check the marker and schema, use `--marker-only` to check only the marker, or use `--schema-only` to check only the live schema.\"\n\t}));\n\tif (options.markerOnly && options.strict) return notOk(errorInvalidVerifyMode({\n\t\twhy: \"`--strict` requires schema verification, but `--marker-only` skips it\",\n\t\tfix: \"Remove `--strict`, or use `db verify` / `db verify --schema-only` when you want to check the live schema in strict mode.\"\n\t}));\n\tif (options.schemaOnly) return ok(\"schema-only\");\n\tif (options.markerOnly) return ok(\"marker-only\");\n\treturn ok(\"full\");\n}\nfunction formatDbVerifyModeLabel(mode, strict) {\n\tif (mode === \"marker-only\") return \"marker only\";\n\tif (mode === \"schema-only\") return `schema only (${strict ? \"strict\" : \"tolerant\"})`;\n\treturn `full (marker + schema, ${strict ? \"strict\" : \"tolerant\"})`;\n}\nfunction formatDbVerifyInvocation(mode, strict) {\n\tconst args = [\"db verify\"];\n\tif (mode === \"marker-only\") args.push(\"--marker-only\");\n\tif (mode === \"schema-only\") args.push(\"--schema-only\");\n\tif (strict) args.push(\"--strict\");\n\treturn args.join(\" \");\n}\nfunction createDbVerifyConnectionRequiredError(options) {\n\tconst invocation = formatDbVerifyInvocation(options.mode, options.strict);\n\treturn errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for ${invocation} (set db.connection in ${options.configPath}, or pass --db <url>)`,\n\t\tretryCommand: `prisma-next ${invocation} --db <url>`\n\t});\n}\nfunction renderVerifyHeader(paths, options, mode, flags, ui) {\n\tif (flags.json || flags.quiet) return;\n\tconst description = mode === \"schema-only\" ? \"Check whether the live database schema matches your contract\" : mode === \"marker-only\" ? \"Check whether the database marker matches your contract\" : \"Check whether the database marker and live schema match your contract\";\n\tconst details = [\n\t\t{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: paths.configPath\n\t\t},\n\t\t{\n\t\t\tlabel: \"contract\",\n\t\t\tvalue: paths.contractPath\n\t\t},\n\t\t{\n\t\t\tlabel: \"mode\",\n\t\t\tvalue: formatDbVerifyModeLabel(mode, options.strict ?? false)\n\t\t}\n\t];\n\tif (options.db) details.push({\n\t\tlabel: \"database\",\n\t\tvalue: maskConnectionUrl(options.db)\n\t});\n\tui.stderr(formatStyledHeader({\n\t\tcommand: \"db verify\",\n\t\tdescription,\n\t\turl: \"https://pris.ly/db-verify\",\n\t\tdetails,\n\t\tflags\n\t}));\n}\nasync function resolveVerifyPaths(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst configPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\tconst contractPathAbsolute = resolveContractPath(config);\n\treturn ok({\n\t\tconfig,\n\t\tconfigPath,\n\t\tcontractPathAbsolute,\n\t\tcontractPath: relative(process.cwd(), contractPathAbsolute)\n\t});\n}\nasync function resolveVerifySetup(paths, options, mode) {\n\tconst { config, configPath, contractPathAbsolute, contractPath } = paths;\n\tlet contractJsonContent;\n\ttry {\n\t\tcontractJsonContent = await readFile(contractPathAbsolute, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return notOk(errorFileNotFound(contractPathAbsolute, {\n\t\t\twhy: `Contract file not found at ${contractPathAbsolute}`,\n\t\t\tfix: `Run \\`prisma-next contract emit\\` to generate ${contractPath}, or update \\`config.contract.output\\` in ${configPath}`\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read contract file: ${error instanceof Error ? error.message : String(error)}` }));\n\t}\n\tconst stack = createControlStack(config);\n\tconst familyInstance = config.family.create(stack);\n\tlet contractJson;\n\ttry {\n\t\tcontractJson = familyInstance.deserializeContract(JSON.parse(contractJsonContent));\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.VALIDATION_FAILED\") return notOk(errorContractValidationFailed(`Contract validation failed: ${error.message}`, { where: { path: contractPathAbsolute } }));\n\t\treturn notOk(errorContractValidationFailed(`Contract JSON is invalid: ${error instanceof Error ? error.message : String(error)}`, { where: { path: contractPathAbsolute } }));\n\t}\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (typeof dbConnection !== \"string\" || dbConnection.length === 0) return notOk(createDbVerifyConnectionRequiredError({\n\t\tconfigPath,\n\t\tmode,\n\t\tstrict: options.strict ?? false\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${formatDbVerifyInvocation(mode, options.strict ?? false)}` }));\n\treturn ok({\n\t\t...paths,\n\t\tcontractJson,\n\t\tdbConnection\n\t});\n}\nfunction createVerifyClient(setup) {\n\treturn createControlClient({\n\t\tfamily: setup.config.family,\n\t\ttarget: setup.config.target,\n\t\tadapter: setup.config.adapter,\n\t\tdriver: setup.config.driver,\n\t\textensions: setup.config.extensions ?? []\n\t});\n}\nfunction wrapVerifyError(error, contractPathAbsolute, modeLabel) {\n\tif (CliStructuredError.is(error)) return notOk(error);\n\tif (isStructuredError(error) && error.code === \"CONTRACT.VALIDATION_FAILED\") return notOk(errorContractValidationFailed(`Contract validation failed: ${error.message}`, { where: { path: contractPathAbsolute } }));\n\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Unexpected error during ${modeLabel}: ${error instanceof Error ? error.message : String(error)}` }));\n}\n/**\n* Executes the db verify command and returns a structured Result.\n*/\nasync function executeDbVerifyCommand(options, flags, ui, mode) {\n\tconst startTime = Date.now();\n\tconst pathsResult = await resolveVerifyPaths(options);\n\tif (!pathsResult.ok) return pathsResult;\n\tconst paths = pathsResult.value;\n\trenderVerifyHeader(paths, options, mode, flags, ui);\n\tconst setupResult = await resolveVerifySetup(paths, options, mode);\n\tif (!setupResult.ok) return setupResult;\n\tconst { contractJson, dbConnection, contractPathAbsolute } = setupResult.value;\n\tconst { migrationsDir } = resolveMigrationPaths(options.config, setupResult.value.config, process.cwd());\n\tconst client = createVerifyClient(setupResult.value);\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tconst verifyResult = await client.verify({\n\t\t\tcontract: contractJson,\n\t\t\tconnection: dbConnection,\n\t\t\tonProgress\n\t\t});\n\t\tif (!verifyResult.ok) return notOk(mapVerifyFailure(verifyResult));\n\t\tconst aggregateResult = await client.dbVerify({\n\t\t\tcontract: contractJson,\n\t\t\tmigrationsDir,\n\t\t\tstrict: options.strict ?? false,\n\t\t\tskipSchema: mode === \"marker-only\",\n\t\t\tskipMarker: false,\n\t\t\tonProgress\n\t\t});\n\t\tif (!aggregateResult.ok) return notOk(aggregateResult.failure);\n\t\tif (mode === \"marker-only\") return ok({\n\t\t\tok: true,\n\t\t\tmode: \"marker-only\",\n\t\t\tsummary: \"Database marker matches contract\",\n\t\t\tcontract: verifyResult.contract,\n\t\t\tmarker: verifyResult.marker,\n\t\t\ttarget: verifyResult.target,\n\t\t\t...ifDefined(\"missingCodecs\", verifyResult.missingCodecs),\n\t\t\t...ifDefined(\"codecCoverageSkipped\", verifyResult.codecCoverageSkipped),\n\t\t\twarning: \"Schema verification skipped because --marker-only was provided\",\n\t\t\tmeta: {\n\t\t\t\t...verifyResult.meta ?? {},\n\t\t\t\tschemaVerification: \"skipped\"\n\t\t\t},\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t\tconst combined = combineVerifyResults(aggregateResult.value.schemaResults, aggregateResult.value.appSpaceId, options.strict ?? false, aggregateResult.value.unclaimed);\n\t\tif (!combined.result.ok) return notOk(combined);\n\t\treturn ok({\n\t\t\tok: true,\n\t\t\tmode: \"full\",\n\t\t\tsummary: \"Database marker and schema match contract\",\n\t\t\tcontract: verifyResult.contract,\n\t\t\tmarker: verifyResult.marker,\n\t\t\ttarget: verifyResult.target,\n\t\t\t...ifDefined(\"missingCodecs\", verifyResult.missingCodecs),\n\t\t\t...ifDefined(\"codecCoverageSkipped\", verifyResult.codecCoverageSkipped),\n\t\t\tschema: {\n\t\t\t\tsummary: combined.result.summary,\n\t\t\t\tstrict: combined.result.meta?.strict ?? false,\n\t\t\t\twarnings: (combined.result.schema.warnings?.issues ?? []).map((issue) => issue.path.join(\"/\"))\n\t\t\t},\n\t\t\tunclaimed: combined.unclaimed,\n\t\t\tmeta: {\n\t\t\t\t...verifyResult.meta ?? {},\n\t\t\t\tschemaVerification: \"performed\"\n\t\t\t},\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t} catch (error) {\n\t\treturn wrapVerifyError(error, contractPathAbsolute, \"db verify\");\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nasync function executeDbSchemaOnlyVerifyCommand(options, flags, ui) {\n\tconst pathsResult = await resolveVerifyPaths(options);\n\tif (!pathsResult.ok) return pathsResult;\n\tconst paths = pathsResult.value;\n\trenderVerifyHeader(paths, options, \"schema-only\", flags, ui);\n\tconst setupResult = await resolveVerifySetup(paths, options, \"schema-only\");\n\tif (!setupResult.ok) return setupResult;\n\tconst { contractJson, dbConnection, contractPathAbsolute } = setupResult.value;\n\tconst { migrationsDir } = resolveMigrationPaths(options.config, setupResult.value.config, process.cwd());\n\tconst client = createVerifyClient(setupResult.value);\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\tconst aggregateResult = await client.dbVerify({\n\t\t\tcontract: contractJson,\n\t\t\tmigrationsDir,\n\t\t\tstrict: options.strict ?? false,\n\t\t\tskipSchema: false,\n\t\t\tskipMarker: true,\n\t\t\tonProgress\n\t\t});\n\t\tif (!aggregateResult.ok) return notOk(aggregateResult.failure);\n\t\treturn ok(combineVerifyResults(aggregateResult.value.schemaResults, aggregateResult.value.appSpaceId, options.strict ?? false, aggregateResult.value.unclaimed));\n\t} catch (error) {\n\t\treturn wrapVerifyError(error, contractPathAbsolute, \"db verify --schema-only\");\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createDbVerifyCommand() {\n\tconst command = new Command(\"verify\");\n\tsetCommandDescriptions(command, \"Check whether the database marker and live schema match your contract\", \"Verifies the database marker first, then checks the database schema matches your contract.\\nUse `--marker-only` for marker-only verification, `--schema-only` to skip marker checks and\\ninspect only the live schema, and `--strict` to fail if the database includes elements\\nnot present in the contract.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next db verify --db $DATABASE_URL\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --strict\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --schema-only\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --schema-only --strict\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --marker-only\",\n\t\t\"prisma-next db verify --db $DATABASE_URL --json\"\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--marker-only\", \"Skip schema verification and only check the database marker\").option(\"--schema-only\", \"Skip marker verification and only check whether the live schema satisfies the contract\").option(\"--strict\", \"Strict mode: schema elements not present in the contract are considered an error\", false).action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst modeResult = resolveDbVerifyMode(options);\n\t\tif (!modeResult.ok) {\n\t\t\tconst exitCode = handleResult(modeResult, flags, ui);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tconst mode = modeResult.value;\n\t\tif (mode === \"schema-only\") {\n\t\t\tconst result = await executeDbSchemaOnlyVerifyCommand(options, flags, ui);\n\t\t\tconst exitCode = handleResult(result, flags, ui, (combined) => {\n\t\t\t\tif (flags.json) ui.output(formatSchemaVerifyJson(combined.result, combined.unclaimed));\n\t\t\t\telse {\n\t\t\t\t\tconst renderFlags = combined.result.ok ? flags : {\n\t\t\t\t\t\t...flags,\n\t\t\t\t\t\tquiet: false\n\t\t\t\t\t};\n\t\t\t\t\tconst output = formatSchemaVerifyOutput(combined.result, renderFlags, combined.unclaimed);\n\t\t\t\t\tif (output) ui.log(output);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (result.ok && !result.value.result.ok) process.exit(1);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tconst result = await executeDbVerifyCommand(options, flags, ui, mode);\n\t\tif (result.ok) {\n\t\t\tif (flags.json) ui.output(formatVerifyJson(result.value));\n\t\t\telse {\n\t\t\t\tconst output = formatVerifyOutput(result.value, flags);\n\t\t\t\tif (output) ui.log(output);\n\t\t\t}\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tif (CliStructuredError.is(result.failure)) {\n\t\t\tconst exitCode = handleResult(result, flags, ui);\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tif (flags.json) ui.output(formatSchemaVerifyJson(result.failure.result, result.failure.unclaimed));\n\t\telse {\n\t\t\tconst output = formatSchemaVerifyOutput(result.failure.result, {\n\t\t\t\t...flags,\n\t\t\t\tquiet: false\n\t\t\t}, result.failure.unclaimed);\n\t\t\tif (output) ui.log(output);\n\t\t}\n\t\tprocess.exit(1);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createDbVerifyCommand as t };\n\n//# sourceMappingURL=db-verify-CN4nmxxF.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,qBAAqB,UAAU,YAAY,QAAQ,WAAW;CACtE,MAAM,YAAY,SAAS,IAAI,UAAU,KAAK,SAAS,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;CACvE,IAAI,cAAc,KAAK,GAAG,MAAM,IAAI,cAAc,iFAAiF;CACnI,IAAI,QAAQ;CACZ,IAAI;CACJ,IAAI,SAAS,CAAC;CACd,IAAI,gBAAgB,CAAC;CACrB,KAAK,MAAM,GAAG,WAAW,UAAU;EAClC,IAAI,CAAC,OAAO,IAAI;GACf,QAAQ;GACR,IAAI,iBAAiB,KAAK,GAAG,eAAe;EAC7C;EACA,SAAS,CAAC,GAAG,QAAQ,GAAG,OAAO,OAAO,MAAM;EAC5C,gBAAgB,CAAC,GAAG,eAAe,GAAG,OAAO,OAAO,UAAU,UAAU,CAAC,CAAC;CAC3E;CACA,MAAM,iBAAiB,UAAU,UAAU,SAAS;CACpD,MAAM,KAAK,SAAS,CAAC;CACrB,MAAM,UAAU,QAAQ,iBAAiB,uBAAuB,UAAU,OAAO,oBAAoB,UAAU,WAAW,IAAI,KAAK,IAAI,0BAA0B,UAAU,UAAU,UAAU,KAAK,cAAc,WAAW,UAAU,UAAU,UAAU;CAC3P,OAAO;EACN,QAAQ;GACP;GACA,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,UAAU,QAAQ,2BAA2B;GAClE;GACA,UAAU,UAAU;GACpB,QAAQ,UAAU;GAClB,QAAQ;IACP;IACA,UAAU,EAAE,QAAQ,cAAc;GACnC;GACA,MAAM,EAAE,OA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Q,KAAK,QAAQ;EACtB;EACA,MAAM,SAAS,MAAM,uBAAuB,SAAS,OAAO,IAAI,IAAI;EACpE,IAAI,OAAO,IAAI;GACd,IAAI,MAAM,MAAM,GAAG,OAAO,iBAAiB,OAAO,KAAK,CAAC;QACnD;IACJ,MAAM,SAAS,mBAAmB,OAAO,OAAO,KAAK;IACrD,IAAI,QAAQ,GAAG,IAAI,MAAM;GAC1B;GACA,QAAQ,KAAK,CAAC;EACf;EACA,IAAIA,qBAAmB,GAAG,OAAO,OAAO,GAAG;GAC1C,MAAM,WAAW,aAAa,QAAQ,OAAO,EAAE;GAC/C,QAAQ,KAAK,QAAQ;EACtB;EACA,IAAI,MAAM,MAAM,GAAG,OAAO,uBAAuB,OAAO,QAAQ,QAAQ,OAAO,QAAQ,SAAS,CAAC;OAC5F;GACJ,MAAM,SAAS,yBAAyB,OAAO,QAAQ,QAAQ;IAC9D,GAAG;IACH,OAAO;GACR,GAAG,OAAO,QAAQ,SAAS;GAC3B,IAAI,QAAQ,GAAG,IAAI,MAAM;EAC1B;EACA,QAAQ,KAAK,CAAC;CACf,CAAC;CACD,OAAO;AACR"}
@@ -1,7 +1,7 @@
1
1
  import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
2
- import { N as errorUnexpected, O as errorRuntime$1 } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
3
- import { r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
4
- import { b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-Dw3LDEu_-B4AETH4D.mjs";
2
+ import { N as errorUnexpected, O as errorRuntime$1 } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
3
+ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
4
+ import { b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, y as setCommandDescriptions } from "./command-helpers-kD9CO1hd-BPhnkBin.mjs";
5
5
  import { relative, resolve } from "pathe";
6
6
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
7
7
  import { readFile, writeFile } from "node:fs/promises";
@@ -9,7 +9,7 @@ import { notOk, ok } from "@prisma/orm-framework/utils/result";
9
9
  import { Command } from "commander";
10
10
  import { EOL } from "node:os";
11
11
  import { format } from "@prisma/orm-framework/psl-parser/format";
12
- //#region ../../../1-framework/3-tooling/cli/dist/format-CYdgHub4.mjs
12
+ //#region ../../../1-framework/3-tooling/cli/dist/format-D5x0jz7q.mjs
13
13
  function resolveNewline(formatterNewline, eol) {
14
14
  if (formatterNewline !== void 0) return formatterNewline;
15
15
  return eol === "\r\n" ? "CRLF" : "LF";
@@ -104,4 +104,4 @@ function createFormatCommand() {
104
104
  //#endregion
105
105
  export { createFormatCommand as t };
106
106
 
107
- //# sourceMappingURL=format-CYdgHub4-Cs6VcFje.mjs.map
107
+ //# sourceMappingURL=format-D5x0jz7q-xalz6Fkn.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-CYdgHub4-Cs6VcFje.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/format-CYdgHub4.mjs"],"sourcesContent":["import { D as errorRuntime, M as errorUnexpected } from \"./cli-errors-CihMAEVj.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-JJKxvT0q.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, d as setCommandExamples, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-Dw3LDEu_.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { EOL } from \"node:os\";\nimport { format } from \"@internal/psl-parser/format\";\n//#region src/control-api/operations/format.ts\nfunction resolveNewline(formatterNewline, eol) {\n\tif (formatterNewline !== void 0) return formatterNewline;\n\treturn eol === \"\\r\\n\" ? \"CRLF\" : \"LF\";\n}\nasync function executeFormat(options) {\n\tconst eol = options.eol ?? EOL;\n\tconst config = options.config;\n\tconst source = config.contract?.source;\n\tif (source?.format !== \"psl\") return ok({ formatted: false });\n\tconst inputPath = source.inputs?.[0];\n\tif (inputPath === void 0) return ok({ formatted: false });\n\tlet contents;\n\ttry {\n\t\tcontents = await readFile(inputPath, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CONTRACT.SOURCE_LOAD_FAILED\", \"Failed to read contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} exists and is readable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst formatOptions = {\n\t\tindent: config.formatter?.indent ?? 2,\n\t\tnewline: resolveNewline(config.formatter?.newline, eol)\n\t};\n\tlet formatted;\n\ttry {\n\t\tformatted = format(contents, formatOptions);\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"PSL.PARSE_FAILED\") return notOk(errorRuntime(\"PSL.PARSE_FAILED\", \"Cannot format PSL with parse errors\", {\n\t\t\twhy: error.message,\n\t\t\tfix: \"Fix the parse errors in your schema and try again.\",\n\t\t\tmeta: { diagnostics: error.meta?.[\"diagnostics\"] },\n\t\t\tcause: error\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\ttry {\n\t\tawait writeFile(inputPath, formatted, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CLI.FILE_WRITE_FAILED\", \"Failed to write formatted contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} is writable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\treturn ok({\n\t\tformatted: true,\n\t\tpath: inputPath\n\t});\n}\n//#endregion\n//#region src/commands/format.ts\nasync function runFormat(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\"contract\", \"formatter\"]);\n\tif (!configResult.ok) return configResult;\n\treturn executeFormat({\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd()\n\t});\n}\nfunction createFormatCommand() {\n\tconst command = new Command(\"format\");\n\tsetCommandDescriptions(command, \"Format your PSL contract source\", \"Formats the Prisma schema (PSL) contract source declared in your config\\n(contract.source.inputs[0]) in place. Only runs when contract.source.format\\nis 'psl'; a TypeScript or unset source is left untouched. Indent and newline are\\nread from the optional formatter config section, defaulting to two spaces and the\\nsystem newline.\");\n\tsetCommandExamples(command, [\"prisma-next format\", \"prisma-next format --config ./custom-config.ts\"]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst displayConfigPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\t\t\tui.stderr(formatStyledHeader({\n\t\t\t\tcommand: \"format\",\n\t\t\t\tdescription: \"Format your PSL contract source\",\n\t\t\t\tdetails: [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: displayConfigPath\n\t\t\t\t}],\n\t\t\t\tflags\n\t\t\t}));\n\t\t}\n\t\tconst exitCode = handleResult(await runFormat(options), flags, ui, (value) => {\n\t\t\tif (flags.json) {\n\t\t\t\tui.output(JSON.stringify(value));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (flags.quiet) return;\n\t\t\tif (value.formatted) ui.success(`Formatted ${relative(process.cwd(), value.path ?? \"\")}`);\n\t\t\telse ui.info(\"Nothing to format (contract source is not PSL).\");\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createFormatCommand as t };\n\n//# sourceMappingURL=format-CYdgHub4.mjs.map"],"mappings":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CACD,OAAO;AACR"}
1
+ {"version":3,"file":"format-D5x0jz7q-xalz6Fkn.mjs","names":["errorRuntime"],"sources":["../../../../1-framework/3-tooling/cli/dist/format-D5x0jz7q.mjs"],"sourcesContent":["import { D as errorRuntime, M as errorUnexpected } from \"./cli-errors-C6_pH59O.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, d as setCommandExamples, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-kD9CO1hd.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { EOL } from \"node:os\";\nimport { format } from \"@internal/psl-parser/format\";\n//#region src/control-api/operations/format.ts\nfunction resolveNewline(formatterNewline, eol) {\n\tif (formatterNewline !== void 0) return formatterNewline;\n\treturn eol === \"\\r\\n\" ? \"CRLF\" : \"LF\";\n}\nasync function executeFormat(options) {\n\tconst eol = options.eol ?? EOL;\n\tconst config = options.config;\n\tconst source = config.contract?.source;\n\tif (source?.format !== \"psl\") return ok({ formatted: false });\n\tconst inputPath = source.inputs?.[0];\n\tif (inputPath === void 0) return ok({ formatted: false });\n\tlet contents;\n\ttry {\n\t\tcontents = await readFile(inputPath, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CONTRACT.SOURCE_LOAD_FAILED\", \"Failed to read contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} exists and is readable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\tconst formatOptions = {\n\t\tindent: config.formatter?.indent ?? 2,\n\t\tnewline: resolveNewline(config.formatter?.newline, eol)\n\t};\n\tlet formatted;\n\ttry {\n\t\tformatted = format(contents, formatOptions);\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"PSL.PARSE_FAILED\") return notOk(errorRuntime(\"PSL.PARSE_FAILED\", \"Cannot format PSL with parse errors\", {\n\t\t\twhy: error.message,\n\t\t\tfix: \"Fix the parse errors in your schema and try again.\",\n\t\t\tmeta: { diagnostics: error.meta?.[\"diagnostics\"] },\n\t\t\tcause: error\n\t\t}));\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error)));\n\t}\n\ttry {\n\t\tawait writeFile(inputPath, formatted, \"utf-8\");\n\t} catch (error) {\n\t\treturn notOk(errorRuntime(\"CLI.FILE_WRITE_FAILED\", \"Failed to write formatted contract source file\", {\n\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\tfix: `Check that ${inputPath} is writable.`,\n\t\t\tcause: error\n\t\t}));\n\t}\n\treturn ok({\n\t\tformatted: true,\n\t\tpath: inputPath\n\t});\n}\n//#endregion\n//#region src/commands/format.ts\nasync function runFormat(options) {\n\tconst configResult = await loadConfigForSections(options.config, [\"contract\", \"formatter\"]);\n\tif (!configResult.ok) return configResult;\n\treturn executeFormat({\n\t\tconfig: configResult.value,\n\t\tcwd: process.cwd()\n\t});\n}\nfunction createFormatCommand() {\n\tconst command = new Command(\"format\");\n\tsetCommandDescriptions(command, \"Format your PSL contract source\", \"Formats the Prisma schema (PSL) contract source declared in your config\\n(contract.source.inputs[0]) in place. Only runs when contract.source.format\\nis 'psl'; a TypeScript or unset source is left untouched. Indent and newline are\\nread from the optional formatter config section, defaulting to two spaces and the\\nsystem newline.\");\n\tsetCommandExamples(command, [\"prisma-next format\", \"prisma-next format --config ./custom-config.ts\"]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tif (!flags.json && !flags.quiet) {\n\t\t\tconst displayConfigPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\t\t\tui.stderr(formatStyledHeader({\n\t\t\t\tcommand: \"format\",\n\t\t\t\tdescription: \"Format your PSL contract source\",\n\t\t\t\tdetails: [{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: displayConfigPath\n\t\t\t\t}],\n\t\t\t\tflags\n\t\t\t}));\n\t\t}\n\t\tconst exitCode = handleResult(await runFormat(options), flags, ui, (value) => {\n\t\t\tif (flags.json) {\n\t\t\t\tui.output(JSON.stringify(value));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (flags.quiet) return;\n\t\t\tif (value.formatted) ui.success(`Formatted ${relative(process.cwd(), value.path ?? \"\")}`);\n\t\t\telse ui.info(\"Nothing to format (contract source is not PSL).\");\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { createFormatCommand as t };\n\n//# sourceMappingURL=format-D5x0jz7q.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,eAAe,kBAAkB,KAAK;CAC9C,IAAI,qBAAqB,KAAK,GAAG,OAAO;CACxC,OAAO,QAAQ,SAAS,SAAS;AAClC;AACA,eAAe,cAAc,SAAS;CACrC,MAAM,MAAM,QAAQ,OAAO;CAC3B,MAAM,SAAS,QAAQ;CACvB,MAAM,SAAS,OAAO,UAAU;CAChC,IAAI,QAAQ,WAAW,OAAO,OAAO,GAAG,EAAE,WAAW,MAAM,CAAC;CAC5D,MAAM,YAAY,OAAO,SAAS;CAClC,IAAI,cAAc,KAAK,GAAG,OAAO,GAAG,EAAE,WAAW,MAAM,CAAC;CACxD,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,SAAS,WAAW,OAAO;CAC7C,SAAS,OAAO;EACf,OAAO,MAAMA,eAAa,+BAA+B,uCAAuC;GAC/F,KAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC1D,KAAK,cAAc,UAAU;GAC7B,OAAO;EACR,CAAC,CAAC;CACH;CACA,MAAM,gB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MAAM,QAAQ,CAAC,MAAM,OAAO;GAChC,MAAM,oBAAoB,QAAQ,SAAS,SAAS,QAAQ,IAAI,GAAG,QAAQ,QAAQ,MAAM,CAAC,IAAI;GAC9F,GAAG,OAAO,mBAAmB;IAC5B,SAAS;IACT,aAAa;IACb,SAAS,CAAC;KACT,OAAO;KACP,OAAO;IACR,CAAC;IACD;GACD,CAAC,CAAC;EACH;EACA,MAAM,WAAW,aAAa,MAAM,UAAU,OAAO,GAAG,OAAO,KAAK,UAAU;GAC7E,IAAI,MAAM,MAAM;IACf,GAAG,OAAO,KAAK,UAAU,KAAK,CAAC;IAC/B;GACD;GACA,IAAI,MAAM,OAAO;GACjB,IAAI,MAAM,WAAW,GAAG,QAAQ,aAAa,SAAS,QAAQ,IAAI,GAAG,MAAM,QAAQ,EAAE,GAAG;QACnF,GAAG,KAAK,iDAAiD;EAC/D,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
@@ -1,6 +1,6 @@
1
- import { a as errorConfigValidation } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
1
+ import { a as errorConfigValidation } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
2
  import "@prisma/orm-framework/components/components";
3
- //#region ../../../1-framework/3-tooling/cli/dist/framework-components-CXxMNF8E.mjs
3
+ //#region ../../../1-framework/3-tooling/cli/dist/framework-components-CPFWl2Ix.mjs
4
4
  /**
5
5
  * Asserts that all framework components are compatible with the expected family and target.
6
6
  *
@@ -57,4 +57,4 @@ function assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId,
57
57
  //#endregion
58
58
  export { assertFrameworkComponentsCompatible as t };
59
59
 
60
- //# sourceMappingURL=framework-components-CXxMNF8E-C-g2cchI.mjs.map
60
+ //# sourceMappingURL=framework-components-CPFWl2Ix-CrIZL3jG.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"framework-components-CXxMNF8E-C-g2cchI.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-CXxMNF8E.mjs"],"sourcesContent":["import { i as errorConfigValidation } from \"./cli-errors-CihMAEVj.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via the config loader's `collectConfigIssues` diagnostics) and compile-time\n* type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const configResult = await loadConfigForSections(undefined, ['family', 'target', 'adapter', 'extensions']);\n* const config = configResult.assertOk();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-CXxMNF8E.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"framework-components-CPFWl2Ix-CrIZL3jG.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/framework-components-CPFWl2Ix.mjs"],"sourcesContent":["import { i as errorConfigValidation } from \"./cli-errors-C6_pH59O.mjs\";\nimport \"@internal/framework-components/components\";\n//#region src/utils/framework-components.ts\n/**\n* Asserts that all framework components are compatible with the expected family and target.\n*\n* This function validates that each component in the framework components array:\n* - Has kind 'target', 'adapter', 'extension', or 'driver'\n* - Has familyId matching expectedFamilyId\n* - Has targetId matching expectedTargetId\n*\n* This validation happens at the CLI composition boundary, before passing components\n* to typed planner/runner instances. It fills the gap between runtime validation\n* (via the config loader's `collectConfigIssues` diagnostics) and compile-time\n* type enforcement.\n*\n* @param expectedFamilyId - The expected family ID (e.g., 'sql')\n* @param expectedTargetId - The expected target ID (e.g., 'postgres')\n* @param frameworkComponents - Array of framework components to validate\n* @returns The same array typed as TargetBoundComponentDescriptor\n* @throws CliStructuredError if any component is incompatible\n*\n* @example\n* ```ts\n* const configResult = await loadConfigForSections(undefined, ['family', 'target', 'adapter', 'extensions']);\n* const config = configResult.assertOk();\n* const frameworkComponents = [config.target, config.adapter, ...(config.extensions ?? [])];\n*\n* // Validate and type-narrow components before passing to planner\n* const typedComponents = assertFrameworkComponentsCompatible(\n* config.family.familyId,\n* config.target.targetId,\n* frameworkComponents\n* );\n*\n* const planner = target.migrations.createPlanner(familyInstance);\n* planner.plan({ contract, schema, policy, frameworkComponents: typedComponents });\n* ```\n*/\nfunction assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId, frameworkComponents) {\n\tfor (let i = 0; i < frameworkComponents.length; i++) {\n\t\tconst component = frameworkComponents[i];\n\t\tif (typeof component !== \"object\" || component === null) throw errorConfigValidation(\"frameworkComponents[]\", { why: `Framework component at index ${i} must be an object` });\n\t\tconst record = component;\n\t\tif (!Object.hasOwn(record, \"kind\")) throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} must have 'kind' property` });\n\t\tconst kind = record[\"kind\"];\n\t\tif (kind !== \"target\" && kind !== \"adapter\" && kind !== \"extension\" && kind !== \"driver\") throw errorConfigValidation(\"frameworkComponents[].kind\", { why: `Framework component at index ${i} has invalid kind '${String(kind)}' (must be 'target', 'adapter', 'extension', or 'driver')` });\n\t\tif (!Object.hasOwn(record, \"familyId\")) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'familyId' property` });\n\t\tconst familyId = record[\"familyId\"];\n\t\tif (familyId !== expectedFamilyId) throw errorConfigValidation(\"frameworkComponents[].familyId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has familyId '${String(familyId)}' but expected '${expectedFamilyId}'` });\n\t\tif (!Object.hasOwn(record, \"targetId\")) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) must have 'targetId' property` });\n\t\tconst targetId = record[\"targetId\"];\n\t\tif (targetId !== expectedTargetId) throw errorConfigValidation(\"frameworkComponents[].targetId\", { why: `Framework component at index ${i} (kind: ${String(kind)}) has targetId '${String(targetId)}' but expected '${expectedTargetId}'` });\n\t}\n\treturn frameworkComponents;\n}\n//#endregion\nexport { assertFrameworkComponentsCompatible as t };\n\n//# sourceMappingURL=framework-components-CPFWl2Ix.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,oCAAoC,kBAAkB,kBAAkB,qBAAqB;CACrG,KAAK,IAAI,IAAI,GAAG,IAAI,oBAAoB,QAAQ,KAAK;EACpD,MAAM,YAAY,oBAAoB;EACtC,IAAI,OAAO,cAAc,YAAY,cAAc,MAAM,MAAM,sBAAsB,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,oBAAoB,CAAC;EAC5K,MAAM,SAAS;EACf,IAAI,CAAC,OAAO,OAAO,QAAQ,MAAM,GAAG,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,4BAA4B,CAAC;EACpK,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,SAAS,aAAa,SAAS,eAAe,SAAS,UAAU,MAAM,sBAAsB,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,qBAAqB,OAAO,IAAI,EAAE,2DAA2D,CAAC;EAC3R,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;EAC3O,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,iCAAiC,CAAC;EACxM,MAAM,WAAW,OAAO;EACxB,IAAI,aAAa,kBAAkB,MAAM,sBAAsB,kCAAkC,EAAE,KAAK,gCAAgC,EAAE,UAAU,OAAO,IAAI,EAAE,kBAAkB,OAAO,QAAQ,EAAE,kBAAkB,iBAAiB,GAAG,CAAC;CAC5O;CACA,OAAO;AACR"}
@@ -1,5 +1,5 @@
1
- import { t as CliStructuredError$1 } from "./cli-errors-CihMAEVj-C1uUYBop.mjs";
2
- import { a as formatErrorJson, o as formatErrorOutput, r as createTerminalUI } from "./terminal-ui-JJKxvT0q-CPDEJqqU.mjs";
1
+ import { t as CliStructuredError$1 } from "./cli-errors-C6_pH59O-CzD4SYcJ.mjs";
2
+ import { a as formatErrorJson, o as formatErrorOutput, r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
3
3
  import { i as renderInitOutro, n as buildNextSteps, r as formatInitJson, t as InitOutputSchema } from "./output-DWNYqZGc-D2sRgLAm.mjs";
4
4
  import { a as schemaSample, c as targetLabel, i as scaffoldSpecifierResolverFor, l as targetPackageName, n as dbFile, o as starterSchema, r as defaultSchemaPath, s as targetEntrypoint, t as configFile, u as version } from "./bin__prisma-next.mjs";
5
5
  import { createRequire } from "node:module";
@@ -15,7 +15,7 @@ import { execFile } from "node:child_process";
15
15
  import { promisify } from "node:util";
16
16
  import { detect, getUserAgent } from "package-manager-detector/detect";
17
17
  import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
18
- //#region ../../../1-framework/3-tooling/cli/dist/init-B8U_9kn7.mjs
18
+ //#region ../../../1-framework/3-tooling/cli/dist/init-BvLCfVjC.mjs
19
19
  const KNOWN = /* @__PURE__ */ new Set([
20
20
  "pnpm",
21
21
  "npm",
@@ -2182,7 +2182,7 @@ async function runEmit(ctx) {
2182
2182
  const spinner = ctx.ui.spinner();
2183
2183
  spinner.start("Emitting contract...");
2184
2184
  try {
2185
- const { executeContractEmit } = await import("./contract-emit-BAfPwP3y-DfV1Stry.mjs");
2185
+ const { executeContractEmit } = await import("./contract-emit-Csa6R0gt-DvxFlS0O.mjs");
2186
2186
  const { loadConfigForSections } = await import("./exports-BZLNbtkY.mjs").then((n) => n.t);
2187
2187
  const configFilePath = join(ctx.baseDir, "prisma-next.config.ts");
2188
2188
  const configResult = await loadConfigForSections(configFilePath, [
@@ -2249,4 +2249,4 @@ function sanitisePackageName(raw) {
2249
2249
  //#endregion
2250
2250
  export { runInit };
2251
2251
 
2252
- //# sourceMappingURL=init-B8U_9kn7-CdhTYHfO.mjs.map
2252
+ //# sourceMappingURL=init-BvLCfVjC-DOPO-TLF.mjs.map