@camstack/types 1.2.102 → 1.2.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon/base-addon.d.ts +7 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{sleep-BpMN2raG.js → sleep-CizGYrCD.js} +11 -1
- package/dist/{sleep-Dt6MArUp.mjs → sleep-Cs9MWLcT.mjs} +11 -1
- package/package.json +1 -1
|
@@ -99,6 +99,13 @@ export declare abstract class BaseAddon<TConfig extends object = Record<string,
|
|
|
99
99
|
private readonly _readinessGeneration;
|
|
100
100
|
/** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
|
|
101
101
|
private _registeredCapNames;
|
|
102
|
+
/**
|
|
103
|
+
* True only after `readAddonStore` actually answered. Constructor
|
|
104
|
+
* defaults look like stored config when the store is down — a forked
|
|
105
|
+
* addon that auto-starts from those defaults (cloudflare-tunnel quick
|
|
106
|
+
* mode, 2026-08-25) is not "the operator chose this".
|
|
107
|
+
*/
|
|
108
|
+
protected settingsStoreReady: boolean;
|
|
102
109
|
/** Default config values. Provided via constructor. */
|
|
103
110
|
protected readonly defaults: TConfig;
|
|
104
111
|
constructor(defaults: TConfig);
|
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-EY0GNjV9.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-CizGYrCD.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
|
|
2
|
-
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-
|
|
2
|
+
import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-Cs9MWLcT.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-EY0GNjV9.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-CizGYrCD.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
|
|
2
|
-
import { $ as DecodedFrameSchema, A as event, B as ReadinessRegistry, C as DeviceFeature, Ct as isEvent, D as DEFAULT_RUNTIME_STATE_DURABILITY, Dt as collectHydratedFieldValues, E as adminUiCapability, Et as collectHydratedFieldEntries, F as systemMethod, G as BrokerStatsSchema, H as emitDownForOwnedCaps, I as CAP_NODE_PIN_CONTEXT_KEY, J as CamProfileSchema, K as BrokerStatusSchema, L as nodePin, M as isDeviceConfigCap, N as method, O as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Ot as hydrateSchema, P as resolveCapMount, Q as DecodedAudioChunkSchema, R as readNodePin, S as ChargingStatus, St as emitReadiness, T as DeviceType, Tt as WELL_KNOWN_TAB_MAP, U as readinessKey, V as ReadinessTimeoutError, W as scopeKey, X as CamStreamResolutionSchema, Y as CamStreamKindSchema, Z as CameraStreamSchema, _ as createMirrorSource, _t as DisposerChain, a as asJsonObject, at as ProfileSlotStatusSchema, b as deviceOpsCapability, bt as createDurableState, c as parseJsonArray, ct as SubscribeAudioChunksInputSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as SubscribeFramesResultSchema, et as EncodedPacketSchema, f as DEVICE_SCOPED_CAPS, ft as makeProfileBrokerId, g as createLazyTrpcSource, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, ht as selectAssignedProfileSlots, i as asJsonArray, it as ProfileSlotSchema, j as expandCapMethods, k as DEVICE_STATUS_METHOD, kt as resolveHydratedFieldValue, l as parseJsonObject, lt as SubscribeAudioChunksResultSchema, m as createDeviceProxy, mt as parseProfileBrokerId, n as sleepCancellable, nt as FrameHandleSchema, o as asNumber, ot as StreamSourceEntrySchema, p as isDeviceScopedCap, pt as makeSourceBrokerId, q as CAM_PROFILE_ORDER, r as asBoolean, rt as ProfileRtspEntrySchema, s as asString, st as StreamSourceSchema, t as sleep, tt as FrameHandleFormatSchema, u as parseJsonUnknown, ut as SubscribeFramesInputSchema, v as createSliceHandle, vt as BaseAddon, w as DeviceRole, wt as WELL_KNOWN_TABS, x as viewerUiCapability, xt as createEvent, y as RawStateResultSchema, yt as normalizeAddonInitResult, z as toNodeId } from "./sleep-
|
|
2
|
+
import { $ as DecodedFrameSchema, A as event, B as ReadinessRegistry, C as DeviceFeature, Ct as isEvent, D as DEFAULT_RUNTIME_STATE_DURABILITY, Dt as collectHydratedFieldValues, E as adminUiCapability, Et as collectHydratedFieldEntries, F as systemMethod, G as BrokerStatsSchema, H as emitDownForOwnedCaps, I as CAP_NODE_PIN_CONTEXT_KEY, J as CamProfileSchema, K as BrokerStatusSchema, L as nodePin, M as isDeviceConfigCap, N as method, O as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Ot as hydrateSchema, P as resolveCapMount, Q as DecodedAudioChunkSchema, R as readNodePin, S as ChargingStatus, St as emitReadiness, T as DeviceType, Tt as WELL_KNOWN_TAB_MAP, U as readinessKey, V as ReadinessTimeoutError, W as scopeKey, X as CamStreamResolutionSchema, Y as CamStreamKindSchema, Z as CameraStreamSchema, _ as createMirrorSource, _t as DisposerChain, a as asJsonObject, at as ProfileSlotStatusSchema, b as deviceOpsCapability, bt as createDurableState, c as parseJsonArray, ct as SubscribeAudioChunksInputSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as SubscribeFramesResultSchema, et as EncodedPacketSchema, f as DEVICE_SCOPED_CAPS, ft as makeProfileBrokerId, g as createLazyTrpcSource, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, ht as selectAssignedProfileSlots, i as asJsonArray, it as ProfileSlotSchema, j as expandCapMethods, k as DEVICE_STATUS_METHOD, kt as resolveHydratedFieldValue, l as parseJsonObject, lt as SubscribeAudioChunksResultSchema, m as createDeviceProxy, mt as parseProfileBrokerId, n as sleepCancellable, nt as FrameHandleSchema, o as asNumber, ot as StreamSourceEntrySchema, p as isDeviceScopedCap, pt as makeSourceBrokerId, q as CAM_PROFILE_ORDER, r as asBoolean, rt as ProfileRtspEntrySchema, s as asString, st as StreamSourceSchema, t as sleep, tt as FrameHandleFormatSchema, u as parseJsonUnknown, ut as SubscribeFramesInputSchema, v as createSliceHandle, vt as BaseAddon, w as DeviceRole, wt as WELL_KNOWN_TABS, x as viewerUiCapability, xt as createEvent, y as RawStateResultSchema, yt as normalizeAddonInitResult, z as toNodeId } from "./sleep-Cs9MWLcT.mjs";
|
|
3
3
|
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-rO1sRmEK.mjs";
|
|
4
4
|
import { EventSourceType } from "./enums.mjs";
|
|
5
5
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
@@ -570,6 +570,13 @@ var BaseAddon = class {
|
|
|
570
570
|
_readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
|
|
571
571
|
/** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
|
|
572
572
|
_registeredCapNames = [];
|
|
573
|
+
/**
|
|
574
|
+
* True only after `readAddonStore` actually answered. Constructor
|
|
575
|
+
* defaults look like stored config when the store is down — a forked
|
|
576
|
+
* addon that auto-starts from those defaults (cloudflare-tunnel quick
|
|
577
|
+
* mode, 2026-08-25) is not "the operator chose this".
|
|
578
|
+
*/
|
|
579
|
+
settingsStoreReady = false;
|
|
573
580
|
/** Default config values. Provided via constructor. */
|
|
574
581
|
defaults;
|
|
575
582
|
constructor(defaults) {
|
|
@@ -970,7 +977,9 @@ var BaseAddon = class {
|
|
|
970
977
|
];
|
|
971
978
|
let lastErr;
|
|
972
979
|
for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
|
|
973
|
-
|
|
980
|
+
const stored = await settings.readAddonStore() ?? {};
|
|
981
|
+
this.settingsStoreReady = true;
|
|
982
|
+
return stored;
|
|
974
983
|
} catch (err) {
|
|
975
984
|
lastErr = err;
|
|
976
985
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -978,6 +987,7 @@ var BaseAddon = class {
|
|
|
978
987
|
if (attempt === delaysMs.length) break;
|
|
979
988
|
await new Promise((r) => setTimeout(r, delaysMs[attempt]));
|
|
980
989
|
}
|
|
990
|
+
this.settingsStoreReady = false;
|
|
981
991
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
982
992
|
return {};
|
|
983
993
|
}
|
|
@@ -570,6 +570,13 @@ var BaseAddon = class {
|
|
|
570
570
|
_readinessGeneration = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2, 14);
|
|
571
571
|
/** Capability names this addon registered at init — used to emit matching `down` events on shutdown. */
|
|
572
572
|
_registeredCapNames = [];
|
|
573
|
+
/**
|
|
574
|
+
* True only after `readAddonStore` actually answered. Constructor
|
|
575
|
+
* defaults look like stored config when the store is down — a forked
|
|
576
|
+
* addon that auto-starts from those defaults (cloudflare-tunnel quick
|
|
577
|
+
* mode, 2026-08-25) is not "the operator chose this".
|
|
578
|
+
*/
|
|
579
|
+
settingsStoreReady = false;
|
|
573
580
|
/** Default config values. Provided via constructor. */
|
|
574
581
|
defaults;
|
|
575
582
|
constructor(defaults) {
|
|
@@ -970,7 +977,9 @@ var BaseAddon = class {
|
|
|
970
977
|
];
|
|
971
978
|
let lastErr;
|
|
972
979
|
for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
|
|
973
|
-
|
|
980
|
+
const stored = await settings.readAddonStore() ?? {};
|
|
981
|
+
this.settingsStoreReady = true;
|
|
982
|
+
return stored;
|
|
974
983
|
} catch (err) {
|
|
975
984
|
lastErr = err;
|
|
976
985
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -978,6 +987,7 @@ var BaseAddon = class {
|
|
|
978
987
|
if (attempt === delaysMs.length) break;
|
|
979
988
|
await new Promise((r) => setTimeout(r, delaysMs[attempt]));
|
|
980
989
|
}
|
|
990
|
+
this.settingsStoreReady = false;
|
|
981
991
|
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
|
|
982
992
|
return {};
|
|
983
993
|
}
|