node-red-contrib-zwave-js 7.0.2 → 7.0.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # node-red-contrib-zwave-js Change Log
2
2
 
3
+ - 7.0.3
4
+
5
+ **Changes**
6
+ - Replaced LGTM quality check with deepscan
7
+ - Address deepscan alerts
8
+ - Added CodeQL security checks
9
+ - Bump Zwave JS to 9.2.2
10
+ - Implement publish to NPM workflow (github release)
11
+ - Update shields
12
+
3
13
  - 7.0.2
4
14
 
5
15
  **Fixes**
package/README.md CHANGED
@@ -4,8 +4,10 @@
4
4
 
5
5
  ![NPM](https://img.shields.io/npm/l/node-red-contrib-zwave-js)
6
6
  ![npm](https://img.shields.io/npm/v/node-red-contrib-zwave-js)
7
- [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/zwave-js/node-red-contrib-zwave-js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/zwave-js/node-red-contrib-zwave-js/context:javascript)
8
- ![npms.io (maintenance)](https://img.shields.io/npms-io/maintenance-score/node-red-contrib-zwave-js)
7
+ [![Package Quality](https://packagequality.com/shield/node-red-contrib-zwave-js.svg)](https://packagequality.com/#?package=node-red-contrib-zwave-js)
8
+ [![DeepScan grade](https://deepscan.io/api/teams/17652/projects/21011/branches/591232/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=17652&pid=21011&bid=591232)
9
+ ![GitHub issues](https://img.shields.io/github/issues-raw/zwave-js/node-red-contrib-zwave-js)
10
+ ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/zwave-js/node-red-contrib-zwave-js)
9
11
  ![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/node-red-contrib-zwave-js)
10
12
 
11
13
  The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "node-red-contrib-zwave-js",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "license": "MIT",
5
- "description": "An extremely powerful, easy to use, and feature rich Z-Wave node for Node Red, based on Z-Wave JS.",
5
+ "description": "The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.",
6
6
  "dependencies": {
7
7
  "limiter": "^2.1.0",
8
8
  "lodash": "^4.17.21",
9
9
  "serialport": "^10.4.0",
10
10
  "winston": "^3.7.2",
11
11
  "winston-transport": "^4.5.0",
12
- "zwave-js": "^9.2.1"
12
+ "zwave-js": "^9.2.2"
13
13
  },
14
14
  "devDependencies": {
15
15
  "eslint": "^8.15.0",
@@ -97,11 +97,7 @@ function SendCode(Code) {
97
97
  return new Promise((resolve) => {
98
98
  const Entry = ScannedCodes[Code.data];
99
99
  if (Entry !== undefined) {
100
- if (Entry.ok) {
101
- resolve();
102
- } else {
103
- resolve();
104
- }
100
+ resolve();
105
101
  } else {
106
102
  let Result;
107
103
  $.ajax({
@@ -2953,8 +2953,8 @@ const ZwaveJsUI = (function () {
2953
2953
 
2954
2954
  // If value is not provided in arguments or in the valueId, then use the stored raw value.
2955
2955
  const value =
2956
- valueId?.newValue ??
2957
- valueId?.currentValue ??
2956
+ valueId.newValue ??
2957
+ valueId.currentValue ??
2958
2958
  propertyValue.data('value') ??
2959
2959
  '';
2960
2960
 
@@ -3004,8 +3004,8 @@ const ZwaveJsUI = (function () {
3004
3004
 
3005
3005
  // If states are provided, translate and add tooltip with raw value
3006
3006
  const value = propertyValue.data('value');
3007
- if (meta?.states?.[value]) {
3008
- propertyValue.text(meta?.states?.[value]);
3007
+ if (meta.states?.[value]) {
3008
+ propertyValue.text(meta.states?.[value]);
3009
3009
  RED.popover.tooltip(propertyValue, `Raw Value: ${value}`);
3010
3010
  }
3011
3011
 
@@ -1478,13 +1478,11 @@ module.exports = function (RED) {
1478
1478
  if (
1479
1479
  !Driver.controller.isAssociationAllowed(Params[0], Params[1], A)
1480
1480
  ) {
1481
- const ErrorMSG =
1482
- 'Association: Source ' + JSON.stringify(Params[0]);
1483
- +', Group ' +
1484
- Params[1] +
1485
- ', Destination ' +
1486
- JSON.stringify(A) +
1487
- ' is not allowed.';
1481
+ const ErrorMSG = `Association: Source -> ${JSON.stringify(
1482
+ Params[0]
1483
+ )}, Group -> ${Params[1]}, Destination -> ${JSON.stringify(
1484
+ A
1485
+ )} is not allowed.`;
1488
1486
  throw new Error(ErrorMSG);
1489
1487
  }
1490
1488
  });