@prisma/orm-family-sql 8.0.0-rc.17-dev.13 → 8.0.0-rc.17-dev.15

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-CAJsUfST-D_vMRVX2.mjs";
8
- import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-BTM9k0wn-o9kEz-St.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";
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";
@@ -17,7 +17,7 @@ import { readFile, readdir, stat } from "node:fs/promises";
17
17
  import { ArrayLiteralAst, BooleanLiteralExprAst, FunctionCallAst, IdentifierAst, ModelAttributeAst, NumberLiteralExprAst, PathExprAst, StringLiteralExprAst, dottedPathsIn, parse, printSyntax } from "@prisma/orm-framework/psl-parser/syntax";
18
18
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
19
19
  import { basename, dirname, extname, join, normalize } from "pathe";
20
- import { buildSymbolTable, createPslDiagnosticCollector, diagnosticSource, keywordPslSpan, nodePslSpan, readResolvedAttribute, readResolvedAttributes } from "@prisma/orm-framework/psl-parser";
20
+ import { buildSymbolTable, createPslDiagnosticCollector, diagnosticSource, keywordPslSpan, nodePslSpan, readResolvedAttribute } from "@prisma/orm-framework/psl-parser";
21
21
  import { fkRelationPairKey } from "@prisma/orm-framework/psl-parser/interpret";
22
22
  //#region ../../../2-sql/2-authoring/contract-prisma7/dist/provider.mjs
23
23
  function prisma7Diagnostic(code, message, sourceId, span) {
@@ -981,7 +981,7 @@ function stringArgument(attribute) {
981
981
  return StringLiteralExprAst.cast(expression.syntax)?.value();
982
982
  }
983
983
  function blockEntry(source, key) {
984
- for (const entry of source.block.node.entries()) if (entry.key()?.name() === key) return entry;
984
+ for (const entry of source.block.entries) if (entry.key()?.name() === key) return entry;
985
985
  }
986
986
  function scalarValue(source, key) {
987
987
  const value = blockEntry(source, key)?.value();
@@ -994,7 +994,7 @@ function parameterSpan(source, key) {
994
994
  }
995
995
  /** Prisma 7 accepts no dotted path in a datasource or generator block, though the parser reads one as a value. */
996
996
  function reportDottedBlockValues(block, sourceId, sources, diagnostics) {
997
- for (const entry of block.node.entries()) {
997
+ for (const entry of block.entries) {
998
998
  const value = entry.value();
999
999
  if (value === void 0) continue;
1000
1000
  for (const path of dottedPathsIn(value)) diagnostics.push({
@@ -1007,7 +1007,7 @@ function reportDottedBlockValues(block, sourceId, sources, diagnostics) {
1007
1007
  }
1008
1008
  function reportDuplicateBlockEntries(source, diagnostics) {
1009
1009
  const seen = /* @__PURE__ */ new Set();
1010
- for (const entry of source.block.node.entries()) {
1010
+ for (const entry of source.block.entries) {
1011
1011
  const key = entry.key()?.name();
1012
1012
  if (key === void 0) continue;
1013
1013
  if (seen.has(key)) {
@@ -1392,7 +1392,7 @@ function readEnumDeclaration(source, defaultNamespaceId, diagnostics) {
1392
1392
  const { block, sourceId, sources } = source;
1393
1393
  let typeName = block.name;
1394
1394
  let namespaceId = defaultNamespaceId;
1395
- for (const attribute of readResolvedAttributes(block.node.attributes(), sources)) switch (attribute.name) {
1395
+ for (const attribute of block.attributes) switch (attribute.name) {
1396
1396
  case "map":
1397
1397
  typeName = requireStringArgument(attribute, block.name, sourceId, diagnostics) ?? typeName;
1398
1398
  break;
@@ -1403,7 +1403,7 @@ function readEnumDeclaration(source, defaultNamespaceId, diagnostics) {
1403
1403
  }
1404
1404
  const members = [];
1405
1405
  const seenMemberNames = /* @__PURE__ */ new Set();
1406
- for (const entry of block.node.entries()) {
1406
+ for (const entry of block.entries) {
1407
1407
  const name = entry.key()?.name();
1408
1408
  if (name === void 0) continue;
1409
1409
  if (seenMemberNames.has(name)) {