@zenstackhq/orm 3.1.0 → 3.1.1

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/index.cjs CHANGED
@@ -4518,8 +4518,11 @@ var InputValidator = class {
4518
4518
  fieldSchema
4519
4519
  ];
4520
4520
  })));
4521
- const finalSchema = import_zod3.z.custom((v) => {
4522
- return schema.safeParse(v).success;
4521
+ const finalSchema = import_zod3.z.any().superRefine((value, ctx) => {
4522
+ const parseResult = schema.safeParse(value);
4523
+ if (!parseResult.success) {
4524
+ parseResult.error.issues.forEach((issue) => ctx.addIssue(issue));
4525
+ }
4523
4526
  });
4524
4527
  this.setSchemaCache(key, finalSchema);
4525
4528
  return finalSchema;
@@ -4597,7 +4600,9 @@ var InputValidator = class {
4597
4600
  }
4598
4601
  }
4599
4602
  }
4600
- fields["$expr"] = import_zod3.z.custom((v) => typeof v === "function").optional();
4603
+ fields["$expr"] = import_zod3.z.custom((v) => typeof v === "function", {
4604
+ error: '"$expr" must be a function'
4605
+ }).optional();
4601
4606
  fields["AND"] = this.orArray(import_zod3.z.lazy(() => this.makeWhereSchema(model, false, withoutRelationFields)), true).optional();
4602
4607
  fields["OR"] = import_zod3.z.lazy(() => this.makeWhereSchema(model, false, withoutRelationFields)).array().optional();
4603
4608
  fields["NOT"] = this.orArray(import_zod3.z.lazy(() => this.makeWhereSchema(model, false, withoutRelationFields)), true).optional();