@next-core/brick-utils 2.42.2 → 2.43.0

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,17 @@
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
+ # [2.43.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.42.2...@next-core/brick-utils@2.43.0) (2022-10-09)
7
+
8
+
9
+ ### Features
10
+
11
+ * collect useBackend api contract ([926f10a](https://github.com/easyops-cn/next-core/commit/926f10a7a88bfe7d4bebbf083ab4c0aba853210a))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.42.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.42.1...@next-core/brick-utils@2.42.2) (2022-09-29)
7
18
 
8
19
  **Note:** Version bump only for package @next-core/brick-utils
@@ -763,20 +763,32 @@
763
763
  collectUsedBricksInProperties(item, collection);
764
764
  });
765
765
  } else if (isObject(value)) {
766
- if (value.useBrick) {
767
- [].concat(value.useBrick).forEach(useBrickConf => {
768
- if (typeof (useBrickConf === null || useBrickConf === void 0 ? void 0 : useBrickConf.brick) === "string") {
769
- collection.push(useBrickConf.brick);
770
- collectUsedBricksInProperties(useBrickConf.properties, collection);
771
- collectUsedBricksInEventHandlers(useBrickConf.events, collection);
772
-
773
- if (useBrickConf.slots) {
774
- Object.values(useBrickConf.slots).forEach(slotConf => {
775
- collectBricksInBrickConfs(slotConf.bricks, collection);
776
- });
766
+ if (value.useBrick || value.useBackend) {
767
+ if (value.useBrick) {
768
+ [].concat(value.useBrick).forEach(useBrickConf => {
769
+ if (typeof (useBrickConf === null || useBrickConf === void 0 ? void 0 : useBrickConf.brick) === "string") {
770
+ collection.push(useBrickConf.brick);
771
+ collectUsedBricksInProperties(useBrickConf.properties, collection);
772
+ collectUsedBricksInEventHandlers(useBrickConf.events, collection);
773
+
774
+ if (useBrickConf.slots) {
775
+ Object.values(useBrickConf.slots).forEach(slotConf => {
776
+ collectBricksInBrickConfs(slotConf.bricks, collection);
777
+ });
778
+ }
777
779
  }
780
+ });
781
+ }
782
+
783
+ if (value.useBackend) {
784
+ var _value$useBackend;
785
+
786
+ if (typeof ((_value$useBackend = value.useBackend) === null || _value$useBackend === void 0 ? void 0 : _value$useBackend.provider) === "string") {
787
+ var _value$useBackend2;
788
+
789
+ collection.push((_value$useBackend2 = value.useBackend) === null || _value$useBackend2 === void 0 ? void 0 : _value$useBackend2.provider);
778
790
  }
779
- });
791
+ }
780
792
  } else {
781
793
  Object.values(value).forEach(item => {
782
794
  collectUsedBricksInProperties(item, collection);