Skip to content

Commit

Permalink
Release Candidate 1.6.0 (#533)
Browse files Browse the repository at this point in the history
### Removed

- NodeJS <12 no longer supported

### Changed

- Pin Code format for new devices changed to XXXX-XXXX
- Updated hap-nodejs to [0.11.1](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.11.1) (bug fixes)

Co-authored-by: crxporter <[email protected]>
Co-authored-by: Kevin Kub <[email protected]>
Co-authored-by: D <[email protected]>
Co-authored-by: Tadeusz Wyrzykowski <[email protected]>
  • Loading branch information
5 people authored Jan 11, 2024
1 parent a9705eb commit 26efd86
Show file tree
Hide file tree
Showing 19 changed files with 8,050 additions and 13,996 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: |
npm ci
npm run build
Expand All @@ -22,10 +22,10 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
always-auth: true
- name: Extract PACKAGE_VERSION
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: |
npm ci
npm run build
Expand All @@ -22,10 +22,10 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
always-auth: true
- name: Extract PACKAGE_VERSION
Expand All @@ -43,11 +43,14 @@ jobs:
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://npm.pkg.github.com/
- name: Extract PACKAGE_VERSION
id: package-version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10, 12, 14, 16, 18]
node_version: [12, 14, 16, 18]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: build and test
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.0] - 2024-01-12

### Removed

- NodeJS <12 no longer supported

### Changed

- Pin Code format for new devices changed to XXXX-XXXX
- Updated hap-nodejs to [0.11.1](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.11.1) (bug fixes)

## [1.5.0] - 2022-11-20

### Added
Expand Down
30 changes: 15 additions & 15 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If you find any vulnerability in our functionality, code or dependency then plea
If you found a problem then please open new
Issue [here](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues).

If vulnerability is a serious risk then please consider contacting us directly aswell for faster response.
If vulnerability is a serious risk then please consider contacting us directly as well for faster response.

## Supported Versions

Expand Down Expand Up @@ -38,17 +38,17 @@ To use node-red safely you should secure it properly with encryption and passwor
The following Setup Codes must not be used due to their trivial, insecure nature. In future release (possibly 1.X.Y)
they will be forbidden programmatically.

- 000-00-000
- 111-11-111
- 222-22-222
- 333-33-333
- 444-44-444
- 555-55-555
- 666-66-666
- 777-77-777
- 888-88-888
- 999-99-999
- 123-45-678
- 876-54-321

Since 1.3 random Setup Code will be generated for new Bridge nodes (instead of default 111-11-111)
- 0000-0000
- 1111-1111
- 2222-2222
- 3333-3333
- 4444-4444
- 5555-5555
- 6666-6666
- 7777-7777
- 8888-8888
- 9999-9999
- 1234-5678
- 8765-4321

Since 1.3 random Setup Code will be generated for new Bridge nodes (instead of default 1111-1111)
6 changes: 3 additions & 3 deletions build/nodes/bridge.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script data-template-name="homekit-bridge" type="text/x-red">
<div class="form-row">
<label for="node-config-input-pinCode"><i class="fa fa-lock"></i> Pin Code</label>
<input type="text" id="node-config-input-pinCode" placeholder="xxx-xx-xxx">
<input type="text" id="node-config-input-pinCode" placeholder="xxxx-xxxx">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-plug"></i> Port</label>
Expand Down Expand Up @@ -137,7 +137,7 @@ <h3 id="toc_4">Bridge</h3>
},
pinCode: {
required: true,
validate: RED.validators.regex(/[0-9]{3}-[0-9]{2}-[0-9]{3}/),
validate: pinCodeRegex,
},
port: {
required: false,
Expand Down Expand Up @@ -229,7 +229,7 @@ <h3 id="toc_4">Bridge</h3>
return this.bridgeName ? 'node_label_italic' : ''
},
oneditprepare: function () {
if (!RED.validators.regex(/[0-9]{3}-[0-9]{2}-[0-9]{3}/)(this.pinCode)) {
if (!pinCodeRegex(this.pinCode)) {
this.pinCode = generatePinCode()
$("#node-config-input-pinCode").val(this.pinCode)
}
Expand Down
4 changes: 3 additions & 1 deletion build/nodes/nrchkb.html
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,10 @@

const generatePinCode = function () {
const [a, b, c, d, e, f, g, h] = Array.from({length: 9}, () => getRandomIntInclusive(0, 9));
return `${a}${b}${c}-${d}${e}-${f}${g}${h}`
return `${a}${b}${c}${d}-${e}${f}${g}${h}`
}

const pinCodeRegex = RED.validators.regex(/([0-9]{3}-[0-9]{2}-[0-9]{3}|[0-9]{4}-[0-9]{4})/)
</script>

<script data-template-name="nrchkb" type="text/x-red">
Expand Down
6 changes: 3 additions & 3 deletions build/nodes/standalone.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="form-row">
<label for="node-config-input-pinCode"><i class="fa fa-lock"></i> Pin Code</label>
<input type="text" id="node-config-input-pinCode" placeholder="xxx-xx-xxx">
<input type="text" id="node-config-input-pinCode" placeholder="xxxx-xxxx">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-plug"></i> Port</label>
Expand Down Expand Up @@ -146,7 +146,7 @@ <h3 id="toc_4">Bridge</h3>
},
pinCode: {
required: true,
validate: RED.validators.regex(/[0-9]{3}-[0-9]{2}-[0-9]{3}/),
validate: pinCodeRegex,
},
port: {
required: false,
Expand Down Expand Up @@ -240,7 +240,7 @@ <h3 id="toc_4">Bridge</h3>
oneditprepare: function () {
const node = this

if (!RED.validators.regex(/[0-9]{3}-[0-9]{2}-[0-9]{3}/)(node.pinCode)) {
if (!pinCodeRegex(node.pinCode)) {
node.pinCode = generatePinCode()
$("#node-config-input-pinCode").val(node.pinCode)
}
Expand Down
Loading

0 comments on commit 26efd86

Please sign in to comment.