@camstack/system 1.1.9 → 1.1.10
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.
|
@@ -2910,6 +2910,12 @@ var DeviceManagerAddon = class DeviceManagerAddon extends _camstack_types.BaseAd
|
|
|
2910
2910
|
adoptionRelease: async ({ addonId, ...rest }) => {
|
|
2911
2911
|
return (await this.requireDeviceAdoptionProvider(addonId)).release(rest);
|
|
2912
2912
|
},
|
|
2913
|
+
adoptionResync: async ({ camDeviceId }) => {
|
|
2914
|
+
let owningAddonId = registry?.getAddonId(camDeviceId) ?? null;
|
|
2915
|
+
if (!owningAddonId) owningAddonId = (await resolvePersistedById(camDeviceId))?.addonId ?? null;
|
|
2916
|
+
if (!owningAddonId) throw new Error(`adoptionResync: device ${camDeviceId} not found`);
|
|
2917
|
+
return (await this.requireDeviceAdoptionProvider(owningAddonId)).resync({ camDeviceId });
|
|
2918
|
+
},
|
|
2913
2919
|
testField: async (input) => {
|
|
2914
2920
|
const { deviceId } = input;
|
|
2915
2921
|
let owningAddonId = null;
|
|
@@ -2905,6 +2905,12 @@ var DeviceManagerAddon = class DeviceManagerAddon extends BaseAddon {
|
|
|
2905
2905
|
adoptionRelease: async ({ addonId, ...rest }) => {
|
|
2906
2906
|
return (await this.requireDeviceAdoptionProvider(addonId)).release(rest);
|
|
2907
2907
|
},
|
|
2908
|
+
adoptionResync: async ({ camDeviceId }) => {
|
|
2909
|
+
let owningAddonId = registry?.getAddonId(camDeviceId) ?? null;
|
|
2910
|
+
if (!owningAddonId) owningAddonId = (await resolvePersistedById(camDeviceId))?.addonId ?? null;
|
|
2911
|
+
if (!owningAddonId) throw new Error(`adoptionResync: device ${camDeviceId} not found`);
|
|
2912
|
+
return (await this.requireDeviceAdoptionProvider(owningAddonId)).resync({ camDeviceId });
|
|
2913
|
+
},
|
|
2908
2914
|
testField: async (input) => {
|
|
2909
2915
|
const { deviceId } = input;
|
|
2910
2916
|
let owningAddonId = null;
|