@homebridge-plugins/homebridge-august 3.2.3 → 3.3.0-beta.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 (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CLAUDE.md +48 -0
  3. package/README.md +39 -27
  4. package/config.schema.json +47 -3
  5. package/dist/Platform.HAP.d.ts.map +1 -1
  6. package/dist/Platform.HAP.js +1 -2
  7. package/dist/Platform.HAP.js.map +1 -1
  8. package/dist/connectivity-manager.d.ts.map +1 -1
  9. package/dist/connectivity-manager.js.map +1 -1
  10. package/dist/platform.matter.d.ts +6 -0
  11. package/dist/platform.matter.d.ts.map +1 -1
  12. package/dist/platform.matter.js +15 -2
  13. package/dist/platform.matter.js.map +1 -1
  14. package/dist/settings.d.ts +1 -0
  15. package/dist/settings.d.ts.map +1 -1
  16. package/package.json +37 -31
  17. package/test/connectivity-manager.test.ts +25 -23
  18. package/.github/FUNDING.yml +0 -4
  19. package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -97
  20. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  21. package/.github/ISSUE_TEMPLATE/feature-request.yml +0 -38
  22. package/.github/ISSUE_TEMPLATE/support-request.yml +0 -85
  23. package/.github/ISSUE_TEMPLATE.md +0 -48
  24. package/.github/PULL_REQUEST_TEMPLATE/pull_request.md +0 -27
  25. package/.github/copilot-instructions.md +0 -200
  26. package/.github/dependabot.yml +0 -17
  27. package/.github/labeler.yml +0 -38
  28. package/.github/scripts/compute-version-override.cjs +0 -51
  29. package/.github/scripts/normalize-changelog-header.cjs +0 -86
  30. package/.github/scripts/npm-version-script-esm-auto.js +0 -201
  31. package/.github/scripts/resolve-version-bump-esm.js +0 -118
  32. package/.github/workflows/release.yml +0 -169
  33. package/.github/workflows/stale.yml +0 -12
  34. package/SECURITY.md +0 -19
  35. package/branding/Homebridge_x_August.svg +0 -32
  36. package/branding/icon.png +0 -0
  37. package/dist/package.json +0 -84
  38. package/docs/.nojekyll +0 -1
  39. package/docs/assets/hierarchy.js +0 -1
  40. package/docs/assets/highlight.css +0 -22
  41. package/docs/assets/icons.js +0 -18
  42. package/docs/assets/icons.svg +0 -1
  43. package/docs/assets/main.js +0 -60
  44. package/docs/assets/navigation.js +0 -1
  45. package/docs/assets/search.js +0 -1
  46. package/docs/assets/style.css +0 -1633
  47. package/docs/hierarchy.html +0 -1
  48. package/docs/index.html +0 -44
  49. package/docs/modules.html +0 -1
  50. package/docs/variables/default.html +0 -1
  51. package/eslint.config.js +0 -47
  52. package/vitest.config.ts +0 -8
@@ -1,118 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'node:fs'
4
- import https from 'node:https'
5
- import process from 'node:process'
6
-
7
- const allowed = new Set(['major', 'minor', 'patch'])
8
-
9
- function setOutput(name, value) {
10
- if (process.env.GITHUB_OUTPUT) {
11
- fs.appendFileSync(process.env.GITHUB_OUTPUT, `${name}=${value}\n`)
12
- }
13
- console.log(`${name}=${value}`)
14
- }
15
-
16
- function resolveFromLabels(labels) {
17
- const majorLabels = new Set(['major', 'semver:major', 'release:major', 'breaking', 'breaking-change'])
18
- const minorLabels = new Set(['minor', 'semver:minor', 'release:minor', 'feature'])
19
- const patchLabels = new Set(['patch', 'semver:patch', 'release:patch', 'fix'])
20
-
21
- if (labels.some(label => majorLabels.has(label))) return 'major'
22
- if (labels.some(label => minorLabels.has(label))) return 'minor'
23
- if (labels.some(label => patchLabels.has(label))) return 'patch'
24
- return 'patch'
25
- }
26
-
27
- function listPrsForCommit(owner, repo, sha, token) {
28
- return new Promise((resolve, reject) => {
29
- const path = `/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/commits/${sha}/pulls`
30
- const req = https.request(
31
- {
32
- hostname: 'api.github.com',
33
- method: 'GET',
34
- path,
35
- headers: {
36
- Accept: 'application/vnd.github+json',
37
- Authorization: `Bearer ${token}`,
38
- 'User-Agent': 'homebridge-resolve-version-bump',
39
- 'X-GitHub-Api-Version': '2022-11-28',
40
- },
41
- },
42
- (res) => {
43
- let body = ''
44
- res.setEncoding('utf8')
45
- res.on('data', (chunk) => {
46
- body += chunk
47
- })
48
- res.on('end', () => {
49
- if (res.statusCode < 200 || res.statusCode >= 300) {
50
- reject(new Error(`GitHub API request failed (${res.statusCode}): ${body}`))
51
- return
52
- }
53
- try {
54
- const parsed = JSON.parse(body)
55
- resolve(Array.isArray(parsed) ? parsed : [])
56
- } catch (error) {
57
- reject(new Error(`Failed to parse GitHub API response: ${error.message}`))
58
- }
59
- })
60
- },
61
- )
62
-
63
- req.on('error', reject)
64
- req.end()
65
- })
66
- }
67
-
68
- async function main() {
69
- const manualInput = (process.argv[2] || '').trim().toLowerCase()
70
- if (manualInput) {
71
- if (!allowed.has(manualInput)) {
72
- console.error(`Invalid version bump '${manualInput}'. Use major, minor, or patch.`)
73
- process.exit(1)
74
- }
75
- console.error(`Using manual version bump input: ${manualInput}`)
76
- setOutput('version_bump', manualInput)
77
- return
78
- }
79
-
80
- const repository = process.env.GITHUB_REPOSITORY || ''
81
- const sha = process.env.GITHUB_SHA || ''
82
- const token = process.env.GITHUB_TOKEN || ''
83
-
84
- if (!repository || !sha || !token || !repository.includes('/')) {
85
- console.error('Missing GITHUB_REPOSITORY, GITHUB_SHA, or GITHUB_TOKEN. Defaulting to patch.')
86
- setOutput('version_bump', 'patch')
87
- return
88
- }
89
-
90
- const [owner, repo] = repository.split('/')
91
-
92
- try {
93
- const prs = await listPrsForCommit(owner, repo, sha, token)
94
- const pr = prs.find((candidate) => candidate.merged_at) || prs[0]
95
-
96
- if (!pr) {
97
- console.error('No PR associated with commit; defaulting to patch.')
98
- setOutput('version_bump', 'patch')
99
- return
100
- }
101
-
102
- const labels = (pr.labels || [])
103
- .map((label) => (typeof label === 'string' ? label : label.name || ''))
104
- .map((label) => label.toLowerCase())
105
-
106
- const bump = resolveFromLabels(labels)
107
- console.error(`Resolved bump '${bump}' from PR #${pr.number} labels: ${labels.join(', ') || '(none)'}`)
108
- setOutput('version_bump', bump)
109
- } catch (error) {
110
- console.error(`Failed to inspect PR labels, defaulting to patch: ${error.message}`)
111
- setOutput('version_bump', 'patch')
112
- }
113
- }
114
-
115
- main().catch((error) => {
116
- console.error(error)
117
- process.exit(1)
118
- })
@@ -1,169 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - 'beta-*'
7
- - 'beta'
8
- - 'latest'
9
- workflow_dispatch:
10
- inputs:
11
- release_type:
12
- description: Release channel
13
- required: true
14
- type: choice
15
- options:
16
- - latest
17
- - beta
18
- - alpha
19
- default: latest
20
- is_esm:
21
- description: Package is ESM
22
- required: true
23
- type: boolean
24
- default: true
25
- version_override:
26
- description: Exact version (for example 2.1.0). Leave empty for auto bump.
27
- required: false
28
- type: string
29
- version_bump:
30
- description: Auto bump type when version_override is empty
31
- required: false
32
- type: choice
33
- options:
34
- - patch
35
- - minor
36
- - major
37
- default: patch
38
- max_attempts:
39
- description: Max retries for prerelease collision handling
40
- required: false
41
- type: number
42
- default: 5
43
-
44
- # Cancel any in-progress workflow for the same branch. A new push should
45
- # supersede the previous run rather than racing it to publish.
46
- concurrency:
47
- group: release-${{ github.ref }}
48
- cancel-in-progress: true
49
-
50
- jobs:
51
- # ─── QUALITY GATE (all branches) ────────────────────────────────────────────
52
- # Build and test run for EVERY push, regardless of branch. Both the beta
53
- # and stable release paths depend on these passing before anything is
54
- # published or version-bumped.
55
-
56
- # 1️⃣ Build and test
57
- build_and_test:
58
- uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
59
- with:
60
- enable_coverage: false
61
- secrets:
62
- token: ${{ secrets.GITHUB_TOKEN }}
63
-
64
- # 2️⃣ Lint
65
- lint:
66
- needs: build_and_test
67
- uses: homebridge/.github/.github/workflows/eslint.yml@latest
68
-
69
-
70
- # ─── BETA RELEASE (branches starting with "beta") ────────────────────────────
71
-
72
- # 3️⃣ Publish beta to NPM (OIDC — id-token required here and in the reusable workflow)
73
- beta-publish:
74
- if: startsWith(github.ref_name, 'beta')
75
- needs: lint
76
- permissions:
77
- id-token: write
78
- uses: homebridge/.github/.github/workflows/npm-publish-esm-oidc.yml@latest
79
- with:
80
- tag: 'beta'
81
- dynamically_adjust_version: true
82
- npm_version_command: 'pre'
83
- pre_id: 'beta'
84
-
85
- # 4️⃣ Create GitHub pre-release
86
- beta-pre-release:
87
- if: startsWith(github.ref_name, 'beta')
88
- needs: beta-publish
89
- uses: homebridge/.github/.github/workflows/pre-release.yml@latest
90
- with:
91
- npm_version: ${{ needs.beta-publish.outputs.NPM_VERSION }}
92
- body: |
93
- **Beta Release**
94
- **Version**: v${{ needs.beta-publish.outputs.NPM_VERSION }}
95
- [How To Test Beta Releases](https://github.com/homebridge-plugins/homebridge-august/wiki/Beta-Version)
96
-
97
-
98
- # ─── STABLE RELEASE (branch: "latest") ───────────────────────────────────────
99
-
100
- # 3️⃣ Determine release type, ESM status, and branch name
101
- determine-release-type:
102
- if: github.ref_name == 'latest'
103
- needs: lint
104
- uses: homebridge/.github/.github/workflows/determine-release-type.yml@latest
105
- with:
106
- ref_name: ${{ github.ref_name }}
107
-
108
- # 4️⃣ Update version and changelog using the scripts
109
- update-version:
110
- if: github.ref_name == 'latest'
111
- needs: determine-release-type
112
- uses: homebridge/.github/.github/workflows/update-version.yml@latest
113
- with:
114
- release_type: ${{ needs.determine-release-type.outputs.release_type || inputs.release_type }}
115
- is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' || inputs.is_esm == 'true' }}
116
- version_override: ${{ inputs.version_override }}
117
- version_bump: ${{ inputs.version_bump }}
118
-
119
- # 5️⃣ Publish to NPM and create GitHub release (OIDC — id-token required here and in the reusable workflow)
120
- publish-release:
121
- if: github.ref_name == 'latest'
122
- needs: [determine-release-type, update-version]
123
- permissions:
124
- id-token: write
125
- contents: write
126
- uses: homebridge/.github/.github/workflows/publish-release.yml@latest
127
- with:
128
- release_type: ${{ needs.determine-release-type.outputs.release_type }}
129
- version: ${{ needs.update-version.outputs.version }}
130
- is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
131
- version_override: ${{ inputs.version_override || '' }}
132
- version_bump: ${{ inputs.version_bump || 'patch' }}
133
- max_attempts: ${{ inputs.max_attempts || 5 }}
134
- secrets:
135
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
136
-
137
- # 6️⃣ Promote branch if this is a prerelease (alpha/beta)
138
- promote-branch:
139
- if: ${{ github.ref_name == 'latest' && needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }}
140
- needs: [determine-release-type, publish-release]
141
- uses: homebridge/.github/.github/workflows/promote-branch.yml@latest
142
- with:
143
- branch_name: ${{ needs.determine-release-type.outputs.branch_name }}
144
- release_type: ${{ needs.determine-release-type.outputs.release_type }}
145
- is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' || inputs.is_esm == 'true' }}
146
-
147
- # 7️⃣ Notify if any job fails
148
- workflow-failure:
149
- if: failure()
150
- needs: [build_and_test, lint, determine-release-type, update-version, publish-release, promote-branch]
151
- uses: homebridge/.github/.github/workflows/report-failure.yml@latest
152
- with:
153
- workflow_name: ${{ github.workflow }}
154
- job_name: ${{ github.job }}
155
- run_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
156
-
157
- # 8️⃣ Post to Discord (Beta + Stable)
158
- discord:
159
- name: Release Notifications
160
- if: ${{ always() && ((startsWith(github.ref_name, 'beta') && needs.beta-publish.result == 'success') || (github.ref_name == 'latest' && needs.publish-release.result == 'success')) }}
161
- needs: [beta-publish, update-version, publish-release]
162
- uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
163
- with:
164
- title: ${{ startsWith(github.ref_name, 'beta') && 'Homebridge August Beta Release' || 'Homebridge August Release' }}
165
- description: |
166
- Version `v${{ startsWith(github.ref_name, 'beta') && needs.beta-publish.outputs.NPM_VERSION || needs.update-version.outputs.version }}`
167
- 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 }}"
168
- secrets:
169
- DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
@@ -1,12 +0,0 @@
1
- name: Stale workflow
2
-
3
- on:
4
- workflow_dispatch:
5
- schedule:
6
- - cron: '45 11 * * *'
7
-
8
- jobs:
9
- stale:
10
- uses: homebridge/.github/.github/workflows/stale.yml@latest
11
- secrets:
12
- token: ${{ secrets.GITHUB_TOKEN }}
package/SECURITY.md DELETED
@@ -1,19 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- Use this section to tell people about which versions of your project are
6
- currently being supported with security updates.
7
-
8
- | Version | Supported |
9
- | ------- | ------------------ |
10
- | 1.0.0 | :white_check_mark: |
11
- | < 0.0.0 | :x: |
12
-
13
- ## Reporting a Vulnerability
14
-
15
- Use this section to tell people how to report a vulnerability.
16
-
17
- Tell them where to go, how often they can expect to get an update on a
18
- reported vulnerability, what to expect if the vulnerability is accepted or
19
- declined, etc.