rads-db 3.0.40 → 3.0.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/index.cjs CHANGED
@@ -109,8 +109,9 @@ function getFieldZodSchemaBase(zodSchemas, schema, field, shouldBeLazy) {
109
109
  }
110
110
  class ValidationError extends Error {
111
111
  constructor(error) {
112
- super(error.errors[0].message);
113
- this.message = error.errors[0].message;
112
+ const firstError = error.errors[0];
113
+ const msg = `${firstError.message} (${firstError.path.join(".")})`;
114
+ super(msg);
114
115
  this.issues = error.errors;
115
116
  }
116
117
  }
package/dist/index.d.ts CHANGED
@@ -84,6 +84,7 @@ interface EntityMethods<E, EN extends keyof EntityMeta, W> {
84
84
  put(data: PutArgs<E>, ctx?: RadsRequestContext): MaybePromise$1<GetResponseNoInclude<E, EN>>;
85
85
  putMany(data: PutArgs<E>[], ctx?: RadsRequestContext): MaybePromise$1<GetResponseNoInclude<E, EN>[]>;
86
86
  verifyMany<A extends VerifyManyArgs<E, EN, W>>(args?: A, ctx?: RadsRequestContext): MaybePromise$1<VerifyManyResponse>;
87
+ verifyAll<A extends VerifyManyArgs<E, EN, W>>(args?: A, ctx?: RadsRequestContext): MaybePromise$1<Pick<VerifyManyResponse, 'correctCount' | 'incorrectCount'>>;
87
88
  }
88
89
 
89
90
  type MaybePromise<T> = Promise<T> | T;
package/dist/index.mjs CHANGED
@@ -101,8 +101,9 @@ function getFieldZodSchemaBase(zodSchemas, schema, field, shouldBeLazy) {
101
101
  }
102
102
  class ValidationError extends Error {
103
103
  constructor(error) {
104
- super(error.errors[0].message);
105
- this.message = error.errors[0].message;
104
+ const firstError = error.errors[0];
105
+ const msg = `${firstError.message} (${firstError.path.join(".")})`;
106
+ super(msg);
106
107
  this.issues = error.errors;
107
108
  }
108
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rads-db",
3
- "version": "3.0.40",
3
+ "version": "3.0.42",
4
4
  "files": [
5
5
  "dist",
6
6
  "drivers",