@firebase/firestore 3.3.1 → 3.4.0-canary.774b2fc19
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/CHANGELOG.md +6 -0
- package/dist/firestore/compat/index.d.ts +1 -1
- package/dist/firestore/src/api/credentials.d.ts +64 -30
- package/dist/firestore/src/api/database.d.ts +2 -1
- package/dist/firestore/src/api.d.ts +2 -1
- package/dist/firestore/src/core/component_provider.d.ts +2 -1
- package/dist/firestore/src/core/firestore_client.d.ts +4 -3
- package/dist/firestore/src/lite-api/components.d.ts +3 -1
- package/dist/firestore/src/lite-api/database.d.ts +4 -2
- package/dist/firestore/src/platform/browser/webchannel_connection.d.ts +1 -1
- package/dist/firestore/src/platform/node/grpc_connection.d.ts +3 -3
- package/dist/firestore/src/remote/connection.d.ts +3 -3
- package/dist/firestore/src/remote/datastore.d.ts +2 -1
- package/dist/firestore/src/remote/persistent_stream.d.ts +9 -7
- package/dist/firestore/src/remote/rest_connection.d.ts +4 -4
- package/dist/firestore/test/integration/remote/stream.test.d.ts +2 -2
- package/dist/firestore/test/integration/util/internal_helpers.d.ts +5 -5
- package/dist/firestore/test/unit/remote/rest_connection.test.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm2017.js +3413 -3359
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3688 -3639
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +195 -109
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +194 -105
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3391 -3337
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +34 -20
- package/dist/lite/firestore/compat/index.d.ts +1 -1
- package/dist/lite/firestore/src/api/credentials.d.ts +64 -30
- package/dist/lite/firestore/src/api/database.d.ts +2 -1
- package/dist/lite/firestore/src/api.d.ts +2 -1
- package/dist/lite/firestore/src/core/component_provider.d.ts +2 -1
- package/dist/lite/firestore/src/core/firestore_client.d.ts +4 -3
- package/dist/lite/firestore/src/lite-api/components.d.ts +3 -1
- package/dist/lite/firestore/src/lite-api/database.d.ts +4 -2
- package/dist/lite/firestore/src/platform/browser/webchannel_connection.d.ts +1 -1
- package/dist/lite/firestore/src/platform/node/grpc_connection.d.ts +3 -3
- package/dist/lite/firestore/src/remote/connection.d.ts +3 -3
- package/dist/lite/firestore/src/remote/datastore.d.ts +2 -1
- package/dist/lite/firestore/src/remote/persistent_stream.d.ts +9 -7
- package/dist/lite/firestore/src/remote/rest_connection.d.ts +4 -4
- package/dist/lite/firestore/test/integration/remote/stream.test.d.ts +2 -2
- package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +5 -5
- package/dist/lite/firestore/test/unit/remote/rest_connection.test.d.ts +1 -1
- package/dist/lite/index.browser.esm2017.js +1379 -1365
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +934 -925
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +96 -61
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +96 -61
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +937 -923
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +14 -13
- package/dist/lite/packages/firestore/babel-register.d.ts +1 -0
- package/dist/lite/packages/firestore/compat/index.d.ts +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +150 -149
- package/dist/lite/packages/firestore/src/api/credentials.d.ts +64 -30
- package/dist/lite/packages/firestore/src/api/database.d.ts +2 -1
- package/dist/lite/packages/firestore/src/api.d.ts +2 -1
- package/dist/lite/packages/firestore/src/core/component_provider.d.ts +2 -1
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +4 -3
- package/dist/lite/packages/firestore/src/lite-api/components.d.ts +3 -1
- package/dist/lite/packages/firestore/src/lite-api/database.d.ts +4 -2
- package/dist/lite/packages/firestore/src/platform/browser/webchannel_connection.d.ts +1 -1
- package/dist/lite/packages/firestore/src/platform/node/grpc_connection.d.ts +3 -3
- package/dist/lite/packages/firestore/src/remote/connection.d.ts +3 -3
- package/dist/lite/packages/firestore/src/remote/datastore.d.ts +2 -1
- package/dist/lite/packages/firestore/src/remote/persistent_stream.d.ts +9 -7
- package/dist/lite/packages/firestore/src/remote/rest_connection.d.ts +4 -4
- package/dist/lite/packages/firestore/test/integration/remote/stream.test.d.ts +2 -2
- package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +5 -5
- package/dist/lite/packages/firestore/test/unit/remote/rest_connection.test.d.ts +1 -1
- package/dist/lite/private.d.ts +14 -13
- package/dist/packages/firestore/babel-register.d.ts +1 -0
- package/dist/packages/firestore/compat/index.d.ts +1 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +211 -195
- package/dist/packages/firestore/src/api/credentials.d.ts +64 -30
- package/dist/packages/firestore/src/api/database.d.ts +2 -1
- package/dist/packages/firestore/src/api.d.ts +2 -1
- package/dist/packages/firestore/src/core/component_provider.d.ts +2 -1
- package/dist/packages/firestore/src/core/firestore_client.d.ts +4 -3
- package/dist/packages/firestore/src/lite-api/components.d.ts +3 -1
- package/dist/packages/firestore/src/lite-api/database.d.ts +4 -2
- package/dist/packages/firestore/src/platform/browser/webchannel_connection.d.ts +1 -1
- package/dist/packages/firestore/src/platform/node/grpc_connection.d.ts +3 -3
- package/dist/packages/firestore/src/remote/connection.d.ts +3 -3
- package/dist/packages/firestore/src/remote/datastore.d.ts +2 -1
- package/dist/packages/firestore/src/remote/persistent_stream.d.ts +9 -7
- package/dist/packages/firestore/src/remote/rest_connection.d.ts +4 -4
- package/dist/packages/firestore/test/integration/remote/stream.test.d.ts +2 -2
- package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +5 -5
- package/dist/packages/firestore/test/unit/remote/rest_connection.test.d.ts +1 -1
- package/dist/private.d.ts +24 -19
- package/package.json +10 -10
package/dist/index.node.cjs.js
CHANGED
|
@@ -8,18 +8,13 @@ var logger = require('@firebase/logger');
|
|
|
8
8
|
var util = require('util');
|
|
9
9
|
var util$1 = require('@firebase/util');
|
|
10
10
|
var crypto = require('crypto');
|
|
11
|
-
var module$1 = require('module');
|
|
12
11
|
var grpcJs = require('@grpc/grpc-js');
|
|
13
12
|
var path = require('path');
|
|
14
13
|
var url = require('url');
|
|
15
14
|
var protoLoader = require('@grpc/proto-loader');
|
|
16
15
|
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var module__default = /*#__PURE__*/_interopDefaultLegacy(module$1);
|
|
20
|
-
|
|
21
16
|
const name = "@firebase/firestore";
|
|
22
|
-
const version$1 = "3.
|
|
17
|
+
const version$1 = "3.4.0-canary.774b2fc19";
|
|
23
18
|
|
|
24
19
|
/**
|
|
25
20
|
* @license
|
|
@@ -72,7 +67,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
72
67
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
73
68
|
User.MOCK_USER = new User('mock-user');
|
|
74
69
|
|
|
75
|
-
const version = "9.
|
|
70
|
+
const version = "9.6.0-canary.774b2fc19";
|
|
76
71
|
|
|
77
72
|
/**
|
|
78
73
|
* @license
|
|
@@ -460,16 +455,15 @@ class OAuthToken {
|
|
|
460
455
|
constructor(value, user) {
|
|
461
456
|
this.user = user;
|
|
462
457
|
this.type = 'OAuth';
|
|
463
|
-
this.
|
|
464
|
-
|
|
465
|
-
this.authHeaders['Authorization'] = `Bearer ${value}`;
|
|
458
|
+
this.headers = new Map();
|
|
459
|
+
this.headers.set('Authorization', `Bearer ${value}`);
|
|
466
460
|
}
|
|
467
461
|
}
|
|
468
462
|
/**
|
|
469
463
|
* A CredentialsProvider that always yields an empty token.
|
|
470
464
|
* @internal
|
|
471
465
|
*/
|
|
472
|
-
class
|
|
466
|
+
class EmptyAuthCredentialsProvider {
|
|
473
467
|
getToken() {
|
|
474
468
|
return Promise.resolve(null);
|
|
475
469
|
}
|
|
@@ -484,7 +478,7 @@ class EmptyCredentialsProvider {
|
|
|
484
478
|
* A CredentialsProvider that always returns a constant token. Used for
|
|
485
479
|
* emulator token mocking.
|
|
486
480
|
*/
|
|
487
|
-
class
|
|
481
|
+
class EmulatorAuthCredentialsProvider {
|
|
488
482
|
constructor(token) {
|
|
489
483
|
this.token = token;
|
|
490
484
|
/**
|
|
@@ -507,7 +501,7 @@ class EmulatorCredentialsProvider {
|
|
|
507
501
|
this.changeListener = null;
|
|
508
502
|
}
|
|
509
503
|
}
|
|
510
|
-
class
|
|
504
|
+
class FirebaseAuthCredentialsProvider {
|
|
511
505
|
constructor(authProvider) {
|
|
512
506
|
this.authProvider = authProvider;
|
|
513
507
|
/** Tracks the current User. */
|
|
@@ -550,7 +544,7 @@ class FirebaseCredentialsProvider {
|
|
|
550
544
|
});
|
|
551
545
|
};
|
|
552
546
|
const registerAuth = (auth) => {
|
|
553
|
-
logDebug('
|
|
547
|
+
logDebug('FirebaseAuthCredentialsProvider', 'Auth detected');
|
|
554
548
|
this.auth = auth;
|
|
555
549
|
this.auth.addAuthTokenListener(this.tokenListener);
|
|
556
550
|
awaitNextToken();
|
|
@@ -567,7 +561,7 @@ class FirebaseCredentialsProvider {
|
|
|
567
561
|
}
|
|
568
562
|
else {
|
|
569
563
|
// If auth is still not available, proceed with `null` user
|
|
570
|
-
logDebug('
|
|
564
|
+
logDebug('FirebaseAuthCredentialsProvider', 'Auth not yet detected');
|
|
571
565
|
nextToken.resolve();
|
|
572
566
|
nextToken = new Deferred();
|
|
573
567
|
}
|
|
@@ -590,7 +584,7 @@ class FirebaseCredentialsProvider {
|
|
|
590
584
|
// outstanding so the response is potentially for a previous user (which
|
|
591
585
|
// user, we can't be sure).
|
|
592
586
|
if (this.tokenCounter !== initialTokenCounter) {
|
|
593
|
-
logDebug('
|
|
587
|
+
logDebug('FirebaseAuthCredentialsProvider', 'getToken aborted due to token change.');
|
|
594
588
|
return this.getToken();
|
|
595
589
|
}
|
|
596
590
|
else {
|
|
@@ -631,25 +625,17 @@ class FirebaseCredentialsProvider {
|
|
|
631
625
|
*/
|
|
632
626
|
class FirstPartyToken {
|
|
633
627
|
constructor(gapi, sessionIndex, iamToken) {
|
|
634
|
-
this.gapi = gapi;
|
|
635
|
-
this.sessionIndex = sessionIndex;
|
|
636
|
-
this.iamToken = iamToken;
|
|
637
628
|
this.type = 'FirstParty';
|
|
638
629
|
this.user = User.FIRST_PARTY;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
'X-Goog-AuthUser': this.sessionIndex
|
|
643
|
-
};
|
|
644
|
-
// Use array notation to prevent minification
|
|
645
|
-
const authHeader = this.gapi['auth']['getAuthHeaderValueForFirstParty']([]);
|
|
630
|
+
this.headers = new Map();
|
|
631
|
+
this.headers.set('X-Goog-AuthUser', sessionIndex);
|
|
632
|
+
const authHeader = gapi['auth']['getAuthHeaderValueForFirstParty']([]);
|
|
646
633
|
if (authHeader) {
|
|
647
|
-
headers
|
|
634
|
+
this.headers.set('Authorization', authHeader);
|
|
648
635
|
}
|
|
649
|
-
if (
|
|
650
|
-
headers
|
|
636
|
+
if (iamToken) {
|
|
637
|
+
this.headers.set('X-Goog-Iam-Authorization-Token', iamToken);
|
|
651
638
|
}
|
|
652
|
-
return headers;
|
|
653
639
|
}
|
|
654
640
|
}
|
|
655
641
|
/*
|
|
@@ -657,7 +643,7 @@ class FirstPartyToken {
|
|
|
657
643
|
* to authenticate the user, using technique that is only available
|
|
658
644
|
* to applications hosted by Google.
|
|
659
645
|
*/
|
|
660
|
-
class
|
|
646
|
+
class FirstPartyAuthCredentialsProvider {
|
|
661
647
|
constructor(gapi, sessionIndex, iamToken) {
|
|
662
648
|
this.gapi = gapi;
|
|
663
649
|
this.sessionIndex = sessionIndex;
|
|
@@ -673,13 +659,97 @@ class FirstPartyCredentialsProvider {
|
|
|
673
659
|
shutdown() { }
|
|
674
660
|
invalidateToken() { }
|
|
675
661
|
}
|
|
662
|
+
class AppCheckToken {
|
|
663
|
+
constructor(value) {
|
|
664
|
+
this.value = value;
|
|
665
|
+
this.type = 'AppCheck';
|
|
666
|
+
this.headers = new Map();
|
|
667
|
+
if (value && value.length > 0) {
|
|
668
|
+
this.headers.set('x-firebase-appcheck', this.value);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
class FirebaseAppCheckTokenProvider {
|
|
673
|
+
constructor(appCheckProvider) {
|
|
674
|
+
this.appCheckProvider = appCheckProvider;
|
|
675
|
+
this.forceRefresh = false;
|
|
676
|
+
this.appCheck = null;
|
|
677
|
+
}
|
|
678
|
+
start(asyncQueue, changeListener) {
|
|
679
|
+
const onTokenChanged = tokenResult => {
|
|
680
|
+
if (tokenResult.error != null) {
|
|
681
|
+
logDebug('FirebaseAppCheckTokenProvider', `Error getting App Check token; using placeholder token instead. Error: ${tokenResult.error.message}`);
|
|
682
|
+
}
|
|
683
|
+
return changeListener(tokenResult.token);
|
|
684
|
+
};
|
|
685
|
+
this.tokenListener = (tokenResult) => {
|
|
686
|
+
asyncQueue.enqueueRetryable(() => onTokenChanged(tokenResult));
|
|
687
|
+
};
|
|
688
|
+
const registerAppCheck = (appCheck) => {
|
|
689
|
+
logDebug('FirebaseAppCheckTokenProvider', 'AppCheck detected');
|
|
690
|
+
this.appCheck = appCheck;
|
|
691
|
+
this.appCheck.addTokenListener(this.tokenListener);
|
|
692
|
+
};
|
|
693
|
+
this.appCheckProvider.onInit(appCheck => registerAppCheck(appCheck));
|
|
694
|
+
// Our users can initialize AppCheck after Firestore, so we give it
|
|
695
|
+
// a chance to register itself with the component framework.
|
|
696
|
+
setTimeout(() => {
|
|
697
|
+
if (!this.appCheck) {
|
|
698
|
+
const appCheck = this.appCheckProvider.getImmediate({ optional: true });
|
|
699
|
+
if (appCheck) {
|
|
700
|
+
registerAppCheck(appCheck);
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
703
|
+
// If AppCheck is still not available, proceed without it.
|
|
704
|
+
logDebug('FirebaseAppCheckTokenProvider', 'AppCheck not yet detected');
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}, 0);
|
|
708
|
+
}
|
|
709
|
+
getToken() {
|
|
710
|
+
const forceRefresh = this.forceRefresh;
|
|
711
|
+
this.forceRefresh = false;
|
|
712
|
+
if (!this.appCheck) {
|
|
713
|
+
return Promise.resolve(null);
|
|
714
|
+
}
|
|
715
|
+
return this.appCheck.getToken(forceRefresh).then(tokenResult => {
|
|
716
|
+
if (tokenResult) {
|
|
717
|
+
hardAssert(typeof tokenResult.token === 'string');
|
|
718
|
+
return new AppCheckToken(tokenResult.token);
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
invalidateToken() {
|
|
726
|
+
this.forceRefresh = true;
|
|
727
|
+
}
|
|
728
|
+
shutdown() {
|
|
729
|
+
if (this.appCheck) {
|
|
730
|
+
this.appCheck.removeTokenListener(this.tokenListener);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* An AppCheck token provider that always yields an empty token.
|
|
736
|
+
* @internal
|
|
737
|
+
*/
|
|
738
|
+
class EmptyAppCheckTokenProvider {
|
|
739
|
+
getToken() {
|
|
740
|
+
return Promise.resolve(new AppCheckToken(''));
|
|
741
|
+
}
|
|
742
|
+
invalidateToken() { }
|
|
743
|
+
start(asyncQueue, changeListener) { }
|
|
744
|
+
shutdown() { }
|
|
745
|
+
}
|
|
676
746
|
/**
|
|
677
747
|
* Builds a CredentialsProvider depending on the type of
|
|
678
748
|
* the credentials passed in.
|
|
679
749
|
*/
|
|
680
|
-
function
|
|
750
|
+
function makeAuthCredentialsProvider(credentials) {
|
|
681
751
|
if (!credentials) {
|
|
682
|
-
return new
|
|
752
|
+
return new EmptyAuthCredentialsProvider();
|
|
683
753
|
}
|
|
684
754
|
switch (credentials['type']) {
|
|
685
755
|
case 'gapi':
|
|
@@ -689,11 +759,11 @@ function makeCredentialsProvider(credentials) {
|
|
|
689
759
|
client !== null &&
|
|
690
760
|
client['auth'] &&
|
|
691
761
|
client['auth']['getAuthHeaderValueForFirstParty']));
|
|
692
|
-
return new
|
|
762
|
+
return new FirstPartyAuthCredentialsProvider(client, credentials['sessionIndex'] || '0', credentials['iamToken'] || null);
|
|
693
763
|
case 'provider':
|
|
694
764
|
return credentials['client'];
|
|
695
765
|
default:
|
|
696
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, '
|
|
766
|
+
throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeAuthCredentialsProvider failed due to invalid credential type');
|
|
697
767
|
}
|
|
698
768
|
}
|
|
699
769
|
|
|
@@ -14245,22 +14315,19 @@ function nodePromise(action) {
|
|
|
14245
14315
|
* See the License for the specific language governing permissions and
|
|
14246
14316
|
* limitations under the License.
|
|
14247
14317
|
*/
|
|
14248
|
-
//
|
|
14249
|
-
//
|
|
14250
|
-
const
|
|
14251
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
14252
|
-
const { version: grpcVersion } = require$1('@grpc/grpc-js/package.json');
|
|
14318
|
+
// TODO: Fetch runtime version from grpc-js/package.json instead
|
|
14319
|
+
// when there's a cleaner way to dynamic require JSON in both Node ESM and CJS
|
|
14320
|
+
const grpcVersion = '1.3.7';
|
|
14253
14321
|
const LOG_TAG$9 = 'Connection';
|
|
14254
14322
|
const X_GOOG_API_CLIENT_VALUE = `gl-node/${process.versions.node} fire/${SDK_VERSION} grpc/${grpcVersion}`;
|
|
14255
|
-
function createMetadata(databasePath,
|
|
14256
|
-
hardAssert(
|
|
14323
|
+
function createMetadata(databasePath, authToken, appCheckToken, appId) {
|
|
14324
|
+
hardAssert(authToken === null || authToken.type === 'OAuth');
|
|
14257
14325
|
const metadata = new grpcJs.Metadata();
|
|
14258
|
-
if (
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
}
|
|
14326
|
+
if (authToken) {
|
|
14327
|
+
authToken.headers.forEach((value, key) => metadata.set(key, value));
|
|
14328
|
+
}
|
|
14329
|
+
if (appCheckToken) {
|
|
14330
|
+
appCheckToken.headers.forEach((value, key) => metadata.set(key, value));
|
|
14264
14331
|
}
|
|
14265
14332
|
if (appId) {
|
|
14266
14333
|
metadata.set('X-Firebase-GMPID', appId);
|
|
@@ -14293,9 +14360,9 @@ class GrpcConnection {
|
|
|
14293
14360
|
}
|
|
14294
14361
|
return this.cachedStub;
|
|
14295
14362
|
}
|
|
14296
|
-
invokeRPC(rpcName, path, request,
|
|
14363
|
+
invokeRPC(rpcName, path, request, authToken, appCheckToken) {
|
|
14297
14364
|
const stub = this.ensureActiveStub();
|
|
14298
|
-
const metadata = createMetadata(this.databasePath,
|
|
14365
|
+
const metadata = createMetadata(this.databasePath, authToken, appCheckToken, this.databaseInfo.appId);
|
|
14299
14366
|
const jsonRequest = Object.assign({ database: this.databasePath }, request);
|
|
14300
14367
|
return nodePromise((callback) => {
|
|
14301
14368
|
logDebug(LOG_TAG$9, `RPC '${rpcName}' invoked with request:`, request);
|
|
@@ -14311,12 +14378,12 @@ class GrpcConnection {
|
|
|
14311
14378
|
});
|
|
14312
14379
|
});
|
|
14313
14380
|
}
|
|
14314
|
-
invokeStreamingRPC(rpcName, path, request,
|
|
14381
|
+
invokeStreamingRPC(rpcName, path, request, authToken, appCheckToken) {
|
|
14315
14382
|
const results = [];
|
|
14316
14383
|
const responseDeferred = new Deferred();
|
|
14317
14384
|
logDebug(LOG_TAG$9, `RPC '${rpcName}' invoked (streaming) with request:`, request);
|
|
14318
14385
|
const stub = this.ensureActiveStub();
|
|
14319
|
-
const metadata = createMetadata(this.databasePath,
|
|
14386
|
+
const metadata = createMetadata(this.databasePath, authToken, appCheckToken, this.databaseInfo.appId);
|
|
14320
14387
|
const jsonRequest = Object.assign(Object.assign({}, request), { database: this.databasePath });
|
|
14321
14388
|
const stream = stub[rpcName](jsonRequest, metadata);
|
|
14322
14389
|
stream.on('data', (response) => {
|
|
@@ -14335,9 +14402,9 @@ class GrpcConnection {
|
|
|
14335
14402
|
return responseDeferred.promise;
|
|
14336
14403
|
}
|
|
14337
14404
|
// TODO(mikelehen): This "method" is a monster. Should be refactored.
|
|
14338
|
-
openStream(rpcName,
|
|
14405
|
+
openStream(rpcName, authToken, appCheckToken) {
|
|
14339
14406
|
const stub = this.ensureActiveStub();
|
|
14340
|
-
const metadata = createMetadata(this.databasePath,
|
|
14407
|
+
const metadata = createMetadata(this.databasePath, authToken, appCheckToken, this.databaseInfo.appId);
|
|
14341
14408
|
const grpcStream = stub[rpcName](metadata);
|
|
14342
14409
|
let closed = false;
|
|
14343
14410
|
const close = (err) => {
|
|
@@ -14417,8 +14484,8 @@ class GrpcConnection {
|
|
|
14417
14484
|
*/
|
|
14418
14485
|
// __filename and __dirname globals are unavailable in ES modules
|
|
14419
14486
|
// @ts-ignore To avoid using `--module es2020` flag.
|
|
14420
|
-
const
|
|
14421
|
-
const
|
|
14487
|
+
const __filenameInESM = url.fileURLToPath(new (require('url').URL)('file:' + __filename).href);
|
|
14488
|
+
const __dirnameInESM = path.dirname(__filenameInESM);
|
|
14422
14489
|
/** Used by tests so we can match @grpc/proto-loader behavior. */
|
|
14423
14490
|
const protoLoaderOptions = {
|
|
14424
14491
|
longs: String,
|
|
@@ -14432,7 +14499,7 @@ const protoLoaderOptions = {
|
|
|
14432
14499
|
* @returns The GrpcObject representing our protos.
|
|
14433
14500
|
*/
|
|
14434
14501
|
function loadProtos() {
|
|
14435
|
-
const root = path.resolve(
|
|
14502
|
+
const root = path.resolve(__dirnameInESM, "src/protos" );
|
|
14436
14503
|
const firestoreProtoFile = path.join(root, 'google/firestore/v1/firestore.proto');
|
|
14437
14504
|
const packageDefinition = protoLoader.loadSync(firestoreProtoFile, Object.assign(Object.assign({}, protoLoaderOptions), { includeDirs: [root] }));
|
|
14438
14505
|
return grpcJs.loadPackageDefinition(packageDefinition);
|
|
@@ -14721,12 +14788,13 @@ const HEALTHY_TIMEOUT_MS = 10 * 1000;
|
|
|
14721
14788
|
* ListenerType: The type of the listener that will be used for callbacks
|
|
14722
14789
|
*/
|
|
14723
14790
|
class PersistentStream {
|
|
14724
|
-
constructor(queue, connectionTimerId, idleTimerId, healthTimerId, connection,
|
|
14791
|
+
constructor(queue, connectionTimerId, idleTimerId, healthTimerId, connection, authCredentialsProvider, appCheckCredentialsProvider, listener) {
|
|
14725
14792
|
this.queue = queue;
|
|
14726
14793
|
this.idleTimerId = idleTimerId;
|
|
14727
14794
|
this.healthTimerId = healthTimerId;
|
|
14728
14795
|
this.connection = connection;
|
|
14729
|
-
this.
|
|
14796
|
+
this.authCredentialsProvider = authCredentialsProvider;
|
|
14797
|
+
this.appCheckCredentialsProvider = appCheckCredentialsProvider;
|
|
14730
14798
|
this.listener = listener;
|
|
14731
14799
|
this.state = 0 /* Initial */;
|
|
14732
14800
|
/**
|
|
@@ -14881,7 +14949,8 @@ class PersistentStream {
|
|
|
14881
14949
|
// fail, however. In this case, we should get a Code.UNAUTHENTICATED error
|
|
14882
14950
|
// before we received the first message and we need to invalidate the token
|
|
14883
14951
|
// to ensure that we fetch a new token.
|
|
14884
|
-
this.
|
|
14952
|
+
this.authCredentialsProvider.invalidateToken();
|
|
14953
|
+
this.appCheckCredentialsProvider.invalidateToken();
|
|
14885
14954
|
}
|
|
14886
14955
|
// Clean up the underlying stream because we are no longer interested in events.
|
|
14887
14956
|
if (this.stream !== null) {
|
|
@@ -14905,7 +14974,10 @@ class PersistentStream {
|
|
|
14905
14974
|
const dispatchIfNotClosed = this.getCloseGuardedDispatcher(this.closeCount);
|
|
14906
14975
|
// TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.
|
|
14907
14976
|
const closeCount = this.closeCount;
|
|
14908
|
-
|
|
14977
|
+
Promise.all([
|
|
14978
|
+
this.authCredentialsProvider.getToken(),
|
|
14979
|
+
this.appCheckCredentialsProvider.getToken()
|
|
14980
|
+
]).then(([authToken, appCheckToken]) => {
|
|
14909
14981
|
// Stream can be stopped while waiting for authentication.
|
|
14910
14982
|
// TODO(mikelehen): We really should just use dispatchIfNotClosed
|
|
14911
14983
|
// and let this dispatch onto the queue, but that opened a spec test can
|
|
@@ -14914,7 +14986,7 @@ class PersistentStream {
|
|
|
14914
14986
|
// Normally we'd have to schedule the callback on the AsyncQueue.
|
|
14915
14987
|
// However, the following calls are safe to be called outside the
|
|
14916
14988
|
// AsyncQueue since they don't chain asynchronous calls
|
|
14917
|
-
this.startStream(
|
|
14989
|
+
this.startStream(authToken, appCheckToken);
|
|
14918
14990
|
}
|
|
14919
14991
|
}, (error) => {
|
|
14920
14992
|
dispatchIfNotClosed(() => {
|
|
@@ -14923,9 +14995,9 @@ class PersistentStream {
|
|
|
14923
14995
|
});
|
|
14924
14996
|
});
|
|
14925
14997
|
}
|
|
14926
|
-
startStream(
|
|
14998
|
+
startStream(authToken, appCheckToken) {
|
|
14927
14999
|
const dispatchIfNotClosed = this.getCloseGuardedDispatcher(this.closeCount);
|
|
14928
|
-
this.stream = this.startRpc(
|
|
15000
|
+
this.stream = this.startRpc(authToken, appCheckToken);
|
|
14929
15001
|
this.stream.onOpen(() => {
|
|
14930
15002
|
dispatchIfNotClosed(() => {
|
|
14931
15003
|
this.state = 2 /* Open */;
|
|
@@ -14994,12 +15066,12 @@ class PersistentStream {
|
|
|
14994
15066
|
* sent from the server for ListenResponses.
|
|
14995
15067
|
*/
|
|
14996
15068
|
class PersistentListenStream extends PersistentStream {
|
|
14997
|
-
constructor(queue, connection,
|
|
14998
|
-
super(queue, "listen_stream_connection_backoff" /* ListenStreamConnectionBackoff */, "listen_stream_idle" /* ListenStreamIdle */, "health_check_timeout" /* HealthCheckTimeout */, connection,
|
|
15069
|
+
constructor(queue, connection, authCredentials, appCheckCredentials, serializer, listener) {
|
|
15070
|
+
super(queue, "listen_stream_connection_backoff" /* ListenStreamConnectionBackoff */, "listen_stream_idle" /* ListenStreamIdle */, "health_check_timeout" /* HealthCheckTimeout */, connection, authCredentials, appCheckCredentials, listener);
|
|
14999
15071
|
this.serializer = serializer;
|
|
15000
15072
|
}
|
|
15001
|
-
startRpc(
|
|
15002
|
-
return this.connection.openStream('Listen',
|
|
15073
|
+
startRpc(authToken, appCheckToken) {
|
|
15074
|
+
return this.connection.openStream('Listen', authToken, appCheckToken);
|
|
15003
15075
|
}
|
|
15004
15076
|
onMessage(watchChangeProto) {
|
|
15005
15077
|
// A successful response means the stream is healthy
|
|
@@ -15053,8 +15125,8 @@ class PersistentListenStream extends PersistentStream {
|
|
|
15053
15125
|
* TODO(b/33271235): Use proto types
|
|
15054
15126
|
*/
|
|
15055
15127
|
class PersistentWriteStream extends PersistentStream {
|
|
15056
|
-
constructor(queue, connection,
|
|
15057
|
-
super(queue, "write_stream_connection_backoff" /* WriteStreamConnectionBackoff */, "write_stream_idle" /* WriteStreamIdle */, "health_check_timeout" /* HealthCheckTimeout */, connection,
|
|
15128
|
+
constructor(queue, connection, authCredentials, appCheckCredentials, serializer, listener) {
|
|
15129
|
+
super(queue, "write_stream_connection_backoff" /* WriteStreamConnectionBackoff */, "write_stream_idle" /* WriteStreamIdle */, "health_check_timeout" /* HealthCheckTimeout */, connection, authCredentials, appCheckCredentials, listener);
|
|
15058
15130
|
this.serializer = serializer;
|
|
15059
15131
|
this.handshakeComplete_ = false;
|
|
15060
15132
|
}
|
|
@@ -15076,8 +15148,8 @@ class PersistentWriteStream extends PersistentStream {
|
|
|
15076
15148
|
this.writeMutations([]);
|
|
15077
15149
|
}
|
|
15078
15150
|
}
|
|
15079
|
-
startRpc(
|
|
15080
|
-
return this.connection.openStream('Write',
|
|
15151
|
+
startRpc(authToken, appCheckToken) {
|
|
15152
|
+
return this.connection.openStream('Write', authToken, appCheckToken);
|
|
15081
15153
|
}
|
|
15082
15154
|
onMessage(responseProto) {
|
|
15083
15155
|
// Always capture the last stream token.
|
|
@@ -15149,9 +15221,10 @@ class Datastore {
|
|
|
15149
15221
|
* consumption.
|
|
15150
15222
|
*/
|
|
15151
15223
|
class DatastoreImpl extends Datastore {
|
|
15152
|
-
constructor(
|
|
15224
|
+
constructor(authCredentials, appCheckCredentials, connection, serializer) {
|
|
15153
15225
|
super();
|
|
15154
|
-
this.
|
|
15226
|
+
this.authCredentials = authCredentials;
|
|
15227
|
+
this.appCheckCredentials = appCheckCredentials;
|
|
15155
15228
|
this.connection = connection;
|
|
15156
15229
|
this.serializer = serializer;
|
|
15157
15230
|
this.terminated = false;
|
|
@@ -15161,18 +15234,21 @@ class DatastoreImpl extends Datastore {
|
|
|
15161
15234
|
throw new FirestoreError(Code.FAILED_PRECONDITION, 'The client has already been terminated.');
|
|
15162
15235
|
}
|
|
15163
15236
|
}
|
|
15164
|
-
/**
|
|
15237
|
+
/** Invokes the provided RPC with auth and AppCheck tokens. */
|
|
15165
15238
|
invokeRPC(rpcName, path, request) {
|
|
15166
15239
|
this.verifyInitialized();
|
|
15167
|
-
return
|
|
15168
|
-
.getToken()
|
|
15169
|
-
.
|
|
15170
|
-
|
|
15240
|
+
return Promise.all([
|
|
15241
|
+
this.authCredentials.getToken(),
|
|
15242
|
+
this.appCheckCredentials.getToken()
|
|
15243
|
+
])
|
|
15244
|
+
.then(([authToken, appCheckToken]) => {
|
|
15245
|
+
return this.connection.invokeRPC(rpcName, path, request, authToken, appCheckToken);
|
|
15171
15246
|
})
|
|
15172
15247
|
.catch((error) => {
|
|
15173
15248
|
if (error.name === 'FirebaseError') {
|
|
15174
15249
|
if (error.code === Code.UNAUTHENTICATED) {
|
|
15175
|
-
this.
|
|
15250
|
+
this.authCredentials.invalidateToken();
|
|
15251
|
+
this.appCheckCredentials.invalidateToken();
|
|
15176
15252
|
}
|
|
15177
15253
|
throw error;
|
|
15178
15254
|
}
|
|
@@ -15181,18 +15257,21 @@ class DatastoreImpl extends Datastore {
|
|
|
15181
15257
|
}
|
|
15182
15258
|
});
|
|
15183
15259
|
}
|
|
15184
|
-
/**
|
|
15260
|
+
/** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */
|
|
15185
15261
|
invokeStreamingRPC(rpcName, path, request) {
|
|
15186
15262
|
this.verifyInitialized();
|
|
15187
|
-
return
|
|
15188
|
-
.getToken()
|
|
15189
|
-
.
|
|
15190
|
-
|
|
15263
|
+
return Promise.all([
|
|
15264
|
+
this.authCredentials.getToken(),
|
|
15265
|
+
this.appCheckCredentials.getToken()
|
|
15266
|
+
])
|
|
15267
|
+
.then(([authToken, appCheckToken]) => {
|
|
15268
|
+
return this.connection.invokeStreamingRPC(rpcName, path, request, authToken, appCheckToken);
|
|
15191
15269
|
})
|
|
15192
15270
|
.catch((error) => {
|
|
15193
15271
|
if (error.name === 'FirebaseError') {
|
|
15194
15272
|
if (error.code === Code.UNAUTHENTICATED) {
|
|
15195
|
-
this.
|
|
15273
|
+
this.authCredentials.invalidateToken();
|
|
15274
|
+
this.appCheckCredentials.invalidateToken();
|
|
15196
15275
|
}
|
|
15197
15276
|
throw error;
|
|
15198
15277
|
}
|
|
@@ -15207,8 +15286,8 @@ class DatastoreImpl extends Datastore {
|
|
|
15207
15286
|
}
|
|
15208
15287
|
// TODO(firestorexp): Make sure there is only one Datastore instance per
|
|
15209
15288
|
// firestore-exp client.
|
|
15210
|
-
function newDatastore(
|
|
15211
|
-
return new DatastoreImpl(
|
|
15289
|
+
function newDatastore(authCredentials, appCheckCredentials, connection, serializer) {
|
|
15290
|
+
return new DatastoreImpl(authCredentials, appCheckCredentials, connection, serializer);
|
|
15212
15291
|
}
|
|
15213
15292
|
async function invokeCommitRpc(datastore, mutations) {
|
|
15214
15293
|
const datastoreImpl = debugCast(datastore);
|
|
@@ -15241,12 +15320,12 @@ async function invokeBatchGetDocumentsRpc(datastore, keys) {
|
|
|
15241
15320
|
function newPersistentWriteStream(datastore, queue, listener) {
|
|
15242
15321
|
const datastoreImpl = debugCast(datastore);
|
|
15243
15322
|
datastoreImpl.verifyInitialized();
|
|
15244
|
-
return new PersistentWriteStream(queue, datastoreImpl.connection, datastoreImpl.
|
|
15323
|
+
return new PersistentWriteStream(queue, datastoreImpl.connection, datastoreImpl.authCredentials, datastoreImpl.appCheckCredentials, datastoreImpl.serializer, listener);
|
|
15245
15324
|
}
|
|
15246
15325
|
function newPersistentWatchStream(datastore, queue, listener) {
|
|
15247
15326
|
const datastoreImpl = debugCast(datastore);
|
|
15248
15327
|
datastoreImpl.verifyInitialized();
|
|
15249
|
-
return new PersistentListenStream(queue, datastoreImpl.connection, datastoreImpl.
|
|
15328
|
+
return new PersistentListenStream(queue, datastoreImpl.connection, datastoreImpl.authCredentials, datastoreImpl.appCheckCredentials, datastoreImpl.serializer, listener);
|
|
15250
15329
|
}
|
|
15251
15330
|
|
|
15252
15331
|
/**
|
|
@@ -18359,7 +18438,7 @@ class OnlineComponentProvider {
|
|
|
18359
18438
|
createDatastore(cfg) {
|
|
18360
18439
|
const serializer = newSerializer(cfg.databaseInfo.databaseId);
|
|
18361
18440
|
const connection = newConnection(cfg.databaseInfo);
|
|
18362
|
-
return newDatastore(cfg.
|
|
18441
|
+
return newDatastore(cfg.authCredentials, cfg.appCheckCredentials, connection, serializer);
|
|
18363
18442
|
}
|
|
18364
18443
|
createRemoteStore(cfg) {
|
|
18365
18444
|
return newRemoteStore(this.localStore, this.datastore, cfg.asyncQueue, onlineState => syncEngineApplyOnlineStateChange(this.syncEngine, onlineState, 0 /* RemoteStore */), newConnectivityMonitor());
|
|
@@ -19117,7 +19196,7 @@ const MAX_CONCURRENT_LIMBO_RESOLUTIONS = 100;
|
|
|
19117
19196
|
* async queue that is shared by all of the other components in the system.
|
|
19118
19197
|
*/
|
|
19119
19198
|
class FirestoreClient {
|
|
19120
|
-
constructor(
|
|
19199
|
+
constructor(authCredentials, appCheckCredentials,
|
|
19121
19200
|
/**
|
|
19122
19201
|
* Asynchronous queue responsible for all of our internal processing. When
|
|
19123
19202
|
* we get incoming work from the user (via public API) or the network
|
|
@@ -19127,30 +19206,34 @@ class FirestoreClient {
|
|
|
19127
19206
|
* an async I/O to complete).
|
|
19128
19207
|
*/
|
|
19129
19208
|
asyncQueue, databaseInfo) {
|
|
19130
|
-
this.
|
|
19209
|
+
this.authCredentials = authCredentials;
|
|
19210
|
+
this.appCheckCredentials = appCheckCredentials;
|
|
19131
19211
|
this.asyncQueue = asyncQueue;
|
|
19132
19212
|
this.databaseInfo = databaseInfo;
|
|
19133
19213
|
this.user = User.UNAUTHENTICATED;
|
|
19134
19214
|
this.clientId = AutoId.newId();
|
|
19135
|
-
this.
|
|
19136
|
-
this.
|
|
19215
|
+
this.authCredentialListener = () => Promise.resolve();
|
|
19216
|
+
this.authCredentials.start(asyncQueue, async (user) => {
|
|
19137
19217
|
logDebug(LOG_TAG$2, 'Received user=', user.uid);
|
|
19138
|
-
await this.
|
|
19218
|
+
await this.authCredentialListener(user);
|
|
19139
19219
|
this.user = user;
|
|
19140
19220
|
});
|
|
19221
|
+
// Register an empty credentials change listener to activate token refresh.
|
|
19222
|
+
this.appCheckCredentials.start(asyncQueue, () => Promise.resolve());
|
|
19141
19223
|
}
|
|
19142
19224
|
async getConfiguration() {
|
|
19143
19225
|
return {
|
|
19144
19226
|
asyncQueue: this.asyncQueue,
|
|
19145
19227
|
databaseInfo: this.databaseInfo,
|
|
19146
19228
|
clientId: this.clientId,
|
|
19147
|
-
|
|
19229
|
+
authCredentials: this.authCredentials,
|
|
19230
|
+
appCheckCredentials: this.appCheckCredentials,
|
|
19148
19231
|
initialUser: this.user,
|
|
19149
19232
|
maxConcurrentLimboResolutions: MAX_CONCURRENT_LIMBO_RESOLUTIONS
|
|
19150
19233
|
};
|
|
19151
19234
|
}
|
|
19152
19235
|
setCredentialChangeListener(listener) {
|
|
19153
|
-
this.
|
|
19236
|
+
this.authCredentialListener = listener;
|
|
19154
19237
|
}
|
|
19155
19238
|
/**
|
|
19156
19239
|
* Checks that the client has not been terminated. Ensures that other methods on
|
|
@@ -19175,7 +19258,8 @@ class FirestoreClient {
|
|
|
19175
19258
|
// The credentials provider must be terminated after shutting down the
|
|
19176
19259
|
// RemoteStore as it will prevent the RemoteStore from retrieving auth
|
|
19177
19260
|
// tokens.
|
|
19178
|
-
this.
|
|
19261
|
+
this.authCredentials.shutdown();
|
|
19262
|
+
this.appCheckCredentials.shutdown();
|
|
19179
19263
|
deferred.resolve();
|
|
19180
19264
|
}
|
|
19181
19265
|
catch (e) {
|
|
@@ -19698,8 +19782,9 @@ class FirestoreSettingsImpl {
|
|
|
19698
19782
|
*/
|
|
19699
19783
|
class Firestore$1 {
|
|
19700
19784
|
/** @hideconstructor */
|
|
19701
|
-
constructor(databaseIdOrApp,
|
|
19702
|
-
this.
|
|
19785
|
+
constructor(databaseIdOrApp, _authCredentials, _appCheckCredentials) {
|
|
19786
|
+
this._authCredentials = _authCredentials;
|
|
19787
|
+
this._appCheckCredentials = _appCheckCredentials;
|
|
19703
19788
|
/**
|
|
19704
19789
|
* Whether it's a Firestore or Firestore Lite instance.
|
|
19705
19790
|
*/
|
|
@@ -19740,7 +19825,7 @@ class Firestore$1 {
|
|
|
19740
19825
|
}
|
|
19741
19826
|
this._settings = new FirestoreSettingsImpl(settings);
|
|
19742
19827
|
if (settings.credentials !== undefined) {
|
|
19743
|
-
this.
|
|
19828
|
+
this._authCredentials = makeAuthCredentialsProvider(settings.credentials);
|
|
19744
19829
|
}
|
|
19745
19830
|
}
|
|
19746
19831
|
_getSettings() {
|
|
@@ -19821,7 +19906,7 @@ function connectFirestoreEmulator(firestore, host, port, options = {}) {
|
|
|
19821
19906
|
}
|
|
19822
19907
|
user = new User(uid);
|
|
19823
19908
|
}
|
|
19824
|
-
firestore.
|
|
19909
|
+
firestore._authCredentials = new EmulatorAuthCredentialsProvider(new OAuthToken(token, user));
|
|
19825
19910
|
}
|
|
19826
19911
|
}
|
|
19827
19912
|
|
|
@@ -20450,8 +20535,8 @@ const CACHE_SIZE_UNLIMITED = LRU_COLLECTION_DISABLED;
|
|
|
20450
20535
|
*/
|
|
20451
20536
|
class Firestore extends Firestore$1 {
|
|
20452
20537
|
/** @hideconstructor */
|
|
20453
|
-
constructor(databaseIdOrApp,
|
|
20454
|
-
super(databaseIdOrApp,
|
|
20538
|
+
constructor(databaseIdOrApp, authCredentialsProvider, appCheckCredentialsProvider) {
|
|
20539
|
+
super(databaseIdOrApp, authCredentialsProvider, appCheckCredentialsProvider);
|
|
20455
20540
|
/**
|
|
20456
20541
|
* Whether it's a {@link Firestore} or Firestore Lite instance.
|
|
20457
20542
|
*/
|
|
@@ -20528,7 +20613,7 @@ function configureFirestore(firestore) {
|
|
|
20528
20613
|
var _a;
|
|
20529
20614
|
const settings = firestore._freezeSettings();
|
|
20530
20615
|
const databaseInfo = makeDatabaseInfo(firestore._databaseId, ((_a = firestore._app) === null || _a === void 0 ? void 0 : _a.options.appId) || '', firestore._persistenceKey, settings);
|
|
20531
|
-
firestore._firestoreClient = new FirestoreClient(firestore.
|
|
20616
|
+
firestore._firestoreClient = new FirestoreClient(firestore._authCredentials, firestore._appCheckCredentials, firestore._queue, databaseInfo);
|
|
20532
20617
|
}
|
|
20533
20618
|
/**
|
|
20534
20619
|
* Attempts to enable persistent storage, if possible.
|
|
@@ -20823,11 +20908,11 @@ function registerFirestore(variant, useFetchStreams = true) {
|
|
|
20823
20908
|
setSDKVersion(app.SDK_VERSION);
|
|
20824
20909
|
app._registerComponent(new component.Component('firestore', (container, { options: settings }) => {
|
|
20825
20910
|
const app = container.getProvider('app').getImmediate();
|
|
20826
|
-
const firestoreInstance = new Firestore(app, new
|
|
20911
|
+
const firestoreInstance = new Firestore(app, new FirebaseAuthCredentialsProvider(container.getProvider('auth-internal')), new FirebaseAppCheckTokenProvider(container.getProvider('app-check-internal')));
|
|
20827
20912
|
settings = Object.assign({ useFetchStreams }, settings);
|
|
20828
20913
|
firestoreInstance._setSettings(settings);
|
|
20829
20914
|
return firestoreInstance;
|
|
20830
|
-
},
|
|
20915
|
+
}, 'PUBLIC'));
|
|
20831
20916
|
app.registerVersion(name, version$1, variant);
|
|
20832
20917
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
20833
20918
|
app.registerVersion(name, version$1, 'cjs2017');
|
|
@@ -23514,7 +23599,8 @@ exports.Transaction = Transaction;
|
|
|
23514
23599
|
exports.WriteBatch = WriteBatch;
|
|
23515
23600
|
exports._DatabaseId = DatabaseId;
|
|
23516
23601
|
exports._DocumentKey = DocumentKey;
|
|
23517
|
-
exports.
|
|
23602
|
+
exports._EmptyAppCheckTokenProvider = EmptyAppCheckTokenProvider;
|
|
23603
|
+
exports._EmptyAuthCredentialsProvider = EmptyAuthCredentialsProvider;
|
|
23518
23604
|
exports._FieldPath = FieldPath$1;
|
|
23519
23605
|
exports._cast = cast;
|
|
23520
23606
|
exports._debugAssert = debugAssert;
|