@splitsoftware/splitio 10.28.0-rc.3 → 10.28.0-rc.5

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/CHANGES.txt CHANGED
@@ -1,4 +1,4 @@
1
- 10.28.0 (September XXX, 2024)
1
+ 10.28.0 (September 6, 2024)
2
2
  - Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
3
3
  - Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
4
4
  - Updated some transitive dependencies for vulnerability fixes.
@@ -1 +1 @@
1
- export var packageVersion = '10.28.0-rc.3';
1
+ export var packageVersion = '10.28.0-rc.5';
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageVersion = void 0;
4
- exports.packageVersion = '10.28.0-rc.3';
4
+ exports.packageVersion = '10.28.0-rc.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.28.0-rc.3",
3
+ "version": "10.28.0-rc.5",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -40,7 +40,7 @@
40
40
  "node": ">=6"
41
41
  },
42
42
  "dependencies": {
43
- "@splitsoftware/splitio-commons": "1.17.0-rc.3",
43
+ "@splitsoftware/splitio-commons": "1.17.0-rc.5",
44
44
  "@types/google.analytics": "0.0.40",
45
45
  "@types/ioredis": "^4.28.0",
46
46
  "bloom-filters": "^3.0.0",
@@ -1 +1 @@
1
- export const packageVersion = '10.28.0-rc.3';
1
+ export const packageVersion = '10.28.0-rc.5';
@@ -1138,13 +1138,28 @@ declare namespace SplitIO {
1138
1138
  */
1139
1139
  requestOptions?: {
1140
1140
  /**
1141
- * Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
1142
- * Some headers are required by the SDK, like 'SplitSDKVersion', and cannot be overridden.
1143
- * To pass multiple headers with the same name, you can combine them into a single line separated by commas.
1144
- * Example: `{ 'Authorization': 'value1, value2' }`.
1141
+ * Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1142
+ * Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1143
+ * To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1144
+ * Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
1145
+ *
1146
+ * NOTE: to pass custom headers to the streaming connection in Browser, you should polyfill the `window.EventSource` object with a library that supports headers,
1147
+ * like https://www.npmjs.com/package/eventsource, since the native EventSource object does not support them in general and will be ignored.
1145
1148
  *
1146
1149
  * @property getHeaderOverrides
1147
1150
  * @default undefined
1151
+ *
1152
+ * @param context - The context for the request.
1153
+ * @param context.headers - The current headers in the request.
1154
+ * @returns A set of headers to be merged with the current headers.
1155
+ *
1156
+ * @example
1157
+ * const getHeaderOverrides = (context) => {
1158
+ * return {
1159
+ * 'Authorization': context.headers['Authorization'] + ', other-value',
1160
+ * 'custom-header': 'custom-value'
1161
+ * };
1162
+ * };
1148
1163
  */
1149
1164
  getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
1150
1165
  },
@@ -1199,13 +1214,25 @@ declare namespace SplitIO {
1199
1214
  */
1200
1215
  requestOptions?: {
1201
1216
  /**
1202
- * Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
1203
- * Some headers are required by the SDK, like 'SplitSDKVersion', and cannot be overridden.
1204
- * To pass multiple headers with the same name, you can combine them into a single line separated by commas.
1205
- * Example: `{ 'Authorization': 'value1, value2' }`.
1217
+ * Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1218
+ * Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1219
+ * To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1220
+ * Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
1206
1221
  *
1207
1222
  * @property getHeaderOverrides
1208
1223
  * @default undefined
1224
+ *
1225
+ * @param context - The context for the request.
1226
+ * @param context.headers - The current headers in the request.
1227
+ * @returns A set of headers to be merged with the current headers.
1228
+ *
1229
+ * @example
1230
+ * const getHeaderOverrides = (context) => {
1231
+ * return {
1232
+ * 'Authorization': context.headers['Authorization'] + ', other-value',
1233
+ * 'custom-header': 'custom-value'
1234
+ * };
1235
+ * };
1209
1236
  */
1210
1237
  getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
1211
1238
  /**