@webex/plugin-meetings 3.12.0-next.46 → 3.12.0-next.48

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.
@@ -191,7 +191,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
191
191
  method: _constants.HTTP_VERBS.PUT
192
192
  });
193
193
  },
194
- version: "3.12.0-next.46"
194
+ version: "3.12.0-next.48"
195
195
  });
196
196
  var _default = exports.default = AIEnableRequest;
197
197
  //# sourceMappingURL=index.js.map
@@ -213,7 +213,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
213
213
  sessionId: this.sessionId
214
214
  });
215
215
  },
216
- version: "3.12.0-next.46"
216
+ version: "3.12.0-next.48"
217
217
  });
218
218
  var _default = exports.default = Breakout;
219
219
  //# sourceMappingURL=breakout.js.map
@@ -1109,7 +1109,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1109
1109
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1110
1110
  }
1111
1111
  },
1112
- version: "3.12.0-next.46"
1112
+ version: "3.12.0-next.48"
1113
1113
  });
1114
1114
  var _default = exports.default = Breakouts;
1115
1115
  //# sourceMappingURL=index.js.map
@@ -37,8 +37,10 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime-corejs2/h
37
37
  var _lodash = require("lodash");
38
38
  var _hashTree = _interopRequireDefault(require("./hashTree"));
39
39
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
40
- var _constants = require("../constants");
41
- var _constants2 = require("./constants");
40
+ var _metrics = _interopRequireDefault(require("../metrics"));
41
+ var _constants = _interopRequireDefault(require("../metrics/constants"));
42
+ var _constants2 = require("../constants");
43
+ var _constants3 = require("./constants");
42
44
  var _types = require("./types");
43
45
  var _utils = require("./utils");
