From 034b3dfe9987cd90c5cf37b1975d49b131b6ec5a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 1 Nov 2021 13:31:23 -0700 Subject: [PATCH] core/server: fix oneway method failure causing empty plugin list --- plugins/core/package-lock.json | 4 ++-- plugins/core/package.json | 2 +- server/src/rpc.ts | 2 +- server/src/runtime.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/core/package-lock.json b/plugins/core/package-lock.json index 1090938a1..4e709650e 100644 --- a/plugins/core/package-lock.json +++ b/plugins/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/core", - "version": "0.0.134", + "version": "0.0.135", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/core", - "version": "0.0.134", + "version": "0.0.135", "license": "Apache-2.0", "dependencies": { "@scrypted/sdk": "file:../../sdk", diff --git a/plugins/core/package.json b/plugins/core/package.json index feb6dd9a5..3f344e68f 100644 --- a/plugins/core/package.json +++ b/plugins/core/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/core", - "version": "0.0.134", + "version": "0.0.135", "description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/server/src/rpc.ts b/server/src/rpc.ts index e83b2af27..b9a9ec811 100644 --- a/server/src/rpc.ts +++ b/server/src/rpc.ts @@ -125,7 +125,7 @@ class RpcProxy implements ProxyHandler { method, }; - if (this.proxyOneWayMethods?.includes(method)) { + if (this.proxyOneWayMethods?.includes?.(method)) { rpcApply.oneway = true; this.peer.send(rpcApply, e => new RPCResultError(e.message, e)); return Promise.resolve(); diff --git a/server/src/runtime.ts b/server/src/runtime.ts index c78e2d86e..79f250268 100644 --- a/server/src/runtime.ts +++ b/server/src/runtime.ts @@ -35,7 +35,7 @@ interface DeviceProxyPair { proxy: ScryptedDevice; } -const MIN_SCRYPTED_CORE_VERSION = '0.0.121'; +const MIN_SCRYPTED_CORE_VERSION = '0.0.135'; const PLUGIN_DEVICE_STATE_VERSION = 2; export class ScryptedRuntime {