@prisma/orm-framework 8.0.0-rc.2-dev.3 → 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
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.
|
|
3
|
+
"version": "8.0.0-rc.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"description": "Prisma
|
|
7
|
+
"description": "Prisma 8 target-agnostic runtime: contract, components, authoring surface",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
@@ -12,26 +12,27 @@
|
|
|
12
12
|
"@standard-schema/spec": "^1.1.0",
|
|
13
13
|
"arktype": "^2.2.2",
|
|
14
14
|
"pathe": "^2.0.3",
|
|
15
|
+
"tinyglobby": "^0.2.17",
|
|
15
16
|
"uniku": "^0.5.0"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "8.0.0-rc.
|
|
19
|
-
"@internal/contract": "8.0.0-rc.
|
|
20
|
-
"@internal/contract-authoring": "8.0.0-rc.
|
|
21
|
-
"@internal/errors": "8.0.0-rc.
|
|
22
|
-
"@internal/framework-components": "8.0.0-rc.
|
|
23
|
-
"@internal/ids": "8.0.0-rc.
|
|
24
|
-
"@internal/operations": "8.0.0-rc.
|
|
25
|
-
"@internal/psl-parser": "8.0.0-rc.
|
|
26
|
-
"@internal/psl-printer": "8.0.0-rc.
|
|
27
|
-
"@internal/ts-render": "8.0.0-rc.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.
|
|
29
|
-
"@internal/publish-surface": "8.0.0-rc.
|
|
30
|
-
"@repo/tsdown": "8.0.0-rc.
|
|
31
|
-
"@internal/utils": "8.0.0-rc.
|
|
19
|
+
"@internal/config": "8.0.0-rc.20",
|
|
20
|
+
"@internal/contract": "8.0.0-rc.20",
|
|
21
|
+
"@internal/contract-authoring": "8.0.0-rc.20",
|
|
22
|
+
"@internal/errors": "8.0.0-rc.20",
|
|
23
|
+
"@internal/framework-components": "8.0.0-rc.20",
|
|
24
|
+
"@internal/ids": "8.0.0-rc.20",
|
|
25
|
+
"@internal/operations": "8.0.0-rc.20",
|
|
26
|
+
"@internal/psl-parser": "8.0.0-rc.20",
|
|
27
|
+
"@internal/psl-printer": "8.0.0-rc.20",
|
|
28
|
+
"@internal/ts-render": "8.0.0-rc.20",
|
|
29
|
+
"@repo/tsconfig": "8.0.0-rc.20",
|
|
30
|
+
"@internal/publish-surface": "8.0.0-rc.20",
|
|
31
|
+
"@repo/tsdown": "8.0.0-rc.20",
|
|
32
|
+
"@internal/utils": "8.0.0-rc.20",
|
|
32
33
|
"tsdown": "0.22.14",
|
|
33
34
|
"typescript": "5.9.3",
|
|
34
|
-
"vitest": "
|
|
35
|
+
"vitest": "5.0.0-rc.2"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"typescript": ">=5.9"
|
|
@@ -55,7 +56,6 @@
|
|
|
55
56
|
"./components/utils": "./dist/components__utils.mjs",
|
|
56
57
|
"./config": "./dist/config.mjs",
|
|
57
58
|
"./config/config-types": "./dist/config__config-types.mjs",
|
|
58
|
-
"./config/config-validation": "./dist/config__config-validation.mjs",
|
|
59
59
|
"./contract": "./dist/contract.mjs",
|
|
60
60
|
"./contract/apply-specifier-default-control-policy": "./dist/contract__apply-specifier-default-control-policy.mjs",
|
|
61
61
|
"./contract/contract-validation-error": "./dist/contract__contract-validation-error.mjs",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"./contract/resolve-domain-model": "./dist/contract__resolve-domain-model.mjs",
|
|
68
68
|
"./contract/types": "./dist/contract__types.mjs",
|
|
69
69
|
"./contract/validate-domain": "./dist/contract__validate-domain.mjs",
|
|
70
|
+
"./contract/validate-once": "./dist/contract__validate-once.mjs",
|
|
70
71
|
"./contract-authoring": "./dist/contract-authoring.mjs",
|
|
71
72
|
"./errors": "./dist/errors.mjs",
|
|
72
73
|
"./errors/control": "./dist/errors__control.mjs",
|
|
@@ -97,18 +98,21 @@
|
|
|
97
98
|
"./utils/result": "./dist/utils__result.mjs",
|
|
98
99
|
"./utils/simplify-deep": "./dist/utils__simplify-deep.mjs",
|
|
99
100
|
"./utils/structured-error": "./dist/utils__structured-error.mjs",
|
|
101
|
+
"./utils/suppress-idle-connection-errors": "./dist/utils__suppress-idle-connection-errors.mjs",
|
|
102
|
+
"./utils/text": "./dist/utils__text.mjs",
|
|
100
103
|
"./utils/types": "./dist/utils__types.mjs",
|
|
101
104
|
"./package.json": "./package.json"
|
|
102
105
|
},
|
|
103
106
|
"repository": {
|
|
104
107
|
"type": "git",
|
|
105
|
-
"url": "https://github.com/prisma/
|
|
108
|
+
"url": "https://github.com/prisma/orm.git",
|
|
106
109
|
"directory": "packages/9-public/@prisma/orm-framework"
|
|
107
110
|
},
|
|
108
111
|
"scripts": {
|
|
109
112
|
"build": "tsdown",
|
|
110
113
|
"lint": "biome check . --error-on-warnings",
|
|
111
114
|
"clean": "rm -rf dist src-gen",
|
|
112
|
-
"test": "vitest run"
|
|
115
|
+
"test": "vitest run",
|
|
116
|
+
"typecheck": "tsc --project test/tsconfig.json --noEmit"
|
|
113
117
|
}
|
|
114
118
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply-specifier-default-control-policy-CAxiXxKg.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/apply-specifier-default-control-policy.d.mts"],"mappings":";;;iBAEiB,mCAAmC,UAAU,UAAU,kBAAkB,4BAA4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./framework-authoring-BhctBwih-DQ_6noDM.mjs";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/0-foundation/contract/dist/canonicalization-path-match-CNgHuwM_.mjs
|
|
2
|
-
function matchesPathPattern(path, pattern) {
|
|
3
|
-
if (path.length !== pattern.length) return false;
|
|
4
|
-
for (let i = 0; i < pattern.length; i++) {
|
|
5
|
-
const segment = pattern[i];
|
|
6
|
-
const value = path[i];
|
|
7
|
-
if (segment === void 0 || value === void 0) return false;
|
|
8
|
-
if (segment === "*") continue;
|
|
9
|
-
if (typeof segment === "string") {
|
|
10
|
-
if (value !== segment) return false;
|
|
11
|
-
continue;
|
|
12
|
-
}
|
|
13
|
-
if (Array.isArray(segment)) {
|
|
14
|
-
if (!segment.includes(value)) return false;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
function createPreserveEmptyPredicate(patterns) {
|
|
20
|
-
return (path) => patterns.some((pattern) => matchesPathPattern(path, pattern));
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { matchesPathPattern as n, createPreserveEmptyPredicate as t };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/canonicalization-path-match-CNgHuwM_.mjs"],"sourcesContent":["//#region src/canonicalization-path-match.ts\nfunction matchesPathPattern(path, pattern) {\n\tif (path.length !== pattern.length) return false;\n\tfor (let i = 0; i < pattern.length; i++) {\n\t\tconst segment = pattern[i];\n\t\tconst value = path[i];\n\t\tif (segment === void 0 || value === void 0) return false;\n\t\tif (segment === \"*\") continue;\n\t\tif (typeof segment === \"string\") {\n\t\t\tif (value !== segment) return false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(segment)) {\n\t\t\tif (!segment.includes(value)) return false;\n\t\t}\n\t}\n\treturn true;\n}\nfunction createPreserveEmptyPredicate(patterns) {\n\treturn (path) => patterns.some((pattern) => matchesPathPattern(path, pattern));\n}\n//#endregion\nexport { matchesPathPattern as n, createPreserveEmptyPredicate as t };\n\n//# sourceMappingURL=canonicalization-path-match-CNgHuwM_.mjs.map"],"mappings":";AACA,SAAS,mBAAmB,MAAM,SAAS;CAC1C,IAAI,KAAK,WAAW,QAAQ,QAAQ,OAAO;CAC3C,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACxC,MAAM,UAAU,QAAQ;EACxB,MAAM,QAAQ,KAAK;EACnB,IAAI,YAAY,KAAK,KAAK,UAAU,KAAK,GAAG,OAAO;EACnD,IAAI,YAAY,KAAK;EACrB,IAAI,OAAO,YAAY,UAAU;GAChC,IAAI,UAAU,SAAS,OAAO;GAC9B;EACD;EACA,IAAI,MAAM,QAAQ,OAAO,GACpB;OAAA,CAAC,QAAQ,SAAS,KAAK,GAAG,OAAO;EAAA;CAEvC;CACA,OAAO;AACR;AACA,SAAS,6BAA6B,UAAU;CAC/C,QAAQ,SAAS,SAAS,MAAM,YAAY,mBAAmB,MAAM,OAAO,CAAC;AAC9E"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { n as isCodecTrait } from "./codec-types-DcNvNeY1-BO6kUiH0.mjs";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/capabilities-BCEONw9w.mjs
|
|
4
|
-
/**
|
|
5
|
-
* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.
|
|
6
|
-
*/
|
|
7
|
-
function aggregateDescriptorKey(descriptor) {
|
|
8
|
-
switch (descriptor.input.kind) {
|
|
9
|
-
case "none": return `${descriptor.operation}:none`;
|
|
10
|
-
case "any": return `${descriptor.operation}:any`;
|
|
11
|
-
case "codec": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;
|
|
12
|
-
case "trait": return `${descriptor.operation}:trait:${descriptor.input.trait}`;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */
|
|
16
|
-
function isNoInputAggregateDescriptor(descriptor) {
|
|
17
|
-
return descriptor.input.kind === "none";
|
|
18
|
-
}
|
|
19
|
-
/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */
|
|
20
|
-
function isAnyInputAggregateDescriptor(descriptor) {
|
|
21
|
-
return descriptor.input.kind === "any";
|
|
22
|
-
}
|
|
23
|
-
function isObjectLike(value) {
|
|
24
|
-
return typeof value === "object" && value !== null;
|
|
25
|
-
}
|
|
26
|
-
function isNonEmptyString(value) {
|
|
27
|
-
return typeof value === "string" && value.length > 0;
|
|
28
|
-
}
|
|
29
|
-
function isAggregateInputMatch(value) {
|
|
30
|
-
if (!isObjectLike(value) || !("kind" in value)) return false;
|
|
31
|
-
switch (value.kind) {
|
|
32
|
-
case "none":
|
|
33
|
-
case "any": return true;
|
|
34
|
-
case "codec": return "codecId" in value && isNonEmptyString(value.codecId);
|
|
35
|
-
case "trait": return "trait" in value && isCodecTrait(value.trait);
|
|
36
|
-
default: return false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function isAggregateOutputCodec(value) {
|
|
40
|
-
if (!isObjectLike(value) || !("kind" in value)) return false;
|
|
41
|
-
switch (value.kind) {
|
|
42
|
-
case "self": return true;
|
|
43
|
-
case "codec": return "codecId" in value && isNonEmptyString(value.codecId) && (!("typeParams" in value) || value.typeParams === void 0 || typeof value.typeParams === "function");
|
|
44
|
-
default: return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.
|
|
49
|
-
*/
|
|
50
|
-
function isAggregateDescriptor(value) {
|
|
51
|
-
if (!isObjectLike(value)) return false;
|
|
52
|
-
if (!("operation" in value) || !isNonEmptyString(value.operation)) return false;
|
|
53
|
-
if (!("nullable" in value) || typeof value.nullable !== "boolean") return false;
|
|
54
|
-
if (value.nullable === false && (!("emptyResultJson" in value) || value.emptyResultJson === void 0)) return false;
|
|
55
|
-
if (!("input" in value) || !isAggregateInputMatch(value.input)) return false;
|
|
56
|
-
if (!("output" in value) || !isAggregateOutputCodec(value.output)) return false;
|
|
57
|
-
return value.input.kind === "codec" || value.input.kind === "trait" || value.output.kind === "codec";
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Capability matrix merge primitive shared by emit-time and runtime stack composition.
|
|
61
|
-
*
|
|
62
|
-
* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need
|
|
63
|
-
* to fold a stack of component descriptors' `capabilities` declarations into a single
|
|
64
|
-
* matrix keyed by namespace. Keeping the primitive here lets both call sites stay
|
|
65
|
-
* byte-for-byte consistent without one depending on the other.
|
|
66
|
-
*/
|
|
67
|
-
function isPlainObject(value) {
|
|
68
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
69
|
-
}
|
|
70
|
-
function sortDeep(value) {
|
|
71
|
-
if (Array.isArray(value)) return value.map(sortDeep);
|
|
72
|
-
if (!isPlainObject(value)) return value;
|
|
73
|
-
const entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));
|
|
74
|
-
const next = {};
|
|
75
|
-
for (const [key, child] of entries) next[key] = sortDeep(child);
|
|
76
|
-
return next;
|
|
77
|
-
}
|
|
78
|
-
function extractCapabilityMatrix(value) {
|
|
79
|
-
if (!isPlainObject(value)) return {};
|
|
80
|
-
const out = {};
|
|
81
|
-
for (const [namespace, maybeCaps] of Object.entries(value)) {
|
|
82
|
-
if (!isPlainObject(maybeCaps)) continue;
|
|
83
|
-
const caps = {};
|
|
84
|
-
for (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === "boolean") caps[key] = flag;
|
|
85
|
-
if (Object.keys(caps).length > 0) out[namespace] = caps;
|
|
86
|
-
}
|
|
87
|
-
return out;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Merge an ordered list of contributor capability declarations into a base matrix.
|
|
91
|
-
*
|
|
92
|
-
* Behaviour:
|
|
93
|
-
* - `base` and each contributor's `capabilities` are filtered through the same
|
|
94
|
-
* structural extraction: non-plain-object namespace blocks are dropped,
|
|
95
|
-
* non-boolean leaves inside a namespace block are dropped, and a namespace
|
|
96
|
-
* block that ends up with zero boolean leaves is omitted entirely (so a
|
|
97
|
-
* later contributor with a malformed namespace cannot erase a namespace
|
|
98
|
-
* already present in `base`).
|
|
99
|
-
* - Non-plain-object `capabilities` on a contributor (including `undefined`,
|
|
100
|
-
* `null`, arrays, primitives) are skipped silently — the contributor
|
|
101
|
-
* contributes nothing.
|
|
102
|
-
* - Later contributors win on `(namespace, key)` collisions.
|
|
103
|
-
* - The returned object is fresh — neither `base` nor any contributor is mutated.
|
|
104
|
-
* - Output keys are sorted lexicographically at every plain-object level.
|
|
105
|
-
*/
|
|
106
|
-
function mergeCapabilityMatrices(base, contributors) {
|
|
107
|
-
const merged = extractCapabilityMatrix(base);
|
|
108
|
-
for (const contributor of contributors) {
|
|
109
|
-
const extracted = extractCapabilityMatrix(contributor.capabilities);
|
|
110
|
-
for (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {
|
|
111
|
-
...merged[namespace] ?? {},
|
|
112
|
-
...capabilities
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
return blindCast(sortDeep(merged));
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
export { mergeCapabilityMatrices as a, isNoInputAggregateDescriptor as i, isAggregateDescriptor as n, isAnyInputAggregateDescriptor as r, aggregateDescriptorKey as t };
|
|
119
|
-
|
|
120
|
-
//# sourceMappingURL=capabilities-BCEONw9w-C-lo3rF8.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities-BCEONw9w-C-lo3rF8.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/capabilities-BCEONw9w.mjs"],"sourcesContent":["import { n as isCodecTrait } from \"./codec-types-DcNvNeY1.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/aggregate-descriptor.ts\n/**\n* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.\n*/\nfunction aggregateDescriptorKey(descriptor) {\n\tswitch (descriptor.input.kind) {\n\t\tcase \"none\": return `${descriptor.operation}:none`;\n\t\tcase \"any\": return `${descriptor.operation}:any`;\n\t\tcase \"codec\": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;\n\t\tcase \"trait\": return `${descriptor.operation}:trait:${descriptor.input.trait}`;\n\t}\n}\n/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */\nfunction isNoInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"none\";\n}\n/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */\nfunction isAnyInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"any\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isNonEmptyString(value) {\n\treturn typeof value === \"string\" && value.length > 0;\n}\nfunction isAggregateInputMatch(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"none\":\n\t\tcase \"any\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId);\n\t\tcase \"trait\": return \"trait\" in value && isCodecTrait(value.trait);\n\t\tdefault: return false;\n\t}\n}\nfunction isAggregateOutputCodec(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"self\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId) && (!(\"typeParams\" in value) || value.typeParams === void 0 || typeof value.typeParams === \"function\");\n\t\tdefault: return false;\n\t}\n}\n/**\n* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.\n*/\nfunction isAggregateDescriptor(value) {\n\tif (!isObjectLike(value)) return false;\n\tif (!(\"operation\" in value) || !isNonEmptyString(value.operation)) return false;\n\tif (!(\"nullable\" in value) || typeof value.nullable !== \"boolean\") return false;\n\tif (value.nullable === false && (!(\"emptyResultJson\" in value) || value.emptyResultJson === void 0)) return false;\n\tif (!(\"input\" in value) || !isAggregateInputMatch(value.input)) return false;\n\tif (!(\"output\" in value) || !isAggregateOutputCodec(value.output)) return false;\n\treturn value.input.kind === \"codec\" || value.input.kind === \"trait\" || value.output.kind === \"codec\";\n}\n//#endregion\n//#region src/shared/capabilities.ts\n/**\n* Capability matrix merge primitive shared by emit-time and runtime stack composition.\n*\n* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need\n* to fold a stack of component descriptors' `capabilities` declarations into a single\n* matrix keyed by namespace. Keeping the primitive here lets both call sites stay\n* byte-for-byte consistent without one depending on the other.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortDeep(value) {\n\tif (Array.isArray(value)) return value.map(sortDeep);\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));\n\tconst next = {};\n\tfor (const [key, child] of entries) next[key] = sortDeep(child);\n\treturn next;\n}\nfunction extractCapabilityMatrix(value) {\n\tif (!isPlainObject(value)) return {};\n\tconst out = {};\n\tfor (const [namespace, maybeCaps] of Object.entries(value)) {\n\t\tif (!isPlainObject(maybeCaps)) continue;\n\t\tconst caps = {};\n\t\tfor (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === \"boolean\") caps[key] = flag;\n\t\tif (Object.keys(caps).length > 0) out[namespace] = caps;\n\t}\n\treturn out;\n}\n/**\n* Merge an ordered list of contributor capability declarations into a base matrix.\n*\n* Behaviour:\n* - `base` and each contributor's `capabilities` are filtered through the same\n* structural extraction: non-plain-object namespace blocks are dropped,\n* non-boolean leaves inside a namespace block are dropped, and a namespace\n* block that ends up with zero boolean leaves is omitted entirely (so a\n* later contributor with a malformed namespace cannot erase a namespace\n* already present in `base`).\n* - Non-plain-object `capabilities` on a contributor (including `undefined`,\n* `null`, arrays, primitives) are skipped silently — the contributor\n* contributes nothing.\n* - Later contributors win on `(namespace, key)` collisions.\n* - The returned object is fresh — neither `base` nor any contributor is mutated.\n* - Output keys are sorted lexicographically at every plain-object level.\n*/\nfunction mergeCapabilityMatrices(base, contributors) {\n\tconst merged = extractCapabilityMatrix(base);\n\tfor (const contributor of contributors) {\n\t\tconst extracted = extractCapabilityMatrix(contributor.capabilities);\n\t\tfor (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {\n\t\t\t...merged[namespace] ?? {},\n\t\t\t...capabilities\n\t\t};\n\t}\n\treturn blindCast(sortDeep(merged));\n}\n//#endregion\nexport { isNoInputAggregateDescriptor as a, isAnyInputAggregateDescriptor as i, aggregateDescriptorKey as n, isAggregateDescriptor as r, mergeCapabilityMatrices as t };\n\n//# sourceMappingURL=capabilities-BCEONw9w.mjs.map"],"mappings":";;;;;;AAMA,SAAS,uBAAuB,YAAY;CAC3C,QAAQ,WAAW,MAAM,MAAzB;EACC,KAAK,QAAQ,OAAO,GAAG,WAAW,UAAU;EAC5C,KAAK,OAAO,OAAO,GAAG,WAAW,UAAU;EAC3C,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;EACvE,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;CACxE;AACD;;AAEA,SAAS,6BAA6B,YAAY;CACjD,OAAO,WAAW,MAAM,SAAS;AAClC;;AAEA,SAAS,8BAA8B,YAAY;CAClD,OAAO,WAAW,MAAM,SAAS;AAClC;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS;AACpD;AACA,SAAS,sBAAsB,OAAO;CACrC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE,UAAU,QAAQ,OAAO;CACvD,QAAQ,MAAM,MAAd;EACC,KAAK;EACL,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS,OAAO,aAAa,SAAS,iBAAiB,MAAM,OAAO;EACzE,KAAK,SAAS,OAAO,WAAW,SAAS,aAAa,MAAM,KAAK;EACjE,SAAS,OAAO;CACjB;AACD;AACA,SAAS,uBAAuB,OAAO;CACtC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE,UAAU,QAAQ,OAAO;CACvD,QAAQ,MAAM,MAAd;EACC,KAAK,QAAQ,OAAO;EACpB,KAAK,SAAS,OAAO,aAAa,SAAS,iBAAiB,MAAM,OAAO,MAAM,EAAE,gBAAgB,UAAU,MAAM,eAAe,KAAK,KAAK,OAAO,MAAM,eAAe;EACtK,SAAS,OAAO;CACjB;AACD;;;;AAIA,SAAS,sBAAsB,OAAO;CACrC,IAAI,CAAC,aAAa,KAAK,GAAG,OAAO;CACjC,IAAI,EAAE,eAAe,UAAU,CAAC,iBAAiB,MAAM,SAAS,GAAG,OAAO;CAC1E,IAAI,EAAE,cAAc,UAAU,OAAO,MAAM,aAAa,WAAW,OAAO;CAC1E,IAAI,MAAM,aAAa,UAAU,EAAE,qBAAqB,UAAU,MAAM,oBAAoB,KAAK,IAAI,OAAO;CAC5G,IAAI,EAAE,WAAW,UAAU,CAAC,sBAAsB,MAAM,KAAK,GAAG,OAAO;CACvE,IAAI,EAAE,YAAY,UAAU,CAAC,uBAAuB,MAAM,MAAM,GAAG,OAAO;CAC1E,OAAO,MAAM,MAAM,SAAS,WAAW,MAAM,MAAM,SAAS,WAAW,MAAM,OAAO,SAAS;AAC9F;;;;;;;;;AAWA,SAAS,cAAc,OAAO;CAC7B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AACA,SAAS,SAAS,OAAO;CACxB,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,QAAQ;CACnD,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO;CAClC,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC3E,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,KAAK,UAAU,SAAS,KAAK,OAAO,SAAS,KAAK;CAC9D,OAAO;AACR;AACA,SAAS,wBAAwB,OAAO;CACvC,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,CAAC;CACnC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,CAAC,WAAW,cAAc,OAAO,QAAQ,KAAK,GAAG;EAC3D,IAAI,CAAC,cAAc,SAAS,GAAG;EAC/B,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,GAAG,IAAI,OAAO,SAAS,WAAW,KAAK,OAAO;EAChG,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,IAAI,aAAa;CACpD;CACA,OAAO;AACR;;;;;;;;;;;;;;;;;;AAkBA,SAAS,wBAAwB,MAAM,cAAc;CACpD,MAAM,SAAS,wBAAwB,IAAI;CAC3C,KAAK,MAAM,eAAe,cAAc;EACvC,MAAM,YAAY,wBAAwB,YAAY,YAAY;EAClE,KAAK,MAAM,CAAC,WAAW,iBAAiB,OAAO,QAAQ,SAAS,GAAG,OAAO,aAAa;GACtF,GAAG,OAAO,cAAc,CAAC;GACzB,GAAG;EACJ;CACD;CACA,OAAO,UAAU,SAAS,MAAM,CAAC;AAClC"}
|
package/dist/codec-Cd0QcxAx.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { r as voidParamsSchema } from "./codec-types-DcNvNeY1-BO6kUiH0.mjs";
|
|
2
|
-
import { i as tsStringLiteral } from "./dist-Dqbo77p7.mjs";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec.mjs
|
|
4
|
-
/**
|
|
5
|
-
* Abstract base class for concrete codec implementations.
|
|
6
|
-
*
|
|
7
|
-
* Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.
|
|
8
|
-
*/
|
|
9
|
-
var CodecImpl = class {
|
|
10
|
-
descriptor;
|
|
11
|
-
/**
|
|
12
|
-
* Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.
|
|
13
|
-
*/
|
|
14
|
-
constructor(descriptor) {
|
|
15
|
-
this.descriptor = descriptor;
|
|
16
|
-
}
|
|
17
|
-
get id() {
|
|
18
|
-
return this.descriptor.codecId;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Abstract base class for concrete codec descriptors.
|
|
23
|
-
*
|
|
24
|
-
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.
|
|
25
|
-
*
|
|
26
|
-
* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.
|
|
27
|
-
*/
|
|
28
|
-
var CodecDescriptorImpl = class {
|
|
29
|
-
/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */
|
|
30
|
-
get isParameterized() {
|
|
31
|
-
return this.paramsSchema !== voidParamsSchema;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
|
|
36
|
-
*
|
|
37
|
-
* `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.
|
|
38
|
-
*/
|
|
39
|
-
function column(codecFactory, codecId, typeParams, nativeType) {
|
|
40
|
-
return {
|
|
41
|
-
codecFactory,
|
|
42
|
-
codecId,
|
|
43
|
-
typeParams,
|
|
44
|
-
nativeType
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Renders a codec-encoded value as a TypeScript literal (e.g. `"low"`, `1`, `true`), or `undefined`
|
|
49
|
-
* when the value isn't literal-expressible (objects, arrays, null).
|
|
50
|
-
*
|
|
51
|
-
* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type
|
|
52
|
-
* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a
|
|
53
|
-
* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own
|
|
54
|
-
* `renderValueLiteral`.
|
|
55
|
-
*/
|
|
56
|
-
function renderTsLiteral(value) {
|
|
57
|
-
if (typeof value === "string") return tsStringLiteral(value);
|
|
58
|
-
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { renderTsLiteral as i, CodecImpl as n, column as r, CodecDescriptorImpl as t };
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=codec-Cd0QcxAx.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-Cd0QcxAx.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { r as voidParamsSchema, t as emptyCodecLookup } from \"./codec-types-DcNvNeY1.mjs\";\nimport { i as validateCodecTypeParams, n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BZF8TZh_.mjs\";\nimport { tsStringLiteral } from \"@internal/ts-render\";\n//#region src/shared/codec.ts\n/**\n* Abstract base class for concrete codec implementations.\n*\n* Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\t/**\n\t* Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor) {\n\t\tthis.descriptor = descriptor;\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n};\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorImpl = class {\n\t/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== voidParamsSchema;\n\t}\n};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*\n* `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.\n*/\nfunction column(codecFactory, codecId, typeParams, nativeType) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams,\n\t\tnativeType\n\t};\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a codec-encoded value as a TypeScript literal (e.g. `\"low\"`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type\n* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a\n* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own\n* `renderValueLiteral`.\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecImpl, column, emptyCodecLookup, materializeCodec, renderTsLiteral, resolveCodecDescriptorOrThrow, validateCodecTypeParams, voidParamsSchema };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;;;AASA,IAAI,YAAY,MAAM;CACrB;;;;CAIA,YAAY,YAAY;EACvB,KAAK,aAAa;CACnB;CACA,IAAI,KAAK;EACR,OAAO,KAAK,WAAW;CACxB;AACD;;;;;;;;AAUA,IAAI,sBAAsB,MAAM;;CAE/B,IAAI,kBAAkB;EACrB,OAAO,KAAK,iBAAiB;CAC9B;AACD;;;;;;AAQA,SAAS,OAAO,cAAc,SAAS,YAAY,YAAY;CAC9D,OAAO;EACN;EACA;EACA;EACA;CACD;AACD;;;;;;;;;;AAYA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,gBAAgB,KAAK;CAC3D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { et as ValueSetRef, z as JsonValue } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
|
|
2
|
-
import { i as CodecDescriptor, l as CodecRef, n as Codec, s as CodecInstanceContext, t as AnyCodecDescriptor } from "./codec-types-D6VRj2RE-BLElXc-O.mjs";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec.d.mts
|
|
4
|
-
//#region src/shared/column-spec.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Authored column-type descriptor — the data shape an authoring site (PSL or TypeScript builders) attaches to a column to identify its codec and its native database type.
|
|
7
|
-
*
|
|
8
|
-
* Lives at the framework-components layer alongside the codec types so codec-author packages (e.g. column-spec / `column()` packagers) can extend it directly without crossing layer boundaries.
|
|
9
|
-
*
|
|
10
|
-
* @template TCodecId Narrowed codec id literal for sites that thread a specific codec id through the type system.
|
|
11
|
-
*/
|
|
12
|
-
type ColumnTypeDescriptor<TCodecId extends string = string> = {
|
|
13
|
-
readonly codecId: TCodecId;
|
|
14
|
-
readonly nativeType: string;
|
|
15
|
-
readonly typeParams?: Record<string, unknown> | undefined;
|
|
16
|
-
readonly typeRef?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Storage-plane value-set ref, set by an authoring path that resolves a
|
|
19
|
-
* field's type against a value-set-deriving entity (e.g. a PSL entity-ref
|
|
20
|
-
* type constructor like `pg.enum(Ref)`, or a TS `enumType` handle).
|
|
21
|
-
* Threaded straight onto the storage node this descriptor builds, where it
|
|
22
|
-
* drives value-set → codec typing. Every codec's own descriptor leaves this
|
|
23
|
-
* unset.
|
|
24
|
-
*/
|
|
25
|
-
readonly valueSet?: ValueSetRef;
|
|
26
|
-
readonly entityRef?: EntityRef;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Late-resolved pack-entity reference — a field on the type descriptor it is
|
|
30
|
-
* declared on: `entityKind`/`entityName` identify a pack entity whose final
|
|
31
|
-
* placement depends on data not yet known when the descriptor carrying this
|
|
32
|
-
* reference is built — e.g. an owning namespace resolved only once the
|
|
33
|
-
* surrounding structure is assembled.
|
|
34
|
-
*/
|
|
35
|
-
type EntityRef = {
|
|
36
|
-
readonly entityKind: string;
|
|
37
|
-
readonly entityName: string;
|
|
38
|
-
readonly entity: unknown;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Column spec carrying the codec factory closure alongside the {@link ColumnTypeDescriptor} fields. Codec authors return a `ColumnSpec` from per-codec column helpers; the runtime materializes the codec instance by calling `codecFactory(ctx)` once it knows the column's `CodecInstanceContext`.
|
|
42
|
-
*
|
|
43
|
-
* Extends {@link ColumnTypeDescriptor} so `ColumnSpec` instances flow directly into contract-authoring sites that consume the descriptor shape — no structural mirroring required.
|
|
44
|
-
*/
|
|
45
|
-
interface ColumnSpec<R, P extends Record<string, unknown> | undefined> extends ColumnTypeDescriptor {
|
|
46
|
-
readonly codecFactory: (ctx: CodecInstanceContext) => R;
|
|
47
|
-
readonly typeParams: P;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
|
|
51
|
-
*
|
|
52
|
-
* `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.
|
|
53
|
-
*/
|
|
54
|
-
declare function column<R, P extends Record<string, unknown> | undefined>(codecFactory: (ctx: CodecInstanceContext) => R, codecId: string, typeParams: P, nativeType: string): ColumnSpec<R, P>;
|
|
55
|
-
/**
|
|
56
|
-
* Coarse `satisfies` shape — checks the helper's typeParams record matches the descriptor's factory params. Catches "wrong typeParams shape" wiring mistakes; does NOT catch "wrong descriptor's factory" mistakes (the codec slot is left as `unknown`).
|
|
57
|
-
*
|
|
58
|
-
* Use when the codec's `ReturnType<factory>` is unstable (e.g. heavily overloaded factories where extraction widens too much).
|
|
59
|
-
*/
|
|
60
|
-
type ColumnHelperFor<D extends CodecDescriptor<any>> = (...args: any[]) => ColumnSpec<unknown, ColumnHelperParams<D>>;
|
|
61
|
-
/**
|
|
62
|
-
* Strict `satisfies` shape — also checks the helper's codec is at least the *base* codec instance type the descriptor's factory returns. `ReturnType<ReturnType<D['factory']>>` widens method generics to their constraint, so this only sanity-checks the wiring at the base type level. Literal preservation comes from the direct `descriptor.factory(...)` call inside the helper, not from `satisfies`.
|
|
63
|
-
*/
|
|
64
|
-
type ColumnHelperForStrict<D extends CodecDescriptor<any>> = (...args: any[]) => ColumnSpec<ReturnType<ReturnType<D['factory']>>, ColumnHelperParams<D>>;
|
|
65
|
-
/**
|
|
66
|
-
* Coerce a descriptor's `factory` first parameter into the typeParams shape `ColumnSpec` accepts. Non-parameterized descriptors (factory with no params, or `params: void`) collapse to `undefined`; parameterized descriptors keep the params record shape.
|
|
67
|
-
*/
|
|
68
|
-
type ColumnHelperParams<D extends CodecDescriptor<any>> = Parameters<D['factory']>[0] extends Record<string, unknown> ? Parameters<D['factory']>[0] : undefined;
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/shared/render-ts-literal.d.ts
|
|
71
|
-
/**
|
|
72
|
-
* Renders a codec-encoded value as a TypeScript literal (e.g. `"low"`, `1`, `true`), or `undefined`
|
|
73
|
-
* when the value isn't literal-expressible (objects, arrays, null).
|
|
74
|
-
*
|
|
75
|
-
* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type
|
|
76
|
-
* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a
|
|
77
|
-
* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own
|
|
78
|
-
* `renderValueLiteral`.
|
|
79
|
-
*/
|
|
80
|
-
declare function renderTsLiteral(value: JsonValue): string | undefined;
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region src/shared/resolve-codec.d.ts
|
|
83
|
-
declare const CONTRACT_CODEC_DESCRIPTOR_MISSING: "CONTRACT.CODEC_DESCRIPTOR_MISSING";
|
|
84
|
-
/**
|
|
85
|
-
* Look up a descriptor for `ref.codecId` using `descriptorFor`; throw
|
|
86
|
-
* `code` if none is found. Each plane names its own error path: the control
|
|
87
|
-
* plane resolves contract-stack descriptors (`CONTRACT.*`), the execution
|
|
88
|
-
* plane resolves at query time (`RUNTIME.*`).
|
|
89
|
-
*/
|
|
90
|
-
declare function resolveCodecDescriptorOrThrow(descriptorFor: (codecId: string) => AnyCodecDescriptor | undefined, ref: CodecRef, code: 'CONTRACT.CODEC_DESCRIPTOR_MISSING' | 'RUNTIME.CODEC_DESCRIPTOR_MISSING'): AnyCodecDescriptor;
|
|
91
|
-
/**
|
|
92
|
-
* Validates `ref.typeParams` against `descriptor.paramsSchema`.
|
|
93
|
-
*
|
|
94
|
-
* Parameterized codecs that omit `typeParams` have it normalized to `{}` before
|
|
95
|
-
* validation (mirrors `ast-codec-resolver.ts` semantics). Throws
|
|
96
|
-
* `RUNTIME.TYPE_PARAMS_INVALID` when the validator returns a `Promise` or
|
|
97
|
-
* reports issues.
|
|
98
|
-
*/
|
|
99
|
-
declare function validateCodecTypeParams(descriptor: AnyCodecDescriptor, ref: CodecRef): unknown;
|
|
100
|
-
/**
|
|
101
|
-
* Resolves a `Codec` instance: validates `ref.typeParams` via
|
|
102
|
-
* {@link validateCodecTypeParams} then calls `descriptor.factory(validated)(ctx)`.
|
|
103
|
-
*
|
|
104
|
-
* The descriptor's `factory` is typed against its own `P`; the registry erases
|
|
105
|
-
* `P` to `any`, so the factory is narrowed to `(params: unknown) => (ctx) => Codec`
|
|
106
|
-
* at the call boundary. The `paramsSchema` validates the input above before we
|
|
107
|
-
* forward it, so the narrowing is safe by construction.
|
|
108
|
-
*/
|
|
109
|
-
declare function materializeCodec(descriptor: AnyCodecDescriptor, ref: CodecRef, ctx: CodecInstanceContext): Codec;
|
|
110
|
-
//#endregion
|
|
111
|
-
export { ColumnTypeDescriptor as a, renderTsLiteral as c, ColumnSpec as i, resolveCodecDescriptorOrThrow as l, ColumnHelperFor as n, column as o, ColumnHelperForStrict as r, materializeCodec as s, CONTRACT_CODEC_DESCRIPTOR_MISSING as t, validateCodecTypeParams as u };
|
|
112
|
-
//# sourceMappingURL=codec-Ce07W3Mz.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-Ce07W3Mz.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.d.mts"],"mappings":";;;;;;;;;;;KAUK,qBAAqB;WACf,SAAS;WACT;WACA,aAAa;WACb;;;;;;;;;WASA,WAAW;WACX,YAAY;;;;;;;;;KASlB;WACM;WACA;WACA;;;;;;;UAOD,WAAW,GAAG,UAAU,6CAA6C;WACpE,eAAe,KAAK,yBAAyB;WAC7C,YAAY;;;;;;;iBAON,OAAO,GAAG,UAAU,qCAAqC,eAAe,KAAK,yBAAyB,GAAG,iBAAiB,YAAY,GAAG,qBAAqB,WAAW,GAAG;;;;;;KAMxL,gBAAgB,UAAU,4BAA4B,gBAAgB,oBAAoB,mBAAmB;;;;KAI7G,sBAAsB,UAAU,4BAA4B,gBAAgB,WAAW,WAAW,WAAW,gBAAgB,mBAAmB;;;;KAIhJ,mBAAmB,UAAU,wBAAwB,WAAW,yBAAyB,0BAA0B,WAAW;;;;;;;;;;;;iBAYlH,gBAAgB,OAAO;;;cAG1B;;;;;;;iBAOG,8BAA8B,gBAAgB,oBAAoB,gCAAgC,KAAK,UAAU,iFAAiF;;;;;;;;;iBASlM,wBAAwB,YAAY,oBAAoB,KAAK;;;;;;;;;;iBAU7D,iBAAiB,YAAY,oBAAoB,KAAK,UAAU,KAAK,uBAAuB"}
|