@splitsoftware/splitio-commons 1.2.1-rc.6 → 1.2.1-rc.9
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/cjs/sdkClient/client.js +4 -9
- package/cjs/sdkClient/clientCS.js +1 -1
- package/cjs/sdkClient/clientInputValidation.js +6 -8
- package/cjs/sdkClient/sdkClient.js +1 -4
- package/cjs/sdkClient/sdkClientMethodCS.js +1 -5
- package/cjs/sdkClient/sdkClientMethodCSWithTT.js +1 -9
- package/cjs/sdkFactory/index.js +3 -3
- package/cjs/storages/inRedis/RedisAdapter.js +9 -2
- package/cjs/sync/streaming/SSEClient/index.js +2 -1
- package/cjs/trackers/eventTracker.js +8 -1
- package/cjs/trackers/impressionObserver/utils.js +8 -1
- package/cjs/trackers/impressionsTracker.js +6 -5
- package/cjs/utils/lang/maps.js +16 -2
- package/cjs/utils/settingsValidation/index.js +20 -4
- package/esm/sdkClient/client.js +5 -10
- package/esm/sdkClient/clientCS.js +1 -1
- package/esm/sdkClient/clientInputValidation.js +6 -8
- package/esm/sdkClient/sdkClient.js +1 -4
- package/esm/sdkClient/sdkClientMethodCS.js +1 -5
- package/esm/sdkClient/sdkClientMethodCSWithTT.js +1 -9
- package/esm/sdkFactory/index.js +3 -3
- package/esm/storages/inRedis/RedisAdapter.js +9 -2
- package/esm/sync/streaming/SSEClient/index.js +2 -1
- package/esm/trackers/eventTracker.js +8 -1
- package/esm/trackers/impressionObserver/utils.js +7 -1
- package/esm/trackers/impressionsTracker.js +6 -5
- package/esm/utils/lang/maps.js +14 -1
- package/esm/utils/settingsValidation/index.js +20 -4
- package/package.json +1 -1
- package/src/integrations/pluggable.ts +2 -2
- package/src/sdkClient/client.ts +5 -6
- package/src/sdkClient/clientCS.ts +1 -1
- package/src/sdkClient/clientInputValidation.ts +8 -7
- package/src/sdkClient/sdkClient.ts +2 -5
- package/src/sdkClient/sdkClientMethodCS.ts +1 -6
- package/src/sdkClient/sdkClientMethodCSWithTT.ts +2 -11
- package/src/sdkFactory/index.ts +3 -3
- package/src/sdkFactory/types.ts +0 -1
- package/src/storages/inRedis/RedisAdapter.ts +8 -2
- package/src/sync/streaming/SSEClient/index.ts +2 -1
- package/src/trackers/eventTracker.ts +11 -3
- package/src/trackers/impressionObserver/utils.ts +8 -1
- package/src/trackers/impressionsTracker.ts +7 -8
- package/src/types.ts +1 -1
- package/src/utils/lang/maps.ts +15 -1
- package/src/utils/settingsValidation/consent.ts +2 -1
- package/src/utils/settingsValidation/index.ts +20 -4
- package/src/utils/settingsValidation/types.ts +3 -1
- package/types/sdkClient/clientInputValidation.d.ts +2 -3
- package/types/sdkFactory/types.d.ts +0 -1
- package/types/storages/inRedis/RedisAdapter.d.ts +1 -1
- package/types/trackers/eventTracker.d.ts +2 -2
- package/types/trackers/impressionObserver/utils.d.ts +4 -0
- package/types/trackers/impressionsTracker.d.ts +2 -3
- package/types/types.d.ts +1 -1
- package/types/utils/lang/maps.d.ts +7 -0
- package/types/utils/settingsValidation/consent.d.ts +3 -2
- package/types/utils/settingsValidation/types.d.ts +3 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IImpressionCountsCacheSync, IImpressionsCacheBase } from '../storages/types';
|
|
2
2
|
import { IImpressionsHandler, IImpressionsTracker } from './types';
|
|
3
|
-
import {
|
|
3
|
+
import { ISettings } from '../types';
|
|
4
4
|
import { IImpressionObserver } from './impressionObserver/types';
|
|
5
|
-
import { ILogger } from '../logger/types';
|
|
6
5
|
/**
|
|
7
6
|
* Impressions tracker stores impressions in cache and pass them to the listener and integrations manager if provided.
|
|
8
7
|
*
|
|
@@ -13,4 +12,4 @@ import { ILogger } from '../logger/types';
|
|
|
13
12
|
* @param observer optional impression observer. If provided, previous time (pt property) is included in impression instances
|
|
14
13
|
* @param countsCache optional cache to save impressions count. If provided, impressions will be deduped (OPTIMIZED mode)
|
|
15
14
|
*/
|
|
16
|
-
export declare function impressionsTrackerFactory(
|
|
15
|
+
export declare function impressionsTrackerFactory(settings: ISettings, impressionsCache: IImpressionsCacheBase, integrationsManager?: IImpressionsHandler, observer?: IImpressionObserver, countsCache?: IImpressionCountsCacheSync): IImpressionsTracker;
|
package/types/types.d.ts
CHANGED
|
@@ -389,7 +389,7 @@ interface IBasicClient extends IStatusInterface {
|
|
|
389
389
|
* @returns {Promise<void>}
|
|
390
390
|
*/
|
|
391
391
|
destroy(): Promise<void>;
|
|
392
|
-
|
|
392
|
+
isClientSide: boolean;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
395
|
* Common definitions between SDK instances for different environments interface.
|
|
@@ -44,5 +44,12 @@ interface IMapConstructor {
|
|
|
44
44
|
new <K, V>(entries?: readonly (readonly [K, V])[] | null): IMap<K, V>;
|
|
45
45
|
readonly prototype: IMap<any, any>;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* return the Map constructor to use. If native Map is not available or it doesn't support the required features (e.g., IE11),
|
|
49
|
+
* a ponyfill with minimal features is returned instead.
|
|
50
|
+
*
|
|
51
|
+
* Exported for testing purposes only.
|
|
52
|
+
*/
|
|
53
|
+
export declare function __getMapConstructor(): IMapConstructor;
|
|
47
54
|
export declare const _Map: IMapConstructor;
|
|
48
55
|
export {};
|
|
@@ -13,7 +13,9 @@ export interface ISettingsValidationParams {
|
|
|
13
13
|
} & {
|
|
14
14
|
startup: ISettings['startup'];
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
16
|
+
/** If true, validates core.key and core.trafficType */
|
|
17
|
+
isClientSide?: boolean;
|
|
18
|
+
/** Define runtime values (`settings.runtime`) */
|
|
17
19
|
runtime: (settings: ISettings) => ISettings['runtime'];
|
|
18
20
|
/** Storage validator (`settings.storage`) */
|
|
19
21
|
storage?: (settings: ISettings) => ISettings['storage'];
|