@camstack/server 1.2.769 → 1.2.770
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/dist/api/core/cap-providers.js +4 -193
- package/dist/api/trpc/generated-cap-routers.js +40 -30
- package/dist/core/addon/integration-visibility.js +0 -5
- package/package.json +35 -15
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-C_rkCAus.mjs → agent-https-BGRPCKwT.mjs} +1 -1
- package/system/dist/{agent-https-Cw5Wc_ip.js → agent-https-mq6d71iq.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 +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 +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/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 +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- 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 +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- 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 +17 -10
- package/system/dist/builtins/keychain/index.mjs +17 -10
- 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/integration-record-kinds.d.ts +3 -10
- package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +1 -11
- package/system/dist/builtins/sqlite-storage/integration-rows-ports.d.ts +13 -15
- package/system/dist/builtins/sqlite-storage/migrations/legacy-integration-rows-door.d.ts +31 -0
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +39 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +48 -5
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +48 -5
- 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-DXSWU1PY.js → capture-engine--FQ8NUHh.js} +1 -1
- package/system/dist/{capture-engine-Kl46lSBi.mjs → capture-engine-Cmx7DIzV.mjs} +1 -1
- package/system/dist/{composition-sources-ClCP809M.mjs → composition-sources-Bd09D5f4.mjs} +1 -1
- package/system/dist/{composition-sources-Cq0IeRv9.js → composition-sources-cvZAN87H.js} +1 -1
- package/system/dist/{constants-CDxTuuXp.mjs → constants-Dce28BAx.mjs} +1 -1
- package/system/dist/{constants-CI5ySMIj.js → constants-gM9xHjyj.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
- package/system/dist/{device-ca-DPvU-3TE.js → device-ca-BmeH6Y9E.js} +1 -1
- package/system/dist/{device-ca-uRLJ8-jZ.mjs → device-ca-DcMuT-Yp.mjs} +1 -1
- package/system/dist/{dist-C_SNsYGY.mjs → dist-C3WXy3Ix.mjs} +78 -55
- package/system/dist/{dist-BDixk7cu.js → dist-Dtw1sIeQ.js} +78 -55
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-7uRbexmH.js → hub-mdns-ciao-C49eqyby.js} +2 -2
- package/system/dist/{hub-mdns-ciao-ea1EwFAF.mjs → hub-mdns-ciao-Dfue_0kR.mjs} +2 -2
- package/system/dist/index.d.ts +1 -1
- package/system/dist/index.js +42 -230
- package/system/dist/index.mjs +262 -450
- package/system/dist/legacy-integration-rows-door-B8_XCqUX.js +290 -0
- package/system/dist/legacy-integration-rows-door-DK42Bh2Q.mjs +255 -0
- package/system/dist/migrations/hub/2026-11-05-drop-integration-settings.d.ts +16 -0
- package/system/dist/{restore-archive-D0y_tFM2.mjs → restore-archive-C0YDO-qd.mjs} +94 -94
- package/system/dist/{restore-archive-CpTnlXUA.js → restore-archive-DuktQtye.js} +1 -1
- package/system/dist/{wal-maintenance-Dy4gxMdb.js → wal-maintenance-BEo-y-cQ.js} +0 -0
- package/system/dist/{wal-maintenance-BvxzVfje.mjs → wal-maintenance-DhuvKiGK.mjs} +0 -0
- package/system/package.json +1 -1
- package/dist/api/core/integration-secrets.js +0 -96
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.770] - 2026-11-05
|
|
11
|
+
|
|
12
|
+
### Removed
|
|
13
|
+
|
|
14
|
+
- The hub no longer keeps a second settings store: create writes the instance record, and settings with no instance provider are dropped
|
|
15
|
+
|
|
10
16
|
## [1.2.769] - 2026-11-05
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -72,7 +72,6 @@ exports.dispatchCustomAction = dispatchCustomAction;
|
|
|
72
72
|
exports.buildAddonsProvider = buildAddonsProvider;
|
|
73
73
|
const integration_role_js_1 = require("./integration-role.js");
|
|
74
74
|
const integration_instances_provider_js_1 = require("../../core/addon/integration-instances-provider.js");
|
|
75
|
-
const integration_secrets_1 = require("./integration-secrets");
|
|
76
75
|
const node_crypto_1 = require("node:crypto");
|
|
77
76
|
const os = __importStar(require("node:os"));
|
|
78
77
|
const system_1 = require("@camstack/server/system");
|
|
@@ -751,39 +750,6 @@ function buildNodesProvider(agentRegistry, moleculer, addonRegistry, getNodeRoot
|
|
|
751
750
|
},
|
|
752
751
|
};
|
|
753
752
|
}
|
|
754
|
-
/**
|
|
755
|
-
* The keychain handle a hub door uses for an integration's addon (D787), or
|
|
756
|
-
* `null` when this registry predates the keychain (a test double, an older
|
|
757
|
-
* kernel) — the door then stores the settings as it always did.
|
|
758
|
-
*/
|
|
759
|
-
function ownerSecrets(ar, owner) {
|
|
760
|
-
return typeof ar.secretsForOwner === 'function' ? ar.secretsForOwner(owner) : null;
|
|
761
|
-
}
|
|
762
|
-
/**
|
|
763
|
-
* The integration settings keys the addon's own form stores in the keychain
|
|
764
|
-
* (by schema type, D783) — so the admin read can withhold a plaintext under one
|
|
765
|
-
* of them. Empty when the schema cannot be read (logged): markers are still
|
|
766
|
-
* withheld, and a coerced marker is caught without a schema.
|
|
767
|
-
*/
|
|
768
|
-
async function integrationSecretKeys(ar, addonId, logger) {
|
|
769
|
-
try {
|
|
770
|
-
const provider = ar
|
|
771
|
-
.getCapabilityRegistry()
|
|
772
|
-
.getSingleton('addon-settings');
|
|
773
|
-
const schema = await provider?.getGlobalSettings({
|
|
774
|
-
addonId,
|
|
775
|
-
nodeId: 'hub',
|
|
776
|
-
});
|
|
777
|
-
return (0, types_1.collectKeychainStoredKeys)(schema ?? null);
|
|
778
|
-
}
|
|
779
|
-
catch (err) {
|
|
780
|
-
logger.warn('integration settings: addon schema unreadable — plaintext secrets not detectable', {
|
|
781
|
-
tags: { addonId },
|
|
782
|
-
meta: { phase: 'getSettings', error: (0, types_1.errMsg)(err) },
|
|
783
|
-
});
|
|
784
|
-
return new Set();
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
753
|
function requireIntegrationRegistry(ar) {
|
|
788
754
|
const reg = ar.getIntegrationRegistry();
|
|
789
755
|
if (!reg)
|
|
@@ -1027,9 +993,7 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
|
1027
993
|
},
|
|
1028
994
|
getByAddonId: async (input) => requireIntegrationRegistry(ar).getIntegrationByAddonId(input.addonId),
|
|
1029
995
|
create: async (input) => {
|
|
1030
|
-
const {
|
|
1031
|
-
// Settings are written AFTER the row exists: a secret's ref is scoped
|
|
1032
|
-
// to the integration id (D787).
|
|
996
|
+
const { settings, ...rest } = input;
|
|
1033
997
|
const payload = rest;
|
|
1034
998
|
const reg = requireIntegrationRegistry(ar);
|
|
1035
999
|
logger.info('request', {
|
|
@@ -1143,40 +1107,15 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
|
1143
1107
|
return integration;
|
|
1144
1108
|
}
|
|
1145
1109
|
if (settings !== undefined && Object.keys(settings).length > 0) {
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
onOrphaned: (refs) => logger.warn('dropped keychain refs could not be deleted', {
|
|
1150
|
-
meta: { refs: [...refs] },
|
|
1151
|
-
}),
|
|
1152
|
-
}, {
|
|
1153
|
-
integrationId: integration.id,
|
|
1154
|
-
settings,
|
|
1155
|
-
secretKeys: secretKeys ?? [],
|
|
1156
|
-
operatorWrite: true,
|
|
1110
|
+
logger.warn('settings dropped — the addon has no instance record to store them', {
|
|
1111
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
1112
|
+
meta: { phase: 'create', keys: Object.keys(settings) },
|
|
1157
1113
|
});
|
|
1158
1114
|
}
|
|
1159
1115
|
logger.info('persisted', {
|
|
1160
1116
|
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
1161
1117
|
meta: { phase: 'create' },
|
|
1162
1118
|
});
|
|
1163
|
-
const hasSettings = settings != null && Object.keys(settings).length > 0;
|
|
1164
|
-
if (!skipRestart && hasSettings) {
|
|
1165
|
-
logger.info('settings present — restarting addon', {
|
|
1166
|
-
tags: { addonId: input.addonId },
|
|
1167
|
-
meta: { phase: 'create' },
|
|
1168
|
-
});
|
|
1169
|
-
await ar.restartAddon(input.addonId);
|
|
1170
|
-
logger.info('addon restart complete', {
|
|
1171
|
-
tags: { addonId: input.addonId },
|
|
1172
|
-
meta: { phase: 'create' },
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
else {
|
|
1176
|
-
logger.info('skipping restart (no settings or skipRestart=true)', {
|
|
1177
|
-
meta: { phase: 'create' },
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
1119
|
return integration;
|
|
1181
1120
|
},
|
|
1182
1121
|
update: async (input) => {
|
|
@@ -1363,134 +1302,6 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
|
1363
1302
|
});
|
|
1364
1303
|
return { success: true, deletedId: input.id };
|
|
1365
1304
|
},
|
|
1366
|
-
getSettings: async (input) => {
|
|
1367
|
-
const reg = requireIntegrationRegistry(ar);
|
|
1368
|
-
const integration = await reg.getIntegration(input.id);
|
|
1369
|
-
if (!integration)
|
|
1370
|
-
throw new Error(`Integration "${input.id}" not found`);
|
|
1371
|
-
const instances = getInstancesProvider(ar, integration.addonId);
|
|
1372
|
-
if (instances !== null) {
|
|
1373
|
-
const instance = await instances.getInstance({ id: input.id });
|
|
1374
|
-
if (instance !== null && instance !== undefined)
|
|
1375
|
-
return instance.formValues;
|
|
1376
|
-
// No instance record carries this id: it is a legacy row the addon has not moved yet
|
|
1377
|
-
// (its migration reads it here), so answer the row, never an empty object (D1007).
|
|
1378
|
-
}
|
|
1379
|
-
// The integration's own addon (the caller the transport stamped) reads
|
|
1380
|
-
// its secrets resolved; anyone else — the admin form — reads "set"
|
|
1381
|
-
// views, never a value (D787, D789).
|
|
1382
|
-
const caller = Reflect.get(input, 'callerAddonId');
|
|
1383
|
-
const forOwner = typeof caller === 'string' &&
|
|
1384
|
-
(caller === integration.addonId || ar.runnerIdFor(integration.addonId) === caller);
|
|
1385
|
-
// The schema is asked only for the admin read: the owner reads this at
|
|
1386
|
-
// its own boot, and asking it for its schema then would call back into it.
|
|
1387
|
-
const secretKeys = forOwner
|
|
1388
|
-
? undefined
|
|
1389
|
-
: await integrationSecretKeys(ar, integration.addonId, logger);
|
|
1390
|
-
return (0, integration_secrets_1.readIntegrationSettings)({
|
|
1391
|
-
registry: reg,
|
|
1392
|
-
secrets: forOwner ? ownerSecrets(ar, integration.addonId) : null,
|
|
1393
|
-
}, {
|
|
1394
|
-
integrationId: input.id,
|
|
1395
|
-
forOwner,
|
|
1396
|
-
...(secretKeys !== undefined ? { secretKeys } : {}),
|
|
1397
|
-
onSuspectSecret: (suspect) => logger.error(suspect.kind === 'coerced-marker'
|
|
1398
|
-
? 'integration secret is "[object Object]" — a keychain marker was coerced to text; the addon is sending it as the credential; re-type it'
|
|
1399
|
-
: 'integration secret stored as PLAINTEXT under a keychain-declared key — withheld from the form; re-type it to move it into the keychain', {
|
|
1400
|
-
tags: { integrationId: input.id, addonId: integration.addonId },
|
|
1401
|
-
meta: {
|
|
1402
|
-
phase: 'getSettings',
|
|
1403
|
-
key: suspect.key,
|
|
1404
|
-
kind: suspect.kind,
|
|
1405
|
-
forOwner,
|
|
1406
|
-
},
|
|
1407
|
-
}),
|
|
1408
|
-
});
|
|
1409
|
-
},
|
|
1410
|
-
setSettings: async (input) => {
|
|
1411
|
-
const reg = requireIntegrationRegistry(ar);
|
|
1412
|
-
const integration = await reg.getIntegration(input.id);
|
|
1413
|
-
if (!integration) {
|
|
1414
|
-
logger.warn('not found', {
|
|
1415
|
-
tags: { integrationId: input.id },
|
|
1416
|
-
meta: { phase: 'setSettings' },
|
|
1417
|
-
});
|
|
1418
|
-
throw new Error(`Integration "${input.id}" not found`);
|
|
1419
|
-
}
|
|
1420
|
-
const settingsKeys = Object.keys(input.settings);
|
|
1421
|
-
logger.info('request', {
|
|
1422
|
-
tags: { integrationId: input.id, addonId: integration.addonId },
|
|
1423
|
-
meta: { phase: 'setSettings', keys: settingsKeys },
|
|
1424
|
-
});
|
|
1425
|
-
const instances = getInstancesProvider(ar, integration.addonId);
|
|
1426
|
-
if (instances !== null) {
|
|
1427
|
-
// The addon re-applies the change itself (its `onChanged`): no respawn.
|
|
1428
|
-
await instances.updateInstance({
|
|
1429
|
-
id: input.id,
|
|
1430
|
-
values: input.settings,
|
|
1431
|
-
});
|
|
1432
|
-
logger.info('persisted as an instance record (no restart)', {
|
|
1433
|
-
tags: { integrationId: input.id, addonId: integration.addonId },
|
|
1434
|
-
meta: { phase: 'setSettings' },
|
|
1435
|
-
});
|
|
1436
|
-
return { success: true };
|
|
1437
|
-
}
|
|
1438
|
-
await (0, integration_secrets_1.writeIntegrationSettings)({
|
|
1439
|
-
registry: reg,
|
|
1440
|
-
secrets: ownerSecrets(ar, integration.addonId),
|
|
1441
|
-
onOrphaned: (refs) => logger.warn('dropped keychain refs could not be deleted', {
|
|
1442
|
-
meta: { refs: [...refs] },
|
|
1443
|
-
}),
|
|
1444
|
-
}, {
|
|
1445
|
-
integrationId: input.id,
|
|
1446
|
-
settings: input.settings,
|
|
1447
|
-
secretKeys: input.secretKeys ?? [],
|
|
1448
|
-
// The integration's own addon writing back is not the operator.
|
|
1449
|
-
operatorWrite: typeof Reflect.get(input, 'callerAddonId') !== 'string',
|
|
1450
|
-
});
|
|
1451
|
-
// Only the integration's own addon may skip the respawn: it reconciles
|
|
1452
|
-
// the change in-process, so an unrelated caller cannot leave an addon
|
|
1453
|
-
// running on settings it never reloaded.
|
|
1454
|
-
const callerAddon = Reflect.get(input, 'callerAddonId');
|
|
1455
|
-
if (input.skipRestart === true &&
|
|
1456
|
-
typeof callerAddon === 'string' &&
|
|
1457
|
-
(callerAddon === integration.addonId || ar.runnerIdFor(integration.addonId) === callerAddon)) {
|
|
1458
|
-
logger.info('persisted — the owner applies it in-process, no restart', {
|
|
1459
|
-
tags: { addonId: integration.addonId },
|
|
1460
|
-
meta: { phase: 'setSettings' },
|
|
1461
|
-
});
|
|
1462
|
-
return { success: true };
|
|
1463
|
-
}
|
|
1464
|
-
logger.info('persisted — restarting addon', {
|
|
1465
|
-
tags: { addonId: integration.addonId },
|
|
1466
|
-
meta: { phase: 'setSettings' },
|
|
1467
|
-
});
|
|
1468
|
-
await ar.restartAddon(integration.addonId);
|
|
1469
|
-
logger.info('addon restart complete', {
|
|
1470
|
-
tags: { addonId: integration.addonId },
|
|
1471
|
-
meta: { phase: 'setSettings' },
|
|
1472
|
-
});
|
|
1473
|
-
return { success: true };
|
|
1474
|
-
},
|
|
1475
|
-
clearSettings: async (input) => {
|
|
1476
|
-
const reg = requireIntegrationRegistry(ar);
|
|
1477
|
-
const integration = await reg.getIntegration(input.id);
|
|
1478
|
-
if (!integration)
|
|
1479
|
-
throw new Error(`Integration "${input.id}" not found`);
|
|
1480
|
-
// Only the integration's own addon clears its rows, after it moved them (D1007).
|
|
1481
|
-
const caller = Reflect.get(input, 'callerAddonId');
|
|
1482
|
-
const isOwner = typeof caller === 'string' &&
|
|
1483
|
-
(caller === integration.addonId || ar.runnerIdFor(integration.addonId) === caller);
|
|
1484
|
-
if (!isOwner) {
|
|
1485
|
-
throw new Error(`Integration "${input.id}" settings can be cleared only by its own addon (${integration.addonId})`);
|
|
1486
|
-
}
|
|
1487
|
-
const cleared = await (0, system_1.clearIntegrationRows)({ registry: reg, secrets: ownerSecrets(ar, integration.addonId) }, input.id);
|
|
1488
|
-
logger.info('legacy settings cleared', {
|
|
1489
|
-
tags: { integrationId: input.id, addonId: integration.addonId },
|
|
1490
|
-
meta: { phase: 'clearSettings', ...cleared },
|
|
1491
|
-
});
|
|
1492
|
-
return cleared;
|
|
1493
|
-
},
|
|
1494
1305
|
getAvailableTypes: async () => {
|
|
1495
1306
|
const reg = requireIntegrationRegistry(ar);
|
|
1496
1307
|
const addons = ar.listAddons();
|
|
@@ -5576,36 +5576,6 @@ function createCapRouter_integrations(getProvider, createRemoteProxy) {
|
|
|
5576
5576
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5577
5577
|
return p.delete(methodInput);
|
|
5578
5578
|
}),
|
|
5579
|
-
getSettings: trpc_middleware_js_1.adminProcedure
|
|
5580
|
-
.input(types_72.integrationsCapability.methods.getSettings.input.loose())
|
|
5581
|
-
.output(types_72.integrationsCapability.methods.getSettings.output)
|
|
5582
|
-
.query(async ({ input, ctx }) => {
|
|
5583
|
-
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5584
|
-
const { nodeId, ...methodInput } = parsedInput;
|
|
5585
|
-
const p = resolveProvider('integrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
5586
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5587
|
-
return p.getSettings(methodInput);
|
|
5588
|
-
}),
|
|
5589
|
-
setSettings: trpc_middleware_js_1.adminProcedure
|
|
5590
|
-
.input(types_72.integrationsCapability.methods.setSettings.input.loose())
|
|
5591
|
-
.output(types_72.integrationsCapability.methods.setSettings.output)
|
|
5592
|
-
.mutation(async ({ input, ctx }) => {
|
|
5593
|
-
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5594
|
-
const { nodeId, ...methodInput } = parsedInput;
|
|
5595
|
-
const p = resolveProvider('integrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
5596
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5597
|
-
return p.setSettings(methodInput);
|
|
5598
|
-
}),
|
|
5599
|
-
clearSettings: trpc_middleware_js_1.adminProcedure
|
|
5600
|
-
.input(types_72.integrationsCapability.methods.clearSettings.input.loose())
|
|
5601
|
-
.output(types_72.integrationsCapability.methods.clearSettings.output)
|
|
5602
|
-
.mutation(async ({ input, ctx }) => {
|
|
5603
|
-
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5604
|
-
const { nodeId, ...methodInput } = parsedInput;
|
|
5605
|
-
const p = resolveProvider('integrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
5606
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5607
|
-
return p.clearSettings(methodInput);
|
|
5608
|
-
}),
|
|
5609
5579
|
getAvailableTypes: trpc_middleware_js_1.adminProcedure
|
|
5610
5580
|
.input(zod_1.z.object({ nodeId: zod_1.z.string().optional() }).optional())
|
|
5611
5581
|
.output(types_72.integrationsCapability.methods.getAvailableTypes.output)
|
|
@@ -6997,6 +6967,46 @@ function createCapRouter_migrations(getProvider, createRemoteProxy) {
|
|
|
6997
6967
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6998
6968
|
return p.finishMigration(methodInput);
|
|
6999
6969
|
}),
|
|
6970
|
+
readLegacyIntegrationRows: trpc_middleware_js_1.adminProcedure
|
|
6971
|
+
.input(types_89.migrationsCapability.methods.readLegacyIntegrationRows.input.loose())
|
|
6972
|
+
.output(types_89.migrationsCapability.methods.readLegacyIntegrationRows.output)
|
|
6973
|
+
.query(async ({ input, ctx }) => {
|
|
6974
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
6975
|
+
const { nodeId, ...methodInput } = parsedInput;
|
|
6976
|
+
const p = resolveProvider('migrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6977
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6978
|
+
return p.readLegacyIntegrationRows(methodInput);
|
|
6979
|
+
}),
|
|
6980
|
+
clearLegacyIntegrationRows: trpc_middleware_js_1.adminProcedure
|
|
6981
|
+
.input(types_89.migrationsCapability.methods.clearLegacyIntegrationRows.input.loose())
|
|
6982
|
+
.output(types_89.migrationsCapability.methods.clearLegacyIntegrationRows.output)
|
|
6983
|
+
.mutation(async ({ input, ctx }) => {
|
|
6984
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
6985
|
+
const { nodeId, ...methodInput } = parsedInput;
|
|
6986
|
+
const p = resolveProvider('migrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6987
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6988
|
+
return p.clearLegacyIntegrationRows(methodInput);
|
|
6989
|
+
}),
|
|
6990
|
+
patchLegacyIntegrationRows: trpc_middleware_js_1.adminProcedure
|
|
6991
|
+
.input(types_89.migrationsCapability.methods.patchLegacyIntegrationRows.input.loose())
|
|
6992
|
+
.output(types_89.migrationsCapability.methods.patchLegacyIntegrationRows.output)
|
|
6993
|
+
.mutation(async ({ input, ctx }) => {
|
|
6994
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
6995
|
+
const { nodeId, ...methodInput } = parsedInput;
|
|
6996
|
+
const p = resolveProvider('migrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6997
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6998
|
+
return p.patchLegacyIntegrationRows(methodInput);
|
|
6999
|
+
}),
|
|
7000
|
+
deleteLegacyIntegrationRowKeys: trpc_middleware_js_1.adminProcedure
|
|
7001
|
+
.input(types_89.migrationsCapability.methods.deleteLegacyIntegrationRowKeys.input.loose())
|
|
7002
|
+
.output(types_89.migrationsCapability.methods.deleteLegacyIntegrationRowKeys.output)
|
|
7003
|
+
.mutation(async ({ input, ctx }) => {
|
|
7004
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
7005
|
+
const { nodeId, ...methodInput } = parsedInput;
|
|
7006
|
+
const p = resolveProvider('migrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
7007
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
7008
|
+
return p.deleteLegacyIntegrationRowKeys(methodInput);
|
|
7009
|
+
}),
|
|
7000
7010
|
});
|
|
7001
7011
|
}
|
|
7002
7012
|
function createCapRouter_modelConvert(getProvider, createRemoteProxy) {
|
|
@@ -91,10 +91,5 @@ function createFilteredIntegrationRegistry(deps) {
|
|
|
91
91
|
},
|
|
92
92
|
updateIntegration: (id, updates) => raw.updateIntegration(id, updates),
|
|
93
93
|
deleteIntegration: (id) => raw.deleteIntegration(id),
|
|
94
|
-
// Integration settings: passthrough (already gated by getIntegration)
|
|
95
|
-
getIntegrationSettings: (id) => raw.getIntegrationSettings(id),
|
|
96
|
-
setIntegrationSetting: (id, key, value) => raw.setIntegrationSetting(id, key, value),
|
|
97
|
-
setIntegrationSettings: (id, settings) => raw.setIntegrationSettings(id, settings),
|
|
98
|
-
clearIntegrationSettings: (id) => raw.clearIntegrationSettings(id),
|
|
99
94
|
};
|
|
100
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.770",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,14 +66,34 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
71
|
-
"@camstack/addon-
|
|
72
|
-
"@camstack/addon-
|
|
73
|
-
"@camstack/addon-
|
|
74
|
-
"@camstack/addon-provider-
|
|
75
|
-
"@camstack/addon-provider-
|
|
76
|
-
"@camstack/addon-provider-
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.587",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.327",
|
|
71
|
+
"@camstack/addon-import-alexa": ">=0.2.186",
|
|
72
|
+
"@camstack/addon-matter-broker": ">=0.2.157",
|
|
73
|
+
"@camstack/addon-pipeline-orchestrator": ">=1.2.660",
|
|
74
|
+
"@camstack/addon-provider-amcrest": ">=0.2.166",
|
|
75
|
+
"@camstack/addon-provider-bosch": ">=0.1.37",
|
|
76
|
+
"@camstack/addon-provider-dreame": ">=0.2.165",
|
|
77
|
+
"@camstack/addon-provider-dreo": ">=0.2.155",
|
|
78
|
+
"@camstack/addon-provider-ecowitt": ">=0.2.156",
|
|
79
|
+
"@camstack/addon-provider-enpal": ">=0.1.9",
|
|
80
|
+
"@camstack/addon-provider-esphome": ">=0.1.12",
|
|
81
|
+
"@camstack/addon-provider-gree": ">=0.2.150",
|
|
82
|
+
"@camstack/addon-provider-hikvision": ">=1.2.182",
|
|
83
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.661",
|
|
84
|
+
"@camstack/addon-provider-homematic": ">=1.2.183",
|
|
85
|
+
"@camstack/addon-provider-mqtt-ha": ">=0.1.37",
|
|
86
|
+
"@camstack/addon-provider-onvif": ">=1.2.155",
|
|
87
|
+
"@camstack/addon-provider-petkit": ">=0.2.160",
|
|
88
|
+
"@camstack/addon-provider-rademacher": ">=0.2.159",
|
|
89
|
+
"@camstack/addon-provider-reolink": ">=1.2.225",
|
|
90
|
+
"@camstack/addon-provider-rtsp": ">=1.2.151",
|
|
91
|
+
"@camstack/addon-provider-tuya": ">=0.2.151",
|
|
92
|
+
"@camstack/addon-provider-unifi": ">=0.2.156",
|
|
93
|
+
"@camstack/addon-provider-unraid": ">=0.2.157",
|
|
94
|
+
"@camstack/addon-provider-velux": ">=0.2.159",
|
|
95
|
+
"@camstack/addon-provider-vesync": ">=0.2.151",
|
|
96
|
+
"@camstack/addon-provider-wyze": ">=0.2.163"
|
|
77
97
|
},
|
|
78
98
|
"wrapper": {
|
|
79
99
|
"desktop": ">=0.0.1",
|
|
@@ -82,19 +102,19 @@
|
|
|
82
102
|
}
|
|
83
103
|
},
|
|
84
104
|
"dependencies": {
|
|
85
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
86
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
105
|
+
"@camstack/addon-admin-ui": "1.2.587",
|
|
106
|
+
"@camstack/addon-agent-ui": "1.2.327",
|
|
87
107
|
"@camstack/addon-auth": "1.2.175",
|
|
88
108
|
"@camstack/addon-benchmark": "1.2.311",
|
|
89
109
|
"@camstack/addon-decoder-nodeav": "1.2.145",
|
|
90
110
|
"@camstack/addon-notifiers": "1.2.628",
|
|
91
111
|
"@camstack/addon-pipeline": "1.2.640",
|
|
92
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
112
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.660",
|
|
93
113
|
"@camstack/addon-post-analysis": "1.2.668",
|
|
94
|
-
"@camstack/develop": "0.1.
|
|
114
|
+
"@camstack/develop": "0.1.45",
|
|
95
115
|
"@camstack/sdk": "1.2.155",
|
|
96
|
-
"@camstack/types": "1.2.
|
|
97
|
-
"@camstack/ui-library": "1.2.
|
|
116
|
+
"@camstack/types": "1.2.501",
|
|
117
|
+
"@camstack/ui-library": "1.2.385",
|
|
98
118
|
"@fastify/compress": "^9.0.0",
|
|
99
119
|
"@fastify/cookie": "^11.0.2",
|
|
100
120
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
1
|
+
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-oHl1xltx.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ys as defineRecordKinds } from "./dist-
|
|
1
|
+
import { ys as defineRecordKinds } from "./dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-Dtw1sIeQ.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -3,7 +3,7 @@ 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-Dtw1sIeQ.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cn as addonPagesCapability, dc as EventCategory, uc as errMsg, wo as BaseAddon } from "../../dist-
|
|
1
|
+
import { cn as addonPagesCapability, dc as EventCategory, uc as errMsg, wo as BaseAddon } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import * as fs from "node:fs";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
6
|
//#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
|
|
7
7
|
/** Stable identity for an addon page, independent of which node reported it. */
|
|
8
8
|
function pageKey(info) {
|
|
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
|
211
211
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
212
212
|
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
213
213
|
try {
|
|
214
|
-
const stat = fs.statSync(bundlePath);
|
|
214
|
+
const stat = fs$1.statSync(bundlePath);
|
|
215
215
|
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
216
216
|
let v = this.bundleHashCache.get(cacheKey);
|
|
217
217
|
if (v === void 0) {
|
|
218
|
-
v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
218
|
+
v = createHash("sha1").update(fs$1.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
219
219
|
this.bundleHashCache.set(cacheKey, v);
|
|
220
220
|
}
|
|
221
221
|
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
@@ -3,7 +3,7 @@ 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-Dtw1sIeQ.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { dc as EventCategory, uc as errMsg, un as addonWidgetsCapability, wo as BaseAddon } from "../../dist-
|
|
1
|
+
import { dc as EventCategory, uc as errMsg, un as addonWidgetsCapability, wo as BaseAddon } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
|
-
import * as fs from "node:fs";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
6
|
//#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
|
|
7
7
|
/**
|
|
8
8
|
* Addon Widgets Aggregator — hub-local builtin that owns the singleton
|
|
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
204
204
|
if (entryPath === null) return String(Math.floor(Date.now()));
|
|
205
205
|
try {
|
|
206
206
|
const dir = path$1.dirname(entryPath);
|
|
207
|
-
const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
207
|
+
const files = fs$1.readdirSync(dir).filter((f) => fs$1.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
208
208
|
const cacheKey = `${dir}#${files.map((f) => {
|
|
209
|
-
const s = fs.statSync(path$1.join(dir, f));
|
|
209
|
+
const s = fs$1.statSync(path$1.join(dir, f));
|
|
210
210
|
return `${f}:${s.size}:${s.mtimeMs}`;
|
|
211
211
|
}).join("|")}`;
|
|
212
212
|
const cached = this.bundleHashCache.get(cacheKey);
|
|
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
214
214
|
const hash = createHash("sha1");
|
|
215
215
|
for (const f of files) {
|
|
216
216
|
hash.update(f);
|
|
217
|
-
hash.update(fs.readFileSync(path$1.join(dir, f)));
|
|
217
|
+
hash.update(fs$1.readFileSync(path$1.join(dir, f)));
|
|
218
218
|
}
|
|
219
219
|
const digest = hash.digest("hex").slice(0, 12);
|
|
220
220
|
this.bundleHashCache.set(cacheKey, digest);
|
|
@@ -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-Dtw1sIeQ.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr as isAlertEpisodeSeverity, Pr as isAlertEpisodeOpen, d as AlertSchema, dc as EventCategory, dn as alertEpisodeId, fn as alertEpisodePayload, ms as createEvent, pn as alertsCapability, uc as errMsg, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-
|
|
1
|
+
import { Fr as isAlertEpisodeSeverity, Pr as isAlertEpisodeOpen, d as AlertSchema, dc as EventCategory, dn as alertEpisodeId, fn as alertEpisodePayload, ms as createEvent, pn as alertsCapability, uc as errMsg, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
4
4
|
/**
|
|
@@ -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-Dtw1sIeQ.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { As as isEvent, Ri as ptzAutotrackCapability, dc as EventCategory, tt as FIRST_LEVEL_MACRO_CLASSES, uc as errMsg, vn as bareAddonId, wo as BaseAddon } from "../../dist-
|
|
1
|
+
import { As as isEvent, Ri as ptzAutotrackCapability, dc as EventCategory, tt as FIRST_LEVEL_MACRO_CLASSES, uc as errMsg, vn as bareAddonId, wo as BaseAddon } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,9 +3,9 @@ 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-Dtw1sIeQ.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_restore_archive = require("../../restore-archive-
|
|
8
|
+
const require_restore_archive = require("../../restore-archive-DuktQtye.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Sa as storageOccupancyCapability, Vs as nodePin, _n as backupCapability, dc as EventCategory, nc as toNodeId, si as mayWriteToLocation, wo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Sa as storageOccupancyCapability, Vs as nodePin, _n as backupCapability, dc as EventCategory, nc as toNodeId, si as mayWriteToLocation, wo as BaseAddon } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-
|
|
3
|
+
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-C0YDO-qd.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
|
-
import * as fs from "node:fs";
|
|
7
|
+
import * as fs$1 from "node:fs";
|
|
8
8
|
//#region src/builtins/backup-orchestrator/backup-databases.ts
|
|
9
9
|
/** Stable id of the seeded weekly schedule. */
|
|
10
10
|
var WEEKLY_SCHEDULE_ID = "weekly-events-history";
|
|
@@ -1018,7 +1018,7 @@ async function downloadArchiveToCache(input) {
|
|
|
1018
1018
|
location: input.locationId,
|
|
1019
1019
|
relativePath: input.filename
|
|
1020
1020
|
});
|
|
1021
|
-
const writeStream = fs.createWriteStream(input.cachePath);
|
|
1021
|
+
const writeStream = fs$1.createWriteStream(input.cachePath);
|
|
1022
1022
|
let offset = 0;
|
|
1023
1023
|
try {
|
|
1024
1024
|
while (offset < sizeBytes) {
|
|
@@ -2502,7 +2502,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2502
2502
|
});
|
|
2503
2503
|
try {
|
|
2504
2504
|
let offset = 0;
|
|
2505
|
-
const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2505
|
+
const stream = fs$1.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2506
2506
|
for await (const rawChunk of stream) {
|
|
2507
2507
|
if (input.signal?.aborted) {
|
|
2508
2508
|
stream.destroy();
|
|
@@ -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-Dtw1sIeQ.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { En as calendarsCapability, T as CalendarPreferencesSchema, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-
|
|
1
|
+
import { En as calendarsCapability, T as CalendarPreferencesSchema, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -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-Dtw1sIeQ.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|