From 36c1fff87be3daee3a950176d62442da5dde1da7 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 2 May 2023 13:41:35 -0700 Subject: [PATCH 01/13] Update everything except auth --- packages/analytics/src/index.ts | 4 +++- packages/app-check/src/index.ts | 6 +++++- packages/firestore/src/api/settings.ts | 4 ++++ packages/installations/src/index.ts | 4 +++- packages/messaging/src/index.ts | 4 +++- packages/performance/src/index.ts | 5 ++++- packages/remote-config/src/index.ts | 4 +++- 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/analytics/src/index.ts b/packages/analytics/src/index.ts index 69e024c3311..895d40e2434 100644 --- a/packages/analytics/src/index.ts +++ b/packages/analytics/src/index.ts @@ -1,5 +1,7 @@ /** - * Firebase Analytics + * The Firebase Analytics Web SDK. + * + * The Firebase Analytics Web SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/app-check/src/index.ts b/packages/app-check/src/index.ts index b01b62eec88..11bd721306d 100644 --- a/packages/app-check/src/index.ts +++ b/packages/app-check/src/index.ts @@ -1,5 +1,9 @@ /** - * Firebase App Check + * The Firebase App Check Web SDK. + * + * Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or + * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use + * `CustomProvider` and write your own attestation method. * * @packageDocumentation */ diff --git a/packages/firestore/src/api/settings.ts b/packages/firestore/src/api/settings.ts index 8cdc1dc0657..bc6ef9bd35e 100644 --- a/packages/firestore/src/api/settings.ts +++ b/packages/firestore/src/api/settings.ts @@ -81,6 +81,8 @@ export interface FirestoreSettings extends LiteSettings { * may be removed in a future release. If you find yourself using it to * work around a specific network reliability issue, please tell us about * it in https://github.com/firebase/firebase-js-sdk/issues/1674. + * + * This setting cannot be used in a Node.js environment. */ experimentalForceLongPolling?: boolean; @@ -94,6 +96,8 @@ export interface FirestoreSettings extends LiteSettings { * is, auto-detection of long polling is now enabled by default. To disable * it, set this setting to `false`, and please open a GitHub issue to share * the problems that motivated you disabling long-polling auto-detection. + * + * This setting cannot be used in a Node.js environment. */ experimentalAutoDetectLongPolling?: boolean; diff --git a/packages/installations/src/index.ts b/packages/installations/src/index.ts index f67d6c1571b..e8a9420a406 100644 --- a/packages/installations/src/index.ts +++ b/packages/installations/src/index.ts @@ -1,5 +1,7 @@ /** - * Firebase Installations + * The Firebase Installations Web SDK. + * + * The Firebase Installations Web SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/messaging/src/index.ts b/packages/messaging/src/index.ts index 389e45f5ab8..97c1df3e9a5 100644 --- a/packages/messaging/src/index.ts +++ b/packages/messaging/src/index.ts @@ -1,5 +1,7 @@ /** - * Firebase Cloud Messaging + * The Firebase Cloud Messaging Web SDK. + * + * The Firebase Cloud Messaging Web SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/performance/src/index.ts b/packages/performance/src/index.ts index 1896e89132d..15a2b9a747b 100644 --- a/packages/performance/src/index.ts +++ b/packages/performance/src/index.ts @@ -1,5 +1,8 @@ /** - * Firebase Performance Monitoring + * The Firebase Performance Monitoring Web SDK. + * + * The Firebase Performance Monitoring Web SDK currently does not work + * in Node.js. * * @packageDocumentation */ diff --git a/packages/remote-config/src/index.ts b/packages/remote-config/src/index.ts index b51873453fe..1d9cdf977ca 100644 --- a/packages/remote-config/src/index.ts +++ b/packages/remote-config/src/index.ts @@ -1,5 +1,7 @@ /** - * Firebase Remote Config + * The Firebase Remote Config Web SDK. + * + * The Firebase Remote Config Web SDK currently does not work in Node.js. * * @packageDocumentation */ From ba8f0ff3c980e41c536d793b5048c934829bc180 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 2 May 2023 14:00:17 -0700 Subject: [PATCH 02/13] update auth --- packages/auth/src/core/index.ts | 1 + packages/auth/src/model/public_types.ts | 2 ++ .../auth/src/platform_browser/mfa/assertions/phone.ts | 2 ++ packages/auth/src/platform_browser/popup_redirect.ts | 2 ++ packages/auth/src/platform_browser/providers/phone.ts | 2 ++ .../src/platform_browser/recaptcha/recaptcha_verifier.ts | 2 ++ packages/auth/src/platform_browser/strategies/phone.ts | 8 ++++++++ packages/auth/src/platform_browser/strategies/popup.ts | 5 +++++ packages/auth/src/platform_browser/strategies/redirect.ts | 7 +++++++ 9 files changed, 31 insertions(+) diff --git a/packages/auth/src/core/index.ts b/packages/auth/src/core/index.ts index 9d64d554e60..2a37ad84663 100644 --- a/packages/auth/src/core/index.ts +++ b/packages/auth/src/core/index.ts @@ -48,6 +48,7 @@ export { * ```javascript * setPersistence(auth, browserSessionPersistence); * ``` + * This method has no effect in Node.js. * * @param auth - The {@link Auth} instance. * @param persistence - The {@link Persistence} to use. diff --git a/packages/auth/src/model/public_types.ts b/packages/auth/src/model/public_types.ts index 52e53c666f5..d4bad795536 100644 --- a/packages/auth/src/model/public_types.ts +++ b/packages/auth/src/model/public_types.ts @@ -193,6 +193,8 @@ export interface Auth { * This makes it easy for a user signing in to specify whether their session should be * remembered or not. It also makes it easier to never persist the Auth state for applications * that are shared by other users or have sensitive data. + * + * This method has no effect in Node.js. * * @example * ```javascript diff --git a/packages/auth/src/platform_browser/mfa/assertions/phone.ts b/packages/auth/src/platform_browser/mfa/assertions/phone.ts index c23ceb687b1..083ea50780e 100644 --- a/packages/auth/src/platform_browser/mfa/assertions/phone.ts +++ b/packages/auth/src/platform_browser/mfa/assertions/phone.ts @@ -83,6 +83,8 @@ export class PhoneMultiFactorGenerator { /** * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor. + * + * This method is not available in Node.js. * * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}. * @returns A {@link PhoneMultiFactorAssertion} which can be used with diff --git a/packages/auth/src/platform_browser/popup_redirect.ts b/packages/auth/src/platform_browser/popup_redirect.ts index 36c3805c4ec..451ad8ebe97 100644 --- a/packages/auth/src/platform_browser/popup_redirect.ts +++ b/packages/auth/src/platform_browser/popup_redirect.ts @@ -189,6 +189,8 @@ class BrowserPopupRedirectResolver implements PopupRedirectResolverInternal { /** * An implementation of {@link PopupRedirectResolver} suitable for browser * based applications. + * + * This method is not available in Node.js. * * @public */ diff --git a/packages/auth/src/platform_browser/providers/phone.ts b/packages/auth/src/platform_browser/providers/phone.ts index 79d9239b1c3..d79cce9b708 100644 --- a/packages/auth/src/platform_browser/providers/phone.ts +++ b/packages/auth/src/platform_browser/providers/phone.ts @@ -48,6 +48,8 @@ import { ProviderId, SignInMethod } from '../../model/enums'; * const userCredential = await signInWithCredential(auth, phoneCredential); * ``` * + * `PhoneAuthProvider` is not available in Node.js. + * * @public */ export class PhoneAuthProvider { diff --git a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts index ddd312908f4..68e32db150c 100644 --- a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts +++ b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts @@ -43,6 +43,8 @@ type TokenCallback = (token: string) => void; /** * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier. + * + * `RecaptchaVerifier` is not available in Node.js. * * @public */ diff --git a/packages/auth/src/platform_browser/strategies/phone.ts b/packages/auth/src/platform_browser/strategies/phone.ts index 0f924ab7a44..104a67f1b58 100644 --- a/packages/auth/src/platform_browser/strategies/phone.ts +++ b/packages/auth/src/platform_browser/strategies/phone.ts @@ -90,6 +90,8 @@ class ConfirmationResultImpl implements ConfirmationResult { * // Obtain a verificationCode from the user. * const credential = await confirmationResult.confirm(verificationCode); * ``` + * + * This method is not available in Node.js. * * @param auth - The {@link Auth} instance. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -115,6 +117,8 @@ export async function signInWithPhoneNumber( /** * Links the user account with the given phone number. + * + * This method is not available in Node.js. * * @param user - The user. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -143,6 +147,8 @@ export async function linkWithPhoneNumber( * Re-authenticates a user using a fresh phone credential. * * @remarks Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. + * + * This method is not available in Node.js. * * @param user - The user. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -260,6 +266,8 @@ export async function _verifyPhoneNumber( * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode); * await updatePhoneNumber(user, phoneCredential); * ``` + * + * This method is not available in Node.js. * * @param user - The user. * @param credential - A credential authenticating the new phone number. diff --git a/packages/auth/src/platform_browser/strategies/popup.ts b/packages/auth/src/platform_browser/strategies/popup.ts index c41cd43342a..39ab2a6ada2 100644 --- a/packages/auth/src/platform_browser/strategies/popup.ts +++ b/packages/auth/src/platform_browser/strategies/popup.ts @@ -82,6 +82,7 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000); * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. * + * This method is not available in Node.js. * * @public */ @@ -118,6 +119,8 @@ export async function signInWithPopup( * // Reauthenticate using a popup. * await reauthenticateWithPopup(result.user, provider); * ``` + * + * This method is not available in Node.js. * * @param user - The user. * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. @@ -160,6 +163,8 @@ export async function reauthenticateWithPopup( * const provider = new FacebookAuthProvider(); * await linkWithPopup(result.user, provider); * ``` + * + * This method is not available in Node.js. * * @param user - The user. * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. diff --git a/packages/auth/src/platform_browser/strategies/redirect.ts b/packages/auth/src/platform_browser/strategies/redirect.ts index f85a0d3d8df..ae816355682 100644 --- a/packages/auth/src/platform_browser/strategies/redirect.ts +++ b/packages/auth/src/platform_browser/strategies/redirect.ts @@ -75,6 +75,8 @@ import { getModularInstance } from '@firebase/util'; * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. + * + * This method is not available in Node.js. * * @public */ @@ -136,6 +138,8 @@ export async function _signInWithRedirect( * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. + * + * This method is not available in Node.js. * * @public */ @@ -200,6 +204,7 @@ export async function _reauthenticateWithRedirect( * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. * + * This method is not available in Node.js. * * @public */ @@ -270,6 +275,8 @@ export async function _linkWithRedirect( * @param auth - The {@link Auth} instance. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. + * + * This method is not available in Node.js. * * @public */ From bb9863a249d14441e2b22fec0f7f7926af2fd5a0 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 2 May 2023 14:04:38 -0700 Subject: [PATCH 03/13] Update compat index.d.ts --- packages/firebase/compat/index.d.ts | 49 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/packages/firebase/compat/index.d.ts b/packages/firebase/compat/index.d.ts index e33ed582dad..8406a879526 100644 --- a/packages/firebase/compat/index.d.ts +++ b/packages/firebase/compat/index.d.ts @@ -426,7 +426,7 @@ declare namespace firebase { * console. * * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -651,7 +651,7 @@ declare namespace firebase { * console. * * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -701,7 +701,7 @@ declare namespace firebase { * console. * * - * @webonly + * This is not available in Node.js. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -1237,7 +1237,7 @@ declare namespace firebase { * generating notifications if the push message payload has a `notification` * parameter. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1296,7 +1296,7 @@ declare namespace firebase { * The {@link firebase.performance.Performance `Performance`} service does not work with * any other app. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1315,7 +1315,7 @@ declare namespace firebase { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1335,7 +1335,7 @@ declare namespace firebase { * `firebase.analytics()` can be called with no arguments to access the default * app's {@link firebase.analytics.Analytics `Analytics`} service. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1404,7 +1404,7 @@ declare namespace firebase.app { * Gets the {@link firebase.installations.Installations `Installations`} service for the * current app. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1418,7 +1418,7 @@ declare namespace firebase.app { * Gets the {@link firebase.messaging.Messaging `Messaging`} service for the * current app. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1490,7 +1490,7 @@ declare namespace firebase.app { * Gets the {@link firebase.performance.Performance `Performance`} service for the * current app. If the current app is not the default one, throws an error. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1503,7 +1503,7 @@ declare namespace firebase.app { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1517,7 +1517,7 @@ declare namespace firebase.app { * Gets the {@link firebase.analytics.Analytics `Analytics`} service for the * current app. If the current app is not the default one, throws an error. * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -1532,7 +1532,7 @@ declare namespace firebase.app { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.appCheck { /** @@ -1696,7 +1696,7 @@ declare namespace firebase.appCheck { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.installations { /** @@ -1745,7 +1745,7 @@ declare namespace firebase.installations { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.performance { /** @@ -1868,7 +1868,7 @@ declare namespace firebase.performance { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.remoteConfig { /** @@ -2670,7 +2670,7 @@ declare namespace firebase.auth { * Firebase console. * * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -3350,7 +3350,7 @@ declare namespace firebase.auth { * console. * * - * @webonly + * This is not available in Node.js. * * @example * ```javascript @@ -3413,7 +3413,7 @@ declare namespace firebase.auth { * console. * * - * @webonly + * This is not available in Node.js. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -4628,7 +4628,7 @@ declare namespace firebase.auth { * An {@link https://www.google.com/recaptcha/ reCAPTCHA}-based application * verifier. * - * @webonly + * This is not available in Node.js. * * @param container The reCAPTCHA container parameter. This * has different meaning depending on whether the reCAPTCHA is hidden or @@ -4647,7 +4647,6 @@ declare namespace firebase.auth { */ class RecaptchaVerifier extends RecaptchaVerifier_Instance {} /** - * @webonly * @hidden */ class RecaptchaVerifier_Instance @@ -4776,7 +4775,7 @@ declare namespace firebase.auth { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.analytics { /** @@ -7436,7 +7435,7 @@ declare namespace firebase.database.ServerValue { } /** - * @webonly + * This is not available in Node.js. */ declare namespace firebase.messaging { /** @@ -8327,7 +8326,7 @@ declare namespace firebase.firestore { * work around a specific network reliability issue, please tell us about * it in https://github.com/firebase/firebase-js-sdk/issues/1674. * - * @webonly + * This is not available in Node.js. */ experimentalForceLongPolling?: boolean; @@ -8339,7 +8338,7 @@ declare namespace firebase.firestore { * This setting will likely be enabled by default in future releases and cannot be * combined with `experimentalForceLongPolling`. * - * @webonly + * This is not available in Node.js. */ experimentalAutoDetectLongPolling?: boolean; From 63995043f351b89472a4bafddbcb1aec0f540cab Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 2 May 2023 16:29:07 -0700 Subject: [PATCH 04/13] Add remarks where needed --- docs-devsite/analytics.md | 4 ++- docs-devsite/app-check.md | 4 ++- docs-devsite/auth.auth.md | 2 ++ docs-devsite/auth.md | 27 +++++++++++++------ docs-devsite/auth.phoneauthprovider.md | 1 + .../auth.phonemultifactorgenerator.md | 4 ++- docs-devsite/auth.recaptchaverifier.md | 2 ++ docs-devsite/firestore_.firestoresettings.md | 8 ++++-- docs-devsite/index.md | 12 ++++----- docs-devsite/installations.md | 4 ++- docs-devsite/messaging.md | 4 ++- docs-devsite/performance.md | 4 ++- docs-devsite/remote-config.md | 4 ++- packages/analytics/src/index.ts | 3 +-- packages/app-check/src/index.ts | 1 + .../platform_browser/mfa/assertions/phone.ts | 1 + .../src/platform_browser/popup_redirect.ts | 1 + .../src/platform_browser/providers/phone.ts | 5 ++-- .../recaptcha/recaptcha_verifier.ts | 1 + .../src/platform_browser/strategies/phone.ts | 13 +++++---- .../src/platform_browser/strategies/popup.ts | 13 +++++---- .../platform_browser/strategies/redirect.ts | 16 +++++------ packages/installations/src/index.ts | 3 +-- packages/messaging/src/index.ts | 3 +-- packages/performance/src/index.ts | 4 +-- packages/remote-config/src/index.ts | 3 +-- 26 files changed, 91 insertions(+), 56 deletions(-) diff --git a/docs-devsite/analytics.md b/docs-devsite/analytics.md index a79e6f005d9..7905cb7b82f 100644 --- a/docs-devsite/analytics.md +++ b/docs-devsite/analytics.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # analytics package -Firebase Analytics +The Firebase Analytics Web SDK. + +The Firebase Analytics Web SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/app-check.md b/docs-devsite/app-check.md index da1b06b12fa..4676ccc1f3f 100644 --- a/docs-devsite/app-check.md +++ b/docs-devsite/app-check.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # app-check package -Firebase App Check +The Firebase App Check Web SDK. + +Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use `CustomProvider` and write your own attestation method. ## Functions diff --git a/docs-devsite/auth.auth.md b/docs-devsite/auth.auth.md index b8b21c6870c..e5babfa437e 100644 --- a/docs-devsite/auth.auth.md +++ b/docs-devsite/auth.auth.md @@ -221,6 +221,8 @@ This will affect the currently saved Auth session and applies this type of persi This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the Auth state for applications that are shared by other users or have sensitive data. +This method has no effect in Node.js. + Signature: ```typescript diff --git a/docs-devsite/auth.md b/docs-devsite/auth.md index 1d9598ce7cd..06002576239 100644 --- a/docs-devsite/auth.md +++ b/docs-devsite/auth.md @@ -57,7 +57,7 @@ Firebase Authentication | [getIdToken(user, forceRefresh)](./auth.md#getidtoken) | Returns a JSON Web Token (JWT) used to identify the user to a Firebase service. | | [getIdTokenResult(user, forceRefresh)](./auth.md#getidtokenresult) | Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service. | | [linkWithCredential(user, credential)](./auth.md#linkwithcredential) | Links the user account with the given credentials. | -| [linkWithPhoneNumber(user, phoneNumber, appVerifier)](./auth.md#linkwithphonenumber) | Links the user account with the given phone number. | +| [linkWithPhoneNumber(user, phoneNumber, appVerifier)](./auth.md#linkwithphonenumber) | Links the user account with the given phone number.This method is not available in Node.js. | | [linkWithPopup(user, provider, resolver)](./auth.md#linkwithpopup) | Links the authenticated provider to the user account using a pop-up based OAuth flow. | | [linkWithRedirect(user, provider, resolver)](./auth.md#linkwithredirect) | Links the [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class) to the user account using a full-page redirect flow. | | [multiFactor(user)](./auth.md#multifactor) | The [MultiFactorUser](./auth.multifactoruser.md#multifactoruser_interface) corresponding to the user. | @@ -92,7 +92,7 @@ Firebase Authentication | [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class) | Represents the credentials returned by [PhoneAuthProvider](./auth.phoneauthprovider.md#phoneauthprovider_class). | | [PhoneAuthProvider](./auth.phoneauthprovider.md#phoneauthprovider_class) | Provider for generating an [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class). | | [PhoneMultiFactorGenerator](./auth.phonemultifactorgenerator.md#phonemultifactorgenerator_class) | Provider for generating a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface). | -| [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) | An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier. | +| [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) | An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier.RecaptchaVerifier is not available in Node.js. | | [SAMLAuthProvider](./auth.samlauthprovider.md#samlauthprovider_class) | An [AuthProvider](./auth.authprovider.md#authprovider_interface) for SAML. | | [TotpMultiFactorGenerator](./auth.totpmultifactorgenerator.md#totpmultifactorgenerator_class) | Provider for generating a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface). | | [TotpSecret](./auth.totpsecret.md#totpsecret_class) | Provider for generating a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface).Stores the shared secret key and other parameters to generate time-based OTPs. Implements methods to retrieve the shared secret key and generate a QR code URL. | @@ -147,7 +147,7 @@ Firebase Authentication | [ActionCodeOperation](./auth.md#actioncodeoperation) | An enumeration of the possible email action types. | | [AuthErrorCodes](./auth.md#autherrorcodes) | A map of potential Auth error codes, for easier comparison with errors thrown by the SDK. | | [browserLocalPersistence](./auth.md#browserlocalpersistence) | An implementation of [Persistence](./auth.persistence.md#persistence_interface) of type LOCAL using localStorage for the underlying storage. | -| [browserPopupRedirectResolver](./auth.md#browserpopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications. | +| [browserPopupRedirectResolver](./auth.md#browserpopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications.This method is not available in Node.js. | | [browserSessionPersistence](./auth.md#browsersessionpersistence) | An implementation of [Persistence](./auth.persistence.md#persistence_interface) of SESSION using sessionStorage for the underlying storage. | | [cordovaPopupRedirectResolver](./auth.md#cordovapopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for Cordova based applications. | | [debugErrorMap](./auth.md#debugerrormap) | A verbose error map with detailed descriptions for most error codes.See discussion at [AuthErrorMap](./auth.autherrormap.md#autherrormap_interface) | @@ -453,7 +453,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe | Parameter | Type | Description | | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | Returns: @@ -720,6 +720,7 @@ A `Promise` that resolves once the persistence change has completed setPersistence(auth, browserSessionPersistence); ``` +This method has no effect in Node.js. ## signInAnonymously() @@ -906,6 +907,7 @@ const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applic const credential = await confirmationResult.confirm(verificationCode); ``` +This method is not available in Node.js. ## signInWithPopup() @@ -925,7 +927,7 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | Returns: @@ -965,7 +967,7 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | Returns: @@ -1204,6 +1206,8 @@ Promise<[UserCredential](./auth.usercredential.md#usercredential_interface)Signature: ```typescript @@ -1257,6 +1261,7 @@ const provider = new FacebookAuthProvider(); await linkWithPopup(result.user, provider); ``` +This method is not available in Node.js. ## linkWithRedirect() @@ -1276,7 +1281,7 @@ export declare function linkWithRedirect(user: User, provider: AuthProvider, res | --- | --- | --- | | user | [User](./auth.user.md#user_interface) | The user. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | Returns: @@ -1349,6 +1354,8 @@ Re-authenticates a user using a fresh phone credential. Use before operations such as [updatePassword()](./auth.md#updatepassword) that require tokens from recent sign-in attempts. +This method is not available in Node.js. + Signature: ```typescript @@ -1402,6 +1409,7 @@ const result = await signInWithPopup(auth, provider); await reauthenticateWithPopup(result.user, provider); ``` +This method is not available in Node.js. ## reauthenticateWithRedirect() @@ -1421,7 +1429,7 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro | --- | --- | --- | | user | [User](./auth.user.md#user_interface) | The user. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | Returns: @@ -1615,6 +1623,7 @@ const phoneCredential = PhoneAuthProvider.credential(verificationId, verificatio await updatePhoneNumber(user, phoneCredential); ``` +This method is not available in Node.js. ## updateProfile() @@ -1855,6 +1864,8 @@ browserLocalPersistence: Persistence An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications. +This method is not available in Node.js. + Signature: ```typescript diff --git a/docs-devsite/auth.phoneauthprovider.md b/docs-devsite/auth.phoneauthprovider.md index 41e743386de..a3d8300a92d 100644 --- a/docs-devsite/auth.phoneauthprovider.md +++ b/docs-devsite/auth.phoneauthprovider.md @@ -253,4 +253,5 @@ const phoneCredential = PhoneAuthProvider.credential(verificationId, verificatio const userCredential = await signInWithCredential(auth, phoneCredential); ``` +`PhoneAuthProvider` is not available in Node.js. diff --git a/docs-devsite/auth.phonemultifactorgenerator.md b/docs-devsite/auth.phonemultifactorgenerator.md index a59d34814bf..ded5b5a0491 100644 --- a/docs-devsite/auth.phonemultifactorgenerator.md +++ b/docs-devsite/auth.phonemultifactorgenerator.md @@ -28,7 +28,7 @@ export declare class PhoneMultiFactorGenerator | Method | Modifiers | Description | | --- | --- | --- | -| [assertion(credential)](./auth.phonemultifactorgenerator.md#phonemultifactorgeneratorassertion) | static | Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor. | +| [assertion(credential)](./auth.phonemultifactorgenerator.md#phonemultifactorgeneratorassertion) | static | Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor.This method is not available in Node.js. | ## PhoneMultiFactorGenerator.FACTOR\_ID @@ -44,6 +44,8 @@ static FACTOR_ID: string; Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor. +This method is not available in Node.js. + Signature: ```typescript diff --git a/docs-devsite/auth.recaptchaverifier.md b/docs-devsite/auth.recaptchaverifier.md index 4f32d489aed..ede16399835 100644 --- a/docs-devsite/auth.recaptchaverifier.md +++ b/docs-devsite/auth.recaptchaverifier.md @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk # RecaptchaVerifier class An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier. +`RecaptchaVerifier` is not available in Node.js. + Signature: ```typescript diff --git a/docs-devsite/firestore_.firestoresettings.md b/docs-devsite/firestore_.firestoresettings.md index 2ca277d9b45..8465fec08c4 100644 --- a/docs-devsite/firestore_.firestoresettings.md +++ b/docs-devsite/firestore_.firestoresettings.md @@ -23,8 +23,8 @@ export declare interface FirestoreSettings | Property | Type | Description | | --- | --- | --- | | [cacheSizeBytes](./firestore_.firestoresettings.md#firestoresettingscachesizebytes) | number | NOTE: This field will be deprecated in a future major release. Use cache field instead to specify cache size, and other cache configurations.An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The size is not a guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to CACHE_SIZE_UNLIMITED to disable garbage collection. | -| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to experimentalForceLongPolling, but only uses long-polling if required.After having had a default value of false since its inception in 2019, the default value of this setting was changed in mid-2023 to true. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to false, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection. | -| [experimentalForceLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalforcelongpolling) | boolean | Forces the SDK’s underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.This setting cannot be used with experimentalAutoDetectLongPolling and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674. | +| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to experimentalForceLongPolling, but only uses long-polling if required.This setting will likely be enabled by default in future releases and cannot be combined with experimentalForceLongPolling.This setting cannot be used in a Node.js environment. | +| [experimentalForceLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalforcelongpolling) | boolean | Forces the SDK’s underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.This setting cannot be used with experimentalAutoDetectLongPolling and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674.This setting cannot be used in a Node.js environment. | | [experimentalLongPollingOptions](./firestore_.firestoresettings.md#firestoresettingsexperimentallongpollingoptions) | [ExperimentalLongPollingOptions](./firestore_.experimentallongpollingoptions.md#experimentallongpollingoptions_interface) | Options that configure the SDK’s underlying network transport (WebChannel) when long-polling is used.These options are only used if experimentalForceLongPolling is true or if experimentalAutoDetectLongPolling is true and the auto-detection determined that long-polling was needed. Otherwise, these options have no effect. | | [host](./firestore_.firestoresettings.md#firestoresettingshost) | string | The hostname to connect to. | | [ignoreUndefinedProperties](./firestore_.firestoresettings.md#firestoresettingsignoreundefinedproperties) | boolean | Whether to skip nested properties that are set to undefined during object serialization. If set to true, these properties are skipped and not written to Firestore. If set to false or omitted, the SDK throws an exception when it encounters properties of type undefined. | @@ -51,6 +51,8 @@ Configures the SDK's underlying transport (WebChannel) to automatically detect i After having had a default value of `false` since its inception in 2019, the default value of this setting was changed in mid-2023 to `true`. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to `false`, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection. +This setting cannot be used in a Node.js environment. + Signature: ```typescript @@ -63,6 +65,8 @@ Forces the SDK’s underlying network transport (WebChannel) to use long-polling This setting cannot be used with `experimentalAutoDetectLongPolling` and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674. +This setting cannot be used in a Node.js environment. + Signature: ```typescript diff --git a/docs-devsite/index.md b/docs-devsite/index.md index e19f70906ef..5298ef3970f 100644 --- a/docs-devsite/index.md +++ b/docs-devsite/index.md @@ -15,16 +15,16 @@ https://github.com/firebase/firebase-js-sdk | Package | Description | | --- | --- | -| [@firebase/analytics](./analytics.md#analytics_package) | Firebase Analytics | +| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK.The Firebase Analytics Web SDK currently does not work in Node.js. | | [@firebase/app](./app.md#app_package) | Firebase App | -| [@firebase/app-check](./app-check.md#app-check_package) | Firebase App Check | +| [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK.Firebase App Check does not work in Node.js using ReCaptchaV3Provider or ReCaptchaEnterpriseProvider, but can be used in Node.js if you use CustomProvider and write your own attestation method. | | [@firebase/auth](./auth.md#auth_package) | Firebase Authentication | | [@firebase/database](./database.md#database_package) | Firebase Realtime Database | | [@firebase/firestore](./firestore.md#firestore_package) | Cloud Firestore | | [@firebase/functions](./functions.md#functions_package) | Cloud Functions for Firebase | -| [@firebase/installations](./installations.md#installations_package) | Firebase Installations | -| [@firebase/messaging](./messaging.md#messaging_package) | Firebase Cloud Messaging | -| [@firebase/performance](./performance.md#performance_package) | Firebase Performance Monitoring | -| [@firebase/remote-config](./remote-config.md#remote-config_package) | Firebase Remote Config | +| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK.The Firebase Installations Web SDK currently does not work in Node.js. | +| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK.The Firebase Cloud Messaging Web SDK currently does not work in Node.js. | +| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK.The Firebase Performance Monitoring Web SDK currently does not work in Node.js. | +| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK.The Firebase Remote Config Web SDK currently does not work in Node.js. | | [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase | diff --git a/docs-devsite/installations.md b/docs-devsite/installations.md index 1ef8b80b00e..ce386f14fa6 100644 --- a/docs-devsite/installations.md +++ b/docs-devsite/installations.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # installations package -Firebase Installations +The Firebase Installations Web SDK. + +The Firebase Installations Web SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/messaging.md b/docs-devsite/messaging.md index ffbdd9ee3d8..ce8764032ba 100644 --- a/docs-devsite/messaging.md +++ b/docs-devsite/messaging.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # messaging package -Firebase Cloud Messaging +The Firebase Cloud Messaging Web SDK. + +The Firebase Cloud Messaging Web SDK currently does not work in Node.js. | Entry Point | Description | | --- | --- | diff --git a/docs-devsite/performance.md b/docs-devsite/performance.md index 247002ed70a..fe6436784d9 100644 --- a/docs-devsite/performance.md +++ b/docs-devsite/performance.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # performance package -Firebase Performance Monitoring +The Firebase Performance Monitoring Web SDK. + +The Firebase Performance Monitoring Web SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/remote-config.md b/docs-devsite/remote-config.md index 5011c3b12b9..ab0d22e1998 100644 --- a/docs-devsite/remote-config.md +++ b/docs-devsite/remote-config.md @@ -10,7 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # remote-config package -Firebase Remote Config +The Firebase Remote Config Web SDK. + +The Firebase Remote Config Web SDK currently does not work in Node.js. ## Functions diff --git a/packages/analytics/src/index.ts b/packages/analytics/src/index.ts index 895d40e2434..e7ca4e07d3a 100644 --- a/packages/analytics/src/index.ts +++ b/packages/analytics/src/index.ts @@ -1,7 +1,6 @@ /** * The Firebase Analytics Web SDK. - * - * The Firebase Analytics Web SDK currently does not work in Node.js. + * This SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/app-check/src/index.ts b/packages/app-check/src/index.ts index 11bd721306d..8bb6bc24ab7 100644 --- a/packages/app-check/src/index.ts +++ b/packages/app-check/src/index.ts @@ -1,6 +1,7 @@ /** * The Firebase App Check Web SDK. * + * @remarks * Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use * `CustomProvider` and write your own attestation method. diff --git a/packages/auth/src/platform_browser/mfa/assertions/phone.ts b/packages/auth/src/platform_browser/mfa/assertions/phone.ts index 083ea50780e..64af5185ddf 100644 --- a/packages/auth/src/platform_browser/mfa/assertions/phone.ts +++ b/packages/auth/src/platform_browser/mfa/assertions/phone.ts @@ -84,6 +84,7 @@ export class PhoneMultiFactorGenerator { /** * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor. * + * @remarks * This method is not available in Node.js. * * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}. diff --git a/packages/auth/src/platform_browser/popup_redirect.ts b/packages/auth/src/platform_browser/popup_redirect.ts index 451ad8ebe97..2411a0dccdf 100644 --- a/packages/auth/src/platform_browser/popup_redirect.ts +++ b/packages/auth/src/platform_browser/popup_redirect.ts @@ -190,6 +190,7 @@ class BrowserPopupRedirectResolver implements PopupRedirectResolverInternal { * An implementation of {@link PopupRedirectResolver} suitable for browser * based applications. * + * @remarks * This method is not available in Node.js. * * @public diff --git a/packages/auth/src/platform_browser/providers/phone.ts b/packages/auth/src/platform_browser/providers/phone.ts index d79cce9b708..cd958981594 100644 --- a/packages/auth/src/platform_browser/providers/phone.ts +++ b/packages/auth/src/platform_browser/providers/phone.ts @@ -37,6 +37,9 @@ import { ProviderId, SignInMethod } from '../../model/enums'; /** * Provider for generating an {@link PhoneAuthCredential}. * + * @remarks + * `PhoneAuthProvider` is not available in Node.js. + * * @example * ```javascript * // 'recaptcha-container' is the ID of an element in the DOM. @@ -47,8 +50,6 @@ import { ProviderId, SignInMethod } from '../../model/enums'; * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode); * const userCredential = await signInWithCredential(auth, phoneCredential); * ``` - * - * `PhoneAuthProvider` is not available in Node.js. * * @public */ diff --git a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts index 68e32db150c..b07f3cf6424 100644 --- a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts +++ b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts @@ -44,6 +44,7 @@ type TokenCallback = (token: string) => void; /** * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier. * + * @remarks * `RecaptchaVerifier` is not available in Node.js. * * @public diff --git a/packages/auth/src/platform_browser/strategies/phone.ts b/packages/auth/src/platform_browser/strategies/phone.ts index 104a67f1b58..78ce473cb77 100644 --- a/packages/auth/src/platform_browser/strategies/phone.ts +++ b/packages/auth/src/platform_browser/strategies/phone.ts @@ -81,6 +81,8 @@ class ConfirmationResultImpl implements ConfirmationResult { * This function can work on other platforms that do not support the * {@link RecaptchaVerifier} (like React Native), but you need to use a * third-party {@link ApplicationVerifier} implementation. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -90,8 +92,6 @@ class ConfirmationResultImpl implements ConfirmationResult { * // Obtain a verificationCode from the user. * const credential = await confirmationResult.confirm(verificationCode); * ``` - * - * This method is not available in Node.js. * * @param auth - The {@link Auth} instance. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -118,6 +118,7 @@ export async function signInWithPhoneNumber( /** * Links the user account with the given phone number. * + * @remarks * This method is not available in Node.js. * * @param user - The user. @@ -146,7 +147,8 @@ export async function linkWithPhoneNumber( /** * Re-authenticates a user using a fresh phone credential. * - * @remarks Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. + * @remarks + * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. * * This method is not available in Node.js. * @@ -255,6 +257,9 @@ export async function _verifyPhoneNumber( /** * Updates the user's phone number. + * + * @remarks + * This method is not available in Node.js. * * @example * ``` @@ -266,8 +271,6 @@ export async function _verifyPhoneNumber( * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode); * await updatePhoneNumber(user, phoneCredential); * ``` - * - * This method is not available in Node.js. * * @param user - The user. * @param credential - A credential authenticating the new phone number. diff --git a/packages/auth/src/platform_browser/strategies/popup.ts b/packages/auth/src/platform_browser/strategies/popup.ts index 39ab2a6ada2..1627a7fefe0 100644 --- a/packages/auth/src/platform_browser/strategies/popup.ts +++ b/packages/auth/src/platform_browser/strategies/popup.ts @@ -62,6 +62,8 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000); * @remarks * If succeeds, returns the signed in user along with the provider's credential. If sign in was * unsuccessful, returns an error object containing additional information about the error. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -82,8 +84,6 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000); * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. * - * This method is not available in Node.js. - * * @public */ export async function signInWithPopup( @@ -110,6 +110,8 @@ export async function signInWithPopup( * @remarks * If the reauthentication is successful, the returned result will contain the user and the * provider's credential. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -119,8 +121,6 @@ export async function signInWithPopup( * // Reauthenticate using a popup. * await reauthenticateWithPopup(result.user, provider); * ``` - * - * This method is not available in Node.js. * * @param user - The user. * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. @@ -153,7 +153,8 @@ export async function reauthenticateWithPopup( * * @remarks * If the linking is successful, the returned result will contain the user and the provider's credential. - * + * + * This method is not available in Node.js. * * @example * ```javascript @@ -163,8 +164,6 @@ export async function reauthenticateWithPopup( * const provider = new FacebookAuthProvider(); * await linkWithPopup(result.user, provider); * ``` - * - * This method is not available in Node.js. * * @param user - The user. * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}. diff --git a/packages/auth/src/platform_browser/strategies/redirect.ts b/packages/auth/src/platform_browser/strategies/redirect.ts index ae816355682..1c4d710a909 100644 --- a/packages/auth/src/platform_browser/strategies/redirect.ts +++ b/packages/auth/src/platform_browser/strategies/redirect.ts @@ -44,6 +44,8 @@ import { getModularInstance } from '@firebase/util'; * To handle the results and errors for this operation, refer to {@link getRedirectResult}. * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link signInWithRedirect}. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -75,8 +77,6 @@ import { getModularInstance } from '@firebase/util'; * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * This method is not available in Node.js. * * @public */ @@ -115,6 +115,8 @@ export async function _signInWithRedirect( * To handle the results and errors for this operation, refer to {@link getRedirectResult}. * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link reauthenticateWithRedirect}. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -138,8 +140,6 @@ export async function _signInWithRedirect( * Non-OAuth providers like {@link EmailAuthProvider} will throw an error. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * This method is not available in Node.js. * * @public */ @@ -185,6 +185,8 @@ export async function _reauthenticateWithRedirect( * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link linkWithRedirect}. * + * This method is not available in Node.js. + * * @example * ```javascript * // Sign in using some other provider. @@ -204,8 +206,6 @@ export async function _reauthenticateWithRedirect( * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. * - * This method is not available in Node.js. - * * @public */ export function linkWithRedirect( @@ -246,6 +246,8 @@ export async function _linkWithRedirect( * @remarks * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an * error. If no redirect operation was called, returns `null`. + * + * This method is not available in Node.js. * * @example * ```javascript @@ -275,8 +277,6 @@ export async function _linkWithRedirect( * @param auth - The {@link Auth} instance. * @param resolver - An instance of {@link PopupRedirectResolver}, optional * if already supplied to {@link initializeAuth} or provided by {@link getAuth}. - * - * This method is not available in Node.js. * * @public */ diff --git a/packages/installations/src/index.ts b/packages/installations/src/index.ts index e8a9420a406..686e3a0bd66 100644 --- a/packages/installations/src/index.ts +++ b/packages/installations/src/index.ts @@ -1,7 +1,6 @@ /** * The Firebase Installations Web SDK. - * - * The Firebase Installations Web SDK currently does not work in Node.js. + * This SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/messaging/src/index.ts b/packages/messaging/src/index.ts index 97c1df3e9a5..ff00ea403c9 100644 --- a/packages/messaging/src/index.ts +++ b/packages/messaging/src/index.ts @@ -1,7 +1,6 @@ /** * The Firebase Cloud Messaging Web SDK. - * - * The Firebase Cloud Messaging Web SDK currently does not work in Node.js. + * This SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/performance/src/index.ts b/packages/performance/src/index.ts index 15a2b9a747b..132a92ffef9 100644 --- a/packages/performance/src/index.ts +++ b/packages/performance/src/index.ts @@ -1,8 +1,6 @@ /** * The Firebase Performance Monitoring Web SDK. - * - * The Firebase Performance Monitoring Web SDK currently does not work - * in Node.js. + * This SDK currently does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/remote-config/src/index.ts b/packages/remote-config/src/index.ts index 1d9cdf977ca..5da1bd813eb 100644 --- a/packages/remote-config/src/index.ts +++ b/packages/remote-config/src/index.ts @@ -1,7 +1,6 @@ /** * The Firebase Remote Config Web SDK. - * - * The Firebase Remote Config Web SDK currently does not work in Node.js. + * This SDK currently does not work in Node.js. * * @packageDocumentation */ From a6ebdc9d99ce980c084d21c6a5163d5f4000ce31 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Wed, 3 May 2023 08:47:50 -0700 Subject: [PATCH 05/13] Run v9 docgen --- docs-devsite/analytics.md | 4 +- docs-devsite/auth.md | 38 +++++++++++++------ docs-devsite/auth.phoneauthprovider.md | 3 +- .../auth.phonemultifactorgenerator.md | 2 +- docs-devsite/index.md | 12 +++--- docs-devsite/installations.md | 4 +- docs-devsite/messaging.md | 4 +- docs-devsite/performance.md | 4 +- docs-devsite/remote-config.md | 4 +- 9 files changed, 40 insertions(+), 35 deletions(-) diff --git a/docs-devsite/analytics.md b/docs-devsite/analytics.md index 7905cb7b82f..07940c6cce8 100644 --- a/docs-devsite/analytics.md +++ b/docs-devsite/analytics.md @@ -10,9 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # analytics package -The Firebase Analytics Web SDK. - -The Firebase Analytics Web SDK currently does not work in Node.js. +The Firebase Analytics Web SDK. This SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/auth.md b/docs-devsite/auth.md index 06002576239..e6f82caebc5 100644 --- a/docs-devsite/auth.md +++ b/docs-devsite/auth.md @@ -57,7 +57,7 @@ Firebase Authentication | [getIdToken(user, forceRefresh)](./auth.md#getidtoken) | Returns a JSON Web Token (JWT) used to identify the user to a Firebase service. | | [getIdTokenResult(user, forceRefresh)](./auth.md#getidtokenresult) | Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service. | | [linkWithCredential(user, credential)](./auth.md#linkwithcredential) | Links the user account with the given credentials. | -| [linkWithPhoneNumber(user, phoneNumber, appVerifier)](./auth.md#linkwithphonenumber) | Links the user account with the given phone number.This method is not available in Node.js. | +| [linkWithPhoneNumber(user, phoneNumber, appVerifier)](./auth.md#linkwithphonenumber) | Links the user account with the given phone number. | | [linkWithPopup(user, provider, resolver)](./auth.md#linkwithpopup) | Links the authenticated provider to the user account using a pop-up based OAuth flow. | | [linkWithRedirect(user, provider, resolver)](./auth.md#linkwithredirect) | Links the [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class) to the user account using a full-page redirect flow. | | [multiFactor(user)](./auth.md#multifactor) | The [MultiFactorUser](./auth.multifactoruser.md#multifactoruser_interface) corresponding to the user. | @@ -92,7 +92,7 @@ Firebase Authentication | [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class) | Represents the credentials returned by [PhoneAuthProvider](./auth.phoneauthprovider.md#phoneauthprovider_class). | | [PhoneAuthProvider](./auth.phoneauthprovider.md#phoneauthprovider_class) | Provider for generating an [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class). | | [PhoneMultiFactorGenerator](./auth.phonemultifactorgenerator.md#phonemultifactorgenerator_class) | Provider for generating a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface). | -| [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) | An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier.RecaptchaVerifier is not available in Node.js. | +| [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) | An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier. | | [SAMLAuthProvider](./auth.samlauthprovider.md#samlauthprovider_class) | An [AuthProvider](./auth.authprovider.md#authprovider_interface) for SAML. | | [TotpMultiFactorGenerator](./auth.totpmultifactorgenerator.md#totpmultifactorgenerator_class) | Provider for generating a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface). | | [TotpSecret](./auth.totpsecret.md#totpsecret_class) | Provider for generating a [TotpMultiFactorAssertion](./auth.totpmultifactorassertion.md#totpmultifactorassertion_interface).Stores the shared secret key and other parameters to generate time-based OTPs. Implements methods to retrieve the shared secret key and generate a QR code URL. | @@ -147,7 +147,7 @@ Firebase Authentication | [ActionCodeOperation](./auth.md#actioncodeoperation) | An enumeration of the possible email action types. | | [AuthErrorCodes](./auth.md#autherrorcodes) | A map of potential Auth error codes, for easier comparison with errors thrown by the SDK. | | [browserLocalPersistence](./auth.md#browserlocalpersistence) | An implementation of [Persistence](./auth.persistence.md#persistence_interface) of type LOCAL using localStorage for the underlying storage. | -| [browserPopupRedirectResolver](./auth.md#browserpopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications.This method is not available in Node.js. | +| [browserPopupRedirectResolver](./auth.md#browserpopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications. | | [browserSessionPersistence](./auth.md#browsersessionpersistence) | An implementation of [Persistence](./auth.persistence.md#persistence_interface) of SESSION using sessionStorage for the underlying storage. | | [cordovaPopupRedirectResolver](./auth.md#cordovapopupredirectresolver) | An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for Cordova based applications. | | [debugErrorMap](./auth.md#debugerrormap) | A verbose error map with detailed descriptions for most error codes.See discussion at [AuthErrorMap](./auth.autherrormap.md#autherrormap_interface) | @@ -442,6 +442,8 @@ Returns a [UserCredential](./auth.usercredential.md#usercredential_interface) fr If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an error. If no redirect operation was called, returns `null`. +This method is not available in Node.js. + Signature: ```typescript @@ -453,7 +455,7 @@ export declare function getRedirectResult(auth: Auth, resolver?: PopupRedirectRe | Parameter | Type | Description | | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | Returns: @@ -878,6 +880,8 @@ This method sends a code via SMS to the given phone number, and returns a [Confi For abuse prevention, this method also requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface). This SDK includes a reCAPTCHA-based implementation, [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class). This function can work on other platforms that do not support the [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) (like React Native), but you need to use a third-party [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) implementation. +This method is not available in Node.js. + Signature: ```typescript @@ -907,7 +911,6 @@ const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applic const credential = await confirmationResult.confirm(verificationCode); ``` -This method is not available in Node.js. ## signInWithPopup() @@ -915,6 +918,8 @@ Authenticates a Firebase client using a popup-based OAuth authentication flow. If succeeds, returns the signed in user along with the provider's credential. If sign in was unsuccessful, returns an error object containing additional information about the error. +This method is not available in Node.js. + Signature: ```typescript @@ -927,7 +932,7 @@ export declare function signInWithPopup(auth: Auth, provider: AuthProvider, reso | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | Returns: @@ -955,6 +960,8 @@ Authenticates a Firebase client using a full-page redirect flow. To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [signInWithRedirect()](./auth.md#signinwithredirect). +This method is not available in Node.js. + Signature: ```typescript @@ -967,7 +974,7 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r | --- | --- | --- | | auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | Returns: @@ -1232,6 +1239,8 @@ Links the authenticated provider to the user account using a pop-up based OAuth If the linking is successful, the returned result will contain the user and the provider's credential. +This method is not available in Node.js. + Signature: ```typescript @@ -1261,7 +1270,6 @@ const provider = new FacebookAuthProvider(); await linkWithPopup(result.user, provider); ``` -This method is not available in Node.js. ## linkWithRedirect() @@ -1269,6 +1277,8 @@ Links the [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class) to the us To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [linkWithRedirect()](./auth.md#linkwithredirect). +This method is not available in Node.js. + Signature: ```typescript @@ -1281,7 +1291,7 @@ export declare function linkWithRedirect(user: User, provider: AuthProvider, res | --- | --- | --- | | user | [User](./auth.user.md#user_interface) | The user. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | Returns: @@ -1380,6 +1390,8 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth If the reauthentication is successful, the returned result will contain the user and the provider's credential. +This method is not available in Node.js. + Signature: ```typescript @@ -1409,7 +1421,6 @@ const result = await signInWithPopup(auth, provider); await reauthenticateWithPopup(result.user, provider); ``` -This method is not available in Node.js. ## reauthenticateWithRedirect() @@ -1417,6 +1428,8 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [reauthenticateWithRedirect()](./auth.md#reauthenticatewithredirect). +This method is not available in Node.js. + Signature: ```typescript @@ -1429,7 +1442,7 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro | --- | --- | --- | | user | [User](./auth.user.md#user_interface) | The user. | | provider | [AuthProvider](./auth.authprovider.md#authprovider_interface) | The provider to authenticate. The provider has to be an [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class). Non-OAuth providers like [EmailAuthProvider](./auth.emailauthprovider.md#emailauthprovider_class) will throw an error. | -| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth).This method is not available in Node.js. | +| resolver | [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) | An instance of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface), optional if already supplied to [initializeAuth()](./auth.md#initializeauth) or provided by [getAuth()](./auth.md#getauth). | Returns: @@ -1593,6 +1606,8 @@ Promise<void> Updates the user's phone number. +This method is not available in Node.js. + Signature: ```typescript @@ -1623,7 +1638,6 @@ const phoneCredential = PhoneAuthProvider.credential(verificationId, verificatio await updatePhoneNumber(user, phoneCredential); ``` -This method is not available in Node.js. ## updateProfile() diff --git a/docs-devsite/auth.phoneauthprovider.md b/docs-devsite/auth.phoneauthprovider.md index a3d8300a92d..91bc4a26ea2 100644 --- a/docs-devsite/auth.phoneauthprovider.md +++ b/docs-devsite/auth.phoneauthprovider.md @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk # PhoneAuthProvider class Provider for generating an [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class). +`PhoneAuthProvider` is not available in Node.js. + Signature: ```typescript @@ -253,5 +255,4 @@ const phoneCredential = PhoneAuthProvider.credential(verificationId, verificatio const userCredential = await signInWithCredential(auth, phoneCredential); ``` -`PhoneAuthProvider` is not available in Node.js. diff --git a/docs-devsite/auth.phonemultifactorgenerator.md b/docs-devsite/auth.phonemultifactorgenerator.md index ded5b5a0491..b62749db0ee 100644 --- a/docs-devsite/auth.phonemultifactorgenerator.md +++ b/docs-devsite/auth.phonemultifactorgenerator.md @@ -28,7 +28,7 @@ export declare class PhoneMultiFactorGenerator | Method | Modifiers | Description | | --- | --- | --- | -| [assertion(credential)](./auth.phonemultifactorgenerator.md#phonemultifactorgeneratorassertion) | static | Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor.This method is not available in Node.js. | +| [assertion(credential)](./auth.phonemultifactorgenerator.md#phonemultifactorgeneratorassertion) | static | Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor. | ## PhoneMultiFactorGenerator.FACTOR\_ID diff --git a/docs-devsite/index.md b/docs-devsite/index.md index 5298ef3970f..f38d80ccdec 100644 --- a/docs-devsite/index.md +++ b/docs-devsite/index.md @@ -15,16 +15,16 @@ https://github.com/firebase/firebase-js-sdk | Package | Description | | --- | --- | -| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK.The Firebase Analytics Web SDK currently does not work in Node.js. | +| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK currently does not work in Node.js. | | [@firebase/app](./app.md#app_package) | Firebase App | -| [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK.Firebase App Check does not work in Node.js using ReCaptchaV3Provider or ReCaptchaEnterpriseProvider, but can be used in Node.js if you use CustomProvider and write your own attestation method. | +| [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK. | | [@firebase/auth](./auth.md#auth_package) | Firebase Authentication | | [@firebase/database](./database.md#database_package) | Firebase Realtime Database | | [@firebase/firestore](./firestore.md#firestore_package) | Cloud Firestore | | [@firebase/functions](./functions.md#functions_package) | Cloud Functions for Firebase | -| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK.The Firebase Installations Web SDK currently does not work in Node.js. | -| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK.The Firebase Cloud Messaging Web SDK currently does not work in Node.js. | -| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK.The Firebase Performance Monitoring Web SDK currently does not work in Node.js. | -| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK.The Firebase Remote Config Web SDK currently does not work in Node.js. | +| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK. This SDK currently does not work in Node.js. | +| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK. This SDK currently does not work in Node.js. | +| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK currently does not work in Node.js. | +| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK currently does not work in Node.js. | | [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase | diff --git a/docs-devsite/installations.md b/docs-devsite/installations.md index ce386f14fa6..f00dbb8bee0 100644 --- a/docs-devsite/installations.md +++ b/docs-devsite/installations.md @@ -10,9 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # installations package -The Firebase Installations Web SDK. - -The Firebase Installations Web SDK currently does not work in Node.js. +The Firebase Installations Web SDK. This SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/messaging.md b/docs-devsite/messaging.md index ce8764032ba..5c910eeec79 100644 --- a/docs-devsite/messaging.md +++ b/docs-devsite/messaging.md @@ -10,9 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # messaging package -The Firebase Cloud Messaging Web SDK. - -The Firebase Cloud Messaging Web SDK currently does not work in Node.js. +The Firebase Cloud Messaging Web SDK. This SDK currently does not work in Node.js. | Entry Point | Description | | --- | --- | diff --git a/docs-devsite/performance.md b/docs-devsite/performance.md index fe6436784d9..a7c4c295712 100644 --- a/docs-devsite/performance.md +++ b/docs-devsite/performance.md @@ -10,9 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # performance package -The Firebase Performance Monitoring Web SDK. - -The Firebase Performance Monitoring Web SDK currently does not work in Node.js. +The Firebase Performance Monitoring Web SDK. This SDK currently does not work in Node.js. ## Functions diff --git a/docs-devsite/remote-config.md b/docs-devsite/remote-config.md index ab0d22e1998..e28de1ca00b 100644 --- a/docs-devsite/remote-config.md +++ b/docs-devsite/remote-config.md @@ -10,9 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # remote-config package -The Firebase Remote Config Web SDK. - -The Firebase Remote Config Web SDK currently does not work in Node.js. +The Firebase Remote Config Web SDK. This SDK currently does not work in Node.js. ## Functions From 317cc9fa260d16b8af62ce36c39487a39ecbff40 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Wed, 3 May 2023 09:07:50 -0700 Subject: [PATCH 06/13] Clean up compat docgen script --- package.json | 4 +- packages/app-check/src/index.ts | 2 +- packages/auth/src/model/public_types.ts | 2 +- .../platform_browser/mfa/assertions/phone.ts | 2 +- .../src/platform_browser/popup_redirect.ts | 2 +- .../src/platform_browser/providers/phone.ts | 2 +- .../recaptcha/recaptcha_verifier.ts | 2 +- .../src/platform_browser/strategies/phone.ts | 8 +- .../src/platform_browser/strategies/popup.ts | 6 +- .../platform_browser/strategies/redirect.ts | 6 +- packages/firebase/compat/index.d.ts | 48 ++-- packages/firestore/src/api/settings.ts | 2 +- .../docgen-compat/content-sources/js/toc.yaml | 2 + .../content-sources/node/HOME.md | 11 - .../content-sources/node/toc.yaml | 212 ------------------ scripts/docgen-compat/generate-docs.js | 91 +------- .../docgen-compat/theme/layouts/default.hbs | 2 +- 17 files changed, 53 insertions(+), 351 deletions(-) delete mode 100644 scripts/docgen-compat/content-sources/node/HOME.md delete mode 100644 scripts/docgen-compat/content-sources/node/toc.yaml diff --git a/package.json b/package.json index aa38c37fdaa..4655038c45f 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,7 @@ "test:setup": "node tools/config.js", "test:saucelabs": "node scripts/run_saucelabs.js", "docgen": "ts-node-script scripts/docgen/docgen.ts", - "docgen:compat": "yarn docgen:compat:js; yarn docgen:compat:node", - "docgen:compat:js": "node scripts/docgen-compat/generate-docs.js --api js", - "docgen:compat:node": "node scripts/docgen-compat/generate-docs.js --api node", + "docgen:compat": "node scripts/docgen-compat/generate-docs.js --api js", "lint": "lerna run --scope @firebase/* lint", "lint:fix": "lerna run --scope @firebase/* lint:fix", "size-report": "ts-node-script scripts/size_report/report_binary_size.ts", diff --git a/packages/app-check/src/index.ts b/packages/app-check/src/index.ts index 8bb6bc24ab7..ab0b35fd074 100644 --- a/packages/app-check/src/index.ts +++ b/packages/app-check/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase App Check Web SDK. - * + * * @remarks * Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use diff --git a/packages/auth/src/model/public_types.ts b/packages/auth/src/model/public_types.ts index d4bad795536..2e2bd050bf8 100644 --- a/packages/auth/src/model/public_types.ts +++ b/packages/auth/src/model/public_types.ts @@ -193,7 +193,7 @@ export interface Auth { * This makes it easy for a user signing in to specify whether their session should be * remembered or not. It also makes it easier to never persist the Auth state for applications * that are shared by other users or have sensitive data. - * + * * This method has no effect in Node.js. * * @example diff --git a/packages/auth/src/platform_browser/mfa/assertions/phone.ts b/packages/auth/src/platform_browser/mfa/assertions/phone.ts index 64af5185ddf..8ae8066deea 100644 --- a/packages/auth/src/platform_browser/mfa/assertions/phone.ts +++ b/packages/auth/src/platform_browser/mfa/assertions/phone.ts @@ -83,7 +83,7 @@ export class PhoneMultiFactorGenerator { /** * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor. - * + * * @remarks * This method is not available in Node.js. * diff --git a/packages/auth/src/platform_browser/popup_redirect.ts b/packages/auth/src/platform_browser/popup_redirect.ts index 2411a0dccdf..73cdb94ef9c 100644 --- a/packages/auth/src/platform_browser/popup_redirect.ts +++ b/packages/auth/src/platform_browser/popup_redirect.ts @@ -189,7 +189,7 @@ class BrowserPopupRedirectResolver implements PopupRedirectResolverInternal { /** * An implementation of {@link PopupRedirectResolver} suitable for browser * based applications. - * + * * @remarks * This method is not available in Node.js. * diff --git a/packages/auth/src/platform_browser/providers/phone.ts b/packages/auth/src/platform_browser/providers/phone.ts index cd958981594..b69e855270b 100644 --- a/packages/auth/src/platform_browser/providers/phone.ts +++ b/packages/auth/src/platform_browser/providers/phone.ts @@ -50,7 +50,7 @@ import { ProviderId, SignInMethod } from '../../model/enums'; * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode); * const userCredential = await signInWithCredential(auth, phoneCredential); * ``` - * + * * @public */ export class PhoneAuthProvider { diff --git a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts index b07f3cf6424..238d1870498 100644 --- a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts +++ b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts @@ -43,7 +43,7 @@ type TokenCallback = (token: string) => void; /** * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier. - * + * * @remarks * `RecaptchaVerifier` is not available in Node.js. * diff --git a/packages/auth/src/platform_browser/strategies/phone.ts b/packages/auth/src/platform_browser/strategies/phone.ts index 78ce473cb77..1482f72c6d5 100644 --- a/packages/auth/src/platform_browser/strategies/phone.ts +++ b/packages/auth/src/platform_browser/strategies/phone.ts @@ -81,7 +81,7 @@ class ConfirmationResultImpl implements ConfirmationResult { * This function can work on other platforms that do not support the * {@link RecaptchaVerifier} (like React Native), but you need to use a * third-party {@link ApplicationVerifier} implementation. - * + * * This method is not available in Node.js. * * @example @@ -117,7 +117,7 @@ export async function signInWithPhoneNumber( /** * Links the user account with the given phone number. - * + * * @remarks * This method is not available in Node.js. * @@ -149,7 +149,7 @@ export async function linkWithPhoneNumber( * * @remarks * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. - * + * * This method is not available in Node.js. * * @param user - The user. @@ -257,7 +257,7 @@ export async function _verifyPhoneNumber( /** * Updates the user's phone number. - * + * * @remarks * This method is not available in Node.js. * diff --git a/packages/auth/src/platform_browser/strategies/popup.ts b/packages/auth/src/platform_browser/strategies/popup.ts index 1627a7fefe0..fcf183d1b3f 100644 --- a/packages/auth/src/platform_browser/strategies/popup.ts +++ b/packages/auth/src/platform_browser/strategies/popup.ts @@ -62,7 +62,7 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000); * @remarks * If succeeds, returns the signed in user along with the provider's credential. If sign in was * unsuccessful, returns an error object containing additional information about the error. - * + * * This method is not available in Node.js. * * @example @@ -110,7 +110,7 @@ export async function signInWithPopup( * @remarks * If the reauthentication is successful, the returned result will contain the user and the * provider's credential. - * + * * This method is not available in Node.js. * * @example @@ -153,7 +153,7 @@ export async function reauthenticateWithPopup( * * @remarks * If the linking is successful, the returned result will contain the user and the provider's credential. - * + * * This method is not available in Node.js. * * @example diff --git a/packages/auth/src/platform_browser/strategies/redirect.ts b/packages/auth/src/platform_browser/strategies/redirect.ts index 1c4d710a909..fe1215c0c46 100644 --- a/packages/auth/src/platform_browser/strategies/redirect.ts +++ b/packages/auth/src/platform_browser/strategies/redirect.ts @@ -44,7 +44,7 @@ import { getModularInstance } from '@firebase/util'; * To handle the results and errors for this operation, refer to {@link getRedirectResult}. * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link signInWithRedirect}. - * + * * This method is not available in Node.js. * * @example @@ -115,7 +115,7 @@ export async function _signInWithRedirect( * To handle the results and errors for this operation, refer to {@link getRedirectResult}. * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link reauthenticateWithRedirect}. - * + * * This method is not available in Node.js. * * @example @@ -246,7 +246,7 @@ export async function _linkWithRedirect( * @remarks * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an * error. If no redirect operation was called, returns `null`. - * + * * This method is not available in Node.js. * * @example diff --git a/packages/firebase/compat/index.d.ts b/packages/firebase/compat/index.d.ts index 8406a879526..9fbffee3729 100644 --- a/packages/firebase/compat/index.d.ts +++ b/packages/firebase/compat/index.d.ts @@ -8047,30 +8047,6 @@ declare namespace firebase.storage { UNSUPPORTED_ENVIRONMENT = 'unsupported-environment' } - /** - * An error returned by the Firebase Storage SDK. - */ - export interface FirebaseStorageError extends FirebaseError { - /** - * Stores custom error data unique to the `StorageError`. - */ - customData: { - serverResponse: string | null; - }; - - get status(): number; - set status(status: number); - /** - * Compares a `StorageErrorCode` against this error's code, filtering out the prefix. - */ - _codeEquals(code: StorageErrorCode): boolean; - /** - * Optional response message that was added by the server. - */ - get serverResponse(): null | string; - set serverResponse(serverResponse: string | null); - } - interface StorageObserver { next?: NextFn | null; error?: (error: FirebaseStorageError) => void | null; @@ -8268,6 +8244,30 @@ declare namespace firebase.storage { */ totalBytes: number; } + + /** + * An error returned by the Firebase Storage SDK. + */ + export interface FirebaseStorageError extends FirebaseError { + /** + * Stores custom error data unique to the `StorageError`. + */ + customData: { + serverResponse: string | null; + }; + + get status(): number; + set status(status: number); + /** + * Compares a `StorageErrorCode` against this error's code, filtering out the prefix. + */ + _codeEquals(code: StorageErrorCode): boolean; + /** + * Optional response message that was added by the server. + */ + get serverResponse(): null | string; + set serverResponse(serverResponse: string | null); + } } declare namespace firebase.firestore { diff --git a/packages/firestore/src/api/settings.ts b/packages/firestore/src/api/settings.ts index bc6ef9bd35e..2f232052cd1 100644 --- a/packages/firestore/src/api/settings.ts +++ b/packages/firestore/src/api/settings.ts @@ -81,7 +81,7 @@ export interface FirestoreSettings extends LiteSettings { * may be removed in a future release. If you find yourself using it to * work around a specific network reliability issue, please tell us about * it in https://github.com/firebase/firebase-js-sdk/issues/1674. - * + * * This setting cannot be used in a Node.js environment. */ experimentalForceLongPolling?: boolean; diff --git a/scripts/docgen-compat/content-sources/js/toc.yaml b/scripts/docgen-compat/content-sources/js/toc.yaml index 1ce2caf8348..2eadbc97038 100644 --- a/scripts/docgen-compat/content-sources/js/toc.yaml +++ b/scripts/docgen-compat/content-sources/js/toc.yaml @@ -282,6 +282,8 @@ toc: path: /docs/reference/js/v8/firebase.storage.SettableMetadata - title: "Storage" path: /docs/reference/js/v8/firebase.storage.Storage + - title: "StorageErrorCode" + path: /docs/reference/js/v8/firebase.storage.StorageErrorCode - title: "StorageObserver" path: /docs/reference/js/v8/firebase.storage.StorageObserver - title: "UploadMetadata" diff --git a/scripts/docgen-compat/content-sources/node/HOME.md b/scripts/docgen-compat/content-sources/node/HOME.md deleted file mode 100644 index 1aa17ec613c..00000000000 --- a/scripts/docgen-compat/content-sources/node/HOME.md +++ /dev/null @@ -1,11 +0,0 @@ -# Firebase JavaScript SDK Reference For Node.js -The Firebase JavaScript SDK implements the client-side libraries used by -applications using Firebase services. This SDK is distributed via: - -- [CDN](/docs/web/setup/#add-sdks-initialize) -- [npm package](https://www.npmjs.com/package/firebase) - -To get started using Firebase, see -[Add Firebase to your JavaScript Project](https://firebase.google.com/docs/web/setup). - -For source code, see the [Firebase JavaScript SDK Github repo](https://github.com/firebase/firebase-js-sdk). diff --git a/scripts/docgen-compat/content-sources/node/toc.yaml b/scripts/docgen-compat/content-sources/node/toc.yaml deleted file mode 100644 index 680604b5778..00000000000 --- a/scripts/docgen-compat/content-sources/node/toc.yaml +++ /dev/null @@ -1,212 +0,0 @@ -toc: -- title: "firebase" - path: /docs/reference/node/firebase - section: - - title: "FirebaseError" - path: /docs/reference/node/firebase.FirebaseError - - title: "FirebaseIdToken" - path: /docs/reference/node/firebase.FirebaseIdToken - -- title: "firebase.app" - path: /docs/reference/node/firebase.app - section: - - title: "App" - path: /docs/reference/node/firebase.app.App - -- title: "firebase.auth" - path: /docs/reference/node/firebase.auth - section: - - title: "Auth" - path: /docs/reference/node/firebase.auth.Auth - - title: "ActionCodeInfo" - path: /docs/reference/node/firebase.auth.ActionCodeInfo - - title: "ActionCodeURL" - path: /docs/reference/node/firebase.auth.ActionCodeURL - - title: "ApplicationVerifier" - path: /docs/reference/node/firebase.auth.ApplicationVerifier - - title: "AuthCredential" - path: /docs/reference/node/firebase.auth.AuthCredential - - title: "AuthError" - path: /docs/reference/node/firebase.auth.AuthError - - title: "AuthProvider" - path: /docs/reference/node/firebase.auth.AuthProvider - - title: "AuthSettings" - path: /docs/reference/node/firebase.auth.AuthSettings - - title: "Config" - path: /docs/reference/node/firebase.auth.Config - - title: "ConfirmationResult" - path: /docs/reference/node/firebase.auth.ConfirmationResult - - title: "EmailAuthProvider" - path: /docs/reference/node/firebase.auth.EmailAuthProvider - - title: "EmulatorConfig" - path: /docs/reference/node/firebase.auth.EmulatorConfig - - title: "Error" - path: /docs/reference/node/firebase.auth.Error - - title: "FacebookAuthProvider" - path: /docs/reference/node/firebase.auth.FacebookAuthProvider - - title: "GithubAuthProvider" - path: /docs/reference/node/firebase.auth.GithubAuthProvider - - title: "GoogleAuthProvider" - path: /docs/reference/node/firebase.auth.GoogleAuthProvider - - title: "IdTokenResult" - path: /docs/reference/node/firebase.auth.IDTokenResult - - title: "MultiFactorAssertion" - path: /docs/reference/node/firebase.auth.multifactorassertion - - title: "MultiFactorError" - path: /docs/reference/node/firebase.auth.multifactorerror - - title: "MultiFactorInfo" - path: /docs/reference/node/firebase.auth.multifactorinfo - - title: "MultiFactorResolver" - path: /docs/reference/node/firebase.auth.multifactorresolver - - title: "MultiFactorSession" - path: /docs/reference/node/firebase.auth.multifactorsession - - title: "PhoneAuthCredential" - path: /docs/reference/node/firebase.auth.phoneauthcredential - - title: "PhoneMultiFactorAssertion" - path: /docs/reference/node/firebase.auth.phonemultifactorassertion - - title: "PhoneMultiFactorEnrollInfoOptions" - path: /docs/reference/node/firebase.auth.phonemultifactorenrollinfooptions - - title: "PhoneMultiFactorGenerator" - path: /docs/reference/node/firebase.auth.phonemultifactorgenerator - - title: "PhoneMultiFactorInfo" - path: /docs/reference/node/firebase.auth.phonemultifactorinfo - - title: "PhoneMultiFactorSignInInfoOptions" - path: /docs/reference/node/firebase.auth.phonemultifactorsignininfooptions - - title: "PhoneSingleFactorInfoOptions" - path: /docs/reference/node/firebase.auth.phonesinglefactorinfooptions - - title: "MultiFactorUser" - path: /docs/reference/node/firebase.user.multifactoruser - - title: "OAuthCredential" - path: /docs/reference/node/firebase.auth.OAuthCredential - - title: "OAuthCredentialOptions" - path: /docs/reference/node/firebase.auth.OAuthCredentialOptions - - title: "OAuthProvider" - path: /docs/reference/node/firebase.auth.OAuthProvider - - title: "PhoneAuthProvider" - path: /docs/reference/node/firebase.auth.PhoneAuthProvider - - title: "SAMLAuthProvider" - path: /docs/reference/node/firebase.auth.SAMLAuthProvider - - title: "TwitterAuthProvider" - path: /docs/reference/node/firebase.auth.TwitterAuthProvider - - title: "User" - path: /docs/reference/node/firebase.User - - title: "UserInfo" - path: /docs/reference/node/firebase.UserInfo - - title: "UserMetadata" - path: /docs/reference/node/firebase.auth.UserMetadata - -- title: "firebase.database" - path: /docs/reference/node/firebase.database - section: - - title: "DataSnapshot" - path: /docs/reference/node/firebase.database.DataSnapshot - - title: "Database" - path: /docs/reference/node/firebase.database.Database - - title: "OnDisconnect" - path: /docs/reference/node/firebase.database.OnDisconnect - - title: "Query" - path: /docs/reference/node/firebase.database.Query - - title: "Reference" - path: /docs/reference/node/firebase.database.Reference - - title: "ServerValue" - path: /docs/reference/node/firebase.database.ServerValue - - title: "ThenableReference" - path: /docs/reference/node/firebase.database.ThenableReference - - title: "TransactionResult" - path: /docs/reference/node/firebase.database.TransactionResult - -- title: "firebase.firestore" - path: /docs/reference/node/firebase.firestore - section: - - title: "Blob" - path: /docs/reference/node/firebase.firestore.Blob - - title: "CollectionReference" - path: /docs/reference/node/firebase.firestore.CollectionReference - - title: "DocumentChange" - path: /docs/reference/node/firebase.firestore.DocumentChange - - title: "DocumentReference" - path: /docs/reference/node/firebase.firestore.DocumentReference - - title: "DocumentSnapshot" - path: /docs/reference/node/firebase.firestore.DocumentSnapshot - - title: "FieldPath" - path: /docs/reference/node/firebase.firestore.FieldPath - - title: "FieldValue" - path: /docs/reference/node/firebase.firestore.FieldValue - - title: "Firestore" - path: /docs/reference/node/firebase.firestore.Firestore - - title: "FirestoreDataConverter" - path: /docs/reference/node/firebase.firestore.FirestoreDataConverter - - title: "FirestoreError" - path: /docs/reference/node/firebase.firestore.FirestoreError - - title: "GeoPoint" - path: /docs/reference/node/firebase.firestore.GeoPoint - - title: "GetOptions" - path: /docs/reference/node/firebase.firestore.GetOptions - - title: "LoadBundleTask" - path: /docs/reference/node/firebase.firestore.LoadBundleTask - - title: "LoadBundleTaskProgress" - path: /docs/reference/node/firebase.firestore.LoadBundleTaskProgress - - title: "PersistenceSettings" - path: /docs/reference/node/firebase.firestore.PersistenceSettings - - title: "Query" - path: /docs/reference/node/firebase.firestore.Query - - title: "QueryDocumentSnapshot" - path: /docs/reference/node/firebase.firestore.QueryDocumentSnapshot - - title: "QuerySnapshot" - path: /docs/reference/node/firebase.firestore.QuerySnapshot - - title: "SetOptions" - path: /docs/reference/node/firebase.firestore.SetOptions - - title: "Settings" - path: /docs/reference/node/firebase.firestore.Settings - - title: "SnapshotListenOptions" - path: /docs/reference/node/firebase.firestore.SnapshotListenOptions - - title: "SnapshotMetadata" - path: /docs/reference/node/firebase.firestore.SnapshotMetadata - - title: "SnapshotOptions" - path: /docs/reference/node/firebase.firestore.SnapshotOptions - - title: "Timestamp" - path: /docs/reference/node/firebase.firestore.Timestamp - - title: "Transaction" - path: /docs/reference/node/firebase.firestore.Transaction - - title: "WriteBatch" - path: /docs/reference/node/firebase.firestore.WriteBatch - -- title: "firebase.functions" - path: /docs/reference/node/firebase.functions - section: - - title: "Functions" - path: /docs/reference/node/firebase.functions.Functions - - title: "HttpsCallable" - path: /docs/reference/node/firebase.functions.HttpsCallable - - title: "HttpsCallableOptions" - path: /docs/reference/node/firebase.functions.HttpsCallableOptions - - title: "HttpsCallableResult" - path: /docs/reference/node/firebase.functions.HttpsCallableResult - - title: "HttpsError" - path: /docs/reference/node/firebase.functions.HttpsError - -- title: "firebase.storage" - path: /docs/reference/node/firebase.storage - section: - - title: "FirebaseStorageError" - path: /docs/reference/node/firebase.storage.FirebaseStorageError - - title: "FullMetadata" - path: /docs/reference/node/firebase.storage.FullMetadata - - title: "ListOptions" - path: /docs/reference/node/firebase.storage.ListOptions - - title: "ListResult" - path: /docs/reference/node/firebase.storage.ListResult - - title: "Reference" - path: /docs/reference/node/firebase.storage.Reference - - title: "SettableMetadata" - path: /docs/reference/node/firebase.storage.SettableMetadata - - title: "Storage" - path: /docs/reference/node/firebase.storage.Storage - - title: "StorageObserver" - path: /docs/reference/node/firebase.storage.StorageObserver - - title: "UploadMetadata" - path: /docs/reference/node/firebase.storage.UploadMetadata - - title: "UploadTask" - path: /docs/reference/node/firebase.storage.UploadTask - - title: "UploadTaskSnapshot" - path: /docs/reference/node/firebase.storage.UploadTaskSnapshot \ No newline at end of file diff --git a/scripts/docgen-compat/generate-docs.js b/scripts/docgen-compat/generate-docs.js index 0aed77640f7..b2054286297 100644 --- a/scripts/docgen-compat/generate-docs.js +++ b/scripts/docgen-compat/generate-docs.js @@ -26,11 +26,6 @@ const repoPath = path.resolve(`${__dirname}/../..`); // Command-line options. const { api: apiType, source: sourceFile } = yargs - .option('api', { - default: 'js', - describe: 'api to generate docs for ("js" or "node")', - type: 'string' - }) .option('source', { default: `${repoPath}/packages/firebase/compat/index.d.ts`, describe: 'Typescript source file(s)', @@ -43,7 +38,6 @@ const destinationDir = apiType === 'js' ? 'js/v8' : apiType; const docPath = path.resolve(`${__dirname}/html/${destinationDir}`); const contentPath = path.resolve(`${__dirname}/content-sources/${apiType}`); const tempHomePath = path.resolve(`${contentPath}/HOME_TEMP.md`); -const tempNodeSourcePath = path.resolve(`${__dirname}/index.node.d.ts`); const devsitePath = `/docs/reference/${destinationDir}/`; /** @@ -61,7 +55,7 @@ function stripPath(path) { * Additional config options come from ./typedoc.js */ function runTypedoc() { - const typeSource = apiType === 'node' ? tempNodeSourcePath : sourceFile; + const typeSource = sourceFile; const command = `${repoPath}/node_modules/.bin/typedoc ${typeSource} \ --tsconfig ${__dirname}/tsconfig.json \ --out ${docPath} \ @@ -108,15 +102,10 @@ function fixLinks(file) { let badLinkCleanup = caseFixedLinks.replace( /{@link (.+)}/g, (all, text) => { - // It's expected to have some broken @link tags in Node docs - // since they could reference some pages only generated for JS. - // Just render as plain text. Warn if it's not a Node doc. - if (!file.includes('/node/')) { - console.log( - `Unable to generate link for "${all} in ${file}", ` + - `removing markup and rendering as plain text.` - ); - } + console.log( + `Unable to generate link for "${all} in ${file}", ` + + `removing markup and rendering as plain text.` + ); return text; } ); @@ -205,12 +194,10 @@ function checkForMissingFilesAndFixFilenameCase() { /** * Gets a list of html files in generated dir and checks if any are not * found in toc.yaml. - * Option to remove the file if not found (used for node docs). * * @param {Array} filenamesFromToc Filenames pulled from toc.yaml - * @param {boolean} shouldRemove Should just remove the file */ -function checkForUnlistedFiles(filenamesFromToc, shouldRemove) { +function checkForUnlistedFiles(filenamesFromToc) { return fs.readdir(docPath).then(files => { const htmlFiles = files .filter(filename => filename.slice(-4) === 'html') @@ -282,8 +269,7 @@ function fixAllLinks(htmlFiles) { } const PROJECT_FILE_PATH = { - 'js': '/docs/reference/js/v8/_project.yaml', - 'node': '/docs/reference/node/_project.yaml' + 'js': '/docs/reference/js/v8/_project.yaml' }; async function setProjectYamlPath(api) { const defaultTemplatePath = path.resolve( @@ -299,55 +285,6 @@ async function setProjectYamlPath(api) { await fs.writeFile(defaultTemplatePath, replacedText); } -/** - * Generate an temporary abridged version of index.d.ts used to create - * Node docs. - */ -async function generateNodeSource() { - const sourceText = await fs.readFile(sourceFile, 'utf8'); - - // Parse index.d.ts. A dummy filename is required but it doesn't create a - // file. - let typescriptSourceFile = typescript.createSourceFile( - 'temp.d.ts', - sourceText, - typescript.ScriptTarget.ES2015, - /*setParentNodes */ false - ); - - /** - * Typescript transformer function. Removes nodes tagged with @webonly. - */ - const removeWebOnlyNodes = context => rootNode => { - function visit(node) { - if ( - node.jsDoc && - node.jsDoc.some( - item => - item.tags && - item.tags.some(tag => tag.tagName.escapedText === 'webonly') - ) - ) { - return null; - } - return typescript.visitEachChild(node, visit, context); - } - return typescript.visitNode(rootNode, visit); - }; - - // Use above transformer on source AST to remove nodes tagged with @webonly. - const result = typescript.transform(typescriptSourceFile, [ - removeWebOnlyNodes - ]); - - // Convert transformed AST to text and write to file. - const printer = typescript.createPrinter(); - return fs.writeFile( - tempNodeSourcePath, - printer.printFile(result.transformed[0]) - ); -} - /** * Main document generation process. * @@ -370,11 +307,6 @@ Promise.all([ tocText = tocRaw; return generateTempHomeMdFile(tocRaw, homeRaw); }) - .then(() => { - if (apiType === 'node') { - return generateNodeSource(); - } - }) .then(() => { setProjectYamlPath(apiType); }) @@ -385,10 +317,6 @@ Promise.all([ console.log(output.stdout); // Clean up temp home markdown file. (Nothing needs to wait for this.) fs.unlink(tempHomePath); - // Clean up temp node index.d.ts file if it exists. - if (await fs.exists(tempNodeSourcePath)) { - fs.unlink(tempNodeSourcePath); - } }) // Write out TOC file. Do this after Typedoc step to prevent Typedoc // erroring when it finds an unexpected file in the target dir. @@ -407,11 +335,8 @@ Promise.all([ // Not blocking. .then(checkForMissingFilesAndFixFilenameCase) // Check for files that exist but aren't listed in the TOC and warn. - // (If API is node, actually remove the file.) // Removal is blocking, warnings aren't. - .then(filenamesFromToc => - checkForUnlistedFiles(filenamesFromToc, apiType === 'node') - ) + .then(filenamesFromToc => checkForUnlistedFiles(filenamesFromToc)) // Write a _toc_autogenerated.yaml to record what files were created. .then(htmlFiles => writeGeneratedFileList(htmlFiles)) // Correct the links in all the generated html files now that files have diff --git a/scripts/docgen-compat/theme/layouts/default.hbs b/scripts/docgen-compat/theme/layouts/default.hbs index d2d327c10b2..8572983d867 100644 --- a/scripts/docgen-compat/theme/layouts/default.hbs +++ b/scripts/docgen-compat/theme/layouts/default.hbs @@ -4,7 +4,7 @@ - + From d17e911a8bfa2a4accff5216c8dbe6e1df780cfa Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 5 May 2023 14:20:13 -0700 Subject: [PATCH 07/13] Address some PR comments --- docs-devsite/analytics.md | 2 +- docs-devsite/auth.md | 3 ++- docs-devsite/index.md | 10 +++++----- docs-devsite/installations.md | 2 +- docs-devsite/messaging.md | 2 +- docs-devsite/performance.md | 2 +- docs-devsite/remote-config.md | 2 +- packages/analytics/src/index.ts | 2 +- packages/auth/src/core/index.ts | 3 ++- packages/installations/src/index.ts | 2 +- packages/messaging/src/index.ts | 2 +- packages/performance/src/index.ts | 2 +- packages/remote-config/src/index.ts | 2 +- 13 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs-devsite/analytics.md b/docs-devsite/analytics.md index 07940c6cce8..cfcd0e0860c 100644 --- a/docs-devsite/analytics.md +++ b/docs-devsite/analytics.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # analytics package -The Firebase Analytics Web SDK. This SDK currently does not work in Node.js. +The Firebase Analytics Web SDK. This SDK does not work in Node.js. ## Functions diff --git a/docs-devsite/auth.md b/docs-devsite/auth.md index e6f82caebc5..55823817258 100644 --- a/docs-devsite/auth.md +++ b/docs-devsite/auth.md @@ -696,6 +696,8 @@ Changes the type of persistence on the [Auth](./auth.auth.md#auth_interface) ins This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the `Auth` state for applications that are shared by other users or have sensitive data. +This method has no effect in Node.js. + Signature: ```typescript @@ -722,7 +724,6 @@ A `Promise` that resolves once the persistence change has completed setPersistence(auth, browserSessionPersistence); ``` -This method has no effect in Node.js. ## signInAnonymously() diff --git a/docs-devsite/index.md b/docs-devsite/index.md index f38d80ccdec..a8c9d6495e9 100644 --- a/docs-devsite/index.md +++ b/docs-devsite/index.md @@ -15,16 +15,16 @@ https://github.com/firebase/firebase-js-sdk | Package | Description | | --- | --- | -| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK currently does not work in Node.js. | +| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK does not work in Node.js. | | [@firebase/app](./app.md#app_package) | Firebase App | | [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK. | | [@firebase/auth](./auth.md#auth_package) | Firebase Authentication | | [@firebase/database](./database.md#database_package) | Firebase Realtime Database | | [@firebase/firestore](./firestore.md#firestore_package) | Cloud Firestore | | [@firebase/functions](./functions.md#functions_package) | Cloud Functions for Firebase | -| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK. This SDK currently does not work in Node.js. | -| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK. This SDK currently does not work in Node.js. | -| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK currently does not work in Node.js. | -| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK currently does not work in Node.js. | +| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK. This SDK does not work in Node.js. | +| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK. This SDK does not work in Node.js. | +| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK does not work in Node.js. | +| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK does not work in Node.js. | | [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase | diff --git a/docs-devsite/installations.md b/docs-devsite/installations.md index f00dbb8bee0..c5d5e95a685 100644 --- a/docs-devsite/installations.md +++ b/docs-devsite/installations.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # installations package -The Firebase Installations Web SDK. This SDK currently does not work in Node.js. +The Firebase Installations Web SDK. This SDK does not work in Node.js. ## Functions diff --git a/docs-devsite/messaging.md b/docs-devsite/messaging.md index 5c910eeec79..1b39251c0ff 100644 --- a/docs-devsite/messaging.md +++ b/docs-devsite/messaging.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # messaging package -The Firebase Cloud Messaging Web SDK. This SDK currently does not work in Node.js. +The Firebase Cloud Messaging Web SDK. This SDK does not work in Node.js. | Entry Point | Description | | --- | --- | diff --git a/docs-devsite/performance.md b/docs-devsite/performance.md index a7c4c295712..e19f862600e 100644 --- a/docs-devsite/performance.md +++ b/docs-devsite/performance.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # performance package -The Firebase Performance Monitoring Web SDK. This SDK currently does not work in Node.js. +The Firebase Performance Monitoring Web SDK. This SDK does not work in Node.js. ## Functions diff --git a/docs-devsite/remote-config.md b/docs-devsite/remote-config.md index e28de1ca00b..75c0b5b0ba3 100644 --- a/docs-devsite/remote-config.md +++ b/docs-devsite/remote-config.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # remote-config package -The Firebase Remote Config Web SDK. This SDK currently does not work in Node.js. +The Firebase Remote Config Web SDK. This SDK does not work in Node.js. ## Functions diff --git a/packages/analytics/src/index.ts b/packages/analytics/src/index.ts index e7ca4e07d3a..8e3f82f3c95 100644 --- a/packages/analytics/src/index.ts +++ b/packages/analytics/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Analytics Web SDK. - * This SDK currently does not work in Node.js. + * This SDK does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/auth/src/core/index.ts b/packages/auth/src/core/index.ts index 2a37ad84663..29f2eee0610 100644 --- a/packages/auth/src/core/index.ts +++ b/packages/auth/src/core/index.ts @@ -44,11 +44,12 @@ export { * remembered or not. It also makes it easier to never persist the `Auth` state for applications * that are shared by other users or have sensitive data. * + * This method has no effect in Node.js. + * * @example * ```javascript * setPersistence(auth, browserSessionPersistence); * ``` - * This method has no effect in Node.js. * * @param auth - The {@link Auth} instance. * @param persistence - The {@link Persistence} to use. diff --git a/packages/installations/src/index.ts b/packages/installations/src/index.ts index 686e3a0bd66..3531a279ef6 100644 --- a/packages/installations/src/index.ts +++ b/packages/installations/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Installations Web SDK. - * This SDK currently does not work in Node.js. + * This SDK does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/messaging/src/index.ts b/packages/messaging/src/index.ts index ff00ea403c9..e64a3e905f0 100644 --- a/packages/messaging/src/index.ts +++ b/packages/messaging/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Cloud Messaging Web SDK. - * This SDK currently does not work in Node.js. + * This SDK does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/performance/src/index.ts b/packages/performance/src/index.ts index 132a92ffef9..8c592a08616 100644 --- a/packages/performance/src/index.ts +++ b/packages/performance/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Performance Monitoring Web SDK. - * This SDK currently does not work in Node.js. + * This SDK does not work in Node.js. * * @packageDocumentation */ diff --git a/packages/remote-config/src/index.ts b/packages/remote-config/src/index.ts index 5da1bd813eb..3a62576d80f 100644 --- a/packages/remote-config/src/index.ts +++ b/packages/remote-config/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Remote Config Web SDK. - * This SDK currently does not work in Node.js. + * This SDK does not work in Node.js. * * @packageDocumentation */ From 18efa021c038dfe562cbb18811eeed74543e2ab5 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 5 May 2023 16:46:24 -0700 Subject: [PATCH 08/13] Make wording consistent. --- docs-devsite/analytics.md | 2 +- docs-devsite/app-check.md | 2 +- docs-devsite/auth.auth.md | 2 +- docs-devsite/auth.md | 26 +++++----- docs-devsite/auth.phoneauthprovider.md | 2 +- .../auth.phonemultifactorgenerator.md | 2 +- docs-devsite/auth.recaptchaverifier.md | 2 +- docs-devsite/index.md | 10 ++-- docs-devsite/installations.md | 2 +- docs-devsite/messaging.md | 2 +- docs-devsite/performance.md | 2 +- docs-devsite/remote-config.md | 2 +- packages/analytics/src/index.ts | 2 +- packages/app-check/src/index.ts | 2 +- packages/auth/src/core/index.ts | 2 +- packages/auth/src/model/public_types.ts | 2 +- .../platform_browser/mfa/assertions/phone.ts | 2 +- .../src/platform_browser/popup_redirect.ts | 2 +- .../src/platform_browser/providers/phone.ts | 2 +- .../recaptcha/recaptcha_verifier.ts | 2 +- .../src/platform_browser/strategies/phone.ts | 8 ++-- .../src/platform_browser/strategies/popup.ts | 6 +-- .../platform_browser/strategies/redirect.ts | 8 ++-- packages/firebase/compat/index.d.ts | 48 +++++++++---------- packages/installations/src/index.ts | 2 +- packages/messaging/src/index.ts | 2 +- packages/performance/src/index.ts | 2 +- packages/remote-config/src/index.ts | 2 +- 28 files changed, 75 insertions(+), 75 deletions(-) diff --git a/docs-devsite/analytics.md b/docs-devsite/analytics.md index cfcd0e0860c..8a2ce2d4a31 100644 --- a/docs-devsite/analytics.md +++ b/docs-devsite/analytics.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # analytics package -The Firebase Analytics Web SDK. This SDK does not work in Node.js. +The Firebase Analytics Web SDK. This SDK does not work in a Node.js environment. ## Functions diff --git a/docs-devsite/app-check.md b/docs-devsite/app-check.md index 4676ccc1f3f..1b9e93c1886 100644 --- a/docs-devsite/app-check.md +++ b/docs-devsite/app-check.md @@ -12,7 +12,7 @@ https://github.com/firebase/firebase-js-sdk # app-check package The Firebase App Check Web SDK. -Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use `CustomProvider` and write your own attestation method. +Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use `CustomProvider` and write your own attestation method. ## Functions diff --git a/docs-devsite/auth.auth.md b/docs-devsite/auth.auth.md index e5babfa437e..4f49465a094 100644 --- a/docs-devsite/auth.auth.md +++ b/docs-devsite/auth.auth.md @@ -221,7 +221,7 @@ This will affect the currently saved Auth session and applies this type of persi This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the Auth state for applications that are shared by other users or have sensitive data. -This method has no effect in Node.js. +This method does not work in a Node.js environment. Signature: diff --git a/docs-devsite/auth.md b/docs-devsite/auth.md index 55823817258..5dc3105f992 100644 --- a/docs-devsite/auth.md +++ b/docs-devsite/auth.md @@ -442,7 +442,7 @@ Returns a [UserCredential](./auth.usercredential.md#usercredential_interface) fr If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an error. If no redirect operation was called, returns `null`. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -696,7 +696,7 @@ Changes the type of persistence on the [Auth](./auth.auth.md#auth_interface) ins This makes it easy for a user signing in to specify whether their session should be remembered or not. It also makes it easier to never persist the `Auth` state for applications that are shared by other users or have sensitive data. -This method has no effect in Node.js. +This method does not work in a Node.js environment. Signature: @@ -881,7 +881,7 @@ This method sends a code via SMS to the given phone number, and returns a [Confi For abuse prevention, this method also requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface). This SDK includes a reCAPTCHA-based implementation, [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class). This function can work on other platforms that do not support the [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) (like React Native), but you need to use a third-party [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) implementation. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -919,7 +919,7 @@ Authenticates a Firebase client using a popup-based OAuth authentication flow. If succeeds, returns the signed in user along with the provider's credential. If sign in was unsuccessful, returns an error object containing additional information about the error. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -961,7 +961,7 @@ Authenticates a Firebase client using a full-page redirect flow. To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [signInWithRedirect()](./auth.md#signinwithredirect). -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1214,7 +1214,7 @@ Promise<[UserCredential](./auth.usercredential.md#usercredential_interface)Signature: @@ -1240,7 +1240,7 @@ Links the authenticated provider to the user account using a pop-up based OAuth If the linking is successful, the returned result will contain the user and the provider's credential. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1278,7 +1278,7 @@ Links the [OAuthProvider](./auth.oauthprovider.md#oauthprovider_class) to the us To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [linkWithRedirect()](./auth.md#linkwithredirect). -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1365,7 +1365,7 @@ Re-authenticates a user using a fresh phone credential. Use before operations such as [updatePassword()](./auth.md#updatepassword) that require tokens from recent sign-in attempts. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1391,7 +1391,7 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth If the reauthentication is successful, the returned result will contain the user and the provider's credential. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1429,7 +1429,7 @@ Reauthenticates the current user with the specified [OAuthProvider](./auth.oauth To handle the results and errors for this operation, refer to [getRedirectResult()](./auth.md#getredirectresult). Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using [reauthenticateWithRedirect()](./auth.md#reauthenticatewithredirect). -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1607,7 +1607,7 @@ Promise<void> Updates the user's phone number. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: @@ -1879,7 +1879,7 @@ browserLocalPersistence: Persistence An implementation of [PopupRedirectResolver](./auth.popupredirectresolver.md#popupredirectresolver_interface) suitable for browser based applications. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: diff --git a/docs-devsite/auth.phoneauthprovider.md b/docs-devsite/auth.phoneauthprovider.md index 91bc4a26ea2..a7f53f744d5 100644 --- a/docs-devsite/auth.phoneauthprovider.md +++ b/docs-devsite/auth.phoneauthprovider.md @@ -12,7 +12,7 @@ https://github.com/firebase/firebase-js-sdk # PhoneAuthProvider class Provider for generating an [PhoneAuthCredential](./auth.phoneauthcredential.md#phoneauthcredential_class). -`PhoneAuthProvider` is not available in Node.js. +`PhoneAuthProvider` does not work in a Node.js environment. Signature: diff --git a/docs-devsite/auth.phonemultifactorgenerator.md b/docs-devsite/auth.phonemultifactorgenerator.md index b62749db0ee..71aa17e201e 100644 --- a/docs-devsite/auth.phonemultifactorgenerator.md +++ b/docs-devsite/auth.phonemultifactorgenerator.md @@ -44,7 +44,7 @@ static FACTOR_ID: string; Provides a [PhoneMultiFactorAssertion](./auth.phonemultifactorassertion.md#phonemultifactorassertion_interface) to confirm ownership of the phone second factor. -This method is not available in Node.js. +This method does not work in a Node.js environment. Signature: diff --git a/docs-devsite/auth.recaptchaverifier.md b/docs-devsite/auth.recaptchaverifier.md index ede16399835..34145ac2b27 100644 --- a/docs-devsite/auth.recaptchaverifier.md +++ b/docs-devsite/auth.recaptchaverifier.md @@ -12,7 +12,7 @@ https://github.com/firebase/firebase-js-sdk # RecaptchaVerifier class An [reCAPTCHA](https://www.google.com/recaptcha/)-based application verifier. -`RecaptchaVerifier` is not available in Node.js. +`RecaptchaVerifier` does not work in a Node.js environment. Signature: diff --git a/docs-devsite/index.md b/docs-devsite/index.md index a8c9d6495e9..6a32ccdbaa6 100644 --- a/docs-devsite/index.md +++ b/docs-devsite/index.md @@ -15,16 +15,16 @@ https://github.com/firebase/firebase-js-sdk | Package | Description | | --- | --- | -| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK does not work in Node.js. | +| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK does not work in a Node.js environment. | | [@firebase/app](./app.md#app_package) | Firebase App | | [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK. | | [@firebase/auth](./auth.md#auth_package) | Firebase Authentication | | [@firebase/database](./database.md#database_package) | Firebase Realtime Database | | [@firebase/firestore](./firestore.md#firestore_package) | Cloud Firestore | | [@firebase/functions](./functions.md#functions_package) | Cloud Functions for Firebase | -| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK. This SDK does not work in Node.js. | -| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK. This SDK does not work in Node.js. | -| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK does not work in Node.js. | -| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK does not work in Node.js. | +| [@firebase/installations](./installations.md#installations_package) | The Firebase Installations Web SDK. This SDK does not work in a Node.js environment. | +| [@firebase/messaging](./messaging.md#messaging_package) | The Firebase Cloud Messaging Web SDK. This SDK does not work in a Node.js environment. | +| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment. | +| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK does not work in a Node.js environment. | | [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase | diff --git a/docs-devsite/installations.md b/docs-devsite/installations.md index c5d5e95a685..b4999146385 100644 --- a/docs-devsite/installations.md +++ b/docs-devsite/installations.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # installations package -The Firebase Installations Web SDK. This SDK does not work in Node.js. +The Firebase Installations Web SDK. This SDK does not work in a Node.js environment. ## Functions diff --git a/docs-devsite/messaging.md b/docs-devsite/messaging.md index 1b39251c0ff..992d5b1c0e3 100644 --- a/docs-devsite/messaging.md +++ b/docs-devsite/messaging.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # messaging package -The Firebase Cloud Messaging Web SDK. This SDK does not work in Node.js. +The Firebase Cloud Messaging Web SDK. This SDK does not work in a Node.js environment. | Entry Point | Description | | --- | --- | diff --git a/docs-devsite/performance.md b/docs-devsite/performance.md index e19f862600e..59bd32a5a7e 100644 --- a/docs-devsite/performance.md +++ b/docs-devsite/performance.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # performance package -The Firebase Performance Monitoring Web SDK. This SDK does not work in Node.js. +The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment. ## Functions diff --git a/docs-devsite/remote-config.md b/docs-devsite/remote-config.md index 75c0b5b0ba3..9cc0287d130 100644 --- a/docs-devsite/remote-config.md +++ b/docs-devsite/remote-config.md @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # remote-config package -The Firebase Remote Config Web SDK. This SDK does not work in Node.js. +The Firebase Remote Config Web SDK. This SDK does not work in a Node.js environment. ## Functions diff --git a/packages/analytics/src/index.ts b/packages/analytics/src/index.ts index 8e3f82f3c95..ed785fba94b 100644 --- a/packages/analytics/src/index.ts +++ b/packages/analytics/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Analytics Web SDK. - * This SDK does not work in Node.js. + * This SDK does not work in a Node.js environment. * * @packageDocumentation */ diff --git a/packages/app-check/src/index.ts b/packages/app-check/src/index.ts index ab0b35fd074..81d7b90067a 100644 --- a/packages/app-check/src/index.ts +++ b/packages/app-check/src/index.ts @@ -2,7 +2,7 @@ * The Firebase App Check Web SDK. * * @remarks - * Firebase App Check does not work in Node.js using `ReCaptchaV3Provider` or + * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use * `CustomProvider` and write your own attestation method. * diff --git a/packages/auth/src/core/index.ts b/packages/auth/src/core/index.ts index 29f2eee0610..c5bc3aaf361 100644 --- a/packages/auth/src/core/index.ts +++ b/packages/auth/src/core/index.ts @@ -44,7 +44,7 @@ export { * remembered or not. It also makes it easier to never persist the `Auth` state for applications * that are shared by other users or have sensitive data. * - * This method has no effect in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript diff --git a/packages/auth/src/model/public_types.ts b/packages/auth/src/model/public_types.ts index 2e2bd050bf8..30f202a1b8e 100644 --- a/packages/auth/src/model/public_types.ts +++ b/packages/auth/src/model/public_types.ts @@ -194,7 +194,7 @@ export interface Auth { * remembered or not. It also makes it easier to never persist the Auth state for applications * that are shared by other users or have sensitive data. * - * This method has no effect in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript diff --git a/packages/auth/src/platform_browser/mfa/assertions/phone.ts b/packages/auth/src/platform_browser/mfa/assertions/phone.ts index 8ae8066deea..ded3732bff5 100644 --- a/packages/auth/src/platform_browser/mfa/assertions/phone.ts +++ b/packages/auth/src/platform_browser/mfa/assertions/phone.ts @@ -85,7 +85,7 @@ export class PhoneMultiFactorGenerator { * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor. * * @remarks - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}. * @returns A {@link PhoneMultiFactorAssertion} which can be used with diff --git a/packages/auth/src/platform_browser/popup_redirect.ts b/packages/auth/src/platform_browser/popup_redirect.ts index 73cdb94ef9c..cf1c1160dc4 100644 --- a/packages/auth/src/platform_browser/popup_redirect.ts +++ b/packages/auth/src/platform_browser/popup_redirect.ts @@ -191,7 +191,7 @@ class BrowserPopupRedirectResolver implements PopupRedirectResolverInternal { * based applications. * * @remarks - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @public */ diff --git a/packages/auth/src/platform_browser/providers/phone.ts b/packages/auth/src/platform_browser/providers/phone.ts index b69e855270b..2b5c0874b70 100644 --- a/packages/auth/src/platform_browser/providers/phone.ts +++ b/packages/auth/src/platform_browser/providers/phone.ts @@ -38,7 +38,7 @@ import { ProviderId, SignInMethod } from '../../model/enums'; * Provider for generating an {@link PhoneAuthCredential}. * * @remarks - * `PhoneAuthProvider` is not available in Node.js. + * `PhoneAuthProvider` does not work in a Node.js environment. * * @example * ```javascript diff --git a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts index 238d1870498..e8966b1daa6 100644 --- a/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts +++ b/packages/auth/src/platform_browser/recaptcha/recaptcha_verifier.ts @@ -45,7 +45,7 @@ type TokenCallback = (token: string) => void; * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier. * * @remarks - * `RecaptchaVerifier` is not available in Node.js. + * `RecaptchaVerifier` does not work in a Node.js environment. * * @public */ diff --git a/packages/auth/src/platform_browser/strategies/phone.ts b/packages/auth/src/platform_browser/strategies/phone.ts index 1482f72c6d5..745385c2db9 100644 --- a/packages/auth/src/platform_browser/strategies/phone.ts +++ b/packages/auth/src/platform_browser/strategies/phone.ts @@ -82,7 +82,7 @@ class ConfirmationResultImpl implements ConfirmationResult { * {@link RecaptchaVerifier} (like React Native), but you need to use a * third-party {@link ApplicationVerifier} implementation. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -119,7 +119,7 @@ export async function signInWithPhoneNumber( * Links the user account with the given phone number. * * @remarks - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @param user - The user. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -150,7 +150,7 @@ export async function linkWithPhoneNumber( * @remarks * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @param user - The user. * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101). @@ -259,7 +259,7 @@ export async function _verifyPhoneNumber( * Updates the user's phone number. * * @remarks - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ``` diff --git a/packages/auth/src/platform_browser/strategies/popup.ts b/packages/auth/src/platform_browser/strategies/popup.ts index fcf183d1b3f..e47e03cd3f7 100644 --- a/packages/auth/src/platform_browser/strategies/popup.ts +++ b/packages/auth/src/platform_browser/strategies/popup.ts @@ -63,7 +63,7 @@ export const _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000); * If succeeds, returns the signed in user along with the provider's credential. If sign in was * unsuccessful, returns an error object containing additional information about the error. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -111,7 +111,7 @@ export async function signInWithPopup( * If the reauthentication is successful, the returned result will contain the user and the * provider's credential. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -154,7 +154,7 @@ export async function reauthenticateWithPopup( * @remarks * If the linking is successful, the returned result will contain the user and the provider's credential. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript diff --git a/packages/auth/src/platform_browser/strategies/redirect.ts b/packages/auth/src/platform_browser/strategies/redirect.ts index fe1215c0c46..8586ea589d2 100644 --- a/packages/auth/src/platform_browser/strategies/redirect.ts +++ b/packages/auth/src/platform_browser/strategies/redirect.ts @@ -45,7 +45,7 @@ import { getModularInstance } from '@firebase/util'; * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link signInWithRedirect}. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -116,7 +116,7 @@ export async function _signInWithRedirect( * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link reauthenticateWithRedirect}. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -185,7 +185,7 @@ export async function _reauthenticateWithRedirect( * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices * | best practices} when using {@link linkWithRedirect}. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -247,7 +247,7 @@ export async function _linkWithRedirect( * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an * error. If no redirect operation was called, returns `null`. * - * This method is not available in Node.js. + * This method does not work in a Node.js environment. * * @example * ```javascript diff --git a/packages/firebase/compat/index.d.ts b/packages/firebase/compat/index.d.ts index 9fbffee3729..d257c0e15d6 100644 --- a/packages/firebase/compat/index.d.ts +++ b/packages/firebase/compat/index.d.ts @@ -426,7 +426,7 @@ declare namespace firebase { * console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -651,7 +651,7 @@ declare namespace firebase { * console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -701,7 +701,7 @@ declare namespace firebase { * console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -1237,7 +1237,7 @@ declare namespace firebase { * generating notifications if the push message payload has a `notification` * parameter. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1296,7 +1296,7 @@ declare namespace firebase { * The {@link firebase.performance.Performance `Performance`} service does not work with * any other app. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1315,7 +1315,7 @@ declare namespace firebase { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1335,7 +1335,7 @@ declare namespace firebase { * `firebase.analytics()` can be called with no arguments to access the default * app's {@link firebase.analytics.Analytics `Analytics`} service. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1404,7 +1404,7 @@ declare namespace firebase.app { * Gets the {@link firebase.installations.Installations `Installations`} service for the * current app. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1418,7 +1418,7 @@ declare namespace firebase.app { * Gets the {@link firebase.messaging.Messaging `Messaging`} service for the * current app. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1490,7 +1490,7 @@ declare namespace firebase.app { * Gets the {@link firebase.performance.Performance `Performance`} service for the * current app. If the current app is not the default one, throws an error. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1503,7 +1503,7 @@ declare namespace firebase.app { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1517,7 +1517,7 @@ declare namespace firebase.app { * Gets the {@link firebase.analytics.Analytics `Analytics`} service for the * current app. If the current app is not the default one, throws an error. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -1532,7 +1532,7 @@ declare namespace firebase.app { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.appCheck { /** @@ -1696,7 +1696,7 @@ declare namespace firebase.appCheck { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.installations { /** @@ -1745,7 +1745,7 @@ declare namespace firebase.installations { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.performance { /** @@ -1868,7 +1868,7 @@ declare namespace firebase.performance { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.remoteConfig { /** @@ -2670,7 +2670,7 @@ declare namespace firebase.auth { * Firebase console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -3350,7 +3350,7 @@ declare namespace firebase.auth { * console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @example * ```javascript @@ -3413,7 +3413,7 @@ declare namespace firebase.auth { * console. * * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -4628,7 +4628,7 @@ declare namespace firebase.auth { * An {@link https://www.google.com/recaptcha/ reCAPTCHA}-based application * verifier. * - * This is not available in Node.js. + * This does not work in a Node.js environment. * * @param container The reCAPTCHA container parameter. This * has different meaning depending on whether the reCAPTCHA is hidden or @@ -4775,7 +4775,7 @@ declare namespace firebase.auth { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.analytics { /** @@ -7435,7 +7435,7 @@ declare namespace firebase.database.ServerValue { } /** - * This is not available in Node.js. + * This does not work in a Node.js environment. */ declare namespace firebase.messaging { /** @@ -8326,7 +8326,7 @@ declare namespace firebase.firestore { * work around a specific network reliability issue, please tell us about * it in https://github.com/firebase/firebase-js-sdk/issues/1674. * - * This is not available in Node.js. + * This does not work in a Node.js environment. */ experimentalForceLongPolling?: boolean; @@ -8338,7 +8338,7 @@ declare namespace firebase.firestore { * This setting will likely be enabled by default in future releases and cannot be * combined with `experimentalForceLongPolling`. * - * This is not available in Node.js. + * This does not work in a Node.js environment. */ experimentalAutoDetectLongPolling?: boolean; diff --git a/packages/installations/src/index.ts b/packages/installations/src/index.ts index 3531a279ef6..c16abc2b0b1 100644 --- a/packages/installations/src/index.ts +++ b/packages/installations/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Installations Web SDK. - * This SDK does not work in Node.js. + * This SDK does not work in a Node.js environment. * * @packageDocumentation */ diff --git a/packages/messaging/src/index.ts b/packages/messaging/src/index.ts index e64a3e905f0..df9056e21b3 100644 --- a/packages/messaging/src/index.ts +++ b/packages/messaging/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Cloud Messaging Web SDK. - * This SDK does not work in Node.js. + * This SDK does not work in a Node.js environment. * * @packageDocumentation */ diff --git a/packages/performance/src/index.ts b/packages/performance/src/index.ts index 8c592a08616..4d3713f0614 100644 --- a/packages/performance/src/index.ts +++ b/packages/performance/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Performance Monitoring Web SDK. - * This SDK does not work in Node.js. + * This SDK does not work in a Node.js environment. * * @packageDocumentation */ diff --git a/packages/remote-config/src/index.ts b/packages/remote-config/src/index.ts index 3a62576d80f..288a8ed1827 100644 --- a/packages/remote-config/src/index.ts +++ b/packages/remote-config/src/index.ts @@ -1,6 +1,6 @@ /** * The Firebase Remote Config Web SDK. - * This SDK does not work in Node.js. + * This SDK does not work in a Node.js environment. * * @packageDocumentation */ From ce13f37c33005d4b9869ff53ad45da52bf1e16cd Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 16 May 2023 16:49:18 -0700 Subject: [PATCH 09/13] Address some PR comments --- packages/auth/src/core/index.ts | 2 ++ packages/firebase/compat/index.d.ts | 50 +++++++++++++++-------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/packages/auth/src/core/index.ts b/packages/auth/src/core/index.ts index c5bc3aaf361..2cdb6d3b50c 100644 --- a/packages/auth/src/core/index.ts +++ b/packages/auth/src/core/index.ts @@ -80,6 +80,8 @@ export function setPersistence( * Thus, by calling this optional method, you will reduce the latency of future auth flows. * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA. * + * This method does not work in a Node.js environment. + * * @example * ```javascript * initializeRecaptchaConfig(auth); diff --git a/packages/firebase/compat/index.d.ts b/packages/firebase/compat/index.d.ts index d257c0e15d6..f6ce4e5ea05 100644 --- a/packages/firebase/compat/index.d.ts +++ b/packages/firebase/compat/index.d.ts @@ -426,7 +426,7 @@ declare namespace firebase { * console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -651,7 +651,7 @@ declare namespace firebase { * console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -701,7 +701,7 @@ declare namespace firebase { * console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -1237,7 +1237,7 @@ declare namespace firebase { * generating notifications if the push message payload has a `notification` * parameter. * - * This does not work in a Node.js environment. + * The Messaging SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1296,7 +1296,7 @@ declare namespace firebase { * The {@link firebase.performance.Performance `Performance`} service does not work with * any other app. * - * This does not work in a Node.js environment. + * The Performance SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1315,7 +1315,7 @@ declare namespace firebase { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * This does not work in a Node.js environment. + * The Remote Config SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1335,7 +1335,7 @@ declare namespace firebase { * `firebase.analytics()` can be called with no arguments to access the default * app's {@link firebase.analytics.Analytics `Analytics`} service. * - * This does not work in a Node.js environment. + * The Analytics SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1404,7 +1404,7 @@ declare namespace firebase.app { * Gets the {@link firebase.installations.Installations `Installations`} service for the * current app. * - * This does not work in a Node.js environment. + * The Installations SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1418,7 +1418,7 @@ declare namespace firebase.app { * Gets the {@link firebase.messaging.Messaging `Messaging`} service for the * current app. * - * This does not work in a Node.js environment. + * The Messaging SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1490,7 +1490,7 @@ declare namespace firebase.app { * Gets the {@link firebase.performance.Performance `Performance`} service for the * current app. If the current app is not the default one, throws an error. * - * This does not work in a Node.js environment. + * The Performance SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1503,7 +1503,7 @@ declare namespace firebase.app { /** * Gets the {@link firebase.remoteConfig.RemoteConfig `RemoteConfig`} instance. * - * This does not work in a Node.js environment. + * The Remote Config SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1517,7 +1517,7 @@ declare namespace firebase.app { * Gets the {@link firebase.analytics.Analytics `Analytics`} service for the * current app. If the current app is not the default one, throws an error. * - * This does not work in a Node.js environment. + * The Analytics SDK does not work in a Node.js environment. * * @example * ```javascript @@ -1532,7 +1532,9 @@ declare namespace firebase.app { } /** - * This does not work in a Node.js environment. + * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or + * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use + * `CustomProvider` and write your own attestation method. */ declare namespace firebase.appCheck { /** @@ -1696,7 +1698,7 @@ declare namespace firebase.appCheck { } /** - * This does not work in a Node.js environment. + * The Installations SDK does not work in a Node.js environment. */ declare namespace firebase.installations { /** @@ -1745,7 +1747,7 @@ declare namespace firebase.installations { } /** - * This does not work in a Node.js environment. + * The Performance SDK does not work in a Node.js environment. */ declare namespace firebase.performance { /** @@ -1868,7 +1870,7 @@ declare namespace firebase.performance { } /** - * This does not work in a Node.js environment. + * The Remote Config SDK does not work in a Node.js environment. */ declare namespace firebase.remoteConfig { /** @@ -2670,7 +2672,7 @@ declare namespace firebase.auth { * Firebase console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -3350,7 +3352,7 @@ declare namespace firebase.auth { * console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @example * ```javascript @@ -3413,7 +3415,7 @@ declare namespace firebase.auth { * console. * * - * This does not work in a Node.js environment. + * This method does not work in a Node.js environment. * * @param provider The provider to authenticate. * The provider has to be an OAuth provider. Non-OAuth providers like {@link @@ -4628,7 +4630,7 @@ declare namespace firebase.auth { * An {@link https://www.google.com/recaptcha/ reCAPTCHA}-based application * verifier. * - * This does not work in a Node.js environment. + * This class does not work in a Node.js environment. * * @param container The reCAPTCHA container parameter. This * has different meaning depending on whether the reCAPTCHA is hidden or @@ -4775,7 +4777,7 @@ declare namespace firebase.auth { } /** - * This does not work in a Node.js environment. + * The Analytics SDK does not work in a Node.js environment. */ declare namespace firebase.analytics { /** @@ -7435,7 +7437,7 @@ declare namespace firebase.database.ServerValue { } /** - * This does not work in a Node.js environment. + * The Messaging SDK does not work in a Node.js environment. */ declare namespace firebase.messaging { /** @@ -8326,7 +8328,7 @@ declare namespace firebase.firestore { * work around a specific network reliability issue, please tell us about * it in https://github.com/firebase/firebase-js-sdk/issues/1674. * - * This does not work in a Node.js environment. + * This setting does not work in a Node.js environment. */ experimentalForceLongPolling?: boolean; @@ -8338,7 +8340,7 @@ declare namespace firebase.firestore { * This setting will likely be enabled by default in future releases and cannot be * combined with `experimentalForceLongPolling`. * - * This does not work in a Node.js environment. + * This setting does not work in a Node.js environment. */ experimentalAutoDetectLongPolling?: boolean; From 072af17383cc3e004a87805c192de32692574b8d Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Wed, 17 May 2023 09:36:12 -0700 Subject: [PATCH 10/13] generate docs --- docs-devsite/auth.md | 2 ++ docs-devsite/firestore_.firestoresettings.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs-devsite/auth.md b/docs-devsite/auth.md index 5dc3105f992..9d5a9a9ab58 100644 --- a/docs-devsite/auth.md +++ b/docs-devsite/auth.md @@ -499,6 +499,8 @@ If initializeRecaptchaConfig() is not invoked, the auth flow will always start w Thus, by calling this optional method, you will reduce the latency of future auth flows. Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA. +This method does not work in a Node.js environment. + Signature: ```typescript diff --git a/docs-devsite/firestore_.firestoresettings.md b/docs-devsite/firestore_.firestoresettings.md index 8465fec08c4..4452e373a6b 100644 --- a/docs-devsite/firestore_.firestoresettings.md +++ b/docs-devsite/firestore_.firestoresettings.md @@ -23,7 +23,7 @@ export declare interface FirestoreSettings | Property | Type | Description | | --- | --- | --- | | [cacheSizeBytes](./firestore_.firestoresettings.md#firestoresettingscachesizebytes) | number | NOTE: This field will be deprecated in a future major release. Use cache field instead to specify cache size, and other cache configurations.An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The size is not a guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to CACHE_SIZE_UNLIMITED to disable garbage collection. | -| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to experimentalForceLongPolling, but only uses long-polling if required.This setting will likely be enabled by default in future releases and cannot be combined with experimentalForceLongPolling.This setting cannot be used in a Node.js environment. | +| [experimentalAutoDetectLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalautodetectlongpolling) | boolean | Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to experimentalForceLongPolling, but only uses long-polling if required.After having had a default value of false since its inception in 2019, the default value of this setting was changed in mid-2023 to true. That is, auto-detection of long polling is now enabled by default. To disable it, set this setting to false, and please open a GitHub issue to share the problems that motivated you disabling long-polling auto-detection.This setting cannot be used in a Node.js environment. | | [experimentalForceLongPolling](./firestore_.firestoresettings.md#firestoresettingsexperimentalforcelongpolling) | boolean | Forces the SDK’s underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.This setting cannot be used with experimentalAutoDetectLongPolling and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674.This setting cannot be used in a Node.js environment. | | [experimentalLongPollingOptions](./firestore_.firestoresettings.md#firestoresettingsexperimentallongpollingoptions) | [ExperimentalLongPollingOptions](./firestore_.experimentallongpollingoptions.md#experimentallongpollingoptions_interface) | Options that configure the SDK’s underlying network transport (WebChannel) when long-polling is used.These options are only used if experimentalForceLongPolling is true or if experimentalAutoDetectLongPolling is true and the auto-detection determined that long-polling was needed. Otherwise, these options have no effect. | | [host](./firestore_.firestoresettings.md#firestoresettingshost) | string | The hostname to connect to. | From 130bd2f25c62dc8b5d566e6fde17881248dfe4fe Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Mon, 15 May 2023 14:15:40 -0600 Subject: [PATCH 11/13] Comments for persistence and persistance cache features, which cannot be used in Node.js environments. --- packages/firestore/src/api/cache_config.ts | 4 ++++ packages/firestore/src/api/database.ts | 2 ++ packages/firestore/src/api/settings.ts | 2 ++ 3 files changed, 8 insertions(+) diff --git a/packages/firestore/src/api/cache_config.ts b/packages/firestore/src/api/cache_config.ts index 57579d096a3..9d50568da83 100644 --- a/packages/firestore/src/api/cache_config.ts +++ b/packages/firestore/src/api/cache_config.ts @@ -248,6 +248,8 @@ export function memoryLocalCache( /** * An settings object to configure an `PersistentLocalCache` instance. + * + * Persistent cache cannot be used in a Node.js environment. */ export type PersistentCacheSettings = { /** @@ -271,6 +273,8 @@ export type PersistentCacheSettings = { /** * Creates an instance of `PersistentLocalCache`. The instance can be set to * `FirestoreSettings.cache` to tell the SDK which cache layer to use. + * + * Persistent cache cannot be used in a Node.js environment. */ export function persistentLocalCache( settings?: PersistentCacheSettings diff --git a/packages/firestore/src/api/database.ts b/packages/firestore/src/api/database.ts index 93aab4880d9..311e665e048 100644 --- a/packages/firestore/src/api/database.ts +++ b/packages/firestore/src/api/database.ts @@ -320,6 +320,8 @@ export function configureFirestore(firestore: Firestore): void { * * unimplemented: The browser is incompatible with the offline * persistence implementation. * + * Persistence cannot be used in a Node.js environment. + * * @param firestore - The {@link Firestore} instance to enable persistence for. * @param persistenceSettings - Optional settings object to configure * persistence. diff --git a/packages/firestore/src/api/settings.ts b/packages/firestore/src/api/settings.ts index 2f232052cd1..cb043c03861 100644 --- a/packages/firestore/src/api/settings.ts +++ b/packages/firestore/src/api/settings.ts @@ -25,6 +25,8 @@ export { DEFAULT_HOST } from '../lite-api/settings'; /** * Settings that can be passed to `enableIndexedDbPersistence()` to configure * Firestore persistence. + * + * Persistence cannot be used in a Node.js environment. */ export interface PersistenceSettings { /** From f1ce838e299f64e808b1bbc4df1acc3f3b8f1adc Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 18 May 2023 16:07:18 -0700 Subject: [PATCH 12/13] run docgen on firestore --- docs-devsite/firestore_.md | 12 ++++++++---- docs-devsite/firestore_.persistencesettings.md | 2 ++ docs-devsite/firestore_.persistentcachesettings.md | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs-devsite/firestore_.md b/docs-devsite/firestore_.md index c38b6bb8407..41b85f1f3eb 100644 --- a/docs-devsite/firestore_.md +++ b/docs-devsite/firestore_.md @@ -25,7 +25,7 @@ https://github.com/firebase/firebase-js-sdk | [connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator) | Modify this instance to communicate with the Cloud Firestore emulator.Note: This must be called before this instance has been used to do any operations. | | [disableNetwork(firestore)](./firestore_.md#disablenetwork) | Disables network usage for this instance. It can be re-enabled via [enableNetwork()](./firestore_.md#enablenetwork). While the network is disabled, any snapshot listeners, getDoc() or getDocs() calls will return results from cache, and any write operations will be queued until the network is restored. | | [doc(firestore, path, pathSegments)](./firestore_.md#doc) | Gets a DocumentReference instance that refers to the document at the specified absolute path. | -| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence) | Attempts to enable persistent storage, if possible.Must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore), [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence).If this fails, enableIndexedDbPersistence() will reject the promise it returns. Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.There are several reasons why this can fail, which can be identified by the code on the error.\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation. | +| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence) | Attempts to enable persistent storage, if possible.Must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore), [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence).If this fails, enableIndexedDbPersistence() will reject the promise it returns. Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.There are several reasons why this can fail, which can be identified by the code on the error.\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.Persistence cannot be used in a Node.js environment. | | [enableMultiTabIndexedDbPersistence(firestore)](./firestore_.md#enablemultitabindexeddbpersistence) | Attempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.If this fails, enableMultiTabIndexedDbPersistence() will reject the promise it returns. Note that even after this failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.There are several reasons why this can fail, which can be identified by the code on the error.\* failed-precondition: The app is already open in another browser tab and multi-tab is not enabled. \* unimplemented: The browser is incompatible with the offline persistence implementation. | | [enableNetwork(firestore)](./firestore_.md#enablenetwork) | Re-enables use of the network for this [Firestore](./firestore_.firestore.md#firestore_class) instance after a prior call to [disableNetwork()](./firestore_.md#disablenetwork). | | [loadBundle(firestore, bundleData)](./firestore_.md#loadbundle) | Loads a Firestore bundle into the local cache. | @@ -103,7 +103,7 @@ https://github.com/firebase/firebase-js-sdk | function(settings...) | | [memoryLocalCache(settings)](./firestore_.md#memorylocalcache) | Creates an instance of MemoryLocalCache. The instance can be set to FirestoreSettings.cache to tell the SDK which cache layer to use. | | [memoryLruGarbageCollector(settings)](./firestore_.md#memorylrugarbagecollector) | Creates an instance of MemoryLruGarbageCollector.A target size can be specified as part of the setting parameter. The collector will start deleting documents once the cache size exceeds the given size. The default cache size is 40MB (40 \* 1024 \* 1024 bytes). | -| [persistentLocalCache(settings)](./firestore_.md#persistentlocalcache) | Creates an instance of PersistentLocalCache. The instance can be set to FirestoreSettings.cache to tell the SDK which cache layer to use. | +| [persistentLocalCache(settings)](./firestore_.md#persistentlocalcache) | Creates an instance of PersistentLocalCache. The instance can be set to FirestoreSettings.cache to tell the SDK which cache layer to use.Persistent cache cannot be used in a Node.js environment. | | [persistentSingleTabManager(settings)](./firestore_.md#persistentsingletabmanager) | Creates an instance of PersistentSingleTabManager. | | function(snapshot...) | | [endAt(snapshot)](./firestore_.md#endat) | Creates a [QueryEndAtConstraint](./firestore_.queryendatconstraint.md#queryendatconstraint_class) that modifies the result set to end at the provided document (inclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of the query. | @@ -160,8 +160,8 @@ https://github.com/firebase/firebase-js-sdk | [MemoryEagerGarbageCollector](./firestore_.memoryeagergarbagecollector.md#memoryeagergarbagecollector_interface) | A garbage collector deletes documents whenever they are not part of any active queries, and have no local mutations attached to them.This collector tries to ensure lowest memory footprints from the SDK, at the risk of documents not being cached for offline queries or for direct queries to the cache.Use factory function to create an instance of this collector. | | [MemoryLocalCache](./firestore_.memorylocalcache.md#memorylocalcache_interface) | Provides an in-memory cache to the SDK. This is the default cache unless explicitly configured otherwise.To use, create an instance using the factory function , then set the instance to FirestoreSettings.cache and call initializeFirestore using the settings object. | | [MemoryLruGarbageCollector](./firestore_.memorylrugarbagecollector.md#memorylrugarbagecollector_interface) | A garbage collector deletes Least-Recently-Used documents in multiple batches.This collector is configured with a target size, and will only perform collection when the cached documents exceed the target size. It avoids querying backend repeated for the same query or document, at the risk of having a larger memory footprint.Use factory function to create a instance of this collector. | -| [PersistenceSettings](./firestore_.persistencesettings.md#persistencesettings_interface) | Settings that can be passed to enableIndexedDbPersistence() to configure Firestore persistence. | -| [PersistentCacheSettings](./firestore_.persistentcachesettings.md#persistentcachesettings_interface) | An settings object to configure an PersistentLocalCache instance. | +| [PersistenceSettings](./firestore_.persistencesettings.md#persistencesettings_interface) | Settings that can be passed to enableIndexedDbPersistence() to configure Firestore persistence.Persistence cannot be used in a Node.js environment. | +| [PersistentCacheSettings](./firestore_.persistentcachesettings.md#persistentcachesettings_interface) | An settings object to configure an PersistentLocalCache instance.Persistent cache cannot be used in a Node.js environment. | | [PersistentLocalCache](./firestore_.persistentlocalcache.md#persistentlocalcache_interface) | Provides a persistent cache backed by IndexedDb to the SDK.To use, create an instance using the factory function , then set the instance to FirestoreSettings.cache and call initializeFirestore using the settings object. | | [PersistentMultipleTabManager](./firestore_.persistentmultipletabmanager.md#persistentmultipletabmanager_interface) | A tab manager supporting multiple tabs. SDK will synchronize queries and mutations done across all tabs using the SDK. | | [PersistentSingleTabManager](./firestore_.persistentsingletabmanager.md#persistentsingletabmanager_interface) | A tab manager supportting only one tab, no synchronization will be performed across tabs. | @@ -421,6 +421,8 @@ There are several reasons why this can fail, which can be identified by the `cod \* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation. +Persistence cannot be used in a Node.js environment. + Signature: ```typescript @@ -2009,6 +2011,8 @@ export declare function memoryLruGarbageCollector(settings?: { Creates an instance of `PersistentLocalCache`. The instance can be set to `FirestoreSettings.cache` to tell the SDK which cache layer to use. +Persistent cache cannot be used in a Node.js environment. + Signature: ```typescript diff --git a/docs-devsite/firestore_.persistencesettings.md b/docs-devsite/firestore_.persistencesettings.md index c84cde1ed13..1a8fb2ac49c 100644 --- a/docs-devsite/firestore_.persistencesettings.md +++ b/docs-devsite/firestore_.persistencesettings.md @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk # PersistenceSettings interface Settings that can be passed to `enableIndexedDbPersistence()` to configure Firestore persistence. +Persistence cannot be used in a Node.js environment. + Signature: ```typescript diff --git a/docs-devsite/firestore_.persistentcachesettings.md b/docs-devsite/firestore_.persistentcachesettings.md index dd491918894..a32d05e4e8e 100644 --- a/docs-devsite/firestore_.persistentcachesettings.md +++ b/docs-devsite/firestore_.persistentcachesettings.md @@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk # PersistentCacheSettings interface An settings object to configure an `PersistentLocalCache` instance. +Persistent cache cannot be used in a Node.js environment. + Signature: ```typescript From a7124e2d87e993b349e27c7942424b60c51a787e Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Mon, 22 May 2023 11:44:57 -0700 Subject: [PATCH 13/13] format --- packages/auth/src/core/index.ts | 2 +- packages/firestore/src/api/settings.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/auth/src/core/index.ts b/packages/auth/src/core/index.ts index 2cdb6d3b50c..e39dbab52fb 100644 --- a/packages/auth/src/core/index.ts +++ b/packages/auth/src/core/index.ts @@ -81,7 +81,7 @@ export function setPersistence( * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA. * * This method does not work in a Node.js environment. - * + * * @example * ```javascript * initializeRecaptchaConfig(auth); diff --git a/packages/firestore/src/api/settings.ts b/packages/firestore/src/api/settings.ts index c18bb0547d2..40c0df79fa2 100644 --- a/packages/firestore/src/api/settings.ts +++ b/packages/firestore/src/api/settings.ts @@ -99,7 +99,7 @@ export interface FirestoreSettings extends LiteSettings { * polling is now enabled by default. To disable it, set this setting to * `false`, and please open a GitHub issue to share the problems that * motivated you disabling long-polling auto-detection. - * + * * This setting cannot be used in a Node.js environment. */ experimentalAutoDetectLongPolling?: boolean;