homebridge-plugin-utils 2.1.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 (38) hide show
  1. package/build/tsconfig.json +15 -0
  2. package/dist/cli/index.d.ts +20 -3
  3. package/dist/cli/index.js +77 -7
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/docChrome.d.ts +4 -1
  6. package/dist/docChrome.js +3 -0
  7. package/dist/docChrome.js.map +1 -1
  8. package/dist/ffmpeg/fmp4-builders.d.ts +77 -0
  9. package/dist/ffmpeg/fmp4-builders.js +163 -0
  10. package/dist/ffmpeg/fmp4-builders.js.map +1 -0
  11. package/dist/ffmpeg/index.d.ts +1 -0
  12. package/dist/ffmpeg/index.js +1 -0
  13. package/dist/ffmpeg/index.js.map +1 -1
  14. package/dist/ffmpeg/options.d.ts +17 -0
  15. package/dist/ffmpeg/options.js +47 -22
  16. package/dist/ffmpeg/options.js.map +1 -1
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +2 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/timer-registry.d.ts +100 -0
  21. package/dist/timer-registry.js +184 -0
  22. package/dist/timer-registry.js.map +1 -0
  23. package/dist/ui/webUi-featureOptions/state.mjs +68 -11
  24. package/dist/ui/webUi-featureOptions/utils.mjs +16 -5
  25. package/dist/ui/webUi-featureOptions/views/connectionError.mjs +27 -10
  26. package/dist/ui/webUi-featureOptions/views/deviceInfo.mjs +7 -0
  27. package/dist/ui/webUi-featureOptions/views/header.mjs +22 -5
  28. package/dist/ui/webUi-featureOptions/views/nav.mjs +31 -38
  29. package/dist/ui/webUi-featureOptions/views/options.mjs +11 -5
  30. package/dist/ui/webUi-featureOptions.mjs +66 -43
  31. package/dist/ui/webUi.mjs +5 -0
  32. package/dist/util.d.ts +29 -4
  33. package/dist/util.js +34 -0
  34. package/dist/util.js.map +1 -1
  35. package/dist/webui-loader.d.ts +80 -0
  36. package/dist/webui-loader.js +373 -0
  37. package/dist/webui-loader.js.map +1 -0
  38. package/package.json +4 -4
@@ -1,6 +1,7 @@
1
1
  export * from "./codecs.ts";
2
2
  export * from "./dgram-util.ts";
3
3
  export * from "./exec.ts";
4
+ export * from "./fmp4-builders.ts";
4
5
  export * from "./fmp4.ts";
5
6
  export * from "./hap-enums.ts";
6
7
  export * from "./mp4-assembler.ts";
@@ -5,6 +5,7 @@
5
5
  export * from "./codecs.js";
6
6
  export * from "./dgram-util.js";
7
7
  export * from "./exec.js";
8
+ export * from "./fmp4-builders.js";
8
9
  export * from "./fmp4.js";
9
10
  export * from "./hap-enums.js";
10
11
  export * from "./mp4-assembler.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ffmpeg/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ffmpeg/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -134,6 +134,9 @@ export interface AudioEncoderOptions {
134
134
  * VideoToolbox (`-q:v 90`), and Intel QSV (`-global_quality 20`). Intel VideoToolbox and v4l2m2m have no quality-constraint mode and
135
135
  * always emit a fixed `-b:v` regardless. In all cases, `smartQuality` also adds `HOMEKIT_STREAMING_HEADROOM` to `-maxrate`, giving the
136
136
  * encoder a narrow band of variation above the target bitrate. Defaults to `true`.
137
+ * @property videoFilters - Optional. Caller-supplied CPU-side video filters appended at the tail of the composed filter chain, in caller order.
138
+ * When the encoder's own chain leaves frames GPU-resident at that point, the encoder inserts its platform's download transfer first, so
139
+ * callers never reason about GPU residency. Omitted or empty means the chain is exactly the encoder's own.
137
140
  * @property width - Output video width, in pixels.
138
141
  *
139
142
  * @example
@@ -175,6 +178,7 @@ export interface VideoEncoderOptions {
175
178
  level: H264Level;
176
179
  profile: H264Profile;
177
180
  smartQuality?: boolean;
181
+ videoFilters?: readonly string[];
178
182
  width: number;
179
183
  }
