matterbridge 3.2.9-dev-20250924-2e9594f → 3.2.9-dev-20250924-c639a33
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/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
22
22
|
- [frontend]: Optimized WebSocker message handlers. Now, the handler targets the component.
|
|
23
23
|
- [frontend]: Removed dangerouslySetInnerHTML from log rendering.
|
|
24
24
|
- [frontend]: Added push update to Icon view and table view cluster panel.
|
|
25
|
+
- [frontend]: Added install progress dialog when installing or uploading packages.
|
|
25
26
|
- [endpoint]: Added occupancy feature to all Thermostat cluster helpers. When provided (either false or true) it will create a Thermostat with occupancy feature.
|
|
26
27
|
- [endpoint]: Added outdoorTemperature to all Thermostat cluster helpers. Default is undefined (it will be ignored).
|
|
27
28
|
|
package/dist/frontend.js
CHANGED
|
@@ -525,7 +525,7 @@ export class Frontend extends EventEmitter {
|
|
|
525
525
|
this.log.info(`File ${plg}${filename}${nf} uploaded successfully`);
|
|
526
526
|
if (filename.endsWith('.tgz')) {
|
|
527
527
|
const { spawnCommand } = await import('./utils/spawn.js');
|
|
528
|
-
await spawnCommand(this.matterbridge, 'npm', ['install', '-g', filePath, '--omit=dev', '--verbose']);
|
|
528
|
+
await spawnCommand(this.matterbridge, 'npm', ['install', '-g', filePath, '--omit=dev', '--verbose'], filename);
|
|
529
529
|
this.log.info(`Plugin package ${plg}${filename}${nf} installed successfully. Full restart required.`);
|
|
530
530
|
this.wssSendCloseSnackbarMessage(`Installing package ${filename}. Please wait...`);
|
|
531
531
|
this.wssSendSnackbarMessage(`Installed package ${filename}`, 10, 'success');
|
|
@@ -969,7 +969,7 @@ export class Frontend extends EventEmitter {
|
|
|
969
969
|
}
|
|
970
970
|
this.wssSendSnackbarMessage(`Installing package ${data.params.packageName}...`, 0);
|
|
971
971
|
const { spawnCommand } = await import('./utils/spawn.js');
|
|
972
|
-
spawnCommand(this.matterbridge, 'npm', ['install', '-g', data.params.packageName, '--omit=dev', '--verbose'])
|
|
972
|
+
spawnCommand(this.matterbridge, 'npm', ['install', '-g', data.params.packageName, '--omit=dev', '--verbose'], data.params.packageName)
|
|
973
973
|
.then((_response) => {
|
|
974
974
|
sendResponse({ id: localData.id, method: localData.method, src: 'Matterbridge', dst: data.src, success: true });
|
|
975
975
|
this.wssSendCloseSnackbarMessage(`Installing package ${localData.params.packageName}...`);
|
|
@@ -1037,7 +1037,7 @@ export class Frontend extends EventEmitter {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
this.wssSendSnackbarMessage(`Uninstalling package ${data.params.packageName}...`, 0);
|
|
1039
1039
|
const { spawnCommand } = await import('./utils/spawn.js');
|
|
1040
|
-
spawnCommand(this.matterbridge, 'npm', ['uninstall', '-g', data.params.packageName, '--verbose'])
|
|
1040
|
+
spawnCommand(this.matterbridge, 'npm', ['uninstall', '-g', data.params.packageName, '--verbose'], data.params.packageName)
|
|
1041
1041
|
.then((_response) => {
|
|
1042
1042
|
sendResponse({ id: localData.id, method: localData.method, src: 'Matterbridge', dst: data.src, success: true });
|
|
1043
1043
|
this.wssSendCloseSnackbarMessage(`Uninstalling package ${localData.params.packageName}...`);
|
package/dist/matterbridge.js
CHANGED
|
@@ -507,7 +507,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
507
507
|
this.log.info(`Error parsing plugin ${plg}${plugin.name}${nf}. Trying to reinstall it from npm.`);
|
|
508
508
|
try {
|
|
509
509
|
const { spawnCommand } = await import('./utils/spawn.js');
|
|
510
|
-
await spawnCommand(this, 'npm', ['install', '-g', plugin.name, '--omit=dev', '--verbose']);
|
|
510
|
+
await spawnCommand(this, 'npm', ['install', '-g', plugin.name, '--omit=dev', '--verbose'], plugin.name);
|
|
511
511
|
this.log.info(`Plugin ${plg}${plugin.name}${nf} reinstalled.`);
|
|
512
512
|
plugin.error = false;
|
|
513
513
|
}
|
|
@@ -949,7 +949,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
949
949
|
this.log.info('Updating matterbridge...');
|
|
950
950
|
try {
|
|
951
951
|
const { spawnCommand } = await import('./utils/spawn.js');
|
|
952
|
-
await spawnCommand(this, 'npm', ['install', '-g', 'matterbridge', '--omit=dev', '--verbose']);
|
|
952
|
+
await spawnCommand(this, 'npm', ['install', '-g', 'matterbridge', '--omit=dev', '--verbose'], 'matterbridge');
|
|
953
953
|
this.log.info('Matterbridge has been updated. Full restart required.');
|
|
954
954
|
}
|
|
955
955
|
catch (error) {
|
package/dist/utils/spawn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasParameter } from './commandLine.js';
|
|
2
|
-
export async function spawnCommand(matterbridge, command, args) {
|
|
2
|
+
export async function spawnCommand(matterbridge, command, args, packageName) {
|
|
3
3
|
const { spawn } = await import('node:child_process');
|
|
4
4
|
const cmdLine = command + ' ' + args.join(' ');
|
|
5
5
|
if (process.platform === 'win32' && command === 'npm') {
|
|
@@ -13,6 +13,7 @@ export async function spawnCommand(matterbridge, command, args) {
|
|
|
13
13
|
}
|
|
14
14
|
matterbridge.log.debug(`Spawn command ${command} with ${args.join(' ')}`);
|
|
15
15
|
return new Promise((resolve, reject) => {
|
|
16
|
+
matterbridge.frontend.wssSendLogMessage('spawn', matterbridge.log.now(), 'Matterbridge:spawn-init', packageName || `unknown-package`);
|
|
16
17
|
const childProcess = spawn(command, args, {
|
|
17
18
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
18
19
|
});
|
|
@@ -22,6 +23,7 @@ export async function spawnCommand(matterbridge, command, args) {
|
|
|
22
23
|
});
|
|
23
24
|
childProcess.on('close', (code, signal) => {
|
|
24
25
|
matterbridge.frontend.wssSendLogMessage('spawn', matterbridge.log.now(), 'Matterbridge:spawn', `child process closed with code ${code} and signal ${signal}`);
|
|
26
|
+
matterbridge.frontend.wssSendLogMessage('spawn', matterbridge.log.now(), 'Matterbridge:spawn-exit', 'Child process closed');
|
|
25
27
|
if (code === 0) {
|
|
26
28
|
if (cmdLine.startsWith('npm install -g'))
|
|
27
29
|
matterbridge.log.notice(`Package ${cmdLine.replace('npm install -g ', '').replace('--verbose', '').replace('--omit=dev', '')} installed correctly`);
|
|
@@ -35,6 +37,7 @@ export async function spawnCommand(matterbridge, command, args) {
|
|
|
35
37
|
});
|
|
36
38
|
childProcess.on('exit', (code, signal) => {
|
|
37
39
|
matterbridge.frontend.wssSendLogMessage('spawn', matterbridge.log.now(), 'Matterbridge:spawn', `child process exited with code ${code} and signal ${signal}`);
|
|
40
|
+
matterbridge.frontend.wssSendLogMessage('spawn', matterbridge.log.now(), 'Matterbridge:spawn-exit', 'Child process exited');
|
|
38
41
|
if (code === 0) {
|
|
39
42
|
matterbridge.log.debug(`Child process "${cmdLine}" exited with code ${code} and signal ${signal}`);
|
|
40
43
|
resolve(true);
|