From d82e1d2aaad51e2b23ddbe3cf8194861314e4caa Mon Sep 17 00:00:00 2001 From: Hot-Tutorials Date: Wed, 24 Nov 2021 14:33:01 +0100 Subject: [PATCH 1/4] . --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 563642d..edb5735 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,7 @@ import path from 'node:path'; import RouteHandler from './RouteHandler'; export const app = express(); -export const PORT = 6167; +export const PORT = 6167 || process.env.PORT; export const DOCS = 'https://github.com/MCDocker/MCDocker'; export const knex = Knex({ From f119be7631a79f2a6b012273454c471d6444f698 Mon Sep 17 00:00:00 2001 From: Hot-Tutorials Date: Mon, 3 Jan 2022 18:54:55 +0100 Subject: [PATCH 2/4] Major rewrite. Supports MongoDB now aswell as Microsoft Auth fully implemented --- mongo_validation.json | 107 +++++++ package.json | 2 +- src/RequestResponse.ts | 18 ++ src/Route.ts | 4 +- src/RouteHandler.ts | 1 - src/accounts/Account.ts | 20 ++ src/accounts/MicrosoftAuth.ts | 133 ++++++++ src/external/MicrosoftAuth.ts | 23 -- src/index.ts | 38 +-- src/interfaces/Account.ts | 68 ---- src/interfaces/Container.ts | 22 -- src/models/ContainerModel.ts | 22 ++ src/models/ModsModel.ts | 8 + src/models/UserModel.ts | 10 + src/routes/Status.ts | 21 -- src/routes/account/EditAccountRoute.ts | 65 ---- src/routes/account/GetAccountRoute.ts | 26 -- src/routes/account/RegisterRoute.ts | 59 ---- src/routes/auth/Microsoft.ts | 47 +++ src/routes/auth/MicrosoftAuthRoute.ts | 25 -- src/routes/containers/Create.ts | 28 ++ src/routes/containers/Get.ts | 33 ++ src/routes/containers/GetContainers.ts | 39 --- src/routes/containers/UploadContainer.ts | 58 ---- src/utils/ErrorCode.ts | 13 - src/utils/HttpStatusCode.ts | 386 +++++++++++++++++++++++ src/utils/Mongo.ts | 43 +++ src/utils/Response.ts | 21 -- yarn.lock | 186 ++++++----- 29 files changed, 970 insertions(+), 556 deletions(-) create mode 100644 mongo_validation.json create mode 100644 src/RequestResponse.ts create mode 100644 src/accounts/Account.ts create mode 100644 src/accounts/MicrosoftAuth.ts delete mode 100644 src/external/MicrosoftAuth.ts delete mode 100644 src/interfaces/Account.ts delete mode 100644 src/interfaces/Container.ts create mode 100644 src/models/ContainerModel.ts create mode 100644 src/models/ModsModel.ts create mode 100644 src/models/UserModel.ts delete mode 100644 src/routes/Status.ts delete mode 100644 src/routes/account/EditAccountRoute.ts delete mode 100644 src/routes/account/GetAccountRoute.ts delete mode 100644 src/routes/account/RegisterRoute.ts create mode 100644 src/routes/auth/Microsoft.ts delete mode 100644 src/routes/auth/MicrosoftAuthRoute.ts create mode 100644 src/routes/containers/Create.ts create mode 100644 src/routes/containers/Get.ts delete mode 100644 src/routes/containers/GetContainers.ts delete mode 100644 src/routes/containers/UploadContainer.ts delete mode 100644 src/utils/ErrorCode.ts create mode 100644 src/utils/HttpStatusCode.ts create mode 100644 src/utils/Mongo.ts delete mode 100644 src/utils/Response.ts diff --git a/mongo_validation.json b/mongo_validation.json new file mode 100644 index 0000000..a2be79e --- /dev/null +++ b/mongo_validation.json @@ -0,0 +1,107 @@ +{ + "containers": { + "validation": { + "$jsonSchema": { + "bsonType": "object", + "required": [ + "name", + "id", + "memory", + "mods", + "client" + ], + "properties": { + "name": { + "bsonType": "string" + }, + "id": { + "bsonType": "string" + }, + "memory": { + "bsonType": "string" + }, + "mods": { + "bsonType": "array", + "items": { + "bsonType": "object", + "required": [ + "name", + "id", + "version", + "type" + ], + "properties": { + "name": { + "bsonType": "string" + }, + "id": { + "bsonType": "string" + }, + "version": { + "bsonType": "string" + }, + "type": { + "bsonType": "string" + } + } + } + }, + "client": { + "bsonType": "object", + "required": [ + "dataUrl", + "name", + "javaVersion", + "mainClass", + "startupArguments", + "type" + ], + "properties": { + "dataUrl": { + "bsonType": "string" + }, + "name": { + "bsonType": "string" + }, + "javaVersion": { + "bsonType": "int" + }, + "mainClass": { + "bsonType": "string" + }, + "startupArguments": { + "bsonType": "string" + }, + "type": { + "bsonType": "string" + } + } + } + } + } + } + }, + "users": { + "validation": { + "$jsonSchema": { + "bsonType": "object", + "required": [ + "name", + "created", + "minecraftId" + ], + "properties": { + "name": { + "bsonType": "string" + }, + "created": { + "bsonType": "string" + }, + "minecraftId": { + "bsonType": "string" + } + } + } + } + } +} diff --git a/package.json b/package.json index 29f18df..dd4c49b 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dotenv": "^10.0.0", "express": "^4.17.1", "jsonwebtoken": "^8.5.1", - "knex": "^0.95.11", + "mongodb": "^4.2.2", "snowflake-uuid": "^1.0.0", "sqlite3": "^5.0.2" } diff --git a/src/RequestResponse.ts b/src/RequestResponse.ts new file mode 100644 index 0000000..88e2423 --- /dev/null +++ b/src/RequestResponse.ts @@ -0,0 +1,18 @@ +import * as express from 'express'; +import HttpStatusCode from './utils/HttpStatusCode'; + +class RequestResponse { + constructor(public res: express.Response, public message: string, public code?: HttpStatusCode, public content?: object) { + res.status(code).send({ + message, + content, + success: !(code >= 300), + }); + } +} + +const sendResponse = (res: express.Response, message: string, code?: HttpStatusCode, content?: object) => { + const respons = new RequestResponse(res, message, code, content); +}; + +export default sendResponse; diff --git a/src/Route.ts b/src/Route.ts index 0859306..07ec117 100644 --- a/src/Route.ts +++ b/src/Route.ts @@ -1,14 +1,12 @@ import { Request, Response } from 'express'; export type RouteOptions = { - name: string, method: 'get' | 'post' | 'delete' | 'put' | 'all', url: string, - oneTime?: boolean, } export default abstract class Route { - constructor(private opts: RouteOptions) {} + abstract opts: RouteOptions; get options() { return this.opts; } diff --git a/src/RouteHandler.ts b/src/RouteHandler.ts index 3321110..016647a 100644 --- a/src/RouteHandler.ts +++ b/src/RouteHandler.ts @@ -1,5 +1,4 @@ import path from 'path'; -import fs from 'fs'; import { Request, Response } from 'express'; import Route from './Route'; import { app } from '.'; diff --git a/src/accounts/Account.ts b/src/accounts/Account.ts new file mode 100644 index 0000000..e59a516 --- /dev/null +++ b/src/accounts/Account.ts @@ -0,0 +1,20 @@ +import User from '../models/UserModel'; +import Mongo from '../utils/Mongo'; + +class Accounts { + public async create(name: string, uuid: string) { + const document: User = { + name, + created: String(Math.floor(Date.now() / 1000)), + minecraftId: uuid, + }; + + await Mongo.collections.users.insertOne(document); + } + + public get(uuid: string) { return Mongo.collections.users.findOne({ minecraftId: uuid }); } + + public async exists(uuid: string): Promise { return !!(await this.get(uuid)); } +} + +export default new Accounts(); diff --git a/src/accounts/MicrosoftAuth.ts b/src/accounts/MicrosoftAuth.ts new file mode 100644 index 0000000..78ed632 --- /dev/null +++ b/src/accounts/MicrosoftAuth.ts @@ -0,0 +1,133 @@ +import axios from 'axios'; +import { Request, Response } from 'express'; + +export default class MicrosoftAuth { + url = `https://login.live.com/oauth20_authorize.srf?client_id=${process.env.CLIENT_ID}&response_type=code&scope=XboxLive.signin%20offline_access`; + + constructor(private req: Request, private res: Response) {} + + public redirect() { + this.res.redirect(this.url); + } + + public codeToToken(code: string) { + return new Promise((resolve) => { + axios + .post( + 'https://login.live.com/oauth20_token.srf', + `client_id=${process.env.CLIENT_ID} + &client_secret=${process.env.CLIENT_SECRET} + &code=${code} + &grant_type=authorization_code`, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }, + ) + .then((data) => resolve(data.data)) + .catch((err) => resolve(err)); + }); + } + + public authWithXBL(accessToken: string) { + return new Promise< { + 'IssueInstant': string, + 'NotAfter': string, + 'Token': string, + 'DisplayClaims': { + 'xui': [{ 'uhs': string }] + } + }>((resolve, reject) => { + axios.post( + 'https://user.auth.xboxlive.com/user/authenticate', { + Properties: { + AuthMethod: 'RPS', + SiteName: 'user.auth.xboxlive.com', + RpsTicket: `d=${accessToken}`, + }, + RelyingParty: 'http://auth.xboxlive.com', + TokenType: 'JWT', + }, + { + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, + }, + ) + .then((data) => resolve(data.data)) + .catch((err) => reject(err)); + }); + } + + public authWithXSTS(xblToken: string) { + return new Promise<{ + Token?: string, + DisplayClaims?: { + 'xui': [{ 'uhs': string }] + }, + XErr?: number, + }>((resolve, reject) => { + axios.post( + 'https://xsts.auth.xboxlive.com/xsts/authorize', + { + Properties: { + SandboxId: 'RETAIL', + UserTokens: [`${xblToken}`], + }, + RelyingParty: 'rp://api.minecraftservices.com/', + TokenType: 'JWT', + }, + { + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, + }, + ) + .then((data) => resolve(data.data)) + .catch((err) => reject(err)); + }); + } + + public authWithMC(userhash: string, xstsToken: string) { + return new Promise<{ + 'access_token' : string + }>((resolve, reject) => { + axios.post( + 'https://api.minecraftservices.com/authentication/login_with_xbox', + { identityToken: `XBL3.0 x=${userhash};${xstsToken}` }, + ) + .then((data) => resolve(data.data)) + .catch((err) => reject(err)); + }); + } + + public getProfile(accessToken: string) { + return new Promise<{ + 'id'?: string, + 'name'?: string, + 'skins'?: [{ + 'id': string, + 'state': string, + 'url': string, + 'variant': string, + 'alias': string + }], + 'capes'?: [any], + 'errorType'?: string, + 'error'?: string, + 'errorMessage'?: string, + 'developerMessage'?: string + }>((resolve, reject) => { + axios.get('https://api.minecraftservices.com/minecraft/profile', { + headers: { + Authorization: `Bearer ${accessToken}`, + }, + }) + .then((data) => resolve(data.data)) + .catch((err) => reject(err)); // Either has Minecraft from Xbox Game Pass and hasn't logged in not even once into the Minecraft Launcher or just doesn't own the game lmfao + }); + } +} diff --git a/src/external/MicrosoftAuth.ts b/src/external/MicrosoftAuth.ts deleted file mode 100644 index b4def14..0000000 --- a/src/external/MicrosoftAuth.ts +++ /dev/null @@ -1,23 +0,0 @@ -import axios from 'axios'; - -class MicrosoftAuth { - public codeToToken(code: string) { - return new Promise((resolve, reject) => { - axios.post( - 'https://login.live.com/oauth20_token.srf', - `client_id=${process.env.CLIENT_ID} - &client_secret=${process.env.CLIENT_SECRET} - &code=${code} - &grant_type=authorization_code`, - { - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - }, - ).then((data) => resolve(data.data)) - .catch((err) => reject(err)); - }); - } -} - -export default new MicrosoftAuth(); diff --git a/src/index.ts b/src/index.ts index edb5735..7e911da 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,39 +1,21 @@ import express from 'express'; import 'dotenv/config'; import bodyParser from 'body-parser'; -import Knex from 'knex'; -import path from 'node:path'; import RouteHandler from './RouteHandler'; +import Mongo from './utils/Mongo'; export const app = express(); export const PORT = 6167 || process.env.PORT; -export const DOCS = 'https://github.com/MCDocker/MCDocker'; - -export const knex = Knex({ - client: 'sqlite3', - connection: { filename: path.join(__dirname, '..', 'database.sqlite') }, - useNullAsDefault: true, -}); - -knex.schema.createTable('containers', (table) => { - table.string('id'); - table.string('name'); - table.string('client'); - table.string('mods'); - table.string('user_id'); -}).then(() => console.log('Created table containers')).catch(() => {}); - -knex.schema.createTable('users', (table) => { - table.string('username'); - table.string('password'); - table.string('token'); - table.string('creation_date'); - table.string('mc_id').nullable(); - table.string('dc_id').nullable(); - table.increments('id'); -}).then(() => console.log('Created table users')).catch(() => {}); +export const DOCS = 'https://github.com/MCDocker/MCDocker-Core'; app.use(bodyParser()); app.get('/', (req, res) => res.redirect(DOCS)); -RouteHandler.registerRoutes().then(() => RouteHandler.handleRoutes().then(() => app.listen(PORT, () => console.log(`App listening on ${PORT}`)))); +const init = async () => { + await Mongo.connect(); + await RouteHandler.registerRoutes(); + await RouteHandler.handleRoutes(); + app.listen(PORT, () => console.log(`Listening on ${PORT}`)); +}; + +init(); diff --git a/src/interfaces/Account.ts b/src/interfaces/Account.ts deleted file mode 100644 index cb46e22..0000000 --- a/src/interfaces/Account.ts +++ /dev/null @@ -1,68 +0,0 @@ -import bcrypt from 'bcrypt'; -import { knex } from '..'; -import ErrorCode from '../utils/ErrorCode'; -import RequestResponse from '../utils/Response'; - -export interface Account { - token: string, - username: string, - password: string, - creation_date: string, - mc_id?: string, - dc_id?: string, -} - -export interface PublicAccount { - username: string, - creation_date: string, - mc_id: string, - dc_id: string, - id: number, - token?: string -} - -export const getAccount = (body: { username: string, password: string, token?: string, }) => new Promise((resolve, reject) => { - knex('users').select('*').where({ username: body.username }) - .then((finished) => { - if (finished[0] == null || finished[0] == undefined) { - return reject(new RequestResponse('No account found', false, ErrorCode.INVALID_CREDENTIALS)); - } - - const check = bcrypt.compareSync(body.password, finished[0].password); - if (!check) return reject(new RequestResponse('Password is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - - const account: PublicAccount = { - username: finished[0].username, - creation_date: finished[0].creation_date, - mc_id: finished[0].mc_id, - dc_id: finished[0].dc_id, - id: finished[0].id, - }; - - if (body.token) account.token = finished[0].token; - - resolve(new RequestResponse('Account found', true, -1, account)); - }) - .catch((err) => reject(new RequestResponse('An internal server error has occurred', false, ErrorCode.UNKNOWN))); -}); - -export const getAccountByToken = (body: { token: string }) => new Promise((resolve, reject) => { - knex('users').select('*').where({ token: body.token }) - .then((finished) => { - if (finished[0] == null || finished[0] == undefined) { - return reject(new RequestResponse('No account found', false, ErrorCode.INVALID_CREDENTIALS)); - } - - const account: PublicAccount = { - username: finished[0].username, - creation_date: finished[0].creation_date, - mc_id: finished[0].mc_id, - dc_id: finished[0].dc_id, - id: finished[0].id, - token: finished[0].token, - }; - - resolve(new RequestResponse('Account found', true, -1, account)); - }) - .catch((err) => reject(new RequestResponse('An internal server error has occurred', false, ErrorCode.UNKNOWN))); -}); diff --git a/src/interfaces/Container.ts b/src/interfaces/Container.ts deleted file mode 100644 index d8f5534..0000000 --- a/src/interfaces/Container.ts +++ /dev/null @@ -1,22 +0,0 @@ -interface Client { - dataUrl: string, - name: string, - javaVersion: number, - mainClass: string, - startupArguments: string, - type: string, -} - -interface Mod { - -} - -interface Container { - name: string, - client: Client, - id: string, - mods: Mod[], - user_id?: number | string -} - -export default Container; diff --git a/src/models/ContainerModel.ts b/src/models/ContainerModel.ts new file mode 100644 index 0000000..323acaa --- /dev/null +++ b/src/models/ContainerModel.ts @@ -0,0 +1,22 @@ +import { ObjectId } from 'mongodb'; +import ModsModel from './ModsModel'; + +interface ClientModel { + dataUrl: string, + name: string, + javaVersion: number, + mainClass: string, + startupArguments: string, + type: string, +} + +export default class ContainerModel { + constructor( + public name: string, + public id: string, + public memory: string, + public mods: ModsModel[], + public client: ClientModel, + public objectID: ObjectId, + ) {} +} diff --git a/src/models/ModsModel.ts b/src/models/ModsModel.ts new file mode 100644 index 0000000..27d196b --- /dev/null +++ b/src/models/ModsModel.ts @@ -0,0 +1,8 @@ +export default class ModsModel { + constructor( + public name: string, + public id: string, + public version: string, + public type: string, + ) {} +} diff --git a/src/models/UserModel.ts b/src/models/UserModel.ts new file mode 100644 index 0000000..576268d --- /dev/null +++ b/src/models/UserModel.ts @@ -0,0 +1,10 @@ +import { ObjectId } from 'mongodb'; + +export default class User { + constructor( + public name: string, + public created: string, + public minecraftId: string, + public objectId?: ObjectId, + ) {} +} diff --git a/src/routes/Status.ts b/src/routes/Status.ts deleted file mode 100644 index 25259f3..0000000 --- a/src/routes/Status.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Request, Response } from 'express'; -import Route from '../Route'; - -class StatusRoute extends Route { - init(req: Request, res: Response) { - res.json({ - api: 'ok', - website: 'ok', - }); - } - - constructor() { - super({ - name: 'Status', - url: 'status', - method: 'get', - }); - } -} - -export default new StatusRoute(); diff --git a/src/routes/account/EditAccountRoute.ts b/src/routes/account/EditAccountRoute.ts deleted file mode 100644 index b97079c..0000000 --- a/src/routes/account/EditAccountRoute.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Request, Response } from 'express'; -import bcrypt from 'bcrypt'; -import jwt from 'jsonwebtoken'; -import Route from '../../Route'; -import ErrorCode from '../../utils/ErrorCode'; -import RequestResponse from '../../utils/Response'; -import { knex } from '../..'; - -class EditAccountRoute extends Route { - init(req: Request, res: Response) { - if (req.body.token == (undefined || 'undefined' || 'null' || null || '')) return res.status(400).json(new RequestResponse('Token is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - - knex('users').select('*').where({ token: req.body.token }) - .then((finished) => { - if (finished[0] == null || finished[0] == undefined) { - return res.status(400).json(new RequestResponse('Invalid token', false, ErrorCode.INVALID_CREDENTIALS)); - } - - interface ISettings { - username?: string, - password?: string, - mc_id?: string, - dc_id?: string, - token?: string, - } - - const settingsToChange: ISettings = {}; - - if (req.body.hasOwnProperty('username')) { settingsToChange.username = req.body.username; } - if (req.body.hasOwnProperty('password')) { - const token = jwt.sign({ - data: { - password: req.body.password, - created: Date.now(), - }, - }, process.env.TOKEN, { - expiresIn: '60d', - }); - - const hashedPassword = bcrypt.hashSync(req.body.password, 10); - - settingsToChange.password = hashedPassword; - settingsToChange.token = token; - } - - knex('users').where({ token: req.body.token })[0].update(settingsToChange) - .then((done) => { - res.status(201).json(new RequestResponse('Changed settings', true, -1)); - console.log(done); - console.log(settingsToChange); - }); - }) - .catch((err) => res.status(500).json(new RequestResponse('An internal server error has occurred', false, ErrorCode.UNKNOWN))); - } - - constructor() { - super({ - name: 'EditAccount', - url: 'auth/edit', - method: 'post', - }); - } -} - -export default new EditAccountRoute(); diff --git a/src/routes/account/GetAccountRoute.ts b/src/routes/account/GetAccountRoute.ts deleted file mode 100644 index d21cdd3..0000000 --- a/src/routes/account/GetAccountRoute.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Request, Response } from 'express'; -import Route from '../../Route'; -import ErrorCode from '../../utils/ErrorCode'; -import RequestResponse from '../../utils/Response'; -import { getAccount } from '../../interfaces/Account'; - -class GetAccountRoute extends Route { - init(req: Request, res: Response) { - if (req.body.username == ('undefined' || 'null' || null || undefined || '')) return res.status(400).json(new RequestResponse('Username is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - if (req.body.password == ('undefined' || 'null' || null || undefined || '')) return res.status(400).json(new RequestResponse('Password is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - - getAccount(req.body) - .then((account) => res.status(200).json(account)) - .catch((err) => res.status(400).json(err)); - } - - constructor() { - super({ - name: 'GetAccount', - url: 'auth/get', - method: 'post', - }); - } -} - -export default new GetAccountRoute(); diff --git a/src/routes/account/RegisterRoute.ts b/src/routes/account/RegisterRoute.ts deleted file mode 100644 index 08bc778..0000000 --- a/src/routes/account/RegisterRoute.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Request, Response } from 'express'; -import bcrypt from 'bcrypt'; -import jwt from 'jsonwebtoken'; -import Route from '../../Route'; -import ErrorCode from '../../utils/ErrorCode'; -import RequestResponse from '../../utils/Response'; -import { Account } from '../../interfaces/Account'; -import { knex } from '../..'; - -class RegisterRoute extends Route { - init(req: Request, res: Response) { - if (req.body.username == ('undefined' || 'null' || null || undefined || '')) return res.status(400).json(new RequestResponse('Username is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - if (req.body.password == ('undefined' || 'null' || null || undefined || '')) return res.status(400).json(new RequestResponse('Password is invalid', false, ErrorCode.INVALID_CREDENTIALS)); - - knex('users').select('*').where({ username: req.body.username }) - .then((finished) => { - if (finished[0] != null || finished[0] != undefined) { - return res.status(400).json(new RequestResponse(`Account with the username '${req.body.username}' already exists`, false, ErrorCode.DUPLICATE)); - } - - const token = jwt.sign({ - data: { - password: req.body.password, - created: Date.now(), - }, - }, process.env.TOKEN, { - expiresIn: '60d', - }); - - const hashedPassword = bcrypt.hashSync(req.body.password, 10); - - const account: Account = { - username: req.body.username, - password: hashedPassword, - creation_date: String(Math.floor(Date.now() / 1000)), - token, - }; - - knex('users').select('*').insert(account) - .then((finished) => { - - }) - .catch((err) => console.error(err)); - - res.status(201).json(new RequestResponse('Created new account', true, -1)); - }) - .catch((err) => res.status(500).json(new RequestResponse('An internal server error has occurred', false, ErrorCode.UNKNOWN))); - } - - constructor() { - super({ - name: 'Register', - url: 'auth/register', - method: 'post', - }); - } -} - -export default new RegisterRoute(); diff --git a/src/routes/auth/Microsoft.ts b/src/routes/auth/Microsoft.ts new file mode 100644 index 0000000..aa5cf17 --- /dev/null +++ b/src/routes/auth/Microsoft.ts @@ -0,0 +1,47 @@ +import { Request, Response } from 'express'; +import Account from '../../accounts/Account'; +import MicrosoftAuth from '../../accounts/MicrosoftAuth'; +import sendResponse from '../../RequestResponse'; +import Route, { RouteOptions } from '../../Route'; +import HttpStatusCode from '../../utils/HttpStatusCode'; + +class Microsoft extends Route { + opts: RouteOptions = { + method: 'get', + url: 'auth/microsoft', + }; + + async init(req: Request, res: Response) { + const auth = new MicrosoftAuth(req, res); + + if (req.query.code == (undefined || null)) return auth.redirect(); + + const token: any = await auth.codeToToken(String(req.query.code)); + if (!token.access_token) return sendResponse(res, 'Code is invalid/expired', HttpStatusCode.BAD_REQUEST); + + const xblToken = await (await auth.authWithXBL(String(token.access_token))).Token; + const xsts = await auth.authWithXSTS(xblToken); + + switch (xsts.XErr) { + default: break; + case 2148916233: + return sendResponse(res, 'This account doesn\' have an Xbox Account. No idea how you did this one buddy', HttpStatusCode.BAD_REQUEST); + case 2148916235: + return sendResponse(res, 'This account is from a country where Xbox Live is not available and/or banned'); + case 2148916238: + return sendResponse(res, 'This account is a child (under 18) and cannot proceed unless the account is added to a Family by an adult.'); + } + const mcToken = await (await auth.authWithMC(xsts.DisplayClaims.xui[0].uhs, xsts.Token)).access_token; + const profile = await auth.getProfile(mcToken); + + if (profile.error) return sendResponse(res, 'Couldn\'t get your profile. Possible solutions is to login to the Minecraft Launcher and try again else double check you own the real Minecraft', HttpStatusCode.BAD_REQUEST); + + if (!(await Account.exists(profile.id)).valueOf()) { + await Account.create(profile.name, profile.id); + } + + res.send(profile); + } +} + +export default new Microsoft(); diff --git a/src/routes/auth/MicrosoftAuthRoute.ts b/src/routes/auth/MicrosoftAuthRoute.ts deleted file mode 100644 index 1a32e36..0000000 --- a/src/routes/auth/MicrosoftAuthRoute.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Request, Response } from 'express'; -import MicrosoftAuth from '../../external/MicrosoftAuth'; -import Route from '../../Route'; -import ErrorCode from '../../utils/ErrorCode'; -import RequestResponse from '../../utils/Response'; - -class MicrosoftAuthRoute extends Route { - init(req: Request, res: Response) { - if (req.query.code == (undefined || null)) return res.json(new RequestResponse('Code is invalid', false, ErrorCode.MALFORMED)); - - MicrosoftAuth.codeToToken(String(req.query.code)) - .then((data: object) => res.json(new RequestResponse('Successfully converted code to token', true, -1, data))) - .catch((err) => res.json(new RequestResponse('Error', false, ErrorCode.UNKNOWN, err))); - } - - constructor() { - super({ - name: 'MicrosoftAuth', - url: 'auth/microsoft', - method: 'post', - }); - } -} - -export default new MicrosoftAuthRoute(); diff --git a/src/routes/containers/Create.ts b/src/routes/containers/Create.ts new file mode 100644 index 0000000..9a84958 --- /dev/null +++ b/src/routes/containers/Create.ts @@ -0,0 +1,28 @@ +import { Request, Response } from 'express'; +import ContainerModel from '../../models/ContainerModel'; +import sendResponse from '../../RequestResponse'; +import Route, { RouteOptions } from '../../Route'; +import HttpStatusCode from '../../utils/HttpStatusCode'; +import Mongo from '../../utils/Mongo'; + +class CreateContainer extends Route { + opts: RouteOptions = { + url: 'containers/create', + method: 'post', + } + + async init(req: Request, res: Response) { + const contRequest: ContainerModel = req.body; + + // this is scuffed asf + if (!contRequest.client.dataUrl.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/gi)) { + return sendResponse(res, 'Couldn\'t insert document. dataUrl is not a valid url', HttpStatusCode.BAD_REQUEST); + } + + Mongo.collections.containers.insertOne(contRequest) + .then((data) => sendResponse(res, 'Inserted document', 200)) + .catch((err) => sendResponse(res, 'Couldn\'t insert document.', HttpStatusCode.BAD_REQUEST, err)); + } +} + +export default new CreateContainer(); diff --git a/src/routes/containers/Get.ts b/src/routes/containers/Get.ts new file mode 100644 index 0000000..ecd71c0 --- /dev/null +++ b/src/routes/containers/Get.ts @@ -0,0 +1,33 @@ +import { Response, Request } from 'express'; +import ContainerModel from '../../models/ContainerModel'; +import ModsModel from '../../models/ModsModel'; +import Route, { RouteOptions } from '../../Route'; +import Mongo from '../../utils/Mongo'; + +interface ContainerFilters { + name?: string, + id?: string, + type?: string, + version?: string, + mods?: ModsModel[], +} + +class GetContainers extends Route { + opts: RouteOptions = { + url: 'containers/get', + method: 'get', + } + + async init(req: Request, res: Response) { + const filters = req.query.filters || {}; + const one = req.query.one || false; + + console.log(req.query); + + const documents = await Mongo.collections.containers.find({ filters }).limit(15).toArray(); + + res.send(one ? documents[0] : documents); + } +} + +export default new GetContainers(); diff --git a/src/routes/containers/GetContainers.ts b/src/routes/containers/GetContainers.ts deleted file mode 100644 index 9b6eceb..0000000 --- a/src/routes/containers/GetContainers.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Request, Response } from 'express'; -import { knex } from '../..'; -import Route from '../../Route'; -import { clamp } from '../../utils/MathUtils'; - -class GetContainersRoute extends Route { - init(req: Request, res: Response) { - interface ISettings { - max?: number, - name?: string, - id?: string, - } - - const settings: ISettings = {}; - - settings.max = clamp(Number(req.query.max), 1, 50); - settings.name = String(req.query.name); - settings.id = String(req.query.id); - - const kn = knex('containers').limit(settings.max); - - if (settings.name != 'undefined') kn.where({ name: settings.name }); - if (settings.id != 'undefined') kn.where({ id: settings.id }); - - kn.then((finished) => { - res.json(finished); - }); - } - - constructor() { - super({ - name: 'GetContainers', - url: 'containers', - method: 'get', - }); - } -} - -export default new GetContainersRoute(); diff --git a/src/routes/containers/UploadContainer.ts b/src/routes/containers/UploadContainer.ts deleted file mode 100644 index ffe866d..0000000 --- a/src/routes/containers/UploadContainer.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Request, Response } from 'express'; -import { knex } from '../..'; -import { getAccount, getAccountByToken, PublicAccount } from '../../interfaces/Account'; -import Container from '../../interfaces/Container'; -import Route from '../../Route'; -import ErrorCode from '../../utils/ErrorCode'; -import RequestResponse from '../../utils/Response'; -import { generator } from '../../utils/Snowflake'; - -interface Body { - user_token: string, - container: Container, -} - -class UploadContainerRoute extends Route { - init(req: Request, res: Response) { - const body: Body = { - user_token: req.body.token, - container: { - name: req.body.name, - id: generator.nextId().toString(), - client: req.body.client, - mods: req.body.mods, - }, - }; - - if (body.user_token == (undefined || null)) return res.status(400).json(new RequestResponse('User Token not provided or invalid', false, ErrorCode.NOT_AUTHENTICATED)); - if (body.container.name == (undefined || null) || body.container.name.length < 3) return res.status(400).json(new RequestResponse('Container Name does not fit regulations', false, ErrorCode.MALFORMED)); - if (body.container.mods == (undefined || null)) return res.status(400).json(new RequestResponse('Mods not present', false, ErrorCode.MALFORMED)); - if (body.container.client == (undefined || null)) return res.status(400).json(new RequestResponse('Client not present', false, ErrorCode.MALFORMED)); - - getAccountByToken({ token: body.user_token }) - .then((account: any) => { - knex('containers') - .insert({ - id: body.container.id, - name: body.container.name, - client: JSON.stringify(body.container.client), - mods: JSON.stringify(body.container.mods), - user_id: account.additionalContent.id, - }) - .then((finished) => { - res.status(201).json(new RequestResponse('Successfully uploaded container', true)); - }); - }) - .catch((err) => res.status(400).json(err)); - } - - constructor() { - super({ - name: 'UploadContainer', - url: 'containers/upload', - method: 'post', - }); - } -} - -export default new UploadContainerRoute(); diff --git a/src/utils/ErrorCode.ts b/src/utils/ErrorCode.ts deleted file mode 100644 index 086661b..0000000 --- a/src/utils/ErrorCode.ts +++ /dev/null @@ -1,13 +0,0 @@ -enum ErrorCode { - - UNKNOWN, - WRONG_FORMAT, - INVALID_METHOD, - NOT_AUTHENTICATED, - MALFORMED, - INVALID_CREDENTIALS, - DUPLICATE, - -} - -export default ErrorCode; diff --git a/src/utils/HttpStatusCode.ts b/src/utils/HttpStatusCode.ts new file mode 100644 index 0000000..ffab6d2 --- /dev/null +++ b/src/utils/HttpStatusCode.ts @@ -0,0 +1,386 @@ +/** + * Hypertext Transfer Protocol (HTTP) response status codes. + * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} + */ + +/** + * Taken from scokmen's gist + * @see {@link https://gist.githubusercontent.com/scokmen/f813c904ef79022e84ab2409574d1b45/raw/cd8709a2fccb005bb53e9bfb2461e07d40b4e8d8/HttpStatusCode.ts} + */ +enum HttpStatusCode { + + /** + * The server has received the request headers and the client should proceed to send the request body + * (in the case of a request for which a body needs to be sent; for example, a POST request). + * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient. + * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request + * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued. + */ + CONTINUE = 100, + + /** + * The requester has asked the server to switch protocols and the server has agreed to do so. + */ + SWITCHING_PROTOCOLS = 101, + + /** + * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. + * This code indicates that the server has received and is processing the request, but no response is available yet. + * This prevents the client from timing out and assuming the request was lost. + */ + PROCESSING = 102, + + /** + * Standard response for successful HTTP requests. + * The actual response will depend on the request method used. + * In a GET request, the response will contain an entity corresponding to the requested resource. + * In a POST request, the response will contain an entity describing or containing the result of the action. + */ + OK = 200, + + /** + * The request has been fulfilled, resulting in the creation of a new resource. + */ + CREATED = 201, + + /** + * The request has been accepted for processing, but the processing has not been completed. + * The request might or might not be eventually acted upon, and may be disallowed when processing occurs. + */ + ACCEPTED = 202, + + /** + * SINCE HTTP/1.1 + * The server is a transforming proxy that received a 200 OK from its origin, + * but is returning a modified version of the origin's response. + */ + NON_AUTHORITATIVE_INFORMATION = 203, + + /** + * The server successfully processed the request and is not returning any content. + */ + NO_CONTENT = 204, + + /** + * The server successfully processed the request, but is not returning any content. + * Unlike a 204 response, this response requires that the requester reset the document view. + */ + RESET_CONTENT = 205, + + /** + * The server is delivering only part of the resource (byte serving) due to a range header sent by the client. + * The range header is used by HTTP clients to enable resuming of interrupted downloads, + * or split a download into multiple simultaneous streams. + */ + PARTIAL_CONTENT = 206, + + /** + * The message body that follows is an XML message and can contain a number of separate response codes, + * depending on how many sub-requests were made. + */ + MULTI_STATUS = 207, + + /** + * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, + * and are not being included again. + */ + ALREADY_REPORTED = 208, + + /** + * The server has fulfilled a request for the resource, + * and the response is a representation of the result of one or more instance-manipulations applied to the current instance. + */ + IM_USED = 226, + + /** + * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation). + * For example, this code could be used to present multiple video format options, + * to list files with different filename extensions, or to suggest word-sense disambiguation. + */ + MULTIPLE_CHOICES = 300, + + /** + * This and all future requests should be directed to the given URI. + */ + MOVED_PERMANENTLY = 301, + + /** + * This is an example of industry practice contradicting the standard. + * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect + * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 + * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 + * to distinguish between the two behaviours. However, some Web applications and frameworks + * use the 302 status code as if it were the 303. + */ + FOUND = 302, + + /** + * SINCE HTTP/1.1 + * The response to the request can be found under another URI using a GET method. + * When received in response to a POST (or PUT/DELETE), the client should presume that + * the server has received the data and should issue a redirect with a separate GET message. + */ + SEE_OTHER = 303, + + /** + * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. + * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy. + */ + NOT_MODIFIED = 304, + + /** + * SINCE HTTP/1.1 + * The requested resource is available only through a proxy, the address for which is provided in the response. + * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons. + */ + USE_PROXY = 305, + + /** + * No longer used. Originally meant "Subsequent requests should use the specified proxy." + */ + SWITCH_PROXY = 306, + + /** + * SINCE HTTP/1.1 + * In this case, the request should be repeated with another URI; however, future requests should still use the original URI. + * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. + * For example, a POST request should be repeated using another POST request. + */ + TEMPORARY_REDIRECT = 307, + + /** + * The request and all future requests should be repeated using another URI. + * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change. + * So, for example, submitting a form to a permanently redirected resource may continue smoothly. + */ + PERMANENT_REDIRECT = 308, + + /** + * The server cannot or will not process the request due to an apparent client error + * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing). + */ + BAD_REQUEST = 400, + + /** + * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet + * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the + * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means + * "unauthenticated",i.e. the user does not have the necessary credentials. + */ + UNAUTHORIZED = 401, + + /** + * Reserved for future use. The original intention was that this code might be used as part of some form of digital + * cash or micro payment scheme, but that has not happened, and this code is not usually used. + * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. + */ + PAYMENT_REQUIRED = 402, + + /** + * The request was valid, but the server is refusing action. + * The user might not have the necessary permissions for a resource. + */ + FORBIDDEN = 403, + + /** + * The requested resource could not be found but may be available in the future. + * Subsequent requests by the client are permissible. + */ + NOT_FOUND = 404, + + /** + * A request method is not supported for the requested resource; + * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. + */ + METHOD_NOT_ALLOWED = 405, + + /** + * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request. + */ + NOT_ACCEPTABLE = 406, + + /** + * The client must first authenticate itself with the proxy. + */ + PROXY_AUTHENTICATION_REQUIRED = 407, + + /** + * The server timed out waiting for the request. + * According to HTTP specifications: + * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time." + */ + REQUEST_TIMEOUT = 408, + + /** + * Indicates that the request could not be processed because of conflict in the request, + * such as an edit conflict between multiple simultaneous updates. + */ + CONFLICT = 409, + + /** + * Indicates that the resource requested is no longer available and will not be available again. + * This should be used when a resource has been intentionally removed and the resource should be purged. + * Upon receiving a 410 status code, the client should not request the resource in the future. + * Clients such as search engines should remove the resource from their indices. + * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead. + */ + GONE = 410, + + /** + * The request did not specify the length of its content, which is required by the requested resource. + */ + LENGTH_REQUIRED = 411, + + /** + * The server does not meet one of the preconditions that the requester put on the request. + */ + PRECONDITION_FAILED = 412, + + /** + * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large". + */ + PAYLOAD_TOO_LARGE = 413, + + /** + * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request, + * in which case it should be converted to a POST request. + * Called "Request-URI Too Long" previously. + */ + URI_TOO_LONG = 414, + + /** + * The request entity has a media type which the server or resource does not support. + * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format. + */ + UNSUPPORTED_MEDIA_TYPE = 415, + + /** + * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion. + * For example, if the client asked for a part of the file that lies beyond the end of the file. + * Called "Requested Range Not Satisfiable" previously. + */ + RANGE_NOT_SATISFIABLE = 416, + + /** + * The server cannot meet the requirements of the Expect request-header field. + */ + EXPECTATION_FAILED = 417, + + /** + * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, + * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by + * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com. + */ + I_AM_A_TEAPOT = 418, + + /** + * The request was directed at a server that is not able to produce a response (for example because a connection reuse). + */ + MISDIRECTED_REQUEST = 421, + + /** + * The request was well-formed but was unable to be followed due to semantic errors. + */ + UNPROCESSABLE_ENTITY = 422, + + /** + * The resource that is being accessed is locked. + */ + LOCKED = 423, + + /** + * The request failed due to failure of a previous request (e.g., a PROPPATCH). + */ + FAILED_DEPENDENCY = 424, + + /** + * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field. + */ + UPGRADE_REQUIRED = 426, + + /** + * The origin server requires the request to be conditional. + * Intended to prevent "the 'lost update' problem, where a client + * GETs a resource's state, modifies it, and PUTs it back to the server, + * when meanwhile a third party has modified the state on the server, leading to a conflict." + */ + PRECONDITION_REQUIRED = 428, + + /** + * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes. + */ + TOO_MANY_REQUESTS = 429, + + /** + * The server is unwilling to process the request because either an individual header field, + * or all the header fields collectively, are too large. + */ + REQUEST_HEADER_FIELDS_TOO_LARGE = 431, + + /** + * A server operator has received a legal demand to deny access to a resource or to a set of resources + * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451. + */ + UNAVAILABLE_FOR_LEGAL_REASONS = 451, + + /** + * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. + */ + INTERNAL_SERVER_ERROR = 500, + + /** + * The server either does not recognize the request method, or it lacks the ability to fulfill the request. + * Usually this implies future availability (e.g., a new feature of a web-service API). + */ + NOT_IMPLEMENTED = 501, + + /** + * The server was acting as a gateway or proxy and received an invalid response from the upstream server. + */ + BAD_GATEWAY = 502, + + /** + * The server is currently unavailable (because it is overloaded or down for maintenance). + * Generally, this is a temporary state. + */ + SERVICE_UNAVAILABLE = 503, + + /** + * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. + */ + GATEWAY_TIMEOUT = 504, + + /** + * The server does not support the HTTP protocol version used in the request + */ + HTTP_VERSION_NOT_SUPPORTED = 505, + + /** + * Transparent content negotiation for the request results in a circular reference. + */ + VARIANT_ALSO_NEGOTIATES = 506, + + /** + * The server is unable to store the representation needed to complete the request. + */ + INSUFFICIENT_STORAGE = 507, + + /** + * The server detected an infinite loop while processing the request. + */ + LOOP_DETECTED = 508, + + /** + * Further extensions to the request are required for the server to fulfill it. + */ + NOT_EXTENDED = 510, + + /** + * The client needs to authenticate to gain network access. + * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used + * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot). + */ + NETWORK_AUTHENTICATION_REQUIRED = 511 +} + +export default HttpStatusCode; diff --git a/src/utils/Mongo.ts b/src/utils/Mongo.ts new file mode 100644 index 0000000..8d4f7b7 --- /dev/null +++ b/src/utils/Mongo.ts @@ -0,0 +1,43 @@ +import * as mongo from 'mongodb'; +import mongoValidator from '../../mongo_validation.json'; + +export interface MongoCollections { + containers?: mongo.Collection, + users?: mongo.Collection +} + +class Mongo { + collections: MongoCollections = {}; + + public connect() { + return new Promise((resolve, reject) => { + const client = new mongo.MongoClient(String(process.env.DB_CONN)); + + client.connect() + .then(() => { + const db: mongo.Db = client.db(String(process.env.DB_NAME)); + + this.collections.containers = db.collection('containers'); + this.collections.users = db.collection('users'); + + db.command({ + collMod: 'containers', + validator: mongoValidator.containers.validation, + }); + + db.command({ + collMod: 'users', + validator: mongoValidator.users.validation, + }); + + console.log(`Connected to MongoDB at ${String(process.env.DB_CONN)}`); + resolve({}); + }) + .catch((err) => { + reject(err); + }); + }); + } +} + +export default new Mongo(); diff --git a/src/utils/Response.ts b/src/utils/Response.ts deleted file mode 100644 index d09e2b3..0000000 --- a/src/utils/Response.ts +++ /dev/null @@ -1,21 +0,0 @@ -import ErrorCode from './ErrorCode'; - -class RequestResponse { - constructor( - public message: string = 'No message provided', - public success: boolean = false, - public errorCode: ErrorCode = -1, - public additionalContent: object = {}, - ) {} - - get toJSON() { - return { - message: this.message, - success: this.success, - error_code: this.errorCode, - additional: this.additionalContent, - }; - } -} - -export default RequestResponse; diff --git a/yarn.lock b/yarn.lock index 7040211..29791cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -184,6 +184,19 @@ resolved "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== +"@types/webidl-conversions@*": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz#e33bc8ea812a01f63f90481c666334844b12a09e" + integrity sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q== + +"@types/whatwg-url@^8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@types/whatwg-url/-/whatwg-url-8.2.1.tgz#f1aac222dab7c59e011663a0cb0a3117b2ef05d4" + integrity sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ== + dependencies: + "@types/node" "*" + "@types/webidl-conversions" "*" + "@typescript-eslint/eslint-plugin@^4.31.2": version "4.31.2" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz" @@ -457,6 +470,11 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -515,6 +533,13 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" +bson@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/bson/-/bson-4.6.0.tgz#15c3b39ba3940c3d915a0c44d51459f4b4fbf1b2" + integrity sha512-8jw1NU1hglS+Da1jDOUYuNcBJ4cNHCFIqzlwoFNnsTOg2R/ox0aTYcTiBN4dzRa9q7Cvy6XErh3L8ReTEb9AQQ== + dependencies: + buffer "^5.6.0" + buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -525,6 +550,14 @@ buffer-from@^1.0.0: resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bytes@3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz" @@ -624,11 +657,6 @@ color-support@^1.1.2: resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -colorette@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" - integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -636,11 +664,6 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -716,7 +739,7 @@ debug@2.6.9, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.2, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: +debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: version "4.3.2" resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== @@ -757,6 +780,11 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= +denque@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/denque/-/denque-2.0.1.tgz#bcef4c1b80dc32efe97515744f21a4229ab8934a" + integrity sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ== + depd@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" @@ -887,11 +915,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" @@ -1031,11 +1054,6 @@ eslint@^7.32.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -esm@^3.2.25: - version "3.2.25" - resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" - integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== - espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz" @@ -1334,11 +1352,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -getopts@2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" - integrity sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA== - getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -1492,6 +1505,11 @@ iconv-lite@0.4.24, iconv-lite@^0.4.4: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore-walk@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" @@ -1554,11 +1572,6 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" @@ -1796,25 +1809,6 @@ jws@^3.2.2: jwa "^1.4.1" safe-buffer "^5.0.1" -knex@^0.95.11: - version "0.95.11" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.95.11.tgz#1526bd700cb07497252214d34c10f660aee01a3e" - integrity sha512-grDetD91O8VoQVCFqeWTgkzdq5406W6rggF/lK1hHuwzmjDs/0m9KxyncGdZbklTi7aUgHvw3+Cfy4x7FvpdaQ== - dependencies: - colorette "1.2.1" - commander "^7.1.0" - debug "4.3.2" - escalade "^3.1.1" - esm "^3.2.25" - getopts "2.2.5" - interpret "^2.2.0" - lodash "^4.17.21" - pg-connection-string "2.5.0" - rechoir "0.7.0" - resolve-from "^5.0.0" - tarn "^3.0.1" - tildify "2.0.0" - levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -1891,11 +1885,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" @@ -1920,6 +1909,11 @@ media-typer@0.3.0: resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memory-pager@^1.0.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" + integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" @@ -2026,6 +2020,25 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mongodb-connection-string-url@^2.3.2: + version "2.4.1" + resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz#6b3c6c40133a0ad059fe9a0abda64b2a1cb4e8b4" + integrity sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug== + dependencies: + "@types/whatwg-url" "^8.2.1" + whatwg-url "^11.0.0" + +mongodb@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.2.2.tgz#cd70568bd96003877e35358ad17a0c5de35c6dfd" + integrity sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug== + dependencies: + bson "^4.6.0" + denque "^2.0.1" + mongodb-connection-string-url "^2.3.2" + optionalDependencies: + saslprep "^1.0.3" + ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" @@ -2367,11 +2380,6 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pg-connection-string@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.5.0.tgz#538cadd0f7e603fc09a12590f3b8a452c2c0cf34" - integrity sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ== - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" @@ -2515,13 +2523,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" - integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== - dependencies: - resolve "^1.9.0" - regexpp@^3.1.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" @@ -2563,12 +2564,7 @@ resolve-from@^4.0.0: resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.0.0, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.9.0: +resolve@^1.0.0, resolve@^1.10.0, resolve@^1.20.0: version "1.20.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -2617,6 +2613,13 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +saslprep@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226" + integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== + dependencies: + sparse-bitfield "^3.0.3" + sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -2741,6 +2744,13 @@ source-map@^0.6.0: resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +sparse-bitfield@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" + integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE= + dependencies: + memory-pager "^1.0.2" + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz" @@ -2954,21 +2964,11 @@ tar@^6.1.11: mkdirp "^1.0.3" yallist "^4.0.0" -tarn@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.1.tgz#ebac2c6dbc6977d34d4526e0a7814200386a8aec" - integrity sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw== - text-table@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -tildify@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" - integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" @@ -2989,6 +2989,13 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -3165,6 +3172,19 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" From 12617330b1f52ce06689dbdc9054c18dea99daff Mon Sep 17 00:00:00 2001 From: Hot-Tutorials Date: Tue, 4 Jan 2022 10:05:24 +0100 Subject: [PATCH 3/4] Containers now require accounts. Accounts fully added? --- mongo_validation.json | 6 +++++- src/accounts/Account.ts | 33 +++++++++++++++++++++++++++++---- src/models/ContainerModel.ts | 2 ++ src/models/UserModel.ts | 8 ++++++++ src/routes/auth/Microsoft.ts | 2 ++ src/routes/containers/Create.ts | 14 +++++++++++++- 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/mongo_validation.json b/mongo_validation.json index a2be79e..e0ed4c3 100644 --- a/mongo_validation.json +++ b/mongo_validation.json @@ -88,7 +88,8 @@ "required": [ "name", "created", - "minecraftId" + "minecraftId", + "token" ], "properties": { "name": { @@ -99,6 +100,9 @@ }, "minecraftId": { "bsonType": "string" + }, + "token": { + "bsonType": "string" } } } diff --git a/src/accounts/Account.ts b/src/accounts/Account.ts index e59a516..4ddfa6e 100644 --- a/src/accounts/Account.ts +++ b/src/accounts/Account.ts @@ -1,20 +1,45 @@ -import User from '../models/UserModel'; +import { ObjectId } from 'mongodb'; +import Crypto from 'crypto'; +import User, { UserType } from '../models/UserModel'; import Mongo from '../utils/Mongo'; class Accounts { + public generateToken(uuid: string, time: string): string { + const first = Buffer.from(uuid).toString('base64'); + const second = Buffer.from(time).toString('base64'); + const third = Crypto.createHmac('sha1', process.env.KEY).update(first + second).digest('hex'); + + return `${first}.${second}.${third}`; + } + public async create(name: string, uuid: string) { const document: User = { name, - created: String(Math.floor(Date.now() / 1000)), + created: String(Date.now()), minecraftId: uuid, + token: this.generateToken(uuid, String(Date.now())), }; await Mongo.collections.users.insertOne(document); } - public get(uuid: string) { return Mongo.collections.users.findOne({ minecraftId: uuid }); } + public get(query: {}) { return Mongo.collections.users.findOne(query); } + + public getFromUUID(uuid: string) { return Mongo.collections.users.findOne({ minecraftId: uuid }); } + + public async update(uuid: string, update: UserType) { + if (!(await this.exists(uuid)).valueOf()) return; + + update.token = this.generateToken(uuid, String(Date.now())); + + await Mongo.collections.users.updateOne({ minecraftId: uuid }, { + $set: update, + }); + } + + public async exists(uuid: string): Promise { return !!(await this.getFromUUID(uuid)); } - public async exists(uuid: string): Promise { return !!(await this.get(uuid)); } + public async existsQuery(query: {}): Promise { return !!(await this.get(query)); } } export default new Accounts(); diff --git a/src/models/ContainerModel.ts b/src/models/ContainerModel.ts index 323acaa..058f431 100644 --- a/src/models/ContainerModel.ts +++ b/src/models/ContainerModel.ts @@ -1,5 +1,6 @@ import { ObjectId } from 'mongodb'; import ModsModel from './ModsModel'; +import User from './UserModel'; interface ClientModel { dataUrl: string, @@ -18,5 +19,6 @@ export default class ContainerModel { public mods: ModsModel[], public client: ClientModel, public objectID: ObjectId, + public minecraftId: string, ) {} } diff --git a/src/models/UserModel.ts b/src/models/UserModel.ts index 576268d..831ae62 100644 --- a/src/models/UserModel.ts +++ b/src/models/UserModel.ts @@ -1,10 +1,18 @@ import { ObjectId } from 'mongodb'; +export interface UserType { + name?: string, + created?: string, + minecraftId?: string, + token?: string +} + export default class User { constructor( public name: string, public created: string, public minecraftId: string, + public token: string, public objectId?: ObjectId, ) {} } diff --git a/src/routes/auth/Microsoft.ts b/src/routes/auth/Microsoft.ts index aa5cf17..ee4905e 100644 --- a/src/routes/auth/Microsoft.ts +++ b/src/routes/auth/Microsoft.ts @@ -38,6 +38,8 @@ class Microsoft extends Route { if (!(await Account.exists(profile.id)).valueOf()) { await Account.create(profile.name, profile.id); + } else { + await Account.update(profile.id, { name: profile.name }); } res.send(profile); diff --git a/src/routes/containers/Create.ts b/src/routes/containers/Create.ts index 9a84958..c2c0e8b 100644 --- a/src/routes/containers/Create.ts +++ b/src/routes/containers/Create.ts @@ -1,5 +1,7 @@ import { Request, Response } from 'express'; +import Account from '../../accounts/Account'; import ContainerModel from '../../models/ContainerModel'; +import User from '../../models/UserModel'; import sendResponse from '../../RequestResponse'; import Route, { RouteOptions } from '../../Route'; import HttpStatusCode from '../../utils/HttpStatusCode'; @@ -12,13 +14,23 @@ class CreateContainer extends Route { } async init(req: Request, res: Response) { - const contRequest: ContainerModel = req.body; + if (!req.body.token) return sendResponse(res, 'Couldn\'t insert document. token is missing', HttpStatusCode.UNAUTHORIZED); + + const exists = await (await Account.existsQuery({ token: req.body.token })).valueOf(); + if (!exists) return sendResponse(res, 'Couldn\'t insert document. Provided token is invalid', HttpStatusCode.UNAUTHORIZED); + + const contRequest: ContainerModel = req.body.container; + + const user: User = await Account.get({ token: req.body.token }); + const uuid = user.minecraftId; // this is scuffed asf if (!contRequest.client.dataUrl.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/gi)) { return sendResponse(res, 'Couldn\'t insert document. dataUrl is not a valid url', HttpStatusCode.BAD_REQUEST); } + contRequest.minecraftId = uuid; + Mongo.collections.containers.insertOne(contRequest) .then((data) => sendResponse(res, 'Inserted document', 200)) .catch((err) => sendResponse(res, 'Couldn\'t insert document.', HttpStatusCode.BAD_REQUEST, err)); From becb0549f07d099ebf9b9b1ecef7b0f7c3cf609a Mon Sep 17 00:00:00 2001 From: Hot-Tutorials Date: Tue, 4 Jan 2022 17:02:51 +0100 Subject: [PATCH 4/4] Fix tsc --- package.json | 8 +- src/utils/Mongo.ts | 5 +- src/utils/Snowflake.ts | 7 - tsconfig.json | 5 +- yarn.lock | 733 ++--------------------------------------- 5 files changed, 29 insertions(+), 729 deletions(-) delete mode 100644 src/utils/Snowflake.ts diff --git a/package.json b/package.json index dd4c49b..17280f9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "license": "MIT", "scripts": { "dev": "ts-node-dev src/index.ts", - "start": "node dist/index.js" + "start": "node dist/index.js", + "build": "tsc" }, "devDependencies": { "@types/bcrypt": "^5.0.0", @@ -28,9 +29,6 @@ "body-parser": "^1.19.0", "dotenv": "^10.0.0", "express": "^4.17.1", - "jsonwebtoken": "^8.5.1", - "mongodb": "^4.2.2", - "snowflake-uuid": "^1.0.0", - "sqlite3": "^5.0.2" + "mongodb": "^4.2.2" } } diff --git a/src/utils/Mongo.ts b/src/utils/Mongo.ts index 8d4f7b7..d19575b 100644 --- a/src/utils/Mongo.ts +++ b/src/utils/Mongo.ts @@ -1,5 +1,6 @@ +import { readFileSync } from 'fs'; import * as mongo from 'mongodb'; -import mongoValidator from '../../mongo_validation.json'; +import { join } from 'path'; export interface MongoCollections { containers?: mongo.Collection, @@ -10,6 +11,8 @@ class Mongo { collections: MongoCollections = {}; public connect() { + const mongoValidator = JSON.parse(readFileSync(join(__dirname, '..', '..', 'mongo_validation.json'), { encoding: 'utf8' })); + return new Promise((resolve, reject) => { const client = new mongo.MongoClient(String(process.env.DB_CONN)); diff --git a/src/utils/Snowflake.ts b/src/utils/Snowflake.ts deleted file mode 100644 index e62b69f..0000000 --- a/src/utils/Snowflake.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Worker } from 'snowflake-uuid'; - -export const generator = new Worker(0, 1, { - workerIdBits: 5, - datacenterIdBits: 5, - sequenceBits: 12, -}); diff --git a/tsconfig.json b/tsconfig.json index 4f5b2a1..6fc5778 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,10 +22,11 @@ ] }, "include": [ - "./**/*", + "src/**/*", ], "exclude": [ "node_modules", - "dist" + "dist", + "*.json" ] } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 29791cb..9bdba50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -296,7 +296,7 @@ agent-base@6: dependencies: debug "4" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -321,11 +321,6 @@ ansi-colors@^4.1.1: resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" @@ -358,11 +353,6 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - "aproba@^1.0.3 || ^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" @@ -376,14 +366,6 @@ are-we-there-yet@^2.0.0: delegates "^1.0.0" readable-stream "^3.6.0" -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - arg@^4.1.0: version "4.1.3" resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" @@ -426,38 +408,11 @@ array.prototype.flat@^1.2.4: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - axios@^0.24.0: version "0.24.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" @@ -475,13 +430,6 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - bcrypt@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/bcrypt/-/bcrypt-5.0.1.tgz#f1a2c20f208e2ccdceea4433df0c8b2c54ecdf71" @@ -495,13 +443,6 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= - dependencies: - inherits "~2.0.0" - body-parser@1.19.0, body-parser@^1.19.0: version "1.19.0" resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz" @@ -540,11 +481,6 @@ bson@^4.6.0: dependencies: buffer "^5.6.0" -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" @@ -576,11 +512,6 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - chalk@^2.0.0: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -613,21 +544,11 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" @@ -657,13 +578,6 @@ color-support@^1.1.2: resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -674,7 +588,7 @@ confusing-browser-globals@^1.0.10: resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz" integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -701,16 +615,6 @@ cookie@0.4.0: resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - create-require@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" @@ -725,13 +629,6 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" @@ -746,18 +643,13 @@ debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" -debug@^3.2.6, debug@^3.2.7: +debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@^0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" @@ -770,11 +662,6 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -795,7 +682,7 @@ destroy@~1.0.4: resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-libc@^1.0.2, detect-libc@^1.0.3: +detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -838,21 +725,6 @@ dynamic-dedupe@^0.3.0: dependencies: xtend "^4.0.0" -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" @@ -1138,21 +1010,6 @@ express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -1238,20 +1095,6 @@ follow-redirects@^1.14.4: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381" integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA== -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - forwarded@0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" @@ -1262,13 +1105,6 @@ fresh@0.5.2: resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -1286,16 +1122,6 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -fstream@^1.0.0, fstream@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" - integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -1321,20 +1147,6 @@ gauge@^3.0.0: strip-ansi "^3.0.1 || ^4.0.0" wide-align "^1.1.2" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz" @@ -1352,13 +1164,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -1366,7 +1171,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.0.3, glob@^7.1.3: +glob@^7.1.3: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -1402,19 +1207,6 @@ graceful-fs@^4.1.2: resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz" @@ -1442,7 +1234,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@^2.0.0, has-unicode@^2.0.1: +has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -1481,15 +1273,6 @@ http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -1498,7 +1281,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -iconv-lite@0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -1510,13 +1293,6 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore-walk@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - ignore@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" @@ -1548,7 +1324,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1558,11 +1334,6 @@ inherits@2.0.3: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" @@ -1628,13 +1399,6 @@ is-extglob@^2.1.1: resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -1691,26 +1455,11 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" @@ -1724,11 +1473,6 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" @@ -1744,21 +1488,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - json5@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" @@ -1766,49 +1500,6 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -1840,46 +1531,11 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= - -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" - integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= - -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" - integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= - lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" @@ -1942,18 +1598,6 @@ mime-db@1.49.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz" integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== -mime-db@1.50.0: - version "1.50.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" - integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.33" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" - integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== - dependencies: - mime-db "1.50.0" - mime-types@~2.1.24: version "2.1.32" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz" @@ -1978,14 +1622,6 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - minipass@^3.0.0: version "3.1.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" @@ -1993,13 +1629,6 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -2008,13 +1637,6 @@ minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" @@ -2064,21 +1686,12 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -needle@^2.2.1: - version "2.9.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.9.1.tgz#22d1dffbe3490c2b83e301f7709b6736cd8f2684" - integrity sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -node-addon-api@^3.0.0, node-addon-api@^3.1.0: +node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== @@ -2090,55 +1703,6 @@ node-fetch@^2.6.5: dependencies: whatwg-url "^5.0.0" -node-gyp@3.x: - version "3.8.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" - integrity sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA== - dependencies: - fstream "^1.0.0" - glob "^7.0.3" - graceful-fs "^4.1.2" - mkdirp "^0.5.0" - nopt "2 || 3" - npmlog "0 || 1 || 2 || 3 || 4" - osenv "0" - request "^2.87.0" - rimraf "2" - semver "~5.3.0" - tar "^2.0.0" - which "1" - -node-pre-gyp@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054" - integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -"nopt@2 || 3": - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -2161,37 +1725,6 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -npm-bundled@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" - integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - npmlog@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" @@ -2202,17 +1735,7 @@ npmlog@^5.0.1: gauge "^3.0.0" set-blocking "^2.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -2281,24 +1804,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@0, osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" @@ -2375,11 +1880,6 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" @@ -2409,11 +1909,6 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - progress@^2.0.0: version "2.0.3" resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" @@ -2427,11 +1922,6 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" @@ -2442,11 +1932,6 @@ qs@6.7.0: resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" @@ -2467,16 +1952,6 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz" @@ -2494,19 +1969,6 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^2.0.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -2528,32 +1990,6 @@ regexpp@^3.1.0: resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -request@^2.87.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" @@ -2577,7 +2013,7 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2, rimraf@^2.6.1: +rimraf@^2.6.1: version "2.7.1" resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -2598,17 +2034,17 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -2620,12 +2056,7 @@ saslprep@^1.0.3: dependencies: sparse-bitfield "^3.0.3" -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5": version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -2642,11 +2073,6 @@ semver@^7.2.1, semver@^7.3.5: dependencies: lru-cache "^6.0.0" -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= - send@0.17.1: version "0.17.1" resolved "https://registry.npmjs.org/send/-/send-0.17.1.tgz" @@ -2676,7 +2102,7 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -2726,11 +2152,6 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -snowflake-uuid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/snowflake-uuid/-/snowflake-uuid-1.0.0.tgz#b656c89f7e9c9660a64d7a2977e627b1556f4a71" - integrity sha512-Y8Wj4ota0NgqXm2mhQ+lIWQQbUekkZYVlwXDGMmOpEhH4BfNVnCfDTqboeo0N+BFBN2FhRSaUWXLZBk4ngiImA== - source-map-support@^0.5.12, source-map-support@^0.5.17: version "0.5.20" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz" @@ -2782,45 +2203,11 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sqlite3@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-5.0.2.tgz#00924adcc001c17686e0a6643b6cbbc2d3965083" - integrity sha512-1SdTNo+BVU211Xj1csWa8lV6KM0CtucDwRyA0VHl91wEH1Mgh7RxUpI4rVvG7OhHrzCSGaVyW5g8vKvlrk9DJA== - dependencies: - node-addon-api "^3.0.0" - node-pre-gyp "^0.11.0" - optionalDependencies: - node-gyp "3.x" - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - "string-width@^1.0.1 || ^2.0.0": version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -2861,20 +2248,6 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - "strip-ansi@^3.0.1 || ^4.0.0", strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -2894,7 +2267,7 @@ strip-bom@^3.0.0: resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= -strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: +strip-json-comments@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -2930,28 +2303,6 @@ table@^6.0.9: string-width "^4.2.0" strip-ansi "^6.0.0" -tar@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" - integrity sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== - dependencies: - block-stream "*" - fstream "^1.0.12" - inherits "2" - -tar@^4: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - tar@^6.1.11: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -2981,14 +2332,6 @@ toidentifier@1.0.0: resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" @@ -3066,18 +2409,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" @@ -3125,7 +2456,7 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -3135,11 +2466,6 @@ utils-merge@1.0.1: resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" @@ -3158,15 +2484,6 @@ vary@~1.1.2: resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -3204,13 +2521,6 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which@1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" @@ -3218,7 +2528,7 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.0, wide-align@^1.1.2: +wide-align@^1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -3240,11 +2550,6 @@ xtend@^4.0.0: resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -yallist@^3.0.0, yallist@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"