homebridge-plugin-utils 1.35.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/README.md +130 -2
- package/build/eslint-plugin/README.md +164 -0
- package/build/eslint-plugin/config.mjs +308 -0
- package/build/eslint-plugin/index.mjs +7 -0
- package/build/eslint-plugin/plugin.mjs +46 -0
- package/build/eslint-plugin/rules/blank-line-after-open-brace.mjs +137 -0
- package/build/eslint-plugin/rules/blank-line-after-open-brace.test.mjs +112 -0
- package/build/eslint-plugin/rules/comment-style.mjs +190 -0
- package/build/eslint-plugin/rules/comment-style.test.mjs +190 -0
- package/build/eslint-plugin/rules/enforce-node-protocol.mjs +114 -0
- package/build/eslint-plugin/rules/enforce-node-protocol.test.mjs +116 -0
- package/build/eslint-plugin/rules/paren-comparisons-in-logical.mjs +94 -0
- package/build/eslint-plugin/rules/paren-comparisons-in-logical.test.mjs +107 -0
- package/build/eslint-plugin/rules/split-type-imports.mjs +354 -0
- package/build/eslint-plugin/rules/split-type-imports.test.mjs +268 -0
- package/build/eslint-plugin/test-setup.mjs +21 -0
- package/build/fs-ops.mjs +184 -0
- package/build/tsconfig.json +18 -3
- package/dist/backpressure.d.ts +94 -45
- package/dist/backpressure.js +229 -93
- package/dist/backpressure.js.map +1 -1
- package/dist/cli/index.d.ts +166 -0
- package/dist/cli/index.js +551 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/clock-double.d.ts +93 -0
- package/dist/clock-double.js +141 -0
- package/dist/clock-double.js.map +1 -0
- package/dist/clock.d.ts +39 -0
- package/dist/clock.js +34 -0
- package/dist/clock.js.map +1 -0
- 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/eslint-plugin/config.d.mts +193 -0
- package/dist/eslint-plugin/index.d.mts +2 -0
- package/dist/eslint-plugin/plugin.d.mts +87 -0
- package/dist/eslint-plugin/rules/blank-line-after-open-brace.d.mts +19 -0
- package/dist/eslint-plugin/rules/comment-style.d.mts +15 -0
- package/dist/eslint-plugin/rules/enforce-node-protocol.d.mts +18 -0
- package/dist/eslint-plugin/rules/paren-comparisons-in-logical.d.mts +15 -0
- package/dist/eslint-plugin/rules/split-type-imports.d.mts +16 -0
- package/dist/featureOptions-docs.d.ts +96 -0
- package/dist/featureOptions-docs.js +193 -0
- package/dist/featureOptions-docs.js.map +1 -0
- package/dist/featureOptions.d.ts +674 -0
- package/dist/featureOptions.js +870 -0
- package/dist/featureOptions.js.map +1 -0
- package/dist/ffmpeg/codecs.d.ts +256 -72
- package/dist/ffmpeg/codecs.js +477 -262
- package/dist/ffmpeg/codecs.js.map +1 -1
- package/dist/ffmpeg/dgram-util.d.ts +46 -0
- package/dist/ffmpeg/dgram-util.js +38 -0
- package/dist/ffmpeg/dgram-util.js.map +1 -0
- package/dist/ffmpeg/exec.d.ts +83 -64
- package/dist/ffmpeg/exec.js +77 -86
- package/dist/ffmpeg/exec.js.map +1 -1
- package/dist/ffmpeg/fmp4.d.ts +49 -2
- package/dist/ffmpeg/fmp4.js +47 -11
- package/dist/ffmpeg/fmp4.js.map +1 -1
- package/dist/ffmpeg/hap-enums.d.ts +214 -0
- package/dist/ffmpeg/hap-enums.js +92 -0
- package/dist/ffmpeg/hap-enums.js.map +1 -0
- package/dist/ffmpeg/index.d.ts +16 -9
- package/dist/ffmpeg/index.js +6 -0
- package/dist/ffmpeg/index.js.map +1 -1
- package/dist/ffmpeg/mp4-assembler.d.ts +161 -0
- package/dist/ffmpeg/mp4-assembler.js +424 -0
- package/dist/ffmpeg/mp4-assembler.js.map +1 -0
- package/dist/ffmpeg/mp4-parser.d.ts +94 -0
- package/dist/ffmpeg/mp4-parser.js +130 -0
- package/dist/ffmpeg/mp4-parser.js.map +1 -0
- package/dist/ffmpeg/options.d.ts +62 -149
- package/dist/ffmpeg/options.js +608 -499
- package/dist/ffmpeg/options.js.map +1 -1
- package/dist/ffmpeg/process.d.ts +142 -96
- package/dist/ffmpeg/process.js +406 -278
- package/dist/ffmpeg/process.js.map +1 -1
- package/dist/ffmpeg/record.d.ts +325 -186
- package/dist/ffmpeg/record.js +418 -565
- package/dist/ffmpeg/record.js.map +1 -1
- package/dist/ffmpeg/recording-process-double.d.ts +157 -0
- package/dist/ffmpeg/recording-process-double.js +190 -0
- package/dist/ffmpeg/recording-process-double.js.map +1 -0
- package/dist/ffmpeg/rtp-parser.d.ts +70 -0
- package/dist/ffmpeg/rtp-parser.js +77 -0
- package/dist/ffmpeg/rtp-parser.js.map +1 -0
- package/dist/ffmpeg/rtp.d.ts +198 -141
- package/dist/ffmpeg/rtp.js +474 -251
- package/dist/ffmpeg/rtp.js.map +1 -1
- package/dist/ffmpeg/settings.d.ts +5 -2
- package/dist/ffmpeg/settings.js +20 -5
- package/dist/ffmpeg/settings.js.map +1 -1
- package/dist/ffmpeg/stream.d.ts +57 -107
- package/dist/ffmpeg/stream.js +121 -150
- package/dist/ffmpeg/stream.js.map +1 -1
- package/dist/formatters.d.ts +106 -0
- package/dist/formatters.js +174 -0
- package/dist/formatters.js.map +1 -0
- package/dist/homebridge-enums.d.ts +30 -0
- package/dist/homebridge-enums.js +17 -0
- package/dist/homebridge-enums.js.map +1 -0
- package/dist/index.d.ts +13 -6
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/logclient/auth.d.ts +114 -0
- package/dist/logclient/auth.js +199 -0
- package/dist/logclient/auth.js.map +1 -0
- package/dist/logclient/cli-run.d.ts +76 -0
- package/dist/logclient/cli-run.js +639 -0
- package/dist/logclient/cli-run.js.map +1 -0
- package/dist/logclient/cli.d.ts +3 -0
- package/dist/logclient/cli.js +97 -0
- package/dist/logclient/cli.js.map +1 -0
- package/dist/logclient/client.d.ts +145 -0
- package/dist/logclient/client.js +600 -0
- package/dist/logclient/client.js.map +1 -0
- package/dist/logclient/config.d.ts +173 -0
- package/dist/logclient/config.js +199 -0
- package/dist/logclient/config.js.map +1 -0
- package/dist/logclient/endpoints.d.ts +54 -0
- package/dist/logclient/endpoints.js +73 -0
- package/dist/logclient/endpoints.js.map +1 -0
- package/dist/logclient/filter.d.ts +45 -0
- package/dist/logclient/filter.js +51 -0
- package/dist/logclient/filter.js.map +1 -0
- package/dist/logclient/frame.d.ts +93 -0
- package/dist/logclient/frame.js +203 -0
- package/dist/logclient/frame.js.map +1 -0
- package/dist/logclient/index.d.ts +31 -0
- package/dist/logclient/index.js +12 -0
- package/dist/logclient/index.js.map +1 -0
- package/dist/logclient/parser.d.ts +211 -0
- package/dist/logclient/parser.js +393 -0
- package/dist/logclient/parser.js.map +1 -0
- package/dist/logclient/rest.d.ts +41 -0
- package/dist/logclient/rest.js +111 -0
- package/dist/logclient/rest.js.map +1 -0
- package/dist/logclient/settings.d.ts +15 -0
- package/dist/logclient/settings.js +64 -0
- package/dist/logclient/settings.js.map +1 -0
- package/dist/logclient/socket-double.d.ts +201 -0
- package/dist/logclient/socket-double.js +384 -0
- package/dist/logclient/socket-double.js.map +1 -0
- package/dist/logclient/socket.d.ts +257 -0
- package/dist/logclient/socket.js +620 -0
- package/dist/logclient/socket.js.map +1 -0
- package/dist/logclient/stitch.d.ts +83 -0
- package/dist/logclient/stitch.js +146 -0
- package/dist/logclient/stitch.js.map +1 -0
- package/dist/logclient/time-expression.d.ts +42 -0
- package/dist/logclient/time-expression.js +181 -0
- package/dist/logclient/time-expression.js.map +1 -0
- package/dist/logclient/time-window.d.ts +38 -0
- package/dist/logclient/time-window.js +53 -0
- package/dist/logclient/time-window.js.map +1 -0
- package/dist/logclient/types.d.ts +107 -0
- package/dist/logclient/types.js +6 -0
- package/dist/logclient/types.js.map +1 -0
- package/dist/mqttClient.d.ts +287 -0
- package/dist/mqttClient.js +433 -0
- package/dist/mqttClient.js.map +1 -0
- package/dist/service.d.ts +64 -15
- package/dist/service.js +93 -66
- package/dist/service.js.map +1 -1
- package/dist/ui/featureOptions.js +870 -0
- package/dist/ui/featureOptions.js.map +1 -0
- package/dist/ui/formatters.js +174 -0
- package/dist/ui/formatters.js.map +1 -0
- package/dist/ui/pluginConfigSession.mjs +141 -0
- package/dist/ui/webUi-featureOptions/categoryState.mjs +135 -0
- package/dist/ui/webUi-featureOptions/effects/keyboard.mjs +61 -0
- package/dist/ui/webUi-featureOptions/effects/persist.mjs +226 -0
- package/dist/ui/webUi-featureOptions/effects/theme.mjs +398 -0
- package/dist/ui/webUi-featureOptions/effects/tokens.mjs +152 -0
- package/dist/ui/webUi-featureOptions/rendering.mjs +431 -0
- package/dist/ui/webUi-featureOptions/selectors.mjs +360 -0
- package/dist/ui/webUi-featureOptions/state.mjs +319 -0
- package/dist/ui/webUi-featureOptions/store.mjs +181 -0
- package/dist/ui/webUi-featureOptions/utils.mjs +213 -0
- package/dist/ui/webUi-featureOptions/views/connectionError.mjs +152 -0
- package/dist/ui/webUi-featureOptions/views/deviceInfo.mjs +80 -0
- package/dist/ui/webUi-featureOptions/views/header.mjs +77 -0
- package/dist/ui/webUi-featureOptions/views/nav.mjs +341 -0
- package/dist/ui/webUi-featureOptions/views/options.mjs +521 -0
- package/dist/ui/webUi-featureOptions/views/search.mjs +395 -0
- package/dist/ui/webUi-featureOptions.mjs +702 -0
- package/dist/ui/webUi.mjs +225 -88
- package/dist/util.d.ts +679 -45
- package/dist/util.js +830 -77
- package/dist/util.js.map +1 -1
- package/package.json +33 -15
- package/build/eslint-rules.mjs +0 -511
- package/dist/featureoptions.d.ts +0 -264
- package/dist/featureoptions.js +0 -480
- package/dist/featureoptions.js.map +0 -1
- package/dist/mqttclient.d.ts +0 -178
- package/dist/mqttclient.js +0 -310
- package/dist/mqttclient.js.map +0 -1
- package/dist/ui/featureoptions.js +0 -480
- package/dist/ui/featureoptions.js.map +0 -1
- package/dist/ui/webUi-featureoptions.mjs +0 -3765
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-run.js","sour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AAG,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC9B,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QAEF,MAAM,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAE7B,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* Copyright(C) 2017-2026, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* logclient/cli.ts: The hblog bin - a node:-builtins-only shell that realpath-resolves its own directory and dynamic-imports the engine logic.
|
|
5
|
+
*/
|
|
6
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
7
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
8
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
9
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return path;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The `hblog` command-line bin.
|
|
16
|
+
*
|
|
17
|
+
* This module is deliberately minimal and node:-builtins-only at the static-import level. A bin is invoked through an npm-managed symlink in `node_modules/.bin`; if it
|
|
18
|
+
* statically imported a sibling module by relative path, that import would resolve against the symlink's directory under symlink-preserving or copied-package layouts and
|
|
19
|
+
* fracture. So the bin imports only `node:` builtins for value, takes the engine's type via an erased `import type` (which the compiler strips entirely from the emitted
|
|
20
|
+
* output), and reaches the actual CLI logic ({@link runHblog} in `cli-run.ts`) through a realpath-canonicalized DYNAMIC import of a computed file URL.
|
|
21
|
+
*
|
|
22
|
+
* This design is robust because:
|
|
23
|
+
*
|
|
24
|
+
* - The engine is reached by a COMPUTED URL (`pathToFileURL(join(dir, "cli-run.js")).href`), so the TypeScript compiler never tries to resolve it - which matters because
|
|
25
|
+
* `npm run typecheck` runs with no `dist/` present and before the build. A static `import { runHblog } from "./cli-run.ts"` would emit a `./cli-run.js` value import
|
|
26
|
+
* that fractures under symlinks; a static self-specifier (`homebridge-plugin-utils/logclient`) would resolve through the package `exports` map to a `dist/` path that
|
|
27
|
+
* does not exist at typecheck time. The computed dynamic import sidesteps both.
|
|
28
|
+
* - The directory the engine is loaded from is the bin's OWN real directory, recovered with `realpathSync` exactly the way `cli/index.ts` recovers its source root, so
|
|
29
|
+
* the symlink indirection is collapsed before the join and the engine loads from the real package layout under every install mode.
|
|
30
|
+
*
|
|
31
|
+
* The programmatic API ({@link logclient/client!HomebridgeLogClient | HomebridgeLogClient}) rides the existing package barrel; only the bin uses this dynamic-import
|
|
32
|
+
* path.
|
|
33
|
+
*
|
|
34
|
+
* @module
|
|
35
|
+
*/
|
|
36
|
+
import { dirname, join } from "node:path";
|
|
37
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
38
|
+
import { realpathSync } from "node:fs";
|
|
39
|
+
/**
|
|
40
|
+
* Decide whether this module is the program entry point (run as the `hblog` bin) versus imported as a library. Canonicalizes the real path of both the launch path
|
|
41
|
+
* (`process.argv[1]`) and this module's own URL before comparing them.
|
|
42
|
+
*
|
|
43
|
+
* The realpath normalization is required, exactly as in `cli/index.ts`: npm exposes a bin as a symlink in `node_modules/.bin`, so under default Node the launch path
|
|
44
|
+
* is the symlink while `import.meta.url` is the resolved target - a raw string comparison never matches and the bin silently does nothing. Canonicalizing both sides
|
|
45
|
+
* collapses that indirection (and any `file:`-dependency, copied-package, or `--preserve-symlinks` layout) to a single real path. We keep this explicit realpath
|
|
46
|
+
* comparison rather than deferring to `import.meta.main`: the symlink and copied-package indirection above is the concern the entry-point check exists to
|
|
47
|
+
* handle, and resolving it explicitly keeps that handling visible at the call site.
|
|
48
|
+
*
|
|
49
|
+
* @returns `true` when invoked as the program entry, `false` when imported or when the launch path cannot be resolved.
|
|
50
|
+
*/
|
|
51
|
+
function isEntryPoint() {
|
|
52
|
+
const entryPath = process.argv[1];
|
|
53
|
+
if (!entryPath) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
return realpathSync(entryPath) === realpathSync(fileURLToPath(import.meta.url));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// A realpath throws only when a path does not resolve on disk - not a state a genuine entry-point invocation reaches, so treat it as "not the entry."
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Execute the bin when this module is the program entry point. When imported instead, `isEntryPoint()` is false and this module is inert (it exports nothing).
|
|
65
|
+
if (isEntryPoint()) {
|
|
66
|
+
// Recover the bin's own real directory, collapsing any symlink indirection, then load the engine from the real `cli-run.js` beside it via a computed file URL. The
|
|
67
|
+
// dynamic import target is a runtime-computed URL, so the compiler never resolves it (no `dist/` needed at typecheck) and the path is correct under every symlink mode.
|
|
68
|
+
const directory = dirname(realpathSync(fileURLToPath(import.meta.url)));
|
|
69
|
+
const engineUrl = pathToFileURL(join(directory, "cli-run.js")).href;
|
|
70
|
+
// The dynamic import resolves to the engine module; we type the result through the erased `import type` so the binding is fully typed without a value import. The
|
|
71
|
+
// computed-URL import is `any` to the compiler (it cannot resolve a non-literal specifier), so the assertion narrows it to the engine's known shape.
|
|
72
|
+
const engine = await import(__rewriteRelativeImportExtension(engineUrl));
|
|
73
|
+
// Absorb a broken-pipe (`EPIPE`) error on stdout at the process level. A downstream reader that closes early - `hblog | head`, or quitting `less` early - breaks the
|
|
74
|
+
// pipe, and the write that discovers it emits an `error` on `process.stdout`. The engine traps that during its run to stop cleanly, but because the process exits by
|
|
75
|
+
// draining the event loop (rather than calling `process.exit`), Node's final flush of any still-buffered output re-attempts the write to the dead pipe AFTER the engine
|
|
76
|
+
// has removed its own trap - and an `error` with no listener is a fatal unhandled exception. This persistent, process-lifetime listener is the safety net for exactly
|
|
77
|
+
// that window: it makes a broken pipe a quiet, successful stop. It is deliberately a no-op, not a re-thrower: a stdout error during the run also reaches the engine's
|
|
78
|
+
// trap on this same event (emit fires every listener), and that trap is the single place that classifies errors - a benign `EPIPE` as a clean stop, an `ENOSPC` and the
|
|
79
|
+
// like as a failure. Re-throwing here would pre-empt that classification and crash the run.
|
|
80
|
+
process.stdout.on("error", () => {
|
|
81
|
+
// Intentionally empty: swallowing the event is the whole point - it keeps a broken pipe from ever surfacing as a fatal unhandled `error`. See the rationale above.
|
|
82
|
+
});
|
|
83
|
+
// Record the exit code the CLI decided (0 success / clean signal / help / version, 1 connection or auth failure, 2 usage error) on `process.exitCode`, then let the
|
|
84
|
+
// process exit on its own once the event loop empties. We deliberately do NOT call `process.exit`: it terminates immediately and discards whatever is still buffered in
|
|
85
|
+
// an asynchronous stdout - the pipe case, `hblog | less` - which truncates the tail of the output. A `write` returning is not the same as its bytes having reached the
|
|
86
|
+
// OS, so forcing exit races the final flush. Setting the code and returning lets Node drain stdout in full before exiting; the client and its sockets are torn down by
|
|
87
|
+
// `runHblog`'s `await using` and its signal listeners removed, so nothing keeps the loop alive once the output has flushed.
|
|
88
|
+
process.exitCode = await engine.runHblog({
|
|
89
|
+
argv: process.argv.slice(2),
|
|
90
|
+
cwd: process.cwd(),
|
|
91
|
+
env: process.env,
|
|
92
|
+
homedir: (await import("node:os")).homedir(),
|
|
93
|
+
stderr: process.stderr,
|
|
94
|
+
stdout: process.stdout
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/logclient/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;;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wKAAwK;IACxK,uKAAuK;IACvK,uKAAuK;IACvK,4HAA4H;IAC5H,OAAO,CAAC,QAAQ,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC;QAEvC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE;QAC5C,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { HomebridgePluginLogging } from "../util.ts";
|
|
2
|
+
import type { LogClientCredentials, LogQuantity, LogRecord, TailRequest } from "./types.ts";
|
|
3
|
+
import type { LogSocketFactory } from "./socket.ts";
|
|
4
|
+
/**
|
|
5
|
+
* A consumer-facing log stream: an async iterable of parsed {@link LogRecord}s that is also {@link AsyncDisposable}.
|
|
6
|
+
*
|
|
7
|
+
* Every {@link HomebridgeLogClient} channel returns one. Iterate it with `for await (const record of stream)`; dispose it with `await using stream = client.follow()` (or
|
|
8
|
+
* an early `break`) to tear down the underlying transport with no leak. The two super-interfaces capture exactly that contract: it is iterable, and it cleans up after
|
|
9
|
+
* itself when the scope exits. A plain async generator satisfies it structurally - its `[Symbol.asyncIterator]` makes it iterable and its `[Symbol.asyncDispose]` (which
|
|
10
|
+
* delegates to the generator's `return()`, running the `finally` that disposes the per-call socket) makes it disposable.
|
|
11
|
+
*
|
|
12
|
+
* @category Log Client
|
|
13
|
+
*/
|
|
14
|
+
export interface LogStream extends AsyncIterable<LogRecord>, AsyncDisposable {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Construction-time options for {@link HomebridgeLogClient}.
|
|
18
|
+
*
|
|
19
|
+
* @property credentials - The credentials used to authenticate. See {@link LogClientCredentials}.
|
|
20
|
+
* @property fetch - Optional `fetch` implementation for the auth and REST transports. Defaults to the global `fetch`. Injected so the client is testable without
|
|
21
|
+
* a live server.
|
|
22
|
+
* @property host - The hostname or IP of the homebridge-config-ui-x server. Defaults to `localhost`.
|
|
23
|
+
* @property log - Optional logger for connection lifecycle and diagnostics. Defaults to a silent no-op sink when omitted.
|
|
24
|
+
* @property port - The TCP port the server listens on. Defaults to `8581`.
|
|
25
|
+
* @property signal - Optional parent {@link AbortSignal} composed with the client's internal controller. When it aborts, every in-flight channel tears down.
|
|
26
|
+
* @property socketFactory - Optional factory seam for constructing the live-log socket. Defaults to {@link logSocketFactory}. Injected so the client is testable without
|
|
27
|
+
* a WebSocket.
|
|
28
|
+
* @property tls - When `true`, use the secure (`https`/`wss`) schemes; when `false` or omitted, plaintext (`http`/`ws`).
|
|
29
|
+
*
|
|
30
|
+
* @category Log Client
|
|
31
|
+
*/
|
|
32
|
+
export interface HomebridgeLogClientOptions {
|
|
33
|
+
readonly credentials: LogClientCredentials;
|
|
34
|
+
readonly fetch?: typeof fetch;
|
|
35
|
+
readonly host?: string;
|
|
36
|
+
readonly log?: HomebridgePluginLogging;
|
|
37
|
+
readonly port?: number;
|
|
38
|
+
readonly signal?: AbortSignal;
|
|
39
|
+
readonly socketFactory?: LogSocketFactory;
|
|
40
|
+
readonly tls?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* AsyncDisposable client for the Homebridge UI log stream.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { HomebridgeLogClient } from "homebridge-plugin-utils";
|
|
49
|
+
*
|
|
50
|
+
* await using client = new HomebridgeLogClient({ credentials: { kind: "password", password: "secret", username: "admin" }, host: "localhost" });
|
|
51
|
+
*
|
|
52
|
+
* await using stream = client.tail({ mode: "follow-history", quantity: 200 });
|
|
53
|
+
*
|
|
54
|
+
* for await (const record of stream) {
|
|
55
|
+
*
|
|
56
|
+
* process.stdout.write(record.raw + "\n");
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @category Log Client
|
|
61
|
+
*/
|
|
62
|
+
export declare class HomebridgeLogClient implements AsyncDisposable {
|
|
63
|
+
#private;
|
|
64
|
+
/**
|
|
65
|
+
* The composed abort signal representing this client's lifetime. Aborts exactly once - when the client is disposed (`[Symbol.asyncDispose]`) or the parent
|
|
66
|
+
* signal fires - and `signal.reason` names the cause. Every channel composes its per-call signal under this one, so disposing the client tears down all in-flight
|
|
67
|
+
* channels.
|
|
68
|
+
*/
|
|
69
|
+
readonly signal: AbortSignal;
|
|
70
|
+
/**
|
|
71
|
+
* Construct a new log client.
|
|
72
|
+
*
|
|
73
|
+
* Construction performs no I/O: no connection is opened and no token is acquired until a channel is invoked. The token provider closure is built here so every channel
|
|
74
|
+
* shares one authentication path.
|
|
75
|
+
*
|
|
76
|
+
* @param options - Required options. See {@link HomebridgeLogClientOptions}.
|
|
77
|
+
*/
|
|
78
|
+
constructor(options: HomebridgeLogClientOptions);
|
|
79
|
+
/**
|
|
80
|
+
* `AsyncDisposable` implementation. Aborts the client (defaulting to `"shutdown"`), which aborts every in-flight channel's per-call signal, so callers using
|
|
81
|
+
* `await using` are guaranteed all channels have begun tearing down by the time the block exits.
|
|
82
|
+
*
|
|
83
|
+
* @returns A resolved promise once the abort has been issued.
|
|
84
|
+
*/
|
|
85
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* `true` once `this.signal` has aborted. Derived from the signal; no independent state.
|
|
88
|
+
*/
|
|
89
|
+
get aborted(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Retrieve historical log lines over the REST whole-file download channel.
|
|
92
|
+
*
|
|
93
|
+
* Streams `GET .../log/download` through the parser and yields each parsed {@link LogRecord}. When `quantity` is a number, only the most recent N records are retained
|
|
94
|
+
* (via {@link takeLast}, a bounded ring so a multi-MB log is never fully materialized); when it is `"all"` (the default), every record passes through. This is the
|
|
95
|
+
* deep-history channel paid only when the caller explicitly wants history beyond the socket's ~500-line seed.
|
|
96
|
+
*
|
|
97
|
+
* @param options - Optional per-call options.
|
|
98
|
+
* @param options.quantity - How many of the most recent records to retain. Defaults to `"all"`.
|
|
99
|
+
* @param options.signal - Optional per-call abort signal composed with the client's lifetime; aborting it terminates only this stream.
|
|
100
|
+
*
|
|
101
|
+
* @returns A {@link LogStream} of historical records, oldest first.
|
|
102
|
+
*/
|
|
103
|
+
history(options?: {
|
|
104
|
+
quantity?: LogQuantity;
|
|
105
|
+
signal?: AbortSignal;
|
|
106
|
+
}): LogStream;
|
|
107
|
+
/**
|
|
108
|
+
* Live-tail the log over the socket channel.
|
|
109
|
+
*
|
|
110
|
+
* Builds a {@link LogSocketLike} through the injected factory seam and yields each parsed {@link LogRecord} the server streams - the ~500-line seed first, then
|
|
111
|
+
* genuinely new lines indefinitely. The stream terminates only when the caller stops iterating (an early `break`, which disposes the socket), the per-call signal
|
|
112
|
+
* aborts, or the client is disposed.
|
|
113
|
+
*
|
|
114
|
+
* @param options - Optional per-call options.
|
|
115
|
+
* @param options.signal - Optional per-call abort signal composed with the client's lifetime; aborting it terminates only this stream.
|
|
116
|
+
*
|
|
117
|
+
* @returns A {@link LogStream} of live records.
|
|
118
|
+
*/
|
|
119
|
+
follow(options?: {
|
|
120
|
+
signal?: AbortSignal;
|
|
121
|
+
}): LogStream;
|
|
122
|
+
/**
|
|
123
|
+
* Deliver log content over the channel selected by the {@link TailRequest} discriminated union.
|
|
124
|
+
*
|
|
125
|
+
* - `history` - delegates to {@link HomebridgeLogClient.history} with the request's quantity.
|
|
126
|
+
* - `follow` - delegates to {@link HomebridgeLogClient.follow}.
|
|
127
|
+
* - `follow-history` - the socket-first join: the socket connects and buffers its seed plus any live lines that arrive during the REST download into a bounded ring,
|
|
128
|
+
* then the REST history is downloaded and trimmed to the request's quantity, then the two are joined by {@link stitchLive} so the boundary overlap is removed without
|
|
129
|
+
* dropping a distinct live line, and finally the live stream continues. Connecting the socket first is what guarantees no live line produced during the download is
|
|
130
|
+
* lost.
|
|
131
|
+
* - `window` - the hedged-seed time-bounded channel: the socket connects and buffers its seed while a parallel abortable whole-file download runs, a strict-coverage
|
|
132
|
+
* gate decides whether the seed covers `[since, until]` (serve from the seed and abort the download) or not (fall back to the download, stitched with the seed),
|
|
133
|
+
* and the merged output is time-window-filtered. A one-shot window terminates when its content has been served; a `follow` window continues live.
|
|
134
|
+
*
|
|
135
|
+
* @param request - The request describing which content to deliver and over which channel. See {@link TailRequest}.
|
|
136
|
+
* @param options - Optional per-call options.
|
|
137
|
+
* @param options.signal - Optional per-call abort signal composed with the client's lifetime; aborting it terminates only this stream.
|
|
138
|
+
*
|
|
139
|
+
* @returns A {@link LogStream} for the selected channel.
|
|
140
|
+
*/
|
|
141
|
+
tail(request: TailRequest, options?: {
|
|
142
|
+
signal?: AbortSignal;
|
|
143
|
+
}): LogStream;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=client.d.ts.map
|