@matterbridge/core 3.10.1-dev-20260723-9102eb1 → 3.10.1-dev-20260723-b9f3c25

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/frontend.js CHANGED
@@ -970,6 +970,10 @@ export class Frontend extends EventEmitter {
970
970
  restartRequired: this.restartRequired,
971
971
  fixedRestartRequired: this.fixedRestartRequired,
972
972
  updateRequired: this.updateRequired,
973
+ startupAt: this.matterbridge.startupAt,
974
+ shutdownAt: this.matterbridge.shutdownAt,
975
+ runningTimes: this.matterbridge.runningTimes,
976
+ runningDays: this.matterbridge.runningDays,
973
977
  };
974
978
  return { systemInformation: this.matterbridge.systemInformation, matterbridgeInformation: info };
975
979
  }
@@ -1174,6 +1178,7 @@ export class Frontend extends EventEmitter {
1174
1178
  loaded: plugin.loaded,
1175
1179
  started: plugin.started,
1176
1180
  configured: plugin.configured,
1181
+ local: plugin.local,
1177
1182
  restartRequired: plugin.restartRequired,
1178
1183
  registeredDevices: plugin.registeredDevices,
1179
1184
  configJson: plugin.configJson,
@@ -72,10 +72,10 @@ export declare class Matterbridge extends EventEmitter<MatterbridgeEvents> {
72
72
  hasCleanupStarted: boolean;
73
73
  private initialized;
74
74
  private readonly isShutdownCommand;
75
- private startupAt;
76
- private shutdownAt;
77
- private runningTimes;
78
- private runningDays;
75
+ startupAt: number;
76
+ shutdownAt: number;
77
+ runningTimes: number;
78
+ runningDays: number;
79
79
  private startMatterInterval;
80
80
  private readonly startMatterIntervalMs;
81
81
  private checkUpdateInterval;
@@ -216,6 +216,10 @@ export class Matterbridge extends EventEmitter {
216
216
  port: this.port,
217
217
  discriminator: this.discriminator,
218
218
  passcode: this.passcode,
219
+ startupAt: this.startupAt,
220
+ shutdownAt: this.shutdownAt,
221
+ runningTimes: this.runningTimes,
222
+ runningDays: this.runningDays,
219
223
  };
220
224
  }
221
225
  getApiSettings() {
@@ -258,6 +262,10 @@ export class Matterbridge extends EventEmitter {
258
262
  restartRequired: false,
259
263
  fixedRestartRequired: false,
260
264
  updateRequired: false,
265
+ startupAt: this.startupAt,
266
+ shutdownAt: this.shutdownAt,
267
+ runningTimes: this.runningTimes,
268
+ runningDays: this.runningDays,
261
269
  },
262
270
  };
263
271
  }
@@ -471,6 +479,8 @@ export class Matterbridge extends EventEmitter {
471
479
  await this.nodeContext.set('runningTimes', this.runningTimes);
472
480
  await this.nodeContext.set('runningDays', this.runningDays);
473
481
  await this.nodeContext.set('lastStartupAt', this.startupAt);
482
+ this.log.info(`Matterbridge started at ${CYAN}${new Date(this.startupAt).toLocaleString()}${nf}`);
483
+ this.log.info(`Matterbridge has run ${CYAN}${this.runningTimes}${nf} times for a total of ${CYAN}${this.runningDays}${nf} days`);
474
484
  }
475
485
  this.initialPort = this.port = getIntParameter('port') ?? (await this.nodeContext.get('matterport', 5540)) ?? 5540;
476
486
  this.initialPasscode = this.passcode =
@@ -737,6 +747,7 @@ export class Matterbridge extends EventEmitter {
737
747
  this.devices.logLevel = this.log.logLevel;
738
748
  for (const plugin of this.plugins) {
739
749
  const isLocal = fs.existsSync(plugin.path) && this.globalModulesDirectory.length > 0 && !plugin.path.startsWith(this.globalModulesDirectory);
750
+ plugin.local = isLocal;
740
751
  const isLinked = fs.existsSync(path.join(path.dirname(plugin.path), 'node_modules', 'matterbridge'));
741
752
  this.log.debug(`Parsing plugin ${plg}${plugin.name}${db} from path ${CYAN}${plugin.path}${db} ` +
742
753
  `with version ${CYAN}${plugin.version}${db} type ${CYAN}${plugin.type}${db} local ${CYAN}${isLocal}${db} linked ${CYAN}${isLinked}${db} ` +
@@ -1427,8 +1438,8 @@ export class Matterbridge extends EventEmitter {
1427
1438
  this.runningDays = this.runningDays + Math.floor((this.shutdownAt - this.startupAt) / (1000 * 60 * 60 * 24));
1428
1439
  await this.nodeContext?.set('runningDays', this.runningDays);
1429
1440
  await this.nodeContext?.set('lastShutdownAt', this.shutdownAt);
1430
- this.log.info(`Matterbridge has run ${this.runningTimes} times for a total of ${this.runningDays} days.`);
1431
- this.log.info(`Matterbridge last started at ${new Date(this.startupAt).toLocaleString()} and shut down at ${new Date(this.shutdownAt).toLocaleString()}`);
1441
+ this.log.info(`Matterbridge has run ${CYAN}${this.runningTimes}${nf} times for a total of ${CYAN}${this.runningDays}${nf} days`);
1442
+ this.log.info(`Matterbridge last started at ${CYAN}${new Date(this.startupAt).toLocaleString()}${nf} and shut down at ${CYAN}${new Date(this.shutdownAt).toLocaleString()}${nf}`);
1432
1443
  }
1433
1444
  await this.frontend.stop();
1434
1445
  this.frontend.destroy();
@@ -380,6 +380,7 @@ export class PluginManager extends EventEmitter {
380
380
  loaded: plugin.loaded,
381
381
  started: plugin.started,
382
382
  configured: plugin.configured,
383
+ local: plugin.local,
383
384
  restartRequired: plugin.restartRequired,
384
385
  registeredDevices: plugin.registeredDevices,
385
386
  configJson: plugin.configJson,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matterbridge/core",
3
- "version": "3.10.1-dev-20260723-9102eb1",
3
+ "version": "3.10.1-dev-20260723-b9f3c25",
4
4
  "description": "Matterbridge core library",
5
5
  "author": "https://github.com/Luligu",
6
6
  "homepage": "https://matterbridge.io/",
@@ -132,10 +132,10 @@
132
132
  },
133
133
  "dependencies": {
134
134
  "@matter/main": "0.17.6",
135
- "@matterbridge/dgram": "3.10.1-dev-20260723-9102eb1",
136
- "@matterbridge/thread": "3.10.1-dev-20260723-9102eb1",
137
- "@matterbridge/types": "3.10.1-dev-20260723-9102eb1",
138
- "@matterbridge/utils": "3.10.1-dev-20260723-9102eb1",
135
+ "@matterbridge/dgram": "3.10.1-dev-20260723-b9f3c25",
136
+ "@matterbridge/thread": "3.10.1-dev-20260723-b9f3c25",
137
+ "@matterbridge/types": "3.10.1-dev-20260723-b9f3c25",
138
+ "@matterbridge/utils": "3.10.1-dev-20260723-b9f3c25",
139
139
  "escape-html": "1.0.3",
140
140
  "express": "5.2.1",
141
141
  "express-rate-limit": "8.6.0",