@camstack/server 1.2.732 → 1.2.733
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/CHANGELOG.md +6 -0
- package/package.json +6 -9
- package/system/dist/addon-runner.js +13 -82911
- package/system/dist/addon-runner.mjs +12 -82910
- package/system/dist/{agent-https-CDtAIEne.mjs → agent-https-D3dptveB.mjs} +1 -1
- package/system/dist/{agent-https-DKMO-__h.js → agent-https-v5uyVgpk.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +53 -15
- package/system/dist/builtins/local-network/local-network.addon.mjs +53 -15
- package/system/dist/builtins/local-network/scan/dns-wire.d.ts +6 -2
- package/system/dist/builtins/local-network/scan/scan-engine.d.ts +1 -1
- package/system/dist/builtins/local-network/scan/scan-io.d.ts +6 -0
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-Ca7JEbmu.mjs → composition-sources-Dnyu7-1p.mjs} +1 -1
- package/system/dist/{composition-sources-UQohOHgd.js → composition-sources-j_bFq7Tx.js} +1 -1
- package/system/dist/{constants-CLA4ogvA.js → constants-C6zJ_38f.js} +1 -1
- package/system/dist/{constants-iG57sUNp.mjs → constants-GDBin8zB.mjs} +1 -1
- package/system/dist/{device-ca--iHw76cR.mjs → device-ca-Bpqrad00.mjs} +1 -1
- package/system/dist/{device-ca-BUcHAAew.js → device-ca-CV9QZvoy.js} +1 -1
- package/system/dist/{dist-qO48FNMZ.js → dist-CwYYyGAB.js} +55 -82
- package/system/dist/{dist-C_cZ9rGK.mjs → dist-DcHvuBfD.mjs} +56 -77
- package/system/dist/{dns-wire-CHXO1qSl.js → dns-wire-CqgMi_uB.js} +6 -3
- package/system/dist/{dns-wire-DcL6a0L-.mjs → dns-wire-DO56tOHL.mjs} +6 -3
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-9wPOmsXd.mjs → hub-mdns-ciao-D2sU6sKd.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DDmMPZCN.js → hub-mdns-ciao-DNLnbJNG.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{restore-archive-BHVjOlza.mjs → restore-archive-BGK6EnYj.mjs} +1 -1
- package/system/dist/{restore-archive-Cravj5LG.js → restore-archive-xTqhDFkW.js} +1 -1
- package/system/dist/{retention-C_9dxCQn.mjs → retention-CXu8PB2L.mjs} +1 -1
- package/system/dist/{retention-B_eloRtb.js → retention-gQ3GIUA3.js} +1 -1
- package/system/dist/{wal-maintenance-Dw7rplkv.mjs → wal-maintenance-D7XmFaUD.mjs} +0 -0
- package/system/dist/{wal-maintenance-CfKeIQAG.js → wal-maintenance-Hwzm3DCe.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as parseMdnsMessage, i as normalizeServiceType, n as MDNS_PORT, r as buildPtrQuery, t as MDNS_GROUP } from "../../dns-wire-
|
|
3
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
1
|
+
import { Ar as isAppLinkBase, Dn as checkRoleAddress, Et as NetworkTunnelStartedDataSchema, Gi as resolveNotificationTapAddress, Kr as localNetworkCapability, Ks as errMsg, Li as resolveAppConnections, Pr as isDefaultAppConnectionEndpoint, Vi as resolveHubAddressRoles, _ as CAMSTACK_APP_LINK_ORIGIN, do as BaseAddon, dt as HUB_MDNS_TXT_KEYS, ia as shortHostname, qs as EventCategory, ut as HUB_MDNS_SERVICE_TYPE, wa as validateCustomAddress, xi as pickAppLinkHub } from "../../dist-DcHvuBfD.mjs";
|
|
2
|
+
import { a as parseMdnsMessage, i as normalizeServiceType, n as MDNS_PORT, r as buildPtrQuery, t as MDNS_GROUP } from "../../dns-wire-DO56tOHL.mjs";
|
|
3
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-D2sU6sKd.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isIP } from "node:net";
|
|
6
6
|
import * as os$1 from "node:os";
|
|
@@ -794,23 +794,52 @@ function hubLinks(interfaces) {
|
|
|
794
794
|
function instanceLabel(instance) {
|
|
795
795
|
return instance.split("._")[0] ?? instance;
|
|
796
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* One link: join 5353 on the group and ask QM, so the answer a router reflects from
|
|
799
|
+
* another VLAN (it arrives as multicast) is heard. A device on another VLAN ignores
|
|
800
|
+
* an off-link unicast-response query (RFC 6762 §11), so the old ephemeral-port QU
|
|
801
|
+
* query alone never found it. A bind or membership failure is a named skip and the
|
|
802
|
+
* link falls back to the QU query, which still finds same-link devices.
|
|
803
|
+
*/
|
|
804
|
+
async function exchangeOnLink(deps, link, groupQuery, fallbackQuery) {
|
|
805
|
+
const request = {
|
|
806
|
+
targets: [{
|
|
807
|
+
host: MDNS_GROUP,
|
|
808
|
+
port: MDNS_PORT
|
|
809
|
+
}],
|
|
810
|
+
localAddress: link.address,
|
|
811
|
+
resendAtMs: MULTICAST_RESEND_AT_MS,
|
|
812
|
+
listenMs: MULTICAST_LISTEN_MS
|
|
813
|
+
};
|
|
814
|
+
try {
|
|
815
|
+
return await deps.io.udpExchange({
|
|
816
|
+
...request,
|
|
817
|
+
payload: groupQuery,
|
|
818
|
+
bindPort: MDNS_PORT,
|
|
819
|
+
joinGroup: MDNS_GROUP
|
|
820
|
+
});
|
|
821
|
+
} catch (err) {
|
|
822
|
+
deps.logger.warn("local-network: mdns group listen skipped on link, using unicast-response query", { meta: {
|
|
823
|
+
link: link.address,
|
|
824
|
+
interface: link.name,
|
|
825
|
+
error: errMsg(err)
|
|
826
|
+
} });
|
|
827
|
+
return deps.io.udpExchange({
|
|
828
|
+
...request,
|
|
829
|
+
payload: fallbackQuery
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
797
833
|
async function runMdns(deps, entries, subnets, c) {
|
|
798
834
|
if (entries.length === 0) return;
|
|
799
|
-
const
|
|
835
|
+
const types = [...new Set(entries.map((e) => normalizeServiceType(e.mode.serviceType)))];
|
|
836
|
+
const query = buildPtrQuery(types);
|
|
837
|
+
const groupQuery = buildPtrQuery(types, { unicastResponse: false });
|
|
800
838
|
const replies = [];
|
|
801
839
|
const links = hubLinks(deps.interfaces());
|
|
802
840
|
for (const link of links) {
|
|
803
841
|
bucket(c, "mdns").probed += 1;
|
|
804
|
-
replies.push(...await deps
|
|
805
|
-
payload: query,
|
|
806
|
-
targets: [{
|
|
807
|
-
host: MDNS_GROUP,
|
|
808
|
-
port: MDNS_PORT
|
|
809
|
-
}],
|
|
810
|
-
localAddress: link.address,
|
|
811
|
-
resendAtMs: MULTICAST_RESEND_AT_MS,
|
|
812
|
-
listenMs: MULTICAST_LISTEN_MS
|
|
813
|
-
}));
|
|
842
|
+
replies.push(...await exchangeOnLink(deps, link, groupQuery, query));
|
|
814
843
|
}
|
|
815
844
|
const extraHosts = extraHostsOf(subnets);
|
|
816
845
|
if (extraHosts.length > 0) {
|
|
@@ -1319,9 +1348,13 @@ function udpExchange(request) {
|
|
|
1319
1348
|
});
|
|
1320
1349
|
const replies = [];
|
|
1321
1350
|
let settled = false;
|
|
1351
|
+
let joined = false;
|
|
1322
1352
|
const finish = (error) => {
|
|
1323
1353
|
if (settled) return;
|
|
1324
1354
|
settled = true;
|
|
1355
|
+
if (joined && request.joinGroup !== void 0) try {
|
|
1356
|
+
socket.dropMembership(request.joinGroup, request.localAddress);
|
|
1357
|
+
} catch {}
|
|
1325
1358
|
try {
|
|
1326
1359
|
socket.close();
|
|
1327
1360
|
} catch {}
|
|
@@ -1336,8 +1369,13 @@ function udpExchange(request) {
|
|
|
1336
1369
|
data
|
|
1337
1370
|
});
|
|
1338
1371
|
});
|
|
1339
|
-
|
|
1372
|
+
const bindAddress = request.joinGroup === void 0 ? request.localAddress : void 0;
|
|
1373
|
+
socket.bind(request.bindPort ?? 0, bindAddress, () => {
|
|
1340
1374
|
try {
|
|
1375
|
+
if (request.joinGroup !== void 0) {
|
|
1376
|
+
socket.addMembership(request.joinGroup, request.localAddress);
|
|
1377
|
+
joined = true;
|
|
1378
|
+
}
|
|
1341
1379
|
if (request.broadcast === true) socket.setBroadcast(true);
|
|
1342
1380
|
if (request.localAddress !== void 0) socket.setMulticastInterface(request.localAddress);
|
|
1343
1381
|
} catch (err) {
|
|
@@ -11,7 +11,11 @@ export interface MdnsService {
|
|
|
11
11
|
readonly port: number;
|
|
12
12
|
readonly txt: Readonly<Record<string, string>>;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export interface PtrQueryOptions {
|
|
15
|
+
/** Unicast-reply bit (QU). Default true; a group member asks QM so a reflected answer reaches it. */
|
|
16
|
+
readonly unicastResponse?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** One PTR question per service type, with the unicast-reply bit unless `unicastResponse` is false. */
|
|
19
|
+
export declare function buildPtrQuery(serviceTypes: readonly string[], options?: PtrQueryOptions): Buffer;
|
|
16
20
|
/** The services advertised on one mDNS message; a malformed packet yields none. */
|
|
17
21
|
export declare function parseMdnsMessage(buf: Buffer): readonly MdnsService[];
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Bounded: 64 requests in flight, 1.2 s per request, 4096 hosts per scan.
|
|
15
15
|
* The sockets are injected ({@link ScanIo}), so this is unit-testable.
|
|
16
16
|
*/
|
|
17
|
-
import type
|
|
17
|
+
import { type IScopedLogger, type LocalInterface, type ScanNetworkResult, type ScanRequest } from "@camstack/types";
|
|
18
18
|
import { type ScanIo } from "./scan-io.js";
|
|
19
19
|
export declare const SCAN_CONCURRENCY = 64;
|
|
20
20
|
export declare const SCAN_REQUEST_TIMEOUT_MS = 1200;
|
|
@@ -15,6 +15,12 @@ export interface UdpExchangeRequest {
|
|
|
15
15
|
/** Fixed source port: devices that answer to a port other than the sender's. */
|
|
16
16
|
readonly bindPort?: number;
|
|
17
17
|
readonly broadcast?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Join this multicast group on `localAddress` and listen on the bound port, so an
|
|
20
|
+
* answer sent to the group (a router-reflected one) is heard. Rejects when the
|
|
21
|
+
* bind or the membership fails; the membership is dropped when the window ends.
|
|
22
|
+
*/
|
|
23
|
+
readonly joinGroup?: string;
|
|
18
24
|
/** Offsets (ms after the first burst) at which the same burst is sent again. */
|
|
19
25
|
readonly resendAtMs?: readonly number[];
|
|
20
26
|
/** How long to keep listening after the first burst. */
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ks as errMsg, Mi as reducePoints, Nt as ROOT_BUCKET_KEY, Qt as UNATTRIBUTED_BUCKET_KEY, Ri as resolveBucketMs, br as foldSnapshotByFunction, do as BaseAddon, ii as metricsProviderCapability, qs as EventCategory, ts as createEvent } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as os$1 from "node:os";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { $i as scoreRuntimes, Ci as platformProbeCapability, Ks as errMsg, do as BaseAddon, or as enumerateInferenceDevices, os as emitReadiness, qs as EventCategory, vi as parseAcceleratorFactsJson } from "../../dist-DcHvuBfD.mjs";
|
|
3
3
|
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import { promisify } from "node:util";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ai as recordEntriesCapability, Cs as mapSecretLeaves, Uo as UnknownRecordKindError, do as BaseAddon, js as recordSecretRef, xo as InvalidRecordError } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { do as BaseAddon, qs as EventCategory } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gs as DeviceType, Ks as errMsg, Us as DeviceFeature, Xn as deriveBatteryPresence, do as BaseAddon, h as BatteryStatusSchema, ha as streamQualityLabel, hn as batteryCapability, mn as bareAddonId, ni as memoizePinnedFfmpeg, qs as EventCategory, sa as snapshotCapability, ws as nodePin } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { do as BaseAddon, pa as storageProviderCapability, yr as filesystemBrowseCapability } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-Hwzm3DCe.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-
|
|
2
|
+
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-D7XmFaUD.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-Hwzm3DCe.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
11
|
let zod = require("zod");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $o as collectSecretMarkerRefs, En as catalogueIssues, Es as normalizeSecretOwner, Gn as databaseSnapshotCapability, Ks as errMsg$1, M as DATABASE_SNAPSHOT_SUFFIX, N as DATABASE_SNAPSHOT_TIMEOUT_MS, Oo as RECORD_SWEEP_INTERVAL_MS, P as DATA_STORE_DATABASES, Po as RecordKindDeclarationSchema, So as NoCallerError, Tt as MigrationMetaSchema, Uo as UnknownRecordKindError, Vo as TransactRefusedError, Wn as dataStoreProviderCapability, _i as orderMigrations, _o as DeclarationRefusedError, ai as migrationsCapability, do as BaseAddon, j as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, ji as recordsCapability, jo as RUNTIME_DEFAULTS, ka as vectorStoreCapability, la as storageAdminCapability, mn as bareAddonId, ns as customAction, qs as EventCategory, rs as defineCustomActions, xo as InvalidRecordError } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
3
|
-
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-
|
|
3
|
+
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-D7XmFaUD.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $r as mayReadLocation, Bs as transformSecretWrite, Cr as gbToBytes, Ds as parseJsonObject, Fs as secretTreeFromPaths, Gt as StorageCleanupJobSchema, Hi as resolveLocationMode, Ir as isLocationEnabled, Jt as StorageMigrationJobSchema, Kt as StorageLocationModeSchema, Ma as withLocationMode, Ns as resolveSecretMarkers, Ts as normalizeNodeId, Ur as legacyModeOf, Zo as collectSecretConfigKeys, da as storageMigrationCapability, do as BaseAddon, dr as evictionPolicyOfLocation, ea as settingsStoreCapability, ei as mayWriteToLocation, is as defineRecordKinds, ko as REDACTED_SECRET, oi as modeMayWrite, qs as EventCategory, qt as StorageLocationTypeSchema, ua as storageCapability, ys as isSecretMarker, yt as LegacyStorageLocationDefaultSchema } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_agent_https = require("../../agent-https-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_agent_https = require("../../agent-https-v5uyVgpk.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-C6zJ_38f.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Ks as errMsg, Ut as ServerNameSchema, do as BaseAddon, fs as hydrateSchema, ia as shortHostname, ns as customAction, rs as defineCustomActions } from "../../dist-DcHvuBfD.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
5
|
-
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
5
|
+
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-D3dptveB.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-GDBin8zB.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CwYYyGAB.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-D0WcLbIV.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-DcHvuBfD.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-B7M3X3bT.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ja as compositionSourceKey, Ks as errMsg } from "./dist-DcHvuBfD.mjs";
|
|
2
2
|
//#region src/builtins/shared/device-state-changed.ts
|
|
3
3
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
4
4
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-CwYYyGAB.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as DEVICE_SAN_CREDENTIAL_PREFIX, U as DEVICE_SAN_USER_PREFIX, Xo as buildSecretRef } from "./dist-DcHvuBfD.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|
|
@@ -1162,7 +1162,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1162
1162
|
return DeviceRole;
|
|
1163
1163
|
}({});
|
|
1164
1164
|
//#endregion
|
|
1165
|
-
//#region ../types/dist/sleep-
|
|
1165
|
+
//#region ../types/dist/sleep-Bei295Bz.mjs
|
|
1166
1166
|
/**
|
|
1167
1167
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1168
1168
|
* window to float samples (D455).
|
|
@@ -5015,6 +5015,60 @@ var ProfileRtspEntrySchema = zod.z.object({
|
|
|
5015
5015
|
codec: zod.z.string().optional(),
|
|
5016
5016
|
resolution: CamStreamResolutionSchema.optional()
|
|
5017
5017
|
});
|
|
5018
|
+
/** Every debug channel's name starts with this; the ring denies it by default. */
|
|
5019
|
+
var DEBUG_CHANNEL_PREFIX = "debug.";
|
|
5020
|
+
function isDebugChannelName(name) {
|
|
5021
|
+
return name.startsWith(DEBUG_CHANNEL_PREFIX);
|
|
5022
|
+
}
|
|
5023
|
+
/**
|
|
5024
|
+
* Who is watching what, in THIS process. In-memory, moved off the log path.
|
|
5025
|
+
*
|
|
5026
|
+
* `active` is a plain boolean FIELD, read first: with no watch anywhere, a
|
|
5027
|
+
* `ctx.debug` call is one load and one branch.
|
|
5028
|
+
*/
|
|
5029
|
+
var DebugInterest = class {
|
|
5030
|
+
active = false;
|
|
5031
|
+
windows = /* @__PURE__ */ new Map();
|
|
5032
|
+
/**
|
|
5033
|
+
* Replace the interest with the FULL set of windows. Non-debug windows are
|
|
5034
|
+
* ignored and an absent one is dropped, so a lost disarm cannot leave a
|
|
5035
|
+
* channel running.
|
|
5036
|
+
*/
|
|
5037
|
+
apply(windows, nowMs) {
|
|
5038
|
+
this.windows.clear();
|
|
5039
|
+
for (const window of windows) {
|
|
5040
|
+
if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
|
|
5041
|
+
const ids = window.deviceIds;
|
|
5042
|
+
this.windows.set(window.channel, {
|
|
5043
|
+
untilMs: window.armedUntilMs,
|
|
5044
|
+
devices: ids === null || ids.length === 0 ? null : new Set(ids)
|
|
5045
|
+
});
|
|
5046
|
+
}
|
|
5047
|
+
this.active = this.windows.size > 0;
|
|
5048
|
+
}
|
|
5049
|
+
/** Drop what has lapsed. Called on a timer, never from a log path. */
|
|
5050
|
+
tick(nowMs) {
|
|
5051
|
+
const closed = [];
|
|
5052
|
+
for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
|
|
5053
|
+
this.windows.delete(name);
|
|
5054
|
+
closed.push(name);
|
|
5055
|
+
}
|
|
5056
|
+
this.active = this.windows.size > 0;
|
|
5057
|
+
return closed;
|
|
5058
|
+
}
|
|
5059
|
+
/** `channel` is the full name, `debug.<channel>`. */
|
|
5060
|
+
wants(channel, deviceId) {
|
|
5061
|
+
if (!this.active) return false;
|
|
5062
|
+
const window = this.windows.get(channel);
|
|
5063
|
+
if (window === void 0) return false;
|
|
5064
|
+
return window.devices === null || window.devices.has(deviceId);
|
|
5065
|
+
}
|
|
5066
|
+
};
|
|
5067
|
+
var interestInstance = null;
|
|
5068
|
+
function getDebugInterest() {
|
|
5069
|
+
interestInstance ??= new DebugInterest();
|
|
5070
|
+
return interestInstance;
|
|
5071
|
+
}
|
|
5018
5072
|
var ReadinessTimeoutError = class extends Error {
|
|
5019
5073
|
capName;
|
|
5020
5074
|
scope;
|
|
@@ -14160,81 +14214,6 @@ var StorageLocationDeclarationSchema = zod.z.object({
|
|
|
14160
14214
|
"backup"
|
|
14161
14215
|
]).optional()
|
|
14162
14216
|
});
|
|
14163
|
-
/** Every debug channel's name starts with this; the ring denies it by default. */
|
|
14164
|
-
var DEBUG_CHANNEL_PREFIX = "debug.";
|
|
14165
|
-
function isDebugChannelName(name) {
|
|
14166
|
-
return name.startsWith(DEBUG_CHANNEL_PREFIX);
|
|
14167
|
-
}
|
|
14168
|
-
/**
|
|
14169
|
-
* Who is watching what, in THIS process. In-memory, moved off the log path.
|
|
14170
|
-
*
|
|
14171
|
-
* `active` is a plain boolean FIELD, read first: with no watch anywhere, a
|
|
14172
|
-
* `ctx.debug` call is one load and one branch.
|
|
14173
|
-
*/
|
|
14174
|
-
var DebugInterest = class {
|
|
14175
|
-
active = false;
|
|
14176
|
-
windows = /* @__PURE__ */ new Map();
|
|
14177
|
-
/**
|
|
14178
|
-
* Replace the interest with the FULL set of windows. Non-debug windows are
|
|
14179
|
-
* ignored and an absent one is dropped, so a lost disarm cannot leave a
|
|
14180
|
-
* channel running.
|
|
14181
|
-
*/
|
|
14182
|
-
apply(windows, nowMs) {
|
|
14183
|
-
this.windows.clear();
|
|
14184
|
-
for (const window of windows) {
|
|
14185
|
-
if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
|
|
14186
|
-
const ids = window.deviceIds;
|
|
14187
|
-
this.windows.set(window.channel, {
|
|
14188
|
-
untilMs: window.armedUntilMs,
|
|
14189
|
-
devices: ids === null || ids.length === 0 ? null : new Set(ids)
|
|
14190
|
-
});
|
|
14191
|
-
}
|
|
14192
|
-
this.active = this.windows.size > 0;
|
|
14193
|
-
}
|
|
14194
|
-
/** Drop what has lapsed. Called on a timer, never from a log path. */
|
|
14195
|
-
tick(nowMs) {
|
|
14196
|
-
const closed = [];
|
|
14197
|
-
for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
|
|
14198
|
-
this.windows.delete(name);
|
|
14199
|
-
closed.push(name);
|
|
14200
|
-
}
|
|
14201
|
-
this.active = this.windows.size > 0;
|
|
14202
|
-
return closed;
|
|
14203
|
-
}
|
|
14204
|
-
/** `channel` is the full name, `debug.<channel>`. */
|
|
14205
|
-
wants(channel, deviceId) {
|
|
14206
|
-
if (!this.active) return false;
|
|
14207
|
-
const window = this.windows.get(channel);
|
|
14208
|
-
if (window === void 0) return false;
|
|
14209
|
-
return window.devices === null || window.devices.has(deviceId);
|
|
14210
|
-
}
|
|
14211
|
-
};
|
|
14212
|
-
var interestInstance = null;
|
|
14213
|
-
function getDebugInterest() {
|
|
14214
|
-
interestInstance ??= new DebugInterest();
|
|
14215
|
-
return interestInstance;
|
|
14216
|
-
}
|
|
14217
|
-
/**
|
|
14218
|
-
* Build `ctx.debug`. The thunk runs ONLY when somebody watches this
|
|
14219
|
-
* (channel, device) pair, and the line carries `tags: { deviceId }` plus the
|
|
14220
|
-
* `debug.<channel>` name as `logChannel`.
|
|
14221
|
-
*/
|
|
14222
|
-
function createDebugEmitter(logger, interest = getDebugInterest()) {
|
|
14223
|
-
return (channel, deviceId, thunk) => {
|
|
14224
|
-
if (!interest.active) return;
|
|
14225
|
-
const name = `${DEBUG_CHANNEL_PREFIX}${channel}`;
|
|
14226
|
-
if (!interest.wants(name, deviceId)) return;
|
|
14227
|
-
const line = thunk();
|
|
14228
|
-
const tags = {
|
|
14229
|
-
deviceId,
|
|
14230
|
-
logChannel: name
|
|
14231
|
-
};
|
|
14232
|
-
logger.info(line.message, line.meta === void 0 ? { tags } : {
|
|
14233
|
-
tags,
|
|
14234
|
-
meta: line.meta
|
|
14235
|
-
});
|
|
14236
|
-
};
|
|
14237
|
-
}
|
|
14238
14217
|
/**
|
|
14239
14218
|
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
14240
14219
|
* an addon declares its channels in.
|
|
@@ -110616,12 +110595,6 @@ Object.defineProperty(exports, "coverCapability", {
|
|
|
110616
110595
|
return coverCapability;
|
|
110617
110596
|
}
|
|
110618
110597
|
});
|
|
110619
|
-
Object.defineProperty(exports, "createDebugEmitter", {
|
|
110620
|
-
enumerable: true,
|
|
110621
|
-
get: function() {
|
|
110622
|
-
return createDebugEmitter;
|
|
110623
|
-
}
|
|
110624
|
-
});
|
|
110625
110598
|
Object.defineProperty(exports, "createDeviceExtensionProvider", {
|
|
110626
110599
|
enumerable: true,
|
|
110627
110600
|
get: function() {
|