@kosdev-code/kos-ui-sdk 3.0.34 → 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.
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/registration/registration-manager.d.ts.map +1 -1
- package/core/util/index.d.ts +2 -0
- package/core/util/index.d.ts.map +1 -1
- package/core/util/kos-local-topic.d.ts +73 -0
- package/core/util/kos-local-topic.d.ts.map +1 -0
- package/core/util/kos-topic-client.d.ts +79 -0
- package/core/util/kos-topic-client.d.ts.map +1 -0
- package/index.cjs +77 -7
- package/index.cjs.map +1 -1
- package/index.js +286 -216
- package/index.js.map +1 -1
- package/models/models/storage-device/storage-device-container-model.d.ts +4 -3
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/utils/index.d.ts +1 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/topics/kos/daily/topic.d.ts +74 -0
- package/models/utils/topics/kos/daily/topic.d.ts.map +1 -0
- package/models/utils/topics/kos/daily/topics.d.ts +1026 -0
- package/models/utils/topics-index.d.ts +8 -0
- package/models/utils/topics-index.d.ts.map +1 -0
- package/package.json +2 -2
- package/{software-info-registration-dW2ssLDY.js → software-info-registration-BhOmDkag.js} +316 -315
- package/software-info-registration-BhOmDkag.js.map +1 -0
- package/{software-info-registration-CZq-jfVp.cjs → software-info-registration-JdgonknE.cjs} +15 -14
- package/software-info-registration-JdgonknE.cjs.map +1 -0
- package/testing.cjs +1 -1
- package/testing.js +1 -1
- package/software-info-registration-CZq-jfVp.cjs.map +0 -1
- package/software-info-registration-dW2ssLDY.js.map +0 -1
|
@@ -2684,15 +2684,16 @@ const RegistrationManager = {
|
|
|
2684
2684
|
(model) => models.set(model.type, model.registration())
|
|
2685
2685
|
);
|
|
2686
2686
|
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2687
|
+
const liveModels = KosCore.getInstance().modelManager?.registry?.models;
|
|
2688
|
+
if (liveModels) {
|
|
2689
|
+
if (!liveModels[register.type]) {
|
|
2689
2690
|
log$15.info(
|
|
2690
2691
|
`Model with type ${register.type} doesn't exist. Adding new registration`
|
|
2691
2692
|
);
|
|
2692
|
-
|
|
2693
|
+
liveModels[register.type] = register.registration[register.type];
|
|
2693
2694
|
if (isKosModelRegistration(registration)) {
|
|
2694
2695
|
registration.relatedModels.forEach(
|
|
2695
|
-
(model) =>
|
|
2696
|
+
(model) => liveModels[model.type] = model.registration().registration[model.type]
|
|
2696
2697
|
);
|
|
2697
2698
|
}
|
|
2698
2699
|
}
|
|
@@ -10203,13 +10204,11 @@ class KosSubscriptionManager {
|
|
|
10203
10204
|
};
|
|
10204
10205
|
}
|
|
10205
10206
|
resolvePropKey(template) {
|
|
10206
|
-
const
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
}
|
|
10212
|
-
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
|
+
);
|
|
10213
10212
|
}
|
|
10214
10213
|
// ===== FLOW CONTROL METHODS =====
|
|
10215
10214
|
async subscribeWithFlowControl(config2, resolvedTopic, lifecycle) {
|
|
@@ -23651,6 +23650,7 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
|
23651
23650
|
};
|
|
23652
23651
|
const MODEL_TYPE$5 = "storage-device-container-model";
|
|
23653
23652
|
const TOPIC_STORAGE_AVAILABILITY = "/kos/storage";
|
|
23653
|
+
const isInsertedStorage = (device) => !device.local;
|
|
23654
23654
|
let StorageDeviceContainerModelImpl = class {
|
|
23655
23655
|
id;
|
|
23656
23656
|
logger;
|
|
@@ -23689,7 +23689,8 @@ let StorageDeviceContainerModelImpl = class {
|
|
|
23689
23689
|
get volumes() {
|
|
23690
23690
|
return this.data;
|
|
23691
23691
|
}
|
|
23692
|
-
handleStorageAvailability(
|
|
23692
|
+
handleStorageAvailability(payload) {
|
|
23693
|
+
const devices = payload.filter(isInsertedStorage);
|
|
23693
23694
|
const toRemove = this._models.data.filter(
|
|
23694
23695
|
(model) => !devices.find((device) => device.id === model.id)
|
|
23695
23696
|
);
|
|
@@ -23717,7 +23718,7 @@ let StorageDeviceContainerModelImpl = class {
|
|
|
23717
23718
|
async load() {
|
|
23718
23719
|
this.logger.debug(`loading storage-device-container container ${this.id}`);
|
|
23719
23720
|
const storageDevices = await getStorageDevices();
|
|
23720
|
-
storageDevices.forEach((storageDevice) => {
|
|
23721
|
+
storageDevices.filter(isInsertedStorage).forEach((storageDevice) => {
|
|
23721
23722
|
if (storageDevice.deviceType !== "disk") {
|
|
23722
23723
|
const options = {
|
|
23723
23724
|
...storageDevice,
|
|
@@ -25408,4 +25409,4 @@ exports.waitForRequest = waitForRequest;
|
|
|
25408
25409
|
exports.whenReady = whenReady;
|
|
25409
25410
|
exports.withCancellation = withCancellation;
|
|
25410
25411
|
exports.wrapWithFutureLifecycle = wrapWithFutureLifecycle;
|
|
25411
|
-
//# sourceMappingURL=software-info-registration-
|
|
25412
|
+
//# sourceMappingURL=software-info-registration-JdgonknE.cjs.map
|