@prisma/orm-family-sql 8.0.0-rc.22-dev.13 → 8.0.0-rc.22-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.
- package/dist/{attribute-specs-67xYCptU.d.mts → attribute-specs-DL1btx0j.d.mts} +4 -4
- package/dist/{attribute-specs-67xYCptU.d.mts.map → attribute-specs-DL1btx0j.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CgKIgWq5-DrdNt_VL.d.mts → authoring-entity-types-CgKIgWq5-BqNs-56x.d.mts} +2 -2
- package/dist/{authoring-entity-types-CgKIgWq5-DrdNt_VL.d.mts.map → authoring-entity-types-CgKIgWq5-BqNs-56x.d.mts.map} +1 -1
- package/dist/{contract-builder-1Ml9yJ0j.d.mts → contract-builder-BfPC4mQK.d.mts} +7 -3
- package/dist/{contract-builder-1Ml9yJ0j.d.mts.map → contract-builder-BfPC4mQK.d.mts.map} +1 -1
- package/dist/{contract-builder-BX4vfJCt.mjs → contract-builder-m9XW9MgR.mjs} +4 -2
- package/dist/{contract-builder-BX4vfJCt.mjs.map → contract-builder-m9XW9MgR.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +7 -19
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__provider.mjs +1 -1
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +2 -2
- package/dist/contract-ts.mjs +2 -2
- package/dist/contract-ts__contract-builder.d.mts +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +1 -1
- package/dist/contract__entity-handle-lowering-hook.d.mts +1 -1
- package/dist/{control-9kQv_V31.mjs → control-DcEzEBvW.mjs} +45 -3
- package/dist/control-DcEzEBvW.mjs.map +1 -0
- package/dist/{control-CaWlb92W.d.mts → control-DpKSNUXr.d.mts} +3 -3
- package/dist/{control-CaWlb92W.d.mts.map → control-DpKSNUXr.d.mts.map} +1 -1
- package/dist/{entity-handle-lowering-hook-Bmgnj7Dk.d.mts → entity-handle-lowering-hook-BzQxbmYy.d.mts} +2 -2
- package/dist/{entity-handle-lowering-hook-Bmgnj7Dk.d.mts.map → entity-handle-lowering-hook-BzQxbmYy.d.mts.map} +1 -1
- package/dist/family.d.mts +2 -2
- package/dist/family.mjs +2 -2
- package/dist/family__control.d.mts +1 -1
- package/dist/family__control.mjs +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +1 -1
- package/dist/{generator-functions-Hy4pDDr9-N4PMe9ob.mjs → generator-functions-Hy4pDDr9-DkN0qbPW.mjs} +2 -2
- package/dist/{generator-functions-Hy4pDDr9-N4PMe9ob.mjs.map → generator-functions-Hy4pDDr9-DkN0qbPW.mjs.map} +1 -1
- package/dist/{interpreter-Cpal-yJC-mQRY-mo3.mjs → interpreter-CVd521dx-B3prmAMy.mjs} +24 -7
- package/dist/interpreter-CVd521dx-B3prmAMy.mjs.map +1 -0
- package/dist/{pack-Cnw2IEkm.d.mts → pack-7m3efDkY.d.mts} +3 -3
- package/dist/{pack-Cnw2IEkm.d.mts.map → pack-7m3efDkY.d.mts.map} +1 -1
- package/dist/{psl-column-resolution-Bv_-TDHZ-CLGqCPXA.d.mts → psl-column-resolution-Bv_-TDHZ-Cuu5X_9o.d.mts} +2 -2
- package/dist/{psl-column-resolution-Bv_-TDHZ-CLGqCPXA.d.mts.map → psl-column-resolution-Bv_-TDHZ-Cuu5X_9o.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/control-9kQv_V31.mjs.map +0 -1
- package/dist/interpreter-Cpal-yJC-mQRY-mo3.mjs.map +0 -1
|
@@ -5,9 +5,9 @@ import { h as storedSqlText } from "./sql-expression-CKgKznXS.mjs";
|
|
|
5
5
|
import { p as validateSqlStorageConsistency, u as validateModelStorageReferences } from "./validators-qcQteqs2.mjs";
|
|
6
6
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-HVaxhALD.mjs";
|
|
7
7
|
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-zjkmqsa_-D7VKKK_q.mjs";
|
|
8
|
-
import { o as composedExtensionPackRefs } from "./contract-builder-
|
|
8
|
+
import { o as composedExtensionPackRefs } from "./contract-builder-m9XW9MgR.mjs";
|
|
9
9
|
import { c as instantiateFieldTypeConstructor, i as defaultFunctionCall, v as readDataTypeDefault } from "./psl-field-resolution-GN4iup8d-CcMRk9It.mjs";
|
|
10
|
-
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-
|
|
10
|
+
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-CVd521dx-B3prmAMy.mjs";
|
|
11
11
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
12
12
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
13
13
|
import { entryForTag, getAuthoringTypeChoice, getAuthoringTypeConstructor, instantiateAuthoringEntityType, instantiateAuthoringTypeConstructorFromValues, resolveAuthoringTypeChoice } from "@prisma/orm-framework/components/authoring";
|
|
@@ -564,17 +564,8 @@ function readDatasourceExtensions(input) {
|
|
|
564
564
|
invalid(`extensions lists ${text(element)}, which is not an extension name`, span);
|
|
565
565
|
continue;
|
|
566
566
|
}
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
const declaring = input.declaringPack(name);
|
|
570
|
-
if (declaring !== void 0) {
|
|
571
|
-
if (declaring.namespaceId !== namespaceId) {
|
|
572
|
-
const packNamespace = declaring.namespaceId;
|
|
573
|
-
const edit = schema === void 0 ? `write ${name}(schema: "${packNamespace}")` : packNamespace === input.defaultNamespaceId ? `remove schema: "${schema}"` : `write schema: "${packNamespace}"`;
|
|
574
|
-
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_EXTENSION_SCHEMA_MISMATCH", `Extension "${name}": the "${declaring.packId}" extension pack declares it in schema "${packNamespace}", so Prisma 8 expects it there, but this entry puts it in schema "${namespaceId}". Moving it is a database change the pack does not make: move it with ALTER EXTENSION "${name}" SET SCHEMA "${packNamespace}", then ${edit}.`, sourceId, span));
|
|
575
|
-
}
|
|
576
|
-
continue;
|
|
577
|
-
}
|
|
567
|
+
const namespaceId = readArguments(name, call, input) ?? input.defaultNamespaceId;
|
|
568
|
+
if (input.declaredByPack(name)) continue;
|
|
578
569
|
const pack = Object.hasOwn(binding.packs, name) ? binding.packs[name] : void 0;
|
|
579
570
|
if (pack !== void 0 && !input.composedExtensions.has(pack.id)) {
|
|
580
571
|
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_EXTENSION_PACK_MISSING", `Extension "${name}" is declared by the "${pack.id}" extension pack, which is not available. ${composePackAdvice(pack)}`, sourceId, span));
|
|
@@ -1409,7 +1400,7 @@ function interpretPrisma7Documents(input) {
|
|
|
1409
1400
|
generators,
|
|
1410
1401
|
binding: binding.extensions,
|
|
1411
1402
|
composedExtensions: new Set(input.composedExtensions),
|
|
1412
|
-
|
|
1403
|
+
declaredByPack: (extensionName) => packDeclares(input.composedExtensionContracts, binding.extensions.entityKind, extensionName),
|
|
1413
1404
|
defaultNamespaceId,
|
|
1414
1405
|
diagnostics
|
|
1415
1406
|
}), namespaceEntities, input, diagnostics);
|
|
@@ -1759,11 +1750,8 @@ function readEnumDeclaration(source, defaultNamespaceId, diagnostics) {
|
|
|
1759
1750
|
sourceId
|
|
1760
1751
|
};
|
|
1761
1752
|
}
|
|
1762
|
-
function
|
|
1763
|
-
|
|
1764
|
-
packId,
|
|
1765
|
-
namespaceId
|
|
1766
|
-
};
|
|
1753
|
+
function packDeclares(packContracts, entityKind, name) {
|
|
1754
|
+
return [...packContracts.values()].some((contract) => Object.values(contract.storage.namespaces).some((namespace) => Object.hasOwn(namespace.entries[entityKind] ?? {}, name)));
|
|
1767
1755
|
}
|
|
1768
1756
|
function entityContext(input, sourceId, diagnostics) {
|
|
1769
1757
|
return {
|