Skip to content

Commit f7172c7

Browse files
1.0.16 (#94)
* version changes * update node version requirement * Bump axios from 0.21.4 to 0.28.0 Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 0.28.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.28.0/CHANGELOG.md) - [Commits](axios/axios@v0.21.4...v0.28.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * mosquitto example dockerfile * use fixed engine range, remove unused deps * removed old directories from .gitignore * updated node version * add vscode workspace settings * updated dockerfile example * coding style * information about CVE-2022-32214 resolution in node >21 that affects parsing device responses * update packages and engines * update to new versions * 1.0.16 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 555b052 commit f7172c7

15 files changed

+524
-686
lines changed

.github/workflows/npm-publish.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: Publish Package to npmjs
55

66
on:
77
release:
8-
types: [created]
9-
workflow_dispatch:
8+
types: [published]
9+
branches:
10+
- main
1011

1112
jobs:
1213
build:
1314
runs-on: ubuntu-latest
1415
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
1718
with:
18-
node-version: 18
19+
node-version: '20.x'
20+
registry-url: https://registry.npmjs.org
1921
- run: npm ci
2022
- run: npm test
21-
22-
publish-npm:
23-
needs: build
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v3
27-
- uses: actions/setup-node@v3
28-
with:
29-
node-version: 18
30-
registry-url: https://registry.npmjs.org/
31-
- run: npm ci
32-
- run: npm publish
23+
- run: npm publish --access public
3324
env:
3425
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/stale.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- name: Close Stale Issues
2+
uses: actions/stale@v9.0.0
3+

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
bin/src/node_modules
2-
cmd/
3-
dumps/
4-
old_certs/
1+
# directories
2+
node_modules/
3+
4+
#files

.npmignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
certs/
2-
cmd/
3-
dumps/
41
mosquito/
5-
old_certs/
62
teardown/

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"useTabs": false,
44
"semi": true,
55
"arrowParens": "always",
6-
"singleQuote": true
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"printWidth": 80
79
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"editor.tabSize": 2,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode"
4+
}

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM eclipse-mosquitto:1.6.15-openssl
2+
3+
COPY mosquitto/basic.conf ./mosquitto/config/mosquitto.conf
4+
RUN apk add --update --no-cache openssl && \
5+
mkdir /mosquitto/config/certs && \
6+
cd /mosquitto/config/certs && \
7+
openssl genrsa -out ca.key 2048 && \
8+
openssl req -x509 -new -nodes -key ca.key -days 3650 -out ca.crt -subj '/CN=My Root' && \
9+
openssl req -new -nodes -out server.csr -newkey rsa:2048 -keyout server.key -subj '/CN=Mosquitto' && \
10+
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 3650 && \
11+
c_rehash . && \
12+
chown -R mosquitto:mosquitto /mosquitto && \
13+
chmod 600 /mosquitto/config/certs/*
14+
15+
EXPOSE 1883
16+
EXPOSE 8883

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Tools to help configure the Meross devices for purpose of utilising our <a href=
66

77
Before you can use the tool to setup your device you need to put it into paring mode and connect to it's Access Point. It's IP address is known as the `--gateway` parameter and is typically `10.10.10.1`.
88

9-
Requires `node` v18+.
9+
Requires `node` >=18
10+
For Node.js >=21 you need to prepend commands with `NODE_OPTIONS='--insecure-http-parser'`. This is because the responses from some (if not all) versions of the Meross firmware incorrectly terminate headers with LF instead of CRLF. [CVE-2022-32214](https://nvd.nist.gov/vuln/detail/CVE-2022-32214)
1011

1112
## Home Assistant
1213

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

certs/ca.crt

Lines changed: 0 additions & 23 deletions
This file was deleted.

certs/server.crt

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)