@atlaskit/collab-provider 9.25.10 → 9.25.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/CHANGELOG.md +12 -0
- package/dist/cjs/socket-io-provider.js +48 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/socket-io-provider.js +48 -15
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/socket-io-provider.js +48 -15
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/channel.d.ts +1 -1
- package/dist/types/helpers/const.d.ts +18 -18
- package/dist/types/provider/commit-step.d.ts +1 -1
- package/dist/types-ts4.5/channel.d.ts +1 -1
- package/dist/types-ts4.5/helpers/const.d.ts +18 -18
- package/dist/types-ts4.5/provider/commit-step.d.ts +1 -1
- package/package.json +7 -4
- package/socket-io-provider/package.json +1 -1
- package/types/package.json +1 -1
- package/version-wrapper/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 9.25.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
8
|
+
|
|
9
|
+
## 9.25.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#80629](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80629) [`7cc52a784224`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7cc52a784224) - [ESS-4515] Collab provider: Do not use polling by default, only as safe-fail if WebSocket doesn't work
|
|
14
|
+
|
|
3
15
|
## 9.25.10
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ exports.createSocketIOSocket = createSocketIOSocket;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _provider = require("./provider");
|
|
11
11
|
var _socket = require("socket.io-client");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _utils = require("./helpers/utils");
|
|
13
14
|
var _config = require("./config");
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(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; }
|
|
@@ -16,22 +17,54 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
17
|
function createSocketIOSocket(url, auth, productInfo) {
|
|
17
18
|
var _URL = new URL(url),
|
|
18
19
|
pathname = _URL.pathname;
|
|
20
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.ncs.try-connect-websocket-first')) {
|
|
21
|
+
var socket = (0, _socket.io)(url, {
|
|
22
|
+
reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
23
|
+
reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
24
|
+
randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
25
|
+
closeOnBeforeunload: false,
|
|
26
|
+
withCredentials: true,
|
|
27
|
+
transports: ['websocket'],
|
|
28
|
+
path: "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
29
|
+
auth: auth,
|
|
30
|
+
extraHeaders: {
|
|
31
|
+
'x-product': (0, _utils.getProduct)(productInfo),
|
|
32
|
+
'x-subproduct': (0, _utils.getSubProduct)(productInfo)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
socket.on('connect_error', function (error) {
|
|
36
|
+
// There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
|
|
37
|
+
// see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
|
|
38
|
+
var isWebSocketError = (error.message || '') === 'websocket error';
|
|
19
39
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
// Neither this TransportError type is well documented
|
|
41
|
+
// see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
|
|
42
|
+
var isTransportError =
|
|
43
|
+
// @ts-expect-error
|
|
44
|
+
error.type === 'TransportError';
|
|
45
|
+
|
|
46
|
+
// We are checking both situations as a safe measure
|
|
47
|
+
if (isWebSocketError || isTransportError) {
|
|
48
|
+
socket.io.opts.transports = ['polling', 'websocket'];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return socket;
|
|
52
|
+
} else {
|
|
53
|
+
return (0, _socket.io)(url, {
|
|
54
|
+
reconnectionDelayMax: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
55
|
+
reconnectionDelay: _config.SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
56
|
+
randomizationFactor: _config.SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
57
|
+
closeOnBeforeunload: false,
|
|
58
|
+
withCredentials: true,
|
|
59
|
+
transports: ['polling', 'websocket'],
|
|
60
|
+
path: "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
61
|
+
auth: auth,
|
|
62
|
+
extraHeaders: {
|
|
63
|
+
'x-product': (0, _utils.getProduct)(productInfo),
|
|
64
|
+
'x-subproduct': (0, _utils.getSubProduct)(productInfo)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
35
68
|
}
|
|
36
69
|
function createSocketIOCollabProvider(config) {
|
|
37
70
|
return new _provider.Provider(_objectSpread(_objectSpread({}, config), {}, {
|
|
@@ -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.25.
|
|
8
|
+
var version = exports.version = "9.25.12";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -1,27 +1,60 @@
|
|
|
1
1
|
import { Provider } from './provider';
|
|
2
2
|
import { io } from 'socket.io-client';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { getProduct, getSubProduct } from './helpers/utils';
|
|
4
5
|
import { SOCKET_IO_OPTIONS } from './config';
|
|
5
6
|
export function createSocketIOSocket(url, auth, productInfo) {
|
|
6
7
|
const {
|
|
7
8
|
pathname
|
|
8
9
|
} = new URL(url);
|
|
10
|
+
if (getBooleanFF('platform.editor.ncs.try-connect-websocket-first')) {
|
|
11
|
+
const socket = io(url, {
|
|
12
|
+
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
13
|
+
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
14
|
+
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
15
|
+
closeOnBeforeunload: false,
|
|
16
|
+
withCredentials: true,
|
|
17
|
+
transports: ['websocket'],
|
|
18
|
+
path: `/${pathname.split('/')[1]}/socket.io`,
|
|
19
|
+
auth,
|
|
20
|
+
extraHeaders: {
|
|
21
|
+
'x-product': getProduct(productInfo),
|
|
22
|
+
'x-subproduct': getSubProduct(productInfo)
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
socket.on('connect_error', error => {
|
|
26
|
+
// There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
|
|
27
|
+
// see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
|
|
28
|
+
const isWebSocketError = (error.message || '') === 'websocket error';
|
|
9
29
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
// Neither this TransportError type is well documented
|
|
31
|
+
// see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
|
|
32
|
+
const isTransportError =
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
error.type === 'TransportError';
|
|
35
|
+
|
|
36
|
+
// We are checking both situations as a safe measure
|
|
37
|
+
if (isWebSocketError || isTransportError) {
|
|
38
|
+
socket.io.opts.transports = ['polling', 'websocket'];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return socket;
|
|
42
|
+
} else {
|
|
43
|
+
return io(url, {
|
|
44
|
+
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
45
|
+
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
46
|
+
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
47
|
+
closeOnBeforeunload: false,
|
|
48
|
+
withCredentials: true,
|
|
49
|
+
transports: ['polling', 'websocket'],
|
|
50
|
+
path: `/${pathname.split('/')[1]}/socket.io`,
|
|
51
|
+
auth,
|
|
52
|
+
extraHeaders: {
|
|
53
|
+
'x-product': getProduct(productInfo),
|
|
54
|
+
'x-subproduct': getSubProduct(productInfo)
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
25
58
|
}
|
|
26
59
|
export function createSocketIOCollabProvider(config) {
|
|
27
60
|
return new Provider({
|
|
@@ -3,27 +3,60 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import { Provider } from './provider';
|
|
5
5
|
import { io } from 'socket.io-client';
|
|
6
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { getProduct, getSubProduct } from './helpers/utils';
|
|
7
8
|
import { SOCKET_IO_OPTIONS } from './config';
|
|
8
9
|
export function createSocketIOSocket(url, auth, productInfo) {
|
|
9
10
|
var _URL = new URL(url),
|
|
10
11
|
pathname = _URL.pathname;
|
|
12
|
+
if (getBooleanFF('platform.editor.ncs.try-connect-websocket-first')) {
|
|
13
|
+
var socket = io(url, {
|
|
14
|
+
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
15
|
+
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
16
|
+
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
17
|
+
closeOnBeforeunload: false,
|
|
18
|
+
withCredentials: true,
|
|
19
|
+
transports: ['websocket'],
|
|
20
|
+
path: "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
21
|
+
auth: auth,
|
|
22
|
+
extraHeaders: {
|
|
23
|
+
'x-product': getProduct(productInfo),
|
|
24
|
+
'x-subproduct': getSubProduct(productInfo)
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
socket.on('connect_error', function (error) {
|
|
28
|
+
// There is no good documentation about this error, howevert this is how socket.io is emiting the websocket error
|
|
29
|
+
// see: https://github.com/socketio/engine.io-client/blob/6.0.x/lib/transports/websocket.ts#L116
|
|
30
|
+
var isWebSocketError = (error.message || '') === 'websocket error';
|
|
11
31
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
// Neither this TransportError type is well documented
|
|
33
|
+
// see: https://github.com/socketio/engine.io-client/blob/main/lib/transport.ts#L11
|
|
34
|
+
var isTransportError =
|
|
35
|
+
// @ts-expect-error
|
|
36
|
+
error.type === 'TransportError';
|
|
37
|
+
|
|
38
|
+
// We are checking both situations as a safe measure
|
|
39
|
+
if (isWebSocketError || isTransportError) {
|
|
40
|
+
socket.io.opts.transports = ['polling', 'websocket'];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return socket;
|
|
44
|
+
} else {
|
|
45
|
+
return io(url, {
|
|
46
|
+
reconnectionDelayMax: SOCKET_IO_OPTIONS.RECONNECTION_DELAY_MAX,
|
|
47
|
+
reconnectionDelay: SOCKET_IO_OPTIONS.RECONNECTION_DELAY,
|
|
48
|
+
randomizationFactor: SOCKET_IO_OPTIONS.RANDOMIZATION_FACTOR,
|
|
49
|
+
closeOnBeforeunload: false,
|
|
50
|
+
withCredentials: true,
|
|
51
|
+
transports: ['polling', 'websocket'],
|
|
52
|
+
path: "/".concat(pathname.split('/')[1], "/socket.io"),
|
|
53
|
+
auth: auth,
|
|
54
|
+
extraHeaders: {
|
|
55
|
+
'x-product': getProduct(productInfo),
|
|
56
|
+
'x-subproduct': getSubProduct(productInfo)
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
27
60
|
}
|
|
28
61
|
export function createSocketIOCollabProvider(config) {
|
|
29
62
|
return new Provider(_objectSpread(_objectSpread({}, config), {}, {
|
package/dist/types/channel.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare class Channel extends Emitter<ChannelEvent> {
|
|
|
46
46
|
* @throws {NotInitializedError} Channel not initialized
|
|
47
47
|
* @throws {NotConnectedError} Channel not connected
|
|
48
48
|
*/
|
|
49
|
-
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K],
|
|
49
|
+
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], 'timestamp'>, callback?: Function) => void;
|
|
50
50
|
/**
|
|
51
51
|
* Send metadata to the back-end service over the channel
|
|
52
52
|
* @throws {NotInitializedError} Channel not initialized
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { ProviderError } from '@atlaskit/editor-common/collab';
|
|
2
2
|
export declare enum EVENT_ACTION {
|
|
3
|
-
CONNECTION = "connection"
|
|
4
|
-
CATCHUP = "catchup"
|
|
5
|
-
DOCUMENT_INIT = "documentInit"
|
|
6
|
-
ADD_STEPS = "addSteps"
|
|
7
|
-
UPDATE_PARTICIPANTS = "updateParticipants"
|
|
8
|
-
UPDATE_DOCUMENT = "updateDocument"
|
|
9
|
-
COMMIT_UNCONFIRMED_STEPS = "commitUnconfirmedSteps"
|
|
10
|
-
REINITIALISE_DOCUMENT = "reinitialiseDocument"
|
|
11
|
-
ERROR = "error"
|
|
12
|
-
PUBLISH_PAGE = "publishPage"
|
|
13
|
-
GET_CURRENT_STATE = "getCurrentState"
|
|
14
|
-
INVALIDATE_TOKEN = "invalidateToken"
|
|
15
|
-
SEND_STEPS_RETRY = "sendStepsRetry"
|
|
16
|
-
CATCHUP_AFTER_MAX_SEND_STEPS_RETRY = "catchupAfterMaxSendStepsRetry"
|
|
17
|
-
DROPPED_STEPS = "droppedStepInCatchup"
|
|
18
|
-
WEBSOCKET_MESSAGE_VOLUME_METRIC = "websocketMessageVolumeMetric"
|
|
19
|
-
PROVIDER_INITIALIZED = "providerInitialized"
|
|
20
|
-
PROVIDER_SETUP = "providerSetup"
|
|
3
|
+
CONNECTION = "connection",// https://data-portal.internal.atlassian.com/analytics/registry/43970
|
|
4
|
+
CATCHUP = "catchup",// https://data-portal.internal.atlassian.com/analytics/registry/44016
|
|
5
|
+
DOCUMENT_INIT = "documentInit",// https://data-portal.internal.atlassian.com/analytics/registry/43971
|
|
6
|
+
ADD_STEPS = "addSteps",// https://data-portal.internal.atlassian.com/analytics/registry/43972
|
|
7
|
+
UPDATE_PARTICIPANTS = "updateParticipants",// https://data-portal.internal.atlassian.com/analytics/registry/45634
|
|
8
|
+
UPDATE_DOCUMENT = "updateDocument",// https://data-portal.internal.atlassian.com/analytics/registry/58213
|
|
9
|
+
COMMIT_UNCONFIRMED_STEPS = "commitUnconfirmedSteps",// https://data-portal.internal.atlassian.com/analytics/registry/46501
|
|
10
|
+
REINITIALISE_DOCUMENT = "reinitialiseDocument",// https://data-portal.internal.atlassian.com/analytics/registry/50231
|
|
11
|
+
ERROR = "error",// https://data-portal.internal.atlassian.com/analytics/registry/51790
|
|
12
|
+
PUBLISH_PAGE = "publishPage",// https://data-portal.internal.atlassian.com/analytics/registry/50235
|
|
13
|
+
GET_CURRENT_STATE = "getCurrentState",// https://data-portal.internal.atlassian.com/analytics/registry/50783
|
|
14
|
+
INVALIDATE_TOKEN = "invalidateToken",// https://data-portal.internal.atlassian.com/analytics/registry/50444
|
|
15
|
+
SEND_STEPS_RETRY = "sendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53598
|
|
16
|
+
CATCHUP_AFTER_MAX_SEND_STEPS_RETRY = "catchupAfterMaxSendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53723
|
|
17
|
+
DROPPED_STEPS = "droppedStepInCatchup",// https://data-portal.internal.atlassian.com/analytics/registry/53724
|
|
18
|
+
WEBSOCKET_MESSAGE_VOLUME_METRIC = "websocketMessageVolumeMetric",// https://data-portal.internal.atlassian.com/analytics/registry/53596
|
|
19
|
+
PROVIDER_INITIALIZED = "providerInitialized",// https://data-portal.internal.atlassian.com/analytics/registry/54714
|
|
20
|
+
PROVIDER_SETUP = "providerSetup",// https://data-portal.internal.atlassian.com/analytics/registry/54715
|
|
21
21
|
HAS_UNCONFIRMED_STEPS = "hasUnconfirmedSteps"
|
|
22
22
|
}
|
|
23
23
|
export declare enum EVENT_STATUS {
|
|
@@ -6,7 +6,7 @@ import type { InternalError } from '../errors/internal-errors';
|
|
|
6
6
|
export declare let readyToCommit: boolean;
|
|
7
7
|
export declare const RESET_READYTOCOMMIT_INTERVAL_MS = 5000;
|
|
8
8
|
export declare const commitStepQueue: ({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, emit, __livePage, }: {
|
|
9
|
-
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K],
|
|
9
|
+
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], 'timestamp'>, callback?: Function) => void;
|
|
10
10
|
steps: readonly ProseMirrorStep[];
|
|
11
11
|
version: number;
|
|
12
12
|
userId: string;
|
|
@@ -46,7 +46,7 @@ export declare class Channel extends Emitter<ChannelEvent> {
|
|
|
46
46
|
* @throws {NotInitializedError} Channel not initialized
|
|
47
47
|
* @throws {NotConnectedError} Channel not connected
|
|
48
48
|
*/
|
|
49
|
-
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K],
|
|
49
|
+
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], 'timestamp'>, callback?: Function) => void;
|
|
50
50
|
/**
|
|
51
51
|
* Send metadata to the back-end service over the channel
|
|
52
52
|
* @throws {NotInitializedError} Channel not initialized
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { ProviderError } from '@atlaskit/editor-common/collab';
|
|
2
2
|
export declare enum EVENT_ACTION {
|
|
3
|
-
CONNECTION = "connection"
|
|
4
|
-
CATCHUP = "catchup"
|
|
5
|
-
DOCUMENT_INIT = "documentInit"
|
|
6
|
-
ADD_STEPS = "addSteps"
|
|
7
|
-
UPDATE_PARTICIPANTS = "updateParticipants"
|
|
8
|
-
UPDATE_DOCUMENT = "updateDocument"
|
|
9
|
-
COMMIT_UNCONFIRMED_STEPS = "commitUnconfirmedSteps"
|
|
10
|
-
REINITIALISE_DOCUMENT = "reinitialiseDocument"
|
|
11
|
-
ERROR = "error"
|
|
12
|
-
PUBLISH_PAGE = "publishPage"
|
|
13
|
-
GET_CURRENT_STATE = "getCurrentState"
|
|
14
|
-
INVALIDATE_TOKEN = "invalidateToken"
|
|
15
|
-
SEND_STEPS_RETRY = "sendStepsRetry"
|
|
16
|
-
CATCHUP_AFTER_MAX_SEND_STEPS_RETRY = "catchupAfterMaxSendStepsRetry"
|
|
17
|
-
DROPPED_STEPS = "droppedStepInCatchup"
|
|
18
|
-
WEBSOCKET_MESSAGE_VOLUME_METRIC = "websocketMessageVolumeMetric"
|
|
19
|
-
PROVIDER_INITIALIZED = "providerInitialized"
|
|
20
|
-
PROVIDER_SETUP = "providerSetup"
|
|
3
|
+
CONNECTION = "connection",// https://data-portal.internal.atlassian.com/analytics/registry/43970
|
|
4
|
+
CATCHUP = "catchup",// https://data-portal.internal.atlassian.com/analytics/registry/44016
|
|
5
|
+
DOCUMENT_INIT = "documentInit",// https://data-portal.internal.atlassian.com/analytics/registry/43971
|
|
6
|
+
ADD_STEPS = "addSteps",// https://data-portal.internal.atlassian.com/analytics/registry/43972
|
|
7
|
+
UPDATE_PARTICIPANTS = "updateParticipants",// https://data-portal.internal.atlassian.com/analytics/registry/45634
|
|
8
|
+
UPDATE_DOCUMENT = "updateDocument",// https://data-portal.internal.atlassian.com/analytics/registry/58213
|
|
9
|
+
COMMIT_UNCONFIRMED_STEPS = "commitUnconfirmedSteps",// https://data-portal.internal.atlassian.com/analytics/registry/46501
|
|
10
|
+
REINITIALISE_DOCUMENT = "reinitialiseDocument",// https://data-portal.internal.atlassian.com/analytics/registry/50231
|
|
11
|
+
ERROR = "error",// https://data-portal.internal.atlassian.com/analytics/registry/51790
|
|
12
|
+
PUBLISH_PAGE = "publishPage",// https://data-portal.internal.atlassian.com/analytics/registry/50235
|
|
13
|
+
GET_CURRENT_STATE = "getCurrentState",// https://data-portal.internal.atlassian.com/analytics/registry/50783
|
|
14
|
+
INVALIDATE_TOKEN = "invalidateToken",// https://data-portal.internal.atlassian.com/analytics/registry/50444
|
|
15
|
+
SEND_STEPS_RETRY = "sendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53598
|
|
16
|
+
CATCHUP_AFTER_MAX_SEND_STEPS_RETRY = "catchupAfterMaxSendStepsRetry",// https://data-portal.internal.atlassian.com/analytics/registry/53723
|
|
17
|
+
DROPPED_STEPS = "droppedStepInCatchup",// https://data-portal.internal.atlassian.com/analytics/registry/53724
|
|
18
|
+
WEBSOCKET_MESSAGE_VOLUME_METRIC = "websocketMessageVolumeMetric",// https://data-portal.internal.atlassian.com/analytics/registry/53596
|
|
19
|
+
PROVIDER_INITIALIZED = "providerInitialized",// https://data-portal.internal.atlassian.com/analytics/registry/54714
|
|
20
|
+
PROVIDER_SETUP = "providerSetup",// https://data-portal.internal.atlassian.com/analytics/registry/54715
|
|
21
21
|
HAS_UNCONFIRMED_STEPS = "hasUnconfirmedSteps"
|
|
22
22
|
}
|
|
23
23
|
export declare enum EVENT_STATUS {
|
|
@@ -6,7 +6,7 @@ import type { InternalError } from '../errors/internal-errors';
|
|
|
6
6
|
export declare let readyToCommit: boolean;
|
|
7
7
|
export declare const RESET_READYTOCOMMIT_INTERVAL_MS = 5000;
|
|
8
8
|
export declare const commitStepQueue: ({ broadcast, steps, version, userId, clientId, onStepsAdded, onErrorHandled, analyticsHelper, emit, __livePage, }: {
|
|
9
|
-
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K],
|
|
9
|
+
broadcast: <K extends keyof ChannelEvent>(type: K, data: Omit<ChannelEvent[K], 'timestamp'>, callback?: Function) => void;
|
|
10
10
|
steps: readonly ProseMirrorStep[];
|
|
11
11
|
version: number;
|
|
12
12
|
userId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "9.25.
|
|
3
|
+
"version": "9.25.12",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
41
41
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
42
|
-
"@atlaskit/editor-common": "^78.
|
|
42
|
+
"@atlaskit/editor-common": "^78.17.0",
|
|
43
43
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
@@ -69,12 +69,15 @@
|
|
|
69
69
|
"@atlaskit/adf-schema": "^35.6.0",
|
|
70
70
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
71
71
|
"@atlassian/feature-flags-test-utils": "^0.2.0",
|
|
72
|
-
"typescript": "~4.
|
|
72
|
+
"typescript": "~5.4.2"
|
|
73
73
|
},
|
|
74
74
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
75
75
|
"platform-feature-flags": {
|
|
76
76
|
"platform.editor.live-pages-expand-divergence": {
|
|
77
77
|
"type": "boolean"
|
|
78
|
+
},
|
|
79
|
+
"platform.editor.ncs.try-connect-websocket-first": {
|
|
80
|
+
"type": "boolean"
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
|
-
}
|
|
83
|
+
}
|
package/types/package.json
CHANGED