kuzzle 2.26.2 → 2.27.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/lib/config/default.config.d.ts +1 -1
- package/lib/config/default.config.js +3 -1
- package/lib/config/index.js +10 -2
- package/lib/core/network/protocols/httpMessage.js +2 -2
- package/lib/core/network/protocols/httpwsProtocol.js +2 -0
- package/lib/service/storage/elasticsearch.js +1 -0
- package/lib/types/config/ServerConfiguration.d.ts +12 -0
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { KuzzleConfiguration } from "../types/config/KuzzleConfiguration";
|
|
|
4
4
|
*
|
|
5
5
|
* To customize your Kuzzle installation, create a
|
|
6
6
|
* ".kuzzlerc" file and put your overrides there.
|
|
7
|
-
* Please check the ".kuzzlerc.sample" file to get
|
|
7
|
+
* Please check the ".kuzzlerc.sample.jsonc" file to get
|
|
8
8
|
* started.
|
|
9
9
|
*
|
|
10
10
|
* @class KuzzleConfiguration
|
|
@@ -10,7 +10,7 @@ const httpRoutes_js_1 = __importDefault(require("../api/httpRoutes.js"));
|
|
|
10
10
|
*
|
|
11
11
|
* To customize your Kuzzle installation, create a
|
|
12
12
|
* ".kuzzlerc" file and put your overrides there.
|
|
13
|
-
* Please check the ".kuzzlerc.sample" file to get
|
|
13
|
+
* Please check the ".kuzzlerc.sample.jsonc" file to get
|
|
14
14
|
* started.
|
|
15
15
|
*
|
|
16
16
|
* @class KuzzleConfiguration
|
|
@@ -234,6 +234,8 @@ const defaultConfig = {
|
|
|
234
234
|
compression: false,
|
|
235
235
|
rateLimit: 0,
|
|
236
236
|
realtimeNotifications: true,
|
|
237
|
+
resetIdleTimeoutOnSend: false,
|
|
238
|
+
sendPingsAutomatically: false,
|
|
237
239
|
},
|
|
238
240
|
},
|
|
239
241
|
strictSdkVersion: true,
|
package/lib/config/index.js
CHANGED
|
@@ -197,7 +197,15 @@ function checkWebSocketOptions(config) {
|
|
|
197
197
|
);
|
|
198
198
|
assert(
|
|
199
199
|
typeof cfg.compression === "boolean",
|
|
200
|
-
`[websocket] "compression" parameter: invalid value "${cfg.compression}" (boolean
|
|
200
|
+
`[websocket] "compression" parameter: invalid value "${cfg.compression}" (boolean expected)`
|
|
201
|
+
);
|
|
202
|
+
assert(
|
|
203
|
+
typeof cfg.sendPingsAutomatically === "boolean",
|
|
204
|
+
`[websocket] "sendPingsAutomatically" parameter: invalid value "${cfg.sendPingsAutomatically}" (boolean expected)`
|
|
205
|
+
);
|
|
206
|
+
assert(
|
|
207
|
+
typeof cfg.resetIdleTimeoutOnSend === "boolean",
|
|
208
|
+
`[websocket] "resetIdleTimeoutOnSend" parameter: invalid value "${cfg.resetIdleTimeoutOnSend}" (boolean expected)`
|
|
201
209
|
);
|
|
202
210
|
}
|
|
203
211
|
|
|
@@ -334,7 +342,7 @@ function preprocessProtocolsOptions(config) {
|
|
|
334
342
|
|
|
335
343
|
function preprocessRedisOptions(redisConfig) {
|
|
336
344
|
// @deprecated Remove those lines for Kuzzle v3 then
|
|
337
|
-
// remove also 'database' from .kuzzlerc.sample and default.config
|
|
345
|
+
// remove also 'database' from .kuzzlerc.sample.jsonc and default.config
|
|
338
346
|
if (redisConfig.database) {
|
|
339
347
|
redisConfig.options = { db: redisConfig.database, ...redisConfig.options };
|
|
340
348
|
}
|
|
@@ -33,10 +33,10 @@ class HttpMessage {
|
|
|
33
33
|
this.connection = connection;
|
|
34
34
|
this._content = null;
|
|
35
35
|
this.ips = connection.ips;
|
|
36
|
-
this.query = request.getQuery()
|
|
36
|
+
this.query = request.getQuery();
|
|
37
37
|
this.path = request.getUrl();
|
|
38
38
|
|
|
39
|
-
if (this.query.length > 0) {
|
|
39
|
+
if (this.query && this.query.length > 0) {
|
|
40
40
|
this.path = `${request.getUrl()}?${this.query}`;
|
|
41
41
|
} else {
|
|
42
42
|
this.path = request.getUrl();
|
|
@@ -1162,6 +1162,8 @@ class HttpWsProtocol extends Protocol {
|
|
|
1162
1162
|
compression,
|
|
1163
1163
|
idleTimeout: idleTimeoutInSecond,
|
|
1164
1164
|
maxPayloadLength: this.maxRequestSize,
|
|
1165
|
+
resetIdleTimeoutOnSend: cfg.resetIdleTimeoutOnSend,
|
|
1166
|
+
sendPingsAutomatically: cfg.sendPingsAutomatically,
|
|
1165
1167
|
},
|
|
1166
1168
|
rateLimit: cfg.rateLimit,
|
|
1167
1169
|
};
|
|
@@ -198,6 +198,18 @@ export type ServerConfiguration = {
|
|
|
198
198
|
* @default true
|
|
199
199
|
*/
|
|
200
200
|
realtimeNotifications: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Whether or not we should automatically send pings to uphold a stable connection given whatever idleTimeout.
|
|
203
|
+
*
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
sendPingsAutomatically: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Whether or not we should reset the idle timeout on every message received.
|
|
209
|
+
*
|
|
210
|
+
* @default false
|
|
211
|
+
*/
|
|
212
|
+
resetIdleTimeoutOnSend: boolean;
|
|
201
213
|
};
|
|
202
214
|
};
|
|
203
215
|
/**
|
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.
|
|
4
|
+
"version": "2.27.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
|
"bin": "bin/start-kuzzle-server",
|
|
7
7
|
"scripts": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"semver": "^7.3.8",
|
|
79
79
|
"sorted-array": "^2.0.4",
|
|
80
80
|
"uuid": "9.0.1",
|
|
81
|
-
"uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.
|
|
81
|
+
"uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.32.0.tar.gz",
|
|
82
82
|
"validator": "13.11.0",
|
|
83
83
|
"winston": "3.10.0",
|
|
84
84
|
"winston-elasticsearch": "0.17.4",
|