@prisma/orm-family-sql 8.0.0-rc.17-dev.6 → 8.0.0-rc.17-dev.8

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 (68) hide show
  1. package/dist/attribute-specs-15pm1Qvk.d.mts +106 -0
  2. package/dist/attribute-specs-15pm1Qvk.d.mts.map +1 -0
  3. package/dist/{authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs → authoring-type-constructors-0Iv2zdwS-hVVlzpLW.mjs} +2 -2
  4. package/dist/{authoring-type-constructors-0Iv2zdwS-CcpLSwei.mjs.map → authoring-type-constructors-0Iv2zdwS-hVVlzpLW.mjs.map} +1 -1
  5. package/dist/{contract-builder-DEtvdts6.mjs → contract-builder-BSipKPrc.mjs} +3 -3
  6. package/dist/{contract-builder-DEtvdts6.mjs.map → contract-builder-BSipKPrc.mjs.map} +1 -1
  7. package/dist/contract-prisma7__provider.mjs +2 -2
  8. package/dist/contract-psl.d.mts +2 -2
  9. package/dist/contract-psl.d.mts.map +1 -1
  10. package/dist/contract-psl.mjs +1 -1
  11. package/dist/contract-psl__attribute-specs.d.mts +2 -86
  12. package/dist/contract-psl__attribute-specs.mjs +1 -1
  13. package/dist/contract-psl__provider.mjs +1 -1
  14. package/dist/contract-psl__provider.mjs.map +1 -1
  15. package/dist/contract-ts.mjs +1 -1
  16. package/dist/contract-ts__contract-builder.mjs +1 -1
  17. package/dist/contract.d.mts +2 -2
  18. package/dist/contract.mjs +2 -2
  19. package/dist/contract__sql-expression.d.mts +2 -2
  20. package/dist/contract__sql-expression.mjs +2 -2
  21. package/dist/{control-BK2oKZmT.d.mts → control-3kVclzEh.d.mts} +20 -19
  22. package/dist/control-3kVclzEh.d.mts.map +1 -0
  23. package/dist/{control-4kwMnHYO.mjs → control-CXHnIBSV.mjs} +5 -5
  24. package/dist/{control-4kwMnHYO.mjs.map → control-CXHnIBSV.mjs.map} +1 -1
  25. package/dist/family.d.mts +5 -5
  26. package/dist/family.mjs +3 -3
  27. package/dist/family__control.d.mts +1 -1
  28. package/dist/family__control.mjs +2 -2
  29. package/dist/family__diff.mjs +1 -1
  30. package/dist/family__pack.d.mts +1 -1
  31. package/dist/family__pack.mjs +2 -2
  32. package/dist/family__psl-build.d.mts +2 -2
  33. package/dist/family__psl-build.mjs +1 -1
  34. package/dist/family__psl-infer.d.mts +1 -1
  35. package/dist/{interpreter-DlG-2o64-CDb20sM1.mjs → interpreter-BTM9k0wn-DPrWFd6h.mjs} +54 -26
  36. package/dist/interpreter-BTM9k0wn-DPrWFd6h.mjs.map +1 -0
  37. package/dist/{pack-D3L1b4Ag.d.mts → pack-g2rKoDhU.d.mts} +19 -18
  38. package/dist/pack-g2rKoDhU.d.mts.map +1 -0
  39. package/dist/{psl-build-C_n5uPZH.d.mts → psl-build-TrbDSGOA.d.mts} +2 -2
  40. package/dist/psl-build-TrbDSGOA.d.mts.map +1 -0
  41. package/dist/{psl-build-DTE03hcr.mjs → psl-build-vdqjrTx6.mjs} +7 -4
  42. package/dist/psl-build-vdqjrTx6.mjs.map +1 -0
  43. package/dist/{psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts → psl-column-resolution-Dm5LhN9b-Bz-Ax2iC.d.mts} +2 -2
  44. package/dist/psl-column-resolution-Dm5LhN9b-Bz-Ax2iC.d.mts.map +1 -0
  45. package/dist/{psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs → psl-field-resolution-CAJsUfST-BYuz5Nqh.mjs} +306 -284
  46. package/dist/psl-field-resolution-CAJsUfST-BYuz5Nqh.mjs.map +1 -0
  47. package/dist/{psl-infer-DsHE9xAU.d.mts → psl-infer-Dp_NzWE0.d.mts} +2 -2
  48. package/dist/{psl-infer-DsHE9xAU.d.mts.map → psl-infer-Dp_NzWE0.d.mts.map} +1 -1
  49. package/dist/{schema-verify-DIfHSB4I-k8l0LZZB.mjs → schema-verify-DIfHSB4I-CcxNNnKO.mjs} +2 -2
  50. package/dist/{schema-verify-DIfHSB4I-k8l0LZZB.mjs.map → schema-verify-DIfHSB4I-CcxNNnKO.mjs.map} +1 -1
  51. package/dist/{sql-expression-DE_MTt3T.d.mts → sql-expression-DWyTh9M1.d.mts} +10 -3
  52. package/dist/sql-expression-DWyTh9M1.d.mts.map +1 -0
  53. package/dist/{sql-expression-D7GsLgDM.mjs → sql-expression-Dek0jx_g.mjs} +17 -4
  54. package/dist/sql-expression-Dek0jx_g.mjs.map +1 -0
  55. package/dist/{type-map-3w0ieDAb-DiMpKEc2.d.mts → type-map-BMCZ_fb9-BTmWHQ-J.d.mts} +6 -3
  56. package/dist/type-map-BMCZ_fb9-BTmWHQ-J.d.mts.map +1 -0
  57. package/package.json +18 -18
  58. package/dist/contract-psl__attribute-specs.d.mts.map +0 -1
  59. package/dist/control-BK2oKZmT.d.mts.map +0 -1
  60. package/dist/interpreter-DlG-2o64-CDb20sM1.mjs.map +0 -1
  61. package/dist/pack-D3L1b4Ag.d.mts.map +0 -1
  62. package/dist/psl-build-C_n5uPZH.d.mts.map +0 -1
  63. package/dist/psl-build-DTE03hcr.mjs.map +0 -1
  64. package/dist/psl-column-resolution-CNtNJ7g7-DOrhyw4S.d.mts.map +0 -1
  65. package/dist/psl-field-resolution-BW0ZuqBd--WxiBxb0.mjs.map +0 -1
  66. package/dist/sql-expression-D7GsLgDM.mjs.map +0 -1
  67. package/dist/sql-expression-DE_MTt3T.d.mts.map +0 -1
  68. package/dist/type-map-3w0ieDAb-DiMpKEc2.d.mts.map +0 -1
