@splitsoftware/splitio-commons 1.6.2-rc.5 → 1.6.2-rc.8
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 +3 -0
- package/cjs/evaluator/index.js +10 -11
- package/cjs/integrations/ga/GaToSplit.js +8 -5
- package/cjs/sdkClient/sdkClient.js +3 -1
- package/cjs/sdkFactory/index.js +2 -2
- package/cjs/sdkManager/index.js +3 -11
- package/cjs/storages/AbstractSplitsCacheAsync.js +7 -9
- package/cjs/storages/AbstractSplitsCacheSync.js +7 -9
- package/cjs/storages/dataLoader.js +1 -1
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +5 -6
- package/cjs/storages/inMemory/SplitsCacheInMemory.js +7 -10
- package/cjs/storages/inRedis/ImpressionCountsCacheInRedis.js +10 -6
- package/cjs/storages/inRedis/SplitsCacheInRedis.js +15 -9
- package/cjs/storages/inRedis/index.js +4 -3
- package/cjs/storages/inRedis/uniqueKeysCacheInRedis.js +11 -7
- package/cjs/storages/pluggable/SplitsCachePluggable.js +14 -9
- package/cjs/sync/offline/syncTasks/fromObjectSyncTask.js +2 -3
- package/cjs/sync/polling/updaters/splitChangesUpdater.js +1 -1
- package/cjs/trackers/strategy/strategyOptimized.js +2 -1
- package/cjs/trackers/telemetryTracker.js +6 -0
- package/cjs/trackers/uniqueKeysTracker.js +8 -1
- package/esm/evaluator/index.js +10 -11
- package/esm/integrations/ga/GaToSplit.js +8 -5
- package/esm/sdkClient/sdkClient.js +3 -1
- package/esm/sdkFactory/index.js +2 -2
- package/esm/sdkManager/index.js +3 -11
- package/esm/storages/AbstractSplitsCacheAsync.js +7 -9
- package/esm/storages/AbstractSplitsCacheSync.js +7 -9
- package/esm/storages/dataLoader.js +1 -1
- package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +5 -6
- package/esm/storages/inMemory/SplitsCacheInMemory.js +7 -10
- package/esm/storages/inRedis/ImpressionCountsCacheInRedis.js +10 -6
- package/esm/storages/inRedis/SplitsCacheInRedis.js +15 -9
- package/esm/storages/inRedis/index.js +4 -3
- package/esm/storages/inRedis/uniqueKeysCacheInRedis.js +11 -7
- package/esm/storages/pluggable/SplitsCachePluggable.js +14 -9
- package/esm/sync/offline/syncTasks/fromObjectSyncTask.js +2 -3
- package/esm/sync/polling/updaters/splitChangesUpdater.js +1 -1
- package/esm/trackers/strategy/strategyOptimized.js +2 -1
- package/esm/trackers/telemetryTracker.js +6 -0
- package/esm/trackers/uniqueKeysTracker.js +8 -1
- package/package.json +1 -1
- package/src/evaluator/index.ts +8 -9
- package/src/integrations/ga/GaToSplit.ts +9 -5
- package/src/integrations/types.ts +2 -1
- package/src/sdkClient/sdkClient.ts +3 -1
- package/src/sdkFactory/index.ts +2 -2
- package/src/sdkManager/index.ts +3 -12
- package/src/storages/AbstractSplitsCacheAsync.ts +12 -14
- package/src/storages/AbstractSplitsCacheSync.ts +14 -16
- package/src/storages/dataLoader.ts +1 -1
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +8 -10
- package/src/storages/inMemory/SplitsCacheInMemory.ts +10 -14
- package/src/storages/inRedis/ImpressionCountsCacheInRedis.ts +10 -6
- package/src/storages/inRedis/SplitsCacheInRedis.ts +21 -17
- package/src/storages/inRedis/index.ts +5 -4
- package/src/storages/inRedis/uniqueKeysCacheInRedis.ts +11 -8
- package/src/storages/pluggable/SplitsCachePluggable.ts +20 -17
- package/src/storages/types.ts +13 -13
- package/src/sync/offline/syncTasks/fromObjectSyncTask.ts +5 -6
- package/src/sync/polling/updaters/splitChangesUpdater.ts +2 -2
- package/src/trackers/strategy/strategyOptimized.ts +1 -1
- package/src/trackers/telemetryTracker.ts +7 -2
- package/src/trackers/types.ts +6 -0
- package/src/trackers/uniqueKeysTracker.ts +13 -2
- package/types/integrations/types.d.ts +2 -1
- package/types/storages/AbstractSplitsCacheAsync.d.ts +6 -5
- package/types/storages/AbstractSplitsCacheSync.d.ts +5 -5
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +3 -3
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +3 -2
- package/types/storages/inRedis/ImpressionCountsCacheInRedis.d.ts +5 -4
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +6 -5
- package/types/storages/inRedis/uniqueKeysCacheInRedis.d.ts +5 -4
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +6 -5
- package/types/storages/types.d.ts +13 -13
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +1 -1
- package/types/trackers/types.d.ts +6 -0
- package/types/trackers/uniqueKeysTracker.d.ts +1 -1
|
@@ -11,7 +11,7 @@ declare type ISplitChangesUpdater = (noCache?: boolean, till?: number) => Promis
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function parseSegments({ conditions }: ISplit): ISet<string>;
|
|
13
13
|
interface ISplitMutations {
|
|
14
|
-
added: [string,
|
|
14
|
+
added: [string, ISplit][];
|
|
15
15
|
removed: string[];
|
|
16
16
|
segments: string[];
|
|
17
17
|
}
|
|
@@ -33,11 +33,16 @@ export interface ITelemetryTracker {
|
|
|
33
33
|
* Records streaming event
|
|
34
34
|
*/
|
|
35
35
|
streamingEvent(e: StreamingEventType | AUTH_REJECTION, d?: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* Records tag
|
|
38
|
+
*/
|
|
39
|
+
addTag(tag: string): void;
|
|
36
40
|
}
|
|
37
41
|
export interface IFilterAdapter {
|
|
38
42
|
add(key: string, featureName: string): boolean;
|
|
39
43
|
contains(key: string, featureName: string): boolean;
|
|
40
44
|
clear(): void;
|
|
45
|
+
refreshRate?: number;
|
|
41
46
|
}
|
|
42
47
|
export interface IImpressionSenderAdapter {
|
|
43
48
|
recordUniqueKeys(data: Object): void;
|
|
@@ -45,6 +50,7 @@ export interface IImpressionSenderAdapter {
|
|
|
45
50
|
}
|
|
46
51
|
/** Unique keys tracker */
|
|
47
52
|
export interface IUniqueKeysTracker {
|
|
53
|
+
stop(): void;
|
|
48
54
|
track(key: string, featureName: string): void;
|
|
49
55
|
}
|
|
50
56
|
export interface IStrategyResult {
|
|
@@ -7,7 +7,7 @@ import { IFilterAdapter, IUniqueKeysTracker } from './types';
|
|
|
7
7
|
* or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
|
|
8
8
|
*
|
|
9
9
|
* @param log Logger instance
|
|
10
|
-
* @param filterAdapter filter adapter
|
|
11
10
|
* @param uniqueKeysCache cache to save unique keys
|
|
11
|
+
* @param filterAdapter filter adapter
|
|
12
12
|
*/
|
|
13
13
|
export declare function uniqueKeysTrackerFactory(log: ILogger, uniqueKeysCache: IUniqueKeysCacheBase, filterAdapter?: IFilterAdapter): IUniqueKeysTracker;
|