iobroker.js-controller 6.0.7 → 6.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyjKH;;;;GAIG;AACH,wBAAsB,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmajE"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwjKH;;;;GAIG;AACH,wBAAsB,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmajE"}
package/build/esm/main.js CHANGED
@@ -471,8 +471,8 @@ function createStates(onConnect) {
471
471
  }
472
472
  if (pluginHandler.isPluginActive(pluginName) !== state.val) {
473
473
  if (state.val) {
474
- if (!pluginHandler.isPluginInstantiated(pluginName)) {
475
- pluginHandler.instantiatePlugin(pluginName, pluginHandler.getPluginConfig(pluginName), controllerDir);
474
+ if (!pluginHandler.isPluginInstanciated(pluginName)) {
475
+ pluginHandler.instanciatePlugin(pluginName, pluginHandler.getPluginConfig(pluginName), controllerDir);
476
476
  pluginHandler.setDatabaseForPlugin(pluginName, objects, states);
477
477
  pluginHandler.initPlugin(pluginName, ioPackage);
478
478
  }
@@ -547,14 +547,15 @@ async function initializeController() {
547
547
  connected = true;
548
548
  if (!isStopping) {
549
549
  pluginHandler.setDatabaseForPlugins(objects, states);
550
- await pluginHandler.initPlugins(ioPackage);
551
- states.subscribe(`${hostObjectPrefix}.plugins.*`);
552
- // Do not start if we're still stopping the instances
553
- await checkHost();
554
- startMultihost(config);
555
- setMeta();
556
- started = true;
557
- getInstances();
550
+ pluginHandler.initPlugins(ioPackage, async () => {
551
+ states.subscribe(`${hostObjectPrefix}.plugins.*`);
552
+ // Do not start if we're still stopping the instances
553
+ await checkHost();
554
+ startMultihost(config);
555
+ setMeta();
556
+ started = true;
557
+ getInstances();
558
+ });
558
559
  }
559
560
  }
560
561
  else {
@@ -2532,6 +2533,7 @@ async function processMessage(msg) {
2532
2533
  const message = msg.message.message;
2533
2534
  const level = msg.message.level;
2534
2535
  const extraInfo = msg.message.extraInfo;
2536
+ // @ts-expect-error Plugin is not well typed and SentryPlugin has no types at all currently
2535
2537
  const sentryObj = pluginHandler.getPluginInstance('sentry')?.getSentryObject();
2536
2538
  if (!sentryObj) {
2537
2539
  logger.debug(`${hostLogPrefix} Do not send message "${message}" to Sentry, because it is disabled`);