@atlaskit/collab-provider 9.41.0 → 9.41.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/channel.js +115 -192
- package/dist/cjs/document/document-service.js +149 -221
- package/dist/cjs/provider/index.js +1 -1
- package/dist/cjs/types.js +0 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/channel.js +0 -47
- package/dist/es2019/document/document-service.js +57 -111
- package/dist/es2019/provider/index.js +1 -1
- package/dist/es2019/types.js +0 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/channel.js +115 -192
- package/dist/esm/document/document-service.js +149 -221
- package/dist/esm/provider/index.js +1 -1
- package/dist/esm/types.js +0 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/channel.d.ts +1 -2
- package/dist/types/document/document-service.d.ts +2 -14
- package/dist/types/types.d.ts +1 -18
- package/dist/types-ts4.5/channel.d.ts +1 -2
- package/dist/types-ts4.5/document/document-service.d.ts +2 -14
- package/dist/types-ts4.5/types.d.ts +1 -18
- package/package.json +1 -1
- package/dist/cjs/document/catchup.js +0 -183
- package/dist/es2019/document/catchup.js +0 -141
- package/dist/esm/document/catchup.js +0 -174
- package/dist/types/document/catchup.d.ts +0 -15
- package/dist/types-ts4.5/document/catchup.d.ts +0 -15
package/dist/esm/channel.js
CHANGED
|
@@ -222,19 +222,21 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
222
222
|
_this.emit('steps:added', data);
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
226
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fromVersion, clientId) {
|
|
227
|
-
var _yield$utils$requestS,
|
|
225
|
+
_defineProperty(_assertThisInitialized(_this), "fetchCatchupv2", /*#__PURE__*/function () {
|
|
226
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fromVersion, clientId, catchUpOutofSync, reason) {
|
|
227
|
+
var _yield$utils$requestS, steps, metadata, errorNotFound, errorCatchupv2;
|
|
228
228
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
229
229
|
while (1) switch (_context2.prev = _context2.next) {
|
|
230
230
|
case 0:
|
|
231
231
|
_context2.prev = 0;
|
|
232
232
|
_context2.t0 = utils;
|
|
233
233
|
_context2.t1 = _this.config;
|
|
234
|
-
_context2.t2 = "document/".concat(encodeURIComponent(_this.config.documentAri), "/
|
|
234
|
+
_context2.t2 = "document/".concat(encodeURIComponent(_this.config.documentAri), "/catchupv2");
|
|
235
235
|
_context2.t3 = {
|
|
236
236
|
version: fromVersion,
|
|
237
|
-
clientId: clientId
|
|
237
|
+
clientId: clientId,
|
|
238
|
+
catchUpOutofSync: catchUpOutofSync,
|
|
239
|
+
reason: reason
|
|
238
240
|
};
|
|
239
241
|
_context2.next = 7;
|
|
240
242
|
return _this.commonHeaders();
|
|
@@ -252,21 +254,17 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
252
254
|
return _context2.t0.requestService.call(_context2.t0, _context2.t1, _context2.t6);
|
|
253
255
|
case 12:
|
|
254
256
|
_yield$utils$requestS = _context2.sent;
|
|
255
|
-
|
|
256
|
-
version = _yield$utils$requestS.version;
|
|
257
|
-
stepMaps = _yield$utils$requestS.stepMaps;
|
|
257
|
+
steps = _yield$utils$requestS.steps;
|
|
258
258
|
metadata = _yield$utils$requestS.metadata;
|
|
259
259
|
return _context2.abrupt("return", {
|
|
260
|
-
|
|
261
|
-
version: version,
|
|
262
|
-
stepMaps: stepMaps,
|
|
260
|
+
steps: steps,
|
|
263
261
|
metadata: metadata
|
|
264
262
|
});
|
|
265
|
-
case
|
|
266
|
-
_context2.prev =
|
|
263
|
+
case 18:
|
|
264
|
+
_context2.prev = 18;
|
|
267
265
|
_context2.t7 = _context2["catch"](0);
|
|
268
266
|
if (!(_context2.t7.code === 404)) {
|
|
269
|
-
_context2.next =
|
|
267
|
+
_context2.next = 24;
|
|
270
268
|
break;
|
|
271
269
|
}
|
|
272
270
|
errorNotFound = {
|
|
@@ -278,158 +276,83 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
278
276
|
};
|
|
279
277
|
_this.emit('error', errorNotFound);
|
|
280
278
|
return _context2.abrupt("return", {});
|
|
281
|
-
case 26:
|
|
282
|
-
logger("Can't fetch the catchup", _context2.t7.message);
|
|
283
|
-
errorCatchup = {
|
|
284
|
-
message: 'Cannot fetch catchup from collab service',
|
|
285
|
-
data: {
|
|
286
|
-
status: _context2.t7.status,
|
|
287
|
-
code: INTERNAL_ERROR_CODE.CATCHUP_FAILED
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
_this.emit('error', errorCatchup);
|
|
291
|
-
throw _context2.t7;
|
|
292
|
-
case 30:
|
|
293
|
-
case "end":
|
|
294
|
-
return _context2.stop();
|
|
295
|
-
}
|
|
296
|
-
}, _callee2, null, [[0, 20]]);
|
|
297
|
-
}));
|
|
298
|
-
return function (_x, _x2) {
|
|
299
|
-
return _ref2.apply(this, arguments);
|
|
300
|
-
};
|
|
301
|
-
}());
|
|
302
|
-
_defineProperty(_assertThisInitialized(_this), "fetchCatchupv2", /*#__PURE__*/function () {
|
|
303
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(fromVersion, clientId, catchUpOutofSync, reason) {
|
|
304
|
-
var _yield$utils$requestS2, steps, metadata, errorNotFound, errorCatchupv2;
|
|
305
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
306
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
307
|
-
case 0:
|
|
308
|
-
_context3.prev = 0;
|
|
309
|
-
_context3.t0 = utils;
|
|
310
|
-
_context3.t1 = _this.config;
|
|
311
|
-
_context3.t2 = "document/".concat(encodeURIComponent(_this.config.documentAri), "/catchupv2");
|
|
312
|
-
_context3.t3 = {
|
|
313
|
-
version: fromVersion,
|
|
314
|
-
clientId: clientId,
|
|
315
|
-
catchUpOutofSync: catchUpOutofSync,
|
|
316
|
-
reason: reason
|
|
317
|
-
};
|
|
318
|
-
_context3.next = 7;
|
|
319
|
-
return _this.commonHeaders();
|
|
320
|
-
case 7:
|
|
321
|
-
_context3.t4 = _context3.sent;
|
|
322
|
-
_context3.t5 = {
|
|
323
|
-
headers: _context3.t4
|
|
324
|
-
};
|
|
325
|
-
_context3.t6 = {
|
|
326
|
-
path: _context3.t2,
|
|
327
|
-
queryParams: _context3.t3,
|
|
328
|
-
requestInit: _context3.t5
|
|
329
|
-
};
|
|
330
|
-
_context3.next = 12;
|
|
331
|
-
return _context3.t0.requestService.call(_context3.t0, _context3.t1, _context3.t6);
|
|
332
|
-
case 12:
|
|
333
|
-
_yield$utils$requestS2 = _context3.sent;
|
|
334
|
-
steps = _yield$utils$requestS2.steps;
|
|
335
|
-
metadata = _yield$utils$requestS2.metadata;
|
|
336
|
-
return _context3.abrupt("return", {
|
|
337
|
-
steps: steps,
|
|
338
|
-
metadata: metadata
|
|
339
|
-
});
|
|
340
|
-
case 18:
|
|
341
|
-
_context3.prev = 18;
|
|
342
|
-
_context3.t7 = _context3["catch"](0);
|
|
343
|
-
if (!(_context3.t7.code === 404)) {
|
|
344
|
-
_context3.next = 24;
|
|
345
|
-
break;
|
|
346
|
-
}
|
|
347
|
-
errorNotFound = {
|
|
348
|
-
message: 'The requested document is not found',
|
|
349
|
-
data: {
|
|
350
|
-
status: _context3.t7.code,
|
|
351
|
-
code: INTERNAL_ERROR_CODE.DOCUMENT_NOT_FOUND
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
_this.emit('error', errorNotFound);
|
|
355
|
-
return _context3.abrupt("return", {});
|
|
356
279
|
case 24:
|
|
357
|
-
logger("Can't fetch the catchupv2",
|
|
280
|
+
logger("Can't fetch the catchupv2", _context2.t7.message);
|
|
358
281
|
errorCatchupv2 = {
|
|
359
282
|
message: 'Cannot fetch catchupv2 from collab service',
|
|
360
283
|
data: {
|
|
361
|
-
status:
|
|
284
|
+
status: _context2.t7.status,
|
|
362
285
|
code: INTERNAL_ERROR_CODE.CATCHUP_FAILED
|
|
363
286
|
}
|
|
364
287
|
};
|
|
365
288
|
_this.emit('error', errorCatchupv2);
|
|
366
|
-
throw
|
|
289
|
+
throw _context2.t7;
|
|
367
290
|
case 28:
|
|
368
291
|
case "end":
|
|
369
|
-
return
|
|
292
|
+
return _context2.stop();
|
|
370
293
|
}
|
|
371
|
-
},
|
|
294
|
+
}, _callee2, null, [[0, 18]]);
|
|
372
295
|
}));
|
|
373
|
-
return function (
|
|
374
|
-
return
|
|
296
|
+
return function (_x, _x2, _x3, _x4) {
|
|
297
|
+
return _ref2.apply(this, arguments);
|
|
375
298
|
};
|
|
376
299
|
}());
|
|
377
300
|
_defineProperty(_assertThisInitialized(_this), "fetchReconcile", /*#__PURE__*/function () {
|
|
378
|
-
var
|
|
301
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(currentStateDoc, reason) {
|
|
379
302
|
var reqBody, reconcileResponse, _this$analyticsHelper7;
|
|
380
|
-
return _regeneratorRuntime.wrap(function
|
|
381
|
-
while (1) switch (
|
|
303
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
304
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
382
305
|
case 0:
|
|
383
|
-
|
|
306
|
+
_context3.prev = 0;
|
|
384
307
|
reqBody = JSON.stringify({
|
|
385
308
|
doc: currentStateDoc,
|
|
386
309
|
productId: 'ccollab',
|
|
387
310
|
reason: reason
|
|
388
311
|
});
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
312
|
+
_context3.t0 = utils;
|
|
313
|
+
_context3.t1 = _this.config;
|
|
314
|
+
_context3.t2 = "document/".concat(encodeURIComponent(_this.config.documentAri), "/reconcile");
|
|
315
|
+
_context3.t3 = _objectSpread;
|
|
316
|
+
_context3.t4 = _objectSpread;
|
|
317
|
+
_context3.t5 = {};
|
|
318
|
+
_context3.next = 10;
|
|
396
319
|
return _this.commonHeaders();
|
|
397
320
|
case 10:
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
321
|
+
_context3.t6 = _context3.sent;
|
|
322
|
+
_context3.t7 = (0, _context3.t4)(_context3.t5, _context3.t6);
|
|
323
|
+
_context3.t8 = {};
|
|
324
|
+
_context3.t9 = {
|
|
402
325
|
'Content-Type': 'application/json'
|
|
403
326
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
headers:
|
|
327
|
+
_context3.t10 = (0, _context3.t3)(_context3.t7, _context3.t8, _context3.t9);
|
|
328
|
+
_context3.t11 = reqBody;
|
|
329
|
+
_context3.t12 = {
|
|
330
|
+
headers: _context3.t10,
|
|
408
331
|
method: 'POST',
|
|
409
|
-
body:
|
|
332
|
+
body: _context3.t11
|
|
410
333
|
};
|
|
411
|
-
|
|
412
|
-
path:
|
|
413
|
-
requestInit:
|
|
334
|
+
_context3.t13 = {
|
|
335
|
+
path: _context3.t2,
|
|
336
|
+
requestInit: _context3.t12
|
|
414
337
|
};
|
|
415
|
-
|
|
416
|
-
return
|
|
338
|
+
_context3.next = 20;
|
|
339
|
+
return _context3.t0.requestService.call(_context3.t0, _context3.t1, _context3.t13);
|
|
417
340
|
case 20:
|
|
418
|
-
reconcileResponse =
|
|
419
|
-
return
|
|
341
|
+
reconcileResponse = _context3.sent;
|
|
342
|
+
return _context3.abrupt("return", reconcileResponse);
|
|
420
343
|
case 24:
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
(_this$analyticsHelper7 = _this.analyticsHelper) === null || _this$analyticsHelper7 === void 0 || _this$analyticsHelper7.sendErrorEvent(
|
|
424
|
-
throw
|
|
344
|
+
_context3.prev = 24;
|
|
345
|
+
_context3.t14 = _context3["catch"](0);
|
|
346
|
+
(_this$analyticsHelper7 = _this.analyticsHelper) === null || _this$analyticsHelper7 === void 0 || _this$analyticsHelper7.sendErrorEvent(_context3.t14, 'Error while fetching reconciled document');
|
|
347
|
+
throw _context3.t14;
|
|
425
348
|
case 28:
|
|
426
349
|
case "end":
|
|
427
|
-
return
|
|
350
|
+
return _context3.stop();
|
|
428
351
|
}
|
|
429
|
-
},
|
|
352
|
+
}, _callee3, null, [[0, 24]]);
|
|
430
353
|
}));
|
|
431
|
-
return function (
|
|
432
|
-
return
|
|
354
|
+
return function (_x5, _x6) {
|
|
355
|
+
return _ref3.apply(this, arguments);
|
|
433
356
|
};
|
|
434
357
|
}());
|
|
435
358
|
/**
|
|
@@ -515,10 +438,10 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
515
438
|
var auth;
|
|
516
439
|
if (permissionTokenRefresh) {
|
|
517
440
|
auth = /*#__PURE__*/function () {
|
|
518
|
-
var
|
|
441
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(cb) {
|
|
519
442
|
var authData, token, _data, authenticationError;
|
|
520
|
-
return _regeneratorRuntime.wrap(function
|
|
521
|
-
while (1) switch (
|
|
443
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
444
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
522
445
|
case 0:
|
|
523
446
|
// Rebuild authData to ensure values are current
|
|
524
447
|
authData = {
|
|
@@ -527,22 +450,22 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
527
450
|
// ESS-1009 Allow to opt-in into 404 response
|
|
528
451
|
need404: _this2.config.need404
|
|
529
452
|
};
|
|
530
|
-
|
|
531
|
-
|
|
453
|
+
_context4.prev = 1;
|
|
454
|
+
_context4.next = 4;
|
|
532
455
|
return permissionTokenRefresh();
|
|
533
456
|
case 4:
|
|
534
|
-
token =
|
|
457
|
+
token = _context4.sent;
|
|
535
458
|
if (token) {
|
|
536
459
|
authData.token = token;
|
|
537
460
|
} else {
|
|
538
461
|
authData.token = undefined;
|
|
539
462
|
}
|
|
540
463
|
cb(authData);
|
|
541
|
-
|
|
464
|
+
_context4.next = 13;
|
|
542
465
|
break;
|
|
543
466
|
case 9:
|
|
544
|
-
|
|
545
|
-
|
|
467
|
+
_context4.prev = 9;
|
|
468
|
+
_context4.t0 = _context4["catch"](1);
|
|
546
469
|
// Pass the error back to the consumers so they can deal with exceptional cases themselves (eg. no permissions because the page was deleted)
|
|
547
470
|
authenticationError = {
|
|
548
471
|
message: 'Insufficient editing permissions',
|
|
@@ -550,8 +473,8 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
550
473
|
status: 403,
|
|
551
474
|
code: INTERNAL_ERROR_CODE.TOKEN_PERMISSION_ERROR,
|
|
552
475
|
meta: {
|
|
553
|
-
originalError:
|
|
554
|
-
reason:
|
|
476
|
+
originalError: _context4.t0,
|
|
477
|
+
reason: _context4.t0 === null || _context4.t0 === void 0 || (_data = _context4.t0.data) === null || _data === void 0 || (_data = _data.meta) === null || _data === void 0 ? void 0 : _data.reason // Should always be 'RESOURCE_DELETED' Temporary, until Confluence Cloud removes their hack
|
|
555
478
|
// https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/browse/next/packages/native-collab/src/fetchCollabPermissionToken.ts#37
|
|
556
479
|
}
|
|
557
480
|
}
|
|
@@ -559,20 +482,20 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
559
482
|
_this2.emit('error', authenticationError);
|
|
560
483
|
case 13:
|
|
561
484
|
case "end":
|
|
562
|
-
return
|
|
485
|
+
return _context4.stop();
|
|
563
486
|
}
|
|
564
|
-
},
|
|
487
|
+
}, _callee4, null, [[1, 9]]);
|
|
565
488
|
}));
|
|
566
|
-
return function auth(
|
|
567
|
-
return
|
|
489
|
+
return function auth(_x7) {
|
|
490
|
+
return _ref4.apply(this, arguments);
|
|
568
491
|
};
|
|
569
492
|
}();
|
|
570
493
|
} else {
|
|
571
494
|
auth = /*#__PURE__*/function () {
|
|
572
|
-
var
|
|
495
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(cb) {
|
|
573
496
|
var authData;
|
|
574
|
-
return _regeneratorRuntime.wrap(function
|
|
575
|
-
while (1) switch (
|
|
497
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
498
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
576
499
|
case 0:
|
|
577
500
|
// Rebuild authData to ensure values are current
|
|
578
501
|
authData = {
|
|
@@ -584,12 +507,12 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
584
507
|
cb(authData);
|
|
585
508
|
case 2:
|
|
586
509
|
case "end":
|
|
587
|
-
return
|
|
510
|
+
return _context5.stop();
|
|
588
511
|
}
|
|
589
|
-
},
|
|
512
|
+
}, _callee5);
|
|
590
513
|
}));
|
|
591
|
-
return function auth(
|
|
592
|
-
return
|
|
514
|
+
return function auth(_x8) {
|
|
515
|
+
return _ref5.apply(this, arguments);
|
|
593
516
|
};
|
|
594
517
|
}();
|
|
595
518
|
}
|
|
@@ -606,20 +529,20 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
606
529
|
this.socket.on('steps:added', function (data) {
|
|
607
530
|
_this2.emit('steps:added', data);
|
|
608
531
|
});
|
|
609
|
-
this.socket.on('participant:telepointer', function (
|
|
610
|
-
var timestamp =
|
|
611
|
-
data =
|
|
532
|
+
this.socket.on('participant:telepointer', function (_ref6) {
|
|
533
|
+
var timestamp = _ref6.timestamp,
|
|
534
|
+
data = _ref6.data;
|
|
612
535
|
// data is TelepointerPayload without timestamp
|
|
613
536
|
_this2.emit('participant:telepointer', _objectSpread({
|
|
614
537
|
timestamp: timestamp
|
|
615
538
|
}, data));
|
|
616
539
|
});
|
|
617
|
-
this.socket.on('participant:activity-ack', function (
|
|
618
|
-
var data =
|
|
540
|
+
this.socket.on('participant:activity-ack', function (_ref7) {
|
|
541
|
+
var data = _ref7.data;
|
|
619
542
|
_this2.emit('participant:activity-ack', data);
|
|
620
543
|
});
|
|
621
|
-
this.socket.on('participant:activity-join', function (
|
|
622
|
-
var data =
|
|
544
|
+
this.socket.on('participant:activity-join', function (_ref8) {
|
|
545
|
+
var data = _ref8.data;
|
|
623
546
|
_this2.emit('participant:activity-join', data);
|
|
624
547
|
});
|
|
625
548
|
this.socket.on('presence:joined', function (data) {
|
|
@@ -631,11 +554,11 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
631
554
|
this.socket.on('participant:left', function (data) {
|
|
632
555
|
_this2.emit('participant:left', data);
|
|
633
556
|
});
|
|
634
|
-
this.socket.on('participant:updated', function (
|
|
635
|
-
var sessionId =
|
|
636
|
-
timestamp =
|
|
637
|
-
data =
|
|
638
|
-
clientId =
|
|
557
|
+
this.socket.on('participant:updated', function (_ref9) {
|
|
558
|
+
var sessionId = _ref9.sessionId,
|
|
559
|
+
timestamp = _ref9.timestamp,
|
|
560
|
+
data = _ref9.data,
|
|
561
|
+
clientId = _ref9.clientId;
|
|
639
562
|
_this2.emit('participant:updated', _objectSpread({
|
|
640
563
|
sessionId: sessionId,
|
|
641
564
|
timestamp: timestamp,
|
|
@@ -651,10 +574,10 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
651
574
|
_this2.emit('status', data);
|
|
652
575
|
});
|
|
653
576
|
this.socket.on('disconnect', /*#__PURE__*/function () {
|
|
654
|
-
var
|
|
577
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(reason) {
|
|
655
578
|
var _this2$analyticsHelpe, reconnectionError;
|
|
656
|
-
return _regeneratorRuntime.wrap(function
|
|
657
|
-
while (1) switch (
|
|
579
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
580
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
658
581
|
case 0:
|
|
659
582
|
_this2.connected = false;
|
|
660
583
|
logger("disconnect reason: ".concat(reason));
|
|
@@ -679,12 +602,12 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
679
602
|
}
|
|
680
603
|
case 4:
|
|
681
604
|
case "end":
|
|
682
|
-
return
|
|
605
|
+
return _context6.stop();
|
|
683
606
|
}
|
|
684
|
-
},
|
|
607
|
+
}, _callee6);
|
|
685
608
|
}));
|
|
686
|
-
return function (
|
|
687
|
-
return
|
|
609
|
+
return function (_x9) {
|
|
610
|
+
return _ref10.apply(this, arguments);
|
|
688
611
|
};
|
|
689
612
|
}());
|
|
690
613
|
|
|
@@ -789,42 +712,42 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
789
712
|
}, {
|
|
790
713
|
key: "commonHeaders",
|
|
791
714
|
value: function () {
|
|
792
|
-
var _commonHeaders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
793
|
-
return _regeneratorRuntime.wrap(function
|
|
794
|
-
while (1) switch (
|
|
715
|
+
var _commonHeaders = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
716
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
717
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
795
718
|
case 0:
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
719
|
+
_context7.t0 = _objectSpread;
|
|
720
|
+
_context7.t1 = _objectSpread;
|
|
721
|
+
_context7.t2 = {};
|
|
799
722
|
if (!this.config.permissionTokenRefresh) {
|
|
800
|
-
|
|
723
|
+
_context7.next = 10;
|
|
801
724
|
break;
|
|
802
725
|
}
|
|
803
|
-
|
|
726
|
+
_context7.next = 6;
|
|
804
727
|
return this.getChannelToken();
|
|
805
728
|
case 6:
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
'x-token':
|
|
729
|
+
_context7.t4 = _context7.sent;
|
|
730
|
+
_context7.t3 = {
|
|
731
|
+
'x-token': _context7.t4
|
|
809
732
|
};
|
|
810
|
-
|
|
733
|
+
_context7.next = 11;
|
|
811
734
|
break;
|
|
812
735
|
case 10:
|
|
813
|
-
|
|
736
|
+
_context7.t3 = {};
|
|
814
737
|
case 11:
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
738
|
+
_context7.t5 = _context7.t3;
|
|
739
|
+
_context7.t6 = (0, _context7.t1)(_context7.t2, _context7.t5);
|
|
740
|
+
_context7.t7 = {};
|
|
741
|
+
_context7.t8 = {
|
|
819
742
|
'x-product': getProduct(this.config.productInfo),
|
|
820
743
|
'x-subproduct': getSubProduct(this.config.productInfo)
|
|
821
744
|
};
|
|
822
|
-
return
|
|
745
|
+
return _context7.abrupt("return", (0, _context7.t0)(_context7.t6, _context7.t7, _context7.t8));
|
|
823
746
|
case 16:
|
|
824
747
|
case "end":
|
|
825
|
-
return
|
|
748
|
+
return _context7.stop();
|
|
826
749
|
}
|
|
827
|
-
},
|
|
750
|
+
}, _callee7, this);
|
|
828
751
|
}));
|
|
829
752
|
function commonHeaders() {
|
|
830
753
|
return _commonHeaders.apply(this, arguments);
|