@firebase/util 1.11.0 → 1.11.1-20250505162014

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.
@@ -36,3 +36,4 @@ export * from './src/exponential_backoff';
36
36
  export * from './src/formatters';
37
37
  export * from './src/compat';
38
38
  export * from './src/global';
39
+ export * from './src/url';
@@ -36,3 +36,4 @@ export * from './src/exponential_backoff';
36
36
  export * from './src/formatters';
37
37
  export * from './src/compat';
38
38
  export * from './src/global';
39
+ export * from './src/url';
@@ -36,3 +36,4 @@ export * from './src/exponential_backoff';
36
36
  export * from './src/formatters';
37
37
  export * from './src/compat';
38
38
  export * from './src/global';
39
+ export * from './src/url';
@@ -2105,6 +2105,41 @@ function getModularInstance(service) {
2105
2105
  }
2106
2106
  }
2107
2107
 
2108
+ /**
2109
+ * @license
2110
+ * Copyright 2025 Google LLC
2111
+ *
2112
+ * Licensed under the Apache License, Version 2.0 (the "License");
2113
+ * you may not use this file except in compliance with the License.
2114
+ * You may obtain a copy of the License at
2115
+ *
2116
+ * http://www.apache.org/licenses/LICENSE-2.0
2117
+ *
2118
+ * Unless required by applicable law or agreed to in writing, software
2119
+ * distributed under the License is distributed on an "AS IS" BASIS,
2120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2121
+ * See the License for the specific language governing permissions and
2122
+ * limitations under the License.
2123
+ */
2124
+ /**
2125
+ * Checks whether host is a cloud workstation or not.
2126
+ * @public
2127
+ */
2128
+ function isCloudWorkstation(host) {
2129
+ return host.endsWith('.cloudworkstations.dev');
2130
+ }
2131
+ /**
2132
+ * Makes a fetch request to the given server.
2133
+ * Mostly used for forwarding cookies in Firebase Studio.
2134
+ * @public
2135
+ */
2136
+ async function pingServer(endpoint) {
2137
+ const result = await fetch(endpoint, {
2138
+ credentials: 'include'
2139
+ });
2140
+ return result.ok;
2141
+ }
2142
+
2108
2143
  /**
2109
2144
  * @license
2110
2145
  * Copyright 2017 Google LLC
@@ -2124,5 +2159,5 @@ function getModularInstance(service) {
2124
2159
  // Overriding the constant (we should be the only ones doing this)
2125
2160
  CONSTANTS.NODE_CLIENT = true;
2126
2161
 
2127
- 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, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
2162
+ 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, isCloudWorkstation, isCloudflareWorker, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, pingServer, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
2128
2163
  //# sourceMappingURL=index.node.esm.js.map