@stonecrop/beam 0.13.4 → 0.13.6
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
|
@@ -7,7 +7,7 @@ import { IMqttStream } from '../types';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const useMqttStream: (options: IMqttStream) => Promise<{
|
|
9
9
|
messages: import("vue").Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
11
|
/**
|
|
12
12
|
* Check if a local port has a service running
|
|
13
13
|
* @param host the host to check
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../../../src/composables/mqtt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAU,SAAS,WAAW;;
|
|
1
|
+
{"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../../../src/composables/mqtt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAU,SAAS,WAAW;;EAyCvD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAU,MAAM,MAAM,EAAE,MAAM,MAAM,qBAuC5D,CAAA"}
|
|
@@ -7,14 +7,14 @@ import { onMounted, onUnmounted, ref } from 'vue';
|
|
|
7
7
|
* @beta
|
|
8
8
|
*/
|
|
9
9
|
export const useMqttStream = async (options) => {
|
|
10
|
+
const messages = ref({});
|
|
10
11
|
if (options.host && options.port) {
|
|
11
12
|
const portActive = await isPortActive(options.host, options.port);
|
|
12
13
|
if (!portActive) {
|
|
13
|
-
return;
|
|
14
|
+
return { messages };
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
const client = ref();
|
|
17
|
-
const messages = ref({});
|
|
18
18
|
onMounted(() => {
|
|
19
19
|
client.value = mqtt.connect(options);
|
|
20
20
|
if (!options.topics) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/beam",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"vue": "^3.5.33"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@eslint/js": "^10.0.1",
|
|
46
45
|
"@microsoft/api-documenter": "^7.30.5",
|
|
47
46
|
"@rushstack/heft": "^1.2.17",
|
|
48
47
|
"@types/node": "^24.12.4",
|
|
@@ -50,17 +49,14 @@
|
|
|
50
49
|
"@vitest/coverage-istanbul": "^4.1.5",
|
|
51
50
|
"@vitest/ui": "^4.1.5",
|
|
52
51
|
"@vue/test-utils": "^2.4.10",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"eslint-plugin-vue": "^10.9.0",
|
|
56
|
-
"globals": "^17.6.0",
|
|
52
|
+
"oxlint": "1.67.0",
|
|
53
|
+
"oxlint-tsgolint": "0.23.0",
|
|
57
54
|
"sass": "^1.97.2",
|
|
58
55
|
"typescript": "^6.0.3",
|
|
59
|
-
"typescript-eslint": "^8.59.1",
|
|
60
|
-
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
61
56
|
"vite": "^7.3.2",
|
|
62
|
-
"
|
|
57
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
63
58
|
"vitest": "^4.1.5",
|
|
59
|
+
"vue": "^3.5.33",
|
|
64
60
|
"vue-router": "^5.0.6",
|
|
65
61
|
"stonecrop-rig": "0.7.0"
|
|
66
62
|
},
|
|
@@ -75,7 +71,8 @@
|
|
|
75
71
|
"build": "heft build && vite build && rushx docs",
|
|
76
72
|
"dev": "vite",
|
|
77
73
|
"docs": "bash ../common/scripts/run-docs.sh beam",
|
|
78
|
-
"lint": "
|
|
74
|
+
"lint": "oxlint",
|
|
75
|
+
"lint:fix": "oxlint --fix",
|
|
79
76
|
"preview": "vite preview",
|
|
80
77
|
"test": "vitest run --coverage.enabled false",
|
|
81
78
|
"test:watch": "vitest watch",
|
package/src/composables/mqtt.ts
CHANGED
|
@@ -10,15 +10,16 @@ import { IMqttStream } from '../types'
|
|
|
10
10
|
* @beta
|
|
11
11
|
*/
|
|
12
12
|
export const useMqttStream = async (options: IMqttStream) => {
|
|
13
|
+
const messages = ref<Record<string, string[]>>({})
|
|
14
|
+
|
|
13
15
|
if (options.host && options.port) {
|
|
14
16
|
const portActive = await isPortActive(options.host, options.port)
|
|
15
17
|
if (!portActive) {
|
|
16
|
-
return
|
|
18
|
+
return { messages }
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
const client = ref<MqttClient>()
|
|
21
|
-
const messages = ref<Record<string, string[]>>({})
|
|
22
23
|
|
|
23
24
|
onMounted(() => {
|
|
24
25
|
client.value = mqtt.connect(options)
|