180
184
  /**
@@ -324,6 +328,19 @@ export declare class FfmpegOptions {
324
328
  * ```
325
329
  */
326
330
  streamEncoder(options: VideoEncoderOptions): string[];
331
+ /**
332
+ * Reports whether the given transcode context runs on the host's hardware encoder in this instance's resolved configuration. Live streaming uses the hardware
333
+ * encoder whenever transcoding is resolved on; HKSV recording additionally excludes Raspberry Pi, whose h264_v4l2m2m encoder is unreliable for event recording - a
334
+ * matter separate from the FFmpeg-7+ h264_v4l2m2m decoder regression noted in #configureRaspbianHwAccel, which affects decoding only. The answer reads the resolved
335
+ * class config set in the constructor by #configureHwAccel, before any encoder method is callable.
336
+ *
337
+ * The encoder choice, the source ceiling, and any consumer narration or policy all read this one predicate, so they can never disagree about a given context, and
338
+ * relaxing the raspbian exclusion here flips every one of them together with no consumer change.
339
+ *
340
+ * @param context - The transcode context whose hardware-encoder use is queried.
341
+ * @returns `true` when `context` runs on the host's hardware encoder in the resolved configuration, `false` when it software-encodes.
342
+ */
343
+ hardwareEncodes(context: EncoderContext): boolean;
327
344
  /**
328
345
  * Returns the maximum source pixel count the host's hardware transcode pipeline can ingest for the given encoding context, or `Infinity` when unconstrained.
329
346
  *
@@ -623,12 +623,17 @@ export class FfmpegOptions {
623
623
  }
624
624
  /**
625
625
  * Generate the appropriate scale filter for the current platform. This method returns platform-specific scale filters to leverage hardware acceleration capabilities
626
- * where available.
626
+ * where available, and reports whether the chosen scaler leaves frames in GPU memory. The residency fact travels with the filters so the one switch that picks the
627
+ * scaler is also the single source of where the frames live afterward - the hardware-stream context reads it to decide whether appended CPU-side filters need a
628
+ * download transfer bridged in ahead of them.
627
629
  */
628
630
  #getScaleFilter(options) {
629
631
  // Determine the target dimensions for our scale operation. We maintain aspect ratio while ensuring the output doesn't exceed the requested height.
630
632
  const targetHeight = options.height.toString();
631
633
  const filters = [];
634
+ // Whether the scaler chosen below leaves frames on the GPU. Software scalers are CPU-resident, so this stays false unless a hardware scaler (scale_vt, vpp_qsv) sets
635
+ // it - the fact the hardware-stream context reads to decide whether a caller's CPU-side filters need a download transfer bridged in ahead of them.
636
+ let gpuResident = false;
632
637
  // Our default software scaler.
633
638
  const swScale = "scale=-2:min(ih\\, " + targetHeight + ")" + ":in_range=auto:out_range=auto";
634
639
  // Add any required hardware transfer filters first. This ensures we're in the correct memory context before scaling.
@@ -645,8 +650,9 @@ export class FfmpegOptions {
645
650
  if (this.#codecSupport.ffmpegAtLeast(8) && options.hardwareTranscoding) {
646
651
  // On macOS with FFmpeg 8.x, we can use the VideoToolbox scaler (scale_vt) which provides hardware-accelerated scaling. This is significantly more efficient
647
652
  // than software scaling and can handle higher throughput with lower CPU usage. Prior to FFmpeg 8.0, this would break under a variety of scenarios and was
648
- // unreliable.
653
+ // unreliable. scale_vt runs on the GPU and leaves its output there.
649
654
  filters.push("scale_vt=-2:min(ih\\, " + targetHeight + ")");
655
+ gpuResident = true;
650
656
  }
651
657
  else {
652
658
  // Fall back to software scaling with explicit pixel format conversion.
@@ -668,13 +674,15 @@ export class FfmpegOptions {
668
674
  "w=min(iw\\, (iw / ih) * " + options.height.toString() + ")",
669
675
  "h=min(ih\\, " + options.height.toString() + ")"
670
676
  ].join(":"));
677
+ // vpp_qsv is a GPU post-processing filter and leaves its output on the GPU.
678
+ gpuResident = true;
671
679
  }
672
680
  else {
673
681
  filters.push(swScale);
674
682
  }
675
683
  break;
676
684
  }
677
- return filters;
685
+ return { filters, gpuResident };
678
686
  }
679
687
  // Generates the default set of FFmpeg video encoder arguments for software transcoding using libx264. Builds command-line options based on the provided encoder
680
688
  // options - bitrate, H.264 profile and level, pixel format, frame rate, buffer size, and optional smart quality settings. Used internally when hardware-accelerated
@@ -708,6 +716,8 @@ export class FfmpegOptions {
708
716
  else {
709
717
  videoFilters.push(...pixelFilters, ...(options.fps > options.inputFps ? fpsFilter : []));
710
718
  }
719
+ // The caller's filters go at the tail. This libx264 chain is CPU-resident at its tail, so they need no download transfer bridged in ahead of them.
720
+ videoFilters.push(...options.videoFilters);
711
721
  // Default to the tried-and-true libx264. We use the following options by default:
712
722
  //
713
723
  // -codec:v libx264 Use the excellent libx264 H.264 encoder.
@@ -768,7 +778,7 @@ export class FfmpegOptions {
768
778
  const recordingInput = { ...options, smartQuality: false };
769
779
  // Recording falls back to software wherever it can't use the hardware encoder (Raspberry Pi today). This is the same predicate maxSourcePixels("record") consults, so
770
780
  // the encoder choice and the source ceiling are guaranteed consistent and evolve together when the upstream v4l2m2m regression is fixed.
771
- if (!this.#hardwareEncodes("record")) {
781
+ if (!this.hardwareEncodes("record")) {
772
782
  return this.#defaultVideoEncoderOptions(this.#resolveEncoderOptions(recordingInput));
773
783
  }
774
784
  return this.streamEncoder(recordingInput);
@@ -818,19 +828,22 @@ export class FfmpegOptions {
818
828
  *
819
829
  * `??` coalesces undefined (whether from omission or explicit-undefined spread) to the class default; `&&` then clamps against the resolved class capability so a
820
830
  * caller can only ever downgrade a flag, never upgrade one. `smartQuality` has no class-level counterpart and no clamp - it defaults to `true` when the caller omits
821
- * it and passes through otherwise. The result satisfies `Required<Pick<...>>` at the type level *and* at runtime because the formula produces a concrete boolean on
822
- * every branch; there is no code path that can leave a resolver-guaranteed field undefined.
831
+ * it and passes through otherwise. `videoFilters` likewise has no clamp - it normalizes to an empty array on omission, so downstream code always reads a definite
832
+ * `readonly string[]` and never re-derives an undefined guard. The result satisfies `Required<Pick<...>>` at the type level *and* at runtime because the formula
833
+ * produces a concrete value on every branch; there is no code path that can leave a resolver-guaranteed field undefined.
823
834
  *
824
835
  * @param options - The caller-supplied encoder options.
825
- * @returns A resolved options object with defaults filled in and hardware flags clamped against the resolved class config. The three resolver-guaranteed fields
826
- * (`hardwareDecoding`, `hardwareTranscoding`, `smartQuality`) are narrowed to `Required` in the return type so downstream handlers see definite booleans.
836
+ * @returns A resolved options object with defaults filled in and hardware flags clamped against the resolved class config. The resolver-guaranteed fields
837
+ * (`hardwareDecoding`, `hardwareTranscoding`, `smartQuality`, `videoFilters`) are narrowed to `Required` in the return type so downstream handlers see
838
+ * definite booleans and a definite `readonly string[]`.
827
839
  */
828
840
  #resolveEncoderOptions(options) {
829
841
  return {
830
842
  ...options,
831
843
  hardwareDecoding: (options.hardwareDecoding ?? this.config.hardwareDecoding) && this.config.hardwareDecoding,
832
844
  hardwareTranscoding: (options.hardwareTranscoding ?? this.config.hardwareTranscoding) && this.config.hardwareTranscoding,
833
- smartQuality: options.smartQuality ?? true
845
+ smartQuality: options.smartQuality ?? true,
846
+ videoFilters: options.videoFilters ?? []
834
847
  };
835
848
  }
836
849
  /**
@@ -840,16 +853,22 @@ export class FfmpegOptions {
840
853
  * - `bufsize`, `gop`, `maxrate` are the pre-formatted rate-control strings every hardware handler splices directly into its `-bufsize` / `-g:v` / `-maxrate` args.
841
854
  * Sourced from the module-scope `bufsizeArg` / `gopArg` / `maxrateArg` helpers so the software and hardware paths share one derivation of each.
842
855
  * - `filterChain` is the comma-joined `-filter:v` value. Crop sits first when configured (CPU-side filter), then the platform-specific scaler (which may prepend its
843
- * own transfer filters; see `getScaleFilter`).
856
+ * own transfer filters; see `getScaleFilter`), and finally the caller's `videoFilters` at the tail, preceded by a download transfer when the scaler left frames on
857
+ * the GPU.
844
858
  * - `frameRateArg` materializes the `...(fps !== inputFps ? ["-r", fps] : [])` conditional once so every handler can splat it directly.
845
859
  * - `init` is the platform-specific hardware-device init args (`-init_hw_device` / `-filter_hw_device`, emitted only for SW-decode + HW-encode on FFmpeg 8.x macOS
846
860
  * and on generic QSV hosts). Prepended by the dispatcher before the handler's output.
847
861
  */
848
862
  #hardwareStreamContext(options) {
849
- const videoFilters = [
850
- ...this.#cropFilterSegment,
851
- ...this.#getScaleFilter(options)
852
- ];
863
+ // Compose the encoder's own chain: crop (CPU-side) first when configured, then the platform scaler, which also reports whether it left frames on the GPU.
864
+ const { filters: scaleFilters, gpuResident } = this.#getScaleFilter(options);
865
+ const videoFilters = [...this.#cropFilterSegment, ...scaleFilters];
866
+ // The caller's filters run CPU-side, so they go at the tail. When the scaler left frames in GPU memory, the platform's own download transfer bridges them back to
867
+ // system memory first - reached with a purpose-built flags view that says "frames are in hardware memory, the next stage is CPU-side", so the per-platform download
868
+ // vocabulary stays in one home and no version or hardware-flag check is restated here.
869
+ if (options.videoFilters.length) {
870
+ videoFilters.push(...(gpuResident ? this.#getHardwareTransferFilters({ hardwareDecoding: true, hardwareTranscoding: false }) : []), ...options.videoFilters);
871
+ }
853
872
  return {
854
873
  bufsize: bufsizeArg(options),
855
874
  filterChain: videoFilters.join(", "),
@@ -965,13 +984,19 @@ export class FfmpegOptions {
965
984
  }
966
985
  return args;
967
986
  }
968
- // The single source of truth for "does this transcode context run on the hardware encoder on THIS host, in the resolved class config?". Live streaming uses the
969
- // hardware encoder whenever transcoding is enabled; HKSV recording additionally excludes Raspberry Pi, whose h264_v4l2m2m encoder is unreliable for event recording
970
- // for reasons separate from the FFmpeg-7+ h264_v4l2m2m decoder regression noted in #configureRaspbianHwAccel, which affects decoding only. Both recordEncoder and
971
- // maxSourcePixels consult this, so the encoder choice and the source ceiling can never disagree - if the encoder is ever validated as reliable for event recording,
972
- // relaxing the raspbian exclusion here flips both together with no consumer change. Reads the resolved class config (set in the constructor by #configureHwAccel,
973
- // before any encoder method is callable), matching the class-level decision recordEncoder has always made.
974
- #hardwareEncodes(context) {
987
+ /**
988
+ * Reports whether the given transcode context runs on the host's hardware encoder in this instance's resolved configuration. Live streaming uses the hardware
989
+ * encoder whenever transcoding is resolved on; HKSV recording additionally excludes Raspberry Pi, whose h264_v4l2m2m encoder is unreliable for event recording - a
990
+ * matter separate from the FFmpeg-7+ h264_v4l2m2m decoder regression noted in #configureRaspbianHwAccel, which affects decoding only. The answer reads the resolved
991
+ * class config set in the constructor by #configureHwAccel, before any encoder method is callable.
992
+ *
993
+ * The encoder choice, the source ceiling, and any consumer narration or policy all read this one predicate, so they can never disagree about a given context, and
994
+ * relaxing the raspbian exclusion here flips every one of them together with no consumer change.
995
+ *
996
+ * @param context - The transcode context whose hardware-encoder use is queried.
997
+ * @returns `true` when `context` runs on the host's hardware encoder in the resolved configuration, `false` when it software-encodes.
998
+ */
999
+ hardwareEncodes(context) {
975
1000
  if (!this.config.hardwareTranscoding) {
976
1001
  return false;
977
1002
  }
@@ -987,7 +1012,7 @@ export class FfmpegOptions {
987
1012
  * @returns Maximum supported source pixel count for `context`.
988
1013
  */
989
1014
  maxSourcePixels(context) {
990
- return (this.#hardwareEncodes(context) && (this.#codecSupport.hostSystem === "raspbian")) ? RPI4_HW_TRANSCODE_MAX_PIXELS : Infinity;
1015
+ return (this.hardwareEncodes(context) && (this.#codecSupport.hostSystem === "raspbian")) ? RPI4_HW_TRANSCODE_MAX_PIXELS : Infinity;
991
1016
  }
992
1017
  // Translates HomeKit's `H264Level` enum into the string or numeric form FFmpeg's `-level:v` accepts. `numeric=true` returns the v4l2m2m form (e.g. "31"); the default
993
1018
  // returns the canonical string form (e.g. "3.1"). Indexed lookup against `H264_LEVEL_NAMES`, declared `as const satisfies Record<H264Level, ...>` so a new enum member
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/ffmpeg/options.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAIzD,qKAAqK;AACrK,qKAAqK;AACrK,qJAAqJ;AACrJ,MAAM,SAAS,GACb,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAC5C,MAAM,WAAW,GACf,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAMpC,wKAAwK;AACxK,qKAAqK;AACrK,yKAAyK;AACzK,MAAM,gBAAgB,GAAG;IAEvB,CAAE,SAAS,CAAC,QAAQ,CAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IACxD,CAAE,SAAS,CAAC,QAAQ,CAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IACxD,CAAE,SAAS,CAAC,QAAQ,CAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;CACiB,CAAC;AAE5E,MAAM,kBAAkB,GAAG;IAEzB,CAAE,WAAW,CAAC,QAAQ,CAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;IAC/D,CAAE,WAAW,CAAC,IAAI,CAAE,EAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;I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rC,CAAC;aAAM,CAAC;YAEN,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QACzC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;OAWG;IACI,eAAe,CAAC,OAAuB;QAE5C,IAAG,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAEpC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;OAQG;IACI,eAAe,CAAC,OAAuB;QAE5C,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrI,CAAC;IAED,sKAAsK;IACtK,uKAAuK;IACvK,2CAA2C;IAC3C,aAAa,CAAC,KAAgB,EAAE,OAAO,GAAG,KAAK;QAE7C,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,mKAAmK;IACnK,oKAAoK;IACpK,2DAA2D;IAC3D,eAAe,CAAC,OAAoB,EAAE,OAAO,GAAG,KAAK;QAEnD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACrE,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -7,7 +7,9 @@ export * from "./featureOptions-docs.ts";
7
7
  export * from "./homebridge-enums.ts";
8
8
  export * from "./mqttClient.ts";
9
9
  export * from "./service.ts";
10
+ export * from "./timer-registry.ts";
10
11
  export * from "./util.ts";
12
+ export * from "./webui-loader.ts";
11
13
  export * from "./ffmpeg/index.ts";
12
14
  export * from "./logclient/index.ts";
13
15
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -11,7 +11,9 @@ export * from "./featureOptions-docs.js";
11
11
  export * from "./homebridge-enums.js";
12
12
  export * from "./mqttClient.js";
13
13
  export * from "./service.js";
14
+ export * from "./timer-registry.js";
14
15
  export * from "./util.js";
16
+ export * from "./webui-loader.js";
15
17
  export * from "./ffmpeg/index.js";
16
18
  export * from "./logclient/index.js";
17
19
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Construction options for {@link TimerRegistry}.
3
+ *
4
+ * @category Utilities
5
+ */
6
+ export interface TimerRegistryOptions {
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