@prisma/orm-toolchain 8.0.0-rc.1-dev.45 → 8.0.0-rc.1-dev.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{aggregate-BBsCbXgJ.mjs → aggregate-CPZB020V.mjs} +9 -9
- package/dist/{aggregate-BBsCbXgJ.mjs.map → aggregate-CPZB020V.mjs.map} +1 -1
- package/dist/{aggregate-CA6bJ8UO.d.mts → aggregate-DLUJLq5Y.d.mts} +3 -3
- package/dist/{aggregate-CA6bJ8UO.d.mts.map → aggregate-DLUJLq5Y.d.mts.map} +1 -1
- package/dist/cli-telemetry.d.mts +19 -5
- package/dist/cli-telemetry.d.mts.map +1 -1
- package/dist/cli-telemetry.mjs +287 -8
- package/dist/cli-telemetry.mjs.map +1 -1
- package/dist/cli.d.mts +11 -13
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +5382 -1095
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +298 -27
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +2 -19
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/cli__control-api__testing.mjs.map +1 -1
- package/dist/cli__init-output.d.mts +0 -1
- package/dist/cli__init-output.d.mts.map +1 -1
- package/dist/cli__init-output.mjs +1 -1
- package/dist/cli__migration-cli.mjs +9 -9
- package/dist/cli__migration-cli.mjs.map +1 -1
- package/dist/config-loader.d.mts +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/{contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs → contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs} +4 -4
- package/dist/{contract-snapshot-store-B0G1Fw_F-C4JjmWEA.mjs.map → contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs.map} +1 -1
- package/dist/{cli-errors-iquUoY6O-BFboxglv.d.mts → db-verify-BwgNK50T-DGvKgFCK.d.mts} +81 -81
- package/dist/db-verify-BwgNK50T-DGvKgFCK.d.mts.map +1 -0
- package/dist/emitter.d.mts +1 -1
- package/dist/{errors-CXbGUWGu-BQi6YS-H.mjs → errors-CXbGUWGu-CstQHPh6.mjs} +2 -2
- package/dist/{errors-CXbGUWGu-BQi6YS-H.mjs.map → errors-CXbGUWGu-CstQHPh6.mjs.map} +1 -1
- package/dist/{errors-KWM8yBAL.d.mts → errors-D59OCpoI.d.mts} +2 -2
- package/dist/{errors-KWM8yBAL.d.mts.map → errors-D59OCpoI.d.mts.map} +1 -1
- package/dist/{exports-B3xY_FHp.mjs → exports-8ZUN43ve.mjs} +6 -6
- package/dist/exports-8ZUN43ve.mjs.map +1 -0
- package/dist/{exports-BZLNbtkY.mjs → exports-BZaG8_w_.mjs} +64 -36
- package/dist/exports-BZaG8_w_.mjs.map +1 -0
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs → graph-membership-BViWUMpP-C4lYYJdU.mjs} +2 -2
- package/dist/{graph-membership-BViWUMpP-Cgu4Z2ox.mjs.map → graph-membership-BViWUMpP-C4lYYJdU.mjs.map} +1 -1
- package/dist/{import-roots-NDOIEDVj.mjs → import-roots-CNFBPAT1.mjs} +10 -3
- package/dist/{import-roots-NDOIEDVj.mjs.map → import-roots-CNFBPAT1.mjs.map} +1 -1
- package/dist/{import-roots-B6CtsWXb.d.mts → import-roots-CfoYgejL.d.mts} +2 -2
- package/dist/{import-roots-B6CtsWXb.d.mts.map → import-roots-CfoYgejL.d.mts.map} +1 -1
- package/dist/{index-mCsi_ND5.d.mts → index-DRs7L6N0.d.mts} +11 -3
- package/dist/index-DRs7L6N0.d.mts.map +1 -0
- package/dist/{index-CnOyYxmv.d.mts → index-Dgwl8Tzs.d.mts} +2 -2
- package/dist/{index-CnOyYxmv.d.mts.map → index-Dgwl8Tzs.d.mts.map} +1 -1
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs → invariants-CTHy88OP-CYI2a8IO.mjs} +2 -2
- package/dist/{invariants-CTHy88OP-DJ-i5yTz.mjs.map → invariants-CTHy88OP-CYI2a8IO.mjs.map} +1 -1
- package/dist/{io-635GlNx1-D94PxRc-.mjs → io-635GlNx1-D3zrw2qu.mjs} +4 -4
- package/dist/{io-635GlNx1-D94PxRc-.mjs.map → io-635GlNx1-D3zrw2qu.mjs.map} +1 -1
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs → migration-graph-_SJImD5V-BURyY1KM.mjs} +2 -2
- package/dist/{migration-graph-_SJImD5V-D5RCc651.mjs.map → migration-graph-_SJImD5V-BURyY1KM.mjs.map} +1 -1
- package/dist/{migration-gubSSeMk.mjs → migration-hspPIEeV.mjs} +4 -4
- package/dist/{migration-gubSSeMk.mjs.map → migration-hspPIEeV.mjs.map} +1 -1
- package/dist/migration-tools.d.mts +4 -4
- package/dist/migration-tools.mjs +13 -13
- package/dist/migration-tools__aggregate.d.mts +1 -1
- package/dist/migration-tools__aggregate.mjs +1 -1
- package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
- package/dist/migration-tools__errors.d.mts +1 -1
- package/dist/migration-tools__errors.mjs +1 -1
- package/dist/migration-tools__invariants.mjs +1 -1
- package/dist/migration-tools__io.mjs +1 -1
- package/dist/migration-tools__migration-graph.mjs +2 -2
- package/dist/migration-tools__migration-ts.mjs +1 -1
- package/dist/migration-tools__migration.mjs +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/migration-tools__refs.mjs +1 -1
- package/dist/migration-tools__spaces.d.mts +2 -2
- package/dist/migration-tools__spaces.mjs +2 -2
- package/dist/{migration-ts-BoHxxGvi.mjs → migration-ts-DdVm0rws.mjs} +2 -2
- package/dist/{migration-ts-BoHxxGvi.mjs.map → migration-ts-DdVm0rws.mjs.map} +1 -1
- package/dist/{output-DP3woAjV-BxCr9nHA.mjs → output-CovTDY14-CUoAqLML.mjs} +3 -45
- package/dist/output-CovTDY14-CUoAqLML.mjs.map +1 -0
- package/dist/publish-surface.d.mts +2 -2
- package/dist/publish-surface.mjs +2 -2
- package/dist/publish-surface__import-roots.d.mts +1 -1
- package/dist/publish-surface__import-roots.mjs +1 -1
- package/dist/publish-surface__shells.d.mts +1 -1
- package/dist/publish-surface__shells.mjs +1 -1
- package/dist/quick-reference-mongo.md +12 -9
- package/dist/quick-reference-postgres.md +12 -9
- package/dist/readme-mongo.md +2 -2
- package/dist/readme-postgres.md +2 -2
- package/dist/ref-h6InR6dO-rGfl18Jv.mjs +4686 -0
- package/dist/ref-h6InR6dO-rGfl18Jv.mjs.map +1 -0
- package/dist/{ref-resolution-sGcINe7o.mjs → ref-resolution-HeNBXW53.mjs} +2 -2
- package/dist/{ref-resolution-sGcINe7o.mjs.map → ref-resolution-HeNBXW53.mjs.map} +1 -1
- package/dist/{refs-WK86uYYp-B6EZkmmT.mjs → refs-WK86uYYp-gM8tvWQP.mjs} +2 -2
- package/dist/{refs-WK86uYYp-B6EZkmmT.mjs.map → refs-WK86uYYp-gM8tvWQP.mjs.map} +1 -1
- package/dist/{shells-BenrJHp2.mjs → shells-C4HbRAr5.mjs} +13 -14
- package/dist/shells-C4HbRAr5.mjs.map +1 -0
- package/dist/{shells-COHV_Ozf.d.mts → shells-CIUmT4u4.d.mts} +14 -20
- package/dist/shells-CIUmT4u4.d.mts.map +1 -0
- package/dist/{spaces-BG2w0P8d.mjs → spaces-4qMOAYE9.mjs} +7 -7
- package/dist/{spaces-BG2w0P8d.mjs.map → spaces-4qMOAYE9.mjs.map} +1 -1
- package/dist/{spaces-tWQi7CUv.d.mts → spaces-Dj65JrwZ.d.mts} +2 -2
- package/dist/{spaces-tWQi7CUv.d.mts.map → spaces-Dj65JrwZ.d.mts.map} +1 -1
- package/dist/{verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts → verify-contract-spaces-C3PiFBk3-DfomYyOE.d.mts} +3 -3
- package/dist/{verify-contract-spaces-Cc1u_wJo-BilPJS2S.d.mts.map → verify-contract-spaces-C3PiFBk3-DfomYyOE.d.mts.map} +1 -1
- package/dist/{verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs → verify-contract-spaces-DhJTb0zM-B62maCfE.mjs} +4 -4
- package/dist/{verify-contract-spaces-DhJTb0zM-_oh6W6lp.mjs.map → verify-contract-spaces-DhJTb0zM-B62maCfE.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.d.mts +2 -2
- package/dist/vite-plugin-contract-emit.mjs +5 -5
- package/dist/vite-plugin-contract-emit.mjs.map +1 -1
- package/package.json +14 -38
- package/dist/bin__prisma-next.mjs +0 -512
- package/dist/bin__prisma-next.mjs.map +0 -1
- package/dist/caught-errors-BZo7zcRc-C-pIEasG.mjs +0 -14
- package/dist/caught-errors-BZo7zcRc-C-pIEasG.mjs.map +0 -1
- package/dist/cli-errors-B4zTLaqQ-CXgjO9t4.mjs +0 -347
- package/dist/cli-errors-B4zTLaqQ-CXgjO9t4.mjs.map +0 -1
- package/dist/cli-errors-iquUoY6O-BFboxglv.d.mts.map +0 -1
- package/dist/cli__commands__contract-emit.d.mts +0 -2
- package/dist/cli__commands__contract-emit.mjs +0 -2
- package/dist/cli__commands__contract-infer.d.mts +0 -7
- package/dist/cli__commands__contract-infer.d.mts.map +0 -1
- package/dist/cli__commands__contract-infer.mjs +0 -2
- package/dist/cli__commands__db-init.d.mts +0 -7
- package/dist/cli__commands__db-init.d.mts.map +0 -1
- package/dist/cli__commands__db-init.mjs +0 -2
- package/dist/cli__commands__db-schema.d.mts +0 -7
- package/dist/cli__commands__db-schema.d.mts.map +0 -1
- package/dist/cli__commands__db-schema.mjs +0 -2
- package/dist/cli__commands__db-sign.d.mts +0 -7
- package/dist/cli__commands__db-sign.d.mts.map +0 -1
- package/dist/cli__commands__db-sign.mjs +0 -2
- package/dist/cli__commands__db-update.d.mts +0 -7
- package/dist/cli__commands__db-update.d.mts.map +0 -1
- package/dist/cli__commands__db-update.mjs +0 -2
- package/dist/cli__commands__db-verify.d.mts +0 -7
- package/dist/cli__commands__db-verify.d.mts.map +0 -1
- package/dist/cli__commands__db-verify.mjs +0 -2
- package/dist/cli__commands__migrate.d.mts +0 -57
- package/dist/cli__commands__migrate.d.mts.map +0 -1
- package/dist/cli__commands__migrate.mjs +0 -2
- package/dist/cli__commands__migration-check.d.mts +0 -8
- package/dist/cli__commands__migration-check.d.mts.map +0 -1
- package/dist/cli__commands__migration-check.mjs +0 -3
- package/dist/cli__commands__migration-graph.d.mts +0 -38
- package/dist/cli__commands__migration-graph.d.mts.map +0 -1
- package/dist/cli__commands__migration-graph.mjs +0 -2
- package/dist/cli__commands__migration-list.d.mts +0 -39
- package/dist/cli__commands__migration-list.d.mts.map +0 -1
- package/dist/cli__commands__migration-list.mjs +0 -2
- package/dist/cli__commands__migration-log.d.mts +0 -20
- package/dist/cli__commands__migration-log.d.mts.map +0 -1
- package/dist/cli__commands__migration-log.mjs +0 -2
- package/dist/cli__commands__migration-new.d.mts +0 -7
- package/dist/cli__commands__migration-new.d.mts.map +0 -1
- package/dist/cli__commands__migration-new.mjs +0 -2
- package/dist/cli__commands__migration-plan.d.mts +0 -34
- package/dist/cli__commands__migration-plan.d.mts.map +0 -1
- package/dist/cli__commands__migration-plan.mjs +0 -2
- package/dist/cli__commands__migration-show.d.mts +0 -27
- package/dist/cli__commands__migration-show.d.mts.map +0 -1
- package/dist/cli__commands__migration-show.mjs +0 -2
- package/dist/cli__commands__migration-status.d.mts +0 -55
- package/dist/cli__commands__migration-status.d.mts.map +0 -1
- package/dist/cli__commands__migration-status.mjs +0 -3
- package/dist/cli__commands__ref.d.mts +0 -7
- package/dist/cli__commands__ref.d.mts.map +0 -1
- package/dist/cli__commands__ref.mjs +0 -2
- package/dist/cli__commands__telemetry.d.mts +0 -7
- package/dist/cli__commands__telemetry.d.mts.map +0 -1
- package/dist/cli__commands__telemetry.mjs +0 -2
- package/dist/client-C6Qp5ujC-Dxb7r79B.mjs +0 -1653
- package/dist/client-C6Qp5ujC-Dxb7r79B.mjs.map +0 -1
- package/dist/code-templates-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/exports-B3xY_FHp.mjs.map +0 -1
- package/dist/exports-BZLNbtkY.mjs.map +0 -1
- package/dist/exports-CqNUihkI.mjs +0 -276
- package/dist/exports-CqNUihkI.mjs.map +0 -1
- package/dist/format-Ca7dUE6B-BMFqrc6D.mjs +0 -110
- package/dist/format-Ca7dUE6B-BMFqrc6D.mjs.map +0 -1
- package/dist/framework-components-Bau7o1-J-DTp6AUoq.mjs +0 -60
- package/dist/framework-components-Bau7o1-J-DTp6AUoq.mjs.map +0 -1
- package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts +0 -35
- package/dist/global-flags-BpoOYtNZ-CHZD3fud.d.mts.map +0 -1
- package/dist/index-mCsi_ND5.d.mts.map +0 -1
- package/dist/init-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/refs-fQLFcMoq-aTBeUU9H.mjs +0 -47
- package/dist/refs-fQLFcMoq-aTBeUU9H.mjs.map +0 -1
- package/dist/schemas-BGgjiKV0-Rh8RlMCl.d.mts +0 -206
- package/dist/schemas-BGgjiKV0-Rh8RlMCl.d.mts.map +0 -1
- package/dist/schemas-CYSD83Cu-Bff4PPoi.mjs +0 -119
- package/dist/schemas-CYSD83Cu-Bff4PPoi.mjs.map +0 -1
- package/dist/shells-BenrJHp2.mjs.map +0 -1
- package/dist/shells-COHV_Ozf.d.mts.map +0 -1
- package/dist/telemetry-BD52LETE-Cqeb7ebh.mjs +0 -121
- package/dist/telemetry-BD52LETE-Cqeb7ebh.mjs.map +0 -1
- package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts +0 -133
- package/dist/terminal-ui-BN4QOsm5-Bf3pim46.d.mts.map +0 -1
- package/dist/terminal-ui-Cqz4LVL7-B0mcVdLy.mjs +0 -676
- package/dist/terminal-ui-Cqz4LVL7-B0mcVdLy.mjs.map +0 -1
- package/dist/verify-Cogr_Fj9-D3lCWA6t.mjs +0 -283
- package/dist/verify-Cogr_Fj9-D3lCWA6t.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-ui-Cqz4LVL7-B0mcVdLy.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/terminal-ui-Cqz4LVL7.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { bold, cyan, dim, green, red, yellow } from \"colorette\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport * as clack from \"@clack/prompts\";\n//#region src/utils/formatters/helpers.ts\n/**\n* Checks if verbose output is enabled at the specified level.\n*/\nfunction isVerbose(flags, level) {\n\treturn (flags.verbose ?? 0) >= level;\n}\n/**\n* Creates a color-aware formatter function.\n* Returns a function that applies the color only if colors are enabled.\n*/\nfunction createColorFormatter(useColor, colorFn) {\n\treturn useColor ? colorFn : (text) => text;\n}\n/**\n* Formats text with dim styling if colors are enabled.\n*/\nfunction formatDim(useColor, text) {\n\treturn useColor ? dim(text) : text;\n}\n//#endregion\n//#region src/utils/bin-name.ts\n/**\n* The binary this package installs. Next-action commands are authored with a\n* `{bin}` placeholder and rendered against this name, so no library-layer\n* error hardcodes it.\n*\n* `test/output.next-actions.test.ts` asserts this stays equal to the sole key\n* of the package manifest's `bin` map.\n*/\nconst BIN_NAME = \"prisma-next\";\n//#endregion\n//#region src/utils/formatters/migrations.ts\n/**\n* Render a single statement of an `OperationPreview` for the human-readable\n* preview block. SQL statements get a trailing `;` if missing so the rendered\n* preview is byte-identical to the legacy `string[]`-based renderer for SQL\n* targets. Other languages (`'mongodb-shell'`) render verbatim.\n*/\nfunction renderPreviewStatement(text, language) {\n\tconst trimmed = text.trim();\n\tif (!trimmed) return void 0;\n\tif (language === \"sql\") return trimmed.endsWith(\";\") ? trimmed : `${trimmed};`;\n\treturn trimmed;\n}\n/**\n* Choose the header label for a preview block. SQL-only previews keep the\n* legacy `DDL preview` label so the rendered output is byte-identical to the\n* pre-aggregate SQL CLI; previews from any other family — or a mix that\n* includes any non-SQL language — use the family-agnostic `Operation preview`\n* label.\n*\n* An empty `statements` array deliberately renders as `Operation preview`\n* rather than `DDL preview`: `Array.prototype.every` is vacuously true for\n* empty arrays, but we have no evidence the preview is SQL-only when no\n* statements are present, so the family-agnostic label is the safer default.\n*/\nfunction previewBlockHeader(preview) {\n\treturn preview.statements.length > 0 && preview.statements.every((s) => s.language === \"sql\") ? \"DDL preview\" : \"Operation preview\";\n}\nfunction formatPlannerWarningsBlock(warnings, useColor) {\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst lines = [\"\", \"Warnings:\"];\n\tfor (const warning of warnings) lines.push(` ${formatDimText(`- ${warning.summary}`)}`);\n\treturn lines;\n}\n/**\n* Render the shared per-space execution block consumed by the `db init`\n* / `db update` / `migrate` summaries. Always shows: space\n* label (`Extension space: <id>` or `App space`) → per-op lines under\n* each space → per-space marker hash (when known).\n*\n* `mode` controls the marker label phrasing — `'apply'` shows\n* `marker → <hash>` (post-apply), `'plan'` omits the marker line\n* entirely (no marker has been written yet).\n*/\nfunction formatPerSpaceBlock(perSpace, mode, useColor) {\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatCyan = createColorFormatter(useColor, cyan);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst lines = [];\n\tfor (let s = 0; s < perSpace.length; s++) {\n\t\tconst space = perSpace[s];\n\t\tif (s > 0) lines.push(\"\");\n\t\tconst header = space.kind === \"app\" ? formatCyan(\"App space\") : formatCyan(`Extension space: ${space.spaceId}`);\n\t\tlines.push(header);\n\t\tif (space.operations.length === 0) lines.push(` ${formatDimText(\"(no operations)\")}`);\n\t\telse for (let i = 0; i < space.operations.length; i++) {\n\t\t\tconst op = space.operations[i];\n\t\t\tconst treeChar = i === space.operations.length - 1 ? \"└\" : \"├\";\n\t\t\tconst destructiveMarker = op.operationClass === \"destructive\" ? ` ${formatYellow(\"(destructive)\")}` : \"\";\n\t\t\tlines.push(` ${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n\t\t}\n\t\tif (mode === \"apply\" && space.marker) lines.push(` ${formatDimText(`marker: ${space.marker.storageHash}`)}`);\n\t}\n\treturn lines;\n}\n/**\n* Formats human-readable output for migration commands (db init, db update) in plan mode.\n*/\nfunction formatMigrationPlanOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst operationCount = result.plan?.operations.length ?? 0;\n\tconst spaceCount = result.perSpace?.length ?? 0;\n\tif (spaceCount > 0) lines.push(`${formatGreen(\"✔\")} Planned ${operationCount} operation(s) across ${spaceCount} contract space${spaceCount === 1 ? \"\" : \"s\"}`);\n\telse lines.push(`${formatGreen(\"✔\")} Planned ${operationCount} operation(s)`);\n\tif (result.warnings && result.warnings.length > 0) lines.push(...formatPlannerWarningsBlock(result.warnings, useColor));\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tif (result.perSpace && result.perSpace.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(...formatPerSpaceBlock(result.perSpace, \"plan\", useColor));\n\t\tif (result.perSpace.some((s) => s.operations.some((op) => op.operationClass === \"destructive\"))) {\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(`${formatYellow(\"⚠\")} This migration contains destructive operations that may cause data loss.`);\n\t\t}\n\t} else if (result.plan?.operations && result.plan.operations.length > 0) {\n\t\tlines.push(`${formatDimText(\"│\")}`);\n\t\tfor (let i = 0; i < result.plan.operations.length; i++) {\n\t\t\tconst op = result.plan.operations[i];\n\t\t\tif (!op) continue;\n\t\t\tconst treeChar = i === result.plan.operations.length - 1 ? \"└\" : \"├\";\n\t\t\tconst destructiveMarker = op.operationClass === \"destructive\" ? ` ${formatYellow(\"(destructive)\")}` : \"\";\n\t\t\tlines.push(`${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n\t\t}\n\t\tif (result.plan.operations.some((op) => op.operationClass === \"destructive\")) {\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(`${formatYellow(\"⚠\")} This migration contains destructive operations that may cause data loss.`);\n\t\t}\n\t}\n\tif (result.plan?.destination) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatDimText(`Destination hash: ${result.plan.destination.storageHash}`)}`);\n\t}\n\tif (result.plannedAdvanceRef) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatDimText(`Would advance ref \"${result.plannedAdvanceRef.name}\" → ${result.plannedAdvanceRef.hash}`));\n\t}\n\tconst preview = result.plan?.preview;\n\tif (preview) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatDimText(previewBlockHeader(preview))}`);\n\t\tif (preview.statements.length === 0) lines.push(`${formatDimText(\"No operations.\")}`);\n\t\telse {\n\t\t\tlines.push(\"\");\n\t\t\tfor (const statement of preview.statements) {\n\t\t\t\tconst rendered = renderPreviewStatement(statement.text, statement.language);\n\t\t\t\tif (rendered) lines.push(rendered);\n\t\t\t}\n\t\t}\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(`Total time: ${result.timings.total}ms`)}`);\n\tlines.push(\"\");\n\tlines.push(`${formatDimText(\"This is a dry run. No changes were applied.\")}`);\n\tlines.push(`${formatDimText(\"Run without --dry-run to apply changes.\")}`);\n\treturn lines.join(\"\\n\");\n}\nfunction formatMigrationApplyCommandOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tlines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\tif (result.perSpace.length > 0) {\n\t\tlines.push(\"\");\n\t\tfor (const line of formatPerSpaceBlock(result.perSpace, \"apply\", useColor)) lines.push(line);\n\t}\n\tif (result.advancedRef) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatDimText(`Advanced ref \"${result.advancedRef.name}\" → ${result.advancedRef.hash}`));\n\t}\n\tlines.push(\"\");\n\tlines.push(formatDimText(\"Next: prisma-next migration status\"));\n\tif (isVerbose(flags, 1) && result.timings) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatDimText(`Total time: ${result.timings.total}ms`));\n\t}\n\treturn lines.join(\"\\n\");\n}\nfunction formatSpaceShowBlock(space, useColor) {\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst lines = [];\n\tlines.push(`${formatGreen(\"✔\")} ${space.name}`);\n\tlines.push(`${formatDimText(` from: ${space.fromContract ?? \"(baseline)\"}`)}`);\n\tlines.push(`${formatDimText(` to: ${space.toContract}`)}`);\n\tlines.push(`${formatDimText(` hash: ${space.hash}`)}`);\n\tlines.push(`${formatDimText(` created: ${space.createdAt}`)}`);\n\tlines.push(\"\");\n\tlines.push(`${space.operations.length} operation(s)`);\n\tif (space.operations.length > 0) {\n\t\tlines.push(`${formatDimText(\"│\")}`);\n\t\tfor (let i = 0; i < space.operations.length; i++) {\n\t\t\tconst op = space.operations[i];\n\t\t\tconst treeChar = i === space.operations.length - 1 ? \"└\" : \"├\";\n\t\t\tconst destructiveMarker = op.operationClass === \"destructive\" ? ` ${formatYellow(\"(destructive)\")}` : \"\";\n\t\t\tlines.push(`${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n\t\t}\n\t\tif (space.operations.some((op) => op.operationClass === \"destructive\")) {\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(`${formatYellow(\"⚠\")} This migration contains destructive operations that may cause data loss.`);\n\t\t}\n\t}\n\tif (space.preview.statements.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatDimText(previewBlockHeader(space.preview))}`);\n\t\tlines.push(\"\");\n\t\tfor (const statement of space.preview.statements) {\n\t\t\tconst rendered = renderPreviewStatement(statement.text, statement.language);\n\t\t\tif (rendered) lines.push(rendered);\n\t\t}\n\t}\n\treturn lines;\n}\nfunction formatMigrationShowOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst useColor = flags.color !== false;\n\treturn formatSpaceShowBlock(result.migration, useColor).join(\"\\n\");\n}\n/**\n* Formats human-readable output for migration commands (db init, db update) in apply mode.\n*/\nfunction formatMigrationApplyOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (result.ok) {\n\t\tconst executed = result.execution?.operationsExecuted ?? 0;\n\t\tconst spaceCount = result.perSpace?.length ?? 0;\n\t\tif (executed === 0) {\n\t\t\tconst acrossClause = spaceCount > 0 ? ` across ${spaceCount} contract space${spaceCount === 1 ? \"\" : \"s\"}` : \"\";\n\t\t\tlines.push(`${formatGreen(\"✔\")} Database already matches contract${acrossClause}`);\n\t\t} else if (spaceCount > 0) lines.push(`${formatGreen(\"✔\")} Applied ${executed} operation(s) across ${spaceCount} contract space${spaceCount === 1 ? \"\" : \"s\"}`);\n\t\telse lines.push(`${formatGreen(\"✔\")} Applied ${executed} operation(s)`);\n\t\tif (result.warnings && result.warnings.length > 0) lines.push(...formatPlannerWarningsBlock(result.warnings, useColor));\n\t\tif (result.perSpace && result.perSpace.length > 0) {\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(...formatPerSpaceBlock(result.perSpace, \"apply\", useColor));\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(formatDimText(`Run 'prisma-next migration status' to confirm ${spaceCount === 1 ? \"the space is\" : \"all spaces are\"} up to date.`));\n\t\t} else if (result.marker) {\n\t\t\tlines.push(`${formatDimText(` App-space marker: ${result.marker.storageHash}`)}`);\n\t\t\tif (result.marker.profileHash) lines.push(`${formatDimText(` Profile hash: ${result.marker.profileHash}`)}`);\n\t\t}\n\t\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t\tif (result.advancedRef) lines.push(formatDimText(`Advanced ref \"${result.advancedRef.name}\" → ${result.advancedRef.hash}`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for migration commands (db init, db update).\n*/\nfunction formatMigrationJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n//#endregion\n//#region src/utils/formatters/errors.ts\nconst BIN_PLACEHOLDER = \"{bin}\";\n/**\n* Rewrite the `{bin}` placeholder in every next-action command to `binName`.\n*\n* Library-layer error factories cannot know which binary the user invoked, so\n* they write `{bin} ref set <name> <hash>`. Every surface that renders or\n* serializes an envelope resolves the placeholder first, so a consumer only\n* ever sees a command that is runnable as written.\n*/\nfunction resolveBinPlaceholder(envelope, binName) {\n\tconst substitute = (command) => command.replaceAll(BIN_PLACEHOLDER, binName);\n\tconst resolved = envelope.nextActions.map((action) => ({\n\t\t...action,\n\t\t...ifDefined(\"command\", action.command?.replaceAll(BIN_PLACEHOLDER, binName)),\n\t\t...ifDefined(\"commands\", action.commands?.map(substitute))\n\t}));\n\treturn {\n\t\t...envelope,\n\t\tnextActions: resolved\n\t};\n}\n/**\n* The display label for a schema-diff issue in the shared error envelope,\n* derived from which sides are present: expected-only is a missing object,\n* actual-only an extra one, both a mismatch. `undefined` when the entry is not\n* a schema-diff issue (it carries neither side) so the caller can fall through\n* to its generic label.\n*/\nfunction schemaDiffIssueLabel(issue) {\n\tconst hasExpected = issue.expected !== void 0;\n\tconst hasActual = issue.actual !== void 0;\n\tif (hasExpected && hasActual) return \"mismatch\";\n\tif (hasExpected) return \"missing\";\n\tif (hasActual) return \"extra\";\n}\n/**\n* Formats error output for human-readable display.\n*/\nfunction formatErrorOutput(error, flags) {\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatRed = createColorFormatter(useColor, red);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tlines.push(`${formatRed(\"✖\")} ${error.summary} (${error.code})`);\n\tif (error.why) lines.push(`${formatDimText(` Why: ${error.why}`)}`);\n\tif (error.fix) lines.push(`${formatDimText(` Fix: ${error.fix}`)}`);\n\tif (error.where?.path) {\n\t\tconst whereLine = error.where.line ? `${error.where.path}:${error.where.line}` : error.where.path;\n\t\tlines.push(`${formatDimText(` Where: ${whereLine}`)}`);\n\t}\n\tif (error.meta?.[\"conflicts\"]) {\n\t\tconst conflicts = error.meta[\"conflicts\"];\n\t\tif (conflicts.length > 0) {\n\t\t\tconst maxToShow = isVerbose(flags, 1) ? conflicts.length : Math.min(3, conflicts.length);\n\t\t\tconst header = isVerbose(flags, 1) ? \" Conflicts:\" : ` Conflicts (showing ${maxToShow} of ${conflicts.length}):`;\n\t\t\tlines.push(`${formatDimText(header)}`);\n\t\t\tfor (const conflict of conflicts.slice(0, maxToShow)) lines.push(`${formatDimText(` - [${conflict.kind}] ${conflict.summary}`)}`);\n\t\t\tif (!isVerbose(flags, 1) && conflicts.length > maxToShow) lines.push(`${formatDimText(\" Re-run with -v/--verbose to see all conflicts\")}`);\n\t\t}\n\t}\n\tif (error.meta?.[\"issues\"]) {\n\t\tconst issues = error.meta[\"issues\"];\n\t\tif (issues.length > 0) {\n\t\t\tconst maxToShow = isVerbose(flags, 1) ? issues.length : Math.min(3, issues.length);\n\t\t\tconst header = isVerbose(flags, 1) ? \" Issues:\" : ` Issues (showing ${maxToShow} of ${issues.length}):`;\n\t\t\tlines.push(`${formatDimText(header)}`);\n\t\t\tfor (const issue of issues.slice(0, maxToShow)) {\n\t\t\t\tconst label = issue.kind ?? schemaDiffIssueLabel(issue) ?? \"issue\";\n\t\t\t\tconst message = issue.message ?? issue.path?.join(\"/\") ?? \"\";\n\t\t\t\tlines.push(`${formatDimText(` - [${label}] ${message}`)}`);\n\t\t\t}\n\t\t\tif (!isVerbose(flags, 1) && issues.length > maxToShow) lines.push(`${formatDimText(\" Re-run with -v/--verbose to see all issues\")}`);\n\t\t}\n\t}\n\tif (error.docsUrl && isVerbose(flags, 1)) lines.push(formatDimText(error.docsUrl));\n\tconst plannerWarnings = error.meta?.[\"plannerWarnings\"];\n\tif (Array.isArray(plannerWarnings) && plannerWarnings.length > 0) {\n\t\tconst typedWarnings = blindCast(plannerWarnings);\n\t\tlines.push(...formatPlannerWarningsBlock(typedWarnings, useColor));\n\t}\n\tif (isVerbose(flags, 2) && error.meta) lines.push(`${formatDimText(` Meta: ${JSON.stringify(error.meta, null, 2)}`)}`);\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats error output as JSON.\n*/\nfunction formatErrorJson(error) {\n\treturn JSON.stringify(resolveBinPlaceholder(error, BIN_NAME), null, 2);\n}\n//#endregion\n//#region src/utils/glyph-mode.ts\nfunction localeString(env) {\n\treturn env[\"LC_ALL\"] ?? env[\"LC_CTYPE\"] ?? env[\"LANG\"] ?? \"\";\n}\nfunction isUtf8Locale(env) {\n\tconst locale = localeString(env);\n\tif (locale.length === 0) return false;\n\treturn /UTF-8|utf8/i.test(locale);\n}\nfunction detectGlyphMode(input) {\n\tif (!input.isTTY) return \"ascii\";\n\tif (!isUtf8Locale(input.env)) return \"ascii\";\n\treturn \"unicode\";\n}\n//#endregion\n//#region src/utils/shutdown.ts\nfunction createShutdownHandler(options) {\n\tconst exit = options?.exit ?? ((code) => process.exit(code));\n\tconst gracePeriodMs = options?.gracePeriodMs ?? 3e3;\n\tconst controller = new AbortController();\n\tlet shuttingDown = false;\n\tlet graceTimer;\n\tconst onSignal = () => {\n\t\tif (shuttingDown) {\n\t\t\texit(130);\n\t\t\treturn;\n\t\t}\n\t\tshuttingDown = true;\n\t\tcontroller.abort();\n\t\tgraceTimer = setTimeout(() => exit(130), gracePeriodMs);\n\t\tgraceTimer.unref();\n\t};\n\treturn {\n\t\tsignal: controller.signal,\n\t\tisShuttingDown: () => shuttingDown,\n\t\tonSignal,\n\t\tclearGraceTimer: () => {\n\t\t\tif (graceTimer !== void 0) {\n\t\t\t\tclearTimeout(graceTimer);\n\t\t\t\tgraceTimer = void 0;\n\t\t\t}\n\t\t}\n\t};\n}\nconst globalHandler = createShutdownHandler();\n/**\n* The global AbortSignal. Pass this to any async operation that should\n* be cancellable on Ctrl+C (e.g., DB queries, long-running emit).\n*/\nconst shutdownSignal = globalHandler.signal;\n/**\n* Installs SIGINT and SIGTERM handlers. Call once at CLI startup.\n*\n* - First signal: aborts the controller, starts a 3s grace timer.\n* - Second signal: force-exits immediately.\n*/\nlet installed = false;\nfunction installShutdownHandlers() {\n\tif (installed) return;\n\tinstalled = true;\n\tprocess.on(\"SIGINT\", globalHandler.onSignal);\n\tprocess.on(\"SIGTERM\", globalHandler.onSignal);\n}\n//#endregion\n//#region src/utils/terminal-ui.ts\n/**\n* Composable CLI output abstraction.\n*\n* Follows the Unix convention of separating data from decoration:\n* - **stdout** — data output only (`ui.output()`). This is what scripts and pipes capture.\n* - **stderr** — all decoration (spinners, logs, notes, intro/outro). Visible in terminal, invisible in pipes.\n*\n* Rules:\n* 1. All methods except `output()` and `error()` write to stderr only in interactive mode.\n* 2. `output(data)` always writes to stdout — if a command calls it, there is data to emit.\n* 3. `error()` always writes to stderr — errors matter even when piped.\n* 4. Decoration is suppressed when piped unless `--format pretty` was explicit (`forcePretty`).\n* 5. Never write data to stderr — decoration methods are for human context only.\n* 6. Never write decoration to stdout — it breaks pipes, `$(...)` captures, and `> file` redirects.\n*/\nvar TerminalUI = class TerminalUI {\n\t/**\n\t* True when stdout is a TTY (interactive terminal).\n\t* False when piped (e.g., `prisma-next db verify | jq`).\n\t*/\n\tisInteractive;\n\t/**\n\t* Whether color output is enabled.\n\t*/\n\tuseColor;\n\t/**\n\t* When true, decoration methods write even on non-TTY stdout\n\t* (explicit `--format pretty`).\n\t*/\n\tforcePretty;\n\t/**\n\t* Whether stdout is a TTY — used for migration-list graph glyph detection.\n\t*/\n\tstdoutIsTTY;\n\t/**\n\t* Process environment snapshot for locale-aware glyph detection.\n\t*/\n\tenv;\n\tstatic stderrOpts = { output: process.stderr };\n\tconstructor(options) {\n\t\tthis.isInteractive = options?.interactive ?? !!process.stdout.isTTY;\n\t\tthis.forcePretty = options?.forcePretty ?? false;\n\t\tthis.useColor = options?.color ?? (this.isInteractive || this.forcePretty);\n\t\tthis.stdoutIsTTY = options?.stdoutIsTTY ?? !!process.stdout.isTTY;\n\t\tthis.env = options?.env ?? process.env;\n\t}\n\tget isTTY() {\n\t\treturn this.stdoutIsTTY;\n\t}\n\t/**\n\t* Resolve glyph mode for migration list/tree output. `--ascii` forces ASCII;\n\t* otherwise delegates to the pure {@link detectGlyphMode} helper.\n\t*/\n\tresolveGlyphMode(forceAscii) {\n\t\tif (forceAscii) return \"ascii\";\n\t\treturn detectGlyphMode(this.glyphModeInput());\n\t}\n\tglyphModeInput() {\n\t\treturn {\n\t\t\tisTTY: this.stdoutIsTTY,\n\t\t\tenv: this.env\n\t\t};\n\t}\n\tget shouldDecorate() {\n\t\treturn this.isInteractive || this.forcePretty;\n\t}\n\t/**\n\t* Log a message line to stderr. No-op when piped unless forcePretty.\n\t*/\n\tlog(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.log.message(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Log a success message to stderr. No-op when piped unless forcePretty.\n\t*/\n\tsuccess(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.log.success(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Log a warning message to stderr. No-op when piped unless forcePretty.\n\t*/\n\twarn(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.log.warn(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Log an error message to stderr. Always writes (errors matter even in pipes).\n\t*/\n\terror(message) {\n\t\tclack.log.error(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Log an info message to stderr. No-op when piped unless forcePretty.\n\t*/\n\tinfo(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.log.info(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Log a step message to stderr. No-op when piped unless forcePretty.\n\t*/\n\tstep(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.log.step(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Display a note box on stderr. No-op when piped unless forcePretty.\n\t*/\n\tnote(message, title) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.note(message, title, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Display intro banner on stderr. No-op when piped unless forcePretty.\n\t*/\n\tintro(title) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.intro(title, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Display outro banner on stderr. No-op when piped unless forcePretty.\n\t*/\n\toutro(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tclack.outro(message, TerminalUI.stderrOpts);\n\t}\n\t/**\n\t* Create a Clack spinner on stderr with a 100ms delay threshold.\n\t* The spinner only appears if the operation takes longer than the threshold,\n\t* avoiding flicker for fast operations. Returns a no-op spinner when not decorating.\n\t*/\n\tspinner(delayMs = 100) {\n\t\tconst noop = {\n\t\t\tstart: () => {},\n\t\t\tstop: () => {},\n\t\t\tcancel: () => {},\n\t\t\terror: () => {},\n\t\t\tmessage: () => {},\n\t\t\tclear: () => {},\n\t\t\tget isCancelled() {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tif (!this.shouldDecorate) return noop;\n\t\tlet inner;\n\t\tlet timer;\n\t\tlet pendingMsg;\n\t\tlet settled = false;\n\t\tconst ensureCleared = () => {\n\t\t\tif (timer !== void 0) {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = void 0;\n\t\t\t}\n\t\t};\n\t\tconst onAbort = () => {\n\t\t\tif (!settled) {\n\t\t\t\tsettled = true;\n\t\t\t\tensureCleared();\n\t\t\t\tif (inner) inner.cancel(\"Interrupted\");\n\t\t\t}\n\t\t};\n\t\tif (!shutdownSignal.aborted) shutdownSignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\treturn {\n\t\t\tstart(msg) {\n\t\t\t\tpendingMsg = msg;\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tif (!settled) {\n\t\t\t\t\t\tinner = clack.spinner(TerminalUI.stderrOpts);\n\t\t\t\t\t\tinner.start(pendingMsg);\n\t\t\t\t\t}\n\t\t\t\t}, delayMs);\n\t\t\t},\n\t\t\tstop(msg) {\n\t\t\t\tsettled = true;\n\t\t\t\tensureCleared();\n\t\t\t\tif (inner) inner.stop(msg);\n\t\t\t},\n\t\t\tcancel(msg) {\n\t\t\t\tsettled = true;\n\t\t\t\tensureCleared();\n\t\t\t\tif (inner) inner.cancel(msg);\n\t\t\t},\n\t\t\terror(msg) {\n\t\t\t\tsettled = true;\n\t\t\t\tensureCleared();\n\t\t\t\tif (inner) inner.error(msg);\n\t\t\t},\n\t\t\tmessage(msg) {\n\t\t\t\tpendingMsg = msg;\n\t\t\t\tif (inner) inner.message(msg);\n\t\t\t},\n\t\t\tclear() {\n\t\t\t\tsettled = true;\n\t\t\t\tensureCleared();\n\t\t\t\tif (inner) inner.clear();\n\t\t\t},\n\t\t\tget isCancelled() {\n\t\t\t\treturn inner?.isCancelled ?? false;\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Prompt for yes/no confirmation on stderr. Returns true if confirmed.\n\t* In non-interactive mode or when cancelled (Ctrl-C), returns false.\n\t*/\n\tasync confirm(message) {\n\t\tif (!this.isInteractive) return false;\n\t\tconst result = await clack.confirm({\n\t\t\tmessage,\n\t\t\t...TerminalUI.stderrOpts\n\t\t});\n\t\tif (clack.isCancel(result)) return false;\n\t\treturn result;\n\t}\n\t/**\n\t* Write a raw line to stderr. No-op when piped unless forcePretty.\n\t* Use for decoration that doesn't fit Clack's log format (e.g. styled headers).\n\t*/\n\tstderr(message) {\n\t\tif (!this.shouldDecorate) return;\n\t\tprocess.stderr.write(`${message}\\n`);\n\t}\n\t/**\n\t* Write machine-readable data to stdout.\n\t* Always writes — if a command calls output(), there is data to emit.\n\t*\n\t* This is what scripts and pipes capture: `prisma-next db verify --json | jq .ok`\n\t*/\n\toutput(data) {\n\t\tprocess.stdout.write(`${data}\\n`);\n\t}\n\tgreen(text) {\n\t\treturn this.useColor ? green(text) : text;\n\t}\n\tred(text) {\n\t\treturn this.useColor ? red(text) : text;\n\t}\n\tcyan(text) {\n\t\treturn this.useColor ? cyan(text) : text;\n\t}\n\tdim(text) {\n\t\treturn this.useColor ? dim(text) : text;\n\t}\n\tbold(text) {\n\t\treturn this.useColor ? bold(text) : text;\n\t}\n\tyellow(text) {\n\t\treturn this.useColor ? yellow(text) : text;\n\t}\n};\nfunction createTerminalUI(flags, runtime) {\n\treturn new TerminalUI({\n\t\tcolor: flags.color,\n\t\tinteractive: flags.interactive,\n\t\tforcePretty: flags.format === \"pretty\" && flags.explicitFormat,\n\t\tstdoutIsTTY: runtime?.isTTY,\n\t\tenv: runtime?.env\n\t});\n}\n//#endregion\nexport { formatMigrationApplyCommandOutput as a, formatMigrationPlanOutput as c, renderPreviewStatement as d, BIN_NAME as f, isVerbose as h, formatErrorOutput as i, formatMigrationShowOutput as l, formatDim as m, installShutdownHandlers as n, formatMigrationApplyOutput as o, createColorFormatter as p, formatErrorJson as r, formatMigrationJson as s, createTerminalUI as t, previewBlockHeader as u };\n\n//# sourceMappingURL=terminal-ui-Cqz4LVL7.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,UAAU,OAAO,OAAO;CAChC,QAAQ,MAAM,WAAW,MAAM;AAChC;;;;;AAKA,SAAS,qBAAqB,UAAU,SAAS;CAChD,OAAO,WAAW,WAAW,SAAS;AACvC;;;;AAIA,SAAS,UAAU,UAAU,MAAM;CAClC,OAAO,WAAW,IAAI,IAAI,IAAI;AAC/B;;;;;;;;;AAWA,MAAM,WAAW;;;;;;;AASjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,UAAU,KAAK,KAAK;CAC1B,IAAI,CAAC,SAAS,OAAO,KAAK;CAC1B,IAAI,aAAa,OAAO,OAAO,QAAQ,SAAS,GAAG,IAAI,UAAU,GAAG,QAAQ;CAC5E,O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;CACrC;CACA,OAAO,MAAM;EACZ,OAAO,KAAK,WAAW,OAAO,IAAI,IAAI;CACvC;AACD;AACA,SAAS,iBAAiB,OAAO,SAAS;CACzC,OAAO,IAAI,WAAW;EACrB,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,aAAa,MAAM,WAAW,YAAY,MAAM;EAChD,aAAa,SAAS;EACtB,KAAK,SAAS;CACf,CAAC;AACF"}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import { i as formatDim, n as createColorFormatter, p as isVerbose } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
|
|
2
|
-
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
|
-
import { issueOutcome } from "@prisma/orm-framework/components/control";
|
|
4
|
-
import { bold, cyan, dim, green, magenta, red, yellow } from "colorette";
|
|
5
|
-
//#region ../../../1-framework/3-tooling/cli/dist/verify-Cogr_Fj9.mjs
|
|
6
|
-
/** Human-readable label for each outcome, prefixed onto an issue's message for display. */
|
|
7
|
-
const OUTCOME_LABEL = {
|
|
8
|
-
"not-found": "missing",
|
|
9
|
-
"not-expected": "extra",
|
|
10
|
-
"not-equal": "mismatch"
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* The issue's display text: its own path, prefixed with a human label for
|
|
14
|
-
* why it's flagged. Turning the presence-derived outcome (and the path) into
|
|
15
|
-
* prose is this formatter's job, not the differ's — the differ's issue is
|
|
16
|
-
* data (`path` + nodes), not prose.
|
|
17
|
-
*/
|
|
18
|
-
function formatIssueMessage(issue) {
|
|
19
|
-
return `${OUTCOME_LABEL[issueOutcome(issue)]}: ${issue.path.join("/")}`;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Formats human-readable output for database verify.
|
|
23
|
-
*/
|
|
24
|
-
function formatVerifyOutput(result, flags) {
|
|
25
|
-
if (flags.quiet) return "";
|
|
26
|
-
const lines = [];
|
|
27
|
-
const useColor = flags.color !== false;
|
|
28
|
-
const formatGreen = createColorFormatter(useColor, green);
|
|
29
|
-
const formatYellow = createColorFormatter(useColor, yellow);
|
|
30
|
-
const formatDimText = (text) => formatDim(useColor, text);
|
|
31
|
-
const verificationMode = result.mode === "full" ? `marker + schema${result.schema?.strict ? " (strict)" : " (tolerant)"}` : "marker only (--marker-only)";
|
|
32
|
-
lines.push(`${formatGreen("✔")} ${result.summary}`);
|
|
33
|
-
lines.push(`${formatDimText(` verification: ${verificationMode}`)}`);
|
|
34
|
-
lines.push(`${formatDimText(` storageHash: ${result.contract.storageHash}`)}`);
|
|
35
|
-
if (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);
|
|
36
|
-
if (result.schema?.warnings && result.schema.warnings.length > 0) {
|
|
37
|
-
lines.push("");
|
|
38
|
-
lines.push(formatYellow("Schema warnings:"));
|
|
39
|
-
for (const message of result.schema.warnings) lines.push(` ${formatYellow("⚠")} ${message}`);
|
|
40
|
-
}
|
|
41
|
-
if (result.unclaimed && result.unclaimed.length > 0) {
|
|
42
|
-
lines.push("");
|
|
43
|
-
lines.push(formatYellow("Unclaimed elements (declared by no contract):"));
|
|
44
|
-
for (const name of result.unclaimed) lines.push(` ${formatYellow("⚠")} ${name}`);
|
|
45
|
-
}
|
|
46
|
-
if (result.warning) {
|
|
47
|
-
lines.push("");
|
|
48
|
-
lines.push(`${formatYellow("⚠")} ${result.warning}`);
|
|
49
|
-
}
|
|
50
|
-
if (isVerbose(flags, 1)) {
|
|
51
|
-
if (result.codecCoverageSkipped) lines.push(`${formatDimText(" Codec coverage check skipped (helper returned no supported types)")}`);
|
|
52
|
-
lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);
|
|
53
|
-
}
|
|
54
|
-
return lines.join("\n");
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Formats JSON output for database verify.
|
|
58
|
-
*/
|
|
59
|
-
function formatVerifyJson(result) {
|
|
60
|
-
const output = {
|
|
61
|
-
ok: result.ok,
|
|
62
|
-
summary: result.summary,
|
|
63
|
-
mode: result.mode,
|
|
64
|
-
contract: result.contract,
|
|
65
|
-
...ifDefined("marker", result.marker),
|
|
66
|
-
target: result.target,
|
|
67
|
-
...ifDefined("missingCodecs", result.missingCodecs),
|
|
68
|
-
...ifDefined("codecCoverageSkipped", result.codecCoverageSkipped),
|
|
69
|
-
...ifDefined("schema", result.schema),
|
|
70
|
-
unclaimed: result.unclaimed ?? [],
|
|
71
|
-
...ifDefined("warning", result.warning),
|
|
72
|
-
...ifDefined("meta", result.meta),
|
|
73
|
-
timings: result.timings
|
|
74
|
-
};
|
|
75
|
-
return JSON.stringify(output, null, 2);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Formats JSON output for database introspection.
|
|
79
|
-
*/
|
|
80
|
-
function formatIntrospectJson(result) {
|
|
81
|
-
return JSON.stringify(result, null, 2);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Renders a schema tree structure from CoreSchemaView.
|
|
85
|
-
* Status-glyph tree styling shared with the retired verification-tree renderer.
|
|
86
|
-
*/
|
|
87
|
-
function renderSchemaTree(node, flags, options) {
|
|
88
|
-
const { isLast, prefix, useColor, formatDimText, isRoot = false } = options;
|
|
89
|
-
const lines = [];
|
|
90
|
-
let formattedLabel = node.label;
|
|
91
|
-
if (useColor) switch (node.kind) {
|
|
92
|
-
case "root":
|
|
93
|
-
formattedLabel = bold(node.label);
|
|
94
|
-
break;
|
|
95
|
-
case "entity": {
|
|
96
|
-
const tableMatch = node.label.match(/^table\s+(.+)$/);
|
|
97
|
-
if (tableMatch?.[1]) {
|
|
98
|
-
const tableName = tableMatch[1];
|
|
99
|
-
formattedLabel = `${dim("table")} ${cyan(tableName)}`;
|
|
100
|
-
} else formattedLabel = cyan(node.label);
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
case "collection":
|
|
104
|
-
formattedLabel = dim(node.label);
|
|
105
|
-
break;
|
|
106
|
-
case "field": {
|
|
107
|
-
const columnMatch = node.label.match(/^([^:]+):\s*(.+)$/);
|
|
108
|
-
if (columnMatch?.[1] && columnMatch[2]) {
|
|
109
|
-
const columnName = columnMatch[1];
|
|
110
|
-
const rest = columnMatch[2];
|
|
111
|
-
const typeMatch = rest.match(/^([^\s(]+)\s*(\([^)]+\))$/);
|
|
112
|
-
if (typeMatch?.[1] && typeMatch[2]) {
|
|
113
|
-
const typeDisplay = typeMatch[1];
|
|
114
|
-
const nullability = typeMatch[2];
|
|
115
|
-
formattedLabel = `${cyan(columnName)}: ${typeDisplay} ${dim(nullability)}`;
|
|
116
|
-
} else formattedLabel = `${cyan(columnName)}: ${rest}`;
|
|
117
|
-
} else formattedLabel = node.label;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
case "index": {
|
|
121
|
-
const pkMatch = node.label.match(/^primary key:\s*(.+)$/);
|
|
122
|
-
if (pkMatch?.[1]) {
|
|
123
|
-
const columnNames = pkMatch[1];
|
|
124
|
-
formattedLabel = `${dim("primary key")}: ${cyan(columnNames)}`;
|
|
125
|
-
} else {
|
|
126
|
-
const uniqueMatch = node.label.match(/^unique\s+(.+)$/);
|
|
127
|
-
if (uniqueMatch?.[1]) {
|
|
128
|
-
const name = uniqueMatch[1];
|
|
129
|
-
formattedLabel = `${dim("unique")} ${cyan(name)}`;
|
|
130
|
-
} else {
|
|
131
|
-
const indexMatch = node.label.match(/^(unique\s+)?index\s+(.+)$/);
|
|
132
|
-
if (indexMatch?.[2]) {
|
|
133
|
-
const indexPrefix = indexMatch[1] ? `${dim("unique")} ` : "";
|
|
134
|
-
const name = indexMatch[2];
|
|
135
|
-
formattedLabel = `${indexPrefix}${dim("index")} ${cyan(name)}`;
|
|
136
|
-
} else formattedLabel = dim(node.label);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
case "dependency": {
|
|
142
|
-
const extMatch = node.label.match(/^([^\s]+)\s+(extension is enabled)$/);
|
|
143
|
-
if (extMatch?.[1] && extMatch[2]) {
|
|
144
|
-
const extName = extMatch[1];
|
|
145
|
-
const rest = extMatch[2];
|
|
146
|
-
formattedLabel = `${cyan(extName)} ${dim(rest)}`;
|
|
147
|
-
} else formattedLabel = magenta(node.label);
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
default:
|
|
151
|
-
formattedLabel = node.label;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
if (isRoot) lines.push(formattedLabel);
|
|
155
|
-
else {
|
|
156
|
-
const treePrefix = `${formatDimText(isLast ? "└" : "├")}─ `;
|
|
157
|
-
lines.push(`${prefix}${treePrefix}${formattedLabel}`);
|
|
158
|
-
}
|
|
159
|
-
if (node.children && node.children.length > 0) {
|
|
160
|
-
const childPrefix = isRoot ? "" : `${prefix}${isLast ? " " : `${formatDimText("│")} `}`;
|
|
161
|
-
for (let i = 0; i < node.children.length; i++) {
|
|
162
|
-
const child = node.children[i];
|
|
163
|
-
if (!child) continue;
|
|
164
|
-
const childLines = renderSchemaTree(child, flags, {
|
|
165
|
-
isLast: i === node.children.length - 1,
|
|
166
|
-
prefix: childPrefix,
|
|
167
|
-
useColor,
|
|
168
|
-
formatDimText,
|
|
169
|
-
isRoot: false
|
|
170
|
-
});
|
|
171
|
-
lines.push(...childLines);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return lines;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Formats human-readable output for database introspection.
|
|
178
|
-
*/
|
|
179
|
-
function formatIntrospectOutput(result, schemaView, flags) {
|
|
180
|
-
if (flags.quiet) return "";
|
|
181
|
-
const lines = [];
|
|
182
|
-
const useColor = flags.color !== false;
|
|
183
|
-
const formatDimText = (text) => formatDim(useColor, text);
|
|
184
|
-
if (schemaView) {
|
|
185
|
-
const treeLines = renderSchemaTree(schemaView.root, flags, {
|
|
186
|
-
isLast: true,
|
|
187
|
-
prefix: "",
|
|
188
|
-
useColor,
|
|
189
|
-
formatDimText,
|
|
190
|
-
isRoot: true
|
|
191
|
-
});
|
|
192
|
-
lines.push(...treeLines);
|
|
193
|
-
} else {
|
|
194
|
-
lines.push(`✔ ${result.summary}`);
|
|
195
|
-
if (isVerbose(flags, 1)) {
|
|
196
|
-
lines.push(` Target: ${result.target.familyId}/${result.target.id}`);
|
|
197
|
-
if (result.meta?.dbUrl) lines.push(` Database: ${result.meta.dbUrl}`);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);
|
|
201
|
-
return lines.join("\n");
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Formats human-readable output for database schema verification.
|
|
205
|
-
*/
|
|
206
|
-
function formatSchemaVerifyOutput(result, flags, unclaimed = []) {
|
|
207
|
-
if (flags.quiet) return "";
|
|
208
|
-
const lines = [];
|
|
209
|
-
const useColor = flags.color !== false;
|
|
210
|
-
const formatGreen = createColorFormatter(useColor, green);
|
|
211
|
-
const formatRed = createColorFormatter(useColor, red);
|
|
212
|
-
const formatYellow = createColorFormatter(useColor, yellow);
|
|
213
|
-
const formatDimText = (text) => formatDim(useColor, text);
|
|
214
|
-
const issueMessages = result.schema.issues.map(formatIssueMessage);
|
|
215
|
-
if (issueMessages.length > 0) {
|
|
216
|
-
lines.push(formatRed("Schema issues:"));
|
|
217
|
-
for (const message of issueMessages) lines.push(` ${formatRed("✖")} ${message}`);
|
|
218
|
-
}
|
|
219
|
-
const warningMessages = (result.schema.warnings?.issues ?? []).map(formatIssueMessage);
|
|
220
|
-
if (warningMessages.length > 0) {
|
|
221
|
-
if (lines.length > 0) lines.push("");
|
|
222
|
-
lines.push(formatYellow("Schema warnings:"));
|
|
223
|
-
for (const message of warningMessages) lines.push(` ${formatYellow("⚠")} ${message}`);
|
|
224
|
-
}
|
|
225
|
-
if (unclaimed.length > 0) {
|
|
226
|
-
const strict = result.meta?.strict ?? false;
|
|
227
|
-
if (lines.length > 0) lines.push("");
|
|
228
|
-
lines.push((strict ? formatRed : formatYellow)("Unclaimed elements (declared by no contract):"));
|
|
229
|
-
for (const name of unclaimed) lines.push(` ${(strict ? formatRed : formatYellow)(strict ? "✖" : "⚠")} ${name}`);
|
|
230
|
-
}
|
|
231
|
-
if (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);
|
|
232
|
-
if (lines.length > 0) lines.push("");
|
|
233
|
-
if (result.ok) lines.push(`${formatGreen("✔")} ${result.summary}`);
|
|
234
|
-
else {
|
|
235
|
-
const codeText = result.code ? ` (${result.code})` : "";
|
|
236
|
-
lines.push(`${formatRed("✖")} ${result.summary}${codeText}`);
|
|
237
|
-
}
|
|
238
|
-
return lines.join("\n");
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Formats JSON output for database schema verification. The unclaimed-elements
|
|
242
|
-
* list is a top-level field alongside the combined result, reported once for
|
|
243
|
-
* the whole database.
|
|
244
|
-
*/
|
|
245
|
-
function formatSchemaVerifyJson(result, unclaimed = []) {
|
|
246
|
-
return JSON.stringify({
|
|
247
|
-
...result,
|
|
248
|
-
unclaimed
|
|
249
|
-
}, null, 2);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Formats human-readable output for database sign.
|
|
253
|
-
*/
|
|
254
|
-
function formatSignOutput(result, flags) {
|
|
255
|
-
if (flags.quiet) return "";
|
|
256
|
-
const lines = [];
|
|
257
|
-
const useColor = flags.color !== false;
|
|
258
|
-
const formatGreen = createColorFormatter(useColor, green);
|
|
259
|
-
const formatDimText = (text) => formatDim(useColor, text);
|
|
260
|
-
if (result.ok) {
|
|
261
|
-
lines.push(`${formatGreen("✔")} Database signed`);
|
|
262
|
-
const previousHash = result.marker.previous?.storageHash ?? "none";
|
|
263
|
-
const currentHash = result.contract.storageHash;
|
|
264
|
-
lines.push(`${formatDimText(` from: ${previousHash}`)}`);
|
|
265
|
-
lines.push(`${formatDimText(` to: ${currentHash}`)}`);
|
|
266
|
-
if (isVerbose(flags, 1)) {
|
|
267
|
-
if (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);
|
|
268
|
-
if (result.marker.previous?.profileHash) lines.push(`${formatDimText(` previous profileHash: ${result.marker.previous.profileHash}`)}`);
|
|
269
|
-
lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return lines.join("\n");
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Formats JSON output for database sign.
|
|
276
|
-
*/
|
|
277
|
-
function formatSignJson(result) {
|
|
278
|
-
return JSON.stringify(result, null, 2);
|
|
279
|
-
}
|
|
280
|
-
//#endregion
|
|
281
|
-
export { formatSignJson as a, formatVerifyOutput as c, formatSchemaVerifyOutput as i, formatIntrospectOutput as n, formatSignOutput as o, formatSchemaVerifyJson as r, formatVerifyJson as s, formatIntrospectJson as t };
|
|
282
|
-
|
|
283
|
-
//# sourceMappingURL=verify-Cogr_Fj9-D3lCWA6t.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-Cogr_Fj9-D3lCWA6t.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/verify-Cogr_Fj9.mjs"],"sourcesContent":["import { h as isVerbose, m as formatDim, p as createColorFormatter } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { bold, cyan, dim, green, magenta, red, yellow } from \"colorette\";\n//#region src/utils/formatters/verify.ts\n/** Human-readable label for each outcome, prefixed onto an issue's message for display. */\nconst OUTCOME_LABEL = {\n\t\"not-found\": \"missing\",\n\t\"not-expected\": \"extra\",\n\t\"not-equal\": \"mismatch\"\n};\n/**\n* The issue's display text: its own path, prefixed with a human label for\n* why it's flagged. Turning the presence-derived outcome (and the path) into\n* prose is this formatter's job, not the differ's — the differ's issue is\n* data (`path` + nodes), not prose.\n*/\nfunction formatIssueMessage(issue) {\n\treturn `${OUTCOME_LABEL[issueOutcome(issue)]}: ${issue.path.join(\"/\")}`;\n}\n/**\n* Formats human-readable output for database verify.\n*/\nfunction formatVerifyOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst verificationMode = result.mode === \"full\" ? `marker + schema${result.schema?.strict ? \" (strict)\" : \" (tolerant)\"}` : \"marker only (--marker-only)\";\n\tlines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\tlines.push(`${formatDimText(` verification: ${verificationMode}`)}`);\n\tlines.push(`${formatDimText(` storageHash: ${result.contract.storageHash}`)}`);\n\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\tif (result.schema?.warnings && result.schema.warnings.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of result.schema.warnings) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (result.unclaimed && result.unclaimed.length > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(formatYellow(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of result.unclaimed) lines.push(` ${formatYellow(\"⚠\")} ${name}`);\n\t}\n\tif (result.warning) {\n\t\tlines.push(\"\");\n\t\tlines.push(`${formatYellow(\"⚠\")} ${result.warning}`);\n\t}\n\tif (isVerbose(flags, 1)) {\n\t\tif (result.codecCoverageSkipped) lines.push(`${formatDimText(\" Codec coverage check skipped (helper returned no supported types)\")}`);\n\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database verify.\n*/\nfunction formatVerifyJson(result) {\n\tconst output = {\n\t\tok: result.ok,\n\t\tsummary: result.summary,\n\t\tmode: result.mode,\n\t\tcontract: result.contract,\n\t\t...ifDefined(\"marker\", result.marker),\n\t\ttarget: result.target,\n\t\t...ifDefined(\"missingCodecs\", result.missingCodecs),\n\t\t...ifDefined(\"codecCoverageSkipped\", result.codecCoverageSkipped),\n\t\t...ifDefined(\"schema\", result.schema),\n\t\tunclaimed: result.unclaimed ?? [],\n\t\t...ifDefined(\"warning\", result.warning),\n\t\t...ifDefined(\"meta\", result.meta),\n\t\ttimings: result.timings\n\t};\n\treturn JSON.stringify(output, null, 2);\n}\n/**\n* Formats JSON output for database introspection.\n*/\nfunction formatIntrospectJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n/**\n* Renders a schema tree structure from CoreSchemaView.\n* Status-glyph tree styling shared with the retired verification-tree renderer.\n*/\nfunction renderSchemaTree(node, flags, options) {\n\tconst { isLast, prefix, useColor, formatDimText, isRoot = false } = options;\n\tconst lines = [];\n\tlet formattedLabel = node.label;\n\tif (useColor) switch (node.kind) {\n\t\tcase \"root\":\n\t\t\tformattedLabel = bold(node.label);\n\t\t\tbreak;\n\t\tcase \"entity\": {\n\t\t\tconst tableMatch = node.label.match(/^table\\s+(.+)$/);\n\t\t\tif (tableMatch?.[1]) {\n\t\t\t\tconst tableName = tableMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"table\")} ${cyan(tableName)}`;\n\t\t\t} else formattedLabel = cyan(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"collection\":\n\t\t\tformattedLabel = dim(node.label);\n\t\t\tbreak;\n\t\tcase \"field\": {\n\t\t\tconst columnMatch = node.label.match(/^([^:]+):\\s*(.+)$/);\n\t\t\tif (columnMatch?.[1] && columnMatch[2]) {\n\t\t\t\tconst columnName = columnMatch[1];\n\t\t\t\tconst rest = columnMatch[2];\n\t\t\t\tconst typeMatch = rest.match(/^([^\\s(]+)\\s*(\\([^)]+\\))$/);\n\t\t\t\tif (typeMatch?.[1] && typeMatch[2]) {\n\t\t\t\t\tconst typeDisplay = typeMatch[1];\n\t\t\t\t\tconst nullability = typeMatch[2];\n\t\t\t\t\tformattedLabel = `${cyan(columnName)}: ${typeDisplay} ${dim(nullability)}`;\n\t\t\t\t} else formattedLabel = `${cyan(columnName)}: ${rest}`;\n\t\t\t} else formattedLabel = node.label;\n\t\t\tbreak;\n\t\t}\n\t\tcase \"index\": {\n\t\t\tconst pkMatch = node.label.match(/^primary key:\\s*(.+)$/);\n\t\t\tif (pkMatch?.[1]) {\n\t\t\t\tconst columnNames = pkMatch[1];\n\t\t\t\tformattedLabel = `${dim(\"primary key\")}: ${cyan(columnNames)}`;\n\t\t\t} else {\n\t\t\t\tconst uniqueMatch = node.label.match(/^unique\\s+(.+)$/);\n\t\t\t\tif (uniqueMatch?.[1]) {\n\t\t\t\t\tconst name = uniqueMatch[1];\n\t\t\t\t\tformattedLabel = `${dim(\"unique\")} ${cyan(name)}`;\n\t\t\t\t} else {\n\t\t\t\t\tconst indexMatch = node.label.match(/^(unique\\s+)?index\\s+(.+)$/);\n\t\t\t\t\tif (indexMatch?.[2]) {\n\t\t\t\t\t\tconst indexPrefix = indexMatch[1] ? `${dim(\"unique\")} ` : \"\";\n\t\t\t\t\t\tconst name = indexMatch[2];\n\t\t\t\t\t\tformattedLabel = `${indexPrefix}${dim(\"index\")} ${cyan(name)}`;\n\t\t\t\t\t} else formattedLabel = dim(node.label);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"dependency\": {\n\t\t\tconst extMatch = node.label.match(/^([^\\s]+)\\s+(extension is enabled)$/);\n\t\t\tif (extMatch?.[1] && extMatch[2]) {\n\t\t\t\tconst extName = extMatch[1];\n\t\t\t\tconst rest = extMatch[2];\n\t\t\t\tformattedLabel = `${cyan(extName)} ${dim(rest)}`;\n\t\t\t} else formattedLabel = magenta(node.label);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tformattedLabel = node.label;\n\t\t\tbreak;\n\t}\n\tif (isRoot) lines.push(formattedLabel);\n\telse {\n\t\tconst treePrefix = `${formatDimText(isLast ? \"└\" : \"├\")}─ `;\n\t\tlines.push(`${prefix}${treePrefix}${formattedLabel}`);\n\t}\n\tif (node.children && node.children.length > 0) {\n\t\tconst childPrefix = isRoot ? \"\" : `${prefix}${isLast ? \" \" : `${formatDimText(\"│\")} `}`;\n\t\tfor (let i = 0; i < node.children.length; i++) {\n\t\t\tconst child = node.children[i];\n\t\t\tif (!child) continue;\n\t\t\tconst childLines = renderSchemaTree(child, flags, {\n\t\t\t\tisLast: i === node.children.length - 1,\n\t\t\t\tprefix: childPrefix,\n\t\t\t\tuseColor,\n\t\t\t\tformatDimText,\n\t\t\t\tisRoot: false\n\t\t\t});\n\t\t\tlines.push(...childLines);\n\t\t}\n\t}\n\treturn lines;\n}\n/**\n* Formats human-readable output for database introspection.\n*/\nfunction formatIntrospectOutput(result, schemaView, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (schemaView) {\n\t\tconst treeLines = renderSchemaTree(schemaView.root, flags, {\n\t\t\tisLast: true,\n\t\t\tprefix: \"\",\n\t\t\tuseColor,\n\t\t\tformatDimText,\n\t\t\tisRoot: true\n\t\t});\n\t\tlines.push(...treeLines);\n\t} else {\n\t\tlines.push(`✔ ${result.summary}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tlines.push(` Target: ${result.target.familyId}/${result.target.id}`);\n\t\t\tif (result.meta?.dbUrl) lines.push(` Database: ${result.meta.dbUrl}`);\n\t\t}\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats human-readable output for database schema verification.\n*/\nfunction formatSchemaVerifyOutput(result, flags, unclaimed = []) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatRed = createColorFormatter(useColor, red);\n\tconst formatYellow = createColorFormatter(useColor, yellow);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tconst issueMessages = result.schema.issues.map(formatIssueMessage);\n\tif (issueMessages.length > 0) {\n\t\tlines.push(formatRed(\"Schema issues:\"));\n\t\tfor (const message of issueMessages) lines.push(` ${formatRed(\"✖\")} ${message}`);\n\t}\n\tconst warningMessages = (result.schema.warnings?.issues ?? []).map(formatIssueMessage);\n\tif (warningMessages.length > 0) {\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push(formatYellow(\"Schema warnings:\"));\n\t\tfor (const message of warningMessages) lines.push(` ${formatYellow(\"⚠\")} ${message}`);\n\t}\n\tif (unclaimed.length > 0) {\n\t\tconst strict = result.meta?.strict ?? false;\n\t\tif (lines.length > 0) lines.push(\"\");\n\t\tlines.push((strict ? formatRed : formatYellow)(\"Unclaimed elements (declared by no contract):\"));\n\t\tfor (const name of unclaimed) lines.push(` ${(strict ? formatRed : formatYellow)(strict ? \"✖\" : \"⚠\")} ${name}`);\n\t}\n\tif (isVerbose(flags, 1)) lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\tif (lines.length > 0) lines.push(\"\");\n\tif (result.ok) lines.push(`${formatGreen(\"✔\")} ${result.summary}`);\n\telse {\n\t\tconst codeText = result.code ? ` (${result.code})` : \"\";\n\t\tlines.push(`${formatRed(\"✖\")} ${result.summary}${codeText}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database schema verification. The unclaimed-elements\n* list is a top-level field alongside the combined result, reported once for\n* the whole database.\n*/\nfunction formatSchemaVerifyJson(result, unclaimed = []) {\n\treturn JSON.stringify({\n\t\t...result,\n\t\tunclaimed\n\t}, null, 2);\n}\n/**\n* Formats human-readable output for database sign.\n*/\nfunction formatSignOutput(result, flags) {\n\tif (flags.quiet) return \"\";\n\tconst lines = [];\n\tconst useColor = flags.color !== false;\n\tconst formatGreen = createColorFormatter(useColor, green);\n\tconst formatDimText = (text) => formatDim(useColor, text);\n\tif (result.ok) {\n\t\tlines.push(`${formatGreen(\"✔\")} Database signed`);\n\t\tconst previousHash = result.marker.previous?.storageHash ?? \"none\";\n\t\tconst currentHash = result.contract.storageHash;\n\t\tlines.push(`${formatDimText(` from: ${previousHash}`)}`);\n\t\tlines.push(`${formatDimText(` to: ${currentHash}`)}`);\n\t\tif (isVerbose(flags, 1)) {\n\t\t\tif (result.contract.profileHash) lines.push(`${formatDimText(` profileHash: ${result.contract.profileHash}`)}`);\n\t\t\tif (result.marker.previous?.profileHash) lines.push(`${formatDimText(` previous profileHash: ${result.marker.previous.profileHash}`)}`);\n\t\t\tlines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats JSON output for database sign.\n*/\nfunction formatSignJson(result) {\n\treturn JSON.stringify(result, null, 2);\n}\n//#endregion\nexport { formatSignJson as a, formatVerifyOutput as c, formatSchemaVerifyOutput as i, formatIntrospectOutput as n, formatSignOutput as o, formatSchemaVerifyJson as r, formatVerifyJson as s, formatIntrospectJson as t };\n\n//# sourceMappingURL=verify-Cogr_Fj9.mjs.map"],"mappings":";;;;;;AAMA,MAAM,gBAAgB;CACrB,aAAa;CACb,gBAAgB;CAChB,aAAa;AACd;;;;;;;AAOA,SAAS,mBAAmB,OAAO;CAClC,OAAO,GAAG,cAAc,aAAa,KAAK,GAAG,IAAI,MAAM,KAAK,KAAK,GAAG;AACrE;;;;AAIA,SAAS,mBAAmB,QAAQ,OAAO;CAC1C,IAAI,MAAM,OAAO,OAAO;CACxB,MAAM,QAAQ,CAAC;CACf,MAAM,WAAW,MAAM,UAAU;CACjC,MAAM,cAAc,qBAAqB,UAAU,KAAK;CACxD,MAAM,eAAe,qBAAqB,UAAU,MAAM;CAC1D,MAAM,iBAAiB,SAAS,UAAU,UAAU,IAAI;CACxD,MAAM,mBAAmB,OAAO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