@atlaskit/collab-provider 15.3.8 → 15.3.10

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/collab-provider
2
2
 
3
+ ## 15.3.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.3.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ca2f133e4a6f9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca2f133e4a6f9) -
14
+ Adding sourceId query param to socketio connection
15
+ - Updated dependencies
16
+
3
17
  ## 15.3.8
4
18
 
5
19
  ### Patch Changes
@@ -635,7 +635,7 @@ var Channel = exports.Channel = /*#__PURE__*/function (_Emitter) {
635
635
  };
636
636
  }();
637
637
  }
638
- this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path);
638
+ this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path, documentAri);
639
639
 
640
640
  // Due to https://github.com/socketio/socket.io-client/issues/1473,
641
641
  // reconnect no longer fired on the socket.
@@ -16,7 +16,7 @@ var _utils = require("./helpers/utils");
16
16
  var _config = require("./config");
17
17
  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; }
18
18
  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) { (0, _defineProperty2.default)(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; }
19
- function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path) {
19
+ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
20
20
  var _URL = new URL(url),
21
21
  pathname = _URL.pathname;
22
22
  var socketIOOptions = _config.SOCKET_IO_OPTIONS;
@@ -58,7 +58,10 @@ function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsH
58
58
  transports: transports,
59
59
  path: usePMR && path ? "".concat(path, "/socket.io") : "/".concat(pathname.split('/')[1], "/socket.io"),
60
60
  auth: auth,
61
- extraHeaders: extraHeaders
61
+ extraHeaders: extraHeaders,
62
+ query: {
63
+ sourceId: documentAri === null || documentAri === void 0 ? void 0 : documentAri.split('/')[1]
64
+ }
62
65
  });
63
66
  return client;
64
67
  }
@@ -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 = "15.3.7";
8
+ var version = exports.version = "15.3.9";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -446,7 +446,7 @@ export class Channel extends Emitter {
446
446
  cb(authData);
447
447
  };
448
448
  }
449
- this.socket = createSocket(`${url}/session/${documentAri}`, auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path);
449
+ this.socket = createSocket(`${url}/session/${documentAri}`, auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path, documentAri);
450
450
 
451
451
  // Due to https://github.com/socketio/socket.io-client/issues/1473,
452
452
  // reconnect no longer fired on the socket.
@@ -5,7 +5,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { Provider } from './provider';
6
6
  import { getProduct, getSubProduct } from './helpers/utils';
7
7
  import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
8
- export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path) {
8
+ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
9
9
  const {
10
10
  pathname
11
11
  } = new URL(url);
@@ -48,7 +48,10 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
48
48
  transports,
49
49
  path: usePMR && path ? `${path}/socket.io` : `/${pathname.split('/')[1]}/socket.io`,
50
50
  auth,
51
- extraHeaders
51
+ extraHeaders,
52
+ query: {
53
+ sourceId: documentAri === null || documentAri === void 0 ? void 0 : documentAri.split('/')[1]
54
+ }
52
55
  });
53
56
  return client;
54
57
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/collab-provider";
2
- export const version = "15.3.7";
2
+ export const version = "15.3.9";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -628,7 +628,7 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
628
628
  };
629
629
  }();
630
630
  }
631
- this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path);
631
+ this.socket = createSocket("".concat(url, "/session/").concat(documentAri), auth, this.config.productInfo, this.config.isPresenceOnly, this.analyticsHelper, path, documentAri);
632
632
 
633
633
  // Due to https://github.com/socketio/socket.io-client/issues/1473,
634
634
  // reconnect no longer fired on the socket.
@@ -8,7 +8,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { Provider } from './provider';
9
9
  import { getProduct, getSubProduct } from './helpers/utils';
10
10
  import { SOCKET_IO_OPTIONS, SOCKET_IO_OPTIONS_WITH_HIGH_JITTER } from './config';
11
- export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path) {
11
+ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, analyticsHelper, path, documentAri) {
12
12
  var _URL = new URL(url),
13
13
  pathname = _URL.pathname;
14
14
  var socketIOOptions = SOCKET_IO_OPTIONS;
@@ -50,7 +50,10 @@ export function createSocketIOSocket(url, auth, productInfo, isPresenceOnly, ana
50
50
  transports: transports,
51
51
  path: usePMR && path ? "".concat(path, "/socket.io") : "/".concat(pathname.split('/')[1], "/socket.io"),
52
52
  auth: auth,
53
- extraHeaders: extraHeaders
53
+ extraHeaders: extraHeaders,
54
+ query: {
55
+ sourceId: documentAri === null || documentAri === void 0 ? void 0 : documentAri.split('/')[1]
56
+ }
54
57
  });
55
58
  return client;
56
59
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/collab-provider";
2
- export var version = "15.3.7";
2
+ export var version = "15.3.9";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,5 +2,5 @@ import type { Socket } from 'socket.io-client';
2
2
  import { Provider } from './provider';
3
3
  import type { Config, ProductInformation, InitAndAuthData, AuthCallback } from './types';
4
4
  import type AnalyticsHelper from './analytics/analytics-helper';
5
- export declare function createSocketIOSocket(url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string): Socket;
5
+ export declare function createSocketIOSocket(url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string, documentAri?: string): Socket;
6
6
  export declare function createSocketIOCollabProvider(config: Omit<Config, 'createSocket'>): Provider;
@@ -39,7 +39,7 @@ export interface Config {
39
39
  */
40
40
  analyticsClient?: AnalyticsWebClient;
41
41
  batchProps?: BatchProps;
42
- createSocket: (url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string) => SocketIOSocket;
42
+ createSocket: (url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string, documentAri?: string) => SocketIOSocket;
43
43
  documentAri: string;
44
44
  /**
45
45
  * Enable checking if a document update from collab-provider is being dropped by the editor,
@@ -2,5 +2,5 @@ import type { Socket } from 'socket.io-client';
2
2
  import { Provider } from './provider';
3
3
  import type { Config, ProductInformation, InitAndAuthData, AuthCallback } from './types';
4
4
  import type AnalyticsHelper from './analytics/analytics-helper';
5
- export declare function createSocketIOSocket(url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string): Socket;
5
+ export declare function createSocketIOSocket(url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string, documentAri?: string): Socket;
6
6
  export declare function createSocketIOCollabProvider(config: Omit<Config, 'createSocket'>): Provider;
@@ -39,7 +39,7 @@ export interface Config {
39
39
  */
40
40
  analyticsClient?: AnalyticsWebClient;
41
41
  batchProps?: BatchProps;
42
- createSocket: (url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string) => SocketIOSocket;
42
+ createSocket: (url: string, auth?: AuthCallback | InitAndAuthData, productInfo?: ProductInformation, isPresenceOnly?: boolean, analyticsHelper?: AnalyticsHelper, path?: string, documentAri?: string) => SocketIOSocket;
43
43
  documentAri: string;
44
44
  /**
45
45
  * Enable checking if a document update from collab-provider is being dropped by the editor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/collab-provider",
3
- "version": "15.3.8",
3
+ "version": "15.3.10",
4
4
  "description": "A provider for collaborative editing.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/prosemirror-collab": "^0.22.0",
39
39
  "@atlaskit/react-ufo": "^5.2.0",
40
- "@atlaskit/tmp-editor-statsig": "^24.0.0",
40
+ "@atlaskit/tmp-editor-statsig": "^25.0.0",
41
41
  "@atlaskit/ufo": "^0.4.0",
42
42
  "@atlaskit/util-service-support": "^6.3.0",
43
43
  "@babel/runtime": "^7.0.0",