From dc4dd07cedd3f61732e06ba7ed15d9b8df9bbf40 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sun, 14 Jul 2024 07:56:19 -0700 Subject: [PATCH] cloud: cleanup --- plugins/cloud/package-lock.json | 4 ++-- plugins/cloud/package.json | 2 +- plugins/cloud/src/main.ts | 3 +-- plugins/homekit/src/util.ts | 17 ++++++++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/plugins/cloud/package-lock.json b/plugins/cloud/package-lock.json index e706dbc5f..1e25da382 100644 --- a/plugins/cloud/package-lock.json +++ b/plugins/cloud/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/cloud", - "version": "0.2.22", + "version": "0.2.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/cloud", - "version": "0.2.22", + "version": "0.2.23", "dependencies": { "@eneris/push-receiver": "^3.1.5", "@scrypted/common": "file:../../common", diff --git a/plugins/cloud/package.json b/plugins/cloud/package.json index f731a6930..b366a197f 100644 --- a/plugins/cloud/package.json +++ b/plugins/cloud/package.json @@ -53,5 +53,5 @@ "@types/nat-upnp": "^1.1.5", "@types/node": "^20.14.6" }, - "version": "0.2.22" + "version": "0.2.23" } diff --git a/plugins/cloud/src/main.ts b/plugins/cloud/src/main.ts index 64c023ed4..a0b0563ca 100644 --- a/plugins/cloud/src/main.ts +++ b/plugins/cloud/src/main.ts @@ -1013,8 +1013,7 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings, const deferred = new Deferred(); const cloudflareTunnel = cloudflared.tunnel(args); - const processData = (data: string) => { - const string: string = data.toString(); + const processData = (string: string) => { this.console.error(string); const lines = string.split('\n'); diff --git a/plugins/homekit/src/util.ts b/plugins/homekit/src/util.ts index 3d0f38ccc..cfadde28c 100644 --- a/plugins/homekit/src/util.ts +++ b/plugins/homekit/src/util.ts @@ -1,4 +1,5 @@ -import sdk, { ScryptedInterface } from '@scrypted/sdk'; +import sdk, { OnOff, ScryptedDeviceBase, ScryptedInterface } from '@scrypted/sdk'; +import test from 'node:test'; const { systemManager } = sdk; @@ -40,3 +41,17 @@ export function reorderDevicesByProvider(deviceIds: string[]): string[] { return flattenDeviceTree(providerDeviceIdMap, null); } + +class TestDeviceBase { + +} + +function hideProps(): new()=> T { + return TestDeviceBase as any; +} + +class Poop extends hideProps() { + constructor() { + super(); + } +} \ No newline at end of file