@prisma/orm-framework 8.0.0-rc.2-dev.3 → 8.0.0-rc.20-dev.1
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,15 +1,34 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
|
+
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
4
|
+
import { r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
5
|
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
4
|
-
import { _ as
|
|
5
|
-
import { n as
|
|
6
|
-
import { a as mergeCapabilityMatrices,
|
|
6
|
+
import { _ as objectSchemaKeys } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
7
|
+
import { n as codecDescriptorMissing, r as codecForRef } from "./resolve-codec-qqMjZrmn-Cok8elAo.mjs";
|
|
8
|
+
import { a as isAggregateDescriptor, c as mergeCapabilityMatrices, i as assembleGeneratorRegistrations, n as aggregateDescriptorKey, r as assembleGeneratorFunctions } from "./generator-functions-CXbQfvYu-BIFU1Ryx.mjs";
|
|
9
|
+
import { N as mergeAuthoringAttributeSpecs, P as mergeAuthoringNamespaces, c as assertNoCrossRegistryCollisions, h as contributedHelpers, l as assertResolvableTypeConstructorTemplates, m as collectScalarTypeConstructors, o as assembleAuthoringDataTypes, p as collectContributedDescriptorPaths, s as assembleDataTypeSupport, t as AUTHORING_TYPE_DESCRIPTOR_KINDS, u as assertTypeAliasesValid, w as isAuthoringArgRef } from "./temporal-presets-5TK1pTYJ-DmhrnMP1.mjs";
|
|
7
10
|
//#region ../../../1-framework/1-core/framework-components/dist/control.mjs
|
|
11
|
+
function expectAbsent(object) {
|
|
12
|
+
return {
|
|
13
|
+
expects: "absent",
|
|
14
|
+
object
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function expectPresent(object) {
|
|
18
|
+
return {
|
|
19
|
+
expects: "present",
|
|
20
|
+
object
|
|
21
|
+
};
|
|
22
|
+
}
|
|
8
23
|
const CONTRACT_SNAPSHOTS_DIRNAME = "snapshots";
|
|
9
24
|
const STORAGE_HASH_PATTERN = /^[0-9a-f]{64}$/;
|
|
25
|
+
/** Whether the snapshot store can address `storageHash`. */
|
|
26
|
+
function isStorageHashHex(storageHash) {
|
|
27
|
+
return STORAGE_HASH_PATTERN.test(storageHash);
|
|
28
|
+
}
|
|
10
29
|
/** Validate a storage hash for use as a directory name. */
|
|
11
30
|
function storageHashHex(storageHash) {
|
|
12
|
-
if (!
|
|
31
|
+
if (!isStorageHashHex(storageHash)) throw new InternalError(`Invalid storage hash "${storageHash}": expected 64 lowercase hex characters`);
|
|
13
32
|
return storageHash;
|
|
14
33
|
}
|
|
15
34
|
/** Module specifier for the store's `contract.json`, POSIX separators. */
|
|
@@ -29,16 +48,74 @@ function hasSchemaView(instance) {
|
|
|
29
48
|
function hasPslContractInfer(instance) {
|
|
30
49
|
return "inferPslContract" in instance && typeof instance["inferPslContract"] === "function";
|
|
31
50
|
}
|
|
51
|
+
function hasPslContractBuild(instance) {
|
|
52
|
+
return "buildPslContract" in instance && typeof Reflect.get(instance, "buildPslContract") === "function";
|
|
53
|
+
}
|
|
32
54
|
function hasOperationPreview(instance) {
|
|
33
55
|
return "toOperationPreview" in instance && typeof instance["toOperationPreview"] === "function";
|
|
34
56
|
}
|
|
35
57
|
function hasSchemaSubjectClassifier(instance) {
|
|
36
58
|
return "classifySubjectGranularity" in instance && typeof instance["classifySubjectGranularity"] === "function" && "classifyEntityKind" in instance && typeof instance["classifyEntityKind"] === "function";
|
|
37
59
|
}
|
|
60
|
+
/** The origin a plan from `contract` asserts, or `null` when it starts from no contract. */
|
|
61
|
+
function planOriginOf(contract) {
|
|
62
|
+
return contract === null ? null : { storageHash: contract.storage.storageHash };
|
|
63
|
+
}
|
|
64
|
+
function migrationRunnerFailure(code, message, options) {
|
|
65
|
+
const meta = options?.meta ?? {};
|
|
66
|
+
const error = structuredError(code, message, {
|
|
67
|
+
...ifDefined("why", options?.why),
|
|
68
|
+
meta,
|
|
69
|
+
...ifDefined("cause", options?.cause)
|
|
70
|
+
});
|
|
71
|
+
return Object.assign(error, {
|
|
72
|
+
code,
|
|
73
|
+
meta
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** The same failure, attributed to the space whose plan failed. */
|
|
77
|
+
function withFailingSpace(failure, failingSpace) {
|
|
78
|
+
const attributed = migrationRunnerFailure(failure.code, failure.message, {
|
|
79
|
+
why: failure.why,
|
|
80
|
+
meta: {
|
|
81
|
+
...failure.meta,
|
|
82
|
+
failingSpace
|
|
83
|
+
},
|
|
84
|
+
...ifDefined("cause", failure.cause)
|
|
85
|
+
});
|
|
86
|
+
if (failure.stack !== void 0) attributed.stack = failure.stack;
|
|
87
|
+
return attributed;
|
|
88
|
+
}
|
|
89
|
+
function asSentence(text) {
|
|
90
|
+
const trimmed = text.trimEnd();
|
|
91
|
+
return /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The same failure, saying whether the database is as it was before the failed apply, in its meta
|
|
95
|
+
* and at the end of its why.
|
|
96
|
+
*/
|
|
97
|
+
function withDatabaseUnchanged(failure, databaseUnchanged) {
|
|
98
|
+
const outcome = databaseUnchanged ? "The failed apply changed nothing." : "The operations that ran before the failure stay applied.";
|
|
99
|
+
const attributed = migrationRunnerFailure(failure.code, failure.message, {
|
|
100
|
+
why: failure.why === void 0 ? outcome : `${asSentence(failure.why)} ${outcome}`,
|
|
101
|
+
meta: {
|
|
102
|
+
...failure.meta,
|
|
103
|
+
databaseUnchanged
|
|
104
|
+
},
|
|
105
|
+
...ifDefined("cause", failure.cause)
|
|
106
|
+
});
|
|
107
|
+
if (failure.stack !== void 0) attributed.stack = failure.stack;
|
|
108
|
+
return attributed;
|
|
109
|
+
}
|
|
38
110
|
const VERIFY_CODE_MARKER_MISSING = "CONTRACT.MARKER_MISSING";
|
|
39
111
|
const VERIFY_CODE_HASH_MISMATCH = "CONTRACT.MARKER_MISMATCH";
|
|
40
112
|
const VERIFY_CODE_TARGET_MISMATCH = "CONTRACT.TARGET_MISMATCH";
|
|
41
113
|
const VERIFY_CODE_SCHEMA_FAILURE = "CONTRACT.SCHEMA_VERIFICATION_FAILED";
|
|
114
|
+
/** Whether two markers hold the same hashes, `null` standing for no marker. */
|
|
115
|
+
function sameMarkerHashes(a, b) {
|
|
116
|
+
if (a === null || b === null) return a === b;
|
|
117
|
+
return a.storageHash === b.storageHash && a.profileHash === b.profileHash;
|
|
118
|
+
}
|
|
42
119
|
var SchemaTreeNode = class {
|
|
43
120
|
kind;
|
|
44
121
|
id;
|
|
@@ -96,6 +173,12 @@ function extractCodecTypeImports(descriptors) {
|
|
|
96
173
|
}
|
|
97
174
|
return imports;
|
|
98
175
|
}
|
|
176
|
+
function extractParameterizedOutputTypeImports(descriptors) {
|
|
177
|
+
return descriptors.flatMap((descriptor) => {
|
|
178
|
+
const typeFunction = descriptor.types?.codecTypes?.parameterizedOutputTypes;
|
|
179
|
+
return typeFunction === void 0 ? [] : [typeFunction];
|
|
180
|
+
});
|
|
181
|
+
}
|
|
99
182
|
function extractQueryOperationTypeImports(descriptors) {
|
|
100
183
|
const imports = [];
|
|
101
184
|
for (const descriptor of descriptors) {
|
|
@@ -113,12 +196,17 @@ function extractComponentIds(family, target, adapter, extensions) {
|
|
|
113
196
|
for (const ext of extensions) addUniqueId(ids, seen, ext.id);
|
|
114
197
|
return ids;
|
|
115
198
|
}
|
|
116
|
-
function assembleAuthoringContributions(descriptors) {
|
|
199
|
+
function assembleAuthoringContributions(descriptors, dataTypes = assembleAuthoringDataTypes(descriptors)) {
|
|
117
200
|
const field = {};
|
|
118
201
|
const type = {};
|
|
119
202
|
const entityTypes = {};
|
|
120
203
|
const pslBlockDescriptors = {};
|
|
121
204
|
const modelAttributes = {};
|
|
205
|
+
const attributeSpecs = {
|
|
206
|
+
model: {},
|
|
207
|
+
field: {}
|
|
208
|
+
};
|
|
209
|
+
const attributeSpecOwners = /* @__PURE__ */ new Map();
|
|
122
210
|
const pathOwners = /* @__PURE__ */ new Map();
|
|
123
211
|
const claimContributedPaths = (namespace, descriptorKind, label, descriptorId) => {
|
|
124
212
|
for (const path of collectContributedDescriptorPaths(namespace, descriptorKind)) {
|
|
@@ -144,9 +232,9 @@ function assembleAuthoringContributions(descriptors) {
|
|
|
144
232
|
mergeAuthoringNamespaces(field, descriptor.authoring.field, [], "fieldPreset", "field");
|
|
145
233
|
}
|
|
146
234
|
if (descriptor.authoring?.type) {
|
|
147
|
-
claimContributedPaths(descriptor.authoring.type,
|
|
235
|
+
claimContributedPaths(descriptor.authoring.type, AUTHORING_TYPE_DESCRIPTOR_KINDS, "type", descriptorId);
|
|
148
236
|
assertResolvableTypeConstructorTemplates(descriptor.authoring.type, descriptorId);
|
|
149
|
-
mergeAuthoringNamespaces(type, descriptor.authoring.type, [],
|
|
237
|
+
mergeAuthoringNamespaces(type, descriptor.authoring.type, [], AUTHORING_TYPE_DESCRIPTOR_KINDS, "type");
|
|
150
238
|
}
|
|
151
239
|
if (descriptor.authoring?.entityTypes) {
|
|
152
240
|
claimContributedPaths(descriptor.authoring.entityTypes, "entity", "entity", descriptorId);
|
|
@@ -157,6 +245,7 @@ function assembleAuthoringContributions(descriptors) {
|
|
|
157
245
|
mergeAuthoringNamespaces(pslBlockDescriptors, descriptor.authoring.pslBlockDescriptors, [], "pslBlock", "pslBlock");
|
|
158
246
|
}
|
|
159
247
|
if (descriptor.authoring?.modelAttributes) mergeAuthoringNamespaces(modelAttributes, descriptor.authoring.modelAttributes, [], "modelAttribute", "modelAttribute");
|
|
248
|
+
if (descriptor.authoring?.attributeSpecs) mergeAuthoringAttributeSpecs(attributeSpecs, descriptor.authoring.attributeSpecs, descriptorId, attributeSpecOwners);
|
|
160
249
|
}
|
|
161
250
|
const fieldNamespace = field;
|
|
162
251
|
const typeNamespace = type;
|
|
@@ -166,29 +255,56 @@ function assembleAuthoringContributions(descriptors) {
|
|
|
166
255
|
assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace, pslBlockDescriptorNamespace, modelAttributeNamespace);
|
|
167
256
|
if (valueObjectStorageDeclaration !== void 0 && !collectScalarTypeConstructors(typeNamespace).has(valueObjectStorageDeclaration.name)) throw new InternalError(`Invalid authoring valueObjectStorageType "${valueObjectStorageDeclaration.name}" declared by descriptor "${valueObjectStorageDeclaration.ownerId}". The name must be a top-level bare-eligible type constructor in the assembled authoring namespace.`);
|
|
168
257
|
return {
|
|
258
|
+
dataTypes,
|
|
169
259
|
field: fieldNamespace,
|
|
170
260
|
type: typeNamespace,
|
|
171
261
|
entityTypes: entityTypeNamespace,
|
|
172
262
|
pslBlockDescriptors: pslBlockDescriptorNamespace,
|
|
173
263
|
modelAttributes: modelAttributeNamespace,
|
|
264
|
+
attributeSpecs,
|
|
174
265
|
...valueObjectStorageDeclaration !== void 0 ? { valueObjectStorageType: valueObjectStorageDeclaration.name } : {}
|
|
175
266
|
};
|
|
176
267
|
}
|
|
268
|
+
function argumentMappedKeys(descriptor) {
|
|
269
|
+
return Object.entries(descriptor.output.typeParams ?? {}).flatMap(([key, template]) => isAuthoringArgRef(template) ? [key] : []);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The checks on type constructors and field presets that read the stack's codecs, each naming the component and the id at fault:
|
|
273
|
+
*
|
|
274
|
+
* 1. every type constructor and field preset names a registered codec;
|
|
275
|
+
* 2. a type constructor maps its arguments only onto parameters its data type or codec declares;
|
|
276
|
+
* 3. at most one type constructor per data type is marked inferred.
|
|
277
|
+
*
|
|
278
|
+
* {@link assembleDataTypeSupport} checks data types, their entries and casts, and the value arguments of type constructors and field presets.
|
|
279
|
+
*/
|
|
280
|
+
function enforceHelperCodecInvariants(input) {
|
|
281
|
+
const inferredBy = /* @__PURE__ */ new Map();
|
|
282
|
+
for (const contributed of input.helpers) {
|
|
283
|
+
const { path, descriptor, contributedBy } = contributed;
|
|
284
|
+
const kind = descriptor.kind === "typeConstructor" ? "Type constructor" : "Field preset";
|
|
285
|
+
const codecId = descriptor.output.codecId;
|
|
286
|
+
const codec = input.codecDescriptorFor(codecId);
|
|
287
|
+
if (codec === void 0) throw new InternalError(`${kind} "${path}" contributed by "${contributedBy}" names codec "${codecId}", which no component registers.`);
|
|
288
|
+
if (descriptor.kind !== "typeConstructor") continue;
|
|
289
|
+
const codecKeys = codec.paramsSchema === void 0 ? [] : objectSchemaKeys(codec.paramsSchema);
|
|
290
|
+
if (codecKeys !== void 0) {
|
|
291
|
+
const declared = /* @__PURE__ */ new Set([...codecKeys, ...objectSchemaKeys(input.lookup.get(codec.dataType)?.params) ?? []]);
|
|
292
|
+
for (const key of argumentMappedKeys(descriptor)) if (!declared.has(key)) throw new InternalError(`Type constructor "${path}" contributed by "${contributedBy}" maps an argument onto the parameter "${key}", which neither data type "${codec.dataType}" nor codec "${codecId}" declares.`);
|
|
293
|
+
}
|
|
294
|
+
if (descriptor.inferred !== true) continue;
|
|
295
|
+
const existing = inferredBy.get(codec.dataType);
|
|
296
|
+
if (existing !== void 0) throw new InternalError(`Type constructors "${existing.path}" contributed by "${existing.contributedBy}" and "${path}" contributed by "${contributedBy}" are both marked inferred for data type "${codec.dataType}"; a data type has at most one.`);
|
|
297
|
+
inferredBy.set(codec.dataType, contributed);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
177
300
|
function assembleControlMutationDefaults(descriptors) {
|
|
178
301
|
const defaultFunctionRegistry = /* @__PURE__ */ new Map();
|
|
179
302
|
const functionOwners = /* @__PURE__ */ new Map();
|
|
180
|
-
const
|
|
181
|
-
const generatorOwners = /* @__PURE__ */ new Map();
|
|
303
|
+
const registered = assembleGeneratorRegistrations(descriptors);
|
|
182
304
|
for (const descriptor of descriptors) {
|
|
183
305
|
const contributions = descriptor.controlMutationDefaults;
|
|
184
306
|
if (!contributions) continue;
|
|
185
307
|
const descriptorId = descriptor.id ?? "<unknown>";
|
|
186
|
-
for (const generatorDescriptor of contributions.generatorDescriptors) {
|
|
187
|
-
const existingOwner = generatorOwners.get(generatorDescriptor.id);
|
|
188
|
-
if (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default generator id "${generatorDescriptor.id}". Descriptor "${descriptorId}" conflicts with "${existingOwner}".`);
|
|
189
|
-
generatorMap.set(generatorDescriptor.id, generatorDescriptor);
|
|
190
|
-
generatorOwners.set(generatorDescriptor.id, descriptorId);
|
|
191
|
-
}
|
|
192
308
|
for (const [functionName, handler] of contributions.defaultFunctionRegistry) {
|
|
193
309
|
const existingOwner = functionOwners.get(functionName);
|
|
194
310
|
if (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default function "${functionName}". Descriptor "${descriptorId}" conflicts with "${existingOwner}".`);
|
|
@@ -198,7 +314,8 @@ function assembleControlMutationDefaults(descriptors) {
|
|
|
198
314
|
}
|
|
199
315
|
return {
|
|
200
316
|
defaultFunctionRegistry,
|
|
201
|
-
generatorDescriptors:
|
|
317
|
+
generatorDescriptors: [...registered.values()].map(({ descriptor }) => descriptor),
|
|
318
|
+
componentIdsByGenerator: new Map([...registered].map(([id, { componentId }]) => [id, componentId]))
|
|
202
319
|
};
|
|
203
320
|
}
|
|
204
321
|
/**
|
|
@@ -212,7 +329,7 @@ function collectAggregateDescriptors(descriptors) {
|
|
|
212
329
|
for (const descriptor of descriptors) {
|
|
213
330
|
const descriptorId = descriptor.id ?? "<unknown>";
|
|
214
331
|
for (const contributed of descriptor.types?.aggregateDescriptors ?? []) {
|
|
215
|
-
if (!isAggregateDescriptor(contributed)) throw runtimeError("CONTRACT.AGGREGATE_DESCRIPTOR_INVALID", `Malformed aggregate descriptor contributed by "${descriptorId}". A descriptor declares a non-empty \`operation\`, an \`input\` match of kind \`none\`/\`any\`/\`codec\`/\`trait\`, an \`output\` of kind \`self\`/\`codec\`, and a boolean \`nullable\` — plus \`
|
|
332
|
+
if (!isAggregateDescriptor(contributed)) throw runtimeError("CONTRACT.AGGREGATE_DESCRIPTOR_INVALID", `Malformed aggregate descriptor contributed by "${descriptorId}". A descriptor declares a non-empty \`operation\`, an \`input\` match of kind \`none\`/\`any\`/\`codec\`/\`trait\`, an \`output\` of kind \`self\`/\`codec\`, and a boolean \`nullable\` — plus \`emptyResultWire\`, a wire value of the result codec, where \`nullable\` is false; a \`self\` output needs an input to reuse.`, {
|
|
216
333
|
contributedBy: descriptorId,
|
|
217
334
|
descriptor: contributed
|
|
218
335
|
});
|
|
@@ -240,7 +357,6 @@ function collectCodecDescriptors(descriptors) {
|
|
|
240
357
|
function extractCodecLookup(descriptors) {
|
|
241
358
|
const byId = /* @__PURE__ */ new Map();
|
|
242
359
|
const descriptorsById = /* @__PURE__ */ new Map();
|
|
243
|
-
const targetTypesById = /* @__PURE__ */ new Map();
|
|
244
360
|
const renderersById = /* @__PURE__ */ new Map();
|
|
245
361
|
const inputRenderersById = /* @__PURE__ */ new Map();
|
|
246
362
|
const valueLiteralRenderersById = /* @__PURE__ */ new Map();
|
|
@@ -258,32 +374,33 @@ function extractCodecLookup(descriptors) {
|
|
|
258
374
|
});
|
|
259
375
|
owners.set(codecDescriptor.codecId, descriptorId);
|
|
260
376
|
descriptorsById.set(codecDescriptor.codecId, codecDescriptor);
|
|
261
|
-
if (Array.isArray(codecDescriptor.targetTypes)) targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);
|
|
262
377
|
if (typeof codecDescriptor.renderOutputType === "function") renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);
|
|
263
378
|
if (typeof codecDescriptor.renderInputType === "function") inputRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderInputType);
|
|
264
379
|
if (typeof codecDescriptor.renderValueLiteral === "function") valueLiteralRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderValueLiteral);
|
|
265
380
|
if (!byId.has(codecDescriptor.codecId)) if (codecDescriptor.isParameterized) try {
|
|
266
381
|
const representative = codecDescriptor.factory({})({ name: `<lookup:${codecDescriptor.codecId}>` });
|
|
267
382
|
byId.set(codecDescriptor.codecId, representative);
|
|
268
|
-
} catch {
|
|
383
|
+
} catch (error) {
|
|
384
|
+
if (isInternalError(error)) throw error;
|
|
385
|
+
}
|
|
269
386
|
else {
|
|
270
387
|
const representative = codecDescriptor.factory(void 0)({ name: `<lookup:${codecDescriptor.codecId}>` });
|
|
271
388
|
byId.set(codecDescriptor.codecId, representative);
|
|
272
389
|
}
|
|
273
390
|
}
|
|
274
391
|
}
|
|
275
|
-
|
|
392
|
+
const registry = {
|
|
276
393
|
get: (id) => byId.get(id),
|
|
277
394
|
forCodecRef(ref) {
|
|
278
|
-
return
|
|
395
|
+
return codecForRef(registry, ref) ?? codecDescriptorMissing(ref, "CONTRACT.CODEC_DESCRIPTOR_MISSING");
|
|
279
396
|
},
|
|
280
397
|
forColumn: () => void 0,
|
|
281
|
-
targetTypesFor: (id) => targetTypesById.get(id),
|
|
282
398
|
renderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),
|
|
283
399
|
renderInputTypeFor: (id, params) => inputRenderersById.get(id)?.(params),
|
|
284
400
|
renderValueLiteralFor: (id, value, side) => valueLiteralRenderersById.get(id)?.(value, side),
|
|
285
401
|
descriptorFor: (id) => descriptorsById.get(id)
|
|
286
402
|
};
|
|
403
|
+
return registry;
|
|
287
404
|
}
|
|
288
405
|
function assembleExtensionContracts(extensions) {
|
|
289
406
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -357,7 +474,21 @@ function createControlStack(input) {
|
|
|
357
474
|
...orderedExtensions
|
|
358
475
|
];
|
|
359
476
|
const codecLookup = extractCodecLookup(allDescriptors);
|
|
360
|
-
const
|
|
477
|
+
const dataTypes = assembleDataTypeSupport(allDescriptors, (codecId) => codecLookup.descriptorFor?.(codecId)?.dataType);
|
|
478
|
+
const authoringContributions = assembleAuthoringContributions(allDescriptors, dataTypes.support.entries);
|
|
479
|
+
const codecDescriptors = collectCodecDescriptors(allDescriptors);
|
|
480
|
+
enforceHelperCodecInvariants({
|
|
481
|
+
lookup: dataTypes.support.lookup,
|
|
482
|
+
helpers: allDescriptors.flatMap(contributedHelpers),
|
|
483
|
+
codecDescriptorFor: (codecId) => codecLookup.descriptorFor?.(codecId)
|
|
484
|
+
});
|
|
485
|
+
const controlMutationDefaults = assembleControlMutationDefaults(allDescriptors);
|
|
486
|
+
const generatorFunctions = assembleGeneratorFunctions(allDescriptors);
|
|
487
|
+
assertTypeAliasesValid(authoringContributions.type, {
|
|
488
|
+
generatorFunctions,
|
|
489
|
+
paramsSchemaOf: (codecId) => codecLookup.descriptorFor(codecId)?.paramsSchema,
|
|
490
|
+
fieldLength: (field) => family.fieldLength?.(field, dataTypes.support)
|
|
491
|
+
});
|
|
361
492
|
return {
|
|
362
493
|
family,
|
|
363
494
|
target,
|
|
@@ -367,13 +498,17 @@ function createControlStack(input) {
|
|
|
367
498
|
extensionContracts: assembleExtensionContracts(orderedExtensions),
|
|
368
499
|
codecTypeImports: extractCodecTypeImports(allDescriptors),
|
|
369
500
|
queryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),
|
|
501
|
+
parameterizedOutputTypeImports: extractParameterizedOutputTypeImports(allDescriptors),
|
|
370
502
|
extensionIds: extractComponentIds(family, target, adapter, orderedExtensions),
|
|
371
503
|
codecLookup,
|
|
372
|
-
codecDescriptors
|
|
504
|
+
codecDescriptors,
|
|
505
|
+
dataTypes: dataTypes.support,
|
|
506
|
+
declaredDataTypes: dataTypes.declared,
|
|
373
507
|
aggregateDescriptors: collectAggregateDescriptors(allDescriptors),
|
|
374
508
|
authoringContributions,
|
|
375
509
|
scalarTypes: [...collectScalarTypeConstructors(authoringContributions.type).keys()],
|
|
376
|
-
controlMutationDefaults
|
|
510
|
+
controlMutationDefaults,
|
|
511
|
+
generatorFunctions,
|
|
377
512
|
capabilities: mergeCapabilityMatrices({}, [
|
|
378
513
|
target,
|
|
379
514
|
...adapter ? [adapter] : [],
|
|
@@ -381,6 +516,112 @@ function createControlStack(input) {
|
|
|
381
516
|
])
|
|
382
517
|
};
|
|
383
518
|
}
|
|
519
|
+
function isRenameStatement(statement) {
|
|
520
|
+
return statement.kind === "rename";
|
|
521
|
+
}
|
|
522
|
+
/** A key that is equal for two subjects exactly when they name the same thing. */
|
|
523
|
+
function migrationSubjectKey(subject) {
|
|
524
|
+
switch (subject.kind) {
|
|
525
|
+
case "model": return JSON.stringify([
|
|
526
|
+
"model",
|
|
527
|
+
subject.namespaceId,
|
|
528
|
+
subject.model
|
|
529
|
+
]);
|
|
530
|
+
case "field": return JSON.stringify([
|
|
531
|
+
"field",
|
|
532
|
+
subject.namespaceId,
|
|
533
|
+
subject.model,
|
|
534
|
+
subject.field
|
|
535
|
+
]);
|
|
536
|
+
case "storage": return JSON.stringify(["storage", subject.name]);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* A model's name in messages: `namespace.Model`, or `Model` alone in the unbound namespace, whose
|
|
541
|
+
* id is internal.
|
|
542
|
+
*/
|
|
543
|
+
function modelDisplayName(coordinate) {
|
|
544
|
+
return coordinate.namespaceId === "__unbound__" ? coordinate.model : `${coordinate.namespaceId}.${coordinate.model}`;
|
|
545
|
+
}
|
|
546
|
+
/** A model as a statement names it: with its namespace only when the contract has several. */
|
|
547
|
+
function modelStatementText(contract, coordinate) {
|
|
548
|
+
return Object.keys(contract.domain.namespaces).length > 1 ? modelDisplayName(coordinate) : coordinate.model;
|
|
549
|
+
}
|
|
550
|
+
/** A field as a statement names it, through its model: `User.age`, or `app.User.age` when the contract has several namespaces. */
|
|
551
|
+
function fieldStatementText(contract, field) {
|
|
552
|
+
return `${modelStatementText(contract, field)}.${field.field}`;
|
|
553
|
+
}
|
|
554
|
+
function coordinateJson(coordinate) {
|
|
555
|
+
if (coordinate.namespaceId !== "__unbound__") return coordinate;
|
|
556
|
+
const { namespaceId: _unbound, ...rest } = coordinate;
|
|
557
|
+
return rest;
|
|
558
|
+
}
|
|
559
|
+
/** The statement as JSON output writes it. */
|
|
560
|
+
function migrationStatementJson(statement) {
|
|
561
|
+
if (statement.kind !== "rename") return {
|
|
562
|
+
...statement,
|
|
563
|
+
field: coordinateJson(statement.field)
|
|
564
|
+
};
|
|
565
|
+
switch (statement.entity) {
|
|
566
|
+
case "namespace": return {
|
|
567
|
+
...statement,
|
|
568
|
+
from: { namespaceId: statement.from },
|
|
569
|
+
to: { namespaceId: statement.to }
|
|
570
|
+
};
|
|
571
|
+
case "model": return {
|
|
572
|
+
...statement,
|
|
573
|
+
from: coordinateJson(statement.from),
|
|
574
|
+
to: coordinateJson(statement.to)
|
|
575
|
+
};
|
|
576
|
+
case "field": return {
|
|
577
|
+
...statement,
|
|
578
|
+
from: coordinateJson(statement.from),
|
|
579
|
+
to: coordinateJson(statement.to)
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
/** The subject as JSON output writes it. */
|
|
584
|
+
function migrationSubjectJson(subject) {
|
|
585
|
+
switch (subject.kind) {
|
|
586
|
+
case "model": return {
|
|
587
|
+
kind: "model",
|
|
588
|
+
...coordinateJson({
|
|
589
|
+
namespaceId: subject.namespaceId,
|
|
590
|
+
model: subject.model
|
|
591
|
+
})
|
|
592
|
+
};
|
|
593
|
+
case "field": return {
|
|
594
|
+
kind: "field",
|
|
595
|
+
...coordinateJson({
|
|
596
|
+
namespaceId: subject.namespaceId,
|
|
597
|
+
model: subject.model,
|
|
598
|
+
field: subject.field
|
|
599
|
+
})
|
|
600
|
+
};
|
|
601
|
+
case "storage": return subject;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function qualifiedModelText(coordinate) {
|
|
605
|
+
return coordinate.namespaceId === "__unbound__" ? coordinate.model : `${coordinate.namespaceId}.${coordinate.model}`;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* The text that reports a statement, in domain names: a model or field is named with its
|
|
609
|
+
* namespace only when its contract has more than one, and a model moved to another namespace always
|
|
610
|
+
* is. A renamed field is named through its model as
|
|
611
|
+
* the destination contract names it, as the statement itself is written.
|
|
612
|
+
*/
|
|
613
|
+
function describeMigrationStatement(statement, fromContract, contract) {
|
|
614
|
+
if (statement.kind !== "rename") return `${statement.kind} field "${modelStatementText(contract, statement.field)}.${statement.field.field}"`;
|
|
615
|
+
if (statement.entity === "namespace") return `rename namespace "${statement.from}" to "${statement.to}"`;
|
|
616
|
+
if (statement.entity === "model") {
|
|
617
|
+
const { from, to } = statement;
|
|
618
|
+
if (from.namespaceId === to.namespaceId) return `rename model "${modelStatementText(fromContract, from)}" to "${modelStatementText(contract, to)}"`;
|
|
619
|
+
if (from.model === to.model) return `move model "${qualifiedModelText(from)}" to namespace "${to.namespaceId}"`;
|
|
620
|
+
return `rename model "${qualifiedModelText(from)}" to "${qualifiedModelText(to)}"`;
|
|
621
|
+
}
|
|
622
|
+
const model = modelStatementText(contract, statement.to);
|
|
623
|
+
return `rename field "${model}.${statement.from.field}" to "${model}.${statement.to.field}"`;
|
|
624
|
+
}
|
|
384
625
|
const PATH_DELIMITER = " ";
|
|
385
626
|
function pathKey(path) {
|
|
386
627
|
return path.join(PATH_DELIMITER);
|
|
@@ -501,10 +742,8 @@ function issueOutcome(issue) {
|
|
|
501
742
|
if (hasActual) return "not-expected";
|
|
502
743
|
throw new InternalError(`issueOutcome: issue at "${issue.path.join("/")}" carries neither an expected nor an actual node`);
|
|
503
744
|
}
|
|
504
|
-
/** Delimiter joining `nodeKind` and `id` into one sibling-map key. Every `nodeKind` is a code-defined literal (kebab-case-style), so a null character can never appear in one. */
|
|
505
|
-
const SIBLING_KEY_DELIMITER = "\0";
|
|
506
745
|
function siblingKey(node) {
|
|
507
|
-
return
|
|
746
|
+
return JSON.stringify([node.nodeKind, node.id]);
|
|
508
747
|
}
|
|
509
748
|
function insertNode(map, node) {
|
|
510
749
|
const key = siblingKey(node);
|
|
@@ -515,7 +754,8 @@ function emitMissingSubtree(node, parentPath) {
|
|
|
515
754
|
const path = [...parentPath, node.id];
|
|
516
755
|
return [{
|
|
517
756
|
path,
|
|
518
|
-
expected: node
|
|
757
|
+
expected: node,
|
|
758
|
+
...ifDefined("explanation", node.explainMismatch?.(void 0))
|
|
519
759
|
}, ...node.children().flatMap((c) => emitMissingSubtree(c, path))];
|
|
520
760
|
}
|
|
521
761
|
function emitExtraSubtree(node, parentPath) {
|
|
@@ -538,10 +778,10 @@ function diffSchemas(expected, actual) {
|
|
|
538
778
|
return mirrorDependsOnOntoIssues(diffPair(expected, actual, []));
|
|
539
779
|
}
|
|
540
780
|
function schemaNodeRefKey(ref) {
|
|
541
|
-
return ref.map((step) => step.id)
|
|
781
|
+
return JSON.stringify(ref.map((step) => step.id));
|
|
542
782
|
}
|
|
543
783
|
function issuePathKey(path) {
|
|
544
|
-
return
|
|
784
|
+
return JSON.stringify(path);
|
|
545
785
|
}
|
|
546
786
|
function terminalNodeKind(issue) {
|
|
547
787
|
return (issue.expected ?? issue.actual)?.nodeKind;
|
|
@@ -589,7 +829,8 @@ function diffPair(expected, actual, parentPath) {
|
|
|
589
829
|
if (!expected.isEqualTo(actual)) issues.push({
|
|
590
830
|
path,
|
|
591
831
|
expected,
|
|
592
|
-
actual
|
|
832
|
+
actual,
|
|
833
|
+
...ifDefined("explanation", expected.explainMismatch?.(actual))
|
|
593
834
|
});
|
|
594
835
|
issues.push(...diffChildren(expected.children(), actual.children(), path));
|
|
595
836
|
return issues;
|
|
@@ -637,6 +878,38 @@ var SchemaDiff = class SchemaDiff {
|
|
|
637
878
|
return new SchemaDiff(this.issues.filter(keep));
|
|
638
879
|
}
|
|
639
880
|
};
|
|
881
|
+
const OUTCOME_LABEL = {
|
|
882
|
+
"not-found": "missing",
|
|
883
|
+
"not-expected": "extra",
|
|
884
|
+
"not-equal": "mismatch"
|
|
885
|
+
};
|
|
886
|
+
/** What a diff issue says: its outcome, its path, and its explanation when it has one. */
|
|
887
|
+
function issueLabel(issue) {
|
|
888
|
+
const label = `${OUTCOME_LABEL[issueOutcome(issue)]}: ${issue.path.join("/")}`;
|
|
889
|
+
return issue.explanation === void 0 ? label : `${label}. ${issue.explanation.text}`;
|
|
890
|
+
}
|
|
891
|
+
/** The issues of a failed schema check, as one sentence after `opening`. */
|
|
892
|
+
function schemaIssuesWhy(opening, issues) {
|
|
893
|
+
return `${opening}: ${issues.map((issue) => issueLabel(issue).replace(/\.$/, "")).join("; ")}.`;
|
|
894
|
+
}
|
|
895
|
+
/** The why of a failed schema check after apply, listing its issues when it found any. */
|
|
896
|
+
function schemaCheckWhy(issues) {
|
|
897
|
+
return issues.length === 0 ? "The resulting database schema does not satisfy the destination contract." : schemaIssuesWhy("The schema check after apply found", issues);
|
|
898
|
+
}
|
|
899
|
+
/** 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. */
|
|
900
|
+
function failedPrecheckWhy(check) {
|
|
901
|
+
const checked = `Before operation ${check.operationId} runs, it checks: ${check.description}.`;
|
|
902
|
+
const { expectation } = check;
|
|
903
|
+
if (expectation === void 0) return `${checked} That check failed on this database.`;
|
|
904
|
+
return expectation.expects === "absent" ? `${checked} That check failed: the database already has ${expectation.object}.` : `${checked} That check failed: the database has no ${expectation.object}.`;
|
|
905
|
+
}
|
|
906
|
+
/** 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. */
|
|
907
|
+
function failedPostcheckWhy(check) {
|
|
908
|
+
const checked = `After operation ${check.operationId} ran, it checks: ${check.description}.`;
|
|
909
|
+
const { expectation } = check;
|
|
910
|
+
if (expectation === void 0) return `${checked} That check failed on this database.`;
|
|
911
|
+
return expectation.expects === "absent" ? `${checked} That check failed: the database still has ${expectation.object}.` : `${checked} That check failed: the database has no ${expectation.object}.`;
|
|
912
|
+
}
|
|
640
913
|
/**
|
|
641
914
|
* Grades a target-neutral issue category against a control policy.
|
|
642
915
|
*
|
|
@@ -655,6 +928,6 @@ function dispositionForCategory(controlPolicy, category) {
|
|
|
655
928
|
return "fail";
|
|
656
929
|
}
|
|
657
930
|
//#endregion
|
|
658
|
-
export {
|
|
931
|
+
export { withFailingSpace as $, hasMigrations as A, migrationRunnerFailure as B, extractCodecTypeImports as C, failedPostcheckWhy as D, extractQueryOperationTypeImports as E, hasSchemaView as F, modelStatementText as G, migrationSubjectJson as H, isRenameStatement as I, sameMarkerHashes as J, orderIssuesByDependencies as K, isStorageHashHex as L, hasPslContractBuild as M, hasPslContractInfer as N, failedPrecheckWhy as O, hasSchemaSubjectClassifier as P, withDatabaseUnchanged as Q, issueLabel as R, extractCodecLookup as S, extractParameterizedOutputTypeImports as T, migrationSubjectKey as U, migrationStatementJson as V, modelDisplayName as W, schemaIssuesWhy as X, schemaCheckWhy as Y, storageHashHex as Z, diffSchemas as _, VERIFY_CODE_HASH_MISMATCH as a, expectAbsent as b, VERIFY_CODE_TARGET_MISMATCH as c, assertUniqueCodecOwner as d, buildExtensionLoadOrder as f, describeMigrationStatement as g, createControlStack as h, SchemaTreeNode as i, hasOperationPreview as j, fieldStatementText as k, assembleAuthoringContributions as l, contractSnapshotTypesSpecifier as m, CONTRACT_SNAPSHOTS_DIRNAME as n, VERIFY_CODE_MARKER_MISSING as o, contractSnapshotJsonSpecifier as p, planOriginOf as q, SchemaDiff as r, VERIFY_CODE_SCHEMA_FAILURE as s, APP_SPACE_ID as t, assembleControlMutationDefaults as u, dispositionForCategory as v, extractComponentIds as w, expectPresent as x, enforceHelperCodecInvariants as y, issueOutcome as z };
|
|
659
932
|
|
|
660
|
-
//# sourceMappingURL=control-
|
|
933
|
+
//# sourceMappingURL=control-DMJqhnwU.mjs.map
|