@prisma/orm-family-sql 8.0.0-rc.14-dev.5 → 8.0.0-rc.14-dev.7
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/dist/{ast-CJd4157-.mjs → ast-5hifzBHC.mjs} +84 -35
- package/dist/ast-5hifzBHC.mjs.map +1 -0
- package/dist/{ast-B53rACdv.d.mts → ast-BQOF33Tw.d.mts} +40 -16
- package/dist/ast-BQOF33Tw.d.mts.map +1 -0
- package/dist/{authoring-entity-types-CZ-vdwYS-D6R9QovE.d.mts → authoring-entity-types-CZ-vdwYS-BCsVtN8A.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-D6R9QovE.d.mts.map → authoring-entity-types-CZ-vdwYS-BCsVtN8A.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-DQZEX4Sb-D6uFhwhG.mjs → authoring-type-constructors-kt60uJ3j-BpulZfmt.mjs} +7 -4
- package/dist/authoring-type-constructors-kt60uJ3j-BpulZfmt.mjs.map +1 -0
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/{codec-descriptor-registry-Cj-tqpFL.mjs → codec-descriptor-registry-B1v3GEdK.mjs} +13 -22
- package/dist/codec-descriptor-registry-B1v3GEdK.mjs.map +1 -0
- package/dist/{config-types-CEXpi8FV.mjs → config-types-BrBS_jH9.mjs} +2 -2
- package/dist/{config-types-CEXpi8FV.mjs.map → config-types-BrBS_jH9.mjs.map} +1 -1
- package/dist/{config-types-Bd3ud-mX.d.mts → config-types-VJ5O9Ert.d.mts} +4 -4
- package/dist/{config-types-Bd3ud-mX.d.mts.map → config-types-VJ5O9Ert.d.mts.map} +1 -1
- package/dist/{contract-builder-vmb0E3SP.mjs → contract-builder-39dhpN_w.mjs} +3 -3
- package/dist/contract-builder-39dhpN_w.mjs.map +1 -0
- package/dist/{contract-builder-6ujqQuj-.d.mts → contract-builder-ezejmfrY.d.mts} +48 -22
- package/dist/contract-builder-ezejmfrY.d.mts.map +1 -0
- package/dist/contract-emitter.d.mts +0 -1
- package/dist/contract-emitter.d.mts.map +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +3 -3
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +6 -6
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- package/dist/contract-ts.mjs +4 -4
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +3 -3
- package/dist/contract-ts__contract-builder.mjs +3 -3
- package/dist/{contract-view-CPHxoAEX.d.mts → contract-view-BTFdP8wh.d.mts} +2 -2
- package/dist/{contract-view-CPHxoAEX.d.mts.map → contract-view-BTFdP8wh.d.mts.map} +1 -1
- package/dist/contract.d.mts +9 -9
- package/dist/contract.mjs +2 -2
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +4 -4
- package/dist/contract__types.mjs +2 -2
- package/dist/contract__validators.d.mts +1 -1
- package/dist/{control-2-eFP31F.mjs → control-BEikPMFg.mjs} +15 -14
- package/dist/control-BEikPMFg.mjs.map +1 -0
- package/dist/{control-adapter-C99J7aEF-B3_IhgH6.d.mts → control-adapter-C4_cgvzB-BwZx3_VD.d.mts} +11 -7
- package/dist/control-adapter-C4_cgvzB-BwZx3_VD.d.mts.map +1 -0
- package/dist/control-adapter-CDDbpxyt.d.mts +1 -0
- package/dist/{control-DmVQjyZd.d.mts → control-k5_z0qcA.d.mts} +22 -20
- package/dist/{control-DmVQjyZd.d.mts.map → control-k5_z0qcA.d.mts.map} +1 -1
- package/dist/{db-DLjWu9-f-COdzEg7b.d.mts → db-DLjWu9-f-BWg-lrGV.d.mts} +8 -8
- package/dist/{db-DLjWu9-f-COdzEg7b.d.mts.map → db-DLjWu9-f-BWg-lrGV.d.mts.map} +1 -1
- package/dist/{ddl-types-DD-i-Uj9-BRqLNUDm.d.mts → ddl-types-B23QEzDx-ridB7leA.d.mts} +5 -5
- package/dist/{ddl-types-DD-i-Uj9-BRqLNUDm.d.mts.map → ddl-types-B23QEzDx-ridB7leA.d.mts.map} +1 -1
- package/dist/{ddl-types-DOgOmDOh-Cs_MY05h.mjs → ddl-types-B700dqv--DOnQueWA.mjs} +3 -3
- package/dist/ddl-types-B700dqv--DOnQueWA.mjs.map +1 -0
- package/dist/{derived-checks-C6psACIj-BSBDa2_9.mjs → derived-checks-D8_YCVs5-CfBVLnya.mjs} +112 -109
- package/dist/derived-checks-D8_YCVs5-CfBVLnya.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-DNBs1ZDA.d.mts → derived-checks-DPdD01O0-zXZEuy5P.d.mts} +3 -3
- package/dist/{derived-checks-DPdD01O0-DNBs1ZDA.d.mts.map → derived-checks-DPdD01O0-zXZEuy5P.d.mts.map} +1 -1
- package/dist/{diff-DFOiwUHg.d.mts → diff-C_zQQTgw.d.mts} +6 -6
- package/dist/{diff-DFOiwUHg.d.mts.map → diff-C_zQQTgw.d.mts.map} +1 -1
- package/dist/{dist-ChyuAdtP.mjs → dist-DeiKZwAD.mjs} +4 -35
- package/dist/dist-DeiKZwAD.mjs.map +1 -0
- package/dist/{expression-Dl5WvxCA.d.mts → expression-B95FOcDX.d.mts} +7 -7
- package/dist/{expression-Dl5WvxCA.d.mts.map → expression-B95FOcDX.d.mts.map} +1 -1
- package/dist/{factories-P3qBQhO-.d.mts → factories-TIM9dI6S.d.mts} +2 -2
- package/dist/{factories-P3qBQhO-.d.mts.map → factories-TIM9dI6S.d.mts.map} +1 -1
- package/dist/family.d.mts +12 -12
- package/dist/family.mjs +4 -4
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +1 -1
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{index-Cef8iy1o.d.mts → index-DrUd8HwS.d.mts} +3 -3
- package/dist/{index-Cef8iy1o.d.mts.map → index-DrUd8HwS.d.mts.map} +1 -1
- package/dist/{index-BNL2_qQY.d.mts → index-DrWMh8L0.d.mts} +11 -11
- package/dist/{index-BNL2_qQY.d.mts.map → index-DrWMh8L0.d.mts.map} +1 -1
- package/dist/{index-type-validation-CZ5L2lli.d.mts → index-type-validation-BAQWs-c_.d.mts} +3 -3
- package/dist/{index-type-validation-CZ5L2lli.d.mts.map → index-type-validation-BAQWs-c_.d.mts.map} +1 -1
- package/dist/{interpreter-Bcc3MIC5-C4dZrobt.mjs → interpreter-j1ewAXPb-BwieIKeF.mjs} +299 -157
- package/dist/interpreter-j1ewAXPb-BwieIKeF.mjs.map +1 -0
- package/dist/{ir-BJ-dsbe-.d.mts → ir-DI4cwMsy.d.mts} +3 -3
- package/dist/{ir-BJ-dsbe-.d.mts.map → ir-DI4cwMsy.d.mts.map} +1 -1
- package/dist/middleware-C6T9FExV.d.mts +1 -0
- package/dist/{middleware-CuGBptK0-UwVChCr2.d.mts → middleware-CuGBptK0-CGDI6sQU.d.mts} +2 -2
- package/dist/{middleware-CuGBptK0-UwVChCr2.d.mts.map → middleware-CuGBptK0-CGDI6sQU.d.mts.map} +1 -1
- package/dist/{migration-Csmr6bd8.d.mts → migration-CRsGI-9f.d.mts} +4 -4
- package/dist/{migration-Csmr6bd8.d.mts.map → migration-CRsGI-9f.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +14 -14
- package/dist/orm-client.mjs +4 -3
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{pack-BUv79Jrr.d.mts → pack-DcSVDz7M.d.mts} +2 -2
- package/dist/{pack-BUv79Jrr.d.mts.map → pack-DcSVDz7M.d.mts.map} +1 -1
- package/dist/{plan-B7g2kDfQ-ZD3BfWYx.d.mts → plan-B7g2kDfQ-Do1iWC4q.d.mts} +4 -4
- package/dist/{plan-B7g2kDfQ-ZD3BfWYx.d.mts.map → plan-B7g2kDfQ-Do1iWC4q.d.mts.map} +1 -1
- package/dist/plan-BBBYfvlz.d.mts +2 -0
- package/dist/{prepared-statement-BHSj2pDk-D9a_Vwr-.d.mts → prepared-statement-BdsTSY7Y-ICyuLB7c.d.mts} +17 -17
- package/dist/{prepared-statement-BHSj2pDk-D9a_Vwr-.d.mts.map → prepared-statement-BdsTSY7Y-ICyuLB7c.d.mts.map} +1 -1
- package/dist/{psl-build-ph4eUJSB.mjs → psl-build-139T3MMA.mjs} +3 -3
- package/dist/{psl-build-ph4eUJSB.mjs.map → psl-build-139T3MMA.mjs.map} +1 -1
- package/dist/query-lane-context-B0R8L6W-.d.mts +1 -0
- package/dist/{query-lane-context-D6o9YrEV-BxW3-5e8.d.mts → query-lane-context-BSmWfohZ-QAWw_dXQ.d.mts} +6 -6
- package/dist/{query-lane-context-D6o9YrEV-BxW3-5e8.d.mts.map → query-lane-context-BSmWfohZ-QAWw_dXQ.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +3 -3
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__contract-free.d.mts +3 -3
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{resolve-storage-table-Nyrgk4h8.d.mts → resolve-storage-table-DhgzQjow.d.mts} +2 -2
- package/dist/{resolve-storage-table-Nyrgk4h8.d.mts.map → resolve-storage-table-DhgzQjow.d.mts.map} +1 -1
- package/dist/{runtime-DgOeosYa.d.mts → runtime-I-W0bhvd.d.mts} +2 -2
- package/dist/{runtime-DgOeosYa.d.mts.map → runtime-I-W0bhvd.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +6 -4
- package/dist/runtime.mjs.map +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DpG_gnur-3ciAcy28.d.mts → schema-differ-DpG_gnur-gLIPLPVI.d.mts} +3 -3
- package/dist/{schema-differ-DpG_gnur-3ciAcy28.d.mts.map → schema-differ-DpG_gnur-gLIPLPVI.d.mts.map} +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-DI0aJQ9d-Bgbmen10.mjs → schema-verify-DI0aJQ9d-DL-C6on7.mjs} +2 -2
- package/dist/{schema-verify-DI0aJQ9d-Bgbmen10.mjs.map → schema-verify-DI0aJQ9d-DL-C6on7.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-C90xg7_q-DERDzTD5.mjs → sql-contract-serializer-C90xg7_q-DBJSt3MT.mjs} +2 -2
- package/dist/{sql-contract-serializer-C90xg7_q-DERDzTD5.mjs.map → sql-contract-serializer-C90xg7_q-DBJSt3MT.mjs.map} +1 -1
- package/dist/{sql-execution-plan-Db0j752I-faODNLY9.d.mts → sql-execution-plan-Db0j752I-uGUWy8sD.d.mts} +2 -2
- package/dist/{sql-execution-plan-Db0j752I-faODNLY9.d.mts.map → sql-execution-plan-Db0j752I-uGUWy8sD.d.mts.map} +1 -1
- package/dist/{sql-storage-8LqxeLAY-DH4DdUXx.d.mts → sql-storage-BSxD7_vv-C4ugLH39.d.mts} +10 -3
- package/dist/sql-storage-BSxD7_vv-C4ugLH39.d.mts.map +1 -0
- package/dist/{types-BFPRCYGW-CZrZyp1E.d.mts → types-BKJWoQ40-BzViF_9K.d.mts} +7 -7
- package/dist/{types-BFPRCYGW-CZrZyp1E.d.mts.map → types-BKJWoQ40-BzViF_9K.d.mts.map} +1 -1
- package/dist/{types-D8Se4rnB.mjs → types-BmXzMDQL.mjs} +9 -2
- package/dist/types-BmXzMDQL.mjs.map +1 -0
- package/dist/{types-C36_3E6_.d.mts → types-BoMDdzjD.d.mts} +3 -3
- package/dist/{types-C36_3E6_.d.mts.map → types-BoMDdzjD.d.mts.map} +1 -1
- package/dist/types-BsUJ1jWE.d.mts +1 -0
- package/dist/{types-DFJNPLXY-DyYKIhXA.d.mts → types-C0VMsES6-BLOPdA8Y.d.mts} +10 -10
- package/dist/{types-DFJNPLXY-DyYKIhXA.d.mts.map → types-C0VMsES6-BLOPdA8Y.d.mts.map} +1 -1
- package/dist/{types-yyhkYQNT-Dmoq-giA.mjs → types-C5QzgUrH-B7IJM6qN.mjs} +8 -14
- package/dist/types-C5QzgUrH-B7IJM6qN.mjs.map +1 -0
- package/dist/{types-BDUG29Df-LE85dIXP.d.mts → types-DTUyRqZv-DLh98w8w.d.mts} +3 -3
- package/dist/{types-BDUG29Df-LE85dIXP.d.mts.map → types-DTUyRqZv-DLh98w8w.d.mts.map} +1 -1
- package/dist/{types-Yui2yFf6-Dnc7RNUD.d.mts → types-Yui2yFf6-DQkiEr9B.d.mts} +2 -2
- package/dist/{types-Yui2yFf6-Dnc7RNUD.d.mts.map → types-Yui2yFf6-DQkiEr9B.d.mts.map} +1 -1
- package/dist/{validators-CJSyNFS4.d.mts → validators-CZNulH-_.d.mts} +3 -3
- package/dist/{validators-CJSyNFS4.d.mts.map → validators-CZNulH-_.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/ast-B53rACdv.d.mts.map +0 -1
- package/dist/ast-CJd4157-.mjs.map +0 -1
- package/dist/authoring-type-constructors-DQZEX4Sb-D6uFhwhG.mjs.map +0 -1
- package/dist/codec-descriptor-registry-Cj-tqpFL.mjs.map +0 -1
- package/dist/contract-builder-6ujqQuj-.d.mts.map +0 -1
- package/dist/contract-builder-vmb0E3SP.mjs.map +0 -1
- package/dist/control-2-eFP31F.mjs.map +0 -1
- package/dist/control-adapter-C99J7aEF-B3_IhgH6.d.mts.map +0 -1
- package/dist/control-adapter-kl-cOML5.d.mts +0 -1
- package/dist/ddl-types-DOgOmDOh-Cs_MY05h.mjs.map +0 -1
- package/dist/derived-checks-C6psACIj-BSBDa2_9.mjs.map +0 -1
- package/dist/dist-ChyuAdtP.mjs.map +0 -1
- package/dist/interpreter-Bcc3MIC5-C4dZrobt.mjs.map +0 -1
- package/dist/middleware-RUh4qBBg.d.mts +0 -1
- package/dist/plan-CVje8E5I.d.mts +0 -2
- package/dist/query-lane-context-D54z0tof.d.mts +0 -1
- package/dist/sql-storage-8LqxeLAY-DH4DdUXx.d.mts.map +0 -1
- package/dist/types-D8Se4rnB.mjs.map +0 -1
- package/dist/types-Dul4Za_W.d.mts +0 -1
- package/dist/types-yyhkYQNT-Dmoq-giA.mjs.map +0 -1
package/dist/{codec-descriptor-registry-Cj-tqpFL.mjs → codec-descriptor-registry-B1v3GEdK.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
|
-
import { u as isStorageTypeInstance } from "./types-
|
|
2
|
+
import { d as resolvedTypeParams, u as isStorageTypeInstance } from "./types-BmXzMDQL.mjs";
|
|
3
3
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
5
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.mjs
|
|
@@ -23,33 +23,24 @@ function codecRefForStorageColumn(storage, namespaceId, tableName, columnName) {
|
|
|
23
23
|
if (resolved === void 0) return void 0;
|
|
24
24
|
const columnDef = resolved.table.columns[columnName];
|
|
25
25
|
if (!columnDef) return void 0;
|
|
26
|
+
const typeParams = resolvedTypeParams(columnDef, storage.types);
|
|
27
|
+
const params = typeParams === void 0 ? {} : { typeParams: blindCast(typeParams) };
|
|
26
28
|
if (columnDef.typeRef !== void 0) {
|
|
27
29
|
const instance = storage.types?.[columnDef.typeRef];
|
|
28
|
-
if (!instance) return void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
codecId: instance.codecId,
|
|
33
|
-
typeParams: instanceParams
|
|
34
|
-
} : { codecId: instance.codecId };
|
|
35
|
-
}
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (columnDef.typeParams !== void 0 && Object.keys(columnDef.typeParams).length > 0) {
|
|
39
|
-
const typeParams = blindCast(columnDef.typeParams);
|
|
40
|
-
return columnDef.many ? {
|
|
41
|
-
codecId: columnDef.codecId,
|
|
42
|
-
typeParams,
|
|
43
|
-
many: true
|
|
44
|
-
} : {
|
|
45
|
-
codecId: columnDef.codecId,
|
|
46
|
-
typeParams
|
|
30
|
+
if (!instance || !isStorageTypeInstance(instance)) return void 0;
|
|
31
|
+
return {
|
|
32
|
+
codecId: instance.codecId,
|
|
33
|
+
...params
|
|
47
34
|
};
|
|
48
35
|
}
|
|
49
36
|
return columnDef.many ? {
|
|
50
37
|
codecId: columnDef.codecId,
|
|
38
|
+
...params,
|
|
51
39
|
many: true
|
|
52
|
-
} : {
|
|
40
|
+
} : {
|
|
41
|
+
codecId: columnDef.codecId,
|
|
42
|
+
...params
|
|
43
|
+
};
|
|
53
44
|
}
|
|
54
45
|
/**
|
|
55
46
|
* Build a {@link CodecDescriptorRegistry} from a flat descriptor list.
|
|
@@ -93,4 +84,4 @@ function buildCodecDescriptorRegistry(allDescriptors, storage) {
|
|
|
93
84
|
//#endregion
|
|
94
85
|
export { codecRefForStorageColumn as n, buildCodecDescriptorRegistry as t };
|
|
95
86
|
|
|
96
|
-
//# sourceMappingURL=codec-descriptor-registry-
|
|
87
|
+
//# sourceMappingURL=codec-descriptor-registry-B1v3GEdK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-descriptor-registry-B1v3GEdK.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\nimport { resolveStorageTable } from \"@internal/sql-contract/resolve-storage-table\";\nimport { isStorageTypeInstance, resolvedTypeParams } from \"@internal/sql-contract/types\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/codec-ref-for-column.ts\n/**\n* Derive the canonical {@link CodecRef} for a `(table, column)` pair against a {@link SqlStorage}. This is the build-time path every column-bound `ParamRef` / `ProjectionItem` uses to stamp its `codec` slot before the AST is handed to the runtime — the runtime resolver then materialises a memoised {@link import('@internal/sql-relational-core/ast').Codec} for the same `CodecRef` via `forCodecRef`.\n*\n* Resolution rules over namespace `entries.table[table].columns[column]`:\n*\n* - `typeRef` column → `{codecId, typeParams}` from `storage.types[typeRef]` (multiple columns sharing the typeRef share one ref → one memoised codec).\n* - inline `typeParams` column → `{codecId, typeParams}` from the column itself.\n* - non-parameterized column → `{codecId}` with `typeParams` undefined.\n*\n* Returns `undefined` when the table or column is unknown, or when a `typeRef` column references a `storage.types` entry that does not exist.\n*\n* `namespaceId` leads the coordinate args and is always supplied: every\n* model/table sits in an explicit namespace, so the table is resolved strictly\n* within that namespace (see {@link resolveStorageTable}).\n*/\nfunction codecRefForStorageColumn(storage, namespaceId, tableName, columnName) {\n\tconst resolved = resolveStorageTable(storage, tableName, namespaceId);\n\tif (resolved === void 0) return void 0;\n\tconst columnDef = resolved.table.columns[columnName];\n\tif (!columnDef) return void 0;\n\tconst typeParams = resolvedTypeParams(columnDef, storage.types);\n\tconst params = typeParams === void 0 ? {} : { typeParams: blindCast(typeParams) };\n\tif (columnDef.typeRef !== void 0) {\n\t\tconst instance = storage.types?.[columnDef.typeRef];\n\t\tif (!instance || !isStorageTypeInstance(instance)) return void 0;\n\t\treturn {\n\t\t\tcodecId: instance.codecId,\n\t\t\t...params\n\t\t};\n\t}\n\treturn columnDef.many ? {\n\t\tcodecId: columnDef.codecId,\n\t\t...params,\n\t\tmany: true\n\t} : {\n\t\tcodecId: columnDef.codecId,\n\t\t...params\n\t};\n}\n//#endregion\n//#region src/codec-descriptor-registry.ts\n/**\n* Build a {@link CodecDescriptorRegistry} from a flat descriptor list.\n*\n* Used by:\n* - Each codec-shipping package's `core/registry.ts` to expose a package-scoped registry as the public consumer surface (replacing raw descriptor-array exports). See ADR 208.\n* - The runtime's `buildExecutionContext` to construct the contract-bound combined registry from every contributor's `codecs:` slot.\n*\n* The descriptor map is heterogeneous in `P` — each codec id has its own params shape. The public {@link CodecDescriptorRegistry} interface widens to `CodecDescriptor<unknown>` and consumers narrow per codec id at the call site (the descriptor's `paramsSchema` validates JSON-sourced params before the factory ever sees them, so the runtime narrow is safe). The cast at registration goes through `unknown` because\n* `CodecDescriptor<P>` is invariant in `P` (the `factory` and `renderOutputType` slots use `P` contravariantly).\n*/\nfunction buildCodecDescriptorRegistry(allDescriptors, storage) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst byTargetType = /* @__PURE__ */ new Map();\n\tfor (const descriptor of allDescriptors) {\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate codec descriptor id: '${descriptor.codecId}' — registered twice during registry construction. Each codecId must be contributed by exactly one component (target / adapter / extension pack).`, { meta: { codecId: descriptor.codecId } });\n\t\tconst widened = descriptor;\n\t\tbyId.set(descriptor.codecId, widened);\n\t\tfor (const targetType of descriptor.targetTypes) {\n\t\t\tconst list = byTargetType.get(targetType);\n\t\t\tif (list) list.push(widened);\n\t\t\telse byTargetType.set(targetType, [widened]);\n\t\t}\n\t}\n\treturn {\n\t\tdescriptorFor(codecId) {\n\t\t\treturn byId.get(codecId);\n\t\t},\n\t\tcodecRefForColumn(namespaceId, table, column) {\n\t\t\tif (!storage) return void 0;\n\t\t\treturn codecRefForStorageColumn(storage, namespaceId, table, column);\n\t\t},\n\t\t*values() {\n\t\t\tyield* byId.values();\n\t\t},\n\t\tbyTargetType(targetType) {\n\t\t\treturn byTargetType.get(targetType) ?? Object.freeze([]);\n\t\t}\n\t};\n}\n//#endregion\nexport { buildCodecDescriptorRegistry, codecRefForStorageColumn };\n\n//# sourceMappingURL=codec-descriptor-registry.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,yBAAyB,SAAS,aAAa,WAAW,YAAY;CAC9E,MAAM,WAAW,oBAAoB,SAAS,WAAW,WAAW;CACpE,IAAI,aAAa,KAAK,GAAG,OAAO,KAAK;CACrC,MAAM,YAAY,SAAS,MAAM,QAAQ;CACzC,IAAI,CAAC,WAAW,OAAO,KAAK;CAC5B,MAAM,aAAa,mBAAmB,WAAW,QAAQ,KAAK;CAC9D,MAAM,SAAS,eAAe,KAAK,IAAI,CAAC,IAAI,EAAE,YAAY,UAAU,UAAU,EAAE;CAChF,IAAI,UAAU,YAAY,KAAK,GAAG;EACjC,MAAM,WAAW,QAAQ,QAAQ,UAAU;EAC3C,IAAI,CAAC,YAAY,CAAC,sBAAsB,QAAQ,GAAG,OAAO,KAAK;EAC/D,OAAO;GACN,SAAS,SAAS;GAClB,GAAG;EACJ;CACD;CACA,OAAO,UAAU,OAAO;EACvB,SAAS,UAAU;EACnB,GAAG;EACH,MAAM;CACP,IAAI;EACH,SAAS,UAAU;EACnB,GAAG;CACJ;AACD;;;;;;;;;;;AAaA,SAAS,6BAA6B,gBAAgB,SAAS;CAC9D,MAAM,uBAAuB,IAAI,IAAI;CACrC,MAAM,+BAA+B,IAAI,IAAI;CAC7C,KAAK,MAAM,cAAc,gBAAgB;EACxC,IAAI,KAAK,IAAI,WAAW,OAAO,GAAG,MAAM,gBAAgB,2BAA2B,mCAAmC,WAAW,QAAQ,oJAAoJ,EAAE,MAAM,EAAE,SAAS,WAAW,QAAQ,EAAE,CAAC;EACtU,MAAM,UAAU;EAChB,KAAK,IAAI,WAAW,SAAS,OAAO;EACpC,KAAK,MAAM,cAAc,WAAW,aAAa;GAChD,MAAM,OAAO,aAAa,IAAI,UAAU;GACxC,IAAI,MAAM,KAAK,KAAK,OAAO;QACtB,aAAa,IAAI,YAAY,CAAC,OAAO,CAAC;EAC5C;CACD;CACA,OAAO;EACN,cAAc,SAAS;GACtB,OAAO,KAAK,IAAI,OAAO;EACxB;EACA,kBAAkB,aAAa,OAAO,QAAQ;GAC7C,IAAI,CAAC,SAAS,OAAO,KAAK;GAC1B,OAAO,yBAAyB,SAAS,aAAa,OAAO,MAAM;EACpE;EACA,CAAC,SAAS;GACT,OAAO,KAAK,OAAO;EACpB;EACA,aAAa,YAAY;GACxB,OAAO,aAAa,IAAI,UAAU,KAAK,OAAO,OAAO,CAAC,CAAC;EACxD;CACD;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
1
|
+
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-D8_YCVs5-CfBVLnya.mjs";
|
|
2
2
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { ok } from "@prisma/orm-framework/utils/result";
|
|
@@ -61,4 +61,4 @@ function typescriptContractFromPath(contractPath, output, options) {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { typescriptContract as n, typescriptContractFromPath as r, emptyContract as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=config-types-
|
|
64
|
+
//# sourceMappingURL=config-types-BrBS_jH9.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-BrBS_jH9.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { i as contractError, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from \"./derived-checks-D8_YCVs5.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { pathToFileURL } from \"node:url\";\nimport { ok } from \"@internal/utils/result\";\nimport { extname } from \"pathe\";\n//#region src/config-types.ts\n/**\n* Derives the emit output path from the TS contract input so artefacts land\n* colocated with the source (e.g. `prisma/contract.ts` →\n* `prisma/contract.json`). Mirrors the same default-derivation logic in\n* `@internal/sql-contract-psl/provider`.\n*/\nfunction defaultOutputFromContractPath(contractPath) {\n\tconst ext = extname(contractPath);\n\tif (ext.length === 0) return `${contractPath}.json`;\n\treturn `${contractPath.slice(0, -ext.length)}.json`;\n}\nfunction emptyContract(options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => {\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(buildSqlContractFromDefinition({\n\t\t\t\t\twarnings: void 0,\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tmodels: []\n\t\t\t\t}), options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\t...ifDefined(\"output\", options.output)\n\t};\n}\nfunction typescriptContract(contract, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace))\n\t\t},\n\t\t...ifDefined(\"output\", output)\n\t};\n}\nfunction typescriptContractFromPath(contractPath, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tinputs: [contractPath],\n\t\t\tload: async (context) => {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"typescriptContractFromPath: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tconst mod = await import(pathToFileURL(absolutePath).href);\n\t\t\t\tconst contract = mod.default ?? mod.contract;\n\t\t\t\tif (contract === void 0) throw contractError(\"CONTRACT.MODULE_EXPORT_MISSING\", `typescriptContractFromPath: module at \"${absolutePath}\" has no \"default\" or \"contract\" export.`, { meta: { path: absolutePath } });\n\t\t\t\treturn ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: output ?? defaultOutputFromContractPath(contractPath)\n\t};\n}\n//#endregion\nexport { emptyContract, typescriptContract, typescriptContractFromPath };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,8BAA8B,cAAc;CACpD,MAAM,MAAM,QAAQ,YAAY;CAChC,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,aAAa;CAC7C,OAAO,GAAG,aAAa,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE;AAC9C;AACA,SAAS,cAAc,SAAS;CAC/B,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY;IACjB,OAAO,GAAG,+BAA+B,+BAA+B;KACvE,UAAU,KAAK;KACf,QAAQ,QAAQ;KAChB,iBAAiB,QAAQ;KACzB,QAAQ,CAAC;IACV,CAAC,GAAG,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC3D;EACD;EACA,GAAG,UAAU,UAAU,QAAQ,MAAM;CACtC;AACD;AACA,SAAS,mBAAmB,UAAU,QAAQ,SAAS;CACtD,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;EACrJ;EACA,GAAG,UAAU,UAAU,MAAM;CAC9B;AACD;AACA,SAAS,2BAA2B,cAAc,QAAQ,SAAS;CAClE,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,QAAQ,CAAC,YAAY;GACrB,MAAM,OAAO,YAAY;IACxB,MAAM,CAAC,gBAAgB,QAAQ;IAC/B,IAAI,iBAAiB,KAAK,GAAG,MAAM,IAAI,cAAc,2HAA2H;IAChL,MAAM,MAAM,MAAM,OAAO,cAAc,YAAY,CAAC,CAAC;IACrD,MAAM,WAAW,IAAI,WAAW,IAAI;IACpC,IAAI,aAAa,KAAK,GAAG,MAAM,cAAc,kCAAkC,0CAA0C,aAAa,2CAA2C,EAAE,MAAM,EAAE,MAAM,aAAa,EAAE,CAAC;IACjN,OAAO,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC1I;EACD;EACA,QAAQ,UAAU,8BAA8B,YAAY;CAC7D;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-
|
|
1
|
+
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-BSxD7_vv-C4ugLH39.mjs";
|
|
2
|
+
import "./types-BoMDdzjD.mjs";
|
|
3
|
+
import { t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-zXZEuy5P.mjs";
|
|
4
4
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
6
6
|
import { ContractConfig, ContractConfig as ContractConfig$1 } from "@prisma/orm-framework/config/config-types";
|
|
@@ -25,4 +25,4 @@ declare function typescriptContract(contract: Contract, output?: string, options
|
|
|
25
25
|
declare function typescriptContractFromPath(contractPath: string, output?: string, options?: TypeScriptContractSpecifierOptions): ContractConfig;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { typescriptContractFromPath as i, emptyContract as n, typescriptContract as r, ContractConfig$1 as t };
|
|
28
|
-
//# sourceMappingURL=config-types-
|
|
28
|
+
//# sourceMappingURL=config-types-VJ5O9Ert.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-VJ5O9Ert.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.d.mts"],"mappings":";;;;;;;;;;;;;UAWU;WACC,sBAAsB;WACtB,iBAAiB;;iBAEX,cAAc;WACpB;WACA,QAAQ;WACR,kBAAkB,OAAO,sBAAsB;WAC/C,uBAAuB;IAC9B;iBACa,mBAAmB,UAAU,UAAU,iBAAiB,UAAU,qCAAqC;iBACvG,2BAA2B,sBAAsB,iBAAiB,UAAU,qCAAqC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as providesEntityHandleLowering } from "./entity-handle-lowering-hook-B3atrRKX.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { f as toStorageTypeInstance } from "./types-BmXzMDQL.mjs";
|
|
3
3
|
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-BlqrBU7I.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { n as buildSqlContractFromDefinition, o as toOneNullabilityContradictionMessage, r as contractError } from "./derived-checks-D8_YCVs5-CfBVLnya.mjs";
|
|
5
5
|
import { assertNoCrossRegistryCollisions, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments } from "@prisma/orm-framework/components/authoring";
|
|
6
6
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
7
7
|
import { isColumnDefault } from "@prisma/orm-framework/contract/types";
|
|
@@ -1686,4 +1686,4 @@ function sql(strings, ...values) {
|
|
|
1686
1686
|
//#endregion
|
|
1687
1687
|
export { check as a, extensionModel as c, model as d, now as f, buildContractDefinition as i, field as l, sql as m, bindEnumType as n, defineContract as o, rel as p, buildBoundContract as r, enumType as s, autoincrement as t, member as u };
|
|
1688
1688
|
|
|
1689
|
-
//# sourceMappingURL=contract-builder-
|
|
1689
|
+
//# sourceMappingURL=contract-builder-39dhpN_w.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-builder-39dhpN_w.mjs","names":["#handle"],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/contract-builder.mjs"],"sourcesContent":["import { a as isValueObjectMember, i as contractError, n as buildSqlContractFromDefinition, o as storedAsListColumn, r as toOneNullabilityContradictionMessage, t as applySqlSpecifierControlPolicy } from \"./derived-checks-D8_YCVs5.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { isColumnDefault } from \"@internal/contract/types\";\nimport { assertSafeAuthoringHelperKey, bindEnumType, composePackAuthoringNamespace, createEntityHelpersFromNamespace, createFieldHelpersFromNamespace, enumType, isEnumTypeHandle, member, resolveToOneRelationNullable } from \"@internal/contract-authoring\";\nimport { assertNoCrossRegistryCollisions, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { toStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { checkSqlDefaultBody, reservedSqlDefaultBody } from \"@internal/sql-contract/validators\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { providesEntityHandleLowering } from \"@internal/sql-contract/entity-handle-lowering-hook\";\nimport { canonicalizeTaggedLiteralBody, describeTaggedLiteralFailure, resolveTemplateTagEscapes } from \"@internal/framework-components/control\";\n//#region src/authoring-helper-runtime.ts\nfunction isNamedConstraintOptionsLike(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tif (Object.keys(value).some((key) => key !== \"name\")) return false;\n\tconst name = value.name;\n\treturn name === void 0 || typeof name === \"string\";\n}\nfunction createTypeHelpersFromNamespace(namespace, path = []) {\n\tconst helpers = {};\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tassertSafeAuthoringHelperKey(key, path);\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringTypeConstructorDescriptor(value)) {\n\t\t\tconst helperPath = currentPath.join(\".\");\n\t\t\thelpers[key] = (...args) => {\n\t\t\t\tvalidateAuthoringHelperArguments(helperPath, value.args, args);\n\t\t\t\tconst triple = instantiateAuthoringTypeConstructor(value, args);\n\t\t\t\treturn toStorageTypeInstance({\n\t\t\t\t\tcodecId: triple.codecId,\n\t\t\t\t\tnativeType: triple.nativeType,\n\t\t\t\t\ttypeParams: triple.typeParams ?? {}\n\t\t\t\t});\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\thelpers[key] = createTypeHelpersFromNamespace(value, currentPath);\n\t}\n\treturn helpers;\n}\nfunction createFieldPresetHelper(options) {\n\treturn (...rawArgs) => {\n\t\tconst acceptsNamedConstraintOptions = options.descriptor.output.id === true || options.descriptor.output.unique === true;\n\t\tconst declaredArguments = options.descriptor.args ?? [];\n\t\tif (acceptsNamedConstraintOptions && rawArgs.length > declaredArguments.length + 1) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${options.helperPath} expects at most ${declaredArguments.length + 1} argument(s), received ${rawArgs.length}`, { meta: {\n\t\t\thelperPath: options.helperPath,\n\t\t\texpected: declaredArguments.length + 1,\n\t\t\treceived: rawArgs.length\n\t\t} });\n\t\tlet args = rawArgs;\n\t\tlet namedConstraintOptions;\n\t\tif (acceptsNamedConstraintOptions && rawArgs.length === declaredArguments.length + 1) {\n\t\t\tconst maybeNamedConstraintOptions = rawArgs.at(-1);\n\t\t\tif (!isNamedConstraintOptionsLike(maybeNamedConstraintOptions)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${options.helperPath} accepts an optional trailing { name?: string } constraint options object`, { meta: { helperPath: options.helperPath } });\n\t\t\tnamedConstraintOptions = maybeNamedConstraintOptions;\n\t\t\targs = rawArgs.slice(0, -1);\n\t\t}\n\t\tvalidateAuthoringHelperArguments(options.helperPath, options.descriptor.args, args);\n\t\treturn options.build({\n\t\t\targs,\n\t\t\t...namedConstraintOptions ? { namedConstraintOptions } : {}\n\t\t});\n\t};\n}\n//#endregion\n//#region src/contract-dsl.ts\nfunction toColumnDefault(value) {\n\tif (isColumnDefault(value)) return value;\n\treturn {\n\t\tkind: \"literal\",\n\t\tvalue\n\t};\n}\nvar ScalarFieldBuilder = class ScalarFieldBuilder {\n\tstate;\n\tconstructor(state) {\n\t\tthis.state = state;\n\t}\n\t/**\n\t* Returns the physical column name when `.column(name)` was called, or\n\t* `undefined` when the field uses the default (logical field name) mapping.\n\t* Used by cross-space FK lowering to stamp the physical column name onto\n\t* `TargetFieldRef.columnName` so FK target columns are resolved correctly.\n\t*/\n\tget physicalColumnName() {\n\t\treturn this.state.columnName;\n\t}\n\toptional() {\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\tnullable: true\n\t\t}));\n\t}\n\tcolumn(name) {\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\tcolumnName: name\n\t\t}));\n\t}\n\tmany() {\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\tmany: true\n\t\t}));\n\t}\n\t/**\n\t* Declines enforcement of generated CHECK constraints on this column.\n\t* With no arguments, waives every kind the column's shape derives;\n\t* with arguments, waives exactly the named kinds. Declared types are\n\t* unchanged — runtime values may diverge from them once enforcement\n\t* is waived.\n\t*/\n\tnoCheck(...kinds) {\n\t\tif (this.state.noCheck !== void 0) throw contractError(\"CONTRACT.CHECK_OPTOUT_INVALID\", \"noCheck() was already called on this field; declare every waived kind in a single call.\", { meta: { reason: \"duplicate-noCheck-call\" } });\n\t\treturn blindCast(new ScalarFieldBuilder({\n\t\t\t...this.state,\n\t\t\tnoCheck: kinds\n\t\t}));\n\t}\n\tdefault(value) {\n\t\treturn new ScalarFieldBuilder({\n\t\t\t...this.state,\n\t\t\tdefault: toColumnDefault(value)\n\t\t});\n\t}\n\t/**\n\t* @deprecated Write `.default(now())` or `.default(autoincrement())`, or `` .default(sql`...`) `` for any other SQL. Removed in 8.0.0.\n\t*/\n\tdefaultSql(expression) {\n\t\treturn new ScalarFieldBuilder({\n\t\t\t...this.state,\n\t\t\tdefault: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression\n\t\t\t}\n\t\t});\n\t}\n\tid(options) {\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\tid: options?.name ? { name: options.name } : {}\n\t\t}));\n\t}\n\tunique(options) {\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\tunique: options?.name ? { name: options.name } : {}\n\t\t}));\n\t}\n\tsql(spec) {\n\t\tconst idSpec = \"id\" in spec ? spec.id : void 0;\n\t\tconst uniqueSpec = \"unique\" in spec ? spec.unique : void 0;\n\t\tif (idSpec && !this.state.id) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"field.sql({ id }) requires an existing inline .id(...) declaration.\");\n\t\tif (uniqueSpec && !this.state.unique) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"field.sql({ unique }) requires an existing inline .unique(...) declaration.\");\n\t\treturn new ScalarFieldBuilder(blindCast({\n\t\t\t...this.state,\n\t\t\t...spec.column ? { columnName: spec.column } : {},\n\t\t\t...idSpec ? { id: { name: idSpec.name } } : {},\n\t\t\t...uniqueSpec ? { unique: { name: uniqueSpec.name } } : {}\n\t\t}));\n\t}\n\tbuild() {\n\t\treturn this.state;\n\t}\n};\nvar EnumScalarFieldBuilder = class EnumScalarFieldBuilder extends ScalarFieldBuilder {\n\t#handle;\n\tconstructor(state, handle) {\n\t\tsuper(state);\n\t\tthis.#handle = handle;\n\t}\n\tdefault(value) {\n\t\treturn blindCast(new EnumScalarFieldBuilder({\n\t\t\t...this.build(),\n\t\t\tdefault: {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue\n\t\t\t}\n\t\t}, this.#handle));\n\t}\n\tdefaultSql(_expression) {\n\t\tthrow contractError(\"CONTRACT.DEFAULT_INVALID\", \"defaultSql is not available on an enum field; use .default(members.X) instead\", { meta: { reason: \"defaultSql-on-enum-field\" } });\n\t}\n};\nconst columnField = (descriptor) => new ScalarFieldBuilder({\n\tkind: \"scalar\",\n\tdescriptor,\n\tnullable: false\n});\nfunction generatedField(spec) {\n\treturn new ScalarFieldBuilder({\n\t\tkind: \"scalar\",\n\t\tdescriptor: {\n\t\t\t...spec.type,\n\t\t\t...spec.typeParams ? { typeParams: spec.typeParams } : {}\n\t\t},\n\t\tnullable: false,\n\t\texecutionDefaults: { onCreate: spec.generated }\n\t});\n}\nfunction untypedNamedTypeField(typeRef) {\n\tif (isEnumTypeHandle(typeRef)) return new EnumScalarFieldBuilder(blindCast({\n\t\tkind: \"scalar\",\n\t\ttypeRef,\n\t\tnullable: false\n\t}), typeRef);\n\treturn new ScalarFieldBuilder({\n\t\tkind: \"scalar\",\n\t\ttypeRef,\n\t\tnullable: false\n\t});\n}\nconst namedTypeField = blindCast(untypedNamedTypeField);\nfunction buildFieldPreset(descriptor, args, namedConstraintOptions) {\n\tconst preset = instantiateAuthoringFieldPreset(descriptor, args);\n\treturn new ScalarFieldBuilder({\n\t\tkind: \"scalar\",\n\t\tdescriptor: preset.descriptor,\n\t\tnullable: preset.nullable,\n\t\t...ifDefined(\"default\", preset.default),\n\t\t...ifDefined(\"executionDefaults\", preset.executionDefaults),\n\t\t...preset.id ? { id: namedConstraintOptions?.name ? { name: namedConstraintOptions.name } : {} } : {},\n\t\t...preset.unique ? { unique: namedConstraintOptions?.name ? { name: namedConstraintOptions.name } : {} } : {}\n\t});\n}\nvar RelationBuilder = class RelationBuilder {\n\tstate;\n\tconstructor(state) {\n\t\tthis.state = state;\n\t}\n\tsql(spec) {\n\t\tif (this.state.kind !== \"belongsTo\") throw contractError(\"CONTRACT.RELATION_INVALID\", \"relation.sql(...) is only supported for belongsTo relations.\", { meta: { relationKind: this.state.kind } });\n\t\treturn new RelationBuilder({\n\t\t\t...this.state,\n\t\t\tsql: spec\n\t\t});\n\t}\n\tbuild() {\n\t\treturn this.state;\n\t}\n};\nfunction normalizeFieldRefInput(input) {\n\treturn (Array.isArray(input) ? input : [input]).map((ref) => ref.fieldName);\n}\nfunction normalizeTargetFieldRefInput(input) {\n\tconst refs = Array.isArray(input) ? input : [input];\n\tconst [first] = refs;\n\tif (!first) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", \"Expected at least one target ref\", { meta: { reason: \"empty-target-refs\" } });\n\tif (refs.some((ref) => ref.modelName !== first.modelName)) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", \"All target refs in a foreign key must point to the same model\", { meta: {\n\t\tmismatch: \"modelName\",\n\t\tmodels: refs.map((ref) => ref.modelName)\n\t} });\n\tif (refs.some((ref) => ref.spaceId !== first.spaceId)) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", `All target refs in a compound foreign key must share the same spaceId (found mismatch: \"${first.spaceId ?? \"<local>\"}\" vs \"${refs.find((r) => r.spaceId !== first.spaceId)?.spaceId ?? \"<local>\"}\")`, { meta: {\n\t\tmismatch: \"spaceId\",\n\t\tfirst: first.spaceId,\n\t\tsecond: refs.find((r) => r.spaceId !== first.spaceId)?.spaceId\n\t} });\n\tif (refs.some((ref) => ref.namespaceId !== first.namespaceId)) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", \"All target refs in a compound foreign key must share the same namespaceId (found mismatch)\", { meta: { mismatch: \"namespaceId\" } });\n\tif (refs.some((ref) => ref.tableName !== first.tableName)) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", \"All target refs in a compound foreign key must share the same tableName (found mismatch)\", { meta: { mismatch: \"tableName\" } });\n\treturn {\n\t\tmodelName: first.modelName,\n\t\tfieldNames: refs.map((ref) => ref.columnName ?? ref.fieldName),\n\t\tsource: refs.some((ref) => ref.source === \"string\") ? \"string\" : \"token\",\n\t\tspaceId: first.spaceId,\n\t\tnamespaceId: first.namespaceId,\n\t\ttableName: first.tableName\n\t};\n}\nfunction createConstraintsDsl() {\n\tfunction ref(modelName, fieldName) {\n\t\treturn {\n\t\t\tkind: \"targetFieldRef\",\n\t\t\tsource: \"string\",\n\t\t\tmodelName,\n\t\t\tfieldName\n\t\t};\n\t}\n\tfunction id(fieldOrFields, options) {\n\t\treturn {\n\t\t\tkind: \"id\",\n\t\t\tfields: normalizeFieldRefInput(fieldOrFields),\n\t\t\t...options?.name ? { name: options.name } : {}\n\t\t};\n\t}\n\tfunction unique(fieldOrFields, options) {\n\t\treturn {\n\t\t\tkind: \"unique\",\n\t\t\tfields: normalizeFieldRefInput(fieldOrFields),\n\t\t\t...options?.name ? { name: options.name } : {}\n\t\t};\n\t}\n\tfunction index(fieldsOrOptions, options) {\n\t\tconst isExpressionForm = !Array.isArray(fieldsOrOptions) && typeof fieldsOrOptions === \"object\" && \"expression\" in fieldsOrOptions;\n\t\tconst opts = isExpressionForm ? fieldsOrOptions : options;\n\t\tconst carried = {\n\t\t\tkind: \"index\",\n\t\t\t...opts?.name !== void 0 ? { name: opts.name } : {},\n\t\t\t...opts?.map !== void 0 ? { map: opts.map } : {},\n\t\t\t...opts?.where !== void 0 ? { where: opts.where } : {},\n\t\t\t...opts?.unique !== void 0 ? { unique: opts.unique } : {},\n\t\t\t...opts?.type !== void 0 ? { type: opts.type } : {},\n\t\t\t...opts?.options !== void 0 ? { options: blindCast(opts.options) } : {}\n\t\t};\n\t\treturn isExpressionForm ? {\n\t\t\t...carried,\n\t\t\texpression: fieldsOrOptions.expression\n\t\t} : {\n\t\t\t...carried,\n\t\t\tfields: normalizeFieldRefInput(fieldsOrOptions)\n\t\t};\n\t}\n\tfunction foreignKey(fieldOrFields, target, options) {\n\t\tconst normalizedTarget = normalizeTargetFieldRefInput(target);\n\t\treturn {\n\t\t\tkind: \"fk\",\n\t\t\tfields: normalizeFieldRefInput(fieldOrFields),\n\t\t\ttargetModel: normalizedTarget.modelName,\n\t\t\ttargetFields: normalizedTarget.fieldNames,\n\t\t\ttargetSource: normalizedTarget.source,\n\t\t\t...normalizedTarget.spaceId !== void 0 ? { targetSpaceId: normalizedTarget.spaceId } : {},\n\t\t\t...normalizedTarget.namespaceId !== void 0 ? { targetNamespaceId: normalizedTarget.namespaceId } : {},\n\t\t\t...normalizedTarget.tableName !== void 0 ? { targetTableName: normalizedTarget.tableName } : {},\n\t\t\t...options?.name ? { name: options.name } : {},\n\t\t\t...options?.onDelete ? { onDelete: options.onDelete } : {},\n\t\t\t...options?.onUpdate ? { onUpdate: options.onUpdate } : {},\n\t\t\t...options?.constraint !== void 0 ? { constraint: options.constraint } : {},\n\t\t\t...options?.index !== void 0 ? { index: options.index } : {}\n\t\t};\n\t}\n\treturn {\n\t\tref,\n\t\tid,\n\t\tunique,\n\t\tindex,\n\t\tforeignKey\n\t};\n}\n/**\n* Declares an authored CHECK constraint for a model's `.sql({ checks: [...] })`.\n* Unlike `index()`, `check()` names no column tuple — the predicate is opaque\n* SQL — so it needs no field-ref context and is a plain top-level function\n* rather than a method on `constraints`.\n*/\nfunction check(input) {\n\treturn {\n\t\tkind: \"check\",\n\t\texpression: input.expression,\n\t\t...input.name !== void 0 ? { name: input.name } : {},\n\t\t...input.map !== void 0 ? { map: input.map } : {}\n\t};\n}\nfunction createFieldRefs(fields) {\n\tconst refs = {};\n\tfor (const fieldName of Object.keys(fields)) refs[fieldName] = {\n\t\tkind: \"columnRef\",\n\t\tfieldName\n\t};\n\treturn refs;\n}\nfunction createModelTokenRefs(modelName, fields, crossSpaceCoordinate) {\n\tconst refs = {};\n\tfor (const [fieldName, fieldBuilder] of Object.entries(fields)) {\n\t\tconst physicalColumn = crossSpaceCoordinate !== void 0 ? fieldBuilder.physicalColumnName : void 0;\n\t\trefs[fieldName] = {\n\t\t\tkind: \"targetFieldRef\",\n\t\t\tsource: \"token\",\n\t\t\tmodelName,\n\t\t\tfieldName,\n\t\t\t...crossSpaceCoordinate !== void 0 ? {\n\t\t\t\tspaceId: crossSpaceCoordinate.spaceId,\n\t\t\t\t...crossSpaceCoordinate.namespaceId !== void 0 ? { namespaceId: crossSpaceCoordinate.namespaceId } : {},\n\t\t\t\t...crossSpaceCoordinate.tableName !== void 0 ? { tableName: crossSpaceCoordinate.tableName } : {},\n\t\t\t\t...physicalColumn !== void 0 ? { columnName: physicalColumn } : {}\n\t\t\t} : {}\n\t\t};\n\t}\n\treturn refs;\n}\nfunction buildStageSpec(stageInput, context) {\n\tif (typeof stageInput === \"function\") return stageInput(context);\n\treturn stageInput;\n}\nfunction createAttributeConstraintsDsl() {\n\tconst constraints = createConstraintsDsl();\n\treturn {\n\t\tid: constraints.id,\n\t\tunique: constraints.unique\n\t};\n}\nfunction createSqlConstraintsDsl() {\n\tconst constraints = createConstraintsDsl();\n\treturn {\n\t\tindex: constraints.index,\n\t\tforeignKey: constraints.foreignKey,\n\t\tref: constraints.ref\n\t};\n}\nfunction createColumnRefs(fields) {\n\treturn createFieldRefs(fields);\n}\nfunction findDuplicateRelationName(existingRelations, nextRelations) {\n\treturn Object.keys(nextRelations).find((relationName) => Object.hasOwn(existingRelations, relationName));\n}\nvar ContractModelBuilder = class ContractModelBuilder {\n\tstageOne;\n\tattributesFactory;\n\tsqlFactory;\n\tspaceId;\n\ttableName;\n\trefs;\n\tconstructor(stageOne, attributesFactory, sqlFactory, spaceId, tableName) {\n\t\tthis.stageOne = stageOne;\n\t\tthis.attributesFactory = attributesFactory;\n\t\tthis.sqlFactory = sqlFactory;\n\t\tthis.spaceId = spaceId;\n\t\tthis.tableName = tableName;\n\t\tconst crossSpaceCoordinate = spaceId !== void 0 ? {\n\t\t\tspaceId,\n\t\t\t...stageOne.namespace !== void 0 ? { namespaceId: stageOne.namespace } : {},\n\t\t\t...tableName !== void 0 ? { tableName } : {}\n\t\t} : void 0;\n\t\tthis.refs = blindCast(stageOne.modelName ? createModelTokenRefs(stageOne.modelName, stageOne.fields, crossSpaceCoordinate) : void 0);\n\t}\n\tref(fieldName) {\n\t\tconst modelName = this.stageOne.modelName;\n\t\tif (!modelName) throw contractError(\"CONTRACT.MODEL_TOKEN_INVALID\", \"Model tokens require model(\\\"ModelName\\\", ...) before calling .ref(...)\");\n\t\treturn {\n\t\t\tkind: \"targetFieldRef\",\n\t\t\tsource: \"token\",\n\t\t\tmodelName,\n\t\t\tfieldName\n\t\t};\n\t}\n\trelations(relations) {\n\t\tconst duplicateRelationName = findDuplicateRelationName(this.stageOne.relations, relations);\n\t\tif (duplicateRelationName) throw contractError(\"CONTRACT.NAME_DUPLICATE\", `Model \"${this.stageOne.modelName ?? \"<anonymous>\"}\" already defines relation \"${duplicateRelationName}\".`, { meta: {\n\t\t\tkind: \"relation\",\n\t\t\tname: duplicateRelationName,\n\t\t\tmodelName: this.stageOne.modelName\n\t\t} });\n\t\treturn new ContractModelBuilder({\n\t\t\t...this.stageOne,\n\t\t\trelations: {\n\t\t\t\t...this.stageOne.relations,\n\t\t\t\t...relations\n\t\t\t}\n\t\t}, this.attributesFactory, this.sqlFactory, this.spaceId, this.tableName);\n\t}\n\tattributes(specOrFactory) {\n\t\treturn blindCast(new ContractModelBuilder(this.stageOne, specOrFactory, this.sqlFactory, this.spaceId, this.tableName));\n\t}\n\tsql(specOrFactory) {\n\t\tconst nextTableName = typeof specOrFactory !== \"function\" ? specOrFactory.table : this.tableName;\n\t\treturn blindCast(new ContractModelBuilder(this.stageOne, this.attributesFactory, specOrFactory, this.spaceId, nextTableName));\n\t}\n\tbuildAttributesSpec() {\n\t\tif (!this.attributesFactory) return;\n\t\treturn buildStageSpec(this.attributesFactory, {\n\t\t\tfields: createFieldRefs(this.stageOne.fields),\n\t\t\tconstraints: createAttributeConstraintsDsl()\n\t\t});\n\t}\n\tbuildSqlSpec() {\n\t\tif (!this.sqlFactory) return;\n\t\treturn buildStageSpec(this.sqlFactory, {\n\t\t\tcols: createColumnRefs(this.stageOne.fields),\n\t\t\tconstraints: createSqlConstraintsDsl()\n\t\t});\n\t}\n};\nfunction isLazyRelationModelName(value) {\n\treturn typeof value === \"object\" && value !== null && \"kind\" in value && value.kind === \"lazyRelationModelName\" && \"resolve\" in value && typeof value.resolve === \"function\";\n}\nfunction resolveNamedModelTokenName(token) {\n\tconst modelName = token.stageOne.modelName;\n\tif (!modelName) throw contractError(\"CONTRACT.MODEL_TOKEN_INVALID\", \"Relation targets require named model tokens. Use model(\\\"ModelName\\\", ...) before passing a token to rel.*(...).\");\n\treturn modelName;\n}\nfunction normalizeRelationModelSource(target) {\n\tif (typeof target === \"string\") return {\n\t\tkind: \"relationModelName\",\n\t\tsource: \"string\",\n\t\tmodelName: target\n\t};\n\tif (typeof target === \"function\") return {\n\t\tkind: \"lazyRelationModelName\",\n\t\tsource: \"lazyToken\",\n\t\tresolve: () => resolveNamedModelTokenName(target())\n\t};\n\treturn {\n\t\tkind: \"relationModelName\",\n\t\tsource: \"token\",\n\t\tmodelName: resolveNamedModelTokenName(target)\n\t};\n}\nfunction model(modelNameOrInput, maybeInput) {\n\tconst input = typeof modelNameOrInput === \"string\" ? maybeInput : modelNameOrInput;\n\tif (!input) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"model(\\\"ModelName\\\", ...) requires a model definition.\");\n\treturn new ContractModelBuilder({\n\t\t...typeof modelNameOrInput === \"string\" ? { modelName: modelNameOrInput } : {},\n\t\t...input.namespace !== void 0 ? { namespace: input.namespace } : {},\n\t\tfields: input.fields,\n\t\trelations: input.relations ?? {}\n\t});\n}\n/**\n* Factory for building a standalone branded extension model handle.\n*\n* Use this instead of `new ContractModelBuilder(…)` when constructing handles\n* for models that live in a foreign contract space (e.g. a Supabase extension\n* model referenced by a user's contract). The `spaceId` brands the returned\n* handle so `refs.<field>.spaceId` carries the foreign space identifier.\n*\n* @param name - The domain model name as declared in the foreign contract\n* (e.g. `'AuthUser'`, not a bare table alias like `'User'`).\n* @param input.namespace - The namespace within the foreign space (e.g. `'auth'`).\n* @param input.fields - Field definitions (use `field.column(…)`).\n* @param input.table - The physical table name in the foreign schema.\n* @param spaceId - The extension space identifier (e.g. `'supabase'`).\n*/\nfunction extensionModel(name, input, spaceId) {\n\treturn new ContractModelBuilder({\n\t\tmodelName: name,\n\t\tnamespace: input.namespace,\n\t\tfields: input.fields,\n\t\trelations: {}\n\t}, void 0, void 0, spaceId, input.table);\n}\nfunction isCrossSpaceHandle(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst rec = blindCast(value);\n\treturn typeof rec[\"spaceId\"] === \"string\" && typeof rec[\"stageOne\"] === \"object\" && rec[\"stageOne\"] !== null;\n}\nfunction belongsTo(toModel, options) {\n\tconst resolvedModel = typeof toModel === \"function\" ? toModel() : toModel;\n\tconst crossSpaceCoordinate = isCrossSpaceHandle(resolvedModel) ? {\n\t\tspaceId: resolvedModel.spaceId,\n\t\t...resolvedModel.tableName !== void 0 ? { tableName: resolvedModel.tableName } : {},\n\t\t...resolvedModel.stageOne.namespace !== void 0 ? { namespaceId: resolvedModel.stageOne.namespace } : {}\n\t} : void 0;\n\treturn new RelationBuilder({\n\t\tkind: \"belongsTo\",\n\t\ttoModel: normalizeRelationModelSource(toModel),\n\t\tfrom: options.from,\n\t\tto: options.to,\n\t\t...ifDefined(\"optional\", options.optional),\n\t\t...crossSpaceCoordinate !== void 0 ? crossSpaceCoordinate : {}\n\t});\n}\nfunction hasMany(toModel, options) {\n\treturn new RelationBuilder({\n\t\tkind: \"hasMany\",\n\t\ttoModel: normalizeRelationModelSource(toModel),\n\t\tby: options.by\n\t});\n}\nfunction hasOne(toModel, options) {\n\treturn new RelationBuilder({\n\t\tkind: \"hasOne\",\n\t\ttoModel: normalizeRelationModelSource(toModel),\n\t\tby: options.by\n\t});\n}\nfunction manyToMany(toModel, options) {\n\treturn new RelationBuilder({\n\t\tkind: \"manyToMany\",\n\t\ttoModel: normalizeRelationModelSource(toModel),\n\t\tthrough: normalizeRelationModelSource(options.through),\n\t\tfrom: options.from,\n\t\tto: options.to\n\t});\n}\nconst rel = {\n\tbelongsTo,\n\thasMany,\n\thasOne,\n\tmanyToMany\n};\nconst field = {\n\tcolumn: columnField,\n\tgenerated: generatedField,\n\tnamedType: namedTypeField\n};\nfunction isContractInput(value) {\n\tif (typeof value !== \"object\" || value === null || !(\"target\" in value) || !(\"family\" in value)) return false;\n\tconst target = value.target;\n\tconst family = value.family;\n\treturn typeof target === \"object\" && target !== null && \"kind\" in target && target.kind === \"target\" && typeof family === \"object\" && family !== null && \"kind\" in family && family.kind === \"family\";\n}\nfunction isRelationFieldArray(value) {\n\treturn Array.isArray(value);\n}\nfunction normalizeRelationFieldNames(value) {\n\tif (isRelationFieldArray(value)) return value;\n\treturn [value];\n}\nfunction resolveRelationModelName(value) {\n\tif (isLazyRelationModelName(value)) return value.resolve();\n\treturn value.modelName;\n}\nfunction applyNaming(name, strategy) {\n\tif (!strategy || strategy === \"identity\") return name;\n\tlet result = \"\";\n\tfor (let index = 0; index < name.length; index += 1) {\n\t\tconst char = name[index];\n\t\tif (!char) continue;\n\t\tconst lower = char.toLowerCase();\n\t\tif (char !== lower && index > 0) {\n\t\t\tconst prev = name[index - 1];\n\t\t\tconst next = name[index + 1];\n\t\t\tconst prevIsLower = !!prev && prev === prev.toLowerCase();\n\t\t\tconst nextIsLower = !!next && next === next.toLowerCase();\n\t\t\tif (prevIsLower || nextIsLower) result += \"_\";\n\t\t}\n\t\tresult += lower;\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/composed-authoring-helpers.ts\nfunction composeTypeNamespace(components) {\n\treturn composePackAuthoringNamespace(components, \"type\");\n}\nfunction composeFieldNamespace(components) {\n\treturn composePackAuthoringNamespace(components, \"field\");\n}\nfunction composeEntityNamespace(components) {\n\treturn composePackAuthoringNamespace(components, \"entityTypes\");\n}\n/**\n* Reserved top-level keys on the composed helpers surface — the\n* built-in `model` / `rel` helpers, the `field` / `type` namespace\n* objects. Pack-contributed entity types are flattened to the same\n* top-level shape (e.g. `helpers.enum({...})`), so a pack cannot\n* contribute an entity type whose name collides with one of these\n* reserved keys without silently overwriting at runtime. Detect the\n* collision at compose time and fail loudly with a guidance message.\n*/\nconst RESERVED_HELPER_KEYS = [\n\t\"field\",\n\t\"model\",\n\t\"rel\",\n\t\"type\"\n];\nfunction assertNoBuiltInEntityCollisions(namespace) {\n\tconst collisions = Object.keys(namespace).filter((name) => RESERVED_HELPER_KEYS.includes(name));\n\tif (collisions.length > 0) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Pack-contributed entity type(s) ${collisions.map((c) => `\"${c}\"`).join(\", \")} collide with the reserved built-in helper key(s) on the composed helpers surface. Reserved keys: ${RESERVED_HELPER_KEYS.map((k) => `\"${k}\"`).join(\", \")}.`, { meta: {\n\t\tcollisions,\n\t\treservedKeys: RESERVED_HELPER_KEYS\n\t} });\n}\nfunction createComposedFieldHelpers(fieldNamespace) {\n\tconst helperNamespace = createFieldHelpersFromNamespace(fieldNamespace, ({ helperPath, descriptor }) => createFieldPresetHelper({\n\t\thelperPath,\n\t\tdescriptor,\n\t\tbuild: ({ args, namedConstraintOptions }) => buildFieldPreset(descriptor, args, namedConstraintOptions)\n\t}));\n\tconst coreFieldHelpers = {\n\t\tcolumn: field.column,\n\t\tgenerated: field.generated,\n\t\tnamedType: field.namedType\n\t};\n\tconst coreHelperNames = new Set(Object.keys(coreFieldHelpers));\n\tfor (const helperName of Object.keys(helperNamespace)) if (coreHelperNames.has(helperName)) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring field helper \"${helperName}\". Core field helpers reserve that name.`, { meta: { helperName } });\n\treturn {\n\t\t...coreFieldHelpers,\n\t\t...helperNamespace\n\t};\n}\nfunction createComposedAuthoringHelpers(options) {\n\tconst extensionValues = Object.values(options.extensions ?? {});\n\tconst components = [\n\t\toptions.family,\n\t\toptions.target,\n\t\t...extensionValues\n\t];\n\tconst typeNamespace = composeTypeNamespace(components);\n\tconst fieldNamespace = composeFieldNamespace(components);\n\tconst entityNamespace = composeEntityNamespace(components);\n\tassertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityNamespace);\n\tassertNoBuiltInEntityCollisions(entityNamespace);\n\treturn blindCast({\n\t\t...createEntityHelpersFromNamespace(entityNamespace, { ctx: {\n\t\t\tfamily: options.family.familyId,\n\t\t\ttarget: options.target.targetId\n\t\t} }),\n\t\tfield: createComposedFieldHelpers(fieldNamespace),\n\t\tmodel,\n\t\trel,\n\t\ttype: createTypeHelpersFromNamespace(typeNamespace)\n\t});\n}\n//#endregion\n//#region src/contract-warnings.ts\nfunction hasNamedModelToken(models, modelName) {\n\treturn models[modelName]?.stageOne.modelName === modelName;\n}\nfunction formatFieldSelection(fieldNames) {\n\tif (fieldNames.length === 1) return `'${fieldNames[0]}'`;\n\treturn `[${fieldNames.map((fieldName) => `'${fieldName}'`).join(\", \")}]`;\n}\nfunction formatTokenFieldSelection(modelName, fieldNames) {\n\tif (fieldNames.length === 1) return `${modelName}.refs.${fieldNames[0]}`;\n\treturn `[${fieldNames.map((fieldName) => `${modelName}.refs.${fieldName}`).join(\", \")}]`;\n}\nfunction formatConstraintsRefCall(modelName, fieldNames) {\n\tif (fieldNames.length === 1) return `constraints.ref('${modelName}', '${fieldNames[0]}')`;\n\treturn `[${fieldNames.map((fieldName) => `constraints.ref('${modelName}', '${fieldName}')`).join(\", \")}]`;\n}\nfunction formatRelationModelDisplay(relationModel) {\n\tif (relationModel.kind === \"lazyRelationModelName\") return `() => ${relationModel.resolve()}`;\n\treturn relationModel.source === \"string\" ? `'${relationModel.modelName}'` : relationModel.modelName;\n}\nfunction formatRelationCall(relation, targetModelDisplay) {\n\tif (relation.kind === \"belongsTo\") return `rel.belongsTo(${targetModelDisplay}, { from: ${formatFieldSelection(normalizeRelationFieldNames(relation.from))}, to: ${formatFieldSelection(normalizeRelationFieldNames(relation.to))} })`;\n\tif (relation.kind === \"hasMany\" || relation.kind === \"hasOne\") {\n\t\tconst by = formatFieldSelection(normalizeRelationFieldNames(relation.by));\n\t\treturn `rel.${relation.kind}(${targetModelDisplay}, { by: ${by} })`;\n\t}\n\treturn `rel.manyToMany(${targetModelDisplay}, { through: ${formatRelationModelDisplay(relation.through)}, from: ${formatFieldSelection(normalizeRelationFieldNames(relation.from))}, to: ${formatFieldSelection(normalizeRelationFieldNames(relation.to))} })`;\n}\nfunction formatManyToManyCallWithThrough(relation, throughDisplay) {\n\treturn `rel.manyToMany(${formatRelationModelDisplay(relation.toModel)}, { through: ${throughDisplay}, from: ${formatFieldSelection(normalizeRelationFieldNames(relation.from))}, to: ${formatFieldSelection(normalizeRelationFieldNames(relation.to))} })`;\n}\nconst WARNING_BATCH_THRESHOLD = 5;\nfunction flushWarnings(warnings) {\n\tif (warnings.length === 0) return;\n\tif (warnings.length <= WARNING_BATCH_THRESHOLD) {\n\t\tfor (const message of warnings) process.emitWarning(message, { code: \"PN_CONTRACT_TYPED_FALLBACK_AVAILABLE\" });\n\t\treturn;\n\t}\n\tprocess.emitWarning(`${warnings.length} contract references use string fallbacks where typed alternatives are available. Use named model tokens and typed storage type refs for autocomplete and type safety.\n` + warnings.map((w) => ` - ${w}`).join(\"\\n\"), { code: \"PN_CONTRACT_TYPED_FALLBACK_AVAILABLE\" });\n}\nfunction formatFallbackWarning(location, current, suggested) {\n\treturn `Contract ${location} uses ${current}. Use ${suggested} when the named model token is available in the same contract to keep typed relation targets and model refs.`;\n}\nfunction emitTypedNamedTypeFallbackWarnings(models, storageTypes) {\n\tconst warnings = [];\n\tconst warnedFields = /* @__PURE__ */ new Set();\n\tfor (const [modelName, modelDefinition] of Object.entries(models)) for (const [fieldName, fieldBuilder] of Object.entries(modelDefinition.stageOne.fields)) {\n\t\tconst fieldState = fieldBuilder.build();\n\t\tif (typeof fieldState.typeRef !== \"string\" || !(fieldState.typeRef in storageTypes)) continue;\n\t\tconst warningKey = `${modelName}.${fieldName}`;\n\t\tif (warnedFields.has(warningKey)) continue;\n\t\twarnedFields.add(warningKey);\n\t\twarnings.push(`Contract field \"${modelName}.${fieldName}\" uses field.namedType('${fieldState.typeRef}'). Use field.namedType(types.${fieldState.typeRef}) when the storage type is declared in the same contract to keep autocomplete and typed local refs.`);\n\t}\n\tflushWarnings(warnings);\n}\nfunction emitTypedCrossModelFallbackWarnings(collection) {\n\tconst warnings = [];\n\tconst warnedKeys = /* @__PURE__ */ new Set();\n\tfor (const spec of collection.modelSpecs.values()) {\n\t\tfor (const [relationName, relationBuilder] of Object.entries(spec.relations)) {\n\t\t\tconst relation = relationBuilder.build();\n\t\t\tif (relation.toModel.kind === \"relationModelName\" && relation.toModel.source === \"string\" && hasNamedModelToken(collection.models, relation.toModel.modelName)) {\n\t\t\t\tconst warningKey = `${spec.modelName}.${relationName}.toModel`;\n\t\t\t\tif (!warnedKeys.has(warningKey)) {\n\t\t\t\t\twarnedKeys.add(warningKey);\n\t\t\t\t\tconst current = formatRelationCall(relation, `'${relation.toModel.modelName}'`);\n\t\t\t\t\tconst suggested = formatRelationCall(relation, relation.toModel.modelName);\n\t\t\t\t\twarnings.push(formatFallbackWarning(`relation \"${spec.modelName}.${relationName}\"`, current, suggested));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (relation.kind === \"manyToMany\" && relation.through.kind === \"relationModelName\" && relation.through.source === \"string\" && hasNamedModelToken(collection.models, relation.through.modelName)) {\n\t\t\t\tconst warningKey = `${spec.modelName}.${relationName}.through`;\n\t\t\t\tif (!warnedKeys.has(warningKey)) {\n\t\t\t\t\twarnedKeys.add(warningKey);\n\t\t\t\t\tconst current = formatManyToManyCallWithThrough(relation, `'${relation.through.modelName}'`);\n\t\t\t\t\tconst suggested = formatManyToManyCallWithThrough(relation, relation.through.modelName);\n\t\t\t\t\twarnings.push(formatFallbackWarning(`relation \"${spec.modelName}.${relationName}\"`, current, suggested));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (const [foreignKeyIndex, foreignKey] of (spec.sqlSpec?.foreignKeys ?? []).entries()) {\n\t\t\tif (foreignKey.targetSource !== \"string\" || !hasNamedModelToken(collection.models, foreignKey.targetModel)) continue;\n\t\t\tconst warningKey = `${spec.modelName}.sql.foreignKeys.${foreignKeyIndex}`;\n\t\t\tif (warnedKeys.has(warningKey)) continue;\n\t\t\twarnedKeys.add(warningKey);\n\t\t\tconst current = formatConstraintsRefCall(foreignKey.targetModel, foreignKey.targetFields);\n\t\t\tconst suggested = formatTokenFieldSelection(foreignKey.targetModel, foreignKey.targetFields);\n\t\t\twarnings.push(formatFallbackWarning(`model \"${spec.modelName}\"`, `${current} in .sql(...)`, suggested));\n\t\t}\n\t}\n\tflushWarnings(warnings);\n}\n//#endregion\n//#region src/contract-lowering.ts\nfunction buildStorageTypeReverseLookup(storageTypes) {\n\tconst lookup = /* @__PURE__ */ new Map();\n\tfor (const [key, instance] of Object.entries(storageTypes)) lookup.set(instance, key);\n\treturn lookup;\n}\nfunction resolveFieldDescriptor(modelName, fieldName, fieldState, storageTypes, storageTypeReverseLookup) {\n\tif (\"descriptor\" in fieldState && fieldState.descriptor) return fieldState.descriptor;\n\tif (\"typeRef\" in fieldState && fieldState.typeRef) {\n\t\tif (isEnumTypeHandle(fieldState.typeRef)) return {\n\t\t\tcodecId: fieldState.typeRef.codecId,\n\t\t\tnativeType: fieldState.typeRef.nativeType\n\t\t};\n\t\tconst typeRef = typeof fieldState.typeRef === \"string\" ? fieldState.typeRef : storageTypeReverseLookup.get(fieldState.typeRef);\n\t\tif (!typeRef) throw contractError(\"CONTRACT.TYPE_UNKNOWN\", `Field \"${modelName}.${fieldName}\" references a storage type instance that is not present in definition.types`, { meta: {\n\t\t\tmodelName,\n\t\t\tfieldName,\n\t\t\treason: \"instance-not-in-definition-types\"\n\t\t} });\n\t\tconst referencedType = storageTypes[typeRef];\n\t\tif (!referencedType) throw contractError(\"CONTRACT.TYPE_UNKNOWN\", `Field \"${modelName}.${fieldName}\" references unknown storage type \"${typeRef}\"`, { meta: {\n\t\t\tmodelName,\n\t\t\tfieldName,\n\t\t\ttypeRef\n\t\t} });\n\t\treturn {\n\t\t\tcodecId: referencedType.codecId,\n\t\t\tnativeType: referencedType.nativeType,\n\t\t\ttypeRef\n\t\t};\n\t}\n\tthrow contractError(\"CONTRACT.TYPE_UNKNOWN\", `Field \"${modelName}.${fieldName}\" does not resolve to a storage descriptor`, { meta: {\n\t\tmodelName,\n\t\tfieldName,\n\t\treason: \"unresolved-storage-descriptor\"\n\t} });\n}\nfunction mapFieldNamesToColumnNames(modelName, fieldNames, fieldToColumn) {\n\treturn fieldNames.map((fieldName) => {\n\t\tconst columnName = fieldToColumn[fieldName];\n\t\tif (!columnName) throw contractError(\"CONTRACT.FIELD_UNKNOWN\", `Unknown field \"${modelName}.${fieldName}\" in contract definition`, { meta: {\n\t\t\tmodelName,\n\t\t\tfieldName\n\t\t} });\n\t\treturn columnName;\n\t});\n}\nfunction assertRelationFieldArity(params) {\n\tif (params.leftFields.length === params.rightFields.length) return;\n\tthrow contractError(\"CONTRACT.RELATION_INVALID\", `Relation \"${params.modelName}.${params.relationName}\" maps ${params.leftFields.length} ${params.leftLabel} field(s) to ${params.rightFields.length} ${params.rightLabel} field(s).`, { meta: {\n\t\tmodelName: params.modelName,\n\t\trelationName: params.relationName,\n\t\treason: \"field-count-mismatch\"\n\t} });\n}\nfunction resolveInlineIdConstraint(spec) {\n\tconst inlineIdFields = [];\n\tlet idName;\n\tfor (const [fieldName, fieldBuilder] of Object.entries(spec.fieldBuilders)) {\n\t\tconst fieldState = fieldBuilder.build();\n\t\tif (!fieldState.id) continue;\n\t\tinlineIdFields.push(fieldName);\n\t\tif (fieldState.id.name) idName = fieldState.id.name;\n\t}\n\tif (inlineIdFields.length === 0) return;\n\tif (inlineIdFields.length > 1) throw contractError(\"CONTRACT.IDENTITY_INVALID\", `Model \"${spec.modelName}\" marks multiple fields with .id(). Use .attributes(...) for compound identities.`, { meta: {\n\t\tmodelName: spec.modelName,\n\t\treason: \"multiple-inline-ids\",\n\t\tfields: inlineIdFields\n\t} });\n\tconst [inlineIdField] = inlineIdFields;\n\tif (!inlineIdField) return;\n\treturn {\n\t\tkind: \"id\",\n\t\tfields: [inlineIdField],\n\t\t...idName ? { name: idName } : {}\n\t};\n}\nfunction collectInlineUniqueConstraints(spec) {\n\tconst constraints = [];\n\tfor (const [fieldName, fieldBuilder] of Object.entries(spec.fieldBuilders)) {\n\t\tconst fieldState = fieldBuilder.build();\n\t\tif (!fieldState.unique) continue;\n\t\tconstraints.push({\n\t\t\tkind: \"unique\",\n\t\t\tfields: [fieldName],\n\t\t\t...fieldState.unique.name ? { name: fieldState.unique.name } : {}\n\t\t});\n\t}\n\treturn constraints;\n}\nfunction resolveModelIdConstraint(spec) {\n\tconst inlineId = resolveInlineIdConstraint(spec);\n\tconst attributeId = spec.attributesSpec?.id;\n\tif (inlineId && attributeId) throw contractError(\"CONTRACT.IDENTITY_INVALID\", `Model \"${spec.modelName}\" defines identity both inline and in .attributes(...). Pick one identity style.`, { meta: {\n\t\tmodelName: spec.modelName,\n\t\treason: \"inline-and-attributes\"\n\t} });\n\tconst resolvedId = attributeId ?? inlineId;\n\tif (resolvedId && resolvedId.fields.length === 0) throw contractError(\"CONTRACT.IDENTITY_INVALID\", `Model \"${spec.modelName}\" defines an empty identity. Add at least one field.`, { meta: {\n\t\tmodelName: spec.modelName,\n\t\treason: \"empty-identity\"\n\t} });\n\treturn resolvedId;\n}\nfunction resolveModelUniqueConstraints(spec) {\n\tconst attributeUniques = spec.attributesSpec?.uniques ?? [];\n\tfor (const unique of attributeUniques) if (unique.fields.length === 0) throw contractError(\"CONTRACT.CONSTRAINT_INVALID\", `Model \"${spec.modelName}\" defines an empty unique constraint. Add at least one field.`, { meta: { modelName: spec.modelName } });\n\treturn [...collectInlineUniqueConstraints(spec), ...attributeUniques];\n}\nfunction resolveRelationForeignKeys(spec, allSpecs) {\n\tconst foreignKeys = [];\n\tfor (const [relationName, relationBuilder] of Object.entries(spec.relations)) {\n\t\tconst relation = relationBuilder.build();\n\t\tif (relation.kind !== \"belongsTo\" || !relation.sql?.fk) continue;\n\t\tconst targetModelName = resolveRelationModelName(relation.toModel);\n\t\tif (relation.spaceId !== void 0) {\n\t\t\tconst fields = normalizeRelationFieldNames(relation.from);\n\t\t\tconst targetFields = normalizeRelationFieldNames(relation.to);\n\t\t\tassertRelationFieldArity({\n\t\t\t\tmodelName: spec.modelName,\n\t\t\t\trelationName,\n\t\t\t\tleftLabel: \"source\",\n\t\t\t\tleftFields: fields,\n\t\t\t\trightLabel: \"target\",\n\t\t\t\trightFields: targetFields\n\t\t\t});\n\t\t\tforeignKeys.push({\n\t\t\t\tkind: \"fk\",\n\t\t\t\tfields,\n\t\t\t\ttargetModel: targetModelName,\n\t\t\t\ttargetFields,\n\t\t\t\ttargetSpaceId: relation.spaceId,\n\t\t\t\t...relation.namespaceId !== void 0 ? { targetNamespaceId: relation.namespaceId } : {},\n\t\t\t\t...relation.tableName !== void 0 ? { targetTableName: relation.tableName } : {},\n\t\t\t\t...relation.sql.fk.name ? { name: relation.sql.fk.name } : {},\n\t\t\t\t...relation.sql.fk.onDelete ? { onDelete: relation.sql.fk.onDelete } : {},\n\t\t\t\t...relation.sql.fk.onUpdate ? { onUpdate: relation.sql.fk.onUpdate } : {},\n\t\t\t\t...relation.sql.fk.constraint !== void 0 ? { constraint: relation.sql.fk.constraint } : {},\n\t\t\t\t...relation.sql.fk.index !== void 0 ? { index: relation.sql.fk.index } : {}\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (!allSpecs.has(targetModelName)) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Relation \"${spec.modelName}.${relationName}\" references unknown model \"${targetModelName}\"`, { meta: {\n\t\t\tsourceModel: spec.modelName,\n\t\t\trelationName,\n\t\t\ttargetModel: targetModelName\n\t\t} });\n\t\tconst fields = normalizeRelationFieldNames(relation.from);\n\t\tconst targetFields = normalizeRelationFieldNames(relation.to);\n\t\tassertRelationFieldArity({\n\t\t\tmodelName: spec.modelName,\n\t\t\trelationName,\n\t\t\tleftLabel: \"source\",\n\t\t\tleftFields: fields,\n\t\t\trightLabel: \"target\",\n\t\t\trightFields: targetFields\n\t\t});\n\t\tforeignKeys.push({\n\t\t\tkind: \"fk\",\n\t\t\tfields,\n\t\t\ttargetModel: targetModelName,\n\t\t\ttargetFields,\n\t\t\t...relation.sql.fk.name ? { name: relation.sql.fk.name } : {},\n\t\t\t...relation.sql.fk.onDelete ? { onDelete: relation.sql.fk.onDelete } : {},\n\t\t\t...relation.sql.fk.onUpdate ? { onUpdate: relation.sql.fk.onUpdate } : {},\n\t\t\t...relation.sql.fk.constraint !== void 0 ? { constraint: relation.sql.fk.constraint } : {},\n\t\t\t...relation.sql.fk.index !== void 0 ? { index: relation.sql.fk.index } : {}\n\t\t});\n\t}\n\treturn foreignKeys;\n}\nfunction resolveRelationAnchorFields(spec) {\n\tconst idFields = spec.idConstraint?.fields;\n\tif (idFields && idFields.length > 0) return idFields;\n\tif (\"id\" in spec.fieldToColumn) return [\"id\"];\n\tthrow contractError(\"CONTRACT.IDENTITY_INVALID\", `Model \"${spec.modelName}\" needs an explicit id or an \"id\" field to anchor non-owning relations`, { meta: {\n\t\tmodelName: spec.modelName,\n\t\treason: \"missing-anchor-id\"\n\t} });\n}\nfunction belongsToNullable(relationName, declaredNullable, spec, fieldNames) {\n\tconst { nullable, contradiction } = resolveToOneRelationNullable({\n\t\tdeclaredNullable,\n\t\tlocalFieldNullability: fieldNames.map((fieldName) => spec.fieldBuilders[fieldName]?.build().nullable === true),\n\t\townsReference: true\n\t});\n\tif (contradiction !== void 0) throw contractError(\"CONTRACT.RELATION_INVALID\", toOneNullabilityContradictionMessage(`Relation \"${spec.modelName}.${relationName}\"`, contradiction), { meta: {\n\t\tmodelName: spec.modelName,\n\t\trelationName,\n\t\treason: \"to-one-nullability-mismatch\"\n\t} });\n\treturn nullable;\n}\nfunction lowerBelongsToRelation(relationName, relation, currentSpec, allSpecs, extensions) {\n\tconst targetModelName = resolveRelationModelName(relation.toModel);\n\tconst fromFields = normalizeRelationFieldNames(relation.from);\n\tconst toFields = normalizeRelationFieldNames(relation.to);\n\tassertRelationFieldArity({\n\t\tmodelName: currentSpec.modelName,\n\t\trelationName,\n\t\tleftLabel: \"source\",\n\t\tleftFields: fromFields,\n\t\trightLabel: \"target\",\n\t\trightFields: toFields\n\t});\n\tif (relation.spaceId !== void 0) {\n\t\tassertKnownExtensionPack(extensions, relation.spaceId, `Relation \"${currentSpec.modelName}.${relationName}\"`);\n\t\tconst parentColumns = mapFieldNamesToColumnNames(currentSpec.modelName, fromFields, currentSpec.fieldToColumn);\n\t\treturn {\n\t\t\tfieldName: relationName,\n\t\t\ttoModel: targetModelName,\n\t\t\ttoTable: relation.tableName,\n\t\t\tcardinality: \"N:1\",\n\t\t\tnullable: belongsToNullable(relationName, relation.optional, currentSpec, fromFields),\n\t\t\tspaceId: relation.spaceId,\n\t\t\t...relation.namespaceId !== void 0 ? { namespaceId: relation.namespaceId } : {},\n\t\t\ton: {\n\t\t\t\tparentTable: currentSpec.tableName,\n\t\t\t\tparentColumns,\n\t\t\t\tchildTable: relation.tableName,\n\t\t\t\tchildColumns: toFields\n\t\t\t}\n\t\t};\n\t}\n\tconst targetSpec = allSpecs.get(targetModelName);\n\tif (!targetSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Relation \"${currentSpec.modelName}.${relationName}\" references unknown model \"${targetModelName}\"`, { meta: {\n\t\tsourceModel: currentSpec.modelName,\n\t\trelationName,\n\t\ttargetModel: targetModelName\n\t} });\n\treturn {\n\t\tfieldName: relationName,\n\t\ttoModel: targetModelName,\n\t\ttoTable: targetSpec.tableName,\n\t\tcardinality: \"N:1\",\n\t\tnullable: belongsToNullable(relationName, relation.optional, currentSpec, fromFields),\n\t\ton: {\n\t\t\tparentTable: currentSpec.tableName,\n\t\t\tparentColumns: mapFieldNamesToColumnNames(currentSpec.modelName, fromFields, currentSpec.fieldToColumn),\n\t\t\tchildTable: targetSpec.tableName,\n\t\t\tchildColumns: mapFieldNamesToColumnNames(targetSpec.modelName, toFields, targetSpec.fieldToColumn)\n\t\t}\n\t};\n}\nfunction lowerHasOwnershipRelation(relationName, relation, currentSpec, allSpecs) {\n\tconst targetModelName = resolveRelationModelName(relation.toModel);\n\tconst targetSpec = allSpecs.get(targetModelName);\n\tif (!targetSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Relation \"${currentSpec.modelName}.${relationName}\" references unknown model \"${targetModelName}\"`, { meta: {\n\t\tsourceModel: currentSpec.modelName,\n\t\trelationName,\n\t\ttargetModel: targetModelName\n\t} });\n\tconst parentFields = resolveRelationAnchorFields(currentSpec);\n\tconst childFields = normalizeRelationFieldNames(relation.by);\n\tassertRelationFieldArity({\n\t\tmodelName: currentSpec.modelName,\n\t\trelationName,\n\t\tleftLabel: \"anchor\",\n\t\tleftFields: parentFields,\n\t\trightLabel: \"child\",\n\t\trightFields: childFields\n\t});\n\treturn {\n\t\tfieldName: relationName,\n\t\ttoModel: targetModelName,\n\t\ttoTable: targetSpec.tableName,\n\t\t...relation.kind === \"hasMany\" ? { cardinality: \"1:N\" } : {\n\t\t\tcardinality: \"1:1\",\n\t\t\tnullable: true\n\t\t},\n\t\ton: {\n\t\t\tparentTable: currentSpec.tableName,\n\t\t\tparentColumns: mapFieldNamesToColumnNames(currentSpec.modelName, parentFields, currentSpec.fieldToColumn),\n\t\t\tchildTable: targetSpec.tableName,\n\t\t\tchildColumns: mapFieldNamesToColumnNames(targetSpec.modelName, childFields, targetSpec.fieldToColumn)\n\t\t}\n\t};\n}\nfunction lowerManyToManyRelation(relationName, relation, currentSpec, allSpecs) {\n\tconst targetModelName = resolveRelationModelName(relation.toModel);\n\tconst targetSpec = allSpecs.get(targetModelName);\n\tif (!targetSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Relation \"${currentSpec.modelName}.${relationName}\" references unknown model \"${targetModelName}\"`, { meta: {\n\t\tsourceModel: currentSpec.modelName,\n\t\trelationName,\n\t\ttargetModel: targetModelName\n\t} });\n\tconst throughModelName = resolveRelationModelName(relation.through);\n\tconst throughSpec = allSpecs.get(throughModelName);\n\tif (!throughSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Relation \"${currentSpec.modelName}.${relationName}\" references unknown through model \"${throughModelName}\"`, { meta: {\n\t\tsourceModel: currentSpec.modelName,\n\t\trelationName,\n\t\ttargetModel: throughModelName\n\t} });\n\tconst currentAnchorFields = resolveRelationAnchorFields(currentSpec);\n\tconst targetAnchorFields = resolveRelationAnchorFields(targetSpec);\n\tconst throughFromFields = normalizeRelationFieldNames(relation.from);\n\tconst throughToFields = normalizeRelationFieldNames(relation.to);\n\tif (currentAnchorFields.length !== throughFromFields.length || targetAnchorFields.length !== throughToFields.length) throw contractError(\"CONTRACT.RELATION_INVALID\", `Relation \"${currentSpec.modelName}.${relationName}\" has mismatched many-to-many field counts.`, { meta: {\n\t\tmodelName: currentSpec.modelName,\n\t\trelationName,\n\t\treason: \"many-to-many-field-count-mismatch\"\n\t} });\n\treturn {\n\t\tfieldName: relationName,\n\t\ttoModel: targetModelName,\n\t\ttoTable: targetSpec.tableName,\n\t\tcardinality: \"N:M\",\n\t\tthrough: {\n\t\t\ttable: throughSpec.tableName,\n\t\t\t...ifDefined(\"namespaceId\", throughSpec.namespace),\n\t\t\tparentColumns: mapFieldNamesToColumnNames(throughSpec.modelName, throughFromFields, throughSpec.fieldToColumn),\n\t\t\tchildColumns: mapFieldNamesToColumnNames(throughSpec.modelName, throughToFields, throughSpec.fieldToColumn)\n\t\t},\n\t\ton: {\n\t\t\tparentTable: currentSpec.tableName,\n\t\t\tparentColumns: mapFieldNamesToColumnNames(currentSpec.modelName, currentAnchorFields, currentSpec.fieldToColumn),\n\t\t\tchildTable: throughSpec.tableName,\n\t\t\tchildColumns: mapFieldNamesToColumnNames(throughSpec.modelName, throughFromFields, throughSpec.fieldToColumn)\n\t\t}\n\t};\n}\nfunction resolveRelationNode(relationName, relation, currentSpec, allSpecs, extensions) {\n\tif (relation.kind === \"belongsTo\") return lowerBelongsToRelation(relationName, relation, currentSpec, allSpecs, extensions);\n\tif (relation.kind === \"hasMany\" || relation.kind === \"hasOne\") return lowerHasOwnershipRelation(relationName, relation, currentSpec, allSpecs);\n\treturn lowerManyToManyRelation(relationName, relation, currentSpec, allSpecs);\n}\nfunction lowerLocalForeignKeyNode(spec, targetSpec, foreignKey) {\n\treturn {\n\t\tcolumns: mapFieldNamesToColumnNames(spec.modelName, foreignKey.fields, spec.fieldToColumn),\n\t\treferences: {\n\t\t\tmodel: targetSpec.modelName,\n\t\t\ttable: targetSpec.tableName,\n\t\t\tcolumns: mapFieldNamesToColumnNames(targetSpec.modelName, foreignKey.targetFields, targetSpec.fieldToColumn)\n\t\t},\n\t\t...foreignKey.name ? { name: foreignKey.name } : {},\n\t\t...foreignKey.onDelete ? { onDelete: foreignKey.onDelete } : {},\n\t\t...foreignKey.onUpdate ? { onUpdate: foreignKey.onUpdate } : {},\n\t\t...foreignKey.constraint !== void 0 ? { constraint: foreignKey.constraint } : {},\n\t\t...foreignKey.index !== void 0 ? { index: foreignKey.index } : {}\n\t};\n}\nfunction lowerCrossSpaceForeignKeyNode(spec, foreignKey) {\n\tif (foreignKey.targetTableName === void 0) throw contractError(\"CONTRACT.FOREIGN_KEY_INVALID\", `Foreign key on \"${spec.modelName}\" references model \"${foreignKey.targetModel}\" in contract space \"${foreignKey.targetSpaceId}\" but the target table name is unknown: the handle's .sql() stage is a factory function, so its table cannot be read statically. Declare the target model's .sql() stage with a static object carrying \\`table\\`.`, { meta: {\n\t\tsourceModel: spec.modelName,\n\t\ttargetModel: foreignKey.targetModel,\n\t\tspaceId: foreignKey.targetSpaceId\n\t} });\n\treturn {\n\t\tcolumns: mapFieldNamesToColumnNames(spec.modelName, foreignKey.fields, spec.fieldToColumn),\n\t\treferences: {\n\t\t\tmodel: foreignKey.targetModel,\n\t\t\ttable: foreignKey.targetTableName,\n\t\t\tcolumns: foreignKey.targetFields,\n\t\t\t...foreignKey.targetNamespaceId !== void 0 ? { namespaceId: foreignKey.targetNamespaceId } : {},\n\t\t\tspaceId: foreignKey.targetSpaceId\n\t\t},\n\t\t...foreignKey.name ? { name: foreignKey.name } : {},\n\t\t...foreignKey.onDelete ? { onDelete: foreignKey.onDelete } : {},\n\t\t...foreignKey.onUpdate ? { onUpdate: foreignKey.onUpdate } : {},\n\t\t...foreignKey.constraint !== void 0 ? { constraint: foreignKey.constraint } : {},\n\t\t...foreignKey.index !== void 0 ? { index: foreignKey.index } : {}\n\t};\n}\nfunction assertKnownExtensionPack(extensions, spaceId, context) {\n\tif (extensions !== void 0 && Object.hasOwn(extensions, spaceId)) return;\n\tthrow contractError(\"CONTRACT.PACK_MISSING\", `${context} references contract space \"${spaceId}\" but \"${spaceId}\" is not declared in extensions. Add the pack to extensions.`, { meta: {\n\t\tspaceId,\n\t\tcontext\n\t} });\n}\nfunction resolveForeignKeyNodes(spec, allSpecs, extensions) {\n\tconst relationForeignKeys = resolveRelationForeignKeys(spec, allSpecs).map((foreignKey) => {\n\t\tif (foreignKey.targetSpaceId !== void 0) {\n\t\t\tassertKnownExtensionPack(extensions, foreignKey.targetSpaceId, `Relation-derived foreign key on \"${spec.modelName}\"`);\n\t\t\treturn lowerCrossSpaceForeignKeyNode(spec, {\n\t\t\t\t...foreignKey,\n\t\t\t\ttargetSpaceId: foreignKey.targetSpaceId\n\t\t\t});\n\t\t}\n\t\tconst targetSpec = allSpecs.get(foreignKey.targetModel);\n\t\tif (!targetSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Foreign key on \"${spec.modelName}\" references unknown model \"${foreignKey.targetModel}\"`, { meta: {\n\t\t\tsourceModel: spec.modelName,\n\t\t\ttargetModel: foreignKey.targetModel\n\t\t} });\n\t\treturn lowerLocalForeignKeyNode(spec, targetSpec, foreignKey);\n\t});\n\tconst sqlForeignKeys = (spec.sqlSpec?.foreignKeys ?? []).map((foreignKey) => {\n\t\tif (foreignKey.targetSpaceId !== void 0) {\n\t\t\tassertKnownExtensionPack(extensions, foreignKey.targetSpaceId, `Foreign key on \"${spec.modelName}\"`);\n\t\t\treturn lowerCrossSpaceForeignKeyNode(spec, {\n\t\t\t\t...foreignKey,\n\t\t\t\ttargetSpaceId: foreignKey.targetSpaceId\n\t\t\t});\n\t\t}\n\t\tconst targetSpec = allSpecs.get(foreignKey.targetModel);\n\t\tif (!targetSpec) throw contractError(\"CONTRACT.MODEL_UNKNOWN\", `Foreign key on \"${spec.modelName}\" references unknown model \"${foreignKey.targetModel}\"`, { meta: {\n\t\t\tsourceModel: spec.modelName,\n\t\t\ttargetModel: foreignKey.targetModel\n\t\t} });\n\t\treturn lowerLocalForeignKeyNode(spec, targetSpec, foreignKey);\n\t});\n\treturn [...relationForeignKeys, ...sqlForeignKeys];\n}\n/**\n* Resolves a deferred index expression's field refs the way the field-tuple form\n* resolves its columns, and pairs each with the codec the column stores through\n* so a renderer can refuse a column it cannot express.\n*/\nfunction resolveDeferredColumns(spec, expression, fieldCodecIds) {\n\tconst fieldNames = expression.fields.map((ref) => ref.fieldName);\n\tconst columnNames = mapFieldNamesToColumnNames(spec.modelName, fieldNames, spec.fieldToColumn);\n\treturn fieldNames.map((fieldName, position) => {\n\t\tconst name = columnNames[position];\n\t\tconst codecId = fieldCodecIds[fieldName];\n\t\tif (name === void 0 || codecId === void 0) throw new InternalError(`Deferred index expression on \"${spec.modelName}\" resolved no column for field \"${fieldName}\"`);\n\t\treturn {\n\t\t\tname,\n\t\t\tcodecId\n\t\t};\n\t});\n}\nfunction resolveModelNode(spec, allSpecs, storageTypes, storageTypeReverseLookup, extensions) {\n\tconst fields = [];\n\t/** Filled by the field loop below, read by a deferred index expression. */\n\tconst fieldCodecIds = {};\n\tfor (const [fieldName, fieldBuilder] of Object.entries(spec.fieldBuilders)) {\n\t\tconst fieldState = fieldBuilder.build();\n\t\tconst descriptor = resolveFieldDescriptor(spec.modelName, fieldName, fieldState, storageTypes, storageTypeReverseLookup);\n\t\tconst columnName = spec.fieldToColumn[fieldName];\n\t\tif (!columnName) throw new InternalError(`Column name resolution failed for \"${spec.modelName}.${fieldName}\"`);\n\t\tfieldCodecIds[fieldName] = descriptor.codecId;\n\t\tconst enumHandle = \"typeRef\" in fieldState && isEnumTypeHandle(fieldState.typeRef) ? fieldState.typeRef : void 0;\n\t\tfields.push({\n\t\t\tfieldName,\n\t\t\tcolumnName,\n\t\t\tdescriptor,\n\t\t\tnullable: fieldState.nullable,\n\t\t\t...fieldState.many === true ? { many: true } : {},\n\t\t\t...fieldState.noCheck !== void 0 ? { noCheck: fieldState.noCheck } : {},\n\t\t\t...fieldState.default ? { default: fieldState.default } : {},\n\t\t\t...fieldState.executionDefaults ? { executionDefaults: fieldState.executionDefaults } : {},\n\t\t\t...enumHandle !== void 0 ? { enumTypeHandle: enumHandle } : {}\n\t\t});\n\t}\n\tconst { idConstraint } = spec;\n\tconst uniques = resolveModelUniqueConstraints(spec).map((unique) => ({\n\t\tcolumns: mapFieldNamesToColumnNames(spec.modelName, unique.fields, spec.fieldToColumn),\n\t\t...unique.name ? { name: unique.name } : {}\n\t}));\n\tconst indexes = (spec.sqlSpec?.indexes ?? []).map((index) => {\n\t\tconst method = blindCast({\n\t\t\ttype: index.type,\n\t\t\toptions: index.options\n\t\t});\n\t\tconst carried = {\n\t\t\twhere: index.where,\n\t\t\tunique: index.unique,\n\t\t\tname: index.name,\n\t\t\tmap: index.map,\n\t\t\t...method\n\t\t};\n\t\treturn index.expression !== void 0 ? {\n\t\t\t...carried,\n\t\t\texpression: typeof index.expression === \"string\" ? index.expression : index.expression.render(resolveDeferredColumns(spec, index.expression, fieldCodecIds))\n\t\t} : {\n\t\t\t...carried,\n\t\t\tcolumns: mapFieldNamesToColumnNames(spec.modelName, index.fields ?? [], spec.fieldToColumn)\n\t\t};\n\t});\n\tconst checks = (spec.sqlSpec?.checks ?? []).map((authoredCheck) => ({\n\t\texpression: authoredCheck.expression,\n\t\tname: authoredCheck.name,\n\t\tmap: authoredCheck.map\n\t}));\n\tconst foreignKeys = resolveForeignKeyNodes(spec, allSpecs, extensions);\n\tconst relations = Object.entries(spec.relations).map(([relationName, relationBuilder]) => resolveRelationNode(relationName, relationBuilder.build(), spec, allSpecs, extensions));\n\treturn {\n\t\tmodelName: spec.modelName,\n\t\ttableName: spec.tableName,\n\t\t...spec.namespace !== void 0 ? { namespaceId: spec.namespace } : {},\n\t\tfields,\n\t\t...idConstraint ? { id: {\n\t\t\tcolumns: mapFieldNamesToColumnNames(spec.modelName, idConstraint.fields, spec.fieldToColumn),\n\t\t\t...idConstraint.name ? { name: idConstraint.name } : {}\n\t\t} } : {},\n\t\t...uniques.length > 0 ? { uniques } : {},\n\t\t...indexes.length > 0 ? { indexes } : {},\n\t\t...checks.length > 0 ? { checks } : {},\n\t\t...foreignKeys.length > 0 ? { foreignKeys } : {},\n\t\t...relations.length > 0 ? { relations } : {},\n\t\t...ifDefined(\"control\", spec.sqlSpec?.control)\n\t};\n}\nfunction collectRuntimeModelSpecs(definition) {\n\tconst storageTypes = { ...definition.types ?? {} };\n\tconst models = { ...definition.models ?? {} };\n\temitTypedNamedTypeFallbackWarnings(models, storageTypes);\n\tconst modelSpecs = /* @__PURE__ */ new Map();\n\tconst tableOwners = /* @__PURE__ */ new Map();\n\tfor (const [modelName, modelDefinition] of Object.entries(models)) {\n\t\tconst tokenModelName = modelDefinition.stageOne.modelName;\n\t\tif (tokenModelName && tokenModelName !== modelName) throw contractError(\"CONTRACT.MODEL_TOKEN_INVALID\", `Model token \"${tokenModelName}\" must be assigned to models.${tokenModelName}. Received models.${modelName}.`, { meta: {\n\t\t\ttokenModelName,\n\t\t\tassignedKey: modelName\n\t\t} });\n\t\tconst attributesSpec = modelDefinition.buildAttributesSpec();\n\t\tconst sqlSpec = modelDefinition.buildSqlSpec();\n\t\tconst tableName = sqlSpec?.table ?? applyNaming(modelName, definition.naming?.tables);\n\t\tconst namespaceId = modelDefinition.stageOne.namespace ?? definition.target.defaultNamespaceId;\n\t\tconst tableKey = JSON.stringify([namespaceId, tableName]);\n\t\tconst existingModel = tableOwners.get(tableKey);\n\t\tif (existingModel) throw contractError(\"CONTRACT.NAME_DUPLICATE\", `Models \"${existingModel}\" and \"${modelName}\" both map to table \"${tableName}\".`, { meta: {\n\t\t\tkind: \"table\",\n\t\t\tname: tableName,\n\t\t\tfirst: existingModel,\n\t\t\tsecond: modelName\n\t\t} });\n\t\ttableOwners.set(tableKey, modelName);\n\t\tconst fieldToColumn = {};\n\t\tconst columnOwners = /* @__PURE__ */ new Map();\n\t\tfor (const [fieldName, fieldBuilder] of Object.entries(modelDefinition.stageOne.fields)) {\n\t\t\tconst columnName = fieldBuilder.build().columnName ?? applyNaming(fieldName, definition.naming?.columns);\n\t\t\tconst existingField = columnOwners.get(columnName);\n\t\t\tif (existingField) throw contractError(\"CONTRACT.NAME_DUPLICATE\", `Model \"${modelName}\" maps both \"${existingField}\" and \"${fieldName}\" to column \"${columnName}\".`, { meta: {\n\t\t\t\tkind: \"column\",\n\t\t\t\tname: columnName,\n\t\t\t\tfirst: existingField,\n\t\t\t\tsecond: fieldName\n\t\t\t} });\n\t\t\tcolumnOwners.set(columnName, fieldName);\n\t\t\tfieldToColumn[fieldName] = columnName;\n\t\t}\n\t\tconst fieldBuilders = modelDefinition.stageOne.fields;\n\t\tconst idConstraint = resolveModelIdConstraint({\n\t\t\tmodelName,\n\t\t\tfieldBuilders,\n\t\t\tattributesSpec\n\t\t});\n\t\tmodelSpecs.set(modelName, {\n\t\t\tmodelName,\n\t\t\ttableName,\n\t\t\tnamespace: modelDefinition.stageOne.namespace,\n\t\t\tfieldBuilders,\n\t\t\tfieldToColumn,\n\t\t\trelations: modelDefinition.stageOne.relations,\n\t\t\tattributesSpec,\n\t\t\tsqlSpec,\n\t\t\tidConstraint\n\t\t});\n\t}\n\treturn {\n\t\tstorageTypes,\n\t\tmodels,\n\t\tmodelSpecs\n\t};\n}\nfunction lowerModels(collection, extensions) {\n\temitTypedCrossModelFallbackWarnings(collection);\n\tconst storageTypeReverseLookup = buildStorageTypeReverseLookup(collection.storageTypes);\n\treturn Array.from(collection.modelSpecs.values()).map((spec) => resolveModelNode(spec, collection.modelSpecs, collection.storageTypes, storageTypeReverseLookup, extensions));\n}\n/**\n* Kind-agnostic walk over the author-declared `entities` handle list:\n*\n* 1. Index the bound packs' `entityTypes` contributions by discriminator so\n* each handle's `entityKind` maps to the pack that registered it; a\n* handle whose kind no composed pack registers is an error naming the\n* kind.\n* 2. Resolve each handle's declared model refs (`handle.refs`, actual\n* model-handle objects) to storage table coordinates — identity against\n* the contract's `models` record first, then the handle's declared model\n* name against the build's model specs; never by re-deriving a table\n* name. A cross-space (extensionModel) handle resolves to its own\n* coordinate annotated with `spaceId`.\n* 3. Call each owning pack's batch lowering hook once with all of its\n* claimed handles, and fold the returned rows into the namespace-scoped\n* attachments (namespace → kind → key), rejecting two different entities\n* in one slot. The result becomes `ContractDefinition.attachedEntities`.\n*\n* No entity kind is named anywhere in this walk.\n*/\nfunction lowerPackEntityHandles(definition, modelSpecs) {\n\tconst entities = definition.entities;\n\tif (entities === void 0 || entities.length === 0) return void 0;\n\tconst components = [definition.target, ...Object.values(definition.extensions ?? {})];\n\tconst owningComponent = /* @__PURE__ */ new Map();\n\tconst walkEntityTypes = (namespace, component) => {\n\t\tfor (const value of Object.values(namespace)) if (isAuthoringEntityTypeDescriptor(value)) owningComponent.set(value.discriminator, component);\n\t\telse walkEntityTypes(value, component);\n\t};\n\tfor (const component of components) {\n\t\tconst entityTypes = component.authoring?.entityTypes;\n\t\tif (entityTypes !== void 0) walkEntityTypes(entityTypes, component);\n\t}\n\tconst defaultNamespaceId = definition.target.defaultNamespaceId;\n\tconst modelNamesByIdentity = /* @__PURE__ */ new Map();\n\tfor (const [modelName, modelBuilder] of Object.entries(definition.models ?? {})) modelNamesByIdentity.set(modelBuilder, modelName);\n\tconst coordinateOf = (modelName) => {\n\t\tconst spec = modelSpecs.get(modelName);\n\t\tif (spec === void 0) return void 0;\n\t\treturn {\n\t\t\tkind: \"resolved\",\n\t\t\tnamespaceId: spec.namespace ?? defaultNamespaceId,\n\t\t\ttableName: spec.tableName,\n\t\t\tmodelName\n\t\t};\n\t};\n\tconst declaredModelName = (value) => {\n\t\tif (typeof value !== \"object\" || value === null || !(\"stageOne\" in value)) return void 0;\n\t\tconst stageOne = value.stageOne;\n\t\tif (typeof stageOne !== \"object\" || stageOne === null || !(\"modelName\" in stageOne)) return;\n\t\treturn typeof stageOne.modelName === \"string\" ? stageOne.modelName : void 0;\n\t};\n\tconst resolveRef = (value) => {\n\t\tconst modelName = declaredModelName(value);\n\t\tif (isCrossSpaceHandle(value)) {\n\t\t\tconst tableName = value.tableName;\n\t\t\tconst namespaceId = value.stageOne.namespace;\n\t\t\tif (tableName !== void 0 && namespaceId !== void 0) return {\n\t\t\t\tkind: \"cross-space\",\n\t\t\t\tspaceId: value.spaceId,\n\t\t\t\tnamespaceId,\n\t\t\t\ttableName,\n\t\t\t\t...ifDefined(\"modelName\", modelName)\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tkind: \"unresolved\",\n\t\t\t\t...ifDefined(\"modelName\", modelName)\n\t\t\t};\n\t\t}\n\t\tconst identityName = modelNamesByIdentity.get(value);\n\t\treturn (identityName !== void 0 ? coordinateOf(identityName) : void 0) ?? (modelName !== void 0 ? coordinateOf(modelName) : void 0) ?? {\n\t\t\tkind: \"unresolved\",\n\t\t\t...ifDefined(\"modelName\", modelName)\n\t\t};\n\t};\n\tconst claimed = /* @__PURE__ */ new Map();\n\tfor (const handle of entities) {\n\t\tconst component = owningComponent.get(handle.entityKind);\n\t\tif (component === void 0) throw contractError(\"CONTRACT.ENTITY_KIND_UNKNOWN\", `defineContract: entities contains a handle with entityKind \"${handle.entityKind}\", which no composed pack registers. Compose a pack whose entityTypes contribution claims \"${handle.entityKind}\", or remove the handle.`, { meta: { entityKind: handle.entityKind } });\n\t\tconst refs = {};\n\t\tfor (const [refName, refValue] of Object.entries(handle.refs ?? {})) refs[refName] = resolveRef(refValue);\n\t\tconst forComponent = claimed.get(component) ?? [];\n\t\tforComponent.push({\n\t\t\thandle,\n\t\t\trefs\n\t\t});\n\t\tclaimed.set(component, forComponent);\n\t}\n\tconst pack = {};\n\tfor (const [component, handles] of claimed) {\n\t\tconst authoring = component.authoring;\n\t\tif (!providesEntityHandleLowering(authoring)) {\n\t\t\tconst kinds = [...new Set(handles.map((entry) => entry.handle.entityKind))].sort();\n\t\t\tthrow contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `defineContract: entityKind(s) ${kinds.map((kind) => `\"${kind}\"`).join(\", \")} are registered by a pack that does not implement entity-handle lowering (no lowerEntityHandles on its authoring contributions).`, { meta: {\n\t\t\t\tentityKinds: kinds,\n\t\t\t\treason: \"missing-lowerEntityHandles\"\n\t\t\t} });\n\t\t}\n\t\tfor (const row of authoring.lowerEntityHandles({\n\t\t\thandles,\n\t\t\tdefaultNamespaceId\n\t\t})) {\n\t\t\tconst forNamespace = pack[row.namespaceId] ?? {};\n\t\t\tpack[row.namespaceId] = forNamespace;\n\t\t\tconst forKind = forNamespace[row.entityKind] ?? {};\n\t\t\tforNamespace[row.entityKind] = forKind;\n\t\t\tconst existing = forKind[row.key];\n\t\t\tif (existing !== void 0 && existing !== row.entity) throw contractError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: two different \"${row.entityKind}\" entities named \"${row.key}\" in namespace \"${row.namespaceId}\" — pack-entity names must be unique per namespace.`, { meta: {\n\t\t\t\tkind: row.entityKind,\n\t\t\t\tname: row.key,\n\t\t\t\tnamespaceId: row.namespaceId\n\t\t\t} });\n\t\t\tforKind[row.key] = row.entity;\n\t\t}\n\t}\n\treturn pack;\n}\nfunction buildContractDefinition(definition) {\n\tconst collection = collectRuntimeModelSpecs(definition);\n\tconst models = lowerModels(collection, definition.extensions);\n\tconst attachedEntities = lowerPackEntityHandles(definition, collection.modelSpecs);\n\treturn {\n\t\ttarget: definition.target,\n\t\t...ifDefined(\"defaultControlPolicy\", definition.defaultControlPolicy),\n\t\t...definition.extensions ? { extensions: definition.extensions } : {},\n\t\t...definition.storageHash ? { storageHash: definition.storageHash } : {},\n\t\t...definition.foreignKeyDefaults ? { foreignKeyDefaults: definition.foreignKeyDefaults } : {},\n\t\t...Object.keys(collection.storageTypes).length > 0 ? { storageTypes: collection.storageTypes } : {},\n\t\t...definition.namespaces ? { namespaces: definition.namespaces } : {},\n\t\twarnings: void 0,\n\t\tcreateNamespace: definition.createNamespace,\n\t\t...definition.enums && Object.keys(definition.enums).length > 0 ? { enums: definition.enums } : {},\n\t\t...attachedEntities && Object.keys(attachedEntities).length > 0 ? { attachedEntities } : {},\n\t\tmodels\n\t};\n}\n//#endregion\n//#region src/contract-builder.ts\nfunction validateTargetPackRef(family, target) {\n\tif (family.familyId !== \"sql\") throw contractError(\"CONTRACT.PACK_FAMILY_MISMATCH\", `defineContract only accepts SQL family packs. Received family \"${family.familyId}\".`, { meta: {\n\t\tpackId: family.id,\n\t\tpackFamilyId: family.familyId,\n\t\tcontractFamilyId: \"sql\"\n\t} });\n\tif (target.familyId !== family.familyId) throw contractError(\"CONTRACT.PACK_FAMILY_MISMATCH\", `target pack \"${target.id}\" targets family \"${target.familyId}\" but contract family is \"${family.familyId}\".`, { meta: {\n\t\tpackId: target.id,\n\t\tpackFamilyId: target.familyId,\n\t\tcontractFamilyId: family.familyId\n\t} });\n}\n/**\n* Per-target reserved namespace names enforced by `defineContract` for\n* SQL family contracts. Two categories:\n*\n* 1. **IR sentinels** (`__unbound__`, `__unspecified__`) — reserved on\n* every SQL target. The double-underscore decoration marks them as\n* framework-reserved coordinates; user code must not declare them\n* explicitly.\n* 2. **Target-specific PSL keywords** — Postgres reserves the bare\n* `unbound` identifier for the late-binding opt-in\n* (`namespace unbound { … }`) so the TS surface must reject it from\n* `defineContract({ namespaces })` lists. SQLite has no schema\n* concept and rejects every non-empty namespaces list outright;\n* callers should declare `namespaces: []` or omit the field.\n*/\nfunction validateNamespaceDeclarations(target, namespaces) {\n\tif (!namespaces) return;\n\tif (target.targetId === \"sqlite\" && namespaces.length > 0) throw contractError(\"CONTRACT.NAMESPACE_UNSUPPORTED\", `defineContract: SQLite contracts cannot declare namespaces (SQLite has no schema concept; emitted DDL is always unqualified). Received namespaces: [${namespaces.map((name) => `\"${name}\"`).join(\", \")}].`, { meta: {\n\t\tnamespaces,\n\t\ttargetId: target.targetId\n\t} });\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const namespace of namespaces) {\n\t\tif (namespace.length === 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", \"defineContract: namespace names cannot be empty.\", { meta: {\n\t\t\tnamespace,\n\t\t\treason: \"empty\"\n\t\t} });\n\t\tif (namespace.trim().length === 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `defineContract: namespace name \"${namespace}\" cannot be whitespace-only.`, { meta: {\n\t\t\tnamespace,\n\t\t\treason: \"whitespace-only\"\n\t\t} });\n\t\tif (namespace === \"__unbound__\" || namespace === \"__unspecified__\") throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `defineContract: namespace name \"${namespace}\" is a reserved IR sentinel and cannot appear in the declared namespaces list.`, { meta: {\n\t\t\tnamespace,\n\t\t\treason: \"reserved-ir-sentinel\"\n\t\t} });\n\t\tif (target.targetId === \"postgres\" && namespace === \"unbound\") throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `defineContract: namespace name \"unbound\" is reserved by Postgres for the late-binding opt-in (use \\`namespace unbound { … }\\` in PSL instead of declaring it as a regular schema).`, { meta: {\n\t\t\tnamespace,\n\t\t\treason: \"reserved-by-postgres\"\n\t\t} });\n\t\tif (seen.has(namespace)) throw contractError(\"CONTRACT.NAME_DUPLICATE\", `defineContract: namespaces list contains duplicate entry \"${namespace}\".`, { meta: {\n\t\t\tkind: \"namespace\",\n\t\t\tname: namespace\n\t\t} });\n\t\tseen.add(namespace);\n\t}\n}\n/**\n* Per-model `namespace` validation paired with\n* {@link validateNamespaceDeclarations}. Mirrors the reserved-name\n* rules so the per-model surface stays consistent with the contract-\n* level surface:\n*\n* - `__unbound__` / `__unspecified__` — reserved IR sentinels on\n* every SQL target.\n* - `unbound` on Postgres — reserved for the PSL\n* `namespace unbound { … }` opt-in.\n*\n* Additionally enforces that each per-model `namespace` either\n* references an entry in the contract's declared `namespaces` list or\n* names the Postgres late-binding keyword (`unbound`) — the latter is\n* not a \"declared namespace\" but is a legal opt-in only via PSL today,\n* so the TS surface also rejects it on the per-model side and points\n* authors at the PSL `namespace unbound { … }` block.\n*\n* The SQLite per-model `namespace` field is rejected outright (SQLite\n* has no schema concept).\n*/\nfunction validatePerModelNamespaces(target, namespaces, models) {\n\tconst declaredNamespaces = new Set(namespaces ?? []);\n\tfor (const [modelKey, modelBuilder] of Object.entries(models)) {\n\t\tconst perModelNamespace = modelBuilder.stageOne.namespace;\n\t\tif (perModelNamespace === void 0) continue;\n\t\tif (target.targetId === \"sqlite\") throw contractError(\"CONTRACT.NAMESPACE_UNSUPPORTED\", `defineContract: model \"${modelKey}\" sets \\`namespace: \"${perModelNamespace}\"\\` but the target is SQLite (SQLite has no schema concept; remove the per-model \\`namespace\\` field).`, { meta: {\n\t\t\tmodelKey,\n\t\t\tnamespace: perModelNamespace,\n\t\t\ttargetId: target.targetId\n\t\t} });\n\t\tif (perModelNamespace === \"__unbound__\" || perModelNamespace === \"__unspecified__\") throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `defineContract: model \"${modelKey}\" sets \\`namespace: \"${perModelNamespace}\"\\` but that name is a reserved IR sentinel and cannot appear in user code.`, { meta: {\n\t\t\tmodelKey,\n\t\t\tnamespace: perModelNamespace,\n\t\t\treason: \"reserved-ir-sentinel\"\n\t\t} });\n\t\tif (target.targetId === \"postgres\" && perModelNamespace === \"unbound\") throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `defineContract: model \"${modelKey}\" sets \\`namespace: \"unbound\"\\` but that name is reserved by Postgres for the late-binding opt-in (use \\`namespace unbound { … }\\` in PSL instead — there is no equivalent surface in the TS builder today).`, { meta: {\n\t\t\tmodelKey,\n\t\t\tnamespace: perModelNamespace,\n\t\t\treason: \"reserved-by-postgres\"\n\t\t} });\n\t\tif (!declaredNamespaces.has(perModelNamespace)) throw contractError(\"CONTRACT.NAMESPACE_UNKNOWN\", `defineContract: model \"${modelKey}\" references namespace \"${perModelNamespace}\" but that name does not appear in the contract's declared \\`namespaces\\` list.${declaredNamespaces.size > 0 ? ` Declared namespaces: [${[...declaredNamespaces].map((name) => `\"${name}\"`).join(\", \")}].` : \" The contract does not declare any namespaces; add `namespaces: [\\\"…\\\"]` to `defineContract` first.\"}`, { meta: {\n\t\t\tmodelKey,\n\t\t\tnamespace: perModelNamespace,\n\t\t\tdeclared: [...declaredNamespaces]\n\t\t} });\n\t}\n}\nfunction validateExtensionPackRefs(target, extensions) {\n\tif (!extensions) return;\n\tfor (const packRef of Object.values(extensions)) {\n\t\tif (packRef.kind !== \"extension\") throw contractError(\"CONTRACT.PACK_REF_INVALID\", `defineContract only accepts extension pack refs in extensions. Received kind \"${packRef.kind}\".`, { meta: {\n\t\t\tpackId: packRef.id,\n\t\t\tkind: packRef.kind\n\t\t} });\n\t\tif (packRef.familyId !== target.familyId) throw contractError(\"CONTRACT.PACK_FAMILY_MISMATCH\", `extension pack \"${packRef.id}\" targets family \"${packRef.familyId}\" but contract target family is \"${target.familyId}\".`, { meta: {\n\t\t\tpackId: packRef.id,\n\t\t\tpackFamilyId: packRef.familyId,\n\t\t\tcontractFamilyId: target.familyId\n\t\t} });\n\t\tif (packRef.targetId && packRef.targetId !== target.targetId) throw contractError(\"CONTRACT.PACK_TARGET_MISMATCH\", `extension pack \"${packRef.id}\" targets \"${packRef.targetId}\" but contract target is \"${target.targetId}\".`, { meta: {\n\t\t\tpackId: packRef.id,\n\t\t\tpackTargetId: packRef.targetId,\n\t\t\tcontractTargetId: target.targetId\n\t\t} });\n\t}\n}\nfunction buildContractFromDsl(definition) {\n\tvalidateTargetPackRef(definition.family, definition.target);\n\tvalidateExtensionPackRefs(definition.target, definition.extensions);\n\tvalidateNamespaceDeclarations(definition.target, definition.namespaces);\n\tvalidatePerModelNamespaces(definition.target, definition.namespaces, definition.models ?? {});\n\treturn blindCast(buildSqlContractFromDefinition(buildContractDefinition(definition), definition.codecLookup));\n}\n/** Implementation. */\nfunction buildBoundContract(family, target, definition, factory) {\n\tconst full = {\n\t\t...definition,\n\t\tfamily,\n\t\ttarget\n\t};\n\tif (factory !== void 0) {\n\t\tconst built = factory(createComposedAuthoringHelpers({\n\t\t\tfamily,\n\t\t\ttarget,\n\t\t\textensions: definition.extensions\n\t\t}));\n\t\tconst mergedEnums = {\n\t\t\t...definition.enums ?? {},\n\t\t\t...built.enums\n\t\t};\n\t\tconst mergedEntities = [...definition.entities ?? [], ...built.entities ?? []];\n\t\treturn buildContractFromDsl({\n\t\t\t...full,\n\t\t\t...ifDefined(\"types\", built.types),\n\t\t\t...ifDefined(\"models\", built.models),\n\t\t\t...ifDefined(\"enums\", Object.keys(mergedEnums).length > 0 ? mergedEnums : void 0),\n\t\t\t...ifDefined(\"entities\", mergedEntities.length > 0 ? mergedEntities : void 0)\n\t\t});\n\t}\n\treturn buildContractFromDsl(full);\n}\nfunction defineContract(definition, factory) {\n\tif (!isContractInput(definition)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"defineContract expects a contract definition object. Define your contract with defineContract({ family, target, models, ... }).\");\n\tif (factory !== void 0) return buildBoundContract(definition.family, definition.target, definition, factory);\n\treturn buildBoundContract(definition.family, definition.target, definition);\n}\n//#endregion\n//#region src/default-functions.ts\n/** The database's current time, the same default PSL writes as `@default(now())`. */\nfunction now() {\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: \"now()\"\n\t};\n}\n/** A database-assigned sequence value, the same default PSL writes as `@default(autoincrement())`. */\nfunction autoincrement() {\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: \"autoincrement()\"\n\t};\n}\n//#endregion\n//#region src/sql-default-literal.ts\n/**\n* A raw SQL column default written as a template literal: `` sql`gen_random_uuid()` ``. The raw text\n* between the backticks resolves `` \\` ``, `\\\\` and `\\$`, is canonicalized the way PSL canonicalizes a\n* tagged literal, and is used verbatim as the default expression. Interpolation is not supported, so\n* the two characters `${` are written `\\${`.\n*/\nfunction sql(strings, ...values) {\n\tif (values.length > 0) throw contractError(\"CONTRACT.DEFAULT_SQL_INTERPOLATION\", \"sql`...` does not support interpolation; write the SQL as one literal.\", { meta: { interpolations: values.length } });\n\tconst canonical = canonicalizeTaggedLiteralBody(resolveTemplateTagEscapes(strings.raw.join(\"\")));\n\tif (!canonical.ok) throw contractError(\"CONTRACT.DEFAULT_INVALID\", describeTaggedLiteralFailure(canonical.reason), { meta: {\n\t\treason: canonical.reason,\n\t\toffset: canonical.offset\n\t} });\n\tconst reserved = reservedSqlDefaultBody(canonical.body);\n\tif (reserved !== void 0) throw contractError(\"CONTRACT.DEFAULT_INVALID\", `Write .default(${reserved}()) instead of sql\\`${reserved}()\\`; ${reserved}() is a Prisma default function, not raw SQL.`, { meta: {\n\t\treason: \"reserved-function\",\n\t\texpression: canonical.body\n\t} });\n\tconst rejected = checkSqlDefaultBody(canonical.body);\n\tif (rejected !== void 0) throw contractError(\"CONTRACT.DEFAULT_INVALID\", rejected, { meta: {\n\t\treason: \"unsafe-sql\",\n\t\texpression: canonical.body\n\t} });\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: canonical.body\n\t};\n}\n//#endregion\nexport { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, defineContract,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,KAAK,GAAG,MAAM,cAAc,4BAA4B,UAAU,EAAE,MAAM;EAC1F,QAAQ;EACR,YAAY,UAAU;CACvB,EAAE,CAAC;CACH,OAAO;EACN,MAAM;EACN,YAAY,UAAU;CACvB;AACD"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as CheckKind } from "./naming-CV9j2pXl-KARaDReS.mjs";
|
|
2
2
|
import { a as ReferentialAction } from "./foreign-key-C-iTPuRT-C9ip8zFx.mjs";
|
|
3
3
|
import { t as Index } from "./sql-index-ByAAE7K8-DKj2V86p.mjs";
|
|
4
|
-
import { c as SqlStorage, d as StorageTypeInstance, i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-
|
|
5
|
-
import { P as TypeMaps, o as ContractWithTypeMaps } from "./types-
|
|
6
|
-
import "./types-
|
|
4
|
+
import { c as SqlStorage, d as StorageTypeInstance, i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-BSxD7_vv-C4ugLH39.mjs";
|
|
5
|
+
import { P as TypeMaps, o as ContractWithTypeMaps } from "./types-DTUyRqZv-DLh98w8w.mjs";
|
|
6
|
+
import "./types-BoMDdzjD.mjs";
|
|
7
7
|
import { r as PackEntityHandle } from "./entity-handle-lowering-hook-93syhZ0p.mjs";
|
|
8
|
-
import "./derived-checks-DPdD01O0-
|
|
8
|
+
import "./derived-checks-DPdD01O0-zXZEuy5P.mjs";
|
|
9
9
|
import { n as AuthoredIndexMethod } from "./index-naming-BNIXvg5R.mjs";
|
|
10
10
|
import { i as IndexTypeRegistration } from "./index-types-DPVhsW0v-D-BikM4h.mjs";
|
|
11
11
|
import "./index-types-CNhHgKHi.mjs";
|
|
12
12
|
import { AuthoringArgumentDescriptor, AuthoringFieldPresetDescriptor, AuthoringTypeConstructorDescriptor, AuthoringWarning } from "@prisma/orm-framework/components/authoring";
|
|
13
13
|
import { StorageType } from "@prisma/orm-framework/components/ir";
|
|
14
14
|
import { ColumnDefault, Contract, ContractEnum, ContractRelation, ContractValueObject, ControlPolicy, ExecutionMutationDefaultPhases, ExecutionMutationDefaultValue, NamespaceId, StorageHashBase } from "@prisma/orm-framework/contract/types";
|
|
15
|
-
import {
|
|
15
|
+
import { CodecLookupWithDescriptors, ColumnTypeDescriptor } from "@prisma/orm-framework/components/codec";
|
|
16
16
|
import { ExtensionPackRef, FamilyPackRef, TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
17
17
|
import { BoundEnumType, CodecInput, CodecInput as CodecInput$1, CodecTypeMap, CodecTypeMap as CodecTypeMap$1, EntityHelpersFromNamespace, EnumMember, EnumTypeHandle, ExtractAuthoringNamespaceFromPack, ForeignKeyDefaultsState, MergeExtensionAuthoringNamespaces, ResolveTemplateValue, TupleFromArgumentDescriptors, bindEnumType, enumType, member } from "@prisma/orm-framework/contract-authoring";
|
|
18
18
|
//#region ../../../2-sql/2-authoring/contract-ts/dist/contract-builder.d.mts
|
|
@@ -46,14 +46,24 @@ type AuthoredColumnDefault = ColumnDefault | {
|
|
|
46
46
|
*/
|
|
47
47
|
readonly canonical?: boolean;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
/** The type of a scalar: a codec and its type parameters, the domain's `ScalarFieldType` without its kind. */
|
|
50
|
+
type ScalarTypeDescriptor = Pick<ColumnTypeDescriptor, 'codecId' | 'typeParams'>;
|
|
51
|
+
/**
|
|
52
|
+
* The column-free part of a scalar field. A value-object member is exactly this; a model field ({@link FieldNode}) adds its column.
|
|
53
|
+
*/
|
|
54
|
+
interface ScalarMemberNode {
|
|
50
55
|
readonly fieldName: string;
|
|
51
|
-
readonly
|
|
52
|
-
readonly descriptor: ColumnTypeDescriptor;
|
|
56
|
+
readonly descriptor: ScalarTypeDescriptor;
|
|
53
57
|
readonly nullable: boolean;
|
|
58
|
+
readonly many?: boolean;
|
|
59
|
+
/** Present when the field is typed by an enum. */
|
|
60
|
+
readonly enumTypeHandle?: EnumTypeHandle;
|
|
61
|
+
}
|
|
62
|
+
interface FieldNode extends ScalarMemberNode {
|
|
63
|
+
readonly descriptor: ColumnTypeDescriptor;
|
|
64
|
+
readonly columnName: string;
|
|
54
65
|
readonly default?: AuthoredColumnDefault;
|
|
55
66
|
readonly executionDefaults?: ExecutionMutationDefaultPhases;
|
|
56
|
-
readonly many?: boolean;
|
|
57
67
|
/**
|
|
58
68
|
* Generated-check kinds the author declined for this column. The PSL
|
|
59
69
|
* interpreter always writes concrete kinds; the TS builder's bare
|
|
@@ -61,8 +71,6 @@ interface FieldNode {
|
|
|
61
71
|
* derivable kinds at contract build time.
|
|
62
72
|
*/
|
|
63
73
|
readonly noCheck?: readonly CheckKind[];
|
|
64
|
-
/** Present when the field was authored with `field.namedType(enumHandle)`. */
|
|
65
|
-
readonly enumTypeHandle?: EnumTypeHandle;
|
|
66
74
|
}
|
|
67
75
|
interface PrimaryKeyNode {
|
|
68
76
|
readonly columns: readonly string[];
|
|
@@ -180,19 +188,37 @@ interface RelationNode {
|
|
|
180
188
|
readonly childColumns: readonly string[];
|
|
181
189
|
};
|
|
182
190
|
}
|
|
183
|
-
|
|
191
|
+
/**
|
|
192
|
+
* The column-free part of a field typed by a value object. A value-object member is exactly this; a model field ({@link ValueObjectFieldNode}) adds its column.
|
|
193
|
+
*/
|
|
194
|
+
interface ValueObjectMemberNode {
|
|
184
195
|
readonly fieldName: string;
|
|
185
|
-
readonly columnName: string;
|
|
186
196
|
readonly valueObjectName: string;
|
|
187
197
|
readonly nullable: boolean;
|
|
198
|
+
readonly many?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* A model field typed by a value object. It is stored in one column of the storage type the target declares for value objects, carried in `descriptor`; a list of value objects is stored in that one column too.
|
|
202
|
+
*/
|
|
203
|
+
interface ValueObjectFieldNode extends ValueObjectMemberNode {
|
|
204
|
+
readonly columnName: string;
|
|
205
|
+
readonly descriptor: ColumnTypeDescriptor;
|
|
188
206
|
readonly default?: AuthoredColumnDefault;
|
|
189
207
|
readonly executionDefaults?: ExecutionMutationDefaultPhases;
|
|
190
|
-
readonly many?: boolean;
|
|
191
208
|
}
|
|
192
209
|
interface ValueObjectNode {
|
|
193
210
|
readonly name: string;
|
|
194
|
-
readonly fields: readonly (
|
|
211
|
+
readonly fields: readonly (ScalarMemberNode | ValueObjectMemberNode)[];
|
|
195
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Whether a field is stored in a list column. A list of scalars is; a list of value objects is not, because it is stored in one column whose value is the whole list, as one JSON array.
|
|
215
|
+
*/
|
|
216
|
+
declare function storedAsListColumn(field: {
|
|
217
|
+
readonly list: boolean;
|
|
218
|
+
readonly typedByValueObject: boolean;
|
|
219
|
+
}): boolean;
|
|
220
|
+
/** Whether a field or member is typed by a value object. */
|
|
221
|
+
declare function isValueObjectMember(field: ScalarMemberNode | ValueObjectMemberNode): field is ValueObjectMemberNode;
|
|
196
222
|
interface ModelNode {
|
|
197
223
|
readonly modelName: string;
|
|
198
224
|
readonly tableName: string;
|
|
@@ -866,7 +892,7 @@ type ContractInput<Family extends FamilyPackRef<string> = FamilyPackRef<string>,
|
|
|
866
892
|
readonly createNamespace: (input: SqlNamespaceInput) => SqlNamespaceBase;
|
|
867
893
|
readonly types?: Types;
|
|
868
894
|
readonly models?: Models;
|
|
869
|
-
readonly codecLookup?:
|
|
895
|
+
readonly codecLookup?: CodecLookupWithDescriptors;
|
|
870
896
|
/**
|
|
871
897
|
* Domain enum handles authored via `enumType()`. Each handle lowers to a
|
|
872
898
|
* domain `enum` entry and a storage `valueSet` entry in the target's
|
|
@@ -1327,7 +1353,7 @@ type ComposedAuthoringHelpers<Family extends FamilyPackRef<string>, Target exten
|
|
|
1327
1353
|
};
|
|
1328
1354
|
//#endregion
|
|
1329
1355
|
//#region src/build-contract.d.ts
|
|
1330
|
-
declare function buildSqlContractFromDefinition(definition: ContractDefinition, codecLookup?:
|
|
1356
|
+
declare function buildSqlContractFromDefinition(definition: ContractDefinition, codecLookup?: CodecLookupWithDescriptors): Contract<SqlStorage>;
|
|
1331
1357
|
//#endregion
|
|
1332
1358
|
//#region src/contract-builder.d.ts
|
|
1333
1359
|
type ModelLike = {
|
|
@@ -1355,7 +1381,7 @@ type ContractDefinition$1<Family extends FamilyPackRef<string>, Target extends T
|
|
|
1355
1381
|
readonly createNamespace: (input: SqlNamespaceInput) => SqlNamespaceBase;
|
|
1356
1382
|
readonly types?: Types;
|
|
1357
1383
|
readonly models?: Models;
|
|
1358
|
-
readonly codecLookup?:
|
|
1384
|
+
readonly codecLookup?: CodecLookupWithDescriptors;
|
|
1359
1385
|
readonly enums?: Enums;
|
|
1360
1386
|
readonly entities?: readonly PackEntityHandle[];
|
|
1361
1387
|
};
|
|
@@ -1371,7 +1397,7 @@ type ContractScaffold<Family extends FamilyPackRef<string>, Target extends Targe
|
|
|
1371
1397
|
readonly createNamespace: (input: SqlNamespaceInput) => SqlNamespaceBase;
|
|
1372
1398
|
readonly types?: never;
|
|
1373
1399
|
readonly models?: never;
|
|
1374
|
-
readonly codecLookup?:
|
|
1400
|
+
readonly codecLookup?: CodecLookupWithDescriptors;
|
|
1375
1401
|
readonly enums?: Enums;
|
|
1376
1402
|
readonly entities?: readonly PackEntityHandle[];
|
|
1377
1403
|
};
|
|
@@ -1391,7 +1417,7 @@ type BoundDefinitionInput<Types extends Record<string, StorageTypeInstance> = Re
|
|
|
1391
1417
|
readonly createNamespace: (input: SqlNamespaceInput) => SqlNamespaceBase;
|
|
1392
1418
|
readonly types?: Types;
|
|
1393
1419
|
readonly models?: Models;
|
|
1394
|
-
readonly codecLookup?:
|
|
1420
|
+
readonly codecLookup?: CodecLookupWithDescriptors;
|
|
1395
1421
|
readonly enums?: Record<string, EnumTypeHandle>;
|
|
1396
1422
|
readonly entities?: readonly PackEntityHandle[];
|
|
1397
1423
|
};
|
|
@@ -1447,5 +1473,5 @@ declare function autoincrement(): ColumnDefault;
|
|
|
1447
1473
|
*/
|
|
1448
1474
|
declare function sql(strings: TemplateStringsArray, ...values: readonly never[]): ColumnDefault;
|
|
1449
1475
|
//#endregion
|
|
1450
|
-
export {
|
|
1451
|
-
//# sourceMappingURL=contract-builder-
|
|
1476
|
+
export { TargetFieldRef as A, check as B, MergeEnums as C, RelationNode as D, PrimaryKeyNode as E, autoincrement as F, isValueObjectMember as G, enumType as H, bindEnumType as I, now as J, member as K, buildBoundContract as L, ValueObjectFieldNode as M, ValueObjectMemberNode as N, ScalarFieldBuilder as O, ValueObjectNode as P, buildContractDefinition as R, IndexNode as S, ModelNode as T, extensionModel as U, defineContract as V, field as W, sql as X, rel as Y, storedAsListColumn as Z, ExtractCodecTypesFromPack as _, CheckNode as a, IndexConstraint as b, ColumnRef as c, ContractInput as d, ContractModelBuilder as f, EnumTypeHandle as g, EnumMember as h, BoundEnumType as i, UniqueConstraintNode as j, ScalarMemberNode as k, ComposedAuthoringHelpers as l, DeferredIndexExpression as m, AuthoredColumnDefault as n, CodecInput$1 as o, DeferredIndexColumn as p, model as q, AuthoredColumnDefaultLiteralValue as r, CodecTypeMap$1 as s, AttachedEntities as t, ContractDefinition as u, FieldNode as v, ModelLike as w, IndexExpressionInput as x, ForeignKeyNode as y, buildSqlContractFromDefinition as z };
|
|
1477
|
+
//# sourceMappingURL=contract-builder-ezejmfrY.d.mts.map
|