From 0ccff915acc581d75a955f2b4af47bf4938cf7f5 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:21:13 -0700 Subject: [PATCH 01/25] Add global timeout for JWT expiration --- backend/config/auth.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/config/auth.config.js b/backend/config/auth.config.js index e040fe725..d5363b357 100644 --- a/backend/config/auth.config.js +++ b/backend/config/auth.config.js @@ -2,4 +2,5 @@ module.exports = { SECRET: "c0d7d0716e4cecffe9dcc77ff90476d98f5aace08ea40f5516bd982b06401021191f0f24cd6759f7d8ca41b64f68d0b3ad19417453bddfd1dbe8fcb197245079", CUSTOM_REQUEST_HEADER: process.env.CUSTOM_REQUEST_HEADER, + TOKEN_EXPIRATION_SEC: 900, }; From 0e94576d4464824a688b553c0e7e59fd6d9e8b52 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:22:48 -0700 Subject: [PATCH 02/25] Parse cookies in the backend --- backend/app.js | 4 ++++ backend/middleware/authJwt.js | 9 ++++++++- backend/package.json | 1 + backend/yarn.lock | 8 ++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/backend/app.js b/backend/app.js index fea4dd01e..c263748f0 100644 --- a/backend/app.js +++ b/backend/app.js @@ -7,6 +7,7 @@ const cron = require("node-cron"); const fetch = require("node-fetch"); const morgan = require("morgan"); const path = require("path"); +const cookieParser = require("cookie-parser"); require("dotenv").config(); @@ -17,6 +18,9 @@ const app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); +// Used to save JWT token from MagicLink +app.use(cookieParser()); + // HTTP Request Logger app.use(morgan("dev")); diff --git a/backend/middleware/authJwt.js b/backend/middleware/authJwt.js index 870e181c5..fc3d45ff7 100644 --- a/backend/middleware/authJwt.js +++ b/backend/middleware/authJwt.js @@ -10,14 +10,21 @@ function verifyToken(req, res, next) { jwt.verify(token, CONFIG.SECRET, (err, decoded) => { if (err) { - return res.status(401).send({ message: "Unauthorized!" }); + +function verifyCookie(req, res, next) { + jwt.verify(req.cookies.token, CONFIG.SECRET, (err, decoded) => { + if (err) { + return res.status(401).send({ message: err }); } req.userId = decoded.id; + req.role = decoded.accessLevel; + next(); }); } const authJwt = { verifyToken, + verifyCookie, }; module.exports = authJwt; diff --git a/backend/package.json b/backend/package.json index 6e24c2028..850618bce 100644 --- a/backend/package.json +++ b/backend/package.json @@ -26,6 +26,7 @@ "@slack/bolt": "^2.2.3", "async": "^3.2.0", "body-parser": "^1.19.0", + "cookie-parser": "^1.4.5", "cors": "^2.8.5", "dotenv": "^8.2.0", "express": "^4.17.1", diff --git a/backend/yarn.lock b/backend/yarn.lock index ce75ae5e9..3b70c90c6 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -1512,6 +1512,14 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" +cookie-parser@^1.4.5: + version "1.4.5" + resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49" + integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw== + dependencies: + cookie "0.4.0" + cookie-signature "1.0.6" + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" From 8a812041d92635d69583f4f676b3fb018e1de372 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:24:46 -0700 Subject: [PATCH 03/25] Verify token provided to user in email --- client/src/pages/HandleAuth.js | 67 +++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/client/src/pages/HandleAuth.js b/client/src/pages/HandleAuth.js index f30d45414..a157fd9d3 100644 --- a/client/src/pages/HandleAuth.js +++ b/client/src/pages/HandleAuth.js @@ -1,30 +1,47 @@ -import React, { useEffect } from 'react'; -// import { Link } from 'react-router-dom'; +import React, { useState, useEffect } from "react"; -import Firebase from '../firebase'; - -import useAuth from '../hooks/useAuth'; - -import '../sass/MagicLink.scss'; -import { Redirect } from 'react-router-dom'; +import "../sass/MagicLink.scss"; const HandleAuth = (props) => { - - const auth = useAuth(); - - useEffect(() => { - // Firebase.login(); - - }, [auth]); - - return ( -
-
-

Redirecting...

