From 9009ad6eae840aef13a370818860555179b18f55 Mon Sep 17 00:00:00 2001 From: Stefan Rom Date: Wed, 24 Jul 2024 17:31:09 +0200 Subject: [PATCH] Minor update of mocha + improvement of package --- examples/Example.json | 84 +++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 13 ++++--- package.json | 6 +++- 3 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 examples/Example.json diff --git a/examples/Example.json b/examples/Example.json new file mode 100644 index 0000000..adfcb08 --- /dev/null +++ b/examples/Example.json @@ -0,0 +1,84 @@ +[ + { + "id": "f6f2187d.f17ca8", + "type": "tab", + "label": "Example-Flow", + "disabled": false, + "info": "" + }, + { + "id": "5807e21a187c64ef", + "type": "inject", + "z": "f6f2187d.f17ca8", + "name": "Start", + "props": [], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "x": 90, + "y": 160, + "wires": [ + [ + "1a6cf1049ca69de0" + ] + ] + }, + { + "id": "1a6cf1049ca69de0", + "type": "time-switch", + "z": "f6f2187d.f17ca8", + "name": "", + "lat": "38.322151", + "lon": "-0.513703", + "startTime": "07:28", + "endTime": "goldenHour", + "startOffset": 0, + "endOffset": 0, + "x": 290, + "y": 160, + "wires": [ + [ + "020b98863791648b" + ], + [ + "5ac8121f8a73874b" + ] + ] + }, + { + "id": "020b98863791648b", + "type": "debug", + "z": "f6f2187d.f17ca8", + "name": "Within time action", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 530, + "y": 120, + "wires": [] + }, + { + "id": "5ac8121f8a73874b", + "type": "debug", + "z": "f6f2187d.f17ca8", + "name": "Outside of time action", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 540, + "y": 200, + "wires": [] + } +] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6a56e32..bd72d87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "node-red-contrib-time-switch", - "version": "1.1.2", + "version": "1.1.3", "license": "MIT", "dependencies": { "moment": "^2.30.1", @@ -19,11 +19,14 @@ "eslint": "^8.57.0", "eslint-config-biddster": "^0.6.0", "eslint-config-prettier": "^8.10.0", - "mocha": "^10.6.0", + "mocha": "^10.7.0", "node-red-contrib-mock-node": "^0.5.3", "nyc": "^15.1.0", "prettier": "^2.8.8", "should": "^13.2.3" + }, + "engines": { + "node": ">=14.0" } }, "node_modules/@ampproject/remapping": { @@ -2536,9 +2539,9 @@ } }, "node_modules/mocha": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", - "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", + "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", diff --git a/package.json b/package.json index 75b85ec..4df871a 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,14 @@ "suncalc2": "^1.8.1" }, "node-red": { + "version": ">=3.0.0", "nodes": { "time-range-switch": "index.js" } }, + "engines": { + "node": ">=14.0" + }, "repository": { "type": "git", "url": "https://github.com/devRoemer/node-red-contrib-time-switch" @@ -47,7 +51,7 @@ "eslint": "^8.57.0", "eslint-config-biddster": "^0.6.0", "eslint-config-prettier": "^8.10.0", - "mocha": "^10.6.0", + "mocha": "^10.7.0", "node-red-contrib-mock-node": "^0.5.3", "nyc": "^15.1.0", "prettier": "^2.8.8",