@arkyn/server 1.4.45 → 1.4.47

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.
@@ -2,7 +2,8 @@ declare function badRequest(error: BadRequestError): Response;
2
2
  declare class BadRequestError {
3
3
  name: string;
4
4
  message: string;
5
- constructor(message: string);
5
+ cause?: any;
6
+ constructor(message: string, cause?: any);
6
7
  }
7
8
  export { badRequest, BadRequestError };
8
9
  //# sourceMappingURL=badRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/badRequest.ts"],"names":[],"mappings":"AAAA,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,YAczC;AAED,cAAM,eAAe;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/badRequest.ts"],"names":[],"mappings":"AAAA,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,YAczC;AAED,cAAM,eAAe;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
@@ -13,9 +13,11 @@ function badRequest(error) {
13
13
  class BadRequestError {
14
14
  name;
15
15
  message;
16
- constructor(message) {
16
+ cause;
17
+ constructor(message, cause) {
17
18
  this.name = "BadRequestError";
18
19
  this.message = message;
20
+ this.cause = cause;
19
21
  }
20
22
  }
21
23
  export { badRequest, BadRequestError };
@@ -2,7 +2,8 @@ declare function conflict(error: ConflictError): Response;
2
2
  declare class ConflictError {
3
3
  name: string;
4
4
  message: string;
5
- constructor(message: string);
5
+ cause?: any;
6
+ constructor(message: string, cause?: any);
6
7
  }
7
8
  export { conflict, ConflictError };
8
9
  //# sourceMappingURL=conflict.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/conflict.ts"],"names":[],"mappings":"AAAA,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,YAcrC;AAED,cAAM,aAAa;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/conflict.ts"],"names":[],"mappings":"AAAA,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,YAcrC;AAED,cAAM,aAAa;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
@@ -13,9 +13,11 @@ function conflict(error) {
13
13
  class ConflictError {
14
14
  name;
15
15
  message;
16
- constructor(message) {
16
+ cause;
17
+ constructor(message, cause) {
17
18
  this.name = "ConflictError";
18
19
  this.message = message;
20
+ this.cause = cause;
19
21
  }
20
22
  }
21
23
  export { conflict, ConflictError };
@@ -2,7 +2,8 @@ declare function forbidden(error: ForbiddenError): Response;
2
2
  declare class ForbiddenError {
3
3
  name: string;
4
4
  message: string;
5
- constructor(message: string);
5
+ cause?: any;
6
+ constructor(message: string, cause?: any);
6
7
  }
7
8
  export { forbidden, ForbiddenError };
8
9
  //# sourceMappingURL=forbidden.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forbidden.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/forbidden.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,YAcvC;AAED,cAAM,cAAc;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"forbidden.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/forbidden.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,YAcvC;AAED,cAAM,cAAc;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC"}
@@ -13,9 +13,11 @@ function forbidden(error) {
13
13
  class ForbiddenError {
14
14
  name;
15
15
  message;
16
- constructor(message) {
16
+ cause;
17
+ constructor(message, cause) {
17
18
  this.name = "ForbiddenError";
18
19
  this.message = message;
20
+ this.cause = cause;
19
21
  }
20
22
  }
21
23
  export { forbidden, ForbiddenError };
@@ -2,7 +2,8 @@ declare function notFound(error: NotFoundError): Response;
2
2
  declare class NotFoundError {
3
3
  name: string;
4
4
  message: string;
5
- constructor(message: string);
5
+ cause?: any;
6
+ constructor(message: string, cause?: any);
6
7
  }
7
8
  export { notFound, NotFoundError };
8
9
  //# sourceMappingURL=notFound.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notFound.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/notFound.ts"],"names":[],"mappings":"AAAA,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,YAcrC;AAED,cAAM,aAAa;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"notFound.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/notFound.ts"],"names":[],"mappings":"AAAA,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,YAcrC;AAED,cAAM,aAAa;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
@@ -13,9 +13,11 @@ function notFound(error) {
13
13
  class NotFoundError {
14
14
  name;
15
15
  message;
16
- constructor(message) {
16
+ cause;
17
+ constructor(message, cause) {
17
18
  this.name = "NotFoundError";
18
19
  this.message = message;
20
+ this.cause = cause;
19
21
  }
20
22
  }
21
23
  export { notFound, NotFoundError };
@@ -2,7 +2,7 @@ declare function serverError(error: ServerError): Response;
2
2
  declare class ServerError {
3
3
  name: string;
4
4
  message: string;
5
- cause: any;
5
+ cause?: any;
6
6
  constructor(message: string, cause?: any);
7
7
  }
8
8
  export { serverError, ServerError };
@@ -1 +1 @@
1
- {"version":3,"file":"serverError.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/serverError.ts"],"names":[],"mappings":"AAAA,iBAAS,WAAW,CAAC,KAAK,EAAE,WAAW,YActC;AAED,cAAM,WAAW;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,GAAG,CAAC;gBAEC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"serverError.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/serverError.ts"],"names":[],"mappings":"AAAA,iBAAS,WAAW,CAAC,KAAK,EAAE,WAAW,YActC;AAED,cAAM,WAAW;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
@@ -2,7 +2,8 @@ declare function unauthorized(error: UnauthorizedError): Response;
2
2
  declare class UnauthorizedError {
3
3
  name: string;
4
4
  message: string;
5
- constructor(message: string);
5
+ cause?: any;
6
+ constructor(message: string, cause?: any);
6
7
  }
7
8
  export { unauthorized, UnauthorizedError };
8
9
  //# sourceMappingURL=unauthorized.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/unauthorized.ts"],"names":[],"mappings":"AAAA,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,YAc7C;AAED,cAAM,iBAAiB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,OAAO,EAAE,MAAM;CAI5B;AAED,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../src/httpBadResponses/unauthorized.ts"],"names":[],"mappings":"AAAA,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,YAc7C;AAED,cAAM,iBAAiB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;gBAEA,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;CAKzC;AAED,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -13,9 +13,11 @@ function unauthorized(error) {
13
13
  class UnauthorizedError {
14
14
  name;
15
15
  message;
16
- constructor(message) {
16
+ cause;
17
+ constructor(message, cause) {
17
18
  this.name = "UnauthorizedError";
18
19
  this.message = message;
20
+ this.cause = cause;
19
21
  }
20
22
  }
21
23
  export { unauthorized, UnauthorizedError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "1.4.45",
3
+ "version": "1.4.47",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./src/index.ts",
6
6
  "type": "module",
@@ -17,10 +17,12 @@ function badRequest(error: BadRequestError) {
17
17
  class BadRequestError {
18
18
  name: string;
19
19
  message: string;
20
+ cause?: any;
20
21
 
21
- constructor(message: string) {
22
+ constructor(message: string, cause?: any) {
22
23
  this.name = "BadRequestError";
23
24
  this.message = message;
25
+ this.cause = cause;
24
26
  }
25
27
  }
26
28
 
@@ -17,10 +17,12 @@ function conflict(error: ConflictError) {
17
17
  class ConflictError {
18
18
  name: string;
19
19
  message: string;
20
+ cause?: any;
20
21
 
21
- constructor(message: string) {
22
+ constructor(message: string, cause?: any) {
22
23
  this.name = "ConflictError";
23
24
  this.message = message;
25
+ this.cause = cause;
24
26
  }
25
27
  }
26
28
 
@@ -17,10 +17,12 @@ function forbidden(error: ForbiddenError) {
17
17
  class ForbiddenError {
18
18
  name: string;
19
19
  message: string;
20
+ cause?: any;
20
21
 
21
- constructor(message: string) {
22
+ constructor(message: string, cause?: any) {
22
23
  this.name = "ForbiddenError";
23
24
  this.message = message;
25
+ this.cause = cause;
24
26
  }
25
27
  }
26
28
 
@@ -17,10 +17,12 @@ function notFound(error: NotFoundError) {
17
17
  class NotFoundError {
18
18
  name: string;
19
19
  message: string;
20
+ cause?: any;
20
21
 
21
- constructor(message: string) {
22
+ constructor(message: string, cause?: any) {
22
23
  this.name = "NotFoundError";
23
24
  this.message = message;
25
+ this.cause = cause;
24
26
  }
25
27
  }
26
28
 
@@ -17,7 +17,7 @@ function serverError(error: ServerError) {
17
17
  class ServerError {
18
18
  name: string;
19
19
  message: string;
20
- cause: any;
20
+ cause?: any;
21
21
 
22
22
  constructor(message: string, cause?: any) {
23
23
  this.name = "ServerError";
@@ -17,10 +17,12 @@ function unauthorized(error: UnauthorizedError) {
17
17
  class UnauthorizedError {
18
18
  name: string;
19
19
  message: string;
20
+ cause?: any;
20
21
 
21
- constructor(message: string) {
22
+ constructor(message: string, cause?: any) {
22
23
  this.name = "UnauthorizedError";
23
24
  this.message = message;
25
+ this.cause = cause;
24
26
  }
25
27
  }
26
28