@webex/plugin-meetings 3.12.0-next.50 → 3.12.0-next.51
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/hashTree/hashTreeParser.js +54 -14
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +12 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +4 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/meetings/index.js +7 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +26 -5
- package/dist/types/locus-info/types.d.ts +4 -0
- package/dist/types/meetings/index.d.ts +2 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/hashTree/hashTreeParser.ts +64 -22
- package/src/locus-info/index.ts +15 -0
- package/src/locus-info/types.ts +6 -0
- package/src/meetings/index.ts +15 -10
- package/test/unit/spec/hashTree/hashTreeParser.ts +130 -32
- package/test/unit/spec/locus-info/index.js +32 -0
- package/test/unit/spec/meetings/index.js +34 -0
|
@@ -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.
|
|
194
|
+
version: "3.12.0-next.51"
|
|
195
195
|
});
|
|
196
196
|
var _default = exports.default = AIEnableRequest;
|
|
197
197
|
//# sourceMappingURL=index.js.map
|
package/dist/breakouts/index.js
CHANGED
|
@@ -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.
|
|
1112
|
+
version: "3.12.0-next.51"
|
|
1113
1113
|
});
|
|
1114
1114
|
var _default = exports.default = Breakouts;
|
|
1115
1115
|
//# sourceMappingURL=index.js.map
|
|
@@ -15,7 +15,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
|
|
|
15
15
|
_Object$defineProperty(exports, "__esModule", {
|
|
16
16
|
value: true
|
|
17
17
|
});
|
|
18
|
-
exports.default = exports.MeetingEndedError = exports.LocusInfoUpdateType = void 0;
|
|
18
|
+
exports.default = exports.MeetingEndedError = exports.LocusNotFoundError = exports.LocusInfoUpdateType = void 0;
|
|
19
19
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
20
20
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
21
21
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
@@ -42,6 +42,7 @@ var _constants = _interopRequireDefault(require("../metrics/constants"));
|
|
|
42
42
|
var _constants2 = require("../constants");
|
|
43
43
|
var _constants3 = require("./constants");
|
|
44
44
|
var _types = require("./types");
|
|
45
|
+
var _types2 = require("../locus-info/types");
|
|
45
46
|
var _utils = require("./utils");
|
|
46
47
|
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; }
|
|
47
48
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -52,7 +53,8 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
52
53
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
53
54
|
var LocusInfoUpdateType = exports.LocusInfoUpdateType = {
|
|
54
55
|
OBJECTS_UPDATED: 'OBJECTS_UPDATED',
|
|
55
|
-
MEETING_ENDED: 'MEETING_ENDED'
|
|
56
|
+
MEETING_ENDED: 'MEETING_ENDED',
|
|
57
|
+
LOCUS_NOT_FOUND: 'LOCUS_NOT_FOUND'
|
|
56
58
|
};
|
|
57
59
|
/**
|
|
58
60
|
* This error is thrown if we receive information that the meeting has ended while we're processing some hash messages.
|
|
@@ -66,6 +68,19 @@ var MeetingEndedError = exports.MeetingEndedError = /*#__PURE__*/function (_Erro
|
|
|
66
68
|
(0, _inherits2.default)(MeetingEndedError, _Error);
|
|
67
69
|
return (0, _createClass2.default)(MeetingEndedError);
|
|
68
70
|
}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
71
|
+
/**
|
|
72
|
+
* This error is thrown when a 404 is received from Locus hash tree endpoints, indicating that the locus URL
|
|
73
|
+
* is no longer valid (e.g. participant moved to a breakout room, or meeting ended).
|
|
74
|
+
* It's handled internally by HashTreeParser and results in LOCUS_NOT_FOUND being sent up.
|
|
75
|
+
*/
|
|
76
|
+
var LocusNotFoundError = exports.LocusNotFoundError = /*#__PURE__*/function (_Error2) {
|
|
77
|
+
function LocusNotFoundError() {
|
|
78
|
+
(0, _classCallCheck2.default)(this, LocusNotFoundError);
|
|
79
|
+
return _callSuper(this, LocusNotFoundError, arguments);
|
|
80
|
+
}
|
|
81
|
+
(0, _inherits2.default)(LocusNotFoundError, _Error2);
|
|
82
|
+
return (0, _createClass2.default)(LocusNotFoundError);
|
|
83
|
+
}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
69
84
|
/* Currently Locus always sends Metadata objects only in the "self" dataset.
|
|
70
85
|
* If this ever changes, update all the code that relies on this constant.
|
|
71
86
|
*/
|
|
@@ -613,6 +628,31 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
613
628
|
});
|
|
614
629
|
}
|
|
615
630
|
|
|
631
|
+
/**
|
|
632
|
+
* Handles known errors that can happen during syncs
|
|
633
|
+
*
|
|
634
|
+
* @param {any} error - The error to handle
|
|
635
|
+
* @returns {boolean} true if the error was recognized and handled, false otherwise
|
|
636
|
+
*/
|
|
637
|
+
}, {
|
|
638
|
+
key: "handleSyncErrors",
|
|
639
|
+
value: function handleSyncErrors(error) {
|
|
640
|
+
if (error instanceof MeetingEndedError) {
|
|
641
|
+
this.callLocusInfoUpdateCallback({
|
|
642
|
+
updateType: LocusInfoUpdateType.MEETING_ENDED
|
|
643
|
+
});
|
|
644
|
+
return true;
|
|
645
|
+
}
|
|
646
|
+
if (error instanceof LocusNotFoundError) {
|
|
647
|
+
this.callLocusInfoUpdateCallback({
|
|
648
|
+
updateType: LocusInfoUpdateType.LOCUS_NOT_FOUND
|
|
649
|
+
});
|
|
650
|
+
this.stop();
|
|
651
|
+
return true;
|
|
652
|
+
}
|
|
653
|
+
return false;
|
|
654
|
+
}
|
|
655
|
+
|
|
616
656
|
/**
|
|
617
657
|
* Asynchronously initializes new visible data sets
|
|
618
658
|
*
|
|
@@ -628,11 +668,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
628
668
|
}).join(', ')));
|
|
629
669
|
queueMicrotask(function () {
|
|
630
670
|
_this5.initializeNewVisibleDataSets(dataSetsRequiringInitialization).catch(function (error) {
|
|
631
|
-
if (error
|
|
632
|
-
_this5.callLocusInfoUpdateCallback({
|
|
633
|
-
updateType: LocusInfoUpdateType.MEETING_ENDED
|
|
634
|
-
});
|
|
635
|
-
} else {
|
|
671
|
+
if (!_this5.handleSyncErrors(error)) {
|
|
636
672
|
_loggerProxy.default.logger.warn("HashTreeParser#queueInitForNewVisibleDataSets --> ".concat(_this5.debugId, " error while initializing new visible datasets: ").concat(dataSetsRequiringInitialization.map(function (ds) {
|
|
637
673
|
return ds.name;
|
|
638
674
|
}).join(', '), ": "), error);
|
|
@@ -1401,11 +1437,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1401
1437
|
case 15:
|
|
1402
1438
|
_context7.prev = 15;
|
|
1403
1439
|
_t4 = _context7["catch"](2);
|
|
1404
|
-
if (_t4
|
|
1405
|
-
this.callLocusInfoUpdateCallback({
|
|
1406
|
-
updateType: LocusInfoUpdateType.MEETING_ENDED
|
|
1407
|
-
});
|
|
1408
|
-
} else {
|
|
1440
|
+
if (!this.handleSyncErrors(_t4)) {
|
|
1409
1441
|
_loggerProxy.default.logger.warn("HashTreeParser#performSync --> ".concat(this.debugId, " error during sync for data set \"").concat(dataSet.name, "\":"), _t4);
|
|
1410
1442
|
}
|
|
1411
1443
|
case 16:
|
|
@@ -1798,9 +1830,17 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1798
1830
|
key: "checkForSentinelHttpResponse",
|
|
1799
1831
|
value: function checkForSentinelHttpResponse(error, dataSetName) {
|
|
1800
1832
|
var _error$body;
|
|
1833
|
+
// 404 for any dataset means the locus is no longer available at this URL - could be replaced or ended
|
|
1834
|
+
// if a dataset is just not visible, we would get a 400
|
|
1835
|
+
if (error.statusCode === 404) {
|
|
1836
|
+
_loggerProxy.default.logger.info("HashTreeParser#checkForSentinelHttpResponse --> ".concat(this.debugId, " Received 404 for data set \"").concat(dataSetName, "\", locus not found"));
|
|
1837
|
+
this.stopAllTimers();
|
|
1838
|
+
throw new LocusNotFoundError();
|
|
1839
|
+
}
|
|
1801
1840
|
var isValidDataSetForSentinel = dataSetName === undefined || PossibleSentinelMessageDataSetNames.includes(dataSetName.toLowerCase());
|
|
1802
|
-
if (
|
|
1803
|
-
|
|
1841
|
+
if (error.statusCode === 409 && ((_error$body = error.body) === null || _error$body === void 0 ? void 0 : _error$body.errorCode) === _types2.LocusErrorCodes.LOCUS_INACTIVE && isValidDataSetForSentinel) {
|
|
1842
|
+
var _error$body2;
|
|
1843
|
+
_loggerProxy.default.logger.info("HashTreeParser#checkForSentinelHttpResponse --> ".concat(this.debugId, " Received ").concat(error.statusCode, "/").concat((_error$body2 = error.body) === null || _error$body2 === void 0 ? void 0 : _error$body2.errorCode, " for data set \"").concat(dataSetName, "\", indicating that the meeting has ended"));
|
|
1804
1844
|
this.stopAllTimers();
|
|
1805
1845
|
throw new MeetingEndedError();
|
|
1806
1846
|
}
|