@kosdev-code/kos-ui-sdk 3.0.35 → 3.0.36

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.
@@ -10204,13 +10204,11 @@ class KosSubscriptionManager {
10204
10204
  };
10205
10205
  }
10206
10206
  resolvePropKey(template) {
10207
- const propRegex = /.*({PROP_(.+)})/;
10208
- let topic = template.includes("{MODEL_ID}") ? template.replace("{MODEL_ID}", this.modelId) : template;
10209
- const match = topic.match(propRegex);
10210
- if (match && match[2] in this.modelData) {
10211
- topic = topic.replace(match[1], this.modelData[match[2]]);
10212
- }
10213
- return topic;
10207
+ const topic = template.includes("{MODEL_ID}") ? template.replace("{MODEL_ID}", this.modelId) : template;
10208
+ return topic.replace(
10209
+ /{PROP_([^}]+)}/g,
10210
+ (placeholder, propName) => propName in this.modelData ? this.modelData[propName] : placeholder
10211
+ );
10214
10212
  }
10215
10213
  // ===== FLOW CONTROL METHODS =====
10216
10214
  async subscribeWithFlowControl(config2, resolvedTopic, lifecycle) {
@@ -23652,6 +23650,7 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
23652
23650
  };
23653
23651
  const MODEL_TYPE$5 = "storage-device-container-model";
23654
23652
  const TOPIC_STORAGE_AVAILABILITY = "/kos/storage";
23653
+ const isInsertedStorage = (device) => !device.local;
23655
23654
  let StorageDeviceContainerModelImpl = class {
23656
23655
  id;
23657
23656
  logger;
@@ -23690,7 +23689,8 @@ let StorageDeviceContainerModelImpl = class {
23690
23689
  get volumes() {
23691
23690
  return this.data;
23692
23691
  }
23693
- handleStorageAvailability(devices) {
23692
+ handleStorageAvailability(payload) {
23693
+ const devices = payload.filter(isInsertedStorage);
23694
23694
  const toRemove = this._models.data.filter(
23695
23695
  (model) => !devices.find((device) => device.id === model.id)
23696
23696
  );
@@ -23718,7 +23718,7 @@ let StorageDeviceContainerModelImpl = class {
23718
23718
  async load() {
23719
23719
  this.logger.debug(`loading storage-device-container container ${this.id}`);
23720
23720
  const storageDevices = await getStorageDevices();
23721
- storageDevices.forEach((storageDevice) => {
23721
+ storageDevices.filter(isInsertedStorage).forEach((storageDevice) => {
23722
23722
  if (storageDevice.deviceType !== "disk") {
23723
23723
  const options = {
23724
23724
  ...storageDevice,
@@ -25409,4 +25409,4 @@ exports.waitForRequest = waitForRequest;
25409
25409
  exports.whenReady = whenReady;
25410
25410
  exports.withCancellation = withCancellation;
25411
25411
  exports.wrapWithFutureLifecycle = wrapWithFutureLifecycle;
25412
- //# sourceMappingURL=software-info-registration-C-fplY8u.cjs.map
25412
+ //# sourceMappingURL=software-info-registration-JdgonknE.cjs.map