homebridge-plugin-utils 2.0.0 → 2.2.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 (99) hide show
  1. package/build/tsconfig.json +15 -0
  2. package/dist/backpressure.d.ts +1 -1
  3. package/dist/backpressure.js +4 -4
  4. package/dist/backpressure.js.map +1 -1
  5. package/dist/cli/index.d.ts +93 -5
  6. package/dist/cli/index.js +296 -30
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/clock-double.js +2 -2
  9. package/dist/clock-double.js.map +1 -1
  10. package/dist/disposable-stack.d.ts +59 -0
  11. package/dist/disposable-stack.js +155 -0
  12. package/dist/disposable-stack.js.map +1 -0
  13. package/dist/docChrome.d.ts +263 -0
  14. package/dist/docChrome.js +364 -0
  15. package/dist/docChrome.js.map +1 -0
  16. package/dist/featureOptions-docs.d.ts +2 -2
  17. package/dist/featureOptions-docs.js +1 -1
  18. package/dist/featureOptions.d.ts +5 -5
  19. package/dist/featureOptions.js +6 -6
  20. package/dist/ffmpeg/exec.d.ts +2 -2
  21. package/dist/ffmpeg/exec.js +2 -2
  22. package/dist/ffmpeg/fmp4-builders.d.ts +77 -0
  23. package/dist/ffmpeg/fmp4-builders.js +163 -0
  24. package/dist/ffmpeg/fmp4-builders.js.map +1 -0
  25. package/dist/ffmpeg/index.d.ts +1 -0
  26. package/dist/ffmpeg/index.js +1 -0
  27. package/dist/ffmpeg/index.js.map +1 -1
  28. package/dist/ffmpeg/mp4-assembler.d.ts +45 -4
  29. package/dist/ffmpeg/mp4-assembler.js +45 -8
  30. package/dist/ffmpeg/mp4-assembler.js.map +1 -1
  31. package/dist/ffmpeg/mp4-parser.d.ts +1 -1
  32. package/dist/ffmpeg/mp4-parser.js +1 -1
  33. package/dist/ffmpeg/options.d.ts +17 -0
  34. package/dist/ffmpeg/options.js +50 -25
  35. package/dist/ffmpeg/options.js.map +1 -1
  36. package/dist/ffmpeg/process.d.ts +1 -1
  37. package/dist/ffmpeg/process.js +4 -4
  38. package/dist/ffmpeg/process.js.map +1 -1
  39. package/dist/ffmpeg/record.d.ts +26 -1
  40. package/dist/ffmpeg/record.js +12 -0
  41. package/dist/ffmpeg/record.js.map +1 -1
  42. package/dist/ffmpeg/recording-process-double.d.ts +13 -0
  43. package/dist/ffmpeg/recording-process-double.js +22 -0
  44. package/dist/ffmpeg/recording-process-double.js.map +1 -1
  45. package/dist/ffmpeg/rtp-parser.d.ts +1 -1
  46. package/dist/ffmpeg/rtp-parser.js +1 -1
  47. package/dist/ffmpeg/rtp.d.ts +4 -4
  48. package/dist/ffmpeg/rtp.js +7 -6
  49. package/dist/ffmpeg/rtp.js.map +1 -1
  50. package/dist/ffmpeg/stream.js +1 -1
  51. package/dist/ffmpeg/stream.js.map +1 -1
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.js +3 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/logclient/auth.d.ts +3 -3
  56. package/dist/logclient/auth.js +2 -2
  57. package/dist/logclient/auth.js.map +1 -1
  58. package/dist/logclient/cli-run.js +2 -2
  59. package/dist/logclient/cli-run.js.map +1 -1
  60. package/dist/logclient/cli.js +2 -2
  61. package/dist/logclient/client.js +2 -2
  62. package/dist/logclient/client.js.map +1 -1
  63. package/dist/logclient/rest.js +1 -1
  64. package/dist/logclient/socket-double.d.ts +1 -1
  65. package/dist/logclient/socket-double.js +1 -1
  66. package/dist/logclient/socket.js +5 -5
  67. package/dist/logclient/socket.js.map +1 -1
  68. package/dist/logclient/time-window.d.ts +1 -1
  69. package/dist/mqttClient.d.ts +1 -1
  70. package/dist/mqttClient.js +3 -3
  71. package/dist/mqttClient.js.map +1 -1
  72. package/dist/timer-registry.d.ts +100 -0
  73. package/dist/timer-registry.js +184 -0
  74. package/dist/timer-registry.js.map +1 -0
  75. package/dist/ui/featureOptions.js +6 -6
  76. package/dist/ui/pluginConfigSession.mjs +1 -1
  77. package/dist/ui/webUi-featureOptions/effects/persist.mjs +2 -2
  78. package/dist/ui/webUi-featureOptions/effects/theme.mjs +1 -1
  79. package/dist/ui/webUi-featureOptions/effects/tokens.mjs +1 -1
  80. package/dist/ui/webUi-featureOptions/rendering.mjs +2 -2
  81. package/dist/ui/webUi-featureOptions/selectors.mjs +3 -3
  82. package/dist/ui/webUi-featureOptions/state.mjs +72 -15
  83. package/dist/ui/webUi-featureOptions/store.mjs +1 -1
  84. package/dist/ui/webUi-featureOptions/utils.mjs +25 -1
  85. package/dist/ui/webUi-featureOptions/views/connectionError.mjs +28 -11
  86. package/dist/ui/webUi-featureOptions/views/deviceInfo.mjs +7 -0
  87. package/dist/ui/webUi-featureOptions/views/header.mjs +22 -5
  88. package/dist/ui/webUi-featureOptions/views/nav.mjs +39 -32
  89. package/dist/ui/webUi-featureOptions/views/options.mjs +13 -7
  90. package/dist/ui/webUi-featureOptions/views/search.mjs +2 -2
  91. package/dist/ui/webUi-featureOptions.mjs +109 -61
  92. package/dist/ui/webUi.mjs +48 -11
  93. package/dist/util.d.ts +118 -16
  94. package/dist/util.js +96 -14
  95. package/dist/util.js.map +1 -1
  96. package/dist/webui-loader.d.ts +80 -0
  97. package/dist/webui-loader.js +373 -0
  98. package/dist/webui-loader.js.map +1 -0
  99. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"socket.js","sourceRoot":"","sources":["../../src/logclient/socket.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACpJ,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,kBAAkB,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC1G,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ElB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QAEtB,IAAG,OAAO,CAAC,EAAE,CAAC,UAAU,KAAK,cAAc,EAAE,CAAC;YAE5C,IAAI,CAAC;gBAEH,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,kBAAkB,GAAG,GAAG,CAAC,CAAC;YACnD,CAAC;YAAC,MAAM,CAAC;gBAEP,yHAAyH;YAC3H,CAAC;QACH,CAAC;QAED,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,mKAAmK;IACnK,uFAAuF;IACvF,eAAe,CAAC,EAAiB;QAE/B,IAAI,CAAC;YAEH,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YAEP,0GAA0G;QAC5G,CAAC;IACH,CAAC;IAED,uKAAuK;IACvK,wKAAwK;IACxK,8HAA8H;IAC9H,SAAS;QAEP,IAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAE/B,IAAI,CAAC,aAAa,CAAC,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 load-bearing detail. A record with no parseable instant (a `null` timestamp, or text in an unrecognized locale) is a continuation line of a
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
@@ -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` remains a class invariant) and then immediately runs the regular teardown path.
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}.
@@ -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` remains a class invariant) and then immediately runs the regular teardown path.
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 discriminate via `error.cause` rather than matching on
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
- // invariant that lets TypeScript drop every non-null assertion in the live paths.
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);
@@ -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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erRegistryOptions {
7
+ /**
8
+ * A lifetime signal. When it aborts, the registry drains every pending timer and every later registration becomes inert; a signal already aborted at construction time
9
+ * means the registry is born disposed. Omit it for a registry whose only lifetime bound is an explicit `dispose()`.
10
+ */
11
+ signal?: AbortSignal;
12
+ }
13
+ /**
14
+ * A lifetime-bounded registry of callback timers: keyed one-shots and intervals, plus anonymous tracked one-shots.
15
+ *
16
+ * The surface is minimal on purpose:
17
+ *
18
+ * - `setTimeout(key, callback, delay)` / `setInterval(key, callback, interval)` arm a keyed timer. Registering under a key that already holds a timer - of either
19
+ * kind - clears the prior timer first, so the newest intent for a key wins. A keyed one-shot removes its entry before firing; a keyed interval repeats until cleared.
20
+ * - `schedule(callback, delay)` arms an anonymous one-shot: tracked for disposal, self-removing on fire, never replacing anything, so concurrent anonymous timers
21
+ * coexist.
22
+ * - `clear(key)` cancels and removes a keyed timer; `has(key)` reports whether one is currently armed.
23
+ * - `dispose()` (and `[Symbol.dispose]`) drains every pending timer and retires the registry: subsequent registrations are no-ops. An `options.signal` binds the same
24
+ * drain to the owner's lifetime, so the owner never has to unwire the registry by hand at teardown.
25
+ *
26
+ * This is a `Disposable` (synchronous) rather than `AsyncDisposable` because cancelling a timer is synchronous; there is no background work to await.
27
+ *
28
+ * @example
29
+ *
30
+ * ```ts
31
+ * using timers = new TimerRegistry({ signal: this.signal });
32
+ *
33
+ * timers.setTimeout("relock", () => this.relock(), 5000);
34
+ * timers.setInterval("heartbeat", () => this.beat(), 1000);
35
+ * timers.schedule(() => this.settle(), 50);
36
+ * ```
37
+ *
38
+ * @category Utilities
39
+ */
40
+ export declare class TimerRegistry implements Disposable {
41
+ #private;
42
+ /**
43
+ * Construct a registry. Construction schedules no timers. When `options.signal` is supplied, the abort handler is wired through {@link onAbort} last, against the
44
+ * already-initialized containers and flag; a signal already aborted at that point disposes the registry synchronously here, so it is born drained and inert.
45
+ *
46
+ * @param options - See {@link TimerRegistryOptions}.
47
+ */
48
+ constructor(options?: TimerRegistryOptions);
49
+ /**
50
+ * Arm a keyed one-shot. Any timer already armed under `key` - one-shot or interval - is cleared first, so registering under a key declares the current intent for it
51
+ * and the newest intent wins. The entry is removed BEFORE the callback runs, so the callback, and anything it triggers, reads `has(key)` as `false` for a fired timer.
52
+ * A no-op once the registry is disposed or its lifetime signal has aborted.
53
+ *
54
+ * @param key - The identity under which the timer is tracked; a later registration under the same key replaces this one.
55
+ * @param callback - The function to run once, after `delay`.
56
+ * @param delay - The delay, in milliseconds.
57
+ */
58
+ setTimeout(key: string, callback: () => void, delay: number): void;
59
+ /**
60
+ * Arm a keyed repeating timer. Any timer already armed under `key` - one-shot or interval - is cleared first, the same replace-on-register rule as {@link setTimeout}.
61
+ * The entry persists across fires until {@link clear} removes it or the registry is disposed. A no-op once the registry is disposed or its lifetime signal has aborted.
62
+ *
63
+ * @param key - The identity under which the timer is tracked; a later registration under the same key replaces this one.
64
+ * @param callback - The function to run on every interval.
65
+ * @param interval - The interval, in milliseconds.
66
+ */
67
+ setInterval(key: string, callback: () => void, interval: number): void;
68
+ /**
69
+ * Arm an anonymous one-shot: tracked for disposal, self-removing on fire, and never replacing anything. Concurrent anonymous timers coexist; this is the shape for
70
+ * fire-and-forget work that has no identity to replace. A no-op once the registry is disposed or its lifetime signal has aborted.
71
+ *
72
+ * @param callback - The function to run once, after `delay`.
73
+ * @param delay - The delay, in milliseconds.
74
+ */
75
+ schedule(callback: () => void, delay: number): void;
76
+ /**
77
+ * Cancel and remove the keyed timer under `key`. Silently does nothing when no timer is armed under the key.
78
+ *
79
+ * @param key - The identity to clear.
80
+ */
81
+ clear(key: string): void;
82
+ /**
83
+ * Whether a keyed timer is currently armed under `key`.
84
+ *
85
+ * @param key - The identity to test.
86
+ *
87
+ * @returns `true` when a keyed timer is armed under `key`, otherwise `false`.
88
+ */
89
+ has(key: string): boolean;
90
+ /**
91
+ * Clear every pending timer, keyed and anonymous, and retire the registry: after disposal every registration method is a no-op, so a timer can never arm against a
92
+ * torn-down owner. Disposal is a no-op on repeat.
93
+ */
94
+ dispose(): void;
95
+ /**
96
+ * `Disposable` implementation, delegating to {@link dispose} so the registry composes with `using` declarations and disposer stacks.
97
+ */
98
+ [Symbol.dispose](): void;
99
+ }
100
+ //# sourceMappingURL=timer-registry.d.ts.map
@@ -0,0 +1,184 @@
1
+ /* Copyright(C) 2017-2026, HJD (https://github.com/hjdhjd). All rights reserved.
2
+ *
3
+ * timer-registry.ts: A lifetime-bounded registry of callback timers - keyed one-shots and intervals plus anonymous one-shots - armed, fired, and drained as one.
4
+ */
5
+ /**
6
+ * A lifetime-bounded registry of callback timers.
7
+ *
8
+ * A long-lived owner - a HomeKit accessory, a controller subsystem - accumulates timers it must all cancel when it tears down: keyed one-shots that a later registration
9
+ * under the same key should replace, keyed intervals that repeat until cleared, and anonymous fire-and-forget one-shots with no identity to replace. This registry holds
10
+ * all three under one disposal story. Arming a keyed timer replaces any prior timer under that key; a keyed one-shot removes its own entry before firing, so the callback
11
+ * reads the key as already gone; an anonymous one-shot self-removes on fire; and `dispose()`, or an aborted lifetime signal, drains every pending timer and makes every
12
+ * later registration inert, so a timer can never outlive the owner it was armed against.
13
+ *
14
+ * This is the callback-timer half of the library's time mechanisms: `Clock` owns awaited, promise-shaped delays, and this registry owns callback timers - one mechanism
15
+ * per shape, neither reaching into the other's territory.
16
+ *
17
+ * @module
18
+ */
19
+ import { onAbort } from "./util.js";
20
+ /**
21
+ * A lifetime-bounded registry of callback timers: keyed one-shots and intervals, plus anonymous tracked one-shots.
22
+ *
23
+ * The surface is minimal on purpose:
24
+ *
25
+ * - `setTimeout(key, callback, delay)` / `setInterval(key, callback, interval)` arm a keyed timer. Registering under a key that already holds a timer - of either
26
+ * kind - clears the prior timer first, so the newest intent for a key wins. A keyed one-shot removes its entry before firing; a keyed interval repeats until cleared.
27
+ * - `schedule(callback, delay)` arms an anonymous one-shot: tracked for disposal, self-removing on fire, never replacing anything, so concurrent anonymous timers
28
+ * coexist.
29
+ * - `clear(key)` cancels and removes a keyed timer; `has(key)` reports whether one is currently armed.
30
+ * - `dispose()` (and `[Symbol.dispose]`) drains every pending timer and retires the registry: subsequent registrations are no-ops. An `options.signal` binds the same
31
+ * drain to the owner's lifetime, so the owner never has to unwire the registry by hand at teardown.
32
+ *
33
+ * This is a `Disposable` (synchronous) rather than `AsyncDisposable` because cancelling a timer is synchronous; there is no background work to await.
34
+ *
35
+ * @example
36
+ *
37
+ * ```ts
38
+ * using timers = new TimerRegistry({ signal: this.signal });
39
+ *
40
+ * timers.setTimeout("relock", () => this.relock(), 5000);
41
+ * timers.setInterval("heartbeat", () => this.beat(), 1000);
42
+ * timers.schedule(() => this.settle(), 50);
43
+ * ```
44
+ *
45
+ * @category Utilities
46
+ */
47
+ export class TimerRegistry {
48
+ // Keyed timers, one-shots and intervals alike: a key holds at most one live timer, so registering under a key replaces whatever it held.
49
+ #keyed = new Map();
50
+ // Anonymous one-shots, tracked only so disposal can drain them: no key, no replacement, each self-removing when it fires.
51
+ #anonymous = new Set();
52
+ // Flipped once by `dispose()`. A disposed registry drains nothing further and arms nothing further.
53
+ #disposed = false;
54
+ // The lifetime signal, when one was supplied. Registration guards read its aborted state so a registration racing the abort cascade cannot arm a timer that would
55
+ // outlive the drain.
56
+ #signal;
57
+ // The abort-listener handle. Disposing it inside `dispose()` detaches the listener from a long-lived composed signal, so a registry disposed directly does not leave a
58
+ // handler attached to a signal that outlives it.
59
+ #abortRegistration;
60
+ /**
61
+ * Construct a registry. Construction schedules no timers. When `options.signal` is supplied, the abort handler is wired through {@link onAbort} last, against the
62
+ * already-initialized containers and flag; a signal already aborted at that point disposes the registry synchronously here, so it is born drained and inert.
63
+ *
64
+ * @param options - See {@link TimerRegistryOptions}.
65
+ */
66
+ constructor(options = {}) {
67
+ this.#signal = options.signal;
68
+ // Wire the abort handler last, against fully-initialized fields, because `onAbort` runs the handler inline for an already-aborted signal - that inline call disposes
69
+ // the registry mid-construction, which is exactly the born-disposed outcome.
70
+ if (this.#signal !== undefined) {
71
+ this.#abortRegistration = onAbort(this.#signal, () => this.dispose());
72
+ }
73
+ }
74
+ /**
75
+ * Arm a keyed one-shot. Any timer already armed under `key` - one-shot or interval - is cleared first, so registering under a key declares the current intent for it
76
+ * and the newest intent wins. The entry is removed BEFORE the callback runs, so the callback, and anything it triggers, reads `has(key)` as `false` for a fired timer.
77
+ * A no-op once the registry is disposed or its lifetime signal has aborted.
78
+ *
79
+ * @param key - The identity under which the timer is tracked; a later registration under the same key replaces this one.
80
+ * @param callback - The function to run once, after `delay`.
81
+ * @param delay - The delay, in milliseconds.
82
+ */
83
+ setTimeout(key, callback, delay) {
84
+ if (this.#disposed || (this.#signal?.aborted ?? false)) {
85
+ return;
86
+ }
87
+ this.clear(key);
88
+ // Call the GLOBAL `setTimeout`, not the `node:timers` binding, so any harness that replaces the globals - including `node:test` `mock.timers` - observes every timer
89
+ // this registry arms.
90
+ const handle = setTimeout(() => {
91
+ // Remove the entry before running the callback, so a fired one-shot reads as absent to the callback and to anything the callback triggers.
92
+ this.#keyed.delete(key);
93
+ callback();
94
+ }, delay);
95
+ this.#keyed.set(key, handle);
96
+ }
97
+ /**
98
+ * Arm a keyed repeating timer. Any timer already armed under `key` - one-shot or interval - is cleared first, the same replace-on-register rule as {@link setTimeout}.
99
+ * The entry persists across fires until {@link clear} removes it or the registry is disposed. A no-op once the registry is disposed or its lifetime signal has aborted.
100
+ *
101
+ * @param key - The identity under which the timer is tracked; a later registration under the same key replaces this one.
102
+ * @param callback - The function to run on every interval.
103
+ * @param interval - The interval, in milliseconds.
104
+ */
105
+ setInterval(key, callback, interval) {
106
+ if (this.#disposed || (this.#signal?.aborted ?? false)) {
107
+ return;
108
+ }
109
+ this.clear(key);
110
+ // The GLOBAL `setInterval`, for the same harness-visibility reason as the keyed one-shot. The entry is not removed on fire: an interval repeats until it is cleared
111
+ // or drained.
112
+ const handle = setInterval(callback, interval);
113
+ this.#keyed.set(key, handle);
114
+ }
115
+ /**
116
+ * Arm an anonymous one-shot: tracked for disposal, self-removing on fire, and never replacing anything. Concurrent anonymous timers coexist; this is the shape for
117
+ * fire-and-forget work that has no identity to replace. A no-op once the registry is disposed or its lifetime signal has aborted.
118
+ *
119
+ * @param callback - The function to run once, after `delay`.
120
+ * @param delay - The delay, in milliseconds.
121
+ */
122
+ schedule(callback, delay) {
123
+ if (this.#disposed || (this.#signal?.aborted ?? false)) {
124
+ return;
125
+ }
126
+ // The GLOBAL `setTimeout`, for the same harness-visibility reason as the keyed timers. The handle self-removes before the callback runs, matching the keyed
127
+ // one-shot's ordering; an anonymous timer has no key or handle to query, so that ordering carries no public observable and is stated here rather than pinned by test.
128
+ const handle = setTimeout(() => {
129
+ this.#anonymous.delete(handle);
130
+ callback();
131
+ }, delay);
132
+ this.#anonymous.add(handle);
133
+ }
134
+ /**
135
+ * Cancel and remove the keyed timer under `key`. Silently does nothing when no timer is armed under the key.
136
+ *
137
+ * @param key - The identity to clear.
138
+ */
139
+ clear(key) {
140
+ const handle = this.#keyed.get(key);
141
+ if (handle !== undefined) {
142
+ // `clearTimeout` cancels both one-shots and intervals - Node holds them in a single pool - so one call clears whichever kind the key held.
143
+ clearTimeout(handle);
144
+ this.#keyed.delete(key);
145
+ }
146
+ }
147
+ /**
148
+ * Whether a keyed timer is currently armed under `key`.
149
+ *
150
+ * @param key - The identity to test.
151
+ *
152
+ * @returns `true` when a keyed timer is armed under `key`, otherwise `false`.
153
+ */
154
+ has(key) {
155
+ return this.#keyed.has(key);
156
+ }
157
+ /**
158
+ * Clear every pending timer, keyed and anonymous, and retire the registry: after disposal every registration method is a no-op, so a timer can never arm against a
159
+ * torn-down owner. Disposal is a no-op on repeat.
160
+ */
161
+ dispose() {
162
+ if (this.#disposed) {
163
+ return;
164
+ }
165
+ this.#disposed = true;
166
+ for (const handle of this.#keyed.values()) {
167
+ clearTimeout(handle);
168
+ }
169
+ this.#keyed.clear();
170
+ for (const handle of this.#anonymous) {
171
+ clearTimeout(handle);
172
+ }
173
+ this.#anonymous.clear();
174
+ // Detach the abort listener so a long-lived composed signal retains no handler for a registry that has already been disposed.
175
+ this.#abortRegistration?.[Symbol.dispose]();
176
+ }
177
+ /**
178
+ * `Disposable` implementation, delegating to {@link dispose} so the registry composes with `using` declarations and disposer stacks.
179
+ */
180
+ [Symbol.dispose]() {
181
+ this.dispose();
182
+ }
183
+ }
184
+ //# sourceMappingURL=timer-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timer-registry.js","sourceRoot":"","sources":["../src/timer-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,aAAa;IAExB,yIAAyI;IAChI,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEpD,0HAA0H;IACjH,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEhD,oGAAoG;IACpG,SAAS,GAAG,KAAK,CAAC;IAElB,kKAAkK;IAClK,qBAAqB;IACZ,OAAO,CAA0B;IAE1C,uKAAuK;IACvK,iDAAiD;IACxC,kBAAkB,CAAyB;IAEpD;;;;;OAKG;IACH,YAAmB,UAAgC,EAAE;QAEnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAE9B,qKAAqK;QACrK,6EAA6E;QAC7E,IAAG,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAE9B,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACI,UAAU,CAAC,GAAW,EAAE,QAAoB,EAAE,KAAa;QAEhE,IAAG,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;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AAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAW;QAEtB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEpC,IAAG,MAAM,KAAK,SAAS,EAAE,CAAC;YAExB,2IAA2I;YAC3I,YAAY,CAAC,MAAM,CAAC,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACI,GAAG,CAAC,GAAW;QAEpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,OAAO;QAEZ,IAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAElB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,KAAI,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YAEzC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAEpB,KAAI,MAAM,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAEpC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAExB,8HAA8H;QAC9H,IAAI,CAAC,kBAAkB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,CAAC,MAAM,CAAC,OAAO,CAAC;QAErB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACF"}
@@ -136,7 +136,7 @@ function entryAddressesScope({ catalog, rawEntry, 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 invariant across those mutations. Categories without an entry in the options map are skipped silently (a plugin defines a category for
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 an idempotent reset.
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 invariant across config mutations and need not be touched here.
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 invariant across config mutations and need not be touched here.
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 invariant the pure functional core relies on. The public getter returns the
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 invariant across config mutations; only the lookup index needs rebuilding.
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 is not load-bearing against a torn write here - the only I/O is the first statement - but it keeps this method's shape
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 invariant the serialization rests on: every subscribed store mutation
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 invariant
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
- // load-bearing one - it is a native property, so a leftover `dark` value would tint default form-control and scrollbar rendering on whatever content occupies the
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 invariants the tokens encode:
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 discriminator; every scope kind maps to its own label.
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 idempotent and safe to re-run on every projection change, which is what lets a toggle re-color a modified option's label
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 discriminator, or null when no controller is in context. Pure helper - one-line discriminant read, not memoized.
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 discriminator, or null when the scope is global or controller-only. Pure helper - one-line discriminant read, not
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 discriminator.
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) => {