@pisell/pisellos 2.2.80 → 2.2.81

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.
@@ -1645,9 +1645,18 @@ export var ProductsModule = /*#__PURE__*/function (_BaseModule) {
1645
1645
  sseRefreshCount: uniqueSSEIds.length,
1646
1646
  priceRefreshCount: uniquePriceIds.length
1647
1647
  });
1648
- _context18.next = 72;
1648
+
1649
+ // 如果都没有变更,则不触发 onProductsSyncCompleted
1650
+ if (!(uniqueDeleteIds.length === 0 && bodyUpdates.size === 0 && uniqueSSEIds.length === 0 && uniquePriceIds.length === 0)) {
1651
+ _context18.next = 73;
1652
+ break;
1653
+ }
1654
+ this.logInfo('processProductSyncMessages: 没有变更,不触发 onProductsSyncCompleted');
1655
+ return _context18.abrupt("return");
1656
+ case 73:
1657
+ _context18.next = 75;
1649
1658
  return this.core.effects.emit(ProductsHooks.onProductsSyncCompleted, null);
1650
- case 72:
1659
+ case 75:
1651
1660
  case "end":
1652
1661
  return _context18.stop();
1653
1662
  }
@@ -946,6 +946,10 @@ var ProductsModule = class extends import_BaseModule.BaseModule {
946
946
  sseRefreshCount: uniqueSSEIds.length,
947
947
  priceRefreshCount: uniquePriceIds.length
948
948
  });
949
+ if (uniqueDeleteIds.length === 0 && bodyUpdates.size === 0 && uniqueSSEIds.length === 0 && uniquePriceIds.length === 0) {
950
+ this.logInfo("processProductSyncMessages: 没有变更,不触发 onProductsSyncCompleted");
951
+ return;
952
+ }
949
953
  await this.core.effects.emit(import_types.ProductsHooks.onProductsSyncCompleted, null);
950
954
  }
951
955
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.80",
4
+ "version": "2.2.81",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",