From 6f7136712d23dbe204e2c2f8f1743c0a17456130 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sat, 30 May 2020 14:31:12 -0700 Subject: [PATCH 01/26] feat: ignore service-account.json --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 77592f86..a76709f6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ public .env .env.development .env.production + +# firebase +service-account.json \ No newline at end of file From 748cd36cdbd0f886954f81af865b65ef7a971396 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sat, 30 May 2020 15:07:14 -0700 Subject: [PATCH 02/26] feat: add support for netlify functions --- functions/hello.js | 1 + gatsby-config.js | 12 + netlify.toml | 1 + package.json | 10 +- src/functions/hello.js | 11 + src/pages/index.js | 4 + yarn.lock | 834 ++++++++++++++++++++++++++++++++++++++++- 7 files changed, 863 insertions(+), 10 deletions(-) create mode 100644 functions/hello.js create mode 100644 src/functions/hello.js diff --git a/functions/hello.js b/functions/hello.js new file mode 100644 index 00000000..4fb25ed1 --- /dev/null +++ b/functions/hello.js @@ -0,0 +1 @@ +!function(e,r){for(var t in r)e[t]=r[t]}(exports,function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";function n(e,r,t){console.log("queryStringParameters",e.queryStringParameters),t(null,{statusCode:200,body:JSON.stringify({msg:"Hello, World! "+Math.round(10*Math.random())})})}t.r(r),t.d(r,"handler",(function(){return n}))}])); \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js index 50923bce..abfcc5c3 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,11 +1,23 @@ const config = require('./config/website') const pathPrefix = config.pathPrefix === '/' ? '' : config.pathPrefix +const { createProxyMiddleware } = require('http-proxy-middleware') require('dotenv').config({ path: `.env.${process.env.NODE_ENV}`, }) module.exports = { + developMiddleware: app => { + app.use( + '/.netlify/functions/', + createProxyMiddleware({ + target: 'http://localhost:9000', + pathRewrite: { + '/.netlify/functions/': '', + }, + }), + ) + }, pathPrefix: config.pathPrefix, siteMetadata: { siteUrl: config.siteUrl + pathPrefix, diff --git a/netlify.toml b/netlify.toml index 2215286f..83fe98b4 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,5 @@ [build] + functions = "functions" publish = "public" [[plugins]] diff --git a/package.json b/package.json index e8da0077..ed3646ee 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,10 @@ "devDependencies": { "babel-preset-gatsby": "^0.2.20", "dayjs": "^1.8.18", + "http-proxy-middleware": "^1.0.4", "hygen": "^5.0.3", + "netlify-lambda": "^1.6.3", + "npm-run-all": "^4.1.5", "open": "^7.0.3", "prettier": "1.19.1" }, @@ -77,10 +80,13 @@ "license": "MIT", "main": "n/a", "scripts": { - "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages", + "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && netlify-lambda build src/functions", + "build:lambda": "netlify-lambda build src/functions", "build:local": "gatsby build", "g:post": "hygen post new", "dev": "gatsby develop", - "start": "serve public/" + "start": "run-p start:**", + "start:app": "npm run dev", + "start:lambda": "netlify-lambda serve src/functions" } } diff --git a/src/functions/hello.js b/src/functions/hello.js new file mode 100644 index 00000000..7fcef2f8 --- /dev/null +++ b/src/functions/hello.js @@ -0,0 +1,11 @@ +// For more info, check https://www.netlify.com/docs/functions/#javascript-lambda-functions +export function handler(event, context, callback) { + console.log('queryStringParameters', event.queryStringParameters) + callback(null, { + // return null to show no errors + statusCode: 200, // http status code + body: JSON.stringify({ + msg: 'Hello, World! ' + Math.round(Math.random() * 10), + }), + }) +} diff --git a/src/pages/index.js b/src/pages/index.js index 8a985e98..4f50a264 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -27,6 +27,10 @@ const Hero = () => { const theme = useTheme() const date = new Date() + fetch('/.netlify/functions/hello') + .then(response => response.json()) + .then(console.log) + return (
Date: Sat, 30 May 2020 20:36:49 -0700 Subject: [PATCH 03/26] refactor: get netlify funcs working --- .gitignore | 6 +++++- functions/hello.js | 1 - functions/page-views.js | 8 ++++++++ netlify.toml | 2 +- package.json | 6 +++--- src/functions/hello.js | 11 ----------- 6 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 functions/hello.js create mode 100644 functions/page-views.js delete mode 100644 src/functions/hello.js diff --git a/.gitignore b/.gitignore index a76709f6..8cc161bf 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,8 @@ public .env.production # firebase -service-account.json \ No newline at end of file +service-account.json +serviceAccountKey.json + +# netlify funcs +functions-build \ No newline at end of file diff --git a/functions/hello.js b/functions/hello.js deleted file mode 100644 index 4fb25ed1..00000000 --- a/functions/hello.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,r){for(var t in r)e[t]=r[t]}(exports,function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";function n(e,r,t){console.log("queryStringParameters",e.queryStringParameters),t(null,{statusCode:200,body:JSON.stringify({msg:"Hello, World! "+Math.round(10*Math.random())})})}t.r(r),t.d(r,"handler",(function(){return n}))}])); \ No newline at end of file diff --git a/functions/page-views.js b/functions/page-views.js new file mode 100644 index 00000000..c843ef0f --- /dev/null +++ b/functions/page-views.js @@ -0,0 +1,8 @@ +exports.handler = async (event, context) => { + return { + statusCode: 200, + body: JSON.stringify({ + data: `Test data added successfully`, + }), + } +} diff --git a/netlify.toml b/netlify.toml index 83fe98b4..73e0334f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build] - functions = "functions" + functions = "functions-build" publish = "public" [[plugins]] diff --git a/package.json b/package.json index ed3646ee..74f995bc 100644 --- a/package.json +++ b/package.json @@ -80,13 +80,13 @@ "license": "MIT", "main": "n/a", "scripts": { - "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && netlify-lambda build src/functions", - "build:lambda": "netlify-lambda build src/functions", + "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && netlify-lambda build functions", + "build:lambda": "netlify-lambda build functions", "build:local": "gatsby build", "g:post": "hygen post new", "dev": "gatsby develop", "start": "run-p start:**", "start:app": "npm run dev", - "start:lambda": "netlify-lambda serve src/functions" + "start:lambda": "netlify-lambda serve functions" } } diff --git a/src/functions/hello.js b/src/functions/hello.js deleted file mode 100644 index 7fcef2f8..00000000 --- a/src/functions/hello.js +++ /dev/null @@ -1,11 +0,0 @@ -// For more info, check https://www.netlify.com/docs/functions/#javascript-lambda-functions -export function handler(event, context, callback) { - console.log('queryStringParameters', event.queryStringParameters) - callback(null, { - // return null to show no errors - statusCode: 200, // http status code - body: JSON.stringify({ - msg: 'Hello, World! ' + Math.round(Math.random() * 10), - }), - }) -} From d7c885ef26c2f1685285597e9b441f482af9e924 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sat, 30 May 2020 20:37:24 -0700 Subject: [PATCH 04/26] fix: add page views --- src/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.js b/src/pages/index.js index 4f50a264..de91588f 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -27,7 +27,7 @@ const Hero = () => { const theme = useTheme() const date = new Date() - fetch('/.netlify/functions/hello') + fetch('/.netlify/functions/page-views') .then(response => response.json()) .then(console.log) From f49f2120cee34c7f7d0bfacd9393835021416022 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sat, 30 May 2020 20:44:08 -0700 Subject: [PATCH 05/26] fix: window --- src/pages/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index de91588f..bbfab3d3 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -27,9 +27,11 @@ const Hero = () => { const theme = useTheme() const date = new Date() - fetch('/.netlify/functions/page-views') - .then(response => response.json()) - .then(console.log) + if (typeof window === 'undefined') { + fetch('/.netlify/functions/page-views') + .then(response => response.json()) + .then(console.log) + } return (
Date: Sat, 30 May 2020 20:48:40 -0700 Subject: [PATCH 06/26] fix again --- .gitignore | 4 +++- src/pages/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8cc161bf..bfd76208 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,6 @@ service-account.json serviceAccountKey.json # netlify funcs -functions-build \ No newline at end of file +functions-build +# Local Netlify folder +.netlify \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index bbfab3d3..e243861f 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -27,7 +27,7 @@ const Hero = () => { const theme = useTheme() const date = new Date() - if (typeof window === 'undefined') { + if (typeof window !== 'undefined') { fetch('/.netlify/functions/page-views') .then(response => response.json()) .then(console.log) From 82cfbb0ed1c5b9aeb6715eee08ae40c89c4083ea Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 10:28:28 -0700 Subject: [PATCH 07/26] refactor: update build command --- netlify.toml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 73e0334f..887f086b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,5 @@ [build] + command = "yarn build" functions = "functions-build" publish = "public" diff --git a/package.json b/package.json index 74f995bc..893d9959 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "license": "MIT", "main": "n/a", "scripts": { - "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && netlify-lambda build functions", + "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && yarn build:lambda", "build:lambda": "netlify-lambda build functions", "build:local": "gatsby build", "g:post": "hygen post new", From ebf57d2a71153631960fecb99ce0d099f7d92db6 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 10:40:00 -0700 Subject: [PATCH 08/26] feat: add id to page views --- functions/page-views.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/functions/page-views.js b/functions/page-views.js index c843ef0f..5b2628f5 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -1,8 +1,19 @@ exports.handler = async (event, context) => { + const { id } = event.queryStringParameters + if (!id) { + return { + statusCode: 400, + body: JSON.stringify({ + error: 'Missing "id" query parameter', + }), + } + } + return { statusCode: 200, body: JSON.stringify({ - data: `Test data added successfully`, + pageId: id, + totalViews: 100, }), } } From af28e2ce2acb47cd5987f6b872ba516716d3df90 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 10:50:08 -0700 Subject: [PATCH 09/26] feat: add firebase-admin package --- package.json | 1 + yarn.lock | 849 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 828 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 893d9959..64933fbb 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "emotion": "^10.0.17", "emotion-server": "^10.0.17", "emotion-theming": "^10.0.19", + "firebase-admin": "^8.12.1", "formik": "^2.0.8", "framer-motion": "^1.10.3", "gatsby": "^2.21.9", diff --git a/yarn.lock b/yarn.lock index caa8db25..1fa1e795 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1781,6 +1781,144 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@firebase/app-types@0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9" + integrity sha512-L/ZnJRAq7F++utfuoTKX4CLBG5YR7tFO3PLzG1/oXXKEezJ0kRL3CMRoueBEmTCzVb/6SIs2Qlaw++uDgi5Xyg== + +"@firebase/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/component@0.1.12": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.12.tgz#deb511c92c5c6f60995207312b7ede8c7076fdb2" + integrity sha512-03w800MxR/EW1m7N0Q46WNcngwdDIHDWpFPHTdbZEI6U/HuLks5RJQlBxWqb1P73nYPkN8YP3U8gTdqrDpqY3Q== + dependencies: + "@firebase/util" "0.2.47" + tslib "1.11.1" + +"@firebase/database-types@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.5.1.tgz#fab2f3fb48eec374a9f435ed21e138635cb9b71c" + integrity sha512-onQxom1ZBYBJ648w/VNRzUewovEDAH7lvnrrpCd69ukkyrMk6rGEO/PQ9BcNEbhlNtukpsqRS0oNOFlHs0FaSA== + dependencies: + "@firebase/app-types" "0.6.1" + +"@firebase/database@^0.6.0": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.3.tgz#d85471938a0a9d9169f1f37f8f9d2dec7ef32f8b" + integrity sha512-gHoCISHQVLoq+rGu+PorYxMkhsjhXov3ocBxz/0uVdznNhrbKkAZaEKF+dIAsUPDlwSYeZuwWuik7xcV3DtRaw== + dependencies: + "@firebase/auth-interop-types" "0.1.5" + "@firebase/component" "0.1.12" + "@firebase/database-types" "0.5.1" + "@firebase/logger" "0.2.4" + "@firebase/util" "0.2.47" + faye-websocket "0.11.3" + tslib "1.11.1" + +"@firebase/logger@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.2.4.tgz#276e7c482f462b5b24b188257cf162b3b2cd3ad6" + integrity sha512-akHkOU7izYB1okp/B5sxClGjjw6KvZdSHyjNM5pKd67Zg5W6PsbkI/GFNv21+y6LkUkJwDRbdeDgJoYXWT3mMA== + +"@firebase/util@0.2.47": + version "0.2.47" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.2.47.tgz#c5e02bbba7aa0786f29cc516b2e2ee17e0c1f4a4" + integrity sha512-RjcIvcfswyxYhf0OMXod+qeI/933wl9FGLIszf0/O1yMZ/s8moXcse7xnOpMjmQPRLB9vHzCMoxW5X90kKg/bQ== + 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" + +"@google-cloud/firestore@^3.0.0": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-3.8.2.tgz#7b449ab4743c4b2926d86288f71655ec01fa9994" + integrity sha512-COaQKb+kdboURMPRGOtMpklC2qFN2Q+SHGx+Euk4jwjBJQ5UZja+GIEcl4uo1FbJ2fAqKP9gzAqCU2BpOwFY1w== + dependencies: + deep-equal "^2.0.0" + functional-red-black-tree "^1.0.1" + google-gax "^1.13.0" + readable-stream "^3.4.0" + through2 "^3.0.0" + +"@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== + 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/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/storage@^4.1.2": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-4.7.0.tgz#a7466086a83911c7979cc238d00a127ffb645615" + integrity sha512-f0guAlbeg7Z0m3gKjCfBCu7FG9qS3M3oL5OQQxlvGoPtK7/qg3+W+KQV73O2/sbuS54n0Kh2mvT5K2FWzF5vVQ== + dependencies: + "@google-cloud/common" "^2.1.1" + "@google-cloud/paginator" "^2.0.0" + "@google-cloud/promisify" "^1.0.0" + arrify "^2.0.0" + compressible "^2.0.12" + concat-stream "^2.0.0" + date-and-time "^0.13.0" + 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" + 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.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.0.4.tgz#a858bca10ee1da24291f54931656bd5877686a55" + integrity sha512-Qawt6HUrEmljQMPWnLnIXpcjelmtIAydi3M9awiG02WWJ1CmIvFEx4IOC1EsWUWUlabOGksRbpfvoIeZKFTNXw== + dependencies: + google-auth-library "^6.0.0" + semver "^6.2.0" + +"@grpc/proto-loader@^0.5.1": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.4.tgz#038a3820540f621eeb1b05d81fbedfb045e14de0" + integrity sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA== + dependencies: + lodash.camelcase "^4.3.0" + protobufjs "^6.8.6" + "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -2278,6 +2416,59 @@ style-value-types "^3.1.7" tslib "^1.10.0" +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + "@reach/router@^1.3.3": version "1.3.3" resolved "https://registry.yarnpkg.com/@reach/router/-/router-1.3.3.tgz#58162860dce6c9449d49be86b0561b5ef46d80db" @@ -2305,6 +2496,11 @@ dependencies: defer-to-connect "^1.0.1" +"@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== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" @@ -2330,6 +2526,13 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== +"@types/fs-extra@^8.0.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068" + integrity sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== + dependencies: + "@types/node" "*" + "@types/get-port@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@types/get-port/-/get-port-3.2.0.tgz#f9e0a11443cc21336470185eae3dfba4495d29bc" @@ -2395,6 +2598,11 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.150.tgz#649fe44684c3f1fcb6164d943c5a61977e8cf0bd" integrity sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w== +"@types/long@^4.0.0", "@types/long@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + "@types/mdast@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.3.tgz#2d7d671b1cd1ea3deb306ea75036c2a0407d2deb" @@ -2424,6 +2632,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== +"@types/node@^13.7.0": + version "13.13.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.9.tgz#79df4ae965fb76d31943b54a6419599307a21394" + integrity sha512-EPZBIGed5gNnfWCiwEIwTE2Jdg4813odnG8iNPMQGrqVxrI+wL68SPtPeCX+ZxGBaA6pKAVc6jaKgP/Q0QzfdQ== + +"@types/node@^8.10.59": + version "8.10.61" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.61.tgz#d299136ce54bcaf1abaa4a487f9e4bedf6b0d393" + integrity sha512-l+zSbvT8TPRaCxL1l9cwHCb0tSqGAGcjPJFItGGYat5oCTiq1uQQKYg5m7AF1mgnEBzFXGLJ2LRmNjtreRX76Q== + "@types/node@^8.5.7": version "8.10.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.60.tgz#73eb4d1e1c8aa5dc724363b57db019cf28863ef7" @@ -2730,6 +2948,13 @@ resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + accepts@^1.3.7, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -2778,6 +3003,13 @@ agent-base@5: resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== +agent-base@6: + version "6.0.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" + integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== + dependencies: + debug "4" + aggregate-error@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" @@ -2993,6 +3225,11 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" + integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= + array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" @@ -3077,7 +3314,7 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -arrify@^2.0.1: +arrify@^2.0.0, arrify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== @@ -3186,6 +3423,13 @@ autoprefixer@^9.7.6: postcss "^7.0.27" postcss-value-parser "^4.0.3" +available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" + integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== + dependencies: + array-filter "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -3405,7 +3649,7 @@ base64-arraybuffer@0.1.5: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== @@ -3473,6 +3717,11 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +bignumber.js@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + bin-build@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" @@ -3819,6 +4068,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + buffer-equal@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" @@ -4545,7 +4799,7 @@ component-xor@0.0.4: resolved "https://registry.yarnpkg.com/component-xor/-/component-xor-0.0.4.tgz#c55d83ccc1b94cd5089a4e93fa7891c7263e59aa" integrity sha1-xV2DzMG5TNUImk6T+niRxyY+Wao= -compressible@~2.0.14, compressible@~2.0.16: +compressible@^2.0.12, compressible@~2.0.14, compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== @@ -4593,6 +4847,16 @@ concat-stream@^1.5.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" +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" + config-chain@^1.1.11: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" @@ -4625,7 +4889,7 @@ configstore@^4.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" -configstore@^5.0.1: +configstore@^5.0.0, configstore@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== @@ -5183,6 +5447,11 @@ dataloader@^1.4.0: resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8" integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== +date-and-time@^0.13.0: + version "0.13.1" + resolved "https://registry.yarnpkg.com/date-and-time/-/date-and-time-0.13.1.tgz#d12ba07ac840d5b112dc4c83f8a03e8a51f78dd6" + integrity sha512-/Uge9DJAT+s+oAcDxtBhyR8+sKjUnZbYmyhbmWjTHNtX7B7oWD8YyYdeXcBRbwSj6hVvj+IQegJam7m7czhbFw== + date-fns@^2.12.0: version "2.13.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.13.0.tgz#d7b8a0a2d392e8d88a8024d0a46b980bbfdbd708" @@ -5318,6 +5587,26 @@ deep-equal@^1.0.1, deep-equal@^1.1.0: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deep-equal@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0" + integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA== + dependencies: + es-abstract "^1.17.5" + es-get-iterator "^1.1.0" + is-arguments "^1.0.4" + is-date-object "^1.0.2" + is-regex "^1.0.5" + isarray "^2.0.5" + object-is "^1.1.2" + object-keys "^1.1.1" + object.assign "^4.1.0" + regexp.prototype.flags "^1.3.0" + side-channel "^1.0.2" + which-boxed-primitive "^1.0.1" + which-collection "^1.0.1" + which-typed-array "^1.1.2" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -5528,6 +5817,13 @@ devcert@^1.1.0: tmp "^0.0.33" tslib "^1.10.0" +dicer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz#eacd98b3bfbf92e8ab5c2fdb71aaac44bb06b872" + integrity sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA== + dependencies: + streamsearch "0.1.2" + diff-sequences@^25.2.6: version "25.2.6" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" @@ -5781,7 +6077,7 @@ duplexer@^0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= -duplexify@^3.4.2, duplexify@^3.6.0: +duplexify@^3.4.2, 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== @@ -5791,6 +6087,16 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +duplexify@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" + integrity sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -5799,6 +6105,13 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -5951,6 +6264,11 @@ enquirer@^2.3.0: dependencies: ansi-colors "^3.2.1" +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= + entities@^1.1.1, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -5992,7 +6310,7 @@ error-stack-parser@^2.0.0, error-stack-parser@^2.0.4: dependencies: stackframe "^1.1.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5: +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.17.5: version "1.17.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== @@ -6009,6 +6327,19 @@ es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstrac string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" +es-get-iterator@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" + integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== + dependencies: + es-abstract "^1.17.4" + has-symbols "^1.0.1" + is-arguments "^1.0.4" + is-map "^2.0.1" + is-set "^2.0.1" + 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" @@ -6276,6 +6607,11 @@ event-source-polyfill@^1.0.12: resolved "https://registry.yarnpkg.com/event-source-polyfill/-/event-source-polyfill-1.0.12.tgz#38546c4fee76dcadae2560185610ae46c5a39520" integrity sha512-WjOTn0LIbaN08z/8gNt3GYAomAdm6cZ2lr/QdvhTTEipr5KR6lds2ziUH+p/Iob4Lk6NClKhwPOmn1NjQEcJCg== +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter3@^3.1.0: version "3.1.2" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" @@ -6628,6 +6964,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-text-encoding@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.2.tgz#ff1ad5677bde049e0f8656aa6083a7ef2c5836e2" + integrity sha512-5rQdinSsycpzvAoHga2EDn+LRX1d5xLFsuNG0Kg61JrAT/tASXcLL0nf/33v+sAxlQcfYmWbTURa1mmAf55jGw== + fast-url-parser@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" @@ -6647,6 +6988,13 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +faye-websocket@0.11.3, faye-websocket@~0.11.0, faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + dependencies: + websocket-driver ">=0.5.1" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -6654,13 +7002,6 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.0, faye-websocket@~0.11.1: - version "0.11.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== - dependencies: - websocket-driver ">=0.5.1" - fbjs@^0.8.0: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" @@ -6898,6 +7239,20 @@ find-versions@^3.0.0: dependencies: semver-regex "^2.0.0" +firebase-admin@^8.12.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-8.12.1.tgz#a380c43a9e6ba37dfbe42211a253dd890a442063" + integrity sha512-DZ4Q7QQJYaO2BhnhZLrhL+mGRTCLS5WrxjbJtuKGmbKRBepwMhx++EQA5yhnGnIXgDHnp5SrZnVKygNdXtH8BQ== + dependencies: + "@firebase/database" "^0.6.0" + "@types/node" "^8.10.59" + dicer "^0.3.0" + jsonwebtoken "8.1.0" + node-forge "0.7.4" + optionalDependencies: + "@google-cloud/firestore" "^3.0.0" + "@google-cloud/storage" "^4.1.2" + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -6951,6 +7306,11 @@ for-in@^1.0.2: resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -7807,6 +8167,56 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +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== + 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" + +gaxios@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.0.3.tgz#497730758f5b0d43a32ebdbebe5f1bd9f7db7aed" + integrity sha512-PkzQludeIFhd535/yucALT/Wxyj/y2zLyrMwPcJmnLHDugmV49NvAi/vb+VUq/eWztATZCNcb8ue+ywPG+oLuw== + 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== + dependencies: + gaxios "^2.1.0" + json-bigint "^0.3.0" + +gcp-metadata@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.1.0.tgz#8b9b5903882076948554af471c838e7ea2f564b4" + integrity sha512-r57SV28+olVsflPlKyVig3Muo/VDlcsObMtvDGOEtEJXj+DDE8bEl0coIkXh//hbkSDTvo+f5lbihZOndYXQQQ== + dependencies: + gaxios "^3.0.0" + json-bigint "^0.3.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" + generate-robotstxt@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/generate-robotstxt/-/generate-robotstxt-7.1.0.tgz#3fe0d9b1ea284533d04a323a29e01bc6cc814f91" @@ -8058,6 +8468,71 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.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== + 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" + jws "^4.0.0" + lru-cache "^5.0.0" + +google-auth-library@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.0.0.tgz#f92576e9e920803634c258b25f091604c1379722" + integrity sha512-uLydy1t6SHN/EvYUJrtN3GCHFrnJ0c8HJjOxXiGjoTuYHIoCUT3jVxnzmjHwVnSdkfE9Akasm2rM6qG1COTXfQ== + dependencies: + arrify "^2.0.0" + base64-js "^1.3.0" + ecdsa-sig-formatter "^1.0.11" + fast-text-encoding "^1.0.0" + gaxios "^3.0.0" + gcp-metadata "^4.0.0" + gtoken "^5.0.0" + jws "^4.0.0" + lru-cache "^5.0.0" + +google-gax@^1.13.0: + version "1.15.3" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-1.15.3.tgz#e88cdcbbd19c7d88cc5fd7d7b932c4d1979a5aca" + integrity sha512-3JKJCRumNm3x2EksUTw4P1Rad43FTpqrtW9jzpf3xSMYXx+ogaqTM1vGo7VixHB4xkAyATXVIa3OcNSh8H9zsQ== + dependencies: + "@grpc/grpc-js" "~1.0.3" + "@grpc/proto-loader" "^0.5.1" + "@types/fs-extra" "^8.0.1" + "@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.4" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-2.0.4.tgz#036462394e266472632a78b685f0cc3df4ef337b" + integrity sha512-S4blHBQWZRnEW44OcR7TL9WR+QCqByRvhNDZ/uuQfpxywfupikf/miba8js1jZi6ZOGv5slgSuoshCWh6EMDzg== + dependencies: + node-forge "^0.9.0" + +google-p12-pem@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.0.1.tgz#a220c05a8d7ee9751dd133ee72ecfc855820d5ab" + integrity sha512-VlQgtozgNVVVcYTXS36eQz4PXPt9gIPqLOhHN0QiV6W6h4qSCNVKPtKC5INtJsaHHF2r7+nOIa26MJeJMTaZEQ== + dependencies: + node-forge "^0.9.0" + got@8.3.2, got@^8.3.1, got@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" @@ -8213,6 +8688,26 @@ gray-percentage@^2.0.0: resolved "https://registry.yarnpkg.com/gray-percentage/-/gray-percentage-2.0.0.tgz#b72a274d1b1379104a0050b63b207dc53fe56f99" integrity sha1-tyonTRsTeRBKAFC2OyB9xT/lb5k= +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" + jws "^4.0.0" + mime "^2.2.0" + +gtoken@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.0.1.tgz#b93f309d89adfe230bb0f24269b978284ba89e0f" + integrity sha512-33w4FNDkUcyIOq/TqyC+drnKdI4PdXmWp9lZzssyEQKuvu9ZFN3KttaSnDKo52U3E51oujVGop93mKxmqO8HHg== + dependencies: + gaxios "^3.0.0" + google-p12-pem "^3.0.0" + jws "^4.0.0" + mime "^2.2.0" + gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" @@ -8354,6 +8849,13 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" +hash-stream-validation@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hash-stream-validation/-/hash-stream-validation-0.2.3.tgz#44e3479d1767c4f1d6924cc2da61eca08ebba8af" + integrity sha512-OEohGLoUOh+bwsIpHpdvhIXFyRGjeLqJbT8Yc5QTZPbRM7LKywagTQxnX/6mghLDOrD9YGz88hy5mLN2eKflYQ== + dependencies: + through2 "^2.0.0" + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -8705,6 +9207,15 @@ http-errors@~1.6.2: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= +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== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-proxy-middleware@0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" @@ -8766,6 +9277,14 @@ https-proxy-agent@^4.0.0: agent-base "5" debug "4" +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -9257,6 +9776,11 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== +is-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" + integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -9279,6 +9803,11 @@ is-blank@^2.1.0: is-empty latest is-whitespace latest +is-boolean-object@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" + integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== + is-buffer@^1.1.4, is-buffer@^1.1.5, is-buffer@~1.1.1: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -9341,7 +9870,7 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: +is-date-object@^1.0.1, is-date-object@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== @@ -9486,6 +10015,11 @@ is-lower-case@^1.1.0: dependencies: lower-case "^1.1.0" +is-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" + integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== + is-natural-number@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" @@ -9503,6 +10037,11 @@ is-npm@^3.0.0: resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053" integrity sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA== +is-number-object@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" + integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -9629,6 +10168,11 @@ is-root@2.1.0: resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== +is-set@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" + integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== + is-ssh@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.1.tgz#f349a8cadd24e65298037a522cf7520f2e81a0f3" @@ -9636,6 +10180,11 @@ is-ssh@^1.3.0: dependencies: protocols "^1.1.0" +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@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -9646,7 +10195,7 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-string@^1.0.5: +is-string@^1.0.4, is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== @@ -9665,6 +10214,16 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-typed-array@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" + integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ== + dependencies: + available-typed-arrays "^1.0.0" + es-abstract "^1.17.4" + foreach "^2.0.5" + has-symbols "^1.0.1" + is-typedarray@^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" @@ -9701,6 +10260,16 @@ is-valid-path@^0.1.1: dependencies: is-invalid-path "^0.1.0" +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-weakset@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" + integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== + is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -9753,6 +10322,11 @@ isarray@2.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4= +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== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -9869,6 +10443,13 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= +json-bigint@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.0.tgz#0ccd912c4b8270d05f056fbd13814b53d3825b1e" + integrity sha1-DM2RLEuCcNBfBW+9E4FLU9OCWx4= + dependencies: + bignumber.js "^7.0.0" + json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -9942,6 +10523,22 @@ jsonp@^0.2.1: dependencies: debug "^2.1.3" +jsonwebtoken@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.1.0.tgz#c6397cd2e5fd583d65c007a83dc7bb78e6982b83" + integrity sha1-xjl80uX9WD1lwAeoPce7eOaYK4M= + dependencies: + jws "^3.1.4" + 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.0.0" + xtend "^4.0.1" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -9960,6 +10557,40 @@ jsx-ast-utils@^2.2.1, jsx-ast-utils@^2.2.3: array-includes "^3.0.3" object.assign "^4.1.0" +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.1.4: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + dependencies: + jwa "^2.0.0" + safe-buffer "^5.0.1" + jwt-decode@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-2.2.0.tgz#7d86bd56679f58ce6a84704a657dd392bba81a79" @@ -10174,6 +10805,11 @@ lodash.assignin@^4.0.9: resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= +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.bind@^4.1.4: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" @@ -10229,12 +10865,32 @@ lodash.foreach@^4.3.0, lodash.foreach@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= +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.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= + lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= -lodash.isnumber@^3.0.0: +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= + +lodash.isnumber@^3.0.0, lodash.isnumber@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= @@ -10274,6 +10930,11 @@ lodash.mergewith@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= + lodash.pick@^4.2.1: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -10351,6 +11012,11 @@ loglevel@^1.6.8: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + longest-streak@^2.0.1: version "2.0.4" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" @@ -10437,7 +11103,7 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" -lru-cache@^5.1.1: +lru-cache@^5.0.0, lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== @@ -10820,7 +11486,7 @@ mime-types@2.1.18: dependencies: mime-db "~1.33.0" -mime-types@^2.1.12, mime-types@^2.1.25, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.0.8, mime-types@^2.1.12, mime-types@^2.1.25, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== @@ -10837,6 +11503,11 @@ mime@^2.0.3, mime@^2.4.4, mime@^2.4.5: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== +mime@^2.2.0: + version "2.4.6" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" + integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -11020,7 +11691,7 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@^2.1.1: +ms@^2.0.0, ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -11180,7 +11851,7 @@ node-fetch@2.1.2: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= -node-fetch@2.6.0, node-fetch@^2.3.0, node-fetch@^2.6.0: +node-fetch@2.6.0, node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== @@ -11193,11 +11864,21 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" +node-forge@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.4.tgz#8e6e9f563a1e32213aa7508cded22aa791dbf986" + integrity sha512-8Df0906+tq/omxuCZD6PqhPaQDYuyJ1d+VITgxoIA8zvQd1ru+nMJcDChHH324MWitIgbVkAkQoGEEVJNpn/PA== + node-forge@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== +node-forge@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" + integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ== + node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" @@ -11417,7 +12098,7 @@ object-inspect@^1.7.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== -object-is@^1.0.1: +object-is@^1.0.1, object-is@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== @@ -12804,6 +13485,25 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= +protobufjs@^6.8.6, protobufjs@^6.8.9: + version "6.9.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.9.0.tgz#c08b2bf636682598e6fabbf0edb0b1256ff090bd" + integrity sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg== + 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" + protocols@^1.1.0, protocols@^1.4.0: version "1.4.7" resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" @@ -12874,6 +13574,15 @@ pumpify@^1.3.3: inherits "^2.0.3" pump "^2.0.0" +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" + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -13308,7 +14017,7 @@ read@^1.0.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -13808,6 +14517,14 @@ retext-english@^3.0.4: parse-english "^4.0.0" unherit "^1.0.4" +retry-request@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.1.1.tgz#f676d0db0de7a6f122c048626ce7ce12101d2bd8" + integrity sha512-BINDzVtLI2BDukjWmjAIRZ0oglnCAkpP2vQjM3jdLhmT62h0xnQgciPwBRDAvHqpkPT2Wo1XuUyLyn6nbGrZQQ== + dependencies: + debug "^4.1.1" + through2 "^3.0.1" + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -14349,6 +15066,11 @@ snake-case@^2.1.0: dependencies: no-case "^2.2.0" +snakeize@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/snakeize/-/snakeize-0.1.0.tgz#10c088d8b58eb076b3229bb5a04e232ce126422d" + integrity sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0= + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -14719,6 +15441,13 @@ stream-each@^1.1.0: end-of-stream "^1.1.0" stream-shift "^1.0.0" +stream-events@^1.0.1, stream-events@^1.0.4, 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-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" @@ -14742,6 +15471,11 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +streamsearch@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" + integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -15013,6 +15747,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +stubs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" + integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= + style-loader@^0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" @@ -15216,6 +15955,17 @@ tar@^6.0.1: mkdirp "^1.0.3" yallist "^4.0.0" +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== + dependencies: + http-proxy-agent "^4.0.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.2.0" + stream-events "^1.0.5" + uuid "^7.0.0" + temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" @@ -15286,6 +16036,13 @@ through2@^2.0.0, through2@^2.0.1: readable-stream "~2.3.6" xtend "~4.0.1" +through2@^3.0.0, through2@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + through2@~0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b" @@ -15499,6 +16256,11 @@ ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== +tslib@1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" + integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.11.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" @@ -16086,6 +16848,11 @@ uuid@3.4.0, uuid@^3.0.0, uuid@^3.0.1, uuid@^3.3.2, uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +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== + v8-compile-cache@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz#8d32e4f16974654657e676e0e467a348e89b0dc4" @@ -16194,6 +16961,11 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== +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== + warning@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" @@ -16385,6 +17157,27 @@ whatwg-fetch@>=0.10.0: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== +which-boxed-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1" + integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ== + dependencies: + is-bigint "^1.0.0" + is-boolean-object "^1.0.0" + is-number-object "^1.0.3" + is-string "^1.0.4" + is-symbol "^1.0.2" + +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-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -16395,6 +17188,18 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= +which-typed-array@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2" + integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ== + dependencies: + available-typed-arrays "^1.0.2" + es-abstract "^1.17.5" + foreach "^2.0.5" + function-bind "^1.1.1" + has-symbols "^1.0.1" + is-typed-array "^1.1.3" + which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From d5de34d58e625e0af9c8b2b20767028101b114d8 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 11:15:25 -0700 Subject: [PATCH 10/26] feat: add webpack node externals --- config/webpack.functions.js | 7 +++++++ package.json | 5 +++-- yarn.lock | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 config/webpack.functions.js diff --git a/config/webpack.functions.js b/config/webpack.functions.js new file mode 100644 index 00000000..a8deae79 --- /dev/null +++ b/config/webpack.functions.js @@ -0,0 +1,7 @@ +// required to get firebase-sdk imported into netlify functions +// see: https://github.com/netlify/netlify-lambda/issues/112#issuecomment-488644361 +const nodeExternals = require('webpack-node-externals') + +module.exports = { + externals: [nodeExternals()], +} diff --git a/package.json b/package.json index 64933fbb..3c2bafba 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "serve": "^11.2.0", "typescript": "^3.8.3", "typography": "^0.16.19", + "webpack-node-externals": "^1.7.2", "yup": "^0.28.0" }, "devDependencies": { @@ -82,12 +83,12 @@ "main": "n/a", "scripts": { "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages && yarn build:lambda", - "build:lambda": "netlify-lambda build functions", + "build:lambda": "netlify-lambda build --config ./config/webpack.functions.js functions", "build:local": "gatsby build", "g:post": "hygen post new", "dev": "gatsby develop", "start": "run-p start:**", "start:app": "npm run dev", - "start:lambda": "netlify-lambda serve functions" + "start:lambda": "netlify-lambda serve --config ./config/webpack.functions.js functions" } } diff --git a/yarn.lock b/yarn.lock index 1fa1e795..2c2810fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17076,6 +17076,11 @@ webpack-merge@^4.1.4, webpack-merge@^4.2.2: dependencies: lodash "^4.17.15" +webpack-node-externals@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.7.2.tgz#6e1ee79ac67c070402ba700ef033a9b8d52ac4e3" + integrity sha512-ajerHZ+BJKeCLviLUUmnyd5B4RavLF76uv3cs6KNuO8W+HuQaEs0y0L7o40NQxdPy5w0pcv8Ew7yPUAQG0UdCg== + webpack-sources@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb" From 537a5dc931a4e369d0a3cf0a9441c25e80350f09 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 11:15:36 -0700 Subject: [PATCH 11/26] feat: get basic page views working with json --- functions/page-views.js | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/functions/page-views.js b/functions/page-views.js index 5b2628f5..1872c631 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -1,3 +1,13 @@ +const admin = require('firebase-admin') +const serviceAccountKey = require('../serviceAccountKey.json') + +admin.initializeApp({ + credential: admin.credential.cert(serviceAccountKey), + databaseURL: 'https://website-pageviews-c8d4d.firebaseio.com/', +}) + +const db = admin.database() + exports.handler = async (event, context) => { const { id } = event.queryStringParameters if (!id) { @@ -9,11 +19,21 @@ exports.handler = async (event, context) => { } } - return { - statusCode: 200, - body: JSON.stringify({ - pageId: id, - totalViews: 100, - }), - } + // This database has all my website page views + // so we need to look at the specific site + // then look at the views table which has {key: value} where key is the id for the page + const ref = db.ref('joeprevite-dot-com/views').child(id) + + await ref.once('value', snapshot => { + // grab the total views + const totalViews = snapshot.val() + + return { + statusCode: 200, + body: JSON.stringify({ + pageId: id, + totalViews: totalViews !== null ? totalViews : 0, + }), + } + }) } From 12e7607bcd86fe217893e0551de287294a4f61f4 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 13:14:42 -0700 Subject: [PATCH 12/26] fix: get page views in working state --- functions/page-views.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/functions/page-views.js b/functions/page-views.js index 1872c631..691ae493 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -18,22 +18,24 @@ exports.handler = async (event, context) => { }), } } + // working state - // This database has all my website page views - // so we need to look at the specific site - // then look at the views table which has {key: value} where key is the id for the page const ref = db.ref('joeprevite-dot-com/views').child(id) + let totalViews await ref.once('value', snapshot => { - // grab the total views - const totalViews = snapshot.val() - - return { - statusCode: 200, - body: JSON.stringify({ - pageId: id, - totalViews: totalViews !== null ? totalViews : 0, - }), - } + const value = snapshot.val() + console.log('what is this ', value) + totalViews = value }) + + console.log('here is totla views', totalViews) + + return { + statusCode: 200, + body: JSON.stringify({ + pageId: id, + totalViews: 100, + }), + } } From 97df04f712c4e5abe54fbe5817717a4c7dfe4291 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 14:43:19 -0700 Subject: [PATCH 13/26] feat: add webpack dot env and fix initializeApp --- config/webpack.functions.js | 2 ++ functions/page-views.js | 10 +++++++--- package.json | 1 + yarn.lock | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/config/webpack.functions.js b/config/webpack.functions.js index a8deae79..18d6ffa6 100644 --- a/config/webpack.functions.js +++ b/config/webpack.functions.js @@ -1,7 +1,9 @@ // required to get firebase-sdk imported into netlify functions // see: https://github.com/netlify/netlify-lambda/issues/112#issuecomment-488644361 const nodeExternals = require('webpack-node-externals') +const dotEnv = require('dotenv-webpack') module.exports = { externals: [nodeExternals()], + plugins: [new dotEnv()], } diff --git a/functions/page-views.js b/functions/page-views.js index 691ae493..bf47fadf 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -2,7 +2,11 @@ const admin = require('firebase-admin') const serviceAccountKey = require('../serviceAccountKey.json') admin.initializeApp({ - credential: admin.credential.cert(serviceAccountKey), + credential: admin.credential.cert({ + client_email: process.env.FIREBASE_CLIENT_EMAIL, + private_key: process.env.FIREBASE_PRIVATE_KEY, + project_id: 'website-pageviews-c8d4d', + }), databaseURL: 'https://website-pageviews-c8d4d.firebaseio.com/', }) @@ -25,11 +29,11 @@ exports.handler = async (event, context) => { let totalViews await ref.once('value', snapshot => { const value = snapshot.val() - console.log('what is this ', value) + console.log('from firebase db:', value) totalViews = value }) - console.log('here is totla views', totalViews) + console.log('here is total views', totalViews) return { statusCode: 200, diff --git a/package.json b/package.json index 3c2bafba..24b92116 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "core-js": "^3.3.3", "dotenv": "^8.2.0", "dotenv-parse-variables": "^0.2.3", + "dotenv-webpack": "^1.8.0", "emotion": "^10.0.17", "emotion-server": "^10.0.17", "emotion-theming": "^10.0.19", diff --git a/yarn.lock b/yarn.lock index 2c2810fa..bea7b44f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6013,6 +6013,13 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" +dotenv-defaults@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz#032c024f4b5906d9990eb06d722dc74cc60ec1bd" + integrity sha512-6fPRo9o/3MxKvmRZBD3oNFdxODdhJtIy1zcJeUSCs6HCy4tarUpd+G67UTU9tF6OWXeSPqsm4fPAB+2eY9Rt9Q== + dependencies: + dotenv "^6.2.0" + dotenv-parse-variables@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/dotenv-parse-variables/-/dotenv-parse-variables-0.2.3.tgz#9f509c74b952f3c8dbfda6674fb060398d0ed7fc" @@ -6020,6 +6027,18 @@ dotenv-parse-variables@^0.2.3: dependencies: debug "^4.1.1" +dotenv-webpack@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/dotenv-webpack/-/dotenv-webpack-1.8.0.tgz#7ca79cef2497dd4079d43e81e0796bc9d0f68a5e" + integrity sha512-o8pq6NLBehtrqA8Jv8jFQNtG9nhRtVqmoD4yWbgUyoU3+9WBlPe+c2EAiaJok9RB28QvrWvdWLZGeTT5aATDMg== + dependencies: + dotenv-defaults "^1.0.2" + +dotenv@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" + integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== + dotenv@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" From b8af9700c5a5165cd2e4d1f536471042f3647bfe Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 15:07:59 -0700 Subject: [PATCH 14/26] refactor: move logic into db-admin --- functions/page-views.js | 14 +------------- src/lib/db-admin.js | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 src/lib/db-admin.js diff --git a/functions/page-views.js b/functions/page-views.js index bf47fadf..4af2a1e5 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -1,16 +1,4 @@ -const admin = require('firebase-admin') -const serviceAccountKey = require('../serviceAccountKey.json') - -admin.initializeApp({ - credential: admin.credential.cert({ - client_email: process.env.FIREBASE_CLIENT_EMAIL, - private_key: process.env.FIREBASE_PRIVATE_KEY, - project_id: 'website-pageviews-c8d4d', - }), - databaseURL: 'https://website-pageviews-c8d4d.firebaseio.com/', -}) - -const db = admin.database() +import { db } from '../src/lib/db-admin' exports.handler = async (event, context) => { const { id } = event.queryStringParameters diff --git a/src/lib/db-admin.js b/src/lib/db-admin.js new file mode 100644 index 00000000..d4735b2a --- /dev/null +++ b/src/lib/db-admin.js @@ -0,0 +1,23 @@ +const admin = require('firebase-admin') + +try { + admin.initializeApp({ + credential: admin.credential.cert({ + client_email: process.env.FIREBASE_CLIENT_EMAIL, + private_key: process.env.FIREBASE_PRIVATE_KEY, + project_id: 'website-pageviews-c8d4d', + }), + databaseURL: 'https://website-pageviews-c8d4d.firebaseio.com/', + }) +} catch (error) { + /* + * We skip the "already exists" message which is + * not an actual error when we're hot-reloading. + */ + if (!/already exists/u.test(error.message)) { + // eslint-disable-next-line no-console + console.error('Firebase admin initialization error', error.stack) + } +} + +export const db = admin.database() From 5ae3ed3fea259f1b3335bc397435ccd1b6164ace Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 15:40:54 -0700 Subject: [PATCH 15/26] feat: bump h1 to 2.75rem --- src/lib/typography.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/typography.js b/src/lib/typography.js index 6e66330c..99cc5af6 100644 --- a/src/lib/typography.js +++ b/src/lib/typography.js @@ -28,6 +28,7 @@ const typography = new Typography({ overrideStyles: ({ rhythm }) => ({ h1: { color: 'hsla(0,0%,0%,0.75)', + fontSize: '2.75rem', }, h2: { color: 'hsla(0,0%,0%,0.775)', From 49aa571744f67780403ad514ad028030d6a572c1 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 15:41:23 -0700 Subject: [PATCH 16/26] feat: add fake total views to post --- src/templates/post.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/templates/post.js b/src/templates/post.js index c92f7265..4011697a 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -40,9 +40,11 @@ export default function Post({
{date &&

{date}

} +

