@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,11 +1,12 @@
|
|
|
1
|
-
import { t as Contract } from "./contract-types-
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { t as Contract } from "./contract-types-DEIEpzU_-DvAVuBr5.mjs";
|
|
2
|
+
import { p as CodecLookupWithDescriptors } from "./codec-types-CPgEZoIq-BL9hisr8.mjs";
|
|
3
|
+
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
4
|
+
import { K as DataTypeSupport, W as ControlMutationDefaults, tt as GeneratorFunctionRegistry } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
5
|
+
import "./authoring-CjwinhU5.mjs";
|
|
6
|
+
import "./codec-B4ypaota.mjs";
|
|
4
7
|
import { t as CapabilityMatrix } from "./capabilities-Cupq4-1--C71ORI3N.mjs";
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
8
|
-
import { d as ControlExtensionDescriptor, g as ControlTargetDescriptor, l as ControlDriverDescriptor, n as AssembledAuthoringContributions, p as ControlFamilyDescriptor, s as ControlAdapterDescriptor, u as ControlDriverInstance } from "./control-BF8qzdnM.mjs";
|
|
8
|
+
import "./components-CRBcIta_.mjs";
|
|
9
|
+
import { _ as ControlFamilyDescriptor, b as ControlTargetDescriptor, h as ControlExtensionDescriptor, m as ControlDriverInstance, p as ControlDriverDescriptor, r as AssembledAuthoringContributions, u as ControlAdapterDescriptor } from "./control-s5ECUABR.mjs";
|
|
9
10
|
//#region ../../../1-framework/1-core/config/dist/config-types.d.mts
|
|
10
11
|
//#region src/contract-source-types.d.ts
|
|
11
12
|
interface ContractSourceDiagnosticPosition {
|
|
@@ -20,8 +21,10 @@ interface ContractSourceDiagnosticSpan {
|
|
|
20
21
|
interface ContractSourceDiagnostic {
|
|
21
22
|
readonly code: string;
|
|
22
23
|
readonly message: string;
|
|
23
|
-
readonly sourceId
|
|
24
|
+
readonly sourceId: string;
|
|
24
25
|
readonly span?: ContractSourceDiagnosticSpan;
|
|
26
|
+
/** `'warning'` for a finding that does not stop the source from producing a contract; absent means `'error'`. */
|
|
27
|
+
readonly severity?: 'error' | 'warning';
|
|
25
28
|
/**
|
|
26
29
|
* Optional structured payload for machine-readable consumers (agents,
|
|
27
30
|
* IDE extensions, CLI auto-fix). Human-readable prose lives in `message`;
|
|
@@ -39,33 +42,60 @@ interface ContractSourceContext {
|
|
|
39
42
|
/** Extension contracts keyed by space ID, required for cross-space FK resolution. */
|
|
40
43
|
readonly composedExtensionContracts: ReadonlyMap<string, Contract>;
|
|
41
44
|
readonly authoringContributions: AssembledAuthoringContributions;
|
|
42
|
-
readonly codecLookup:
|
|
45
|
+
readonly codecLookup: CodecLookupWithDescriptors;
|
|
46
|
+
/** The stack's data types with their authoring entries, so a written value can be read and cast into a receiving type. ADR 254. */
|
|
47
|
+
readonly dataTypes: DataTypeSupport;
|
|
43
48
|
readonly controlMutationDefaults: ControlMutationDefaults;
|
|
49
|
+
/** The stack's generator functions, which `@onCreate(fn())` and `@onUpdate(fn())` resolve through. */
|
|
50
|
+
readonly generatorFunctions: GeneratorFunctionRegistry;
|
|
51
|
+
/**
|
|
52
|
+
* The flat, expanded, deduped, sorted member file list — every
|
|
53
|
+
* `source.inputs` glob resolved to the files it currently matches. A glob
|
|
54
|
+
* can expand to many files or none, so this list's length and order do
|
|
55
|
+
* not mirror `source.inputs` entry-for-entry.
|
|
56
|
+
*/
|
|
44
57
|
readonly resolvedInputs: readonly string[];
|
|
45
58
|
readonly capabilities: CapabilityMatrix;
|
|
59
|
+
readonly defaultNamespaceId: string;
|
|
60
|
+
/**
|
|
61
|
+
* Receives a warning the source reports while it still produces a contract, such as a deprecated name. Callers that show diagnostics supply it; a source reports through it when present and otherwise drops the warning.
|
|
62
|
+
*/
|
|
63
|
+
readonly reportWarning?: (diagnostic: ContractSourceDiagnostic) => void;
|
|
64
|
+
readonly pslDiagnostics?: {
|
|
65
|
+
readonly describeUnsupportedAttribute?: unknown;
|
|
66
|
+
readonly describeUnresolvedType?: unknown;
|
|
67
|
+
} | undefined;
|
|
46
68
|
}
|
|
47
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* The language a contract source's inputs are written in. Every source states
|
|
71
|
+
* one. Tooling that reads the inputs itself, such as `contract format` and the
|
|
72
|
+
* language server, checks this instead of guessing from file extensions.
|
|
73
|
+
*/
|
|
48
74
|
type ContractSourceFormat = 'psl' | 'typescript';
|
|
49
75
|
interface ContractSourceProviderBase {
|
|
76
|
+
/**
|
|
77
|
+
* Glob patterns naming the contract source's member files. A wildcard-free
|
|
78
|
+
* entry is the degenerate glob (a literal path). Directories are not
|
|
79
|
+
* auto-expanded.
|
|
80
|
+
*/
|
|
50
81
|
readonly inputs?: readonly string[];
|
|
51
82
|
readonly load: (context: ContractSourceContext) => Promise<Result<Contract, ContractSourceDiagnostics>>;
|
|
52
83
|
}
|
|
84
|
+
/** The PSL grammar versions the parser knows. `prisma-7` reads the lines of a `view` block as model fields; Prisma 6 schemas use the same grammar. */
|
|
85
|
+
type PslGrammar = 'prisma-7' | 'prisma-8';
|
|
86
|
+
/** What a PSL source tells the parser about its files. Every tool that parses the source's files passes these to the parser. */
|
|
87
|
+
interface PslParserOptions {
|
|
88
|
+
/** The grammar the files are written in. Defaults to `prisma-8`. */
|
|
89
|
+
readonly grammar?: PslGrammar;
|
|
90
|
+
}
|
|
53
91
|
interface PslContractSourceProvider extends ContractSourceProviderBase {
|
|
54
92
|
readonly format: 'psl';
|
|
93
|
+
readonly parserOptions?: PslParserOptions;
|
|
55
94
|
}
|
|
56
95
|
interface TypeScriptContractSourceProvider extends ContractSourceProviderBase {
|
|
57
96
|
readonly format: 'typescript';
|
|
58
97
|
}
|
|
59
|
-
|
|
60
|
-
* Third-party or unspecified source formats. Absent (or unrecognized)
|
|
61
|
-
* `format` means format-aware tooling must leave the source untouched.
|
|
62
|
-
* Narrowing to a known format flows only through capability guards owned by
|
|
63
|
-
* the authoring layer.
|
|
64
|
-
*/
|
|
65
|
-
interface OpaqueContractSourceProvider extends ContractSourceProviderBase {
|
|
66
|
-
readonly format?: string;
|
|
67
|
-
}
|
|
68
|
-
type ContractSourceProvider = PslContractSourceProvider | TypeScriptContractSourceProvider | OpaqueContractSourceProvider;
|
|
98
|
+
type ContractSourceProvider = PslContractSourceProvider | TypeScriptContractSourceProvider;
|
|
69
99
|
//#endregion
|
|
70
100
|
//#region src/config-types.d.ts
|
|
71
101
|
/**
|
|
@@ -78,7 +108,7 @@ interface ContractConfig {
|
|
|
78
108
|
*/
|
|
79
109
|
readonly source: ContractSourceProvider;
|
|
80
110
|
/**
|
|
81
|
-
* Path to contract.json artifact. Providers that know an input path (PSL,
|
|
111
|
+
* Path to contract.json artifact, relative to the config file. Providers that know an input path (PSL,
|
|
82
112
|
* `typescriptContractFromPath`) derive an output colocated with that input
|
|
83
113
|
* so this rarely needs to be set explicitly. The `.d.ts` types file is
|
|
84
114
|
* always emitted next to the JSON (e.g., `contract.json` → `contract.d.ts`).
|
|
@@ -99,7 +129,7 @@ declare function normalizeContractConfig(contract: ContractConfig): ContractConf
|
|
|
99
129
|
readonly output: string;
|
|
100
130
|
};
|
|
101
131
|
/**
|
|
102
|
-
* Configuration for Prisma
|
|
132
|
+
* Configuration for Prisma 8 CLI.
|
|
103
133
|
* Uses Control*Descriptor types for type-safe wiring with compile-time compatibility checks.
|
|
104
134
|
*
|
|
105
135
|
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
@@ -139,28 +169,22 @@ interface PrismaNextConfig<TFamilyId extends string = string, TTargetId extends
|
|
|
139
169
|
* Migration configuration. Controls where on-disk migration packages are stored.
|
|
140
170
|
*/
|
|
141
171
|
readonly migrations?: {
|
|
142
|
-
/** Directory for migration packages, relative to config file. Defaults to 'migrations'. */
|
|
172
|
+
/** Directory for migration packages, relative to the config file. Defaults to 'migrations'. */
|
|
143
173
|
readonly dir?: string;
|
|
144
174
|
};
|
|
145
175
|
readonly formatter?: FormatterConfig;
|
|
176
|
+
/**
|
|
177
|
+
* The directory of the config file that wrote this section, recorded when
|
|
178
|
+
* the section is validated; every relative path above was resolved against
|
|
179
|
+
* the file that declared it. Commands that need the project's location
|
|
180
|
+
* start here.
|
|
181
|
+
*/
|
|
182
|
+
readonly baseDir?: string;
|
|
146
183
|
}
|
|
147
184
|
/**
|
|
148
|
-
*
|
|
149
|
-
* the
|
|
150
|
-
|
|
151
|
-
declare const CONFIG_FORMAT_VERSION = 1;
|
|
152
|
-
/**
|
|
153
|
-
* Reads the config-format version stamped by `defineConfig`, or `undefined`
|
|
154
|
-
* when the value was not produced by `defineConfig`. The marker is
|
|
155
|
-
* non-enumerable and does not survive spreads: configs must export the
|
|
156
|
-
* `defineConfig` result directly.
|
|
157
|
-
*/
|
|
158
|
-
declare function readConfigFormatVersion(value: unknown): number | undefined;
|
|
159
|
-
declare function hasCurrentConfigFormatVersion(value: unknown): boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Helper function to define a Prisma Next config.
|
|
162
|
-
* Normalizes the config and stamps it with the config-format version marker.
|
|
163
|
-
* Structural validation happens in the config loader, which reports
|
|
185
|
+
* Builds the ORM section of `prisma.config.ts`. The result nests under the
|
|
186
|
+
* `orm` key of the engine's `definePrismaConfig` — the marker lives on the envelope,
|
|
187
|
+
* not here. Structural validation happens in the config loader, which reports
|
|
164
188
|
* per-section diagnostics instead of failing the whole load.
|
|
165
189
|
*
|
|
166
190
|
* Normalization:
|
|
@@ -172,5 +196,13 @@ declare function hasCurrentConfigFormatVersion(value: unknown): boolean;
|
|
|
172
196
|
*/
|
|
173
197
|
declare function defineConfig<TFamilyId extends string = string, TTargetId extends string = string>(config: PrismaNextConfig<TFamilyId, TTargetId>): PrismaNextConfig<TFamilyId, TTargetId>;
|
|
174
198
|
//#endregion
|
|
175
|
-
|
|
176
|
-
|
|
199
|
+
//#region src/default-contract-output-path.d.ts
|
|
200
|
+
/**
|
|
201
|
+
* Where `contract emit` writes the contract JSON for a config that names
|
|
202
|
+
* `contractPath` and sets no output: beside the contract file and named after
|
|
203
|
+
* it, or `contract.json` in the static prefix directory of a glob.
|
|
204
|
+
*/
|
|
205
|
+
declare function defaultContractOutputPath(contractPath: string): string;
|
|
206
|
+
//#endregion
|
|
207
|
+
export { defaultContractOutputPath as _, ContractSourceDiagnosticSpan as a, ContractSourceProvider as c, FormatterConfig as d, PrismaNextConfig as f, TypeScriptContractSourceProvider as g, PslParserOptions as h, ContractSourceDiagnosticPosition as i, ContractSourceProviderBase as l, PslGrammar as m, ContractSourceContext as n, ContractSourceDiagnostics as o, PslContractSourceProvider as p, ContractSourceDiagnostic as r, ContractSourceFormat as s, ContractConfig as t, DEFAULT_CONTRACT_SOURCE_DIR as u, defineConfig as v, normalizeContractConfig as y };
|
|
208
|
+
//# sourceMappingURL=config-types-BTFT7QfJ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-types-BTFT7QfJ.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.d.mts"],"mappings":";;;;;;;;;;;UAOU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;;WAEP;;;;;;WAMA,OAAO,SAAS;;UAEjB;WACC;WACA,sBAAsB;WACtB,OAAO;;UAER;WACC;;WAEA,4BAA4B,oBAAoB;WAChD,wBAAwB;WACxB,aAAa;;WAEb,WAAW;WACX,yBAAyB;;WAEzB,oBAAoB;;;;;;;WAOpB;WACA,cAAc;WACd;;;;WAIA,iBAAiB,YAAY;WAC7B;aACE;aACA;;;;;;;;KAQR;UACK;;;;;;WAMC;WACA,OAAO,SAAS,0BAA0B,QAAQ,OAAO,UAAU;;;KAGzE;;UAEK;;WAEC,UAAU;;UAEX,kCAAkC;WACjC;WACA,gBAAgB;;UAEjB,yCAAyC;WACxC;;KAEN,yBAAyB,4BAA4B;;;;;;UAMhD;;;;;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;;;;;;;WAOZ;;;;;;;;;;;;;;;iBAeM,aAAa,mCAAmC,mCAAmC,QAAQ,iBAAiB,WAAW,aAAa,iBAAiB,WAAW;;;;;;;;iBAQhK,0BAA0B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { extname } from "pathe";
|
|
2
|
+
import { isDynamicPattern } from "tinyglobby";
|
|
3
|
+
//#region ../../../1-framework/1-core/config/dist/config-types.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Default *source* directory for the contract file the user authors at `init`
|
|
6
|
+
* time. Output artefacts colocate with source per the same rule path-bearing
|
|
7
|
+
* providers apply.
|
|
8
|
+
*/
|
|
9
|
+
const DEFAULT_CONTRACT_SOURCE_DIR = "src/prisma";
|
|
10
|
+
function normalizeContractConfig(contract) {
|
|
11
|
+
const inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;
|
|
12
|
+
return {
|
|
13
|
+
source: contract.source,
|
|
14
|
+
output: contract.output ?? inMemoryFallbackOutput
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds the ORM section of `prisma.config.ts`. The result nests under the
|
|
19
|
+
* `orm` key of the engine's `definePrismaConfig` — the marker lives on the envelope,
|
|
20
|
+
* not here. Structural validation happens in the config loader, which reports
|
|
21
|
+
* per-section diagnostics instead of failing the whole load.
|
|
22
|
+
*
|
|
23
|
+
* Normalization:
|
|
24
|
+
* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
|
|
25
|
+
* when missing (in-memory-only providers)
|
|
26
|
+
*
|
|
27
|
+
* @param config - Raw config input from user
|
|
28
|
+
* @returns Normalized config IR with defaults applied
|
|
29
|
+
*/
|
|
30
|
+
function defineConfig(config) {
|
|
31
|
+
if (config.contract) return {
|
|
32
|
+
...config,
|
|
33
|
+
contract: normalizeContractConfig(config.contract)
|
|
34
|
+
};
|
|
35
|
+
return config;
|
|
36
|
+
}
|
|
37
|
+
function staticPrefixDirectory(pattern) {
|
|
38
|
+
const staticSegments = [];
|
|
39
|
+
for (const segment of pattern.replaceAll("\\", "/").split("/")) {
|
|
40
|
+
if (isDynamicPattern(segment)) break;
|
|
41
|
+
staticSegments.push(segment);
|
|
42
|
+
}
|
|
43
|
+
return staticSegments.join("/");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Where `contract emit` writes the contract JSON for a config that names
|
|
47
|
+
* `contractPath` and sets no output: beside the contract file and named after
|
|
48
|
+
* it, or `contract.json` in the static prefix directory of a glob.
|
|
49
|
+
*/
|
|
50
|
+
function defaultContractOutputPath(contractPath) {
|
|
51
|
+
if (isDynamicPattern(contractPath)) {
|
|
52
|
+
const prefix = staticPrefixDirectory(contractPath);
|
|
53
|
+
return prefix.length === 0 ? "contract.json" : `${prefix}/contract.json`;
|
|
54
|
+
}
|
|
55
|
+
const extension = extname(contractPath);
|
|
56
|
+
return `${extension.length === 0 ? contractPath : contractPath.slice(0, -extension.length)}.json`;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { normalizeContractConfig as i, defaultContractOutputPath as n, defineConfig as r, DEFAULT_CONTRACT_SOURCE_DIR as t };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=config-types-D0mYyP62.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-types-D0mYyP62.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.mjs"],"sourcesContent":["import { extname } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\n//#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* Builds the ORM section of `prisma.config.ts`. The result nests under the\n* `orm` key of the engine's `definePrismaConfig` — the marker lives on the envelope,\n* not here. 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 {\n\t\t...config,\n\t\tcontract: normalizeContractConfig(config.contract)\n\t};\n\treturn config;\n}\n//#endregion\n//#region src/default-contract-output-path.ts\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\n/**\n* Where `contract emit` writes the contract JSON for a config that names\n* `contractPath` and sets no output: beside the contract file and named after\n* it, or `contract.json` in the static prefix directory of a glob.\n*/\nfunction defaultContractOutputPath(contractPath) {\n\tif (isDynamicPattern(contractPath)) {\n\t\tconst prefix = staticPrefixDirectory(contractPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst extension = extname(contractPath);\n\treturn `${extension.length === 0 ? contractPath : contractPath.slice(0, -extension.length)}.json`;\n}\n//#endregion\nexport { DEFAULT_CONTRACT_SOURCE_DIR, defaultContractOutputPath, defineConfig, normalizeContractConfig };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,8BAA8B;AACpC,SAAS,wBAAwB,UAAU;CAC1C,MAAM,yBAAyB,GAAG,4BAA4B;CAC9D,OAAO;EACN,QAAQ,SAAS;EACjB,QAAQ,SAAS,UAAU;CAC5B;AACD;;;;;;;;;;;;;;AAcA,SAAS,aAAa,QAAQ;CAC7B,IAAI,OAAO,UAAU,OAAO;EAC3B,GAAG;EACH,UAAU,wBAAwB,OAAO,QAAQ;CAClD;CACA,OAAO;AACR;AAGA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/D,IAAI,iBAAiB,OAAO,GAAG;EAC/B,eAAe,KAAK,OAAO;CAC5B;CACA,OAAO,eAAe,KAAK,GAAG;AAC/B;;;;;;AAMA,SAAS,0BAA0B,cAAc;CAChD,IAAI,iBAAiB,YAAY,GAAG;EACnC,MAAM,SAAS,sBAAsB,YAAY;EACjD,OAAO,OAAO,WAAW,IAAI,kBAAkB,GAAG,OAAO;CAC1D;CACA,MAAM,YAAY,QAAQ,YAAY;CACtC,OAAO,GAAG,UAAU,WAAW,IAAI,eAAe,aAAa,MAAM,GAAG,CAAC,UAAU,MAAM,EAAE;AAC5F"}
|
package/dist/config.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
|
|
3
|
-
export { CONFIG_FORMAT_VERSION, type ConfigSection, type ConfigValidationIssue, type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, collectConfigIssues, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
|
|
1
|
+
import { _ as defaultContractOutputPath, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as PrismaNextConfig, g as TypeScriptContractSourceProvider, h as PslParserOptions, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslGrammar, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR, v as defineConfig, y as normalizeContractConfig } from "./config-types-BTFT7QfJ.mjs";
|
|
2
|
+
export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type PrismaNextConfig, type PslContractSourceProvider, type PslGrammar, type PslParserOptions, type TypeScriptContractSourceProvider, defaultContractOutputPath, defineConfig, normalizeContractConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, collectConfigIssues, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };
|
|
1
|
+
import { i as normalizeContractConfig, n as defaultContractOutputPath, r as defineConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-D0mYyP62.mjs";
|
|
2
|
+
export { DEFAULT_CONTRACT_SOURCE_DIR, defaultContractOutputPath, defineConfig, normalizeContractConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export {
|
|
1
|
+
import { _ as defaultContractOutputPath, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as PrismaNextConfig, g as TypeScriptContractSourceProvider, h as PslParserOptions, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslGrammar, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR, v as defineConfig, y as normalizeContractConfig } from "./config-types-BTFT7QfJ.mjs";
|
|
2
|
+
export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type PrismaNextConfig, type PslContractSourceProvider, type PslGrammar, type PslParserOptions, type TypeScriptContractSourceProvider, defaultContractOutputPath, defineConfig, normalizeContractConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { i as normalizeContractConfig, n as defaultContractOutputPath, r as defineConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-D0mYyP62.mjs";
|
|
2
|
+
export { DEFAULT_CONTRACT_SOURCE_DIR, defaultContractOutputPath, defineConfig, normalizeContractConfig };
|
|
@@ -1,7 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
1
|
+
import { C as ContractToOneRelation, g as ContractModelBase, n as ApplicationDomain } from "./domain-envelope-CN721GnP-4huRt7Wc.mjs";
|
|
2
|
+
import { o as ParameterizedOutputTypesFunction } from "./types-GNXJ7xW2.mjs";
|
|
3
|
+
import { p as CodecLookupWithDescriptors } from "./codec-types-CPgEZoIq-BL9hisr8.mjs";
|
|
4
|
+
import { P as AuthoringTypeNamespace, d as AuthoringEntityTypeDescriptor, g as AuthoringFieldPresetDescriptor, h as AuthoringFieldNamespace, i as AuthoringArgumentDescriptor, p as AuthoringEntityTypeNamespace, u as AuthoringEntityContext } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
5
|
+
import { u as EncodedEnumMember } from "./authoring-CjwinhU5.mjs";
|
|
6
|
+
import { s as ColumnTypeDescriptor } from "./codec-B4ypaota.mjs";
|
|
4
7
|
//#region ../../../1-framework/2-authoring/contract/dist/index.d.mts
|
|
8
|
+
//#region src/authoring-argument-types.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* For each data type id, the TypeScript value a `value` argument of that data type takes (`argument`) and the type parameter it gives the constructor (`parameter`). A pack declares an entry for each data type it registers that arguments take, as `__dataTypeArguments` in its type.
|
|
11
|
+
*/
|
|
12
|
+
type DataTypeArgumentTypes = {
|
|
13
|
+
readonly [dataType: string]: {
|
|
14
|
+
readonly argument: unknown;
|
|
15
|
+
readonly parameter: unknown;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type NoDataTypeArgumentTypes = Record<never, never>;
|
|
19
|
+
type OptionalObjectArgumentKeys<Properties extends Record<string, AuthoringArgumentDescriptor>> = { readonly [K in keyof Properties]: Properties[K] extends {
|
|
20
|
+
readonly optional: true;
|
|
21
|
+
} ? K : never; }[keyof Properties];
|
|
22
|
+
type RequiredObjectArgumentKeys<Properties extends Record<string, AuthoringArgumentDescriptor>> = Exclude<keyof Properties, OptionalObjectArgumentKeys<Properties>>;
|
|
23
|
+
/**
|
|
24
|
+
* When every property is optional the result must be a plain weak type rather
|
|
25
|
+
* than `{} & { … }`: TypeScript's weak-type check rejects an object sharing
|
|
26
|
+
* none of the target's properties, but only when the target is weak — and an
|
|
27
|
+
* intersection with `{}` is not. The TS authoring surface runs no runtime
|
|
28
|
+
* argument validation, so this check is the only thing rejecting a foreign key
|
|
29
|
+
* such as `field.nanoid({ bogus: 1 })`.
|
|
30
|
+
*/
|
|
31
|
+
type ObjectArgumentType<Properties extends Record<string, AuthoringArgumentDescriptor>, ValueTypes extends DataTypeArgumentTypes = NoDataTypeArgumentTypes> = [RequiredObjectArgumentKeys<Properties>] extends [never] ? { readonly [K in OptionalObjectArgumentKeys<Properties>]?: ArgTypeFromDescriptor<Properties[K], ValueTypes>; } : { readonly [K in RequiredObjectArgumentKeys<Properties>]: ArgTypeFromDescriptor<Properties[K], ValueTypes>; } & { readonly [K in OptionalObjectArgumentKeys<Properties>]?: ArgTypeFromDescriptor<Properties[K], ValueTypes>; };
|
|
32
|
+
/** The TypeScript type of one argument. A `value` argument takes what `ValueTypes` declares for its data type, and nothing when no pack declares it. */
|
|
33
|
+
type ArgTypeFromDescriptor<Arg extends AuthoringArgumentDescriptor, ValueTypes extends DataTypeArgumentTypes = NoDataTypeArgumentTypes> = Arg extends {
|
|
34
|
+
readonly kind: 'value';
|
|
35
|
+
readonly dataType: infer DataType extends string;
|
|
36
|
+
} ? DataType extends keyof ValueTypes ? ValueTypes[DataType]['argument'] : never : Arg extends {
|
|
37
|
+
readonly kind: 'number';
|
|
38
|
+
} ? number : Arg extends {
|
|
39
|
+
readonly kind: 'option';
|
|
40
|
+
readonly values: infer Values extends readonly string[];
|
|
41
|
+
} ? Values[number] : Arg extends {
|
|
42
|
+
readonly kind: 'object';
|
|
43
|
+
readonly properties: infer Properties extends Record<string, AuthoringArgumentDescriptor>;
|
|
44
|
+
} ? ObjectArgumentType<Properties, ValueTypes> : never;
|
|
45
|
+
/**
|
|
46
|
+
* Recursive rewrite (not a mapped tuple type) so a descriptor marked `optional: true` gets an optional tuple slot (`(Type | undefined)?`), letting callers omit it and every optional arg after it, or pass `undefined` to skip it and still give a later one. Required args must precede optional args in a descriptor's `args` list — TypeScript rejects an optional tuple element followed by a required one, and the runtime (`validateAuthoringHelperArguments`'s `minimumArgs`) already treats an optional-before-required arg as effectively required.
|
|
47
|
+
*/
|
|
48
|
+
type TupleFromArgumentDescriptors<Args extends readonly AuthoringArgumentDescriptor[], ValueTypes extends DataTypeArgumentTypes = NoDataTypeArgumentTypes> = Args extends readonly [infer Head extends AuthoringArgumentDescriptor, ...infer Tail extends readonly AuthoringArgumentDescriptor[]] ? Head extends {
|
|
49
|
+
readonly optional: true;
|
|
50
|
+
} ? readonly [(ArgTypeFromDescriptor<Head, ValueTypes> | undefined)?, ...TupleFromArgumentDescriptors<Tail, ValueTypes>] : readonly [ArgTypeFromDescriptor<Head, ValueTypes>, ...TupleFromArgumentDescriptors<Tail, ValueTypes>] : readonly [];
|
|
51
|
+
type CanonicalArgument<Arg extends AuthoringArgumentDescriptor, Param, ValueTypes extends DataTypeArgumentTypes> = Arg extends {
|
|
52
|
+
readonly kind: 'value';
|
|
53
|
+
readonly dataType: infer DataType extends string;
|
|
54
|
+
} ? DataType extends keyof ValueTypes ? Param extends ValueTypes[DataType]['parameter'] | undefined ? Param : ValueTypes[DataType]['parameter'] | Extract<Param, undefined> : Param : Param;
|
|
55
|
+
/**
|
|
56
|
+
* The arguments of a call as the constructor receives them: each `value` argument as the canonical value of its data type, kept literal when the written value already is one, so `VarChar(255)` still gives `255` and `` Raw(sql`circle`) `` gives a `string`.
|
|
57
|
+
*/
|
|
58
|
+
type CanonicalArguments<Args extends readonly AuthoringArgumentDescriptor[], Params extends readonly unknown[], ValueTypes extends DataTypeArgumentTypes = NoDataTypeArgumentTypes> = { readonly [Index in keyof Params]: Index extends `${infer Position extends number}` ? Args[Position] extends (infer Arg extends AuthoringArgumentDescriptor) ? CanonicalArgument<Arg, Params[Index], ValueTypes> : Params[Index] : Params[Index]; };
|
|
59
|
+
type ResolveTemplateValue<Template, Args extends readonly unknown[]> = Template extends {
|
|
60
|
+
readonly kind: 'arg';
|
|
61
|
+
readonly index: infer Index extends number;
|
|
62
|
+
readonly path?: infer Path extends readonly string[] | undefined;
|
|
63
|
+
readonly default?: infer Default;
|
|
64
|
+
} ? ResolveTemplateArgValue<Args[Index], Path, Default, Args> : Template extends readonly unknown[] ? { readonly [K in keyof Template]: ResolveTemplateValue<Template[K], Args>; } : Template extends Record<string, unknown> ? { readonly [K in keyof Template]: ResolveTemplateValue<Template[K], Args>; } : Template;
|
|
65
|
+
type ResolveTemplatePathValue<Value, Path extends readonly string[] | undefined> = Path extends readonly [infer Segment extends string, ...infer Rest extends readonly string[]] ? Segment extends keyof NonNullable<Value> ? ResolveTemplatePathValue<NonNullable<Value>[Segment], Rest> : never : Value;
|
|
66
|
+
type ResolveTemplateDefaultValue<Value, Default, Args extends readonly unknown[]> = Default extends undefined ? Value : [Value] extends [never] ? ResolveTemplateValue<Default, Args> : undefined extends Value ? Exclude<Value, undefined> | ResolveTemplateValue<Default, Args> : Value;
|
|
67
|
+
type ResolveTemplateArgValue<Value, Path extends readonly string[] | undefined, Default, Args extends readonly unknown[]> = ResolveTemplateDefaultValue<ResolveTemplatePathValue<Value, Path>, Default, Args>;
|
|
68
|
+
//#endregion
|
|
5
69
|
//#region src/capability-registry.d.ts
|
|
6
70
|
type CapabilityMatrix = Readonly<Record<string, Readonly<Record<string, boolean>>>>;
|
|
7
71
|
/**
|
|
@@ -109,15 +173,13 @@ type MembersToNames<Members extends readonly EnumMember<string, unknown>[]> = {
|
|
|
109
173
|
type MembersAccessorMap<Members extends readonly EnumMember<string, unknown>[]> = { readonly [M in Members[number] as M['name']]: M['value']; };
|
|
110
174
|
declare const ENUM_TYPE_HANDLE_BRAND = "__prismaNextEnumTypeHandle__";
|
|
111
175
|
/** Authoring handle returned by `enumType()`. Generic over the ordered value tuple so `const Role = enumType(...)` retains literal types. */
|
|
112
|
-
interface EnumTypeHandle<Name extends string = string, Values extends readonly unknown[] = readonly unknown[], Names extends readonly string[] = readonly string[], MembersMap extends Record<string, unknown> = Record<string, unknown
|
|
176
|
+
interface EnumTypeHandle<Name extends string = string, Values extends readonly unknown[] = readonly unknown[], Names extends readonly string[] = readonly string[], MembersMap extends Record<string, unknown> = Record<string, unknown>, CodecId extends string = string> {
|
|
113
177
|
/** Internal brand for lowering-pipeline detection. */
|
|
114
178
|
readonly [ENUM_TYPE_HANDLE_BRAND]: true;
|
|
115
179
|
/** The enum's declared name (used as the key in domain `enum` / storage `valueSet`). */
|
|
116
180
|
readonly enumName: Name;
|
|
117
181
|
/** codecId from the codec passed to `enumType`. */
|
|
118
|
-
readonly codecId:
|
|
119
|
-
/** nativeType from the codec passed to `enumType`. */
|
|
120
|
-
readonly nativeType: string;
|
|
182
|
+
readonly codecId: CodecId;
|
|
121
183
|
/** Ordered member list for lowering (name + value pairs). */
|
|
122
184
|
readonly enumMembers: readonly {
|
|
123
185
|
readonly name: string;
|
|
@@ -162,22 +224,24 @@ type CodecInput<CodecTypes extends CodecTypeMap, Codec extends {
|
|
|
162
224
|
/**
|
|
163
225
|
* Declare a domain enum for use in TS-authoring contracts.
|
|
164
226
|
*
|
|
165
|
-
* - The codec is an explicit required argument — the `codecId`
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* output or a direct inline object).
|
|
227
|
+
* - The codec is an explicit required argument — the `codecId` is taken
|
|
228
|
+
* from the passed `ColumnTypeDescriptor` (e.g. `{ codecId: 'pg/text@1' }`
|
|
229
|
+
* from a field preset output or a direct inline object).
|
|
169
230
|
* - `const` generics on the members spread preserve the ordered literal
|
|
170
231
|
* value tuple so `Role.values` is `readonly ['user','admin']`, not
|
|
171
232
|
* `string[]`.
|
|
172
233
|
* - Well-formedness assertions at construction: non-empty member list;
|
|
173
|
-
* unique names;
|
|
234
|
+
* unique names; no two values equal by SameValueZero, the equality `has`,
|
|
235
|
+
* `nameOf` and `ordinalOf` use. The contract build also refuses two members
|
|
236
|
+
* that store the same value, because only the codec knows how a value is
|
|
237
|
+
* stored.
|
|
174
238
|
*
|
|
175
239
|
* The returned handle wires into `field.namedType(handle)` to set
|
|
176
240
|
* `valueSet` refs on both the domain field and the storage column.
|
|
177
241
|
*
|
|
178
242
|
* @example
|
|
179
243
|
* ```ts
|
|
180
|
-
* const Role = enumType('Role', { codecId: 'pg/text@1'
|
|
244
|
+
* const Role = enumType('Role', { codecId: 'pg/text@1' },
|
|
181
245
|
* member('User', 'user'),
|
|
182
246
|
* member('Admin', 'admin'),
|
|
183
247
|
* );
|
|
@@ -185,8 +249,8 @@ type CodecInput<CodecTypes extends CodecTypeMap, Codec extends {
|
|
|
185
249
|
* // Role.members.User → 'user'
|
|
186
250
|
* ```
|
|
187
251
|
*/
|
|
188
|
-
declare function enumType<CodecTypes extends CodecTypeMap = Record<string, never>, const Name extends string = string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId'
|
|
189
|
-
declare function enumType(name: string, codec: Pick<ColumnTypeDescriptor, 'codecId'
|
|
252
|
+
declare function enumType<CodecTypes extends CodecTypeMap = Record<string, never>, const Name extends string = string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId'> = Pick<ColumnTypeDescriptor, 'codecId'>, const Members extends readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>, ...EnumMember<string, CodecInput<CodecTypes, Codec>>[]] = readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>]>(name: Name, codec: Codec, ...members: Members): EnumTypeHandle<Name, MembersToValues<[...Members]>, MembersToNames<[...Members]>, MembersAccessorMap<[...Members]>, Codec['codecId']>;
|
|
253
|
+
declare function enumType(name: string, codec: Pick<ColumnTypeDescriptor, 'codecId'>, ...members: EnumMember<string, unknown>[]): EnumTypeHandle;
|
|
190
254
|
/**
|
|
191
255
|
* The signature of an `enumType` whose codec typemap is already bound — the
|
|
192
256
|
* shape a target-bound wrapper (e.g. `@internal/postgres/contract-builder`)
|
|
@@ -194,7 +258,7 @@ declare function enumType(name: string, codec: Pick<ColumnTypeDescriptor, 'codec
|
|
|
194
258
|
* from `CodecTypes`, while `Name`, `Codec`, and the member tuple still infer
|
|
195
259
|
* from the call.
|
|
196
260
|
*/
|
|
197
|
-
type BoundEnumType<CodecTypes extends CodecTypeMap> = <const Name extends string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId'
|
|
261
|
+
type BoundEnumType<CodecTypes extends CodecTypeMap> = <const Name extends string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId'>, const Members extends readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>, ...EnumMember<string, CodecInput<CodecTypes, Codec>>[]]>(name: Name, codec: Codec, ...members: Members) => EnumTypeHandle<Name, MembersToValues<[...Members]>, MembersToNames<[...Members]>, MembersAccessorMap<[...Members]>, Codec['codecId']>;
|
|
198
262
|
/**
|
|
199
263
|
* Bind `enumType` to a target's codec typemap. The returned function is the
|
|
200
264
|
* same runtime `enumType`, retyped so member values are constrained to the
|
|
@@ -209,5 +273,76 @@ declare function bindEnumType<CodecTypes extends CodecTypeMap>(): BoundEnumType<
|
|
|
209
273
|
*/
|
|
210
274
|
declare function isEnumTypeHandle(value: unknown): value is EnumTypeHandle;
|
|
211
275
|
//#endregion
|
|
212
|
-
|
|
276
|
+
//#region src/enum-members.d.ts
|
|
277
|
+
/**
|
|
278
|
+
* Each member of an `enumType` in the form its codec stores it, which is how the contract holds it. Throws the first problem `encodeEnumMembers` finds: `CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK` for a codec no pack provides, and `CONTRACT.ENUM_INVALID` for the others. `storedBy` names what stores the value in the family's terms, such as `the column`.
|
|
279
|
+
*/
|
|
280
|
+
declare function encodeEnumTypeMembers(handle: EnumTypeHandle, codecLookup: CodecLookupWithDescriptors, storedBy: string): readonly EncodedEnumMember[];
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region src/field-preset-helpers.d.ts
|
|
283
|
+
declare function assertSafeAuthoringHelperKey(key: string, path: readonly string[]): void;
|
|
284
|
+
/**
|
|
285
|
+
* Walks a field-preset namespace and produces the callable surface mirroring its tree shape. Each leaf descriptor becomes the helper `createLeafHelper` returns; nested namespaces recurse.
|
|
286
|
+
*/
|
|
287
|
+
declare function createFieldHelpersFromNamespace(namespace: AuthoringFieldNamespace, createLeafHelper: (options: {
|
|
288
|
+
readonly helperPath: string;
|
|
289
|
+
readonly descriptor: AuthoringFieldPresetDescriptor;
|
|
290
|
+
}) => (...rawArgs: readonly unknown[]) => unknown, path?: readonly string[]): Record<string, unknown>;
|
|
291
|
+
interface AuthoringNamespaceByKey {
|
|
292
|
+
readonly type: AuthoringTypeNamespace;
|
|
293
|
+
readonly field: AuthoringFieldNamespace;
|
|
294
|
+
readonly entityTypes: AuthoringEntityTypeNamespace;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Merges one authoring namespace (`type`, `field` or `entityTypes`) across the family, target and extension packs, in order. A duplicate helper path across packs throws.
|
|
298
|
+
*/
|
|
299
|
+
declare function composePackAuthoringNamespace<Key extends AuthoringNamespaceKey>(components: readonly {
|
|
300
|
+
readonly authoring?: { readonly [K in AuthoringNamespaceKey]?: unknown; };
|
|
301
|
+
}[], key: Key): AuthoringNamespaceByKey[Key];
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/pack-type-slots.d.ts
|
|
304
|
+
/** The parameterized output type function a pack declares in its metadata's type (`__parameterizedOutputTypes`), or `never` when it declares none. */
|
|
305
|
+
type ExtractParameterizedOutputTypesFromPack<Pack> = Pack extends {
|
|
306
|
+
readonly __parameterizedOutputTypes?: infer TypeFunction;
|
|
307
|
+
} ? Exclude<TypeFunction, undefined> extends (infer Defined extends ParameterizedOutputTypesFunction) ? Defined : never : never;
|
|
308
|
+
/** The `value` argument types a pack declares in its type (`__dataTypeArguments`), or none. */
|
|
309
|
+
type ExtractDataTypeArgumentTypesFromPack<Pack> = Pack extends {
|
|
310
|
+
readonly __dataTypeArguments?: infer Declared;
|
|
311
|
+
} ? Exclude<Declared, undefined> extends (infer Defined extends DataTypeArgumentTypes) ? Defined : Record<never, never> : Record<never, never>;
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/relation-nullability.d.ts
|
|
314
|
+
type ToOneRelationNullabilityContradiction = 'declared-optional' | 'declared-required';
|
|
315
|
+
type ToOneRelationNullability = {
|
|
316
|
+
readonly nullable: boolean;
|
|
317
|
+
readonly contradiction: ToOneRelationNullabilityContradiction | undefined;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* The one rule for whether a to-one relation may be absent. The side that holds the reference
|
|
321
|
+
* (in SQL, the foreign key) is nullable exactly when one of its local fields is; the other side
|
|
322
|
+
* is always nullable, because nothing in storage guarantees the related record exists. A
|
|
323
|
+
* declaration that disagrees is reported as a contradiction; `nullable` is always the derived
|
|
324
|
+
* value.
|
|
325
|
+
*/
|
|
326
|
+
declare function resolveToOneRelationNullable(input: {
|
|
327
|
+
readonly declaredNullable: boolean | undefined;
|
|
328
|
+
readonly localFieldNullability: readonly boolean[];
|
|
329
|
+
readonly ownsReference: boolean;
|
|
330
|
+
}): ToOneRelationNullability;
|
|
331
|
+
type LocalFieldNullabilityLookup = (input: {
|
|
332
|
+
readonly namespaceId: string;
|
|
333
|
+
readonly modelName: string;
|
|
334
|
+
readonly model: ContractModelBase;
|
|
335
|
+
readonly relation: ContractToOneRelation;
|
|
336
|
+
}) => {
|
|
337
|
+
readonly ownsReference: boolean;
|
|
338
|
+
readonly localFieldNullability: readonly boolean[];
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Fills in `nullable` on every same-space to-one relation that lacks it from the ownership and
|
|
342
|
+
* local-field nullability the lookup reports. A cross-space relation defaults to nullable.
|
|
343
|
+
* Relations that already carry the flag are left as they are.
|
|
344
|
+
*/
|
|
345
|
+
declare function withDerivedToOneRelationNullability<TDomain extends ApplicationDomain>(domain: TDomain, localFieldNullability: LocalFieldNullabilityLookup): TDomain;
|
|
346
|
+
//#endregion
|
|
347
|
+
export { type ArgTypeFromDescriptor, type AuthoringNamespaceKey, type BoundEnumType, type CanonicalArguments, type CapabilityMatrix, type CodecInput, type CodecTypeMap, type DataTypeArgumentTypes, ENUM_TYPE_HANDLE_BRAND, type EntityHelperFactoryOptions, type EntityHelperFunction, type EntityHelpersFromNamespace, type EnumMember, type EnumTypeHandle, type ExtractAuthoringNamespaceFromPack, type ExtractDataTypeArgumentTypesFromPack, type ExtractParameterizedOutputTypesFromPack, type ForeignKeyDefaultsState, type IndexDef, type LocalFieldNullabilityLookup, type MergeExtensionAuthoringNamespaces, type ObjectArgumentType, type OptionalObjectArgumentKeys, type ResolveTemplateValue, type ToOneRelationNullability, type ToOneRelationNullabilityContradiction, type TupleFromArgumentDescriptors, type UnionToIntersection, assertSafeAuthoringHelperKey, bindEnumType, composePackAuthoringNamespace, createEntityHelpersFromNamespace, createFieldHelpersFromNamespace, encodeEnumTypeMembers, enumType, isEnumTypeHandle, member, mergeCapabilityMatrices, resolveToOneRelationNullable, withDerivedToOneRelationNullability };
|
|
213
348
|
//# sourceMappingURL=contract-authoring.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-authoring.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/contract/dist/index.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract-authoring.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/contract/dist/index.d.mts"],"mappings":"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"}
|