├── api.auth ├── config │ ├── staging.env │ ├── production.env │ └── development.env ├── src │ ├── server.ts │ ├── dtos │ │ └── user.dto.ts │ ├── common │ │ ├── exceptions │ │ │ └── application.exception.ts │ │ ├── persistence │ │ │ └── persistence.mysql.ts │ │ └── controllers │ │ │ └── base.controller.ts │ ├── controllers │ │ ├── default.controller.ts │ │ └── identity.controller.ts │ ├── container.ts │ ├── app.ts │ └── services │ │ └── identity.service.ts ├── package.json ├── tsconfig.json └── package-lock.json ├── api.wallet ├── config │ ├── staging.env │ ├── development.env │ └── production.env ├── src │ ├── common │ │ ├── enums │ │ │ └── movement-type.ts │ │ ├── exceptions │ │ │ └── application.exception.ts │ │ ├── persistence │ │ │ ├── mysql.persistence.ts │ │ │ ├── mssql.persistence.ts │ │ │ └── mock.persistence.ts │ │ └── controllers │ │ │ └── base.controller.ts │ ├── services │ │ ├── test.service.ts │ │ ├── repositories │ │ │ ├── domain │ │ │ │ ├── balance.ts │ │ │ │ ├── subscription.ts │ │ │ │ └── movement.ts │ │ │ ├── movement.repository.ts │ │ │ ├── balance.repository.ts │ │ │ ├── subscription.repository.ts │ │ │ └── impl │ │ │ │ ├── mysql │ │ │ │ ├── movement.repository.ts │ │ │ │ ├── balance.repository.ts │ │ │ │ └── subscription.repository.ts │ │ │ │ ├── mssql │ │ │ │ ├── movement.repository.ts │ │ │ │ ├── balance.repository.ts │ │ │ │ └── subscription.repository.ts │ │ │ │ └── mock │ │ │ │ ├── movement.repository.ts │ │ │ │ ├── balance.repository.ts │ │ │ │ └── subscription.repository.ts │ │ ├── subscription.service.ts │ │ ├── movement.service.spec.ts │ │ └── movement.service.ts │ ├── server.ts │ ├── dtos │ │ ├── movement.dto.ts │ │ └── subscription.dto.ts │ ├── controllers │ │ ├── default.controller.ts │ │ ├── check.controller.ts │ │ ├── movement.controller.ts │ │ └── subscription.controller.ts │ ├── test │ │ └── example.spec.ts │ ├── app.ts │ └── container.ts ├── .eslintrc.js ├── package.json └── tsconfig.json ├── mssql-script.sql ├── .gitignore ├── README.md └── mysql-script.sql /api.auth/config/staging.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api.auth/config/production.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api.wallet/config/staging.env: -------------------------------------------------------------------------------- 1 | APP_FOO=staging -------------------------------------------------------------------------------- /api.wallet/src/common/enums/movement-type.ts: -------------------------------------------------------------------------------- 1 | export enum MovementType { 2 | income = 0, 3 | outcome = 1 4 | }; -------------------------------------------------------------------------------- /mssql-script.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Anexsoft/NodeJS-API-TypeScript-and-Repository-Pattern/HEAD/mssql-script.sql -------------------------------------------------------------------------------- /api.wallet/src/services/test.service.ts: -------------------------------------------------------------------------------- 1 | export class TestService { 2 | get(): Date { 3 | return new Date(); 4 | } 5 | } -------------------------------------------------------------------------------- /api.auth/src/server.ts: -------------------------------------------------------------------------------- 1 | import { app } from './app'; 2 | 3 | app.listen(5000, function () { 4 | console.log('App is running on port 5000!'); 5 | }); -------------------------------------------------------------------------------- /api.auth/src/dtos/user.dto.ts: -------------------------------------------------------------------------------- 1 | interface UserCreateDto { 2 | email: string; 3 | password: string; 4 | } 5 | 6 | export { 7 | UserCreateDto 8 | }; -------------------------------------------------------------------------------- /api.wallet/src/server.ts: -------------------------------------------------------------------------------- 1 | import { app } from './app'; 2 | 3 | app.listen(3000, () => { 4 | console.log('Application is running on port 3000.'); 5 | }); -------------------------------------------------------------------------------- /api.auth/config/development.env: -------------------------------------------------------------------------------- 1 | jwt_secret_key=asdaksjdkwajdklJDLKASJDALKSDJLsdawd45 2 | 3 | db_mysql_host=localhost 4 | db_mysql_user=root 5 | db_mysql_password= 6 | db_mysql_database=kodoti_wallet -------------------------------------------------------------------------------- /api.auth/src/common/exceptions/application.exception.ts: -------------------------------------------------------------------------------- 1 | export class ApplicationException extends Error { 2 | constructor(message: string = 'An unexpected error ocurred.') { 3 | super(message); 4 | } 5 | } -------------------------------------------------------------------------------- /api.wallet/src/common/exceptions/application.exception.ts: -------------------------------------------------------------------------------- 1 | export class ApplicationException extends Error { 2 | constructor(message: string = 'An unexpected error ocurred.') { 3 | super(message); 4 | } 5 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/domain/balance.ts: -------------------------------------------------------------------------------- 1 | export interface Balance { 2 | id: number; 3 | user_id: number; 4 | amount: number; 5 | created_at: Date | null; 6 | updated_at: Date | null; 7 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .vscode -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/domain/subscription.ts: -------------------------------------------------------------------------------- 1 | export interface Subscription { 2 | id: number; 3 | code: string; 4 | user_id: number; 5 | amount: number; 6 | cron: string; 7 | created_at: Date | null, 8 | updated_at: Date | null 9 | }; -------------------------------------------------------------------------------- /api.wallet/src/dtos/movement.dto.ts: -------------------------------------------------------------------------------- 1 | import { MovementType } from "../common/enums/movement-type"; 2 | 3 | interface MovementCreateDto { 4 | type: MovementType; 5 | user_id: number; 6 | amount: number; 7 | } 8 | 9 | export { 10 | MovementCreateDto 11 | } -------------------------------------------------------------------------------- /api.wallet/config/development.env: -------------------------------------------------------------------------------- 1 | jwt_secret_key=asdaksjdkwajdklJDLKASJDALKSDJLsdawd45 2 | 3 | db_mysql_host=localhost 4 | db_mysql_user=root 5 | db_mysql_password= 6 | db_mysql_database=kodoti_wallet 7 | 8 | db_mssql_server=localhost 9 | db_mssql_user=sa 10 | db_mssql_password=123456 11 | db_mssql_database=kodoti_wallet -------------------------------------------------------------------------------- /api.wallet/config/production.env: -------------------------------------------------------------------------------- 1 | jwt_secret_key=asdaksjdkwajdklJDLKASJDALKSDJLsdawd45 2 | 3 | db_mysql_host=localhost 4 | db_mysql_user=root 5 | db_mysql_password= 6 | db_mysql_database=kodoti_wallet 7 | 8 | db_mssql_server=localhost 9 | db_mssql_user=sa 10 | db_mssql_password=123456 11 | db_mssql_database=kodoti_wallet -------------------------------------------------------------------------------- /api.wallet/src/controllers/default.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, GET } from "awilix-express"; 3 | 4 | @route('/') 5 | export class DefaultController { 6 | @GET() 7 | public index(req: Request, res: Response): void { 8 | res.send('Running ..'); 9 | } 10 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/domain/movement.ts: -------------------------------------------------------------------------------- 1 | import { MovementType } from "../../../common/enums/movement-type"; 2 | 3 | export interface Movement { 4 | id: number; 5 | user_id: number; 6 | type: MovementType; 7 | amount: number; 8 | created_at: Date | null; 9 | updated_at: Date | null; 10 | } -------------------------------------------------------------------------------- /api.auth/src/controllers/default.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, GET } from 'awilix-express'; 3 | 4 | @route('/') 5 | export class DefaultController { 6 | @route('/') 7 | @GET() 8 | async index(req: Request, res: Response) { 9 | res.send('Running'); 10 | } 11 | } -------------------------------------------------------------------------------- /api.wallet/src/common/persistence/mysql.persistence.ts: -------------------------------------------------------------------------------- 1 | import { createPool } from "mysql2/promise"; 2 | 3 | export default createPool({ 4 | host: process.env.db_mysql_host, 5 | user: process.env.db_mysql_user, 6 | password: process.env.db_mysql_password, 7 | database: process.env.db_mysql_database, 8 | decimalNumbers: true 9 | }); -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/movement.repository.ts: -------------------------------------------------------------------------------- 1 | import { Movement } from "./domain/movement"; 2 | 3 | export interface MovementRepository { 4 | find(id: number): Promise; 5 | all(): Promise; 6 | store(entry: Movement): Promise; 7 | update(entry: Movement): Promise; 8 | remove(id: number): Promise; 9 | } -------------------------------------------------------------------------------- /api.wallet/src/dtos/subscription.dto.ts: -------------------------------------------------------------------------------- 1 | interface SubscriptionCreateDto { 2 | code: string; 3 | user_id: number; 4 | amount: number; 5 | cron: string; 6 | } 7 | 8 | interface SubscriptionUpdateDto { 9 | code: string; 10 | amount: number; 11 | cron: string; 12 | } 13 | 14 | export { 15 | SubscriptionCreateDto, 16 | SubscriptionUpdateDto 17 | } -------------------------------------------------------------------------------- /api.auth/src/common/persistence/persistence.mysql.ts: -------------------------------------------------------------------------------- 1 | import { createConnection, ConnectionOptions } from 'mysql2/promise'; 2 | 3 | const config = { 4 | host: process.env.db_mysql_host, 5 | user: process.env.db_mysql_user, 6 | password: process.env.db_mysql_password, 7 | database: process.env.db_mysql_database 8 | } as ConnectionOptions; 9 | 10 | export default createConnection(config); -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/balance.repository.ts: -------------------------------------------------------------------------------- 1 | import { Balance } from "./domain/balance"; 2 | 3 | export interface BalanceRepository { 4 | find(id: number): Promise; 5 | findByUserId(userId: number): Promise; 6 | all(): Promise; 7 | store(entry: Balance): Promise; 8 | update(entry: Balance): Promise; 9 | remove(id: number): Promise; 10 | } -------------------------------------------------------------------------------- /api.wallet/src/common/persistence/mssql.persistence.ts: -------------------------------------------------------------------------------- 1 | import { ConnectionPool } from "mssql"; 2 | 3 | let config = { 4 | server: process.env.db_mssql_server as string, 5 | database: process.env.db_mssql_database as string, 6 | user: process.env.db_mssql_user as string, 7 | password: process.env.db_mssql_password as string, 8 | options: { 9 | enableArithAbort: true 10 | } 11 | }; 12 | 13 | export default new ConnectionPool(config).connect(); -------------------------------------------------------------------------------- /api.auth/src/common/controllers/base.controller.ts: -------------------------------------------------------------------------------- 1 | import { Response } from 'express'; 2 | import { ApplicationException } from "../exceptions/application.exception"; 3 | 4 | export abstract class BaseController { 5 | handleException(err: any, res: Response) { 6 | if (err instanceof ApplicationException) { 7 | res.status(400); 8 | res.send(err.message); 9 | } else { 10 | throw new Error(err); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /api.wallet/src/test/example.spec.ts: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | 3 | describe('Array', function () { 4 | describe('#indexOf()', function () { 5 | it('should return -1 when the value is not present', function () { 6 | assert.equal([1, 2, 3].indexOf(4), -1); 7 | }); 8 | 9 | it('should return 3 when the value is present', function () { 10 | assert.equal([1, 2, 3, 4].indexOf(4), 3); 11 | }); 12 | }); 13 | }); -------------------------------------------------------------------------------- /api.wallet/src/common/controllers/base.controller.ts: -------------------------------------------------------------------------------- 1 | import { Response } from 'express'; 2 | import { ApplicationException } from "../exceptions/application.exception"; 3 | 4 | export abstract class BaseController { 5 | handleException(err: any, res: Response) { 6 | if (err instanceof ApplicationException) { 7 | res.status(400); 8 | res.send(err.message); 9 | } else { 10 | throw new Error(err); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/subscription.repository.ts: -------------------------------------------------------------------------------- 1 | import { Subscription } from "./domain/subscription"; 2 | 3 | export interface SubscriptionRepository { 4 | all(): Promise; 5 | find(id: Number): Promise; 6 | findByUserIdAndCode(user_id: Number, code: string): Promise; 7 | store(entry: Subscription): Promise; 8 | update(entry: Subscription): Promise; 9 | remove(id: Number): Promise; 10 | } -------------------------------------------------------------------------------- /api.wallet/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true, 4 | "es2020": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:@typescript-eslint/recommended" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "parserOptions": { 12 | "ecmaVersion": 11, 13 | "sourceType": "module" 14 | }, 15 | "plugins": [ 16 | "@typescript-eslint" 17 | ], 18 | "rules": { 19 | semi: [2, "always"] 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /api.auth/src/container.ts: -------------------------------------------------------------------------------- 1 | import { Application } from 'express'; 2 | import { createContainer, asClass } from 'awilix'; 3 | import { scopePerRequest } from 'awilix-express'; 4 | import { IdentityService } from './services/identity.service'; 5 | 6 | export default (app: Application) => { 7 | const container = createContainer({ 8 | injectionMode: "CLASSIC" 9 | }); 10 | 11 | container.register({ 12 | identityService: asClass(IdentityService).scoped() 13 | }); 14 | 15 | app.use(scopePerRequest(container)); 16 | } -------------------------------------------------------------------------------- /api.wallet/src/common/persistence/mock.persistence.ts: -------------------------------------------------------------------------------- 1 | const db = { 2 | balances: [{ 3 | id: 1, 4 | user_id: 1, 5 | amount: 100 6 | }, { 7 | id: 2, 8 | user_id: 2, 9 | amount: 100 10 | }, 11 | { 12 | id: 3, 13 | user_id: 3, 14 | amount: 100 15 | }], 16 | movements: [], 17 | subscriptions: [], 18 | _balanceId: 0, 19 | _movementId: 0, 20 | _subscriptionId: 0 21 | }; 22 | 23 | db._balanceId = db.balances.length; 24 | 25 | export default db; -------------------------------------------------------------------------------- /api.auth/src/app.ts: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development'; 2 | process.env.APP_ENV = process.env.APP_ENV || 'development'; 3 | 4 | // Env files 5 | import dotenv from 'dotenv'; 6 | 7 | dotenv.config({ 8 | path: `${__dirname}/../config/${process.env.APP_ENV}.env` 9 | }); 10 | 11 | import express, { json } from 'express'; 12 | import { loadControllers } from 'awilix-express'; 13 | import container from './container'; 14 | 15 | // Create a new express app instance 16 | const app: express.Application = express(); 17 | 18 | app.use(json()); 19 | 20 | // Load dependencies 21 | container(app); 22 | 23 | // Load controllers 24 | app.use(loadControllers( 25 | 'controllers/*.ts', 26 | { cwd: __dirname }) 27 | ); 28 | 29 | export { app }; -------------------------------------------------------------------------------- /api.auth/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api.auth", 3 | "version": "1.0.0", 4 | "description": "Security API managment.", 5 | "main": "index.js", 6 | "scripts": { 7 | "start:dev": "ts-node-dev --respawn --transpileOnly src/server.ts", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "awilix": "^4.2.6", 14 | "awilix-express": "^3.0.0", 15 | "dotenv": "^8.2.0", 16 | "express": "^4.17.1", 17 | "jsonwebtoken": "^8.5.1", 18 | "mysql2": "^2.1.0", 19 | "sha.js": "^2.4.11", 20 | "typescript": "^3.9.5" 21 | }, 22 | "devDependencies": { 23 | "@types/express": "^4.17.6", 24 | "@types/jsonwebtoken": "^8.5.0", 25 | "@types/mysql2": "github:types/mysql2", 26 | "@types/sha.js": "^2.4.0", 27 | "ts-node-dev": "^1.0.0-pre.49" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /api.wallet/src/controllers/check.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, GET } from "awilix-express"; 3 | import { TestService } from '../services/test.service'; 4 | 5 | @route('/check') 6 | export class CheckController { 7 | constructor(private readonly testService: TestService) { } 8 | 9 | @GET() 10 | public index(req: Request, res: Response): void { 11 | res.send({ 12 | NODE_ENV: process.env.NODE_ENV, 13 | APP_ENV: process.env.APP_ENV 14 | }); 15 | } 16 | 17 | @route('/test') 18 | @GET() 19 | public test(req: Request, res: Response): void { 20 | res.send(this.testService.get()); 21 | } 22 | 23 | // Endpoint to check user payload from jwt 24 | @route('/user-payload') 25 | @GET() 26 | public userPayload(req: Request, res: Response): void { 27 | res.send((req as any).user); 28 | } 29 | } -------------------------------------------------------------------------------- /api.wallet/src/app.ts: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development'; 2 | process.env.APP_ENV = process.env.APP_ENV || 'development'; 3 | 4 | // Env files 5 | import dotenv = require('dotenv'); 6 | 7 | dotenv.config({ 8 | path: `${__dirname}/../config/${process.env.APP_ENV}.env` 9 | }); 10 | 11 | import express = require('express'); 12 | import { loadControllers } from 'awilix-express'; 13 | import loadContainer from './container'; 14 | import jwt from 'express-jwt'; 15 | import cors from 'cors'; 16 | 17 | const app: express.Application = express(); 18 | 19 | // JSON Support 20 | app.use(express.json()); 21 | 22 | // CORS Support 23 | app.use(cors()); 24 | 25 | // Container 26 | loadContainer(app); 27 | 28 | // JwT 29 | if (process.env.jwt_secret_key) { 30 | // app.use(jwt({ 31 | // secret: process.env.jwt_secret_key, 32 | // algorithms: ['HS256'] 33 | // }).unless({ path: ['/', '/check']})); 34 | } 35 | 36 | // Controllers 37 | app.use(loadControllers( 38 | 'controllers/*.ts', 39 | { cwd: __dirname } 40 | )); 41 | 42 | 43 | export { app }; -------------------------------------------------------------------------------- /api.wallet/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api.wallet", 3 | "version": "1.0.0", 4 | "description": "api to managment incomes and outcomes", 5 | "scripts": { 6 | "test": "mocha -r ts-node/register src/**/**.spec.ts", 7 | "start": "ts-node src/server.ts", 8 | "start:dev": "ts-node-dev --respawn --transpileOnly src/server.ts", 9 | "lint": "eslint src/* --fix" 10 | }, 11 | "author": "kodoti", 12 | "license": "ISC", 13 | "dependencies": { 14 | "awilix": "^4.2.6", 15 | "awilix-express": "^3.0.0", 16 | "cors": "^2.8.5", 17 | "dotenv": "^8.2.0", 18 | "express": "^4.17.1", 19 | "express-jwt": "^6.0.0", 20 | "mssql": "^6.2.0", 21 | "mysql2": "^2.1.0", 22 | "typescript": "^3.9.6" 23 | }, 24 | "devDependencies": { 25 | "@types/assert": "^1.5.1", 26 | "@types/cors": "^2.8.6", 27 | "@types/express": "^4.17.6", 28 | "@types/express-jwt": "0.0.42", 29 | "@types/mocha": "^7.0.2", 30 | "@types/mssql": "^6.0.3", 31 | "@types/mysql2": "github:types/mysql2", 32 | "@typescript-eslint/eslint-plugin": "^3.5.0", 33 | "@typescript-eslint/parser": "^3.5.0", 34 | "eslint": "^7.3.1", 35 | "mocha": "^8.0.1", 36 | "ts-node-dev": "^1.0.0-pre.50" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NodeJS-API-TypeScript-and-Repository-Pattern 2 | Este un proyecto de una API que implementa una arquitectura orientada al uso de repositorios y la facilidad de cambiar de una base de datos a otra a través de la inyección y contenedor de dependencias. 3 | 4 | ## ¿Cómo levantar el proyecto? 5 | El proyecto esta compuesto por 2 proyectos, el primero es para **gestionar los ingresos y salida de efectivo** de nuestro cliente y el segundo para las **credenciales de acceso**. 6 | 7 | Para ambos proyectos deberán instalar los paquetes de npm. 8 | 9 | ``` 10 | npm install 11 | ``` 12 | 13 | Y para levantar el proyecto en modo de desarrollo 14 | 15 | ``` 16 | npm run start:dev 17 | ``` 18 | 19 | ## Base de datos 20 | El proyecto hace uso del patrón repositorio y puede intercambiar entre una base de datos y otra. En ambos casos se adjuntan los scripts para SQL Server y MySQL. 21 | 22 | El usuario por defecto es: 23 | 24 | ``` 25 | usuario: eduardo@kodoti.com 26 | password: 123456 27 | ``` 28 | 29 | 30 | ## ¿Quieres entender mejor este proyecto? 31 | Este proyecto forma parte de nuestro curso que puedes adquirir a través del siguiente enlace. 32 | 33 | https://www.udemy.com/course/node-js-apis-poderosas-con-typescript-repository-pattern/?referralCode=39B3AED9F192102D5465 34 | 35 | Happy Code 🤓 36 | -------------------------------------------------------------------------------- /api.auth/src/controllers/identity.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, POST } from 'awilix-express'; 3 | import { IdentityService } from '../services/identity.service'; 4 | import { BaseController } from '../common/controllers/base.controller'; 5 | import { UserCreateDto } from '../dtos/user.dto'; 6 | 7 | @route('/identity') 8 | export default class IdentityController extends BaseController { 9 | constructor(private identityService: IdentityService) { 10 | super(); 11 | } 12 | 13 | @route('/authenticate') 14 | @POST() 15 | async index(req: Request, res: Response) { 16 | try { 17 | const result = await this.identityService.authenticate( 18 | req.body.email, req.body.password 19 | ); 20 | 21 | res.send(result); 22 | } catch (error) { 23 | this.handleException(error, res); 24 | } 25 | } 26 | 27 | @route('/create') 28 | @POST() 29 | async create(req: Request, res: Response) { 30 | try { 31 | await this.identityService.create({ 32 | email: req.body.email, 33 | password: req.body.password 34 | } as UserCreateDto); 35 | 36 | res.status(204); 37 | res.send(); 38 | } catch (error) { 39 | this.handleException(error, res); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /api.auth/src/services/identity.service.ts: -------------------------------------------------------------------------------- 1 | import connection from '../common/persistence/persistence.mysql'; 2 | import { UserCreateDto } from '../dtos/user.dto'; 3 | import { ApplicationException } from '../common/exceptions/application.exception'; 4 | import SHA from 'sha.js'; 5 | import jwt from 'jsonwebtoken'; 6 | 7 | export class IdentityService { 8 | async authenticate(email: string, password: string): Promise { 9 | const con = await connection; 10 | 11 | // Hash passowrd 12 | password = SHA('sha256').update(password).digest('base64'); 13 | 14 | const [rows]: any[] = await con.execute( 15 | 'SELECT * FROM auth_user WHERE email = ? AND password = ?', 16 | [email, password] 17 | ); 18 | 19 | if (process.env.jwt_secret_key) { 20 | const secretKey: string = process.env.jwt_secret_key; 21 | 22 | if (rows.length) { 23 | return jwt.sign({ 24 | id: rows[0].id, 25 | email: rows[0].email 26 | }, secretKey, { expiresIn: '7h', algorithm: 'ES256' }); 27 | } 28 | } else { 29 | throw new Error('Secret key is not defined.'); 30 | } 31 | 32 | throw new ApplicationException('Invalid user credentials supplied.'); 33 | } 34 | 35 | async create(user: UserCreateDto): Promise { 36 | const con = await connection; 37 | 38 | // Hash password 39 | user.password = SHA('sha256').update(user.password).digest('base64'); 40 | 41 | await con.execute( 42 | 'INSERT INTO auth_user(email, password, created_at) VALUES(?, ?, ?)', 43 | [user.email, user.password, new Date()] 44 | ); 45 | } 46 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mysql/movement.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mysql.persistence"; 2 | import { MovementRepository } from "../../movement.repository"; 3 | import { Movement } from "../../domain/movement"; 4 | 5 | export class MovementMySQLRepository implements MovementRepository { 6 | public async find(id: number): Promise { 7 | const [rows]: any[] = await connector.execute( 8 | 'SELECT * FROM wallet_movement WHERE id = ?', 9 | [id] 10 | ); 11 | 12 | if (rows.length) { 13 | return rows[0]; 14 | } 15 | 16 | return null; 17 | } 18 | 19 | public async all(): Promise { 20 | const [rows]: any[] = await connector.execute( 21 | 'SELECT * FROM wallet_movement ORDER BY id DESC' 22 | ); 23 | 24 | return rows as Movement[]; 25 | } 26 | 27 | public async store(entry: Movement): Promise { 28 | const now = new Date(); 29 | 30 | await connector.execute( 31 | 'INSERT INTO wallet_movement(user_id, type, amount, created_at) VALUES(?, ?, ?, ?)', 32 | [entry.user_id, entry.type, entry.amount, now] 33 | ); 34 | } 35 | 36 | public async update(entry: Movement): Promise { 37 | const now = new Date(); 38 | 39 | await connector.execute( 40 | 'UPDATE wallet_movement SET user_id = ?, type = ?, amount = ?, updated_at = ? WHERE id = ?', 41 | [entry.user_id, entry.type, entry.amount, now, entry.id] 42 | ); 43 | } 44 | 45 | public async remove(id: number): Promise { 46 | await connector.execute( 47 | 'DELETE FROM wallet_movement WHERE id = ?', 48 | [id] 49 | ); 50 | } 51 | } -------------------------------------------------------------------------------- /api.wallet/src/controllers/movement.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, GET, POST } from "awilix-express"; 3 | import { BaseController } from '../common/controllers/base.controller'; 4 | import { MovementService } from '../services/movement.service'; 5 | import { MovementCreateDto } from '../dtos/movement.dto'; 6 | 7 | @route('/movements') 8 | export class MovementController extends BaseController { 9 | constructor( 10 | private readonly movementService: MovementService 11 | ) { 12 | super(); 13 | } 14 | 15 | @GET() 16 | public async all(req: Request, res: Response) { 17 | try { 18 | res.send( 19 | await this.movementService.all() 20 | ); 21 | } catch (error) { 22 | this.handleException(error, res); 23 | } 24 | } 25 | 26 | @route('/:id') 27 | @GET() 28 | public async find(req: Request, res: Response) { 29 | console.log(req.params.id); 30 | try { 31 | const id = parseInt(req.params.id); 32 | 33 | const result = await this.movementService.find(id); 34 | 35 | if (result) { 36 | res.send(result); 37 | } else { 38 | res.status(404); 39 | res.send(); 40 | } 41 | } catch (error) { 42 | this.handleException(error, res); 43 | } 44 | } 45 | 46 | @POST() 47 | public async store(req: Request, res: Response) { 48 | try { 49 | await this.movementService.store({ 50 | type: req.body.type, 51 | amount: req.body.amount, 52 | user_id: req.body.user_id 53 | } as MovementCreateDto); 54 | 55 | res.send(); 56 | } catch (error) { 57 | this.handleException(error, res); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mssql/movement.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mssql.persistence"; 2 | import { MovementRepository } from "../../movement.repository"; 3 | import { Movement } from "../../domain/movement"; 4 | 5 | export class MovementMSSQLRepository implements MovementRepository { 6 | public async find(id: number): Promise { 7 | const pool = await connector; 8 | const result = await pool.query`SELECT * FROM wallet_movement WHERE id = ${id}`; 9 | 10 | if(result.rowsAffected) { 11 | return result.recordset[0]; 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async all(): Promise { 18 | const pool = await connector; 19 | const result = await pool.query`SELECT * FROM wallet_movement ORDER BY id DESC`; 20 | 21 | return result.recordset; 22 | } 23 | 24 | public async store(entry: Movement): Promise { 25 | const pool = await connector; 26 | const now = new Date(); 27 | 28 | await pool.query 29 | `INSERT INTO wallet_movement(user_id, type, amount, created_at) 30 | VALUES(${entry.user_id}, ${entry.type}, ${entry.amount}, ${now})`; 31 | } 32 | 33 | public async update(entry: Movement): Promise { 34 | const pool = await connector; 35 | const now = new Date(); 36 | 37 | await pool.query 38 | `UPDATE wallet_movement 39 | SET user_id = ${entry.user_id}, 40 | type = ${entry.type}, 41 | amount = ${entry.amount}, 42 | updated_at = ${now} 43 | WHERE id = ${entry.id}`; 44 | } 45 | 46 | public async remove(id: number): Promise { 47 | const pool = await connector; 48 | await pool.query`DELETE FROM wallet_movement WHERE id = ${id}`; 49 | } 50 | } -------------------------------------------------------------------------------- /api.wallet/src/services/subscription.service.ts: -------------------------------------------------------------------------------- 1 | import { SubscriptionRepository } from "./repositories/subscription.repository"; 2 | import { Subscription } from "./repositories/domain/subscription"; 3 | import { ApplicationException } from "../common/exceptions/application.exception"; 4 | import { SubscriptionUpdateDto, SubscriptionCreateDto } from "../dtos/subscription.dto"; 5 | 6 | export class SubscriptionService { 7 | constructor( 8 | private readonly subscriptionRepository: SubscriptionRepository 9 | ) { } 10 | 11 | public async find(id: number): Promise { 12 | return await this.subscriptionRepository.find(id); 13 | } 14 | 15 | public async all(): Promise { 16 | return await this.subscriptionRepository.all(); 17 | } 18 | 19 | public async store(entry: SubscriptionCreateDto): Promise { 20 | const originalEntry = await this.subscriptionRepository.findByUserIdAndCode(entry.user_id, entry.code); 21 | 22 | if (!originalEntry) { 23 | await this.subscriptionRepository.store(entry as Subscription); 24 | } else { 25 | throw new ApplicationException('User subscription already exists.'); 26 | } 27 | } 28 | 29 | public async update(id: number, entry: SubscriptionUpdateDto): Promise { 30 | let originalEntry = await this.subscriptionRepository.find(id); 31 | 32 | if (originalEntry) { 33 | originalEntry.code = entry.code; 34 | originalEntry.amount = entry.amount; 35 | originalEntry.cron = entry.cron; 36 | 37 | await this.subscriptionRepository.update(originalEntry); 38 | } else { 39 | throw new ApplicationException('Subscription not found.'); 40 | } 41 | } 42 | 43 | public async remove(id: number): Promise { 44 | await this.subscriptionRepository.remove(id); 45 | } 46 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mock/movement.repository.ts: -------------------------------------------------------------------------------- 1 | import db from "../../../../common/persistence/mock.persistence"; 2 | import { MovementRepository } from "../../movement.repository"; 3 | import { Movement } from "../../domain/movement"; 4 | 5 | export class MovementMockRepository implements MovementRepository { 6 | public async find(id: number): Promise { 7 | const table = db.movements as Movement[]; 8 | const result = table.find(x => x.id === id); 9 | 10 | if (result) { 11 | return Object.assign({ ...result }); 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async all(): Promise { 18 | const table = db.movements as Movement[]; 19 | return Object.assign([...table]); 20 | } 21 | 22 | public async store(entry: Movement): Promise { 23 | const table = db.movements as Movement[]; 24 | const now = new Date(); 25 | 26 | db._movementId++; 27 | 28 | table.push({ 29 | id: db._movementId, 30 | type: entry.type, 31 | amount: entry.amount, 32 | user_id: entry.user_id, 33 | created_at: now, 34 | updated_at: null, 35 | } as Movement); 36 | } 37 | 38 | public async update(entry: Movement): Promise { 39 | const table = db.movements as Movement[]; 40 | const now = new Date(); 41 | 42 | const originalEntry = table.find(x => x.id === entry.id); 43 | 44 | if (originalEntry) { 45 | originalEntry.type = entry.type; 46 | originalEntry.user_id = entry.user_id; 47 | originalEntry.amount = entry.amount; 48 | originalEntry.updated_at = now; 49 | } 50 | } 51 | 52 | public async remove(id: number): Promise { 53 | let table = db.movements as Movement[]; 54 | db.movements = table.filter(x => x.id === id) as any; 55 | } 56 | } -------------------------------------------------------------------------------- /api.wallet/src/services/movement.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { MovementService } from './movement.service'; 2 | import { MovementMockRepository } from './repositories/impl/mock/movement.repository'; 3 | import { BalanceMockRepository } from './repositories/impl/mock/balance.repository'; 4 | import { MovementCreateDto } from '../dtos/movement.dto'; 5 | import assert = require('assert'); 6 | 7 | const movementService = new MovementService( 8 | new MovementMockRepository(), 9 | new BalanceMockRepository() 10 | ); 11 | 12 | describe('Movement.Service', () => { 13 | describe('Store', () => { 14 | it('tries to register an income movement', async () => { 15 | await movementService.store({ 16 | user_id: 1, 17 | type: 0, 18 | amount: 200 19 | } as MovementCreateDto); 20 | }); 21 | 22 | it('tries to register an outcome movement', async () => { 23 | await movementService.store({ 24 | user_id: 2, 25 | type: 1, 26 | amount: 100 27 | } as MovementCreateDto); 28 | }); 29 | 30 | it('tries to register an outcome movement with insufficient balance', async () => { 31 | try { 32 | await movementService.store({ 33 | user_id: 1, 34 | type: 1, 35 | amount: 200 36 | } as MovementCreateDto); 37 | } catch (error) { 38 | assert.equal(error.message, 'User does not have enough balance.'); 39 | } 40 | }); 41 | 42 | it('tries to register an unexpected movement', async () => { 43 | try { 44 | await movementService.store({ 45 | user_id: 1, 46 | type: 9999, 47 | amount: 200 48 | } as MovementCreateDto); 49 | } catch (error) { 50 | assert.equal(error.message, 'Invalid movement type supplied.'); 51 | } 52 | }); 53 | }); 54 | }); -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mysql/balance.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mysql.persistence"; 2 | import { Balance } from "../../domain/balance"; 3 | import { BalanceRepository } from "../../balance.repository"; 4 | 5 | export class BalanceMysqlRepository implements BalanceRepository { 6 | public async find(id: number): Promise { 7 | const [rows]: any[] = await connector.execute( 8 | 'SELECT * FROM wallet_balance WHERE id = ?', 9 | [id] 10 | ); 11 | 12 | if (rows.length) { 13 | return rows[0]; 14 | } 15 | 16 | return null; 17 | } 18 | 19 | public async findByUserId(userId: number): Promise { 20 | const [rows]: any[] = await connector.execute( 21 | 'SELECT * FROM wallet_balance WHERE user_id = ?', 22 | [userId] 23 | ); 24 | 25 | if (rows.length) { 26 | return rows[0]; 27 | } 28 | 29 | return null; 30 | } 31 | 32 | public async all(): Promise { 33 | const [rows]: any[] = await connector.execute( 34 | 'SELECT * FROM wallet_balance ORDER BY id DESC' 35 | ); 36 | 37 | return rows as Balance[]; 38 | } 39 | 40 | public async store(entry: Balance): Promise { 41 | const now = new Date(); 42 | 43 | await connector.execute( 44 | 'INSERT INTO wallet_balance(user_id, amount, created_at) VALUES(?, ?, ?)', 45 | [entry.user_id, entry.amount, now] 46 | ); 47 | } 48 | 49 | public async update(entry: Balance): Promise { 50 | const now = new Date(); 51 | 52 | await connector.execute( 53 | 'UPDATE wallet_balance SET user_id = ?, amount = ?, updated_at = ? WHERE id = ?', 54 | [entry.user_id, entry.amount, now, entry.id] 55 | ); 56 | } 57 | 58 | public async remove(id: number): Promise { 59 | await connector.execute( 60 | 'DELETE FROM wallet_balance WHERE id = ?', 61 | [id] 62 | ); 63 | } 64 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mock/balance.repository.ts: -------------------------------------------------------------------------------- 1 | import db from "../../../../common/persistence/mock.persistence"; 2 | import { Balance } from "../../domain/balance"; 3 | import { BalanceRepository } from "../../balance.repository"; 4 | 5 | export class BalanceMockRepository implements BalanceRepository { 6 | public async find(id: number): Promise { 7 | const table = db.balances as Balance[]; 8 | const result = table.find(x => x.id === id); 9 | 10 | if (result) { 11 | return Object.assign({ ...result }); 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async findByUserId(userId: number): Promise { 18 | const table = db.balances as Balance[]; 19 | const result = table.find(x => x.user_id === userId); 20 | 21 | if (result) { 22 | return Object.assign({ ...result });; 23 | } 24 | 25 | return null; 26 | } 27 | 28 | public async all(): Promise { 29 | const table = db.balances as Balance[]; 30 | return Object.assign([...table]); 31 | } 32 | 33 | public async store(entry: Balance): Promise { 34 | const table = db.balances as Balance[]; 35 | const now = new Date(); 36 | 37 | // set id value 38 | db._balanceId++; 39 | 40 | table.push({ 41 | id: db._balanceId, 42 | amount: entry.amount, 43 | user_id: entry.user_id, 44 | created_at: now, 45 | updated_at: null 46 | } as Balance); 47 | } 48 | 49 | public async update(entry: Balance): Promise { 50 | const table = db.balances as Balance[]; 51 | const now = new Date(); 52 | 53 | let originalEntry = table.find(x => x.id === entry.id); 54 | 55 | if (originalEntry) { 56 | originalEntry.user_id = entry.user_id; 57 | originalEntry.amount = entry.amount; 58 | originalEntry.updated_at = now; 59 | } 60 | } 61 | 62 | public async remove(id: number): Promise { 63 | let table = db.balances as Balance[]; 64 | 65 | table = table.filter(x => x.id !== id); 66 | } 67 | } -------------------------------------------------------------------------------- /api.wallet/src/container.ts: -------------------------------------------------------------------------------- 1 | import express = require('express'); 2 | import { createContainer, asClass } from "awilix"; 3 | import { scopePerRequest } from "awilix-express"; 4 | import { TestService } from "./services/test.service"; 5 | import { SubscriptionMySQLRepository } from './services/repositories/impl/mysql/subscription.repository'; 6 | import { SubscriptionService } from './services/subscription.service'; 7 | import { MovementMySQLRepository } from './services/repositories/impl/mysql/movement.repository'; 8 | import { BalanceMysqlRepository } from './services/repositories/impl/mysql/balance.repository'; 9 | import { MovementService } from './services/movement.service'; 10 | import { SubscriptionMSSQLRepository } from './services/repositories/impl/mssql/subscription.repository'; 11 | import { MovementMSSQLRepository } from './services/repositories/impl/mssql/movement.repository'; 12 | import { BalanceMSSQLRepository } from './services/repositories/impl/mssql/balance.repository'; 13 | import { SubscriptionMockRepository } from './services/repositories/impl/mock/subscription.repository'; 14 | 15 | export default (app: express.Application): void => { 16 | const container = createContainer({ 17 | injectionMode: 'CLASSIC' 18 | }); 19 | 20 | container.register({ 21 | // repositories 22 | // subscriptionRepository: asClass(SubscriptionMockRepository).scoped(), 23 | // movementRepository: asClass(MovementMSSQLRepository).scoped(), 24 | // balanceRepository: asClass(BalanceMSSQLRepository).scoped(), 25 | // subscriptionRepository: asClass(SubscriptionMSSQLRepository).scoped(), 26 | // movementRepository: asClass(MovementMSSQLRepository).scoped(), 27 | // balanceRepository: asClass(BalanceMSSQLRepository).scoped(), 28 | subscriptionRepository: asClass(SubscriptionMySQLRepository).scoped(), 29 | movementRepository: asClass(MovementMySQLRepository).scoped(), 30 | balanceRepository: asClass(BalanceMysqlRepository).scoped(), 31 | 32 | // services 33 | subscriptionService: asClass(SubscriptionService).scoped(), 34 | movementService: asClass(MovementService).scoped(), 35 | testService: asClass(TestService).scoped() 36 | }); 37 | 38 | app.use(scopePerRequest(container)); 39 | }; -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mssql/balance.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mssql.persistence"; 2 | import { Balance } from "../../domain/balance"; 3 | import { BalanceRepository } from "../../balance.repository"; 4 | 5 | export class BalanceMSSQLRepository implements BalanceRepository { 6 | public async find(id: number): Promise { 7 | const pool = await connector; 8 | const result = await pool.query`SELECT * FROM wallet_balance WHERE id = ${id}`; 9 | 10 | if (result.rowsAffected) { 11 | return result.recordset[0]; 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async findByUserId(userId: number): Promise { 18 | const pool = await connector; 19 | const result = await pool.query`SELECT * FROM wallet_balance WHERE user_id = ${userId}`; 20 | 21 | if (result.rowsAffected) { 22 | return result.recordset[0]; 23 | } 24 | 25 | return null; 26 | } 27 | 28 | public async all(): Promise { 29 | const pool = await connector; 30 | const result = await pool.query`SELECT * FROM wallet_balance ORDER BY id DESC`; 31 | 32 | return result.recordset; 33 | } 34 | 35 | public async store(entry: Balance): Promise { 36 | const pool = await connector; 37 | const now = new Date(); 38 | 39 | entry.created_at = now; 40 | 41 | await pool.query 42 | `INSERT INTO wallet_balance(user_id, amount, created_at) 43 | VALUES(${entry.user_id}, ${entry.amount}, ${entry.created_at})`; 44 | } 45 | 46 | public async update(entry: Balance): Promise { 47 | const pool = await connector; 48 | const now = new Date(); 49 | 50 | entry.updated_at = now; 51 | 52 | await pool.query 53 | `UPDATE wallet_balance 54 | SET user_id = ${entry.user_id}, 55 | amount = ${entry.amount}, 56 | updated_at = ${entry.updated_at} 57 | WHERE id = ${entry.id}`; 58 | } 59 | 60 | public async remove(id: number): Promise { 61 | const pool = await connector; 62 | 63 | await pool.query`DELETE FROM wallet_balance WHERE id = ${id}`; 64 | } 65 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mysql/subscription.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mysql.persistence"; 2 | import { Subscription } from "../../domain/subscription"; 3 | import { SubscriptionRepository } from "../../subscription.repository"; 4 | 5 | export class SubscriptionMySQLRepository implements SubscriptionRepository { 6 | public async all(): Promise { 7 | const [rows] = await connector.execute( 8 | 'SELECT * FROM wallet_subscription ORDER BY id DESC' 9 | ); 10 | 11 | return rows as Subscription[]; 12 | } 13 | 14 | public async find(id: Number): Promise { 15 | const [rows]: any[] = await connector.execute( 16 | 'SELECT * FROM wallet_subscription WHERE id = ?', 17 | [id] 18 | ); 19 | 20 | if (rows.length) { 21 | return rows[0] as Subscription; 22 | } 23 | 24 | return null; 25 | } 26 | 27 | public async findByUserIdAndCode(user_id: Number, code: string): Promise { 28 | const [rows]: any[] = await connector.execute( 29 | 'SELECT * FROM wallet_subscription WHERE user_id = ? AND code = ?', 30 | [user_id, code] 31 | ); 32 | 33 | if (rows.length) { 34 | return rows[0] as Subscription; 35 | } 36 | 37 | return null; 38 | } 39 | 40 | public async store(entry: Subscription): Promise { 41 | const now = new Date(); 42 | 43 | await connector.execute( 44 | 'INSERT INTO wallet_subscription(user_id, code, amount, cron, created_at) VALUES(?, ?, ?, ?, ?)', 45 | [entry.user_id, entry.code, entry.amount, entry.cron, now] 46 | ) 47 | } 48 | 49 | public async update(entry: Subscription): Promise { 50 | const now = new Date(); 51 | 52 | await connector.execute( 53 | 'UPDATE wallet_subscription SET user_id = ?, code = ?, amount = ?, cron = ?, updated_at = ? WHERE id = ?', 54 | [entry.user_id, entry.code, entry.amount, entry.cron, now, entry.id] 55 | ) 56 | } 57 | 58 | public async remove(id: Number): Promise { 59 | await connector.execute( 60 | 'DELETE FROM wallet_subscription WHERE id = ?', 61 | [id] 62 | ) 63 | } 64 | } -------------------------------------------------------------------------------- /api.wallet/src/services/movement.service.ts: -------------------------------------------------------------------------------- 1 | import { MovementRepository } from "./repositories/movement.repository"; 2 | import { BalanceRepository } from "./repositories/balance.repository"; 3 | import { Movement } from "./repositories/domain/movement"; 4 | import { MovementCreateDto } from "../dtos/movement.dto"; 5 | import { MovementType } from "../common/enums/movement-type"; 6 | import { ApplicationException } from "../common/exceptions/application.exception"; 7 | import { Balance } from "./repositories/domain/balance"; 8 | 9 | export class MovementService { 10 | constructor( 11 | private readonly movementRepository: MovementRepository, 12 | private readonly balanceRepository: BalanceRepository 13 | ) { } 14 | 15 | public async find(id: number): Promise { 16 | return await this.movementRepository.find(id); 17 | } 18 | 19 | public async all(): Promise { 20 | return await this.movementRepository.all(); 21 | } 22 | 23 | public async store(entry: MovementCreateDto): Promise { 24 | const balance = await this.balanceRepository.findByUserId(entry.user_id); 25 | 26 | if (entry.type === MovementType.income) { 27 | await this.income(entry, balance); 28 | } else if (entry.type === MovementType.outcome) { 29 | await this.outcome(entry, balance); 30 | } else { 31 | throw new ApplicationException('Invalid movement type supplied.'); 32 | } 33 | } 34 | 35 | private async income(entry: MovementCreateDto, balance: Balance | null) { 36 | if (!balance) { 37 | await this.balanceRepository.store({ 38 | amount: entry.amount, 39 | user_id: entry.user_id 40 | } as Balance); 41 | } else { 42 | balance.amount += entry.amount; 43 | await this.balanceRepository.update(balance); 44 | } 45 | 46 | await this.movementRepository.store(entry as Movement); 47 | } 48 | 49 | private async outcome(entry: MovementCreateDto, balance: Balance | null) { 50 | if (!balance || balance.amount < entry.amount) { 51 | throw new ApplicationException('User does not have enough balance.'); 52 | } else { 53 | balance.amount -= entry.amount; 54 | 55 | await this.balanceRepository.update(balance); 56 | await this.movementRepository.store(entry as Movement); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mock/subscription.repository.ts: -------------------------------------------------------------------------------- 1 | import db from "../../../../common/persistence/mock.persistence"; 2 | import { SubscriptionRepository } from "../../subscription.repository"; 3 | import { Subscription } from "../../domain/subscription"; 4 | 5 | export class SubscriptionMockRepository implements SubscriptionRepository { 6 | public async find(id: number): Promise { 7 | const table = db.subscriptions as Subscription[]; 8 | const result = table.find(x => x.id === id); 9 | 10 | if (result) { 11 | return Object.assign({ ...result }); 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async findByUserIdAndCode(userId: number, code: string): Promise { 18 | const table = db.subscriptions as Subscription[]; 19 | const result = table.find(x => x.user_id === userId && x.code === code); 20 | 21 | if (result) { 22 | return Object.assign({ ...result });; 23 | } 24 | 25 | return null; 26 | } 27 | 28 | public async all(): Promise { 29 | const table = db.subscriptions as Subscription[]; 30 | return Object.assign([...table]); 31 | } 32 | 33 | public async store(entry: Subscription): Promise { 34 | const table = db.subscriptions as Subscription[]; 35 | const now = new Date(); 36 | 37 | // set id value 38 | db._subscriptionId++; 39 | 40 | table.push({ 41 | id: db._subscriptionId, 42 | code: entry.code, 43 | amount: entry.amount, 44 | user_id: entry.user_id, 45 | cron: entry.cron, 46 | created_at: now, 47 | updated_at: null, 48 | } as Subscription); 49 | } 50 | 51 | public async update(entry: Subscription): Promise { 52 | const table = db.subscriptions as Subscription[]; 53 | const now = new Date(); 54 | 55 | let originalEntry = table.find(x => x.id === entry.id); 56 | 57 | if (originalEntry) { 58 | originalEntry.code = entry.code; 59 | originalEntry.user_id = entry.user_id; 60 | originalEntry.amount = entry.amount; 61 | originalEntry.cron = entry.cron; 62 | originalEntry.updated_at = now; 63 | } 64 | } 65 | 66 | public async remove(id: number): Promise { 67 | let table = db.subscriptions as Subscription[]; 68 | 69 | table = table.filter(x => x.id !== id); 70 | } 71 | } -------------------------------------------------------------------------------- /api.wallet/src/services/repositories/impl/mssql/subscription.repository.ts: -------------------------------------------------------------------------------- 1 | import connector from "../../../../common/persistence/mssql.persistence"; 2 | import { Subscription } from "../../domain/subscription"; 3 | import { SubscriptionRepository } from "../../subscription.repository"; 4 | 5 | export class SubscriptionMSSQLRepository implements SubscriptionRepository { 6 | public async find(id: number): Promise { 7 | const pool = await connector; 8 | const result = await pool.query`SELECT * FROM wallet_subscription WHERE id = ${id}`; 9 | 10 | if (result.rowsAffected) { 11 | return result.recordset[0]; 12 | } 13 | 14 | return null; 15 | } 16 | 17 | public async findByUserIdAndCode(userId: number, code: string): Promise { 18 | const pool = await connector; 19 | const result = await pool.query`SELECT * FROM wallet_subscription WHERE user_id = ${userId} AND code ${code}`; 20 | 21 | if (result.rowsAffected) { 22 | return result.recordset[0]; 23 | } 24 | 25 | return null; 26 | } 27 | 28 | public async all(): Promise { 29 | const pool = await connector; 30 | const result = await pool.query`SELECT * FROM wallet_subscription ORDER BY id DESC`; 31 | 32 | return result.recordset; 33 | } 34 | 35 | public async store(entry: Subscription): Promise { 36 | const pool = await connector; 37 | const now = new Date(); 38 | 39 | entry.created_at = now; 40 | 41 | await pool.query 42 | `INSERT INTO wallet_subscription(user_id, code, amount, cron, created_at) 43 | VALUES(${entry.user_id}, ${entry.code}, ${entry.amount}, ${entry.cron}, ${entry.created_at})`; 44 | } 45 | 46 | public async update(entry: Subscription): Promise { 47 | const pool = await connector; 48 | const now = new Date(); 49 | 50 | entry.updated_at = now; 51 | 52 | await pool.query 53 | `UPDATE wallet_subscription 54 | SET user_id = ${entry.user_id}, 55 | code = ${entry.code}, 56 | amount = ${entry.amount}, 57 | cron = ${entry.cron}, 58 | updated_at = ${entry.updated_at} 59 | WHERE id = ${entry.id}`; 60 | } 61 | 62 | public async remove(id: number): Promise { 63 | const pool = await connector; 64 | 65 | await pool.query`DELETE FROM wallet_subscription WHERE id = ${id}`; 66 | } 67 | } -------------------------------------------------------------------------------- /api.wallet/src/controllers/subscription.controller.ts: -------------------------------------------------------------------------------- 1 | import { Request, Response } from 'express'; 2 | import { route, GET, POST, PUT, DELETE } from "awilix-express"; 3 | import { SubscriptionService } from '../services/subscription.service'; 4 | import { BaseController } from '../common/controllers/base.controller'; 5 | import { SubscriptionCreateDto, SubscriptionUpdateDto } from '../dtos/subscription.dto'; 6 | 7 | @route('/subscriptions') 8 | export class SubscriptionController extends BaseController { 9 | constructor( 10 | private readonly subscriptionService: SubscriptionService 11 | ) { 12 | super(); 13 | } 14 | 15 | @GET() 16 | public async all(req: Request, res: Response) { 17 | try { 18 | res.send( 19 | await this.subscriptionService.all() 20 | ); 21 | } catch (error) { 22 | this.handleException(error, res); 23 | } 24 | } 25 | 26 | // Ex: subscriptions/1 27 | @route('/:id') 28 | @GET() 29 | public async find(req: Request, res: Response) { 30 | console.log(req.params.id); 31 | try { 32 | const id = parseInt(req.params.id); 33 | 34 | const result = await this.subscriptionService.find(id); 35 | 36 | if (result) { 37 | res.send(result); 38 | } else { 39 | res.status(404); 40 | res.send(); 41 | } 42 | } catch (error) { 43 | this.handleException(error, res); 44 | } 45 | } 46 | 47 | @POST() 48 | public async store(req: Request, res: Response) { 49 | try { 50 | await this.subscriptionService.store({ 51 | user_id: req.body.user_id, 52 | code: req.body.code, 53 | amount: req.body.amount, 54 | cron: req.body.cron 55 | } as SubscriptionCreateDto); 56 | 57 | res.send(); 58 | } catch (error) { 59 | this.handleException(error, res); 60 | } 61 | } 62 | 63 | @route('/:id') 64 | @PUT() 65 | public async update(req: Request, res: Response) { 66 | try { 67 | const id = parseInt(req.params.id); 68 | 69 | await this.subscriptionService.update(id, { 70 | code: req.body.code, 71 | amount: req.body.amount, 72 | cron: req.body.cron 73 | } as SubscriptionUpdateDto); 74 | 75 | res.send(); 76 | } catch (error) { 77 | this.handleException(error, res); 78 | } 79 | } 80 | 81 | @route('/:id') 82 | @DELETE() 83 | public async remove(req: Request, res: Response) { 84 | try { 85 | const id = parseInt(req.params.id); 86 | 87 | await this.subscriptionService.remove(id); 88 | 89 | res.send(); 90 | } catch (error) { 91 | this.handleException(error, res); 92 | } 93 | } 94 | } -------------------------------------------------------------------------------- /mysql-script.sql: -------------------------------------------------------------------------------- 1 | -- -------------------------------------------------------- 2 | -- Host: 127.0.0.1 3 | -- Versión del servidor: 10.4.10-MariaDB - mariadb.org binary distribution 4 | -- SO del servidor: Win64 5 | -- HeidiSQL Versión: 10.2.0.5599 6 | -- -------------------------------------------------------- 7 | 8 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 9 | /*!40101 SET NAMES utf8 */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 12 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 13 | 14 | 15 | -- Volcando estructura de base de datos para kodoti_wallet 16 | CREATE DATABASE IF NOT EXISTS `kodoti_wallet` /*!40100 DEFAULT CHARACTER SET utf8 */; 17 | USE `kodoti_wallet`; 18 | 19 | -- Volcando estructura para tabla kodoti_wallet.auth_user 20 | CREATE TABLE IF NOT EXISTS `auth_user` ( 21 | `id` int(11) NOT NULL AUTO_INCREMENT, 22 | `email` varchar(100) NOT NULL, 23 | `password` varchar(100) NOT NULL, 24 | `created_at` timestamp NULL DEFAULT NULL, 25 | `updated_at` timestamp NULL DEFAULT NULL, 26 | PRIMARY KEY (`id`), 27 | UNIQUE KEY `email` (`email`) 28 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 29 | 30 | -- La exportación de datos fue deseleccionada. 31 | 32 | -- Volcando estructura para tabla kodoti_wallet.wallet_balance 33 | CREATE TABLE IF NOT EXISTS `wallet_balance` ( 34 | `id` int(11) NOT NULL AUTO_INCREMENT, 35 | `user_id` int(11) NOT NULL, 36 | `amount` decimal(10,2) NOT NULL, 37 | `created_at` datetime DEFAULT NULL, 38 | `updated_at` datetime DEFAULT NULL, 39 | PRIMARY KEY (`id`) 40 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 41 | 42 | -- La exportación de datos fue deseleccionada. 43 | 44 | -- Volcando estructura para tabla kodoti_wallet.wallet_movement 45 | CREATE TABLE IF NOT EXISTS `wallet_movement` ( 46 | `id` int(11) NOT NULL AUTO_INCREMENT, 47 | `user_id` int(11) NOT NULL, 48 | `type` tinyint(4) NOT NULL, 49 | `amount` decimal(10,2) NOT NULL, 50 | `created_at` datetime DEFAULT NULL, 51 | `updated_at` datetime DEFAULT NULL, 52 | PRIMARY KEY (`id`) 53 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 54 | 55 | -- La exportación de datos fue deseleccionada. 56 | 57 | -- Volcando estructura para tabla kodoti_wallet.wallet_subscription 58 | CREATE TABLE IF NOT EXISTS `wallet_subscription` ( 59 | `id` int(11) NOT NULL AUTO_INCREMENT, 60 | `user_id` int(11) NOT NULL, 61 | `code` varchar(20) NOT NULL, 62 | `amount` decimal(10,2) NOT NULL, 63 | `cron` varchar(50) NOT NULL, 64 | `created_at` datetime DEFAULT NULL, 65 | `updated_at` datetime DEFAULT NULL, 66 | PRIMARY KEY (`id`) 67 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 68 | 69 | -- La exportación de datos fue deseleccionada. 70 | 71 | /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; 72 | /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; 73 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 74 | 75 | 76 | -- Default user 77 | INSERT INTO `auth_user` (`email`, `password`, `created_at`, `updated_at`) VALUES 78 | ('eduardo@kodoti.com', 'jZae727K08KaOmKSgOaGzww/XVqGr/PKEgIMkjrcbJI=', '2020-07-09 00:36:13', NULL); -------------------------------------------------------------------------------- /api.auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "ESNEXT", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | // "lib": [], /* Specify library files to be included in the compilation. */ 8 | // "allowJs": true, /* Allow javascript files to be compiled. */ 9 | // "checkJs": true, /* Report errors in .js files. */ 10 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 11 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 12 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 13 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 14 | // "outFile": "./", /* Concatenate and emit output to single file. */ 15 | // "outDir": "./", /* Redirect output structure to the directory. */ 16 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 17 | // "composite": true, /* Enable project compilation */ 18 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 19 | // "removeComments": true, /* Do not emit comments to output. */ 20 | // "noEmit": true, /* Do not emit outputs. */ 21 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 22 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 23 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 24 | 25 | /* Strict Type-Checking Options */ 26 | "strict": true, /* Enable all strict type-checking options. */ 27 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 28 | // "strictNullChecks": true, /* Enable strict null checks. */ 29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 34 | 35 | /* Additional Checks */ 36 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 37 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 38 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 39 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 40 | 41 | /* Module Resolution Options */ 42 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 43 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 44 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 45 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 46 | // "typeRoots": [], /* List of folders to include type definitions from. */ 47 | // "types": [], /* Type declaration files to be included in compilation. */ 48 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 49 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 50 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 51 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 52 | 53 | /* Source Map Options */ 54 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 55 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 58 | 59 | /* Experimental Options */ 60 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 61 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 62 | 63 | /* Advanced Options */ 64 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /api.wallet/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "ESNEXT", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | // "lib": [], /* Specify library files to be included in the compilation. */ 8 | // "allowJs": true, /* Allow javascript files to be compiled. */ 9 | // "checkJs": true, /* Report errors in .js files. */ 10 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 11 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 12 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 13 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 14 | // "outFile": "./", /* Concatenate and emit output to single file. */ 15 | // "outDir": "./", /* Redirect output structure to the directory. */ 16 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 17 | // "composite": true, /* Enable project compilation */ 18 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 19 | // "removeComments": true, /* Do not emit comments to output. */ 20 | // "noEmit": true, /* Do not emit outputs. */ 21 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 22 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 23 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 24 | 25 | /* Strict Type-Checking Options */ 26 | "strict": true, /* Enable all strict type-checking options. */ 27 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 28 | // "strictNullChecks": true, /* Enable strict null checks. */ 29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 34 | 35 | /* Additional Checks */ 36 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 37 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 38 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 39 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 40 | 41 | /* Module Resolution Options */ 42 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 43 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 44 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 45 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 46 | // "typeRoots": [], /* List of folders to include type definitions from. */ 47 | // "types": [], /* Type declaration files to be included in compilation. */ 48 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 49 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 50 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 51 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 52 | 53 | /* Source Map Options */ 54 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 55 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 58 | 59 | /* Experimental Options */ 60 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 61 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 62 | 63 | /* Advanced Options */ 64 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /api.auth/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api.auth", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/body-parser": { 8 | "version": "1.19.0", 9 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", 10 | "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", 11 | "dev": true, 12 | "requires": { 13 | "@types/connect": "*", 14 | "@types/node": "*" 15 | } 16 | }, 17 | "@types/connect": { 18 | "version": "3.4.33", 19 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", 20 | "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", 21 | "dev": true, 22 | "requires": { 23 | "@types/node": "*" 24 | } 25 | }, 26 | "@types/express": { 27 | "version": "4.17.6", 28 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.6.tgz", 29 | "integrity": "sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w==", 30 | "dev": true, 31 | "requires": { 32 | "@types/body-parser": "*", 33 | "@types/express-serve-static-core": "*", 34 | "@types/qs": "*", 35 | "@types/serve-static": "*" 36 | } 37 | }, 38 | "@types/express-serve-static-core": { 39 | "version": "4.17.8", 40 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.8.tgz", 41 | "integrity": "sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw==", 42 | "dev": true, 43 | "requires": { 44 | "@types/node": "*", 45 | "@types/qs": "*", 46 | "@types/range-parser": "*" 47 | } 48 | }, 49 | "@types/jsonwebtoken": { 50 | "version": "8.5.0", 51 | "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", 52 | "integrity": "sha512-9bVao7LvyorRGZCw0VmH/dr7Og+NdjYSsKAxB43OQoComFbBgsEpoR9JW6+qSq/ogwVBg8GI2MfAlk4SYI4OLg==", 53 | "dev": true, 54 | "requires": { 55 | "@types/node": "*" 56 | } 57 | }, 58 | "@types/mime": { 59 | "version": "2.0.2", 60 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.2.tgz", 61 | "integrity": "sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q==", 62 | "dev": true 63 | }, 64 | "@types/mysql": { 65 | "version": "github:types/mysql#c26b1bc2bac17010081455e3127a90fb2eafcec9", 66 | "from": "github:types/mysql", 67 | "dev": true 68 | }, 69 | "@types/mysql2": { 70 | "version": "github:types/mysql2#d4ef3b2292f328049f7e4c545f6adab7d6a350a9", 71 | "from": "github:types/mysql2", 72 | "dev": true, 73 | "requires": { 74 | "@types/mysql": "github:types/mysql" 75 | } 76 | }, 77 | "@types/node": { 78 | "version": "14.0.14", 79 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.14.tgz", 80 | "integrity": "sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==", 81 | "dev": true 82 | }, 83 | "@types/qs": { 84 | "version": "6.9.3", 85 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", 86 | "integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==", 87 | "dev": true 88 | }, 89 | "@types/range-parser": { 90 | "version": "1.2.3", 91 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", 92 | "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", 93 | "dev": true 94 | }, 95 | "@types/serve-static": { 96 | "version": "1.13.4", 97 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.4.tgz", 98 | "integrity": "sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug==", 99 | "dev": true, 100 | "requires": { 101 | "@types/express-serve-static-core": "*", 102 | "@types/mime": "*" 103 | } 104 | }, 105 | "@types/sha.js": { 106 | "version": "2.4.0", 107 | "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.0.tgz", 108 | "integrity": "sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ==", 109 | "dev": true, 110 | "requires": { 111 | "@types/node": "*" 112 | } 113 | }, 114 | "@types/strip-bom": { 115 | "version": "3.0.0", 116 | "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", 117 | "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=", 118 | "dev": true 119 | }, 120 | "@types/strip-json-comments": { 121 | "version": "0.0.30", 122 | "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", 123 | "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", 124 | "dev": true 125 | }, 126 | "accepts": { 127 | "version": "1.3.7", 128 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 129 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 130 | "requires": { 131 | "mime-types": "~2.1.24", 132 | "negotiator": "0.6.2" 133 | } 134 | }, 135 | "ansicolors": { 136 | "version": "0.3.2", 137 | "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", 138 | "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=" 139 | }, 140 | "anymatch": { 141 | "version": "3.1.1", 142 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", 143 | "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", 144 | "dev": true, 145 | "requires": { 146 | "normalize-path": "^3.0.0", 147 | "picomatch": "^2.0.4" 148 | } 149 | }, 150 | "arg": { 151 | "version": "4.1.3", 152 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 153 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 154 | "dev": true 155 | }, 156 | "array-find-index": { 157 | "version": "1.0.2", 158 | "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", 159 | "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", 160 | "dev": true 161 | }, 162 | "array-flatten": { 163 | "version": "1.1.1", 164 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 165 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 166 | }, 167 | "awilix": { 168 | "version": "4.2.6", 169 | "resolved": "https://registry.npmjs.org/awilix/-/awilix-4.2.6.tgz", 170 | "integrity": "sha512-28avOdjml+yvy4iDFhsC+r7Z5ImR0MM5NNjgVvNbr6bQXv6uwXGS9cMbvUn/pEWNPh+sv88/pyJSvWlBIXXpuw==", 171 | "requires": { 172 | "camel-case": "^4.1.1", 173 | "glob": "^7.1.6" 174 | } 175 | }, 176 | "awilix-express": { 177 | "version": "3.0.0", 178 | "resolved": "https://registry.npmjs.org/awilix-express/-/awilix-express-3.0.0.tgz", 179 | "integrity": "sha512-myVcKc27nfcdOH11/H7YKJQ66RMALytatP7cWjw3zLZryafHURXBdKrIhC9Yvm/WdrvTn9I2JGwzCGAfX4urfg==", 180 | "requires": { 181 | "awilix-router-core": "^1.6.1", 182 | "tslib": "^1.10.0" 183 | } 184 | }, 185 | "awilix-router-core": { 186 | "version": "1.6.1", 187 | "resolved": "https://registry.npmjs.org/awilix-router-core/-/awilix-router-core-1.6.1.tgz", 188 | "integrity": "sha512-Zs2YUSkV8v1PJ6dEp7td/OjQ81gjwsk/lBHMFCwZDpe17efJaz4WNsB97Y/X/FOQ7vQ3+c87+Nvh1HCmHxrhPQ==", 189 | "requires": { 190 | "glob": "^7.1.3", 191 | "tslib": "^1.9.3" 192 | } 193 | }, 194 | "balanced-match": { 195 | "version": "1.0.0", 196 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 197 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 198 | }, 199 | "binary-extensions": { 200 | "version": "2.1.0", 201 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", 202 | "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", 203 | "dev": true 204 | }, 205 | "body-parser": { 206 | "version": "1.19.0", 207 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 208 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 209 | "requires": { 210 | "bytes": "3.1.0", 211 | "content-type": "~1.0.4", 212 | "debug": "2.6.9", 213 | "depd": "~1.1.2", 214 | "http-errors": "1.7.2", 215 | "iconv-lite": "0.4.24", 216 | "on-finished": "~2.3.0", 217 | "qs": "6.7.0", 218 | "raw-body": "2.4.0", 219 | "type-is": "~1.6.17" 220 | } 221 | }, 222 | "brace-expansion": { 223 | "version": "1.1.11", 224 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 225 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 226 | "requires": { 227 | "balanced-match": "^1.0.0", 228 | "concat-map": "0.0.1" 229 | } 230 | }, 231 | "braces": { 232 | "version": "3.0.2", 233 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 234 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 235 | "dev": true, 236 | "requires": { 237 | "fill-range": "^7.0.1" 238 | } 239 | }, 240 | "buffer-equal-constant-time": { 241 | "version": "1.0.1", 242 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 243 | "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" 244 | }, 245 | "buffer-from": { 246 | "version": "1.1.1", 247 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 248 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 249 | "dev": true 250 | }, 251 | "bytes": { 252 | "version": "3.1.0", 253 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 254 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 255 | }, 256 | "camel-case": { 257 | "version": "4.1.1", 258 | "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz", 259 | "integrity": "sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==", 260 | "requires": { 261 | "pascal-case": "^3.1.1", 262 | "tslib": "^1.10.0" 263 | } 264 | }, 265 | "camelcase": { 266 | "version": "2.1.1", 267 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", 268 | "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", 269 | "dev": true 270 | }, 271 | "camelcase-keys": { 272 | "version": "2.1.0", 273 | "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", 274 | "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", 275 | "dev": true, 276 | "requires": { 277 | "camelcase": "^2.0.0", 278 | "map-obj": "^1.0.0" 279 | } 280 | }, 281 | "cardinal": { 282 | "version": "2.1.1", 283 | "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", 284 | "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", 285 | "requires": { 286 | "ansicolors": "~0.3.2", 287 | "redeyed": "~2.1.0" 288 | } 289 | }, 290 | "chokidar": { 291 | "version": "3.4.0", 292 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", 293 | "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", 294 | "dev": true, 295 | "requires": { 296 | "anymatch": "~3.1.1", 297 | "braces": "~3.0.2", 298 | "fsevents": "~2.1.2", 299 | "glob-parent": "~5.1.0", 300 | "is-binary-path": "~2.1.0", 301 | "is-glob": "~4.0.1", 302 | "normalize-path": "~3.0.0", 303 | "readdirp": "~3.4.0" 304 | } 305 | }, 306 | "concat-map": { 307 | "version": "0.0.1", 308 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 309 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 310 | }, 311 | "content-disposition": { 312 | "version": "0.5.3", 313 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 314 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 315 | "requires": { 316 | "safe-buffer": "5.1.2" 317 | } 318 | }, 319 | "content-type": { 320 | "version": "1.0.4", 321 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 322 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 323 | }, 324 | "cookie": { 325 | "version": "0.4.0", 326 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 327 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 328 | }, 329 | "cookie-signature": { 330 | "version": "1.0.6", 331 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 332 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 333 | }, 334 | "currently-unhandled": { 335 | "version": "0.4.1", 336 | "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", 337 | "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", 338 | "dev": true, 339 | "requires": { 340 | "array-find-index": "^1.0.1" 341 | } 342 | }, 343 | "dateformat": { 344 | "version": "1.0.12", 345 | "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", 346 | "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", 347 | "dev": true, 348 | "requires": { 349 | "get-stdin": "^4.0.1", 350 | "meow": "^3.3.0" 351 | } 352 | }, 353 | "debug": { 354 | "version": "2.6.9", 355 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 356 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 357 | "requires": { 358 | "ms": "2.0.0" 359 | } 360 | }, 361 | "decamelize": { 362 | "version": "1.2.0", 363 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 364 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 365 | "dev": true 366 | }, 367 | "denque": { 368 | "version": "1.4.1", 369 | "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", 370 | "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" 371 | }, 372 | "depd": { 373 | "version": "1.1.2", 374 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 375 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 376 | }, 377 | "destroy": { 378 | "version": "1.0.4", 379 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 380 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 381 | }, 382 | "diff": { 383 | "version": "4.0.2", 384 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 385 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 386 | "dev": true 387 | }, 388 | "dotenv": { 389 | "version": "8.2.0", 390 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", 391 | "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" 392 | }, 393 | "dynamic-dedupe": { 394 | "version": "0.3.0", 395 | "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", 396 | "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", 397 | "dev": true, 398 | "requires": { 399 | "xtend": "^4.0.0" 400 | } 401 | }, 402 | "ecdsa-sig-formatter": { 403 | "version": "1.0.11", 404 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 405 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 406 | "requires": { 407 | "safe-buffer": "^5.0.1" 408 | } 409 | }, 410 | "ee-first": { 411 | "version": "1.1.1", 412 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 413 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 414 | }, 415 | "encodeurl": { 416 | "version": "1.0.2", 417 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 418 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 419 | }, 420 | "error-ex": { 421 | "version": "1.3.2", 422 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 423 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", 424 | "dev": true, 425 | "requires": { 426 | "is-arrayish": "^0.2.1" 427 | } 428 | }, 429 | "escape-html": { 430 | "version": "1.0.3", 431 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 432 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 433 | }, 434 | "esprima": { 435 | "version": "4.0.1", 436 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 437 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" 438 | }, 439 | "etag": { 440 | "version": "1.8.1", 441 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 442 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 443 | }, 444 | "express": { 445 | "version": "4.17.1", 446 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 447 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 448 | "requires": { 449 | "accepts": "~1.3.7", 450 | "array-flatten": "1.1.1", 451 | "body-parser": "1.19.0", 452 | "content-disposition": "0.5.3", 453 | "content-type": "~1.0.4", 454 | "cookie": "0.4.0", 455 | "cookie-signature": "1.0.6", 456 | "debug": "2.6.9", 457 | "depd": "~1.1.2", 458 | "encodeurl": "~1.0.2", 459 | "escape-html": "~1.0.3", 460 | "etag": "~1.8.1", 461 | "finalhandler": "~1.1.2", 462 | "fresh": "0.5.2", 463 | "merge-descriptors": "1.0.1", 464 | "methods": "~1.1.2", 465 | "on-finished": "~2.3.0", 466 | "parseurl": "~1.3.3", 467 | "path-to-regexp": "0.1.7", 468 | "proxy-addr": "~2.0.5", 469 | "qs": "6.7.0", 470 | "range-parser": "~1.2.1", 471 | "safe-buffer": "5.1.2", 472 | "send": "0.17.1", 473 | "serve-static": "1.14.1", 474 | "setprototypeof": "1.1.1", 475 | "statuses": "~1.5.0", 476 | "type-is": "~1.6.18", 477 | "utils-merge": "1.0.1", 478 | "vary": "~1.1.2" 479 | } 480 | }, 481 | "fill-range": { 482 | "version": "7.0.1", 483 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 484 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 485 | "dev": true, 486 | "requires": { 487 | "to-regex-range": "^5.0.1" 488 | } 489 | }, 490 | "finalhandler": { 491 | "version": "1.1.2", 492 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 493 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 494 | "requires": { 495 | "debug": "2.6.9", 496 | "encodeurl": "~1.0.2", 497 | "escape-html": "~1.0.3", 498 | "on-finished": "~2.3.0", 499 | "parseurl": "~1.3.3", 500 | "statuses": "~1.5.0", 501 | "unpipe": "~1.0.0" 502 | } 503 | }, 504 | "find-up": { 505 | "version": "1.1.2", 506 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", 507 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", 508 | "dev": true, 509 | "requires": { 510 | "path-exists": "^2.0.0", 511 | "pinkie-promise": "^2.0.0" 512 | } 513 | }, 514 | "forwarded": { 515 | "version": "0.1.2", 516 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 517 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 518 | }, 519 | "fresh": { 520 | "version": "0.5.2", 521 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 522 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 523 | }, 524 | "fs.realpath": { 525 | "version": "1.0.0", 526 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 527 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 528 | }, 529 | "fsevents": { 530 | "version": "2.1.3", 531 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", 532 | "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", 533 | "dev": true, 534 | "optional": true 535 | }, 536 | "generate-function": { 537 | "version": "2.3.1", 538 | "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", 539 | "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", 540 | "requires": { 541 | "is-property": "^1.0.2" 542 | } 543 | }, 544 | "get-stdin": { 545 | "version": "4.0.1", 546 | "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", 547 | "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", 548 | "dev": true 549 | }, 550 | "glob": { 551 | "version": "7.1.6", 552 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 553 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 554 | "requires": { 555 | "fs.realpath": "^1.0.0", 556 | "inflight": "^1.0.4", 557 | "inherits": "2", 558 | "minimatch": "^3.0.4", 559 | "once": "^1.3.0", 560 | "path-is-absolute": "^1.0.0" 561 | } 562 | }, 563 | "glob-parent": { 564 | "version": "5.1.1", 565 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 566 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 567 | "dev": true, 568 | "requires": { 569 | "is-glob": "^4.0.1" 570 | } 571 | }, 572 | "graceful-fs": { 573 | "version": "4.2.4", 574 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 575 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", 576 | "dev": true 577 | }, 578 | "growly": { 579 | "version": "1.3.0", 580 | "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", 581 | "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", 582 | "dev": true 583 | }, 584 | "hosted-git-info": { 585 | "version": "2.8.8", 586 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", 587 | "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", 588 | "dev": true 589 | }, 590 | "http-errors": { 591 | "version": "1.7.2", 592 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 593 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 594 | "requires": { 595 | "depd": "~1.1.2", 596 | "inherits": "2.0.3", 597 | "setprototypeof": "1.1.1", 598 | "statuses": ">= 1.5.0 < 2", 599 | "toidentifier": "1.0.0" 600 | } 601 | }, 602 | "iconv-lite": { 603 | "version": "0.4.24", 604 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 605 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 606 | "requires": { 607 | "safer-buffer": ">= 2.1.2 < 3" 608 | } 609 | }, 610 | "indent-string": { 611 | "version": "2.1.0", 612 | "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", 613 | "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", 614 | "dev": true, 615 | "requires": { 616 | "repeating": "^2.0.0" 617 | } 618 | }, 619 | "inflight": { 620 | "version": "1.0.6", 621 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 622 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 623 | "requires": { 624 | "once": "^1.3.0", 625 | "wrappy": "1" 626 | } 627 | }, 628 | "inherits": { 629 | "version": "2.0.3", 630 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 631 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 632 | }, 633 | "ipaddr.js": { 634 | "version": "1.9.1", 635 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 636 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 637 | }, 638 | "is-arrayish": { 639 | "version": "0.2.1", 640 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 641 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", 642 | "dev": true 643 | }, 644 | "is-binary-path": { 645 | "version": "2.1.0", 646 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 647 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 648 | "dev": true, 649 | "requires": { 650 | "binary-extensions": "^2.0.0" 651 | } 652 | }, 653 | "is-extglob": { 654 | "version": "2.1.1", 655 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 656 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 657 | "dev": true 658 | }, 659 | "is-finite": { 660 | "version": "1.1.0", 661 | "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", 662 | "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", 663 | "dev": true 664 | }, 665 | "is-glob": { 666 | "version": "4.0.1", 667 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 668 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 669 | "dev": true, 670 | "requires": { 671 | "is-extglob": "^2.1.1" 672 | } 673 | }, 674 | "is-number": { 675 | "version": "7.0.0", 676 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 677 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 678 | "dev": true 679 | }, 680 | "is-property": { 681 | "version": "1.0.2", 682 | "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", 683 | "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" 684 | }, 685 | "is-utf8": { 686 | "version": "0.2.1", 687 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", 688 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", 689 | "dev": true 690 | }, 691 | "is-wsl": { 692 | "version": "1.1.0", 693 | "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", 694 | "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", 695 | "dev": true 696 | }, 697 | "isexe": { 698 | "version": "2.0.0", 699 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 700 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 701 | "dev": true 702 | }, 703 | "jsonwebtoken": { 704 | "version": "8.5.1", 705 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", 706 | "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", 707 | "requires": { 708 | "jws": "^3.2.2", 709 | "lodash.includes": "^4.3.0", 710 | "lodash.isboolean": "^3.0.3", 711 | "lodash.isinteger": "^4.0.4", 712 | "lodash.isnumber": "^3.0.3", 713 | "lodash.isplainobject": "^4.0.6", 714 | "lodash.isstring": "^4.0.1", 715 | "lodash.once": "^4.0.0", 716 | "ms": "^2.1.1", 717 | "semver": "^5.6.0" 718 | }, 719 | "dependencies": { 720 | "ms": { 721 | "version": "2.1.2", 722 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 723 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 724 | } 725 | } 726 | }, 727 | "jwa": { 728 | "version": "1.4.1", 729 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 730 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 731 | "requires": { 732 | "buffer-equal-constant-time": "1.0.1", 733 | "ecdsa-sig-formatter": "1.0.11", 734 | "safe-buffer": "^5.0.1" 735 | } 736 | }, 737 | "jws": { 738 | "version": "3.2.2", 739 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 740 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 741 | "requires": { 742 | "jwa": "^1.4.1", 743 | "safe-buffer": "^5.0.1" 744 | } 745 | }, 746 | "load-json-file": { 747 | "version": "1.1.0", 748 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", 749 | "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", 750 | "dev": true, 751 | "requires": { 752 | "graceful-fs": "^4.1.2", 753 | "parse-json": "^2.2.0", 754 | "pify": "^2.0.0", 755 | "pinkie-promise": "^2.0.0", 756 | "strip-bom": "^2.0.0" 757 | } 758 | }, 759 | "lodash.includes": { 760 | "version": "4.3.0", 761 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 762 | "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" 763 | }, 764 | "lodash.isboolean": { 765 | "version": "3.0.3", 766 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 767 | "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" 768 | }, 769 | "lodash.isinteger": { 770 | "version": "4.0.4", 771 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 772 | "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" 773 | }, 774 | "lodash.isnumber": { 775 | "version": "3.0.3", 776 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 777 | "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" 778 | }, 779 | "lodash.isplainobject": { 780 | "version": "4.0.6", 781 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 782 | "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" 783 | }, 784 | "lodash.isstring": { 785 | "version": "4.0.1", 786 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 787 | "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" 788 | }, 789 | "lodash.once": { 790 | "version": "4.1.1", 791 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 792 | "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" 793 | }, 794 | "long": { 795 | "version": "4.0.0", 796 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", 797 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" 798 | }, 799 | "loud-rejection": { 800 | "version": "1.6.0", 801 | "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", 802 | "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", 803 | "dev": true, 804 | "requires": { 805 | "currently-unhandled": "^0.4.1", 806 | "signal-exit": "^3.0.0" 807 | } 808 | }, 809 | "lower-case": { 810 | "version": "2.0.1", 811 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz", 812 | "integrity": "sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ==", 813 | "requires": { 814 | "tslib": "^1.10.0" 815 | } 816 | }, 817 | "lru-cache": { 818 | "version": "5.1.1", 819 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", 820 | "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", 821 | "requires": { 822 | "yallist": "^3.0.2" 823 | } 824 | }, 825 | "make-error": { 826 | "version": "1.3.6", 827 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 828 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 829 | "dev": true 830 | }, 831 | "map-obj": { 832 | "version": "1.0.1", 833 | "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", 834 | "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", 835 | "dev": true 836 | }, 837 | "media-typer": { 838 | "version": "0.3.0", 839 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 840 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 841 | }, 842 | "meow": { 843 | "version": "3.7.0", 844 | "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", 845 | "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", 846 | "dev": true, 847 | "requires": { 848 | "camelcase-keys": "^2.0.0", 849 | "decamelize": "^1.1.2", 850 | "loud-rejection": "^1.0.0", 851 | "map-obj": "^1.0.1", 852 | "minimist": "^1.1.3", 853 | "normalize-package-data": "^2.3.4", 854 | "object-assign": "^4.0.1", 855 | "read-pkg-up": "^1.0.1", 856 | "redent": "^1.0.0", 857 | "trim-newlines": "^1.0.0" 858 | } 859 | }, 860 | "merge-descriptors": { 861 | "version": "1.0.1", 862 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 863 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 864 | }, 865 | "methods": { 866 | "version": "1.1.2", 867 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 868 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 869 | }, 870 | "mime": { 871 | "version": "1.6.0", 872 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 873 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 874 | }, 875 | "mime-db": { 876 | "version": "1.44.0", 877 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 878 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 879 | }, 880 | "mime-types": { 881 | "version": "2.1.27", 882 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 883 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 884 | "requires": { 885 | "mime-db": "1.44.0" 886 | } 887 | }, 888 | "minimatch": { 889 | "version": "3.0.4", 890 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 891 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 892 | "requires": { 893 | "brace-expansion": "^1.1.7" 894 | } 895 | }, 896 | "minimist": { 897 | "version": "1.2.5", 898 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 899 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 900 | "dev": true 901 | }, 902 | "mkdirp": { 903 | "version": "1.0.4", 904 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", 905 | "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", 906 | "dev": true 907 | }, 908 | "ms": { 909 | "version": "2.0.0", 910 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 911 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 912 | }, 913 | "mysql2": { 914 | "version": "2.1.0", 915 | "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.1.0.tgz", 916 | "integrity": "sha512-9kGVyi930rG2KaHrz3sHwtc6K+GY9d8wWk1XRSYxQiunvGcn4DwuZxOwmK11ftuhhwrYDwGx9Ta4VBwznJn36A==", 917 | "requires": { 918 | "cardinal": "^2.1.1", 919 | "denque": "^1.4.1", 920 | "generate-function": "^2.3.1", 921 | "iconv-lite": "^0.5.0", 922 | "long": "^4.0.0", 923 | "lru-cache": "^5.1.1", 924 | "named-placeholders": "^1.1.2", 925 | "seq-queue": "^0.0.5", 926 | "sqlstring": "^2.3.1" 927 | }, 928 | "dependencies": { 929 | "iconv-lite": { 930 | "version": "0.5.2", 931 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz", 932 | "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==", 933 | "requires": { 934 | "safer-buffer": ">= 2.1.2 < 3" 935 | } 936 | } 937 | } 938 | }, 939 | "named-placeholders": { 940 | "version": "1.1.2", 941 | "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz", 942 | "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==", 943 | "requires": { 944 | "lru-cache": "^4.1.3" 945 | }, 946 | "dependencies": { 947 | "lru-cache": { 948 | "version": "4.1.5", 949 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", 950 | "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", 951 | "requires": { 952 | "pseudomap": "^1.0.2", 953 | "yallist": "^2.1.2" 954 | } 955 | }, 956 | "yallist": { 957 | "version": "2.1.2", 958 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", 959 | "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" 960 | } 961 | } 962 | }, 963 | "negotiator": { 964 | "version": "0.6.2", 965 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 966 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 967 | }, 968 | "no-case": { 969 | "version": "3.0.3", 970 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.3.tgz", 971 | "integrity": "sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw==", 972 | "requires": { 973 | "lower-case": "^2.0.1", 974 | "tslib": "^1.10.0" 975 | } 976 | }, 977 | "node-notifier": { 978 | "version": "5.4.3", 979 | "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", 980 | "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", 981 | "dev": true, 982 | "requires": { 983 | "growly": "^1.3.0", 984 | "is-wsl": "^1.1.0", 985 | "semver": "^5.5.0", 986 | "shellwords": "^0.1.1", 987 | "which": "^1.3.0" 988 | } 989 | }, 990 | "normalize-package-data": { 991 | "version": "2.5.0", 992 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", 993 | "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", 994 | "dev": true, 995 | "requires": { 996 | "hosted-git-info": "^2.1.4", 997 | "resolve": "^1.10.0", 998 | "semver": "2 || 3 || 4 || 5", 999 | "validate-npm-package-license": "^3.0.1" 1000 | } 1001 | }, 1002 | "normalize-path": { 1003 | "version": "3.0.0", 1004 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1005 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1006 | "dev": true 1007 | }, 1008 | "object-assign": { 1009 | "version": "4.1.1", 1010 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1011 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 1012 | "dev": true 1013 | }, 1014 | "on-finished": { 1015 | "version": "2.3.0", 1016 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1017 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 1018 | "requires": { 1019 | "ee-first": "1.1.1" 1020 | } 1021 | }, 1022 | "once": { 1023 | "version": "1.4.0", 1024 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1025 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1026 | "requires": { 1027 | "wrappy": "1" 1028 | } 1029 | }, 1030 | "parse-json": { 1031 | "version": "2.2.0", 1032 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", 1033 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", 1034 | "dev": true, 1035 | "requires": { 1036 | "error-ex": "^1.2.0" 1037 | } 1038 | }, 1039 | "parseurl": { 1040 | "version": "1.3.3", 1041 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1042 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 1043 | }, 1044 | "pascal-case": { 1045 | "version": "3.1.1", 1046 | "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.1.tgz", 1047 | "integrity": "sha512-XIeHKqIrsquVTQL2crjq3NfJUxmdLasn3TYOU0VBM+UX2a6ztAWBlJQBePLGY7VHW8+2dRadeIPK5+KImwTxQA==", 1048 | "requires": { 1049 | "no-case": "^3.0.3", 1050 | "tslib": "^1.10.0" 1051 | } 1052 | }, 1053 | "path-exists": { 1054 | "version": "2.1.0", 1055 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", 1056 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", 1057 | "dev": true, 1058 | "requires": { 1059 | "pinkie-promise": "^2.0.0" 1060 | } 1061 | }, 1062 | "path-is-absolute": { 1063 | "version": "1.0.1", 1064 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1065 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 1066 | }, 1067 | "path-parse": { 1068 | "version": "1.0.6", 1069 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 1070 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", 1071 | "dev": true 1072 | }, 1073 | "path-to-regexp": { 1074 | "version": "0.1.7", 1075 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1076 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 1077 | }, 1078 | "path-type": { 1079 | "version": "1.1.0", 1080 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", 1081 | "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", 1082 | "dev": true, 1083 | "requires": { 1084 | "graceful-fs": "^4.1.2", 1085 | "pify": "^2.0.0", 1086 | "pinkie-promise": "^2.0.0" 1087 | } 1088 | }, 1089 | "picomatch": { 1090 | "version": "2.2.2", 1091 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 1092 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", 1093 | "dev": true 1094 | }, 1095 | "pify": { 1096 | "version": "2.3.0", 1097 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", 1098 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", 1099 | "dev": true 1100 | }, 1101 | "pinkie": { 1102 | "version": "2.0.4", 1103 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", 1104 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", 1105 | "dev": true 1106 | }, 1107 | "pinkie-promise": { 1108 | "version": "2.0.1", 1109 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", 1110 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", 1111 | "dev": true, 1112 | "requires": { 1113 | "pinkie": "^2.0.0" 1114 | } 1115 | }, 1116 | "proxy-addr": { 1117 | "version": "2.0.6", 1118 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 1119 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 1120 | "requires": { 1121 | "forwarded": "~0.1.2", 1122 | "ipaddr.js": "1.9.1" 1123 | } 1124 | }, 1125 | "pseudomap": { 1126 | "version": "1.0.2", 1127 | "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", 1128 | "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" 1129 | }, 1130 | "qs": { 1131 | "version": "6.7.0", 1132 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 1133 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 1134 | }, 1135 | "range-parser": { 1136 | "version": "1.2.1", 1137 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1138 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 1139 | }, 1140 | "raw-body": { 1141 | "version": "2.4.0", 1142 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 1143 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 1144 | "requires": { 1145 | "bytes": "3.1.0", 1146 | "http-errors": "1.7.2", 1147 | "iconv-lite": "0.4.24", 1148 | "unpipe": "1.0.0" 1149 | } 1150 | }, 1151 | "read-pkg": { 1152 | "version": "1.1.0", 1153 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", 1154 | "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", 1155 | "dev": true, 1156 | "requires": { 1157 | "load-json-file": "^1.0.0", 1158 | "normalize-package-data": "^2.3.2", 1159 | "path-type": "^1.0.0" 1160 | } 1161 | }, 1162 | "read-pkg-up": { 1163 | "version": "1.0.1", 1164 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", 1165 | "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", 1166 | "dev": true, 1167 | "requires": { 1168 | "find-up": "^1.0.0", 1169 | "read-pkg": "^1.0.0" 1170 | } 1171 | }, 1172 | "readdirp": { 1173 | "version": "3.4.0", 1174 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", 1175 | "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", 1176 | "dev": true, 1177 | "requires": { 1178 | "picomatch": "^2.2.1" 1179 | } 1180 | }, 1181 | "redent": { 1182 | "version": "1.0.0", 1183 | "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", 1184 | "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", 1185 | "dev": true, 1186 | "requires": { 1187 | "indent-string": "^2.1.0", 1188 | "strip-indent": "^1.0.1" 1189 | } 1190 | }, 1191 | "redeyed": { 1192 | "version": "2.1.1", 1193 | "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", 1194 | "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", 1195 | "requires": { 1196 | "esprima": "~4.0.0" 1197 | } 1198 | }, 1199 | "repeating": { 1200 | "version": "2.0.1", 1201 | "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", 1202 | "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", 1203 | "dev": true, 1204 | "requires": { 1205 | "is-finite": "^1.0.0" 1206 | } 1207 | }, 1208 | "resolve": { 1209 | "version": "1.17.0", 1210 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", 1211 | "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", 1212 | "dev": true, 1213 | "requires": { 1214 | "path-parse": "^1.0.6" 1215 | } 1216 | }, 1217 | "rimraf": { 1218 | "version": "2.7.1", 1219 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 1220 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 1221 | "dev": true, 1222 | "requires": { 1223 | "glob": "^7.1.3" 1224 | } 1225 | }, 1226 | "safe-buffer": { 1227 | "version": "5.1.2", 1228 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1229 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1230 | }, 1231 | "safer-buffer": { 1232 | "version": "2.1.2", 1233 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1234 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1235 | }, 1236 | "semver": { 1237 | "version": "5.7.1", 1238 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1239 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 1240 | }, 1241 | "send": { 1242 | "version": "0.17.1", 1243 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 1244 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 1245 | "requires": { 1246 | "debug": "2.6.9", 1247 | "depd": "~1.1.2", 1248 | "destroy": "~1.0.4", 1249 | "encodeurl": "~1.0.2", 1250 | "escape-html": "~1.0.3", 1251 | "etag": "~1.8.1", 1252 | "fresh": "0.5.2", 1253 | "http-errors": "~1.7.2", 1254 | "mime": "1.6.0", 1255 | "ms": "2.1.1", 1256 | "on-finished": "~2.3.0", 1257 | "range-parser": "~1.2.1", 1258 | "statuses": "~1.5.0" 1259 | }, 1260 | "dependencies": { 1261 | "ms": { 1262 | "version": "2.1.1", 1263 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1264 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 1265 | } 1266 | } 1267 | }, 1268 | "seq-queue": { 1269 | "version": "0.0.5", 1270 | "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", 1271 | "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4=" 1272 | }, 1273 | "serve-static": { 1274 | "version": "1.14.1", 1275 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 1276 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 1277 | "requires": { 1278 | "encodeurl": "~1.0.2", 1279 | "escape-html": "~1.0.3", 1280 | "parseurl": "~1.3.3", 1281 | "send": "0.17.1" 1282 | } 1283 | }, 1284 | "setprototypeof": { 1285 | "version": "1.1.1", 1286 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1287 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1288 | }, 1289 | "sha.js": { 1290 | "version": "2.4.11", 1291 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", 1292 | "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", 1293 | "requires": { 1294 | "inherits": "^2.0.1", 1295 | "safe-buffer": "^5.0.1" 1296 | } 1297 | }, 1298 | "shellwords": { 1299 | "version": "0.1.1", 1300 | "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", 1301 | "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", 1302 | "dev": true 1303 | }, 1304 | "signal-exit": { 1305 | "version": "3.0.3", 1306 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 1307 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 1308 | "dev": true 1309 | }, 1310 | "source-map": { 1311 | "version": "0.6.1", 1312 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1313 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1314 | "dev": true 1315 | }, 1316 | "source-map-support": { 1317 | "version": "0.5.19", 1318 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 1319 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 1320 | "dev": true, 1321 | "requires": { 1322 | "buffer-from": "^1.0.0", 1323 | "source-map": "^0.6.0" 1324 | } 1325 | }, 1326 | "spdx-correct": { 1327 | "version": "3.1.1", 1328 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", 1329 | "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", 1330 | "dev": true, 1331 | "requires": { 1332 | "spdx-expression-parse": "^3.0.0", 1333 | "spdx-license-ids": "^3.0.0" 1334 | } 1335 | }, 1336 | "spdx-exceptions": { 1337 | "version": "2.3.0", 1338 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", 1339 | "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", 1340 | "dev": true 1341 | }, 1342 | "spdx-expression-parse": { 1343 | "version": "3.0.1", 1344 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", 1345 | "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", 1346 | "dev": true, 1347 | "requires": { 1348 | "spdx-exceptions": "^2.1.0", 1349 | "spdx-license-ids": "^3.0.0" 1350 | } 1351 | }, 1352 | "spdx-license-ids": { 1353 | "version": "3.0.5", 1354 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", 1355 | "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", 1356 | "dev": true 1357 | }, 1358 | "sqlstring": { 1359 | "version": "2.3.2", 1360 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", 1361 | "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==" 1362 | }, 1363 | "statuses": { 1364 | "version": "1.5.0", 1365 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1366 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1367 | }, 1368 | "strip-bom": { 1369 | "version": "2.0.0", 1370 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", 1371 | "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", 1372 | "dev": true, 1373 | "requires": { 1374 | "is-utf8": "^0.2.0" 1375 | } 1376 | }, 1377 | "strip-indent": { 1378 | "version": "1.0.1", 1379 | "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", 1380 | "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", 1381 | "dev": true, 1382 | "requires": { 1383 | "get-stdin": "^4.0.1" 1384 | } 1385 | }, 1386 | "strip-json-comments": { 1387 | "version": "2.0.1", 1388 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1389 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 1390 | "dev": true 1391 | }, 1392 | "to-regex-range": { 1393 | "version": "5.0.1", 1394 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1395 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1396 | "dev": true, 1397 | "requires": { 1398 | "is-number": "^7.0.0" 1399 | } 1400 | }, 1401 | "toidentifier": { 1402 | "version": "1.0.0", 1403 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1404 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1405 | }, 1406 | "tree-kill": { 1407 | "version": "1.2.2", 1408 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", 1409 | "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", 1410 | "dev": true 1411 | }, 1412 | "trim-newlines": { 1413 | "version": "1.0.0", 1414 | "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", 1415 | "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", 1416 | "dev": true 1417 | }, 1418 | "ts-node": { 1419 | "version": "8.10.2", 1420 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", 1421 | "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", 1422 | "dev": true, 1423 | "requires": { 1424 | "arg": "^4.1.0", 1425 | "diff": "^4.0.1", 1426 | "make-error": "^1.1.1", 1427 | "source-map-support": "^0.5.17", 1428 | "yn": "3.1.1" 1429 | } 1430 | }, 1431 | "ts-node-dev": { 1432 | "version": "1.0.0-pre.49", 1433 | "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-1.0.0-pre.49.tgz", 1434 | "integrity": "sha512-iJd4QPPOaCAByl/WuEdmDX8xDR2GmoWYu6aKvGudGUcfP1sJRjpaHb7oFDuvBspQF1xhxUdbjfHuvEtZPwKZFQ==", 1435 | "dev": true, 1436 | "requires": { 1437 | "chokidar": "^3.4.0", 1438 | "dateformat": "~1.0.4-1.2.3", 1439 | "dynamic-dedupe": "^0.3.0", 1440 | "minimist": "^1.2.5", 1441 | "mkdirp": "^1.0.4", 1442 | "node-notifier": "^5.4.0", 1443 | "resolve": "^1.0.0", 1444 | "rimraf": "^2.6.1", 1445 | "source-map-support": "^0.5.12", 1446 | "tree-kill": "^1.2.2", 1447 | "ts-node": "^8.10.2", 1448 | "tsconfig": "^7.0.0" 1449 | } 1450 | }, 1451 | "tsconfig": { 1452 | "version": "7.0.0", 1453 | "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", 1454 | "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", 1455 | "dev": true, 1456 | "requires": { 1457 | "@types/strip-bom": "^3.0.0", 1458 | "@types/strip-json-comments": "0.0.30", 1459 | "strip-bom": "^3.0.0", 1460 | "strip-json-comments": "^2.0.0" 1461 | }, 1462 | "dependencies": { 1463 | "strip-bom": { 1464 | "version": "3.0.0", 1465 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", 1466 | "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", 1467 | "dev": true 1468 | } 1469 | } 1470 | }, 1471 | "tslib": { 1472 | "version": "1.13.0", 1473 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", 1474 | "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" 1475 | }, 1476 | "type-is": { 1477 | "version": "1.6.18", 1478 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1479 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1480 | "requires": { 1481 | "media-typer": "0.3.0", 1482 | "mime-types": "~2.1.24" 1483 | } 1484 | }, 1485 | "typescript": { 1486 | "version": "3.9.5", 1487 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", 1488 | "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==" 1489 | }, 1490 | "unpipe": { 1491 | "version": "1.0.0", 1492 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1493 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1494 | }, 1495 | "utils-merge": { 1496 | "version": "1.0.1", 1497 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1498 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1499 | }, 1500 | "validate-npm-package-license": { 1501 | "version": "3.0.4", 1502 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", 1503 | "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", 1504 | "dev": true, 1505 | "requires": { 1506 | "spdx-correct": "^3.0.0", 1507 | "spdx-expression-parse": "^3.0.0" 1508 | } 1509 | }, 1510 | "vary": { 1511 | "version": "1.1.2", 1512 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1513 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1514 | }, 1515 | "which": { 1516 | "version": "1.3.1", 1517 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1518 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1519 | "dev": true, 1520 | "requires": { 1521 | "isexe": "^2.0.0" 1522 | } 1523 | }, 1524 | "wrappy": { 1525 | "version": "1.0.2", 1526 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1527 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1528 | }, 1529 | "xtend": { 1530 | "version": "4.0.2", 1531 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 1532 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", 1533 | "dev": true 1534 | }, 1535 | "yallist": { 1536 | "version": "3.1.1", 1537 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", 1538 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" 1539 | }, 1540 | "yn": { 1541 | "version": "3.1.1", 1542 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1543 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1544 | "dev": true 1545 | } 1546 | } 1547 | } 1548 | --------------------------------------------------------------------------------