@cutos/core 3.0.0 → 3.0.1
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 +4 -2
- package/dist/cutos.esm.js +4 -2
- package/package.json +1 -1
package/dist/cutos.cjs.js
CHANGED
|
@@ -398,7 +398,7 @@ const cutosAPI$2 = {
|
|
|
398
398
|
var cutosApi = cutosAPI$2;
|
|
399
399
|
|
|
400
400
|
var name = "@cutos/core";
|
|
401
|
-
var version = "3.0.
|
|
401
|
+
var version = "3.0.1";
|
|
402
402
|
var description = "The CUTOS (CUT Operating System) Core API is a JavaScript library that provides essential functionalities for LWA (Local Web Application) edge computing and communication in the CUTOS ecosystem. ";
|
|
403
403
|
var main = "dist/cutos.cjs.js";
|
|
404
404
|
var module$1 = "dist/cutos.esm.js";
|
|
@@ -859,7 +859,9 @@ class Device {
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
onData(listener) {
|
|
862
|
-
|
|
862
|
+
if(!listenerMap.has(this.topicData)) {
|
|
863
|
+
client.subscribe(this.topicData); // receive data from device
|
|
864
|
+
}
|
|
863
865
|
let _this = this;
|
|
864
866
|
listenerMap.set(this.topicData, function (data) {
|
|
865
867
|
_this.data = data;
|
package/dist/cutos.esm.js
CHANGED
|
@@ -690,7 +690,7 @@ const cutosAPI$2 = {
|
|
|
690
690
|
var cutosApi = cutosAPI$2;
|
|
691
691
|
|
|
692
692
|
var name = "@cutos/core";
|
|
693
|
-
var version = "3.0.
|
|
693
|
+
var version = "3.0.1";
|
|
694
694
|
var description = "The CUTOS (CUT Operating System) Core API is a JavaScript library that provides essential functionalities for LWA (Local Web Application) edge computing and communication in the CUTOS ecosystem. ";
|
|
695
695
|
var main = "dist/cutos.cjs.js";
|
|
696
696
|
var module = "dist/cutos.esm.js";
|
|
@@ -1151,7 +1151,9 @@ class Device {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
1153
|
onData(listener) {
|
|
1154
|
-
|
|
1154
|
+
if(!listenerMap.has(this.topicData)) {
|
|
1155
|
+
client.subscribe(this.topicData); // receive data from device
|
|
1156
|
+
}
|
|
1155
1157
|
let _this = this;
|
|
1156
1158
|
listenerMap.set(this.topicData, function (data) {
|
|
1157
1159
|
_this.data = data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cutos/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "The CUTOS (CUT Operating System) Core API is a JavaScript library that provides essential functionalities for LWA (Local Web Application) edge computing and communication in the CUTOS ecosystem. ",
|
|
5
5
|
"main": "dist/cutos.cjs.js",
|
|
6
6
|
"module": "dist/cutos.esm.js",
|