@homebridge-plugins/homebridge-august 3.0.11 → 3.1.1

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.
Files changed (64) hide show
  1. package/.github/workflows/release.yml +79 -31
  2. package/CHANGELOG.md +149 -868
  3. package/config.schema.json +8 -1
  4. package/dist/devices/device.d.ts.map +1 -1
  5. package/dist/devices/device.js +4 -3
  6. package/dist/devices/device.js.map +1 -1
  7. package/dist/devices/lock.js +2 -2
  8. package/dist/devices/lock.js.map +1 -1
  9. package/dist/homebridge-ui/server.js.map +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +15 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/package.json +83 -0
  14. package/dist/platform.d.ts +2 -3
  15. package/dist/platform.d.ts.map +1 -1
  16. package/dist/platform.js +10 -10
  17. package/dist/platform.js.map +1 -1
  18. package/dist/platform.matter.d.ts +96 -0
  19. package/dist/platform.matter.d.ts.map +1 -0
  20. package/dist/platform.matter.js +331 -0
  21. package/dist/platform.matter.js.map +1 -0
  22. package/dist/settings.d.ts +5 -4
  23. package/dist/settings.d.ts.map +1 -1
  24. package/docs/assets/icons.js +1 -1
  25. package/docs/assets/icons.svg +1 -1
  26. package/docs/assets/main.js +5 -5
  27. package/docs/assets/navigation.js +1 -0
  28. package/docs/assets/search.js +1 -0
  29. package/docs/assets/style.css +248 -226
  30. package/docs/hierarchy.html +1 -0
  31. package/docs/index.html +17 -13
  32. package/docs/modules.html +1 -2
  33. package/docs/variables/default.html +1 -0
  34. package/eslint.config.js +6 -9
  35. package/package.json +22 -30
  36. package/typedoc.json +1 -5
  37. package/vitest.config.ts +7 -0
  38. package/.github/workflows/beta-release.yml +0 -55
  39. package/dist/devices/device.test.d.ts +0 -2
  40. package/dist/devices/device.test.d.ts.map +0 -1
  41. package/dist/devices/device.test.js +0 -281
  42. package/dist/devices/device.test.js.map +0 -1
  43. package/dist/devices/lock.test.d.ts +0 -2
  44. package/dist/devices/lock.test.d.ts.map +0 -1
  45. package/dist/devices/lock.test.js +0 -265
  46. package/dist/devices/lock.test.js.map +0 -1
  47. package/dist/index.test.d.ts +0 -2
  48. package/dist/index.test.d.ts.map +0 -1
  49. package/dist/index.test.js +0 -14
  50. package/dist/index.test.js.map +0 -1
  51. package/dist/platform.test.d.ts +0 -2
  52. package/dist/platform.test.d.ts.map +0 -1
  53. package/dist/platform.test.js +0 -516
  54. package/dist/platform.test.js.map +0 -1
  55. package/dist/settings.test.d.ts +0 -2
  56. package/dist/settings.test.d.ts.map +0 -1
  57. package/dist/settings.test.js +0 -127
  58. package/dist/settings.test.js.map +0 -1
  59. package/docs/assets/dmt/dmt-component-data.js +0 -1
  60. package/docs/assets/dmt/dmt-components.css +0 -20
  61. package/docs/assets/dmt/dmt-components.js +0 -67
  62. package/docs/assets/dmt/dmt-search.cmp +0 -0
  63. package/docs/assets/dmt/dmt-theme.css +0 -1
  64. package/docs/functions/default.html +0 -2
@@ -1,30 +1,89 @@
1
- name: Unified Release
1
+ name: Release
2
2
 
3
3
  on:
4
4
  push:
5
5
  branches:
6
- #- "alpha-*"
7
- #- "beta-*"
8
- - latest
6
+ - 'beta-*'
7
+ - 'beta'
8
+ - 'latest'
9
9
  workflow_dispatch:
10
10
 
11
+ # Cancel any in-progress workflow for the same branch. A new push should
12
+ # supersede the previous run rather than racing it to publish.
13
+ concurrency:
14
+ group: release-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
11
17
  jobs:
