mqtt 5.5.3 → 5.5.4
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/connect/index.js +3 -0
- package/build/lib/connect/index.js.map +1 -1
- package/build/lib/connect/tcp.js +2 -2
- package/build/lib/connect/tcp.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +3 -3
- package/dist/mqtt.js +10 -7
- package/dist/mqtt.min.js +3 -3
- package/package.json +1 -1
- package/src/lib/connect/index.ts +5 -0
- package/src/lib/connect/tcp.ts +2 -2
package/dist/mqtt.js
CHANGED
|
@@ -12634,7 +12634,7 @@ var mqtt = (() => {
|
|
|
12634
12634
|
// package-json:../../package.json
|
|
12635
12635
|
var require_package = __commonJS({
|
|
12636
12636
|
"package-json:../../package.json"(exports5, module) {
|
|
12637
|
-
module.exports = { version: "5.5.
|
|
12637
|
+
module.exports = { version: "5.5.4" };
|
|
12638
12638
|
}
|
|
12639
12639
|
});
|
|
12640
12640
|
|
|
@@ -17719,7 +17719,7 @@ var mqtt = (() => {
|
|
|
17719
17719
|
var TypedEmitter_1 = require_TypedEmitter();
|
|
17720
17720
|
var PingTimer_1 = __importDefault(require_PingTimer());
|
|
17721
17721
|
var is_browser_1 = __importStar(require_is_browser());
|
|
17722
|
-
var
|
|
17722
|
+
var setImmediate2 = globalThis.setImmediate || ((...args) => {
|
|
17723
17723
|
const callback = args.shift();
|
|
17724
17724
|
(0, shared_1.nextTick)(() => {
|
|
17725
17725
|
callback(...args);
|
|
@@ -18069,7 +18069,7 @@ var mqtt = (() => {
|
|
|
18069
18069
|
}
|
|
18070
18070
|
const invalidTopic = validations.validateTopics(topicsList);
|
|
18071
18071
|
if (invalidTopic !== null) {
|
|
18072
|
-
|
|
18072
|
+
setImmediate2(callback, new Error(`Invalid topic ${invalidTopic}`));
|
|
18073
18073
|
return this;
|
|
18074
18074
|
}
|
|
18075
18075
|
if (this._checkDisconnecting(callback)) {
|
|
@@ -18196,7 +18196,7 @@ var mqtt = (() => {
|
|
|
18196
18196
|
callback = callback || this.noop;
|
|
18197
18197
|
const invalidTopic = validations.validateTopics(topic);
|
|
18198
18198
|
if (invalidTopic !== null) {
|
|
18199
|
-
|
|
18199
|
+
setImmediate2(callback, new Error(`Invalid topic ${invalidTopic}`));
|
|
18200
18200
|
return this;
|
|
18201
18201
|
}
|
|
18202
18202
|
if (this._checkDisconnecting(callback)) {
|
|
@@ -18459,7 +18459,7 @@ var mqtt = (() => {
|
|
|
18459
18459
|
this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet", this.options.clientId);
|
|
18460
18460
|
this._sendPacket(packet, () => {
|
|
18461
18461
|
this.log("_cleanUp :: (%s) :: destroying stream", this.options.clientId);
|
|
18462
|
-
|
|
18462
|
+
setImmediate2(() => {
|
|
18463
18463
|
this.stream.end(() => {
|
|
18464
18464
|
this.log("_cleanUp :: (%s) :: stream destroyed", this.options.clientId);
|
|
18465
18465
|
});
|
|
@@ -20704,10 +20704,10 @@ var mqtt = (() => {
|
|
|
20704
20704
|
var buildStream = (client, opts) => {
|
|
20705
20705
|
opts.port = opts.port || 1883;
|
|
20706
20706
|
opts.hostname = opts.hostname || opts.host || "localhost";
|
|
20707
|
-
const { port } = opts;
|
|
20707
|
+
const { port, path: path2 } = opts;
|
|
20708
20708
|
const host = opts.hostname;
|
|
20709
20709
|
debug("port %d and host %s", port, host);
|
|
20710
|
-
return net_1.default.createConnection(port, host);
|
|
20710
|
+
return net_1.default.createConnection({ port, host, path: path2 });
|
|
20711
20711
|
};
|
|
20712
20712
|
exports5.default = buildStream;
|
|
20713
20713
|
}
|
|
@@ -21330,6 +21330,9 @@ var mqtt = (() => {
|
|
|
21330
21330
|
var url_1 = __importDefault((init_url(), __toCommonJS(url_exports)));
|
|
21331
21331
|
var client_1 = __importDefault(require_client());
|
|
21332
21332
|
var is_browser_1 = __importDefault(require_is_browser());
|
|
21333
|
+
if (typeof (process_exports === null || process_exports === void 0 ? void 0 : process_exports.nextTick) !== "function") {
|
|
21334
|
+
process_exports.nextTick = setImmediate;
|
|
21335
|
+
}
|
|
21333
21336
|
var debug = (0, debug_1.default)("mqttjs");
|
|
21334
21337
|
var protocols = {};
|
|
21335
21338
|
if (!is_browser_1.default) {
|