eufy-security-client 3.7.2-dev.1 → 3.7.2
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/.idea/eufy-security-client.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +7 -0
- package/a.ts +61 -0
- package/bin/act +0 -0
- package/build/eufysecurity.js +3 -7
- package/build/eufysecurity.js.map +1 -1
- package/build/http/api.js +1 -1
- package/build/http/api.js.map +1 -1
- package/build/http/device.d.ts +0 -13
- package/build/http/device.js +7 -96
- package/build/http/device.js.map +1 -1
- package/build/http/parameter.js +1 -1
- package/build/http/parameter.js.map +1 -1
- package/build/http/station.js +23 -91
- package/build/http/station.js.map +1 -1
- package/build/http/types.d.ts +0 -10
- package/build/http/types.js +2 -545
- package/build/http/types.js.map +1 -1
- package/build/http/utils.d.ts +2 -2
- package/build/http/utils.js +5 -5
- package/build/http/utils.js.map +1 -1
- package/build/p2p/session.js +2 -14
- package/build/p2p/session.js.map +1 -1
- package/build/p2p/utils.js +0 -1
- package/build/p2p/utils.js.map +1 -1
- package/build/push/service.js +1 -9
- package/build/push/service.js.map +1 -1
- package/build/push/types.d.ts +1 -3
- package/build/push/types.js +0 -2
- package/build/push/types.js.map +1 -1
- package/coverage/clover.xml +11334 -13945
- package/coverage/coverage-final.json +21 -31
- package/coverage/lcov-report/error.ts.html +871 -0
- package/coverage/lcov-report/index.html +50 -65
- package/coverage/lcov-report/logging.ts.html +598 -0
- package/coverage/lcov.info +20839 -25914
- package/dont-care.js +101 -0
- package/package.json +3 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/eufy-security-client.iml" filepath="$PROJECT_DIR$/.idea/eufy-security-client.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/a.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
interface BrandData {
|
|
4
|
+
first?: string[];
|
|
5
|
+
second?: string[];
|
|
6
|
+
numbers?: number;
|
|
7
|
+
letters?: string[];
|
|
8
|
+
}
|
|
9
|
+
const brands: Record<string, BrandData> =
|
|
10
|
+
{
|
|
11
|
+
"Alba": {
|
|
12
|
+
first: ["Smartphone", "TABLET", "Phone", ""],
|
|
13
|
+
second: ["4.0", "5", "6", "7", "8", "10", "X", "Pro"]
|
|
14
|
+
},
|
|
15
|
+
"Archos": {
|
|
16
|
+
first: ["50b", "55", "59", "60", "70", "70b", "79"],
|
|
17
|
+
second: ["Xenon", "neon", "Carbon", "Helium", "Platinum"]
|
|
18
|
+
},
|
|
19
|
+
"GT-S": {
|
|
20
|
+
numbers: 4,
|
|
21
|
+
letters: ["M", "I", "" ]
|
|
22
|
+
},
|
|
23
|
+
"IdeaTab": {
|
|
24
|
+
first: ["S200", "A2100", "K222"],
|
|
25
|
+
second: ["-H", "-F", "-T"]
|
|
26
|
+
},
|
|
27
|
+
"Lenovo": {
|
|
28
|
+
first: ["A2500", "A300", "A218t", "a269"],
|
|
29
|
+
second: [""]
|
|
30
|
+
},
|
|
31
|
+
"SCH-R": {
|
|
32
|
+
numbers: 3,
|
|
33
|
+
letters: [""]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getRandomPhoneModel() {
|
|
38
|
+
const brandKeys = Object.keys(brands);
|
|
39
|
+
const randomBrandName = brandKeys[Math.floor(Math.random() * brandKeys.length)];
|
|
40
|
+
|
|
41
|
+
const pick = (arr: any) => arr[Math.floor(Math.random() * arr.length)];
|
|
42
|
+
|
|
43
|
+
let part1 = "";
|
|
44
|
+
let part2 = "";
|
|
45
|
+
const dataBrand = brands[randomBrandName];
|
|
46
|
+
|
|
47
|
+
if (dataBrand.first && dataBrand.second) {
|
|
48
|
+
part1 = pick(dataBrand.first);
|
|
49
|
+
part2 = pick(dataBrand.second);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (dataBrand.numbers && dataBrand.letters) {
|
|
53
|
+
const minNum = Math.pow(10, dataBrand.numbers - 1);
|
|
54
|
+
const maxNum = Math.pow(10, dataBrand.numbers) - 1;
|
|
55
|
+
part1 = String(Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum);
|
|
56
|
+
part2 = pick(dataBrand.letters);
|
|
57
|
+
}
|
|
58
|
+
return `${randomBrandName}${part1}${part2}`.trim();
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
package/bin/act
ADDED
|
Binary file
|
package/build/eufysecurity.js
CHANGED
|
@@ -2019,8 +2019,7 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
2019
2019
|
!device.isLockWifiT8506() &&
|
|
2020
2020
|
!device.isLockWifiT8502() &&
|
|
2021
2021
|
!device.isLockWifiT8510P() &&
|
|
2022
|
-
!device.isLockWifiT8520P()
|
|
2023
|
-
!device.isLockWifiT85L0()) ||
|
|
2022
|
+
!device.isLockWifiT8520P()) ||
|
|
2024
2023
|
(result.customData !== undefined &&
|
|
2025
2024
|
result.customData.property !== undefined &&
|
|
2026
2025
|
device.isSmartSafe() &&
|
|
@@ -2030,8 +2029,7 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
2030
2029
|
(device.isLockWifiT8506() ||
|
|
2031
2030
|
device.isLockWifiT8502() ||
|
|
2032
2031
|
device.isLockWifiT8510P() ||
|
|
2033
|
-
device.isLockWifiT8520P()
|
|
2034
|
-
device.isLockWifiT85L0()) &&
|
|
2032
|
+
device.isLockWifiT8520P()) &&
|
|
2035
2033
|
result.command_type !== types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE)) {
|
|
2036
2034
|
if (device.hasProperty(result.customData.property.name)) {
|
|
2037
2035
|
const metadata = device.getPropertyMetadata(result.customData.property.name);
|
|
@@ -2803,9 +2801,7 @@ class EufySecurity extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
2803
2801
|
if ((device.isLockWifiT8506() ||
|
|
2804
2802
|
device.isLockWifiT8502() ||
|
|
2805
2803
|
device.isLockWifiT8510P() ||
|
|
2806
|
-
device.isLockWifiT8520P()
|
|
2807
|
-
device.isLockWifiT8531() ||
|
|
2808
|
-
device.isLockWifiT85L0()) &&
|
|
2804
|
+
device.isLockWifiT8520P()) &&
|
|
2809
2805
|
user.password_list.length > 0) {
|
|
2810
2806
|
for (const entry of user.password_list) {
|
|
2811
2807
|
if (entry.password_type === types_1.UserPasswordType.PIN) {
|