@firebase/storage 0.13.7-auth-redirect-credentials.b424e5897 → 0.13.7-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.
@@ -709,7 +709,7 @@ class NetworkRequest {
709
709
  // connection.send() never rejects, so we don't need to have a error handler or use catch on the returned promise.
710
710
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
711
711
  connection
712
- .send(this.url_, this.method_, this.body_, this.headers_, this.isUsingEmulator)
712
+ .send(this.url_, this.method_, this.isUsingEmulator, this.body_, this.headers_)
713
713
  .then(() => {
714
714
  if (this.progressCallback_ !== null) {
715
715
  connection.removeUploadProgressListener(progressListener);
@@ -2163,7 +2163,7 @@ class XhrConnection {
2163
2163
  });
2164
2164
  });
2165
2165
  }
2166
- send(url, method, body, headers, isUsingEmulator) {
2166
+ send(url, method, isUsingEmulator, body, headers) {
2167
2167
  if (this.sent_) {
2168
2168
  throw internalError('cannot .send() more than once');
2169
2169
  }
@@ -3174,7 +3174,13 @@ function extractBucket(host, config) {
3174
3174
  }
3175
3175
  function connectStorageEmulator$1(storage, host, port, options = {}) {
3176
3176
  storage.host = `${host}:${port}`;
3177
- storage._protocol = 'http';
3177
+ const useSsl = util.isCloudWorkstation(host);
3178
+ // Workaround to get cookies in Firebase Studio
3179
+ if (useSsl) {
3180
+ void util.pingServer(`https://${storage.host}`);
3181
+ }
3182
+ storage._isUsingEmulator = true;
3183
+ storage._protocol = useSsl ? 'https' : 'http';
3178
3184
  const { mockUserToken } = options;
3179
3185
  if (mockUserToken) {
3180
3186
  storage._overrideAuthToken =
@@ -3342,7 +3348,7 @@ class FirebaseStorageImpl {
3342
3348
  }
3343
3349
 
3344
3350
  const name = "@firebase/storage";
3345
- const version = "0.13.7-auth-redirect-credentials.b424e5897";
3351
+ const version = "0.13.7-canary.080a90dcc";
3346
3352
 
3347
3353
  /**
3348
3354
  * @license