@wiotp/sdk 0.8.1 → 0.8.2-alpha.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/BaseClient.js +12 -13
- package/dist/BaseConfig.js +5 -6
- package/dist/api/ApiClient.js +7 -8
- package/dist/api/ApiErrors.js +16 -16
- package/dist/api/DscClient.js +7 -8
- package/dist/api/LecClient.js +6 -7
- package/dist/api/MgmtClient.js +6 -7
- package/dist/api/RegistryClient.js +5 -6
- package/dist/api/RulesClient.js +6 -7
- package/dist/api/StateClient.js +6 -7
- package/dist/application/ApplicationClient.js +16 -16
- package/dist/application/ApplicationConfig.js +12 -13
- package/dist/application/index.js +1 -1
- package/dist/bundled/wiotp-bundle.js +2841 -1840
- package/dist/bundled/wiotp-bundle.min.js +7 -7
- package/dist/device/DeviceClient.js +16 -16
- package/dist/device/DeviceConfig.js +12 -13
- package/dist/device/index.js +1 -1
- package/dist/gateway/GatewayClient.js +16 -16
- package/dist/gateway/GatewayConfig.js +12 -13
- package/dist/gateway/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +17 -17
|
@@ -8,21 +8,22 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _util = require("../util");
|
|
9
9
|
var _BaseClient2 = _interopRequireDefault(require("../BaseClient"));
|
|
10
10
|
var _DeviceConfig = _interopRequireDefault(require("./DeviceConfig"));
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function _classCallCheck(
|
|
13
|
-
function _defineProperties(
|
|
14
|
-
function _createClass(
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
18
|
-
function _possibleConstructorReturn(
|
|
19
|
-
function _assertThisInitialized(
|
|
18
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
19
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
20
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
21
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
22
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
23
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
24
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
26
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
26
27
|
*****************************************************************************
|
|
27
28
|
Copyright (c) 2014, 2019 IBM Corporation and other Contributors.
|
|
28
29
|
All rights reserved. This program and the accompanying materials
|
|
@@ -36,7 +37,6 @@ var WILDCARD_TOPIC = 'iot-2/cmd/+/fmt/+';
|
|
|
36
37
|
var CMD_RE = /^iot-2\/cmd\/(.+)\/fmt\/(.+)$/;
|
|
37
38
|
var util = require('util');
|
|
38
39
|
var DeviceClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
39
|
-
_inherits(DeviceClient, _BaseClient);
|
|
40
40
|
function DeviceClient(config) {
|
|
41
41
|
var _this;
|
|
42
42
|
_classCallCheck(this, DeviceClient);
|
|
@@ -47,7 +47,8 @@ var DeviceClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
|
47
47
|
_this.log.debug("[DeviceClient:constructor] DeviceClient initialized for " + config.getClientId());
|
|
48
48
|
return _this;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
_inherits(DeviceClient, _BaseClient);
|
|
51
|
+
return _createClass(DeviceClient, [{
|
|
51
52
|
key: "_commandSubscriptionCallback",
|
|
52
53
|
value: function _commandSubscriptionCallback(err, granted) {
|
|
53
54
|
if (err == null) {
|
|
@@ -64,7 +65,7 @@ var DeviceClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
|
64
65
|
key: "connect",
|
|
65
66
|
value: function connect() {
|
|
66
67
|
var _this2 = this;
|
|
67
|
-
|
|
68
|
+
_superPropGet(DeviceClient, "connect", this, 3)([]);
|
|
68
69
|
this.mqtt.on('connect', function () {
|
|
69
70
|
// On connect establish a subscription for commands sent to this device (but not if connecting to quickstart)
|
|
70
71
|
if (!_this2.config.isQuickstart()) {
|
|
@@ -96,5 +97,4 @@ var DeviceClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
|
96
97
|
return this;
|
|
97
98
|
}
|
|
98
99
|
}]);
|
|
99
|
-
return DeviceClient;
|
|
100
100
|
}(_BaseClient2["default"]);
|
|
@@ -7,19 +7,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _BaseConfig2 = _interopRequireDefault(require("../BaseConfig"));
|
|
9
9
|
var _loglevel = _interopRequireDefault(require("loglevel"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _possibleConstructorReturn(
|
|
18
|
-
function _assertThisInitialized(
|
|
17
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
18
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
19
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
-
function _getPrototypeOf(
|
|
21
|
-
function _inherits(
|
|
22
|
-
function _setPrototypeOf(
|
|
20
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
21
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
22
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
23
23
|
*****************************************************************************
|
|
24
24
|
Copyright (c) 2019 IBM Corporation and other Contributors.
|
|
25
25
|
All rights reserved. This program and the accompanying materials
|
|
@@ -32,7 +32,6 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
|
|
|
32
32
|
var YAML = require('yaml');
|
|
33
33
|
var fs = require('fs');
|
|
34
34
|
var DeviceConfig = exports["default"] = /*#__PURE__*/function (_BaseConfig) {
|
|
35
|
-
_inherits(DeviceConfig, _BaseConfig);
|
|
36
35
|
function DeviceConfig(identity, auth, options) {
|
|
37
36
|
var _this;
|
|
38
37
|
_classCallCheck(this, DeviceConfig);
|
|
@@ -67,7 +66,8 @@ var DeviceConfig = exports["default"] = /*#__PURE__*/function (_BaseConfig) {
|
|
|
67
66
|
}
|
|
68
67
|
return _this;
|
|
69
68
|
}
|
|
70
|
-
|
|
69
|
+
_inherits(DeviceConfig, _BaseConfig);
|
|
70
|
+
return _createClass(DeviceConfig, [{
|
|
71
71
|
key: "getOrgId",
|
|
72
72
|
value: function getOrgId() {
|
|
73
73
|
return this.identity.orgId;
|
|
@@ -198,5 +198,4 @@ var DeviceConfig = exports["default"] = /*#__PURE__*/function (_BaseConfig) {
|
|
|
198
198
|
return new DeviceConfig(data['identity'], data['auth'], data['options']);
|
|
199
199
|
}
|
|
200
200
|
}]);
|
|
201
|
-
return DeviceConfig;
|
|
202
201
|
}(_BaseConfig2["default"]);
|
package/dist/device/index.js
CHANGED
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "DeviceConfig", {
|
|
|
17
17
|
});
|
|
18
18
|
var _DeviceClient = _interopRequireDefault(require("./DeviceClient"));
|
|
19
19
|
var _DeviceConfig = _interopRequireDefault(require("./DeviceConfig"));
|
|
20
|
-
function _interopRequireDefault(
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -7,21 +7,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _BaseClient2 = _interopRequireDefault(require("../BaseClient"));
|
|
9
9
|
var _GatewayConfig = _interopRequireDefault(require("./GatewayConfig"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
-
function _possibleConstructorReturn(
|
|
18
|
-
function _assertThisInitialized(
|
|
17
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
18
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
19
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
20
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
21
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
22
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
23
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
24
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
25
26
|
*****************************************************************************
|
|
26
27
|
Copyright (c) 2014, 2019 IBM Corporation and other Contributors.
|
|
27
28
|
All rights reserved. This program and the accompanying materials
|
|
@@ -34,7 +35,6 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
|
|
|
34
35
|
var CMD_RE = /^iot-2\/type\/(.+)\/id\/(.+)\/cmd\/(.+)\/fmt\/(.+)$/;
|
|
35
36
|
var util = require('util');
|
|
36
37
|
var GatewayClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
37
|
-
_inherits(GatewayClient, _BaseClient);
|
|
38
38
|
function GatewayClient(config) {
|
|
39
39
|
var _this;
|
|
40
40
|
_classCallCheck(this, GatewayClient);
|
|
@@ -48,11 +48,12 @@ var GatewayClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
|
48
48
|
_this.log.debug("[GatewayClient:constructor] GatewayClient initialized for " + config.getClientId());
|
|
49
49
|
return _this;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
_inherits(GatewayClient, _BaseClient);
|
|
52
|
+
return _createClass(GatewayClient, [{
|
|
52
53
|
key: "connect",
|
|
53
54
|
value: function connect() {
|
|
54
55
|
var _this2 = this;
|
|
55
|
-
|
|
56
|
+
_superPropGet(GatewayClient, "connect", this, 3)([]);
|
|
56
57
|
this.mqtt.on('connect', function () {
|
|
57
58
|
// This gateway client implemention does not automatically subscribe to any commands!?
|
|
58
59
|
});
|
|
@@ -125,5 +126,4 @@ var GatewayClient = exports["default"] = /*#__PURE__*/function (_BaseClient) {
|
|
|
125
126
|
return this;
|
|
126
127
|
}
|
|
127
128
|
}]);
|
|
128
|
-
return GatewayClient;
|
|
129
129
|
}(_BaseClient2["default"]);
|
|
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _DeviceConfig2 = _interopRequireDefault(require("../device/DeviceConfig"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
function _classCallCheck(
|
|
11
|
-
function _defineProperties(
|
|
12
|
-
function _createClass(
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
|
-
function _possibleConstructorReturn(
|
|
17
|
-
function _assertThisInitialized(
|
|
16
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
-
function _getPrototypeOf(
|
|
20
|
-
function _inherits(
|
|
21
|
-
function _setPrototypeOf(
|
|
19
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /**
|
|
22
22
|
*****************************************************************************
|
|
23
23
|
Copyright (c) 2019 IBM Corporation and other Contributors.
|
|
24
24
|
All rights reserved. This program and the accompanying materials
|
|
@@ -29,17 +29,16 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
var GatewayConfig = exports["default"] = /*#__PURE__*/function (_DeviceConfig) {
|
|
32
|
-
_inherits(GatewayConfig, _DeviceConfig);
|
|
33
32
|
function GatewayConfig(identity, auth, options) {
|
|
34
33
|
_classCallCheck(this, GatewayConfig);
|
|
35
34
|
return _callSuper(this, GatewayConfig, [identity, auth, options]);
|
|
36
35
|
}
|
|
37
|
-
|
|
36
|
+
_inherits(GatewayConfig, _DeviceConfig);
|
|
37
|
+
return _createClass(GatewayConfig, [{
|
|
38
38
|
key: "getClientId",
|
|
39
39
|
value: function getClientId() {
|
|
40
40
|
return "g:" + this.identity.orgId + ":" + this.identity.typeId + ":" + this.identity.deviceId;
|
|
41
41
|
}
|
|
42
42
|
}]);
|
|
43
|
-
return GatewayConfig;
|
|
44
43
|
}(_DeviceConfig2["default"]);
|
|
45
44
|
;
|
package/dist/gateway/index.js
CHANGED
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "GatewayConfig", {
|
|
|
17
17
|
});
|
|
18
18
|
var _GatewayClient = _interopRequireDefault(require("./GatewayClient"));
|
|
19
19
|
var _GatewayConfig = _interopRequireDefault(require("./GatewayConfig"));
|
|
20
|
-
function _interopRequireDefault(
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
package/dist/index.js
CHANGED
|
@@ -94,4 +94,4 @@ var _MgmtClient = _interopRequireDefault(require("./api/MgmtClient"));
|
|
|
94
94
|
var _RegistryClient = _interopRequireDefault(require("./api/RegistryClient"));
|
|
95
95
|
var _RulesClient = _interopRequireDefault(require("./api/RulesClient"));
|
|
96
96
|
var _StateClient = _interopRequireDefault(require("./api/StateClient"));
|
|
97
|
-
function _interopRequireDefault(
|
|
97
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiotp/sdk",
|
|
3
|
-
"version": "0.8.1",
|
|
3
|
+
"version": "0.8.2-alpha.1",
|
|
4
4
|
"description": "SDK for developing device, gateway, and application clients for IBM Watson IoT Platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -14,40 +14,40 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^1.
|
|
17
|
+
"axios": "^1.7.9",
|
|
18
18
|
"bluebird": "^3.7.2",
|
|
19
19
|
"btoa": "^1.2.1",
|
|
20
20
|
"concat-stream": "^2.0.0",
|
|
21
21
|
"esm": "^3.2.25",
|
|
22
22
|
"events": "^3.3.0",
|
|
23
|
-
"form-data": "^4.0.
|
|
23
|
+
"form-data": "^4.0.1",
|
|
24
24
|
"format": "^0.2.2",
|
|
25
|
-
"loglevel": "^1.
|
|
25
|
+
"loglevel": "^1.9.2",
|
|
26
26
|
"mqtt": "^4.3.8",
|
|
27
|
-
"systeminformation": "^5.
|
|
27
|
+
"systeminformation": "^5.25.11",
|
|
28
28
|
"tinycache": "^1.1.2",
|
|
29
29
|
"uuid": "^9.0.1",
|
|
30
|
-
"yaml": "^2.
|
|
30
|
+
"yaml": "^2.7.0",
|
|
31
31
|
"yargs": "^17.7.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/cli": "^7.
|
|
35
|
-
"@babel/core": "^7.
|
|
36
|
-
"@babel/preset-env": "^7.
|
|
37
|
-
"@babel/register": "^7.
|
|
38
|
-
"@ibm-cloud/cloudant": "^0.8.
|
|
34
|
+
"@babel/cli": "^7.26.4",
|
|
35
|
+
"@babel/core": "^7.26.0",
|
|
36
|
+
"@babel/preset-env": "^7.26.0",
|
|
37
|
+
"@babel/register": "^7.25.9",
|
|
38
|
+
"@ibm-cloud/cloudant": "^0.8.3",
|
|
39
39
|
"@istanbuljs/nyc-config-babel": "^3.0.0",
|
|
40
40
|
"babel-plugin-istanbul": "^6.1.1",
|
|
41
41
|
"babelify": "^10.0.0",
|
|
42
|
-
"browserify": "^17.0.
|
|
43
|
-
"chai": "^4.
|
|
44
|
-
"chai-as-promised": "^7.1.
|
|
42
|
+
"browserify": "^17.0.1",
|
|
43
|
+
"chai": "^4.5.0",
|
|
44
|
+
"chai-as-promised": "^7.1.2",
|
|
45
45
|
"coveralls": "3.1.1",
|
|
46
|
-
"mocha": "^10.2
|
|
46
|
+
"mocha": "^10.8.2",
|
|
47
47
|
"mocha-steps": "^1.3.0",
|
|
48
48
|
"nyc": "15.1.0",
|
|
49
|
-
"rimraf": "^5.0.
|
|
50
|
-
"terser": "^5.
|
|
49
|
+
"rimraf": "^5.0.10",
|
|
50
|
+
"terser": "^5.37.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rimraf dist/*",
|