@firebase/database 1.0.14-auth-redirect-credentials.82faa0828 → 1.0.14-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.cjs.js +10 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +11 -14
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +10 -13
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +9 -12
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +11 -14
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +7 -7
package/dist/index.node.cjs.js
CHANGED
|
@@ -1260,7 +1260,7 @@ WebSocketConnection.responsesRequiredToBeHealthy = 2;
|
|
|
1260
1260
|
WebSocketConnection.healthyTimeout = 30000;
|
|
1261
1261
|
|
|
1262
1262
|
const name = "@firebase/database";
|
|
1263
|
-
const version = "1.0.14-
|
|
1263
|
+
const version = "1.0.14-canary.080a90dcc";
|
|
1264
1264
|
|
|
1265
1265
|
/**
|
|
1266
1266
|
* @license
|
|
@@ -13500,18 +13500,11 @@ let useRestClient = false;
|
|
|
13500
13500
|
* Update an existing `Repo` in place to point to a new host/port.
|
|
13501
13501
|
*/
|
|
13502
13502
|
function repoManagerApplyEmulatorSettings(repo, hostAndPort, emulatorOptions, tokenProvider) {
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
}
|
|
13509
|
-
if (/^wss:\/\//.test(host)) {
|
|
13510
|
-
ssl = true;
|
|
13511
|
-
host = host.substring(6);
|
|
13512
|
-
}
|
|
13513
|
-
repo.repoInfo_ = new RepoInfo(host,
|
|
13514
|
-
/* secure= */ ssl, repo.repoInfo_.namespace, repo.repoInfo_.webSocketOnly, repo.repoInfo_.nodeAdmin, repo.repoInfo_.persistenceKey, repo.repoInfo_.includeNamespaceInQueryParams,
|
|
13503
|
+
const portIndex = hostAndPort.lastIndexOf(':');
|
|
13504
|
+
const host = hostAndPort.substring(0, portIndex);
|
|
13505
|
+
const useSsl = util.isCloudWorkstation(host);
|
|
13506
|
+
repo.repoInfo_ = new RepoInfo(hostAndPort,
|
|
13507
|
+
/* secure= */ useSsl, repo.repoInfo_.namespace, repo.repoInfo_.webSocketOnly, repo.repoInfo_.nodeAdmin, repo.repoInfo_.persistenceKey, repo.repoInfo_.includeNamespaceInQueryParams,
|
|
13515
13508
|
/*isUsingEmulator=*/ true, emulatorOptions);
|
|
13516
13509
|
if (tokenProvider) {
|
|
13517
13510
|
repo.authTokenProvider_ = tokenProvider;
|
|
@@ -13721,6 +13714,10 @@ function connectDatabaseEmulator(db, host, port, options = {}) {
|
|
|
13721
13714
|
: util.createMockUserToken(options.mockUserToken, db.app.options.projectId);
|
|
13722
13715
|
tokenProvider = new EmulatorTokenProvider(token);
|
|
13723
13716
|
}
|
|
13717
|
+
// Workaround to get cookies in Firebase Studio
|
|
13718
|
+
if (util.isCloudWorkstation(host)) {
|
|
13719
|
+
void util.pingServer(host);
|
|
13720
|
+
}
|
|
13724
13721
|
// Modify the repo to apply emulator settings
|
|
13725
13722
|
repoManagerApplyEmulatorSettings(repo, hostAndPort, options, tokenProvider);
|
|
13726
13723
|
}
|