44
46
  function ownKeys(e, r) { var t = _Object$keys4(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -67,8 +69,8 @@ var MeetingEndedError = exports.MeetingEndedError = /*#__PURE__*/function (_Erro
67
69
  /* Currently Locus always sends Metadata objects only in the "self" dataset.
68
70
  * If this ever changes, update all the code that relies on this constant.
69
71
  */
70
- var MetadataDataSetName = _constants2.DataSetNames.SELF;
71
- var PossibleSentinelMessageDataSetNames = [_constants2.DataSetNames.MAIN, _constants2.DataSetNames.SELF, _constants2.DataSetNames.UNJOINED];
72
+ var MetadataDataSetName = _constants3.DataSetNames.SELF;
73
+ var PossibleSentinelMessageDataSetNames = [_constants3.DataSetNames.MAIN, _constants3.DataSetNames.SELF, _constants3.DataSetNames.UNJOINED];
72
74
 
73
75
  /**
74
76
  * Parses hash tree eventing locus data
@@ -269,7 +271,7 @@ var HashTreeParser = /*#__PURE__*/function () {
269
271
  return _promise.default.resolve([]);
270
272
  }
271
273
  return this.webexRequest({
272
- method: _constants.HTTP_VERBS.GET,
274
+ method: _constants2.HTTP_VERBS.GET,
273
275
  uri: this.visibleDataSetsUrl
274
276
  }).then(function (response) {
275
277
  return response.body.dataSets;
@@ -379,7 +381,7 @@ var HashTreeParser = /*#__PURE__*/function () {
379
381
  }
380
382
  return _context4.abrupt("return");
381
383
  case 1:
382
- _iterator2 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(visibleDataSets, _constants2.DATA_SET_INIT_PRIORITY));
384
+ _iterator2 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(visibleDataSets, _constants3.DATA_SET_INIT_PRIORITY));
383
385
  _context4.prev = 2;
384
386
  _iterator2.s();
385
387
  case 3:
@@ -574,7 +576,7 @@ var HashTreeParser = /*#__PURE__*/function () {
574
576
  value: function isEndMessage(message) {
575
577
  var _this3 = this;
576
578
  return message.dataSets.some(function (dataSet) {
577
- if (dataSet.leafCount === 1 && dataSet.root === _constants2.EMPTY_HASH && (!_this3.dataSets[dataSet.name] || _this3.dataSets[dataSet.name].version < dataSet.version) && PossibleSentinelMessageDataSetNames.includes(dataSet.name.toLowerCase())) {
579
+ if (dataSet.leafCount === 1 && dataSet.root === _constants3.EMPTY_HASH && (!_this3.dataSets[dataSet.name] || _this3.dataSets[dataSet.name].version < dataSet.version) && PossibleSentinelMessageDataSetNames.includes(dataSet.name.toLowerCase())) {
578
580
  // this is a special way for Locus to indicate that this meeting has ended
579
581
  return true;
580
582
  }
@@ -801,6 +803,21 @@ var HashTreeParser = /*#__PURE__*/function () {
801
803
  }
802
804
  }
803
805
 
806
+ /**
807
+ * Updates the leaf count for a data set, resizing its hash tree accordingly.
808
+ *
809
+ * @param {InternalDataSet} dataSet - The data set to update
810
+ * @param {number} newLeafCount - The new leaf count
811
+ * @returns {void}
812
+ */
813
+ }, {
814
+ key: "updateDataSetLeafCount",
815
+ value: function updateDataSetLeafCount(dataSet, newLeafCount) {
816
+ var _dataSet$hashTree;
817
+ (_dataSet$hashTree = dataSet.hashTree) === null || _dataSet$hashTree === void 0 ? void 0 : _dataSet$hashTree.resize(newLeafCount);
818
+ dataSet.leafCount = newLeafCount;
819
+ }
820
+
804
821
  /**
805
822
  * Checks for changes in the visible data sets based on the updated objects.
806
823
  * @param {HashTreeObject[]} updatedObjects - The list of updated hash tree objects.
@@ -981,7 +998,7 @@ var HashTreeParser = /*#__PURE__*/function () {
981
998
  return this.getAllVisibleDataSetsFromLocus();
982
999
  case 2:
983
1000
  allDataSets = _context6.sent;
984
- _iterator7 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(addedDataSets, _constants2.DATA_SET_INIT_PRIORITY));
1001
+ _iterator7 = _createForOfIteratorHelper((0, _utils.sortByInitPriority)(addedDataSets, _constants3.DATA_SET_INIT_PRIORITY));
985
1002
  _context6.prev = 3;
986
1003
  _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
987
1004
  var ds, dataSetInfo;
@@ -1317,7 +1334,7 @@ var HashTreeParser = /*#__PURE__*/function () {
1317
1334
  return _context7.abrupt("return");
1318
1335
  case 5:
1319
1336
  receivedHashes = hashesResult.hashes;
1320
- hashTree.resize(hashesResult.dataSet.leafCount);
1337
+ this.updateDataSetLeafCount(dataSet, hashesResult.dataSet.leafCount);
1321
1338
  _context7.next = 8;
1322
1339
  break;
1323
1340
  case 6:
@@ -1529,7 +1546,7 @@ var HashTreeParser = /*#__PURE__*/function () {
1529
1546
  name: dataSet.name
1530
1547
  };
1531
1548
  });
1532
- sorted = (0, _utils.sortByInitPriority)(dataSetsWithHashTrees, _constants2.DATA_SET_INIT_PRIORITY);
1549
+ sorted = (0, _utils.sortByInitPriority)(dataSetsWithHashTrees, _constants3.DATA_SET_INIT_PRIORITY);
1533
1550
  _loggerProxy.default.logger.info("HashTreeParser#syncAllDatasets --> ".concat(this.debugId, " syncing datasets: ").concat(sorted.map(function (ds) {
1534
1551
  return ds.name;
1535
1552
  }).join(', ')));
@@ -1803,7 +1820,7 @@ var HashTreeParser = /*#__PURE__*/function () {
1803
1820
  var dataSet = this.dataSets[dataSetName];
1804
1821
  var url = "".concat(dataSet.url, "/hashtree");
1805
1822
  return this.webexRequest({
1806
- method: _constants.HTTP_VERBS.GET,
1823
+ method: _constants2.HTTP_VERBS.GET,
1807
1824
  uri: url,
1808
1825
  qs: {
1809
1826
  rootHash: currentRootHash
@@ -1829,6 +1846,13 @@ var HashTreeParser = /*#__PURE__*/function () {
1829
1846
  }).catch(function (error) {
1830
1847
  _loggerProxy.default.logger.error("HashTreeParser#getHashesFromLocus --> ".concat(_this12.debugId, " Error ").concat(error.statusCode, " fetching hashes for data set \"").concat(dataSetName, "\":"), error);
1831
1848
  _this12.checkForSentinelHttpResponse(error, dataSet.name);
1849
+ _metrics.default.sendBehavioralMetric(_constants.default.HASH_TREE_SYNC_FAILURE, {
1850
+ debugId: _this12.debugId,
1851
+ dataSetName: dataSetName,
1852
+ request: 'GET /hashtree',
1853
+ statusCode: error.statusCode,
1854
+ reason: error.message
1855
+ });
1832
1856
  throw error;
1833
1857
  });
1834
1858
  }
@@ -1867,9 +1891,9 @@ var HashTreeParser = /*#__PURE__*/function () {
1867
1891
  });
1868
1892
  });
1869
1893
  }
1870
- var ourCurrentRootHash = dataSet.hashTree ? dataSet.hashTree.getRootHash() : _constants2.EMPTY_HASH;
1894
+ var ourCurrentRootHash = dataSet.hashTree ? dataSet.hashTree.getRootHash() : _constants3.EMPTY_HASH;
1871
1895
  return this.webexRequest({
1872
- method: _constants.HTTP_VERBS.POST,
1896
+ method: _constants2.HTTP_VERBS.POST,
1873
1897
  uri: url,
1874
1898
  qs: {
1875
1899
  rootHash: ourCurrentRootHash
@@ -1885,6 +1909,13 @@ var HashTreeParser = /*#__PURE__*/function () {
1885
1909
  }).catch(function (error) {
1886
1910
  _loggerProxy.default.logger.error("HashTreeParser#sendSyncRequestToLocus --> ".concat(_this13.debugId, " Error ").concat(error.statusCode, " sending sync request for data set \"").concat(dataSet.name, "\":"), error);
1887
1911
  _this13.checkForSentinelHttpResponse(error, dataSet.name);
1912
+ _metrics.default.sendBehavioralMetric(_constants.default.HASH_TREE_SYNC_FAILURE, {
1913
+ debugId: _this13.debugId,
1914
+ dataSetName: dataSet.name,
1915
+ request: 'POST /sync',
1916
+ statusCode: error.statusCode,
1917
+ reason: error.message
1918
+ });
1888
1919
  throw error;
1889
1920
  });
1890
1921
  }