@prisma/orm-family-sql 8.0.0-rc.17-dev.41 → 8.0.0-rc.17-dev.42
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/contract-prisma7__provider.mjs +14 -12
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.mjs +3 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/{control-Bs-0JljW.d.mts → control-CkV_zSCA.d.mts} +2 -2
- package/dist/{control-Bs-0JljW.d.mts.map → control-CkV_zSCA.d.mts.map} +1 -1
- package/dist/family.d.mts +1 -1
- package/dist/family__control.d.mts +1 -1
- package/dist/{interpreter-0z4AxG0I-CM9DULu1.mjs → interpreter-BbopSq2f-y_JBQJFT.mjs} +77 -150
- package/dist/interpreter-BbopSq2f-y_JBQJFT.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/interpreter-0z4AxG0I-CM9DULu1.mjs.map +0 -1
|
@@ -5,7 +5,7 @@ import { p as validateSqlStorageConsistency, u as validateModelStorageReferences
|
|
|
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-CYz041Ol-TjL7rPxe.mjs";
|
|
7
7
|
import { d as instantiateFieldTypeConstructor, y as readDataTypeDefault } from "./psl-field-resolution-D4jnVVTd-B396sZmO.mjs";
|
|
8
|
-
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-
|
|
8
|
+
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-BbopSq2f-y_JBQJFT.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";
|
|
@@ -1067,7 +1067,7 @@ function reportDuplicateBlockEntries(source, diagnostics) {
|
|
|
1067
1067
|
function interpretPrisma7Documents(input) {
|
|
1068
1068
|
const { binding } = input;
|
|
1069
1069
|
const diagnostics = [...input.seedDiagnostics];
|
|
1070
|
-
const defaultNamespaceId =
|
|
1070
|
+
const { defaultNamespaceId } = input;
|
|
1071
1071
|
const datasources = [];
|
|
1072
1072
|
const enumBlocks = [];
|
|
1073
1073
|
const models = [];
|
|
@@ -1089,7 +1089,8 @@ function interpretPrisma7Documents(input) {
|
|
|
1089
1089
|
for (const { document, sources, sourceFile, sourceId } of input.documents) {
|
|
1090
1090
|
const { symbolTable, diagnostics: tableDiagnostics } = buildSymbolTable({
|
|
1091
1091
|
documents: [document],
|
|
1092
|
-
sources
|
|
1092
|
+
sources,
|
|
1093
|
+
defaultNamespaceId
|
|
1093
1094
|
});
|
|
1094
1095
|
for (const diagnostic of tableDiagnostics) diagnostics.push({
|
|
1095
1096
|
code: diagnostic.code,
|
|
@@ -1113,7 +1114,7 @@ function interpretPrisma7Documents(input) {
|
|
|
1113
1114
|
span: nodePslSpan(inclusion.syntax, sources)
|
|
1114
1115
|
});
|
|
1115
1116
|
};
|
|
1116
|
-
for (const block of Object.values(symbolTable.
|
|
1117
|
+
for (const block of Object.values(symbolTable.defaultNamespace.blocks)) switch (block.keyword) {
|
|
1117
1118
|
case "datasource":
|
|
1118
1119
|
datasources.push({
|
|
1119
1120
|
block,
|
|
@@ -1139,13 +1140,13 @@ function interpretPrisma7Documents(input) {
|
|
|
1139
1140
|
break;
|
|
1140
1141
|
default: unsupported(block.keyword, keywordPslSpan(block.node.syntax, block.keyword, sources));
|
|
1141
1142
|
}
|
|
1142
|
-
for (const namespace of Object.values(symbolTable.
|
|
1143
|
-
for (const compositeType of Object.values(symbolTable.
|
|
1144
|
-
for (const namedType of Object.values(symbolTable.
|
|
1145
|
-
for (const mixin of Object.values(symbolTable.
|
|
1146
|
-
unsupportedInclusions("PSL_INVALID_MODEL_MEMBER", symbolTable.
|
|
1147
|
-
unsupportedInclusions("PSL_INVALID_EXTENSION_BLOCK_MEMBER", symbolTable.
|
|
1148
|
-
for (const symbol of Object.values(symbolTable.
|
|
1143
|
+
for (const namespace of Object.values(symbolTable.namespaces)) for (const { span } of namespace.declarations) unsupported("namespace", span);
|
|
1144
|
+
for (const compositeType of Object.values(symbolTable.defaultNamespace.compositeTypes)) unsupported("type", compositeType.span);
|
|
1145
|
+
for (const namedType of Object.values(symbolTable.namedTypes)) unsupported("types", namedType.span);
|
|
1146
|
+
for (const mixin of Object.values(symbolTable.defaultNamespace.mixins)) unsupported(`${mixin.keyword} mixin`, mixin.span);
|
|
1147
|
+
unsupportedInclusions("PSL_INVALID_MODEL_MEMBER", symbolTable.defaultNamespace.models);
|
|
1148
|
+
unsupportedInclusions("PSL_INVALID_EXTENSION_BLOCK_MEMBER", symbolTable.defaultNamespace.blocks);
|
|
1149
|
+
for (const symbol of Object.values(symbolTable.defaultNamespace.models)) {
|
|
1149
1150
|
if (!claimName("model", symbol.name, sourceId, symbol.span)) continue;
|
|
1150
1151
|
models.push(readModelDeclaration(symbol, sourceId, sources, defaultNamespaceId, binding, diagnostics));
|
|
1151
1152
|
}
|
|
@@ -1879,7 +1880,8 @@ function prisma7Contract(schemaPath, options) {
|
|
|
1879
1880
|
authoringContributions: context.authoringContributions,
|
|
1880
1881
|
codecLookup: context.codecLookup,
|
|
1881
1882
|
dataTypes: context.dataTypes,
|
|
1882
|
-
composedExtensions: context.composedExtensions
|
|
1883
|
+
composedExtensions: context.composedExtensions,
|
|
1884
|
+
defaultNamespaceId: context.defaultNamespaceId
|
|
1883
1885
|
});
|
|
1884
1886
|
if (!interpreted.ok) return interpreted;
|
|
1885
1887
|
contract = applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.binding.createNamespace);
|