@homebridge-plugins/homebridge-august 3.0.4-beta.4 → 3.0.4
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/scripts/npm-version-script-esm-auto.js +207 -0
- package/.github/workflows/beta-release.yml +1 -1
- package/.github/workflows/release.yml +14 -7
- package/README.md +0 -25
- package/config.schema.json +1 -1
- package/dist/devices/device.d.ts +3 -1
- package/dist/devices/device.d.ts.map +1 -1
- package/dist/devices/device.js +27 -2
- package/dist/devices/device.js.map +1 -1
- package/dist/devices/device.test.js +89 -0
- package/dist/devices/device.test.js.map +1 -1
- package/dist/devices/lock.d.ts.map +1 -1
- package/dist/devices/lock.js +1 -2
- package/dist/devices/lock.js.map +1 -1
- package/dist/devices/lock.test.js +0 -43
- package/dist/devices/lock.test.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +3 -4
- package/dist/platform.js.map +1 -1
- package/dist/platform.test.js +0 -122
- package/dist/platform.test.js.map +1 -1
- package/docs/assets/highlight.css +0 -35
- package/docs/functions/default.html +1 -1
- package/docs/index.html +1 -7
- package/package.json +2 -2
- package/.github/npm-version-script-esm.js +0 -97
package/docs/index.html
CHANGED
|
@@ -36,11 +36,5 @@ plugin allows you to access your <a href="https://august.com">August</a> & <
|
|
|
36
36
|
<li>Yale Assure Lock 2 (YDR410)</li>
|
|
37
37
|
<li>Yale Assure Lock SL (YDR256)</li>
|
|
38
38
|
</ul>
|
|
39
|
-
<a id="troubleshooting" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Troubleshooting<a href="#troubleshooting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="lock-is-detected-but-doesnt-appear-in-homekit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Lock is detected but doesn't appear in HomeKit<a href="#lock-is-detected-but-doesnt-appear-in-homekit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3><p>If you see "Total August Locks Found: 1" in the logs but your lock doesn't appear in HomeKit, it's likely because your August lock already has HomeKit enabled. Pro models often have this enabled by default.</p>
|
|
40
|
-
<p><strong>Solution:</strong> Add the following to your device configuration:</p>
|
|
41
|
-
<pre><code class="json"><span class="hl-0">{</span><br><span class="hl-0"> </span><span class="hl-1">"name"</span><span class="hl-0">: </span><span class="hl-2">"August"</span><span class="hl-0">,</span><br><span class="hl-0"> </span><span class="hl-1">"platform"</span><span class="hl-0">: </span><span class="hl-2">"August"</span><span class="hl-0">,</span><br><span class="hl-0"> </span><span class="hl-1">"credentials"</span><span class="hl-0">: { </span><span class="hl-3">...</span><span class="hl-0"> },</span><br><span class="hl-0"> </span><span class="hl-1">"options"</span><span class="hl-0">: {</span><br><span class="hl-0"> </span><span class="hl-1">"devices"</span><span class="hl-0">: [</span><br><span class="hl-0"> {</span><br><span class="hl-0"> </span><span class="hl-1">"lockId"</span><span class="hl-0">: </span><span class="hl-2">"YOUR_LOCK_ID"</span><span class="hl-0">,</span><br><span class="hl-0"> </span><span class="hl-1">"overrideHomeKitEnabled"</span><span class="hl-0">: </span><span class="hl-4">true</span><br><span class="hl-0"> }</span><br><span class="hl-0"> ]</span><br><span class="hl-0"> }</span><br><span class="hl-0">}</span>
|
|
42
|
-
</code><button type="button">Copy</button></pre>
|
|
43
|
-
|
|
44
|
-
<p>You can find your lock ID in the Homebridge logs.</p>
|
|
45
39
|
<a id="thanks" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Thanks<a href="#thanks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Thank you to <a href="https://github.com/hufftheweevil">hufftheweevil</a> for the <a href="https://github.com/hufftheweevil/august-api">august-api</a> module.</p>
|
|
46
|
-
</div></div><div class="col-sidebar" tabindex="-1"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked=""><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open="" class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details" tabindex="-1"><a href="#homebridge-august"><span>Homebridge <wbr>August</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#configuration"><span>Configuration</span></a></li><li><a href="#supported-august-devices"><span>Supported <wbr>August <wbr>Devices</span></a></li><li><a href="#
|
|
40
|
+
</div></div><div class="col-sidebar" tabindex="-1"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked=""><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open="" class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details" tabindex="-1"><a href="#homebridge-august"><span>Homebridge <wbr>August</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#configuration"><span>Configuration</span></a></li><li><a href="#supported-august-devices"><span>Supported <wbr>August <wbr>Devices</span></a></li><li><a href="#thanks"><span>Thanks</span></a></li></ul></div></details></div><div class="site-menu" tabindex="-1"><nav class="tsd-navigation"><a href="modules.html">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"></ul></nav></div></div></div></main></body></html>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@homebridge-plugins/homebridge-august",
|
|
3
3
|
"displayName": "August",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "3.0.4
|
|
5
|
+
"version": "3.0.4",
|
|
6
6
|
"description": "The August plugin allows you to access your August & Yale device(s) from HomeKit.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "donavanbecker",
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
"typescript": "^5.8.2",
|
|
89
89
|
"vitest": "^3.0.7"
|
|
90
90
|
}
|
|
91
|
-
}
|
|
91
|
+
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This scripts queries the npm registry to pull out the latest version for a given tag.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import assert from 'node:assert'
|
|
8
|
-
import child_process from 'node:child_process'
|
|
9
|
-
import fs from 'node:fs'
|
|
10
|
-
import process from 'node:process'
|
|
11
|
-
|
|
12
|
-
const BRANCH_VERSION_PATTERN = /^([A-Z]+)-(\d+\.\d+\.\d+)$/i
|
|
13
|
-
|
|
14
|
-
// Load the contents of the package.json file
|
|
15
|
-
const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
|
16
|
-
|
|
17
|
-
const refArgument = process.argv[2]
|
|
18
|
-
const tagArgument = process.argv[3] || 'latest'
|
|
19
|
-
|
|
20
|
-
if (!refArgument) {
|
|
21
|
-
console.error('ref argument is missing')
|
|
22
|
-
console.error('Usage: npm-version-script-esm.js <ref> [tag]')
|
|
23
|
-
process.exit(1)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Queries the NPM registry for the latest version for the provided base version and tag.
|
|
28
|
-
* If the tag is latest, then the base version is returned if it exists. For other tags, the latest
|
|
29
|
-
* version found for that base version and tag is returned.
|
|
30
|
-
* @param baseVersion The base version to query for, e.g. 2.0.0
|
|
31
|
-
* @param tag The tag to query for, e.g. beta or latest
|
|
32
|
-
* @returns {string} Returns the version, or '' if not found
|
|
33
|
-
*/
|
|
34
|
-
function getTagVersionFromNpm(baseVersion, tag) {
|
|
35
|
-
try {
|
|
36
|
-
return JSON.parse(child_process.execSync(`npm info ${packageJSON.name} versions --json`).toString('utf8').trim())
|
|
37
|
-
.filter(v => tag === 'latest' ? v === baseVersion : v.startsWith(`${baseVersion}-${tag}.`)) // find all published versions for this base version and tag
|
|
38
|
-
.reduce((_, current) => current, '') // choose the last as they're sorted in ascending order, or '' if there are none
|
|
39
|
-
} catch (e) {
|
|
40
|
-
console.error(`Failed to query the npm registry for the latest version for tag: ${tag}`, e)
|
|
41
|
-
// throw e;
|
|
42
|
-
return ''
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function desiredTargetVersion(ref) {
|
|
47
|
-
// ref is a GitHub action ref string
|
|
48
|
-
if (ref.startsWith('refs/pull/')) {
|
|
49
|
-
throw new Error('The version script was executed inside a PR!')
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
assert(ref.startsWith('refs/heads/'))
|
|
53
|
-
const branchName = ref.slice('refs/heads/'.length)
|
|
54
|
-
|
|
55
|
-
const results = branchName.match(BRANCH_VERSION_PATTERN)
|
|
56
|
-
if (results !== null) {
|
|
57
|
-
if (results[1] !== tagArgument) {
|
|
58
|
-
console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return results[2]
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
throw new Error(`Malformed branch name for ref: ${ref}. Can't derive the base version. Use a branch name like: beta-x.x.x or alpha-x.x.x`)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// derive the base version from the branch ref
|
|
68
|
-
const baseVersion = desiredTargetVersion(refArgument)
|
|
69
|
-
|
|
70
|
-
// query the npm registry for the latest version of the provided tag name
|
|
71
|
-
const latestReleasedVersion = getTagVersionFromNpm(baseVersion, tagArgument) // e.g. 0.7.0-beta.12
|
|
72
|
-
|
|
73
|
-
let publishTag
|
|
74
|
-
|
|
75
|
-
if (latestReleasedVersion) {
|
|
76
|
-
console.warn(`Latest published version for ${baseVersion} with tag ${tagArgument} is ${latestReleasedVersion}`)
|
|
77
|
-
publishTag = latestReleasedVersion // set this released beta or alpha to be incremented
|
|
78
|
-
} else {
|
|
79
|
-
console.warn(`No published versions for ${baseVersion} with tag ${tagArgument}`)
|
|
80
|
-
publishTag = baseVersion // start off with a new beta or alpha version
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (packageJSON.version !== publishTag) {
|
|
84
|
-
// report the change for CI
|
|
85
|
-
console.warn(`Changing version in package.json from ${packageJSON.version} to ${publishTag}`)
|
|
86
|
-
|
|
87
|
-
// save the package.json
|
|
88
|
-
packageJSON.version = publishTag
|
|
89
|
-
fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2))
|
|
90
|
-
|
|
91
|
-
// perform the same change to the package-lock.json
|
|
92
|
-
const packageLockJSON = JSON.parse(fs.readFileSync('package-lock.json', 'utf8'))
|
|
93
|
-
packageLockJSON.version = publishTag
|
|
94
|
-
fs.writeFileSync('package-lock.json', JSON.stringify(packageLockJSON, null, 2))
|
|
95
|
-
} else {
|
|
96
|
-
console.warn(`Leaving version in package.json at ${packageJSON.version}`)
|
|
97
|
-
}
|