From 76ae32f7e0342fed43c7c090442b9c6326b1abcf Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 10:37:35 -0600 Subject: [PATCH 01/17] Change variables to start with REACT_APP --- .gitignore | 2 + api/README.md | 2 +- api/config/dev.env | 6 +- api/config/production.env | 2 +- api/config/test.env | 2 +- api/src/app.js | 2 +- client/src/utils/apiWrapper.js | 2 +- package.json | 4 +- vercel.json | 4 +- walkthrough.md | 2 +- yarn.lock | 641 ++++++++++++++++++++++++++++++++- 11 files changed, 658 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6704566..a500501 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ dist # TernJS port file .tern-port + +.vercel diff --git a/api/README.md b/api/README.md index 914dc0a..61653c5 100644 --- a/api/README.md +++ b/api/README.md @@ -11,7 +11,7 @@ There are three environments that the backend runs in: `production`, `dev`, and To set up, first create a `/config` directory in the `/api` directory. Then, create three `.env` files: `production.env`, `dev.env`, and `test.env`. Each should contain the following field, with unique values (a seperate database for each environment). ``` -MONGO_URL=mongodb://:@.mlab.com: +REACT_APP_MONGO_URL=mongodb://:@.mlab.com: ``` Make sure that you have `dotenv-cli` installed globally with, diff --git a/api/config/dev.env b/api/config/dev.env index dba90cf..dc26059 100644 --- a/api/config/dev.env +++ b/api/config/dev.env @@ -1 +1,5 @@ -MONGO_URL=dev-mongo \ No newline at end of file +REACT_APP_MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority +GOOGLE_CLIENT_ID=660704467078-j1cehuk1cr74vctddhh261am13nama98.apps.googleusercontent.com +GOOGLE_CLIENT_SECRET=AJvH31jF850hDEYCcyKc2nan +OAUTH_CALLBACK_URI=http://localhost:9000/api/auth/callback +SESSION_SECRET=keyboard cat diff --git a/api/config/production.env b/api/config/production.env index bd0d1d5..ecb194b 100644 --- a/api/config/production.env +++ b/api/config/production.env @@ -1 +1 @@ -MONGO_URL=production-mongo \ No newline at end of file +REACT_APP_MONGO_URL=production-mongo \ No newline at end of file diff --git a/api/config/test.env b/api/config/test.env index 5b0bcb6..635b40d 100644 --- a/api/config/test.env +++ b/api/config/test.env @@ -1 +1 @@ -MONGO_URL=test-mongo \ No newline at end of file +REACT_APP_MONGO_URL=test-mongo \ No newline at end of file diff --git a/api/src/app.js b/api/src/app.js index d9901f6..ae61871 100644 --- a/api/src/app.js +++ b/api/src/app.js @@ -21,7 +21,7 @@ if (process.env.NODE_ENV != 'production') { // CONNECTION TO MONGO -// mongoose.connect(process.env.MONGO_URL, { +// mongoose.connect(process.env.REACT_APP_MONGO_URL, { // useNewUrlParser: true, // useUnifiedTopology: true, // }); diff --git a/client/src/utils/apiWrapper.js b/client/src/utils/apiWrapper.js index 9d940e7..75b04ae 100644 --- a/client/src/utils/apiWrapper.js +++ b/client/src/utils/apiWrapper.js @@ -1,6 +1,6 @@ import axios from 'axios'; -const BASE_URL = process.env.BACKEND_URL ?? 'http://localhost:9000/api'; +const BASE_URL = process.env.REACT_APP_BACKEND_URL ?? 'http://localhost:9000/api'; /** * Returns a sample API response to demonstrate a working backend diff --git a/package.json b/package.json index aa381ad..066c40b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,7 @@ { "dependencies": { - "@hack4impact-uiuc/bridge": "^1.1.0" + "@hack4impact-uiuc/bridge": "^1.1.0", + "global": "^4.4.0", + "vercel": "^21.0.1" } } diff --git a/vercel.json b/vercel.json index 6dbe4a0..e352c4f 100644 --- a/vercel.json +++ b/vercel.json @@ -2,11 +2,11 @@ "regions": ["iad1"], "build": { "env": { - "BACKEND_URL": "@memberdb_tool_backend_url" + "REACT_APP_BACKEND_URL": "@memberdb_tool_backend_url" } }, "env": { - "MONGO_URL": "@memberdb_tool_db_url" + "REACT_APP_REACT_APP_MONGO_URL": "@memberdb_tool_db_url" }, "builds": [ { "src": "api/src/app.js", "use": "@now/node" }, diff --git a/walkthrough.md b/walkthrough.md index c58af8a..c54a4d7 100644 --- a/walkthrough.md +++ b/walkthrough.md @@ -62,7 +62,7 @@ Here in `/src`, there are many folders. `/src/api` contains the code for fetchin There is also configuration for three seperate envirments: production (`production`), development (`dev`), and testing (`test`). Each of these have their own database, which can be configured within the `/config` directory. Inside, create three `.env` files: `production.env`, `dev.env`, and `test.env`. Each should contain the following field, with unique values (a seperate database for each environment). ``` -MONGO_URL=mongodb://:@.mlab.com: +REACT_APP_MONGO_URL=mongodb://:@.mlab.com: ``` `production` is set on deployment, `dev` is set whenever running locally, and `test` is set when tests are running. These environments are automatically set based on the task within `app.js`. diff --git a/yarn.lock b/yarn.lock index f4a2aab..616ecaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -282,6 +282,11 @@ resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz#5405ee8e444ed212db44e79351f0c70a582aae25" integrity sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw== +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + "@styled-system/background@^5.1.2": version "5.1.2" resolved "https://registry.yarnpkg.com/@styled-system/background/-/background-5.1.2.tgz#75c63d06b497ab372b70186c0bf608d62847a2ba" @@ -400,6 +405,13 @@ "@styled-system/core" "^5.1.2" "@styled-system/css" "^5.1.5" +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + "@testing-library/dom@*": version "7.29.1" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.29.1.tgz#a08ebeb26b2ea859b1621ff9642d114c1f04fe3a" @@ -588,7 +600,43 @@ dependencies: "@types/yargs-parser" "*" -ansi-regex@^4.0.0: +"@vercel/build-utils@2.6.1-canary.0": + version "2.6.1-canary.0" + resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-2.6.1-canary.0.tgz#ba549e7817c5a13e9ce271f88db3c3b9432d0d8b" + integrity sha512-lwTNPC4xCTeqzdHSsfIzHD5h/SwwcIemA5MDRUVdFEuYyF9X38i5A01ad1l/WedCQDi7IP3Q1IGOJ9g7XKJXOg== + +"@vercel/go@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@vercel/go/-/go-1.1.6.tgz#45ac3a6bd98a15b8bf1028b8c141a51fd971ac15" + integrity sha512-swA2crS08fkPmw4UkR9yjmoL8FOCzuNHLFDqj8oM1V9ni610ibJ7Xk57jI8uyS7bTecQVh8VUxihb+SF0GT+aw== + +"@vercel/node@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.8.5.tgz#2c8b9532f1bb25734a9964c52973386ed78022d4" + integrity sha512-1iw7FSR8Oau6vZB1MWfBnA5q2a/IqRHiSZSbt8lz0dyTF599q8pc5GcSv/TvmrYaEGzh3+N0S4cbmuMCqVlwJg== + dependencies: + "@types/node" "*" + ts-node "8.9.1" + typescript "3.9.3" + +"@vercel/python@1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@vercel/python/-/python-1.2.3.tgz#23ebb71c753fe1cc75fe186c89fc0af04c950191" + integrity sha512-DJRvL6bmt4m0xrkzSKUbP8mK57YSDdTBWoo0JYyXq/o2golQrv/wQTalbNchd4P8NhVL3mZuk/1JNYuv5u1rKQ== + +"@vercel/ruby@1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@vercel/ruby/-/ruby-1.2.4.tgz#60e0a91d7a1a730a7ecdbc6e095acb95f28f24be" + integrity sha512-g19vrrmJ4MTJCRB/bvx8DahIsml1iPn7wsdHf5k3QVN6lT0dlDILSBwpERC4hqzndimaApsmWOfjYtY9/L6+tQ== + +ansi-align@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" + integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== + dependencies: + string-width "^3.0.0" + +ansi-regex@^4.0.0, ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== @@ -612,6 +660,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + aria-query@^4.0.2, aria-query@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" @@ -666,11 +719,48 @@ babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" +boxen@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" + integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^5.3.1" + chalk "^3.0.0" + cli-boxes "^2.2.0" + string-width "^4.1.0" + term-size "^2.1.0" + type-fest "^0.8.1" + widest-line "^3.1.0" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + camelize@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" @@ -701,11 +791,28 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + classnames@^2.2.5: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== +cli-boxes@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -730,6 +837,18 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +configstore@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" + integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== + dependencies: + dot-prop "^5.2.0" + graceful-fs "^4.1.2" + make-dir "^3.0.0" + unique-string "^2.0.0" + write-file-atomic "^3.0.0" + xdg-basedir "^4.0.0" + core-js-pure@^3.0.0: version "3.8.2" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.8.2.tgz#286f885c0dac1cdcd6d78397392abc25ddeca225" @@ -751,6 +870,11 @@ cosmiconfig@^6.0.0: path-type "^4.0.0" yaml "^1.7.2" +crypto-random-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== + css-color-keywords@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" @@ -782,6 +906,23 @@ debug@^4.1.0: dependencies: ms "2.1.2" +decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + details-element-polyfill@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/details-element-polyfill/-/details-element-polyfill-2.4.0.tgz#e0622adef7902662faf27b4ab8acba5dc4e3a6e6" @@ -797,6 +938,11 @@ diff-sequences@^24.9.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dom-accessibility-api@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.3.0.tgz#511e5993dd673b97c87ea47dba0e3892f7e0c983" @@ -807,6 +953,40 @@ dom-accessibility-api@^0.5.4: resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.4.tgz#b06d059cdd4a4ad9a79275f9d414a5c126241166" integrity sha512-TvrjBckDy2c6v6RLxPv5QXOnU+SmF9nBII5621Ve5fu6Z/BDrENurBEvlC1f44lKEUVqOpK4w9E5Idc5/EgkLQ== +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== + dependencies: + is-obj "^2.0.0" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +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" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -814,6 +994,11 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +escape-goat@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" + integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -836,11 +1021,62 @@ get-nonce@^1.0.0: resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== +get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +global-dirs@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d" + integrity sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ== + dependencies: + ini "1.3.7" + +global@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +got@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +graceful-fs@^4.1.2: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -851,6 +1087,11 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-yarn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" + integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -865,6 +1106,11 @@ hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0: dependencies: react-is "^16.7.0" +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + import-fresh@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -873,6 +1119,26 @@ import-fresh@^3.1.0: parent-module "^1.0.0" resolve-from "^4.0.0" +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +ini@1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -885,6 +1151,13 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-core-module@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -892,6 +1165,49 @@ is-core-module@^2.1.0: dependencies: has "^1.0.3" +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-installed-globally@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" + integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== + dependencies: + global-dirs "^2.0.1" + is-path-inside "^3.0.1" + +is-npm@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d" + integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig== + +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== + +is-path-inside@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" + integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + +is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-yarn-global@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" + integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== + jest-axe@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jest-axe/-/jest-axe-3.2.0.tgz#0f7a0132565289432936421cf38b7b8504690835" @@ -937,11 +1253,30 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +latest-version@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" + integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== + dependencies: + package-json "^6.3.0" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -964,21 +1299,87 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= +make-dir@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +minimist@^1.2.0: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +package-json@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" + integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== + dependencies: + got "^9.6.0" + registry-auth-token "^4.0.0" + registry-url "^5.0.0" + semver "^6.2.0" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -1018,6 +1419,11 @@ postcss-value-parser@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + pretty-format@^24.3.0, pretty-format@^24.8.0, pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" @@ -1048,6 +1454,11 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" @@ -1057,6 +1468,31 @@ prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pupa@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== + dependencies: + escape-goat "^2.0.0" + +rc@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-clientside-effect@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.3.tgz#95c95f520addfb71743608b990bfe01eb002012b" @@ -1153,6 +1589,20 @@ regenerator-runtime@^0.13.4: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== +registry-auth-token@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" + integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== + dependencies: + rc "^1.2.8" + +registry-url@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" + integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== + dependencies: + rc "^1.2.8" + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -1166,6 +1616,13 @@ resolve@^1.12.0: is-core-module "^2.1.0" path-parse "^1.0.6" +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" @@ -1174,16 +1631,83 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" +semver-diff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" + integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== + dependencies: + semver "^6.3.0" + +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== +signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +source-map-support@^0.5.17: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.0.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== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + styled-components@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.2.1.tgz#6ed7fad2dc233825f64c719ffbdedd84ad79101a" @@ -1252,16 +1776,87 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +term-size@^2.1.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" + integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +ts-node@8.9.1: + version "8.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.1.tgz#2f857f46c47e91dcd28a14e052482eb14cfd65a5" + integrity sha512-yrq6ODsxEFTLz0R3BX2myf0WBCSQh9A+py8PBo1dCzWIOcvisbyH6akNKqDHMgXePF2kir5mm5JXJTH3OUJYOQ== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + tslib@^1.0.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typescript@3.9.3: + version "3.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a" + integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ== + +unique-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== + dependencies: + crypto-random-string "^2.0.0" + +update-notifier@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.0.tgz#4866b98c3bc5b5473c020b1250583628f9a328f3" + integrity sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew== + dependencies: + boxen "^4.2.0" + chalk "^3.0.0" + configstore "^5.0.1" + has-yarn "^2.1.0" + import-lazy "^2.1.0" + is-ci "^2.0.0" + is-installed-globally "^0.3.1" + is-npm "^4.0.0" + is-yarn-global "^0.3.0" + latest-version "^5.0.0" + pupa "^2.0.1" + semver-diff "^3.1.1" + xdg-basedir "^4.0.0" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + use-callback-ref@^1.2.1, use-callback-ref@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.4.tgz#d86d1577bfd0b955b6e04aaf5971025f406bea3c" @@ -1275,12 +1870,56 @@ use-sidecar@^1.0.1: detect-node-es "^1.0.0" tslib "^1.9.3" +vercel@^21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/vercel/-/vercel-21.0.1.tgz#85d8052dcdf93f9fc62b6404d3a8cd8b8a1b2874" + integrity sha512-N3xS1ydENdtC/i4RrJXg7Z9C0XSA8c0PQSM58WG+TkYY7BvSihv5kLqQHjzj9AXHkaY76bTfEpSLi1kmp0PjnQ== + dependencies: + "@vercel/build-utils" "2.6.1-canary.0" + "@vercel/go" "1.1.6" + "@vercel/node" "1.8.5" + "@vercel/python" "1.2.3" + "@vercel/ruby" "1.2.4" + update-notifier "4.1.0" + wait-for-expect@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-3.0.2.tgz#d2f14b2f7b778c9b82144109c8fa89ceaadaa463" integrity sha512-cfS1+DZxuav1aBYbaO/kE06EOS8yRw7qOFoD3XtjTkYvCvh3zUvNST8DXK/nPaeqIzIv3P3kL3lRJn8iwOiSag== +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +xdg-basedir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" + integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== + yaml@^1.7.2: version "1.10.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== From 521dfa15897983402b39a829133982c42a8a1fba Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 11:38:56 -0600 Subject: [PATCH 02/17] Use VERCEL_URL variable --- client/.env.production | 1 + client/src/utils/apiWrapper.js | 2 +- vercel.json | 5 ----- 3 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 client/.env.production diff --git a/client/.env.production b/client/.env.production new file mode 100644 index 0000000..d7b670f --- /dev/null +++ b/client/.env.production @@ -0,0 +1 @@ +REACT_APP_VERCEL_URL=${VERCEL_URL} diff --git a/client/src/utils/apiWrapper.js b/client/src/utils/apiWrapper.js index 75b04ae..fd15fcf 100644 --- a/client/src/utils/apiWrapper.js +++ b/client/src/utils/apiWrapper.js @@ -1,6 +1,6 @@ import axios from 'axios'; -const BASE_URL = process.env.REACT_APP_BACKEND_URL ?? 'http://localhost:9000/api'; +const BASE_URL = process.env.REACT_APP_VERCEL_URL ? `https://${process.env.REACT_APP_VERCEL_URL}/api` : 'http://localhost:9000/api'; /** * Returns a sample API response to demonstrate a working backend diff --git a/vercel.json b/vercel.json index e352c4f..1619744 100644 --- a/vercel.json +++ b/vercel.json @@ -1,10 +1,5 @@ { "regions": ["iad1"], - "build": { - "env": { - "REACT_APP_BACKEND_URL": "@memberdb_tool_backend_url" - } - }, "env": { "REACT_APP_REACT_APP_MONGO_URL": "@memberdb_tool_db_url" }, From d2c01e2551061becce4d151399bd03d320fadcbb Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 11:46:26 -0600 Subject: [PATCH 03/17] ignore all .env files --- .gitignore | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fa2c0c1..afcea5a 100644 --- a/.gitignore +++ b/.gitignore @@ -69,8 +69,9 @@ typings/ .yarn-integrity # dotenv environment variables file -.env -.env.test +*.env +*.env.test +*.env.production # parcel-bundler cache (https://parceljs.org/) .cache @@ -103,9 +104,5 @@ dist # TernJS port file .tern-port -<<<<<<< HEAD +# Vercel .vercel -======= -# Env files -api/config/* ->>>>>>> fb18f4ef1ef0b94d66fd7f4d2a499ece34a4bfd7 From 21fa0019783119f66a2f3bf7c9a40720fbc11f65 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 11:59:16 -0600 Subject: [PATCH 04/17] Change mongo var name --- api/src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/app.js b/api/src/app.js index f68d976..1e5838e 100644 --- a/api/src/app.js +++ b/api/src/app.js @@ -21,7 +21,7 @@ if (environment != 'production') { } // CONNECTION TO MONGO -mongoose.connect(process.env.MONGO_URL, { +mongoose.connect(process.env.REACT_APP_MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true, }); From 5c378ff743e84ff33c2eb1f4a76a47b33699da2d Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:05:54 -0600 Subject: [PATCH 05/17] Fix variable name typo --- vercel.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 1619744..0f3e6b7 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,7 @@ { "regions": ["iad1"], "env": { - "REACT_APP_REACT_APP_MONGO_URL": "@memberdb_tool_db_url" + "REACT_APP_MONGO_URL": "@memberdb_tool_db_url" }, "builds": [ { "src": "api/src/app.js", "use": "@now/node" }, From ed70b9e9ea387f0ea567162a997815afd4b97925 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:06:38 -0600 Subject: [PATCH 06/17] Run formatter --- client/src/utils/apiWrapper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/utils/apiWrapper.js b/client/src/utils/apiWrapper.js index fd15fcf..783b1b2 100644 --- a/client/src/utils/apiWrapper.js +++ b/client/src/utils/apiWrapper.js @@ -1,6 +1,8 @@ import axios from 'axios'; -const BASE_URL = process.env.REACT_APP_VERCEL_URL ? `https://${process.env.REACT_APP_VERCEL_URL}/api` : 'http://localhost:9000/api'; +const BASE_URL = process.env.REACT_APP_VERCEL_URL + ? `https://${process.env.REACT_APP_VERCEL_URL}/api` + : 'http://localhost:9000/api'; /** * Returns a sample API response to demonstrate a working backend From a784345adbf93437a1d6e0b7804786f8acbb176a Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:11:30 -0600 Subject: [PATCH 07/17] Deleted failing test --- api/test/home.test.js | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 api/test/home.test.js diff --git a/api/test/home.test.js b/api/test/home.test.js deleted file mode 100644 index a3f1807..0000000 --- a/api/test/home.test.js +++ /dev/null @@ -1,26 +0,0 @@ -const app = require('../src/app'); -const mongoose = require('mongoose'); -const request = require('supertest'); - -afterAll(async () => { - await mongoose.connection.close(); -}); - -describe('GET / ', () => { - test('API should return working message', async () => { - const response = await request(app).get('/'); - expect(response.body).toEqual('API working!'); - expect(response.statusCode).toBe(200); - }); -}); - -describe('GET /api/home/ ', () => { - test('API should return home text', async () => { - const response = await request(app).get('/api/home/'); - expect(response.body.message).toEqual('Successfully returned home text'); - expect(response.body.result).toEqual( - "You've connected the database! Isn't it so beautiful???", - ); - expect(response.statusCode).toBe(200); - }); -}); From 50580cc59a0d48412434171deac3cf851886e5bb Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:15:54 -0600 Subject: [PATCH 08/17] Add flag to pass with no tests --- api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/package.json b/api/package.json index d029684..712dcd7 100644 --- a/api/package.json +++ b/api/package.json @@ -9,7 +9,7 @@ "lint": "eslint --fix src -c .eslintrc.json --ext js", "format": "prettier --write \"./**/*.{js,jsx,json,md}\"", "format:check": "prettier --check \"./**/*.{js,jsx,json,md}\"", - "test": "jest" + "test": "jest --passWithNoTests" }, "dependencies": { "cors": "^2.8.5", From e831e0d76e325ebbcdcb875cce0730d62779fa3a Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:49:57 -0600 Subject: [PATCH 09/17] Remove vercel dependency --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 066c40b..e568c90 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,5 @@ "dependencies": { "@hack4impact-uiuc/bridge": "^1.1.0", "global": "^4.4.0", - "vercel": "^21.0.1" } } From cc0868f93babb884cfa7d34d99c469047ce8609f Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 12:53:55 -0600 Subject: [PATCH 10/17] Remove REACT_APP prefix --- api/README.md | 2 +- api/config/dev.env | 2 +- api/config/production.env | 2 +- api/config/test.env | 2 +- api/src/app.js | 2 +- package.json | 2 +- vercel.json | 2 +- walkthrough.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/README.md b/api/README.md index 61653c5..914dc0a 100644 --- a/api/README.md +++ b/api/README.md @@ -11,7 +11,7 @@ There are three environments that the backend runs in: `production`, `dev`, and To set up, first create a `/config` directory in the `/api` directory. Then, create three `.env` files: `production.env`, `dev.env`, and `test.env`. Each should contain the following field, with unique values (a seperate database for each environment). ``` -REACT_APP_MONGO_URL=mongodb://:@.mlab.com: +MONGO_URL=mongodb://:@.mlab.com: ``` Make sure that you have `dotenv-cli` installed globally with, diff --git a/api/config/dev.env b/api/config/dev.env index dc26059..bf48570 100644 --- a/api/config/dev.env +++ b/api/config/dev.env @@ -1,4 +1,4 @@ -REACT_APP_MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority +MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority GOOGLE_CLIENT_ID=660704467078-j1cehuk1cr74vctddhh261am13nama98.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=AJvH31jF850hDEYCcyKc2nan OAUTH_CALLBACK_URI=http://localhost:9000/api/auth/callback diff --git a/api/config/production.env b/api/config/production.env index ecb194b..a7552d1 100644 --- a/api/config/production.env +++ b/api/config/production.env @@ -1 +1 @@ -REACT_APP_MONGO_URL=production-mongo \ No newline at end of file +MONGO_URL=production-mongo diff --git a/api/config/test.env b/api/config/test.env index 635b40d..4ddcce8 100644 --- a/api/config/test.env +++ b/api/config/test.env @@ -1 +1 @@ -REACT_APP_MONGO_URL=test-mongo \ No newline at end of file +MONGO_URL=test-mongo diff --git a/api/src/app.js b/api/src/app.js index 1e5838e..f68d976 100644 --- a/api/src/app.js +++ b/api/src/app.js @@ -21,7 +21,7 @@ if (environment != 'production') { } // CONNECTION TO MONGO -mongoose.connect(process.env.REACT_APP_MONGO_URL, { +mongoose.connect(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true, }); diff --git a/package.json b/package.json index e568c90..4c99b33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "dependencies": { "@hack4impact-uiuc/bridge": "^1.1.0", - "global": "^4.4.0", + "global": "^4.4.0" } } diff --git a/vercel.json b/vercel.json index 0f3e6b7..f857491 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,7 @@ { "regions": ["iad1"], "env": { - "REACT_APP_MONGO_URL": "@memberdb_tool_db_url" + "MONGO_URL": "@memberdb_tool_db_url" }, "builds": [ { "src": "api/src/app.js", "use": "@now/node" }, diff --git a/walkthrough.md b/walkthrough.md index c54a4d7..c58af8a 100644 --- a/walkthrough.md +++ b/walkthrough.md @@ -62,7 +62,7 @@ Here in `/src`, there are many folders. `/src/api` contains the code for fetchin There is also configuration for three seperate envirments: production (`production`), development (`dev`), and testing (`test`). Each of these have their own database, which can be configured within the `/config` directory. Inside, create three `.env` files: `production.env`, `dev.env`, and `test.env`. Each should contain the following field, with unique values (a seperate database for each environment). ``` -REACT_APP_MONGO_URL=mongodb://:@.mlab.com: +MONGO_URL=mongodb://:@.mlab.com: ``` `production` is set on deployment, `dev` is set whenever running locally, and `test` is set when tests are running. These environments are automatically set based on the task within `app.js`. From 4e00a10ced642016b5db4db33bc224737e38967b Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 13:07:55 -0600 Subject: [PATCH 11/17] Remove .env files --- api/bin/www | 0 api/config/dev.env | 5 ----- api/config/production.env | 1 - api/config/test.env | 1 - client/.env.production | 1 - client/public/apple-touch-icon.png | Bin client/public/favicon.ico | Bin 7 files changed, 8 deletions(-) mode change 100755 => 100644 api/bin/www delete mode 100644 api/config/dev.env delete mode 100644 api/config/production.env delete mode 100644 api/config/test.env delete mode 100644 client/.env.production mode change 100755 => 100644 client/public/apple-touch-icon.png mode change 100755 => 100644 client/public/favicon.ico diff --git a/api/bin/www b/api/bin/www old mode 100755 new mode 100644 diff --git a/api/config/dev.env b/api/config/dev.env deleted file mode 100644 index bf48570..0000000 --- a/api/config/dev.env +++ /dev/null @@ -1,5 +0,0 @@ -MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority -GOOGLE_CLIENT_ID=660704467078-j1cehuk1cr74vctddhh261am13nama98.apps.googleusercontent.com -GOOGLE_CLIENT_SECRET=AJvH31jF850hDEYCcyKc2nan -OAUTH_CALLBACK_URI=http://localhost:9000/api/auth/callback -SESSION_SECRET=keyboard cat diff --git a/api/config/production.env b/api/config/production.env deleted file mode 100644 index a7552d1..0000000 --- a/api/config/production.env +++ /dev/null @@ -1 +0,0 @@ -MONGO_URL=production-mongo diff --git a/api/config/test.env b/api/config/test.env deleted file mode 100644 index 4ddcce8..0000000 --- a/api/config/test.env +++ /dev/null @@ -1 +0,0 @@ -MONGO_URL=test-mongo diff --git a/client/.env.production b/client/.env.production deleted file mode 100644 index d7b670f..0000000 --- a/client/.env.production +++ /dev/null @@ -1 +0,0 @@ -REACT_APP_VERCEL_URL=${VERCEL_URL} diff --git a/client/public/apple-touch-icon.png b/client/public/apple-touch-icon.png old mode 100755 new mode 100644 diff --git a/client/public/favicon.ico b/client/public/favicon.ico old mode 100755 new mode 100644 From 41d4a052ccb7c37b1aba489d9c05ccd8e6ecb492 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 13:09:44 -0600 Subject: [PATCH 12/17] Remove global dependency --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 4c99b33..aa381ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "@hack4impact-uiuc/bridge": "^1.1.0", - "global": "^4.4.0" + "@hack4impact-uiuc/bridge": "^1.1.0" } } From 3a8c8328bda74ea0dc591a945e108ae20fa42c65 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 18:45:21 -0600 Subject: [PATCH 13/17] Readd env files --- .gitignore | 6 +++--- api/config/dev.env | 5 +++++ api/config/production.env | 1 + api/config/test.env | 1 + client/.env.production | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 api/config/dev.env create mode 100644 api/config/production.env create mode 100644 api/config/test.env create mode 100644 client/.env.production diff --git a/.gitignore b/.gitignore index afcea5a..93dc5aa 100644 --- a/.gitignore +++ b/.gitignore @@ -69,9 +69,9 @@ typings/ .yarn-integrity # dotenv environment variables file -*.env -*.env.test -*.env.production +#*.env +#*.env.test +#*.env.production # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/api/config/dev.env b/api/config/dev.env new file mode 100644 index 0000000..bf48570 --- /dev/null +++ b/api/config/dev.env @@ -0,0 +1,5 @@ +MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority +GOOGLE_CLIENT_ID=660704467078-j1cehuk1cr74vctddhh261am13nama98.apps.googleusercontent.com +GOOGLE_CLIENT_SECRET=AJvH31jF850hDEYCcyKc2nan +OAUTH_CALLBACK_URI=http://localhost:9000/api/auth/callback +SESSION_SECRET=keyboard cat diff --git a/api/config/production.env b/api/config/production.env new file mode 100644 index 0000000..a7552d1 --- /dev/null +++ b/api/config/production.env @@ -0,0 +1 @@ +MONGO_URL=production-mongo diff --git a/api/config/test.env b/api/config/test.env new file mode 100644 index 0000000..4ddcce8 --- /dev/null +++ b/api/config/test.env @@ -0,0 +1 @@ +MONGO_URL=test-mongo diff --git a/client/.env.production b/client/.env.production new file mode 100644 index 0000000..d7b670f --- /dev/null +++ b/client/.env.production @@ -0,0 +1 @@ +REACT_APP_VERCEL_URL=${VERCEL_URL} From daecc04da40a163cd5661cb93427a928fbfd9f25 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 20:34:27 -0600 Subject: [PATCH 14/17] gitignore env files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 26766c6..ece03e9 100644 --- a/.gitignore +++ b/.gitignore @@ -99,5 +99,10 @@ dist # TernJS port file .tern-port +# Env files +*.env +*.env.test +*.env.production + # Vercel .vercel From 7b70722801677713676bf9caa039ad35ba57dc94 Mon Sep 17 00:00:00 2001 From: mlw6 Date: Tue, 12 Jan 2021 20:36:05 -0600 Subject: [PATCH 15/17] Add test back --- api/test/home.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 api/test/home.test.js diff --git a/api/test/home.test.js b/api/test/home.test.js new file mode 100644 index 0000000..a3f1807 --- /dev/null +++ b/api/test/home.test.js @@ -0,0 +1,26 @@ +const app = require('../src/app'); +const mongoose = require('mongoose'); +const request = require('supertest'); + +afterAll(async () => { + await mongoose.connection.close(); +}); + +describe('GET / ', () => { + test('API should return working message', async () => { + const response = await request(app).get('/'); + expect(response.body).toEqual('API working!'); + expect(response.statusCode).toBe(200); + }); +}); + +describe('GET /api/home/ ', () => { + test('API should return home text', async () => { + const response = await request(app).get('/api/home/'); + expect(response.body.message).toEqual('Successfully returned home text'); + expect(response.body.result).toEqual( + "You've connected the database! Isn't it so beautiful???", + ); + expect(response.statusCode).toBe(200); + }); +}); From 927ba1f3a7db019cfb6f8d13614246b322be50fd Mon Sep 17 00:00:00 2001 From: Matthew Walowski Date: Wed, 13 Jan 2021 07:14:56 -0600 Subject: [PATCH 16/17] Delete dev.env --- api/config/dev.env | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 api/config/dev.env diff --git a/api/config/dev.env b/api/config/dev.env deleted file mode 100644 index bf48570..0000000 --- a/api/config/dev.env +++ /dev/null @@ -1,5 +0,0 @@ -MONGO_URL=mongodb+srv://memberdb-admin:GzUoUaNWRHfZP7Fz@cluster0.hyqeo.mongodb.net/dev?retryWrites=true&w=majority -GOOGLE_CLIENT_ID=660704467078-j1cehuk1cr74vctddhh261am13nama98.apps.googleusercontent.com -GOOGLE_CLIENT_SECRET=AJvH31jF850hDEYCcyKc2nan -OAUTH_CALLBACK_URI=http://localhost:9000/api/auth/callback -SESSION_SECRET=keyboard cat From a2153c61fb83c2ab770c70eff1bd2fc988b02c7c Mon Sep 17 00:00:00 2001 From: Matthew Walowski Date: Wed, 13 Jan 2021 15:17:58 -0600 Subject: [PATCH 17/17] Remove "pass with no tests" flag --- api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/package.json b/api/package.json index 712dcd7..d029684 100644 --- a/api/package.json +++ b/api/package.json @@ -9,7 +9,7 @@ "lint": "eslint --fix src -c .eslintrc.json --ext js", "format": "prettier --write \"./**/*.{js,jsx,json,md}\"", "format:check": "prettier --check \"./**/*.{js,jsx,json,md}\"", - "test": "jest --passWithNoTests" + "test": "jest" }, "dependencies": { "cors": "^2.8.5",