@camstack/types 0.1.16 → 0.1.18
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 +12 -0
- package/dist/addon/base-addon.d.ts.map +1 -1
- package/dist/{auth-records-BDg37fy9.mjs → auth-records-BpjTmlhM.mjs} +9 -1
- package/dist/{auth-records-BDg37fy9.mjs.map → auth-records-BpjTmlhM.mjs.map} +1 -1
- package/dist/{auth-records-D5ZNaUos.js → auth-records-dZTcJ-2e.js} +9 -1
- package/dist/{auth-records-D5ZNaUos.js.map → auth-records-dZTcJ-2e.js.map} +1 -1
- package/dist/capabilities/turn-orchestrator.cap.d.ts +2 -0
- package/dist/capabilities/turn-orchestrator.cap.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +2 -0
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -3
- package/dist/index.mjs.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as hydrateSchema, e as errMsg, z as zonesCapability, a as zoneRulesCapability, b as zoneAnalyticsCapability, s as switchCapability, p as ptzAutotrackCapability, m as motionTriggerCapability, c as motionCapability, f as featureProbeCapability, d as doorbellCapability, g as deviceStatusCapability, i as deviceDiscoveryCapability, j as cameraStreamsCapability, k as brightnessCapability, l as batteryCapability, n as audioMetricsCapability, o as deviceProviderCapability, q as accessoriesCapability, r as addonPagesCapability, t as addonPagesSourceCapability, u as addonRoutesCapability, v as addonSettingsCapability, w as addonWidgetsCapability, x as addonWidgetsSourceCapability, y as addonsCapability, A as adminUiCapability, B as advancedNotifierCapability, C as alertsCapability, D as audioAnalysisCapability, E as audioAnalyzerCapability, F as audioCodecCapability, G as authProviderCapability, H as authenticationCapability, I as backupCapability, J as cameraCredentialsCapability, K as decoderCapability, L as detectionPipelineCapability, M as deviceManagerCapability, N as deviceOpsCapability, O as deviceStateCapability, P as embeddingEncoderCapability, Q as eventsCapability, R as integrationsCapability, S as intercomCapability, T as localNetworkCapability, U as logDestinationCapability, V as meshNetworkCapability, W as meshOrchestratorCapability, X as metricsProviderCapability, Y as motionDetectionCapability, Z as nativeObjectDetectionCapability, _ as networkAccessCapability, $ as networkQualityCapability, a0 as nodesCapability, a1 as notificationOutputCapability, a2 as osdCapability, a3 as pipelineAnalyticsCapability, a4 as pipelineExecutorCapability, a5 as pipelineOrchestratorCapability, a6 as pipelineRunnerCapability, a7 as platformProbeCapability, a8 as ptzCapability, a9 as rebootCapability, aa as recordingCapability, ab as recordingEngineCapability, ac as remoteAccessCapability, ad as restreamerCapability, ae as settingsStoreCapability, af as snapshotCapability, ag as snapshotProviderCapability, ah as storageCapability, ai as storageProviderCapability, aj as streamBrokerCapability, ak as streamingEngineCapability, al as systemCapability, am as toastCapability, an as turnOrchestratorCapability, ao as turnProviderCapability, ap as userManagementCapability, aq as webrtcCapability, ar as webrtcSessionCapability } from "./auth-records-
|
|
2
|
-
import { as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, cW, cX, cY, cZ, c_, c$, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh, di, dj, dk, dl, dm, dn, dp, dq, dr, ds, dt, du, dv, dw, dx, dy, dz, dA, dB, dC, dD, dE, dF, dG, dH, dI, dJ, dK, dL, dM, dN, dO, dP, dQ, dR, dS, dT, dU, dV, dW, dX, dY, dZ, d_, d$, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ea, eb, ec, ed, ee, ef, eg, eh, ei, ej, ek, el, em, en, eo, ep, eq, er, es } from "./auth-records-
|
|
1
|
+
import { h as hydrateSchema, e as errMsg, z as zonesCapability, a as zoneRulesCapability, b as zoneAnalyticsCapability, s as switchCapability, p as ptzAutotrackCapability, m as motionTriggerCapability, c as motionCapability, f as featureProbeCapability, d as doorbellCapability, g as deviceStatusCapability, i as deviceDiscoveryCapability, j as cameraStreamsCapability, k as brightnessCapability, l as batteryCapability, n as audioMetricsCapability, o as deviceProviderCapability, q as accessoriesCapability, r as addonPagesCapability, t as addonPagesSourceCapability, u as addonRoutesCapability, v as addonSettingsCapability, w as addonWidgetsCapability, x as addonWidgetsSourceCapability, y as addonsCapability, A as adminUiCapability, B as advancedNotifierCapability, C as alertsCapability, D as audioAnalysisCapability, E as audioAnalyzerCapability, F as audioCodecCapability, G as authProviderCapability, H as authenticationCapability, I as backupCapability, J as cameraCredentialsCapability, K as decoderCapability, L as detectionPipelineCapability, M as deviceManagerCapability, N as deviceOpsCapability, O as deviceStateCapability, P as embeddingEncoderCapability, Q as eventsCapability, R as integrationsCapability, S as intercomCapability, T as localNetworkCapability, U as logDestinationCapability, V as meshNetworkCapability, W as meshOrchestratorCapability, X as metricsProviderCapability, Y as motionDetectionCapability, Z as nativeObjectDetectionCapability, _ as networkAccessCapability, $ as networkQualityCapability, a0 as nodesCapability, a1 as notificationOutputCapability, a2 as osdCapability, a3 as pipelineAnalyticsCapability, a4 as pipelineExecutorCapability, a5 as pipelineOrchestratorCapability, a6 as pipelineRunnerCapability, a7 as platformProbeCapability, a8 as ptzCapability, a9 as rebootCapability, aa as recordingCapability, ab as recordingEngineCapability, ac as remoteAccessCapability, ad as restreamerCapability, ae as settingsStoreCapability, af as snapshotCapability, ag as snapshotProviderCapability, ah as storageCapability, ai as storageProviderCapability, aj as streamBrokerCapability, ak as streamingEngineCapability, al as systemCapability, am as toastCapability, an as turnOrchestratorCapability, ao as turnProviderCapability, ap as userManagementCapability, aq as webrtcCapability, ar as webrtcSessionCapability } from "./auth-records-BpjTmlhM.mjs";
|
|
2
|
+
import { as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, cW, cX, cY, cZ, c_, c$, d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh, di, dj, dk, dl, dm, dn, dp, dq, dr, ds, dt, du, dv, dw, dx, dy, dz, dA, dB, dC, dD, dE, dF, dG, dH, dI, dJ, dK, dL, dM, dN, dO, dP, dQ, dR, dS, dT, dU, dV, dW, dX, dY, dZ, d_, d$, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ea, eb, ec, ed, ee, ef, eg, eh, ei, ej, ek, el, em, en, eo, ep, eq, er, es } from "./auth-records-BpjTmlhM.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
class DisposerChain {
|
|
5
5
|
disposers = [];
|
|
@@ -544,7 +544,7 @@ class BaseAddon {
|
|
|
544
544
|
* (e.g. from older versions) without polluting the typed config.
|
|
545
545
|
*/
|
|
546
546
|
async resolveConfig() {
|
|
547
|
-
const stored = await this.
|
|
547
|
+
const stored = await this.readAddonStoreWithRetry();
|
|
548
548
|
const resolved = { ...this.defaults };
|
|
549
549
|
for (const key of Object.keys(this.defaults)) {
|
|
550
550
|
const storedValue = stored[key];
|
|
@@ -557,6 +557,39 @@ class BaseAddon {
|
|
|
557
557
|
}
|
|
558
558
|
this._config = resolved;
|
|
559
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
|
|
562
|
+
* transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
|
|
563
|
+
* swap, or any race where the SqliteSettingsBackend is between shutdown and
|
|
564
|
+
* re-initialize) doesn't propagate up into `initialize()` and leave the
|
|
565
|
+
* addon permanently broken.
|
|
566
|
+
*
|
|
567
|
+
* Retry only the two known infra fingerprints. Anything else propagates so
|
|
568
|
+
* real bugs surface immediately. After the budget expires we fall back to
|
|
569
|
+
* `{}` (defaults) — the addon's first successful patch will rehydrate.
|
|
570
|
+
*/
|
|
571
|
+
async readAddonStoreWithRetry() {
|
|
572
|
+
const settings = this._ctx?.settings;
|
|
573
|
+
if (!settings) return {};
|
|
574
|
+
const delaysMs = [150, 350, 600, 900];
|
|
575
|
+
let lastErr;
|
|
576
|
+
for (let attempt = 0; attempt <= delaysMs.length; attempt++) {
|
|
577
|
+
try {
|
|
578
|
+
return await settings.readAddonStore() ?? {};
|
|
579
|
+
} catch (err) {
|
|
580
|
+
lastErr = err;
|
|
581
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
582
|
+
const transient = msg.includes("SqliteSettingsBackend not initialized") || msg.includes("provider not available");
|
|
583
|
+
if (!transient) throw err;
|
|
584
|
+
if (attempt === delaysMs.length) break;
|
|
585
|
+
await new Promise((r) => setTimeout(r, delaysMs[attempt]));
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", {
|
|
589
|
+
meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) }
|
|
590
|
+
});
|
|
591
|
+
return {};
|
|
592
|
+
}
|
|
560
593
|
}
|
|
561
594
|
function normalizeAddonInitResult(result) {
|
|
562
595
|
if (result == null) return;
|