diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-16 19:08:29 +0800 |
| commit | 434aa8343fdcbb4d5002f934979913c099489bee (patch) | |
| tree | 55bab4ec5a6151be57797d34f61faf5ea744471b /frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client | |
| parent | 893c388d4e99442a36005e5971a87730623f946e (diff) | |
sdk, del
Diffstat (limited to 'frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client')
7 files changed, 0 insertions, 444 deletions
diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/caching_client.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/caching_client.d.ts deleted file mode 100644 index c05bd5f..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/caching_client.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { StorageCache } from '../storage/storage_cache'; -import { FetchResponse } from '../public_types'; -import { RemoteConfigFetchClient, FetchRequest } from './remote_config_fetch_client'; -import { Storage } from '../storage/storage'; -import { Logger } from '@firebase/logger'; -/** - * Implements the {@link RemoteConfigClient} abstraction with success response caching. - * - * <p>Comparable to the browser's Cache API for responses, but the Cache API requires a Service - * Worker, which requires HTTPS, which would significantly complicate SDK installation. Also, the - * Cache API doesn't support matching entries by time. - */ -export declare class CachingClient implements RemoteConfigFetchClient { - private readonly client; - private readonly storage; - private readonly storageCache; - private readonly logger; - constructor(client: RemoteConfigFetchClient, storage: Storage, storageCache: StorageCache, logger: Logger); - /** - * Returns true if the age of the cached fetched configs is less than or equal to - * {@link Settings#minimumFetchIntervalInSeconds}. - * - * <p>This is comparable to passing `headers = { 'Cache-Control': max-age <maxAge> }` to the - * native Fetch API. - * - * <p>Visible for testing. - */ - isCachedDataFresh(cacheMaxAgeMillis: number, lastSuccessfulFetchTimestampMillis: number | undefined): boolean; - fetch(request: FetchRequest): Promise<FetchResponse>; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/eventEmitter.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/eventEmitter.d.ts deleted file mode 100644 index 2f8b9cc..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/eventEmitter.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Base class to be used if you want to emit events. Call the constructor with - * the set of allowed event names. - */ -export declare abstract class EventEmitter { - private allowedEvents_; - private listeners_; - constructor(allowedEvents_: string[]); - /** - * To be overridden by derived classes in order to fire an initial event when - * somebody subscribes for data. - * - * @returns {Array.<*>} Array of parameters to trigger initial event with. - */ - abstract getInitialEvent(eventType: string): unknown[]; - /** - * To be called by derived classes to trigger events. - */ - protected trigger(eventType: string, ...varArgs: unknown[]): void; - on(eventType: string, callback: (a: unknown) => void, context: unknown): void; - off(eventType: string, callback: (a: unknown) => void, context: unknown): void; - private validateEventType_; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/realtime_handler.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/realtime_handler.d.ts deleted file mode 100644 index 3fa7c87..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/realtime_handler.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { _FirebaseInstallationsInternal } from '@firebase/installations'; -import { Logger } from '@firebase/logger'; -import { ConfigUpdateObserver } from '../public_types'; -import { Storage } from '../storage/storage'; -import { StorageCache } from '../storage/storage_cache'; -import { CachingClient } from './caching_client'; -export declare class RealtimeHandler { - private readonly firebaseInstallations; - private readonly storage; - private readonly sdkVersion; - private readonly namespace; - private readonly projectId; - private readonly apiKey; - private readonly appId; - private readonly logger; - private readonly storageCache; - private readonly cachingClient; - constructor(firebaseInstallations: _FirebaseInstallationsInternal, storage: Storage, sdkVersion: string, namespace: string, projectId: string, apiKey: string, appId: string, logger: Logger, storageCache: StorageCache, cachingClient: CachingClient); - private observers; - private isConnectionActive; - private isRealtimeDisabled; - private controller?; - private reader; - private httpRetriesRemaining; - private isInBackground; - private readonly decoder; - private isClosingConnection; - private setRetriesRemaining; - private propagateError; - /** - * Increment the number of failed stream attempts, increase the backoff duration, set the backoff - * end time to "backoff duration" after `lastFailedStreamTime` and persist the new - * values to storage metadata. - */ - private updateBackoffMetadataWithLastFailedStreamConnectionTime; - /** - * Increase the backoff duration with a new end time based on Retry Interval. - */ - private updateBackoffMetadataWithRetryInterval; - /** - * HTTP status code that the Realtime client should retry on. - */ - private isStatusCodeRetryable; - /** - * Closes the realtime HTTP connection. - * Note: This method is designed to be called only once at a time. - * If a call is already in progress, subsequent calls will be ignored. - */ - private closeRealtimeHttpConnection; - private resetRealtimeBackoff; - private resetRetryCount; - /** - * Assembles the request headers and body and executes the fetch request to - * establish the real-time streaming connection. This is the "worker" method - * that performs the actual network communication. - */ - private establishRealtimeConnection; - private getRealtimeUrl; - private createRealtimeConnection; - /** - * Retries HTTP stream connection asyncly in random time intervals. - */ - private retryHttpConnectionWhenBackoffEnds; - private setIsHttpConnectionRunning; - /** - * Combines the check and set operations to prevent multiple asynchronous - * calls from redundantly starting an HTTP connection. This ensures that - * only one attempt is made at a time. - */ - private checkAndSetHttpConnectionFlagIfNotRunning; - private fetchResponseIsUpToDate; - private parseAndValidateConfigUpdateMessage; - private isEventListenersEmpty; - private getRandomInt; - private executeAllListenerCallbacks; - /** - * Compares two configuration objects and returns a set of keys that have changed. - * A key is considered changed if it's new, removed, or has a different value. - */ - private getChangedParams; - private fetchLatestConfig; - private autoFetch; - /** - * Processes a stream of real-time messages for configuration updates. - * This method reassembles fragmented messages, validates and parses the JSON, - * and automatically fetches a new config if a newer template version is available. - * It also handles server-specified retry intervals and propagates errors for - * invalid messages or when real-time updates are disabled. - */ - private handleNotifications; - private listenForNotifications; - /** - * Open the real-time connection, begin listening for updates, and auto-fetch when an update is - * received. - * - * If the connection is successful, this method will block on its thread while it reads the - * chunk-encoded HTTP body. When the connection closes, it attempts to reestablish the stream. - */ - private prepareAndBeginRealtimeHttpStream; - /** - * Checks whether connection can be made or not based on some conditions - * @returns booelean - */ - private canEstablishStreamConnection; - private makeRealtimeHttpConnection; - private beginRealtime; - /** - * Adds an observer to the realtime updates. - * @param observer The observer to add. - */ - addObserver(observer: ConfigUpdateObserver): void; - /** - * Removes an observer from the realtime updates. - * @param observer The observer to remove. - */ - removeObserver(observer: ConfigUpdateObserver): void; - /** - * Handles changes to the application's visibility state, managing the real-time connection. - * - * When the application is moved to the background, this method closes the existing - * real-time connection to save resources. When the application returns to the - * foreground, it attempts to re-establish the connection. - */ - private onVisibilityChange; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/remote_config_fetch_client.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/remote_config_fetch_client.d.ts deleted file mode 100644 index e72ce51..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/remote_config_fetch_client.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CustomSignals, FetchResponse, FetchType } from '../public_types'; -/** - * Defines a client, as in https://en.wikipedia.org/wiki/Client%E2%80%93server_model, for the - * Remote Config server (https://firebase.google.com/docs/reference/remote-config/rest). - * - * <p>Abstracts throttle, response cache and network implementation details. - * - * <p>Modeled after the native {@link GlobalFetch} interface, which is relatively modern and - * convenient, but simplified for Remote Config's use case. - * - * Disambiguation: {@link GlobalFetch} interface and the Remote Config service define "fetch" - * methods. The RestClient uses the former to make HTTP calls. This interface abstracts the latter. - */ -export interface RemoteConfigFetchClient { - /** - * @throws if response status is not 200 or 304. - */ - fetch(request: FetchRequest): Promise<FetchResponse>; -} -/** - * Shims a minimal AbortSignal. - * - * <p>AbortController's AbortSignal conveniently decouples fetch timeout logic from other aspects - * of networking, such as retries. Firebase doesn't use AbortController enough to justify a - * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be - * swapped out if/when we do. - */ -export declare class RemoteConfigAbortSignal { - listeners: Array<() => void>; - addEventListener(listener: () => void): void; - abort(): void; -} -/** - * Defines per-request inputs for the Remote Config fetch request. - * - * <p>Modeled after the native {@link Request} interface, but simplified for Remote Config's - * use case. - */ -export interface FetchRequest { - /** - * Uses cached config if it is younger than this age. - * - * <p>Required because it's defined by settings, which always have a value. - * - * <p>Comparable to passing `headers = { 'Cache-Control': max-age <maxAge> }` to the native - * Fetch API. - */ - cacheMaxAgeMillis: number; - /** - * An event bus for the signal to abort a request. - * - * <p>Required because all requests should be abortable. - * - * <p>Comparable to the native - * Fetch API's "signal" field on its request configuration object - * https://fetch.spec.whatwg.org/#dom-requestinit-signal. - * - * <p>Disambiguation: Remote Config commonly refers to API inputs as - * "signals". See the private ConfigFetchRequestBody interface for those: - * http://google3/firebase/remote_config/web/src/core/rest_client.ts?l=14&rcl=255515243. - */ - signal: RemoteConfigAbortSignal; - /** - * The ETag header value from the last response. - * - * <p>Optional in case this is the first request. - * - * <p>Comparable to passing `headers = { 'If-None-Match': <eTag> }` to the native Fetch API. - */ - eTag?: string; - /** The custom signals stored for the app instance. - * - * <p>Optional in case no custom signals are set for the instance. - */ - customSignals?: CustomSignals; - /** - * The type of fetch to perform, such as a regular fetch or a real-time fetch. - * - * Optional as not all fetch requests need to be distinguished. - */ - fetchType?: FetchType; - /** - * The number of fetch attempts made so far for this request. - * - * Optional as not all fetch requests are part of a retry series. - */ - fetchAttempt?: number; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/rest_client.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/rest_client.d.ts deleted file mode 100644 index 24a3fe0..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/rest_client.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { FetchResponse } from '../public_types'; -import { RemoteConfigFetchClient, FetchRequest } from './remote_config_fetch_client'; -import { _FirebaseInstallationsInternal } from '@firebase/installations'; -/** - * Implements the Client abstraction for the Remote Config REST API. - */ -export declare class RestClient implements RemoteConfigFetchClient { - private readonly firebaseInstallations; - private readonly sdkVersion; - private readonly namespace; - private readonly projectId; - private readonly apiKey; - private readonly appId; - constructor(firebaseInstallations: _FirebaseInstallationsInternal, sdkVersion: string, namespace: string, projectId: string, apiKey: string, appId: string); - /** - * Fetches from the Remote Config REST API. - * - * @throws a {@link ErrorCode.FETCH_NETWORK} error if {@link GlobalFetch#fetch} can't - * connect to the network. - * @throws a {@link ErrorCode.FETCH_PARSE} error if {@link Response#json} can't parse the - * fetch response. - * @throws a {@link ErrorCode.FETCH_STATUS} error if the service returns an HTTP error status. - */ - fetch(request: FetchRequest): Promise<FetchResponse>; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/retrying_client.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/retrying_client.d.ts deleted file mode 100644 index 06c7ff0..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/retrying_client.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @license - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { FetchResponse } from '../public_types'; -import { RemoteConfigAbortSignal, RemoteConfigFetchClient, FetchRequest } from './remote_config_fetch_client'; -import { ThrottleMetadata, Storage } from '../storage/storage'; -/** - * Supports waiting on a backoff by: - * - * <ul> - * <li>Promisifying setTimeout, so we can set a timeout in our Promise chain</li> - * <li>Listening on a signal bus for abort events, just like the Fetch API</li> - * <li>Failing in the same way the Fetch API fails, so timing out a live request and a throttled - * request appear the same.</li> - * </ul> - * - * <p>Visible for testing. - */ -export declare function setAbortableTimeout(signal: RemoteConfigAbortSignal, throttleEndTimeMillis: number): Promise<void>; -/** - * Decorates a Client with retry logic. - * - * <p>Comparable to CachingClient, but uses backoff logic instead of cache max age and doesn't cache - * responses (because the SDK has no use for error responses). - */ -export declare class RetryingClient implements RemoteConfigFetchClient { - private readonly client; - private readonly storage; - constructor(client: RemoteConfigFetchClient, storage: Storage); - fetch(request: FetchRequest): Promise<FetchResponse>; - /** - * A recursive helper for attempting a fetch request repeatedly. - * - * @throws any non-retriable errors. - */ - attemptFetch(request: FetchRequest, { throttleEndTimeMillis, backoffCount }: ThrottleMetadata): Promise<FetchResponse>; -} diff --git a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/visibility_monitor.d.ts b/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/visibility_monitor.d.ts deleted file mode 100644 index ef40083..0000000 --- a/frontend-old/node_modules/@firebase/remote-config/dist/esm/src/client/visibility_monitor.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { EventEmitter } from './eventEmitter'; -export declare class VisibilityMonitor extends EventEmitter { - private visible_; - static getInstance(): VisibilityMonitor; - constructor(); - getInitialEvent(eventType: string): boolean[]; -} |
