kuzzle 2.22.0 → 2.23.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/README.md CHANGED
@@ -52,15 +52,14 @@ npx kourou app:scaffold playground
52
52
 
53
53
  🚀 Kourou - Scaffolds a new Kuzzle application
54
54
 
55
- ✔ Creating playground/ directory
56
55
  ✔ Creating and rendering application files
57
- ✔ Installing latest Kuzzle version via NPM and Docker (this can take some time)
58
- [✔] Scaffolding complete! Use "npm run dev:docker" to run your application
56
+
57
+ [✔] Scaffolding complete! Use cd playground && npm run docker npm install install dependencies and then npm run docker:dev to run your application!
59
58
  ```
60
59
 
61
60
  Then you need to run Kuzzle services, Elasticsearch and Redis: `kourou app:start-services`
62
61
 
63
- Finally you can run your application inside Docker with `npm run dev:docker`
62
+ Finally you can run your application inside Docker with `npm run docker:dev`
64
63
 
65
64
  Kuzzle is now listening for requests on the port `7512`!
66
65
 
@@ -115,8 +115,11 @@ class ClusterIdCardHandler {
115
115
  await this.node.evictSelf(message.error);
116
116
  }
117
117
  });
118
- this.refreshWorker.on("close", () => {
119
- this.disposed = true;
118
+ this.refreshWorker.on("close", async () => {
119
+ if (!this.disposed) {
120
+ this.disposed = true;
121
+ await this.node.evictSelf("ID Card renewer worker closed unexpectedly");
122
+ }
120
123
  });
121
124
  // Transfer informations to the worker
122
125
  this.refreshWorker.send({
@@ -140,7 +143,17 @@ class ClusterIdCardHandler {
140
143
  * Helper method to mock worker instantiation in unit tests
141
144
  */
142
145
  constructWorker(path) {
143
- return (0, child_process_1.fork)(path);
146
+ const childProcess = (0, child_process_1.fork)(path);
147
+ const exitHandler = () => {
148
+ if (!childProcess.killed || childProcess.connected) {
149
+ childProcess.kill();
150
+ }
151
+ process.exit();
152
+ };
153
+ process.on("exit", exitHandler);
154
+ process.on("SIGINT", exitHandler);
155
+ process.on("SIGTERM", exitHandler);
156
+ return childProcess;
144
157
  }
145
158
  /**
146
159
  * Start refreshing the ID Card before the worker starts to ensure the ID Card
@@ -135,4 +135,9 @@ process.on("message", async (message) => {
135
135
  }
136
136
  });
137
137
 
138
+ // When the IPC is closed on the main process side
139
+ process.on("disconnect", () => {
140
+ process.exit();
141
+ });
142
+
138
143
  module.exports = { IDCardRenewer };
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.22.0",
4
+ "version": "2.23.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": {
@@ -61,7 +61,7 @@
61
61
  "json-stable-stringify": "^1.0.2",
62
62
  "json2yaml": "^1.1.0",
63
63
  "jsonwebtoken": "^8.5.1",
64
- "koncorde": "^4.0.3",
64
+ "koncorde": "^4.1.0",
65
65
  "kuzzle-plugin-auth-passport-local": "^6.3.6",
66
66
  "kuzzle-plugin-logger": "^3.0.3",
67
67
  "kuzzle-sdk": "^7.10.5",