@webex/plugin-meetings 3.12.0-llmrefactor.10 → 3.12.0-llmrefactor.12
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/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +200 -71
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meetings/index.js +20 -8
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/locus-info/index.d.ts +39 -1
- package/dist/types/meetings/index.d.ts +2 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +16 -16
- package/src/locus-info/index.ts +135 -35
- package/src/meetings/index.ts +32 -15
- package/test/unit/spec/locus-info/index.js +290 -0
- package/test/unit/spec/meetings/index.js +71 -24
|
@@ -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-llmrefactor.
|
|
194
|
+
version: "3.12.0-llmrefactor.12"
|
|
195
195
|
});
|
|
196
196
|
var _default = exports.default = AIEnableRequest;
|
|
197
197
|
//# sourceMappingURL=index.js.map
|
|
@@ -214,7 +214,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
|
|
|
214
214
|
sessionId: this.sessionId
|
|
215
215
|
});
|
|
216
216
|
},
|
|
217
|
-
version: "3.12.0-llmrefactor.
|
|
217
|
+
version: "3.12.0-llmrefactor.12"
|
|
218
218
|
});
|
|
219
219
|
var _default = exports.default = Breakout;
|
|
220
220
|
//# sourceMappingURL=breakout.js.map
|
package/dist/breakouts/index.js
CHANGED
|
@@ -1230,7 +1230,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1230
1230
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1231
1231
|
}
|
|
1232
1232
|
},
|
|
1233
|
-
version: "3.12.0-llmrefactor.
|
|
1233
|
+
version: "3.12.0-llmrefactor.12"
|
|
1234
1234
|
});
|
|
1235
1235
|
var _default = exports.default = Breakouts;
|
|
1236
1236
|
//# sourceMappingURL=index.js.map
|
|
@@ -381,7 +381,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
|
|
|
381
381
|
throw error;
|
|
382
382
|
});
|
|
383
383
|
},
|
|
384
|
-
version: "3.12.0-llmrefactor.
|
|
384
|
+
version: "3.12.0-llmrefactor.12"
|
|
385
385
|
});
|
|
386
386
|
var _default = exports.default = SimultaneousInterpretation;
|
|
387
387
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
|
|
|
18
18
|
languageCode: 'number',
|
|
19
19
|
languageName: 'string'
|
|
20
20
|
},
|
|
21
|
-
version: "3.12.0-llmrefactor.
|
|
21
|
+
version: "3.12.0-llmrefactor.12"
|
|
22
22
|
});
|
|
23
23
|
var _default = exports.default = SILanguage;
|
|
24
24
|
//# sourceMappingURL=siLanguage.js.map
|
package/dist/locus-info/index.js
CHANGED
|
@@ -21,9 +21,9 @@ exports.createLocusFromHashTreeMessage = createLocusFromHashTreeMessage;
|
|
|
21
21
|
exports.default = void 0;
|
|
22
22
|
exports.findMeetingForHashTreeMessage = findMeetingForHashTreeMessage;
|
|
23
23
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
24
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
25
24
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
26
25
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
26
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
27
27
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
28
28
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
29
29
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
@@ -303,23 +303,46 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
307
|
-
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
306
|
+
* Whether this meeting uses hash tree based Locus (as opposed to a classic, delta based Locus).
|
|
308
307
|
*
|
|
309
|
-
* @
|
|
310
|
-
* @param {boolean} isLocusUrlChanged
|
|
311
|
-
* @param {Locus} locus
|
|
312
|
-
* @returns {undefined}
|
|
308
|
+
* @returns {boolean}
|
|
313
309
|
*/
|
|
314
310
|
(0, _inherits2.default)(LocusInfo, _EventsScope);
|
|
315
311
|
return (0, _createClass2.default)(LocusInfo, [{
|
|
312
|
+
key: "isUsingHashTrees",
|
|
313
|
+
value: function isUsingHashTrees() {
|
|
314
|
+
return this.hashTreeParsers.size > 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
319
|
+
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
320
|
+
*
|
|
321
|
+
* @param {Meeting} meeting
|
|
322
|
+
* @param {boolean} isLocusUrlChanged
|
|
323
|
+
* @param {Locus} locus
|
|
324
|
+
* @param {Object} [options]
|
|
325
|
+
* @param {boolean} [options.destroyOnTransientFailure=true] controls what happens on a *transient*
|
|
326
|
+
* sync failure (a terminal failure, e.g. a 403 meaning the meeting has ended, always destroys
|
|
327
|
+
* the meeting regardless of this flag). When true, a transient failure destroys the meeting and
|
|
328
|
+
* the returned promise still resolves. When false, the meeting is preserved and the returned
|
|
329
|
+
* promise rejects so the caller can retry.
|
|
330
|
+
* @returns {Promise} resolves once the fetched DTO has been applied; see destroyOnTransientFailure
|
|
331
|
+
* for the failure behavior
|
|
332
|
+
*/
|
|
333
|
+
}, {
|
|
316
334
|
key: "doLocusSync",
|
|
317
335
|
value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
|
|
318
336
|
var _this$locusParser$wor,
|
|
319
337
|
_this2 = this;
|
|
338
|
+
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
339
|
+
_ref$destroyOnTransie = _ref.destroyOnTransientFailure,
|
|
340
|
+
destroyOnTransientFailure = _ref$destroyOnTransie === void 0 ? true : _ref$destroyOnTransie;
|
|
320
341
|
var url;
|
|
321
342
|
var isDelta = false;
|
|
322
343
|
var meetingDestroyed = false;
|
|
344
|
+
// whether the DTO fetch itself failed (as opposed to applying a successfully fetched DTO)
|
|
345
|
+
var fetchFailed = false;
|
|
323
346
|
if (isLocusUrlChanged) {
|
|
324
347
|
// for the locus url changed case from breakout to main session, we should always do a full sync, in this case, the url from locus is always on main session,
|
|
325
348
|
// so use the main session locus url to get the full locus(full participants list in the response).
|
|
@@ -334,8 +357,28 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
334
357
|
}
|
|
335
358
|
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
|
|
336
359
|
|
|
337
|
-
//
|
|
338
|
-
meeting
|
|
360
|
+
// Called once the DTO fetch (delta plus any full-sync fallback) has failed and we're giving up.
|
|
361
|
+
// The meeting is destroyed when either the delta-processing path asked for it, or the failure is
|
|
362
|
+
// terminal (e.g. a 403 meaning the meeting has ended) - in both cases there's nothing left to
|
|
363
|
+
// sync or retry, so the trailing catch below swallows the rejection whenever meetingDestroyed is
|
|
364
|
+
// set. On the caller-driven reconnection path a non-terminal failure preserves the meeting and
|
|
365
|
+
// lets the rejection propagate so the caller can retry.
|
|
366
|
+
var onFetchFailure = function onFetchFailure(error, logMessage) {
|
|
367
|
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
368
|
+
_ref2$terminal = _ref2.terminal,
|
|
369
|
+
terminal = _ref2$terminal === void 0 ? false : _ref2$terminal;
|
|
370
|
+
// terminal failures always destroy the meeting; destroyOnTransientFailure only controls the
|
|
371
|
+
// non-terminal case
|
|
372
|
+
var destroyMeeting = terminal || destroyOnTransientFailure;
|
|
373
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> ".concat(logMessage).concat(destroyMeeting ? ', destroying the meeting' : ''));
|
|
374
|
+
fetchFailed = true;
|
|
375
|
+
if (destroyMeeting) {
|
|
376
|
+
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
|
377
|
+
meetingDestroyed = true;
|
|
378
|
+
}
|
|
379
|
+
throw error;
|
|
380
|
+
};
|
|
381
|
+
return meeting.meetingRequest.getLocusDTO({
|
|
339
382
|
url: url
|
|
340
383
|
}).catch(function (e) {
|
|
341
384
|
if (isDelta) {
|
|
@@ -355,19 +398,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
355
398
|
return meeting.meetingRequest.getLocusDTO({
|
|
356
399
|
url: meeting.locusUrl
|
|
357
400
|
}).catch(function (err) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
401
|
+
return (
|
|
402
|
+
// A 403 from the fallback full sync is also terminal (meeting has ended), so remove the
|
|
403
|
+
// meeting even on the reconnection path instead of preserving it and rejecting.
|
|
404
|
+
onFetchFailure(err, 'fallback full sync failed', {
|
|
405
|
+
terminal: err.statusCode === 403
|
|
406
|
+
})
|
|
407
|
+
);
|
|
362
408
|
});
|
|
363
409
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
410
|
+
|
|
411
|
+
// A 403 means the meeting has ended - this is terminal, so remove the meeting even on the
|
|
412
|
+
// reconnection path (there's nothing to retry) instead of preserving it and rejecting.
|
|
413
|
+
return onFetchFailure(e, 'got 403 from Locus, skipping fallback to full sync', {
|
|
414
|
+
terminal: true
|
|
415
|
+
});
|
|
367
416
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
417
|
+
return onFetchFailure(e, 'full sync failed', {
|
|
418
|
+
terminal: e.statusCode === 403
|
|
419
|
+
});
|
|
371
420
|
}).then(function (res) {
|
|
372
421
|
if ((0, _lodash.isEmpty)(res.body)) {
|
|
373
422
|
if (isDelta) {
|
|
@@ -387,15 +436,27 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
387
436
|
}
|
|
388
437
|
meeting.locusInfo.onFullLocus('classic Locus sync', res.body);
|
|
389
438
|
}).catch(function (e) {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
439
|
+
if (!fetchFailed) {
|
|
440
|
+
// The DTO was fetched successfully but applying it failed. Retrying wouldn't help - it
|
|
441
|
+
// would re-fetch and re-apply the same unprocessable DTO and fail identically - so log and
|
|
442
|
+
// resume (swallow the error) instead of propagating it. Propagating here would make the
|
|
443
|
+
// reconnection flow (which treats a rejection as retryable) retry indefinitely.
|
|
444
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> getLocusDTO succeeded but failed to handle result, locus parser will resume but not all data may be synced (".concat(e.toString(), ")"));
|
|
445
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_SYNC_HANDLING_FAILED, {
|
|
446
|
+
correlationId: meeting.correlationId,
|
|
447
|
+
url: url,
|
|
448
|
+
reason: e.message,
|
|
449
|
+
errorName: e.name,
|
|
450
|
+
stack: e.stack,
|
|
451
|
+
code: e.code
|
|
452
|
+
});
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (!destroyOnTransientFailure && !meetingDestroyed) {
|
|
456
|
+
// caller-driven sync (e.g. reconnection): propagate a transient fetch failure so it can be
|
|
457
|
+
// retried. If the meeting was destroyed (terminal failure), there's nothing to retry.
|
|
458
|
+
throw e;
|
|
459
|
+
}
|
|
399
460
|
}).finally(function () {
|
|
400
461
|
if (!meetingDestroyed) {
|
|
401
462
|
// Notify parser to resume processing delta events.
|
|
@@ -405,6 +466,73 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
405
466
|
});
|
|
406
467
|
}
|
|
407
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Syncs this meeting's Locus state (e.g. after a network reconnection), routing to whichever
|
|
471
|
+
* mechanism the meeting uses (a meeting only ever uses one): hash tree datasets via
|
|
472
|
+
* syncAllHashTreeDatasets() or a standalone Locus DTO fetch for classic meetings.
|
|
473
|
+
* A transient failure preserves the meeting (so the caller can retry); only a terminal failure
|
|
474
|
+
* (e.g. a 403 meaning the meeting has ended) destroys it.
|
|
475
|
+
*
|
|
476
|
+
* The classic path is only needed when Meetings#syncMeetings() can't do its usual
|
|
477
|
+
* getActiveMeetings() fetch (e.g. unverified guests, for whom Locus rejects that call); signed-in
|
|
478
|
+
* users resync classic meetings via getActiveMeetings() and pass canSyncClassicLocus as false.
|
|
479
|
+
*
|
|
480
|
+
* @param {Meeting} meeting
|
|
481
|
+
* @param {Object} options
|
|
482
|
+
* @param {boolean} options.canSyncClassicLocus - whether this sync is allowed to fetch a
|
|
483
|
+
* standalone Locus DTO for classic meetings
|
|
484
|
+
* @param {boolean} options.canSyncHashTree - whether this sync is allowed to sync hash tree
|
|
485
|
+
* datasets for hash tree based meetings
|
|
486
|
+
* @returns {Promise<void>} resolves once the sync (hash tree or classic) completes; for the
|
|
487
|
+
* classic path it rejects only on a transient failure, so the caller can retry (a terminal
|
|
488
|
+
* failure destroys the meeting and resolves)
|
|
489
|
+
*/
|
|
490
|
+
}, {
|
|
491
|
+
key: "sync",
|
|
492
|
+
value: (function () {
|
|
493
|
+
var _sync = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(meeting, _ref3) {
|
|
494
|
+
var canSyncClassicLocus, canSyncHashTree;
|
|
495
|
+
return _regenerator.default.wrap(function (_context) {
|
|
496
|
+
while (1) switch (_context.prev = _context.next) {
|
|
497
|
+
case 0:
|
|
498
|
+
canSyncClassicLocus = _ref3.canSyncClassicLocus, canSyncHashTree = _ref3.canSyncHashTree;
|
|
499
|
+
if (!this.isUsingHashTrees()) {
|
|
500
|
+
_context.next = 2;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
if (!canSyncHashTree) {
|
|
504
|
+
_context.next = 1;
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
_context.next = 1;
|
|
508
|
+
return this.syncAllHashTreeDatasets();
|
|
509
|
+
case 1:
|
|
510
|
+
return _context.abrupt("return");
|
|
511
|
+
case 2:
|
|
512
|
+
if (!(canSyncClassicLocus && meeting.locusUrl)) {
|
|
513
|
+
_context.next = 3;
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
// Pause the parser so in-flight deltas don't race the DTO fetch; doLocusSync() resumes it.
|
|
517
|
+
this.locusParser.pause();
|
|
518
|
+
// destroyOnTransientFailure: false so a transient failure preserves the meeting and rejects,
|
|
519
|
+
// letting the reconnection flow retry instead of tearing the meeting down. A terminal failure
|
|
520
|
+
// (e.g. a 403 meaning the meeting has ended) still destroys the meeting.
|
|
521
|
+
_context.next = 3;
|
|
522
|
+
return this.doLocusSync(meeting, false, undefined, {
|
|
523
|
+
destroyOnTransientFailure: false
|
|
524
|
+
});
|
|
525
|
+
case 3:
|
|
526
|
+
case "end":
|
|
527
|
+
return _context.stop();
|
|
528
|
+
}
|
|
529
|
+
}, _callee, this);
|
|
530
|
+
}));
|
|
531
|
+
function sync(_x, _x2) {
|
|
532
|
+
return _sync.apply(this, arguments);
|
|
533
|
+
}
|
|
534
|
+
return sync;
|
|
535
|
+
}()
|
|
408
536
|
/**
|
|
409
537
|
* Apply locus delta data to meeting
|
|
410
538
|
* @param {string} action Locus delta action
|
|
@@ -412,6 +540,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
412
540
|
* @param {Meeting} meeting
|
|
413
541
|
* @returns {undefined}
|
|
414
542
|
*/
|
|
543
|
+
)
|
|
415
544
|
}, {
|
|
416
545
|
key: "applyLocusDeltaData",
|
|
417
546
|
value: function applyLocusDeltaData(action, locus, meeting) {
|
|
@@ -529,15 +658,15 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
529
658
|
*/
|
|
530
659
|
}, {
|
|
531
660
|
key: "createHashTreeParser",
|
|
532
|
-
value: function createHashTreeParser(
|
|
661
|
+
value: function createHashTreeParser(_ref4) {
|
|
533
662
|
var _this4 = this,
|
|
534
663
|
_locusUrl$split,
|
|
535
664
|
_locusUrl$split$pop,
|
|
536
665
|
_this$webex$config$me;
|
|
537
|
-
var locusUrl =
|
|
538
|
-
initialLocus =
|
|
539
|
-
metadata =
|
|
540
|
-
replacedAt =
|
|
666
|
+
var locusUrl = _ref4.locusUrl,
|
|
667
|
+
initialLocus = _ref4.initialLocus,
|
|
668
|
+
metadata = _ref4.metadata,
|
|
669
|
+
replacedAt = _ref4.replacedAt;
|
|
541
670
|
var parser = new _hashTreeParser2.default({
|
|
542
671
|
initialLocus: initialLocus,
|
|
543
672
|
metadata: metadata,
|
|
@@ -606,19 +735,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
606
735
|
}, {
|
|
607
736
|
key: "initialSetup",
|
|
608
737
|
value: (function () {
|
|
609
|
-
var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
738
|
+
var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(data, onLocusSynced) {
|
|
610
739
|
var _data$locus, _data$locus$links, _data$locus$links$res, _data$locus$links$res2;
|
|
611
740
|
var initialFullLocus, _data$hashTreeMessage, _metadataObject$data, metadataObject, hashTreeParser, _hashTreeParser, _t;
|
|
612
|
-
return _regenerator.default.wrap(function (
|
|
613
|
-
while (1) switch (
|
|
741
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
742
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
614
743
|
case 0:
|
|
615
744
|
initialFullLocus = null;
|
|
616
745
|
_t = data.trigger;
|
|
617
|
-
|
|
746
|
+
_context2.next = _t === 'locus-message' ? 1 : _t === 'join-response' ? 6 : _t === 'get-loci-response' ? 7 : 10;
|
|
618
747
|
break;
|
|
619
748
|
case 1:
|
|
620
749
|
if (!data.hashTreeMessage) {
|
|
621
|
-
|
|
750
|
+
_context2.next = 4;
|
|
622
751
|
break;
|
|
623
752
|
}
|
|
624
753
|
// we need the Metadata object to be in the received message, because it contains visibleDataSets
|
|
@@ -627,7 +756,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
627
756
|
return (0, _utils.isMetadata)(el);
|
|
628
757
|
});
|
|
629
758
|
if (metadataObject !== null && metadataObject !== void 0 && (_metadataObject$data = metadataObject.data) !== null && _metadataObject$data !== void 0 && _metadataObject$data.visibleDataSets) {
|
|
630
|
-
|
|
759
|
+
_context2.next = 2;
|
|
631
760
|
break;
|
|
632
761
|
}
|
|
633
762
|
// this is a common case (not an error)
|
|
@@ -650,25 +779,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
650
779
|
visibleDataSets: metadataObject.data.visibleDataSets
|
|
651
780
|
}
|
|
652
781
|
}); // now handle the message - that should populate all the visible datasets
|
|
653
|
-
|
|
782
|
+
_context2.next = 3;
|
|
654
783
|
return hashTreeParser.initializeFromMessage(data.hashTreeMessage);
|
|
655
784
|
case 3:
|
|
656
|
-
|
|
785
|
+
_context2.next = 5;
|
|
657
786
|
break;
|
|
658
787
|
case 4:
|
|
659
788
|
// "classic" Locus case, no hash trees involved
|
|
660
789
|
this.updateLocusCache(data.locus);
|
|
661
790
|
this.onFullLocus('classic locus message', data.locus, undefined);
|
|
662
791
|
case 5:
|
|
663
|
-
return
|
|
792
|
+
return _context2.abrupt("continue", 10);
|
|
664
793
|
case 6:
|
|
665
794
|
this.updateLocusCache(data.locus);
|
|
666
795
|
this.onFullLocus('join response', data.locus, undefined, data.dataSets, data.metadata);
|
|
667
796
|
initialFullLocus = data.locus;
|
|
668
|
-
return
|
|
797
|
+
return _context2.abrupt("continue", 10);
|
|
669
798
|
case 7:
|
|
670
799
|
if (!((_data$locus = data.locus) !== null && _data$locus !== void 0 && (_data$locus$links = _data$locus.links) !== null && _data$locus$links !== void 0 && (_data$locus$links$res = _data$locus$links.resources) !== null && _data$locus$links$res !== void 0 && (_data$locus$links$res2 = _data$locus$links$res.visibleDataSets) !== null && _data$locus$links$res2 !== void 0 && _data$locus$links$res2.url)) {
|
|
671
|
-
|
|
800
|
+
_context2.next = 9;
|
|
672
801
|
break;
|
|
673
802
|
}
|
|
674
803
|
_loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from get-loci-response');
|
|
@@ -681,10 +810,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
681
810
|
},
|
|
682
811
|
metadata: null // get-loci-response doesn't contain Metadata object
|
|
683
812
|
}); // now initialize all the data
|
|
684
|
-
|
|
813
|
+
_context2.next = 8;
|
|
685
814
|
return _hashTreeParser.initializeFromGetLociResponse(data.locus);
|
|
686
815
|
case 8:
|
|
687
|
-
|
|
816
|
+
_context2.next = 10;
|
|
688
817
|
break;
|
|
689
818
|
case 9:
|
|
690
819
|
// "classic" Locus case, no hash trees involved
|
|
@@ -704,11 +833,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
704
833
|
this.emitChange = true;
|
|
705
834
|
case 11:
|
|
706
835
|
case "end":
|
|
707
|
-
return
|
|
836
|
+
return _context2.stop();
|
|
708
837
|
}
|
|
709
|
-
},
|
|
838
|
+
}, _callee2, this);
|
|
710
839
|
}));
|
|
711
|
-
function initialSetup(
|
|
840
|
+
function initialSetup(_x3, _x4) {
|
|
712
841
|
return _initialSetup.apply(this, arguments);
|
|
713
842
|
}
|
|
714
843
|
return initialSetup;
|
|
@@ -750,7 +879,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
750
879
|
var locusUrl = isWrapped ? (_responseBody$locus = responseBody.locus) === null || _responseBody$locus === void 0 ? void 0 : _responseBody$locus.url : responseBody.url;
|
|
751
880
|
var hashTreeParserEntry = locusUrl && this.hashTreeParsers.get(locusUrl);
|
|
752
881
|
var locus = isWrapped ? responseBody.locus : responseBody;
|
|
753
|
-
if (this.
|
|
882
|
+
if (this.isUsingHashTrees()) {
|
|
754
883
|
// We are in hash tree mode. Check if we need to create/reactivate a parser for this locusUrl.
|
|
755
884
|
if (!hashTreeParserEntry || hashTreeParserEntry.parser.state === 'stopped') {
|
|
756
885
|
if (!locusUrl) {
|
|
@@ -1135,52 +1264,52 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1135
1264
|
}, {
|
|
1136
1265
|
key: "syncAllHashTreeDatasets",
|
|
1137
1266
|
value: (function () {
|
|
1138
|
-
var _syncAllHashTreeDatasets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1267
|
+
var _syncAllHashTreeDatasets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
1139
1268
|
var options,
|
|
1140
1269
|
_iterator3,
|
|
1141
1270
|
_step3,
|
|
1142
1271
|
_step3$value,
|
|
1143
1272
|
entry,
|
|
1144
|
-
|
|
1273
|
+
_args3 = arguments,
|
|
1145
1274
|
_t2;
|
|
1146
|
-
return _regenerator.default.wrap(function (
|
|
1147
|
-
while (1) switch (
|
|
1275
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
1276
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1148
1277
|
case 0:
|
|
1149
|
-
options =
|
|
1278
|
+
options = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
1150
1279
|
_iterator3 = _createForOfIteratorHelper(this.hashTreeParsers);
|
|
1151
|
-
|
|
1280
|
+
_context3.prev = 1;
|
|
1152
1281
|
_iterator3.s();
|
|
1153
1282
|
case 2:
|
|
1154
1283
|
if ((_step3 = _iterator3.n()).done) {
|
|
1155
|
-
|
|
1284
|
+
_context3.next = 4;
|
|
1156
1285
|
break;
|
|
1157
1286
|
}
|
|
1158
1287
|
_step3$value = (0, _slicedToArray2.default)(_step3.value, 2), entry = _step3$value[1];
|
|
1159
1288
|
if (!entry.parser) {
|
|
1160
|
-
|
|
1289
|
+
_context3.next = 3;
|
|
1161
1290
|
break;
|
|
1162
1291
|
}
|
|
1163
|
-
|
|
1292
|
+
_context3.next = 3;
|
|
1164
1293
|
return entry.parser.syncAllDatasets(options);
|
|
1165
1294
|
case 3:
|
|
1166
|
-
|
|
1295
|
+
_context3.next = 2;
|
|
1167
1296
|
break;
|
|
1168
1297
|
case 4:
|
|
1169
|
-
|
|
1298
|
+
_context3.next = 6;
|
|
1170
1299
|
break;
|
|
1171
1300
|
case 5:
|
|
1172
|
-
|
|
1173
|
-
_t2 =
|
|
1301
|
+
_context3.prev = 5;
|
|
1302
|
+
_t2 = _context3["catch"](1);
|
|
1174
1303
|
_iterator3.e(_t2);
|
|
1175
1304
|
case 6:
|
|
1176
|
-
|
|
1305
|
+
_context3.prev = 6;
|
|
1177
1306
|
_iterator3.f();
|
|
1178
|
-
return
|
|
1307
|
+
return _context3.finish(6);
|
|
1179
1308
|
case 7:
|
|
1180
1309
|
case "end":
|
|
1181
|
-
return
|
|
1310
|
+
return _context3.stop();
|
|
1182
1311
|
}
|
|
1183
|
-
},
|
|
1312
|
+
}, _callee3, this, [[1, 5, 6, 7]]);
|
|
1184
1313
|
}));
|
|
1185
1314
|
function syncAllHashTreeDatasets() {
|
|
1186
1315
|
return _syncAllHashTreeDatasets.apply(this, arguments);
|
|
@@ -1317,7 +1446,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1317
1446
|
}, {
|
|
1318
1447
|
key: "parse",
|
|
1319
1448
|
value: function parse(meeting, data) {
|
|
1320
|
-
if (this.
|
|
1449
|
+
if (this.isUsingHashTrees()) {
|
|
1321
1450
|
if (data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS) {
|
|
1322
1451
|
// sync meetings response follows the format of "not wrapped" locus API responses,
|
|
1323
1452
|
// so has no dataSets nor Metadata
|
|
@@ -2235,9 +2364,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2235
2364
|
key: "updateLinks",
|
|
2236
2365
|
value: function updateLinks(links) {
|
|
2237
2366
|
var _this$links, _this$links2;
|
|
2238
|
-
var
|
|
2239
|
-
services =
|
|
2240
|
-
resources =
|
|
2367
|
+
var _ref5 = links || {},
|
|
2368
|
+
services = _ref5.services,
|
|
2369
|
+
resources = _ref5.resources;
|
|
2241
2370
|
if (services && !(0, _lodash.isEqual)((_this$links = this.links) === null || _this$links === void 0 ? void 0 : _this$links.services, services)) {
|
|
2242
2371
|
this.emitScoped({
|
|
2243
2372
|
file: 'locus-info',
|