@firebase/storage 0.9.12 → 0.9.13-canary.0c0c58f47

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.
@@ -1,5 +1,5 @@
1
- import { getApp, _getProvider, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';
2
- import { FirebaseError, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';
1
+ import { _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';
2
+ import { FirebaseError, isNode, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';
3
3
  import { Transform, PassThrough } from 'stream';
4
4
  import nodeFetch from 'node-fetch';
5
5
  import { Component } from '@firebase/component';
@@ -502,7 +502,9 @@ function isNativeBlob(p) {
502
502
  return isNativeBlobDefined() && p instanceof Blob;
503
503
  }
504
504
  function isNativeBlobDefined() {
505
- return typeof Blob !== 'undefined';
505
+ // Note: The `isNode()` check can be removed when `node-fetch` adds native Blob support
506
+ // PR: https://github.com/node-fetch/node-fetch/pull/1664
507
+ return typeof Blob !== 'undefined' && !isNode();
506
508
  }
507
509
  function validateNumber(argument, minValue, maxValue, value) {
508
510
  if (value < minValue) {
@@ -1069,6 +1071,9 @@ function base64Bytes_(format, value) {
1069
1071
  bytes = decodeBase64(value);
1070
1072
  }
1071
1073
  catch (e) {
1074
+ if (e.message.includes('polyfill')) {
1075
+ throw e;
1076
+ }
1072
1077
  throw invalidFormat(format, 'Invalid character found');
1073
1078
  }
1074
1079
  const array = new Uint8Array(bytes.length);
@@ -3342,7 +3347,7 @@ class FirebaseStorageImpl {
3342
3347
  }
3343
3348
 
3344
3349
  const name = "@firebase/storage";
3345
- const version = "0.9.12";
3350
+ const version = "0.9.13-canary.0c0c58f47";
3346
3351
 
3347
3352
  /**
3348
3353
  * @license