homebridge-plugin-utils 2.0.0 → 2.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.
- package/dist/backpressure.d.ts +1 -1
- package/dist/backpressure.js +4 -4
- package/dist/backpressure.js.map +1 -1
- package/dist/cli/index.d.ts +73 -2
- package/dist/cli/index.js +221 -25
- package/dist/cli/index.js.map +1 -1
- package/dist/clock-double.js +2 -2
- package/dist/clock-double.js.map +1 -1
- package/dist/disposable-stack.d.ts +59 -0
- package/dist/disposable-stack.js +155 -0
- package/dist/disposable-stack.js.map +1 -0
- package/dist/docChrome.d.ts +260 -0
- package/dist/docChrome.js +361 -0
- package/dist/docChrome.js.map +1 -0
- package/dist/featureOptions-docs.d.ts +2 -2
- package/dist/featureOptions-docs.js +1 -1
- package/dist/featureOptions.d.ts +5 -5
- package/dist/featureOptions.js +6 -6
- package/dist/ffmpeg/exec.d.ts +2 -2
- package/dist/ffmpeg/exec.js +2 -2
- package/dist/ffmpeg/mp4-assembler.d.ts +45 -4
- package/dist/ffmpeg/mp4-assembler.js +45 -8
- package/dist/ffmpeg/mp4-assembler.js.map +1 -1
- package/dist/ffmpeg/mp4-parser.d.ts +1 -1
- package/dist/ffmpeg/mp4-parser.js +1 -1
- package/dist/ffmpeg/options.js +3 -3
- package/dist/ffmpeg/options.js.map +1 -1
- package/dist/ffmpeg/process.d.ts +1 -1
- package/dist/ffmpeg/process.js +4 -4
- package/dist/ffmpeg/process.js.map +1 -1
- package/dist/ffmpeg/record.d.ts +26 -1
- package/dist/ffmpeg/record.js +12 -0
- package/dist/ffmpeg/record.js.map +1 -1
- package/dist/ffmpeg/recording-process-double.d.ts +13 -0
- package/dist/ffmpeg/recording-process-double.js +22 -0
- package/dist/ffmpeg/recording-process-double.js.map +1 -1
- package/dist/ffmpeg/rtp-parser.d.ts +1 -1
- package/dist/ffmpeg/rtp-parser.js +1 -1
- package/dist/ffmpeg/rtp.d.ts +4 -4
- package/dist/ffmpeg/rtp.js +7 -6
- package/dist/ffmpeg/rtp.js.map +1 -1
- package/dist/ffmpeg/stream.js +1 -1
- package/dist/ffmpeg/stream.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/logclient/auth.d.ts +3 -3
- package/dist/logclient/auth.js +2 -2
- package/dist/logclient/auth.js.map +1 -1
- package/dist/logclient/cli-run.js +2 -2
- package/dist/logclient/cli-run.js.map +1 -1
- package/dist/logclient/cli.js +2 -2
- package/dist/logclient/client.js +2 -2
- package/dist/logclient/client.js.map +1 -1
- package/dist/logclient/rest.js +1 -1
- package/dist/logclient/socket-double.d.ts +1 -1
- package/dist/logclient/socket-double.js +1 -1
- package/dist/logclient/socket.js +5 -5
- package/dist/logclient/socket.js.map +1 -1
- package/dist/logclient/time-window.d.ts +1 -1
- package/dist/mqttClient.d.ts +1 -1
- package/dist/mqttClient.js +3 -3
- package/dist/mqttClient.js.map +1 -1
- package/dist/ui/featureOptions.js +6 -6
- package/dist/ui/pluginConfigSession.mjs +1 -1
- package/dist/ui/webUi-featureOptions/effects/persist.mjs +2 -2
- package/dist/ui/webUi-featureOptions/effects/theme.mjs +1 -1
- package/dist/ui/webUi-featureOptions/effects/tokens.mjs +1 -1
- package/dist/ui/webUi-featureOptions/rendering.mjs +2 -2
- package/dist/ui/webUi-featureOptions/selectors.mjs +3 -3
- package/dist/ui/webUi-featureOptions/state.mjs +6 -6
- package/dist/ui/webUi-featureOptions/store.mjs +1 -1
- package/dist/ui/webUi-featureOptions/utils.mjs +14 -1
- package/dist/ui/webUi-featureOptions/views/connectionError.mjs +1 -1
- package/dist/ui/webUi-featureOptions/views/nav.mjs +42 -28
- package/dist/ui/webUi-featureOptions/views/options.mjs +2 -2
- package/dist/ui/webUi-featureOptions/views/search.mjs +2 -2
- package/dist/ui/webUi-featureOptions.mjs +57 -32
- package/dist/ui/webUi.mjs +43 -11
- package/dist/util.d.ts +89 -12
- package/dist/util.js +62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IAAI,CAAC,QAAQ,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC5B,CAAC;QAED,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAEhD,MAAM,EAAE,CAAC,IAAmB,EAAiB,EAAE,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC;CACpE,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the package barrel: it carries per-stream state (the carry-forward instant), so a single async-generator transform - fresh state per call, structurally single-use -
|
|
7
7
|
* makes cross-stream reuse with stale state unrepresentable, whereas a reused predicate would be wrong on a second stream.
|
|
8
8
|
*
|
|
9
|
-
* The carry-forward is the
|
|
9
|
+
* The carry-forward is the detail that matters. A record with no parseable instant (a `null` timestamp, or text in an unrecognized locale) is a continuation line of a
|
|
10
10
|
* multi-line message (a stack trace whose only first line carries `[timestamp]`), a bare status line, or a parse failure. A naive "is this record's own epoch in range"
|
|
11
11
|
* test would shred every stack trace - the first line in, the traceback gone. Instead a null-epoch line inherits the instant of the most recent record that DID parse, so
|
|
12
12
|
* a continuation is kept iff its parent is. This is a log-semantics rule intrinsic to "filter records by time correctly," so it lives in this primitive. The generator
|
package/dist/mqttClient.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ export declare class MqttClient implements AsyncDisposable {
|
|
|
199
199
|
* broker URL) surfaces as an `Error` wrapping the underlying cause, so a misconfigured plugin fails loudly instead of living in a zombie state. Network-level
|
|
200
200
|
* failures (an unreachable broker reachable by a valid URL) do not throw - they surface asynchronously through the client's `error` event, are logged, and trigger
|
|
201
201
|
* mqtt.js's built-in auto-reconnect until {@link MqttClient.abort} or a parent signal ends the client for good. A pre-aborted parent signal still constructs
|
|
202
|
-
* a client (so `#mqtt`
|
|
202
|
+
* a client (so `#mqtt` stays non-null) and then immediately runs the regular teardown path.
|
|
203
203
|
*
|
|
204
204
|
* @param config - Static broker / topic configuration. See {@link MqttConfig}.
|
|
205
205
|
* @param init - Optional init options. See {@link MqttClientInit}.
|
package/dist/mqttClient.js
CHANGED
|
@@ -130,7 +130,7 @@ export class MqttClient {
|
|
|
130
130
|
* broker URL) surfaces as an `Error` wrapping the underlying cause, so a misconfigured plugin fails loudly instead of living in a zombie state. Network-level
|
|
131
131
|
* failures (an unreachable broker reachable by a valid URL) do not throw - they surface asynchronously through the client's `error` event, are logged, and trigger
|
|
132
132
|
* mqtt.js's built-in auto-reconnect until {@link MqttClient.abort} or a parent signal ends the client for good. A pre-aborted parent signal still constructs
|
|
133
|
-
* a client (so `#mqtt`
|
|
133
|
+
* a client (so `#mqtt` stays non-null) and then immediately runs the regular teardown path.
|
|
134
134
|
*
|
|
135
135
|
* @param config - Static broker / topic configuration. See {@link MqttConfig}.
|
|
136
136
|
* @param init - Optional init options. See {@link MqttClientInit}.
|
|
@@ -147,7 +147,7 @@ export class MqttClient {
|
|
|
147
147
|
this.#controller = new AbortController();
|
|
148
148
|
this.signal = composeSignals(init.signal, this.#controller.signal);
|
|
149
149
|
// Establish the underlying MQTT.js connection unconditionally so `#mqtt` is always a live reference by the time the constructor returns. A synchronous failure
|
|
150
|
-
// (typically URL parsing) is wrapped in an Error whose `cause` carries the original error, so callers
|
|
150
|
+
// (typically URL parsing) is wrapped in an Error whose `cause` carries the original error, so callers distinguish via `error.cause` rather than matching on
|
|
151
151
|
// mqtt.js's internal message text.
|
|
152
152
|
try {
|
|
153
153
|
// We connect with `rejectUnauthorized: false` deliberately. The broker URL is user-supplied and, in the typical Homebridge deployment, points at a local
|
|
@@ -424,7 +424,7 @@ export class MqttClient {
|
|
|
424
424
|
// on the way out, then ends the MQTT.js connection with `force = true` so any in-flight publish / subscribe packets are dropped rather than awaited - the client is
|
|
425
425
|
// unambiguously done, and the underlying library's reconnect logic exits permanently. The `#mqtt` reference is not nulled: callers never reach `#mqtt` accesses
|
|
426
426
|
// when the signal is aborted (every public method short-circuits on `signal.aborted`), and keeping the reference preserves the `readonly #mqtt: MqttJsClient`
|
|
427
|
-
//
|
|
427
|
+
// guarantee that lets TypeScript drop every non-null assertion in the live paths.
|
|
428
428
|
#teardown() {
|
|
429
429
|
this.#subscriptions.clear();
|
|
430
430
|
this.#mqtt.end(true);
|
package/dist/mqttClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mqttClient.js","sourceRoot":"","sources":["../src/mqttClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGnI,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,iKAAiK;AACjK,qJAAqJ;AACrJ,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAE3C,8JAA8J;AAC9J,kKAAkK;AAClK,+EAA+E;AAC/E,MAAM,gBAAgB,GAAkB,MAAM,CAAC,sBAAsB,CAAC,CAAC;AA2FvE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B,EAAE,GAA4B,EAAE,iBAAyB;IAExH,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAQ,EAAE;QAEzC,GAAG,CAAC,KAAK,CAAC,mDAAmD,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,iBAAiB,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACnI,CAAC,CAAC;IAEF,QAAO,KAAK,CAAC,IAAI,EAAE,CAAC;QAElB,KAAK,cAAc;YAEjB,QAAQ,CAAC,oBAAoB,CAAC,CAAC;YAE/B,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,C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target }) {
|
|
|
136
136
|
* name on a `render` declaration does not resolve, surfacing the misconfiguration at load time rather than silently degrading the log-emission path.
|
|
137
137
|
*
|
|
138
138
|
* The index is the catalog-side input to every other pure helper in this module. Build it once per catalog; reuse it across every configured-options mutation
|
|
139
|
-
* because the catalog is
|
|
139
|
+
* because the catalog is unchanged across those mutations. Categories without an entry in the options map are skipped silently (a plugin defines a category for
|
|
140
140
|
* future expansion before any option has migrated into it).
|
|
141
141
|
*
|
|
142
142
|
* @param categories - The raw category list.
|
|
@@ -681,7 +681,7 @@ export class FeatureOptions {
|
|
|
681
681
|
*
|
|
682
682
|
* Callers express intent ("forget any configuration for option X at scope Y") and the model owns the entry-format end-to-end. The match is value-aware: for
|
|
683
683
|
* value-centric options it covers both the bare scoped entry and any entry carrying a single trailing value segment, so a subsequent {@link setOption} cleanly
|
|
684
|
-
* replaces whatever was there. No-op when no entry addresses the target scope, so callers can treat this as
|
|
684
|
+
* replaces whatever was there. No-op when no entry addresses the target scope, so callers can treat this as a repeatable reset.
|
|
685
685
|
*
|
|
686
686
|
* @param args - The addressing intent: option key and optional scope id. See {@link ClearOptionArgs}.
|
|
687
687
|
*
|
|
@@ -700,7 +700,7 @@ export class FeatureOptions {
|
|
|
700
700
|
return;
|
|
701
701
|
}
|
|
702
702
|
this.#configuredOptions = next;
|
|
703
|
-
// Only the index depends on the configured-options array; the catalog-derived state is
|
|
703
|
+
// Only the index depends on the configured-options array; the catalog-derived state is unchanged across config mutations and need not be touched here.
|
|
704
704
|
this.#configIndex = buildConfigIndex(this.#catalog, this.#configuredOptions);
|
|
705
705
|
}
|
|
706
706
|
/**
|
|
@@ -725,7 +725,7 @@ export class FeatureOptions {
|
|
|
725
725
|
*/
|
|
726
726
|
setOption(args) {
|
|
727
727
|
this.#configuredOptions = applySetOption({ args, catalog: this.#catalog, configuredOptions: this.#configuredOptions });
|
|
728
|
-
// Only the index depends on the configured-options array; the catalog-derived state is
|
|
728
|
+
// Only the index depends on the configured-options array; the catalog-derived state is unchanged across config mutations and need not be touched here.
|
|
729
729
|
this.#configIndex = buildConfigIndex(this.#catalog, this.#configuredOptions);
|
|
730
730
|
}
|
|
731
731
|
/**
|
|
@@ -791,7 +791,7 @@ export class FeatureOptions {
|
|
|
791
791
|
* @returns Returns the current list of available feature option categories.
|
|
792
792
|
*/
|
|
793
793
|
get categories() {
|
|
794
|
-
// The catalog stores the categories as readonly to encode the immutability
|
|
794
|
+
// The catalog stores the categories as readonly to encode the immutability guarantee the pure functional core relies on. The public getter returns the
|
|
795
795
|
// historical mutable type for backward compatibility - the array is the same identity the caller passed at construction (or via the setter), so consumers
|
|
796
796
|
// mutating it would be mutating the catalog regardless of the return type. The readonly annotation is the discipline, not a runtime enforcement.
|
|
797
797
|
return this.#catalog.categories;
|
|
@@ -823,7 +823,7 @@ export class FeatureOptions {
|
|
|
823
823
|
*/
|
|
824
824
|
set configuredOptions(options) {
|
|
825
825
|
this.#configuredOptions = options ?? [];
|
|
826
|
-
// The catalog-derived state is
|
|
826
|
+
// The catalog-derived state is unchanged across config mutations; only the lookup index needs rebuilding.
|
|
827
827
|
this.#configIndex = buildConfigIndex(this.#catalog, this.#configuredOptions);
|
|
828
828
|
}
|
|
829
829
|
/**
|
|
@@ -124,7 +124,7 @@ export class PluginConfigSession {
|
|
|
124
124
|
* name alongside actual data.
|
|
125
125
|
*
|
|
126
126
|
* Built like {@link commit} for symmetry and clarity: the read happens into a local, the local is seeded, and a single trailing assignment advances the held
|
|
127
|
-
* reference. (The build-then-assign
|
|
127
|
+
* reference. (The build-then-assign does not guard against a torn write here - the only I/O is the first statement - but it keeps this method's shape
|
|
128
128
|
* consistent with {@link commit}.)
|
|
129
129
|
*
|
|
130
130
|
* @returns {Promise<void>}
|
|
@@ -177,10 +177,10 @@ export const registerPersistEffect = ({ host, session, signal, store }) => {
|
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
// Single-writer drain start-site (mutation path). The macrotask-ordering
|
|
180
|
+
// Single-writer drain start-site (mutation path). The macrotask-ordering rule the serialization rests on: every subscribed store mutation
|
|
181
181
|
// (option:set / option:cleared / options:reset / model:reverted) and every flush() caller (hide() / the visibilitychange handler) originates from a DOM-event
|
|
182
182
|
// macrotask, so none can preempt the queued `inFlight.finally` microtask and strand a `pending` edit in the gap between the drain returning and its `finally`
|
|
183
|
-
// clearing `inFlight`. (Forward-safety: if a future caller ever dispatches one of those subscribed actions from a microtask continuation, this
|
|
183
|
+
// clearing `inFlight`. (Forward-safety: if a future caller ever dispatches one of those subscribed actions from a microtask continuation, this rule
|
|
184
184
|
// must be re-checked.) Reset `flushing` here too so it never outlives the drain it belongs to.
|
|
185
185
|
inFlight = drain().finally(() => {
|
|
186
186
|
|
|
@@ -47,7 +47,7 @@ export const registerThemeEffect = async ({ host, probe: { intervalMs = 20, time
|
|
|
47
47
|
|
|
48
48
|
// Restore the document to its pre-effect state, symmetric with every mutation the effect made to it: drop the adopted stylesheet, then the `color-scheme` and
|
|
49
49
|
// `.fo-dark` class that applyColorScheme set on `:root` and the accent-token inline overrides the Bootstrap probe wrote there. The `color-scheme` removal is the
|
|
50
|
-
//
|
|
50
|
+
// one that matters - it is a native property, so a leftover `dark` value would tint default form-control and scrollbar rendering on whatever content occupies the
|
|
51
51
|
// document after teardown (in a multi-page host, a sibling tab). The class and token overrides are inert once the stylesheet that reads them is gone, but are
|
|
52
52
|
// cleared too so the effect leaves no trace on `:root`.
|
|
53
53
|
document.adoptedStyleSheets = document.adoptedStyleSheets.filter((sheet) => sheet !== stylesheet);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* font scale, spacing scale, radii, motion, accent colors, surfaces, borders, text, form controls, interactive states, specific colors). Cleanup is automatic via
|
|
10
10
|
* the supplied AbortSignal - aborting removes the stylesheet from `document.adoptedStyleSheets`.
|
|
11
11
|
*
|
|
12
|
-
* Stylistic
|
|
12
|
+
* Stylistic rules the tokens encode:
|
|
13
13
|
*
|
|
14
14
|
* 1. **Tokens declare, theme overrides.** Accent tokens default to the CSS-standard `AccentColor` / `AccentColorText` keywords; the theme effect overrides them at
|
|
15
15
|
* runtime via `documentElement.style.setProperty` after probing Bootstrap's `.btn-primary`. The declared defaults remain in effect until (and if) the probe
|
|
@@ -240,7 +240,7 @@ export const triStateTransition = ({ catalog, checkbox, configIndex, controllerI
|
|
|
240
240
|
return { action: writeAction({ deviceId, enabled: true, expandedName, inputValue, option, upstream, valueCentric: isValueOption(catalog, expandedName) }) };
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
// Map a view scope kind to the suffix label rendered on category headers. Switch on the
|
|
243
|
+
// Map a view scope kind to the suffix label rendered on category headers. Switch on the tag; every scope kind maps to its own label.
|
|
244
244
|
const scopeLabel = (scopeKind) => {
|
|
245
245
|
|
|
246
246
|
switch(scopeKind) {
|
|
@@ -320,7 +320,7 @@ const createLabel = ({ entry, expandedName }) => createElement("label", {
|
|
|
320
320
|
}, [entry.description]);
|
|
321
321
|
|
|
322
322
|
// Apply the label's scope-color class, replacing any color previously applied. The color classes are mutually exclusive, so we strip every one of them before adding
|
|
323
|
-
// the current one - this makes the function
|
|
323
|
+
// the current one - this makes the function safe to re-run on every projection change, which is what lets a toggle re-color a modified option's label
|
|
324
324
|
// in place. The construction path and the per-mutation update path share this one writer, so the initial color and every subsequent color come from the same map.
|
|
325
325
|
const applyLabelColor = ({ entry, inheriting, label }) => {
|
|
326
326
|
|
|
@@ -26,7 +26,7 @@ import { memoize } from "./store.mjs";
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Extract the controller serial from the scope
|
|
29
|
+
* Extract the controller serial from the scope tag, or null when no controller is in context. Pure helper - one-line tag read, not memoized.
|
|
30
30
|
*
|
|
31
31
|
* @param {import("./state.mjs").FeatureOptionsState} state - The current state.
|
|
32
32
|
* @returns {string | null} The controller serial when the scope is controller-based, null otherwise.
|
|
@@ -50,7 +50,7 @@ export const selectedControllerId = (state) => {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Extract the device serial from the scope
|
|
53
|
+
* Extract the device serial from the scope tag, or null when the scope is global or controller-only. Pure helper - one-line tag read, not
|
|
54
54
|
* memoized.
|
|
55
55
|
*
|
|
56
56
|
* @param {import("./state.mjs").FeatureOptionsState} state - The current state.
|
|
@@ -83,7 +83,7 @@ export const selectedDeviceId = (state) => {
|
|
|
83
83
|
* unrelated entries. If that assumption ever needs to weaken (e.g., a plugin starts surfacing user-chosen serials), encode the components with
|
|
84
84
|
* `encodeURIComponent` at this seam before composing the key.
|
|
85
85
|
*
|
|
86
|
-
* @param {import("./state.mjs").Scope} scope - The scope
|
|
86
|
+
* @param {import("./state.mjs").Scope} scope - The scope tag.
|
|
87
87
|
* @returns {string} A stable string key identifying the view.
|
|
88
88
|
*/
|
|
89
89
|
export const scopeCacheKey = (scope) => {
|
|
@@ -13,7 +13,7 @@ import { applyClearOption, applySetOption, buildCatalogIndex } from "../featureO
|
|
|
13
13
|
* and derives its view via selectors. Discriminated unions encode the variant types the UI moves through, each listed below:
|
|
14
14
|
*
|
|
15
15
|
* - {@link Scope} - `{kind: "global"}` | `{kind: "controller", controllerId}` | `{kind: "device", controllerId, deviceId}`. The selection pointer. Discriminated
|
|
16
|
-
* because each kind carries different data; merging them into a flat record would smear the
|
|
16
|
+
* because each kind carries different data; merging them into a flat record would smear the guarantees across two fields and force consumers to recover the
|
|
17
17
|
* kind via predicates.
|
|
18
18
|
* - {@link LifecycleStatus} - `loading` | `ready` | `persisting` | `persist-error` | `connection-error`. The page-state pointer. Discriminated because the
|
|
19
19
|
* variants carry different per-state payloads (a snapshot when persisting, an error when failed, a message when the connection broke).
|
|
@@ -63,7 +63,7 @@ import { applyClearOption, applySetOption, buildCatalogIndex } from "../featureO
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @typedef {Object} Validators
|
|
66
|
-
* @property {(device: Device) => boolean} isController - Predicate for "is this device a controller-as-device" (drives controller-vs-device scope
|
|
66
|
+
* @property {(device: Device) => boolean} isController - Predicate for "is this device a controller-as-device" (drives controller-vs-device scope distinction).
|
|
67
67
|
* @property {(device: Device | undefined, option: Object) => boolean} validOption - Predicate for "should this option render for this device."
|
|
68
68
|
* @property {(device: Device | undefined, category: Object) => boolean} validOptionCategory - Predicate for "should this category render for this device."
|
|
69
69
|
*/
|
|
@@ -116,7 +116,7 @@ import { applyClearOption, applySetOption, buildCatalogIndex } from "../featureO
|
|
|
116
116
|
* @property {string | null} devicesControllerId - Serial of the controller whose `devices` are loaded, or null (device-only / none yet). Preserves the
|
|
117
117
|
* device-to-controller association that `scope` drops once the selection goes global, so a loaded device's parent controller stays resolvable after the
|
|
118
118
|
* selection leaves controller scope.
|
|
119
|
-
* @property {{mode: "all" | "modified", query: string}} filter - Search and filter state. Two-field record because the dimensions are
|
|
119
|
+
* @property {{mode: "all" | "modified", query: string}} filter - Search and filter state. Two-field record because the dimensions are independent (every combination
|
|
120
120
|
* is valid and meaningful).
|
|
121
121
|
* @property {readonly string[]} initialOptions - The at-show() snapshot for "Revert to Saved." Stable across the session except when re-show() loads an option
|
|
122
122
|
* set that is not set-equal to the prior snapshot, in which case the snapshot is replaced.
|
|
@@ -157,7 +157,7 @@ export const initialState = () => {
|
|
|
157
157
|
|
|
158
158
|
// Share a single empty-array reference across every array-typed option field so the persist effect's "are we dirty?" check (configuredOptions === persistedAnchor)
|
|
159
159
|
// returns true at registration time and does not trigger a spurious initial persist. After model:loaded, each field is set to the loaded array's reference; the
|
|
160
|
-
//
|
|
160
|
+
// guarantee is preserved.
|
|
161
161
|
const empty = [];
|
|
162
162
|
|
|
163
163
|
return {
|
|
@@ -304,8 +304,8 @@ export const reducer = (state, action) => {
|
|
|
304
304
|
|
|
305
305
|
case "connection:error": {
|
|
306
306
|
|
|
307
|
-
// Controller unreachable on the current view. The orchestrator's connection-error flow dispatches this
|
|
308
|
-
//
|
|
307
|
+
// Controller unreachable on the current view. The orchestrator's connection-error flow dispatches this with the user-facing message that arrived alongside the
|
|
308
|
+
// device-list response; subscribers (status bar / sidebar) consume the message.
|
|
309
309
|
return { ...state, status: { kind: "connection-error", message: action.message } };
|
|
310
310
|
}
|
|
311
311
|
|
|
@@ -24,7 +24,7 @@ const ModuleCustomEvent = CustomEvent;
|
|
|
24
24
|
* cleanup follows the caller's {@link AbortSignal} automatically, no `destroy()` ceremony required. The signal-keyed lifecycle is the same primitive every
|
|
25
25
|
* other part of the webUI already uses for its DOM listeners, so the store's subscription model integrates without a new lifecycle concept.
|
|
26
26
|
* - **Read-then-dispatch ordering.** The reducer applies before the event fires, so a subscriber reading `store.state` from inside its handler always sees the
|
|
27
|
-
* post-dispatch state. The ordering
|
|
27
|
+
* post-dispatch state. The ordering matters: views that re-derive their DOM in response to an event must see the new state, not the pre-mutation
|
|
28
28
|
* state that triggered the dispatch.
|
|
29
29
|
*
|
|
30
30
|
* The store carries no domain logic itself - the reducer (passed at construction) and the action vocabulary (consumed by subscribers) are the application-specific
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright(C) 2017-2026, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
2
|
*
|
|
3
|
-
* webUi-featureOptions/utils.mjs: Shared utilities for the feature
|
|
3
|
+
* webUi-featureOptions/utils.mjs: Shared utilities for the plugin webUI - used by the feature-options components and the top-level orchestrator alike.
|
|
4
4
|
*/
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
@@ -198,3 +198,16 @@ export function showToast(message, variant = "alert-success") {
|
|
|
198
198
|
setTimeout(() => toast.remove(), 150);
|
|
199
199
|
}, 3000);
|
|
200
200
|
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Surface an arbitrary thrown value as an error toast. The webUI's extension points - caller-supplied first-run hooks, plugin device fetchers, the connection-error
|
|
204
|
+
* retry callback - can reject with any shape (an Error, a string, a plain object, a primitive), so the message is extracted defensively: `err?.message` when the
|
|
205
|
+
* value carries one, a string coercion of the whole value otherwise. This is the single normalization every user-facing catch across the webUI routes through, so
|
|
206
|
+
* the toast text stays useful regardless of what bubbled out.
|
|
207
|
+
*
|
|
208
|
+
* @param {*} err - The thrown value to surface.
|
|
209
|
+
*/
|
|
210
|
+
export function toastError(err) {
|
|
211
|
+
|
|
212
|
+
homebridge.toast.error(err?.message ?? String(err), "Error");
|
|
213
|
+
}
|
|
@@ -13,7 +13,7 @@ import { effect } from "../store.mjs";
|
|
|
13
13
|
* Subscribes to `connection:error` and `model:loaded`. On `model:loaded` this view yields - it aborts its retry window and stops rendering - and the shared
|
|
14
14
|
* `#headerInfo` container is reclaimed by the header view; it does not itself clear the error display.
|
|
15
15
|
*
|
|
16
|
-
* Renders into the same `#headerInfo` container the priority-chain header uses. The two views coordinate via the `state.status`
|
|
16
|
+
* Renders into the same `#headerInfo` container the priority-chain header uses. The two views coordinate via the `state.status` tag: header yields when
|
|
17
17
|
* status is connection-error; this view yields when status is anything else.
|
|
18
18
|
*
|
|
19
19
|
* Renders:
|
|
@@ -28,23 +28,24 @@ import { effect } from "../store.mjs";
|
|
|
28
28
|
* - `scope:changed` - update active-link highlighting without rebuilding.
|
|
29
29
|
* - `model:loaded` - initial build (controllers + global link + mode-aware structure).
|
|
30
30
|
*
|
|
31
|
-
* The controller-click handler does I/O: it calls the caller-supplied `getDevices` callback to fetch the new controller's
|
|
32
|
-
* `devices:loaded` action
|
|
33
|
-
*
|
|
31
|
+
* The controller-click handler does I/O: it calls the caller-supplied `getDevices` callback to fetch the new controller's DeviceListResult, then dispatches a
|
|
32
|
+
* `devices:loaded` action followed by either a scope change (devices present) or a `connection:error` (the result carried a failure message). A per-mount fetch
|
|
33
|
+
* generation guards the last-resolved-wins race: the newest click owns the store, so a superseded controller click discards its result on both settlement paths
|
|
34
|
+
* (resolve and reject) rather than overwriting the newer click's rendered state. The handler wraps its fetch in a try/catch so a rejected fetch surfaces as a
|
|
35
|
+
* `connection:error` action rather than an unhandled rejection; the view layer never silently swallows a failure.
|
|
34
36
|
*
|
|
35
37
|
* @param {Object} args
|
|
36
38
|
* @param {((controller: import("../state.mjs").Controller | null) =>
|
|
37
|
-
* Promise<
|
|
38
|
-
* - Plugin-provided fetcher
|
|
39
|
+
* Promise<import("../../webUi-featureOptions.mjs").DeviceListResult>) | undefined} args.getDevices
|
|
40
|
+
* - Plugin-provided fetcher resolving a controller's DeviceListResult. Called on controller-link click.
|
|
39
41
|
* @param {string} args.labelControllers - Section header label for the controllers list.
|
|
40
42
|
* @param {string} args.labelDevices - Section header label for the devices list.
|
|
41
|
-
* @param {{ request: (path: string) => Promise<unknown> }} args.host - Homebridge bridge (used to fetch the error message on connection failure).
|
|
42
43
|
* @param {HTMLElement} args.rootControllers - The `#controllersContainer` element.
|
|
43
44
|
* @param {HTMLElement} args.rootDevices - The `#devicesContainer` element.
|
|
44
45
|
* @param {AbortSignal} args.signal - Lifecycle signal.
|
|
45
46
|
* @param {import("../store.mjs").FeatureOptionsStore} args.store - The store.
|
|
46
47
|
*/
|
|
47
|
-
export const mountNavView = ({ getDevices,
|
|
48
|
+
export const mountNavView = ({ getDevices, labelControllers, labelDevices, rootControllers, rootDevices, signal, store }) => {
|
|
48
49
|
|
|
49
50
|
// Controllers container rebuilds on model:loaded (initial mode/controllers), plus controllers:loaded - a controllers-only refresh hook not currently dispatched.
|
|
50
51
|
effect({
|
|
@@ -96,8 +97,14 @@ export const mountNavView = ({ getDevices, host, labelControllers, labelDevices,
|
|
|
96
97
|
store
|
|
97
98
|
});
|
|
98
99
|
|
|
100
|
+
// Per-mount fetch generation for the controller-click handler. Held as a mutable reference (not a plain number) because handleNavClick is module-scope: a number
|
|
101
|
+
// would be copied by value into the call, defeating the guard. The closure-held object mirrors the connection-error view's retryAbort per-mount state. Each
|
|
102
|
+
// controller click captures the incremented generation before its fetch; a continuation whose generation no longer matches has been superseded by a newer click and
|
|
103
|
+
// discards its result.
|
|
104
|
+
const clickFetch = { generation: 0 };
|
|
105
|
+
|
|
99
106
|
// Click delegation: one listener on each container resolves the clicked nav link's `data-navigation` and dispatches the appropriate scope-change.
|
|
100
|
-
const onClick = (event) => handleNavClick({ event, getDevices,
|
|
107
|
+
const onClick = (event) => handleNavClick({ clickFetch, event, getDevices, signal, store });
|
|
101
108
|
|
|
102
109
|
rootControllers.addEventListener("click", onClick, { signal });
|
|
103
110
|
rootDevices.addEventListener("click", onClick, { signal });
|
|
@@ -122,7 +129,7 @@ const sectionHeader = (label) => createElement("h6", {
|
|
|
122
129
|
}, [label]);
|
|
123
130
|
|
|
124
131
|
// Append a labeled section to a container: an optional header followed by one rendered node per item. The header renders only when the section has at least one item,
|
|
125
|
-
// so a section that heads nothing emits no header. This is the single enforcement point for the "a header labels a non-empty section"
|
|
132
|
+
// so a section that heads nothing emits no header. This is the single enforcement point for the "a header labels a non-empty section" rule - it makes an orphan
|
|
126
133
|
// header (a label with no items beneath it) unrepresentable regardless of which list a caller renders, which is what keeps a fully-grouped device set from showing a
|
|
127
134
|
// standalone top-level header that labels nothing.
|
|
128
135
|
const appendSection = ({ items, label, render, root }) => {
|
|
@@ -164,7 +171,7 @@ const buildControllersList = ({ controllerLabel, mode, root, state }) => {
|
|
|
164
171
|
|
|
165
172
|
// The controllers section. In controller-based mode there is always at least one controller by the time the sidebar builds (the orchestrator shows the
|
|
166
173
|
// no-controllers message and never mounts the nav otherwise), so the non-empty guard is belt-and-suspenders here - but routing through appendSection keeps every
|
|
167
|
-
// section under one
|
|
174
|
+
// section under one rule rather than special-casing this one.
|
|
168
175
|
appendSection({
|
|
169
176
|
|
|
170
177
|
items: state.controllers,
|
|
@@ -175,7 +182,7 @@ const buildControllersList = ({ controllerLabel, mode, root, state }) => {
|
|
|
175
182
|
};
|
|
176
183
|
|
|
177
184
|
// Build the devices container. The ungrouped devices form the top-level section under the device label; each sidebarGroup forms its own section in alphabetical order.
|
|
178
|
-
// Because the device-label header renders only when there is at least one ungrouped device (the appendSection
|
|
185
|
+
// Because the device-label header renders only when there is at least one ungrouped device (the appendSection rule), a fully-grouped device set - every device
|
|
179
186
|
// carrying a sidebarGroup - shows its group headers alone, with no orphan top-level device header. Controllers are excluded from group derivation (their link lives in
|
|
180
187
|
// the controllers container above); the reserved "hidden" group excludes devices from the sidebar entirely.
|
|
181
188
|
const buildDevicesList = ({ catalog, deviceLabel, devices, root }) => {
|
|
@@ -238,8 +245,8 @@ const applyDevicesHighlight = (root, scope) => {
|
|
|
238
245
|
};
|
|
239
246
|
|
|
240
247
|
// Handle a click on any nav link. Resolves the click target's `data-navigation` and dispatches the corresponding scope-change. Controller clicks additionally
|
|
241
|
-
// fetch the new controller's
|
|
242
|
-
const handleNavClick = async ({ event, getDevices,
|
|
248
|
+
// fetch the new controller's DeviceListResult via the caller-supplied `getDevices` callback.
|
|
249
|
+
const handleNavClick = async ({ clickFetch, event, getDevices, signal, store }) => {
|
|
243
250
|
|
|
244
251
|
const navLink = event.target.closest(".nav-link[data-navigation]");
|
|
245
252
|
|
|
@@ -264,8 +271,8 @@ const handleNavClick = async ({ event, getDevices, host, signal, store }) => {
|
|
|
264
271
|
|
|
265
272
|
case "controller": {
|
|
266
273
|
|
|
267
|
-
// Optimistic scope update before the fetch so the sidebar highlight repaints immediately. If the
|
|
268
|
-
//
|
|
274
|
+
// Optimistic scope update before the fetch so the sidebar highlight repaints immediately. If the result carries a failure message we transition to
|
|
275
|
+
// connection:error; if it carries devices we select the controller-as-device entry (the first device in the returned list).
|
|
269
276
|
store.dispatch({ scope: { controllerId: deviceSerial, kind: "controller" }, type: "scope:changed" });
|
|
270
277
|
|
|
271
278
|
if(!getDevices) {
|
|
@@ -273,43 +280,50 @@ const handleNavClick = async ({ event, getDevices, host, signal, store }) => {
|
|
|
273
280
|
return;
|
|
274
281
|
}
|
|
275
282
|
|
|
283
|
+
// Capture this fetch's generation before awaiting. The newest click owns the store, so a continuation whose generation no longer matches has been superseded by
|
|
284
|
+
// a later click and discards its result on both settlement paths below.
|
|
285
|
+
const generation = ++clickFetch.generation;
|
|
286
|
+
|
|
276
287
|
try {
|
|
277
288
|
|
|
278
289
|
const controller = store.state.controllers.find((c) => c.serialNumber === deviceSerial);
|
|
279
|
-
const devices = await getDevices(controller ?? null);
|
|
290
|
+
const { devices, error } = await getDevices(controller ?? null);
|
|
280
291
|
|
|
281
|
-
if
|
|
292
|
+
// Bail if the page tore down or a newer click superseded this one; a stale continuation must not overwrite the newer click's rendered state.
|
|
293
|
+
if(signal.aborted || (generation !== clickFetch.generation)) {
|
|
282
294
|
|
|
283
295
|
return;
|
|
284
296
|
}
|
|
285
297
|
|
|
286
298
|
store.dispatch({ controllerId: deviceSerial, devices, type: "devices:loaded" });
|
|
287
299
|
|
|
288
|
-
if(
|
|
289
|
-
|
|
290
|
-
// No devices returned despite a controller in scope - treat as a connection failure and surface the upstream error message via the host.
|
|
291
|
-
const message = String(await host.request("/getErrorMessage") ?? "");
|
|
300
|
+
if(error.length) {
|
|
292
301
|
|
|
293
|
-
|
|
302
|
+
// The result carried a connection-failure message - hand the header to the connection-error view. The message arrived with the device-list response, so no
|
|
303
|
+
// separate request is made.
|
|
304
|
+
store.dispatch({ message: error, type: "connection:error" });
|
|
294
305
|
|
|
295
|
-
|
|
296
|
-
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
297
308
|
|
|
298
|
-
|
|
309
|
+
if(devices.length === 0) {
|
|
299
310
|
|
|
311
|
+
// A legitimately empty controller: the optimistic controller scope stands over the empty list, with no device-scope dispatch.
|
|
300
312
|
return;
|
|
301
313
|
}
|
|
302
314
|
|
|
303
315
|
// Select the controller-as-device entry (the first device in the returned list).
|
|
304
316
|
store.dispatch({ scope: { controllerId: deviceSerial, deviceId: devices[0].serialNumber, kind: "device" }, type: "scope:changed" });
|
|
305
|
-
} catch {
|
|
317
|
+
} catch(err) {
|
|
306
318
|
|
|
307
|
-
|
|
319
|
+
// The same staleness bail guards the reject path: a superseded fetch that rejects (an IPC failure, the contract-guard TypeError) must not dispatch a stale
|
|
320
|
+
// connection:error over the newer click's state. A named Error reaches the user verbatim; non-Error junk falls back to the generic sentence.
|
|
321
|
+
if(signal.aborted || (generation !== clickFetch.generation)) {
|
|
308
322
|
|
|
309
323
|
return;
|
|
310
324
|
}
|
|
311
325
|
|
|
312
|
-
store.dispatch({ message: "Failed to fetch devices.", type: "connection:error" });
|
|
326
|
+
store.dispatch({ message: (err instanceof Error) ? err.message : "Failed to fetch devices.", type: "connection:error" });
|
|
313
327
|
}
|
|
314
328
|
|
|
315
329
|
return;
|
|
@@ -259,7 +259,7 @@ export const mountOptionsView = ({ configTable, platform, signal, store }) => {
|
|
|
259
259
|
};
|
|
260
260
|
|
|
261
261
|
// Scope-aware cache invalidation for a per-option mutation. The action's `args.id` field carries the mutation's scope marker (the persisted entry-string format
|
|
262
|
-
// encodes scope by serial), so we
|
|
262
|
+
// encodes scope by serial), so we distinguish it by matching against the controllers list:
|
|
263
263
|
//
|
|
264
264
|
// - `id` undefined - global-scope mutation. Every cached view inherits from global. Drop every entry.
|
|
265
265
|
// - `id` matches a controller's serial - controller-scope mutation. Every cached device-view under this controller inherits from it. Drop entries whose key
|
|
@@ -375,7 +375,7 @@ const buildCategoryShells = ({ configTable, state }) => {
|
|
|
375
375
|
configTable.appendChild(fragment);
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
// Materialize the rows for a single category.
|
|
378
|
+
// Materialize the rows for a single category. Guarded by dataset.rowsRendered - re-opening an already-built category is a no-op for materialization.
|
|
379
379
|
const ensureRowsRendered = ({ details, state }) => {
|
|
380
380
|
|
|
381
381
|
if(details.dataset.rowsRendered === "true") {
|
|
@@ -138,7 +138,7 @@ export const mountSearchView = ({ configTable, root, signal, store }) => {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
-
// Build the panel DOM and fill the `refs` record with element pointers that update functions consult later. One-time call;
|
|
141
|
+
// Build the panel DOM and fill the `refs` record with element pointers that update functions consult later. One-time call; safe to repeat only insofar as it reassigns
|
|
142
142
|
// `refs` fields (the panel itself is rebuilt fresh, replacing any prior content).
|
|
143
143
|
const buildPanel = ({ refs, root }) => {
|
|
144
144
|
|
|
@@ -350,7 +350,7 @@ const handleClick = ({ configTable, event, refs, store }) => {
|
|
|
350
350
|
// On bulk expand, synchronously drive the options view's capture-phase `toggle` handler so each category's rows materialize in the SAME layout pass as the open,
|
|
351
351
|
// rather than the open reflowing first and the async native `toggle` task materializing in a second pass. Collapsing the opens and materializations into one
|
|
352
352
|
// settled height change keeps the host's iframe-resize ResizeObserver from cascading ("ResizeObserver loop completed with undelivered notifications"). Row
|
|
353
|
-
// materialization
|
|
353
|
+
// materialization only runs once, so the native async toggle that follows is a no-op. Collapse needs no synthetic toggle - hiding rows is already one reflow.
|
|
354
354
|
if(shouldExpand) {
|
|
355
355
|
|
|
356
356
|
details.dispatchEvent(new Event("toggle"));
|