@prisma/orm-family-sql 8.0.0-rc.18-dev.1 → 8.0.0-rc.18-dev.3

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.
Files changed (50) hide show
  1. package/dist/{attribute-specs-Dp4My87B.d.mts → attribute-specs-BgdwJoq3.d.mts} +2 -2
  2. package/dist/{attribute-specs-Dp4My87B.d.mts.map → attribute-specs-BgdwJoq3.d.mts.map} +1 -1
  3. package/dist/{authoring-type-constructors-0Iv2zdwS-ZTBL7w8X.mjs → authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs} +2 -2
  4. package/dist/{authoring-type-constructors-0Iv2zdwS-ZTBL7w8X.mjs.map → authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs.map} +1 -1
  5. package/dist/{config-types-DiCetrJe.mjs → config-types-DyZXyiNb.mjs} +2 -2
  6. package/dist/{config-types-DiCetrJe.mjs.map → config-types-DyZXyiNb.mjs.map} +1 -1
  7. package/dist/{contract-builder-D84f__Oc.mjs → contract-builder-B_oFvMWk.mjs} +2 -2
  8. package/dist/{contract-builder-D84f__Oc.mjs.map → contract-builder-B_oFvMWk.mjs.map} +1 -1
  9. package/dist/contract-emitter.d.mts +1 -3
  10. package/dist/contract-emitter.d.mts.map +1 -1
  11. package/dist/contract-emitter.mjs +1 -1
  12. package/dist/contract-prisma7__provider.mjs +4 -4
  13. package/dist/contract-prisma7__provider.mjs.map +1 -1
  14. package/dist/contract-psl.d.mts +2 -2
  15. package/dist/contract-psl.d.mts.map +1 -1
  16. package/dist/contract-psl.mjs +1 -1
  17. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  18. package/dist/contract-psl__attribute-specs.mjs +1 -1
  19. package/dist/contract-psl__provider.mjs +2 -2
  20. package/dist/contract-psl__provider.mjs.map +1 -1
  21. package/dist/contract-ts.mjs +3 -3
  22. package/dist/contract-ts__config-types.mjs +1 -1
  23. package/dist/contract-ts__contract-builder.mjs +2 -2
  24. package/dist/{control-CkV_zSCA.d.mts → control-CyY2Ijms.d.mts} +2 -2
  25. package/dist/{control-CkV_zSCA.d.mts.map → control-CyY2Ijms.d.mts.map} +1 -1
  26. package/dist/{control-Bvnz4Uk4.mjs → control-_KWRuSBH.mjs} +4 -4
  27. package/dist/{control-Bvnz4Uk4.mjs.map → control-_KWRuSBH.mjs.map} +1 -1
  28. package/dist/{derived-checks-CYz041Ol-TjL7rPxe.mjs → derived-checks-BPWwhTds-Cy93UfrT.mjs} +4 -3
  29. package/dist/{derived-checks-CYz041Ol-TjL7rPxe.mjs.map → derived-checks-BPWwhTds-Cy93UfrT.mjs.map} +1 -1
  30. package/dist/{dist-D8EkCena.mjs → dist-Dswy-oRP.mjs} +1 -131
  31. package/dist/dist-Dswy-oRP.mjs.map +1 -0
  32. package/dist/family.d.mts +2 -2
  33. package/dist/family.mjs +1 -1
  34. package/dist/family__control.d.mts +1 -1
  35. package/dist/family__control.mjs +1 -1
  36. package/dist/family__pack.d.mts +1 -1
  37. package/dist/family__pack.mjs +2 -2
  38. package/dist/{interpreter-BbopSq2f-y_JBQJFT.mjs → interpreter-C3Ltz47m-BM7A_CmQ.mjs} +8 -8
  39. package/dist/interpreter-C3Ltz47m-BM7A_CmQ.mjs.map +1 -0
  40. package/dist/{pack-mniK_gmN.d.mts → pack-DOLmsrEs.d.mts} +2 -2
  41. package/dist/{pack-mniK_gmN.d.mts.map → pack-DOLmsrEs.d.mts.map} +1 -1
  42. package/dist/{psl-column-resolution-Dm5LhN9b-BwyDcxSb.d.mts → psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts} +3 -3
  43. package/dist/psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts.map +1 -0
  44. package/dist/{psl-field-resolution-D4jnVVTd-B396sZmO.mjs → psl-field-resolution-ztVU6TV2-BSBajXoF.mjs} +24 -19
  45. package/dist/psl-field-resolution-ztVU6TV2-BSBajXoF.mjs.map +1 -0
  46. package/package.json +18 -18
  47. package/dist/dist-D8EkCena.mjs.map +0 -1
  48. package/dist/interpreter-BbopSq2f-y_JBQJFT.mjs.map +0 -1
  49. package/dist/psl-column-resolution-Dm5LhN9b-BwyDcxSb.d.mts.map +0 -1
  50. package/dist/psl-field-resolution-D4jnVVTd-B396sZmO.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import "./contract-builder-C4fgERNT.mjs";
