From a4cc7277e62672c78f791f3b44401ef199e4410b Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Fri, 29 Mar 2024 19:57:58 -0400 Subject: [PATCH 01/17] basic email invite outline (token placed in .env) --- package.json | 1 + .../importProfessorsOrTAs.ts | 5 +++ src/firebasefunctions/sendEmailInvite.js | 21 +++++++++++ src/firebasefunctions/sendEmailInvite.ts | 22 +++++++++++ yarn.lock | 37 ++++++++++++++++++- 5 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 src/firebasefunctions/sendEmailInvite.js create mode 100644 src/firebasefunctions/sendEmailInvite.ts diff --git a/package.json b/package.json index 4291b2c6d..64a445e62 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "history": "^4.10.1", "linkifyjs": "^2.1.9", "lodash": "^4.17.15", + "mailtrap": "^3.3.0", "mocha": "^8.2.1", "moment": "^2.29.4", "moment-timezone": "^0.5.32", diff --git a/src/firebasefunctions/importProfessorsOrTAs.ts b/src/firebasefunctions/importProfessorsOrTAs.ts index 24dab3979..1b829983c 100644 --- a/src/firebasefunctions/importProfessorsOrTAs.ts +++ b/src/firebasefunctions/importProfessorsOrTAs.ts @@ -1,5 +1,6 @@ import { firestore } from '../firebase'; import { blockArray } from '../firehooks'; +import { sendEmailInvite } from './sendEmailInvite'; const db = firestore; @@ -101,6 +102,7 @@ const importProfessorsOrTAs = async ( }); + // missingSet at this point contains the emails of all users who were not found in the database // add missing user to pendingUsers collection missingSet.forEach(email => { const pendingUsersRef = db.collection('pendingUsers').doc(email); @@ -113,6 +115,9 @@ const importProfessorsOrTAs = async ( pendingUsersRef.set({ email, roles: { [course.courseId]: role } }); } }); + + // send email invite to user prompting them to join QMI + sendEmailInvite(email) }) // update course's ta/professor roles const updates = getCourseRoleUpdates( diff --git a/src/firebasefunctions/sendEmailInvite.js b/src/firebasefunctions/sendEmailInvite.js new file mode 100644 index 000000000..869d7d3b5 --- /dev/null +++ b/src/firebasefunctions/sendEmailInvite.js @@ -0,0 +1,21 @@ +"use strict"; +exports.__esModule = true; +exports.sendEmailInvite = void 0; +var mailtrap_1 = require("mailtrap"); +exports.sendEmailInvite = function () { + var client = new mailtrap_1.MailtrapClient({ token: process.env.MAILTRAP_TOKEN }); + var sender = { + email: "mailtrap@queueme.in", + name: "QueueMeIn Team" + }; + var recipient = [{ + email: "rg779@cornell.edu" + }]; + client.send({ + from: sender, + to: recipient, + subject: "You've been invited to QueueMeIn!", + text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", + category: "QMI Invite – Test" + }); +}; diff --git a/src/firebasefunctions/sendEmailInvite.ts b/src/firebasefunctions/sendEmailInvite.ts new file mode 100644 index 000000000..1ccb18632 --- /dev/null +++ b/src/firebasefunctions/sendEmailInvite.ts @@ -0,0 +1,22 @@ +import { MailtrapClient } from 'mailtrap'; + +export const sendEmailInvite = (email: string) => { + + const client = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); + const sender = { + email: "mailtrap@queueme.in", + name: "QueueMeIn Team" + } + const recipient = [{ + email + }] + + client.send({ + from: sender, + to: recipient, + subject: "You've been invited to QueueMeIn!", + text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", + category: "QMI Invite – Test", + }) + +} diff --git a/yarn.lock b/yarn.lock index fc7b4827d..0fa0cc4a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4011,6 +4011,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== +axios@>=0.27: + version "1.6.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axios@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" @@ -5196,7 +5205,7 @@ colors@1.0.3, colors@1.0.x: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -7719,6 +7728,11 @@ follow-redirects@^1.14.8: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7762,6 +7776,15 @@ fork-ts-checker-webpack-plugin@3.1.1: tapable "^1.0.0" worker-rpc "^0.1.0" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -10893,6 +10916,13 @@ lru-queue@^0.1.0: dependencies: es5-ext "~0.10.2" +mailtrap@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/mailtrap/-/mailtrap-3.3.0.tgz#c11462f7dec8897f609499beb75a98f8687620f8" + integrity sha512-lFk7Cuv+qccAGMc9EMPwQiHp2+zG5wPorWdDn29NiLCA0YwYLEtPAKz/EvkLue3kcRA2KukgLOSwEbzL/Fj7Xw== + dependencies: + axios ">=0.27" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -13095,6 +13125,11 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" From fd513e4d4141d8f1af5372b03b3d2937f212b5ae Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Fri, 29 Mar 2024 20:02:54 -0400 Subject: [PATCH 02/17] move mailtrap to functions directory --- functions/package.json | 3 +- functions/yarn.lock | 64 ++++++++++++++++++++++++++++++++++++++++++ package.json | 1 - yarn.lock | 37 +----------------------- 4 files changed, 67 insertions(+), 38 deletions(-) diff --git a/functions/package.json b/functions/package.json index dcfe213b4..9a7c44755 100644 --- a/functions/package.json +++ b/functions/package.json @@ -10,12 +10,13 @@ "logs": "firebase functions:log" }, "engines": { - "node": "^14.17.3" + "node": "^16.20.2" }, "main": "lib/index.js", "dependencies": { "firebase-admin": "^8.10.0", "firebase-functions": "^3.17.1", + "mailtrap": "^3.3.0", "twilio": "^3.71.3" }, "devDependencies": { diff --git a/functions/yarn.lock b/functions/yarn.lock index b945ec78e..bae8d8434 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -533,11 +533,25 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +axios@>=0.27: + version "1.6.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" @@ -653,6 +667,13 @@ 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== +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + compressible@^2.0.12: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -800,6 +821,11 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -1268,11 +1294,25 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -1931,6 +1971,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +mailtrap@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/mailtrap/-/mailtrap-3.3.0.tgz#c11462f7dec8897f609499beb75a98f8687620f8" + integrity sha512-lFk7Cuv+qccAGMc9EMPwQiHp2+zG5wPorWdDn29NiLCA0YwYLEtPAKz/EvkLue3kcRA2KukgLOSwEbzL/Fj7Xw== + dependencies: + axios ">=0.27" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -1958,6 +2005,11 @@ mime-db@1.51.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + mime-types@^2.0.8, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.34" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" @@ -1965,6 +2017,13 @@ mime-types@^2.0.8, mime-types@~2.1.24, mime-types@~2.1.34: dependencies: mime-db "1.51.0" +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -2224,6 +2283,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" diff --git a/package.json b/package.json index 64a445e62..4291b2c6d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "history": "^4.10.1", "linkifyjs": "^2.1.9", "lodash": "^4.17.15", - "mailtrap": "^3.3.0", "mocha": "^8.2.1", "moment": "^2.29.4", "moment-timezone": "^0.5.32", diff --git a/yarn.lock b/yarn.lock index 0fa0cc4a5..fc7b4827d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4011,15 +4011,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@>=0.27: - version "1.6.8" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" - integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - axios@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" @@ -5205,7 +5196,7 @@ colors@1.0.3, colors@1.0.x: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -7728,11 +7719,6 @@ follow-redirects@^1.14.8: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== -follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -7776,15 +7762,6 @@ fork-ts-checker-webpack-plugin@3.1.1: tapable "^1.0.0" worker-rpc "^0.1.0" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -10916,13 +10893,6 @@ lru-queue@^0.1.0: dependencies: es5-ext "~0.10.2" -mailtrap@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/mailtrap/-/mailtrap-3.3.0.tgz#c11462f7dec8897f609499beb75a98f8687620f8" - integrity sha512-lFk7Cuv+qccAGMc9EMPwQiHp2+zG5wPorWdDn29NiLCA0YwYLEtPAKz/EvkLue3kcRA2KukgLOSwEbzL/Fj7Xw== - dependencies: - axios ">=0.27" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -13125,11 +13095,6 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" From 77bbc534bb7a641fc5462d243024c60b39175178 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 02:19:44 -0400 Subject: [PATCH 03/17] write firebase cloud function for onCreate trigger send email --- functions/src/index.ts | 24 ++++++++++++++++++++++++ src/firebasefunctions/sendEmailInvite.js | 21 --------------------- src/firebasefunctions/sendEmailInvite.ts | 22 ---------------------- 3 files changed, 24 insertions(+), 43 deletions(-) delete mode 100644 src/firebasefunctions/sendEmailInvite.js delete mode 100644 src/firebasefunctions/sendEmailInvite.ts diff --git a/functions/src/index.ts b/functions/src/index.ts index ae646340e..1bc2ef4a0 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -1,6 +1,7 @@ import * as functions from 'firebase-functions'; import * as admin from 'firebase-admin'; import { Twilio } from 'twilio'; +import { MailtrapClient } from 'mailtrap'; // Use admin SDK to enable writing to other parts of database // const admin = require('firebase-admin'); @@ -484,4 +485,27 @@ exports.onQuestionUpdate = functions.firestore totalWaitTime: admin.firestore.FieldValue.increment(waitTimeChange), totalResolveTime: admin.firestore.FieldValue.increment(resolveTimeChange), }); + }); + +exports.onPendingUserCreate = functions.firestore + .document('pendingUsers/{userEmail}') + .onCreate(async (snap, context) => { + const userEmail = context.params.userEmail + const mailtrapClient = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); + const sender = { + email: "mailtrap@queueme.in", + name: "QueueMeIn Team" + } + const recipient = [{ + email: userEmail + }] + + mailtrapClient.send({ + from: sender, + to: recipient, + subject: "You've been invited to QueueMeIn!", + text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", + category: "QMI Invite – Test", + }) + }); \ No newline at end of file diff --git a/src/firebasefunctions/sendEmailInvite.js b/src/firebasefunctions/sendEmailInvite.js deleted file mode 100644 index 869d7d3b5..000000000 --- a/src/firebasefunctions/sendEmailInvite.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -exports.__esModule = true; -exports.sendEmailInvite = void 0; -var mailtrap_1 = require("mailtrap"); -exports.sendEmailInvite = function () { - var client = new mailtrap_1.MailtrapClient({ token: process.env.MAILTRAP_TOKEN }); - var sender = { - email: "mailtrap@queueme.in", - name: "QueueMeIn Team" - }; - var recipient = [{ - email: "rg779@cornell.edu" - }]; - client.send({ - from: sender, - to: recipient, - subject: "You've been invited to QueueMeIn!", - text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", - category: "QMI Invite – Test" - }); -}; diff --git a/src/firebasefunctions/sendEmailInvite.ts b/src/firebasefunctions/sendEmailInvite.ts deleted file mode 100644 index 1ccb18632..000000000 --- a/src/firebasefunctions/sendEmailInvite.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { MailtrapClient } from 'mailtrap'; - -export const sendEmailInvite = (email: string) => { - - const client = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); - const sender = { - email: "mailtrap@queueme.in", - name: "QueueMeIn Team" - } - const recipient = [{ - email - }] - - client.send({ - from: sender, - to: recipient, - subject: "You've been invited to QueueMeIn!", - text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", - category: "QMI Invite – Test", - }) - -} From 4af09c06d24a9a9cd3c7304f387e3a2c96c08fa4 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 14:42:54 -0400 Subject: [PATCH 04/17] working on emulator --- functions/package.json | 4 ++-- functions/yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/functions/package.json b/functions/package.json index 9a7c44755..220639a40 100644 --- a/functions/package.json +++ b/functions/package.json @@ -10,7 +10,7 @@ "logs": "firebase functions:log" }, "engines": { - "node": "^16.20.2" + "node": "16" }, "main": "lib/index.js", "dependencies": { @@ -25,7 +25,7 @@ "eslint": "^7.6.0", "eslint-plugin-import": "^2.22.0", "firebase-functions-test": "^0.2.0", - "typescript": "^3.8.0" + "typescript": "4.1" }, "private": true } diff --git a/functions/yarn.lock b/functions/yarn.lock index bae8d8434..2d8cd65b4 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -2764,10 +2764,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.8.0: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@4.1: + version "4.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" + integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== unbox-primitive@^1.0.1: version "1.0.1" From 9cb9fd51fa973ca7db943e6b8aa778d58d9b369c Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 16:08:42 -0400 Subject: [PATCH 05/17] remove unneeded import --- src/firebasefunctions/importProfessorsOrTAs.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/firebasefunctions/importProfessorsOrTAs.ts b/src/firebasefunctions/importProfessorsOrTAs.ts index 1b829983c..de5ad4496 100644 --- a/src/firebasefunctions/importProfessorsOrTAs.ts +++ b/src/firebasefunctions/importProfessorsOrTAs.ts @@ -1,6 +1,5 @@ import { firestore } from '../firebase'; import { blockArray } from '../firehooks'; -import { sendEmailInvite } from './sendEmailInvite'; const db = firestore; @@ -115,9 +114,6 @@ const importProfessorsOrTAs = async ( pendingUsersRef.set({ email, roles: { [course.courseId]: role } }); } }); - - // send email invite to user prompting them to join QMI - sendEmailInvite(email) }) // update course's ta/professor roles const updates = getCourseRoleUpdates( From 50e0ef0f4887eaa0d571e02e09c62030a338f18c Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 16:19:55 -0400 Subject: [PATCH 06/17] updates --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4291b2c6d..311997491 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "eslint-plugin-react-hooks": "^3.0.0", "firebase-tools": "^7.13.1", "ts-mocha": "^8.0.0", - "typescript": "^3.7.3" + "typescript": "4.1.6" }, "browserslist": { "production": [ diff --git a/yarn.lock b/yarn.lock index fc7b4827d..03e7add24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15741,10 +15741,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.7.3: - version "3.9.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" - integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" + integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== ua-parser-js@^0.7.30: version "0.7.31" From 013899349714d51fd27cc79a21a215b7eba4b4b2 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 16:30:24 -0400 Subject: [PATCH 07/17] node upgrade to v18.20.0 --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 2 +- .nvmrc | 2 +- functions/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index aa366f503..a3f6ed013 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v1 with: - node-version: "^14.17.3" + node-version: "^18.20.0" - name: Install run: yarn install - name: Build Client diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b108f686..7d0c13bf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v1 with: - node-version: "^14.17.3" + node-version: "^18.20.0" - name: Install run: | yarn install diff --git a/.nvmrc b/.nvmrc index a5e323ec1..91f7588a1 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14.17.3 +v18.20.0 diff --git a/functions/package.json b/functions/package.json index dcfe213b4..142d469d6 100644 --- a/functions/package.json +++ b/functions/package.json @@ -10,7 +10,7 @@ "logs": "firebase functions:log" }, "engines": { - "node": "^14.17.3" + "node": "^18.20.0" }, "main": "lib/index.js", "dependencies": { From b52c95c0ff1fdf95b8ff1adadae821b0f11f58d7 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 16:33:27 -0400 Subject: [PATCH 08/17] open ssl workaround --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4291b2c6d..0b87ad208 100644 --- a/package.json +++ b/package.json @@ -54,12 +54,12 @@ "yarn": "^1.22.17" }, "scripts": { - "build": "react-scripts build", + "build": "NODE_OPTIONS=--openssl-legacy-provider react-scripts build", "build:staging": "REACT_APP_IS_STAGING=true react-scripts build", "deploy": "firebase deploy", - "start": "react-scripts start", + "start": "NODE_OPTIONS=--openssl-legacy-provider react-scripts start", "s": "yarn start", - "test": "NODE_ENV=test firebase emulators:exec --only firestore \"./test.sh\"", + "test": "NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=test firebase emulators:exec --only firestore \"./test.sh\"", "lint": "eslint . --ext tsx --ext ts", "analyze": "source-map-explorer 'build/static/js/*.js'" }, From 83a3d81fc0c579bbfbfa447a475577a0ba5a0e1b Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 16:59:34 -0400 Subject: [PATCH 09/17] add mailtrap --- functions/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/package.json b/functions/package.json index 220639a40..fbbcd385d 100644 --- a/functions/package.json +++ b/functions/package.json @@ -10,7 +10,7 @@ "logs": "firebase functions:log" }, "engines": { - "node": "16" + "node": "18" }, "main": "lib/index.js", "dependencies": { From f72aaa4c3f9fc3e20788578767d6a08559430c63 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 17:05:25 -0400 Subject: [PATCH 10/17] runnable now --- functions/package.json | 2 +- functions/yarn.lock | 2 +- yarn.lock | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/functions/package.json b/functions/package.json index 433f24272..3f9e47dbf 100644 --- a/functions/package.json +++ b/functions/package.json @@ -25,7 +25,7 @@ "eslint": "^7.6.0", "eslint-plugin-import": "^2.22.0", "firebase-functions-test": "^0.2.0", - "typescript": "4.1" + "typescript": "4.1.6" }, "private": true } diff --git a/functions/yarn.lock b/functions/yarn.lock index 2d8cd65b4..7893998b9 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -2764,7 +2764,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.1: +typescript@4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== diff --git a/yarn.lock b/yarn.lock index cfafc828f..83e028104 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6150,6 +6150,13 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -14607,6 +14614,13 @@ semver@^7.3.2: dependencies: lru-cache "^6.0.0" +semver@^7.3.5: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" From 7b09f00783e51c971cc10fe58de05fe66f65d0da Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 17:19:36 -0400 Subject: [PATCH 11/17] install latest version of firebase-functions to support node v18 --- functions/package.json | 4 ++-- functions/yarn.lock | 35 +++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/functions/package.json b/functions/package.json index 3f9e47dbf..092b27aee 100644 --- a/functions/package.json +++ b/functions/package.json @@ -10,12 +10,12 @@ "logs": "firebase functions:log" }, "engines": { - "node": "^18.20.0" + "node": "18" }, "main": "lib/index.js", "dependencies": { "firebase-admin": "^8.10.0", - "firebase-functions": "^3.17.1", + "firebase-functions": "^4.8.2", "mailtrap": "^3.3.0", "twilio": "^3.71.3" }, diff --git a/functions/yarn.lock b/functions/yarn.lock index 7893998b9..511648bee 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -1265,16 +1265,16 @@ firebase-functions-test@^0.2.0: "@types/lodash" "^4.14.104" lodash "^4.17.5" -firebase-functions@^3.17.1: - version "3.18.0" - resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-3.18.0.tgz#82bb7fafbb9ce4819458ae608fda0b401646543f" - integrity sha512-KkwxrAUqYYIwWMTuM2h4k3xGQhon+FTenC/Z8HWuED+D4RuJxDWh3s8MSYR8ZEMywZOg//R1iy6VjQKymnInYg== +firebase-functions@^4.8.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-4.8.2.tgz#dde3a154d45a1dcb372f0b5c45d06693662ab701" + integrity sha512-1M86Wu6IoE5f+r8QithaBFnkzygejh6OhaCz3p3dGjl+3lvL/9Xbm8GovZWZRmZzJ1nzb4dZpXWCalunLwZtOg== dependencies: "@types/cors" "^2.8.5" "@types/express" "4.17.3" cors "^2.8.5" express "^4.17.1" - lodash "^4.17.14" + protobufjs "^7.2.2" flat-cache@^3.0.4: version "3.0.4" @@ -1947,7 +1947,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.5: +lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.5: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -1957,6 +1957,11 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + lru-cache@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -2275,6 +2280,24 @@ protobufjs@^6.8.6, protobufjs@^6.8.9: "@types/node" ">=13.7.0" long "^4.0.0" +protobufjs@^7.2.2: + version "7.2.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== + 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/node" ">=13.7.0" + long "^5.0.0" + proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" From 369caa12ccb2b127567e3780f71eb339768b14f2 Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 17:25:45 -0400 Subject: [PATCH 12/17] installed latest firebase-admin and firebase-functions in root --- functions/package.json | 2 +- functions/yarn.lock | 1235 +++++++++++++++++----------------------- package.json | 2 +- yarn.lock | 33 +- 4 files changed, 564 insertions(+), 708 deletions(-) diff --git a/functions/package.json b/functions/package.json index 092b27aee..ff70a61c0 100644 --- a/functions/package.json +++ b/functions/package.json @@ -14,7 +14,7 @@ }, "main": "lib/index.js", "dependencies": { - "firebase-admin": "^8.10.0", + "firebase-admin": "^12.0.0", "firebase-functions": "^4.8.2", "mailtrap": "^3.3.0", "twilio": "^3.71.3" diff --git a/functions/yarn.lock b/functions/yarn.lock index 511648bee..cbc2e2893 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -38,142 +38,151 @@ minimatch "^3.0.4" strip-json-comments "^3.1.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== +"@fastify/busboy@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-1.2.1.tgz#9c6db24a55f8b803b5222753b24fe3aea2ba9ca3" + integrity sha512-7PQA7EH43S0CxcOa9OeAnaeA0oQ+e/DHNPZwSQM9CQHW76jle5+OvLdibRp/Aafs9KXbLhxyjOTkRjWUbQEd3Q== + dependencies: + text-decoding "^1.0.0" + +"@firebase/app-check-interop-types@0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.1.tgz#0cfce28a95d0232d663501529c5689b47ca4aba1" + integrity sha512-NILZbe6RH3X1pZmJnfOfY2gLIrlKmrkUMMrrK6VSXHcSE0eQv28xFEcw16D198i9JYZpy5Kwq394My62qCMaIw== + +"@firebase/app-types@0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.9.1.tgz#38fe81383ab4985f464e7ba8c5055015849ea4e9" + integrity sha512-nFGqTYsnDFn1oXf1tCwPAc+hQPxyvBT/QB7qDjwK+IDYThOn63nGhzdUTXxVD9Ca8gUY/e5PQMngeo0ZW/E3uQ== -"@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-interop-types@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.2.2.tgz#5afc973f1f73318475fe173f01bc316f5f5911c2" + integrity sha512-k3NA28Jfoo0+o391bFjoV9X5QLnUL1WbLhZZRbTQhZdmdGYJfX8ixtNNlHsYQ94bwG0QRbsmvkzDnzuhHrV11w== -"@firebase/component@0.1.19": - version "0.1.19" - resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.19.tgz#bd2ac601652c22576b574c08c40da245933dbac7" - integrity sha512-L0S3g8eqaerg8y0zox3oOHSTwn/FE8RbcRHiurnbESvDViZtP5S5WnhuAPd7FnFxa8ElWK0z1Tr3ikzWDv1xdQ== +"@firebase/component@0.6.6": + version "0.6.6" + resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.6.6.tgz#7ad4013ff37686d355dee0694f1fa4604491b7c3" + integrity sha512-pp7sWqHmAAlA3os6ERgoM3k5Cxff510M9RLXZ9Mc8KFKMBc2ct3RkZTWUF7ixJNvMiK/iNgRLPDrLR2gtRJ9iQ== dependencies: - "@firebase/util" "0.3.2" - tslib "^1.11.1" + "@firebase/util" "1.9.5" + tslib "^2.1.0" -"@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.0": - version "0.6.13" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.13.tgz#b96fe0c53757dd6404ee085fdcb45c0f9f525c17" - integrity sha512-NommVkAPzU7CKd1gyehmi3lz0K78q0KOfiex7Nfy7MBMwknLm7oNqKovXSgQV1PCLvKXvvAplDSFhDhzIf9obA== - dependencies: - "@firebase/auth-interop-types" "0.1.5" - "@firebase/component" "0.1.19" - "@firebase/database-types" "0.5.2" - "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.2" - faye-websocket "0.11.3" - 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/util@0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.2.tgz#87de27f9cffc2324651cabf6ec133d0a9eb21b52" - integrity sha512-Dqs00++c8rwKky6KCKLLY2T1qYO4Q+X5t+lF7DInXDNF4ae1Oau35bkD+OpJ9u7l1pEv7KHowP6CUKuySCOc8g== - dependencies: - tslib "^1.11.1" - -"@google-cloud/common@^2.1.1": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-2.4.0.tgz#2783b7de8435024a31453510f2dab5a6a91a4c82" - integrity sha512-zWFjBS35eI9leAHhjfeOYlK5Plcuj/77EzstnrJIZbKgF/nkqjcQuGiMCpzCwOfPyUbz8ZaEOYgbHa759AKbjg== - dependencies: - "@google-cloud/projectify" "^1.0.0" - "@google-cloud/promisify" "^1.0.0" - arrify "^2.0.0" - duplexify "^3.6.0" - ent "^2.2.0" - extend "^3.0.2" - google-auth-library "^5.5.0" - retry-request "^4.0.0" - teeny-request "^6.0.0" +"@firebase/database-compat@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-1.0.4.tgz#3f31e977e743e860f6dda406733927a9decfff5a" + integrity sha512-GEEDAvsSMAkqy0BIFSVtFzoOIIcKHFfDM4aXHtWL/JCaNn4OOjH7td73jDfN3ALvpIN4hQki0FcxQ89XjqaTjQ== + dependencies: + "@firebase/component" "0.6.6" + "@firebase/database" "1.0.4" + "@firebase/database-types" "1.0.2" + "@firebase/logger" "0.4.1" + "@firebase/util" "1.9.5" + tslib "^2.1.0" + +"@firebase/database-types@1.0.2", "@firebase/database-types@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-1.0.2.tgz#973837e0234693839010f5947f7ff6492ebf17e4" + integrity sha512-JRigr5JNLEHqOkI99tAGHDZF47469/cJz1tRAgGs8Feh+3ZmQy/vVChSqwMp2DuVUGp9PlmGsNSlpINJ/hDuIA== + dependencies: + "@firebase/app-types" "0.9.1" + "@firebase/util" "1.9.5" + +"@firebase/database@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-1.0.4.tgz#c6c7b218baf13fe189df14bdf42844853b595761" + integrity sha512-k84cXh+dtpzvY6yOhfyr1B+I1vjvSMtmlqotE0lTNVylc8m5nmOohjzpTLEQDrBWvwACX/VP5fEyajAdmnOKqA== + dependencies: + "@firebase/app-check-interop-types" "0.3.1" + "@firebase/auth-interop-types" "0.2.2" + "@firebase/component" "0.6.6" + "@firebase/logger" "0.4.1" + "@firebase/util" "1.9.5" + faye-websocket "0.11.4" + tslib "^2.1.0" + +"@firebase/logger@0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.4.1.tgz#b4bb0d266680210a34e7c70a8a92342391e399ab" + integrity sha512-tTIixB5UJbG9ZHSGZSZdX7THr3KWOLrejZ9B7jYsm6fpwgRNngKznQKA2wgYVyvBc1ta7dGFh9NtJ8n7qfiYIw== + dependencies: + tslib "^2.1.0" + +"@firebase/util@1.9.5": + version "1.9.5" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-1.9.5.tgz#9321fc1695b30a9283c99f768da2e837e02cbddc" + integrity sha512-PP4pAFISDxsf70l3pEy34Mf3GkkUcVQ3MdKp6aSVb7tcpfUQxnsdV7twDd8EkfB6zZylH6wpUAoangQDmCUMqw== + dependencies: + tslib "^2.1.0" -"@google-cloud/firestore@^3.0.0": - version "3.8.6" - resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-3.8.6.tgz#9e6dea57323a5824563430a759244825fb01d834" - integrity sha512-ox80NbrM1MLJgvAAUd1quFLx/ie/nSjrk1PtscSicpoYDlKb9e6j7pHrVpbopBMyliyfNl3tLJWaDh+x+uCXqw== +"@google-cloud/firestore@^7.1.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-7.5.0.tgz#386f8141c5a83410c70a8c0710310bbcc983e2f2" + integrity sha512-bhFKaCybfK/jzqhVm1Y1o8p3wOHVEo8opj7IJGF2sdqS69xl6QD1zpnrgssi/4HUj9bxIqtcs33Ofz//deV+rg== dependencies: - deep-equal "^2.0.0" + fast-deep-equal "^3.1.1" functional-red-black-tree "^1.0.1" - google-gax "^1.15.3" - readable-stream "^3.4.0" - through2 "^3.0.0" + google-gax "^4.0.4" + protobufjs "^7.2.5" -"@google-cloud/paginator@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-2.0.3.tgz#c7987ad05d1c3ebcef554381be80e9e8da4e4882" - integrity sha512-kp/pkb2p/p0d8/SKUu4mOq8+HGwF8NPzHWkj+VKrIPQPyMRw8deZtrO/OcSiy9C/7bpfU5Txah5ltUNfPkgEXg== +"@google-cloud/paginator@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-5.0.0.tgz#b8cc62f151685095d11467402cbf417c41bf14e6" + integrity sha512-87aeg6QQcEPxGCOthnpUjvw4xAZ57G7pL8FS0C4e/81fr3FjkpUpibf1s2v5XGyGhUVGF4Jfg7yEcxqn2iUw1w== dependencies: arrify "^2.0.0" extend "^3.0.2" -"@google-cloud/projectify@^1.0.0": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-1.0.4.tgz#28daabebba6579ed998edcadf1a8f3be17f3b5f0" - integrity sha512-ZdzQUN02eRsmTKfBj9FDL0KNDIFNjBn/d6tHQmA/+FImH5DO6ZV8E7FzxMgAUiVAUq41RFAkb25p1oHOZ8psfg== +"@google-cloud/projectify@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-4.0.0.tgz#d600e0433daf51b88c1fa95ac7f02e38e80a07be" + integrity sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA== -"@google-cloud/promisify@^1.0.0": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-1.0.4.tgz#ce86ffa94f9cfafa2e68f7b3e4a7fad194189723" - integrity sha512-VccZDcOql77obTnFh0TbNED/6ZbbmHDf8UMNnzO1d5g9V0Htfm4k5cllY8P1tJsRKC3zWYGRLaViiupcgVjBoQ== +"@google-cloud/promisify@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-4.0.0.tgz#a906e533ebdd0f754dca2509933334ce58b8c8b1" + integrity sha512-Orxzlfb9c67A15cq2JQEyVc7wEsmFBmHjZWZYQMUyJ1qivXyMwdyNOs9odi79hze+2zqdTtu1E19IM/FtqZ10g== -"@google-cloud/storage@^4.1.2": - version "4.7.2" - resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-4.7.2.tgz#37a21729fe4a2b27c816443808a55aa890ebc70d" - integrity sha512-nlXYhJyC6ErFQX34tMLruknJ9fljN3JepgXEC9MZlQ64/2h9Ee8MJ7FCowdBnTiZ863IkbvctWtNZRrSxfyqSQ== +"@google-cloud/storage@^7.7.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-7.9.0.tgz#d9da66c1aae8d35b4cde67963c85a1bc671a391b" + integrity sha512-PlFl7g3r91NmXtZHXsSEfTZES5ysD3SSBWmX4iBdQ2TFH7tN/Vn/IhnVELCHtgh1vc+uYPZ7XvRYaqtDCdghIA== dependencies: - "@google-cloud/common" "^2.1.1" - "@google-cloud/paginator" "^2.0.0" - "@google-cloud/promisify" "^1.0.0" - arrify "^2.0.0" + "@google-cloud/paginator" "^5.0.0" + "@google-cloud/projectify" "^4.0.0" + "@google-cloud/promisify" "^4.0.0" + abort-controller "^3.0.0" + async-retry "^1.3.3" compressible "^2.0.12" - concat-stream "^2.0.0" - date-and-time "^0.14.2" - duplexify "^3.5.0" - extend "^3.0.2" - gaxios "^3.0.0" - gcs-resumable-upload "^2.2.4" - hash-stream-validation "^0.2.2" - mime "^2.2.0" + duplexify "^4.1.3" + ent "^2.2.0" + fast-xml-parser "^4.3.0" + gaxios "^6.0.2" + google-auth-library "^9.6.3" + mime "^3.0.0" mime-types "^2.0.8" - onetime "^5.1.0" - p-limit "^2.2.0" - pumpify "^2.0.0" - readable-stream "^3.4.0" - snakeize "^0.1.0" - stream-events "^1.0.1" - through2 "^3.0.0" - xdg-basedir "^4.0.0" - -"@grpc/grpc-js@~1.3.6": - version "1.3.8" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.3.8.tgz#0d7dce9de7aeb20702a28f0704e61b0bf34061c1" - integrity sha512-4qJqqn+CU/nBydz9ePJP+oa8dz0U42Ut/GejlbyaQ1xTkynCc+ndNHHnISlNeHawDsv4MOAyP3mV/EnDNUw2zA== + p-limit "^3.0.1" + retry-request "^7.0.0" + teeny-request "^9.0.0" + uuid "^8.0.0" + +"@grpc/grpc-js@~1.10.0": + version "1.10.4" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.10.4.tgz#a33f743f69ed531e917c9eafb4fd8bc3e5f2e617" + integrity sha512-MqBisuxTkYvPFnEiu+dag3xG/NBUDzSbAFAWlzfkGnQkjVZ6by3h4atbBc+Ikqup1z5BfB4BN18gKWR1YyppNw== dependencies: - "@types/node" ">=12.12.47" + "@grpc/proto-loader" "^0.7.10" + "@js-sdsl/ordered-map" "^4.4.2" -"@grpc/proto-loader@^0.5.1": - version "0.5.6" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.6.tgz#1dea4b8a6412b05e2d58514d507137b63a52a98d" - integrity sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ== +"@grpc/proto-loader@^0.7.0", "@grpc/proto-loader@^0.7.10": + version "0.7.12" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.12.tgz#787b58e3e3771df30b1567c057b6ab89e3a42911" + integrity sha512-DCVwMxqYzpUCiDMl7hQ384FqP4T3DbNpXU8pt681l3UWCip1WUiD5JrkImUwCB9a7f2cq4CUTmi5r/xIMRPY1Q== dependencies: lodash.camelcase "^4.3.0" - protobufjs "^6.8.6" + long "^5.0.0" + protobufjs "^7.2.4" + yargs "^17.7.2" "@humanwhocodes/config-array@^0.5.0": version "0.5.0" @@ -189,6 +198,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@js-sdsl/ordered-map@^4.4.2": + version "4.4.2" + resolved "https://registry.yarnpkg.com/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz#9299f82874bab9e4c7f9c48d865becbfe8d6907c" + integrity sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw== + "@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" @@ -242,10 +256,10 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== "@types/body-parser@*": version "1.19.2" @@ -255,6 +269,11 @@ "@types/connect" "*" "@types/node" "*" +"@types/caseless@*": + version "0.12.5" + resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.5.tgz#db9468cb1b1b5a925b8f34822f1669df0c5472f5" + integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -281,6 +300,16 @@ "@types/qs" "*" "@types/range-parser" "*" +"@types/express-serve-static-core@^4.17.33": + version "4.17.43" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54" + integrity sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + "@types/express@4.17.3": version "4.17.3" resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.3.tgz#38e4458ce2067873b09a73908df488870c303bd9" @@ -290,12 +319,15 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" -"@types/fs-extra@^8.0.1": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.2.tgz#7125cc2e4bdd9bd2fc83005ffdb1d0ba00cca61f" - integrity sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg== +"@types/express@^4.17.17": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== dependencies: - "@types/node" "*" + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" "@types/json-schema@^7.0.3": version "7.0.9" @@ -307,12 +339,19 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/jsonwebtoken@^9.0.2": + version "9.0.6" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.6.tgz#d1af3544d99ad992fb6681bbe60676e06b032bd3" + integrity sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw== + dependencies: + "@types/node" "*" + "@types/lodash@^4.14.104": version "4.14.178" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== -"@types/long@^4.0.0", "@types/long@^4.0.1": +"@types/long@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== @@ -322,15 +361,17 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0": +"@types/node@*", "@types/node@>=13.7.0": version "17.0.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.18.tgz#3b4fed5cfb58010e3a2be4b6e74615e4847f1074" integrity sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA== -"@types/node@^8.10.59": - version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" - integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== +"@types/node@^20.10.3": + version "20.12.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.2.tgz#9facdd11102f38b21b4ebedd9d7999663343d72e" + integrity sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ== + dependencies: + undici-types "~5.26.4" "@types/qs@*": version "6.9.7" @@ -342,6 +383,24 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/request@^2.48.8": + version "2.48.12" + resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.12.tgz#0f590f615a10f87da18e9790ac94c29ec4c5ef30" + integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== + dependencies: + "@types/caseless" "*" + "@types/node" "*" + "@types/tough-cookie" "*" + form-data "^2.5.0" + +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + "@types/serve-static@*": version "1.13.10" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" @@ -350,6 +409,11 @@ "@types/mime" "^1" "@types/node" "*" +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + "@typescript-eslint/eslint-plugin@^3.9.1": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz#7e061338a1383f59edc204c605899f93dc2e2c8f" @@ -442,6 +506,13 @@ agent-base@6: dependencies: debug "4" +agent-base@^7.0.2: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -533,16 +604,18 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async-retry@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" + integrity sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw== + dependencies: + retry "0.13.1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - axios@>=0.27: version "1.6.8" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" @@ -603,11 +676,6 @@ buffer-equal-constant-time@1.0.1: resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -643,6 +711,15 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.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" @@ -667,7 +744,7 @@ 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== -combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -686,28 +763,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" - integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.0.2" - typedarray "^0.0.6" - -configstore@^5.0.0: - 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" - content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -730,11 +785,6 @@ cookie@0.4.2: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - cors@^2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" @@ -752,16 +802,6 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -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== - -date-and-time@^0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/date-and-time/-/date-and-time-0.14.2.tgz#a4266c3dead460f6c231fe9674e585908dac354e" - integrity sha512-EFTCh9zRSEpGPmJaexg7HTuzZHh6cnJj1ui7IGCFNXzd2QdpsNh05Db5TF3xzJm30YN+A8/6xHSuRcQqoc3kFA== - dayjs@^1.8.29: version "1.10.7" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" @@ -788,26 +828,12 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -deep-equal@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.5.tgz#55cd2fe326d83f9cbf7261ef0e060b3f724c5cb9" - integrity sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw== +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: - call-bind "^1.0.0" - es-get-iterator "^1.1.1" - get-intrinsic "^1.0.1" - is-arguments "^1.0.4" - is-date-object "^1.0.2" - is-regex "^1.1.1" - isarray "^2.0.5" - object-is "^1.1.4" - object-keys "^1.1.1" - object.assign "^4.1.2" - regexp.prototype.flags "^1.3.0" - side-channel "^1.0.3" - which-boxed-primitive "^1.0.1" - which-collection "^1.0.1" - which-typed-array "^1.1.2" + ms "2.1.2" deep-is@^0.1.3: version "0.1.4" @@ -836,13 +862,6 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -dicer@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.1.tgz#abf28921e3475bc5e801e74e0159fd94f927ba97" - integrity sha512-ObioMtXnmjYs3aRtpIJt9rgQSPCIhKVkFPip+E9GUDyWl8N435znUxK/JfNwGZJ2wnn5JKQ7Ly3vOK5Q5dylGA== - dependencies: - streamsearch "^1.1.0" - doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -857,32 +876,15 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -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" - -duplexify@^3.5.0, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -duplexify@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" - integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== +duplexify@^4.0.0, duplexify@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.3.tgz#a07e1c0d0a2c001158563d32592ba58bddb0236f" + integrity sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA== dependencies: end-of-stream "^1.4.1" inherits "^2.0.3" readable-stream "^3.1.1" - stream-shift "^1.0.0" + stream-shift "^1.0.2" ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: version "1.0.11" @@ -906,7 +908,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.4.1: 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== @@ -925,7 +927,7 @@ ent@^2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: +es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== @@ -951,20 +953,6 @@ es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-get-iterator@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" - integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.0" - has-symbols "^1.0.1" - is-arguments "^1.1.0" - is-map "^2.0.2" - is-set "^2.0.2" - is-string "^1.0.5" - isarray "^2.0.5" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -974,6 +962,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -1204,15 +1197,17 @@ 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== +fast-xml-parser@^4.3.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.3.6.tgz#190f9d99097f0c8f2d3a0e681a10404afca052ff" + integrity sha512-M2SovcRxD4+vC493Uc2GZVcZaj66CCJhWurC4viynVSTvrpErCShNcDz1lAho6n9REQKvL/ll4A4/fw6Y9z8nw== + dependencies: + strnum "^1.0.5" -faye-websocket@0.11.3: - 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== +faye-websocket@0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== dependencies: websocket-driver ">=0.5.1" @@ -1243,19 +1238,22 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" -firebase-admin@^8.10.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-8.13.0.tgz#997d34ae8357d7dc162ba622148bbebcf7f2e923" - integrity sha512-krXj5ncWMJBhCpXSn9UFY6zmDWjFjqgx+1e9ATXKFYndEjmKtNBuJzqdrAdDh7aTUR7X6+0TPx4Hbc08kd0lwQ== - dependencies: - "@firebase/database" "^0.6.0" - "@types/node" "^8.10.59" - dicer "^0.3.0" - jsonwebtoken "^8.5.1" - node-forge "^0.7.6" +firebase-admin@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-12.0.0.tgz#42bc649f5551880eb013ed7251087f387d8a5c65" + integrity sha512-wBrrSSsKV++/+O8E7O/C7/wL0nbG/x4Xv4yatz/+sohaZ+LsnWtYUcrd3gZutO86hLpDex7xgyrkKbgulmtVyQ== + dependencies: + "@fastify/busboy" "^1.2.1" + "@firebase/database-compat" "^1.0.2" + "@firebase/database-types" "^1.0.0" + "@types/node" "^20.10.3" + jsonwebtoken "^9.0.0" + jwks-rsa "^3.0.1" + node-forge "^1.3.1" + uuid "^9.0.0" optionalDependencies: - "@google-cloud/firestore" "^3.0.0" - "@google-cloud/storage" "^4.1.2" + "@google-cloud/firestore" "^7.1.0" + "@google-cloud/storage" "^7.7.0" firebase-functions-test@^0.2.0: version "0.2.3" @@ -1299,10 +1297,14 @@ follow-redirects@^1.15.6: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +form-data@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" form-data@^4.0.0: version "4.0.0" @@ -1338,49 +1340,30 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -gaxios@^2.0.0, gaxios@^2.1.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.3.4.tgz#eea99353f341c270c5f3c29fc46b8ead56f0a173" - integrity sha512-US8UMj8C5pRnao3Zykc4AAVr+cffoNKRTg9Rsf2GiuZCW69vgJj38VK2PzlPuQU73FZ/nTk9/Av6/JGcE1N9vA== +gaxios@^6.0.0, gaxios@^6.0.2, gaxios@^6.1.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.3.0.tgz#5cd858de47c6560caaf0f99bb5d89c5bdfbe9034" + integrity sha512-p+ggrQw3fBwH2F5N/PAI4k/G/y1art5OxKpb2J2chwNNHM4hHuAOtivjPuirMF4KNKwTTUal/lPfL2+7h2mEcg== dependencies: - abort-controller "^3.0.0" extend "^3.0.2" - https-proxy-agent "^5.0.0" + https-proxy-agent "^7.0.1" is-stream "^2.0.0" - node-fetch "^2.3.0" + node-fetch "^2.6.9" -gaxios@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.2.0.tgz#11b6f0e8fb08d94a10d4d58b044ad3bec6dd486a" - integrity sha512-+6WPeVzPvOshftpxJwRi2Ozez80tn/hdtOUag7+gajDHRJvAblKxTFSSMPtr2hmnLy7p0mvYz0rMXLBl8pSO7Q== - 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" - -gcp-metadata@^3.4.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-3.5.0.tgz#6d28343f65a6bbf8449886a0c0e4a71c77577055" - integrity sha512-ZQf+DLZ5aKcRpLzYUyBS3yo3N0JSa82lNDO8rj3nMSlovLcz2riKFBsYgDzeXcv75oo5eqB2lx+B14UvPoCRnA== +gcp-metadata@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-6.1.0.tgz#9b0dd2b2445258e7597f2024332d20611cbd6b8c" + integrity sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg== dependencies: - gaxios "^2.1.0" - json-bigint "^0.3.0" + gaxios "^6.0.0" + json-bigint "^1.0.0" -gcs-resumable-upload@^2.2.4: - version "2.3.3" - resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-2.3.3.tgz#02c616ed17eff6676e789910aeab3907d412c5f8" - integrity sha512-sf896I5CC/1AxeaGfSFg3vKMjUq/r+A3bscmVzZm10CElyRanN0XwPu/MxeIO4LSP+9uF6yKzXvNsaTsMXUG6Q== - dependencies: - abort-controller "^3.0.0" - configstore "^5.0.0" - gaxios "^2.0.0" - google-auth-library "^5.0.0" - pumpify "^2.0.0" - stream-events "^1.0.4" +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.1, get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -1423,63 +1406,43 @@ globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" -google-auth-library@^5.0.0, google-auth-library@^5.5.0: - version "5.10.1" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-5.10.1.tgz#504ec75487ad140e68dd577c21affa363c87ddff" - integrity sha512-rOlaok5vlpV9rSiUu5EpR0vVpc+PhN62oF4RyX/6++DG1VsaulAFEMlDYBLjJDDPI6OcNOCGAKy9UVB/3NIDXg== +google-auth-library@^9.3.0, google-auth-library@^9.6.3: + version "9.7.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.7.0.tgz#dd99a08e2e3f70778de8be4ed8556460e237550a" + integrity sha512-I/AvzBiUXDzLOy4iIZ2W+Zq33W4lcukQv1nl7C8WUA6SQwyQwUwu3waNmWNAvzds//FG8SZ+DnKnW/2k6mQS8A== dependencies: - arrify "^2.0.0" base64-js "^1.3.0" ecdsa-sig-formatter "^1.0.11" - fast-text-encoding "^1.0.0" - gaxios "^2.1.0" - gcp-metadata "^3.4.0" - gtoken "^4.1.0" + gaxios "^6.1.1" + gcp-metadata "^6.1.0" + gtoken "^7.0.0" jws "^4.0.0" - lru-cache "^5.0.0" -google-gax@^1.15.3: - version "1.15.4" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-1.15.4.tgz#dc37dea2a8c58717cd50db40f01b21cbf9da7739" - integrity sha512-Wzl43ueWEKNsLcMJ33sPps179nD7wn6Jcl/P+ZQNS+HxdCJcoQEgJe3AmulsJnatwjBE3pVPIE4HFJNhpRGvUw== +google-gax@^4.0.4: + version "4.3.2" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-4.3.2.tgz#417cbee97f2e68d78f641af19c0f15234c0dbd9c" + integrity sha512-2mw7qgei2LPdtGrmd1zvxQviOcduTnsvAWYzCxhOWXK4IQKmQztHnDQwD0ApB690fBQJemFKSU7DnceAy3RLzw== dependencies: - "@grpc/grpc-js" "~1.3.6" - "@grpc/proto-loader" "^0.5.1" - "@types/fs-extra" "^8.0.1" + "@grpc/grpc-js" "~1.10.0" + "@grpc/proto-loader" "^0.7.0" "@types/long" "^4.0.0" abort-controller "^3.0.0" - duplexify "^3.6.0" - google-auth-library "^5.0.0" - is-stream-ended "^0.1.4" - lodash.at "^4.6.0" - lodash.has "^4.5.2" - node-fetch "^2.6.0" - protobufjs "^6.8.9" - retry-request "^4.0.0" - semver "^6.0.0" - walkdir "^0.4.0" - -google-p12-pem@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-2.0.5.tgz#b1c44164d567ae894f7a19b4ff362a06be5b793b" - integrity sha512-7RLkxwSsMsYh9wQ5Vb2zRtkAHvqPvfoMGag+nugl1noYO7gf0844Yr9TIFA5NEBMAeVt2Z+Imu7CQMp3oNatzQ== - dependencies: - node-forge "^0.10.0" - -graceful-fs@^4.1.2: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - -gtoken@^4.1.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-4.1.4.tgz#925ff1e7df3aaada06611d30ea2d2abf60fcd6a7" - integrity sha512-VxirzD0SWoFUo5p8RDP8Jt2AGyOmyYcT/pOUgDKJCK+iSw0TMqwrVfY37RXTNmoKwrzmDHSk0GMT9FsgVmnVSA== - dependencies: - gaxios "^2.1.0" - google-p12-pem "^2.0.0" + duplexify "^4.0.0" + google-auth-library "^9.3.0" + node-fetch "^2.6.1" + object-hash "^3.0.0" + proto3-json-serializer "^2.0.0" + protobufjs "7.2.6" + retry-request "^7.0.0" + uuid "^9.0.1" + +gtoken@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-7.1.0.tgz#d61b4ebd10132222817f7222b1e6064bd463fc26" + integrity sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw== + dependencies: + gaxios "^6.0.0" jws "^4.0.0" - mime "^2.2.0" has-bigints@^1.0.1: version "1.0.1" @@ -1515,11 +1478,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash-stream-validation@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/hash-stream-validation/-/hash-stream-validation-0.2.4.tgz#ee68b41bf822f7f44db1142ec28ba9ee7ccb7512" - integrity sha512-Gjzu0Xn7IagXVkSu9cSFuK1fqzwtLwFhNhVL8IFJijRNMgUttFbBSIAzKuSIrsFMO1+g1RlsoN49zPIbwPDMGQ== - http-errors@1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" @@ -1536,12 +1494,12 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.5.tgz#d7c30d5d3c90d865b4a2e870181f9d6f22ac7ac5" integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== -http-proxy-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== dependencies: - "@tootallnate/once" "1" + "@tootallnate/once" "2" agent-base "6" debug "4" @@ -1553,6 +1511,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" + integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + dependencies: + agent-base "^7.0.2" + debug "4" + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1586,7 +1552,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1605,14 +1571,6 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-arguments@^1.0.4, is-arguments@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -1640,7 +1598,7 @@ is-core-module@^2.8.0, is-core-module@^2.8.1: dependencies: has "^1.0.3" -is-date-object@^1.0.1, is-date-object@^1.0.2: +is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -1664,11 +1622,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-map@^2.0.1, is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== - is-negative-zero@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -1681,12 +1634,7 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" -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-regex@^1.1.1, is-regex@^1.1.4: +is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -1694,21 +1642,11 @@ is-regex@^1.1.1, is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-set@^2.0.1, is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== - is-shared-array-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== -is-stream-ended@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" - integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== - is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" @@ -1728,27 +1666,6 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.8.tgz#cbaa6585dc7db43318bc5b89523ea384a6f65e79" - integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - -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-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - is-weakref@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -1756,29 +1673,16 @@ is-weakref@^1.0.1: dependencies: call-bind "^1.0.2" -is-weakset@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" - integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +jose@^4.14.6: + version "4.15.5" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706" + integrity sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -1792,10 +1696,10 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -json-bigint@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.1.tgz#0c1729d679f580d550899d6a2226c228564afe60" - integrity sha512-DGWnSzmusIreWlEupsUelHrhwmPPE+FiQvg+drKfk2p+bdEYa5mp4PJ8JsCWqae0M2jQNb0HPvnwvf1qOTThzQ== +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" @@ -1837,6 +1741,22 @@ jsonwebtoken@^8.5.1: ms "^2.1.1" semver "^5.6.0" +jsonwebtoken@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -1855,6 +1775,18 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" +jwks-rsa@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jwks-rsa/-/jwks-rsa-3.1.0.tgz#50406f23e38c9b2682cd437f824d7d61aa983171" + integrity sha512-v7nqlfezb9YfHHzYII3ef2a2j1XnGeSE/bK3WfumaYCqONAIstJbrEGapz4kadScZzEt7zYCN7bucj8C0Mv/Rg== + dependencies: + "@types/express" "^4.17.17" + "@types/jsonwebtoken" "^9.0.2" + debug "^4.3.4" + jose "^4.14.6" + limiter "^1.1.5" + lru-memoizer "^2.2.0" + jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" @@ -1879,6 +1811,11 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +limiter@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" + integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -1887,20 +1824,15 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash.at@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.at/-/lodash.at-4.6.0.tgz#93cdce664f0a1994ea33dd7cd40e23afd11b0ff8" - integrity sha1-k83OZk8KGZTqM9181A4jr9EbD/g= - 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.has@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" - integrity sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI= +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== lodash.includes@^4.3.0: version "4.3.0" @@ -1952,23 +1884,11 @@ lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.5: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -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== - long@^5.0.0: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== -lru-cache@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - 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" @@ -1976,6 +1896,22 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + integrity sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw== + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +lru-memoizer@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/lru-memoizer/-/lru-memoizer-2.2.0.tgz#b9d90c91637b4b1a423ef76f3156566691293df8" + integrity sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw== + dependencies: + lodash.clonedeep "^4.5.0" + lru-cache "~4.0.0" + mailtrap@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/mailtrap/-/mailtrap-3.3.0.tgz#c11462f7dec8897f609499beb75a98f8687620f8" @@ -1983,13 +1919,6 @@ mailtrap@^3.3.0: dependencies: axios ">=0.27" -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" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -2034,15 +1963,10 @@ 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: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== minimatch@^3.0.4: version "3.1.2" @@ -2081,41 +2005,33 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +node-fetch@^2.6.1, node-fetch@^2.6.9: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" -node-forge@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" - integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== - -node-forge@^0.7.6: - version "0.7.6" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" - integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== +node-forge@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.12.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== -object-is@^1.1.4: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -2147,20 +2063,13 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, 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" -onetime@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -2180,12 +2089,12 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== +p-limit@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - p-try "^2.0.0" + yocto-queue "^0.1.0" p-locate@^2.0.0: version "2.0.0" @@ -2199,11 +2108,6 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -2251,36 +2155,19 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -protobufjs@^6.8.6, protobufjs@^6.8.9: - version "6.11.4" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" - integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== +proto3-json-serializer@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/proto3-json-serializer/-/proto3-json-serializer-2.0.1.tgz#da0b510f6d6e584b1b5c271f045c26728abe71e0" + integrity sha512-8awBvjO+FwkMd6gNoGFZyqkHZXCFd54CIYTb6De7dPaufGJ2XNW+QUNqbMr8MaAocMdb+KpsD4rxEOaTBDCffA== 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" + protobufjs "^7.2.5" -protobufjs@^7.2.2: +protobufjs@7.2.6, protobufjs@^7.2.2, protobufjs@^7.2.4, protobufjs@^7.2.5: version "7.2.6" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== @@ -2311,22 +2198,10 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -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" - -pumpify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-2.0.1.tgz#abfc7b5a621307c728b551decbbefb51f0e4aa1e" - integrity sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw== - dependencies: - duplexify "^4.1.1" - inherits "^2.0.3" - pump "^3.0.0" +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== punycode@^2.1.0: version "2.1.1" @@ -2374,7 +2249,7 @@ raw-body@2.4.3: iconv-lite "0.4.24" unpipe "1.0.0" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0: +readable-stream@^3.1.1: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -2383,32 +2258,16 @@ raw-body@2.4.3: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -regexp.prototype.flags@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" - integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - regexpp@^3.0.0, regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" @@ -2433,13 +2292,19 @@ resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -retry-request@^4.0.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.2.2.tgz#b7d82210b6d2651ed249ba3497f07ea602f1a903" - integrity sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg== +retry-request@^7.0.0: + version "7.0.2" + resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-7.0.2.tgz#60bf48cfb424ec01b03fca6665dee91d06dd95f3" + integrity sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w== dependencies: - debug "^4.1.1" + "@types/request" "^2.48.8" extend "^3.0.2" + teeny-request "^9.0.0" + +retry@0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== rimraf@^3.0.2: version "3.0.2" @@ -2458,11 +2323,6 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -2478,11 +2338,6 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - semver@^7.2.1, semver@^7.3.2: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" @@ -2490,6 +2345,13 @@ semver@^7.2.1, semver@^7.3.2: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + send@0.17.2: version "0.17.2" resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" @@ -2536,7 +2398,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.3, side-channel@^1.0.4: +side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== @@ -2545,11 +2407,6 @@ side-channel@^1.0.3, side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -2559,11 +2416,6 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -snakeize@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/snakeize/-/snakeize-0.1.0.tgz#10c088d8b58eb076b3229bb5a04e232ce126422d" - integrity sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0= - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -2574,24 +2426,19 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stream-events@^1.0.1, stream-events@^1.0.4, stream-events@^1.0.5: +stream-events@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== dependencies: stubs "^3.0.0" -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +stream-shift@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== -string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2623,13 +2470,6 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -2647,6 +2487,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strnum@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + stubs@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" @@ -2682,30 +2527,27 @@ table@^6.0.9: string-width "^4.2.3" strip-ansi "^6.0.1" -teeny-request@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.3.tgz#b617f9d5b7ba95c76a3f257f6ba2342b70228b1f" - integrity sha512-TZG/dfd2r6yeji19es1cUIwAlVD8y+/svB1kAC2Y0bjEyysrfbO8EZvJBRwIE6WkwmUoB7uvWLwTIhJbMXZ1Dw== +teeny-request@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-9.0.0.tgz#18140de2eb6595771b1b02203312dfad79a4716d" + integrity sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g== dependencies: - http-proxy-agent "^4.0.0" + http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.0" - node-fetch "^2.2.0" + node-fetch "^2.6.9" stream-events "^1.0.5" - uuid "^7.0.0" + uuid "^9.0.0" + +text-decoding@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-decoding/-/text-decoding-1.0.0.tgz#38a5692d23b5c2b12942d6e245599cb58b1bc52f" + integrity sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA== text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -through2@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" - integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== - dependencies: - inherits "^2.0.4" - readable-stream "2 || 3" - toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" @@ -2726,11 +2568,16 @@ tsconfig-paths@^3.12.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.11.1, tslib@^1.8.1: +tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsutils@^3.17.1: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -2775,18 +2622,6 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -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" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - typescript@4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" @@ -2802,12 +2637,10 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" -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" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" @@ -2829,7 +2662,7 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -2839,10 +2672,15 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^7.0.0: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== +uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^9.0.0, uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-compile-cache@^2.0.3: version "2.3.0" @@ -2854,11 +2692,6 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -walkdir@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.4.1.tgz#dc119f83f4421df52e3061e514228a2db20afa39" - integrity sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ== - weak-map@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" @@ -2891,7 +2724,7 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which-boxed-primitive@^1.0.1, which-boxed-primitive@^1.0.2: +which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== @@ -2902,28 +2735,6 @@ which-boxed-primitive@^1.0.1, which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== - dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" - -which-typed-array@^1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.7.tgz#2761799b9a22d4b8660b3c1b40abaa7739691793" - integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.7" - which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -2936,37 +2747,59 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + 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" 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== - xmlbuilder@^13.0.2: version "13.0.2" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/package.json b/package.json index d48816b38..0525dff53 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "chai": "^4.2.0", "firebase": "^8.0.1", "firebase-admin": "^9.3.0", - "firebase-functions": "^3.11.0", + "firebase-functions": "^4.8.2", "history": "^4.10.1", "linkifyjs": "^2.1.9", "lodash": "^4.17.15", diff --git a/yarn.lock b/yarn.lock index 83e028104..0e6503034 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7695,16 +7695,16 @@ firebase-admin@^9.3.0: "@google-cloud/firestore" "^4.5.0" "@google-cloud/storage" "^5.3.0" -firebase-functions@^3.11.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-3.16.0.tgz#603e47c2a563a5d0d1bc28f7362d0349c2f0d33f" - integrity sha512-6ISOn0JckMtpA3aJ/+wCCGhThUhBUrpZD+tSkUeolx0Vr+NoYFXA0+2YzJZa/A2MDU8gotPzUtnauLSEQvfClQ== +firebase-functions@^4.8.2: + version "4.8.2" + resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-4.8.2.tgz#dde3a154d45a1dcb372f0b5c45d06693662ab701" + integrity sha512-1M86Wu6IoE5f+r8QithaBFnkzygejh6OhaCz3p3dGjl+3lvL/9Xbm8GovZWZRmZzJ1nzb4dZpXWCalunLwZtOg== dependencies: "@types/cors" "^2.8.5" "@types/express" "4.17.3" cors "^2.8.5" express "^4.17.1" - lodash "^4.17.14" + protobufjs "^7.2.2" firebase-tools@^7.13.1: version "7.16.2" @@ -10966,6 +10966,11 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + 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" @@ -13237,6 +13242,24 @@ protobufjs@^6.10.0, protobufjs@^6.11.2, protobufjs@^6.8.1, protobufjs@^6.8.6, pr "@types/node" ">=13.7.0" long "^4.0.0" +protobufjs@^7.2.2: + version "7.2.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== + 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/node" ">=13.7.0" + long "^5.0.0" + proxy-addr@~2.0.5: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" From 273ca39493151e00a6ca39bfad5a0f2d4a5a370b Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 17:49:02 -0400 Subject: [PATCH 13/17] add dev testing script --- functions/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/package.json b/functions/package.json index ff70a61c0..6c6f5de7c 100644 --- a/functions/package.json +++ b/functions/package.json @@ -3,6 +3,7 @@ "scripts": { "lint": "eslint 'src/**/*'", "build": "tsc", + "dev": "npm run build && firebase emulators:start --inspect-functions --only functions", "serve": "npm run build && firebase emulators:start --only functions", "shell": "npm run build && firebase functions:shell", "start": "npm run shell", From 5bc4a0c78ba130d412f166fa592720c1989a674d Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 17:50:15 -0400 Subject: [PATCH 14/17] add runtime config to gitignore --- functions/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/.gitignore b/functions/.gitignore index 5ecd88ed8..3da5a95d1 100644 --- a/functions/.gitignore +++ b/functions/.gitignore @@ -7,3 +7,6 @@ typings/ # Node.js dependency directory node_modules/ + +# local runtime config for Twilio +.runtimeconfig.json \ No newline at end of file From 4987f461967fe00d828f2c9c4cb88181246db88f Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 22:35:47 -0400 Subject: [PATCH 15/17] shifted to .env secrets, firebase node v18 runtime, twilio secrets initialized in function call, disable eslint no logging --- firebase.json | 8 +- functions/src/index.ts | 907 +++++++++++++++++++++-------------------- 2 files changed, 460 insertions(+), 455 deletions(-) diff --git a/firebase.json b/firebase.json index ef7b1e870..78cedec97 100644 --- a/firebase.json +++ b/firebase.json @@ -29,7 +29,8 @@ "yarn --cwd \"$RESOURCE_DIR\" lint", "yarn --cwd \"$RESOURCE_DIR\" build" ], - "source": "functions" + "source": "functions", + "runtime": "nodejs18" }, "emulators": { "functions": { @@ -39,10 +40,11 @@ "port": 8080 }, "hosting": { - "port": 5000 + "port": 5005 }, "ui": { "enabled": true } } -} + } + \ No newline at end of file diff --git a/functions/src/index.ts b/functions/src/index.ts index 1bc2ef4a0..d0e968a5c 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -9,296 +9,296 @@ admin.initializeApp(); const db = admin.firestore(); -// Twilio Setup -const accountSid = functions.config().twilio.accountsid; -const authToken = functions.config().twilio.twilio_auth_token; -const twilioNumber = functions.config().twilio.twilionumber; - -const client = new Twilio(accountSid, authToken); - /** - * Function that handles data and sends a text message to a requested phone number - */ +* Function that handles data and sends a text message to a requested phone number +*/ async function sendSMS (user: FireUser, message: string) { - if(process.env.DATABASE === "staging") { - return; - } - const userPhone = user.phoneNumber; - if (userPhone === "Dummy number" || userPhone === undefined) - return; - try { - await client.messages - .create({ - from: twilioNumber, - to: userPhone, - body: `[QueueMeIn] ${message}`.replace(/\s+/g, " "), - }).then(msg => { - functions.logger.log(msg); - }); - } catch (error) { - functions.logger.log(error); - } + // Twilio Setup + const accountSid = process.env.ACCOUNTSID as string; + const authToken = process.env.TWILIO_AUTH_TOKEN as string; + const twilioNumber = process.env.TWILIO_NUMBER; + + const client = new Twilio(accountSid, authToken); + + if(process.env.DATABASE === "staging") { + return; + } + const userPhone = user.phoneNumber; + if (userPhone === "Dummy number" || userPhone === undefined) + return; + try { + await client.messages + .create({ + from: twilioNumber, + to: userPhone, + body: `[QueueMeIn] ${message}`.replace(/\s+/g, " "), + }).then(msg => { + functions.logger.log(msg); + }); + } catch (error) { + functions.logger.log(error); + } } /** Adds new roles to a user without them being in QMI's system - * Not inclusive: Still need to consider users that are - * already in the system. (THIS CASE IS HANDLED BY NOT INCLDUING THEM IN THE - * pendingUsers COLLECTION IN THE FIRST PLACE) - */ +* Not inclusive: Still need to consider users that are +* already in the system. (THIS CASE IS HANDLED BY NOT INCLDUING THEM IN THE +* pendingUsers COLLECTION IN THE FIRST PLACE) +*/ exports.onUserCreate = functions.firestore - .document('users/{userId}') - .onCreate(async (snap, context) => { - const userId = context.params.userId; + .document('users/{userId}') + .onCreate(async (snap, context) => { + const userId = context.params.userId; - // get the user doc - const userRef = db.collection('users').doc(userId); - const userDoc = await userRef.get(); - const user = userDoc.data() as FireUser; + // get the user doc + const userRef = db.collection('users').doc(userId); + const userDoc = await userRef.get(); + const user = userDoc.data() as FireUser; - const currentRoles = user.roles; - const email = user.email; + const currentRoles = user.roles; + const email = user.email; - // match this email with a user in the pendingUsers collection - const pendingUsersSnap = await db.collection('pendingUsers').where('email', '==', email).get(); + // match this email with a user in the pendingUsers collection + const pendingUsersSnap = await db.collection('pendingUsers').where('email', '==', email).get(); - pendingUsersSnap.forEach(async doc => { + pendingUsersSnap.forEach(async doc => { - // delete the pendingUsers entry because they now exist in QMI... - await db.collection('pendingUsers').doc(doc.id).delete(); + // delete the pendingUsers entry because they now exist in QMI... + await db.collection('pendingUsers').doc(doc.id).delete(); - // get the users's roles map as a Map - const newRoles = (doc.data() as FirePendingUser).roles; - const taCourseIds: string[] = []; - const profCourseIds: string[] = []; + // get the users's roles map as a Map + const newRoles = (doc.data() as FirePendingUser).roles; + const taCourseIds: string[] = []; + const profCourseIds: string[] = []; - for (const [courseId, role] of Object.entries(newRoles)) { + for (const [courseId, role] of Object.entries(newRoles)) { - if (role === 'ta') { - taCourseIds.push(courseId); - } else if (role === 'professor') { - profCourseIds.push(courseId); - } - } + if (role === 'ta') { + taCourseIds.push(courseId); + } else if (role === 'professor') { + profCourseIds.push(courseId); + } + } - const batch = db.batch(); + const batch = db.batch(); - // and update the newly-created user with their new roles - userRef.update({ - courses: [...taCourseIds, ...profCourseIds], - roles: { ...currentRoles, ...newRoles } - }) + // and update the newly-created user with their new roles + userRef.update({ + courses: [...taCourseIds, ...profCourseIds], + roles: { ...currentRoles, ...newRoles } + }) - const taCourseDocs = await Promise.all( - taCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); + const taCourseDocs = await Promise.all( + taCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); - const profCourseDocs = await Promise.all( - profCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); - taCourseDocs.forEach((taDoc, index) => { - if (!taDoc.exists) { - functions.logger.error('ta course doc does not exist.') - } + const profCourseDocs = await Promise.all( + profCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); + taCourseDocs.forEach((taDoc, index) => { + if (!taDoc.exists) { + functions.logger.error('ta course doc does not exist.') + } - const courseId = taCourseIds[index]; + const courseId = taCourseIds[index]; - // const course = doc.data() as FireCourse; - batch.update( - db.collection('courses').doc(courseId), - { tas: admin.firestore.FieldValue.arrayUnion(userId) } - ); - }); + // const course = doc.data() as FireCourse; + batch.update( + db.collection('courses').doc(courseId), + { tas: admin.firestore.FieldValue.arrayUnion(userId) } + ); + }); - profCourseDocs.forEach((pfDoc, index) => { - if (!pfDoc.exists) { - functions.logger.error('prof course doc does not exist.') - } + profCourseDocs.forEach((pfDoc, index) => { + if (!pfDoc.exists) { + functions.logger.error('prof course doc does not exist.') + } - const courseId = profCourseIds[index]; - // const course = doc.data() as FireCourse; - batch.update( - db.collection('courses').doc(courseId), - { professors: admin.firestore.FieldValue.arrayUnion(userId) } - ); - }); + const courseId = profCourseIds[index]; + // const course = doc.data() as FireCourse; + batch.update( + db.collection('courses').doc(courseId), + { professors: admin.firestore.FieldValue.arrayUnion(userId) } + ); + }); - await batch.commit(); - }); + await batch.commit(); + }); - }); + }); exports.onCommentCreate = functions.firestore - .document(`questions/{questionId}/comments/{commentId}`) - .onCreate(async (snap) => { - const data = snap.data(); - const askerId = data.askerId; - const answererId = data.answererId; - const commenterId = data.commenterId; - const asker: FireUser = (await db.doc(`users/${askerId}`).get()).data() as FireUser; - if(askerId === commenterId && answererId !== "") { - const answerer: FireUser = (await db.doc(`users/${answererId}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${answerer.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Student comment', - subtitle: "New student comment", - message: `${asker.firstName} commented \ - on your assigned question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${answerer.email}`).create({id: answerer.email, - notificationList: [{ - title: 'Student comment', - subtitle: "New student comment", - message: `${asker.firstName} commented \ - on your assigned question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }); - } else { - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA comment', - subtitle: 'New TA comment', - message: `A TA commented on your question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA comment', - subtitle: 'New TA comment', - message: `A TA commented on your question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }); - } - }) + .document(`questions/{questionId}/comments/{commentId}`) + .onCreate(async (snap) => { + const data = snap.data(); + const askerId = data.askerId; + const answererId = data.answererId; + const commenterId = data.commenterId; + const asker: FireUser = (await db.doc(`users/${askerId}`).get()).data() as FireUser; + if(askerId === commenterId && answererId !== "") { + const answerer: FireUser = (await db.doc(`users/${answererId}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${answerer.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Student comment', + subtitle: "New student comment", + message: `${asker.firstName} commented \ + on your assigned question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${answerer.email}`).create({id: answerer.email, + notificationList: [{ + title: 'Student comment', + subtitle: "New student comment", + message: `${asker.firstName} commented \ + on your assigned question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }); + } else { + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA comment', + subtitle: 'New TA comment', + message: `A TA commented on your question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA comment', + subtitle: 'New TA comment', + message: `A TA commented on your question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }); + } + }) exports.onSessionUpdate = functions.firestore - .document('sessions/{sessionId}') - .onUpdate(async (change) => { - // retrieve session id and ordered queue of active questions - const afterSessionId = change.after.id; - const afterQuestions = (await db.collection('questions') - .where('sessionId', '==', afterSessionId) - .where('status', 'in', ['assigned', 'unresolved']) - .orderBy('timeEntered', 'asc').get()).docs; - - const sessionName: string | undefined= (change.after.data() as FireSession).title - - const topQuestion: FireQuestion = (afterQuestions[0].data() as FireQuestion); - - // if the top active question was not notified, notify them - if (!topQuestion.wasNotified) { - const asker: FireUser = (await db.doc(`users/${topQuestion.askerId}`) - .get()).data() as FireUser; - sendSMS(asker, `Your question has reached the top of the \ - ${sessionName} queue. A TA will likely help you shortly.`); - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Your Question is Up!', - subtitle: `Your question has reached the top of the \ - ${sessionName} queue.`, - message: `Your question has reached the top of the \ - ${sessionName} queue. A TA will likely help you shortly.`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Your Question is Up!', - subtitle: `Your question has reached the top of the \ - ${sessionName} queue.`, - message: `Your question has reached the top of the \ - ${sessionName} queue. A TA will likely help you shortly.`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }); - db.doc(`questions/${afterQuestions[0].id}`).update({ - wasNotified: true - }) - } - }) + .document('sessions/{sessionId}') + .onUpdate(async (change) => { + // retrieve session id and ordered queue of active questions + const afterSessionId = change.after.id; + const afterQuestions = (await db.collection('questions') + .where('sessionId', '==', afterSessionId) + .where('status', 'in', ['assigned', 'unresolved']) + .orderBy('timeEntered', 'asc').get()).docs; + + const sessionName: string | undefined= (change.after.data() as FireSession).title + + const topQuestion: FireQuestion = (afterQuestions[0].data() as FireQuestion); + + // if the top active question was not notified, notify them + if (!topQuestion.wasNotified) { + const asker: FireUser = (await db.doc(`users/${topQuestion.askerId}`) + .get()).data() as FireUser; + sendSMS(asker, `Your question has reached the top of the \ + ${sessionName} queue. A TA will likely help you shortly.`); + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Your Question is Up!', + subtitle: `Your question has reached the top of the \ + ${sessionName} queue.`, + message: `Your question has reached the top of the \ + ${sessionName} queue. A TA will likely help you shortly.`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Your Question is Up!', + subtitle: `Your question has reached the top of the \ + ${sessionName} queue.`, + message: `Your question has reached the top of the \ + ${sessionName} queue. A TA will likely help you shortly.`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }); + db.doc(`questions/${afterQuestions[0].id}`).update({ + wasNotified: true + }) + } + }) exports.onQuestionCreate = functions.firestore - .document('questions/{questionId}') - .onCreate(async (snap) => { - // Get data object and obtain session/course - const data = snap.data(); - const sessionId = data.sessionId; - const session = (await db.collection('sessions').doc(sessionId).get()).data() as FireSession; - const course = (await db.collection('courses').doc(session.courseId).get()).data() as FireCourse; - - // Increment total number of questions of relevant session - const increment = admin.firestore.FieldValue.increment(1); - - // Add new question notification for all TAs - course.tas.forEach(async ta => { - const user: FireUser = (await db.doc(`users/${ta}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${user.email}`).update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${user.email}`).create({id: user.email, - notificationList: [{ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }) - }); - - // Add new question notification for all Professors - course.professors.forEach(async professor => { - const user: FireUser = (await db.doc(`users/${professor}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${user.email}`).update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${user.email}`).create({id: user.email, - notificationList: [{ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + .document('questions/{questionId}') + .onCreate(async (snap) => { + // Get data object and obtain session/course + const data = snap.data(); + const sessionId = data.sessionId; + const session = (await db.collection('sessions').doc(sessionId).get()).data() as FireSession; + const course = (await db.collection('courses').doc(session.courseId).get()).data() as FireCourse; + + // Increment total number of questions of relevant session + const increment = admin.firestore.FieldValue.increment(1); + + // Add new question notification for all TAs + course.tas.forEach(async ta => { + const user: FireUser = (await db.doc(`users/${ta}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${user.email}`).update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${user.email}`).create({id: user.email, + notificationList: [{ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }) - }); - return db.doc(`sessions/${sessionId}`).update({ - totalQuestions: increment, - }); - }); + }) + }); + + // Add new question notification for all Professors + course.professors.forEach(async professor => { + const user: FireUser = (await db.doc(`users/${professor}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${user.email}`).update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${user.email}`).create({id: user.email, + notificationList: [{ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }) + }); + return db.doc(`sessions/${sessionId}`).update({ + totalQuestions: increment, + }); + }); // This map maps a question status to a tuple of // 1. The number of questions this counts as (0 if no show or retracted) @@ -312,200 +312,203 @@ questionStatusNumbers.set("unresolved", [1, 0, 0]); questionStatusNumbers.set("no-show", [0, 0, 0]); exports.onQuestionUpdate = functions.firestore - .document('questions/{questionId}') - .onUpdate(async (change) => { - // retrieve old and new questions - const newQuestion: FireQuestion = change.after.data() as FireQuestion; - const prevQuestion: FireQuestion = change.before.data() as FireQuestion; - - // Derive session ID - const sessionId = newQuestion.sessionId; - - // Derive changes in counts - const newStatus = newQuestion.status; - const prevStatus = prevQuestion.status; - const newNumbers = questionStatusNumbers.get(newStatus)!; - const prevNumbers = questionStatusNumbers.get(prevStatus)!; - - // Grab number of changes - const numQuestionChange = newNumbers[0] - prevNumbers[0]; - const numAssignedChange = newNumbers[1] - prevNumbers[1]; - const numResolvedChange = newNumbers[2] - prevNumbers[2]; - - let waitTimeChange = 0; - let resolveTimeChange = 0; - - // Derive timing changes (changes from assigned to unassigned) - if (numAssignedChange === 1 && newQuestion.timeAssigned !== undefined) { - // Add new time addressed - waitTimeChange = - (newQuestion.timeAssigned.seconds - newQuestion.timeEntered.seconds) - / (newQuestion.position || 1); - } - else if (numAssignedChange === -1 && prevQuestion.timeAssigned !== undefined) { - // Subtract previous time addressed - waitTimeChange = - (prevQuestion.timeEntered.seconds - prevQuestion.timeAssigned.seconds) - / (newQuestion.position || 1); - } - - // Derive timing changes (changes from assigned to resolved) - if (numResolvedChange === 1 && newQuestion.timeAssigned !== undefined) { - resolveTimeChange = newQuestion.timeAddressed!.seconds - newQuestion.timeAssigned.seconds; - } - else if (numResolvedChange === -1 - && prevQuestion.timeAssigned !== undefined - && prevQuestion.timeAddressed !== undefined - ) { - resolveTimeChange = prevQuestion.timeAssigned.seconds - prevQuestion.timeAddressed.seconds; - } - - // Figure out who needs to be updated with a notification based on the changes - const asker: FireUser = (await db.doc(`users/${newQuestion.askerId}`).get()).data() as FireUser; - - if ( - prevQuestion.answererId !== newQuestion.answererId && - newQuestion.answererId !== '' - ) { - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA Assigned', - subtitle: 'TA Assigned', - message: 'A TA has been assigned to your question', - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA Assigned', - subtitle: 'TA Assigned', - message: 'A TA has been assigned to your question', - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }); - } - - if ( - prevQuestion.answererId !== newQuestion.answererId && - newQuestion.answererId === '' - ) { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA Unassigned', - subtitle: 'TA Unassigned', - message: - `A TA has been unassigned from your question and you have \ - been readded to the top of the ${session.title} queue.`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA Unassigned', - subtitle: 'TA Unassigned', - message: - `A TA has been unassigned from your question and you have \ - been readded to the top of the ${session.title} queue.`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) - - }); - } - else if (newQuestion.status === 'resolved') { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Question resolved', - subtitle: 'Question marked as resolved', - message: - `A TA has marked your question as resolved and you \ - have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: - `A TA has marked your question as no-show and you \ - have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + .document('questions/{questionId}') + .onUpdate(async (change) => { + // retrieve old and new questions + const newQuestion: FireQuestion = change.after.data() as FireQuestion; + const prevQuestion: FireQuestion = change.before.data() as FireQuestion; + + // Derive session ID + const sessionId = newQuestion.sessionId; + + // Derive changes in counts + const newStatus = newQuestion.status; + const prevStatus = prevQuestion.status; + const newNumbers = questionStatusNumbers.get(newStatus)!; + const prevNumbers = questionStatusNumbers.get(prevStatus)!; + + // Grab number of changes + const numQuestionChange = newNumbers[0] - prevNumbers[0]; + const numAssignedChange = newNumbers[1] - prevNumbers[1]; + const numResolvedChange = newNumbers[2] - prevNumbers[2]; + + let waitTimeChange = 0; + let resolveTimeChange = 0; + + // Derive timing changes (changes from assigned to unassigned) + if (numAssignedChange === 1 && newQuestion.timeAssigned !== undefined) { + // Add new time addressed + waitTimeChange = + (newQuestion.timeAssigned.seconds - newQuestion.timeEntered.seconds) + / (newQuestion.position || 1); + } + else if (numAssignedChange === -1 && prevQuestion.timeAssigned !== undefined) { + // Subtract previous time addressed + waitTimeChange = + (prevQuestion.timeEntered.seconds - prevQuestion.timeAssigned.seconds) + / (newQuestion.position || 1); + } + + // Derive timing changes (changes from assigned to resolved) + if (numResolvedChange === 1 && newQuestion.timeAssigned !== undefined) { + resolveTimeChange = newQuestion.timeAddressed!.seconds - newQuestion.timeAssigned.seconds; + } + else if (numResolvedChange === -1 + && prevQuestion.timeAssigned !== undefined + && prevQuestion.timeAddressed !== undefined + ) { + resolveTimeChange = prevQuestion.timeAssigned.seconds - prevQuestion.timeAddressed.seconds; + } + + // Figure out who needs to be updated with a notification based on the changes + const asker: FireUser = (await db.doc(`users/${newQuestion.askerId}`).get()).data() as FireUser; + + if ( + prevQuestion.answererId !== newQuestion.answererId && + newQuestion.answererId !== '' + ) { + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA Assigned', + subtitle: 'TA Assigned', + message: 'A TA has been assigned to your question', + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA Assigned', + subtitle: 'TA Assigned', + message: 'A TA has been assigned to your question', + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } else if (newQuestion.status === "no-show") { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: - `A TA has marked your question as no-show and you \ - have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: - `A TA has marked your question as no-show and you \ - have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + }); + } + + if ( + prevQuestion.answererId !== newQuestion.answererId && + newQuestion.answererId === '' + ) { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA Unassigned', + subtitle: 'TA Unassigned', + message: + `A TA has been unassigned from your question and you have \ + been readded to the top of the ${session.title} queue.`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA Unassigned', + subtitle: 'TA Unassigned', + message: + `A TA has been unassigned from your question and you have \ + been readded to the top of the ${session.title} queue.`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } - - // Update relevant statistics in database - return db.doc(`sessions/${sessionId}`).update({ - totalQuestions: admin.firestore.FieldValue.increment(numQuestionChange), - assignedQuestions: admin.firestore.FieldValue.increment(numAssignedChange), - resolvedQuestions: admin.firestore.FieldValue.increment(numResolvedChange), - totalWaitTime: admin.firestore.FieldValue.increment(waitTimeChange), - totalResolveTime: admin.firestore.FieldValue.increment(resolveTimeChange), - }); - }); + }); + } + else if (newQuestion.status === 'resolved') { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Question resolved', + subtitle: 'Question marked as resolved', + message: + `A TA has marked your question as resolved and you \ + have been removed from the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: + `A TA has marked your question as no-show and you \ + have been removed from the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }); + } else if (newQuestion.status === "no-show") { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: + `A TA has marked your question as no-show and you \ + have been removed from the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: + `A TA has marked your question as no-show and you \ + have been removed from the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) + + }); + } + + // Update relevant statistics in database + return db.doc(`sessions/${sessionId}`).update({ + totalQuestions: admin.firestore.FieldValue.increment(numQuestionChange), + assignedQuestions: admin.firestore.FieldValue.increment(numAssignedChange), + resolvedQuestions: admin.firestore.FieldValue.increment(numResolvedChange), + totalWaitTime: admin.firestore.FieldValue.increment(waitTimeChange), + totalResolveTime: admin.firestore.FieldValue.increment(resolveTimeChange), + }); + }); exports.onPendingUserCreate = functions.firestore - .document('pendingUsers/{userEmail}') - .onCreate(async (snap, context) => { - const userEmail = context.params.userEmail - const mailtrapClient = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); - const sender = { - email: "mailtrap@queueme.in", - name: "QueueMeIn Team" - } - const recipient = [{ - email: userEmail - }] - - mailtrapClient.send({ - from: sender, - to: recipient, - subject: "You've been invited to QueueMeIn!", - text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", - category: "QMI Invite – Test", - }) - - }); \ No newline at end of file + .document('pendingUsers/{userEmail}') + .onCreate(async (snap, context) => { + const userEmail = context.params.userEmail + const mailtrapClient = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); + const sender = { + email: "mailtrap@queueme.in", + name: "QueueMeIn Team" + } + const recipient = [{ + email: userEmail + }] + + try { + await mailtrapClient.send({ + from: sender, + to: recipient, + subject: "You've been invited to QueueMeIn!", + text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", + category: "QMI Invite – Test", + }); + } catch (error) { + console.log("error sending mail: ", error) + } + }); From c6fae9a0edf37ceb398bdb0fd8d01c14b8d17e6f Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Sat, 30 Mar 2024 22:44:12 -0400 Subject: [PATCH 16/17] working dev version! ran eslint to fix spacing --- functions/package.json | 1 + functions/src/index.ts | 824 ++++++++++++++++++++--------------------- 2 files changed, 413 insertions(+), 412 deletions(-) diff --git a/functions/package.json b/functions/package.json index 6c6f5de7c..d496408fc 100644 --- a/functions/package.json +++ b/functions/package.json @@ -2,6 +2,7 @@ "name": "functions", "scripts": { "lint": "eslint 'src/**/*'", + "lint:fix": "eslint --fix 'src/**/*'", "build": "tsc", "dev": "npm run build && firebase emulators:start --inspect-functions --only functions", "serve": "npm run build && firebase emulators:start --only functions", diff --git a/functions/src/index.ts b/functions/src/index.ts index d0e968a5c..3dd52af6a 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -13,31 +13,31 @@ const db = admin.firestore(); * Function that handles data and sends a text message to a requested phone number */ async function sendSMS (user: FireUser, message: string) { - // Twilio Setup - const accountSid = process.env.ACCOUNTSID as string; - const authToken = process.env.TWILIO_AUTH_TOKEN as string; - const twilioNumber = process.env.TWILIO_NUMBER; - - const client = new Twilio(accountSid, authToken); - - if(process.env.DATABASE === "staging") { - return; - } - const userPhone = user.phoneNumber; - if (userPhone === "Dummy number" || userPhone === undefined) - return; - try { - await client.messages - .create({ - from: twilioNumber, - to: userPhone, - body: `[QueueMeIn] ${message}`.replace(/\s+/g, " "), - }).then(msg => { - functions.logger.log(msg); - }); - } catch (error) { - functions.logger.log(error); - } + // Twilio Setup + const accountSid = process.env.ACCOUNTSID as string; + const authToken = process.env.TWILIO_AUTH_TOKEN as string; + const twilioNumber = process.env.TWILIO_NUMBER; + + const client = new Twilio(accountSid, authToken); + + if(process.env.DATABASE === "staging") { + return; + } + const userPhone = user.phoneNumber; + if (userPhone === "Dummy number" || userPhone === undefined) + return; + try { + await client.messages + .create({ + from: twilioNumber, + to: userPhone, + body: `[QueueMeIn] ${message}`.replace(/\s+/g, " "), + }).then(msg => { + functions.logger.log(msg); + }); + } catch (error) { + functions.logger.log(error); + } } /** Adds new roles to a user without them being in QMI's system @@ -46,259 +46,259 @@ async function sendSMS (user: FireUser, message: string) { * pendingUsers COLLECTION IN THE FIRST PLACE) */ exports.onUserCreate = functions.firestore - .document('users/{userId}') - .onCreate(async (snap, context) => { - const userId = context.params.userId; + .document('users/{userId}') + .onCreate(async (snap, context) => { + const userId = context.params.userId; - // get the user doc - const userRef = db.collection('users').doc(userId); - const userDoc = await userRef.get(); - const user = userDoc.data() as FireUser; + // get the user doc + const userRef = db.collection('users').doc(userId); + const userDoc = await userRef.get(); + const user = userDoc.data() as FireUser; - const currentRoles = user.roles; - const email = user.email; + const currentRoles = user.roles; + const email = user.email; - // match this email with a user in the pendingUsers collection - const pendingUsersSnap = await db.collection('pendingUsers').where('email', '==', email).get(); + // match this email with a user in the pendingUsers collection + const pendingUsersSnap = await db.collection('pendingUsers').where('email', '==', email).get(); - pendingUsersSnap.forEach(async doc => { + pendingUsersSnap.forEach(async doc => { - // delete the pendingUsers entry because they now exist in QMI... - await db.collection('pendingUsers').doc(doc.id).delete(); + // delete the pendingUsers entry because they now exist in QMI... + await db.collection('pendingUsers').doc(doc.id).delete(); - // get the users's roles map as a Map - const newRoles = (doc.data() as FirePendingUser).roles; - const taCourseIds: string[] = []; - const profCourseIds: string[] = []; + // get the users's roles map as a Map + const newRoles = (doc.data() as FirePendingUser).roles; + const taCourseIds: string[] = []; + const profCourseIds: string[] = []; - for (const [courseId, role] of Object.entries(newRoles)) { + for (const [courseId, role] of Object.entries(newRoles)) { - if (role === 'ta') { - taCourseIds.push(courseId); - } else if (role === 'professor') { - profCourseIds.push(courseId); - } - } + if (role === 'ta') { + taCourseIds.push(courseId); + } else if (role === 'professor') { + profCourseIds.push(courseId); + } + } - const batch = db.batch(); + const batch = db.batch(); - // and update the newly-created user with their new roles - userRef.update({ - courses: [...taCourseIds, ...profCourseIds], - roles: { ...currentRoles, ...newRoles } - }) + // and update the newly-created user with their new roles + userRef.update({ + courses: [...taCourseIds, ...profCourseIds], + roles: { ...currentRoles, ...newRoles } + }) - const taCourseDocs = await Promise.all( - taCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); + const taCourseDocs = await Promise.all( + taCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); - const profCourseDocs = await Promise.all( - profCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); - taCourseDocs.forEach((taDoc, index) => { - if (!taDoc.exists) { - functions.logger.error('ta course doc does not exist.') - } + const profCourseDocs = await Promise.all( + profCourseIds.map(courseId => db.collection('courses').doc(courseId).get())); + taCourseDocs.forEach((taDoc, index) => { + if (!taDoc.exists) { + functions.logger.error('ta course doc does not exist.') + } - const courseId = taCourseIds[index]; + const courseId = taCourseIds[index]; - // const course = doc.data() as FireCourse; - batch.update( - db.collection('courses').doc(courseId), - { tas: admin.firestore.FieldValue.arrayUnion(userId) } - ); - }); + // const course = doc.data() as FireCourse; + batch.update( + db.collection('courses').doc(courseId), + { tas: admin.firestore.FieldValue.arrayUnion(userId) } + ); + }); - profCourseDocs.forEach((pfDoc, index) => { - if (!pfDoc.exists) { - functions.logger.error('prof course doc does not exist.') - } + profCourseDocs.forEach((pfDoc, index) => { + if (!pfDoc.exists) { + functions.logger.error('prof course doc does not exist.') + } - const courseId = profCourseIds[index]; - // const course = doc.data() as FireCourse; - batch.update( - db.collection('courses').doc(courseId), - { professors: admin.firestore.FieldValue.arrayUnion(userId) } - ); - }); + const courseId = profCourseIds[index]; + // const course = doc.data() as FireCourse; + batch.update( + db.collection('courses').doc(courseId), + { professors: admin.firestore.FieldValue.arrayUnion(userId) } + ); + }); - await batch.commit(); - }); + await batch.commit(); + }); - }); + }); exports.onCommentCreate = functions.firestore - .document(`questions/{questionId}/comments/{commentId}`) - .onCreate(async (snap) => { - const data = snap.data(); - const askerId = data.askerId; - const answererId = data.answererId; - const commenterId = data.commenterId; - const asker: FireUser = (await db.doc(`users/${askerId}`).get()).data() as FireUser; - if(askerId === commenterId && answererId !== "") { - const answerer: FireUser = (await db.doc(`users/${answererId}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${answerer.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Student comment', - subtitle: "New student comment", - message: `${asker.firstName} commented \ + .document(`questions/{questionId}/comments/{commentId}`) + .onCreate(async (snap) => { + const data = snap.data(); + const askerId = data.askerId; + const answererId = data.answererId; + const commenterId = data.commenterId; + const asker: FireUser = (await db.doc(`users/${askerId}`).get()).data() as FireUser; + if(askerId === commenterId && answererId !== "") { + const answerer: FireUser = (await db.doc(`users/${answererId}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${answerer.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Student comment', + subtitle: "New student comment", + message: `${asker.firstName} commented \ on your assigned question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${answerer.email}`).create({id: answerer.email, - notificationList: [{ - title: 'Student comment', - subtitle: "New student comment", - message: `${asker.firstName} commented \ + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${answerer.email}`).create({id: answerer.email, + notificationList: [{ + title: 'Student comment', + subtitle: "New student comment", + message: `${asker.firstName} commented \ on your assigned question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } else { - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA comment', - subtitle: 'New TA comment', - message: `A TA commented on your question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA comment', - subtitle: 'New TA comment', - message: `A TA commented on your question`.trim(), - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + }); + } else { + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA comment', + subtitle: 'New TA comment', + message: `A TA commented on your question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA comment', + subtitle: 'New TA comment', + message: `A TA commented on your question`.trim(), + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } - }) + }); + } + }) exports.onSessionUpdate = functions.firestore - .document('sessions/{sessionId}') - .onUpdate(async (change) => { - // retrieve session id and ordered queue of active questions - const afterSessionId = change.after.id; - const afterQuestions = (await db.collection('questions') - .where('sessionId', '==', afterSessionId) - .where('status', 'in', ['assigned', 'unresolved']) - .orderBy('timeEntered', 'asc').get()).docs; - - const sessionName: string | undefined= (change.after.data() as FireSession).title - - const topQuestion: FireQuestion = (afterQuestions[0].data() as FireQuestion); - - // if the top active question was not notified, notify them - if (!topQuestion.wasNotified) { - const asker: FireUser = (await db.doc(`users/${topQuestion.askerId}`) - .get()).data() as FireUser; - sendSMS(asker, `Your question has reached the top of the \ + .document('sessions/{sessionId}') + .onUpdate(async (change) => { + // retrieve session id and ordered queue of active questions + const afterSessionId = change.after.id; + const afterQuestions = (await db.collection('questions') + .where('sessionId', '==', afterSessionId) + .where('status', 'in', ['assigned', 'unresolved']) + .orderBy('timeEntered', 'asc').get()).docs; + + const sessionName: string | undefined= (change.after.data() as FireSession).title + + const topQuestion: FireQuestion = (afterQuestions[0].data() as FireQuestion); + + // if the top active question was not notified, notify them + if (!topQuestion.wasNotified) { + const asker: FireUser = (await db.doc(`users/${topQuestion.askerId}`) + .get()).data() as FireUser; + sendSMS(asker, `Your question has reached the top of the \ ${sessionName} queue. A TA will likely help you shortly.`); - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Your Question is Up!', - subtitle: `Your question has reached the top of the \ + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Your Question is Up!', + subtitle: `Your question has reached the top of the \ ${sessionName} queue.`, - message: `Your question has reached the top of the \ + message: `Your question has reached the top of the \ ${sessionName} queue. A TA will likely help you shortly.`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Your Question is Up!', - subtitle: `Your question has reached the top of the \ + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Your Question is Up!', + subtitle: `Your question has reached the top of the \ ${sessionName} queue.`, - message: `Your question has reached the top of the \ + message: `Your question has reached the top of the \ ${sessionName} queue. A TA will likely help you shortly.`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - db.doc(`questions/${afterQuestions[0].id}`).update({ - wasNotified: true - }) - } - }) + }); + db.doc(`questions/${afterQuestions[0].id}`).update({ + wasNotified: true + }) + } + }) exports.onQuestionCreate = functions.firestore - .document('questions/{questionId}') - .onCreate(async (snap) => { - // Get data object and obtain session/course - const data = snap.data(); - const sessionId = data.sessionId; - const session = (await db.collection('sessions').doc(sessionId).get()).data() as FireSession; - const course = (await db.collection('courses').doc(session.courseId).get()).data() as FireCourse; - - // Increment total number of questions of relevant session - const increment = admin.firestore.FieldValue.increment(1); - - // Add new question notification for all TAs - course.tas.forEach(async ta => { - const user: FireUser = (await db.doc(`users/${ta}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${user.email}`).update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${user.email}`).create({id: user.email, - notificationList: [{ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + .document('questions/{questionId}') + .onCreate(async (snap) => { + // Get data object and obtain session/course + const data = snap.data(); + const sessionId = data.sessionId; + const session = (await db.collection('sessions').doc(sessionId).get()).data() as FireSession; + const course = (await db.collection('courses').doc(session.courseId).get()).data() as FireCourse; + + // Increment total number of questions of relevant session + const increment = admin.firestore.FieldValue.increment(1); + + // Add new question notification for all TAs + course.tas.forEach(async ta => { + const user: FireUser = (await db.doc(`users/${ta}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${user.email}`).update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${user.email}`).create({id: user.email, + notificationList: [{ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }) - }); - - // Add new question notification for all Professors - course.professors.forEach(async professor => { - const user: FireUser = (await db.doc(`users/${professor}`).get()).data() as FireUser; - db.doc(`notificationTrackers/${user.email}`).update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${user.email}`).create({id: user.email, - notificationList: [{ - title: 'New Question', - subtitle: `A new question has been added to the ${session.title} queue`, - message: `A new question has been added to the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + }) + }); + + // Add new question notification for all Professors + course.professors.forEach(async professor => { + const user: FireUser = (await db.doc(`users/${professor}`).get()).data() as FireUser; + db.doc(`notificationTrackers/${user.email}`).update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${user.email}`).create({id: user.email, + notificationList: [{ + title: 'New Question', + subtitle: `A new question has been added to the ${session.title} queue`, + message: `A new question has been added to the ${session.title} queue`, + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }) - }); - return db.doc(`sessions/${sessionId}`).update({ - totalQuestions: increment, - }); - }); + }) + }); + return db.doc(`sessions/${sessionId}`).update({ + totalQuestions: increment, + }); + }); // This map maps a question status to a tuple of // 1. The number of questions this counts as (0 if no show or retracted) @@ -312,203 +312,203 @@ questionStatusNumbers.set("unresolved", [1, 0, 0]); questionStatusNumbers.set("no-show", [0, 0, 0]); exports.onQuestionUpdate = functions.firestore - .document('questions/{questionId}') - .onUpdate(async (change) => { - // retrieve old and new questions - const newQuestion: FireQuestion = change.after.data() as FireQuestion; - const prevQuestion: FireQuestion = change.before.data() as FireQuestion; - - // Derive session ID - const sessionId = newQuestion.sessionId; - - // Derive changes in counts - const newStatus = newQuestion.status; - const prevStatus = prevQuestion.status; - const newNumbers = questionStatusNumbers.get(newStatus)!; - const prevNumbers = questionStatusNumbers.get(prevStatus)!; - - // Grab number of changes - const numQuestionChange = newNumbers[0] - prevNumbers[0]; - const numAssignedChange = newNumbers[1] - prevNumbers[1]; - const numResolvedChange = newNumbers[2] - prevNumbers[2]; - - let waitTimeChange = 0; - let resolveTimeChange = 0; - - // Derive timing changes (changes from assigned to unassigned) - if (numAssignedChange === 1 && newQuestion.timeAssigned !== undefined) { - // Add new time addressed - waitTimeChange = + .document('questions/{questionId}') + .onUpdate(async (change) => { + // retrieve old and new questions + const newQuestion: FireQuestion = change.after.data() as FireQuestion; + const prevQuestion: FireQuestion = change.before.data() as FireQuestion; + + // Derive session ID + const sessionId = newQuestion.sessionId; + + // Derive changes in counts + const newStatus = newQuestion.status; + const prevStatus = prevQuestion.status; + const newNumbers = questionStatusNumbers.get(newStatus)!; + const prevNumbers = questionStatusNumbers.get(prevStatus)!; + + // Grab number of changes + const numQuestionChange = newNumbers[0] - prevNumbers[0]; + const numAssignedChange = newNumbers[1] - prevNumbers[1]; + const numResolvedChange = newNumbers[2] - prevNumbers[2]; + + let waitTimeChange = 0; + let resolveTimeChange = 0; + + // Derive timing changes (changes from assigned to unassigned) + if (numAssignedChange === 1 && newQuestion.timeAssigned !== undefined) { + // Add new time addressed + waitTimeChange = (newQuestion.timeAssigned.seconds - newQuestion.timeEntered.seconds) / (newQuestion.position || 1); - } - else if (numAssignedChange === -1 && prevQuestion.timeAssigned !== undefined) { - // Subtract previous time addressed - waitTimeChange = + } + else if (numAssignedChange === -1 && prevQuestion.timeAssigned !== undefined) { + // Subtract previous time addressed + waitTimeChange = (prevQuestion.timeEntered.seconds - prevQuestion.timeAssigned.seconds) / (newQuestion.position || 1); - } + } - // Derive timing changes (changes from assigned to resolved) - if (numResolvedChange === 1 && newQuestion.timeAssigned !== undefined) { - resolveTimeChange = newQuestion.timeAddressed!.seconds - newQuestion.timeAssigned.seconds; - } - else if (numResolvedChange === -1 + // Derive timing changes (changes from assigned to resolved) + if (numResolvedChange === 1 && newQuestion.timeAssigned !== undefined) { + resolveTimeChange = newQuestion.timeAddressed!.seconds - newQuestion.timeAssigned.seconds; + } + else if (numResolvedChange === -1 && prevQuestion.timeAssigned !== undefined && prevQuestion.timeAddressed !== undefined - ) { - resolveTimeChange = prevQuestion.timeAssigned.seconds - prevQuestion.timeAddressed.seconds; - } + ) { + resolveTimeChange = prevQuestion.timeAssigned.seconds - prevQuestion.timeAddressed.seconds; + } - // Figure out who needs to be updated with a notification based on the changes - const asker: FireUser = (await db.doc(`users/${newQuestion.askerId}`).get()).data() as FireUser; + // Figure out who needs to be updated with a notification based on the changes + const asker: FireUser = (await db.doc(`users/${newQuestion.askerId}`).get()).data() as FireUser; - if ( - prevQuestion.answererId !== newQuestion.answererId && + if ( + prevQuestion.answererId !== newQuestion.answererId && newQuestion.answererId !== '' - ) { - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA Assigned', - subtitle: 'TA Assigned', - message: 'A TA has been assigned to your question', - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA Assigned', - subtitle: 'TA Assigned', - message: 'A TA has been assigned to your question', - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + ) { + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA Assigned', + subtitle: 'TA Assigned', + message: 'A TA has been assigned to your question', + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA Assigned', + subtitle: 'TA Assigned', + message: 'A TA has been assigned to your question', + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } + }); + } - if ( - prevQuestion.answererId !== newQuestion.answererId && + if ( + prevQuestion.answererId !== newQuestion.answererId && newQuestion.answererId === '' - ) { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'TA Unassigned', - subtitle: 'TA Unassigned', - message: + ) { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'TA Unassigned', + subtitle: 'TA Unassigned', + message: `A TA has been unassigned from your question and you have \ been readded to the top of the ${session.title} queue.`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'TA Unassigned', - subtitle: 'TA Unassigned', - message: + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'TA Unassigned', + subtitle: 'TA Unassigned', + message: `A TA has been unassigned from your question and you have \ been readded to the top of the ${session.title} queue.`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } - else if (newQuestion.status === 'resolved') { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Question resolved', - subtitle: 'Question marked as resolved', - message: + }); + } + else if (newQuestion.status === 'resolved') { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Question resolved', + subtitle: 'Question marked as resolved', + message: `A TA has marked your question as resolved and you \ have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: `A TA has marked your question as no-show and you \ have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } else if (newQuestion.status === "no-show") { - const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; - db.doc(`notificationTrackers/${asker.email}`) - .update({ - notificationList: admin.firestore.FieldValue.arrayUnion({ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: + }); + } else if (newQuestion.status === "no-show") { + const session: FireSession = (await db.doc(`sessions/${sessionId}`).get()).data() as FireSession; + db.doc(`notificationTrackers/${asker.email}`) + .update({ + notificationList: admin.firestore.FieldValue.arrayUnion({ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: `A TA has marked your question as no-show and you \ have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }) - }).catch(() => { - db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, - notificationList: [{ - title: 'Question marked no-show', - subtitle: 'Question marked as no-show', - message: + createdAt: admin.firestore.Timestamp.now() + }) + }).catch(() => { + db.doc(`notificationTrackers/${asker.email}`).create({id: asker.email, + notificationList: [{ + title: 'Question marked no-show', + subtitle: 'Question marked as no-show', + message: `A TA has marked your question as no-show and you \ have been removed from the ${session.title} queue`, - createdAt: admin.firestore.Timestamp.now() - }], - notifications: admin.firestore.Timestamp.now(), - productUpdates: admin.firestore.Timestamp.now(), - lastSent: admin.firestore.Timestamp.now(),}) + createdAt: admin.firestore.Timestamp.now() + }], + notifications: admin.firestore.Timestamp.now(), + productUpdates: admin.firestore.Timestamp.now(), + lastSent: admin.firestore.Timestamp.now(),}) - }); - } - - // Update relevant statistics in database - return db.doc(`sessions/${sessionId}`).update({ - totalQuestions: admin.firestore.FieldValue.increment(numQuestionChange), - assignedQuestions: admin.firestore.FieldValue.increment(numAssignedChange), - resolvedQuestions: admin.firestore.FieldValue.increment(numResolvedChange), - totalWaitTime: admin.firestore.FieldValue.increment(waitTimeChange), - totalResolveTime: admin.firestore.FieldValue.increment(resolveTimeChange), - }); - }); + }); + } + + // Update relevant statistics in database + return db.doc(`sessions/${sessionId}`).update({ + totalQuestions: admin.firestore.FieldValue.increment(numQuestionChange), + assignedQuestions: admin.firestore.FieldValue.increment(numAssignedChange), + resolvedQuestions: admin.firestore.FieldValue.increment(numResolvedChange), + totalWaitTime: admin.firestore.FieldValue.increment(waitTimeChange), + totalResolveTime: admin.firestore.FieldValue.increment(resolveTimeChange), + }); + }); exports.onPendingUserCreate = functions.firestore - .document('pendingUsers/{userEmail}') - .onCreate(async (snap, context) => { - const userEmail = context.params.userEmail - const mailtrapClient = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); - const sender = { - email: "mailtrap@queueme.in", - name: "QueueMeIn Team" - } - const recipient = [{ - email: userEmail - }] - - try { - await mailtrapClient.send({ - from: sender, - to: recipient, - subject: "You've been invited to QueueMeIn!", - text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", - category: "QMI Invite – Test", - }); - } catch (error) { - console.log("error sending mail: ", error) - } - }); + .document('pendingUsers/{userEmail}') + .onCreate(async (snap, context) => { + const userEmail = context.params.userEmail + const mailtrapClient = new MailtrapClient({ token: process.env.MAILTRAP_TOKEN as string }); + const sender = { + email: "mailtrap@queueme.in", + name: "QueueMeIn Team" + } + const recipient = [{ + email: userEmail + }] + + try { + await mailtrapClient.send({ + from: sender, + to: recipient, + subject: "You've been invited to QueueMeIn!", + text: "You've been invited to QueueMeIn! Click here to sign up: https://queueme.in", + category: "QMI Invite – Test", + }); + } catch (error) { + // console.log("error sending mail: ", error) + } + }); From d80652a9c7f0e6d5ed59591be43e894af0215f8f Mon Sep 17 00:00:00 2001 From: rgu0114 Date: Wed, 16 Oct 2024 11:53:04 -0400 Subject: [PATCH 17/17] update yarn locks --- functions/yarn.lock | 67 +++++++++++++++++++-------------------------- yarn.lock | 26 +++++++++++++++--- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/functions/yarn.lock b/functions/yarn.lock index 3c26d655b..afd8f2613 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -1037,6 +1037,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axios@>=0.27: + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" @@ -2777,6 +2786,11 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +follow-redirects@^1.15.6: + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== + foreground-child@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" @@ -4329,6 +4343,13 @@ lru-memoizer@^2.2.0: lodash.clonedeep "^4.5.0" lru-cache "~4.0.0" +mailtrap@^3.3.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/mailtrap/-/mailtrap-3.4.0.tgz#b02d43f81492bc0bf79edd92386ec232dc3074a7" + integrity sha512-gegg90/gMY8hvfxB+WMtE8RRZyhQr90jUw00QOLApIAomItumqFBCpZv5IfG51EUKThu9+p7X4QdNA4buryenw== + dependencies: + axios ">=0.27" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4416,6 +4437,11 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== +"mime-db@>= 1.43.0 < 2": + version "1.53.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" + integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== + mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" @@ -5146,7 +5172,7 @@ proxy-agent@^5.0.0: proxy-from-env "^1.0.0" socks-proxy-agent "^5.0.0" -proxy-from-env@^1.0.0: +proxy-from-env@^1.0.0, proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== @@ -5559,7 +5585,7 @@ semver@^5.0.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -6712,40 +6738,3 @@ zip-stream@^4.1.0: archiver-utils "^3.0.4" compress-commons "^4.1.2" readable-stream "^3.6.0" - -yaml@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.1.tgz#2e57e0b5e995292c25c75d2658f0664765210eed" - integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.7.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zip-stream@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.1.tgz#1337fe974dbaffd2fa9a1ba09662a66932bd7135" - integrity sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ== - dependencies: - archiver-utils "^3.0.4" - compress-commons "^4.1.2" - readable-stream "^3.6.0" \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index c09ca83a2..b17974be4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8343,9 +8343,9 @@ firebase-admin@^9.3.0: "@google-cloud/storage" "^5.3.0" firebase-functions@^4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-4.8.2.tgz#dde3a154d45a1dcb372f0b5c45d06693662ab701" - integrity sha512-1M86Wu6IoE5f+r8QithaBFnkzygejh6OhaCz3p3dGjl+3lvL/9Xbm8GovZWZRmZzJ1nzb4dZpXWCalunLwZtOg== + version "4.9.0" + resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-4.9.0.tgz#7b3580a2374dab705f3b7d2a5bf4597489ef74be" + integrity sha512-IqxOEsVAWGcRv9KRGzWQR5mOFuNsil3vsfkRPPiaV1U/ATC27/jbahh4z8I4rW8Xqa6cQE5xqnw0ueyMH7i7Ag== dependencies: "@types/cors" "^2.8.5" "@types/express" "4.17.3" @@ -14319,7 +14319,7 @@ protobufjs@^6.10.0, protobufjs@^6.11.2, protobufjs@^6.8.6: "@types/node" ">=13.7.0" long "^4.0.0" -protobufjs@^7.0.0, protobufjs@^7.2.2, protobufjs@^7.2.4: +protobufjs@^7.0.0, protobufjs@^7.2.4: version "7.2.6" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== @@ -14337,6 +14337,24 @@ protobufjs@^7.0.0, protobufjs@^7.2.2, protobufjs@^7.2.4: "@types/node" ">=13.7.0" long "^5.0.0" +protobufjs@^7.2.2: + version "7.4.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a" + integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw== + 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/node" ">=13.7.0" + long "^5.0.0" + proxy-addr@~2.0.5: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"