New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gcic-mqtt-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gcic-mqtt-client - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

LICENSE

2

index.js

@@ -67,3 +67,3 @@ const mqtt = require('mqtt');

client.on('message', (topic, message) => {
// Single subscription; no need to check topic
// Client has single subscription; no need to check topic
client.options.onConfiguration(message);

@@ -70,0 +70,0 @@ });

{
"name": "gcic-mqtt-client",
"version": "0.1.0",
"version": "1.0.0",
"description": "MQTT client for Google Cloud IoT Core",

@@ -27,5 +27,5 @@ "main": "index.js",

"dependencies": {
"mqtt": "^2.13.0",
"node-webtokens": "^0.1.2"
"mqtt": "^2.15.1",
"node-webtokens": "^1.0.0"
}
}

@@ -45,3 +45,3 @@ # gcic-mqtt-client

privateKey: fs.readFileSync('./rsa_private.pem'),
onConfiguration: processConfiguration // <===
onConfiguration: processConfiguration // <============
};

@@ -100,3 +100,3 @@

| `tokenLifecycle` | OPTIONAL - Integer with `3600` as default value; specifies the time validity of the device token in seconds; the default value corresponds to one hour; [Google Cloud IoT Core](https://cloud.google.com/iot-core/) automatically disconnects devices after their tokens have expired; a grace period of approximately 10 minutes is observed to compensate for possible clock skews
| `onConfiguration` | OPTIONAL - Function; callback invoked whenever [Google Cloud IoT Core](https://cloud.google.com/iot-core/) publishes configuration information for the device. If `onConfiguration` is omitted, then the MQTT client does not subscribe to configuration updates. Instead, if `onConfiguration` is specified, then the MQTT client automatically subscribes to configuration updates; upon every update, the MQTT client acknowledges reception and invokes the `onConfiguration` callback with `(configuration)` as argument; `configuration` is the received configuration passed as buffer
| `onConfiguration` | OPTIONAL - Function; callback invoked whenever [Google Cloud IoT Core](https://cloud.google.com/iot-core/) publishes configuration information for the device. If `onConfiguration` is omitted, then the MQTT client does not subscribe to configuration updates. Instead, if `onConfiguration` is specified, then the MQTT client automatically subscribes to configuration updates. Upon every update, the MQTT client acknowledges reception and invokes the `onConfiguration` callback with `(configuration)` as argument; `configuration` is the received configuration passed as buffer
| `host` | OPTIONAL - String with `mqtt.googleapis.com` as default; identifies the [Google Cloud IoT Core](https://cloud.google.com/iot-core/) MQTT bridge host

@@ -129,3 +129,3 @@ | `port` | OPTIONAL - Integer with `8883` as default; identifies the [Google Cloud IoT Core](https://cloud.google.com/iot-core/) MQTT bridge port number

Once the MQTT client has been created, all the methods and events supported by the [MQTT.js](https://www.npmjs.com/package/mqtt) library are accessible. In addition, this helper adds support for the following methods and events:
Once the MQTT client has been created, all the methods and events supported by the [MQTT.js](https://www.npmjs.com/package/mqtt) library are accessible. In addition, this helper provides support for the following methods and events:

@@ -132,0 +132,0 @@ **client.publishEvent(event[, qos][, subFolder])**

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