From 67a9984d3e6bb81407ea06c766d84a98a1394a3d Mon Sep 17 00:00:00 2001 From: Bart Tadych Date: Wed, 21 Sep 2022 22:39:02 +0200 Subject: [PATCH] moralis auth firebase extension + demo. * moralis auth firebase extension + demo. poc. --- .changeset/config.json | 3 +- .changeset/shaggy-pears-poke.md | 5 + .github/workflows/docs.yml | 2 +- .github/workflows/main.yml | 8 +- demos/firebase-auth-ext/.firebaserc | 5 + demos/firebase-auth-ext/.gitignore | 5 + demos/firebase-auth-ext/README.md | 41 ++ demos/firebase-auth-ext/firebase.json | 25 + .../firebase-auth-ext/functions/.eslintrc.js | 4 + demos/firebase-auth-ext/functions/.gitignore | 9 + .../firebase-auth-ext/functions/package.json | 26 + .../firebase-auth-ext/functions/src/index.ts | 12 + .../functions/tsconfig.dev.json | 3 + .../firebase-auth-ext/functions/tsconfig.json | 16 + demos/firebase-auth-ext/hosting/.env.example | 11 + demos/firebase-auth-ext/hosting/.eslintrc.js | 4 + demos/firebase-auth-ext/hosting/.gitignore | 23 + demos/firebase-auth-ext/hosting/package.json | 46 ++ .../hosting/public/index.html | 22 + .../hosting/public/robots.txt | 3 + demos/firebase-auth-ext/hosting/src/App.tsx | 87 +++ .../hosting/src/connectors.ts | 31 + .../firebase-auth-ext/hosting/src/firebase.ts | 28 + demos/firebase-auth-ext/hosting/src/index.tsx | 17 + .../hosting/src/setupTests.ts | 5 + demos/firebase-auth-ext/hosting/tsconfig.json | 20 + demos/firebase-auth/.gitignore | 2 +- package.json | 3 +- packages/clientFirebaseAuth/.eslintrc.js | 5 + packages/clientFirebaseAuth/README.md | 3 + packages/clientFirebaseAuth/jest.config.js | 4 + packages/clientFirebaseAuth/package.json | 28 + .../clientFirebaseAuth/src/NetworkType.ts | 1 + .../clientFirebaseAuth/src/getMoralisAuth.ts | 42 ++ packages/clientFirebaseAuth/src/index.ts | 3 + .../clientFirebaseAuth/src/requestMessage.ts | 82 +++ .../src/signInWithMoralis.ts | 35 ++ packages/clientFirebaseAuth/tsconfig.json | 9 + yarn.lock | 555 +++++++++++++++++- 39 files changed, 1217 insertions(+), 16 deletions(-) create mode 100644 .changeset/shaggy-pears-poke.md create mode 100644 demos/firebase-auth-ext/.firebaserc create mode 100644 demos/firebase-auth-ext/.gitignore create mode 100644 demos/firebase-auth-ext/README.md create mode 100644 demos/firebase-auth-ext/firebase.json create mode 100644 demos/firebase-auth-ext/functions/.eslintrc.js create mode 100644 demos/firebase-auth-ext/functions/.gitignore create mode 100644 demos/firebase-auth-ext/functions/package.json create mode 100644 demos/firebase-auth-ext/functions/src/index.ts create mode 100644 demos/firebase-auth-ext/functions/tsconfig.dev.json create mode 100644 demos/firebase-auth-ext/functions/tsconfig.json create mode 100644 demos/firebase-auth-ext/hosting/.env.example create mode 100644 demos/firebase-auth-ext/hosting/.eslintrc.js create mode 100644 demos/firebase-auth-ext/hosting/.gitignore create mode 100644 demos/firebase-auth-ext/hosting/package.json create mode 100644 demos/firebase-auth-ext/hosting/public/index.html create mode 100644 demos/firebase-auth-ext/hosting/public/robots.txt create mode 100644 demos/firebase-auth-ext/hosting/src/App.tsx create mode 100644 demos/firebase-auth-ext/hosting/src/connectors.ts create mode 100644 demos/firebase-auth-ext/hosting/src/firebase.ts create mode 100644 demos/firebase-auth-ext/hosting/src/index.tsx create mode 100644 demos/firebase-auth-ext/hosting/src/setupTests.ts create mode 100644 demos/firebase-auth-ext/hosting/tsconfig.json create mode 100644 packages/clientFirebaseAuth/.eslintrc.js create mode 100644 packages/clientFirebaseAuth/README.md create mode 100644 packages/clientFirebaseAuth/jest.config.js create mode 100644 packages/clientFirebaseAuth/package.json create mode 100644 packages/clientFirebaseAuth/src/NetworkType.ts create mode 100644 packages/clientFirebaseAuth/src/getMoralisAuth.ts create mode 100644 packages/clientFirebaseAuth/src/index.ts create mode 100644 packages/clientFirebaseAuth/src/requestMessage.ts create mode 100644 packages/clientFirebaseAuth/src/signInWithMoralis.ts create mode 100644 packages/clientFirebaseAuth/tsconfig.json diff --git a/.changeset/config.json b/.changeset/config.json index 60a2990795..e1f3f3ef4d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -12,7 +12,8 @@ "@moralisweb3/evm-utils", "@moralisweb3/sol-utils", "@moralisweb3/evm-api", - "@moralisweb3/sol-api" + "@moralisweb3/sol-api", + "@moralisweb3/client-firebase-auth" ] ], "linked": [], diff --git a/.changeset/shaggy-pears-poke.md b/.changeset/shaggy-pears-poke.md new file mode 100644 index 0000000000..64778d6382 --- /dev/null +++ b/.changeset/shaggy-pears-poke.md @@ -0,0 +1,5 @@ +--- +'@moralisweb3/client-firebase-auth': patch +--- + +Add client package for Firebase authentication. diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b9ce46d547..34b649f467 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,7 +20,7 @@ jobs: id: cache with: path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C5 + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C6 - name: Install packages if: steps.cache.outputs.cache-hit != 'true' run: yarn install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc1c2ba26c..ac5d9044d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: id: cache with: path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C5 + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C6 - name: Install packages if: steps.cache.outputs.cache-hit != 'true' run: yarn install @@ -55,7 +55,7 @@ jobs: id: cache with: path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C5 + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C6 - name: ESLint run: yarn lint continue-on-error: true @@ -87,7 +87,7 @@ jobs: id: cache with: path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C5 + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C6 - name: Prettier run: yarn format:check @@ -111,7 +111,7 @@ jobs: id: cache with: path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C5 + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}_C6 - name: Build run: yarn build:clean - name: Test diff --git a/demos/firebase-auth-ext/.firebaserc b/demos/firebase-auth-ext/.firebaserc new file mode 100644 index 0000000000..b49ad35cde --- /dev/null +++ b/demos/firebase-auth-ext/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": {}, + "targets": {}, + "etags": {} +} diff --git a/demos/firebase-auth-ext/.gitignore b/demos/firebase-auth-ext/.gitignore new file mode 100644 index 0000000000..c90f3c7082 --- /dev/null +++ b/demos/firebase-auth-ext/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +lib/ +.firebase/ +*.env +*-debug.log diff --git a/demos/firebase-auth-ext/README.md b/demos/firebase-auth-ext/README.md new file mode 100644 index 0000000000..81cd0358c0 --- /dev/null +++ b/demos/firebase-auth-ext/README.md @@ -0,0 +1,41 @@ +# Authenticate with Moralis Extension for Firebase Demo + +This project contains a simple authentication demo for the Firebase by a Web3 wallet. It uses the Authenticate with Moralis Auth extension for the Firebase. + +Required Google Cloud services: + +- [Firebase Hosting](https://firebase.google.com/docs/hosting) +- [Firebase Authentication](https://firebase.google.com/docs/auth) +- [Firebase Cloud Functions](https://firebase.google.com/docs/functions) (only in the Blaze plan, check the [pricing](https://firebase.google.com/pricing)). +- [Secret Manager](https://cloud.google.com/secret-manager/) (check the [pricing](https://cloud.google.com/secret-manager/pricing)) + +## 🚀 How to Start + +1. Clone this repo. +2. [Install Firebase CLI](https://firebase.google.com/docs/cli) globally: `npm install -g firebase-tools` +3. Login to your account: `firebase login` +4. Get list of your projects: `firebase projects:list`. If this list is empty you should add a new project. You can do it by the Firebase Console. +5. Set your project ID: `firebase use ` +6. Generate a certificate for the [Service Account](https://firebase.google.com/support/guides/service-accounts). You will need it in the next step. +7. Convert the certificate to extension variables by [this online converter](https://moralisweb3.github.io/firebase-extensions/service-account-converter/). You will use these variables in the next step. +8. Install the Authenticate with Moralis Web3 extension: `firebase ext:install moralis/moralis-auth`. +9. Copy `hosting/.env.example` to `hosting/.env` and set all variables. +10. Build the functions project: + * `cd functions` + * `npm install` + * `npm run build` +11. Build the hosting project: + * `cd hosting` + * `npm install` + * `npm run build` + +### 🔌 Run Locally + +1. [Install Java](https://www.oracle.com/java/technologies/javase/jdk18-archive-downloads.html) on your computer. Functions Emulator requires Java. +2. Run emulators: `firebase emulators:start` +3. Open `http://localhost:5555/` in your browser. + +### 🔥 Deploy to Production + +1. Deploy: `firebase deploy` +2. If you have any problem with the CORS on the production, probably you should allow unauthenticated HTTP function invocation. To allow unauthenticated invocation you must specify this at or after deployment. [Here](https://cloud.google.com/functions/docs/securing/managing-access-iam#allowing_unauthenticated_http_function_invocation) you can read more about it. diff --git a/demos/firebase-auth-ext/firebase.json b/demos/firebase-auth-ext/firebase.json new file mode 100644 index 0000000000..8bcfb87eab --- /dev/null +++ b/demos/firebase-auth-ext/firebase.json @@ -0,0 +1,25 @@ +{ + "functions": { + "ignore": ["node_modules"], + "source": "functions", + "predeploy": [ + "yarn --cwd \"$RESOURCE_DIR\" install", + "yarn --cwd \"$RESOURCE_DIR\" run lint", + "yarn --cwd \"$RESOURCE_DIR\" run build" + ] + }, + "hosting": { + "ignore": ["node_modules"], + "public": "hosting/build", + "predeploy": [ + "yarn --cwd \"$RESOURCE_DIR\" install", + "yarn --cwd \"$RESOURCE_DIR\" run lint", + "yarn --cwd \"$RESOURCE_DIR\" run build" + ] + }, + "emulators": { + "hosting": { + "port": 5555 + } + } +} diff --git a/demos/firebase-auth-ext/functions/.eslintrc.js b/demos/firebase-auth-ext/functions/.eslintrc.js new file mode 100644 index 0000000000..e604ba8d02 --- /dev/null +++ b/demos/firebase-auth-ext/functions/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: ['@moralisweb3'], + ignorePatterns: ['**/lib/**/*'], +}; diff --git a/demos/firebase-auth-ext/functions/.gitignore b/demos/firebase-auth-ext/functions/.gitignore new file mode 100644 index 0000000000..65b4c06ecf --- /dev/null +++ b/demos/firebase-auth-ext/functions/.gitignore @@ -0,0 +1,9 @@ +# Compiled JavaScript files +lib/**/*.js +lib/**/*.js.map + +# TypeScript v1 declaration files +typings/ + +# Node.js dependency directory +node_modules/ diff --git a/demos/firebase-auth-ext/functions/package.json b/demos/firebase-auth-ext/functions/package.json new file mode 100644 index 0000000000..eb06b7f920 --- /dev/null +++ b/demos/firebase-auth-ext/functions/package.json @@ -0,0 +1,26 @@ +{ + "name": "demo-firebase-auth-ext-functions", + "version": "1.0.0", + "scripts": { + "lint": "eslint --ext .js,.ts .", + "build": "tsc", + "build:watch": "tsc --watch" + }, + "engines": { + "node": "16" + }, + "main": "lib/index.js", + "dependencies": { + "firebase-functions": "^3.18.0", + "firebase-admin": "^10.3.0" + }, + "devDependencies": { + "@moralisweb3/eslint-config": "^1.0.0", + "typescript": "^4.5.4", + "@typescript-eslint/eslint-plugin": "^5.36.2", + "@typescript-eslint/parser": "^5.36.2", + "eslint-plugin-etc": "^2.0.2", + "firebase-functions-test": "^0.2.0" + }, + "private": true +} diff --git a/demos/firebase-auth-ext/functions/src/index.ts b/demos/firebase-auth-ext/functions/src/index.ts new file mode 100644 index 0000000000..676ac509e0 --- /dev/null +++ b/demos/firebase-auth-ext/functions/src/index.ts @@ -0,0 +1,12 @@ +import * as functions from 'firebase-functions'; + +// ~/getSecretData + +export const getSecretData = functions.https.onCall(async (data, context) => { + if (!context.auth?.uid) { + throw new functions.https.HttpsError('permission-denied', 'You are not authorized to call this function'); + } + + const secretValue = 'I am a secret'; + return { secretValue }; +}); diff --git a/demos/firebase-auth-ext/functions/tsconfig.dev.json b/demos/firebase-auth-ext/functions/tsconfig.dev.json new file mode 100644 index 0000000000..a76fcab09a --- /dev/null +++ b/demos/firebase-auth-ext/functions/tsconfig.dev.json @@ -0,0 +1,3 @@ +{ + "include": ["./.eslintrc.js"] +} diff --git a/demos/firebase-auth-ext/functions/tsconfig.json b/demos/firebase-auth-ext/functions/tsconfig.json new file mode 100644 index 0000000000..fa91c5e020 --- /dev/null +++ b/demos/firebase-auth-ext/functions/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitReturns": true, + "noUnusedLocals": true, + "outDir": "lib", + "sourceMap": true, + "strict": true, + "target": "es2017", + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true + }, + "compileOnSave": true, + "include": ["src"] +} diff --git a/demos/firebase-auth-ext/hosting/.env.example b/demos/firebase-auth-ext/hosting/.env.example new file mode 100644 index 0000000000..7817580f8d --- /dev/null +++ b/demos/firebase-auth-ext/hosting/.env.example @@ -0,0 +1,11 @@ +# To get the configuration of your Firebase app: +# open the Firebase Console > Project Settings > General > Your Apps and click Add app > Web app +# or +# execute `firebase apps:sdkconfig` command in the project directory + +REACT_APP_FIREBASE_API_KEY=replace_me +REACT_APP_FIREBASE_AUTH_DOMAIN=replace_me +REACT_APP_FIREBASE_PROJECT_ID=replace_me +REACT_APP_FIREBASE_STORAGE_BUCKET=replace_me +REACT_APP_FIREBASE_MESSAGING_SENDER_ID=replace_me +REACT_APP_FIREBASE_APP_ID=replace_me diff --git a/demos/firebase-auth-ext/hosting/.eslintrc.js b/demos/firebase-auth-ext/hosting/.eslintrc.js new file mode 100644 index 0000000000..e604ba8d02 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: ['@moralisweb3'], + ignorePatterns: ['**/lib/**/*'], +}; diff --git a/demos/firebase-auth-ext/hosting/.gitignore b/demos/firebase-auth-ext/hosting/.gitignore new file mode 100644 index 0000000000..4d29575de8 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/demos/firebase-auth-ext/hosting/package.json b/demos/firebase-auth-ext/hosting/package.json new file mode 100644 index 0000000000..e9f72863a6 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/package.json @@ -0,0 +1,46 @@ +{ + "name": "demo-firebase-auth-ext-hosting", + "version": "1.0.0", + "private": true, + "dependencies": { + "@ethersproject/providers": "^5.7.1", + "@moralisweb3/client-firebase-auth": "^2.5.2", + "@testing-library/jest-dom": "^5.16.5", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^13.5.0", + "@types/jest": "^27.5.2", + "@types/node": "^16.11.58", + "@types/react": "^18.0.19", + "@types/react-dom": "^18.0.6", + "bs58": "^5.0.0", + "firebase": "^9.9.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-scripts": "5.0.1", + "typescript": "^4.8.3", + "web-vitals": "^2.1.4" + }, + "scripts": { + "lint": "eslint --ext .js,.ts ./src", + "build": "react-scripts build", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/demos/firebase-auth-ext/hosting/public/index.html b/demos/firebase-auth-ext/hosting/public/index.html new file mode 100644 index 0000000000..2bdc7cb52d --- /dev/null +++ b/demos/firebase-auth-ext/hosting/public/index.html @@ -0,0 +1,22 @@ + + + + + Moralis Auth Demo + + + + + + +
+ + diff --git a/demos/firebase-auth-ext/hosting/public/robots.txt b/demos/firebase-auth-ext/hosting/public/robots.txt new file mode 100644 index 0000000000..e9e57dc4d4 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/demos/firebase-auth-ext/hosting/src/App.tsx b/demos/firebase-auth-ext/hosting/src/App.tsx new file mode 100644 index 0000000000..2afb692838 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/src/App.tsx @@ -0,0 +1,87 @@ +import { SignInContext, requestMessage, signInWithMoralis } from '@moralisweb3/client-firebase-auth'; +import { auth, functions, moralisAuth } from './firebase'; +import { httpsCallable } from '@firebase/functions'; +import { User } from '@firebase/auth'; +import { Fragment, useState } from 'react'; +import { connectToMetamask, connectToPhantom } from './connectors'; +import { encode } from 'bs58'; + +export function App() { + const [currentUser, setCurrentUser] = useState(() => auth.currentUser); + + async function signInWithMetamask() { + const { signer, chain, address } = await connectToMetamask(); + + const context = await requestMessage(moralisAuth, { networkType: 'evm', address, chain }); + + const signature = await signer.signMessage(context.message); + + signIn(context, signature); + } + + async function signInWithPhantom() { + const { signer, address } = await connectToPhantom(); + + const context = await requestMessage(moralisAuth, { networkType: 'solana', address, network: 'mainnet' }); + + const encodedMessage = new TextEncoder().encode(context.message); + + const signature = await signer.signMessage(encodedMessage); + + signIn(context, encode(signature.signature)); + } + + async function signIn(context: SignInContext, signature: string) { + const credentials = await signInWithMoralis(moralisAuth, { context, signature }); + // eslint-disable-next-line no-console + console.log(credentials); + setCurrentUser(credentials.user); + } + + async function signOut() { + await auth.signOut(); + setCurrentUser(null); + } + + async function getSecretData() { + try { + const response = await httpsCallable(functions, 'getSecretData')({}); + // eslint-disable-next-line no-alert, no-undef + alert(JSON.stringify(response)); + } catch (e) { + // eslint-disable-next-line no-alert, no-undef + alert((e as Error).message); + } + } + + return ( +
+

🔒 Authenticate with Moralis Web3

+ +

+ Current user:  + + {currentUser ? ( + + address: {currentUser.displayName}, uid: {currentUser.uid} + + ) : ( + 'unknown' + )} + +

+ +

Authentication

+ + + + + + + +

Test

+ + +
+ ); +} diff --git a/demos/firebase-auth-ext/hosting/src/connectors.ts b/demos/firebase-auth-ext/hosting/src/connectors.ts new file mode 100644 index 0000000000..1ca150ef1d --- /dev/null +++ b/demos/firebase-auth-ext/hosting/src/connectors.ts @@ -0,0 +1,31 @@ +import { Web3Provider } from '@ethersproject/providers'; + +export async function connectToMetamask() { + // eslint-disable-next-line no-undef, @typescript-eslint/no-explicit-any + const provider = new Web3Provider((window as any)['ethereum'], 'any'); + + const [accounts, chainId] = await Promise.all([ + provider.send('eth_requestAccounts', []), + provider.send('eth_chainId', []), + ]); + + const signer = provider.getSigner(); + return { signer, chain: chainId as number, address: accounts[0] as string }; +} + +export async function connectToPhantom(): Promise<{ + signer: { + signMessage(message: Uint8Array): Promise<{ signature: Uint8Array }>; + }; + address: string; +}> { + // eslint-disable-next-line no-undef, @typescript-eslint/no-explicit-any + const provider = (window as any)['solana']; + if (!provider.isPhantom) { + throw new Error('Solana provider not found'); + } + + await provider.connect(); + const address = provider.publicKey.toBase58(); + return { signer: provider, address }; +} diff --git a/demos/firebase-auth-ext/hosting/src/firebase.ts b/demos/firebase-auth-ext/hosting/src/firebase.ts new file mode 100644 index 0000000000..6f197f7292 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/src/firebase.ts @@ -0,0 +1,28 @@ +import { initializeApp } from '@firebase/app'; +import { getAuth, browserSessionPersistence } from '@firebase/auth'; +import { connectFunctionsEmulator, getFunctions } from '@firebase/functions'; +import { getMoralisAuth } from '@moralisweb3/client-firebase-auth'; + +export const app = initializeApp({ + apiKey: String(process.env.REACT_APP_FIREBASE_API_KEY), + authDomain: String(process.env.REACT_APP_FIREBASE_AUTH_DOMAIN), + projectId: String(process.env.REACT_APP_FIREBASE_PROJECT_ID), + storageBucket: String(process.env.REACT_APP_FIREBASE_STORAGE_BUCKET), + messagingSenderId: String(process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID), + appId: String(process.env.REACT_APP_FIREBASE_APP_ID), +}); + +export const auth = getAuth(app); + +export const functions = getFunctions(app); + +export const moralisAuth = getMoralisAuth(app); + +export async function initFirebase() { + // eslint-disable-next-line no-undef + if (window.location.hostname === 'localhost') { + connectFunctionsEmulator(functions, 'localhost', 5001); + } + + await auth.setPersistence(browserSessionPersistence); +} diff --git a/demos/firebase-auth-ext/hosting/src/index.tsx b/demos/firebase-auth-ext/hosting/src/index.tsx new file mode 100644 index 0000000000..b0decb7bbe --- /dev/null +++ b/demos/firebase-auth-ext/hosting/src/index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { App } from './App'; +import { initFirebase } from './firebase'; + +async function run() { + await initFirebase(); + + const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement); + root.render( + + + , + ); +} + +run(); diff --git a/demos/firebase-auth-ext/hosting/src/setupTests.ts b/demos/firebase-auth-ext/hosting/src/setupTests.ts new file mode 100644 index 0000000000..8f2609b7b3 --- /dev/null +++ b/demos/firebase-auth-ext/hosting/src/setupTests.ts @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom'; diff --git a/demos/firebase-auth-ext/hosting/tsconfig.json b/demos/firebase-auth-ext/hosting/tsconfig.json new file mode 100644 index 0000000000..9d379a3c4a --- /dev/null +++ b/demos/firebase-auth-ext/hosting/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src"] +} diff --git a/demos/firebase-auth/.gitignore b/demos/firebase-auth/.gitignore index d4e6e0dc2d..ce60ab1923 100644 --- a/demos/firebase-auth/.gitignore +++ b/demos/firebase-auth/.gitignore @@ -1,6 +1,6 @@ node_modules/ lib/ .firebase/ -.env +*.env *-debug.log serviceAccountCert.json diff --git a/package.json b/package.json index 6ae62101a9..3c27b233d5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,8 @@ "packages/*", "demos/*", "demos/firebase-proxy/*", - "demos/firebase-auth/*" + "demos/firebase-auth/*", + "demos/firebase-auth-ext/*" ] }, "resolutions": { diff --git a/packages/clientFirebaseAuth/.eslintrc.js b/packages/clientFirebaseAuth/.eslintrc.js new file mode 100644 index 0000000000..92cea72b04 --- /dev/null +++ b/packages/clientFirebaseAuth/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + extends: ['@moralisweb3'], + plugins: ['jest'], + ignorePatterns: ['**/lib/**/*', '**/*.test.ts', '**/dist/**/*', '**/build/**/*', '**/generated/**/*'], +}; diff --git a/packages/clientFirebaseAuth/README.md b/packages/clientFirebaseAuth/README.md new file mode 100644 index 0000000000..8f27c28da8 --- /dev/null +++ b/packages/clientFirebaseAuth/README.md @@ -0,0 +1,3 @@ +# @moralisweb3/client-firebase-auth + +This package contains utilities for the **Authenticate with Moralis Web3** extension for the Firebase. diff --git a/packages/clientFirebaseAuth/jest.config.js b/packages/clientFirebaseAuth/jest.config.js new file mode 100644 index 0000000000..1c13fbaa33 --- /dev/null +++ b/packages/clientFirebaseAuth/jest.config.js @@ -0,0 +1,4 @@ +/* eslint-disable global-require */ +module.exports = { + ...require('../../jest.config'), +}; diff --git a/packages/clientFirebaseAuth/package.json b/packages/clientFirebaseAuth/package.json new file mode 100644 index 0000000000..e0153de5e8 --- /dev/null +++ b/packages/clientFirebaseAuth/package.json @@ -0,0 +1,28 @@ +{ + "name": "@moralisweb3/client-firebase-auth", + "author": "Moralis", + "version": "2.5.2", + "license": "MIT", + "private": false, + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "sideEffects": false, + "files": [ + "lib/*" + ], + "scripts": { + "lint": "eslint . --ext .js,.ts,.tsx,jsx", + "clean": "rm -rf lib && rm -rf tsconfig.tsbuildinfo && rm -rf ./node_modules/.cache/nx", + "build": "tsc", + "dev": "tsc --watch" + }, + "devDependencies": { + "prettier": "^2.5.1", + "typescript": "^4.5.5" + }, + "dependencies": { + "@firebase/functions": "^0.8.4", + "@firebase/auth": "^0.20.6", + "@firebase/app": "^0.7.32" + } +} diff --git a/packages/clientFirebaseAuth/src/NetworkType.ts b/packages/clientFirebaseAuth/src/NetworkType.ts new file mode 100644 index 0000000000..96099f4c1b --- /dev/null +++ b/packages/clientFirebaseAuth/src/NetworkType.ts @@ -0,0 +1 @@ +export type NetworkType = 'evm' | 'solana'; diff --git a/packages/clientFirebaseAuth/src/getMoralisAuth.ts b/packages/clientFirebaseAuth/src/getMoralisAuth.ts new file mode 100644 index 0000000000..46004b1ace --- /dev/null +++ b/packages/clientFirebaseAuth/src/getMoralisAuth.ts @@ -0,0 +1,42 @@ +import { Functions, getFunctions } from '@firebase/functions'; +import { FirebaseApp, getApp } from '@firebase/app'; +import { Auth, getAuth } from '@firebase/auth'; + +export interface MoralisAuth { + auth: Auth; + functions: Functions; + functionNamePrefix: string; +} + +export interface MoralisAuthOptions { + /** + * @default "ext-moralis-auth-" + */ + functionNamePrefix?: string; + + /** + * @description The region the callable functions are located or a custom domain. + * @example "asia-south1" + */ + regionOrCustomDomain?: string; + + /** + * @description Own instance of the `Functions` class. + */ + functions?: Functions; +} + +export function getMoralisAuth(app?: FirebaseApp, options?: MoralisAuthOptions): MoralisAuth { + if (options?.regionOrCustomDomain && options?.functions) { + throw new Error('You cannot set "regionOrCustomDomain" and "functions" parameters at the same time'); + } + + if (!app) { + app = getApp(); + } + return { + functionNamePrefix: options?.functionNamePrefix ?? 'ext-moralis-auth-', + auth: getAuth(app), + functions: options?.functions ?? getFunctions(app, options?.regionOrCustomDomain), + }; +} diff --git a/packages/clientFirebaseAuth/src/index.ts b/packages/clientFirebaseAuth/src/index.ts new file mode 100644 index 0000000000..3723dedab4 --- /dev/null +++ b/packages/clientFirebaseAuth/src/index.ts @@ -0,0 +1,3 @@ +export * from './getMoralisAuth'; +export * from './requestMessage'; +export * from './signInWithMoralis'; diff --git a/packages/clientFirebaseAuth/src/requestMessage.ts b/packages/clientFirebaseAuth/src/requestMessage.ts new file mode 100644 index 0000000000..be913e035a --- /dev/null +++ b/packages/clientFirebaseAuth/src/requestMessage.ts @@ -0,0 +1,82 @@ +import { httpsCallable } from '@firebase/functions'; +import { MoralisAuth } from './getMoralisAuth'; +import { NetworkType } from './NetworkType'; + +export interface RequestEvmMessageParams { + /** + * @description Network type. + * @example "evm" + */ + networkType: 'evm'; + + /** + * @description Wallet address. + * @example "0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359" + */ + address: string; + + /** + * @description Chain ID. + * @example "0x1" + * @example 0x1 + */ + chain: string | number; +} + +export interface RequestSolanaMessageParams { + /** + * @description Network type. + * @example "solana" + */ + networkType: 'solana'; + + /** + * @description Solana wallet address. + * @example "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" + */ + address: string; + + /** + * @description Solana network type. + * @example "mainnet" + */ + network: 'mainnet' | 'devnet'; +} + +export interface SignInContext { + /** + * @description Network type. + * @example "evm" + * @example "solana" + */ + networkType: NetworkType; + + /** + * @description Message to sign by user's wallet. + */ + message: string; + + /** + * @description Unique user id. + */ + uid: string; +} + +interface RequestMessageRawResponse { + id: string; + message: string; + profileId: string; +} + +export async function requestMessage( + auth: MoralisAuth, + params: RequestEvmMessageParams | RequestSolanaMessageParams, +): Promise { + const functionName = auth.functionNamePrefix.concat('requestMessage'); + const response = await httpsCallable(auth.functions, functionName)(params); + return { + networkType: params.networkType, + message: response.data.message, + uid: response.data.profileId, + }; +} diff --git a/packages/clientFirebaseAuth/src/signInWithMoralis.ts b/packages/clientFirebaseAuth/src/signInWithMoralis.ts new file mode 100644 index 0000000000..db9f2beb23 --- /dev/null +++ b/packages/clientFirebaseAuth/src/signInWithMoralis.ts @@ -0,0 +1,35 @@ +import { signInWithCustomToken, UserCredential } from '@firebase/auth'; +import { httpsCallable } from '@firebase/functions'; +import { MoralisAuth } from './getMoralisAuth'; +import { SignInContext } from './requestMessage'; + +export interface SignInWithMoralisParams { + /** + * @description Sign-in context. + */ + context: SignInContext; + + /** + * @description Signed message by user's wallet. + */ + signature: string; +} + +interface SignInWithMoralisRawResponse { + token: string; +} + +export async function signInWithMoralis(auth: MoralisAuth, params: SignInWithMoralisParams): Promise { + const functionName = auth.functionNamePrefix.concat('issueToken'); + const response = await httpsCallable( + auth.functions, + functionName, + )({ + networkType: params.context.networkType, + message: params.context.message, + signature: params.signature, + }); + + const credential = await signInWithCustomToken(auth.auth, response.data.token); + return credential; +} diff --git a/packages/clientFirebaseAuth/tsconfig.json b/packages/clientFirebaseAuth/tsconfig.json new file mode 100644 index 0000000000..ab417d0064 --- /dev/null +++ b/packages/clientFirebaseAuth/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.package.json", + "compilerOptions": { + "outDir": "./lib/", + "declarationDir": "./lib/", + "rootDir": "./src" + }, + "include": ["src/**/*", "types/**/*"] +} diff --git a/yarn.lock b/yarn.lock index 09b90a8a46..bf26ebf115 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3187,6 +3187,32 @@ bech32 "1.1.4" ws "7.4.6" +"@ethersproject/providers@^5.7.1": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.1.tgz#b0799b616d5579cd1067a8ebf1fc1ec74c1e122c" + integrity sha512-vZveG/DLyo+wk4Ga1yx6jSEHrLPgmTt+dFv0dv8URpVCRf0jVhalps1jq/emN/oXnMRsC7cQgAF32DcXLL7BPQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + "@ethersproject/random@5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.0.tgz#1505d1ab6a250e0ee92f436850fa3314b2cb5ae6" @@ -3574,16 +3600,127 @@ dependencies: text-decoding "^1.0.0" +"@firebase/analytics-compat@0.1.13": + version "0.1.13" + resolved "https://registry.yarnpkg.com/@firebase/analytics-compat/-/analytics-compat-0.1.13.tgz#61e1d6f9e4d033c3ed9943d91530eb3e0f382f92" + integrity sha512-QC1DH/Dwc8fBihn0H+jocBWyE17GF1fOCpCrpAiQ2u16F/NqsVDVG4LjIqdhq963DXaXneNY7oDwa25Up682AA== + dependencies: + "@firebase/analytics" "0.8.0" + "@firebase/analytics-types" "0.7.0" + "@firebase/component" "0.5.17" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/analytics-types@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics-types/-/analytics-types-0.7.0.tgz#91960e7c87ce8bf18cf8dd9e55ccbf5dc3989b5d" + integrity sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ== + +"@firebase/analytics@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.8.0.tgz#b5d595082f57d33842b1fd9025d88f83065e87fe" + integrity sha512-wkcwainNm8Cu2xkJpDSHfhBSdDJn86Q1TZNmLWc67VrhZUHXIKXxIqb65/tNUVE+I8+sFiDDNwA+9R3MqTQTaA== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/installations" "0.5.12" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/app-check-compat@0.2.12": + version "0.2.12" + resolved "https://registry.yarnpkg.com/@firebase/app-check-compat/-/app-check-compat-0.2.12.tgz#e30b2395e3d30f8cfcf3554fc87875f82c1aa086" + integrity sha512-GFppNLlUyMN9Iq31ME/+GkjRVKlc+MeanzUKQ9UaR73ZsYH3oX3Ja+xjoYgixaVJDDG+ofBYR7ZXTkkQdSR/pw== + dependencies: + "@firebase/app-check" "0.5.12" + "@firebase/app-check-types" "0.4.0" + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/app-check-interop-types@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@firebase/app-check-interop-types/-/app-check-interop-types-0.1.0.tgz#83afd9d41f99166c2bdb2d824e5032e9edd8fe53" + integrity sha512-uZfn9s4uuRsaX5Lwx+gFP3B6YsyOKUE+Rqa6z9ojT4VSRAsZFko9FRn6OxQUA1z5t5d08fY4pf+/+Dkd5wbdbA== + +"@firebase/app-check-types@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@firebase/app-check-types/-/app-check-types-0.4.0.tgz#7007a9d1d720db20bcf466fe6785c96feaa0a82d" + integrity sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q== + +"@firebase/app-check@0.5.12": + version "0.5.12" + resolved "https://registry.yarnpkg.com/@firebase/app-check/-/app-check-0.5.12.tgz#82f305cc01bfe4d32c35e425941b2eca2ce9f089" + integrity sha512-l+MmvupSGT/F+I5ei7XjhEfpoL4hLVJr0vUwcG5NEf2hAkQnySli9fnbl9fZu1BJaQ2kthrMmtg1gcbcM9BUCQ== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/app-compat@0.1.34": + version "0.1.34" + resolved "https://registry.yarnpkg.com/@firebase/app-compat/-/app-compat-0.1.34.tgz#a54fc94e464d3fabe502506a68ab563b53b14624" + integrity sha512-3XSrHDgtASIH8j6sDngiKykDcqlEM0mYplJTYdyN69ruZ1o0M+bUhIvX9mUoRelWZGT1BcMpFmh/62vz/wN72Q== + dependencies: + "@firebase/app" "0.7.33" + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + "@firebase/app-types@0.7.0", "@firebase/app-types@^0.7.0": version "0.7.0" resolved "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.7.0.tgz" integrity sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg== +"@firebase/app@0.7.33", "@firebase/app@^0.7.32": + version "0.7.33" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.7.33.tgz#499c6febe8608d68090c4e3a5204004bb995f819" + integrity sha512-7K7ljuFhbT9uF0gTvuA7ZrpFFnS1eJLplfjJdjDQFWyjD6Cwk0FXNdu75WvoWgywoQCGiVBX8u5Jb437UQIhWQ== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + idb "7.0.1" + tslib "^2.1.0" + +"@firebase/auth-compat@0.2.20": + version "0.2.20" + resolved "https://registry.yarnpkg.com/@firebase/auth-compat/-/auth-compat-0.2.20.tgz#c5cd1c0abc5825c634adeaf5d767067c53a17c46" + integrity sha512-UwDxCQ2/+8dTp0oE6CmrR1n5e78H8By3hNBiTtwSqP/H2ZWxn9SfCdGt5PXF6NTnWAZ/0rs490RPM0koCYxkjA== + dependencies: + "@firebase/auth" "0.20.7" + "@firebase/auth-types" "0.11.0" + "@firebase/component" "0.5.17" + "@firebase/util" "1.6.3" + node-fetch "2.6.7" + selenium-webdriver "4.1.2" + tslib "^2.1.0" + "@firebase/auth-interop-types@0.1.6": version "0.1.6" resolved "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz" integrity sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g== +"@firebase/auth-types@0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.11.0.tgz#b9c73c60ca07945b3bbd7a097633e5f78fa9e886" + integrity sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw== + +"@firebase/auth@0.20.7", "@firebase/auth@^0.20.6": + version "0.20.7" + resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.20.7.tgz#50a79d3dfac802bc8383e8182057deda1595b62b" + integrity sha512-hKjnMZWOwn/HNSJNLAVmlBRQKRMOHGiD7vTMT2Og4oV8sFwRygxyoC7/OsupCUA6GuC4XsnDP/+WgE9LOcqB2A== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + node-fetch "2.6.7" + selenium-webdriver "4.1.2" + tslib "^2.1.0" + "@firebase/component@0.5.17": version "0.5.17" resolved "https://registry.npmjs.org/@firebase/component/-/component-0.5.17.tgz" @@ -3592,6 +3729,18 @@ "@firebase/util" "1.6.3" tslib "^2.1.0" +"@firebase/database-compat@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-0.2.6.tgz#c8f3998f42ff00d01aad82e525e47aca6fe3d282" + integrity sha512-Ls1BAODaiDYgeJljrIgSuC7JkFIY/HNhhNYebzZSoGQU62RuvnaO3Qgp2EH6h2LzHyRnycNadfh1suROtPaUIA== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/database" "0.13.6" + "@firebase/database-types" "0.9.13" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + "@firebase/database-compat@^0.2.0": version "0.2.4" resolved "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.4.tgz" @@ -3612,6 +3761,14 @@ "@firebase/app-types" "0.7.0" "@firebase/util" "1.6.3" +"@firebase/database-types@0.9.13": + version "0.9.13" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.9.13.tgz#47c12593ed27a9562f0919b7d3a1f1e00888abc2" + integrity sha512-dIJ1zGe3EHMhwcvukTOPzYlFYFIG1Et5Znl7s7y/ZTN2/toARRNnsv1qCKvqevIMYKvIrRsYOYfOXDS8l1YIJA== + dependencies: + "@firebase/app-types" "0.7.0" + "@firebase/util" "1.6.3" + "@firebase/database@0.13.4": version "0.13.4" resolved "https://registry.npmjs.org/@firebase/database/-/database-0.13.4.tgz" @@ -3624,6 +3781,103 @@ faye-websocket "0.11.4" tslib "^2.1.0" +"@firebase/database@0.13.6": + version "0.13.6" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.13.6.tgz#fb2493d65759400ad155f156def068447ca1bfb1" + integrity sha512-5IZIBw2LT50Z8mwmKYmdX37p+Gg2HgeJsrruZmRyOSVgbfoY4Pg87n1uFx6qWqDmfL6HwQgwcrrQfVIXE3C5SA== + dependencies: + "@firebase/auth-interop-types" "0.1.6" + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + faye-websocket "0.11.4" + tslib "^2.1.0" + +"@firebase/firestore-compat@0.1.25": + version "0.1.25" + resolved "https://registry.yarnpkg.com/@firebase/firestore-compat/-/firestore-compat-0.1.25.tgz#77ffdbc49d5734be60762a45c0f4d855772d1e46" + integrity sha512-Pf7Aa1dzG2/2bmC5kQmNo5U8RtnwGxEysuAJE9T7QrmEyi0RkzYFNp9sSfSIC7kWKhT/KfmGcDcQq4dtL9oFWQ== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/firestore" "3.5.0" + "@firebase/firestore-types" "2.5.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/firestore-types@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-2.5.0.tgz#16fca40b6980fdb000de86042d7a96635f2bcdd7" + integrity sha512-I6c2m1zUhZ5SH0cWPmINabDyH5w0PPFHk2UHsjBpKdZllzJZ2TwTkXbDtpHUZNmnc/zAa0WNMNMvcvbb/xJLKA== + +"@firebase/firestore@3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-3.5.0.tgz#8938fc8804cd150d154fde7a607a4461b079a62f" + integrity sha512-ZwpZROpHDAwX4dvthkYv5WTqzWMPDNIVFWifDYpelWclsRN0cBxqLZPzh2wBtOWwMLIOoau7QIltzapqLZaScw== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + "@firebase/webchannel-wrapper" "0.7.0" + "@grpc/grpc-js" "^1.3.2" + "@grpc/proto-loader" "^0.6.13" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/functions-compat@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/functions-compat/-/functions-compat-0.2.4.tgz#afa5d8eefe6d51c7b89e44d9262700b68fbcb73f" + integrity sha512-Crfn6il1yXGuXkjSd8nKrqR4XxPvuP19g64bXpM6Ix67qOkQg676kyOuww0FF17xN0NSXHfG8Pyf+CUrx8wJ5g== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/functions" "0.8.4" + "@firebase/functions-types" "0.5.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/functions-types@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.5.0.tgz#b50ba95ccce9e96f7cda453228ffe1684645625b" + integrity sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA== + +"@firebase/functions@0.8.4", "@firebase/functions@^0.8.4": + version "0.8.4" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.8.4.tgz#a9b7a10314f286df1ded87d8546fb8d9107a9c06" + integrity sha512-o1bB0xMyQKe+b246zGnjwHj4R6BH4mU2ZrSaa/3QvTpahUQ3hqYfkZPLOXCU7+vEFxHb3Hd4UUjkFhxoAcPqLA== + dependencies: + "@firebase/app-check-interop-types" "0.1.0" + "@firebase/auth-interop-types" "0.1.6" + "@firebase/component" "0.5.17" + "@firebase/messaging-interop-types" "0.1.0" + "@firebase/util" "1.6.3" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/installations-compat@0.1.12": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@firebase/installations-compat/-/installations-compat-0.1.12.tgz#d0394127f71aff596cb8bb607840095d1617246e" + integrity sha512-BIhFpWIn/GkuOa+jnXkp3SDJT2RLYJF6MWpinHIBKFJs7MfrgYZ3zQ1AlhobDEql+bkD1dK4dB5sNcET2T+EyA== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/installations" "0.5.12" + "@firebase/installations-types" "0.4.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/installations-types@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.4.0.tgz#256782ff9adfb390ac658c25bc32f89635ddce7c" + integrity sha512-nXxWKQDvBGctuvsizbUEJKfxXU9WAaDhon+j0jpjIfOJkvkj3YHqlLB/HeYjpUn85Pb22BjplpTnDn4Gm9pc3A== + +"@firebase/installations@0.5.12": + version "0.5.12" + resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.5.12.tgz#1d5764aa6f0b73d9d6d1a81a07eab5cd71a5ea27" + integrity sha512-Zq43fCE0PB5tGJ3ojzx5RNQzKdej1188qgAk22rwjuhP7npaG/PlJqDG1/V0ZjTLRePZ1xGrfXSPlA17c/vtNw== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/util" "1.6.3" + idb "7.0.1" + tslib "^2.1.0" + "@firebase/logger@0.3.3": version "0.3.3" resolved "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.3.tgz" @@ -3631,6 +3885,115 @@ dependencies: tslib "^2.1.0" +"@firebase/messaging-compat@0.1.16": + version "0.1.16" + resolved "https://registry.yarnpkg.com/@firebase/messaging-compat/-/messaging-compat-0.1.16.tgz#4fe4e2c1b496e62f63e815cb242a2ab323cd7899" + integrity sha512-uG7rWcXJzU8vvlEBFpwG1ndw/GURrrmKcwsHopEWbsPGjMRaVWa7XrdKbvIR7IZohqPzcC/V9L8EeqF4Q4lz8w== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/messaging" "0.9.16" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/messaging-interop-types@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@firebase/messaging-interop-types/-/messaging-interop-types-0.1.0.tgz#bdac02dd31edd5cb9eec37b1db698ea5e2c1a631" + integrity sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ== + +"@firebase/messaging@0.9.16": + version "0.9.16" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.9.16.tgz#96b57ebbb054e57f78585f85f59d521c5ba5cd85" + integrity sha512-Yl9gGrAvJF6C1gg3+Cr2HxlL6APsDEkrorkFafmSP1l+rg1epZKoOAcKJbSF02Vtb50wfb9FqGGy8tzodgETxg== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/installations" "0.5.12" + "@firebase/messaging-interop-types" "0.1.0" + "@firebase/util" "1.6.3" + idb "7.0.1" + tslib "^2.1.0" + +"@firebase/performance-compat@0.1.12": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@firebase/performance-compat/-/performance-compat-0.1.12.tgz#ac50b0cd29bf7f5e1e33c640dba25e2f8db95f0b" + integrity sha512-IBORzUeGY1MGdZnsix9Mu5z4+C3WHIwalu0usxvygL0EZKHztGG8bppYPGH/b5vvg8QyHs9U+Pn1Ot2jZhffQQ== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/performance" "0.5.12" + "@firebase/performance-types" "0.1.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/performance-types@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.1.0.tgz#5e6efa9dc81860aee2cb7121b39ae8fa137e69fc" + integrity sha512-6p1HxrH0mpx+622Ql6fcxFxfkYSBpE3LSuwM7iTtYU2nw91Hj6THC8Bc8z4nboIq7WvgsT/kOTYVVZzCSlXl8w== + +"@firebase/performance@0.5.12": + version "0.5.12" + resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.5.12.tgz#4eae3eb91eeffb29b996e7908172052d4a901856" + integrity sha512-MPVTkOkGrm2SMQgI1FPNBm85y2pPqlPb6VDjIMCWkVpAr6G1IZzUT24yEMySRcIlK/Hh7/Qu1Nu5ASRzRuX6+Q== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/installations" "0.5.12" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/remote-config-compat@0.1.12": + version "0.1.12" + resolved "https://registry.yarnpkg.com/@firebase/remote-config-compat/-/remote-config-compat-0.1.12.tgz#7606752d7bfe2701d58568345ca536beda14ee53" + integrity sha512-Yz7Gtb2rLa7ykXZX9DnSTId8CXd++jFFLW3foUImrYwJEtWgLJc7gwkRfd1M73IlKGNuQAY+DpUNF0n1dLbecA== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/logger" "0.3.3" + "@firebase/remote-config" "0.3.11" + "@firebase/remote-config-types" "0.2.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/remote-config-types@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@firebase/remote-config-types/-/remote-config-types-0.2.0.tgz#1e2759fc01f20b58c564db42196f075844c3d1fd" + integrity sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw== + +"@firebase/remote-config@0.3.11": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.3.11.tgz#93c82b5944a20c027f4ee82c145813ca96b430bb" + integrity sha512-qA84dstrvVpO7rWT/sb2CLv1kjHVmz59SRFPKohJJYFBcPOGK4Pe4FWWhKAE9yg1Gnl0qYAGkahOwNawq3vE0g== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/installations" "0.5.12" + "@firebase/logger" "0.3.3" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/storage-compat@0.1.17": + version "0.1.17" + resolved "https://registry.yarnpkg.com/@firebase/storage-compat/-/storage-compat-0.1.17.tgz#da721071e006d066fb9b1cff69481bd59a02346b" + integrity sha512-nOYmnpI0gwoz5nROseMi9WbmHGf+xumfsOvdPyMZAjy0VqbDnpKIwmTUZQBdR+bLuB5oIkHQsvw9nbb1SH+PzQ== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/storage" "0.9.9" + "@firebase/storage-types" "0.6.0" + "@firebase/util" "1.6.3" + tslib "^2.1.0" + +"@firebase/storage-types@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.6.0.tgz#0b1af64a2965af46fca138e5b70700e9b7e6312a" + integrity sha512-1LpWhcCb1ftpkP/akhzjzeFxgVefs6eMD2QeKiJJUGH1qOiows2w5o0sKCUSQrvrRQS1lz3SFGvNR1Ck/gqxeA== + +"@firebase/storage@0.9.9": + version "0.9.9" + resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.9.9.tgz#3d0080dd130bc3315731483384a7ef7c00f76e22" + integrity sha512-Zch7srLT2SIh9y2nCVv/4Kne0HULn7OPkmreY70BJTUJ+g5WLRjggBq6x9fV5ls9V38iqMWfn4prxzX8yIc08A== + dependencies: + "@firebase/component" "0.5.17" + "@firebase/util" "1.6.3" + node-fetch "2.6.7" + tslib "^2.1.0" + "@firebase/util@1.6.3": version "1.6.3" resolved "https://registry.npmjs.org/@firebase/util/-/util-1.6.3.tgz" @@ -3638,6 +4001,11 @@ dependencies: tslib "^2.1.0" +"@firebase/webchannel-wrapper@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.7.0.tgz#a928358aac3aca652f417c402950d05a7a81d256" + integrity sha512-4ACd/c6ushrLuhn0+yjB9hznhnsc2IML6pf0Ulb1Q7w8SvR1jNGPu/Y7i4kvOm6R+WJkMHwyy5z3i3gN+Tawug== + "@google-cloud/firestore@^4.15.1": version "4.15.1" resolved "https://registry.npmjs.org/@google-cloud/firestore/-/firestore-4.15.1.tgz" @@ -3846,6 +4214,14 @@ resolved "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.1.tgz" integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== +"@grpc/grpc-js@^1.3.2": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.7.0.tgz#5a96bdbe51cce23faa38a4db6e43595a5c584849" + integrity sha512-wvKxal+40Xx11DXO2q5PfY3UiE25iwTb8SOz6A9IJII/V7d19x2ex0he+GJfVW0JZCaBjCPSjUB0yU9Ecm4WCw== + dependencies: + "@grpc/proto-loader" "^0.7.0" + "@types/node" ">=12.12.47" + "@grpc/grpc-js@~1.6.0": version "1.6.9" resolved "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.6.9.tgz" @@ -3854,7 +4230,7 @@ "@grpc/proto-loader" "^0.7.0" "@types/node" ">=12.12.47" -"@grpc/proto-loader@^0.6.12": +"@grpc/proto-loader@^0.6.12", "@grpc/proto-loader@^0.6.13": version "0.6.13" resolved "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz" integrity sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g== @@ -6030,6 +6406,11 @@ resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== +"@types/node@^16.11.58": + version "16.11.59" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.59.tgz#823f238b9063ccc3b3b7f13186f143a57926c4f6" + integrity sha512-6u+36Dj3aDzhfBVUf/mfmc92OEdzQ2kx2jcXGdigfl70E/neV21ZHE6UCz4MDzTRcVqGAM27fk+DLXvyDsn3Jw== + "@types/node@^18.7.15": version "18.7.15" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.15.tgz#20ae1ec80c57ee844b469f968a1cd511d4088b29" @@ -6112,6 +6493,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.19": + version "18.0.20" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.20.tgz#e4c36be3a55eb5b456ecf501bd4a00fd4fd0c9ab" + integrity sha512-MWul1teSPxujEHVwZl4a5HxQ9vVNsjTchVA+xRqv/VYGCuKGAU6UhfrTdF5aBefwD1BHUD8i/zq+O/vyCm/FrA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -6319,6 +6709,21 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^5.36.2": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz#5ccdd5d9004120f28fc6e717fb4b5c9bddcfbc04" + integrity sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og== + dependencies: + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/type-utils" "5.37.0" + "@typescript-eslint/utils" "5.37.0" + debug "^4.3.4" + functional-red-black-tree "^1.0.1" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/eslint-plugin@^5.5.0": version "5.36.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.1.tgz#471f64dc53600025e470dad2ca4a9f2864139019" @@ -6381,6 +6786,16 @@ "@typescript-eslint/typescript-estree" "5.33.1" debug "^4.3.4" +"@typescript-eslint/parser@^5.36.2": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b" + integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw== + dependencies: + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" + debug "^4.3.4" + "@typescript-eslint/parser@^5.5.0": version "5.36.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.1.tgz#931c22c7bacefd17e29734628cdec8b2acdcf1ce" @@ -6431,6 +6846,14 @@ "@typescript-eslint/types" "5.36.1" "@typescript-eslint/visitor-keys" "5.36.1" +"@typescript-eslint/scope-manager@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" + integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q== + dependencies: + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" + "@typescript-eslint/type-utils@5.30.7": version "5.30.7" resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz" @@ -6468,6 +6891,16 @@ debug "^4.3.4" tsutils "^3.21.0" +"@typescript-eslint/type-utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz#43ed2f567ada49d7e33a6e4b6f9babd060445fe5" + integrity sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ== + dependencies: + "@typescript-eslint/typescript-estree" "5.37.0" + "@typescript-eslint/utils" "5.37.0" + debug "^4.3.4" + tsutils "^3.21.0" + "@typescript-eslint/types@5.30.7": version "5.30.7" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz" @@ -6493,6 +6926,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c" integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg== +"@typescript-eslint/types@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" + integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== + "@typescript-eslint/typescript-estree@5.30.7": version "5.30.7" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz" @@ -6558,6 +6996,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" + integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA== + dependencies: + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.30.7": version "5.30.7" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz" @@ -6606,6 +7057,18 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" +"@typescript-eslint/utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2" + integrity sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + "@typescript-eslint/visitor-keys@5.30.7": version "5.30.7" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz" @@ -6646,6 +7109,14 @@ "@typescript-eslint/types" "5.36.1" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" + integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA== + dependencies: + "@typescript-eslint/types" "5.37.0" + eslint-visitor-keys "^3.3.0" + "@wagmi/core@^0.4.9": version "0.4.9" resolved "https://registry.npmjs.org/@wagmi/core/-/core-0.4.9.tgz" @@ -12485,6 +12956,38 @@ firebase-functions@^3.18.0, firebase-functions@^3.21.2: lodash "^4.17.14" node-fetch "^2.6.7" +firebase@^9.9.4: + version "9.10.0" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-9.10.0.tgz#07e22bddce3cc1f380c440edc6286c09ac6cce8f" + integrity sha512-oSuED6BT+gQrOoXPV/xkxBLMk03A9nDXosW0xy4loQtGRJr9gW6JXgEOr0nmXFMTGzP87CpoC8Kd6y7XKSAeqQ== + dependencies: + "@firebase/analytics" "0.8.0" + "@firebase/analytics-compat" "0.1.13" + "@firebase/app" "0.7.33" + "@firebase/app-check" "0.5.12" + "@firebase/app-check-compat" "0.2.12" + "@firebase/app-compat" "0.1.34" + "@firebase/app-types" "0.7.0" + "@firebase/auth" "0.20.7" + "@firebase/auth-compat" "0.2.20" + "@firebase/database" "0.13.6" + "@firebase/database-compat" "0.2.6" + "@firebase/firestore" "3.5.0" + "@firebase/firestore-compat" "0.1.25" + "@firebase/functions" "0.8.4" + "@firebase/functions-compat" "0.2.4" + "@firebase/installations" "0.5.12" + "@firebase/installations-compat" "0.1.12" + "@firebase/messaging" "0.9.16" + "@firebase/messaging-compat" "0.1.16" + "@firebase/performance" "0.5.12" + "@firebase/performance-compat" "0.1.12" + "@firebase/remote-config" "0.3.11" + "@firebase/remote-config-compat" "0.1.12" + "@firebase/storage" "0.9.9" + "@firebase/storage-compat" "0.1.17" + "@firebase/util" "1.6.3" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" @@ -13782,6 +14285,11 @@ idb-keyval@6.0.3: dependencies: safari-14-idb-fix "^3.0.0" +idb@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/idb/-/idb-7.0.1.tgz#d2875b3a2f205d854ee307f6d196f246fea590a7" + integrity sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg== + idb@^7.0.1: version "7.0.2" resolved "https://registry.yarnpkg.com/idb/-/idb-7.0.2.tgz#7a067e20dd16539938e456814b7d714ba8db3892" @@ -15652,6 +16160,16 @@ jssha@~3.2.0: array-includes "^3.1.5" object.assign "^4.1.2" +jszip@^3.6.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + jwa@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz" @@ -15935,6 +16453,13 @@ lie@3.1.1: dependencies: immediate "~3.0.5" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" @@ -17783,7 +18308,7 @@ packet-reader@1.0.0: resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz" integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== -pako@~1.0.5: +pako@~1.0.2, pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -20526,6 +21051,15 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== +selenium-webdriver@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.1.2.tgz#d463b4335632d2ea41a9e988e435a55dc41f5314" + integrity sha512-e4Ap8vQvhipgBB8Ry9zBiKGkU6kHKyNnWiavGGLKkrdW81Zv7NVMtFOL/j3yX0G8QScM7XIXijKssNd4EUxSOw== + dependencies: + jszip "^3.6.0" + tmp "^0.2.1" + ws ">=7.4.6" + selfsigned@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" @@ -21809,7 +22343,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.0, tmp@~0.2.1: +tmp@^0.2.0, tmp@^0.2.1, tmp@~0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -22202,6 +22736,11 @@ typescript@^4.8.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== +typescript@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== + typical@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz" @@ -23564,6 +24103,11 @@ ws@8.2.3, ws@~8.2.3: resolved "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz" integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== +ws@>=7.4.6, ws@^8.3.0, ws@^8.4.2, ws@^8.5.0: + version "8.8.1" + resolved "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz" + integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== + ws@^5.1.1: version "5.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" @@ -23576,11 +24120,6 @@ ws@^5.1.1: resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^8.3.0, ws@^8.4.2, ws@^8.5.0: - version "8.8.1" - resolved "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz" - integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== - xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz"