cozy-harvest-lib 18.2.0 → 18.2.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,28 @@
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
+ ## [18.2.2](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@18.2.1...cozy-harvest-lib@18.2.2) (2023-10-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Optimize que buildCountTriggersQuery ([854e68a](https://github.com/cozy/cozy-libs/commit/854e68adb3434abcab10fc2bf50c0f8ee66df585))
12
+
13
+
14
+
15
+
16
+
17
+ ## [18.2.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@18.2.0...cozy-harvest-lib@18.2.1) (2023-10-12)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * Change flag name to always show the clisk worker ([d7ee2f7](https://github.com/cozy/cozy-libs/commit/d7ee2f77a8b62f8a29a5099777a3c20c23558d01))
23
+
24
+
25
+
26
+
27
+
6
28
  # [18.2.0](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@18.1.3...cozy-harvest-lib@18.2.0) (2023-10-12)
7
29
 
8
30
 
@@ -82,12 +82,14 @@ export var buildAppsByIdQuery = function buildAppsByIdQuery(appSlug) {
82
82
  export var buildCountTriggersQuery = function buildCountTriggersQuery() {
83
83
  return {
84
84
  definition: Q('io.cozy.triggers').where({
85
- $or: [{
86
- worker: 'client'
87
- }, {
88
- worker: 'konnector'
89
- }]
90
- }).indexFields(['worker']),
85
+ _id: {
86
+ $gt: null
87
+ }
88
+ }).partialIndex({
89
+ worker: {
90
+ $in: ['konnector', 'client']
91
+ }
92
+ }).indexFields(['_id']),
91
93
  options: {
92
94
  as: 'io.cozy.triggers/by_worker_client_konnector',
93
95
  fetchPolicy: defaultFetchPolicy
@@ -158,7 +158,7 @@ function startLauncher(_ref2) {
158
158
  konnector: konnector,
159
159
  account: account,
160
160
  trigger: trigger,
161
- DEBUG: flag('debug') ? true : false
161
+ DEBUG: flag('clisk.always-show-worker') ? true : false
162
162
  }
163
163
  }));
164
164
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-harvest-lib",
3
- "version": "18.2.0",
3
+ "version": "18.2.2",
4
4
  "description": "Provides logic, modules and components for Cozy's harvest applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -112,5 +112,5 @@
112
112
  "react-router-dom": ">=4.3.1"
113
113
  },
114
114
  "sideEffects": false,
115
- "gitHead": "263e7855ca380bce6202f0ef242483b8f77d6469"
115
+ "gitHead": "db1beed511c49a1083ff9e95cda069d04f850d6d"
116
116
  }
@@ -72,8 +72,13 @@ export const buildAppsByIdQuery = appSlug => ({
72
72
 
73
73
  export const buildCountTriggersQuery = () => ({
74
74
  definition: Q('io.cozy.triggers')
75
- .where({ $or: [{ worker: 'client' }, { worker: 'konnector' }] })
76
- .indexFields(['worker']),
75
+ .where({
76
+ _id: { $gt: null }
77
+ })
78
+ .partialIndex({
79
+ worker: { $in: ['konnector', 'client'] }
80
+ })
81
+ .indexFields(['_id']),
77
82
  options: {
78
83
  as: 'io.cozy.triggers/by_worker_client_konnector',
79
84
  fetchPolicy: defaultFetchPolicy
@@ -109,7 +109,7 @@ function startLauncher({ konnector, account, trigger, flow }) {
109
109
  konnector,
110
110
  account,
111
111
  trigger,
112
- DEBUG: flag('debug') ? true : false
112
+ DEBUG: flag('clisk.always-show-worker') ? true : false
113
113
  }
114
114
  })
115
115
  )