@webex/internal-plugin-device 2.59.2 → 2.59.3-next.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.
Files changed (41) hide show
  1. package/.eslintrc.js +6 -6
  2. package/README.md +80 -80
  3. package/babel.config.js +3 -3
  4. package/dist/config.js +27 -27
  5. package/dist/config.js.map +1 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/device.js +226 -226
  8. package/dist/device.js.map +1 -1
  9. package/dist/features/feature-collection.js +14 -14
  10. package/dist/features/feature-collection.js.map +1 -1
  11. package/dist/features/feature-model.js +73 -73
  12. package/dist/features/feature-model.js.map +1 -1
  13. package/dist/features/features-model.js +28 -28
  14. package/dist/features/features-model.js.map +1 -1
  15. package/dist/features/index.js.map +1 -1
  16. package/dist/index.js +4 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/interceptors/device-url.js +8 -8
  19. package/dist/interceptors/device-url.js.map +1 -1
  20. package/dist/metrics.js.map +1 -1
  21. package/jest.config.js +3 -3
  22. package/package.json +17 -16
  23. package/process +1 -1
  24. package/src/config.js +60 -60
  25. package/src/constants.js +23 -23
  26. package/src/device.js +835 -835
  27. package/src/features/feature-collection.js +30 -30
  28. package/src/features/feature-model.js +189 -189
  29. package/src/features/features-model.js +96 -96
  30. package/src/features/index.js +5 -5
  31. package/src/index.js +29 -29
  32. package/src/interceptors/device-url.js +61 -61
  33. package/src/metrics.js +5 -5
  34. package/test/integration/spec/device.js +904 -904
  35. package/test/integration/spec/webex.js +42 -42
  36. package/test/unit/spec/device.js +409 -409
  37. package/test/unit/spec/features/feature-collection.js +24 -24
  38. package/test/unit/spec/features/feature-model.js +255 -255
  39. package/test/unit/spec/features/features-model.js +97 -97
  40. package/test/unit/spec/interceptors/device-url.js +215 -215
  41. package/test/unit/spec/wdm-dto.json +104 -104
