kuzzle 2.27.4 → 2.29.0-beta.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.
@@ -123,7 +123,7 @@ class ClusterIdCardHandler {
123
123
  });
124
124
  // Transfer informations to the worker
125
125
  this.refreshWorker.send({
126
- action: "start",
126
+ action: "start", // start the worker
127
127
  kuzzle: {
128
128
  config: global.kuzzle.config,
129
129
  id: global.kuzzle.id,
@@ -165,13 +165,12 @@ class Backend {
165
165
  * Starts the Kuzzle application with the defined features
166
166
  */
167
167
  async start() {
168
- var _a;
169
168
  if (this.started) {
170
169
  throw runtimeError.get("already_started", "start");
171
170
  }
172
171
  this._kuzzle = new kuzzle_1.default(this.config.content);
173
172
  for (const plugin of this.config.content.plugins.common.include) {
174
- const { default: PluginClass } = await (_a = plugin, Promise.resolve().then(() => __importStar(require(_a))));
173
+ const { default: PluginClass } = await Promise.resolve(`${plugin}`).then(s => __importStar(require(s)));
175
174
  this.plugin.use(new PluginClass(), {
176
175
  deprecationWarning: false,
177
176
  name: plugin,
@@ -189,7 +188,7 @@ class Backend {
189
188
  installations: this._installationsWaitingList,
190
189
  plugins: this._plugins,
191
190
  secretsFile: this._secretsFile,
192
- support: this._support,
191
+ support: this._support, // NOSONAR
193
192
  vaultKey: this._vaultKey,
194
193
  };
195
194
  await this._kuzzle.start(application, options);
@@ -23,7 +23,7 @@
23
23
 
24
24
  const net = require("net");
25
25
 
26
- const aedes = require("aedes");
26
+ const Aedes = require("aedes");
27
27
 
28
28
  const ClientConnection = require("../clientConnection");
29
29
  const Protocol = require("./protocol");
@@ -39,7 +39,8 @@ class MqttProtocol extends Protocol {
39
39
  constructor() {
40
40
  super("mqtt");
41
41
 
42
- this.aedes = new aedes.Server();
42
+ // eslint-disable-next-line new-cap
43
+ this.aedes = new Aedes.Server();
43
44
  this.server = net.createServer(this.aedes.handle);
44
45
 
45
46
  this.connections = new Map();
@@ -68,8 +68,8 @@ class ProfileRepository extends repository_1.Repository {
68
68
  });
69
69
  this.module = securityModule;
70
70
  this.profiles = new Map();
71
- super.collection = "profiles";
72
- super.ObjectConstructor = profile_1.Profile;
71
+ this.collection = "profiles";
72
+ this.ObjectConstructor = profile_1.Profile;
73
73
  }
74
74
  init() {
75
75
  /**
@@ -304,7 +304,7 @@ class Kuzzle extends kuzzleEventEmitter_1.default {
304
304
  * we just want to load the mapping in our own index cache and not in the database.
305
305
  */
306
306
  indexCacheOnly: status.initialized || !status.locked,
307
- propagate: false,
307
+ propagate: false, // Each node needs to do the import themselves
308
308
  rawMappings: true,
309
309
  refresh: true,
310
310
  });
@@ -317,7 +317,7 @@ class Kuzzle extends kuzzleEventEmitter_1.default {
317
317
  * we just want to load the mapping in our own index cache and not in the database.
318
318
  */
319
319
  indexCacheOnly: status.initialized || !status.locked,
320
- propagate: false,
320
+ propagate: false, // Each node needs to do the import themselves
321
321
  refresh: true,
322
322
  });
323
323
  this.log.info("[✔] Mappings import successful");