@camstack/system 1.2.89 → 1.2.91
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/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +25 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +25 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-block-store.d.ts +11 -0
- package/dist/builtins/core-blocks/core-blocks.addon.js +12 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +12 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/auth-schema.d.ts +42 -0
- package/dist/builtins/local-auth/local-auth.addon.js +43 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +43 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +16 -5
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +16 -5
- package/dist/builtins/storage-orchestrator/index.mjs +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +65 -4
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +64 -4
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +12 -0
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-Dq0ebOuS.js → dist-9Gfk4KOk.js} +500 -47
- package/dist/{dist-Bij6agsS.mjs → dist-DhrTd8LL.mjs} +500 -47
- package/dist/index.js +39 -46
- package/dist/index.mjs +39 -46
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-9Gfk4KOk.js");
|
|
4
4
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
5
5
|
require("./builtins/alerts/index.js");
|
|
6
6
|
const require_formatter = require("./formatter-DqAKDlvN.js");
|
|
@@ -2454,9 +2454,46 @@ var DEVICE_SETTINGS_COLUMNS = [
|
|
|
2454
2454
|
defaultValue: "string"
|
|
2455
2455
|
}
|
|
2456
2456
|
];
|
|
2457
|
+
/**
|
|
2458
|
+
* @durable class=config owner=integration-registry
|
|
2459
|
+
* write="`createIntegration` — an operator adds a provider, or an addon declares
|
|
2460
|
+
* a FIXED one (`info.fixed`); `updateIntegration` rewrites name/enabled/info"
|
|
2461
|
+
* retention="`deleteIntegration` only, and a fixed integration refuses to be
|
|
2462
|
+
* deleted. Nothing ages out. The `int_NNNN` counter resumes from the highest
|
|
2463
|
+
* surviving row at boot, so wiping the table restarts numbering."
|
|
2464
|
+
*/
|
|
2457
2465
|
var INTEGRATIONS = "integrations";
|
|
2466
|
+
/**
|
|
2467
|
+
* @durable class=config owner=integration-registry
|
|
2468
|
+
* write="`setIntegrationSetting` — one row per (integration_id, key), deleted and
|
|
2469
|
+
* re-inserted on every write; this is the operator's per-integration intent"
|
|
2470
|
+
* retention="cascade only — `deleteIntegration` removes the parent's rows. There
|
|
2471
|
+
* is no sweep, so a key an addon stops declaring stays on disk forever."
|
|
2472
|
+
*/
|
|
2458
2473
|
var INTEGRATION_SETTINGS = "integration_settings";
|
|
2474
|
+
/**
|
|
2475
|
+
* `stable_id` carries a UNIQUE column constraint AND a UNIQUE index
|
|
2476
|
+
* (`idx_devices_stable`): that pair is what stops a provider re-announcing the
|
|
2477
|
+
* same physical camera from creating a second device row. An insert that
|
|
2478
|
+
* collides throws rather than duplicating.
|
|
2479
|
+
*
|
|
2480
|
+
* @durable class=config owner=integration-registry
|
|
2481
|
+
* write="`createDevice` — a provider adopts a device under a stable id;
|
|
2482
|
+
* `updateDevice` rewrites name/enabled/info"
|
|
2483
|
+
* retention="`deleteDevice`, or the cascade in `deleteIntegration`. Nothing ages
|
|
2484
|
+
* out. The `dev_NNNN` counter resumes from the highest surviving row at boot,
|
|
2485
|
+
* so wiping the table restarts numbering and re-adopted cameras come back
|
|
2486
|
+
* under DIFFERENT ids than every stored track and rule refers to."
|
|
2487
|
+
*/
|
|
2459
2488
|
var DEVICES = "devices";
|
|
2489
|
+
/**
|
|
2490
|
+
* @durable class=config owner=integration-registry
|
|
2491
|
+
* write="`setDeviceSetting` — one row per (device_id, key), deleted and
|
|
2492
|
+
* re-inserted on every write; per-camera operator intent lands here"
|
|
2493
|
+
* retention="cascade only — `deleteDevice` and `deleteIntegration` remove a
|
|
2494
|
+
* device's rows. No sweep; losing the table silently reverts every camera to
|
|
2495
|
+
* its defaults."
|
|
2496
|
+
*/
|
|
2460
2497
|
var DEVICE_SETTINGS = "device_settings_kv";
|
|
2461
2498
|
var IntegrationRegistry = class IntegrationRegistry {
|
|
2462
2499
|
store;
|
|
@@ -9982,50 +10019,6 @@ var ConfigManager = class ConfigManager {
|
|
|
9982
10019
|
}
|
|
9983
10020
|
};
|
|
9984
10021
|
//#endregion
|
|
9985
|
-
//#region src/kernel/storage-location-registry.ts
|
|
9986
|
-
/**
|
|
9987
|
-
* Aggregates per-addon {@link StorageLocationDeclaration} arrays into a single
|
|
9988
|
-
* {@link StorageLocationRegistry}.
|
|
9989
|
-
*
|
|
9990
|
-
* Merge rules:
|
|
9991
|
-
* - Declarations are keyed by `id`; iteration order follows first occurrence.
|
|
9992
|
-
* - **First declarer wins** for metadata (`displayName`, `description`,
|
|
9993
|
-
* `defaultsTo`): if a later addon declares the same `id`, its metadata is
|
|
9994
|
-
* silently ignored.
|
|
9995
|
-
* - **Cardinality conflict throws**: if two addons declare the same `id` with
|
|
9996
|
-
* different `cardinality` values an `Error` is thrown immediately (message
|
|
9997
|
-
* contains the words "cardinality" and the conflicting `id`).
|
|
9998
|
-
*
|
|
9999
|
-
* @param perAddon - One entry per addon; each entry is that addon's
|
|
10000
|
-
* `storageLocations` declaration array.
|
|
10001
|
-
*/
|
|
10002
|
-
function buildStorageLocationRegistry(perAddon) {
|
|
10003
|
-
const map = /* @__PURE__ */ new Map();
|
|
10004
|
-
for (const addonDeclarations of perAddon) for (const declaration of addonDeclarations) {
|
|
10005
|
-
const existing = map.get(declaration.id);
|
|
10006
|
-
if (existing !== void 0) {
|
|
10007
|
-
if (existing.cardinality !== declaration.cardinality) throw new Error(`Storage location cardinality conflict for id "${declaration.id}": "${existing.cardinality}" (first declarer) vs "${declaration.cardinality}" (later declarer). All addons declaring the same storage location id must agree on cardinality.`);
|
|
10008
|
-
continue;
|
|
10009
|
-
}
|
|
10010
|
-
map.set(declaration.id, declaration);
|
|
10011
|
-
}
|
|
10012
|
-
const frozen = Object.freeze([...map.values()]);
|
|
10013
|
-
return {
|
|
10014
|
-
get(id) {
|
|
10015
|
-
return map.get(id);
|
|
10016
|
-
},
|
|
10017
|
-
has(id) {
|
|
10018
|
-
return map.has(id);
|
|
10019
|
-
},
|
|
10020
|
-
cardinalityOf(id) {
|
|
10021
|
-
return map.get(id)?.cardinality ?? null;
|
|
10022
|
-
},
|
|
10023
|
-
list() {
|
|
10024
|
-
return frozen;
|
|
10025
|
-
}
|
|
10026
|
-
};
|
|
10027
|
-
}
|
|
10028
|
-
//#endregion
|
|
10029
10022
|
//#region ../../node_modules/moleculer/src/constants.js
|
|
10030
10023
|
var require_constants$7 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
10031
10024
|
module.exports = {
|
|
@@ -95289,7 +95282,7 @@ exports.buildHeapSample = buildHeapSample;
|
|
|
95289
95282
|
exports.buildLinkChain = require_manifest_python_deps.buildLinkChain;
|
|
95290
95283
|
exports.buildNativeCapProxy = require_manifest_python_deps.buildNativeCapProxy;
|
|
95291
95284
|
exports.buildNodeManifest = buildNodeManifest;
|
|
95292
|
-
exports.buildStorageLocationRegistry = buildStorageLocationRegistry;
|
|
95285
|
+
exports.buildStorageLocationRegistry = require_builtins_storage_orchestrator_storage_orchestrator_addon.buildStorageLocationRegistry;
|
|
95293
95286
|
exports.buildUdsNativeCapProxy = require_manifest_python_deps.buildUdsNativeCapProxy;
|
|
95294
95287
|
exports.builderMountedCapNames = builderMountedCapNames;
|
|
95295
95288
|
exports.callRegisterNodeWithRetry = callRegisterNodeWithRetry;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $ as objectInputDeclaresAddonId, At as createEvent, B as isArrayOutputSchema, Bt as resolveCapMount, Dt as asJsonObject$1, G as kebabToCamel, H as isObjectInput, K as lifecycleJobSchema, Lt as parseJsonObject, Nt as expandCapMethods, Ot as asNumber, R as extractNestedAddonId, Rt as parseJsonUnknown$1, Tt as ReadinessTimeoutError, Ut as EventCategory$1, V as isCollectionArrayMethod, Vt as scopeKey, W as isVoidInput, X as looseSchema, Y as logLevelAtMost, at as scopesAllowDeviceCap, bt as DEVICE_STATUS_METHOD, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, gt as errMsg$1, it as scopesAllowAddon, jt as emitDownForOwnedCaps, kt as asString$1, nt as procedureAuthKey, t as ALL_CAPABILITY_DEFINITIONS, vt as DATAPLANE_SECRET_HEADER$1, wt as ReadinessRegistry, y as addonSettingsCapability, yt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, zt as readinessKey } from "./dist-
|
|
2
|
+
import { $ as objectInputDeclaresAddonId, At as createEvent, B as isArrayOutputSchema, Bt as resolveCapMount, Dt as asJsonObject$1, G as kebabToCamel, H as isObjectInput, K as lifecycleJobSchema, Lt as parseJsonObject, Nt as expandCapMethods, Ot as asNumber, R as extractNestedAddonId, Rt as parseJsonUnknown$1, Tt as ReadinessTimeoutError, Ut as EventCategory$1, V as isCollectionArrayMethod, Vt as scopeKey, W as isVoidInput, X as looseSchema, Y as logLevelAtMost, at as scopesAllowDeviceCap, bt as DEVICE_STATUS_METHOD, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, gt as errMsg$1, it as scopesAllowAddon, jt as emitDownForOwnedCaps, kt as asString$1, nt as procedureAuthKey, t as ALL_CAPABILITY_DEFINITIONS, vt as DATAPLANE_SECRET_HEADER$1, wt as ReadinessRegistry, y as addonSettingsCapability, yt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, zt as readinessKey } from "./dist-DhrTd8LL.mjs";
|
|
3
3
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
4
4
|
import "./builtins/alerts/index.mjs";
|
|
5
5
|
import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
|
|
@@ -18,7 +18,7 @@ import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/nativ
|
|
|
18
18
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
19
19
|
import { SqliteSettingsAddon, o as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
20
20
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
21
|
-
import { StorageOrchestratorAddon, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
21
|
+
import { StorageOrchestratorAddon, n as buildStorageLocationRegistry, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
22
22
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
23
23
|
import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
|
|
24
24
|
import "./builtins/system-config/index.mjs";
|
|
@@ -2446,9 +2446,46 @@ var DEVICE_SETTINGS_COLUMNS = [
|
|
|
2446
2446
|
defaultValue: "string"
|
|
2447
2447
|
}
|
|
2448
2448
|
];
|
|
2449
|
+
/**
|
|
2450
|
+
* @durable class=config owner=integration-registry
|
|
2451
|
+
* write="`createIntegration` — an operator adds a provider, or an addon declares
|
|
2452
|
+
* a FIXED one (`info.fixed`); `updateIntegration` rewrites name/enabled/info"
|
|
2453
|
+
* retention="`deleteIntegration` only, and a fixed integration refuses to be
|
|
2454
|
+
* deleted. Nothing ages out. The `int_NNNN` counter resumes from the highest
|
|
2455
|
+
* surviving row at boot, so wiping the table restarts numbering."
|
|
2456
|
+
*/
|
|
2449
2457
|
var INTEGRATIONS = "integrations";
|
|
2458
|
+
/**
|
|
2459
|
+
* @durable class=config owner=integration-registry
|
|
2460
|
+
* write="`setIntegrationSetting` — one row per (integration_id, key), deleted and
|
|
2461
|
+
* re-inserted on every write; this is the operator's per-integration intent"
|
|
2462
|
+
* retention="cascade only — `deleteIntegration` removes the parent's rows. There
|
|
2463
|
+
* is no sweep, so a key an addon stops declaring stays on disk forever."
|
|
2464
|
+
*/
|
|
2450
2465
|
var INTEGRATION_SETTINGS = "integration_settings";
|
|
2466
|
+
/**
|
|
2467
|
+
* `stable_id` carries a UNIQUE column constraint AND a UNIQUE index
|
|
2468
|
+
* (`idx_devices_stable`): that pair is what stops a provider re-announcing the
|
|
2469
|
+
* same physical camera from creating a second device row. An insert that
|
|
2470
|
+
* collides throws rather than duplicating.
|
|
2471
|
+
*
|
|
2472
|
+
* @durable class=config owner=integration-registry
|
|
2473
|
+
* write="`createDevice` — a provider adopts a device under a stable id;
|
|
2474
|
+
* `updateDevice` rewrites name/enabled/info"
|
|
2475
|
+
* retention="`deleteDevice`, or the cascade in `deleteIntegration`. Nothing ages
|
|
2476
|
+
* out. The `dev_NNNN` counter resumes from the highest surviving row at boot,
|
|
2477
|
+
* so wiping the table restarts numbering and re-adopted cameras come back
|
|
2478
|
+
* under DIFFERENT ids than every stored track and rule refers to."
|
|
2479
|
+
*/
|
|
2451
2480
|
var DEVICES = "devices";
|
|
2481
|
+
/**
|
|
2482
|
+
* @durable class=config owner=integration-registry
|
|
2483
|
+
* write="`setDeviceSetting` — one row per (device_id, key), deleted and
|
|
2484
|
+
* re-inserted on every write; per-camera operator intent lands here"
|
|
2485
|
+
* retention="cascade only — `deleteDevice` and `deleteIntegration` remove a
|
|
2486
|
+
* device's rows. No sweep; losing the table silently reverts every camera to
|
|
2487
|
+
* its defaults."
|
|
2488
|
+
*/
|
|
2452
2489
|
var DEVICE_SETTINGS = "device_settings_kv";
|
|
2453
2490
|
var IntegrationRegistry = class IntegrationRegistry {
|
|
2454
2491
|
store;
|
|
@@ -9974,50 +10011,6 @@ var ConfigManager = class ConfigManager {
|
|
|
9974
10011
|
}
|
|
9975
10012
|
};
|
|
9976
10013
|
//#endregion
|
|
9977
|
-
//#region src/kernel/storage-location-registry.ts
|
|
9978
|
-
/**
|
|
9979
|
-
* Aggregates per-addon {@link StorageLocationDeclaration} arrays into a single
|
|
9980
|
-
* {@link StorageLocationRegistry}.
|
|
9981
|
-
*
|
|
9982
|
-
* Merge rules:
|
|
9983
|
-
* - Declarations are keyed by `id`; iteration order follows first occurrence.
|
|
9984
|
-
* - **First declarer wins** for metadata (`displayName`, `description`,
|
|
9985
|
-
* `defaultsTo`): if a later addon declares the same `id`, its metadata is
|
|
9986
|
-
* silently ignored.
|
|
9987
|
-
* - **Cardinality conflict throws**: if two addons declare the same `id` with
|
|
9988
|
-
* different `cardinality` values an `Error` is thrown immediately (message
|
|
9989
|
-
* contains the words "cardinality" and the conflicting `id`).
|
|
9990
|
-
*
|
|
9991
|
-
* @param perAddon - One entry per addon; each entry is that addon's
|
|
9992
|
-
* `storageLocations` declaration array.
|
|
9993
|
-
*/
|
|
9994
|
-
function buildStorageLocationRegistry(perAddon) {
|
|
9995
|
-
const map = /* @__PURE__ */ new Map();
|
|
9996
|
-
for (const addonDeclarations of perAddon) for (const declaration of addonDeclarations) {
|
|
9997
|
-
const existing = map.get(declaration.id);
|
|
9998
|
-
if (existing !== void 0) {
|
|
9999
|
-
if (existing.cardinality !== declaration.cardinality) throw new Error(`Storage location cardinality conflict for id "${declaration.id}": "${existing.cardinality}" (first declarer) vs "${declaration.cardinality}" (later declarer). All addons declaring the same storage location id must agree on cardinality.`);
|
|
10000
|
-
continue;
|
|
10001
|
-
}
|
|
10002
|
-
map.set(declaration.id, declaration);
|
|
10003
|
-
}
|
|
10004
|
-
const frozen = Object.freeze([...map.values()]);
|
|
10005
|
-
return {
|
|
10006
|
-
get(id) {
|
|
10007
|
-
return map.get(id);
|
|
10008
|
-
},
|
|
10009
|
-
has(id) {
|
|
10010
|
-
return map.has(id);
|
|
10011
|
-
},
|
|
10012
|
-
cardinalityOf(id) {
|
|
10013
|
-
return map.get(id)?.cardinality ?? null;
|
|
10014
|
-
},
|
|
10015
|
-
list() {
|
|
10016
|
-
return frozen;
|
|
10017
|
-
}
|
|
10018
|
-
};
|
|
10019
|
-
}
|
|
10020
|
-
//#endregion
|
|
10021
10014
|
//#region ../../node_modules/moleculer/src/constants.js
|
|
10022
10015
|
var require_constants$7 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
10023
10016
|
module.exports = {
|