cozy-client 34.1.1 → 34.1.3
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/dist/CozyClient.js +1 -1
- package/dist/store/queries.js +2 -2
- package/dist/store/queries.spec.js +16 -0
- package/package.json +4 -4
package/dist/CozyClient.js
CHANGED
|
@@ -2644,7 +2644,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2644
2644
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2645
2645
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2646
2646
|
|
|
2647
|
-
CozyClient.version = "34.1.
|
|
2647
|
+
CozyClient.version = "34.1.3";
|
|
2648
2648
|
|
|
2649
2649
|
_microee.default.mixin(CozyClient);
|
|
2650
2650
|
|
package/dist/store/queries.js
CHANGED
|
@@ -304,7 +304,7 @@ var convert$gtNullSelectors = function convert$gtNullSelectors(selector) {
|
|
|
304
304
|
exports.convert$gtNullSelectors = convert$gtNullSelectors;
|
|
305
305
|
|
|
306
306
|
var mergeSelectorAndPartialIndex = function mergeSelectorAndPartialIndex(queryDefinition) {
|
|
307
|
-
return _objectSpread(_objectSpread({}, queryDefinition
|
|
307
|
+
return _objectSpread(_objectSpread({}, (0, _get.default)(queryDefinition, 'selector')), (0, _get.default)(queryDefinition, 'partialFilter'));
|
|
308
308
|
};
|
|
309
309
|
/**
|
|
310
310
|
* @param {QueryDefinition} queryDefinition - A query definition
|
|
@@ -315,7 +315,7 @@ var mergeSelectorAndPartialIndex = function mergeSelectorAndPartialIndex(queryDe
|
|
|
315
315
|
exports.mergeSelectorAndPartialIndex = mergeSelectorAndPartialIndex;
|
|
316
316
|
|
|
317
317
|
var getSelectorFilterFn = function getSelectorFilterFn(queryDefinition) {
|
|
318
|
-
if (queryDefinition.selector) {
|
|
318
|
+
if (queryDefinition.selector || queryDefinition.partialFilter) {
|
|
319
319
|
var selectors = mergeSelectorAndPartialIndex(queryDefinition); // sift does not work like couchdb when using { $gt: null } as a selector, so we use a custom operator
|
|
320
320
|
|
|
321
321
|
_sift.default.use({
|
|
@@ -418,6 +418,22 @@ describe('mergeSelectorAndPartialIndex', () => {
|
|
|
418
418
|
|
|
419
419
|
expect(mergeSelectorAndPartialIndex(query)).toMatchObject(result)
|
|
420
420
|
})
|
|
421
|
+
|
|
422
|
+
it('should return a selector even if only partial index', () => {
|
|
423
|
+
const query = Q('io.cozy.files').partialIndex({
|
|
424
|
+
specificAttributes: {
|
|
425
|
+
$exists: false
|
|
426
|
+
}
|
|
427
|
+
})
|
|
428
|
+
|
|
429
|
+
const result = {
|
|
430
|
+
specificAttributes: {
|
|
431
|
+
$exists: false
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
expect(mergeSelectorAndPartialIndex(query)).toMatchObject(result)
|
|
436
|
+
})
|
|
421
437
|
})
|
|
422
438
|
|
|
423
439
|
describe('sortAndLimitDocsIds', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "34.1.
|
|
3
|
+
"version": "34.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/jest": "^26.0.20",
|
|
19
19
|
"@types/lodash": "^4.14.170",
|
|
20
20
|
"btoa": "^1.2.1",
|
|
21
|
-
"cozy-stack-client": "^34.1.
|
|
21
|
+
"cozy-stack-client": "^34.1.2",
|
|
22
22
|
"json-stable-stringify": "^1.0.1",
|
|
23
23
|
"lodash": "^4.17.13",
|
|
24
24
|
"microee": "^0.0.6",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"babel-plugin-search-and-replace": "1.1.1",
|
|
49
49
|
"btoa": "1.2.1",
|
|
50
50
|
"cozy-device-helper": "2.5.0",
|
|
51
|
-
"cozy-flags": "2.
|
|
51
|
+
"cozy-flags": "2.10.2",
|
|
52
52
|
"cozy-logger": "1.7.0",
|
|
53
53
|
"cozy-ui": "48.0.0",
|
|
54
54
|
"date-fns": "2.27.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "931587ec6e80e5ab3c5b948c1878d4b7ea9eb359"
|
|
77
77
|
}
|