From 6823a0b34401faf03c3c0ebca79a07e63b2e8915 Mon Sep 17 00:00:00 2001 From: Kevin Foong Date: Wed, 9 Jun 2021 03:26:38 +0800 Subject: [PATCH] Add user details in reducer, set up dummy profile page --- app/AuthContainer.tsx | 48 ++-- app/Router.tsx | 4 +- app/api/Auth.tsx | 3 +- .../LoginAvatar.tsx => user/Avatar.tsx} | 0 app/components/{login => user}/IconButton.tsx | 0 app/redux/actions/AuthActions.tsx | 8 +- app/redux/reducers/AuthReducer.tsx | 10 +- app/screens/auth/Login.tsx | 41 +++ app/screens/auth/LoginScreen.tsx | 33 --- app/screens/main/Profile.tsx | 42 +++ .../{general => misc}/SplashScreen.tsx | 0 package.json | 1 + yarn.lock | 249 ++++++++++++++++-- 13 files changed, 357 insertions(+), 82 deletions(-) rename app/components/{login/LoginAvatar.tsx => user/Avatar.tsx} (100%) rename app/components/{login => user}/IconButton.tsx (100%) create mode 100644 app/screens/auth/Login.tsx delete mode 100644 app/screens/auth/LoginScreen.tsx create mode 100644 app/screens/main/Profile.tsx rename app/screens/{general => misc}/SplashScreen.tsx (100%) diff --git a/app/AuthContainer.tsx b/app/AuthContainer.tsx index 7529a24e..ef3f0b48 100644 --- a/app/AuthContainer.tsx +++ b/app/AuthContainer.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useMemo } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { connect } from 'react-redux'; import * as WebBrowser from 'expo-web-browser'; import * as Google from 'expo-auth-session/providers/google'; @@ -9,7 +9,7 @@ import { IAction } from './redux/actions/ActionType'; import { save, getValueFor } from './utils/SecureStore'; import { authenticateGoogleAccessToken } from './api/Auth'; -import SplashScreen from './screens/general/SplashScreen'; +import SplashScreen from './screens/misc/SplashScreen'; import Router from './Router'; WebBrowser.maybeCompleteAuthSession(); @@ -18,7 +18,12 @@ type OwnProps = { } type DispatchProps = { - login: (userId: string, userToken: string) => IAction, + login: ( + userId: string, + userName: string, + userAvatar: string, + userToken: string + ) => IAction, logout: () => IAction, retrieveToken: (userToken: string | null) => IAction }; @@ -31,10 +36,14 @@ const AuthContainer = (props: OwnProps & DispatchProps) => { '455617521342-htliucvfap8nuqqoid8l31k463luh0ii.apps.googleusercontent.com' }); + // temp solution for triggering splash screen. + const [isLoading, setIsLoading] = useState(false); + const authContext = useMemo( () => ({ login: () => { promptAsync(); + setIsLoading(true); }, logout: () => { props.logout(); @@ -44,30 +53,33 @@ const AuthContainer = (props: OwnProps & DispatchProps) => { ); // check if userToken exists in secure store - useEffect(() => { - getValueFor('userToken') - .then((userToken) => { - props.retrieveToken(userToken); - }) - .catch((err) => console.error(err)); - }, []); + // useEffect(() => { + // getValueFor('userToken') + // .then((userToken) => { + // props.retrieveToken(userToken); + // }) + // .catch((err) => console.error(err)); + // }, []); // once accessToken is valid, retreives token for use with server useEffect(() => { if (res?.type === 'success') { - // auth data including access token const { authentication } = res; if (authentication?.accessToken) { authenticateGoogleAccessToken(authentication.accessToken) - .then((jwt) => { - if (jwt.data) { - save('userToken', jwt.data).then(() => - props.login('PLACEHOLDER ID', jwt.data) - ); + .then(({ data }) => { + if (data && data.userToken) { + // save('userToken', data.token).then(() => + props.login( + data.userId, + data.userName, + data.userAvatar, + data.userToken); + // ); } else { console.error('No valid JWT retrieved.'); } - }) + }).then(() => setIsLoading(false)) .catch((err) => console.error(err)); } } @@ -75,7 +87,7 @@ const AuthContainer = (props: OwnProps & DispatchProps) => { return ( <> - {!request + {!request || isLoading ? ( // TODO: fix splash screen with expo splash screen diff --git a/app/Router.tsx b/app/Router.tsx index b7083421..054a59bd 100644 --- a/app/Router.tsx +++ b/app/Router.tsx @@ -4,7 +4,7 @@ import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import HomeScreen from './screens/main/HomePage'; -import LoginScreen from './screens/auth/LoginScreen'; +import LoginScreen from './screens/auth/Login'; import { generateStackNavigatorWithScreens } from './utils/Navigator'; // Defines the screens on the root path @@ -33,8 +33,6 @@ type OwnProps = { }; const Router: React.FC = ({ userToken }: OwnProps) => { - console.log('UserToken', userToken); - return ( {userToken diff --git a/app/api/Auth.tsx b/app/api/Auth.tsx index 0debbff8..cc45d25f 100644 --- a/app/api/Auth.tsx +++ b/app/api/Auth.tsx @@ -1,6 +1,7 @@ import axios from 'axios'; -const resourceServerAuthURL = 'https://orbital-pets.herokuapp.com/auth/google'; +// const resourceServerAuthURL = 'https://orbital-pets.herokuapp.com/auth/google'; +const resourceServerAuthURL = 'http://localhost:3000/auth/google'; export const authenticateGoogleAccessToken = (accessToken: string) => { const config = { diff --git a/app/components/login/LoginAvatar.tsx b/app/components/user/Avatar.tsx similarity index 100% rename from app/components/login/LoginAvatar.tsx rename to app/components/user/Avatar.tsx diff --git a/app/components/login/IconButton.tsx b/app/components/user/IconButton.tsx similarity index 100% rename from app/components/login/IconButton.tsx rename to app/components/user/IconButton.tsx diff --git a/app/redux/actions/AuthActions.tsx b/app/redux/actions/AuthActions.tsx index 7c68ffca..c74d6ee6 100644 --- a/app/redux/actions/AuthActions.tsx +++ b/app/redux/actions/AuthActions.tsx @@ -1,9 +1,15 @@ import { IAction } from './ActionType'; -export const login = (userId: string, userToken: string): IAction => ({ +export const login = ( + userId: string, + userName: string, + userAvatar: string, + userToken: string): IAction => ({ type: 'LOGIN', payload: { userId, + userName, + userAvatar, userToken } }); diff --git a/app/redux/reducers/AuthReducer.tsx b/app/redux/reducers/AuthReducer.tsx index 484de83d..f2666600 100644 --- a/app/redux/reducers/AuthReducer.tsx +++ b/app/redux/reducers/AuthReducer.tsx @@ -17,12 +17,18 @@ export default (prevState = INITIAL_AUTH_STATE, action: IAction) => { case 'LOGIN': return { ...prevState, - userToken: action.payload.userToken + userToken: action.payload.userToken, + userId: action.payload.userId, + userName: action.payload.userName, + userAvatar: action.payload.userAvatar }; case 'LOGOUT': return { ...prevState, - userToken: null + userToken: null, + userId: null, + userName: null, + userAvatar: null }; default: return prevState; diff --git a/app/screens/auth/Login.tsx b/app/screens/auth/Login.tsx new file mode 100644 index 00000000..4efde559 --- /dev/null +++ b/app/screens/auth/Login.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { Layout } from '@ui-kitten/components'; + +import LoginStyles from '../../styles/Login.Styles'; +import IconButton from '../../components/user/IconButton'; +import LoginAvatar from '../../components/user/Avatar'; +import AuthContext from '../../contexts/AuthContext'; + +type OwnProps = { + userName?: string, + userAvatar?: string, + userId?: string +}; + +const LoginScreen: React.FC = (props: OwnProps) => { + const { login } = React.useContext(AuthContext); + + return ( + + + + + ); +}; + +const mapStateToProps = ({ auth } : any) => ({ + userName: auth.userName, + userAvatar: auth.userAvatar, + userId: auth.userId +}); + +export default connect(mapStateToProps)(LoginScreen); diff --git a/app/screens/auth/LoginScreen.tsx b/app/screens/auth/LoginScreen.tsx deleted file mode 100644 index 54a1ec9b..00000000 --- a/app/screens/auth/LoginScreen.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React, { useState } from 'react'; -import { Layout } from '@ui-kitten/components'; - -import LoginStyles from '../../styles/Login.Styles'; -import IconButton from '../../components/login/IconButton'; -import LoginAvatar from '../../components/login/LoginAvatar'; -import { IUser } from '../../types/UserTypes'; -import AuthContext from '../../contexts/AuthContext'; - -type LoginScreenProps = {}; - -const LoginScreen: React.FC = () => { - const { login } = React.useContext(AuthContext); - - const [user] = useState(undefined); - - return ( - - - - - ); -}; - -export default LoginScreen; diff --git a/app/screens/main/Profile.tsx b/app/screens/main/Profile.tsx new file mode 100644 index 00000000..65793106 --- /dev/null +++ b/app/screens/main/Profile.tsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { Layout } from '@ui-kitten/components'; + +import LoginStyles from '../../styles/Login.Styles'; +import IconButton from '../../components/user/IconButton'; +import LoginAvatar from '../../components/user/Avatar'; +import AuthContext from '../../contexts/AuthContext'; + +type OwnProps = { + userName?: string, + userAvatar?: string, + userId?: string + }; + +// TODO: WIP - just testing the redux store. +const ProfileScreen: React.FC = (props: OwnProps) => { + const { login } = React.useContext(AuthContext); + + return ( + + + + + ); +}; + +const mapStateToProps = ({ auth } : any) => ({ + userName: auth.userName, + userAvatar: auth.userAvatar, + userId: auth.userId +}); + +export default connect(mapStateToProps)(ProfileScreen); diff --git a/app/screens/general/SplashScreen.tsx b/app/screens/misc/SplashScreen.tsx similarity index 100% rename from app/screens/general/SplashScreen.tsx rename to app/screens/misc/SplashScreen.tsx diff --git a/package.json b/package.json index c79f5fc1..ac0c49af 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "react-native-svg": "12.1.0", "react-native-web": "^0.16.3", "react-redux": "^7.2.4", + "realm": "^10.4.1", "redux": "^4.1.0", "redux-thunk": "^2.3.0", "sharp-cli": "^1.15.0" diff --git a/yarn.lock b/yarn.lock index f39d44e4..444526fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3082,6 +3082,13 @@ agent-base@6: dependencies: debug "4" +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + agentkeepalive@^4.1.3: version "4.1.4" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.4.tgz#d928028a4862cb11718e55227872e842a44c945b" @@ -3371,6 +3378,20 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -4103,6 +4124,13 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +bson@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/bson/-/bson-4.4.0.tgz#6a4cac7de8c5cc24a9bcc059cd42a9852e2bad4a" + integrity sha512-uX9Zqzv2DpFXJgQOWKD8nbf0dTQV57WM8eiXDXVWeJYgiu/zIRz61OGLJKwbfSEEjZJ+AgS+7TUT7Y8EloTaqQ== + dependencies: + buffer "^5.6.0" + bubble-stream-error@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/bubble-stream-error/-/bubble-stream-error-1.0.0.tgz#7dad97f17128da396169bf37ada4acb195361e30" @@ -4163,7 +4191,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.2.0, buffer@^5.5.0: +buffer@^5.2.0, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -4353,6 +4381,11 @@ capture-exit@^2.0.0: dependencies: rsvp "^4.8.4" +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + integrity sha1-cVuW6phBWTzDMGeSP17GDr2k99c= + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -4689,6 +4722,15 @@ command-exists@^1.2.4, command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== +command-line-args@^4.0.6: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + commander@2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -4781,7 +4823,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@1.6.2, concat-stream@^1.5.0, concat-stream@^1.6.0: +concat-stream@1.6.2, concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@^1.5.0, concat-stream@^1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -4974,7 +5016,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.7.0: +create-react-class@*, create-react-class@^15.7.0: version "15.7.0" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.7.0.tgz#7499d7ca2e69bb51d13faf59bd04f0c65a1d6c1e" integrity sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng== @@ -5365,6 +5407,11 @@ deep-scope-analyser@^1.6.0: esrecurse "^4.2.1" estraverse "^4.2.0" +deepmerge@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.0.tgz#511a54fff405fc346f0240bb270a3e9533a31102" + integrity sha512-Q89Z26KAfA3lpPGhbF6XMfYAm3jIV3avViy6KOJ2JLzFbeWHOvPQUu5aSJIWXap3gDZC2y1eF5HXEPI2wGqgvw== + deepmerge@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7" @@ -5481,6 +5528,16 @@ deprecated-decorator@^0.1.6: resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" integrity sha1-AJZjF7ehL+kvPMgx91g68ym4bDc= +deprecated-react-native-listview@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/deprecated-react-native-listview/-/deprecated-react-native-listview-0.0.6.tgz#f9169dd703398a7792e5bcb8b851e741a8cb6980" + integrity sha512-QRuN0Dcv3Muu1oT8MhZgyfqm77bTAegVwqSRJKVwVVsm0xJE0TBfqdD45VXYLIS+yMXPJoeXdSqSdVQSjwlOpQ== + dependencies: + create-react-class "*" + fbjs "*" + invariant "*" + react-clone-referenced-element "*" + des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -5919,6 +5976,18 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + escalade@^3.0.2, escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -6743,6 +6812,19 @@ fbjs-scripts@^1.1.0: semver "^5.1.0" through2 "^2.0.0" +fbjs@*, fbjs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165" + integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== + dependencies: + cross-fetch "^3.0.4" + fbjs-css-vars "^1.0.0" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + fbjs@^0.8.4: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" @@ -6770,19 +6852,6 @@ fbjs@^1.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -fbjs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165" - integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== - dependencies: - cross-fetch "^3.0.4" - fbjs-css-vars "^1.0.0" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - fecha@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/fecha/-/fecha-3.0.3.tgz#fabbd416497649a42c24d34bfa726b579203a1e2" @@ -6911,6 +6980,14 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -7074,7 +7151,7 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^4.0.2: +fs-extra@^4.0.2, fs-extra@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== @@ -7725,6 +7802,15 @@ htmlparser2@^4.1.0: domutils "^2.0.0" entities "^2.0.0" +http-basic@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-2.5.1.tgz#8ce447bdb5b6c577f8a63e3fa78056ec4bb4dbfb" + integrity sha1-jORHvbW2xXf4pj4/p4BW7Eu02/s= + dependencies: + caseless "~0.11.0" + concat-stream "^1.4.6" + http-response-object "^1.0.0" + http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -7800,6 +7886,11 @@ http-proxy@^1.17.0: follow-redirects "^1.0.0" requires-port "^1.0.0" +http-response-object@^1.0.0, http-response-object@^1.0.1, http-response-object@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-1.1.0.tgz#a7c4e75aae82f3bb4904e4f43f615673b4d518c3" + integrity sha1-p8TnWq6C87tJBOT0P2FWc7TVGMM= + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -7822,6 +7913,14 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + 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" @@ -8002,7 +8101,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.5, ini@~1.3.0: +ini@^1.3.5, ini@^1.3.7, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -8051,7 +8150,7 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -invariant@^2.2.2, invariant@^2.2.4: +invariant@*, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -10584,19 +10683,19 @@ nocache@^2.1.0: resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.1.0.tgz#120c9ffec43b5729b1d5de88cd71aa75a0ba491f" integrity sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q== -node-abi@^2.7.0: +node-abi@^2.21.0, node-abi@^2.7.0: version "2.30.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.0.tgz#8be53bf3e7945a34eea10e0fc9a5982776cf550b" integrity sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg== dependencies: semver "^5.4.1" -node-addon-api@^3.0.0: +node-addon-api@^3.0.0, node-addon-api@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-fetch@2.6.1, node-fetch@^2.2.0, node-fetch@^2.6.0: +node-fetch@2.6.1, node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -10671,6 +10770,11 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" +node-machine-id@^1.1.10: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -12056,6 +12160,25 @@ prebuild-install@^5.3.4: tunnel-agent "^0.6.0" which-pm-runs "^1.0.0" +prebuild-install@^6.1.1: + version "6.1.3" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.3.tgz#8ea1f9d7386a0b30f7ef20247e36f8b2b82825a2" + integrity sha512-iqqSR84tNYQUQHRXalSKdIaM8Ov1QxOVuBNWI7+BzZWv6Ih9k75wOnH1rGQ9WWTaaLkTpxWKIciOF0KyfM74+Q== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.21.0" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -12310,7 +12433,7 @@ qs@6.9.1: resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9" integrity sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA== -qs@^6.5.0: +qs@^6.1.0, qs@^6.5.0: version "6.10.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== @@ -12427,6 +12550,11 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8, rc@~1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +react-clone-referenced-element@*: + version "1.1.1" + resolved "https://registry.yarnpkg.com/react-clone-referenced-element/-/react-clone-referenced-element-1.1.1.tgz#8d76727dc0459788e461741e804a512d20757381" + integrity sha512-LZBPvQV8W0B5dFzXFu+D3Tpil8YHS8tO00iFsfXcTLdtpuH7XyvaHqHcoz4hd4uNPQCZ30fceh+s7mLznzMXvg== + react-dev-utils@~11.0.1: version "11.0.4" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-11.0.4.tgz#a7ccb60257a1ca2e0efe7a83e38e6700d17aa37a" @@ -12735,6 +12863,40 @@ readdirp@~3.5.0: dependencies: picomatch "^2.2.1" +realm-network-transport@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/realm-network-transport/-/realm-network-transport-0.7.0.tgz#4b32e1fa6ef0a10361cd5b044f5d18f59faf72b1" + integrity sha512-w81+N+YrFBkWZWFlspDPrpot50xCkfr+AB+NCQjsTI6OfVF0igqhLfl3frwrSS61fQiL5XrZrFYFV6BWU0F+iA== + dependencies: + abort-controller "^3.0.0" + node-fetch "^2.6.0" + +realm@^10.4.1: + version "10.4.1" + resolved "https://registry.yarnpkg.com/realm/-/realm-10.4.1.tgz#575bb8e03dba9510289f7c1233e3635bee61110a" + integrity sha512-WpQFYkgkqxe1vSx9rPz9YYOMj6R6c0Po+Kib86rbskUbEBoCGVWtr6fiah/l3rQrJ1anVRqcjaP3LJ+DUQiDgg== + dependencies: + bindings "^1.5.0" + bson "^4.2.0" + command-line-args "^4.0.6" + deepmerge "2.1.0" + deprecated-react-native-listview "0.0.6" + fs-extra "^4.0.3" + https-proxy-agent "^2.2.4" + ini "^1.3.7" + node-addon-api "^3.1.0" + node-fetch "^2.6.1" + node-machine-id "^1.1.10" + prebuild-install "^6.1.1" + progress "^2.0.3" + prop-types "^15.6.2" + realm-network-transport "^0.7.0" + request "^2.88.0" + stream-counter "^1.0.0" + sync-request "^3.0.1" + tar "^6.0.1" + url-parse "^1.4.4" + realpath-native@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" @@ -13982,6 +14144,11 @@ stream-buffers@~2.2.0: resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ= +stream-counter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-counter/-/stream-counter-1.0.0.tgz#91cf2569ce4dc5061febcd7acb26394a5a114751" + integrity sha1-kc8lac5NxQYf6816yyY5SloRR1E= + stream-each@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" @@ -14299,6 +14466,15 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +sync-request@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-3.0.1.tgz#caa1235aaf889ba501076a1834c436830a82fb73" + integrity sha1-yqEjWq+Im6UBB2oYNMQ2gwqC+3M= + dependencies: + concat-stream "^1.4.7" + http-response-object "^1.0.1" + then-request "^2.0.1" + table@^6.0.9: version "6.7.1" resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" @@ -14350,7 +14526,7 @@ tar@4.4.6: safe-buffer "^5.1.2" yallist "^3.0.2" -tar@^6.0.2, tar@^6.0.5, tar@^6.1.0: +tar@^6.0.1, tar@^6.0.2, tar@^6.0.5, tar@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" integrity sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== @@ -14461,11 +14637,31 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + text-table@0.2.0, text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +then-request@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-2.2.0.tgz#6678b32fa0ca218fe569981bbd8871b594060d81" + integrity sha1-ZnizL6DKIY/laZgbvYhxtZQGDYE= + dependencies: + caseless "~0.11.0" + concat-stream "^1.4.7" + http-basic "^2.5.1" + http-response-object "^1.1.0" + promise "^7.1.1" + qs "^6.1.0" + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -14797,6 +14993,11 @@ typescript@^4.2.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + ua-parser-js@^0.7.18: version "0.7.28" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31"