matterbridge 3.0.1-dev-20250502-c002841 → 3.0.1-dev-20250502-7ffc38b

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.
@@ -5,14 +5,14 @@ import EventEmitter from 'node:events';
5
5
  import { inspect } from 'node:util';
6
6
  import { AnsiLogger, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, CYAN } from './logger/export.js';
7
7
  import { NodeStorageManager } from './storage/export.js';
8
- import { getParameter, getIntParameter, hasParameter, copyDirectory, withTimeout, waiter, isValidString, parseVersionString } from './utils/export.js';
8
+ import { getParameter, getIntParameter, hasParameter, copyDirectory, withTimeout, waiter, isValidString, parseVersionString, isValidNumber } from './utils/export.js';
9
9
  import { logInterfaces, getGlobalNodeModules } from './utils/network.js';
10
10
  import { PluginManager } from './pluginManager.js';
11
11
  import { DeviceManager } from './deviceManager.js';
12
12
  import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
13
13
  import { bridge } from './matterbridgeDeviceTypes.js';
14
14
  import { Frontend } from './frontend.js';
15
- import { DeviceTypeId, Endpoint as EndpointNode, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageService, Environment, ServerNode } from '@matter/main';
15
+ import { DeviceTypeId, Endpoint as EndpointNode, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageService, Environment, ServerNode, UINT32_MAX, UINT16_MAX, } from '@matter/main';
16
16
  import { DeviceCommissioner, FabricAction, MdnsService, PaseClient } from '@matter/main/protocol';
17
17
  import { AggregatorEndpoint } from '@matter/main/endpoints';
18
18
  import { BasicInformationServer } from '@matter/main/behaviors/basic-information';
@@ -1406,10 +1406,10 @@ export class Matterbridge extends EventEmitter {
1406
1406
  await storageContext.set('productLabel', productName.slice(0, 32));
1407
1407
  await storageContext.set('serialNumber', await storageContext.get('serialNumber', serialNumber ? serialNumber.slice(0, 32) : 'SN' + random));
1408
1408
  await storageContext.set('uniqueId', await storageContext.get('uniqueId', 'UI' + random));
1409
- await storageContext.set('softwareVersion', parseVersionString(this.matterbridgeVersion) || 1);
1410
- await storageContext.set('softwareVersionString', isValidString(this.matterbridgeVersion, 5) ? this.matterbridgeVersion : '1.0.0');
1411
- await storageContext.set('hardwareVersion', parseVersionString(this.systemInformation.osRelease) || 1);
1412
- await storageContext.set('hardwareVersionString', isValidString(this.systemInformation.osRelease, 5) ? this.systemInformation.osRelease : '1.0.0');
1409
+ await storageContext.set('softwareVersion', isValidNumber(parseVersionString(this.matterbridgeVersion), 0, UINT32_MAX) ? parseVersionString(this.matterbridgeVersion) : 1);
1410
+ await storageContext.set('softwareVersionString', isValidString(this.matterbridgeVersion, 5, 64) ? this.matterbridgeVersion : '1.0.0');
1411
+ await storageContext.set('hardwareVersion', isValidNumber(parseVersionString(this.systemInformation.osRelease), 0, UINT16_MAX) ? parseVersionString(this.systemInformation.osRelease) : 1);
1412
+ await storageContext.set('hardwareVersionString', isValidString(this.systemInformation.osRelease, 5, 64) ? this.systemInformation.osRelease : '1.0.0');
1413
1413
  this.log.debug(`Created server node storage context "${pluginName}.persist" for ${pluginName}:`);
1414
1414
  this.log.debug(`- storeId: ${await storageContext.get('storeId')}`);
1415
1415
  this.log.debug(`- deviceName: ${await storageContext.get('deviceName')}`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.0.1-dev-20250502-c002841",
3
+ "version": "3.0.1-dev-20250502-7ffc38b",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge",
9
- "version": "3.0.1-dev-20250502-c002841",
9
+ "version": "3.0.1-dev-20250502-7ffc38b",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@matter/main": "0.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.0.1-dev-20250502-c002841",
3
+ "version": "3.0.1-dev-20250502-7ffc38b",
4
4
  "description": "Matterbridge plugin manager for Matter",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",