node-red-contrib-homebridge-automation 0.1.12-beta.9 → 0.2.1-beta.0
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/.github/npm-version-script.js +35 -43
- package/.github/workflows/Build and Publish.yml +81 -75
- package/README.md +7 -4
- package/eslint.config.mjs +34 -0
- package/package.json +34 -25
- package/src/HAP-NodeRed.html +71 -71
- package/src/HAP-NodeRed.js +32 -1082
- package/src/HapDeviceRoutes.js +59 -0
- package/src/hbBaseNode.js +94 -0
- package/src/hbConfigNode.js +239 -0
- package/src/hbConfigNode.test.js +2179 -0
- package/src/hbControlNode.js +77 -0
- package/src/hbEventNode.js +23 -0
- package/src/hbResumeNode.js +63 -0
- package/src/hbStatusNode.js +37 -0
- package/test/node-red/.config.nodes.json +453 -0
- package/test/node-red/.config.nodes.json.backup +453 -0
- package/test/node-red/.config.runtime.json +4 -0
- package/test/node-red/.config.runtime.json.backup +3 -0
- package/test/node-red/.config.users.json +23 -0
- package/test/node-red/.config.users.json.backup +20 -0
- package/test/node-red/.flows.json.backup +2452 -0
- package/test/node-red/flows.json +2453 -0
- package/test/node-red/package.json +6 -0
- package/test/node-red/settings.js +593 -0
- package/test/node-red/test/node-red/.config.nodes.json +430 -0
- package/test/node-red/test/node-red/.config.runtime.json +4 -0
- package/test/node-red/test/node-red/.config.runtime.json.backup +3 -0
- package/test/node-red/test/node-red/.config.users.json +20 -0
- package/test/node-red/test/node-red/.config.users.json.backup +17 -0
- package/test/node-red/test/node-red/package.json +6 -0
- package/test/node-red/test/node-red/settings.js +593 -0
- package/.eslintrc.js +0 -24
- package/.nycrc.json +0 -11
- package/src/lib/Accessory.js +0 -126
- package/src/lib/Characteristic.js +0 -30
- package/src/lib/HbAccessories.js +0 -167
- package/src/lib/Homebridge.js +0 -71
- package/src/lib/Homebridges.js +0 -68
- package/src/lib/Service.js +0 -307
- package/src/lib/register.js +0 -156
|
@@ -4,23 +4,25 @@
|
|
|
4
4
|
* This scripts queries the npm registry to pull out the latest version for a given tag.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const assert = require('node:assert')
|
|
8
|
+
const child_process = require('node:child_process')
|
|
9
|
+
const fs = require('node:fs')
|
|
10
|
+
const process = require('node:process')
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const semver = require('semver')
|
|
13
|
+
|
|
14
|
+
const BRANCH_VERSION_PATTERN = /^([A-Z]+)-(\d+\.\d+\.\d+)$/i
|
|
13
15
|
|
|
14
16
|
// Load the contents of the package.json file
|
|
15
|
-
const packageJSON = JSON.parse(fs.readFileSync(
|
|
17
|
+
const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const refArgument = process.argv[2]
|
|
20
|
+
const tagArgument = process.argv[3] || 'latest'
|
|
19
21
|
|
|
20
22
|
if (refArgument == null) {
|
|
21
|
-
console.error(
|
|
22
|
-
console.error(
|
|
23
|
-
process.exit(1)
|
|
23
|
+
console.error('ref argument is missing')
|
|
24
|
+
console.error('Usage: npm-version-script.js <ref> [tag]')
|
|
25
|
+
process.exit(1)
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
/**
|
|
@@ -30,64 +32,54 @@ if (refArgument == null) {
|
|
|
30
32
|
*/
|
|
31
33
|
function getTagVersionFromNpm(tag) {
|
|
32
34
|
try {
|
|
33
|
-
return child_process.execSync(`npm info ${packageJSON.name} version --tag="${tag}"`).toString(
|
|
35
|
+
return child_process.execSync(`npm info ${packageJSON.name} version --tag="${tag}"`).toString('utf8').trim()
|
|
34
36
|
} catch (e) {
|
|
35
|
-
console.error(`Failed to query the npm registry for the latest version for tag: ${tag}`)
|
|
37
|
+
console.error(`Failed to query the npm registry for the latest version for tag: ${tag}`)
|
|
36
38
|
// throw e;
|
|
37
|
-
return
|
|
39
|
+
return '0.0.0'
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
function desiredTargetVersion(ref) {
|
|
42
44
|
// ref is a GitHub action ref string
|
|
43
|
-
if (ref.startsWith(
|
|
44
|
-
throw Error(
|
|
45
|
+
if (ref.startsWith('refs/pull/')) {
|
|
46
|
+
throw new Error('The version script was executed inside a PR!')
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
assert(ref.startsWith(
|
|
48
|
-
|
|
49
|
+
assert(ref.startsWith('refs/heads/'))
|
|
50
|
+
const branchName = ref.slice('refs/heads/'.length)
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
const results = branchName.match(BRANCH_VERSION_PATTERN)
|
|
51
53
|
if (results != null) {
|
|
52
54
|
if (results[1] !== tagArgument) {
|
|
53
|
-
console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`)
|
|
55
|
+
console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`)
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
return results[2]
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// legacy mode were we use the `betaVersion` property in the package.json
|
|
60
|
-
if (branchName === "beta" && packageJSON.betaVersion) {
|
|
61
|
-
return packageJSON.betaVersion
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// legacy mode were we use the `alphaVersion` property in the package.json
|
|
65
|
-
if (branchName === "alpha" && packageJSON.alphaVersion) {
|
|
66
|
-
return packageJSON.alphaVersion
|
|
58
|
+
return results[2]
|
|
67
59
|
}
|
|
68
60
|
|
|
69
|
-
throw new Error(`Malformed branch name for ref: ${ref}. Can't derive the base version. Use a branch name like: beta-x.x.x or alpha-x.x.x`)
|
|
61
|
+
throw new Error(`Malformed branch name for ref: ${ref}. Can't derive the base version. Use a branch name like: beta-x.x.x or alpha-x.x.x`)
|
|
70
62
|
}
|
|
71
63
|
|
|
72
64
|
// derive the base version from the branch ref
|
|
73
|
-
const baseVersion = desiredTargetVersion(refArgument)
|
|
65
|
+
const baseVersion = desiredTargetVersion(refArgument)
|
|
74
66
|
|
|
75
67
|
// query the npm registry for the latest version of the provided tag name
|
|
76
|
-
const latestReleasedVersion = getTagVersionFromNpm(tagArgument)
|
|
77
|
-
const latestReleaseBase = semver.inc(latestReleasedVersion,
|
|
68
|
+
const latestReleasedVersion = getTagVersionFromNpm(tagArgument) // e.g. 0.7.0-beta.12
|
|
69
|
+
const latestReleaseBase = semver.inc(latestReleasedVersion, 'patch') // will produce 0.7.0 (removing the preid, needed for the equality check below)
|
|
78
70
|
|
|
79
|
-
let publishTag
|
|
71
|
+
let publishTag
|
|
80
72
|
if (semver.eq(baseVersion, latestReleaseBase)) { // check if we are releasing another version for the latest beta or alpha
|
|
81
|
-
publishTag = latestReleasedVersion
|
|
73
|
+
publishTag = latestReleasedVersion // set the current latest beta or alpha to be incremented
|
|
82
74
|
} else {
|
|
83
|
-
publishTag = baseVersion
|
|
75
|
+
publishTag = baseVersion // start of with a new beta or alpha version
|
|
84
76
|
}
|
|
85
77
|
|
|
86
78
|
// save the package.json
|
|
87
|
-
packageJSON.version = publishTag
|
|
88
|
-
fs.writeFileSync(
|
|
79
|
+
packageJSON.version = publishTag
|
|
80
|
+
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2))
|
|
89
81
|
|
|
90
82
|
// perform the same change to the package-lock.json
|
|
91
|
-
const packageLockJSON = JSON.parse(fs.readFileSync(
|
|
92
|
-
packageLockJSON.version = publishTag
|
|
93
|
-
fs.writeFileSync(
|
|
83
|
+
const packageLockJSON = JSON.parse(fs.readFileSync('package-lock.json', 'utf8'))
|
|
84
|
+
packageLockJSON.version = publishTag
|
|
85
|
+
fs.writeFileSync('package-lock.json', JSON.stringify(packageLockJSON, null, 2))
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
name:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
name:
|
|
2
|
+
'Build, Publish and Release'
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# Automatically publish beta releases on pushes, require a manual workflow action for production releases
|
|
6
|
+
#
|
|
7
|
+
# Does the following
|
|
8
|
+
# 1 - Run the documentation script against the package
|
|
9
|
+
# 2 - Create the npm package using the package.json version tag ( or for beta releases, adds a beta tag and increments as needed )
|
|
10
|
+
# 3 - Publish the npm package
|
|
11
|
+
# 4 - For releases against the latest branch, create a github release as well
|
|
11
12
|
|
|
12
13
|
on:
|
|
13
14
|
push:
|
|
@@ -19,24 +20,24 @@ jobs:
|
|
|
19
20
|
runs-on: ubuntu-latest
|
|
20
21
|
|
|
21
22
|
steps:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
# checkout repo
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
# get branch / tag name
|
|
27
|
+
- name: Get Branch / Tag Name
|
|
28
|
+
id: get_branch
|
|
29
|
+
run: |
|
|
30
|
+
export BRANCH_NAME=$(if [[ ${GITHUB_REF} =~ "refs/tags/" ]]; then echo ${GITHUB_REF/refs\/tags\//}; else echo ${GITHUB_REF/refs\/heads\//}; fi)
|
|
31
|
+
echo $BRANCH_NAME
|
|
32
|
+
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
|
|
33
|
+
|
|
34
|
+
# generate the image tag
|
|
35
|
+
- name: Get Image Tag
|
|
36
|
+
id: get_tag
|
|
37
|
+
run: |
|
|
38
|
+
export TARGET_IMAGE_TAG=$(if [ "${{ steps.get_branch.outputs.BRANCH_NAME }}" = "main" ]; then echo "main"; else echo "${{ steps.get_branch.outputs.BRANCH_NAME }}" | awk -F- '{ print $1 }'; fi)
|
|
39
|
+
echo $TARGET_IMAGE_TAG
|
|
40
|
+
echo "TARGET_IMAGE_TAG=${TARGET_IMAGE_TAG}" >> $GITHUB_OUTPUT
|
|
40
41
|
|
|
41
42
|
outputs:
|
|
42
43
|
BRANCH_NAME: ${{ steps.get_branch.outputs.BRANCH_NAME }}
|
|
@@ -46,50 +47,54 @@ jobs:
|
|
|
46
47
|
runs-on: ubuntu-latest
|
|
47
48
|
|
|
48
49
|
steps:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
# checkout repo
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
with:
|
|
53
|
+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
|
|
54
|
+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
|
55
|
+
|
|
56
|
+
- uses: actions/setup-node@v4
|
|
57
|
+
with:
|
|
58
|
+
node-version: lts/*
|
|
59
|
+
|
|
60
|
+
- name: Retrieve github-markdown-toc
|
|
61
|
+
run: |
|
|
62
|
+
wget -q https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc
|
|
63
|
+
chmod a+x gh-md-toc
|
|
64
|
+
|
|
65
|
+
- name: Create Table of Contents
|
|
66
|
+
run: |
|
|
67
|
+
npm run-script document --if-present
|
|
68
|
+
rm gh-md-toc
|
|
69
|
+
|
|
70
|
+
- name: Commit files
|
|
71
|
+
run: |
|
|
72
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
73
|
+
git config --local user.name "github-actions[bot]"
|
|
74
|
+
git add * || true
|
|
75
|
+
git commit -a -m "Update TOC" || true
|
|
76
|
+
|
|
77
|
+
- name: Push changes
|
|
78
|
+
uses: ad-m/github-push-action@master
|
|
79
|
+
with:
|
|
80
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
81
|
+
branch: ${{ github.ref }}
|
|
81
82
|
|
|
82
83
|
publish_prod_release:
|
|
84
|
+
permissions:
|
|
85
|
+
id-token: write
|
|
83
86
|
needs: [get_tags, create_documentation]
|
|
84
87
|
name: Publish Release Version
|
|
85
88
|
if: ${{ needs.get_tags.outputs.BRANCH_NAME == 'main' }}
|
|
86
89
|
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
|
|
87
90
|
with:
|
|
88
|
-
install_cmd: npm ci
|
|
91
|
+
install_cmd: npm ci
|
|
89
92
|
secrets:
|
|
90
|
-
npm_auth_token: ${{ secrets.
|
|
93
|
+
npm_auth_token: ${{ secrets.NPM_TOKEN }}
|
|
91
94
|
|
|
92
95
|
publish_test_release:
|
|
96
|
+
permissions:
|
|
97
|
+
id-token: write
|
|
93
98
|
needs: [get_tags, create_documentation]
|
|
94
99
|
name: Publish Test Version - ${{ needs.get_tags.outputs.BRANCH_NAME }}
|
|
95
100
|
if: ${{ needs.get_tags.outputs.BRANCH_NAME != 'main' }}
|
|
@@ -97,23 +102,24 @@ jobs:
|
|
|
97
102
|
with:
|
|
98
103
|
tag: ${{ needs.get_tags.outputs.TARGET_IMAGE_TAG }}
|
|
99
104
|
dynamically_adjust_version: true
|
|
100
|
-
npm_version_command:
|
|
105
|
+
npm_version_command: pre
|
|
101
106
|
pre_id: ${{ needs.get_tags.outputs.TARGET_IMAGE_TAG }}
|
|
107
|
+
install_cmd: npm ci
|
|
102
108
|
secrets:
|
|
103
|
-
npm_auth_token: ${{ secrets.
|
|
109
|
+
npm_auth_token: ${{ secrets.NPM_TOKEN }}
|
|
104
110
|
|
|
105
111
|
publish_github_release:
|
|
106
112
|
needs: [publish_prod_release]
|
|
107
113
|
runs-on: ubuntu-latest
|
|
108
114
|
steps:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
- uses: actions/checkout@v4
|
|
116
|
+
- name: Create Release
|
|
117
|
+
uses: softprops/action-gh-release@v1
|
|
118
|
+
env:
|
|
119
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
120
|
+
with:
|
|
121
|
+
tag_name: ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
|
|
122
|
+
name: Release ${{ needs.publish_prod_release.outputs.NPM_VERSION }}
|
|
123
|
+
generate_release_notes: true
|
|
124
|
+
draft: false
|
|
125
|
+
prerelease: false
|
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ The above Node-RED Flow, turns on my 'Outside Office' light when the powder room
|
|
|
34
34
|
* [Jan 6, 2023 - Version 0.1.5](#jan-6-2023---version-015)
|
|
35
35
|
* [Jan 11, 2023 - Version 0.1.7](#jan-11-2023---version-017)
|
|
36
36
|
* [Jan 15, 2023 - Version 0.1.8](#jan-15-2023---version-018)
|
|
37
|
+
* [Dec 15, 2024 - Version 0.2.0](#dec-15-2024---version-020)
|
|
37
38
|
* [Backlog / Roadmap](#backlog--roadmap)
|
|
38
39
|
* [Dropped items](#dropped-items)
|
|
39
40
|
* [Installation Steps](#installation-steps)
|
|
@@ -58,10 +59,6 @@ The above Node-RED Flow, turns on my 'Outside Office' light when the powder room
|
|
|
58
59
|
* [Donations](#donations)
|
|
59
60
|
* [Troubleshooting / DEBUG MODE](#troubleshooting--debug-mode)
|
|
60
61
|
* [To start Node-RED in DEBUG mode, and output Homebridge-Automation debug logs start Node-RED like this.](#to-start-node-red-in-debug-mode-and-output-homebridge-automation-debug-logs-start-node-red-like-this)
|
|
61
|
-
|
|
62
|
-
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
|
63
|
-
<!-- Added by: runner, at: Sun Jul 7 00:03:36 UTC 2024 -->
|
|
64
|
-
|
|
65
62
|
<!--te-->
|
|
66
63
|
|
|
67
64
|
# Introduction
|
|
@@ -183,6 +180,12 @@ With a plugin, you can see if it supports Real Time events, by opening the Home
|
|
|
183
180
|
|
|
184
181
|
- Workaround for #111
|
|
185
182
|
|
|
183
|
+
### Dec 15, 2024 - Version 0.2.0
|
|
184
|
+
|
|
185
|
+
- Major code base refresh, and migration from hap-node-client to hap-client ( Potential fix for #120 )
|
|
186
|
+
- With the change in connectivity to homebridge, please validate all your nodes are connected after the update. And pay particular attention to `Camera` nodes, as for some devices the name has changed.
|
|
187
|
+
- Testing and Development was completed on Node-RED version: v4.0.2 and Node.js version: v20.18.1
|
|
188
|
+
|
|
186
189
|
# Backlog / Roadmap
|
|
187
190
|
|
|
188
191
|
* [x] - Update Node Information with Homebridge Accessory Details ( hapEndpoint, deviceType, description )
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @type {import('eslint').FlatConfig[]} */
|
|
2
|
+
import pluginJs from "@eslint/js";
|
|
3
|
+
import pluginJest from "eslint-plugin-jest";
|
|
4
|
+
import globals from "globals";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
files: ["**/*.js"],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
sourceType: "commonjs", // This is necessary to parse imports/exports
|
|
12
|
+
globals: {
|
|
13
|
+
...globals.browser,
|
|
14
|
+
...globals.es2021,
|
|
15
|
+
...globals.jest, // Add Jest globals
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
// Add any other specific rules here
|
|
19
|
+
},
|
|
20
|
+
pluginJs.configs.recommended,
|
|
21
|
+
{
|
|
22
|
+
plugins: {
|
|
23
|
+
jest: pluginJest,
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
...pluginJest.configs.recommended.rules,
|
|
27
|
+
"no-unused-vars": "warn", // Change no-unused-vars to a warning
|
|
28
|
+
},
|
|
29
|
+
},
|
|
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,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-homebridge-automation",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1-beta.0",
|
|
4
4
|
"description": "NodeRED Automation for HomeBridge",
|
|
5
5
|
"main": "src/HAP-NodeRed.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"document": "./gh-md-toc --insert README.md; rm README.md.orig.* README.md.toc.*",
|
|
7
|
+
"document": "./gh-md-toc --insert --no-backup --hide-footer README.md",
|
|
9
8
|
"watch": "nodemon",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"test": "
|
|
9
|
+
"lint": "eslint --max-warnings=10 .",
|
|
10
|
+
"lint:fix": "eslint --fix --max-warnings=0 .",
|
|
11
|
+
"test": "jest --detectOpenHandles",
|
|
12
|
+
"test-coverage": "jest --coverage"
|
|
14
13
|
},
|
|
15
14
|
"keywords": [
|
|
16
15
|
"node-red",
|
|
@@ -26,28 +25,24 @@
|
|
|
26
25
|
"url": "git+https://github.com/NorthernMan54/node-red-contrib-homebridge-automation.git"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@types/node-red": "^
|
|
30
|
-
"@types/jest": "^29.5.
|
|
31
|
-
"
|
|
32
|
-
"eslint": "^8.57.
|
|
33
|
-
"eslint-
|
|
34
|
-
"eslint-plugin-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"eslint-plugin-sort-exports": "^0.9.1",
|
|
38
|
-
"mocha": "^10.6.0",
|
|
28
|
+
"@types/node-red": "^1.3.5",
|
|
29
|
+
"@types/jest": "^29.5.14",
|
|
30
|
+
"@eslint/js": "^9.16.0",
|
|
31
|
+
"eslint": "^8.57.1",
|
|
32
|
+
"eslint-plugin-format": "^0.1.2",
|
|
33
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
34
|
+
"globals": "^15.13.0",
|
|
35
|
+
"jest": "^29.7.0",
|
|
39
36
|
"node-red": "^4.0.2",
|
|
40
37
|
"node-red-node-test-helper": "^0.3.4",
|
|
41
|
-
"nodemon": "^3.1.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"rimraf": "^5.0.7",
|
|
45
|
-
"semver": "^7.6.2"
|
|
38
|
+
"nodemon": "^3.1.7",
|
|
39
|
+
"rimraf": "^6.0.1",
|
|
40
|
+
"semver": "^7.6.3"
|
|
46
41
|
},
|
|
47
42
|
"dependencies": {
|
|
48
43
|
"better-queue": ">=3.8.12",
|
|
49
|
-
"debug": "^4.3.
|
|
50
|
-
"hap-
|
|
44
|
+
"debug": "^4.3.7",
|
|
45
|
+
"@homebridge/hap-client": "^2.0.5"
|
|
51
46
|
},
|
|
52
47
|
"author": "NorthernMan54",
|
|
53
48
|
"license": "ISC",
|
|
@@ -61,10 +56,24 @@
|
|
|
61
56
|
],
|
|
62
57
|
"ext": "js,html",
|
|
63
58
|
"ignore": [],
|
|
64
|
-
"exec": "DEBUG=hapNodeRed ~/npm/bin/node-red",
|
|
59
|
+
"exec": "DEBUG=hapNodeRed* ~/npm/bin/node-red -v -u test/node-red",
|
|
65
60
|
"signal": "SIGTERM",
|
|
66
61
|
"env": {
|
|
67
62
|
"NODE_OPTIONS": "--trace-warnings"
|
|
68
63
|
}
|
|
64
|
+
},
|
|
65
|
+
"jest": {
|
|
66
|
+
"testEnvironment": "node",
|
|
67
|
+
"modulePathIgnorePatterns": [],
|
|
68
|
+
"coverageReporters": [
|
|
69
|
+
"lcov"
|
|
70
|
+
],
|
|
71
|
+
"collectCoverageFrom": [
|
|
72
|
+
"src/**",
|
|
73
|
+
"!src/accessories/**",
|
|
74
|
+
"!src/lib/definitions/generate-definitions.ts",
|
|
75
|
+
"!src/lib/definitions/generator-configuration.ts",
|
|
76
|
+
"!src/test-utils"
|
|
77
|
+
]
|
|
69
78
|
}
|
|
70
79
|
}
|