@infrab4a/connect 4.4.0-beta.6 → 4.4.0-beta.7

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/index.cjs.js CHANGED
@@ -3639,6 +3639,7 @@ class ConnectDocumentService {
3639
3639
  return this.reference.id;
3640
3640
  }
3641
3641
  async save(data) {
3642
+ console.log('save ConnectDocumentService', data);
3642
3643
  const doc = await firestore.getDoc(this.reference);
3643
3644
  if (doc.exists())
3644
3645
  await firestore.updateDoc(this.reference, data);
@@ -3683,7 +3684,7 @@ class ConnectCollectionService {
3683
3684
  return firestore.getDocs(firestore.query(this.reference, ...constraints));
3684
3685
  }
3685
3686
  getDoc(id) {
3686
- return new ConnectDocumentService(`${this.reference.path}/${id}`, this.firestore);
3687
+ return new ConnectDocumentService(`${this.reference.path}/${id}`, this.firestore).withConverter(this.reference.converter);
3687
3688
  }
3688
3689
  where(attribute, operator, value) {
3689
3690
  this.wheres.push(firestore.where(attribute, operator, value));
@@ -3714,6 +3715,7 @@ class ConnectCollectionService {
3714
3715
  return this;
3715
3716
  }
3716
3717
  async save(data, id) {
3718
+ console.log('save ConnectCollectionService', data, id);
3717
3719
  if (lodash.isEmpty(id))
3718
3720
  return firestore.addDoc(this.reference, data);
3719
3721
  const docRef = firestore.doc(this.reference, id);
package/index.esm.js CHANGED
@@ -3615,6 +3615,7 @@ class ConnectDocumentService {
3615
3615
  return this.reference.id;
3616
3616
  }
3617
3617
  async save(data) {
3618
+ console.log('save ConnectDocumentService', data);
3618
3619
  const doc = await getDoc(this.reference);
3619
3620
  if (doc.exists())
3620
3621
  await updateDoc(this.reference, data);
@@ -3659,7 +3660,7 @@ class ConnectCollectionService {
3659
3660
  return getDocs(query(this.reference, ...constraints));
3660
3661
  }
3661
3662
  getDoc(id) {
3662
- return new ConnectDocumentService(`${this.reference.path}/${id}`, this.firestore);
3663
+ return new ConnectDocumentService(`${this.reference.path}/${id}`, this.firestore).withConverter(this.reference.converter);
3663
3664
  }
3664
3665
  where(attribute, operator, value) {
3665
3666
  this.wheres.push(where(attribute, operator, value));
@@ -3690,6 +3691,7 @@ class ConnectCollectionService {
3690
3691
  return this;
3691
3692
  }
3692
3693
  async save(data, id) {
3694
+ console.log('save ConnectCollectionService', data, id);
3693
3695
  if (isEmpty(id))
3694
3696
  return addDoc(this.reference, data);
3695
3697
  const docRef = doc(this.reference, id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.4.0-beta.6",
3
+ "version": "4.4.0-beta.7",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },