@homebridge-plugins/homebridge-august 3.0.10 → 3.1.0

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 (56) hide show
  1. package/.github/workflows/release.yml +64 -27
  2. package/CHANGELOG.md +149 -771
  3. package/config.schema.json +8 -1
  4. package/dist/devices/device.js +1 -1
  5. package/dist/devices/device.js.map +1 -1
  6. package/dist/devices/device.test.js +1 -1
  7. package/dist/devices/device.test.js.map +1 -1
  8. package/dist/devices/lock.test.js +27 -0
  9. package/dist/devices/lock.test.js.map +1 -1
  10. package/dist/homebridge-ui/server.js.map +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +15 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.test.js +86 -3
  15. package/dist/index.test.js.map +1 -1
  16. package/dist/package.json +84 -0
  17. package/dist/platform.d.ts +9 -2
  18. package/dist/platform.d.ts.map +1 -1
  19. package/dist/platform.js +36 -11
  20. package/dist/platform.js.map +1 -1
  21. package/dist/platform.matter.d.ts +51 -0
  22. package/dist/platform.matter.d.ts.map +1 -0
  23. package/dist/platform.matter.js +276 -0
  24. package/dist/platform.matter.js.map +1 -0
  25. package/dist/platform.matter.test.d.ts +2 -0
  26. package/dist/platform.matter.test.d.ts.map +1 -0
  27. package/dist/platform.matter.test.js +385 -0
  28. package/dist/platform.matter.test.js.map +1 -0
  29. package/dist/platform.test.js +6 -8
  30. package/dist/platform.test.js.map +1 -1
  31. package/dist/settings.d.ts +1 -0
  32. package/dist/settings.d.ts.map +1 -1
  33. package/dist/settings.test.js +11 -0
  34. package/dist/settings.test.js.map +1 -1
  35. package/docs/assets/icons.js +1 -1
  36. package/docs/assets/icons.svg +1 -1
  37. package/docs/assets/main.js +5 -5
  38. package/docs/assets/navigation.js +1 -0
  39. package/docs/assets/search.js +1 -0
  40. package/docs/assets/style.css +248 -226
  41. package/docs/hierarchy.html +1 -0
  42. package/docs/index.html +17 -13
  43. package/docs/modules.html +1 -2
  44. package/docs/variables/default.html +1 -0
  45. package/eslint.config.js +6 -9
  46. package/package.json +23 -30
  47. package/typedoc.json +0 -4
  48. package/vitest.config.ts +7 -0
  49. package/.github/scripts/npm-version-script-esm-auto.js +0 -207
  50. package/.github/workflows/beta-release.yml +0 -55
  51. package/docs/assets/dmt/dmt-component-data.js +0 -1
  52. package/docs/assets/dmt/dmt-components.css +0 -20
  53. package/docs/assets/dmt/dmt-components.js +0 -67
  54. package/docs/assets/dmt/dmt-search.cmp +0 -0
  55. package/docs/assets/dmt/dmt-theme.css +0 -1
  56. package/docs/functions/default.html +0 -2
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">@homebridge-plugins/homebridge-august</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>@homebridge-plugins/homebridge-august</h1></div><h2>Hierarchy Summary</h2></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
package/docs/index.html CHANGED
@@ -1,20 +1,22 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="."><head><style>body { visibility: hidden; }</style><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="IE=edge"><title>@homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="assets/style.css"><link rel="stylesheet" href="assets/highlight.css"><script defer="" src="assets/main.js"></script><script async="" src="assets/icons.js" id="tsd-icons-script"></script><link rel="stylesheet" href="assets/dmt/dmt-components.css"><link rel="stylesheet" href="assets/dmt/dmt-theme.css"><script src="assets/dmt/dmt-components.js" type="module"></script><noscript><style>body { visibility: visible; }</style></noscript></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";</script><div class="overlay"></div>
2
- <main><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field" id="dmt-search-main"></div><div class="field" id="dmt-toolbar"><a href="index.html" class="title">@homebridge-plugins/homebridge-august</a></div></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main" tabindex="-1"><div class="col-content"><div class="tsd-page-title"><div class="dmt-title-header-flex"><h1>@homebridge-plugins/homebridge-august</h1></div></div><div class="tsd-panel tsd-typography"><span align="center">
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">@homebridge-plugins/homebridge-august</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>@homebridge-plugins/homebridge-august</h1></div><div class="tsd-panel tsd-typography"><span align="center">
3
2
  <p><a href="https://github.com/homebridge/verified/blob/master/verified-plugins.json"><img alt="homebridge-verified" src="https://raw.githubusercontent.com/homebridge-plugins/homebridge-august/latest/branding/Homebridge_x_August.svg?sanitize=true" width="350px"></a></p>
