node-red-contrib-homebridge-automation 0.1.12-beta.12 → 0.1.12-beta.14
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/eslint.config.mjs +10 -4
- package/package.json +3 -3
- package/src/HAP-NodeRed.js +24 -815
- package/src/HapDeviceRoutes.js +107 -0
- package/src/hbBaseNode.js +416 -0
- package/src/hbConfigNode.js +31 -10
- package/src/hbControlNode.js +68 -0
- package/src/hbEventNode.js +60 -94
- package/src/hbResumeNode.js +98 -139
- package/src/hbStatusNode.js +54 -0
package/eslint.config.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/** @type {import('eslint').FlatConfig[]} */
|
|
2
2
|
import pluginJs from "@eslint/js";
|
|
3
3
|
import pluginJest from "eslint-plugin-jest";
|
|
4
|
+
import globals from "globals";
|
|
5
|
+
|
|
4
6
|
|
|
5
|
-
/** @type {import('eslint').Linter.Config[]} */
|
|
6
7
|
export default [
|
|
7
8
|
{
|
|
8
9
|
files: ["**/*.js"],
|
|
9
10
|
languageOptions: {
|
|
10
|
-
sourceType: "commonjs", //
|
|
11
|
+
sourceType: "commonjs", // This is necessary to parse imports/exports
|
|
11
12
|
globals: {
|
|
12
13
|
...globals.browser,
|
|
13
14
|
...globals.es2021,
|
|
14
15
|
...globals.jest, // Add Jest globals
|
|
15
16
|
},
|
|
16
17
|
},
|
|
18
|
+
// Add any other specific rules here
|
|
17
19
|
},
|
|
18
20
|
pluginJs.configs.recommended,
|
|
19
21
|
{
|
|
@@ -25,4 +27,8 @@ export default [
|
|
|
25
27
|
"no-unused-vars": "warn", // Change no-unused-vars to a warning
|
|
26
28
|
},
|
|
27
29
|
},
|
|
28
|
-
|
|
30
|
+
{
|
|
31
|
+
// Exclude test, tools, and lib directories from linting
|
|
32
|
+
ignores: ["test/**/*", "tools/*js", "src/lib/*"], // Exclude these files from linting
|
|
33
|
+
}
|
|
34
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-homebridge-automation",
|
|
3
|
-
"version": "0.1.12-beta.
|
|
3
|
+
"version": "0.1.12-beta.14",
|
|
4
4
|
"description": "NodeRED Automation for HomeBridge",
|
|
5
5
|
"main": "src/HAP-NodeRed.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"watch": "nodemon",
|
|
10
10
|
"coverage": "nyc npm t",
|
|
11
11
|
"format": "prettier --write {.,test}/*.js *.html *.md",
|
|
12
|
-
"lint": "eslint --max-warnings=
|
|
12
|
+
"lint": "eslint --max-warnings=10 .",
|
|
13
13
|
"lint:fix": "eslint --fix --max-warnings=0 .",
|
|
14
14
|
"test": "jest --detectOpenHandles",
|
|
15
15
|
"test-coverage": "jest --coverage"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"ext": "js,html",
|
|
64
64
|
"ignore": [],
|
|
65
|
-
"exec": "
|
|
65
|
+
"exec": "DEBUG=hapNodeRed ~/npm/bin/node-red -u test/node-red",
|
|
66
66
|
"signal": "SIGTERM",
|
|
67
67
|
"env": {
|
|
68
68
|
"NODE_OPTIONS": "--trace-warnings"
|