prisma-guard 1.25.0 → 1.26.0

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.
@@ -1551,6 +1551,18 @@ function createWhereBuilder(typeMap, enumMap, scalarBase, uniqueMap = {}) {
1551
1551
  scalarConditions
1552
1552
  );
1553
1553
  }
1554
+ for (const key of Object.keys(scalarConditions)) {
1555
+ if (COMBINATOR_KEYS.has(key))
1556
+ continue;
1557
+ if (!(key in fieldSchemas)) {
1558
+ fieldSchemas[key] = z4.object({}).strict().optional();
1559
+ }
1560
+ }
1561
+ for (const key of Object.keys(relationForced)) {
1562
+ if (!(key in fieldSchemas)) {
1563
+ fieldSchemas[key] = z4.object({}).strict().optional();
1564
+ }
1565
+ }
1554
1566
  const schema = Object.keys(fieldSchemas).length > 0 ? z4.object(fieldSchemas).strict().optional() : null;
1555
1567
  const forcedOnlyKeys = /* @__PURE__ */ new Set();
1556
1568
  for (const key of Object.keys(whereConfig)) {
@@ -1960,7 +1972,12 @@ function createWhereBuilder(typeMap, enumMap, scalarBase, uniqueMap = {}) {
1960
1972
  fieldSchemas[key] = directSchema;
1961
1973
  continue;
1962
1974
  }
1963
- forcedConditions[key] = parseForcedUniqueValue(model, key, fieldMeta, value);
1975
+ forcedConditions[key] = parseForcedUniqueValue(
1976
+ model,
1977
+ key,
1978
+ fieldMeta,
1979
+ value
1980
+ );
1964
1981
  forcedOnlyKeys.add(key);
1965
1982
  }
1966
1983
  return {