2
- import "./psl-column-resolution-Dm5LhN9b-BwyDcxSb.mjs";
2
+ import "./psl-column-resolution-Cj4gkj9H-Cu2xVY6w.mjs";
3
3
  import { PslSources } from "@prisma/orm-framework/psl-parser/syntax";
4
4
  import { AttributeSpec, AttributeSpecContext, DescribeUnsupportedAttribute, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, ModelSymbol, ParsedWrittenList, ParsedWrittenScalar, PslSpan, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
5
5
  import "@prisma/orm-framework/components/control";
@@ -103,4 +103,4 @@ declare const sqlAttributeSpecs: {
103
103
  declare function describeUnsupportedSqlAttribute(sources: PslSources): DescribeUnsupportedAttribute;
104
104
  //#endregion
105
105
  export { ParsedNullLiteral as a, EnumMemberListDefault as i, DefaultFunctionCall as n, sqlAttributeSpecs as o, EnumMemberDefault as r, describeUnsupportedSqlAttribute as t };
106
- //# sourceMappingURL=attribute-specs-Dp4My87B.d.mts.map
106
+ //# sourceMappingURL=attribute-specs-BgdwJoq3.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attribute-specs-Dp4My87B.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-V7142vJa.d.mts","../../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;UAMU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;iBACvJ,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;iBACc,eAAe,KAAK,uBAAuB;EAC1D;WACS,4CAA4C;WAC5C,uCAAuC;WACvC;WACA;WACA;WACA;WACA,UAAU;GAClB;iBACc,eAAe,KAAK,uBAAuB;WACjD,2CAA2C;WAC3C;WACA;GACR;;cAEW;WACH;aACE,MAAM,MAAM,yBAAyB;MAC5C;OACC;aACM,KAAK,MAAM,yBAAyB;MAC3C;eACS;OACR;aACM,SAAS,MAAM,yBAAyB;MAC/C;eACS;OACR;aACM,cAAc;aACd,cAAc;aACd,UAAU,MAAM,yBAAyB;MAChD;OACC;aACM,gBAAgB,MAAM,yBAAyB;MACtD;OACC;aACM,OAAO,MAAM,yBAAyB;MAC7C,qCAAqC,wBAAwB;MAC7D;OACC;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,UAAU,MAAM,8BAA8B;MACrD;MACA;OACC;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB;;;;;;iBCnFZ,gCAAgC,SAAS,aAAa"}
1
+ {"version":3,"file":"attribute-specs-BgdwJoq3.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-V7142vJa.d.mts","../../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;UAMU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;iBACvJ,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;iBACc,eAAe,KAAK,uBAAuB;EAC1D;WACS,4CAA4C;WAC5C,uCAAuC;WACvC;WACA;WACA;WACA;WACA,UAAU;GAClB;iBACc,eAAe,KAAK,uBAAuB;WACjD,2CAA2C;WAC3C;WACA;GACR;;cAEW;WACH;aACE,MAAM,MAAM,yBAAyB;MAC5C;OACC;aACM,KAAK,MAAM,yBAAyB;MAC3C;eACS;OACR;aACM,SAAS,MAAM,yBAAyB;MAC/C;eACS;OACR;aACM,cAAc;aACd,cAAc;aACd,UAAU,MAAM,yBAAyB;MAChD;OACC;aACM,gBAAgB,MAAM,yBAAyB;MACtD;OACC;aACM,OAAO,MAAM,yBAAyB;MAC7C,qCAAqC,wBAAwB;MAC7D;OACC;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,UAAU,MAAM,8BAA8B;MACrD;MACA;OACC;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB;;;;;;iBCnFZ,gCAAgC,SAAS,aAAa"}
@@ -1,4 +1,4 @@
1
- import { c as enumType } from "./contract-builder-D84f__Oc.mjs";
1
+ import { c as enumType } from "./contract-builder-B_oFvMWk.mjs";
2
2
  import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
3
3
  import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
4
4
  import { blockAttribute, jsonValue, mapBlock, str } from "@prisma/orm-framework/psl-parser";
@@ -263,4 +263,4 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
263
263
  //#endregion
264
264
  export { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringFieldPresets as t };
265
265
 
266
- //# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-ZTBL7w8X.mjs.map
266
+ //# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-type-constructors-0Iv2zdwS-ZTBL7w8X.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-0Iv2zdwS.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, jsonValue, mapBlock, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\nexport { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringTypes as t };\n\n//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS.mjs.map"],"mappings":";;;;;AAKA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA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S-zu35z-Tg.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-0Iv2zdwS.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, jsonValue, mapBlock, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\nexport { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringTypes as t };\n\n//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS.mjs.map"],"mappings":";;;;;AAKA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;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AS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;EACA,MAAM;GACL,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;EACA,QAAQ;GACP,MAAM;GACN,MAAM,CAAC,qBAAqB;GAC5B,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ;KACrB,MAAM;KACN,OAAO;KACP,MAAM,CAAC,MAAM;KACb,SAAS;IACV,EAAE;IACF,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;KACJ,QAAQ,EAAE,MAAM;MACf,MAAM;MACN,OAAO;MACP,MAAM,CAAC,MAAM;KACd,EAAE;IACH,EAAE;IACF,IAAI;GACL;EACD;EACA,OAAO;GACN,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;EACA,OAAO;GACN,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;CACD;AACD;AAGA,MAAM,0BAA0B,EAAE,KAAK,EAAE,QAAQ;CAChD,MAAM;CACN,eAAe;CACf,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
@@ -1,4 +1,4 @@
1
- import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-CYz041Ol-TjL7rPxe.mjs";
1
+ import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-BPWwhTds-Cy93UfrT.mjs";
2
2
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
3
3
  import { createDataTypeLookup, emptyCodecLookup } from "@prisma/orm-framework/components/codec";
4
4
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
@@ -65,4 +65,4 @@ function typescriptContractFromPath(contractPath, output, options) {
65
65
  //#endregion
66
66
  export { typescriptContract as n, typescriptContractFromPath as r, emptyContract as t };
67
67
 
68
- //# sourceMappingURL=config-types-DiCetrJe.mjs.map
68
+ //# sourceMappingURL=config-types-DyZXyiNb.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-types-DiCetrJe.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { n as buildSqlContractFromDefinition, o as contractError, t as applySqlSpecifierControlPolicy } from \"./derived-checks-CYz041Ol.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { createDataTypeLookup, emptyCodecLookup } from \"@internal/framework-components/codec\";\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}, {\n\t\t\t\t\t...emptyCodecLookup,\n\t\t\t\t\tdescriptorFor: () => void 0\n\t\t\t\t}, createDataTypeLookup([])), 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":";;;;;;;;;;;;;;AAcA,SAAS,8BAA8B,cAAc;CACpD,MAAM,MAAM,QAAQ,YAAY;CAChC,IAAI,IAAI,WAAW,GAAG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Y;CAC7D;AACD"}
1
+ {"version":3,"file":"config-types-DyZXyiNb.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { n as buildSqlContractFromDefinition, o as contractError, t as applySqlSpecifierControlPolicy } from \"./derived-checks-BPWwhTds.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { createDataTypeLookup, emptyCodecLookup } from \"@internal/framework-components/codec\";\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}, {\n\t\t\t\t\t...emptyCodecLookup,\n\t\t\t\t\tdescriptorFor: () => void 0\n\t\t\t\t}, createDataTypeLookup([])), 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":";;;;;;;;;;;;;;AAcA,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,GAAG;KACF,GAAG;KACH,qBAAqB,KAAK;IAC3B,GAAG,qBAAqB,CAAC,CAAC,CAAC,GAAG,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GACrF;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"}
@@ -2,7 +2,7 @@ import { t as providesEntityHandleLowering } from "./entity-handle-lowering-hook
2
2
  import { c as readSqlExpression, l as requireSqlExpression, o as isSqlExpression, r as SqlExpression } from "./sql-expression-DSRILiU2.mjs";
3
3
  import { t as CODEC_INSTANCE_KIND } from "./types-DXrO0fxT.mjs";
4
4
  import { n as checkSqlDefaultText, o as reservedSqlDefaultText } from "./validators-BMWQ7-5D.mjs";
5
- import { n as buildSqlContractFromDefinition, o as toOneNullabilityContradictionMessage, r as contractError } from "./derived-checks-CYz041Ol-TjL7rPxe.mjs";
5
+ import { n as buildSqlContractFromDefinition, o as toOneNullabilityContradictionMessage, r as contractError } from "./derived-checks-BPWwhTds-Cy93UfrT.mjs";
6
6
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
7
7
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
8
8
  import { assertNoCrossRegistryCollisions, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
@@ -1723,4 +1723,4 @@ function autoincrement() {
1723
1723
  //#endregion
1724
1724
  export { check as a, enumType as c, member as d, model as f, buildContractDefinition as i, extensionModel as l, rel as m, bindEnumType as n, createComposedAuthoringHelpers as o, now as p, buildBoundContract as r, defineContract as s, autoincrement as t, field as u };
1725
1725
 
1726
- //# sourceMappingURL=contract-builder-D84f__Oc.mjs.map
1726
+ //# sourceMappingURL=contract-builder-B_oFvMWk.mjs.map