{"owner":"firebase","repo":"firebase-js-sdk","hasSkills":true,"totalSkillsCount":53,"totalTokensCount":9746,"categories":["root-instruction","plugin-manifest"],"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","packages/ai/README.md","packages/analytics-compat/README.md","packages/analytics-interop-types/README.md","packages/analytics-types/README.md","packages/analytics/README.md","packages/app-check-compat/README.md","packages/app-check-interop-types/README.md","packages/app-check-types/README.md","packages/app-check/README.md","packages/app-compat/README.md","packages/app-types/README.md","packages/app/README.md","packages/auth-compat/README.md","packages/auth-interop-types/README.md","packages/auth-types/README.md","packages/auth/README.md","packages/auth/demo/README.md","packages/component/README.md","packages/data-connect/README.md","packages/database-compat/README.md","packages/database-types/README.md","packages/database/README.md","packages/firebase/README.md","packages/firestore-compat/README.md","packages/firestore-types/README.md","packages/firestore/README.md","packages/firestore/src/platform/README.md","packages/firestore/src/protos/README.md","packages/firestore/test/integration/api/README.md","packages/firestore/test/unit/remote/bloom_filter_golden_test_data/README.md","packages/firestore/test/unit/specs/README.md","packages/functions-types/README.md","packages/functions/README.md","packages/installations-compat/README.md","packages/logger/README.md","packages/messaging-compat/README.md","packages/messaging-interop-types/README.md","packages/messaging/README.md","packages/performance-compat/README.md","packages/performance/README.md","packages/remote-config-compat/README.md","packages/remote-config-types/README.md","packages/remote-config/README.md","packages/rules-unit-testing/README.md","packages/rxfire/README.md","packages/storage-compat/README.md","packages/storage-types/README.md","packages/storage/README.md","packages/template-types/README.md","packages/template/README.md","packages/util/README.md","packages/webchannel-wrapper/README.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\n## Testing instructions\n- Before testing, create a `config/project.json` file. Copy `config/ci.config.json` if another project config is not specified by the user.\n- This is a web SDK and is most commonly used in a browser environment, so if you are running unit tests, you must run browser unit tests, not just Node tests, even if the Node tests seem like they would be faster.\n\n## Preparing code for PRs\n- Run `yarn format` after any changes to `*.ts` or `*.js` files, to do a formatting and license pass.\\n- Run `yarn docgen:all` after any changes that affect the public API or that change the text of comments that are the source of public documentation\\n","packages/ai/README.md":"# @firebase/ai\n\nThis is the Firebase AI component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-compat/README.md":"# @firebase/analytics-compat\n\nThis is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-interop-types/README.md":"# @firebase/analytics-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-types/README.md":"# @firebase/analytics-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics/README.md":"# @firebase/analytics\n\nThis is the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-compat/README.md":"# @firebase/app-check-compat\n\nThis is the Firebase App Check component (compat version) of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-interop-types/README.md":"# @firebase/app-check-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-types/README.md":"# @firebase/app-check-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check/README.md":"# @firebase/app-check\n\nThis is the Firebase App Check component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","packages/app-compat/README.md":"# @firebase/app-compat\n\nThis is the compatibility layer for the Firebase App package, which recreates the v8 API.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-types/README.md":"# @firebase/app-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app/README.md":"# @firebase/app\n\nThis package coordinates the communication between the different Firebase components\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth-compat/README.md":"# @firebase/auth-compat\n\nThis is a compatability layer to for the Firebase Authentication SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","packages/auth-interop-types/README.md":"# @firebase/auth-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth-types/README.md":"# @firebase/auth-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth/README.md":"# @firebase/auth\n\nThis is the Firebase Authentication component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Testing\n\nThe modular Auth SDK has both unit tests and integration tests, along with a\nhost of npm scripts to run these tests. The most important commands are:\n\n| Command | Description |\n| ------- | ----------- |\n| `yarn test` | This will run lint, unit tests, and integration tests against the live environment|\n| `yarn test:<platform>` | Runs all browser tests, unit and integration |\n| `yarn test:<platform>:unit` | Runs only \\<platform> unit tests |\n| `yarn test:<platform>:unit:debug` | Runs \\<platform> unit tests, auto-watching for file system changes |\n| `yarn test:<platform>:integration` | Runs only integration tests against the live environment |\n| `yarn test:<platform>:integration:local` | Runs all headless \\<platform> integration tests against the emulator (more below) |\n| `yarn test:browser:integration:prodbackend` | Runs TOTP MFA integration tests against the backend (more below) |\n\nWhere \\<platform> is \"browser\" or \"node\". There are also cordova tests, but they\nare not broken into such granular details. Check out `package.json` for more.\n\n### Integration testing with the emulator\n\nTo test against the emulator, set up the Auth emulator\n([instructions](https://firebase.google.com/docs/emulator-suite/connect_and_prototype)).\nThe easiest way to run these tests is to use the `firebase emulators:exec`\ncommand\n([documentation](https://firebase.google.com/docs/emulator-suite/install_and_configure#startup)).\nYou can also manually start the emulator separately, and then point the tests\nto it by setting the `GCLOUD_PROJECT` and `FIREBASE_AUTH_EMULATOR_HOST`\nenvironmental variables. In addition to the commands listed above, the below\ncommands also run various tests:\n\n  * `yarn test:integration:local` — Executes Node and browser emulator\n    integration tests, as well as the Selenium WebDriver tests\n  \n  * `yarn test:webdriver` — Executes only the Selenium WebDriver\n    integration tests\n\nNote - The webdriver tests require the Chrome webdriver to match the version of Chrome running locally.\nIn the CI environment, this is ensured using the environment variable [here.](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/.github/workflows/test-changed-auth.yml#L7)\nWhen running locally, change the chromedriver version in [package.json](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/packages/auth/package.json#L124) to match your local Chrome version and run `yarn install`.\n\n\nFor example, to run all integration and WebDriver tests against the emulator,\nyou would simply execute the following command:\n\n```sh\nfirebase emulators:exec --project foo-bar --only auth \"yarn test:integration:local\"\n```\n\n### Integration testing with the production backend\n\nCurrently, MFA TOTP, password policy, and reCAPTCHA Enterprise phone verification tests only run \nagainst the production backend (since they are not supported on the emulator yet).\nRunning against the backend also makes it a more reliable end-to-end test.\n\n#### TOTP\n\nThe TOTP tests require the following email/password combination to exist in the project, so if you are running this test against your test project, please create this user:\n\n'totpuser-donotdelete@test.com', 'password'\n\nYou also need to verify this email address, in order to use MFA. This can be done with a curl command like this:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode   -d     '{\n      \"email\": \"totpuser-donotdelete@test.com\",\n      \"requestType\": \"VERIFY_EMAIL\",\n      \"returnOobLink\": true,\n    }'\n```\n\n#### Password policy\n\nThe password policy tests require a tenant configured with a password policy that requires all options to exist in the project.\n\nIf you are running this test against your test project, please create the tenant and configure the policy with the following curl command:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/tenants   -d     '{\n      \"displayName\": \"passpol-tenant\",\n      \"passwordPolicyConfig\": {\n        \"passwordPolicyEnforcementState\": \"ENFORCE\",\n        \"passwordPolicyVersions\": [\n          {\n            \"customStrengthOptions\": {\n              \"minPasswordLength\": 8,\n              \"maxPasswordLength\": 24,\n              \"containsLowercaseCharacter\": true,\n              \"containsUppercaseCharacter\": true,\n              \"containsNumericCharacter\": true,\n              \"containsNonAlphanumericCharacter\": true\n            }\n          }\n        ]\n      }\n    }'\n```\n\nReplace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.\n\n#### reCAPTCHA Enterprise phone verification\n\nThe reCAPTCHA Enterprise phone verification tests require reCAPTCHA Enterprise to be enabled and\nthe following fictional phone number to be configured and in the project. \n\nIf you are running this\ntest against your project, please [add this test phone number](https://firebase.google.com/docs/auth/web/phone-auth#create-fictional-phone-numbers-and-verification-codes):\n\n'+1 555-555-1000', SMS code: '123456'\n\nFollow [this guide](https://cloud.google.com/identity-platform/docs/recaptcha-enterprise) to enable reCAPTCHA\nEnterprise, then use the following curl command to set reCAPTCHA Enterprise to ENFORCE for phone provider:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: $\n{PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/config?updateMask=recaptchaConfig.phoneEnforcementState,recaptchaConfig.useSmsBotScore,recaptchaConfig.useSmsTollFraudProtection  -d '\n{\n  \"name\": \"projects/{PROJECT_ID}\",\n  \"recaptchaConfig\": {\n    \"phoneEnforcementState\": \"ENFORCE\",\n    \"useSmsBotScore\": \"true\",\n    \"useSmsTollFraudProtection\": \"true\",\n  },\n}'\n```\n\n### Selenium Webdriver tests\n\nThese tests assume that you have both Firefox and Chrome installed on your\ncomputer and in your `$PATH`. The tests will error out if this is not the case.\nThe WebDriver tests talk to the emulator, but unlike the headless integration\ntests, these run in a browser robot environment; the assertions themselves run\nin Node. When you run these tests a small Express server will be started to\nserve the static files the browser robot uses.\n","packages/auth/demo/README.md":"# Firebase-Auth for web - Auth Demo (Auth Next)\n\n## Prerequisites\n\nYou need all the prerequisites mentioned in the [top-level README.](https://github.com/firebase/firebase-js-sdk#prerequisites)\n\nYou need to have created a Firebase Project in the\n[Firebase Console](https://firebase.google.com/console/) as well as configured a web app.\n\n## Installation\nMake sure you run `yarn` to install all dependencies in the root directory.\n\nEnable the Auth providers you would like to offer your users in the console, under\nAuth > Sign-in methods.\n\nRun:\n\n```bash\ngit clone https://github.com/firebase/firebase-js-sdk.git\ncd firebase-js-sdk/packages/auth/demo\n```\n\nThis will clone the repository in the current directory.\n\nIf you want to be able to deploy the demo app to one of your own Firebase Hosting instance,\nconfigure it using the following command:\n\n```bash\nfirebase use --add\n```\n\nSelect the project you have created in the prerequisite, and type in `default` or\nany other name as the alias to use for this project.\n\nCopy `src/sample-config.js` to `src/config.js`:\n\n```bash\ncp src/sample-config.js src/config.js\n```\n\nThen copy and paste the Web snippet config found in the console (Project Settings -> Your apps -> SDK setup and Configuration)\nin the `config.js` file.\n\n## Deploy\n\nBefore deploying, you may need to build the auth package:\n```bash\ncd auth/demo\nyarn\nyarn build:deps\n```\n\nThis can take some time, and you only need to do it if you've modified the auth package.\n\nYou can optionally clear the cache and rebuild using:\n \n```bash\ncd auth/demo\nrm -rf node_modules yarn.lock\nyarn\nyarn build:deps\n```\n\nTo run the app locally, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo\n```\n\nThis will compile all the files needed to run Firebase Auth, and start a Firebase server locally at\n[http://localhost:5000](http://localhost:5000).\n\nThe demo opens a page like this:\n\n![image](https://user-images.githubusercontent.com/35932340/153662957-41ba6a82-ea15-4084-ad3a-9fd41083efd3.png)\n\n\nThis is a developer view of all the supported auth flows. Make sure that the auth flow you are testing is already enabled in your firebase project.\nFor example, if you are testing “Sign up with email/password”, your project should allow email/password as a provider. \nIf not, you will see an “auth/operation-not-allowed” error message. \n\nYou can check the enabled providers on the firebase console.\n\n![image](https://user-images.githubusercontent.com/35932340/153662750-c0faf417-07b4-4f0e-93ab-5e0b82e3c793.png)\n\n\n## Running against Auth Emulator\n\nThe demo page by default runs against the actual Auth Backend. To run against the Auth Emulator with mocked endpoints, do the following:\n\n1. (Optional) If you are running against local changes to the Auth Emulator (see [Firebase CLI Contributing Guide](https://github.com/firebase/firebase-tools/blob/master/CONTRIBUTING.md)), make sure that your version of `firebase-tools` is executing against your `npm link`’d repository and that you've built your local emulator changes with `npm run build`.\n\n2. From `auth/demo`, locally initialize a Firebase project by running `firebase init`. When asked \"Which Firebase features do you want to set up for this directory?\", select \"Emulators\". When asked \"Which Firebase emulators do you want to set up?\", select \"Authentication Emulator\". This will create a `firebase.json` file.\n\n3. Change the constants `USE_AUTH_EMULATOR` and `AUTH_EMULATOR_URL` in `auth/demo/src/index.js` to `true` and `http://localhost:{port}` where the auth `port` can be found in the `firebase.json` file.\n\n4. To run the app locally and against the Auth Emulator, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo:emulator\n```\n\n## Running against Auth Staging endpoint\n\nModify the configured endpoint to staging by following the changes in this branch:\n\nhttps://github.com/firebase/firebase-js-sdk/compare/use-staging\n\n## Running against local changes to auth package\n\n\nBy default, the demo runs against the local firebase-auth implementation in packages/auth/src.\nThis can be modified to point to a released version using:\n\n```\n// packages/auth/demo/package.json\n-  \"@firebase/auth\": \"file:..\",\n+  \"@firebase/auth\": \"0.18.0\",\n```\n\n## Troubleshooting\n\n### Errors about dependency not being installed, example `lerna: command not found`\n  \n  Ensure that you run `yarn` to install dependencies.\n\n### `Failed to get Firebase project <project name>. Please make sure the project exists and your account has permission to access it.`\n\nLogout, re-login and launch the demo\n\n```bash\nfirebase logout && firebase login && yarn demo\n```\n\n### `Failed to list firebase projects` when running `firebase use --add`\n\nLogout, re-login and add the project.\n\n```bash\nfirebase logout && firebase login && firebase use --add\n```\n\n### `Access to localhost was denied` when accessing the demo app via http://localhost:5000\n\nMost likely this means a different process is binding to localhost:5000.\nYou can access the demo app via http://127.0.0.1:5000 or use a different port using `yarn demo --port 5002`\n\nNote - If you use 127.0.0.1 in your browser, you need to allowlist it as a domain for sign in, as shown below.\n\n![image](https://user-images.githubusercontent.com/35932340/153659058-d669055f-b587-4bc2-9f32-323149df50c3.png)\n\n### `hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.`\n\nThis can happen when you run `yarn run demo:emulator` if port 5000 is taken.\nModify auth/demo/firebase.json with a custom port. Pick any port, this example picks 5091.\n\n```\n{\n  //...\n  \"emulators\": {\n    \"hosting\": {\n      \"host\": \"\",\n      \"port\": \"5091\"\n    }\n  }\n}\n```\n\n### Error message about functions\n\n`The Cloud Functions emulator requires the module \"firebase-admin\" to be installed. This package is in your package.json, but it's not available. You probably need to run \"npm install\" in your functions directory.\ni  functions: Your functions could not be parsed due to an issue with your node_modules (see above)\n`\n\nRun `npm install` inside the auth/demo/functions directory as mentioned in the error message.\n","packages/component/README.md":"# @firebase/component\n\n_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a\nmember of the Firebase team, please avoid using this package_\n\n## Usage\n\n**ES Modules**\n\n```javascript\nimport { Component } from '@firebase/component';\n```\n","packages/data-connect/README.md":"# Firebase Data Connect\n\n## Local Development\n\nCheck `test/dataconnect.yaml` to ensure that the correct values are filled in.\n","packages/database-compat/README.md":"# @firebase/database-compat\n\nThis is the compatibility layer for the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/database-types/README.md":"# @firebase/database-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/database/README.md":"# @firebase/database\n\nThis is the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/firebase/README.md":"<!-- BADGES -->\n![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)\n[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)\n[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)\n<!-- END BADGES -->\n\n# Firebase - App success made simple\n\n## Upgrade to Version 9\nVersion 9 has a redesigned API that supports tree-shaking. Read the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) to learn more.\n\n## Overview\n\n[Firebase](https://firebase.google.com) provides the tools and infrastructure\nyou need to develop, grow, and earn money from your app. This package supports\nweb (browser), mobile-web, and server (Node.js) clients.\n\nFor more information, visit:\n\n- [Firebase Realtime Database](https://firebase.google.com/docs/database/web/start) -\n  The Firebase Realtime Database lets you store and query user data, and makes\n  it available between users in realtime.\n- [Cloud Firestore](https://firebase.google.com/docs/firestore/quickstart) -\n  Cloud Firestore is a flexible, scalable database for mobile, web, and server\n  development from Firebase and Google Cloud Platform.\n- [Firebase Storage](https://firebase.google.com/docs/storage/web/start) -\n  Firebase Storage lets you upload and store user generated content, such as\n  files, and images.\n- [Cloud Functions for Firebase](https://firebase.google.com/docs/functions) -\n   Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.\n- [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/js/client) -\n  Firebase Cloud Messaging is a cross-platform messaging solution that lets you\n  reliably deliver messages at no cost.\n- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon/get-started-web) -\n  Firebase Performance Monitoring helps you gain insight into your app's performance issues.\n- [Google Analytics](https://firebase.google.com/docs/analytics/get-started?platform=web) -\n  Google Analytics is a free app measurement solution that provides insight on app usage and user engagement.\n- [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=web) -\n  Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your \n  app without requiring users to reload your app.\n- [App Check](https://firebase.google.com/docs/app-check/web/recaptcha-provider) -\n  App Check helps protect your backend resources from abuse, such as billing fraud and phishing. It \n  works with both Firebase services and your own backends to keep your resources safe.\n- [Create and setup your account](https://firebase.google.com/docs/web/setup) -\n  Get started using Firebase for free.\n\nThis SDK is intended for end-user client access from environments such as the\nWeb, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or\nIoT devices running Node.js. If you are instead interested in using a Node.js\nSDK which grants you admin access from a privileged environment (like a server),\nyou should use the\n[Firebase Admin Node.js SDK](https://firebase.google.com/docs/admin/setup/).\n\n### Install the SDK\n\nInstall the Firebase NPM module:\n```\n$ npm init\n$ npm install --save firebase\n```\n\n### Use Firebase in your app\n\n1. Initialize Firebase in your app and create a Firebase App object:\n```js\nimport { initializeApp } from 'firebase/app';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\n```\n\n2. Access Firebase services in your app\n\nFirebase services (like Cloud Firestore, Authentication, Realtime Database, Remote Config, and more) are available to import within individual sub-packages.\n\nThe example below shows how you could use the Cloud Firestore Lite SDK to retrieve a list of data.\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore/lite';\n// Follow this pattern to import other Firebase services\n// import { } from 'firebase/<service>';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\nconst db = getFirestore(app);\n\n// Get a list of cities from your database\nasync function getCities(db) {\n  const citiesCol = collection(db, 'cities');\n  const citySnapshot = await getDocs(citiesCol);\n  const cityList = citySnapshot.docs.map(doc => doc.data());\n  return cityList;\n}\n```\n\n### Use a module bundler for size reduction\n\nThe Firebase Web SDK is designed to work with module bundlers to remove any\nunused code (tree-shaking). We strongly recommend using this approach for\nproduction apps. Tools such as the [Angular CLI](//angular.io/cli),\n[Next.js](//nextjs.org/), [Vue CLI](//cli.vuejs.org/), or [Create\nReact App](//reactjs.org/docs/create-a-new-react-app.html) automatically\nhandle module bundling for libraries installed through npm and imported into\nyour codebase.\n\nSee [Using module bundlers with Firebase](/docs/web/module-bundling) for more information.\n\n### Script include\nYou can also load Firebase packages as script modules in browsers that support native ES modules.\n\n```html\n<!-- use script module by specifying type=\"module\" -->\n<script type=\"module\">\n    import { initializeApp } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app.js';\n    import { getFirestore, collection, getDocs } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore-lite.js';\n    // Follow this pattern to import other Firebase services\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-analytics.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app-check.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-auth.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-functions.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-storage.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-performance.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-remote-config.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-messaging.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-database.js\";\n    \n    // TODO: Replace the following with your app's Firebase project configuration\n    const firebaseConfig = {\n    //...\n    };\n\n    const app = initializeApp(firebaseConfig);\n    const db = getFirestore(app);\n\n    // Get a list of cities from your database\n    async function getCities(db) {\n    const citiesCol = collection(db, 'cities');\n    const citySnapshot = await getDocs(citiesCol);\n    const cityList = citySnapshot.docs.map(doc => doc.data());\n    return cityList;\n    }\n</script>\n```\n\n_Note: To get a filled in version of the above code snippet, go to the\n[Firebase console](https://console.firebase.google.com/) for your app and click on \"Add\nFirebase to your web app\"._\n\n## Get the code (Node.js - server and command line)\n\n### Install the SDK\n\nWhile you can write entire Firebase applications without any backend code, many\ndevelopers want to write server applications or command-line utilities using the\nNode.js JavaScript runtime.\n\nYou can use the same npm module to use Firebase in the Node.js runtime (on a\nserver or running from the command line):\n\n```\n$ npm init\n$ npm install --save firebase\n```\n\nIn your code, you can access Firebase using:\n\n```js\nconst { initializeApp } = require('firebase/app');\nconst { getFirestore, collection, getDocs } = require('firebase/firestore');\n// ...\n```\n\nIf you are using native ES6 module with --experimental-modules flag (or Node 12+)\nyou should do:\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore';\n// ...\n```\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk) for which packages\nare available in Node.js.\n\n## Compat packages\nVersion 9 provides a set of compat packages that are API compatible with Version 8. They are intended to\nbe used to make the upgrade to the modular API easier by allowing you to upgrade your app piece by piece.\nSee the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) for more detail.\n\nTo access the compat packages, use the subpath `compat` like so:\n```js\n// v9 compat packages are API compatible with v8 code\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\n```\n\n## Changelog\n\nThe Firebase changelog can be found at\n[firebase.google.com](https://firebase.google.com/support/release-notes/js).\n\n## Browser/environment compatibility\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk).","packages/firestore-compat/README.md":"# @firebase/firestore-compat\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","packages/firestore-types/README.md":"# @firebase/firestore-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/firestore/README.md":"# @firebase/firestore\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","packages/firestore/src/platform/README.md":"The modules in this directory provide implementations for platform-specific\nfeatures that are replaced at build time with implementations for the target\nplatforms. SDK code should only refer to the generic implementations that are\nprovided directly in this directory. The generic implementations provide\nsupport for running under `ts-node` but are otherwise unsupported.\n","packages/firestore/src/protos/README.md":"These protos are copied from https://github.com/googleapis/googleapis and\nhttps://github.com/google/protobuf.  Run update.sh to update them.\n","packages/firestore/test/integration/api/README.md":"All tests in this directory are also run against our (minified)\nfirebase-firestore.js build (via 'yarn test:manual' under\nfirebase-js-sdk/integration/firestore/) and therefore must not have any\ndependencies on src/ files.\n\nAPI tests that need to use internal hooks (via src/ dependencies) should be\nput in test/integration/api_internal instead.\n\nThe line \"import * as firebaseExport from '../util/firebase_export';\" is\nreplaced via the gulpfile in 'integration/firestore' and should not be\nmodified.\n\n\n## Testing composite index query against production\n\n### Setting Up the Environment:\n1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.\n2. If not already logged in, authenticate with your Google Cloud Platform (GCP) account using `gcloud auth application-default login`. You can check your logged-in accounts by running `gcloud auth list`.\n3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:\n```\nterraform init\nterraform apply -var-file=../../config/project.json -auto-approve\n```\nNote: If the index creation encounters issues, such as concurrent operations, consider running the index creation process again. Error messages indicating that indexes have already been created can be safely disregarded.\n\n\n### Adding new composite index query tests\n1. To create a new composite index for local development, click on the provided link in the test error message, which will direct you to the Firebase Console.\n2. Add the newly created composite index to the `firestore_index_config.tf` file. The \"__name__\" field is not required to be explicitly added to the file, as the index creation will auto complete it on behalf.\n","packages/firestore/test/unit/remote/bloom_filter_golden_test_data/README.md":"This directory contains the data for the \"golden\" tests for the BloomFilter\nclass.\n\nIt is imperative that the bloom filter implementation here matches exactly that\nof the server. The files in this directory are copied from the unit tests for\nthe server to ensure consistent behavior. They define input for the bloom filter\nand the expected results of its mightContain() method.\n\nThese files should be kept in sync with those from the backend unit tests.\nGooglers see http://google3/cloud/datastore/common/testdata/minion_goldens/.\n\nTo update the files in this directory, run the following command:\n```\ncp /google/src/head/depot/google3/cloud/datastore/common/testdata/minion_goldens/*.json .\n```\n\nThen, format the JSON files using `prettier` by running this command:\n```\ncd ../../../.. && yarn prettier\n```\n","packages/firestore/test/unit/specs/README.md":"# Firestore Spec Tests\n\nThe Firestore Spec Tests are a suite of unit tests that fake out external\nsources of events so that they can be completely controlled from the tests\nthemselves and verify the correct handling of these events.\n\nThere are three sources of external events in the SDK: user writes, input from\nthe persistence layer, and input from the watch stream. The spec tests fake all\nof these. Since these external events are asynchronous in nature, in the real\nworld there is some non-determinism in the ordering of events. The spec tests\nallow these orderings to be specified explicitly, enabling orderings that are\ndifficult or impossible to force when connected to a real backend. In addition,\nwhen running under Node, the IndexedDb persistence layer is faked.\n\nThe Firestore Spec Tests are portable and must be kept in sync between the Web\nSDK (this SDK), Android SDK, and iOS SDK. The Web SDK contains the authoritative\ntest definitions and they must be manually \"exported\" to the Android SDK and iOS\nSDK when they change.\n\n## Running the Tests\n\nThe spec tests are part of the unit test suite of each SDK. Therefore, to run\nthe spec tests simply run the entire unit test suite and the spec tests will be\nexecuted as a part of it.\n\n## Test Tags\n\nEach spec test can specify zero or many \"tags\" that influence the test's\nexecution. Some of the commonly-used tags are documented here; see\n[describe_spec.ts](describe_spec.ts) for the full set of supported tags.\n\n- `exclusive` - Only run this spec test and skip all others. It can be useful\n  to apply this tag to a test while it is under active development or debugging.\n  Tests should never be checked into source control with this tag.\n\n- `no-android` and `no-ios` - Do not run this spec test on Android and/or iOS,\n  respectively. It may be useful to specify these tags if the functionality has\n  not been or never will be ported to these platforms.\n\n## Exporting the Tests\n\nTo export the tests use the [generate_spec_json.sh](../generate_spec_json.sh)\nscript, specifying a single argument whose value is the destination directory\ninto which to place the generated files.\n\n#### Exporting the Tests to the Android SDK\n\nTo export the spec tests to the Android SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-android-sdk/firebase-firestore/src/test/resources/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the Android SDK is cloned into `~/firebase-android-sdk`.\n\n#### Exporting the Tests to the iOS SDK\n\nTo export the spec tests to the iOS SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-ios-sdk/Firestore/Example/Tests/SpecTests/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the iOS SDK is cloned into `~/firebase-ios-sdk`.\n","packages/functions-types/README.md":"# @firebase/functions-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/functions/README.md":"# `@firebase/functions`\n\nThis is the Firebase Functions component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/installations-compat/README.md":"# @firebase/installations-compat\n\nThis is a compatability layer  for the Firebase Installations SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","packages/logger/README.md":"# @firebase/logger\n\nThis package serves as the base of all logging in the JS SDK. Any logging that\nis intended to be visible to Firebase end developers should go through this\nmodule.\n\n## Basic Usage\n\nFirebase components should import the `Logger` class and instantiate a new\ninstance by passing a component name (e.g. `@firebase/<COMPONENT>`) to the\nconstructor.\n\n_e.g._\n\n```typescript\nimport { Logger } from '@firebase/logger';\n\nconst logClient = new Logger(`@firebase/<COMPONENT>`);\n```\n\nEach `Logger` instance supports 5 log functions each to be used in a specific\ninstance:\n\n- `debug`: Internal logs; use this to allow developers to send us their debug\n  logs for us to be able to diagnose an issue.\n- `log`: Use to inform your user about things they may need to know.\n- `info`: Use if you have to inform the user about something that they need to\n  take a concrete action on. Once they take that action, the log should go away.\n- `warn`: Use when a product feature may stop functioning correctly; unexpected\n  scenario.\n- `error`: Only use when user App would stop functioning correctly - super rare!\n\n## Log Format\n\nEach log will be formatted in the following manner:\n\n```typescript\n`[${new Date()}]  ${COMPONENT_NAME}: ${...args}`\n```\n\n","packages/messaging-compat/README.md":"# @firebase/messaging-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/messaging-interop-types/README.md":"# @firebase/messaging-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/messaging/README.md":"# @firebase/messaging\n\nThis is the Firebase Cloud Messaging component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/performance-compat/README.md":"# @firebase/performance-compat\n\nThis is the compat package that recreates the  v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/performance/README.md":"# @firebase/performance\n\nThis is the Firebase Performance component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config-compat/README.md":"# @firebase/remote-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config-types/README.md":"# @firebase/remoteconfig-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config/README.md":"# @firebase/remote-config\n\nThis is the [Remote Config](https://firebase.google.com/docs/remote-config/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Contributing\n\nSetup:\n\n1. Run `yarn` in repo root\n\nFormat:\n\n1. Run `yarn prettier` in RC package\n\nUnit test:\n\n1. Run `yarn test` in RC package\n\nEnd-to-end test:\n\n1. Run `yarn build` in RC package\n1. Run `yarn build` in Firebase package\n1. Open test_app/index.html in a browser\n","packages/rules-unit-testing/README.md":"# @firebase/rules-unit-testing\n\nA set of utilities useful for testing Security Rules with the Realtime Database or Cloud Firestore\nemulators.\n\nSee:\n\n  * [Test your Cloud Firestore Security Rules](https://firebase.google.com/docs/firestore/security/test-rules-emulator)\n  * [Testing Security Rules with the Realtime Database Emulator](https://firebase.google.com/docs/database/security/test-rules-emulator)\n","packages/rxfire/README.md":"# RxFire\n\nRxFire has moved to its own repository, you can find it here [firebaseextended/rxfire](https://github.com/firebaseextended/rxfire).\n","packages/storage-compat/README.md":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/storage-types/README.md":"# @firebase/storage-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/storage/README.md":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/template-types/README.md":"# @firebase/template-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/template/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Ftemplate%2FREADME.md -->","packages/util/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Futil%2FREADME.md -->","packages/webchannel-wrapper/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Fwebchannel-wrapper%2FREADME.md -->"},"files":{"AGENTS.md":"# AGENTS.md\n\n## Testing instructions\n- Before testing, create a `config/project.json` file. Copy `config/ci.config.json` if another project config is not specified by the user.\n- This is a web SDK and is most commonly used in a browser environment, so if you are running unit tests, you must run browser unit tests, not just Node tests, even if the Node tests seem like they would be faster.\n\n## Preparing code for PRs\n- Run `yarn format` after any changes to `*.ts` or `*.js` files, to do a formatting and license pass.\\n- Run `yarn docgen:all` after any changes that affect the public API or that change the text of comments that are the source of public documentation\\n","packages/ai/README.md":"# @firebase/ai\n\nThis is the Firebase AI component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-compat/README.md":"# @firebase/analytics-compat\n\nThis is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-interop-types/README.md":"# @firebase/analytics-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics-types/README.md":"# @firebase/analytics-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/analytics/README.md":"# @firebase/analytics\n\nThis is the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-compat/README.md":"# @firebase/app-check-compat\n\nThis is the Firebase App Check component (compat version) of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-interop-types/README.md":"# @firebase/app-check-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check-types/README.md":"# @firebase/app-check-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-check/README.md":"# @firebase/app-check\n\nThis is the Firebase App Check component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","packages/app-compat/README.md":"# @firebase/app-compat\n\nThis is the compatibility layer for the Firebase App package, which recreates the v8 API.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app-types/README.md":"# @firebase/app-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/app/README.md":"# @firebase/app\n\nThis package coordinates the communication between the different Firebase components\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth-compat/README.md":"# @firebase/auth-compat\n\nThis is a compatability layer to for the Firebase Authentication SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","packages/auth-interop-types/README.md":"# @firebase/auth-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth-types/README.md":"# @firebase/auth-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/auth/README.md":"# @firebase/auth\n\nThis is the Firebase Authentication component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Testing\n\nThe modular Auth SDK has both unit tests and integration tests, along with a\nhost of npm scripts to run these tests. The most important commands are:\n\n| Command | Description |\n| ------- | ----------- |\n| `yarn test` | This will run lint, unit tests, and integration tests against the live environment|\n| `yarn test:<platform>` | Runs all browser tests, unit and integration |\n| `yarn test:<platform>:unit` | Runs only \\<platform> unit tests |\n| `yarn test:<platform>:unit:debug` | Runs \\<platform> unit tests, auto-watching for file system changes |\n| `yarn test:<platform>:integration` | Runs only integration tests against the live environment |\n| `yarn test:<platform>:integration:local` | Runs all headless \\<platform> integration tests against the emulator (more below) |\n| `yarn test:browser:integration:prodbackend` | Runs TOTP MFA integration tests against the backend (more below) |\n\nWhere \\<platform> is \"browser\" or \"node\". There are also cordova tests, but they\nare not broken into such granular details. Check out `package.json` for more.\n\n### Integration testing with the emulator\n\nTo test against the emulator, set up the Auth emulator\n([instructions](https://firebase.google.com/docs/emulator-suite/connect_and_prototype)).\nThe easiest way to run these tests is to use the `firebase emulators:exec`\ncommand\n([documentation](https://firebase.google.com/docs/emulator-suite/install_and_configure#startup)).\nYou can also manually start the emulator separately, and then point the tests\nto it by setting the `GCLOUD_PROJECT` and `FIREBASE_AUTH_EMULATOR_HOST`\nenvironmental variables. In addition to the commands listed above, the below\ncommands also run various tests:\n\n  * `yarn test:integration:local` — Executes Node and browser emulator\n    integration tests, as well as the Selenium WebDriver tests\n  \n  * `yarn test:webdriver` — Executes only the Selenium WebDriver\n    integration tests\n\nNote - The webdriver tests require the Chrome webdriver to match the version of Chrome running locally.\nIn the CI environment, this is ensured using the environment variable [here.](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/.github/workflows/test-changed-auth.yml#L7)\nWhen running locally, change the chromedriver version in [package.json](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/packages/auth/package.json#L124) to match your local Chrome version and run `yarn install`.\n\n\nFor example, to run all integration and WebDriver tests against the emulator,\nyou would simply execute the following command:\n\n```sh\nfirebase emulators:exec --project foo-bar --only auth \"yarn test:integration:local\"\n```\n\n### Integration testing with the production backend\n\nCurrently, MFA TOTP, password policy, and reCAPTCHA Enterprise phone verification tests only run \nagainst the production backend (since they are not supported on the emulator yet).\nRunning against the backend also makes it a more reliable end-to-end test.\n\n#### TOTP\n\nThe TOTP tests require the following email/password combination to exist in the project, so if you are running this test against your test project, please create this user:\n\n'totpuser-donotdelete@test.com', 'password'\n\nYou also need to verify this email address, in order to use MFA. This can be done with a curl command like this:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode   -d     '{\n      \"email\": \"totpuser-donotdelete@test.com\",\n      \"requestType\": \"VERIFY_EMAIL\",\n      \"returnOobLink\": true,\n    }'\n```\n\n#### Password policy\n\nThe password policy tests require a tenant configured with a password policy that requires all options to exist in the project.\n\nIf you are running this test against your test project, please create the tenant and configure the policy with the following curl command:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/tenants   -d     '{\n      \"displayName\": \"passpol-tenant\",\n      \"passwordPolicyConfig\": {\n        \"passwordPolicyEnforcementState\": \"ENFORCE\",\n        \"passwordPolicyVersions\": [\n          {\n            \"customStrengthOptions\": {\n              \"minPasswordLength\": 8,\n              \"maxPasswordLength\": 24,\n              \"containsLowercaseCharacter\": true,\n              \"containsUppercaseCharacter\": true,\n              \"containsNumericCharacter\": true,\n              \"containsNonAlphanumericCharacter\": true\n            }\n          }\n        ]\n      }\n    }'\n```\n\nReplace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.\n\n#### reCAPTCHA Enterprise phone verification\n\nThe reCAPTCHA Enterprise phone verification tests require reCAPTCHA Enterprise to be enabled and\nthe following fictional phone number to be configured and in the project. \n\nIf you are running this\ntest against your project, please [add this test phone number](https://firebase.google.com/docs/auth/web/phone-auth#create-fictional-phone-numbers-and-verification-codes):\n\n'+1 555-555-1000', SMS code: '123456'\n\nFollow [this guide](https://cloud.google.com/identity-platform/docs/recaptcha-enterprise) to enable reCAPTCHA\nEnterprise, then use the following curl command to set reCAPTCHA Enterprise to ENFORCE for phone provider:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: $\n{PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/config?updateMask=recaptchaConfig.phoneEnforcementState,recaptchaConfig.useSmsBotScore,recaptchaConfig.useSmsTollFraudProtection  -d '\n{\n  \"name\": \"projects/{PROJECT_ID}\",\n  \"recaptchaConfig\": {\n    \"phoneEnforcementState\": \"ENFORCE\",\n    \"useSmsBotScore\": \"true\",\n    \"useSmsTollFraudProtection\": \"true\",\n  },\n}'\n```\n\n### Selenium Webdriver tests\n\nThese tests assume that you have both Firefox and Chrome installed on your\ncomputer and in your `$PATH`. The tests will error out if this is not the case.\nThe WebDriver tests talk to the emulator, but unlike the headless integration\ntests, these run in a browser robot environment; the assertions themselves run\nin Node. When you run these tests a small Express server will be started to\nserve the static files the browser robot uses.\n","packages/auth/demo/README.md":"# Firebase-Auth for web - Auth Demo (Auth Next)\n\n## Prerequisites\n\nYou need all the prerequisites mentioned in the [top-level README.](https://github.com/firebase/firebase-js-sdk#prerequisites)\n\nYou need to have created a Firebase Project in the\n[Firebase Console](https://firebase.google.com/console/) as well as configured a web app.\n\n## Installation\nMake sure you run `yarn` to install all dependencies in the root directory.\n\nEnable the Auth providers you would like to offer your users in the console, under\nAuth > Sign-in methods.\n\nRun:\n\n```bash\ngit clone https://github.com/firebase/firebase-js-sdk.git\ncd firebase-js-sdk/packages/auth/demo\n```\n\nThis will clone the repository in the current directory.\n\nIf you want to be able to deploy the demo app to one of your own Firebase Hosting instance,\nconfigure it using the following command:\n\n```bash\nfirebase use --add\n```\n\nSelect the project you have created in the prerequisite, and type in `default` or\nany other name as the alias to use for this project.\n\nCopy `src/sample-config.js` to `src/config.js`:\n\n```bash\ncp src/sample-config.js src/config.js\n```\n\nThen copy and paste the Web snippet config found in the console (Project Settings -> Your apps -> SDK setup and Configuration)\nin the `config.js` file.\n\n## Deploy\n\nBefore deploying, you may need to build the auth package:\n```bash\ncd auth/demo\nyarn\nyarn build:deps\n```\n\nThis can take some time, and you only need to do it if you've modified the auth package.\n\nYou can optionally clear the cache and rebuild using:\n \n```bash\ncd auth/demo\nrm -rf node_modules yarn.lock\nyarn\nyarn build:deps\n```\n\nTo run the app locally, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo\n```\n\nThis will compile all the files needed to run Firebase Auth, and start a Firebase server locally at\n[http://localhost:5000](http://localhost:5000).\n\nThe demo opens a page like this:\n\n![image](https://user-images.githubusercontent.com/35932340/153662957-41ba6a82-ea15-4084-ad3a-9fd41083efd3.png)\n\n\nThis is a developer view of all the supported auth flows. Make sure that the auth flow you are testing is already enabled in your firebase project.\nFor example, if you are testing “Sign up with email/password”, your project should allow email/password as a provider. \nIf not, you will see an “auth/operation-not-allowed” error message. \n\nYou can check the enabled providers on the firebase console.\n\n![image](https://user-images.githubusercontent.com/35932340/153662750-c0faf417-07b4-4f0e-93ab-5e0b82e3c793.png)\n\n\n## Running against Auth Emulator\n\nThe demo page by default runs against the actual Auth Backend. To run against the Auth Emulator with mocked endpoints, do the following:\n\n1. (Optional) If you are running against local changes to the Auth Emulator (see [Firebase CLI Contributing Guide](https://github.com/firebase/firebase-tools/blob/master/CONTRIBUTING.md)), make sure that your version of `firebase-tools` is executing against your `npm link`’d repository and that you've built your local emulator changes with `npm run build`.\n\n2. From `auth/demo`, locally initialize a Firebase project by running `firebase init`. When asked \"Which Firebase features do you want to set up for this directory?\", select \"Emulators\". When asked \"Which Firebase emulators do you want to set up?\", select \"Authentication Emulator\". This will create a `firebase.json` file.\n\n3. Change the constants `USE_AUTH_EMULATOR` and `AUTH_EMULATOR_URL` in `auth/demo/src/index.js` to `true` and `http://localhost:{port}` where the auth `port` can be found in the `firebase.json` file.\n\n4. To run the app locally and against the Auth Emulator, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo:emulator\n```\n\n## Running against Auth Staging endpoint\n\nModify the configured endpoint to staging by following the changes in this branch:\n\nhttps://github.com/firebase/firebase-js-sdk/compare/use-staging\n\n## Running against local changes to auth package\n\n\nBy default, the demo runs against the local firebase-auth implementation in packages/auth/src.\nThis can be modified to point to a released version using:\n\n```\n// packages/auth/demo/package.json\n-  \"@firebase/auth\": \"file:..\",\n+  \"@firebase/auth\": \"0.18.0\",\n```\n\n## Troubleshooting\n\n### Errors about dependency not being installed, example `lerna: command not found`\n  \n  Ensure that you run `yarn` to install dependencies.\n\n### `Failed to get Firebase project <project name>. Please make sure the project exists and your account has permission to access it.`\n\nLogout, re-login and launch the demo\n\n```bash\nfirebase logout && firebase login && yarn demo\n```\n\n### `Failed to list firebase projects` when running `firebase use --add`\n\nLogout, re-login and add the project.\n\n```bash\nfirebase logout && firebase login && firebase use --add\n```\n\n### `Access to localhost was denied` when accessing the demo app via http://localhost:5000\n\nMost likely this means a different process is binding to localhost:5000.\nYou can access the demo app via http://127.0.0.1:5000 or use a different port using `yarn demo --port 5002`\n\nNote - If you use 127.0.0.1 in your browser, you need to allowlist it as a domain for sign in, as shown below.\n\n![image](https://user-images.githubusercontent.com/35932340/153659058-d669055f-b587-4bc2-9f32-323149df50c3.png)\n\n### `hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.`\n\nThis can happen when you run `yarn run demo:emulator` if port 5000 is taken.\nModify auth/demo/firebase.json with a custom port. Pick any port, this example picks 5091.\n\n```\n{\n  //...\n  \"emulators\": {\n    \"hosting\": {\n      \"host\": \"\",\n      \"port\": \"5091\"\n    }\n  }\n}\n```\n\n### Error message about functions\n\n`The Cloud Functions emulator requires the module \"firebase-admin\" to be installed. This package is in your package.json, but it's not available. You probably need to run \"npm install\" in your functions directory.\ni  functions: Your functions could not be parsed due to an issue with your node_modules (see above)\n`\n\nRun `npm install` inside the auth/demo/functions directory as mentioned in the error message.\n","packages/component/README.md":"# @firebase/component\n\n_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a\nmember of the Firebase team, please avoid using this package_\n\n## Usage\n\n**ES Modules**\n\n```javascript\nimport { Component } from '@firebase/component';\n```\n","packages/data-connect/README.md":"# Firebase Data Connect\n\n## Local Development\n\nCheck `test/dataconnect.yaml` to ensure that the correct values are filled in.\n","packages/database-compat/README.md":"# @firebase/database-compat\n\nThis is the compatibility layer for the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/database-types/README.md":"# @firebase/database-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/database/README.md":"# @firebase/database\n\nThis is the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/firebase/README.md":"<!-- BADGES -->\n![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)\n[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)\n[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)\n<!-- END BADGES -->\n\n# Firebase - App success made simple\n\n## Upgrade to Version 9\nVersion 9 has a redesigned API that supports tree-shaking. Read the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) to learn more.\n\n## Overview\n\n[Firebase](https://firebase.google.com) provides the tools and infrastructure\nyou need to develop, grow, and earn money from your app. This package supports\nweb (browser), mobile-web, and server (Node.js) clients.\n\nFor more information, visit:\n\n- [Firebase Realtime Database](https://firebase.google.com/docs/database/web/start) -\n  The Firebase Realtime Database lets you store and query user data, and makes\n  it available between users in realtime.\n- [Cloud Firestore](https://firebase.google.com/docs/firestore/quickstart) -\n  Cloud Firestore is a flexible, scalable database for mobile, web, and server\n  development from Firebase and Google Cloud Platform.\n- [Firebase Storage](https://firebase.google.com/docs/storage/web/start) -\n  Firebase Storage lets you upload and store user generated content, such as\n  files, and images.\n- [Cloud Functions for Firebase](https://firebase.google.com/docs/functions) -\n   Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.\n- [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/js/client) -\n  Firebase Cloud Messaging is a cross-platform messaging solution that lets you\n  reliably deliver messages at no cost.\n- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon/get-started-web) -\n  Firebase Performance Monitoring helps you gain insight into your app's performance issues.\n- [Google Analytics](https://firebase.google.com/docs/analytics/get-started?platform=web) -\n  Google Analytics is a free app measurement solution that provides insight on app usage and user engagement.\n- [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=web) -\n  Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your \n  app without requiring users to reload your app.\n- [App Check](https://firebase.google.com/docs/app-check/web/recaptcha-provider) -\n  App Check helps protect your backend resources from abuse, such as billing fraud and phishing. It \n  works with both Firebase services and your own backends to keep your resources safe.\n- [Create and setup your account](https://firebase.google.com/docs/web/setup) -\n  Get started using Firebase for free.\n\nThis SDK is intended for end-user client access from environments such as the\nWeb, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or\nIoT devices running Node.js. If you are instead interested in using a Node.js\nSDK which grants you admin access from a privileged environment (like a server),\nyou should use the\n[Firebase Admin Node.js SDK](https://firebase.google.com/docs/admin/setup/).\n\n### Install the SDK\n\nInstall the Firebase NPM module:\n```\n$ npm init\n$ npm install --save firebase\n```\n\n### Use Firebase in your app\n\n1. Initialize Firebase in your app and create a Firebase App object:\n```js\nimport { initializeApp } from 'firebase/app';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\n```\n\n2. Access Firebase services in your app\n\nFirebase services (like Cloud Firestore, Authentication, Realtime Database, Remote Config, and more) are available to import within individual sub-packages.\n\nThe example below shows how you could use the Cloud Firestore Lite SDK to retrieve a list of data.\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore/lite';\n// Follow this pattern to import other Firebase services\n// import { } from 'firebase/<service>';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\nconst db = getFirestore(app);\n\n// Get a list of cities from your database\nasync function getCities(db) {\n  const citiesCol = collection(db, 'cities');\n  const citySnapshot = await getDocs(citiesCol);\n  const cityList = citySnapshot.docs.map(doc => doc.data());\n  return cityList;\n}\n```\n\n### Use a module bundler for size reduction\n\nThe Firebase Web SDK is designed to work with module bundlers to remove any\nunused code (tree-shaking). We strongly recommend using this approach for\nproduction apps. Tools such as the [Angular CLI](//angular.io/cli),\n[Next.js](//nextjs.org/), [Vue CLI](//cli.vuejs.org/), or [Create\nReact App](//reactjs.org/docs/create-a-new-react-app.html) automatically\nhandle module bundling for libraries installed through npm and imported into\nyour codebase.\n\nSee [Using module bundlers with Firebase](/docs/web/module-bundling) for more information.\n\n### Script include\nYou can also load Firebase packages as script modules in browsers that support native ES modules.\n\n```html\n<!-- use script module by specifying type=\"module\" -->\n<script type=\"module\">\n    import { initializeApp } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app.js';\n    import { getFirestore, collection, getDocs } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore-lite.js';\n    // Follow this pattern to import other Firebase services\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-analytics.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app-check.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-auth.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-functions.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-storage.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-performance.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-remote-config.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-messaging.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-database.js\";\n    \n    // TODO: Replace the following with your app's Firebase project configuration\n    const firebaseConfig = {\n    //...\n    };\n\n    const app = initializeApp(firebaseConfig);\n    const db = getFirestore(app);\n\n    // Get a list of cities from your database\n    async function getCities(db) {\n    const citiesCol = collection(db, 'cities');\n    const citySnapshot = await getDocs(citiesCol);\n    const cityList = citySnapshot.docs.map(doc => doc.data());\n    return cityList;\n    }\n</script>\n```\n\n_Note: To get a filled in version of the above code snippet, go to the\n[Firebase console](https://console.firebase.google.com/) for your app and click on \"Add\nFirebase to your web app\"._\n\n## Get the code (Node.js - server and command line)\n\n### Install the SDK\n\nWhile you can write entire Firebase applications without any backend code, many\ndevelopers want to write server applications or command-line utilities using the\nNode.js JavaScript runtime.\n\nYou can use the same npm module to use Firebase in the Node.js runtime (on a\nserver or running from the command line):\n\n```\n$ npm init\n$ npm install --save firebase\n```\n\nIn your code, you can access Firebase using:\n\n```js\nconst { initializeApp } = require('firebase/app');\nconst { getFirestore, collection, getDocs } = require('firebase/firestore');\n// ...\n```\n\nIf you are using native ES6 module with --experimental-modules flag (or Node 12+)\nyou should do:\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore';\n// ...\n```\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk) for which packages\nare available in Node.js.\n\n## Compat packages\nVersion 9 provides a set of compat packages that are API compatible with Version 8. They are intended to\nbe used to make the upgrade to the modular API easier by allowing you to upgrade your app piece by piece.\nSee the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) for more detail.\n\nTo access the compat packages, use the subpath `compat` like so:\n```js\n// v9 compat packages are API compatible with v8 code\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\n```\n\n## Changelog\n\nThe Firebase changelog can be found at\n[firebase.google.com](https://firebase.google.com/support/release-notes/js).\n\n## Browser/environment compatibility\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk).","packages/firestore-compat/README.md":"# @firebase/firestore-compat\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","packages/firestore-types/README.md":"# @firebase/firestore-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/firestore/README.md":"# @firebase/firestore\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","packages/firestore/src/platform/README.md":"The modules in this directory provide implementations for platform-specific\nfeatures that are replaced at build time with implementations for the target\nplatforms. SDK code should only refer to the generic implementations that are\nprovided directly in this directory. The generic implementations provide\nsupport for running under `ts-node` but are otherwise unsupported.\n","packages/firestore/src/protos/README.md":"These protos are copied from https://github.com/googleapis/googleapis and\nhttps://github.com/google/protobuf.  Run update.sh to update them.\n","packages/firestore/test/integration/api/README.md":"All tests in this directory are also run against our (minified)\nfirebase-firestore.js build (via 'yarn test:manual' under\nfirebase-js-sdk/integration/firestore/) and therefore must not have any\ndependencies on src/ files.\n\nAPI tests that need to use internal hooks (via src/ dependencies) should be\nput in test/integration/api_internal instead.\n\nThe line \"import * as firebaseExport from '../util/firebase_export';\" is\nreplaced via the gulpfile in 'integration/firestore' and should not be\nmodified.\n\n\n## Testing composite index query against production\n\n### Setting Up the Environment:\n1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.\n2. If not already logged in, authenticate with your Google Cloud Platform (GCP) account using `gcloud auth application-default login`. You can check your logged-in accounts by running `gcloud auth list`.\n3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:\n```\nterraform init\nterraform apply -var-file=../../config/project.json -auto-approve\n```\nNote: If the index creation encounters issues, such as concurrent operations, consider running the index creation process again. Error messages indicating that indexes have already been created can be safely disregarded.\n\n\n### Adding new composite index query tests\n1. To create a new composite index for local development, click on the provided link in the test error message, which will direct you to the Firebase Console.\n2. Add the newly created composite index to the `firestore_index_config.tf` file. The \"__name__\" field is not required to be explicitly added to the file, as the index creation will auto complete it on behalf.\n","packages/firestore/test/unit/remote/bloom_filter_golden_test_data/README.md":"This directory contains the data for the \"golden\" tests for the BloomFilter\nclass.\n\nIt is imperative that the bloom filter implementation here matches exactly that\nof the server. The files in this directory are copied from the unit tests for\nthe server to ensure consistent behavior. They define input for the bloom filter\nand the expected results of its mightContain() method.\n\nThese files should be kept in sync with those from the backend unit tests.\nGooglers see http://google3/cloud/datastore/common/testdata/minion_goldens/.\n\nTo update the files in this directory, run the following command:\n```\ncp /google/src/head/depot/google3/cloud/datastore/common/testdata/minion_goldens/*.json .\n```\n\nThen, format the JSON files using `prettier` by running this command:\n```\ncd ../../../.. && yarn prettier\n```\n","packages/firestore/test/unit/specs/README.md":"# Firestore Spec Tests\n\nThe Firestore Spec Tests are a suite of unit tests that fake out external\nsources of events so that they can be completely controlled from the tests\nthemselves and verify the correct handling of these events.\n\nThere are three sources of external events in the SDK: user writes, input from\nthe persistence layer, and input from the watch stream. The spec tests fake all\nof these. Since these external events are asynchronous in nature, in the real\nworld there is some non-determinism in the ordering of events. The spec tests\nallow these orderings to be specified explicitly, enabling orderings that are\ndifficult or impossible to force when connected to a real backend. In addition,\nwhen running under Node, the IndexedDb persistence layer is faked.\n\nThe Firestore Spec Tests are portable and must be kept in sync between the Web\nSDK (this SDK), Android SDK, and iOS SDK. The Web SDK contains the authoritative\ntest definitions and they must be manually \"exported\" to the Android SDK and iOS\nSDK when they change.\n\n## Running the Tests\n\nThe spec tests are part of the unit test suite of each SDK. Therefore, to run\nthe spec tests simply run the entire unit test suite and the spec tests will be\nexecuted as a part of it.\n\n## Test Tags\n\nEach spec test can specify zero or many \"tags\" that influence the test's\nexecution. Some of the commonly-used tags are documented here; see\n[describe_spec.ts](describe_spec.ts) for the full set of supported tags.\n\n- `exclusive` - Only run this spec test and skip all others. It can be useful\n  to apply this tag to a test while it is under active development or debugging.\n  Tests should never be checked into source control with this tag.\n\n- `no-android` and `no-ios` - Do not run this spec test on Android and/or iOS,\n  respectively. It may be useful to specify these tags if the functionality has\n  not been or never will be ported to these platforms.\n\n## Exporting the Tests\n\nTo export the tests use the [generate_spec_json.sh](../generate_spec_json.sh)\nscript, specifying a single argument whose value is the destination directory\ninto which to place the generated files.\n\n#### Exporting the Tests to the Android SDK\n\nTo export the spec tests to the Android SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-android-sdk/firebase-firestore/src/test/resources/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the Android SDK is cloned into `~/firebase-android-sdk`.\n\n#### Exporting the Tests to the iOS SDK\n\nTo export the spec tests to the iOS SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-ios-sdk/Firestore/Example/Tests/SpecTests/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the iOS SDK is cloned into `~/firebase-ios-sdk`.\n","packages/functions-types/README.md":"# @firebase/functions-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/functions/README.md":"# `@firebase/functions`\n\nThis is the Firebase Functions component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/installations-compat/README.md":"# @firebase/installations-compat\n\nThis is a compatability layer  for the Firebase Installations SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","packages/logger/README.md":"# @firebase/logger\n\nThis package serves as the base of all logging in the JS SDK. Any logging that\nis intended to be visible to Firebase end developers should go through this\nmodule.\n\n## Basic Usage\n\nFirebase components should import the `Logger` class and instantiate a new\ninstance by passing a component name (e.g. `@firebase/<COMPONENT>`) to the\nconstructor.\n\n_e.g._\n\n```typescript\nimport { Logger } from '@firebase/logger';\n\nconst logClient = new Logger(`@firebase/<COMPONENT>`);\n```\n\nEach `Logger` instance supports 5 log functions each to be used in a specific\ninstance:\n\n- `debug`: Internal logs; use this to allow developers to send us their debug\n  logs for us to be able to diagnose an issue.\n- `log`: Use to inform your user about things they may need to know.\n- `info`: Use if you have to inform the user about something that they need to\n  take a concrete action on. Once they take that action, the log should go away.\n- `warn`: Use when a product feature may stop functioning correctly; unexpected\n  scenario.\n- `error`: Only use when user App would stop functioning correctly - super rare!\n\n## Log Format\n\nEach log will be formatted in the following manner:\n\n```typescript\n`[${new Date()}]  ${COMPONENT_NAME}: ${...args}`\n```\n\n","packages/messaging-compat/README.md":"# @firebase/messaging-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/messaging-interop-types/README.md":"# @firebase/messaging-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/messaging/README.md":"# @firebase/messaging\n\nThis is the Firebase Cloud Messaging component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/performance-compat/README.md":"# @firebase/performance-compat\n\nThis is the compat package that recreates the  v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/performance/README.md":"# @firebase/performance\n\nThis is the Firebase Performance component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config-compat/README.md":"# @firebase/remote-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config-types/README.md":"# @firebase/remoteconfig-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/remote-config/README.md":"# @firebase/remote-config\n\nThis is the [Remote Config](https://firebase.google.com/docs/remote-config/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Contributing\n\nSetup:\n\n1. Run `yarn` in repo root\n\nFormat:\n\n1. Run `yarn prettier` in RC package\n\nUnit test:\n\n1. Run `yarn test` in RC package\n\nEnd-to-end test:\n\n1. Run `yarn build` in RC package\n1. Run `yarn build` in Firebase package\n1. Open test_app/index.html in a browser\n","packages/rules-unit-testing/README.md":"# @firebase/rules-unit-testing\n\nA set of utilities useful for testing Security Rules with the Realtime Database or Cloud Firestore\nemulators.\n\nSee:\n\n  * [Test your Cloud Firestore Security Rules](https://firebase.google.com/docs/firestore/security/test-rules-emulator)\n  * [Testing Security Rules with the Realtime Database Emulator](https://firebase.google.com/docs/database/security/test-rules-emulator)\n","packages/rxfire/README.md":"# RxFire\n\nRxFire has moved to its own repository, you can find it here [firebaseextended/rxfire](https://github.com/firebaseextended/rxfire).\n","packages/storage-compat/README.md":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/storage-types/README.md":"# @firebase/storage-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/storage/README.md":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/template-types/README.md":"# @firebase/template-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","packages/template/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Ftemplate%2FREADME.md -->","packages/util/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Futil%2FREADME.md -->","packages/webchannel-wrapper/README.md":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Fwebchannel-wrapper%2FREADME.md -->"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# AGENTS.md\n\n## Testing instructions\n- Before testing, create a `config/project.json` file. Copy `config/ci.config.json` if another project config is not specified by the user.\n- This is a web SDK and is most commonly used in a browser environment, so if you are running unit tests, you must run browser unit tests, not just Node tests, even if the Node tests seem like they would be faster.\n\n## Preparing code for PRs\n- Run `yarn format` after any changes to `*.ts` or `*.js` files, to do a formatting and license pass.\\n- Run `yarn docgen:all` after any changes that affect the public API or that change the text of comments that are the source of public documentation\\n","isInternal":false,"tokens":161,"sizeBytes":672},{"name":"README.md","path":"packages/ai/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/ai/README.md","title":"ai Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/ai\n\nThis is the Firebase AI component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":53,"sizeBytes":239},{"name":"README.md","path":"packages/analytics-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/analytics-compat/README.md","title":"analytics-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/analytics-compat\n\nThis is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":59,"sizeBytes":288},{"name":"README.md","path":"packages/analytics-interop-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/analytics-interop-types/README.md","title":"analytics-interop-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/analytics-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":44,"sizeBytes":201},{"name":"README.md","path":"packages/analytics-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/analytics-types/README.md","title":"analytics-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/analytics-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":42,"sizeBytes":193},{"name":"README.md","path":"packages/analytics/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/analytics/README.md","title":"analytics Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/analytics\n\nThis is the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":53,"sizeBytes":253},{"name":"README.md","path":"packages/app-check-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-check-compat/README.md","title":"app-check-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-check-compat\n\nThis is the Firebase App Check component (compat version) of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":60,"sizeBytes":279},{"name":"README.md","path":"packages/app-check-interop-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-check-interop-types/README.md","title":"app-check-interop-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-check-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":44,"sizeBytes":201},{"name":"README.md","path":"packages/app-check-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-check-types/README.md","title":"app-check-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-check-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":42,"sizeBytes":193},{"name":"README.md","path":"packages/app-check/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-check/README.md","title":"app-check Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-check\n\nThis is the Firebase App Check component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":54,"sizeBytes":255},{"name":"README.md","path":"packages/app-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-compat/README.md","title":"app-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-compat\n\nThis is the compatibility layer for the Firebase App package, which recreates the v8 API.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":61,"sizeBytes":279},{"name":"README.md","path":"packages/app-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app-types/README.md","title":"app-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":187},{"name":"README.md","path":"packages/app/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/app/README.md","title":"app Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/app\n\nThis package coordinates the communication between the different Firebase components\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":51,"sizeBytes":267},{"name":"README.md","path":"packages/auth-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/auth-compat/README.md","title":"auth-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/auth-compat\n\nThis is a compatability layer to for the Firebase Authentication SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","isInternal":false,"tokens":56,"sizeBytes":258},{"name":"README.md","path":"packages/auth-interop-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/auth-interop-types/README.md","title":"auth-interop-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/auth-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":43,"sizeBytes":196},{"name":"README.md","path":"packages/auth-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/auth-types/README.md","title":"auth-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/auth-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":188},{"name":"README.md","path":"packages/auth/demo/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/auth/demo/README.md","title":"demo Documentation","category":"plugin-manifest","format":"markdown","content":"# Firebase-Auth for web - Auth Demo (Auth Next)\n\n## Prerequisites\n\nYou need all the prerequisites mentioned in the [top-level README.](https://github.com/firebase/firebase-js-sdk#prerequisites)\n\nYou need to have created a Firebase Project in the\n[Firebase Console](https://firebase.google.com/console/) as well as configured a web app.\n\n## Installation\nMake sure you run `yarn` to install all dependencies in the root directory.\n\nEnable the Auth providers you would like to offer your users in the console, under\nAuth > Sign-in methods.\n\nRun:\n\n```bash\ngit clone https://github.com/firebase/firebase-js-sdk.git\ncd firebase-js-sdk/packages/auth/demo\n```\n\nThis will clone the repository in the current directory.\n\nIf you want to be able to deploy the demo app to one of your own Firebase Hosting instance,\nconfigure it using the following command:\n\n```bash\nfirebase use --add\n```\n\nSelect the project you have created in the prerequisite, and type in `default` or\nany other name as the alias to use for this project.\n\nCopy `src/sample-config.js` to `src/config.js`:\n\n```bash\ncp src/sample-config.js src/config.js\n```\n\nThen copy and paste the Web snippet config found in the console (Project Settings -> Your apps -> SDK setup and Configuration)\nin the `config.js` file.\n\n## Deploy\n\nBefore deploying, you may need to build the auth package:\n```bash\ncd auth/demo\nyarn\nyarn build:deps\n```\n\nThis can take some time, and you only need to do it if you've modified the auth package.\n\nYou can optionally clear the cache and rebuild using:\n \n```bash\ncd auth/demo\nrm -rf node_modules yarn.lock\nyarn\nyarn build:deps\n```\n\nTo run the app locally, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo\n```\n\nThis will compile all the files needed to run Firebase Auth, and start a Firebase server locally at\n[http://localhost:5000](http://localhost:5000).\n\nThe demo opens a page like this:\n\n![image](https://user-images.githubusercontent.com/35932340/153662957-41ba6a82-ea15-4084-ad3a-9fd41083efd3.png)\n\n\nThis is a developer view of all the supported auth flows. Make sure that the auth flow you are testing is already enabled in your firebase project.\nFor example, if you are testing “Sign up with email/password”, your project should allow email/password as a provider. \nIf not, you will see an “auth/operation-not-allowed” error message. \n\nYou can check the enabled providers on the firebase console.\n\n![image](https://user-images.githubusercontent.com/35932340/153662750-c0faf417-07b4-4f0e-93ab-5e0b82e3c793.png)\n\n\n## Running against Auth Emulator\n\nThe demo page by default runs against the actual Auth Backend. To run against the Auth Emulator with mocked endpoints, do the following:\n\n1. (Optional) If you are running against local changes to the Auth Emulator (see [Firebase CLI Contributing Guide](https://github.com/firebase/firebase-tools/blob/master/CONTRIBUTING.md)), make sure that your version of `firebase-tools` is executing against your `npm link`’d repository and that you've built your local emulator changes with `npm run build`.\n\n2. From `auth/demo`, locally initialize a Firebase project by running `firebase init`. When asked \"Which Firebase features do you want to set up for this directory?\", select \"Emulators\". When asked \"Which Firebase emulators do you want to set up?\", select \"Authentication Emulator\". This will create a `firebase.json` file.\n\n3. Change the constants `USE_AUTH_EMULATOR` and `AUTH_EMULATOR_URL` in `auth/demo/src/index.js` to `true` and `http://localhost:{port}` where the auth `port` can be found in the `firebase.json` file.\n\n4. To run the app locally and against the Auth Emulator, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo:emulator\n```\n\n## Running against Auth Staging endpoint\n\nModify the configured endpoint to staging by following the changes in this branch:\n\nhttps://github.com/firebase/firebase-js-sdk/compare/use-staging\n\n## Running against local changes to auth package\n\n\nBy default, the demo runs against the local firebase-auth implementation in packages/auth/src.\nThis can be modified to point to a released version using:\n\n```\n// packages/auth/demo/package.json\n-  \"@firebase/auth\": \"file:..\",\n+  \"@firebase/auth\": \"0.18.0\",\n```\n\n## Troubleshooting\n\n### Errors about dependency not being installed, example `lerna: command not found`\n  \n  Ensure that you run `yarn` to install dependencies.\n\n### `Failed to get Firebase project <project name>. Please make sure the project exists and your account has permission to access it.`\n\nLogout, re-login and launch the demo\n\n```bash\nfirebase logout && firebase login && yarn demo\n```\n\n### `Failed to list firebase projects` when running `firebase use --add`\n\nLogout, re-login and add the project.\n\n```bash\nfirebase logout && firebase login && firebase use --add\n```\n\n### `Access to localhost was denied` when accessing the demo app via http://localhost:5000\n\nMost likely this means a different process is binding to localhost:5000.\nYou can access the demo app via http://127.0.0.1:5000 or use a different port using `yarn demo --port 5002`\n\nNote - If you use 127.0.0.1 in your browser, you need to allowlist it as a domain for sign in, as shown below.\n\n![image](https://user-images.githubusercontent.com/35932340/153659058-d669055f-b587-4bc2-9f32-323149df50c3.png)\n\n### `hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.`\n\nThis can happen when you run `yarn run demo:emulator` if port 5000 is taken.\nModify auth/demo/firebase.json with a custom port. Pick any port, this example picks 5091.\n\n```\n{\n  //...\n  \"emulators\": {\n    \"hosting\": {\n      \"host\": \"\",\n      \"port\": \"5091\"\n    }\n  }\n}\n```\n\n### Error message about functions\n\n`The Cloud Functions emulator requires the module \"firebase-admin\" to be installed. This package is in your package.json, but it's not available. You probably need to run \"npm install\" in your functions directory.\ni  functions: Your functions could not be parsed due to an issue with your node_modules (see above)\n`\n\nRun `npm install` inside the auth/demo/functions directory as mentioned in the error message.\n","isInternal":false,"tokens":1466,"sizeBytes":6147},{"name":"README.md","path":"packages/auth/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/auth/README.md","title":"auth Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/auth\n\nThis is the Firebase Authentication component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Testing\n\nThe modular Auth SDK has both unit tests and integration tests, along with a\nhost of npm scripts to run these tests. The most important commands are:\n\n| Command | Description |\n| ------- | ----------- |\n| `yarn test` | This will run lint, unit tests, and integration tests against the live environment|\n| `yarn test:<platform>` | Runs all browser tests, unit and integration |\n| `yarn test:<platform>:unit` | Runs only \\<platform> unit tests |\n| `yarn test:<platform>:unit:debug` | Runs \\<platform> unit tests, auto-watching for file system changes |\n| `yarn test:<platform>:integration` | Runs only integration tests against the live environment |\n| `yarn test:<platform>:integration:local` | Runs all headless \\<platform> integration tests against the emulator (more below) |\n| `yarn test:browser:integration:prodbackend` | Runs TOTP MFA integration tests against the backend (more below) |\n\nWhere \\<platform> is \"browser\" or \"node\". There are also cordova tests, but they\nare not broken into such granular details. Check out `package.json` for more.\n\n### Integration testing with the emulator\n\nTo test against the emulator, set up the Auth emulator\n([instructions](https://firebase.google.com/docs/emulator-suite/connect_and_prototype)).\nThe easiest way to run these tests is to use the `firebase emulators:exec`\ncommand\n([documentation](https://firebase.google.com/docs/emulator-suite/install_and_configure#startup)).\nYou can also manually start the emulator separately, and then point the tests\nto it by setting the `GCLOUD_PROJECT` and `FIREBASE_AUTH_EMULATOR_HOST`\nenvironmental variables. In addition to the commands listed above, the below\ncommands also run various tests:\n\n  * `yarn test:integration:local` — Executes Node and browser emulator\n    integration tests, as well as the Selenium WebDriver tests\n  \n  * `yarn test:webdriver` — Executes only the Selenium WebDriver\n    integration tests\n\nNote - The webdriver tests require the Chrome webdriver to match the version of Chrome running locally.\nIn the CI environment, this is ensured using the environment variable [here.](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/.github/workflows/test-changed-auth.yml#L7)\nWhen running locally, change the chromedriver version in [package.json](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/packages/auth/package.json#L124) to match your local Chrome version and run `yarn install`.\n\n\nFor example, to run all integration and WebDriver tests against the emulator,\nyou would simply execute the following command:\n\n```sh\nfirebase emulators:exec --project foo-bar --only auth \"yarn test:integration:local\"\n```\n\n### Integration testing with the production backend\n\nCurrently, MFA TOTP, password policy, and reCAPTCHA Enterprise phone verification tests only run \nagainst the production backend (since they are not supported on the emulator yet).\nRunning against the backend also makes it a more reliable end-to-end test.\n\n#### TOTP\n\nThe TOTP tests require the following email/password combination to exist in the project, so if you are running this test against your test project, please create this user:\n\n'totpuser-donotdelete@test.com', 'password'\n\nYou also need to verify this email address, in order to use MFA. This can be done with a curl command like this:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode   -d     '{\n      \"email\": \"totpuser-donotdelete@test.com\",\n      \"requestType\": \"VERIFY_EMAIL\",\n      \"returnOobLink\": true,\n    }'\n```\n\n#### Password policy\n\nThe password policy tests require a tenant configured with a password policy that requires all options to exist in the project.\n\nIf you are running this test against your test project, please create the tenant and configure the policy with the following curl command:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/tenants   -d     '{\n      \"displayName\": \"passpol-tenant\",\n      \"passwordPolicyConfig\": {\n        \"passwordPolicyEnforcementState\": \"ENFORCE\",\n        \"passwordPolicyVersions\": [\n          {\n            \"customStrengthOptions\": {\n              \"minPasswordLength\": 8,\n              \"maxPasswordLength\": 24,\n              \"containsLowercaseCharacter\": true,\n              \"containsUppercaseCharacter\": true,\n              \"containsNumericCharacter\": true,\n              \"containsNonAlphanumericCharacter\": true\n            }\n          }\n        ]\n      }\n    }'\n```\n\nReplace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.\n\n#### reCAPTCHA Enterprise phone verification\n\nThe reCAPTCHA Enterprise phone verification tests require reCAPTCHA Enterprise to be enabled and\nthe following fictional phone number to be configured and in the project. \n\nIf you are running this\ntest against your project, please [add this test phone number](https://firebase.google.com/docs/auth/web/phone-auth#create-fictional-phone-numbers-and-verification-codes):\n\n'+1 555-555-1000', SMS code: '123456'\n\nFollow [this guide](https://cloud.google.com/identity-platform/docs/recaptcha-enterprise) to enable reCAPTCHA\nEnterprise, then use the following curl command to set reCAPTCHA Enterprise to ENFORCE for phone provider:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: $\n{PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/config?updateMask=recaptchaConfig.phoneEnforcementState,recaptchaConfig.useSmsBotScore,recaptchaConfig.useSmsTollFraudProtection  -d '\n{\n  \"name\": \"projects/{PROJECT_ID}\",\n  \"recaptchaConfig\": {\n    \"phoneEnforcementState\": \"ENFORCE\",\n    \"useSmsBotScore\": \"true\",\n    \"useSmsTollFraudProtection\": \"true\",\n  },\n}'\n```\n\n### Selenium Webdriver tests\n\nThese tests assume that you have both Firefox and Chrome installed on your\ncomputer and in your `$PATH`. The tests will error out if this is not the case.\nThe WebDriver tests talk to the emulator, but unlike the headless integration\ntests, these run in a browser robot environment; the assertions themselves run\nin Node. When you run these tests a small Express server will be started to\nserve the static files the browser robot uses.\n","isInternal":false,"tokens":1650,"sizeBytes":7137},{"name":"README.md","path":"packages/component/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/component/README.md","title":"component Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/component\n\n_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a\nmember of the Firebase team, please avoid using this package_\n\n## Usage\n\n**ES Modules**\n\n```javascript\nimport { Component } from '@firebase/component';\n```\n","isInternal":false,"tokens":56,"sizeBytes":260},{"name":"README.md","path":"packages/data-connect/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/data-connect/README.md","title":"data-connect Documentation","category":"plugin-manifest","format":"markdown","content":"# Firebase Data Connect\n\n## Local Development\n\nCheck `test/dataconnect.yaml` to ensure that the correct values are filled in.\n","isInternal":false,"tokens":26,"sizeBytes":126},{"name":"README.md","path":"packages/database-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/database-compat/README.md","title":"database-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/database-compat\n\nThis is the compatibility layer for the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":61,"sizeBytes":296},{"name":"README.md","path":"packages/database-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/database-types/README.md","title":"database-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/database-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":192},{"name":"README.md","path":"packages/database/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/database/README.md","title":"database Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/database\n\nThis is the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":55,"sizeBytes":261},{"name":"README.md","path":"packages/firebase/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firebase/README.md","title":"firebase Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- BADGES -->\n![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)\n[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)\n[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)\n<!-- END BADGES -->\n\n# Firebase - App success made simple\n\n## Upgrade to Version 9\nVersion 9 has a redesigned API that supports tree-shaking. Read the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) to learn more.\n\n## Overview\n\n[Firebase](https://firebase.google.com) provides the tools and infrastructure\nyou need to develop, grow, and earn money from your app. This package supports\nweb (browser), mobile-web, and server (Node.js) clients.\n\nFor more information, visit:\n\n- [Firebase Realtime Database](https://firebase.google.com/docs/database/web/start) -\n  The Firebase Realtime Database lets you store and query user data, and makes\n  it available between users in realtime.\n- [Cloud Firestore](https://firebase.google.com/docs/firestore/quickstart) -\n  Cloud Firestore is a flexible, scalable database for mobile, web, and server\n  development from Firebase and Google Cloud Platform.\n- [Firebase Storage](https://firebase.google.com/docs/storage/web/start) -\n  Firebase Storage lets you upload and store user generated content, such as\n  files, and images.\n- [Cloud Functions for Firebase](https://firebase.google.com/docs/functions) -\n   Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.\n- [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/js/client) -\n  Firebase Cloud Messaging is a cross-platform messaging solution that lets you\n  reliably deliver messages at no cost.\n- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon/get-started-web) -\n  Firebase Performance Monitoring helps you gain insight into your app's performance issues.\n- [Google Analytics](https://firebase.google.com/docs/analytics/get-started?platform=web) -\n  Google Analytics is a free app measurement solution that provides insight on app usage and user engagement.\n- [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=web) -\n  Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your \n  app without requiring users to reload your app.\n- [App Check](https://firebase.google.com/docs/app-check/web/recaptcha-provider) -\n  App Check helps protect your backend resources from abuse, such as billing fraud and phishing. It \n  works with both Firebase services and your own backends to keep your resources safe.\n- [Create and setup your account](https://firebase.google.com/docs/web/setup) -\n  Get started using Firebase for free.\n\nThis SDK is intended for end-user client access from environments such as the\nWeb, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or\nIoT devices running Node.js. If you are instead interested in using a Node.js\nSDK which grants you admin access from a privileged environment (like a server),\nyou should use the\n[Firebase Admin Node.js SDK](https://firebase.google.com/docs/admin/setup/).\n\n### Install the SDK\n\nInstall the Firebase NPM module:\n```\n$ npm init\n$ npm install --save firebase\n```\n\n### Use Firebase in your app\n\n1. Initialize Firebase in your app and create a Firebase App object:\n```js\nimport { initializeApp } from 'firebase/app';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\n```\n\n2. Access Firebase services in your app\n\nFirebase services (like Cloud Firestore, Authentication, Realtime Database, Remote Config, and more) are available to import within individual sub-packages.\n\nThe example below shows how you could use the Cloud Firestore Lite SDK to retrieve a list of data.\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore/lite';\n// Follow this pattern to import other Firebase services\n// import { } from 'firebase/<service>';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\nconst db = getFirestore(app);\n\n// Get a list of cities from your database\nasync function getCities(db) {\n  const citiesCol = collection(db, 'cities');\n  const citySnapshot = await getDocs(citiesCol);\n  const cityList = citySnapshot.docs.map(doc => doc.data());\n  return cityList;\n}\n```\n\n### Use a module bundler for size reduction\n\nThe Firebase Web SDK is designed to work with module bundlers to remove any\nunused code (tree-shaking). We strongly recommend using this approach for\nproduction apps. Tools such as the [Angular CLI](//angular.io/cli),\n[Next.js](//nextjs.org/), [Vue CLI](//cli.vuejs.org/), or [Create\nReact App](//reactjs.org/docs/create-a-new-react-app.html) automatically\nhandle module bundling for libraries installed through npm and imported into\nyour codebase.\n\nSee [Using module bundlers with Firebase](/docs/web/module-bundling) for more information.\n\n### Script include\nYou can also load Firebase packages as script modules in browsers that support native ES modules.\n\n```html\n<!-- use script module by specifying type=\"module\" -->\n<script type=\"module\">\n    import { initializeApp } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app.js';\n    import { getFirestore, collection, getDocs } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore-lite.js';\n    // Follow this pattern to import other Firebase services\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-analytics.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app-check.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-auth.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-functions.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-storage.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-performance.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-remote-config.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-messaging.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-database.js\";\n    \n    // TODO: Replace the following with your app's Firebase project configuration\n    const firebaseConfig = {\n    //...\n    };\n\n    const app = initializeApp(firebaseConfig);\n    const db = getFirestore(app);\n\n    // Get a list of cities from your database\n    async function getCities(db) {\n    const citiesCol = collection(db, 'cities');\n    const citySnapshot = await getDocs(citiesCol);\n    const cityList = citySnapshot.docs.map(doc => doc.data());\n    return cityList;\n    }\n</script>\n```\n\n_Note: To get a filled in version of the above code snippet, go to the\n[Firebase console](https://console.firebase.google.com/) for your app and click on \"Add\nFirebase to your web app\"._\n\n## Get the code (Node.js - server and command line)\n\n### Install the SDK\n\nWhile you can write entire Firebase applications without any backend code, many\ndevelopers want to write server applications or command-line utilities using the\nNode.js JavaScript runtime.\n\nYou can use the same npm module to use Firebase in the Node.js runtime (on a\nserver or running from the command line):\n\n```\n$ npm init\n$ npm install --save firebase\n```\n\nIn your code, you can access Firebase using:\n\n```js\nconst { initializeApp } = require('firebase/app');\nconst { getFirestore, collection, getDocs } = require('firebase/firestore');\n// ...\n```\n\nIf you are using native ES6 module with --experimental-modules flag (or Node 12+)\nyou should do:\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore';\n// ...\n```\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk) for which packages\nare available in Node.js.\n\n## Compat packages\nVersion 9 provides a set of compat packages that are API compatible with Version 8. They are intended to\nbe used to make the upgrade to the modular API easier by allowing you to upgrade your app piece by piece.\nSee the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) for more detail.\n\nTo access the compat packages, use the subpath `compat` like so:\n```js\n// v9 compat packages are API compatible with v8 code\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\n```\n\n## Changelog\n\nThe Firebase changelog can be found at\n[firebase.google.com](https://firebase.google.com/support/release-notes/js).\n\n## Browser/environment compatibility\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk).","isInternal":false,"tokens":2080,"sizeBytes":9433},{"name":"README.md","path":"packages/firestore-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore-compat/README.md","title":"firestore-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/firestore-compat\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","isInternal":false,"tokens":221,"sizeBytes":1038},{"name":"README.md","path":"packages/firestore-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore-types/README.md","title":"firestore-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/firestore-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":42,"sizeBytes":193},{"name":"README.md","path":"packages/firestore/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/README.md","title":"firestore Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/firestore\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n","isInternal":false,"tokens":219,"sizeBytes":1031},{"name":"README.md","path":"packages/firestore/src/platform/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/src/platform/README.md","title":"platform Documentation","category":"plugin-manifest","format":"markdown","content":"The modules in this directory provide implementations for platform-specific\nfeatures that are replaced at build time with implementations for the target\nplatforms. SDK code should only refer to the generic implementations that are\nprovided directly in this directory. The generic implementations provide\nsupport for running under `ts-node` but are otherwise unsupported.\n","isInternal":false,"tokens":63,"sizeBytes":371},{"name":"README.md","path":"packages/firestore/src/protos/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/src/protos/README.md","title":"protos Documentation","category":"plugin-manifest","format":"markdown","content":"These protos are copied from https://github.com/googleapis/googleapis and\nhttps://github.com/google/protobuf.  Run update.sh to update them.\n","isInternal":false,"tokens":32,"sizeBytes":141},{"name":"README.md","path":"packages/firestore/test/integration/api/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/test/integration/api/README.md","title":"api Documentation","category":"plugin-manifest","format":"markdown","content":"All tests in this directory are also run against our (minified)\nfirebase-firestore.js build (via 'yarn test:manual' under\nfirebase-js-sdk/integration/firestore/) and therefore must not have any\ndependencies on src/ files.\n\nAPI tests that need to use internal hooks (via src/ dependencies) should be\nput in test/integration/api_internal instead.\n\nThe line \"import * as firebaseExport from '../util/firebase_export';\" is\nreplaced via the gulpfile in 'integration/firestore' and should not be\nmodified.\n\n\n## Testing composite index query against production\n\n### Setting Up the Environment:\n1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.\n2. If not already logged in, authenticate with your Google Cloud Platform (GCP) account using `gcloud auth application-default login`. You can check your logged-in accounts by running `gcloud auth list`.\n3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:\n```\nterraform init\nterraform apply -var-file=../../config/project.json -auto-approve\n```\nNote: If the index creation encounters issues, such as concurrent operations, consider running the index creation process again. Error messages indicating that indexes have already been created can be safely disregarded.\n\n\n### Adding new composite index query tests\n1. To create a new composite index for local development, click on the provided link in the test error message, which will direct you to the Firebase Console.\n2. Add the newly created composite index to the `firestore_index_config.tf` file. The \"__name__\" field is not required to be explicitly added to the file, as the index creation will auto complete it on behalf.\n","isInternal":false,"tokens":363,"sizeBytes":1733},{"name":"README.md","path":"packages/firestore/test/unit/remote/bloom_filter_golden_test_data/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/test/unit/remote/bloom_filter_golden_test_data/README.md","title":"bloom_filter_golden_test_data Documentation","category":"plugin-manifest","format":"markdown","content":"This directory contains the data for the \"golden\" tests for the BloomFilter\nclass.\n\nIt is imperative that the bloom filter implementation here matches exactly that\nof the server. The files in this directory are copied from the unit tests for\nthe server to ensure consistent behavior. They define input for the bloom filter\nand the expected results of its mightContain() method.\n\nThese files should be kept in sync with those from the backend unit tests.\nGooglers see http://google3/cloud/datastore/common/testdata/minion_goldens/.\n\nTo update the files in this directory, run the following command:\n```\ncp /google/src/head/depot/google3/cloud/datastore/common/testdata/minion_goldens/*.json .\n```\n\nThen, format the JSON files using `prettier` by running this command:\n```\ncd ../../../.. && yarn prettier\n```\n","isInternal":false,"tokens":177,"sizeBytes":807},{"name":"README.md","path":"packages/firestore/test/unit/specs/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/firestore/test/unit/specs/README.md","title":"specs Documentation","category":"plugin-manifest","format":"markdown","content":"# Firestore Spec Tests\n\nThe Firestore Spec Tests are a suite of unit tests that fake out external\nsources of events so that they can be completely controlled from the tests\nthemselves and verify the correct handling of these events.\n\nThere are three sources of external events in the SDK: user writes, input from\nthe persistence layer, and input from the watch stream. The spec tests fake all\nof these. Since these external events are asynchronous in nature, in the real\nworld there is some non-determinism in the ordering of events. The spec tests\nallow these orderings to be specified explicitly, enabling orderings that are\ndifficult or impossible to force when connected to a real backend. In addition,\nwhen running under Node, the IndexedDb persistence layer is faked.\n\nThe Firestore Spec Tests are portable and must be kept in sync between the Web\nSDK (this SDK), Android SDK, and iOS SDK. The Web SDK contains the authoritative\ntest definitions and they must be manually \"exported\" to the Android SDK and iOS\nSDK when they change.\n\n## Running the Tests\n\nThe spec tests are part of the unit test suite of each SDK. Therefore, to run\nthe spec tests simply run the entire unit test suite and the spec tests will be\nexecuted as a part of it.\n\n## Test Tags\n\nEach spec test can specify zero or many \"tags\" that influence the test's\nexecution. Some of the commonly-used tags are documented here; see\n[describe_spec.ts](describe_spec.ts) for the full set of supported tags.\n\n- `exclusive` - Only run this spec test and skip all others. It can be useful\n  to apply this tag to a test while it is under active development or debugging.\n  Tests should never be checked into source control with this tag.\n\n- `no-android` and `no-ios` - Do not run this spec test on Android and/or iOS,\n  respectively. It may be useful to specify these tags if the functionality has\n  not been or never will be ported to these platforms.\n\n## Exporting the Tests\n\nTo export the tests use the [generate_spec_json.sh](../generate_spec_json.sh)\nscript, specifying a single argument whose value is the destination directory\ninto which to place the generated files.\n\n#### Exporting the Tests to the Android SDK\n\nTo export the spec tests to the Android SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-android-sdk/firebase-firestore/src/test/resources/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the Android SDK is cloned into `~/firebase-android-sdk`.\n\n#### Exporting the Tests to the iOS SDK\n\nTo export the spec tests to the iOS SDK, run the following command:\n\n```\ncd ~/firebase-js-sdk/packages/firestore/test/unit &&\n./generate_spec_json.sh ~/firebase-ios-sdk/Firestore/Example/Tests/SpecTests/json\n```\n\nThis command assumes that this Git repository is cloned into `~/firebase-js-sdk`\nand the iOS SDK is cloned into `~/firebase-ios-sdk`.\n","isInternal":false,"tokens":641,"sizeBytes":2939},{"name":"README.md","path":"packages/functions-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/functions-types/README.md","title":"functions-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/functions-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":193},{"name":"README.md","path":"packages/functions/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/functions/README.md","title":"functions Documentation","category":"plugin-manifest","format":"markdown","content":"# `@firebase/functions`\n\nThis is the Firebase Functions component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":53,"sizeBytes":255},{"name":"README.md","path":"packages/installations-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/installations-compat/README.md","title":"installations-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/installations-compat\n\nThis is a compatability layer  for the Firebase Installations SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**","isInternal":false,"tokens":58,"sizeBytes":264},{"name":"README.md","path":"packages/logger/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/logger/README.md","title":"logger Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/logger\n\nThis package serves as the base of all logging in the JS SDK. Any logging that\nis intended to be visible to Firebase end developers should go through this\nmodule.\n\n## Basic Usage\n\nFirebase components should import the `Logger` class and instantiate a new\ninstance by passing a component name (e.g. `@firebase/<COMPONENT>`) to the\nconstructor.\n\n_e.g._\n\n```typescript\nimport { Logger } from '@firebase/logger';\n\nconst logClient = new Logger(`@firebase/<COMPONENT>`);\n```\n\nEach `Logger` instance supports 5 log functions each to be used in a specific\ninstance:\n\n- `debug`: Internal logs; use this to allow developers to send us their debug\n  logs for us to be able to diagnose an issue.\n- `log`: Use to inform your user about things they may need to know.\n- `info`: Use if you have to inform the user about something that they need to\n  take a concrete action on. Once they take that action, the log should go away.\n- `warn`: Use when a product feature may stop functioning correctly; unexpected\n  scenario.\n- `error`: Only use when user App would stop functioning correctly - super rare!\n\n## Log Format\n\nEach log will be formatted in the following manner:\n\n```typescript\n`[${new Date()}]  ${COMPONENT_NAME}: ${...args}`\n```\n\n","isInternal":false,"tokens":287,"sizeBytes":1243},{"name":"README.md","path":"packages/messaging-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/messaging-compat/README.md","title":"messaging-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/messaging-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":56,"sizeBytes":250},{"name":"README.md","path":"packages/messaging-interop-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/messaging-interop-types/README.md","title":"messaging-interop-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/messaging-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":45,"sizeBytes":201},{"name":"README.md","path":"packages/messaging/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/messaging/README.md","title":"messaging Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/messaging\n\nThis is the Firebase Cloud Messaging component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":54,"sizeBytes":259},{"name":"README.md","path":"packages/performance-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/performance-compat/README.md","title":"performance-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/performance-compat\n\nThis is the compat package that recreates the  v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":57,"sizeBytes":253},{"name":"README.md","path":"packages/performance/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/performance/README.md","title":"performance Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/performance\n\nThis is the Firebase Performance component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":53,"sizeBytes":257},{"name":"README.md","path":"packages/remote-config-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/remote-config-compat/README.md","title":"remote-config-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/remote-compat\n\nThis is the compat package that recreates the v8 APIs.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":56,"sizeBytes":247},{"name":"README.md","path":"packages/remote-config-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/remote-config-types/README.md","title":"remote-config-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/remoteconfig-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":43,"sizeBytes":196},{"name":"README.md","path":"packages/remote-config/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/remote-config/README.md","title":"remote-config Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/remote-config\n\nThis is the [Remote Config](https://firebase.google.com/docs/remote-config/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Contributing\n\nSetup:\n\n1. Run `yarn` in repo root\n\nFormat:\n\n1. Run `yarn prettier` in RC package\n\nUnit test:\n\n1. Run `yarn test` in RC package\n\nEnd-to-end test:\n\n1. Run `yarn build` in RC package\n1. Run `yarn build` in Firebase package\n1. Open test_app/index.html in a browser\n","isInternal":false,"tokens":166,"sizeBytes":625},{"name":"README.md","path":"packages/rules-unit-testing/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/rules-unit-testing/README.md","title":"rules-unit-testing Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/rules-unit-testing\n\nA set of utilities useful for testing Security Rules with the Realtime Database or Cloud Firestore\nemulators.\n\nSee:\n\n  * [Test your Cloud Firestore Security Rules](https://firebase.google.com/docs/firestore/security/test-rules-emulator)\n  * [Testing Security Rules with the Realtime Database Emulator](https://firebase.google.com/docs/database/security/test-rules-emulator)\n","isInternal":false,"tokens":83,"sizeBytes":406},{"name":"README.md","path":"packages/rxfire/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/rxfire/README.md","title":"rxfire Documentation","category":"plugin-manifest","format":"markdown","content":"# RxFire\n\nRxFire has moved to its own repository, you can find it here [firebaseextended/rxfire](https://github.com/firebaseextended/rxfire).\n","isInternal":false,"tokens":37,"sizeBytes":142},{"name":"README.md","path":"packages/storage-compat/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/storage-compat/README.md","title":"storage-compat Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":52,"sizeBytes":246},{"name":"README.md","path":"packages/storage-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/storage-types/README.md","title":"storage-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/storage-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":191},{"name":"README.md","path":"packages/storage/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/storage/README.md","title":"storage Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/storage\n\nThis is the Cloud Storage component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":52,"sizeBytes":246},{"name":"README.md","path":"packages/template-types/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/template-types/README.md","title":"template-types Documentation","category":"plugin-manifest","format":"markdown","content":"# @firebase/template-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n","isInternal":false,"tokens":41,"sizeBytes":192},{"name":"README.md","path":"packages/template/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/template/README.md","title":"template Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Ftemplate%2FREADME.md -->","isInternal":false,"tokens":92,"sizeBytes":402},{"name":"README.md","path":"packages/util/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/util/README.md","title":"util Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Futil%2FREADME.md -->","isInternal":false,"tokens":116,"sizeBytes":517},{"name":"README.md","path":"packages/webchannel-wrapper/README.md","rawUrl":"https://raw.githubusercontent.com/firebase/firebase-js-sdk/HEAD/packages/webchannel-wrapper/README.md","title":"webchannel-wrapper Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/firebase/firebase-js-sdk?path=packages%2Fwebchannel-wrapper%2FREADME.md -->","isInternal":false,"tokens":165,"sizeBytes":748}],"systemPromptSnippet":"<yakaai_skills repo=\"firebase/firebase-js-sdk\">\n<!-- File: AGENTS.md (Tokens: ~161 | Category: root-instruction) -->\n# AGENTS.md\n\n## Testing instructions\n- Before testing, create a `config/project.json` file. Copy `config/ci.config.json` if another project config is not specified by the user.\n- This is a web SDK and is most commonly used in a browser environment, so if you are running unit tests, you must run browser unit tests, not just Node tests, even if the Node tests seem like they would be faster.\n\n## Preparing code for PRs\n- Run `yarn format` after any changes to `*.ts` or `*.js` files, to do a formatting and license pass.\\n- Run `yarn docgen:all` after any changes that affect the public API or that change the text of comments that are the source of public documentation\\n\n\n<!-- File: packages/ai/README.md (Tokens: ~53 | Category: plugin-manifest) -->\n# @firebase/ai\n\nThis is the Firebase AI component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/analytics-compat/README.md (Tokens: ~59 | Category: plugin-manifest) -->\n# @firebase/analytics-compat\n\nThis is the compatibility layer for the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/analytics-interop-types/README.md (Tokens: ~44 | Category: plugin-manifest) -->\n# @firebase/analytics-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/analytics-types/README.md (Tokens: ~42 | Category: plugin-manifest) -->\n# @firebase/analytics-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/analytics/README.md (Tokens: ~53 | Category: plugin-manifest) -->\n# @firebase/analytics\n\nThis is the Firebase Analytics component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-check-compat/README.md (Tokens: ~60 | Category: plugin-manifest) -->\n# @firebase/app-check-compat\n\nThis is the Firebase App Check component (compat version) of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-check-interop-types/README.md (Tokens: ~44 | Category: plugin-manifest) -->\n# @firebase/app-check-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-check-types/README.md (Tokens: ~42 | Category: plugin-manifest) -->\n# @firebase/app-check-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-check/README.md (Tokens: ~54 | Category: plugin-manifest) -->\n# @firebase/app-check\n\nThis is the Firebase App Check component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-compat/README.md (Tokens: ~61 | Category: plugin-manifest) -->\n# @firebase/app-compat\n\nThis is the compatibility layer for the Firebase App package, which recreates the v8 API.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app-types/README.md (Tokens: ~41 | Category: plugin-manifest) -->\n# @firebase/app-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/app/README.md (Tokens: ~51 | Category: plugin-manifest) -->\n# @firebase/app\n\nThis package coordinates the communication between the different Firebase components\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/auth-compat/README.md (Tokens: ~56 | Category: plugin-manifest) -->\n# @firebase/auth-compat\n\nThis is a compatability layer to for the Firebase Authentication SDK\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/auth-interop-types/README.md (Tokens: ~43 | Category: plugin-manifest) -->\n# @firebase/auth-interop-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/auth-types/README.md (Tokens: ~41 | Category: plugin-manifest) -->\n# @firebase/auth-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/auth/demo/README.md (Tokens: ~1466 | Category: plugin-manifest) -->\n# Firebase-Auth for web - Auth Demo (Auth Next)\n\n## Prerequisites\n\nYou need all the prerequisites mentioned in the [top-level README.](https://github.com/firebase/firebase-js-sdk#prerequisites)\n\nYou need to have created a Firebase Project in the\n[Firebase Console](https://firebase.google.com/console/) as well as configured a web app.\n\n## Installation\nMake sure you run `yarn` to install all dependencies in the root directory.\n\nEnable the Auth providers you would like to offer your users in the console, under\nAuth > Sign-in methods.\n\nRun:\n\n```bash\ngit clone https://github.com/firebase/firebase-js-sdk.git\ncd firebase-js-sdk/packages/auth/demo\n```\n\nThis will clone the repository in the current directory.\n\nIf you want to be able to deploy the demo app to one of your own Firebase Hosting instance,\nconfigure it using the following command:\n\n```bash\nfirebase use --add\n```\n\nSelect the project you have created in the prerequisite, and type in `default` or\nany other name as the alias to use for this project.\n\nCopy `src/sample-config.js` to `src/config.js`:\n\n```bash\ncp src/sample-config.js src/config.js\n```\n\nThen copy and paste the Web snippet config found in the console (Project Settings -> Your apps -> SDK setup and Configuration)\nin the `config.js` file.\n\n## Deploy\n\nBefore deploying, you may need to build the auth package:\n```bash\ncd auth/demo\nyarn\nyarn build:deps\n```\n\nThis can take some time, and you only need to do it if you've modified the auth package.\n\nYou can optionally clear the cache and rebuild using:\n \n```bash\ncd auth/demo\nrm -rf node_modules yarn.lock\nyarn\nyarn build:deps\n```\n\nTo run the app locally, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo\n```\n\nThis will compile all the files needed to run Firebase Auth, and start a Firebase server locally at\n[http://localhost:5000](http://localhost:5000).\n\nThe demo opens a page like this:\n\n![image](https://user-images.githubusercontent.com/35932340/153662957-41ba6a82-ea15-4084-ad3a-9fd41083efd3.png)\n\n\nThis is a developer view of all the supported auth flows. Make sure that the auth flow you are testing is already enabled in your firebase project.\nFor example, if you are testing “Sign up with email/password”, your project should allow email/password as a provider. \nIf not, you will see an “auth/operation-not-allowed” error message. \n\nYou can check the enabled providers on the firebase console.\n\n![image](https://user-images.githubusercontent.com/35932340/153662750-c0faf417-07b4-4f0e-93ab-5e0b82e3c793.png)\n\n\n## Running against Auth Emulator\n\nThe demo page by default runs against the actual Auth Backend. To run against the Auth Emulator with mocked endpoints, do the following:\n\n1. (Optional) If you are running against local changes to the Auth Emulator (see [Firebase CLI Contributing Guide](https://github.com/firebase/firebase-tools/blob/master/CONTRIBUTING.md)), make sure that your version of `firebase-tools` is executing against your `npm link`’d repository and that you've built your local emulator changes with `npm run build`.\n\n2. From `auth/demo`, locally initialize a Firebase project by running `firebase init`. When asked \"Which Firebase features do you want to set up for this directory?\", select \"Emulators\". When asked \"Which Firebase emulators do you want to set up?\", select \"Authentication Emulator\". This will create a `firebase.json` file.\n\n3. Change the constants `USE_AUTH_EMULATOR` and `AUTH_EMULATOR_URL` in `auth/demo/src/index.js` to `true` and `http://localhost:{port}` where the auth `port` can be found in the `firebase.json` file.\n\n4. To run the app locally and against the Auth Emulator, simply issue the following command in the `auth/demo` directory:\n\n```bash\nyarn run demo:emulator\n```\n\n## Running against Auth Staging endpoint\n\nModify the configured endpoint to staging by following the changes in this branch:\n\nhttps://github.com/firebase/firebase-js-sdk/compare/use-staging\n\n## Running against local changes to auth package\n\n\nBy default, the demo runs against the local firebase-auth implementation in packages/auth/src.\nThis can be modified to point to a released version using:\n\n```\n// packages/auth/demo/package.json\n-  \"@firebase/auth\": \"file:..\",\n+  \"@firebase/auth\": \"0.18.0\",\n```\n\n## Troubleshooting\n\n### Errors about dependency not being installed, example `lerna: command not found`\n  \n  Ensure that you run `yarn` to install dependencies.\n\n### `Failed to get Firebase project <project name>. Please make sure the project exists and your account has permission to access it.`\n\nLogout, re-login and launch the demo\n\n```bash\nfirebase logout && firebase login && yarn demo\n```\n\n### `Failed to list firebase projects` when running `firebase use --add`\n\nLogout, re-login and add the project.\n\n```bash\nfirebase logout && firebase login && firebase use --add\n```\n\n### `Access to localhost was denied` when accessing the demo app via http://localhost:5000\n\nMost likely this means a different process is binding to localhost:5000.\nYou can access the demo app via http://127.0.0.1:5000 or use a different port using `yarn demo --port 5002`\n\nNote - If you use 127.0.0.1 in your browser, you need to allowlist it as a domain for sign in, as shown below.\n\n![image](https://user-images.githubusercontent.com/35932340/153659058-d669055f-b587-4bc2-9f32-323149df50c3.png)\n\n### `hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.`\n\nThis can happen when you run `yarn run demo:emulator` if port 5000 is taken.\nModify auth/demo/firebase.json with a custom port. Pick any port, this example picks 5091.\n\n```\n{\n  //...\n  \"emulators\": {\n    \"hosting\": {\n      \"host\": \"\",\n      \"port\": \"5091\"\n    }\n  }\n}\n```\n\n### Error message about functions\n\n`The Cloud Functions emulator requires the module \"firebase-admin\" to be installed. This package is in your package.json, but it's not available. You probably need to run \"npm install\" in your functions directory.\ni  functions: Your functions could not be parsed due to an issue with your node_modules (see above)\n`\n\nRun `npm install` inside the auth/demo/functions directory as mentioned in the error message.\n\n<!-- File: packages/auth/README.md (Tokens: ~1650 | Category: plugin-manifest) -->\n# @firebase/auth\n\nThis is the Firebase Authentication component of the Firebase JS SDK.\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n## Testing\n\nThe modular Auth SDK has both unit tests and integration tests, along with a\nhost of npm scripts to run these tests. The most important commands are:\n\n| Command | Description |\n| ------- | ----------- |\n| `yarn test` | This will run lint, unit tests, and integration tests against the live environment|\n| `yarn test:<platform>` | Runs all browser tests, unit and integration |\n| `yarn test:<platform>:unit` | Runs only \\<platform> unit tests |\n| `yarn test:<platform>:unit:debug` | Runs \\<platform> unit tests, auto-watching for file system changes |\n| `yarn test:<platform>:integration` | Runs only integration tests against the live environment |\n| `yarn test:<platform>:integration:local` | Runs all headless \\<platform> integration tests against the emulator (more below) |\n| `yarn test:browser:integration:prodbackend` | Runs TOTP MFA integration tests against the backend (more below) |\n\nWhere \\<platform> is \"browser\" or \"node\". There are also cordova tests, but they\nare not broken into such granular details. Check out `package.json` for more.\n\n### Integration testing with the emulator\n\nTo test against the emulator, set up the Auth emulator\n([instructions](https://firebase.google.com/docs/emulator-suite/connect_and_prototype)).\nThe easiest way to run these tests is to use the `firebase emulators:exec`\ncommand\n([documentation](https://firebase.google.com/docs/emulator-suite/install_and_configure#startup)).\nYou can also manually start the emulator separately, and then point the tests\nto it by setting the `GCLOUD_PROJECT` and `FIREBASE_AUTH_EMULATOR_HOST`\nenvironmental variables. In addition to the commands listed above, the below\ncommands also run various tests:\n\n  * `yarn test:integration:local` — Executes Node and browser emulator\n    integration tests, as well as the Selenium WebDriver tests\n  \n  * `yarn test:webdriver` — Executes only the Selenium WebDriver\n    integration tests\n\nNote - The webdriver tests require the Chrome webdriver to match the version of Chrome running locally.\nIn the CI environment, this is ensured using the environment variable [here.](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/.github/workflows/test-changed-auth.yml#L7)\nWhen running locally, change the chromedriver version in [package.json](https://github.com/firebase/firebase-js-sdk/blob/6e80a678fe0c31046860554cec0459a2be34d22b/packages/auth/package.json#L124) to match your local Chrome version and run `yarn install`.\n\n\nFor example, to run all integration and WebDriver tests against the emulator,\nyou would simply execute the following command:\n\n```sh\nfirebase emulators:exec --project foo-bar --only auth \"yarn test:integration:local\"\n```\n\n### Integration testing with the production backend\n\nCurrently, MFA TOTP, password policy, and reCAPTCHA Enterprise phone verification tests only run \nagainst the production backend (since they are not supported on the emulator yet).\nRunning against the backend also makes it a more reliable end-to-end test.\n\n#### TOTP\n\nThe TOTP tests require the following email/password combination to exist in the project, so if you are running this test against your test project, please create this user:\n\n'totpuser-donotdelete@test.com', 'password'\n\nYou also need to verify this email address, in order to use MFA. This can be done with a curl command like this:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode   -d     '{\n      \"email\": \"totpuser-donotdelete@test.com\",\n      \"requestType\": \"VERIFY_EMAIL\",\n      \"returnOobLink\": true,\n    }'\n```\n\n#### Password policy\n\nThe password policy tests require a tenant configured with a password policy that requires all options to exist in the project.\n\nIf you are running this test against your test project, please create the tenant and configure the policy with the following curl command:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: ${PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/tenants   -d     '{\n      \"displayName\": \"passpol-tenant\",\n      \"passwordPolicyConfig\": {\n        \"passwordPolicyEnforcementState\": \"ENFORCE\",\n        \"passwordPolicyVersions\": [\n          {\n            \"customStrengthOptions\": {\n              \"minPasswordLength\": 8,\n              \"maxPasswordLength\": 24,\n              \"containsLowercaseCharacter\": true,\n              \"containsUppercaseCharacter\": true,\n              \"containsNumericCharacter\": true,\n              \"containsNonAlphanumericCharacter\": true\n            }\n          }\n        ]\n      }\n    }'\n```\n\nReplace the tenant ID `passpol-tenant-d7hha` in [test/integration/flows/password_policy.test.ts](https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/test/integration/flows/password_policy.test.ts) with the ID for the newly created tenant. The tenant ID can be found at the end of the `name` property in the response and is in the format `passpol-tenant-xxxxx`.\n\n#### reCAPTCHA Enterprise phone verification\n\nThe reCAPTCHA Enterprise phone verification tests require reCAPTCHA Enterprise to be enabled and\nthe following fictional phone number to be configured and in the project. \n\nIf you are running this\ntest against your project, please [add this test phone number](https://firebase.google.com/docs/auth/web/phone-auth#create-fictional-phone-numbers-and-verification-codes):\n\n'+1 555-555-1000', SMS code: '123456'\n\nFollow [this guide](https://cloud.google.com/identity-platform/docs/recaptcha-enterprise) to enable reCAPTCHA\nEnterprise, then use the following curl command to set reCAPTCHA Enterprise to ENFORCE for phone provider:\n\n```\ncurl   -H \"Authorization: Bearer $(gcloud auth print-access-token)\"   -H \"Content-Type: application/json\"   -H \"X-Goog-User-Project: $\n{PROJECT_ID}\"   -X POST https://identitytoolkit.googleapis.com/v2/projects/${PROJECT_ID}/config?updateMask=recaptchaConfig.phoneEnforcementState,recaptchaConfig.useSmsBotScore,recaptchaConfig.useSmsTollFraudProtection  -d '\n{\n  \"name\": \"projects/{PROJECT_ID}\",\n  \"recaptchaConfig\": {\n    \"phoneEnforcementState\": \"ENFORCE\",\n    \"useSmsBotScore\": \"true\",\n    \"useSmsTollFraudProtection\": \"true\",\n  },\n}'\n```\n\n### Selenium Webdriver tests\n\nThese tests assume that you have both Firefox and Chrome installed on your\ncomputer and in your `$PATH`. The tests will error out if this is not the case.\nThe WebDriver tests talk to the emulator, but unlike the headless integration\ntests, these run in a browser robot environment; the assertions themselves run\nin Node. When you run these tests a small Express server will be started to\nserve the static files the browser robot uses.\n\n<!-- File: packages/component/README.md (Tokens: ~56 | Category: plugin-manifest) -->\n# @firebase/component\n\n_NOTE: This is specifically tailored for Firebase JS SDK usage, if you are not a\nmember of the Firebase team, please avoid using this package_\n\n## Usage\n\n**ES Modules**\n\n```javascript\nimport { Component } from '@firebase/component';\n```\n\n<!-- File: packages/data-connect/README.md (Tokens: ~26 | Category: plugin-manifest) -->\n# Firebase Data Connect\n\n## Local Development\n\nCheck `test/dataconnect.yaml` to ensure that the correct values are filled in.\n\n<!-- File: packages/database-compat/README.md (Tokens: ~61 | Category: plugin-manifest) -->\n# @firebase/database-compat\n\nThis is the compatibility layer for the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/database-types/README.md (Tokens: ~41 | Category: plugin-manifest) -->\n# @firebase/database-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/database/README.md (Tokens: ~55 | Category: plugin-manifest) -->\n# @firebase/database\n\nThis is the Firebase Realtime Database component of the Firebase JS SDK. \n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/firebase/README.md (Tokens: ~2080 | Category: plugin-manifest) -->\n<!-- BADGES -->\n![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)\n[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)\n[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=main)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=main)\n<!-- END BADGES -->\n\n# Firebase - App success made simple\n\n## Upgrade to Version 9\nVersion 9 has a redesigned API that supports tree-shaking. Read the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) to learn more.\n\n## Overview\n\n[Firebase](https://firebase.google.com) provides the tools and infrastructure\nyou need to develop, grow, and earn money from your app. This package supports\nweb (browser), mobile-web, and server (Node.js) clients.\n\nFor more information, visit:\n\n- [Firebase Realtime Database](https://firebase.google.com/docs/database/web/start) -\n  The Firebase Realtime Database lets you store and query user data, and makes\n  it available between users in realtime.\n- [Cloud Firestore](https://firebase.google.com/docs/firestore/quickstart) -\n  Cloud Firestore is a flexible, scalable database for mobile, web, and server\n  development from Firebase and Google Cloud Platform.\n- [Firebase Storage](https://firebase.google.com/docs/storage/web/start) -\n  Firebase Storage lets you upload and store user generated content, such as\n  files, and images.\n- [Cloud Functions for Firebase](https://firebase.google.com/docs/functions) -\n   Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.\n- [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/js/client) -\n  Firebase Cloud Messaging is a cross-platform messaging solution that lets you\n  reliably deliver messages at no cost.\n- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon/get-started-web) -\n  Firebase Performance Monitoring helps you gain insight into your app's performance issues.\n- [Google Analytics](https://firebase.google.com/docs/analytics/get-started?platform=web) -\n  Google Analytics is a free app measurement solution that provides insight on app usage and user engagement.\n- [Remote Config](https://firebase.google.com/docs/remote-config/get-started?platform=web) -\n  Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your \n  app without requiring users to reload your app.\n- [App Check](https://firebase.google.com/docs/app-check/web/recaptcha-provider) -\n  App Check helps protect your backend resources from abuse, such as billing fraud and phishing. It \n  works with both Firebase services and your own backends to keep your resources safe.\n- [Create and setup your account](https://firebase.google.com/docs/web/setup) -\n  Get started using Firebase for free.\n\nThis SDK is intended for end-user client access from environments such as the\nWeb, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or\nIoT devices running Node.js. If you are instead interested in using a Node.js\nSDK which grants you admin access from a privileged environment (like a server),\nyou should use the\n[Firebase Admin Node.js SDK](https://firebase.google.com/docs/admin/setup/).\n\n### Install the SDK\n\nInstall the Firebase NPM module:\n```\n$ npm init\n$ npm install --save firebase\n```\n\n### Use Firebase in your app\n\n1. Initialize Firebase in your app and create a Firebase App object:\n```js\nimport { initializeApp } from 'firebase/app';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\n```\n\n2. Access Firebase services in your app\n\nFirebase services (like Cloud Firestore, Authentication, Realtime Database, Remote Config, and more) are available to import within individual sub-packages.\n\nThe example below shows how you could use the Cloud Firestore Lite SDK to retrieve a list of data.\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore/lite';\n// Follow this pattern to import other Firebase services\n// import { } from 'firebase/<service>';\n\n// TODO: Replace the following with your app's Firebase project configuration\nconst firebaseConfig = {\n  //...\n};\n\nconst app = initializeApp(firebaseConfig);\nconst db = getFirestore(app);\n\n// Get a list of cities from your database\nasync function getCities(db) {\n  const citiesCol = collection(db, 'cities');\n  const citySnapshot = await getDocs(citiesCol);\n  const cityList = citySnapshot.docs.map(doc => doc.data());\n  return cityList;\n}\n```\n\n### Use a module bundler for size reduction\n\nThe Firebase Web SDK is designed to work with module bundlers to remove any\nunused code (tree-shaking). We strongly recommend using this approach for\nproduction apps. Tools such as the [Angular CLI](//angular.io/cli),\n[Next.js](//nextjs.org/), [Vue CLI](//cli.vuejs.org/), or [Create\nReact App](//reactjs.org/docs/create-a-new-react-app.html) automatically\nhandle module bundling for libraries installed through npm and imported into\nyour codebase.\n\nSee [Using module bundlers with Firebase](/docs/web/module-bundling) for more information.\n\n### Script include\nYou can also load Firebase packages as script modules in browsers that support native ES modules.\n\n```html\n<!-- use script module by specifying type=\"module\" -->\n<script type=\"module\">\n    import { initializeApp } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app.js';\n    import { getFirestore, collection, getDocs } from 'https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore-lite.js';\n    // Follow this pattern to import other Firebase services\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-analytics.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-app-check.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-auth.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-functions.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-firestore.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-storage.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-performance.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-remote-config.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-messaging.js\";\n    // import {} from \"https://www.gstatic.com/firebasejs/${FIREBASE_VERSION}/firebase-database.js\";\n    \n    // TODO: Replace the following with your app's Firebase project configuration\n    const firebaseConfig = {\n    //...\n    };\n\n    const app = initializeApp(firebaseConfig);\n    const db = getFirestore(app);\n\n    // Get a list of cities from your database\n    async function getCities(db) {\n    const citiesCol = collection(db, 'cities');\n    const citySnapshot = await getDocs(citiesCol);\n    const cityList = citySnapshot.docs.map(doc => doc.data());\n    return cityList;\n    }\n</script>\n```\n\n_Note: To get a filled in version of the above code snippet, go to the\n[Firebase console](https://console.firebase.google.com/) for your app and click on \"Add\nFirebase to your web app\"._\n\n## Get the code (Node.js - server and command line)\n\n### Install the SDK\n\nWhile you can write entire Firebase applications without any backend code, many\ndevelopers want to write server applications or command-line utilities using the\nNode.js JavaScript runtime.\n\nYou can use the same npm module to use Firebase in the Node.js runtime (on a\nserver or running from the command line):\n\n```\n$ npm init\n$ npm install --save firebase\n```\n\nIn your code, you can access Firebase using:\n\n```js\nconst { initializeApp } = require('firebase/app');\nconst { getFirestore, collection, getDocs } = require('firebase/firestore');\n// ...\n```\n\nIf you are using native ES6 module with --experimental-modules flag (or Node 12+)\nyou should do:\n\n```js\nimport { initializeApp } from 'firebase/app';\nimport { getFirestore, collection, getDocs } from 'firebase/firestore';\n// ...\n```\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk) for which packages\nare available in Node.js.\n\n## Compat packages\nVersion 9 provides a set of compat packages that are API compatible with Version 8. They are intended to\nbe used to make the upgrade to the modular API easier by allowing you to upgrade your app piece by piece.\nSee the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) for more detail.\n\nTo access the compat packages, use the subpath `compat` like so:\n```js\n// v9 compat packages are API compatible with v8 code\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\n```\n\n## Changelog\n\nThe Firebase changelog can be found at\n[firebase.google.com](https://firebase.google.com/support/release-notes/js).\n\n## Browser/environment compatibility\n\nPlease see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk).\n\n<!-- File: packages/firestore-compat/README.md (Tokens: ~221 | Category: plugin-manifest) -->\n# @firebase/firestore-compat\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n\n<!-- File: packages/firestore-types/README.md (Tokens: ~42 | Category: plugin-manifest) -->\n# @firebase/firestore-types\n\n**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**\n\n<!-- File: packages/firestore/README.md (Tokens: ~219 | Category: plugin-manifest) -->\n# @firebase/firestore\n\nThis is the [Cloud Firestore](https://firebase.google.com/docs/firestore/) component of the\n[Firebase JS SDK](https://www.npmjs.com/package/firebase).\n\n**This package is not intended for direct usage, and should only be used via the officially\nsupported [firebase](https://www.npmjs.com/package/firebase) package.**\n\nIf you are developing a Node.js application that requires administrative access to Cloud Firestore,\nuse the [`@google-cloud/firestore`](https://www.npmjs.com/package/@google-cloud/firestore) Server\nSDK with your developer credentials.\n\n## Documentation\n\nFor comprehensive documentation please see the [Firebase Reference\nDocs][reference-docs].\n\n[reference-docs]: https://firebase.google.com/docs/reference/js/\n\n## Contributing\nSee [Contributing to the Firebase SDK](../../CONTRIBUTING.md) for general\ninformation about contributing to the firebase-js-sdk repo and\n[Contributing to the Cloud Firestore Component](./CONTRIBUTING.md) for\ndetails specific to the Cloud Firestore code and tests.\n\n<!-- File: packages/firestore/src/platform/README.md (Tokens: ~63 | Category: plugin-manifest) -->\nThe modules in this directory provide implementations for platform-specific\nfeatures that are replaced at build time with implementations for the target\nplatforms. SDK code should only refer to the generic implementations that are\nprovided directly in this directory. The generic implementations provide\nsupport for running under `ts-node` but are otherwise unsupported.\n\n<!-- File: packages/firestore/src/protos/README.md (Tokens: ~32 | Category: plugin-manifest) -->\nThese protos are copied from https://github.com/googleapis/googleapis and\nhttps://github.com/google/protobuf.  Run update.sh to update them.\n\n<!-- File: packages/firestore/test/integration/api/README.md (Tokens: ~363 | Category: plugin-manifest) -->\nAll tests in this directory are also run against our (minified)\nfirebase-firestore.js build (via 'yarn test:manual' under\nfirebase-js-sdk/integration/firestore/) and therefore must not have any\ndependencies on src/ files.\n\nAPI tests that need to use internal hooks (via src/ dependencies) should be\nput in test/integration/api_internal instead.\n\nThe line \"import * as firebaseExport from '../util/firebase_export';\" is\nreplaced via the gulpfile in 'integration/firestore' and should not be\nmodified.\n\n\n## Testing composite index query against production\n\n### Setting Up the Environment:\n1. Create a `project.json` file in the `firebase-js-sdk/config` directory. This file should contain your target Firebase project's configuration.\n2. If not already logged in, authenticate with your Google Cloud Platform (GCP) account using `gcloud auth application-default login`. You can check your logged-in accounts by running `gcloud auth list`.\n3. Navigate to the `firebase-js-sdk/packages/firestore` directory, run:\n```\nterraform init\nterraform apply -var-file=../../config/project.json -auto-approve\n```\nNote: If the index creation encounters issues, such as concurrent operations, consider running the index creation process again. Error messages indicating that indexes have already been created can be safely disregarded.\n\n\n### Adding new composite index query tests\n1. To create a new composite index for local development, click on the provided link in the test error message, which will direct you to the Firebase Console.\n2. Add the newly created composite index to the `firestore_index_config.tf` file. The \"__name__\" field is not required to be explicitly added to the file, as the index creation will auto complete it on behalf.\n\n<!-- ... +23 more modular skills available via /api/skills/firebase/firebase-js-sdk?path={path} -->\n</yakaai_skills>"}