@webex/plugin-device-manager 3.0.0-beta.4 → 3.0.0-beta.40
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/collection.js +2 -9
- package/dist/collection.js.map +1 -1
- package/dist/config.js +0 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/device-manager.js +121 -225
- package/dist/device-manager.js.map +1 -1
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/sample/app.js +159 -150
- package/src/collection.js +3 -5
- package/src/device-manager.js +267 -224
- package/src/index.js +1 -1
- package/webex.js +5 -5
package/dist/collection.js
CHANGED
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = void 0;
|
|
12
|
-
|
|
13
9
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
14
|
-
|
|
15
10
|
var _merge2 = _interopRequireDefault(require("lodash/merge"));
|
|
16
|
-
|
|
17
11
|
var DeviceCollection = {
|
|
18
12
|
devices: {},
|
|
19
13
|
get: function get(deviceId) {
|
|
20
14
|
return this.devices[deviceId];
|
|
21
15
|
},
|
|
22
16
|
set: function set(device) {
|
|
23
|
-
var deviceId = device.id || device.identity && device.identity.id;
|
|
24
|
-
|
|
17
|
+
var deviceId = device.id || device.identity && device.identity.id;
|
|
18
|
+
// check if the device is already existing, if so then merge else add
|
|
25
19
|
var existingDevice = this.devices[deviceId];
|
|
26
|
-
|
|
27
20
|
if (existingDevice) {
|
|
28
21
|
// already existing, merge for any new binding information
|
|
29
22
|
(0, _merge2.default)(existingDevice, device);
|
package/dist/collection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeviceCollection","devices","get","deviceId","set","device","id","identity","existingDevice","reset","getAll"],"sources":["collection.js"],"sourcesContent":["import {merge} from 'lodash';\n\nconst DeviceCollection = {\n devices: {},\n\n get(deviceId) {\n return this.devices[deviceId];\n },\n\n set(device) {\n const deviceId = device.id || device.identity && device.identity.id;\n // check if the device is already existing, if so then merge else add\n const existingDevice = this.devices[deviceId];\n\n if (existingDevice) {\n // already existing, merge for any new binding information\n merge(existingDevice, device);\n }
|
|
1
|
+
{"version":3,"names":["DeviceCollection","devices","get","deviceId","set","device","id","identity","existingDevice","reset","getAll"],"sources":["collection.js"],"sourcesContent":["import {merge} from 'lodash';\n\nconst DeviceCollection = {\n devices: {},\n\n get(deviceId) {\n return this.devices[deviceId];\n },\n\n set(device) {\n const deviceId = device.id || (device.identity && device.identity.id);\n // check if the device is already existing, if so then merge else add\n const existingDevice = this.devices[deviceId];\n\n if (existingDevice) {\n // already existing, merge for any new binding information\n merge(existingDevice, device);\n } else {\n this.devices[deviceId] = device;\n }\n },\n\n reset() {\n this.devices = {};\n },\n\n getAll() {\n return Object.values(this.devices);\n },\n};\n\nexport default DeviceCollection;\n"],"mappings":";;;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG;EACvBC,OAAO,EAAE,CAAC,CAAC;EAEXC,GAAG,eAACC,QAAQ,EAAE;IACZ,OAAO,IAAI,CAACF,OAAO,CAACE,QAAQ,CAAC;EAC/B,CAAC;EAEDC,GAAG,eAACC,MAAM,EAAE;IACV,IAAMF,QAAQ,GAAGE,MAAM,CAACC,EAAE,IAAKD,MAAM,CAACE,QAAQ,IAAIF,MAAM,CAACE,QAAQ,CAACD,EAAG;IACrE;IACA,IAAME,cAAc,GAAG,IAAI,CAACP,OAAO,CAACE,QAAQ,CAAC;IAE7C,IAAIK,cAAc,EAAE;MAClB;MACA,qBAAMA,cAAc,EAAEH,MAAM,CAAC;IAC/B,CAAC,MAAM;MACL,IAAI,CAACJ,OAAO,CAACE,QAAQ,CAAC,GAAGE,MAAM;IACjC;EACF,CAAC;EAEDI,KAAK,mBAAG;IACN,IAAI,CAACR,OAAO,GAAG,CAAC,CAAC;EACnB,CAAC;EAEDS,MAAM,oBAAG;IACP,OAAO,qBAAc,IAAI,CAACT,OAAO,CAAC;EACpC;AACF,CAAC;AAAC,eAEaD,gBAAgB;AAAA"}
|
package/dist/config.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
|
|
9
7
|
exports.default = void 0;
|
|
10
8
|
var _default = {};
|
|
11
9
|
exports.default = _default;
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["config.js"],"sourcesContent":["export default {};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["config.js"],"sourcesContent":["export default {};\n"],"mappings":";;;;;;;eAAe,CAAC,CAAC;AAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
|
|
9
7
|
exports.UC_CLOUD = exports.LYRA_SPACE = exports.DEFAULT_PRODUCT_NAME = void 0;
|
|
10
8
|
var LYRA_SPACE = 'LYRA_SPACE';
|
|
11
9
|
exports.LYRA_SPACE = LYRA_SPACE;
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LYRA_SPACE","UC_CLOUD","DEFAULT_PRODUCT_NAME"],"sources":["constants.js"],"sourcesContent":["export const LYRA_SPACE = 'LYRA_SPACE';\nexport const UC_CLOUD = 'uc-cloud';\nexport const DEFAULT_PRODUCT_NAME = 'default';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["LYRA_SPACE","UC_CLOUD","DEFAULT_PRODUCT_NAME"],"sources":["constants.js"],"sourcesContent":["export const LYRA_SPACE = 'LYRA_SPACE';\nexport const UC_CLOUD = 'uc-cloud';\nexport const DEFAULT_PRODUCT_NAME = 'default';\n"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAG,YAAY;AAAC;AAChC,IAAMC,QAAQ,GAAG,UAAU;AAAC;AAC5B,IAAMC,oBAAoB,GAAG,SAAS;AAAC"}
|