Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mqtt

Package Overview
Dependencies
Maintainers
7
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt - npm Package Compare versions

Comparing version 5.9.1 to 5.10.0

13

build/lib/client.d.ts
/// <reference types="node" />
/// <reference types="node" />
import { IAuthPacket, IConnackPacket, IDisconnectPacket, IPublishPacket, ISubscribePacket, Packet, QoS, IConnectPacket } from 'mqtt-packet';
import { IAuthPacket, IConnackPacket, IDisconnectPacket, IPublishPacket, ISubscribePacket, IUnsubscribePacket, Packet, QoS, ISubackPacket, IConnectPacket } from 'mqtt-packet';
import { IMessageIdProvider } from './default-message-id-provider';

@@ -111,6 +111,9 @@ import { DuplexOptions } from 'readable-stream';

};
export interface IClientUnsubscribeProperties {
properties?: IUnsubscribePacket['properties'];
}
export { IConnackPacket, IDisconnectPacket, IPublishPacket, Packet };
export type OnConnectCallback = (packet: IConnackPacket) => void;
export type OnDisconnectCallback = (packet: IDisconnectPacket) => void;
export type ClientSubscribeCallback = (err: Error | null, granted?: ISubscriptionGrant[]) => void;
export type ClientSubscribeCallback = (err: Error | null, granted?: ISubscriptionGrant[], packet?: ISubackPacket) => void;
export type OnMessageCallback = (topic: string, payload: Buffer, packet: IPublishPacket) => void;

@@ -191,7 +194,7 @@ export type OnPacketCallback = (packet: Packet) => void;

unsubscribe(topic: string | string[]): MqttClient;
unsubscribe(topic: string | string[], opts?: IClientSubscribeOptions): MqttClient;
unsubscribe(topic: string | string[], opts?: IClientUnsubscribeProperties): MqttClient;
unsubscribe(topic: string | string[], callback?: PacketCallback): MqttClient;
unsubscribe(topic: string | string[], opts?: IClientSubscribeOptions, callback?: PacketCallback): MqttClient;
unsubscribe(topic: string | string[], opts?: IClientUnsubscribeProperties, callback?: PacketCallback): MqttClient;
unsubscribeAsync(topic: string | string[]): Promise<Packet | undefined>;
unsubscribeAsync(topic: string | string[], opts?: IClientSubscribeOptions): Promise<Packet | undefined>;
unsubscribeAsync(topic: string | string[], opts?: IClientUnsubscribeProperties): Promise<Packet | undefined>;
end(cb?: DoneCallback): MqttClient;

@@ -198,0 +201,0 @@ end(force?: boolean): MqttClient;

@@ -517,3 +517,3 @@ "use strict";

}
callback(err, subs);
callback(err, subs, packet2);
},

@@ -520,0 +520,0 @@ };

@@ -120,3 +120,3 @@ "use strict";

client['_invokeStoreProcessingQueue']();
cb(null);
cb(null, packet);
break;

@@ -123,0 +123,0 @@ }

{
"name": "mqtt",
"description": "A library for the MQTT protocol",
"version": "5.9.1",
"version": "5.10.0",
"contributors": [

@@ -119,3 +119,2 @@ "Adam Rudd <adamvrr@gmail.com>",

"minimist": "^1.2.8",
"mqtt": "^5.2.0",
"mqtt-packet": "^9.0.0",

@@ -122,0 +121,0 @@ "number-allocator": "^1.0.14",

@@ -326,3 +326,3 @@ /**

/*
* MQTT 5.0 properies object of subscribe
* MQTT 5.0 properties object of subscribe
* */

@@ -374,2 +374,9 @@ properties?: ISubscribePacket['properties']

export interface IClientUnsubscribeProperties {
/*
* MQTT 5.0 properties object for unsubscribe
* */
properties?: IUnsubscribePacket['properties']
}
export { IConnackPacket, IDisconnectPacket, IPublishPacket, Packet }

@@ -381,2 +388,3 @@ export type OnConnectCallback = (packet: IConnackPacket) => void

granted?: ISubscriptionGrant[],
packet?: ISubackPacket,
) => void

@@ -1247,3 +1255,3 @@ export type OnMessageCallback = (

callback(err, subs)
callback(err, subs, packet2)
},

@@ -1307,3 +1315,3 @@ }

topic: string | string[],
opts?: IClientSubscribeOptions,
opts?: IClientUnsubscribeProperties,
): MqttClient

@@ -1316,3 +1324,3 @@ public unsubscribe(

topic: string | string[],
opts?: IClientSubscribeOptions,
opts?: IClientUnsubscribeProperties,
callback?: PacketCallback,

@@ -1322,3 +1330,3 @@ ): MqttClient

topic: string | string[],
opts?: IClientSubscribeOptions | PacketCallback,
opts?: IClientUnsubscribeProperties | PacketCallback,
callback?: PacketCallback,

@@ -1405,7 +1413,7 @@ ): MqttClient {

topic: string | string[],
opts?: IClientSubscribeOptions,
opts?: IClientUnsubscribeProperties,
): Promise<Packet | undefined>
public unsubscribeAsync(
topic: string | string[],
opts?: IClientSubscribeOptions,
opts?: IClientUnsubscribeProperties,
): Promise<Packet | undefined> {

@@ -1412,0 +1420,0 @@ return new Promise((resolve, reject) => {

@@ -147,3 +147,3 @@ // Other Socket Errors: EADDRINUSE, ECONNRESET, ENOTFOUND, ETIMEDOUT.

client['_invokeStoreProcessingQueue']()
cb(null)
cb(null, packet)
break

@@ -150,0 +150,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc