iobroker.ring 6.3.0 → 7.0.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.
Files changed (50) hide show
  1. package/LICENSE +2 -1
  2. package/README.md +34 -419
  3. package/admin/assets/index-QX4NxbDg.js +693 -0
  4. package/admin/i18n/de.json +3 -1
  5. package/admin/i18n/en.json +3 -1
  6. package/admin/i18n/es.json +3 -2
  7. package/admin/i18n/fr.json +3 -1
  8. package/admin/i18n/it.json +3 -1
  9. package/admin/i18n/nl.json +5 -3
  10. package/admin/i18n/pl.json +3 -1
  11. package/admin/i18n/pt.json +3 -1
  12. package/admin/i18n/ru.json +3 -1
  13. package/admin/i18n/uk.json +3 -1
  14. package/admin/i18n/zh-cn.json +3 -1
  15. package/admin/tab_m.html +13 -34
  16. package/build/lib/constants.js +204 -204
  17. package/build/lib/constants.js.map +1 -1
  18. package/build/lib/lastAction.js +2 -0
  19. package/build/lib/lastAction.js.map +1 -1
  20. package/build/lib/ownRingCamera.js +286 -244
  21. package/build/lib/ownRingCamera.js.map +1 -1
  22. package/build/lib/ownRingDevice.js +57 -44
  23. package/build/lib/ownRingDevice.js.map +1 -1
  24. package/build/lib/ownRingIntercom.js +45 -40
  25. package/build/lib/ownRingIntercom.js.map +1 -1
  26. package/build/lib/ownRingLocation.js +27 -19
  27. package/build/lib/ownRingLocation.js.map +1 -1
  28. package/build/lib/ringApiClient.js +61 -49
  29. package/build/lib/ringApiClient.js.map +1 -1
  30. package/build/lib/services/event-blocker.js +13 -10
  31. package/build/lib/services/event-blocker.js.map +1 -1
  32. package/build/lib/services/file-service.js +29 -27
  33. package/build/lib/services/file-service.js.map +1 -1
  34. package/build/lib/services/image-service.js +8 -4
  35. package/build/lib/services/image-service.js.map +1 -1
  36. package/build/lib/services/text-service.js +169 -85
  37. package/build/lib/services/text-service.js.map +1 -1
  38. package/build/main.js +84 -90
  39. package/build/main.js.map +1 -1
  40. package/io-package.json +39 -38
  41. package/package.json +43 -90
  42. package/admin/admin.d.ts +0 -112
  43. package/admin/convert.js +0 -447
  44. package/admin/index_m.html +0 -318
  45. package/admin/style.css +0 -33
  46. package/admin/tab_m.js +0 -154
  47. package/admin/tsconfig.json +0 -11
  48. package/admin/words.js +0 -470
  49. package/build/lib/tools.js +0 -98
  50. package/build/lib/tools.js.map +0 -1
package/package.json CHANGED
@@ -1,20 +1,12 @@
1
1
  {
2
2
  "name": "iobroker.ring",
3
- "version": "6.3.0",
3
+ "version": "7.0.0",
4
4
  "description": "Ring",
5
- "author": {
6
- "name": "Thiemo Hoffmann",
7
- "email": "thiemo.hoffmann@web.de"
8
- },
5
+ "author": "Thiemo Hoffmann <thiemo.hoffmann@web.de>",
9
6
  "contributors": [
10
- {
11
- "name": "Thorsten Stueben",
12
- "email": "thorsten@stueben.de"
13
- },
14
- {
15
- "name": "Thiemo Hoffmann",
16
- "email": "thiemo.hoffmann@web.de"
17
- }
7
+ "Thorsten Stueben <thorsten@stueben.de>",
8
+ "Thiemo Hoffmann <thiemo.hoffmann@web.de>",
9
+ "iobroker-community-adapters <iobroker-community-adapters@gmx.de>"
18
10
  ],
19
11
  "homepage": "https://github.com/iobroker-community-adapters/ioBroker.ring",
20
12
  "license": "MIT",
@@ -30,54 +22,33 @@
30
22
  "url": "https://github.com/iobroker-community-adapters/ioBroker.ring"
31
23
  },
32
24
  "engines": {
33
- "node": ">=20"
25
+ "node": ">=22"
34
26
  },
35
27
  "dependencies": {
36
- "@homebridge/camera-utils": "^2.2.6",
37
- "@iobroker/adapter-core": "^3.2.2",
38
- "@iobroker/types": "^6.0.11",
39
- "@types/suncalc": "^1.9.2",
40
- "ffmpeg-static": "^5.2.0",
28
+ "@iobroker/adapter-core": "^3.4.3",
29
+ "ffmpeg-static": "^5.3.0",
41
30
  "node-schedule": "^2.1.1",
42
- "ring-client-api": "^13.1.0",
43
- "rxjs": "^7.8.1",
44
- "sharp": "^0.33.5",
31
+ "ring-client-api": "^14.3.0",
32
+ "rxjs": "^7.8.2",
33
+ "sharp": "^0.35.4",
45
34
  "strftime": "^0.10.3",
46
- "suncalc": "^1.9.0"
35
+ "suncalc": "^2.0.2"
47
36
  },
