@firebase/util 1.11.0-auth-redirect-credentials.b424e5897 → 1.11.0-canary.080a90dcc

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.
@@ -2126,10 +2126,22 @@ function getModularInstance(service) {
2126
2126
  * limitations under the License.
2127
2127
  */
2128
2128
  /**
2129
- * Checks whether a host url is a cloud workstation.
2129
+ * Checks whether host is a cloud workstation or not.
2130
+ * @public
2131
+ */
2132
+ function isCloudWorkstation(host) {
2133
+ return host.endsWith('.cloudworkstations.dev');
2134
+ }
2135
+ /**
2136
+ * Makes a fetch request to the given server.
2137
+ * Mostly used for forwarding cookies in Firebase Studio.
2138
+ * @public
2130
2139
  */
2131
- function isCloudWorkstation(url) {
2132
- return url.endsWith('.cloudworkstations.dev');
2140
+ async function pingServer(endpoint) {
2141
+ const result = await fetch(endpoint, {
2142
+ credentials: 'include'
2143
+ });
2144
+ return result.ok;
2133
2145
  }
2134
2146
 
2135
2147
  /**
@@ -2207,6 +2219,7 @@ exports.issuedAtTime = issuedAtTime;
2207
2219
  exports.jsonEval = jsonEval;
2208
2220
  exports.map = map;
2209
2221
  exports.ordinal = ordinal;
2222
+ exports.pingServer = pingServer;
2210
2223
  exports.promiseWithTimeout = promiseWithTimeout;
2211
2224
  exports.querystring = querystring;
2212
2225
  exports.querystringDecode = querystringDecode;