gcic-mqtt-client
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -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])** |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20885
0
+ Addednode-webtokens@1.0.4(transitive)
- Removednode-webtokens@0.1.2(transitive)
Updatedmqtt@^2.15.1
Updatednode-webtokens@^1.0.0