@camstack/system 1.2.169 → 1.2.171
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-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -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-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -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 +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/data-store-dispatch.d.ts +18 -6
- package/dist/builtins/storage-orchestrator/hub-settings-forward.d.ts +68 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +27 -3
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +235 -57
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +235 -57
- 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-digPByP6.mjs → dist-1DEQFmTq.mjs} +165 -6
- package/dist/{dist-D6kBG4fg.js → dist-DsoVfJSR.js} +165 -6
- package/dist/hub-cap-forward-BdT320dq.mjs +53 -0
- package/dist/hub-cap-forward-DmHNjbB0.js +70 -0
- package/dist/index.js +18 -199
- package/dist/index.mjs +22 -203
- package/dist/kernel/capability-registry.d.ts +8 -27
- package/dist/kernel/config-manager.d.ts +0 -33
- package/dist/{manifest-system-deps-onn-Eawl.mjs → manifest-system-deps-Da6sme9C.mjs} +3 -54
- package/dist/{manifest-system-deps-BjMNGEpl.js → manifest-system-deps-ir_XTNpe.js} +2 -71
- package/dist/{retired-settings-keys-B5D2hfoN.mjs → retired-settings-keys-ChS1Q2Kv.mjs} +1 -1
- package/dist/{retired-settings-keys-BywIz4dZ.js → retired-settings-keys-DTE5k4lU.js} +1 -1
- 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-DsoVfJSR.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");
|
|
@@ -19,6 +19,7 @@ const require_builtins_native_metrics_native_metrics_addon = require("./builtins
|
|
|
19
19
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
20
20
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
21
21
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
22
|
+
const require_hub_cap_forward = require("./hub-cap-forward-DmHNjbB0.js");
|
|
22
23
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
23
24
|
require("./builtins/storage-orchestrator/index.js");
|
|
24
25
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
@@ -26,7 +27,7 @@ require("./builtins/system-config/index.js");
|
|
|
26
27
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
27
28
|
const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
|
|
28
29
|
const require_tls$1 = require("./tls-BxQlomxd.js");
|
|
29
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
30
|
+
const require_manifest_system_deps = require("./manifest-system-deps-ir_XTNpe.js");
|
|
30
31
|
const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
|
|
31
32
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
32
33
|
let zod = require("zod");
|
|
@@ -5315,7 +5316,6 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
5315
5316
|
routerFactory = null;
|
|
5316
5317
|
configReader = null;
|
|
5317
5318
|
collectionConfigReader = null;
|
|
5318
|
-
configManager = null;
|
|
5319
5319
|
_ready = false;
|
|
5320
5320
|
/** Boot-time dependency graph: capability → dependsOn names (from CapabilityDeclaration) */
|
|
5321
5321
|
capabilityDeps = /* @__PURE__ */ new Map();
|
|
@@ -5400,10 +5400,6 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
5400
5400
|
setCollectionConfigReader(reader) {
|
|
5401
5401
|
this.collectionConfigReader = reader;
|
|
5402
5402
|
}
|
|
5403
|
-
/** Set the config manager for persisted device activation state. */
|
|
5404
|
-
setConfigManager(manager) {
|
|
5405
|
-
this.configManager = manager;
|
|
5406
|
-
}
|
|
5407
5403
|
/** Register boot-time dependency edges (from CapabilityDeclaration.dependsOn). */
|
|
5408
5404
|
setDependencies(capabilityName, dependsOn) {
|
|
5409
5405
|
this.capabilityDeps.set(capabilityName, dependsOn);
|
|
@@ -6139,88 +6135,18 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
6139
6135
|
});
|
|
6140
6136
|
}
|
|
6141
6137
|
/**
|
|
6142
|
-
* Check if a specific addon's capability is active
|
|
6138
|
+
* Check if a specific addon's capability is active.
|
|
6143
6139
|
*
|
|
6144
|
-
* Resolution:
|
|
6140
|
+
* Resolution: the manifest's `autoActivate` flag, else active. There is no
|
|
6141
|
+
* persisted override layer — see D334: an activation map keyed by
|
|
6142
|
+
* `{capability}/{addonId}` is a second authority over a function some addon
|
|
6143
|
+
* already owns, which is what D62 forbids.
|
|
6145
6144
|
*/
|
|
6146
6145
|
isActiveForSystem(capability, addonId) {
|
|
6147
|
-
if (this.configManager) {
|
|
6148
|
-
const explicit = this.configManager.getSystemActivation()[`${capability}/${addonId}`];
|
|
6149
|
-
if (explicit !== void 0) return explicit;
|
|
6150
|
-
}
|
|
6151
6146
|
const autoActivate = this.autoActivateFlags.get(`${capability}/${addonId}`);
|
|
6152
6147
|
if (autoActivate !== void 0) return autoActivate;
|
|
6153
6148
|
return true;
|
|
6154
6149
|
}
|
|
6155
|
-
/** Set system-wide activation for a capability/addon pair. */
|
|
6156
|
-
setSystemActivation(capability, addonId, active) {
|
|
6157
|
-
if (!this.configManager) {
|
|
6158
|
-
this.logger.warn("Cannot set system activation: ConfigManager not wired");
|
|
6159
|
-
return;
|
|
6160
|
-
}
|
|
6161
|
-
this.configManager.setSystemActivation(capability, addonId, active);
|
|
6162
|
-
this.logger.info("System activation set", {
|
|
6163
|
-
tags: { addonId },
|
|
6164
|
-
meta: {
|
|
6165
|
-
capability,
|
|
6166
|
-
active
|
|
6167
|
-
}
|
|
6168
|
-
});
|
|
6169
|
-
this.emitEvent("capability:system-activation-changed", {
|
|
6170
|
-
capability,
|
|
6171
|
-
addonId,
|
|
6172
|
-
active
|
|
6173
|
-
});
|
|
6174
|
-
}
|
|
6175
|
-
/**
|
|
6176
|
-
* Check if a specific addon's capability is active for a device.
|
|
6177
|
-
*
|
|
6178
|
-
* Resolution: 1. explicit device override → 2. system activation → 3. autoActivate → 4. default true
|
|
6179
|
-
*/
|
|
6180
|
-
isActiveForDevice(capability, addonId, deviceId) {
|
|
6181
|
-
if (this.configManager) {
|
|
6182
|
-
const explicit = this.configManager.getDeviceActivation(deviceId)[`${capability}/${addonId}`];
|
|
6183
|
-
if (explicit !== void 0) return explicit;
|
|
6184
|
-
}
|
|
6185
|
-
return this.isActiveForSystem(capability, addonId);
|
|
6186
|
-
}
|
|
6187
|
-
/** Set device activation for a capability/addon pair. */
|
|
6188
|
-
setDeviceActivation(deviceId, capability, addonId, active) {
|
|
6189
|
-
if (!this.configManager) {
|
|
6190
|
-
this.logger.warn("Cannot set device activation: ConfigManager not wired");
|
|
6191
|
-
return;
|
|
6192
|
-
}
|
|
6193
|
-
this.configManager.setDeviceActivation(deviceId, capability, addonId, active);
|
|
6194
|
-
this.logger.info("Device activation set", {
|
|
6195
|
-
tags: {
|
|
6196
|
-
deviceId: Number(deviceId),
|
|
6197
|
-
addonId
|
|
6198
|
-
},
|
|
6199
|
-
meta: {
|
|
6200
|
-
capability,
|
|
6201
|
-
active
|
|
6202
|
-
}
|
|
6203
|
-
});
|
|
6204
|
-
this.emitEvent("capability:device-activation-changed", {
|
|
6205
|
-
deviceId,
|
|
6206
|
-
capability,
|
|
6207
|
-
addonId,
|
|
6208
|
-
active
|
|
6209
|
-
});
|
|
6210
|
-
}
|
|
6211
|
-
/**
|
|
6212
|
-
* Get all addon/capability activations for a device.
|
|
6213
|
-
* Returns every registered provider with its resolved active status.
|
|
6214
|
-
*/
|
|
6215
|
-
getDeviceActivations(deviceId) {
|
|
6216
|
-
const result = [];
|
|
6217
|
-
for (const [capName, state] of this.capabilities) for (const addonId of state.providers.keys()) result.push({
|
|
6218
|
-
capability: capName,
|
|
6219
|
-
addonId,
|
|
6220
|
-
active: this.isActiveForDevice(capName, addonId, deviceId)
|
|
6221
|
-
});
|
|
6222
|
-
return result;
|
|
6223
|
-
}
|
|
6224
6150
|
/**
|
|
6225
6151
|
* Get all addon/capability activations at system level.
|
|
6226
6152
|
* Returns every registered provider with its resolved active status.
|
|
@@ -6279,7 +6205,8 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
6279
6205
|
}
|
|
6280
6206
|
/**
|
|
6281
6207
|
* Resolve a singleton provider for a specific device.
|
|
6282
|
-
* Checks activation (
|
|
6208
|
+
* Checks activation (the manifest's autoActivate) then the per-device
|
|
6209
|
+
* singleton override — the in-memory provider pin, not a persisted flag.
|
|
6283
6210
|
*/
|
|
6284
6211
|
resolveForDevice(capability, deviceId) {
|
|
6285
6212
|
const state = this.capabilities.get(capability);
|
|
@@ -6288,7 +6215,7 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
6288
6215
|
if (deviceMap) {
|
|
6289
6216
|
const overrideAddonId = deviceMap.get(capability);
|
|
6290
6217
|
if (overrideAddonId) {
|
|
6291
|
-
if (this.
|
|
6218
|
+
if (this.isActiveForSystem(capability, overrideAddonId)) {
|
|
6292
6219
|
const provider = state.providers.get(overrideAddonId);
|
|
6293
6220
|
if (provider) return asProvider(provider);
|
|
6294
6221
|
}
|
|
@@ -6301,11 +6228,11 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
6301
6228
|
});
|
|
6302
6229
|
}
|
|
6303
6230
|
}
|
|
6304
|
-
if (state.activeAddonId && this.
|
|
6231
|
+
if (state.activeAddonId && this.isActiveForSystem(capability, state.activeAddonId)) {
|
|
6305
6232
|
const active = state.providers.get(state.activeAddonId);
|
|
6306
6233
|
return active !== void 0 ? asProvider(active) : null;
|
|
6307
6234
|
}
|
|
6308
|
-
for (const [addonId, provider] of state.providers) if (this.
|
|
6235
|
+
for (const [addonId, provider] of state.providers) if (this.isActiveForSystem(capability, addonId)) return asProvider(provider);
|
|
6309
6236
|
return null;
|
|
6310
6237
|
}
|
|
6311
6238
|
/** Set a per-device collection filter. */
|
|
@@ -6341,12 +6268,12 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
6341
6268
|
}
|
|
6342
6269
|
/**
|
|
6343
6270
|
* Resolve collection providers for a specific device.
|
|
6344
|
-
* Filters by activation (
|
|
6271
|
+
* Filters by activation (the manifest's autoActivate) and optional collection filter.
|
|
6345
6272
|
*/
|
|
6346
6273
|
resolveCollectionForDevice(capability, deviceId) {
|
|
6347
6274
|
const state = this.capabilities.get(capability);
|
|
6348
6275
|
if (!state || state.definition.mode !== "collection") return [];
|
|
6349
|
-
let entries = [...state.providers.entries()].filter(([addonId]) => !state.disabledProviders.has(addonId)).filter(([addonId]) => this.
|
|
6276
|
+
let entries = [...state.providers.entries()].filter(([addonId]) => !state.disabledProviders.has(addonId)).filter(([addonId]) => this.isActiveForSystem(capability, addonId));
|
|
6350
6277
|
const deviceMap = this.deviceCollectionFilters.get(deviceId);
|
|
6351
6278
|
if (deviceMap) {
|
|
6352
6279
|
const filterAddonIds = deviceMap.get(capability);
|
|
@@ -9484,26 +9411,17 @@ var ENV_VAR_MAP = {
|
|
|
9484
9411
|
CAMSTACK_ADMIN_USER: "auth.adminUsername",
|
|
9485
9412
|
CAMSTACK_ADMIN_PASS: "auth.adminPassword"
|
|
9486
9413
|
};
|
|
9487
|
-
var EMPTY_RUNTIME_STATE = {
|
|
9488
|
-
systemActivation: {},
|
|
9489
|
-
deviceActivation: {}
|
|
9490
|
-
};
|
|
9491
9414
|
var ConfigManager = class ConfigManager {
|
|
9492
9415
|
configPath;
|
|
9493
9416
|
bootstrapConfig;
|
|
9494
9417
|
settingsStore = null;
|
|
9495
9418
|
settingsDoor = null;
|
|
9496
|
-
runtimeState;
|
|
9497
|
-
runtimeStatePath;
|
|
9498
9419
|
constructor(configPath) {
|
|
9499
9420
|
this.configPath = configPath;
|
|
9500
9421
|
const rawYaml = this.loadYaml();
|
|
9501
9422
|
const merged = this.applyEnvOverrides((0, _camstack_types_addon.asJsonObject)(rawYaml) ?? {});
|
|
9502
9423
|
this.bootstrapConfig = bootstrapSchema.parse(merged);
|
|
9503
9424
|
this.warnDefaultCredentials();
|
|
9504
|
-
const dataPath = this.bootstrapConfig.server.dataPath ?? "camstack-data";
|
|
9505
|
-
this.runtimeStatePath = node_path.resolve(dataPath, "runtime-state.json");
|
|
9506
|
-
this.runtimeState = this.loadRuntimeState();
|
|
9507
9425
|
}
|
|
9508
9426
|
/**
|
|
9509
9427
|
* Wire the settings-store backend. Called once, after the `settings-store`
|
|
@@ -9788,72 +9706,6 @@ var ConfigManager = class ConfigManager {
|
|
|
9788
9706
|
}
|
|
9789
9707
|
};
|
|
9790
9708
|
}
|
|
9791
|
-
/** Get all system-wide activation overrides. */
|
|
9792
|
-
getSystemActivation() {
|
|
9793
|
-
return this.runtimeState.systemActivation;
|
|
9794
|
-
}
|
|
9795
|
-
/** Set system-wide activation for a capability/addon pair. */
|
|
9796
|
-
setSystemActivation(capability, addonId, active) {
|
|
9797
|
-
const key = `${capability}/${addonId}`;
|
|
9798
|
-
this.runtimeState = {
|
|
9799
|
-
...this.runtimeState,
|
|
9800
|
-
systemActivation: {
|
|
9801
|
-
...this.runtimeState.systemActivation,
|
|
9802
|
-
[key]: active
|
|
9803
|
-
}
|
|
9804
|
-
};
|
|
9805
|
-
this.saveRuntimeState();
|
|
9806
|
-
}
|
|
9807
|
-
/**
|
|
9808
|
-
* Get activation overrides for a device.
|
|
9809
|
-
* Returns a map of `{capability}/{addonId}` → active boolean.
|
|
9810
|
-
* Missing entries mean "use system activation or autoActivate default".
|
|
9811
|
-
*/
|
|
9812
|
-
getDeviceActivation(deviceId) {
|
|
9813
|
-
return this.runtimeState.deviceActivation[deviceId] ?? {};
|
|
9814
|
-
}
|
|
9815
|
-
/**
|
|
9816
|
-
* Get all device activation overrides.
|
|
9817
|
-
* Returns deviceId → (`{capability}/{addonId}` → active).
|
|
9818
|
-
*/
|
|
9819
|
-
getAllDeviceActivation() {
|
|
9820
|
-
return this.runtimeState.deviceActivation;
|
|
9821
|
-
}
|
|
9822
|
-
/**
|
|
9823
|
-
* Set activation for a specific capability/addon on a device.
|
|
9824
|
-
* Persists immediately to runtime-state.json.
|
|
9825
|
-
*
|
|
9826
|
-
* @param deviceId - The device to configure
|
|
9827
|
-
* @param capability - Capability name (e.g., 'motion-detection')
|
|
9828
|
-
* @param addonId - Addon providing the capability (e.g., 'wasm-motion')
|
|
9829
|
-
* @param active - Whether the capability is active on this device
|
|
9830
|
-
*/
|
|
9831
|
-
setDeviceActivation(deviceId, capability, addonId, active) {
|
|
9832
|
-
const key = `${capability}/${addonId}`;
|
|
9833
|
-
const updated = {
|
|
9834
|
-
...this.runtimeState.deviceActivation[deviceId] ?? {},
|
|
9835
|
-
[key]: active
|
|
9836
|
-
};
|
|
9837
|
-
this.runtimeState = {
|
|
9838
|
-
...this.runtimeState,
|
|
9839
|
-
deviceActivation: {
|
|
9840
|
-
...this.runtimeState.deviceActivation,
|
|
9841
|
-
[deviceId]: updated
|
|
9842
|
-
}
|
|
9843
|
-
};
|
|
9844
|
-
this.saveRuntimeState();
|
|
9845
|
-
}
|
|
9846
|
-
/**
|
|
9847
|
-
* Clear all activation overrides for a device (resets to autoActivate defaults).
|
|
9848
|
-
*/
|
|
9849
|
-
clearDeviceActivation(deviceId) {
|
|
9850
|
-
const { [deviceId]: _removed, ...rest } = this.runtimeState.deviceActivation;
|
|
9851
|
-
this.runtimeState = {
|
|
9852
|
-
...this.runtimeState,
|
|
9853
|
-
deviceActivation: rest
|
|
9854
|
-
};
|
|
9855
|
-
this.saveRuntimeState();
|
|
9856
|
-
}
|
|
9857
9709
|
getBootstrap(configPath) {
|
|
9858
9710
|
return this.getFromBootstrap(configPath);
|
|
9859
9711
|
}
|
|
@@ -10023,39 +9875,6 @@ var ConfigManager = class ConfigManager {
|
|
|
10023
9875
|
}
|
|
10024
9876
|
return found ? result : null;
|
|
10025
9877
|
}
|
|
10026
|
-
loadRuntimeState() {
|
|
10027
|
-
if (!node_fs.existsSync(this.runtimeStatePath)) return EMPTY_RUNTIME_STATE;
|
|
10028
|
-
try {
|
|
10029
|
-
const parsed = (0, _camstack_types_addon.asJsonObject)((0, _camstack_types_addon.parseJsonUnknown)(node_fs.readFileSync(this.runtimeStatePath, "utf-8")));
|
|
10030
|
-
if (parsed === null) return EMPTY_RUNTIME_STATE;
|
|
10031
|
-
const systemActivation = (0, _camstack_types_addon.asJsonObject)(parsed.systemActivation) ?? {};
|
|
10032
|
-
const deviceActivationRaw = (0, _camstack_types_addon.asJsonObject)(parsed.deviceActivation) ?? {};
|
|
10033
|
-
const deviceActivation = {};
|
|
10034
|
-
for (const [deviceId, entry] of Object.entries(deviceActivationRaw)) {
|
|
10035
|
-
const nested = (0, _camstack_types_addon.asJsonObject)(entry);
|
|
10036
|
-
if (nested === null) continue;
|
|
10037
|
-
const bools = {};
|
|
10038
|
-
for (const [k, v] of Object.entries(nested)) if (typeof v === "boolean") bools[k] = v;
|
|
10039
|
-
deviceActivation[deviceId] = bools;
|
|
10040
|
-
}
|
|
10041
|
-
const systemBools = {};
|
|
10042
|
-
for (const [k, v] of Object.entries(systemActivation)) if (typeof v === "boolean") systemBools[k] = v;
|
|
10043
|
-
return {
|
|
10044
|
-
systemActivation: systemBools,
|
|
10045
|
-
deviceActivation
|
|
10046
|
-
};
|
|
10047
|
-
} catch {
|
|
10048
|
-
console.warn(`[ConfigManager] Failed to parse runtime state at ${this.runtimeStatePath}, using defaults`);
|
|
10049
|
-
return EMPTY_RUNTIME_STATE;
|
|
10050
|
-
}
|
|
10051
|
-
}
|
|
10052
|
-
saveRuntimeState() {
|
|
10053
|
-
const dir = node_path.dirname(this.runtimeStatePath);
|
|
10054
|
-
if (!node_fs.existsSync(dir)) node_fs.mkdirSync(dir, { recursive: true });
|
|
10055
|
-
const tmpPath = `${this.runtimeStatePath}.tmp`;
|
|
10056
|
-
node_fs.writeFileSync(tmpPath, JSON.stringify(this.runtimeState, null, 2), "utf-8");
|
|
10057
|
-
node_fs.renameSync(tmpPath, this.runtimeStatePath);
|
|
10058
|
-
}
|
|
10059
9878
|
};
|
|
10060
9879
|
//#endregion
|
|
10061
9880
|
//#region ../../node_modules/moleculer/src/constants.js
|
|
@@ -95488,8 +95307,8 @@ exports.HEAP_RECLAIM_TRIGGER_MB = require_manifest_system_deps.HEAP_RECLAIM_TRIG
|
|
|
95488
95307
|
exports.HEAP_SPACE_REPORT_MIN_MB = require_manifest_system_deps.HEAP_SPACE_REPORT_MIN_MB;
|
|
95489
95308
|
exports.HEAP_WATCH_INTERVAL_MS = require_manifest_system_deps.HEAP_WATCH_INTERVAL_MS;
|
|
95490
95309
|
exports.HEAP_WATCH_WARN_RATIO = require_manifest_system_deps.HEAP_WATCH_WARN_RATIO;
|
|
95491
|
-
exports.HUB_CAP_FWD_ACTION =
|
|
95492
|
-
exports.HUB_CAP_FWD_SERVICE =
|
|
95310
|
+
exports.HUB_CAP_FWD_ACTION = require_hub_cap_forward.HUB_CAP_FWD_ACTION;
|
|
95311
|
+
exports.HUB_CAP_FWD_SERVICE = require_hub_cap_forward.HUB_CAP_FWD_SERVICE;
|
|
95493
95312
|
exports.HUB_MAIN_HEAP_WATCH_LABEL = require_manifest_system_deps.HUB_MAIN_HEAP_WATCH_LABEL;
|
|
95494
95313
|
exports.HUB_MAIN_RSS_BUDGET_MB = require_manifest_system_deps.HUB_MAIN_RSS_BUDGET_MB;
|
|
95495
95314
|
exports.HUB_RSS_BUDGET_ENV = require_manifest_system_deps.HUB_RSS_BUDGET_ENV;
|
|
@@ -95620,7 +95439,7 @@ exports.createDoorSettingsView = createDoorSettingsView;
|
|
|
95620
95439
|
exports.createEventPlaneMeter = require_manifest_system_deps.createEventPlaneMeter;
|
|
95621
95440
|
exports.createEventPlaneReader = require_manifest_system_deps.createEventPlaneReader;
|
|
95622
95441
|
exports.createFileDataPlaneHandler = require_file_data_plane.createFileDataPlaneHandler;
|
|
95623
|
-
exports.createHubCapForwardService =
|
|
95442
|
+
exports.createHubCapForwardService = require_hub_cap_forward.createHubCapForwardService;
|
|
95624
95443
|
exports.createHubService = createHubService;
|
|
95625
95444
|
exports.createKernelHwAccel = require_manifest_system_deps.createKernelHwAccel;
|
|
95626
95445
|
exports.createLocalTransport = require_manifest_system_deps.createLocalTransport;
|