kuzzle 2.56.0-beta.2 → 2.56.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.
@@ -175,11 +175,11 @@ class DocumentController extends NativeController {
175
175
  const format = request.getString("format", "jsonl");
176
176
  const separator = request.getString("separator", ",");
177
177
  const query = request.getObjectFromBodyOrArgs("query", {});
178
- const collapse = request.getObjectFromBodyOrArgs("collapse");
178
+ const collapse = request.getObjectFromBodyOrArgs("collapse", {});
179
179
  const fields = request.getArrayFromBodyOrArgs("fields", []);
180
180
  const fieldsName = request.getObjectFromBodyOrArgs("fieldsName", {});
181
181
  const searchBody = { query };
182
- if (collapse) {
182
+ if (Object.keys(collapse).length > 0) {
183
183
  searchBody.collapse = collapse;
184
184
  }
185
185
  if (request.context.connection.protocol !== "http") {
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.56.0-beta.2",
4
+ "version": "2.56.0",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node ./bin/copy-binaries.js",
@@ -17,6 +17,7 @@
17
17
  "test:functional:websocket": "KUZZLE_PROTOCOL=websocket cucumber-js --profile websocket --config cucumber.config.cjs",
18
18
  "test:unit:vitest": "vitest run --fileParallelism false --coverage --bail=1 --passWithNoTests",
19
19
  "test:unit:mocha": "mocha --exit",
20
+ "test:unit:mocha:coverage": "c8 --reporter=lcov --report-dir=coverage mocha --exit",
20
21
  "test:lint": "eslint ./lib ./test ./bin ./features"
21
22
  },
22
23
  "main": "./dist/index.js",
@@ -81,6 +82,7 @@
81
82
  "@types/passport": "1.0.17",
82
83
  "@vitest/coverage-v8": "4.0.16",
83
84
  "async": "3.2.6",
85
+ "c8": "^11.0.0",
84
86
  "eslint-plugin-kuzzle": "0.0.15",
85
87
  "mocha": "11.7.5",
86
88
  "mock-require": "3.0.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.56.0-beta.2",
4
+ "version": "2.56.0",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node ./bin/copy-binaries.js",
@@ -17,6 +17,7 @@
17
17
  "test:functional:websocket": "KUZZLE_PROTOCOL=websocket cucumber-js --profile websocket --config cucumber.config.cjs",
18
18
  "test:unit:vitest": "vitest run --fileParallelism false --coverage --bail=1 --passWithNoTests",
19
19
  "test:unit:mocha": "mocha --exit",
20
+ "test:unit:mocha:coverage": "c8 --reporter=lcov --report-dir=coverage mocha --exit",
20
21
  "test:lint": "eslint ./lib ./test ./bin ./features"
21
22
  },
22
23
  "main": "./dist/index.js",
@@ -81,6 +82,7 @@
81
82
  "@types/passport": "1.0.17",
82
83
  "@vitest/coverage-v8": "4.0.16",
83
84
  "async": "3.2.6",
85
+ "c8": "^11.0.0",
84
86
  "eslint-plugin-kuzzle": "0.0.15",
85
87
  "mocha": "11.7.5",
86
88
  "mock-require": "3.0.3",