@cutos/core 0.0.21 → 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 +18 -16
- package/dist/cutos.esm.js +13 -16
- package/package.json +1 -1
package/dist/cutos.cjs.js
CHANGED
|
@@ -5,10 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
var require$$1 = require('mqtt');
|
|
7
7
|
|
|
8
|
-
function getDefaultExportFromCjs (x) {
|
|
9
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
function getAugmentedNamespace(n) {
|
|
13
9
|
if (n.__esModule) return n;
|
|
14
10
|
var f = n.default;
|
|
@@ -34,6 +30,8 @@ function getAugmentedNamespace(n) {
|
|
|
34
30
|
return a;
|
|
35
31
|
}
|
|
36
32
|
|
|
33
|
+
var src = {};
|
|
34
|
+
|
|
37
35
|
var cutos = {};
|
|
38
36
|
|
|
39
37
|
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
|
|
@@ -399,7 +397,7 @@ const cutosAPI$2 = {
|
|
|
399
397
|
var cutosApi = cutosAPI$2;
|
|
400
398
|
|
|
401
399
|
var name = "@cutos/core";
|
|
402
|
-
var version = "0.0.
|
|
400
|
+
var version = "0.0.23";
|
|
403
401
|
var description = "";
|
|
404
402
|
var main = "dist/cutos.cjs.js";
|
|
405
403
|
var module$1 = "dist/cutos.esm.js";
|
|
@@ -801,7 +799,7 @@ class Heartbeat {
|
|
|
801
799
|
}
|
|
802
800
|
|
|
803
801
|
class Device {
|
|
804
|
-
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback,
|
|
802
|
+
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback, opts) {
|
|
805
803
|
this.name = name;
|
|
806
804
|
this.type = type;
|
|
807
805
|
this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
|
|
@@ -830,13 +828,13 @@ class Device {
|
|
|
830
828
|
}
|
|
831
829
|
// subscribe callback
|
|
832
830
|
client.subscribe(this.topicCommand + '-callback');
|
|
833
|
-
this.init(name, type, callback,
|
|
831
|
+
this.init(name, type, callback, opts);
|
|
834
832
|
}
|
|
835
833
|
|
|
836
|
-
init(name, type, callback,
|
|
834
|
+
init(name, type, callback, opts) {
|
|
837
835
|
let command = {};
|
|
838
836
|
command.cmd = "init";
|
|
839
|
-
command.args = {name, type,
|
|
837
|
+
command.args = {name, type, opts};
|
|
840
838
|
command.topicResponse = this.topicResponse;
|
|
841
839
|
let defaultTopic = cutosAPI$1.DEVICE.CHANNEL + '-' + cutosAPI$1.DEVICE.DEFAULT + '-command';
|
|
842
840
|
publishRequest(defaultTopic, null, command);
|
|
@@ -1096,11 +1094,15 @@ const {CoreAPI, CoreDefine, CoreClass, cutosAPI} = cutos;
|
|
|
1096
1094
|
const {CoreSimulator} = coreSimulator;
|
|
1097
1095
|
|
|
1098
1096
|
|
|
1099
|
-
var src =
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
var index = /*@__PURE__*/getDefaultExportFromCjs(src);
|
|
1097
|
+
var CoreAPI_1 = src.CoreAPI = CoreAPI;
|
|
1098
|
+
var CoreDefine_1 = src.CoreDefine = CoreDefine;
|
|
1099
|
+
var CoreClass_1 = src.CoreClass = CoreClass;
|
|
1100
|
+
var cutosAPI_1 = src.cutosAPI = cutosAPI;
|
|
1101
|
+
var CoreSimulator_1 = src.CoreSimulator = CoreSimulator;
|
|
1105
1102
|
|
|
1106
|
-
exports.
|
|
1103
|
+
exports.CoreAPI = CoreAPI_1;
|
|
1104
|
+
exports.CoreClass = CoreClass_1;
|
|
1105
|
+
exports.CoreDefine = CoreDefine_1;
|
|
1106
|
+
exports.CoreSimulator = CoreSimulator_1;
|
|
1107
|
+
exports.cutosAPI = cutosAPI_1;
|
|
1108
|
+
exports.default = src;
|
package/dist/cutos.esm.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import require$$1 from 'mqtt';
|
|
2
2
|
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
3
|
function getAugmentedNamespace(n) {
|
|
8
4
|
if (n.__esModule) return n;
|
|
9
5
|
var f = n.default;
|
|
@@ -29,6 +25,8 @@ function getAugmentedNamespace(n) {
|
|
|
29
25
|
return a;
|
|
30
26
|
}
|
|
31
27
|
|
|
28
|
+
var src = {};
|
|
29
|
+
|
|
32
30
|
var cutos = {};
|
|
33
31
|
|
|
34
32
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -691,7 +689,7 @@ const cutosAPI$2 = {
|
|
|
691
689
|
var cutosApi = cutosAPI$2;
|
|
692
690
|
|
|
693
691
|
var name = "@cutos/core";
|
|
694
|
-
var version = "0.0.
|
|
692
|
+
var version = "0.0.23";
|
|
695
693
|
var description = "";
|
|
696
694
|
var main = "dist/cutos.cjs.js";
|
|
697
695
|
var module = "dist/cutos.esm.js";
|
|
@@ -1093,7 +1091,7 @@ class Heartbeat {
|
|
|
1093
1091
|
}
|
|
1094
1092
|
|
|
1095
1093
|
class Device {
|
|
1096
|
-
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback,
|
|
1094
|
+
constructor(name = 'default-device-name', type = cutosAPI$1.DEVICE.DEFAULT, callback, opts) {
|
|
1097
1095
|
this.name = name;
|
|
1098
1096
|
this.type = type;
|
|
1099
1097
|
this.topicData = cutosAPI$1.DEVICE.CHANNEL + '-' + type + '-data';
|
|
@@ -1122,13 +1120,13 @@ class Device {
|
|
|
1122
1120
|
}
|
|
1123
1121
|
// subscribe callback
|
|
1124
1122
|
client.subscribe(this.topicCommand + '-callback');
|
|
1125
|
-
this.init(name, type, callback,
|
|
1123
|
+
this.init(name, type, callback, opts);
|
|
1126
1124
|
}
|
|
1127
1125
|
|
|
1128
|
-
init(name, type, callback,
|
|
1126
|
+
init(name, type, callback, opts) {
|
|
1129
1127
|
let command = {};
|
|
1130
1128
|
command.cmd = "init";
|
|
1131
|
-
command.args = {name, type,
|
|
1129
|
+
command.args = {name, type, opts};
|
|
1132
1130
|
command.topicResponse = this.topicResponse;
|
|
1133
1131
|
let defaultTopic = cutosAPI$1.DEVICE.CHANNEL + '-' + cutosAPI$1.DEVICE.DEFAULT + '-command';
|
|
1134
1132
|
publishRequest(defaultTopic, null, command);
|
|
@@ -1388,11 +1386,10 @@ const {CoreAPI, CoreDefine, CoreClass, cutosAPI} = cutos;
|
|
|
1388
1386
|
const {CoreSimulator} = coreSimulator;
|
|
1389
1387
|
|
|
1390
1388
|
|
|
1391
|
-
var src =
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
var index = /*@__PURE__*/getDefaultExportFromCjs(src);
|
|
1389
|
+
var CoreAPI_1 = src.CoreAPI = CoreAPI;
|
|
1390
|
+
var CoreDefine_1 = src.CoreDefine = CoreDefine;
|
|
1391
|
+
var CoreClass_1 = src.CoreClass = CoreClass;
|
|
1392
|
+
var cutosAPI_1 = src.cutosAPI = cutosAPI;
|
|
1393
|
+
var CoreSimulator_1 = src.CoreSimulator = CoreSimulator;
|
|
1397
1394
|
|
|
1398
|
-
export {
|
|
1395
|
+
export { CoreAPI_1 as CoreAPI, CoreClass_1 as CoreClass, CoreDefine_1 as CoreDefine, CoreSimulator_1 as CoreSimulator, cutosAPI_1 as cutosAPI, src as default };
|