@splitsoftware/splitio-commons 1.6.0 → 1.6.2-rc.1
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/integrations/ga/GaToSplit.js +4 -2
- package/cjs/integrations/ga/GoogleAnalyticsToSplit.js +1 -0
- package/cjs/listeners/browser.js +2 -1
- package/cjs/logger/constants.js +2 -1
- package/cjs/sdkFactory/index.js +13 -5
- package/cjs/services/splitApi.js +20 -0
- package/cjs/sync/submitters/submitterManager.js +3 -0
- package/cjs/sync/submitters/uniqueKeysSubmitter.js +70 -0
- package/cjs/trackers/impressionsTracker.js +7 -28
- package/cjs/trackers/strategy/strategyDebug.js +25 -0
- package/cjs/trackers/strategy/strategyNone.js +29 -0
- package/cjs/trackers/strategy/strategyOptimized.js +34 -0
- package/cjs/trackers/uniqueKeysTracker.js +69 -0
- package/cjs/utils/constants/index.js +3 -2
- package/cjs/utils/settingsValidation/impressionsMode.js +2 -2
- package/cjs/utils/settingsValidation/index.js +3 -0
- package/esm/integrations/ga/GaToSplit.js +4 -2
- package/esm/integrations/ga/GoogleAnalyticsToSplit.js +1 -0
- package/esm/listeners/browser.js +3 -2
- package/esm/logger/constants.js +1 -0
- package/esm/sdkFactory/index.js +13 -5
- package/esm/services/splitApi.js +20 -0
- package/esm/sync/submitters/submitterManager.js +3 -0
- package/esm/sync/submitters/uniqueKeysSubmitter.js +64 -0
- package/esm/trackers/impressionsTracker.js +7 -28
- package/esm/trackers/strategy/strategyDebug.js +21 -0
- package/esm/trackers/strategy/strategyNone.js +25 -0
- package/esm/trackers/strategy/strategyOptimized.js +30 -0
- package/esm/trackers/uniqueKeysTracker.js +65 -0
- package/esm/utils/constants/index.js +1 -0
- package/esm/utils/settingsValidation/impressionsMode.js +3 -3
- package/esm/utils/settingsValidation/index.js +3 -0
- package/package.json +1 -1
- package/src/integrations/ga/GaToSplit.ts +3 -2
- package/src/integrations/ga/GoogleAnalyticsToSplit.ts +1 -1
- package/src/listeners/browser.ts +3 -2
- package/src/logger/constants.ts +1 -0
- package/src/sdkFactory/index.ts +15 -5
- package/src/sdkFactory/types.ts +7 -4
- package/src/services/splitApi.ts +22 -0
- package/src/services/types.ts +6 -0
- package/src/storages/types.ts +17 -4
- package/src/sync/submitters/submitterManager.ts +2 -0
- package/src/sync/submitters/types.ts +20 -1
- package/src/sync/submitters/uniqueKeysSubmitter.ts +79 -0
- package/src/trackers/impressionsTracker.ts +12 -34
- package/src/trackers/strategy/strategyDebug.ts +28 -0
- package/src/trackers/strategy/strategyNone.ts +34 -0
- package/src/trackers/strategy/strategyOptimized.ts +42 -0
- package/src/trackers/types.ts +30 -0
- package/src/trackers/uniqueKeysTracker.ts +80 -0
- package/src/types.ts +2 -1
- package/src/utils/constants/index.ts +1 -0
- package/src/utils/settingsValidation/impressionsMode.ts +3 -3
- package/src/utils/settingsValidation/index.ts +4 -0
- package/types/integrations/ga/GoogleAnalyticsToSplit.d.ts +1 -1
- package/types/logger/browser/{debugLogger.d.ts → DebugLogger.d.ts} +0 -0
- package/types/logger/browser/{errorLogger.d.ts → ErrorLogger.d.ts} +0 -0
- package/types/logger/browser/{infoLogger.d.ts → InfoLogger.d.ts} +0 -0
- package/types/logger/browser/{warnLogger.d.ts → WarnLogger.d.ts} +0 -0
- package/types/logger/constants.d.ts +1 -0
- package/types/sdkFactory/types.d.ts +4 -2
- package/types/services/types.d.ts +4 -0
- package/types/storages/types.d.ts +16 -3
- package/types/sync/submitters/types.d.ts +18 -1
- package/types/sync/submitters/uniqueKeysSubmitter.d.ts +19 -0
- package/types/trackers/filter/bloomFilter.d.ts +10 -0
- package/types/trackers/filter/dictionaryFilter.d.ts +8 -0
- package/types/trackers/filter/types.d.ts +5 -0
- package/types/trackers/impressionsTracker.d.ts +4 -6
- package/types/trackers/strategy/strategyDebug.d.ts +9 -0
- package/types/trackers/strategy/strategyNone.d.ts +10 -0
- package/types/trackers/strategy/strategyOptimized.d.ts +11 -0
- package/types/trackers/types.d.ts +29 -0
- package/types/trackers/uniqueKeysTracker.d.ts +13 -0
- package/types/types.d.ts +2 -1
- package/types/utils/constants/index.d.ts +1 -0
- package/types/utils/settingsValidation/index.d.ts +1 -0
- package/types/utils/timeTracker/index.d.ts +70 -1
- package/src/logger/.DS_Store +0 -0
- package/types/integrations/ga/GaToSplitPlugin.d.ts +0 -3
- package/types/integrations/ga/SplitToGaPlugin.d.ts +0 -4
- package/types/integrations/ga/autoRequire.d.ts +0 -4
- package/types/logger/codes.d.ts +0 -2
- package/types/logger/codesConstants.d.ts +0 -117
- package/types/logger/codesConstantsBrowser.d.ts +0 -2
- package/types/logger/codesConstantsNode.d.ts +0 -14
- package/types/logger/codesDebug.d.ts +0 -1
- package/types/logger/codesDebugBrowser.d.ts +0 -1
- package/types/logger/codesDebugNode.d.ts +0 -1
- package/types/logger/codesError.d.ts +0 -1
- package/types/logger/codesErrorNode.d.ts +0 -1
- package/types/logger/codesInfo.d.ts +0 -1
- package/types/logger/codesWarn.d.ts +0 -1
- package/types/logger/codesWarnNode.d.ts +0 -1
- package/types/logger/debugLogger.d.ts +0 -2
- package/types/logger/errorLogger.d.ts +0 -2
- package/types/logger/infoLogger.d.ts +0 -2
- package/types/logger/messages/debugBrowser.d.ts +0 -1
- package/types/logger/messages/debugNode.d.ts +0 -1
- package/types/logger/messages/errorNode.d.ts +0 -1
- package/types/logger/messages/warnNode.d.ts +0 -1
- package/types/logger/noopLogger.d.ts +0 -2
- package/types/logger/warnLogger.d.ts +0 -2
- package/types/sdkFactory/userConsentProps.d.ts +0 -6
- package/types/sdkManager/sdkManagerMethod.d.ts +0 -6
- package/types/storages/getRegisteredSegments.d.ts +0 -10
- package/types/storages/inMemory/index.d.ts +0 -10
- package/types/storages/parseSegments.d.ts +0 -6
- package/types/sync/polling/syncTasks/splitsSyncTask.copy.d.ts +0 -35
- package/types/sync/polling/syncTasks/splitsSyncTask.morelikeoriginal.d.ts +0 -35
- package/types/sync/streaming/AuthClient/indexV1.d.ts +0 -12
- package/types/sync/streaming/AuthClient/indexV2.d.ts +0 -8
- package/types/sync/streaming/pushManagerCS.d.ts +0 -1
- package/types/sync/streaming/pushManagerNoUsers.d.ts +0 -13
- package/types/sync/streaming/pushManagerSS.d.ts +0 -1
- package/types/sync/submitters/telemetrySyncTask.d.ts +0 -0
- package/types/sync/syncManagerFromFile.d.ts +0 -2
- package/types/sync/syncManagerFromObject.d.ts +0 -2
- package/types/sync/syncManagerOffline.d.ts +0 -9
- package/types/trackers/telemetryRecorder.d.ts +0 -0
- package/types/utils/EventEmitter.d.ts +0 -4
- package/types/utils/consent.d.ts +0 -2
- package/types/utils/lang/errors.d.ts +0 -10
- package/types/utils/murmur3/commons.d.ts +0 -12
- package/types/utils/settingsValidation/buildMetadata.d.ts +0 -3
- package/types/utils/settingsValidation/localhost/index.d.ts +0 -9
- package/types/utils/settingsValidation/logger.d.ts +0 -11
- package/types/utils/settingsValidation/runtime/browser.d.ts +0 -2
- package/types/utils/settingsValidation/runtime/node.d.ts +0 -2
- package/types/utils/settingsValidation/userConsent.d.ts +0 -5
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IFetchAuth } from '../../../services/types';
|
|
2
|
-
import { IAuthenticate } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Factory of authentication function.
|
|
5
|
-
*
|
|
6
|
-
* @param fetchAuth `SplitAPI.fetchAuth` endpoint
|
|
7
|
-
*/
|
|
8
|
-
export declare function authenticateFactory(fetchAuth: IFetchAuth): IAuthenticate;
|
|
9
|
-
/**
|
|
10
|
-
* Returns the hash of a given user key
|
|
11
|
-
*/
|
|
12
|
-
export declare function hashUserKey(userKey: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IFetchAuthV2 } from '../../../services/types';
|
|
2
|
-
import { IAuthenticateV2 } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Factory of authentication function.
|
|
5
|
-
*
|
|
6
|
-
* @param fetchAuth `SplitAPI.fetchAuth` endpoint
|
|
7
|
-
*/
|
|
8
|
-
export declare function authenticateFactory(fetchAuthV2: IFetchAuthV2): IAuthenticateV2;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const pushManagerCSFactory: (params: import("../types").ISyncManagerFactoryParams, pollingManager: import("../polling/types").IPollingManager) => import("./types").IPushManager | undefined;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IPushManagerCS } from './types';
|
|
2
|
-
import { IStorageSync } from '../../storages/types';
|
|
3
|
-
import { IReadinessManager } from '../../readiness/types';
|
|
4
|
-
import { IPollingManager } from '../polling/types';
|
|
5
|
-
import { IFetchAuthV2 } from '../../services/types';
|
|
6
|
-
import { ISettings } from '../../types';
|
|
7
|
-
import { IPlatform } from '../../sdkFactory/types';
|
|
8
|
-
/**
|
|
9
|
-
* PushManager factory:
|
|
10
|
-
* - for server-side if key is not provided in settings.
|
|
11
|
-
* - for client-side, with support for multiple clients, if key is provided in settings
|
|
12
|
-
*/
|
|
13
|
-
export default function pushManagerFactory(pollingManager: IPollingManager, storage: IStorageSync, readiness: IReadinessManager, fetchAuthV2: IFetchAuthV2, platform: IPlatform, settings: ISettings): IPushManagerCS | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const pushManagerSSFactory: (params: import("../types").ISyncManagerFactoryParams, pollingManager: import("../polling/types").IPollingManager) => import("./types").IPushManager | undefined;
|
|
File without changes
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ISyncManagerCS, ISyncManagerFactoryParams } from './types';
|
|
2
|
-
import { ISplitsParser } from './offline/splitsParser/types';
|
|
3
|
-
/**
|
|
4
|
-
* Offline SyncManager factory.
|
|
5
|
-
* Can be used for server-side API, and client-side API with or without multiple clients.
|
|
6
|
-
*
|
|
7
|
-
* @param splitsParser e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
|
|
8
|
-
*/
|
|
9
|
-
export declare function syncManagerOfflineFactory(splitsParserFactory: () => ISplitsParser): (params: ISyncManagerFactoryParams) => ISyncManagerCS;
|
|
File without changes
|
package/types/utils/consent.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class SplitError extends Error {
|
|
2
|
-
constructor(msg?: string);
|
|
3
|
-
}
|
|
4
|
-
export declare class SplitTimeoutError extends SplitError {
|
|
5
|
-
constructor(msg?: string);
|
|
6
|
-
}
|
|
7
|
-
export declare class SplitNetworkError extends SplitError {
|
|
8
|
-
statusCode?: number;
|
|
9
|
-
constructor(msg?: string, code?: number);
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function UTF16ToUTF8(key: string): string | undefined;
|
|
2
|
-
/*!
|
|
3
|
-
* +----------------------------------------------------------------------------------+
|
|
4
|
-
* | murmurHash3.js v3.0.0 (http://github.com/karanlyons/murmurHash3.js) |
|
|
5
|
-
* | A TypeScript/JavaScript implementation of MurmurHash3's hashing algorithms. |
|
|
6
|
-
* |----------------------------------------------------------------------------------|
|
|
7
|
-
* | Copyright (c) 2012-2020 Karan Lyons. Freely distributable under the MIT license. |
|
|
8
|
-
* +----------------------------------------------------------------------------------+
|
|
9
|
-
*/
|
|
10
|
-
export declare function x86Multiply(m: number, n: number): number;
|
|
11
|
-
export declare function x86Rotl(m: number, n: number): number;
|
|
12
|
-
export declare function x86Fmix(h: number): number;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ISettings } from '../../../types';
|
|
2
|
-
/**
|
|
3
|
-
* This function validates `settings.storage` object
|
|
4
|
-
*
|
|
5
|
-
* @param {any} settings config object provided by the user to initialize the sdk
|
|
6
|
-
*
|
|
7
|
-
* @returns {Object} valid storage factory. It might be the default `InMemoryStorageCSFactory` if the provided storage is invalid.
|
|
8
|
-
*/
|
|
9
|
-
export declare function validateLocalhost(settings: ISettings): import("../../../types").SplitIO.LocalhostFactory | undefined;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../../logger/types';
|
|
2
|
-
/**
|
|
3
|
-
* Validates the `log` (logger) property at config.
|
|
4
|
-
*
|
|
5
|
-
* @param settings user config object
|
|
6
|
-
* @returns the provided logger or a no-op logger if no one is provided
|
|
7
|
-
* @throws throws an error if a logger was provided but is invalid
|
|
8
|
-
*/
|
|
9
|
-
export default function logger(settings: {
|
|
10
|
-
log: unknown;
|
|
11
|
-
}): ILogger;
|