@prisma/orm-toolchain 8.0.0-rc.1-dev.44 → 8.0.0-rc.1-dev.46
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/README.md +3 -3
- package/dist/{aggregate-BBsCbXgJ.mjs → aggregate-CPZB020V.mjs} +9 -9
- package/dist/{aggregate-BBsCbXgJ.mjs.map → aggregate-CPZB020V.mjs.map} +1 -1
- package/dist/{aggregate-CA6bJ8UO.d.mts → aggregate-DLUJLq5Y.d.mts} +3 -3
- package/dist/{aggregate-CA6bJ8UO.d.mts.map → aggregate-DLUJLq5Y.d.mts.map} +1 -1
- package/dist/cli-telemetry.d.mts +19 -5
- package/dist/cli-telemetry.d.mts.map +1 -1
- package/dist/cli-telemetry.mjs +287 -8
- package/dist/cli-telemetry.mjs.map +1 -1
- package/dist/cli.d.mts +11 -13
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +5382 -1095
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +298 -27
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +2 -19
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/cli__control-api__testing.mjs.map +1 -1
- package/dist/cli__init-output.d.mts +0 -1
- package/dist/cli__init-output.d.mts.map +1 -1
- package/dist/cli__init-output.mjs +1 -1
- package/dist/cli__migration-cli.mjs +9 -9
- package/dist/cli__migration-cli.mjs.map +1 -1
- package/dist/config-loader.d.mts +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/{contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs → contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs} +4 -4
- package/dist/{contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs.map → contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs.map} +1 -1
- package/dist/{cli-errors-iquUoY6O-BFboxglv.d.mts → db-verify-BwgNK50T-DGvKgFCK.d.mts} +81 -81
- package/dist/db-verify-BwgNK50T-DGvKgFCK.d.mts.map +1 -0
- package/dist/emitter.d.mts +1 -1
- package/dist/{errors-CXbGUWGu-BQi6YS-H.mjs → errors-CXbGUWGu-CstQHPh6.mjs} +2 -2
- package/dist/{errors-CXbGUWGu-BQi6YS-H.mjs.map → errors-CXbGUWGu-CstQHPh6.mjs.map} +1 -1
- package/dist/{errors-KWM8yBAL.d.mts → errors-D59OCpoI.d.mts} +2 -2
- package/dist/{errors-KWM8yBAL.d.mts.map → errors-D59OCpoI.d.mts.map} +1 -1
- package/dist/{exports-B3xY_FHp.mjs → exports-8ZUN43ve.mjs} +6 -6
- package/dist/exports-8ZUN43ve.mjs.map +1 -0
- package/dist/{exports-BZLNbtkY.mjs → exports-BZaG8_w_.mjs} +64 -36
- package/dist/exports-BZaG8_w_.mjs.map +1 -0
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs → graph-membership-BViWUMpP-C4lYYJdU.mjs} +2 -2
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs.map → graph-membership-BViWUMpP-C4lYYJdU.mjs.map} +1 -1
- package/dist/{import-roots-NDOIEDVj.mjs → import-roots-CNFBPAT1.mjs} +10 -3
- package/dist/{import-roots-NDOIEDVj.mjs.map → import-roots-CNFBPAT1.mjs.map} +1 -1
- package/dist/{import-roots-B6CtsWXb.d.mts → import-roots-CfoYgejL.d.mts} +2 -2
- package/dist/{import-roots-B6CtsWXb.d.mts.map → import-roots-CfoYgejL.d.mts.map} +1 -1
- package/dist/{index-mCsi_ND5.d.mts → index-DRs7L6N0.d.mts} +11 -3
- package/dist/index-DRs7L6N0.d.mts.map +1 -0
- package/dist/{index-CnOyYxmv.d.mts → index-Dgwl8Tzs.d.mts} +2 -2
- package/dist/{index-CnOyYxmv.d.mts.map → index-Dgwl8Tzs.d.mts.map} +1 -1
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs → invariants-CTHy88OP-CYI2a8IO.mjs} +2 -2
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs.map → invariants-CTHy88OP-CYI2a8IO.mjs.map} +1 -1
- package/dist/{io-635GlNx1-D94PxRc-.mjs → io-635GlNx1-D3zrw2qu.mjs} +4 -4
- package/dist/{io-635GlNx1-D94PxRc-.mjs.map → io-635GlNx1-D3zrw2qu.mjs.map} +1 -1
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs → migration-graph-_SJImD5V-BURyY1KM.mjs} +2 -2
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs.map → migration-graph-_SJImD5V-BURyY1KM.mjs.map} +1 -1
- package/dist/{migration-gubSSeMk.mjs → migration-hspPIEeV.mjs} +4 -4
- package/dist/{migration-gubSSeMk.mjs.map → migration-hspPIEeV.mjs.map} +1 -1
- package/dist/migration-tools.d.mts +4 -4
- package/dist/migration-tools.mjs +13 -13
- package/dist/migration-tools__aggregate.d.mts +1 -1
- package/dist/migration-tools__aggregate.mjs +1 -1
- package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
- package/dist/migration-tools__errors.d.mts +1 -1
- package/dist/migration-tools__errors.mjs +1 -1
- package/dist/migration-tools__invariants.mjs +1 -1
- package/dist/migration-tools__io.mjs +1 -1
- package/dist/migration-tools__migration-graph.mjs +2 -2
- package/dist/migration-tools__migration-ts.mjs +1 -1
- package/dist/migration-tools__migration.mjs +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/migration-tools__refs.mjs +1 -1
- package/dist/migration-tools__spaces.d.mts +2 -2
- package/dist/migration-tools__spaces.mjs +2 -2
- package/dist/{migration-ts-BoHxxGvi.mjs → migration-ts-DdVm0rws.mjs} +2 -2
- package/dist/{migration-ts-BoHxxGvi.mjs.map → migration-ts-DdVm0rws.mjs.map} +1 -1
- package/dist/{output-DP3woAjV-BxCr9nHA.mjs → output-CovTDY14-CUoAqLML.mjs} +3 -45
- package/dist/output-CovTDY14-CUoAqLML.mjs.map +1 -0
- package/dist/publish-surface.d.mts +2 -2
- package/dist/publish-surface.mjs +2 -2
- package/dist/publish-surface__import-roots.d.mts +1 -1
- package/dist/publish-surface__import-roots.mjs +1 -1
- package/dist/publish-surface__shells.d.mts +1 -1
- package/dist/publish-surface__shells.mjs +1 -1
- package/dist/quick-reference-mongo.md +12 -9
- package/dist/quick-reference-postgres.md +12 -9
- package/dist/readme-mongo.md +2 -2
- package/dist/readme-postgres.md +2 -2
- package/dist/ref-h6InR6dO-rGfl18Jv.mjs +4686 -0
- package/dist/ref-h6InR6dO-rGfl18Jv.mjs.map +1 -0
- package/dist/{ref-resolution-sGcINe7o.mjs → ref-resolution-HeNBXW53.mjs} +2 -2
- package/dist/{ref-resolution-sGcINe7o.mjs.map → ref-resolution-HeNBXW53.mjs.map} +1 -1
- package/dist/{refs-WK86uYYp-B6EZkmmT.mjs → refs-WK86uYYp-gM8tvWQP.mjs} +2 -2
- package/dist/{refs-WK86uYYp-B6EZkmmT.mjs.map → refs-WK86uYYp-gM8tvWQP.mjs.map} +1 -1
- package/dist/{shells-BenrJHp2.mjs → shells-C4HbRAr5.mjs} +13 -14
- package/dist/shells-C4HbRAr5.mjs.map +1 -0
- package/dist/{shells-COHV_Ozf.d.mts → shells-CIUmT4u4.d.mts} +14 -20
- package/dist/shells-CIUmT4u4.d.mts.map +1 -0
- package/dist/{spaces-BG2w0P8d.mjs → spaces-4qMOAYE9.mjs} +7 -7
- package/dist/{spaces-BG2w0P8d.mjs.map → spaces-4qMOAYE9.mjs.map} +1 -1
- package/dist/{spaces-tWQi7CUv.d.mts → spaces-Dj65JrwZ.d.mts} +2 -2
- package/dist/{spaces-tWQi7CUv.d.mts.map → spaces-Dj65JrwZ.d.mts.map} +1 -1
- package/dist/{verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts → verify-contract-spaces-C3PiFBk3-DfomYyOE.d.mts} +3 -3
- package/dist/{verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts.map → verify-contract-spaces-C3PiFBk3-DfomYyOE.d.mts.map} +1 -1
- package/dist/{verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs → verify-contract-spaces-DhJTb0zM-B62maCfE.mjs} +4 -4
- package/dist/{verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs.map → verify-contract-spaces-DhJTb0zM-B62maCfE.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.d.mts +2 -2
- package/dist/vite-plugin-contract-emit.mjs +5 -5
- package/dist/vite-plugin-contract-emit.mjs.map +1 -1
- package/package.json +14 -38
- package/dist/bin__prisma-next.mjs +0 -512
- package/dist/bin__prisma-next.mjs.map +0 -1
- package/dist/caught-errors-BZo7zcRc-C-pIEasG.mjs +0 -14
- package/dist/caught-errors-BZo7zcRc-C-pIEasG.mjs.map +0 -1
- package/dist/cli-errors-B4zTLaqQ-CXgjO9t4.mjs +0 -347
- package/dist/cli-errors-B4zTLaqQ-CXgjO9t4.mjs.map +0 -1
- package/dist/cli-errors-iquUoY6O-BFboxglv.d.mts.map +0 -1
- package/dist/cli__commands__contract-emit.d.mts +0 -2
- package/dist/cli__commands__contract-emit.mjs +0 -2
- package/dist/cli__commands__contract-infer.d.mts +0 -7
- package/dist/cli__commands__contract-infer.d.mts.map +0 -1
- package/dist/cli__commands__contract-infer.mjs +0 -2
- package/dist/cli__commands__db-init.d.mts +0 -7
- package/dist/cli__commands__db-init.d.mts.map +0 -1
- package/dist/cli__commands__db-init.mjs +0 -2
- package/dist/cli__commands__db-schema.d.mts +0 -7
- package/dist/cli__commands__db-schema.d.mts.map +0 -1
- package/dist/cli__commands__db-schema.mjs +0 -2
- package/dist/cli__commands__db-sign.d.mts +0 -7
- package/dist/cli__commands__db-sign.d.mts.map +0 -1
- package/dist/cli__commands__db-sign.mjs +0 -2
- package/dist/cli__commands__db-update.d.mts +0 -7
- package/dist/cli__commands__db-update.d.mts.map +0 -1
- package/dist/cli__commands__db-update.mjs +0 -2
- package/dist/cli__commands__db-verify.d.mts +0 -7
- package/dist/cli__commands__db-verify.d.mts.map +0 -1
- package/dist/cli__commands__db-verify.mjs +0 -2
- package/dist/cli__commands__migrate.d.mts +0 -57
- package/dist/cli__commands__migrate.d.mts.map +0 -1
- package/dist/cli__commands__migrate.mjs +0 -2
- package/dist/cli__commands__migration-check.d.mts +0 -8
- package/dist/cli__commands__migration-check.d.mts.map +0 -1
- package/dist/cli__commands__migration-check.mjs +0 -3
- package/dist/cli__commands__migration-graph.d.mts +0 -38
- package/dist/cli__commands__migration-graph.d.mts.map +0 -1
- package/dist/cli__commands__migration-graph.mjs +0 -2
- package/dist/cli__commands__migration-list.d.mts +0 -39
- package/dist/cli__commands__migration-list.d.mts.map +0 -1
- package/dist/cli__commands__migration-list.mjs +0 -2
- package/dist/cli__commands__migration-log.d.mts +0 -20
- package/dist/cli__commands__migration-log.d.mts.map +0 -1
- package/dist/cli__commands__migration-log.mjs +0 -2
- package/dist/cli__commands__migration-new.d.mts +0 -7
- package/dist/cli__commands__migration-new.d.mts.map +0 -1
- package/dist/cli__commands__migration-new.mjs +0 -2
- package/dist/cli__commands__migration-plan.d.mts +0 -34
- package/dist/cli__commands__migration-plan.d.mts.map +0 -1
- package/dist/cli__commands__migration-plan.mjs +0 -2
- package/dist/cli__commands__migration-show.d.mts +0 -27
- package/dist/cli__commands__migration-show.d.mts.map +0 -1
- package/dist/cli__commands__migration-show.mjs +0 -2
- package/dist/cli__commands__migration-status.d.mts +0 -55
- package/dist/cli__commands__migration-status.d.mts.map +0 -1
- package/dist/cli__commands__migration-status.mjs +0 -3
- package/dist/cli__commands__ref.d.mts +0 -7
- package/dist/cli__commands__ref.d.mts.map +0 -1
- package/dist/cli__commands__ref.mjs +0 -2
- package/dist/cli__commands__telemetry.d.mts +0 -7
- package/dist/cli__commands__telemetry.d.mts.map +0 -1
- package/dist/cli__commands__telemetry.mjs +0 -2
- package/dist/client-C6Qp5ujC-Dxb7r79B.mjs +0 -1653
- package/dist/client-C6Qp5ujC-Dxb7r79B.mjs.map +0 -1
- package/dist/code-templates-D_sGnEF6-DRLPzlq8.mjs +0 -295
- package/dist/code-templates-D_sGnEF6-DRLPzlq8.mjs.map +0 -1
- package/dist/combine-verify-results-B87B_pMc-D4l22OqY.mjs +0 -65
- package/dist/combine-verify-results-B87B_pMc-D4l22OqY.mjs.map +0 -1
- package/dist/command-helpers-BCgwcqTe-lNCtppzM.mjs +0 -776
- package/dist/command-helpers-BCgwcqTe-lNCtppzM.mjs.map +0 -1
- package/dist/contract-at-errors-BSoDI0Hw-BXeUNE3s.mjs +0 -44
- package/dist/contract-at-errors-BSoDI0Hw-BXeUNE3s.mjs.map +0 -1
- package/dist/contract-emit-BG7KL4zk-_a0J310Z.mjs +0 -331
- package/dist/contract-emit-BG7KL4zk-_a0J310Z.mjs.map +0 -1
- package/dist/contract-emit-BkEj3siG-C8M-IyvS.mjs +0 -2
- package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts +0 -7
- package/dist/contract-emit-CvwNE4R1-DEn1V1Zo.d.mts.map +0 -1
- package/dist/contract-emit-GknCmgn_-BSWdFprC.mjs +0 -154
- package/dist/contract-emit-GknCmgn_-BSWdFprC.mjs.map +0 -1
- package/dist/contract-enrichment-DrMvvY2A-DxNGeF4d.mjs +0 -56
- package/dist/contract-enrichment-DrMvvY2A-DxNGeF4d.mjs.map +0 -1
- package/dist/contract-infer-BwIDGl7v-CZrdWXAr.mjs +0 -74
- package/dist/contract-infer-BwIDGl7v-CZrdWXAr.mjs.map +0 -1
- package/dist/contract-snapshot-resolution-De2VvOJn-DqIAV9cr.mjs +0 -82
- package/dist/contract-snapshot-resolution-De2VvOJn-DqIAV9cr.mjs.map +0 -1
- package/dist/contract-space-aggregate-loader-fa04OIaL-B7LXHle3.mjs +0 -303
- package/dist/contract-space-aggregate-loader-fa04OIaL-B7LXHle3.mjs.map +0 -1
- package/dist/db-init-BolXrKAI-CwG-zEDW.mjs +0 -109
- package/dist/db-init-BolXrKAI-CwG-zEDW.mjs.map +0 -1
- package/dist/db-init-failure-B5cQML4A-5zr-99Ek.mjs +0 -44
- package/dist/db-init-failure-B5cQML4A-5zr-99Ek.mjs.map +0 -1
- package/dist/db-schema-DvdLBdEY-Dl6e1d_Y.mjs +0 -48
- package/dist/db-schema-DvdLBdEY-Dl6e1d_Y.mjs.map +0 -1
- package/dist/db-sign-DCp4c8CA-B3tun-kh.mjs +0 -172
- package/dist/db-sign-DCp4c8CA-B3tun-kh.mjs.map +0 -1
- package/dist/db-update-CfayE8WE-CPhQyDaZ.mjs +0 -171
- package/dist/db-update-CfayE8WE-CPhQyDaZ.mjs.map +0 -1
- package/dist/db-verify-BN7IrOAL-kEzRNJUl.mjs +0 -358
- package/dist/db-verify-BN7IrOAL-kEzRNJUl.mjs.map +0 -1
- package/dist/exports-B3xY_FHp.mjs.map +0 -1
- package/dist/exports-BZLNbtkY.mjs.map +0 -1
- package/dist/exports-CqNUihkI.mjs +0 -276
- package/dist/exports-CqNUihkI.mjs.map +0 -1
- package/dist/format-Ca7dUE6B-BMFqrc6D.mjs +0 -110
- package/dist/format-Ca7dUE6B-BMFqrc6D.mjs.map +0 -1
- package/dist/framework-components-Bau7o1-J-DTp6AUoq.mjs +0 -60
- package/dist/framework-components-Bau7o1-J-DTp6AUoq.mjs.map +0 -1
- package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts +0 -35
- package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts.map +0 -1
- package/dist/index-mCsi_ND5.d.mts.map +0 -1
- package/dist/init-B86mXFNC-C2HAUCRn.mjs +0 -800
- package/dist/init-B86mXFNC-C2HAUCRn.mjs.map +0 -1
- package/dist/inspect-live-schema-BPHXdvqW-DrzL2ZkQ.mjs +0 -95
- package/dist/inspect-live-schema-BPHXdvqW-DrzL2ZkQ.mjs.map +0 -1
- package/dist/integrity-violation-to-check-failure-BmWMLAae-DqiC4_3p.mjs +0 -115
- package/dist/integrity-violation-to-check-failure-BmWMLAae-DqiC4_3p.mjs.map +0 -1
- package/dist/invariants-Bltd8DyA-Cg_1Lu0q.mjs +0 -53
- package/dist/invariants-Bltd8DyA-Cg_1Lu0q.mjs.map +0 -1
- package/dist/legend-DGv9e2_0-BtetgRz4.mjs +0 -22
- package/dist/legend-DGv9e2_0-BtetgRz4.mjs.map +0 -1
- package/dist/migrate-BXATUjYE-Do79Imf-.mjs +0 -343
- package/dist/migrate-BXATUjYE-Do79Imf-.mjs.map +0 -1
- package/dist/migrate-failure-D4NvkoCk-0bttmQs2.mjs +0 -96
- package/dist/migrate-failure-D4NvkoCk-0bttmQs2.mjs.map +0 -1
- package/dist/migrate-show-B8UJ9dmb-C4RTPbDk.d.mts +0 -63
- package/dist/migrate-show-B8UJ9dmb-C4RTPbDk.d.mts.map +0 -1
- package/dist/migrate-show-C_9xR4Qt-B-Y0PGKw.mjs +0 -199
- package/dist/migrate-show-C_9xR4Qt-B-Y0PGKw.mjs.map +0 -1
- package/dist/migration-check-Bbdw7t-r-C2VTMK61.mjs +0 -358
- package/dist/migration-check-Bbdw7t-r-C2VTMK61.mjs.map +0 -1
- package/dist/migration-check-DbHgYK7F-7mtYNVFu.mjs +0 -163
- package/dist/migration-check-DbHgYK7F-7mtYNVFu.mjs.map +0 -1
- package/dist/migration-command-scaffold-SzjR2naH-Yi3-rNfX.mjs +0 -121
- package/dist/migration-command-scaffold-SzjR2naH-Yi3-rNfX.mjs.map +0 -1
- package/dist/migration-graph-B8WxW_tm-qGNf7jQh.mjs +0 -35
- package/dist/migration-graph-B8WxW_tm-qGNf7jQh.mjs.map +0 -1
- package/dist/migration-graph-BOwu76mF-kOTWFvfV.mjs +0 -144
- package/dist/migration-graph-BOwu76mF-kOTWFvfV.mjs.map +0 -1
- package/dist/migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs +0 -2127
- package/dist/migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs.map +0 -1
- package/dist/migration-graph-sections-BBHPOFN--COKyUKQ4.mjs +0 -69
- package/dist/migration-graph-sections-BBHPOFN--COKyUKQ4.mjs.map +0 -1
- package/dist/migration-list-CKuYcMQq-CubZzE9i.mjs +0 -130
- package/dist/migration-list-CKuYcMQq-CubZzE9i.mjs.map +0 -1
- package/dist/migration-list-CY08bD8I-PoXuv94c.mjs +0 -102
- package/dist/migration-list-CY08bD8I-PoXuv94c.mjs.map +0 -1
- package/dist/migration-log-CUbGla-9-BLIrWjwN.mjs +0 -123
- package/dist/migration-log-CUbGla-9-BLIrWjwN.mjs.map +0 -1
- package/dist/migration-log-table-eES9lPjv-BCFm8qJr.mjs +0 -116
- package/dist/migration-log-table-eES9lPjv-BCFm8qJr.mjs.map +0 -1
- package/dist/migration-new-ChvZjf5X-BFhEM0BF.mjs +0 -70
- package/dist/migration-new-ChvZjf5X-BFhEM0BF.mjs.map +0 -1
- package/dist/migration-new-DXMvJdbB-BkrpDfcr.mjs +0 -130
- package/dist/migration-new-DXMvJdbB-BkrpDfcr.mjs.map +0 -1
- package/dist/migration-path-target-JDWqF9kj-B7zoMq6X.mjs +0 -38
- package/dist/migration-path-target-JDWqF9kj-B7zoMq6X.mjs.map +0 -1
- package/dist/migration-plan-BV9f5Xjq-DiyscOMc.d.mts +0 -164
- package/dist/migration-plan-BV9f5Xjq-DiyscOMc.d.mts.map +0 -1
- package/dist/migration-plan-Bz1hOTHF-CFCtPuOv.mjs +0 -192
- package/dist/migration-plan-Bz1hOTHF-CFCtPuOv.mjs.map +0 -1
- package/dist/migration-plan-Cfz0efEL-DMNFq5b2.mjs +0 -621
- package/dist/migration-plan-Cfz0efEL-DMNFq5b2.mjs.map +0 -1
- package/dist/migration-show-BGdR1xnT-Cg3M0FPh.mjs +0 -178
- package/dist/migration-show-BGdR1xnT-Cg3M0FPh.mjs.map +0 -1
- package/dist/migration-status-BIrAJ5af-D-_mMBUA.mjs +0 -427
- package/dist/migration-status-BIrAJ5af-D-_mMBUA.mjs.map +0 -1
- package/dist/output-DP3woAjV-BxCr9nHA.mjs.map +0 -1
- package/dist/progress-adapter-CjAeTxY_-BXYSd1eY.mjs +0 -43
- package/dist/progress-adapter-CjAeTxY_-BXYSd1eY.mjs.map +0 -1
- package/dist/project-import-root-B4nM-VWX-D__g0hTb.mjs +0 -101
- package/dist/project-import-root-B4nM-VWX-D__g0hTb.mjs.map +0 -1
- package/dist/redact-secrets-ojVi2cpy-CLyiSDk5.mjs +0 -1476
- package/dist/redact-secrets-ojVi2cpy-CLyiSDk5.mjs.map +0 -1
- package/dist/ref-4x6BGSsd-ClaoZIQh.mjs +0 -95
- package/dist/ref-4x6BGSsd-ClaoZIQh.mjs.map +0 -1
- package/dist/ref-WXLIR9Xm-12IUtoBU.mjs +0 -104
- package/dist/ref-WXLIR9Xm-12IUtoBU.mjs.map +0 -1
- package/dist/ref-advancement-DaZBzm7m-WoqnFAyr.mjs +0 -96
- package/dist/ref-advancement-DaZBzm7m-WoqnFAyr.mjs.map +0 -1
- package/dist/ref-resolution-BSN1amKm-C6-TTM2N.mjs +0 -16
- package/dist/ref-resolution-BSN1amKm-C6-TTM2N.mjs.map +0 -1
- package/dist/refs-fQLFcMoq-aTBeUU9H.mjs +0 -47
- package/dist/refs-fQLFcMoq-aTBeUU9H.mjs.map +0 -1
- package/dist/schemas-BGgjiKV0-Rh8RlMCl.d.mts +0 -206
- package/dist/schemas-BGgjiKV0-Rh8RlMCl.d.mts.map +0 -1
- package/dist/schemas-CYSD83Cu-Bff4PPoi.mjs +0 -119
- package/dist/schemas-CYSD83Cu-Bff4PPoi.mjs.map +0 -1
- package/dist/shells-BenrJHp2.mjs.map +0 -1
- package/dist/shells-COHV_Ozf.d.mts.map +0 -1
- package/dist/telemetry-BD52LETE-Cqeb7ebh.mjs +0 -121
- package/dist/telemetry-BD52LETE-Cqeb7ebh.mjs.map +0 -1
- package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts +0 -133
- package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts.map +0 -1
- package/dist/terminal-ui-Cqz4LVL7-B0mcVdLy.mjs +0 -676
- package/dist/terminal-ui-Cqz4LVL7-B0mcVdLy.mjs.map +0 -1
- package/dist/verify-Cogr_Fj9-D3lCWA6t.mjs +0 -283
- package/dist/verify-Cogr_Fj9-D3lCWA6t.mjs.map +0 -1
|
@@ -1,347 +0,0 @@
|
|
|
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
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
|
-
import { ERROR_CODE_DESTRUCTIVE_CHANGES, errorConsentPlanMismatch, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorRunnerFailed, errorRuntime as errorRuntime$1, errorTargetMismatch } from "@prisma/orm-framework/errors/execution";
|
|
4
|
-
import "@prisma/orm-framework/errors/migration";
|
|
5
|
-
//#region ../../../1-framework/3-tooling/cli/dist/cli-errors-B4zTLaqQ.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
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* A command that accepts a contract reference both as a positional and as a
|
|
44
|
-
* flag was given both. Structured rather than a bare stderr line, so a script
|
|
45
|
-
* sees the same envelope every other invocation failure produces.
|
|
46
|
-
*/
|
|
47
|
-
function errorContractArgConflict(options) {
|
|
48
|
-
const fix = "Pass the contract reference once — either as the positional argument or as --contract.";
|
|
49
|
-
return new ActionableCliError("CLI.CONTRACT_ARG_CONFLICT", "Cannot specify both a positional contract argument and --contract", {
|
|
50
|
-
why: `The positional argument names "${options.positional}" and --contract names "${options.flag}"; there is no rule for which wins.`,
|
|
51
|
-
fix,
|
|
52
|
-
nextActions: [chooseAction(fix)],
|
|
53
|
-
meta: {
|
|
54
|
-
positional: options.positional,
|
|
55
|
-
flag: options.flag
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function errorRefSetHashNotInGraph(resolvedHash, reachableHashes, graphTipHash) {
|
|
60
|
-
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
61
|
-
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.";
|
|
62
|
-
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")];
|
|
63
|
-
return new ActionableCliError("MIGRATION.HASH_NOT_IN_GRAPH", `Resolved contract hash is not in the migration graph: ${resolvedHash}`, {
|
|
64
|
-
why: reachableHashes.length > 0 ? `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.` : "The migration graph is empty — no hashes reachable.",
|
|
65
|
-
fix,
|
|
66
|
-
nextActions,
|
|
67
|
-
meta: {
|
|
68
|
-
resolvedHash,
|
|
69
|
-
reachableHashes: [...reachableHashes],
|
|
70
|
-
...graphTipHash !== null ? { graphTipHash } : {}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function errorRefSetEmptySentinel(hash) {
|
|
75
|
-
return new ActionableCliError("MIGRATION.REF_SET_EMPTY_SENTINEL", `Cannot set ref to the empty-database sentinel: ${hash}`, {
|
|
76
|
-
why: "The empty-database sentinel is a planner internal; it is not a valid ref target.",
|
|
77
|
-
fix: "Set the ref to a contract hash from the migration graph, or use another ref name.",
|
|
78
|
-
nextActions: [chooseAction("Set the ref to a contract hash from the migration graph"), chooseAction("Or use another ref name")],
|
|
79
|
-
meta: { hash }
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* `--legend` was combined with a machine-readable or silent output flag.
|
|
84
|
-
* The legend is human-only decoration on stderr.
|
|
85
|
-
*/
|
|
86
|
-
function errorLegendHumanOnly(conflictingFlag) {
|
|
87
|
-
return new ActionableCliError("MIGRATION.LEGEND_HUMAN_ONLY", "`--legend` is only available for human-readable output", {
|
|
88
|
-
why: `\`--legend\` prints a glyph key to stderr and cannot be combined with ${conflictingFlag}.`,
|
|
89
|
-
fix: `Omit ${conflictingFlag} to print the legend alongside the tree, or omit --legend when using ${conflictingFlag}.`,
|
|
90
|
-
nextActions: [chooseAction(`Omit ${conflictingFlag} to print the legend alongside the tree`), chooseAction(`Or omit --legend when using ${conflictingFlag}`)],
|
|
91
|
-
meta: { conflictingFlag }
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* `--space <id>` was given a value that doesn't satisfy the contract-space
|
|
96
|
-
* naming rule (`[a-z][a-z0-9_-]{0,63}` per `isValidSpaceId`). Fires before
|
|
97
|
-
* any fs work — the input is syntactically rejected the same way an on-disk
|
|
98
|
-
* directory with that name would be skipped by the enumerator.
|
|
99
|
-
*/
|
|
100
|
-
function errorInvalidSpaceId(spaceId) {
|
|
101
|
-
return new ActionableCliError("MIGRATION.INVALID_SPACE_ID", `Invalid contract space id: ${spaceId}`, {
|
|
102
|
-
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).",
|
|
103
|
-
fix: "Pass a space id that matches the directory naming rule, or omit --space to list every space.",
|
|
104
|
-
nextActions: [chooseAction("Pass a space id matching [a-z][a-z0-9_-]{0,63}"), runCommandAction("Or list every space", "prisma-next migration list")],
|
|
105
|
-
meta: { spaceId }
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* `migration list --space <id>` was given a contract-space id that has no
|
|
110
|
-
* directory under `migrations/`. Distinct from "the space exists but is
|
|
111
|
-
* empty" — that path renders the empty-state line and exits 0 per the
|
|
112
|
-
* slice spec § Empty-state. This error fires only when `<projectMigrationsDir>/<spaceId>`
|
|
113
|
-
* does not exist on disk.
|
|
114
|
-
*
|
|
115
|
-
* `availableSpaces` lists the contract-space directory names actually
|
|
116
|
-
* present, sorted lex-asc, so the diagnostic can suggest a near match
|
|
117
|
-
* without making the user reach for `ls`.
|
|
118
|
-
*/
|
|
119
|
-
function errorSpaceNotFound(spaceId, availableSpaces) {
|
|
120
|
-
const availableList = availableSpaces.length > 0 ? availableSpaces.join(", ") : "(none — no contract spaces on disk yet)";
|
|
121
|
-
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.";
|
|
122
|
-
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")];
|
|
123
|
-
return new ActionableCliError("MIGRATION.SPACE_NOT_FOUND", `Unknown contract space: ${spaceId}`, {
|
|
124
|
-
why: `No directory named "${spaceId}" exists under the migrations root.`,
|
|
125
|
-
fix,
|
|
126
|
-
nextActions,
|
|
127
|
-
meta: {
|
|
128
|
-
spaceId,
|
|
129
|
-
availableSpaces: [...availableSpaces]
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* A `migration show` target resolved to a directory or a graph node, but no
|
|
135
|
-
* on-disk package was loaded for it.
|
|
136
|
-
*/
|
|
137
|
-
function errorMigrationPackageNotFound(why) {
|
|
138
|
-
return new ActionableCliError("MIGRATION.PACKAGE_NOT_FOUND", "Migration package not found", {
|
|
139
|
-
why,
|
|
140
|
-
fix: "Pass a directory name, hash prefix, or path to an on-disk app-space migration package.",
|
|
141
|
-
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")]
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/** The app space has no migration packages at all, so no target can resolve. */
|
|
145
|
-
function errorNoMigrations(appMigrationsRelative) {
|
|
146
|
-
return new ActionableCliError("MIGRATION.NO_MIGRATIONS", "No migrations found", {
|
|
147
|
-
why: `No migration packages found in ${appMigrationsRelative}`,
|
|
148
|
-
fix: "Run `prisma-next migration plan` to create a migration first.",
|
|
149
|
-
nextActions: [runCommandAction("Create the first migration", "prisma-next migration plan")]
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function errorRefSetBundleNotFound(hash) {
|
|
153
|
-
return new ActionableCliError("MIGRATION.REF_SET_BUNDLE_NOT_FOUND", `No migration bundle matches graph-node hash ${hash}`, {
|
|
154
|
-
why: `The hash is a graph node but no on-disk bundle has metadata.to = ${hash}.`,
|
|
155
|
-
fix: "Run `pnpm fixtures:check`, or re-emit the migration that produces this hash so its bundle is restored.",
|
|
156
|
-
nextActions: [runCommandAction("Restore the checked-in fixtures", "pnpm fixtures:check"), chooseAction("Or re-emit the migration that produces this hash")],
|
|
157
|
-
meta: { hash }
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function errorPlanForgotTheFlag(resolvedHash, reachableRefs, graphTipHash, options) {
|
|
161
|
-
const reachableList = reachableRefs.length > 0 ? reachableRefs.map((r) => `${r.name} (${r.hash})`).join(", ") : "(none)";
|
|
162
|
-
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.";
|
|
163
|
-
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")];
|
|
164
|
-
return new ActionableCliError("MIGRATION.HASH_NOT_IN_GRAPH", `Resolved from-hash is not in the migration graph: ${resolvedHash}`, {
|
|
165
|
-
why: `The migration graph reaches ${reachableList}; resolved ${resolvedHash} isn't a graph node.`,
|
|
166
|
-
fix: refFix,
|
|
167
|
-
nextActions,
|
|
168
|
-
meta: {
|
|
169
|
-
resolvedHash,
|
|
170
|
-
reachableRefs: reachableRefs.map((r) => r.name),
|
|
171
|
-
...graphTipHash !== null ? { graphTipHash } : {}
|
|
172
|
-
},
|
|
173
|
-
...ifDefined("cause", options?.cause)
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* `viaRef: true` (the default) mirrors migration-tools' `errorRefNotResolvable`:
|
|
178
|
-
* a ref name with no pointer file, where the fallback hash isn't a graph
|
|
179
|
-
* node either — there's nothing to materialize a contract from.
|
|
180
|
-
* `viaRef: false` is a distinct, ref-independent case: an explicit `--from
|
|
181
|
-
* <hash>` that doesn't name a ref, on an empty migration graph, so there is
|
|
182
|
-
* no graph node and no ref to resolve a contract through.
|
|
183
|
-
*/
|
|
184
|
-
function errorSnapshotMissing(identifier, options) {
|
|
185
|
-
const viaRef = options?.viaRef !== false;
|
|
186
|
-
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.`;
|
|
187
|
-
const nextActions = viaRef ? [
|
|
188
|
-
runCommandAction(`Create the ref "${identifier}"`, `prisma-next ref set ${identifier} <hash>`),
|
|
189
|
-
runCommandAction("Or advance it from the database", `prisma-next db update --advance-ref ${identifier}`),
|
|
190
|
-
chooseAction("Or pass a hash that is a node in the migration graph")
|
|
191
|
-
] : [chooseAction("Pass --from a ref name, whose contract resolves through the snapshot store"), runCommandAction("Or populate the graph first", "prisma-next db update")];
|
|
192
|
-
return new ActionableCliError("MIGRATION.SNAPSHOT_MISSING", viaRef ? `Ref "${identifier}" is not resolvable` : `No contract source for from-hash "${identifier}"`, {
|
|
193
|
-
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.`,
|
|
194
|
-
fix,
|
|
195
|
-
nextActions,
|
|
196
|
-
meta: {
|
|
197
|
-
identifier,
|
|
198
|
-
viaRef
|
|
199
|
-
},
|
|
200
|
-
...ifDefined("cause", options?.cause)
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
function errorMarkerMismatch(markerHash, reachableHashes, graphTip) {
|
|
204
|
-
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
205
|
-
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.";
|
|
206
|
-
const planCommand = graphTip !== null ? `prisma-next migration plan --from ${graphTip}` : "prisma-next migration plan";
|
|
207
|
-
return new ActionableCliError("MIGRATION.MARKER_MISMATCH", "Database marker is not reachable in the on-disk migration graph", {
|
|
208
|
-
why: `DB marker is ${markerHash}, but the on-disk migration graph reaches: ${reachableList}.`,
|
|
209
|
-
fix: [
|
|
210
|
-
planFromFix,
|
|
211
|
-
`Run \`prisma-next ref set db ${markerHash}\` if the on-disk graph is canonical and the local \`db\` ref drifted.`,
|
|
212
|
-
"Investigate whether the database was migrated by an out-of-band process."
|
|
213
|
-
].join("\n"),
|
|
214
|
-
nextActions: [
|
|
215
|
-
runCommandAction("Catch the on-disk graph up to the live marker", planCommand),
|
|
216
|
-
runCommandAction("Point the local db ref at the live marker", `prisma-next ref set db ${markerHash}`),
|
|
217
|
-
chooseAction("Investigate whether the database was migrated by an out-of-band process")
|
|
218
|
-
],
|
|
219
|
-
meta: {
|
|
220
|
-
markerHash,
|
|
221
|
-
reachableHashes: [...reachableHashes],
|
|
222
|
-
...graphTip !== null ? { graphTip } : {}
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
const ROLLBACK_IS_DESTRUCTIVE = "A rollback (reverse) plan is expected to contain destructive (DROP) operations — review them before applying";
|
|
227
|
-
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";
|
|
228
|
-
function errorPathUnreachable(failure) {
|
|
229
|
-
const meta = failure.meta ?? {};
|
|
230
|
-
const fromHashMeta = typeof meta["fromHash"] === "string" ? meta["fromHash"] : null;
|
|
231
|
-
const planFromHash = fromHashMeta === "<empty>" ? null : fromHashMeta;
|
|
232
|
-
const targetHash = typeof meta["targetHash"] === "string" ? meta["targetHash"] : typeof meta["target"] === "string" ? meta["target"] : null;
|
|
233
|
-
const deadEnds = meta["deadEnds"];
|
|
234
|
-
const deadEndsSuffix = Array.isArray(deadEnds) && deadEnds.length > 0 ? ` Dead-ends: ${deadEnds.map(String).join(", ")}.` : "";
|
|
235
|
-
const neverPlanned = meta["kind"] === "neverPlanned";
|
|
236
|
-
const planCommand = (() => {
|
|
237
|
-
if (neverPlanned) return "prisma-next migration plan --name <slug>";
|
|
238
|
-
if (planFromHash !== null && targetHash !== null) return `prisma-next migration plan --from ${planFromHash} --to ${targetHash} --name <slug>`;
|
|
239
|
-
if (targetHash !== null) return `prisma-next migration plan --to ${targetHash} --name <slug>`;
|
|
240
|
-
if (planFromHash !== null) return `prisma-next migration plan --from ${planFromHash} --name <slug>`;
|
|
241
|
-
return "prisma-next migration plan";
|
|
242
|
-
})();
|
|
243
|
-
const applyCommand = targetHash !== null && !neverPlanned ? `prisma-next migrate --to ${targetHash}` : "prisma-next migrate";
|
|
244
|
-
return new ActionableCliError("MIGRATION.PATH_UNREACHABLE", failure.summary, {
|
|
245
|
-
why: failure.why ?? `Cannot reach target "${targetHash ?? "<unknown>"}" from current marker "${fromHashMeta ?? "<unknown>"}".${deadEndsSuffix}`,
|
|
246
|
-
fix: [
|
|
247
|
-
"Plan the missing edge, then apply it:",
|
|
248
|
-
` 1. ${planCommand}`,
|
|
249
|
-
` 2. ${applyCommand}`,
|
|
250
|
-
`${ROLLBACK_IS_DESTRUCTIVE}.`,
|
|
251
|
-
`${NARROWER_CASES_NEED_A_HINT}.`,
|
|
252
|
-
"Inspect the on-disk graph with `prisma-next migration list`, or `prisma-next migration show <bundle>` for any bundle in the path you expected."
|
|
253
|
-
].join("\n"),
|
|
254
|
-
nextActions: [
|
|
255
|
-
runCommandAction("Plan the missing edge", planCommand),
|
|
256
|
-
runCommandAction("Apply it", applyCommand),
|
|
257
|
-
chooseAction(ROLLBACK_IS_DESTRUCTIVE),
|
|
258
|
-
chooseAction(NARROWER_CASES_NEED_A_HINT),
|
|
259
|
-
runCommandAction("Inspect the on-disk graph", "prisma-next migration list"),
|
|
260
|
-
runCommandAction("Inspect a bundle in the path you expected", "prisma-next migration show <bundle>")
|
|
261
|
-
],
|
|
262
|
-
meta: { ...meta }
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Shared "needs a live database" precondition for read verbs that consult the
|
|
267
|
-
* marker/ledger (`migration log`, `migration status`). A command needs both a
|
|
268
|
-
* connection string and a control-plane driver; either missing yields the same
|
|
269
|
-
* `CONFIG.DB_CONNECTION_REQUIRED` envelope with `meta.missingFlags` (canonical long-form flags
|
|
270
|
-
* per CLI Style Guide §Errors) so callers can react programmatically. Returns
|
|
271
|
-
* `null` when both are present.
|
|
272
|
-
*/
|
|
273
|
-
function requireLiveDatabase(args) {
|
|
274
|
-
if (args.dbConnection && args.hasDriver) return null;
|
|
275
|
-
const missingFlags = args.dbConnection ? [] : ["--db"];
|
|
276
|
-
return errorDatabaseConnectionRequired({
|
|
277
|
-
why: args.why,
|
|
278
|
-
missingFlags,
|
|
279
|
-
...ifDefined("commandName", args.commandName),
|
|
280
|
-
...ifDefined("retryCommand", args.retryCommand)
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Maps a `RefResolutionError` from the contract/migration reference
|
|
285
|
-
* resolver into a CLI structured error envelope.
|
|
286
|
-
*/
|
|
287
|
-
/**
|
|
288
|
-
* A migration ref (dirName or hash-prefix) resolves in more than one contract
|
|
289
|
-
* space. The user must qualify with `--space <id>` to disambiguate.
|
|
290
|
-
*/
|
|
291
|
-
function errorAmbiguousMigrationRef(ref, spaceIds) {
|
|
292
|
-
const spaceList = spaceIds.join(", ");
|
|
293
|
-
return new ActionableCliError("MIGRATION.AMBIGUOUS_MIGRATION_REF", `Ambiguous migration reference: "${ref}" resolves in multiple spaces — qualify with --space <id>`, {
|
|
294
|
-
why: `"${ref}" matches migrations in spaces: ${spaceList}.`,
|
|
295
|
-
fix: `Qualify with --space <id> to select one space. Available matching spaces: ${spaceList}.`,
|
|
296
|
-
nextActions: [chooseAction(`Qualify with --space <id>, one of: ${spaceList}`)],
|
|
297
|
-
meta: {
|
|
298
|
-
ref,
|
|
299
|
-
spaceIds: [...spaceIds]
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
function mapRefResolutionError(error) {
|
|
304
|
-
switch (error.kind) {
|
|
305
|
-
case "not-found": {
|
|
306
|
-
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.";
|
|
307
|
-
return new ActionableCliError("MIGRATION.REF_NOT_FOUND", `Not a known ${error.grammar} reference: "${error.input}"`, {
|
|
308
|
-
why: `No ${error.grammar} matching "${error.input}" exists in the migration graph or refs index.`,
|
|
309
|
-
fix,
|
|
310
|
-
nextActions: [chooseAction(fix)],
|
|
311
|
-
meta: {
|
|
312
|
-
input: error.input,
|
|
313
|
-
grammar: error.grammar
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
case "ambiguous": return new ActionableCliError("MIGRATION.REF_AMBIGUOUS", `Ambiguous ${error.grammar} reference: "${error.input}"`, {
|
|
318
|
-
why: `"${error.input}" matches multiple ${error.grammar}s: ${error.candidates.join(", ")}`,
|
|
319
|
-
fix: "Provide a longer prefix or use the full hash to disambiguate.",
|
|
320
|
-
nextActions: [chooseAction("Provide a longer prefix or use the full hash to disambiguate")],
|
|
321
|
-
meta: {
|
|
322
|
-
input: error.input,
|
|
323
|
-
candidates: error.candidates,
|
|
324
|
-
grammar: error.grammar
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
case "wrong-grammar": return new ActionableCliError("MIGRATION.REF_WRONG_GRAMMAR", error.message, {
|
|
328
|
-
why: error.message,
|
|
329
|
-
fix: error.fix,
|
|
330
|
-
nextActions: [chooseAction(error.fix)],
|
|
331
|
-
meta: {
|
|
332
|
-
input: error.input,
|
|
333
|
-
expectedGrammar: error.expectedGrammar
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
case "invalid-format": return new ActionableCliError("MIGRATION.REF_INVALID_FORMAT", `Invalid reference format: "${error.input}"`, {
|
|
337
|
-
why: error.reason,
|
|
338
|
-
fix: "Provide a valid contract hash, ref name, or migration directory name.",
|
|
339
|
-
nextActions: [chooseAction("Provide a valid contract hash, ref name, or migration directory name")],
|
|
340
|
-
meta: { input: error.input }
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
//#endregion
|
|
345
|
-
export { errorRuntime$1 as A, errorOutputFormatMutex as C, errorRefSetEmptySentinel as D, errorRefSetBundleNotFound as E, errorUnexpected as F, mapRefResolutionError as I, requireLiveDatabase as L, errorSpaceNotFound as M, errorTargetMigrationNotSupported as N, errorRefSetHashNotInGraph as O, errorTargetMismatch as P, runCommandAction as R, errorNoMigrations as S, errorPlanForgotTheFlag as T, errorLegendHumanOnly as _, errorConfigValidation$1 as a, errorMigrationPackageNotFound as b, errorContractConfigMissing$1 as c, errorDestructiveChanges as d, errorDriverRequired as f, errorInvalidSpaceId as g, errorInvalidOutputFormat as h, errorAmbiguousMigrationRef as i, errorSnapshotMissing as j, errorRunnerFailed as k, errorContractValidationFailed as l, errorHashMismatch as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorConsentPlanMismatch as o, errorFileNotFound as p, chooseAction as r, errorContractArgConflict as s, CliStructuredError$1 as t, errorDatabaseConnectionRequired as u, errorMarkerMismatch as v, errorPathUnreachable as w, errorMigrationPlanningFailed as x, errorMarkerMissing as y };
|
|
346
|
-
|
|
347
|
-
//# sourceMappingURL=cli-errors-B4zTLaqQ-CXgjO9t4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-errors-B4zTLaqQ-CXgjO9t4.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/cli-errors-B4zTLaqQ.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, errorConsentPlanMismatch, 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};\n/**\n* A command that accepts a contract reference both as a positional and as a\n* flag was given both. Structured rather than a bare stderr line, so a script\n* sees the same envelope every other invocation failure produces.\n*/\nfunction errorContractArgConflict(options) {\n\tconst fix = \"Pass the contract reference once — either as the positional argument or as --contract.\";\n\treturn new ActionableCliError(\"CLI.CONTRACT_ARG_CONFLICT\", \"Cannot specify both a positional contract argument and --contract\", {\n\t\twhy: `The positional argument names \"${options.positional}\" and --contract names \"${options.flag}\"; there is no rule for which wins.`,\n\t\tfix,\n\t\tnextActions: [chooseAction(fix)],\n\t\tmeta: {\n\t\t\tpositional: options.positional,\n\t\t\tflag: options.flag\n\t\t}\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\trunCommandAction(\"Inspect a bundle in the path you expected\", \"prisma-next migration show <bundle>\")\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 { errorSnapshotMissing as A, errorPathUnreachable as C, errorRefSetHashNotInGraph as D, errorRefSetEmptySentinel as E, mapRefResolutionError as F, requireLiveDatabase as I, chooseAction as L, errorTargetMigrationNotSupported as M, errorTargetMismatch as N, errorRunnerFailed as O, errorUnexpected as P, runCommandAction as R, errorOutputFormatMutex as S, errorRefSetBundleNotFound as T, errorMarkerMismatch as _, errorConsentPlanMismatch as a, errorMigrationPlanningFailed as b, errorContractValidationFailed as c, errorDriverRequired as d, errorFileNotFound as f, errorLegendHumanOnly as g, errorInvalidSpaceId as h, errorConfigValidation as i, errorSpaceNotFound as j, errorRuntime$1 as k, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorContractArgConflict as o, errorHashMismatch as p, errorAmbiguousMigrationRef as r, errorContractConfigMissing$1 as s, CliStructuredError$1 as t, errorDestructiveChanges as u, errorMarkerMissing as v, errorPlanForgotTheFlag as w, errorNoMigrations as x, errorMigrationPackageNotFound as y };\n\n//# sourceMappingURL=cli-errors-B4zTLaqQ.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;;;;;;AAMA,SAAS,yBAAyB,SAAS;CAC1C,MAAM,MAAM;CACZ,OAAO,IAAI,mBAAmB,6BAA6B,qEAAqE;EAC/H,KAAK,kCAAkC,QAAQ,WAAW,0BAA0B,QAAQ,KAAK;EACjG;EACA,aAAa,CAAC,aAAa,GAAG,CAAC;EAC/B,MAAM;GACL,YAAY,QAAQ;GACpB,MAAM,QAAQ;EACf;CACD,CAAC;AACF;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,4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aAAa,MAAM,MAAM;IAClD;IACA,aAAa,CAAC,aAAa,GAAG,CAAC;IAC/B,MAAM;KACL,OAAO,MAAM;KACb,SAAS,MAAM;IAChB;GACD,CAAC;EACF;EACA,KAAK,aAAa,OAAO,IAAI,mBAAmB,2BAA2B,aAAa,MAAM,QAAQ,eAAe,MAAM,MAAM,IAAI;GACpI,KAAK,IAAI,MAAM,MAAM,qBAAqB,MAAM,QAAQ,KAAK,MAAM,WAAW,KAAK,IAAI;GACvF,KAAK;GACL,aAAa,CAAC,aAAa,8DAA8D,CAAC;GAC1F,MAAM;IACL,OAAO,MAAM;IACb,YAAY,MAAM;IAClB,SAAS,MAAM;GAChB;EACD,CAAC;EACD,KAAK,iBAAiB,OAAO,IAAI,mBAAmB,+BAA+B,MAAM,SAAS;GACjG,KAAK,MAAM;GACX,KAAK,MAAM;GACX,aAAa,CAAC,aAAa,MAAM,GAAG,CAAC;GACrC,MAAM;IACL,OAAO,MAAM;IACb,iBAAiB,MAAM;GACxB;EACD,CAAC;EACD,KAAK,kBAAkB,OAAO,IAAI,mBAAmB,gCAAgC,8BAA8B,MAAM,MAAM,IAAI;GAClI,KAAK,MAAM;GACX,KAAK;GACL,aAAa,CAAC,aAAa,sEAAsE,CAAC;GAClG,MAAM,EAAE,OAAO,MAAM,MAAM;EAC5B,CAAC;CACF;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-errors-iquUoY6O-BFboxglv.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/cli-errors-iquUoY6O.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAuBU,uBAAuB,0BAA0B;WAChD,QAAQ,sBAAsB,WAAW;WACzC,gBAAgB,sBAAsB;WACtC,UAAU;WACV;WACA,UAAU;WACV,YAAY,cAAc,2BAA2B,WAAW;WAChE,qBAAqB,cAAc,+BAA+B,WAAW;WAC7E;WACA;WACA;WACA,aAAa;;;;;;;;;;;;;;UAcd;WACC,eAA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AEA;;WAEA;;aAEE;;aAEA;;;;;;;WAOF;;;;;;;;;;;;UAYD;;;;;;;;EAQR;;;;;;;;;;;;EAYA,QAAQ,uBAAuB;;;;;;EAM/B,SAAS;;;;;;;;EAQT,OAAO,SAAS,gBAAgB,QAAQ;;;;;;;;EAQxC,aAAa,SAAS,sBAAsB,QAAQ;;;;;;;;;EASpD,KAAK,SAAS,cAAc,QAAQ;;;;;;;;;EASpC,OAAO,SAAS,gBAAgB,QAAQ;;;;;;;;;;EAUxC,SAAS,SAAS,kBAAkB,QAAQ;;;;;;;;;;;;;;EAc5C,SAAS,SAAS,kBAAkB,QAAQ;;;;;;;EAO5C,cAAc,QAAQ;;;;;;EAMtB,kBAAkB,QAAQ,oBAAoB;;;;;;EAM9C,WAAW,iBAAiB,iBAAiB;;;;;;;;;;;;;;EAc7C,QAAQ,SAAS,iBAAiB,QAAQ;;;;;;;EAO1C,WAAW,UAAU,oBAAoB;;;;;;;;EAQzC,aAAa,oBAAoB;;;;;;;;EAQjC,iBAAiB,oBAAoB;;;;;;;;EAQrC,0BAA0B;;;;;;;;;EAS1B,mBAAmB,qBAAqB,2BAA2B;;;;;;;;EAQnE,KAAK,SAAS,cAAc,QAAQ"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/contract-infer.d.mts
|
|
3
|
-
//#region src/commands/contract-infer.d.ts
|
|
4
|
-
declare function createContractInferCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createContractInferCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__contract-infer.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__contract-infer.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/contract-infer.d.mts"],"mappings":";;;iBAEiB,8BAA8B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/db-init.d.mts
|
|
3
|
-
//#region src/commands/db-init.d.ts
|
|
4
|
-
declare function createDbInitCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createDbInitCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__db-init.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__db-init.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/db-init.d.mts"],"mappings":";;;iBAEiB,uBAAuB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/db-schema.d.mts
|
|
3
|
-
//#region src/commands/db-schema.d.ts
|
|
4
|
-
declare function createDbSchemaCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createDbSchemaCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__db-schema.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__db-schema.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/db-schema.d.mts"],"mappings":";;;iBAEiB,yBAAyB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/db-sign.d.mts
|
|
3
|
-
//#region src/commands/db-sign.d.ts
|
|
4
|
-
declare function createDbSignCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createDbSignCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__db-sign.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__db-sign.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/db-sign.d.mts"],"mappings":";;;iBAEiB,uBAAuB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/db-update.d.mts
|
|
3
|
-
//#region src/commands/db-update.d.ts
|
|
4
|
-
declare function createDbUpdateCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createDbUpdateCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__db-update.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__db-update.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/db-update.d.mts"],"mappings":";;;iBAEiB,yBAAyB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/db-verify.d.mts
|
|
3
|
-
//#region src/commands/db-verify.d.ts
|
|
4
|
-
declare function createDbVerifyCommand(): Command;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createDbVerifyCommand };
|
|
7
|
-
//# sourceMappingURL=cli__commands__db-verify.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__db-verify.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/db-verify.d.mts"],"mappings":";;;iBAEiB,yBAAyB"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { O as MigratePathDecision, j as PerSpaceExecutionEntry } from "./cli-errors-iquUoY6O-BFboxglv.mjs";
|
|
2
|
-
import { n as MigrateShowMigration } from "./migrate-show-B8UJ9dmb-C4RTPbDk.mjs";
|
|
3
|
-
import { Command } from "commander";
|
|
4
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/migrate.d.mts
|
|
5
|
-
//#region src/commands/migrate.d.ts
|
|
6
|
-
/** Result returned by `migrate --show`. Read-only; no writes performed. */
|
|
7
|
-
interface MigrateShowResult {
|
|
8
|
-
readonly ok: true;
|
|
9
|
-
readonly migrations: readonly MigrateShowMigration[];
|
|
10
|
-
readonly summary: string;
|
|
11
|
-
/**
|
|
12
|
-
* Pre-rendered Tier-3 graph tree for human output. Off-path migrations render
|
|
13
|
-
* dim; on-path migrations render in ordinary colours. Only present in human
|
|
14
|
-
* (non-JSON) mode.
|
|
15
|
-
*/
|
|
16
|
-
readonly graphOutput?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Name column width for the "Will run, in order:" list — globally aligned with
|
|
19
|
-
* every graph-tree section. Only present in human (non-JSON) mode.
|
|
20
|
-
*/
|
|
21
|
-
readonly runListDirNameWidth?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Left-pad offset (number of blank spaces) matching the graph's data-column
|
|
24
|
-
* offset (`globalMaxEdgeTreePrefixWidth`). Used to align list rows with graph
|
|
25
|
-
* rows so every `→` in the output (graph + list) lands at the same column.
|
|
26
|
-
* Only present in human (non-JSON) mode when multiple spaces are rendered.
|
|
27
|
-
*/
|
|
28
|
-
readonly runListLeftPad?: number;
|
|
29
|
-
}
|
|
30
|
-
interface MigrateResult {
|
|
31
|
-
readonly ok: boolean;
|
|
32
|
-
readonly migrationsApplied: number;
|
|
33
|
-
readonly migrationsTotal: number;
|
|
34
|
-
readonly markerHash: string;
|
|
35
|
-
readonly applied: readonly {
|
|
36
|
-
readonly spaceId: string;
|
|
37
|
-
readonly dirName: string;
|
|
38
|
-
readonly migrationHash: string;
|
|
39
|
-
readonly from: string;
|
|
40
|
-
readonly to: string;
|
|
41
|
-
readonly operationsExecuted: number;
|
|
42
|
-
}[];
|
|
43
|
-
readonly summary: string;
|
|
44
|
-
readonly perSpace: readonly PerSpaceExecutionEntry[];
|
|
45
|
-
readonly pathDecision?: MigratePathDecision;
|
|
46
|
-
readonly timings: {
|
|
47
|
-
readonly total: number;
|
|
48
|
-
};
|
|
49
|
-
readonly advancedRef?: {
|
|
50
|
-
readonly name: string;
|
|
51
|
-
readonly hash: string;
|
|
52
|
-
} | null;
|
|
53
|
-
}
|
|
54
|
-
declare function createMigrateCommand(): Command;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { MigrateResult, MigrateShowResult, createMigrateCommand };
|
|
57
|
-
//# sourceMappingURL=cli__commands__migrate.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__migrate.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/migrate.d.mts"],"mappings":";;;;;;UAKU;WACC;WACA,qBAAqB;WACrB;;;;;;WAMA;;;;;WAKA;;;;;;;WAOA;;UAED;WACC;WACA;WACA;WACA;WACA;aACE;aACA;aACA;aACA;aACA;aACA;;WAEF;WACA,mBAAmB;WACnB,eAAe;WACf;aACE;;WAEF;aACE;aACA;;;iBAGI,wBAAwB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { f as migrationCheckResultSchema, n as MigrationCheckResult, t as CheckFailure } from "./schemas-BGgjiKV0-Rh8RlMCl.mjs";
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
//#region ../../../1-framework/3-tooling/cli/dist/commands/migration-check.d.mts
|
|
4
|
-
//#region src/commands/migration-check.d.ts
|
|
5
|
-
declare function createMigrationCheckCommand(): Command;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { type CheckFailure, type MigrationCheckResult, createMigrationCheckCommand, migrationCheckResultSchema };
|
|
8
|
-
//# sourceMappingURL=cli__commands__migration-check.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli__commands__migration-check.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/commands/migration-check.d.mts"],"mappings":";;;;iBAGiB,+BAA+B"}
|