diff --git a/package.json b/package.json index 196e97a..84e62de 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dropperx": "^1.0.1", "eitherx": "^1.0.2", "escape-goat": "^2.1.0", - "firebase": "6.4.2", + "firebase": "^6.6.1", "graphql": "^14.5.5", "highlight.js": "^9.15.10", "lodash.debounce": "^4.0.8", diff --git a/pages/snippets.js b/pages/snippets.js index cc69edc..5d31f67 100644 --- a/pages/snippets.js +++ b/pages/snippets.js @@ -185,10 +185,14 @@ function SnippetsPage() { React.useEffect(() => { if (user) { - const authorization = user.ra - loadMore(page, { authorization }).then(newSnippets => - setSnippets(curr => curr.concat(newSnippets)) - ) + user + .getIdToken() + // TODO move into `api.snippet.list` with axios interceptor or within wrappers + .then(authorization => + loadMore(page, { authorization }).then(newSnippets => + setSnippets(curr => curr.concat(newSnippets)) + ) + ) } }, [loadMore, page, user]) diff --git a/yarn.lock b/yarn.lock index 91ee6de..e25e136 100644 --- a/yarn.lock +++ b/yarn.lock @@ -936,29 +936,29 @@ resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.4.3.tgz#80d2b6e5ee43ac99892329ab02301ee7ed82da45" integrity sha512-VU5c+ZjejvefLVH4cjiX3Hy1w9HYMv7TtZ1tF9ZmOqT4DSIU1a3VISWoo8///cGGffr5IirMO+Q/WZLI4p8VcA== -"@firebase/app@0.4.15": - version "0.4.15" - resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.4.15.tgz#2ed75ec785530f1e54ceb0239a1975e2e273afe9" - integrity sha512-/LEOJREQVNWiDulkVCSsnYT8e1Oiti84PawkEuIaO7KmiEairb3BOr+p3N3xFOCqv6rrZLnM7CEqa2voNBoIlQ== +"@firebase/app@0.4.16": + version "0.4.16" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.4.16.tgz#9ddd8f9c0721ed61755e93322e7459e6b276eca8" + integrity sha512-4aa6ixQlV6xQxj4HbwFKrfYZnnKk8AtB/vEEuIaBCGQYBvV287OVNCozXd4CC4Q4I4Vtkzrc+kggahYFl8nDWQ== dependencies: "@firebase/app-types" "0.4.3" - "@firebase/logger" "0.1.23" - "@firebase/util" "0.2.26" + "@firebase/logger" "0.1.24" + "@firebase/util" "0.2.27" dom-storage "2.1.0" tslib "1.10.0" xmlhttprequest "1.8.0" -"@firebase/auth-types@0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.7.2.tgz#6343639d422ea84feddf619e22d8db7f63b0eb62" - integrity sha512-xm3evp6671LoI+6M8Om3OhikabLf88Ivz1e7aR8uZjVBYptEYbF3seDIyHn/3wWdVYbp20WK4aWixKlRnHl+6Q== +"@firebase/auth-types@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.8.0.tgz#10c0657847f6c311ef42e8a550bdbbb678ec86e4" + integrity sha512-foQHhvyB0RR+mb/+wmHXd/VOU+D8fruFEW1k79Q9wzyTPpovMBa1Mcns5fwEWBhUfi8bmoEtaGB8RSAHnTFzTg== -"@firebase/auth@0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.11.8.tgz#de6dcc51c450b1f47f1cf5441aed10dbe4cc4d65" - integrity sha512-aMSWaOCQmQtLKb1j96O7tErRx+kgq2OV3tMV/sKLkXp1J7SP03ejQfi+wOGDYnTWD6mNv+7b8ra1po+IHkydtg== +"@firebase/auth@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.12.0.tgz#e721323f8753f03b7387d899406c6f9e72f65876" + integrity sha512-DGYvAmz2aUmrWYS3ADw/UmsuicxJi6G+X38XITqNPUrd1YxmM5SBzX19oEb9WCrJZXcr4JaESg6hQkT2yEPaCA== dependencies: - "@firebase/auth-types" "0.7.2" + "@firebase/auth-types" "0.8.0" "@firebase/database-types@0.4.3": version "0.4.3" @@ -967,33 +967,33 @@ dependencies: "@firebase/app-types" "0.x" -"@firebase/database@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.5.1.tgz#8730efd869ab8d9d592128ed07bb67bbf3f0c286" - integrity sha512-foXZVl32fUcekk+G8I0eWn2jJqWnJMKIsENKwtlBRbBai8ud8oqHkz704D35zff0MndsNlVxuWAEl4gaPLjRDQ== +"@firebase/database@0.5.3": + version "0.5.3" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.5.3.tgz#e731de97f2d12490df1614a86b993e9ab86ed7cb" + integrity sha512-TFjQ/M0T4jO24jAMU5cZAHNk3ndNfeNtGKe5PL4o/YrGYJHg3XaE2LKzU/vFrXUFLnLxqbETzXjFa4hTA6cDUg== dependencies: "@firebase/database-types" "0.4.3" - "@firebase/logger" "0.1.23" - "@firebase/util" "0.2.26" + "@firebase/logger" "0.1.24" + "@firebase/util" "0.2.27" faye-websocket "0.11.3" tslib "1.10.0" -"@firebase/firestore-types@1.4.4": - version "1.4.4" - resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-1.4.4.tgz#3051a9c163b4b76ae04544629ff5e0777e452548" - integrity sha512-kFpmzkUKfzrXkcMad+TQlMs55dWNY0q1UxGICW82EneX3Yg6HN3Nx36kYfqH+SLBFUN1ZTikN07alMp0MA9p9g== - -"@firebase/firestore@1.4.12": - version "1.4.12" - resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-1.4.12.tgz#3e0dba9e17a673c67ad0b01824e7df000ffcc53d" - integrity sha512-jkedv/QW7hGlVyiCr0h4m7pcuzUbQngDDH/5TY5xUDAF87sUId5VBbRFC8x+XQ94EdEeMYHbQkqn7uIYQVEJIA== - dependencies: - "@firebase/firestore-types" "1.4.4" - "@firebase/logger" "0.1.23" - "@firebase/util" "0.2.26" - "@firebase/webchannel-wrapper" "0.2.25" +"@firebase/firestore-types@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-1.5.0.tgz#f05700220f882773ca01e818bf10b1dc456ee5be" + integrity sha512-VhRHNbEbak+R2iK8e1ir2Lec7eaHMZpGTRy6LMtzATYthlkwNHF9tO8JU8l6d1/kYkI4+DWzX++i3HhTziHEWA== + +"@firebase/firestore@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-1.5.2.tgz#798c6ef541ee982d473d58d0df440bc0381c5f80" + integrity sha512-CPYLvkGZBKE47oQC9a0q13UMVRj3LvnSbB1nOerktE3CGRHKy44LxDumamN8Kj067hV/80mKK9FdbeUufwO/Rg== + dependencies: + "@firebase/firestore-types" "1.5.0" + "@firebase/logger" "0.1.24" + "@firebase/util" "0.2.27" + "@firebase/webchannel-wrapper" "0.2.26" "@grpc/proto-loader" "^0.5.0" - grpc "1.22.2" + grpc "1.23.3" tslib "1.10.0" "@firebase/functions-types@0.3.8": @@ -1001,10 +1001,10 @@ resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.3.8.tgz#c01f670bbca04365e680d048b0fe5770a946f643" integrity sha512-9hajHxA4UWVCGFmoL8PBYHpamE3JTNjObieMmnvZw3cMRTP2EwipMpzZi+GPbMlA/9swF9yHCY/XFAEkwbvdgQ== -"@firebase/functions@0.4.16": - version "0.4.16" - resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.4.16.tgz#9e4bb139c9fbb15a0e5ca5ac839148fe789b6535" - integrity sha512-ZRbg1375AXsB5+QdZV9i1oazBVl8AykWqIZEqa8KZFQVTD6hqXqiZcq6rhZH8EGttFnfGH6U1YoOyAHiXpD3dw== +"@firebase/functions@0.4.17": + version "0.4.17" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.4.17.tgz#7dbcd41be888f7ce1f443480377d2eab8276d2f5" + integrity sha512-heWMXrR3hgvQNe1JEZMUeY7a0QFLMVwVS+lzLq/lzk06bj22X9bJy7Yct+/P9P1ftnsCGLrhk3jAEuL78seoqg== dependencies: "@firebase/functions-types" "0.3.8" "@firebase/messaging-types" "0.3.2" @@ -1016,33 +1016,33 @@ resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.1.2.tgz#ac2a912e078282fd270b03b571b4639ed88d871a" integrity sha512-fQaWIW8hyX1XUN7+FCSPjvM1agFjGidVuF4Sxi7aFwfyh5t+4fD2VpM4wCQbWmodnx4fZLvsuQd9mkxxU+lGYQ== -"@firebase/installations@0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.2.5.tgz#af4f0fe7c2e7b1fc15914fc6e34a11d670c5ddc0" - integrity sha512-W52L9emgRVYjeYqQeSeqITDhnleskJizeKrcLJvLCJGBoZJ68wBtp0Hby1QiDQy7gyF/cG5Xy+x7bJYgrMmy0w== +"@firebase/installations@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.2.6.tgz#a4b55e7ffc57eb4619478f9f54784626e0c22d6b" + integrity sha512-hkuKmBtnsmqIfWxt9KyaN+cP574pfTcB81IG5tnmVcgP1xQ4hyQ9LRP0M7jDTGWMw272TInBzUuaM05xw9GMnA== dependencies: "@firebase/installations-types" "0.1.2" - "@firebase/util" "0.2.26" + "@firebase/util" "0.2.27" idb "3.0.2" tslib "1.10.0" -"@firebase/logger@0.1.23": - version "0.1.23" - resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.1.23.tgz#32d7ff4d407f784ffdcc4c9081c11c9c6f01d9a0" - integrity sha512-/j4B4w/10gy5pG1SCudnjpc5jjqTkIQ+MfSXf7nnED0uTHmdODIWy59YK3cAH3tV7L/OSYPLwcRen7XURXRijQ== +"@firebase/logger@0.1.24": + version "0.1.24" + resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.1.24.tgz#770468c9f6c910c0db6008f7dccad88bb1df06d6" + integrity sha512-wPwhWCepEjWiTIqeC9U+7Hcw4XwezKPdXmyXbYSPiWNDcVekNgMPkntwSK+/2ufJO/1nMwAL2n6fL12oQG/PpQ== "@firebase/messaging-types@0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@firebase/messaging-types/-/messaging-types-0.3.2.tgz#cf802617c161434a02fe029290a79f422821d12f" integrity sha512-2qa2qNKqpalmtwaUV3+wQqfCm5myP/dViIBv+pXF8HinemIfO1IPQtr9pCNfsSYyus78qEhtfldnPWXxUH5v0w== -"@firebase/messaging@0.4.9": - version "0.4.9" - resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.4.9.tgz#24a4206fb40f164f97a7ceb1a8c65117313fec27" - integrity sha512-9Lgc/foGtnrgou6bPm6/NWBG9EMGQM2Ub+h+RGA6mhjLuHLhSssfPaOysVMoPnEZwomz03YpeyQ2Bgz6FjkyyQ== +"@firebase/messaging@0.4.10": + version "0.4.10" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.4.10.tgz#a4bfcab558bd4480d14331f8b9e1e7106731fe58" + integrity sha512-WqtSqlulV2ix4MZ3r1HwGAEj0DiEWtpNCSPh5wOXZsj8Kd01Q2QPTLUtUWmwXSV9WCQWnowfE2x8wjq5388ixw== dependencies: "@firebase/messaging-types" "0.3.2" - "@firebase/util" "0.2.26" + "@firebase/util" "0.2.27" tslib "1.10.0" "@firebase/performance-types@0.0.3": @@ -1050,21 +1050,21 @@ resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.0.3.tgz#bdd37975cd5f12a55d3951f4942c3fa2661b354f" integrity sha512-RuC63nYJPJU65AsrNMc3fTRcRgHiyNcQLh9ufeKUT1mEsFgpxr167gMb+tpzNU4jsbvM6+c6nQAFdHpqcGkRlQ== -"@firebase/performance@0.2.17": - version "0.2.17" - resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.2.17.tgz#b97d7986f76b40ce98d42576b19acd94bfa6fc6e" - integrity sha512-ybwTRxmpm4xiUCfApYFGZPGJIOWWxIc36Y0PxaaB0zWj4Ym1I1SDb0AGQ5mYOQj0VPlsGGsQtQ6E/gMl1NmaaA== +"@firebase/performance@0.2.18": + version "0.2.18" + resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.2.18.tgz#8a97622271ab6ecd918053437595fa53c1a03984" + integrity sha512-PcN+nTPaMGqODfwAXgwbaCvcxXH+YzvK6UpZzm0Bl9wmW28/oJipnUxF3cYbVGCiaLAaByIPVSIF22XhTOjUtA== dependencies: - "@firebase/installations" "0.2.5" - "@firebase/logger" "0.1.23" + "@firebase/installations" "0.2.6" + "@firebase/logger" "0.1.24" "@firebase/performance-types" "0.0.3" - "@firebase/util" "0.2.26" + "@firebase/util" "0.2.27" tslib "1.10.0" -"@firebase/polyfill@0.3.20": - version "0.3.20" - resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.20.tgz#c5d51a11b042cfa7184c8f8040d80f57560fac15" - integrity sha512-FsuQjuHiG4LCm7yswl1ioAOsNfoCLMdAgyLZ0SMEppEUUKUdaIRe6YtZDM6RWveJeUy4NrlQx7xK2OEwf5onjg== +"@firebase/polyfill@0.3.21": + version "0.3.21" + resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.21.tgz#f265b47a6217d155f9f6bfc636e13aa91a084586" + integrity sha512-2mqS3FQHMhCGyfMGRsaZEypHSBD8hVmp9ZBnZSkn8hq5sSOLiNTFSC0FsvNu5z99GNsPQJFTui8bxcZl5cHQbw== dependencies: core-js "3.2.1" promise-polyfill "8.1.3" @@ -1075,26 +1075,26 @@ resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.3.3.tgz#179ad38485d450023406cf9731560d690ef39d19" integrity sha512-fUp4kpbxwDiWs/aIBJqBvXgFHZvgoND2JA0gJYSEsXtWtVwfgzY/710plErgZDeQKopX5eOR1sHskZkQUy0U6w== -"@firebase/storage@0.3.10": - version "0.3.10" - resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.3.10.tgz#1f5e4354fd0ee18fe0f14d771373cab007247c86" - integrity sha512-cLi0kGcb0LZrvvNHZUmiXOBWVW+tK8HBnb5fBQ/neeVxEOnyVhgI3ONrnQLThELpDq3kxtXdvQqQK/WhpNIGHQ== +"@firebase/storage@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.3.11.tgz#fc238e7ec6a709bb70901bd9e6d8eefea333a935" + integrity sha512-Q2ffXE+X62gFy5mZkg7qhzAC7+kqaNZWpgS+297h/hWr/cFBDyC8eBPmnI509eKi2okixmOMbWnNluZkNYNSfw== dependencies: "@firebase/storage-types" "0.3.3" - "@firebase/util" "0.2.26" + "@firebase/util" "0.2.27" tslib "1.10.0" -"@firebase/util@0.2.26": - version "0.2.26" - resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.2.26.tgz#d55d767134fd9da033f7f5d639fb4b1ac6a80e92" - integrity sha512-GcKcDAlJ85i1MsURKr8v2k5fkE0FkuM0ap/rYuWs44vxd2U5x6fUdoUQrKnZlclTH/xj0z+qHVQB9Vrwvp7alw== +"@firebase/util@0.2.27": + version "0.2.27" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.2.27.tgz#6adac01023af835ed44379534b09fd1399f6f469" + integrity sha512-kFlbWNX1OuLfHrDXZ5QLmNNiLtMyxzbBgMo1DY1tXMjKK1AMYsHnyjInA8esvO0SCDp5XN3Pt9EDlhY4sRiLsw== dependencies: tslib "1.10.0" -"@firebase/webchannel-wrapper@0.2.25": - version "0.2.25" - resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.2.25.tgz#b8362a4847e5e4dd0aa79be65246c4b8b0df2abc" - integrity sha512-FHeGk7pymtfqZ6BI3TskaFfU/Vp8EsoTiPCFOwMEJb3L0mub3Z0PrTkC4IArELb6UDG1bfWSyxGxseLdIIhLIQ== +"@firebase/webchannel-wrapper@0.2.26": + version "0.2.26" + resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.2.26.tgz#4fe0e0a878d26af98901b29f051deed8017d6237" + integrity sha512-VlTurkvs4v7EVFWESBZGOPghFEokQhU5au5CP9WqA8B2/PcQRDsaaQlQCA6VATuEnW+vtSiSBvTiOc4004f8xg== "@grpc/proto-loader@^0.5.0": version "0.5.1" @@ -1244,6 +1244,14 @@ dependencies: any-observable "^0.3.0" +"@types/bytebuffer@^5.0.40": + version "5.0.40" + resolved "https://registry.yarnpkg.com/@types/bytebuffer/-/bytebuffer-5.0.40.tgz#d6faac40dcfb09cd856cdc4c01d3690ba536d3ee" + integrity sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g== + dependencies: + "@types/long" "*" + "@types/node" "*" + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -1258,7 +1266,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/long@^4.0.0": +"@types/long@*", "@types/long@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" integrity sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q== @@ -4101,23 +4109,23 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" -firebase@6.4.2: - version "6.4.2" - resolved "https://registry.yarnpkg.com/firebase/-/firebase-6.4.2.tgz#bcb5da227d64ea1ca4421db8e405473f2306e93e" - integrity sha512-2WxHVrd+4iIvAu30RGLYJbsZfXZMBEJON29dCMy+S22BstYvj1VnupYpV07/HUn6t38QcgoP8QGduKNgjSF3ng== +firebase@^6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-6.6.1.tgz#758beaba5e1729062279b2b288969df2af6f94f8" + integrity sha512-iXbHPIBRt04xYSjWffnARqZbc3vUc0RTnOHsMtAqaT7pqDWicaghEwj2WbCJ0+JLAiKnLNK7fTjW73zfKQSSoQ== dependencies: - "@firebase/app" "0.4.15" + "@firebase/app" "0.4.16" "@firebase/app-types" "0.4.3" - "@firebase/auth" "0.11.8" - "@firebase/database" "0.5.1" - "@firebase/firestore" "1.4.12" - "@firebase/functions" "0.4.16" - "@firebase/installations" "0.2.5" - "@firebase/messaging" "0.4.9" - "@firebase/performance" "0.2.17" - "@firebase/polyfill" "0.3.20" - "@firebase/storage" "0.3.10" - "@firebase/util" "0.2.26" + "@firebase/auth" "0.12.0" + "@firebase/database" "0.5.3" + "@firebase/firestore" "1.5.2" + "@firebase/functions" "0.4.17" + "@firebase/installations" "0.2.6" + "@firebase/messaging" "0.4.10" + "@firebase/performance" "0.2.18" + "@firebase/polyfill" "0.3.21" + "@firebase/storage" "0.3.11" + "@firebase/util" "0.2.27" flat-cache@^2.0.1: version "2.0.1" @@ -4502,11 +4510,12 @@ graphql@^14.5.5: dependencies: iterall "^1.2.2" -grpc@1.22.2: - version "1.22.2" - resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.22.2.tgz#1a60c728c692a93a85e855e35c2e0216654f0198" - integrity sha512-gaK59oAA5/mlOIn+hQO5JROPoAzsaGRpEMcrAayW5WGETS8QScpBoQ+XBxEWAAF0kbeGIELuGRCVEObKS1SLmw== +grpc@1.23.3: + version "1.23.3" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.23.3.tgz#30a013ca2cd7e350b0ffc0034be5380ddef3ae7f" + integrity sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw== dependencies: + "@types/bytebuffer" "^5.0.40" lodash.camelcase "^4.3.0" lodash.clone "^4.5.0" nan "^2.13.2"