@ecom-micro/common 2.0.0

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.
@@ -0,0 +1,8 @@
1
+ import { BaseError } from './baseError';
2
+ export declare class BadRequestError extends BaseError {
3
+ statusCode: number;
4
+ constructor(message: string);
5
+ serializeErrors(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BadRequestError = void 0;
19
+ var baseError_1 = require("./baseError");
20
+ var BadRequestError = /** @class */ (function (_super) {
21
+ __extends(BadRequestError, _super);
22
+ function BadRequestError(message) {
23
+ var _this = _super.call(this, message) || this;
24
+ _this.statusCode = 400;
25
+ Object.setPrototypeOf(_this, BadRequestError.prototype);
26
+ return _this;
27
+ }
28
+ BadRequestError.prototype.serializeErrors = function () {
29
+ return [{ message: this.message }];
30
+ };
31
+ return BadRequestError;
32
+ }(baseError_1.BaseError));
33
+ exports.BadRequestError = BadRequestError;
@@ -0,0 +1,8 @@
1
+ export declare abstract class BaseError extends Error {
2
+ abstract statusCode: number;
3
+ constructor(message: string);
4
+ abstract serializeErrors(): {
5
+ message: string;
6
+ field?: string;
7
+ }[];
8
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BaseError = void 0;
19
+ var BaseError = /** @class */ (function (_super) {
20
+ __extends(BaseError, _super);
21
+ function BaseError(message) {
22
+ var _this = _super.call(this, message) || this;
23
+ _this.name = _this.constructor.name;
24
+ Error.captureStackTrace(_this, _this.constructor);
25
+ return _this;
26
+ }
27
+ return BaseError;
28
+ }(Error));
29
+ exports.BaseError = BaseError;
@@ -0,0 +1,8 @@
1
+ import { BaseError } from './baseError';
2
+ export declare class NotAuthorizedError extends BaseError {
3
+ statusCode: number;
4
+ constructor();
5
+ serializeErrors(): {
6
+ message: string;
7
+ }[];
8
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.NotAuthorizedError = void 0;
19
+ var baseError_1 = require("./baseError");
20
+ var NotAuthorizedError = /** @class */ (function (_super) {
21
+ __extends(NotAuthorizedError, _super);
22
+ function NotAuthorizedError() {
23
+ var _this = _super.call(this, 'Not authorized') || this;
24
+ _this.statusCode = 401;
25
+ Object.setPrototypeOf(_this, NotAuthorizedError.prototype);
26
+ return _this;
27
+ }
28
+ NotAuthorizedError.prototype.serializeErrors = function () {
29
+ return [{ message: 'Not authorized' }];
30
+ };
31
+ return NotAuthorizedError;
32
+ }(baseError_1.BaseError));
33
+ exports.NotAuthorizedError = NotAuthorizedError;
@@ -0,0 +1,9 @@
1
+ import { BaseError } from './baseError';
2
+ export declare class NotFoundError extends BaseError {
3
+ message: string;
4
+ statusCode: number;
5
+ constructor(message: string);
6
+ serializeErrors(): {
7
+ message: string;
8
+ }[];
9
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.NotFoundError = void 0;
19
+ var baseError_1 = require("./baseError");
20
+ var NotFoundError = /** @class */ (function (_super) {
21
+ __extends(NotFoundError, _super);
22
+ function NotFoundError(message) {
23
+ var _this = _super.call(this, 'Not found error') || this;
24
+ _this.message = message;
25
+ _this.statusCode = 404;
26
+ Object.setPrototypeOf(_this, NotFoundError.prototype);
27
+ return _this;
28
+ }
29
+ NotFoundError.prototype.serializeErrors = function () {
30
+ return [{ message: this.message }];
31
+ };
32
+ return NotFoundError;
33
+ }(baseError_1.BaseError));
34
+ exports.NotFoundError = NotFoundError;
@@ -0,0 +1,11 @@
1
+ import { ValidationError } from 'express-validator';
2
+ import { BaseError } from './baseError';
3
+ export declare class RequestValidationError extends BaseError {
4
+ error: ValidationError[];
5
+ statusCode: number;
6
+ constructor(error: ValidationError[]);
7
+ serializeErrors(): {
8
+ message: any;
9
+ field: string;
10
+ }[];
11
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RequestValidationError = void 0;
19
+ var baseError_1 = require("./baseError");
20
+ var RequestValidationError = /** @class */ (function (_super) {
21
+ __extends(RequestValidationError, _super);
22
+ function RequestValidationError(error) {
23
+ var _this = _super.call(this, 'Request validation error') || this;
24
+ _this.error = error;
25
+ _this.statusCode = 400;
26
+ Object.setPrototypeOf(_this, RequestValidationError.prototype);
27
+ return _this;
28
+ }
29
+ RequestValidationError.prototype.serializeErrors = function () {
30
+ return this.error.map(function (err) {
31
+ return { message: err.msg, field: err.param };
32
+ });
33
+ };
34
+ return RequestValidationError;
35
+ }(baseError_1.BaseError));
36
+ exports.RequestValidationError = RequestValidationError;
@@ -0,0 +1,8 @@
1
+ export * from './errors/badRequestError';
2
+ export * from './errors/baseError';
3
+ export * from './errors/notAuthorized';
4
+ export * from './errors/notFoundError';
5
+ export * from './errors/requestValidationError';
6
+ export * from './middleware/errorHandler';
7
+ export * from './middleware/protect';
8
+ export * from './middleware/requestValidation';
package/build/index.js ADDED
@@ -0,0 +1,24 @@
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 });
17
+ __exportStar(require("./errors/badRequestError"), exports);
18
+ __exportStar(require("./errors/baseError"), exports);
19
+ __exportStar(require("./errors/notAuthorized"), exports);
20
+ __exportStar(require("./errors/notFoundError"), exports);
21
+ __exportStar(require("./errors/requestValidationError"), exports);
22
+ __exportStar(require("./middleware/errorHandler"), exports);
23
+ __exportStar(require("./middleware/protect"), exports);
24
+ __exportStar(require("./middleware/requestValidation"), exports);
@@ -0,0 +1,2 @@
1
+ import { NextFunction, Request, Response } from 'express';
2
+ export declare const errorHandler: (err: Error, req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.errorHandler = void 0;
40
+ var baseError_1 = require("../errors/baseError");
41
+ var errorHandler = function (err, req, res, next) { return __awaiter(void 0, void 0, void 0, function () {
42
+ return __generator(this, function (_a) {
43
+ if (process.env.NODE_ENV !== 'test') {
44
+ console.log(err.stack);
45
+ }
46
+ if (err instanceof baseError_1.BaseError) {
47
+ return [2 /*return*/, res.status(err.statusCode).json({ errors: err.serializeErrors() })];
48
+ }
49
+ res.status(500).json({ errors: [{ message: 'something went wrong' }] });
50
+ return [2 /*return*/];
51
+ });
52
+ }); };
53
+ exports.errorHandler = errorHandler;
@@ -0,0 +1,14 @@
1
+ import { NextFunction, Request, Response } from 'express';
2
+ type UserPayload = {
3
+ id: string;
4
+ email: string;
5
+ };
6
+ declare global {
7
+ namespace Express {
8
+ interface Request {
9
+ user: UserPayload;
10
+ }
11
+ }
12
+ }
13
+ export declare const protect: (req: Request, res: Response, next: NextFunction) => Promise<void>;
14
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.protect = void 0;
43
+ var jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
44
+ var badRequestError_1 = require("../errors/badRequestError");
45
+ var protect = function (req, res, next) { return __awaiter(void 0, void 0, void 0, function () {
46
+ var payload;
47
+ var _a;
48
+ return __generator(this, function (_b) {
49
+ try {
50
+ if (!((_a = req.session) === null || _a === void 0 ? void 0 : _a.jwt)) {
51
+ return [2 /*return*/, next(new badRequestError_1.BadRequestError('You are not login! Please login first'))];
52
+ }
53
+ payload = jsonwebtoken_1.default.verify(req.session.jwt, process.env.JWT_KEY);
54
+ req.user = payload;
55
+ }
56
+ catch (err) {
57
+ res.send({ currentUser: null });
58
+ }
59
+ next();
60
+ return [2 /*return*/];
61
+ });
62
+ }); };
63
+ exports.protect = protect;
@@ -0,0 +1,2 @@
1
+ import { NextFunction, Request, Response } from 'express';
2
+ export declare const requestValidation: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.requestValidation = void 0;
40
+ var express_validator_1 = require("express-validator");
41
+ var requestValidationError_1 = require("../errors/requestValidationError");
42
+ var requestValidation = function (req, res, next) { return __awaiter(void 0, void 0, void 0, function () {
43
+ var errors;
44
+ return __generator(this, function (_a) {
45
+ errors = (0, express_validator_1.validationResult)(req);
46
+ if (!errors.isEmpty()) {
47
+ throw new requestValidationError_1.RequestValidationError(errors.array());
48
+ }
49
+ next();
50
+ return [2 /*return*/];
51
+ });
52
+ }); };
53
+ exports.requestValidation = requestValidation;
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@ecom-micro/common",
3
+ "version": "2.0.0",
4
+ "description": "",
5
+ "main": "./build/src/index.js",
6
+ "types": "./build/src/index.d.ts",
7
+ "files": [
8
+ "build/**/*"
9
+ ],
10
+ "scripts": {
11
+ "clean": "npx rimraf ./build",
12
+ "build": "npm run clean && tsc",
13
+ "pub": "git add . && git commit -m \"Updates\" && npm version patch && npm run build && npm publish"
14
+ },
15
+ "keywords": [],
16
+ "author": "",
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "express": "^4.18.2",
20
+ "@types/express": "^4.17.14",
21
+ "express-validator": "^6.14.2",
22
+ "@types/express-validator": "^3.0.0",
23
+ "@types/jsonwebtoken": "^8.5.9",
24
+ "jsonwebtoken": "^8.5.1",
25
+ "@types/cookie-session": "^2.0.44",
26
+ "cookie-session": "^2.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^4.8.4"
30
+ }
31
+ }