@scrypted/server 0.7.69 → 0.7.70

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.

Potentially problematic release.


This version of @scrypted/server might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/server",
3
- "version": "0.7.69",
3
+ "version": "0.7.70",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "@mapbox/node-pre-gyp": "^1.0.10",
@@ -318,6 +318,11 @@ class PluginRemote:
318
318
 
319
319
  port = clusterObject['port']
320
320
  proxyId = clusterObject['proxyId']
321
+ if port == clusterPort:
322
+ newValue = self.peer.localProxyMap.get(id, None)
323
+ if not newValue:
324
+ raise Exception('ipc object not found?')
325
+ return newValue
321
326
 
322
327
  clusterPeerPromise = clusterPeers.get(port)
323
328
  if not clusterPeerPromise:
@@ -355,11 +360,12 @@ class PluginRemote:
355
360
 
356
361
  def onProxySerialization(value: Any, proxyId: str):
357
362
  properties: dict = rpc.RpcPeer.prepareProxyProperties(value) or {}
358
- properties['__cluster'] = {
359
- 'id': clusterId,
360
- 'proxyId': proxyId,
361
- 'port': clusterPort,
362
- }
363
+ if not properties.get('__cluster', None):
364
+ properties['__cluster'] = {
365
+ 'id': clusterId,
366
+ 'proxyId': proxyId,
367
+ 'port': clusterPort,
368
+ }
363
369
  return properties
364
370
 
365
371
  self.peer.onProxySerialization = onProxySerialization
@@ -96,9 +96,11 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe
96
96
 
97
97
  peer.onProxySerialization = (value, proxyId) => {
98
98
  const properties = RpcPeer.prepareProxyProperties(value) || {};
99
- properties.__cluster = {
100
- ...clusterEntry,
101
- proxyId,
99
+ if (!properties.__cluster) {
100
+ properties.__cluster = {
101
+ ...clusterEntry,
102
+ proxyId,
103
+ }
102
104
  }
103
105
  return properties;
104
106
  }