12
- # 1️⃣ Determine release type, ESM status, and branch name
18
+ # ─── QUALITY GATE (all branches) ────────────────────────────────────────────
19
+ # Build and test run for EVERY push, regardless of branch. Both the beta
20
+ # and stable release paths depend on these passing before anything is
21
+ # published or version-bumped.
22
+
23
+ # 1️⃣ Build and test
24
+ build_and_test:
25
+ uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
26
+ with:
27
+ enable_coverage: false
28
+ secrets:
29
+ token: ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ # 2️⃣ Lint
32
+ lint:
33
+ needs: build_and_test
34
+ uses: homebridge/.github/.github/workflows/eslint.yml@latest
35
+
36
+
37
+ # ─── BETA RELEASE (branches starting with "beta") ────────────────────────────
38
+
39
+ # 3️⃣ Publish beta to NPM (OIDC — id-token required here and in the reusable workflow)
40
+ beta-publish:
41
+ if: startsWith(github.ref_name, 'beta')
42
+ needs: lint
43
+ permissions:
44
+ id-token: write
45
+ uses: homebridge/.github/.github/workflows/npm-publish-esm-oidc.yml@latest
46
+ with:
47
+ tag: 'beta'
48
+ dynamically_adjust_version: true
49
+ npm_version_command: 'pre'
50
+ pre_id: 'beta'
51
+
52
+ # 4️⃣ Create GitHub pre-release
53
+ beta-pre-release:
54
+ if: startsWith(github.ref_name, 'beta')
55
+ needs: beta-publish
56
+ uses: homebridge/.github/.github/workflows/pre-release.yml@latest
57
+ with:
58
+ npm_version: ${{ needs.beta-publish.outputs.NPM_VERSION }}
59
+ body: |
60
+ **Beta Release**
61
+ **Version**: v${{ needs.beta-publish.outputs.NPM_VERSION }}
62
+ [How To Test Beta Releases](https://github.com/homebridge-plugins/homebridge-august/wiki/Beta-Version)
63
+
64
+
65
+ # ─── STABLE RELEASE (branch: "latest") ───────────────────────────────────────
66
+
67
+ # 3️⃣ Determine release type, ESM status, and branch name
13
68
  determine-release-type:
69
+ if: github.ref_name == 'latest'
70
+ needs: lint
14
71
  uses: homebridge/.github/.github/workflows/determine-release-type.yml@latest
15
72
  with:
16
73
  ref_name: ${{ github.ref_name }}
17
74
 
18
- # 2️⃣ Update version and changelog using the scripts
75
+ # 4️⃣ Update version and changelog using the scripts
19
76
  update-version:
77
+ if: github.ref_name == 'latest'
20
78
  needs: determine-release-type
21
79
  uses: homebridge/.github/.github/workflows/update-version.yml@latest
22
80
  with:
23
81
  release_type: ${{ needs.determine-release-type.outputs.release_type }}
24
82
  is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
25
83
 
26
- # 3️⃣ Publish to NPM and create GitHub release
84
+ # 5️⃣ Publish to NPM and create GitHub release (OIDC — id-token required here and in the reusable workflow)
27
85
  publish-release:
86
+ if: github.ref_name == 'latest'
28
87
  needs: [determine-release-type, update-version]
29
88
  permissions:
30
89
  id-token: write
@@ -37,47 +96,36 @@ jobs:
37
96
  secrets:
38
97
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39
98
 
40
- # 4️⃣ Promote branch if this is a prerelease (alpha/beta)
99
+ # 6️⃣ Promote branch if this is a prerelease (alpha/beta)
41
100
  promote-branch:
101
+ if: ${{ github.ref_name == 'latest' && needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }}
42
102
  needs: [determine-release-type, publish-release]
43
- if: ${{ needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }}
44
103
  uses: homebridge/.github/.github/workflows/promote-branch.yml@latest
45
104
  with:
46
105
  branch_name: ${{ needs.determine-release-type.outputs.branch_name }}
47
106
  release_type: ${{ needs.determine-release-type.outputs.release_type }}
48
107
  is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
49
108
 
50
- # 5️⃣ Notify if any previous job fails
109
+ # 7️⃣ Notify if any job fails
51
110
  workflow-failure:
52
- if: ${{ failure() }}
53
- needs: [determine-release-type, update-version, publish-release, promote-branch]
111
+ if: failure()
112
+ needs: [build_and_test, lint, determine-release-type, update-version, publish-release, promote-branch]
54
113
  uses: homebridge/.github/.github/workflows/report-failure.yml@latest
55
114
  with:
56
115
  workflow_name: ${{ github.workflow }}
57
116
  job_name: ${{ github.job }}
58
117
  run_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
59
118
 
60
- # 6️⃣ Sync GitHub Release body from CHANGELOG.md
61
- sync-github-release:
62
- name: Sync GitHub Release (reusable)
63
- needs: [determine-release-type, update-version, publish-release]
64
- uses: homebridge/.github/.github/workflows/sync-github-release.yml@latest
65
- with:
66
- version: ${{ needs.update-version.outputs.version }}
67
- changelog_path: CHANGELOG.md
68
- tag_prefix: v
69
- secrets:
70
- repo_token: ${{ secrets.GITHUB_TOKEN }}
71
-
72
- # 7️⃣ Post to Discord
73
- github-releases-to-discord:
74
- name: Discord Webhooks
75
- needs: [determine-release-type, update-version, publish-release, sync-github-release]
119
+ # 8️⃣ Post to Discord (Beta + Stable)
120
+ discord:
121
+ name: Release Notifications
122
+ if: ${{ always() && ((startsWith(github.ref_name, 'beta') && needs.beta-publish.result == 'success') || (github.ref_name == 'latest' && needs.publish-release.result == 'success')) }}
123
+ needs: [beta-publish, update-version, publish-release]
76
124
  uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
77
125
  with:
78
- title: "August Release"
126
+ title: ${{ startsWith(github.ref_name, 'beta') && 'Homebridge August Beta Release' || 'Homebridge August Release' }}
79
127
  description: |
80
- Version `v${{ needs.update-version.outputs.version }}`
81
- url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ needs.update-version.outputs.version }}"
128
+ Version `v${{ startsWith(github.ref_name, 'beta') && needs.beta-publish.outputs.NPM_VERSION || needs.update-version.outputs.version }}`
129
+ url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ startsWith(github.ref_name, 'beta') && needs.beta-publish.outputs.NPM_VERSION || needs.update-version.outputs.version }}"
82
130
  secrets:
83
131
  DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}