@homebridge-eufy-security/eufy-security-client 3.7.2-dev.0
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/.prettierignore/342/200/216 +8 -0
- package/.prettierrc +11 -0
- package/LICENSE +21 -0
- package/README.md +970 -0
- package/build/error.d.ts +138 -0
- package/build/error.js +190 -0
- package/build/error.js.map +1 -0
- package/build/eufysecurity.d.ts +180 -0
- package/build/eufysecurity.js +3148 -0
- package/build/eufysecurity.js.map +1 -0
- package/build/http/api.d.ts +119 -0
- package/build/http/api.js +1877 -0
- package/build/http/api.js.map +1 -0
- package/build/http/cache.d.ts +8 -0
- package/build/http/cache.js +34 -0
- package/build/http/cache.js.map +1 -0
- package/build/http/const.d.ts +8 -0
- package/build/http/const.js +3054 -0
- package/build/http/const.js.map +1 -0
- package/build/http/device.d.ts +490 -0
- package/build/http/device.js +5256 -0
- package/build/http/device.js.map +1 -0
- package/build/http/error.d.ts +73 -0
- package/build/http/error.js +101 -0
- package/build/http/error.js.map +1 -0
- package/build/http/index.d.ts +10 -0
- package/build/http/index.js +30 -0
- package/build/http/index.js.map +1 -0
- package/build/http/interfaces.d.ts +248 -0
- package/build/http/interfaces.js +3 -0
- package/build/http/interfaces.js.map +1 -0
- package/build/http/models.d.ts +608 -0
- package/build/http/models.js +3 -0
- package/build/http/models.js.map +1 -0
- package/build/http/parameter.d.ts +7 -0
- package/build/http/parameter.js +119 -0
- package/build/http/parameter.js.map +1 -0
- package/build/http/station.d.ts +382 -0
- package/build/http/station.js +15735 -0
- package/build/http/station.js.map +1 -0
- package/build/http/types.d.ts +1358 -0
- package/build/http/types.js +10333 -0
- package/build/http/types.js.map +1 -0
- package/build/http/utils.d.ts +89 -0
- package/build/http/utils.js +916 -0
- package/build/http/utils.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.js +29 -0
- package/build/index.js.map +1 -0
- package/build/interfaces.d.ts +147 -0
- package/build/interfaces.js +7 -0
- package/build/interfaces.js.map +1 -0
- package/build/logging.d.ts +36 -0
- package/build/logging.js +119 -0
- package/build/logging.js.map +1 -0
- package/build/mqtt/interface.d.ts +6 -0
- package/build/mqtt/interface.js +3 -0
- package/build/mqtt/interface.js.map +1 -0
- package/build/mqtt/model.d.ts +24 -0
- package/build/mqtt/model.js +3 -0
- package/build/mqtt/model.js.map +1 -0
- package/build/mqtt/mqtt-eufy.crt +79 -0
- package/build/mqtt/proto/lock.proto +33 -0
- package/build/mqtt/service.d.ts +28 -0
- package/build/mqtt/service.js +196 -0
- package/build/mqtt/service.js.map +1 -0
- package/build/p2p/ble.d.ts +59 -0
- package/build/p2p/ble.js +281 -0
- package/build/p2p/ble.js.map +1 -0
- package/build/p2p/error.d.ts +49 -0
- package/build/p2p/error.js +69 -0
- package/build/p2p/error.js.map +1 -0
- package/build/p2p/index.d.ts +8 -0
- package/build/p2p/index.js +28 -0
- package/build/p2p/index.js.map +1 -0
- package/build/p2p/interfaces.d.ts +423 -0
- package/build/p2p/interfaces.js +3 -0
- package/build/p2p/interfaces.js.map +1 -0
- package/build/p2p/models.d.ts +295 -0
- package/build/p2p/models.js +3 -0
- package/build/p2p/models.js.map +1 -0
- package/build/p2p/session.d.ts +186 -0
- package/build/p2p/session.js +3737 -0
- package/build/p2p/session.js.map +1 -0
- package/build/p2p/talkback.d.ts +8 -0
- package/build/p2p/talkback.js +23 -0
- package/build/p2p/talkback.js.map +1 -0
- package/build/p2p/types.d.ts +1164 -0
- package/build/p2p/types.js +1219 -0
- package/build/p2p/types.js.map +1 -0
- package/build/p2p/utils.d.ts +72 -0
- package/build/p2p/utils.js +865 -0
- package/build/p2p/utils.js.map +1 -0
- package/build/push/client.d.ts +49 -0
- package/build/push/client.js +344 -0
- package/build/push/client.js.map +1 -0
- package/build/push/error.d.ts +73 -0
- package/build/push/error.js +101 -0
- package/build/push/error.js.map +1 -0
- package/build/push/index.d.ts +6 -0
- package/build/push/index.js +26 -0
- package/build/push/index.js.map +1 -0
- package/build/push/interfaces.d.ts +19 -0
- package/build/push/interfaces.js +3 -0
- package/build/push/interfaces.js.map +1 -0
- package/build/push/models.d.ts +328 -0
- package/build/push/models.js +38 -0
- package/build/push/models.js.map +1 -0
- package/build/push/parser.d.ts +25 -0
- package/build/push/parser.js +231 -0
- package/build/push/parser.js.map +1 -0
- package/build/push/proto/checkin.proto +266 -0
- package/build/push/proto/mcs.proto +328 -0
- package/build/push/service.d.ts +46 -0
- package/build/push/service.js +965 -0
- package/build/push/service.js.map +1 -0
- package/build/push/types.d.ts +220 -0
- package/build/push/types.js +244 -0
- package/build/push/types.js.map +1 -0
- package/build/push/utils.d.ts +7 -0
- package/build/push/utils.js +116 -0
- package/build/push/utils.js.map +1 -0
- package/build/utils.d.ts +115 -0
- package/build/utils.js +438 -0
- package/build/utils.js.map +1 -0
- package/eslint.config.mts +68 -0
- package/jest.config.js +14 -0
- package/package.json +85 -0
- package/scripts/cut_release.sh +31 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import tseslint from "typescript-eslint";
|
|
2
|
+
import { defineConfig } from "eslint/config";
|
|
3
|
+
|
|
4
|
+
export default defineConfig([
|
|
5
|
+
tseslint.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
files: ["**/*.{mjs,cjs,ts,mts,cts}"],
|
|
8
|
+
rules: {
|
|
9
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
10
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
11
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
12
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
13
|
+
"@typescript-eslint/no-use-before-define": [
|
|
14
|
+
"error",
|
|
15
|
+
{
|
|
16
|
+
functions: false,
|
|
17
|
+
typedefs: false,
|
|
18
|
+
classes: false,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
"@typescript-eslint/explicit-function-return-type": [
|
|
22
|
+
"warn",
|
|
23
|
+
{
|
|
24
|
+
allowExpressions: true,
|
|
25
|
+
allowTypedFunctionExpressions: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
"@typescript-eslint/no-object-literal-type-assertion": "off",
|
|
29
|
+
"@typescript-eslint/interface-name-prefix": "off",
|
|
30
|
+
"@typescript-eslint/no-non-null-assertion": "off", // This is necessary for Map.has()/get()!
|
|
31
|
+
"no-case-declarations": "off",
|
|
32
|
+
"no-extra-boolean-cast": "off",
|
|
33
|
+
"no-empty": "off",
|
|
34
|
+
"no-useless-escape": "off",
|
|
35
|
+
"no-fallthrough": "off",
|
|
36
|
+
"indent": [
|
|
37
|
+
"error",
|
|
38
|
+
4,
|
|
39
|
+
{
|
|
40
|
+
"SwitchCase": 1
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"quotes": [
|
|
44
|
+
"error",
|
|
45
|
+
"double",
|
|
46
|
+
{
|
|
47
|
+
"avoidEscape": true,
|
|
48
|
+
"allowTemplateLiterals": true
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"no-var": "error",
|
|
52
|
+
"prefer-const": "error",
|
|
53
|
+
"no-trailing-spaces": "error",
|
|
54
|
+
},
|
|
55
|
+
languageOptions : {
|
|
56
|
+
ecmaVersion: 5,
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
files: ["*.test.ts"],
|
|
61
|
+
rules: {
|
|
62
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
ignores: ["./build/**"],
|
|
67
|
+
}
|
|
68
|
+
]);
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { createDefaultPreset } = require("ts-jest");
|
|
2
|
+
|
|
3
|
+
const tsJestTransformCfg = createDefaultPreset().transform;
|
|
4
|
+
|
|
5
|
+
/** @type {import("jest").Config} **/
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
testEnvironment: "node",
|
|
9
|
+
|
|
10
|
+
transform: {
|
|
11
|
+
...tsJestTransformCfg,
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@homebridge-eufy-security/eufy-security-client",
|
|
3
|
+
"version": "3.7.2-dev.0",
|
|
4
|
+
"description": "Client to communicate with Eufy-Security devices",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "bropat",
|
|
7
|
+
"email": "patrick.broetto@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/bropat/eufy-security-client",
|
|
10
|
+
"main": "build/index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build:ts": "tsc -p tsconfig.build.json && npm run copy-proto-build",
|
|
13
|
+
"copy-proto-build": "npx copyfiles -u 1 \"src/**/*.proto\" \"src/**/*.crt\" build",
|
|
14
|
+
"test": "jest --coverage",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"build": "npm run build:ts",
|
|
17
|
+
"watch:ts": "tsc -p tsconfig.build.json --watch",
|
|
18
|
+
"watch": "npm run watch:ts",
|
|
19
|
+
"lint": "eslint --ext .ts src",
|
|
20
|
+
"prepublishOnly": "tsc -p tsconfig.build.json && npm run copy-proto-build",
|
|
21
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
22
|
+
"format:check": "prettier --check \"src/**/*.ts\""
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"eufy",
|
|
27
|
+
"eufycam",
|
|
28
|
+
"cam",
|
|
29
|
+
"cameras",
|
|
30
|
+
"security",
|
|
31
|
+
"eufy-security",
|
|
32
|
+
"doorbell",
|
|
33
|
+
"lock",
|
|
34
|
+
"keypad",
|
|
35
|
+
"smartlock",
|
|
36
|
+
"smartsafe"
|
|
37
|
+
],
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/bropat/eufy-security-client"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20.0.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@cospired/i18n-iso-languages": "^4.2.0",
|
|
47
|
+
"crypto-js": "^4.2.0",
|
|
48
|
+
"date-and-time": "^4.3.0",
|
|
49
|
+
"fs-extra": "^11.3.3",
|
|
50
|
+
"got": "^14.4.2",
|
|
51
|
+
"i18n-iso-countries": "^7.12.0",
|
|
52
|
+
"image-type": "^5.2.0",
|
|
53
|
+
"long": "^5.2.3",
|
|
54
|
+
"mqtt": "^5.15.0",
|
|
55
|
+
"node-rsa": "^1.1.1",
|
|
56
|
+
"node-schedule": "^2.1.1",
|
|
57
|
+
"p-throttle": "^8.1.0",
|
|
58
|
+
"protobufjs": "^8.0.0",
|
|
59
|
+
"qs": "^6.15.0",
|
|
60
|
+
"sweet-collections": "^1.1.0",
|
|
61
|
+
"tiny-typed-emitter": "^2.1.0",
|
|
62
|
+
"typescript-logging": "^2.2.0",
|
|
63
|
+
"typescript-logging-category-style": "^2.2.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/crypto-js": "^4.2.2",
|
|
67
|
+
"@types/jest": "^29.5.12",
|
|
68
|
+
"@types/node": "^20.16.10",
|
|
69
|
+
"@types/node-rsa": "^1.1.4",
|
|
70
|
+
"@types/node-schedule": "^2.1.7",
|
|
71
|
+
"@types/qs": "^6.9.16",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
73
|
+
"@typescript-eslint/parser": "^8.48.0 ",
|
|
74
|
+
"eslint": "^9.39.1",
|
|
75
|
+
"jest": "^29.7.0",
|
|
76
|
+
"prettier": "^3.8.1",
|
|
77
|
+
"ts-jest": "^29.4.6",
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"typescript-eslint": "^8.49.0"
|
|
80
|
+
},
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/bropat/eufy-security-client/issues"
|
|
83
|
+
},
|
|
84
|
+
"readmeFilename": "README.md"
|
|
85
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ==========================================
|
|
2
|
+
# CUT RELEASE
|
|
3
|
+
# ==========================================
|
|
4
|
+
|
|
5
|
+
# Check if all arguments are provided
|
|
6
|
+
if [ "$#" -ne 1 ]; then
|
|
7
|
+
echo "Usage: $0 <version>"
|
|
8
|
+
echo "Example: $0 '2.0.0'"
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
VERSION=$1
|
|
13
|
+
|
|
14
|
+
# Checkout develop
|
|
15
|
+
git checkout develop
|
|
16
|
+
|
|
17
|
+
# Pull the latest
|
|
18
|
+
git pull origin develop
|
|
19
|
+
|
|
20
|
+
# Make branch for the release
|
|
21
|
+
git checkout -b "release/$VERSION" || exit 1
|
|
22
|
+
|
|
23
|
+
# Update file
|
|
24
|
+
sed -i 's/version": .*/version": "'$VERSION'",/' package.json
|
|
25
|
+
|
|
26
|
+
# Add file to the branch and commit
|
|
27
|
+
git add package.json
|
|
28
|
+
git commit -m "Add new version"
|
|
29
|
+
|
|
30
|
+
# Push
|
|
31
|
+
git push --set-upstream origin "release/$VERSION"
|