@matterbridge/core 3.9.5-dev-20260715-33298cd → 3.10.0-dev-20260716-7f8762c
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/behaviors/colorControlServer.d.ts +0 -15
- package/dist/behaviors/colorControlServer.js +0 -2
- package/dist/behaviors/thermostatServer.d.ts +0 -14
- package/dist/behaviors/thermostatServer.js +0 -2
- package/dist/behaviors/windowCoveringServer.d.ts +0 -26
- package/dist/behaviors/windowCoveringServer.js +0 -4
- package/dist/deviceManager.js +3 -1
- package/dist/matter/export.d.ts +0 -11
- package/dist/matter/export.js +0 -11
- package/dist/matterNode.d.ts +1 -1
- package/dist/matterNode.js +36 -13
- package/dist/matterbridge.js +19 -11
- package/dist/matterbridgeDeviceTypes.d.ts +0 -14
- package/dist/matterbridgeDeviceTypes.js +0 -14
- package/dist/matterbridgeEndpoint.d.ts +5 -4
- package/dist/matterbridgeEndpoint.js +39 -14
- package/dist/matterbridgeEndpointCommandHandler.d.ts +0 -75
- package/dist/matterbridgeEndpointTypes.d.ts +7 -0
- package/dist/matterbridgePlatform.js +1 -1
- package/package.json +5 -9
- package/dist/jestutils/export.d.ts +0 -13
- package/dist/jestutils/export.js +0 -13
- package/dist/jestutils/flushAsync.d.ts +0 -1
- package/dist/jestutils/flushAsync.js +0 -8
- package/dist/jestutils/jestBroadcastServerSpy.d.ts +0 -13
- package/dist/jestutils/jestBroadcastServerSpy.js +0 -14
- package/dist/jestutils/jestDeviceManagerSpy.d.ts +0 -14
- package/dist/jestutils/jestDeviceManagerSpy.js +0 -15
- package/dist/jestutils/jestFrontendSpy.d.ts +0 -7
- package/dist/jestutils/jestFrontendSpy.js +0 -8
- package/dist/jestutils/jestMatterTest.d.ts +0 -21
- package/dist/jestutils/jestMatterTest.js +0 -281
- package/dist/jestutils/jestMatterbridgeEndpointSpy.d.ts +0 -7
- package/dist/jestutils/jestMatterbridgeEndpointSpy.js +0 -8
- package/dist/jestutils/jestMatterbridgePlatformSpy.d.ts +0 -43
- package/dist/jestutils/jestMatterbridgePlatformSpy.js +0 -44
- package/dist/jestutils/jestMatterbridgeSpy.d.ts +0 -5
- package/dist/jestutils/jestMatterbridgeSpy.js +0 -6
- package/dist/jestutils/jestMatterbridgeTest.d.ts +0 -21
- package/dist/jestutils/jestMatterbridgeTest.js +0 -252
- package/dist/jestutils/jestPluginManagerSpy.d.ts +0 -40
- package/dist/jestutils/jestPluginManagerSpy.js +0 -41
- package/dist/jestutils/jestSetupTest.d.ts +0 -20
- package/dist/jestutils/jestSetupTest.js +0 -79
- package/dist/jestutils/logKeepAlives.d.ts +0 -2
- package/dist/jestutils/logKeepAlives.js +0 -31
- package/dist/jestutils/matterRequest.d.ts +0 -10
- package/dist/jestutils/matterRequest.js +0 -78
|
@@ -32,6 +32,7 @@ import { ThermostatUserInterfaceConfigurationServer } from '@matter/node/behavio
|
|
|
32
32
|
import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/node/behaviors/total-volatile-organic-compounds-concentration-measurement';
|
|
33
33
|
import { getClusterNameById } from '@matter/types/cluster';
|
|
34
34
|
import { AirQuality } from '@matter/types/clusters/air-quality';
|
|
35
|
+
import { BasicInformation } from '@matter/types/clusters/basic-information';
|
|
35
36
|
import { BooleanStateConfiguration } from '@matter/types/clusters/boolean-state-configuration';
|
|
36
37
|
import { BridgedDeviceBasicInformation } from '@matter/types/clusters/bridged-device-basic-information';
|
|
37
38
|
import { ColorControl } from '@matter/types/clusters/color-control';
|
|
@@ -60,7 +61,7 @@ import { WindowCovering } from '@matter/types/clusters/window-covering';
|
|
|
60
61
|
import { VendorId } from '@matter/types/datatype';
|
|
61
62
|
import { inspectError } from '@matterbridge/utils/error';
|
|
62
63
|
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
63
|
-
import { isValidNumber, isValidObject, isValidString } from '@matterbridge/utils/validate';
|
|
64
|
+
import { isValidInteger, isValidNumber, isValidObject, isValidString } from '@matterbridge/utils/validate';
|
|
64
65
|
import { AnsiLogger, CYAN, db, debugStringify, hk, or, YELLOW, zb } from 'node-ansi-logger';
|
|
65
66
|
import { MatterbridgeActivatedCarbonFilterMonitoringServer } from './behaviors/activatedCarbonFilterMonitoringServer.js';
|
|
66
67
|
import { MatterbridgeBooleanStateConfigurationServer } from './behaviors/booleanStateConfigurationServer.js';
|
|
@@ -115,11 +116,13 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
115
116
|
vendorName = undefined;
|
|
116
117
|
productId = undefined;
|
|
117
118
|
productName = undefined;
|
|
119
|
+
productLabel = undefined;
|
|
120
|
+
productUrl = 'https://matterbridge.io';
|
|
118
121
|
softwareVersion = undefined;
|
|
119
122
|
softwareVersionString = undefined;
|
|
120
123
|
hardwareVersion = undefined;
|
|
121
124
|
hardwareVersionString = undefined;
|
|
122
|
-
|
|
125
|
+
configurationVersion = 1;
|
|
123
126
|
tagList = undefined;
|
|
124
127
|
originalId = undefined;
|
|
125
128
|
name = undefined;
|
|
@@ -446,9 +449,6 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
446
449
|
}
|
|
447
450
|
return child;
|
|
448
451
|
}
|
|
449
|
-
getChildEndpointByName(endpointName) {
|
|
450
|
-
return this.parts.find((part) => part.id === endpointName);
|
|
451
|
-
}
|
|
452
452
|
getChildEndpointById(id) {
|
|
453
453
|
return this.parts.find((part) => part.id === id);
|
|
454
454
|
}
|
|
@@ -471,6 +471,13 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
471
471
|
uniqueId: device.uniqueId,
|
|
472
472
|
productId: device.productId,
|
|
473
473
|
productName: device.productName,
|
|
474
|
+
productLabel: device.productLabel,
|
|
475
|
+
productUrl: device.productUrl,
|
|
476
|
+
configurationVersion: device.configurationVersion,
|
|
477
|
+
softwareVersion: device.softwareVersion,
|
|
478
|
+
softwareVersionString: device.softwareVersionString,
|
|
479
|
+
hardwareVersion: device.hardwareVersion,
|
|
480
|
+
hardwareVersionString: device.hardwareVersionString,
|
|
474
481
|
vendorId: device.vendorId,
|
|
475
482
|
vendorName: device.vendorName,
|
|
476
483
|
deviceTypes: Array.from(device.deviceTypes.values()),
|
|
@@ -481,6 +488,8 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
481
488
|
Object.keys(device.behaviors.supported).forEach((behaviorName) => {
|
|
482
489
|
if (behaviorName === 'bridgedDeviceBasicInformation')
|
|
483
490
|
serialized.clusterServersId.push(BridgedDeviceBasicInformation.id);
|
|
491
|
+
if (behaviorName === 'basicInformation')
|
|
492
|
+
serialized.clusterServersId.push(BasicInformation.id);
|
|
484
493
|
if (behaviorName === 'powerSource')
|
|
485
494
|
serialized.clusterServersId.push(PowerSource.id);
|
|
486
495
|
});
|
|
@@ -496,9 +505,18 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
496
505
|
device.vendorName = serializedDevice.vendorName;
|
|
497
506
|
device.productId = serializedDevice.productId;
|
|
498
507
|
device.productName = serializedDevice.productName;
|
|
508
|
+
device.productLabel = serializedDevice.productLabel;
|
|
509
|
+
device.productUrl = serializedDevice.productUrl;
|
|
510
|
+
device.configurationVersion = serializedDevice.configurationVersion;
|
|
511
|
+
device.softwareVersion = serializedDevice.softwareVersion;
|
|
512
|
+
device.softwareVersionString = serializedDevice.softwareVersionString;
|
|
513
|
+
device.hardwareVersion = serializedDevice.hardwareVersion;
|
|
514
|
+
device.hardwareVersionString = serializedDevice.hardwareVersionString;
|
|
499
515
|
for (const clusterId of serializedDevice.clusterServersId) {
|
|
500
516
|
if (clusterId === BridgedDeviceBasicInformation.id)
|
|
501
|
-
device.createDefaultBridgedDeviceBasicInformationClusterServer(serializedDevice.deviceName, serializedDevice.serialNumber, serializedDevice.vendorId ?? 0xfff1, serializedDevice.vendorName ?? 'Matterbridge', serializedDevice.productName ?? 'Matterbridge device');
|
|
517
|
+
device.createDefaultBridgedDeviceBasicInformationClusterServer(serializedDevice.deviceName, serializedDevice.serialNumber, serializedDevice.vendorId ?? 0xfff1, serializedDevice.vendorName ?? 'Matterbridge', serializedDevice.productName ?? 'Matterbridge device', serializedDevice.softwareVersion, serializedDevice.softwareVersionString, serializedDevice.hardwareVersion, serializedDevice.hardwareVersionString, serializedDevice.productLabel, serializedDevice.productUrl, serializedDevice.configurationVersion);
|
|
518
|
+
else if (clusterId === BasicInformation.id)
|
|
519
|
+
device.createDefaultBasicInformationClusterServer(serializedDevice.deviceName, serializedDevice.serialNumber, serializedDevice.vendorId ?? 0xfff1, serializedDevice.vendorName ?? 'Matterbridge', serializedDevice.productId ?? 0x8000, serializedDevice.productName ?? 'Matterbridge device', serializedDevice.softwareVersion, serializedDevice.softwareVersionString, serializedDevice.hardwareVersion, serializedDevice.hardwareVersionString, serializedDevice.productLabel, serializedDevice.productUrl, serializedDevice.configurationVersion);
|
|
502
520
|
else if (clusterId === PowerSource.id)
|
|
503
521
|
device.createDefaultPowerSourceWiredClusterServer();
|
|
504
522
|
}
|
|
@@ -520,49 +538,56 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
520
538
|
this.behaviors.require(MatterbridgePowerSourceServer.with(PowerSource.Feature.Battery, PowerSource.Feature.Rechargeable), getDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining, batChargeLevel, batVoltage, batReplaceability));
|
|
521
539
|
return this;
|
|
522
540
|
}
|
|
523
|
-
createDefaultBasicInformationClusterServer(deviceName, serialNumber, vendorId = 0xfff1, vendorName = 'Matterbridge', productId = 0x8000, productName = 'Matterbridge device', softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0') {
|
|
541
|
+
createDefaultBasicInformationClusterServer(deviceName, serialNumber, vendorId = 0xfff1, vendorName = 'Matterbridge', productId = 0x8000, productName = 'Matterbridge device', softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0', productLabel = 'Matter Endpoint', productUrl = 'https://matterbridge.io', configurationVersion = 1) {
|
|
524
542
|
this.log.logName = deviceName;
|
|
525
543
|
this.deviceName = deviceName;
|
|
526
544
|
this.serialNumber = serialNumber;
|
|
527
545
|
this.uniqueId = createUniqueId(deviceName, serialNumber, vendorName, productName);
|
|
528
546
|
this.productId = productId;
|
|
529
547
|
this.productName = productName;
|
|
548
|
+
this.productLabel = productLabel;
|
|
549
|
+
this.productUrl = productUrl;
|
|
530
550
|
this.vendorId = vendorId;
|
|
531
551
|
this.vendorName = vendorName;
|
|
532
552
|
this.softwareVersion = softwareVersion;
|
|
533
553
|
this.softwareVersionString = softwareVersionString;
|
|
534
554
|
this.hardwareVersion = hardwareVersion;
|
|
535
555
|
this.hardwareVersionString = hardwareVersionString;
|
|
556
|
+
this.configurationVersion = configurationVersion;
|
|
536
557
|
return this;
|
|
537
558
|
}
|
|
538
|
-
createDefaultBridgedDeviceBasicInformationClusterServer(deviceName, serialNumber, vendorId = 0xfff1, vendorName = 'Matterbridge', productName = 'Matterbridge device', softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0') {
|
|
559
|
+
createDefaultBridgedDeviceBasicInformationClusterServer(deviceName, serialNumber, vendorId = 0xfff1, vendorName = 'Matterbridge', productName = 'Matterbridge device', softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0', productLabel = 'Matter Bridged Endpoint', productUrl = 'https://matterbridge.io', configurationVersion = 1) {
|
|
539
560
|
this.log.logName = deviceName;
|
|
540
561
|
this.deviceName = deviceName;
|
|
541
562
|
this.serialNumber = serialNumber;
|
|
542
563
|
this.uniqueId = createUniqueId(deviceName, serialNumber, vendorName, productName);
|
|
543
564
|
this.productId = undefined;
|
|
544
565
|
this.productName = productName;
|
|
566
|
+
this.productLabel = productLabel;
|
|
567
|
+
this.productUrl = productUrl;
|
|
545
568
|
this.vendorId = vendorId;
|
|
546
569
|
this.vendorName = vendorName;
|
|
547
570
|
this.softwareVersion = softwareVersion;
|
|
548
571
|
this.softwareVersionString = softwareVersionString;
|
|
549
572
|
this.hardwareVersion = hardwareVersion;
|
|
550
573
|
this.hardwareVersionString = hardwareVersionString;
|
|
574
|
+
this.configurationVersion = configurationVersion;
|
|
551
575
|
this.behaviors.require(BridgedDeviceBasicInformationServer.enable({
|
|
552
576
|
events: { leave: true, reachableChanged: true },
|
|
553
577
|
}), {
|
|
554
578
|
vendorId: VendorId(vendorId),
|
|
555
579
|
vendorName: vendorName.slice(0, 32),
|
|
556
580
|
productName: productName.slice(0, 32),
|
|
557
|
-
|
|
558
|
-
|
|
581
|
+
productLabel: productLabel.replace(vendorName, '').trim().slice(0, 64),
|
|
582
|
+
productUrl: isValidString(productUrl, 8, 256) && productUrl.startsWith('https://') ? productUrl : 'https://matterbridge.io',
|
|
559
583
|
nodeLabel: deviceName.slice(0, 32),
|
|
560
584
|
serialNumber: serialNumber.slice(0, 32),
|
|
561
585
|
uniqueId: this.uniqueId.slice(0, 32),
|
|
562
|
-
softwareVersion:
|
|
563
|
-
softwareVersionString: isValidString(softwareVersionString) ? softwareVersionString
|
|
564
|
-
hardwareVersion:
|
|
565
|
-
hardwareVersionString: isValidString(hardwareVersionString) ? hardwareVersionString
|
|
586
|
+
softwareVersion: isValidInteger(softwareVersion, 0, UINT32_MAX) ? softwareVersion : 1,
|
|
587
|
+
softwareVersionString: isValidString(softwareVersionString, 1, 64) ? softwareVersionString : '1.0.0',
|
|
588
|
+
hardwareVersion: isValidInteger(hardwareVersion, 0, UINT16_MAX) ? hardwareVersion : 1,
|
|
589
|
+
hardwareVersionString: isValidString(hardwareVersionString, 1, 64) ? hardwareVersionString : '1.0.0',
|
|
590
|
+
configurationVersion: isValidInteger(configurationVersion, 1, UINT32_MAX) ? configurationVersion : 1,
|
|
566
591
|
reachable: true,
|
|
567
592
|
});
|
|
568
593
|
return this;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HandlerFunction } from '@matter/general';
|
|
2
1
|
import type { ActionContext } from '@matter/main';
|
|
3
2
|
import type { ClusterType } from '@matter/types/cluster';
|
|
4
3
|
import type { ActivatedCarbonFilterMonitoring } from '@matter/types/clusters/activated-carbon-filter-monitoring';
|
|
@@ -39,80 +38,6 @@ import type { WindowCovering } from '@matter/types/clusters/window-covering';
|
|
|
39
38
|
import type { ClosureControl } from './clusters/closure-control.js';
|
|
40
39
|
import type { ClosureDimension } from './clusters/closure-dimension.js';
|
|
41
40
|
import type { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
42
|
-
export interface MatterbridgeEndpointCommands {
|
|
43
|
-
identify: HandlerFunction;
|
|
44
|
-
triggerEffect: HandlerFunction;
|
|
45
|
-
on: HandlerFunction;
|
|
46
|
-
off: HandlerFunction;
|
|
47
|
-
toggle: HandlerFunction;
|
|
48
|
-
offWithEffect: HandlerFunction;
|
|
49
|
-
moveToLevel: HandlerFunction;
|
|
50
|
-
moveToLevelWithOnOff: HandlerFunction;
|
|
51
|
-
moveToColor: HandlerFunction;
|
|
52
|
-
moveColor: HandlerFunction;
|
|
53
|
-
stepColor: HandlerFunction;
|
|
54
|
-
moveToHue: HandlerFunction;
|
|
55
|
-
moveHue: HandlerFunction;
|
|
56
|
-
stepHue: HandlerFunction;
|
|
57
|
-
enhancedMoveToHue: HandlerFunction;
|
|
58
|
-
enhancedMoveHue: HandlerFunction;
|
|
59
|
-
enhancedStepHue: HandlerFunction;
|
|
60
|
-
moveToSaturation: HandlerFunction;
|
|
61
|
-
moveSaturation: HandlerFunction;
|
|
62
|
-
stepSaturation: HandlerFunction;
|
|
63
|
-
moveToHueAndSaturation: HandlerFunction;
|
|
64
|
-
enhancedMoveToHueAndSaturation: HandlerFunction;
|
|
65
|
-
moveToColorTemperature: HandlerFunction;
|
|
66
|
-
upOrOpen: HandlerFunction;
|
|
67
|
-
downOrClose: HandlerFunction;
|
|
68
|
-
stopMotion: HandlerFunction;
|
|
69
|
-
goToLiftPercentage: HandlerFunction;
|
|
70
|
-
goToTiltPercentage: HandlerFunction;
|
|
71
|
-
moveTo: HandlerFunction;
|
|
72
|
-
setTarget: HandlerFunction;
|
|
73
|
-
lockDoor: HandlerFunction;
|
|
74
|
-
unlockDoor: HandlerFunction;
|
|
75
|
-
setpointRaiseLower: HandlerFunction;
|
|
76
|
-
setActivePresetRequest: HandlerFunction;
|
|
77
|
-
step: HandlerFunction;
|
|
78
|
-
changeToMode: HandlerFunction;
|
|
79
|
-
open: HandlerFunction;
|
|
80
|
-
close: HandlerFunction;
|
|
81
|
-
suppressAlarm: HandlerFunction;
|
|
82
|
-
enableDisableAlarm: HandlerFunction;
|
|
83
|
-
selfTestRequest: HandlerFunction;
|
|
84
|
-
resetCounts: HandlerFunction;
|
|
85
|
-
setUtcTime: HandlerFunction;
|
|
86
|
-
setTimeZone: HandlerFunction;
|
|
87
|
-
setDstOffset: HandlerFunction;
|
|
88
|
-
pauseRequest: HandlerFunction;
|
|
89
|
-
resumeRequest: HandlerFunction;
|
|
90
|
-
pause: HandlerFunction;
|
|
91
|
-
stop: HandlerFunction;
|
|
92
|
-
start: HandlerFunction;
|
|
93
|
-
resume: HandlerFunction;
|
|
94
|
-
goHome: HandlerFunction;
|
|
95
|
-
selectAreas: HandlerFunction;
|
|
96
|
-
boost: HandlerFunction;
|
|
97
|
-
cancelBoost: HandlerFunction;
|
|
98
|
-
enableCharging: HandlerFunction;
|
|
99
|
-
disable: HandlerFunction;
|
|
100
|
-
setTargets: HandlerFunction;
|
|
101
|
-
getTargets: HandlerFunction;
|
|
102
|
-
clearTargets: HandlerFunction;
|
|
103
|
-
powerAdjustRequest: HandlerFunction;
|
|
104
|
-
cancelPowerAdjustRequest: HandlerFunction;
|
|
105
|
-
setTemperature: HandlerFunction;
|
|
106
|
-
setCookingParameters: HandlerFunction;
|
|
107
|
-
addMoreTime: HandlerFunction;
|
|
108
|
-
play: HandlerFunction;
|
|
109
|
-
previous: HandlerFunction;
|
|
110
|
-
next: HandlerFunction;
|
|
111
|
-
skipForward: HandlerFunction;
|
|
112
|
-
skipBackward: HandlerFunction;
|
|
113
|
-
sendKey: HandlerFunction;
|
|
114
|
-
resetCondition: HandlerFunction;
|
|
115
|
-
}
|
|
116
41
|
type OptionalKeys<T> = {
|
|
117
42
|
[K in keyof T]-?: T[K] extends {
|
|
118
43
|
optional: true;
|
|
@@ -9,6 +9,13 @@ export interface SerializedMatterbridgeEndpoint {
|
|
|
9
9
|
uniqueId: string;
|
|
10
10
|
productId?: number;
|
|
11
11
|
productName?: string;
|
|
12
|
+
productUrl: string;
|
|
13
|
+
productLabel?: string;
|
|
14
|
+
configurationVersion: number;
|
|
15
|
+
softwareVersion?: number;
|
|
16
|
+
softwareVersionString?: string;
|
|
17
|
+
hardwareVersion?: number;
|
|
18
|
+
hardwareVersionString?: string;
|
|
12
19
|
vendorId?: number;
|
|
13
20
|
vendorName?: string;
|
|
14
21
|
deviceTypes: DeviceTypeDefinition[];
|
|
@@ -247,7 +247,7 @@ export class MatterbridgePlatform {
|
|
|
247
247
|
}
|
|
248
248
|
if (!device.hasClusterServer(BridgedDeviceBasicInformation.id)) {
|
|
249
249
|
this.log.debug(`Device with name ${CYAN}${device.deviceName}${db} has no BridgedDeviceBasicInformation cluster. Adding it...`);
|
|
250
|
-
device.createDefaultBridgedDeviceBasicInformationClusterServer(device.deviceName, device.serialNumber, device.vendorId, device.vendorName, device.productName, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString);
|
|
250
|
+
device.createDefaultBridgedDeviceBasicInformationClusterServer(device.deviceName, device.serialNumber, device.vendorId, device.vendorName, device.productName, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString, device.productLabel === 'Matter Endpoint' ? 'Matter Bridged Endpoint' : device.productLabel, device.productUrl, device.configurationVersion);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
await this.#addBridgedEndpoint?.(this.name, device);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0-dev-20260716-7f8762c",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -70,10 +70,6 @@
|
|
|
70
70
|
"types": "./dist/dgram/export.d.ts",
|
|
71
71
|
"import": "./dist/dgram/export.js"
|
|
72
72
|
},
|
|
73
|
-
"./jestutils": {
|
|
74
|
-
"types": "./dist/jestutils/export.d.ts",
|
|
75
|
-
"import": "./dist/jestutils/export.js"
|
|
76
|
-
},
|
|
77
73
|
"./matter": {
|
|
78
74
|
"types": "./dist/matter/export.d.ts",
|
|
79
75
|
"import": "./dist/matter/export.js"
|
|
@@ -136,10 +132,10 @@
|
|
|
136
132
|
},
|
|
137
133
|
"dependencies": {
|
|
138
134
|
"@matter/main": "0.17.5",
|
|
139
|
-
"@matterbridge/dgram": "3.
|
|
140
|
-
"@matterbridge/thread": "3.
|
|
141
|
-
"@matterbridge/types": "3.
|
|
142
|
-
"@matterbridge/utils": "3.
|
|
135
|
+
"@matterbridge/dgram": "3.10.0-dev-20260716-7f8762c",
|
|
136
|
+
"@matterbridge/thread": "3.10.0-dev-20260716-7f8762c",
|
|
137
|
+
"@matterbridge/types": "3.10.0-dev-20260716-7f8762c",
|
|
138
|
+
"@matterbridge/utils": "3.10.0-dev-20260716-7f8762c",
|
|
143
139
|
"escape-html": "1.0.3",
|
|
144
140
|
"express": "5.2.1",
|
|
145
141
|
"express-rate-limit": "8.5.2",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './flushAsync.js';
|
|
2
|
-
export * from './jestBroadcastServerSpy.js';
|
|
3
|
-
export * from './jestDeviceManagerSpy.js';
|
|
4
|
-
export * from './jestFrontendSpy.js';
|
|
5
|
-
export * from './jestMatterbridgeEndpointSpy.js';
|
|
6
|
-
export * from './jestMatterbridgePlatformSpy.js';
|
|
7
|
-
export * from './jestMatterbridgeSpy.js';
|
|
8
|
-
export * from './jestMatterbridgeTest.js';
|
|
9
|
-
export * from './jestMatterTest.js';
|
|
10
|
-
export * from './jestPluginManagerSpy.js';
|
|
11
|
-
export * from './jestSetupTest.js';
|
|
12
|
-
export * from './logKeepAlives.js';
|
|
13
|
-
export * from './matterRequest.js';
|
package/dist/jestutils/export.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './flushAsync.js';
|
|
2
|
-
export * from './jestBroadcastServerSpy.js';
|
|
3
|
-
export * from './jestDeviceManagerSpy.js';
|
|
4
|
-
export * from './jestFrontendSpy.js';
|
|
5
|
-
export * from './jestMatterbridgeEndpointSpy.js';
|
|
6
|
-
export * from './jestMatterbridgePlatformSpy.js';
|
|
7
|
-
export * from './jestMatterbridgeSpy.js';
|
|
8
|
-
export * from './jestMatterbridgeTest.js';
|
|
9
|
-
export * from './jestMatterTest.js';
|
|
10
|
-
export * from './jestPluginManagerSpy.js';
|
|
11
|
-
export * from './jestSetupTest.js';
|
|
12
|
-
export * from './logKeepAlives.js';
|
|
13
|
-
export * from './matterRequest.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function flushAsync(ticks?: number, microTurns?: number, pause?: number): Promise<void>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export async function flushAsync(ticks = 3, microTurns = 10, pause = 250) {
|
|
2
|
-
for (let i = 0; i < ticks; i++)
|
|
3
|
-
await new Promise((resolve) => setImmediate(resolve));
|
|
4
|
-
for (let i = 0; i < microTurns; i++)
|
|
5
|
-
await Promise.resolve();
|
|
6
|
-
if (pause)
|
|
7
|
-
await new Promise((resolve) => setTimeout(resolve, pause));
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BroadcastServer } from '@matterbridge/thread/server';
|
|
2
|
-
export declare const closeBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.close>;
|
|
3
|
-
export declare const getUniqueIdBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.getUniqueId>;
|
|
4
|
-
export declare const isWorkerRequestBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.isWorkerRequest>;
|
|
5
|
-
export declare const isWorkerRequestOfTypeBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.isWorkerRequestOfType>;
|
|
6
|
-
export declare const isWorkerResponseBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.isWorkerResponse>;
|
|
7
|
-
export declare const isWorkerResponseOfTypeBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.isWorkerResponseOfType>;
|
|
8
|
-
export declare const broadcastBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.broadcast>;
|
|
9
|
-
export declare const requestBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.request>;
|
|
10
|
-
export declare const respondBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.respond>;
|
|
11
|
-
export declare const fetchBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.fetch>;
|
|
12
|
-
export declare const broadcastMessageHandlerBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.broadcastMessageHandler>;
|
|
13
|
-
export declare const broadcastMessageErrorHandlerBroadcastServerSpy: jest.SpiedFunction<typeof BroadcastServer.prototype.broadcastMessageErrorHandler>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BroadcastServer } from '@matterbridge/thread/server';
|
|
2
|
-
const { jest } = await import('@jest/globals');
|
|
3
|
-
export const closeBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'close');
|
|
4
|
-
export const getUniqueIdBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'getUniqueId');
|
|
5
|
-
export const isWorkerRequestBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'isWorkerRequest');
|
|
6
|
-
export const isWorkerRequestOfTypeBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'isWorkerRequestOfType');
|
|
7
|
-
export const isWorkerResponseBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'isWorkerResponse');
|
|
8
|
-
export const isWorkerResponseOfTypeBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'isWorkerResponseOfType');
|
|
9
|
-
export const broadcastBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'broadcast');
|
|
10
|
-
export const requestBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'request');
|
|
11
|
-
export const respondBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'respond');
|
|
12
|
-
export const fetchBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'fetch');
|
|
13
|
-
export const broadcastMessageHandlerBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'broadcastMessageHandler');
|
|
14
|
-
export const broadcastMessageErrorHandlerBroadcastServerSpy = jest.spyOn(BroadcastServer.prototype, 'broadcastMessageErrorHandler');
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DeviceManager } from '../deviceManager.js';
|
|
2
|
-
export declare const destroyDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.destroy>;
|
|
3
|
-
export declare const lengthDeviceManagerSpy: jest.SpiedGetter<typeof DeviceManager.prototype.length>;
|
|
4
|
-
export declare const sizeDeviceManagerSpy: jest.SpiedGetter<typeof DeviceManager.prototype.size>;
|
|
5
|
-
export declare const hasDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.has>;
|
|
6
|
-
export declare const getDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.get>;
|
|
7
|
-
export declare const setDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.set>;
|
|
8
|
-
export declare const removeDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.remove>;
|
|
9
|
-
export declare const clearDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.clear>;
|
|
10
|
-
export declare const arrayDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.array>;
|
|
11
|
-
export declare const baseArrayDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.baseArray>;
|
|
12
|
-
export declare const iteratorDeviceManagerSpy: jest.SpiedFunction<(typeof DeviceManager.prototype)[typeof Symbol.iterator]>;
|
|
13
|
-
export declare const forEachDeviceManagerSpy: jest.SpiedFunction<typeof DeviceManager.prototype.forEach>;
|
|
14
|
-
export declare const logLevelDeviceManagerSpy: jest.SpiedSetter<typeof DeviceManager.prototype.logLevel>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DeviceManager } from '../deviceManager.js';
|
|
2
|
-
const { jest } = await import('@jest/globals');
|
|
3
|
-
export const destroyDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'destroy');
|
|
4
|
-
export const lengthDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'length', 'get');
|
|
5
|
-
export const sizeDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'size', 'get');
|
|
6
|
-
export const hasDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'has');
|
|
7
|
-
export const getDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'get');
|
|
8
|
-
export const setDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'set');
|
|
9
|
-
export const removeDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'remove');
|
|
10
|
-
export const clearDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'clear');
|
|
11
|
-
export const arrayDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'array');
|
|
12
|
-
export const baseArrayDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'baseArray');
|
|
13
|
-
export const iteratorDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, Symbol.iterator);
|
|
14
|
-
export const forEachDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'forEach');
|
|
15
|
-
export const logLevelDeviceManagerSpy = jest.spyOn(DeviceManager.prototype, 'logLevel', 'set');
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Frontend } from '../frontend.js';
|
|
2
|
-
export declare const wssSendSnackbarMessageFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendSnackbarMessage>;
|
|
3
|
-
export declare const wssSendCloseSnackbarMessageFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendCloseSnackbarMessage>;
|
|
4
|
-
export declare const wssSendUpdateRequiredFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendUpdateRequired>;
|
|
5
|
-
export declare const wssSendRefreshRequiredFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendRefreshRequired>;
|
|
6
|
-
export declare const wssSendRestartRequiredFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendRestartRequired>;
|
|
7
|
-
export declare const wssSendRestartNotRequiredFrontendSpy: jest.SpiedFunction<typeof Frontend.prototype.wssSendRestartNotRequired>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Frontend } from '../frontend.js';
|
|
2
|
-
const { jest } = await import('@jest/globals');
|
|
3
|
-
export const wssSendSnackbarMessageFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendSnackbarMessage');
|
|
4
|
-
export const wssSendCloseSnackbarMessageFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendCloseSnackbarMessage');
|
|
5
|
-
export const wssSendUpdateRequiredFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendUpdateRequired');
|
|
6
|
-
export const wssSendRefreshRequiredFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendRefreshRequired');
|
|
7
|
-
export const wssSendRestartRequiredFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendRestartRequired');
|
|
8
|
-
export const wssSendRestartNotRequiredFrontendSpy = jest.spyOn(Frontend.prototype, 'wssSendRestartNotRequired');
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import '@matter/nodejs';
|
|
2
|
-
import { Environment } from '@matter/general';
|
|
3
|
-
import { Endpoint, ServerNode } from '@matter/node';
|
|
4
|
-
import { AggregatorEndpoint } from '@matter/node/endpoints';
|
|
5
|
-
import { DeviceTypeId } from '@matter/types/datatype';
|
|
6
|
-
import { type PlatformMatterbridge } from '@matterbridge/types';
|
|
7
|
-
export declare let environment: Environment;
|
|
8
|
-
export declare let server: ServerNode;
|
|
9
|
-
export declare let aggregator: Endpoint<AggregatorEndpoint>;
|
|
10
|
-
export declare function createTestEnvironment(): Promise<Environment>;
|
|
11
|
-
export declare function destroyTestEnvironment(): Promise<void>;
|
|
12
|
-
export declare function getPlatformMatterbridge(): PlatformMatterbridge;
|
|
13
|
-
export declare function flushAllEndpointNumberPersistence(targetServer: ServerNode, rounds?: number, ticks?: number, microTurns?: number, pause?: number): Promise<void>;
|
|
14
|
-
export declare function assertAllEndpointNumbersPersisted(targetServer: ServerNode): Promise<number>;
|
|
15
|
-
export declare function closeServerNodeStores(targetServer?: ServerNode): Promise<void>;
|
|
16
|
-
export declare function createServerNode(port: number, deviceType?: DeviceTypeId, ticks?: number, microTurns?: number, pause?: number): Promise<[ServerNode, Endpoint<AggregatorEndpoint>]>;
|
|
17
|
-
export declare function startServerNode(ticks?: number, microTurns?: number, pause?: number): Promise<[ServerNode, Endpoint<AggregatorEndpoint>]>;
|
|
18
|
-
export declare function stopServerNode(ticks?: number, microTurns?: number, pause?: number): Promise<void>;
|
|
19
|
-
export declare function flushServerNode(ticks?: number, microTurns?: number, pause?: number): Promise<void>;
|
|
20
|
-
export declare function addDevice(owner: ServerNode | Endpoint<AggregatorEndpoint>, device: Endpoint, rounds?: number, pause?: number): Promise<boolean>;
|
|
21
|
-
export declare function deleteDevice(owner: ServerNode | Endpoint<AggregatorEndpoint>, device: Endpoint, rounds?: number, pause?: number): Promise<boolean>;
|