@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.
package/dist/index.cjs.js CHANGED
@@ -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
  exports.CONSTANTS = CONSTANTS;
@@ -2188,6 +2200,7 @@ exports.issuedAtTime = issuedAtTime;
2188
2200
  exports.jsonEval = jsonEval;
2189
2201
  exports.map = map;
2190
2202
  exports.ordinal = ordinal;
2203
+ exports.pingServer = pingServer;
2191
2204
  exports.promiseWithTimeout = promiseWithTimeout;
2192
2205
  exports.querystring = querystring;
2193
2206
  exports.querystringDecode = querystringDecode;