48
37
  "devDependencies": {
49
- "@alcalzone/release-script": "^3.8.0",
50
- "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
51
- "@alcalzone/release-script-plugin-license": "^3.7.0",
52
- "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
53
- "@iobroker/testing": "^5.0.0",
54
- "@types/chai": "^4.3.20",
55
- "@types/chai-as-promised": "^8.0.1",
56
- "@types/ffmpeg-static": "^3.0.3",
57
- "@types/gulp": "^4.0.17",
58
- "@types/mocha": "^10.0.9",
59
- "@types/node": "^22.8.6",
60
- "@types/node-schedule": "^2.1.7",
61
- "@types/proxyquire": "^1.3.31",
62
- "@types/sinon": "^17.0.3",
63
- "@types/sinon-chai": "^4.0.0",
38
+ "@alcalzone/release-script": "^5.2.1",
39
+ "@alcalzone/release-script-plugin-iobroker": "^5.2.0",
40
+ "@alcalzone/release-script-plugin-license": "^5.2.2",
41
+ "@iobroker/adapter-dev": "^1.5.0",
42
+ "@iobroker/build-tools": "^3.0.3",
43
+ "@iobroker/eslint-config": "^2.3.4",
44
+ "@iobroker/testing": "^5.3.0",
45
+ "@iobroker/types": "^7.2.2",
46
+ "@tsconfig/node22": "^22.0.6",
47
+ "@types/node": "^22.20.1",
48
+ "@types/node-schedule": "^2.1.8",
64
49
  "@types/strftime": "^0.9.8",
65
- "@typescript-eslint/eslint-plugin": "^7.14.1",
66
- "@typescript-eslint/parser": "^7.18.0",
67
- "axios": "^1.7.7",
68
- "chai": "^4.5.0",
69
- "chai-as-promised": "^8.0.0",
70
- "eslint": "^8.57.1",
71
- "gulp": "^5.0.0",
72
- "mocha": "^10.8.2",
73
- "nyc": "^17.1.0",
74
- "proxyquire": "^2.1.3",
75
- "rimraf": "^6.0.1",
76
- "sinon": "^18.0.0",
77
- "sinon-chai": "^3.7.0",
78
- "source-map-support": "^0.5.21",
79
- "ts-node": "^10.9.2",
80
- "typescript": "^5.6.3"
50
+ "tsx": "^4.23.13",
51
+ "typescript": "~6.0.3"
81
52
  },
82
53
  "main": "build/main.js",
83
54
  "files": [
@@ -87,47 +58,29 @@
87
58
  "LICENSE"
88
59
  ],
89
60
  "scripts": {
90
- "prebuild": "rimraf ./build",
91
- "build:ts": "tsc -p tsconfig.build.json",
92
- "build": "npm run build:ts",
93
- "watch:ts": "tsc -p tsconfig.build.json --watch",
94
- "watch": "npm run watch:ts",
95
- "dev:run": "dev-server run",
96
- "dev:upload": "dev-server upload",
97
- "test:ts": "mocha --config test/mocharc.custom.json src/**/*.test.ts",
61
+ "build:backend": "tsc -p tsconfig.build.json",
62
+ "build:tab": "tsx tasks.ts",
63
+ "build": "npm run build:backend && npm run build:tab",
64
+ "0-clean": "tsx tasks.ts --0-clean",
65
+ "1-npm": "tsx tasks.ts --1-npm",
66
+ "2-build": "tsx tasks.ts --2-build",
67
+ "3-copy": "tsx tasks.ts --3-copy",
68
+ "4-patch": "tsx tasks.ts --4-patch",
69
+ "watch": "tsc -p tsconfig.build.json --watch",
70
+ "check": "tsc -p tsconfig.json --noEmit",
71
+ "check:tab": "cd src-tab && tsc --noEmit",
72
+ "check:tasks": "tsc -p tsconfig.tasks.json",
73
+ "lint": "eslint -c eslint.config.mjs",
74
+ "lint:tab": "cd src-tab && eslint -c eslint.config.mjs",
98
75
  "test:package": "mocha test/package --exit",
99
- "test:unit": "mocha test/unit --exit",
100
76
  "test:integration": "mocha test/integration --exit",
101
- "test": "npm run lint && npm run test:ts && npm run test:package",
102
- "check": "tsc --noEmit",
103
- "check-package-upgrades": "npx npm-check-updates -i",
104
- "coverage": "nyc npm run test:ts",
105
- "lint": "eslint src/**/*.ts",
106
- "release": "release-script",
77
+ "test": "npm run test:package",
78
+ "translate": "translate-adapter -b admin/i18n/en.json",
79
+ "release": "release-script --noPush -y",
107
80
  "release-patch": "release-script patch --yes",
108
81
  "release-minor": "release-script minor --yes",
109
82
  "release-major": "release-script major --yes",
110
- "translate": "gulp translateAndUpdateWordsJS"
111
- },
112
- "nyc": {
113
- "include": [
114
- "src/**/*.ts"
115
- ],
116
- "exclude": [
117
- "src/**/*.test.ts"
118
- ],
119
- "extension": [
120
- ".ts"
121
- ],
122
- "require": [
123
- "ts-node/register"
124
- ],
125
- "reporter": [
126
- "text-summary",
127
- "html"
128
- ],
129
- "sourceMap": true,
130
- "instrument": true
83
+ "update-packages": "npx npm-check-updates --upgrade && cd src-tab && npx npm-check-updates --upgrade"
131
84
  },
