@apocaliss92/scrypted-reolink-native 0.4.6 → 0.4.7

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/dist/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,54 +1,53 @@
1
1
  {
2
- "name": "@apocaliss92/scrypted-reolink-native",
3
- "version": "0.4.6",
4
- "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
- "author": "@apocaliss92",
6
- "license": "Apache",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/apocaliss92/scrypted-reolink-native"
10
- },
11
- "scripts": {
12
- "build:lib": "./build-lib.sh",
13
- "scrypted-setup-project": "scrypted-setup-project",
14
- "prescrypted-setup-project": "scrypted-package-json",
15
- "build": "scrypted-webpack",
16
- "prepublishOnly": "NODE_ENV=production scrypted-webpack",
17
- "prescrypted-vscode-launch": "scrypted-webpack",
18
- "scrypted-vscode-launch": "scrypted-deploy-debug",
19
- "scrypted-deploy-debug": "scrypted-deploy-debug",
20
- "scrypted-debug": "scrypted-debug",
21
- "scrypted-deploy": "scrypted-deploy",
22
- "scrypted-readme": "scrypted-readme",
23
- "scrypted-package-json": "scrypted-package-json"
24
- },
25
- "keywords": [
26
- "scrypted",
27
- "plugin",
28
- "reolink",
29
- "native",
30
- "native",
31
- "camera"
32
- ],
33
- "scrypted": {
34
- "name": "Reolink Native",
35
- "type": "DeviceProvider",
36
- "interfaces": [
37
- "ScryptedSystemDevice",
38
- "ScryptedDeviceCreator",
39
- "DeviceProvider",
40
- "DeviceCreator",
41
- "Settings",
42
- "HttpRequestHandler"
43
- ]
44
- },
45
- "dependencies": {
46
- "@scrypted/common": "file:../../scrypted/common",
47
- "@scrypted/rtsp": "file:../../scrypted/plugins/rtsp",
48
- "@scrypted/sdk": "^0.3.118",
49
- "@apocaliss92/reolink-baichuan-js": "file:./reolink-baichuan-js"
50
- },
51
- "devDependencies": {
52
- "@types/node": "^22.0.2"
53
- }
2
+ "name": "@apocaliss92/scrypted-reolink-native",
3
+ "version": "0.4.7",
4
+ "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
+ "author": "@apocaliss92",
6
+ "license": "Apache",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/apocaliss92/scrypted-reolink-native"
10
+ },
11
+ "scripts": {
12
+ "build:lib": "./build-lib.sh",
13
+ "scrypted-setup-project": "scrypted-setup-project",
14
+ "prescrypted-setup-project": "scrypted-package-json",
15
+ "build": "scrypted-webpack",
16
+ "prepublishOnly": "NODE_ENV=production scrypted-webpack",
17
+ "prescrypted-vscode-launch": "scrypted-webpack",
18
+ "scrypted-vscode-launch": "scrypted-deploy-debug",
19
+ "scrypted-deploy-debug": "scrypted-deploy-debug",
20
+ "scrypted-debug": "scrypted-debug",
21
+ "scrypted-deploy": "scrypted-deploy",
22
+ "scrypted-readme": "scrypted-readme",
23
+ "scrypted-package-json": "scrypted-package-json"
24
+ },
25
+ "keywords": [
26
+ "scrypted",
27
+ "plugin",
28
+ "reolink",
29
+ "native",
30
+ "camera"
31
+ ],
32
+ "scrypted": {
33
+ "name": "Reolink Native",
34
+ "type": "DeviceProvider",
35
+ "interfaces": [
36
+ "ScryptedSystemDevice",
37
+ "ScryptedDeviceCreator",
38
+ "DeviceProvider",
39
+ "DeviceCreator",
40
+ "Settings",
41
+ "HttpRequestHandler"
42
+ ]
43
+ },
44
+ "dependencies": {
45
+ "@scrypted/common": "file:../../scrypted/common",
46
+ "@scrypted/rtsp": "file:../../scrypted/plugins/rtsp",
47
+ "@scrypted/sdk": "^0.3.118",
48
+ "@apocaliss92/reolink-baichuan-js": "file:./reolink-baichuan-js"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^22.0.2"
52
+ }
54
53
  }
package/src/main.ts CHANGED
@@ -1,3 +1,16 @@
1
+ // Polyfill for File class if not available (required by undici in some Node.js environments)
2
+ if (typeof globalThis.File === "undefined") {
3
+ (globalThis as any).File = class File extends Blob {
4
+ name: string;
5
+ lastModified: number;
6
+ constructor(chunks: BlobPart[], name: string, options?: FilePropertyBag) {
7
+ super(chunks, options);
8
+ this.name = name;
9
+ this.lastModified = options?.lastModified ?? Date.now();
10
+ }
11
+ };
12
+ }
13
+
1
14
  import sdk, {
2
15
  DeviceCreator,
3
16
  DeviceCreatorSettings,