@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,6 +1,8 @@
|
|
|
1
|
-
import { o as structuredError } from "./structured-error-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
2
|
+
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
|
+
import { f as SyntaxNode } from "./expressions-CMQzbnHk-BL2zN0Iv.mjs";
|
|
4
|
+
import { a as FieldDeclarationAst, c as MixinDeclarationAst, d as ModelDeclarationAst, f as NamedTypeDeclarationAst, h as TypesBlockAst, l as MixinInclusionAst, n as CompositeTypeDeclarationAst, o as GenericBlockDeclarationAst, p as NamespaceDeclarationAst, s as KeyValuePairAst, u as ModelAttributeAst } from "./declarations-BgUAq1RG-Dz_-EI1Q.mjs";
|
|
5
|
+
import { o as parse } from "./parse-bZgfjovA-BNgYhylT.mjs";
|
|
4
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
|
|
5
7
|
function emitDocument(document, indentUnit, newline) {
|
|
6
8
|
const writer = new LineWriter(indentUnit, newline);
|
|
@@ -77,9 +79,10 @@ var LineWriter = class {
|
|
|
77
79
|
function spaceBetween(prev, cur, inQualifiedName) {
|
|
78
80
|
if (prev === void 0) return false;
|
|
79
81
|
if (inQualifiedName) return false;
|
|
82
|
+
if (prev === "Ident" && cur === "StringLiteral") return false;
|
|
80
83
|
switch (cur) {
|
|
84
|
+
case "LBracket": return prev === "Colon" || prev === "Comma" || prev === "Equals";
|
|
81
85
|
case "LParen":
|
|
82
|
-
case "LBracket":
|
|
83
86
|
case "RParen":
|
|
84
87
|
case "RBracket":
|
|
85
88
|
case "Comma":
|
|
@@ -94,7 +97,8 @@ function spaceBetween(prev, cur, inQualifiedName) {
|
|
|
94
97
|
case "LBracket":
|
|
95
98
|
case "Dot":
|
|
96
99
|
case "At":
|
|
97
|
-
case "DoubleAt":
|
|
100
|
+
case "DoubleAt":
|
|
101
|
+
case "Plus": return false;
|
|
98
102
|
default: return true;
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -130,22 +134,22 @@ function streamNode(writer, node, padTo) {
|
|
|
130
134
|
function closeContinuation(writer, count) {
|
|
131
135
|
for (let i = 0; i < count; i++) writer.unindent();
|
|
132
136
|
}
|
|
133
|
-
function emitField(writer, field,
|
|
134
|
-
return streamRow(writer, field.syntax,
|
|
137
|
+
function emitField(writer, field, alignmentColumns) {
|
|
138
|
+
return streamRow(writer, field.syntax, alignmentColumns);
|
|
135
139
|
}
|
|
136
140
|
function emitNamedType(writer, decl) {
|
|
137
141
|
return streamRow(writer, decl.syntax, void 0);
|
|
138
142
|
}
|
|
139
|
-
function streamRow(writer, row,
|
|
143
|
+
function streamRow(writer, row, alignmentColumns) {
|
|
140
144
|
let continuation = 0;
|
|
141
145
|
let sawAttribute = false;
|
|
142
146
|
for (const child of row.children()) {
|
|
143
147
|
if (child instanceof SyntaxNode) {
|
|
144
148
|
let padTo;
|
|
145
|
-
if (child.kind === "TypeAnnotation" && continuation === 0) padTo =
|
|
149
|
+
if (child.kind === "TypeAnnotation" && continuation === 0) padTo = alignmentColumns?.typeColumn;
|
|
146
150
|
else if (child.kind === "FieldAttribute") {
|
|
147
151
|
if (continuation > 0) writer.newline();
|
|
148
|
-
else if (!sawAttribute) padTo =
|
|
152
|
+
else if (!sawAttribute) padTo = alignmentColumns?.attributeColumn;
|
|
149
153
|
sawAttribute = true;
|
|
150
154
|
}
|
|
151
155
|
continuation += streamNode(writer, child, padTo);
|
|
@@ -180,31 +184,46 @@ function leafMember(writer, category, print) {
|
|
|
180
184
|
}
|
|
181
185
|
};
|
|
182
186
|
}
|
|
183
|
-
function
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (field) return leafMember(writer, "regular", () => emitField(writer, field, columns));
|
|
188
|
-
const attribute = ModelAttributeAst.cast(node);
|
|
189
|
-
if (attribute) return leafMember(writer, "blockAttribute", () => emitBlockAttribute(writer, attribute));
|
|
190
|
-
});
|
|
187
|
+
function inclusionMember(writer, node) {
|
|
188
|
+
const inclusion = MixinInclusionAst.cast(node);
|
|
189
|
+
if (inclusion === void 0) return void 0;
|
|
190
|
+
return leafMember(writer, "regular", () => streamNode(writer, inclusion.syntax));
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
function fieldBodyMembers(writer, block) {
|
|
193
|
+
const alignmentColumns = alignmentMap(block);
|
|
194
|
+
return (node) => {
|
|
195
195
|
const field = FieldDeclarationAst.cast(node);
|
|
196
|
-
if (field) return leafMember(writer, "regular", () => emitField(writer, field,
|
|
196
|
+
if (field) return leafMember(writer, "regular", () => emitField(writer, field, alignmentColumns));
|
|
197
197
|
const attribute = ModelAttributeAst.cast(node);
|
|
198
198
|
if (attribute) return leafMember(writer, "blockAttribute", () => emitBlockAttribute(writer, attribute));
|
|
199
|
-
|
|
199
|
+
return inclusionMember(writer, node);
|
|
200
|
+
};
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
202
|
+
function entryBodyMembers(writer, block) {
|
|
203
|
+
const alignment = alignmentMap(block);
|
|
204
|
+
return (node) => {
|
|
205
|
+
const field = FieldDeclarationAst.cast(node);
|
|
206
|
+
if (field) return leafMember(writer, "regular", () => emitField(writer, field, alignment));
|
|
203
207
|
const entry = KeyValuePairAst.cast(node);
|
|
204
208
|
if (entry) return leafMember(writer, "regular", () => emitKeyValue(writer, entry));
|
|
205
209
|
const attribute = ModelAttributeAst.cast(node);
|
|
206
210
|
if (attribute) return leafMember(writer, "blockAttribute", () => emitBlockAttribute(writer, attribute));
|
|
207
|
-
|
|
211
|
+
return inclusionMember(writer, node);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function emitModel(writer, model, trailing) {
|
|
215
|
+
emitBlockBody(writer, model.syntax, trailing, fieldBodyMembers(writer, model.syntax));
|
|
216
|
+
}
|
|
217
|
+
function emitCompositeType(writer, composite, trailing) {
|
|
218
|
+
emitBlockBody(writer, composite.syntax, trailing, fieldBodyMembers(writer, composite.syntax));
|
|
219
|
+
}
|
|
220
|
+
function emitGenericBlock(writer, block, trailing) {
|
|
221
|
+
emitBlockBody(writer, block.syntax, trailing, entryBodyMembers(writer, block.syntax));
|
|
222
|
+
}
|
|
223
|
+
const FIELD_BODY_KEYWORDS = /* @__PURE__ */ new Set(["model", "type"]);
|
|
224
|
+
function emitMixinDeclaration(writer, mixin, trailing) {
|
|
225
|
+
const members = FIELD_BODY_KEYWORDS.has(mixin.keyword()?.text ?? "") ? fieldBodyMembers(writer, mixin.syntax) : entryBodyMembers(writer, mixin.syntax);
|
|
226
|
+
emitBlockBody(writer, mixin.syntax, trailing, members);
|
|
208
227
|
}
|
|
209
228
|
function emitNamespace(writer, namespace, trailing) {
|
|
210
229
|
emitBlockBody(writer, namespace.syntax, trailing, (node) => {
|
|
@@ -240,6 +259,8 @@ function castBlockDeclaration(node) {
|
|
|
240
259
|
if (composite) return (writer, trailing) => emitCompositeType(writer, composite, trailing);
|
|
241
260
|
const generic = GenericBlockDeclarationAst.cast(node);
|
|
242
261
|
if (generic) return (writer, trailing) => emitGenericBlock(writer, generic, trailing);
|
|
262
|
+
const mixin = MixinDeclarationAst.cast(node);
|
|
263
|
+
if (mixin) return (writer, trailing) => emitMixinDeclaration(writer, mixin, trailing);
|
|
243
264
|
}
|
|
244
265
|
function castTopLevelDeclaration(node) {
|
|
245
266
|
const block = castBlockDeclaration(node);
|
|
@@ -252,18 +273,23 @@ function castTopLevelDeclaration(node) {
|
|
|
252
273
|
function emitBlockBody(writer, node, closingTrailing, classify) {
|
|
253
274
|
const children = Array.from(node.children());
|
|
254
275
|
const openIndex = children.findIndex((el) => !(el instanceof SyntaxNode) && el.kind === "LBrace");
|
|
255
|
-
streamHeader(writer, node);
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
276
|
+
const headerComments = streamHeader(writer, node);
|
|
277
|
+
const openingComment = sameLineCommentAfter(children, openIndex);
|
|
278
|
+
if (openingComment !== void 0) headerComments.push(openingComment);
|
|
279
|
+
const [firstComment, ...otherComments] = headerComments;
|
|
280
|
+
if (firstComment !== void 0) writer.comment(firstComment);
|
|
258
281
|
else writer.newline();
|
|
259
282
|
writer.indent();
|
|
283
|
+
for (const comment of otherComments) writer.comment(comment);
|
|
260
284
|
walkRegion(writer, children, "RBrace", classify);
|
|
261
285
|
writer.unindent();
|
|
262
286
|
writer.writeRaw("}");
|
|
263
287
|
if (closingTrailing !== void 0) writer.comment(closingTrailing);
|
|
264
288
|
else writer.newline();
|
|
265
289
|
}
|
|
290
|
+
/** Writes the block header through `{` and returns the source comments found before the `{`. */
|
|
266
291
|
function streamHeader(writer, node) {
|
|
292
|
+
const comments = [];
|
|
267
293
|
let done = false;
|
|
268
294
|
const walk = (parent) => {
|
|
269
295
|
for (const child of parent.children()) {
|
|
@@ -272,7 +298,11 @@ function streamHeader(writer, node) {
|
|
|
272
298
|
walk(child);
|
|
273
299
|
continue;
|
|
274
300
|
}
|
|
275
|
-
if (child.kind === "
|
|
301
|
+
if (child.kind === "Comment") {
|
|
302
|
+
comments.push(child.text);
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
if (child.kind === "Whitespace" || child.kind === "Newline") continue;
|
|
276
306
|
const space = spaceBetween(writer.prevKind(), child.kind, false);
|
|
277
307
|
writer.write(child, space);
|
|
278
308
|
if (child.kind === "LBrace") {
|
|
@@ -282,6 +312,7 @@ function streamHeader(writer, node) {
|
|
|
282
312
|
}
|
|
283
313
|
};
|
|
284
314
|
walk(node);
|
|
315
|
+
return comments;
|
|
285
316
|
}
|
|
286
317
|
function walkRegion(writer, elements, closeKind, classify) {
|
|
287
318
|
let sawOpenBrace = closeKind === void 0;
|
|
@@ -295,7 +326,7 @@ function walkRegion(writer, elements, closeKind, classify) {
|
|
|
295
326
|
if (element instanceof SyntaxNode) {
|
|
296
327
|
if (!sawOpenBrace) continue;
|
|
297
328
|
const member = classify(element);
|
|
298
|
-
if (member === void 0)
|
|
329
|
+
if (member === void 0) throw new InternalError(`Formatter has no rule for a ${element.kind} node at offset ${element.offset}; formatting would drop its text`);
|
|
299
330
|
if (!ledByComment) {
|
|
300
331
|
if (newlines >= 2 && sawContent && !writer.lastIsBlank()) writer.blank();
|
|
301
332
|
else if (separationBlankWanted(writer, member.category, sawContent, lastWasRegular)) writer.blank();
|
|
@@ -452,13 +483,13 @@ function resolveFormatOptions(options) {
|
|
|
452
483
|
newline: newline === "CRLF" ? "\r\n" : "\n"
|
|
453
484
|
};
|
|
454
485
|
}
|
|
455
|
-
function format(source, options) {
|
|
486
|
+
function format(source, options, parserOptions = {}) {
|
|
456
487
|
const resolved = resolveFormatOptions(options);
|
|
457
|
-
const { document, diagnostics } = parse(source);
|
|
488
|
+
const { document, diagnostics } = parse(source, "<format-input>.psl", parserOptions);
|
|
458
489
|
if (diagnostics.length > 0) throw pslError("PSL.PARSE_FAILED", `Cannot format PSL with parse errors: ${diagnostics[0]?.message ?? "unknown parse error"}${diagnostics.length > 1 ? ` (and ${diagnostics.length - 1} more)` : ""}`, { meta: { diagnostics } });
|
|
459
490
|
return emitDocument(document, resolved.indentUnit, resolved.newline);
|
|
460
491
|
}
|
|
461
492
|
//#endregion
|
|
462
|
-
export { format };
|
|
493
|
+
export { format, resolveFormatOptions };
|
|
463
494
|
|
|
464
495
|
//# sourceMappingURL=psl-parser__format.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__format.mjs","names":["#indentUnit","#newline","#depth","#lastWasBlank","#lineOpen","#prevKind","#out","#line","#hasContent"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/format.mjs"],"sourcesContent":["import { A as SyntaxNode, a as KeyValuePairAst, c as NamespaceDeclarationAst, i as GenericBlockDeclarationAst, l as TypesBlockAst, o as ModelDeclarationAst, p as ModelAttributeAst, r as FieldDeclarationAst, s as NamedTypeDeclarationAst, t as CompositeTypeDeclarationAst } from \"./declarations-DR6To8_k.mjs\";\nimport { t as parse } from \"./parse-GbZGfMUj.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/format/emit.ts\nfunction emitDocument(document, indentUnit, newline) {\n\tconst writer = new LineWriter(indentUnit, newline);\n\temitTopLevel(writer, document);\n\treturn writer.finish();\n}\nvar LineWriter = class {\n\t#indentUnit;\n\t#newline;\n\t#out = [];\n\t#depth = 0;\n\t#line = \"\";\n\t#lineOpen = false;\n\t#prevKind;\n\t#lastWasBlank = false;\n\t#hasContent = false;\n\tconstructor(indentUnit, newline) {\n\t\tthis.#indentUnit = indentUnit;\n\t\tthis.#newline = newline;\n\t}\n\tindent() {\n\t\tthis.#depth += 1;\n\t}\n\tunindent() {\n\t\tthis.#depth = Math.max(0, this.#depth - 1);\n\t}\n\tlastIsBlank() {\n\t\treturn this.#lastWasBlank;\n\t}\n\tlineOpen() {\n\t\treturn this.#lineOpen;\n\t}\n\tprevKind() {\n\t\treturn this.#prevKind;\n\t}\n\tnewline() {\n\t\tif (!this.#lineOpen) return;\n\t\tthis.#out.push(`${this.#indentUnit.repeat(this.#depth)}${this.#line}`);\n\t\tthis.#line = \"\";\n\t\tthis.#lineOpen = false;\n\t\tthis.#prevKind = void 0;\n\t\tthis.#lastWasBlank = false;\n\t\tthis.#hasContent = true;\n\t}\n\tblank() {\n\t\tthis.newline();\n\t\tif (!this.#hasContent || this.#lastWasBlank) return;\n\t\tthis.#out.push(\"\");\n\t\tthis.#lastWasBlank = true;\n\t}\n\twrite(token, space, padTo) {\n\t\tif (this.#lineOpen && padTo !== void 0) this.#line = this.#line.padEnd(padTo);\n\t\telse if (this.#lineOpen && space) this.#line += \" \";\n\t\tthis.#line += token.text;\n\t\tthis.#lineOpen = true;\n\t\tthis.#prevKind = token.kind;\n\t}\n\twriteRaw(text) {\n\t\tthis.#line += text;\n\t\tthis.#lineOpen = true;\n\t}\n\tcomment(text) {\n\t\tif (this.#lineOpen) this.#line += ` ${text}`;\n\t\telse this.#line = text;\n\t\tthis.#lineOpen = true;\n\t\tthis.newline();\n\t}\n\tfinish() {\n\t\tthis.newline();\n\t\tconst body = this.#out.join(this.#newline);\n\t\treturn body.length > 0 ? `${body}${this.#newline}` : \"\";\n\t}\n};\nfunction spaceBetween(prev, cur, inQualifiedName) {\n\tif (prev === void 0) return false;\n\tif (inQualifiedName) return false;\n\tswitch (cur) {\n\t\tcase \"LParen\":\n\t\tcase \"LBracket\":\n\t\tcase \"RParen\":\n\t\tcase \"RBracket\":\n\t\tcase \"Comma\":\n\t\tcase \"Question\":\n\t\tcase \"Dot\":\n\t\tcase \"Colon\": return false;\n\t\tcase \"RBrace\": return prev !== \"LBrace\";\n\t\tdefault: break;\n\t}\n\tswitch (prev) {\n\t\tcase \"LParen\":\n\t\tcase \"LBracket\":\n\t\tcase \"Dot\":\n\t\tcase \"At\":\n\t\tcase \"DoubleAt\": return false;\n\t\tdefault: return true;\n\t}\n}\nfunction streamNode(writer, node, padTo) {\n\tlet continuation = 0;\n\tlet first = true;\n\tlet prevQualified = false;\n\tconst walk = (parent, qualified) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child, qualified || child.kind === \"QualifiedName\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\") continue;\n\t\t\tif (child.kind === \"Comment\") {\n\t\t\t\twriter.comment(child.text);\n\t\t\t\twriter.indent();\n\t\t\t\tcontinuation += 1;\n\t\t\t\tprevQualified = false;\n\t\t\t\tfirst = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst pad = first ? padTo : void 0;\n\t\t\tconst space = spaceBetween(writer.prevKind(), child.kind, qualified && prevQualified);\n\t\t\twriter.write(child, space, writer.lineOpen() ? pad : void 0);\n\t\t\tprevQualified = qualified;\n\t\t\tfirst = false;\n\t\t}\n\t};\n\twalk(node, false);\n\treturn continuation;\n}\nfunction closeContinuation(writer, count) {\n\tfor (let i = 0; i < count; i++) writer.unindent();\n}\nfunction emitField(writer, field, columns) {\n\treturn streamRow(writer, field.syntax, columns);\n}\nfunction emitNamedType(writer, decl) {\n\treturn streamRow(writer, decl.syntax, void 0);\n}\nfunction streamRow(writer, row, columns) {\n\tlet continuation = 0;\n\tlet sawAttribute = false;\n\tfor (const child of row.children()) {\n\t\tif (child instanceof SyntaxNode) {\n\t\t\tlet padTo;\n\t\t\tif (child.kind === \"TypeAnnotation\" && continuation === 0) padTo = columns?.typeColumn;\n\t\t\telse if (child.kind === \"FieldAttribute\") {\n\t\t\t\tif (continuation > 0) writer.newline();\n\t\t\t\telse if (!sawAttribute) padTo = columns?.attributeColumn;\n\t\t\t\tsawAttribute = true;\n\t\t\t}\n\t\t\tcontinuation += streamNode(writer, child, padTo);\n\t\t\tcontinue;\n\t\t}\n\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\") continue;\n\t\tif (child.kind === \"Comment\") {\n\t\t\twriter.comment(child.text);\n\t\t\twriter.indent();\n\t\t\tcontinuation += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst space = spaceBetween(writer.prevKind(), child.kind, false);\n\t\twriter.write(child, space);\n\t}\n\treturn continuation;\n}\nfunction emitBlockAttribute(writer, attribute) {\n\treturn streamNode(writer, attribute.syntax);\n}\nfunction emitKeyValue(writer, pair) {\n\treturn streamNode(writer, pair.syntax);\n}\nfunction leafMember(writer, category, print) {\n\treturn {\n\t\tcategory,\n\t\temit(trailing) {\n\t\t\tconst continuation = print();\n\t\t\tif (trailing !== void 0) writer.comment(trailing);\n\t\t\telse writer.newline();\n\t\t\treturn continuation;\n\t\t}\n\t};\n}\nfunction emitModel(writer, model, trailing) {\n\tconst columns = alignmentMap(model.syntax);\n\temitBlockBody(writer, model.syntax, trailing, (node) => {\n\t\tconst field = FieldDeclarationAst.cast(node);\n\t\tif (field) return leafMember(writer, \"regular\", () => emitField(writer, field, columns));\n\t\tconst attribute = ModelAttributeAst.cast(node);\n\t\tif (attribute) return leafMember(writer, \"blockAttribute\", () => emitBlockAttribute(writer, attribute));\n\t});\n}\nfunction emitCompositeType(writer, composite, trailing) {\n\tconst columns = alignmentMap(composite.syntax);\n\temitBlockBody(writer, composite.syntax, trailing, (node) => {\n\t\tconst field = FieldDeclarationAst.cast(node);\n\t\tif (field) return leafMember(writer, \"regular\", () => emitField(writer, field, columns));\n\t\tconst attribute = ModelAttributeAst.cast(node);\n\t\tif (attribute) return leafMember(writer, \"blockAttribute\", () => emitBlockAttribute(writer, attribute));\n\t});\n}\nfunction emitGenericBlock(writer, block, trailing) {\n\temitBlockBody(writer, block.syntax, trailing, (node) => {\n\t\tconst entry = KeyValuePairAst.cast(node);\n\t\tif (entry) return leafMember(writer, \"regular\", () => emitKeyValue(writer, entry));\n\t\tconst attribute = ModelAttributeAst.cast(node);\n\t\tif (attribute) return leafMember(writer, \"blockAttribute\", () => emitBlockAttribute(writer, attribute));\n\t});\n}\nfunction emitNamespace(writer, namespace, trailing) {\n\temitBlockBody(writer, namespace.syntax, trailing, (node) => {\n\t\tconst declaration = castBlockDeclaration(node);\n\t\tif (declaration) return nestedBlockMember(writer, declaration);\n\t});\n}\nfunction emitTypesBlock(writer, block, trailing) {\n\temitBlockBody(writer, block.syntax, trailing, (node) => {\n\t\tconst named = NamedTypeDeclarationAst.cast(node);\n\t\tif (named) return leafMember(writer, \"regular\", () => emitNamedType(writer, named));\n\t});\n}\nfunction emitTopLevel(writer, document) {\n\twalkRegion(writer, Array.from(document.syntax.children()), void 0, (node) => {\n\t\tconst declaration = castTopLevelDeclaration(node);\n\t\tif (declaration) return nestedBlockMember(writer, declaration);\n\t});\n}\nfunction nestedBlockMember(writer, block) {\n\treturn {\n\t\tcategory: \"nestedBlock\",\n\t\temit(trailing) {\n\t\t\tblock(writer, trailing);\n\t\t\treturn 0;\n\t\t}\n\t};\n}\nfunction castBlockDeclaration(node) {\n\tconst model = ModelDeclarationAst.cast(node);\n\tif (model) return (writer, trailing) => emitModel(writer, model, trailing);\n\tconst composite = CompositeTypeDeclarationAst.cast(node);\n\tif (composite) return (writer, trailing) => emitCompositeType(writer, composite, trailing);\n\tconst generic = GenericBlockDeclarationAst.cast(node);\n\tif (generic) return (writer, trailing) => emitGenericBlock(writer, generic, trailing);\n}\nfunction castTopLevelDeclaration(node) {\n\tconst block = castBlockDeclaration(node);\n\tif (block) return block;\n\tconst namespace = NamespaceDeclarationAst.cast(node);\n\tif (namespace) return (writer, trailing) => emitNamespace(writer, namespace, trailing);\n\tconst types = TypesBlockAst.cast(node);\n\tif (types) return (writer, trailing) => emitTypesBlock(writer, types, trailing);\n}\nfunction emitBlockBody(writer, node, closingTrailing, classify) {\n\tconst children = Array.from(node.children());\n\tconst openIndex = children.findIndex((el) => !(el instanceof SyntaxNode) && el.kind === \"LBrace\");\n\tstreamHeader(writer, node);\n\tconst headerComment = sameLineCommentAfter(children, openIndex);\n\tif (headerComment !== void 0) writer.comment(headerComment);\n\telse writer.newline();\n\twriter.indent();\n\twalkRegion(writer, children, \"RBrace\", classify);\n\twriter.unindent();\n\twriter.writeRaw(\"}\");\n\tif (closingTrailing !== void 0) writer.comment(closingTrailing);\n\telse writer.newline();\n}\nfunction streamHeader(writer, node) {\n\tlet done = false;\n\tconst walk = (parent) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (done) return;\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\" || child.kind === \"Comment\") continue;\n\t\t\tconst space = spaceBetween(writer.prevKind(), child.kind, false);\n\t\t\twriter.write(child, space);\n\t\t\tif (child.kind === \"LBrace\") {\n\t\t\t\tdone = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\twalk(node);\n}\nfunction walkRegion(writer, elements, closeKind, classify) {\n\tlet sawOpenBrace = closeKind === void 0;\n\tlet sawContent = false;\n\tlet lastWasRegular = false;\n\tlet ledByComment = false;\n\tlet newlines = 0;\n\tfor (let i = 0; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) {\n\t\t\tif (!sawOpenBrace) continue;\n\t\t\tconst member = classify(element);\n\t\t\tif (member === void 0) continue;\n\t\t\tif (!ledByComment) {\n\t\t\t\tif (newlines >= 2 && sawContent && !writer.lastIsBlank()) writer.blank();\n\t\t\t\telse if (separationBlankWanted(writer, member.category, sawContent, lastWasRegular)) writer.blank();\n\t\t\t}\n\t\t\tconst trailing = sameLineTrailingComment(elements, i);\n\t\t\tcloseContinuation(writer, member.emit(trailing.text));\n\t\t\tif (trailing.index !== void 0) i = trailing.index;\n\t\t\tsawContent = true;\n\t\t\tlastWasRegular = member.category !== \"blockAttribute\";\n\t\t\tledByComment = false;\n\t\t\tnewlines = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.kind === \"LBrace\" && closeKind === \"RBrace\" && !sawOpenBrace) {\n\t\t\tsawOpenBrace = true;\n\t\t\tnewlines = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!sawOpenBrace) continue;\n\t\tif (closeKind === \"RBrace\" && element.kind === \"RBrace\") break;\n\t\tif (element.kind === \"Whitespace\") continue;\n\t\tif (element.kind === \"Newline\") {\n\t\t\tnewlines += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.kind === \"Comment\") {\n\t\t\tif (closeKind === \"RBrace\" && newlines === 0 && !sawContent) continue;\n\t\t\tif (newlines >= 2 && sawContent && !writer.lastIsBlank()) writer.blank();\n\t\t\telse if (!ledByComment) {\n\t\t\t\tconst led = leadingMemberAfter(elements, i, classify);\n\t\t\t\tif (led && separationBlankWanted(writer, led, sawContent, lastWasRegular)) writer.blank();\n\t\t\t}\n\t\t\twriter.writeRaw(element.text);\n\t\t\twriter.newline();\n\t\t\tsawContent = true;\n\t\t\tledByComment = true;\n\t\t\tnewlines = 0;\n\t\t}\n\t}\n}\nfunction separationBlankWanted(writer, category, sawContent, lastWasRegular) {\n\tif (!sawContent || writer.lastIsBlank()) return false;\n\tif (category === \"nestedBlock\") return true;\n\treturn category === \"blockAttribute\" && lastWasRegular;\n}\nfunction leadingMemberAfter(elements, commentIndex, classify) {\n\tfor (let i = commentIndex + 1; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) return classify(element)?.category;\n\t\tif (element.kind === \"RBrace\") return void 0;\n\t}\n}\nfunction sameLineTrailingComment(elements, memberIndex) {\n\tfor (let i = memberIndex + 1; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) break;\n\t\tif (element.kind === \"Whitespace\") continue;\n\t\tif (element.kind === \"Comment\") return {\n\t\t\ttext: element.text,\n\t\t\tindex: i\n\t\t};\n\t\tbreak;\n\t}\n\treturn {\n\t\ttext: void 0,\n\t\tindex: void 0\n\t};\n}\nfunction sameLineCommentAfter(children, openIndex) {\n\tfor (let i = openIndex + 1; i < children.length; i++) {\n\t\tconst child = children[i];\n\t\tif (child === void 0) continue;\n\t\tif (child instanceof SyntaxNode) return void 0;\n\t\tif (child.kind === \"Whitespace\") continue;\n\t\tif (child.kind === \"Comment\") return child.text;\n\t\treturn;\n\t}\n}\nfunction alignmentMap(block) {\n\tconst fields = [];\n\tfor (const element of block.children()) {\n\t\tif (!(element instanceof SyntaxNode)) continue;\n\t\tif (FieldDeclarationAst.cast(element) === void 0) continue;\n\t\tif (hasInteriorComment(element)) continue;\n\t\tfields.push(element);\n\t}\n\tif (fields.length === 0) return void 0;\n\treturn alignmentColumns(fields);\n}\nfunction alignmentColumns(rows) {\n\tlet nameWidth = 0;\n\tfor (const row of rows) {\n\t\tconst field = FieldDeclarationAst.cast(row);\n\t\tif (!field) continue;\n\t\tnameWidth = Math.max(nameWidth, renderTokens(field.name()?.syntax).length);\n\t}\n\tconst typeColumn = nameWidth + 1;\n\tlet cellEnd = 0;\n\tfor (const row of rows) {\n\t\tconst field = FieldDeclarationAst.cast(row);\n\t\tif (!field) continue;\n\t\tconst name = renderTokens(field.name()?.syntax);\n\t\tconst type = renderTokens(field.typeAnnotation()?.syntax);\n\t\tcellEnd = Math.max(cellEnd, type.length > 0 ? typeColumn + type.length : name.length);\n\t}\n\treturn {\n\t\ttypeColumn,\n\t\tattributeColumn: cellEnd + 1\n\t};\n}\nfunction hasInteriorComment(node) {\n\tfor (const token of node.tokens()) if (token.kind === \"Comment\") return true;\n\treturn false;\n}\nfunction renderTokens(node) {\n\tif (!node) return \"\";\n\tlet out = \"\";\n\tlet prev;\n\tlet prevQualified = false;\n\tconst walk = (parent, qualified) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child, qualified || child.kind === \"QualifiedName\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\" || child.kind === \"Comment\") continue;\n\t\t\tif (spaceBetween(prev, child.kind, qualified && prevQualified)) out += \" \";\n\t\t\tout += child.text;\n\t\t\tprev = child.kind;\n\t\t\tprevQualified = qualified;\n\t\t}\n\t};\n\twalk(node, false);\n\treturn out;\n}\n//#endregion\n//#region src/format/error.ts\nfunction pslError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/format/options.ts\nfunction resolveFormatOptions(options) {\n\tconst indent = options?.indent ?? 2;\n\tif (indent !== \"tab\" && (typeof indent !== \"number\" || !Number.isInteger(indent) || indent < 1)) throw pslError(\"PSL.FORMAT_OPTION_INVALID\", `Invalid format options: indent must be a positive integer or 'tab', got ${String(indent)}`, { meta: {\n\t\toption: \"indent\",\n\t\treceived: String(indent)\n\t} });\n\tconst newline = options?.newline ?? \"LF\";\n\tif (newline !== \"LF\" && newline !== \"CRLF\") throw pslError(\"PSL.FORMAT_OPTION_INVALID\", `Invalid format options: newline must be 'LF' or 'CRLF', got ${String(newline)}`, { meta: {\n\t\toption: \"newline\",\n\t\treceived: String(newline)\n\t} });\n\treturn {\n\t\tindentUnit: indent === \"tab\" ? \"\t\" : \" \".repeat(indent),\n\t\tnewline: newline === \"CRLF\" ? \"\\r\\n\" : \"\\n\"\n\t};\n}\n//#endregion\n//#region src/format/format.ts\nfunction format(source, options) {\n\tconst resolved = resolveFormatOptions(options);\n\tconst { document, diagnostics } = parse(source);\n\tif (diagnostics.length > 0) throw pslError(\"PSL.PARSE_FAILED\", `Cannot format PSL with parse errors: ${diagnostics[0]?.message ?? \"unknown parse error\"}${diagnostics.length > 1 ? ` (and ${diagnostics.length - 1} more)` : \"\"}`, { meta: { diagnostics } });\n\treturn emitDocument(document, resolved.indentUnit, resolved.newline);\n}\n//#endregion\nexport { format };\n\n//# sourceMappingURL=format.mjs.map"],"mappings":";;;;AAIA,SAAS,aAAa,UAAU,YAAY,SAAS;CACpD,MAAM,SAAS,IAAI,WAAW,YAAY,OAAO;CACjD,aAAa,QAAQ,QAAQ;CAC7B,OAAO,OAAO,OAAO;AACtB;AACA,IAAI,aAAa,MAAM;CACtB;CACA;CACA,OAAO,CAAC;CACR,SAAS;CACT,QAAQ;CACR,YAAY;CACZ;CACA,gBAAgB;CAChB,cAAc;CACd,YAAY,YAAY,SAAS;EAChC,KAAKA,cAAc;EACnB,KAAKC,WAAW;CACjB;CACA,SAAS;EACR,KAAKC,UAAU;CAChB;CACA,WAAW;EACV,KAAKA,SAAS,KAAK,IAAI,GAAG,KAAKA,SAAS,CAAC;CAC1C;CACA,cAAc;EACb,OAAO,KAAKC;CACb;CACA,WAAW;EACV,OAAO,KAAKC;CACb;CACA,WAAW;EACV,OAAO,KAAKC;CACb;CACA,UAAU;EACT,IAAI,CAAC,KAAKD,WAAW;EACrB,KAAKE,KAAK,KAAK,GAAG,KAAKN,YAAY,OAAO,KAAKE,MAAM,IAAI,KAAKK,OAAO;EACrE,KAAKA,QAAQ;EACb,KAAKH,YAAY;EACjB,KAAKC,YAAY,KAAK;EACtB,KAAKF,gBAAgB;EACrB,KAAKK,cAAc;CACpB;CACA,QAAQ;EACP,KAAK,QAAQ;EAC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SAAS,IAAI,SAAS,YAAY,SAAS,EAAE,UAAU,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;CAC5P,OAAO,aAAa,UAAU,SAAS,YAAY,SAAS,OAAO;AACpE"}
|
|
1
|
+
{"version":3,"file":"psl-parser__format.mjs","names":["#indentUnit","#newline","#depth","#lastWasBlank","#lineOpen","#prevKind","#out","#line","#hasContent"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/format.mjs"],"sourcesContent":["import { x as SyntaxNode } from \"./expressions-CMQzbnHk.mjs\";\nimport { a as KeyValuePairAst, c as ModelDeclarationAst, d as TypesBlockAst, i as GenericBlockDeclarationAst, l as NamedTypeDeclarationAst, o as MixinDeclarationAst, r as FieldDeclarationAst, s as MixinInclusionAst, t as CompositeTypeDeclarationAst, u as NamespaceDeclarationAst, y as ModelAttributeAst } from \"./declarations-BgUAq1RG.mjs\";\nimport { t as parse } from \"./parse-bZgfjovA.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/format/emit.ts\nfunction emitDocument(document, indentUnit, newline) {\n\tconst writer = new LineWriter(indentUnit, newline);\n\temitTopLevel(writer, document);\n\treturn writer.finish();\n}\nvar LineWriter = class {\n\t#indentUnit;\n\t#newline;\n\t#out = [];\n\t#depth = 0;\n\t#line = \"\";\n\t#lineOpen = false;\n\t#prevKind;\n\t#lastWasBlank = false;\n\t#hasContent = false;\n\tconstructor(indentUnit, newline) {\n\t\tthis.#indentUnit = indentUnit;\n\t\tthis.#newline = newline;\n\t}\n\tindent() {\n\t\tthis.#depth += 1;\n\t}\n\tunindent() {\n\t\tthis.#depth = Math.max(0, this.#depth - 1);\n\t}\n\tlastIsBlank() {\n\t\treturn this.#lastWasBlank;\n\t}\n\tlineOpen() {\n\t\treturn this.#lineOpen;\n\t}\n\tprevKind() {\n\t\treturn this.#prevKind;\n\t}\n\tnewline() {\n\t\tif (!this.#lineOpen) return;\n\t\tthis.#out.push(`${this.#indentUnit.repeat(this.#depth)}${this.#line}`);\n\t\tthis.#line = \"\";\n\t\tthis.#lineOpen = false;\n\t\tthis.#prevKind = void 0;\n\t\tthis.#lastWasBlank = false;\n\t\tthis.#hasContent = true;\n\t}\n\tblank() {\n\t\tthis.newline();\n\t\tif (!this.#hasContent || this.#lastWasBlank) return;\n\t\tthis.#out.push(\"\");\n\t\tthis.#lastWasBlank = true;\n\t}\n\twrite(token, space, padTo) {\n\t\tif (this.#lineOpen && padTo !== void 0) this.#line = this.#line.padEnd(padTo);\n\t\telse if (this.#lineOpen && space) this.#line += \" \";\n\t\tthis.#line += token.text;\n\t\tthis.#lineOpen = true;\n\t\tthis.#prevKind = token.kind;\n\t}\n\twriteRaw(text) {\n\t\tthis.#line += text;\n\t\tthis.#lineOpen = true;\n\t}\n\tcomment(text) {\n\t\tif (this.#lineOpen) this.#line += ` ${text}`;\n\t\telse this.#line = text;\n\t\tthis.#lineOpen = true;\n\t\tthis.newline();\n\t}\n\tfinish() {\n\t\tthis.newline();\n\t\tconst body = this.#out.join(this.#newline);\n\t\treturn body.length > 0 ? `${body}${this.#newline}` : \"\";\n\t}\n};\nfunction spaceBetween(prev, cur, inQualifiedName) {\n\tif (prev === void 0) return false;\n\tif (inQualifiedName) return false;\n\tif (prev === \"Ident\" && cur === \"StringLiteral\") return false;\n\tswitch (cur) {\n\t\tcase \"LBracket\": return prev === \"Colon\" || prev === \"Comma\" || prev === \"Equals\";\n\t\tcase \"LParen\":\n\t\tcase \"RParen\":\n\t\tcase \"RBracket\":\n\t\tcase \"Comma\":\n\t\tcase \"Question\":\n\t\tcase \"Dot\":\n\t\tcase \"Colon\": return false;\n\t\tcase \"RBrace\": return prev !== \"LBrace\";\n\t\tdefault: break;\n\t}\n\tswitch (prev) {\n\t\tcase \"LParen\":\n\t\tcase \"LBracket\":\n\t\tcase \"Dot\":\n\t\tcase \"At\":\n\t\tcase \"DoubleAt\":\n\t\tcase \"Plus\": return false;\n\t\tdefault: return true;\n\t}\n}\nfunction streamNode(writer, node, padTo) {\n\tlet continuation = 0;\n\tlet first = true;\n\tlet prevQualified = false;\n\tconst walk = (parent, qualified) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child, qualified || child.kind === \"QualifiedName\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\") continue;\n\t\t\tif (child.kind === \"Comment\") {\n\t\t\t\twriter.comment(child.text);\n\t\t\t\twriter.indent();\n\t\t\t\tcontinuation += 1;\n\t\t\t\tprevQualified = false;\n\t\t\t\tfirst = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst pad = first ? padTo : void 0;\n\t\t\tconst space = spaceBetween(writer.prevKind(), child.kind, qualified && prevQualified);\n\t\t\twriter.write(child, space, writer.lineOpen() ? pad : void 0);\n\t\t\tprevQualified = qualified;\n\t\t\tfirst = false;\n\t\t}\n\t};\n\twalk(node, false);\n\treturn continuation;\n}\nfunction closeContinuation(writer, count) {\n\tfor (let i = 0; i < count; i++) writer.unindent();\n}\nfunction emitField(writer, field, alignmentColumns) {\n\treturn streamRow(writer, field.syntax, alignmentColumns);\n}\nfunction emitNamedType(writer, decl) {\n\treturn streamRow(writer, decl.syntax, void 0);\n}\nfunction streamRow(writer, row, alignmentColumns) {\n\tlet continuation = 0;\n\tlet sawAttribute = false;\n\tfor (const child of row.children()) {\n\t\tif (child instanceof SyntaxNode) {\n\t\t\tlet padTo;\n\t\t\tif (child.kind === \"TypeAnnotation\" && continuation === 0) padTo = alignmentColumns?.typeColumn;\n\t\t\telse if (child.kind === \"FieldAttribute\") {\n\t\t\t\tif (continuation > 0) writer.newline();\n\t\t\t\telse if (!sawAttribute) padTo = alignmentColumns?.attributeColumn;\n\t\t\t\tsawAttribute = true;\n\t\t\t}\n\t\t\tcontinuation += streamNode(writer, child, padTo);\n\t\t\tcontinue;\n\t\t}\n\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\") continue;\n\t\tif (child.kind === \"Comment\") {\n\t\t\twriter.comment(child.text);\n\t\t\twriter.indent();\n\t\t\tcontinuation += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst space = spaceBetween(writer.prevKind(), child.kind, false);\n\t\twriter.write(child, space);\n\t}\n\treturn continuation;\n}\nfunction emitBlockAttribute(writer, attribute) {\n\treturn streamNode(writer, attribute.syntax);\n}\nfunction emitKeyValue(writer, pair) {\n\treturn streamNode(writer, pair.syntax);\n}\nfunction leafMember(writer, category, print) {\n\treturn {\n\t\tcategory,\n\t\temit(trailing) {\n\t\t\tconst continuation = print();\n\t\t\tif (trailing !== void 0) writer.comment(trailing);\n\t\t\telse writer.newline();\n\t\t\treturn continuation;\n\t\t}\n\t};\n}\nfunction inclusionMember(writer, node) {\n\tconst inclusion = MixinInclusionAst.cast(node);\n\tif (inclusion === void 0) return void 0;\n\treturn leafMember(writer, \"regular\", () => streamNode(writer, inclusion.syntax));\n}\nfunction fieldBodyMembers(writer, block) {\n\tconst alignmentColumns = alignmentMap(block);\n\treturn (node) => {\n\t\tconst field = FieldDeclarationAst.cast(node);\n\t\tif (field) return leafMember(writer, \"regular\", () => emitField(writer, field, alignmentColumns));\n\t\tconst attribute = ModelAttributeAst.cast(node);\n\t\tif (attribute) return leafMember(writer, \"blockAttribute\", () => emitBlockAttribute(writer, attribute));\n\t\treturn inclusionMember(writer, node);\n\t};\n}\nfunction entryBodyMembers(writer, block) {\n\tconst alignment = alignmentMap(block);\n\treturn (node) => {\n\t\tconst field = FieldDeclarationAst.cast(node);\n\t\tif (field) return leafMember(writer, \"regular\", () => emitField(writer, field, alignment));\n\t\tconst entry = KeyValuePairAst.cast(node);\n\t\tif (entry) return leafMember(writer, \"regular\", () => emitKeyValue(writer, entry));\n\t\tconst attribute = ModelAttributeAst.cast(node);\n\t\tif (attribute) return leafMember(writer, \"blockAttribute\", () => emitBlockAttribute(writer, attribute));\n\t\treturn inclusionMember(writer, node);\n\t};\n}\nfunction emitModel(writer, model, trailing) {\n\temitBlockBody(writer, model.syntax, trailing, fieldBodyMembers(writer, model.syntax));\n}\nfunction emitCompositeType(writer, composite, trailing) {\n\temitBlockBody(writer, composite.syntax, trailing, fieldBodyMembers(writer, composite.syntax));\n}\nfunction emitGenericBlock(writer, block, trailing) {\n\temitBlockBody(writer, block.syntax, trailing, entryBodyMembers(writer, block.syntax));\n}\nconst FIELD_BODY_KEYWORDS = /* @__PURE__ */ new Set([\"model\", \"type\"]);\nfunction emitMixinDeclaration(writer, mixin, trailing) {\n\tconst members = FIELD_BODY_KEYWORDS.has(mixin.keyword()?.text ?? \"\") ? fieldBodyMembers(writer, mixin.syntax) : entryBodyMembers(writer, mixin.syntax);\n\temitBlockBody(writer, mixin.syntax, trailing, members);\n}\nfunction emitNamespace(writer, namespace, trailing) {\n\temitBlockBody(writer, namespace.syntax, trailing, (node) => {\n\t\tconst declaration = castBlockDeclaration(node);\n\t\tif (declaration) return nestedBlockMember(writer, declaration);\n\t});\n}\nfunction emitTypesBlock(writer, block, trailing) {\n\temitBlockBody(writer, block.syntax, trailing, (node) => {\n\t\tconst named = NamedTypeDeclarationAst.cast(node);\n\t\tif (named) return leafMember(writer, \"regular\", () => emitNamedType(writer, named));\n\t});\n}\nfunction emitTopLevel(writer, document) {\n\twalkRegion(writer, Array.from(document.syntax.children()), void 0, (node) => {\n\t\tconst declaration = castTopLevelDeclaration(node);\n\t\tif (declaration) return nestedBlockMember(writer, declaration);\n\t});\n}\nfunction nestedBlockMember(writer, block) {\n\treturn {\n\t\tcategory: \"nestedBlock\",\n\t\temit(trailing) {\n\t\t\tblock(writer, trailing);\n\t\t\treturn 0;\n\t\t}\n\t};\n}\nfunction castBlockDeclaration(node) {\n\tconst model = ModelDeclarationAst.cast(node);\n\tif (model) return (writer, trailing) => emitModel(writer, model, trailing);\n\tconst composite = CompositeTypeDeclarationAst.cast(node);\n\tif (composite) return (writer, trailing) => emitCompositeType(writer, composite, trailing);\n\tconst generic = GenericBlockDeclarationAst.cast(node);\n\tif (generic) return (writer, trailing) => emitGenericBlock(writer, generic, trailing);\n\tconst mixin = MixinDeclarationAst.cast(node);\n\tif (mixin) return (writer, trailing) => emitMixinDeclaration(writer, mixin, trailing);\n}\nfunction castTopLevelDeclaration(node) {\n\tconst block = castBlockDeclaration(node);\n\tif (block) return block;\n\tconst namespace = NamespaceDeclarationAst.cast(node);\n\tif (namespace) return (writer, trailing) => emitNamespace(writer, namespace, trailing);\n\tconst types = TypesBlockAst.cast(node);\n\tif (types) return (writer, trailing) => emitTypesBlock(writer, types, trailing);\n}\nfunction emitBlockBody(writer, node, closingTrailing, classify) {\n\tconst children = Array.from(node.children());\n\tconst openIndex = children.findIndex((el) => !(el instanceof SyntaxNode) && el.kind === \"LBrace\");\n\tconst headerComments = streamHeader(writer, node);\n\tconst openingComment = sameLineCommentAfter(children, openIndex);\n\tif (openingComment !== void 0) headerComments.push(openingComment);\n\tconst [firstComment, ...otherComments] = headerComments;\n\tif (firstComment !== void 0) writer.comment(firstComment);\n\telse writer.newline();\n\twriter.indent();\n\tfor (const comment of otherComments) writer.comment(comment);\n\twalkRegion(writer, children, \"RBrace\", classify);\n\twriter.unindent();\n\twriter.writeRaw(\"}\");\n\tif (closingTrailing !== void 0) writer.comment(closingTrailing);\n\telse writer.newline();\n}\n/** Writes the block header through `{` and returns the source comments found before the `{`. */\nfunction streamHeader(writer, node) {\n\tconst comments = [];\n\tlet done = false;\n\tconst walk = (parent) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (done) return;\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Comment\") {\n\t\t\t\tcomments.push(child.text);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\") continue;\n\t\t\tconst space = spaceBetween(writer.prevKind(), child.kind, false);\n\t\t\twriter.write(child, space);\n\t\t\tif (child.kind === \"LBrace\") {\n\t\t\t\tdone = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\twalk(node);\n\treturn comments;\n}\nfunction walkRegion(writer, elements, closeKind, classify) {\n\tlet sawOpenBrace = closeKind === void 0;\n\tlet sawContent = false;\n\tlet lastWasRegular = false;\n\tlet ledByComment = false;\n\tlet newlines = 0;\n\tfor (let i = 0; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) {\n\t\t\tif (!sawOpenBrace) continue;\n\t\t\tconst member = classify(element);\n\t\t\tif (member === void 0) throw new InternalError(`Formatter has no rule for a ${element.kind} node at offset ${element.offset}; formatting would drop its text`);\n\t\t\tif (!ledByComment) {\n\t\t\t\tif (newlines >= 2 && sawContent && !writer.lastIsBlank()) writer.blank();\n\t\t\t\telse if (separationBlankWanted(writer, member.category, sawContent, lastWasRegular)) writer.blank();\n\t\t\t}\n\t\t\tconst trailing = sameLineTrailingComment(elements, i);\n\t\t\tcloseContinuation(writer, member.emit(trailing.text));\n\t\t\tif (trailing.index !== void 0) i = trailing.index;\n\t\t\tsawContent = true;\n\t\t\tlastWasRegular = member.category !== \"blockAttribute\";\n\t\t\tledByComment = false;\n\t\t\tnewlines = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.kind === \"LBrace\" && closeKind === \"RBrace\" && !sawOpenBrace) {\n\t\t\tsawOpenBrace = true;\n\t\t\tnewlines = 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!sawOpenBrace) continue;\n\t\tif (closeKind === \"RBrace\" && element.kind === \"RBrace\") break;\n\t\tif (element.kind === \"Whitespace\") continue;\n\t\tif (element.kind === \"Newline\") {\n\t\t\tnewlines += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.kind === \"Comment\") {\n\t\t\tif (closeKind === \"RBrace\" && newlines === 0 && !sawContent) continue;\n\t\t\tif (newlines >= 2 && sawContent && !writer.lastIsBlank()) writer.blank();\n\t\t\telse if (!ledByComment) {\n\t\t\t\tconst led = leadingMemberAfter(elements, i, classify);\n\t\t\t\tif (led && separationBlankWanted(writer, led, sawContent, lastWasRegular)) writer.blank();\n\t\t\t}\n\t\t\twriter.writeRaw(element.text);\n\t\t\twriter.newline();\n\t\t\tsawContent = true;\n\t\t\tledByComment = true;\n\t\t\tnewlines = 0;\n\t\t}\n\t}\n}\nfunction separationBlankWanted(writer, category, sawContent, lastWasRegular) {\n\tif (!sawContent || writer.lastIsBlank()) return false;\n\tif (category === \"nestedBlock\") return true;\n\treturn category === \"blockAttribute\" && lastWasRegular;\n}\nfunction leadingMemberAfter(elements, commentIndex, classify) {\n\tfor (let i = commentIndex + 1; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) return classify(element)?.category;\n\t\tif (element.kind === \"RBrace\") return void 0;\n\t}\n}\nfunction sameLineTrailingComment(elements, memberIndex) {\n\tfor (let i = memberIndex + 1; i < elements.length; i++) {\n\t\tconst element = elements[i];\n\t\tif (element === void 0) continue;\n\t\tif (element instanceof SyntaxNode) break;\n\t\tif (element.kind === \"Whitespace\") continue;\n\t\tif (element.kind === \"Comment\") return {\n\t\t\ttext: element.text,\n\t\t\tindex: i\n\t\t};\n\t\tbreak;\n\t}\n\treturn {\n\t\ttext: void 0,\n\t\tindex: void 0\n\t};\n}\nfunction sameLineCommentAfter(children, openIndex) {\n\tfor (let i = openIndex + 1; i < children.length; i++) {\n\t\tconst child = children[i];\n\t\tif (child === void 0) continue;\n\t\tif (child instanceof SyntaxNode) return void 0;\n\t\tif (child.kind === \"Whitespace\") continue;\n\t\tif (child.kind === \"Comment\") return child.text;\n\t\treturn;\n\t}\n}\nfunction alignmentMap(block) {\n\tconst fields = [];\n\tfor (const element of block.children()) {\n\t\tif (!(element instanceof SyntaxNode)) continue;\n\t\tif (FieldDeclarationAst.cast(element) === void 0) continue;\n\t\tif (hasInteriorComment(element)) continue;\n\t\tfields.push(element);\n\t}\n\tif (fields.length === 0) return void 0;\n\treturn alignmentColumns(fields);\n}\nfunction alignmentColumns(rows) {\n\tlet nameWidth = 0;\n\tfor (const row of rows) {\n\t\tconst field = FieldDeclarationAst.cast(row);\n\t\tif (!field) continue;\n\t\tnameWidth = Math.max(nameWidth, renderTokens(field.name()?.syntax).length);\n\t}\n\tconst typeColumn = nameWidth + 1;\n\tlet cellEnd = 0;\n\tfor (const row of rows) {\n\t\tconst field = FieldDeclarationAst.cast(row);\n\t\tif (!field) continue;\n\t\tconst name = renderTokens(field.name()?.syntax);\n\t\tconst type = renderTokens(field.typeAnnotation()?.syntax);\n\t\tcellEnd = Math.max(cellEnd, type.length > 0 ? typeColumn + type.length : name.length);\n\t}\n\treturn {\n\t\ttypeColumn,\n\t\tattributeColumn: cellEnd + 1\n\t};\n}\nfunction hasInteriorComment(node) {\n\tfor (const token of node.tokens()) if (token.kind === \"Comment\") return true;\n\treturn false;\n}\nfunction renderTokens(node) {\n\tif (!node) return \"\";\n\tlet out = \"\";\n\tlet prev;\n\tlet prevQualified = false;\n\tconst walk = (parent, qualified) => {\n\t\tfor (const child of parent.children()) {\n\t\t\tif (child instanceof SyntaxNode) {\n\t\t\t\twalk(child, qualified || child.kind === \"QualifiedName\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (child.kind === \"Whitespace\" || child.kind === \"Newline\" || child.kind === \"Comment\") continue;\n\t\t\tif (spaceBetween(prev, child.kind, qualified && prevQualified)) out += \" \";\n\t\t\tout += child.text;\n\t\t\tprev = child.kind;\n\t\t\tprevQualified = qualified;\n\t\t}\n\t};\n\twalk(node, false);\n\treturn out;\n}\n//#endregion\n//#region src/format/error.ts\nfunction pslError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/format/options.ts\nfunction resolveFormatOptions(options) {\n\tconst indent = options?.indent ?? 2;\n\tif (indent !== \"tab\" && (typeof indent !== \"number\" || !Number.isInteger(indent) || indent < 1)) throw pslError(\"PSL.FORMAT_OPTION_INVALID\", `Invalid format options: indent must be a positive integer or 'tab', got ${String(indent)}`, { meta: {\n\t\toption: \"indent\",\n\t\treceived: String(indent)\n\t} });\n\tconst newline = options?.newline ?? \"LF\";\n\tif (newline !== \"LF\" && newline !== \"CRLF\") throw pslError(\"PSL.FORMAT_OPTION_INVALID\", `Invalid format options: newline must be 'LF' or 'CRLF', got ${String(newline)}`, { meta: {\n\t\toption: \"newline\",\n\t\treceived: String(newline)\n\t} });\n\treturn {\n\t\tindentUnit: indent === \"tab\" ? \"\t\" : \" \".repeat(indent),\n\t\tnewline: newline === \"CRLF\" ? \"\\r\\n\" : \"\\n\"\n\t};\n}\n//#endregion\n//#region src/format/format.ts\nfunction format(source, options, parserOptions = {}) {\n\tconst resolved = resolveFormatOptions(options);\n\tconst { document, diagnostics } = parse(source, \"<format-input>.psl\", parserOptions);\n\tif (diagnostics.length > 0) throw pslError(\"PSL.PARSE_FAILED\", `Cannot format PSL with parse errors: ${diagnostics[0]?.message ?? \"unknown parse error\"}${diagnostics.length > 1 ? ` (and ${diagnostics.length - 1} more)` : \"\"}`, { meta: { diagnostics } });\n\treturn emitDocument(document, resolved.indentUnit, resolved.newline);\n}\n//#endregion\nexport { format, resolveFormatOptions };\n\n//# sourceMappingURL=format.mjs.map"],"mappings":";;;;;;AAMA,SAAS,aAAa,UAAU,YAAY,SAAS;CACpD,MAAM,SAAS,IAAI,WAAW,YAAY,OAAO;CACjD,aAAa,QAAQ,QAAQ;CAC7B,OAAO,OAAO,OAAO;AACtB;AACA,IAAI,aAAa,MAAM;CACtB;CACA;CACA,OAAO,CAAC;CACR,SAAS;CACT,QAAQ;CACR,YAAY;CACZ;CACA,gBAAgB;CAChB,cAAc;CACd,YAAY,YAAY,SAAS;EAChC,KAAKA,cAAc;EACnB,KAAKC,WAAW;CACjB;CACA,SAAS;EACR,KAAKC,UAAU;CAChB;CACA,WAAW;EACV,KAAKA,SAAS,KAAK,IAAI,GAAG,KAAKA,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AW,QAAQ,MAAM,IAAI,OAAO,MAAM;EACtD,SAAS,YAAY,SAAS,SAAS;CACxC;AACD;AAGA,SAAS,OAAO,QAAQ,SAAS,gBAAgB,CAAC,GAAG;CACpD,MAAM,WAAW,qBAAqB,OAAO;CAC7C,MAAM,EAAE,UAAU,gBAAgB,MAAM,QAAQ,sBAAsB,aAAa;CACnF,IAAI,YAAY,SAAS,GAAG,MAAM,SAAS,oBAAoB,wCAAwC,YAAY,EAAE,EAAE,WAAW,wBAAwB,YAAY,SAAS,IAAI,SAAS,YAAY,SAAS,EAAE,UAAU,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;CAC5P,OAAO,aAAa,UAAU,SAAS,YAAY,SAAS,OAAO;AACpE"}
|
|
@@ -1,9 +1,54 @@
|
|
|
1
|
-
import { t as Contract } from "./contract-types-
|
|
2
|
-
import { r as Result } from "./result-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { t as Contract } from "./contract-types-DEIEpzU_-DvAVuBr5.mjs";
|
|
2
|
+
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
3
|
+
import { E as AuthoringPslBlockDescriptorNamespace, Jt as instantiateAuthoringFieldPreset, K as DataTypeSupport, M as AuthoringTypeConstructorDescriptor, g as AuthoringFieldPresetDescriptor, i as AuthoringArgumentDescriptor, vt as PslSpan } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
4
|
+
import "./authoring-CjwinhU5.mjs";
|
|
5
|
+
import "./psl-ast-COcYtLlz.mjs";
|
|
6
|
+
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-BTFT7QfJ.mjs";
|
|
7
|
+
import { B as PslDiagnosticCollector, V as PslSources, d as DiagnosticSource, f as DocumentAst, z as PslDiagnostic } from "./parse-djL5wker-B610mXG4.mjs";
|
|
8
|
+
import { Ct as ResolvedAttributeArg, Et as ResolvedTypeConstructorCall, L as FieldSymbol, kt as SymbolTable, l as Binder, p as BlockSymbol } from "./binder-D_4RBHbt-BJ6VKwEZ.mjs";
|
|
6
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
10
|
+
//#region src/authoring-arguments.d.ts
|
|
11
|
+
interface MapPslHelperArgsInput {
|
|
12
|
+
readonly args: readonly ResolvedAttributeArg[];
|
|
13
|
+
readonly descriptors: readonly AuthoringArgumentDescriptor[];
|
|
14
|
+
readonly helperLabel: string;
|
|
15
|
+
readonly span: PslSpan;
|
|
16
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
17
|
+
readonly source: DiagnosticSource;
|
|
18
|
+
readonly entityLabel: string;
|
|
19
|
+
/** The stack's data types, which a `value` argument is read as. ADR 254. */
|
|
20
|
+
readonly dataTypes: DataTypeSupport;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 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.
|
|
24
|
+
*/
|
|
25
|
+
declare function mapPslHelperArgs(input: MapPslHelperArgsInput): readonly unknown[] | undefined;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/enum-member-attributes.d.ts
|
|
28
|
+
declare function enumMemberAttributeDiagnostics(enumBlock: BlockSymbol, sources: PslSources): PslDiagnostic[];
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/field-presets.d.ts
|
|
31
|
+
declare function reportPresetNotCalled(input: {
|
|
32
|
+
readonly entityLabel: string;
|
|
33
|
+
readonly presetPath: string;
|
|
34
|
+
readonly source: DiagnosticSource;
|
|
35
|
+
readonly span: PslSpan;
|
|
36
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
37
|
+
}): void;
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
*
|
|
41
|
+
* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.
|
|
42
|
+
*/
|
|
43
|
+
declare function instantiatePslFieldPreset(input: {
|
|
44
|
+
readonly call: ResolvedTypeConstructorCall;
|
|
45
|
+
readonly descriptor: AuthoringFieldPresetDescriptor;
|
|
46
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
47
|
+
readonly source: DiagnosticSource;
|
|
48
|
+
readonly entityLabel: string;
|
|
49
|
+
readonly dataTypes: DataTypeSupport;
|
|
50
|
+
}): ReturnType<typeof instantiateAuthoringFieldPreset> | undefined;
|
|
51
|
+
//#endregion
|
|
7
52
|
//#region src/interpret.d.ts
|
|
8
53
|
/**
|
|
9
54
|
* Lets editor tooling that already parses incrementally (e.g. the language
|
|
@@ -11,13 +56,13 @@ import { f as SymbolTable } from "./symbol-table-CZ7EVCTL-CR-ncCpD.mjs";
|
|
|
11
56
|
* disk re-parse.
|
|
12
57
|
*/
|
|
13
58
|
interface PslInterpretInput {
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
59
|
+
readonly documents: readonly DocumentAst[];
|
|
60
|
+
readonly sources: PslSources;
|
|
16
61
|
readonly symbolTable: SymbolTable;
|
|
17
|
-
readonly
|
|
62
|
+
readonly binder: Binder;
|
|
18
63
|
}
|
|
19
64
|
/**
|
|
20
|
-
* Declared here — the authoring layer that owns `DocumentAst` / `
|
|
65
|
+
* Declared here — the authoring layer that owns `DocumentAst` / `PslSources` /
|
|
21
66
|
* `SymbolTable` — because `@internal/config` (core) cannot name authoring
|
|
22
67
|
* types. `interpret` must not read disk or `context.resolvedInputs` — those
|
|
23
68
|
* are load-path concerns.
|
|
@@ -35,5 +80,48 @@ declare function withSeedDiagnostics(result: Result<Contract, ContractSourceDiag
|
|
|
35
80
|
/** The single seam that narrows a contract source to the interpret capability. */
|
|
36
81
|
declare function hasPslInterpreter(source: ContractSourceProvider): source is PslInterpretCapable;
|
|
37
82
|
//#endregion
|
|
38
|
-
|
|
83
|
+
//#region src/relation-backrelations.d.ts
|
|
84
|
+
/**
|
|
85
|
+
* An FK-side relation that was rejected (for example by the nullability check) and so never
|
|
86
|
+
* became relation metadata. Its back-relation candidate is not orphaned; the FK-side diagnostic
|
|
87
|
+
* already names the problem.
|
|
88
|
+
*/
|
|
89
|
+
type InvalidFkPairing = {
|
|
90
|
+
readonly pairKey: string;
|
|
91
|
+
readonly relationName?: string;
|
|
92
|
+
};
|
|
93
|
+
declare function fkRelationPairKey(declaringModelName: string, targetModelName: string): string;
|
|
94
|
+
/**
|
|
95
|
+
* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair
|
|
96
|
+
* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.
|
|
97
|
+
* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.
|
|
98
|
+
*/
|
|
99
|
+
declare function consumeInvalidFkPairing(candidate: {
|
|
100
|
+
readonly relationName?: string;
|
|
101
|
+
}, pairKey: string, invalidFkPairings: InvalidFkPairing[]): boolean;
|
|
102
|
+
declare function requiredOneToOneBackrelationDiagnostic(input: {
|
|
103
|
+
readonly modelName: string;
|
|
104
|
+
readonly field: FieldSymbol;
|
|
105
|
+
readonly targetModelName: string;
|
|
106
|
+
readonly sources: PslSources;
|
|
107
|
+
readonly recordNoun: 'row' | 'document';
|
|
108
|
+
}): PslDiagnostic;
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/type-constructor-calls.d.ts
|
|
111
|
+
declare function isBareTypeConstructor(descriptor: AuthoringTypeConstructorDescriptor): boolean;
|
|
112
|
+
declare function reportTypeConstructorNotCalled(input: {
|
|
113
|
+
readonly entityLabel: string;
|
|
114
|
+
readonly path: string;
|
|
115
|
+
readonly descriptor: AuthoringTypeConstructorDescriptor;
|
|
116
|
+
readonly source: DiagnosticSource;
|
|
117
|
+
readonly span: PslSpan;
|
|
118
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
119
|
+
}): void;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/unclaimed-blocks.d.ts
|
|
122
|
+
/** A generic block is read only when a composed descriptor claims its keyword. */
|
|
123
|
+
declare function claimedBlockKeywords(descriptors: AuthoringPslBlockDescriptorNamespace | undefined): ReadonlySet<string>;
|
|
124
|
+
declare function unsupportedBlockDiagnostic(block: BlockSymbol, sources: PslSources): PslDiagnostic;
|
|
125
|
+
//#endregion
|
|
126
|
+
export { type InvalidFkPairing, type PslInterpretCapable, type PslInterpretInput, claimedBlockKeywords, consumeInvalidFkPairing, enumMemberAttributeDiagnostics, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic, withSeedDiagnostics };
|
|
39
127
|
//# sourceMappingURL=psl-parser__interpret.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":";;;;;;;;;;UAQU;WACC,eAAe;WACf,sBAAsB;WACtB;WACA,MAAM;WACN,aAAa;WACb,QAAQ;WACR;;WAEA,WAAW;;;;;iBAKL,iBAAiB,OAAO;;;iBAGxB,+BAA+B,WAAW,aAAa,SAAS,aAAa;;;iBAG7E,sBAAsB;WAC5B;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;;;iBAOP,0BAA0B;WAChC,MAAM;WACN,YAAY;WACZ,aAAa;WACb,QAAQ;WACR;WACA,WAAW;IAClB,kBAAkB;;;;;;;;UAQZ;WACC,oBAAoB;WACpB,SAAS;WACT,aAAa;WACb,QAAQ;;;;;;;;UAQT,4BAA4B;EACpC,UAAU,OAAO,mBAAmB,SAAS,wBAAwB,OAAO,UAAU;;;;;;;;iBAQvE,oBAAoB,QAAQ,OAAO,UAAU,4BAA4B,0BAA0B,6BAA6B,OAAO,UAAU;;iBAEjJ,kBAAkB,QAAQ,yBAAyB,UAAU;;;;;;;;KAQzE;WACM;WACA;;iBAEM,kBAAkB,4BAA4B;;;;;;iBAM9C,wBAAwB;WAC9B;GACR,iBAAiB,mBAAmB;iBACtB,uCAAuC;WAC7C;WACA,OAAO;WACP;WACA,SAAS;WACT;IACP;;;iBAGa,sBAAsB,YAAY;iBAClC,+BAA+B;WACrC;WACA;WACA,YAAY;WACZ,QAAQ;WACR,MAAM;WACN,aAAa;;;;;iBAKP,qBAAqB,aAAa,mDAAmD;iBACrF,2BAA2B,OAAO,aAAa,SAAS,aAAa"}
|