@splitsoftware/splitio-commons 1.16.1-rc.1 → 1.16.1-rc.11
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 +4 -0
- package/cjs/logger/constants.js +5 -4
- package/cjs/logger/messages/info.js +2 -1
- package/cjs/logger/messages/warn.js +1 -1
- package/cjs/readiness/readinessManager.js +7 -12
- package/cjs/services/splitApi.js +5 -9
- package/cjs/storages/AbstractSegmentsCacheSync.js +41 -12
- package/cjs/storages/AbstractSplitsCacheAsync.js +2 -2
- package/cjs/storages/AbstractSplitsCacheSync.js +7 -5
- package/cjs/storages/KeyBuilder.js +0 -3
- package/cjs/storages/KeyBuilderCS.js +6 -0
- package/cjs/storages/dataLoader.js +1 -1
- package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +29 -52
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +4 -16
- package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +9 -40
- package/cjs/storages/inMemory/SplitsCacheInMemory.js +6 -15
- package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +4 -11
- package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
- package/cjs/sync/polling/pollingManagerCS.js +33 -51
- package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +2 -2
- package/cjs/sync/polling/updaters/mySegmentsUpdater.js +14 -20
- package/cjs/sync/streaming/AuthClient/index.js +1 -1
- package/cjs/sync/streaming/SSEHandler/index.js +3 -6
- package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +15 -9
- package/cjs/sync/streaming/constants.js +3 -4
- package/cjs/sync/streaming/parseUtils.js +14 -9
- package/cjs/sync/streaming/pushManager.js +29 -55
- package/cjs/sync/submitters/telemetrySubmitter.js +0 -2
- package/cjs/sync/syncManagerOnline.js +14 -24
- package/cjs/utils/constants/index.js +4 -5
- package/cjs/utils/settingsValidation/index.js +1 -5
- package/esm/logger/constants.js +2 -1
- package/esm/logger/messages/info.js +2 -1
- package/esm/logger/messages/warn.js +1 -1
- package/esm/readiness/readinessManager.js +7 -12
- package/esm/services/splitApi.js +6 -10
- package/esm/storages/AbstractSegmentsCacheSync.js +41 -12
- package/esm/storages/AbstractSplitsCacheAsync.js +2 -2
- package/esm/storages/AbstractSplitsCacheSync.js +5 -3
- package/esm/storages/KeyBuilder.js +0 -3
- package/esm/storages/KeyBuilderCS.js +6 -0
- package/esm/storages/dataLoader.js +1 -1
- package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +29 -52
- package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +5 -17
- package/esm/storages/inMemory/MySegmentsCacheInMemory.js +9 -40
- package/esm/storages/inMemory/SplitsCacheInMemory.js +7 -16
- package/esm/sync/polling/fetchers/mySegmentsFetcher.js +4 -11
- package/esm/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
- package/esm/sync/polling/pollingManagerCS.js +34 -52
- package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +2 -2
- package/esm/sync/polling/updaters/mySegmentsUpdater.js +12 -18
- package/esm/sync/streaming/AuthClient/index.js +1 -1
- package/esm/sync/streaming/SSEHandler/index.js +4 -7
- package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +15 -9
- package/esm/sync/streaming/constants.js +2 -3
- package/esm/sync/streaming/parseUtils.js +12 -8
- package/esm/sync/streaming/pushManager.js +32 -57
- package/esm/sync/submitters/telemetrySubmitter.js +0 -2
- package/esm/sync/syncManagerOnline.js +15 -25
- package/esm/utils/constants/index.js +2 -3
- package/esm/utils/settingsValidation/index.js +1 -5
- package/package.json +1 -1
- package/src/dtos/types.ts +7 -8
- package/src/logger/constants.ts +2 -1
- package/src/logger/messages/info.ts +2 -1
- package/src/logger/messages/warn.ts +1 -1
- package/src/readiness/readinessManager.ts +7 -9
- package/src/readiness/types.ts +0 -1
- package/src/services/splitApi.ts +7 -12
- package/src/services/splitHttpClient.ts +1 -1
- package/src/services/types.ts +2 -3
- package/src/storages/AbstractSegmentsCacheSync.ts +53 -12
- package/src/storages/AbstractSplitsCacheAsync.ts +2 -2
- package/src/storages/AbstractSplitsCacheSync.ts +7 -5
- package/src/storages/KeyBuilder.ts +0 -3
- package/src/storages/KeyBuilderCS.ts +9 -0
- package/src/storages/dataLoader.ts +1 -1
- package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +26 -56
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +5 -20
- package/src/storages/inMemory/MySegmentsCacheInMemory.ts +10 -44
- package/src/storages/inMemory/SplitsCacheInMemory.ts +7 -13
- package/src/storages/types.ts +10 -8
- package/src/sync/polling/fetchers/mySegmentsFetcher.ts +7 -14
- package/src/sync/polling/fetchers/segmentChangesFetcher.ts +1 -1
- package/src/sync/polling/fetchers/types.ts +2 -2
- package/src/sync/polling/pollingManagerCS.ts +29 -61
- package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +12 -13
- package/src/sync/polling/types.ts +8 -8
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +17 -18
- package/src/sync/streaming/AuthClient/index.ts +1 -1
- package/src/sync/streaming/SSEClient/index.ts +4 -6
- package/src/sync/streaming/SSEHandler/index.ts +5 -9
- package/src/sync/streaming/SSEHandler/types.ts +13 -25
- package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +17 -12
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +1 -1
- package/src/sync/streaming/UpdateWorkers/types.ts +2 -2
- package/src/sync/streaming/constants.ts +2 -3
- package/src/sync/streaming/parseUtils.ts +19 -11
- package/src/sync/streaming/pushManager.ts +38 -68
- package/src/sync/streaming/types.ts +11 -13
- package/src/sync/submitters/telemetrySubmitter.ts +0 -2
- package/src/sync/submitters/types.ts +3 -6
- package/src/sync/syncManagerOnline.ts +11 -19
- package/src/types.ts +1 -26
- package/src/utils/constants/index.ts +2 -3
- package/src/utils/settingsValidation/index.ts +1 -5
- package/types/dtos/types.d.ts +7 -8
- package/types/logger/constants.d.ts +2 -1
- package/types/readiness/types.d.ts +0 -1
- package/types/services/decorateHeaders.d.ts +2 -0
- package/types/services/splitApi.d.ts +1 -1
- package/types/services/splitHttpClient.d.ts +1 -1
- package/types/services/types.d.ts +2 -3
- package/types/storages/AbstractSegmentsCacheSync.d.ts +9 -11
- package/types/storages/AbstractSplitsCacheAsync.d.ts +1 -1
- package/types/storages/AbstractSplitsCacheSync.d.ts +4 -4
- package/types/storages/KeyBuilder.d.ts +0 -1
- package/types/storages/KeyBuilderCS.d.ts +2 -0
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +2 -12
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +1 -1
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +3 -9
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +1 -2
- package/types/storages/types.d.ts +8 -7
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +2 -2
- package/types/sync/polling/fetchers/types.d.ts +2 -2
- package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +4 -3
- package/types/sync/polling/types.d.ts +8 -12
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +3 -2
- package/types/sync/streaming/SSEHandler/types.d.ts +13 -22
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +2 -3
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +2 -1
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +3 -2
- package/types/sync/streaming/UpdateWorkers/types.d.ts +2 -2
- package/types/sync/streaming/constants.d.ts +2 -3
- package/types/sync/streaming/parseUtils.d.ts +4 -5
- package/types/sync/streaming/pushManager.d.ts +0 -2
- package/types/sync/streaming/pushManagerCS_Spec1_3.d.ts +9 -0
- package/types/sync/streaming/pushManager_Spec1_3.d.ts +9 -0
- package/types/sync/streaming/types.d.ts +9 -10
- package/types/sync/submitters/types.d.ts +3 -6
- package/types/types.d.ts +0 -25
- package/types/utils/constants/index.d.ts +2 -3
- package/types/utils/settingsValidation/index.d.ts +0 -2
package/types/types.d.ts
CHANGED
|
@@ -80,7 +80,6 @@ export interface ISettings {
|
|
|
80
80
|
metricsRefreshRate?: number;
|
|
81
81
|
telemetryRefreshRate: number;
|
|
82
82
|
segmentsRefreshRate: number;
|
|
83
|
-
largeSegmentsRefreshRate: number;
|
|
84
83
|
offlineRefreshRate: number;
|
|
85
84
|
eventsPushRate: number;
|
|
86
85
|
eventsQueueSize: number;
|
|
@@ -91,7 +90,6 @@ export interface ISettings {
|
|
|
91
90
|
requestTimeoutBeforeReady: number;
|
|
92
91
|
retriesOnFailureBeforeReady: number;
|
|
93
92
|
eventsFirstPushWindow: number;
|
|
94
|
-
waitForLargeSegments: boolean;
|
|
95
93
|
};
|
|
96
94
|
readonly storage: IStorageSyncFactory | IStorageAsyncFactory;
|
|
97
95
|
readonly integrations: Array<{
|
|
@@ -115,7 +113,6 @@ export interface ISettings {
|
|
|
115
113
|
__splitFiltersValidation: ISplitFiltersValidation;
|
|
116
114
|
localhostMode?: SplitIO.LocalhostFactory;
|
|
117
115
|
enabled: boolean;
|
|
118
|
-
largeSegmentsEnabled: boolean;
|
|
119
116
|
flagSpecVersion: string;
|
|
120
117
|
};
|
|
121
118
|
readonly runtime: {
|
|
@@ -813,13 +810,6 @@ export declare namespace SplitIO {
|
|
|
813
810
|
* @default 10
|
|
814
811
|
*/
|
|
815
812
|
eventsFirstPushWindow?: number;
|
|
816
|
-
/**
|
|
817
|
-
* Whether the SDK should wait for large segments to be ready before emitting SDK_READY event.
|
|
818
|
-
* It only applies if largeSegmentsEnabled is true.
|
|
819
|
-
* @property {number} waitForLargeSegments
|
|
820
|
-
* @default true
|
|
821
|
-
*/
|
|
822
|
-
waitForLargeSegments?: boolean;
|
|
823
813
|
};
|
|
824
814
|
/**
|
|
825
815
|
* SDK scheduler settings.
|
|
@@ -864,13 +854,6 @@ export declare namespace SplitIO {
|
|
|
864
854
|
* @default 60
|
|
865
855
|
*/
|
|
866
856
|
segmentsRefreshRate?: number;
|
|
867
|
-
/**
|
|
868
|
-
* The SDK polls Split servers for changes to large segment definitions. This parameter controls this polling period in seconds.
|
|
869
|
-
* It only applies if largeSegmentsEnabled is true.
|
|
870
|
-
* @property {number} largeSegmentsRefreshRate
|
|
871
|
-
* @default 60
|
|
872
|
-
*/
|
|
873
|
-
largeSegmentsRefreshRate?: number;
|
|
874
857
|
/**
|
|
875
858
|
* The SDK posts the queued events data in bulks. This parameter controls the posting rate in seconds.
|
|
876
859
|
* @property {number} eventsPushRate
|
|
@@ -943,14 +926,6 @@ export declare namespace SplitIO {
|
|
|
943
926
|
* @property {Object} urls
|
|
944
927
|
*/
|
|
945
928
|
urls?: UrlSettings;
|
|
946
|
-
sync?: ISharedSettings['sync'] & {
|
|
947
|
-
/**
|
|
948
|
-
* Enables synchronization of large segments.
|
|
949
|
-
* @property {boolean} largeSegmentsEnabled
|
|
950
|
-
* @default false
|
|
951
|
-
*/
|
|
952
|
-
largeSegmentsEnabled?: boolean;
|
|
953
|
-
};
|
|
954
929
|
}
|
|
955
930
|
/**
|
|
956
931
|
* Settings interface for SDK instances created on NodeJS.
|
|
@@ -52,8 +52,7 @@ export declare const EVENTS = "ev";
|
|
|
52
52
|
export declare const TELEMETRY = "te";
|
|
53
53
|
export declare const TOKEN = "to";
|
|
54
54
|
export declare const SEGMENT = "se";
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const MY_LARGE_SEGMENT = "mls";
|
|
55
|
+
export declare const MEMBERSHIPS = "ms";
|
|
57
56
|
export declare const TREATMENT = "t";
|
|
58
57
|
export declare const TREATMENTS = "ts";
|
|
59
58
|
export declare const TREATMENT_WITH_CONFIG = "tc";
|
|
@@ -79,6 +78,6 @@ export declare const NON_REQUESTED = 1;
|
|
|
79
78
|
export declare const DISABLED = 0;
|
|
80
79
|
export declare const ENABLED = 1;
|
|
81
80
|
export declare const PAUSED = 2;
|
|
82
|
-
export declare const FLAG_SPEC_VERSION = "1.
|
|
81
|
+
export declare const FLAG_SPEC_VERSION = "1.2";
|
|
83
82
|
export declare const IN_SEGMENT = "IN_SEGMENT";
|
|
84
83
|
export declare const IN_LARGE_SEGMENT = "IN_LARGE_SEGMENT";
|
|
@@ -12,7 +12,6 @@ export declare const base: {
|
|
|
12
12
|
scheduler: {
|
|
13
13
|
featuresRefreshRate: number;
|
|
14
14
|
segmentsRefreshRate: number;
|
|
15
|
-
largeSegmentsRefreshRate: number;
|
|
16
15
|
telemetryRefreshRate: number;
|
|
17
16
|
impressionsRefreshRate: number;
|
|
18
17
|
offlineRefreshRate: number;
|
|
@@ -40,7 +39,6 @@ export declare const base: {
|
|
|
40
39
|
localhostMode: undefined;
|
|
41
40
|
enabled: boolean;
|
|
42
41
|
flagSpecVersion: string;
|
|
43
|
-
largeSegmentsEnabled: boolean;
|
|
44
42
|
};
|
|
45
43
|
log: undefined;
|
|
46
44
|
};
|