@cutos/core 0.0.22 → 0.0.23
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/dist/cutos.cjs.js +5 -5
- package/dist/cutos.esm.js +5 -5
- package/package.json +1 -1
package/dist/cutos.cjs.js
CHANGED
|
@@ -397,7 +397,7 @@ const cutosAPI$2 = {
|
|
|
397
397
|
var cutosApi = cutosAPI$2;
|
|
398
398
|
|
|
399
399
|
var name = "@cutos/core";
|
|
400
|
-
var version = "0.0.
|
|
400
|
+
var version = "0.0.23";
|
|
401
401
|
var description = "";
|
|
402
402
|
var main = "dist/cutos.cjs.js";
|
|
403
403
|
var module$1 = "dist/cutos.esm.js";
|
|
@@ -799,7 +799,7 @@ class Heartbeat {
|
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
class Device {
|
|
802
|
-
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback,
|
|
802
|
+
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback, opts) {
|
|
803
803
|
this.name = name;
|
|
804
804
|
this.type = type;
|
|
805
805
|
this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
|
|
@@ -828,13 +828,13 @@ class Device {
|
|
|
828
828
|
}
|
|
829
829
|
// subscribe callback
|
|
830
830
|
client.subscribe(this.topicCommand + '-callback');
|
|
831
|
-
this.init(name, type, callback,
|
|
831
|
+
this.init(name, type, callback, opts);
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
init(name, type, callback,
|
|
834
|
+
init(name, type, callback, opts) {
|
|
835
835
|
let command = {};
|
|
836
836
|
command.cmd = "init";
|
|
837
|
-
command.args = {name, type,
|
|
837
|
+
command.args = {name, type, opts};
|
|
838
838
|
command.topicResponse = this.topicResponse;
|
|
839
839
|
let defaultTopic = cutosAPI$1.DEVICE.CHANNEL + '-' + cutosAPI$1.DEVICE.DEFAULT + '-command';
|
|
840
840
|
publishRequest(defaultTopic, null, command);
|
package/dist/cutos.esm.js
CHANGED
|
@@ -689,7 +689,7 @@ const cutosAPI$2 = {
|
|
|
689
689
|
var cutosApi = cutosAPI$2;
|
|
690
690
|
|
|
691
691
|
var name = "@cutos/core";
|
|
692
|
-
var version = "0.0.
|
|
692
|
+
var version = "0.0.23";
|
|
693
693
|
var description = "";
|
|
694
694
|
var main = "dist/cutos.cjs.js";
|
|
695
695
|
var module = "dist/cutos.esm.js";
|
|
@@ -1091,7 +1091,7 @@ class Heartbeat {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
1093
|
class Device {
|
|
1094
|
-
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback,
|
|
1094
|
+
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback, opts) {
|
|
1095
1095
|
this.name = name;
|
|
1096
1096
|
this.type = type;
|
|
1097
1097
|
this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
|
|
@@ -1120,13 +1120,13 @@ class Device {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
// subscribe callback
|
|
1122
1122
|
client.subscribe(this.topicCommand + '-callback');
|
|
1123
|
-
this.init(name, type, callback,
|
|
1123
|
+
this.init(name, type, callback, opts);
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
|
-
init(name, type, callback,
|
|
1126
|
+
init(name, type, callback, opts) {
|
|
1127
1127
|
let command = {};
|
|
1128
1128
|
command.cmd = "init";
|
|
1129
|
-
command.args = {name, type,
|
|
1129
|
+
command.args = {name, type, opts};
|
|
1130
1130
|
command.topicResponse = this.topicResponse;
|
|
1131
1131
|
let defaultTopic = cutosAPI$1.DEVICE.CHANNEL + '-' + cutosAPI$1.DEVICE.DEFAULT + '-command';
|
|
1132
1132
|
publishRequest(defaultTopic, null, command);
|