@firebase/storage 0.9.9 → 0.9.10

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
1
  import { getApp, _getProvider, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';
2
- import { FirebaseError, createMockUserToken, getModularInstance } from '@firebase/util';
2
+ import { FirebaseError, createMockUserToken, getModularInstance, getDefaultEmulatorHost } from '@firebase/util';
3
3
  import { Component } from '@firebase/component';
4
4
 
5
5
  /**
@@ -3230,7 +3230,7 @@ class FirebaseStorageImpl {
3230
3230
  }
3231
3231
 
3232
3232
  const name = "@firebase/storage";
3233
- const version = "0.9.9";
3233
+ const version = "0.9.10";
3234
3234
 
3235
3235
  /**
3236
3236
  * @license
@@ -3445,6 +3445,12 @@ function getStorage(app = getApp(), bucketUrl) {
3445
3445
  const storageInstance = storageProvider.getImmediate({
3446
3446
  identifier: bucketUrl
3447
3447
  });
3448
+ const storageEmulatorHost = getDefaultEmulatorHost('storage');
3449
+ if (storageEmulatorHost) {
3450
+ const [host, port] = storageEmulatorHost.split(':');
3451
+ // eslint-disable-next-line no-restricted-globals
3452
+ connectStorageEmulator(storageInstance, host, parseInt(port, 10));
3453
+ }
3448
3454
  return storageInstance;
3449
3455
  }
3450
3456
  /**