@prisma/orm-family-sql 8.0.0-rc.17-dev.29 → 8.0.0-rc.17-dev.31

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.
@@ -4,8 +4,8 @@ import { n as declaredBackingObjectName, r as declaredIndexesServeForeignKey } f
4
4
  import { p as validateSqlStorageConsistency, u as validateModelStorageReferences } from "./validators-B9prRmOP.mjs";
5
5
  import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
6
6
  import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-DSMOrZN--C03ao8_m.mjs";
7
- import { d as instantiateFieldTypeConstructor, y as readDataTypeDefault } from "./psl-field-resolution-D2bsZV-3-BDdrceuQ.mjs";
8
- import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-C5YVAt4b-jHakayS-.mjs";
7
+ import { d as instantiateFieldTypeConstructor, y as readDataTypeDefault } from "./psl-field-resolution-D4jnVVTd-CsmY9mnF.mjs";
8
+ import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-DJQBAjo4-DEwoC6An.mjs";
9
9
  import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
10
10
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
11
11
  import { entryForTag, getAuthoringTypeConstructor, instantiateAuthoringEntityType } from "@prisma/orm-framework/components/authoring";
@@ -1105,6 +1105,14 @@ function interpretPrisma7Documents(input) {
1105
1105
  span
1106
1106
  });
1107
1107
  };
1108
+ const unsupportedInclusions = (code, holders) => {
1109
+ for (const holder of Object.values(holders)) for (const inclusion of holder.node.inclusions()) diagnostics.push({
1110
+ code,
1111
+ message: `Unsupported mixin inclusion "${printSyntax(inclusion.syntax).trim()}"`,
1112
+ sourceId,
1113
+ span: nodePslSpan(inclusion.syntax, sources)
1114
+ });
1115
+ };
1108
1116
  for (const block of Object.values(symbolTable.topLevel.blocks)) switch (block.keyword) {
1109
1117
  case "datasource":
1110
1118
  datasources.push({
@@ -1134,6 +1142,9 @@ function interpretPrisma7Documents(input) {
1134
1142
  for (const namespace of Object.values(symbolTable.topLevel.namespaces)) for (const { span } of namespace.declarations) unsupported("namespace", span);
1135
1143
  for (const compositeType of Object.values(symbolTable.topLevel.compositeTypes)) unsupported("type", compositeType.span);
1136
1144
  for (const namedType of Object.values(symbolTable.topLevel.namedTypes)) unsupported("types", namedType.span);
1145
+ for (const mixin of Object.values(symbolTable.topLevel.mixins)) unsupported(`${mixin.keyword} mixin`, mixin.span);
1146
+ unsupportedInclusions("PSL_INVALID_MODEL_MEMBER", symbolTable.topLevel.models);
1147
+ unsupportedInclusions("PSL_INVALID_EXTENSION_BLOCK_MEMBER", symbolTable.topLevel.blocks);
1137
1148
  for (const symbol of Object.values(symbolTable.topLevel.models)) {
1138
1149
  if (!claimName("model", symbol.name, sourceId, symbol.span)) continue;
1139
1150
  models.push(readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics));