matterbridge 2.1.5-dev.8 → 2.1.5
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 +4 -2
- package/README-DOCKER.md +6 -0
- package/dist/cli.d.ts +25 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/cluster/export.d.ts +2 -0
- package/dist/cluster/export.d.ts.map +1 -0
- package/dist/cluster/export.js +2 -0
- package/dist/cluster/export.js.map +1 -0
- package/dist/defaultConfigSchema.d.ts +27 -0
- package/dist/defaultConfigSchema.d.ts.map +1 -0
- package/dist/defaultConfigSchema.js +23 -0
- package/dist/defaultConfigSchema.js.map +1 -0
- package/dist/deviceManager.d.ts +114 -0
- package/dist/deviceManager.d.ts.map +1 -0
- package/dist/deviceManager.js +94 -1
- package/dist/deviceManager.js.map +1 -0
- package/dist/frontend.d.ts +143 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +268 -28
- package/dist/frontend.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/export.d.ts +2 -0
- package/dist/logger/export.d.ts.map +1 -0
- package/dist/logger/export.js +1 -0
- package/dist/logger/export.js.map +1 -0
- package/dist/matter/behaviors.d.ts +2 -0
- package/dist/matter/behaviors.d.ts.map +1 -0
- package/dist/matter/behaviors.js +2 -0
- package/dist/matter/behaviors.js.map +1 -0
- package/dist/matter/clusters.d.ts +2 -0
- package/dist/matter/clusters.d.ts.map +1 -0
- package/dist/matter/clusters.js +2 -0
- package/dist/matter/clusters.js.map +1 -0
- package/dist/matter/devices.d.ts +2 -0
- package/dist/matter/devices.d.ts.map +1 -0
- package/dist/matter/devices.js +2 -0
- package/dist/matter/devices.js.map +1 -0
- package/dist/matter/endpoints.d.ts +2 -0
- package/dist/matter/endpoints.d.ts.map +1 -0
- package/dist/matter/endpoints.js +2 -0
- package/dist/matter/endpoints.js.map +1 -0
- package/dist/matter/export.d.ts +5 -0
- package/dist/matter/export.d.ts.map +1 -0
- package/dist/matter/export.js +2 -0
- package/dist/matter/export.js.map +1 -0
- package/dist/matter/types.d.ts +3 -0
- package/dist/matter/types.d.ts.map +1 -0
- package/dist/matter/types.js +2 -0
- package/dist/matter/types.js.map +1 -0
- package/dist/matterbridge.d.ts +409 -0
- package/dist/matterbridge.d.ts.map +1 -0
- package/dist/matterbridge.js +748 -41
- package/dist/matterbridge.js.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts +39 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.js +33 -0
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
- package/dist/matterbridgeBehaviors.d.ts +1056 -0
- package/dist/matterbridgeBehaviors.d.ts.map +1 -0
- package/dist/matterbridgeBehaviors.js +32 -1
- package/dist/matterbridgeBehaviors.js.map +1 -0
- package/dist/matterbridgeDeviceTypes.d.ts +177 -0
- package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
- package/dist/matterbridgeDeviceTypes.js +112 -11
- package/dist/matterbridgeDeviceTypes.js.map +1 -0
- package/dist/matterbridgeDynamicPlatform.d.ts +39 -0
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
- package/dist/matterbridgeDynamicPlatform.js +33 -0
- package/dist/matterbridgeDynamicPlatform.js.map +1 -0
- package/dist/matterbridgeEndpoint.d.ts +835 -0
- package/dist/matterbridgeEndpoint.d.ts.map +1 -0
- package/dist/matterbridgeEndpoint.js +690 -6
- package/dist/matterbridgeEndpoint.js.map +1 -0
- package/dist/matterbridgeEndpointHelpers.d.ts +2275 -0
- package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
- package/dist/matterbridgeEndpointHelpers.js +117 -9
- package/dist/matterbridgeEndpointHelpers.js.map +1 -0
- package/dist/matterbridgePlatform.d.ts +159 -0
- package/dist/matterbridgePlatform.d.ts.map +1 -0
- package/dist/matterbridgePlatform.js +121 -5
- package/dist/matterbridgePlatform.js.map +1 -0
- package/dist/matterbridgeTypes.d.ts +169 -0
- package/dist/matterbridgeTypes.d.ts.map +1 -0
- package/dist/matterbridgeTypes.js +24 -0
- package/dist/matterbridgeTypes.js.map +1 -0
- package/dist/pluginManager.d.ts +236 -0
- package/dist/pluginManager.d.ts.map +1 -0
- package/dist/pluginManager.js +230 -3
- package/dist/pluginManager.js.map +1 -0
- package/dist/storage/export.d.ts +2 -0
- package/dist/storage/export.d.ts.map +1 -0
- package/dist/storage/export.js +1 -0
- package/dist/storage/export.js.map +1 -0
- package/dist/utils/colorUtils.d.ts +61 -0
- package/dist/utils/colorUtils.d.ts.map +1 -0
- package/dist/utils/colorUtils.js +205 -2
- package/dist/utils/colorUtils.js.map +1 -0
- package/dist/utils/export.d.ts +3 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/export.js +1 -0
- package/dist/utils/export.js.map +1 -0
- package/dist/utils/utils.d.ts +231 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +264 -10
- package/dist/utils/utils.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
package/dist/utils/utils.js
CHANGED
|
@@ -1,25 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the deepEqual function.
|
|
3
|
+
*
|
|
4
|
+
* @file utils.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @date 2024-02-17
|
|
7
|
+
* @version 1.2.9
|
|
8
|
+
*
|
|
9
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License. *
|
|
22
|
+
*/
|
|
23
|
+
// Node.js modules
|
|
1
24
|
import os from 'os';
|
|
2
25
|
import path from 'path';
|
|
26
|
+
// AnsiLogger module
|
|
3
27
|
import { AnsiLogger, idn, rs } from 'node-ansi-logger';
|
|
4
|
-
const log = new AnsiLogger({ logName: 'MatterbridgeUtils', logTimestampFormat: 4
|
|
28
|
+
const log = new AnsiLogger({ logName: 'MatterbridgeUtils', logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logLevel: "info" /* LogLevel.INFO */ });
|
|
29
|
+
/**
|
|
30
|
+
* Performs a deep comparison between two values to determine if they are equivalent.
|
|
31
|
+
* This comparison includes primitive types, arrays, and objects, allowing for optional
|
|
32
|
+
* exclusion of specific properties from the comparison in objects.
|
|
33
|
+
*
|
|
34
|
+
* @param {any} a The first value to compare.
|
|
35
|
+
* @param {any} b The second value to compare.
|
|
36
|
+
* @param {string[]} [excludeProperties=[]] An array of property names to exclude from the comparison in objects.
|
|
37
|
+
* @returns {boolean} True if the values are deeply equal, excluding any specified properties; otherwise, false.
|
|
38
|
+
*
|
|
39
|
+
* Note: This function utilizes recursion for deep comparison of nested structures and includes a debugging
|
|
40
|
+
* mechanism that can be toggled on or off for detailed comparison logging. It is important to ensure that
|
|
41
|
+
* objects do not contain circular references when enabling debug logging to avoid infinite loops.
|
|
42
|
+
*
|
|
43
|
+
* Example usage:
|
|
44
|
+
* ```
|
|
45
|
+
* const obj1 = { a: 1, b: { c: 2 } };
|
|
46
|
+
* const obj2 = { a: 1, b: { c: 2 } };
|
|
47
|
+
* console.log(deepEqual(obj1, obj2)); // true
|
|
48
|
+
*
|
|
49
|
+
* const arr1 = [1, 2, [3, 4]];
|
|
50
|
+
* const arr2 = [1, 2, [3, 4]];
|
|
51
|
+
* console.log(deepEqual(arr1, arr2)); // true
|
|
52
|
+
*
|
|
53
|
+
* const obj3 = { a: 1, b: { c: 2, d: 3 } };
|
|
54
|
+
* const obj4 = { a: 1, b: { c: 2 } };
|
|
55
|
+
* console.log(deepEqual(obj3, obj4, ['d'])); // true, excluding property 'd' from comparison
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
59
|
export function deepEqual(a, b, excludeProperties = []) {
|
|
60
|
+
// Toggle debugging on or off easily
|
|
6
61
|
const debug = false;
|
|
62
|
+
// Helper function for conditional logging
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
64
|
const debugLog = (...messages) => {
|
|
8
65
|
if (debug) {
|
|
66
|
+
// eslint-disable-next-line no-console
|
|
9
67
|
console.log(...messages);
|
|
10
68
|
}
|
|
11
69
|
};
|
|
70
|
+
// If both are the same instance, return true (handles primitives and same object references)
|
|
12
71
|
if (a === b) {
|
|
13
72
|
return true;
|
|
14
73
|
}
|
|
74
|
+
// If types are different, return false
|
|
15
75
|
if (typeof a !== typeof b) {
|
|
16
76
|
debugLog(`deepEqual false for typeof a: ${typeof a} typeof b: ${typeof b}`);
|
|
17
77
|
return false;
|
|
18
78
|
}
|
|
79
|
+
// If one of them is null (and we know they are not equal from the first check), return false
|
|
19
80
|
if (a == null || b == null) {
|
|
20
81
|
debugLog('deepEqual false for == null');
|
|
21
82
|
return false;
|
|
22
83
|
}
|
|
84
|
+
// Handle Arrays
|
|
23
85
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
24
86
|
if (a.length !== b.length) {
|
|
25
87
|
debugLog(`deepEqual false for array a.length(${a.length}) !== b.length(${b.length})`);
|
|
@@ -35,54 +97,75 @@ export function deepEqual(a, b, excludeProperties = []) {
|
|
|
35
97
|
}
|
|
36
98
|
return true;
|
|
37
99
|
}
|
|
100
|
+
// Handle Objects (and exclude null, functions, and arrays)
|
|
38
101
|
if (typeof a === 'object' && typeof b === 'object') {
|
|
39
102
|
const aProps = Object.getOwnPropertyNames(a).filter((prop) => !excludeProperties.includes(prop));
|
|
40
103
|
const bProps = Object.getOwnPropertyNames(b).filter((prop) => !excludeProperties.includes(prop));
|
|
104
|
+
// If their property lengths are different, they're different objects
|
|
41
105
|
if (aProps.length !== bProps.length) {
|
|
42
106
|
debugLog(`deepEqual false for aProps.length(${aProps.length}) !== bProps.length(${bProps.length})`);
|
|
43
107
|
debugLog(`- aProps.length(${aProps.length}):`, aProps);
|
|
44
108
|
debugLog(`- bProps.length(${bProps.length}):`, bProps);
|
|
45
109
|
return false;
|
|
46
110
|
}
|
|
111
|
+
// Check each property in 'a' to see if it's in 'b' and if it's equal (deep check)
|
|
47
112
|
for (const prop of aProps) {
|
|
48
113
|
if (!Object.prototype.hasOwnProperty.call(b, prop)) {
|
|
49
114
|
debugLog(`deepEqual false for !b.hasOwnProperty(${prop})`);
|
|
50
115
|
return false;
|
|
51
116
|
}
|
|
52
117
|
if (!deepEqual(a[prop], b[prop], excludeProperties)) {
|
|
53
|
-
debugLog(`deepEqual false for !deepEqual(a[${prop}], b[${prop}])`);
|
|
118
|
+
debugLog(`deepEqual false for !deepEqual(a[${prop}], b[${prop}])` /* , a[prop], b[prop]*/);
|
|
54
119
|
return false;
|
|
55
120
|
}
|
|
56
121
|
}
|
|
57
122
|
return true;
|
|
58
123
|
}
|
|
124
|
+
// If none of the above, the objects are not equal
|
|
59
125
|
return false;
|
|
60
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Creates a deep copy of the given value.
|
|
129
|
+
*
|
|
130
|
+
* @template T - The type of the value being copied.
|
|
131
|
+
* @param {T} value - The value to be copied.
|
|
132
|
+
* @returns {T} - The deep copy of the value.
|
|
133
|
+
*/
|
|
61
134
|
export function deepCopy(value) {
|
|
62
135
|
if (typeof value !== 'object' || value === null) {
|
|
136
|
+
// Primitive value (string, number, boolean, bigint, undefined, symbol) or null
|
|
63
137
|
return value;
|
|
64
138
|
}
|
|
65
139
|
else if (Array.isArray(value)) {
|
|
140
|
+
// Array: Recursively copy each element
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
142
|
return value.map((item) => deepCopy(item));
|
|
67
143
|
}
|
|
68
144
|
else if (value instanceof Date) {
|
|
145
|
+
// Date objects
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
147
|
return new Date(value.getTime());
|
|
70
148
|
}
|
|
71
149
|
else if (value instanceof Map) {
|
|
150
|
+
// Maps
|
|
72
151
|
const mapCopy = new Map();
|
|
73
152
|
value.forEach((val, key) => {
|
|
74
153
|
mapCopy.set(key, deepCopy(val));
|
|
75
154
|
});
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76
156
|
return mapCopy;
|
|
77
157
|
}
|
|
78
158
|
else if (value instanceof Set) {
|
|
159
|
+
// Sets
|
|
79
160
|
const setCopy = new Set();
|
|
80
161
|
value.forEach((item) => {
|
|
81
162
|
setCopy.add(deepCopy(item));
|
|
82
163
|
});
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
165
|
return setCopy;
|
|
84
166
|
}
|
|
85
167
|
else {
|
|
168
|
+
// Objects: Create a copy with the same prototype as the original
|
|
86
169
|
const proto = Object.getPrototypeOf(value);
|
|
87
170
|
const copy = Object.create(proto);
|
|
88
171
|
for (const key in value) {
|
|
@@ -93,9 +176,14 @@ export function deepCopy(value) {
|
|
|
93
176
|
return copy;
|
|
94
177
|
}
|
|
95
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Retrieves the IPv4 address of the first non-internal network interface.
|
|
181
|
+
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
182
|
+
*/
|
|
96
183
|
export function getIpv4InterfaceAddress() {
|
|
97
184
|
let ipv4Address;
|
|
98
185
|
const networkInterfaces = os.networkInterfaces();
|
|
186
|
+
// console.log('Available Network Interfaces:', networkInterfaces);
|
|
99
187
|
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
100
188
|
if (!interfaceDetails) {
|
|
101
189
|
break;
|
|
@@ -109,11 +197,17 @@ export function getIpv4InterfaceAddress() {
|
|
|
109
197
|
break;
|
|
110
198
|
}
|
|
111
199
|
}
|
|
200
|
+
// console.log('Selected Network Interfaces:', ipv4Address);
|
|
112
201
|
return ipv4Address;
|
|
113
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Retrieves the IPv6 address of the first non-internal network interface.
|
|
205
|
+
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
206
|
+
*/
|
|
114
207
|
export function getIpv6InterfaceAddress() {
|
|
115
208
|
let ipv6Address;
|
|
116
209
|
const networkInterfaces = os.networkInterfaces();
|
|
210
|
+
// console.log('Available Network Interfaces:', networkInterfaces);
|
|
117
211
|
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
118
212
|
if (!interfaceDetails) {
|
|
119
213
|
break;
|
|
@@ -127,11 +221,17 @@ export function getIpv6InterfaceAddress() {
|
|
|
127
221
|
break;
|
|
128
222
|
}
|
|
129
223
|
}
|
|
224
|
+
// console.log('Selected Network Interfaces:', ipv6Address);
|
|
130
225
|
return ipv6Address;
|
|
131
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves the mac address of the first non-internal network interface.
|
|
229
|
+
* @returns {string | undefined} The IPv4 address of the selected network interface, or undefined if not found.
|
|
230
|
+
*/
|
|
132
231
|
export function getMacAddress() {
|
|
133
232
|
let macAddress;
|
|
134
233
|
const networkInterfaces = os.networkInterfaces();
|
|
234
|
+
// console.log('Available Network Interfaces:', networkInterfaces);
|
|
135
235
|
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
136
236
|
if (!interfaceDetails) {
|
|
137
237
|
break;
|
|
@@ -147,10 +247,25 @@ export function getMacAddress() {
|
|
|
147
247
|
}
|
|
148
248
|
return macAddress;
|
|
149
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Checks if a given string is a valid IPv4 address.
|
|
252
|
+
*
|
|
253
|
+
* @param {string} ipv4Address - The string to be checked.
|
|
254
|
+
* @returns {boolean} - Returns true if the string is a valid IPv4 address, otherwise returns false.
|
|
255
|
+
*/
|
|
150
256
|
export function isValidIpv4Address(ipv4Address) {
|
|
151
257
|
const ipv4Regex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
|
152
258
|
return ipv4Regex.test(ipv4Address);
|
|
153
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Checks if a value is a valid number within the specified range.
|
|
262
|
+
*
|
|
263
|
+
* @param {any} value - The value to be checked.
|
|
264
|
+
* @param {number} min - The minimum value allowed (optional).
|
|
265
|
+
* @param {number} max - The maximum value allowed (optional).
|
|
266
|
+
* @returns {boolean} Returns true if the value is a valid number within the specified range, otherwise false.
|
|
267
|
+
*/
|
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
269
|
export function isValidNumber(value, min, max) {
|
|
155
270
|
if (value === undefined || value === null || typeof value !== 'number' || Number.isNaN(value))
|
|
156
271
|
return false;
|
|
@@ -160,9 +275,25 @@ export function isValidNumber(value, min, max) {
|
|
|
160
275
|
return false;
|
|
161
276
|
return true;
|
|
162
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Checks if a value is a valid boolean.
|
|
280
|
+
*
|
|
281
|
+
* @param {any} value - The value to be checked.
|
|
282
|
+
* @returns {boolean} `true` if the value is a valid boolean, `false` otherwise.
|
|
283
|
+
*/
|
|
284
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
163
285
|
export function isValidBoolean(value) {
|
|
164
286
|
return value !== undefined && value !== null && typeof value === 'boolean';
|
|
165
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* Checks if a value is a valid string.
|
|
290
|
+
*
|
|
291
|
+
* @param {any} value - The value to be checked.
|
|
292
|
+
* @param {number} minLength - The min string length (optional).
|
|
293
|
+
* @param {number} maxLength - The max string length (optional).
|
|
294
|
+
* @returns {boolean} A boolean indicating whether the value is a valid string.
|
|
295
|
+
*/
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
166
297
|
export function isValidString(value, minLength, maxLength) {
|
|
167
298
|
if (value === undefined || value === null || typeof value !== 'string')
|
|
168
299
|
return false;
|
|
@@ -172,6 +303,15 @@ export function isValidString(value, minLength, maxLength) {
|
|
|
172
303
|
return false;
|
|
173
304
|
return true;
|
|
174
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Checks if a value is a valid object.
|
|
308
|
+
*
|
|
309
|
+
* @param {any} value - The value to be checked.
|
|
310
|
+
* @param {number} minLength - The min number of keys (optional).
|
|
311
|
+
* @param {number} maxLength - The max number of keys (optional).
|
|
312
|
+
* @returns {boolean} A boolean indicating whether the value is a valid object.
|
|
313
|
+
*/
|
|
314
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
175
315
|
export function isValidObject(value, minLength, maxLength) {
|
|
176
316
|
if (value === undefined || value === null || typeof value !== 'object' || Array.isArray(value))
|
|
177
317
|
return false;
|
|
@@ -182,6 +322,15 @@ export function isValidObject(value, minLength, maxLength) {
|
|
|
182
322
|
return false;
|
|
183
323
|
return true;
|
|
184
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Checks if a value is a valid array.
|
|
327
|
+
*
|
|
328
|
+
* @param {any} value - The value to be checked.
|
|
329
|
+
* @param {number} minLength - The min number of elements (optional).
|
|
330
|
+
* @param {number} maxLength - The max number of elements (optional).
|
|
331
|
+
* @returns {boolean} A boolean indicating whether the value is a valid array.
|
|
332
|
+
*/
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
185
334
|
export function isValidArray(value, minLength, maxLength) {
|
|
186
335
|
if (value === undefined || value === null || !Array.isArray(value))
|
|
187
336
|
return false;
|
|
@@ -191,14 +340,33 @@ export function isValidArray(value, minLength, maxLength) {
|
|
|
191
340
|
return false;
|
|
192
341
|
return true;
|
|
193
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Checks if the given value is null.
|
|
345
|
+
*
|
|
346
|
+
* @param {any} value - The value to check.
|
|
347
|
+
* @returns {boolean} `true` if the value is null, `false` otherwise.
|
|
348
|
+
*/
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
350
|
export function isValidNull(value) {
|
|
195
351
|
return value === null;
|
|
196
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Checks if a value is undefined.
|
|
355
|
+
*
|
|
356
|
+
* @param {any} value - The value to check.
|
|
357
|
+
* @returns {boolean} `true` if the value is undefined, `false` otherwise.
|
|
358
|
+
*/
|
|
359
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
197
360
|
export function isValidUndefined(value) {
|
|
198
361
|
return value === undefined;
|
|
199
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Logs the available network interfaces and their details.
|
|
365
|
+
* @param {boolean} log - Whether to enable logging of network interface details.
|
|
366
|
+
* @returns {string | undefined} The IPv6 address of the network interface, if available.
|
|
367
|
+
*/
|
|
200
368
|
export function logInterfaces(debug = true) {
|
|
201
|
-
log.logLevel = "info"
|
|
369
|
+
log.logLevel = "info" /* LogLevel.INFO */;
|
|
202
370
|
log.logName = 'LogInterfaces';
|
|
203
371
|
let ipv6Address;
|
|
204
372
|
const networkInterfaces = os.networkInterfaces();
|
|
@@ -216,8 +384,18 @@ export function logInterfaces(debug = true) {
|
|
|
216
384
|
}
|
|
217
385
|
return ipv6Address;
|
|
218
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Asynchronous waiter function that resolves when the provided condition is met or rejects on timeout.
|
|
389
|
+
* @param {string} name - The name of the waiter.
|
|
390
|
+
* @param {() => boolean} check - A function that checks the condition. Should return a boolean.
|
|
391
|
+
* @param {boolean} [exitWithReject=false] - Optional. If true, the promise will be rejected on timeout. Default is false.
|
|
392
|
+
* @param {number} [resolveTimeout=5000] - Optional. The timeout duration in milliseconds. Default is 5000ms.
|
|
393
|
+
* @param {number} [resolveInterval=500] - Optional. The interval duration in milliseconds between condition checks. Default is 500ms.
|
|
394
|
+
* @param {boolean} [debug=false] - Optional. If true, debug messages will be logged to the console. Default is false.
|
|
395
|
+
* @returns {Promise<boolean>} A promise that resolves to true when the condition is met, or false if the timeout occurs.
|
|
396
|
+
*/
|
|
219
397
|
export async function waiter(name, check, exitWithReject = false, resolveTimeout = 5000, resolveInterval = 500, debug = false) {
|
|
220
|
-
log.logLevel = "debug"
|
|
398
|
+
log.logLevel = "debug" /* LogLevel.DEBUG */;
|
|
221
399
|
log.logName = 'Waiter';
|
|
222
400
|
if (debug)
|
|
223
401
|
log.debug(`Waiter "${name}" started...`);
|
|
@@ -243,11 +421,19 @@ export async function waiter(name, check, exitWithReject = false, resolveTimeout
|
|
|
243
421
|
}, resolveInterval);
|
|
244
422
|
});
|
|
245
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* Asynchronously waits for a specified amount of time.
|
|
426
|
+
* @param {number} timeout - The duration to wait in milliseconds. Default is 1000ms.
|
|
427
|
+
* @param {string} name - The name of the wait operation. Default is undefined.
|
|
428
|
+
* @param {boolean} debug - Whether to enable debug logging. Default is false.
|
|
429
|
+
* @returns {Promise<void>} A Promise that resolves after the specified timeout.
|
|
430
|
+
*/
|
|
246
431
|
export async function wait(timeout = 1000, name, debug = false) {
|
|
247
|
-
log.logLevel = "debug"
|
|
432
|
+
log.logLevel = "debug" /* LogLevel.DEBUG */;
|
|
248
433
|
log.logName = 'Wait';
|
|
249
434
|
if (debug)
|
|
250
435
|
log.debug(`Wait "${name}" started...`);
|
|
436
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
251
437
|
return new Promise((resolve, reject) => {
|
|
252
438
|
const timeoutId = setTimeout(() => {
|
|
253
439
|
if (debug)
|
|
@@ -257,17 +443,31 @@ export async function wait(timeout = 1000, name, debug = false) {
|
|
|
257
443
|
}, timeout);
|
|
258
444
|
});
|
|
259
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Creates a ZIP archive from the specified source pattern or directory and writes it to the specified output path.
|
|
448
|
+
*
|
|
449
|
+
* @param {string} outputPath - The path where the output ZIP file will be written.
|
|
450
|
+
* @param {string[]} sourcePaths - The source pattern or directory to be zipped (use path.join for sourcePath).
|
|
451
|
+
* @returns {Promise<number>} - A promise that resolves to the total number of bytes written to the ZIP file.
|
|
452
|
+
*
|
|
453
|
+
* @remarks
|
|
454
|
+
* This function uses the `archiver` library to create a ZIP archive. It sets the compression level to 9 (maximum compression).
|
|
455
|
+
* The function ensures that the output file is properly closed after the archiving process is complete.
|
|
456
|
+
* It logs the progress and the total number of bytes written to the console.
|
|
457
|
+
*
|
|
458
|
+
* This function uses the `glob` library to match files based on the source pattern (internally converted in posix).
|
|
459
|
+
*/
|
|
260
460
|
export async function createZip(outputPath, ...sourcePaths) {
|
|
261
461
|
const { default: archiver } = await import('archiver');
|
|
262
462
|
const { glob } = await import('glob');
|
|
263
463
|
const { createWriteStream, statSync } = await import('fs');
|
|
264
|
-
log.logLevel = "info"
|
|
464
|
+
log.logLevel = "info" /* LogLevel.INFO */;
|
|
265
465
|
log.logName = 'Archive';
|
|
266
466
|
log.debug(`creating archive ${outputPath} from ${sourcePaths.join(', ')} ...`);
|
|
267
467
|
return new Promise((resolve, reject) => {
|
|
268
468
|
const output = createWriteStream(outputPath);
|
|
269
469
|
const archive = archiver('zip', {
|
|
270
|
-
zlib: { level: 9 },
|
|
470
|
+
zlib: { level: 9 }, // Set compression level
|
|
271
471
|
});
|
|
272
472
|
output.on('close', () => {
|
|
273
473
|
log.debug(`archive ${outputPath} closed with ${archive.pointer()} total bytes`);
|
|
@@ -294,6 +494,7 @@ export async function createZip(outputPath, ...sourcePaths) {
|
|
|
294
494
|
});
|
|
295
495
|
archive.pipe(output);
|
|
296
496
|
for (const sourcePath of sourcePaths) {
|
|
497
|
+
// Check if the sourcePath is a file or directory
|
|
297
498
|
let stats;
|
|
298
499
|
try {
|
|
299
500
|
stats = statSync(sourcePath);
|
|
@@ -321,23 +522,36 @@ export async function createZip(outputPath, ...sourcePaths) {
|
|
|
321
522
|
archive.directory(sourcePath, path.basename(sourcePath));
|
|
322
523
|
}
|
|
323
524
|
}
|
|
525
|
+
// Finalize the archive (i.e., we are done appending files but streams have to finish yet)
|
|
324
526
|
log.debug(`finalizing archive ${outputPath}...`);
|
|
325
527
|
archive.finalize().catch(reject);
|
|
326
528
|
});
|
|
327
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* Copies a directory and all its subdirectories and files to a new location.
|
|
532
|
+
*
|
|
533
|
+
* @param {string} srcDir - The path to the source directory.
|
|
534
|
+
* @param {string} destDir - The path to the destination directory.
|
|
535
|
+
* @returns {Promise<boolean>} - A promise that resolves when the copy operation is complete or fails for error.
|
|
536
|
+
* @throws {Error} - Throws an error if the copy operation fails.
|
|
537
|
+
*/
|
|
328
538
|
export async function copyDirectory(srcDir, destDir) {
|
|
329
539
|
const fs = await import('fs').then((mod) => mod.promises);
|
|
330
540
|
log.debug(`copyDirectory: copying directory from ${srcDir} to ${destDir}`);
|
|
331
541
|
try {
|
|
542
|
+
// Create destination directory if it doesn't exist
|
|
332
543
|
await fs.mkdir(destDir, { recursive: true });
|
|
544
|
+
// Read contents of the source directory
|
|
333
545
|
const entries = await fs.readdir(srcDir, { withFileTypes: true });
|
|
334
546
|
for (const entry of entries) {
|
|
335
547
|
const srcPath = path.join(srcDir, entry.name);
|
|
336
548
|
const destPath = path.join(destDir, entry.name);
|
|
337
549
|
if (entry.isDirectory()) {
|
|
550
|
+
// Recursive call if entry is a directory
|
|
338
551
|
await copyDirectory(srcPath, destPath);
|
|
339
552
|
}
|
|
340
553
|
else if (entry.isFile()) {
|
|
554
|
+
// Copy file if entry is a file
|
|
341
555
|
await fs.copyFile(srcPath, destPath);
|
|
342
556
|
}
|
|
343
557
|
}
|
|
@@ -348,16 +562,33 @@ export async function copyDirectory(srcDir, destDir) {
|
|
|
348
562
|
return false;
|
|
349
563
|
}
|
|
350
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Resolves the given hostname to an IP address.
|
|
567
|
+
*
|
|
568
|
+
* @param {string} hostname - The hostname to resolve.
|
|
569
|
+
* @param {0 | 4 | 6} [family=4] - The address family to use (0 for any, 4 for IPv4, 6 for IPv6). Default is 4.
|
|
570
|
+
* @returns {Promise<string | null>} - A promise that resolves to the IP address or null if not found.
|
|
571
|
+
*
|
|
572
|
+
* @remarks
|
|
573
|
+
* This function uses DNS lookup to resolve the hostname, which can take some time to complete.
|
|
574
|
+
*/
|
|
351
575
|
export async function resolveHostname(hostname, family = 4) {
|
|
352
576
|
const dns = await import('dns');
|
|
353
577
|
try {
|
|
354
|
-
const addresses = await dns.promises.lookup(hostname.toLowerCase()
|
|
578
|
+
const addresses = await dns.promises.lookup(hostname.toLowerCase() /* + '.local'*/, { family });
|
|
355
579
|
return addresses.address;
|
|
580
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
356
581
|
}
|
|
357
582
|
catch (error) {
|
|
358
583
|
return null;
|
|
359
584
|
}
|
|
360
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* Retrieves the value of a command-line parameter.
|
|
588
|
+
*
|
|
589
|
+
* @param {string} name - The name of the parameter to retrieve.
|
|
590
|
+
* @returns {string | undefined} The value of the parameter, or undefined if not found.
|
|
591
|
+
*/
|
|
361
592
|
export function getParameter(name) {
|
|
362
593
|
const commandArguments = process.argv.slice(2);
|
|
363
594
|
let markerIndex = commandArguments.indexOf(`-${name}`);
|
|
@@ -367,6 +598,12 @@ export function getParameter(name) {
|
|
|
367
598
|
return undefined;
|
|
368
599
|
return commandArguments[markerIndex + 1];
|
|
369
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Checks if a command-line parameter is present.
|
|
603
|
+
*
|
|
604
|
+
* @param {string} name - The name of the parameter to check.
|
|
605
|
+
* @returns {boolean} True if the parameter is present, otherwise false.
|
|
606
|
+
*/
|
|
370
607
|
export function hasParameter(name) {
|
|
371
608
|
const commandArguments = process.argv.slice(2);
|
|
372
609
|
let markerIncluded = commandArguments.includes(`-${name}`);
|
|
@@ -374,6 +611,12 @@ export function hasParameter(name) {
|
|
|
374
611
|
markerIncluded = commandArguments.includes(`--${name}`);
|
|
375
612
|
return markerIncluded;
|
|
376
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Retrieves the value of a command-line parameter as an integer.
|
|
616
|
+
*
|
|
617
|
+
* @param {string} name - The name of the parameter to retrieve.
|
|
618
|
+
* @returns {number | undefined} The integer value of the parameter, or undefined if not found or invalid.
|
|
619
|
+
*/
|
|
377
620
|
export function getIntParameter(name) {
|
|
378
621
|
const value = getParameter(name);
|
|
379
622
|
if (value === undefined)
|
|
@@ -383,6 +626,15 @@ export function getIntParameter(name) {
|
|
|
383
626
|
return undefined;
|
|
384
627
|
return intValue;
|
|
385
628
|
}
|
|
629
|
+
/**
|
|
630
|
+
* Retrieves the version of an npm package from the npm registry.
|
|
631
|
+
*
|
|
632
|
+
* @param {string} packageName - The name of the npm package.
|
|
633
|
+
* @param {string} [tag='latest'] - The tag of the package version to retrieve (default is 'latest').
|
|
634
|
+
* @param {number} [timeout=5000] - The timeout duration in milliseconds (default is 5000ms).
|
|
635
|
+
* @returns {Promise<string>} A promise that resolves to the version string of the package.
|
|
636
|
+
* @throws {Error} If the request fails or the tag is not found.
|
|
637
|
+
*/
|
|
386
638
|
export async function getNpmPackageVersion(packageName, tag = 'latest', timeout = 5000) {
|
|
387
639
|
const https = await import('https');
|
|
388
640
|
return new Promise((resolve, reject) => {
|
|
@@ -396,8 +648,8 @@ export async function getNpmPackageVersion(packageName, tag = 'latest', timeout
|
|
|
396
648
|
let data = '';
|
|
397
649
|
if (res.statusCode !== 200) {
|
|
398
650
|
clearTimeout(timeoutId);
|
|
399
|
-
res.resume();
|
|
400
|
-
req.destroy();
|
|
651
|
+
res.resume(); // Discard response data to close the socket properly
|
|
652
|
+
req.destroy(); // Forcefully close the request
|
|
401
653
|
reject(new Error(`Failed to fetch data. Status code: ${res.statusCode}`));
|
|
402
654
|
return;
|
|
403
655
|
}
|
|
@@ -408,6 +660,7 @@ export async function getNpmPackageVersion(packageName, tag = 'latest', timeout
|
|
|
408
660
|
clearTimeout(timeoutId);
|
|
409
661
|
try {
|
|
410
662
|
const jsonData = JSON.parse(data);
|
|
663
|
+
// console.log(`Package ${packageName} tag ${tag}`, jsonData);
|
|
411
664
|
const version = jsonData['dist-tags']?.[tag];
|
|
412
665
|
if (version) {
|
|
413
666
|
resolve(version);
|
|
@@ -427,3 +680,4 @@ export async function getNpmPackageVersion(packageName, tag = 'latest', timeout
|
|
|
427
680
|
});
|
|
428
681
|
});
|
|
429
682
|
}
|
|
683
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,kBAAkB;AAClB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,oBAAoB;AACpB,OAAO,EAAE,UAAU,EAAE,GAAG,EAAY,EAAE,EAAmB,MAAM,kBAAkB,CAAC;AAElF,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,qCAA6B,EAAE,QAAQ,4BAAe,EAAE,CAAC,CAAC;AAEvI;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8DAA8D;AAC9D,MAAM,UAAU,SAAS,CAAC,CAAM,EAAE,CAAM,EAAE,oBAA8B,EA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,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "2.1.5
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "2.1.5
|
|
9
|
+
"version": "2.1.5",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.12.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "2.1.5
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"type": "module",
|
|
43
43
|
"main": "dist/index.js",
|
|
44
|
+
"types": "dist/index.d.ts",
|
|
44
45
|
"bin": {
|
|
45
46
|
"matterbridge": "dist/cli.js"
|
|
46
47
|
},
|