@zenstackhq/runtime 0.6.0-pre.15 → 0.6.0-pre.16

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/error.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export declare function isPrismaClientKnownRequestError(err: any): err is {
2
+ code: string;
3
+ message: string;
4
+ };
5
+ export declare function isPrismaClientUnknownRequestError(err: any): err is {
6
+ message: string;
7
+ };
8
+ export declare function isPrismaClientValidationError(err: any): err is {
9
+ message: string;
10
+ };
package/error.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPrismaClientValidationError = exports.isPrismaClientUnknownRequestError = exports.isPrismaClientKnownRequestError = void 0;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ function isPrismaClientKnownRequestError(err) {
6
+ return err.__proto__.constructor.name === 'PrismaClientKnownRequestError';
7
+ }
8
+ exports.isPrismaClientKnownRequestError = isPrismaClientKnownRequestError;
9
+ function isPrismaClientUnknownRequestError(err) {
10
+ return err.__proto__.constructor.name === 'PrismaClientUnknownRequestError';
11
+ }
12
+ exports.isPrismaClientUnknownRequestError = isPrismaClientUnknownRequestError;
13
+ function isPrismaClientValidationError(err) {
14
+ return err.__proto__.constructor.name === 'PrismaClientValidationError';
15
+ }
16
+ exports.isPrismaClientValidationError = isPrismaClientValidationError;
17
+ //# sourceMappingURL=error.js.map
package/error.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,SAAgB,+BAA+B,CAAC,GAAQ;IACpD,OAAO,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,KAAK,+BAA+B,CAAC;AAC9E,CAAC;AAFD,0EAEC;AAED,SAAgB,iCAAiC,CAAC,GAAQ;IACtD,OAAO,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,KAAK,iCAAiC,CAAC;AAChF,CAAC;AAFD,8EAEC;AAED,SAAgB,6BAA6B,CAAC,GAAQ;IAClD,OAAO,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,KAAK,6BAA6B,CAAC;AAC5E,CAAC;AAFD,sEAEC"}
package/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './enhancements';
2
2
  export * from './enhancements/policy';
3
3
  export * from './types';
4
4
  export * from './validation';
5
+ export * from './error';
package/index.js CHANGED
@@ -18,4 +18,5 @@ __exportStar(require("./enhancements"), exports);
18
18
  __exportStar(require("./enhancements/policy"), exports);
19
19
  __exportStar(require("./types"), exports);
20
20
  __exportStar(require("./validation"), exports);
21
+ __exportStar(require("./error"), exports);
21
22
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wDAAsC;AACtC,0CAAwB;AACxB,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wDAAsC;AACtC,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zenstackhq/runtime",
3
3
  "displayName": "ZenStack Runtime Library",
4
- "version": "0.6.0-pre.15",
4
+ "version": "0.6.0-pre.16",
5
5
  "description": "Runtime of ZenStack for both client-side and server-side environments.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,13 +24,13 @@
24
24
  "tslib": "^2.4.1",
25
25
  "zod": "^3.19.1",
26
26
  "zod-validation-error": "^0.2.1",
27
- "@zenstackhq/sdk": "0.6.0-pre.15"
27
+ "@zenstackhq/sdk": "0.6.0-pre.16"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "next": "^12.3.1 || ^13",
31
31
  "react": "^17.0.2 || ^18",
32
32
  "react-dom": "^17.0.2 || ^18",
33
- "@prisma/client": "^4.7.1"
33
+ "@prisma/client": "^4.0.0"
34
34
  },
35
35
  "author": {
36
36
  "name": "ZenStack Team"