@@ -0,0 +1,106 @@
1
+ import "./contract-builder-DWQhH8FQ.mjs";
2
+ import "./psl-column-resolution-Dm5LhN9b-Bz-Ax2iC.mjs";
3
+ import { PslSources } from "@prisma/orm-framework/psl-parser/syntax";
4
+ import "@prisma/orm-framework/components/control";
5
+ import { AttributeSpec, AttributeSpecContext, DescribeUnsupportedAttribute, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, ModelSymbol, ParsedWrittenList, ParsedWrittenScalar, PslSpan, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
6
+ import "@prisma/orm-framework/components/psl-ast";
7
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-V7142vJa.d.mts
8
+ //#region src/sql-attribute-specs.d.ts
9
+ interface EnumMemberDefault {
10
+ readonly kind: 'member';
11
+ readonly name: string;
12
+ }
13
+ /** A written `null`, as a nullable field's default or a list element, with its span. */
14
+ interface ParsedNullLiteral {
15
+ readonly kind: 'null';
16
+ readonly span: PslSpan;
17
+ }
18
+ /** An enum list default: its members and nulls. */
19
+ interface EnumMemberListDefault {
20
+ readonly kind: 'member-list';
21
+ readonly elements: readonly (EnumMemberDefault | ParsedNullLiteral)[];
22
+ }
23
+ /** A call to a registered default function, such as `uuid()`. Not the contract's `{ kind: 'function' }` storage default. */
24
+ interface DefaultFunctionCall {
25
+ readonly kind: 'default-function';
26
+ readonly call: TypedFuncCall;
27
+ }
28
+ type DefaultArgValue = ParsedWrittenScalar | ParsedNullLiteral | ParsedWrittenList<ParsedWrittenScalar | ParsedNullLiteral> | DefaultFunctionCall | EnumMemberDefault | EnumMemberListDefault;
29
+ declare function defaultFieldSpec(ctx: FieldAttributeSpecContext): AttributeSpec<{
30
+ value: DefaultArgValue;
31
+ }, FieldAttributeCtx>;
32
+ declare function indexModelSpec(ctx: AttributeSpecContext): AttributeSpec<{
33
+ fields?: string[];
34
+ readonly expression?: import("@prisma/orm-framework/psl-parser").ParsedTypedValue;
35
+ readonly where?: import("@prisma/orm-framework/psl-parser").ParsedTypedValue;
36
+ readonly unique?: boolean;
37
+ readonly name?: string;
38
+ readonly map?: string;
39
+ readonly type?: string;
40
+ readonly options?: Record<string, string>;
41
+ }, ModelAttributeCtx>;
42
+ declare function checkModelSpec(ctx: AttributeSpecContext): AttributeSpec<{
43
+ readonly expression: import("@prisma/orm-framework/psl-parser").ParsedTypedValue;
44
+ readonly name?: string;
45
+ readonly map?: string;
46
+ }, ModelAttributeCtx>;
47
+ /** Every entry is a factory over the spec context, whether or not its spec reads it. ADR 249. */
48
+ declare const sqlAttributeSpecs: {
49
+ readonly model: {
50
+ readonly map: (_ctx: AttributeSpecContext) => AttributeSpec<{
51
+ name: string;
52
+ }, ModelAttributeCtx>;
53
+ readonly id: (_ctx: AttributeSpecContext) => AttributeSpec<{
54
+ fields: string[];
55
+ readonly map?: string;
56
+ }, ModelAttributeCtx>;
57
+ readonly unique: (_ctx: AttributeSpecContext) => AttributeSpec<{
58
+ fields: string[];
59
+ readonly map?: string;
60
+ }, ModelAttributeCtx>;
61
+ readonly index: typeof indexModelSpec;
62
+ readonly check: typeof checkModelSpec;
63
+ readonly control: (_ctx: AttributeSpecContext) => AttributeSpec<{
64
+ policy: "managed" | "tolerated" | "external" | "observed";
65
+ }, ModelAttributeCtx>;
66
+ readonly discriminator: (_ctx: AttributeSpecContext) => AttributeSpec<{
67
+ field: string;
68
+ }, ModelAttributeCtx>;
69
+ readonly base: (_ctx: AttributeSpecContext) => AttributeSpec<{
70
+ base: import("@prisma/orm-framework/psl-parser").ResolvedEntityReference<ModelSymbol>;
71
+ value: string;
72
+ }, ModelAttributeCtx>;
73
+ };
74
+ readonly field: {
75
+ readonly map: (_ctx: FieldAttributeSpecContext) => AttributeSpec<{
76
+ name: string;
77
+ }, FieldAttributeCtx>;
78
+ readonly id: (_ctx: FieldAttributeSpecContext) => AttributeSpec<{
79
+ readonly map?: string;
80
+ }, FieldAttributeCtx>;
81
+ readonly unique: (_ctx: FieldAttributeSpecContext) => AttributeSpec<{
82
+ readonly map?: string;
83
+ }, FieldAttributeCtx>;
84
+ readonly noCheck: (_ctx: FieldAttributeSpecContext) => AttributeSpec<{
85
+ first?: "membership" | "elementNotNull";
86
+ second?: "membership" | "elementNotNull";
87
+ }, FieldAttributeCtx>;
88
+ readonly relation: (_ctx: FieldAttributeSpecContext) => AttributeSpec<{
89
+ name?: string;
90
+ readonly fields?: string[];
91
+ readonly references?: string[];
92
+ readonly map?: string;
93
+ readonly onDelete?: "NoAction" | "Restrict" | "Cascade" | "SetNull" | "SetDefault";
94
+ readonly onUpdate?: "NoAction" | "Restrict" | "Cascade" | "SetNull" | "SetDefault";
95
+ readonly index?: string | boolean;
96
+ }, FieldAttributeCtx>;
97
+ readonly default: typeof defaultFieldSpec;
98
+ };
99
+ };
100
+ //#endregion
101
+ //#region ../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts
102
+ //#region src/psl-field-resolution.d.ts
103
+ declare function describeUnsupportedSqlAttribute(sources: PslSources): DescribeUnsupportedAttribute;
104
+ //#endregion
105
+ export { ParsedNullLiteral as a, EnumMemberListDefault as i, DefaultFunctionCall as n, sqlAttributeSpecs as o, EnumMemberDefault as r, describeUnsupportedSqlAttribute as t };
106
+ //# sourceMappingURL=attribute-specs-15pm1Qvk.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute-specs-15pm1Qvk.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-DEtvdts6.mjs";
1
+ import { c as enumType } from "./contract-builder-BSipKPrc.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-CcpLSwei.mjs.map
266
+ //# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-hVVlzpLW.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-type-constructors-0Iv2zdwS-CcpLSwei.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;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,c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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
+ {"version":3,"file":"authoring-type-constructors-0Iv2zdwS-hVVlzpLW.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;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,cAAc,OAAO;EACxD,MAAM,QAAQ,IAAI,YAA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A,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"}
@@ -3,12 +3,12 @@ import { t as CODEC_INSTANCE_KIND } from "./types-DXrO0fxT.mjs";
3
3
  import { n as checkSqlDefaultText, o as reservedSqlDefaultText } from "./validators-CIfn8ezs.mjs";
4
4
  import { n as buildSqlContractFromDefinition, o as toOneNullabilityContradictionMessage, r as contractError } from "./derived-checks-CfXjGvNH-CrXoMrPU.mjs";
5
5
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
- import { assertNoCrossRegistryCollisions, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
6
+ import { assertNoCrossRegistryCollisions, canonicalizeTaggedLiteralBody, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
7
7
  import { blindCast } from "@prisma/orm-framework/utils/casts";
8
8
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
9
9
  import { isColumnDefault } from "@prisma/orm-framework/contract/types";
10
10
  import { assertSafeAuthoringHelperKey, bindEnumType, composePackAuthoringNamespace, createEntityHelpersFromNamespace, createFieldHelpersFromNamespace, enumType, isEnumTypeHandle, member, resolveToOneRelationNullable } from "@prisma/orm-framework/contract-authoring";
11
- import { canonicalizeTaggedLiteralBody, describeTaggedLiteralFailure, resolveTemplateTagEscapes } from "@prisma/orm-framework/components/control";
11
+ import { describeTaggedLiteralFailure, resolveTemplateTagEscapes } from "@prisma/orm-framework/components/control";
12
12
  //#region ../../../2-sql/2-authoring/contract-ts/dist/contract-builder.mjs
13
13
  function isNamedConstraintOptionsLike(value) {
14
14
  if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
@@ -1702,4 +1702,4 @@ function sql(strings, ...values) {
1702
1702
  //#endregion
1703
1703
  export { check as a, enumType as c, member as d, model as f, sql as h, 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 };
1704
1704
 
1705
- //# sourceMappingURL=contract-builder-DEtvdts6.mjs.map
1705
+ //# sourceMappingURL=contract-builder-BSipKPrc.mjs.map