@taladel/common 1.0.12 → 1.0.13

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.
@@ -1,3 +1,4 @@
1
1
  import { Request, Response, NextFunction } from "express";
2
- export declare const errorHandler: (err: Error, _req: Request, res: Response, _next: NextFunction) => void;
2
+ declare const errorHandler: (err: Error, _req: Request, res: Response, _next: NextFunction) => void;
3
+ export { errorHandler };
3
4
  //# sourceMappingURL=error-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGzD,eAAO,MAAM,YAAY,GACrB,KAAK,KAAK,EACV,MAAM,OAAO,EACb,KAAK,QAAQ,EACb,OAAO,YAAY,KACpB,IAQF,CAAC"}
1
+ {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGzD,QAAA,MAAM,YAAY,GACd,KAAK,KAAK,EACV,MAAM,OAAO,EACb,KAAK,QAAQ,EACb,OAAO,YAAY,KACpB,IAQF,CAAC;AACF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":";;;AACA,yDAAqD;AAE9C,MAAM,YAAY,GAAG,CACxB,GAAU,EACV,IAAa,EACb,GAAa,EACb,KAAmB,EACf,EAAE;IAEN,IAAG,GAAG,YAAY,0BAAW,EAAC,CAAC;QAC3B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,uBAAuB,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB"}
1
+ {"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middlewares/error-handler.ts"],"names":[],"mappings":";;;AACA,yDAAqD;AAErD,MAAM,YAAY,GAAG,CACjB,GAAU,EACV,IAAa,EACb,GAAa,EACb,KAAmB,EACf,EAAE;IAEN,IAAG,GAAG,YAAY,0BAAW,EAAC,CAAC;QAC3B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,uBAAuB,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC;AACO,oCAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taladel/common",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "common utilities for microservices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import {Request, Response, NextFunction } from "express";
2
2
  import { CustomError } from "../errors/custom-error";
3
3
 
4
- export const errorHandler = (
4
+ const errorHandler = (
5
5
  err: Error,
6
6
  _req: Request,
7
7
  res: Response,
@@ -15,3 +15,4 @@ export const errorHandler = (
15
15
  console.error(err.stack);
16
16
  res.status(500).json({ message: err.message || 'Internal Server Error' });
17
17
  };
18
+ export { errorHandler };