@firebase/util 1.9.7-dataconnect-preview.d986d4bf2 → 1.10.0-20240916151535
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -58
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm2017.js +10 -58
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +10 -61
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +10 -61
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +0 -1
- package/dist/node-esm/index.d.ts +0 -1
- package/dist/node-esm/index.node.d.ts +0 -1
- package/dist/node-esm/index.node.esm.js +10 -58
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/environment.d.ts +6 -2
- package/dist/src/environment.d.ts +6 -2
- package/dist/util-public.d.ts +7 -28
- package/dist/util.d.ts +7 -28
- package/package.json +2 -2
- package/dist/node-esm/src/fetch_provider.d.ts +0 -25
- package/dist/src/fetch_provider.d.ts +0 -25
package/dist/index.d.ts
CHANGED
package/dist/index.esm2017.js
CHANGED
|
@@ -775,7 +775,7 @@ function isNode() {
|
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
/**
|
|
778
|
-
* Detect Browser Environment
|
|
778
|
+
* Detect Browser Environment.
|
|
779
779
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
780
780
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
781
781
|
* available.
|
|
@@ -784,13 +784,20 @@ function isBrowser() {
|
|
|
784
784
|
return typeof window !== 'undefined' || isWebWorker();
|
|
785
785
|
}
|
|
786
786
|
/**
|
|
787
|
-
* Detect Web Worker context
|
|
787
|
+
* Detect Web Worker context.
|
|
788
788
|
*/
|
|
789
789
|
function isWebWorker() {
|
|
790
790
|
return (typeof WorkerGlobalScope !== 'undefined' &&
|
|
791
791
|
typeof self !== 'undefined' &&
|
|
792
792
|
self instanceof WorkerGlobalScope);
|
|
793
793
|
}
|
|
794
|
+
/**
|
|
795
|
+
* Detect Cloudflare Worker context.
|
|
796
|
+
*/
|
|
797
|
+
function isCloudflareWorker() {
|
|
798
|
+
return (typeof navigator !== 'undefined' &&
|
|
799
|
+
navigator.userAgent === 'Cloudflare-Workers');
|
|
800
|
+
}
|
|
794
801
|
function isBrowserExtension() {
|
|
795
802
|
const runtime = typeof chrome === 'object'
|
|
796
803
|
? chrome.runtime
|
|
@@ -2120,60 +2127,5 @@ function getModularInstance(service) {
|
|
|
2120
2127
|
}
|
|
2121
2128
|
}
|
|
2122
2129
|
|
|
2123
|
-
|
|
2124
|
-
* @license
|
|
2125
|
-
* Copyright 2023 Google LLC
|
|
2126
|
-
*
|
|
2127
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2128
|
-
* you may not use this file except in compliance with the License.
|
|
2129
|
-
* You may obtain a copy of the License at
|
|
2130
|
-
*
|
|
2131
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2132
|
-
*
|
|
2133
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2134
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2135
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2136
|
-
* See the License for the specific language governing permissions and
|
|
2137
|
-
* limitations under the License.
|
|
2138
|
-
*/
|
|
2139
|
-
class FetchProvider {
|
|
2140
|
-
static initialize(fetchImpl, headersImpl, responseImpl) {
|
|
2141
|
-
this.fetchImpl = fetchImpl;
|
|
2142
|
-
if (headersImpl) {
|
|
2143
|
-
this.headersImpl = headersImpl;
|
|
2144
|
-
}
|
|
2145
|
-
if (responseImpl) {
|
|
2146
|
-
this.responseImpl = responseImpl;
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
static fetch() {
|
|
2150
|
-
if (this.fetchImpl) {
|
|
2151
|
-
return this.fetchImpl;
|
|
2152
|
-
}
|
|
2153
|
-
if (typeof self !== 'undefined' && 'fetch' in self) {
|
|
2154
|
-
return self.fetch;
|
|
2155
|
-
}
|
|
2156
|
-
throw new Error('Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');
|
|
2157
|
-
}
|
|
2158
|
-
static headers() {
|
|
2159
|
-
if (this.headersImpl) {
|
|
2160
|
-
return this.headersImpl;
|
|
2161
|
-
}
|
|
2162
|
-
if (typeof self !== 'undefined' && 'Headers' in self) {
|
|
2163
|
-
return self.Headers;
|
|
2164
|
-
}
|
|
2165
|
-
throw new Error('Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');
|
|
2166
|
-
}
|
|
2167
|
-
static response() {
|
|
2168
|
-
if (this.responseImpl) {
|
|
2169
|
-
return this.responseImpl;
|
|
2170
|
-
}
|
|
2171
|
-
if (typeof self !== 'undefined' && 'Response' in self) {
|
|
2172
|
-
return self.Response;
|
|
2173
|
-
}
|
|
2174
|
-
throw new Error('Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
export { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FetchProvider, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
|
|
2130
|
+
export { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isCloudflareWorker, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
|
|
2179
2131
|
//# sourceMappingURL=index.esm2017.js.map
|