@@ -1 +1 @@
1
- {"version":3,"names":["_ampersandState","_interopRequireDefault","require","_constants","_featureCollection","FeaturesModel","AmpState","extend","collections","developer","FeatureCollection","entitlement","user","clear","options","_this","_keys","default","attributes","forEach","key","unset","_children","_collections","reset","initialize","_this2","eventNames","eventName","FEATURE_COLLECTION_NAMES","collectionName","on","model","trigger","concat","_default","exports"],"sources":["features-model.js"],"sourcesContent":["// External dependencies.\nimport AmpState from 'ampersand-state';\n\n// Local Dependencies\nimport {FEATURE_COLLECTION_NAMES} from '../constants';\n\nimport FeatureCollection from './feature-collection';\n\n/**\n * Feature collection parent container.\n *\n * @description\n * This class contains all of the feature collection class objects to help\n * organize the data retrieved from the **wdm** service on device registration.\n */\nconst FeaturesModel = AmpState.extend({\n // Ampersand property members.\n\n collections: {\n /**\n * This collection contains the developer feature collection.\n *\n * @type {FeatureCollection}\n */\n developer: FeatureCollection,\n\n /**\n * This collection contains the entitlement feature collection.\n *\n * @type {FeatureCollection}\n */\n entitlement: FeatureCollection,\n\n /**\n * This collection contains the user feature collection.\n *\n * @type {FeatureCollection}\n */\n user: FeatureCollection,\n },\n\n // Helper method members.\n\n /**\n * Recursively clear attributes, children, and collections.\n *\n * @param {Object} options - Attribute options to unset.\n * @returns {this}\n */\n clear(options) {\n // Clear the ampersand attributes safely if there are any. This class should\n // never have any attributes.\n Object.keys(this.attributes).forEach((key) => {\n this.unset(key, options);\n });\n\n // Clear the ampersand children safely if there are any. This class should\n // never have any children.\n /* eslint-disable-next-line no-underscore-dangle */\n Object.keys(this._children).forEach((key) => {\n this[key].clear();\n });\n\n // Clear the ampersand collections safely.\n /* eslint-disable-next-line no-underscore-dangle */\n Object.keys(this._collections).forEach((key) => {\n this[key].reset();\n });\n\n return this;\n },\n\n // Ampersand method members.\n\n /**\n * Initializer method for FeatureModel class object.\n *\n * @override\n * @returns {void}\n */\n initialize() {\n // Declare the collection event names.\n const eventNames = ['change:value', 'add', 'remove'];\n\n // Initialize collection event listeners.\n eventNames.forEach((eventName) => {\n FEATURE_COLLECTION_NAMES.forEach((collectionName) => {\n this[collectionName].on(eventName, (model, options) => {\n this.trigger(`change:${collectionName}`, this, this[collectionName], options);\n });\n });\n });\n },\n});\n\nexport default FeaturesModel;\n"],"mappings":";;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AANA;;AAGA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMG,aAAa,GAAGC,uBAAQ,CAACC,MAAM,CAAC;EACpC;;EAEAC,WAAW,EAAE;IACX;AACJ;AACA;AACA;AACA;IACIC,SAAS,EAAEC,0BAAiB;IAE5B;AACJ;AACA;AACA;AACA;IACIC,WAAW,EAAED,0BAAiB;IAE9B;AACJ;AACA;AACA;AACA;IACIE,IAAI,EAAEF;EACR,CAAC;EAED;EAEA;AACF;AACA;AACA;AACA;AACA;EACEG,KAAK,WAAAA,MAACC,OAAO,EAAE;IAAA,IAAAC,KAAA;IACb;IACA;IACA,IAAAC,KAAA,CAAAC,OAAA,EAAY,IAAI,CAACC,UAAU,CAAC,CAACC,OAAO,CAAC,UAACC,GAAG,EAAK;MAC5CL,KAAI,CAACM,KAAK,CAACD,GAAG,EAAEN,OAAO,CAAC;IAC1B,CAAC,CAAC;;IAEF;IACA;IACA;IACA,IAAAE,KAAA,CAAAC,OAAA,EAAY,IAAI,CAACK,SAAS,CAAC,CAACH,OAAO,CAAC,UAACC,GAAG,EAAK;MAC3CL,KAAI,CAACK,GAAG,CAAC,CAACP,KAAK,EAAE;IACnB,CAAC,CAAC;;IAEF;IACA;IACA,IAAAG,KAAA,CAAAC,OAAA,EAAY,IAAI,CAACM,YAAY,CAAC,CAACJ,OAAO,CAAC,UAACC,GAAG,EAAK;MAC9CL,KAAI,CAACK,GAAG,CAAC,CAACI,KAAK,EAAE;IACnB,CAAC,CAAC;IAEF,OAAO,IAAI;EACb,CAAC;EAED;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,UAAU,WAAAA,WAAA,EAAG;IAAA,IAAAC,MAAA;IACX;IACA,IAAMC,UAAU,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC;;IAEpD;IACAA,UAAU,CAACR,OAAO,CAAC,UAACS,SAAS,EAAK;MAChCC,mCAAwB,CAACV,OAAO,CAAC,UAACW,cAAc,EAAK;QACnDJ,MAAI,CAACI,cAAc,CAAC,CAACC,EAAE,CAACH,SAAS,EAAE,UAACI,KAAK,EAAElB,OAAO,EAAK;UACrDY,MAAI,CAACO,OAAO,WAAAC,MAAA,CAAWJ,cAAc,GAAIJ,MAAI,EAAEA,MAAI,CAACI,cAAc,CAAC,EAAEhB,OAAO,CAAC;QAC/E,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;AACF,CAAC,CAAC;AAAC,IAAAqB,QAAA,GAEY9B,aAAa;AAAA+B,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"}
1
+ {"version":3,"names":["_ampersandState","_interopRequireDefault","require","_constants","_featureCollection","FeaturesModel","AmpState","extend","collections","developer","FeatureCollection","entitlement","user","clear","options","_this","_keys","default","attributes","forEach","key","unset","_children","_collections","reset","initialize","_this2","eventNames","eventName","FEATURE_COLLECTION_NAMES","collectionName","on","model","trigger","concat","_default","exports"],"sources":["features-model.js"],"sourcesContent":["// External dependencies.\r\nimport AmpState from 'ampersand-state';\r\n\r\n// Local Dependencies\r\nimport {FEATURE_COLLECTION_NAMES} from '../constants';\r\n\r\nimport FeatureCollection from './feature-collection';\r\n\r\n/**\r\n * Feature collection parent container.\r\n *\r\n * @description\r\n * This class contains all of the feature collection class objects to help\r\n * organize the data retrieved from the **wdm** service on device registration.\r\n */\r\nconst FeaturesModel = AmpState.extend({\r\n // Ampersand property members.\r\n\r\n collections: {\r\n /**\r\n * This collection contains the developer feature collection.\r\n *\r\n * @type {FeatureCollection}\r\n */\r\n developer: FeatureCollection,\r\n\r\n /**\r\n * This collection contains the entitlement feature collection.\r\n *\r\n * @type {FeatureCollection}\r\n */\r\n entitlement: FeatureCollection,\r\n\r\n /**\r\n * This collection contains the user feature collection.\r\n *\r\n * @type {FeatureCollection}\r\n */\r\n user: FeatureCollection,\r\n },\r\n\r\n // Helper method members.\r\n\r\n /**\r\n * Recursively clear attributes, children, and collections.\r\n *\r\n * @param {Object} options - Attribute options to unset.\r\n * @returns {this}\r\n */\r\n clear(options) {\r\n // Clear the ampersand attributes safely if there are any. This class should\r\n // never have any attributes.\r\n Object.keys(this.attributes).forEach((key) => {\r\n this.unset(key, options);\r\n });\r\n\r\n // Clear the ampersand children safely if there are any. This class should\r\n // never have any children.\r\n /* eslint-disable-next-line no-underscore-dangle */\r\n Object.keys(this._children).forEach((key) => {\r\n this[key].clear();\r\n });\r\n\r\n // Clear the ampersand collections safely.\r\n /* eslint-disable-next-line no-underscore-dangle */\r\n Object.keys(this._collections).forEach((key) => {\r\n this[key].reset();\r\n });\r\n\r\n return this;\r\n },\r\n\r\n // Ampersand method members.\r\n\r\n /**\r\n * Initializer method for FeatureModel class object.\r\n *\r\n * @override\r\n * @returns {void}\r\n */\r\n initialize() {\r\n // Declare the collection event names.\r\n const eventNames = ['change:value', 'add', 'remove'];\r\n\r\n // Initialize collection event listeners.\r\n eventNames.forEach((eventName) => {\r\n FEATURE_COLLECTION_NAMES.forEach((collectionName) => {\r\n this[collectionName].on(eventName, (model, options) => {\r\n this.trigger(`change:${collectionName}`, this, this[collectionName], options);\r\n });\r\n });\r\n });\r\n },\r\n});\r\n\r\nexport default FeaturesModel;\r\n"],"mappings":";;;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AANA;;AAGA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMG,aAAa,GAAGC,uBAAQ,CAACC,MAAM,CAAC;EACpC;;EAEAC,WAAW,EAAE;IACX;AACJ;AACA;AACA;AACA;IACIC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EA,MAAI,CAACI,cAAc,CAAC,EAAEhB,OAAO,CAAC;QAC/E,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;AACF,CAAC,CAAC;AAAC,IAAAqB,QAAA,GAEY9B,aAAa;AAAA+B,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_featureCollection","_interopRequireDefault","require","_featureModel","_featuresModel"],"sources":["index.js"],"sourcesContent":["import FeatureCollection from './feature-collection';\nimport FeatureModel from './feature-model';\nimport FeaturesModel from './features-model';\n\nexport {FeatureCollection, FeatureModel, FeaturesModel};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA"}
1
+ {"version":3,"names":["_featureCollection","_interopRequireDefault","require","_featureModel","_featuresModel"],"sources":["index.js"],"sourcesContent":["import FeatureCollection from './feature-collection';\r\nimport FeatureModel from './feature-model';\r\nimport FeaturesModel from './features-model';\r\n\r\nexport {FeatureCollection, FeatureModel, FeaturesModel};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA"}
package/dist/index.js CHANGED
@@ -65,10 +65,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
65
65
  interceptors: {
66
66
  DeviceUrlInterceptor: _deviceUrl.default.create
67
67
  },
68
- /**
69
- * Unregister the device in the case that the webex instance has logged out.
70
- *
71
- * @returns {Promise<undefined>}
68
+ /**
69
+ * Unregister the device in the case that the webex instance has logged out.
70
+ *
71
+ * @returns {Promise<undefined>}
72
72
  */
73
73
  onBeforeLogout: function onBeforeLogout() {
74
74
  return this.unregister();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["require","_webexCore","_device","_interopRequireDefault","_index","_deviceUrl","constants","_interopRequireWildcard","exports","_config","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","get","newObj","hasPropertyDescriptor","_Object$defineProperty","_Object$getOwnPropertyDescriptor","key","Object","prototype","hasOwnProperty","call","desc","set","registerInternalPlugin","Device","config","interceptors","DeviceUrlInterceptor","create","onBeforeLogout","unregister"],"sources":["index.js"],"sourcesContent":["// Internal dependencies.\n// Need to import metrics plugin for the devices to send metrics on succes/failure registration\nimport '@webex/internal-plugin-metrics';\nimport {registerInternalPlugin} from '@webex/webex-core';\n\n// Plugin dependencies.\nimport Device from './device';\nimport {FeatureCollection, FeatureModel, FeaturesModel} from './features/index';\nimport DeviceUrlInterceptor from './interceptors/device-url';\nimport * as constants from './constants';\nimport config from './config';\n\nregisterInternalPlugin('device', Device, {\n config,\n interceptors: {\n DeviceUrlInterceptor: DeviceUrlInterceptor.create,\n },\n /**\n * Unregister the device in the case that the webex instance has logged out.\n *\n * @returns {Promise<undefined>}\n */\n onBeforeLogout() {\n return this.unregister();\n },\n});\n\nexport {default} from './device';\nexport {config, constants, DeviceUrlInterceptor, FeatureCollection, FeatureModel, FeaturesModel};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEAA,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,SAAA,GAAAC,uBAAA,CAAAP,OAAA;AAAyCQ,OAAA,CAAAF,SAAA,GAAAA,SAAA;AACzC,IAAAG,OAAA,GAAAN,s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EAC7C,CAAC;EACD;AACF;AACA;AACA;AACA;EACEC,cAAc,WAAAA,eAAA,EAAG;IACf,OAAO,IAAI,CAACC,UAAU,EAAE;EAC1B;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["require","_webexCore","_device","_interopRequireDefault","_index","_deviceUrl","constants","_interopRequireWildcard","exports","_config","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","get","newObj","hasPropertyDescriptor","_Object$defineProperty","_Object$getOwnPropertyDescriptor","key","Object","prototype","hasOwnProperty","call","desc","set","registerInternalPlugin","Device","config","interceptors","DeviceUrlInterceptor","create","onBeforeLogout","unregister"],"sources":["index.js"],"sourcesContent":["// Internal dependencies.\r\n// Need to import metrics plugin for the devices to send metrics on succes/failure registration\r\nimport '@webex/internal-plugin-metrics';\r\nimport {registerInternalPlugin} from '@webex/webex-core';\r\n\r\n// Plugin dependencies.\r\nimport Device from './device';\r\nimport {FeatureCollection, FeatureModel, FeaturesModel} from './features/index';\r\nimport DeviceUrlInterceptor from './interceptors/device-url';\r\nimport * as constants from './constants';\r\nimport config from './config';\r\n\r\nregisterInternalPlugin('device', Device, {\r\n config,\r\n interceptors: {\r\n DeviceUrlInterceptor: DeviceUrlInterceptor.create,\r\n },\r\n /**\r\n * Unregister the device in the case that the webex instance has logged out.\r\n *\r\n * @returns {Promise<undefined>}\r\n */\r\n onBeforeLogout() {\r\n return this.unregister();\r\n },\r\n});\r\n\r\nexport {default} from './device';\r\nexport {config, constants, DeviceUrlInterceptor, FeatureCollection, FeatureModel, FeaturesModel};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEAA,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OA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CAAsB,EAAC,QAAQ,EAAEC,eAAM,EAAE;EACvCC,MAAM,EAANA,eAAM;EACNC,YAAY,EAAE;IACZC,oBAAoB,EAAEA,kBAAoB,CAACC;EAC7C,CAAC;EACD;AACF;AACA;AACA;AACA;EACEC,cAAc,WAAAA,eAAA,EAAG;IACf,OAAO,IAAI,CAACC,UAAU,EAAE;EAC1B;AACF,CAAC,CAAC"}
@@ -18,8 +18,8 @@ var _httpCore = require("@webex/http-core");
18
18
  var _constants = require("../constants");
19
19
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
20
20
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
21
- /**
22
- * Adds 'cisco-device-url' header, as appropriate, to requests
21
+ /**
22
+ * Adds 'cisco-device-url' header, as appropriate, to requests
23
23
  */
24
24
  var DeviceUrlInterceptor = /*#__PURE__*/function (_Interceptor) {
25
25
  (0, _inherits2.default)(DeviceUrlInterceptor, _Interceptor);
@@ -31,10 +31,10 @@ var DeviceUrlInterceptor = /*#__PURE__*/function (_Interceptor) {
31
31
  (0, _createClass2.default)(DeviceUrlInterceptor, [{
32
32
  key: "onRequest",
33
33
  value:
34
- /**
35
- * @see Interceptor#onRequest
36
- * @param {Object} options
37
- * @returns {Object}
34
+ /**
35
+ * @see Interceptor#onRequest
36
+ * @param {Object} options
37
+ * @returns {Object}
38
38
  */
39
39
  function onRequest(options) {
40
40
  var headers = options.headers,
@@ -76,8 +76,8 @@ var DeviceUrlInterceptor = /*#__PURE__*/function (_Interceptor) {
76
76
  }], [{
77
77
  key: "create",
78
78
  value:
79
- /**
80
- * @returns {DeviceUrlInterceptor}
79
+ /**
80
+ * @returns {DeviceUrlInterceptor}
81
81
  */
82
82
  function create() {
83
83
  /* eslint no-invalid-this: [0] */
@@ -1 +1 @@
1
- {"version":3,"names":["_httpCore","require","_constants","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","DeviceUrlInterceptor","_Interceptor","_inherits2","_super","_classCallCheck2","_createClass2","key","value","onRequest","options","headers","service","uri","_this$webex$internal","webex","internal","device","services","url","CISCO_DEVICE_URL","_promise","resolve","waitForService","then","_ref","getServiceFromUrl","serviceName","name","invalidServices","includes","_set2","concat","catch","error","message","match","reject","create","Interceptor","exports"],"sources":["device-url.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Interceptor} from '@webex/http-core';\nimport {set} from 'lodash';\n\nimport {CISCO_DEVICE_URL} from '../constants';\n\n/**\n * Adds 'cisco-device-url' header, as appropriate, to requests\n */\nexport default class DeviceUrlInterceptor extends Interceptor {\n /**\n * @returns {DeviceUrlInterceptor}\n */\n static create() {\n /* eslint no-invalid-this: [0] */\n return new DeviceUrlInterceptor({webex: this});\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n onRequest(options) {\n const {headers, service, uri} = options;\n const {device, services} = this.webex.internal;\n\n // Check if header is already set before moving forward\n if (!device.url || (headers && CISCO_DEVICE_URL in headers && !!headers[CISCO_DEVICE_URL])) {\n return Promise.resolve(options);\n }\n\n // Wait for catalog and service to be defined.\n return services\n .waitForService({service, url: uri})\n .then((url) => {\n // Grab the service name with the url returned from waitForService\n const {name: serviceName} = services.getServiceFromUrl(url) || {};\n const invalidServices = ['idbroker', 'oauth', 'saml'];\n\n // Check if service is not one of the invalid services\n // Assign the url to the device header\n if (serviceName && !invalidServices.includes(serviceName)) {\n set(options, `headers['${CISCO_DEVICE_URL}']`, device.url);\n }\n\n return options;\n })\n .catch((error) => {\n // Validate that the error came from getServiceFromUrl\n if (error.message.match(/was not found after waiting/)) {\n return options;\n }\n\n return Promise.reject(error);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAA8C,SAAAE,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA;AAE9C;AACA;AACA;AAFA,IAGqBC,oBAAoB,0BAAAC,YAAA;EAAA,IAAAC,UAAA,CAAAlB,OAAA,EAAAgB,oBAAA,EAAAC,YAAA;EAAA,IAAAE,MAAA,GAAA1B,YAAA,CAAAuB,oBAAA;EAAA,SAAAA,qBAAA;IAAA,IAAAI,gBAAA,CAAApB,OAAA,QAAAgB,oBAAA;IAAA,OAAAG,MAAA,CAAAb,KAAA,OAAAD,SAAA;EAAA;EAAA,IAAAgB,aAAA,CAAArB,OAAA,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,OAAO,CAACC,KAAK,CAAC,6BAA6B,CAAC,EAAE;UACtD,OAAO1B,OAAO;QAChB;QAEA,OAAOW,QAAA,CAAApC,OAAA,CAAQoD,MAAM,CAACH,KAAK,CAAC;MAC9B,CAAC,CAAC;IACN;EAAC;IAAA3B,GAAA;IAAAC,KAAA;IA9CD;AACF;AACA;IACE,SAAA8B,OAAA,EAAgB;MACd;MACA,OAAO,IAAIrC,oBAAoB,CAAC;QAACc,KAAK,EAAE;MAAI,CAAC,CAAC;IAChD;EAAC;EAAA,OAAAd,oBAAA;AAAA,EAP+CsC,qBAAW;AAAAC,OAAA,CAAAvD,OAAA,GAAAgB,oBAAA"}
1
+ {"version":3,"names":["_httpCore","require","_constants","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","DeviceUrlInterceptor","_Interceptor","_inherits2","_super","_classCallCheck2","_createClass2","key","value","onRequest","options","headers","service","uri","_this$webex$internal","webex","internal","device","services","url","CISCO_DEVICE_URL","_promise","resolve","waitForService","then","_ref","getServiceFromUrl","serviceName","name","invalidServices","includes","_set2","concat","catch","error","message","match","reject","create","Interceptor","exports"],"sources":["device-url.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\nimport {Interceptor} from '@webex/http-core';\r\nimport {set} from 'lodash';\r\n\r\nimport {CISCO_DEVICE_URL} from '../constants';\r\n\r\n/**\r\n * Adds 'cisco-device-url' header, as appropriate, to requests\r\n */\r\nexport default class DeviceUrlInterceptor extends Interceptor {\r\n /**\r\n * @returns {DeviceUrlInterceptor}\r\n */\r\n static create() {\r\n /* eslint no-invalid-this: [0] */\r\n return new DeviceUrlInterceptor({webex: this});\r\n }\r\n\r\n /**\r\n * @see Interceptor#onRequest\r\n * @param {Object} options\r\n * @returns {Object}\r\n */\r\n onRequest(options) {\r\n const {headers, service, uri} = options;\r\n const {device, services} = this.webex.internal;\r\n\r\n // Check if header is already set before moving forward\r\n if (!device.url || (headers && CISCO_DEVICE_URL in headers && !!headers[CISCO_DEVICE_URL])) {\r\n return Promise.resolve(options);\r\n }\r\n\r\n // Wait for catalog and service to be defined.\r\n return services\r\n .waitForService({service, url: uri})\r\n .then((url) => {\r\n // Grab the service name with the url returned from waitForService\r\n const {name: serviceName} = services.getServiceFromUrl(url) || {};\r\n const invalidServices = ['idbroker', 'oauth', 'saml'];\r\n\r\n // Check if service is not one of the invalid services\r\n // Assign the url to the device header\r\n if (serviceName && !invalidServices.includes(serviceName)) {\r\n set(options, `headers['${CISCO_DEVICE_URL}']`, device.url);\r\n }\r\n\r\n return options;\r\n })\r\n .catch((error) => {\r\n // Validate that the error came from getServiceFromUrl\r\n if (error.message.match(/was not found after waiting/)) {\r\n return options;\r\n }\r\n\r\n return Promise.reject(error);\r\n });\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAA8C,SAAAE,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC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X,IAAMC,eAAe,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;;QAErD;QACA;QACA,IAAIF,WAAW,IAAI,CAACE,eAAe,CAACC,QAAQ,CAACH,WAAW,CAAC,EAAE;UACzD,IAAAI,KAAA,CAAA9C,OAAA,EAAIyB,OAAO,cAAAsB,MAAA,CAAcZ,2BAAgB,SAAMH,MAAM,CAACE,GAAG,CAAC;QAC5D;QAEA,OAAOT,OAAO;MAChB,CAAC,CAAC,CACDuB,KAAK,CAAC,UAACC,KAAK,EAAK;QAChB;QACA,IAAIA,KAAK,CAACC,OAAO,CAACC,KAAK,CAAC,6BAA6B,CAAC,EAAE;UACtD,OAAO1B,OAAO;QAChB;QAEA,OAAOW,QAAA,CAAApC,OAAA,CAAQoD,MAAM,CAACH,KAAK,CAAC;MAC9B,CAAC,CAAC;IACN;EAAC;IAAA3B,GAAA;IAAAC,KAAA;IA9CD;AACF;AACA;IACE,SAAA8B,OAAA,EAAgB;MACd;MACA,OAAO,IAAIrC,oBAAoB,CAAC;QAACc,KAAK,EAAE;MAAI,CAAC,CAAC;IAChD;EAAC;EAAA,OAAAd,oBAAA;AAAA,EAP+CsC,qBAAW;AAAAC,OAAA,CAAAvD,OAAA,GAAAgB,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_default","JS_SDK_WDM_REGISTRATION_SUCCESSFUL","JS_SDK_WDM_REGISTRATION_FAILED","exports","default"],"sources":["metrics.js"],"sourcesContent":["// Metric to do with WDM registration\nexport default {\n JS_SDK_WDM_REGISTRATION_SUCCESSFUL: 'JS_SDK_WDM_REGISTRATION_SUCCESSFUL',\n JS_SDK_WDM_REGISTRATION_FAILED: 'JS_SDK_WDM_REGISTRATION_FAILED',\n};\n"],"mappings":";;;;;;;AAAA;AAAA,IAAAA,QAAA,GACe;EACbC,kCAAkC,EAAE,oCAAoC;EACxEC,8BAA8B,EAAE;AAClC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
1
+ {"version":3,"names":["_default","JS_SDK_WDM_REGISTRATION_SUCCESSFUL","JS_SDK_WDM_REGISTRATION_FAILED","exports","default"],"sources":["metrics.js"],"sourcesContent":["// Metric to do with WDM registration\r\nexport default {\r\n JS_SDK_WDM_REGISTRATION_SUCCESSFUL: 'JS_SDK_WDM_REGISTRATION_SUCCESSFUL',\r\n JS_SDK_WDM_REGISTRATION_FAILED: 'JS_SDK_WDM_REGISTRATION_FAILED',\r\n};\r\n"],"mappings":";;;;;;;AAAA;AAAA,IAAAA,QAAA,GACe;EACbC,kCAAkC,EAAE,oCAAoC;EACxEC,8BAA8B,EAAE;AAClC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
package/jest.config.js CHANGED
@@ -1,3 +1,3 @@
1
- const config = require('@webex/jest-config-legacy');
2
-
3
- module.exports = config;
1
+ const config = require('@webex/jest-config-legacy');
2
+
3
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "@webex/internal-plugin-device",
3
- "version": "2.59.2",
4
3
  "description": "",
5
4
  "license": "MIT",
6
5
  "author": "Timothy Scheuering <timsch@cisco.com>",
@@ -22,14 +21,14 @@
22
21
  },
23
22
  "devDependencies": {
24
23
  "@babel/core": "^7.17.10",
25
- "@webex/babel-config-legacy": "2.59.2",
26
- "@webex/eslint-config-legacy": "2.59.2",
27
- "@webex/jest-config-legacy": "2.59.2",
28
- "@webex/legacy-tools": "2.59.2",
29
- "@webex/test-helper-chai": "2.59.2",
30
- "@webex/test-helper-mocha": "2.59.2",
31
- "@webex/test-helper-mock-webex": "2.59.2",
32
- "@webex/test-helper-test-users": "2.59.2",
24
+ "@webex/babel-config-legacy": "^0.0.0",
25
+ "@webex/eslint-config-legacy": "^0.0.0",
26
+ "@webex/jest-config-legacy": "^0.0.0",
27
+ "@webex/legacy-tools": "^0.0.0",
28
+ "@webex/test-helper-chai": "^2.59.3-next.1",
29
+ "@webex/test-helper-mocha": "^2.59.3-next.1",
30
+ "@webex/test-helper-mock-webex": "^2.59.3-next.1",
31
+ "@webex/test-helper-test-users": "^2.59.3-next.1",
33
32
  "chai": "^4.3.4",
34
33
  "chai-as-promised": "^7.1.1",
35
34
  "eslint": "^8.24.0",
@@ -37,11 +36,11 @@
37
36
  "sinon": "^9.2.4"
38
37
  },
39
38
  "dependencies": {
40
- "@webex/common": "2.59.2",
41
- "@webex/common-timers": "2.59.2",
42
- "@webex/http-core": "2.59.2",
43
- "@webex/internal-plugin-metrics": "2.59.2",
44
- "@webex/webex-core": "2.59.2",
39
+ "@webex/common": "^2.59.3-next.1",
40
+ "@webex/common-timers": "^2.59.3-next.1",
41
+ "@webex/http-core": "^2.59.3-next.1",
42
+ "@webex/internal-plugin-metrics": "^2.59.3-next.1",
43
+ "@webex/webex-core": "^2.59.3-next.1",
45
44
  "ampersand-collection": "^2.0.2",
46
45
  "ampersand-state": "^5.0.3",
47
46
  "lodash": "^4.17.21"
@@ -49,10 +48,12 @@
49
48
  "scripts": {
50
49
  "build": "yarn build:src",
51
50
  "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
51
+ "deploy:npm": "yarn npm publish",
52
52
  "test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
53
53
  "test:browser": "webex-legacy-tools test --integration --unit --runner karma",
54
54
  "test:integration": "webex-legacy-tools test --integration --runner mocha",
55
55
  "test:style": "eslint ./src/**/*.*",
56
56
  "test:unit": "webex-legacy-tools test --unit --runner jest"
57
- }
58
- }
57
+ },
58
+ "version": "2.59.3-next.1"
59
+ }
package/process CHANGED
@@ -1 +1 @@
1
- module.exports = {browser: true};
1
+ module.exports = {browser: true};
package/src/config.js CHANGED
@@ -1,60 +1,60 @@
1
- import {inBrowser, deviceType} from '@webex/common';
2
-
3
- export default {
4
- device: {
5
- /**
6
- * The duration to wait for the catalog to populate in seconds.
7
- *
8
- * @type {number}
9
- */
10
- canRegisterWaitDuration: 10,
11
-
12
- /**
13
- * The default configuration group when sending registration requests.
14
- *
15
- * @type {Object}
16
- */
17
- defaults: {
18
- /**
19
- * The default body configuration of registration requests.
20
- *
21
- * @type {Object}
22
- */
23
- body: {
24
- name:
25
- (typeof process.title === 'string' ? process.title.trim() : undefined) ||
26
- (inBrowser && 'browser') ||
27
- 'javascript',
28
- deviceType: deviceType.WEB,
29
- model: 'web-js-sdk',
30
- localizedModel: 'webex-js-sdk',
31
- systemName: 'WEBEX_JS_SDK',
32
- systemVersion: '1.0.0',
33
- },
34
- },
35
-
36
- /**
37
- * When true, the **wdm** service will enforce an inactivity duration.
38
- *
39
- * @type {boolean}
40
- */
41
- enableInactivityEnforcement: false,
42
-
43
- /**
44
- * When true, the device registration will include a ttl value of
45
- * {@link config.device.ephemeralDeviceTTL} and refresh on an interval of
46
- * {@link config.device.ephemeralDeviceTTL} / 2 + 60 seconds.
47
- *
48
- * @type {boolean}
49
- */
50
- ephemeral: false,
51
-
52
- /**
53
- * The ttl value to include in device registration if
54
- * {@link config.device.ephemeral} is true. Measured in seconds.
55
- *
56
- * @type {boolean}
57
- */
58
- ephemeralDeviceTTL: 30 * 60,
59
- },
60
- };
1
+ import {inBrowser, deviceType} from '@webex/common';
2
+
3
+ export default {
4
+ device: {
5
+ /**
6
+ * The duration to wait for the catalog to populate in seconds.
7
+ *
8
+ * @type {number}
9
+ */
10
+ canRegisterWaitDuration: 10,
11
+
12
+ /**
13
+ * The default configuration group when sending registration requests.
14
+ *
15
+ * @type {Object}
16
+ */
17
+ defaults: {
18
+ /**
19
+ * The default body configuration of registration requests.
20
+ *
21
+ * @type {Object}
22
+ */
23
+ body: {
24
+ name:
25
+ (typeof process.title === 'string' ? process.title.trim() : undefined) ||
26
+ (inBrowser && 'browser') ||
27
+ 'javascript',
28
+ deviceType: deviceType.WEB,
29
+ model: 'web-js-sdk',
30
+ localizedModel: 'webex-js-sdk',
31
+ systemName: 'WEBEX_JS_SDK',
32
+ systemVersion: '1.0.0',
33
+ },
34
+ },
35
+
36
+ /**
37
+ * When true, the **wdm** service will enforce an inactivity duration.
38
+ *
39
+ * @type {boolean}
40
+ */
41
+ enableInactivityEnforcement: false,
42
+
43
+ /**
44
+ * When true, the device registration will include a ttl value of
45
+ * {@link config.device.ephemeralDeviceTTL} and refresh on an interval of
46
+ * {@link config.device.ephemeralDeviceTTL} / 2 + 60 seconds.
47
+ *
48
+ * @type {boolean}
49
+ */
50
+ ephemeral: false,
51
+
52
+ /**
53
+ * The ttl value to include in device registration if
54
+ * {@link config.device.ephemeral} is true. Measured in seconds.
55
+ *
56
+ * @type {boolean}
57
+ */
58
+ ephemeralDeviceTTL: 30 * 60,
59
+ },
60
+ };
package/src/constants.js CHANGED
@@ -1,23 +1,23 @@
1
- // Feature constants.
2
- export const FEATURE_COLLECTION_DEVELOPER = 'developer';
3
- export const FEATURE_COLLECTION_ENTITLEMENT = 'entitlement';
4
- export const FEATURE_COLLECTION_USER = 'user';
5
-
6
- export const CISCO_DEVICE_URL = 'cisco-device-url';
7
-
8
- export const FEATURE_COLLECTION_NAMES = [
9
- FEATURE_COLLECTION_DEVELOPER,
10
- FEATURE_COLLECTION_ENTITLEMENT,
11
- FEATURE_COLLECTION_USER,
12
- ];
13
-
14
- export const FEATURE_TYPES = {
15
- BOOLEAN: 'boolean',
16
- NUMBER: 'number',
17
- STRING: 'string',
18
- };
19
-
20
- // Device constants.
21
- export const DEVICE_EVENT_REGISTRATION_SUCCESS = 'registration:success';
22
-
23
- export const DEVICE_EVENTS = [DEVICE_EVENT_REGISTRATION_SUCCESS];
1
+ // Feature constants.
2
+ export const FEATURE_COLLECTION_DEVELOPER = 'developer';
3
+ export const FEATURE_COLLECTION_ENTITLEMENT = 'entitlement';
4
+ export const FEATURE_COLLECTION_USER = 'user';
5
+
6
+ export const CISCO_DEVICE_URL = 'cisco-device-url';
7
+
8
+ export const FEATURE_COLLECTION_NAMES = [
9
+ FEATURE_COLLECTION_DEVELOPER,
10
+ FEATURE_COLLECTION_ENTITLEMENT,
11
+ FEATURE_COLLECTION_USER,
12
+ ];
13
+
14
+ export const FEATURE_TYPES = {
15
+ BOOLEAN: 'boolean',
16
+ NUMBER: 'number',
17
+ STRING: 'string',
18
+ };
19
+
20
+ // Device constants.
21
+ export const DEVICE_EVENT_REGISTRATION_SUCCESS = 'registration:success';
22
+
23
+ export const DEVICE_EVENTS = [DEVICE_EVENT_REGISTRATION_SUCCESS];