@camstack/server 1.2.815 → 1.2.817
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 +13 -0
- package/dist/api/core/cap-providers.js +2 -43
- package/dist/api/trpc/generated-cap-routers.js +14 -17
- package/dist/core/addon/addon-registry.service.js +3 -3
- package/dist/core/addon/instance-lifecycle.js +79 -4
- package/package.json +18 -9
- package/system/dist/{agent-https-eMihTWJ4.mjs → agent-https-8yyIi2Mv.mjs} +1 -1
- package/system/dist/{agent-https-Dwbpz4K6.js → agent-https-CSHd24Sz.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 +8 -4
- package/system/dist/builtins/camera-grid/index.mjs +8 -4
- 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.d.ts +1 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +16 -8
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +16 -8
- 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 +64 -5
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +64 -5
- package/system/dist/builtins/device-manager/last-active-mode.d.ts +1 -0
- package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +9 -0
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- 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 +3 -3
- package/system/dist/builtins/loki-logging/index.mjs +3 -3
- 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 +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/location-store.d.ts +5 -14
- package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +0 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +35 -75
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +35 -75
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +9 -32
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- 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-uxR5sOQN.js → capture-engine-Cius-WCQ.js} +1 -1
- package/system/dist/{capture-engine-CYPDOIF6.mjs → capture-engine-D2eAoc9W.mjs} +1 -1
- package/system/dist/{composition-sources-DkvntZci.js → composition-sources-AJ8V5KOI.js} +1 -1
- package/system/dist/{composition-sources-CU3p3INI.mjs → composition-sources-CdcDO-Ut.mjs} +1 -1
- package/system/dist/{constants-BP-Txn_J.js → constants-BVIwtt_O.js} +1 -1
- package/system/dist/{constants-DMFJ6Fky.mjs → constants-GPP-Z7D3.mjs} +1 -1
- package/system/dist/{device-ca-D-0zxmFi.js → device-ca-BFJn5TzU.js} +1 -1
- package/system/dist/{device-ca-tmcd_VBC.mjs → device-ca-WLUZEMzG.mjs} +1 -1
- package/system/dist/{dist-DmCVWvtK.mjs → dist-QnMV8AH-.mjs} +2455 -207
- package/system/dist/{dist-CznnwtQ8.js → dist-X-i__4Xc.js} +2454 -212
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-FTf16-JR.js → hub-mdns-ciao-DxC8z6eX.js} +2 -2
- package/system/dist/{hub-mdns-ciao-DbwyiHD5.mjs → hub-mdns-ciao-awDw9o6E.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-CASQgifG.mjs → legacy-integration-rows-door-COW5hMUZ.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-gW0xpMJI.js → legacy-integration-rows-door-Cbb1WKDb.js} +1 -1
- package/system/dist/migrations/hub/2026-11-08-storage-locations-write-set.d.ts +3 -0
- package/system/dist/{restore-archive-DlaC_gyl.mjs → restore-archive-Dp13UUld.mjs} +1 -1
- package/system/dist/{restore-archive-B9TEFWRE.js → restore-archive-q01U_u2A.js} +1 -1
- package/system/dist/{wal-maintenance-Da2Rozz6.js → wal-maintenance-F8p6X7gc.js} +0 -0
- package/system/dist/{wal-maintenance-Cn164tp0.mjs → wal-maintenance-PzTcTuqZ.mjs} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.817] - 2026-11-08
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- A fixed built-in integration (alarm panel, Blocks, Notification Center) now reports and switches on the registry flag in the instance list, not on a record that carries none
|
|
15
|
+
- One door to create an instance: integrationInstances.createInstance (a seed is accepted only from the addon it seeds); integrations.create removed
|
|
16
|
+
|
|
17
|
+
## [1.2.816] - 2026-11-08
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Rebuilt against updated dependencies.
|
|
22
|
+
|
|
10
23
|
## [1.2.815] - 2026-11-08
|
|
11
24
|
|
|
12
25
|
### Changed
|
|
@@ -837,7 +837,7 @@ function getInstancesProvider(ar, addonId) {
|
|
|
837
837
|
*/
|
|
838
838
|
async function projectSwitches(ar, logger, integrations) {
|
|
839
839
|
const byAddon = new Map();
|
|
840
|
-
for (const addonId of new Set(integrations.filter((i) => !isFixedBuiltin(i)).map((i) => i.addonId))) {
|
|
840
|
+
for (const addonId of new Set(integrations.filter((i) => !(0, instance_lifecycle_1.isFixedBuiltin)(i)).map((i) => i.addonId))) {
|
|
841
841
|
const provider = getInstancesProvider(ar, addonId);
|
|
842
842
|
if (provider === null)
|
|
843
843
|
continue;
|
|
@@ -853,16 +853,12 @@ async function projectSwitches(ar, logger, integrations) {
|
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
return integrations.map((i) => {
|
|
856
|
-
if (isFixedBuiltin(i))
|
|
856
|
+
if ((0, instance_lifecycle_1.isFixedBuiltin)(i))
|
|
857
857
|
return i;
|
|
858
858
|
const enabled = byAddon.get(i.addonId)?.get(i.id);
|
|
859
859
|
return enabled === undefined ? i : { ...i, enabled };
|
|
860
860
|
});
|
|
861
861
|
}
|
|
862
|
-
/** A builtin the hub itself declared (`DeclaredDevices` marks it `fixed`); its switch is the registry flag. */
|
|
863
|
-
function isFixedBuiltin(integration) {
|
|
864
|
-
return integration.info['fixed'] === true;
|
|
865
|
-
}
|
|
866
862
|
function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
867
863
|
const logger = loggingService.createLogger('integrations');
|
|
868
864
|
const lifecycleDeps = {
|
|
@@ -902,43 +898,6 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
|
|
|
902
898
|
const [projected] = await projectSwitches(ar, logger, [integration]);
|
|
903
899
|
return projected ?? integration;
|
|
904
900
|
},
|
|
905
|
-
create: async (input) => {
|
|
906
|
-
const { settings } = input;
|
|
907
|
-
const reg = requireIntegrationRegistry(ar);
|
|
908
|
-
logger.info('request', {
|
|
909
|
-
tags: { addonId: input.addonId },
|
|
910
|
-
meta: { phase: 'create', name: input.name },
|
|
911
|
-
});
|
|
912
|
-
// The hub half is shared with the registered `integration-instances` provider
|
|
913
|
-
// (`instance-lifecycle.ts`): unique check, the D1016 gate, the row, the record, rollback.
|
|
914
|
-
const instances = getInstancesProvider(ar, input.addonId);
|
|
915
|
-
const raw = instances === null ? null : (0, instance_lifecycle_1.rawInstancesProvider)(instances);
|
|
916
|
-
const addon = ar.listAddons().find((a) => a.manifest.id === input.addonId);
|
|
917
|
-
if (raw === null) {
|
|
918
|
-
const legacyMode = addon?.declaration?.instanceMode ?? addon?.manifest?.instanceMode ?? 'multiple';
|
|
919
|
-
if (legacyMode === 'unique') {
|
|
920
|
-
const existing = (await reg.listIntegrations()).filter((i) => i.addonId === input.addonId);
|
|
921
|
-
if (existing.length > 0) {
|
|
922
|
-
logger.warn('rejected duplicate unique', {
|
|
923
|
-
tags: { addonId: input.addonId, integrationId: existing[0].id },
|
|
924
|
-
meta: { phase: 'create' },
|
|
925
|
-
});
|
|
926
|
-
throw new server_1.TRPCError({
|
|
927
|
-
code: 'CONFLICT',
|
|
928
|
-
message: `Addon "${input.addonId}" is unique-instance and already has an integration (${existing[0].id})`,
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
return (0, instance_lifecycle_1.createRegisteredInstance)(lifecycleDeps, raw, {
|
|
934
|
-
addonId: input.addonId,
|
|
935
|
-
name: input.name,
|
|
936
|
-
...(input.info !== undefined ? { info: input.info } : {}),
|
|
937
|
-
...(input.originStableId !== undefined ? { originStableId: input.originStableId } : {}),
|
|
938
|
-
...(input.kind !== undefined ? { kind: input.kind } : {}),
|
|
939
|
-
...(settings !== undefined ? { settings } : {}),
|
|
940
|
-
});
|
|
941
|
-
},
|
|
942
901
|
update: async (input) => {
|
|
943
902
|
const reg = requireIntegrationRegistry(ar);
|
|
944
903
|
const previous = await reg.getIntegration(input.id);
|
|
@@ -5437,7 +5437,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5437
5437
|
.input(types_72.integrationInstancesCapability.methods.instanceFormSchema.input.loose())
|
|
5438
5438
|
.output(types_72.integrationInstancesCapability.methods.instanceFormSchema.output)
|
|
5439
5439
|
.query(async ({ input, ctx }) => {
|
|
5440
|
-
const
|
|
5440
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5441
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5441
5442
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5442
5443
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5443
5444
|
return p.instanceFormSchema(methodInput);
|
|
@@ -5453,7 +5454,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5453
5454
|
.input(types_72.integrationInstancesCapability.methods.getInstance.input.loose())
|
|
5454
5455
|
.output(types_72.integrationInstancesCapability.methods.getInstance.output)
|
|
5455
5456
|
.query(async ({ input, ctx }) => {
|
|
5456
|
-
const
|
|
5457
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5458
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5457
5459
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5458
5460
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5459
5461
|
return p.getInstance(methodInput);
|
|
@@ -5462,7 +5464,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5462
5464
|
.input(types_72.integrationInstancesCapability.methods.createInstance.input.loose())
|
|
5463
5465
|
.output(types_72.integrationInstancesCapability.methods.createInstance.output)
|
|
5464
5466
|
.mutation(async ({ input, ctx }) => {
|
|
5465
|
-
const
|
|
5467
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5468
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5466
5469
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5467
5470
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5468
5471
|
return p.createInstance(methodInput);
|
|
@@ -5471,7 +5474,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5471
5474
|
.input(types_72.integrationInstancesCapability.methods.updateInstance.input.loose())
|
|
5472
5475
|
.output(types_72.integrationInstancesCapability.methods.updateInstance.output)
|
|
5473
5476
|
.mutation(async ({ input, ctx }) => {
|
|
5474
|
-
const
|
|
5477
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5478
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5475
5479
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5476
5480
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5477
5481
|
return p.updateInstance(methodInput);
|
|
@@ -5480,7 +5484,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5480
5484
|
.input(types_72.integrationInstancesCapability.methods.setInstanceEnabled.input.loose())
|
|
5481
5485
|
.output(types_72.integrationInstancesCapability.methods.setInstanceEnabled.output)
|
|
5482
5486
|
.mutation(async ({ input, ctx }) => {
|
|
5483
|
-
const
|
|
5487
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5488
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5484
5489
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5485
5490
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5486
5491
|
return p.setInstanceEnabled(methodInput);
|
|
@@ -5489,7 +5494,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5489
5494
|
.input(types_72.integrationInstancesCapability.methods.deleteInstance.input.loose())
|
|
5490
5495
|
.output(types_72.integrationInstancesCapability.methods.deleteInstance.output)
|
|
5491
5496
|
.mutation(async ({ input, ctx }) => {
|
|
5492
|
-
const
|
|
5497
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5498
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5493
5499
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5494
5500
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5495
5501
|
return p.deleteInstance(methodInput);
|
|
@@ -5498,7 +5504,8 @@ function createCapRouter_integrationInstances(getProvider, createRemoteProxy) {
|
|
|
5498
5504
|
.input(types_72.integrationInstancesCapability.methods.testInstance.input.loose())
|
|
5499
5505
|
.output(types_72.integrationInstancesCapability.methods.testInstance.output)
|
|
5500
5506
|
.mutation(async ({ input, ctx }) => {
|
|
5501
|
-
const
|
|
5507
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5508
|
+
const { nodeId, addonId, ...methodInput } = parsedInput;
|
|
5502
5509
|
const p = resolveProvider('integration-instances', nodeId, () => getProvider(ctx, addonId), createRemoteProxy);
|
|
5503
5510
|
const fn = p.testInstance;
|
|
5504
5511
|
if (typeof fn !== 'function') {
|
|
@@ -5541,16 +5548,6 @@ function createCapRouter_integrations(getProvider, createRemoteProxy) {
|
|
|
5541
5548
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5542
5549
|
return p.getByAddonId(methodInput);
|
|
5543
5550
|
}),
|
|
5544
|
-
create: trpc_middleware_js_1.adminProcedure
|
|
5545
|
-
.input(types_73.integrationsCapability.methods.create.input.loose())
|
|
5546
|
-
.output(types_73.integrationsCapability.methods.create.output)
|
|
5547
|
-
.mutation(async ({ input, ctx }) => {
|
|
5548
|
-
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
5549
|
-
const { nodeId, ...methodInput } = parsedInput;
|
|
5550
|
-
const p = resolveProvider('integrations', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
5551
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5552
|
-
return p.create(methodInput);
|
|
5553
|
-
}),
|
|
5554
5551
|
update: trpc_middleware_js_1.adminProcedure
|
|
5555
5552
|
.input(types_73.integrationsCapability.methods.update.input.loose())
|
|
5556
5553
|
.output(types_73.integrationsCapability.methods.update.output)
|
|
@@ -1978,7 +1978,7 @@ class AddonRegistryService {
|
|
|
1978
1978
|
// caps (vacuum-control, valve, humidifier, …) register only when a
|
|
1979
1979
|
// device using them exists: waiting for a cap that was NOT registered
|
|
1980
1980
|
// before the restart burns the full 120s timeout for nothing (live:
|
|
1981
|
-
//
|
|
1981
|
+
// createInstance held its mutation — and the creation modal —
|
|
1982
1982
|
// for 2 minutes on the HA addon's 8 deviceless caps).
|
|
1983
1983
|
const preRegistered = new Set(entry.declaredCapabilities
|
|
1984
1984
|
.map((cap) => cap.name)
|
|
@@ -2001,7 +2001,7 @@ class AddonRegistryService {
|
|
|
2001
2001
|
return { success: false, error: 'runner process did not change' };
|
|
2002
2002
|
}
|
|
2003
2003
|
// The respawn resolves as soon as the child is up, not when its
|
|
2004
|
-
// capabilities are re-registered. Callers (
|
|
2004
|
+
// capabilities are re-registered. Callers (integrationInstances.createInstance, UI forms) may
|
|
2005
2005
|
// immediately try to route to the provider and hit a transient null. Block here
|
|
2006
2006
|
// until every declared capability is back on the registry so the restart is
|
|
2007
2007
|
// observable-consistent from the caller's perspective.
|
|
@@ -2034,7 +2034,7 @@ class AddonRegistryService {
|
|
|
2034
2034
|
// those are the ones a caller could have been routing to. Caps that
|
|
2035
2035
|
// were absent (device-scoped, no device yet) re-register
|
|
2036
2036
|
// asynchronously whenever their devices appear; waiting for them
|
|
2037
|
-
// here held
|
|
2037
|
+
// here held createInstance (and its modal) for the full
|
|
2038
2038
|
// timeout on every deviceless declared cap.
|
|
2039
2039
|
const gated = declared.filter((cap) => preRegistered.has(cap.name));
|
|
2040
2040
|
const skipped = declared.filter((cap) => !preRegistered.has(cap.name));
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.testBeforeCreate = testBeforeCreate;
|
|
4
4
|
exports.createRegisteredInstance = createRegisteredInstance;
|
|
5
5
|
exports.deleteRegisteredInstance = deleteRegisteredInstance;
|
|
6
|
+
exports.isFixedBuiltin = isFixedBuiltin;
|
|
6
7
|
exports.rawInstancesProvider = rawInstancesProvider;
|
|
7
8
|
exports.withInstanceLifecycle = withInstanceLifecycle;
|
|
8
9
|
exports.deferInstanceLifecycle = deferInstanceLifecycle;
|
|
@@ -17,9 +18,12 @@ exports.deferInstanceLifecycle = deferInstanceLifecycle;
|
|
|
17
18
|
* destroyed, remove the integration's devices through the device manager (its tombstone path,
|
|
18
19
|
* D865), then the record, the registry row and the `IntegrationDeleted` event.
|
|
19
20
|
*
|
|
20
|
-
* There is ONE
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* There is ONE create door: the registered `integration-instances` provider
|
|
22
|
+
* ({@link withInstanceLifecycle}), which calls {@link createRegisteredInstance}. A seed (an
|
|
23
|
+
* addon making its own fixed or migrated instance) goes through the same door and is accepted
|
|
24
|
+
* only from the addon it names. Delete has two callers of {@link deleteRegisteredInstance}: the
|
|
25
|
+
* provider's `deleteInstance` and `integrations.delete`, which stays for registry rows no addon
|
|
26
|
+
* provides any more (an orphan).
|
|
23
27
|
*/
|
|
24
28
|
const system_1 = require("@camstack/server/system");
|
|
25
29
|
const types_1 = require("@camstack/types");
|
|
@@ -352,6 +356,15 @@ async function bringsDevicesOf(deps, addonId, provider, kind) {
|
|
|
352
356
|
return (0, integration_role_1.bringsDevices)(own.role ?? described.role);
|
|
353
357
|
return (0, integration_role_1.bringsDevices)((0, integration_role_1.describedRoleOf)(described) ?? described.role);
|
|
354
358
|
}
|
|
359
|
+
/** A builtin the hub itself declared (`DeclaredDevices` marks it `fixed`); its switch is the registry flag. */
|
|
360
|
+
function isFixedBuiltin(integration) {
|
|
361
|
+
return integration.info['fixed'] === true;
|
|
362
|
+
}
|
|
363
|
+
/** Who the transport stamped as the caller of an `integration-instances` call; null when nobody. */
|
|
364
|
+
function callerAddonIdOf(input) {
|
|
365
|
+
const stamp = Reflect.get(input, 'callerAddonId');
|
|
366
|
+
return typeof stamp === 'string' && stamp.length > 0 ? stamp : null;
|
|
367
|
+
}
|
|
355
368
|
/** The wrapped providers and the raw ones they stand for. */
|
|
356
369
|
const RAW_PROVIDERS = new WeakMap();
|
|
357
370
|
/** The provider a lifecycle wrapper stands for; a provider that is not wrapped is returned as it is. */
|
|
@@ -362,11 +375,35 @@ function rawInstancesProvider(provider) {
|
|
|
362
375
|
* `provider` with a `createInstance` / `deleteInstance` that carry the hub half for an instance
|
|
363
376
|
* that brings devices. An instance of a kind that does not (a notifier, a broker account, a
|
|
364
377
|
* destination) is the addon's record alone and goes straight through, as does a call naming a
|
|
365
|
-
* registry row that already exists (the legacy `
|
|
378
|
+
* registry row that already exists (the legacy `integrationInstances.createInstance` made the row first).
|
|
366
379
|
*/
|
|
367
380
|
function withInstanceLifecycle(addonId, provider, deps) {
|
|
368
381
|
const bare = (0, types_1.bareAddonId)(addonId);
|
|
369
382
|
const createInstance = async (input) => {
|
|
383
|
+
if (input.seed !== undefined) {
|
|
384
|
+
// The seed variant states an integration the addon OWNS. The transport stamps who called
|
|
385
|
+
// (an HTTP session's claim is stripped), so an operator, or another addon, never gets here.
|
|
386
|
+
const stamp = callerAddonIdOf(input);
|
|
387
|
+
if (stamp === null || (0, types_1.bareAddonId)(stamp) !== bare) {
|
|
388
|
+
deps.logger.warn('refused: a seed is accepted only from the addon it seeds', {
|
|
389
|
+
tags: { addonId: bare },
|
|
390
|
+
meta: { phase: 'create', stampedBy: stamp },
|
|
391
|
+
});
|
|
392
|
+
throw new server_1.TRPCError({
|
|
393
|
+
code: 'FORBIDDEN',
|
|
394
|
+
message: `Only "${bare}" may seed its own integration`,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
const created = await createRegisteredInstance(deps, provider, {
|
|
398
|
+
addonId: bare,
|
|
399
|
+
name: input.name,
|
|
400
|
+
info: input.seed.info,
|
|
401
|
+
...(input.kind !== undefined ? { kind: input.kind } : {}),
|
|
402
|
+
...(input.originStableId !== undefined ? { originStableId: input.originStableId } : {}),
|
|
403
|
+
...(input.values !== undefined ? { settings: input.values } : {}),
|
|
404
|
+
});
|
|
405
|
+
return { id: created.id };
|
|
406
|
+
}
|
|
370
407
|
if (!(await bringsDevicesOf(deps, bare, provider, input.kind))) {
|
|
371
408
|
return provider.createInstance(input);
|
|
372
409
|
}
|
|
@@ -400,12 +437,39 @@ function withInstanceLifecycle(addonId, provider, deps) {
|
|
|
400
437
|
await deleteRegisteredInstance(deps, provider, integration);
|
|
401
438
|
return { ok: true };
|
|
402
439
|
};
|
|
440
|
+
// A FIXED builtin keeps a name-only record with no flag, which a body reads as "on": its switch
|
|
441
|
+
// is the registry flag, the one store, so the listing reads it and the switch writes it.
|
|
442
|
+
const fixedRow = async (id) => {
|
|
443
|
+
const row = await deps.integrations().getIntegration(id);
|
|
444
|
+
return row !== null && row.addonId === bare && isFixedBuiltin(row) ? row : null;
|
|
445
|
+
};
|
|
446
|
+
const withRegistryFlag = async (instance) => {
|
|
447
|
+
const row = await fixedRow(instance.id);
|
|
448
|
+
return row === null ? instance : { ...instance, enabled: row.enabled };
|
|
449
|
+
};
|
|
450
|
+
const listInstances = async () => Promise.all((await provider.listInstances()).map(withRegistryFlag));
|
|
451
|
+
const getInstance = async (input) => {
|
|
452
|
+
const instance = await provider.getInstance(input);
|
|
453
|
+
return instance === null ? null : withRegistryFlag(instance);
|
|
454
|
+
};
|
|
455
|
+
const setInstanceEnabled = async (input) => {
|
|
456
|
+
if ((await fixedRow(input.id)) === null)
|
|
457
|
+
return provider.setInstanceEnabled(input);
|
|
458
|
+
await deps.integrations().updateIntegration(input.id, { enabled: input.enabled });
|
|
459
|
+
return { ok: true };
|
|
460
|
+
};
|
|
403
461
|
const wrapped = new Proxy(provider, {
|
|
404
462
|
get(target, prop) {
|
|
405
463
|
if (prop === 'createInstance')
|
|
406
464
|
return createInstance;
|
|
407
465
|
if (prop === 'deleteInstance')
|
|
408
466
|
return deleteInstance;
|
|
467
|
+
if (prop === 'listInstances')
|
|
468
|
+
return listInstances;
|
|
469
|
+
if (prop === 'getInstance')
|
|
470
|
+
return getInstance;
|
|
471
|
+
if (prop === 'setInstanceEnabled')
|
|
472
|
+
return setInstanceEnabled;
|
|
409
473
|
const value = Reflect.get(target, prop);
|
|
410
474
|
return typeof value === 'function' ? value.bind(target) : value;
|
|
411
475
|
},
|
|
@@ -438,12 +502,23 @@ function deferInstanceLifecycle(resolve, logger) {
|
|
|
438
502
|
};
|
|
439
503
|
const createInstance = async (input) => wrapNow('create').createInstance(input);
|
|
440
504
|
const deleteInstance = async (input) => wrapNow('delete').deleteInstance(input);
|
|
505
|
+
// Reads and the switch never refuse: before the hub half exists the holder's own answer stands.
|
|
506
|
+
const readNow = () => resolve()?.(addonId, provider) ?? provider;
|
|
507
|
+
const listInstances = async () => readNow().listInstances();
|
|
508
|
+
const getInstance = async (input) => readNow().getInstance(input);
|
|
509
|
+
const setInstanceEnabled = async (input) => readNow().setInstanceEnabled(input);
|
|
441
510
|
const deferred = new Proxy(provider, {
|
|
442
511
|
get(target, prop) {
|
|
443
512
|
if (prop === 'createInstance')
|
|
444
513
|
return createInstance;
|
|
445
514
|
if (prop === 'deleteInstance')
|
|
446
515
|
return deleteInstance;
|
|
516
|
+
if (prop === 'listInstances')
|
|
517
|
+
return listInstances;
|
|
518
|
+
if (prop === 'getInstance')
|
|
519
|
+
return getInstance;
|
|
520
|
+
if (prop === 'setInstanceEnabled')
|
|
521
|
+
return setInstanceEnabled;
|
|
447
522
|
const value = Reflect.get(target, prop);
|
|
448
523
|
return typeof value === 'function' ? value.bind(target) : value;
|
|
449
524
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.817",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,8 +66,17 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.624",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.350",
|
|
71
|
+
"@camstack/addon-ai": ">=0.4.182",
|
|
72
|
+
"@camstack/addon-mqtt-broker": ">=1.2.157",
|
|
73
|
+
"@camstack/addon-notifiers": ">=1.2.634",
|
|
74
|
+
"@camstack/addon-post-analysis": ">=1.2.687",
|
|
75
|
+
"@camstack/addon-provider-ecowitt": ">=0.2.161",
|
|
76
|
+
"@camstack/addon-provider-petkit": ">=0.2.167",
|
|
77
|
+
"@camstack/addon-provider-reolink": ">=1.2.235",
|
|
78
|
+
"@camstack/addon-provider-vesync": ">=0.2.155",
|
|
79
|
+
"@camstack/addon-terminal": ">=0.1.163"
|
|
71
80
|
},
|
|
72
81
|
"wrapper": {
|
|
73
82
|
"desktop": ">=0.0.1",
|
|
@@ -76,19 +85,19 @@
|
|
|
76
85
|
}
|
|
77
86
|
},
|
|
78
87
|
"dependencies": {
|
|
79
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
80
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
88
|
+
"@camstack/addon-admin-ui": "1.2.624",
|
|
89
|
+
"@camstack/addon-agent-ui": "1.2.350",
|
|
81
90
|
"@camstack/addon-auth": "1.2.179",
|
|
82
91
|
"@camstack/addon-benchmark": "1.2.312",
|
|
83
92
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
84
|
-
"@camstack/addon-notifiers": "1.2.
|
|
93
|
+
"@camstack/addon-notifiers": "1.2.634",
|
|
85
94
|
"@camstack/addon-pipeline": "1.2.648",
|
|
86
95
|
"@camstack/addon-pipeline-orchestrator": "1.2.673",
|
|
87
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
96
|
+
"@camstack/addon-post-analysis": "1.2.687",
|
|
88
97
|
"@camstack/develop": "0.1.51",
|
|
89
98
|
"@camstack/sdk": "1.2.157",
|
|
90
|
-
"@camstack/types": "1.2.
|
|
91
|
-
"@camstack/ui-library": "1.2.
|
|
99
|
+
"@camstack/types": "1.2.531",
|
|
100
|
+
"@camstack/ui-library": "1.2.409",
|
|
92
101
|
"@fastify/compress": "^9.0.0",
|
|
93
102
|
"@fastify/cookie": "^11.0.2",
|
|
94
103
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $s as defineRecordKinds } from "./dist-QnMV8AH-.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-X-i__4Xc.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-X-i__4Xc.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jc as errMsg, Qo as BaseAddon, Xc as EventCategory, fn as addonPagesCapability } from "../../dist-QnMV8AH-.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -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-X-i__4Xc.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jc as errMsg, Qo as BaseAddon, Xc as EventCategory, mn as addonWidgetsCapability } from "../../dist-QnMV8AH-.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -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-X-i__4Xc.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $s as defineRecordKinds, Jc as errMsg, Js as createEvent, Kr as isAlertEpisodeOpen, Qo as BaseAddon, Xc as EventCategory, _n as alertsCapability, f as AlertSchema, gn as alertEpisodePayload, hn as alertEpisodeId, qr as isAlertEpisodeSeverity, w as CORE_BLOCK_ADDON_PREFIX } from "../../dist-QnMV8AH-.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { a as redactLogText } from "../../log-redactor-XLDrPzOi.mjs";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -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-X-i__4Xc.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
9
9
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jc as errMsg, Qo as BaseAddon, Sn as bareAddonId, Xc as EventCategory, fc as isEvent, rt as FIRST_LEVEL_MACRO_CLASSES, ta as ptzAutotrackCapability } from "../../dist-QnMV8AH-.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
4
4
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
@@ -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-X-i__4Xc.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-q01U_u2A.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
11
11
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ga as storageOccupancyCapability, Qo as BaseAddon, Xc as EventCategory, wc as nodePin, xn as backupCapability, yi as mayWriteToLocation, zc as toNodeId } from "../../dist-QnMV8AH-.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-Dp13UUld.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -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-X-i__4Xc.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 { $
|
|
1
|
+
import { $s as defineRecordKinds, E as CalendarPreferencesSchema, Qo as BaseAddon, jn as calendarsCapability } from "../../dist-QnMV8AH-.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-X-i__4Xc.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -3418,9 +3418,13 @@ var CameraGridAddon = class extends require_dist.BaseAddon {
|
|
|
3418
3418
|
return integration;
|
|
3419
3419
|
},
|
|
3420
3420
|
createIntegration: async (input) => {
|
|
3421
|
-
const
|
|
3422
|
-
|
|
3423
|
-
|
|
3421
|
+
const created = await this.ctx.api.integrationInstances.createInstance.mutate({
|
|
3422
|
+
addonId: input.addonId,
|
|
3423
|
+
name: input.name,
|
|
3424
|
+
seed: { info: input.info }
|
|
3425
|
+
});
|
|
3426
|
+
this.integrationId = created.id;
|
|
3427
|
+
return { id: created.id };
|
|
3424
3428
|
},
|
|
3425
3429
|
updateIntegration: async ({ id, info }) => {
|
|
3426
3430
|
await this.ctx.api.integrations.update.mutate({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Do as buildFfmpegArgs, Gc as DeviceFeature, J as DeclaredDevices, Jc as errMsg, Js as createEvent, Mn as cameraGridLayoutCapability, Oi as motionCapability, Qo as BaseAddon, Qs as defineEntryKind, Si as memoizePinnedFfmpeg, Sn as bareAddonId, Ss as RecordIntegrationInstances, Ur as integrationInstancesCapability, Xc as EventCategory, cc as hydrateSchema, h as BaseDevice, ir as declarationOwnerNodeId, pc as isInstanceEnabled, qa as streamCatalogCapability, qc as DeviceType, wt as MOTION_CLOSE_AFTER_MS, z as DERIVED_CAMERA_SILENCED_CAP_NAMES, za as snapshotCapability } from "../../dist-QnMV8AH-.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
@@ -3413,9 +3413,13 @@ var CameraGridAddon = class extends BaseAddon {
|
|
|
3413
3413
|
return integration;
|
|
3414
3414
|
},
|
|
3415
3415
|
createIntegration: async (input) => {
|
|
3416
|
-
const
|
|
3417
|
-
|
|
3418
|
-
|
|
3416
|
+
const created = await this.ctx.api.integrationInstances.createInstance.mutate({
|
|
3417
|
+
addonId: input.addonId,
|
|
3418
|
+
name: input.name,
|
|
3419
|
+
seed: { info: input.info }
|
|
3420
|
+
});
|
|
3421
|
+
this.integrationId = created.id;
|
|
3422
|
+
return { id: created.id };
|
|
3419
3423
|
},
|
|
3420
3424
|
updateIntegration: async ({ id, info }) => {
|
|
3421
3425
|
await this.ctx.api.integrations.update.mutate({
|
|
@@ -3,9 +3,9 @@ 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_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-X-i__4Xc.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-AJ8V5KOI.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-Cius-WCQ.js");
|
|
9
9
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/builtins/composer/actuator-invoke.ts
|