mqtt 5.9.0 → 5.9.1
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/build/lib/BufferedDuplex.js +3 -1
- package/build/lib/BufferedDuplex.js.map +1 -1
- package/build/lib/client.d.ts +1 -1
- package/build/lib/client.js.map +1 -1
- package/build/lib/connect/ws.js +3 -1
- package/build/lib/connect/ws.js.map +1 -1
- package/build/lib/handlers/ack.js +3 -4
- package/build/lib/handlers/ack.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +5 -5
- package/dist/mqtt.js +10 -7
- package/dist/mqtt.min.js +5 -5
- package/package.json +1 -1
- package/src/lib/BufferedDuplex.ts +3 -1
- package/src/lib/client.ts +4 -1
- package/src/lib/connect/ws.ts +3 -1
- package/src/lib/handlers/ack.ts +9 -5
package/dist/mqtt.js
CHANGED
|
@@ -12625,7 +12625,7 @@ var mqtt = (() => {
|
|
|
12625
12625
|
// package-json:../../package.json
|
|
12626
12626
|
var require_package = __commonJS({
|
|
12627
12627
|
"package-json:../../package.json"(exports5, module) {
|
|
12628
|
-
module.exports = { version: "5.9.
|
|
12628
|
+
module.exports = { version: "5.9.1" };
|
|
12629
12629
|
}
|
|
12630
12630
|
});
|
|
12631
12631
|
|
|
@@ -12684,6 +12684,7 @@ var mqtt = (() => {
|
|
|
12684
12684
|
init_process2();
|
|
12685
12685
|
Object.defineProperty(exports5, "__esModule", { value: true });
|
|
12686
12686
|
exports5.ReasonCodes = void 0;
|
|
12687
|
+
var shared_1 = require_shared();
|
|
12687
12688
|
exports5.ReasonCodes = {
|
|
12688
12689
|
0: "",
|
|
12689
12690
|
1: "Unacceptable protocol version",
|
|
@@ -12745,8 +12746,7 @@ var mqtt = (() => {
|
|
|
12745
12746
|
case "puback": {
|
|
12746
12747
|
const pubackRC = packet.reasonCode;
|
|
12747
12748
|
if (pubackRC && pubackRC > 0 && pubackRC !== 16) {
|
|
12748
|
-
err = new
|
|
12749
|
-
err.code = pubackRC;
|
|
12749
|
+
err = new shared_1.ErrorWithReasonCode(`Publish error: ${exports5.ReasonCodes[pubackRC]}`, pubackRC);
|
|
12750
12750
|
client["_removeOutgoingAndStoreMessage"](messageId, () => {
|
|
12751
12751
|
cb(err, packet);
|
|
12752
12752
|
});
|
|
@@ -12763,8 +12763,7 @@ var mqtt = (() => {
|
|
|
12763
12763
|
};
|
|
12764
12764
|
const pubrecRC = packet.reasonCode;
|
|
12765
12765
|
if (pubrecRC && pubrecRC > 0 && pubrecRC !== 16) {
|
|
12766
|
-
err = new
|
|
12767
|
-
err.code = pubrecRC;
|
|
12766
|
+
err = new shared_1.ErrorWithReasonCode(`Publish error: ${exports5.ReasonCodes[pubrecRC]}`, pubrecRC);
|
|
12768
12767
|
client["_removeOutgoingAndStoreMessage"](messageId, () => {
|
|
12769
12768
|
cb(err, packet);
|
|
12770
12769
|
});
|
|
@@ -20732,7 +20731,9 @@ var mqtt = (() => {
|
|
|
20732
20731
|
}
|
|
20733
20732
|
this.isSocketOpen = false;
|
|
20734
20733
|
this.proxy.on("data", (chunk) => {
|
|
20735
|
-
this.
|
|
20734
|
+
if (!this.destroyed) {
|
|
20735
|
+
this.push(chunk);
|
|
20736
|
+
}
|
|
20736
20737
|
});
|
|
20737
20738
|
}
|
|
20738
20739
|
_read(size) {
|
|
@@ -20961,7 +20962,9 @@ var mqtt = (() => {
|
|
|
20961
20962
|
data = buffer_1.Buffer.from(data);
|
|
20962
20963
|
else
|
|
20963
20964
|
data = buffer_1.Buffer.from(data, "utf8");
|
|
20964
|
-
proxy.
|
|
20965
|
+
if (proxy && !proxy.destroyed) {
|
|
20966
|
+
proxy.push(data);
|
|
20967
|
+
}
|
|
20965
20968
|
}
|
|
20966
20969
|
function socketWriteBrowser(chunk, enc, next) {
|
|
20967
20970
|
if (socket.bufferedAmount > bufferSize) {
|