@prisma/orm-framework 8.0.0-rc.2-dev.3 → 8.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/dist/{apply-specifier-default-control-policy-CAxiXxKg.d.mts → apply-specifier-default-control-policy-Dlz0iwnK.d.mts} +2 -2
- package/dist/apply-specifier-default-control-policy-Dlz0iwnK.d.mts.map +1 -0
- package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
- package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
- package/dist/authoring-CNUti739.mjs +764 -0
- package/dist/authoring-CNUti739.mjs.map +1 -0
- package/dist/authoring-CjwinhU5.d.mts +206 -0
- package/dist/authoring-CjwinhU5.d.mts.map +1 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts +515 -0
- package/dist/binder-D_4RBHbt-BJ6VKwEZ.d.mts.map +1 -0
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts → canonicalization-CyrrXGmj-CeKUkht1.d.mts} +3 -3
- package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts.map → canonicalization-CyrrXGmj-CeKUkht1.d.mts.map} +1 -1
- package/dist/{hashing-utils-DQgS3nOe.mjs → canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs} +23 -3
- package/dist/canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs.map +1 -0
- package/dist/{utils-DMAM0unR.mjs → canonicalize-json-ZPawceQR-Dua1VNEB.mjs} +2 -2
- package/dist/canonicalize-json-ZPawceQR-Dua1VNEB.mjs.map +1 -0
- package/dist/codec-B4ypaota.d.mts +289 -0
- package/dist/codec-B4ypaota.d.mts.map +1 -0
- package/dist/codec-Do8tfXqk.mjs +457 -0
- package/dist/codec-Do8tfXqk.mjs.map +1 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs +93 -0
- package/dist/codec-descriptor-D0oY-hgs-C5e11ola.mjs.map +1 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs +22 -0
- package/dist/codec-types-BXLUbk-Y-DpGfKGK0.mjs.map +1 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts +384 -0
- package/dist/codec-types-CPgEZoIq-BL9hisr8.d.mts.map +1 -0
- package/dist/{components-dZRz3T5y.mjs → components-BaV9iCkq.mjs} +34 -3
- package/dist/components-BaV9iCkq.mjs.map +1 -0
- package/dist/components-CRBcIta_.d.mts +86 -0
- package/dist/components-CRBcIta_.d.mts.map +1 -0
- package/dist/components.d.mts +19 -17
- package/dist/components.mjs +16 -12
- package/dist/components__authoring.d.mts +4 -3
- package/dist/components__authoring.mjs +3 -2
- package/dist/components__codec.d.mts +3 -3
- package/dist/components__codec.mjs +6 -4
- package/dist/components__components.d.mts +6 -4
- package/dist/components__components.mjs +4 -3
- package/dist/components__control.d.mts +5 -4
- package/dist/components__control.mjs +3 -2
- package/dist/components__emission.d.mts +4 -4
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__ir.d.mts +1 -1
- package/dist/components__ir.mjs +2 -1
- package/dist/components__psl-ast.d.mts +4 -4
- package/dist/components__psl-ast.mjs +2 -2
- package/dist/components__runtime.d.mts +3 -2
- package/dist/components__runtime.mjs +2 -2
- package/dist/components__utils.mjs +1 -1
- package/dist/{config-types-CW4PDwMC.d.mts → config-types-BTFT7QfJ.d.mts} +73 -41
- package/dist/config-types-BTFT7QfJ.d.mts.map +1 -0
- package/dist/config-types-D0mYyP62.mjs +61 -0
- package/dist/config-types-D0mYyP62.mjs.map +1 -0
- package/dist/config.d.mts +2 -3
- package/dist/config.mjs +2 -3
- package/dist/config__config-types.d.mts +2 -2
- package/dist/config__config-types.mjs +2 -2
- package/dist/contract-authoring.d.mts +152 -17
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +190 -9
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts → contract-types-DEIEpzU_-DvAVuBr5.d.mts} +14 -8
- package/dist/contract-types-DEIEpzU_-DvAVuBr5.d.mts.map +1 -0
- package/dist/{contract-validation-error-DEiWp_EI-CRwtUgRw.mjs → contract-validation-error-CAnTGhkt-DSnujRaK.mjs} +6 -3
- package/dist/contract-validation-error-CAnTGhkt-DSnujRaK.mjs.map +1 -0
- package/dist/{contract-validation-error-R7cMoK04.d.mts → contract-validation-error-D1QAeOh5.d.mts} +4 -2
- package/dist/contract-validation-error-D1QAeOh5.d.mts.map +1 -0
- package/dist/contract.d.mts +13 -12
- package/dist/contract.mjs +9 -9
- package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
- package/dist/contract__contract-validation-error.d.mts +1 -1
- package/dist/contract__contract-validation-error.mjs +1 -1
- package/dist/contract__default-namespace.mjs +1 -1
- package/dist/contract__enum-accessor.d.mts +2 -2
- package/dist/contract__enum-accessor.mjs +1 -1
- package/dist/contract__hashing-utils.d.mts +2 -2
- package/dist/contract__hashing-utils.mjs +2 -3
- package/dist/contract__hashing.d.mts +3 -3
- package/dist/contract__hashing.mjs +2 -2
- package/dist/contract__resolve-domain-model.d.mts +1 -1
- package/dist/contract__types.d.mts +5 -5
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validate-domain.d.mts +1 -1
- package/dist/contract__validate-domain.mjs +1 -1
- package/dist/contract__validate-once.d.mts +2 -0
- package/dist/contract__validate-once.mjs +2 -0
- package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts → control-B5ezUWD2-BIAYxeSk.d.mts} +34 -6
- package/dist/control-B5ezUWD2-BIAYxeSk.d.mts.map +1 -0
- package/dist/{control-DLEm6u5m.mjs → control-DMJqhnwU.mjs} +309 -36
- package/dist/control-DMJqhnwU.mjs.map +1 -0
- package/dist/control-DrDTlxCS.d.mts +1 -0
- package/dist/{control-BD96JZi8-NUhO5Kkw.mjs → control-KsXr4fYD-D2Ows0NI.mjs} +70 -24
- package/dist/control-KsXr4fYD-D2Ows0NI.mjs.map +1 -0
- package/dist/{control-BF8qzdnM.d.mts → control-s5ECUABR.d.mts} +635 -156
- package/dist/control-s5ECUABR.d.mts.map +1 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs +275 -0
- package/dist/data-type-V6mcDhcG-DVQAPOQT.mjs.map +1 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs +459 -0
- package/dist/declarations-BgUAq1RG-Dz_-EI1Q.mjs.map +1 -0
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs → default-namespace-D4vCwkXg-BEZbN38y.mjs} +2 -2
- package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs.map → default-namespace-D4vCwkXg-BEZbN38y.mjs.map} +1 -1
- package/dist/{dist-Dqbo77p7.mjs → dist-D1f6xr7F.mjs} +51 -24
- package/dist/dist-D1f6xr7F.mjs.map +1 -0
- package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts → domain-envelope-CN721GnP-4huRt7Wc.d.mts} +27 -13
- package/dist/domain-envelope-CN721GnP-4huRt7Wc.d.mts.map +1 -0
- package/dist/emission-BtJvV97M.d.mts +2 -0
- package/dist/{emission-types-DLXP34Ki-CFms3VrX.d.mts → emission-types-B-jKEbjI-D7BW8Gk1.d.mts} +17 -16
- package/dist/emission-types-B-jKEbjI-D7BW8Gk1.d.mts.map +1 -0
- package/dist/enum-accessor-2OZgavDX.d.mts +104 -0
- package/dist/enum-accessor-2OZgavDX.d.mts.map +1 -0
- package/dist/enum-accessor-B-A2wNok.mjs +122 -0
- package/dist/enum-accessor-B-A2wNok.mjs.map +1 -0
- package/dist/errors.d.mts +5 -4
- package/dist/errors.mjs +4 -4
- package/dist/errors__control.d.mts +3 -2
- package/dist/errors__control.mjs +2 -2
- package/dist/errors__execution.d.mts +2 -2
- package/dist/errors__execution.mjs +2 -2
- package/dist/errors__migration.d.mts +2 -2
- package/dist/errors__migration.mjs +2 -2
- package/dist/execution-CjX5CCTb.d.mts +76 -0
- package/dist/execution-CjX5CCTb.d.mts.map +1 -0
- package/dist/{execution-CSnQT8EX.d.mts → execution-lMPVFj5o.d.mts} +2 -2
- package/dist/{execution-CSnQT8EX.d.mts.map → execution-lMPVFj5o.d.mts.map} +1 -1
- package/dist/execution-vfY4d-SZ.mjs +138 -0
- package/dist/execution-vfY4d-SZ.mjs.map +1 -0
- package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs → expressions-CMQzbnHk-BL2zN0Iv.mjs} +199 -350
- package/dist/expressions-CMQzbnHk-BL2zN0Iv.mjs.map +1 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts +1096 -0
- package/dist/framework-authoring-DDxddXZm-uZYdhoE0.d.mts.map +1 -0
- package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts → framework-components-DKoQnPdB-lax1COaf.d.mts} +28 -91
- package/dist/framework-components-DKoQnPdB-lax1COaf.d.mts.map +1 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs +271 -0
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map +1 -0
- package/dist/{hash-content-DwEUh-Rx.d.mts → hash-content-Bde14N2-.d.mts} +2 -2
- package/dist/{hash-content-DwEUh-Rx.d.mts.map → hash-content-Bde14N2-.d.mts.map} +1 -1
- package/dist/{hash-content-Bugg_nZn.mjs → hash-content-Bdl-HSfq.mjs} +2 -2
- package/dist/hash-content-Bdl-HSfq.mjs.map +1 -0
- package/dist/{hashing-BtIZVNYX.mjs → hashing-CLRfNAxh.mjs} +28 -9
- package/dist/hashing-CLRfNAxh.mjs.map +1 -0
- package/dist/hashing-D-DHz0zl.d.mts +36 -0
- package/dist/hashing-D-DHz0zl.d.mts.map +1 -0
- package/dist/{hashing-utils-qKu59RSC.d.mts → hashing-utils-DiGHKd3b.d.mts} +4 -3
- package/dist/{hashing-utils-qKu59RSC.d.mts.map → hashing-utils-DiGHKd3b.d.mts.map} +1 -1
- package/dist/ids.d.mts +90 -13
- package/dist/ids.d.mts.map +1 -1
- package/dist/ids.mjs +45 -59
- package/dist/ids.mjs.map +1 -1
- package/dist/ids__runtime.d.mts +1 -1
- package/dist/ids__runtime.mjs +1 -1
- package/dist/{index-CDk9yEbw.d.mts → index-MU-ksXsh.d.mts} +23 -6
- package/dist/index-MU-ksXsh.d.mts.map +1 -0
- package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
- package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
- package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
- package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
- package/dist/{ir-BvE7L9FK.d.mts → ir-LV4tXsw3.d.mts} +6 -5
- package/dist/{ir-BvE7L9FK.d.mts.map → ir-LV4tXsw3.d.mts.map} +1 -1
- package/dist/{ir-ChmSSAhX.mjs → ir-uDGU9vaj.mjs} +7 -53
- package/dist/ir-uDGU9vaj.mjs.map +1 -0
- package/dist/{migration-BvrgDZXw.d.mts → migration-Dluwnqe9.d.mts} +20 -3
- package/dist/migration-Dluwnqe9.d.mts.map +1 -0
- package/dist/{migration-C57VKLUY.mjs → migration-uC-bSKA4.mjs} +30 -4
- package/dist/migration-uC-bSKA4.mjs.map +1 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
- package/dist/operations.mjs +1 -1
- package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-bZgfjovA-BNgYhylT.mjs} +311 -55
- package/dist/parse-bZgfjovA-BNgYhylT.mjs.map +1 -0
- package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts → parse-djL5wker-B610mXG4.d.mts} +181 -52
- package/dist/parse-djL5wker-B610mXG4.d.mts.map +1 -0
- package/dist/psl-ast-COcYtLlz.d.mts +2 -0
- package/dist/psl-ast-CyvE6CR-.mjs +116 -0
- package/dist/psl-ast-CyvE6CR-.mjs.map +1 -0
- package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts → psl-ast-rY25o3Ze-ClLY3CYt.d.mts} +10 -40
- package/dist/psl-ast-rY25o3Ze-ClLY3CYt.d.mts.map +1 -0
- package/dist/psl-parser.d.mts +415 -101
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +2451 -537
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +8 -2
- package/dist/psl-parser__format.d.mts.map +1 -1
- package/dist/psl-parser__format.mjs +65 -34
- package/dist/psl-parser__format.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +98 -10
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +393 -2
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +3 -3
- package/dist/psl-parser__syntax.mjs +4 -43
- package/dist/psl-parser__tokenizer.d.mts +1 -1
- package/dist/psl-parser__tokenizer.mjs +1 -1
- package/dist/psl-printer.d.mts +7 -17
- package/dist/psl-printer.d.mts.map +1 -1
- package/dist/psl-printer.mjs +35 -104
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs +74 -0
- package/dist/resolve-codec-qqMjZrmn-Cok8elAo.mjs.map +1 -0
- package/dist/{resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts → resolve-domain-model-BNr1glea-BLuR-phK.d.mts} +3 -3
- package/dist/resolve-domain-model-BNr1glea-BLuR-phK.d.mts.map +1 -0
- package/dist/{result-CBZ8X9mU.mjs → result-8OXF26MN.mjs} +14 -3
- package/dist/{result-CBZ8X9mU.mjs.map → result-8OXF26MN.mjs.map} +1 -1
- package/dist/{result-Bpupv5vO.d.mts → result-BYCOANWy.d.mts} +4 -2
- package/dist/result-BYCOANWy.d.mts.map +1 -0
- package/dist/runtime-B-YYuWy2.d.mts +899 -0
- package/dist/runtime-B-YYuWy2.d.mts.map +1 -0
- package/dist/runtime-DSYSc98Y.mjs +1059 -0
- package/dist/runtime-DSYSc98Y.mjs.map +1 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts +19 -0
- package/dist/runtime-error-CO4MA3Px-YW5SCUcH.d.mts.map +1 -0
- package/dist/{structured-error-CgiSMpdU.mjs → structured-error-BXbihKQ-.mjs} +3 -3
- package/dist/{structured-error-CgiSMpdU.mjs.map → structured-error-BXbihKQ-.mjs.map} +1 -1
- package/dist/{structured-error-BsNT4Hun.d.mts → structured-error-Cc7AIRsp.d.mts} +19 -5
- package/dist/structured-error-Cc7AIRsp.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
- package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
- package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs +1276 -0
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs.map +1 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts +258 -0
- package/dist/temporal-presets-BuMqk7h8-DZSuu4Z_.d.mts.map +1 -0
- package/dist/text-C3TTEtgd.mjs +35 -0
- package/dist/text-C3TTEtgd.mjs.map +1 -0
- package/dist/text-C8_-rheN.d.mts +15 -0
- package/dist/text-C8_-rheN.d.mts.map +1 -0
- package/dist/{tokenizer-1hAHZzmp-QGPORvmA.mjs → tokenizer-C-GTKKjR-B1vOzJy0.mjs} +54 -10
- package/dist/tokenizer-C-GTKKjR-B1vOzJy0.mjs.map +1 -0
- package/dist/{tokenizer-DcYI0Xrq-C-nNE9mE.d.mts → tokenizer-i8RaVWVa-7fRwlCPP.d.mts} +9 -4
- package/dist/tokenizer-i8RaVWVa-7fRwlCPP.d.mts.map +1 -0
- package/dist/ts-render.d.mts +2 -2
- package/dist/ts-render.mjs +2 -2
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs +261 -0
- package/dist/type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs.map +1 -0
- package/dist/{types-BnH4zYvN.mjs → types-B8ULzMAX.mjs} +36 -3
- package/dist/types-B8ULzMAX.mjs.map +1 -0
- package/dist/types-GNXJ7xW2.d.mts +131 -0
- package/dist/types-GNXJ7xW2.d.mts.map +1 -0
- package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts → types-import-spec-DQjfX-gM-zVncuzs0.d.mts} +6 -6
- package/dist/types-import-spec-DQjfX-gM-zVncuzs0.d.mts.map +1 -0
- package/dist/utils.d.mts +7 -5
- package/dist/utils.mjs +9 -7
- package/dist/utils__assertions.mjs +1 -1
- package/dist/utils__hash-content.d.mts +1 -1
- package/dist/utils__hash-content.mjs +1 -1
- package/dist/utils__internal-error.d.mts +1 -1
- package/dist/utils__internal-error.mjs +1 -1
- package/dist/utils__result.d.mts +2 -2
- package/dist/utils__result.mjs +2 -2
- package/dist/utils__structured-error.d.mts +2 -2
- package/dist/utils__structured-error.mjs +1 -1
- package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
- package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
- package/dist/utils__text.d.mts +2 -0
- package/dist/utils__text.mjs +2 -0
- package/dist/{validate-domain-BNBs-TVv.d.mts → validate-domain-B5kmlBFB.d.mts} +10 -6
- package/dist/validate-domain-B5kmlBFB.d.mts.map +1 -0
- package/dist/{validate-domain-BkvFlY3B.mjs → validate-domain-CbXHDYpF.mjs} +43 -22
- package/dist/validate-domain-CbXHDYpF.mjs.map +1 -0
- package/dist/validate-once-D-IwXHYP.mjs +42 -0
- package/dist/validate-once-D-IwXHYP.mjs.map +1 -0
- package/dist/validate-once-gfCOHsDh.d.mts +16 -0
- package/dist/validate-once-gfCOHsDh.d.mts.map +1 -0
- package/package.json +24 -20
- package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +0 -1
- package/dist/authoring-B2H-9qCv.d.mts +0 -1
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +0 -25
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +0 -1
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs +0 -120
- package/dist/capabilities-BCEONw9w-C-lo3rF8.mjs.map +0 -1
- package/dist/codec-Cd0QcxAx.mjs +0 -63
- package/dist/codec-Cd0QcxAx.mjs.map +0 -1
- package/dist/codec-Ce07W3Mz.d.mts +0 -112
- package/dist/codec-Ce07W3Mz.d.mts.map +0 -1
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts +0 -223
- package/dist/codec-types-D6VRj2RE-BLElXc-O.d.mts.map +0 -1
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs +0 -30
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs.map +0 -1
- package/dist/components-CGA_WwEG.d.mts +0 -50
- package/dist/components-CGA_WwEG.d.mts.map +0 -1
- package/dist/components-dZRz3T5y.mjs.map +0 -1
- package/dist/config-types-BqhNxw0z.mjs +0 -67
- package/dist/config-types-BqhNxw0z.mjs.map +0 -1
- package/dist/config-types-CW4PDwMC.d.mts.map +0 -1
- package/dist/config-validation-DPt5hwQx.mjs +0 -168
- package/dist/config-validation-DPt5hwQx.mjs.map +0 -1
- package/dist/config-validation-Wiqew2J9.d.mts +0 -21
- package/dist/config-validation-Wiqew2J9.d.mts.map +0 -1
- package/dist/config__config-validation.d.mts +0 -2
- package/dist/config__config-validation.mjs +0 -2
- package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +0 -1
- package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +0 -1
- package/dist/contract-validation-error-R7cMoK04.d.mts.map +0 -1
- package/dist/control-BD96JZi8-NUhO5Kkw.mjs.map +0 -1
- package/dist/control-BF8qzdnM.d.mts.map +0 -1
- package/dist/control-DLEm6u5m.mjs.map +0 -1
- package/dist/control-ql9N9u4f-r3Vv41kZ.d.mts.map +0 -1
- package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +0 -1
- package/dist/dist-Dqbo77p7.mjs.map +0 -1
- package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +0 -1
- package/dist/emission-CmUO03gQ.d.mts +0 -2
- package/dist/emission-types-DLXP34Ki-CFms3VrX.d.mts.map +0 -1
- package/dist/enum-accessor-Db5DaTNX.mjs +0 -35
- package/dist/enum-accessor-Db5DaTNX.mjs.map +0 -1
- package/dist/enum-accessor-PH5vjghI.d.mts +0 -85
- package/dist/enum-accessor-PH5vjghI.d.mts.map +0 -1
- package/dist/execution-Crk6IfTs.mjs +0 -218
- package/dist/execution-Crk6IfTs.mjs.map +0 -1
- package/dist/execution-Cyl2dXxX.d.mts +0 -115
- package/dist/execution-Cyl2dXxX.d.mts.map +0 -1
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts +0 -777
- package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts.map +0 -1
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs +0 -698
- package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs.map +0 -1
- package/dist/framework-components-hZ2tO-KH-CdRXBOYd.d.mts.map +0 -1
- package/dist/hash-content-Bugg_nZn.mjs.map +0 -1
- package/dist/hashing-BtIZVNYX.mjs.map +0 -1
- package/dist/hashing-CccSPELN.d.mts +0 -25
- package/dist/hashing-CccSPELN.d.mts.map +0 -1
- package/dist/hashing-utils-DQgS3nOe.mjs.map +0 -1
- package/dist/index-CDk9yEbw.d.mts.map +0 -1
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
- package/dist/ir-ChmSSAhX.mjs.map +0 -1
- package/dist/migration-BvrgDZXw.d.mts.map +0 -1
- package/dist/migration-C57VKLUY.mjs.map +0 -1
- package/dist/parse-0ZJjj_2N-DhQpSVmQ.d.mts.map +0 -1
- package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +0 -1
- package/dist/psl-ast-BXZoFQBk.d.mts +0 -37
- package/dist/psl-ast-BXZoFQBk.d.mts.map +0 -1
- package/dist/psl-ast-CWJQF8LA-Vr5JNPdn.d.mts.map +0 -1
- package/dist/psl-ast-DUCvVXbB.mjs +0 -239
- package/dist/psl-ast-DUCvVXbB.mjs.map +0 -1
- package/dist/psl-parser__syntax.mjs.map +0 -1
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +0 -59
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +0 -1
- package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +0 -1
- package/dist/result-Bpupv5vO.d.mts.map +0 -1
- package/dist/runtime-BqzioOmU.mjs +0 -670
- package/dist/runtime-BqzioOmU.mjs.map +0 -1
- package/dist/runtime-Cuxw8obj.d.mts +0 -1038
- package/dist/runtime-Cuxw8obj.d.mts.map +0 -1
- package/dist/structured-error-BsNT4Hun.d.mts.map +0 -1
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts +0 -125
- package/dist/symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map +0 -1
- package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +0 -1
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +0 -1
- package/dist/types-BnH4zYvN.mjs.map +0 -1
- package/dist/types-ByeQhU9p.d.mts +0 -17
- package/dist/types-ByeQhU9p.d.mts.map +0 -1
- package/dist/types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map +0 -1
- package/dist/utils-DMAM0unR.mjs.map +0 -1
- package/dist/validate-domain-BNBs-TVv.d.mts.map +0 -1
- package/dist/validate-domain-BkvFlY3B.mjs.map +0 -1
|
@@ -1,5 +1,361 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
2
|
+
import { n as notOk } from "./result-8OXF26MN.mjs";
|
|
3
|
+
import { u as dataTypeId } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
4
|
+
import { O as isAuthoringPslBlockDescriptor, Y as validateAuthoringHelperArguments, b as instantiateAuthoringFieldPreset } from "./temporal-presets-5TK1pTYJ-DmhrnMP1.mjs";
|
|
5
|
+
import { l as nodePslSpan, n as readExpressionAs, o as diagnosticSource, r as reportTypeConstructorNotCalled, s as keywordPslSpan, t as isBareTypeConstructor } from "./type-constructor-calls-BLf-HsFy-D_jbIqj8.mjs";
|
|
2
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs
|
|
7
|
+
function unquoteStringLiteral(value) {
|
|
8
|
+
const trimmed = value.trim();
|
|
9
|
+
const match = trimmed.match(/^(['"])(.*)\1$/);
|
|
10
|
+
if (!match) return trimmed;
|
|
11
|
+
return match[2] ?? "";
|
|
12
|
+
}
|
|
13
|
+
const INVALID_AUTHORING_ARGUMENT = Symbol("invalidAuthoringArgument");
|
|
14
|
+
function isIdentifierStartCharacter(character) {
|
|
15
|
+
return character !== void 0 && /[A-Za-z_$]/.test(character);
|
|
16
|
+
}
|
|
17
|
+
function isIdentifierCharacter(character) {
|
|
18
|
+
return character !== void 0 && /[A-Za-z0-9_$]/.test(character);
|
|
19
|
+
}
|
|
20
|
+
function parseJsLikeLiteral(value) {
|
|
21
|
+
let index = 0;
|
|
22
|
+
function skipWhitespace() {
|
|
23
|
+
while (/\s/.test(value[index] ?? "")) index += 1;
|
|
24
|
+
}
|
|
25
|
+
function parseIdentifier() {
|
|
26
|
+
const first = value[index];
|
|
27
|
+
if (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;
|
|
28
|
+
let end = index + 1;
|
|
29
|
+
while (isIdentifierCharacter(value[end])) end += 1;
|
|
30
|
+
const identifier = value.slice(index, end);
|
|
31
|
+
index = end;
|
|
32
|
+
return identifier;
|
|
33
|
+
}
|
|
34
|
+
function parseString() {
|
|
35
|
+
const quote = value[index];
|
|
36
|
+
if (quote !== "\"" && quote !== "'") return INVALID_AUTHORING_ARGUMENT;
|
|
37
|
+
index += 1;
|
|
38
|
+
let result = "";
|
|
39
|
+
while (index < value.length) {
|
|
40
|
+
const character = value[index];
|
|
41
|
+
index += 1;
|
|
42
|
+
if (character === void 0) return INVALID_AUTHORING_ARGUMENT;
|
|
43
|
+
if (character === quote) return result;
|
|
44
|
+
if (character !== "\\") {
|
|
45
|
+
result += character;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const escaped = value[index];
|
|
49
|
+
index += 1;
|
|
50
|
+
if (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;
|
|
51
|
+
switch (escaped) {
|
|
52
|
+
case "'":
|
|
53
|
+
case "\"":
|
|
54
|
+
case "\\":
|
|
55
|
+
case "/":
|
|
56
|
+
result += escaped;
|
|
57
|
+
break;
|
|
58
|
+
case "b":
|
|
59
|
+
result += "\b";
|
|
60
|
+
break;
|
|
61
|
+
case "f":
|
|
62
|
+
result += "\f";
|
|
63
|
+
break;
|
|
64
|
+
case "n":
|
|
65
|
+
result += "\n";
|
|
66
|
+
break;
|
|
67
|
+
case "r":
|
|
68
|
+
result += "\r";
|
|
69
|
+
break;
|
|
70
|
+
case "t":
|
|
71
|
+
result += " ";
|
|
72
|
+
break;
|
|
73
|
+
case "u": {
|
|
74
|
+
const hex = value.slice(index, index + 4);
|
|
75
|
+
if (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;
|
|
76
|
+
result += String.fromCharCode(Number.parseInt(hex, 16));
|
|
77
|
+
index += 4;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
default: return INVALID_AUTHORING_ARGUMENT;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
84
|
+
}
|
|
85
|
+
function parseNumber() {
|
|
86
|
+
const raw = value.slice(index).match(/^[+-]?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/)?.[0];
|
|
87
|
+
if (!raw) return INVALID_AUTHORING_ARGUMENT;
|
|
88
|
+
const parsed = Number(raw);
|
|
89
|
+
if (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;
|
|
90
|
+
index += raw.length;
|
|
91
|
+
return parsed;
|
|
92
|
+
}
|
|
93
|
+
function parseArray() {
|
|
94
|
+
if (value[index] !== "[") return INVALID_AUTHORING_ARGUMENT;
|
|
95
|
+
index += 1;
|
|
96
|
+
const result = [];
|
|
97
|
+
skipWhitespace();
|
|
98
|
+
if (value[index] === "]") {
|
|
99
|
+
index += 1;
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
while (index < value.length) {
|
|
103
|
+
const entry = parseValue();
|
|
104
|
+
if (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
105
|
+
result.push(entry);
|
|
106
|
+
skipWhitespace();
|
|
107
|
+
if (value[index] === ",") {
|
|
108
|
+
index += 1;
|
|
109
|
+
skipWhitespace();
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (value[index] === "]") {
|
|
113
|
+
index += 1;
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
117
|
+
}
|
|
118
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
119
|
+
}
|
|
120
|
+
function parseObject() {
|
|
121
|
+
if (value[index] !== "{") return INVALID_AUTHORING_ARGUMENT;
|
|
122
|
+
index += 1;
|
|
123
|
+
const result = {};
|
|
124
|
+
skipWhitespace();
|
|
125
|
+
if (value[index] === "}") {
|
|
126
|
+
index += 1;
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
while (index < value.length) {
|
|
130
|
+
skipWhitespace();
|
|
131
|
+
const key = value[index] === "\"" || value[index] === "'" ? parseString() : parseIdentifier();
|
|
132
|
+
if (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
133
|
+
skipWhitespace();
|
|
134
|
+
if (value[index] !== ":") return INVALID_AUTHORING_ARGUMENT;
|
|
135
|
+
index += 1;
|
|
136
|
+
const entry = parseValue();
|
|
137
|
+
if (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
138
|
+
result[key] = entry;
|
|
139
|
+
skipWhitespace();
|
|
140
|
+
if (value[index] === ",") {
|
|
141
|
+
index += 1;
|
|
142
|
+
skipWhitespace();
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (value[index] === "}") {
|
|
146
|
+
index += 1;
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
150
|
+
}
|
|
151
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
152
|
+
}
|
|
153
|
+
function parseValue() {
|
|
154
|
+
skipWhitespace();
|
|
155
|
+
const character = value[index];
|
|
156
|
+
if (character === "{") return parseObject();
|
|
157
|
+
if (character === "[") return parseArray();
|
|
158
|
+
if (character === "\"" || character === "'") return parseString();
|
|
159
|
+
if (character === "-" || character === "+" || /\d/.test(character ?? "")) return parseNumber();
|
|
160
|
+
const identifier = parseIdentifier();
|
|
161
|
+
if (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
162
|
+
if (identifier === "true") return true;
|
|
163
|
+
if (identifier === "false") return false;
|
|
164
|
+
if (identifier === "null") return null;
|
|
165
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
166
|
+
}
|
|
167
|
+
skipWhitespace();
|
|
168
|
+
const parsed = parseValue();
|
|
169
|
+
if (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;
|
|
170
|
+
skipWhitespace();
|
|
171
|
+
return index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;
|
|
172
|
+
}
|
|
173
|
+
function isPlainObject(value) {
|
|
174
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
175
|
+
}
|
|
176
|
+
function parsePslObjectLiteral(value) {
|
|
177
|
+
const trimmed = value.trim();
|
|
178
|
+
if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return INVALID_AUTHORING_ARGUMENT;
|
|
179
|
+
let parsed;
|
|
180
|
+
try {
|
|
181
|
+
parsed = JSON.parse(trimmed);
|
|
182
|
+
} catch {
|
|
183
|
+
parsed = parseJsLikeLiteral(trimmed);
|
|
184
|
+
if (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
185
|
+
}
|
|
186
|
+
if (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;
|
|
187
|
+
return parsed;
|
|
188
|
+
}
|
|
189
|
+
function parsePslAuthoringArgumentText(descriptor, rawValue) {
|
|
190
|
+
switch (descriptor.kind) {
|
|
191
|
+
case "number": {
|
|
192
|
+
const parsed = Number(unquoteStringLiteral(rawValue));
|
|
193
|
+
return Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;
|
|
194
|
+
}
|
|
195
|
+
case "object": return parsePslObjectLiteral(rawValue);
|
|
196
|
+
case "option": {
|
|
197
|
+
const trimmed = rawValue.trim();
|
|
198
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;
|
|
199
|
+
}
|
|
200
|
+
default: return INVALID_AUTHORING_ARGUMENT;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function pushInvalidPslHelperArgument(input) {
|
|
204
|
+
input.diagnostics.push({
|
|
205
|
+
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
206
|
+
message: `${input.entityLabel} ${input.helperLabel} ${input.message}`,
|
|
207
|
+
...input.source.at(input.span)
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The value of one argument as `descriptor` reads it: a `value` argument as a value of its data type, read from its expression as attribute arguments are, and any other kind from its text. A refusal is pushed as a diagnostic at the argument.
|
|
212
|
+
*/
|
|
213
|
+
function readPslHelperArgument(input, descriptor, argument, argumentLabel) {
|
|
214
|
+
const invalid = () => {
|
|
215
|
+
pushInvalidPslHelperArgument({
|
|
216
|
+
diagnostics: input.diagnostics,
|
|
217
|
+
source: input.source,
|
|
218
|
+
span: argument.span,
|
|
219
|
+
entityLabel: input.entityLabel,
|
|
220
|
+
helperLabel: input.helperLabel,
|
|
221
|
+
message: `cannot parse ${argumentLabel} for descriptor kind "${descriptor.kind}".`
|
|
222
|
+
});
|
|
223
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
224
|
+
};
|
|
225
|
+
if (descriptor.kind !== "value") {
|
|
226
|
+
const value = parsePslAuthoringArgumentText(descriptor, argument.value);
|
|
227
|
+
return value === INVALID_AUTHORING_ARGUMENT ? invalid() : value;
|
|
228
|
+
}
|
|
229
|
+
const { expression } = argument;
|
|
230
|
+
if (expression === void 0 && argument.node !== void 0) {
|
|
231
|
+
pushInvalidPslHelperArgument({
|
|
232
|
+
diagnostics: input.diagnostics,
|
|
233
|
+
source: input.source,
|
|
234
|
+
span: argument.span,
|
|
235
|
+
entityLabel: input.entityLabel,
|
|
236
|
+
helperLabel: input.helperLabel,
|
|
237
|
+
message: `${argumentLabel} has no value.`
|
|
238
|
+
});
|
|
239
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
240
|
+
}
|
|
241
|
+
if (expression === void 0) throw new InternalError(`${input.entityLabel} ${input.helperLabel} received ${argumentLabel} with no expression. A value argument is read from the expression a schema writes; a reader that builds a call must pass the arguments it parsed, or instantiate the constructor with values.`);
|
|
242
|
+
const read = readExpressionAs(input.dataTypes, dataTypeId(descriptor.dataType), expression);
|
|
243
|
+
if (read.ok) return read.value.value;
|
|
244
|
+
input.diagnostics.push({
|
|
245
|
+
code: read.failure.code,
|
|
246
|
+
message: read.failure.message,
|
|
247
|
+
...input.source.at(nodePslSpan(expression.syntax, input.source.sources))
|
|
248
|
+
});
|
|
249
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* The arguments of a type constructor or field preset call, positional and named, each read as its descriptor says. `undefined`, with a diagnostic pushed, when one cannot be read or does not match a descriptor.
|
|
253
|
+
*/
|
|
254
|
+
function mapPslHelperArgs(input) {
|
|
255
|
+
const mappedArgs = input.descriptors.map(() => void 0);
|
|
256
|
+
const positionalArgs = input.args.filter((arg) => arg.kind === "positional");
|
|
257
|
+
const namedArgs = input.args.filter((arg) => arg.kind === "named");
|
|
258
|
+
if (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({
|
|
259
|
+
diagnostics: input.diagnostics,
|
|
260
|
+
source: input.source,
|
|
261
|
+
span: input.span,
|
|
262
|
+
entityLabel: input.entityLabel,
|
|
263
|
+
helperLabel: input.helperLabel,
|
|
264
|
+
message: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`
|
|
265
|
+
});
|
|
266
|
+
for (const [index, argument] of positionalArgs.entries()) {
|
|
267
|
+
const descriptor = input.descriptors[index];
|
|
268
|
+
if (!descriptor) return pushInvalidPslHelperArgument({
|
|
269
|
+
diagnostics: input.diagnostics,
|
|
270
|
+
source: input.source,
|
|
271
|
+
span: argument.span,
|
|
272
|
+
entityLabel: input.entityLabel,
|
|
273
|
+
helperLabel: input.helperLabel,
|
|
274
|
+
message: `does not define positional argument #${index + 1}.`
|
|
275
|
+
});
|
|
276
|
+
const value = readPslHelperArgument(input, descriptor, argument, `argument #${index + 1}`);
|
|
277
|
+
if (value === INVALID_AUTHORING_ARGUMENT) return void 0;
|
|
278
|
+
mappedArgs[index] = value;
|
|
279
|
+
}
|
|
280
|
+
for (const argument of namedArgs) {
|
|
281
|
+
const descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);
|
|
282
|
+
if (descriptorIndex < 0) return pushInvalidPslHelperArgument({
|
|
283
|
+
diagnostics: input.diagnostics,
|
|
284
|
+
source: input.source,
|
|
285
|
+
span: argument.span,
|
|
286
|
+
entityLabel: input.entityLabel,
|
|
287
|
+
helperLabel: input.helperLabel,
|
|
288
|
+
message: `received unknown named argument "${argument.name}".`
|
|
289
|
+
});
|
|
290
|
+
if (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({
|
|
291
|
+
diagnostics: input.diagnostics,
|
|
292
|
+
source: input.source,
|
|
293
|
+
span: argument.span,
|
|
294
|
+
entityLabel: input.entityLabel,
|
|
295
|
+
helperLabel: input.helperLabel,
|
|
296
|
+
message: `received duplicate value for argument "${argument.name}".`
|
|
297
|
+
});
|
|
298
|
+
const descriptor = input.descriptors[descriptorIndex];
|
|
299
|
+
if (!descriptor) return pushInvalidPslHelperArgument({
|
|
300
|
+
diagnostics: input.diagnostics,
|
|
301
|
+
source: input.source,
|
|
302
|
+
span: argument.span,
|
|
303
|
+
entityLabel: input.entityLabel,
|
|
304
|
+
helperLabel: input.helperLabel,
|
|
305
|
+
message: `does not define named argument "${argument.name}".`
|
|
306
|
+
});
|
|
307
|
+
const value = readPslHelperArgument(input, descriptor, argument, `named argument "${argument.name}"`);
|
|
308
|
+
if (value === INVALID_AUTHORING_ARGUMENT) return void 0;
|
|
309
|
+
mappedArgs[descriptorIndex] = value;
|
|
310
|
+
}
|
|
311
|
+
return mappedArgs;
|
|
312
|
+
}
|
|
313
|
+
function enumMemberAttributeDiagnostics(enumBlock, sources) {
|
|
314
|
+
const source = diagnosticSource(sources, enumBlock.node.syntax);
|
|
315
|
+
return enumBlock.entries.flatMap((member) => Array.from(member.attributes(), (attribute) => ({
|
|
316
|
+
code: "PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE",
|
|
317
|
+
message: `enum "${enumBlock.name}": member "${member.key()?.name() ?? "?"}" carries @${attribute.name()?.path().join(".") ?? "?"}, but an enum member takes no attributes`,
|
|
318
|
+
...source.at(nodePslSpan(attribute.syntax, sources))
|
|
319
|
+
})));
|
|
320
|
+
}
|
|
321
|
+
function reportPresetNotCalled(input) {
|
|
322
|
+
input.diagnostics.push({
|
|
323
|
+
code: "PSL_PRESET_NOT_CALLED",
|
|
324
|
+
message: `${input.entityLabel} uses field preset "${input.presetPath}" without calling it. Write ${input.presetPath}().`,
|
|
325
|
+
...input.source.at(input.span)
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.
|
|
330
|
+
*
|
|
331
|
+
* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.
|
|
332
|
+
*/
|
|
333
|
+
function instantiatePslFieldPreset(input) {
|
|
334
|
+
const helperPath = input.call.path.join(".");
|
|
335
|
+
const args = mapPslHelperArgs({
|
|
336
|
+
args: input.call.args,
|
|
337
|
+
descriptors: input.descriptor.args ?? [],
|
|
338
|
+
helperLabel: `preset "${helperPath}"`,
|
|
339
|
+
span: input.call.span,
|
|
340
|
+
diagnostics: input.diagnostics,
|
|
341
|
+
source: input.source,
|
|
342
|
+
entityLabel: input.entityLabel,
|
|
343
|
+
dataTypes: input.dataTypes
|
|
344
|
+
});
|
|
345
|
+
if (!args) return;
|
|
346
|
+
try {
|
|
347
|
+
validateAuthoringHelperArguments(helperPath, input.descriptor.args, args);
|
|
348
|
+
return instantiateAuthoringFieldPreset(input.descriptor, args);
|
|
349
|
+
} catch (error) {
|
|
350
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
351
|
+
input.diagnostics.push({
|
|
352
|
+
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
353
|
+
message: `${input.entityLabel}: ${message}`,
|
|
354
|
+
...input.source.at(input.call.span)
|
|
355
|
+
});
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
3
359
|
/**
|
|
4
360
|
* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an
|
|
5
361
|
* interpretation result. The authored headline is deliberately uniform — it
|
|
@@ -19,7 +375,42 @@ function withSeedDiagnostics(result, seedDiagnostics) {
|
|
|
19
375
|
function hasPslInterpreter(source) {
|
|
20
376
|
return source.format === "psl" && "interpret" in source && typeof source.interpret === "function";
|
|
21
377
|
}
|
|
378
|
+
function fkRelationPairKey(declaringModelName, targetModelName) {
|
|
379
|
+
return `${declaringModelName}::${targetModelName}`;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair
|
|
383
|
+
* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.
|
|
384
|
+
* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.
|
|
385
|
+
*/
|
|
386
|
+
function consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {
|
|
387
|
+
const index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);
|
|
388
|
+
if (index === -1) return false;
|
|
389
|
+
invalidFkPairings.splice(index, 1);
|
|
390
|
+
return true;
|
|
391
|
+
}
|
|
392
|
+
function requiredOneToOneBackrelationDiagnostic(input) {
|
|
393
|
+
const { modelName, field, targetModelName, sources, recordNoun } = input;
|
|
394
|
+
return {
|
|
395
|
+
code: "PSL_REQUIRED_ONE_TO_ONE_BACKRELATION",
|
|
396
|
+
message: `Backrelation field "${modelName}.${field.name}" is required, but "${targetModelName}" holds the relation fields, so nothing in storage guarantees a "${targetModelName}" ${recordNoun} exists. Make it optional: "${field.name} ${targetModelName}?".`,
|
|
397
|
+
...diagnosticSource(sources, field.node.syntax).at(field.span)
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
/** A generic block is read only when a composed descriptor claims its keyword. */
|
|
401
|
+
function claimedBlockKeywords(descriptors) {
|
|
402
|
+
const keywords = /* @__PURE__ */ new Set();
|
|
403
|
+
for (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);
|
|
404
|
+
return keywords;
|
|
405
|
+
}
|
|
406
|
+
function unsupportedBlockDiagnostic(block, sources) {
|
|
407
|
+
return {
|
|
408
|
+
code: "PSL_UNSUPPORTED_TOP_LEVEL_BLOCK",
|
|
409
|
+
message: `Unsupported top-level block "${block.keyword}"`,
|
|
410
|
+
...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))
|
|
411
|
+
};
|
|
412
|
+
}
|
|
22
413
|
//#endregion
|
|
23
|
-
export { hasPslInterpreter, withSeedDiagnostics };
|
|
414
|
+
export { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };
|
|
24
415
|
|
|
25
416
|
//# sourceMappingURL=psl-parser__interpret.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { notOk } from \"@internal/utils/result\";\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\nexport { hasPslInterpreter, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,oBAAoB,QAAQ,iBAAiB;CACrD,IAAI,gBAAgB,WAAW,GAAG,OAAO;CACzC,MAAM,cAAc,OAAO,KAAK,kBAAkB,CAAC,GAAG,iBAAiB,GAAG,OAAO,QAAQ,WAAW;CACpG,OAAO,MAAM;EACZ,SAAS,cAAc,YAAY,OAAO,QAAQ,YAAY,WAAW,IAAI,KAAK;EAClF;EACA,GAAG,OAAO,MAAM,OAAO,QAAQ,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,OAAO,QAAQ,KAAK;CACnF,CAAC;AACF;;AAEA,SAAS,kBAAkB,QAAQ;CAClC,OAAO,OAAO,WAAW,SAAS,eAAe,UAAU,OAAO,OAAO,cAAc;AACxF"}
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { l as diagnosticSource, n as keywordPslSpan, r as nodePslSpan } from \"./written-scalar-DYAM5coP.mjs\";\nimport { n as reportTypeConstructorNotCalled, r as readExpressionAs, t as isBareTypeConstructor } from \"./type-constructor-calls-BLf-HsFy.mjs\";\nimport { instantiateAuthoringFieldPreset, isAuthoringPslBlockDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk } from \"@internal/utils/result\";\nimport { dataTypeId } from \"@internal/framework-components/codec\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^[+-]?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || character === \"+\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentText(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\n/**\n* The value of one argument as `descriptor` reads it: a `value` argument as a value of its data type, read from its expression as attribute arguments are, and any other kind from its text. A refusal is pushed as a diagnostic at the argument.\n*/\nfunction readPslHelperArgument(input, descriptor, argument, argumentLabel) {\n\tconst invalid = () => {\n\t\tpushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse ${argumentLabel} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t};\n\tif (descriptor.kind !== \"value\") {\n\t\tconst value = parsePslAuthoringArgumentText(descriptor, argument.value);\n\t\treturn value === INVALID_AUTHORING_ARGUMENT ? invalid() : value;\n\t}\n\tconst { expression } = argument;\n\tif (expression === void 0 && argument.node !== void 0) {\n\t\tpushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `${argumentLabel} has no value.`\n\t\t});\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (expression === void 0) throw new InternalError(`${input.entityLabel} ${input.helperLabel} received ${argumentLabel} with no expression. A value argument is read from the expression a schema writes; a reader that builds a call must pass the arguments it parsed, or instantiate the constructor with values.`);\n\tconst read = readExpressionAs(input.dataTypes, dataTypeId(descriptor.dataType), expression);\n\tif (read.ok) return read.value.value;\n\tinput.diagnostics.push({\n\t\tcode: read.failure.code,\n\t\tmessage: read.failure.message,\n\t\t...input.source.at(nodePslSpan(expression.syntax, input.source.sources))\n\t});\n\treturn INVALID_AUTHORING_ARGUMENT;\n}\n/**\n* The arguments of a type constructor or field preset call, positional and named, each read as its descriptor says. `undefined`, with a diagnostic pushed, when one cannot be read or does not match a descriptor.\n*/\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = readPslHelperArgument(input, descriptor, argument, `argument #${index + 1}`);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = readPslHelperArgument(input, descriptor, argument, `named argument \"${argument.name}\"`);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/enum-member-attributes.ts\nfunction enumMemberAttributeDiagnostics(enumBlock, sources) {\n\tconst source = diagnosticSource(sources, enumBlock.node.syntax);\n\treturn enumBlock.entries.flatMap((member) => Array.from(member.attributes(), (attribute) => ({\n\t\tcode: \"PSL_UNSUPPORTED_ENUM_MEMBER_ATTRIBUTE\",\n\t\tmessage: `enum \"${enumBlock.name}\": member \"${member.key()?.name() ?? \"?\"}\" carries @${attribute.name()?.path().join(\".\") ?? \"?\"}, but an enum member takes no attributes`,\n\t\t...source.at(nodePslSpan(attribute.syntax, sources))\n\t})));\n}\n//#endregion\n//#region src/field-presets.ts\nfunction reportPresetNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_PRESET_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses field preset \"${input.presetPath}\" without calling it. Write ${input.presetPath}().`,\n\t\t...input.source.at(input.span)\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel,\n\t\tdataTypes: input.dataTypes\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel}: ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\n//#region src/unclaimed-blocks.ts\n/** A generic block is read only when a composed descriptor claims its keyword. */\nfunction claimedBlockKeywords(descriptors) {\n\tconst keywords = /* @__PURE__ */ new Set();\n\tfor (const [keyword, value] of Object.entries(descriptors ?? {})) if (isAuthoringPslBlockDescriptor(value)) keywords.add(keyword);\n\treturn keywords;\n}\nfunction unsupportedBlockDiagnostic(block, sources) {\n\treturn {\n\t\tcode: \"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\",\n\t\tmessage: `Unsupported top-level block \"${block.keyword}\"`,\n\t\t...diagnosticSource(sources, block.node.syntax).at(keywordPslSpan(block.node.syntax, block.keyword, sources))\n\t};\n}\n//#endregion\nexport { claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;;;AAOA,SAAS,qBAAqB,OAAO;CACpC,MAAM,UAAU,MAAM,KAAK;CAC3B,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;CAC5C,IAAI,CAAC,OAAO,OAAO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,QAAQ,kBAAkB,WAAW,YAAY,QAAQ,YAAY,WAAW,QAAQ,iBAAiB,UAAU,YAAY;CACrI,IAAI,UAAU,IAAI,OAAO;CACzB,kBAAkB,OAAO,OAAO,CAAC;CACjC,OAAO;AACR;AACA,SAAS,uCAAuC,OAAO;CACtD,MAAM,EAAE,WAAW,OAAO,iBAAiB,SAAS,eAAe;CACnE,OAAO;EACN,MAAM;EACN,SAAS,uBAAuB,UAAU,GAAG,MAAM,KAAK,sBAAsB,gBAAgB,mEAAmE,gBAAgB,IAAI,WAAW,8BAA8B,MAAM,KAAK,GAAG,gBAAgB;EAC5P,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,IAAI;CAC9D;AACD;;AAIA,SAAS,qBAAqB,aAAa;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,KAAK,MAAM,CAAC,SAAS,UAAU,OAAO,QAAQ,eAAe,CAAC,CAAC,GAAG,IAAI,8BAA8B,KAAK,GAAG,SAAS,IAAI,OAAO;CAChI,OAAO;AACR;AACA,SAAS,2BAA2B,OAAO,SAAS;CACnD,OAAO;EACN,MAAM;EACN,SAAS,gCAAgC,MAAM,QAAQ;EACvD,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,eAAe,MAAM,KAAK,QAAQ,MAAM,SAAS,OAAO,CAAC;CAC7G;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as TokenKind } from "./tokenizer-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { n as TokenKind } from "./tokenizer-i8RaVWVa-7fRwlCPP.mjs";
|
|
2
|
+
import { $ as TypeAnnotationAst, A as NamespaceDeclarationAst, C as IdentifierAst, D as ModelAttributeAst, E as MixinInclusionAst, F as ParseDiagnostic, G as StringLiteralExprAst, H as QualifiedNameAst, I as ParseResult, J as SyntaxKind, K as StringLiteralQuote, L as PathExprAst, M as NumberLiteralExprAst, N as ObjectFieldAst, O as ModelDeclarationAst, P as ObjectLiteralExprAst, Q as TokenAtOffset, R as Position, S as HasDocComment, T as MixinDeclarationAst, U as Range, V as PslSources, W as SourceFile, X as SyntaxToken, Y as SyntaxNode, Z as TaggedLiteralExprAst, _ as GenericBlockDeclarationAst, a as AttributeAst, b as GreenNode, c as BracedBlock, ct as filterChildren, dt as greenNode, et as TypesBlockAst, f as DocumentAst, ft as greenToken, g as FunctionCallAst, h as FieldDeclarationAst, ht as printSyntax, i as AttributeArgListAst, it as createSyntaxTree, j as NamespaceMemberAst, k as NamedTypeDeclarationAst, l as CompositeTypeDeclarationAst, lt as findChildToken, m as FieldAttributeAst, mt as parse, n as AstNode, nt as castExpression, o as BlockMemberAst, p as ExpressionAst, q as SyntaxElement, r as AttributeArgAst, s as BooleanLiteralExprAst, st as dottedPathsIn, t as ArrayLiteralAst, tt as any, u as DeclarationAst, ut as findFirstChild, v as GenericBlockMemberAst, w as KeyValuePairAst, x as GreenToken, y as GreenElement } from "./parse-djL5wker-B610mXG4.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.d.mts
|
|
4
4
|
//#region src/syntax/green-builder.d.ts
|
|
5
5
|
declare class GreenNodeBuilder {
|
|
@@ -27,5 +27,5 @@ declare function skipTriviaToken(token: SyntaxToken, direction: Direction): Synt
|
|
|
27
27
|
*/
|
|
28
28
|
declare function nonTriviaSibling(element: SyntaxElement, direction: Direction): SyntaxElement | undefined;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { ArrayLiteralAst, type AstNode, AttributeArgAst, AttributeArgListAst, type AttributeAst, type BlockMemberAst, BooleanLiteralExprAst, type BracedBlock, CompositeTypeDeclarationAst, type DeclarationAst, type Direction, DocumentAst, type ExpressionAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, type GenericBlockMemberAst, type GreenElement, type GreenNode, GreenNodeBuilder, type GreenToken, IdentifierAst, KeyValuePairAst, ModelAttributeAst, ModelDeclarationAst, NamedTypeDeclarationAst, NamespaceDeclarationAst, type NamespaceMemberAst, NumberLiteralExprAst, ObjectFieldAst, ObjectLiteralExprAst, type ParseDiagnostic, type ParseResult, type Position, QualifiedNameAst, type Range, SourceFile, StringLiteralExprAst, type SyntaxElement, type SyntaxKind, SyntaxNode, SyntaxToken, TokenAtOffset, TypeAnnotationAst, TypesBlockAst, any, castExpression, createSyntaxTree, filterChildren, findChildToken, findFirstChild, greenNode, greenToken, isTrivia, isTriviaKind, nonTriviaSibling, parse, printSyntax, skipTriviaToken };
|
|
30
|
+
export { ArrayLiteralAst, type AstNode, AttributeArgAst, AttributeArgListAst, type AttributeAst, type BlockMemberAst, BooleanLiteralExprAst, type BracedBlock, CompositeTypeDeclarationAst, type DeclarationAst, type Direction, DocumentAst, type ExpressionAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, type GenericBlockMemberAst, type GreenElement, type GreenNode, GreenNodeBuilder, type GreenToken, type HasDocComment, IdentifierAst, KeyValuePairAst, MixinDeclarationAst, MixinInclusionAst, ModelAttributeAst, ModelDeclarationAst, NamedTypeDeclarationAst, NamespaceDeclarationAst, type NamespaceMemberAst, NumberLiteralExprAst, ObjectFieldAst, ObjectLiteralExprAst, type ParseDiagnostic, type ParseResult, PathExprAst, type Position, PslSources, QualifiedNameAst, type Range, SourceFile, StringLiteralExprAst, type StringLiteralQuote, type SyntaxElement, type SyntaxKind, SyntaxNode, SyntaxToken, TaggedLiteralExprAst, TokenAtOffset, TypeAnnotationAst, TypesBlockAst, any, castExpression, createSyntaxTree, dottedPathsIn, filterChildren, findChildToken, findFirstChild, greenNode, greenToken, isTrivia, isTriviaKind, nonTriviaSibling, parse, printSyntax, skipTriviaToken };
|
|
31
31
|
//# sourceMappingURL=psl-parser__syntax.d.mts.map
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"Whitespace",
|
|
6
|
-
"Newline",
|
|
7
|
-
"Comment"
|
|
8
|
-
]);
|
|
9
|
-
/** Whether a token kind is trivia (whitespace, newline, or comment). */
|
|
10
|
-
function isTriviaKind(kind) {
|
|
11
|
-
return TRIVIA_KINDS.has(kind);
|
|
12
|
-
}
|
|
13
|
-
/** Whether a token is trivia. */
|
|
14
|
-
function isTrivia(token) {
|
|
15
|
-
return isTriviaKind(token.kind);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The first non-trivia token at or beyond `token` in `direction`. Returns
|
|
19
|
-
* `token` itself when it is already significant.
|
|
20
|
-
*/
|
|
21
|
-
function skipTriviaToken(token, direction) {
|
|
22
|
-
let current = token;
|
|
23
|
-
while (current !== void 0 && isTrivia(current)) current = direction === "next" ? current.nextToken : current.prevToken;
|
|
24
|
-
return current;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The nearest sibling of `element` (within the same parent) in `direction` that
|
|
28
|
-
* is not a trivia token. Nodes are always significant.
|
|
29
|
-
*/
|
|
30
|
-
function nonTriviaSibling(element, direction) {
|
|
31
|
-
let sibling = step(element, direction);
|
|
32
|
-
while (sibling !== void 0) {
|
|
33
|
-
if (!(sibling instanceof SyntaxToken) || !isTrivia(sibling)) return sibling;
|
|
34
|
-
sibling = step(sibling, direction);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function step(element, direction) {
|
|
38
|
-
return direction === "next" ? element.nextSiblingOrToken : element.prevSiblingOrToken;
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { ArrayLiteralAst, AttributeArgAst, AttributeArgListAst, BooleanLiteralExprAst, CompositeTypeDeclarationAst, DocumentAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, GreenNodeBuilder, IdentifierAst, KeyValuePairAst, ModelAttributeAst, ModelDeclarationAst, NamedTypeDeclarationAst, NamespaceDeclarationAst, NumberLiteralExprAst, ObjectFieldAst, ObjectLiteralExprAst, QualifiedNameAst, SourceFile, StringLiteralExprAst, SyntaxNode, SyntaxToken, TokenAtOffset, TypeAnnotationAst, TypesBlockAst, any, castExpression, createSyntaxTree, filterChildren, findChildToken, findFirstChild, greenNode, greenToken, isTrivia, isTriviaKind, nonTriviaSibling, parse, printSyntax, skipTriviaToken };
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=psl-parser__syntax.mjs.map
|
|
1
|
+
import { C as printSyntax, S as findFirstChild, _ as castExpression, a as IdentifierAst, b as filterChildren, c as ObjectLiteralExprAst, d as StringLiteralExprAst, f as SyntaxNode, g as any, h as TokenAtOffset, i as FunctionCallAst, l as PathExprAst, m as TaggedLiteralExprAst, n as AttributeArgAst, o as NumberLiteralExprAst, p as SyntaxToken, r as BooleanLiteralExprAst, s as ObjectFieldAst, t as ArrayLiteralAst, u as QualifiedNameAst, v as createSyntaxTree, x as findChildToken, y as dottedPathsIn } from "./expressions-CMQzbnHk-BL2zN0Iv.mjs";
|
|
2
|
+
import { _ as isTriviaKind, a as FieldDeclarationAst, c as MixinDeclarationAst, d as ModelDeclarationAst, f as NamedTypeDeclarationAst, g as isTrivia, h as TypesBlockAst, i as FieldAttributeAst, l as MixinInclusionAst, m as TypeAnnotationAst, n as CompositeTypeDeclarationAst, o as GenericBlockDeclarationAst, p as NamespaceDeclarationAst, r as DocumentAst, s as KeyValuePairAst, t as AttributeArgListAst, u as ModelAttributeAst, v as nonTriviaSibling, y as skipTriviaToken } from "./declarations-BgUAq1RG-Dz_-EI1Q.mjs";
|
|
3
|
+
import { a as greenToken, i as greenNode, n as PslSources, o as parse, r as SourceFile, t as GreenNodeBuilder } from "./parse-bZgfjovA-BNgYhylT.mjs";
|
|
4
|
+
export { ArrayLiteralAst, AttributeArgAst, AttributeArgListAst, BooleanLiteralExprAst, CompositeTypeDeclarationAst, DocumentAst, FieldAttributeAst, FieldDeclarationAst, FunctionCallAst, GenericBlockDeclarationAst, GreenNodeBuilder, IdentifierAst, KeyValuePairAst, MixinDeclarationAst, MixinInclusionAst, ModelAttributeAst, ModelDeclarationAst, NamedTypeDeclarationAst, NamespaceDeclarationAst, NumberLiteralExprAst, ObjectFieldAst, ObjectLiteralExprAst, PathExprAst, PslSources, QualifiedNameAst, SourceFile, StringLiteralExprAst, SyntaxNode, SyntaxToken, TaggedLiteralExprAst, TokenAtOffset, TypeAnnotationAst, TypesBlockAst, any, castExpression, createSyntaxTree, dottedPathsIn, filterChildren, findChildToken, findFirstChild, greenNode, greenToken, isTrivia, isTriviaKind, nonTriviaSibling, parse, printSyntax, skipTriviaToken };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TokenKind, r as Tokenizer, t as Token } from "./tokenizer-
|
|
1
|
+
import { n as TokenKind, r as Tokenizer, t as Token } from "./tokenizer-i8RaVWVa-7fRwlCPP.mjs";
|
|
2
2
|
export { type Token, type TokenKind, Tokenizer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Tokenizer } from "./tokenizer-
|
|
1
|
+
import { t as Tokenizer } from "./tokenizer-C-GTKKjR-B1vOzJy0.mjs";
|
|
2
2
|
export { Tokenizer };
|
package/dist/psl-printer.d.mts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import { m as PslDocumentAst } from "./psl-ast-CWJQF8LA-Vr5JNPdn.mjs";
|
|
6
|
-
import "./psl-ast-BXZoFQBk.mjs";
|
|
1
|
+
import { E as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
2
|
+
import "./authoring-CjwinhU5.mjs";
|
|
3
|
+
import { f as PslDocumentAst } from "./psl-ast-rY25o3Ze-ClLY3CYt.mjs";
|
|
4
|
+
import "./psl-ast-COcYtLlz.mjs";
|
|
7
5
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.d.mts
|
|
8
6
|
//#region src/print-psl.d.ts
|
|
9
7
|
type PslBlockDescriptorsNamespace = AuthoringPslBlockDescriptorNamespace;
|
|
10
8
|
interface PrintPslOptions {
|
|
11
9
|
/**
|
|
12
10
|
* Extension-contributed PSL block descriptors, indexed by user-facing path.
|
|
13
|
-
* Typically an `AssembledAuthoringContributions.pslBlockDescriptors` namespace
|
|
14
|
-
* produced by `assembleAuthoringContributions`. Phase 2 of the printer indexes
|
|
15
|
-
* into this namespace by each extension-contributed AST node's `kind`
|
|
16
|
-
* discriminator and renders the block generically from the descriptor's
|
|
17
|
-
* `parameters` map.
|
|
18
11
|
*
|
|
19
12
|
* When absent, an AST that contains extension-contributed blocks throws —
|
|
20
13
|
* silently dropping blocks would lose user-authored content without a
|
|
@@ -23,13 +16,10 @@ interface PrintPslOptions {
|
|
|
23
16
|
*/
|
|
24
17
|
readonly pslBlockDescriptors?: PslBlockDescriptorsNamespace;
|
|
25
18
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* Required alongside `pslBlockDescriptors` when the AST contains `value`-kind
|
|
29
|
-
* parameters. When absent, the raw PSL literal stored in the AST node is
|
|
30
|
-
* emitted as-is.
|
|
19
|
+
* One line saying where the file came from. The printed file opens with the
|
|
20
|
+
* `// use prisma-8` marker, then this line as a comment.
|
|
31
21
|
*/
|
|
32
|
-
readonly
|
|
22
|
+
readonly description?: string;
|
|
33
23
|
}
|
|
34
24
|
declare function printPslFromAst(ast: PslDocumentAst, options?: PrintPslOptions): string;
|
|
35
25
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-printer.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-printer/dist/index.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"psl-printer.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-printer/dist/index.d.mts"],"mappings":";;;;;;KAGK,+BAA+B;UAC1B;;;;;;;;;WASC,sBAAsB;;;;;WAKtB;;iBAEM,gBAAgB,KAAK,gBAAgB,UAAU"}
|