@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-authoring-DDxddXZm-uZYdhoE0.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-DDxddXZm.d.mts"],"mappings":";;;;;;;UAMU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;WACP,OAAO,SAAS;;UAEjB;WACC;WACA;WACA;WACA;;;KAGN;WACM;WACA,cAAc;;KAEpB;WACM;WACA,OAAO;;WAEP;WACA,YAAY;;UAEb;WACC;;UAED;WACC;WACA,MAAM;WACN,MAAM,SAAS;;UAEhB;WACC;WACA,QAAQ;aACN,MAAM;aACN,SAAS;QACd;WACG;;KAEN,iCAAiC,oBAAoB;UAChD;WACC,yBAAyB;WACzB,+BAA+B;;;UAGhC,yCAAyC;;WAExC,yBAAyB;;;;;KAK/B;;UAEK;WACC;WACA,YAAY,SAAS;;WAErB;;;UAGD;WACC;WACA,MAAM,SAAS;;;KAGrB;WACM;WACA,WAAW;;WAEX;WACA;;;UAGD;WACC,MAAM,SAAS;WACf;;UAED;WACC;;WAEA;WACA,UAAU;aACR,MAAM,SAAS;aACf,OAAO;QACZ;;WAEG,iBAAiB,WAAW,+BAA+B,OAAO,2BAA2B;;UAE9F;WACC;;WAEA;WACA,mBAAmB;;UAEpB;WACC;WACA;;KAEN;WACM;WACA,WAAW;;WAEX;WACA;WACA;;WAEA;WACA;WACA;;;UAGD;WACC,MAAM;WACN;;UAED;EACR,aAAa,2BAA2B;EACxC,IAAI;EACJ,QAAQ,MAAM,uBAAuB,OAAO,yBAAyB;EACrE,QAAQ,WAAW,+BAA+B,OAAO,yBAAyB;;;UAG1E;WACC;WACA,8BAA8B;WAC9B;aACE,+BAA+B;;;;;;iBAM3B,2BAA2B,aAAa,cAAc,8BAA8B;;;;iBAIpF,uBAAuB;WAC7B;WACA;WACA,mBAAmB,OAAO,2BAA2B,SAAS;IACrE;;cAEU,2BAA2B;;;UAG/B;WACC;WACA;;;;;KAKN;WACM;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AAY,oCAAoC,2BAA2B;;UAEtH;WACC,MAAM;WACN,WAAW;WACX,WAAW;;iBAEL,8BAA8B,YAAY,+BAA+B;;;;iBAIzE,2BAA2B;WACjC;WACA,YAAY;WACZ,oBAAoB;WACpB;IACP;;UAEM;WACC,oBAAoB;WACpB,iBAAiB,oBAAoB;WACrC,cAAc,OAAO,KAAK;;;;;iBAKpB,uBAAuB,WAAW,wBAAwB,SAAS;;;;iBAInE,8CAA8C,YAAY,oCAAoC,4BAA4B,cAAc,wCAAwC,OAAO,6BAA6B;iBACpN,+BAA+B,mBAAmB,oBAAoB,YAAY,+BAA+B,0BAA0B,KAAK,yBAAyB;iBACzK,gCAAgC,YAAY,gCAAgC;WAClF,YAAY;WACZ;WACA,UAAU;WACV,oBAAoB;WACpB;WACA"}
|
|
@@ -1,84 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region ../../../1-framework/1-core/framework-components/dist/framework-components-hZ2tO-KH.d.mts
|
|
6
|
-
//#region src/shared/mutation-default-types.d.ts
|
|
7
|
-
interface SourcePosition {
|
|
8
|
-
readonly offset: number;
|
|
9
|
-
readonly line: number;
|
|
10
|
-
readonly column: number;
|
|
11
|
-
}
|
|
12
|
-
interface SourceSpan {
|
|
13
|
-
readonly start: SourcePosition;
|
|
14
|
-
readonly end: SourcePosition;
|
|
15
|
-
}
|
|
16
|
-
interface SourceDiagnostic {
|
|
17
|
-
readonly code: string;
|
|
18
|
-
readonly message: string;
|
|
19
|
-
readonly sourceId?: string;
|
|
20
|
-
readonly span?: SourceSpan;
|
|
21
|
-
readonly data?: Readonly<Record<string, unknown>>;
|
|
22
|
-
}
|
|
23
|
-
interface DefaultFunctionLoweringContext {
|
|
24
|
-
readonly sourceId: string;
|
|
25
|
-
readonly modelName: string;
|
|
26
|
-
readonly fieldName: string;
|
|
27
|
-
readonly columnCodecId?: string;
|
|
28
|
-
}
|
|
29
|
-
type LoweredDefaultValue = {
|
|
30
|
-
readonly kind: 'storage';
|
|
31
|
-
readonly defaultValue: ColumnDefault;
|
|
32
|
-
} | {
|
|
33
|
-
readonly kind: 'execution';
|
|
34
|
-
readonly generated: ExecutionMutationDefaultValue;
|
|
35
|
-
};
|
|
36
|
-
type LoweredDefaultResult = {
|
|
37
|
-
readonly ok: true;
|
|
38
|
-
readonly value: LoweredDefaultValue;
|
|
39
|
-
} | {
|
|
40
|
-
readonly ok: false;
|
|
41
|
-
readonly diagnostic: SourceDiagnostic;
|
|
42
|
-
};
|
|
43
|
-
interface MutationDefaultGeneratorDescriptor {
|
|
44
|
-
readonly id: string;
|
|
45
|
-
/**
|
|
46
|
-
* Codec ids the generator is compatible with when the codec choice
|
|
47
|
-
* and the generator choice are made independently by the contract
|
|
48
|
-
* author. Set when the registry-coherence check is meaningful
|
|
49
|
-
* (the codec and the generator can be paired arbitrarily by the
|
|
50
|
-
* caller); omitted when the generator is only reachable through a
|
|
51
|
-
* descriptor that co-registers a fixed codec, so coherence is
|
|
52
|
-
* structural and the list would be tautological.
|
|
53
|
-
*/
|
|
54
|
-
readonly applicableCodecIds?: readonly string[];
|
|
55
|
-
/**
|
|
56
|
-
* Construct the `onCreate`/`onUpdate` phases value owned by this
|
|
57
|
-
* generator. Authoring layers (PSL `temporal.updatedAt()`, TS field presets) call
|
|
58
|
-
* this instead of building the literal inline so PSL/TS-authored
|
|
59
|
-
* contracts stay byte-equivalent for any future params-bearing generator.
|
|
60
|
-
*/
|
|
61
|
-
readonly buildPhases?: (args?: Record<string, unknown>) => ExecutionMutationDefaultPhases;
|
|
62
|
-
}
|
|
63
|
-
interface TypedDefaultFunctionCall {
|
|
64
|
-
readonly fn: string;
|
|
65
|
-
readonly span: SourceSpan;
|
|
66
|
-
readonly args: Readonly<Record<string, unknown>>;
|
|
67
|
-
}
|
|
68
|
-
interface ControlMutationDefaultEntry {
|
|
69
|
-
readonly signature?: unknown;
|
|
70
|
-
readonly lower: (input: {
|
|
71
|
-
readonly call: TypedDefaultFunctionCall;
|
|
72
|
-
readonly context: DefaultFunctionLoweringContext;
|
|
73
|
-
}) => LoweredDefaultResult;
|
|
74
|
-
readonly usageSignatures?: readonly string[];
|
|
75
|
-
}
|
|
76
|
-
type ControlMutationDefaultRegistry = ReadonlyMap<string, ControlMutationDefaultEntry>;
|
|
77
|
-
interface ControlMutationDefaults {
|
|
78
|
-
readonly defaultFunctionRegistry: ControlMutationDefaultRegistry;
|
|
79
|
-
readonly generatorDescriptors: readonly MutationDefaultGeneratorDescriptor[];
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
1
|
+
import { _ as DataType, t as AnyCodecDescriptor } from "./codec-types-CPgEZoIq-BL9hisr8.mjs";
|
|
2
|
+
import { $ as GeneratorFunctionContribution, W as ControlMutationDefaults, s as AuthoringContributions } from "./framework-authoring-DDxddXZm-uZYdhoE0.mjs";
|
|
3
|
+
import { l as TypesImportSpec, t as AggregateDescriptor } from "./types-import-spec-DQjfX-gM-zVncuzs0.mjs";
|
|
4
|
+
//#region ../../../1-framework/1-core/framework-components/dist/framework-components-DKoQnPdB.d.mts
|
|
82
5
|
//#region src/shared/framework-components.d.ts
|
|
83
6
|
/**
|
|
84
7
|
* Declarative fields that describe component metadata.
|
|
@@ -107,12 +30,16 @@ interface ComponentMetadata {
|
|
|
107
30
|
* Example: `Vector<N>` for pgvector codecs that emit `Vector<1536>`
|
|
108
31
|
*/
|
|
109
32
|
readonly typeImports?: ReadonlyArray<TypesImportSpec>;
|
|
33
|
+
/**
|
|
34
|
+
* The type function, a `ParameterizedOutputTypesFunction` from `@internal/contract/types`, that gives the output type of each of this component's codecs whose output type depends on a column's type parameters. The emitted `contract.d.ts` types such a column by applying it, so the pack declares that type once.
|
|
35
|
+
*/
|
|
36
|
+
readonly parameterizedOutputTypes?: TypesImportSpec;
|
|
110
37
|
/**
|
|
111
38
|
* Optional control-plane hooks keyed by codecId. Used by family-specific planners/verifiers to handle storage types.
|
|
112
39
|
*/
|
|
113
40
|
readonly controlPlaneHooks?: Record<string, unknown>;
|
|
114
41
|
/**
|
|
115
|
-
* Codec descriptors contributed by this component. Source of truth for codec-id-keyed metadata (`traits`, `
|
|
42
|
+
* Codec descriptors contributed by this component. Source of truth for codec-id-keyed metadata (`traits`, `renderOutputType`, `renderValueLiteral`) consumed by `extractCodecLookup`, and used to materialize representative `Codec` instances for codec-dispatched type rendering during emission.
|
|
116
43
|
*/
|
|
117
44
|
readonly codecDescriptors?: ReadonlyArray<AnyCodecDescriptor>;
|
|
118
45
|
};
|
|
@@ -123,13 +50,14 @@ interface ComponentMetadata {
|
|
|
123
50
|
readonly queryOperationTypes?: {
|
|
124
51
|
readonly import: TypesImportSpec;
|
|
125
52
|
};
|
|
126
|
-
readonly storage?: ReadonlyArray<{
|
|
127
|
-
readonly typeId: string;
|
|
128
|
-
readonly familyId: string;
|
|
129
|
-
readonly targetId: string;
|
|
130
|
-
readonly nativeType?: string;
|
|
131
|
-
}>;
|
|
132
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Data types this component registers — the types its codecs represent, each with the casts that
|
|
56
|
+
* say which other types' values it takes. A sibling of `types` rather than a member of it,
|
|
57
|
+
* because `types` is copied into an extension's contract space and a cast is a function, which
|
|
58
|
+
* no contract holds. ADR 254.
|
|
59
|
+
*/
|
|
60
|
+
readonly dataTypes?: ReadonlyArray<DataType>;
|
|
133
61
|
/**
|
|
134
62
|
* Optional pure-data authoring contributions exposed by this component.
|
|
135
63
|
*
|
|
@@ -137,9 +65,13 @@ interface ComponentMetadata {
|
|
|
137
65
|
*/
|
|
138
66
|
readonly authoring?: AuthoringContributions;
|
|
139
67
|
/**
|
|
140
|
-
* Mutation default function handlers and generator descriptors contributed by this component.
|
|
68
|
+
* Mutation default function handlers and generator descriptors contributed by this component. `createControlStack` assembles both with duplicate detection. The generator descriptors are also read from pack refs: `assembleGeneratorFunctions`, which the control stack and the TypeScript builders both call, checks that every generator a binding produces is registered here by some component. A pack ref that contributes only descriptors gives an empty `defaultFunctionRegistry`.
|
|
141
69
|
*/
|
|
142
70
|
readonly controlMutationDefaults?: ControlMutationDefaults;
|
|
71
|
+
/**
|
|
72
|
+
* Generator functions this component declares or binds to its codecs, for `@onCreate(fn())`, `@onUpdate(fn())` and the TypeScript builder's `gen` calls. Assembled by `assembleGeneratorFunctions`.
|
|
73
|
+
*/
|
|
74
|
+
readonly generatorFunctions?: readonly GeneratorFunctionContribution[];
|
|
143
75
|
}
|
|
144
76
|
/**
|
|
145
77
|
* Base descriptor for any framework component.
|
|
@@ -243,6 +175,8 @@ interface TargetDescriptor<TFamilyId extends string, TTargetId extends string> e
|
|
|
243
175
|
readonly familyId: TFamilyId;
|
|
244
176
|
/** The target identifier (e.g., 'postgres', 'mysql', 'mongodb') */
|
|
245
177
|
readonly targetId: TTargetId;
|
|
178
|
+
/** Whether the target has a namespace mechanism (Postgres schemas, Mongo namespaces). Absent means true. When false, emitted `Models` member names and the `models` constant drop the namespace segment. */
|
|
179
|
+
readonly supportsNamespaces?: boolean;
|
|
246
180
|
}
|
|
247
181
|
/**
|
|
248
182
|
* Base shape for any pack reference. Pack refs are pure JSON-friendly objects safe to import in authoring flows.
|
|
@@ -259,6 +193,9 @@ type TargetPackRef<TFamilyId extends string = string, TTargetId extends string =
|
|
|
259
193
|
readonly targetId: TTargetId;
|
|
260
194
|
/** The namespace a bare (un-namespaced) entity name resolves to for this target (e.g. Postgres `'public'`). */
|
|
261
195
|
readonly defaultNamespaceId: string;
|
|
196
|
+
readonly supportsNamespaces?: boolean;
|
|
197
|
+
/** The target's name as messages show it, such as `Postgres`. Absent means the target id. */
|
|
198
|
+
readonly displayName?: string;
|
|
262
199
|
};
|
|
263
200
|
type AdapterPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'adapter', TFamilyId> & {
|
|
264
201
|
readonly targetId: TTargetId;
|
|
@@ -388,5 +325,5 @@ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string>
|
|
|
388
325
|
readonly targetId: TTargetId;
|
|
389
326
|
}
|
|
390
327
|
//#endregion
|
|
391
|
-
export {
|
|
392
|
-
//# sourceMappingURL=framework-components-
|
|
328
|
+
export { checkContractComponentRequirements as S, PackRefBase as _, ComponentMetadata as a, TargetInstance as b, DriverDescriptor as c, ExtensionDescriptor as d, ExtensionInstance as f, FamilyPackRef as g, FamilyInstance as h, ComponentDescriptor as i, DriverInstance as l, FamilyDescriptor as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, ExtensionPackRef as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, DriverPackRef as u, TargetBoundComponentDescriptor as v, TargetPackRef as x, TargetDescriptor as y };
|
|
329
|
+
//# sourceMappingURL=framework-components-DKoQnPdB-lax1COaf.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-components-DKoQnPdB-lax1COaf.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-components-DKoQnPdB.d.mts"],"mappings":";;;;;;;;UAOU;;WAEC;;;;;;WAMA,eAAe;;WAEf;aACE;;;;eAIE,SAAS;;;;;;;;eAQT,cAAc,cAAc;;;;eAI5B,2BAA2B;;;;eAI3B,oBAAoB;;;;eAIpB,mBAAmB,cAAc;;;;;aAKnC,uBAAuB,cAAc;aACrC;eACE,QAAQ;;;;;;;;;WASZ,YAAY,cAAc;;;;;;WAM1B,YAAY;;;;WAIZ,0BAA0B;;;;WAI1B,8BAA8B;;;;;;;;;;;;;;;;;UAiB/B,oBAAoB,6BAA6B;;WAEhD,MAAM;;WAEN;;UAED;WACC;aACE;aACA;aACA,aAAa;;WAEf;WACA;WACA,sBAAsB;;UAEvB;WACC;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;iBAEM,mCAAmC,OAAO,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;UA0B3F,iBAAiB,kCAAkC;;WAElD,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BX,iBAAiB,0BAA0B,kCAAkC;;WAE5E,UAAU;;WAEV,UAAU;;WAEV;;;;;UAKD,YAAY,qBAAqB,kCAAkC;WAClE,MAAM;WACN;WACA,UAAU;WACV;WACA,YAAY;;KAElB,cAAc,qCAAqC,sBAAsB;KACzE,cAAc,mCAAmC,qCAAqC,sBAAsB;WACtG,UAAU;;WAEV;WACA;;WAEA;;KAEN,eAAe,mCAAmC,qCAAqC,uBAAuB;WACxG,UAAU;;KAEhB,iBAAiB,mCAAmC,qCAAqC,yBAAyB;WAC5G,UAAU;;KAEhB,cAAc,mCAAmC,qCAAqC,sBAAsB;WACtG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BX,kBAAkB,0BAA0B,kCAAkC;;WAE7E,UAAU;;WAEV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BX,iBAAiB,0BAA0B,kCAAkC;;WAE5E,UAAU;;WAEV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BX,oBAAoB,0BAA0B,kCAAkC;;WAE/E,UAAU;;WAEV,UAAU;;;KAGhB,+BAA+B,0BAA0B,4BAA4B,iBAAiB,WAAW,aAAa,kBAAkB,WAAW,aAAa,iBAAiB,WAAW,aAAa,oBAAoB,WAAW;UAC3O,eAAe;WACd,UAAU;;UAEX,eAAe,0BAA0B;WACxC,UAAU;WACV,UAAU;;UAEX,gBAAgB,0BAA0B;WACzC,UAAU;WACV,UAAU;;UAEX,eAAe,0BAA0B;WACxC,UAAU;WACV,UAAU;;UAEX,kBAAkB,0BAA0B;WAC3C,UAAU;WACV,UAAU"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
+
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
|
+
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
4
|
+
import { n as isCodecTrait } from "./codec-types-BXLUbk-Y-DpGfKGK0.mjs";
|
|
5
|
+
//#region ../../../1-framework/1-core/framework-components/dist/generator-functions-CXbQfvYu.mjs
|
|
6
|
+
/**
|
|
7
|
+
* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.
|
|
8
|
+
*/
|
|
9
|
+
function aggregateDescriptorKey(descriptor) {
|
|
10
|
+
switch (descriptor.input.kind) {
|
|
11
|
+
case "none": return `${descriptor.operation}:none`;
|
|
12
|
+
case "any": return `${descriptor.operation}:any`;
|
|
13
|
+
case "codec": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;
|
|
14
|
+
case "trait": return `${descriptor.operation}:trait:${descriptor.input.trait}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */
|
|
18
|
+
function isNoInputAggregateDescriptor(descriptor) {
|
|
19
|
+
return descriptor.input.kind === "none";
|
|
20
|
+
}
|
|
21
|
+
/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */
|
|
22
|
+
function isAnyInputAggregateDescriptor(descriptor) {
|
|
23
|
+
return descriptor.input.kind === "any";
|
|
24
|
+
}
|
|
25
|
+
function isObjectLike(value) {
|
|
26
|
+
return typeof value === "object" && value !== null;
|
|
27
|
+
}
|
|
28
|
+
function isNonEmptyString(value) {
|
|
29
|
+
return typeof value === "string" && value.length > 0;
|
|
30
|
+
}
|
|
31
|
+
function isAggregateInputMatch(value) {
|
|
32
|
+
if (!isObjectLike(value) || !("kind" in value)) return false;
|
|
33
|
+
switch (value.kind) {
|
|
34
|
+
case "none":
|
|
35
|
+
case "any": return true;
|
|
36
|
+
case "codec": return "codecId" in value && isNonEmptyString(value.codecId);
|
|
37
|
+
case "trait": return "trait" in value && isCodecTrait(value.trait);
|
|
38
|
+
default: return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function isAggregateOutputCodec(value) {
|
|
42
|
+
if (!isObjectLike(value) || !("kind" in value)) return false;
|
|
43
|
+
switch (value.kind) {
|
|
44
|
+
case "self": return true;
|
|
45
|
+
case "codec": return "codecId" in value && isNonEmptyString(value.codecId) && (!("typeParams" in value) || value.typeParams === void 0 || typeof value.typeParams === "function");
|
|
46
|
+
default: return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.
|
|
51
|
+
*/
|
|
52
|
+
function isAggregateDescriptor(value) {
|
|
53
|
+
if (!isObjectLike(value)) return false;
|
|
54
|
+
if (!("operation" in value) || !isNonEmptyString(value.operation)) return false;
|
|
55
|
+
if (!("nullable" in value) || typeof value.nullable !== "boolean") return false;
|
|
56
|
+
if (value.nullable === false && (!("emptyResultWire" in value) || value.emptyResultWire === void 0)) return false;
|
|
57
|
+
if (!("input" in value) || !isAggregateInputMatch(value.input)) return false;
|
|
58
|
+
if (!("output" in value) || !isAggregateOutputCodec(value.output)) return false;
|
|
59
|
+
return value.input.kind === "codec" || value.input.kind === "trait" || value.output.kind === "codec";
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Capability matrix merge primitive shared by emit-time and runtime stack composition.
|
|
63
|
+
*
|
|
64
|
+
* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need
|
|
65
|
+
* to fold a stack of component descriptors' `capabilities` declarations into a single
|
|
66
|
+
* matrix keyed by namespace. Keeping the primitive here lets both call sites stay
|
|
67
|
+
* byte-for-byte consistent without one depending on the other.
|
|
68
|
+
*/
|
|
69
|
+
function isPlainObject(value) {
|
|
70
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
71
|
+
}
|
|
72
|
+
function sortDeep(value) {
|
|
73
|
+
if (Array.isArray(value)) return value.map(sortDeep);
|
|
74
|
+
if (!isPlainObject(value)) return value;
|
|
75
|
+
const entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));
|
|
76
|
+
const next = {};
|
|
77
|
+
for (const [key, child] of entries) next[key] = sortDeep(child);
|
|
78
|
+
return next;
|
|
79
|
+
}
|
|
80
|
+
function extractCapabilityMatrix(value) {
|
|
81
|
+
if (!isPlainObject(value)) return {};
|
|
82
|
+
const out = {};
|
|
83
|
+
for (const [namespace, maybeCaps] of Object.entries(value)) {
|
|
84
|
+
if (!isPlainObject(maybeCaps)) continue;
|
|
85
|
+
const caps = {};
|
|
86
|
+
for (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === "boolean") caps[key] = flag;
|
|
87
|
+
if (Object.keys(caps).length > 0) out[namespace] = caps;
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Merge an ordered list of contributor capability declarations into a base matrix.
|
|
93
|
+
*
|
|
94
|
+
* Behaviour:
|
|
95
|
+
* - `base` and each contributor's `capabilities` are filtered through the same
|
|
96
|
+
* structural extraction: non-plain-object namespace blocks are dropped,
|
|
97
|
+
* non-boolean leaves inside a namespace block are dropped, and a namespace
|
|
98
|
+
* block that ends up with zero boolean leaves is omitted entirely (so a
|
|
99
|
+
* later contributor with a malformed namespace cannot erase a namespace
|
|
100
|
+
* already present in `base`).
|
|
101
|
+
* - Non-plain-object `capabilities` on a contributor (including `undefined`,
|
|
102
|
+
* `null`, arrays, primitives) are skipped silently — the contributor
|
|
103
|
+
* contributes nothing.
|
|
104
|
+
* - Later contributors win on `(namespace, key)` collisions.
|
|
105
|
+
* - The returned object is fresh — neither `base` nor any contributor is mutated.
|
|
106
|
+
* - Output keys are sorted lexicographically at every plain-object level.
|
|
107
|
+
*/
|
|
108
|
+
function mergeCapabilityMatrices(base, contributors) {
|
|
109
|
+
const merged = extractCapabilityMatrix(base);
|
|
110
|
+
for (const contributor of contributors) {
|
|
111
|
+
const extracted = extractCapabilityMatrix(contributor.capabilities);
|
|
112
|
+
for (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {
|
|
113
|
+
...merged[namespace] ?? {},
|
|
114
|
+
...capabilities
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return blindCast(sortDeep(merged));
|
|
118
|
+
}
|
|
119
|
+
function namedParametersOf(signature) {
|
|
120
|
+
if (typeof signature !== "object" || signature === null || !("named" in signature)) return [];
|
|
121
|
+
const named = signature.named;
|
|
122
|
+
return typeof named === "object" && named !== null ? Object.keys(named) : [];
|
|
123
|
+
}
|
|
124
|
+
function invalidContribution(message) {
|
|
125
|
+
return runtimeError("CONTRACT.PACK_CONTRIBUTION_INVALID", message);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The generators the components register, by id. A generator registered by two components is refused: the component that defines a generator registers it, once.
|
|
129
|
+
*/
|
|
130
|
+
function assembleGeneratorRegistrations(descriptors) {
|
|
131
|
+
const registered = /* @__PURE__ */ new Map();
|
|
132
|
+
for (const component of descriptors) for (const descriptor of component.controlMutationDefaults?.generatorDescriptors ?? []) {
|
|
133
|
+
const existing = registered.get(descriptor.id);
|
|
134
|
+
if (existing !== void 0) throw invalidContribution(`Generator "${descriptor.id}" is registered by both "${existing.componentId ?? "<unknown>"}" and "${component.id ?? "<unknown>"}". Register each generator once, in the component that defines it.`);
|
|
135
|
+
registered.set(descriptor.id, {
|
|
136
|
+
descriptor,
|
|
137
|
+
componentId: component.id
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return registered;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Assemble the generator functions of a composed stack: the control stack's components, or the pack refs of a TypeScript contract. Every generator a binding produces must be registered by a generator descriptor of one of the components.
|
|
144
|
+
*/
|
|
145
|
+
function assembleGeneratorFunctions(descriptors) {
|
|
146
|
+
const registered = assembleGeneratorRegistrations(descriptors);
|
|
147
|
+
const declared = /* @__PURE__ */ new Map();
|
|
148
|
+
const bindingsByCodec = /* @__PURE__ */ new Map();
|
|
149
|
+
const printersByCodecAndGenerator = /* @__PURE__ */ new Map();
|
|
150
|
+
const contributed = [];
|
|
151
|
+
for (const descriptor of descriptors) {
|
|
152
|
+
const contributedBy = descriptor.id ?? "<unknown>";
|
|
153
|
+
for (const contribution of descriptor.generatorFunctions ?? []) {
|
|
154
|
+
if (contribution.signature !== void 0) {
|
|
155
|
+
const [namedParameter] = namedParametersOf(contribution.signature);
|
|
156
|
+
if (namedParameter !== void 0) throw invalidContribution(`Generator function "${contribution.name}" from "${contributedBy}" declares the named parameter "${namedParameter}". A generator function takes positional parameters only, because a TypeScript gen call passes its arguments by position; declare it in positional.`);
|
|
157
|
+
const existing = declared.get(contribution.name);
|
|
158
|
+
if (existing !== void 0) throw invalidContribution(`Generator function "${contribution.name}" is declared by both "${existing.declaredBy}" and "${contributedBy}".`);
|
|
159
|
+
declared.set(contribution.name, {
|
|
160
|
+
signature: contribution.signature,
|
|
161
|
+
declaredBy: contributedBy
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
for (const binding of contribution.bindings) contributed.push({
|
|
165
|
+
name: contribution.name,
|
|
166
|
+
binding,
|
|
167
|
+
contributedBy
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
for (const owned of contributed) {
|
|
172
|
+
if (!declared.has(owned.name)) throw invalidContribution(`"${owned.contributedBy}" binds generator function "${owned.name}", which no component declares.`);
|
|
173
|
+
for (const codecId of owned.binding.codecIds) {
|
|
174
|
+
const forCodec = bindingsByCodec.get(codecId) ?? /* @__PURE__ */ new Map();
|
|
175
|
+
const existing = forCodec.get(owned.name);
|
|
176
|
+
if (existing !== void 0) throw invalidContribution(`Generator function "${owned.name}" is bound to codec "${codecId}" by both "${existing.contributedBy}" and "${owned.contributedBy}".`);
|
|
177
|
+
forCodec.set(owned.name, owned);
|
|
178
|
+
bindingsByCodec.set(codecId, forCodec);
|
|
179
|
+
for (const generatorId of owned.binding.generatorIds) {
|
|
180
|
+
const key = `${codecId}\u0000${generatorId}`;
|
|
181
|
+
const printer = printersByCodecAndGenerator.get(key);
|
|
182
|
+
if (printer !== void 0 && printer.name !== owned.name) throw invalidContribution(`Generator "${generatorId}" on codec "${codecId}" is written by both function "${printer.name}" from "${printer.contributedBy}" and function "${owned.name}" from "${owned.contributedBy}".`);
|
|
183
|
+
printersByCodecAndGenerator.set(key, owned);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
for (const generatorId of owned.binding.generatorIds) if (!registered.has(generatorId)) throw invalidContribution(`Generator function "${owned.name}" from "${owned.contributedBy}" produces generator "${generatorId}", which no generator descriptor in the stack registers.`);
|
|
187
|
+
}
|
|
188
|
+
function boundCodecIdsOf(name) {
|
|
189
|
+
return [...bindingsByCodec.entries()].filter(([, forCodec]) => forCodec.has(name)).map(([codecId]) => codecId).sort();
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
functionsFor(codecId) {
|
|
193
|
+
return [...bindingsByCodec.get(codecId)?.keys() ?? []].sort().map((name) => ({
|
|
194
|
+
name,
|
|
195
|
+
signature: declared.get(name)?.signature
|
|
196
|
+
}));
|
|
197
|
+
},
|
|
198
|
+
has(name) {
|
|
199
|
+
return declared.has(name);
|
|
200
|
+
},
|
|
201
|
+
resolve({ name, args }, field) {
|
|
202
|
+
if (!declared.has(name)) return {
|
|
203
|
+
ok: false,
|
|
204
|
+
reason: "unknown-function",
|
|
205
|
+
boundCodecIds: []
|
|
206
|
+
};
|
|
207
|
+
const owned = bindingsByCodec.get(field.codecId)?.get(name);
|
|
208
|
+
if (owned === void 0) return {
|
|
209
|
+
ok: false,
|
|
210
|
+
reason: "not-bound",
|
|
211
|
+
boundCodecIds: boundCodecIdsOf(name)
|
|
212
|
+
};
|
|
213
|
+
const resolution = owned.binding.resolve({
|
|
214
|
+
args,
|
|
215
|
+
field
|
|
216
|
+
});
|
|
217
|
+
if (!resolution.ok) return {
|
|
218
|
+
ok: false,
|
|
219
|
+
reason: "refused",
|
|
220
|
+
message: resolution.message
|
|
221
|
+
};
|
|
222
|
+
if (!owned.binding.generatorIds.includes(resolution.generator.id)) throw new InternalError(`Generator function "${name}" from "${owned.contributedBy}" resolved to generator "${resolution.generator.id}", which its binding does not declare in generatorIds.`);
|
|
223
|
+
return resolution;
|
|
224
|
+
},
|
|
225
|
+
callFor(generator, field) {
|
|
226
|
+
const owned = printersByCodecAndGenerator.get(`${field.codecId}\u0000${generator.id}`);
|
|
227
|
+
if (owned === void 0) return void 0;
|
|
228
|
+
const printed = owned.binding.printArguments(generator, field);
|
|
229
|
+
return printed === void 0 ? void 0 : {
|
|
230
|
+
call: {
|
|
231
|
+
name: owned.name,
|
|
232
|
+
args: printed.args
|
|
233
|
+
},
|
|
234
|
+
text: `${owned.name}(${printed.text})`
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* A binding of a function that takes no arguments to one generator, with params read from the field's type params when `paramsFromField` gives any.
|
|
241
|
+
*/
|
|
242
|
+
function singleGeneratorBinding(input) {
|
|
243
|
+
return {
|
|
244
|
+
codecIds: input.codecIds,
|
|
245
|
+
generatorIds: [input.generatorId],
|
|
246
|
+
resolve: ({ field }) => {
|
|
247
|
+
const params = input.paramsFromField?.(field);
|
|
248
|
+
return {
|
|
249
|
+
ok: true,
|
|
250
|
+
generator: params === void 0 ? {
|
|
251
|
+
kind: "generator",
|
|
252
|
+
id: input.generatorId
|
|
253
|
+
} : {
|
|
254
|
+
kind: "generator",
|
|
255
|
+
id: input.generatorId,
|
|
256
|
+
params
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
printArguments: (generator) => generator.id === input.generatorId ? {
|
|
261
|
+
args: {},
|
|
262
|
+
text: ""
|
|
263
|
+
} : void 0
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/** The generator functions of a stack that contributes none. */
|
|
267
|
+
const EMPTY_GENERATOR_FUNCTIONS = assembleGeneratorFunctions([]);
|
|
268
|
+
//#endregion
|
|
269
|
+
export { isAggregateDescriptor as a, mergeCapabilityMatrices as c, assembleGeneratorRegistrations as i, singleGeneratorBinding as l, aggregateDescriptorKey as n, isAnyInputAggregateDescriptor as o, assembleGeneratorFunctions as r, isNoInputAggregateDescriptor as s, EMPTY_GENERATOR_FUNCTIONS as t };
|
|
270
|
+
|
|
271
|
+
//# sourceMappingURL=generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-functions-CXbQfvYu-BIFU1Ryx.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/generator-functions-CXbQfvYu.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { n as isCodecTrait } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/aggregate-descriptor.ts\n/**\n* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.\n*/\nfunction aggregateDescriptorKey(descriptor) {\n\tswitch (descriptor.input.kind) {\n\t\tcase \"none\": return `${descriptor.operation}:none`;\n\t\tcase \"any\": return `${descriptor.operation}:any`;\n\t\tcase \"codec\": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;\n\t\tcase \"trait\": return `${descriptor.operation}:trait:${descriptor.input.trait}`;\n\t}\n}\n/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */\nfunction isNoInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"none\";\n}\n/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */\nfunction isAnyInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"any\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isNonEmptyString(value) {\n\treturn typeof value === \"string\" && value.length > 0;\n}\nfunction isAggregateInputMatch(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"none\":\n\t\tcase \"any\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId);\n\t\tcase \"trait\": return \"trait\" in value && isCodecTrait(value.trait);\n\t\tdefault: return false;\n\t}\n}\nfunction isAggregateOutputCodec(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"self\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId) && (!(\"typeParams\" in value) || value.typeParams === void 0 || typeof value.typeParams === \"function\");\n\t\tdefault: return false;\n\t}\n}\n/**\n* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.\n*/\nfunction isAggregateDescriptor(value) {\n\tif (!isObjectLike(value)) return false;\n\tif (!(\"operation\" in value) || !isNonEmptyString(value.operation)) return false;\n\tif (!(\"nullable\" in value) || typeof value.nullable !== \"boolean\") return false;\n\tif (value.nullable === false && (!(\"emptyResultWire\" in value) || value.emptyResultWire === void 0)) return false;\n\tif (!(\"input\" in value) || !isAggregateInputMatch(value.input)) return false;\n\tif (!(\"output\" in value) || !isAggregateOutputCodec(value.output)) return false;\n\treturn value.input.kind === \"codec\" || value.input.kind === \"trait\" || value.output.kind === \"codec\";\n}\n//#endregion\n//#region src/shared/capabilities.ts\n/**\n* Capability matrix merge primitive shared by emit-time and runtime stack composition.\n*\n* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need\n* to fold a stack of component descriptors' `capabilities` declarations into a single\n* matrix keyed by namespace. Keeping the primitive here lets both call sites stay\n* byte-for-byte consistent without one depending on the other.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortDeep(value) {\n\tif (Array.isArray(value)) return value.map(sortDeep);\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));\n\tconst next = {};\n\tfor (const [key, child] of entries) next[key] = sortDeep(child);\n\treturn next;\n}\nfunction extractCapabilityMatrix(value) {\n\tif (!isPlainObject(value)) return {};\n\tconst out = {};\n\tfor (const [namespace, maybeCaps] of Object.entries(value)) {\n\t\tif (!isPlainObject(maybeCaps)) continue;\n\t\tconst caps = {};\n\t\tfor (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === \"boolean\") caps[key] = flag;\n\t\tif (Object.keys(caps).length > 0) out[namespace] = caps;\n\t}\n\treturn out;\n}\n/**\n* Merge an ordered list of contributor capability declarations into a base matrix.\n*\n* Behaviour:\n* - `base` and each contributor's `capabilities` are filtered through the same\n* structural extraction: non-plain-object namespace blocks are dropped,\n* non-boolean leaves inside a namespace block are dropped, and a namespace\n* block that ends up with zero boolean leaves is omitted entirely (so a\n* later contributor with a malformed namespace cannot erase a namespace\n* already present in `base`).\n* - Non-plain-object `capabilities` on a contributor (including `undefined`,\n* `null`, arrays, primitives) are skipped silently — the contributor\n* contributes nothing.\n* - Later contributors win on `(namespace, key)` collisions.\n* - The returned object is fresh — neither `base` nor any contributor is mutated.\n* - Output keys are sorted lexicographically at every plain-object level.\n*/\nfunction mergeCapabilityMatrices(base, contributors) {\n\tconst merged = extractCapabilityMatrix(base);\n\tfor (const contributor of contributors) {\n\t\tconst extracted = extractCapabilityMatrix(contributor.capabilities);\n\t\tfor (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {\n\t\t\t...merged[namespace] ?? {},\n\t\t\t...capabilities\n\t\t};\n\t}\n\treturn blindCast(sortDeep(merged));\n}\n//#endregion\n//#region src/shared/generator-functions.ts\nfunction namedParametersOf(signature) {\n\tif (typeof signature !== \"object\" || signature === null || !(\"named\" in signature)) return [];\n\tconst named = signature.named;\n\treturn typeof named === \"object\" && named !== null ? Object.keys(named) : [];\n}\nfunction invalidContribution(message) {\n\treturn runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", message);\n}\n/**\n* The generators the components register, by id. A generator registered by two components is refused: the component that defines a generator registers it, once.\n*/\nfunction assembleGeneratorRegistrations(descriptors) {\n\tconst registered = /* @__PURE__ */ new Map();\n\tfor (const component of descriptors) for (const descriptor of component.controlMutationDefaults?.generatorDescriptors ?? []) {\n\t\tconst existing = registered.get(descriptor.id);\n\t\tif (existing !== void 0) throw invalidContribution(`Generator \"${descriptor.id}\" is registered by both \"${existing.componentId ?? \"<unknown>\"}\" and \"${component.id ?? \"<unknown>\"}\". Register each generator once, in the component that defines it.`);\n\t\tregistered.set(descriptor.id, {\n\t\t\tdescriptor,\n\t\t\tcomponentId: component.id\n\t\t});\n\t}\n\treturn registered;\n}\n/**\n* Assemble the generator functions of a composed stack: the control stack's components, or the pack refs of a TypeScript contract. Every generator a binding produces must be registered by a generator descriptor of one of the components.\n*/\nfunction assembleGeneratorFunctions(descriptors) {\n\tconst registered = assembleGeneratorRegistrations(descriptors);\n\tconst declared = /* @__PURE__ */ new Map();\n\tconst bindingsByCodec = /* @__PURE__ */ new Map();\n\tconst printersByCodecAndGenerator = /* @__PURE__ */ new Map();\n\tconst contributed = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst contributedBy = descriptor.id ?? \"<unknown>\";\n\t\tfor (const contribution of descriptor.generatorFunctions ?? []) {\n\t\t\tif (contribution.signature !== void 0) {\n\t\t\t\tconst [namedParameter] = namedParametersOf(contribution.signature);\n\t\t\t\tif (namedParameter !== void 0) throw invalidContribution(`Generator function \"${contribution.name}\" from \"${contributedBy}\" declares the named parameter \"${namedParameter}\". A generator function takes positional parameters only, because a TypeScript gen call passes its arguments by position; declare it in positional.`);\n\t\t\t\tconst existing = declared.get(contribution.name);\n\t\t\t\tif (existing !== void 0) throw invalidContribution(`Generator function \"${contribution.name}\" is declared by both \"${existing.declaredBy}\" and \"${contributedBy}\".`);\n\t\t\t\tdeclared.set(contribution.name, {\n\t\t\t\t\tsignature: contribution.signature,\n\t\t\t\t\tdeclaredBy: contributedBy\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const binding of contribution.bindings) contributed.push({\n\t\t\t\tname: contribution.name,\n\t\t\t\tbinding,\n\t\t\t\tcontributedBy\n\t\t\t});\n\t\t}\n\t}\n\tfor (const owned of contributed) {\n\t\tif (!declared.has(owned.name)) throw invalidContribution(`\"${owned.contributedBy}\" binds generator function \"${owned.name}\", which no component declares.`);\n\t\tfor (const codecId of owned.binding.codecIds) {\n\t\t\tconst forCodec = bindingsByCodec.get(codecId) ?? /* @__PURE__ */ new Map();\n\t\t\tconst existing = forCodec.get(owned.name);\n\t\t\tif (existing !== void 0) throw invalidContribution(`Generator function \"${owned.name}\" is bound to codec \"${codecId}\" by both \"${existing.contributedBy}\" and \"${owned.contributedBy}\".`);\n\t\t\tforCodec.set(owned.name, owned);\n\t\t\tbindingsByCodec.set(codecId, forCodec);\n\t\t\tfor (const generatorId of owned.binding.generatorIds) {\n\t\t\t\tconst key = `${codecId}\\u0000${generatorId}`;\n\t\t\t\tconst printer = printersByCodecAndGenerator.get(key);\n\t\t\t\tif (printer !== void 0 && printer.name !== owned.name) throw invalidContribution(`Generator \"${generatorId}\" on codec \"${codecId}\" is written by both function \"${printer.name}\" from \"${printer.contributedBy}\" and function \"${owned.name}\" from \"${owned.contributedBy}\".`);\n\t\t\t\tprintersByCodecAndGenerator.set(key, owned);\n\t\t\t}\n\t\t}\n\t\tfor (const generatorId of owned.binding.generatorIds) if (!registered.has(generatorId)) throw invalidContribution(`Generator function \"${owned.name}\" from \"${owned.contributedBy}\" produces generator \"${generatorId}\", which no generator descriptor in the stack registers.`);\n\t}\n\tfunction boundCodecIdsOf(name) {\n\t\treturn [...bindingsByCodec.entries()].filter(([, forCodec]) => forCodec.has(name)).map(([codecId]) => codecId).sort();\n\t}\n\treturn {\n\t\tfunctionsFor(codecId) {\n\t\t\treturn [...bindingsByCodec.get(codecId)?.keys() ?? []].sort().map((name) => ({\n\t\t\t\tname,\n\t\t\t\tsignature: declared.get(name)?.signature\n\t\t\t}));\n\t\t},\n\t\thas(name) {\n\t\t\treturn declared.has(name);\n\t\t},\n\t\tresolve({ name, args }, field) {\n\t\t\tif (!declared.has(name)) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"unknown-function\",\n\t\t\t\tboundCodecIds: []\n\t\t\t};\n\t\t\tconst owned = bindingsByCodec.get(field.codecId)?.get(name);\n\t\t\tif (owned === void 0) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"not-bound\",\n\t\t\t\tboundCodecIds: boundCodecIdsOf(name)\n\t\t\t};\n\t\t\tconst resolution = owned.binding.resolve({\n\t\t\t\targs,\n\t\t\t\tfield\n\t\t\t});\n\t\t\tif (!resolution.ok) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"refused\",\n\t\t\t\tmessage: resolution.message\n\t\t\t};\n\t\t\tif (!owned.binding.generatorIds.includes(resolution.generator.id)) throw new InternalError(`Generator function \"${name}\" from \"${owned.contributedBy}\" resolved to generator \"${resolution.generator.id}\", which its binding does not declare in generatorIds.`);\n\t\t\treturn resolution;\n\t\t},\n\t\tcallFor(generator, field) {\n\t\t\tconst owned = printersByCodecAndGenerator.get(`${field.codecId}\\u0000${generator.id}`);\n\t\t\tif (owned === void 0) return void 0;\n\t\t\tconst printed = owned.binding.printArguments(generator, field);\n\t\t\treturn printed === void 0 ? void 0 : {\n\t\t\t\tcall: {\n\t\t\t\t\tname: owned.name,\n\t\t\t\t\targs: printed.args\n\t\t\t\t},\n\t\t\t\ttext: `${owned.name}(${printed.text})`\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* A binding of a function that takes no arguments to one generator, with params read from the field's type params when `paramsFromField` gives any.\n*/\nfunction singleGeneratorBinding(input) {\n\treturn {\n\t\tcodecIds: input.codecIds,\n\t\tgeneratorIds: [input.generatorId],\n\t\tresolve: ({ field }) => {\n\t\t\tconst params = input.paramsFromField?.(field);\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\tgenerator: params === void 0 ? {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: input.generatorId\n\t\t\t\t} : {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: input.generatorId,\n\t\t\t\t\tparams\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tprintArguments: (generator) => generator.id === input.generatorId ? {\n\t\t\targs: {},\n\t\t\ttext: \"\"\n\t\t} : void 0\n\t};\n}\n/** The generator functions of a stack that contributes none. */\nconst EMPTY_GENERATOR_FUNCTIONS = assembleGeneratorFunctions([]);\n//#endregion\nexport { mergeCapabilityMatrices as a, isAnyInputAggregateDescriptor as c, singleGeneratorBinding as i, isNoInputAggregateDescriptor as l, assembleGeneratorFunctions as n, aggregateDescriptorKey as o, assembleGeneratorRegistrations as r, isAggregateDescriptor as s, EMPTY_GENERATOR_FUNCTIONS as t };\n\n//# sourceMappingURL=generator-functions-CXbQfvYu.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,uBAAuB,YAAY;CAC3C,QAAQ,WAAW,MAAM,MAAzB;EACC,KAAK,QAAQ,OAAO,GAAG,WAAW,UAAU;EAC5C,KAAK,OAAO,OAAO,GAAG,WAAW,UAAU;EAC3C,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;EACvE,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;CACxE;AACD;;AAEA,SAAS,6BAA6B,YAAY;CACjD,OAAO,WAAW,MAAM,SAAS;AAClC;;AAEA,SAAS,8BAA8B,YAAY;CAClD,OAAO,WAAW,MAAM,SAAS;AAClC;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS;AACpD;AACA,SAAS,sBAAsB,OAAO;CACrC,IAAI,CAAC,aAAa,KAAK,KAAK,EAAE,UAAU,QAAQ,OAAO;CACvD,QAAQ,MAAM,MAAd;EACC,KAAK;EACL,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS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N,IAAI;IACJ,WAAW,WAAW,KAAK,IAAI;KAC9B,MAAM;KACN,IAAI,MAAM;IACX,IAAI;KACH,MAAM;KACN,IAAI,MAAM;KACV;IACD;GACD;EACD;EACA,iBAAiB,cAAc,UAAU,OAAO,MAAM,cAAc;GACnE,MAAM,CAAC;GACP,MAAM;EACP,IAAI,KAAK;CACV;AACD;;AAEA,MAAM,4BAA4B,2BAA2B,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Hashes a canonical-string representation of an execution into a bounded,
|
|
5
5
|
* opaque cache-key digest.
|
|
6
6
|
*
|
|
7
|
-
* Designed for use as the final step of `
|
|
7
|
+
* Designed for use as the final step of `ActivityContext.contentHash`
|
|
8
8
|
* implementations: family runtimes compose a canonical string from
|
|
9
9
|
* `meta.storageHash`, the rendered statement (or wire command), and
|
|
10
10
|
* canonicalized parameters via `canonicalStringify`, then pipe the result
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
declare function hashContent(value: string): Promise<string>;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { hashContent as t };
|
|
59
|
-
//# sourceMappingURL=hash-content-
|
|
59
|
+
//# sourceMappingURL=hash-content-Bde14N2-.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-content-
|
|
1
|
+
{"version":3,"file":"hash-content-Bde14N2-.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/hash-content.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsDiB,YAAY,gBAAgB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Hashes a canonical-string representation of an execution into a bounded,
|
|
4
4
|
* opaque cache-key digest.
|
|
5
5
|
*
|
|
6
|
-
* Designed for use as the final step of `
|
|
6
|
+
* Designed for use as the final step of `ActivityContext.contentHash`
|
|
7
7
|
* implementations: family runtimes compose a canonical string from
|
|
8
8
|
* `meta.storageHash`, the rendered statement (or wire command), and
|
|
9
9
|
* canonicalized parameters via `canonicalStringify`, then pipe the result
|
|
@@ -60,4 +60,4 @@ async function hashContent(value) {
|
|
|
60
60
|
//#endregion
|
|
61
61
|
export { hashContent as t };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=hash-content-
|
|
63
|
+
//# sourceMappingURL=hash-content-Bdl-HSfq.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-content-Bdl-HSfq.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/hash-content.mjs"],"sourcesContent":["//#region src/hash-content.ts\n/**\n* Hashes a canonical-string representation of an execution into a bounded,\n* opaque cache-key digest.\n*\n* Designed for use as the final step of `ActivityContext.contentHash`\n* implementations: family runtimes compose a canonical string from\n* `meta.storageHash`, the rendered statement (or wire command), and\n* canonicalized parameters via `canonicalStringify`, then pipe the result\n* through this helper.\n*\n* Why hash the canonical string instead of using it directly as a `Map` key:\n*\n* 1. **Bounded memory.** A raw canonical key includes concrete parameter\n* values, so a query bound to a 10 MB JSON column or binary blob produces\n* a 10 MB cache key. With `maxEntries = 1000`, that scales to gigabytes\n* of cache keys alone. SHA-512 pins per-key cost at a fixed digest\n* length regardless of input size.\n*\n* 2. **Sensitive-data isolation.** The canonical string contains parameter\n* values verbatim. Cache keys flow into debug logs, Redis `KEYS`/`MONITOR`\n* output, persistence dumps, monitoring tools, and any user-supplied\n* `CacheStore` implementation. Hashing prevents PII / credentials /\n* tokens that appear in query parameters from showing up in any of those\n* surfaces.\n*\n* Algorithm choice — SHA-512 (`SHA-512` via the WebCrypto API):\n*\n* - **Portability.** WebCrypto (`globalThis.crypto.subtle`) is available in\n* every modern JavaScript runtime — Node, Deno, Bun, browsers, edge\n* workers — without importing a Node-specific module. This keeps the\n* helper usable in non-Node hosts where `node:crypto` is not available.\n* - **Collision space.** 512 bits of output makes accidental collisions\n* astronomically improbable — far beyond what a cache needs, but the\n* incremental cost over 256-bit output is negligible and the headroom\n* is free.\n* - **No additional dependency.** SHA-512 is part of the WebCrypto standard\n* set of digest algorithms; no third-party package needed.\n*\n* The function is `async` because the WebCrypto digest API is async by\n* design. Callers must await the result.\n*\n* Output format: `sha512:HEXDIGEST` (128-char hex with the algorithm tag\n* prefix). Self-describing so a future migration to a different hash\n* produces visibly distinct keys. This in-memory cache key deliberately\n* keeps its tag — unlike persisted contract hashes, which are bare hex.\n*\n* @example\n* ```typescript\n* const canonical = `${exec.meta.storageHash}|${exec.sql}|${canonicalStringify(exec.params)}`;\n* return await hashContent(canonical);\n* // → 'sha512:8f3...e1c' (always 135 chars: 'sha512:' + 128 hex chars)\n* ```\n*/\nasync function hashContent(value) {\n\tconst bytes = new TextEncoder().encode(value);\n\tconst digest = await crypto.subtle.digest(\"SHA-512\", bytes);\n\treturn `sha512:${Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n//#endregion\nexport { hashContent };\n\n//# sourceMappingURL=hash-content.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,eAAe,YAAY,OAAO;CACjC,MAAM,QAAQ,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK;CAC5C,MAAM,SAAS,MAAM,OAAO,OAAO,OAAO,WAAW,KAAK;CAC1D,OAAO,UAAU,MAAM,KAAK,IAAI,WAAW,MAAM,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;AACpG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as castAs, t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
|
-
import { n as matchesPathPattern } from "./canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs";
|
|
4
3
|
import { t as isPlainRecord } from "./is-plain-record-CUofyVQ7-DWEzdhIx.mjs";
|
|
4
|
+
import { a as matchesPathPattern, n as compareCodeUnits } from "./canonicalization-path-match-D88xLEq6-BFQC39ZG.mjs";
|
|
5
5
|
import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
//#region ../../../1-framework/0-foundation/contract/dist/hashing.mjs
|
|
@@ -88,8 +88,9 @@ function omitDefaults(obj, path, shouldPreserveEmpty) {
|
|
|
88
88
|
const isModelRelations = matchesPathPattern(currentPath, DOMAIN_MODEL_RELATIONS_PATTERN);
|
|
89
89
|
const isModelStorage = matchesPathPattern(currentPath, DOMAIN_MODEL_STORAGE_PATTERN);
|
|
90
90
|
const isNullableField = key === "nullable";
|
|
91
|
+
const isManyElementNullable = key === "elementNullable" && path.at(-1) === "many";
|
|
91
92
|
const isFamilyPreserved = shouldPreserveEmpty?.(currentPath) ?? false;
|
|
92
|
-
if (!isRequiredDomainNamespaces && !isDomainNamespaceSlot && !isRequiredDomainModels && !isRequiredStorageNamespaces && !isStorageNamespaceEntries && !isRequiredRoots && !isRequiredExtensions && !isRequiredCapabilities && !isRequiredMeta && !isRequiredExecutionDefaults && !isExtensionNamespace && !isModelRelations && !isModelStorage && !isNullableField && !isFamilyPreserved) continue;
|
|
93
|
+
if (!isRequiredDomainNamespaces && !isDomainNamespaceSlot && !isRequiredDomainModels && !isRequiredStorageNamespaces && !isStorageNamespaceEntries && !isRequiredRoots && !isRequiredExtensions && !isRequiredCapabilities && !isRequiredMeta && !isRequiredExecutionDefaults && !isExtensionNamespace && !isModelRelations && !isModelStorage && !isNullableField && !isManyElementNullable && !isFamilyPreserved) continue;
|
|
93
94
|
}
|
|
94
95
|
result[key] = omitDefaults(value, currentPath, shouldPreserveEmpty);
|
|
95
96
|
}
|
|
@@ -100,7 +101,7 @@ function sortObjectKeys(obj) {
|
|
|
100
101
|
if (Array.isArray(obj)) return obj.map((item) => sortObjectKeys(item));
|
|
101
102
|
const sorted = {};
|
|
102
103
|
const keys = Object.keys(obj).sort();
|
|
103
|
-
for (const key of keys) sorted[key] = sortObjectKeys(obj[key]);
|
|
104
|
+
for (const key of keys) sorted[key] = sortObjectKeys(blindCast(obj)[key]);
|
|
104
105
|
return sorted;
|
|
105
106
|
}
|
|
106
107
|
function orderTopLevel(obj) {
|
|
@@ -120,7 +121,7 @@ function orderTopLevel(obj) {
|
|
|
120
121
|
*/
|
|
121
122
|
function canonicalizeContractToObject(contract, options) {
|
|
122
123
|
const serialized = options.serializeContract(contract);
|
|
123
|
-
const withDefaultsOmitted = omitDefaults({
|
|
124
|
+
const withDefaultsOmitted = blindCast(omitDefaults({
|
|
124
125
|
...ifDefined("schemaVersion", options.schemaVersion),
|
|
125
126
|
targetFamily: serialized["targetFamily"],
|
|
126
127
|
target: serialized["target"],
|
|
@@ -133,11 +134,11 @@ function canonicalizeContractToObject(contract, options) {
|
|
|
133
134
|
capabilities: serialized["capabilities"],
|
|
134
135
|
...ifDefined("defaultControlPolicy", serialized["defaultControlPolicy"]),
|
|
135
136
|
meta: serialized["meta"]
|
|
136
|
-
}, [], options.shouldPreserveEmpty);
|
|
137
|
-
return orderTopLevel(sortObjectKeys(options.sortStorage ? {
|
|
137
|
+
}, [], options.shouldPreserveEmpty));
|
|
138
|
+
return orderTopLevel(blindCast(sortObjectKeys(options.sortStorage ? {
|
|
138
139
|
...withDefaultsOmitted,
|
|
139
140
|
storage: options.sortStorage(withDefaultsOmitted["storage"])
|
|
140
|
-
} : withDefaultsOmitted));
|
|
141
|
+
} : withDefaultsOmitted)));
|
|
141
142
|
}
|
|
142
143
|
function canonicalizeContract(contract, options) {
|
|
143
144
|
return JSON.stringify(canonicalizeContractToObject(contract, options), null, 2);
|
|
@@ -193,7 +194,25 @@ function computeExecutionHash(args) {
|
|
|
193
194
|
function computeProfileHash(args) {
|
|
194
195
|
return blindCast(sha256(hashContract(args)));
|
|
195
196
|
}
|
|
197
|
+
function compareRefs(a, b) {
|
|
198
|
+
return compareCodeUnits(a.ref.namespace, b.ref.namespace) || compareCodeUnits(a.ref.entry, b.ref.entry) || compareCodeUnits(a.ref.field, b.ref.field);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Builds a contract's `execution` section from its mutation defaults: sorted by namespace, entry and field in UTF-16 code-unit order, and hashed for the target. Every authoring path calls this, so they emit the same section and hash for the same defaults.
|
|
202
|
+
*/
|
|
203
|
+
function buildExecutionSection(input) {
|
|
204
|
+
if (input.defaults.length === 0) return;
|
|
205
|
+
const execution = { mutations: { defaults: [...input.defaults].sort(compareRefs) } };
|
|
206
|
+
return {
|
|
207
|
+
executionHash: computeExecutionHash({
|
|
208
|
+
target: input.target,
|
|
209
|
+
targetFamily: input.targetFamily,
|
|
210
|
+
execution
|
|
211
|
+
}),
|
|
212
|
+
...execution
|
|
213
|
+
};
|
|
214
|
+
}
|
|
196
215
|
//#endregion
|
|
197
|
-
export {
|
|
216
|
+
export { computeProfileHash as a, computeExecutionHash as i, canonicalizeContract as n, computeStorageHash as o, canonicalizeContractToObject as r, buildExecutionSection as t };
|
|
198
217
|
|
|
199
|
-
//# sourceMappingURL=hashing-
|
|
218
|
+
//# sourceMappingURL=hashing-CLRfNAxh.mjs.map
|