12,000 views

{/* {banner && (
Date: Sun, 31 May 2020 15:42:23 -0700 Subject: [PATCH 17/26] refactor: change date to p --- src/templates/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/post.js b/src/templates/post.js index 4011697a..6f6c736e 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -59,7 +59,7 @@ export default function Post({ } `} > - {date &&

{date}

} + {date &&

{date}

}

12,000 views

{/* {banner && ( From 660dc1a8926fff228bee9e82364175ec6fa83437 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 16:14:36 -0700 Subject: [PATCH 18/26] wip: add counter --- functions/increment-views.js | 30 +++++ functions/page-views.js | 2 +- package.json | 1 + src/components/ViewCounter.js | 49 +++++++ src/lib/db.js | 26 ++++ src/templates/post.js | 3 +- yarn.lock | 236 ++++++++++++++++++++++++++++++++-- 7 files changed, 337 insertions(+), 10 deletions(-) create mode 100644 functions/increment-views.js create mode 100644 src/components/ViewCounter.js create mode 100644 src/lib/db.js diff --git a/functions/increment-views.js b/functions/increment-views.js new file mode 100644 index 00000000..11f21957 --- /dev/null +++ b/functions/increment-views.js @@ -0,0 +1,30 @@ +import { db } from '../src/lib/db-admin' + +exports.handler = async (event, context) => { + const { id } = event.queryStringParameters + if (!id) { + return { + statusCode: 400, + body: JSON.stringify({ + error: 'Missing "id" query parameter', + }), + } + } + + const ref = db.ref('joeprevite-dot-com/views').child(id) + const { snapshot } = await ref.transaction(currentViews => { + if (currentViews === null) { + return 1 + } + + return currentViews + 1 + }) + + return { + statusCode: 200, + body: JSON.stringify({ + pageId: id, + totalViews: snapshot.val(), + }), + } +} diff --git a/functions/page-views.js b/functions/page-views.js index 4af2a1e5..1f2cc574 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -27,7 +27,7 @@ exports.handler = async (event, context) => { statusCode: 200, body: JSON.stringify({ pageId: id, - totalViews: 100, + totalViews, }), } } diff --git a/package.json b/package.json index 24b92116..e4618c37 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "emotion": "^10.0.17", "emotion-server": "^10.0.17", "emotion-theming": "^10.0.19", + "firebase": "^7.14.6", "firebase-admin": "^8.12.1", "formik": "^2.0.8", "framer-motion": "^1.10.3", diff --git a/src/components/ViewCounter.js b/src/components/ViewCounter.js new file mode 100644 index 00000000..32bdc67b --- /dev/null +++ b/src/components/ViewCounter.js @@ -0,0 +1,49 @@ +/** + * credit to @leerob who wrote this + * @see https://github.com/leerob/leerob.io/blob/master/components/ViewCounter.js + */ +import React, { useState, useEffect } from 'react' +// import format from 'comma-number'; + +import { loadDb } from '../lib/db' + +const ViewCounter = ({ id }) => { + const [views, setViews] = useState('') + + useEffect(() => { + console.log('effect running') + const onViews = newViews => { + console.log(newViews.val(), 'is this empty') + setViews(newViews.val()) + } + let db + + const fetchData = async () => { + console.log('fetching data') + db = await loadDb() + console.log(db, 'hi db') + db.child(id).on('value', onViews) + } + + fetchData() + + return () => { + if (db) { + db.child(id).off('value', onViews) + } + } + }, [id]) + + console.log('show me the views', views) + + useEffect(() => { + const registerView = () => + fetch(`/.netlify/functions/increment-views?id=${id}`) + + registerView() + }, [id]) + + return

{`${views ? views : '–––'} views`}

+} + +export default ViewCounter diff --git a/src/lib/db.js b/src/lib/db.js new file mode 100644 index 00000000..e0be7519 --- /dev/null +++ b/src/lib/db.js @@ -0,0 +1,26 @@ +/** + * credit to @leerob who wrote this + * @see https://github.com/leerob/leerob.io/blob/master/lib/db.js + */ +export async function loadDb() { + const firebase = await import('firebase/app') + + await import('firebase/database') + + try { + firebase.initializeApp({ + databaseURL: 'https://website-pageviews-c8d4d.firebaseio.com/', + }) + } catch (error) { + /* + * We skip the "already exists" message which is + * not an actual error when we're hot-reloading. + */ + if (!/already exists/u.test(error.message)) { + // eslint-disable-next-line no-console + console.error('Firebase initialization error', error.stack) + } + } + + return firebase.database().ref('joeprevite-dot-com/views') +} diff --git a/src/templates/post.js b/src/templates/post.js index 6f6c736e..6e15f3ee 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -6,6 +6,7 @@ import SEO from 'components/SEO' import Container from 'components/Container' import Layout from '../components/Layout' import Share from '../components/Share' +import ViewCounter from '../components/ViewCounter' import config from '../../config/website' export default function Post({ @@ -60,7 +61,7 @@ export default function Post({ `} > {date &&

{date}

} -

12,000 views

+ {/* {banner && (
Date: Sun, 31 May 2020 18:29:10 -0700 Subject: [PATCH 19/26] feat: add comma number --- package.json | 1 + yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index e4618c37..05dd8bf9 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@mdx-js/mdx": "^1.5.1", "@mdx-js/react": "^1.5.5", "@weknow/gatsby-remark-twitter": "^0.2.3", + "comma-number": "^2.0.1", "core-js": "^3.3.3", "dotenv": "^8.2.0", "dotenv-parse-variables": "^0.2.3", diff --git a/yarn.lock b/yarn.lock index d28dca42..5213c7db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4908,6 +4908,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +comma-number@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/comma-number/-/comma-number-2.0.1.tgz#d01de3f207f00ccd593dcbcf17ac633bbb942b62" + integrity sha512-hrxY6UjA+tSUV5uZS2iOF8+/q7AACiq/zc9R6SO61MmOhrzNC0qXXh7g/jNYTm09fp6T40vQg15zkCmTJVA8Ww== + comma-separated-tokens@^1.0.0, comma-separated-tokens@^1.0.1: version "1.0.8" resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" From d29d025c30e63dee1b9cf1c143a77fd9a82dc6ce Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 18:29:41 -0700 Subject: [PATCH 20/26] feat: use slug in viewCounter --- src/templates/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/post.js b/src/templates/post.js index 6e15f3ee..71fd2463 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -61,7 +61,7 @@ export default function Post({ `} > {date &&

{date}

} - +
{/* {banner && (
Date: Sun, 31 May 2020 18:30:06 -0700 Subject: [PATCH 21/26] fix: update ViewCounter --- src/components/ViewCounter.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/components/ViewCounter.js b/src/components/ViewCounter.js index 32bdc67b..f2361b32 100644 --- a/src/components/ViewCounter.js +++ b/src/components/ViewCounter.js @@ -3,7 +3,7 @@ * @see https://github.com/leerob/leerob.io/blob/master/components/ViewCounter.js */ import React, { useState, useEffect } from 'react' -// import format from 'comma-number'; +import format from 'comma-number' import { loadDb } from '../lib/db' @@ -11,18 +11,15 @@ const ViewCounter = ({ id }) => { const [views, setViews] = useState('') useEffect(() => { - console.log('effect running') - const onViews = newViews => { - console.log(newViews.val(), 'is this empty') - setViews(newViews.val()) - } + const onViews = newViews => setViews(newViews.val()) + let db const fetchData = async () => { - console.log('fetching data') db = await loadDb() - console.log(db, 'hi db') - db.child(id).on('value', onViews) + db.child(id).on('value', onViews, error => { + console.error('Error reading value', error) + }) } fetchData() @@ -34,8 +31,6 @@ const ViewCounter = ({ id }) => { } }, [id]) - console.log('show me the views', views) - useEffect(() => { const registerView = () => fetch(`/.netlify/functions/increment-views?id=${id}`) @@ -43,7 +38,7 @@ const ViewCounter = ({ id }) => { registerView() }, [id]) - return

{`${views ? views : '–––'} views`}

+ return

{`${views ? format(views) : '–––'} views`}

} export default ViewCounter From 5eb36c7f5fb8ba2d6283a6a04adb1c604c1db557 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 18:34:55 -0700 Subject: [PATCH 22/26] fix: change posts to articles in search --- src/pages/articles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/articles.js b/src/pages/articles.js index e21d41fa..6cd16588 100644 --- a/src/pages/articles.js +++ b/src/pages/articles.js @@ -59,7 +59,7 @@ const Articles = ({ data: { site, allMdx } }) => { Date: Sun, 31 May 2020 19:19:38 -0700 Subject: [PATCH 23/26] feat: add page views to articles page --- functions/page-views.js | 4 +- package.json | 1 + src/components/Layout.js | 3 ++ src/components/Post.js | 110 +++++++++++++++++++++++++++++++++++++++ src/lib/db-admin.js | 4 ++ src/lib/fetcher.js | 9 ++++ src/pages/articles.js | 71 ++----------------------- src/pages/index.js | 6 --- yarn.lock | 9 +++- 9 files changed, 139 insertions(+), 78 deletions(-) create mode 100644 src/components/Post.js create mode 100644 src/lib/fetcher.js diff --git a/functions/page-views.js b/functions/page-views.js index 1f2cc574..961ff5db 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -10,8 +10,6 @@ exports.handler = async (event, context) => { }), } } - // working state - const ref = db.ref('joeprevite-dot-com/views').child(id) let totalViews @@ -27,7 +25,7 @@ exports.handler = async (event, context) => { statusCode: 200, body: JSON.stringify({ pageId: id, - totalViews, + totalViews: totalViews !== null ? totalViews : 0, }), } } diff --git a/package.json b/package.json index 05dd8bf9..6a04a301 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "react-share": "^4.0.1", "react-typography": "^0.16.19", "serve": "^11.2.0", + "swr": "^0.2.2", "typescript": "^3.8.3", "typography": "^0.16.19", "webpack-node-externals": "^1.7.2", diff --git a/src/components/Layout.js b/src/components/Layout.js index fc3b25d1..8c551f34 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -174,6 +174,9 @@ const getGlobalStyles = theme => { summary { display: list-item; } + small { + color: ${lighten(0.35, theme.colors.black)}; + } ` } diff --git a/src/components/Post.js b/src/components/Post.js new file mode 100644 index 00000000..3d7a666b --- /dev/null +++ b/src/components/Post.js @@ -0,0 +1,110 @@ +import React from 'react' +import useSWR from 'swr' +import format from 'comma-number' + +import { css } from '@emotion/core' +import { bpMaxSM } from '../lib/breakpoints' +import Link from './Link' +import fetcher from '../lib/fetcher' + +function Post({ post }) { + const { data } = useSWR( + `/.netlify/functions/page-views?id=${post.fields.slug}`, + fetcher, + ) + const views = data?.totalViews + console.log(views) + // if (typeof window !== 'undefined') { + // } + return ( +
+ {/* {post.frontmatter.banner && ( +
+ + + +
+ )} */} +
+