4
- <a id="homebridge-august" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Homebridge August<a href="#homebridge-august" 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></h1><p><a href="https://www.npmjs.com/package/homebridge-august"><img title="npm version" src="https://badgen.net/npm/v/homebridge-august?icon=npm&amp;label"></a>
5
- <a href="https://www.npmjs.com/package/homebridge-august"><img title="npm downloads" src="https://badgen.net/npm/dt/homebridge-august?label=downloads"></a>
6
- <a href="https://discord.gg/8fpZA4S"><img title="discord-august" src="https://badgen.net/discord/online-members/8fpZA4S?icon=discord&amp;label=discord"></a>
7
- <a href="https://paypal.me/donavanbecker"><img title="donate" src="https://badgen.net/badge/donate/paypal/yellow"></a></p>
3
+ <h1 id="homebridge-august" class="tsd-anchor-link">Homebridge August<a href="#homebridge-august" 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></h1>
4
+ <p><a href="https://www.npmjs.com/package/homebridge-august"><img title="npm version" src="https://badgen.net/npm/v/homebridge-august?icon=npm&label" ></a>
5
+ <a href="https://www.npmjs.com/package/homebridge-august"><img title="npm downloads" src="https://badgen.net/npm/dt/homebridge-august?label=downloads" ></a>
6
+ <a href="https://discord.gg/8fpZA4S"><img title="discord-august" src="https://badgen.net/discord/online-members/8fpZA4S?icon=discord&label=discord" ></a>
7
+ <a href="https://paypal.me/donavanbecker"><img title="donate" src="https://badgen.net/badge/donate/paypal/yellow" ></a></p>
8
8
  <p>The Homebridge <a href="https://august.com">August</a>
9
- plugin allows you to access your <a href="https://august.com">August</a> &amp; <a href="https://shopyalehome.com">Yale</a> Lock(s) from HomeKit with
9
+ plugin allows you to access your <a href="https://august.com">August</a> & <a href="https://shopyalehome.com">Yale</a> Lock(s) from HomeKit with
10
10
  <a href="https://homebridge.io">Homebridge</a>.
11
11
  </p>
12
12
  </span>
13
- <a id="installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#installation" 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><ol>
14
- <li>Search for "August" on the plugin screen of <a href="https://github.com/oznu/homebridge-config-ui-x">Homebridge Config UI X</a>.</li>
13
+ <h2 id="installation" class="tsd-anchor-link">Installation<a href="#installation" 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>
14
+ <ol>
15
+ <li>Search for &quot;August&quot; on the plugin screen of <a href="https://github.com/oznu/homebridge-config-ui-x">Homebridge Config UI X</a>.</li>
15
16
  <li>Click <strong>Install</strong>.</li>
16
17
  </ol>
17
- <a id="configuration" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Configuration<a href="#configuration" 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><ol>
18
+ <h2 id="configuration" class="tsd-anchor-link">Configuration<a href="#configuration" 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>
19
+ <ol>
18
20
  <li>
19
21
  <p>Input your August E-mail/Phone Number into the August Account Info.</p>
20
22
  </li>
@@ -28,7 +30,8 @@ plugin allows you to access your <a href="https://august.com">August</a> &amp; <
28
30
  <p>Finally Restart Homebridge.</p>
29
31
  </li>
30
32
  </ol>
31
- <a id="supported-august-devices" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Supported August Devices<a href="#supported-august-devices" 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><ul>
33
+ <h2 id="supported-august-devices" class="tsd-anchor-link">Supported August Devices<a href="#supported-august-devices" 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>
34
+ <ul>
32
35
  <li>August Smart lock (AUG-SL04-C03-N04)</li>
33
36
  <li>August Smart Lock Pro 3rd Gee (AUG-SL03-C02-G03-C)</li>
34
37
  <li>August WiFi Smart Lock (Gen 4)</li>
@@ -36,5 +39,6 @@ plugin allows you to access your <a href="https://august.com">August</a> &amp; <
36
39
  <li>Yale Assure Lock 2 (YDR410)</li>
37
40
  <li>Yale Assure Lock SL (YDR256)</li>
38
41
  </ul>
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>
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>
42
+ <h2 id="thanks" 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>
43
+ <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>
44
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>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"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><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"><nav class="tsd-navigation"><a href="modules.html">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
package/docs/modules.html CHANGED
@@ -1,2 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="."><head><style>body { visibility: hidden; }</style><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="IE=edge"><title>@homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="assets/style.css"><link rel="stylesheet" href="assets/highlight.css"><script defer="" src="assets/main.js"></script><script async="" src="assets/icons.js" id="tsd-icons-script"></script><link rel="stylesheet" href="assets/dmt/dmt-components.css"><link rel="stylesheet" href="assets/dmt/dmt-theme.css"><script src="assets/dmt/dmt-components.js" type="module"></script><noscript><style>body { visibility: visible; }</style></noscript></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";</script><div class="overlay"></div>
2
- <main><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field" id="dmt-search-main"></div><div class="field" id="dmt-toolbar"><a href="index.html" class="title">@homebridge-plugins/homebridge-august</a></div></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main" tabindex="-1"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"></ul><div class="dmt-title-header-flex"><h1>@homebridge-plugins/homebridge-august</h1></div></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open=""><summary class="tsd-accordion-summary" data-key="section-Functions"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg> Functions</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary"><a id="default" class="tsd-anchor"></a><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><a href="functions/default.html">default</a><a href="#default" 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></span></dt><dd class="tsd-member-summary"></dd></dl></details></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"><details open="" class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Functions"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Functions</summary><div><a href="#default" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Function"><use href="assets/icons.svg#icon-64"></use></svg><span>default</span></a></div></details></div></details></div><div class="site-menu" tabindex="-1"><nav class="tsd-navigation"><a href="modules.html" class="current">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"></ul></nav></div></div></div></main></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">@homebridge-plugins/homebridge-august</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"></ul><h1>@homebridge-plugins/homebridge-august</h1></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Variables"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h2>Variables</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="default"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Variable"><use href="assets/icons.svg#icon-32"></use></svg><a href="variables/default.html">default</a><a href="#default" 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></span></dt><dd class="tsd-member-summary"></dd></dl></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>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"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Variables"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Variables</summary><div><a href="#default"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Variable"><use href="assets/icons.svg#icon-32"></use></svg><span>default</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | @homebridge-plugins/homebridge-august</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-august"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@homebridge-plugins/homebridge-august</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">default</a></li></ul><h1>Variable default</h1></div><div class="tsd-signature"><span class="tsd-kind-variable">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">api</span>: <span class="tsd-signature-type">API</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/homebridge-plugins/homebridge-august/blob/be55579f404d1ea89cfd1fedc9f5328f8188f9e3/src/index.ts#L28">index.ts:28</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>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></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@homebridge-plugins/homebridge-august</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
package/eslint.config.js CHANGED
@@ -10,24 +10,24 @@ export default antfu(
10
10
  },
