@camstack/server 1.2.822 → 1.2.823
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 +8 -9
- package/system/dist/addon-runner.js +18 -13
- package/system/dist/addon-runner.mjs +19 -14
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-C4yxMErF.mjs → agent-https-CDl7mB_F.mjs} +1 -1
- package/system/dist/{agent-https-SGBI0xP8.js → agent-https-Df53Fvk1.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 +4 -4
- 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 +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- 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 +5 -5
- 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/composed-device-set.d.ts +5 -1
- package/system/dist/builtins/composer/composed-device.d.ts +4 -0
- package/system/dist/builtins/composer/composed-name.d.ts +30 -0
- package/system/dist/builtins/composer/composer.addon.js +94 -6
- package/system/dist/builtins/composer/composer.addon.mjs +94 -6
- package/system/dist/builtins/composer/composer.d.ts +13 -0
- 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/composition-api.d.ts +6 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +68 -4
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +68 -4
- package/system/dist/builtins/core-blocks/rename-composition-block.d.ts +16 -0
- package/system/dist/builtins/core-blocks/sync-composed-device-name.d.ts +19 -0
- 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 +37 -3
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +37 -3
- 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 +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- 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 +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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 +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- 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 +20 -20
- 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 +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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 +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-6MVUyUry.js → capture-engine-C0Z5rwCO.js} +1 -1
- package/system/dist/{capture-engine-BSjE-CQA.mjs → capture-engine-D_GQBgrZ.mjs} +1 -1
- package/system/dist/{composition-sources-BBAOXZdC.js → composition-sources-DIZx3mW3.js} +1 -1
- package/system/dist/{composition-sources-C8T9DRbZ.mjs → composition-sources-mx-2yCDv.mjs} +1 -1
- package/system/dist/{constants-CReG6K4k.mjs → constants-BQlx9HDp.mjs} +1 -1
- package/system/dist/{constants-v0g9--wN.js → constants-CAOcKiWT.js} +1 -1
- package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
- package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
- package/system/dist/{device-ca-BFcBTfff.js → device-ca-93LsCF_Q.js} +1 -1
- package/system/dist/{device-ca-cX8qUs2s.mjs → device-ca-CK6GTnNh.mjs} +1 -1
- package/system/dist/{dist-DjBZ1HhF.mjs → dist-BQiyo22b.mjs} +76 -26
- package/system/dist/{dist-C2czR9xK.js → dist-izXDzt4g.js} +81 -25
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CpCleue0.js → hub-mdns-ciao-Dt_tgvol.js} +2 -2
- package/system/dist/{hub-mdns-ciao-Cnr8xiSd.mjs → hub-mdns-ciao-srpOrqIP.mjs} +2 -2
- package/system/dist/index.js +26 -21
- package/system/dist/index.mjs +238 -233
- package/system/dist/{legacy-integration-rows-door-DhW6mPZj.js → legacy-integration-rows-door-BH43eDu6.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-CGajkVPh.mjs → legacy-integration-rows-door-wu2GWY6U.mjs} +1 -1
- package/system/dist/rename-composition-block-6oLQVzft.js +112 -0
- package/system/dist/rename-composition-block-CH6ZoSJA.mjs +101 -0
- package/system/dist/{restore-archive-eA7L58KT.mjs → restore-archive-C4rR2SYV.mjs} +94 -94
- package/system/dist/{restore-archive-BLab80kx.js → restore-archive-DpZ2PbLN.js} +1 -1
- package/system/dist/{wal-maintenance-DeBxoOFh.mjs → wal-maintenance-CNfp0HHX.mjs} +0 -0
- package/system/dist/{wal-maintenance-DhnSF7K-.js → wal-maintenance-DAA2qJja.js} +0 -0
- package/system/package.json +1 -1
|
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
803
803
|
return EventCategory;
|
|
804
804
|
}({});
|
|
805
805
|
//#endregion
|
|
806
|
-
//#region ../types/dist/
|
|
806
|
+
//#region ../types/dist/composed-stable-id-DLcPInGv.mjs
|
|
807
807
|
/**
|
|
808
808
|
import { errMsg } from '@camstack/types'
|
|
809
809
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -1214,8 +1214,14 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1214
1214
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
1215
1215
|
return DeviceRole;
|
|
1216
1216
|
}({});
|
|
1217
|
+
/**
|
|
1218
|
+
* A composed device's stableId is this prefix plus the block id. Its own module,
|
|
1219
|
+
* free of zod, so the addon runner can read it through `@camstack/types/addon`
|
|
1220
|
+
* without loading the schema barrel (D28).
|
|
1221
|
+
*/
|
|
1222
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
1217
1223
|
//#endregion
|
|
1218
|
-
//#region ../types/dist/sleep-
|
|
1224
|
+
//#region ../types/dist/sleep-B36hHDDz.mjs
|
|
1219
1225
|
/**
|
|
1220
1226
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1221
1227
|
* window to float samples (D455).
|
|
@@ -13805,7 +13811,7 @@ function sleep(ms) {
|
|
|
13805
13811
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
13806
13812
|
}
|
|
13807
13813
|
//#endregion
|
|
13808
|
-
//#region ../types/dist/composition-
|
|
13814
|
+
//#region ../types/dist/composition-BFJq1Y88.mjs
|
|
13809
13815
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
13810
13816
|
opus: "libopus",
|
|
13811
13817
|
aac: "aac",
|
|
@@ -16200,8 +16206,6 @@ function helperMembers(spec) {
|
|
|
16200
16206
|
*/
|
|
16201
16207
|
/** The owner of every composed device: the `composer` builtin. */
|
|
16202
16208
|
var COMPOSER_ADDON_ID = "composer";
|
|
16203
|
-
/** A composed device's stableId is this prefix plus the block id. */
|
|
16204
|
-
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
16205
16209
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
16206
16210
|
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
16207
16211
|
/** One field of one capability of one source device. */
|
|
@@ -59290,7 +59294,13 @@ var deviceManagerCapability = {
|
|
|
59290
59294
|
* row + emits `EventCategory.DeviceMetaChanged`. */
|
|
59291
59295
|
setName: method(zod.z.object({
|
|
59292
59296
|
deviceId: zod.z.number(),
|
|
59293
|
-
name: zod.z.string()
|
|
59297
|
+
name: zod.z.string(),
|
|
59298
|
+
/**
|
|
59299
|
+
* Absent or true: an operator rename, which stamps `userNamed`.
|
|
59300
|
+
* False: the system copying a block name onto the device. That write
|
|
59301
|
+
* must not look like the operator's, or the next reconcile freezes it.
|
|
59302
|
+
*/
|
|
59303
|
+
stampUserNamed: zod.z.boolean().optional()
|
|
59294
59304
|
}), zod.z.void(), {
|
|
59295
59305
|
kind: "mutation",
|
|
59296
59306
|
auth: "admin"
|
|
@@ -98180,11 +98190,41 @@ function deriveBatteryPresence(input) {
|
|
|
98180
98190
|
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
98181
98191
|
* used to ask for this could not.
|
|
98182
98192
|
*
|
|
98183
|
-
* The rule has
|
|
98184
|
-
* wins outright
|
|
98185
|
-
*
|
|
98186
|
-
*
|
|
98193
|
+
* The rule has three halves and the ORDER matters: an operator's explicit pick
|
|
98194
|
+
* wins outright; else a declaration on the device type
|
|
98195
|
+
* ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
|
|
98196
|
+
* priority. The pick is keyed on the child's re-sync-stable `entityId`, not
|
|
98197
|
+
* its numeric id, so it survives a re-sync that reallocates ids.
|
|
98198
|
+
*/
|
|
98199
|
+
/**
|
|
98200
|
+
* Device types that name their primary child. A heat pump stands for itself:
|
|
98201
|
+
* its hero is the system row, not the climate circuit that type-rank would
|
|
98202
|
+
* otherwise pick.
|
|
98187
98203
|
*/
|
|
98204
|
+
var CONTAINER_PRIMARY_CHILD_RULES = [{
|
|
98205
|
+
deviceType: DeviceType.HeatPump,
|
|
98206
|
+
primary: "self"
|
|
98207
|
+
}];
|
|
98208
|
+
/**
|
|
98209
|
+
* The type declaration, before the heuristic. `fall-through` means the
|
|
98210
|
+
* heuristic still decides: the type declared nothing, or it named a child
|
|
98211
|
+
* type that is not among the children.
|
|
98212
|
+
*/
|
|
98213
|
+
function declaredChildType(primary) {
|
|
98214
|
+
if (primary === "self") return void 0;
|
|
98215
|
+
return primary.childType;
|
|
98216
|
+
}
|
|
98217
|
+
function applyPrimaryChildRule(rule, children) {
|
|
98218
|
+
if (rule === void 0) return { kind: "fall-through" };
|
|
98219
|
+
const childType = declaredChildType(rule.primary);
|
|
98220
|
+
if (childType === void 0) return { kind: "none" };
|
|
98221
|
+
const match = children.find((child) => child.type === childType);
|
|
98222
|
+
if (match === void 0) return { kind: "fall-through" };
|
|
98223
|
+
return {
|
|
98224
|
+
kind: "child",
|
|
98225
|
+
child: match
|
|
98226
|
+
};
|
|
98227
|
+
}
|
|
98188
98228
|
/**
|
|
98189
98229
|
* Type priority, most→least "primary". An actuator (climate / lock / cover / …)
|
|
98190
98230
|
* outranks a bare `switch` so a container's defining child wins over its
|
|
@@ -98272,9 +98312,10 @@ function rank(type) {
|
|
|
98272
98312
|
}
|
|
98273
98313
|
/**
|
|
98274
98314
|
* The child a container stands for: the operator's pick when it still exists,
|
|
98275
|
-
* else the highest-priority type. `null`
|
|
98276
|
-
*
|
|
98277
|
-
* child
|
|
98315
|
+
* else the device type's declaration, else the highest-priority type. `null`
|
|
98316
|
+
* for a childless container, and for a type that stands for itself — a caller
|
|
98317
|
+
* must decide what "no child" means for it, rather than being handed a child
|
|
98318
|
+
* that is not the device.
|
|
98278
98319
|
*/
|
|
98279
98320
|
/**
|
|
98280
98321
|
* Two names for the same thing, compared the way an integration writes them.
|
|
@@ -98303,11 +98344,14 @@ function sameName(childName, containerName) {
|
|
|
98303
98344
|
const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
|
|
98304
98345
|
return flatten(childName) === flatten(containerName);
|
|
98305
98346
|
}
|
|
98306
|
-
function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
|
|
98347
|
+
function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
|
|
98307
98348
|
if (overrideEntityId !== void 0 && overrideEntityId !== null) {
|
|
98308
98349
|
const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
|
|
98309
98350
|
if (picked !== void 0) return picked;
|
|
98310
98351
|
}
|
|
98352
|
+
const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
|
|
98353
|
+
if (declared.kind === "none") return null;
|
|
98354
|
+
if (declared.kind === "child") return declared.child;
|
|
98311
98355
|
const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && sameName(c.name, containerName) ? 0 : 1;
|
|
98312
98356
|
return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
|
|
98313
98357
|
}
|
|
@@ -98355,7 +98399,7 @@ function expandContainer(id, byId, byParent, visited, out) {
|
|
|
98355
98399
|
type: c.type,
|
|
98356
98400
|
...c.role !== void 0 && c.role !== null ? { role: c.role } : {},
|
|
98357
98401
|
...c.name !== void 0 ? { name: c.name } : {}
|
|
98358
|
-
})), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name);
|
|
98402
|
+
})), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name, candidate.type);
|
|
98359
98403
|
if (primary !== null) expandContainer(primary.id, byId, byParent, nextVisited, out);
|
|
98360
98404
|
}
|
|
98361
98405
|
/**
|
|
@@ -100445,7 +100489,7 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
100445
100489
|
/**
|
|
100446
100490
|
* The heat pump's contribution to a hero (D1026): the compressor scene, every
|
|
100447
100491
|
* circuit as a row with its own label and icon, the powers as pills (the
|
|
100448
|
-
* instantaneous COP
|
|
100492
|
+
* instantaneous COP is "—" when it cannot be computed) and a "System" group with
|
|
100449
100493
|
* one selector per mode. Values and their limits come from the slice, which the
|
|
100450
100494
|
* gateway filled: a selector with no allowed value is not drawn, a missing
|
|
100451
100495
|
* reading is never a 0 (D393).
|
|
@@ -100517,9 +100561,22 @@ function circuitRow(circuit) {
|
|
|
100517
100561
|
};
|
|
100518
100562
|
}
|
|
100519
100563
|
var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
|
|
100564
|
+
/** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
|
|
100565
|
+
function copPill(cop) {
|
|
100566
|
+
if (cop === null) return {
|
|
100567
|
+
icon: "gauge",
|
|
100568
|
+
text: t("Instantaneous COP —", "COP istantaneo —"),
|
|
100569
|
+
tone: "muted"
|
|
100570
|
+
};
|
|
100571
|
+
const text = String(Number(cop.toFixed(1)));
|
|
100572
|
+
return {
|
|
100573
|
+
icon: "gauge",
|
|
100574
|
+
text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
100575
|
+
tone: "success"
|
|
100576
|
+
};
|
|
100577
|
+
}
|
|
100520
100578
|
function powerPills(status) {
|
|
100521
100579
|
const { thermalW, electricalW } = status.power;
|
|
100522
|
-
const cop = heatPumpInstantCop(status.power);
|
|
100523
100580
|
const pills = [];
|
|
100524
100581
|
if (thermalW !== null) pills.push({
|
|
100525
100582
|
icon: "flame",
|
|
@@ -100531,14 +100588,7 @@ function powerPills(status) {
|
|
|
100531
100588
|
text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
|
|
100532
100589
|
tone: "muted"
|
|
100533
100590
|
});
|
|
100534
|
-
|
|
100535
|
-
const text = String(Number(cop.toFixed(1)));
|
|
100536
|
-
pills.push({
|
|
100537
|
-
icon: "gauge",
|
|
100538
|
-
text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
100539
|
-
tone: "success"
|
|
100540
|
-
});
|
|
100541
|
-
}
|
|
100591
|
+
pills.push(copPill(heatPumpInstantCop(status.power)));
|
|
100542
100592
|
return pills;
|
|
100543
100593
|
}
|
|
100544
100594
|
/** The independent system modes, in the order the card draws them. */
|
|
@@ -118607,6 +118657,12 @@ Object.defineProperty(exports, "CATALOG_LANGS", {
|
|
|
118607
118657
|
return CATALOG_LANGS;
|
|
118608
118658
|
}
|
|
118609
118659
|
});
|
|
118660
|
+
Object.defineProperty(exports, "COMPOSED_DEVICE_STABLE_ID_PREFIX", {
|
|
118661
|
+
enumerable: true,
|
|
118662
|
+
get: function() {
|
|
118663
|
+
return COMPOSED_DEVICE_STABLE_ID_PREFIX;
|
|
118664
|
+
}
|
|
118665
|
+
});
|
|
118610
118666
|
Object.defineProperty(exports, "COMPOSED_ITEM_FIXED_FIELDS", {
|
|
118611
118667
|
enumerable: true,
|
|
118612
118668
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-DAA2qJja.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-CNfp0HHX.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-izXDzt4g.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_agent_https = require("./agent-https-
|
|
4
|
+
const require_agent_https = require("./agent-https-Df53Fvk1.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Xc as userError } from "./dist-
|
|
2
|
+
import { Xc as userError } from "./dist-BQiyo22b.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-
|
|
4
|
+
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-CDl7mB_F.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
package/system/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
4
|
-
const require_device_ca = require("./device-ca-
|
|
3
|
+
const require_dist = require("./dist-izXDzt4g.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-93LsCF_Q.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
|
|
7
7
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
@@ -27,22 +27,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
27
27
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
28
28
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
29
29
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
30
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
31
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
30
|
+
const require_wal_maintenance = require("./wal-maintenance-DAA2qJja.js");
|
|
31
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-BH43eDu6.js");
|
|
32
32
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
33
33
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
34
34
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
35
35
|
require("./builtins/storage-orchestrator/index.js");
|
|
36
|
-
const require_agent_https = require("./agent-https-
|
|
37
|
-
const require_constants = require("./constants-
|
|
36
|
+
const require_agent_https = require("./agent-https-Df53Fvk1.js");
|
|
37
|
+
const require_constants = require("./constants-CAOcKiWT.js");
|
|
38
38
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
39
39
|
require("./builtins/system-config/index.js");
|
|
40
40
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
41
41
|
const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
|
|
42
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
42
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-Dt_tgvol.js");
|
|
43
43
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
44
44
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
45
|
-
const require_restore_archive = require("./restore-archive-
|
|
45
|
+
const require_restore_archive = require("./restore-archive-DpZ2PbLN.js");
|
|
46
46
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
47
47
|
let zod = require("zod");
|
|
48
48
|
let node_crypto = require("node:crypto");
|
|
@@ -16942,18 +16942,22 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
16942
16942
|
create: async (stableId, DeviceClass, config, parentDeviceId = null, initialMeta = void 0) => {
|
|
16943
16943
|
const id = await deviceApi.allocateDeviceId(stableId);
|
|
16944
16944
|
if (initialMeta) {
|
|
16945
|
-
if (initialMeta.name !== void 0)
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16945
|
+
if (initialMeta.name !== void 0) {
|
|
16946
|
+
const systemName = stableId.startsWith(_camstack_types_addon.COMPOSED_DEVICE_STABLE_ID_PREFIX);
|
|
16947
|
+
await callDeviceManager(api, "setName", {
|
|
16948
|
+
deviceId: id,
|
|
16949
|
+
name: initialMeta.name,
|
|
16950
|
+
...systemName ? { stampUserNamed: false } : {}
|
|
16951
|
+
}).catch((err) => {
|
|
16952
|
+
opts.logger.warn("create: setName pre-seed failed", {
|
|
16953
|
+
tags: {
|
|
16954
|
+
stableId,
|
|
16955
|
+
deviceId: id
|
|
16956
|
+
},
|
|
16957
|
+
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
16958
|
+
});
|
|
16955
16959
|
});
|
|
16956
|
-
}
|
|
16960
|
+
}
|
|
16957
16961
|
if (initialMeta.location !== void 0) await callDeviceManager(api, "setLocation", {
|
|
16958
16962
|
deviceId: id,
|
|
16959
16963
|
location: initialMeta.location
|
|
@@ -17071,10 +17075,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
17071
17075
|
});
|
|
17072
17076
|
return id;
|
|
17073
17077
|
},
|
|
17074
|
-
setName: async (deviceId, name) => {
|
|
17078
|
+
setName: async (deviceId, name, write) => {
|
|
17075
17079
|
await callDeviceManager(api, "setName", {
|
|
17076
17080
|
deviceId,
|
|
17077
|
-
name
|
|
17081
|
+
name,
|
|
17082
|
+
...write?.stampUserNamed === false ? { stampUserNamed: false } : {}
|
|
17078
17083
|
});
|
|
17079
17084
|
},
|
|
17080
17085
|
setLocation: async (deviceId, location) => {
|