kuzzle 2.60.1-beta.1 → 2.60.1

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.
@@ -141,10 +141,13 @@ class ServerController extends baseController_1.NativeController {
141
141
  *
142
142
  * @returns {Promise<Object>}
143
143
  */
144
- async getConfig() {
144
+ getConfig() {
145
145
  // Secrets are masked before the JSON clone: the clone turns a `Buffer`
146
146
  // into `{ type, data }`, which would no longer be masked whole (ADR-0004).
147
- return JSON.parse(JSON.stringify((0, redactSecrets_1.toPublicConfig)(global.kuzzle.config))); // NOSONAR: intentional JSON-safe deep clone (strips non-serializable config values); structuredClone would change semantics / can throw
147
+ const publicConfig = (0, redactSecrets_1.toPublicConfig)(global.kuzzle.config);
148
+ const config = JSON.parse(JSON.stringify(publicConfig)); // NOSONAR: intentional JSON-safe deep clone (strips non-serializable config values); structuredClone would change semantics / can throw
149
+ // A Promise, not a value: the funnel rejects an action that returns none.
150
+ return Promise.resolve(config);
148
151
  }
149
152
  /**
150
153
  * Returns the Kuzzle capabilities
@@ -193,8 +196,8 @@ class ServerController extends baseController_1.NativeController {
193
196
  /**
194
197
  * @returns {Promise<Object>}
195
198
  */
196
- async now() {
197
- return { now: Date.now() };
199
+ now() {
200
+ return Promise.resolve({ now: Date.now() });
198
201
  }
199
202
  /**
200
203
  * @returns {Promise<Object>}
@@ -293,10 +296,10 @@ class ServerController extends baseController_1.NativeController {
293
296
  serverInfo: response,
294
297
  };
295
298
  }
296
- async publicApi() {
299
+ publicApi() {
297
300
  const kuzzleApi = this._buildApiDefinition(global.kuzzle.funnel.controllers, global.kuzzle.config.http.routes);
298
301
  const pluginsApi = this._buildApiDefinition(global.kuzzle.pluginsManager.controllers, global.kuzzle.pluginsManager.routes);
299
- return { ...kuzzleApi, ...pluginsApi };
302
+ return Promise.resolve({ ...kuzzleApi, ...pluginsApi });
300
303
  }
301
304
  async openapi(request) {
302
305
  const format = request.getString("format", "json");
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.1-beta.1",
4
+ "version": "2.60.1",
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.1-beta.1",
4
+ "version": "2.60.1",
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",