node-red-contrib-deconz
Advanced tools
Comparing version 2.3.9 to 2.3.10
@@ -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 @@ |
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
521433
8767
8
+ Added@node-red/util@3.1.14(transitive)
+ Addedcompare-versions@6.1.1(transitive)
+ Addedfs-extra@11.1.1(transitive)
+ Addedi18next@21.10.0(transitive)
+ Addedjsonata@1.8.7(transitive)
+ Addedmoment@2.29.4(transitive)
+ Addedmoment-timezone@0.5.43(transitive)
- Removed@node-red/util@2.2.3(transitive)
- Removedcompare-versions@3.6.0(transitive)
- Removedfs-extra@10.0.0(transitive)
- Removedi18next@21.6.11(transitive)
- Removedjsonata@1.8.6(transitive)
- Removedmoment@2.30.1(transitive)
- Removedmoment-timezone@0.5.34(transitive)
Updated@node-red/util@^3.1.3
Updatedcompare-versions@^6.1.0
Updatedgot@^11.8.6
Updatedmultiple-select@^1.7.0
Updatedws@^8.15.1