@matterbridge/core 3.5.4-dev-20260211-520e349 → 3.5.4-dev-20260212-d66d207
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/cli.js +4 -3
- package/dist/matterbridge.d.ts +1 -0
- package/dist/matterbridge.js +25 -4
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -128,6 +128,10 @@ function help() {
|
|
|
128
128
|
--enable [plugin name]: enable the globally installed plugin with the given name
|
|
129
129
|
--disable [plugin path]: disable the plugin from the given absolute or relative path
|
|
130
130
|
--disable [plugin name]: disable the globally installed plugin with the given name
|
|
131
|
+
--list: list the registered plugins
|
|
132
|
+
--loginterfaces: log the network interfaces (usefull for finding the name of the interface to use with -mdnsinterface option)
|
|
133
|
+
--logstorage: log the node storage
|
|
134
|
+
--systemcheck: perform a system check (check Node.js version and network interfaces)
|
|
131
135
|
|
|
132
136
|
Reset Commands:
|
|
133
137
|
--reset: remove the commissioning for Matterbridge (bridge mode and childbridge mode). Shutdown Matterbridge before using it!
|
|
@@ -148,9 +152,6 @@ function help() {
|
|
|
148
152
|
--filelogger: enable the matterbridge file logger (matterbridge.log)
|
|
149
153
|
--matterlogger: set the matter.js logger level: debug | info | notice | warn | error | fatal (default info)
|
|
150
154
|
--matterfilelogger: enable the matter.js file logger (matter.log)
|
|
151
|
-
--list: list the registered plugins
|
|
152
|
-
--loginterfaces: log the network interfaces (usefull for finding the name of the interface to use with -mdnsinterface option)
|
|
153
|
-
--logstorage: log the node storage
|
|
154
155
|
--sudo: force the use of sudo to install or update packages if the internal logic fails
|
|
155
156
|
--nosudo: force not to use sudo to install or update packages if the internal logic fails
|
|
156
157
|
--norestore: force not to automatically restore the matterbridge node storage and the matter storage from backup if it is corrupted
|
package/dist/matterbridge.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare class Matterbridge extends EventEmitter<MatterbridgeEvents> {
|
|
|
74
74
|
private readonly startMatterIntervalMs;
|
|
75
75
|
private checkUpdateInterval;
|
|
76
76
|
private checkUpdateTimeout;
|
|
77
|
+
private systemCheckTimeout;
|
|
77
78
|
private configureTimeout;
|
|
78
79
|
private reachabilityTimeout;
|
|
79
80
|
private sigintHandler;
|
package/dist/matterbridge.js
CHANGED
|
@@ -16,7 +16,7 @@ import { DeviceTypeId, VendorId } from '@matter/types/datatype';
|
|
|
16
16
|
import { AggregatorEndpoint } from '@matter/node/endpoints';
|
|
17
17
|
import { BasicInformationServer } from '@matter/node/behaviors/basic-information';
|
|
18
18
|
import { copyDirectory, createDirectory, formatBytes, formatPercent, formatUptime, getIntParameter, getParameter, hasParameter, isValidNumber, isValidObject, isValidString, parseVersionString, } from '@matterbridge/utils';
|
|
19
|
-
import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_NAME, MATTERBRIDGE_LOGGER_FILE, NODE_STORAGE_DIR, plg, typ } from '@matterbridge/types';
|
|
19
|
+
import { dev, excludedInterfaceNamePattern, MATTER_LOGGER_FILE, MATTER_STORAGE_NAME, MATTERBRIDGE_LOGGER_FILE, NODE_STORAGE_DIR, plg, typ } from '@matterbridge/types';
|
|
20
20
|
import { BroadcastServer } from '@matterbridge/thread';
|
|
21
21
|
import { PluginManager } from './pluginManager.js';
|
|
22
22
|
import { DeviceManager } from './deviceManager.js';
|
|
@@ -93,6 +93,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
93
93
|
startMatterIntervalMs = 1000;
|
|
94
94
|
checkUpdateInterval;
|
|
95
95
|
checkUpdateTimeout;
|
|
96
|
+
systemCheckTimeout;
|
|
96
97
|
configureTimeout;
|
|
97
98
|
reachabilityTimeout;
|
|
98
99
|
sigintHandler;
|
|
@@ -541,7 +542,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
541
542
|
!hasParameter('enable') &&
|
|
542
543
|
!hasParameter('disable') &&
|
|
543
544
|
!hasParameter('reset') &&
|
|
544
|
-
!hasParameter('factoryreset')
|
|
545
|
+
!hasParameter('factoryreset') &&
|
|
546
|
+
!hasParameter('systemcheck')) {
|
|
545
547
|
this.log.info(`Error parsing plugin ${plg}${plugin.name}${nf}. Trying to reinstall it from npm...`);
|
|
546
548
|
const { spawnCommand } = await import('./spawn.js');
|
|
547
549
|
if (await spawnCommand('npm', ['install', '-g', `${plugin.name}${plugin.version.includes('-dev-') ? '@dev' : ''}`, '--omit=dev', '--verbose'], 'install', plugin.name)) {
|
|
@@ -635,6 +637,17 @@ export class Matterbridge extends EventEmitter {
|
|
|
635
637
|
this.shutdown = true;
|
|
636
638
|
return;
|
|
637
639
|
}
|
|
640
|
+
if (hasParameter('systemcheck')) {
|
|
641
|
+
const { createESMWorker } = await import('@matterbridge/thread');
|
|
642
|
+
await new Promise((resolve) => {
|
|
643
|
+
const worker = createESMWorker('SystemCheck', this.resolveWorkerDistFilePath('workerSystemCheck.js'));
|
|
644
|
+
worker.on('exit', () => {
|
|
645
|
+
resolve(null);
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
this.shutdown = true;
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
638
651
|
if (getParameter('add')) {
|
|
639
652
|
this.log.debug(`Adding plugin ${getParameter('add')}`);
|
|
640
653
|
await this.plugins.add(getParameter('add'));
|
|
@@ -710,6 +723,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
710
723
|
this.shutdown = true;
|
|
711
724
|
return;
|
|
712
725
|
}
|
|
726
|
+
clearTimeout(this.systemCheckTimeout);
|
|
727
|
+
this.systemCheckTimeout = setTimeout(async () => {
|
|
728
|
+
const { createESMWorker } = await import('@matterbridge/thread');
|
|
729
|
+
createESMWorker('SystemCheck', this.resolveWorkerDistFilePath('workerSystemCheck.js'));
|
|
730
|
+
}, 120 * 1000).unref();
|
|
713
731
|
clearTimeout(this.checkUpdateTimeout);
|
|
714
732
|
this.checkUpdateTimeout = setTimeout(async () => {
|
|
715
733
|
const { createESMWorker } = await import('@matterbridge/thread');
|
|
@@ -828,7 +846,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
828
846
|
this.sigtermHandler = undefined;
|
|
829
847
|
}
|
|
830
848
|
async logNodeAndSystemInfo() {
|
|
831
|
-
const excludedInterfaceNamePattern = /(tailscale|wireguard|openvpn|zerotier|hamachi|\bwg\d+\b|\btun\d+\b|\btap\d+\b|\butun\d+\b|docker|podman|\bveth[a-z0-9]*\b|\bbr-[a-z0-9]+\b|cni|kube|flannel|calico|virbr\d*\b|vmware|vmnet\d*\b|virtualbox|vboxnet\d*\b|teredo|isatap)/i;
|
|
832
849
|
const networkInterfaces = os.networkInterfaces();
|
|
833
850
|
this.systemInformation.interfaceName = '';
|
|
834
851
|
this.systemInformation.ipv4Address = '';
|
|
@@ -919,7 +936,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
919
936
|
}
|
|
920
937
|
}
|
|
921
938
|
else {
|
|
922
|
-
this.log.debug(`Global node_modules Directory: ${this.globalModulesDirectory}`);
|
|
923
939
|
const { createESMWorker } = await import('@matterbridge/thread');
|
|
924
940
|
createESMWorker('NpmGlobalPrefix', this.resolveWorkerDistFilePath('workerGlobalPrefix.js'));
|
|
925
941
|
}
|
|
@@ -1050,6 +1066,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
1050
1066
|
this.startMatterInterval = undefined;
|
|
1051
1067
|
this.log.debug('Start matter interval cleared');
|
|
1052
1068
|
}
|
|
1069
|
+
if (this.systemCheckTimeout) {
|
|
1070
|
+
clearTimeout(this.systemCheckTimeout);
|
|
1071
|
+
this.systemCheckTimeout = undefined;
|
|
1072
|
+
this.log.debug('System check timeout cleared');
|
|
1073
|
+
}
|
|
1053
1074
|
if (this.checkUpdateTimeout) {
|
|
1054
1075
|
clearTimeout(this.checkUpdateTimeout);
|
|
1055
1076
|
this.checkUpdateTimeout = undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.5.4-dev-
|
|
3
|
+
"version": "3.5.4-dev-20260212-d66d207",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
},
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"@matter/main": "0.16.8",
|
|
129
|
-
"@matterbridge/dgram": "3.5.4-dev-
|
|
130
|
-
"@matterbridge/thread": "3.5.4-dev-
|
|
131
|
-
"@matterbridge/types": "3.5.4-dev-
|
|
132
|
-
"@matterbridge/utils": "3.5.4-dev-
|
|
129
|
+
"@matterbridge/dgram": "3.5.4-dev-20260212-d66d207",
|
|
130
|
+
"@matterbridge/thread": "3.5.4-dev-20260212-d66d207",
|
|
131
|
+
"@matterbridge/types": "3.5.4-dev-20260212-d66d207",
|
|
132
|
+
"@matterbridge/utils": "3.5.4-dev-20260212-d66d207",
|
|
133
133
|
"archiver": "7.0.1",
|
|
134
134
|
"express": "5.2.1",
|
|
135
135
|
"glob": "13.0.1",
|