132
85
  "bugs": {
133
86
  "url": "https://github.com/iobroker-community-adapters/ioBroker.ring/issues"
package/admin/admin.d.ts DELETED
@@ -1,112 +0,0 @@
1
- declare let systemDictionary: Record<string, Record<string, string>>;
2
-
3
- declare let load: (settings: Record<string, unknown>, onChange: (hasChanges: boolean) => void) => void;
4
- declare let save: (callback: (settings: Record<string, unknown>) => void) => void;
5
-
6
- // make load and save exist on the window object
7
- interface Window {
8
- load: typeof load;
9
- save: typeof save;
10
- }
11
-
12
- declare const instance: number;
13
- declare const adapter: string;
14
- /** Translates text */
15
- declare function _(text: string, arg1?: string, arg2?: string, arg3?: string): string;
16
- declare const socket: ioBrokerSocket;
17
-
18
- declare function sendTo(
19
- instance: any | null,
20
- command: string,
21
- message: any,
22
- callback: (result: SendToResult) => void | Promise<void>,
23
- ): void;
24
-
25
- interface SendToResult {
26
- error?: string | Error;
27
- result?: any;
28
- }
29
-
30
- // tslint:disable-next-line:class-name
31
- interface ioBrokerSocket {
32
- emit(
33
- command: "subscribeObjects",
34
- pattern: string,
35
- callback?: (err?: string) => void | Promise<void>,
36
- ): void;
37
- emit(
38
- command: "subscribeStates",
39
- pattern: string,
40
- callback?: (err?: string) => void | Promise<void>,
41
- ): void;
42
- emit(
43
- command: "unsubscribeObjects",
44
- pattern: string,
45
- callback?: (err?: string) => void | Promise<void>,
46
- ): void;
47
- emit(
48
- command: "unsubscribeStates",
49
- pattern: string,
50
- callback?: (err?: string) => void | Promise<void>,
51
- ): void;
52
- emit(
53
- command: "getObject",
54
- id: string,
55
- callback?: (err: string | undefined, result?: ioBroker.State) => void | Promise<void>,
56
- ): void;
57
- emit(
58
- command: "getForeignObjects",
59
- pattern: string,
60
- type: string,
61
- callback?: (err: string | undefined, objects?: ioBroker.State) => void | Promise<void>,
62
- ): void;
63
- emit(
64
- event: "getObjectView",
65
- view: "system",
66
- type: "device",
67
- options: ioBroker.GetObjectViewParams,
68
- callback: (
69
- err: string | undefined,
70
- result?: any,
71
- ) => void | Promise<void>,
72
- ): void;
73
- emit(
74
- event: "getStates",
75
- pattern: string,
76
- callback: (
77
- err: string | undefined,
78
- result?: Record<string, any>,
79
- ) => void,
80
- ): void;
81
- emit(
82
- event: "getState",
83
- id: string,
84
- callback: (err: string | undefined, result?: ioBroker.State) => void,
85
- ): void;
86
- emit(
87
- event: "setState",
88
- id: string,
89
- state: unknown,
90
- callback: (err: string | undefined, result?: any) => void,
91
- ): void;
92
- emit(
93
- event: "readDir",
94
- _adapter: string,
95
- dirName: string,
96
- options?: object,
97
- callback: (err: string | undefined, files: object[]) => void,
98
- ): void;
99
-
100
- on(event: "objectChange", handler: ioBroker.ObjectChangeHandler): void;
101
- on(event: "stateChange", handler: ioBroker.StateChangeHandler): void;
102
- removeEventHandler(
103
- event: "objectChange",
104
- handler: ioBroker.ObjectChangeHandler,
105
- ): void;
106
- removeEventHandler(
107
- event: "stateChange",
108
- handler: ioBroker.StateChangeHandler,
109
- ): void;
110
-
111
- // TODO: other events
112
- }