11
11
  rules: {
12
12
  'curly': ['error', 'multi-line'],
13
- 'import/extensions': ['error', 'ignorePackages'],
14
13
  'import/order': 0,
15
14
  'jsdoc/check-alignment': 'error',
16
15
  'jsdoc/check-line-alignment': 'error',
16
+ 'no-new': 0,
17
+ 'no-undef': 0,
17
18
  'perfectionist/sort-exports': 'error',
18
19
  'perfectionist/sort-imports': [
19
20
  'error',
20
21
  {
21
22
  groups: [
22
- 'builtin-type',
23
- 'external-type',
24
- 'internal-type',
25
- ['parent-type', 'sibling-type', 'index-type'],
23
+ 'type-builtin',
24
+ 'type-external',
25
+ 'type-internal',
26
+ ['type-parent', 'type-sibling', 'type-index'],
26
27
  'builtin',
27
28
  'external',
28
29
  'internal',
29
30
  ['parent', 'sibling', 'index'],
30
- 'object',
31
31
  'unknown',
32
32
  ],
33
33
  order: 'asc',
@@ -42,9 +42,6 @@ export default antfu(
42
42
  'test/no-only-tests': 'error',
43
43
  'unicorn/no-useless-spread': 'error',
44
44
  'unused-imports/no-unused-vars': ['error', { caughtErrors: 'none' }],
45
- 'no-new': 0, // Disable the no-new rule
46
- 'new-cap': 0, // Disable the new-cap rule
47
- 'no-undef': 0, // Disable the no-undef rule
48
45
  },
49
46
  },
50
47
  )
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.10",
5
+ "version": "3.1.0",
6
6
  "description": "The August plugin allows you to access your August & Yale device(s) from HomeKit.",
7
7
  "author": {
8
8
  "name": "donavanbecker",
@@ -38,54 +38,47 @@
38
38
  ],
39
39
  "main": "dist/index.js",
40
40
  "engines": {
41
- "homebridge": "^1.9.0 || ^2.0.0 || ^2.0.0-beta.27 || ^2.0.0-alpha.37",
42
- "node": "^20 || ^22 || ^24"
41
+ "homebridge": "^2.0.0-beta.89",
42
+ "node": "^22 || ^24"
43
43
  },
44
44
  "scripts": {
45
45
  "check": "npm install && npm outdated",
46
- "lint": "eslint src/**/*.ts",
47
- "lint:fix": "eslint src/**/*.ts --fix",
46
+ "lint": "eslint src/**/*.ts --no-warn-ignored",
47
+ "lint:fix": "eslint src/**/*.ts --fix --no-warn-ignored",
48
48
  "watch": "npm run build && npm run plugin-ui && npm link && nodemon",
49
49
  "plugin-ui": "rsync ./src/homebridge-ui/public/index.html ./dist/homebridge-ui/public/",
50
- "build": "npm run clean && tsc && npm run plugin-ui",
51
- "prepublishOnly": "npm run lint && npm run build && npm run plugin-ui && npm run docs && npm run docs:lint && npm run docs:theme",
50
+ "build": "npm run clean && tsc && npm run plugin-ui && cp package.json dist/package.json || true",
51
+ "prepublishOnly": "npm run lint && npm run build && npm run plugin-ui && npm run docs && npm run docs:lint",
52
52
  "postpublish": "npm run clean && npm ci",
53
53
  "clean": "shx rm -rf ./dist",
54
54
  "test": "vitest run",
55
55
  "test:watch": "vitest watch",
56
56
  "test-coverage": "npm run test -- --coverage",
57
57
  "docs": "typedoc",
58
- "docs:lint": "typedoc --emit none --treatWarningsAsErrors",
59
- "docs:theme": "typedoc --theme default-modern"
58
+ "docs:lint": "typedoc --emit none --treatWarningsAsErrors"
60
59
  },
61
60
  "publishConfig": {
62
61
  "access": "public"
63
62
  },
64
63
  "dependencies": {
65
- "@homebridge/plugin-ui-utils": "^2.0.1",
64
+ "@homebridge/plugin-ui-utils": "^2.2.3",
66
65
  "august-yale": "^1.1.6",
67
66
  "rxjs": "^7.8.2"
68
67
  },
69
68
  "devDependencies": {
70
- "@antfu/eslint-config": "^4.4.0",
71
- "@types/aes-js": "^3.1.4",
72
- "@types/debug": "^4.1.12",
73
- "@types/fs-extra": "^11.0.4",
74
- "@types/mdast": "^4.0.4",
75
- "@types/node": "^22.13.9",
76
- "@types/semver": "^7.5.8",
77
- "@types/source-map-support": "^0.5.10",
78
- "@typhonjs-typedoc/typedoc-theme-dmt": "^0.3.1",
79
- "@vitest/coverage-v8": "^3.0.7",
80
- "eslint": "^9.21.0",
81
- "eslint-plugin-format": "^1.0.1",
82
- "homebridge": "^1.9.0",
83
- "homebridge-config-ui-x": "^5.4.1",
84
- "nodemon": "^3.1.9",
85
- "shx": "^0.3.4",
69
+ "@antfu/eslint-config": "^8.2.0",
70
+ "@types/node": "^25.6.0",
71
+ "@vitest/coverage-v8": "^4.1.4",
72
+ "eslint": "^10.2.0",
73
+ "eslint-plugin-format": "^2.0.1",
74
+ "eslint-plugin-perfectionist": "^5.8.0",
75
+ "eslint-plugin-unused-imports": "^3.1.0",
76
+ "homebridge": "^2.0.0-beta.89",
77
+ "nodemon": "^3.1.14",
78
+ "shx": "^0.4.0",
86
79
  "ts-node": "^10.9.2",
87
- "typedoc": "^0.27.9",
88
- "typescript": "^5.8.2",
89
- "vitest": "^3.0.7"
80
+ "typedoc": "^0.28.19",
81
+ "typescript": "^6.0.2",
82
+ "vitest": "^4.1.4"
90
83
  }
91
- }
84
+ }
package/typedoc.json CHANGED
@@ -1,8 +1,4 @@
1
1
  {
2
- "plugin": [
3
- "@typhonjs-typedoc/typedoc-theme-dmt"
4
- ],
5
- "theme": "default-modern",
6
2
  "out": "docs",
7
3
  "exclude": ["src/**/*.spec.ts"],
8
4
  "entryPoints": [
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ include: ['src/**/*.test.ts'],
6
+ },
7
+ })
@@ -1,207 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Standalone ESM implementation — self-contained so this file can be copied
5
- * into other repos without pulling any other files.
6
- */
7
-
8
- import assert from 'node:assert'
9
- import child_process from 'node:child_process'
10
- import fs from 'node:fs'
11
- import process from 'node:process'
12
- // Minimal, in-file semver utilities used by this script.
13
- // This avoids an external dependency so the script can run in environments
14
- // where `semver` isn't installed.
15
- const semver = {
16
- // Very small validation: match major.minor.patch with optional prerelease/build
17
- valid(v) {
18
- return /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-.]+)?(?:\+[0-9A-Za-z-.]+)?$/.test(v)
19
- },
20
- // Return prerelease identifiers array or null
21
- prerelease(v) {
22
- const m = v.match(/^\d+\.\d+\.\d+-(.+)$/)
23
- return m ? m[1].split('.') : null
24
- },
25
- // Compare two semver strings in reverse order (for rcompare use)
26
- rcompare(a, b) {
27
- // Use standard semver precedence rules for major.minor.patch; ignore prerelease complexity except that prerelease is lower than release
28
- const pa = a.split('-')
29
- const pb = b.split('-')
30
- const aCore = pa[0].split('.').map(Number)
31
- const bCore = pb[0].split('.').map(Number)
32
- for (let i = 0; i < 3; i++) {
33
- if (aCore[i] > bCore[i]) return -1
34
- if (aCore[i] < bCore[i]) return 1
35
- }
36
- // equal core; releases (no prerelease) are greater than prerelease
37
- if (pa.length === 1 && pb.length > 1) return -1
38
- if (pa.length > 1 && pb.length === 1) return 1
39
- // both same prerelease status: compare as strings
40
- if (a > b) return -1
41
- if (a < b) return 1
42
- return 0
43
- },
44
- // Increment version by 'major'|'minor'|'patch'
45
- inc(v, level) {
46
- if (!this.valid(v)) throw new Error(`Invalid semver passed to inc: ${v}`)
47
- // strip prerelease/build
48
- const core = v.split('-')[0].split('+')[0]
49
- const parts = core.split('.').map(Number)
50
- switch (level) {
51
- case 'major':
52
- parts[0] += 1
53
- parts[1] = 0
54
- parts[2] = 0
55
- break
56
- case 'minor':
57
- parts[1] += 1
58
- parts[2] = 0
59
- break
60
- case 'patch':
61
- default:
62
- parts[2] += 1
63
- break
64
- }
65
- return parts.join('.')
66
- }
67
- }
68
-
69
- const BRANCH_VERSION_PATTERN = /^([A-Z]+)-(\d+\.\d+\.\d+)$/i
70
-
71
- // Load package.json
72
- const packageJSON = JSON.parse(fs.readFileSync('package.json', 'utf8'))
73
-
74
- const refArgument = process.argv[2]
75
- const tagArgument = process.argv[3] || 'latest'
76
- const prLabel = process.argv[4] || null // optional PR label: major, minor, patch
77
-
78
- if (!refArgument) {
79
- console.error('ref argument is missing')
80
- console.error('Usage: npm-version-script-esm.js <ref> [tag] [pr_label]')
81
- process.exit(1)
82
- }
83
-
84
- /**
85
- * Queries the NPM registry for the latest version for the provided base version and tag.
86
- * If the tag is latest, then the base version is returned if it exists. For other tags, the latest
87
- * version found for that base version and tag is returned.
88
- * @param baseVersion The base version to query for, e.g. 2.0.0
89
- * @param tag The tag to query for, e.g. beta or latest
90
- * @returns {string} Returns the version, or '' if not found
91
- */
92
- function getTagVersionFromNpm(baseVersion, tag) {
93
- try {
94
- return JSON.parse(child_process.execSync(`npm info ${packageJSON.name} versions --json`).toString('utf8').trim())
95
- .filter(v => (tag === 'latest' ? v === baseVersion : v.startsWith(`${baseVersion}-${tag}.`)))
96
- .reduce((_, current) => current, '')
97
- } catch (e) {
98
- console.error(`Failed to query the npm registry for the latest version for tag: ${tag}`, e)
99
- // throw e;
100
- return ''
101
- }
102
- }
103
-
104
- function getLatestStableVersionFromNpm() {
105
- try {
106
- const versions = JSON.parse(child_process.execSync(`npm info ${packageJSON.name} versions --json`).toString('utf8').trim())
107
- if (!Array.isArray(versions) || versions.length === 0) return ''
108
-
109
- // Only consider stable semver versions (no prerelease)
110
- const stable = versions.filter(v => semver.valid(v) && !semver.prerelease(v))
111
- if (stable.length === 0) return ''
112
-
113
- // Sort descending and return the highest
114
- const sorted = stable.sort(semver.rcompare)
115
- return sorted[0]
116
- } catch (e) {
117
- console.error('Failed to query the npm registry for published versions', e)
118
- return ''
119
- }
120
- }
121
-
122
- function desiredTargetVersion(ref) {
123
- // ref is a GitHub action ref string
124
- if (ref.startsWith('refs/pull/')) {
125
- throw new Error('The version script was executed inside a PR!')
126
- }
127
-
128
- assert(ref.startsWith('refs/heads/'))
129
- const branchName = ref.slice('refs/heads/'.length)
130
-
131
- const results = branchName.match(BRANCH_VERSION_PATTERN)
132
- if (results !== null) {
133
- if (results[1].toLowerCase() !== tagArgument.toLowerCase()) {
134
- console.warn(`The base branch name (${results[1]}) differs from the tag name ${tagArgument}`)
135
- }
136
-
137
- return results[2]
138
- }
139
-
140
- if (branchName === 'latest') {
141
- // For latest branch, start with package.json version as base
142
- return packageJSON.version
143
- }
144
-
145
- throw new Error(`Malformed branch name for ref: ${ref}. Must be beta-x.x.x, alpha-x.x.x, or 'latest'`)
146
- }
147
-
148
- function bumpVersion(baseVersion, prLabel) {
149
- const label = (prLabel || 'patch').toLowerCase()
150
- if (!semver.valid(baseVersion)) {
151
- throw new Error(`Invalid base version passed to bumpVersion: ${baseVersion}`)
152
- }
153
-
154
- switch (label) {
155
- case 'major':
156
- return semver.inc(baseVersion, 'major')
157
- case 'minor':
158
- return semver.inc(baseVersion, 'minor')
159
- case 'patch':
160
- default:
161
- return semver.inc(baseVersion, 'patch')
162
- }
163
- }
164
-
165
- const baseVersion = desiredTargetVersion(refArgument)
166
- let publishTag = baseVersion
167
-
168
- if (refArgument.includes('latest')) {
169
- if (prLabel) {
170
- // For latest branch when a PR label is provided, bump according to PR label
171
- publishTag = bumpVersion(baseVersion, prLabel)
172
- } else {
173
- // No PR label: determine next version based on the highest published stable version
174
- const latestPublishedStable = getLatestStableVersionFromNpm()
175
- if (latestPublishedStable) {
176
- console.warn(`Latest published stable version is ${latestPublishedStable}; bumping patch`)
177
- publishTag = bumpVersion(latestPublishedStable, 'patch')
178
- } else {
179
- console.warn('No published stable versions found; bumping package.json version patch')
180
- publishTag = bumpVersion(baseVersion, 'patch')
181
- }
182
- }
183
- } else {
184
- // For alpha/beta, query npm for latest
185
- const latestReleasedVersion = getTagVersionFromNpm(baseVersion, tagArgument)
186
- if (latestReleasedVersion) {
187
- console.warn(`Latest published version for ${baseVersion} with tag ${tagArgument} is ${latestReleasedVersion}`)
188
- publishTag = latestReleasedVersion
189
- } else {
190
- console.warn(`No published versions for ${baseVersion} with tag ${tagArgument}`)
191
- }
192
- }
193
-
194
- if (packageJSON.version !== publishTag) {
195
- console.warn(`Updating version in package.json from ${packageJSON.version} to ${publishTag}`)
196
- packageJSON.version = publishTag
197
- fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2))
198
-
199
- // perform the same change to the package-lock.json
200
- const packageLockJSON = JSON.parse(fs.readFileSync('package-lock.json', 'utf8'))
201
- packageLockJSON.version = publishTag
202
- fs.writeFileSync('package-lock.json', JSON.stringify(packageLockJSON, null, 2))
203
- } else {
204
- console.warn(`Version in package.json is already ${packageJSON.version}`)
205
- }
206
-
207
- console.log(publishTag)
@@ -1,55 +0,0 @@
1
- name: Beta Release
2
-
3
- on:
4
- push:
5
- branches: [beta-*.*.*, beta]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- build_and_test:
10
- uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
11
- with:
12
- enable_coverage: false
13
- secrets:
14
- token: ${{ secrets.GITHUB_TOKEN }}
15
- lint:
16
- needs: build_and_test
17
- uses: homebridge/.github/.github/workflows/eslint.yml@latest
18
-
19
- publish:
20
- needs: lint
21
- if: ${{ github.repository == 'homebridge-plugins/homebridge-august' }}
22
- permissions:
23
- id-token: write
24
- uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest
25
- with:
26
- tag: 'beta'
27
- dynamically_adjust_version: true
28
- npm_version_command: 'pre'
29
- pre_id: 'beta'
30
- secrets:
31
- npm_auth_token: ${{ secrets.npm_token }}
32
-
33
- pre-release:
34
- needs: publish
35
- if: ${{ github.repository == 'homebridge-plugins/homebridge-august' }}
36
- uses: homebridge/.github/.github/workflows/pre-release.yml@latest
37
- with:
38
- npm_version: ${{ needs.publish.outputs.NPM_VERSION }}
39
- body: |
40
- **Beta Release**
41
- **Version**: v${{ needs.publish.outputs.NPM_VERSION }}
42
- [How To Test Beta Releases](https://github.com/homebridge-plugins/homebridge-august/wiki/Beta-Version)
43
-
44
- github-releases-to-discord:
45
- name: Discord Webhooks
46
- needs: [build_and_test,publish]
47
- if: ${{ github.repository == 'homebridge-plugins/homebridge-august' }}
48
- uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
49
- with:
50
- title: "Air Beta Release"
51
- description: |
52
- Version `v${{ needs.publish.outputs.NPM_VERSION }}`
53
- url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
54
- secrets:
55
- DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }}
@@ -1 +0,0 @@
1
- globalThis.dmtComponentDataBCMP = 'TZLNbtpAEMc3iEpRnqGHnCulxcYQ50aUthJq06Kq6n1ZD/aK9a61H/m48Qj0ERIMttWU3PoA9Fo49dILz9IFHJPT7ozmv/Obnf8aHRWUCP6R8qFao1qmQF5RAuPU2Nu4SHAIXR7AzRodZLEIDAP1UJ6vIx2zx13QVT1MhrZ48cjxFQ2xpoKXwloeYzkMxDUfz5QwksD3NXqRarjRWQADbJhOE6yjXwPDyUan3pTpbYd0SHnQmRKGlfqLUE4iygIJ3N7nX2DAYKv5YIvW6OWdV3zCMagEE7jz03fcxPdNN/+GJcV9BvdtL39fdpk4rj+92Lw6cVvtoss1yIGVTVqO++PCUmhpiBYydRqul/ekSEDq29RteP7sEnQkgmnTPW37RQ9L29KqZ27bdTwvPycElBIycxtnp07LLb7eJnDOKFaZ55x5zYZXWHCwMxDI/Kbvtxt+/lYQEwPXe/76Fv+wgj+u0Ds77j+jPfXyAD2HXtZQhbysoxJ4eYj2tMsRqkhXqI7QHnOFjm1YMa5Qx/77E+AKjRD6qQBLEn1Otvva7HhgGNugL6aMxlQfzRVoTXlYlRwUmNN4a4zfcxWJ68udc6z7Fg+KBtDHsrQhmis7g3VTT0ICPPj3KhBEnXQiEUNf0iCEk4SZkFqnPEthExql/wM=';