homebridge-eggtimer-plugin 1.0.32 → 1.0.34
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/dependabot.yml +2 -2
- package/.github/workflows/audit.yml +5 -10
- package/.github/workflows/{auto-merge-dependabot.yml → automerge.yml} +2 -2
- package/.github/workflows/build-homebridge2.0.yml +31 -0
- package/.github/workflows/build.yml +7 -11
- package/.github/workflows/corepack.yml +5 -10
- package/.github/workflows/npm-publish.yml +8 -6
- package/README.md +44 -0
- package/package.json +7 -7
package/.github/dependabot.yml
CHANGED
|
@@ -10,10 +10,10 @@ updates:
|
|
|
10
10
|
- package-ecosystem: "github-actions"
|
|
11
11
|
directory: "/"
|
|
12
12
|
schedule:
|
|
13
|
-
interval: "
|
|
13
|
+
interval: "monthly"
|
|
14
14
|
|
|
15
15
|
# Maintain dependencies for npm
|
|
16
16
|
- package-ecosystem: "pnpm"
|
|
17
17
|
directory: "/"
|
|
18
18
|
schedule:
|
|
19
|
-
interval: "
|
|
19
|
+
interval: "monthly"
|
|
@@ -16,15 +16,10 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@v4
|
|
19
|
-
- uses: actions/cache@v4
|
|
20
|
-
name: Cache node modules
|
|
21
|
-
with:
|
|
22
|
-
path: node_modules
|
|
23
|
-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
24
|
-
- name: Use Node.js 20.x
|
|
25
|
-
uses: actions/setup-node@v4.0.2
|
|
26
|
-
with:
|
|
27
|
-
node-version: 20.x
|
|
28
19
|
- uses: pnpm/action-setup@v4
|
|
20
|
+
- uses: actions/setup-node@v4.0.3
|
|
21
|
+
with:
|
|
22
|
+
node-version: latest
|
|
23
|
+
cache: pnpm
|
|
29
24
|
- run: pnpm install --frozen-lockfile
|
|
30
|
-
- run: pnpm audit
|
|
25
|
+
- run: pnpm audit -P
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: Auto-merge
|
|
1
|
+
name: Auto-merge
|
|
2
2
|
on: pull_request
|
|
3
3
|
|
|
4
4
|
permissions:
|
|
@@ -8,7 +8,7 @@ permissions:
|
|
|
8
8
|
jobs:
|
|
9
9
|
automerge:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
-
if: github.actor == 'dependabot[bot]' || (startsWith(github.event.pull_request.title, 'Bump to version ') && (github.actor == 'github-actions' || github.actor == 'teh-hippo'))
|
|
11
|
+
if: github.actor == 'dependabot[bot]' || ((startsWith(github.event.pull_request.title, 'Bump to version ') || startsWith(github.event.pull_request.title, 'Update PNPM')) && (github.actor == 'github-actions' || github.actor == 'teh-hippo'))
|
|
12
12
|
steps:
|
|
13
13
|
- uses: peter-evans/enable-pull-request-automerge@v3
|
|
14
14
|
with:
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Build Homebridge 2.x
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
pull_request:
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '0 0 * * *'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: pnpm/action-setup@v4
|
|
20
|
+
- run: |
|
|
21
|
+
sed -i -e 's/"homebridge": "\^[0-9]\.[0-9]\.[0-9]/"homebridge": "^2.0.0-beta.0/g' package.json
|
|
22
|
+
- uses: actions/setup-node@v4.0.3
|
|
23
|
+
with:
|
|
24
|
+
node-version: latest
|
|
25
|
+
cache: pnpm
|
|
26
|
+
- run: pnpm install --no-frozen-lockfile
|
|
27
|
+
- name: Show Homebridge 2.0 Version
|
|
28
|
+
run: |
|
|
29
|
+
pnpm ls homebridge --parseable | grep -o '@\([^\/]\+\)'
|
|
30
|
+
- run: pnpm build
|
|
31
|
+
- run: pnpm lint
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
name: Build
|
|
5
5
|
|
|
6
|
-
on:
|
|
7
|
-
pull_request:
|
|
6
|
+
on: [pull_request]
|
|
8
7
|
|
|
9
8
|
jobs:
|
|
10
9
|
|
|
@@ -14,19 +13,16 @@ jobs:
|
|
|
14
13
|
|
|
15
14
|
strategy:
|
|
16
15
|
matrix:
|
|
17
|
-
node-version: [
|
|
16
|
+
node-version: [18.x, 20.x, 22.x, latest]
|
|
18
17
|
|
|
19
18
|
steps:
|
|
20
19
|
- uses: actions/checkout@v4
|
|
21
|
-
- uses:
|
|
22
|
-
name: Cache node modules
|
|
23
|
-
with:
|
|
24
|
-
path: node_modules
|
|
25
|
-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
20
|
+
- uses: pnpm/action-setup@v4
|
|
26
21
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
27
|
-
uses: actions/setup-node@v4.0.
|
|
22
|
+
uses: actions/setup-node@v4.0.3
|
|
28
23
|
with:
|
|
29
24
|
node-version: ${{ matrix.node-version }}
|
|
30
|
-
|
|
25
|
+
cache: pnpm
|
|
31
26
|
- run: pnpm install --frozen-lockfile
|
|
32
|
-
- run: pnpm lint
|
|
27
|
+
- run: pnpm lint
|
|
28
|
+
- run: pnpm build
|
|
@@ -6,7 +6,7 @@ name: Update PNPM
|
|
|
6
6
|
on:
|
|
7
7
|
|
|
8
8
|
schedule:
|
|
9
|
-
- cron: '
|
|
9
|
+
- cron: '37 13 1 * *'
|
|
10
10
|
workflow_dispatch:
|
|
11
11
|
|
|
12
12
|
permissions:
|
|
@@ -20,16 +20,11 @@ jobs:
|
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v4
|
|
23
|
-
- uses: actions/cache@v4
|
|
24
|
-
name: Cache node modules
|
|
25
|
-
with:
|
|
26
|
-
path: node_modules
|
|
27
|
-
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.json') }}
|
|
28
|
-
- name: Use Node.js 20.x
|
|
29
|
-
uses: actions/setup-node@v4.0.2
|
|
30
|
-
with:
|
|
31
|
-
node-version: 20.x
|
|
32
23
|
- uses: pnpm/action-setup@v4
|
|
24
|
+
- uses: actions/setup-node@v4.0.3
|
|
25
|
+
with:
|
|
26
|
+
node-version: latest
|
|
27
|
+
cache: pnpm
|
|
33
28
|
- run: corepack up
|
|
34
29
|
- name: Create Pull Request
|
|
35
30
|
uses: peter-evans/create-pull-request@v6
|
|
@@ -12,11 +12,12 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v4
|
|
15
|
-
- uses:
|
|
15
|
+
- uses: pnpm/action-setup@v4
|
|
16
|
+
- uses: actions/setup-node@v4.0.3
|
|
16
17
|
with:
|
|
17
|
-
node-version:
|
|
18
|
+
node-version: latest
|
|
19
|
+
cache: pnpm
|
|
18
20
|
registry-url: https://registry.npmjs.org/
|
|
19
|
-
- uses: pnpm/action-setup@v4
|
|
20
21
|
- run: pnpm install --frozen-lockfile
|
|
21
22
|
- run: pnpm build
|
|
22
23
|
- run: pnpm publish --no-git-checks
|
|
@@ -34,11 +35,12 @@ jobs:
|
|
|
34
35
|
with:
|
|
35
36
|
ref: main
|
|
36
37
|
fetch-tags: true
|
|
37
|
-
- uses:
|
|
38
|
+
- uses: pnpm/action-setup@v4
|
|
39
|
+
- uses: actions/setup-node@v4.0.3
|
|
38
40
|
with:
|
|
39
|
-
node-version:
|
|
41
|
+
node-version: latest
|
|
42
|
+
cache: pnpm
|
|
40
43
|
registry-url: https://registry.npmjs.org/
|
|
41
|
-
- uses: pnpm/action-setup@v4
|
|
42
44
|
- run: pnpm version patch --no-git-tag-version
|
|
43
45
|
- name: get-npm-version
|
|
44
46
|
id: version-after
|
package/README.md
CHANGED
|
@@ -42,3 +42,47 @@ Other example usages found since:
|
|
|
42
42
|
| `interval`| How often to decrement the brightness. | `60000` (1 minute) |
|
|
43
43
|
| `stateful`| Persist the timer state between restarts. | `false` |
|
|
44
44
|
| `occupancySensor`| Add an occupancy sensor that reflects the timer's current state. | `false` |
|
|
45
|
+
|
|
46
|
+
## Development
|
|
47
|
+
|
|
48
|
+
The below `config.json` can be placed in `~/.homebridge/config.json`, or extend local ones.
|
|
49
|
+
Then use `pnpm link; pnpm debug` to validate.
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"bridge": {
|
|
54
|
+
"pin": "123-45-679",
|
|
55
|
+
"port": 51761,
|
|
56
|
+
"name": "Homebridge Test",
|
|
57
|
+
"username": "0E:BD:3C:CC:A7:E1"
|
|
58
|
+
},
|
|
59
|
+
"accessories": [
|
|
60
|
+
{
|
|
61
|
+
"name": "Simple",
|
|
62
|
+
"interval": 5000,
|
|
63
|
+
"occupancySensor": false,
|
|
64
|
+
"accessory": "EggTimerBulb"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "Occupancy",
|
|
68
|
+
"interval": 1000,
|
|
69
|
+
"occupancySensor": true,
|
|
70
|
+
"accessory": "EggTimerBulb"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Stateful",
|
|
74
|
+
"interval": 10000,
|
|
75
|
+
"accessory": "EggTimerBulb",
|
|
76
|
+
"stateful": true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "StatefulOccupancy",
|
|
80
|
+
"interval": 1000,
|
|
81
|
+
"occupancySensor": true,
|
|
82
|
+
"accessory": "EggTimerBulb",
|
|
83
|
+
"stateful": true
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-eggtimer-plugin",
|
|
3
3
|
"displayName": "Homebridge Eggtimer Plugin",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.34",
|
|
5
5
|
"description": "Egg Timers for Homebridge: https://github.com/nfarina/homebridge",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
"main": "dist/accessory.js",
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=16.0.0",
|
|
32
|
-
"homebridge": ">=1.3.5"
|
|
32
|
+
"homebridge": ">=1.3.5 || ^2.0.0-beta.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@stylistic/eslint-plugin": "^2.1.0",
|
|
36
36
|
"@types/async-lock": "^1.4.2",
|
|
37
|
-
"@types/node": "^
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
38
|
"@types/node-persist": "^3.1.8",
|
|
39
|
-
"eslint": "^
|
|
39
|
+
"eslint": "^9.9.0",
|
|
40
40
|
"homebridge": "^1.8.2",
|
|
41
|
-
"rimraf": "^
|
|
41
|
+
"rimraf": "^6.0.1",
|
|
42
42
|
"ts-node": "^10.9.2",
|
|
43
43
|
"typescript": "^5.4.5",
|
|
44
|
-
"typescript-eslint": "^
|
|
44
|
+
"typescript-eslint": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"async-lock": "^1.4.1",
|
|
48
48
|
"node-persist": "^4.0.1"
|
|
49
49
|
},
|
|
50
|
-
"packageManager": "pnpm@8.15.
|
|
50
|
+
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
|
|
51
51
|
"scripts": {
|
|
52
52
|
"lint": "eslint src",
|
|
53
53
|
"lintAndFix": "eslint --fix src",
|