@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.
- package/dist/index.cjs.js +37 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm2017.js +36 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +37 -0
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +1 -0
- package/dist/node-esm/index.d.ts +1 -0
- package/dist/node-esm/index.node.d.ts +1 -0
- package/dist/node-esm/index.node.esm.js +36 -1
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/url.d.ts +27 -0
- package/dist/src/url.d.ts +27 -0
- package/dist/util-public.d.ts +29 -0
- package/dist/util.d.ts +29 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2109,6 +2109,41 @@ function getModularInstance(service) {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
2111
|
|
|
2112
|
+
/**
|
|
2113
|
+
* @license
|
|
2114
|
+
* Copyright 2025 Google LLC
|
|
2115
|
+
*
|
|
2116
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2117
|
+
* you may not use this file except in compliance with the License.
|
|
2118
|
+
* You may obtain a copy of the License at
|
|
2119
|
+
*
|
|
2120
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2121
|
+
*
|
|
2122
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2123
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2124
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2125
|
+
* See the License for the specific language governing permissions and
|
|
2126
|
+
* limitations under the License.
|
|
2127
|
+
*/
|
|
2128
|
+
/**
|
|
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
|
|
2139
|
+
*/
|
|
2140
|
+
async function pingServer(endpoint) {
|
|
2141
|
+
const result = await fetch(endpoint, {
|
|
2142
|
+
credentials: 'include'
|
|
2143
|
+
});
|
|
2144
|
+
return result.ok;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2112
2147
|
exports.CONSTANTS = CONSTANTS;
|
|
2113
2148
|
exports.DecodeBase64StringError = DecodeBase64StringError;
|
|
2114
2149
|
exports.Deferred = Deferred;
|
|
@@ -2146,6 +2181,7 @@ exports.getUA = getUA;
|
|
|
2146
2181
|
exports.isAdmin = isAdmin;
|
|
2147
2182
|
exports.isBrowser = isBrowser;
|
|
2148
2183
|
exports.isBrowserExtension = isBrowserExtension;
|
|
2184
|
+
exports.isCloudWorkstation = isCloudWorkstation;
|
|
2149
2185
|
exports.isCloudflareWorker = isCloudflareWorker;
|
|
2150
2186
|
exports.isElectron = isElectron;
|
|
2151
2187
|
exports.isEmpty = isEmpty;
|
|
@@ -2164,6 +2200,7 @@ exports.issuedAtTime = issuedAtTime;
|
|
|
2164
2200
|
exports.jsonEval = jsonEval;
|
|
2165
2201
|
exports.map = map;
|
|
2166
2202
|
exports.ordinal = ordinal;
|
|
2203
|
+
exports.pingServer = pingServer;
|
|
2167
2204
|
exports.promiseWithTimeout = promiseWithTimeout;
|
|
2168
2205
|
exports.querystring = querystring;
|
|
2169
2206
|
exports.querystringDecode = querystringDecode;
|