@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-B86mXFNC-C2HAUCRn.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/init-B86mXFNC.mjs"],"sourcesContent":["import { c as targetLabel, i as scaffoldSpecifierResolverFor, l as targetPackageName, n as dbFile, o as starterSchema, r as defaultSchemaPath, t as configFile } from \"./code-templates-D_sGnEF6.mjs\";\nimport { t as CliStructuredError } from \"./cli-errors-B4zTLaqQ.mjs\";\nimport { i as formatErrorOutput, r as formatErrorJson, t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { B as errorInitReinitNeedsForce, C as validateSchemaPath, E as envFileContent, F as errorInitInstallFailed, G as buildCatalogWarnings, H as errorInitStrictProbeWithoutProbe, I as errorInitInvalidManifest, L as errorInitInvalidTsconfig, M as resolveProjectSkillInstallCommands, N as probeServerVersion, O as DEFAULT_SKILL_SOURCES, P as errorInitEmitFailed, R as errorInitMissingFlags, S as resolveTarget, T as envExampleContent, U as errorInitUserAborted, V as errorInitSkillInstallFailed, _ as formatAddArgs, a as mergeTsConfig, b as hasProjectManifest, c as findStaleArtifacts, d as ensureEsmModuleType, f as mergePackageScripts, g as detectPackageManager, h as requiredGitattributesLines, i as defaultTsConfig, j as legacySkillDirs, k as formatSkillInstallCommand, l as removeDependency, m as mergeGitattributes, n as isRecognisedPnpmResolutionError, o as minimalProjectReadmeMd, p as mergeGitignore, r as TsConfigParseError, s as quickReferenceMd, t as redactSecrets, u as REQUIRED_SCRIPTS, v as formatAddDevArgs, w as MIN_SERVER_VERSION, x as resolveAuthoring, y as formatRunCommand, z as errorInitProbeFailed } from \"./redact-secrets-ojVi2cpy.mjs\";\nimport { i as renderInitOutro, n as buildNextSteps, r as formatInitJson, t as InitOutputSchema } from \"./output-DP3woAjV.mjs\";\nimport { basename, dirname, extname, isAbsolute, join } from \"pathe\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport * as clack from \"@clack/prompts\";\nimport { docsUrlFor } from \"@internal/utils/structured-error\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n//#region src/commands/init/inputs.ts\n/**\n* Resolves every required input for `runInit`. In interactive mode, missing\n* inputs are prompted via clack; in non-interactive mode, missing required\n* inputs throw a structured error listing exactly which flags are missing\n* (FR1.4). Throws `CliStructuredError` on any unrecoverable input issue.\n*\n* `canPrompt` is decoupled from `flags.interactive` so the action handler\n* (`./index.ts`) owns the merge of stdout-TTY (decoration) and stdin-TTY\n* (prompts). `flags.interactive` continues to gate `TerminalUI` decoration\n* — see [Style Guide § Interactivity](../../../../../../../docs/CLI%20Style%20Guide.md#interactivity).\n*/\nasync function resolveInitInputs(ctx) {\n\tconst { baseDir, options, flags, canPrompt } = ctx;\n\tconst force = Boolean(options.force);\n\tconst autoAcceptPrompts = Boolean(flags.yes);\n\tif (options.strictProbe && !options.probeDb) throw errorInitStrictProbeWithoutProbe();\n\tconst reinit = await resolveReinit({\n\t\tbaseDir,\n\t\tforce,\n\t\tcanPrompt,\n\t\tautoAcceptPrompts\n\t});\n\tconst target = resolveTarget(options.target);\n\tconst authoring = resolveAuthoring(options.authoring);\n\tconst missing = [];\n\tif (target === void 0) missing.push(\"target\");\n\tif (authoring === void 0) missing.push(\"authoring\");\n\tif (!canPrompt && missing.length > 0) throw errorInitMissingFlags({\n\t\tmissing,\n\t\twhy: process.stdin.isTTY ? \"Non-interactive mode is active (`--no-interactive` or stdout is piped).\" : \"stdin is not a TTY, so `init` cannot prompt interactively.\"\n\t});\n\tconst finalTarget = target ?? await promptTarget();\n\tconst finalAuthoring = authoring ?? await promptAuthoring();\n\tconst finalSchemaPath = options.schemaPath !== void 0 ? validateSchemaPath(options.schemaPath, finalAuthoring) : canPrompt ? await promptSchemaPath(finalAuthoring) : defaultSchemaPath(finalAuthoring);\n\tconst writeEnv = await resolveWriteEnv({\n\t\tflag: options.writeEnv,\n\t\tcanPrompt,\n\t\tautoAcceptPrompts\n\t});\n\tconst removePreviousFacade = await resolveRemovePreviousFacade({\n\t\tbaseDir,\n\t\ttarget: finalTarget,\n\t\treinit,\n\t\tforce,\n\t\tcanPrompt,\n\t\tautoAcceptPrompts\n\t});\n\tconst installProjectSkill = options.skill !== false;\n\treturn {\n\t\ttarget: finalTarget,\n\t\tauthoring: finalAuthoring,\n\t\tschemaPath: finalSchemaPath,\n\t\tinstall: options.install !== false,\n\t\twriteEnv,\n\t\tprobeDb: Boolean(options.probeDb),\n\t\tstrictProbe: Boolean(options.strictProbe),\n\t\treinit,\n\t\tremovePreviousFacade,\n\t\tinstallProjectSkill\n\t};\n}\nasync function resolveWriteEnv(opts) {\n\tif (opts.flag !== void 0) return Boolean(opts.flag);\n\tif (!opts.canPrompt || opts.autoAcceptPrompts) return false;\n\tconst result = await clack.confirm({\n\t\tmessage: \"Also write a .env file from .env.example? (gitignored)\",\n\t\tinitialValue: false,\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result)) throw errorInitUserAborted();\n\treturn Boolean(result);\n}\n/**\n* FR9.2 — detects whether re-init is switching targets (the previous\n* facade differs from the chosen target's facade) and resolves the\n* remove-or-keep question.\n*\n* The non-interactive contract is the same as the `--force` re-init\n* gate above: a non-interactive run that reaches this helper always\n* has `--force` (otherwise `resolveReinit` would have thrown 5002), so\n* the removal proceeds without further prompting. Interactive runs see\n* a `clack.confirm` with `initialValue: true` — the destructive default\n* is correct because keeping both facades produces a project that\n* imports from one but pays for both in the lockfile, which is a\n* silent foot-gun the user almost never wants.\n*\n* Returns the previous facade package name when the user consented (or\n* was force-ed) to remove it, otherwise `null`. Parse failures on\n* `package.json` resolve to `null` here — `runInit`'s precondition\n* gate surfaces a structured 5010 error for the same file shortly\n* after, so we avoid double-reporting and keep this helper side-effect\n* free under hostile inputs.\n*/\nasync function resolveRemovePreviousFacade(opts) {\n\tif (!opts.reinit) return null;\n\tconst packageJsonPath = join(opts.baseDir, \"package.json\");\n\tif (!existsSync(packageJsonPath)) return null;\n\tconst otherTarget = opts.target === \"postgres\" ? \"mongo\" : \"postgres\";\n\tconst otherFacadeNames = [targetPackageName(otherTarget, scaffoldSpecifierResolverFor(otherTarget)), targetPackageName(otherTarget)];\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(readFileSync(packageJsonPath, \"utf-8\"));\n\t} catch {\n\t\treturn null;\n\t}\n\tconst deps = parsed[\"dependencies\"];\n\tif (deps === null || typeof deps !== \"object\" || Array.isArray(deps)) return null;\n\tconst otherFacade = otherFacadeNames.find((name) => Object.hasOwn(deps, name));\n\tif (otherFacade === void 0) return null;\n\tif (opts.force || opts.canPrompt && opts.autoAcceptPrompts) return otherFacade;\n\tif (!opts.canPrompt) return otherFacade;\n\tconst result = await clack.confirm({\n\t\tmessage: `Switching from ${targetLabel(otherTarget)} to ${targetLabel(opts.target)} — remove ${otherFacade} from package.json dependencies?`,\n\t\tinitialValue: true,\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result)) throw errorInitUserAborted();\n\treturn result === true ? otherFacade : null;\n}\nasync function resolveReinit(opts) {\n\tif (!existsSync(join(opts.baseDir, \"prisma-next.config.ts\"))) return false;\n\tif (opts.force) return true;\n\tif (!opts.canPrompt) throw errorInitReinitNeedsForce();\n\tif (opts.autoAcceptPrompts) return true;\n\tconst result = await clack.confirm({\n\t\tmessage: \"This project is already initialized. Re-initialize? This will overwrite all generated files.\",\n\t\tinitialValue: false,\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result) || result !== true) throw errorInitUserAborted();\n\treturn true;\n}\nasync function promptTarget() {\n\tconst result = await clack.select({\n\t\tmessage: \"What database are you using?\",\n\t\toptions: [{\n\t\t\tvalue: \"postgres\",\n\t\t\tlabel: \"PostgreSQL\"\n\t\t}, {\n\t\t\tvalue: \"mongo\",\n\t\t\tlabel: \"MongoDB\"\n\t\t}],\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result)) throw errorInitUserAborted();\n\treturn result;\n}\nasync function promptAuthoring() {\n\tconst result = await clack.select({\n\t\tmessage: \"How do you want to write your schema?\",\n\t\toptions: [{\n\t\t\tvalue: \"psl\",\n\t\t\tlabel: \"Prisma Schema Language (.prisma)\"\n\t\t}, {\n\t\t\tvalue: \"typescript\",\n\t\t\tlabel: \"TypeScript (.ts)\"\n\t\t}],\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result)) throw errorInitUserAborted();\n\treturn result;\n}\nasync function promptSchemaPath(authoring) {\n\tconst expectedExt = authoring === \"typescript\" ? \".ts\" : \".prisma\";\n\tconst result = await clack.text({\n\t\tmessage: \"Where should the schema file go?\",\n\t\tinitialValue: defaultSchemaPath(authoring),\n\t\tvalidate(value = \"\") {\n\t\t\tconst trimmed = value.trim();\n\t\t\tif (trimmed.length === 0) return \"Path cannot be empty\";\n\t\t\tif (trimmed.endsWith(\"/\") || trimmed.endsWith(\"\\\\\")) return \"Path must be a file, not a directory\";\n\t\t\tconst ext = extname(trimmed).toLowerCase();\n\t\t\tif (ext === \"\") return \"Path must include a file extension (e.g. .prisma or .ts)\";\n\t\t\tif (ext !== expectedExt) return `Schema path must end in ${expectedExt} for --authoring ${authoring} (got ${ext}).`;\n\t\t},\n\t\toutput: process.stderr\n\t});\n\tif (clack.isCancel(result)) throw errorInitUserAborted();\n\treturn validateSchemaPath(result, authoring);\n}\n//#endregion\n//#region src/commands/init/skill-install.ts\nconst exec = promisify(execFile);\n/**\n* Parse the project-pm-formatted command into an exec call. The\n* format-then-parse split keeps the user-facing command string the same\n* as the surface the structured error advertises, so a user who copies\n* the error's `fix` line gets the same invocation that init just\n* attempted. Single-quoted tokens are preserved in the display form so\n* shell-sensitive characters stay copy-safe, then stripped before\n* `execFile`.\n*/\nfunction commandToExec(command) {\n\tconst tokens = (command.match(/'[^']*'|\\S+/g) ?? []).map((token) => token.startsWith(\"'\") && token.endsWith(\"'\") ? token.slice(1, -1) : token);\n\treturn {\n\t\tfile: tokens[0] ?? \"npx\",\n\t\targs: tokens.slice(1)\n\t};\n}\n/**\n* Runs the project-level skill install for every source in\n* `DEFAULT_SKILL_SOURCES`, in order. Returns\n* `{ ok: true, commands }` on success; throws a structured\n* `errorInitSkillInstallFailed` on the first failure (subsequent\n* sources are not attempted — the user opted into Prisma Next by\n* running `init` and a partial install would leave the project in an\n* ambiguous state). The throw is intentionally fatal — project-level\n* skill install is unconditional (modulo `--no-skill`).\n*/\nasync function runProjectLevelSkillInstall(ctx) {\n\tconst commands = [];\n\tconst installCommands = resolveProjectSkillInstallCommands(ctx.pm);\n\tfor (const command of installCommands) {\n\t\tconst { file, args } = commandToExec(command);\n\t\ttry {\n\t\t\tawait exec(file, args, { cwd: ctx.baseDir });\n\t\t\tcommands.push(command);\n\t\t} catch (err) {\n\t\t\tthrow errorInitSkillInstallFailed({\n\t\t\t\tskillInstallCommand: command,\n\t\t\t\tfilesWritten: ctx.filesWritten,\n\t\t\t\tcause: redactSecrets(readChildStderr$1(err)) || (err instanceof Error ? err.message : String(err))\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\tok: true,\n\t\tcommands\n\t};\n}\nfunction readChildStderr$1(err) {\n\tif (err instanceof Error && \"stderr\" in err) return String(err.stderr ?? \"\");\n\treturn \"\";\n}\n//#endregion\n//#region src/commands/init/init.ts\n/**\n* Runs the `init` command end-to-end and returns the exit code. Catches\n* structured CLI errors raised at every phase (input resolution, install,\n* emit) and renders them via the same UI surface as success output\n* (`--json` to stdout, human to stderr). Exit codes follow the documented\n* stable set in `./exit-codes.ts` and the\n* [Style Guide § Exit Codes](../../../../../../../docs/CLI%20Style%20Guide.md#exit-codes).\n*\n* Layered for testability: the action handler in `./index.ts` is\n* responsible for parsing flags and constructing `runOptions`; this\n* function does no flag parsing of its own.\n*/\nasync function runInit(baseDir, runOptions) {\n\tconst { options, flags, canPrompt, probeOverrides } = runOptions;\n\tconst ui = createTerminalUI(flags);\n\tconst warnings = [];\n\tconst filesWritten = [];\n\tconst filesDeleted = [];\n\tif (!flags.json && !flags.quiet) clack.intro(\"prisma-next init\", { output: process.stderr });\n\tlet inputs;\n\ttry {\n\t\tinputs = await resolveInitInputs({\n\t\t\tbaseDir,\n\t\t\toptions,\n\t\t\tflags,\n\t\t\tcanPrompt\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return emitError(ui, flags, error);\n\t\tthrow error;\n\t}\n\tconst pm = await detectPackageManager(baseDir);\n\tconst pkgRun = formatRunCommand(pm, \"prisma-next\", \"\").trimEnd();\n\tconst schemaDir = dirname(inputs.schemaPath);\n\tconst configContractPath = isAbsolute(inputs.schemaPath) ? inputs.schemaPath : `./${inputs.schemaPath}`;\n\tconst resolveImportSpecifier = scaffoldSpecifierResolverFor(inputs.target);\n\tconst filesToWrite = [\n\t\t{\n\t\t\tpath: inputs.schemaPath,\n\t\t\tcontent: starterSchema(inputs.target, inputs.authoring, resolveImportSpecifier)\n\t\t},\n\t\t{\n\t\t\tpath: \"prisma-next.config.ts\",\n\t\t\tcontent: configFile(inputs.target, configContractPath, resolveImportSpecifier)\n\t\t},\n\t\t{\n\t\t\tpath: join(schemaDir, \"db.ts\"),\n\t\t\tcontent: dbFile(inputs.target, resolveImportSpecifier)\n\t\t},\n\t\t{\n\t\t\tpath: \"prisma-next.md\",\n\t\t\tcontent: quickReferenceMd(inputs.target, inputs.authoring, inputs.schemaPath, pkgRun, resolveImportSpecifier)\n\t\t},\n\t\t{\n\t\t\tpath: \".env.example\",\n\t\t\tcontent: envExampleContent(inputs.target)\n\t\t}\n\t];\n\tconst filesToDelete = inputs.reinit ? [...findStaleArtifacts(baseDir, schemaDir)] : [];\n\tconst legacyDirsToDelete = legacySkillDirs().filter((rel) => existsSync(join(baseDir, rel)));\n\tif (inputs.writeEnv) if (!existsSync(join(baseDir, \".env\"))) filesToWrite.push({\n\t\tpath: \".env\",\n\t\tcontent: envFileContent(inputs.target)\n\t});\n\telse warnings.push(\".env already exists; leaving it untouched. Compare with .env.example for any new keys.\");\n\tconst tsconfigPath = join(baseDir, \"tsconfig.json\");\n\tif (existsSync(tsconfigPath)) {\n\t\tconst existing = readFileSync(tsconfigPath, \"utf-8\");\n\t\tlet merged;\n\t\ttry {\n\t\t\tmerged = mergeTsConfig(existing);\n\t\t} catch (err) {\n\t\t\tif (err instanceof TsConfigParseError) return emitError(ui, flags, errorInitInvalidTsconfig({\n\t\t\t\tpath: \"tsconfig.json\",\n\t\t\t\tcause: err.message\n\t\t\t}));\n\t\t\tthrow err;\n\t\t}\n\t\tfilesToWrite.push({\n\t\t\tpath: \"tsconfig.json\",\n\t\t\tcontent: merged,\n\t\t\tlogMessage: \"Updated tsconfig.json with required compiler options.\"\n\t\t});\n\t} else filesToWrite.push({\n\t\tpath: \"tsconfig.json\",\n\t\tcontent: defaultTsConfig()\n\t});\n\tconst gitignorePath = join(baseDir, \".gitignore\");\n\tconst newGitignore = mergeGitignore(existsSync(gitignorePath) ? readFileSync(gitignorePath, \"utf-8\") : void 0);\n\tif (newGitignore !== null) filesToWrite.push({\n\t\tpath: \".gitignore\",\n\t\tcontent: newGitignore\n\t});\n\tconst gitattributesPath = join(baseDir, \".gitattributes\");\n\tconst newGitattributes = mergeGitattributes(existsSync(gitattributesPath) ? readFileSync(gitattributesPath, \"utf-8\") : void 0, requiredGitattributesLines(schemaDir, inputs.target));\n\tif (newGitattributes !== null) filesToWrite.push({\n\t\tpath: \".gitattributes\",\n\t\tcontent: newGitattributes\n\t});\n\tconst packageJsonPath = join(baseDir, \"package.json\");\n\tconst packageJsonExisted = existsSync(packageJsonPath);\n\tconst synthesisePackageJson = !packageJsonExisted && !hasProjectManifest(baseDir);\n\tlet parsedPackageJson = null;\n\tif (packageJsonExisted || synthesisePackageJson) {\n\t\tconst pkgRaw = packageJsonExisted ? readFileSync(packageJsonPath, \"utf-8\") : defaultPackageJsonContent(basename(baseDir));\n\t\ttry {\n\t\t\tparsedPackageJson = JSON.parse(pkgRaw);\n\t\t} catch (err) {\n\t\t\tif (err instanceof SyntaxError) return emitError(ui, flags, errorInitInvalidManifest({\n\t\t\t\tpath: \"package.json\",\n\t\t\t\tcause: err.message\n\t\t\t}));\n\t\t\tthrow err;\n\t\t}\n\t\tlet workingPkg = pkgRaw;\n\t\tlet pkgChanged = synthesisePackageJson;\n\t\tif (inputs.removePreviousFacade !== null) {\n\t\t\tconst next = removeDependency(workingPkg, inputs.removePreviousFacade);\n\t\t\tif (next !== null) {\n\t\t\t\tworkingPkg = next;\n\t\t\t\tpkgChanged = true;\n\t\t\t}\n\t\t}\n\t\tconst { content: nextPkg, warnings: scriptWarnings } = mergePackageScripts(workingPkg, REQUIRED_SCRIPTS);\n\t\tif (nextPkg !== null) {\n\t\t\tworkingPkg = nextPkg;\n\t\t\tpkgChanged = true;\n\t\t}\n\t\tconst { content: typedPkg, warning: typeWarning } = ensureEsmModuleType(workingPkg);\n\t\tif (typedPkg !== null) {\n\t\t\tworkingPkg = typedPkg;\n\t\t\tpkgChanged = true;\n\t\t}\n\t\tif (pkgChanged) filesToWrite.push({\n\t\t\tpath: \"package.json\",\n\t\t\tcontent: workingPkg\n\t\t});\n\t\twarnings.push(...scriptWarnings);\n\t\tif (typeWarning !== null) warnings.push(typeWarning);\n\t\tif (synthesisePackageJson) warnings.push(\"No package.json found in the target directory; created a minimal one. Edit `name` / `version` to taste.\");\n\t}\n\tif (existsSync(join(baseDir, \"src/index.ts\"))) if (!existsSync(join(baseDir, \"README.md\"))) {\n\t\tconst rawName = parsedPackageJson !== null && typeof parsedPackageJson[\"name\"] === \"string\" ? parsedPackageJson[\"name\"] : basename(baseDir);\n\t\tfilesToWrite.push({\n\t\t\tpath: \"README.md\",\n\t\t\tcontent: minimalProjectReadmeMd(inputs.target, inputs.schemaPath, sanitisePackageName(rawName), pm)\n\t\t});\n\t} else warnings.push(\"README.md already exists; leaving it untouched.\");\n\tfor (const file of filesToWrite) {\n\t\tconst fullPath = join(baseDir, file.path);\n\t\tmkdirSync(dirname(fullPath), { recursive: true });\n\t\twriteFileSync(fullPath, file.content, \"utf-8\");\n\t\tfilesWritten.push(file.path);\n\t\tif (file.logMessage !== void 0 && !flags.json && !flags.quiet) ui.log(file.logMessage);\n\t}\n\tfor (const rel of filesToDelete) {\n\t\tconst fullPath = join(baseDir, rel);\n\t\tif (!existsSync(fullPath)) continue;\n\t\ttry {\n\t\t\tunlinkSync(fullPath);\n\t\t\tfilesDeleted.push(rel);\n\t\t} catch (err) {\n\t\t\tif (!(err instanceof Error && \"code\" in err && err.code === \"ENOENT\")) throw err;\n\t\t}\n\t}\n\tfor (const rel of legacyDirsToDelete) {\n\t\trmSync(join(baseDir, rel), {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t\tfilesDeleted.push(rel);\n\t}\n\tconst emitCommand = formatRunCommand(pm, \"prisma-next\", \"contract emit\");\n\tlet install;\n\ttry {\n\t\tinstall = await runInstall({\n\t\t\tbaseDir,\n\t\t\tpm,\n\t\t\ttarget: inputs.target,\n\t\t\tinstall: inputs.install,\n\t\t\tflags,\n\t\t\tui,\n\t\t\tfilesWritten,\n\t\t\tresolveImportSpecifier,\n\t\t\thasTypesNode: parsedPackageJson !== null ? hasDirectDep(parsedPackageJson, \"@types/node\") : false\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return emitError(ui, flags, error);\n\t\tthrow error;\n\t}\n\twarnings.push(...install.warnings);\n\tlet contractEmitted = false;\n\tif (!install.skipped) try {\n\t\tawait runEmit({\n\t\t\tbaseDir,\n\t\t\tui,\n\t\t\tfilesWritten,\n\t\t\temitCommand\n\t\t});\n\t\tcontractEmitted = true;\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return emitError(ui, flags, error);\n\t\tthrow error;\n\t}\n\tif (inputs.probeDb) {\n\t\tconst escalated = applyProbeOutcome(await probeServerVersion({\n\t\t\tbaseDir,\n\t\t\ttarget: inputs.target,\n\t\t\tdatabaseUrl: process.env[\"DATABASE_URL\"],\n\t\t\tminVersion: MIN_SERVER_VERSION[inputs.target]\n\t\t}, probeOverrides ?? {}), {\n\t\t\tstrictProbe: inputs.strictProbe,\n\t\t\twarnings\n\t\t});\n\t\tif (escalated !== null) return emitError(ui, flags, errorInitProbeFailed({\n\t\t\tcause: escalated,\n\t\t\tfilesWritten\n\t\t}));\n\t}\n\tconst manualProjectSkillSummary = DEFAULT_SKILL_SOURCES.map((source) => formatSkillInstallCommand({\n\t\tpm: install.effectivePm,\n\t\tsource\n\t})).map((c) => `\\`${c}\\``).join(\" && \");\n\tlet skillRegistered = false;\n\tif (!inputs.installProjectSkill) warnings.push(`Skipped Prisma Next skills install (--no-skill). To install the skills later, run: ${manualProjectSkillSummary}`);\n\telse {\n\t\tconst spinner = ui.spinner();\n\t\tspinner.start(\"Registering Prisma Next skills with the agent runtime...\");\n\t\ttry {\n\t\t\tconst project = await runProjectLevelSkillInstall({\n\t\t\t\tbaseDir,\n\t\t\t\tpm: install.effectivePm,\n\t\t\t\tfilesWritten\n\t\t\t});\n\t\t\tspinner.stop(`Registered Prisma Next skills (project level) — ran ${project.commands.map((c) => `\\`${c}\\``).join(\", \")}`);\n\t\t\tskillRegistered = true;\n\t\t} catch (error) {\n\t\t\tspinner.stop(\"Agent-skill install failed\");\n\t\t\tif (CliStructuredError.is(error)) return emitError(ui, flags, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tconst packagesInstalled = install.skipped ? \"skipped\" : \"installed\";\n\tconst output = {\n\t\tok: true,\n\t\ttarget: inputs.target === \"mongo\" ? \"mongodb\" : \"postgres\",\n\t\tauthoring: inputs.authoring,\n\t\tschemaPath: inputs.schemaPath,\n\t\tfilesWritten,\n\t\tfilesDeleted,\n\t\tpackagesInstalled: {\n\t\t\tstatus: packagesInstalled,\n\t\t\tdeps: [...install.deps],\n\t\t\tdevDeps: [...install.devDeps]\n\t\t},\n\t\tcontractEmitted,\n\t\tnextSteps: buildNextSteps({\n\t\t\ttarget: inputs.target === \"mongo\" ? \"mongodb\" : \"postgres\",\n\t\t\tpackagesInstalled,\n\t\t\tcontractEmitted,\n\t\t\temitCommand,\n\t\t\tschemaPath: inputs.schemaPath,\n\t\t\tskillRegistered\n\t\t}),\n\t\twarnings\n\t};\n\tconst validated = InitOutputSchema(output);\n\tif (validated instanceof Error || validated.problems !== void 0) return emitError(ui, flags, new CliStructuredError(\"CLI.INIT_INVALID_OUTPUT_DOCUMENT\", \"Init produced an invalid output document\", {\n\t\twhy: `The success document failed schema validation: ${String(validated)}`,\n\t\tfix: \"This is a bug in prisma-next. Please report it with the full `-v` output.\",\n\t\tdocsUrl: docsUrlFor(\"CLI.INIT_INVALID_OUTPUT_DOCUMENT\")\n\t}));\n\tif (flags.json) ui.output(formatInitJson(output));\n\telse {\n\t\trenderInitOutro(ui, output, flags);\n\t\tif (!flags.quiet) clack.outro(\"Done. Open prisma-next.md to get started.\", { output: process.stderr });\n\t}\n\treturn 0;\n}\n/**\n* Renders a structured CLI error to the right channel and returns the exit\n* code derived from the error's PN code. JSON-mode errors go to stdout\n* (so consumers always parse from one place); human-mode errors go to\n* stderr. Mirrors `handleResult` but returns init-specific exit codes\n* rather than the CLI/RUN binary.\n*/\nfunction emitError(ui, flags, error) {\n\tconst envelope = error.toEnvelope();\n\tif (flags.json) ui.output(formatErrorJson(envelope));\n\telse ui.error(formatErrorOutput(envelope, flags));\n\treturn exitCodeForError(error);\n}\n/**\n* Maps a structured init error to its documented exit code. Centralised so\n* the error → exit-code contract lives next to the codes themselves.\n*\n* `CLI.INIT_INVALID_OUTPUT_DOCUMENT` (and the unknown-code default branch)\n* routes to `INIT_EXIT_INTERNAL_ERROR` because those represent prisma-next\n* bugs the user did not cause — surfacing them as `PRECONDITION` would\n* mislead automation into thinking the caller mis-invoked the CLI.\n*\n* See [exit-codes.ts](./exit-codes.ts) for the canonical list and\n* [Style Guide § Exit Codes](../../../../../../../docs/CLI%20Style%20Guide.md#exit-codes)\n* for the reservation policy.\n*\n* Exported for unit tests so the mapping can be asserted without\n* round-tripping a full `runInit` invocation.\n*/\nfunction exitCodeForError(error) {\n\tswitch (error.code) {\n\t\tcase \"CLI.INIT_REINIT_NEEDS_FORCE\":\n\t\tcase \"CLI.INIT_MISSING_FLAGS\":\n\t\tcase \"CLI.INIT_INVALID_FLAG_VALUE\":\n\t\tcase \"CLI.INIT_STRICT_PROBE_WITHOUT_PROBE\":\n\t\tcase \"CLI.INIT_INVALID_MANIFEST\":\n\t\tcase \"CLI.INIT_INVALID_TSCONFIG\":\n\t\tcase \"CLI.INIT_PROBE_FAILED\":\n\t\tcase \"CLI.INIT_AUTHORING_SCHEMA_PATH_MISMATCH\":\n\t\tcase \"CLI.INIT_WRITE_FAILED\": return 2;\n\t\tcase \"CLI.INIT_USER_ABORTED\": return 3;\n\t\tcase \"CLI.INIT_INSTALL_FAILED\": return 4;\n\t\tcase \"CLI.INIT_EMIT_FAILED\": return 5;\n\t\tcase \"CLI.INIT_INVALID_OUTPUT_DOCUMENT\": return 1;\n\t\tcase \"CLI.INIT_SKILL_INSTALL_FAILED\": return 6;\n\t\tdefault: return 1;\n\t}\n}\n/**\n* Folds a `ProbeOutcome` into init's warning channel and returns the\n* fatal cause string when `--strict-probe` should escalate. Mirrors\n* the FR8.3 contract:\n*\n* - `ok` — informational; nothing surfaced unless verbose. (We could\n* plumb a `note` here, but the spec only requires the warning side\n* of the contract; an \"all good\" line would just be noise on the\n* common path.)\n* - `below-minimum` — warning regardless of `--strict-probe`. The\n* probe ran successfully and found an old server; that is not a\n* probe *failure* (which is what `--strict-probe` escalates), it\n* is the probe doing its job.\n* - `no-database-url` / `connection-failed` / `driver-missing` —\n* warning by default, fatal under `--strict-probe`.\n*\n* Exported for unit tests so the branching contract can be asserted\n* without spinning up a full `runInit` round trip.\n*/\nfunction applyProbeOutcome(outcome, ctx) {\n\tswitch (outcome.kind) {\n\t\tcase \"ok\": return null;\n\t\tcase \"below-minimum\":\n\t\t\tctx.warnings.push(outcome.message);\n\t\t\treturn null;\n\t\tcase \"no-database-url\":\n\t\tcase \"connection-failed\":\n\t\tcase \"driver-missing\":\n\t\t\tif (ctx.strictProbe) return outcome.message;\n\t\t\tctx.warnings.push(outcome.message);\n\t\t\treturn null;\n\t}\n}\n/**\n* Drives the `pnpm add` / `npm install` step. Failures are escalated to\n* a structured `errorInitInstallFailed` (exit code 4) — the spec treats\n* an unrecoverable install as a hard outcome rather than a warning so\n* CI/agents can branch on the exit code (FR1.6).\n*\n* For pnpm specifically, we additionally implement the FR7.2 fallback:\n* if pnpm fails with a recognised workspace/catalog resolution error\n* class (typically caused by a registry version that leaked\n* `workspace:*` or `catalog:` specifiers), we retry the install using\n* `npm` and surface a non-fatal warning explaining the swap.\n*/\nasync function runInstall(ctx) {\n\tconst { baseDir, pm, target, install, flags, ui, filesWritten, hasTypesNode } = ctx;\n\tconst deps = [targetPackageName(target, ctx.resolveImportSpecifier), \"dotenv\"];\n\tconst devDeps = hasTypesNode ? [\"prisma-next\"] : [\"prisma-next\", \"@types/node\"];\n\tconst addCommand = `${pm} ${formatAddArgs(pm, deps).join(\" \")}`;\n\tconst addDevCommand = `${pm} ${formatAddDevArgs(pm, devDeps).join(\" \")}`;\n\tconst emitCommand = formatRunCommand(pm, \"prisma-next\", \"contract emit\");\n\tconst catalogWarnings = pm === \"pnpm\" ? buildCatalogWarnings(baseDir, [...deps, ...devDeps]) : [];\n\tif (!install) {\n\t\tif (!flags.json && !flags.quiet) ui.note([\n\t\t\t\"Run the following commands to complete setup:\",\n\t\t\t\"\",\n\t\t\t\" 1. Install dependencies:\",\n\t\t\t` ${addCommand}`,\n\t\t\t` ${addDevCommand}`,\n\t\t\t\"\",\n\t\t\t\" 2. Emit the contract:\",\n\t\t\t` ${emitCommand}`\n\t\t].join(\"\\n\"), \"Manual steps\");\n\t\treturn {\n\t\t\tskipped: true,\n\t\t\tdeps: [],\n\t\t\tdevDeps: [],\n\t\t\twarnings: catalogWarnings,\n\t\t\teffectivePm: pm\n\t\t};\n\t}\n\tconst exec = promisify(execFile);\n\tconst runPair = async (manager) => {\n\t\tawait exec(manager, formatAddArgs(manager, deps), { cwd: baseDir });\n\t\tawait exec(manager, formatAddDevArgs(manager, devDeps), { cwd: baseDir });\n\t};\n\tconst allPackages = [...deps, ...devDeps].join(\", \");\n\tconst spinner = ui.spinner();\n\tspinner.start(`Installing ${allPackages}...`);\n\ttry {\n\t\tawait runPair(pm);\n\t\tspinner.stop(`Installed ${allPackages}`);\n\t\treturn {\n\t\t\tskipped: false,\n\t\t\tdeps,\n\t\t\tdevDeps,\n\t\t\twarnings: catalogWarnings,\n\t\t\teffectivePm: pm\n\t\t};\n\t} catch (err) {\n\t\tconst stderrText = redactSecrets(readChildStderr(err));\n\t\tif (pm === \"pnpm\" && isRecognisedPnpmResolutionError(stderrText)) {\n\t\t\tspinner.message(\"pnpm could not resolve a workspace/catalog dependency, retrying with npm...\");\n\t\t\ttry {\n\t\t\t\tawait runPair(\"npm\");\n\t\t\t\tspinner.stop(`Installed ${allPackages} via npm (pnpm fallback)`);\n\t\t\t\treturn {\n\t\t\t\t\tskipped: false,\n\t\t\t\t\tdeps,\n\t\t\t\t\tdevDeps,\n\t\t\t\t\twarnings: [[\n\t\t\t\t\t\t\"pnpm could not install: a published Prisma Next dependency leaked a `workspace:*` or `catalog:` specifier.\",\n\t\t\t\t\t\t\"Falling back to `npm install` so init can complete.\",\n\t\t\t\t\t\tstderrText ? ` pnpm error: ${stderrText.trim().split(\"\\n\")[0]}` : \"\",\n\t\t\t\t\t\t\"Once the offending package republishes a clean version, re-run `pnpm install` to switch back.\"\n\t\t\t\t\t].filter(Boolean).join(\"\\n\")],\n\t\t\t\t\teffectivePm: \"npm\"\n\t\t\t\t};\n\t\t\t} catch (npmErr) {\n\t\t\t\tspinner.stop(\"Installation failed\");\n\t\t\t\tthrow errorInitInstallFailed({\n\t\t\t\t\taddCommand,\n\t\t\t\t\taddDevCommand,\n\t\t\t\t\temitCommand,\n\t\t\t\t\tfilesWritten,\n\t\t\t\t\tstderrLines: [stderrText, redactSecrets(readChildStderr(npmErr))]\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tspinner.stop(\"Installation failed\");\n\t\tthrow errorInitInstallFailed({\n\t\t\taddCommand,\n\t\t\taddDevCommand,\n\t\t\temitCommand,\n\t\t\tfilesWritten,\n\t\t\tstderrLines: [stderrText]\n\t\t});\n\t}\n}\n/**\n* FR2.1 — true when the parsed `package.json` declares `name` directly\n* in either `dependencies` or `devDependencies`. We deliberately don't\n* inspect `peerDependencies` (irrelevant for a leaf project) or the\n* lockfile (transitive presence is brittle to detect and not the\n* realistic clobber-risk path).\n*\n* Exported for unit tests.\n*/\nfunction hasDirectDep(parsed, name) {\n\tfor (const field of [\"dependencies\", \"devDependencies\"]) {\n\t\tconst value = parsed[field];\n\t\tif (value !== null && typeof value === \"object\" && name in value) return true;\n\t}\n\treturn false;\n}\nfunction readChildStderr(err) {\n\tif (err instanceof Error && \"stderr\" in err) return String(err.stderr ?? \"\");\n\treturn \"\";\n}\n/**\n* Drives `prisma-next contract emit` against the freshly scaffolded\n* project. On failure, throws `errorInitEmitFailed` with the underlying\n* cause embedded in `meta.cause` so the user can re-run with `-v` to see\n* the full envelope and follow the fix steps. Maps to exit code\n* `5 = EMIT_FAILED` (FR1.6).\n*/\nasync function runEmit(ctx) {\n\tconst spinner = ctx.ui.spinner();\n\tspinner.start(\"Emitting contract...\");\n\ttry {\n\t\tconst { executeContractEmit } = await import(\"./contract-emit-BkEj3siG.mjs\");\n\t\tconst { loadConfigForSections } = await import(\"@internal/config-loader\");\n\t\tconst configFilePath = join(ctx.baseDir, \"prisma-next.config.ts\");\n\t\tconst configResult = await loadConfigForSections(configFilePath, [\n\t\t\t\"contract\",\n\t\t\t\"family\",\n\t\t\t\"target\",\n\t\t\t\"adapter\",\n\t\t\t\"extensions\"\n\t\t]);\n\t\tif (!configResult.ok) throw configResult.failure;\n\t\tawait executeContractEmit({\n\t\t\tconfig: configResult.value,\n\t\t\tcwd: process.cwd(),\n\t\t\tconfigPath: configFilePath\n\t\t});\n\t\tspinner.stop(\"Contract emitted\");\n\t} catch (err) {\n\t\tspinner.stop(\"Contract emission failed\");\n\t\tthrow errorInitEmitFailed({\n\t\t\temitCommand: ctx.emitCommand,\n\t\t\tfilesWritten: ctx.filesWritten,\n\t\t\tcause: causeMessage(err)\n\t\t});\n\t}\n}\nfunction causeMessage(err) {\n\tif (err instanceof Error) return err.message;\n\treturn String(err);\n}\n/**\n* Minimal `package.json` content used when init runs in a directory\n* that has no project manifest (TML-2496). Mirrors the npm 11 `init -y`\n* defaults, with two deliberate deviations:\n*\n* - `\"private\": true` so a stray `npm publish` cannot leak the\n* placeholder. Users who want to publish have to opt in by removing\n* the field.\n* - `\"type\": \"module\"` so the scaffolded ESM imports in\n* `prisma-next.config.ts` and `db.ts` typecheck and run without\n* additional tsconfig coercion.\n*\n* Exported for unit tests so the canonical shape is asserted in one\n* place rather than re-derived at every call site.\n*/\nfunction defaultPackageJsonContent(rawName) {\n\treturn `${JSON.stringify({\n\t\tname: sanitisePackageName(rawName),\n\t\tversion: \"0.0.0\",\n\t\tprivate: true,\n\t\ttype: \"module\"\n\t}, null, 2)}\\n`;\n}\n/**\n* npm package names are restricted to lowercase, no leading dot/underscore,\n* and a small URL-safe character set. `basename(cwd)` happily returns\n* \"My Project\" or \".hidden\" — both rejected by `npm install` validation.\n* Coerce to a safe fallback rather than emit a manifest npm refuses to\n* read.\n*/\nfunction sanitisePackageName(raw) {\n\tconst trimmed = raw.toLowerCase().replace(/[^a-z0-9._~-]/g, \"-\").replace(/^[._-]+/, \"\").replace(/-+/g, \"-\");\n\treturn trimmed.length > 0 ? trimmed : \"my-app\";\n}\n//#endregion\nexport { runInit };\n\n//# sourceMappingURL=init-B86mXFNC.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,eAAe,kBAAkB,KAAK;CACrC,MAAM,EAAE,SAAS,SAAS,OAAO,cAAc;CAC/C,MAA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AM,iBAAiB,KAAK,IAAI,SAAS,uBAAuB;EAChE,MAAM,eAAe,MAAM,sBAAsB,gBAAgB;GAChE;GACA;GACA;GACA;GACA;EACD,CAAC;EACD,IAAI,CAAC,aAAa,IAAI,MAAM,aAAa;EACzC,MAAM,oBAAoB;GACzB,QAAQ,aAAa;GACrB,KAAK,QAAQ,IAAI;GACjB,YAAY;EACb,CAAC;EACD,QAAQ,KAAK,kBAAkB;CAChC,SAAS,KAAK;EACb,QAAQ,KAAK,0BAA0B;EACvC,MAAM,oBAAoB;GACzB,aAAa,IAAI;GACjB,cAAc,IAAI;GAClB,OAAO,aAAa,GAAG;EACxB,CAAC;CACF;AACD;AACA,SAAS,aAAa,KAAK;CAC1B,IAAI,eAAe,OAAO,OAAO,IAAI;CACrC,OAAO,OAAO,GAAG;AAClB;;;;;;;;;;;;;;;;AAgBA,SAAS,0BAA0B,SAAS;CAC3C,OAAO,GAAG,KAAK,UAAU;EACxB,MAAM,oBAAoB,OAAO;EACjC,SAAS;EACT,SAAS;EACT,MAAM;CACP,GAAG,MAAM,CAAC,EAAE;AACb;;;;;;;;AAQA,SAAS,oBAAoB,KAAK;CACjC,MAAM,UAAU,IAAI,YAAY,CAAC,CAAC,QAAQ,kBAAkB,GAAG,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,QAAQ,OAAO,GAAG;CAC1G,OAAO,QAAQ,SAAS,IAAI,UAAU;AACvC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { o as loadConfigForSections } from "./exports-BZLNbtkY.mjs";
|
|
2
|
-
import { F as errorUnexpected, f as errorDriverRequired, t as CliStructuredError$1, u as errorDatabaseConnectionRequired } from "./cli-errors-B4zTLaqQ-CXgjO9t4.mjs";
|
|
3
|
-
import { f as maskConnectionUrl, n as closeQuietly, s as formatStyledHeader, v as sanitizeErrorMessage } from "./command-helpers-BCgwcqTe-lNCtppzM.mjs";
|
|
4
|
-
import { t as createProgressAdapter } from "./progress-adapter-CjAeTxY_-BXYSd1eY.mjs";
|
|
5
|
-
import { t as createControlClient } from "./client-C6Qp5ujC-Dxb7r79B.mjs";
|
|
6
|
-
import { relative, resolve } from "pathe";
|
|
7
|
-
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
8
|
-
//#region ../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BPHXdvqW.mjs
|
|
9
|
-
async function inspectLiveSchema(options, flags, ui, startTime, context) {
|
|
10
|
-
const configResult = await loadConfigForSections(options.config, [
|
|
11
|
-
"family",
|
|
12
|
-
"target",
|
|
13
|
-
"adapter",
|
|
14
|
-
"driver",
|
|
15
|
-
"extensions",
|
|
16
|
-
"db"
|
|
17
|
-
]);
|
|
18
|
-
if (!configResult.ok) return configResult;
|
|
19
|
-
const config = configResult.value;
|
|
20
|
-
const configPath = options.config ? relative(process.cwd(), resolve(options.config)) : "prisma-next.config.ts";
|
|
21
|
-
if (!flags.json && !flags.quiet) {
|
|
22
|
-
const details = [{
|
|
23
|
-
label: "config",
|
|
24
|
-
value: configPath
|
|
25
|
-
}];
|
|
26
|
-
if (options.db) details.push({
|
|
27
|
-
label: "database",
|
|
28
|
-
value: maskConnectionUrl(options.db)
|
|
29
|
-
});
|
|
30
|
-
else if (config.db?.connection && typeof config.db.connection === "string") details.push({
|
|
31
|
-
label: "database",
|
|
32
|
-
value: maskConnectionUrl(config.db.connection)
|
|
33
|
-
});
|
|
34
|
-
ui.stderr(formatStyledHeader({
|
|
35
|
-
command: context.commandName,
|
|
36
|
-
description: context.description,
|
|
37
|
-
url: context.url,
|
|
38
|
-
details,
|
|
39
|
-
flags
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
const dbConnection = options.db ?? config.db?.connection;
|
|
43
|
-
if (!dbConnection) return notOk(errorDatabaseConnectionRequired({
|
|
44
|
-
why: `Database connection is required for ${context.commandName} (set db.connection in ${configPath}, or pass --db <url>)`,
|
|
45
|
-
commandName: context.commandName
|
|
46
|
-
}));
|
|
47
|
-
if (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${context.commandName}` }));
|
|
48
|
-
const client = createControlClient({
|
|
49
|
-
family: config.family,
|
|
50
|
-
target: config.target,
|
|
51
|
-
adapter: config.adapter,
|
|
52
|
-
driver: config.driver,
|
|
53
|
-
extensions: config.extensions ?? []
|
|
54
|
-
});
|
|
55
|
-
const onProgress = createProgressAdapter({
|
|
56
|
-
ui,
|
|
57
|
-
flags
|
|
58
|
-
});
|
|
59
|
-
try {
|
|
60
|
-
const schema = await client.introspect({
|
|
61
|
-
connection: dbConnection,
|
|
62
|
-
onProgress
|
|
63
|
-
});
|
|
64
|
-
const schemaView = client.toSchemaView(schema);
|
|
65
|
-
const pslContractAst = client.inferPslContract(schema);
|
|
66
|
-
const pslBlockDescriptors = client.getPslBlockDescriptors();
|
|
67
|
-
const dbUrl = typeof dbConnection === "string" ? maskConnectionUrl(dbConnection) : void 0;
|
|
68
|
-
return ok({
|
|
69
|
-
config,
|
|
70
|
-
schema,
|
|
71
|
-
schemaView,
|
|
72
|
-
pslContractAst,
|
|
73
|
-
pslBlockDescriptors,
|
|
74
|
-
target: {
|
|
75
|
-
familyId: config.family.familyId,
|
|
76
|
-
id: config.target.targetId
|
|
77
|
-
},
|
|
78
|
-
meta: {
|
|
79
|
-
configPath,
|
|
80
|
-
...dbUrl ? { dbUrl } : {}
|
|
81
|
-
},
|
|
82
|
-
timings: { total: Date.now() - startTime }
|
|
83
|
-
});
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (CliStructuredError$1.is(error)) return notOk(error);
|
|
86
|
-
const safeMessage = sanitizeErrorMessage(error instanceof Error ? error.message : String(error), typeof dbConnection === "string" ? dbConnection : void 0);
|
|
87
|
-
return notOk(errorUnexpected(safeMessage, { why: `Unexpected error during ${context.commandName}: ${safeMessage}` }));
|
|
88
|
-
} finally {
|
|
89
|
-
await closeQuietly(client);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
export { inspectLiveSchema as t };
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=inspect-live-schema-BPHXdvqW-DrzL2ZkQ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspect-live-schema-BPHXdvqW-DrzL2ZkQ.mjs","names":["CliStructuredError"],"sources":["../../../../1-framework/3-tooling/cli/dist/inspect-live-schema-BPHXdvqW.mjs"],"sourcesContent":["import { P as errorUnexpected, d as errorDriverRequired, l as errorDatabaseConnectionRequired, t as CliStructuredError } from \"./cli-errors-B4zTLaqQ.mjs\";\nimport { S as formatStyledHeader, a as maskConnectionUrl, l as sanitizeErrorMessage, n as closeQuietly } from \"./command-helpers-BCgwcqTe.mjs\";\nimport { t as createProgressAdapter } from \"./progress-adapter-CjAeTxY_.mjs\";\nimport { t as createControlClient } from \"./client-C6Qp5ujC.mjs\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { relative, resolve } from \"pathe\";\n//#region src/commands/inspect-live-schema.ts\nasync function inspectLiveSchema(options, flags, ui, startTime, context) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst configPath = options.config ? relative(process.cwd(), resolve(options.config)) : \"prisma-next.config.ts\";\n\tif (!flags.json && !flags.quiet) {\n\t\tconst details = [{\n\t\t\tlabel: \"config\",\n\t\t\tvalue: configPath\n\t\t}];\n\t\tif (options.db) details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(options.db)\n\t\t});\n\t\telse if (config.db?.connection && typeof config.db.connection === \"string\") details.push({\n\t\t\tlabel: \"database\",\n\t\t\tvalue: maskConnectionUrl(config.db.connection)\n\t\t});\n\t\tui.stderr(formatStyledHeader({\n\t\t\tcommand: context.commandName,\n\t\t\tdescription: context.description,\n\t\t\turl: context.url,\n\t\t\tdetails,\n\t\t\tflags\n\t\t}));\n\t}\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tif (!dbConnection) return notOk(errorDatabaseConnectionRequired({\n\t\twhy: `Database connection is required for ${context.commandName} (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: context.commandName\n\t}));\n\tif (!config.driver) return notOk(errorDriverRequired({ why: `Config.driver is required for ${context.commandName}` }));\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\tdriver: config.driver,\n\t\textensions: config.extensions ?? []\n\t});\n\tconst onProgress = createProgressAdapter({\n\t\tui,\n\t\tflags\n\t});\n\ttry {\n\t\tconst schema = await client.introspect({\n\t\t\tconnection: dbConnection,\n\t\t\tonProgress\n\t\t});\n\t\tconst schemaView = client.toSchemaView(schema);\n\t\tconst pslContractAst = client.inferPslContract(schema);\n\t\tconst pslBlockDescriptors = client.getPslBlockDescriptors();\n\t\tconst dbUrl = typeof dbConnection === \"string\" ? maskConnectionUrl(dbConnection) : void 0;\n\t\treturn ok({\n\t\t\tconfig,\n\t\t\tschema,\n\t\t\tschemaView,\n\t\t\tpslContractAst,\n\t\t\tpslBlockDescriptors,\n\t\t\ttarget: {\n\t\t\t\tfamilyId: config.family.familyId,\n\t\t\t\tid: config.target.targetId\n\t\t\t},\n\t\t\tmeta: {\n\t\t\t\tconfigPath,\n\t\t\t\t...dbUrl ? { dbUrl } : {}\n\t\t\t},\n\t\t\ttimings: { total: Date.now() - startTime }\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tconst safeMessage = sanitizeErrorMessage(error instanceof Error ? error.message : String(error), typeof dbConnection === \"string\" ? dbConnection : void 0);\n\t\treturn notOk(errorUnexpected(safeMessage, { why: `Unexpected error during ${context.commandName}: ${safeMessage}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\n//#endregion\nexport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CACD,MAAM,aAAa,sBAAsB;EACxC;EACA;CACD,CAAC;CACD,IAAI;EACH,MAAM,SAAS,MAAM,OAAO,WAAW;GACtC,YAAY;GACZ;EACD,CAAC;EACD,MAAM,aAAa,OAAO,aAAa,MAAM;EAC7C,MAAM,iBAAiB,OAAO,iBAAiB,MAAM;EACrD,MAAM,sBAAsB,OAAO,uBAAuB;EAC1D,MAAM,QAAQ,OAAO,iBAAiB,WAAW,kBAAkB,YAAY,IAAI,KAAK;EACxF,OAAO,GAAG;GACT;GACA;GACA;GACA;GACA;GACA,QAAQ;IACP,UAAU,OAAO,OAAO;IACxB,IAAI,OAAO,OAAO;GACnB;GACA,MAAM;IACL;IACA,GAAG,QAAQ,EAAE,MAAM,IAAI,CAAC;GACzB;GACA,SAAS,EAAE,OAAO,KAAK,IAAI,IAAI,UAAU;EAC1C,CAAC;CACF,SAAS,OAAO;EACf,IAAIA,qBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,MAAM,cAAc,qBAAqB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,OAAO,iBAAiB,WAAW,eAAe,KAAK,CAAC;EACzJ,OAAO,MAAM,gBAAgB,aAAa,EAAE,KAAK,2BAA2B,QAAQ,YAAY,IAAI,cAAc,CAAC,CAAC;CACrH,UAAU;EACT,MAAM,aAAa,MAAM;CAC1B;AACD"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { R as runCommandAction, r as chooseAction } from "./cli-errors-B4zTLaqQ-CXgjO9t4.mjs";
|
|
2
|
-
import { join, relative } from "pathe";
|
|
3
|
-
//#region ../../../1-framework/3-tooling/cli/dist/integrity-violation-to-check-failure-BmWMLAae.mjs
|
|
4
|
-
function migrationPathRelative(dirPath) {
|
|
5
|
-
return relative(process.cwd(), dirPath);
|
|
6
|
-
}
|
|
7
|
-
function migrationFileRelative(dirPath, fileName) {
|
|
8
|
-
return join(migrationPathRelative(dirPath), fileName);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Map one {@link IntegrityViolation} onto a `migration check` failure row.
|
|
12
|
-
* Sole catalogue mapping from integrity violations to `MIGRATION.CHECK_*` codes.
|
|
13
|
-
*/
|
|
14
|
-
function integrityViolationToCheckFailure(violation, migrationsDir) {
|
|
15
|
-
const spaceRelative = (spaceId) => migrationPathRelative(join(migrationsDir, spaceId));
|
|
16
|
-
const packageRelative = (spaceId, dirName) => migrationPathRelative(join(migrationsDir, spaceId, dirName));
|
|
17
|
-
const refRelative = (spaceId, refName) => migrationPathRelative(join(migrationsDir, spaceId, "refs", `${refName}.json`));
|
|
18
|
-
switch (violation.kind) {
|
|
19
|
-
case "hashMismatch": return {
|
|
20
|
-
space: violation.spaceId,
|
|
21
|
-
code: "MIGRATION.CHECK_HASH_MISMATCH",
|
|
22
|
-
where: migrationFileRelative(join(migrationsDir, violation.spaceId, violation.dirName), "migration.json"),
|
|
23
|
-
why: `Stored hash ${violation.stored} does not match recomputed hash ${violation.computed}`,
|
|
24
|
-
nextActions: [chooseAction("Re-emit the migration package, or restore it from version control")]
|
|
25
|
-
};
|
|
26
|
-
case "providedInvariantsMismatch": return {
|
|
27
|
-
space: violation.spaceId,
|
|
28
|
-
code: "MIGRATION.CHECK_PROVIDED_INVARIANTS_MISMATCH",
|
|
29
|
-
where: packageRelative(violation.spaceId, violation.dirName),
|
|
30
|
-
why: `Migration "${violation.dirName}" providedInvariants in migration.json disagrees with ops.json.`,
|
|
31
|
-
nextActions: [chooseAction("Re-emit the migration package so migration.json and ops.json agree")]
|
|
32
|
-
};
|
|
33
|
-
case "packageUnloadable": return {
|
|
34
|
-
space: violation.spaceId,
|
|
35
|
-
code: "MIGRATION.CHECK_PACKAGE_UNLOADABLE",
|
|
36
|
-
where: packageRelative(violation.spaceId, violation.dirName),
|
|
37
|
-
why: `Migration "${violation.dirName}" could not be loaded: ${violation.detail}`,
|
|
38
|
-
nextActions: [chooseAction("Re-emit the migration package, or restore it from version control")]
|
|
39
|
-
};
|
|
40
|
-
case "sameSourceAndTarget": return {
|
|
41
|
-
space: violation.spaceId,
|
|
42
|
-
code: "MIGRATION.CHECK_NOOP_SELF_EDGE",
|
|
43
|
-
where: packageRelative(violation.spaceId, violation.dirName),
|
|
44
|
-
why: `Migration "${violation.dirName}" in space "${violation.spaceId}" has source equal to target (${violation.hash}) with no data invariant — a true no-op self-edge.`,
|
|
45
|
-
nextActions: [chooseAction("Add a data operation if this self-edge was meant to carry a data invariant"), chooseAction("Or delete the migration if it is a true no-op")]
|
|
46
|
-
};
|
|
47
|
-
case "orphanSpaceDir": return {
|
|
48
|
-
space: violation.spaceId,
|
|
49
|
-
code: "MIGRATION.CHECK_ORPHAN_SPACE_DIR",
|
|
50
|
-
where: spaceRelative(violation.spaceId),
|
|
51
|
-
why: `Contract-space directory "${violation.spaceId}" exists on disk but no extension declares it.`,
|
|
52
|
-
nextActions: [chooseAction("Remove the orphan directory"), chooseAction("Or declare the extension in `extensions`")]
|
|
53
|
-
};
|
|
54
|
-
case "declaredButUnmigrated": return {
|
|
55
|
-
space: violation.spaceId,
|
|
56
|
-
code: "MIGRATION.CHECK_DECLARED_BUT_UNMIGRATED",
|
|
57
|
-
where: spaceRelative(violation.spaceId),
|
|
58
|
-
why: `Extension "${violation.spaceId}" is declared in \`extensions\` but has no on-disk migrations directory.`,
|
|
59
|
-
nextActions: [runCommandAction("Re-emit the extension contract-space artefacts, then plan its migrations", "prisma-next contract emit"), chooseAction("Or remove the extension from `extensions` if it is unused")]
|
|
60
|
-
};
|
|
61
|
-
case "headRefMissing": return {
|
|
62
|
-
space: violation.spaceId,
|
|
63
|
-
code: "MIGRATION.CHECK_HEAD_REF_MISSING",
|
|
64
|
-
where: refRelative(violation.spaceId, "head"),
|
|
65
|
-
why: `Head ref \`refs/head.json\` is missing for contract space "${violation.spaceId}".`,
|
|
66
|
-
nextActions: [chooseAction("Re-emit the contract-space migrations and head ref artefacts"), chooseAction("Or restore `refs/head.json` from version control")]
|
|
67
|
-
};
|
|
68
|
-
case "headRefNotInGraph": return {
|
|
69
|
-
space: violation.spaceId,
|
|
70
|
-
code: "MIGRATION.CHECK_HEAD_REF_NOT_IN_GRAPH",
|
|
71
|
-
where: refRelative(violation.spaceId, "head"),
|
|
72
|
-
why: `Head ref ${violation.hash} for contract space "${violation.spaceId}" is not present in its migration graph.`,
|
|
73
|
-
nextActions: [chooseAction("Re-emit the contract-space migrations"), chooseAction("Or restore the missing migration package")]
|
|
74
|
-
};
|
|
75
|
-
case "refUnreadable": return {
|
|
76
|
-
space: violation.spaceId,
|
|
77
|
-
code: "MIGRATION.CHECK_REF_UNREADABLE",
|
|
78
|
-
where: refRelative(violation.spaceId, violation.refName),
|
|
79
|
-
why: `Ref "${violation.refName}" for contract space "${violation.spaceId}" is unreadable: ${violation.detail}`,
|
|
80
|
-
nextActions: [chooseAction("Repair or remove the corrupt ref file")]
|
|
81
|
-
};
|
|
82
|
-
case "targetMismatch": return {
|
|
83
|
-
space: violation.spaceId,
|
|
84
|
-
code: "MIGRATION.CHECK_TARGET_MISMATCH",
|
|
85
|
-
where: spaceRelative(violation.spaceId),
|
|
86
|
-
why: `Contract space "${violation.spaceId}" targets "${violation.actual}" but the project targets "${violation.expected}".`,
|
|
87
|
-
nextActions: [chooseAction("Update the extension to target the configured database"), chooseAction("Or change the project target")]
|
|
88
|
-
};
|
|
89
|
-
case "disjointness": return {
|
|
90
|
-
space: "app",
|
|
91
|
-
code: "MIGRATION.CHECK_SPACE_DISJOINTNESS_VIOLATION",
|
|
92
|
-
where: migrationPathRelative(migrationsDir),
|
|
93
|
-
why: `Storage element "${violation.element}" is claimed by multiple contract spaces: ${violation.claimedBy.join(", ")}.`,
|
|
94
|
-
nextActions: [chooseAction("Update the contracts so each storage element is owned by exactly one contract space")]
|
|
95
|
-
};
|
|
96
|
-
case "contractUnreadable": return {
|
|
97
|
-
space: violation.spaceId,
|
|
98
|
-
code: "MIGRATION.CHECK_CONTRACT_UNREADABLE",
|
|
99
|
-
where: migrationFileRelative(join(migrationsDir, violation.spaceId), "contract.json"),
|
|
100
|
-
why: `Contract for space "${violation.spaceId}" is unreadable: ${violation.detail}`,
|
|
101
|
-
nextActions: [runCommandAction("Re-emit the extension contract artefacts", "prisma-next contract emit"), chooseAction("Or fix the descriptor producing the invalid contract")]
|
|
102
|
-
};
|
|
103
|
-
case "duplicateMigrationHash": return {
|
|
104
|
-
space: violation.spaceId,
|
|
105
|
-
code: "MIGRATION.CHECK_DUPLICATE_MIGRATION_HASH",
|
|
106
|
-
where: spaceRelative(violation.spaceId),
|
|
107
|
-
why: `Multiple migrations in space "${violation.spaceId}" share migrationHash "${violation.migrationHash}" (${violation.dirNames.join(", ")}).`,
|
|
108
|
-
nextActions: [chooseAction("Re-emit one of the conflicting packages so each migrationHash is unique")]
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
//#endregion
|
|
113
|
-
export { integrityViolationToCheckFailure as t };
|
|
114
|
-
|
|
115
|
-
//# sourceMappingURL=integrity-violation-to-check-failure-BmWMLAae-DqiC4_3p.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrity-violation-to-check-failure-BmWMLAae-DqiC4_3p.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/integrity-violation-to-check-failure-BmWMLAae.mjs"],"sourcesContent":["import { L as chooseAction, R as runCommandAction } from \"./cli-errors-B4zTLaqQ.mjs\";\nimport { join, relative } from \"pathe\";\n//#region src/utils/integrity-violation-to-check-failure.ts\nfunction migrationPathRelative(dirPath) {\n\treturn relative(process.cwd(), dirPath);\n}\nfunction migrationFileRelative(dirPath, fileName) {\n\treturn join(migrationPathRelative(dirPath), fileName);\n}\n/**\n* Map one {@link IntegrityViolation} onto a `migration check` failure row.\n* Sole catalogue mapping from integrity violations to `MIGRATION.CHECK_*` codes.\n*/\nfunction integrityViolationToCheckFailure(violation, migrationsDir) {\n\tconst spaceRelative = (spaceId) => migrationPathRelative(join(migrationsDir, spaceId));\n\tconst packageRelative = (spaceId, dirName) => migrationPathRelative(join(migrationsDir, spaceId, dirName));\n\tconst refRelative = (spaceId, refName) => migrationPathRelative(join(migrationsDir, spaceId, \"refs\", `${refName}.json`));\n\tswitch (violation.kind) {\n\t\tcase \"hashMismatch\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_HASH_MISMATCH\",\n\t\t\twhere: migrationFileRelative(join(migrationsDir, violation.spaceId, violation.dirName), \"migration.json\"),\n\t\t\twhy: `Stored hash ${violation.stored} does not match recomputed hash ${violation.computed}`,\n\t\t\tnextActions: [chooseAction(\"Re-emit the migration package, or restore it from version control\")]\n\t\t};\n\t\tcase \"providedInvariantsMismatch\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_PROVIDED_INVARIANTS_MISMATCH\",\n\t\t\twhere: packageRelative(violation.spaceId, violation.dirName),\n\t\t\twhy: `Migration \"${violation.dirName}\" providedInvariants in migration.json disagrees with ops.json.`,\n\t\t\tnextActions: [chooseAction(\"Re-emit the migration package so migration.json and ops.json agree\")]\n\t\t};\n\t\tcase \"packageUnloadable\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_PACKAGE_UNLOADABLE\",\n\t\t\twhere: packageRelative(violation.spaceId, violation.dirName),\n\t\t\twhy: `Migration \"${violation.dirName}\" could not be loaded: ${violation.detail}`,\n\t\t\tnextActions: [chooseAction(\"Re-emit the migration package, or restore it from version control\")]\n\t\t};\n\t\tcase \"sameSourceAndTarget\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_NOOP_SELF_EDGE\",\n\t\t\twhere: packageRelative(violation.spaceId, violation.dirName),\n\t\t\twhy: `Migration \"${violation.dirName}\" in space \"${violation.spaceId}\" has source equal to target (${violation.hash}) with no data invariant — a true no-op self-edge.`,\n\t\t\tnextActions: [chooseAction(\"Add a data operation if this self-edge was meant to carry a data invariant\"), chooseAction(\"Or delete the migration if it is a true no-op\")]\n\t\t};\n\t\tcase \"orphanSpaceDir\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_ORPHAN_SPACE_DIR\",\n\t\t\twhere: spaceRelative(violation.spaceId),\n\t\t\twhy: `Contract-space directory \"${violation.spaceId}\" exists on disk but no extension declares it.`,\n\t\t\tnextActions: [chooseAction(\"Remove the orphan directory\"), chooseAction(\"Or declare the extension in `extensions`\")]\n\t\t};\n\t\tcase \"declaredButUnmigrated\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_DECLARED_BUT_UNMIGRATED\",\n\t\t\twhere: spaceRelative(violation.spaceId),\n\t\t\twhy: `Extension \"${violation.spaceId}\" is declared in \\`extensions\\` but has no on-disk migrations directory.`,\n\t\t\tnextActions: [runCommandAction(\"Re-emit the extension contract-space artefacts, then plan its migrations\", \"prisma-next contract emit\"), chooseAction(\"Or remove the extension from `extensions` if it is unused\")]\n\t\t};\n\t\tcase \"headRefMissing\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_HEAD_REF_MISSING\",\n\t\t\twhere: refRelative(violation.spaceId, \"head\"),\n\t\t\twhy: `Head ref \\`refs/head.json\\` is missing for contract space \"${violation.spaceId}\".`,\n\t\t\tnextActions: [chooseAction(\"Re-emit the contract-space migrations and head ref artefacts\"), chooseAction(\"Or restore `refs/head.json` from version control\")]\n\t\t};\n\t\tcase \"headRefNotInGraph\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_HEAD_REF_NOT_IN_GRAPH\",\n\t\t\twhere: refRelative(violation.spaceId, \"head\"),\n\t\t\twhy: `Head ref ${violation.hash} for contract space \"${violation.spaceId}\" is not present in its migration graph.`,\n\t\t\tnextActions: [chooseAction(\"Re-emit the contract-space migrations\"), chooseAction(\"Or restore the missing migration package\")]\n\t\t};\n\t\tcase \"refUnreadable\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_REF_UNREADABLE\",\n\t\t\twhere: refRelative(violation.spaceId, violation.refName),\n\t\t\twhy: `Ref \"${violation.refName}\" for contract space \"${violation.spaceId}\" is unreadable: ${violation.detail}`,\n\t\t\tnextActions: [chooseAction(\"Repair or remove the corrupt ref file\")]\n\t\t};\n\t\tcase \"targetMismatch\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_TARGET_MISMATCH\",\n\t\t\twhere: spaceRelative(violation.spaceId),\n\t\t\twhy: `Contract space \"${violation.spaceId}\" targets \"${violation.actual}\" but the project targets \"${violation.expected}\".`,\n\t\t\tnextActions: [chooseAction(\"Update the extension to target the configured database\"), chooseAction(\"Or change the project target\")]\n\t\t};\n\t\tcase \"disjointness\": return {\n\t\t\tspace: \"app\",\n\t\t\tcode: \"MIGRATION.CHECK_SPACE_DISJOINTNESS_VIOLATION\",\n\t\t\twhere: migrationPathRelative(migrationsDir),\n\t\t\twhy: `Storage element \"${violation.element}\" is claimed by multiple contract spaces: ${violation.claimedBy.join(\", \")}.`,\n\t\t\tnextActions: [chooseAction(\"Update the contracts so each storage element is owned by exactly one contract space\")]\n\t\t};\n\t\tcase \"contractUnreadable\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_CONTRACT_UNREADABLE\",\n\t\t\twhere: migrationFileRelative(join(migrationsDir, violation.spaceId), \"contract.json\"),\n\t\t\twhy: `Contract for space \"${violation.spaceId}\" is unreadable: ${violation.detail}`,\n\t\t\tnextActions: [runCommandAction(\"Re-emit the extension contract artefacts\", \"prisma-next contract emit\"), chooseAction(\"Or fix the descriptor producing the invalid contract\")]\n\t\t};\n\t\tcase \"duplicateMigrationHash\": return {\n\t\t\tspace: violation.spaceId,\n\t\t\tcode: \"MIGRATION.CHECK_DUPLICATE_MIGRATION_HASH\",\n\t\t\twhere: spaceRelative(violation.spaceId),\n\t\t\twhy: `Multiple migrations in space \"${violation.spaceId}\" share migrationHash \"${violation.migrationHash}\" (${violation.dirNames.join(\", \")}).`,\n\t\t\tnextActions: [chooseAction(\"Re-emit one of the conflicting packages so each migrationHash is unique\")]\n\t\t};\n\t}\n}\n//#endregion\nexport { integrityViolationToCheckFailure as t };\n\n//# sourceMappingURL=integrity-violation-to-check-failure-BmWMLAae.mjs.map"],"mappings":";;;AAGA,SAAS,sBAAsB,SAAS;CACvC,OAAO,SAAS,QAAQ,IAAI,GAAG,OAAO;AACvC;AACA,SAAS,sBAAsB,SAAS,UAAU;CACjD,OAAO,KAAK,sBAAsB,OAAO,GAAG,QAAQ;AACrD;;;;;AAKA,SAAS,iCAAiC,WAAW,eAAe;CACnE,MAAM,iBAAiB,YAAY,sBAAsB,KAAK,eAAe,OAAO,CAAC;CACrF,MAAM,mBAAmB,SAAS,YAAY,sBAAsB,KAAK,eAAe,SAAS,OAAO,CAAC;CACzG,MAAM,eAAe,SAAS,YAAY,sBAAsB,KAAK,eAAe,SAAS,QAAQ,GAAG,QAAQ,MAAM,CAAC;CACvH,QAAQ,UAAU,MAAlB;EACC,KAAK,gBAAgB,OAAO;GAC3B,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,sBAAsB,KAAK,eAAe,UAAU,SAAS,UAAU,OAAO,GAAG,gBAAgB;GACxG,KAAK,eAAe,UAAU,OAAO,kCAAkC,UAAU;GACjF,aAAa,CAAC,aAAa,mEAAmE,CAAC;EAChG;EACA,KAAK,8BAA8B,OAAO;GACzC,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,gBAAgB,UAAU,SAAS,UAAU,OAAO;GAC3D,KAAK,cAAc,UAAU,QAAQ;GACrC,aAAa,CAAC,aAAa,oEAAoE,CAAC;EACjG;EACA,KAAK,qBAAqB,OAAO;GAChC,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,gBAAgB,UAAU,SAAS,UAAU,OAAO;GAC3D,KAAK,cAAc,UAAU,QAAQ,yBAAyB,UAAU;GACxE,aAAa,CA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,uCAAuC,CAAC;EACpE;EACA,KAAK,kBAAkB,OAAO;GAC7B,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,cAAc,UAAU,OAAO;GACtC,KAAK,mBAAmB,UAAU,QAAQ,aAAa,UAAU,OAAO,6BAA6B,UAAU,SAAS;GACxH,aAAa,CAAC,aAAa,wDAAwD,GAAG,aAAa,8BAA8B,CAAC;EACnI;EACA,KAAK,gBAAgB,OAAO;GAC3B,OAAO;GACP,MAAM;GACN,OAAO,sBAAsB,aAAa;GAC1C,KAAK,oBAAoB,UAAU,QAAQ,4CAA4C,UAAU,UAAU,KAAK,IAAI,EAAE;GACtH,aAAa,CAAC,aAAa,qFAAqF,CAAC;EAClH;EACA,KAAK,sBAAsB,OAAO;GACjC,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,sBAAsB,KAAK,eAAe,UAAU,OAAO,GAAG,eAAe;GACpF,KAAK,uBAAuB,UAAU,QAAQ,mBAAmB,UAAU;GAC3E,aAAa,CAAC,iBAAiB,4CAA4C,2BAA2B,GAAG,aAAa,sDAAsD,CAAC;EAC9K;EACA,KAAK,0BAA0B,OAAO;GACrC,OAAO,UAAU;GACjB,MAAM;GACN,OAAO,cAAc,UAAU,OAAO;GACtC,KAAK,iCAAiC,UAAU,QAAQ,yBAAyB,UAAU,cAAc,KAAK,UAAU,SAAS,KAAK,IAAI,EAAE;GAC5I,aAAa,CAAC,aAAa,yEAAyE,CAAC;EACtG;CACD;AACD"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { v as errorMarkerMismatch } from "./cli-errors-B4zTLaqQ-CXgjO9t4.mjs";
|
|
2
|
-
import { O as errorNoInvariantPath, P as errorUnknownInvariant } from "./errors-CXbGUWGu-BQi6YS-H.mjs";
|
|
3
|
-
import { a as findPath, o as findPathWithDecision, r as findLatestMigration } from "./migration-graph-_SJImD5V-D5RCc651.mjs";
|
|
4
|
-
import { C as toStructuralEdge, r as collectDeclaredInvariants } from "./command-helpers-BCgwcqTe-lNCtppzM.mjs";
|
|
5
|
-
import { n as isGraphNode } from "./graph-membership-BViWUMpP-Cgu4Z2ox.mjs";
|
|
6
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
7
|
-
//#region ../../../1-framework/3-tooling/cli/dist/invariants-Bltd8DyA.mjs
|
|
8
|
-
/** True when the on-disk graph contains a path fromHash → toHash. */
|
|
9
|
-
function hasMigrationPath(graph, fromHash, toHash) {
|
|
10
|
-
return findPath(graph, fromHash, toHash) !== null;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Refusal for a live marker hash that is not a node of the on-disk app graph.
|
|
14
|
-
* Same errorMarkerMismatch envelope migrate raises today, or null when the marker is a node.
|
|
15
|
-
*/
|
|
16
|
-
function refuseMarkerOutsideGraph(args) {
|
|
17
|
-
if (isGraphNode(args.markerHash, args.graph)) return null;
|
|
18
|
-
return errorMarkerMismatch(args.markerHash, [...args.graph.nodes].sort(), findLatestMigration(args.graph)?.to ?? null);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Invariant refusals shared by migrate and migration status: unknown ref invariants and unsatisfiable invariant paths.
|
|
22
|
-
*/
|
|
23
|
-
/** Refuses ref invariants neither declared on any graph edge nor present on the live marker. */
|
|
24
|
-
function refuseUnknownInvariants(args) {
|
|
25
|
-
const declared = collectDeclaredInvariants(args.graph);
|
|
26
|
-
const known = new Set(declared);
|
|
27
|
-
for (const id of args.markerInvariants) known.add(id);
|
|
28
|
-
const unknown = args.refInvariants.filter((id) => !known.has(id));
|
|
29
|
-
if (unknown.length === 0) return null;
|
|
30
|
-
return errorUnknownInvariant({
|
|
31
|
-
...ifDefined("refName", args.refName),
|
|
32
|
-
unknown,
|
|
33
|
-
declared: [...declared].sort()
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/** Refuses a --to target whose missing invariants no path from originHash satisfies. */
|
|
37
|
-
function refuseMissingInvariantPath(args) {
|
|
38
|
-
const outcome = findPathWithDecision(args.graph, args.originHash, args.targetHash, {
|
|
39
|
-
...ifDefined("refName", args.refName),
|
|
40
|
-
required: new Set(args.missing)
|
|
41
|
-
});
|
|
42
|
-
if (outcome.kind !== "unsatisfiable") return null;
|
|
43
|
-
return errorNoInvariantPath({
|
|
44
|
-
...ifDefined("refName", args.refName),
|
|
45
|
-
required: [...args.missing].sort(),
|
|
46
|
-
missing: outcome.missing,
|
|
47
|
-
structuralPath: outcome.structuralPath.map(toStructuralEdge)
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
export { refuseUnknownInvariants as i, refuseMarkerOutsideGraph as n, refuseMissingInvariantPath as r, hasMigrationPath as t };
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=invariants-Bltd8DyA-Cg_1Lu0q.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invariants-Bltd8DyA-Cg_1Lu0q.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/invariants-Bltd8DyA.mjs"],"sourcesContent":["import { _ as errorMarkerMismatch } from \"./cli-errors-B4zTLaqQ.mjs\";\nimport { m as toStructuralEdge, r as collectDeclaredInvariants } from \"./command-helpers-BCgwcqTe.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { errorNoInvariantPath, errorUnknownInvariant } from \"@internal/migration-tools/errors\";\nimport { findLatestMigration, findPath, findPathWithDecision, isGraphNode } from \"@internal/migration-tools/migration-graph\";\n//#region src/control-api/operations/graph-queries.ts\n/** True when the on-disk graph contains a path fromHash → toHash. */\nfunction hasMigrationPath(graph, fromHash, toHash) {\n\treturn findPath(graph, fromHash, toHash) !== null;\n}\n/**\n* Refusal for a live marker hash that is not a node of the on-disk app graph.\n* Same errorMarkerMismatch envelope migrate raises today, or null when the marker is a node.\n*/\nfunction refuseMarkerOutsideGraph(args) {\n\tif (isGraphNode(args.markerHash, args.graph)) return null;\n\treturn errorMarkerMismatch(args.markerHash, [...args.graph.nodes].sort(), findLatestMigration(args.graph)?.to ?? null);\n}\n//#endregion\n//#region src/control-api/operations/invariants.ts\n/**\n* Invariant refusals shared by migrate and migration status: unknown ref invariants and unsatisfiable invariant paths.\n*/\n/** Refuses ref invariants neither declared on any graph edge nor present on the live marker. */\nfunction refuseUnknownInvariants(args) {\n\tconst declared = collectDeclaredInvariants(args.graph);\n\tconst known = new Set(declared);\n\tfor (const id of args.markerInvariants) known.add(id);\n\tconst unknown = args.refInvariants.filter((id) => !known.has(id));\n\tif (unknown.length === 0) return null;\n\treturn errorUnknownInvariant({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\tunknown,\n\t\tdeclared: [...declared].sort()\n\t});\n}\n/** Refuses a --to target whose missing invariants no path from originHash satisfies. */\nfunction refuseMissingInvariantPath(args) {\n\tconst outcome = findPathWithDecision(args.graph, args.originHash, args.targetHash, {\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: new Set(args.missing)\n\t});\n\tif (outcome.kind !== \"unsatisfiable\") return null;\n\treturn errorNoInvariantPath({\n\t\t...ifDefined(\"refName\", args.refName),\n\t\trequired: [...args.missing].sort(),\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(toStructuralEdge)\n\t});\n}\n//#endregion\nexport { refuseMarkerOutsideGraph as i, refuseUnknownInvariants as n, hasMigrationPath as r, refuseMissingInvariantPath as t };\n\n//# sourceMappingURL=invariants-Bltd8DyA.mjs.map"],"mappings":";;;;;;;;AAOA,SAAS,iBAAiB,OAAO,UAAU,QAAQ;CAClD,OAAO,SAAS,OAAO,UAAU,MAAM,MAAM;AAC9C;;;;;AAKA,SAAS,yBAAyB,MAAM;CACvC,IAAI,YAAY,KAAK,YAAY,KAAK,KAAK,GAAG,OAAO;CACrD,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC,KAAK,GAAG,oBAAoB,KAAK,KAAK,CAAC,EAAE,MAAM,IAAI;AACtH;;;;;AAOA,SAAS,wBAAwB,MAAM;CACtC,MAAM,WAAW,0BAA0B,KAAK,KAAK;CACrD,MAAM,QAAQ,IAAI,IAAI,QAAQ;CAC9B,KAAK,MAAM,MAAM,KAAK,kBAAkB,MAAM,IAAI,EAAE;CACpD,MAAM,UAAU,KAAK,cAAc,QAAQ,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;CAChE,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO,sBAAsB;EAC5B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC;EACA,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,KAAK;CAC9B,CAAC;AACF;;AAEA,SAAS,2BAA2B,MAAM;CACzC,MAAM,UAAU,qBAAqB,KAAK,OAAO,KAAK,YAAY,KAAK,YAAY;EAClF,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,IAAI,IAAI,KAAK,OAAO;CAC/B,CAAC;CACD,IAAI,QAAQ,SAAS,iBAAiB,OAAO;CAC7C,OAAO,qBAAqB;EAC3B,GAAG,UAAU,WAAW,KAAK,OAAO;EACpC,UAAU,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,KAAK;EACjC,SAAS,QAAQ;EACjB,gBAAgB,QAAQ,eAAe,IAAI,gBAAgB;CAC5D,CAAC;AACF"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { _ as errorLegendHumanOnly } from "./cli-errors-B4zTLaqQ-CXgjO9t4.mjs";
|
|
2
|
-
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
3
|
-
//#region ../../../1-framework/3-tooling/cli/dist/legend-DGv9e2_0.mjs
|
|
4
|
-
/**
|
|
5
|
-
* The legend is decoration printed alongside the command header on stderr, so
|
|
6
|
-
* it is suppressed for the machine-readable / silent paths (`--json`, `--dot`,
|
|
7
|
-
* `--quiet`) exactly as the header is.
|
|
8
|
-
*/
|
|
9
|
-
function shouldShowLegend(options, flags) {
|
|
10
|
-
return options.legend === true && options.dot !== true && flags.json !== true && flags.quiet !== true;
|
|
11
|
-
}
|
|
12
|
-
function validateLegendOptions(options, flags) {
|
|
13
|
-
if (options.legend !== true) return ok(void 0);
|
|
14
|
-
if (flags.json === true) return notOk(errorLegendHumanOnly("--json"));
|
|
15
|
-
if (flags.quiet === true) return notOk(errorLegendHumanOnly("--quiet"));
|
|
16
|
-
if (options.dot === true) return notOk(errorLegendHumanOnly("--dot"));
|
|
17
|
-
return ok(void 0);
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { validateLegendOptions as n, shouldShowLegend as t };
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=legend-DGv9e2_0-BtetgRz4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legend-DGv9e2_0-BtetgRz4.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/legend-DGv9e2_0.mjs"],"sourcesContent":["import { g as errorLegendHumanOnly } from \"./cli-errors-B4zTLaqQ.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/utils/legend.ts\n/**\n* The legend is decoration printed alongside the command header on stderr, so\n* it is suppressed for the machine-readable / silent paths (`--json`, `--dot`,\n* `--quiet`) exactly as the header is.\n*/\nfunction shouldShowLegend(options, flags) {\n\treturn options.legend === true && options.dot !== true && flags.json !== true && flags.quiet !== true;\n}\nfunction validateLegendOptions(options, flags) {\n\tif (options.legend !== true) return ok(void 0);\n\tif (flags.json === true) return notOk(errorLegendHumanOnly(\"--json\"));\n\tif (flags.quiet === true) return notOk(errorLegendHumanOnly(\"--quiet\"));\n\tif (options.dot === true) return notOk(errorLegendHumanOnly(\"--dot\"));\n\treturn ok(void 0);\n}\n//#endregion\nexport { validateLegendOptions as n, shouldShowLegend as t };\n\n//# sourceMappingURL=legend-DGv9e2_0.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,iBAAiB,SAAS,OAAO;CACzC,OAAO,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,MAAM,SAAS,QAAQ,MAAM,UAAU;AAClG;AACA,SAAS,sBAAsB,SAAS,OAAO;CAC9C,IAAI,QAAQ,WAAW,MAAM,OAAO,GAAG,KAAK,CAAC;CAC7C,IAAI,MAAM,SAAS,MAAM,OAAO,MAAM,qBAAqB,QAAQ,CAAC;CACpE,IAAI,MAAM,UAAU,MAAM,OAAO,MAAM,qBAAqB,SAAS,CAAC;CACtE,IAAI,QAAQ,QAAQ,MAAM,OAAO,MAAM,qBAAqB,OAAO,CAAC;CACpE,OAAO,GAAG,KAAK,CAAC;AACjB"}
|