@wiotp/sdk
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "@wiotp/sdk", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "SDK for developing device, gateway, and application clients for IBM Watson IoT Platform", | ||
@@ -8,7 +8,10 @@ "main": "src/index.js", | ||
"src", | ||
"LICENCE", | ||
"index.js", | ||
"package.json", | ||
"README.md" | ||
"README.md", | ||
"LICENCE" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
@@ -15,0 +18,0 @@ "axios": "^0.19.0", |
@@ -54,1 +54,16 @@ # IBM Watson IoT Platform Javascript SDK | ||
``` | ||
## Development | ||
### Build | ||
``` | ||
npm i | ||
npm run build | ||
``` | ||
## Publish | ||
``` | ||
npm login | ||
npm publish --access public . | ||
``` |
@@ -204,3 +204,3 @@ /** | ||
subscribeToDeviceStateEvents(type, id, interfaceId, qos){ | ||
subscribeToDeviceState(type, id, interfaceId, qos){ | ||
type = type || '+'; | ||
@@ -212,3 +212,3 @@ id = id || '+'; | ||
var topic = "iot-2/type/" + type + "/id/" + id + "/intf/"+ interfaceId + "/evt/state"; | ||
this.log.debug("[ApplicationClient:subscribeToDeviceStateEvents] Calling subscribe with QoS "+qos); | ||
this.log.debug("[ApplicationClient:subscribeToDeviceState] Calling subscribe with QoS "+qos); | ||
this._subscribe(topic, qos); | ||
@@ -218,3 +218,3 @@ return this; | ||
unsubscribeToDeviceStateEvents(type, id, interfaceId){ | ||
unsubscribeToDeviceState(type, id, interfaceId){ | ||
type = type || '+'; | ||
@@ -234,3 +234,3 @@ id = id || '+'; | ||
subscribeToDeviceStateErrorEvents(type, id, qos){ | ||
subscribeToDeviceErrors(type, id, qos){ | ||
type = type || '+'; | ||
@@ -241,3 +241,3 @@ id = id || '+'; | ||
var topic = "iot-2/type/" + type + "/id/" + id + "/err/data"; | ||
this.log.debug("[ApplicationClient:subscribeToDeviceStateErrorEvents] Calling subscribe with QoS "+qos); | ||
this.log.debug("[ApplicationClient:subscribeToDeviceErrors] Calling subscribe with QoS "+qos); | ||
this._subscribe(topic, qos); | ||
@@ -247,3 +247,3 @@ return this; | ||
unsubscribeToDeviceStateErrorEvents(type, id){ | ||
unsubscribeToDeviceErrors(type, id){ | ||
type = type || '+'; | ||
@@ -259,6 +259,6 @@ id = id || '+'; | ||
// ========================================================================== | ||
// Rule Trigger Events | ||
// Rule Triggers | ||
// ========================================================================== | ||
subscribeToRuleTriggerEvents(interfaceId, ruleId, qos){ | ||
subscribeToRuleTriggers(interfaceId, ruleId, qos){ | ||
interfaceId = interfaceId || '+'; | ||
@@ -269,3 +269,3 @@ ruleId = ruleId || '+'; | ||
var topic = "iot-2/intf/" + interfaceId + "/rule/" + ruleId + "/evt/trigger"; | ||
this.log.debug("[ApplicationClient:subscribeToRuleTriggerEvents] Calling subscribe with QoS "+qos); | ||
this.log.debug("[ApplicationClient:subscribeToRuleTriggers] Calling subscribe with QoS "+qos); | ||
this._subscribe(topic, qos); | ||
@@ -275,3 +275,3 @@ return this; | ||
unsubscribeToRuleTriggerEvents(interfaceId, ruleId){ | ||
unsubscribeToRuleTriggers(interfaceId, ruleId){ | ||
interfaceId = interfaceId || '+'; | ||
@@ -290,3 +290,3 @@ ruleId = ruleId || '+'; | ||
subscribeToRuleErrorEvents(interfaceId, ruleId, qos){ | ||
subscribeToRuleErrors(interfaceId, ruleId, qos){ | ||
interfaceId = interfaceId || '+'; | ||
@@ -297,3 +297,3 @@ ruleId = ruleId || '+'; | ||
var topic = "iot-2/intf/" + interfaceId + "/rule/" + ruleId + "/err/data"; | ||
this.log.debug("[ApplicationClient:subscribeToRuleErrorEvents] Calling subscribe with QoS "+qos); | ||
this.log.debug("[ApplicationClient:subscribeToRuleErrors] Calling subscribe with QoS "+qos); | ||
this._subscribe(topic, qos); | ||
@@ -303,3 +303,3 @@ return this; | ||
unsubscribeToRuleErrorEvents(interfaceId, ruleId){ | ||
unsubscribeToRuleErrors(interfaceId, ruleId){ | ||
interfaceId = interfaceId || '+'; | ||
@@ -306,0 +306,0 @@ ruleId = ruleId || '+'; |
@@ -171,3 +171,3 @@ /** | ||
} | ||
}; | ||
}.bind(this); | ||
@@ -196,3 +196,3 @@ this.log.debug("[BaseClient:_subscribe] Subscribing to topic " + topic + " with QoS " + QoS); | ||
} | ||
}; | ||
}.bind(this); | ||
@@ -199,0 +199,0 @@ this.log.debug("[BaseClient:_unsubscribe] Unsubscribe: " + topic); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
116850
68
0