@camera.ui/camera-ui-tuya 0.0.20 → 0.0.22
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/bundle.zip +0 -0
- package/package.json +16 -37
- package/CHANGELOG.md +0 -8
- package/CONTRIBUTING.md +0 -1
- package/LICENSE.md +0 -22
- package/README.md +0 -1
- package/config.schema.json +0 -296
- package/dist/camera.d.ts +0 -34
- package/dist/camera.js +0 -247
- package/dist/camera.js.map +0 -1
- package/dist/index.d.ts +0 -24
- package/dist/index.js +0 -225
- package/dist/index.js.map +0 -1
- package/dist/peer.d.ts +0 -34
- package/dist/peer.js +0 -268
- package/dist/peer.js.map +0 -1
- package/dist/tuya/cloud.d.ts +0 -35
- package/dist/tuya/cloud.js +0 -227
- package/dist/tuya/cloud.js.map +0 -1
- package/dist/tuya/const.d.ts +0 -121
- package/dist/tuya/const.js +0 -2
- package/dist/tuya/const.js.map +0 -1
- package/dist/tuya/device.d.ts +0 -14
- package/dist/tuya/device.js +0 -68
- package/dist/tuya/device.js.map +0 -1
- package/dist/tuya/mq.d.ts +0 -25
- package/dist/tuya/mq.js +0 -85
- package/dist/tuya/mq.js.map +0 -1
- package/dist/tuya/pulsar.d.ts +0 -74
- package/dist/tuya/pulsar.js +0 -198
- package/dist/tuya/pulsar.js.map +0 -1
- package/dist/tuya/utils.d.ts +0 -16
- package/dist/tuya/utils.js +0 -276
- package/dist/tuya/utils.js.map +0 -1
- package/dist/types.d.ts +0 -11
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
package/bundle.zip
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,52 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Tuya",
|
|
3
3
|
"name": "@camera.ui/camera-ui-tuya",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.22",
|
|
5
5
|
"description": "camera.ui tuya plugin",
|
|
6
6
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
|
-
"type": "
|
|
8
|
+
"type": "commonjs",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rimraf dist && tsc",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"update": "updates --update ./",
|
|
11
|
+
"bundle": "npm run format && npm run lint && npm run build && cui bundle",
|
|
12
|
+
"format": "prettier --write \"src/\" --ignore-unknown --no-error-on-unmatched-pattern",
|
|
14
13
|
"install-updates": "npm i --save",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"mqtt-packet": "^9.0.0",
|
|
23
|
-
"rxjs": "^7.8.1",
|
|
24
|
-
"werift": "^0.20.0",
|
|
25
|
-
"ws": "^8.18.0"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@camera.ui/types": "^0.0.77",
|
|
29
|
-
"@rushstack/eslint-patch": "^1.10.4",
|
|
30
|
-
"@types/crypto-js": "^4.2.2",
|
|
31
|
-
"@types/node": "^22.7.6",
|
|
32
|
-
"@types/ws": "^8.5.12",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^8.10.0",
|
|
34
|
-
"@typescript-eslint/parser": "^8.10.0",
|
|
35
|
-
"concurrently": "^9.0.1",
|
|
36
|
-
"eslint": "8.57.0",
|
|
37
|
-
"eslint-config-prettier": "^9.1.0",
|
|
38
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
39
|
-
"prettier": "^3.3.3",
|
|
40
|
-
"rimraf": "^6.0.1",
|
|
41
|
-
"typescript": "^5.6.3",
|
|
42
|
-
"updates": "^16.4.0"
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"lint:fix": "eslint --fix .",
|
|
16
|
+
"prepublishOnly": "node -e \"if(!process.env.SAFE_PUBLISH){console.error('Error: Please use @camera.ui/cli to publish the plugin:\\n npm run publish:alpha\\n npm run publish:beta\\n npm run publish:latest\\n');process.exit(1)}\"",
|
|
17
|
+
"publish:alpha": "cui publish --alpha",
|
|
18
|
+
"publish:beta": "cui publish --beta",
|
|
19
|
+
"publish:latest": "cui publish --latest",
|
|
20
|
+
"update": "updates --update ./"
|
|
43
21
|
},
|
|
44
22
|
"bugs": {
|
|
45
23
|
"url": "https://github.com/seydx/camera.ui/issues"
|
|
46
24
|
},
|
|
47
25
|
"engines": {
|
|
48
|
-
"camera.ui": ">=0.0.34-alpha.
|
|
49
|
-
"node": ">=20.
|
|
26
|
+
"camera.ui": ">=0.0.34-alpha.4",
|
|
27
|
+
"node": ">=20.18.0"
|
|
50
28
|
},
|
|
51
29
|
"homepage": "https://github.com/seydx/camera.ui#readme",
|
|
52
30
|
"keywords": [
|
|
@@ -66,6 +44,7 @@
|
|
|
66
44
|
"dependencies": [],
|
|
67
45
|
"options": {
|
|
68
46
|
"extendedMotionDetection": false
|
|
69
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"bundled": true
|
|
70
49
|
}
|
|
71
|
-
}
|
|
50
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
All notable changes to this project will be documented in this file.
|
|
2
|
-
|
|
3
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
-
|
|
6
|
-
## [X.X.X] - ???
|
|
7
|
-
|
|
8
|
-
- Initial Release
|
package/CONTRIBUTING.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Contributing
|
package/LICENSE.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023-2024 seydx <dev@seydx.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# @camera.ui/camera-ui-tuya
|
package/config.schema.json
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema": {
|
|
3
|
-
"home": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"title": "Tuya Account",
|
|
6
|
-
"description": "Tuya Account",
|
|
7
|
-
"required": true,
|
|
8
|
-
"opened": true,
|
|
9
|
-
"properties": {
|
|
10
|
-
"userId": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"title": "User ID",
|
|
13
|
-
"description": "You can find this information in Tuya IoT > Cloud > Devices > Linked Devices",
|
|
14
|
-
"required": true,
|
|
15
|
-
"store": true
|
|
16
|
-
},
|
|
17
|
-
"accessId": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"title": "Access ID",
|
|
20
|
-
"description": "This is localted on the main project",
|
|
21
|
-
"format": "password",
|
|
22
|
-
"required": true,
|
|
23
|
-
"store": true
|
|
24
|
-
},
|
|
25
|
-
"accessKey": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"title": "Access Key/Secret",
|
|
28
|
-
"description": "This is localted on the main project",
|
|
29
|
-
"format": "password",
|
|
30
|
-
"required": true,
|
|
31
|
-
"store": true
|
|
32
|
-
},
|
|
33
|
-
"country": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"title": "Country",
|
|
36
|
-
"description": "This is the country where you registered your devices",
|
|
37
|
-
"required": false,
|
|
38
|
-
"store": true,
|
|
39
|
-
"defaultValue": "United States of America",
|
|
40
|
-
"enum": [
|
|
41
|
-
"Afghanistan",
|
|
42
|
-
"Albania",
|
|
43
|
-
"Algeria",
|
|
44
|
-
"American Samoa",
|
|
45
|
-
"Andorra",
|
|
46
|
-
"Angola",
|
|
47
|
-
"Anguilla",
|
|
48
|
-
"Antarctica",
|
|
49
|
-
"Antigua and Barbuda",
|
|
50
|
-
"Argentina",
|
|
51
|
-
"Armenia",
|
|
52
|
-
"Aruba",
|
|
53
|
-
"Australia",
|
|
54
|
-
"Austria",
|
|
55
|
-
"Azerbaijan",
|
|
56
|
-
"Bahamas",
|
|
57
|
-
"Bahrain",
|
|
58
|
-
"Bangladesh",
|
|
59
|
-
"Barbados",
|
|
60
|
-
"Belarus",
|
|
61
|
-
"Belgium",
|
|
62
|
-
"Belize",
|
|
63
|
-
"Benin",
|
|
64
|
-
"Bermuda",
|
|
65
|
-
"Bhutan",
|
|
66
|
-
"Bolivia",
|
|
67
|
-
"Bosnia and Herzegovina",
|
|
68
|
-
"Botswana",
|
|
69
|
-
"Brazil",
|
|
70
|
-
"British Indian Ocean Territory",
|
|
71
|
-
"British Virgin Islands",
|
|
72
|
-
"Brunei",
|
|
73
|
-
"Bulgaria",
|
|
74
|
-
"Burkina Faso",
|
|
75
|
-
"Burundi",
|
|
76
|
-
"Cabo Verde",
|
|
77
|
-
"Cambodia",
|
|
78
|
-
"Cameroon",
|
|
79
|
-
"Canada",
|
|
80
|
-
"Cayman Islands",
|
|
81
|
-
"Central African Republic",
|
|
82
|
-
"Chad",
|
|
83
|
-
"Chile",
|
|
84
|
-
"China",
|
|
85
|
-
"Colombia",
|
|
86
|
-
"Comoros",
|
|
87
|
-
"Cook Islands",
|
|
88
|
-
"Costa Rica",
|
|
89
|
-
"Croatia",
|
|
90
|
-
"Curacao",
|
|
91
|
-
"Cyprus",
|
|
92
|
-
"Czech Republic",
|
|
93
|
-
"Côte d'Ivoire",
|
|
94
|
-
"Democratic Republic of the Congo",
|
|
95
|
-
"Denmark",
|
|
96
|
-
"Djibouti",
|
|
97
|
-
"Dominica",
|
|
98
|
-
"Dominican Republic (1-809)",
|
|
99
|
-
"Dominican Republic (1-829)",
|
|
100
|
-
"Dominican Republic (1-849)",
|
|
101
|
-
"East Timor",
|
|
102
|
-
"Ecuador",
|
|
103
|
-
"Egypt",
|
|
104
|
-
"El Salvador",
|
|
105
|
-
"Equatorial Guinea",
|
|
106
|
-
"Eritrea",
|
|
107
|
-
"Estonia",
|
|
108
|
-
"Ethiopia",
|
|
109
|
-
"Falkland Islands",
|
|
110
|
-
"Faroe Islands",
|
|
111
|
-
"Fiji",
|
|
112
|
-
"Finland",
|
|
113
|
-
"France",
|
|
114
|
-
"French Guiana",
|
|
115
|
-
"French Polynesia",
|
|
116
|
-
"Gabon",
|
|
117
|
-
"Gambia",
|
|
118
|
-
"Georgia",
|
|
119
|
-
"Germany",
|
|
120
|
-
"Ghana",
|
|
121
|
-
"Gibraltar",
|
|
122
|
-
"Greece",
|
|
123
|
-
"Greenland",
|
|
124
|
-
"Grenada",
|
|
125
|
-
"Guam",
|
|
126
|
-
"Guatemala",
|
|
127
|
-
"Guinea",
|
|
128
|
-
"Guinea-Bissau",
|
|
129
|
-
"Guyana",
|
|
130
|
-
"Haiti",
|
|
131
|
-
"Honduras",
|
|
132
|
-
"Hong Kong",
|
|
133
|
-
"Hungary",
|
|
134
|
-
"Iceland",
|
|
135
|
-
"India",
|
|
136
|
-
"Indonesia",
|
|
137
|
-
"Iraq",
|
|
138
|
-
"Ireland",
|
|
139
|
-
"Israel",
|
|
140
|
-
"Italy",
|
|
141
|
-
"Jamaica",
|
|
142
|
-
"Japan",
|
|
143
|
-
"Jordan",
|
|
144
|
-
"Kenya",
|
|
145
|
-
"Kiribati",
|
|
146
|
-
"Kuwait",
|
|
147
|
-
"Kyrgyzstan",
|
|
148
|
-
"Laos",
|
|
149
|
-
"Latvia",
|
|
150
|
-
"Lebanon",
|
|
151
|
-
"Lesotho",
|
|
152
|
-
"Liberia",
|
|
153
|
-
"Libya",
|
|
154
|
-
"Liechtenstein",
|
|
155
|
-
"Lithuania",
|
|
156
|
-
"Luxembourg",
|
|
157
|
-
"Macao",
|
|
158
|
-
"Macedonia",
|
|
159
|
-
"Madagascar",
|
|
160
|
-
"Malawi",
|
|
161
|
-
"Malaysia",
|
|
162
|
-
"Maldives",
|
|
163
|
-
"Mali",
|
|
164
|
-
"Malta",
|
|
165
|
-
"Marshall Islands",
|
|
166
|
-
"Martinique",
|
|
167
|
-
"Mauritania",
|
|
168
|
-
"Mauritius",
|
|
169
|
-
"Mayotte",
|
|
170
|
-
"Mexico",
|
|
171
|
-
"Micronesia",
|
|
172
|
-
"Moldova",
|
|
173
|
-
"Monaco",
|
|
174
|
-
"Mongolia",
|
|
175
|
-
"Montenegro",
|
|
176
|
-
"Montserrat",
|
|
177
|
-
"Morocco",
|
|
178
|
-
"Mozambique",
|
|
179
|
-
"Myanmar",
|
|
180
|
-
"Namibia",
|
|
181
|
-
"Nauru",
|
|
182
|
-
"Nepal",
|
|
183
|
-
"Netherlands",
|
|
184
|
-
"New Caledonia",
|
|
185
|
-
"New Zealand",
|
|
186
|
-
"Nicaragua",
|
|
187
|
-
"Niger",
|
|
188
|
-
"Nigeria",
|
|
189
|
-
"Niue",
|
|
190
|
-
"Northern Mariana Islands",
|
|
191
|
-
"Norway",
|
|
192
|
-
"Oman",
|
|
193
|
-
"Pakistan",
|
|
194
|
-
"Palau",
|
|
195
|
-
"Palestine",
|
|
196
|
-
"Panama",
|
|
197
|
-
"Papua New Guinea",
|
|
198
|
-
"Paraguay",
|
|
199
|
-
"Peru",
|
|
200
|
-
"Philippines",
|
|
201
|
-
"Poland",
|
|
202
|
-
"Portugal",
|
|
203
|
-
"Puerto Rico",
|
|
204
|
-
"Qatar",
|
|
205
|
-
"Republic of the Congo",
|
|
206
|
-
"Reunion",
|
|
207
|
-
"Romania",
|
|
208
|
-
"Russia",
|
|
209
|
-
"Rwanda",
|
|
210
|
-
"Saint Kitts and Nevis",
|
|
211
|
-
"Saint Lucia",
|
|
212
|
-
"Saint Martin",
|
|
213
|
-
"Saint Pierre and Miquelon",
|
|
214
|
-
"Saint Vincent and the Grenadines",
|
|
215
|
-
"Samoa",
|
|
216
|
-
"San Marino",
|
|
217
|
-
"Saudi Arabia",
|
|
218
|
-
"Sao Tome and Principe",
|
|
219
|
-
"Senegal",
|
|
220
|
-
"Serbia",
|
|
221
|
-
"Seychelles",
|
|
222
|
-
"Sierra Leone",
|
|
223
|
-
"Singapore",
|
|
224
|
-
"Sint Maarten",
|
|
225
|
-
"Slovakia",
|
|
226
|
-
"Slovenia",
|
|
227
|
-
"Solomon Islands",
|
|
228
|
-
"Somalia",
|
|
229
|
-
"South Africa",
|
|
230
|
-
"South Korea",
|
|
231
|
-
"Spain",
|
|
232
|
-
"Sri Lanka",
|
|
233
|
-
"Suriname",
|
|
234
|
-
"Swalbard and Jan Mayen",
|
|
235
|
-
"Swaziland",
|
|
236
|
-
"Sweden",
|
|
237
|
-
"Switzerland",
|
|
238
|
-
"Taiwan",
|
|
239
|
-
"Tajikistan",
|
|
240
|
-
"Tanzania",
|
|
241
|
-
"Thailand",
|
|
242
|
-
"Togo",
|
|
243
|
-
"Tokelau",
|
|
244
|
-
"Tonga",
|
|
245
|
-
"Trinidad and Tobago",
|
|
246
|
-
"Tunisia",
|
|
247
|
-
"Turkey",
|
|
248
|
-
"Turkmenistan",
|
|
249
|
-
"Turks and Caicos Islands",
|
|
250
|
-
"Tuvalu",
|
|
251
|
-
"United States of America",
|
|
252
|
-
"U.S. Virgin Islands",
|
|
253
|
-
"Uganda",
|
|
254
|
-
"Ukraine",
|
|
255
|
-
"United Arab Emirates",
|
|
256
|
-
"United Kingdom",
|
|
257
|
-
"Uruguay",
|
|
258
|
-
"Uzbekistan",
|
|
259
|
-
"Vanuatu",
|
|
260
|
-
"Vatican",
|
|
261
|
-
"Venezuela",
|
|
262
|
-
"Vietnam",
|
|
263
|
-
"Wallis and Futuna",
|
|
264
|
-
"Western Sahara",
|
|
265
|
-
"Yemen",
|
|
266
|
-
"Zambia",
|
|
267
|
-
"Zimbabwe",
|
|
268
|
-
"Åland Islands"
|
|
269
|
-
]
|
|
270
|
-
},
|
|
271
|
-
"useWebRTC": {
|
|
272
|
-
"type": "boolean",
|
|
273
|
-
"title": "Use WebRTC",
|
|
274
|
-
"description": "Use WebRTC to stream video from the camera",
|
|
275
|
-
"required": false,
|
|
276
|
-
"store": true,
|
|
277
|
-
"defaultValue": false
|
|
278
|
-
},
|
|
279
|
-
"homeWhitelist": {
|
|
280
|
-
"type": "array",
|
|
281
|
-
"title": "Home Whitelist",
|
|
282
|
-
"description": "An array of integer values for the home IDs you want to whitelist. If provided, only devices with matching Home IDs will be included",
|
|
283
|
-
"required": false,
|
|
284
|
-
"items": {
|
|
285
|
-
"type": "string",
|
|
286
|
-
"title": "Home ID",
|
|
287
|
-
"description": "The Home ID of the device"
|
|
288
|
-
},
|
|
289
|
-
"defaultValue": [],
|
|
290
|
-
"store": true,
|
|
291
|
-
"opened": true
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
package/dist/camera.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { WebRTCReceiver } from '@camera.ui/rtsp';
|
|
2
|
-
import type { AnswerSDP } from '@camera.ui/rtsp';
|
|
3
|
-
import type { CameraDelegate, CameraDevice, LoggerService } from '@camera.ui/types';
|
|
4
|
-
import type { RTCIceCandidate } from 'werift';
|
|
5
|
-
import type Tuya from './index.js';
|
|
6
|
-
import type { TuyaCloud } from './tuya/cloud.js';
|
|
7
|
-
import type { TuyaDeviceConfig } from './tuya/const.js';
|
|
8
|
-
export declare class Camera extends WebRTCReceiver implements CameraDelegate {
|
|
9
|
-
cameraDevice: CameraDevice;
|
|
10
|
-
cloudCamera: TuyaDeviceConfig;
|
|
11
|
-
private platform;
|
|
12
|
-
private cloud;
|
|
13
|
-
private logger;
|
|
14
|
-
private cameraLogger;
|
|
15
|
-
private ffmpegPath?;
|
|
16
|
-
private pc?;
|
|
17
|
-
private rtspServer;
|
|
18
|
-
private motionTimeout?;
|
|
19
|
-
private binaryTimeout?;
|
|
20
|
-
private previousDoorbellRing?;
|
|
21
|
-
private previousMotion?;
|
|
22
|
-
constructor(platform: Tuya, cloud: TuyaCloud, cloudCamera: TuyaDeviceConfig, logger: LoggerService);
|
|
23
|
-
createCameraDevice(): Promise<void>;
|
|
24
|
-
onOffer(offerSdp: string): Promise<AnswerSDP>;
|
|
25
|
-
onCandidate(candidate: RTCIceCandidate): Promise<void>;
|
|
26
|
-
snapshot(): Promise<ArrayBuffer | undefined>;
|
|
27
|
-
reboot(): Promise<void>;
|
|
28
|
-
updateState(): void;
|
|
29
|
-
private triggerBinaryState;
|
|
30
|
-
private triggerMotion;
|
|
31
|
-
private createRTSPServer;
|
|
32
|
-
private createPeerCoonection;
|
|
33
|
-
private toBool;
|
|
34
|
-
}
|