Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-deconz

Package Overview
Dependencies
Maintainers
2
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-deconz - npm Package Compare versions

Comparing version 2.3.9 to 2.3.10

6

CHANGELOG.md

@@ -10,2 +10,8 @@ # Changelog

### Fixed
## [2.3.10] - 2023-12-14 ![Relative date](https://img.shields.io/date/1702556236?label=)
- Fix JSONata Expression handling for Node-Red 4.0. @Zehir
## [2.3.9] - 2023-01-04 ![Relative date](https://img.shields.io/date/1672868800?label=)

@@ -12,0 +18,0 @@

2

nodes/battery.js

@@ -67,3 +67,3 @@ const OutputMsgFormatter = require("../src/runtime/OutputMsgFormatter");

initNode();
node.server.propagateStartNews([node.id]);
await node.server.propagateStartNews([node.id]);
})()

@@ -70,0 +70,0 @@ .then()

@@ -103,7 +103,12 @@ const ConfigMigration = require("../src/migration/ConfigMigration");

case "jsonata":
let querySrc = RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(node.config.query, node),
message_in,
undefined
);
const querySrc = await new Promise((resolve, reject) => {
RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(node.config.query, node),
message_in,
(err, value) => {
if (err) reject(err);
else resolve(value);
}
);
});
try {

@@ -110,0 +115,0 @@ for (let r of node.server.device_list.getDevicesByQuery(

@@ -69,3 +69,3 @@ const OutputMsgFormatter = require("../src/runtime/OutputMsgFormatter");

initNode();
node.server.propagateStartNews([node.id]);
await node.server.propagateStartNews([node.id]);
})()

@@ -72,0 +72,0 @@ .then()

@@ -141,7 +141,12 @@ const CommandParser = require("../src/runtime/CommandParser");

case "jsonata":
let querySrc = RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(node.config.query, node),
message_in,
undefined
);
const querySrc = await new Promise((resolve, reject) => {
RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(node.config.query, node),
message_in,
(err, value) => {
if (err) reject(err);
else resolve(value);
}
);
});
try {

@@ -148,0 +153,0 @@ for (let r of node.server.device_list.getDevicesByQuery(

@@ -112,3 +112,3 @@ const got = require("got");

node.state.pooling.errorTriggered = true;
node.propagateErrorNews(code, reason, true);
await node.propagateErrorNews(code, reason, true);
}

@@ -127,3 +127,3 @@ if (node.state.pooling.failCount % 4 === 2) {

node.state.pooling.errorTriggered = true;
node.propagateErrorNews(code, reason, true);
await node.propagateErrorNews(code, reason, true);
}

@@ -253,3 +253,3 @@ if (node.state.pooling.failCount % 4 === 2) {

node.error(reason);
node.propagateErrorNews(code, reason, true);
await node.propagateErrorNews(code, reason, true);
node.onClose();

@@ -263,3 +263,3 @@ }

propagateStartNews(whitelistNodes) {
async propagateStartNews(whitelistNodes) {
let node = this;

@@ -300,7 +300,13 @@ // Node with device selected

// TODO Cache JSONata expresssions ?
let querySrc = RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
undefined
);
const querySrc = await new Promise((resolve, reject) => {
RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
(err, value) => {
if (err) reject(err);
else resolve(value);
}
);
});
try {

@@ -333,3 +339,3 @@ let devices = node.device_list.getDevicesByQuery(querySrc);

propagateErrorNews(code, reason, isGlobalError = false) {
async propagateErrorNews(code, reason, isGlobalError = false) {
let node = this;

@@ -390,7 +396,13 @@ if (!reason) return;

// TODO Cache JSONata expresssions ?
let querySrc = RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
undefined
);
const querySrc = await new Promise((resolve, reject) => {
RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
(err, value) => {
if (err) reject(err);
else resolve(value);
}
);
});
try {

@@ -691,3 +703,3 @@ let devices = node.device_list.getDevicesByQuery(querySrc);

onSocketMessage(dataParsed) {
async onSocketMessage(dataParsed) {
let node = this;

@@ -760,7 +772,13 @@ node.state.websocket.lastEvent = Date.now();

// TODO Cache JSONata expresssions ?
let querySrc = RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
undefined
);
const querySrc = await new Promise((resolve, reject) => {
RED.util.evaluateJSONataExpression(
RED.util.prepareJSONataExpression(target.config.query, target),
{},
(err, value) => {
if (err) reject(err);
else resolve(value);
}
);
});
try {

@@ -767,0 +785,0 @@ let query = new Query(querySrc);

{
"name": "node-red-contrib-deconz",
"version": "2.3.9",
"version": "2.3.10",
"description": "deCONZ connectivity nodes for node-red",

@@ -52,18 +52,19 @@ "keywords": [

"dependencies": {
"@node-red/util": "^2.0.6",
"compare-versions": "^3.6.0",
"@node-red/util": "^3.1.3",
"compare-versions": "^6.1.0",
"dot-prop": "^6.0.1",
"got": "^11.8.2",
"multiple-select": "^1.5.2",
"got": "^11.8.6",
"multiple-select": "^1.7.0",
"set-interval-async": "^2.0.3",
"ws": "^8.11.0"
"ws": "^8.15.1"
},
"devDependencies": {
"grunt": "^1.5.3",
"grunt": "^1.6.1",
"grunt-contrib-uglify": "^5.2.2",
"grunt-contrib-watch": "^1.1.0",
"load-grunt-tasks": "^5.1.0",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"nyc": "^15.1.0",
"should": "^13.2.3"
"should": "^13.2.3",
"taze": "^0.13.0"
},

@@ -70,0 +71,0 @@ "node-red": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc