@firebase/util 1.7.0 → 1.7.1-20221010190246
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/CHANGELOG.md +6 -0
- package/dist/index.esm2017.js +1 -18
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +1 -18
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +1 -18
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +1 -18
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm5.js
CHANGED
|
@@ -649,30 +649,13 @@ var getDefaultsFromGlobal = function () {
|
|
|
649
649
|
* process.env.__FIREBASE_DEFAULTS_PATH__
|
|
650
650
|
*/
|
|
651
651
|
var getDefaultsFromEnvVariable = function () {
|
|
652
|
-
if (typeof process === 'undefined') {
|
|
652
|
+
if (typeof process === 'undefined' || typeof process.env === 'undefined') {
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
655
|
var defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;
|
|
656
|
-
var defaultsJsonPath = process.env.__FIREBASE_DEFAULTS_PATH__;
|
|
657
656
|
if (defaultsJsonString) {
|
|
658
|
-
if (defaultsJsonPath) {
|
|
659
|
-
console.warn("Values were provided for both __FIREBASE_DEFAULTS__ " +
|
|
660
|
-
"and __FIREBASE_DEFAULTS_PATH__. __FIREBASE_DEFAULTS_PATH__ " +
|
|
661
|
-
"will be ignored.");
|
|
662
|
-
}
|
|
663
657
|
return JSON.parse(defaultsJsonString);
|
|
664
658
|
}
|
|
665
|
-
if (defaultsJsonPath && typeof require !== 'undefined') {
|
|
666
|
-
try {
|
|
667
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
668
|
-
var json = require(defaultsJsonPath);
|
|
669
|
-
return json;
|
|
670
|
-
}
|
|
671
|
-
catch (e) {
|
|
672
|
-
console.warn("Unable to read defaults from file provided to " +
|
|
673
|
-
("__FIREBASE_DEFAULTS_PATH__: " + defaultsJsonPath));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
659
|
};
|
|
677
660
|
var getDefaultsFromCookie = function () {
|
|
678
661
|
if (typeof document === 'undefined') {
|