@atlaskit/collab-provider 9.37.4 → 9.37.6
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 +16 -0
- package/dist/cjs/provider/index.js +7 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/provider/index.js +7 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/provider/index.js +7 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/document/document-service.d.ts +0 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/document/document-service.d.ts +0 -1
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 9.37.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#137366](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137366)
|
|
8
|
+
[`44c333f52bfa6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/44c333f52bfa6) -
|
|
9
|
+
Avoid left undefined clientId in collab-provider
|
|
10
|
+
|
|
11
|
+
## 9.37.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#136085](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136085)
|
|
16
|
+
[`88f45948976f6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/88f45948976f6) -
|
|
17
|
+
Bump version of socket.io-client used to patch vulnerability in ws library
|
|
18
|
+
|
|
3
19
|
## 9.37.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
+
var _uuid = require("uuid");
|
|
18
19
|
var _emitter = require("../emitter");
|
|
19
20
|
var _channel = require("../channel");
|
|
20
21
|
var _utils = require("../helpers/utils");
|
|
@@ -329,6 +330,12 @@ var Provider = exports.Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
329
330
|
throw new _customErrors.ProviderInitialisationError('Collab provider attempted to initialise, but Editor state is missing collab plugin');
|
|
330
331
|
}
|
|
331
332
|
this.clientId = collabPlugin.spec.config.clientID;
|
|
333
|
+
|
|
334
|
+
// generate a temporary id as clientId when it is undefined
|
|
335
|
+
// prefix temp-cp- indicates collab-provider
|
|
336
|
+
if (!this.clientId) {
|
|
337
|
+
this.clientId = "temp-cp-".concat((0, _uuid.v4)());
|
|
338
|
+
}
|
|
332
339
|
this.documentService.setup({
|
|
333
340
|
getState: getState,
|
|
334
341
|
onSyncUpError: onSyncUpError,
|
|
@@ -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.37.
|
|
8
|
+
var version = exports.version = "9.37.6";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
3
|
import { Emitter } from '../emitter';
|
|
3
4
|
import { Channel } from '../channel';
|
|
4
5
|
import { createLogger } from '../helpers/utils';
|
|
@@ -273,6 +274,12 @@ export class Provider extends Emitter {
|
|
|
273
274
|
throw new ProviderInitialisationError('Collab provider attempted to initialise, but Editor state is missing collab plugin');
|
|
274
275
|
}
|
|
275
276
|
this.clientId = collabPlugin.spec.config.clientID;
|
|
277
|
+
|
|
278
|
+
// generate a temporary id as clientId when it is undefined
|
|
279
|
+
// prefix temp-cp- indicates collab-provider
|
|
280
|
+
if (!this.clientId) {
|
|
281
|
+
this.clientId = `temp-cp-${uuidv4()}`;
|
|
282
|
+
}
|
|
276
283
|
this.documentService.setup({
|
|
277
284
|
getState,
|
|
278
285
|
onSyncUpError,
|
|
@@ -12,6 +12,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
15
16
|
import { Emitter } from '../emitter';
|
|
16
17
|
import { Channel } from '../channel';
|
|
17
18
|
import { createLogger } from '../helpers/utils';
|
|
@@ -322,6 +323,12 @@ export var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
322
323
|
throw new ProviderInitialisationError('Collab provider attempted to initialise, but Editor state is missing collab plugin');
|
|
323
324
|
}
|
|
324
325
|
this.clientId = collabPlugin.spec.config.clientID;
|
|
326
|
+
|
|
327
|
+
// generate a temporary id as clientId when it is undefined
|
|
328
|
+
// prefix temp-cp- indicates collab-provider
|
|
329
|
+
if (!this.clientId) {
|
|
330
|
+
this.clientId = "temp-cp-".concat(uuidv4());
|
|
331
|
+
}
|
|
325
332
|
this.documentService.setup({
|
|
326
333
|
getState: getState,
|
|
327
334
|
onSyncUpError: onSyncUpError,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import type { ResolvedEditorState, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
|
|
3
2
|
import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
3
|
import type AnalyticsHelper from '../analytics/analytics-helper';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
2
2
|
import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners';
|
|
3
|
-
import type { Manager } from 'socket.io-client';
|
|
3
|
+
import type { Manager, Socket as SocketIOSocket } from 'socket.io-client';
|
|
4
4
|
import type { InternalError } from './errors/internal-errors';
|
|
5
5
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
6
6
|
import type { GetUserType } from './participants/participants-helper';
|
|
@@ -27,7 +27,7 @@ export interface Config {
|
|
|
27
27
|
lifecycle?: Lifecycle;
|
|
28
28
|
storage?: Storage;
|
|
29
29
|
need404?: boolean;
|
|
30
|
-
createSocket: (path: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation) =>
|
|
30
|
+
createSocket: (path: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation) => SocketIOSocket;
|
|
31
31
|
/**
|
|
32
32
|
* @deprecated: Use promise based getAnalyticsWebClient instead
|
|
33
33
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import type { ResolvedEditorState, SyncUpErrorFunction } from '@atlaskit/editor-common/collab';
|
|
3
2
|
import type { Step as ProseMirrorStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
3
|
import type AnalyticsHelper from '../analytics/analytics-helper';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
2
2
|
import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners';
|
|
3
|
-
import type { Manager } from 'socket.io-client';
|
|
3
|
+
import type { Manager, Socket as SocketIOSocket } from 'socket.io-client';
|
|
4
4
|
import type { InternalError } from './errors/internal-errors';
|
|
5
5
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
6
6
|
import type { GetUserType } from './participants/participants-helper';
|
|
@@ -27,7 +27,7 @@ export interface Config {
|
|
|
27
27
|
lifecycle?: Lifecycle;
|
|
28
28
|
storage?: Storage;
|
|
29
29
|
need404?: boolean;
|
|
30
|
-
createSocket: (path: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation) =>
|
|
30
|
+
createSocket: (path: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation) => SocketIOSocket;
|
|
31
31
|
/**
|
|
32
32
|
* @deprecated: Use promise based getAnalyticsWebClient instead
|
|
33
33
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/collab-provider",
|
|
3
|
-
"version": "9.37.
|
|
3
|
+
"version": "9.37.6",
|
|
4
4
|
"description": "A provider for collaborative editing.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,12 +23,7 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"atlaskit:src": "src/index.ts",
|
|
25
25
|
"atlassian": {
|
|
26
|
-
"team": "Editor: Collaboration"
|
|
27
|
-
"inPublicMirror": true,
|
|
28
|
-
"releaseModel": "continuous",
|
|
29
|
-
"productPushConsumption": [
|
|
30
|
-
"jira"
|
|
31
|
-
]
|
|
26
|
+
"team": "Editor: Collaboration"
|
|
32
27
|
},
|
|
33
28
|
"af:exports": {
|
|
34
29
|
".": "./src/index.ts",
|
|
@@ -39,7 +34,7 @@
|
|
|
39
34
|
"dependencies": {
|
|
40
35
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
41
36
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
42
|
-
"@atlaskit/editor-common": "^88.
|
|
37
|
+
"@atlaskit/editor-common": "^88.8.0",
|
|
43
38
|
"@atlaskit/editor-json-transformer": "^8.18.0",
|
|
44
39
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
45
40
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -49,7 +44,8 @@
|
|
|
49
44
|
"@babel/runtime": "^7.0.0",
|
|
50
45
|
"eventemitter2": "^4.1.0",
|
|
51
46
|
"lodash": "^4.17.21",
|
|
52
|
-
"socket.io-client": "^4.7.
|
|
47
|
+
"socket.io-client": "^4.7.5",
|
|
48
|
+
"uuid": "^3.1.0"
|
|
53
49
|
},
|
|
54
50
|
"techstack": {
|
|
55
51
|
"@atlassian/frontend": {
|