@splitsoftware/splitio 10.17.4-rc.2 → 10.17.4-rc.3

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
@@ -7,6 +7,7 @@
7
7
  - Updated dependencies for vulnerability fixes
8
8
  - Bugfixing - Logger settings is configurable per factory instance instead of globally.
9
9
  - Bugfixing - Wrongly logging warning 'No listeners for SDK Readiness detected' in consumer mode.
10
+ - Bugfixing - Updated internal `isObject` util that was returning false negatives on some environment, like Nuxt dev server or Miniflare.
10
11
  - Added TLS support for Redis
11
12
  -
12
13
 
@@ -8,7 +8,7 @@ import { LocalhostFromObject } from '@splitsoftware/splitio-commons/esm/sync/off
8
8
  import { validateConsent } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/consent';
9
9
  var params = {
10
10
  defaults: defaults,
11
- isClientSide: true,
11
+ acceptKey: true, acceptTT: true,
12
12
  runtime: validateRuntime,
13
13
  storage: validateStorage,
14
14
  integrations: validateIntegrations,
@@ -1 +1 @@
1
- export var packageVersion = '10.17.4-rc.2';
1
+ export var packageVersion = '10.17.4-rc.3';
@@ -11,7 +11,7 @@ var LocalhostFromObject_1 = require("@splitsoftware/splitio-commons/cjs/sync/off
11
11
  var consent_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/consent");
12
12
  var params = {
13
13
  defaults: browser_1.defaults,
14
- isClientSide: true,
14
+ acceptKey: true, acceptTT: true,
15
15
  runtime: runtime_1.validateRuntime,
16
16
  storage: browser_2.validateStorage,
17
17
  integrations: browser_3.validateIntegrations,
@@ -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.17.4-rc.2';
4
+ exports.packageVersion = '10.17.4-rc.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.17.4-rc.2",
3
+ "version": "10.17.4-rc.3",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -32,7 +32,7 @@
32
32
  "node": ">=6"
33
33
  },
34
34
  "dependencies": {
35
- "@splitsoftware/splitio-commons": "1.2.1-rc.9",
35
+ "@splitsoftware/splitio-commons": "1.2.1-rc.10",
36
36
  "@types/google.analytics": "0.0.40",
37
37
  "@types/ioredis": "^4.28.0",
38
38
  "ioredis": "^4.28.0",
@@ -9,7 +9,7 @@ import { validateConsent } from '@splitsoftware/splitio-commons/src/utils/settin
9
9
 
10
10
  const params = {
11
11
  defaults,
12
- isClientSide: true,
12
+ acceptKey: true, acceptTT: true, // Client with bound key and optional TT
13
13
  runtime: validateRuntime,
14
14
  storage: validateStorage,
15
15
  integrations: validateIntegrations,
@@ -1 +1 @@
1
- export const packageVersion = '10.17.4-rc.2';
1
+ export const packageVersion = '10.17.4-rc.3';
@@ -1,4 +1,4 @@
1
- // Type definitions for Javascript and Node Split Software SDK
1
+ // Type definitions for Javascript and NodeJS Split Software SDK
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
@@ -98,7 +98,7 @@ interface ISettings {
98
98
  readonly debug: boolean | LogLevel,
99
99
  readonly version: string,
100
100
  /**
101
- * Mocked features map if using in browser, or mocked features file path string if using in Node.
101
+ * Mocked features map if using in browser, or mocked features file path string if using in NodeJS.
102
102
  */
103
103
  features: SplitIO.MockedFeaturesMap | SplitIO.MockedFeaturesFilePath,
104
104
  readonly streamingEnabled: boolean,
@@ -107,7 +107,7 @@ interface ISettings {
107
107
  impressionsMode: SplitIO.ImpressionsMode,
108
108
  }
109
109
  /**
110
- * User consent status if using in browser. Undefined if using in Node.
110
+ * User consent status if using in browser. Undefined if using in NodeJS.
111
111
  */
112
112
  readonly userConsent?: SplitIO.ConsentStatus
113
113
  }
@@ -326,7 +326,7 @@ interface INodeBasicSettings extends ISharedSettings {
326
326
  IPAddressesEnabled?: boolean
327
327
  },
328
328
  /**
329
- * Defines which kind of storage we should instanciate.
329
+ * Defines which kind of storage we should instantiate.
330
330
  * @property {Object} storage
331
331
  */
332
332
  storage?: {
@@ -337,10 +337,10 @@ interface INodeBasicSettings extends ISharedSettings {
337
337
  */
338
338
  type?: StorageType,
339
339
  /**
340
- * Options to be passed to the selected storage. Use it with type: 'REDIS'
341
- * @property {SplitIO.RedisStorageOptions} options
340
+ * Options to be passed to the selected storage.
341
+ * @property {Object} options
342
342
  */
343
- options?: SplitIO.RedisStorageOptions,
343
+ options?: Object,
344
344
  /**
345
345
  * Optional prefix to prevent any kind of data collision between SDK versions.
346
346
  * @property {string} prefix
@@ -639,69 +639,6 @@ declare namespace SplitIO {
639
639
  * @typedef {string} BrowserStorage
640
640
  */
641
641
  type BrowserStorage = 'MEMORY' | 'LOCALSTORAGE';
642
- /**
643
- * Options to be passed to the Redis storage. Use it with storage type: 'REDIS'.
644
- * @typedef {Object} RedisStorageOptions
645
- */
646
- type RedisStorageOptions = {
647
- /**
648
- * Redis URL. If set, `host`, `port`, `db` and `pass` params will be ignored.
649
- *
650
- * Examples:
651
- * ```
652
- * url: 'localhost'
653
- * url: '127.0.0.1:6379'
654
- * url: 'redis://:authpassword@127.0.0.1:6379/0'
655
- * ```
656
- * @property {string=} url
657
- */
658
- url?: string,
659
- /**
660
- * Redis host.
661
- * @property {string=} host
662
- * @default 'localhost'
663
- */
664
- host?: string,
665
- /**
666
- * Redis port.
667
- * @property {number=} port
668
- * @default 6379
669
- */
670
- port?: number,
671
- /**
672
- * Redis database to be used.
673
- * @property {number=} db
674
- * @default 0
675
- */
676
- db?: number,
677
- /**
678
- * Redis password. Don't define if no password is used.
679
- * @property {string=} pass
680
- * @default undefined
681
- */
682
- pass?: string,
683
- /**
684
- * The milliseconds before a timeout occurs during the initial connection to the Redis server.
685
- * @property {number=} connectionTimeout
686
- * @default 10000
687
- */
688
- connectionTimeout?: number,
689
- /**
690
- * The milliseconds before Redis commands are timeout by the SDK.
691
- * Method calls that involve Redis commands, like `client.getTreatment` or `client.track` calls, are resolved when the commands success or timeout.
692
- * @property {number=} operationTimeout
693
- * @default 5000
694
- */
695
- operationTimeout?: number,
696
- /**
697
- * TLS configuration for Redis connection.
698
- * @see {@link https://www.npmjs.com/package/ioredis#tls-options }
699
- *
700
- * @property {Object=} tls
701
- * @default undefined
702
- */
703
- tls?: RedisOptions['tls'],
704
- }
705
642
  /**
706
643
  * Impression listener interface. This is the interface that needs to be implemented
707
644
  * by the element you provide to the SDK as impression listener.
@@ -1049,7 +986,8 @@ declare namespace SplitIO {
1049
986
  */
1050
987
  features?: MockedFeaturesMap,
1051
988
  /**
1052
- * Defines which kind of storage we should instanciate.
989
+ * Defines which kind of storage we can instantiate on the browser.
990
+ * Possible storage types are 'MEMORY', which is the default, and 'LOCALSTORAGE'.
1053
991
  * @property {Object} storage
1054
992
  */
1055
993
  storage?: {
@@ -1104,7 +1042,8 @@ declare namespace SplitIO {
1104
1042
  */
1105
1043
  urls?: UrlSettings,
1106
1044
  /**
1107
- * Defines which kind of storage we should instanciate.
1045
+ * Defines which kind of storage we can instantiate on NodeJS for 'standalone' mode.
1046
+ * The only possible storage type is 'MEMORY', which is the default.
1108
1047
  * @property {Object} storage
1109
1048
  */
1110
1049
  storage?: {
@@ -1138,6 +1077,11 @@ declare namespace SplitIO {
1138
1077
  * @see {@link https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK#configuration}
1139
1078
  */
1140
1079
  interface INodeAsyncSettings extends INodeBasicSettings {
1080
+ /**
1081
+ * Defines which kind of async storage we can instantiate on NodeJS for 'consumer' mode.
1082
+ * The only possible storage type is 'REDIS'.
1083
+ * @property {Object} storage
1084
+ */
1141
1085
  storage: {
1142
1086
  /**
1143
1087
  * 'REDIS' storage type to be instantiated by the SDK.
@@ -1145,10 +1089,68 @@ declare namespace SplitIO {
1145
1089
  */
1146
1090
  type: NodeAsyncStorage,
1147
1091
  /**
1148
- * Options to be passed to the selected storage. Use it with type: 'REDIS'
1149
- * @property {SplitIO.RedisStorageOptions} options
1092
+ * Options to be passed to the Redis storage. Use it with storage type: 'REDIS'.
1093
+ * @property {Object} options
1150
1094
  */
1151
- options?: RedisStorageOptions,
1095
+ options?: {
1096
+ /**
1097
+ * Redis URL. If set, `host`, `port`, `db` and `pass` params will be ignored.
1098
+ *
1099
+ * Examples:
1100
+ * ```
1101
+ * url: 'localhost'
1102
+ * url: '127.0.0.1:6379'
1103
+ * url: 'redis://:authpassword@127.0.0.1:6379/0'
1104
+ * ```
1105
+ * @property {string=} url
1106
+ */
1107
+ url?: string,
1108
+ /**
1109
+ * Redis host.
1110
+ * @property {string=} host
1111
+ * @default 'localhost'
1112
+ */
1113
+ host?: string,
1114
+ /**
1115
+ * Redis port.
1116
+ * @property {number=} port
1117
+ * @default 6379
1118
+ */
1119
+ port?: number,
1120
+ /**
1121
+ * Redis database to be used.
1122
+ * @property {number=} db
1123
+ * @default 0
1124
+ */
1125
+ db?: number,
1126
+ /**
1127
+ * Redis password. Don't define if no password is used.
1128
+ * @property {string=} pass
1129
+ * @default undefined
1130
+ */
1131
+ pass?: string,
1132
+ /**
1133
+ * The milliseconds before a timeout occurs during the initial connection to the Redis server.
1134
+ * @property {number=} connectionTimeout
1135
+ * @default 10000
1136
+ */
1137
+ connectionTimeout?: number,
1138
+ /**
1139
+ * The milliseconds before Redis commands are timeout by the SDK.
1140
+ * Method calls that involve Redis commands, like `client.getTreatment` or `client.track` calls, are resolved when the commands success or timeout.
1141
+ * @property {number=} operationTimeout
1142
+ * @default 5000
1143
+ */
1144
+ operationTimeout?: number,
1145
+ /**
1146
+ * TLS configuration for Redis connection.
1147
+ * @see {@link https://www.npmjs.com/package/ioredis#tls-options }
1148
+ *
1149
+ * @property {Object=} tls
1150
+ * @default undefined
1151
+ */
1152
+ tls?: RedisOptions['tls'],
1153
+ },
1152
1154
  /**
1153
1155
  * Optional prefix to prevent any kind of data collision between SDK versions.
1154
1156
  * @property {string} prefix