-
- {auth.user && } -
- ) + const [isMagicLinkValid, setMagicLink] = useState(null); + + async function isValidToken() { + const search = props.location.search; + const params = new URLSearchParams(search); + const api_token = params.get("token"); + + try { + const response = await fetch("/api/auth/verify-signin", { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-access-token": api_token, + }, + }); + const body = await response; + console.log("-->response: ", body); + setMagicLink(response.status === 200); + } catch (error) { + console.log(error); + } + } + + useEffect(() => { + isValidToken(); + }, []); + + let text; + if (isMagicLinkValid == true) { + text =

Magic link is valid

; + } else { + text =

Magic link is NOT valid

; + } + + return ( +
+
{text}
+
+ ); }; -export default HandleAuth; \ No newline at end of file +export default HandleAuth; From ef521f70e6d5669773698ee68cec590e3944e778 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:25:10 -0700 Subject: [PATCH 04/25] Add hard code redirect for localhost --- backend/controllers/email.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/controllers/email.controller.js b/backend/controllers/email.controller.js index 652e46b4b..b23c87ef8 100644 --- a/backend/controllers/email.controller.js +++ b/backend/controllers/email.controller.js @@ -47,16 +47,16 @@ async function mailServer(email, token) { } const appUrl = process.env.REACT_APP_PROXY; const encodedToken = encodeURIComponent(token); - const emailLink = `https://tinyurl.com/2drxdk/auth/me?token=${encodedToken}`; + const emailLink = `https://tinyurl.com/nyqxd/handleauth?token=${encodedToken}&signIn=true`; const encodedUri = encodeURI(emailLink); const mailOptions = { from: EMAIL_ACCOUNT, to: email, subject: "VRMS Magic link 🎩 !", - html: ` + html: ` LOGIN HERE `, - text: `Magic link: ${encodedUri}`, + text: `Magic link: ${emailLink}`, }; if (process.env.NODE_ENV === "test") { From 72fb8568156c6ba2fefe7a4e83178891bbca92a3 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:25:36 -0700 Subject: [PATCH 05/25] Verify token on the backend --- backend/middleware/authJwt.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/middleware/authJwt.js b/backend/middleware/authJwt.js index fc3d45ff7..c3b5b74e7 100644 --- a/backend/middleware/authJwt.js +++ b/backend/middleware/authJwt.js @@ -2,14 +2,25 @@ const jwt = require("jsonwebtoken"); const CONFIG = require("../config/auth.config.js"); function verifyToken(req, res, next) { - let token = req.headers["x-access-token"]; + let token = req.headers["x-access-token"] || req.headers["authorization"]; if (!token) { - return res.status(403).send({ message: "No token provided!" }); + return res.status(403).send({ message: "Auth token is not supplied" }); + } + if (token.startsWith("Bearer ")) { + // Remove Bearer from string + token = token.slice(7, token.length); } jwt.verify(token, CONFIG.SECRET, (err, decoded) => { if (err) { + return res.status(401).send({ message: err }); + } + res.cookie("token", token, { httpOnly: true }); + req.userId = decoded.id; + next(); + }); +} function verifyCookie(req, res, next) { jwt.verify(req.cookies.token, CONFIG.SECRET, (err, decoded) => { From 16ba7d1c3a108380a73169582c2e5655a605a77d Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:46:28 -0700 Subject: [PATCH 06/25] Verify token from the front end --- backend/controllers/user.controller.js | 31 +++++++++++++++++++- backend/middleware/verifyUser.js | 4 +-- backend/routers/auth.router.js | 8 ++++-- client/package.json | 1 + client/src/hooks/useProvideAuth.js | 39 +++++++++++++------------- client/yarn.lock | 5 ++++ 6 files changed, 63 insertions(+), 25 deletions(-) diff --git a/backend/controllers/user.controller.js b/backend/controllers/user.controller.js index 89da00db7..c2e7ad1c9 100644 --- a/backend/controllers/user.controller.js +++ b/backend/controllers/user.controller.js @@ -9,7 +9,9 @@ const { body, validationResult } = require("express-validator"); function generateAccessToken(user) { // expires after half and hour (1800 seconds = 30 minutes) - return jwt.sign({ id: user.id }, CONFIG.SECRET, { expiresIn: "1800s" }); + return jwt.sign({ id: user.id, role: user.accessLevel }, CONFIG.SECRET, { + expiresIn: `${CONFIG.TOKEN_EXPIRATION_SEC}s`, + }); } function createUser(req, res) { @@ -60,6 +62,31 @@ function signin(req, res) { }); } +function verifySignIn(req, res) { + let token = req.headers["x-access-token"] || req.headers["authorization"]; + + if (!token) { + return res.status(403).send({ message: "Auth token is not supplied" }); + } + if (token.startsWith("Bearer ")) { + // Remove Bearer from string + token = token.slice(7, token.length); + } + + jwt.verify(token, CONFIG.SECRET, (err, decoded) => { + if (err) { + return res.status(401).send({ message: err }); + } + res.cookie("token", token, { httpOnly: true }); + res.sendStatus(200); + }); +} + +function verifyMe(req, res) { + console.log("-->req.userId: ", req.userId); + res.send(200); +} + async function validateCreateUserAPICall(req, res, next) { await body("name.firstName").not().isEmpty().trim().escape().run(req); await body("name.lastName").not().isEmpty().trim().escape().run(req); @@ -99,6 +126,8 @@ userController = { validateSigninUserAPICall, createUser, signin, + verifySignIn, + verifyMe, }; module.exports = userController; diff --git a/backend/middleware/verifyUser.js b/backend/middleware/verifyUser.js index 8b41e1239..b5098595f 100644 --- a/backend/middleware/verifyUser.js +++ b/backend/middleware/verifyUser.js @@ -14,7 +14,7 @@ function checkDuplicateEmail(req, res, next) { }); } -function isAdmin(req, res, next) { +function isAdminByEmail(req, res, next) { User.findOne({ email: req.body.email }).then((user) => { if (!user) { res.status(400).send({ @@ -37,7 +37,7 @@ function isAdmin(req, res, next) { const verifyUser = { checkDuplicateEmail, - isAdmin, + isAdminByEmail, }; module.exports = verifyUser; diff --git a/backend/routers/auth.router.js b/backend/routers/auth.router.js index a07b4ca1e..6bfc80925 100644 --- a/backend/routers/auth.router.js +++ b/backend/routers/auth.router.js @@ -1,4 +1,4 @@ -const { verifyUser } = require("../middleware"); +const { authJwt, verifyUser } = require("../middleware"); const userController = require("../controllers/user.controller"); const express = require("express"); @@ -20,8 +20,12 @@ router.post( router.post( "/signin", - [userController.validateSigninUserAPICall, verifyUser.isAdmin], + [userController.validateSigninUserAPICall, verifyUser.isAdminByEmail], userController.signin ); +router.post("/verify-signin", userController.verifySignIn); + +router.post("/me", [authJwt.verifyCookie], userController.verifyMe); + module.exports = router; diff --git a/client/package.json b/client/package.json index f1d8f91f8..1e9a9c793 100644 --- a/client/package.json +++ b/client/package.json @@ -12,6 +12,7 @@ "dotenv-cli": "^3.2.0", "firebase": "^7.15.1", "http-proxy-middleware": "^1.0.5", + "js-cookie": "^2.2.1", "local-storage": "^2.0.0", "mathjs": "^6.6.2", "minimist": "^1.2.3", diff --git a/client/src/hooks/useProvideAuth.js b/client/src/hooks/useProvideAuth.js index 8c86e01b0..53e04dc1d 100644 --- a/client/src/hooks/useProvideAuth.js +++ b/client/src/hooks/useProvideAuth.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from "react"; import Firebase from '../firebase'; @@ -6,26 +6,25 @@ export default function useProvideAuth() { const [isAdmin, setIsAdmin] = useState(null); const [user, setUser] = useState(); - useEffect(() => { - if (!user) { - Firebase.login(); - }; - - Firebase.auth.onAuthStateChanged(user => { - // console.log('Handling auth change with ', user); - - if (user) { - setUser(user); - } else { - setUser(null); - }; + async function checkUser() { + try { + const response = await fetch("/api/auth/me", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, }); - - }, []); + setUser(response.status === 200); + setIsAdmin(response.status === 200); + } catch (err) { + console.log(err); + } + } - // console.log(user); + useEffect(() => { + checkUser(); + console.log("-->user: ", user); + }, [user, isAdmin]); - // return { user, isAdmin, login }; return { user, isAdmin }; -}; - +} diff --git a/client/yarn.lock b/client/yarn.lock index d5f1d800c..ce593c967 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -7777,6 +7777,11 @@ js-base64@^2.1.8: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== +js-cookie@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" + integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" From 0b30e8ca1f285015845f2caedd57fe558161c971 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 13:49:48 -0700 Subject: [PATCH 07/25] Remove firebase --- client/package.json | 1 - client/src/App.js | 2 - client/src/components/Footer.js | 7 +- client/src/firebase.js | 110 ----- client/src/hooks/useProvideAuth.js | 10 +- client/src/pages/AdminLogin.js | 14 +- client/yarn.lock | 677 ++--------------------------- 7 files changed, 40 insertions(+), 781 deletions(-) delete mode 100644 client/src/firebase.js diff --git a/client/package.json b/client/package.json index 1e9a9c793..45dc17377 100644 --- a/client/package.json +++ b/client/package.json @@ -10,7 +10,6 @@ "cross-var": "^1.1.0", "d3": "^5.15.1", "dotenv-cli": "^3.2.0", - "firebase": "^7.15.1", "http-proxy-middleware": "^1.0.5", "js-cookie": "^2.2.1", "local-storage": "^2.0.0", diff --git a/client/src/App.js b/client/src/App.js index 20f328a02..1b905b138 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -2,8 +2,6 @@ import React from "react"; import { AuthProvider } from "./context/authContext"; import { Route, Redirect, Switch } from "react-router-dom"; -import Firebase from "./firebase"; - import Home from "./pages/Home"; import Navbar from "./components/Navbar"; import Footer from "./components/Footer"; diff --git a/client/src/components/Footer.js b/client/src/components/Footer.js index 777b7fab6..2f7452ab8 100644 --- a/client/src/components/Footer.js +++ b/client/src/components/Footer.js @@ -1,7 +1,5 @@ import React from 'react'; -import Firebase from '../firebase'; - import pkg from '../../package.json'; import useAuth from '../hooks/useAuth'; @@ -12,8 +10,9 @@ const Footer = () => { const handleLogout = (e) => { e.preventDefault(); - console.log('Trying to logout here!'); - Firebase.logout(); + // TODO: re-implement logout without firebase + + }; return ( diff --git a/client/src/firebase.js b/client/src/firebase.js deleted file mode 100644 index 9dc191c95..000000000 --- a/client/src/firebase.js +++ /dev/null @@ -1,110 +0,0 @@ -import React from 'react'; -import app from "firebase/app"; -import "firebase/auth"; - -import { Redirect } from 'react-router-dom'; - -// Firebase configuration -const firebaseConfig = { - apiKey: process.env.REACT_APP_FIREBASE_API_KEY, - authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, - databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL, - projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, - storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, - messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, - appId: process.env.REACT_APP_FIREBASE_APP_ID, - measurementId: process.env.REACT_APP_FIREBASE_MEASUREMENT_ID -}; - -// Initialize Firebase class with async methods -class Firebase { - constructor() { - app.initializeApp(firebaseConfig); - // console.log('Firebase initialized'); - - this.auth = app.auth(); - // console.log('Auth initialized'); - }; - - isInitialized() { - return new Promise(resolve => { - this.auth.onAuthStateChanged(resolve); - }); - }; - - async submitEmail(email) { - // console.log('Try submitting ' + email + '...'); - - try { - const actionCodeSettings = { - // URL you want to redirect back to. The domain (www.example.com) for this - // URL must be whitelisted in the Firebase Console. - url: process.env.REACT_APP_FIREBASE_DEV_REDIRECT_URL, - // This must be true. - handleCodeInApp: true, - }; - - await this.auth.sendSignInLinkToEmail(email, actionCodeSettings) - .then(() => { - // The link was successfully sent. Inform the user. - // Save the email locally so you don't need to ask the user for it again - // if they open the link on the same device. - window.localStorage.setItem('emailForSignIn', email); - - return true; - }) - .catch(error => { - // Some error occurred, you can inspect the code: error.code - console.log(error); - - return false; - }); - } catch(error) { - console.log(error); - - return false; - } - }; - - async login() { - // console.log('Trying to login'); - // Confirm the link is a sign-in with email link. - try { - if (this.auth.isSignInWithEmailLink(window.location.href)) { - // Additional state parameters can also be passed via URL. - // This can be used to continue the user's intended action before triggering - // the sign-in operation. - // Get the email if available. This should be available if the user completes - // the flow on the same device where they started it. - let email = window.localStorage.getItem('emailForSignIn'); - console.log("From local storage: " + email); - - if (!email) { - // User opened the link on a different device. To prevent session fixation - // attacks, ask the user to provide the associated email again. For example: - email = window.prompt('Please provide your email for confirmation:'); - } - // The client SDK will parse the code from the link for you. - const result = await this.auth.signInWithEmailLink(email, window.location.href); - - // window.localStorage.removeItem('emailForSignIn', email); - - console.log('Login potentially successful?'); - - return result; - }; - } catch(error) { - console.log(error); - }; - }; - - logout() { - return this.auth.signOut(); - }; - - // getCurrentUsername() { - // return this.auth.currentUser && this.auth.currentUser.displayName; - // }; -}; - -export default new Firebase(); diff --git a/client/src/hooks/useProvideAuth.js b/client/src/hooks/useProvideAuth.js index 53e04dc1d..78f9cb044 100644 --- a/client/src/hooks/useProvideAuth.js +++ b/client/src/hooks/useProvideAuth.js @@ -1,10 +1,8 @@ import { useState, useEffect } from "react"; -import Firebase from '../firebase'; - export default function useProvideAuth() { - const [isAdmin, setIsAdmin] = useState(null); - const [user, setUser] = useState(); + const [isAdmin, setIsAdmin] = useState(null); + const [user, setUser] = useState(); async function checkUser() { try { @@ -13,7 +11,7 @@ export default function useProvideAuth() { headers: { "Content-Type": "application/json", }, - }); + }); setUser(response.status === 200); setIsAdmin(response.status === 200); } catch (err) { @@ -26,5 +24,5 @@ export default function useProvideAuth() { console.log("-->user: ", user); }, [user, isAdmin]); - return { user, isAdmin }; + return { user, isAdmin }; } diff --git a/client/src/pages/AdminLogin.js b/client/src/pages/AdminLogin.js index 24c324980..97e88a476 100644 --- a/client/src/pages/AdminLogin.js +++ b/client/src/pages/AdminLogin.js @@ -1,15 +1,9 @@ -import React, { useState } from 'react'; -import { Redirect } from 'react-router-dom'; - -// import useAuth from '../hooks/useAuth'; -// import { authContext } from '../context/authContext'; -import Firebase from '../firebase'; -import useAuth from '../hooks/useAuth'; - -import '../sass/AdminLogin.scss'; -// import '../sass/HomeContainer-media-queries.scss'; +import React, { useState } from "react"; +import { Redirect } from "react-router-dom"; +import useAuth from "../hooks/useAuth"; +import "../sass/AdminLogin.scss"; const AdminLogin = (props) => { const auth = useAuth(); diff --git a/client/yarn.lock b/client/yarn.lock index ce593c967..c529f4481 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -1166,259 +1166,6 @@ resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18" integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg== -"@firebase/analytics-types@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/analytics-types/-/analytics-types-0.3.1.tgz#3c5f5d71129c88295e17e914e34b391ffda1723c" - integrity sha512-63vVJ5NIBh/JF8l9LuPrQYSzFimk7zYHySQB4Dk9rVdJ8kV/vGQoVTvRu1UW05sEc2Ug5PqtEChtTHU+9hvPcA== - -"@firebase/analytics@0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.4.2.tgz#b4869df9efc0334ae2fe3eba19b65b845a190012" - integrity sha512-WCoeUAO3lP6ikHJ3/XYptV90fpTidzTS9VpAfiVQK8gl9w1zvvKSavY9U3+EVG3frOPCFdE5DBO4MYrUw4gaqw== - dependencies: - "@firebase/analytics-types" "0.3.1" - "@firebase/component" "0.1.18" - "@firebase/installations" "0.4.16" - "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.1" - tslib "^1.11.1" - -"@firebase/app-types@0.6.1": - version "0.6.1" - resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9" - integrity sha512-L/ZnJRAq7F++utfuoTKX4CLBG5YR7tFO3PLzG1/oXXKEezJ0kRL3CMRoueBEmTCzVb/6SIs2Qlaw++uDgi5Xyg== - -"@firebase/app@0.6.10": - version "0.6.10" - resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.6.10.tgz#520798f76906897284742b6eeb43257ec73f67a5" - integrity sha512-USg/AbgqBERhY0LayrKmmp7pka08WPa7OlFI46kaNW1pA2mUNf/ifTaxhCr2hGg/eWI0zPhpbEvtGQhSJ/QqWg== - dependencies: - "@firebase/app-types" "0.6.1" - "@firebase/component" "0.1.18" - "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.1" - dom-storage "2.1.0" - tslib "^1.11.1" - xmlhttprequest "1.8.0" - -"@firebase/auth-interop-types@0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557" - integrity sha512-88h74TMQ6wXChPA6h9Q3E1Jg6TkTHep2+k63OWg3s0ozyGVMeY+TTOti7PFPzq5RhszQPQOoCi59es4MaRvgCw== - -"@firebase/auth-types@0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.10.1.tgz#7815e71c9c6f072034415524b29ca8f1d1770660" - integrity sha512-/+gBHb1O9x/YlG7inXfxff/6X3BPZt4zgBv4kql6HEmdzNQCodIRlEYnI+/da+lN+dha7PjaFH7C7ewMmfV7rw== - -"@firebase/auth@0.14.9": - version "0.14.9" - resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.14.9.tgz#481db24d5bd6eded8ac2e5aea6edb9307040229c" - integrity sha512-PxYa2r5qUEdheXTvqROFrMstK8W4uPiP7NVfp+2Bec+AjY5PxZapCx/YFDLkU0D7YBI82H74PtZrzdJZw7TJ4w== - dependencies: - "@firebase/auth-types" "0.10.1" - -"@firebase/component@0.1.18": - version "0.1.18" - resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.18.tgz#28e69e54b79953376283464cb0543bde4c104140" - integrity sha512-c8gd1k/e0sbBTR0xkLIYUN8nVkA0zWxcXGIvdfYtGEsNw6n7kh5HkcxKXOPB8S7bcPpqZkGgBIfvd94IyG2gaQ== - dependencies: - "@firebase/util" "0.3.1" - tslib "^1.11.1" - -"@firebase/database-types@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.5.2.tgz#23bec8477f84f519727f165c687761e29958b63c" - integrity sha512-ap2WQOS3LKmGuVFKUghFft7RxXTyZTDr0Xd8y2aqmWsbJVjgozi0huL/EUMgTjGFrATAjcf2A7aNs8AKKZ2a8g== - dependencies: - "@firebase/app-types" "0.6.1" - -"@firebase/database@0.6.11": - version "0.6.11" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.11.tgz#74a09d5f4769eb97c00bc2f7621f54efbccea6f2" - integrity sha512-QOHhB7+CdjVhEXG9CyX0roA9ARJcEuwbozz0Bix+ULuZqjQ58KUFHMH1apW6EEiUP22d/mYD7dNXsUGshjL9PA== - dependencies: - "@firebase/auth-interop-types" "0.1.5" - "@firebase/component" "0.1.18" - "@firebase/database-types" "0.5.2" - "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.1" - faye-websocket "0.11.3" - tslib "^1.11.1" - -"@firebase/firestore-types@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-1.12.0.tgz#511e572e946b07f5a603c90e078f0cd714923fac" - integrity sha512-OqNxVb63wPZdUc7YnpacAW1WNIMSKERSewCRi+unCQ0YI0KNfrDSypyGCyel+S3GdOtKMk9KnvDknaGbnaFX4g== - -"@firebase/firestore@1.16.5": - version "1.16.5" - resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-1.16.5.tgz#b80b63f18bd70cc101f66c5e0a79dce93f036384" - integrity sha512-GjCL4Ngy46qSdXAg9obXBuIKG2m/7a21dQktqRPaPH9xpHnymq8LxUK7sdUfyY8FBIQp6Si6O61e9fko4FjSMw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/firestore-types" "1.12.0" - "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.1" - "@firebase/webchannel-wrapper" "0.3.0" - "@grpc/grpc-js" "^1.0.0" - "@grpc/proto-loader" "^0.5.0" - node-fetch "2.6.0" - tslib "^1.11.1" - -"@firebase/functions-types@0.3.17": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.3.17.tgz#348bf5528b238eeeeeae1d52e8ca547b21d33a94" - integrity sha512-DGR4i3VI55KnYk4IxrIw7+VG7Q3gA65azHnZxo98Il8IvYLr2UTBlSh72dTLlDf25NW51HqvJgYJDKvSaAeyHQ== - -"@firebase/functions@0.4.50": - version "0.4.50" - resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.4.50.tgz#02ae1a2a42de9c4c73f13c00043dbba6546248a0" - integrity sha512-eBsNrUm/Jfc/xsQXmxQRSkEg6pwHlMd2hice8N90/EeqgwqS/SCvC+O9cJITLlXroAghb9jWDWRvAkDU/TOhpw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/functions-types" "0.3.17" - "@firebase/messaging-types" "0.5.0" - isomorphic-fetch "2.2.1" - tslib "^1.11.1" - -"@firebase/installations-types@0.3.4": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.3.4.tgz#589a941d713f4f64bf9f4feb7f463505bab1afa2" - integrity sha512-RfePJFovmdIXb6rYwtngyxuEcWnOrzdZd9m7xAW0gRxDIjBT20n3BOhjpmgRWXo/DAxRmS7bRjWAyTHY9cqN7Q== - -"@firebase/installations@0.4.16": - version "0.4.16" - resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.4.16.tgz#5c3f2e542308f06439aeddb0f456f3f36ae808eb" - integrity sha512-gqv3IrBUmPWKpH8wLJ0fZcAH1NEXwQhqjqnK3cQXRcIkEARP430cmIAaj7CcPdgdemHX9HqwJG+So/yBHIYXPA== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/installations-types" "0.3.4" - "@firebase/util" "0.3.1" - idb "3.0.2" - tslib "^1.11.1" - -"@firebase/logger@0.2.6": - version "0.2.6" - resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989" - integrity sha512-KIxcUvW/cRGWlzK9Vd2KB864HlUnCfdTH0taHE0sXW5Xl7+W68suaeau1oKNEqmc3l45azkd4NzXTCWZRZdXrw== - -"@firebase/messaging-types@0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@firebase/messaging-types/-/messaging-types-0.5.0.tgz#c5d0ef309ced1758fda93ef3ac70a786de2e73c4" - integrity sha512-QaaBswrU6umJYb/ZYvjR5JDSslCGOH6D9P136PhabFAHLTR4TWjsaACvbBXuvwrfCXu10DtcjMxqfhdNIB1Xfg== - -"@firebase/messaging@0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.7.0.tgz#6932f6bfcc04148891751aecce426cafe76e0a06" - integrity sha512-PTD5pQw9QremOjiWWZYOkzcX6OKByMvlG+NQXdTnyL3kLbE01Bdp9iWhkH6ipNpHYMiwcK1RZD4TLkYVBviBsw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/installations" "0.4.16" - "@firebase/messaging-types" "0.5.0" - "@firebase/util" "0.3.1" - idb "3.0.2" - tslib "^1.11.1" - -"@firebase/performance-types@0.0.13": - version "0.0.13" - resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.0.13.tgz#58ce5453f57e34b18186f74ef11550dfc558ede6" - integrity sha512-6fZfIGjQpwo9S5OzMpPyqgYAUZcFzZxHFqOyNtorDIgNXq33nlldTL/vtaUZA8iT9TT5cJlCrF/jthKU7X21EA== - -"@firebase/performance@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.4.0.tgz#7f5bb47ef085cd83bf331b19d3213e11fbe88941" - integrity sha512-LZG89G2wAjTRsIcuewIx152+DyRzQf8UtPCAjifkFiMcAY4GmZZKeIbIC3b4oQDwTgH5i0IKKd4EOv7dLD97gw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/installations" "0.4.16" - "@firebase/logger" "0.2.6" - "@firebase/performance-types" "0.0.13" - "@firebase/util" "0.3.1" - tslib "^1.11.1" - -"@firebase/polyfill@0.3.36": - version "0.3.36" - resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.36.tgz#c057cce6748170f36966b555749472b25efdb145" - integrity sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F+v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg== - dependencies: - core-js "3.6.5" - promise-polyfill "8.1.3" - whatwg-fetch "2.0.4" - -"@firebase/remote-config-types@0.1.9": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@firebase/remote-config-types/-/remote-config-types-0.1.9.tgz#fe6bbe4d08f3b6e92fce30e4b7a9f4d6a96d6965" - integrity sha512-G96qnF3RYGbZsTRut7NBX0sxyczxt1uyCgXQuH/eAfUCngxjEGcZQnBdy6mvSdqdJh5mC31rWPO4v9/s7HwtzA== - -"@firebase/remote-config@0.1.27": - version "0.1.27" - resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.1.27.tgz#b581cb7d870e7d32bac5967acbbb5d7ec593a2f3" - integrity sha512-BGjmQomRKNf+yGJ/3/5Kw6zNLM5jY9oTVjLmYsQXf6U+HMgz6J2H6EVGc1bZW7YSsvak8f6DomxegQtvfvwaMw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/installations" "0.4.16" - "@firebase/logger" "0.2.6" - "@firebase/remote-config-types" "0.1.9" - "@firebase/util" "0.3.1" - tslib "^1.11.1" - -"@firebase/storage-types@0.3.13": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.3.13.tgz#cd43e939a2ab5742e109eb639a313673a48b5458" - integrity sha512-pL7b8d5kMNCCL0w9hF7pr16POyKkb3imOW7w0qYrhBnbyJTdVxMWZhb0HxCFyQWC0w3EiIFFmxoz8NTFZDEFog== - -"@firebase/storage@0.3.42": - version "0.3.42" - resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.3.42.tgz#e2fe1aa54c004852a848b50f34c2f351e6e517e5" - integrity sha512-FqHDWZPhATQeOFBQUZPsQO7xhnGBxprYVDb9eIjCnh1yRl6WAv/OQGHOF+JU5+H+YkjsKTtr/5VjyDl3Y0UHxw== - dependencies: - "@firebase/component" "0.1.18" - "@firebase/storage-types" "0.3.13" - "@firebase/util" "0.3.1" - tslib "^1.11.1" - -"@firebase/util@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.1.tgz#8c95152a00121bd31fb7c1fc6520ca208976e384" - integrity sha512-zjVd9rfL08dRRdZILFn1RZTHb1euCcnD9N/9P56gdBcm2bvT5XsCC4G6t5toQBpE/H/jYe5h6MZMqfLu3EQLXw== - dependencies: - tslib "^1.11.1" - -"@firebase/webchannel-wrapper@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.3.0.tgz#d1689566b94c25423d1fb2cb031c5c2ea4c9f939" - integrity sha512-VniCGPIgSGNEgOkh5phb3iKmSGIzcwrccy3IomMFRWPCMiCk2y98UQNJEoDs1yIHtZMstVjYWKYxnunIGzC5UQ== - -"@grpc/grpc-js@^1.0.0": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.5.tgz#2d0b261cd54a529f6b78ac0de9d6fd91a9a3129c" - integrity sha512-2huf5z85TdZI4nLmJQ9Zdfd+6vmIyBDs7B4L71bTaHKA9pRsGKAH24XaktMk/xneKJIqAgeIZtg1cyivVZtvrg== - dependencies: - "@grpc/proto-loader" "^0.6.0-pre14" - "@types/node" "^12.12.47" - google-auth-library "^6.0.0" - semver "^6.2.0" - -"@grpc/proto-loader@^0.5.0": - version "0.5.5" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.5.tgz#6725e7a1827bdf8e92e29fbf4e9ef0203c0906a9" - integrity sha512-WwN9jVNdHRQoOBo9FDH7qU+mgfjPc8GygPYms3M+y3fbQLfnCe/Kv/E01t7JRgnrsOHH8euvSbed3mIalXhwqQ== - dependencies: - lodash.camelcase "^4.3.0" - protobufjs "^6.8.6" - -"@grpc/proto-loader@^0.6.0-pre14": - version "0.6.0-pre9" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.0-pre9.tgz#0c6fe42f6c5ef9ce1b3cef7be64d5b09d6fe4d6d" - integrity sha512-oM+LjpEjNzW5pNJjt4/hq1HYayNeQT+eGrOPABJnYHv7TyNPDNzkQ76rDYZF86X5swJOa4EujEMzQ9iiTdPgww== - dependencies: - "@types/long" "^4.0.1" - lodash.camelcase "^4.3.0" - long "^4.0.0" - protobufjs "^6.9.0" - yargs "^15.3.1" - "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -1612,59 +1359,6 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" - integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" - integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" - integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" - integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" - integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= - "@svgr/babel-plugin-add-jsx-attribute@^4.2.0": version "4.2.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1" @@ -1851,11 +1545,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== -"@types/long@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" - integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== - "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1866,16 +1555,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== -"@types/node@^12.12.47": - version "12.12.54" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.54.tgz#a4b58d8df3a4677b6c08bfbc94b7ad7a7a5f82d1" - integrity sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w== - -"@types/node@^13.7.0": - version "13.13.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.15.tgz#fe1cc3aa465a3ea6858b793fd380b66c39919766" - integrity sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw== - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -2112,13 +1791,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -2176,13 +1848,6 @@ adjust-sourcemap-loader@2.0.0: object-path "0.11.4" regex-parser "2.2.10" -agent-base@6: - version "6.0.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4" - integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg== - dependencies: - debug "4" - aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -2275,7 +1940,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== @@ -2406,11 +2071,6 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -arrify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -3327,7 +2987,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2, base64-js@^1.3.0: +base64-js@^1.0.2: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== @@ -3362,11 +3022,6 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bignumber.js@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" - integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== - binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -3575,11 +3230,6 @@ bser@2.1.1: dependencies: node-int64 "^0.4.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.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -3916,15 +3566,6 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - clone-deep@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.2.4.tgz#4e73dd09e9fb971cc38670c5dced9c1896481cc6" @@ -4190,16 +3831,16 @@ core-js-pure@^3.0.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== -core-js@3.6.5, core-js@^3.5.0: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" - integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== - core-js@^2.4.0, core-js@^2.5.0: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== +core-js@^3.5.0: + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -4850,13 +4491,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6. dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -4864,6 +4498,13 @@ debug@^3.1.1, debug@^3.2.5: dependencies: ms "^2.1.1" +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -5078,11 +4719,6 @@ dom-serializer@0: domelementtype "^2.0.1" entities "^2.0.0" -dom-storage@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/dom-storage/-/dom-storage-2.1.0.tgz#00fb868bc9201357ea243c7bcfd3304c1e34ea39" - integrity sha512-g6RpyWXzl0RR6OTElHKBl7nwnK87GUyZMYC7JWsB/IA73vpqK2K6LT39x4VepLxlSsWBFrPVLnsSR5Jyty0+2Q== - domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -5186,13 +4822,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.11, 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.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -5241,13 +4870,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -5618,11 +5240,6 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - eventemitter3@^4.0.0: version "4.0.5" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.5.tgz#51d81e4f1ccc8311a04f0c20121ea824377ea6d9" @@ -5754,7 +5371,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.2, extend@~3.0.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== @@ -5819,18 +5436,6 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-text-encoding@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" - integrity sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig== - -faye-websocket@0.11.3, faye-websocket@~0.11.1: - version "0.11.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== - dependencies: - websocket-driver ">=0.5.1" - faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -5838,6 +5443,13 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + dependencies: + websocket-driver ">=0.5.1" + fb-watchman@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" @@ -5939,7 +5551,7 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: +find-up@4.1.0, find-up@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -5969,26 +5581,6 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -firebase@^7.15.1: - version "7.19.0" - resolved "https://registry.yarnpkg.com/firebase/-/firebase-7.19.0.tgz#cfa64ebc56f3ef095df31d20f1de4dc5fa80f793" - integrity sha512-gS0nFagMfDLEucgcMD/tCfpLH+crnTurpyMsh6JEvith7GA8cRA4S3T3300xPL6dSZliI7EiGsCNBXBil6sAUw== - dependencies: - "@firebase/analytics" "0.4.2" - "@firebase/app" "0.6.10" - "@firebase/app-types" "0.6.1" - "@firebase/auth" "0.14.9" - "@firebase/database" "0.6.11" - "@firebase/firestore" "1.16.5" - "@firebase/functions" "0.4.50" - "@firebase/installations" "0.4.16" - "@firebase/messaging" "0.7.0" - "@firebase/performance" "0.4.0" - "@firebase/polyfill" "0.3.36" - "@firebase/remote-config" "0.1.27" - "@firebase/storage" "0.3.42" - "@firebase/util" "0.3.1" - flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -6197,17 +5789,6 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -gaxios@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.1.0.tgz#95f65f5a335f61aff602fe124cfdba8524f765fa" - integrity sha512-DDTn3KXVJJigtz+g0J3vhcfbDbKtAroSTxauWsdnP57sM5KZ3d2c/3D9RKFJ86s43hfw6WULg6TXYw/AYiBlpA== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^5.0.0" - is-stream "^2.0.0" - node-fetch "^2.3.0" - gaze@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" @@ -6215,14 +5796,6 @@ gaze@^1.0.0: dependencies: globule "^1.0.0" -gcp-metadata@^4.1.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.1.4.tgz#3adadb9158c716c325849ee893741721a3c09e7e" - integrity sha512-5J/GIH0yWt/56R3dNaNWPGQ/zXsZOddYECfJaqxFWgrZ9HC2Kvc5vl9upOgUUHKzURjAVf2N+f6tEJiojqXUuA== - dependencies: - gaxios "^3.0.0" - json-bigint "^1.0.0" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -6360,28 +5933,6 @@ globule@^1.0.0: lodash "~4.17.10" minimatch "~3.0.2" -google-auth-library@^6.0.0: - version "6.0.6" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.0.6.tgz#5102e5c643baab45b4c16e9752cd56b8861f3a82" - integrity sha512-fWYdRdg55HSJoRq9k568jJA1lrhg9i2xgfhVIMJbskUmbDpJGHsbv9l41DGhCDXM21F9Kn4kUwdysgxSYBYJUw== - dependencies: - arrify "^2.0.0" - base64-js "^1.3.0" - ecdsa-sig-formatter "^1.0.11" - fast-text-encoding "^1.0.0" - gaxios "^3.0.0" - gcp-metadata "^4.1.0" - gtoken "^5.0.0" - jws "^4.0.0" - lru-cache "^6.0.0" - -google-p12-pem@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.0.2.tgz#12d443994b6f4cd8c9e4ac479f2f18d4694cbdb8" - integrity sha512-tbjzndQvSIHGBLzHnhDs3cL4RBjLbLXc2pYvGH+imGVu5b4RMAttUTdnmW2UH0t11QeBTXZ7wlXPS7hrypO/tg== - dependencies: - node-forge "^0.9.0" - graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" @@ -6392,16 +5943,6 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gtoken@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.0.3.tgz#b76ef8e9a2fed6fef165e47f7d05b60c498e4d05" - integrity sha512-Nyd1wZCMRc2dj/mAD0LlfQLcAO06uKdpKJXvK85SGrF5+5+Bpfil9u/2aw35ltvEHjvl0h5FMKN5knEU+9JrOg== - dependencies: - gaxios "^3.0.0" - google-p12-pem "^3.0.0" - jws "^4.0.0" - mime "^2.2.0" - gzip-size@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" @@ -6731,14 +6272,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -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" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -6746,13 +6279,6 @@ iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - icss-utils@^4.0.0, icss-utils@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" @@ -6760,11 +6286,6 @@ icss-utils@^4.0.0, icss-utils@^4.1.1: dependencies: postcss "^7.0.14" -idb@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/idb/-/idb-3.0.2.tgz#c8e9122d5ddd40f13b60ae665e4862f8b13fa384" - integrity sha512-+FLa/0sTXqyux0o6C+i2lOR0VoS60LU/jzUo5xjfY6+7sEEgy4Gz1O7yFBXvjd7N0NyIGWIRg8DcQSLEG+VSPw== - identity-obj-proxy@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" @@ -7239,16 +6760,11 @@ is-root@2.1.0: resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" @@ -7322,14 +6838,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isomorphic-fetch@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -7884,13 +7392,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" - integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== - dependencies: - bignumber.js "^9.0.0" - json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -7982,23 +7483,6 @@ jsx-ast-utils@^2.2.1, jsx-ast-utils@^2.2.3: array-includes "^3.1.1" object.assign "^4.1.0" -jwa@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" - integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" - integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== - dependencies: - jwa "^2.0.0" - safe-buffer "^5.0.1" - killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" @@ -8183,11 +7667,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -8228,11 +7707,6 @@ loglevel@^1.6.8: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -8270,13 +7744,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -8477,7 +7944,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.2.0, mime@^2.4.4: +mime@^2.4.4: version "2.4.6" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== @@ -8706,29 +8173,11 @@ no-case@^3.0.3: lower-case "^2.0.1" tslib "^1.10.0" -node-fetch@2.6.0, node-fetch@^2.3.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" - integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== - -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - node-forge@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== -node-forge@^0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" - integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ== - node-gyp@^3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" @@ -10218,11 +9667,6 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -promise-polyfill@8.1.3: - version "8.1.3" - resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" - integrity sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g== - promise@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" @@ -10247,25 +9691,6 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -protobufjs@^6.8.6, protobufjs@^6.9.0: - version "6.10.1" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.1.tgz#e6a484dd8f04b29629e9053344e3970cccf13cd2" - integrity sha512-pb8kTchL+1Ceg4lFd5XUpK8PdWacbvV5SK2ULH2ebrYtl4GjJmS24m6CKME67jzV53tbJxHlnNOSqQHbTsR9JQ== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" "^13.7.0" - long "^4.0.0" - proxy-addr@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" @@ -11077,7 +10502,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -11714,7 +11139,7 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== @@ -12145,7 +11570,7 @@ ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== -tslib@^1.10.0, tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== @@ -12626,12 +12051,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - -whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: +whatwg-fetch@^3.0.0: version "3.4.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.0.tgz#e11de14f4878f773fbebcde8871b2c0699af8b30" integrity sha512-rsum2ulz2iuZH08mJkT0Yi6JnKhwdw4oeyMjokgxd+mmqYSd9cPpOQf01TIWgjxG/U4+QR+AwKq6lSbXVxkyoQ== @@ -12848,15 +12268,6 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -12902,11 +12313,6 @@ xmlchars@^2.1.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= - xregexp@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" @@ -12952,14 +12358,6 @@ yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs@^13.3.0, yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" @@ -12975,20 +12373,3 @@ yargs@^13.3.0, yargs@^13.3.2: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^13.1.2" - -yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" From 948778e194e5d0641f71640ed86641098f65be03 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 16:38:29 -0700 Subject: [PATCH 08/25] Remove console statements --- backend/controllers/user.controller.js | 1 - client/src/hooks/useProvideAuth.js | 1 - client/src/pages/HandleAuth.js | 1 - 3 files changed, 3 deletions(-) diff --git a/backend/controllers/user.controller.js b/backend/controllers/user.controller.js index c2e7ad1c9..f9b0e1046 100644 --- a/backend/controllers/user.controller.js +++ b/backend/controllers/user.controller.js @@ -83,7 +83,6 @@ function verifySignIn(req, res) { } function verifyMe(req, res) { - console.log("-->req.userId: ", req.userId); res.send(200); } diff --git a/client/src/hooks/useProvideAuth.js b/client/src/hooks/useProvideAuth.js index 78f9cb044..acfda0b97 100644 --- a/client/src/hooks/useProvideAuth.js +++ b/client/src/hooks/useProvideAuth.js @@ -21,7 +21,6 @@ export default function useProvideAuth() { useEffect(() => { checkUser(); - console.log("-->user: ", user); }, [user, isAdmin]); return { user, isAdmin }; diff --git a/client/src/pages/HandleAuth.js b/client/src/pages/HandleAuth.js index a157fd9d3..2e9fbf11d 100644 --- a/client/src/pages/HandleAuth.js +++ b/client/src/pages/HandleAuth.js @@ -19,7 +19,6 @@ const HandleAuth = (props) => { }, }); const body = await response; - console.log("-->response: ", body); setMagicLink(response.status === 200); } catch (error) { console.log(error); From 6cc9e21022e5f0e1b9d9e10f4d7979cddc09aa1f Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 16:57:48 -0700 Subject: [PATCH 09/25] Update README for testing changes --- backend/README.md | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/backend/README.md b/backend/README.md index f1018a210..4362a1695 100644 --- a/backend/README.md +++ b/backend/README.md @@ -16,32 +16,19 @@ You will need to be in the backend directory for this to work. To maintain idempotent tests, we have opted to use in memory test databases. Jest, like most test runners, has hooks or methods for you to call before or after tests. We can -call the `beforeAll` and `afterAll` methods setup and tear down our database before each -test. +can setup our db and tear it down by importing the `setupDB` module. ```js // You will need to require the db-handler file. - const dbHandler = require("./db-handler"); + const { setupDB } = require("../setup-test"); - // Call the dbHanlder methods in your beforeAll and afterAll methods. - beforeAll(async () => await dbHandler.connect()); - afterAll(async () => await dbHandler.closeDatabase()); + // You will need to name the in memory DB for this test. + setupDB("api-auth"); ``` -In addition to hooks to call after the file is completed, Jest also has hooks/methods to -call before and after each test case. **At this time, the `dbHandler` method for clearing -the database does not work, so you can remove each collection manually if needed. - - ```js - // You will need to require the db-handler file. - const dbHandler = require("./db-handler"); - - // You will need to get the Model. - const Event = require("../models/event.model.js"); - - // Then you can delete the Collection in the db beforeAll or afterAll. - afterEach(async () => await Event.remove({})); - ``` +If you are unsure of where to start, then find a test that does something similar to your +aims. Copy, tweak, and run that test until you have your desired outcome. Also make sure +to give your test it's own name. ### Unit Tests From bea439157e6ef6621123926fcb09e87a4ec582ca Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Fri, 11 Sep 2020 17:00:29 -0700 Subject: [PATCH 10/25] Remove firebase reference on login --- client/src/pages/AdminLogin.js | 266 +++++++++++++++++---------------- 1 file changed, 134 insertions(+), 132 deletions(-) diff --git a/client/src/pages/AdminLogin.js b/client/src/pages/AdminLogin.js index 97e88a476..6d43bd02e 100644 --- a/client/src/pages/AdminLogin.js +++ b/client/src/pages/AdminLogin.js @@ -6,142 +6,144 @@ import useAuth from "../hooks/useAuth"; import "../sass/AdminLogin.scss"; const AdminLogin = (props) => { - const auth = useAuth(); - - // const [isLoading, setIsLoading] = useState(false); - // const [event, setEvent] = useState([]); - const [isError, setIsError] = useState(false); - const [errorMessage, setErrorMessage] = useState(""); - const [email, setEmail] = useState(""); - - // const auth = useAuth(); - - const handleInputChange = (e) => setEmail(e.currentTarget.value); - - const handleLogin = async (e) => { - e.preventDefault(); - - if (email === "") { - setIsError(true); - setErrorMessage("Please don't leave the field blank."); - } else if (!email.includes("@") || !email.includes(".")) { - setIsError(true); - setErrorMessage("Please format the email address correctly."); - } else { - let isAdmin = await checkEmail(e); - - if (isAdmin === false) { - setIsError(true); - setErrorMessage("You don't have the correct access level."); - - } else if (isAdmin === undefined || isAdmin === null) { - console.log('Something is wrong try again'); - - } else { - Firebase.submitEmail(email) - .then(response => { - props.history.push('/emailsent'); - }) - .catch(error => { - console.log(error); - }); - } - }; - }; - - async function checkEmail(e) { - e.preventDefault(); - + const auth = useAuth(); + + const [isLoading, setIsLoading] = useState(false); + const [isError, setIsError] = useState(false); + const [errorMessage, setErrorMessage] = useState(""); + const [email, setEmail] = useState(""); + + const handleInputChange = (e) => setEmail(e.currentTarget.value); + + const handleLogin = async (e) => { + e.preventDefault(); + + if (email === "") { + setIsError(true); + setErrorMessage("Please don't leave the field blank."); + } else if (!email.includes("@") || !email.includes(".")) { + setIsError(true); + setErrorMessage("Please format the email address correctly."); + } else { + let isAdmin = await checkEmail(e); + + if (isAdmin === false) { + setIsError(true); + setErrorMessage("You don't have the correct access level."); + } else if (isAdmin === undefined || isAdmin === null) { + console.log("Something is wrong try again"); + } else { try { - // setIsLoading(true); - - return await fetch('/api/checkuser', { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ email }) - }) - .then(res => { - if (res.ok) { - return res.json(); - } - - throw new Error(res.statusText); - }) - .then(response => { - - if (response === false) { - setIsError(true); - setErrorMessage("Please enter the correct email address."); - - return response; - } else if (response.accessLevel !== 'admin') { - setIsError(true); - setErrorMessage("You don't have the correct access level to view the dashboard."); - } else { - - return response.email; - } - }) - .catch(err => { - console.log(err); - // setIsLoading(false); - }) + await fetch("/api/auth/signin", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ email: email }), + }).then((res) => { + if (res.status === 200) { + props.history.push("/emailsent"); + } + }); } catch (error) { - console.log(error); - // setIsLoading(false); + console.log(error); } - }; - - return ( - auth.user - ? - : ( -
-
-
-

Welcome Back!

-
-
e.preventDefault()}> -
-
- - handleInputChange(e)} - aria-label="Email Address" - data-test="input-email" - autoComplete="none" - required="required" - /> -
-
-
- -
- {isError ? errorMessage : null} -
- -
- -
- -
+ } + } + }; + + async function checkEmail(e) { + e.preventDefault(); + + try { + setIsLoading(true); + return await fetch("/api/checkuser", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ email }), + }) + .then((res) => { + if (res.ok) { + return res.json(); + } + + throw new Error(res.statusText); + }) + .then((response) => { + if (response === false) { + setIsError(true); + setErrorMessage("Please enter the correct email address."); + + return response; + } else if (response.accessLevel !== "admin") { + setIsError(true); + setErrorMessage( + "You don't have the correct access level to view the dashboard." + ); + } else { + return response.email; + } + }) + .catch((err) => { + console.log(err); + setIsLoading(false); + }); + } catch (error) { + console.log(error); + setIsLoading(false); + } + } + + return auth.user ? ( + + ) : ( +
+
+
+

Welcome Back!

+
+
e.preventDefault()} + > +
+
+ + handleInputChange(e)} + aria-label="Email Address" + data-test="input-email" + autoComplete="none" + required="required" + />
- ) - ); +
+
+ +
+ {isError ? errorMessage : null} +
+ +
+ +
+
+
+ ); }; export default AdminLogin; - \ No newline at end of file From f66b27eb3f56ddfe2b86c11e0f9a435c15099c2c Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Sat, 3 Oct 2020 17:17:53 -0700 Subject: [PATCH 11/25] Fix merge conflict --- backend/routers/auth.router.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/backend/routers/auth.router.js b/backend/routers/auth.router.js index 49e5a1cce..f01138e6e 100644 --- a/backend/routers/auth.router.js +++ b/backend/routers/auth.router.js @@ -1,11 +1,6 @@ -<<<<<<< HEAD -const { authJwt, verifyUser } = require("../middleware"); -const userController = require("../controllers/user.controller"); -======= const express = require('express'); const { verifyUser } = require('../middleware'); const userController = require('../controllers/user.controller'); ->>>>>>> development const router = express.Router(); From ca21716f270e3864cb8f6a800dc7a9071fc72ad3 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Sat, 3 Oct 2020 17:39:42 -0700 Subject: [PATCH 12/25] Fix imports --- backend/routers/auth.router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/routers/auth.router.js b/backend/routers/auth.router.js index f01138e6e..d1cd4469e 100644 --- a/backend/routers/auth.router.js +++ b/backend/routers/auth.router.js @@ -1,5 +1,5 @@ const express = require('express'); -const { verifyUser } = require('../middleware'); +const { authJwt, verifyUser } = require('../middleware'); const userController = require('../controllers/user.controller'); const router = express.Router(); @@ -24,6 +24,6 @@ router.post( router.post("/verify-signin", userController.verifySignIn); -router.post("/me", [authJwt.verifyCookie], userController.verifyMe); +router.post('/me', [authJwt.verifyCookie], userController.verifyMe); module.exports = router; From aa07003df97d78dc334839b45a19c3d553a91149 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 15:08:12 -0700 Subject: [PATCH 13/25] Update yarn lock for merge --- yarn.lock | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1b5b66887..da1d9e808 100644 --- a/yarn.lock +++ b/yarn.lock @@ -82,11 +82,6 @@ dependencies: any-observable "^0.3.0" -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - "@types/sinonjs__fake-timers@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz#3a84cf5ec3249439015e14049bd3161419bf9eae" @@ -98,9 +93,9 @@ integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== ajv@^6.12.3: - version "6.12.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" - integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag== + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -145,11 +140,10 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" any-observable@^0.3.0: @@ -1970,9 +1964,9 @@ mkdirp@^0.5.1, mkdirp@^0.5.4: minimist "^1.2.5" moment@^2.27.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.0.tgz#fcbef955844d91deb55438613ddcec56e86a3425" - integrity sha512-z6IJ5HXYiuxvFTI6eiQ9dm77uE0gyy1yXNApVHqTcnIKfY9tIwEjlzsZ6u1LQXvVgKeTnv9Xm7NDvJ7lso3MtA== + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== ms@2.0.0: version "2.0.0" @@ -2625,9 +2619,9 @@ trim-right@^1.0.1: integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= tslib@^1.9.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" - integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tunnel-agent@^0.6.0: version "0.6.0" From 1e172b29339cd0097ef0464d5cc1759191355275 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 15:54:52 -0700 Subject: [PATCH 14/25] Send email for localhost to nginx container --- backend/controllers/email.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/controllers/email.controller.js b/backend/controllers/email.controller.js index c05440531..0657377ea 100644 --- a/backend/controllers/email.controller.js +++ b/backend/controllers/email.controller.js @@ -45,7 +45,7 @@ async function mailServer(email, token) { }); } const encodedToken = encodeURIComponent(token); - const emailLink = `https://tinyurl.com/nyqxd/handleauth?token=${encodedToken}&signIn=true`; + const emailLink = `https://tinyurl.com/2894wz/handleauth?token=${encodedToken}&signIn=true`; const encodedUri = encodeURI(emailLink); const mailOptions = { from: EMAIL_ACCOUNT, From bd62a8ab504bf8a2fbb7c09f0b042f5946622942 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 16:09:26 -0700 Subject: [PATCH 15/25] Allow development on localhost or docker --- backend/controllers/email.controller.js | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/controllers/email.controller.js b/backend/controllers/email.controller.js index 0657377ea..c05440531 100644 --- a/backend/controllers/email.controller.js +++ b/backend/controllers/email.controller.js @@ -45,7 +45,7 @@ async function mailServer(email, token) { }); } const encodedToken = encodeURIComponent(token); - const emailLink = `https://tinyurl.com/2894wz/handleauth?token=${encodedToken}&signIn=true`; + const emailLink = `https://tinyurl.com/nyqxd/handleauth?token=${encodedToken}&signIn=true`; const encodedUri = encodeURI(emailLink); const mailOptions = { from: EMAIL_ACCOUNT, diff --git a/docker-compose.yml b/docker-compose.yml index 5d7eb1077..82d3a1634 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: - "3000" - "4000" ports: - - "3000:3000" + - "3002:3000" stdin_open: true restart: on-failure networks: @@ -45,7 +45,7 @@ services: dockerfile: Dockerfile.nginx context: ./nginx ports: - - "5000:80" + - "3000:80" networks: - gateway depends_on: From 7096409559457f0f4f0a6988ab0b6027b8390c14 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 17:03:34 -0700 Subject: [PATCH 16/25] Remove docker commit workflow --- .github/workflows/main.yaml | 41 ------------------------------------- 1 file changed, 41 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b7dea006a..b15e0bc52 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -18,44 +18,3 @@ jobs: run: docker-compose build client - name: Run frontend test suite run: docker-compose run --rm client yarn run test - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push backend - uses: docker/build-push-action@v2 - with: - context: ./backend - file: ./backend/Dockerfile.api - target: api-production - platforms: linux/amd64 - push: true - tags: | - vrmsdeploy/vrms:backend - - name: Build and push client - uses: docker/build-push-action@v2 - with: - context: ./client - file: ./client/Dockerfile.client - platforms: linux/amd64 - target: client-production - stdin_open: true - push: true - tags: | - vrmsdeploy/vrms:client - - name: Build and push nginx - uses: docker/build-push-action@v2 - with: - context: ./nginx - file: ./nginx/Dockerfile.nginx - platforms: linux/amd64 - push: true - tags: | - vrmsdeploy/vrms:nginx - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} From f3d0f1d0f736f2d2eef0de89d8a5e1bf72fbf4b9 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 17:04:23 -0700 Subject: [PATCH 17/25] Change workflow name --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b15e0bc52..380ff522e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,7 +6,7 @@ on: branches: [development] jobs: - test-and-push-docker: + run-unit-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 3a8d28f745aa09a6a98518d745d0be59d1c42505 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:00:14 -0700 Subject: [PATCH 18/25] Fix Github actions --- .github/workflows/main.yaml | 52 ++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 380ff522e..2fd57b024 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,10 +1,8 @@ name: Build VMRS App on: - push: - branches: [development] pull_request: - branches: [development] - + branches: + - development jobs: run-unit-tests: runs-on: ubuntu-latest @@ -18,3 +16,49 @@ jobs: run: docker-compose build client - name: Run frontend test suite run: docker-compose run --rm client yarn run test + + push-docker-container: + if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true + runs-on: ubuntu-latest + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + target: api-production + platforms: linux/amd64 + push: true + tags: | + vrmsdeploy/vrms:backend + - name: Build and push client + uses: docker/build-push-action@v2 + with: + context: ./client + file: ./client/Dockerfile.client + platforms: linux/amd64 + target: client-production + stdin_open: true + push: true + tags: | + vrmsdeploy/vrms:client + - name: Build and push nginx + uses: docker/build-push-action@v2 + with: + context: ./nginx + file: ./nginx/Dockerfile.nginx + platforms: linux/amd64 + push: true + tags: | + vrmsdeploy/vrms:nginx + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push backend + uses: docker/build-push-action@v2 + with: + context: ./backend + file: ./backend/Dockerfile.api + From 96bbd7c24813599478e818d38ca711ca23fc82f1 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:06:16 -0700 Subject: [PATCH 19/25] Fix github actions --- .github/workflows/{main.yaml => all-merges.yaml} | 13 ------------- .github/workflows/all-prs.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 13 deletions(-) rename .github/workflows/{main.yaml => all-merges.yaml} (75%) create mode 100644 .github/workflows/all-prs.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/all-merges.yaml similarity index 75% rename from .github/workflows/main.yaml rename to .github/workflows/all-merges.yaml index 2fd57b024..13b0a9ba7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/all-merges.yaml @@ -3,19 +3,6 @@ on: pull_request: branches: - development -jobs: - run-unit-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build the backend container - run: docker-compose -f docker-compose-ci.yaml build backend - - name: Run backend test suite - run: docker-compose -f docker-compose-ci.yaml run --rm backend yarn run test --testPathIgnorePatterns=routers - - name: Build the frontend container - run: docker-compose build client - - name: Run frontend test suite - run: docker-compose run --rm client yarn run test push-docker-container: if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true diff --git a/.github/workflows/all-prs.yaml b/.github/workflows/all-prs.yaml new file mode 100644 index 000000000..6483eb6d6 --- /dev/null +++ b/.github/workflows/all-prs.yaml @@ -0,0 +1,16 @@ +name: Build VMRS App +on: + pull_request: + branches: [development] +jobs: + run-unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build the backend container + run: docker-compose -f docker-compose-ci.yaml build backend + - name: Run backend test suite + run: docker-compose -f docker-compose-ci.yaml run --rm backend yarn run test --testPathIgnorePatterns=routers + - name: Build the frontend container + run: docker-compose build client + - name: Run frontend test suite From 1e853733bff5ff5e0df6dde5e7de4f8923aa041e Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:10:23 -0700 Subject: [PATCH 20/25] Fix github actions --- .github/workflows/all-merges.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all-merges.yaml b/.github/workflows/all-merges.yaml index 13b0a9ba7..697588455 100644 --- a/.github/workflows/all-merges.yaml +++ b/.github/workflows/all-merges.yaml @@ -5,7 +5,7 @@ on: - development push-docker-container: - if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true + if: github.event.pull_request.merged == true runs-on: ubuntu-latest - name: Set up QEMU uses: docker/setup-qemu-action@v1 From e74809d132a5012ac5322e9e44515b2e0c5fd7ca Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:12:56 -0700 Subject: [PATCH 21/25] Fix Github Actions --- .github/workflows/all-merges.yaml | 2 +- .github/workflows/all-prs.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/all-merges.yaml b/.github/workflows/all-merges.yaml index 697588455..e947ce0b8 100644 --- a/.github/workflows/all-merges.yaml +++ b/.github/workflows/all-merges.yaml @@ -37,7 +37,7 @@ on: vrmsdeploy/vrms:nginx - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v1 - name: Login to DockerHub uses: docker/login-action@v1 with: diff --git a/.github/workflows/all-prs.yaml b/.github/workflows/all-prs.yaml index 6483eb6d6..6390ed37d 100644 --- a/.github/workflows/all-prs.yaml +++ b/.github/workflows/all-prs.yaml @@ -2,6 +2,7 @@ name: Build VMRS App on: pull_request: branches: [development] + jobs: run-unit-tests: runs-on: ubuntu-latest @@ -14,3 +15,4 @@ jobs: - name: Build the frontend container run: docker-compose build client - name: Run frontend test suite + run: docker-compose run --rm client yarn run test From b77cd6a45fc0e1bd5f405bb039a51b6efcc90acb Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:21:44 -0700 Subject: [PATCH 22/25] Fix merge actions --- .github/workflows/all-merges.yaml | 46 +++++++++++++++++++------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/all-merges.yaml b/.github/workflows/all-merges.yaml index e947ce0b8..bb609e063 100644 --- a/.github/workflows/all-merges.yaml +++ b/.github/workflows/all-merges.yaml @@ -7,15 +7,18 @@ on: push-docker-container: if: github.event.pull_request.merged == true runs-on: ubuntu-latest + - uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - target: api-production - platforms: linux/amd64 - push: true - tags: | - vrmsdeploy/vrms:backend + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push client + id: client_build uses: docker/build-push-action@v2 with: context: ./client @@ -26,8 +29,25 @@ on: push: true tags: | vrmsdeploy/vrms:client + - name: Client digest + run: echo ${{ steps.client_build.outputs.digest }} + - name: Build and push backend + id: backend_build + uses: docker/build-push-action@v2 + with: + context: ./backend + file: ./backend/Dockerfile.api + platforms: linux/amd64 + target: api-production + stdin_open: true + push: true + tags: | + vrmsdeploy/vrms:backend + - name: Client digest + run: echo ${{ steps.client_build.outputs.digest }} - name: Build and push nginx uses: docker/build-push-action@v2 + id: nginx_build with: context: ./nginx file: ./nginx/Dockerfile.nginx @@ -35,17 +55,7 @@ on: push: true tags: | vrmsdeploy/vrms:nginx - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push backend - uses: docker/build-push-action@v2 - with: - context: ./backend - file: ./backend/Dockerfile.api + - name: Client digest + run: echo ${{ steps.nginx_build.outputs.digest }} + From f89c4e4b5df8d7add07530f3b874d2837f6daa5a Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 18:28:25 -0700 Subject: [PATCH 23/25] Update github actions naming --- .github/workflows/all-merges.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-merges.yaml b/.github/workflows/all-merges.yaml index bb609e063..d6521dbe7 100644 --- a/.github/workflows/all-merges.yaml +++ b/.github/workflows/all-merges.yaml @@ -43,8 +43,8 @@ on: push: true tags: | vrmsdeploy/vrms:backend - - name: Client digest - run: echo ${{ steps.client_build.outputs.digest }} + - name: Backend digest + run: echo ${{ steps.backend_build.outputs.digest }} - name: Build and push nginx uses: docker/build-push-action@v2 id: nginx_build @@ -55,7 +55,7 @@ on: push: true tags: | vrmsdeploy/vrms:nginx - - name: Client digest + - name: Nginx digest run: echo ${{ steps.nginx_build.outputs.digest }} From 3f666c93e0acfd4471f3157e93525fabec1f8cbc Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Mon, 12 Oct 2020 21:26:01 -0700 Subject: [PATCH 24/25] Try merging worklfow --- .github/workflows/all-merges.yaml | 109 +++++++++++++++--------------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/.github/workflows/all-merges.yaml b/.github/workflows/all-merges.yaml index d6521dbe7..d00f4824d 100644 --- a/.github/workflows/all-merges.yaml +++ b/.github/workflows/all-merges.yaml @@ -1,61 +1,60 @@ name: Build VMRS App on: pull_request: - branches: - - development + branches: [development] +jobs: push-docker-container: + runs-on: ubuntu-latest if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push client - id: client_build - uses: docker/build-push-action@v2 - with: - context: ./client - file: ./client/Dockerfile.client - platforms: linux/amd64 - target: client-production - stdin_open: true - push: true - tags: | - vrmsdeploy/vrms:client - - name: Client digest - run: echo ${{ steps.client_build.outputs.digest }} - - name: Build and push backend - id: backend_build - uses: docker/build-push-action@v2 - with: - context: ./backend - file: ./backend/Dockerfile.api - platforms: linux/amd64 - target: api-production - stdin_open: true - push: true - tags: | - vrmsdeploy/vrms:backend - - name: Backend digest - run: echo ${{ steps.backend_build.outputs.digest }} - - name: Build and push nginx - uses: docker/build-push-action@v2 - id: nginx_build - with: - context: ./nginx - file: ./nginx/Dockerfile.nginx - platforms: linux/amd64 - push: true - tags: | - vrmsdeploy/vrms:nginx - - name: Nginx digest - run: echo ${{ steps.nginx_build.outputs.digest }} - - + steps: + - uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push client + id: client_build + uses: docker/build-push-action@v2 + with: + context: ./client + file: ./client/Dockerfile.client + platforms: linux/amd64 + target: client-production + stdin_open: true + push: true + tags: | + vrmsdeploy/vrms:client + - name: Client digest + run: echo ${{ steps.client_build.outputs.digest }} + - name: Build and push backend + id: backend_build + uses: docker/build-push-action@v2 + with: + context: ./backend + file: ./backend/Dockerfile.api + platforms: linux/amd64 + target: api-production + stdin_open: true + push: true + tags: | + vrmsdeploy/vrms:backend + - name: Backend digest + run: echo ${{ steps.backend_build.outputs.digest }} + - name: Build and push nginx + uses: docker/build-push-action@v2 + id: nginx_build + with: + context: ./nginx + file: ./nginx/Dockerfile.nginx + platforms: linux/amd64 + push: true + tags: | + vrmsdeploy/vrms:nginx + - name: Nginx digest + run: echo ${{ steps.nginx_build.outputs.digest }} From eb08fc5972c4068cd42c88ad03b4f14693c7d805 Mon Sep 17 00:00:00 2001 From: Nick Beaird Date: Tue, 13 Oct 2020 16:31:04 -0700 Subject: [PATCH 25/25] Stop validators from removing periods --- backend/controllers/email.controller.js | 6 +++--- backend/controllers/user.controller.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/controllers/email.controller.js b/backend/controllers/email.controller.js index d9fd1cd96..578669ee4 100644 --- a/backend/controllers/email.controller.js +++ b/backend/controllers/email.controller.js @@ -59,17 +59,17 @@ async function mailServer(email, token) { const localhostEmail = async () => { await smtpTransport.sendMail(mailOptions, (error, response) => { - console.log('email sent'); + console.log("email sent"); smtpTransport.close(); }); - }; + } const prodEmail = async () => { await smtpTransport.sendMail(mailOptions, (error, response) => { error ? console.log(error) : console.log(response); smtpTransport.close(); }); - }; + } if (process.env.NODE_ENV === 'test') { localhostEmail(); diff --git a/backend/controllers/user.controller.js b/backend/controllers/user.controller.js index d080cb441..9395d15c3 100644 --- a/backend/controllers/user.controller.js +++ b/backend/controllers/user.controller.js @@ -84,7 +84,7 @@ function verifyMe(req, res) { async function validateCreateUserAPICall(req, res, next) { await body('name.firstName').not().isEmpty().trim().escape().run(req); await body('name.lastName').not().isEmpty().trim().escape().run(req); - await body('email', 'Invalid email').exists().isEmail().normalizeEmail().run(req); + await body('email', 'Invalid email').exists().isEmail().normalizeEmail({ gmail_remove_dots: false }).run(req); // Finds the validation errors in this request and wraps them in an object with handy functions const errors = validationResult(req); @@ -96,7 +96,7 @@ async function validateCreateUserAPICall(req, res, next) { } async function validateSigninUserAPICall(req, res, next) { - await body('email', 'Invalid email').exists().isEmail().normalizeEmail().run(req); + await body('email', 'Invalid email').exists().isEmail().normalizeEmail({ gmail_remove_dots: false }).run(req); // Finds the validation errors in this request and wraps them in an object with handy functions const errors = validationResult(req);