+ + {post.frontmatter.title} + +

+ {`${ + views !== null && views !== undefined ? format(views) : '–––' + } views`} +
+

+ {post.excerpt} +

{' '} + + Read Article → + +
+ ) +} + +export default Post diff --git a/src/lib/db-admin.js b/src/lib/db-admin.js index d4735b2a..0c64e56b 100644 --- a/src/lib/db-admin.js +++ b/src/lib/db-admin.js @@ -1,3 +1,7 @@ +/** + * credit to @leerob who wrote this + * @see https://github.com/leerob/leerob.io/blob/master/lib/db-admin.js + */ const admin = require('firebase-admin') try { diff --git a/src/lib/fetcher.js b/src/lib/fetcher.js new file mode 100644 index 00000000..9cfb6fa9 --- /dev/null +++ b/src/lib/fetcher.js @@ -0,0 +1,9 @@ +/** + * credit to @leerob who wrote this + * @see https://github.com/leerob/leerob.io/blob/master/lib/fetcher.js + */ +export default async (...args) => { + const res = await fetch(...args) + + return res.json() +} diff --git a/src/pages/articles.js b/src/pages/articles.js index 6cd16588..685d8d7e 100644 --- a/src/pages/articles.js +++ b/src/pages/articles.js @@ -4,8 +4,7 @@ import { css } from '@emotion/core' import Container from 'components/Container' import SEO from '../components/SEO' import Layout from '../components/Layout' -import Link from '../components/Link' -import { bpMaxSM } from '../lib/breakpoints' +import Post from '../components/Post' const Articles = ({ data: { site, allMdx } }) => { const allPosts = allMdx.edges @@ -57,6 +56,7 @@ const Articles = ({ data: { site, allMdx } }) => { `} > {
{posts.map(({ node: post }) => ( -
- {/* {post.frontmatter.banner && ( -
- - - -
- )} */} -

- - {post.frontmatter.title} - -

- {/* {post.frontmatter.date} */} -

- {post.excerpt} -

{' '} - - Read Article → - -
+ ))}
{ const theme = useTheme() const date = new Date() - if (typeof window !== 'undefined') { - fetch('/.netlify/functions/page-views') - .then(response => response.json()) - .then(console.log) - } - return (
Date: Sun, 31 May 2020 19:59:56 -0700 Subject: [PATCH 24/26] feat: get all views from page views --- functions/page-views.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/functions/page-views.js b/functions/page-views.js index 961ff5db..618d7ecc 100644 --- a/functions/page-views.js +++ b/functions/page-views.js @@ -2,25 +2,33 @@ import { db } from '../src/lib/db-admin' exports.handler = async (event, context) => { const { id } = event.queryStringParameters + if (!id) { + let totalViews + await db.ref('joeprevite-dot-com/views').once('value', snapshot => { + const views = snapshot.val() + // Grabs all the views for all posts + const allViews = Object.values(views).reduce( + (total, value) => total + value, + ) + totalViews = allViews + }) return { - statusCode: 400, + statusCode: 200, body: JSON.stringify({ - error: 'Missing "id" query parameter', + totalViews: totalViews || 0, }), } } + const ref = db.ref('joeprevite-dot-com/views').child(id) let totalViews await ref.once('value', snapshot => { const value = snapshot.val() - console.log('from firebase db:', value) totalViews = value }) - console.log('here is total views', totalViews) - return { statusCode: 200, body: JSON.stringify({ From c8072b19a0898bb214860c715fe21882d211b4f0 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Sun, 31 May 2020 20:00:06 -0700 Subject: [PATCH 25/26] fix: clean up Post --- src/components/Post.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Post.js b/src/components/Post.js index 3d7a666b..61eed5e7 100644 --- a/src/components/Post.js +++ b/src/components/Post.js @@ -12,10 +12,9 @@ function Post({ post }) { `/.netlify/functions/page-views?id=${post.fields.slug}`, fetcher, ) + const views = data?.totalViews - console.log(views) - // if (typeof window !== 'undefined') { - // } + return (
Date: Sun, 31 May 2020 20:00:11 -0700 Subject: [PATCH 26/26] feat: add open page --- src/pages/open.js | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/pages/open.js diff --git a/src/pages/open.js b/src/pages/open.js new file mode 100644 index 00000000..c0e294e0 --- /dev/null +++ b/src/pages/open.js @@ -0,0 +1,63 @@ +import React from 'react' +import { graphql } from 'gatsby' +import useSWR from 'swr' +import { css } from '@emotion/core' +import Container from 'components/Container' +import SEO from '../components/SEO' +import Layout from '../components/Layout' +import Link from '../components/Link' +import format from 'comma-number' + +import fetcher from '../lib/fetcher' + +const Open = ({ data: { site } }) => { + const { data } = useSWR(`/.netlify/functions/page-views`, fetcher) + + const totalPageViews = data?.totalViews + + return ( + + + +

Open

+

+ Inspired by the{' '} + + Open Startup movement + + , I aim to make this website Open as well, which means it operates + fully transparent and shares its metrics, like revenue(one day) and + traffic.{' '} +

+

+ This will eventually contain stats for different things like page + views, total words, total posts, newsletters, etc.{' '} +

+
+ + + + + + + + + + + +
MetricTotal
Article Views{format(totalPageViews)}
+
+
+
+ ) +} + +export default Open + +export const pageQuery = graphql` + query { + site { + ...site + } + } +`