@prisma/orm-framework 8.0.0-rc.2-dev.2 → 8.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/dist/{apply-specifier-default-control-policy-CAxiXxKg.d.mts → apply-specifier-default-control-policy-Dlz0iwnK.d.mts} +2 -2
- package/dist/apply-specifier-default-control-policy-Dlz0iwnK.d.mts.map +1 -0
- package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
- package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
- package/dist/authoring-CNUti739.mjs +764 -0
- package/dist/authoring-CNUti739.mjs.map +1 -0
- package/dist/authoring-CjwinhU5.d.mts +206 -0
- package/dist/authoring-CjwinhU5.d.mts.map +1 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts +515 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts.map +1 -0
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts → canonicalization-CyrrXGmj-CeKUkht1.d.mts} +3 -3
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts.map → canonicalization-CyrrXGmj-CeKUkht1.d.mts.map} +1 -1
- package/dist/{hashing-utils-DQgS3nOe.mjs → canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs} +23 -3
- package/dist/canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs.map +1 -0
- package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
- package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
- package/dist/codec-B4ypaota.d.mts +289 -0
- package/dist/codec-B4ypaota.d.mts.map +1 -0
- package/dist/codec-Do8tfXqk.mjs +457 -0
- package/dist/codec-Do8tfXqk.mjs.map +1 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs +93 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs.map +1 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs +22 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs.map +1 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts +384 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts.map +1 -0
- package/dist/{components-dZRz3T5y.mjs → components-BaV9iCkq.mjs} +34 -3
- package/dist/components-BaV9iCkq.mjs.map +1 -0
- package/dist/components-CRBcIta_.d.mts +86 -0
- package/dist/components-CRBcIta_.d.mts.map +1 -0
- package/dist/components.d.mts +19 -17
- package/dist/components.mjs +16 -12
- package/dist/components__authoring.d.mts +4 -3
- package/dist/components__authoring.mjs +3 -2
- package/dist/components__codec.d.mts +3 -3
- package/dist/components__codec.mjs +6 -4
- package/dist/components__components.d.mts +6 -4
- package/dist/components__components.mjs +4 -3
- package/dist/components__control.d.mts +5 -4
- package/dist/components__control.mjs +3 -2
- package/dist/components__emission.d.mts +4 -4
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__ir.d.mts +1 -1
- package/dist/components__ir.mjs +2 -1
- package/dist/components__psl-ast.d.mts +4 -4
- package/dist/components__psl-ast.mjs +2 -2
- package/dist/components__runtime.d.mts +3 -2
- package/dist/components__runtime.mjs +2 -2
- package/dist/components__utils.mjs +1 -1
- package/dist/{config-types-CW4PDwMC.d.mts → config-types-BTFT7QfJ.d.mts} +73 -41
- package/dist/config-types-BTFT7QfJ.d.mts.map +1 -0
- package/dist/config-types-D0mYyP62.mjs +61 -0
- package/dist/config-types-D0mYyP62.mjs.map +1 -0
- package/dist/config.d.mts +2 -3
- package/dist/config.mjs +2 -3
- package/dist/config__config-types.d.mts +2 -2
- package/dist/config__config-types.mjs +2 -2
- package/dist/contract-authoring.d.mts +152 -17
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +190 -9
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts → contract-types-DEIEpzU_-DvAVuBr5.d.mts} +14 -8
- package/dist/contract-types-DEIEpzU_-DvAVuBr5.d.mts.map +1 -0
- package/dist/{contract-validation-error-DEiWp_EI-CRwtUgRw.mjs → contract-validation-error-CAnTGhkt-DSnujRaK.mjs} +6 -3
- package/dist/contract-validation-error-CAnTGhkt-DSnujRaK.mjs.map +1 -0
- package/dist/{contract-validation-error-R7cMoK04.d.mts → contract-validation-error-D1QAeOh5.d.mts} +4 -2
- package/dist/contract-validation-error-D1QAeOh5.d.mts.map +1 -0
- package/dist/contract.d.mts +13 -12
- package/dist/contract.mjs +9 -9
- package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
- package/dist/contract__contract-validation-error.d.mts +1 -1
- package/dist/contract__contract-validation-error.mjs +1 -1
- package/dist/contract__default-namespace.mjs +1 -1
- package/dist/contract__enum-accessor.d.mts +2 -2
- package/dist/contract__enum-accessor.mjs +1 -1
- package/dist/contract__hashing-utils.d.mts +2 -2
- package/dist/contract__hashing-utils.mjs +2 -3
- package/dist/contract__hashing.d.mts +3 -3
- package/dist/contract__hashing.mjs +2 -2
- package/dist/contract__resolve-domain-model.d.mts +1 -1
- package/dist/contract__types.d.mts +5 -5
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validate-domain.d.mts +1 -1
- package/dist/contract__validate-domain.mjs +1 -1
- package/dist/contract__validate-once.d.mts +2 -0
- package/dist/contract__validate-once.mjs +2 -0
- package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts → control-B5ezUWD2-BIAYxeSk.d.mts} +34 -6
- package/dist/control-B5ezUWD2-BIAYxeSk.d.mts.map +1 -0
- package/dist/{control-DLEm6u5m.mjs → control-DMJqhnwU.mjs} +309 -36
- package/dist/control-DMJqhnwU.mjs.map +1 -0
- package/dist/control-DrDTlxCS.d.mts +1 -0
- package/dist/{control-BD96JZi8-NUhO5Kkw.mjs → control-KsXr4fYD-D2Ows0NI.mjs} +70 -24
- package/dist/control-KsXr4fYD-D2Ows0NI.mjs.map +1 -0
- package/dist/{control-BF8qzdnM.d.mts → control-s5ECUABR.d.mts} +635 -156
- package/dist/control-s5ECUABR.d.mts.map +1 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs +275 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs.map +1 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs +459 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs.map +1 -0
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs → default-namespace-D4vCwkXg-BEZbN38y.mjs} +2 -2
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs.map → default-namespace-D4vCwkXg-BEZbN38y.mjs.map} +1 -1
- package/dist/{dist-Dqbo77p7.mjs → dist-D1f6xr7F.mjs} +51 -24
- package/dist/dist-D1f6xr7F.mjs.map +1 -0
- package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts → domain-envelope-CN721GnP-4huRt7Wc.d.mts} +27 -13
- package/dist/domain-envelope-CN721GnP-4huRt7Wc.d.mts.map +1 -0
- package/dist/emission-BtJvV97M.d.mts +2 -0
- package/dist/{emission-types-DLXP34Ki-CFms3VrX.d.mts → emission-types-B-jKEbjI-D7BW8Gk1.d.mts} +17 -16
- package/dist/emission-types-B-jKEbjI-D7BW8Gk1.d.mts.map +1 -0
- package/dist/enum-accessor-2OZgavDX.d.mts +104 -0
- package/dist/enum-accessor-2OZgavDX.d.mts.map +1 -0
- package/dist/enum-accessor-B-A2wNok.mjs +122 -0
- package/dist/enum-accessor-B-A2wNok.mjs.map +1 -0
- package/dist/errors.d.mts +5 -4
- package/dist/errors.mjs +4 -4
- package/dist/errors__control.d.mts +3 -2
- package/dist/errors__control.mjs +2 -2
- package/dist/errors__execution.d.mts +2 -2
- package/dist/errors__execution.mjs +2 -2
- package/dist/errors__migration.d.mts +2 -2
- package/dist/errors__migration.mjs +2 -2
- package/dist/execution-CjX5CCTb.d.mts +76 -0
- package/dist/execution-CjX5CCTb.d.mts.map +1 -0
- package/dist/{execution-CSnQT8EX.d.mts → execution-lMPVFj5o.d.mts} +2 -2
- package/dist/{execution-CSnQT8EX.d.mts.map → execution-lMPVFj5o.d.mts.map} +1 -1
- package/dist/execution-vfY4d-SZ.mjs +138 -0
- package/dist/execution-vfY4d-SZ.mjs.map +1 -0
- package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs → expressions-CMQzbnHk-BL2zN0Iv.mjs} +199 -350
- package/dist/expressions-CMQzbnHk-BL2zN0Iv.mjs.map +1 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts +1096 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts.map +1 -0
- package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts → framework-components-DKoQnPdB-lax1COaf.d.mts} +28 -91
- package/dist/framework-components-DKoQnPdB-lax1COaf.d.mts.map +1 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs +271 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map +1 -0
- package/dist/{hash-content-DwEUh-Rx.d.mts → hash-content-Bde14N2-.d.mts} +2 -2
- package/dist/{hash-content-DwEUh-Rx.d.mts.map → hash-content-Bde14N2-.d.mts.map} +1 -1
- package/dist/{hash-content-Bugg_nZn.mjs → hash-content-Bdl-HSfq.mjs} +2 -2
- package/dist/hash-content-Bdl-HSfq.mjs.map +1 -0
- package/dist/{hashing-BtIZVNYX.mjs → hashing-CLRfNAxh.mjs} +28 -9
- package/dist/hashing-CLRfNAxh.mjs.map +1 -0
- package/dist/hashing-D-DHz0zl.d.mts +36 -0
- package/dist/hashing-D-DHz0zl.d.mts.map +1 -0
- package/dist/{hashing-utils-qKu59RSC.d.mts → hashing-utils-DiGHKd3b.d.mts} +4 -3
- package/dist/{hashing-utils-qKu59RSC.d.mts.map → hashing-utils-DiGHKd3b.d.mts.map} +1 -1
- package/dist/ids.d.mts +90 -13
- package/dist/ids.d.mts.map +1 -1
- package/dist/ids.mjs +45 -59
- package/dist/ids.mjs.map +1 -1
- package/dist/ids__runtime.d.mts +1 -1
- package/dist/ids__runtime.mjs +1 -1
- package/dist/{index-CDk9yEbw.d.mts → index-MU-ksXsh.d.mts} +23 -6
- package/dist/index-MU-ksXsh.d.mts.map +1 -0
- package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
- package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
- package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
- package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
- package/dist/{ir-BvE7L9FK.d.mts → ir-LV4tXsw3.d.mts} +6 -5
- package/dist/{ir-BvE7L9FK.d.mts.map → ir-LV4tXsw3.d.mts.map} +1 -1
- package/dist/{ir-ChmSSAhX.mjs → ir-uDGU9vaj.mjs} +7 -53
- package/dist/ir-uDGU9vaj.mjs.map +1 -0
- package/dist/{migration-BvrgDZXw.d.mts → migration-Dluwnqe9.d.mts} +20 -3
- package/dist/migration-Dluwnqe9.d.mts.map +1 -0
- package/dist/{migration-C57VKLUY.mjs → migration-uC-bSKA4.mjs} +30 -4
- package/dist/migration-uC-bSKA4.mjs.map +1 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
- package/dist/operations.mjs +1 -1
- package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-bZgfjovA-BNgYhylT.mjs} +311 -55
- package/dist/parse-bZgfjovA-BNgYhylT.mjs.map +1 -0
- package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts → parse-djL5wker-B610mXG4.d.mts} +181 -52
- package/dist/parse-djL5wker-B610mXG4.d.mts.map +1 -0
- package/dist/psl-ast-COcYtLlz.d.mts +2 -0
- package/dist/psl-ast-CyvE6CR-.mjs +116 -0
- package/dist/psl-ast-CyvE6CR-.mjs.map +1 -0
- package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts → psl-ast-rY25o3Ze-ClLY3CYt.d.mts} +10 -40
- package/dist/psl-ast-rY25o3Ze-ClLY3CYt.d.mts.map +1 -0
- package/dist/psl-parser.d.mts +415 -101
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +2451 -537
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +8 -2
- package/dist/psl-parser__format.d.mts.map +1 -1
- package/dist/psl-parser__format.mjs +65 -34
- package/dist/psl-parser__format.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +98 -10
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +393 -2
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +3 -3
- package/dist/psl-parser__syntax.mjs +4 -43
- package/dist/psl-parser__tokenizer.d.mts +1 -1
- package/dist/psl-parser__tokenizer.mjs +1 -1
- package/dist/psl-printer.d.mts +7 -17
- package/dist/psl-printer.d.mts.map +1 -1
- package/dist/psl-printer.mjs +35 -104
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs +74 -0
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs.map +1 -0
- package/dist/{resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts → resolve-domain-model-BNr1glea-BLuR-phK.d.mts} +3 -3
- package/dist/resolve-domain-model-BNr1glea-BLuR-phK.d.mts.map +1 -0
- package/dist/{result-CBZ8X9mU.mjs → result-8OXF26MN.mjs} +14 -3
- package/dist/{result-CBZ8X9mU.mjs.map → result-8OXF26MN.mjs.map} +1 -1
- package/dist/{result-Bpupv5vO.d.mts → result-BYCOANWy.d.mts} +4 -2
- package/dist/result-BYCOANWy.d.mts.map +1 -0
- package/dist/runtime-B-YYuWy2.d.mts +899 -0
- package/dist/runtime-B-YYuWy2.d.mts.map +1 -0
- package/dist/runtime-DSYSc98Y.mjs +1059 -0
- package/dist/runtime-DSYSc98Y.mjs.map +1 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts +19 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts.map +1 -0
- package/dist/{structured-error-CgiSMpdU.mjs → structured-error-BXbihKQ-.mjs} +3 -3
- package/dist/{structured-error-CgiSMpdU.mjs.map → structured-error-BXbihKQ-.mjs.map} +1 -1
- package/dist/{structured-error-BsNT4Hun.d.mts → structured-error-Cc7AIRsp.d.mts} +19 -5
- package/dist/structured-error-Cc7AIRsp.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs +1276 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs.map +1 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts +258 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts.map +1 -0
- package/dist/text-C3TTEtgd.mjs +35 -0
- package/dist/text-C3TTEtgd.mjs.map +1 -0
- package/dist/text-C8_-rheN.d.mts +15 -0
- package/dist/text-C8_-rheN.d.mts.map +1 -0
- package/dist/{tokenizer-1hAHZzmp-QGPORvmA.mjs → tokenizer-C-GTKKjR-B1vOzJy0.mjs} +54 -10
- package/dist/tokenizer-C-GTKKjR-B1vOzJy0.mjs.map +1 -0
- package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-i8RaVWVa-7fRwlCPP.d.mts} +9 -4
- package/dist/tokenizer-i8RaVWVa-7fRwlCPP.d.mts.map +1 -0
- package/dist/ts-render.d.mts +2 -2
- package/dist/ts-render.mjs +2 -2
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs +261 -0
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs.map +1 -0
- package/dist/{types-BnH4zYvN.mjs → types-B8ULzMAX.mjs} +36 -3
- package/dist/types-B8ULzMAX.mjs.map +1 -0
- package/dist/types-GNXJ7xW2.d.mts +131 -0
- package/dist/types-GNXJ7xW2.d.mts.map +1 -0
- package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts → types-import-spec-DQjfX-gM-zVncuzs0.d.mts} +6 -6
- package/dist/types-import-spec-DQjfX-gM-zVncuzs0.d.mts.map +1 -0
- package/dist/utils.d.mts +7 -5
- package/dist/utils.mjs +9 -7
- package/dist/utils__assertions.mjs +1 -1
- package/dist/utils__hash-content.d.mts +1 -1
- package/dist/utils__hash-content.mjs +1 -1
- package/dist/utils__internal-error.d.mts +1 -1
- package/dist/utils__internal-error.mjs +1 -1
- package/dist/utils__result.d.mts +2 -2
- package/dist/utils__result.mjs +2 -2
- package/dist/utils__structured-error.d.mts +2 -2
- package/dist/utils__structured-error.mjs +1 -1
- package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
- package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
- package/dist/utils__text.d.mts +2 -0
- package/dist/utils__text.mjs +2 -0
- package/dist/{validate-domain-BNBs-TVv.d.mts → validate-domain-B5kmlBFB.d.mts} +10 -6
- package/dist/validate-domain-B5kmlBFB.d.mts.map +1 -0
- package/dist/{validate-domain-BkvFlY3B.mjs → validate-domain-CbXHDYpF.mjs} +43 -22
- package/dist/validate-domain-CbXHDYpF.mjs.map +1 -0
- package/dist/validate-once-D-IwXHYP.mjs +42 -0
- package/dist/validate-once-D-IwXHYP.mjs.map +1 -0
- package/dist/validate-once-gfCOHsDh.d.mts +16 -0
- package/dist/validate-once-gfCOHsDh.d.mts.map +1 -0
- package/package.json +24 -20
- package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +0 -1
- package/dist/authoring-B2H-9qCv.d.mts +0 -1
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +0 -25
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +0 -1
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs +0 -120
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs.map +0 -1
- package/dist/codec-Cd0QcxAx.mjs +0 -63
- package/dist/codec-Cd0QcxAx.mjs.map +0 -1
- package/dist/codec-Ce07W3Mz.d.mts +0 -112
- package/dist/codec-Ce07W3Mz.d.mts.map +0 -1
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts +0 -223
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts.map +0 -1
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs +0 -30
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs.map +0 -1
- package/dist/components-CGA_WwEG.d.mts +0 -50
- package/dist/components-CGA_WwEG.d.mts.map +0 -1
- package/dist/components-dZRz3T5y.mjs.map +0 -1
- package/dist/config-types-BqhNxw0z.mjs +0 -67
- package/dist/config-types-BqhNxw0z.mjs.map +0 -1
- package/dist/config-types-CW4PDwMC.d.mts.map +0 -1
- package/dist/config-validation-DPt5hwQx.mjs +0 -168
- package/dist/config-validation-DPt5hwQx.mjs.map +0 -1
- package/dist/config-validation-Wiqew2J9.d.mts +0 -21
- package/dist/config-validation-Wiqew2J9.d.mts.map +0 -1
- package/dist/config__config-validation.d.mts +0 -2
- package/dist/config__config-validation.mjs +0 -2
- package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +0 -1
- package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +0 -1
- package/dist/contract-validation-error-R7cMoK04.d.mts.map +0 -1
- package/dist/control-BD96JZi8-NUhO5Kkw.mjs.map +0 -1
- package/dist/control-BF8qzdnM.d.mts.map +0 -1
- package/dist/control-DLEm6u5m.mjs.map +0 -1
- package/dist/control-ql9N9u4f-r3Vv41kZ.d.mts.map +0 -1
- package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +0 -1
- package/dist/dist-Dqbo77p7.mjs.map +0 -1
- package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +0 -1
- package/dist/emission-CmUO03gQ.d.mts +0 -2
- package/dist/emission-types-DLXP34Ki-CFms3VrX.d.mts.map +0 -1
- package/dist/enum-accessor-Db5DaTNX.mjs +0 -35
- package/dist/enum-accessor-Db5DaTNX.mjs.map +0 -1
- package/dist/enum-accessor-PH5vjghI.d.mts +0 -85
- package/dist/enum-accessor-PH5vjghI.d.mts.map +0 -1
- package/dist/execution-Crk6IfTs.mjs +0 -218
- package/dist/execution-Crk6IfTs.mjs.map +0 -1
- package/dist/execution-Cyl2dXxX.d.mts +0 -115
- package/dist/execution-Cyl2dXxX.d.mts.map +0 -1
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts +0 -777
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts.map +0 -1
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs +0 -698
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs.map +0 -1
- package/dist/framework-components-hZ2tO-KH-CdRXBOYd.d.mts.map +0 -1
- package/dist/hash-content-Bugg_nZn.mjs.map +0 -1
- package/dist/hashing-BtIZVNYX.mjs.map +0 -1
- package/dist/hashing-CccSPELN.d.mts +0 -25
- package/dist/hashing-CccSPELN.d.mts.map +0 -1
- package/dist/hashing-utils-DQgS3nOe.mjs.map +0 -1
- package/dist/index-CDk9yEbw.d.mts.map +0 -1
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
- package/dist/ir-ChmSSAhX.mjs.map +0 -1
- package/dist/migration-BvrgDZXw.d.mts.map +0 -1
- package/dist/migration-C57VKLUY.mjs.map +0 -1
- package/dist/parse-0ZJjj_2N-DhQpSVmQ.d.mts.map +0 -1
- package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +0 -1
- package/dist/psl-ast-BXZoFQBk.d.mts +0 -37
- package/dist/psl-ast-BXZoFQBk.d.mts.map +0 -1
- package/dist/psl-ast-CWJQF8LA-Vr5JNPdn.d.mts.map +0 -1
- package/dist/psl-ast-DUCvVXbB.mjs +0 -239
- package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
- package/dist/psl-parser__syntax.mjs.map +0 -1
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +0 -59
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +0 -1
- package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +0 -1
- package/dist/result-Bpupv5vO.d.mts.map +0 -1
- package/dist/runtime-BqzioOmU.mjs +0 -670
- package/dist/runtime-BqzioOmU.mjs.map +0 -1
- package/dist/runtime-Cuxw8obj.d.mts +0 -1038
- package/dist/runtime-Cuxw8obj.d.mts.map +0 -1
- package/dist/structured-error-BsNT4Hun.d.mts.map +0 -1
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts +0 -125
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map +0 -1
- package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +0 -1
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
- package/dist/types-BnH4zYvN.mjs.map +0 -1
- package/dist/types-ByeQhU9p.d.mts +0 -17
- package/dist/types-ByeQhU9p.d.mts.map +0 -1
- package/dist/types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map +0 -1
- package/dist/utils-DMAM0unR.mjs.map +0 -1
- package/dist/validate-domain-BNBs-TVv.d.mts.map +0 -1
- package/dist/validate-domain-BkvFlY3B.mjs.map +0 -1
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { z as JsonValue } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
|
|
2
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-D6VRj2RE.d.mts
|
|
4
|
-
//#region src/shared/codec-descriptor.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Unified codec descriptor. Every codec in the framework registers through this shape — non-parameterized codecs use `P = void` and a constant factory that returns the same shared codec instance for every column; parameterized codecs use a non-empty `P` and a curried higher-order factory that returns a per-instance codec.
|
|
7
|
-
*
|
|
8
|
-
* The descriptor is the codec-id-keyed source of truth for static metadata (`traits`, `targetTypes`) and registration concerns (`paramsSchema` for JSON-boundary validation; optional `renderOutputType` for the `contract.d.ts` emit path). The runtime `Codec` instance returned by `factory(params)(ctx)` carries only the conversion behavior.
|
|
9
|
-
*
|
|
10
|
-
* Whether a codec id "is parameterized" stops being a registration-time distinction — it's a property of `P` on the descriptor. The descriptor map indexes every descriptor by `codecId`; both `descriptorFor(codecId)` and `forColumn(table, column)` resolve through the same map without branching on parameterization.
|
|
11
|
-
*
|
|
12
|
-
* @template P - The shape of the params accepted by the factory (`void` for non-parameterized codecs; a record like `{ length: number }` for parameterized codecs).
|
|
13
|
-
*
|
|
14
|
-
* Codec-registry-unification project § Decision.
|
|
15
|
-
*/
|
|
16
|
-
interface CodecDescriptor<P = void> {
|
|
17
|
-
/** The codec ID this descriptor applies to (e.g. `pg/vector@1`, `pg/text@1`). */
|
|
18
|
-
readonly codecId: string;
|
|
19
|
-
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
20
|
-
readonly traits: readonly CodecTrait[];
|
|
21
|
-
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
22
|
-
readonly targetTypes: readonly string[];
|
|
23
|
-
/** Standard Schema validator for the factory's params. Validates JSON-sourced params at the contract boundary (PSL → IR; `contract.json` → runtime). For non-parameterized codecs (`P = void`), the schema validates `void`/`undefined` — the framework supplies no params at the call boundary. */
|
|
24
|
-
readonly paramsSchema: StandardSchemaV1<P>;
|
|
25
|
-
/** Whether this descriptor is parameterized — i.e. its `paramsSchema` is something other than the singleton `voidParamsSchema`. Consumers that need to gate column-aware dispatch read this directly rather than threading a free-floating `(codecId) => boolean` callback. */
|
|
26
|
-
readonly isParameterized: boolean;
|
|
27
|
-
/** Emit-path string renderer for `contract.d.ts`. Returns the TypeScript output type expression for given params (e.g. `Vector<1536>`). Optional; absent renderers cause the emitter to fall back to the codec's base output type. Non-parameterized codecs typically omit it. */
|
|
28
|
-
readonly renderOutputType?: (params: P) => string | undefined;
|
|
29
|
-
/** Emit-path string renderer for the `contract.d.ts` *input* position (create/update values). Returns the TypeScript input type expression for given params. Optional; absent renderers fall back to the codec's base input type. A codec supplies this when its write type is narrower than the generic codec input — e.g. an enum whose input should be the literal member union, not `string`. */
|
|
30
|
-
readonly renderInputType?: (params: P) => string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Given one stored (codec-encoded) value, return the TypeScript literal type to print for it
|
|
33
|
-
* (e.g. `'low'`, `1`), or `undefined` if this codec's output isn't literal-expressible (e.g. a
|
|
34
|
-
* Date-output codec).
|
|
35
|
-
*
|
|
36
|
-
* `value` is the `encodeJson` form stored in the value set. `side` selects which type to print:
|
|
37
|
-
* `output` = the read/SELECT type; `input` = the create/update type. Most codecs render the same
|
|
38
|
-
* literal for both, but a codec whose read and write types differ can render per side. Called once
|
|
39
|
-
* per permitted value; the caller joins the results with `|`.
|
|
40
|
-
*/
|
|
41
|
-
readonly renderValueLiteral?: (value: JsonValue, side: 'output' | 'input') => string | undefined;
|
|
42
|
-
/** The curried higher-order codec. For non-parameterized codecs, the factory is constant — every call returns the same shared codec instance. For parameterized codecs, the factory is called once per `storage.types` instance (or once per inline-`typeParams` column), with `ctx` carrying the column set the resulting codec serves. */
|
|
43
|
-
readonly factory: (params: P) => (ctx: CodecInstanceContext) => Codec;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Variance-erased {@link CodecDescriptor} alias. `CodecDescriptor<P>` is invariant in `P` (the `factory` and `renderOutputType` slots use `P` contravariantly), so `CodecDescriptor<P>` does not extend `CodecDescriptor<unknown>` for specific `P`. Heterogeneous descriptor collections — e.g. `SqlStaticContributions.codecs:` returning a list that mixes parameterized and non-parameterized descriptors — type against this alias and narrow per codec id at the consumer.
|
|
47
|
-
*
|
|
48
|
-
* Codec-registry-unification spec § Decision: every codec resolves through one descriptor map; reads are non-branching.
|
|
49
|
-
*/
|
|
50
|
-
type AnyCodecDescriptor = CodecDescriptor<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Abstract base class for concrete codec descriptors.
|
|
53
|
-
*
|
|
54
|
-
* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.
|
|
55
|
-
*
|
|
56
|
-
* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.
|
|
57
|
-
*/
|
|
58
|
-
declare abstract class CodecDescriptorImpl<TParams = void> implements CodecDescriptor<TParams> {
|
|
59
|
-
abstract readonly codecId: string;
|
|
60
|
-
abstract readonly traits: readonly CodecTrait[];
|
|
61
|
-
abstract readonly targetTypes: readonly string[];
|
|
62
|
-
abstract readonly paramsSchema: StandardSchemaV1<TParams>;
|
|
63
|
-
/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */
|
|
64
|
-
get isParameterized(): boolean;
|
|
65
|
-
/** Optional emit-path string renderer for `contract.d.ts`. Returns the TypeScript output type expression for the given params (e.g. `Vector<1536>`). Non-parameterized codecs typically omit it. */
|
|
66
|
-
renderOutputType?(params: TParams): string | undefined;
|
|
67
|
-
/** Optional emit-path string renderer for the `contract.d.ts` input position. Returns the TypeScript input type expression for the given params; supplied when the write type is narrower than the generic codec input (e.g. an enum's literal member union). */
|
|
68
|
-
renderInputType?(params: TParams): string | undefined;
|
|
69
|
-
/** Optional emit-path renderer for a single stored value. See {@link CodecDescriptor.renderValueLiteral}. */
|
|
70
|
-
renderValueLiteral?(value: JsonValue, side: 'output' | 'input'): string | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Materialize a curried codec factory for the given params. Concrete subclasses override with a typed return type (e.g. `factory<N>(params: { length: N }): (ctx) => VectorCodec<N>`); per-codec helpers read the typed return at the *direct* call site, which is what preserves method-level generics. Type extraction (e.g. `ReturnType<D['factory']>`) widens method generics to their constraint — that's why the column-helper surface is per-codec, not polymorphic.
|
|
73
|
-
*/
|
|
74
|
-
abstract factory(params: TParams): (ctx: CodecInstanceContext) => Codec<string, readonly CodecTrait[], unknown, unknown>;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/shared/codec.d.ts
|
|
78
|
-
/**
|
|
79
|
-
* A codec is the contract between an application value and its driver-wire and JSON representations.
|
|
80
|
-
*
|
|
81
|
-
* The author's mental model is two JS-side types — `TInput` (the application JS type) and `TWire` (the database driver wire format) — plus a target-defined `JsonValue`. The codec translates `TInput` to `TWire` on writes and back on ordinary reads, and to/from the target's JSON representation for contract artifacts and database-produced JSON values.
|
|
82
|
-
*
|
|
83
|
-
* Three representations participate:
|
|
84
|
-
* - **Input** (`TInput`): the JS type at the application boundary.
|
|
85
|
-
* - **Wire** (`TWire`): the format exchanged with the database driver.
|
|
86
|
-
* - **JSON** (`JsonValue`): the target-defined JSON-safe form used in contract artifacts. It uses the exact scalar shape the target produces inside JSON values, which can differ from the ordinary wire format.
|
|
87
|
-
*
|
|
88
|
-
* The runtime instance carries only its `id` (the descriptor's `codecId`, set by the factory) and the four conversion methods. Static metadata (`traits`, `targetTypes`) and the build-time `renderOutputType` renderer live on the {@link CodecDescriptor} keyed by `codecId` — the read-surface single source of truth. Consumers that need them resolve through `descriptorFor(codecId)`.
|
|
89
|
-
*
|
|
90
|
-
* Codec methods split into two groups:
|
|
91
|
-
*
|
|
92
|
-
* - **Query-time** methods (`encode`, `decode`) run per row/parameter at the IO boundary; they are required and Promise-returning. The per-family codec factory accepts sync or async author functions and lifts sync ones to Promise-shaped methods automatically.
|
|
93
|
-
* - **JSON** methods (`encodeJson`, `decodeJson`) run when the contract is serialized or loaded. Runtimes may also use `decodeJson` for values embedded in database-produced JSON results. They stay synchronous so contract validation and client construction are synchronous.
|
|
94
|
-
*
|
|
95
|
-
* Target-family codec interfaces extend this base; family-specific concerns (e.g. the SQL `column?` per-call context) layer on through the `CodecCallContext` extension pattern.
|
|
96
|
-
*/
|
|
97
|
-
interface Codec<Id extends string = string, TTraits extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown> {
|
|
98
|
-
/** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). The factory sets this to the descriptor's `codecId`; consumers use it as a back-reference for descriptor lookups and for decode-error diagnostics. */
|
|
99
|
-
readonly id: Id;
|
|
100
|
-
/** Phantom carrier for the `TTraits` generic; type-only, undefined at runtime. Runtime traits live on {@link CodecDescriptor.traits}. Implemented as a string-key phantom (`__codecTraits`) rather than `unique symbol` so bundlers that split `.d.ts` chunks do not strand symbol identity on chunk-private paths (the same `TS2742` family that the public re-export of `CodecTypes` works around). */
|
|
101
|
-
readonly __codecTraits?: TTraits;
|
|
102
|
-
/** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per runtime operation, including `query()`, `PreparedStatement.query()`, and `execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
103
|
-
encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
|
|
104
|
-
/** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per runtime operation, including `query()`, `PreparedStatement.query()`, and `execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
105
|
-
decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
|
|
106
|
-
/** Converts a JS value to the target-defined JSON representation used for contract serialization. This must match the scalar shape produced by the target inside JSON values. Synchronous; called during contract emission. */
|
|
107
|
-
encodeJson(value: TInput): JsonValue;
|
|
108
|
-
/** Converts the target-defined JSON representation back to the JS input type. Synchronous; called during contract loading via `family.deserializeContract` and may be called by runtimes for embedded JSON values. */
|
|
109
|
-
decodeJson(json: JsonValue): TInput;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Abstract base class for concrete codec implementations.
|
|
113
|
-
*
|
|
114
|
-
* 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}.
|
|
115
|
-
*/
|
|
116
|
-
declare abstract class CodecImpl<Id extends string = string, TTraits extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown> implements Codec<Id, TTraits, TWire, TInput> {
|
|
117
|
-
readonly descriptor: CodecDescriptor<any>;
|
|
118
|
-
/**
|
|
119
|
-
* 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`.
|
|
120
|
-
*/
|
|
121
|
-
constructor(descriptor: CodecDescriptor<any>);
|
|
122
|
-
get id(): Id;
|
|
123
|
-
abstract encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
|
|
124
|
-
abstract decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
|
|
125
|
-
abstract encodeJson(value: TInput): JsonValue;
|
|
126
|
-
abstract decodeJson(json: JsonValue): TInput;
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/shared/codec-types.d.ts
|
|
130
|
-
/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */
|
|
131
|
-
declare const CODEC_TRAITS: readonly ["equality", "order", "boolean", "numeric", "textual"];
|
|
132
|
-
type CodecTrait = (typeof CODEC_TRAITS)[number];
|
|
133
|
-
/**
|
|
134
|
-
* Serializable codec identity carried by every codec-bearing AST node.
|
|
135
|
-
*
|
|
136
|
-
* `(codecId, typeParams?)` is the single fact the runtime needs to materialize a codec via `descriptorFor(codecId).factory(typeParams)(ctx)`. The pair is content-keyed: two refs with the same `codecId` and structurally equal `typeParams` (regardless of object key ordering) resolve to the same memoized {@link Codec} instance.
|
|
137
|
-
*
|
|
138
|
-
* `typeParams` is `JsonValue`-constrained so the ref survives JSON serialization (relevant for AST-embedded migration ops). Non-parameterized codecs leave `typeParams` undefined; the descriptor's `paramsSchema` validates the value at the JSON boundary.
|
|
139
|
-
*
|
|
140
|
-
* `many` marks a scalar-array (list-typed) column. When `true`, the encode/decode paths map the element codec over the JS array rather than applying the codec to the whole value. The element codec id is `codecId`; the driver owns the array wire framing (`{…}`) in both directions. Absent for scalar columns.
|
|
141
|
-
*
|
|
142
|
-
* Family-agnostic by design — both SQL and Mongo AST nodes carry `codec: CodecRef | undefined`, and the resolver is the only dispatch path that survives serialization.
|
|
143
|
-
*/
|
|
144
|
-
interface CodecRef {
|
|
145
|
-
readonly codecId: string;
|
|
146
|
-
readonly typeParams?: JsonValue;
|
|
147
|
-
readonly many?: boolean;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Per-call context the runtime threads to every `codec.encode` / `codec.decode` invocation for a single runtime operation (`query()`, `PreparedStatement.query()`, or `execute()`).
|
|
151
|
-
*
|
|
152
|
-
* The framework-level shape is family-agnostic and carries one field:
|
|
153
|
-
*
|
|
154
|
-
* - `signal?: AbortSignal` — per-query cancellation. The runtime returns a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors who forward `signal` to their underlying SDK get true cancellation of in-flight network calls.
|
|
155
|
-
*
|
|
156
|
-
* Family layers extend this base with their own shape-of-call metadata: the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext` (see `@internal/sql-relational-core`). Mongo currently uses this framework type unchanged. Column metadata is intentionally **not** on the framework type — it is a SQL-family concept rooted in SQL's `(table, column)` addressing model and would not generalise to other families.
|
|
157
|
-
*
|
|
158
|
-
* The interface is named explicitly (not inlined) so future framework fields and family extensions can land additively without breaking codec author signatures.
|
|
159
|
-
*/
|
|
160
|
-
interface CodecCallContext {
|
|
161
|
-
readonly signal?: AbortSignal;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Codec-id-keyed read surface threaded into emit and authoring paths.
|
|
165
|
-
*
|
|
166
|
-
* - `get(id)` returns a representative {@link Codec} instance for the codec id (used by `family.deserializeContract` for `decodeJson` of literal column defaults). For parameterized codecs whose factory requires concrete params, this may return `undefined` — use `CodecRegistry.forCodecRef` instead.
|
|
167
|
-
* - `targetTypesFor(id)` exposes the codec-id-keyed `targetTypes` metadata the runtime instance no longer carries (TML-2357). Returns the same array `CodecDescriptor.targetTypes` would; for Mongo (whose registration doesn't yet resolve through the unified descriptor map — TML-2324) the family-side assembly populates this directly from the contributor's codec metadata.
|
|
168
|
-
* - `renderOutputTypeFor(id, params)` exposes the codec-id-keyed `renderOutputType` renderer the runtime instance no longer carries. Returns `undefined` when the codec doesn't render a custom type or when the codec id is unknown.
|
|
169
|
-
*/
|
|
170
|
-
interface CodecLookup {
|
|
171
|
-
get(id: string): Codec | undefined;
|
|
172
|
-
targetTypesFor(id: string): readonly string[] | undefined;
|
|
173
|
-
renderOutputTypeFor(id: string, params: Record<string, unknown>): string | undefined;
|
|
174
|
-
/** Codec-id-keyed `renderInputType` renderer for the `contract.d.ts` input position. Optional so existing lookups need not provide it; returns `undefined` when the codec renders no custom input type or the id is unknown. */
|
|
175
|
-
renderInputTypeFor?(id: string, params: Record<string, unknown>): string | undefined;
|
|
176
|
-
/** Codec-id-keyed `renderValueLiteral` renderer for the emit path (`side`: `output` = read type, `input` = create/update type). Optional so existing lookups need not provide it; returns `undefined` when the codec's output isn't literal-expressible or the id is unknown. */
|
|
177
|
-
renderValueLiteralFor?(id: string, value: JsonValue, side: 'output' | 'input'): string | undefined;
|
|
178
|
-
/**
|
|
179
|
-
* Codec-id-keyed descriptor accessor. Returns the full registered
|
|
180
|
-
* {@link AnyCodecDescriptor} for `id`, or `undefined` if no descriptor is
|
|
181
|
-
* registered. Optional so existing lookups need not provide it; a consumer
|
|
182
|
-
* that needs more than the derived per-id readers above — e.g. an
|
|
183
|
-
* authoring-time hook a target-specific descriptor exposes but this
|
|
184
|
-
* framework interface does not model generically — fetches the descriptor
|
|
185
|
-
* itself and narrows it with its own structural predicate.
|
|
186
|
-
*/
|
|
187
|
-
descriptorFor?(id: string): AnyCodecDescriptor | undefined;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Full codec registry — the read surface of {@link CodecLookup} plus codec resolution by ref or
|
|
191
|
-
* column coordinate. Built once by `extractCodecLookup` and passed by reference to adapters and
|
|
192
|
-
* other consumers that need to materialise codecs at runtime.
|
|
193
|
-
*
|
|
194
|
-
* - `forCodecRef(ref)` materialises a codec from a {@link CodecRef}. Throws
|
|
195
|
-
* `RUNTIME.CODEC_DESCRIPTOR_MISSING` for unknown ids and `RUNTIME.TYPE_PARAMS_INVALID` on param
|
|
196
|
-
* schema rejection.
|
|
197
|
-
* - `forColumn(namespaceId, table, column)` returns the codec for a specific column coordinate, or
|
|
198
|
-
* `undefined` when no column-to-codec mapping is present. This registry is contract-free so it
|
|
199
|
-
* always returns `undefined` — the method exists so the object structurally satisfies the SQL
|
|
200
|
-
* `ContractCodecRegistry` interface.
|
|
201
|
-
*/
|
|
202
|
-
interface CodecRegistry extends CodecLookup {
|
|
203
|
-
forCodecRef(ref: CodecRef): Codec;
|
|
204
|
-
forColumn(namespaceId: string, table: string, column: string): Codec | undefined;
|
|
205
|
-
}
|
|
206
|
-
declare const emptyCodecLookup: CodecLookup;
|
|
207
|
-
/**
|
|
208
|
-
* Family-agnostic per-instance context supplied by the framework when applying a higher-order codec factory. Allows stateful codecs (e.g. column-scoped encryption) to derive per-instance state from the materialization site.
|
|
209
|
-
*
|
|
210
|
-
* - `name` — the family-agnostic instance identity. For SQL, the runtime populates this as the `storage.types` instance name (e.g. `Embedding1536`) for typeRef-shaped columns, an inline-column sentinel (`<col:Document.embedding>`) for inline-`typeParams` columns, a shared codec-id sentinel (`<codec:pg/text@1>`) for non-parameterized codec ids, or the canonical cache key (`<codecId>:<canonicalizeJson(typeParams)>`) for ad-hoc refs the contract walk did not pre-populate. Other families pick the analogous identity for their materialization sites.
|
|
211
|
-
*
|
|
212
|
-
* Family-specific extensions (e.g. {@link import('@prisma/orm-family-sql/relational-core/ast').SqlCodecInstanceContext} in the SQL layer) augment this base with domain-shaped column-set metadata. Codec authors target the base when they don't read family-specific metadata; they target the family extension when they do.
|
|
213
|
-
*/
|
|
214
|
-
interface CodecInstanceContext {
|
|
215
|
-
readonly name: string;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.
|
|
219
|
-
*/
|
|
220
|
-
declare const voidParamsSchema: StandardSchemaV1<void>;
|
|
221
|
-
//#endregion
|
|
222
|
-
export { CodecDescriptorImpl as a, CodecLookup as c, CodecTrait as d, emptyCodecLookup as f, CodecDescriptor as i, CodecRef as l, Codec as n, CodecImpl as o, voidParamsSchema as p, CodecCallContext as r, CodecInstanceContext as s, AnyCodecDescriptor as t, CodecRegistry as u };
|
|
223
|
-
//# sourceMappingURL=codec-types-D6VRj2RE-BLElXc-O.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-D6VRj2RE-BLElXc-O.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-types-D6VRj2RE.d.mts"],"mappings":";;;;;;;;;;;;;;;UAcU,gBAAgB;;WAEf;;WAEA,iBAAiB;;WAEjB;;WAEA,cAAc,iBAAiB;;WAE/B;;WAEA,oBAAoB,QAAQ;;WAE5B,mBAAmB,QAAQ;;;;;;;;;;;WAW3B,sBAAsB,OAAO,WAAW;;WAExC,UAAU,QAAQ,OAAO,KAAK,yBAAyB;;;;;;;KAO7D,qBAAqB;;;;;;;;uBAQH,oBAAoB,2BAA2B,gBAAgB;oBAClE;oBACA,iBAAiB;oBACjB;oBACA,cAAc,iBAAiB;;MAE7C;;EAEJ,kBAAkB,QAAQ;;EAE1B,iBAAiB,QAAQ;;EAEzB,oBAAoB,OAAO,WAAW;;;;WAI7B,QAAQ,QAAQ,WAAW,KAAK,yBAAyB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;UAuBjF,MAAM,4BAA4B,yBAAyB,wBAAwB,cAAc,iBAAiB;;WAEjH,IAAI;;WAEJ,gBAAgB;;EAEzB,OAAO,OAAO,QAAQ,KAAK,mBAAmB,QAAQ;;EAEtD,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;;EAEpD,WAAW,OAAO,SAAS;;EAE3B,WAAW,MAAM,YAAY;;;;;;;uBAOR,UAAU,4BAA4B,yBAAyB,wBAAwB,cAAc,iBAAiB,6BAA6B,MAAM,IAAI,SAAS,OAAO;WACzL,YAAY;;;;EAIrB,YAAY,YAAY;MACpB,MAAM;WACD,OAAO,OAAO,QAAQ,KAAK,mBAAmB,QAAQ;WACtD,OAAO,MAAM,OAAO,KAAK,mBAAmB,QAAQ;WACpD,WAAW,OAAO,SAAS;WAC3B,WAAW,MAAM,YAAY;;;;;cAK1B;KACT,qBAAqB;;;;;;;;;;;;UAYhB;WACC;WACA,aAAa;WACb;;;;;;;;;;;;;UAaD;WACC,SAAS;;;;;;;;;UASV;EACR,IAAI,aAAa;EACjB,eAAe;EACf,oBAAoB,YAAY,QAAQ;;EAExC,oBAAoB,YAAY,QAAQ;;EAExC,uBAAuB,YAAY,OAAO,WAAW;;;;;;;;;;EAUrD,eAAe,aAAa;;;;;;;;;;;;;;;UAepB,sBAAsB;EAC9B,YAAY,KAAK,WAAW;EAC5B,UAAU,qBAAqB,eAAe,iBAAiB;;cAEnD,kBAAkB;;;;;;;;UAQtB;WACC;;;;;cAKG,kBAAkB"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/framework-components/dist/codec-types-DcNvNeY1.mjs
|
|
2
|
-
/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */
|
|
3
|
-
const CODEC_TRAITS = [
|
|
4
|
-
"equality",
|
|
5
|
-
"order",
|
|
6
|
-
"boolean",
|
|
7
|
-
"numeric",
|
|
8
|
-
"textual"
|
|
9
|
-
];
|
|
10
|
-
/** Whether `value` names one of the {@link CODEC_TRAITS}. */
|
|
11
|
-
function isCodecTrait(value) {
|
|
12
|
-
return CODEC_TRAITS.some((trait) => trait === value);
|
|
13
|
-
}
|
|
14
|
-
const emptyCodecLookup = {
|
|
15
|
-
get: () => void 0,
|
|
16
|
-
targetTypesFor: () => void 0,
|
|
17
|
-
renderOutputTypeFor: () => void 0
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.
|
|
21
|
-
*/
|
|
22
|
-
const voidParamsSchema = { "~standard": {
|
|
23
|
-
version: 1,
|
|
24
|
-
vendor: "prisma-next",
|
|
25
|
-
validate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: "unexpected typeParams for non-parameterized codec (void params expected)" }] }
|
|
26
|
-
} };
|
|
27
|
-
//#endregion
|
|
28
|
-
export { isCodecTrait as n, voidParamsSchema as r, emptyCodecLookup as t };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=codec-types-DcNvNeY1-BO6kUiH0.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-DcNvNeY1-BO6kUiH0.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec-types-DcNvNeY1.mjs"],"sourcesContent":["//#region src/shared/codec-types.ts\n/** Every semantic trait a codec may advertise. The runtime tuple backs validation of trait-keyed contributions arriving from JavaScript. */\nconst CODEC_TRAITS = [\n\t\"equality\",\n\t\"order\",\n\t\"boolean\",\n\t\"numeric\",\n\t\"textual\"\n];\n/** Whether `value` names one of the {@link CODEC_TRAITS}. */\nfunction isCodecTrait(value) {\n\treturn CODEC_TRAITS.some((trait) => trait === value);\n}\nconst emptyCodecLookup = {\n\tget: () => void 0,\n\ttargetTypesFor: () => void 0,\n\trenderOutputTypeFor: () => void 0\n};\n/**\n* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.\n*/\nconst voidParamsSchema = { \"~standard\": {\n\tversion: 1,\n\tvendor: \"prisma-next\",\n\tvalidate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: \"unexpected typeParams for non-parameterized codec (void params expected)\" }] }\n} };\n//#endregion\nexport { isCodecTrait as n, voidParamsSchema as r, emptyCodecLookup as t };\n\n//# sourceMappingURL=codec-types-DcNvNeY1.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;CACpB;CACA;CACA;CACA;CACA;AACD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,aAAa,MAAM,UAAU,UAAU,KAAK;AACpD;AACA,MAAM,mBAAmB;CACxB,WAAW,KAAK;CAChB,sBAAsB,KAAK;CAC3B,2BAA2B,KAAK;AACjC;;;;AAIA,MAAM,mBAAmB,EAAE,aAAa;CACvC,SAAS;CACT,QAAQ;CACR,WAAW,UAAU,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,SAAS,2EAA2E,CAAC,EAAE;AACjK,EAAE"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { d as CodecTrait } from "./codec-types-D6VRj2RE-BLElXc-O.mjs";
|
|
2
|
-
import { t as AggregateDescriptor } from "./types-import-spec-3mjbVBhI-DQI6BvKU.mjs";
|
|
3
|
-
import "./framework-components-hZ2tO-KH-CdRXBOYd.mjs";
|
|
4
|
-
//#region ../../../1-framework/1-core/framework-components/dist/components.d.mts
|
|
5
|
-
//#region src/shared/aggregate-overloads.d.ts
|
|
6
|
-
/** What settling needs to know about a codec: its id, and the traits an overload can claim it by. */
|
|
7
|
-
interface AggregateCodecTraits {
|
|
8
|
-
readonly codecId: string;
|
|
9
|
-
readonly traits: readonly CodecTrait[];
|
|
10
|
-
}
|
|
11
|
-
/** The overloads of one operation, settled: one per codec, plus the two that answer without a specific input. */
|
|
12
|
-
interface SettledAggregateOperation<TDescriptor extends AggregateDescriptor> {
|
|
13
|
-
/** The overload that serves each codec — its exact one where it has one, otherwise the single trait overload whose trait it carries. */
|
|
14
|
-
readonly byCodecId: ReadonlyMap<string, TDescriptor>;
|
|
15
|
-
/** The overload for a call that carries no input at all. */
|
|
16
|
-
readonly noInput: TDescriptor | undefined;
|
|
17
|
-
/** The overload for any input no exact or trait overload claims. */
|
|
18
|
-
readonly anyInput: TDescriptor | undefined;
|
|
19
|
-
}
|
|
20
|
-
/** A codec that two trait overloads of one operation both claim, leaving its result codec undetermined. */
|
|
21
|
-
interface AggregateOverloadAmbiguity {
|
|
22
|
-
readonly operation: string;
|
|
23
|
-
readonly codecId: string;
|
|
24
|
-
readonly traits: readonly CodecTrait[];
|
|
25
|
-
}
|
|
26
|
-
/** An `(operation, input)` key two overloads both claim. The first claim is the one settled; the second is reported here. */
|
|
27
|
-
interface AggregateOverloadDuplicate<TDescriptor extends AggregateDescriptor> {
|
|
28
|
-
readonly operation: string;
|
|
29
|
-
readonly key: string;
|
|
30
|
-
readonly first: TDescriptor;
|
|
31
|
-
readonly second: TDescriptor;
|
|
32
|
-
}
|
|
33
|
-
interface SettledAggregateOverloads<TDescriptor extends AggregateDescriptor> {
|
|
34
|
-
readonly operations: ReadonlyMap<string, SettledAggregateOperation<TDescriptor>>;
|
|
35
|
-
readonly ambiguities: readonly AggregateOverloadAmbiguity[];
|
|
36
|
-
readonly duplicates: readonly AggregateOverloadDuplicate<TDescriptor>[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Settle every contributed overload against `codecs`.
|
|
40
|
-
*
|
|
41
|
-
* Exact codec overloads win over trait overloads, and trait overloads are expanded only over the codecs given — so a caller that passes the codecs a stack actually composes cannot end up with a row for one it does not. An exact overload survives even for a codec outside that set, because naming a codec id is a claim that stands on its own.
|
|
42
|
-
*
|
|
43
|
-
* The input-agnostic overload is left unexpanded: it answers whatever the other two rungs do not, so materializing it per codec would say the same thing once per codec.
|
|
44
|
-
*
|
|
45
|
-
* A second claim on one `(operation, input)` key is reported as a duplicate and does not unseat the first; both production callers reject duplicates before settling, so the report guards a consumer that calls this directly.
|
|
46
|
-
*/
|
|
47
|
-
declare function settleAggregateOverloads<TDescriptor extends AggregateDescriptor>(descriptors: readonly TDescriptor[], codecs: Iterable<AggregateCodecTraits>): SettledAggregateOverloads<TDescriptor>;
|
|
48
|
-
//#endregion
|
|
49
|
-
export { SettledAggregateOverloads as a, SettledAggregateOperation as i, AggregateOverloadAmbiguity as n, settleAggregateOverloads as o, AggregateOverloadDuplicate as r, AggregateCodecTraits as t };
|
|
50
|
-
//# sourceMappingURL=components-CGA_WwEG.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components-CGA_WwEG.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/components.d.mts"],"mappings":";;;;;;UAMU;WACC;WACA,iBAAiB;;;UAGlB,0BAA0B,oBAAoB;;WAE7C,WAAW,oBAAoB;;WAE/B,SAAS;;WAET,UAAU;;;UAGX;WACC;WACA;WACA,iBAAiB;;;UAGlB,2BAA2B,oBAAoB;WAC9C;WACA;WACA,OAAO;WACP,QAAQ;;UAET,0BAA0B,oBAAoB;WAC7C,YAAY,oBAAoB,0BAA0B;WAC1D,sBAAsB;WACtB,qBAAqB,2BAA2B;;;;;;;;;;;iBAW1C,yBAAyB,oBAAoB,qBAAqB,sBAAsB,eAAe,QAAQ,SAAS,wBAAwB,0BAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components-dZRz3T5y.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/components.mjs"],"sourcesContent":["import { a as isNoInputAggregateDescriptor, i as isAnyInputAggregateDescriptor, n as aggregateDescriptorKey, r as isAggregateDescriptor, t as mergeCapabilityMatrices } from \"./capabilities-BCEONw9w.mjs\";\nimport { t as checkContractComponentRequirements } from \"./framework-components-D6j4Y5K7.mjs\";\n//#region src/shared/aggregate-overloads.ts\n/**\n* Settle every contributed overload against `codecs`.\n*\n* Exact codec overloads win over trait overloads, and trait overloads are expanded only over the codecs given — so a caller that passes the codecs a stack actually composes cannot end up with a row for one it does not. An exact overload survives even for a codec outside that set, because naming a codec id is a claim that stands on its own.\n*\n* The input-agnostic overload is left unexpanded: it answers whatever the other two rungs do not, so materializing it per codec would say the same thing once per codec.\n*\n* A second claim on one `(operation, input)` key is reported as a duplicate and does not unseat the first; both production callers reject duplicates before settling, so the report guards a consumer that calls this directly.\n*/\nfunction settleAggregateOverloads(descriptors, codecs) {\n\tconst byOperation = /* @__PURE__ */ new Map();\n\tconst firstClaims = /* @__PURE__ */ new Map();\n\tconst duplicates = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\tconst first = firstClaims.get(key);\n\t\tif (first !== void 0) {\n\t\t\tduplicates.push({\n\t\t\t\toperation: descriptor.operation,\n\t\t\t\tkey,\n\t\t\t\tfirst,\n\t\t\t\tsecond: descriptor\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tfirstClaims.set(key, descriptor);\n\t\tconst entry = byOperation.get(descriptor.operation) ?? {\n\t\t\texact: /* @__PURE__ */ new Map(),\n\t\t\ttraits: [],\n\t\t\tnoInput: void 0,\n\t\t\tanyInput: void 0\n\t\t};\n\t\tswitch (descriptor.input.kind) {\n\t\t\tcase \"none\":\n\t\t\t\tentry.noInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"any\":\n\t\t\t\tentry.anyInput = descriptor;\n\t\t\t\tbreak;\n\t\t\tcase \"codec\":\n\t\t\t\tentry.exact.set(descriptor.input.codecId, descriptor);\n\t\t\t\tbreak;\n\t\t\tcase \"trait\":\n\t\t\t\tentry.traits.push({\n\t\t\t\t\tdescriptor,\n\t\t\t\t\ttrait: descriptor.input.trait\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t\tbyOperation.set(descriptor.operation, entry);\n\t}\n\tconst codecList = [...codecs];\n\tconst operations = /* @__PURE__ */ new Map();\n\tconst ambiguities = [];\n\tfor (const [operation, entry] of byOperation) {\n\t\tconst byCodecId = new Map(entry.exact);\n\t\tfor (const codec of codecList) {\n\t\t\tif (byCodecId.has(codec.codecId)) continue;\n\t\t\tconst claims = entry.traits.filter((candidate) => codec.traits.includes(candidate.trait));\n\t\t\tif (claims.length > 1) {\n\t\t\t\tambiguities.push({\n\t\t\t\t\toperation,\n\t\t\t\t\tcodecId: codec.codecId,\n\t\t\t\t\ttraits: claims.map((claim) => claim.trait)\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst claim = claims[0];\n\t\t\tif (claim !== void 0) byCodecId.set(codec.codecId, claim.descriptor);\n\t\t}\n\t\toperations.set(operation, {\n\t\t\tbyCodecId,\n\t\t\tnoInput: entry.noInput,\n\t\t\tanyInput: entry.anyInput\n\t\t});\n\t}\n\treturn {\n\t\toperations,\n\t\tambiguities,\n\t\tduplicates\n\t};\n}\n//#endregion\nexport { aggregateDescriptorKey, checkContractComponentRequirements, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, mergeCapabilityMatrices, settleAggregateOverloads };\n\n//# sourceMappingURL=components.mjs.map"],"mappings":";;;;;;;;;;;AAYA,SAAS,yBAAyB,aAAa,QAAQ;CACtD,MAAM,8BAA8B,IAAI,IAAI;CAC5C,MAAM,8BAA8B,IAAI,IAAI;CAC5C,MAAM,aAAa,CAAC;CACpB,KAAK,MAAM,cAAc,aAAa;EACrC,MAAM,MAAM,uBAAuB,UAAU;EAC7C,MAAM,QAAQ,YAAY,IAAI,GAAG;EACjC,IAAI,UAAU,KAAK,GAAG;GACrB,WAAW,KAAK;IACf,WAAW,WAAW;IACtB;IACA;IACA,QAAQ;GACT,CAAC;GACD;EACD;EACA,YAAY,IAAI,KAAK,UAAU;EAC/B,MAAM,QAAQ,YAAY,IAAI,WAAW,SAAS,KAAK;GACtD,uBAAuB,IAAI,IAAI;GAC/B,QAAQ,CAAC;GACT,SAAS,KAAK;GACd,UAAU,KAAK;EAChB;EACA,QAAQ,WAAW,MAAM,MAAzB;GACC,KAAK;IACJ,MAAM,UAAU;IAChB;GACD,KAAK;IACJ,MAAM,WAAW;IACjB;GACD,KAAK;IACJ,MAAM,MAAM,IAAI,WAAW,MAAM,SAAS,UAAU;IACpD;GACD,KAAK;IACJ,MAAM,OAAO,KAAK;KACjB;KACA,OAAO,WAAW,MAAM;IACzB,CAAC;IACD;EACF;EACA,YAAY,IAAI,WAAW,WAAW,KAAK;CAC5C;CACA,MAAM,YAAY,CAAC,GAAG,MAAM;CAC5B,MAAM,6BAA6B,IAAI,IAAI;CAC3C,MAAM,cAAc,CAAC;CACrB,KAAK,MAAM,CAAC,WAAW,UAAU,aAAa;EAC7C,MAAM,YAAY,IAAI,IAAI,MAAM,KAAK;EACrC,KAAK,MAAM,SAAS,WAAW;GAC9B,IAAI,UAAU,IAAI,MAAM,OAAO,GAAG;GAClC,MAAM,SAAS,MAAM,OAAO,QAAQ,cAAc,MAAM,OAAO,SAAS,UAAU,KAAK,CAAC;GACxF,IAAI,OAAO,SAAS,GAAG;IACtB,YAAY,KAAK;KAChB;KACA,SAAS,MAAM;KACf,QAAQ,OAAO,KAAK,UAAU,MAAM,KAAK;IAC1C,CAAC;IACD;GACD;GACA,MAAM,QAAQ,OAAO;GACrB,IAAI,UAAU,KAAK,GAAG,UAAU,IAAI,MAAM,SAAS,MAAM,UAAU;EACpE;EACA,WAAW,IAAI,WAAW;GACzB;GACA,SAAS,MAAM;GACf,UAAU,MAAM;EACjB,CAAC;CACF;CACA,OAAO;EACN;EACA;EACA;CACD;AACD"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/config/dist/config-types.mjs
|
|
2
|
-
/**
|
|
3
|
-
* Default *source* directory for the contract file the user authors at `init`
|
|
4
|
-
* time. Output artefacts colocate with source per the same rule path-bearing
|
|
5
|
-
* providers apply.
|
|
6
|
-
*/
|
|
7
|
-
const DEFAULT_CONTRACT_SOURCE_DIR = "src/prisma";
|
|
8
|
-
function normalizeContractConfig(contract) {
|
|
9
|
-
const inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;
|
|
10
|
-
return {
|
|
11
|
-
source: contract.source,
|
|
12
|
-
output: contract.output ?? inMemoryFallbackOutput
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Version of the config format produced by this `defineConfig`. Bumped when
|
|
17
|
-
* the config shape changes incompatibly.
|
|
18
|
-
*/
|
|
19
|
-
const CONFIG_FORMAT_VERSION = 1;
|
|
20
|
-
const CONFIG_FORMAT_VERSION_KEY = Symbol.for("prisma-next.config-format-version");
|
|
21
|
-
function stampConfigFormatVersion(config) {
|
|
22
|
-
Object.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {
|
|
23
|
-
value: 1,
|
|
24
|
-
enumerable: false,
|
|
25
|
-
configurable: false,
|
|
26
|
-
writable: false
|
|
27
|
-
});
|
|
28
|
-
return config;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Reads the config-format version stamped by `defineConfig`, or `undefined`
|
|
32
|
-
* when the value was not produced by `defineConfig`. The marker is
|
|
33
|
-
* non-enumerable and does not survive spreads: configs must export the
|
|
34
|
-
* `defineConfig` result directly.
|
|
35
|
-
*/
|
|
36
|
-
function readConfigFormatVersion(value) {
|
|
37
|
-
if (typeof value !== "object" || value === null) return;
|
|
38
|
-
const version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);
|
|
39
|
-
return typeof version === "number" ? version : void 0;
|
|
40
|
-
}
|
|
41
|
-
function hasCurrentConfigFormatVersion(value) {
|
|
42
|
-
return readConfigFormatVersion(value) === 1;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Helper function to define a Prisma Next config.
|
|
46
|
-
* Normalizes the config and stamps it with the config-format version marker.
|
|
47
|
-
* Structural validation happens in the config loader, which reports
|
|
48
|
-
* per-section diagnostics instead of failing the whole load.
|
|
49
|
-
*
|
|
50
|
-
* Normalization:
|
|
51
|
-
* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
|
|
52
|
-
* when missing (in-memory-only providers)
|
|
53
|
-
*
|
|
54
|
-
* @param config - Raw config input from user
|
|
55
|
-
* @returns Normalized config IR with defaults applied
|
|
56
|
-
*/
|
|
57
|
-
function defineConfig(config) {
|
|
58
|
-
if (config.contract) return stampConfigFormatVersion({
|
|
59
|
-
...config,
|
|
60
|
-
contract: normalizeContractConfig(config.contract)
|
|
61
|
-
});
|
|
62
|
-
return stampConfigFormatVersion(config);
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { normalizeContractConfig as a, hasCurrentConfigFormatVersion as i, DEFAULT_CONTRACT_SOURCE_DIR as n, readConfigFormatVersion as o, defineConfig as r, CONFIG_FORMAT_VERSION as t };
|
|
66
|
-
|
|
67
|
-
//# sourceMappingURL=config-types-BqhNxw0z.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-BqhNxw0z.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.mjs"],"sourcesContent":["//#region src/config-types.ts\n/**\n* Default *source* directory for the contract file the user authors at `init`\n* time. Output artefacts colocate with source per the same rule path-bearing\n* providers apply.\n*/\nconst DEFAULT_CONTRACT_SOURCE_DIR = \"src/prisma\";\nfunction normalizeContractConfig(contract) {\n\tconst inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;\n\treturn {\n\t\tsource: contract.source,\n\t\toutput: contract.output ?? inMemoryFallbackOutput\n\t};\n}\n/**\n* Version of the config format produced by this `defineConfig`. Bumped when\n* the config shape changes incompatibly.\n*/\nconst CONFIG_FORMAT_VERSION = 1;\nconst CONFIG_FORMAT_VERSION_KEY = Symbol.for(\"prisma-next.config-format-version\");\nfunction stampConfigFormatVersion(config) {\n\tObject.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {\n\t\tvalue: 1,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\twritable: false\n\t});\n\treturn config;\n}\n/**\n* Reads the config-format version stamped by `defineConfig`, or `undefined`\n* when the value was not produced by `defineConfig`. The marker is\n* non-enumerable and does not survive spreads: configs must export the\n* `defineConfig` result directly.\n*/\nfunction readConfigFormatVersion(value) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);\n\treturn typeof version === \"number\" ? version : void 0;\n}\nfunction hasCurrentConfigFormatVersion(value) {\n\treturn readConfigFormatVersion(value) === 1;\n}\n/**\n* Helper function to define a Prisma Next config.\n* Normalizes the config and stamps it with the config-format version marker.\n* Structural validation happens in the config loader, which reports\n* per-section diagnostics instead of failing the whole load.\n*\n* Normalization:\n* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR\n* when missing (in-memory-only providers)\n*\n* @param config - Raw config input from user\n* @returns Normalized config IR with defaults applied\n*/\nfunction defineConfig(config) {\n\tif (config.contract) return stampConfigFormatVersion({\n\t\t...config,\n\t\tcontract: normalizeContractConfig(config.contract)\n\t});\n\treturn stampConfigFormatVersion(config);\n}\n//#endregion\nexport { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;AAMA,MAAM,8BAA8B;AACpC,SAAS,wBAAwB,UAAU;CAC1C,MAAM,yBAAyB,GAAG,4BAA4B;CAC9D,OAAO;EACN,QAAQ,SAAS;EACjB,QAAQ,SAAS,UAAU;CAC5B;AACD;;;;;AAKA,MAAM,wBAAwB;AAC9B,MAAM,4BAA4B,OAAO,IAAI,mCAAmC;AAChF,SAAS,yBAAyB,QAAQ;CACzC,OAAO,eAAe,QAAQ,2BAA2B;EACxD,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;CACX,CAAC;CACD,OAAO;AACR;;;;;;;AAOA,SAAS,wBAAwB,OAAO;CACvC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;CACjD,MAAM,UAAU,QAAQ,IAAI,OAAO,yBAAyB;CAC5D,OAAO,OAAO,YAAY,WAAW,UAAU,KAAK;AACrD;AACA,SAAS,8BAA8B,OAAO;CAC7C,OAAO,wBAAwB,KAAK,MAAM;AAC3C;;;;;;;;;;;;;;AAcA,SAAS,aAAa,QAAQ;CAC7B,IAAI,OAAO,UAAU,OAAO,yBAAyB;EACpD,GAAG;EACH,UAAU,wBAAwB,OAAO,QAAQ;CAClD,CAAC;CACD,OAAO,yBAAyB,MAAM;AACvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-CW4PDwMC.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.d.mts"],"mappings":";;;;;;;;;;UAMU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;;;;;;WAMP,OAAO,SAAS;;UAEjB;WACC;WACA,sBAAsB;WACtB,OAAO;;UAER;WACC;;WAEA,4BAA4B,oBAAoB;WAChD,wBAAwB;WACxB,aAAa;WACb,yBAAyB;WACzB;WACA,cAAc;;;KAGpB;UACK;WACC;WACA,OAAO,SAAS,0BAA0B,QAAQ,OAAO,UAAU;;UAEpE,kCAAkC;WACjC;;UAED,yCAAyC;WACxC;;;;;;;;UAQD,qCAAqC;WACpC;;KAEN,yBAAyB,4BAA4B,mCAAmC;;;;;;UAMnF;;;;;WAKC,QAAQ;;;;;;;WAOR;;UAED;WACC;WACA;;;;;;;cAOG;iBACG,wBAAwB,UAAU,iBAAiB;WACzD;;;;;;;;;;UAUD,iBAAiB,mCAAmC,mCAAmC;WACtF,QAAQ,wBAAwB;WAChC,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW;WAC7C,sBAAsB,2BAA2B,WAAW;;;;;;;WAO5D,SAAS,wBAAwB,WAAW,WAAW,sBAAsB,WAAW,YAAY;;;;;WAKpG;;;;;;aAME,aAAa;;;;;;WAMf,WAAW;;;;WAIX;;aAEE;;WAEF,YAAY;;;;;;cAMT;;;;;;;iBAOG,wBAAwB;iBACxB,8BAA8B;;;;;;;;;;;;;;iBAc9B,aAAa,mCAAmC,mCAAmC,QAAQ,iBAAiB,WAAW,aAAa,iBAAiB,WAAW"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/config/dist/config-validation.mjs
|
|
2
|
-
var IssueCollector = class {
|
|
3
|
-
issues = [];
|
|
4
|
-
add(section, field, message) {
|
|
5
|
-
this.issues.push({
|
|
6
|
-
section,
|
|
7
|
-
field,
|
|
8
|
-
message: message ?? `Config must have a "${field}" field`
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function isObject(value) {
|
|
13
|
-
return typeof value === "object" && value !== null;
|
|
14
|
-
}
|
|
15
|
-
function validateFamily(config, issues) {
|
|
16
|
-
const family = config["family"];
|
|
17
|
-
if (!family) {
|
|
18
|
-
issues.add("family", "family");
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (!isObject(family)) {
|
|
22
|
-
issues.add("family", "family", "Config.family must be an object");
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (family["kind"] !== "family") issues.add("family", "family.kind", "Config.family must have kind: \"family\"");
|
|
26
|
-
if (typeof family["id"] !== "string") issues.add("family", "family.id", "Config.family must have id: string");
|
|
27
|
-
if (typeof family["familyId"] !== "string") issues.add("family", "family.familyId", "Config.family must have familyId: string");
|
|
28
|
-
if (typeof family["version"] !== "string") issues.add("family", "family.version", "Config.family must have version: string");
|
|
29
|
-
if (!family["emission"] || typeof family["emission"] !== "object") issues.add("family", "family.emission", "Config.family must have emission: EmissionSpi");
|
|
30
|
-
if (typeof family["create"] !== "function") issues.add("family", "family.create", "Config.family must have create: function");
|
|
31
|
-
return typeof family["familyId"] === "string" ? family["familyId"] : void 0;
|
|
32
|
-
}
|
|
33
|
-
function validateTargetLikeDescriptor(descriptor, fieldPrefix, expectations, issues) {
|
|
34
|
-
const { section, kind, label, familyId, targetId } = expectations;
|
|
35
|
-
const describe = (suffix, requirement) => issues.add(section, `${fieldPrefix}.${suffix}`, `${label} must have ${requirement}`);
|
|
36
|
-
if (descriptor["kind"] !== kind) describe("kind", `kind: "${kind}"`);
|
|
37
|
-
if (typeof descriptor["id"] !== "string") describe("id", "id: string");
|
|
38
|
-
if (typeof descriptor["familyId"] !== "string") describe("familyId", "familyId: string");
|
|
39
|
-
else if (familyId !== void 0 && descriptor["familyId"] !== familyId) issues.add(section, `${fieldPrefix}.familyId`, `Config.${fieldPrefix}.familyId must match Config.family.familyId (expected: ${familyId}, got: ${descriptor["familyId"]})`);
|
|
40
|
-
if (typeof descriptor["version"] !== "string") describe("version", "version: string");
|
|
41
|
-
if (typeof descriptor["targetId"] !== "string") describe("targetId", "targetId: string");
|
|
42
|
-
else if (targetId !== void 0 && descriptor["targetId"] !== targetId) issues.add(section, `${fieldPrefix}.targetId`, `Config.${fieldPrefix}.targetId must match Config.target.targetId (expected: ${targetId}, got: ${descriptor["targetId"]})`);
|
|
43
|
-
if (typeof descriptor["create"] !== "function") describe("create", "create: function");
|
|
44
|
-
}
|
|
45
|
-
function validateTarget(config, familyId, issues) {
|
|
46
|
-
const target = config["target"];
|
|
47
|
-
if (!target) {
|
|
48
|
-
issues.add("target", "target");
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (!isObject(target)) {
|
|
52
|
-
issues.add("target", "target", "Config.target must be an object");
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
validateTargetLikeDescriptor(target, "target", {
|
|
56
|
-
section: "target",
|
|
57
|
-
kind: "target",
|
|
58
|
-
label: "Config.target",
|
|
59
|
-
familyId,
|
|
60
|
-
targetId: void 0
|
|
61
|
-
}, issues);
|
|
62
|
-
return typeof target["targetId"] === "string" ? target["targetId"] : void 0;
|
|
63
|
-
}
|
|
64
|
-
function validateExtensions(config, familyId, targetId, issues) {
|
|
65
|
-
if (config["extensionPacks"] !== void 0) issues.add("extensions", "extensionPacks", "Config.extensionPacks is no longer supported; rename it to Config.extensions");
|
|
66
|
-
if (config["extensions"] === void 0) return;
|
|
67
|
-
if (!Array.isArray(config["extensions"])) {
|
|
68
|
-
issues.add("extensions", "extensions", "Config.extensions must be an array");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
for (const ext of config["extensions"]) {
|
|
72
|
-
if (!isObject(ext)) {
|
|
73
|
-
issues.add("extensions", "extensions[]", "Config.extensions must contain ControlExtensionDescriptor objects");
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
validateTargetLikeDescriptor(ext, "extensions[]", {
|
|
77
|
-
section: "extensions",
|
|
78
|
-
kind: "extension",
|
|
79
|
-
label: "Config.extensions items",
|
|
80
|
-
familyId,
|
|
81
|
-
targetId
|
|
82
|
-
}, issues);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function validateContract(config, issues) {
|
|
86
|
-
if (config["contract"] === void 0) return;
|
|
87
|
-
if (!isObject(config["contract"])) {
|
|
88
|
-
issues.add("contract", "contract", "Config.contract must be an object");
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const contract = config["contract"];
|
|
92
|
-
if (!Object.hasOwn(contract, "source")) {
|
|
93
|
-
issues.add("contract", "contract.source", "Config.contract.source is required when contract is provided");
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const source = contract["source"];
|
|
97
|
-
if (!isObject(source)) {
|
|
98
|
-
issues.add("contract", "contract.source", "Config.contract.source must be a provider object");
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const inputs = Object.hasOwn(source, "inputs") ? source["inputs"] : void 0;
|
|
102
|
-
if (inputs !== void 0) {
|
|
103
|
-
if (!Array.isArray(inputs)) issues.add("contract", "contract.source.inputs", "Config.contract.source.inputs must be an array of strings when provided");
|
|
104
|
-
else if (inputs.some((input) => typeof input !== "string")) issues.add("contract", "contract.source.inputs[]", "Config.contract.source.inputs must contain only strings");
|
|
105
|
-
}
|
|
106
|
-
const format = Object.hasOwn(source, "format") ? source["format"] : void 0;
|
|
107
|
-
if (format !== void 0 && typeof format !== "string") issues.add("contract", "contract.source.format", "Config.contract.source.format must be a string when provided");
|
|
108
|
-
if (!Object.hasOwn(source, "load") || typeof source["load"] !== "function") issues.add("contract", "contract.source.load", "Config.contract.source.load must be a function");
|
|
109
|
-
const output = Object.hasOwn(contract, "output") ? contract["output"] : void 0;
|
|
110
|
-
if (output !== void 0 && typeof output !== "string") issues.add("contract", "contract.output", "Config.contract.output must be a string when provided");
|
|
111
|
-
}
|
|
112
|
-
function validateMigrations(config, issues) {
|
|
113
|
-
if (config["migrations"] === void 0) return;
|
|
114
|
-
if (!isObject(config["migrations"])) {
|
|
115
|
-
issues.add("migrations", "migrations", "Config.migrations must be an object");
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const dir = config["migrations"]["dir"];
|
|
119
|
-
if (dir !== void 0 && typeof dir !== "string") issues.add("migrations", "migrations.dir", "Config.migrations.dir must be a string");
|
|
120
|
-
}
|
|
121
|
-
function validateFormatter(config, issues) {
|
|
122
|
-
if (config["formatter"] === void 0) return;
|
|
123
|
-
if (!isObject(config["formatter"])) {
|
|
124
|
-
issues.add("formatter", "formatter", "Config.formatter must be an object");
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
const { indent, newline } = config["formatter"];
|
|
128
|
-
if (!(indent === void 0 || indent === "tab" || typeof indent === "number" && Number.isInteger(indent) && indent >= 1)) issues.add("formatter", "formatter.indent", "Config.formatter.indent must be an integer >= 1 or \"tab\"");
|
|
129
|
-
if (newline !== void 0 && newline !== "LF" && newline !== "CRLF") issues.add("formatter", "formatter.newline", "Config.formatter.newline must be \"LF\" or \"CRLF\"");
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Validates the config structure and returns every problem found, each tagged
|
|
133
|
-
* with the config section it concerns. Pure validation logic with no file I/O
|
|
134
|
-
* or CLI awareness; it never throws.
|
|
135
|
-
*/
|
|
136
|
-
function collectConfigIssues(config) {
|
|
137
|
-
const issues = new IssueCollector();
|
|
138
|
-
const familyId = validateFamily(config, issues);
|
|
139
|
-
const targetId = validateTarget(config, familyId, issues);
|
|
140
|
-
const adapter = config["adapter"];
|
|
141
|
-
if (!adapter) issues.add("adapter", "adapter");
|
|
142
|
-
else if (!isObject(adapter)) issues.add("adapter", "adapter", "Config.adapter must be an object");
|
|
143
|
-
else validateTargetLikeDescriptor(adapter, "adapter", {
|
|
144
|
-
section: "adapter",
|
|
145
|
-
kind: "adapter",
|
|
146
|
-
label: "Config.adapter",
|
|
147
|
-
familyId,
|
|
148
|
-
targetId
|
|
149
|
-
}, issues);
|
|
150
|
-
const driver = config["driver"];
|
|
151
|
-
if (driver !== void 0) if (!isObject(driver)) issues.add("driver", "driver", "Config.driver must be an object");
|
|
152
|
-
else validateTargetLikeDescriptor(driver, "driver", {
|
|
153
|
-
section: "driver",
|
|
154
|
-
kind: "driver",
|
|
155
|
-
label: "Config.driver",
|
|
156
|
-
familyId,
|
|
157
|
-
targetId
|
|
158
|
-
}, issues);
|
|
159
|
-
validateExtensions(config, familyId, targetId, issues);
|
|
160
|
-
validateContract(config, issues);
|
|
161
|
-
validateMigrations(config, issues);
|
|
162
|
-
validateFormatter(config, issues);
|
|
163
|
-
return issues.issues;
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
export { collectConfigIssues as t };
|
|
167
|
-
|
|
168
|
-
//# sourceMappingURL=config-validation-DPt5hwQx.mjs.map
|