mqtt 5.10.0 → 5.10.2
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/README.md +5 -4
- package/build/lib/connect/ws.js +3 -1
- package/build/lib/connect/ws.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +5 -5
- package/dist/mqtt.js +4 -2
- package/dist/mqtt.min.js +5 -5
- package/package.json +5 -2
- package/src/lib/connect/ws.ts +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mqtt",
|
|
3
3
|
"description": "A library for the MQTT protocol",
|
|
4
|
-
"version": "5.10.
|
|
4
|
+
"version": "5.10.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Adam Rudd <adamvrr@gmail.com>",
|
|
7
7
|
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
|
|
@@ -95,6 +95,9 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"provenance": true
|
|
100
|
+
},
|
|
98
101
|
"pre-commit": [
|
|
99
102
|
"lint"
|
|
100
103
|
],
|
|
@@ -116,7 +119,7 @@
|
|
|
116
119
|
"help-me": "^5.0.0",
|
|
117
120
|
"lru-cache": "^10.0.1",
|
|
118
121
|
"minimist": "^1.2.8",
|
|
119
|
-
"mqtt-packet": "^9.0.
|
|
122
|
+
"mqtt-packet": "^9.0.1",
|
|
120
123
|
"number-allocator": "^1.0.14",
|
|
121
124
|
"readable-stream": "^4.4.2",
|
|
122
125
|
"reinterval": "^1.1.0",
|
package/src/lib/connect/ws.ts
CHANGED
|
@@ -256,9 +256,11 @@ const browserStreamBuilder: StreamBuilder = (client, opts) => {
|
|
|
256
256
|
/**
|
|
257
257
|
* https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/message_event
|
|
258
258
|
*/
|
|
259
|
-
function onMessage(event: MessageEvent) {
|
|
259
|
+
async function onMessage(event: MessageEvent) {
|
|
260
260
|
let { data } = event
|
|
261
261
|
if (data instanceof ArrayBuffer) data = Buffer.from(data)
|
|
262
|
+
else if (data instanceof Blob)
|
|
263
|
+
data = Buffer.from(await new Response(data).arrayBuffer())
|
|
262
264
|
else data = Buffer.from(data as string, 'utf8')
|
|
263
265
|
if (proxy && !proxy.destroyed) {
|
|
264
266
|
proxy.push(data)
|