@aws-amplify/datastore 3.7.1 → 3.7.3-unstable.2

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 CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.7.2](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.7.1...@aws-amplify/datastore@3.7.2) (2021-12-03)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/datastore
9
+
10
+
11
+
12
+
13
+
6
14
  ## [3.7.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.7.0...@aws-amplify/datastore@3.7.1) (2021-12-02)
7
15
 
8
16
 
@@ -70458,7 +70458,7 @@ var getAmplifyUserAgent = function getAmplifyUserAgent() {
70458
70458
  __webpack_require__.r(__webpack_exports__);
70459
70459
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
70460
70460
  // generated by genversion
70461
- var version = '4.3.8';
70461
+ var version = '4.3.10';
70462
70462
 
70463
70463
  /***/ }),
70464
70464
 
@@ -82381,19 +82381,21 @@ function () {
82381
82381
  criteria).subscribe(function (_a) {
82382
82382
  var element = _a.element,
82383
82383
  model = _a.model,
82384
- opType = _a.opType; // Flag items which have been recently deleted
82384
+ opType = _a.opType;
82385
+
82386
+ var _b, _c; // Flag items which have been recently deleted
82385
82387
  // NOTE: Merging of separate operations to the same model instance is handled upstream
82386
82388
  // in the `mergePage` method within src/sync/merger.ts. The final state of a model instance
82387
82389
  // depends on the LATEST record (for a given id).
82388
82390
 
82391
+
82389
82392
  if (opType === 'DELETE') {
82390
82393
  deletedItemIds.push(element.id);
82391
82394
  } else {
82392
82395
  itemsChanged.set(element.id, element);
82393
82396
  }
82394
82397
 
82395
- var isSynced = _this.sync.getModelSyncedStatus(model);
82396
-
82398
+ var isSynced = (_c = (_b = _this.sync) === null || _b === void 0 ? void 0 : _b.getModelSyncedStatus(model)) !== null && _c !== void 0 ? _c : false;
82397
82399
  var limit = itemsChanged.size - deletedItemIds.length >= _this.syncPageSize;
82398
82400
 
82399
82401
  if (limit || isSynced) {
@@ -82427,7 +82429,9 @@ function () {
82427
82429
 
82428
82430
 
82429
82431
  var generateSnapshot = function generateSnapshot() {
82430
- var isSynced = _this.sync.getModelSyncedStatus(model);
82432
+ var _a, _b;
82433
+
82434
+ var isSynced = (_b = (_a = _this.sync) === null || _a === void 0 ? void 0 : _a.getModelSyncedStatus(model)) !== null && _b !== void 0 ? _b : false;
82431
82435
 
82432
82436
  var itemsArray = __spread(Array.from(items.values()), Array.from(itemsChanged.values()));
82433
82437