@splitsoftware/splitio-browserjs 0.1.1-canary.1 → 0.2.1-rc.0
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 +10 -3
- package/README.md +2 -1
- package/cjs/{slim → full}/index.js +7 -8
- package/cjs/{slim → full}/splitFactory.js +10 -5
- package/cjs/index.js +17 -8
- package/cjs/platform/{getFetch.js → getFetchFull.js} +0 -0
- package/cjs/platform/{getFetchMin.js → getFetchSlim.js} +0 -0
- package/cjs/platform/getModules.js +26 -18
- package/cjs/settings/defaults.js +1 -1
- package/cjs/settings/{slim.js → full.js} +4 -1
- package/cjs/settings/index.js +5 -2
- package/cjs/splitFactory.js +9 -3
- package/esm/{slim → full}/index.js +3 -2
- package/esm/{slim → full}/splitFactory.js +8 -4
- package/esm/index.js +8 -2
- package/esm/platform/{getFetch.js → getFetchFull.js} +0 -0
- package/esm/platform/{getFetchMin.js → getFetchSlim.js} +0 -0
- package/esm/platform/getModules.js +26 -18
- package/esm/settings/defaults.js +1 -1
- package/esm/settings/{slim.js → full.js} +4 -1
- package/esm/settings/index.js +5 -2
- package/esm/splitFactory.js +8 -3
- package/full/package.json +6 -0
- package/package.json +12 -10
- package/src/{slim → full}/index.ts +3 -2
- package/src/{slim → full}/splitFactory.ts +9 -4
- package/src/full/umd.ts +14 -0
- package/src/index.ts +8 -2
- package/src/platform/{getFetch.ts → getFetchFull.ts} +0 -0
- package/src/platform/{getFetchMin.ts → getFetchSlim.ts} +0 -0
- package/src/platform/getModules.ts +28 -21
- package/src/settings/defaults.ts +1 -1
- package/src/settings/{slim.ts → full.ts} +4 -1
- package/src/settings/index.ts +5 -2
- package/src/splitFactory.ts +9 -3
- package/src/umd.ts +0 -15
- package/types/{slim → full}/index.d.ts +13 -5
- package/types/index.d.ts +51 -2
- package/types/splitio.d.ts +339 -75
- package/cjs/platform/getModulesSlim.js +0 -39
- package/esm/platform/getModulesSlim.js +0 -34
- package/slim/package.json +0 -6
- package/src/platform/getModulesSlim.ts +0 -52
- package/src/slim/umd.ts +0 -6
package/src/full/umd.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger } from './index';
|
|
3
|
+
|
|
4
|
+
// Include all pluggable modules as properties to expose at the global `splitio` object
|
|
5
|
+
SplitFactory.SplitFactory = SplitFactory;
|
|
6
|
+
SplitFactory.InLocalStorage = InLocalStorage;
|
|
7
|
+
SplitFactory.GoogleAnalyticsToSplit = GoogleAnalyticsToSplit;
|
|
8
|
+
SplitFactory.SplitToGoogleAnalytics = SplitToGoogleAnalytics;
|
|
9
|
+
SplitFactory.ErrorLogger = ErrorLogger;
|
|
10
|
+
SplitFactory.WarnLogger = WarnLogger;
|
|
11
|
+
SplitFactory.InfoLogger = InfoLogger;
|
|
12
|
+
SplitFactory.DebugLogger = DebugLogger;
|
|
13
|
+
|
|
14
|
+
export default SplitFactory;
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export { SplitFactory } from './splitFactory';
|
|
2
2
|
export { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/src/integrations/ga/GoogleAnalyticsToSplit';
|
|
4
|
+
export { SplitToGoogleAnalytics } from '@splitsoftware/splitio-commons/src/integrations/ga/SplitToGoogleAnalytics';
|
|
5
|
+
export { ErrorLogger } from '@splitsoftware/splitio-commons/src/logger/browser/ErrorLogger';
|
|
6
|
+
export { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/WarnLogger';
|
|
7
|
+
export { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/InfoLogger';
|
|
8
|
+
export { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
|
|
9
|
+
export { LocalhostFromObject } from '@splitsoftware/splitio-commons/src/sync/offline/LocalhostFromObject';
|
|
10
|
+
export { PluggableStorage } from '@splitsoftware/splitio-commons/src/storages/pluggable';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { splitApiFactory } from '@splitsoftware/splitio-commons/src/services/splitApi';
|
|
2
|
-
import { splitsParserFromSettingsFactory } from '@splitsoftware/splitio-commons/src/sync/offline/splitsParser/splitsParserFromSettings';
|
|
3
|
-
import { syncManagerOfflineFactory } from '@splitsoftware/splitio-commons/src/sync/syncManagerOffline';
|
|
4
2
|
import { syncManagerOnlineFactory } from '@splitsoftware/splitio-commons/src/sync/syncManagerOnline';
|
|
5
3
|
import pushManagerFactory from '@splitsoftware/splitio-commons/src/sync/streaming/pushManager';
|
|
6
4
|
import pollingManagerCSFactory from '@splitsoftware/splitio-commons/src/sync/polling/pollingManagerCS';
|
|
@@ -9,42 +7,35 @@ import { sdkClientMethodCSFactory } from '@splitsoftware/splitio-commons/src/sdk
|
|
|
9
7
|
import BrowserSignalListener from '@splitsoftware/splitio-commons/src/listeners/browser';
|
|
10
8
|
import { impressionObserverCSFactory } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/impressionObserverCS';
|
|
11
9
|
import integrationsManagerFactory from '@splitsoftware/splitio-commons/src/integrations/pluggable';
|
|
12
|
-
import EventEmitter from '@splitsoftware/splitio-commons/src/utils/MinEvents';
|
|
13
10
|
|
|
14
|
-
import { getFetch } from './getFetch';
|
|
15
|
-
import { getEventSource } from './getEventSource';
|
|
16
11
|
import { shouldAddPt } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/utils';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
12
|
+
import { IPlatform, ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory/types';
|
|
13
|
+
import { SplitIO, ISettings } from '@splitsoftware/splitio-commons/src/types';
|
|
14
|
+
import { CONSUMER_MODE, CONSUMER_PARTIAL_MODE, LOCALHOST_MODE } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
getEventSource,
|
|
24
|
-
EventEmitter
|
|
25
|
-
};
|
|
16
|
+
let syncManagerStandaloneFactory: ISdkFactoryParams['syncManagerFactory'];
|
|
17
|
+
let syncManagerSubmittersFactory: ISdkFactoryParams['syncManagerFactory'];
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
const syncManagerOnlineCSFactory = syncManagerOnlineFactory(pollingManagerCSFactory, pushManagerFactory);
|
|
19
|
+
export function getModules(settings: ISettings, platform: IPlatform): ISdkFactoryParams {
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
if (!syncManagerStandaloneFactory) syncManagerStandaloneFactory = syncManagerOnlineFactory(pollingManagerCSFactory, pushManagerFactory);
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
const modules: ISdkFactoryParams = {
|
|
33
24
|
settings,
|
|
34
25
|
|
|
35
|
-
platform
|
|
26
|
+
platform,
|
|
36
27
|
|
|
37
28
|
storageFactory: settings.storage,
|
|
38
29
|
|
|
39
|
-
splitApiFactory
|
|
30
|
+
splitApiFactory,
|
|
40
31
|
|
|
41
|
-
syncManagerFactory:
|
|
32
|
+
syncManagerFactory: syncManagerStandaloneFactory,
|
|
42
33
|
|
|
43
34
|
sdkManagerFactory,
|
|
44
35
|
|
|
45
36
|
sdkClientMethodFactory: sdkClientMethodCSFactory,
|
|
46
37
|
|
|
47
|
-
SignalListener:
|
|
38
|
+
SignalListener: BrowserSignalListener as ISdkFactoryParams['SignalListener'],
|
|
48
39
|
|
|
49
40
|
impressionListener: settings.impressionListener as SplitIO.IImpressionListener,
|
|
50
41
|
|
|
@@ -52,4 +43,20 @@ export function getModules(settings: ISettingsInternal): ISdkFactoryParams {
|
|
|
52
43
|
|
|
53
44
|
impressionsObserverFactory: shouldAddPt(settings) ? impressionObserverCSFactory : undefined,
|
|
54
45
|
};
|
|
46
|
+
|
|
47
|
+
switch (settings.mode) {
|
|
48
|
+
case LOCALHOST_MODE:
|
|
49
|
+
modules.splitApiFactory = undefined;
|
|
50
|
+
modules.syncManagerFactory = settings.sync.localhostMode;
|
|
51
|
+
modules.SignalListener = undefined;
|
|
52
|
+
break;
|
|
53
|
+
case CONSUMER_MODE:
|
|
54
|
+
modules.syncManagerFactory = undefined;
|
|
55
|
+
break;
|
|
56
|
+
case CONSUMER_PARTIAL_MODE:
|
|
57
|
+
if (!syncManagerSubmittersFactory) syncManagerSubmittersFactory = syncManagerOnlineFactory(undefined, undefined);
|
|
58
|
+
modules.syncManagerFactory = syncManagerSubmittersFactory;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return modules;
|
|
55
62
|
}
|
package/src/settings/defaults.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/logger/index';
|
|
2
2
|
import { LogLevel } from '@splitsoftware/splitio-commons/src/types';
|
|
3
3
|
|
|
4
|
-
const packageVersion = '0.
|
|
4
|
+
const packageVersion = '0.2.1-rc.0';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
|
@@ -3,12 +3,15 @@ import { defaults } from './defaults';
|
|
|
3
3
|
import { validateStorageCS } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/storage/storageCS';
|
|
4
4
|
import { validatePluggableIntegrations } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/integrations/pluggable';
|
|
5
5
|
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/pluggableLogger';
|
|
6
|
+
import { validateLocalhostWithDefault } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/localhost/builtin';
|
|
6
7
|
|
|
7
8
|
const params = {
|
|
8
9
|
defaults,
|
|
9
10
|
storage: validateStorageCS,
|
|
10
11
|
integrations: validatePluggableIntegrations,
|
|
11
|
-
logger: validateLogger
|
|
12
|
+
logger: validateLogger,
|
|
13
|
+
// Full SplitFactory returns a default instance, except a valid one is provided
|
|
14
|
+
localhost: validateLocalhostWithDefault
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export function settingsValidator(config: any) {
|
package/src/settings/index.ts
CHANGED
|
@@ -2,13 +2,16 @@ import { settingsValidation } from '@splitsoftware/splitio-commons/src/utils/set
|
|
|
2
2
|
import { defaults } from './defaults';
|
|
3
3
|
import { validateStorageCS } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/storage/storageCS';
|
|
4
4
|
import { validatePluggableIntegrations } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/integrations/pluggable';
|
|
5
|
-
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/
|
|
5
|
+
import { validateLogger } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/logger/pluggableLogger';
|
|
6
|
+
import { validateLocalhost } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/localhost/pluggable';
|
|
6
7
|
|
|
7
8
|
const params = {
|
|
8
9
|
defaults,
|
|
9
10
|
storage: validateStorageCS,
|
|
10
11
|
integrations: validatePluggableIntegrations,
|
|
11
|
-
logger: validateLogger
|
|
12
|
+
logger: validateLogger,
|
|
13
|
+
// Slim SplitFactory validates that the localhost module is passed in localhost mode
|
|
14
|
+
localhost: validateLocalhost
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export function settingsValidator(config: any) {
|
package/src/splitFactory.ts
CHANGED
|
@@ -3,16 +3,22 @@ import { getModules } from './platform/getModules';
|
|
|
3
3
|
import { sdkFactory } from '@splitsoftware/splitio-commons/src/sdkFactory/index';
|
|
4
4
|
import { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory/types';
|
|
5
5
|
import { merge } from '@splitsoftware/splitio-commons/src/utils/lang';
|
|
6
|
+
import { getFetch } from './platform/getFetchSlim';
|
|
7
|
+
import { getEventSource } from './platform/getEventSource';
|
|
8
|
+
import EventEmitter from '@splitsoftware/splitio-commons/src/utils/MinEvents';
|
|
9
|
+
|
|
10
|
+
const platform = { getFetch, getEventSource, EventEmitter };
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
|
-
* SplitFactory with pluggable modules for Browser.
|
|
9
|
-
*
|
|
13
|
+
* Slim SplitFactory with pluggable modules for Browser.
|
|
14
|
+
* Doesn't include localhost mode and fetch ponyfill out-of-the-box.
|
|
10
15
|
*
|
|
11
16
|
* @param config configuration object used to instantiates the SDK
|
|
12
17
|
* @param customModules optional object of SDK modules to overwrite default ones. Use with caution since, unlike `config`, this param is not validated.
|
|
18
|
+
* @throws Will throw an error if the provided config is invalid.
|
|
13
19
|
*/
|
|
14
20
|
export function SplitFactory(config: any, customModules?: Partial<ISdkFactoryParams>) {
|
|
15
21
|
const settings = settingsValidator(config);
|
|
16
|
-
const modules = getModules(settings);
|
|
22
|
+
const modules = getModules(settings, platform);
|
|
17
23
|
return sdkFactory(customModules ? merge(modules, customModules) as ISdkFactoryParams : modules);
|
|
18
24
|
}
|
package/src/umd.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { SplitFactory } from './splitFactory';
|
|
3
|
-
import { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
|
|
4
|
-
import { default as GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/src/integrations/ga/GaToSplitPlugin';
|
|
5
|
-
import { default as SplitToGoogleAnalytics } from '@splitsoftware/splitio-commons/src/integrations/ga/SplitToGaPlugin';
|
|
6
|
-
import { ErrorLogger } from '@splitsoftware/splitio-commons/src/logger/browser/ErrorLogger';
|
|
7
|
-
import { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/WarnLogger';
|
|
8
|
-
import { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/InfoLogger';
|
|
9
|
-
import { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
|
|
10
3
|
|
|
11
|
-
// Include all pluggable modules as properties to expose at the global `splitio` object
|
|
12
4
|
SplitFactory.SplitFactory = SplitFactory;
|
|
13
|
-
SplitFactory.InLocalStorage = InLocalStorage;
|
|
14
|
-
SplitFactory.GoogleAnalyticsToSplit = GoogleAnalyticsToSplit;
|
|
15
|
-
SplitFactory.SplitToGoogleAnalytics = SplitToGoogleAnalytics;
|
|
16
|
-
SplitFactory.ErrorLogger = ErrorLogger;
|
|
17
|
-
SplitFactory.WarnLogger = WarnLogger;
|
|
18
|
-
SplitFactory.InfoLogger = InfoLogger;
|
|
19
|
-
SplitFactory.DebugLogger = DebugLogger;
|
|
20
5
|
|
|
21
6
|
export default SplitFactory;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
// Declaration file for Javascript Browser Split Software SDK
|
|
1
|
+
// Declaration file for Javascript Browser Split Software SDK
|
|
2
2
|
// Project: http://www.split.io/
|
|
3
3
|
// Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
|
|
4
4
|
|
|
5
|
-
/// <reference path="
|
|
5
|
+
/// <reference path="../splitio.d.ts" />
|
|
6
6
|
export = JsSdk;
|
|
7
7
|
|
|
8
8
|
declare module JsSdk {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Full version of the Split.io sdk factory function.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* and
|
|
12
|
+
* Unlike the slim version, it doesn't require a 'fetch' polyfill to support old browsers @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#language-support}.
|
|
13
|
+
* and includes localhost mode out-of-the-box @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#localhost-mode}.
|
|
14
14
|
*
|
|
15
15
|
* The settings parameter should be an object that complies with the SplitIO.IBrowserSettings.
|
|
16
16
|
* For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
|
|
17
17
|
*/
|
|
18
18
|
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.ISDK;
|
|
19
|
+
export function SplitFactory(settings: SplitIO.IBrowserAsyncSettings): SplitIO.IAsyncSDK;
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Persistent storage based on the LocalStorage Web API for browsers.
|
|
@@ -24,6 +25,13 @@ declare module JsSdk {
|
|
|
24
25
|
*/
|
|
25
26
|
export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
|
|
26
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Pluggable storage to use the SDK in consumer mode.
|
|
30
|
+
*
|
|
31
|
+
* @see {@link @TODO}
|
|
32
|
+
*/
|
|
33
|
+
export function PluggableStorage(options: SplitIO.PluggableStorageOptions): SplitIO.StorageAsyncFactory;
|
|
34
|
+
|
|
27
35
|
/**
|
|
28
36
|
* Enable 'Google Analytics to Split' integration, to track Google Analytics hits as Split events.
|
|
29
37
|
*
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Declaration file for Javascript Browser Split Software SDK
|
|
1
|
+
// Declaration file for Javascript Browser Split Software SDK
|
|
2
2
|
// Project: http://www.split.io/
|
|
3
3
|
// Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
|
|
4
4
|
|
|
@@ -7,11 +7,16 @@ export = JsSdk;
|
|
|
7
7
|
|
|
8
8
|
declare module JsSdk {
|
|
9
9
|
/**
|
|
10
|
-
* Split.io sdk factory function.
|
|
10
|
+
* Slim version of the Split.io sdk factory function.
|
|
11
|
+
*
|
|
12
|
+
* Recommended to use for bundle size reduction in production, since it doesn't include a 'fetch' polyfill and localhost mode out-of-the-box
|
|
13
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#localhost-mode}.
|
|
14
|
+
*
|
|
11
15
|
* The settings parameter should be an object that complies with the SplitIO.IBrowserSettings.
|
|
12
16
|
* For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
|
|
13
17
|
*/
|
|
14
18
|
export function SplitFactory(settings: SplitIO.IBrowserSettings): SplitIO.ISDK;
|
|
19
|
+
export function SplitFactory(settings: SplitIO.IBrowserAsyncSettings): SplitIO.IAsyncSDK;
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Persistent storage based on the LocalStorage Web API for browsers.
|
|
@@ -20,6 +25,13 @@ declare module JsSdk {
|
|
|
20
25
|
*/
|
|
21
26
|
export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
|
|
22
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Pluggable storage to use the SDK in consumer mode.
|
|
30
|
+
*
|
|
31
|
+
* @see {@link @TODO}
|
|
32
|
+
*/
|
|
33
|
+
export function PluggableStorage(options: SplitIO.PluggableStorageOptions): SplitIO.StorageAsyncFactory;
|
|
34
|
+
|
|
23
35
|
/**
|
|
24
36
|
* Enable 'Google Analytics to Split' integration, to track Google Analytics hits as Split events.
|
|
25
37
|
*
|
|
@@ -33,4 +45,41 @@ declare module JsSdk {
|
|
|
33
45
|
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#integrations}
|
|
34
46
|
*/
|
|
35
47
|
export function SplitToGoogleAnalytics(options?: SplitIO.SplitToGoogleAnalyticsOptions): SplitIO.IntegrationFactory;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Creates a logger instance that enables descriptive log messages with DEBUG log level when passed in the factory settings.
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
53
|
+
*/
|
|
54
|
+
export function DebugLogger(): SplitIO.ILogger;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Creates a logger instance that enables descriptive log messages with INFO log level when passed in the factory settings.
|
|
58
|
+
*
|
|
59
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
60
|
+
*/
|
|
61
|
+
export function InfoLogger(): SplitIO.ILogger;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Creates a logger instance that enables descriptive log messages with WARN log level when passed in the factory settings.
|
|
65
|
+
*
|
|
66
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
67
|
+
*/
|
|
68
|
+
export function WarnLogger(): SplitIO.ILogger;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Creates a logger instance that enables descriptive log messages with ERROR log level when passed in the factory settings.
|
|
73
|
+
*
|
|
74
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
75
|
+
*/
|
|
76
|
+
export function ErrorLogger(): SplitIO.ILogger;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Required to enable localhost mode when importing the SDK from the slim entry point of the library.
|
|
80
|
+
* It uses the mocked features map defined in the 'features' config object.
|
|
81
|
+
*
|
|
82
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#localhost-mode}
|
|
83
|
+
*/
|
|
84
|
+
export function LocalhostFromObject(): SplitIO.LocalhostFactory;
|
|
36
85
|
}
|