@stonecrop/beam 0.13.4 → 0.13.5
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/dist/beam.d.ts +1 -1
- package/dist/beam.js +9 -8
- package/dist/beam.js.map +1 -1
- package/dist/src/composables/mqtt.d.ts +1 -1
- package/dist/src/composables/mqtt.d.ts.map +1 -1
- package/dist/src/composables/mqtt.js +2 -2
- package/package.json +7 -10
- package/src/components/ScanInput.vue +0 -3
- package/src/composables/mqtt.ts +3 -2
package/dist/beam.d.ts
CHANGED
package/dist/beam.js
CHANGED
|
@@ -11469,22 +11469,23 @@ var El, kh = Qe(() => {
|
|
|
11469
11469
|
});
|
|
11470
11470
|
const Ph = Oh();
|
|
11471
11471
|
const Mh = async (l) => {
|
|
11472
|
+
const u = Tt({});
|
|
11472
11473
|
if (l.host && l.port && !await Ch(l.host, l.port))
|
|
11473
|
-
return;
|
|
11474
|
-
const
|
|
11474
|
+
return { messages: u };
|
|
11475
|
+
const s = Tt();
|
|
11475
11476
|
return uo(() => {
|
|
11476
|
-
|
|
11477
|
+
s.value = Ph.connect(l), l.topics || (l.topics = ["#"]);
|
|
11477
11478
|
for (const o of l.topics)
|
|
11478
|
-
|
|
11479
|
+
s.value.subscribe(o, (a) => {
|
|
11479
11480
|
if (a)
|
|
11480
11481
|
throw a;
|
|
11481
11482
|
});
|
|
11482
|
-
|
|
11483
|
-
|
|
11483
|
+
s.value.on("message", (o, a) => {
|
|
11484
|
+
u.value[o] || (u.value[o] = []), u.value[o].push(a.toString());
|
|
11484
11485
|
});
|
|
11485
11486
|
}), co(() => {
|
|
11486
|
-
|
|
11487
|
-
}), { messages:
|
|
11487
|
+
s.value?.end();
|
|
11488
|
+
}), { messages: u };
|
|
11488
11489
|
}, Ch = async (l, u) => {
|
|
11489
11490
|
try {
|
|
11490
11491
|
const s = new AbortController(), o = setTimeout(() => s.abort(), 2e3);
|