@atlaskit/collab-provider 28.1.0 → 28.2.0
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 +13 -0
- package/dist/cjs/channel.js +3 -0
- package/dist/cjs/provider/index.js +5 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/channel.js +3 -0
- package/dist/es2019/provider/index.js +5 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/channel.js +3 -0
- package/dist/esm/provider/index.js +5 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/types.d.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 28.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`9461b21b24472`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9461b21b24472) -
|
|
8
|
+
Add the recovery:required provider event with a reason payload so Confluence can reset an NCS
|
|
9
|
+
document on request. NCS sends the event to the document's current socket. Rollout is controlled
|
|
10
|
+
by NCS emitting the event.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 28.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/cjs/channel.js
CHANGED
|
@@ -637,6 +637,9 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
637
637
|
this.socket.on('steps:added', function (data) {
|
|
638
638
|
_this2.emit('steps:added', data);
|
|
639
639
|
});
|
|
640
|
+
this.socket.on('recovery:required', function (data) {
|
|
641
|
+
_this2.emit('recovery:required', data);
|
|
642
|
+
});
|
|
640
643
|
this.socket.on('participant:telepointer', function (_ref7) {
|
|
641
644
|
var timestamp = _ref7.timestamp,
|
|
642
645
|
data = _ref7.data;
|
|
@@ -194,7 +194,11 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
194
194
|
}).on('restore', _this.documentService.onRestore).on('permission', function (permit) {
|
|
195
195
|
_this.permit = Object.assign(_this.permit, permit);
|
|
196
196
|
_this.emit('permission', permit);
|
|
197
|
-
}).on('steps:added', _this.documentService.onStepsAdded).on('
|
|
197
|
+
}).on('steps:added', _this.documentService.onStepsAdded).on('recovery:required', function (payload) {
|
|
198
|
+
if (typeof (payload === null || payload === void 0 ? void 0 : payload.reason) === 'string') {
|
|
199
|
+
_this.emit('recovery:required', payload);
|
|
200
|
+
}
|
|
201
|
+
}).on('metadata:changed', _this.metadataService.onMetadataChanged).on('participant:telepointer', function (payload) {
|
|
198
202
|
return _this.participantsService.onParticipantTelepointer(payload, _this.sessionId);
|
|
199
203
|
}).on('presence:joined', _this.participantsService.onPresenceJoined).on('presence', _this.participantsService.onPresence).on('participant:left', _this.participantsService.onParticipantLeft).on('participant:updated', _this.participantsService.onParticipantUpdated).on('disconnect', _this.onDisconnected.bind(_this)).on('error', _this.onErrorHandled).on('status', /*#__PURE__*/function () {
|
|
200
204
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(status) {
|
|
@@ -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 = "28.
|
|
8
|
+
var version = exports.version = "28.1.0";
|
|
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
|
@@ -459,6 +459,9 @@ export class Channel extends Emitter {
|
|
|
459
459
|
this.socket.on('steps:added', data => {
|
|
460
460
|
this.emit('steps:added', data);
|
|
461
461
|
});
|
|
462
|
+
this.socket.on('recovery:required', data => {
|
|
463
|
+
this.emit('recovery:required', data);
|
|
464
|
+
});
|
|
462
465
|
this.socket.on('participant:telepointer', ({
|
|
463
466
|
timestamp,
|
|
464
467
|
data
|
|
@@ -175,7 +175,11 @@ export class Provider extends Emitter {
|
|
|
175
175
|
}).on('restore', this.documentService.onRestore).on('permission', permit => {
|
|
176
176
|
this.permit = Object.assign(this.permit, permit);
|
|
177
177
|
this.emit('permission', permit);
|
|
178
|
-
}).on('steps:added', this.documentService.onStepsAdded).on('
|
|
178
|
+
}).on('steps:added', this.documentService.onStepsAdded).on('recovery:required', payload => {
|
|
179
|
+
if (typeof (payload === null || payload === void 0 ? void 0 : payload.reason) === 'string') {
|
|
180
|
+
this.emit('recovery:required', payload);
|
|
181
|
+
}
|
|
182
|
+
}).on('metadata:changed', this.metadataService.onMetadataChanged).on('participant:telepointer', payload => this.participantsService.onParticipantTelepointer(payload, this.sessionId)).on('presence:joined', this.participantsService.onPresenceJoined).on('presence', this.participantsService.onPresence).on('participant:left', this.participantsService.onParticipantLeft).on('participant:updated', this.participantsService.onParticipantUpdated).on('disconnect', this.onDisconnected.bind(this)).on('error', this.onErrorHandled).on('status', async status => {
|
|
179
183
|
await this.namespaceService.onNamespaceStatusChanged(status);
|
|
180
184
|
const isLocked = this.namespaceService.getIsNamespaceLocked();
|
|
181
185
|
this.emit('namespace-lock:check', {
|
package/dist/esm/channel.js
CHANGED
|
@@ -630,6 +630,9 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
630
630
|
this.socket.on('steps:added', function (data) {
|
|
631
631
|
_this2.emit('steps:added', data);
|
|
632
632
|
});
|
|
633
|
+
this.socket.on('recovery:required', function (data) {
|
|
634
|
+
_this2.emit('recovery:required', data);
|
|
635
|
+
});
|
|
633
636
|
this.socket.on('participant:telepointer', function (_ref7) {
|
|
634
637
|
var timestamp = _ref7.timestamp,
|
|
635
638
|
data = _ref7.data;
|
|
@@ -188,7 +188,11 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
188
188
|
}).on('restore', _this.documentService.onRestore).on('permission', function (permit) {
|
|
189
189
|
_this.permit = Object.assign(_this.permit, permit);
|
|
190
190
|
_this.emit('permission', permit);
|
|
191
|
-
}).on('steps:added', _this.documentService.onStepsAdded).on('
|
|
191
|
+
}).on('steps:added', _this.documentService.onStepsAdded).on('recovery:required', function (payload) {
|
|
192
|
+
if (typeof (payload === null || payload === void 0 ? void 0 : payload.reason) === 'string') {
|
|
193
|
+
_this.emit('recovery:required', payload);
|
|
194
|
+
}
|
|
195
|
+
}).on('metadata:changed', _this.metadataService.onMetadataChanged).on('participant:telepointer', function (payload) {
|
|
192
196
|
return _this.participantsService.onParticipantTelepointer(payload, _this.sessionId);
|
|
193
197
|
}).on('presence:joined', _this.participantsService.onPresenceJoined).on('presence', _this.participantsService.onPresence).on('participant:left', _this.participantsService.onParticipantLeft).on('participant:updated', _this.participantsService.onParticipantUpdated).on('disconnect', _this.onDisconnected.bind(_this)).on('error', _this.onErrorHandled).on('status', /*#__PURE__*/function () {
|
|
194
198
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(status) {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { InternalError } from './errors/internal-errors';
|
|
|
5
5
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
6
6
|
import type { BatchProps, GetUserType } from './participants/participants-helper';
|
|
7
7
|
import type AnalyticsHelper from './analytics/analytics-helper';
|
|
8
|
-
import type { StepJson, CollabSendableSelection, Metadata, UserPermitType, PresenceActivity } from '@atlaskit/editor-common/collab';
|
|
8
|
+
import type { StepJson, CollabSendableSelection, Metadata, UserPermitType, PresenceActivity, CollabRecoveryRequiredPayload } from '@atlaskit/editor-common/collab';
|
|
9
9
|
import type { CatchupEventReason } from './helpers/const';
|
|
10
10
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
export interface CollabEventDisconnectedData {
|
|
@@ -244,6 +244,7 @@ export type ChannelEvent = {
|
|
|
244
244
|
presence: PresencePayload;
|
|
245
245
|
'presence:joined': PresencePayload;
|
|
246
246
|
reconnected: null;
|
|
247
|
+
'recovery:required': CollabRecoveryRequiredPayload;
|
|
247
248
|
restore: InitPayload;
|
|
248
249
|
status: NamespaceStatus;
|
|
249
250
|
'steps:added': StepsPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.2.0",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@atlaskit/editor-common": "^123.
|
|
78
|
+
"@atlaskit/editor-common": "^123.1.0"
|
|
79
79
|
}
|
|
80
80
|
}
|