@firebase/util 1.11.0-canary.058afa280 → 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 +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.node.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
|
/**
|
|
2113
2148
|
* @license
|
|
2114
2149
|
* Copyright 2017 Google LLC
|
|
@@ -2165,6 +2200,7 @@ exports.getUA = getUA;
|
|
|
2165
2200
|
exports.isAdmin = isAdmin;
|
|
2166
2201
|
exports.isBrowser = isBrowser;
|
|
2167
2202
|
exports.isBrowserExtension = isBrowserExtension;
|
|
2203
|
+
exports.isCloudWorkstation = isCloudWorkstation;
|
|
2168
2204
|
exports.isCloudflareWorker = isCloudflareWorker;
|
|
2169
2205
|
exports.isElectron = isElectron;
|
|
2170
2206
|
exports.isEmpty = isEmpty;
|
|
@@ -2183,6 +2219,7 @@ exports.issuedAtTime = issuedAtTime;
|
|
|
2183
2219
|
exports.jsonEval = jsonEval;
|
|
2184
2220
|
exports.map = map;
|
|
2185
2221
|
exports.ordinal = ordinal;
|
|
2222
|
+
exports.pingServer = pingServer;
|
|
2186
2223
|
exports.promiseWithTimeout = promiseWithTimeout;
|
|
2187
2224
|
exports.querystring = querystring;
|
|
2188
2225
|
exports.querystringDecode = querystringDecode;
|