@splitsoftware/splitio-commons 1.17.0-rc.5 → 1.17.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.
@@ -67,11 +67,11 @@ var SSEClient = /** @class */ (function () {
67
67
  this.connection = new this.eventSource(
68
68
  // For client-side SDKs, metadata is passed as query param to avoid CORS issues and because native EventSource implementations in browsers do not support headers
69
69
  isServerSide ? url : url + ("&SplitSDKVersion=" + this.headers.SplitSDKVersion + "&SplitSDKClientKey=" + this.headers.SplitSDKClientKey),
70
- // For server-side SDKs, metadata is passed via headers. For NodeJS, the SDK uses an EventSource that support headers
70
+ // For server-side SDKs, metadata is passed via headers
71
71
  (0, objectAssign_1.objectAssign)(isServerSide ?
72
72
  { headers: (0, decorateHeaders_1.decorateHeaders)(this.settings, this.headers) } :
73
73
  ((_a = this.settings.sync.requestOptions) === null || _a === void 0 ? void 0 : _a.getHeaderOverrides) ?
74
- { headers: (0, decorateHeaders_1.decorateHeaders)(this.settings, {}) } : // Assuming the user is providing a window.EventSource polyfill that supports headers
74
+ { headers: (0, decorateHeaders_1.decorateHeaders)(this.settings, {}) } : // User must provide a window.EventSource polyfill that supports headers
75
75
  {}, this.options));
76
76
  if (this.handler) { // no need to check if SSEClient is used only by PushManager
77
77
  this.connection.addEventListener('open', this.handler.handleOpen);
@@ -64,11 +64,11 @@ var SSEClient = /** @class */ (function () {
64
64
  this.connection = new this.eventSource(
65
65
  // For client-side SDKs, metadata is passed as query param to avoid CORS issues and because native EventSource implementations in browsers do not support headers
66
66
  isServerSide ? url : url + ("&SplitSDKVersion=" + this.headers.SplitSDKVersion + "&SplitSDKClientKey=" + this.headers.SplitSDKClientKey),
67
- // For server-side SDKs, metadata is passed via headers. For NodeJS, the SDK uses an EventSource that support headers
67
+ // For server-side SDKs, metadata is passed via headers
68
68
  objectAssign(isServerSide ?
69
69
  { headers: decorateHeaders(this.settings, this.headers) } :
70
70
  ((_a = this.settings.sync.requestOptions) === null || _a === void 0 ? void 0 : _a.getHeaderOverrides) ?
71
- { headers: decorateHeaders(this.settings, {}) } : // Assuming the user is providing a window.EventSource polyfill that supports headers
71
+ { headers: decorateHeaders(this.settings, {}) } : // User must provide a window.EventSource polyfill that supports headers
72
72
  {}, this.options));
73
73
  if (this.handler) { // no need to check if SSEClient is used only by PushManager
74
74
  this.connection.addEventListener('open', this.handler.handleOpen);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "1.17.0-rc.5",
3
+ "version": "1.17.0",
4
4
  "description": "Split JavaScript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -83,12 +83,12 @@ export class SSEClient implements ISSEClient {
83
83
  this.connection = new this.eventSource!(
84
84
  // For client-side SDKs, metadata is passed as query param to avoid CORS issues and because native EventSource implementations in browsers do not support headers
85
85
  isServerSide ? url : url + `&SplitSDKVersion=${this.headers.SplitSDKVersion}&SplitSDKClientKey=${this.headers.SplitSDKClientKey}`,
86
- // For server-side SDKs, metadata is passed via headers. For NodeJS, the SDK uses an EventSource that support headers
86
+ // For server-side SDKs, metadata is passed via headers
87
87
  objectAssign(
88
88
  isServerSide ?
89
89
  { headers: decorateHeaders(this.settings, this.headers) } :
90
90
  this.settings.sync.requestOptions?.getHeaderOverrides ?
91
- { headers: decorateHeaders(this.settings, {}) } : // Assuming the user is providing a window.EventSource polyfill that supports headers
91
+ { headers: decorateHeaders(this.settings, {}) } : // User must provide a window.EventSource polyfill that supports headers
92
92
  {},
93
93
  this.options
94
94
  )