@data-weave/backend-firestore 0.4.22 → 0.4.23

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.
@@ -23,13 +23,13 @@ class FirestoreMetadataConverter {
23
23
  };
24
24
  }
25
25
  fromFirestore(snapshot, options) {
26
- var _a, _b;
26
+ var _a, _b, _c, _d;
27
27
  const data = snapshot.data(options);
28
28
  return {
29
29
  id: snapshot.ref.id,
30
30
  // TODO: add warning in case data type is not as expected
31
- createdAt: (_a = data[FIRESTORE_INTERAL_KEYS.CREATED_AT]) === null || _a === void 0 ? void 0 : _a.toDate(),
32
- updatedAt: (_b = data[FIRESTORE_INTERAL_KEYS.UPDATED_AT]) === null || _b === void 0 ? void 0 : _b.toDate(),
31
+ createdAt: (_b = (_a = data[FIRESTORE_INTERAL_KEYS.CREATED_AT]) === null || _a === void 0 ? void 0 : _a.toDate()) !== null && _b !== void 0 ? _b : new Date(),
32
+ updatedAt: (_d = (_c = data[FIRESTORE_INTERAL_KEYS.UPDATED_AT]) === null || _c === void 0 ? void 0 : _c.toDate()) !== null && _d !== void 0 ? _d : new Date(),
33
33
  deleted: data[FIRESTORE_INTERAL_KEYS.DELETED],
34
34
  };
35
35
  }
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  // Generated by genversion.
3
- module.exports = '0.4.22';
3
+ module.exports = '0.4.23';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-weave/backend-firestore",
3
- "version": "0.4.22",
3
+ "version": "0.4.23",
4
4
  "author": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "registry": "https://registry.npmjs.org/"
24
24
  },
25
25
  "peerDependencies": {
26
- "@data-weave/datamanager": "~0.4.21",
26
+ "@data-weave/datamanager": "~0.4.22",
27
27
  "firebase": ">=11.0.0"
28
28
  },
29
- "gitHead": "9072bd15da9565106e0641d6b78d67729689599e"
29
+ "gitHead": "e312f101359bfe0e3f96c1066aa8666abd470e53"
30
30
  }