@atlaskit/collab-provider 9.21.2 → 9.21.3
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 +6 -0
- package/dist/cjs/channel.js +39 -21
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/channel.js +9 -5
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/channel.js +39 -21
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 9.21.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#66028](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66028) [`184aba7e4984`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/184aba7e4984) - fix the auth payload when no permission token
|
|
8
|
+
|
|
3
9
|
## 9.21.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/channel.js
CHANGED
|
@@ -571,12 +571,30 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
571
571
|
};
|
|
572
572
|
}();
|
|
573
573
|
} else {
|
|
574
|
-
auth = {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
574
|
+
auth = /*#__PURE__*/function () {
|
|
575
|
+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(cb) {
|
|
576
|
+
var authData;
|
|
577
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
578
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
579
|
+
case 0:
|
|
580
|
+
// Rebuild authData to ensure values are current
|
|
581
|
+
authData = {
|
|
582
|
+
// The initialized status. If false, BE will send document, otherwise not.
|
|
583
|
+
initialized: _this2.initialized,
|
|
584
|
+
// ESS-1009 Allow to opt-in into 404 response
|
|
585
|
+
need404: _this2.config.need404
|
|
586
|
+
};
|
|
587
|
+
cb(authData);
|
|
588
|
+
case 2:
|
|
589
|
+
case "end":
|
|
590
|
+
return _context5.stop();
|
|
591
|
+
}
|
|
592
|
+
}, _callee5);
|
|
593
|
+
}));
|
|
594
|
+
return function auth(_x5) {
|
|
595
|
+
return _ref5.apply(this, arguments);
|
|
596
|
+
};
|
|
597
|
+
}();
|
|
580
598
|
}
|
|
581
599
|
this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo);
|
|
582
600
|
|
|
@@ -591,9 +609,9 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
591
609
|
this.socket.on('steps:added', function (data) {
|
|
592
610
|
_this2.emit('steps:added', data);
|
|
593
611
|
});
|
|
594
|
-
this.socket.on('participant:telepointer', function (
|
|
595
|
-
var timestamp =
|
|
596
|
-
data =
|
|
612
|
+
this.socket.on('participant:telepointer', function (_ref6) {
|
|
613
|
+
var timestamp = _ref6.timestamp,
|
|
614
|
+
data = _ref6.data;
|
|
597
615
|
// data is TelepointerPayload without timestamp
|
|
598
616
|
_this2.emit('participant:telepointer', _objectSpread({
|
|
599
617
|
timestamp: timestamp
|
|
@@ -608,11 +626,11 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
608
626
|
this.socket.on('participant:left', function (data) {
|
|
609
627
|
_this2.emit('participant:left', data);
|
|
610
628
|
});
|
|
611
|
-
this.socket.on('participant:updated', function (
|
|
612
|
-
var sessionId =
|
|
613
|
-
timestamp =
|
|
614
|
-
data =
|
|
615
|
-
clientId =
|
|
629
|
+
this.socket.on('participant:updated', function (_ref7) {
|
|
630
|
+
var sessionId = _ref7.sessionId,
|
|
631
|
+
timestamp = _ref7.timestamp,
|
|
632
|
+
data = _ref7.data,
|
|
633
|
+
clientId = _ref7.clientId;
|
|
616
634
|
_this2.emit('participant:updated', _objectSpread({
|
|
617
635
|
sessionId: sessionId,
|
|
618
636
|
timestamp: timestamp,
|
|
@@ -628,10 +646,10 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
628
646
|
_this2.emit('status', data);
|
|
629
647
|
});
|
|
630
648
|
this.socket.on('disconnect', /*#__PURE__*/function () {
|
|
631
|
-
var
|
|
649
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(reason) {
|
|
632
650
|
var _this2$analyticsHelpe, reconnectionError;
|
|
633
|
-
return _regenerator.default.wrap(function
|
|
634
|
-
while (1) switch (
|
|
651
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
652
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
635
653
|
case 0:
|
|
636
654
|
_this2.connected = false;
|
|
637
655
|
logger("disconnect reason: ".concat(reason));
|
|
@@ -656,12 +674,12 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
656
674
|
}
|
|
657
675
|
case 4:
|
|
658
676
|
case "end":
|
|
659
|
-
return
|
|
677
|
+
return _context6.stop();
|
|
660
678
|
}
|
|
661
|
-
},
|
|
679
|
+
}, _callee6);
|
|
662
680
|
}));
|
|
663
|
-
return function (
|
|
664
|
-
return
|
|
681
|
+
return function (_x6) {
|
|
682
|
+
return _ref8.apply(this, arguments);
|
|
665
683
|
};
|
|
666
684
|
}());
|
|
667
685
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/collab-provider";
|
|
8
|
-
var version = exports.version = "9.21.
|
|
8
|
+
var version = exports.version = "9.21.3";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
package/dist/es2019/channel.js
CHANGED
|
@@ -392,11 +392,15 @@ export class Channel extends Emitter {
|
|
|
392
392
|
}
|
|
393
393
|
};
|
|
394
394
|
} else {
|
|
395
|
-
auth = {
|
|
396
|
-
//
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
395
|
+
auth = async cb => {
|
|
396
|
+
// Rebuild authData to ensure values are current
|
|
397
|
+
const authData = {
|
|
398
|
+
// The initialized status. If false, BE will send document, otherwise not.
|
|
399
|
+
initialized: this.initialized,
|
|
400
|
+
// ESS-1009 Allow to opt-in into 404 response
|
|
401
|
+
need404: this.config.need404
|
|
402
|
+
};
|
|
403
|
+
cb(authData);
|
|
400
404
|
};
|
|
401
405
|
}
|
|
402
406
|
this.socket = createSocket(`${url}/session/${documentAri}`, auth, this.config.productInfo);
|
package/dist/esm/channel.js
CHANGED
|
@@ -564,12 +564,30 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
564
564
|
};
|
|
565
565
|
}();
|
|
566
566
|
} else {
|
|
567
|
-
auth = {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
567
|
+
auth = /*#__PURE__*/function () {
|
|
568
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(cb) {
|
|
569
|
+
var authData;
|
|
570
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
571
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
572
|
+
case 0:
|
|
573
|
+
// Rebuild authData to ensure values are current
|
|
574
|
+
authData = {
|
|
575
|
+
// The initialized status. If false, BE will send document, otherwise not.
|
|
576
|
+
initialized: _this2.initialized,
|
|
577
|
+
// ESS-1009 Allow to opt-in into 404 response
|
|
578
|
+
need404: _this2.config.need404
|
|
579
|
+
};
|
|
580
|
+
cb(authData);
|
|
581
|
+
case 2:
|
|
582
|
+
case "end":
|
|
583
|
+
return _context5.stop();
|
|
584
|
+
}
|
|
585
|
+
}, _callee5);
|
|
586
|
+
}));
|
|
587
|
+
return function auth(_x5) {
|
|
588
|
+
return _ref5.apply(this, arguments);
|
|
589
|
+
};
|
|
590
|
+
}();
|
|
573
591
|
}
|
|
574
592
|
this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo);
|
|
575
593
|
|
|
@@ -584,9 +602,9 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
584
602
|
this.socket.on('steps:added', function (data) {
|
|
585
603
|
_this2.emit('steps:added', data);
|
|
586
604
|
});
|
|
587
|
-
this.socket.on('participant:telepointer', function (
|
|
588
|
-
var timestamp =
|
|
589
|
-
data =
|
|
605
|
+
this.socket.on('participant:telepointer', function (_ref6) {
|
|
606
|
+
var timestamp = _ref6.timestamp,
|
|
607
|
+
data = _ref6.data;
|
|
590
608
|
// data is TelepointerPayload without timestamp
|
|
591
609
|
_this2.emit('participant:telepointer', _objectSpread({
|
|
592
610
|
timestamp: timestamp
|
|
@@ -601,11 +619,11 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
601
619
|
this.socket.on('participant:left', function (data) {
|
|
602
620
|
_this2.emit('participant:left', data);
|
|
603
621
|
});
|
|
604
|
-
this.socket.on('participant:updated', function (
|
|
605
|
-
var sessionId =
|
|
606
|
-
timestamp =
|
|
607
|
-
data =
|
|
608
|
-
clientId =
|
|
622
|
+
this.socket.on('participant:updated', function (_ref7) {
|
|
623
|
+
var sessionId = _ref7.sessionId,
|
|
624
|
+
timestamp = _ref7.timestamp,
|
|
625
|
+
data = _ref7.data,
|
|
626
|
+
clientId = _ref7.clientId;
|
|
609
627
|
_this2.emit('participant:updated', _objectSpread({
|
|
610
628
|
sessionId: sessionId,
|
|
611
629
|
timestamp: timestamp,
|
|
@@ -621,10 +639,10 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
621
639
|
_this2.emit('status', data);
|
|
622
640
|
});
|
|
623
641
|
this.socket.on('disconnect', /*#__PURE__*/function () {
|
|
624
|
-
var
|
|
642
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(reason) {
|
|
625
643
|
var _this2$analyticsHelpe, reconnectionError;
|
|
626
|
-
return _regeneratorRuntime.wrap(function
|
|
627
|
-
while (1) switch (
|
|
644
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
645
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
628
646
|
case 0:
|
|
629
647
|
_this2.connected = false;
|
|
630
648
|
logger("disconnect reason: ".concat(reason));
|
|
@@ -649,12 +667,12 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
649
667
|
}
|
|
650
668
|
case 4:
|
|
651
669
|
case "end":
|
|
652
|
-
return
|
|
670
|
+
return _context6.stop();
|
|
653
671
|
}
|
|
654
|
-
},
|
|
672
|
+
}, _callee6);
|
|
655
673
|
}));
|
|
656
|
-
return function (
|
|
657
|
-
return
|
|
674
|
+
return function (_x6) {
|
|
675
|
+
return _ref8.apply(this, arguments);
|
|
658
676
|
};
|
|
659
677
|
}());
|
|
660
678
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "9.21.
|
|
3
|
+
"version": "9.21.3",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
38
38
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
39
|
-
"@atlaskit/editor-common": "^76.
|
|
39
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
40
40
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
42
42
|
"@atlaskit/ufo": "^0.2.0",
|