@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,39 +1,23 @@
|
|
|
1
1
|
import { i as Refs, n as RefEntry } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
|
|
2
2
|
import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
|
|
3
|
-
import { r as MigrationRef, t as ContractRef } from "./ref-resolution-
|
|
4
|
-
import { A as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
3
|
+
import { r as MigrationRef, t as ContractRef } from "./ref-resolution-CaHQJXE0.mjs";
|
|
4
|
+
import { A as SchemaVerifyOptions, C as EmitResult, D as IntrospectOptions, E as ExecuteDbVerifyResult, M as VerifyOptions, N as executeDbVerify, S as EmitOptions, T as ExecuteDbVerifyOptions, _ as DbUpdateResult, a as ControlClient, b as EmitFailure, c as CreateControlClient, d as DbInitOptions, f as DbInitResult, g as DbUpdateOptions, h as DbUpdateFailureCode, i as ControlActionName, j as SignOptions, k as OnControlProgress, l as DbInitFailure, m as DbUpdateFailure, n as ContractEmitOptions, o as ControlClientOptions, p as DbInitSuccess, r as ContractEmitResult, s as ControlProgressEvent, t as CliStructuredError$2, u as DbInitFailureCode, v as DbUpdateSuccess, w as EmitSuccess, x as EmitFailureCode, y as EmitContractConfig } from "./db-verify-Yih5kWtB-B1kv76ec.mjs";
|
|
5
|
+
import { a as emit } from "./index-D217lbiW.mjs";
|
|
6
|
+
import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
|
|
7
|
+
import { c as ContractSpaceAggregate, d as IntegrityQueryOptions, p as IntegrityViolation, t as AggregateContractSpace } from "./aggregate-D_eX4zoo.mjs";
|
|
8
|
+
import { r as PrismaNextConfig$1 } from "./index-u5RdrumF.mjs";
|
|
9
|
+
import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
|
|
10
|
+
import "./metadata-BtscDay2.mjs";
|
|
10
11
|
import "./package-N9PPdFV_.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import { r as PrismaNextConfig$1 } from "./index-mCsi_ND5.mjs";
|
|
13
|
-
import { a as emit } from "./index-CnOyYxmv.mjs";
|
|
14
|
-
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
15
|
-
import { ControlAdapterInstance, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, SignDatabaseResult, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
12
|
+
import { ControlAdapterInstance, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, OperationPreview, SignDatabaseResult, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
16
13
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
17
|
-
import {
|
|
14
|
+
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
18
15
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
19
|
-
|
|
20
|
-
//#region src/utils/formatters/migration-graph-labels.d.ts
|
|
21
|
-
interface MigrationEdgeAnnotation {
|
|
22
|
-
readonly status?: 'applied' | 'pending';
|
|
23
|
-
readonly operationCount?: number;
|
|
24
|
-
readonly invariants?: readonly string[];
|
|
25
|
-
/**
|
|
26
|
-
* Path-highlight annotation for `migrate --show` preview.
|
|
27
|
-
* - `'on-path'`: migration is on the chosen path; rendered in bright green.
|
|
28
|
-
* - `'off-path'`: migration is off the chosen path; fully drawn but dim grey.
|
|
29
|
-
*/
|
|
30
|
-
readonly pathHighlight?: 'on-path' | 'off-path';
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
16
|
+
import { PrismaNextConfig } from "@prisma/orm-framework/config/config-types";
|
|
33
17
|
//#region ../../../1-framework/3-tooling/cli/dist/exports/control-api.d.mts
|
|
34
18
|
//#region src/control-api/client.d.ts
|
|
35
19
|
/**
|
|
36
|
-
* Creates a programmatic control client for Prisma
|
|
20
|
+
* Creates a programmatic control client for Prisma ORM operations.
|
|
37
21
|
*
|
|
38
22
|
* The client accepts framework component descriptors at creation time,
|
|
39
23
|
* manages driver lifecycle via connect()/close(), and exposes domain
|
|
@@ -67,7 +51,7 @@ type ContractEmitDependencies = {
|
|
|
67
51
|
* Canonical contract emit operation.
|
|
68
52
|
*
|
|
69
53
|
* This is the SINGLE publication path used by both the CLI command
|
|
70
|
-
* (`prisma
|
|
54
|
+
* (`prisma contract emit`) and the Vite plugin
|
|
71
55
|
* (`@internal/vite-plugin-contract-emit`). New callers must go through this
|
|
72
56
|
* function rather than re-implementing load → emit → publish.
|
|
73
57
|
*
|
|
@@ -132,7 +116,7 @@ declare function resolveContractRefToSnapshot(options: ResolveContractRefToSnaps
|
|
|
132
116
|
* target mismatch, then disjointness, then a contract-validation
|
|
133
117
|
* failure, then any remaining structural integrity violation.
|
|
134
118
|
*/
|
|
135
|
-
declare function mapIntegrityViolations(violations: readonly IntegrityViolation[]): CliStructuredError$2 | null;
|
|
119
|
+
declare function mapIntegrityViolations(violations: readonly IntegrityViolation[], migrationsDir: string): CliStructuredError$2 | null;
|
|
136
120
|
/**
|
|
137
121
|
* Inputs needed to compose the aggregate loader at the CLI surface.
|
|
138
122
|
*
|
|
@@ -164,13 +148,13 @@ declare function loadContractSpaceAggregateForCli<TFamilyId extends string, TTar
|
|
|
164
148
|
* the contract-space refusal envelope, or return `null` when the model
|
|
165
149
|
* is acceptable for the requested check scope.
|
|
166
150
|
*/
|
|
167
|
-
declare function refuseContractSpaceIntegrity(aggregate: ContractSpaceAggregate, options: IntegrityQueryOptions): CliStructuredError$2 | null;
|
|
151
|
+
declare function refuseContractSpaceIntegrity(aggregate: ContractSpaceAggregate, options: IntegrityQueryOptions, migrationsDir: string): CliStructuredError$2 | null;
|
|
168
152
|
/**
|
|
169
153
|
* Reader-subset integrity refusal for `migration status`: package
|
|
170
154
|
* corruptions only (`hashMismatch`, `providedInvariantsMismatch`,
|
|
171
155
|
* `packageUnloadable`).
|
|
172
156
|
*/
|
|
173
|
-
declare function refusePackageCorruptionOnAggregate(aggregate: ContractSpaceAggregate): CliStructuredError$2 | null;
|
|
157
|
+
declare function refusePackageCorruptionOnAggregate(aggregate: ContractSpaceAggregate, migrationsDir: string): CliStructuredError$2 | null;
|
|
174
158
|
/**
|
|
175
159
|
* Construct the tolerant {@link ContractSpaceAggregate} at the CLI
|
|
176
160
|
* surface and apply the explicit integrity refusal.
|
|
@@ -215,6 +199,93 @@ declare function buildReadAggregate(config: PrismaNextConfig, options: {
|
|
|
215
199
|
readonly contractHash: string;
|
|
216
200
|
}, CliStructuredError$2>>;
|
|
217
201
|
//#endregion
|
|
202
|
+
//#region src/control-api/operations/contract-space-seed-phase.d.ts
|
|
203
|
+
/**
|
|
204
|
+
* In-memory authored migration package shipped by an extension descriptor.
|
|
205
|
+
* Mirrors `MigrationPackage` from `@internal/migration-tools/io` (the
|
|
206
|
+
* on-disk shape minus `dirPath`); redeclared structurally here so the
|
|
207
|
+
* CLI helper does not couple to any family's `ExtensionMigrationPackage`
|
|
208
|
+
* type — any family that ships pre-built migration packages can pass
|
|
209
|
+
* them through unchanged.
|
|
210
|
+
*/
|
|
211
|
+
interface DescriptorMigrationPackage {
|
|
212
|
+
readonly dirName: string;
|
|
213
|
+
readonly metadata: MigrationMetadata$1;
|
|
214
|
+
readonly ops: MigrationOps;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Minimal descriptor view consumed by the seed phase. Mirrors the shape
|
|
218
|
+
* the SQL family ships on each declared extension entry; only the fields
|
|
219
|
+
* the seed phase needs are surfaced.
|
|
220
|
+
*/
|
|
221
|
+
interface SeedPhaseExtensionInput {
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly contractSpace?: {
|
|
224
|
+
readonly contractJson: unknown;
|
|
225
|
+
readonly headRef: {
|
|
226
|
+
readonly hash: string;
|
|
227
|
+
readonly invariants: readonly string[];
|
|
228
|
+
};
|
|
229
|
+
readonly migrations: readonly DescriptorMigrationPackage[];
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
interface ContractSpaceSeedPhaseInputs {
|
|
233
|
+
readonly migrationsDir: string;
|
|
234
|
+
readonly extensions: ReadonlyArray<SeedPhaseExtensionInput>;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* One per-space record describing what the seed phase did for an
|
|
238
|
+
* extension contract space. Surfaced verbatim by the caller (typically
|
|
239
|
+
* `migration plan`) so users see a single line per touched extension.
|
|
240
|
+
*
|
|
241
|
+
* - `action: 'updated'` — either the on-disk head pointer changed, or
|
|
242
|
+
* one or more new descriptor-shipped migration packages were
|
|
243
|
+
* materialised into `migrations/<spaceId>/<dirName>/`.
|
|
244
|
+
* - `action: 'unchanged'` — the on-disk head already matched the
|
|
245
|
+
* descriptor and no new migration packages needed to be written.
|
|
246
|
+
*
|
|
247
|
+
* Either way, the artifacts (`contract.json`, `contract.d.ts`,
|
|
248
|
+
* `refs/head.json`) are re-emitted: the framework owns those files and
|
|
249
|
+
* makes the re-emit observably idempotent at the byte level.
|
|
250
|
+
*/
|
|
251
|
+
interface ContractSpaceSeedPhaseRecord {
|
|
252
|
+
readonly spaceId: string;
|
|
253
|
+
readonly action: 'updated' | 'unchanged';
|
|
254
|
+
readonly priorHash: string | null;
|
|
255
|
+
readonly newHash: string;
|
|
256
|
+
readonly newMigrationDirs: readonly string[];
|
|
257
|
+
}
|
|
258
|
+
interface ContractSpaceSeedPhaseResult {
|
|
259
|
+
readonly seeded: readonly ContractSpaceSeedPhaseRecord[];
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Phase-1 of the two-phase `migration plan` pipeline (sub-spec § 4).
|
|
263
|
+
*
|
|
264
|
+
* For every extension that exposes a `contractSpace`:
|
|
265
|
+
*
|
|
266
|
+
* 1. Read the on-disk head ref (returns `null` on first emit).
|
|
267
|
+
* 2. Write the head contract into the migrations-root snapshot store
|
|
268
|
+
* (write-if-absent, keyed by hash) and unconditionally re-emit
|
|
269
|
+
* `refs/head.json`, via {@link emitContractSpaceArtifacts}. The
|
|
270
|
+
* framework owns `refs/head.json`; re-emit is the contract for that
|
|
271
|
+
* file. The snapshot itself is only written once per distinct hash.
|
|
272
|
+
* 3. Materialise any descriptor-shipped migration packages not yet on
|
|
273
|
+
* disk via {@link materialiseExtensionMigrationPackageIfMissing}.
|
|
274
|
+
* Existing packages are left untouched (by-existence skip).
|
|
275
|
+
*
|
|
276
|
+
* The return value lets the caller render a per-space status line and
|
|
277
|
+
* lets the phase-2 aggregate loader run on a now-consistent disk state
|
|
278
|
+
* (every loaded extension is guaranteed to have its head ref pinned
|
|
279
|
+
* to the descriptor's hash and to ship every package the descriptor
|
|
280
|
+
* declares).
|
|
281
|
+
*
|
|
282
|
+
* Output ordering is deterministic and alphabetical by spaceId (via
|
|
283
|
+
* {@link planAllSpaces}, which also detects duplicate spaceIds). This
|
|
284
|
+
* matches the canonical sort order used by every other aggregate
|
|
285
|
+
* surface (`migrate`, `migration status`, the runner).
|
|
286
|
+
*/
|
|
287
|
+
declare function runContractSpaceSeedPhase(inputs: ContractSpaceSeedPhaseInputs): Promise<ContractSpaceSeedPhaseResult>;
|
|
288
|
+
//#endregion
|
|
218
289
|
//#region src/control-api/operations/db-init.d.ts
|
|
219
290
|
/**
|
|
220
291
|
* Options for executing the `db init` operation.
|
|
@@ -341,6 +412,128 @@ declare function refuseMissingInvariantPath(args: {
|
|
|
341
412
|
readonly refName?: string;
|
|
342
413
|
}): CliStructuredError$2 | null;
|
|
343
414
|
//#endregion
|
|
415
|
+
//#region src/control-api/operations/migrate-show.d.ts
|
|
416
|
+
/**
|
|
417
|
+
* One migration that will run in a `migrate --show` preview, in execution order.
|
|
418
|
+
*/
|
|
419
|
+
interface MigrateShowMigration {
|
|
420
|
+
readonly spaceId: string;
|
|
421
|
+
readonly dirName: string;
|
|
422
|
+
readonly migrationHash: string;
|
|
423
|
+
readonly from: string;
|
|
424
|
+
readonly to: string;
|
|
425
|
+
}
|
|
426
|
+
interface ExecuteMigrateShowPlanOptions {
|
|
427
|
+
readonly config: PrismaNextConfig;
|
|
428
|
+
/** Directory the command was invoked from. */
|
|
429
|
+
readonly cwd: string;
|
|
430
|
+
/** `--config` as the user wrote it, used only to locate the migrations directory and for display. */
|
|
431
|
+
readonly configPath?: string;
|
|
432
|
+
readonly db?: string;
|
|
433
|
+
readonly to?: string;
|
|
434
|
+
readonly from?: string;
|
|
435
|
+
/** Client factory used when the plan needs the live DB marker; defaults to the real client. */
|
|
436
|
+
readonly createClient?: CreateControlClient;
|
|
437
|
+
/**
|
|
438
|
+
* Invoked once, after refs/aggregate/--to resolution succeeds and before any DB connection —
|
|
439
|
+
* exactly where the CLI renders its styled header today.
|
|
440
|
+
*/
|
|
441
|
+
readonly onPreflightComplete?: (ctx: {
|
|
442
|
+
readonly configPath: string;
|
|
443
|
+
readonly migrationsRelative: string;
|
|
444
|
+
readonly dbConnection: unknown | undefined;
|
|
445
|
+
readonly hasExplicitFrom: boolean;
|
|
446
|
+
}) => void;
|
|
447
|
+
}
|
|
448
|
+
interface MigrateShowPlanSuccess {
|
|
449
|
+
readonly aggregate: ContractSpaceAggregate;
|
|
450
|
+
readonly contractHash: string;
|
|
451
|
+
readonly migrations: readonly MigrateShowMigration[];
|
|
452
|
+
readonly summary: string;
|
|
453
|
+
/** Per-space render hash: live/override marker storageHash, pre-defaulted to the empty sentinel. */
|
|
454
|
+
readonly renderMarkerHashBySpace: ReadonlyMap<string, string>;
|
|
455
|
+
/** True when the live DB marker was read — gates the ★ db marker in the tree. */
|
|
456
|
+
readonly usedLiveMarker: boolean;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Computes the path through the SAME seam as `executeMigrate`:
|
|
460
|
+
* - `readAllMarkers()` for the from-state (when no `--from` is given), preserving
|
|
461
|
+
* the full marker including `invariants` (not just `storageHash`).
|
|
462
|
+
* - `planSpacePath()` (shared with `executeMigrate`) for per-space path selection,
|
|
463
|
+
* which feeds `resolveRecordedPath()` with the same target hash, target invariants,
|
|
464
|
+
* and current marker as the real apply path uses.
|
|
465
|
+
*
|
|
466
|
+
* Returns BEFORE any write boundary (`runMigration` / marker / DDL). No
|
|
467
|
+
* DB state is mutated.
|
|
468
|
+
*/
|
|
469
|
+
declare function executeMigrateShowPlan(options: ExecuteMigrateShowPlanOptions): Promise<Result<MigrateShowPlanSuccess, CliStructuredError$2>>;
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region src/commands/json/schemas.d.ts
|
|
472
|
+
declare const migrationSpaceListEntrySchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
473
|
+
space: string;
|
|
474
|
+
migrations: {
|
|
475
|
+
name: string;
|
|
476
|
+
hash: string;
|
|
477
|
+
fromContract: string | null;
|
|
478
|
+
toContract: string;
|
|
479
|
+
operationCount: number;
|
|
480
|
+
createdAt: string;
|
|
481
|
+
refs: string[];
|
|
482
|
+
providedInvariants: string[];
|
|
483
|
+
}[];
|
|
484
|
+
}, {}>;
|
|
485
|
+
type MigrationSpaceListEntry = typeof migrationSpaceListEntrySchema.infer;
|
|
486
|
+
declare const migrationListResultSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
487
|
+
ok: true;
|
|
488
|
+
summary: string;
|
|
489
|
+
spaces: {
|
|
490
|
+
space: string;
|
|
491
|
+
migrations: {
|
|
492
|
+
name: string;
|
|
493
|
+
hash: string;
|
|
494
|
+
fromContract: string | null;
|
|
495
|
+
toContract: string;
|
|
496
|
+
operationCount: number;
|
|
497
|
+
createdAt: string;
|
|
498
|
+
refs: string[];
|
|
499
|
+
providedInvariants: string[];
|
|
500
|
+
}[];
|
|
501
|
+
}[];
|
|
502
|
+
}, {}>;
|
|
503
|
+
type MigrationListResult = typeof migrationListResultSchema.infer;
|
|
504
|
+
declare const migrationSpaceGraphEntrySchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
505
|
+
space: string;
|
|
506
|
+
contracts: {
|
|
507
|
+
hash: string;
|
|
508
|
+
refs: string[];
|
|
509
|
+
}[];
|
|
510
|
+
migrations: {
|
|
511
|
+
name: string;
|
|
512
|
+
hash: string;
|
|
513
|
+
fromContract: string | null;
|
|
514
|
+
toContract: string;
|
|
515
|
+
}[];
|
|
516
|
+
}, {}>;
|
|
517
|
+
type MigrationSpaceGraphEntry = typeof migrationSpaceGraphEntrySchema.infer;
|
|
518
|
+
declare const migrationCheckResultSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
519
|
+
ok: boolean;
|
|
520
|
+
failures: {
|
|
521
|
+
space: string;
|
|
522
|
+
code: string;
|
|
523
|
+
where: string;
|
|
524
|
+
why: string;
|
|
525
|
+
nextActions: {
|
|
526
|
+
kind: "run-command" | "open-url" | "user-choice" | "edit-file" | "done";
|
|
527
|
+
label: string;
|
|
528
|
+
command?: string;
|
|
529
|
+
url?: string;
|
|
530
|
+
reason?: string;
|
|
531
|
+
}[];
|
|
532
|
+
}[];
|
|
533
|
+
summary: string;
|
|
534
|
+
}, {}>;
|
|
535
|
+
type MigrationCheckResult = typeof migrationCheckResultSchema.infer;
|
|
536
|
+
//#endregion
|
|
344
537
|
//#region src/control-api/operations/migration-check.d.ts
|
|
345
538
|
/**
|
|
346
539
|
* One contract space's on-disk state, resolved for the explicit graph
|
|
@@ -479,7 +672,7 @@ interface RunMigrationListInputs {
|
|
|
479
672
|
declare function runMigrationList(inputs: RunMigrationListInputs): Result<MigrationListResult, CliStructuredError$2>;
|
|
480
673
|
//#endregion
|
|
481
674
|
//#region src/control-api/operations/migration-new.d.ts
|
|
482
|
-
interface MigrationNewOptions
|
|
675
|
+
interface MigrationNewOptions {
|
|
483
676
|
readonly config: PrismaNextConfig;
|
|
484
677
|
/** Directory the command was invoked from. */
|
|
485
678
|
readonly cwd: string;
|
|
@@ -497,6 +690,89 @@ interface MigrationNewResult {
|
|
|
497
690
|
}
|
|
498
691
|
declare function executeMigrationNewCommand(options: MigrationNewOptions): Promise<Result<MigrationNewResult, CliStructuredError$2>>;
|
|
499
692
|
//#endregion
|
|
693
|
+
//#region src/control-api/operations/migration-plan.d.ts
|
|
694
|
+
interface MigrationPlanOptions {
|
|
695
|
+
readonly config: PrismaNextConfig;
|
|
696
|
+
/** Directory the command was invoked from. */
|
|
697
|
+
readonly cwd: string;
|
|
698
|
+
/** `--config` as the user wrote it, used only to locate project paths and for display. */
|
|
699
|
+
readonly configPath?: string;
|
|
700
|
+
readonly name?: string;
|
|
701
|
+
readonly from?: string;
|
|
702
|
+
readonly to?: string;
|
|
703
|
+
}
|
|
704
|
+
interface MigrationPlanResult {
|
|
705
|
+
readonly ok: boolean;
|
|
706
|
+
readonly noOp: boolean;
|
|
707
|
+
readonly from: string | null;
|
|
708
|
+
readonly to: string;
|
|
709
|
+
readonly dir?: string;
|
|
710
|
+
readonly baselineDir?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Extension-space migration packages materialised onto disk during this
|
|
713
|
+
* `plan` run. Each entry names a `migrations/<spaceId>/<dirName>/`
|
|
714
|
+
* tree the framework wrote alongside the app-space migration directory.
|
|
715
|
+
* Empty when the project has no extension packs declaring a contract
|
|
716
|
+
* space, or when every extension-space package is already on disk.
|
|
717
|
+
*
|
|
718
|
+
* Surfacing these in the result (rather than only via `ui.step` log
|
|
719
|
+
* lines) makes the cross-space side effect explicit to JSON consumers
|
|
720
|
+
* and the success-summary renderer — the same cross-space side effect
|
|
721
|
+
* that `migrate` will replay.
|
|
722
|
+
*/
|
|
723
|
+
readonly emittedExtensionDirs: readonly {
|
|
724
|
+
readonly spaceId: string;
|
|
725
|
+
readonly dirName: string;
|
|
726
|
+
}[];
|
|
727
|
+
readonly operations: readonly {
|
|
728
|
+
readonly id: string;
|
|
729
|
+
readonly label: string;
|
|
730
|
+
readonly operationClass: string;
|
|
731
|
+
}[];
|
|
732
|
+
/**
|
|
733
|
+
* Family-agnostic textual preview of the migration plan operations.
|
|
734
|
+
* Replaces the previous `sql?: readonly string[]` field; consumers should
|
|
735
|
+
* read `result.preview?.statements`.
|
|
736
|
+
*/
|
|
737
|
+
readonly preview?: OperationPreview;
|
|
738
|
+
readonly summary: string;
|
|
739
|
+
/**
|
|
740
|
+
* When true, `migration.ts` was written but contains unfilled
|
|
741
|
+
* `placeholder(...)` calls. The user must edit the file and then run
|
|
742
|
+
* `node migration.ts` to self-emit `ops.json` / `migration.json`.
|
|
743
|
+
*/
|
|
744
|
+
readonly pendingPlaceholders?: boolean;
|
|
745
|
+
/**
|
|
746
|
+
* True when no `--from` was given and no `db` ref existed, so the origin
|
|
747
|
+
* defaulted to the empty contract. Absent when the user named the origin.
|
|
748
|
+
*/
|
|
749
|
+
readonly fromDefaulted?: boolean;
|
|
750
|
+
readonly timings: {
|
|
751
|
+
readonly total: number;
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
declare function executeMigrationPlanCommand(options: MigrationPlanOptions, startTime: number, callbacks?: {
|
|
755
|
+
readonly onContextResolved?: (ctx: {
|
|
756
|
+
readonly configPath: string;
|
|
757
|
+
readonly contractPath: string;
|
|
758
|
+
readonly appMigrationsRelative: string;
|
|
759
|
+
}) => void;
|
|
760
|
+
readonly onSeeded?: (record: ContractSpaceSeedPhaseRecord) => void;
|
|
761
|
+
}): Promise<Result<MigrationPlanResult, CliStructuredError$2>>;
|
|
762
|
+
//#endregion
|
|
763
|
+
//#region src/utils/formatters/migration-graph-labels.d.ts
|
|
764
|
+
interface MigrationEdgeAnnotation {
|
|
765
|
+
readonly status?: 'applied' | 'pending';
|
|
766
|
+
readonly operationCount?: number;
|
|
767
|
+
readonly invariants?: readonly string[];
|
|
768
|
+
/**
|
|
769
|
+
* Path-highlight annotation for `migrate --show` preview.
|
|
770
|
+
* - `'on-path'`: migration is on the chosen path; rendered in bright green.
|
|
771
|
+
* - `'off-path'`: migration is off the chosen path; fully drawn but dim grey.
|
|
772
|
+
*/
|
|
773
|
+
readonly pathHighlight?: 'on-path' | 'off-path';
|
|
774
|
+
}
|
|
775
|
+
//#endregion
|
|
500
776
|
//#region src/control-api/operations/migration-status-overlay.d.ts
|
|
501
777
|
/** Origin hash for status path computation: the live/override marker, or the empty-contract sentinel. */
|
|
502
778
|
declare function originHashForStatus(markerHash: string | undefined): string;
|
|
@@ -518,6 +794,7 @@ type FromResolution = {
|
|
|
518
794
|
kind: 'greenfield';
|
|
519
795
|
fromHash: null;
|
|
520
796
|
fromContract: null;
|
|
797
|
+
defaulted: boolean;
|
|
521
798
|
} | {
|
|
522
799
|
kind: 'graph-node';
|
|
523
800
|
fromHash: string;
|
|
@@ -628,7 +905,10 @@ interface ResolveRefAdvancementFieldsOptions {
|
|
|
628
905
|
* MigrationToolsError mapped, other errors rethrown.
|
|
629
906
|
*/
|
|
630
907
|
declare function resolveRefAdvancementFields(options: ResolveRefAdvancementFieldsOptions): Promise<Result<RefAdvancementFields, CliStructuredError$2>>;
|
|
631
|
-
/**
|
|
908
|
+
/**
|
|
909
|
+
* The --advance-ref tail of migrate and db sign: executeRefAdvancement with
|
|
910
|
+
* MigrationToolsError failures passed through as notOk, others rethrown.
|
|
911
|
+
*/
|
|
632
912
|
declare function advanceRefSafely(args: {
|
|
633
913
|
readonly refsDir: string;
|
|
634
914
|
readonly migrationsDir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli__control-api.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/
|
|
1
|
+
{"version":3,"file":"cli__control-api.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/control-api.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBiB,oBAAoB,SAAS,uBAAuB;;;;;;iBAMpD,eAAe,IAAI,UAAU,YAAY,cAAc,kDAAkD;;;;iBAIzG,wBAAwB,iBAAiB;;;iBAGzC,mBAAmB,gBAAgB;WACzC;IACP,cAAc;;;KAGb;WACM,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAsBP,oBAAoB,SAAS,qBAAqB,eAAe,2BAA2B,QAAQ;;;UAG3G;WACC,QAAQ;WACR;;WAEA;;WAEA;;;;;;;;;;KAUN,sCAAsC;WAChC;WACA;;WAEA;WACA;;UAED;WACC;WACA,cAAc;;WAEd;WACA;;iBAEM,6BAA6B,SAAS,sCAAsC,QAAQ,OAAO,qCAAqC;;;;;;;;;;;;;;;;iBAgBhI,uBAAuB,qBAAqB,sBA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AAO;WACP,MAAM;WACN;;iBAEM,mBAAmB,eAAe,SAAS,uBAAuB,OAAO,aAAa;iBACtF,oBAAoB,eAAe;WACzC,OAAO;WACP,MAAM;IACb,OAAO,cAAc;;;;iBAIR,kBAAkB,kBAAkB,QAAQ,OAAO,MAAM;;;iBAGzD,iBAAiB"}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { a as loadContractSpaceAggregateForCli, c as refuseDeclaredExtensionTargetMismatch, i as loadContractRawSafely, l as refusePackageCorruptionOnAggregate, n as buildContractSpaceAggregate, o as mapIntegrityViolations, r as buildReadAggregate, s as refuseContractSpaceIntegrity, t as appContractStandInFromIdentity } from "./contract-space-aggregate-loader-fa04OIaL-B7LXHle3.mjs";
|
|
4
|
-
import { i as executeDbVerify, n as executeDbInit, r as executeDbUpdate, t as createControlClient } from "./client-C6Qp5ujC-Dxb7r79B.mjs";
|
|
5
|
-
import { a as readContractIR, i as executeRefAdvancement, n as buildRefAdvancementFields, o as resolveRefAdvancementFields, r as computeRefAdvancementName, t as advanceRefSafely } from "./ref-advancement-DaZBzm7m-WoqnFAyr.mjs";
|
|
6
|
-
import { t as resolveContractRefToSnapshot } from "./contract-snapshot-resolution-De2VvOJn-DqIAV9cr.mjs";
|
|
7
|
-
import { t as mapCaughtMigrationError } from "./caught-errors-BZo7zcRc-C-pIEasG.mjs";
|
|
8
|
-
import { t as mapContractAtError } from "./contract-at-errors-BSoDI0Hw-BXeUNE3s.mjs";
|
|
9
|
-
import { i as refuseUnknownInvariants, n as refuseMarkerOutsideGraph, r as refuseMissingInvariantPath, t as hasMigrationPath } from "./invariants-Bltd8DyA-Cg_1Lu0q.mjs";
|
|
10
|
-
import { t as executeMigrateShowPlan } from "./migrate-show-C_9xR4Qt-B-Y0PGKw.mjs";
|
|
11
|
-
import { n as resolveMigrationRef, t as resolveContractRef } from "./ref-resolution-BSN1amKm-C6-TTM2N.mjs";
|
|
12
|
-
import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList, t as listRefsByContractHash } from "./migration-list-CY08bD8I-PoXuv94c.mjs";
|
|
13
|
-
import { i as runMigrationCheck, n as enumerateCheckSpaces, r as loadAggregateIntegrityViolations, t as checkSingleTarget } from "./migration-check-Bbdw7t-r-C2VTMK61.mjs";
|
|
14
|
-
import { t as buildMigrationSpaceGraphEntries } from "./migration-graph-B8WxW_tm-qGNf7jQh.mjs";
|
|
15
|
-
import { t as executeMigrationNewCommand } from "./migration-new-DXMvJdbB-BkrpDfcr.mjs";
|
|
16
|
-
import { i as runContractSpaceSeedPhase, n as resolveFromForPlan, r as resolveToForPlan, t as executeMigrationPlanCommand } from "./migration-plan-Cfz0efEL-DMNFq5b2.mjs";
|
|
17
|
-
import { a as statusForMigrationHash, i as readMigrationRefs, n as deriveStatusEdgeAnnotations, r as originHashForStatus, t as appliedHashesFromLedger } from "./refs-fQLFcMoq-aTBeUU9H.mjs";
|
|
18
|
-
import { n as executeRefListCommand, r as executeRefSetCommand, t as executeRefDeleteCommand } from "./ref-WXLIR9Xm-12IUtoBU.mjs";
|
|
19
|
-
export { advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, executeContractEmit, executeDbInit, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSpaceAggregateForCli, mapCaughtMigrationError, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, originHashForStatus, readContractIR, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveRefAdvancementFields, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
|
|
1
|
+
import { $ as loadAggregateIntegrityViolations, At as runMigrationList, B as executeDbInit, Ct as resolveFromForPlan, Et as resolveToForPlan, G as executeMigrationPlanCommand, H as executeDbVerify, J as executeRefListCommand, K as executeRefAdvancement, Mt as statusForMigrationHash, Ot as runContractSpaceSeedPhase, Q as listRefsByContractHash, St as resolveContractRefToSnapshot, Tt as resolveRefAdvancementFields, U as executeMigrateShowPlan, V as executeDbUpdate, W as executeMigrationNewCommand, Y as executeRefSetCommand, Z as hasMigrationPath, _ as enumerateCheckSpaces, _t as refusePackageCorruptionOnAggregate, a as buildContractSpaceAggregate, at as mapIntegrityViolations, c as buildRefAdvancementFields, ct as originHashForStatus, dt as readContractIR, et as loadContractRawSafely, f as computeRefAdvancementName, ft as readMigrationRefs, g as enrichContract, gt as refuseMissingInvariantPath, h as disposeEmitQueue, ht as refuseMarkerOutsideGraph, i as appliedHashesFromLedger, it as mapContractAtError, kt as runMigrationCheck, l as checkSingleTarget, m as deriveStatusEdgeAnnotations, mt as refuseDeclaredExtensionTargetMismatch, n as advanceRefSafely, o as buildMigrationSpaceGraphEntries, p as createControlClient, pt as refuseContractSpaceIntegrity, q as executeRefDeleteCommand, r as appContractStandInFromIdentity, rt as mapCaughtMigrationError, s as buildReadAggregate, st as migrationSpaceListEntriesFromAggregate, tt as loadContractSpaceAggregateForCli, vt as refuseUnknownInvariants, wt as resolveMigrationRef, xt as resolveContractRef$1, z as executeContractEmit } from "./ref-DcqFmceq-QaUjgZeM.mjs";
|
|
2
|
+
export { advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, executeContractEmit, executeDbInit, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSpaceAggregateForCli, mapCaughtMigrationError, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, originHashForStatus, readContractIR, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef$1 as resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveRefAdvancementFields, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as EmitResult, E as ExecuteDbVerifyResult, _ as DbUpdateResult, a as ControlClient, f as DbInitResult
|
|
1
|
+
import { C as EmitResult, E as ExecuteDbVerifyResult, O as MigrateResult, _ as DbUpdateResult, a as ControlClient, f as DbInitResult } from "./db-verify-Yih5kWtB-B1kv76ec.mjs";
|
|
2
2
|
import { CoreSchemaView, OperationPreview, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
3
3
|
import { ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { AuthoringPslBlockDescriptorNamespace } from "@prisma/orm-framework/components/authoring";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli__control-api__testing.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/control-api-testing.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/errors/control\";\nimport { ok } from \"@internal/utils/result\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\n//#region src/control-api/testing/fixture-client.ts\nconst FIXTURE_STORAGE_HASH = \"7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26\";\nconst FIXTURE_PROFILE_HASH = \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\";\nconst FIXTURE_MIGRATION_HASH = \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\";\nconst FIXTURE_TIMESTAMP = \"2026-01-01T00:00:00.000Z\";\n/** Target id the default fixtures report; overridable per test. */\nconst FIXTURE_TARGET_ID = \"fixture-target\";\n/** Family id the default fixtures report in emitted contract payloads. */\nconst FIXTURE_FAMILY_ID = \"fixture-family\";\nconst fixtureOperation = {\n\tid: \"op-1\",\n\tlabel: \"create User\",\n\toperationClass: \"additive\"\n};\nfunction fixtureMarker() {\n\treturn {\n\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\tprofileHash: FIXTURE_PROFILE_HASH,\n\t\tcontractJson: null,\n\t\tcanonicalVersion: 1,\n\t\tupdatedAt: /* @__PURE__ */ new Date(FIXTURE_TIMESTAMP),\n\t\tappTag: null,\n\t\tmeta: {},\n\t\tinvariants: []\n\t};\n}\n/**\n* Target-neutral defaults for every operation: a healthy database whose\n* marker, ledger, and schema all match the fixture contract.\n*/\nfunction defaultControlClientFixtures() {\n\tconst contract = {\n\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\tprofileHash: FIXTURE_PROFILE_HASH\n\t};\n\tconst target = {\n\t\texpected: FIXTURE_TARGET_ID,\n\t\tactual: FIXTURE_TARGET_ID\n\t};\n\tconst schemaVerify = {\n\t\tok: true,\n\t\tsummary: \"Schema satisfies contract\",\n\t\tcontract,\n\t\ttarget,\n\t\tschema: { issues: [] },\n\t\ttimings: { total: 5 }\n\t};\n\tconst applySuccess = {\n\t\tmode: \"apply\",\n\t\tplan: { operations: [fixtureOperation] },\n\t\tdestination: contract,\n\t\texecution: {\n\t\t\toperationsPlanned: 1,\n\t\t\toperationsExecuted: 1\n\t\t},\n\t\tmarker: contract,\n\t\tperSpace: [{\n\t\t\tspaceId: APP_SPACE_ID,\n\t\t\tkind: \"app\",\n\t\t\toperations: [fixtureOperation],\n\t\t\tmarker: { storageHash: FIXTURE_STORAGE_HASH }\n\t\t}],\n\t\tsummary: \"Applied 1 operation\"\n\t};\n\treturn {\n\t\tverify: {\n\t\t\tok: true,\n\t\t\tsummary: \"Database matches contract\",\n\t\t\tcontract,\n\t\t\tmarker: contract,\n\t\t\ttarget,\n\t\t\ttimings: { total: 5 }\n\t\t},\n\t\tschemaVerify,\n\t\tsign: {\n\t\t\tok: true,\n\t\t\tsummary: \"Signature written\",\n\t\t\tcontract,\n\t\t\ttarget,\n\t\t\tmarker: {\n\t\t\t\tcreated: true,\n\t\t\t\tupdated: false\n\t\t\t},\n\t\t\ttimings: { total: 5 }\n\t\t},\n\t\tdbInit: ok(applySuccess),\n\t\tdbUpdate: ok(applySuccess),\n\t\tdbVerify: ok({\n\t\t\tschemaResults: /* @__PURE__ */ new Map([[APP_SPACE_ID, schemaVerify]]),\n\t\t\tunclaimed: [],\n\t\t\tspaceOrder: [APP_SPACE_ID],\n\t\t\tappSpaceId: APP_SPACE_ID,\n\t\t\tmarkerDrift: null\n\t\t}),\n\t\treadMarker: fixtureMarker(),\n\t\treadAllMarkers: /* @__PURE__ */ new Map([[APP_SPACE_ID, fixtureMarker()]]),\n\t\treadLedger: [{\n\t\t\tspace: APP_SPACE_ID,\n\t\t\tmigrationName: \"20260101000000_init\",\n\t\t\tmigrationHash: FIXTURE_MIGRATION_HASH,\n\t\t\tfrom: null,\n\t\t\tto: FIXTURE_STORAGE_HASH,\n\t\t\tappliedAt: /* @__PURE__ */ new Date(FIXTURE_TIMESTAMP),\n\t\t\toperationCount: 1\n\t\t}],\n\t\tmigrate: ok({\n\t\t\tmigrationsApplied: 1,\n\t\t\tmarkerHash: FIXTURE_STORAGE_HASH,\n\t\t\tapplied: [{\n\t\t\t\tspaceId: APP_SPACE_ID,\n\t\t\t\tdirName: \"20260101000000_init\",\n\t\t\t\tmigrationHash: FIXTURE_MIGRATION_HASH,\n\t\t\t\tfrom: FIXTURE_PROFILE_HASH,\n\t\t\t\tto: FIXTURE_STORAGE_HASH,\n\t\t\t\toperationsExecuted: 1\n\t\t\t}],\n\t\t\tsummary: \"Applied 1 migration\",\n\t\t\tperSpace: [{\n\t\t\t\tspaceId: APP_SPACE_ID,\n\t\t\t\tkind: \"app\",\n\t\t\t\toperations: [fixtureOperation],\n\t\t\t\tmarker: { storageHash: FIXTURE_STORAGE_HASH }\n\t\t\t}]\n\t\t}),\n\t\tintrospect: {},\n\t\ttoSchemaView: void 0,\n\t\tinferPslContract: void 0,\n\t\tgetPslBlockDescriptors: {},\n\t\ttoOperationPreview: void 0,\n\t\temit: ok({\n\t\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\t\tprofileHash: FIXTURE_PROFILE_HASH,\n\t\t\tcontractJson: `{\"targetFamily\":\"${FIXTURE_FAMILY_ID}\"}`,\n\t\t\tcontractDts: `export type Contract = { targetFamily: \"${FIXTURE_FAMILY_ID}\" };`\n\t\t})\n\t};\n}\nvar FixtureControlClientImpl = class {\n\tcalls = [];\n\tconnected = false;\n\tinitialized = false;\n\tfixtures;\n\tconstructor(overrides) {\n\t\tthis.fixtures = {\n\t\t\t...defaultControlClientFixtures(),\n\t\t\t...overrides\n\t\t};\n\t}\n\trecord(operation, options, value) {\n\t\tthis.init();\n\t\tthis.calls.push({\n\t\t\toperation,\n\t\t\toptions\n\t\t});\n\t\treturn value;\n\t}\n\t/**\n\t* Records an operation the real client runs against a driver, so a caller\n\t* that skipped `connect()` fails here exactly as it would in production.\n\t*/\n\trecordConnected(operation, options, value) {\n\t\tconst supplied = typeof options === \"object\" && options !== null ? Reflect.get(options, \"connection\") : void 0;\n\t\tif (supplied !== void 0) this.markConnected(supplied);\n\t\tif (!this.connected) throw new CliStructuredError(\"DRIVER.NOT_CONNECTED\", \"Not connected. Call connect(connection) first.\");\n\t\treturn this.record(operation, options, value);\n\t}\n\tinit() {\n\t\tif (this.initialized) return;\n\t\tthis.initialized = true;\n\t\tthis.calls.push({\n\t\t\toperation: \"init\",\n\t\t\toptions: void 0\n\t\t});\n\t}\n\tmarkConnected(connection) {\n\t\tthis.init();\n\t\tthis.calls.push({\n\t\t\toperation: \"connect\",\n\t\t\toptions: connection\n\t\t});\n\t\tthis.connected = true;\n\t}\n\tasync connect(connection) {\n\t\tthis.markConnected(connection);\n\t}\n\tasync close() {\n\t\tthis.calls.push({\n\t\t\toperation: \"close\",\n\t\t\toptions: void 0\n\t\t});\n\t\tthis.connected = false;\n\t}\n\tasync verify(options) {\n\t\treturn this.recordConnected(\"verify\", options, this.fixtures.verify);\n\t}\n\tasync schemaVerify(options) {\n\t\treturn this.recordConnected(\"schemaVerify\", options, this.fixtures.schemaVerify);\n\t}\n\tasync sign(options) {\n\t\treturn this.recordConnected(\"sign\", options, this.fixtures.sign);\n\t}\n\tasync dbInit(options) {\n\t\treturn this.recordConnected(\"dbInit\", options, this.fixtures.dbInit);\n\t}\n\tasync dbUpdate(options) {\n\t\treturn this.recordConnected(\"dbUpdate\", options, this.fixtures.dbUpdate);\n\t}\n\tasync dbVerify(options) {\n\t\treturn this.recordConnected(\"dbVerify\", options, this.fixtures.dbVerify);\n\t}\n\tasync readMarker() {\n\t\treturn this.recordConnected(\"readMarker\", void 0, this.fixtures.readMarker);\n\t}\n\tasync readAllMarkers() {\n\t\treturn this.recordConnected(\"readAllMarkers\", void 0, this.fixtures.readAllMarkers);\n\t}\n\tasync readLedger(space) {\n\t\treturn this.recordConnected(\"readLedger\", space, this.fixtures.readLedger);\n\t}\n\tasync migrate(options) {\n\t\treturn this.recordConnected(\"migrate\", options, this.fixtures.migrate);\n\t}\n\tasync introspect(options) {\n\t\treturn this.recordConnected(\"introspect\", options, this.fixtures.introspect);\n\t}\n\ttoSchemaView(schemaIR) {\n\t\treturn this.record(\"toSchemaView\", schemaIR, this.fixtures.toSchemaView);\n\t}\n\tinferPslContract(schemaIR) {\n\t\treturn this.record(\"inferPslContract\", schemaIR, this.fixtures.inferPslContract);\n\t}\n\tgetPslBlockDescriptors() {\n\t\treturn this.record(\"getPslBlockDescriptors\", void 0, this.fixtures.getPslBlockDescriptors);\n\t}\n\ttoOperationPreview(operations) {\n\t\treturn this.record(\"toOperationPreview\", operations, this.fixtures.toOperationPreview);\n\t}\n\tasync emit(options) {\n\t\treturn this.record(\"emit\", options, this.fixtures.emit);\n\t}\n};\n/**\n* Creates a fixture-backed {@link ControlClient} double for host and product\n* tests: every operation resolves a realistic fixture payload without a\n* database or driver, and each fixture is overridable per test.\n*/\nfunction createFixtureControlClient(overrides) {\n\treturn new FixtureControlClientImpl(overrides);\n}\n//#endregion\nexport { FIXTURE_FAMILY_ID, FIXTURE_MIGRATION_HASH, FIXTURE_PROFILE_HASH, FIXTURE_STORAGE_HASH, FIXTURE_TARGET_ID, createFixtureControlClient, defaultControlClientFixtures };\n\n//# sourceMappingURL=control-api-testing.mjs.map"],"mappings":";;;;AAIA,MAAM,uBAAuB;AAC7B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB;;AAE1B,MAAM,oBAAoB;;AAE1B,MAAM,oBAAoB;AAC1B,MAAM,mBAAmB;CACxB,IAAI;CACJ,OAAO;CACP,gBAAgB;AACjB;AACA,SAAS,gBAAgB;CACxB,OAAO;EACN,aAAa;EACb,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,2BAA2B,IAAI,KAAK,iBAAiB;EACrD,QAAQ;EACR,MAAM,CAAC;EACP,YAAY,CAAC;CACd;AACD;;;;;AAKA,SAAS,+BAA+B;CACvC,MAAM,WAAW;EAChB,aAAa;EACb,aAAa;CACd;CACA,MAAM,SAAS;EACd,UAAU;EACV,QAAQ;CACT;CACA,MAAM,eAAe;EACpB,IAAI;EACJ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AAY,KAAK,SAAS,kBAAkB;CACtF;CACA,MAAM,KAAK,SAAS;EACnB,OAAO,KAAK,OAAO,QAAQ,SAAS,KAAK,SAAS,IAAI;CACvD;AACD;;;;;;AAMA,SAAS,2BAA2B,WAAW;CAC9C,OAAO,IAAI,yBAAyB,SAAS;AAC9C"}
|
|
1
|
+
{"version":3,"file":"cli__control-api__testing.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/control-api-testing.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/errors/control\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { ok } from \"@internal/utils/result\";\n//#region src/control-api/testing/fixture-client.ts\nconst FIXTURE_STORAGE_HASH = \"7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26\";\nconst FIXTURE_PROFILE_HASH = \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\";\nconst FIXTURE_MIGRATION_HASH = \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\";\nconst FIXTURE_TIMESTAMP = \"2026-01-01T00:00:00.000Z\";\n/** Target id the default fixtures report; overridable per test. */\nconst FIXTURE_TARGET_ID = \"fixture-target\";\n/** Family id the default fixtures report in emitted contract payloads. */\nconst FIXTURE_FAMILY_ID = \"fixture-family\";\nconst fixtureOperation = {\n\tid: \"op-1\",\n\tlabel: \"create User\",\n\toperationClass: \"additive\"\n};\nfunction fixtureMarker() {\n\treturn {\n\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\tprofileHash: FIXTURE_PROFILE_HASH,\n\t\tcontractJson: null,\n\t\tcanonicalVersion: 1,\n\t\tupdatedAt: /* @__PURE__ */ new Date(FIXTURE_TIMESTAMP),\n\t\tappTag: null,\n\t\tmeta: {},\n\t\tinvariants: []\n\t};\n}\n/**\n* Target-neutral defaults for every operation: a healthy database whose\n* marker, ledger, and schema all match the fixture contract.\n*/\nfunction defaultControlClientFixtures() {\n\tconst contract = {\n\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\tprofileHash: FIXTURE_PROFILE_HASH\n\t};\n\tconst target = {\n\t\texpected: FIXTURE_TARGET_ID,\n\t\tactual: FIXTURE_TARGET_ID\n\t};\n\tconst schemaVerify = {\n\t\tok: true,\n\t\tsummary: \"Schema satisfies contract\",\n\t\tcontract,\n\t\ttarget,\n\t\tschema: { issues: [] },\n\t\ttimings: { total: 5 }\n\t};\n\tconst applySuccess = {\n\t\tmode: \"apply\",\n\t\tplan: { operations: [fixtureOperation] },\n\t\tdestination: contract,\n\t\texecution: {\n\t\t\toperationsPlanned: 1,\n\t\t\toperationsExecuted: 1\n\t\t},\n\t\tmarker: contract,\n\t\tperSpace: [{\n\t\t\tspaceId: APP_SPACE_ID,\n\t\t\tkind: \"app\",\n\t\t\toperations: [fixtureOperation],\n\t\t\tmarker: { storageHash: FIXTURE_STORAGE_HASH }\n\t\t}],\n\t\tsummary: \"Applied 1 operation\"\n\t};\n\treturn {\n\t\tverify: {\n\t\t\tok: true,\n\t\t\tsummary: \"Database matches contract\",\n\t\t\tcontract,\n\t\t\tmarker: contract,\n\t\t\ttarget,\n\t\t\ttimings: { total: 5 }\n\t\t},\n\t\tschemaVerify,\n\t\tsign: {\n\t\t\tok: true,\n\t\t\tsummary: \"Signature written\",\n\t\t\tcontract,\n\t\t\ttarget,\n\t\t\tmarker: {\n\t\t\t\tcreated: true,\n\t\t\t\tupdated: false\n\t\t\t},\n\t\t\ttimings: { total: 5 }\n\t\t},\n\t\tdbInit: ok(applySuccess),\n\t\tdbUpdate: ok(applySuccess),\n\t\tdbVerify: ok({\n\t\t\tschemaResults: /* @__PURE__ */ new Map([[APP_SPACE_ID, schemaVerify]]),\n\t\t\tunclaimed: [],\n\t\t\tspaceOrder: [APP_SPACE_ID],\n\t\t\tappSpaceId: APP_SPACE_ID,\n\t\t\tmarkerDrift: null\n\t\t}),\n\t\treadMarker: fixtureMarker(),\n\t\treadAllMarkers: /* @__PURE__ */ new Map([[APP_SPACE_ID, fixtureMarker()]]),\n\t\treadLedger: [{\n\t\t\tspace: APP_SPACE_ID,\n\t\t\tmigrationName: \"20260101000000_init\",\n\t\t\tmigrationHash: FIXTURE_MIGRATION_HASH,\n\t\t\tfrom: null,\n\t\t\tto: FIXTURE_STORAGE_HASH,\n\t\t\tappliedAt: /* @__PURE__ */ new Date(FIXTURE_TIMESTAMP),\n\t\t\toperationCount: 1\n\t\t}],\n\t\tmigrate: ok({\n\t\t\tmigrationsApplied: 1,\n\t\t\tmarkerHash: FIXTURE_STORAGE_HASH,\n\t\t\tapplied: [{\n\t\t\t\tspaceId: APP_SPACE_ID,\n\t\t\t\tdirName: \"20260101000000_init\",\n\t\t\t\tmigrationHash: FIXTURE_MIGRATION_HASH,\n\t\t\t\tfrom: FIXTURE_PROFILE_HASH,\n\t\t\t\tto: FIXTURE_STORAGE_HASH,\n\t\t\t\toperationsExecuted: 1\n\t\t\t}],\n\t\t\tsummary: \"Applied 1 migration\",\n\t\t\tperSpace: [{\n\t\t\t\tspaceId: APP_SPACE_ID,\n\t\t\t\tkind: \"app\",\n\t\t\t\toperations: [fixtureOperation],\n\t\t\t\tmarker: { storageHash: FIXTURE_STORAGE_HASH }\n\t\t\t}]\n\t\t}),\n\t\tintrospect: {},\n\t\ttoSchemaView: void 0,\n\t\tinferPslContract: void 0,\n\t\tgetPslBlockDescriptors: {},\n\t\ttoOperationPreview: void 0,\n\t\temit: ok({\n\t\t\tstorageHash: FIXTURE_STORAGE_HASH,\n\t\t\tprofileHash: FIXTURE_PROFILE_HASH,\n\t\t\tcontractJson: `{\"targetFamily\":\"${FIXTURE_FAMILY_ID}\"}`,\n\t\t\tcontractDts: `export type Contract = { targetFamily: \"${FIXTURE_FAMILY_ID}\" };`\n\t\t})\n\t};\n}\nvar FixtureControlClientImpl = class {\n\tcalls = [];\n\tconnected = false;\n\tinitialized = false;\n\tfixtures;\n\tconstructor(overrides) {\n\t\tthis.fixtures = {\n\t\t\t...defaultControlClientFixtures(),\n\t\t\t...overrides\n\t\t};\n\t}\n\trecord(operation, options, value) {\n\t\tthis.init();\n\t\tthis.calls.push({\n\t\t\toperation,\n\t\t\toptions\n\t\t});\n\t\treturn value;\n\t}\n\t/**\n\t* Records an operation the real client runs against a driver, so a caller\n\t* that skipped `connect()` fails here exactly as it would in production.\n\t*/\n\trecordConnected(operation, options, value) {\n\t\tconst supplied = typeof options === \"object\" && options !== null ? Reflect.get(options, \"connection\") : void 0;\n\t\tif (supplied !== void 0) this.markConnected(supplied);\n\t\tif (!this.connected) throw new CliStructuredError(\"DRIVER.NOT_CONNECTED\", \"Not connected. Call connect(connection) first.\");\n\t\treturn this.record(operation, options, value);\n\t}\n\tinit() {\n\t\tif (this.initialized) return;\n\t\tthis.initialized = true;\n\t\tthis.calls.push({\n\t\t\toperation: \"init\",\n\t\t\toptions: void 0\n\t\t});\n\t}\n\tmarkConnected(connection) {\n\t\tthis.init();\n\t\tthis.calls.push({\n\t\t\toperation: \"connect\",\n\t\t\toptions: connection\n\t\t});\n\t\tthis.connected = true;\n\t}\n\tasync connect(connection) {\n\t\tthis.markConnected(connection);\n\t}\n\tasync close() {\n\t\tthis.calls.push({\n\t\t\toperation: \"close\",\n\t\t\toptions: void 0\n\t\t});\n\t\tthis.connected = false;\n\t}\n\tasync verify(options) {\n\t\treturn this.recordConnected(\"verify\", options, this.fixtures.verify);\n\t}\n\tasync schemaVerify(options) {\n\t\treturn this.recordConnected(\"schemaVerify\", options, this.fixtures.schemaVerify);\n\t}\n\tasync sign(options) {\n\t\treturn this.recordConnected(\"sign\", options, this.fixtures.sign);\n\t}\n\tasync dbInit(options) {\n\t\treturn this.recordConnected(\"dbInit\", options, this.fixtures.dbInit);\n\t}\n\tasync dbUpdate(options) {\n\t\treturn this.recordConnected(\"dbUpdate\", options, this.fixtures.dbUpdate);\n\t}\n\tasync dbVerify(options) {\n\t\treturn this.recordConnected(\"dbVerify\", options, this.fixtures.dbVerify);\n\t}\n\tasync readMarker() {\n\t\treturn this.recordConnected(\"readMarker\", void 0, this.fixtures.readMarker);\n\t}\n\tasync readAllMarkers() {\n\t\treturn this.recordConnected(\"readAllMarkers\", void 0, this.fixtures.readAllMarkers);\n\t}\n\tasync readLedger(space) {\n\t\treturn this.recordConnected(\"readLedger\", space, this.fixtures.readLedger);\n\t}\n\tasync migrate(options) {\n\t\treturn this.recordConnected(\"migrate\", options, this.fixtures.migrate);\n\t}\n\tasync introspect(options) {\n\t\treturn this.recordConnected(\"introspect\", options, this.fixtures.introspect);\n\t}\n\ttoSchemaView(schemaIR) {\n\t\treturn this.record(\"toSchemaView\", schemaIR, this.fixtures.toSchemaView);\n\t}\n\tinferPslContract(schemaIR) {\n\t\treturn this.record(\"inferPslContract\", schemaIR, this.fixtures.inferPslContract);\n\t}\n\tgetPslBlockDescriptors() {\n\t\treturn this.record(\"getPslBlockDescriptors\", void 0, this.fixtures.getPslBlockDescriptors);\n\t}\n\ttoOperationPreview(operations) {\n\t\treturn this.record(\"toOperationPreview\", operations, this.fixtures.toOperationPreview);\n\t}\n\tasync emit(options) {\n\t\treturn this.record(\"emit\", options, this.fixtures.emit);\n\t}\n};\n/**\n* Creates a fixture-backed {@link ControlClient} double for host and product\n* tests: every operation resolves a realistic fixture payload without a\n* database or driver, and each fixture is overridable per test.\n*/\nfunction createFixtureControlClient(overrides) {\n\treturn new FixtureControlClientImpl(overrides);\n}\n//#endregion\nexport { FIXTURE_FAMILY_ID, FIXTURE_MIGRATION_HASH, FIXTURE_PROFILE_HASH, FIXTURE_STORAGE_HASH, FIXTURE_TARGET_ID, createFixtureControlClient, defaultControlClientFixtures };\n\n//# sourceMappingURL=control-api-testing.mjs.map"],"mappings":";;;;AAIA,MAAM,uBAAuB;AAC7B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB;;AAE1B,MAAM,oBAAoB;;AAE1B,MAAM,oBAAoB;AAC1B,MAAM,mBAAmB;CACxB,IAAI;CACJ,OAAO;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,SAAS,KAAK,SAAS,UAAU;CAC5E;CACA,aAAa,UAAU;EACtB,OAAO,KAAK,OAAO,gBAAgB,UAAU,KAAK,SAAS,YAAY;CACxE;CACA,iBAAiB,UAAU;EAC1B,OAAO,KAAK,OAAO,oBAAoB,UAAU,KAAK,SAAS,gBAAgB;CAChF;CACA,yBAAyB;EACxB,OAAO,KAAK,OAAO,0BAA0B,KAAK,GAAG,KAAK,SAAS,sBAAsB;CAC1F;CACA,mBAAmB,YAAY;EAC9B,OAAO,KAAK,OAAO,sBAAsB,YAAY,KAAK,SAAS,kBAAkB;CACtF;CACA,MAAM,KAAK,SAAS;EACnB,OAAO,KAAK,OAAO,QAAQ,SAAS,KAAK,SAAS,IAAI;CACvD;AACD;;;;;;AAMA,SAAS,2BAA2B,WAAW;CAC9C,OAAO,IAAI,yBAAyB,SAAS;AAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli__init-output.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/init-output.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli__init-output.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/init-output.d.mts"],"mappings":";;;;;;;;;;;;;;;;cAec,gEAAgE;EAC5E;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;;EAEF;EACA;EACA;;KAEG,oBAAoB,iBAAiB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InitOutputSchema } from "./output-
|
|
1
|
+
import { t as InitOutputSchema } from "./output-D83nTTpC-XlvN30yS.mjs";
|
|
2
2
|
export { InitOutputSchema };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as buildMigrationArtifacts } from "./migration-
|
|
1
|
+
import { g as errorInvalidJson } from "./errors-SoLLYLtw-DMxVbVs9.mjs";
|
|
2
|
+
import { a as loadConfigForSections } from "./exports-BXXeNWlj.mjs";
|
|
3
|
+
import { r as buildMigrationArtifacts } from "./migration-B9w-7dKe.mjs";
|
|
4
|
+
import { readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
4
5
|
import { CliStructuredError, errorMigrationCliInvalidConfigArg, errorMigrationCliUnknownFlag } from "@prisma/orm-framework/errors/control";
|
|
6
|
+
import { createControlStack } from "@prisma/orm-framework/components/control";
|
|
5
7
|
import { errorMigrationTargetMismatch } from "@prisma/orm-framework/errors/migration";
|
|
6
8
|
import { dirname, join } from "pathe";
|
|
7
|
-
import { readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
8
|
-
import { createControlStack } from "@prisma/orm-framework/components/control";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { Cli, Command, Option, UsageError } from "clipanion";
|
|
11
11
|
//#region ../../../1-framework/3-tooling/cli/dist/migration-cli.mjs
|
|
@@ -14,10 +14,10 @@ import { Cli, Command, Option, UsageError } from "clipanion";
|
|
|
14
14
|
* `node migration.ts` directly.
|
|
15
15
|
*
|
|
16
16
|
* Naming: this is *not* a "migration runner" in the apply-time sense. The
|
|
17
|
-
* apply-time runner is the thing `prisma
|
|
17
|
+
* apply-time runner is the thing `prisma db migrate` uses to
|
|
18
18
|
* execute migration JSON ops against a database. `MigrationCLI` is the
|
|
19
19
|
* tiny CLI surface owned by an authored `migration.ts` file: parse the
|
|
20
|
-
* file's argv, load the project's `prisma
|
|
20
|
+
* file's argv, load the project's `prisma.config.ts`, assemble a
|
|
21
21
|
* `ControlStack`, instantiate the migration class, and serialize.
|
|
22
22
|
*
|
|
23
23
|
* The user authors a migration class, then calls
|
|
@@ -28,7 +28,7 @@ import { Cli, Command, Option, UsageError } from "clipanion";
|
|
|
28
28
|
* 1. Detects whether the file is the direct entrypoint (no-op when imported).
|
|
29
29
|
* 2. Parses CLI args (`--help`, `--dry-run`, `--config <path>`) via
|
|
30
30
|
* [clipanion](https://github.com/arcanis/clipanion).
|
|
31
|
-
* 3. Loads the project's `prisma
|
|
31
|
+
* 3. Loads the project's `prisma.config.ts` via the same
|
|
32
32
|
* `loadConfigForSections` the CLI commands use, walking up from the
|
|
33
33
|
* migration file's directory.
|
|
34
34
|
* 4. Probe-instantiates the migration class without a stack so it can read
|
|
@@ -79,7 +79,7 @@ var MigrationFileCommand = class extends Command {
|
|
|
79
79
|
static usage = Command.Usage({
|
|
80
80
|
description: "Self-emit ops.json and migration.json from a class-flow migration",
|
|
81
81
|
details: `
|
|
82
|
-
Loads the project's prisma
|
|
82
|
+
Loads the project's prisma.config.ts, assembles a ControlStack
|
|
83
83
|
from the configured target/adapter/extensions, and serializes the
|
|
84
84
|
migration's operations + metadata next to this file.
|
|
85
85
|
`,
|
|
@@ -90,7 +90,7 @@ var MigrationFileCommand = class extends Command {
|
|
|
90
90
|
]
|
|
91
91
|
});
|
|
92
92
|
dryRun = Option.Boolean("--dry-run", false, { description: "Print operations to stdout without writing files" });
|
|
93
|
-
config = Option.String("--config", { description: "Path to prisma
|
|
93
|
+
config = Option.String("--config", { description: "Path to prisma.config.ts" });
|
|
94
94
|
/**
|
|
95
95
|
* Unused: orchestration runs inside `MigrationCLI.run` so error
|
|
96
96
|
* routing stays under our control (clipanion's `cli.run` writes
|