@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.esm2017.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _isFirebaseServerApp, _getProvider, getApp, SDK_VERSION as SDK_VERSION$1, _registerComponent, registerVersion } from '@firebase/app';
|
|
2
2
|
import { Component, ComponentContainer, Provider } from '@firebase/component';
|
|
3
|
-
import { stringify, jsonEval, contains, assert, isNodeSdk, stringToByteArray, Sha1, base64, deepCopy, base64Encode, isMobileCordova, stringLength, Deferred, safeGet, isAdmin, isValidFormat, isEmpty, isReactNative, assertionError, map, querystring, errorPrefix, getModularInstance, getDefaultEmulatorHostnameAndPort, deepEqual, createMockUserToken } from '@firebase/util';
|
|
3
|
+
import { stringify, jsonEval, contains, assert, isNodeSdk, stringToByteArray, Sha1, base64, deepCopy, base64Encode, isMobileCordova, stringLength, Deferred, safeGet, isAdmin, isValidFormat, isEmpty, isReactNative, assertionError, map, querystring, errorPrefix, getModularInstance, getDefaultEmulatorHostnameAndPort, deepEqual, createMockUserToken, isCloudWorkstation, pingServer } from '@firebase/util';
|
|
4
4
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
5
5
|
|
|
6
6
|
const name = "@firebase/database";
|
|
7
|
-
const version = "1.0.14-
|
|
7
|
+
const version = "1.0.14-canary.080a90dcc";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -13488,18 +13488,11 @@ let useRestClient = false;
|
|
|
13488
13488
|
* Update an existing `Repo` in place to point to a new host/port.
|
|
13489
13489
|
*/
|
|
13490
13490
|
function repoManagerApplyEmulatorSettings(repo, hostAndPort, emulatorOptions, tokenProvider) {
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
}
|
|
13497
|
-
if (/^wss:\/\//.test(host)) {
|
|
13498
|
-
ssl = true;
|
|
13499
|
-
host = host.substring(6);
|
|
13500
|
-
}
|
|
13501
|
-
repo.repoInfo_ = new RepoInfo(host,
|
|
13502
|
-
/* secure= */ ssl, repo.repoInfo_.namespace, repo.repoInfo_.webSocketOnly, repo.repoInfo_.nodeAdmin, repo.repoInfo_.persistenceKey, repo.repoInfo_.includeNamespaceInQueryParams,
|
|
13491
|
+
const portIndex = hostAndPort.lastIndexOf(':');
|
|
13492
|
+
const host = hostAndPort.substring(0, portIndex);
|
|
13493
|
+
const useSsl = isCloudWorkstation(host);
|
|
13494
|
+
repo.repoInfo_ = new RepoInfo(hostAndPort,
|
|
13495
|
+
/* secure= */ useSsl, repo.repoInfo_.namespace, repo.repoInfo_.webSocketOnly, repo.repoInfo_.nodeAdmin, repo.repoInfo_.persistenceKey, repo.repoInfo_.includeNamespaceInQueryParams,
|
|
13503
13496
|
/*isUsingEmulator=*/ true, emulatorOptions);
|
|
13504
13497
|
if (tokenProvider) {
|
|
13505
13498
|
repo.authTokenProvider_ = tokenProvider;
|
|
@@ -13709,6 +13702,10 @@ function connectDatabaseEmulator(db, host, port, options = {}) {
|
|
|
13709
13702
|
: createMockUserToken(options.mockUserToken, db.app.options.projectId);
|
|
13710
13703
|
tokenProvider = new EmulatorTokenProvider(token);
|
|
13711
13704
|
}
|
|
13705
|
+
// Workaround to get cookies in Firebase Studio
|
|
13706
|
+
if (isCloudWorkstation(host)) {
|
|
13707
|
+
void pingServer(host);
|
|
13708
|
+
}
|
|
13712
13709
|
// Modify the repo to apply emulator settings
|
|
13713
13710
|
repoManagerApplyEmulatorSettings(repo, hostAndPort, options, tokenProvider);
|
|
13714
13711
|
}
|