@dj_ticketing/common 1.0.3 → 1.0.4
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/build/middlewares/current-user.d.ts +2 -2
- package/build/middlewares/current-user.d.ts.map +1 -1
- package/build/middlewares/current-user.js.map +1 -1
- package/build/middlewares/error-handler.js +0 -1
- package/build/middlewares/error-handler.js.map +1 -1
- package/build/middlewares/require-auth.d.ts +0 -12
- package/build/middlewares/require-auth.d.ts.map +1 -1
- package/build/middlewares/require-auth.js.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-user.d.ts","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D,UAAU,WAAW;IACjB,EAAE,
|
|
1
|
+
{"version":3,"file":"current-user.d.ts","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,WAAW,CAAC,EAAE,WAAW,CAAA;SAC5B;KACJ;CACJ;AAED,eAAO,MAAM,WAAW,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,SAgBrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-user.js","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":";;;;;;AACA,gEAA+B;AAexB,MAAM,WAAW,GAAG,CACvB,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;;IACA,IAAI,CAAC,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,CAAA,EAAE,CAAC;QACpB,OAAO,IAAI,EAAE,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CACtB,GAAG,CAAC,OAAO,CAAC,GAAG,EACf,OAAO,CAAC,GAAG,CAAC,OAAQ,CACR,CAAC;QAEjB,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"current-user.js","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":";;;;;;AACA,gEAA+B;AAexB,MAAM,WAAW,GAAG,CACvB,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;;IACA,IAAI,CAAC,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,CAAA,EAAE,CAAC;QACpB,OAAO,IAAI,EAAE,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CACtB,GAAG,CAAC,OAAO,CAAC,GAAG,EACf,OAAO,CAAC,GAAG,CAAC,OAAQ,CACR,CAAC;QAEjB,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;IACjB,CAAC;IACD,IAAI,EAAE,CAAC;AACX,CAAC,CAAA;AAnBY,QAAA,WAAW,eAmBvB"}
|
|
@@ -4,7 +4,6 @@ exports.errorHandler = void 0;
|
|
|
4
4
|
const custom_error_1 = require("../errors/custom-error");
|
|
5
5
|
const errorHandler = (err, req, res, next) => {
|
|
6
6
|
if (err instanceof custom_error_1.CustomError) {
|
|
7
|
-
console.log("In Custom Error;");
|
|
8
7
|
return res.status(err.statusCode).send({ errors: err.serializeErrors(), });
|
|
9
8
|
}
|
|
10
9
|
res.status(500).send({
|
|
@@ -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,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,IAAI,GAAG,YAAY,0BAAW,EAAE,CAAC;QAC7B,OAAO,
|
|
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,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,IAAI,GAAG,YAAY,0BAAW,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAC/E,CAAC;IAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACjB,MAAM,EAAE,CAAC,EAAC,OAAO,EAAC,sBAAsB,EAAC,CAAC;KAC7C,CAAC,CAAA;AACN,CAAC,CAAA;AAbY,QAAA,YAAY,gBAaxB"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
1
|
import { Request, Response, NextFunction } from 'express';
|
|
2
|
-
interface UserPayload {
|
|
3
|
-
id: String;
|
|
4
|
-
email: String;
|
|
5
|
-
}
|
|
6
|
-
declare global {
|
|
7
|
-
namespace Express {
|
|
8
|
-
interface Request {
|
|
9
|
-
currentUser?: UserPayload;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
2
|
export declare const requireAuth: (req: Request, res: Response, next: NextFunction) => void;
|
|
14
|
-
export {};
|
|
15
3
|
//# sourceMappingURL=require-auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-auth.d.ts","sourceRoot":"","sources":["../../src/middlewares/require-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D,
|
|
1
|
+
{"version":3,"file":"require-auth.d.ts","sourceRoot":"","sources":["../../src/middlewares/require-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D,eAAO,MAAM,WAAW,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,SAOrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-auth.js","sourceRoot":"","sources":["../../src/middlewares/require-auth.ts"],"names":[],"mappings":";;;AACA,yEAAoE;
|
|
1
|
+
{"version":3,"file":"require-auth.js","sourceRoot":"","sources":["../../src/middlewares/require-auth.ts"],"names":[],"mappings":";;;AACA,yEAAoE;AAE7D,MAAM,WAAW,GAAE,CACtB,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,IAAI,yCAAkB,CAAC;IACjC,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAA;AAVY,QAAA,WAAW,eAUvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dj_ticketing/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"clean": "del build",
|
|
13
|
-
"build": "npm run clean && tsc"
|
|
13
|
+
"build": "npm run clean && tsc",
|
|
14
|
+
"pb": "npm run build && npm version patch && npm publish"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [],
|
|
16
17
|
"author": "",
|