@prisma/orm-toolchain 8.0.0-rc.1-dev.45 → 8.0.0-rc.10
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 -7
- package/dist/{aggregate-BBsCbXgJ.mjs → aggregate-B4HKshLQ.mjs} +11 -11
- package/dist/aggregate-B4HKshLQ.mjs.map +1 -0
- package/dist/{aggregate-CA6bJ8UO.d.mts → aggregate-D_eX4zoo.d.mts} +5 -5
- package/dist/{aggregate-CA6bJ8UO.d.mts.map → aggregate-D_eX4zoo.d.mts.map} +1 -1
- package/dist/cli-telemetry.d.mts +27 -12
- package/dist/cli-telemetry.d.mts.map +1 -1
- package/dist/cli-telemetry.mjs +286 -9
- package/dist/cli-telemetry.mjs.map +1 -1
- package/dist/cli.d.mts +7 -13
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +4871 -567
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +314 -34
- 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 +10 -10
- 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-qGrwlGmt-Cf2NFzRL.mjs} +5 -5
- package/dist/{contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs.map → contract-snapshot-store-qGrwlGmt-Cf2NFzRL.mjs.map} +1 -1
- package/dist/{cli-errors-iquUoY6O-BFboxglv.d.mts → db-verify-Yih5kWtB-B1kv76ec.d.mts} +84 -84
- package/dist/db-verify-Yih5kWtB-B1kv76ec.d.mts.map +1 -0
- package/dist/{domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs → domain-type-generation-CR9ECUau-DOlKbcaE.mjs} +20 -6
- package/dist/domain-type-generation-CR9ECUau-DOlKbcaE.mjs.map +1 -0
- package/dist/{domain-type-generation-PkAb39ob-Ct8AGqow.d.mts → domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts} +14 -3
- package/dist/domain-type-generation-X6-AaL1U-DHEoRf_y.d.mts.map +1 -0
- package/dist/emitter.d.mts +2 -2
- package/dist/emitter.mjs +2 -2
- package/dist/emitter__domain-type-generation.d.mts +2 -2
- package/dist/emitter__domain-type-generation.mjs +2 -2
- 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/{errors-CXbGUWGu-BQi6YS-H.mjs → errors-SoLLYLtw-DMxVbVs9.mjs} +10 -10
- package/dist/errors-SoLLYLtw-DMxVbVs9.mjs.map +1 -0
- package/dist/{exports-BZLNbtkY.mjs → exports-BXXeNWlj.mjs} +42 -36
- package/dist/exports-BXXeNWlj.mjs.map +1 -0
- package/dist/exports-CE6OD63o-4Qpqr2W7.mjs +398 -0
- package/dist/exports-CE6OD63o-4Qpqr2W7.mjs.map +1 -0
- package/dist/{exports-B3xY_FHp.mjs → exports-CYa2di3d.mjs} +386 -26
- package/dist/exports-CYa2di3d.mjs.map +1 -0
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs → graph-membership-DY1Onbc3-CwBd6wuB.mjs} +3 -3
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs.map → graph-membership-DY1Onbc3-CwBd6wuB.mjs.map} +1 -1
- package/dist/{import-roots-B6CtsWXb.d.mts → import-roots-ARK1wjzc.d.mts} +4 -4
- package/dist/{import-roots-B6CtsWXb.d.mts.map → import-roots-ARK1wjzc.d.mts.map} +1 -1
- package/dist/{import-roots-NDOIEDVj.mjs → import-roots-BHOrDJbI.mjs} +13 -6
- package/dist/import-roots-BHOrDJbI.mjs.map +1 -0
- package/dist/{index-CnOyYxmv.d.mts → index-D217lbiW.d.mts} +8 -4
- package/dist/index-D217lbiW.d.mts.map +1 -0
- package/dist/{index-mCsi_ND5.d.mts → index-u5RdrumF.d.mts} +2 -11
- package/dist/index-u5RdrumF.d.mts.map +1 -0
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs → invariants-Cww4bv0v-BEiFxmbX.mjs} +3 -3
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs.map → invariants-Cww4bv0v-BEiFxmbX.mjs.map} +1 -1
- package/dist/{io-635GlNx1-D94PxRc-.mjs → io-BmWQNxRP-DQqbcPsS.mjs} +5 -5
- package/dist/{io-635GlNx1-D94PxRc-.mjs.map → io-BmWQNxRP-DQqbcPsS.mjs.map} +1 -1
- package/dist/{migration-gubSSeMk.mjs → migration-B9w-7dKe.mjs} +3 -3
- package/dist/{migration-gubSSeMk.mjs.map → migration-B9w-7dKe.mjs.map} +1 -1
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs → migration-graph-CW4bMmTz-B5xFtFVB.mjs} +3 -3
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs.map → migration-graph-CW4bMmTz-B5xFtFVB.mjs.map} +1 -1
- package/dist/migration-tools.d.mts +5 -5
- 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.d.mts +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-D83nTTpC-XlvN30yS.mjs} +5 -47
- package/dist/output-D83nTTpC-XlvN30yS.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 +21 -18
- package/dist/quick-reference-postgres.md +20 -17
- package/dist/readme-mongo.md +7 -7
- package/dist/readme-postgres.md +7 -7
- package/dist/ref-DcqFmceq-QaUjgZeM.mjs +4789 -0
- package/dist/ref-DcqFmceq-QaUjgZeM.mjs.map +1 -0
- package/dist/{ref-resolution-sGcINe7o.mjs → ref-resolution-BWpwb8_b.mjs} +9 -2
- package/dist/ref-resolution-BWpwb8_b.mjs.map +1 -0
- package/dist/{ref-resolution-COGOSL57.d.mts → ref-resolution-CaHQJXE0.d.mts} +11 -1
- package/dist/ref-resolution-CaHQJXE0.d.mts.map +1 -0
- package/dist/{refs-WK86uYYp-B6EZkmmT.mjs → refs-BpSpzdYB-BcDelHGt.mjs} +9 -9
- package/dist/refs-BpSpzdYB-BcDelHGt.mjs.map +1 -0
- package/dist/{shells-BenrJHp2.mjs → shells-BIdFZwUY.mjs} +13 -19
- package/dist/shells-BIdFZwUY.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-tWQi7CUv.d.mts → spaces-B20bgxF9.d.mts} +3 -3
- package/dist/{spaces-tWQi7CUv.d.mts.map → spaces-B20bgxF9.d.mts.map} +1 -1
- package/dist/{spaces-BG2w0P8d.mjs → spaces-BCZiAZQn.mjs} +8 -8
- package/dist/spaces-BCZiAZQn.mjs.map +1 -0
- 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-CrxvgpwD-D5LLXGci.mjs} +8 -8
- package/dist/{verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs.map → verify-contract-spaces-CrxvgpwD-D5LLXGci.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.d.mts +3 -3
- package/dist/vite-plugin-contract-emit.mjs +10 -10
- package/dist/vite-plugin-contract-emit.mjs.map +1 -1
- package/package.json +16 -40
- package/dist/aggregate-BBsCbXgJ.mjs.map +0 -1
- 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-C-jirr19-DDQB0WGo.mjs +0 -295
- package/dist/code-templates-C-jirr19-DDQB0WGo.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/domain-type-generation-PkAb39ob-Ct8AGqow.d.mts.map +0 -1
- package/dist/domain-type-generation-bpSO3Y0L-jo2C7LlH.mjs.map +0 -1
- package/dist/errors-CXbGUWGu-BQi6YS-H.mjs.map +0 -1
- package/dist/exports-B3xY_FHp.mjs.map +0 -1
- package/dist/exports-BCLg4CiV-05kuwcb0.mjs +0 -160
- package/dist/exports-BCLg4CiV-05kuwcb0.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/import-roots-NDOIEDVj.mjs.map +0 -1
- package/dist/index-CnOyYxmv.d.mts.map +0 -1
- package/dist/index-mCsi_ND5.d.mts.map +0 -1
- package/dist/init-DC7zPKka-BSiUrPw3.mjs +0 -800
- package/dist/init-DC7zPKka-BSiUrPw3.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-DuKoiMax-Cfe2XVhc.mjs +0 -1476
- package/dist/redact-secrets-DuKoiMax-Cfe2XVhc.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/ref-resolution-COGOSL57.d.mts.map +0 -1
- package/dist/ref-resolution-sGcINe7o.mjs.map +0 -1
- package/dist/refs-WK86uYYp-B6EZkmmT.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/spaces-BG2w0P8d.mjs.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,5 +1,5 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/output-
|
|
2
|
+
//#region ../../../1-framework/3-tooling/cli/dist/output-D83nTTpC.mjs
|
|
3
3
|
/**
|
|
4
4
|
* arktype schema for the structured success document `init --json` writes
|
|
5
5
|
* to stdout (FR1.5). The same shape backs the human-readable outro
|
|
@@ -44,48 +44,6 @@ const InitOutputSchema = type({
|
|
|
44
44
|
warnings: "string[]"
|
|
45
45
|
});
|
|
46
46
|
/**
|
|
47
|
-
* Serialises the output document for `--json`. Sorted keys are not enforced
|
|
48
|
-
* — `JSON.stringify` preserves insertion order, and the schema field order
|
|
49
|
-
* is the documented order, which matches what users will see when they
|
|
50
|
-
* `jq .` the result.
|
|
51
|
-
*/
|
|
52
|
-
function formatInitJson(output) {
|
|
53
|
-
return JSON.stringify(output, null, 2);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Renders the human-readable outro on stderr (FR10.1). Re-uses the same
|
|
57
|
-
* data structure as the JSON output so the two stay in lock-step.
|
|
58
|
-
*
|
|
59
|
-
* Warnings come before "Next steps" because they describe state the user
|
|
60
|
-
* needs to be aware of before acting on the next-steps list.
|
|
61
|
-
*/
|
|
62
|
-
function renderInitOutro(ui, output, flags) {
|
|
63
|
-
if (flags.quiet || flags.json) return;
|
|
64
|
-
for (const warning of output.warnings) ui.warn(warning);
|
|
65
|
-
const lines = [];
|
|
66
|
-
lines.push(`Target: ${output.target}`);
|
|
67
|
-
lines.push(`Authoring: ${output.authoring}`);
|
|
68
|
-
lines.push(`Schema: ${output.schemaPath}`);
|
|
69
|
-
lines.push("");
|
|
70
|
-
lines.push("Files written:");
|
|
71
|
-
for (const file of output.filesWritten) lines.push(` • ${file}`);
|
|
72
|
-
if (output.filesDeleted.length > 0) {
|
|
73
|
-
lines.push("");
|
|
74
|
-
lines.push("Removed (stale artifacts and retired skill directories):");
|
|
75
|
-
for (const file of output.filesDeleted) lines.push(` • ${file}`);
|
|
76
|
-
}
|
|
77
|
-
if (output.packagesInstalled.status === "installed") {
|
|
78
|
-
lines.push("");
|
|
79
|
-
lines.push("Packages installed:");
|
|
80
|
-
for (const dep of output.packagesInstalled.deps) lines.push(` • ${dep}`);
|
|
81
|
-
for (const dep of output.packagesInstalled.devDeps) lines.push(` • ${dep} (dev)`);
|
|
82
|
-
}
|
|
83
|
-
lines.push("");
|
|
84
|
-
lines.push("Next steps:");
|
|
85
|
-
for (const step of output.nextSteps) lines.push(` ${step}`);
|
|
86
|
-
ui.note(lines.join("\n"), "Done");
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
47
|
* Builds the `nextSteps` array from the resolved scaffold state. Steps are
|
|
90
48
|
* ordered by the workflow a user needs to follow: install what is missing →
|
|
91
49
|
* configure connection → (emit if not yet done) → run a starter query →
|
|
@@ -109,11 +67,11 @@ function buildNextSteps(options) {
|
|
|
109
67
|
push(`Emit the contract: \`${options.emitCommand}\``);
|
|
110
68
|
push(`Edit your schema at ${options.schemaPath}, then re-run the emit command.`);
|
|
111
69
|
} else push(`Edit your schema at ${options.schemaPath}, then re-run \`${options.emitCommand}\`.`);
|
|
112
|
-
push("Open prisma-
|
|
113
|
-
|
|
70
|
+
push("Open prisma-8.md for a quick reference on how to write your first typed query.");
|
|
71
|
+
push("Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.");
|
|
114
72
|
return steps;
|
|
115
73
|
}
|
|
116
74
|
//#endregion
|
|
117
|
-
export {
|
|
75
|
+
export { buildNextSteps as n, InitOutputSchema as t };
|
|
118
76
|
|
|
119
|
-
//# sourceMappingURL=output-
|
|
77
|
+
//# sourceMappingURL=output-D83nTTpC-XlvN30yS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-D83nTTpC-XlvN30yS.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/output-D83nTTpC.mjs"],"sourcesContent":["import { type } from \"arktype\";\n//#region src/commands/init/output.ts\n/**\n* arktype schema for the structured success document `init --json` writes\n* to stdout (FR1.5). The same shape backs the human-readable outro\n* renderer (FR10), so the two output modes carry identical information.\n*\n* `target` is normalised to the user-facing flag value (`mongodb` rather\n* than the internal `mongo`) so consumers can round-trip the document\n* straight into a follow-up `--target` invocation.\n*\n* The `ok: true` literal is the documented success/error discriminator —\n* see [Style Guide § JSON Semantics](../../../../../../../docs/CLI%20Style%20Guide.md#json-semantics).\n* Error envelopes (`CliErrorEnvelope`) carry `ok: false` so consumers can\n* branch with `if (doc.ok)` without inspecting the rest of the structure.\n*/\nconst InitOutputSchema = type({\n\tok: \"true\",\n\ttarget: \"'postgres'|'mongodb'\",\n\tauthoring: \"'psl'|'typescript'\",\n\tschemaPath: \"string\",\n\tfilesWritten: \"string[]\",\n\t/**\n\t* FR9.1 — paths removed from disk during this run: contract artifacts\n\t* (`contract.json`, `contract.d.ts`, `ops.json`, `migration.json`) an\n\t* earlier run left behind, which only a re-init has, and the retired\n\t* agent-skill directories, which every run removes when it finds them.\n\t*/\n\tfilesDeleted: \"string[]\",\n\t/**\n\t* What became of the dependency install. `skipped` is the deliberate\n\t* `--skip-install`; `failed` is an install that ran and did not succeed,\n\t* which leaves a scaffolded project that cannot run yet. `deps` and\n\t* `devDeps` list what was installed, so both non-`installed` states\n\t* carry them empty.\n\t*/\n\tpackagesInstalled: {\n\t\tstatus: \"'installed'|'skipped'|'failed'\",\n\t\tdeps: \"string[]\",\n\t\tdevDeps: \"string[]\"\n\t},\n\tcontractEmitted: \"boolean\",\n\tnextSteps: \"string[]\",\n\twarnings: \"string[]\"\n});\n/**\n* Builds the `nextSteps` array from the resolved scaffold state. Steps are\n* ordered by the workflow a user needs to follow: install what is missing →\n* configure connection → (emit if not yet done) → run a starter query →\n* docs / agent skill.\n*\n* The strings are stable and human-readable; agents wanting to act on them\n* should match on substrings (e.g. \"DATABASE_URL\") rather than exact text,\n* since copy may evolve.\n*/\nfunction buildNextSteps(options) {\n\tconst steps = [];\n\tlet stepNumber = 1;\n\tconst push = (text) => {\n\t\tsteps.push(`${stepNumber}. ${text}`);\n\t\tstepNumber += 1;\n\t};\n\tif (options.packagesInstalled === \"failed\") push(\"Install the project dependencies with your package manager — the install this run attempted failed, so nothing else here will work yet.\");\n\tif (options.packagesInstalled === \"skipped\") push(\"Install the project dependencies with your package manager (this run skipped them).\");\n\tpush(\"Set DATABASE_URL in your environment (export it or add it to .env).\");\n\tif (!options.contractEmitted) {\n\t\tpush(`Emit the contract: \\`${options.emitCommand}\\``);\n\t\tpush(`Edit your schema at ${options.schemaPath}, then re-run the emit command.`);\n\t} else push(`Edit your schema at ${options.schemaPath}, then re-run \\`${options.emitCommand}\\`.`);\n\tpush(\"Open prisma-8.md for a quick reference on how to write your first typed query.\");\n\tpush(\"Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.\");\n\treturn steps;\n}\n//#endregion\nexport { buildNextSteps as n, InitOutputSchema as t };\n\n//# sourceMappingURL=output-D83nTTpC.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,mBAAmB,KAAK;CAC7B,IAAI;CACJ,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,cAAc;;;;;;;CAOd,cAAc;;;;;;;;CAQd,mBAAmB;EAClB,QAAQ;EACR,MAAM;EACN,SAAS;CACV;CACA,iBAAiB;CACjB,WAAW;CACX,UAAU;AACX,CAAC;;;;;;;;;;;AAWD,SAAS,eAAe,SAAS;CAChC,MAAM,QAAQ,CAAC;CACf,IAAI,aAAa;CACjB,MAAM,QAAQ,SAAS;EACtB,MAAM,KAAK,GAAG,WAAW,IAAI,MAAM;EACnC,cAAc;CACf;CACA,IAAI,QAAQ,sBAAsB,UAAU,KAAK,yIAAyI;CAC1L,IAAI,QAAQ,sBAAsB,WAAW,KAAK,qFAAqF;CACvI,KAAK,qEAAqE;CAC1E,IAAI,CAAC,QAAQ,iBAAiB;EAC7B,KAAK,wBAAwB,QAAQ,YAAY,GAAG;EACpD,KAAK,uBAAuB,QAAQ,WAAW,gCAAgC;CAChF,OAAO,KAAK,uBAAuB,QAAQ,WAAW,kBAAkB,QAAQ,YAAY,IAAI;CAChG,KAAK,gFAAgF;CACrF,KAAK,mGAAmG;CACxG,OAAO;AACR"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as ShellReexportMapping, i as ShellPackageMapping, n as ShellKind, o as excludedSubpaths, r as ShellName, s as publicShells, t as ShellDefinition } from "./shells-
|
|
2
|
-
import { a as ScaffoldImportRoot, c as createScaffoldSpecifierResolver, d as importedSpecifiers, f as internalImportRoot, h as transitiveImports, i as ImportSpecifierResolver, l as directDependencyShells, m as resolveImportSpecifier, n as ImportRootError, o as buildOwnerIndex, p as platformEntrypointOf, r as ImportRootMode, s as createImportSpecifierResolver, t as ImportRoot, u as importRootForDependencies } from "./import-roots-
|
|
1
|
+
import { a as ShellReexportMapping, i as ShellPackageMapping, n as ShellKind, o as excludedSubpaths, r as ShellName, s as publicShells, t as ShellDefinition } from "./shells-CIUmT4u4.mjs";
|
|
2
|
+
import { a as ScaffoldImportRoot, c as createScaffoldSpecifierResolver, d as importedSpecifiers, f as internalImportRoot, h as transitiveImports, i as ImportSpecifierResolver, l as directDependencyShells, m as resolveImportSpecifier, n as ImportRootError, o as buildOwnerIndex, p as platformEntrypointOf, r as ImportRootMode, s as createImportSpecifierResolver, t as ImportRoot, u as importRootForDependencies } from "./import-roots-ARK1wjzc.mjs";
|
|
3
3
|
export { ImportRoot, ImportRootError, ImportRootMode, ImportSpecifierResolver, ScaffoldImportRoot, ShellDefinition, ShellKind, ShellName, ShellPackageMapping, ShellReexportMapping, buildOwnerIndex, createImportSpecifierResolver, createScaffoldSpecifierResolver, directDependencyShells, excludedSubpaths, importRootForDependencies, importedSpecifiers, internalImportRoot, platformEntrypointOf, publicShells, resolveImportSpecifier, transitiveImports };
|
package/dist/publish-surface.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as publicShells, t as excludedSubpaths } from "./shells-
|
|
2
|
-
import { a as directDependencyShells, c as internalImportRoot, d as transitiveImports, i as createScaffoldSpecifierResolver, l as platformEntrypointOf, n as buildOwnerIndex, o as importRootForDependencies, r as createImportSpecifierResolver, s as importedSpecifiers, t as ImportRootError, u as resolveImportSpecifier } from "./import-roots-
|
|
1
|
+
import { n as publicShells, t as excludedSubpaths } from "./shells-BIdFZwUY.mjs";
|
|
2
|
+
import { a as directDependencyShells, c as internalImportRoot, d as transitiveImports, i as createScaffoldSpecifierResolver, l as platformEntrypointOf, n as buildOwnerIndex, o as importRootForDependencies, r as createImportSpecifierResolver, s as importedSpecifiers, t as ImportRootError, u as resolveImportSpecifier } from "./import-roots-BHOrDJbI.mjs";
|
|
3
3
|
export { ImportRootError, buildOwnerIndex, createImportSpecifierResolver, createScaffoldSpecifierResolver, directDependencyShells, excludedSubpaths, importRootForDependencies, importedSpecifiers, internalImportRoot, platformEntrypointOf, publicShells, resolveImportSpecifier, transitiveImports };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ScaffoldImportRoot, c as createScaffoldSpecifierResolver, d as importedSpecifiers, f as internalImportRoot, h as transitiveImports, i as ImportSpecifierResolver, l as directDependencyShells, m as resolveImportSpecifier, n as ImportRootError, o as buildOwnerIndex, p as platformEntrypointOf, r as ImportRootMode, s as createImportSpecifierResolver, t as ImportRoot, u as importRootForDependencies } from "./import-roots-
|
|
1
|
+
import { a as ScaffoldImportRoot, c as createScaffoldSpecifierResolver, d as importedSpecifiers, f as internalImportRoot, h as transitiveImports, i as ImportSpecifierResolver, l as directDependencyShells, m as resolveImportSpecifier, n as ImportRootError, o as buildOwnerIndex, p as platformEntrypointOf, r as ImportRootMode, s as createImportSpecifierResolver, t as ImportRoot, u as importRootForDependencies } from "./import-roots-ARK1wjzc.mjs";
|
|
2
2
|
export { ImportRoot, ImportRootError, ImportRootMode, ImportSpecifierResolver, ScaffoldImportRoot, buildOwnerIndex, createImportSpecifierResolver, createScaffoldSpecifierResolver, directDependencyShells, importRootForDependencies, importedSpecifiers, internalImportRoot, platformEntrypointOf, resolveImportSpecifier, transitiveImports };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as directDependencyShells, c as internalImportRoot, d as transitiveImports, i as createScaffoldSpecifierResolver, l as platformEntrypointOf, n as buildOwnerIndex, o as importRootForDependencies, r as createImportSpecifierResolver, s as importedSpecifiers, t as ImportRootError, u as resolveImportSpecifier } from "./import-roots-
|
|
1
|
+
import { a as directDependencyShells, c as internalImportRoot, d as transitiveImports, i as createScaffoldSpecifierResolver, l as platformEntrypointOf, n as buildOwnerIndex, o as importRootForDependencies, r as createImportSpecifierResolver, s as importedSpecifiers, t as ImportRootError, u as resolveImportSpecifier } from "./import-roots-BHOrDJbI.mjs";
|
|
2
2
|
export { ImportRootError, buildOwnerIndex, createImportSpecifierResolver, createScaffoldSpecifierResolver, directDependencyShells, importRootForDependencies, importedSpecifiers, internalImportRoot, platformEntrypointOf, resolveImportSpecifier, transitiveImports };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ShellReexportMapping, i as ShellPackageMapping, n as ShellKind, o as excludedSubpaths, r as ShellName, s as publicShells, t as ShellDefinition } from "./shells-
|
|
1
|
+
import { a as ShellReexportMapping, i as ShellPackageMapping, n as ShellKind, o as excludedSubpaths, r as ShellName, s as publicShells, t as ShellDefinition } from "./shells-CIUmT4u4.mjs";
|
|
2
2
|
export { ShellDefinition, ShellKind, ShellName, ShellPackageMapping, ShellReexportMapping, excludedSubpaths, publicShells };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as publicShells, t as excludedSubpaths } from "./shells-
|
|
1
|
+
import { n as publicShells, t as excludedSubpaths } from "./shells-BIdFZwUY.mjs";
|
|
2
2
|
export { excludedSubpaths, publicShells };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Welcome to Prisma
|
|
1
|
+
# Welcome to Prisma ORM!
|
|
2
2
|
|
|
3
|
-
Prisma
|
|
3
|
+
Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every collection, field, and relation.
|
|
4
4
|
|
|
5
|
-
This project is set up for MongoDB. Prisma
|
|
5
|
+
This project is set up for MongoDB. Prisma ORM also supports other databases.
|
|
6
6
|
|
|
7
7
|
{{requirements}}
|
|
8
8
|
|
|
@@ -34,21 +34,24 @@ Your contract has two companion files in the same directory:
|
|
|
34
34
|
|
|
35
35
|
Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them.
|
|
36
36
|
|
|
37
|
-
If you use a framework like Next.js or Vite, the Prisma
|
|
37
|
+
If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically.
|
|
38
38
|
|
|
39
39
|
## Configuration
|
|
40
40
|
|
|
41
|
-
[`prisma
|
|
41
|
+
[`prisma.config.ts`](prisma.config.ts) tells the CLI where your contract lives and how to connect to your database. It loads environment variables from `.env` automatically:
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
44
|
import 'dotenv/config';
|
|
45
|
-
import {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
import { definePrismaConfig } from '@prisma/cli-engine';
|
|
46
|
+
import { defineConfig as ormConfig } from '{{configEntrypoint}}';
|
|
47
|
+
|
|
48
|
+
export default definePrismaConfig({
|
|
49
|
+
orm: ormConfig({
|
|
50
|
+
contract: './{{schemaPath}}',
|
|
51
|
+
db: {
|
|
52
|
+
connection: process.env['DATABASE_URL']!,
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
52
55
|
});
|
|
53
56
|
```
|
|
54
57
|
|
|
@@ -75,7 +78,7 @@ You can customize how your environment variables are loaded by changing or remov
|
|
|
75
78
|
| File | Purpose |
|
|
76
79
|
|---|---|
|
|
77
80
|
| [`{{schemaPath}}`]({{schemaPath}}) | Your data contract — define your models here |
|
|
78
|
-
| [`prisma
|
|
81
|
+
| [`prisma.config.ts`](prisma.config.ts) | CLI configuration |
|
|
79
82
|
| [`{{schemaDir}}/db.ts`]({{schemaDir}}/db.ts) | Database client — `import { db } from '{{dbImportPath}}'` |
|
|
80
83
|
| `{{schemaDir}}/contract.json` | Compiled contract (generated) |
|
|
81
84
|
| `{{schemaDir}}/contract.d.ts` | Contract types (generated) |
|
|
@@ -94,14 +97,14 @@ Multi-document transactions and change streams require MongoDB to run as a **rep
|
|
|
94
97
|
- **`mongodb-memory-server`:** use `MongoMemoryReplSet` instead of `MongoMemoryServer` in tests.
|
|
95
98
|
- **MongoDB Atlas:** every Atlas cluster is already a replica set.
|
|
96
99
|
|
|
97
|
-
The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma
|
|
100
|
+
The transaction API (`db.transaction(...)`) is on the roadmap and tracked under [TML-2313](https://linear.app/prisma-company/issue/TML-2313/mongo-dev-replica-set-story-is-missing-transactions-change-streams). Prisma ORM's Mongo facade does not expose it yet — until that ticket lands, drive transactions yourself with a raw `MongoClient` using the escape hatch in the next section.
|
|
98
101
|
|
|
99
102
|
## Escape hatches
|
|
100
103
|
|
|
101
104
|
The ORM covers the common cases. For the rest, two escape hatches are designed in:
|
|
102
105
|
|
|
103
106
|
- **Typed raw aggregations — `db.query`.** The facade exposes `db.query`, a typed builder for aggregation pipelines that runs through the same runtime + middleware + codec stack as `db.orm`. Reach for it when the ORM can't express a `$lookup`/`$facet`/`$graphLookup`/window-function pipeline.
|
|
104
|
-
- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma
|
|
107
|
+
- **Direct `mongodb` driver control — `mongoClient` binding.** Construct your own `MongoClient` and pass it to `mongo({ mongoClient, dbName, contractJson })`. Your code keeps the `MongoClient` reference and uses it directly (transactions, change streams, sessions, anything Prisma ORM doesn't surface yet); the same `db` object continues to give you the typed ORM.
|
|
105
108
|
|
|
106
109
|
`db.runtime()` is **not** the escape hatch — it returns the internal executor (`MongoRuntime`), not a `mongodb` `MongoClient` or `Db`. Use `db.query` for raw aggregations and the `mongoClient` binding for direct driver control.
|
|
107
110
|
|
|
@@ -109,6 +112,6 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i
|
|
|
109
112
|
|
|
110
113
|
If this project lives inside a pnpm workspace, a few things are worth knowing:
|
|
111
114
|
|
|
112
|
-
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma
|
|
113
|
-
- **`pnpm dlx`.** `pnpm dlx prisma
|
|
114
|
-
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma
|
|
115
|
+
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`.
|
|
116
|
+
- **`pnpm dlx`.** `pnpm dlx prisma@latest orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than `latest`.
|
|
117
|
+
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma ORM with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Welcome to Prisma
|
|
1
|
+
# Welcome to Prisma ORM!
|
|
2
2
|
|
|
3
|
-
Prisma
|
|
3
|
+
Prisma ORM lets you query your database in simple, easy-to-read TypeScript. Define what your data looks like, and Prisma ORM gives you a fully typed client — with autocomplete for every table, column, and relation.
|
|
4
4
|
|
|
5
|
-
This project is set up for PostgreSQL. Prisma
|
|
5
|
+
This project is set up for PostgreSQL. Prisma ORM also supports other databases.
|
|
6
6
|
|
|
7
7
|
{{requirements}}
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ Every model you define in your contract can be queried from your app. Your edito
|
|
|
17
17
|
```typescript
|
|
18
18
|
import { db } from '{{dbImportPath}}';
|
|
19
19
|
|
|
20
|
-
const user = await db.orm.User
|
|
20
|
+
const user = await db.orm.public.User
|
|
21
21
|
.where({ email: 'alice@example.com' })
|
|
22
22
|
.first();
|
|
23
23
|
|
|
@@ -32,21 +32,24 @@ Your contract has two companion files in the same directory:
|
|
|
32
32
|
|
|
33
33
|
Commit both files to git. When you change your contract, run `{{pkgRun}} contract emit` to update them.
|
|
34
34
|
|
|
35
|
-
If you use a framework like Next.js or Vite, the Prisma
|
|
35
|
+
If you use a framework like Next.js or Vite, the Prisma ORM plugin will do this for you automatically.
|
|
36
36
|
|
|
37
37
|
## Configuration
|
|
38
38
|
|
|
39
|
-
[`prisma
|
|
39
|
+
[`prisma.config.ts`](prisma.config.ts) tells the CLI where your contract lives and how to connect to your database. It loads environment variables from `.env` automatically:
|
|
40
40
|
|
|
41
41
|
```typescript
|
|
42
42
|
import 'dotenv/config';
|
|
43
|
-
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
import { definePrismaConfig } from '@prisma/cli-engine';
|
|
44
|
+
import { defineConfig as ormConfig } from '{{configEntrypoint}}';
|
|
45
|
+
|
|
46
|
+
export default definePrismaConfig({
|
|
47
|
+
orm: ormConfig({
|
|
48
|
+
contract: './{{schemaPath}}',
|
|
49
|
+
db: {
|
|
50
|
+
connection: process.env['DATABASE_URL']!,
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
50
53
|
});
|
|
51
54
|
```
|
|
52
55
|
|
|
@@ -73,7 +76,7 @@ You can customize how your environment variables are loaded by changing or remov
|
|
|
73
76
|
| File | Purpose |
|
|
74
77
|
|---|---|
|
|
75
78
|
| [`{{schemaPath}}`]({{schemaPath}}) | Your data contract — define your models here |
|
|
76
|
-
| [`prisma
|
|
79
|
+
| [`prisma.config.ts`](prisma.config.ts) | CLI configuration |
|
|
77
80
|
| [`{{schemaDir}}/db.ts`]({{schemaDir}}/db.ts) | Database client — `import { db } from '{{dbImportPath}}'` |
|
|
78
81
|
| `{{schemaDir}}/contract.json` | Compiled contract (generated) |
|
|
79
82
|
| `{{schemaDir}}/contract.d.ts` | Contract types (generated) |
|
|
@@ -88,6 +91,6 @@ You can customize how your environment variables are loaded by changing or remov
|
|
|
88
91
|
|
|
89
92
|
If this project lives inside a pnpm workspace, a few things are worth knowing:
|
|
90
93
|
|
|
91
|
-
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma
|
|
92
|
-
- **`pnpm dlx`.** `pnpm dlx prisma
|
|
93
|
-
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma
|
|
94
|
+
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`.
|
|
95
|
+
- **`pnpm dlx`.** `pnpm dlx prisma@latest orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma ORM packages to reflect the workspace's catalog rather than `latest`.
|
|
96
|
+
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma ORM with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`.
|
package/dist/readme-mongo.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# {{projectName}}
|
|
2
2
|
|
|
3
|
-
Generated by `prisma
|
|
3
|
+
Generated by `prisma orm init` with the Minimal template.
|
|
4
4
|
|
|
5
5
|
## First run
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ Generated by `prisma-next init` with the Minimal template.
|
|
|
9
9
|
|
|
10
10
|
## Available scripts
|
|
11
11
|
|
|
12
|
-
- `{{runDev}}` — run the Prisma
|
|
12
|
+
- `{{runDev}}` — run the Prisma ORM sample script
|
|
13
13
|
|
|
14
14
|
### Database and migrations
|
|
15
15
|
|
|
@@ -21,15 +21,15 @@ Generated by `prisma-next init` with the Minimal template.
|
|
|
21
21
|
- `{{runMigrate}}` — apply the planned MongoDB migration
|
|
22
22
|
- `{{runDbSeed}}` — insert sample users manually
|
|
23
23
|
|
|
24
|
-
## Prisma
|
|
24
|
+
## Prisma ORM
|
|
25
25
|
|
|
26
|
-
Prisma
|
|
26
|
+
Prisma ORM setup is scaffolded in:
|
|
27
27
|
|
|
28
28
|
- `{{contractPath}}`
|
|
29
|
-
- `prisma
|
|
29
|
+
- `prisma.config.ts`
|
|
30
30
|
- `prisma/db.ts`
|
|
31
31
|
- `src/lib/prisma.ts`
|
|
32
32
|
|
|
33
|
-
For provider-specific Prisma
|
|
33
|
+
For provider-specific Prisma ORM reference docs, see `prisma-8.md`. Prisma ORM skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills.
|
|
34
34
|
|
|
35
|
-
Node-based Prisma
|
|
35
|
+
Node-based Prisma ORM projects expect Node.js 24 LTS or newer.
|
package/dist/readme-postgres.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# {{projectName}}
|
|
2
2
|
|
|
3
|
-
Generated by `prisma
|
|
3
|
+
Generated by `prisma orm init` with the Minimal template.
|
|
4
4
|
|
|
5
5
|
## First run
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ Generated by `prisma-next init` with the Minimal template.
|
|
|
9
9
|
|
|
10
10
|
## Available scripts
|
|
11
11
|
|
|
12
|
-
- `{{runDev}}` — run the Prisma
|
|
12
|
+
- `{{runDev}}` — run the Prisma ORM sample script
|
|
13
13
|
|
|
14
14
|
### Database and migrations
|
|
15
15
|
|
|
@@ -20,15 +20,15 @@ Generated by `prisma-next init` with the Minimal template.
|
|
|
20
20
|
- `{{runMigrate}}` — apply a planned migration
|
|
21
21
|
- `{{runDbSeed}}` — insert sample users manually (run after `db:init`)
|
|
22
22
|
|
|
23
|
-
## Prisma
|
|
23
|
+
## Prisma ORM
|
|
24
24
|
|
|
25
|
-
Prisma
|
|
25
|
+
Prisma ORM setup is scaffolded in:
|
|
26
26
|
|
|
27
27
|
- `{{contractPath}}`
|
|
28
|
-
- `prisma
|
|
28
|
+
- `prisma.config.ts`
|
|
29
29
|
- `prisma/db.ts`
|
|
30
30
|
- `src/lib/prisma.ts`
|
|
31
31
|
|
|
32
|
-
For provider-specific Prisma
|
|
32
|
+
For provider-specific Prisma ORM reference docs, see `prisma-8.md`. Prisma ORM skills live in the upstream `skills/` directory: https://github.com/prisma/prisma/tree/main/skills.
|
|
33
33
|
|
|
34
|
-
Node-based Prisma
|
|
34
|
+
Node-based Prisma ORM projects expect Node.js 24 LTS or newer.
|