-
Notifications
You must be signed in to change notification settings - Fork 4
feat: resync with Gladys master (camera enabled, siren alarm modes, battery charging, scan result shapes) #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -962,8 +962,11 @@ class GladysIntegration extends EventEmitter { | |
| * string (≤ 512 decoded bytes). | ||
| * @returns {Promise<Array>} Raw results — 'udp-broadcast' and | ||
| * 'udp-active-broadcast': `[{ source_ip, source_port, payload_base64 }]`; | ||
| * 'mdns': `[{ name, host, addresses, port, txt }]`; 'ssdp': raw headers per | ||
| * responder. | ||
| * 'mdns': `[{ name, host, addresses, port, txt }]` (every declared mdns | ||
| * entry is browsed, results merged); 'ssdp': | ||
|
Comment on lines
+965
to
+966
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Document nullable mDNS fields in both public API descriptions.
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| * `[{ source_ip, source_mac?, source_port, headers }]` — `headers` is the | ||
| * raw response text, `source_mac` a best-effort ARP-table lookup by the | ||
| * core (its absence is ordinary, not an error). | ||
| * @example | ||
| * const results = await gladys.scanNetwork('udp-broadcast', { timeoutSeconds: 10 }); | ||
| * @example | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TypeScript
MdnsScanResultcorrectly typeshostasstring | nullandportasnumber | null: the core leaves both null when a PTR is seen without an SRV during the scan window (Gladys’s own tests cover that “Silent Bridge” case).This sentence documents the
txt: string[]correction and the multi-service merge, but a JS reader of{ name, host, addresses, port, txt }can still assumehostis always a string and crash on.split/ template usage. A short note here — and in thescanNetworkJSDoc, which has the same gap — would match the care already taken forsource_mac?.