@prisma/orm-framework 0.16.0
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/LICENSE +201 -0
- package/README.md +27 -0
- package/dist/abortable-CQO6uG9F.mjs +39 -0
- package/dist/abortable-CQO6uG9F.mjs.map +1 -0
- package/dist/abortable-DBbAaT_4.d.mts +29 -0
- package/dist/abortable-DBbAaT_4.d.mts.map +1 -0
- package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts +7 -0
- package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +1 -0
- package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs +12 -0
- package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs.map +1 -0
- package/dist/array-equal-28xupwIB.mjs +26 -0
- package/dist/array-equal-28xupwIB.mjs.map +1 -0
- package/dist/array-equal-dUd-VPlk.d.mts +22 -0
- package/dist/array-equal-dUd-VPlk.d.mts.map +1 -0
- package/dist/assertions-BEQnOIQd.d.mts +31 -0
- package/dist/assertions-BEQnOIQd.d.mts.map +1 -0
- package/dist/assertions-Cz-GWH8P.mjs +36 -0
- package/dist/assertions-Cz-GWH8P.mjs.map +1 -0
- package/dist/authoring-Dd7p6pTS.d.mts +1 -0
- package/dist/canonical-stringify-Bl6agy_g.d.mts +51 -0
- package/dist/canonical-stringify-Bl6agy_g.d.mts.map +1 -0
- package/dist/canonical-stringify-DY4NaAJi.mjs +104 -0
- package/dist/canonical-stringify-DY4NaAJi.mjs.map +1 -0
- package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts +69 -0
- package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts.map +1 -0
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +25 -0
- package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +1 -0
- package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs +64 -0
- package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs.map +1 -0
- package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts +34 -0
- package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts.map +1 -0
- package/dist/casts-D29CHGrr.d.mts +78 -0
- package/dist/casts-D29CHGrr.d.mts.map +1 -0
- package/dist/casts-DpaahrlC-Bd5n2coI.mjs +82 -0
- package/dist/casts-DpaahrlC-Bd5n2coI.mjs.map +1 -0
- package/dist/codec-Cly9VPoA.mjs +78 -0
- package/dist/codec-Cly9VPoA.mjs.map +1 -0
- package/dist/codec-D3GVAkR_.d.mts +116 -0
- package/dist/codec-D3GVAkR_.d.mts.map +1 -0
- package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts +221 -0
- package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts.map +1 -0
- package/dist/components-CawuxTia.d.mts +1 -0
- package/dist/components.d.mts +20 -0
- package/dist/components.mjs +15 -0
- package/dist/components__authoring.d.mts +3 -0
- package/dist/components__authoring.mjs +2 -0
- package/dist/components__codec.d.mts +3 -0
- package/dist/components__codec.mjs +3 -0
- package/dist/components__components.d.mts +4 -0
- package/dist/components__components.mjs +3 -0
- package/dist/components__control.d.mts +4 -0
- package/dist/components__control.mjs +2 -0
- package/dist/components__emission.d.mts +4 -0
- package/dist/components__emission.mjs +2 -0
- package/dist/components__execution.d.mts +2 -0
- package/dist/components__execution.mjs +2 -0
- package/dist/components__ir.d.mts +3 -0
- package/dist/components__ir.mjs +3 -0
- package/dist/components__psl-ast.d.mts +4 -0
- package/dist/components__psl-ast.mjs +2 -0
- package/dist/components__runtime.d.mts +2 -0
- package/dist/components__runtime.mjs +3 -0
- package/dist/components__utils.d.mts +2 -0
- package/dist/components__utils.mjs +2 -0
- package/dist/config-errors-CBdiX587-DwIyJIX9.mjs +9 -0
- package/dist/config-errors-CBdiX587-DwIyJIX9.mjs.map +1 -0
- package/dist/config-types-Cf9lVsHR.mjs +62 -0
- package/dist/config-types-Cf9lVsHR.mjs.map +1 -0
- package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts +162 -0
- package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts.map +1 -0
- package/dist/config-types-zrHI32Om.d.mts +1 -0
- package/dist/config-validation-ByGTw6zQ.mjs +99 -0
- package/dist/config-validation-ByGTw6zQ.mjs.map +1 -0
- package/dist/config-validation-DXggMTZf.d.mts +14 -0
- package/dist/config-validation-DXggMTZf.d.mts.map +1 -0
- package/dist/config.d.mts +4 -0
- package/dist/config.mjs +3 -0
- package/dist/config__config-types.d.mts +3 -0
- package/dist/config__config-types.mjs +2 -0
- package/dist/config__config-validation.d.mts +2 -0
- package/dist/config__config-validation.mjs +2 -0
- package/dist/contract-authoring.d.mts +213 -0
- package/dist/contract-authoring.d.mts.map +1 -0
- package/dist/contract-authoring.mjs +133 -0
- package/dist/contract-authoring.mjs.map +1 -0
- package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts +77 -0
- package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +1 -0
- package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs +14 -0
- package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +1 -0
- package/dist/contract-validation-error-R7cMoK04.d.mts +11 -0
- package/dist/contract-validation-error-R7cMoK04.d.mts.map +1 -0
- package/dist/contract.d.mts +14 -0
- package/dist/contract.mjs +13 -0
- package/dist/contract__apply-specifier-default-control-policy.d.mts +2 -0
- package/dist/contract__apply-specifier-default-control-policy.mjs +2 -0
- package/dist/contract__contract-validation-error.d.mts +2 -0
- package/dist/contract__contract-validation-error.mjs +2 -0
- package/dist/contract__default-namespace.d.mts +2 -0
- package/dist/contract__default-namespace.mjs +2 -0
- package/dist/contract__enum-accessor.d.mts +2 -0
- package/dist/contract__enum-accessor.mjs +2 -0
- package/dist/contract__hashing-utils.d.mts +2 -0
- package/dist/contract__hashing-utils.mjs +3 -0
- package/dist/contract__hashing.d.mts +3 -0
- package/dist/contract__hashing.mjs +2 -0
- package/dist/contract__is-plain-record.d.mts +2 -0
- package/dist/contract__is-plain-record.mjs +2 -0
- package/dist/contract__resolve-domain-model.d.mts +2 -0
- package/dist/contract__resolve-domain-model.mjs +2 -0
- package/dist/contract__types.d.mts +6 -0
- package/dist/contract__types.mjs +5 -0
- package/dist/contract__validate-domain.d.mts +2 -0
- package/dist/contract__validate-domain.mjs +2 -0
- package/dist/control-B87KWI_K-C_R8WfEr.d.mts +213 -0
- package/dist/control-B87KWI_K-C_R8WfEr.d.mts.map +1 -0
- package/dist/control-CBvTj7Ia.d.mts +1383 -0
- package/dist/control-CBvTj7Ia.d.mts.map +1 -0
- package/dist/control-DTouE89s.mjs +621 -0
- package/dist/control-DTouE89s.mjs.map +1 -0
- package/dist/control-Ftiau058-CCeJcAVQ.mjs +284 -0
- package/dist/control-Ftiau058-CCeJcAVQ.mjs.map +1 -0
- package/dist/declarations-DR6To8_k-BFwkCGeP.mjs +1046 -0
- package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +1 -0
- package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs +39 -0
- package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs.map +1 -0
- package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts +26 -0
- package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts.map +1 -0
- package/dist/defined-BQWA85QH-BRSBMULx.mjs +31 -0
- package/dist/defined-BQWA85QH-BRSBMULx.mjs.map +1 -0
- package/dist/defined-BSXuxrnl.d.mts +28 -0
- package/dist/defined-BSXuxrnl.d.mts.map +1 -0
- package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts +359 -0
- package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +1 -0
- package/dist/emission-CeoAV9mj.mjs +26 -0
- package/dist/emission-CeoAV9mj.mjs.map +1 -0
- package/dist/emission-DeoQufVd.d.mts +1 -0
- package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts +75 -0
- package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts.map +1 -0
- package/dist/enum-accessor-Db5DaTNX.mjs +35 -0
- package/dist/enum-accessor-Db5DaTNX.mjs.map +1 -0
- package/dist/enum-accessor-PH5vjghI.d.mts +85 -0
- package/dist/enum-accessor-PH5vjghI.d.mts.map +1 -0
- package/dist/errors.d.mts +4 -0
- package/dist/errors.mjs +4 -0
- package/dist/errors__control.d.mts +2 -0
- package/dist/errors__control.mjs +2 -0
- package/dist/errors__execution.d.mts +2 -0
- package/dist/errors__execution.mjs +2 -0
- package/dist/errors__migration.d.mts +2 -0
- package/dist/errors__migration.mjs +2 -0
- package/dist/execution-BNwBzmRd.mjs +40 -0
- package/dist/execution-BNwBzmRd.mjs.map +1 -0
- package/dist/execution-BbOD4GyR.mjs +164 -0
- package/dist/execution-BbOD4GyR.mjs.map +1 -0
- package/dist/execution-Bo5Bu2Ys.d.mts +79 -0
- package/dist/execution-Bo5Bu2Ys.d.mts.map +1 -0
- package/dist/execution-MOde1lmD.d.mts +98 -0
- package/dist/execution-MOde1lmD.d.mts.map +1 -0
- package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts +777 -0
- package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts.map +1 -0
- package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs +698 -0
- package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs.map +1 -0
- package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs +27 -0
- package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs.map +1 -0
- package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts +388 -0
- package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts.map +1 -0
- package/dist/hash-content-Bugg_nZn.mjs +63 -0
- package/dist/hash-content-Bugg_nZn.mjs.map +1 -0
- package/dist/hash-content-DwEUh-Rx.d.mts +59 -0
- package/dist/hash-content-DwEUh-Rx.d.mts.map +1 -0
- package/dist/hashing-BtIZVNYX.mjs +199 -0
- package/dist/hashing-BtIZVNYX.mjs.map +1 -0
- package/dist/hashing-CccSPELN.d.mts +25 -0
- package/dist/hashing-CccSPELN.d.mts.map +1 -0
- package/dist/hashing-utils-DQgS3nOe.mjs +48 -0
- package/dist/hashing-utils-DQgS3nOe.mjs.map +1 -0
- package/dist/hashing-utils-qKu59RSC.d.mts +19 -0
- package/dist/hashing-utils-qKu59RSC.d.mts.map +1 -0
- package/dist/ids.d.mts +44 -0
- package/dist/ids.d.mts.map +1 -0
- package/dist/ids.mjs +96 -0
- package/dist/ids.mjs.map +1 -0
- package/dist/ids__runtime.d.mts +7 -0
- package/dist/ids__runtime.d.mts.map +1 -0
- package/dist/ids__runtime.mjs +31 -0
- package/dist/ids__runtime.mjs.map +1 -0
- package/dist/index-GY2oGH9L.d.mts +120 -0
- package/dist/index-GY2oGH9L.d.mts.map +1 -0
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs +24 -0
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +1 -0
- package/dist/internal-error-kK8QvlDE.d.mts +19 -0
- package/dist/internal-error-kK8QvlDE.d.mts.map +1 -0
- package/dist/ir-BvE7L9FK.d.mts +359 -0
- package/dist/ir-BvE7L9FK.d.mts.map +1 -0
- package/dist/ir-ChmSSAhX.mjs +200 -0
- package/dist/ir-ChmSSAhX.mjs.map +1 -0
- package/dist/is-plain-record-C9BWiqcw.d.mts +12 -0
- package/dist/is-plain-record-C9BWiqcw.d.mts.map +1 -0
- package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs +16 -0
- package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs.map +1 -0
- package/dist/json-Dkqr3say.d.mts +26 -0
- package/dist/json-Dkqr3say.d.mts.map +1 -0
- package/dist/migration-4VOHVEzx.mjs +118 -0
- package/dist/migration-4VOHVEzx.mjs.map +1 -0
- package/dist/migration-DKbDzBwy.d.mts +74 -0
- package/dist/migration-DKbDzBwy.d.mts.map +1 -0
- package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs +9 -0
- package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs.map +1 -0
- package/dist/operations.d.mts +46 -0
- package/dist/operations.d.mts.map +1 -0
- package/dist/operations.mjs +28 -0
- package/dist/operations.mjs.map +1 -0
- package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts +427 -0
- package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts.map +1 -0
- package/dist/parse-GbZGfMUj-BFSrD2AN.mjs +621 -0
- package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +1 -0
- package/dist/promise-D8meygPf.mjs +13 -0
- package/dist/promise-D8meygPf.mjs.map +1 -0
- package/dist/promise-DHJWZv49.d.mts +11 -0
- package/dist/promise-DHJWZv49.d.mts.map +1 -0
- package/dist/psl-ast-BEwO80EH.d.mts +37 -0
- package/dist/psl-ast-BEwO80EH.d.mts.map +1 -0
- package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts +259 -0
- package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts.map +1 -0
- package/dist/psl-ast-DUCvVXbB.mjs +239 -0
- package/dist/psl-ast-DUCvVXbB.mjs.map +1 -0
- package/dist/psl-parser.d.mts +158 -0
- package/dist/psl-parser.d.mts.map +1 -0
- package/dist/psl-parser.mjs +804 -0
- package/dist/psl-parser.mjs.map +1 -0
- package/dist/psl-parser__format.d.mts +12 -0
- package/dist/psl-parser__format.d.mts.map +1 -0
- package/dist/psl-parser__format.mjs +464 -0
- package/dist/psl-parser__format.mjs.map +1 -0
- package/dist/psl-parser__interpret.d.mts +40 -0
- package/dist/psl-parser__interpret.d.mts.map +1 -0
- package/dist/psl-parser__interpret.mjs +25 -0
- package/dist/psl-parser__interpret.mjs.map +1 -0
- package/dist/psl-parser__syntax.d.mts +31 -0
- package/dist/psl-parser__syntax.d.mts.map +1 -0
- package/dist/psl-parser__syntax.mjs +43 -0
- package/dist/psl-parser__syntax.mjs.map +1 -0
- package/dist/psl-parser__tokenizer.d.mts +2 -0
- package/dist/psl-parser__tokenizer.mjs +2 -0
- package/dist/psl-printer.d.mts +37 -0
- package/dist/psl-printer.d.mts.map +1 -0
- package/dist/psl-printer.mjs +393 -0
- package/dist/psl-printer.mjs.map +1 -0
- package/dist/redact-db-url-BlaloOwt.d.mts +22 -0
- package/dist/redact-db-url-BlaloOwt.d.mts.map +1 -0
- package/dist/redact-db-url-CRWJWdB1.mjs +26 -0
- package/dist/redact-db-url-CRWJWdB1.mjs.map +1 -0
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +59 -0
- package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +1 -0
- package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts +17 -0
- package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +1 -0
- package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs +20 -0
- package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs.map +1 -0
- package/dist/result-Bpupv5vO.d.mts +54 -0
- package/dist/result-Bpupv5vO.d.mts.map +1 -0
- package/dist/result-CBZ8X9mU.mjs +92 -0
- package/dist/result-CBZ8X9mU.mjs.map +1 -0
- package/dist/runtime--RZXG1zP.d.mts +901 -0
- package/dist/runtime--RZXG1zP.d.mts.map +1 -0
- package/dist/runtime-DYTFHGwh.mjs +516 -0
- package/dist/runtime-DYTFHGwh.mjs.map +1 -0
- package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs +40 -0
- package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs.map +1 -0
- package/dist/simplify-deep-Dw9I_ZUl.d.mts +6 -0
- package/dist/simplify-deep-Dw9I_ZUl.d.mts.map +1 -0
- package/dist/structured-error-BVmv2aPB.d.mts +34 -0
- package/dist/structured-error-BVmv2aPB.d.mts.map +1 -0
- package/dist/structured-error-H6WU9Kjt.mjs +31 -0
- package/dist/structured-error-H6WU9Kjt.mjs.map +1 -0
- package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts +125 -0
- package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts.map +1 -0
- package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs +228 -0
- package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +1 -0
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts +16 -0
- package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +1 -0
- package/dist/ts-render.d.mts +2 -0
- package/dist/ts-render.mjs +240 -0
- package/dist/ts-render.mjs.map +1 -0
- package/dist/types-ByeQhU9p.d.mts +17 -0
- package/dist/types-ByeQhU9p.d.mts.map +1 -0
- package/dist/types-DGxlljKG.d.mts +7 -0
- package/dist/types-DGxlljKG.d.mts.map +1 -0
- package/dist/types-DgdgskBY.mjs +96 -0
- package/dist/types-DgdgskBY.mjs.map +1 -0
- package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts +14 -0
- package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts.map +1 -0
- package/dist/utils-DMAM0unR.mjs +20 -0
- package/dist/utils-DMAM0unR.mjs.map +1 -0
- package/dist/utils-DeWL_zD9.d.mts +11 -0
- package/dist/utils-DeWL_zD9.d.mts.map +1 -0
- package/dist/utils.d.mts +16 -0
- package/dist/utils.mjs +13 -0
- package/dist/utils__abortable.d.mts +2 -0
- package/dist/utils__abortable.mjs +2 -0
- package/dist/utils__array-equal.d.mts +2 -0
- package/dist/utils__array-equal.mjs +2 -0
- package/dist/utils__assertions.d.mts +2 -0
- package/dist/utils__assertions.mjs +2 -0
- package/dist/utils__canonical-stringify.d.mts +2 -0
- package/dist/utils__canonical-stringify.mjs +2 -0
- package/dist/utils__casts.d.mts +2 -0
- package/dist/utils__casts.mjs +2 -0
- package/dist/utils__defined.d.mts +2 -0
- package/dist/utils__defined.mjs +2 -0
- package/dist/utils__hash-content.d.mts +2 -0
- package/dist/utils__hash-content.mjs +2 -0
- package/dist/utils__internal-error.d.mts +2 -0
- package/dist/utils__internal-error.mjs +2 -0
- package/dist/utils__json.d.mts +2 -0
- package/dist/utils__json.mjs +1 -0
- package/dist/utils__promise.d.mts +2 -0
- package/dist/utils__promise.mjs +2 -0
- package/dist/utils__redact-db-url.d.mts +2 -0
- package/dist/utils__redact-db-url.mjs +2 -0
- package/dist/utils__result.d.mts +2 -0
- package/dist/utils__result.mjs +2 -0
- package/dist/utils__simplify-deep.d.mts +2 -0
- package/dist/utils__simplify-deep.mjs +1 -0
- package/dist/utils__structured-error.d.mts +2 -0
- package/dist/utils__structured-error.mjs +2 -0
- package/dist/utils__types.d.mts +2 -0
- package/dist/utils__types.mjs +1 -0
- package/dist/validate-domain-BNBs-TVv.d.mts +22 -0
- package/dist/validate-domain-BNBs-TVv.d.mts.map +1 -0
- package/dist/validate-domain-BkvFlY3B.mjs +143 -0
- package/dist/validate-domain-BkvFlY3B.mjs.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-DTouE89s.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/control.mjs"],"sourcesContent":["import { n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BZF8TZh_.mjs\";\nimport { t as mergeCapabilityMatrices } from \"./capabilities-CPj7MfXO.mjs\";\nimport { _ as mergeAuthoringNamespaces, a as collectScalarTypeConstructors, i as collectContributedDescriptorPaths, n as assertResolvableTypeConstructorTemplates, t as assertNoCrossRegistryCollisions } from \"./framework-authoring-CDEvlouU.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/control/contract-snapshot-layout.ts\nconst CONTRACT_SNAPSHOTS_DIRNAME = \"snapshots\";\nconst STORAGE_HASH_PATTERN = /^[0-9a-f]{64}$/;\n/** Validate a storage hash for use as a directory name. */\nfunction storageHashHex(storageHash) {\n\tif (!STORAGE_HASH_PATTERN.test(storageHash)) throw new InternalError(`Invalid storage hash \"${storageHash}\": expected 64 lowercase hex characters`);\n\treturn storageHash;\n}\n/** Module specifier for the store's `contract.json`, POSIX separators. */\nfunction contractSnapshotJsonSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract.json`;\n}\n/** Type-only module specifier for the store's `contract.d.ts` (no extension). */\nfunction contractSnapshotTypesSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract`;\n}\n//#endregion\n//#region src/control/control-capabilities.ts\nfunction hasMigrations(target) {\n\treturn \"migrations\" in target && !!target[\"migrations\"];\n}\nfunction hasSchemaView(instance) {\n\treturn \"toSchemaView\" in instance && typeof instance[\"toSchemaView\"] === \"function\";\n}\nfunction hasPslContractInfer(instance) {\n\treturn \"inferPslContract\" in instance && typeof instance[\"inferPslContract\"] === \"function\";\n}\nfunction hasOperationPreview(instance) {\n\treturn \"toOperationPreview\" in instance && typeof instance[\"toOperationPreview\"] === \"function\";\n}\nfunction hasSchemaSubjectClassifier(instance) {\n\treturn \"classifySubjectGranularity\" in instance && typeof instance[\"classifySubjectGranularity\"] === \"function\" && \"classifyEntityKind\" in instance && typeof instance[\"classifyEntityKind\"] === \"function\";\n}\n//#endregion\n//#region src/control/control-operation-results.ts\nconst VERIFY_CODE_MARKER_MISSING = \"CONTRACT.MARKER_MISSING\";\nconst VERIFY_CODE_HASH_MISMATCH = \"CONTRACT.MARKER_MISMATCH\";\nconst VERIFY_CODE_TARGET_MISMATCH = \"CONTRACT.TARGET_MISMATCH\";\nconst VERIFY_CODE_SCHEMA_FAILURE = \"CONTRACT.SCHEMA_VERIFICATION_FAILED\";\n//#endregion\n//#region src/control/control-schema-view.ts\nvar SchemaTreeNode = class {\n\tkind;\n\tid;\n\tlabel;\n\tmeta;\n\tchildren;\n\tconstructor(options) {\n\t\tthis.kind = options.kind;\n\t\tthis.id = options.id;\n\t\tthis.label = options.label;\n\t\tif (options.meta !== void 0) this.meta = options.meta;\n\t\tif (options.children !== void 0) this.children = options.children;\n\t\tObject.freeze(this);\n\t}\n\taccept(visitor) {\n\t\treturn visitor.visit(this);\n\t}\n};\n//#endregion\n//#region src/control/control-spaces.ts\n/**\n* Canonical control-plane identifiers for contract spaces.\n*\n* A contract space is the disjoint `(contract.json, migration-graph)` unit\n* the per-space planner / runner / verifier (project: extension contract\n* spaces, TML-2397) operates on. The application owns one well-known\n* space — the value below — and each loaded extension that contributes\n* schema owns a uniquely-named space.\n*\n* Lives in `framework-components/control` so every layer that has to\n* reason about space identity (the migration tooling, the SQL runtime's\n* marker reader, target-side statement builders, target-side adapters)\n* can import a single value rather than duplicating the literal. Raw\n* `'app'` string literals in framework / target / runtime / adapter\n* source code are forbidden and policed by\n* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).\n*\n* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).\n*/\nconst APP_SPACE_ID = \"app\";\n//#endregion\n//#region src/control/control-stack.ts\nfunction addUniqueId(ids, seen, id) {\n\tif (!seen.has(id)) {\n\t\tids.push(id);\n\t\tseen.add(id);\n\t}\n}\nfunction assertUniqueCodecOwner(options) {\n\tconst existingOwner = options.owners.get(options.codecId);\n\tif (existingOwner !== void 0) throw new InternalError(`Duplicate ${options.entityLabel} for codecId \"${options.codecId}\". Descriptor \"${options.descriptorId}\" conflicts with \"${existingOwner}\". Each codecId can only have one ${options.entityOwnershipLabel}.`);\n}\nfunction extractCodecTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tif (codecTypes?.import) imports.push(codecTypes.import);\n\t\tif (codecTypes?.typeImports) imports.push(...codecTypes.typeImports);\n\t}\n\treturn imports;\n}\nfunction extractQueryOperationTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst queryOperationTypes = descriptor.types?.queryOperationTypes;\n\t\tif (queryOperationTypes?.import) imports.push(queryOperationTypes.import);\n\t}\n\treturn imports;\n}\nfunction extractComponentIds(family, target, adapter, extensions) {\n\tconst ids = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\taddUniqueId(ids, seen, family.id);\n\taddUniqueId(ids, seen, target.id);\n\tif (adapter) addUniqueId(ids, seen, adapter.id);\n\tfor (const ext of extensions) addUniqueId(ids, seen, ext.id);\n\treturn ids;\n}\nfunction assembleAuthoringContributions(descriptors) {\n\tconst field = {};\n\tconst type = {};\n\tconst entityTypes = {};\n\tconst pslBlockDescriptors = {};\n\tconst modelAttributes = {};\n\tconst pathOwners = /* @__PURE__ */ new Map();\n\tconst claimContributedPaths = (namespace, descriptorKind, label, descriptorId) => {\n\t\tfor (const path of collectContributedDescriptorPaths(namespace, descriptorKind)) {\n\t\t\tconst key = `${label}:${path}`;\n\t\t\tconst existingOwner = pathOwners.get(key);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate authoring ${label} helper \"${path}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tpathOwners.set(key, descriptorId);\n\t\t}\n\t};\n\tlet valueObjectStorageDeclaration;\n\tfor (const descriptor of descriptors) {\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tconst declaredValueObjectStorageType = descriptor.authoring?.valueObjectStorageType;\n\t\tif (declaredValueObjectStorageType !== void 0) {\n\t\t\tif (valueObjectStorageDeclaration !== void 0) throw new InternalError(`Duplicate authoring valueObjectStorageType declaration. Descriptor \"${descriptorId}\" conflicts with \"${valueObjectStorageDeclaration.ownerId}\". Exactly one composed component may declare the value-object storage type.`);\n\t\t\tvalueObjectStorageDeclaration = {\n\t\t\t\tname: declaredValueObjectStorageType,\n\t\t\t\townerId: descriptorId\n\t\t\t};\n\t\t}\n\t\tif (descriptor.authoring?.field) {\n\t\t\tclaimContributedPaths(descriptor.authoring.field, \"fieldPreset\", \"field\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(field, descriptor.authoring.field, [], \"fieldPreset\", \"field\");\n\t\t}\n\t\tif (descriptor.authoring?.type) {\n\t\t\tclaimContributedPaths(descriptor.authoring.type, \"typeConstructor\", \"type\", descriptorId);\n\t\t\tassertResolvableTypeConstructorTemplates(descriptor.authoring.type, descriptorId);\n\t\t\tmergeAuthoringNamespaces(type, descriptor.authoring.type, [], \"typeConstructor\", \"type\");\n\t\t}\n\t\tif (descriptor.authoring?.entityTypes) {\n\t\t\tclaimContributedPaths(descriptor.authoring.entityTypes, \"entity\", \"entity\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(entityTypes, descriptor.authoring.entityTypes, [], \"entity\", \"entity\");\n\t\t}\n\t\tif (descriptor.authoring?.pslBlockDescriptors) {\n\t\t\tclaimContributedPaths(descriptor.authoring.pslBlockDescriptors, \"pslBlock\", \"pslBlock\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(pslBlockDescriptors, descriptor.authoring.pslBlockDescriptors, [], \"pslBlock\", \"pslBlock\");\n\t\t}\n\t\tif (descriptor.authoring?.modelAttributes) mergeAuthoringNamespaces(modelAttributes, descriptor.authoring.modelAttributes, [], \"modelAttribute\", \"modelAttribute\");\n\t}\n\tconst fieldNamespace = field;\n\tconst typeNamespace = type;\n\tconst entityTypeNamespace = entityTypes;\n\tconst pslBlockDescriptorNamespace = blindCast(pslBlockDescriptors);\n\tconst modelAttributeNamespace = blindCast(modelAttributes);\n\tassertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace, pslBlockDescriptorNamespace, modelAttributeNamespace);\n\tif (valueObjectStorageDeclaration !== void 0 && !collectScalarTypeConstructors(typeNamespace).has(valueObjectStorageDeclaration.name)) throw new InternalError(`Invalid authoring valueObjectStorageType \"${valueObjectStorageDeclaration.name}\" declared by descriptor \"${valueObjectStorageDeclaration.ownerId}\". The name must be a top-level bare-eligible type constructor in the assembled authoring namespace.`);\n\treturn {\n\t\tfield: fieldNamespace,\n\t\ttype: typeNamespace,\n\t\tentityTypes: entityTypeNamespace,\n\t\tpslBlockDescriptors: pslBlockDescriptorNamespace,\n\t\tmodelAttributes: modelAttributeNamespace,\n\t\t...valueObjectStorageDeclaration !== void 0 ? { valueObjectStorageType: valueObjectStorageDeclaration.name } : {}\n\t};\n}\nfunction assembleControlMutationDefaults(descriptors) {\n\tconst defaultFunctionRegistry = /* @__PURE__ */ new Map();\n\tconst functionOwners = /* @__PURE__ */ new Map();\n\tconst generatorMap = /* @__PURE__ */ new Map();\n\tconst generatorOwners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst contributions = descriptor.controlMutationDefaults;\n\t\tif (!contributions) continue;\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tfor (const generatorDescriptor of contributions.generatorDescriptors) {\n\t\t\tconst existingOwner = generatorOwners.get(generatorDescriptor.id);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default generator id \"${generatorDescriptor.id}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tgeneratorMap.set(generatorDescriptor.id, generatorDescriptor);\n\t\t\tgeneratorOwners.set(generatorDescriptor.id, descriptorId);\n\t\t}\n\t\tfor (const [functionName, handler] of contributions.defaultFunctionRegistry) {\n\t\t\tconst existingOwner = functionOwners.get(functionName);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default function \"${functionName}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tdefaultFunctionRegistry.set(functionName, handler);\n\t\t\tfunctionOwners.set(functionName, descriptorId);\n\t\t}\n\t}\n\treturn {\n\t\tdefaultFunctionRegistry,\n\t\tgeneratorDescriptors: Array.from(generatorMap.values())\n\t};\n}\nfunction extractCodecLookup(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst descriptorsById = /* @__PURE__ */ new Map();\n\tconst targetTypesById = /* @__PURE__ */ new Map();\n\tconst renderersById = /* @__PURE__ */ new Map();\n\tconst inputRenderersById = /* @__PURE__ */ new Map();\n\tconst valueLiteralRenderersById = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tconst descriptorId = descriptor.id;\n\t\tfor (const codecDescriptor of codecTypes?.codecDescriptors ?? []) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId: codecDescriptor.codecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId,\n\t\t\t\tentityLabel: \"codec descriptor\",\n\t\t\t\tentityOwnershipLabel: \"codec descriptor provider\"\n\t\t\t});\n\t\t\towners.set(codecDescriptor.codecId, descriptorId);\n\t\t\tdescriptorsById.set(codecDescriptor.codecId, codecDescriptor);\n\t\t\tif (Array.isArray(codecDescriptor.targetTypes)) targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);\n\t\t\tif (typeof codecDescriptor.renderOutputType === \"function\") renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);\n\t\t\tif (typeof codecDescriptor.renderInputType === \"function\") inputRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderInputType);\n\t\t\tif (typeof codecDescriptor.renderValueLiteral === \"function\") valueLiteralRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderValueLiteral);\n\t\t\tif (!byId.has(codecDescriptor.codecId)) if (codecDescriptor.isParameterized) try {\n\t\t\t\tconst representative = codecDescriptor.factory({})({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t} catch {}\n\t\t\telse {\n\t\t\t\tconst representative = codecDescriptor.factory(void 0)({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tget: (id) => byId.get(id),\n\t\tforCodecRef(ref) {\n\t\t\treturn materializeCodec(resolveCodecDescriptorOrThrow((id) => descriptorsById.get(id), ref, CONTRACT_CODEC_DESCRIPTOR_MISSING), ref, { name: `<ref:${ref.codecId}>` });\n\t\t},\n\t\tforColumn: () => void 0,\n\t\ttargetTypesFor: (id) => targetTypesById.get(id),\n\t\trenderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),\n\t\trenderInputTypeFor: (id, params) => inputRenderersById.get(id)?.(params),\n\t\trenderValueLiteralFor: (id, value, side) => valueLiteralRenderersById.get(id)?.(value, side),\n\t\tdescriptorFor: (id) => descriptorsById.get(id)\n\t};\n}\nfunction assembleExtensionContracts(extensions) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (ext.contractSpace === void 0) continue;\n\t\tresult.set(ext.id, ext.contractSpace.contractJson);\n\t}\n\treturn result;\n}\nfunction readDeclaredDependencyIds(descriptor) {\n\tconst packs = descriptor.contractSpace?.contractJson?.extensions;\n\tif (packs === null || typeof packs !== \"object\") return [];\n\treturn Object.keys(packs);\n}\n/**\n* Builds a dependency-respecting load order for the given extension descriptors\n* using Kahn's topological sort algorithm. Dependencies (packs declared in\n* `contractSpace.contractJson.extensions`) are placed before the extensions\n* that depend on them.\n*\n* Throws if the dependency graph contains a cycle, with an error message that\n* names every extension involved in the cycle.\n*\n* Throws if any extension declares a dependency on a pack ID that is not present\n* in the provided list — add the missing pack to the `extensions` list to\n* resolve the error.\n*/\nfunction buildExtensionLoadOrder(extensions) {\n\tif (extensions.length === 0) return [];\n\tconst idSet = new Set(extensions.map((e) => e.id));\n\tconst inDegree = /* @__PURE__ */ new Map();\n\tconst dependents = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (!inDegree.has(ext.id)) inDegree.set(ext.id, 0);\n\t\tif (!dependents.has(ext.id)) dependents.set(ext.id, []);\n\t}\n\tfor (const ext of extensions) for (const depId of readDeclaredDependencyIds(ext)) {\n\t\tif (!idSet.has(depId)) throw new InternalError(`Extension \"${ext.id}\" declares a dependency on \"${depId}\", but \"${depId}\" is not in the provided extension set. Add the missing space to extensions.`);\n\t\tinDegree.set(ext.id, (inDegree.get(ext.id) ?? 0) + 1);\n\t\tconst list = dependents.get(depId);\n\t\tif (list !== void 0) list.push(ext.id);\n\t}\n\tconst queue = [];\n\tfor (const [id, deg] of inDegree) if (deg === 0) queue.push(id);\n\tqueue.sort();\n\tconst result = [];\n\twhile (queue.length > 0) {\n\t\tconst id = queue.shift();\n\t\tif (id === void 0) break;\n\t\tresult.push(id);\n\t\tconst children = dependents.get(id) ?? [];\n\t\tchildren.sort();\n\t\tfor (const childId of children) {\n\t\t\tconst newDeg = (inDegree.get(childId) ?? 1) - 1;\n\t\t\tinDegree.set(childId, newDeg);\n\t\t\tif (newDeg === 0) queue.push(childId);\n\t\t}\n\t}\n\tif (result.length < extensions.length) throw new InternalError(`Extension dependency cycle detected. Cycle members: ${extensions.map((e) => e.id).filter((id) => !result.includes(id)).sort().map((id) => `\"${id}\"`).join(\", \")}.`);\n\treturn result;\n}\nfunction createControlStack(input) {\n\tconst { family, target, adapter, driver, extensions = [] } = input;\n\tconst orderedIds = buildExtensionLoadOrder(extensions);\n\tconst extensionById = new Map(extensions.map((ext) => [ext.id, ext]));\n\tconst orderedExtensions = orderedIds.map((id) => extensionById.get(id)).filter((ext) => ext !== void 0);\n\tconst allDescriptors = [\n\t\tfamily,\n\t\ttarget,\n\t\t...adapter ? [adapter] : [],\n\t\t...orderedExtensions\n\t];\n\tconst codecLookup = extractCodecLookup(allDescriptors);\n\tconst authoringContributions = assembleAuthoringContributions(allDescriptors);\n\treturn {\n\t\tfamily,\n\t\ttarget,\n\t\tadapter,\n\t\tdriver,\n\t\textensions: orderedExtensions,\n\t\textensionContracts: assembleExtensionContracts(orderedExtensions),\n\t\tcodecTypeImports: extractCodecTypeImports(allDescriptors),\n\t\tqueryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),\n\t\textensionIds: extractComponentIds(family, target, adapter, orderedExtensions),\n\t\tcodecLookup,\n\t\tauthoringContributions,\n\t\tscalarTypes: [...collectScalarTypeConstructors(authoringContributions.type).keys()],\n\t\tcontrolMutationDefaults: assembleControlMutationDefaults(allDescriptors),\n\t\tcapabilities: mergeCapabilityMatrices({}, [\n\t\t\ttarget,\n\t\t\t...adapter ? [adapter] : [],\n\t\t\t...orderedExtensions\n\t\t])\n\t};\n}\n//#endregion\n//#region src/control/order-issues-by-dependencies.ts\nconst PATH_DELIMITER = \" \";\nfunction pathKey(path) {\n\treturn path.join(PATH_DELIMITER);\n}\n/**\n* Whether an issue's op builds its subject up (create or alter) rather than\n* only tearing it down. The differ sets `expected` on every create (`not-found`)\n* and alter (`not-equal`) issue and leaves it absent on a pure drop\n* (`not-expected`). This is the single signal the ordering law reads for edge\n* direction — never `reason`.\n*/\nfunction buildsUp(issue) {\n\treturn issue.expected !== void 0;\n}\n/**\n* The nearest strict-ancestor bucket of `path` — the surviving parent entity a\n* child is contained by. Walks the path's proper prefixes from longest to\n* shortest and returns the first prefix that maps to a bucket; a gap (a prefix\n* with no bucket) is skipped so containment always attaches to the closest real\n* parent.\n*\n* Returns a list because a path prefix can be shared by two siblings of\n* different `nodeKind` (a role and a namespace named alike); linking the child\n* to every candidate over-constrains safely (the extra edge points at a same-\n* direction op and never forms a cycle, since a parent never depends on its\n* child) rather than risk picking the wrong one.\n*/\nfunction nearestAncestors(path, byPath) {\n\tfor (let end = path.length - 1; end >= 1; end -= 1) {\n\t\tconst bucket = byPath.get(pathKey(path.slice(0, end)));\n\t\tif (bucket !== void 0) return bucket;\n\t}\n\treturn [];\n}\n/**\n* Orders schema-diff issues so that every dependency's op precedes its\n* dependent on the way up and follows it on the way down, breaking ties\n* deterministically by path.\n*\n* Edges come from two sources:\n* - **`dependsOn` cross-links** — the resolved issue-to-issue paths the differ\n* mirrors onto each issue (a node's declared structural prerequisites). A\n* path that resolves to no issue in this list is skipped (the dependency is\n* satisfied by reality); a path shared by two same-id/different-kind siblings\n* links to every match, over-constraining safely.\n* - **containment** — every issue depends on its nearest strict-ancestor issue\n* (a child entity on the parent entity that owns it). Subtree coalescing has\n* already removed the descendants of a whole create/drop, so this only links\n* the parent/child pairs that legitimately survive together.\n*\n* The ordering law reads each dependent's presence for direction: an issue that\n* builds up (`expected` present — a create or alter) needs its dependency\n* first; a pure drop needs its dependent removed first, so the edge reverses.\n* The graph is a DAG by construction (dependencies point from dependents to\n* their prerequisites, and prerequisites never point back), so a cycle is a\n* derivation or authoring bug: the topological sort asserts acyclicity and\n* throws, naming the issues it could not place.\n*/\nfunction orderIssuesByDependencies(issues) {\n\tif (issues.length <= 1) return issues;\n\tconst nodes = issues.map((issue) => ({\n\t\tissue,\n\t\tkey: pathKey(issue.path),\n\t\tbuildsUp: buildsUp(issue),\n\t\toutgoing: /* @__PURE__ */ new Set(),\n\t\tinDegree: 0\n\t}));\n\tconst nodesByPath = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) {\n\t\tconst bucket = nodesByPath.get(node.key);\n\t\tif (bucket === void 0) nodesByPath.set(node.key, [node]);\n\t\telse bucket.push(node);\n\t}\n\tconst addEdge = (before, after) => {\n\t\tif (before.outgoing.has(after)) return;\n\t\tbefore.outgoing.add(after);\n\t\tafter.inDegree += 1;\n\t};\n\tconst addDependency = (dependent, dependency) => {\n\t\tif (dependent === dependency) return;\n\t\tif (dependent.buildsUp) addEdge(dependency, dependent);\n\t\telse addEdge(dependent, dependency);\n\t};\n\tfor (const node of nodes) {\n\t\tfor (const targetPath of node.issue.dependsOn ?? []) for (const target of nodesByPath.get(pathKey(targetPath)) ?? []) addDependency(node, target);\n\t\tfor (const ancestor of nearestAncestors(node.issue.path, nodesByPath)) addDependency(node, ancestor);\n\t}\n\tconst ready = nodes.filter((node) => node.inDegree === 0);\n\tconst order = [];\n\twhile (ready.length > 0) {\n\t\tlet best;\n\t\tfor (const candidate of ready) if (best === void 0 || candidate.key < best.key) best = candidate;\n\t\tif (best === void 0) break;\n\t\tready.splice(ready.indexOf(best), 1);\n\t\torder.push(best);\n\t\tfor (const next of best.outgoing) {\n\t\t\tnext.inDegree -= 1;\n\t\t\tif (next.inDegree === 0) ready.push(next);\n\t\t}\n\t}\n\tif (order.length !== nodes.length) {\n\t\tconst placed = new Set(order);\n\t\tthrow new InternalError(`orderIssuesByDependencies: dependency cycle among schema-diff issues (unresolved: ${nodes.filter((node) => !placed.has(node)).map((node) => node.issue.path.join(\"/\")).join(\", \")})`);\n\t}\n\treturn order.map((node) => node.issue);\n}\n//#endregion\n//#region src/control/schema-diff.ts\n/**\n* The outcome an issue represents, discriminated by presence rather than any\n* stored field — the single source of truth every consumer reads. An issue\n* always carries at least one side by construction; neither is a malformed\n* issue and throws.\n*/\nfunction issueOutcome(issue) {\n\tconst hasExpected = issue.expected !== void 0;\n\tconst hasActual = issue.actual !== void 0;\n\tif (hasExpected && hasActual) return \"not-equal\";\n\tif (hasExpected) return \"not-found\";\n\tif (hasActual) return \"not-expected\";\n\tthrow new InternalError(`issueOutcome: issue at \"${issue.path.join(\"/\")}\" carries neither an expected nor an actual node`);\n}\n/** Delimiter joining `nodeKind` and `id` into one sibling-map key. Every `nodeKind` is a code-defined literal (kebab-case-style), so a null character can never appear in one. */\nconst SIBLING_KEY_DELIMITER = \"\\0\";\nfunction siblingKey(node) {\n\treturn `${node.nodeKind}${SIBLING_KEY_DELIMITER}${node.id}`;\n}\nfunction insertNode(map, node) {\n\tconst key = siblingKey(node);\n\tif (map.has(key)) throw new InternalError(`diffSchemas: duplicate id among siblings: ${node.nodeKind}/${node.id}`);\n\tmap.set(key, node);\n}\nfunction emitMissingSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\texpected: node\n\t}, ...node.children().flatMap((c) => emitMissingSubtree(c, path))];\n}\nfunction emitExtraSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\tactual: node\n\t}, ...node.children().flatMap((c) => emitExtraSubtree(c, path))];\n}\n/**\n* Diff two schema trees starting from their roots.\n*\n* The differ is **total**: every node-level difference is reported. An unmatched\n* non-leaf node emits its own issue and descends, emitting an issue for every\n* node in the missing/extra subtree. Coalescing a parent change over its\n* children is the planner's responsibility. Ownership filtering (dropping `extra`\n* issues in namespaces a contract doesn't own) is the caller's responsibility.\n*/\nfunction diffSchemas(expected, actual) {\n\treturn mirrorDependsOnOntoIssues(diffPair(expected, actual, []));\n}\nfunction schemaNodeRefKey(ref) {\n\treturn ref.map((step) => step.id).join(SIBLING_KEY_DELIMITER);\n}\nfunction issuePathKey(path) {\n\treturn path.join(SIBLING_KEY_DELIMITER);\n}\nfunction terminalNodeKind(issue) {\n\treturn (issue.expected ?? issue.actual)?.nodeKind;\n}\n/**\n* Copies each issue's node's `dependsOn` refs onto the issue itself, as\n* issue-to-issue path references. A ref is kept only when some emitted issue\n* sits at that exact path AND that issue's node `nodeKind` matches the ref's\n* last step — otherwise the ref is dropped (its target either didn't\n* change, or was never part of either tree; either way the dependency is\n* satisfied by reality, not by an operation this diff will produce).\n*\n* The path index is a multimap: two siblings may share an `id` under\n* different `nodeKind`s (a role and a namespace named alike), so an id-path\n* alone is ambiguous. The ref's terminal `nodeKind` disambiguates — the ref\n* resolves only against a same-path issue whose own node carries that kind.\n*/\nfunction mirrorDependsOnOntoIssues(issues) {\n\tconst issuesByPath = /* @__PURE__ */ new Map();\n\tfor (const issue of issues) {\n\t\tconst key = issuePathKey(issue.path);\n\t\tconst bucket = issuesByPath.get(key);\n\t\tif (bucket === void 0) issuesByPath.set(key, [issue]);\n\t\telse bucket.push(issue);\n\t}\n\treturn issues.map((issue) => {\n\t\tconst refs = (issue.expected ?? issue.actual)?.dependsOn;\n\t\tif (refs === void 0 || refs.length === 0) return issue;\n\t\tconst dependsOn = refs.flatMap((ref) => {\n\t\t\tconst lastStep = ref[ref.length - 1];\n\t\t\tif (lastStep === void 0) return [];\n\t\t\tif (!(issuesByPath.get(schemaNodeRefKey(ref)) ?? []).some((c) => terminalNodeKind(c) === lastStep.nodeKind)) return [];\n\t\t\treturn [ref.map((step) => step.id)];\n\t\t});\n\t\tif (dependsOn.length === 0) return issue;\n\t\treturn {\n\t\t\t...issue,\n\t\t\tdependsOn\n\t\t};\n\t});\n}\nfunction diffPair(expected, actual, parentPath) {\n\tconst path = [...parentPath, expected.id];\n\tconst issues = [];\n\tif (!expected.isEqualTo(actual)) issues.push({\n\t\tpath,\n\t\texpected,\n\t\tactual\n\t});\n\tissues.push(...diffChildren(expected.children(), actual.children(), path));\n\treturn issues;\n}\n/**\n* Align one level of nodes by `(nodeKind, id)`; emit issues in input order\n* and recurse.\n*\n* A missing node emits one issue for itself and one for every node in its\n* subtree (total descent). Same for extra nodes. A matched pair recurses via\n* `diffPair`.\n*/\nfunction diffChildren(expected, actual, parentPath) {\n\tconst expectedMap = /* @__PURE__ */ new Map();\n\tfor (const node of expected) insertNode(expectedMap, node);\n\tconst actualMap = /* @__PURE__ */ new Map();\n\tfor (const node of actual) insertNode(actualMap, node);\n\tconst issues = [];\n\tfor (const [key, expectedNode] of expectedMap) {\n\t\tconst actualNode = actualMap.get(key);\n\t\tif (actualNode === void 0) issues.push(...emitMissingSubtree(expectedNode, parentPath));\n\t\telse issues.push(...diffPair(expectedNode, actualNode, parentPath));\n\t}\n\tfor (const [key, actualNode] of actualMap) if (!expectedMap.has(key)) issues.push(...emitExtraSubtree(actualNode, parentPath));\n\treturn issues;\n}\n/**\n* The result of diffing a contract's expected schema against the introspected\n* actual schema: one node-typed issue list. Carries no verdict, verification\n* tree, or counts — those are the verifier's own presentation, built from the\n* same underlying comparison.\n*\n* `TNode` is the concrete schema-IR node the issues carry; it defaults to\n* `DiffableNode`, so this is purely additive — a caller that wants the\n* concrete node opts in (the Postgres planner uses the concrete node type),\n* everyone else keeps the default unchanged.\n*/\nvar SchemaDiff = class SchemaDiff {\n\tissues;\n\tconstructor(issues) {\n\t\tthis.issues = issues;\n\t}\n\t/** Returns a new `SchemaDiff` narrowed to the issues `keep` returns true for. */\n\tfilter(keep) {\n\t\treturn new SchemaDiff(this.issues.filter(keep));\n\t}\n};\n//#endregion\n//#region src/control/verifier-disposition.ts\n/**\n* Grades a target-neutral issue category against a control policy.\n*\n* - `observed` warns on everything.\n* - `tolerated` suppresses only an extra nested element (everything else fails).\n* - `external` suppresses every extra category and value drift (existence and\n* declared-shape divergences still fail).\n* - `managed` (and any other) fails.\n*/\nfunction dispositionForCategory(controlPolicy, category) {\n\tif (controlPolicy === \"observed\") return \"warn\";\n\tif (controlPolicy === \"tolerated\" && category === \"extraNestedElement\") return \"suppress\";\n\tif (controlPolicy === \"external\") {\n\t\tif (category === \"extraNestedElement\" || category === \"extraAuxiliary\" || category === \"extraTopLevelObject\" || category === \"valueDrift\") return \"suppress\";\n\t}\n\treturn \"fail\";\n}\n//#endregion\nexport { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME, SchemaDiff, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assertUniqueCodecOwner, buildExtensionLoadOrder, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, createControlStack, diffSchemas, dispositionForCategory, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, issueOutcome, orderIssuesByDependencies, storageHashHex };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;AAMA,MAAM,6BAA6B;AACnC,MAAM,uBAAuB;;AAE7B,SAAS,eAAe,aAAa;CACpC,IAAI,CAAC,qBAAqB,KAAK,WAAW,GAAG,MAAM,IAAI,cAAc,yBAAyB,YAAY,wCAAwC;CAClJ,OAAO;AACR;;AAEA,SAAS,8BAA8B,qBAAqB,aAAa;CACxE,OAAO,GAAG,oBAAoB,GAAG,eAAe,WAAW,EAA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aAAa,MAAM,WAAW;CACjC;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;;CAEA,OAAO,MAAM;EACZ,OAAO,IAAI,WAAW,KAAK,OAAO,OAAO,IAAI,CAAC;CAC/C;AACD;;;;;;;;;;AAYA,SAAS,uBAAuB,eAAe,UAAU;CACxD,IAAI,kBAAkB,YAAY,OAAO;CACzC,IAAI,kBAAkB,eAAe,aAAa,sBAAsB,OAAO;CAC/E,IAAI,kBAAkB,YACjB;MAAA,aAAa,wBAAwB,aAAa,oBAAoB,aAAa,yBAAyB,aAAa,cAAc,OAAO;CAAA;CAEnJ,OAAO;AACR"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
2
|
+
import { r as docsUrlFor } from "./structured-error-H6WU9Kjt.mjs";
|
|
3
|
+
//#region ../../../1-framework/1-core/errors/dist/control-Ftiau058.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Structured CLI error that contains all information needed for error envelopes.
|
|
6
|
+
* Call sites throw these errors with full context.
|
|
7
|
+
*
|
|
8
|
+
* A `CliStructuredError` is a `StructuredError` (see
|
|
9
|
+
* `@internal/utils/structured-error`): `code` is a dotted
|
|
10
|
+
* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's
|
|
11
|
+
* category — there is no separate `domain` field. See
|
|
12
|
+
* [ADR 239](../../../../../docs/architecture%20docs/adrs/ADR%20239%20-%20Errors%20are%20structural%20envelopes%20with%20dotted%20namespace%20codes.md)
|
|
13
|
+
* for the namespace taxonomy.
|
|
14
|
+
*/
|
|
15
|
+
var CliStructuredError = class extends Error {
|
|
16
|
+
code;
|
|
17
|
+
severity;
|
|
18
|
+
constructor(code, summary, options) {
|
|
19
|
+
super(summary);
|
|
20
|
+
this.name = "CliStructuredError";
|
|
21
|
+
this.code = code;
|
|
22
|
+
this.severity = options?.severity ?? "error";
|
|
23
|
+
const fix = options?.fix === options?.why ? void 0 : options?.fix;
|
|
24
|
+
const where = options?.where ? {
|
|
25
|
+
...ifDefined("path", options.where.path),
|
|
26
|
+
...ifDefined("line", options.where.line)
|
|
27
|
+
} : void 0;
|
|
28
|
+
Object.assign(this, {
|
|
29
|
+
...ifDefined("why", options?.why),
|
|
30
|
+
...ifDefined("fix", fix),
|
|
31
|
+
...ifDefined("where", where),
|
|
32
|
+
...ifDefined("meta", options?.meta),
|
|
33
|
+
...ifDefined("docsUrl", options?.docsUrl)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Converts this error to a CLI error envelope for output formatting.
|
|
38
|
+
*/
|
|
39
|
+
toEnvelope() {
|
|
40
|
+
return {
|
|
41
|
+
ok: false,
|
|
42
|
+
code: this.code,
|
|
43
|
+
severity: this.severity,
|
|
44
|
+
summary: this.message,
|
|
45
|
+
...ifDefined("why", this.why),
|
|
46
|
+
...ifDefined("fix", this.fix),
|
|
47
|
+
...ifDefined("where", this.where),
|
|
48
|
+
...ifDefined("meta", this.meta),
|
|
49
|
+
...ifDefined("docsUrl", this.docsUrl)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Type guard to check if an error is a CliStructuredError.
|
|
54
|
+
* Uses duck-typing to work across module boundaries where instanceof may fail.
|
|
55
|
+
*/
|
|
56
|
+
static is(error) {
|
|
57
|
+
if (!(error instanceof Error)) return false;
|
|
58
|
+
const candidate = error;
|
|
59
|
+
return candidate.name === "CliStructuredError" && typeof candidate.code === "string" && typeof candidate.toEnvelope === "function";
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Config file not found or missing.
|
|
64
|
+
*/
|
|
65
|
+
function errorConfigFileNotFound(configPath, options) {
|
|
66
|
+
return new CliStructuredError("CONFIG.FILE_NOT_FOUND", "Config file not found", {
|
|
67
|
+
...options?.why ? { why: options.why } : { why: "Config file not found" },
|
|
68
|
+
fix: "Run 'prisma-next init' to create a config file",
|
|
69
|
+
docsUrl: docsUrlFor("CONFIG.FILE_NOT_FOUND"),
|
|
70
|
+
...configPath ? { where: { path: configPath } } : {}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Contract configuration missing from config.
|
|
75
|
+
*/
|
|
76
|
+
function errorContractConfigMissing(options) {
|
|
77
|
+
return new CliStructuredError("CONFIG.CONTRACT_MISSING", "Contract configuration missing", {
|
|
78
|
+
why: options?.why ?? "The contract configuration is required for emit",
|
|
79
|
+
fix: "Add contract configuration to your prisma-next.config.ts",
|
|
80
|
+
docsUrl: docsUrlFor("CONFIG.CONTRACT_MISSING")
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Contract validation failed.
|
|
85
|
+
*/
|
|
86
|
+
function errorContractValidationFailed(reason, options) {
|
|
87
|
+
return new CliStructuredError("CONTRACT.VALIDATION_FAILED", "Contract validation failed", {
|
|
88
|
+
why: reason,
|
|
89
|
+
fix: "Re-run `prisma-next contract emit`, or fix the contract file and try again",
|
|
90
|
+
docsUrl: docsUrlFor("CONTRACT.VALIDATION_FAILED"),
|
|
91
|
+
...options?.where ? { where: options.where } : {}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* File not found.
|
|
96
|
+
*/
|
|
97
|
+
function errorFileNotFound(filePath, options) {
|
|
98
|
+
return new CliStructuredError("CLI.FILE_NOT_FOUND", "File not found", {
|
|
99
|
+
why: options?.why ?? `File not found: ${filePath}`,
|
|
100
|
+
fix: options?.fix ?? "Check that the file path is correct",
|
|
101
|
+
where: { path: filePath },
|
|
102
|
+
...options?.docsUrl ? { docsUrl: options.docsUrl } : {}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Database connection is required but not provided.
|
|
107
|
+
*/
|
|
108
|
+
function errorDatabaseConnectionRequired(options) {
|
|
109
|
+
const runHint = options?.retryCommand ? `Run \`${options.retryCommand}\`` : options?.commandName ? `Run \`prisma-next ${options.commandName} --db <url>\`` : "Provide `--db <url>`";
|
|
110
|
+
return new CliStructuredError("CONFIG.DB_CONNECTION_REQUIRED", "Database connection is required", {
|
|
111
|
+
why: options?.why ?? "Database connection is required for this command",
|
|
112
|
+
fix: `${runHint}, or set \`db: { connection: "postgres://…" }\` in prisma-next.config.ts`,
|
|
113
|
+
...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Query runner factory is required but not provided in config.
|
|
118
|
+
*/
|
|
119
|
+
function errorQueryRunnerFactoryRequired(options) {
|
|
120
|
+
return new CliStructuredError("CONFIG.QUERY_RUNNER_FACTORY_REQUIRED", "Query runner factory is required", {
|
|
121
|
+
why: options?.why ?? "Config.db.queryRunnerFactory is required for db verify",
|
|
122
|
+
fix: "Add db.queryRunnerFactory to prisma-next.config.ts",
|
|
123
|
+
docsUrl: docsUrlFor("CONFIG.QUERY_RUNNER_FACTORY_REQUIRED")
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Family verify.readMarker is required but not provided.
|
|
128
|
+
*/
|
|
129
|
+
function errorFamilyReadMarkerSqlRequired(options) {
|
|
130
|
+
return new CliStructuredError("CONFIG.FAMILY_READ_MARKER_REQUIRED", "Family readMarker() is required", {
|
|
131
|
+
why: options?.why ?? "Family verify.readMarker is required for db verify",
|
|
132
|
+
fix: "Ensure family.verify.readMarker() is exported by your family package",
|
|
133
|
+
docsUrl: docsUrlFor("CONFIG.FAMILY_READ_MARKER_REQUIRED")
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* JSON output format not supported.
|
|
138
|
+
*/
|
|
139
|
+
function errorJsonFormatNotSupported(options) {
|
|
140
|
+
return new CliStructuredError("CLI.JSON_FORMAT_UNSUPPORTED", "Unsupported JSON format", {
|
|
141
|
+
why: `The ${options.command} command does not support --json ${options.format}`,
|
|
142
|
+
fix: `Use --json ${options.supportedFormats.join(" or ")}, or omit --json for human output`,
|
|
143
|
+
meta: {
|
|
144
|
+
command: options.command,
|
|
145
|
+
format: options.format,
|
|
146
|
+
supportedFormats: options.supportedFormats
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Driver is required for DB-connected commands but not provided.
|
|
152
|
+
*/
|
|
153
|
+
function errorDriverRequired(options) {
|
|
154
|
+
return new CliStructuredError("CONFIG.DRIVER_REQUIRED", "Driver is required for DB-connected commands", {
|
|
155
|
+
why: options?.why ?? "Config.driver is required for DB-connected commands",
|
|
156
|
+
fix: "Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)",
|
|
157
|
+
docsUrl: docsUrlFor("CONFIG.DRIVER_REQUIRED")
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Contract requires extension packs that are not provided by config descriptors.
|
|
162
|
+
*/
|
|
163
|
+
function errorContractMissingExtensions(options) {
|
|
164
|
+
const missing = [...options.missingExtensions].sort();
|
|
165
|
+
return new CliStructuredError("CONFIG.MISSING_EXTENSION_PACKS", "Missing extension packs in config", {
|
|
166
|
+
why: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(", ")}, but CLI config does not provide matching descriptors.`,
|
|
167
|
+
fix: "Add the missing extension descriptors to `extensions` in prisma-next.config.ts",
|
|
168
|
+
docsUrl: docsUrlFor("CONFIG.MISSING_EXTENSION_PACKS"),
|
|
169
|
+
meta: {
|
|
170
|
+
missingExtensions: missing,
|
|
171
|
+
providedComponentIds: [...options.providedComponentIds].sort()
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Migration planning failed due to conflicts.
|
|
177
|
+
*/
|
|
178
|
+
function errorMigrationPlanningFailed(options) {
|
|
179
|
+
const conflictSummaries = options.conflicts.map((c) => c.summary);
|
|
180
|
+
const computedWhy = options.why ?? conflictSummaries.join("\n");
|
|
181
|
+
const conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === "string");
|
|
182
|
+
return new CliStructuredError("MIGRATION.PLANNING_FAILED", "Migration planning failed", {
|
|
183
|
+
why: computedWhy,
|
|
184
|
+
fix: conflictFixes.length > 0 ? conflictFixes.join("\n") : "Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty",
|
|
185
|
+
meta: { conflicts: options.conflicts },
|
|
186
|
+
docsUrl: docsUrlFor("MIGRATION.PLANNING_FAILED")
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Target does not support migrations (missing createPlanner/createRunner).
|
|
191
|
+
*/
|
|
192
|
+
function errorTargetMigrationNotSupported(options) {
|
|
193
|
+
return new CliStructuredError("MIGRATION.TARGET_UNSUPPORTED", "Target does not support migrations", {
|
|
194
|
+
why: options?.why ?? "The configured target does not provide migration planner/runner",
|
|
195
|
+
fix: "Select a target that provides migrations (it must export `target.migrations` for db init)",
|
|
196
|
+
docsUrl: docsUrlFor("MIGRATION.TARGET_UNSUPPORTED")
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* The migration-file CLI received `--config` without a path argument (either
|
|
201
|
+
* a bare trailing `--config`, or `--config` followed by another flag like
|
|
202
|
+
* `--config --dry-run`). Surfacing this as a structured error fails fast
|
|
203
|
+
* rather than silently consuming the next flag as the config path or
|
|
204
|
+
* falling back to default discovery against the wrong project.
|
|
205
|
+
*/
|
|
206
|
+
function errorMigrationCliInvalidConfigArg(options) {
|
|
207
|
+
return new CliStructuredError("CLI.CONFIG_ARG_MISSING_PATH", "--config flag requires a path argument", {
|
|
208
|
+
why: options?.nextToken !== void 0 ? `\`--config\` was followed by another flag (\`${options.nextToken}\`) instead of a path argument.` : "`--config` was passed without a following path argument.",
|
|
209
|
+
fix: "Pass a config path: `--config <path>` or `--config=<path>`.",
|
|
210
|
+
meta: options?.nextToken !== void 0 ? { nextToken: options.nextToken } : {}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* The migration-file CLI received a flag it does not recognise. Surfaced as a
|
|
215
|
+
* structured error so consumers can render their own "did you mean"
|
|
216
|
+
* suggestions from `meta.knownFlags` rather than parsing the message.
|
|
217
|
+
*
|
|
218
|
+
* Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:
|
|
219
|
+
* pass the offending token as `flag` and the option declarations as
|
|
220
|
+
* `knownFlags`.
|
|
221
|
+
*/
|
|
222
|
+
function errorMigrationCliUnknownFlag(options) {
|
|
223
|
+
const knownList = options.knownFlags.join(", ");
|
|
224
|
+
return new CliStructuredError("CLI.UNKNOWN_FLAG", "Unknown migration CLI flag", {
|
|
225
|
+
why: `Unknown flag \`${options.flag}\`.`,
|
|
226
|
+
fix: `Known flags: ${knownList}. Run with \`--help\` to see the full list.`,
|
|
227
|
+
meta: {
|
|
228
|
+
flag: options.flag,
|
|
229
|
+
knownFlags: options.knownFlags
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* The main CLI received an unsupported `--format` value.
|
|
235
|
+
*/
|
|
236
|
+
function errorInvalidOutputFormat(value) {
|
|
237
|
+
return new CliStructuredError("CLI.INVALID_OUTPUT_FORMAT", `Invalid --format value "${value}". Allowed values: pretty, json.`, { meta: {
|
|
238
|
+
value,
|
|
239
|
+
allowed: ["pretty", "json"]
|
|
240
|
+
} });
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The main CLI received mutually exclusive output format flags
|
|
244
|
+
* (`--format pretty` together with `--json`).
|
|
245
|
+
*/
|
|
246
|
+
function errorOutputFormatMutex() {
|
|
247
|
+
return new CliStructuredError("CLI.OUTPUT_FORMAT_CONFLICT", "Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.");
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Config validation error (missing required fields).
|
|
251
|
+
*/
|
|
252
|
+
function errorConfigValidation(field, options) {
|
|
253
|
+
return new CliStructuredError("CONFIG.VALIDATION_FAILED", "Config validation error", {
|
|
254
|
+
why: options?.why ?? `Config must have a "${field}" field`,
|
|
255
|
+
fix: "Check your prisma-next.config.ts and ensure all required fields are provided",
|
|
256
|
+
docsUrl: docsUrlFor("CONFIG.VALIDATION_FAILED")
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* An enum declares a codecId that no component in the contract's pack stack provides,
|
|
261
|
+
* so its member values cannot be encoded. Thrown by both authoring paths (TS `defineContract`
|
|
262
|
+
* and PSL interpretation) when the codec lookup built from the contract's packs has no
|
|
263
|
+
* descriptor for the codecId.
|
|
264
|
+
*/
|
|
265
|
+
function errorEnumCodecNotInPackStack(options) {
|
|
266
|
+
return new CliStructuredError("CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK", `Enum codec "${options.codecId}" is not part of the contract's pack stack`, {
|
|
267
|
+
why: `An enum uses codec "${options.codecId}", but no family, target, or extension pack in the contract provides it.`,
|
|
268
|
+
fix: "Use a codec provided by the contract's target/extension packs, or add the pack that supplies this codec.",
|
|
269
|
+
meta: { codecId: options.codecId }
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Generic unexpected error.
|
|
274
|
+
*/
|
|
275
|
+
function errorUnexpected(message, options) {
|
|
276
|
+
return new CliStructuredError("CLI.UNEXPECTED", "Unexpected error", {
|
|
277
|
+
why: options?.why ?? message,
|
|
278
|
+
fix: options?.fix ?? "Check the error message and try again"
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { errorOutputFormatMutex as _, errorContractMissingExtensions as a, errorUnexpected as b, errorDriverRequired as c, errorFileNotFound as d, errorInvalidOutputFormat as f, errorMigrationPlanningFailed as g, errorMigrationCliUnknownFlag as h, errorContractConfigMissing as i, errorEnumCodecNotInPackStack as l, errorMigrationCliInvalidConfigArg as m, errorConfigFileNotFound as n, errorContractValidationFailed as o, errorJsonFormatNotSupported as p, errorConfigValidation as r, errorDatabaseConnectionRequired as s, CliStructuredError as t, errorFamilyReadMarkerSqlRequired as u, errorQueryRunnerFactoryRequired as v, errorTargetMigrationNotSupported as y };
|
|
283
|
+
|
|
284
|
+
//# sourceMappingURL=control-Ftiau058-CCeJcAVQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-Ftiau058-CCeJcAVQ.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-Ftiau058.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { docsUrlFor } from \"@internal/utils/structured-error\";\n//#region src/control.ts\n/**\n* Structured CLI error that contains all information needed for error envelopes.\n* Call sites throw these errors with full context.\n*\n* A `CliStructuredError` is a `StructuredError` (see\n* `@internal/utils/structured-error`): `code` is a dotted\n* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's\n* category — there is no separate `domain` field. See\n* [ADR 239](../../../../../docs/architecture%20docs/adrs/ADR%20239%20-%20Errors%20are%20structural%20envelopes%20with%20dotted%20namespace%20codes.md)\n* for the namespace taxonomy.\n*/\nvar CliStructuredError = class extends Error {\n\tcode;\n\tseverity;\n\tconstructor(code, summary, options) {\n\t\tsuper(summary);\n\t\tthis.name = \"CliStructuredError\";\n\t\tthis.code = code;\n\t\tthis.severity = options?.severity ?? \"error\";\n\t\tconst fix = options?.fix === options?.why ? void 0 : options?.fix;\n\t\tconst where = options?.where ? {\n\t\t\t...ifDefined(\"path\", options.where.path),\n\t\t\t...ifDefined(\"line\", options.where.line)\n\t\t} : void 0;\n\t\tObject.assign(this, {\n\t\t\t...ifDefined(\"why\", options?.why),\n\t\t\t...ifDefined(\"fix\", fix),\n\t\t\t...ifDefined(\"where\", where),\n\t\t\t...ifDefined(\"meta\", options?.meta),\n\t\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t\t});\n\t}\n\t/**\n\t* Converts this error to a CLI error envelope for output formatting.\n\t*/\n\ttoEnvelope() {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tcode: this.code,\n\t\t\tseverity: this.severity,\n\t\t\tsummary: this.message,\n\t\t\t...ifDefined(\"why\", this.why),\n\t\t\t...ifDefined(\"fix\", this.fix),\n\t\t\t...ifDefined(\"where\", this.where),\n\t\t\t...ifDefined(\"meta\", this.meta),\n\t\t\t...ifDefined(\"docsUrl\", this.docsUrl)\n\t\t};\n\t}\n\t/**\n\t* Type guard to check if an error is a CliStructuredError.\n\t* Uses duck-typing to work across module boundaries where instanceof may fail.\n\t*/\n\tstatic is(error) {\n\t\tif (!(error instanceof Error)) return false;\n\t\tconst candidate = error;\n\t\treturn candidate.name === \"CliStructuredError\" && typeof candidate.code === \"string\" && typeof candidate.toEnvelope === \"function\";\n\t}\n};\n/**\n* Config file not found or missing.\n*/\nfunction errorConfigFileNotFound(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.FILE_NOT_FOUND\", \"Config file not found\", {\n\t\t...options?.why ? { why: options.why } : { why: \"Config file not found\" },\n\t\tfix: \"Run 'prisma-next init' to create a config file\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FILE_NOT_FOUND\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Contract configuration missing from config.\n*/\nfunction errorContractConfigMissing(options) {\n\treturn new CliStructuredError(\"CONFIG.CONTRACT_MISSING\", \"Contract configuration missing\", {\n\t\twhy: options?.why ?? \"The contract configuration is required for emit\",\n\t\tfix: \"Add contract configuration to your prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.CONTRACT_MISSING\")\n\t});\n}\n/**\n* Contract validation failed.\n*/\nfunction errorContractValidationFailed(reason, options) {\n\treturn new CliStructuredError(\"CONTRACT.VALIDATION_FAILED\", \"Contract validation failed\", {\n\t\twhy: reason,\n\t\tfix: \"Re-run `prisma-next contract emit`, or fix the contract file and try again\",\n\t\tdocsUrl: docsUrlFor(\"CONTRACT.VALIDATION_FAILED\"),\n\t\t...options?.where ? { where: options.where } : {}\n\t});\n}\n/**\n* File not found.\n*/\nfunction errorFileNotFound(filePath, options) {\n\treturn new CliStructuredError(\"CLI.FILE_NOT_FOUND\", \"File not found\", {\n\t\twhy: options?.why ?? `File not found: ${filePath}`,\n\t\tfix: options?.fix ?? \"Check that the file path is correct\",\n\t\twhere: { path: filePath },\n\t\t...options?.docsUrl ? { docsUrl: options.docsUrl } : {}\n\t});\n}\n/**\n* Database connection is required but not provided.\n*/\nfunction errorDatabaseConnectionRequired(options) {\n\tconst runHint = options?.retryCommand ? `Run \\`${options.retryCommand}\\`` : options?.commandName ? `Run \\`prisma-next ${options.commandName} --db <url>\\`` : \"Provide `--db <url>`\";\n\treturn new CliStructuredError(\"CONFIG.DB_CONNECTION_REQUIRED\", \"Database connection is required\", {\n\t\twhy: options?.why ?? \"Database connection is required for this command\",\n\t\tfix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma-next.config.ts`,\n\t\t...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}\n\t});\n}\n/**\n* Query runner factory is required but not provided in config.\n*/\nfunction errorQueryRunnerFactoryRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\", \"Query runner factory is required\", {\n\t\twhy: options?.why ?? \"Config.db.queryRunnerFactory is required for db verify\",\n\t\tfix: \"Add db.queryRunnerFactory to prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\")\n\t});\n}\n/**\n* Family verify.readMarker is required but not provided.\n*/\nfunction errorFamilyReadMarkerSqlRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\", \"Family readMarker() is required\", {\n\t\twhy: options?.why ?? \"Family verify.readMarker is required for db verify\",\n\t\tfix: \"Ensure family.verify.readMarker() is exported by your family package\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\")\n\t});\n}\n/**\n* JSON output format not supported.\n*/\nfunction errorJsonFormatNotSupported(options) {\n\treturn new CliStructuredError(\"CLI.JSON_FORMAT_UNSUPPORTED\", \"Unsupported JSON format\", {\n\t\twhy: `The ${options.command} command does not support --json ${options.format}`,\n\t\tfix: `Use --json ${options.supportedFormats.join(\" or \")}, or omit --json for human output`,\n\t\tmeta: {\n\t\t\tcommand: options.command,\n\t\t\tformat: options.format,\n\t\t\tsupportedFormats: options.supportedFormats\n\t\t}\n\t});\n}\n/**\n* Driver is required for DB-connected commands but not provided.\n*/\nfunction errorDriverRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.DRIVER_REQUIRED\", \"Driver is required for DB-connected commands\", {\n\t\twhy: options?.why ?? \"Config.driver is required for DB-connected commands\",\n\t\tfix: \"Add a control-plane driver to prisma-next.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.DRIVER_REQUIRED\")\n\t});\n}\n/**\n* Contract requires extension packs that are not provided by config descriptors.\n*/\nfunction errorContractMissingExtensions(options) {\n\tconst missing = [...options.missingExtensions].sort();\n\treturn new CliStructuredError(\"CONFIG.MISSING_EXTENSION_PACKS\", \"Missing extension packs in config\", {\n\t\twhy: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(\", \")}, but CLI config does not provide matching descriptors.`,\n\t\tfix: \"Add the missing extension descriptors to `extensions` in prisma-next.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.MISSING_EXTENSION_PACKS\"),\n\t\tmeta: {\n\t\t\tmissingExtensions: missing,\n\t\t\tprovidedComponentIds: [...options.providedComponentIds].sort()\n\t\t}\n\t});\n}\n/**\n* Migration planning failed due to conflicts.\n*/\nfunction errorMigrationPlanningFailed(options) {\n\tconst conflictSummaries = options.conflicts.map((c) => c.summary);\n\tconst computedWhy = options.why ?? conflictSummaries.join(\"\\n\");\n\tconst conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === \"string\");\n\treturn new CliStructuredError(\"MIGRATION.PLANNING_FAILED\", \"Migration planning failed\", {\n\t\twhy: computedWhy,\n\t\tfix: conflictFixes.length > 0 ? conflictFixes.join(\"\\n\") : \"Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty\",\n\t\tmeta: { conflicts: options.conflicts },\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.PLANNING_FAILED\")\n\t});\n}\n/**\n* Target does not support migrations (missing createPlanner/createRunner).\n*/\nfunction errorTargetMigrationNotSupported(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", \"Target does not support migrations\", {\n\t\twhy: options?.why ?? \"The configured target does not provide migration planner/runner\",\n\t\tfix: \"Select a target that provides migrations (it must export `target.migrations` for db init)\",\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.TARGET_UNSUPPORTED\")\n\t});\n}\n/**\n* The migration-file CLI received `--config` without a path argument (either\n* a bare trailing `--config`, or `--config` followed by another flag like\n* `--config --dry-run`). Surfacing this as a structured error fails fast\n* rather than silently consuming the next flag as the config path or\n* falling back to default discovery against the wrong project.\n*/\nfunction errorMigrationCliInvalidConfigArg(options) {\n\treturn new CliStructuredError(\"CLI.CONFIG_ARG_MISSING_PATH\", \"--config flag requires a path argument\", {\n\t\twhy: options?.nextToken !== void 0 ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.` : \"`--config` was passed without a following path argument.\",\n\t\tfix: \"Pass a config path: `--config <path>` or `--config=<path>`.\",\n\t\tmeta: options?.nextToken !== void 0 ? { nextToken: options.nextToken } : {}\n\t});\n}\n/**\n* The migration-file CLI received a flag it does not recognise. Surfaced as a\n* structured error so consumers can render their own \"did you mean\"\n* suggestions from `meta.knownFlags` rather than parsing the message.\n*\n* Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:\n* pass the offending token as `flag` and the option declarations as\n* `knownFlags`.\n*/\nfunction errorMigrationCliUnknownFlag(options) {\n\tconst knownList = options.knownFlags.join(\", \");\n\treturn new CliStructuredError(\"CLI.UNKNOWN_FLAG\", \"Unknown migration CLI flag\", {\n\t\twhy: `Unknown flag \\`${options.flag}\\`.`,\n\t\tfix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n\t\tmeta: {\n\t\t\tflag: options.flag,\n\t\t\tknownFlags: options.knownFlags\n\t\t}\n\t});\n}\n/**\n* The main CLI received an unsupported `--format` value.\n*/\nfunction errorInvalidOutputFormat(value) {\n\treturn new CliStructuredError(\"CLI.INVALID_OUTPUT_FORMAT\", `Invalid --format value \"${value}\". Allowed values: pretty, json.`, { meta: {\n\t\tvalue,\n\t\tallowed: [\"pretty\", \"json\"]\n\t} });\n}\n/**\n* The main CLI received mutually exclusive output format flags\n* (`--format pretty` together with `--json`).\n*/\nfunction errorOutputFormatMutex() {\n\treturn new CliStructuredError(\"CLI.OUTPUT_FORMAT_CONFLICT\", \"Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.\");\n}\n/**\n* Config validation error (missing required fields).\n*/\nfunction errorConfigValidation(field, options) {\n\treturn new CliStructuredError(\"CONFIG.VALIDATION_FAILED\", \"Config validation error\", {\n\t\twhy: options?.why ?? `Config must have a \"${field}\" field`,\n\t\tfix: \"Check your prisma-next.config.ts and ensure all required fields are provided\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VALIDATION_FAILED\")\n\t});\n}\n/**\n* An enum declares a codecId that no component in the contract's pack stack provides,\n* so its member values cannot be encoded. Thrown by both authoring paths (TS `defineContract`\n* and PSL interpretation) when the codec lookup built from the contract's packs has no\n* descriptor for the codecId.\n*/\nfunction errorEnumCodecNotInPackStack(options) {\n\treturn new CliStructuredError(\"CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK\", `Enum codec \"${options.codecId}\" is not part of the contract's pack stack`, {\n\t\twhy: `An enum uses codec \"${options.codecId}\", but no family, target, or extension pack in the contract provides it.`,\n\t\tfix: \"Use a codec provided by the contract's target/extension packs, or add the pack that supplies this codec.\",\n\t\tmeta: { codecId: options.codecId }\n\t});\n}\n/**\n* Generic unexpected error.\n*/\nfunction errorUnexpected(message, options) {\n\treturn new CliStructuredError(\"CLI.UNEXPECTED\", \"Unexpected error\", {\n\t\twhy: options?.why ?? message,\n\t\tfix: options?.fix ?? \"Check the error message and try again\"\n\t});\n}\n//#endregion\nexport { errorOutputFormatMutex as _, errorContractMissingExtensions as a, errorUnexpected as b, errorDriverRequired as c, errorFileNotFound as d, errorInvalidOutputFormat as f, errorMigrationPlanningFailed as g, errorMigrationCliUnknownFlag as h, errorContractConfigMissing as i, errorEnumCodecNotInPackStack as l, errorMigrationCliInvalidConfigArg as m, errorConfigFileNotFound as n, errorContractValidationFailed as o, errorJsonFormatNotSupported as p, errorConfigValidation as r, errorDatabaseConnectionRequired as s, CliStructuredError as t, errorFamilyReadMarkerSqlRequired as u, errorQueryRunnerFactoryRequired as v, errorTargetMigrationNotSupported as y };\n\n//# sourceMappingURL=control-Ftiau058.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,IAAI,qBAAqB,cAAc,MAAM;CAC5C;CACA;CACA,YAAY,MAAM,SAAS,SAAS;EACnC,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,WAAW,SAAS,YAAY;EACrC,MAAM,MAAM,SAAS,QAAQ,SAAS,MAAM,KAAK,IAAI,SAAS;EAC9D,MAAM,QAAQ,SAAS,QAAQ;GAC9B,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;GACvC,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;EACxC,IAAI,KAAK;EACT,OAAO,OAAO,MAAM;GACnB,GAAG,UAAU,OAAO,SAAS,GAAG;GA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