kuzzle 2.60.0-beta.3 → 2.60.0-beta.5
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/lib/api/controllers/adminController.d.ts +7 -1
- package/dist/lib/api/controllers/adminController.js +9 -2
- package/dist/lib/api/controllers/documentController.d.ts +1 -1
- package/dist/lib/api/funnel.js +12 -1
- package/dist/lib/api/httpRoutes.js +52 -20
- package/dist/lib/api/request/kuzzleRequest.d.ts +7 -2
- package/dist/lib/api/request/kuzzleRequest.js +20 -10
- package/dist/lib/api/request/requestContext.d.ts +1 -1
- package/dist/lib/api/request/requestResponse.js +2 -1
- package/dist/lib/cluster/command.d.ts +7 -0
- package/dist/lib/cluster/command.js +67 -28
- package/dist/lib/cluster/node.d.ts +13 -2
- package/dist/lib/cluster/node.js +20 -4
- package/dist/lib/cluster/subscriber.d.ts +2 -0
- package/dist/lib/cluster/subscriber.js +6 -0
- package/dist/lib/config/index.js +60 -3
- package/dist/lib/core/backend/backend.d.ts +4 -3
- package/dist/lib/core/backend/backend.js +15 -15
- package/dist/lib/core/backend/backendCluster.d.ts +1 -1
- package/dist/lib/core/backend/internalLogger.d.ts +6 -0
- package/dist/lib/core/backend/internalLogger.js +6 -0
- package/dist/lib/core/network/router.d.ts +18 -0
- package/dist/lib/core/network/router.js +44 -10
- package/dist/lib/core/security/authTokenSettings.d.ts +21 -0
- package/dist/lib/core/security/authTokenSettings.js +61 -0
- package/dist/lib/core/security/tokenRepository.js +8 -14
- package/dist/lib/core/shared/KoncordeWrapper.d.ts +9 -0
- package/dist/lib/core/shared/KoncordeWrapper.js +8 -8
- package/dist/lib/core/shared/store.js +4 -0
- package/dist/lib/core/storage/clientAdapter.d.ts +6 -0
- package/dist/lib/core/storage/clientAdapter.js +40 -5
- package/dist/lib/kuzzle/Logger.d.ts +4 -0
- package/dist/lib/kuzzle/Logger.js +9 -2
- package/dist/lib/kuzzle/internalIndexHandler.js +28 -11
- package/dist/lib/kuzzle/kuzzle.d.ts +17 -0
- package/dist/lib/kuzzle/kuzzle.js +62 -0
- package/dist/lib/kuzzle/vault.d.ts +13 -0
- package/dist/lib/kuzzle/vault.js +25 -7
- package/dist/lib/model/security/profile.d.ts +1 -1
- package/dist/lib/model/security/role.d.ts +1 -1
- package/dist/lib/model/security/user.d.ts +1 -1
- package/dist/lib/service/storage/7/elasticsearch.d.ts +18 -0
- package/dist/lib/service/storage/7/elasticsearch.js +50 -10
- package/dist/lib/service/storage/7/esWrapper.js +31 -2
- package/dist/lib/service/storage/8/elasticsearch.d.ts +18 -0
- package/dist/lib/service/storage/8/elasticsearch.js +50 -10
- package/dist/lib/service/storage/8/esWrapper.js +31 -2
- package/dist/lib/types/config/KuzzleConfiguration.d.ts +7 -0
- package/dist/lib/types/config/SecurityConfiguration.d.ts +4 -3
- package/dist/lib/types/controllers/ControllerDefinition.d.ts +4 -4
- package/dist/lib/types/events/EventGenericDocument.d.ts +2 -1
- package/dist/lib/types/events/EventProtocol.d.ts +1 -1
- package/dist/lib/util/mutex.d.ts +5 -4
- package/dist/lib/util/mutex.js +8 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/util/mutex.js
CHANGED
|
@@ -165,6 +165,11 @@ class Mutex {
|
|
|
165
165
|
* @return {Promise}
|
|
166
166
|
*/
|
|
167
167
|
async unlock() {
|
|
168
|
+
// `releaseAllBeforeExit` already gave this lock back: its holder is only
|
|
169
|
+
// catching up, and throwing would turn a requested shutdown into a crash.
|
|
170
|
+
if (!this._locked && exiting) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
168
173
|
if (!this._locked) {
|
|
169
174
|
throw fatal.get("assertion_failed", `tried to unlock the resource "${this.resource}", which is not locked (mutex id: ${this.mutexId})`);
|
|
170
175
|
}
|
|
@@ -191,7 +196,7 @@ class Mutex {
|
|
|
191
196
|
*
|
|
192
197
|
* @return {Promise.<boolean>} True if the ressource has been unlocked before the `timeout`
|
|
193
198
|
*/
|
|
194
|
-
async wait({ attemptDelay = this.attemptDelay, timeout = this.timeout, }) {
|
|
199
|
+
async wait({ attemptDelay = this.attemptDelay, timeout = this.timeout, } = {}) {
|
|
195
200
|
let duration = 0;
|
|
196
201
|
let isLocked;
|
|
197
202
|
do {
|
|
@@ -214,7 +219,8 @@ class Mutex {
|
|
|
214
219
|
*
|
|
215
220
|
* From then on, `lock()` never resolves: the process is about to exit, and
|
|
216
221
|
* answering `false` would send its caller down a path meant for a lock
|
|
217
|
-
* held by another node.
|
|
222
|
+
* held by another node. And `unlock()` on a lock it already freed resolves
|
|
223
|
+
* without doing anything, since its holder may still try to give it back.
|
|
218
224
|
*/
|
|
219
225
|
static async releaseAllBeforeExit() {
|
|
220
226
|
exiting = true;
|
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.60.0-beta.
|
|
4
|
+
"version": "2.60.0-beta.5",
|
|
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 -r ts-node/register/transpile-only ./bin/copy-binaries.ts",
|
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.60.0-beta.
|
|
4
|
+
"version": "2.60.0-beta.5",
|
|
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 -r ts-node/register/transpile-only ./bin/copy-binaries.ts",
|