@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.
- package/dist/index.browser.cjs.js +10 -4
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.cjs.js +10 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +11 -5
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +14 -8
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +15 -9
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/implementation/connection.d.ts +1 -1
- package/dist/node-esm/src/platform/browser/connection.d.ts +1 -1
- package/dist/node-esm/src/platform/node/connection.d.ts +2 -2
- package/dist/node-esm/src/service.d.ts +1 -1
- package/dist/node-esm/test/unit/connection.d.ts +1 -1
- package/dist/src/implementation/connection.d.ts +1 -1
- package/dist/src/platform/browser/connection.d.ts +1 -1
- package/dist/src/platform/node/connection.d.ts +2 -2
- package/dist/src/service.d.ts +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/test/unit/connection.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.esm2017.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _isFirebaseServerApp, _getProvider, getApp, _registerComponent, registerVersion, SDK_VERSION } from '@firebase/app';
|
|
2
|
-
import { FirebaseError, isCloudWorkstation, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';
|
|
2
|
+
import { FirebaseError, isCloudWorkstation, pingServer, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort } from '@firebase/util';
|
|
3
3
|
import { Component } from '@firebase/component';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -705,7 +705,7 @@ class NetworkRequest {
|
|
|
705
705
|
// connection.send() never rejects, so we don't need to have a error handler or use catch on the returned promise.
|
|
706
706
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
707
707
|
connection
|
|
708
|
-
.send(this.url_, this.method_, this.
|
|
708
|
+
.send(this.url_, this.method_, this.isUsingEmulator, this.body_, this.headers_)
|
|
709
709
|
.then(() => {
|
|
710
710
|
if (this.progressCallback_ !== null) {
|
|
711
711
|
connection.removeUploadProgressListener(progressListener);
|
|
@@ -2159,7 +2159,7 @@ class XhrConnection {
|
|
|
2159
2159
|
});
|
|
2160
2160
|
});
|
|
2161
2161
|
}
|
|
2162
|
-
send(url, method, body, headers
|
|
2162
|
+
send(url, method, isUsingEmulator, body, headers) {
|
|
2163
2163
|
if (this.sent_) {
|
|
2164
2164
|
throw internalError('cannot .send() more than once');
|
|
2165
2165
|
}
|
|
@@ -3170,7 +3170,13 @@ function extractBucket(host, config) {
|
|
|
3170
3170
|
}
|
|
3171
3171
|
function connectStorageEmulator$1(storage, host, port, options = {}) {
|
|
3172
3172
|
storage.host = `${host}:${port}`;
|
|
3173
|
-
|
|
3173
|
+
const useSsl = isCloudWorkstation(host);
|
|
3174
|
+
// Workaround to get cookies in Firebase Studio
|
|
3175
|
+
if (useSsl) {
|
|
3176
|
+
void pingServer(`https://${storage.host}`);
|
|
3177
|
+
}
|
|
3178
|
+
storage._isUsingEmulator = true;
|
|
3179
|
+
storage._protocol = useSsl ? 'https' : 'http';
|
|
3174
3180
|
const { mockUserToken } = options;
|
|
3175
3181
|
if (mockUserToken) {
|
|
3176
3182
|
storage._overrideAuthToken =
|
|
@@ -3338,7 +3344,7 @@ class FirebaseStorageImpl {
|
|
|
3338
3344
|
}
|
|
3339
3345
|
|
|
3340
3346
|
const name = "@firebase/storage";
|
|
3341
|
-
const version = "0.13.7-
|
|
3347
|
+
const version = "0.13.7-canary.080a90dcc";
|
|
3342
3348
|
|
|
3343
3349
|
/**
|
|
3344
3350
|
* @license
|