@thebester/common 1.0.11 → 1.0.12
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/errors/bad-request-error.d.ts +0 -1
- package/build/errors/bad-request-error.js +5 -4
- package/build/errors/custom-error.d.ts +0 -1
- package/build/errors/custom-error.js +5 -2
- package/build/errors/database-connection-error.d.ts +0 -1
- package/build/errors/database-connection-error.js +6 -3
- package/build/errors/not-authorized-error.d.ts +0 -1
- package/build/errors/not-authorized-error.js +6 -3
- package/build/errors/not-found-error.d.ts +0 -1
- package/build/errors/not-found-error.js +6 -3
- package/build/errors/request-validation-error.d.ts +0 -1
- package/build/errors/request-validation-error.js +6 -3
- package/build/index.d.ts +0 -1
- package/build/index.js +26 -11
- package/build/middelwares/current-user.d.ts +0 -1
- package/build/middelwares/current-user.js +10 -4
- package/build/middelwares/error-handler.d.ts +0 -1
- package/build/middelwares/error-handler.js +7 -4
- package/build/middelwares/require-auth.d.ts +0 -1
- package/build/middelwares/require-auth.js +7 -4
- package/build/middelwares/validate-request.d.ts +0 -1
- package/build/middelwares/validate-request.js +9 -6
- package/package.json +1 -2
- package/build/errors/bad-request-error.d.ts.map +0 -1
- package/build/errors/bad-request-error.js.map +0 -1
- package/build/errors/custom-error.d.ts.map +0 -1
- package/build/errors/custom-error.js.map +0 -1
- package/build/errors/database-connection-error.d.ts.map +0 -1
- package/build/errors/database-connection-error.js.map +0 -1
- package/build/errors/not-authorized-error.d.ts.map +0 -1
- package/build/errors/not-authorized-error.js.map +0 -1
- package/build/errors/not-found-error.d.ts.map +0 -1
- package/build/errors/not-found-error.js.map +0 -1
- package/build/errors/request-validation-error.d.ts.map +0 -1
- package/build/errors/request-validation-error.js.map +0 -1
- package/build/index.d.ts.map +0 -1
- package/build/index.js.map +0 -1
- package/build/middelwares/current-user.d.ts.map +0 -1
- package/build/middelwares/current-user.js.map +0 -1
- package/build/middelwares/error-handler.d.ts.map +0 -1
- package/build/middelwares/error-handler.js.map +0 -1
- package/build/middelwares/require-auth.d.ts.map +0 -1
- package/build/middelwares/require-auth.js.map +0 -1
- package/build/middelwares/validate-request.d.ts.map +0 -1
- package/build/middelwares/validate-request.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const custom_error_1 = require("./custom-error");
|
|
4
|
+
class BadRequestError extends custom_error_1.CustomError {
|
|
3
5
|
constructor(message) {
|
|
4
6
|
super(message);
|
|
5
7
|
this.message = message;
|
|
@@ -11,5 +13,4 @@ class BadRequestError extends CustomError {
|
|
|
11
13
|
return [{ message: this.message }];
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=bad-request-error.js.map
|
|
16
|
+
exports.default = BadRequestError;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomError = void 0;
|
|
4
|
+
class CustomError extends Error {
|
|
2
5
|
constructor(message) {
|
|
3
6
|
super(message);
|
|
4
7
|
// Only because we are extending a built in class
|
|
5
8
|
Object.setPrototypeOf(this, CustomError.prototype);
|
|
6
9
|
}
|
|
7
10
|
}
|
|
8
|
-
|
|
11
|
+
exports.CustomError = CustomError;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DatabaseConnectionError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class DatabaseConnectionError extends custom_error_1.CustomError {
|
|
3
6
|
constructor() {
|
|
4
7
|
super("Error connecting to database");
|
|
5
8
|
this.statusCode = 500;
|
|
@@ -15,4 +18,4 @@ export class DatabaseConnectionError extends CustomError {
|
|
|
15
18
|
];
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
|
-
|
|
21
|
+
exports.DatabaseConnectionError = DatabaseConnectionError;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotAuthorizedError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class NotAuthorizedError extends custom_error_1.CustomError {
|
|
3
6
|
constructor() {
|
|
4
7
|
super("Not authorized");
|
|
5
8
|
this.statusCode = 401;
|
|
@@ -10,4 +13,4 @@ export class NotAuthorizedError extends CustomError {
|
|
|
10
13
|
return [{ message: "Not authorized" }];
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
exports.NotAuthorizedError = NotAuthorizedError;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotFoundError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class NotFoundError extends custom_error_1.CustomError {
|
|
3
6
|
constructor() {
|
|
4
7
|
super("Route not found");
|
|
5
8
|
this.statusCode = 404;
|
|
@@ -14,4 +17,4 @@ export class NotFoundError extends CustomError {
|
|
|
14
17
|
];
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
|
|
20
|
+
exports.NotFoundError = NotFoundError;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestValidationError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class RequestValidationError extends custom_error_1.CustomError {
|
|
3
6
|
constructor(errors) {
|
|
4
7
|
super("Invalid request parameters");
|
|
5
8
|
this.errors = errors;
|
|
@@ -17,4 +20,4 @@ export class RequestValidationError extends CustomError {
|
|
|
17
20
|
});
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
|
-
|
|
23
|
+
exports.RequestValidationError = RequestValidationError;
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
17
|
// Re-export stuff from errors and middlewares
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
18
|
+
__exportStar(require("./errors/bad-request-error"), exports);
|
|
19
|
+
__exportStar(require("./errors/custom-error"), exports);
|
|
20
|
+
__exportStar(require("./errors/database-connection-error"), exports);
|
|
21
|
+
__exportStar(require("./errors/not-authorized-error"), exports);
|
|
22
|
+
__exportStar(require("./errors/not-found-error"), exports);
|
|
23
|
+
__exportStar(require("./errors/request-validation-error"), exports);
|
|
24
|
+
__exportStar(require("./middelwares/current-user"), exports);
|
|
25
|
+
__exportStar(require("./middelwares/error-handler"), exports);
|
|
26
|
+
__exportStar(require("./middelwares/require-auth"), exports);
|
|
27
|
+
__exportStar(require("./middelwares/validate-request"), exports);
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.currentUser = void 0;
|
|
7
|
+
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
8
|
+
const currentUser = (req, res, next) => {
|
|
3
9
|
var _a;
|
|
4
10
|
if (!((_a = req.session) === null || _a === void 0 ? void 0 : _a.jwt)) {
|
|
5
11
|
return next();
|
|
6
12
|
}
|
|
7
13
|
try {
|
|
8
|
-
const payload =
|
|
14
|
+
const payload = jsonwebtoken_1.default.verify(req.session.jwt, process.env.JWT_KEY);
|
|
9
15
|
req.currentUser = payload;
|
|
10
16
|
}
|
|
11
17
|
catch (err) {
|
|
12
18
|
}
|
|
13
19
|
next();
|
|
14
20
|
};
|
|
15
|
-
|
|
21
|
+
exports.currentUser = currentUser;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.errorHandler = void 0;
|
|
4
|
+
const custom_error_1 = require("../errors/custom-error");
|
|
5
|
+
const errorHandler = (err, req, res, next) => {
|
|
6
|
+
if (err instanceof custom_error_1.CustomError) {
|
|
4
7
|
return res.status(err.statusCode).send({ errors: err.serializeErrors() });
|
|
5
8
|
}
|
|
6
9
|
res.status(400).send({
|
|
7
10
|
errors: [{ message: "Something went wrong" }]
|
|
8
11
|
});
|
|
9
12
|
};
|
|
10
|
-
|
|
13
|
+
exports.errorHandler = errorHandler;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.requireAuth = void 0;
|
|
4
|
+
const not_authorized_error_1 = require("../errors/not-authorized-error");
|
|
5
|
+
const requireAuth = (req, res, next) => {
|
|
3
6
|
if (!req.currentUser) {
|
|
4
|
-
throw new NotAuthorizedError();
|
|
7
|
+
throw new not_authorized_error_1.NotAuthorizedError();
|
|
5
8
|
}
|
|
6
9
|
next();
|
|
7
10
|
};
|
|
8
|
-
|
|
11
|
+
exports.requireAuth = requireAuth;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateRequest = void 0;
|
|
4
|
+
const express_validator_1 = require("express-validator");
|
|
5
|
+
const request_validation_error_1 = require("../errors/request-validation-error");
|
|
6
|
+
const validateRequest = (req, res, next) => {
|
|
7
|
+
const errors = (0, express_validator_1.validationResult)(req);
|
|
5
8
|
if (!errors.isEmpty()) {
|
|
6
|
-
throw new RequestValidationError(errors.array());
|
|
9
|
+
throw new request_validation_error_1.RequestValidationError(errors.array());
|
|
7
10
|
}
|
|
8
11
|
next();
|
|
9
12
|
};
|
|
10
|
-
|
|
13
|
+
exports.validateRequest = validateRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thebester/common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"keywords": [],
|
|
16
16
|
"author": "",
|
|
17
17
|
"license": "ISC",
|
|
18
|
-
"type": "module",
|
|
19
18
|
"devDependencies": {
|
|
20
19
|
"del-cli": "^7.0.0",
|
|
21
20
|
"typescript": "^5.9.3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bad-request-error.d.ts","sourceRoot":"","sources":["../../src/errors/bad-request-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,cAAM,eAAgB,SAAQ,WAAW;IAGlB,OAAO,EAAE,MAAM;IAFlC,UAAU,EAAE,MAAM,CAAO;gBAEN,OAAO,EAAE,MAAM;IAOlC,eAAe,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;KAAE,EAAE;CAG5D;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bad-request-error.js","sourceRoot":"","sources":["../../src/errors/bad-request-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,eAAgB,SAAQ,WAAW;IAGrC,YAAmB,OAAe;QAC9B,KAAK,CAAC,OAAO,CAAC,CAAC;QADA,YAAO,GAAP,OAAO,CAAQ;QAFlC,eAAU,GAAW,GAAG,CAAC;QAKrB,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;IAED,eAAe;QACX,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;CACJ;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-error.d.ts","sourceRoot":"","sources":["../../src/errors/custom-error.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAY,SAAQ,KAAK;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,OAAO,EAAE,MAAM;IAO3B,QAAQ,CAAC,eAAe,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE;CACpE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-error.js","sourceRoot":"","sources":["../../src/errors/custom-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAgB,WAAY,SAAQ,KAAK;IAG3C,YAAY,OAAe;QACvB,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;CAGJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-connection-error.d.ts","sourceRoot":"","sources":["../../src/errors/database-connection-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,uBAAwB,SAAQ,WAAW;IACpD,UAAU,EAAE,MAAM,CAAO;IACzB,MAAM,EAAE,MAAM,CAAkC;;IAShD,eAAe;;;CAOlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-connection-error.js","sourceRoot":"","sources":["../../src/errors/database-connection-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,uBAAwB,SAAQ,WAAW;IAIpD;QACI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAJ1C,eAAU,GAAW,GAAG,CAAC;QACzB,WAAM,GAAW,8BAA8B,CAAC;QAK5C,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACnE,CAAC;IAED,eAAe;QACX,OAAO;YACH;gBACI,OAAO,EAAE,IAAI,CAAC,MAAM;aACvB;SACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not-authorized-error.d.ts","sourceRoot":"","sources":["../../src/errors/not-authorized-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,kBAAmB,SAAQ,WAAW;IAC/C,UAAU,EAAE,MAAM,CAAO;;IASzB,eAAe;;;CAGlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not-authorized-error.js","sourceRoot":"","sources":["../../src/errors/not-authorized-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IAG/C;QACI,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAH5B,eAAU,GAAW,GAAG,CAAC;QAKrB,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IAED,eAAe;QACX,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAC,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-error.d.ts","sourceRoot":"","sources":["../../src/errors/not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,aAAc,SAAQ,WAAW;IAC1C,UAAU,EAAE,MAAM,CAAO;;IASzB,eAAe;;;CAOlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-error.js","sourceRoot":"","sources":["../../src/errors/not-found-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAG1C;QACI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAH7B,eAAU,GAAW,GAAG,CAAC;QAKrB,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED,eAAe;QACX,OAAO;YACH;gBACI,OAAO,EAAE,WAAW;aACvB;SACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-validation-error.d.ts","sourceRoot":"","sources":["../../src/errors/request-validation-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,sBAAuB,SAAQ,WAAW;IAGhC,MAAM,EAAE,eAAe,EAAE;IAF5C,UAAU,EAAE,MAAM,CAAO;gBAEN,MAAM,EAAE,eAAe,EAAE;IAO5C,eAAe;;;;;;;CASlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request-validation-error.js","sourceRoot":"","sources":["../../src/errors/request-validation-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAGnD,YAAmB,MAAyB;QACxC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QADrB,WAAM,GAAN,MAAM,CAAmB;QAF5C,eAAU,GAAW,GAAG,CAAC;QAKrB,iDAAiD;QACjD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;IAED,eAAe;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACzB,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;gBACvB,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;YACjD,CAAC;;gBAEG,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,CAAA;QACnC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/build/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAElD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAElD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"current-user.d.ts","sourceRoot":"","sources":["../../src/middelwares/current-user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,WAAW,CAAC,EAAE,WAAW,CAAC;SAC7B;KACJ;CACJ;AAED,eAAO,MAAM,WAAW,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,SAerB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"current-user.js","sourceRoot":"","sources":["../../src/middelwares/current-user.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,cAAc,CAAC;AAgB/B,MAAM,CAAC,MAAM,WAAW,GAAG,CACvB,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;;IACA,IAAG,CAAC,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,CAAA,EAAE,CAAC;QACnB,OAAO,IAAI,EAAE,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,OAAQ,CAAgB,CAAC;QACjF,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC;IAC9B,CAAC;IACD,OAAO,GAAG,EAAE,CAAC;IAEb,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middelwares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,eAAO,MAAM,YAAY,GACrB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,mDASrB,CAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middelwares/error-handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,GAAU,EACV,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,IAAI,GAAG,YAAY,WAAW,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACjB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;KAChD,CAAC,CAAC;AACP,CAAC,CAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"require-auth.d.ts","sourceRoot":"","sources":["../../src/middelwares/require-auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG/D,eAAO,MAAM,WAAW,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,SAOrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"require-auth.js","sourceRoot":"","sources":["../../src/middelwares/require-auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,WAAW,GAAG,CACvB,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,IAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAClB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-request.d.ts","sourceRoot":"","sources":["../../src/middelwares/validate-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI/D,eAAO,MAAM,eAAe,GACxB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,SASrB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-request.js","sourceRoot":"","sources":["../../src/middelwares/validate-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,GAAY,EACZ,GAAa,EACb,IAAkB,EACpB,EAAE;IACA,MAAM,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAErC,IAAG,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QACnB,MAAM,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAA"}
|