@camstack/server 1.2.733 → 1.2.735
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 +12 -0
- package/dist/core/agent/node-removal-hooks.js +25 -0
- package/dist/manual-boot.js +11 -0
- package/package.json +4 -6
- package/system/dist/addon-runner.js +94 -17
- package/system/dist/addon-runner.mjs +95 -18
- package/system/dist/{agent-https-D3dptveB.mjs → agent-https-BVCIU0eH.mjs} +1 -1
- package/system/dist/{agent-https-v5uyVgpk.js → agent-https-DrCbFr4p.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 +79 -8
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +90 -21
- package/system/dist/builtins/core-blocks/index.mjs +1 -1
- 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 +91 -21
- package/system/dist/builtins/local-network/local-network.addon.mjs +91 -21
- package/system/dist/builtins/local-network/scan/dns-wire.d.ts +29 -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 +284 -284
- 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-j_bFq7Tx.js → composition-sources-BV9n2ivT.js} +1 -1
- package/system/dist/{composition-sources-Dnyu7-1p.mjs → composition-sources-CI2tZzAo.mjs} +1 -1
- package/system/dist/{constants-GDBin8zB.mjs → constants-Bskr2h1W.mjs} +1 -1
- package/system/dist/{constants-C6zJ_38f.js → constants-dYIQm8ab.js} +1 -1
- package/system/dist/{device-ca-Bpqrad00.mjs → device-ca-04o7NByo.mjs} +1 -1
- package/system/dist/{device-ca-CV9QZvoy.js → device-ca-BF8N9fC6.js} +1 -1
- package/system/dist/{dist-CwYYyGAB.js → dist-B4r3_aYb.js} +61 -4
- package/system/dist/{dist-DcHvuBfD.mjs → dist-CnC8-kF6.mjs} +56 -5
- package/system/dist/{dns-wire-CqgMi_uB.js → dns-wire-B1BvF9Ao.js} +78 -10
- package/system/dist/{dns-wire-DO56tOHL.mjs → dns-wire-Dm3H_7ST.mjs} +55 -11
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-D2sU6sKd.mjs → hub-mdns-ciao-BE1vqriF.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DNLnbJNG.js → hub-mdns-ciao-MdXDARI0.js} +2 -2
- package/system/dist/index.d.ts +1 -0
- package/system/dist/index.js +45 -19
- package/system/dist/index.mjs +46 -21
- package/system/dist/kernel/addon-settings-store.d.ts +25 -0
- package/system/dist/kernel/device-settings-resolver.d.ts +27 -0
- package/system/dist/kernel/moleculer/runner-device-settings.d.ts +2 -0
- package/system/dist/kernel/settings-door-view.d.ts +5 -1
- package/system/dist/kernel/settings-view-types.d.ts +7 -1
- package/system/dist/migrations/hub/2026-11-02-addon-settings-node-id.d.ts +3 -0
- package/system/dist/migrations/hub/index.d.ts +3 -4
- package/system/dist/{restore-archive-xTqhDFkW.js → restore-archive-BEUIhG8U.js} +1 -1
- package/system/dist/{restore-archive-BGK6EnYj.mjs → restore-archive-Dx9F-3zV.mjs} +82 -82
- package/system/dist/{retention-CXu8PB2L.mjs → retention-fsBjIfxP.mjs} +1 -1
- package/system/dist/{retention-gQ3GIUA3.js → retention-nNCAON-6.js} +1 -1
- package/system/dist/{wal-maintenance-D7XmFaUD.mjs → wal-maintenance-0XhlopB5.mjs} +0 -0
- package/system/dist/{wal-maintenance-Hwzm3DCe.js → wal-maintenance-UKXXEEoS.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-
|
|
1
|
+
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-CnC8-kF6.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-B4r3_aYb.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-BV9n2ivT.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -13,6 +13,7 @@ node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
|
13
13
|
let node_path = require("node:path");
|
|
14
14
|
node_path = require_chunk.__toESM(node_path);
|
|
15
15
|
let node_util = require("node:util");
|
|
16
|
+
let _camstack_types_addon = require("@camstack/types/addon");
|
|
16
17
|
let node_module = require("node:module");
|
|
17
18
|
let node_os = require("node:os");
|
|
18
19
|
node_os = require_chunk.__toESM(node_os);
|
|
@@ -705,10 +706,58 @@ _coreBlocksRecordKinds["timed-runs"];
|
|
|
705
706
|
var import_read_all_rows = require_read_all_rows$1.require_read_all_rows();
|
|
706
707
|
/** The collection every addon's settings share. Named nowhere else (with sections' own module). */
|
|
707
708
|
var ADDON_SETTINGS_COLLECTION = "addon-settings";
|
|
709
|
+
/** Row data of a field: `nodeId` only on a node row (the key says which node). */
|
|
710
|
+
function rowData(addonId, key, value) {
|
|
711
|
+
const nodeId = (0, _camstack_types_addon.nodeIdOfScopedKey)(key);
|
|
712
|
+
return nodeId === null ? {
|
|
713
|
+
addonId,
|
|
714
|
+
key,
|
|
715
|
+
value
|
|
716
|
+
} : {
|
|
717
|
+
addonId,
|
|
718
|
+
key,
|
|
719
|
+
value,
|
|
720
|
+
nodeId
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* The central delete of a forgotten node (D986, the node twin of `clearDeviceSettings`): every
|
|
725
|
+
* `addon-settings` row of EVERY addon that carries this node id, in one statement. Matched on
|
|
726
|
+
* the `nodeId` each node row carries. A cluster row, a fleet-default row and a device row have
|
|
727
|
+
* none, so nothing else goes. Returns how many rows went.
|
|
728
|
+
*/
|
|
729
|
+
async function clearNodeSettings(door, nodeId) {
|
|
730
|
+
if (nodeId === "") throw new Error("node settings: an empty node id names every node");
|
|
731
|
+
const { deleted } = await door.deleteWhere({
|
|
732
|
+
collection: ADDON_SETTINGS_COLLECTION,
|
|
733
|
+
filter: { where: { nodeId } }
|
|
734
|
+
});
|
|
735
|
+
return deleted;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* The cluster and fleet-default rows of one addon (no node suffix), through the `query` slice
|
|
739
|
+
* alone, so a runner's client door serves it as hub-main's door does. Three-way like every read
|
|
740
|
+
* here; the device resolver's fleet-default layer (D986).
|
|
741
|
+
*/
|
|
742
|
+
async function readUnscopedAddonSettings(door, addonId) {
|
|
743
|
+
try {
|
|
744
|
+
const all = await require_prefix_walk.loadPrefixed(door, ADDON_SETTINGS_COLLECTION, `${addonId}.`);
|
|
745
|
+
const value = Object.fromEntries(Object.entries(all).filter(([key]) => (0, _camstack_types_addon.nodeIdOfScopedKey)(key) === null));
|
|
746
|
+
return Object.keys(value).length === 0 ? { kind: "absent" } : {
|
|
747
|
+
kind: "present",
|
|
748
|
+
value
|
|
749
|
+
};
|
|
750
|
+
} catch (err) {
|
|
751
|
+
return {
|
|
752
|
+
kind: "unreadable",
|
|
753
|
+
error: err instanceof Error ? err.message : String(err)
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
}
|
|
708
757
|
function createAddonSettingsStore(door, addonId) {
|
|
709
758
|
const prefix = `${addonId}.`;
|
|
710
759
|
const message = (err) => err instanceof Error ? err.message : String(err);
|
|
711
|
-
|
|
760
|
+
const store = {
|
|
712
761
|
async read() {
|
|
713
762
|
try {
|
|
714
763
|
const value = await require_prefix_walk.loadPrefixed(door, ADDON_SETTINGS_COLLECTION, prefix);
|
|
@@ -746,11 +795,7 @@ function createAddonSettingsStore(door, addonId) {
|
|
|
746
795
|
for (const [key, value] of Object.entries(patch)) if (value === void 0) removed.push(`${prefix}${key}`);
|
|
747
796
|
else records.push({
|
|
748
797
|
id: `${prefix}${key}`,
|
|
749
|
-
data:
|
|
750
|
-
addonId,
|
|
751
|
-
key,
|
|
752
|
-
value
|
|
753
|
-
}
|
|
798
|
+
data: rowData(addonId, key, value)
|
|
754
799
|
});
|
|
755
800
|
if (records.length === 0 && removed.length === 0) return;
|
|
756
801
|
if (require_prefix_range.prefixRange(prefix) === null) throw new Error(`addon settings: "${addonId}" cannot be expressed as an id range`);
|
|
@@ -764,8 +809,32 @@ function createAddonSettingsStore(door, addonId) {
|
|
|
764
809
|
conflict: ["id"],
|
|
765
810
|
records
|
|
766
811
|
}] : []] });
|
|
812
|
+
},
|
|
813
|
+
readUnscoped: () => readUnscopedAddonSettings(door, addonId),
|
|
814
|
+
async readNode(nodeId) {
|
|
815
|
+
const all = await store.read();
|
|
816
|
+
if (all.kind !== "present") return all;
|
|
817
|
+
const value = {};
|
|
818
|
+
for (const [key, field] of Object.entries(all.value)) {
|
|
819
|
+
if ((0, _camstack_types_addon.nodeIdOfScopedKey)(key) !== nodeId) continue;
|
|
820
|
+
value[key.slice(0, key.indexOf("@"))] = field;
|
|
821
|
+
}
|
|
822
|
+
return Object.keys(value).length === 0 ? { kind: "absent" } : {
|
|
823
|
+
kind: "present",
|
|
824
|
+
value
|
|
825
|
+
};
|
|
826
|
+
},
|
|
827
|
+
async mergeNode(nodeId, patch) {
|
|
828
|
+
if (nodeId === "") throw new Error("node settings: an empty node id names every node");
|
|
829
|
+
const scoped = {};
|
|
830
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
831
|
+
if (key.includes("@")) throw new Error(`node settings: "${key}" is already scoped`);
|
|
832
|
+
scoped[`${key}@${nodeId}`] = value;
|
|
833
|
+
}
|
|
834
|
+
return store.merge(scoped);
|
|
767
835
|
}
|
|
768
836
|
};
|
|
837
|
+
return store;
|
|
769
838
|
}
|
|
770
839
|
//#endregion
|
|
771
840
|
//#region src/builtins/core-blocks/block-settings-store.ts
|
|
@@ -7287,9 +7356,11 @@ exports.CoreBlockStore = CoreBlockStore;
|
|
|
7287
7356
|
exports.CoreBlocksAddon = CoreBlocksAddon;
|
|
7288
7357
|
exports.blockAddonId = blockAddonId;
|
|
7289
7358
|
exports.blockIdFromAddonId = blockIdFromAddonId;
|
|
7359
|
+
exports.clearNodeSettings = clearNodeSettings;
|
|
7290
7360
|
exports.compileBlock = compileBlock;
|
|
7291
7361
|
exports.createAddonSettingsStore = createAddonSettingsStore;
|
|
7292
7362
|
exports.extractSettingsSchema = extractSettingsSchema;
|
|
7293
7363
|
exports.loadBlockTypeDefs = loadBlockTypeDefs;
|
|
7294
7364
|
exports.materializeBlock = materializeBlock;
|
|
7365
|
+
exports.readUnscopedAddonSettings = readUnscopedAddonSettings;
|
|
7295
7366
|
exports.removeBlockPackage = removeBlockPackage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as EMPTY_REMOTE_CONFIG, $a as helperMembers, $o as collectSecretMarkerRefs, Aa as vocabActionIdFor, An as collectWhenMirrorSources, Bi as resolveCoreBlockFiles,
|
|
1
|
+
import { $ as EMPTY_REMOTE_CONFIG, $a as helperMembers, $o as collectSecretMarkerRefs, Aa as vocabActionIdFor, An as collectWhenMirrorSources, Bi as resolveCoreBlockFiles, Bt as SchedulerError, C as CORE_BLOCK_ADDON_PREFIX, Ca as validateComposition, Ct as MediaPlayerStatusSchema, D as ConditionMirror, Di as problemsBlockSave, Er as internalActionId, Fi as replacedFieldKeys, Fn as coreBlockAddonId, Fr as isInternalActionId, Ft as RemoteAssumedStateSchema, Gr as localDateOf, Hn as customKeyOfRole, I as DEFAULT_HOLD_OVERRIDE, Ii as resolveActionVariables, In as coreBlockComposition, It as RemoteConfigSchema, Ja as compositionSourceKey, Ji as runSteps, Js as EventCategory$1, K as DeclaredDevices, Ki as resolveStepArgs, Ks as DeviceType$1, Ln as coreBlockIdFromAddonId, Ls as secretTreeFromSchema, Lt as RunningStateStatusSchema, Na as zoneOnlySite, Ni as remoteCapability, O as ControlStatusSchema, On as checkTemplatePayload, Pi as remoteLayoutComponentsCapability, Pn as compositionSourceRefs, Ps as resolveSecretMarkers, Q as EMPTY_REMOTE_ASSUMED_STATE, Rn as coreBlockSourceKind, S as CORE_BLOCKS_ADDON_ID, Si as planComposition, Ta as validateSchedulerInput, Ti as powerSourceLinkOfComposition, Tn as capUnitResolver, Ua as composedDeviceRef, Un as customRole, Vs as transformSecretWrite, Vt as SchedulerSchema, Xi as schedulersCapability, Xt as TemplateKindSchema, Yr as lockDoorLinkOfComposition, Yt as SwitchStatusSchema, Z as EMPTY_AUTOMATION_STATE, Zn as describeComposableCaps, _n as buildActionSteps, _r as fanPresetsCapability, aa as siteFor, ba as timedRunLimitOf, c as ActionStepSchema, ci as nextOccurrence, di as normalizeCoreBlockWrite, do as BaseAddon, en as actionEffect, et as FAN_CAPTURE_FIELDS, f as AutomationStateDocSchema, fi as normalizeStepTargets, fs as hydrateSchema, gi as occurrenceOn, is as defineRecordKinds, it as FanPresetSchema, ja as weekdayOfLocalDate, jt as QuantityUnitError, k as CoreBlockSchema, l as ActionTargetResolver, li as normalizeActionUnits, mt as INTERNAL_ACTION_PREFIX, nn as actionsCapability, nt as FanControlStatusSchema, o as ALL_CAPABILITY_DEFINITIONS, p as BUILTIN_REMOTE_COMPONENTS, pt as IDLE_ACTION_STATUS, qs as errMsg$1, rn as addonIdOfActionId, s as ActionError, t as ACTION_TARGET_INVALIDATION_EVENTS, tn as actionSourceCapability, u as ActionVariableSchema, ui as normalizeCapStep, un as appendTrace, ur as evaluateWhenTree, va as templateCapability, vn as buildCapabilityLookup, wi as powerSourceCapability, x as COMPOSER_RUNNER_ID, xa as timedRunSeconds, xs as isSecretRefOwnedBy, ya as timedRunCapability, ys as isSecretMarker, zi as resolveCoreBlockEntry, zn as coreBlocksCapability, zr as kebabToCamel } from "../../dist-CnC8-kF6.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-
|
|
3
|
+
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-CI2tZzAo.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -10,6 +10,7 @@ import { customizationBlockName } from "@camstack/types/node";
|
|
|
10
10
|
import * as fs from "node:fs/promises";
|
|
11
11
|
import * as path$1 from "node:path";
|
|
12
12
|
import { isDeepStrictEqual } from "node:util";
|
|
13
|
+
import { nodeIdOfScopedKey } from "@camstack/types/addon";
|
|
13
14
|
import * as os$1 from "node:os";
|
|
14
15
|
import { pathToFileURL } from "node:url";
|
|
15
16
|
//#region src/builtins/core-blocks/block-package.ts
|
|
@@ -437,7 +438,7 @@ var BlockSupervisor = class {
|
|
|
437
438
|
else await this.report(block.id, verdict.status, verdict.reason);
|
|
438
439
|
}
|
|
439
440
|
} catch (err) {
|
|
440
|
-
const error = errMsg(err);
|
|
441
|
+
const error = errMsg$1(err);
|
|
441
442
|
this.releaseReport = {
|
|
442
443
|
error,
|
|
443
444
|
unreleased: []
|
|
@@ -699,10 +700,58 @@ _coreBlocksRecordKinds["timed-runs"];
|
|
|
699
700
|
var import_read_all_rows = require_read_all_rows();
|
|
700
701
|
/** The collection every addon's settings share. Named nowhere else (with sections' own module). */
|
|
701
702
|
var ADDON_SETTINGS_COLLECTION = "addon-settings";
|
|
703
|
+
/** Row data of a field: `nodeId` only on a node row (the key says which node). */
|
|
704
|
+
function rowData(addonId, key, value) {
|
|
705
|
+
const nodeId = nodeIdOfScopedKey(key);
|
|
706
|
+
return nodeId === null ? {
|
|
707
|
+
addonId,
|
|
708
|
+
key,
|
|
709
|
+
value
|
|
710
|
+
} : {
|
|
711
|
+
addonId,
|
|
712
|
+
key,
|
|
713
|
+
value,
|
|
714
|
+
nodeId
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* The central delete of a forgotten node (D986, the node twin of `clearDeviceSettings`): every
|
|
719
|
+
* `addon-settings` row of EVERY addon that carries this node id, in one statement. Matched on
|
|
720
|
+
* the `nodeId` each node row carries. A cluster row, a fleet-default row and a device row have
|
|
721
|
+
* none, so nothing else goes. Returns how many rows went.
|
|
722
|
+
*/
|
|
723
|
+
async function clearNodeSettings(door, nodeId) {
|
|
724
|
+
if (nodeId === "") throw new Error("node settings: an empty node id names every node");
|
|
725
|
+
const { deleted } = await door.deleteWhere({
|
|
726
|
+
collection: ADDON_SETTINGS_COLLECTION,
|
|
727
|
+
filter: { where: { nodeId } }
|
|
728
|
+
});
|
|
729
|
+
return deleted;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* The cluster and fleet-default rows of one addon (no node suffix), through the `query` slice
|
|
733
|
+
* alone, so a runner's client door serves it as hub-main's door does. Three-way like every read
|
|
734
|
+
* here; the device resolver's fleet-default layer (D986).
|
|
735
|
+
*/
|
|
736
|
+
async function readUnscopedAddonSettings(door, addonId) {
|
|
737
|
+
try {
|
|
738
|
+
const all = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, `${addonId}.`);
|
|
739
|
+
const value = Object.fromEntries(Object.entries(all).filter(([key]) => nodeIdOfScopedKey(key) === null));
|
|
740
|
+
return Object.keys(value).length === 0 ? { kind: "absent" } : {
|
|
741
|
+
kind: "present",
|
|
742
|
+
value
|
|
743
|
+
};
|
|
744
|
+
} catch (err) {
|
|
745
|
+
return {
|
|
746
|
+
kind: "unreadable",
|
|
747
|
+
error: err instanceof Error ? err.message : String(err)
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
}
|
|
702
751
|
function createAddonSettingsStore(door, addonId) {
|
|
703
752
|
const prefix = `${addonId}.`;
|
|
704
753
|
const message = (err) => err instanceof Error ? err.message : String(err);
|
|
705
|
-
|
|
754
|
+
const store = {
|
|
706
755
|
async read() {
|
|
707
756
|
try {
|
|
708
757
|
const value = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, prefix);
|
|
@@ -740,11 +789,7 @@ function createAddonSettingsStore(door, addonId) {
|
|
|
740
789
|
for (const [key, value] of Object.entries(patch)) if (value === void 0) removed.push(`${prefix}${key}`);
|
|
741
790
|
else records.push({
|
|
742
791
|
id: `${prefix}${key}`,
|
|
743
|
-
data:
|
|
744
|
-
addonId,
|
|
745
|
-
key,
|
|
746
|
-
value
|
|
747
|
-
}
|
|
792
|
+
data: rowData(addonId, key, value)
|
|
748
793
|
});
|
|
749
794
|
if (records.length === 0 && removed.length === 0) return;
|
|
750
795
|
if (prefixRange(prefix) === null) throw new Error(`addon settings: "${addonId}" cannot be expressed as an id range`);
|
|
@@ -758,8 +803,32 @@ function createAddonSettingsStore(door, addonId) {
|
|
|
758
803
|
conflict: ["id"],
|
|
759
804
|
records
|
|
760
805
|
}] : []] });
|
|
806
|
+
},
|
|
807
|
+
readUnscoped: () => readUnscopedAddonSettings(door, addonId),
|
|
808
|
+
async readNode(nodeId) {
|
|
809
|
+
const all = await store.read();
|
|
810
|
+
if (all.kind !== "present") return all;
|
|
811
|
+
const value = {};
|
|
812
|
+
for (const [key, field] of Object.entries(all.value)) {
|
|
813
|
+
if (nodeIdOfScopedKey(key) !== nodeId) continue;
|
|
814
|
+
value[key.slice(0, key.indexOf("@"))] = field;
|
|
815
|
+
}
|
|
816
|
+
return Object.keys(value).length === 0 ? { kind: "absent" } : {
|
|
817
|
+
kind: "present",
|
|
818
|
+
value
|
|
819
|
+
};
|
|
820
|
+
},
|
|
821
|
+
async mergeNode(nodeId, patch) {
|
|
822
|
+
if (nodeId === "") throw new Error("node settings: an empty node id names every node");
|
|
823
|
+
const scoped = {};
|
|
824
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
825
|
+
if (key.includes("@")) throw new Error(`node settings: "${key}" is already scoped`);
|
|
826
|
+
scoped[`${key}@${nodeId}`] = value;
|
|
827
|
+
}
|
|
828
|
+
return store.merge(scoped);
|
|
761
829
|
}
|
|
762
830
|
};
|
|
831
|
+
return store;
|
|
763
832
|
}
|
|
764
833
|
//#endregion
|
|
765
834
|
//#region src/builtins/core-blocks/block-settings-store.ts
|
|
@@ -2689,7 +2758,7 @@ function buildActionsRuntime(deps) {
|
|
|
2689
2758
|
type: "addon",
|
|
2690
2759
|
id: "core-blocks"
|
|
2691
2760
|
},
|
|
2692
|
-
category: EventCategory.ActionsRunChanged,
|
|
2761
|
+
category: EventCategory$1.ActionsRunChanged,
|
|
2693
2762
|
data: event
|
|
2694
2763
|
}),
|
|
2695
2764
|
logger: deps.logger.child("actions")
|
|
@@ -4565,7 +4634,7 @@ function buildSchedulersRuntime(deps) {
|
|
|
4565
4634
|
units: capUnitResolver(ALL_CAPABILITY_DEFINITIONS),
|
|
4566
4635
|
logger: deps.logger.child("schedulers")
|
|
4567
4636
|
});
|
|
4568
|
-
const unsubscribers = [...ACTION_TARGET_INVALIDATION_EVENTS.map((category) => deps.eventBus.subscribe({ category }, () => engine.invalidateTargets())), deps.eventBus.subscribe({ category: EventCategory.DeviceStateChanged }, (event) => {
|
|
4637
|
+
const unsubscribers = [...ACTION_TARGET_INVALIDATION_EVENTS.map((category) => deps.eventBus.subscribe({ category }, () => engine.invalidateTargets())), deps.eventBus.subscribe({ category: EventCategory$1.DeviceStateChanged }, (event) => {
|
|
4569
4638
|
const data = parseDeviceStateChanged(event.data);
|
|
4570
4639
|
if (data !== null) engine.onDeviceState(data.deviceId, data.capName, data.slice);
|
|
4571
4640
|
})];
|
|
@@ -5353,7 +5422,7 @@ function buildRemoteRuntime(deps) {
|
|
|
5353
5422
|
invoke: invokeCapOver(deps.api),
|
|
5354
5423
|
templateExists: async (id) => await templateRows.get(id) !== null,
|
|
5355
5424
|
isMediaPlayer: async (deviceId) => {
|
|
5356
|
-
return (await deps.api()?.deviceManager.getDevice.query({ deviceId }))?.type === DeviceType.MediaPlayer;
|
|
5425
|
+
return (await deps.api()?.deviceManager.getDevice.query({ deviceId }))?.type === DeviceType$1.MediaPlayer;
|
|
5357
5426
|
},
|
|
5358
5427
|
reportedStatus: reportedStatusOver(deps.api, deps.logger.child("remote")),
|
|
5359
5428
|
runningState: runningStateOver(deps.api, deps.logger.child("remote")),
|
|
@@ -5523,7 +5592,7 @@ var FanPresetsService = class {
|
|
|
5523
5592
|
};
|
|
5524
5593
|
};
|
|
5525
5594
|
const facts = await this.deps.devices.describe(deviceId);
|
|
5526
|
-
if (facts === null || facts.type !== DeviceType.Fan) return refuse("not-a-fan", `device ${deviceId} is not a fan`);
|
|
5595
|
+
if (facts === null || facts.type !== DeviceType$1.Fan) return refuse("not-a-fan", `device ${deviceId} is not a fan`);
|
|
5527
5596
|
if (presets.length > 12) return refuse("too-many", `at most 12 presets per fan`);
|
|
5528
5597
|
const ids = /* @__PURE__ */ new Set();
|
|
5529
5598
|
const names = /* @__PURE__ */ new Set();
|
|
@@ -5711,7 +5780,7 @@ var FanPresetsService = class {
|
|
|
5711
5780
|
if (id === deviceId) continue;
|
|
5712
5781
|
const sibling = await this.deps.devices.describe(id);
|
|
5713
5782
|
if (sibling === null) continue;
|
|
5714
|
-
if (sibling.type === DeviceType.Switch) {
|
|
5783
|
+
if (sibling.type === DeviceType$1.Switch) {
|
|
5715
5784
|
const status = await this.deps.readings.switchState(id);
|
|
5716
5785
|
if (status === null) {
|
|
5717
5786
|
omit(sibling.name, `switch ${id} reports no state`);
|
|
@@ -5731,7 +5800,7 @@ var FanPresetsService = class {
|
|
|
5731
5800
|
label: sibling.name
|
|
5732
5801
|
}
|
|
5733
5802
|
});
|
|
5734
|
-
} else if (sibling.type === DeviceType.Control) {
|
|
5803
|
+
} else if (sibling.type === DeviceType$1.Control) {
|
|
5735
5804
|
const status = await this.deps.readings.control(id);
|
|
5736
5805
|
if (status === null) {
|
|
5737
5806
|
omit(sibling.name, `control ${id} reports no value`);
|
|
@@ -6051,7 +6120,7 @@ function armBlocksIntegration(options) {
|
|
|
6051
6120
|
if (attempt === maxAttempts) {
|
|
6052
6121
|
options.logger.warn("core-blocks: the shared integration never reconciled — a block that declares a device has nowhere to hang it", { meta: {
|
|
6053
6122
|
attempts: attempt,
|
|
6054
|
-
error: errMsg(err)
|
|
6123
|
+
error: errMsg$1(err)
|
|
6055
6124
|
} });
|
|
6056
6125
|
return;
|
|
6057
6126
|
}
|
|
@@ -6248,7 +6317,7 @@ async function readStates(deps, blockIds) {
|
|
|
6248
6317
|
state: byId.get(id) ?? null
|
|
6249
6318
|
}]));
|
|
6250
6319
|
} catch (err) {
|
|
6251
|
-
const error = errMsg(err);
|
|
6320
|
+
const error = errMsg$1(err);
|
|
6252
6321
|
deps.logger.warn("composer state unreachable", { meta: {
|
|
6253
6322
|
blocks: blockIds.length,
|
|
6254
6323
|
error
|
|
@@ -6301,7 +6370,7 @@ async function resolveTarget(deps, target) {
|
|
|
6301
6370
|
} catch (err) {
|
|
6302
6371
|
return {
|
|
6303
6372
|
kind: "unresolved",
|
|
6304
|
-
why: errMsg(err)
|
|
6373
|
+
why: errMsg$1(err)
|
|
6305
6374
|
};
|
|
6306
6375
|
}
|
|
6307
6376
|
}
|
|
@@ -6634,7 +6703,7 @@ var CoreBlocksAddon = class extends BaseAddon {
|
|
|
6634
6703
|
logger: this.ctx.logger.child("timed-run")
|
|
6635
6704
|
});
|
|
6636
6705
|
this.timedRun = timedRun;
|
|
6637
|
-
this.subscribe({ category: EventCategory.DeviceStateChanged }, (event) => {
|
|
6706
|
+
this.subscribe({ category: EventCategory$1.DeviceStateChanged }, (event) => {
|
|
6638
6707
|
const data = parseDeviceStateChanged(event.data);
|
|
6639
6708
|
if (data !== null) timedRun.onDeviceState(data);
|
|
6640
6709
|
});
|
|
@@ -6750,7 +6819,7 @@ var CoreBlocksAddon = class extends BaseAddon {
|
|
|
6750
6819
|
sensorOf: (deviceId) => this.doorSensorOf(deviceId),
|
|
6751
6820
|
logger: this.ctx.logger.child("lock-door")
|
|
6752
6821
|
});
|
|
6753
|
-
this.subscribe({ category: EventCategory.DeviceStateChanged }, (event) => {
|
|
6822
|
+
this.subscribe({ category: EventCategory$1.DeviceStateChanged }, (event) => {
|
|
6754
6823
|
const data = parseDeviceStateChanged(event.data);
|
|
6755
6824
|
if (data !== null) gate.onStateChanged(data);
|
|
6756
6825
|
});
|
|
@@ -7272,4 +7341,4 @@ async function loadTranspiler(logger) {
|
|
|
7272
7341
|
}
|
|
7273
7342
|
}
|
|
7274
7343
|
//#endregion
|
|
7275
|
-
export { CoreBlocksAddon, BlockSettingsStore as a,
|
|
7344
|
+
export { CoreBlocksAddon, BlockSettingsStore as a, readUnscopedAddonSettings as c, BlockSupervisor as d, BLOCK_ADDON_PREFIX as f, removeBlockPackage as g, materializeBlock as h, loadBlockTypeDefs as i, CORE_BLOCKS_COLLECTION as l, blockIdFromAddonId as m, CoreBlockStore as n, clearNodeSettings as o, blockAddonId as p, compileBlock as r, createAddonSettingsStore as s, extractSettingsSchema as t, CORE_BLOCK_SETTINGS_COLLECTION as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CoreBlocksAddon, a as BlockSettingsStore,
|
|
1
|
+
import { CoreBlocksAddon, a as BlockSettingsStore, d as BlockSupervisor, f as BLOCK_ADDON_PREFIX, g as removeBlockPackage, h as materializeBlock, i as loadBlockTypeDefs, l as CORE_BLOCKS_COLLECTION, m as blockIdFromAddonId, n as CoreBlockStore, p as blockAddonId, r as compileBlock, t as extractSettingsSchema, u as CORE_BLOCK_SETTINGS_COLLECTION } from "./core-blocks.addon.mjs";
|
|
2
2
|
export { BLOCK_ADDON_PREFIX, BlockSettingsStore, BlockSupervisor, CORE_BLOCKS_COLLECTION, CORE_BLOCK_SETTINGS_COLLECTION, CoreBlockStore, CoreBlocksAddon, CoreBlocksAddon as default, blockAddonId, blockIdFromAddonId, compileBlock, extractSettingsSchema, loadBlockTypeDefs, materializeBlock, removeBlockPackage };
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retention = require("../../retention-
|
|
6
|
+
const require_dist = require("../../dist-B4r3_aYb.js");
|
|
7
|
+
const require_retention = require("../../retention-nNCAON-6.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
10
10
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as subjectIdOf, _ as readUnit, a as FIVE_MINUTES_MS, b as SeriesRegistry, c as bucketEndOf, d as CAP_KEY_PREFIX, f as CaptureEngine, g as readPath, h as catalogMetrics, i as DAY_MS, l as bucketStartOf, m as capSeriesKey, n as RetentionJob, o as HOUR_MS, p as capItemSeriesKey, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo, v as DeviceDirectory, x as identityOf, y as isRealDeviceType } from "../../retention-
|
|
1
|
+
import { Js as EventCategory, Ks as DeviceType, _s as isReadingQuantity, ct as HISTORY_CATALOG, dn as armRemovalReconcile, do as BaseAddon, ds as historyUnitFor, er as deviceHistoryCapability, is as defineRecordKinds, lt as HISTORY_ITEM_CATALOG, nr as deviceRemovalHookCapability, os as emitReadiness, q as DeviceRunSchema, rr as deviceRunsCapability, uo as wattMillisecondsToKwh, z as DEVICE_HISTORY_ENERGY_KEY } from "../../dist-CnC8-kF6.mjs";
|
|
2
|
+
import { S as subjectIdOf, _ as readUnit, a as FIVE_MINUTES_MS, b as SeriesRegistry, c as bucketEndOf, d as CAP_KEY_PREFIX, f as CaptureEngine, g as readPath, h as catalogMetrics, i as DAY_MS, l as bucketStartOf, m as capSeriesKey, n as RetentionJob, o as HOUR_MS, p as capItemSeriesKey, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo, v as DeviceDirectory, x as identityOf, y as isRealDeviceType } from "../../retention-fsBjIfxP.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
5
5
|
var FLUSH_INTERVAL_MS = 1e4;
|
|
@@ -3,12 +3,12 @@ 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-B4r3_aYb.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
10
10
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
11
|
-
const require_dns_wire = require("../../dns-wire-
|
|
11
|
+
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $n as deviceExtensionCapability, Bs as
|
|
1
|
+
import { $n as deviceExtensionCapability, Bs as toSecretFieldView, F as DAY_NAMES, Gs as DeviceRole, Hr as legacyAutoLinkIds, Hs as userError, Is as secretTreeFromPaths, J as DeviceStatusSchema, Js as EventCategory, Ks as DeviceType, Ps as resolveSecretMarkers, Rs as sleep$1, Sr as formatMinutes, Vn as createDeviceExtensionProvider, Vs as transformSecretWrite, Wo as WELL_KNOWN_TAB_MAP, Ws as DeviceFeature, X as DiscoveryProposalBodySchema, Y as DeviceTombstoneSchema, Yi as runtimeStatePolicyFor, Yn as defineExtensionSlotProvider, ar as deviceStatusCapability, at as FieldClaimModeSchema, bi as parseStreamParamsFormPatch, bs as isSecretMarkerLike, cr as enumerateSchemaFields, do as BaseAddon, es as collectZodSecretPaths, fr as expandContainer, g as CAMERA_SWITCH_ORDER, gs as isKeychainStoredField, ir as deviceStateCapability, is as defineRecordKinds, ms as isDeviceConfigCap, o as ALL_CAPABILITY_DEFINITIONS, oa as siteZoneKey, ot as FieldClaimSchema, pi as normalizeUnit, qr as locationIconKey, qs as errMsg, sr as enumerateItemArrayFields, tr as deviceManagerCapability, v as CAP_NAMES_WITH_STATUS, vs as isSecretClear, wn as canonicalIconKey, xn as buildStreamParamsConfigSchema, xt as MINUTES_PER_DAY, ys as isSecretMarker, zo as SECRET_CLEAR, zt as STREAM_PROFILE_META } from "../../dist-CnC8-kF6.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
5
5
|
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { s as normalizeServiceType } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
@@ -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-B4r3_aYb.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-
|
|
1
|
+
import { Xr as logDestinationCapability, do as BaseAddon } from "../../dist-CnC8-kF6.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -3,10 +3,10 @@ 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-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-B4r3_aYb.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-BF8N9fC6.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_constants = require("../../constants-dYIQm8ab.js");
|
|
10
10
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
11
11
|
let node_crypto = require("node:crypto");
|
|
12
12
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Br as keychainAdminCapability,
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { As as parseSecretRef, Br as keychainAdminCapability, Ds as normalizeSecretOwner, Js as EventCategory, Vr as keychainCapability, _t as KeychainResetRecordSchema, cs as formatSecretScope, do as BaseAddon, gt as KeychainAuditEntrySchema, ht as KEYCHAIN_RESET_TRIGGER_ACTOR, is as defineRecordKinds } from "../../dist-CnC8-kF6.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-04o7NByo.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-Bskr2h1W.mjs";
|
|
5
5
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
6
6
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
7
7
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -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-B4r3_aYb.js");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Js as EventCategory, Mt as RECORDING_SOURCE_CAMSTACK_ADDON, Pt as RecordingStatusSchema, do as BaseAddon, ei as mayWriteToLocation, qs as errMsg, ts as createEvent } from "../../dist-CnC8-kF6.mjs";
|
|
2
2
|
import * as fsp from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { constants } from "node:fs";
|
|
@@ -3,10 +3,10 @@ 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-B4r3_aYb.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
9
|
-
const require_device_ca = require("../../device-ca-
|
|
9
|
+
const require_device_ca = require("../../device-ca-BF8N9fC6.js");
|
|
10
10
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $t as UserRecordSchema, A as CredentialTokenClaimsSchema, At as PreferenceValueSchema, Dt as PREFERENCES_MAX_VALUE_BYTES, Ht as ScopedTokenSchema, Nr as isCredentialTokenPayload, Ot as PreferenceDeviceIdSchema, Qn as deviceCredentialsCapability, R as DEVICE_ENROLLMENT_TTL_MS, Sa as userManagementCapability, Ss as makeSecretMarker, V as DEVICE_NONCE_TTL_MS,
|
|
2
|
+
import { $t as UserRecordSchema, A as CredentialTokenClaimsSchema, At as PreferenceValueSchema, Dt as PREFERENCES_MAX_VALUE_BYTES, Hs as userError, Ht as ScopedTokenSchema, Nr as isCredentialTokenPayload, Ot as PreferenceDeviceIdSchema, Qn as deviceCredentialsCapability, R as DEVICE_ENROLLMENT_TTL_MS, Sa as userManagementCapability, Ss as makeSecretMarker, V as DEVICE_NONCE_TTL_MS, Wt as SsoBridgeClaimsSchema, Zt as TokenScopeSchema, bn as buildDeviceSignatureMessage, do as BaseAddon, fn as authProviderCapability, is as defineRecordKinds, kt as PreferenceNamespaceSchema, w as CREDENTIAL_TOKEN_AUDIENCE, xr as formatDeviceRevoker, yn as buildDeviceEnrollmentLink, ys as isSecretMarker } from "../../dist-CnC8-kF6.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-04o7NByo.mjs";
|
|
6
6
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import * as crypto$1 from "node:crypto";
|