@prisma/orm-toolchain 8.0.0-rc.1-dev.25 → 8.0.0-rc.1-dev.26
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.
- package/dist/bin__prisma-next.mjs +24 -24
- package/dist/bin__prisma-next.mjs.map +1 -1
- package/dist/{caught-errors-nYuTn3NK-DkD-ZrDr.mjs → caught-errors-B_oGFiYw-BqX49eW0.mjs} +3 -3
- package/dist/{caught-errors-nYuTn3NK-DkD-ZrDr.mjs.map → caught-errors-B_oGFiYw-BqX49eW0.mjs.map} +1 -1
- package/dist/{cli-errors-C7vbvQuK-DLpSxz4U.d.mts → cli-errors-C8DGzS94-CPP3UmRT.d.mts} +6 -5
- package/dist/cli-errors-C8DGzS94-CPP3UmRT.d.mts.map +1 -0
- package/dist/{cli-errors-kU09RUaz-CUkQ9XuM.mjs → cli-errors-CihMAEVj-C1uUYBop.mjs} +122 -28
- package/dist/cli-errors-CihMAEVj-C1uUYBop.mjs.map +1 -0
- package/dist/cli.mjs +383 -14
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__commands__contract-emit.mjs +1 -1
- package/dist/cli__commands__contract-infer.mjs +1 -1
- package/dist/cli__commands__db-init.mjs +1 -1
- package/dist/cli__commands__db-schema.mjs +1 -1
- package/dist/cli__commands__db-sign.mjs +1 -1
- package/dist/cli__commands__db-update.mjs +1 -1
- package/dist/cli__commands__db-verify.mjs +1 -1
- package/dist/cli__commands__migrate.d.mts +2 -2
- package/dist/cli__commands__migrate.mjs +1 -1
- package/dist/cli__commands__migration-check.d.mts +1 -1
- package/dist/cli__commands__migration-check.mjs +2 -2
- package/dist/cli__commands__migration-graph.d.mts +12 -10
- package/dist/cli__commands__migration-graph.d.mts.map +1 -1
- package/dist/cli__commands__migration-graph.mjs +1 -1
- package/dist/cli__commands__migration-list.d.mts +4 -4
- package/dist/cli__commands__migration-list.mjs +1 -1
- package/dist/cli__commands__migration-log.d.mts +4 -4
- package/dist/cli__commands__migration-log.mjs +1 -1
- package/dist/cli__commands__migration-new.mjs +1 -1
- package/dist/cli__commands__migration-plan.d.mts +1 -1
- package/dist/cli__commands__migration-plan.mjs +1 -1
- package/dist/cli__commands__migration-show.d.mts +1 -1
- package/dist/cli__commands__migration-show.mjs +1 -1
- package/dist/cli__commands__migration-status.d.mts +4 -4
- package/dist/cli__commands__migration-status.mjs +2 -2
- package/dist/cli__commands__ref.mjs +1 -1
- package/dist/cli__commands__telemetry.mjs +1 -1
- package/dist/cli__control-api.d.mts +33 -31
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +15 -15
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/{client-milNsAnF-B92uF3yv.mjs → client-CaIWFVnh-PVaTEvdx.mjs} +5 -5
- package/dist/{client-milNsAnF-B92uF3yv.mjs.map → client-CaIWFVnh-PVaTEvdx.mjs.map} +1 -1
- package/dist/{command-helpers-bGYd7Aab-BNSzfbHK.mjs → command-helpers-DutQjYgy-CDfFwtAa.mjs} +16 -5
- package/dist/{command-helpers-bGYd7Aab-BNSzfbHK.mjs.map → command-helpers-DutQjYgy-CDfFwtAa.mjs.map} +1 -1
- package/dist/{contract-at-errors-BTeDEXm4-BAIDia2-.mjs → contract-at-errors-BsQiGdZC-BY8u2is4.mjs} +3 -3
- package/dist/{contract-at-errors-BTeDEXm4-BAIDia2-.mjs.map → contract-at-errors-BsQiGdZC-BY8u2is4.mjs.map} +1 -1
- package/dist/contract-emit-BAfPwP3y-DfV1Stry.mjs +2 -0
- package/dist/{contract-emit-Ci-8sP-b-QzQXK2xQ.mjs → contract-emit-BJDLPMxp-qaGmQUQr.mjs} +6 -6
- package/dist/{contract-emit-Ci-8sP-b-QzQXK2xQ.mjs.map → contract-emit-BJDLPMxp-qaGmQUQr.mjs.map} +1 -1
- package/dist/{contract-emit-Bdf4DAR4-lKqkbfZT.mjs → contract-emit-WIAaN0lC-DKOdtrUQ.mjs} +5 -5
- package/dist/{contract-emit-Bdf4DAR4-lKqkbfZT.mjs.map → contract-emit-WIAaN0lC-DKOdtrUQ.mjs.map} +1 -1
- package/dist/{contract-infer-hhyMJiwS-BJ5cYC9P.mjs → contract-infer-B929dnCJ-KkT9frLY.mjs} +5 -5
- package/dist/{contract-infer-hhyMJiwS-BJ5cYC9P.mjs.map → contract-infer-B929dnCJ-KkT9frLY.mjs.map} +1 -1
- package/dist/{contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs → contract-snapshot-resolution-D2f9kGs0-BenF4tbi.mjs} +4 -4
- package/dist/{contract-snapshot-resolution-CyvX0DPz-BBQI_70j.mjs.map → contract-snapshot-resolution-D2f9kGs0-BenF4tbi.mjs.map} +1 -1
- package/dist/{contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs → contract-space-aggregate-loader-sF0OJ6oz-jRjdZoyZ.mjs} +4 -4
- package/dist/{contract-space-aggregate-loader-DOzo1sk9-CCPCubsg.mjs.map → contract-space-aggregate-loader-sF0OJ6oz-jRjdZoyZ.mjs.map} +1 -1
- package/dist/{db-init-3CbSYxRI-BlTkWh8n.mjs → db-init-CU_x-p2M-_6oEFLiG.mjs} +7 -7
- package/dist/db-init-CU_x-p2M-_6oEFLiG.mjs.map +1 -0
- package/dist/{db-schema-BVLbe3EL-WLnbuo77.mjs → db-schema-BKAn8UrM-DP4k7BAB.mjs} +6 -6
- package/dist/{db-schema-BVLbe3EL-WLnbuo77.mjs.map → db-schema-BKAn8UrM-DP4k7BAB.mjs.map} +1 -1
- package/dist/{db-sign-Cdw2RmoG-C-X5UheR.mjs → db-sign-BQF-jVXg-D467Bhpj.mjs} +9 -9
- package/dist/db-sign-BQF-jVXg-D467Bhpj.mjs.map +1 -0
- package/dist/{db-update-BHOdo8PV-BVBNKrJc.mjs → db-update-B0_Q4ykE-CT9vcaMu.mjs} +8 -8
- package/dist/db-update-B0_Q4ykE-CT9vcaMu.mjs.map +1 -0
- package/dist/{db-verify-C9P9oNCs-gieY7hV2.mjs → db-verify-C0DJc8z6-f3gZeEMD.mjs} +9 -9
- package/dist/db-verify-C0DJc8z6-f3gZeEMD.mjs.map +1 -0
- package/dist/{format-Ddhz7xFW-Bo1nhay8.mjs → format-SYdHyutg-IqXk-tDV.mjs} +5 -5
- package/dist/{format-Ddhz7xFW-Bo1nhay8.mjs.map → format-SYdHyutg-IqXk-tDV.mjs.map} +1 -1
- package/dist/{framework-components-Cruf6BPK-CaQvMI3T.mjs → framework-components-CXxMNF8E-C-g2cchI.mjs} +3 -3
- package/dist/{framework-components-Cruf6BPK-CaQvMI3T.mjs.map → framework-components-CXxMNF8E-C-g2cchI.mjs.map} +1 -1
- package/dist/{init-DjdnLDyf-2nVOeVG9.mjs → init-BvE3r7P6-CjJraEPP.mjs} +5 -5
- package/dist/{init-DjdnLDyf-2nVOeVG9.mjs.map → init-BvE3r7P6-CjJraEPP.mjs.map} +1 -1
- package/dist/{inspect-live-schema-BEQun_1x-CZpCgg8A.mjs → inspect-live-schema-D8d7aI6a-_Q_4S5wm.mjs} +6 -6
- package/dist/inspect-live-schema-D8d7aI6a-_Q_4S5wm.mjs.map +1 -0
- package/dist/{invariants-D5TNnX5E-rjPoJGFq.mjs → invariants-TW5CizTS-BsIpi4h4.mjs} +4 -4
- package/dist/{invariants-D5TNnX5E-rjPoJGFq.mjs.map → invariants-TW5CizTS-BsIpi4h4.mjs.map} +1 -1
- package/dist/{legend-BBtAETiW-BHqTbUjx.mjs → legend-QYDKKevn-DCIlAPn4.mjs} +3 -3
- package/dist/{legend-BBtAETiW-BHqTbUjx.mjs.map → legend-QYDKKevn-DCIlAPn4.mjs.map} +1 -1
- package/dist/{migrate-show-CUymfnbM-BbpcO2FY.mjs → migrate-show-C-fdCznr-BH88FGVn.mjs} +7 -7
- package/dist/migrate-show-C-fdCznr-BH88FGVn.mjs.map +1 -0
- package/dist/{migrate-show-g71Z4vJw-ocdTvf70.d.mts → migrate-show-DWIvU6Y_-BQyWhZD1.d.mts} +4 -4
- package/dist/{migrate-show-g71Z4vJw-ocdTvf70.d.mts.map → migrate-show-DWIvU6Y_-BQyWhZD1.d.mts.map} +1 -1
- package/dist/{migrate-B-hpVTxi-DJzFYT2w.mjs → migrate-vNMZJk7M-DKogRyOh.mjs} +14 -14
- package/dist/migrate-vNMZJk7M-DKogRyOh.mjs.map +1 -0
- package/dist/{migration-check-DHYPMUFe-Cni_ZUzB.mjs → migration-check-C-2GTAGq-Duc0P6Uo.mjs} +16 -16
- package/dist/migration-check-C-2GTAGq-Duc0P6Uo.mjs.map +1 -0
- package/dist/{migration-check-zgqYe3SB-B6LI6wY7.mjs → migration-check-DATj3HSn-Del6ZSln.mjs} +26 -21
- package/dist/migration-check-DATj3HSn-Del6ZSln.mjs.map +1 -0
- package/dist/{migration-command-scaffold-DsT7ke7B-D3u913Po.mjs → migration-command-scaffold-BezR8GWB-BZFB2PC-.mjs} +5 -5
- package/dist/{migration-command-scaffold-DsT7ke7B-D3u913Po.mjs.map → migration-command-scaffold-BezR8GWB-BZFB2PC-.mjs.map} +1 -1
- package/dist/{migration-graph-Dm9gU0oE-DxPD_SNA.mjs → migration-graph-B1mg_jel-HVG6FLD0.mjs} +20 -62
- package/dist/migration-graph-B1mg_jel-HVG6FLD0.mjs.map +1 -0
- package/dist/{migration-graph-CChCjts3-ERrIm5aT.mjs → migration-graph-BtP1Va3T-CMOZgqVW.mjs} +3 -3
- package/dist/{migration-graph-CChCjts3-ERrIm5aT.mjs.map → migration-graph-BtP1Va3T-CMOZgqVW.mjs.map} +1 -1
- package/dist/migration-graph-sections-BVqyqBHg-DAwWjIIf.mjs +67 -0
- package/dist/migration-graph-sections-BVqyqBHg-DAwWjIIf.mjs.map +1 -0
- package/dist/{migration-list-Bkase_ZM-D-bErpSr.mjs → migration-list-AKRIIovW-Cr39jOaI.mjs} +3 -3
- package/dist/{migration-list-Bkase_ZM-D-bErpSr.mjs.map → migration-list-AKRIIovW-Cr39jOaI.mjs.map} +1 -1
- package/dist/{migration-list-DDGUTC8Y-B_X7rkez.mjs → migration-list-RSlyGyvD-KKmZtdY1.mjs} +7 -7
- package/dist/{migration-list-DDGUTC8Y-B_X7rkez.mjs.map → migration-list-RSlyGyvD-KKmZtdY1.mjs.map} +1 -1
- package/dist/migration-log-CBfOcyPC-DTqCL1cs.mjs +123 -0
- package/dist/migration-log-CBfOcyPC-DTqCL1cs.mjs.map +1 -0
- package/dist/{migration-log-Cft50PRu-DcnHdxT4.mjs → migration-log-table-C0dSMG9T-BhBYrdka.mjs} +4 -120
- package/dist/migration-log-table-C0dSMG9T-BhBYrdka.mjs.map +1 -0
- package/dist/{migration-new-D9GHbYwF-C8D22HXG.mjs → migration-new-1LYliIXy-BK_Xz0Z6.mjs} +5 -5
- package/dist/{migration-new-D9GHbYwF-C8D22HXG.mjs.map → migration-new-1LYliIXy-BK_Xz0Z6.mjs.map} +1 -1
- package/dist/{migration-new-RorO1I8r-Ch8NQ4GQ.mjs → migration-new-DcPO4tiw-Bew7S-bj.mjs} +7 -7
- package/dist/{migration-new-RorO1I8r-Ch8NQ4GQ.mjs.map → migration-new-DcPO4tiw-Bew7S-bj.mjs.map} +1 -1
- package/dist/{migration-path-target-DhGt62Mi-dm4TU1hJ.mjs → migration-path-target-yA4h5Zc6-DlzBblBG.mjs} +7 -7
- package/dist/migration-path-target-yA4h5Zc6-DlzBblBG.mjs.map +1 -0
- package/dist/{migration-plan-BOhasCLr-GJWYoOA8.mjs → migration-plan-B0z2Qpa5-6b1SJSsb.mjs} +5 -5
- package/dist/{migration-plan-BOhasCLr-GJWYoOA8.mjs.map → migration-plan-B0z2Qpa5-6b1SJSsb.mjs.map} +1 -1
- package/dist/{migration-plan-DrCTzrXH-CDJbdiC6.mjs → migration-plan-Cb7s5Ifx-Bwa2O0Ov.mjs} +8 -8
- package/dist/{migration-plan-DrCTzrXH-CDJbdiC6.mjs.map → migration-plan-Cb7s5Ifx-Bwa2O0Ov.mjs.map} +1 -1
- package/dist/{migration-plan-t2e_8yD2-w5Ffa0V_.d.mts → migration-plan-s94qwFHi-86F_Aklp.d.mts} +4 -4
- package/dist/{migration-plan-t2e_8yD2-w5Ffa0V_.d.mts.map → migration-plan-s94qwFHi-86F_Aklp.d.mts.map} +1 -1
- package/dist/{migration-show-DRARjIbv-1p6EE_Uw.mjs → migration-show-BRy1GVBE-NuwoczhZ.mjs} +13 -22
- package/dist/migration-show-BRy1GVBE-NuwoczhZ.mjs.map +1 -0
- package/dist/{migration-status-Yh0eOQJN-YpcPDpNh.mjs → migration-status-Dob4onB1-0YkQF25g.mjs} +12 -12
- package/dist/migration-status-Dob4onB1-0YkQF25g.mjs.map +1 -0
- package/dist/{project-import-root--e8xli8Z-Bfrvrv67.mjs → project-import-root-Bkz1gPB2-jhrMFebo.mjs} +3 -3
- package/dist/{project-import-root--e8xli8Z-Bfrvrv67.mjs.map → project-import-root-Bkz1gPB2-jhrMFebo.mjs.map} +1 -1
- package/dist/{ref-Cu7Zc1Hv-_R4MnDfr.mjs → ref-B643Z0CS-CoJgdv7h.mjs} +5 -5
- package/dist/{ref-Cu7Zc1Hv-_R4MnDfr.mjs.map → ref-B643Z0CS-CoJgdv7h.mjs.map} +1 -1
- package/dist/{ref-BQcl8Ksv-BYZY0Ktb.mjs → ref-D9J4TNYz-Dk7HCAoq.mjs} +5 -5
- package/dist/{ref-BQcl8Ksv-BYZY0Ktb.mjs.map → ref-D9J4TNYz-Dk7HCAoq.mjs.map} +1 -1
- package/dist/{ref-resolution-BYCRg72z-DFhwf-XR.mjs → ref-resolution-Bi4lpxM8-BX-7sl0f.mjs} +3 -3
- package/dist/{ref-resolution-BYCRg72z-DFhwf-XR.mjs.map → ref-resolution-Bi4lpxM8-BX-7sl0f.mjs.map} +1 -1
- package/dist/{schemas-KhXMzNA_-CzZ7GFX_.mjs → schemas-BMkqaqvM-CLaqlat4.mjs} +9 -3
- package/dist/{schemas-KhXMzNA_-CzZ7GFX_.mjs.map → schemas-BMkqaqvM-CLaqlat4.mjs.map} +1 -1
- package/dist/{schemas-CeGMYFYX-h3OcU__O.d.mts → schemas-Bm2e3Hk1-qLKF0B36.d.mts} +16 -4
- package/dist/{schemas-CeGMYFYX-h3OcU__O.d.mts.map → schemas-Bm2e3Hk1-qLKF0B36.d.mts.map} +1 -1
- package/dist/{telemetry-Dh6e0ams-BsjGN3tQ.mjs → telemetry-DFEbk6sD-BYEW2bCJ.mjs} +4 -4
- package/dist/{telemetry-Dh6e0ams-BsjGN3tQ.mjs.map → telemetry-DFEbk6sD-BYEW2bCJ.mjs.map} +1 -1
- package/dist/{terminal-ui-ypPE9cN6-ilMBkmwT.mjs → terminal-ui-DQNCDg2u-B3PFqjB8.mjs} +10 -3
- package/dist/terminal-ui-DQNCDg2u-B3PFqjB8.mjs.map +1 -0
- package/dist/{verify-DBsKxZrK-eDPxNiSS.mjs → verify-TphNCyMu-h8vrnbud.mjs} +3 -3
- package/dist/{verify-DBsKxZrK-eDPxNiSS.mjs.map → verify-TphNCyMu-h8vrnbud.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/cli-errors-C7vbvQuK-DLpSxz4U.d.mts.map +0 -1
- package/dist/cli-errors-kU09RUaz-CUkQ9XuM.mjs.map +0 -1
- package/dist/contract-emit-E6m8HE42-Bfiodzf_.mjs +0 -2
- package/dist/db-init-3CbSYxRI-BlTkWh8n.mjs.map +0 -1
- package/dist/db-sign-Cdw2RmoG-C-X5UheR.mjs.map +0 -1
- package/dist/db-update-BHOdo8PV-BVBNKrJc.mjs.map +0 -1
- package/dist/db-verify-C9P9oNCs-gieY7hV2.mjs.map +0 -1
- package/dist/inspect-live-schema-BEQun_1x-CZpCgg8A.mjs.map +0 -1
- package/dist/migrate-B-hpVTxi-DJzFYT2w.mjs.map +0 -1
- package/dist/migrate-show-CUymfnbM-BbpcO2FY.mjs.map +0 -1
- package/dist/migration-check-DHYPMUFe-Cni_ZUzB.mjs.map +0 -1
- package/dist/migration-check-zgqYe3SB-B6LI6wY7.mjs.map +0 -1
- package/dist/migration-graph-Dm9gU0oE-DxPD_SNA.mjs.map +0 -1
- package/dist/migration-log-Cft50PRu-DcnHdxT4.mjs.map +0 -1
- package/dist/migration-path-target-DhGt62Mi-dm4TU1hJ.mjs.map +0 -1
- package/dist/migration-show-DRARjIbv-1p6EE_Uw.mjs.map +0 -1
- package/dist/migration-status-Yh0eOQJN-YpcPDpNh.mjs.map +0 -1
- package/dist/terminal-ui-ypPE9cN6-ilMBkmwT.mjs.map +0 -1
|
@@ -1,14 +1,52 @@
|
|
|
1
1
|
import { CliStructuredError as CliStructuredError$1, errorConfigValidation as errorConfigValidation$1, errorContractConfigMissing as errorContractConfigMissing$1, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorFileNotFound, errorInvalidOutputFormat, errorMigrationPlanningFailed, errorOutputFormatMutex, errorTargetMigrationNotSupported, errorUnexpected } from "@prisma/orm-framework/errors/control";
|
|
2
2
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
|
-
import { ERROR_CODE_DESTRUCTIVE_CHANGES, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorRunnerFailed, errorRuntime
|
|
3
|
+
import { ERROR_CODE_DESTRUCTIVE_CHANGES, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorRunnerFailed, errorRuntime as errorRuntime$1, errorTargetMismatch } from "@prisma/orm-framework/errors/execution";
|
|
4
4
|
import "@prisma/orm-framework/errors/migration";
|
|
5
|
-
//#region ../../../1-framework/3-tooling/cli/dist/cli-errors-
|
|
5
|
+
//#region ../../../1-framework/3-tooling/cli/dist/cli-errors-CihMAEVj.mjs
|
|
6
|
+
/**
|
|
7
|
+
* The typed remediation the CLI attaches to its own errors and findings.
|
|
8
|
+
* Constructors live here rather than in any library the CLI calls: naming a
|
|
9
|
+
* runnable invocation is something only the CLI can do.
|
|
10
|
+
*/
|
|
11
|
+
function runCommandAction(label, command) {
|
|
12
|
+
return {
|
|
13
|
+
kind: "run-command",
|
|
14
|
+
label,
|
|
15
|
+
command
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Advice the user acts on themselves — there is no command to run. */
|
|
19
|
+
function chooseAction(label) {
|
|
20
|
+
return {
|
|
21
|
+
kind: "user-choice",
|
|
22
|
+
label
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A CLI-raised error that carries the typed remediation as well as the prose.
|
|
27
|
+
* Only the CLI knows which invocation fixes a failure, so only errors raised
|
|
28
|
+
* here spell one; the foundation classes every library also raises keep
|
|
29
|
+
* carrying `code`, `why` and `fix` alone.
|
|
30
|
+
*
|
|
31
|
+
* Both fields are required: the `fix` prose is what the commander shell still
|
|
32
|
+
* renders, and the handler boundary drops it in favour of `nextActions` when it
|
|
33
|
+
* settles the engine's envelope.
|
|
34
|
+
*/
|
|
35
|
+
var ActionableCliError = class extends CliStructuredError$1 {
|
|
36
|
+
nextActions;
|
|
37
|
+
constructor(code, summary, options) {
|
|
38
|
+
super(code, summary, options);
|
|
39
|
+
this.nextActions = options.nextActions;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
6
42
|
function errorRefSetHashNotInGraph(resolvedHash, reachableHashes, graphTipHash) {
|
|
7
43
|
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
8
44
|
const fix = reachableHashes.length > 0 ? graphTipHash !== null ? `Set the ref to a graph-node hash such as ${graphTipHash}, or run \`prisma-next migration plan\` to extend the graph.` : "Set the ref to a hash that appears in the migration graph." : "Run `prisma-next migration plan` first.";
|
|
9
|
-
|
|
45
|
+
const nextActions = reachableHashes.length > 0 ? graphTipHash !== null ? [chooseAction(`Set the ref to a graph-node hash such as ${graphTipHash}`), runCommandAction("Extend the migration graph", "prisma-next migration plan")] : [chooseAction("Set the ref to a hash that appears in the migration graph")] : [runCommandAction("Plan the first migration", "prisma-next migration plan")];
|
|
46
|
+
return new ActionableCliError("MIGRATION.HASH_NOT_IN_GRAPH", `Resolved contract hash is not in the migration graph: ${resolvedHash}`, {
|
|
10
47
|
why: reachableHashes.length > 0 ? `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.` : "The migration graph is empty — no hashes reachable.",
|
|
11
48
|
fix,
|
|
49
|
+
nextActions,
|
|
12
50
|
meta: {
|
|
13
51
|
resolvedHash,
|
|
14
52
|
reachableHashes: [...reachableHashes],
|
|
@@ -17,9 +55,10 @@ function errorRefSetHashNotInGraph(resolvedHash, reachableHashes, graphTipHash)
|
|
|
17
55
|
});
|
|
18
56
|
}
|
|
19
57
|
function errorRefSetEmptySentinel(hash) {
|
|
20
|
-
return
|
|
58
|
+
return new ActionableCliError("MIGRATION.REF_SET_EMPTY_SENTINEL", `Cannot set ref to the empty-database sentinel: ${hash}`, {
|
|
21
59
|
why: "The empty-database sentinel is a planner internal; it is not a valid ref target.",
|
|
22
60
|
fix: "Set the ref to a contract hash from the migration graph, or use another ref name.",
|
|
61
|
+
nextActions: [chooseAction("Set the ref to a contract hash from the migration graph"), chooseAction("Or use another ref name")],
|
|
23
62
|
meta: { hash }
|
|
24
63
|
});
|
|
25
64
|
}
|
|
@@ -28,9 +67,10 @@ function errorRefSetEmptySentinel(hash) {
|
|
|
28
67
|
* The legend is human-only decoration on stderr.
|
|
29
68
|
*/
|
|
30
69
|
function errorLegendHumanOnly(conflictingFlag) {
|
|
31
|
-
return
|
|
70
|
+
return new ActionableCliError("MIGRATION.LEGEND_HUMAN_ONLY", "`--legend` is only available for human-readable output", {
|
|
32
71
|
why: `\`--legend\` prints a glyph key to stderr and cannot be combined with ${conflictingFlag}.`,
|
|
33
72
|
fix: `Omit ${conflictingFlag} to print the legend alongside the tree, or omit --legend when using ${conflictingFlag}.`,
|
|
73
|
+
nextActions: [chooseAction(`Omit ${conflictingFlag} to print the legend alongside the tree`), chooseAction(`Or omit --legend when using ${conflictingFlag}`)],
|
|
34
74
|
meta: { conflictingFlag }
|
|
35
75
|
});
|
|
36
76
|
}
|
|
@@ -41,9 +81,10 @@ function errorLegendHumanOnly(conflictingFlag) {
|
|
|
41
81
|
* directory with that name would be skipped by the enumerator.
|
|
42
82
|
*/
|
|
43
83
|
function errorInvalidSpaceId(spaceId) {
|
|
44
|
-
return
|
|
84
|
+
return new ActionableCliError("MIGRATION.INVALID_SPACE_ID", `Invalid contract space id: ${spaceId}`, {
|
|
45
85
|
why: "Contract space ids must match [a-z][a-z0-9_-]{0,63} (lowercase, starts with a letter, max 64 characters — the rule applied to every on-disk space directory).",
|
|
46
86
|
fix: "Pass a space id that matches the directory naming rule, or omit --space to list every space.",
|
|
87
|
+
nextActions: [chooseAction("Pass a space id matching [a-z][a-z0-9_-]{0,63}"), runCommandAction("Or list every space", "prisma-next migration list")],
|
|
47
88
|
meta: { spaceId }
|
|
48
89
|
});
|
|
49
90
|
}
|
|
@@ -61,28 +102,52 @@ function errorInvalidSpaceId(spaceId) {
|
|
|
61
102
|
function errorSpaceNotFound(spaceId, availableSpaces) {
|
|
62
103
|
const availableList = availableSpaces.length > 0 ? availableSpaces.join(", ") : "(none — no contract spaces on disk yet)";
|
|
63
104
|
const fix = availableSpaces.length > 0 ? `Pick one of: ${availableList}. Run \`prisma-next migration list\` (no --space) to see every space's migrations.` : "Author a migration with `prisma-next migration new` to create the first contract-space directory.";
|
|
64
|
-
|
|
105
|
+
const nextActions = availableSpaces.length > 0 ? [chooseAction(`Pick one of: ${availableList}`), runCommandAction("See every space's migrations", "prisma-next migration list")] : [runCommandAction("Author the first migration, which creates the contract-space directory", "prisma-next migration new")];
|
|
106
|
+
return new ActionableCliError("MIGRATION.SPACE_NOT_FOUND", `Unknown contract space: ${spaceId}`, {
|
|
65
107
|
why: `No directory named "${spaceId}" exists under the migrations root.`,
|
|
66
108
|
fix,
|
|
109
|
+
nextActions,
|
|
67
110
|
meta: {
|
|
68
111
|
spaceId,
|
|
69
112
|
availableSpaces: [...availableSpaces]
|
|
70
113
|
}
|
|
71
114
|
});
|
|
72
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* A `migration show` target resolved to a directory or a graph node, but no
|
|
118
|
+
* on-disk package was loaded for it.
|
|
119
|
+
*/
|
|
120
|
+
function errorMigrationPackageNotFound(why) {
|
|
121
|
+
return new ActionableCliError("MIGRATION.PACKAGE_NOT_FOUND", "Migration package not found", {
|
|
122
|
+
why,
|
|
123
|
+
fix: "Pass a directory name, hash prefix, or path to an on-disk app-space migration package.",
|
|
124
|
+
nextActions: [chooseAction("Pass a directory name, hash prefix, or path to an on-disk app-space migration package"), runCommandAction("List what is on disk", "prisma-next migration list")]
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** The app space has no migration packages at all, so no target can resolve. */
|
|
128
|
+
function errorNoMigrations(appMigrationsRelative) {
|
|
129
|
+
return new ActionableCliError("MIGRATION.NO_MIGRATIONS", "No migrations found", {
|
|
130
|
+
why: `No migration packages found in ${appMigrationsRelative}`,
|
|
131
|
+
fix: "Run `prisma-next migration plan` to create a migration first.",
|
|
132
|
+
nextActions: [runCommandAction("Create the first migration", "prisma-next migration plan")]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
73
135
|
function errorRefSetBundleNotFound(hash) {
|
|
74
|
-
return
|
|
136
|
+
return new ActionableCliError("MIGRATION.REF_SET_BUNDLE_NOT_FOUND", `No migration bundle matches graph-node hash ${hash}`, {
|
|
75
137
|
why: `The hash is a graph node but no on-disk bundle has metadata.to = ${hash}.`,
|
|
76
138
|
fix: "Run `pnpm fixtures:check`, or re-emit the migration that produces this hash so its bundle is restored.",
|
|
139
|
+
nextActions: [runCommandAction("Restore the checked-in fixtures", "pnpm fixtures:check"), chooseAction("Or re-emit the migration that produces this hash")],
|
|
77
140
|
meta: { hash }
|
|
78
141
|
});
|
|
79
142
|
}
|
|
80
143
|
function errorPlanForgotTheFlag(resolvedHash, reachableRefs, graphTipHash, options) {
|
|
81
144
|
const reachableList = reachableRefs.length > 0 ? reachableRefs.map((r) => `${r.name} (${r.hash})`).join(", ") : "(none)";
|
|
82
145
|
const refFix = reachableRefs.length > 0 ? `Run migration plan with ${reachableRefs.map((r) => `--from ${r.name}`).join(" or ")}.` : graphTipHash !== null ? `Run migration plan --from ${graphTipHash}.` : "Commit pending migrations first, then run migration plan.";
|
|
83
|
-
|
|
146
|
+
const nextActions = reachableRefs.length > 0 ? reachableRefs.map((ref) => runCommandAction(`Plan from ${ref.name}`, `prisma-next migration plan --from ${ref.name}`)) : graphTipHash !== null ? [runCommandAction("Plan from the graph tip", `prisma-next migration plan --from ${graphTipHash}`)] : [chooseAction("Commit pending migrations first, then run migration plan")];
|
|
147
|
+
return new ActionableCliError("MIGRATION.HASH_NOT_IN_GRAPH", `Resolved from-hash is not in the migration graph: ${resolvedHash}`, {
|
|
84
148
|
why: `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.`,
|
|
85
149
|
fix: refFix,
|
|
150
|
+
nextActions,
|
|
86
151
|
meta: {
|
|
87
152
|
resolvedHash,
|
|
88
153
|
reachableRefs: reachableRefs.map((r) => r.name),
|
|
@@ -102,9 +167,15 @@ function errorPlanForgotTheFlag(resolvedHash, reachableRefs, graphTipHash, optio
|
|
|
102
167
|
function errorSnapshotMissing(identifier, options) {
|
|
103
168
|
const viaRef = options?.viaRef !== false;
|
|
104
169
|
const fix = viaRef ? `Create the ref with "prisma-next ref set ${identifier} <hash>" (or advance it via "prisma-next db update --advance-ref ${identifier}"), or pass a hash that is a node in the migration graph.` : `No contract source exists for hash "${identifier}" on an empty migration graph. Use --from with a ref name (its contract resolves through the snapshot store), or run db update first.`;
|
|
105
|
-
|
|
170
|
+
const nextActions = viaRef ? [
|
|
171
|
+
runCommandAction(`Create the ref "${identifier}"`, `prisma-next ref set ${identifier} <hash>`),
|
|
172
|
+
runCommandAction("Or advance it from the database", `prisma-next db update --advance-ref ${identifier}`),
|
|
173
|
+
chooseAction("Or pass a hash that is a node in the migration graph")
|
|
174
|
+
] : [chooseAction("Pass --from a ref name, whose contract resolves through the snapshot store"), runCommandAction("Or populate the graph first", "prisma-next db update")];
|
|
175
|
+
return new ActionableCliError("MIGRATION.SNAPSHOT_MISSING", viaRef ? `Ref "${identifier}" is not resolvable` : `No contract source for from-hash "${identifier}"`, {
|
|
106
176
|
why: viaRef ? `Ref "${identifier}" has no pointer file, and the hash being resolved is not a node in the migration graph either.` : `Hash "${identifier}" is not a node in the migration graph (the graph is empty), and it does not name a ref either.`,
|
|
107
177
|
fix,
|
|
178
|
+
nextActions,
|
|
108
179
|
meta: {
|
|
109
180
|
identifier,
|
|
110
181
|
viaRef
|
|
@@ -115,13 +186,19 @@ function errorSnapshotMissing(identifier, options) {
|
|
|
115
186
|
function errorMarkerMismatch(markerHash, reachableHashes, graphTip) {
|
|
116
187
|
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
117
188
|
const planFromFix = graphTip !== null ? `Run \`prisma-next migration plan --from ${graphTip}\` if the live marker is canonical and the on-disk graph needs catching up.` : "Run `prisma-next migration plan` if the live marker is canonical and the on-disk graph needs catching up.";
|
|
118
|
-
|
|
189
|
+
const planCommand = graphTip !== null ? `prisma-next migration plan --from ${graphTip}` : "prisma-next migration plan";
|
|
190
|
+
return new ActionableCliError("MIGRATION.MARKER_MISMATCH", "Database marker is not reachable in the on-disk migration graph", {
|
|
119
191
|
why: `DB marker is ${markerHash}, but the on-disk migration graph reaches: ${reachableList}.`,
|
|
120
192
|
fix: [
|
|
121
193
|
planFromFix,
|
|
122
194
|
`Run \`prisma-next ref set db ${markerHash}\` if the on-disk graph is canonical and the local \`db\` ref drifted.`,
|
|
123
195
|
"Investigate whether the database was migrated by an out-of-band process."
|
|
124
196
|
].join("\n"),
|
|
197
|
+
nextActions: [
|
|
198
|
+
runCommandAction("Catch the on-disk graph up to the live marker", planCommand),
|
|
199
|
+
runCommandAction("Point the local db ref at the live marker", `prisma-next ref set db ${markerHash}`),
|
|
200
|
+
chooseAction("Investigate whether the database was migrated by an out-of-band process")
|
|
201
|
+
],
|
|
125
202
|
meta: {
|
|
126
203
|
markerHash,
|
|
127
204
|
reachableHashes: [...reachableHashes],
|
|
@@ -129,6 +206,8 @@ function errorMarkerMismatch(markerHash, reachableHashes, graphTip) {
|
|
|
129
206
|
}
|
|
130
207
|
});
|
|
131
208
|
}
|
|
209
|
+
const ROLLBACK_IS_DESTRUCTIVE = "A rollback (reverse) plan is expected to contain destructive (DROP) operations — review them before applying";
|
|
210
|
+
const NARROWER_CASES_NEED_A_HINT = "Narrower cases (rename inference, re-adding a required field without a safe default, or a type change that needs data) may additionally need a hint in the planned migration";
|
|
132
211
|
function errorPathUnreachable(failure) {
|
|
133
212
|
const meta = failure.meta ?? {};
|
|
134
213
|
const fromHashMeta = typeof meta["fromHash"] === "string" ? meta["fromHash"] : null;
|
|
@@ -145,16 +224,23 @@ function errorPathUnreachable(failure) {
|
|
|
145
224
|
return "prisma-next migration plan";
|
|
146
225
|
})();
|
|
147
226
|
const applyCommand = targetHash !== null && !neverPlanned ? `prisma-next migrate --to ${targetHash}` : "prisma-next migrate";
|
|
148
|
-
return
|
|
227
|
+
return new ActionableCliError("MIGRATION.PATH_UNREACHABLE", failure.summary, {
|
|
149
228
|
why: failure.why ?? `Cannot reach target "${targetHash ?? "<unknown>"}" from current marker "${fromHashMeta ?? "<unknown>"}".${deadEndsSuffix}`,
|
|
150
229
|
fix: [
|
|
151
230
|
"Plan the missing edge, then apply it:",
|
|
152
231
|
` 1. ${planCommand}`,
|
|
153
232
|
` 2. ${applyCommand}`,
|
|
154
|
-
|
|
155
|
-
|
|
233
|
+
`${ROLLBACK_IS_DESTRUCTIVE}.`,
|
|
234
|
+
`${NARROWER_CASES_NEED_A_HINT}.`,
|
|
156
235
|
"Inspect the on-disk graph with `prisma-next migration list`, or `prisma-next migration show <bundle>` for any bundle in the path you expected."
|
|
157
236
|
].join("\n"),
|
|
237
|
+
nextActions: [
|
|
238
|
+
runCommandAction("Plan the missing edge", planCommand),
|
|
239
|
+
runCommandAction("Apply it", applyCommand),
|
|
240
|
+
chooseAction(ROLLBACK_IS_DESTRUCTIVE),
|
|
241
|
+
chooseAction(NARROWER_CASES_NEED_A_HINT),
|
|
242
|
+
runCommandAction("Inspect the on-disk graph", "prisma-next migration list")
|
|
243
|
+
],
|
|
158
244
|
meta: { ...meta }
|
|
159
245
|
});
|
|
160
246
|
}
|
|
@@ -186,9 +272,10 @@ function requireLiveDatabase(args) {
|
|
|
186
272
|
*/
|
|
187
273
|
function errorAmbiguousMigrationRef(ref, spaceIds) {
|
|
188
274
|
const spaceList = spaceIds.join(", ");
|
|
189
|
-
return
|
|
275
|
+
return new ActionableCliError("MIGRATION.AMBIGUOUS_MIGRATION_REF", `Ambiguous migration reference: "${ref}" resolves in multiple spaces — qualify with --space <id>`, {
|
|
190
276
|
why: `"${ref}" matches migrations in spaces: ${spaceList}.`,
|
|
191
277
|
fix: `Qualify with --space <id> to select one space. Available matching spaces: ${spaceList}.`,
|
|
278
|
+
nextActions: [chooseAction(`Qualify with --space <id>, one of: ${spaceList}`)],
|
|
192
279
|
meta: {
|
|
193
280
|
ref,
|
|
194
281
|
spaceIds: [...spaceIds]
|
|
@@ -197,39 +284,46 @@ function errorAmbiguousMigrationRef(ref, spaceIds) {
|
|
|
197
284
|
}
|
|
198
285
|
function mapRefResolutionError(error) {
|
|
199
286
|
switch (error.kind) {
|
|
200
|
-
case "not-found":
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
287
|
+
case "not-found": {
|
|
288
|
+
const fix = error.grammar === "contract" ? "Provide a valid contract hash, ref name, or migration directory name." : "Provide a valid migration directory name or migration hash.";
|
|
289
|
+
return new ActionableCliError("MIGRATION.REF_NOT_FOUND", `Not a known ${error.grammar} reference: "${error.input}"`, {
|
|
290
|
+
why: `No ${error.grammar} matching "${error.input}" exists in the migration graph or refs index.`,
|
|
291
|
+
fix,
|
|
292
|
+
nextActions: [chooseAction(fix)],
|
|
293
|
+
meta: {
|
|
294
|
+
input: error.input,
|
|
295
|
+
grammar: error.grammar
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
case "ambiguous": return new ActionableCliError("MIGRATION.REF_AMBIGUOUS", `Ambiguous ${error.grammar} reference: "${error.input}"`, {
|
|
209
300
|
why: `"${error.input}" matches multiple ${error.grammar}s: ${error.candidates.join(", ")}`,
|
|
210
301
|
fix: "Provide a longer prefix or use the full hash to disambiguate.",
|
|
302
|
+
nextActions: [chooseAction("Provide a longer prefix or use the full hash to disambiguate")],
|
|
211
303
|
meta: {
|
|
212
304
|
input: error.input,
|
|
213
305
|
candidates: error.candidates,
|
|
214
306
|
grammar: error.grammar
|
|
215
307
|
}
|
|
216
308
|
});
|
|
217
|
-
case "wrong-grammar": return
|
|
309
|
+
case "wrong-grammar": return new ActionableCliError("MIGRATION.REF_WRONG_GRAMMAR", error.message, {
|
|
218
310
|
why: error.message,
|
|
219
311
|
fix: error.fix,
|
|
312
|
+
nextActions: [chooseAction(error.fix)],
|
|
220
313
|
meta: {
|
|
221
314
|
input: error.input,
|
|
222
315
|
expectedGrammar: error.expectedGrammar
|
|
223
316
|
}
|
|
224
317
|
});
|
|
225
|
-
case "invalid-format": return
|
|
318
|
+
case "invalid-format": return new ActionableCliError("MIGRATION.REF_INVALID_FORMAT", `Invalid reference format: "${error.input}"`, {
|
|
226
319
|
why: error.reason,
|
|
227
320
|
fix: "Provide a valid contract hash, ref name, or migration directory name.",
|
|
321
|
+
nextActions: [chooseAction("Provide a valid contract hash, ref name, or migration directory name")],
|
|
228
322
|
meta: { input: error.input }
|
|
229
323
|
});
|
|
230
324
|
}
|
|
231
325
|
}
|
|
232
326
|
//#endregion
|
|
233
|
-
export {
|
|
327
|
+
export { errorSpaceNotFound as A, errorPlanForgotTheFlag as C, errorRunnerFailed as D, errorRefSetHashNotInGraph as E, requireLiveDatabase as F, runCommandAction as I, errorTargetMismatch as M, errorUnexpected as N, errorRuntime$1 as O, mapRefResolutionError as P, errorPathUnreachable as S, errorRefSetEmptySentinel as T, errorMarkerMissing as _, errorConfigValidation$1 as a, errorNoMigrations as b, errorDatabaseConnectionRequired as c, errorFileNotFound as d, errorHashMismatch as f, errorMarkerMismatch as g, errorLegendHumanOnly as h, errorAmbiguousMigrationRef as i, errorTargetMigrationNotSupported as j, errorSnapshotMissing as k, errorDestructiveChanges as l, errorInvalidSpaceId as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorContractConfigMissing$1 as o, errorInvalidOutputFormat as p, chooseAction as r, errorContractValidationFailed as s, CliStructuredError$1 as t, errorDriverRequired as u, errorMigrationPackageNotFound as v, errorRefSetBundleNotFound as w, errorOutputFormatMutex as x, errorMigrationPlanningFailed as y };
|
|
234
328
|
|
|
235
|
-
//# sourceMappingURL=cli-errors-
|
|
329
|
+
//# sourceMappingURL=cli-errors-CihMAEVj-C1uUYBop.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-errors-CihMAEVj-C1uUYBop.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/cli-errors-CihMAEVj.mjs"],"sourcesContent":["import { CliStructuredError as CliStructuredError$1, errorConfigValidation, errorContractConfigMissing as errorContractConfigMissing$1, errorContractValidationFailed, errorDatabaseConnectionRequired, errorDriverRequired, errorFileNotFound, errorInvalidOutputFormat, errorMigrationPlanningFailed, errorOutputFormatMutex, errorTargetMigrationNotSupported, errorUnexpected } from \"@internal/errors/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { ERROR_CODE_DESTRUCTIVE_CHANGES, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorRunnerFailed, errorRuntime as errorRuntime$1, errorTargetMismatch } from \"@internal/errors/execution\";\nimport \"@internal/errors/migration\";\n//#region src/utils/next-actions.ts\n/**\n* The typed remediation the CLI attaches to its own errors and findings.\n* Constructors live here rather than in any library the CLI calls: naming a\n* runnable invocation is something only the CLI can do.\n*/\nfunction runCommandAction(label, command) {\n\treturn {\n\t\tkind: \"run-command\",\n\t\tlabel,\n\t\tcommand\n\t};\n}\n/** Advice the user acts on themselves — there is no command to run. */\nfunction chooseAction(label) {\n\treturn {\n\t\tkind: \"user-choice\",\n\t\tlabel\n\t};\n}\n//#endregion\n//#region src/utils/cli-errors.ts\n/**\n* A CLI-raised error that carries the typed remediation as well as the prose.\n* Only the CLI knows which invocation fixes a failure, so only errors raised\n* here spell one; the foundation classes every library also raises keep\n* carrying `code`, `why` and `fix` alone.\n*\n* Both fields are required: the `fix` prose is what the commander shell still\n* renders, and the handler boundary drops it in favour of `nextActions` when it\n* settles the engine's envelope.\n*/\nvar ActionableCliError = class extends CliStructuredError$1 {\n\tnextActions;\n\tconstructor(code, summary, options) {\n\t\tsuper(code, summary, options);\n\t\tthis.nextActions = options.nextActions;\n\t}\n};\nfunction errorRefSetHashNotInGraph(resolvedHash, reachableHashes, graphTipHash) {\n\tconst reachableList = reachableHashes.length > 0 ? reachableHashes.join(\", \") : \"(none — migration graph is empty)\";\n\tconst fix = reachableHashes.length > 0 ? graphTipHash !== null ? `Set the ref to a graph-node hash such as ${graphTipHash}, or run \\`prisma-next migration plan\\` to extend the graph.` : \"Set the ref to a hash that appears in the migration graph.\" : \"Run `prisma-next migration plan` first.\";\n\tconst nextActions = reachableHashes.length > 0 ? graphTipHash !== null ? [chooseAction(`Set the ref to a graph-node hash such as ${graphTipHash}`), runCommandAction(\"Extend the migration graph\", \"prisma-next migration plan\")] : [chooseAction(\"Set the ref to a hash that appears in the migration graph\")] : [runCommandAction(\"Plan the first migration\", \"prisma-next migration plan\")];\n\treturn new ActionableCliError(\"MIGRATION.HASH_NOT_IN_GRAPH\", `Resolved contract hash is not in the migration graph: ${resolvedHash}`, {\n\t\twhy: reachableHashes.length > 0 ? `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.` : \"The migration graph is empty — no hashes reachable.\",\n\t\tfix,\n\t\tnextActions,\n\t\tmeta: {\n\t\t\tresolvedHash,\n\t\t\treachableHashes: [...reachableHashes],\n\t\t\t...graphTipHash !== null ? { graphTipHash } : {}\n\t\t}\n\t});\n}\nfunction errorRefSetEmptySentinel(hash) {\n\treturn new ActionableCliError(\"MIGRATION.REF_SET_EMPTY_SENTINEL\", `Cannot set ref to the empty-database sentinel: ${hash}`, {\n\t\twhy: \"The empty-database sentinel is a planner internal; it is not a valid ref target.\",\n\t\tfix: \"Set the ref to a contract hash from the migration graph, or use another ref name.\",\n\t\tnextActions: [chooseAction(\"Set the ref to a contract hash from the migration graph\"), chooseAction(\"Or use another ref name\")],\n\t\tmeta: { hash }\n\t});\n}\n/**\n* `--legend` was combined with a machine-readable or silent output flag.\n* The legend is human-only decoration on stderr.\n*/\nfunction errorLegendHumanOnly(conflictingFlag) {\n\treturn new ActionableCliError(\"MIGRATION.LEGEND_HUMAN_ONLY\", \"`--legend` is only available for human-readable output\", {\n\t\twhy: `\\`--legend\\` prints a glyph key to stderr and cannot be combined with ${conflictingFlag}.`,\n\t\tfix: `Omit ${conflictingFlag} to print the legend alongside the tree, or omit --legend when using ${conflictingFlag}.`,\n\t\tnextActions: [chooseAction(`Omit ${conflictingFlag} to print the legend alongside the tree`), chooseAction(`Or omit --legend when using ${conflictingFlag}`)],\n\t\tmeta: { conflictingFlag }\n\t});\n}\n/**\n* `--space <id>` was given a value that doesn't satisfy the contract-space\n* naming rule (`[a-z][a-z0-9_-]{0,63}` per `isValidSpaceId`). Fires before\n* any fs work — the input is syntactically rejected the same way an on-disk\n* directory with that name would be skipped by the enumerator.\n*/\nfunction errorInvalidSpaceId(spaceId) {\n\treturn new ActionableCliError(\"MIGRATION.INVALID_SPACE_ID\", `Invalid contract space id: ${spaceId}`, {\n\t\twhy: \"Contract space ids must match [a-z][a-z0-9_-]{0,63} (lowercase, starts with a letter, max 64 characters — the rule applied to every on-disk space directory).\",\n\t\tfix: \"Pass a space id that matches the directory naming rule, or omit --space to list every space.\",\n\t\tnextActions: [chooseAction(\"Pass a space id matching [a-z][a-z0-9_-]{0,63}\"), runCommandAction(\"Or list every space\", \"prisma-next migration list\")],\n\t\tmeta: { spaceId }\n\t});\n}\n/**\n* `migration list --space <id>` was given a contract-space id that has no\n* directory under `migrations/`. Distinct from \"the space exists but is\n* empty\" — that path renders the empty-state line and exits 0 per the\n* slice spec § Empty-state. This error fires only when `<projectMigrationsDir>/<spaceId>`\n* does not exist on disk.\n*\n* `availableSpaces` lists the contract-space directory names actually\n* present, sorted lex-asc, so the diagnostic can suggest a near match\n* without making the user reach for `ls`.\n*/\nfunction errorSpaceNotFound(spaceId, availableSpaces) {\n\tconst availableList = availableSpaces.length > 0 ? availableSpaces.join(\", \") : \"(none — no contract spaces on disk yet)\";\n\tconst fix = availableSpaces.length > 0 ? `Pick one of: ${availableList}. Run \\`prisma-next migration list\\` (no --space) to see every space's migrations.` : \"Author a migration with `prisma-next migration new` to create the first contract-space directory.\";\n\tconst nextActions = availableSpaces.length > 0 ? [chooseAction(`Pick one of: ${availableList}`), runCommandAction(\"See every space's migrations\", \"prisma-next migration list\")] : [runCommandAction(\"Author the first migration, which creates the contract-space directory\", \"prisma-next migration new\")];\n\treturn new ActionableCliError(\"MIGRATION.SPACE_NOT_FOUND\", `Unknown contract space: ${spaceId}`, {\n\t\twhy: `No directory named \"${spaceId}\" exists under the migrations root.`,\n\t\tfix,\n\t\tnextActions,\n\t\tmeta: {\n\t\t\tspaceId,\n\t\t\tavailableSpaces: [...availableSpaces]\n\t\t}\n\t});\n}\n/**\n* A `migration show` target resolved to a directory or a graph node, but no\n* on-disk package was loaded for it.\n*/\nfunction errorMigrationPackageNotFound(why) {\n\treturn new ActionableCliError(\"MIGRATION.PACKAGE_NOT_FOUND\", \"Migration package not found\", {\n\t\twhy,\n\t\tfix: \"Pass a directory name, hash prefix, or path to an on-disk app-space migration package.\",\n\t\tnextActions: [chooseAction(\"Pass a directory name, hash prefix, or path to an on-disk app-space migration package\"), runCommandAction(\"List what is on disk\", \"prisma-next migration list\")]\n\t});\n}\n/** The app space has no migration packages at all, so no target can resolve. */\nfunction errorNoMigrations(appMigrationsRelative) {\n\treturn new ActionableCliError(\"MIGRATION.NO_MIGRATIONS\", \"No migrations found\", {\n\t\twhy: `No migration packages found in ${appMigrationsRelative}`,\n\t\tfix: \"Run `prisma-next migration plan` to create a migration first.\",\n\t\tnextActions: [runCommandAction(\"Create the first migration\", \"prisma-next migration plan\")]\n\t});\n}\nfunction errorRefSetBundleNotFound(hash) {\n\treturn new ActionableCliError(\"MIGRATION.REF_SET_BUNDLE_NOT_FOUND\", `No migration bundle matches graph-node hash ${hash}`, {\n\t\twhy: `The hash is a graph node but no on-disk bundle has metadata.to = ${hash}.`,\n\t\tfix: \"Run `pnpm fixtures:check`, or re-emit the migration that produces this hash so its bundle is restored.\",\n\t\tnextActions: [runCommandAction(\"Restore the checked-in fixtures\", \"pnpm fixtures:check\"), chooseAction(\"Or re-emit the migration that produces this hash\")],\n\t\tmeta: { hash }\n\t});\n}\nfunction errorPlanForgotTheFlag(resolvedHash, reachableRefs, graphTipHash, options) {\n\tconst reachableList = reachableRefs.length > 0 ? reachableRefs.map((r) => `${r.name} (${r.hash})`).join(\", \") : \"(none)\";\n\tconst refFix = reachableRefs.length > 0 ? `Run migration plan with ${reachableRefs.map((r) => `--from ${r.name}`).join(\" or \")}.` : graphTipHash !== null ? `Run migration plan --from ${graphTipHash}.` : \"Commit pending migrations first, then run migration plan.\";\n\tconst nextActions = reachableRefs.length > 0 ? reachableRefs.map((ref) => runCommandAction(`Plan from ${ref.name}`, `prisma-next migration plan --from ${ref.name}`)) : graphTipHash !== null ? [runCommandAction(\"Plan from the graph tip\", `prisma-next migration plan --from ${graphTipHash}`)] : [chooseAction(\"Commit pending migrations first, then run migration plan\")];\n\treturn new ActionableCliError(\"MIGRATION.HASH_NOT_IN_GRAPH\", `Resolved from-hash is not in the migration graph: ${resolvedHash}`, {\n\t\twhy: `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.`,\n\t\tfix: refFix,\n\t\tnextActions,\n\t\tmeta: {\n\t\t\tresolvedHash,\n\t\t\treachableRefs: reachableRefs.map((r) => r.name),\n\t\t\t...graphTipHash !== null ? { graphTipHash } : {}\n\t\t},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* `viaRef: true` (the default) mirrors migration-tools' `errorRefNotResolvable`:\n* a ref name with no pointer file, where the fallback hash isn't a graph\n* node either — there's nothing to materialize a contract from.\n* `viaRef: false` is a distinct, ref-independent case: an explicit `--from\n* <hash>` that doesn't name a ref, on an empty migration graph, so there is\n* no graph node and no ref to resolve a contract through.\n*/\nfunction errorSnapshotMissing(identifier, options) {\n\tconst viaRef = options?.viaRef !== false;\n\tconst fix = viaRef ? `Create the ref with \"prisma-next ref set ${identifier} <hash>\" (or advance it via \"prisma-next db update --advance-ref ${identifier}\"), or pass a hash that is a node in the migration graph.` : `No contract source exists for hash \"${identifier}\" on an empty migration graph. Use --from with a ref name (its contract resolves through the snapshot store), or run db update first.`;\n\tconst nextActions = viaRef ? [\n\t\trunCommandAction(`Create the ref \"${identifier}\"`, `prisma-next ref set ${identifier} <hash>`),\n\t\trunCommandAction(\"Or advance it from the database\", `prisma-next db update --advance-ref ${identifier}`),\n\t\tchooseAction(\"Or pass a hash that is a node in the migration graph\")\n\t] : [chooseAction(\"Pass --from a ref name, whose contract resolves through the snapshot store\"), runCommandAction(\"Or populate the graph first\", \"prisma-next db update\")];\n\treturn new ActionableCliError(\"MIGRATION.SNAPSHOT_MISSING\", viaRef ? `Ref \"${identifier}\" is not resolvable` : `No contract source for from-hash \"${identifier}\"`, {\n\t\twhy: viaRef ? `Ref \"${identifier}\" has no pointer file, and the hash being resolved is not a node in the migration graph either.` : `Hash \"${identifier}\" is not a node in the migration graph (the graph is empty), and it does not name a ref either.`,\n\t\tfix,\n\t\tnextActions,\n\t\tmeta: {\n\t\t\tidentifier,\n\t\t\tviaRef\n\t\t},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\nfunction errorMarkerMismatch(markerHash, reachableHashes, graphTip) {\n\tconst reachableList = reachableHashes.length > 0 ? reachableHashes.join(\", \") : \"(none — migration graph is empty)\";\n\tconst planFromFix = graphTip !== null ? `Run \\`prisma-next migration plan --from ${graphTip}\\` if the live marker is canonical and the on-disk graph needs catching up.` : \"Run `prisma-next migration plan` if the live marker is canonical and the on-disk graph needs catching up.\";\n\tconst planCommand = graphTip !== null ? `prisma-next migration plan --from ${graphTip}` : \"prisma-next migration plan\";\n\treturn new ActionableCliError(\"MIGRATION.MARKER_MISMATCH\", \"Database marker is not reachable in the on-disk migration graph\", {\n\t\twhy: `DB marker is ${markerHash}, but the on-disk migration graph reaches: ${reachableList}.`,\n\t\tfix: [\n\t\t\tplanFromFix,\n\t\t\t`Run \\`prisma-next ref set db ${markerHash}\\` if the on-disk graph is canonical and the local \\`db\\` ref drifted.`,\n\t\t\t\"Investigate whether the database was migrated by an out-of-band process.\"\n\t\t].join(\"\\n\"),\n\t\tnextActions: [\n\t\t\trunCommandAction(\"Catch the on-disk graph up to the live marker\", planCommand),\n\t\t\trunCommandAction(\"Point the local db ref at the live marker\", `prisma-next ref set db ${markerHash}`),\n\t\t\tchooseAction(\"Investigate whether the database was migrated by an out-of-band process\")\n\t\t],\n\t\tmeta: {\n\t\t\tmarkerHash,\n\t\t\treachableHashes: [...reachableHashes],\n\t\t\t...graphTip !== null ? { graphTip } : {}\n\t\t}\n\t});\n}\nconst ROLLBACK_IS_DESTRUCTIVE = \"A rollback (reverse) plan is expected to contain destructive (DROP) operations — review them before applying\";\nconst NARROWER_CASES_NEED_A_HINT = \"Narrower cases (rename inference, re-adding a required field without a safe default, or a type change that needs data) may additionally need a hint in the planned migration\";\nfunction errorPathUnreachable(failure) {\n\tconst meta = failure.meta ?? {};\n\tconst fromHashMeta = typeof meta[\"fromHash\"] === \"string\" ? meta[\"fromHash\"] : null;\n\tconst planFromHash = fromHashMeta === \"<empty>\" ? null : fromHashMeta;\n\tconst targetHash = typeof meta[\"targetHash\"] === \"string\" ? meta[\"targetHash\"] : typeof meta[\"target\"] === \"string\" ? meta[\"target\"] : null;\n\tconst deadEnds = meta[\"deadEnds\"];\n\tconst deadEndsSuffix = Array.isArray(deadEnds) && deadEnds.length > 0 ? ` Dead-ends: ${deadEnds.map(String).join(\", \")}.` : \"\";\n\tconst neverPlanned = meta[\"kind\"] === \"neverPlanned\";\n\tconst planCommand = (() => {\n\t\tif (neverPlanned) return \"prisma-next migration plan --name <slug>\";\n\t\tif (planFromHash !== null && targetHash !== null) return `prisma-next migration plan --from ${planFromHash} --to ${targetHash} --name <slug>`;\n\t\tif (targetHash !== null) return `prisma-next migration plan --to ${targetHash} --name <slug>`;\n\t\tif (planFromHash !== null) return `prisma-next migration plan --from ${planFromHash} --name <slug>`;\n\t\treturn \"prisma-next migration plan\";\n\t})();\n\tconst applyCommand = targetHash !== null && !neverPlanned ? `prisma-next migrate --to ${targetHash}` : \"prisma-next migrate\";\n\treturn new ActionableCliError(\"MIGRATION.PATH_UNREACHABLE\", failure.summary, {\n\t\twhy: failure.why ?? `Cannot reach target \"${targetHash ?? \"<unknown>\"}\" from current marker \"${fromHashMeta ?? \"<unknown>\"}\".${deadEndsSuffix}`,\n\t\tfix: [\n\t\t\t\"Plan the missing edge, then apply it:\",\n\t\t\t` 1. ${planCommand}`,\n\t\t\t` 2. ${applyCommand}`,\n\t\t\t`${ROLLBACK_IS_DESTRUCTIVE}.`,\n\t\t\t`${NARROWER_CASES_NEED_A_HINT}.`,\n\t\t\t\"Inspect the on-disk graph with `prisma-next migration list`, or `prisma-next migration show <bundle>` for any bundle in the path you expected.\"\n\t\t].join(\"\\n\"),\n\t\tnextActions: [\n\t\t\trunCommandAction(\"Plan the missing edge\", planCommand),\n\t\t\trunCommandAction(\"Apply it\", applyCommand),\n\t\t\tchooseAction(ROLLBACK_IS_DESTRUCTIVE),\n\t\t\tchooseAction(NARROWER_CASES_NEED_A_HINT),\n\t\t\trunCommandAction(\"Inspect the on-disk graph\", \"prisma-next migration list\")\n\t\t],\n\t\tmeta: { ...meta }\n\t});\n}\n/**\n* Shared \"needs a live database\" precondition for read verbs that consult the\n* marker/ledger (`migration log`, `migration status`). A command needs both a\n* connection string and a control-plane driver; either missing yields the same\n* `CONFIG.DB_CONNECTION_REQUIRED` envelope with `meta.missingFlags` (canonical long-form flags\n* per CLI Style Guide §Errors) so callers can react programmatically. Returns\n* `null` when both are present.\n*/\nfunction requireLiveDatabase(args) {\n\tif (args.dbConnection && args.hasDriver) return null;\n\tconst missingFlags = args.dbConnection ? [] : [\"--db\"];\n\treturn errorDatabaseConnectionRequired({\n\t\twhy: args.why,\n\t\tmissingFlags,\n\t\t...ifDefined(\"commandName\", args.commandName),\n\t\t...ifDefined(\"retryCommand\", args.retryCommand)\n\t});\n}\n/**\n* Maps a `RefResolutionError` from the contract/migration reference\n* resolver into a CLI structured error envelope.\n*/\n/**\n* A migration ref (dirName or hash-prefix) resolves in more than one contract\n* space. The user must qualify with `--space <id>` to disambiguate.\n*/\nfunction errorAmbiguousMigrationRef(ref, spaceIds) {\n\tconst spaceList = spaceIds.join(\", \");\n\treturn new ActionableCliError(\"MIGRATION.AMBIGUOUS_MIGRATION_REF\", `Ambiguous migration reference: \"${ref}\" resolves in multiple spaces — qualify with --space <id>`, {\n\t\twhy: `\"${ref}\" matches migrations in spaces: ${spaceList}.`,\n\t\tfix: `Qualify with --space <id> to select one space. Available matching spaces: ${spaceList}.`,\n\t\tnextActions: [chooseAction(`Qualify with --space <id>, one of: ${spaceList}`)],\n\t\tmeta: {\n\t\t\tref,\n\t\t\tspaceIds: [...spaceIds]\n\t\t}\n\t});\n}\nfunction mapRefResolutionError(error) {\n\tswitch (error.kind) {\n\t\tcase \"not-found\": {\n\t\t\tconst fix = error.grammar === \"contract\" ? \"Provide a valid contract hash, ref name, or migration directory name.\" : \"Provide a valid migration directory name or migration hash.\";\n\t\t\treturn new ActionableCliError(\"MIGRATION.REF_NOT_FOUND\", `Not a known ${error.grammar} reference: \"${error.input}\"`, {\n\t\t\t\twhy: `No ${error.grammar} matching \"${error.input}\" exists in the migration graph or refs index.`,\n\t\t\t\tfix,\n\t\t\t\tnextActions: [chooseAction(fix)],\n\t\t\t\tmeta: {\n\t\t\t\t\tinput: error.input,\n\t\t\t\t\tgrammar: error.grammar\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcase \"ambiguous\": return new ActionableCliError(\"MIGRATION.REF_AMBIGUOUS\", `Ambiguous ${error.grammar} reference: \"${error.input}\"`, {\n\t\t\twhy: `\"${error.input}\" matches multiple ${error.grammar}s: ${error.candidates.join(\", \")}`,\n\t\t\tfix: \"Provide a longer prefix or use the full hash to disambiguate.\",\n\t\t\tnextActions: [chooseAction(\"Provide a longer prefix or use the full hash to disambiguate\")],\n\t\t\tmeta: {\n\t\t\t\tinput: error.input,\n\t\t\t\tcandidates: error.candidates,\n\t\t\t\tgrammar: error.grammar\n\t\t\t}\n\t\t});\n\t\tcase \"wrong-grammar\": return new ActionableCliError(\"MIGRATION.REF_WRONG_GRAMMAR\", error.message, {\n\t\t\twhy: error.message,\n\t\t\tfix: error.fix,\n\t\t\tnextActions: [chooseAction(error.fix)],\n\t\t\tmeta: {\n\t\t\t\tinput: error.input,\n\t\t\t\texpectedGrammar: error.expectedGrammar\n\t\t\t}\n\t\t});\n\t\tcase \"invalid-format\": return new ActionableCliError(\"MIGRATION.REF_INVALID_FORMAT\", `Invalid reference format: \"${error.input}\"`, {\n\t\t\twhy: error.reason,\n\t\t\tfix: \"Provide a valid contract hash, ref name, or migration directory name.\",\n\t\t\tnextActions: [chooseAction(\"Provide a valid contract hash, ref name, or migration directory name\")],\n\t\t\tmeta: { input: error.input }\n\t\t});\n\t}\n}\n//#endregion\nexport { errorTargetMigrationNotSupported as A, errorRefSetBundleNotFound as C, errorRuntime$1 as D, errorRunnerFailed as E, chooseAction as F, runCommandAction as I, errorUnexpected as M, mapRefResolutionError as N, errorSnapshotMissing as O, requireLiveDatabase as P, errorPlanForgotTheFlag as S, errorRefSetHashNotInGraph as T, errorMigrationPackageNotFound as _, errorContractConfigMissing$1 as a, errorOutputFormatMutex as b, errorDestructiveChanges as c, errorHashMismatch as d, errorInvalidOutputFormat as f, errorMarkerMissing as g, errorMarkerMismatch as h, errorConfigValidation as i, errorTargetMismatch as j, errorSpaceNotFound as k, errorDriverRequired as l, errorLegendHumanOnly as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorContractValidationFailed as o, errorInvalidSpaceId as p, errorAmbiguousMigrationRef as r, errorDatabaseConnectionRequired as s, CliStructuredError$1 as t, errorFileNotFound as u, errorMigrationPlanningFailed as v, errorRefSetEmptySentinel as w, errorPathUnreachable as x, errorNoMigrations as y };\n\n//# sourceMappingURL=cli-errors-CihMAEVj.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,iBAAiB,OAAO,SAAS;CACzC,OAAO;EACN,MAAM;EACN;EACA;CACD;AACD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;;;;;AAaA,IAAI,qBAAqB,cAAc,qBAAqB;CAC3D;CACA,YAAY,MAAM,SAAS,SAAS;EACnC,MAAM,MAAM,SAAS,OAAO;EAC5B,KAAK,cAAc,QAAQ;CAC5B;AACD;AACA,SAAS,0BAA0B,cAAc,iBAAiB,cAAc;CAC/E,MAAM,gBAAgB,gBAAgB,SAAS,IAAI,gBAAgB,KAAK,IAAI,IAAI;CAChF,MAAM,MAAM,gBAAgB,SAAS,IAAI,iBAAiB,OAAO,4CAA4C,aAAa,gEAAgE,+DAA+D;CACzP,MAAM,cAAc,gBAAgB,SAAS,IAAI,iBAAiB,OAAO,CAAC,aAAa,4CAA4C,cAAc,GAAG,iBAAiB,8BAA8B,4BAA4B,CAAC,IAAI,CAAC,aAAa,2DAA2D,CAAC,IAAI,CAAC,iBAAiB,4BAA4B,4BAA4B,CAAC;CAC7X,OAAO,IAAI,mBAAmB,+BAA+B,yDAAyD,gBAAgB;EACrI,KAAK,gBAAgB,SAAS,IAAI,+BAA+B,cAAc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