From 44527b9b147f7803ccd10ccfa2c32aa577f304ba Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sat, 1 Jan 2022 23:20:24 -0800 Subject: [PATCH] unifi-protect: use forked lib --- plugins/unifi-protect/package-lock.json | 42 ++++++++++++------------- plugins/unifi-protect/package.json | 2 +- plugins/unifi-protect/src/main.ts | 6 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/plugins/unifi-protect/package-lock.json b/plugins/unifi-protect/package-lock.json index 3c81e297a..5a3725911 100644 --- a/plugins/unifi-protect/package-lock.json +++ b/plugins/unifi-protect/package-lock.json @@ -9,8 +9,8 @@ "version": "0.0.61", "license": "Apache", "dependencies": { + "@koush/unifi-protect": "^0.0.6", "@scrypted/sdk": "file:../../sdk", - "unifi-protect": "^0.0.5", "ws": "^8.2.0" }, "devDependencies": { @@ -63,6 +63,16 @@ "../sdk": { "extraneous": true }, + "node_modules/@koush/unifi-protect": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@koush/unifi-protect/-/unifi-protect-0.0.6.tgz", + "integrity": "sha512-bPTcS+2lw8QO26aUmiOCyzR1SIs4XhDUPnRt+9ZbL0uFW3/u8Zw/u8SwgAJiRuL/Cu41KLUkt/N055OGZCgPeQ==", + "dependencies": { + "abort-controller": "^3.0.0", + "node-fetch": "^2.6.6", + "ws": "^8.2.0" + } + }, "node_modules/@scrypted/sdk": { "resolved": "../../sdk", "link": true @@ -123,16 +133,6 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, - "node_modules/unifi-protect": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/unifi-protect/-/unifi-protect-0.0.5.tgz", - "integrity": "sha512-Ec38hB5ooQTrfkriMJS+cg6Q87Ncxv3a5aB196Uae4fh/yogRshAPzJOXmhvGctsSte4qXaMB5kWD+KKRLXC2A==", - "dependencies": { - "abort-controller": "^3.0.0", - "node-fetch": "^2.6.6", - "ws": "^8.2.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -169,6 +169,16 @@ } }, "dependencies": { + "@koush/unifi-protect": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@koush/unifi-protect/-/unifi-protect-0.0.6.tgz", + "integrity": "sha512-bPTcS+2lw8QO26aUmiOCyzR1SIs4XhDUPnRt+9ZbL0uFW3/u8Zw/u8SwgAJiRuL/Cu41KLUkt/N055OGZCgPeQ==", + "requires": { + "abort-controller": "^3.0.0", + "node-fetch": "^2.6.6", + "ws": "^8.2.0" + } + }, "@scrypted/sdk": { "version": "file:../../sdk", "requires": { @@ -245,16 +255,6 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, - "unifi-protect": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/unifi-protect/-/unifi-protect-0.0.5.tgz", - "integrity": "sha512-Ec38hB5ooQTrfkriMJS+cg6Q87Ncxv3a5aB196Uae4fh/yogRshAPzJOXmhvGctsSte4qXaMB5kWD+KKRLXC2A==", - "requires": { - "abort-controller": "^3.0.0", - "node-fetch": "^2.6.6", - "ws": "^8.2.0" - } - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/plugins/unifi-protect/package.json b/plugins/unifi-protect/package.json index 29486ad45..9ad8833aa 100644 --- a/plugins/unifi-protect/package.json +++ b/plugins/unifi-protect/package.json @@ -34,8 +34,8 @@ "@types/ws": "^7.4.7" }, "dependencies": { + "@koush/unifi-protect": "^0.0.6", "@scrypted/sdk": "file:../../sdk", - "unifi-protect": "^0.0.5", "ws": "^8.2.0" } } diff --git a/plugins/unifi-protect/src/main.ts b/plugins/unifi-protect/src/main.ts index 4fef31e60..a72f36cc3 100644 --- a/plugins/unifi-protect/src/main.ts +++ b/plugins/unifi-protect/src/main.ts @@ -1,7 +1,7 @@ import sdk, { ScryptedDeviceBase, DeviceProvider, Settings, Setting, ScryptedDeviceType, VideoCamera, MediaObject, Device, MotionSensor, ScryptedInterface, Camera, MediaStreamOptions, Intercom, ScryptedMimeTypes, FFMpegInput, ObjectDetector, PictureOptions, ObjectDetectionTypes, ObjectsDetected, ObjectDetectionResult } from "@scrypted/sdk"; -import { ProtectApi } from "unifi-protect"; -import { ProtectApiUpdates, ProtectNvrUpdatePayloadCameraUpdate, ProtectNvrUpdatePayloadEventAdd } from "unifi-protect"; -import { ProtectCameraChannelConfig, ProtectCameraConfigInterface } from "unifi-protect"; +import { ProtectApi } from "@koush/unifi-protect"; +import { ProtectApiUpdates, ProtectNvrUpdatePayloadCameraUpdate, ProtectNvrUpdatePayloadEventAdd } from "@koush/unifi-protect"; +import { ProtectCameraChannelConfig, ProtectCameraConfigInterface } from "@koush/unifi-protect"; import child_process, { ChildProcess } from 'child_process'; import { ffmpegLogInitialOutput } from '../../../common/src/media-helpers'; import { createInstanceableProviderPlugin, enableInstanceableProviderMode, isInstanceableProviderModeEnabled } from '../../../common/src/provider-plugin';