@firebase/firestore 3.9.0-canary.ae22c61de → 3.9.0-canary.ce79f7fe2

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.
Files changed (35) hide show
  1. package/dist/firestore/src/api/credentials.d.ts +7 -15
  2. package/dist/index.cjs.js +1583 -1584
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm2017.js +1583 -1584
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.esm5.js +2278 -2279
  7. package/dist/index.esm5.js.map +1 -1
  8. package/dist/index.node.cjs.js +12 -17
  9. package/dist/index.node.cjs.js.map +1 -1
  10. package/dist/index.node.mjs +12 -17
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/index.rn.js +1583 -1584
  13. package/dist/index.rn.js.map +1 -1
  14. package/dist/internal.d.ts +1 -2
  15. package/dist/lite/firestore/src/api/credentials.d.ts +7 -15
  16. package/dist/lite/index.browser.esm2017.js +203 -204
  17. package/dist/lite/index.browser.esm2017.js.map +1 -1
  18. package/dist/lite/index.browser.esm5.js +442 -443
  19. package/dist/lite/index.browser.esm5.js.map +1 -1
  20. package/dist/lite/index.cjs.js +203 -204
  21. package/dist/lite/index.cjs.js.map +1 -1
  22. package/dist/lite/index.node.cjs.js +12 -17
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +12 -17
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +203 -204
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/internal.d.ts +1 -2
  29. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +11 -11
  30. package/dist/lite/packages/firestore/src/api/credentials.d.ts +7 -15
  31. package/dist/lite/private.d.ts +1 -2
  32. package/dist/packages/firestore/dist/index.esm2017.d.ts +268 -268
  33. package/dist/packages/firestore/src/api/credentials.d.ts +7 -15
  34. package/dist/private.d.ts +1 -2
  35. package/package.json +9 -9
@@ -33,7 +33,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
33
33
  var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
34
34
 
35
35
  const name = "@firebase/firestore";
36
- const version$1 = "3.9.0-canary.ae22c61de";
36
+ const version$1 = "3.9.0-canary.ce79f7fe2";
37
37
 
38
38
  /**
39
39
  * @license
@@ -86,7 +86,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
86
86
  User.FIRST_PARTY = new User('first-party-uid');
87
87
  User.MOCK_USER = new User('mock-user');
88
88
 
89
- const version = "9.18.0-canary.ae22c61de";
89
+ const version = "9.18.0-canary.ce79f7fe2";
90
90
 
91
91
  /**
92
92
  * @license
@@ -641,8 +641,7 @@ class FirebaseAuthCredentialsProvider {
641
641
  * safer to keep the implementation as-is.
642
642
  */
643
643
  class FirstPartyToken {
644
- constructor(gapi, sessionIndex, iamToken, authTokenFactory) {
645
- this.gapi = gapi;
644
+ constructor(sessionIndex, iamToken, authTokenFactory) {
646
645
  this.sessionIndex = sessionIndex;
647
646
  this.iamToken = iamToken;
648
647
  this.authTokenFactory = authTokenFactory;
@@ -650,18 +649,16 @@ class FirstPartyToken {
650
649
  this.user = User.FIRST_PARTY;
651
650
  this._headers = new Map();
652
651
  }
653
- /** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */
652
+ /**
653
+ * Gets an authorization token, using a provided factory function, or return
654
+ * null.
655
+ */
654
656
  getAuthToken() {
655
657
  if (this.authTokenFactory) {
656
658
  return this.authTokenFactory();
657
659
  }
658
660
  else {
659
- // Make sure this really is a Gapi client.
660
- hardAssert(!!(typeof this.gapi === 'object' &&
661
- this.gapi !== null &&
662
- this.gapi['auth'] &&
663
- this.gapi['auth']['getAuthHeaderValueForFirstParty']));
664
- return this.gapi['auth']['getAuthHeaderValueForFirstParty']([]);
661
+ return null;
665
662
  }
666
663
  }
667
664
  get headers() {
@@ -683,14 +680,13 @@ class FirstPartyToken {
683
680
  * to applications hosted by Google.
684
681
  */
685
682
  class FirstPartyAuthCredentialsProvider {
686
- constructor(gapi, sessionIndex, iamToken, authTokenFactory) {
687
- this.gapi = gapi;
683
+ constructor(sessionIndex, iamToken, authTokenFactory) {
688
684
  this.sessionIndex = sessionIndex;
689
685
  this.iamToken = iamToken;
690
686
  this.authTokenFactory = authTokenFactory;
691
687
  }
692
688
  getToken() {
693
- return Promise.resolve(new FirstPartyToken(this.gapi, this.sessionIndex, this.iamToken, this.authTokenFactory));
689
+ return Promise.resolve(new FirstPartyToken(this.sessionIndex, this.iamToken, this.authTokenFactory));
694
690
  }
695
691
  start(asyncQueue, changeListener) {
696
692
  // Fire with initial uid.
@@ -799,9 +795,8 @@ function makeAuthCredentialsProvider(credentials) {
799
795
  return new EmptyAuthCredentialsProvider();
800
796
  }
801
797
  switch (credentials['type']) {
802
- case 'gapi':
803
- const client = credentials['client'];
804
- return new FirstPartyAuthCredentialsProvider(client, credentials['sessionIndex'] || '0', credentials['iamToken'] || null, credentials['authTokenFactory'] || null);
798
+ case 'firstParty':
799
+ return new FirstPartyAuthCredentialsProvider(credentials['sessionIndex'] || '0', credentials['iamToken'] || null, credentials['authTokenFactory'] || null);
805
800
  case 'provider':
806
801
  return credentials['client'];
807
802
  default: