@firebase/database-compat 2.0.3-canary.c8e5b3e77 → 2.0.3-canary.deb917b5f
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.esm2017.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.standalone.js +9 -17
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.js +1 -1
- package/package.json +7 -7
    
        package/dist/index.esm2017.js
    CHANGED
    
    | @@ -5,7 +5,7 @@ import { errorPrefix, validateArgCount, validateCallback, validateContextObject, | |
| 5 5 | 
             
            import { Logger } from '@firebase/logger';
         | 
| 6 6 |  | 
| 7 7 | 
             
            const name = "@firebase/database-compat";
         | 
| 8 | 
            -
            const version = "2.0.3-canary. | 
| 8 | 
            +
            const version = "2.0.3-canary.deb917b5f";
         | 
| 9 9 |  | 
| 10 10 | 
             
            /**
         | 
| 11 11 | 
             
             * @license
         | 
    
        package/dist/index.js
    CHANGED
    
    | @@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau | |
| 11 11 | 
             
            var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
         | 
| 12 12 |  | 
| 13 13 | 
             
            const name = "@firebase/database-compat";
         | 
| 14 | 
            -
            const version = "2.0.3-canary. | 
| 14 | 
            +
            const version = "2.0.3-canary.deb917b5f";
         | 
| 15 15 |  | 
| 16 16 | 
             
            /**
         | 
| 17 17 | 
             
             * @license
         | 
    
        package/dist/index.standalone.js
    CHANGED
    
    | @@ -3717,7 +3717,7 @@ function isVersionServiceProvider(provider) { | |
| 3717 3717 | 
             
            }
         | 
| 3718 3718 |  | 
| 3719 3719 | 
             
            const name$q = "@firebase/app";
         | 
| 3720 | 
            -
            const version$1 = "0.11.0-canary. | 
| 3720 | 
            +
            const version$1 = "0.11.0-canary.deb917b5f";
         | 
| 3721 3721 |  | 
| 3722 3722 | 
             
            /**
         | 
| 3723 3723 | 
             
             * @license
         | 
| @@ -3788,7 +3788,7 @@ const name$2 = "@firebase/vertexai"; | |
| 3788 3788 | 
             
            const name$1 = "@firebase/firestore-compat";
         | 
| 3789 3789 |  | 
| 3790 3790 | 
             
            const name = "firebase";
         | 
| 3791 | 
            -
            const version = "11.3.0-canary. | 
| 3791 | 
            +
            const version = "11.3.0-canary.deb917b5f";
         | 
| 3792 3792 |  | 
| 3793 3793 | 
             
            /**
         | 
| 3794 3794 | 
             
             * @license
         | 
| @@ -5615,7 +5615,7 @@ class RepoInfo { | |
| 5615 5615 | 
             
                 * @param nodeAdmin - Whether this instance uses Admin SDK credentials
         | 
| 5616 5616 | 
             
                 * @param persistenceKey - Override the default session persistence storage key
         | 
| 5617 5617 | 
             
                 */
         | 
| 5618 | 
            -
                constructor(host, secure, namespace, webSocketOnly, nodeAdmin = false, persistenceKey = '', includeNamespaceInQueryParams = false, isUsingEmulator = false | 
| 5618 | 
            +
                constructor(host, secure, namespace, webSocketOnly, nodeAdmin = false, persistenceKey = '', includeNamespaceInQueryParams = false, isUsingEmulator = false) {
         | 
| 5619 5619 | 
             
                    this.secure = secure;
         | 
| 5620 5620 | 
             
                    this.namespace = namespace;
         | 
| 5621 5621 | 
             
                    this.webSocketOnly = webSocketOnly;
         | 
| @@ -5623,7 +5623,6 @@ class RepoInfo { | |
| 5623 5623 | 
             
                    this.persistenceKey = persistenceKey;
         | 
| 5624 5624 | 
             
                    this.includeNamespaceInQueryParams = includeNamespaceInQueryParams;
         | 
| 5625 5625 | 
             
                    this.isUsingEmulator = isUsingEmulator;
         | 
| 5626 | 
            -
                    this.emulatorOptions = emulatorOptions;
         | 
| 5627 5626 | 
             
                    this._host = host.toLowerCase();
         | 
| 5628 5627 | 
             
                    this._domain = this._host.substr(this._host.indexOf('.') + 1);
         | 
| 5629 5628 | 
             
                    this.internalHost =
         | 
| @@ -18382,10 +18381,10 @@ let useRestClient = false; | |
| 18382 18381 | 
             
            /**
         | 
| 18383 18382 | 
             
             * Update an existing `Repo` in place to point to a new host/port.
         | 
| 18384 18383 | 
             
             */
         | 
| 18385 | 
            -
            function repoManagerApplyEmulatorSettings(repo,  | 
| 18386 | 
            -
                repo.repoInfo_ = new RepoInfo( | 
| 18384 | 
            +
            function repoManagerApplyEmulatorSettings(repo, host, port, tokenProvider) {
         | 
| 18385 | 
            +
                repo.repoInfo_ = new RepoInfo(`${host}:${port}`, 
         | 
| 18387 18386 | 
             
                /* secure= */ false, repo.repoInfo_.namespace, repo.repoInfo_.webSocketOnly, repo.repoInfo_.nodeAdmin, repo.repoInfo_.persistenceKey, repo.repoInfo_.includeNamespaceInQueryParams, 
         | 
| 18388 | 
            -
                /*isUsingEmulator=*/ true | 
| 18387 | 
            +
                /*isUsingEmulator=*/ true);
         | 
| 18389 18388 | 
             
                if (tokenProvider) {
         | 
| 18390 18389 | 
             
                    repo.authTokenProvider_ = tokenProvider;
         | 
| 18391 18390 | 
             
                }
         | 
| @@ -18547,17 +18546,10 @@ function forceLongPolling() { | |
| 18547 18546 | 
             
            function connectDatabaseEmulator(db, host, port, options = {}) {
         | 
| 18548 18547 | 
             
                db = util.getModularInstance(db);
         | 
| 18549 18548 | 
             
                db._checkNotDeleted('useEmulator');
         | 
| 18550 | 
            -
                const hostAndPort = `${host}:${port}`;
         | 
| 18551 | 
            -
                const repo = db._repoInternal;
         | 
| 18552 18549 | 
             
                if (db._instanceStarted) {
         | 
| 18553 | 
            -
                     | 
| 18554 | 
            -
                    // with the same parameters. If the parameters differ then assert.
         | 
| 18555 | 
            -
                    if (hostAndPort === db._repoInternal.repoInfo_.host &&
         | 
| 18556 | 
            -
                        util.deepEqual(options, repo.repoInfo_.emulatorOptions)) {
         | 
| 18557 | 
            -
                        return;
         | 
| 18558 | 
            -
                    }
         | 
| 18559 | 
            -
                    fatal('connectDatabaseEmulator() cannot initialize or alter the emulator configuration after the database instance has started.');
         | 
| 18550 | 
            +
                    fatal('Cannot call useEmulator() after instance has already been initialized.');
         | 
| 18560 18551 | 
             
                }
         | 
| 18552 | 
            +
                const repo = db._repoInternal;
         | 
| 18561 18553 | 
             
                let tokenProvider = undefined;
         | 
| 18562 18554 | 
             
                if (repo.repoInfo_.nodeAdmin) {
         | 
| 18563 18555 | 
             
                    if (options.mockUserToken) {
         | 
| @@ -18572,7 +18564,7 @@ function connectDatabaseEmulator(db, host, port, options = {}) { | |
| 18572 18564 | 
             
                    tokenProvider = new EmulatorTokenProvider(token);
         | 
| 18573 18565 | 
             
                }
         | 
| 18574 18566 | 
             
                // Modify the repo to apply emulator settings
         | 
| 18575 | 
            -
                repoManagerApplyEmulatorSettings(repo,  | 
| 18567 | 
            +
                repoManagerApplyEmulatorSettings(repo, host, port, tokenProvider);
         | 
| 18576 18568 | 
             
            }
         | 
| 18577 18569 | 
             
            /**
         | 
| 18578 18570 | 
             
             * Disconnects from the server (all Database operations will be completed
         |