@prisma/orm-framework 8.0.0-rc.2-dev.2 → 8.0.0-rc.20
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 +1 -5
- package/dist/{apply-specifier-default-control-policy-CAxiXxKg.d.mts → apply-specifier-default-control-policy-Dlz0iwnK.d.mts} +2 -2
- package/dist/apply-specifier-default-control-policy-Dlz0iwnK.d.mts.map +1 -0
- package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
- package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
- package/dist/authoring-CNUti739.mjs +764 -0
- package/dist/authoring-CNUti739.mjs.map +1 -0
- package/dist/authoring-CjwinhU5.d.mts +206 -0
- package/dist/authoring-CjwinhU5.d.mts.map +1 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts +515 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts.map +1 -0
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts → canonicalization-CyrrXGmj-CeKUkht1.d.mts} +3 -3
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts.map → canonicalization-CyrrXGmj-CeKUkht1.d.mts.map} +1 -1
- package/dist/{hashing-utils-DQgS3nOe.mjs → canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs} +23 -3
- package/dist/canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs.map +1 -0
- package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
- package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
- package/dist/codec-B4ypaota.d.mts +289 -0
- package/dist/codec-B4ypaota.d.mts.map +1 -0
- package/dist/codec-Do8tfXqk.mjs +457 -0
- package/dist/codec-Do8tfXqk.mjs.map +1 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs +93 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs.map +1 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs +22 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs.map +1 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts +384 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts.map +1 -0
- package/dist/{components-dZRz3T5y.mjs → components-BaV9iCkq.mjs} +34 -3
- package/dist/components-BaV9iCkq.mjs.map +1 -0
- package/dist/components-CRBcIta_.d.mts +86 -0
- package/dist/components-CRBcIta_.d.mts.map +1 -0
- package/dist/components.d.mts +19 -17
- package/dist/components.mjs +16 -12
- package/dist/components__authoring.d.mts +4 -3
- package/dist/components__authoring.mjs +3 -2
- package/dist/components__codec.d.mts +3 -3
- package/dist/components__codec.mjs +6 -4
- package/dist/components__components.d.mts +6 -4
- package/dist/components__components.mjs +4 -3
- package/dist/components__control.d.mts +5 -4
- package/dist/components__control.mjs +3 -2
- package/dist/components__emission.d.mts +4 -4
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__ir.d.mts +1 -1
- package/dist/components__ir.mjs +2 -1
- package/dist/components__psl-ast.d.mts +4 -4
- package/dist/components__psl-ast.mjs +2 -2
- package/dist/components__runtime.d.mts +3 -2
- package/dist/components__runtime.mjs +2 -2
- package/dist/components__utils.mjs +1 -1
- package/dist/{config-types-CW4PDwMC.d.mts → config-types-BTFT7QfJ.d.mts} +73 -41
- package/dist/config-types-BTFT7QfJ.d.mts.map +1 -0
- package/dist/config-types-D0mYyP62.mjs +61 -0
- package/dist/config-types-D0mYyP62.mjs.map +1 -0
- package/dist/config.d.mts +2 -3
- package/dist/config.mjs +2 -3
- package/dist/config__config-types.d.mts +2 -2
- package/dist/config__config-types.mjs +2 -2
- package/dist/contract-authoring.d.mts +152 -17
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +190 -9
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts → contract-types-DEIEpzU_-DvAVuBr5.d.mts} +14 -8
- package/dist/contract-types-DEIEpzU_-DvAVuBr5.d.mts.map +1 -0
- package/dist/{contract-validation-error-DEiWp_EI-CRwtUgRw.mjs → contract-validation-error-CAnTGhkt-DSnujRaK.mjs} +6 -3
- package/dist/contract-validation-error-CAnTGhkt-DSnujRaK.mjs.map +1 -0
- package/dist/{contract-validation-error-R7cMoK04.d.mts → contract-validation-error-D1QAeOh5.d.mts} +4 -2
- package/dist/contract-validation-error-D1QAeOh5.d.mts.map +1 -0
- package/dist/contract.d.mts +13 -12
- package/dist/contract.mjs +9 -9
- package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
- package/dist/contract__contract-validation-error.d.mts +1 -1
- package/dist/contract__contract-validation-error.mjs +1 -1
- package/dist/contract__default-namespace.mjs +1 -1
- package/dist/contract__enum-accessor.d.mts +2 -2
- package/dist/contract__enum-accessor.mjs +1 -1
- package/dist/contract__hashing-utils.d.mts +2 -2
- package/dist/contract__hashing-utils.mjs +2 -3
- package/dist/contract__hashing.d.mts +3 -3
- package/dist/contract__hashing.mjs +2 -2
- package/dist/contract__resolve-domain-model.d.mts +1 -1
- package/dist/contract__types.d.mts +5 -5
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validate-domain.d.mts +1 -1
- package/dist/contract__validate-domain.mjs +1 -1
- package/dist/contract__validate-once.d.mts +2 -0
- package/dist/contract__validate-once.mjs +2 -0
- package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts → control-B5ezUWD2-BIAYxeSk.d.mts} +34 -6
- package/dist/control-B5ezUWD2-BIAYxeSk.d.mts.map +1 -0
- package/dist/{control-DLEm6u5m.mjs → control-DMJqhnwU.mjs} +309 -36
- package/dist/control-DMJqhnwU.mjs.map +1 -0
- package/dist/control-DrDTlxCS.d.mts +1 -0
- package/dist/{control-BD96JZi8-NUhO5Kkw.mjs → control-KsXr4fYD-D2Ows0NI.mjs} +70 -24
- package/dist/control-KsXr4fYD-D2Ows0NI.mjs.map +1 -0
- package/dist/{control-BF8qzdnM.d.mts → control-s5ECUABR.d.mts} +635 -156
- package/dist/control-s5ECUABR.d.mts.map +1 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs +275 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs.map +1 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs +459 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs.map +1 -0
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs → default-namespace-D4vCwkXg-BEZbN38y.mjs} +2 -2
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs.map → default-namespace-D4vCwkXg-BEZbN38y.mjs.map} +1 -1
- package/dist/{dist-Dqbo77p7.mjs → dist-D1f6xr7F.mjs} +51 -24
- package/dist/dist-D1f6xr7F.mjs.map +1 -0
- package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts → domain-envelope-CN721GnP-4huRt7Wc.d.mts} +27 -13
- package/dist/domain-envelope-CN721GnP-4huRt7Wc.d.mts.map +1 -0
- package/dist/emission-BtJvV97M.d.mts +2 -0
- package/dist/{emission-types-DLXP34Ki-CFms3VrX.d.mts → emission-types-B-jKEbjI-D7BW8Gk1.d.mts} +17 -16
- package/dist/emission-types-B-jKEbjI-D7BW8Gk1.d.mts.map +1 -0
- package/dist/enum-accessor-2OZgavDX.d.mts +104 -0
- package/dist/enum-accessor-2OZgavDX.d.mts.map +1 -0
- package/dist/enum-accessor-B-A2wNok.mjs +122 -0
- package/dist/enum-accessor-B-A2wNok.mjs.map +1 -0
- package/dist/errors.d.mts +5 -4
- package/dist/errors.mjs +4 -4
- package/dist/errors__control.d.mts +3 -2
- package/dist/errors__control.mjs +2 -2
- package/dist/errors__execution.d.mts +2 -2
- package/dist/errors__execution.mjs +2 -2
- package/dist/errors__migration.d.mts +2 -2
- package/dist/errors__migration.mjs +2 -2
- package/dist/execution-CjX5CCTb.d.mts +76 -0
- package/dist/execution-CjX5CCTb.d.mts.map +1 -0
- package/dist/{execution-CSnQT8EX.d.mts → execution-lMPVFj5o.d.mts} +2 -2
- package/dist/{execution-CSnQT8EX.d.mts.map → execution-lMPVFj5o.d.mts.map} +1 -1
- package/dist/execution-vfY4d-SZ.mjs +138 -0
- package/dist/execution-vfY4d-SZ.mjs.map +1 -0
- package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs → expressions-CMQzbnHk-BL2zN0Iv.mjs} +199 -350
- package/dist/expressions-CMQzbnHk-BL2zN0Iv.mjs.map +1 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts +1096 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts.map +1 -0
- package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts → framework-components-DKoQnPdB-lax1COaf.d.mts} +28 -91
- package/dist/framework-components-DKoQnPdB-lax1COaf.d.mts.map +1 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs +271 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map +1 -0
- package/dist/{hash-content-DwEUh-Rx.d.mts → hash-content-Bde14N2-.d.mts} +2 -2
- package/dist/{hash-content-DwEUh-Rx.d.mts.map → hash-content-Bde14N2-.d.mts.map} +1 -1
- package/dist/{hash-content-Bugg_nZn.mjs → hash-content-Bdl-HSfq.mjs} +2 -2
- package/dist/hash-content-Bdl-HSfq.mjs.map +1 -0
- package/dist/{hashing-BtIZVNYX.mjs → hashing-CLRfNAxh.mjs} +28 -9
- package/dist/hashing-CLRfNAxh.mjs.map +1 -0
- package/dist/hashing-D-DHz0zl.d.mts +36 -0
- package/dist/hashing-D-DHz0zl.d.mts.map +1 -0
- package/dist/{hashing-utils-qKu59RSC.d.mts → hashing-utils-DiGHKd3b.d.mts} +4 -3
- package/dist/{hashing-utils-qKu59RSC.d.mts.map → hashing-utils-DiGHKd3b.d.mts.map} +1 -1
- package/dist/ids.d.mts +90 -13
- package/dist/ids.d.mts.map +1 -1
- package/dist/ids.mjs +45 -59
- package/dist/ids.mjs.map +1 -1
- package/dist/ids__runtime.d.mts +1 -1
- package/dist/ids__runtime.mjs +1 -1
- package/dist/{index-CDk9yEbw.d.mts → index-MU-ksXsh.d.mts} +23 -6
- package/dist/index-MU-ksXsh.d.mts.map +1 -0
- package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
- package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
- package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
- package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
- package/dist/{ir-BvE7L9FK.d.mts → ir-LV4tXsw3.d.mts} +6 -5
- package/dist/{ir-BvE7L9FK.d.mts.map → ir-LV4tXsw3.d.mts.map} +1 -1
- package/dist/{ir-ChmSSAhX.mjs → ir-uDGU9vaj.mjs} +7 -53
- package/dist/ir-uDGU9vaj.mjs.map +1 -0
- package/dist/{migration-BvrgDZXw.d.mts → migration-Dluwnqe9.d.mts} +20 -3
- package/dist/migration-Dluwnqe9.d.mts.map +1 -0
- package/dist/{migration-C57VKLUY.mjs → migration-uC-bSKA4.mjs} +30 -4
- package/dist/migration-uC-bSKA4.mjs.map +1 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
- package/dist/operations.mjs +1 -1
- package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-bZgfjovA-BNgYhylT.mjs} +311 -55
- package/dist/parse-bZgfjovA-BNgYhylT.mjs.map +1 -0
- package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts → parse-djL5wker-B610mXG4.d.mts} +181 -52
- package/dist/parse-djL5wker-B610mXG4.d.mts.map +1 -0
- package/dist/psl-ast-COcYtLlz.d.mts +2 -0
- package/dist/psl-ast-CyvE6CR-.mjs +116 -0
- package/dist/psl-ast-CyvE6CR-.mjs.map +1 -0
- package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts → psl-ast-rY25o3Ze-ClLY3CYt.d.mts} +10 -40
- package/dist/psl-ast-rY25o3Ze-ClLY3CYt.d.mts.map +1 -0
- package/dist/psl-parser.d.mts +415 -101
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +2451 -537
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +8 -2
- package/dist/psl-parser__format.d.mts.map +1 -1
- package/dist/psl-parser__format.mjs +65 -34
- package/dist/psl-parser__format.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +98 -10
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +393 -2
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +3 -3
- package/dist/psl-parser__syntax.mjs +4 -43
- package/dist/psl-parser__tokenizer.d.mts +1 -1
- package/dist/psl-parser__tokenizer.mjs +1 -1
- package/dist/psl-printer.d.mts +7 -17
- package/dist/psl-printer.d.mts.map +1 -1
- package/dist/psl-printer.mjs +35 -104
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs +74 -0
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs.map +1 -0
- package/dist/{resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts → resolve-domain-model-BNr1glea-BLuR-phK.d.mts} +3 -3
- package/dist/resolve-domain-model-BNr1glea-BLuR-phK.d.mts.map +1 -0
- package/dist/{result-CBZ8X9mU.mjs → result-8OXF26MN.mjs} +14 -3
- package/dist/{result-CBZ8X9mU.mjs.map → result-8OXF26MN.mjs.map} +1 -1
- package/dist/{result-Bpupv5vO.d.mts → result-BYCOANWy.d.mts} +4 -2
- package/dist/result-BYCOANWy.d.mts.map +1 -0
- package/dist/runtime-B-YYuWy2.d.mts +899 -0
- package/dist/runtime-B-YYuWy2.d.mts.map +1 -0
- package/dist/runtime-DSYSc98Y.mjs +1059 -0
- package/dist/runtime-DSYSc98Y.mjs.map +1 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts +19 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts.map +1 -0
- package/dist/{structured-error-CgiSMpdU.mjs → structured-error-BXbihKQ-.mjs} +3 -3
- package/dist/{structured-error-CgiSMpdU.mjs.map → structured-error-BXbihKQ-.mjs.map} +1 -1
- package/dist/{structured-error-BsNT4Hun.d.mts → structured-error-Cc7AIRsp.d.mts} +19 -5
- package/dist/structured-error-Cc7AIRsp.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs +1276 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs.map +1 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts +258 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts.map +1 -0
- package/dist/text-C3TTEtgd.mjs +35 -0
- package/dist/text-C3TTEtgd.mjs.map +1 -0
- package/dist/text-C8_-rheN.d.mts +15 -0
- package/dist/text-C8_-rheN.d.mts.map +1 -0
- package/dist/{tokenizer-1hAHZzmp-QGPORvmA.mjs → tokenizer-C-GTKKjR-B1vOzJy0.mjs} +54 -10
- package/dist/tokenizer-C-GTKKjR-B1vOzJy0.mjs.map +1 -0
- package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-i8RaVWVa-7fRwlCPP.d.mts} +9 -4
- package/dist/tokenizer-i8RaVWVa-7fRwlCPP.d.mts.map +1 -0
- package/dist/ts-render.d.mts +2 -2
- package/dist/ts-render.mjs +2 -2
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs +261 -0
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs.map +1 -0
- package/dist/{types-BnH4zYvN.mjs → types-B8ULzMAX.mjs} +36 -3
- package/dist/types-B8ULzMAX.mjs.map +1 -0
- package/dist/types-GNXJ7xW2.d.mts +131 -0
- package/dist/types-GNXJ7xW2.d.mts.map +1 -0
- package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts → types-import-spec-DQjfX-gM-zVncuzs0.d.mts} +6 -6
- package/dist/types-import-spec-DQjfX-gM-zVncuzs0.d.mts.map +1 -0
- package/dist/utils.d.mts +7 -5
- package/dist/utils.mjs +9 -7
- package/dist/utils__assertions.mjs +1 -1
- package/dist/utils__hash-content.d.mts +1 -1
- package/dist/utils__hash-content.mjs +1 -1
- package/dist/utils__internal-error.d.mts +1 -1
- package/dist/utils__internal-error.mjs +1 -1
- package/dist/utils__result.d.mts +2 -2
- package/dist/utils__result.mjs +2 -2
- package/dist/utils__structured-error.d.mts +2 -2
- package/dist/utils__structured-error.mjs +1 -1
- package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
- package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
- package/dist/utils__text.d.mts +2 -0
- package/dist/utils__text.mjs +2 -0
- package/dist/{validate-domain-BNBs-TVv.d.mts → validate-domain-B5kmlBFB.d.mts} +10 -6
- package/dist/validate-domain-B5kmlBFB.d.mts.map +1 -0
- package/dist/{validate-domain-BkvFlY3B.mjs → validate-domain-CbXHDYpF.mjs} +43 -22
- package/dist/validate-domain-CbXHDYpF.mjs.map +1 -0
- package/dist/validate-once-D-IwXHYP.mjs +42 -0
- package/dist/validate-once-D-IwXHYP.mjs.map +1 -0
- package/dist/validate-once-gfCOHsDh.d.mts +16 -0
- package/dist/validate-once-gfCOHsDh.d.mts.map +1 -0
- package/package.json +24 -20
- package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +0 -1
- package/dist/authoring-B2H-9qCv.d.mts +0 -1
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +0 -25
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +0 -1
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs +0 -120
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs.map +0 -1
- package/dist/codec-Cd0QcxAx.mjs +0 -63
- package/dist/codec-Cd0QcxAx.mjs.map +0 -1
- package/dist/codec-Ce07W3Mz.d.mts +0 -112
- package/dist/codec-Ce07W3Mz.d.mts.map +0 -1
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts +0 -223
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts.map +0 -1
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs +0 -30
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs.map +0 -1
- package/dist/components-CGA_WwEG.d.mts +0 -50
- package/dist/components-CGA_WwEG.d.mts.map +0 -1
- package/dist/components-dZRz3T5y.mjs.map +0 -1
- package/dist/config-types-BqhNxw0z.mjs +0 -67
- package/dist/config-types-BqhNxw0z.mjs.map +0 -1
- package/dist/config-types-CW4PDwMC.d.mts.map +0 -1
- package/dist/config-validation-DPt5hwQx.mjs +0 -168
- package/dist/config-validation-DPt5hwQx.mjs.map +0 -1
- package/dist/config-validation-Wiqew2J9.d.mts +0 -21
- package/dist/config-validation-Wiqew2J9.d.mts.map +0 -1
- package/dist/config__config-validation.d.mts +0 -2
- package/dist/config__config-validation.mjs +0 -2
- package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +0 -1
- package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +0 -1
- package/dist/contract-validation-error-R7cMoK04.d.mts.map +0 -1
- package/dist/control-BD96JZi8-NUhO5Kkw.mjs.map +0 -1
- package/dist/control-BF8qzdnM.d.mts.map +0 -1
- package/dist/control-DLEm6u5m.mjs.map +0 -1
- package/dist/control-ql9N9u4f-r3Vv41kZ.d.mts.map +0 -1
- package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +0 -1
- package/dist/dist-Dqbo77p7.mjs.map +0 -1
- package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +0 -1
- package/dist/emission-CmUO03gQ.d.mts +0 -2
- package/dist/emission-types-DLXP34Ki-CFms3VrX.d.mts.map +0 -1
- package/dist/enum-accessor-Db5DaTNX.mjs +0 -35
- package/dist/enum-accessor-Db5DaTNX.mjs.map +0 -1
- package/dist/enum-accessor-PH5vjghI.d.mts +0 -85
- package/dist/enum-accessor-PH5vjghI.d.mts.map +0 -1
- package/dist/execution-Crk6IfTs.mjs +0 -218
- package/dist/execution-Crk6IfTs.mjs.map +0 -1
- package/dist/execution-Cyl2dXxX.d.mts +0 -115
- package/dist/execution-Cyl2dXxX.d.mts.map +0 -1
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts +0 -777
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts.map +0 -1
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs +0 -698
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs.map +0 -1
- package/dist/framework-components-hZ2tO-KH-CdRXBOYd.d.mts.map +0 -1
- package/dist/hash-content-Bugg_nZn.mjs.map +0 -1
- package/dist/hashing-BtIZVNYX.mjs.map +0 -1
- package/dist/hashing-CccSPELN.d.mts +0 -25
- package/dist/hashing-CccSPELN.d.mts.map +0 -1
- package/dist/hashing-utils-DQgS3nOe.mjs.map +0 -1
- package/dist/index-CDk9yEbw.d.mts.map +0 -1
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
- package/dist/ir-ChmSSAhX.mjs.map +0 -1
- package/dist/migration-BvrgDZXw.d.mts.map +0 -1
- package/dist/migration-C57VKLUY.mjs.map +0 -1
- package/dist/parse-0ZJjj_2N-DhQpSVmQ.d.mts.map +0 -1
- package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +0 -1
- package/dist/psl-ast-BXZoFQBk.d.mts +0 -37
- package/dist/psl-ast-BXZoFQBk.d.mts.map +0 -1
- package/dist/psl-ast-CWJQF8LA-Vr5JNPdn.d.mts.map +0 -1
- package/dist/psl-ast-DUCvVXbB.mjs +0 -239
- package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
- package/dist/psl-parser__syntax.mjs.map +0 -1
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +0 -59
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +0 -1
- package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +0 -1
- package/dist/result-Bpupv5vO.d.mts.map +0 -1
- package/dist/runtime-BqzioOmU.mjs +0 -670
- package/dist/runtime-BqzioOmU.mjs.map +0 -1
- package/dist/runtime-Cuxw8obj.d.mts +0 -1038
- package/dist/runtime-Cuxw8obj.d.mts.map +0 -1
- package/dist/structured-error-BsNT4Hun.d.mts.map +0 -1
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts +0 -125
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map +0 -1
- package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +0 -1
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
- package/dist/types-BnH4zYvN.mjs.map +0 -1
- package/dist/types-ByeQhU9p.d.mts +0 -17
- package/dist/types-ByeQhU9p.d.mts.map +0 -1
- package/dist/types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map +0 -1
- package/dist/utils-DMAM0unR.mjs.map +0 -1
- package/dist/validate-domain-BNBs-TVv.d.mts.map +0 -1
- package/dist/validate-domain-BkvFlY3B.mjs.map +0 -1
|
@@ -1,84 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as ControlPolicy, t as Contract } from "./contract-types-
|
|
3
|
-
import { t as AnyCodecDescriptor,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { T as ContractWithDomain, U as NamespaceId, V as LedgerEntryRecord, m as ContractMarkerRecord } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
|
|
2
|
+
import { i as ControlPolicy, t as Contract } from "./contract-types-DEIEpzU_-DvAVuBr5.mjs";
|
|
3
|
+
import { _ as DataType, h as CodecRegistry, t as AnyCodecDescriptor, y as DataTypeLookup } from "./codec-types-CPgEZoIq-BL9hisr8.mjs";
|
|
4
|
+
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
5
|
+
import { E as AuthoringPslBlockDescriptorNamespace, G as DataTypeAuthoringEntry, K as DataTypeSupport, P as AuthoringTypeNamespace, a as AuthoringAttributeSpecContributions, b as AuthoringModelAttributeDescriptorNamespace, et as GeneratorFunctionField, h as AuthoringFieldNamespace, n as AssembledControlMutationDefaults, p as AuthoringEntityTypeNamespace, s as AuthoringContributions, tt as GeneratorFunctionRegistry } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
6
|
+
import { n as ContributedHelper } from "./temporal-presets-BuMqk7h8-DZSuu4Z_.mjs";
|
|
7
|
+
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-DQjfX-gM-zVncuzs0.mjs";
|
|
6
8
|
import { t as CapabilityMatrix } from "./capabilities-Cupq4-1--C71ORI3N.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { r as ImportSpecifierResolver, t as EmissionSpi } from "./emission-types-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, y as TargetDescriptor } from "./framework-components-DKoQnPdB-lax1COaf.mjs";
|
|
10
|
+
import { r as ImportSpecifierResolver, t as EmissionSpi } from "./emission-types-B-jKEbjI-D7BW8Gk1.mjs";
|
|
11
|
+
import { f as PslDocumentAst } from "./psl-ast-rY25o3Ze-ClLY3CYt.mjs";
|
|
12
|
+
import { a as StructuredError } from "./structured-error-Cc7AIRsp.mjs";
|
|
13
|
+
import { t as ImportRequirement } from "./index-MU-ksXsh.mjs";
|
|
11
14
|
import { n as JsonObject } from "./json-Dkqr3say.mjs";
|
|
12
|
-
import { i as StorageSort, n as PreserveEmptyPredicate } from "./canonicalization-
|
|
13
|
-
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
15
|
+
import { i as StorageSort, n as PreserveEmptyPredicate } from "./canonicalization-CyrrXGmj-CeKUkht1.mjs";
|
|
14
16
|
//#region ../../../1-framework/1-core/framework-components/dist/control.d.mts
|
|
15
|
-
//#region src/control/contract-serializer.d.ts
|
|
16
|
-
/**
|
|
17
|
-
* Framework SPI for moving a contract between its canonical on-disk JSON
|
|
18
|
-
* form and its in-memory class-hierarchy form. Both directions live on the
|
|
19
|
-
* same SPI so the conceptual seam — "the boundary where the contract
|
|
20
|
-
* crosses between persisted JSON and live class instances" — has a single
|
|
21
|
-
* named home.
|
|
22
|
-
*
|
|
23
|
-
* Both faces are needed by the framework today (round-trip property tests,
|
|
24
|
-
* drift detection, future canonicalization), not eventually. For most
|
|
25
|
-
* targets `serializeContract` is identity over JSON-clean class instances;
|
|
26
|
-
* the method exists because the seam is real, not as a convention placeholder.
|
|
27
|
-
*
|
|
28
|
-
* Implementers compose this SPI as a named property on their target
|
|
29
|
-
* descriptor (`descriptor.contractSerializer`); the descriptor itself
|
|
30
|
-
* remains the aggregator of all per-target SPIs.
|
|
31
|
-
*/
|
|
32
|
-
interface ContractSerializer<TContract> {
|
|
33
|
-
/**
|
|
34
|
-
* Validate the JSON shape and construct typed class instances. Throws on
|
|
35
|
-
* structural / domain / storage validation failures. Returns the typed
|
|
36
|
-
* contract on success.
|
|
37
|
-
*
|
|
38
|
-
* The method-level type parameter lets call sites that hold a
|
|
39
|
-
* precisely-typed contract literal (e.g. `typeof contract` from a
|
|
40
|
-
* generated `contract.d.ts`) recover that literal type without an
|
|
41
|
-
* external cast. The default `T = TContract` preserves the inferred
|
|
42
|
-
* return type for every caller that does not opt in.
|
|
43
|
-
*/
|
|
44
|
-
deserializeContract<T extends TContract = TContract>(json: unknown): T;
|
|
45
|
-
/**
|
|
46
|
-
* Serialize a typed contract to its canonical JSON shape. Returns
|
|
47
|
-
* `JsonObject` so callers can stringify, hash, or feed the result into
|
|
48
|
-
* another SPI without re-asserting JSON-cleanness. Targets whose contract
|
|
49
|
-
* fields are JSON-clean by construction return the contract unchanged
|
|
50
|
-
* (the symmetric pair to `deserializeContract`); targets that need to
|
|
51
|
-
* canonicalize on the way out (key ordering, dropping computed-only
|
|
52
|
-
* fields, normalizing numeric encodings) do that work here.
|
|
53
|
-
*/
|
|
54
|
-
serializeContract(contract: TContract): JsonObject;
|
|
55
|
-
/**
|
|
56
|
-
* Optional family-contributed preserve-empty predicate for the
|
|
57
|
-
* framework canonicalizer. When present, the canonicalizer calls this
|
|
58
|
-
* inside its default-omission walk to let the family veto the stripping
|
|
59
|
-
* of empty objects/arrays/`false` values at family-specific storage paths.
|
|
60
|
-
* Families whose storage has no such special-case paths omit this hook.
|
|
61
|
-
*/
|
|
62
|
-
readonly shouldPreserveEmpty?: PreserveEmptyPredicate;
|
|
63
|
-
/**
|
|
64
|
-
* Optional family-contributed storage sort hook for the framework
|
|
65
|
-
* canonicalizer. When present, the canonicalizer applies this to the
|
|
66
|
-
* serialized `storage` subtree after the omission walk and before the
|
|
67
|
-
* final key sort. Families that need deterministic ordering of storage
|
|
68
|
-
* arrays (e.g. SQL `indexes`/`uniques`) supply this hook.
|
|
69
|
-
*/
|
|
70
|
-
readonly sortStorage?: StorageSort;
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/control/contract-snapshot-layout.d.ts
|
|
74
|
-
declare const CONTRACT_SNAPSHOTS_DIRNAME = "snapshots";
|
|
75
|
-
/** Validate a storage hash for use as a directory name. */
|
|
76
|
-
declare function storageHashHex(storageHash: string): string;
|
|
77
|
-
/** Module specifier for the store's `contract.json`, POSIX separators. */
|
|
78
|
-
declare function contractSnapshotJsonSpecifier(snapshotsImportPath: string, storageHash: string): string;
|
|
79
|
-
/** Type-only module specifier for the store's `contract.d.ts` (no extension). */
|
|
80
|
-
declare function contractSnapshotTypesSpecifier(snapshotsImportPath: string, storageHash: string): string;
|
|
81
|
-
//#endregion
|
|
82
17
|
//#region src/control/schema-diff.d.ts
|
|
83
18
|
/**
|
|
84
19
|
* A root-anchored chain of `(nodeKind, id)` steps identifying a node in a
|
|
@@ -106,6 +41,19 @@ interface SchemaDiffIssue<TNode extends DiffableNode = DiffableNode> {
|
|
|
106
41
|
* (the dependency is satisfied by reality).
|
|
107
42
|
*/
|
|
108
43
|
readonly dependsOn?: readonly (readonly string[])[];
|
|
44
|
+
/** Why the actual node is not equal to the expected one, when the expected node can say. Not an outcome: read that with `issueOutcome`. */
|
|
45
|
+
readonly explanation?: MismatchExplanation;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The cause of a mismatch the expected node can name: the two sides hold different values
|
|
49
|
+
* (`differs`), or the database may hold the expected value in a form of its own, so the two may
|
|
50
|
+
* mean the same (`possibly-equivalent`). A tool that chooses actions from the cause maps every value.
|
|
51
|
+
*/
|
|
52
|
+
type MismatchCause = 'differs' | 'possibly-equivalent';
|
|
53
|
+
interface MismatchExplanation {
|
|
54
|
+
/** The explanation as text for people. */
|
|
55
|
+
readonly text: string;
|
|
56
|
+
readonly cause: MismatchCause;
|
|
109
57
|
}
|
|
110
58
|
/**
|
|
111
59
|
* The three ways an actual state can fail an expectation: it lacks a node that
|
|
@@ -154,6 +102,12 @@ interface DiffableNode {
|
|
|
154
102
|
*/
|
|
155
103
|
readonly dependsOn?: readonly SchemaNodeRef[];
|
|
156
104
|
isEqualTo(other: DiffableNode): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Why the actual state does not satisfy this expected node, when the difference has a cause beyond
|
|
107
|
+
* the two values, such as an expected value the node's type refuses. Called after `isEqualTo`
|
|
108
|
+
* returned false, and with `undefined` when the actual side has no such node.
|
|
109
|
+
*/
|
|
110
|
+
explainMismatch?(actual: DiffableNode | undefined): MismatchExplanation | undefined;
|
|
157
111
|
children(): readonly DiffableNode[];
|
|
158
112
|
}
|
|
159
113
|
/**
|
|
@@ -282,33 +236,47 @@ interface IntrospectSchemaResult<TSchemaIR> {
|
|
|
282
236
|
readonly total: number;
|
|
283
237
|
};
|
|
284
238
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
readonly
|
|
288
|
-
readonly
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
239
|
+
/** The two hashes a contract marker holds. */
|
|
240
|
+
interface MarkerHashes {
|
|
241
|
+
readonly storageHash: string;
|
|
242
|
+
readonly profileHash: string;
|
|
243
|
+
}
|
|
244
|
+
/** Whether two markers hold the same hashes, `null` standing for no marker. */
|
|
245
|
+
declare function sameMarkerHashes(a: MarkerHashes | null, b: MarkerHashes | null): boolean;
|
|
246
|
+
/** A contract space whose marker is to be written with its contract's hashes. */
|
|
247
|
+
interface SpaceToSign {
|
|
248
|
+
readonly space: string;
|
|
249
|
+
readonly contract: Contract;
|
|
250
|
+
/**
|
|
251
|
+
* The space's marker as the caller read it before verifying the space, or `null` when it had none. The marker is written only while it still holds these hashes.
|
|
252
|
+
*/
|
|
253
|
+
readonly expected: MarkerHashes | null;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* A space whose marker now holds its contract's hashes: `created` when it had no marker, `updated` when it held the hashes in `previous`, `unchanged` when it already held the contract's.
|
|
257
|
+
*/
|
|
258
|
+
type SpaceSigned = {
|
|
259
|
+
readonly status: 'created' | 'unchanged';
|
|
260
|
+
readonly space: string;
|
|
261
|
+
readonly contract: MarkerHashes;
|
|
262
|
+
} | {
|
|
263
|
+
readonly status: 'updated';
|
|
264
|
+
readonly space: string;
|
|
265
|
+
readonly contract: MarkerHashes;
|
|
266
|
+
readonly previous: MarkerHashes;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* A space whose marker did not hold `expected`, the hashes the caller read before it verified the space, when the family came to write it. `found` is what the marker held instead. The marker was left as it was.
|
|
270
|
+
*/
|
|
271
|
+
interface SpaceMarkerConflict {
|
|
272
|
+
readonly status: 'conflict';
|
|
273
|
+
readonly space: string;
|
|
274
|
+
readonly contract: MarkerHashes;
|
|
275
|
+
readonly expected: MarkerHashes | null;
|
|
276
|
+
readonly found: MarkerHashes | null;
|
|
311
277
|
}
|
|
278
|
+
/** What signing did to one contract space's marker. */
|
|
279
|
+
type SpaceSignature = SpaceSigned | SpaceMarkerConflict;
|
|
312
280
|
//#endregion
|
|
313
281
|
//#region src/control/control-instances.d.ts
|
|
314
282
|
interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends FamilyInstance<TFamilyId> {
|
|
@@ -321,6 +289,8 @@ interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends Fam
|
|
|
321
289
|
* `pnpm lint:no-contract-cast`.
|
|
322
290
|
*/
|
|
323
291
|
deserializeContract(contractJson: unknown): Contract;
|
|
292
|
+
/** The name the database knows the object an operation acts on by. */
|
|
293
|
+
storageNameOf(operation: MigrationPlanOperation): string;
|
|
324
294
|
verify(options: {
|
|
325
295
|
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
326
296
|
readonly contract: unknown;
|
|
@@ -345,12 +315,13 @@ interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends Fam
|
|
|
345
315
|
readonly strict: boolean;
|
|
346
316
|
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
|
|
347
317
|
}): VerifyDatabaseSchemaResult;
|
|
348
|
-
|
|
318
|
+
/**
|
|
319
|
+
* Writes the marker of every space in `spaces` with its contract's hashes. Does not check the schema: callers verify each space first. A space whose marker no longer holds `expected`, when it is read or when it is written, is reported as a conflict and its marker is left as it was. The SQL family takes the migration runner's marker lock, one lock for the whole marker table, and writes every marker in one transaction, so a failed write leaves every marker as it was. The Mongo family writes the markers one by one, so a failed write can leave earlier markers written; running the command again finishes the job.
|
|
320
|
+
*/
|
|
321
|
+
signSpaces(options: {
|
|
349
322
|
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
350
|
-
readonly
|
|
351
|
-
|
|
352
|
-
readonly configPath?: string;
|
|
353
|
-
}): Promise<SignDatabaseResult>;
|
|
323
|
+
readonly spaces: readonly SpaceToSign[];
|
|
324
|
+
}): Promise<readonly SpaceSignature[]>;
|
|
354
325
|
/**
|
|
355
326
|
* Reads the contract marker for `space` from the database, returning
|
|
356
327
|
* `null` if no marker row exists for that space (or if the marker
|
|
@@ -408,6 +379,204 @@ interface ControlDriverInstance<TFamilyId extends string, TTargetId extends stri
|
|
|
408
379
|
}
|
|
409
380
|
interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
|
|
410
381
|
//#endregion
|
|
382
|
+
//#region src/control/migration-statements.d.ts
|
|
383
|
+
/** A model: its namespace and its name as the contract source writes it, never a table name. */
|
|
384
|
+
interface ModelCoordinate {
|
|
385
|
+
readonly namespaceId: NamespaceId;
|
|
386
|
+
readonly model: string;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* A field of a model, named as the contract's model keys it in `fields`. Whether that is the
|
|
390
|
+
* field's name in the contract source or its stored name in every family is not settled yet.
|
|
391
|
+
*/
|
|
392
|
+
interface FieldCoordinate extends ModelCoordinate {
|
|
393
|
+
readonly field: string;
|
|
394
|
+
}
|
|
395
|
+
interface ResolvedModelRenameStatement {
|
|
396
|
+
readonly kind: 'rename';
|
|
397
|
+
readonly entity: 'model';
|
|
398
|
+
readonly from: ModelCoordinate;
|
|
399
|
+
readonly to: ModelCoordinate;
|
|
400
|
+
}
|
|
401
|
+
interface ResolvedFieldRenameStatement {
|
|
402
|
+
readonly kind: 'rename';
|
|
403
|
+
readonly entity: 'field';
|
|
404
|
+
readonly from: FieldCoordinate;
|
|
405
|
+
readonly to: FieldCoordinate;
|
|
406
|
+
}
|
|
407
|
+
/** A namespace renamed: `from` is a namespace of the origin contract and `to` one of the destination. */
|
|
408
|
+
interface ResolvedNamespaceRenameStatement {
|
|
409
|
+
readonly kind: 'rename';
|
|
410
|
+
readonly entity: 'namespace';
|
|
411
|
+
readonly from: NamespaceId;
|
|
412
|
+
readonly to: NamespaceId;
|
|
413
|
+
}
|
|
414
|
+
/** A rename: `from` is a coordinate of the origin contract and `to` one of the destination contract. */
|
|
415
|
+
type ResolvedRenameStatement = ResolvedNamespaceRenameStatement | ResolvedModelRenameStatement | ResolvedFieldRenameStatement;
|
|
416
|
+
/** A field whose values the migration converts to its new type with code the user writes. */
|
|
417
|
+
interface ResolvedFieldConvertStatement {
|
|
418
|
+
readonly kind: 'convert';
|
|
419
|
+
readonly entity: 'field';
|
|
420
|
+
/** The field as the destination contract names it. */
|
|
421
|
+
readonly field: FieldCoordinate;
|
|
422
|
+
}
|
|
423
|
+
/** A required field whose values in existing rows the migration fills with code the user writes. */
|
|
424
|
+
interface ResolvedFieldBackfillStatement {
|
|
425
|
+
readonly kind: 'backfill';
|
|
426
|
+
readonly entity: 'field';
|
|
427
|
+
/** The field as the destination contract names it. */
|
|
428
|
+
readonly field: FieldCoordinate;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* A statement resolved against the origin and destination contracts into domain coordinates. `kind`
|
|
432
|
+
* names what the statement asks the plan to do, and `entity` the kind of coordinate it names.
|
|
433
|
+
*/
|
|
434
|
+
type ResolvedMigrationStatement = ResolvedRenameStatement | ResolvedFieldConvertStatement | ResolvedFieldBackfillStatement;
|
|
435
|
+
declare function isRenameStatement(statement: ResolvedMigrationStatement): statement is ResolvedRenameStatement;
|
|
436
|
+
/**
|
|
437
|
+
* What an operation of a plan is about, in the contract's terms where the family can say: a model
|
|
438
|
+
* or a field of the origin contract, or, when no model of the origin contract stores it, the name
|
|
439
|
+
* the database knows it by. Told apart by `kind`, not by a statement's `entity`, because a storage
|
|
440
|
+
* name is not an entity of the contract.
|
|
441
|
+
*/
|
|
442
|
+
type MigrationSubject = ({
|
|
443
|
+
readonly kind: 'model';
|
|
444
|
+
} & ModelCoordinate) | ({
|
|
445
|
+
readonly kind: 'field';
|
|
446
|
+
} & FieldCoordinate) | {
|
|
447
|
+
readonly kind: 'storage';
|
|
448
|
+
readonly name: string;
|
|
449
|
+
};
|
|
450
|
+
/** A key that is equal for two subjects exactly when they name the same thing. */
|
|
451
|
+
declare function migrationSubjectKey(subject: MigrationSubject): string;
|
|
452
|
+
/** An operation of a plan, by its position in the plan's `operations`, and its subject. */
|
|
453
|
+
interface MigrationOperationSubject {
|
|
454
|
+
readonly operationIndex: number;
|
|
455
|
+
readonly subject: MigrationSubject;
|
|
456
|
+
}
|
|
457
|
+
/** An operation that changes who can read or write its subject's data. */
|
|
458
|
+
interface MigrationAccessChange extends MigrationOperationSubject {
|
|
459
|
+
/** True when it lets more people read or write; false when the change can go either way. */
|
|
460
|
+
readonly widens: boolean;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* How an operation loses its subject's data: `drop` removes the subject, and `typeChange` keeps the
|
|
464
|
+
* field but changes its type, which loses the values that do not fit the new one.
|
|
465
|
+
*/
|
|
466
|
+
type MigrationDataLossKind = 'drop' | 'typeChange';
|
|
467
|
+
/** An operation that loses data: its subject, how it loses that subject's data, and how to keep it. */
|
|
468
|
+
interface MigrationDataLoss extends MigrationOperationSubject {
|
|
469
|
+
/** How the operation loses the data; absent for an operation of a recorded migration, which does not say. */
|
|
470
|
+
readonly loss?: MigrationDataLossKind;
|
|
471
|
+
/** The label of the operation that loses the data, which names it while a slot of the plan is unfilled. */
|
|
472
|
+
readonly label: string;
|
|
473
|
+
/** How to keep the data instead, in the target's words, when no statement can say so. */
|
|
474
|
+
readonly keepDataAdvice?: string;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* A required field a plan adds to a table that may have rows, which every existing row gets one temporary value for. A
|
|
478
|
+
* backfill statement for the field fills them instead.
|
|
479
|
+
*/
|
|
480
|
+
interface MigrationTemporaryValue extends MigrationOperationSubject {
|
|
481
|
+
/** The value as the target writes it, such as `''` or `0`. */
|
|
482
|
+
readonly value: string;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* What the operations of a plan lose, whose access they change, and which new required fields they
|
|
486
|
+
* give a temporary value, each by its position in the plan.
|
|
487
|
+
*/
|
|
488
|
+
interface MigrationPlanSubjects<TLoss extends MigrationDataLoss = MigrationDataLoss, TAccess extends MigrationAccessChange = MigrationAccessChange, TTemporary = MigrationTemporaryValue> {
|
|
489
|
+
/** Each operation that loses data, in plan order, with what it loses. */
|
|
490
|
+
readonly dataLoss: readonly TLoss[];
|
|
491
|
+
/** Each operation that changes who can read or write data, in plan order, with what it is about. */
|
|
492
|
+
readonly accessChanges: readonly TAccess[];
|
|
493
|
+
/** Each new required field whose existing rows the plan gives a temporary value, in plan order. */
|
|
494
|
+
readonly temporaryValues: readonly TTemporary[];
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* The namespaces a plan changes, by namespace id: `removed` are those of the origin contract whose
|
|
498
|
+
* tables the plan drops with them because the destination no longer declares them, and `added`
|
|
499
|
+
* are those the destination declares and the origin does not. A planner without namespaces reports
|
|
500
|
+
* neither.
|
|
501
|
+
*/
|
|
502
|
+
interface MigrationPlanNamespaces {
|
|
503
|
+
readonly removed: readonly string[];
|
|
504
|
+
readonly added: readonly string[];
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* A statement as a plan applied it: `operationIndexes` are the positions, in the plan's
|
|
508
|
+
* `operations`, of the operations the statement accounts for, in plan order, and empty when the
|
|
509
|
+
* storage did not change. Statements refer to operations by position because operation ids are
|
|
510
|
+
* not unique within a plan.
|
|
511
|
+
*/
|
|
512
|
+
interface AppliedMigrationStatement {
|
|
513
|
+
readonly statement: ResolvedMigrationStatement;
|
|
514
|
+
readonly operationIndexes: readonly number[];
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* A model's name in messages: `namespace.Model`, or `Model` alone in the unbound namespace, whose
|
|
518
|
+
* id is internal.
|
|
519
|
+
*/
|
|
520
|
+
declare function modelDisplayName(coordinate: ModelCoordinate): string;
|
|
521
|
+
/** A model as a statement names it: with its namespace only when the contract has several. */
|
|
522
|
+
declare function modelStatementText(contract: ContractWithDomain, coordinate: ModelCoordinate): string;
|
|
523
|
+
/** A field as a statement names it, through its model: `User.age`, or `app.User.age` when the contract has several namespaces. */
|
|
524
|
+
declare function fieldStatementText(contract: ContractWithDomain, field: FieldCoordinate): string;
|
|
525
|
+
/** A model coordinate in JSON output: `namespaceId` is left out for the unbound namespace. */
|
|
526
|
+
interface ModelCoordinateJson {
|
|
527
|
+
readonly namespaceId?: NamespaceId;
|
|
528
|
+
readonly model: string;
|
|
529
|
+
}
|
|
530
|
+
/** A field coordinate in JSON output: `namespaceId` is left out for the unbound namespace. */
|
|
531
|
+
interface FieldCoordinateJson extends ModelCoordinateJson {
|
|
532
|
+
readonly field: string;
|
|
533
|
+
}
|
|
534
|
+
/** A resolved statement in JSON output, with each coordinate written as `*CoordinateJson`. */
|
|
535
|
+
type MigrationStatementJson = {
|
|
536
|
+
readonly kind: 'rename';
|
|
537
|
+
readonly entity: 'namespace';
|
|
538
|
+
readonly from: {
|
|
539
|
+
readonly namespaceId: NamespaceId;
|
|
540
|
+
};
|
|
541
|
+
readonly to: {
|
|
542
|
+
readonly namespaceId: NamespaceId;
|
|
543
|
+
};
|
|
544
|
+
} | {
|
|
545
|
+
readonly kind: 'rename';
|
|
546
|
+
readonly entity: 'model';
|
|
547
|
+
readonly from: ModelCoordinateJson;
|
|
548
|
+
readonly to: ModelCoordinateJson;
|
|
549
|
+
} | {
|
|
550
|
+
readonly kind: 'rename';
|
|
551
|
+
readonly entity: 'field';
|
|
552
|
+
readonly from: FieldCoordinateJson;
|
|
553
|
+
readonly to: FieldCoordinateJson;
|
|
554
|
+
} | {
|
|
555
|
+
readonly kind: 'convert' | 'backfill';
|
|
556
|
+
readonly entity: 'field';
|
|
557
|
+
readonly field: FieldCoordinateJson;
|
|
558
|
+
};
|
|
559
|
+
/** A subject in JSON output: `namespaceId` is left out for the unbound namespace. */
|
|
560
|
+
type MigrationSubjectJson = ({
|
|
561
|
+
readonly kind: 'model';
|
|
562
|
+
} & ModelCoordinateJson) | ({
|
|
563
|
+
readonly kind: 'field';
|
|
564
|
+
} & FieldCoordinateJson) | {
|
|
565
|
+
readonly kind: 'storage';
|
|
566
|
+
readonly name: string;
|
|
567
|
+
};
|
|
568
|
+
/** The statement as JSON output writes it. */
|
|
569
|
+
declare function migrationStatementJson(statement: ResolvedMigrationStatement): MigrationStatementJson;
|
|
570
|
+
/** The subject as JSON output writes it. */
|
|
571
|
+
declare function migrationSubjectJson(subject: MigrationSubject): MigrationSubjectJson;
|
|
572
|
+
/**
|
|
573
|
+
* The text that reports a statement, in domain names: a model or field is named with its
|
|
574
|
+
* namespace only when its contract has more than one, and a model moved to another namespace always
|
|
575
|
+
* is. A renamed field is named through its model as
|
|
576
|
+
* the destination contract names it, as the statement itself is written.
|
|
577
|
+
*/
|
|
578
|
+
declare function describeMigrationStatement(statement: ResolvedMigrationStatement, fromContract: ContractWithDomain, contract: ContractWithDomain): string;
|
|
579
|
+
//#endregion
|
|
411
580
|
//#region src/control/control-migration-types.d.ts
|
|
412
581
|
/**
|
|
413
582
|
* In-memory migration metadata envelope. Every migration is
|
|
@@ -446,13 +615,34 @@ interface MigrationMetadata {
|
|
|
446
615
|
readonly createdAt: string;
|
|
447
616
|
}
|
|
448
617
|
/**
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
* - '
|
|
452
|
-
* - '
|
|
453
|
-
*
|
|
618
|
+
* What an operation does to the data. Of the classes a planner chooses, only `destructive` loses
|
|
619
|
+
* data by itself; a `data` operation runs what its author wrote, which may lose data by design.
|
|
620
|
+
* - 'additive': adds structure and leaves existing structure and data as they are.
|
|
621
|
+
* - 'widening': changes existing structure without losing data. An operation that cannot keep
|
|
622
|
+
* every value fails instead, so a tightened constraint is widening: `SET NOT NULL` fails on a
|
|
623
|
+
* NULL, and a MongoDB validator applies to later writes only. So are a rename, a relaxed
|
|
624
|
+
* constraint, a type change that keeps every value, and a drop of an object that holds no data,
|
|
625
|
+
* such as an index, a constraint or a default. An operation that changes who can read or write
|
|
626
|
+
* data is asked about by `db update`.
|
|
627
|
+
* - 'destructive': can lose rows or values: dropping a table, a column or a collection, or a type
|
|
628
|
+
* change that can change values.
|
|
629
|
+
* - 'data': reads and writes rows, such as a backfill or a type conversion, as its author wrote.
|
|
454
630
|
*/
|
|
455
631
|
type MigrationOperationClass = 'additive' | 'widening' | 'destructive' | 'data';
|
|
632
|
+
/**
|
|
633
|
+
* The state a plan asserts it starts from: the storage hash, and optionally the profile hash, the
|
|
634
|
+
* runner checks the marker for. A planner's `origin` option and a plan's `origin` share this type.
|
|
635
|
+
*/
|
|
636
|
+
interface PlanOrigin {
|
|
637
|
+
readonly storageHash: string;
|
|
638
|
+
readonly profileHash?: string;
|
|
639
|
+
}
|
|
640
|
+
/** The origin a plan from `contract` asserts, or `null` when it starts from no contract. */
|
|
641
|
+
declare function planOriginOf(contract: {
|
|
642
|
+
readonly storage: {
|
|
643
|
+
readonly storageHash: string;
|
|
644
|
+
};
|
|
645
|
+
} | null): PlanOrigin | null;
|
|
456
646
|
/**
|
|
457
647
|
* Policy defining which operation classes are allowed during a migration.
|
|
458
648
|
*/
|
|
@@ -464,7 +654,14 @@ interface MigrationOperationPolicy {
|
|
|
464
654
|
* Contains only the fields needed for CLI output (tree view, JSON envelope).
|
|
465
655
|
*/
|
|
466
656
|
interface MigrationPlanOperation {
|
|
467
|
-
/**
|
|
657
|
+
/**
|
|
658
|
+
* Names what the operation changes (e.g., "table.users"). Ids are not guaranteed unique within a
|
|
659
|
+
* plan: on Postgres, same-named tables in two schemas give operations the same id. So anything
|
|
660
|
+
* that points at one operation of a plan, such as `AppliedMigrationStatement.operationIndexes`,
|
|
661
|
+
* uses its position in `operations`. Ids are written to `ops.json`, so they are part of a
|
|
662
|
+
* migration's hash; the ledger records executed operations, ids included, but nothing compares
|
|
663
|
+
* them.
|
|
664
|
+
*/
|
|
468
665
|
readonly id: string;
|
|
469
666
|
/** Human-readable label for display in UI/CLI (e.g., "Create table users"). */
|
|
470
667
|
readonly label: string;
|
|
@@ -560,10 +757,7 @@ interface MigrationPlan {
|
|
|
560
757
|
* Origin contract identity that the plan expects the database to currently be at.
|
|
561
758
|
* If omitted or null, the runner skips origin validation entirely.
|
|
562
759
|
*/
|
|
563
|
-
readonly origin?:
|
|
564
|
-
readonly storageHash: string;
|
|
565
|
-
readonly profileHash?: string;
|
|
566
|
-
} | null;
|
|
760
|
+
readonly origin?: PlanOrigin | null;
|
|
567
761
|
/** Destination contract identity that the plan intends to reach. */
|
|
568
762
|
readonly destination: {
|
|
569
763
|
readonly storageHash: string;
|
|
@@ -623,6 +817,13 @@ interface MigrationPlannerConflict {
|
|
|
623
817
|
readonly summary: string;
|
|
624
818
|
/** Optional explanation of why this conflict occurred. */
|
|
625
819
|
readonly why?: string;
|
|
820
|
+
/** Set when the conflict is an operation the policy does not allow: the class of that operation. */
|
|
821
|
+
readonly refusedOperationClass?: MigrationOperationClass;
|
|
822
|
+
/**
|
|
823
|
+
* Set when the conflict refuses a statement: the statement, in domain coordinates. Consumers key
|
|
824
|
+
* on this field, not on the conflict's kind, which each family names.
|
|
825
|
+
*/
|
|
826
|
+
readonly refusedStatement?: ResolvedMigrationStatement;
|
|
626
827
|
}
|
|
627
828
|
/**
|
|
628
829
|
* Successful planner result with the migration plan.
|
|
@@ -630,10 +831,14 @@ interface MigrationPlannerConflict {
|
|
|
630
831
|
* The plan is typed as `MigrationPlanWithAuthoringSurface` so the CLI can
|
|
631
832
|
* uniformly ask any plan to render itself to TypeScript.
|
|
632
833
|
*/
|
|
633
|
-
interface MigrationPlannerSuccessResult {
|
|
834
|
+
interface MigrationPlannerSuccessResult extends MigrationPlanSubjects {
|
|
634
835
|
readonly kind: 'success';
|
|
635
836
|
readonly plan: MigrationPlanWithAuthoringSurface;
|
|
636
837
|
readonly warnings?: readonly MigrationPlannerConflict[];
|
|
838
|
+
/** The statements the plan applied, one per statement it was given, in order. */
|
|
839
|
+
readonly appliedStatements: readonly AppliedMigrationStatement[];
|
|
840
|
+
/** The namespaces the plan removes and adds; absent from a planner without namespaces. */
|
|
841
|
+
readonly namespaces?: MigrationPlanNamespaces;
|
|
637
842
|
}
|
|
638
843
|
/**
|
|
639
844
|
* Failed planner result with the list of conflicts.
|
|
@@ -665,23 +870,125 @@ interface MigrationRunnerSuccessValue {
|
|
|
665
870
|
}>;
|
|
666
871
|
}
|
|
667
872
|
/**
|
|
668
|
-
*
|
|
873
|
+
* What a check states of the database: that the object is `absent` or `present`. `object` is
|
|
874
|
+
* display text, the object as a reader names it (`index "Item_state_idx"`); no code reads it to
|
|
875
|
+
* decide anything.
|
|
669
876
|
*/
|
|
670
|
-
interface
|
|
671
|
-
|
|
672
|
-
readonly
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
readonly
|
|
677
|
-
|
|
678
|
-
|
|
877
|
+
interface CheckExpectation {
|
|
878
|
+
readonly expects: 'absent' | 'present';
|
|
879
|
+
readonly object: string;
|
|
880
|
+
}
|
|
881
|
+
/** A check of an operation that did not hold: before the operation ran (`precheck`), or after it (`postcheck`). */
|
|
882
|
+
interface FailedCheck {
|
|
883
|
+
readonly operationId: string;
|
|
884
|
+
readonly phase: 'precheck' | 'postcheck';
|
|
885
|
+
/** The check, as the operation describes it. */
|
|
886
|
+
readonly description: string;
|
|
887
|
+
/** What the check states of the database, when it states an object's absence or presence. */
|
|
888
|
+
readonly expectation?: CheckExpectation;
|
|
889
|
+
}
|
|
890
|
+
/** A failed migration run: a structured error whose `message` is the summary. */
|
|
891
|
+
interface MigrationRunnerFailure extends StructuredError {
|
|
892
|
+
readonly code: `MIGRATION.${string}`;
|
|
893
|
+
readonly meta: MigrationRunnerFailureMeta;
|
|
894
|
+
}
|
|
895
|
+
/** The facts of a failed migration run. Each fact appears once. */
|
|
896
|
+
interface MigrationRunnerFailureMeta {
|
|
679
897
|
/**
|
|
680
898
|
* Identifier of the space whose plan caused the rollback when
|
|
681
899
|
* {@link MigrationRunner.execute} processes multiple spaces.
|
|
682
900
|
*/
|
|
683
901
|
readonly failingSpace?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Whether the database is as it was before the failed apply: `true` when the runner rolled the
|
|
904
|
+
* apply back or failed before it changed anything, `false` when what it changed stays. Absent when
|
|
905
|
+
* the runner does not say.
|
|
906
|
+
*/
|
|
907
|
+
readonly databaseUnchanged?: boolean;
|
|
908
|
+
/** The check that did not hold, when a precheck or postcheck failed. */
|
|
909
|
+
readonly failedCheck?: FailedCheck;
|
|
910
|
+
/** The type change that failed, when the failed step converts a column's values. */
|
|
911
|
+
readonly failedTypeChange?: FailedTypeChange;
|
|
912
|
+
/**
|
|
913
|
+
* The fields that were to become required while rows had no value for them, when that made the
|
|
914
|
+
* step fail: first the field of the failed step, then the others of the same migration.
|
|
915
|
+
*/
|
|
916
|
+
readonly rowsWithoutValue?: readonly RowsWithoutValue[];
|
|
917
|
+
/** The objects in the database that kept the failed operation from running, such as a view on a table to drop. */
|
|
918
|
+
readonly blockingObjects?: readonly BlockingObject[];
|
|
919
|
+
/** The differences the schema check after apply found, when that check failed. */
|
|
920
|
+
readonly schemaIssues?: readonly SchemaDiffIssue[];
|
|
921
|
+
/** Further facts for the code, such as `sqlState` or the marker hashes. */
|
|
922
|
+
readonly [key: string]: unknown;
|
|
923
|
+
}
|
|
924
|
+
declare function migrationRunnerFailure<TCode extends MigrationRunnerFailure['code']>(code: TCode, message: string, options?: {
|
|
925
|
+
readonly why?: string | undefined;
|
|
926
|
+
readonly meta?: MigrationRunnerFailureMeta;
|
|
927
|
+
readonly cause?: unknown;
|
|
928
|
+
}): MigrationRunnerFailure & {
|
|
929
|
+
readonly code: TCode;
|
|
930
|
+
};
|
|
931
|
+
/** The same failure, attributed to the space whose plan failed. */
|
|
932
|
+
declare function withFailingSpace<TCode extends MigrationRunnerFailure['code']>(failure: MigrationRunnerFailure & {
|
|
933
|
+
readonly code: TCode;
|
|
934
|
+
}, failingSpace: string): MigrationRunnerFailure & {
|
|
935
|
+
readonly code: TCode;
|
|
936
|
+
};
|
|
937
|
+
/** An object in the database, named as the database names it, that keeps an operation from running. */
|
|
938
|
+
interface BlockingObject {
|
|
939
|
+
/** What the object is, in the database's words, such as `view` or `sequence`. */
|
|
940
|
+
readonly kind: string;
|
|
941
|
+
readonly name: string;
|
|
684
942
|
}
|
|
943
|
+
/**
|
|
944
|
+
* The same failure, saying whether the database is as it was before the failed apply, in its meta
|
|
945
|
+
* and at the end of its why.
|
|
946
|
+
*/
|
|
947
|
+
declare function withDatabaseUnchanged<TCode extends MigrationRunnerFailure['code']>(failure: MigrationRunnerFailure & {
|
|
948
|
+
readonly code: TCode;
|
|
949
|
+
}, databaseUnchanged: boolean): MigrationRunnerFailure & {
|
|
950
|
+
readonly code: TCode;
|
|
951
|
+
};
|
|
952
|
+
/** A field that is to become required while existing rows have no value for it. */
|
|
953
|
+
interface RowsWithoutValue {
|
|
954
|
+
/** The field, when the destination contract names the storage that lacks the value. */
|
|
955
|
+
readonly field: MigrationSubject | undefined;
|
|
956
|
+
/**
|
|
957
|
+
* `nullValues`: rows hold no value for the field. `newField`: the field is new, and can be added only where there are no
|
|
958
|
+
* rows. `backfillMissedRows`: the migration's backfill step for the field left rows without a value.
|
|
959
|
+
*/
|
|
960
|
+
readonly reason: 'nullValues' | 'newField' | 'backfillMissedRows';
|
|
961
|
+
/** How many rows have no value. */
|
|
962
|
+
readonly rows: number;
|
|
963
|
+
/** The position of the operation in the operations of the failing space's plan. */
|
|
964
|
+
readonly operationIndex: number;
|
|
965
|
+
}
|
|
966
|
+
interface FailedTypeChangeOf {
|
|
967
|
+
/** The field whose type changes. */
|
|
968
|
+
readonly field: MigrationSubject;
|
|
969
|
+
/** The position of the operation in the operations of the failing space's plan. */
|
|
970
|
+
readonly operationIndex: number;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* A type change whose values the database's own cast converted, and why it failed. `value`: the
|
|
974
|
+
* cast met a value it could not convert. `noCast`: the database has no cast between the two types.
|
|
975
|
+
*/
|
|
976
|
+
interface FailedCast extends FailedTypeChangeOf {
|
|
977
|
+
readonly by: 'cast';
|
|
978
|
+
readonly reason: 'value' | 'noCast';
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* A type change whose values the migration's own conversion converted, and why it failed. `value`:
|
|
982
|
+
* the database raised an error on a value the conversion produced or read. `invalidResult`: the
|
|
983
|
+
* conversion left a value the new type cannot hold. `expressionError`: the conversion's expression
|
|
984
|
+
* has an error, such as an unknown function.
|
|
985
|
+
*/
|
|
986
|
+
interface FailedConversion extends FailedTypeChangeOf {
|
|
987
|
+
readonly by: 'conversion';
|
|
988
|
+
readonly reason: 'value' | 'invalidResult' | 'expressionError';
|
|
989
|
+
}
|
|
990
|
+
/** A type change that failed: who converted the values, and why it failed. */
|
|
991
|
+
type FailedTypeChange = FailedCast | FailedConversion;
|
|
685
992
|
/**
|
|
686
993
|
* Result type for migration runner execution.
|
|
687
994
|
*/
|
|
@@ -753,6 +1060,8 @@ interface SchemaOwnership {
|
|
|
753
1060
|
* entity at this coordinate.
|
|
754
1061
|
*/
|
|
755
1062
|
declaresEntity(coordinate: SchemaEntityCoordinate): boolean;
|
|
1063
|
+
/** The ids of the contract spaces whose contracts declare the storage namespace, the planned one included. */
|
|
1064
|
+
namespaceDeclaringSpaces(namespaceId: string): readonly string[];
|
|
756
1065
|
}
|
|
757
1066
|
/**
|
|
758
1067
|
* Migration planner interface for planning schema changes.
|
|
@@ -767,23 +1076,24 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
|
|
|
767
1076
|
readonly schema: unknown;
|
|
768
1077
|
readonly policy: MigrationOperationPolicy;
|
|
769
1078
|
/**
|
|
770
|
-
* The
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
* produced plan's `describe()` from `fromContract?.storage.storageHash
|
|
775
|
-
* ?? null`. They also pass this to data-safety strategies so they can
|
|
776
|
-
* compare `from` and `to` column shapes (e.g. to detect unsafe type
|
|
777
|
-
* changes).
|
|
778
|
-
*
|
|
779
|
-
* Required at every call site to make the structural fact "I have a
|
|
780
|
-
* prior contract / I don't" visible in the type. Reconciliation
|
|
781
|
-
* commands (`db init`, `db update`) introspect a live schema and pass
|
|
782
|
-
* `null`; authoring commands (`migration plan`) read the predecessor's
|
|
783
|
-
* contract from the snapshot store by its storage hash and pass the
|
|
784
|
-
* parsed value.
|
|
1079
|
+
* The contract the planner reads as the starting state, or `null` when it has none: statements
|
|
1080
|
+
* resolve against it, and data-safety strategies compare its column shapes with the
|
|
1081
|
+
* destination's. `migration plan` passes the predecessor's contract; `db update` passes the
|
|
1082
|
+
* contract the marker names only when statements are given.
|
|
785
1083
|
*/
|
|
786
1084
|
readonly fromContract: Contract | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* The origin the produced plan asserts, which the runner checks against the marker: the
|
|
1087
|
+
* plan's `origin` and its `describe().from`. `migration plan` passes its starting contract's
|
|
1088
|
+
* hash ({@link planOriginOf}); reconciliation commands (`db init`, `db update`) pass `null`,
|
|
1089
|
+
* because their plans apply from whatever state the database is in.
|
|
1090
|
+
*/
|
|
1091
|
+
readonly origin: PlanOrigin | null;
|
|
1092
|
+
/**
|
|
1093
|
+
* Statements the user gave, resolved against `fromContract` and `contract`,
|
|
1094
|
+
* in the order given. Empty when the user gave none.
|
|
1095
|
+
*/
|
|
1096
|
+
readonly statements: readonly ResolvedMigrationStatement[];
|
|
787
1097
|
/**
|
|
788
1098
|
* Active framework components participating in this composition.
|
|
789
1099
|
* Families/targets can interpret this list to derive family-specific metadata.
|
|
@@ -918,11 +1228,11 @@ interface TargetMigrationsCapability<TFamilyId extends string = string, TTargetI
|
|
|
918
1228
|
* The returned schema can be passed to `planner.plan({ schema })` as the "from" state.
|
|
919
1229
|
*
|
|
920
1230
|
* @param contract - The contract to convert, or null for a new project (empty schema).
|
|
921
|
-
* @param frameworkComponents - Active framework components
|
|
922
|
-
* dependencies (e.g. extensions)
|
|
1231
|
+
* @param frameworkComponents - Active framework components: the codecs and data types that
|
|
1232
|
+
* name each column's type, and the database dependencies (e.g. extensions) the schema IR reflects.
|
|
923
1233
|
* @returns Family-specific schema IR (e.g., `SqlSchemaIR` for SQL targets).
|
|
924
1234
|
*/
|
|
925
|
-
contractToSchema(contract: Contract | null, frameworkComponents
|
|
1235
|
+
contractToSchema(contract: Contract | null, frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>): unknown;
|
|
926
1236
|
}
|
|
927
1237
|
/**
|
|
928
1238
|
* Context for rendering migration source files.
|
|
@@ -958,6 +1268,97 @@ interface MigrationScaffoldContext {
|
|
|
958
1268
|
readonly snapshotsImportPath: string;
|
|
959
1269
|
}
|
|
960
1270
|
//#endregion
|
|
1271
|
+
//#region src/control/check-expectation.d.ts
|
|
1272
|
+
declare function expectAbsent(object: string): CheckExpectation;
|
|
1273
|
+
declare function expectPresent(object: string): CheckExpectation;
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region src/control/contract-serializer.d.ts
|
|
1276
|
+
/**
|
|
1277
|
+
* Framework SPI for moving a contract between its canonical on-disk JSON
|
|
1278
|
+
* form and its in-memory class-hierarchy form. Both directions live on the
|
|
1279
|
+
* same SPI so the conceptual seam — "the boundary where the contract
|
|
1280
|
+
* crosses between persisted JSON and live class instances" — has a single
|
|
1281
|
+
* named home.
|
|
1282
|
+
*
|
|
1283
|
+
* Both faces are needed by the framework today (round-trip property tests,
|
|
1284
|
+
* drift detection, future canonicalization), not eventually. For most
|
|
1285
|
+
* targets `serializeContract` is identity over JSON-clean class instances;
|
|
1286
|
+
* the method exists because the seam is real, not as a convention placeholder.
|
|
1287
|
+
*
|
|
1288
|
+
* Implementers compose this SPI as a named property on their target
|
|
1289
|
+
* descriptor (`descriptor.contractSerializer`); the descriptor itself
|
|
1290
|
+
* remains the aggregator of all per-target SPIs.
|
|
1291
|
+
*/
|
|
1292
|
+
interface ContractSerializer<TContract> {
|
|
1293
|
+
/**
|
|
1294
|
+
* Validate the JSON shape and construct typed class instances. Throws on
|
|
1295
|
+
* structural / domain / storage validation failures. Returns the typed
|
|
1296
|
+
* contract on success.
|
|
1297
|
+
*
|
|
1298
|
+
* The method-level type parameter lets call sites that hold a
|
|
1299
|
+
* precisely-typed contract literal (e.g. `typeof contract` from a
|
|
1300
|
+
* generated `contract.d.ts`) recover that literal type without an
|
|
1301
|
+
* external cast. The default `T = TContract` preserves the inferred
|
|
1302
|
+
* return type for every caller that does not opt in.
|
|
1303
|
+
*/
|
|
1304
|
+
deserializeContract<T extends TContract = TContract>(json: unknown): T;
|
|
1305
|
+
/**
|
|
1306
|
+
* Serialize a typed contract to its canonical JSON shape. Returns
|
|
1307
|
+
* `JsonObject` so callers can stringify, hash, or feed the result into
|
|
1308
|
+
* another SPI without re-asserting JSON-cleanness. Targets whose contract
|
|
1309
|
+
* fields are JSON-clean by construction return the contract unchanged
|
|
1310
|
+
* (the symmetric pair to `deserializeContract`); targets that need to
|
|
1311
|
+
* canonicalize on the way out (key ordering, dropping computed-only
|
|
1312
|
+
* fields, normalizing numeric encodings) do that work here.
|
|
1313
|
+
*/
|
|
1314
|
+
serializeContract(contract: TContract): JsonObject;
|
|
1315
|
+
/**
|
|
1316
|
+
* Optional family-contributed preserve-empty predicate for the
|
|
1317
|
+
* framework canonicalizer. When present, the canonicalizer calls this
|
|
1318
|
+
* inside its default-omission walk to let the family veto the stripping
|
|
1319
|
+
* of empty objects/arrays/`false` values at family-specific storage paths.
|
|
1320
|
+
* Families whose storage has no such special-case paths omit this hook.
|
|
1321
|
+
*/
|
|
1322
|
+
readonly shouldPreserveEmpty?: PreserveEmptyPredicate;
|
|
1323
|
+
/**
|
|
1324
|
+
* Optional family-contributed storage sort hook for the framework
|
|
1325
|
+
* canonicalizer. When present, the canonicalizer applies this to the
|
|
1326
|
+
* serialized `storage` subtree after the omission walk and before the
|
|
1327
|
+
* final key sort. Families that need deterministic ordering of storage
|
|
1328
|
+
* arrays (e.g. SQL `indexes`/`uniques`) supply this hook.
|
|
1329
|
+
*/
|
|
1330
|
+
readonly sortStorage?: StorageSort;
|
|
1331
|
+
/**
|
|
1332
|
+
* The canonicalization hooks the family's emit pipeline computes storage
|
|
1333
|
+
* hashes with. Distinct from {@link shouldPreserveEmpty} /
|
|
1334
|
+
* {@link sortStorage}: those govern on-disk serialization and may be
|
|
1335
|
+
* broader per target (Postgres preserves required entity-kind fields at
|
|
1336
|
+
* default values so the persisted contract re-deserializes), while a hash
|
|
1337
|
+
* recompute must reproduce the exact canonical form the published
|
|
1338
|
+
* `storageHash` was derived from. Integrity checks that recompute storage
|
|
1339
|
+
* hashes (snapshot content verification, descriptor self-consistency)
|
|
1340
|
+
* must use these hooks, never the serialization pair. A family whose hash
|
|
1341
|
+
* input is not the persisted storage shape (Mongo hashes a projection)
|
|
1342
|
+
* must not publish hooks; its snapshots then read without content
|
|
1343
|
+
* verification.
|
|
1344
|
+
*/
|
|
1345
|
+
readonly hashCanonicalizationHooks?: {
|
|
1346
|
+
readonly shouldPreserveEmpty?: PreserveEmptyPredicate;
|
|
1347
|
+
readonly sortStorage?: StorageSort;
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
//#endregion
|
|
1351
|
+
//#region src/control/contract-snapshot-layout.d.ts
|
|
1352
|
+
declare const CONTRACT_SNAPSHOTS_DIRNAME = "snapshots";
|
|
1353
|
+
/** Whether the snapshot store can address `storageHash`. */
|
|
1354
|
+
declare function isStorageHashHex(storageHash: string): boolean;
|
|
1355
|
+
/** Validate a storage hash for use as a directory name. */
|
|
1356
|
+
declare function storageHashHex(storageHash: string): string;
|
|
1357
|
+
/** Module specifier for the store's `contract.json`, POSIX separators. */
|
|
1358
|
+
declare function contractSnapshotJsonSpecifier(snapshotsImportPath: string, storageHash: string): string;
|
|
1359
|
+
/** Type-only module specifier for the store's `contract.d.ts` (no extension). */
|
|
1360
|
+
declare function contractSnapshotTypesSpecifier(snapshotsImportPath: string, storageHash: string): string;
|
|
1361
|
+
//#endregion
|
|
961
1362
|
//#region src/control/control-spaces.d.ts
|
|
962
1363
|
/**
|
|
963
1364
|
* Canonical control-plane identifiers for contract spaces.
|
|
@@ -1053,6 +1454,9 @@ interface AssembledAuthoringContributions {
|
|
|
1053
1454
|
readonly entityTypes: AuthoringEntityTypeNamespace;
|
|
1054
1455
|
readonly pslBlockDescriptors: AuthoringPslBlockDescriptorNamespace;
|
|
1055
1456
|
readonly modelAttributes: AuthoringModelAttributeDescriptorNamespace;
|
|
1457
|
+
readonly attributeSpecs: AuthoringAttributeSpecContributions;
|
|
1458
|
+
/** PSL support for every registered data type, merged across the composed components. ADR 254. */
|
|
1459
|
+
readonly dataTypes: Readonly<Record<string, DataTypeAuthoringEntry>>;
|
|
1056
1460
|
/** The single {@link AuthoringContributions.valueObjectStorageType} declared across the composed components, validated at assembly against the merged `type` namespace. */
|
|
1057
1461
|
readonly valueObjectStorageType?: string;
|
|
1058
1462
|
}
|
|
@@ -1065,6 +1469,7 @@ interface ControlStack<TFamilyId extends string = string, TTargetId extends stri
|
|
|
1065
1469
|
readonly extensionContracts: ReadonlyMap<string, Contract>;
|
|
1066
1470
|
readonly codecTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
1067
1471
|
readonly queryOperationTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
1472
|
+
readonly parameterizedOutputTypeImports: ReadonlyArray<TypesImportSpec>;
|
|
1068
1473
|
readonly extensionIds: ReadonlyArray<string>;
|
|
1069
1474
|
readonly codecLookup: CodecRegistry;
|
|
1070
1475
|
/** Every codec descriptor the composed components contribute — the set an emitted type surface may resolve against, which is not always the set a target's own registry holds. */
|
|
@@ -1072,9 +1477,17 @@ interface ControlStack<TFamilyId extends string = string, TTargetId extends stri
|
|
|
1072
1477
|
/** Every aggregate overload the composed components declare, validated for shape and single ownership at assembly. */
|
|
1073
1478
|
readonly aggregateDescriptors: ReadonlyArray<AggregateDescriptor>;
|
|
1074
1479
|
readonly authoringContributions: AssembledAuthoringContributions;
|
|
1480
|
+
/** Every data type the composed components register, with the authoring entries that write them. ADR 254. */
|
|
1481
|
+
readonly dataTypes: DataTypeSupport;
|
|
1482
|
+
/** Every data type the composed components register, with the id of the component that registered it. ADR 254. */
|
|
1483
|
+
readonly declaredDataTypes: ReadonlyArray<{
|
|
1484
|
+
readonly type: DataType;
|
|
1485
|
+
readonly contributedBy: string;
|
|
1486
|
+
}>;
|
|
1075
1487
|
/** Names of the top-level zero-arg type constructors in the assembled authoring namespace — the base scalars of the composed stack. */
|
|
1076
1488
|
readonly scalarTypes: ReadonlyArray<string>;
|
|
1077
|
-
readonly controlMutationDefaults:
|
|
1489
|
+
readonly controlMutationDefaults: AssembledControlMutationDefaults;
|
|
1490
|
+
readonly generatorFunctions: GeneratorFunctionRegistry;
|
|
1078
1491
|
readonly capabilities: CapabilityMatrix;
|
|
1079
1492
|
}
|
|
1080
1493
|
interface CreateControlStackInput<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
@@ -1092,6 +1505,7 @@ declare function assertUniqueCodecOwner(options: {
|
|
|
1092
1505
|
readonly entityOwnershipLabel: string;
|
|
1093
1506
|
}): void;
|
|
1094
1507
|
declare function extractCodecTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
1508
|
+
declare function extractParameterizedOutputTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
1095
1509
|
declare function extractQueryOperationTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
|
|
1096
1510
|
declare function extractComponentIds(family: {
|
|
1097
1511
|
readonly id: string;
|
|
@@ -1105,10 +1519,25 @@ declare function extractComponentIds(family: {
|
|
|
1105
1519
|
declare function assembleAuthoringContributions(descriptors: ReadonlyArray<{
|
|
1106
1520
|
readonly id?: string;
|
|
1107
1521
|
readonly authoring?: AuthoringContributions;
|
|
1108
|
-
}
|
|
1522
|
+
}>, dataTypes?: Readonly<Record<string, DataTypeAuthoringEntry>>): AssembledAuthoringContributions;
|
|
1523
|
+
interface HelperCodecInvariantInput {
|
|
1524
|
+
readonly lookup: DataTypeLookup;
|
|
1525
|
+
readonly helpers: ReadonlyArray<ContributedHelper>;
|
|
1526
|
+
readonly codecDescriptorFor: (codecId: string) => Pick<AnyCodecDescriptor, 'dataType' | 'paramsSchema'> | undefined;
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* The checks on type constructors and field presets that read the stack's codecs, each naming the component and the id at fault:
|
|
1530
|
+
*
|
|
1531
|
+
* 1. every type constructor and field preset names a registered codec;
|
|
1532
|
+
* 2. a type constructor maps its arguments only onto parameters its data type or codec declares;
|
|
1533
|
+
* 3. at most one type constructor per data type is marked inferred.
|
|
1534
|
+
*
|
|
1535
|
+
* {@link assembleDataTypeSupport} checks data types, their entries and casts, and the value arguments of type constructors and field presets.
|
|
1536
|
+
*/
|
|
1537
|
+
declare function enforceHelperCodecInvariants(input: HelperCodecInvariantInput): void;
|
|
1109
1538
|
declare function assembleControlMutationDefaults(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'controlMutationDefaults'> & {
|
|
1110
1539
|
readonly id?: string;
|
|
1111
|
-
}>):
|
|
1540
|
+
}>): AssembledControlMutationDefaults;
|
|
1112
1541
|
declare function extractCodecLookup(descriptors: ReadonlyArray<Pick<ComponentMetadata & {
|
|
1113
1542
|
id: string;
|
|
1114
1543
|
}, 'types' | 'id'>>): CodecRegistry;
|
|
@@ -1139,6 +1568,12 @@ declare function createControlStack<TFamilyId extends string, TTargetId extends
|
|
|
1139
1568
|
//#region src/control/control-descriptors.d.ts
|
|
1140
1569
|
interface ControlFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> extends FamilyDescriptor<TFamilyId> {
|
|
1141
1570
|
readonly emission: EmissionSpi;
|
|
1571
|
+
/** The length of a field of a codec and type params, in its data type's normal form, as a generator binding reads {@link GeneratorFunctionField.length}. A family whose fields have no length omits it. */
|
|
1572
|
+
readonly fieldLength?: (field: Omit<GeneratorFunctionField, 'length'>, dataTypes: DataTypeSupport) => number | undefined;
|
|
1573
|
+
readonly pslDiagnostics?: {
|
|
1574
|
+
readonly describeUnsupportedAttribute?: unknown;
|
|
1575
|
+
readonly describeUnresolvedType?: unknown;
|
|
1576
|
+
};
|
|
1142
1577
|
create<TTargetId extends string>(stack: ControlStack<TFamilyId, TTargetId>): TFamilyInstance;
|
|
1143
1578
|
}
|
|
1144
1579
|
interface ControlTargetDescriptor<TFamilyId extends string, TTargetId extends string, TTargetInstance extends ControlTargetInstance<TFamilyId, TTargetId> = ControlTargetInstance<TFamilyId, TTargetId>, TContract extends Contract = Contract> extends TargetDescriptor<TFamilyId, TTargetId> {
|
|
@@ -1149,6 +1584,7 @@ interface ControlTargetDescriptor<TFamilyId extends string, TTargetId extends st
|
|
|
1149
1584
|
* `deserializeContract` helper. The descriptor IS the aggregator.
|
|
1150
1585
|
*/
|
|
1151
1586
|
readonly contractSerializer: ContractSerializer<TContract>;
|
|
1587
|
+
readonly defaultNamespaceId: string;
|
|
1152
1588
|
create(): TTargetInstance;
|
|
1153
1589
|
}
|
|
1154
1590
|
interface ControlAdapterDescriptor<TFamilyId extends string, TTargetId extends string, TAdapterInstance extends ControlAdapterInstance<TFamilyId, TTargetId> = ControlAdapterInstance<TFamilyId, TTargetId>> extends AdapterDescriptor<TFamilyId, TTargetId> {
|
|
@@ -1162,7 +1598,18 @@ interface ControlAdapterDescriptor<TFamilyId extends string, TTargetId extends s
|
|
|
1162
1598
|
create(stack: ControlStack<TFamilyId, TTargetId>): TAdapterInstance;
|
|
1163
1599
|
}
|
|
1164
1600
|
interface ControlDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends ControlDriverInstance<TFamilyId, TTargetId> = ControlDriverInstance<TFamilyId, TTargetId>, TConnection = string> extends DriverDescriptor<TFamilyId, TTargetId> {
|
|
1165
|
-
create(connection: TConnection): Promise<TDriverInstance>;
|
|
1601
|
+
create(connection: TConnection, options?: ControlDriverConnectOptions): Promise<TDriverInstance>;
|
|
1602
|
+
}
|
|
1603
|
+
/** How a control driver connects. */
|
|
1604
|
+
interface ControlDriverConnectOptions {
|
|
1605
|
+
/**
|
|
1606
|
+
* Connect only to a database that already exists, and never create one or its file. A driver
|
|
1607
|
+
* whose connect could create a database must honour it; Postgres and MongoDB honour it as they
|
|
1608
|
+
* are, since connecting never creates a database there.
|
|
1609
|
+
*/
|
|
1610
|
+
readonly existingDatabaseOnly?: boolean;
|
|
1611
|
+
/** Give up connecting after this many milliseconds, where the driver connects over a network. */
|
|
1612
|
+
readonly connectTimeoutMs?: number;
|
|
1166
1613
|
}
|
|
1167
1614
|
interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends string, TExtensionInstance extends ControlExtensionInstance<TFamilyId, TTargetId> = ControlExtensionInstance<TFamilyId, TTargetId>> extends ExtensionDescriptor<TFamilyId, TTargetId> {
|
|
1168
1615
|
readonly contractSpace?: ContractSpace;
|
|
@@ -1241,12 +1688,32 @@ interface SchemaViewCapable<TSchemaIR = unknown> {
|
|
|
1241
1688
|
declare function hasSchemaView<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR>;
|
|
1242
1689
|
/**
|
|
1243
1690
|
* Capability declaring that a family can infer a PSL contract AST from its
|
|
1244
|
-
* opaque introspected schema IR. Consumed by `prisma
|
|
1691
|
+
* opaque introspected schema IR. Consumed by `prisma contract infer`.
|
|
1245
1692
|
*/
|
|
1246
1693
|
interface PslContractInferCapable<TSchemaIR = unknown> {
|
|
1247
|
-
inferPslContract(schemaIR: TSchemaIR): PslDocumentAst
|
|
1694
|
+
inferPslContract(schemaIR: TSchemaIR): Promise<PslDocumentAst>;
|
|
1248
1695
|
}
|
|
1249
1696
|
declare function hasPslContractInfer<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractInferCapable<TSchemaIR>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Settings a PSL contract source takes from the config, because a PSL file
|
|
1699
|
+
* cannot carry them. Emitting the PSL file produces the same contract only
|
|
1700
|
+
* when the config sets each of them on the new source.
|
|
1701
|
+
*/
|
|
1702
|
+
interface PslSourceSettings {
|
|
1703
|
+
readonly defaultControlPolicy?: ControlPolicy;
|
|
1704
|
+
}
|
|
1705
|
+
/** The PSL document built from a contract, and the settings its PSL source must carry. */
|
|
1706
|
+
interface PslContractDocument {
|
|
1707
|
+
readonly document: PslDocumentAst;
|
|
1708
|
+
readonly sourceSettings: PslSourceSettings;
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Capability declaring that a family can build the PSL document AST of a contract. `contract` must be one the family's contract serializer accepted. `prisma contract print` renders the document as text.
|
|
1712
|
+
*/
|
|
1713
|
+
interface PslContractBuildCapable<TContract = Contract> {
|
|
1714
|
+
buildPslContract(contract: TContract): PslContractDocument;
|
|
1715
|
+
}
|
|
1716
|
+
declare function hasPslContractBuild<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractBuildCapable;
|
|
1250
1717
|
/**
|
|
1251
1718
|
* Capability declaring that a family can render a textual preview of migration
|
|
1252
1719
|
* operations for the CLI's "DDL preview" output. SQL families emit
|
|
@@ -1318,6 +1785,18 @@ declare function hasSchemaSubjectClassifier<TFamilyId extends string, TSchemaIR>
|
|
|
1318
1785
|
*/
|
|
1319
1786
|
declare function orderIssuesByDependencies<TNode extends DiffableNode = DiffableNode>(issues: readonly SchemaDiffIssue<TNode>[]): readonly SchemaDiffIssue<TNode>[];
|
|
1320
1787
|
//#endregion
|
|
1788
|
+
//#region src/control/runner-failure-why.d.ts
|
|
1789
|
+
/** What a diff issue says: its outcome, its path, and its explanation when it has one. */
|
|
1790
|
+
declare function issueLabel(issue: SchemaDiffIssue): string;
|
|
1791
|
+
/** The issues of a failed schema check, as one sentence after `opening`. */
|
|
1792
|
+
declare function schemaIssuesWhy(opening: string, issues: readonly SchemaDiffIssue[]): string;
|
|
1793
|
+
/** The why of a failed schema check after apply, listing its issues when it found any. */
|
|
1794
|
+
declare function schemaCheckWhy(issues: readonly SchemaDiffIssue[]): string;
|
|
1795
|
+
/** What a failed check before an operation means: the operation, the check description as written, and what the check's expectation says of the database when it has one. */
|
|
1796
|
+
declare function failedPrecheckWhy(check: FailedCheck): string;
|
|
1797
|
+
/** What a failed check after an operation means: the operation, the check description as written, and what the check's expectation says of the database when it has one. */
|
|
1798
|
+
declare function failedPostcheckWhy(check: FailedCheck): string;
|
|
1799
|
+
//#endregion
|
|
1321
1800
|
//#region src/control/schema-verifier.d.ts
|
|
1322
1801
|
/**
|
|
1323
1802
|
* Framework SPI for verifying that an introspected schema matches the
|
|
@@ -1389,5 +1868,5 @@ type VerifierIssueCategory = 'declaredMissing' | 'declaredIncompatible' | 'value
|
|
|
1389
1868
|
*/
|
|
1390
1869
|
declare function dispositionForCategory(controlPolicy: ControlPolicy, category: VerifierIssueCategory): VerifierOutcome;
|
|
1391
1870
|
//#endregion
|
|
1392
|
-
export {
|
|
1393
|
-
//# sourceMappingURL=control-
|
|
1871
|
+
export { MigrationPlannerFailureResult as $, storageHashHex as $n, SpaceSigned as $t, FailedConversion as A, failedPrecheckWhy as An, ResolvedFieldConvertStatement as At, MigrationDataLossKind as B, issueLabel as Bn, SchemaNodeRef as Bt, CreateControlStackInput as C, expectPresent as Cn, OperationPreviewStatement as Ct, ExpectationFailureReason as D, extractParameterizedOutputTypeImports as Dn, PslContractInferCapable as Dt, EmitContractResult as E, extractComponentIds as En, PslContractDocument as Et, IntrospectSchemaResult as F, hasPslContractInfer as Fn, ResolvedRenameStatement as Ft, MigrationPackage as G, migrationSubjectKey as Gn, SchemaTreeVisitor as Gt, MigrationOperationClass as H, migrationRunnerFailure as Hn, SchemaSubjectClassifierCapable as Ht, MarkerHashes as I, hasSchemaSubjectClassifier as In, RowsWithoutValue as It, MigrationPlanOperation as J, orderIssuesByDependencies as Jn, SchemaVerifyResult as Jt, MigrationPlan as K, modelDisplayName as Kn, SchemaVerifier as Kt, MigratableTargetDescriptor as L, hasSchemaView as Ln, SchemaDiff as Lt, FieldCoordinate as M, hasMigrations as Mn, ResolvedMigrationStatement as Mt, FieldCoordinateJson as N, hasOperationPreview as Nn, ResolvedModelRenameStatement as Nt, FailedCast as O, extractQueryOperationTypeImports as On, PslSourceSettings as Ot, HelperCodecInvariantInput as P, hasPslContractBuild as Pn, ResolvedNamespaceRenameStatement as Pt, MigrationPlannerConflict as Q, schemaIssuesWhy as Qn, SpaceSignature as Qt, MigrationAccessChange as R, isRenameStatement as Rn, SchemaDiffIssue as Rt, CoreSchemaView as S, expectAbsent as Sn, OperationPreviewCapable as St, DiffableNode as T, extractCodecTypeImports as Tn, PslContractBuildCapable as Tt, MigrationOperationPolicy as U, migrationStatementJson as Un, SchemaTreeNode as Ut, MigrationMetadata as V, issueOutcome as Vn, SchemaOwnership as Vt, MigrationOperationSubject as W, migrationSubjectJson as Wn, SchemaTreeNodeOptions as Wt, MigrationPlanWithAuthoringSurface as X, sameMarkerHashes as Xn, SchemaViewNodeKind as Xt, MigrationPlanSubjects as Y, planOriginOf as Yn, SchemaViewCapable as Yt, MigrationPlanner as Z, schemaCheckWhy as Zn, SpaceMarkerConflict as Zt, ControlFamilyDescriptor as _, createControlStack as _n, ModelCoordinate as _t, CONTRACT_SNAPSHOTS_DIRNAME as a, VERIFY_CODE_TARGET_MISMATCH as an, MigrationRunnerFailureMeta as at, ControlTargetDescriptor as b, dispositionForCategory as bn, OperationContext as bt, ContractSpace as c, VerifierOutcome as cn, MigrationRunnerResult as ct, ControlAdapterInstance as d, assembleAuthoringContributions as dn, MigrationStatementJson as dt, SpaceToSign as en, withDatabaseUnchanged as er, MigrationPlannerResult as et, ControlDriverConnectOptions as f, assembleControlMutationDefaults as fn, MigrationSubject as ft, ControlExtensionInstance as g, contractSnapshotTypesSpecifier as gn, MismatchExplanation as gt, ControlExtensionDescriptor as h, contractSnapshotJsonSpecifier as hn, MismatchCause as ht, BlockingObject as i, VERIFY_CODE_SCHEMA_FAILURE as in, MigrationRunnerFailure as it, FailedTypeChange as j, fieldStatementText as jn, ResolvedFieldRenameStatement as jt, FailedCheck as k, failedPostcheckWhy as kn, ResolvedFieldBackfillStatement as kt, ContractSpaceHeadRef as l, VerifyDatabaseResult as ln, MigrationRunnerSuccessValue as lt, ControlDriverInstance as m, buildExtensionLoadOrder as mn, MigrationTemporaryValue as mt, AppliedMigrationStatement as n, VERIFY_CODE_HASH_MISMATCH as nn, MigrationRunner as nt, CheckExpectation as o, VerificationStatus as on, MigrationRunnerPerSpaceOptions as ot, ControlDriverDescriptor as p, assertUniqueCodecOwner as pn, MigrationSubjectJson as pt, MigrationPlanNamespaces as q, modelStatementText as qn, SchemaVerifyOptions as qt, AssembledAuthoringContributions as r, VERIFY_CODE_MARKER_MISSING as rn, MigrationRunnerExecutionChecks as rt, ContractSerializer as s, VerifierIssueCategory as sn, MigrationRunnerPerSpaceSuccessValue as st, APP_SPACE_ID as t, TargetMigrationsCapability as tn, withFailingSpace as tr, MigrationPlannerSuccessResult as tt, ControlAdapterDescriptor as u, VerifyDatabaseSchemaResult as un, MigrationScaffoldContext as ut, ControlFamilyInstance as v, describeMigrationStatement as vn, ModelCoordinateJson as vt, DiffSubjectGranularity as w, extractCodecLookup as wn, PlanOrigin as wt, ControlTargetInstance as x, enforceHelperCodecInvariants as xn, OperationPreview as xt, ControlStack as y, diffSchemas as yn, OpFactoryCall as yt, MigrationDataLoss as z, isStorageHashHex as zn, SchemaEntityCoordinate as zt };
|
|
1872
|
+
//# sourceMappingURL=control-s5ECUABR.d.mts.map
|